/* ═══════════════════════════════════════════════
   青匣 Verdant Atelier — 浅青瓷 × 香槟金
   ═══════════════════════════════════════════════ */

:root {
  --paper: #f3f6ef;
  --paper-2: #ebf1e6;
  --mist: #e1ebdc;
  --mint: #d2e5d0;
  --celadon: #b3d1b6;
  --sage: #86ac92;
  --jade: #4a7a5f;
  --forest: #22433a;
  --forest-2: #2d5548;
  --ink: #14261e;
  --ink-2: #3b5047;
  --muted: #6e8177;
  --gold: #b19353;
  --gold-soft: #d9c692;
  --gold-pale: #efe5c8;
  --danger: #b0513f;

  --line: rgba(34, 67, 58, 0.13);
  --line-strong: rgba(34, 67, 58, 0.26);
  --glass: rgba(255, 255, 255, 0.58);
  --glass-strong: rgba(255, 255, 255, 0.78);

  --serif: 'Noto Serif SC', 'Songti SC', 'STSong', 'SimSun', serif;
  --display: 'Bodoni Moda', 'Didot', 'Bodoni 72', 'Noto Serif SC', serif;
  --label: 'Tenor Sans', 'Avenir Next', 'Helvetica Neue', sans-serif;
  --sans: 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans SC', 'Microsoft YaHei', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', monospace;

  --r-lg: 30px;
  --r-md: 18px;
  --r-sm: 12px;
  --shadow-soft: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 40px 80px -40px rgba(34, 67, 58, 0.28), 0 12px 28px -18px rgba(34, 67, 58, 0.18);
  --shadow-lift: 0 30px 60px -28px rgba(34, 67, 58, 0.35), 0 10px 24px -14px rgba(34, 67, 58, 0.2);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: var(--celadon);
  color: var(--ink);
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

/* ─── 氛围：柔光团 + 纸张颗粒 ─── */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background:
    radial-gradient(1200px 700px at 10% -10%, rgba(210, 229, 208, 0.9), transparent 60%),
    radial-gradient(900px 600px at 100% 10%, rgba(179, 209, 182, 0.45), transparent 60%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  animation: drift 28s ease-in-out infinite alternate;
}

.b1 {
  width: 520px;
  height: 520px;
  left: -120px;
  top: 30%;
  background: #cfe4cd;
}

.b2 {
  width: 440px;
  height: 440px;
  right: -80px;
  top: 55%;
  background: #e8dfc2;
  opacity: 0.35;
  animation-duration: 34s;
}

.b3 {
  width: 380px;
  height: 380px;
  left: 45%;
  top: 85%;
  background: #bcd8c0;
  animation-duration: 40s;
}

@keyframes drift {
  to {
    transform: translate(60px, -80px) scale(1.12);
  }
}

.grain {
  position: fixed;
  inset: -50%;
  z-index: 100;
  pointer-events: none;
  opacity: 0.22;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .13 0 0 0 0 .26 0 0 0 0 .22 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* 套准标记 ⊕ */
.reg-mark {
  display: inline-block;
  width: 13px;
  height: 13px;
  flex: none;
  border: 1px solid currentColor;
  border-radius: 50%;
  position: relative;
  vertical-align: -1px;
  opacity: 0.8;
}

.reg-mark::before,
.reg-mark::after {
  content: '';
  position: absolute;
  background: currentColor;
}

.reg-mark::before {
  left: 50%;
  top: -4px;
  bottom: -4px;
  width: 1px;
  transform: translateX(-50%);
}

.reg-mark::after {
  top: 50%;
  left: -4px;
  right: -4px;
  height: 1px;
  transform: translateY(-50%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-family: var(--label);
  font-size: 11.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--jade);
}

/* ─── 按钮 ─── */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), background 0.3s, color 0.3s, border-color 0.3s;
}

.btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.5s var(--ease);
}

.btn:hover svg {
  transform: translateX(4px);
}

.btn-primary {
  background: linear-gradient(180deg, var(--forest-2), var(--forest));
  color: #f2f5ee;
  box-shadow: 0 0 0 1px rgba(217, 198, 146, 0.45) inset, 0 18px 36px -18px rgba(34, 67, 58, 0.7);
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(217, 198, 146, 0.35) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.9s var(--ease);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(217, 198, 146, 0.7) inset, 0 24px 44px -18px rgba(34, 67, 58, 0.75);
}

.btn-primary:hover::after {
  transform: translateX(120%);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.45);
  border-color: var(--line-strong);
  color: var(--forest);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: var(--forest);
  transform: translateY(-1px);
}

.btn-lg {
  padding: 17px 32px;
  font-size: 15.5px;
}

.btn-sm {
  padding: 9px 18px;
  font-size: 13px;
}

.btn:disabled,
.btn.is-busy {
  opacity: 0.55;
  pointer-events: none;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.6);
  font-size: 22px;
  line-height: 1;
  color: var(--forest);
  transition: all 0.3s var(--ease);
}

.icon-btn:hover {
  background: var(--forest);
  color: var(--paper);
  transform: rotate(90deg);
}

/* ─── 顶栏 ─── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 18px clamp(20px, 4vw, 56px);
  background: linear-gradient(180deg, rgba(243, 246, 239, 0.92), rgba(243, 246, 239, 0.7));
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
  white-space: nowrap;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  padding: 3px;
  border-radius: 10px;
  background: var(--forest);
  fill: none;
  stroke: var(--gold-soft);
  stroke-width: 1.6;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.brand-cn {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: 0.12em;
  color: var(--forest);
}

.brand-sep {
  width: 1px;
  height: 18px;
  background: var(--line-strong);
}

.brand-en {
  font-family: var(--display);
  font-style: italic;
  font-size: 16px;
  color: var(--jade);
}

.topnav {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.navlink {
  position: relative;
  white-space: nowrap;
  padding: 8px 16px;
  border: 0;
  background: none;
  border-radius: 999px;
  font-size: 14px;
  color: var(--ink-2);
  text-decoration: none;
  transition: background 0.3s, color 0.3s;
}

.navlink:hover {
  background: rgba(255, 255, 255, 0.7);
  color: var(--forest);
}

.navlink-new {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
  padding: 8px 16px 8px 13px;
  background: var(--forest);
  color: #f2f5ee;
}

.navlink-new:hover {
  background: var(--forest-2);
  color: #fff;
}

.navlink-new svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.navlink sup {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--gold);
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  color: var(--muted);
}

.status-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(177, 147, 83, 0.15);
}

.status-pill.ok i {
  background: #4f9a6c;
  box-shadow: 0 0 0 4px rgba(79, 154, 108, 0.16);
  animation: pulse 2.4s ease-in-out infinite;
}

.status-pill.bad i {
  background: var(--danger);
}

@keyframes pulse {
  50% {
    box-shadow: 0 0 0 7px rgba(79, 154, 108, 0.05);
  }
}

/* ─── 首屏 ─── */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 72px);
  min-height: calc(100vh - 71px);
  padding: clamp(40px, 6vw, 90px) clamp(20px, 6vw, 96px) clamp(60px, 7vw, 110px);
  max-width: 1480px;
  margin: 0 auto;
}

.hero::before {
  /* 刀版网格 */
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: radial-gradient(ellipse 70% 70% at 70% 45%, #000 20%, transparent 75%);
  opacity: 0.55;
}

.display {
  margin: 26px 0 26px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(38px, 4.6vw, 72px);
  line-height: 1.16;
  letter-spacing: 0.01em;
  color: var(--forest);
}

.display em {
  position: relative;
  font-style: normal;
  color: var(--jade);
  white-space: nowrap;
}

.display em::after {
  content: '';
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: 0.02em;
  height: 0.32em;
  z-index: -1;
  background: linear-gradient(90deg, rgba(217, 198, 146, 0.65), rgba(217, 198, 146, 0.2));
  border-radius: 2px;
  transform-origin: left;
  animation: underline 1.4s 1s var(--ease) both;
}

@keyframes underline {
  from {
    transform: scaleX(0);
  }
}

.lede {
  max-width: 34em;
  margin: 0;
  font-size: 16.5px;
  line-height: 1.95;
  color: var(--ink-2);
}

.lede strong {
  font-weight: 600;
  color: var(--forest);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 38px;
}

.hero-stats {
  display: flex;
  gap: clamp(24px, 4vw, 56px);
  margin: 54px 0 0;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.hero-stats dt {
  font-family: var(--display);
  font-size: 40px;
  font-weight: 500;
  line-height: 1;
  color: var(--forest);
}

.hero-stats dt em {
  font-size: 22px;
  color: var(--gold);
}

.hero-stats dd {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.08em;
}

/* 首屏入场 */
.reveal {
  animation: rise 1.1s calc(var(--d, 0) * 0.12s + 0.1s) var(--ease) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(26px);
    filter: blur(6px);
  }
}

/* 3D 礼盒舞台 */
.hero-stage {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  max-width: 600px;
  justify-self: center;
}

.orbit {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--sage);
  stroke-width: 1;
  opacity: 0.6;
}

.orbit ellipse {
  stroke-dasharray: 2 7;
  transform-origin: 300px 330px;
  animation: orbit 60s linear infinite;
}

.orbit .o2 {
  stroke: var(--gold);
  stroke-dasharray: 1 5;
  animation-direction: reverse;
  animation-duration: 45s;
}

.orbit .o3 {
  stroke: var(--line-strong);
  stroke-dasharray: none;
  opacity: 0.5;
}

@keyframes orbit {
  to {
    stroke-dashoffset: -400;
  }
}

.scene {
  --W: 256px;
  --D: 256px;
  --H: 150px;
  --LH: 44px;
  --LW: 268px;
  position: absolute;
  inset: 0;
  perspective: 1400px;
  perspective-origin: 50% 30%;
}

.gift {
  position: absolute;
  left: 50%;
  top: calc(50% - 8px); /* 合盖后盒体居中于轨道圆 */
  width: 0;
  height: 0;
  transform-style: preserve-3d;
  animation: spin 30s linear infinite;
}

@keyframes spin {
  from {
    transform: rotateX(-20deg) rotateY(-30deg);
  }
  to {
    transform: rotateX(-20deg) rotateY(330deg);
  }
}

.gift-base,
.gift-lid {
  position: absolute;
  transform-style: preserve-3d;
}

/* 盒盖始终合上：顶面与底盒上沿齐平，盖沿罩住底盒上部 */
.gift-lid {
  transform: translateY(calc(var(--LH) / 2 - var(--H) / 2));
}

.face {
  position: absolute;
  backface-visibility: hidden;
  display: grid;
  place-items: center;
  overflow: hidden;
}

/* 底盒 */
.base-front,
.base-back {
  width: var(--W);
  height: var(--H);
  left: calc(var(--W) / -2);
  top: calc(var(--H) / -2);
}

.base-left,
.base-right {
  width: var(--D);
  height: var(--H);
  left: calc(var(--D) / -2);
  top: calc(var(--H) / -2);
}

.base-front {
  transform: translateZ(calc(var(--D) / 2));
}

.base-back {
  transform: rotateY(180deg) translateZ(calc(var(--D) / 2));
}

.base-right {
  transform: rotateY(90deg) translateZ(calc(var(--W) / 2));
}

.base-left {
  transform: rotateY(-90deg) translateZ(calc(var(--W) / 2));
}

.base-bottom {
  width: var(--W);
  height: var(--D);
  left: calc(var(--W) / -2);
  top: calc(var(--D) / -2);
  transform: rotateX(-90deg) translateZ(calc(var(--H) / 2));
  background: #9fbfa4;
}

.gift-base .face:not(.base-bottom) {
  background:
    radial-gradient(120% 90% at 30% 20%, rgba(255, 255, 255, 0.55), transparent 60%),
    linear-gradient(160deg, #cfe3cf 0%, #b3d1b6 60%, #9dc1a3 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.base-left,
.base-back {
  filter: brightness(0.9) saturate(1.05);
}

/* 盖沿罩住底盒上部 LH 高度，版面只排在露出的部分 */
.base-front {
  padding-top: var(--LH);
}

.base-frame {
  position: absolute;
  inset: calc(var(--LH) + 10px) 14px 14px;
  border: 1px solid rgba(177, 147, 83, 0.8);
  outline: 1px solid rgba(177, 147, 83, 0.35);
  outline-offset: 4px;
}

.base-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 34px;
  letter-spacing: 0.4em;
  margin-right: -0.4em;
  background: linear-gradient(180deg, #e9d9a8 0%, #b19353 55%, #8f7336 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.4));
  margin-top: -10px;
}

.base-sub {
  position: absolute;
  bottom: 22px;
  font-family: var(--label);
  font-size: 8.5px;
  letter-spacing: 0.42em;
  color: rgba(34, 67, 58, 0.7);
}

.base-left span,
.base-right span {
  font-family: var(--label);
  font-size: 9px;
  letter-spacing: 0.4em;
  color: rgba(34, 67, 58, 0.55);
  writing-mode: vertical-rl;
}

/* 盒盖 */
.lid-top {
  width: var(--LW);
  height: var(--LW);
  left: calc(var(--LW) / -2);
  top: calc(var(--LW) / -2);
  transform: rotateX(90deg) translateZ(calc(var(--LH) / 2));
  background:
    radial-gradient(90% 90% at 35% 30%, rgba(255, 255, 255, 0.7), transparent 60%),
    linear-gradient(135deg, #e3efe0 0%, #c3dbc5 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5), inset 0 0 0 12px rgba(255, 255, 255, 0.08);
}

.lid-front,
.lid-back,
.lid-left,
.lid-right {
  width: var(--LW);
  height: var(--LH);
  left: calc(var(--LW) / -2);
  top: calc(var(--LH) / -2);
  background: linear-gradient(180deg, #c4dcc6, #aacbb0);
  border-top: 1px solid rgba(255, 255, 255, 0.6);
}

.lid-front {
  transform: translateZ(calc(var(--LW) / 2));
}

.lid-back {
  transform: rotateY(180deg) translateZ(calc(var(--LW) / 2));
  filter: brightness(0.9);
}

.lid-right {
  transform: rotateY(90deg) translateZ(calc(var(--LW) / 2));
}

.lid-left {
  transform: rotateY(-90deg) translateZ(calc(var(--LW) / 2));
  filter: brightness(0.9);
}

.lid-front::before,
.lid-back::before,
.lid-left::before,
.lid-right::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 7px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, #a4884a, #e7d7a4 40%, #b19353 60%, #8f7336);
  opacity: 0.85;
}

.lid-front span {
  position: relative;
  font-family: var(--label);
  font-size: 8px;
  letter-spacing: 0.4em;
  color: var(--forest);
  background: #c4dcc6;
  padding: 0 10px;
}

.emblem svg {
  width: 96px;
  height: 96px;
  fill: none;
  stroke: #a4884a;
  stroke-width: 1.4;
  stroke-linecap: round;
}

.emblem .thin {
  stroke-width: 0.6;
  stroke-dasharray: 2 3;
}

.gift-shadow {
  position: absolute;
  left: 50%;
  top: calc(50% - 8px + var(--H) * 0.8); /* 贴着底盒底面 */
  width: 380px;
  height: 70px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(34, 67, 58, 0.28), transparent);
  filter: blur(8px);
}

.spec-tag {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  backdrop-filter: blur(6px);
  font-family: var(--label);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--forest);
  box-shadow: 0 10px 24px -16px rgba(34, 67, 58, 0.5);
  animation: bob 7s ease-in-out infinite;
}

.spec-tag i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

.t1 {
  left: 2%;
  top: 58%;
}

.t2 {
  right: 0;
  top: 44%;
  animation-delay: -2s;
}

.t3 {
  left: 18%;
  top: 12%;
  animation-delay: -4s;
}

@keyframes bob {
  50% {
    transform: translateY(-10px);
  }
}

.dim {
  position: absolute;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--jade);
}

.dim-w {
  left: 26%;
  right: 26%;
  bottom: 12%;
  height: 12px;
  border-left: 1px solid var(--sage);
  border-right: 1px solid var(--sage);
}

.dim-w::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px dashed var(--sage);
}

.dim-w span {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 0 8px;
  background: var(--paper);
}

.dim-h {
  right: 13%;
  top: 31%;
  bottom: 24%;
  width: 12px;
  border-top: 1px solid var(--sage);
  border-bottom: 1px solid var(--sage);
}

.dim-h::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  border-left: 1px dashed var(--sage);
}

.dim-h span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(90deg);
  white-space: nowrap;
  padding: 0 6px;
  background: var(--paper);
}

.stage-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  margin: 0;
  text-align: center;
  font-family: var(--label);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.hero-vertical {
  position: absolute;
  right: clamp(8px, 1.5vw, 24px);
  top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  font-family: var(--display);
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.3em;
  color: var(--sage);
}

/* ─── 工作台 ─── */
.studio {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(20px, 3vw, 48px);
  max-width: 1480px;
  margin: 0 auto;
  padding: 20px clamp(20px, 4vw, 56px) 80px;
  scroll-margin-top: 80px;
}

.rail {
  position: sticky;
  top: 100px;
  align-self: start;
}

.rail ol {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.rail ol::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 20px;
  bottom: 20px;
  width: 1px;
  background: repeating-linear-gradient(180deg, var(--line-strong) 0 4px, transparent 4px 9px);
}

.rail li {
  position: relative;
  display: grid;
  grid-template-columns: 36px 1fr;
  grid-template-rows: auto auto;
  column-gap: 14px;
  padding: 14px 0;
  color: var(--muted);
  transition: color 0.4s;
}

.rail-num {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  font-family: var(--display);
  font-style: italic;
  font-size: 14px;
  transition: all 0.5s var(--ease);
}

.rail-cn {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.4;
}

.rail-en {
  font-family: var(--label);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.8;
}

.rail li.active,
.rail li.done {
  color: var(--forest);
}

.rail li.active .rail-num {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--gold-soft);
  box-shadow: 0 0 0 5px rgba(34, 67, 58, 0.1);
}

.rail li.done .rail-num {
  background: var(--mint);
  border-color: var(--sage);
  color: var(--forest);
}

.rail-note {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  padding: 18px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--line);
  color: var(--jade);
}

.rail-note p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--ink-2);
}

.studio-main {
  display: flex;
  flex-direction: column;
  gap: 40px;
  min-width: 0;
}

/* 面板 + 裁切标记 */
.panel {
  position: relative;
  padding: clamp(24px, 3.4vw, 48px);
  border-radius: var(--r-lg);
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(22px) saturate(1.15);
  animation: panelIn 0.9s var(--ease) both;
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
}

.crop {
  position: absolute;
  width: 22px;
  height: 22px;
  pointer-events: none;
  border-color: var(--sage);
  border-style: solid;
  border-width: 0;
  opacity: 0.8;
}

.crop.tl {
  left: -12px;
  top: -12px;
  border-left-width: 1px;
  border-top-width: 1px;
}

.crop.tr {
  right: -12px;
  top: -12px;
  border-right-width: 1px;
  border-top-width: 1px;
}

.crop.bl {
  left: -12px;
  bottom: -12px;
  border-left-width: 1px;
  border-bottom-width: 1px;
}

.crop.br {
  right: -12px;
  bottom: -12px;
  border-right-width: 1px;
  border-bottom-width: 1px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  margin-bottom: 34px;
}

.panel-num {
  font-family: var(--display);
  font-style: italic;
  font-size: 58px;
  font-weight: 400;
  line-height: 0.9;
  background: linear-gradient(180deg, #d9c692, #a4884a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.panel-num.small {
  font-size: 44px;
}

.panel-head h2 {
  margin: 2px 0 4px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(24px, 2.4vw, 32px);
  letter-spacing: 0.04em;
  color: var(--forest);
}

.panel-head p {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
}

.panel-head-actions {
  margin-left: auto;
  display: flex;
  gap: 10px;
}

.panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 38px;
  padding-top: 28px;
  border-top: 1px dashed var(--line-strong);
}

.foot-note {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.save-state {
  color: var(--jade);
}

.save-state.saving {
  color: var(--gold);
}

/* ─── 设计简报弹层：默认内置，点按钮打开自定义 ─── */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  padding: clamp(12px, 3vh, 32px) clamp(10px, 2.4vw, 32px);
}

.sheet-mask {
  position: absolute;
  inset: 0;
  background: rgba(20, 38, 30, 0.38);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.3s;
}

.sheet .panel-brief {
  display: flex;
  flex-direction: column;
  width: min(1120px, 100%);
  max-height: 100%;
  padding: clamp(20px, 2.6vw, 36px) clamp(18px, 3vw, 40px);
  background: var(--paper);
  backdrop-filter: none;
  box-shadow: 0 60px 120px -40px rgba(20, 38, 30, 0.6);
  animation: lbIn 0.5s var(--ease);
}

.sheet .panel-head {
  flex-shrink: 0;
  align-items: center;
  margin-bottom: 22px;
}

.sheet .panel-head-actions {
  align-items: center;
}

.sheet #briefBody,
.sheet #commerceBody {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 6px;
  overscroll-behavior: contain;
}

.sheet .panel-foot {
  flex-shrink: 0;
  margin-top: 18px;
  padding-top: 18px;
}

/* ─── 上传区 ─── */
.upload-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  grid-template-rows: auto auto;
  gap: 22px;
}

.dropzone {
  grid-row: span 2;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 300px;
  padding: 32px;
  border-radius: var(--r-md);
  background:
    linear-gradient(#f9fbf7, #f4f8f1) padding-box,
    repeating-linear-gradient(45deg, var(--sage) 0 8px, transparent 8px 14px) border-box;
  border: 1.5px dashed transparent;
  cursor: pointer;
  text-align: center;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), background 0.3s;
  outline: none;
}

.dropzone::before {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 12px;
  border: 1px dashed var(--line-strong);
  pointer-events: none;
}

.dropzone:hover,
.dropzone:focus-visible,
.dropzone.drag {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.dropzone.drag {
  background:
    linear-gradient(#e2eee0, #d9e9d6) padding-box,
    repeating-linear-gradient(45deg, var(--jade) 0 8px, transparent 8px 14px) border-box;
}

.dieline {
  width: 150px;
  fill: none;
  stroke-width: 1.3;
}

.dieline .cut {
  stroke: var(--forest);
  stroke-dasharray: 420;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.2s var(--ease);
}

.dieline .fold {
  stroke: var(--gold);
  stroke-dasharray: 4 4;
}

.dropzone:hover .dieline .cut {
  animation: draw 1.6s var(--ease);
}

@keyframes draw {
  from {
    stroke-dashoffset: 420;
  }
}

.dz-empty strong {
  display: block;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--forest);
  letter-spacing: 0.06em;
}

.dz-empty span {
  font-size: 13px;
  color: var(--muted);
}

.dz-empty u {
  color: var(--jade);
  text-decoration-color: var(--gold);
  text-underline-offset: 4px;
}

.dz-file {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 14px;
  align-items: center;
  width: min(100%, 360px);
  padding: 14px 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 16px 30px -22px rgba(34, 67, 58, 0.5);
  text-align: left;
}

.file-ext {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 46px;
  height: 54px;
  border-radius: 6px 14px 6px 6px;
  background: var(--forest);
  color: var(--gold-soft);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.file-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--forest);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-size {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
}

.file-clear {
  grid-row: span 2;
  grid-column: 3;
  grid-row-start: 1;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 18px;
  line-height: 1;
  color: var(--muted);
}

.file-clear:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--forest);
  letter-spacing: 0.04em;
}

.field-label small {
  margin-left: 6px;
  font-weight: 400;
  color: var(--muted);
}

textarea,
.line-input,
.bf-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.7);
  padding: 13px 15px;
  font-size: 14px;
  line-height: 1.75;
  resize: vertical;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}

textarea:focus,
.line-input:focus,
.bf-input:focus {
  border-color: var(--sage);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(134, 172, 146, 0.18);
}

textarea::placeholder,
input::placeholder {
  color: #9aab9f;
}

.refs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.ref-add,
.ref-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
}

.ref-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line-strong);
  background: rgba(255, 255, 255, 0.5);
  color: var(--jade);
  cursor: pointer;
  transition: all 0.3s;
}

.ref-add span {
  font-size: 22px;
  line-height: 1;
}

.ref-add small {
  font-size: 11px;
  color: var(--muted);
}

.ref-add:hover {
  background: #fff;
  border-color: var(--jade);
}

.ref-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ref-item button {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 0;
  background: rgba(20, 38, 30, 0.7);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.2s;
}

.ref-item:hover button {
  opacity: 1;
}

.hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

/* ─── 选项 ─── */
.adv {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.adv-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.adv-summary {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
}

.adv-toggle {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 8px;
  padding: 9px 14px 9px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  color: var(--ink-2);
  transition: all 0.35s var(--ease);
}

.adv-toggle:hover,
.adv-toggle[aria-expanded='true'] {
  border-color: var(--sage);
  background: #fff;
  color: var(--forest);
}

.adv-toggle svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.adv-toggle .adv-caret {
  width: 14px;
  height: 14px;
  transition: transform 0.35s var(--ease);
}

.adv-toggle[aria-expanded='true'] .adv-caret {
  transform: rotate(180deg);
}

.adv-badge {
  min-width: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--forest);
  color: #f2f5ee;
  font-family: var(--label);
  font-size: 11px;
  font-style: normal;
  line-height: 18px;
  text-align: center;
}

.options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px 28px;
  margin-top: 22px;
  animation: advIn 0.4s var(--ease);
}

@keyframes advIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

.opt-wide {
  grid-column: 1 / -1;
}

.opt-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.opt-label {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.opt-label b {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--forest);
}

.opt-label em {
  font-family: var(--display);
  font-style: italic;
  font-size: 13px;
  color: var(--gold);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px 9px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
  font-size: 13.5px;
  color: var(--ink-2);
  transition: all 0.35s var(--ease);
}

.chip:hover {
  border-color: var(--sage);
  background: #fff;
  transform: translateY(-1px);
}

.chip[aria-pressed='true'] {
  background: var(--forest);
  border-color: var(--forest);
  color: #f2f5ee;
  box-shadow: 0 12px 24px -16px rgba(34, 67, 58, 0.8);
}

.chip .swatch-trio {
  display: flex;
}

.chip .swatch-trio i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1.5px solid #fff;
  margin-left: -4px;
}

.chip .swatch-trio i:first-child {
  margin-left: 0;
}

.chip svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.chip small {
  font-size: 11.5px;
  opacity: 0.6;
}

.segmented {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: rgba(34, 67, 58, 0.06);
  border: 1px solid var(--line);
  width: fit-content;
  max-width: 100%;
}

.segmented button {
  padding: 7px 16px;
  border: 0;
  border-radius: 999px;
  background: none;
  font-size: 13px;
  color: var(--ink-2);
  transition: all 0.35s var(--ease);
  white-space: nowrap;
}

.segmented button[aria-pressed='true'] {
  background: #fff;
  color: var(--forest);
  font-weight: 600;
  box-shadow: 0 4px 12px -6px rgba(34, 67, 58, 0.4);
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink-2);
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-track {
  position: relative;
  width: 46px;
  height: 26px;
  flex: none;
  border-radius: 999px;
  background: rgba(34, 67, 58, 0.15);
  transition: background 0.35s;
}

.switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: transform 0.45s var(--ease);
}

.switch input:checked + .switch-track {
  background: var(--jade);
}

.switch input:checked + .switch-track .switch-thumb {
  transform: translateX(20px);
}

.switch input:focus-visible + .switch-track {
  box-shadow: 0 0 0 4px rgba(134, 172, 146, 0.3);
}

.line-input {
  border-radius: 999px;
  padding: 12px 20px;
}

/* ─── 解析中遮罩 ─── */
.working {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: var(--r-lg);
  background: rgba(243, 246, 239, 0.8);
  backdrop-filter: blur(14px);
  animation: fadeIn 0.5s var(--ease);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
}

.working-net {
  width: 190px;
  margin-bottom: 18px;
  fill: none;
  stroke-width: 1.3;
}

.working-net .cut {
  stroke: var(--forest);
  stroke-dasharray: 700;
  animation: netDraw 3.2s var(--ease) infinite;
}

.working-net .fold {
  stroke: var(--gold);
  stroke-dasharray: 4 4;
  animation: foldBlink 3.2s ease-in-out infinite;
}

@keyframes netDraw {
  0% {
    stroke-dashoffset: 700;
  }
  60%,
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes foldBlink {
  0%,
  40% {
    opacity: 0;
  }
  70%,
  100% {
    opacity: 1;
  }
}

.working-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--forest);
}

.working-msg {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
  min-height: 1.7em;
  animation: msgIn 0.6s var(--ease);
}

@keyframes msgIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.working-bar {
  position: relative;
  width: 220px;
  height: 2px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--line);
}

.working-bar i {
  position: absolute;
  inset: 0;
  width: 40%;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  animation: slide 1.6s ease-in-out infinite;
}

@keyframes slide {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(260%);
  }
}

/* ═══ 设计简报 ═══ */
.brief-cover {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 26px;
}

.cover-product {
  padding: 8px 0;
}

.cover-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.ghost-input {
  width: 100%;
  border: 0;
  border-bottom: 1px dashed transparent;
  background: transparent;
  outline: none;
  padding: 2px 0;
  border-radius: 0;
  transition: border-color 0.3s, background 0.3s;
}

.ghost-input:hover {
  border-bottom-color: var(--line-strong);
}

.ghost-input:focus {
  border-bottom-color: var(--gold);
  background: rgba(255, 255, 255, 0.4);
}

.cover-brand .ghost-input {
  width: auto;
  field-sizing: content;
  min-width: 3em;
  font-family: var(--label);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--jade);
}

.cover-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(30px, 3.6vw, 50px);
  line-height: 1.25;
  color: var(--forest);
  letter-spacing: 0.02em;
}

.cover-tagline {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: 19px;
  color: var(--jade);
  letter-spacing: 0.1em;
}

.cover-summary {
  margin-top: 16px;
  min-height: 3.6em;
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--ink-2);
  resize: none;
  field-sizing: content;
}

.cover-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.concept-card {
  position: relative;
  padding: 30px 30px 28px;
  border-radius: var(--r-md);
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(217, 198, 146, 0.22), transparent 55%),
    linear-gradient(160deg, var(--forest-2) 0%, var(--forest) 60%, #1a352d 100%);
  color: #e8efe5;
  box-shadow: var(--shadow-lift);
}

.concept-card::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(217, 198, 146, 0.3);
  border-radius: 12px;
  pointer-events: none;
}

.concept-card::after {
  content: '匣';
  position: absolute;
  right: -10px;
  bottom: -46px;
  font-family: var(--serif);
  font-size: 180px;
  font-weight: 900;
  color: rgba(217, 198, 146, 0.07);
  pointer-events: none;
}

.concept-card .eyebrow {
  color: var(--gold-soft);
}

.concept-card .ghost-input,
.concept-card textarea {
  color: inherit;
  position: relative;
  z-index: 1;
}

.concept-card .ghost-input:focus,
.concept-card textarea:focus {
  background: rgba(255, 255, 255, 0.06);
}

.concept-name {
  margin-top: 14px;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #f4ecd2 !important;
}

.concept-style {
  margin-top: 4px;
  font-size: 13px;
  color: var(--gold-soft) !important;
  letter-spacing: 0.06em;
}

.concept-text {
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 13.5px;
  line-height: 1.95;
  color: rgba(232, 239, 229, 0.85) !important;
  resize: none;
  field-sizing: content;
  min-height: 6em;
  box-shadow: none !important;
}

.brief-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 26px;
}

.bcard {
  position: relative;
  padding: 24px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  min-width: 0;
}

.bcard-wide {
  grid-column: 1 / -1;
}

.bcard-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 18px;
}

.bcard-head h4 {
  margin: 0;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--forest);
  letter-spacing: 0.06em;
}

.bcard-head em {
  font-family: var(--display);
  font-style: italic;
  font-size: 13px;
  color: var(--gold);
}

.bcard-head .bcard-tools {
  margin-left: auto;
}

.mini-btn {
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 12px;
  color: var(--jade);
  transition: all 0.3s;
}

.mini-btn:hover {
  border-color: var(--jade);
  background: #fff;
}

/* 色板 */
.palette {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 12px;
}

.swatch {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.swatch:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.swatch-color {
  position: relative;
  display: block;
  height: 86px;
  cursor: pointer;
}

.swatch-color input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.swatch-meta {
  padding: 9px 11px 10px;
}

.swatch-meta .ghost-input {
  font-size: 13px;
  font-weight: 600;
  color: var(--forest);
}

.swatch-meta .hex {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
}

.swatch-meta .role {
  font-size: 11px;
  color: var(--muted);
}

.swatch-del {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  line-height: 1;
  color: var(--ink-2);
  opacity: 0;
  transition: opacity 0.2s;
}

.swatch:hover .swatch-del {
  opacity: 1;
}

.swatch-add {
  display: grid;
  place-items: center;
  min-height: 150px;
  border-radius: 14px;
  border: 1px dashed var(--line-strong);
  background: transparent;
  color: var(--jade);
  font-size: 13px;
}

.swatch-add:hover {
  background: #fff;
}

/* 标签编辑器 */
.tag-editor {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px 5px 13px;
  border-radius: 999px;
  background: var(--mint);
  border: 1px solid rgba(74, 122, 95, 0.2);
  font-size: 13px;
  color: var(--forest);
}

.tag.gold {
  background: var(--gold-pale);
  border-color: rgba(177, 147, 83, 0.3);
  color: #6f5a2a;
}

.tag button {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  font-size: 13px;
  line-height: 1;
  color: inherit;
  opacity: 0.55;
}

.tag button:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.08);
}

.tag-input {
  flex: 1;
  min-width: 90px;
  border: 0;
  border-bottom: 1px dashed var(--line-strong);
  background: transparent;
  padding: 5px 2px;
  font-size: 13px;
  outline: none;
}

.tag-input:focus {
  border-bottom-color: var(--gold);
}

.bf-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}

.bf-row:last-child {
  border-bottom: 0;
}

.bf-row > span {
  padding-top: 9px;
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.bf-input {
  padding: 8px 12px;
  font-size: 13.5px;
  line-height: 1.7;
  background: transparent;
  border-color: transparent;
  field-sizing: content;
  resize: none;
  min-height: 2.4em;
}

.bf-input:hover {
  border-color: var(--line);
}

.specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.spec {
  display: flex;
  flex-direction: column;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--line);
}

.spec .ghost-input:first-child {
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.spec .ghost-input:last-child {
  font-size: 14px;
  font-weight: 600;
  color: var(--forest);
}

/* 版面文案 */
.faces {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 22px;
}

.face-card {
  padding: 24px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  min-width: 0;
}

.face-card .group-badge {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--forest);
  color: var(--gold-soft);
  font-family: var(--display);
  font-style: italic;
  font-size: 15px;
}

.face-struct {
  margin-bottom: 14px;
}

.face-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.face-tabs button {
  position: relative;
  padding: 8px 14px;
  border: 0;
  background: none;
  font-size: 13.5px;
  color: var(--muted);
}

.face-tabs button[aria-selected='true'] {
  color: var(--forest);
  font-weight: 600;
}

.face-tabs button[aria-selected='true']::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -1px;
  height: 2px;
  background: var(--gold);
}

.face-pane label {
  display: block;
  margin: 12px 0 6px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.face-pane textarea {
  font-size: 13.5px;
  padding: 10px 13px;
}

.face-pane .copy-lines {
  font-family: var(--serif);
  font-size: 14px;
}

.face-pane details {
  margin-top: 12px;
}

.face-pane summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--jade);
  list-style: none;
}

.face-pane summary::before {
  content: '＋ ';
}

.face-pane details[open] summary::before {
  content: '－ ';
}

.face-pane details textarea {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
}

/* ═══ 渲染 ═══ */
.pipeline {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  margin-bottom: 36px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
}

.pipe-node {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  transition: color 0.4s;
}

.pipe-roman {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  font-family: var(--display);
  font-size: 15px;
  transition: all 0.5s var(--ease);
}

.pipe-node b {
  display: block;
  font-size: 14px;
  line-height: 1.3;
}

.pipe-node small {
  font-size: 11.5px;
  white-space: nowrap;
}

.pipe-node.active {
  color: var(--forest);
}

.pipe-node.active .pipe-roman {
  border-color: var(--gold);
  color: var(--gold);
  animation: ring 1.8s ease-in-out infinite;
}

.pipe-node.done {
  color: var(--forest);
}

.pipe-node.done .pipe-roman {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--gold-soft);
}

@keyframes ring {
  50% {
    box-shadow: 0 0 0 7px rgba(177, 147, 83, 0.14);
  }
}

.pipe-line {
  position: relative;
  flex: 1;
  min-width: 20px;
  height: 1px;
  background: var(--line-strong);
  overflow: hidden;
}

.pipe-line i {
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s var(--ease);
}

.pipe-line.done i {
  transform: scaleX(1);
}

.pipe-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-left: 12px;
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.pipe-timer {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 500;
  color: var(--forest);
  font-variant-numeric: tabular-nums;
}

.pipe-count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.gallery-group + .gallery-group {
  margin-top: 54px;
}

.group-head {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.group-code {
  font-family: var(--display);
  font-size: 54px;
  line-height: 0.8;
  color: var(--forest);
}

.group-head h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--forest);
  letter-spacing: 0.06em;
}

.group-en {
  display: block;
  font-family: var(--label);
  font-size: 10.5px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--jade);
}

.group-meta {
  margin-left: auto;
  font-size: 12.5px;
  color: var(--muted);
  text-align: right;
}

.gallery-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

.shot {
  margin: 0;
  min-width: 0;
}

.shot-frame {
  position: relative;
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  background:
    radial-gradient(80% 80% at 50% 40%, rgba(255, 255, 255, 0.9), transparent 70%),
    linear-gradient(160deg, #eef4ea, #e0eadb);
  border: 1px solid var(--line);
  box-shadow: 0 30px 50px -36px rgba(34, 67, 58, 0.5);
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}

.shot.kv .shot-frame {
  aspect-ratio: 16 / 9;
}

.shot.done .shot-frame {
  cursor: zoom-in;
}

.shot.done .shot-frame:hover {
  transform: translateY(-4px);
  box-shadow: 0 40px 60px -34px rgba(34, 67, 58, 0.6);
}

.shot-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
  filter: blur(14px) saturate(0.8);
  transition: opacity 1.2s var(--ease), transform 1.6s var(--ease), filter 1.4s var(--ease);
}

.shot-frame img.loaded {
  opacity: 1;
  transform: scale(1);
  filter: none;
}

.shot-frame::before {
  /* 生成中的流光 */
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.75) 50%, transparent 65%);
  transform: translateX(-100%);
  pointer-events: none;
  z-index: 1;
}

.shot.running .shot-frame::before {
  animation: sweep 2.4s ease-in-out infinite;
}

@keyframes sweep {
  to {
    transform: translateX(100%);
  }
}

.shot-state {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  text-align: center;
  transition: opacity 0.6s;
}

.shot.done .shot-state {
  opacity: 0;
  pointer-events: none;
}

.iso {
  width: 74px;
  height: 74px;
  margin-bottom: 8px;
  fill: none;
  stroke: var(--sage);
  stroke-width: 1.2;
  stroke-linejoin: round;
}

.iso path {
  stroke-dasharray: 3 4;
}

.shot.running .iso path {
  stroke: var(--forest);
  stroke-dasharray: 160;
  animation: isoDraw 2.6s var(--ease) infinite;
}

.shot.running .iso path:nth-child(2) {
  stroke: var(--gold);
  animation-delay: 0.3s;
}

@keyframes isoDraw {
  0% {
    stroke-dashoffset: 160;
  }
  55%,
  100% {
    stroke-dashoffset: 0;
  }
}

.shot-phase {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--forest);
  letter-spacing: 0.06em;
}

.shot-timer {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.shot.error .shot-phase {
  color: var(--danger);
}

.shot-error {
  max-width: 90%;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shot-retry {
  margin-top: 6px;
}

.shot-tools {
  position: absolute;
  z-index: 3;
  right: 12px;
  bottom: 12px;
  display: flex;
  gap: 6px;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.4s var(--ease);
}

.shot.done .shot-frame:hover .shot-tools,
.shot.done .shot-frame:focus-within .shot-tools {
  opacity: 1;
  transform: none;
}

.tool {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(8px);
  color: var(--forest);
  text-decoration: none;
  transition: all 0.3s var(--ease);
}

.tool:hover {
  background: var(--forest);
  color: var(--gold-soft);
  transform: translateY(-2px);
}

.tool svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shot-frame .corner {
  position: absolute;
  z-index: 3;
  width: 14px;
  height: 14px;
  border: 0 solid rgba(34, 67, 58, 0.35);
  pointer-events: none;
}

.corner.c1 {
  left: 10px;
  top: 10px;
  border-left-width: 1px;
  border-top-width: 1px;
}

.corner.c2 {
  right: 10px;
  top: 10px;
  border-right-width: 1px;
  border-top-width: 1px;
}

.corner.c3 {
  left: 10px;
  bottom: 10px;
  border-left-width: 1px;
  border-bottom-width: 1px;
}

.corner.c4 {
  right: 10px;
  bottom: 10px;
  border-right-width: 1px;
  border-bottom-width: 1px;
}

.shot figcaption {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 14px 4px 0;
}

.shot-code {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--gold);
}

.shot-label {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--forest);
}

.shot-en {
  font-family: var(--label);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.shot-ver {
  margin-left: auto;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--mint);
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--jade);
}

/* 平行方向：几个参考各出一张正视图，选一个继续 */
.directions.pick {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 26px;
}

.panel-render.is-picking > .pipeline,
.panel-render.is-picking > #gallery,
.panel-render.is-picking > .deliver,
.panel-render.is-picking > .commerce,
.panel-render.is-picking .panel-head-actions {
  display: none;
}

.dir-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.dir-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0 4px;
}

.dir-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.dir-code {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--gold);
}

.dir-ref {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--forest);
}

.dir-ref small {
  display: block;
  margin-top: 3px;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
}

.dir-concept {
  margin: 10px 0 0;
  font-size: 13.5px;
  color: var(--ink-2);
}

.dir-palette {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.dir-palette i {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
}

.dir-why {
  margin: 10px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--muted);
}

.dir-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
}

.dir-actions .btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

/* 选定之后：收成一条，可以改用另一个方向 */
.directions.chosen {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 12px 16px;
  margin-bottom: 28px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
}

.dir-strip-label {
  font-family: var(--label);
  font-size: 10.5px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--jade);
}

.dir-strip-items {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.dir-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 6px 14px 6px 6px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  font: inherit;
  text-align: left;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.3s var(--ease);
}

.dir-chip:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.dir-chip[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.dir-chip.current {
  border-color: var(--forest);
  background: #fff;
  cursor: default;
  transform: none;
}

.dir-chip-img {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--mist);
}

.dir-chip-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dir-chip-txt {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dir-chip-txt b {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--forest);
}

.dir-chip-txt small {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11.5px;
  color: var(--muted);
}

/* 交付 */
.deliver {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 50px;
  padding: 28px 32px;
  border-radius: var(--r-md);
  background:
    radial-gradient(100% 140% at 0% 0%, rgba(217, 198, 146, 0.25), transparent 50%),
    linear-gradient(135deg, rgba(210, 229, 208, 0.9), rgba(255, 255, 255, 0.7));
  border: 1px solid rgba(177, 147, 83, 0.3);
  animation: panelIn 0.8s var(--ease) both;
}

.deliver-copy {
  display: flex;
  align-items: center;
  gap: 18px;
}

.deliver h3 {
  margin: 0 0 2px;
  font-family: var(--serif);
  font-size: 20px;
  color: var(--forest);
}

.deliver p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-2);
}

.deliver-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ─── 页脚 ─── */
.site-foot {
  max-width: 1480px;
  margin: 0 auto;
  padding: 30px clamp(20px, 4vw, 56px) 50px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--muted);
}

.cmyk {
  display: flex;
}

.cmyk i {
  width: 16px;
  height: 10px;
}

.cmyk i:nth-child(1) {
  background: #00a0e9;
}
.cmyk i:nth-child(2) {
  background: #e4007f;
}
.cmyk i:nth-child(3) {
  background: #fff100;
}
.cmyk i:nth-child(4) {
  background: #1a1a1a;
}
.cmyk i:nth-child(5) {
  background: var(--forest);
}
.cmyk i:nth-child(6) {
  background: var(--sage);
}
.cmyk i:nth-child(7) {
  background: var(--celadon);
}
.cmyk i:nth-child(8) {
  background: var(--gold);
}

/* ─── 作品集抽屉 ─── */
.drawer-mask {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(20, 38, 30, 0.3);
  backdrop-filter: blur(3px);
  animation: fadeIn 0.4s;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  width: min(460px, 100vw);
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border-left: 1px solid var(--line);
  box-shadow: -30px 0 60px -30px rgba(34, 67, 58, 0.35);
  transform: translateX(105%);
  transition: transform 0.6s var(--ease);
}

.drawer.open {
  transform: none;
}

.drawer header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 28px 28px 20px;
  border-bottom: 1px solid var(--line);
}

.drawer h3 {
  margin: 4px 0 0;
  font-family: var(--serif);
  font-size: 26px;
  color: var(--forest);
}

.drawer-list {
  flex: 1;
  overflow-y: auto;
  padding: 20px 28px 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.h-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all 0.4s var(--ease);
}

.h-item:hover {
  background: #fff;
  transform: translateX(-4px);
  box-shadow: var(--shadow-lift);
}

.h-cover {
  width: 88px;
  height: 88px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--mint), var(--celadon));
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 28px;
  color: var(--forest);
}

.h-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.h-name {
  font-family: var(--serif);
  font-size: 15.5px;
  font-weight: 600;
  color: var(--forest);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.h-sub {
  font-size: 12px;
  color: var(--muted);
}

.h-dots {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.h-dots i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.h-del {
  align-self: start;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  opacity: 0;
  transition: all 0.2s;
}

.h-item:hover .h-del {
  opacity: 1;
}

.h-del:hover {
  background: var(--danger);
  color: #fff;
}

.empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
}

.empty b {
  display: block;
  margin-bottom: 6px;
  font-family: var(--serif);
  font-size: 18px;
  color: var(--forest);
}

/* ─── 大图 ─── */
.lightbox {
  position: fixed;
  inset: 0;
  height: 100dvh;
  z-index: 120;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  grid-template-rows: minmax(0, 1fr);
  background: rgba(14, 28, 22, 0.9);
  backdrop-filter: blur(18px);
  animation: fadeIn 0.4s var(--ease);
}

.lb-figure {
  margin: 0;
  height: 100%;
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  padding: 50px 80px;
  min-width: 0;
  min-height: 0;
}

.lb-figure img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.6);
  animation: lbIn 0.6s var(--ease);
  cursor: zoom-in;
}

.image-zoom {
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 76px 24px 24px;
  border: 0;
  background: rgba(14, 28, 22, 0.98);
  overflow: auto;
}

.image-zoom::backdrop {
  background: rgba(14, 28, 22, 0.9);
}

.image-zoom img {
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 10px;
}

.image-zoom .lb-close {
  position: fixed;
}

@keyframes lbIn {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
}

.lb-side {
  position: relative;
  padding: 70px 32px 32px;
  background: var(--paper);
  overflow-y: auto;
}

.lb-code {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--gold);
}

.lb-side h3 {
  margin: 6px 0 2px;
  font-family: var(--serif);
  font-size: 24px;
  color: var(--forest);
}

.lb-en {
  margin: 0;
  font-family: var(--label);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--jade);
}

.lb-versions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 0;
}

.lb-versions:empty {
  display: none;
}

.lb-versions button {
  width: 60px;
  height: 60px;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  background: var(--mint);
  opacity: 0.7;
  transition: all 0.3s;
}

.lb-versions button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lb-versions button[aria-current='true'] {
  border-color: var(--gold);
  opacity: 1;
}

.lb-actions {
  display: flex;
  gap: 10px;
  margin: 24px 0;
}

.lb-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
}

.lb-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #e8efe5;
  transform: translateY(-50%);
  transition: all 0.3s;
}

.lb-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lb-nav svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.lb-nav.prev {
  left: 20px;
}

.lb-nav.next {
  right: 380px;
}

/* ─── 弹窗 ─── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(20, 38, 30, 0.35);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.3s;
}

.modal-card {
  position: relative;
  width: min(520px, 100%);
  padding: 32px;
  border-radius: 24px;
  background: var(--paper);
  box-shadow: 0 50px 100px -40px rgba(20, 38, 30, 0.6);
  animation: lbIn 0.5s var(--ease);
}

.modal-card h3 {
  margin: 6px 0 8px;
  font-family: var(--serif);
  font-size: 22px;
  color: var(--forest);
}

.modal-desc {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--muted);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

/* ─── 提示 ─── */
.toasts {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(560px, 90vw);
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--forest);
  color: #eef3ea;
  font-size: 13.5px;
  box-shadow: 0 20px 40px -20px rgba(20, 38, 30, 0.7);
  animation: toastIn 0.5s var(--ease);
}

.toast.error {
  background: #6b2e24;
}

.toast::before {
  content: '';
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--gold-soft);
}

.toast.out {
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

/* ─── 响应式 ─── */
@media (max-width: 1100px) {
  .studio {
    grid-template-columns: 1fr;
  }

  .rail {
    position: static;
  }

  .rail ol {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .rail ol::before,
  .rail-note {
    display: none;
  }

  .rail li {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    row-gap: 6px;
  }

  .rail-num {
    grid-row: auto;
  }

  .rail-en {
    display: none;
  }

  .brief-cover,
  .faces {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-stage {
    max-width: 420px;
    order: -1;
  }

  .scene {
    --W: 150px;
    --D: 150px;
    --H: 92px;
    --LH: 28px;
    --LW: 158px;
  }

  .base-title {
    font-size: 22px;
    margin-top: 0;
  }

  .base-frame {
    inset: calc(var(--LH) + 6px) 9px 9px;
    outline-offset: 3px;
  }

  .base-sub {
    display: none;
  }

  .lid-front span {
    white-space: nowrap;
    font-size: 6px;
    letter-spacing: 0.3em;
    padding: 0 6px;
  }

  .emblem svg {
    width: 60px;
    height: 60px;
  }

  .gift-shadow {
    width: 250px;
  }

  .hero-vertical,
  .dim,
  .brand-sep,
  .brand-en {
    display: none;
  }

  .adv-bar {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .adv-summary {
    flex-basis: 100%;
  }

  .upload-grid,
  .options,
  .brief-grid,
  .gallery-row {
    grid-template-columns: 1fr;
  }

  .dropzone {
    grid-row: auto;
    min-height: 240px;
  }

  .pipeline {
    flex-wrap: wrap;
  }

  .pipe-line {
    display: none;
  }

  .pipe-meta {
    margin-left: auto;
  }

  .lightbox {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .lb-figure {
    padding: 60px 80px 16px;
  }

  .lb-side {
    max-height: 40vh;
    padding: 24px;
  }

  .lb-nav.next {
    right: 16px;
  }

  .lb-nav {
    top: 40%;
  }

  .status-pill span {
    display: none;
  }

  .topbar {
    gap: 12px;
  }
}

@media (max-width: 520px) {
  .display {
    font-size: clamp(28px, 9vw, 40px);
  }

  .topnav a.navlink {
    display: none;
  }

  .topbar {
    gap: 8px;
  }

  .topnav {
    gap: 2px;
  }

  .navlink {
    padding: 8px 10px;
  }

  .navlink-new {
    margin-left: 0;
    padding: 8px 12px 8px 10px;
  }

  .hero-stats {
    gap: 20px;
  }

  .panel {
    padding: 22px 18px;
  }

  .panel-head {
    flex-wrap: wrap;
    gap: 12px;
  }

  .panel-num {
    font-size: 44px;
  }

  .panel-head-actions {
    margin-left: 0;
  }

  .hero-stats dt {
    font-size: 32px;
  }

  .specs {
    grid-template-columns: 1fr;
  }

  .crop {
    display: none;
  }

  .dir-strip-label {
    flex-basis: 100%;
  }

  .dir-chip {
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ═══ 电商主图 + 详情图 ═══ */
.commerce {
  margin-top: 54px;
  animation: panelIn 0.8s var(--ease) both;
}

.commerce-head .commerce-sub {
  flex: 1;
  min-width: 200px;
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  text-align: right;
}

.commerce-actions {
  display: flex;
  gap: 10px;
}

.commerce-actions .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.commerce-status {
  margin-bottom: 26px;
  padding: 20px 24px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
}

.cs-msg {
  margin: 0;
  font-family: var(--serif);
  font-size: 15px;
  color: var(--forest);
  animation: msgIn 0.5s var(--ease);
}

.commerce-error {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 26px;
  padding: 16px 20px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(176, 81, 63, 0.35);
  background: rgba(176, 81, 63, 0.07);
  font-size: 13px;
  color: var(--danger);
}

.commerce-error span {
  flex: 1;
  min-width: 200px;
}

.commerce-group .group-head {
  margin-bottom: 20px;
}

.commerce-group .group-code {
  font-size: 38px;
}

.commerce-group .group-head h3 {
  font-size: 18px;
}

.gallery-row.commerce-row {
  gap: 22px;
}

.gallery-row.commerce-row.main {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.gallery-row.commerce-row.detail {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}

.shot.portrait .shot-frame {
  aspect-ratio: 9 / 16;
}

.commerce-row .shot figcaption {
  flex-wrap: wrap;
  row-gap: 2px;
}

.commerce-row .shot-en {
  flex-basis: 100%;
  order: 3;
}

/* 详情长图 */
#longModal {
  align-items: safe center;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.long-card {
  width: min(460px, 100%);
  margin: auto;
}

.long-scroll {
  max-height: min(64vh, 640px);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fff;
  overscroll-behavior: contain;
}

.long-scroll img {
  display: block;
  width: 100%;
  height: auto;
}

/* 入口弹窗 */
#commerceModal {
  align-items: safe center;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.cm-card {
  width: min(640px, 100%);
  margin: auto;
}

.cm-block {
  margin-top: 20px;
}

.cm-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.cm-label b {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--forest);
}

.cm-label small {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.cm-sub {
  margin: 12px 0 8px;
  font-size: 12px;
  color: var(--muted);
}

.cm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 10px;
}

.cm-upload-zone {
  padding: 12px;
  border: 1px dashed var(--sage);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.45);
  transition: background 0.2s, border-color 0.2s;
}

.cm-upload-zone.drag {
  border-color: var(--forest);
  background: rgba(134, 172, 146, 0.2);
}

.cm-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  color: var(--forest);
  cursor: pointer;
  text-align: center;
}

.cm-dropzone > span {
  font-size: 24px;
  line-height: 1;
}

.cm-dropzone strong {
  font-size: 13px;
  font-weight: 500;
}

.cm-dropzone small {
  font-size: 11px;
  color: var(--muted);
}

.cm-dropzone:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 2px;
  border-radius: 8px;
}

.cm-doc-zone {
  margin-top: 10px;
}

.cm-doc-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 8px;
  font-size: 12px;
  color: var(--forest);
}

.cm-doc-file span {
  overflow-wrap: anywhere;
}

.cm-scope {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.cm-scope label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  font-size: 13px;
}

.cm-scope label:has(input:checked) {
  border-color: var(--forest);
  background: rgba(134, 172, 146, 0.15);
  color: var(--forest);
}

.cm-scope input {
  accent-color: var(--forest);
}

.cm-tile {
  position: relative;
  aspect-ratio: 1;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid transparent;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s var(--ease);
}

.cm-tile:hover {
  transform: translateY(-2px);
}

.cm-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cm-tile span {
  position: absolute;
  inset: auto 0 0;
  padding: 16px 7px 5px;
  overflow: hidden;
  background: linear-gradient(transparent, rgba(20, 38, 30, 0.78));
  font-size: 11px;
  color: #fff;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cm-check {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--forest);
  font-size: 12px;
  font-style: normal;
  color: var(--gold-soft);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.25s, transform 0.35s var(--ease);
}

.cm-tile[aria-pressed='true'] {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(134, 172, 146, 0.3);
}

.cm-tile[aria-pressed='true'] .cm-check {
  opacity: 1;
  transform: none;
}

.cm-file button {
  opacity: 1;
}

.cm-hint,
.cm-empty {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}

.cm-empty {
  grid-column: 1 / -1;
  margin: 0;
}

.cm-card .segmented {
  margin-top: 8px;
}

.cm-replace {
  margin: 18px 0 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--gold-pale);
  font-size: 12.5px;
  color: #7a6431;
}

#cmStart:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* 设计简报（可编辑） */
.cs-top {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.cs-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 22px;
  margin: 22px 0;
}

.cs-system .cs-summary {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--ink);
}

.tags-static {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags-static .tag,
.cs-fact .tag {
  padding: 4px 12px;
}

.cs-meta {
  margin: 14px 0 0;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--muted);
}

.cs-meta b {
  color: var(--forest);
}

.cs-fact {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}

.cs-fact b {
  flex-basis: 100%;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--jade);
}

.cs-fact .tag {
  max-width: 100%;
  font-size: 12.5px;
  line-height: 1.5;
  white-space: normal;
}

.cs-slot .bcard-head {
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.cs-slot .group-badge {
  width: auto;
  min-width: 46px;
  padding: 0 9px;
  font-size: 13px;
  white-space: nowrap;
}

.cs-slot .bcard-head em {
  margin-left: auto;
}

.cs-field {
  display: block;
  margin-top: 12px;
}

.cs-field > span {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  color: var(--muted);
}

.cs-field small {
  margin-left: 6px;
  color: #9aab9f;
}

.cs-field .bf-input {
  padding: 9px 12px;
  font-size: 13.5px;
  line-height: 1.6;
}

.cs-ref {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line-strong);
}

.cs-ref-imgs {
  display: flex;
  flex: none;
  gap: 6px;
}

.cs-ref-imgs img {
  width: 62px;
  height: 78px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}

.cs-ref p,
.cs-using {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink-2);
  min-width: 0;
}

.cs-ref p b,
.cs-using b {
  display: block;
  margin-bottom: 2px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--jade);
}

.cs-ref small {
  color: var(--muted);
}

.cs-ref em {
  font-style: normal;
  color: var(--gold);
}

.cs-using {
  margin-top: 10px;
}

.cs-skipped ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cs-skipped li {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 13px;
}

.cs-skipped li b {
  color: var(--forest);
}

.cs-skipped li span {
  color: var(--muted);
}

.cs-skipped .cs-meta {
  margin-top: 12px;
}

@media (max-width: 900px) {
  .cs-top {
    grid-template-columns: 1fr;
  }

  .commerce-head .commerce-sub {
    flex-basis: 100%;
    text-align: left;
  }

  .gallery-row.commerce-row.main {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .gallery-row.commerce-row.detail {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  }
}

@media (max-width: 520px) {
  .cm-card {
    padding: 24px 18px;
  }

  .gallery-row.commerce-row.main,
  .gallery-row.commerce-row.detail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}
