/* ==========================================================================
   AlphaCut Studio — Design System
   极简 · 金属质感 · 电影感
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  color-scheme: dark;

  --bg-0: #08090b;
  --bg-1: #0d0e11;
  --bg-2: #131418;
  --bg-3: #191b20;
  --bg-4: #20232a;
  --bg-5: #2a2d35;
  --line-1: rgba(255, 255, 255, 0.06);
  --line-2: rgba(255, 255, 255, 0.1);
  --line-3: rgba(255, 255, 255, 0.17);
  --text-1: #eeece7;
  --text-2: #a9a79f;
  --text-3: #6d6c67;
  --text-inv: #121214;

  --accent: #e8b46b;
  --accent-2: #f5d39b;
  --accent-ink: #1b1307;
  --accent-soft: rgba(232, 180, 107, 0.13);
  --accent-line: rgba(232, 180, 107, 0.5);
  --steel: #9eb1c6;
  --ok: #5fc792;
  --danger: #ec5f5f;

  --stage-bg: #0a0b0d;
  --track: rgba(255, 255, 255, 0.09);

  --plate: linear-gradient(180deg, #1f2126 0%, #16171b 100%);
  --plate-hover: linear-gradient(180deg, #25272d 0%, #1b1c21 100%);
  --plate-hi: inset 0 1px 0 rgba(255, 255, 255, 0.06), inset 0 -1px 0 rgba(0, 0, 0, 0.35);
  --chrome: linear-gradient(180deg, #fbfaf7 0%, #e0ded8 43%, #c0bdb6 57%, #ecebe6 100%);
  --chrome-hover: linear-gradient(180deg, #ffffff 0%, #e8e6e1 43%, #cac7c0 57%, #f3f2ee 100%);
  --chrome-edge: #8f8c86;
  --chrome-ink: #141416;
  --metal-text: linear-gradient(180deg, #ffffff 0%, #ebe9e4 36%, #a19e97 62%, #dddad3 100%);
  --metal-border: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.04) 45%, rgba(255, 255, 255, 0.1));

  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-2: 0 12px 30px -12px rgba(0, 0, 0, 0.75);
  --shadow-3: 0 40px 90px -30px rgba(0, 0, 0, 0.85);

  --font-display: "Archivo", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-ui: "Inter", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --nav-h: 64px;
  --sbar-h: 52px;
  --rail-w: 76px;
  --insp-w: 348px;
  --film-h: 84px;
  --ctool-h: 44px;
}

:root[data-theme="light"] {
  color-scheme: light;

  --bg-0: #e9e7e2;
  --bg-1: #f1f0ec;
  --bg-2: #f8f7f4;
  --bg-3: #ffffff;
  --bg-4: #ecebe6;
  --bg-5: #d8d6d0;
  --line-1: rgba(20, 20, 22, 0.07);
  --line-2: rgba(20, 20, 22, 0.12);
  --line-3: rgba(20, 20, 22, 0.2);
  --text-1: #141416;
  --text-2: #56554f;
  --text-3: #8d8b84;
  --text-inv: #f4f3ef;

  --accent: #b87b26;
  --accent-2: #9a6315;
  --accent-ink: #ffffff;
  --accent-soft: rgba(184, 123, 38, 0.12);
  --accent-line: rgba(184, 123, 38, 0.45);

  --stage-bg: #d9d7d2;
  --track: rgba(20, 20, 22, 0.12);

  --plate: linear-gradient(180deg, #ffffff 0%, #f2f1ed 100%);
  --plate-hover: linear-gradient(180deg, #ffffff 0%, #eceae5 100%);
  --plate-hi: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -1px 0 rgba(0, 0, 0, 0.05);
  --chrome: linear-gradient(180deg, #43454c 0%, #27282d 48%, #1b1c20 52%, #2f3136 100%);
  --chrome-hover: linear-gradient(180deg, #4c4e56 0%, #2e2f35 48%, #202126 52%, #363840 100%);
  --chrome-edge: #0e0f11;
  --chrome-ink: #f4f3ef;
  --metal-text: linear-gradient(180deg, #303238 0%, #121315 40%, #56585e 64%, #1c1d21 100%);
  --metal-border: linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.04) 45%, rgba(0, 0, 0, 0.1));

  --shadow-1: 0 1px 2px rgba(20, 20, 22, 0.12);
  --shadow-2: 0 12px 30px -14px rgba(20, 20, 22, 0.3);
  --shadow-3: 0 40px 90px -30px rgba(20, 20, 22, 0.35);
}

:lang(ja) {
  --font-display: "Archivo", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", "Noto Sans JP", system-ui, sans-serif;
  --font-ui: "Inter", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Meiryo", "Noto Sans JP", system-ui, sans-serif;
}
:lang(ko) {
  --font-display: "Archivo", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
  --font-ui: "Inter", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
  /* 韩文按词换行 (只在空格处断开)，放不下时才拆词 */
  word-break: keep-all;
  overflow-wrap: anywhere;
}
/* 日文标题按词组换行，避免把“から、”拆到下一行 (不支持 auto-phrase 的浏览器忽略) */
:lang(ja) :is(.hero__title, .section-title, .feature__title, .finale__title) { word-break: auto-phrase; }

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-1);
  background: var(--bg-0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, canvas, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
[hidden] { display: none !important; }
::selection { background: var(--accent-soft); color: var(--text-1); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 5px;
  font: 500 11px/1 var(--font-mono);
  color: var(--text-2);
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.35);
}
code { font-family: var(--font-mono); font-size: 0.92em; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--google { stroke: none; }
.brand__mark { width: 26px; height: 26px; flex: none; }

.grain {
  position: fixed;
  inset: -50%;
  z-index: 90;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite;
}
:root[data-theme="light"] .grain { opacity: 0.06; mix-blend-mode: multiply; filter: invert(1); }
body.is-studio .grain { display: none; }
@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); }
  80% { transform: translate(3%, 2%); }
  100% { transform: translate(0, 0); }
}

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.container--narrow { max-width: 860px; }
.grow { flex: 1; }
.micro {
  font: 600 10.5px/1.2 var(--font-display);
  font-stretch: 112%;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
}
:lang(zh-CN) .micro, :lang(ja) .micro, :lang(ko) .micro { font-family: var(--font-ui); letter-spacing: 0.08em; font-size: 11px; }

/* ---------- 3. Components ---------- */

/* Buttons */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: 500 13px/1 var(--font-ui);
  letter-spacing: 0.01em;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.12s var(--ease);
  overflow: hidden;
  isolation: isolate;
}
.btn .icon { width: 16px; height: 16px; }
.btn--sm { height: 30px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; gap: 6px; }
.btn--lg { height: 46px; padding: 0 22px; font-size: 14.5px; border-radius: 12px; }
.btn--block { width: 100%; }
.btn--grow { flex: 1; }
.btn:disabled, .btn.is-disabled { opacity: 0.45; cursor: not-allowed; }

.btn--chrome {
  color: var(--chrome-ink);
  background: var(--chrome);
  border-color: var(--chrome-edge);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), inset 0 -1px 0 rgba(0, 0, 0, 0.2), 0 1px 1px rgba(0, 0, 0, 0.45), 0 10px 24px -10px rgba(0, 0, 0, 0.65);
  font-weight: 600;
}
:root[data-theme="light"] .btn--chrome { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 -1px 0 rgba(0, 0, 0, 0.4), 0 1px 1px rgba(0, 0, 0, 0.2), 0 10px 22px -12px rgba(0, 0, 0, 0.45); }
.btn--chrome::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(112deg, transparent 32%, rgba(255, 255, 255, 0.7) 48%, transparent 62%);
  background-size: 260% 100%;
  background-position: 130% 0;
  opacity: 0;
  transition: background-position 0.9s var(--ease), opacity 0.3s var(--ease);
  pointer-events: none;
}
:root[data-theme="light"] .btn--chrome::after { background-image: linear-gradient(112deg, transparent 32%, rgba(255, 255, 255, 0.22) 48%, transparent 62%); }
.btn--chrome:hover:not(:disabled) { background: var(--chrome-hover); }
.btn--chrome:hover:not(:disabled)::after { background-position: -30% 0; opacity: 1; }
.btn--chrome:active:not(:disabled) { transform: translateY(1px); box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3); }

.btn--graphite {
  color: var(--text-1);
  background: var(--plate);
  border-color: var(--line-2);
  box-shadow: var(--plate-hi), var(--shadow-1);
}
.btn--graphite:hover:not(:disabled) { background: var(--plate-hover); border-color: var(--line-3); }
.btn--graphite:active:not(:disabled) { transform: translateY(1px); }

.btn--ghost { color: var(--text-2); background: transparent; border-color: var(--line-2); }
.btn--ghost:hover:not(:disabled) { color: var(--text-1); border-color: var(--line-3); background: rgba(127, 127, 127, 0.06); }

.btn--danger { color: #fff; background: linear-gradient(180deg, #e46a6a, #c94848); border-color: #a13838; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--text-2);
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.icon-btn:hover:not(:disabled) { color: var(--text-1); background: rgba(127, 127, 127, 0.1); }
.icon-btn:disabled { opacity: 0.32; cursor: default; }
.icon-btn--sm { width: 26px; height: 26px; border-radius: 7px; }
.icon-btn--sm .icon { width: 15px; height: 15px; }

.link-btn {
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 500;
  padding: 0;
  text-underline-offset: 3px;
}
.link-btn:hover:not(:disabled) { text-decoration: underline; }
.link-btn:disabled { color: var(--text-3); cursor: default; }
.link-btn--muted { color: var(--text-3); }

.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 9px;
  border-radius: 7px;
  font-size: 12px;
  color: var(--text-2);
  border: 1px solid var(--line-1);
  background: var(--bg-2);
}
.chip-btn .icon { width: 14px; height: 14px; }
.chip-btn:hover:not(:disabled) { color: var(--text-1); border-color: var(--line-2); }
.chip-btn:disabled { opacity: 0.5; cursor: default; }
.chip-btn.is-busy .icon { animation: spin 1s linear infinite; }

/* Avatar & badges */
.avatar {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font: 600 12px/1 var(--font-ui);
  color: var(--chrome-ink);
  background: var(--chrome);
  border: 1px solid var(--chrome-edge);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  overflow: hidden;
  text-transform: uppercase;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--lg { width: 40px; height: 40px; font-size: 15px; }
.avatar.is-guest { background: var(--bg-4); color: var(--text-2); border-color: var(--line-2); box-shadow: none; }

.tier-badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 5px;
  font: 700 10px/1 var(--font-display);
  font-stretch: 115%;
  letter-spacing: 0.12em;
  color: var(--text-2);
  border: 1px solid var(--line-2);
  background: var(--bg-3);
}
.tier-badge--pro, .tier-badge[data-tier="pro"] { color: #1d1508; background: linear-gradient(180deg, #f6dca9, #d9a956); border-color: #a8803e; }
.tier-badge--ultra, .tier-badge[data-tier="ultra"] { color: #10141a; background: linear-gradient(180deg, #e8eef5, #a9b7c7 55%, #d6dee8); border-color: #7a8796; }
.tier-badge[data-tier="admin"] { color: #fff; background: linear-gradient(180deg, #3a3d45, #1c1d21); border-color: #000; }

.cost-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font: 500 11.5px/1 var(--font-mono);
  color: var(--accent);
}
.cost-chip .icon { width: 13px; height: 13px; }

/* Inputs */
.field { display: flex; flex-direction: column; gap: 6px; }
.field--inline { flex-direction: row; align-items: center; gap: 10px; }
.field__label { font-size: 12px; font-weight: 500; color: var(--text-2); }
.field__hint { font-size: 11.5px; color: var(--text-3); }
.input, .textarea {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid var(--line-2);
  background: var(--bg-1);
  color: var(--text-1);
  font-size: 13px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input--lg { height: 44px; font-size: 14px; padding: 0 14px; }
.input--sm { height: 30px; font-size: 12.5px; padding: 0 10px; width: auto; }
.textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.55; }
.textarea--code { font: 12px/1.5 var(--font-mono); }
.input:focus, .textarea:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
select.input { padding-right: 28px; }

.switch { position: relative; display: inline-flex; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch__track {
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: var(--bg-5);
  border: 1px solid var(--line-2);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
  position: relative;
  transition: background 0.2s;
}
.switch__track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--chrome);
  border: 1px solid var(--chrome-edge);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s var(--ease);
}
.switch input:checked + .switch__track { background: var(--accent); border-color: var(--accent-line); }
.switch input:checked + .switch__track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Segmented */
.seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: var(--bg-1);
  border: 1px solid var(--line-1);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}
.seg > button {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  height: 28px;
  padding: 0 12px;
  border-radius: 7px;
  border: 1px solid transparent;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}
.seg > button .icon { width: 15px; height: 15px; }
.seg > button em { font-style: normal; font: 600 10px/1 var(--font-mono); color: var(--accent); }
.seg > button:hover { color: var(--text-1); }
.seg > button.is-active {
  color: var(--text-1);
  background: var(--plate);
  border-color: var(--line-2);
  box-shadow: var(--plate-hi), 0 1px 2px rgba(0, 0, 0, 0.45);
}
.seg > button:disabled { opacity: 0.4; cursor: not-allowed; }
.seg--sm > button { height: 26px; padding: 0 10px; font-size: 12px; }
.seg--4 { display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; }
.seg--tabs { display: flex; width: 100%; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-2);
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  transition: all 0.15s;
}
.chip:hover { color: var(--text-1); border-color: var(--line-3); }
.chip.is-active { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.chip.is-active::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.chips--sm .chip { height: 26px; font-size: 11.5px; padding: 0 9px; }

/* Ranges */
.range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 18px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  --a: 0%;
  --b: 50%;
}
.range:focus { outline: none; }
.range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--track) 0 var(--a), var(--accent) var(--a) var(--b), var(--track) var(--b) 100%);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.35);
}
.range::-moz-range-track {
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--track) 0 var(--a), var(--accent) var(--a) var(--b), var(--track) var(--b) 100%);
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  margin-top: -5.5px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, #ffffff 0%, #e5e3dd 42%, #a7a49d 100%);
  border: 1px solid #77746e;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.55), 0 0 0 0 rgba(232, 180, 107, 0);
  transition: box-shadow 0.15s;
}
.range::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, #ffffff 0%, #e5e3dd 42%, #a7a49d 100%);
  border: 1px solid #77746e;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}
.range:hover::-webkit-slider-thumb { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.55), 0 0 0 5px var(--accent-soft); }
.range:focus-visible::-webkit-slider-thumb { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.55), 0 0 0 5px rgba(232, 180, 107, 0.32); }
.range:disabled { cursor: not-allowed; opacity: 0.4; }
.range--hue::-webkit-slider-runnable-track { background: linear-gradient(90deg, #e05050, #e0b050, #7ac25a, #4fc0c0, #5a7ee0, #b05ad8, #e05050); }
.range--hue::-moz-range-track { background: linear-gradient(90deg, #e05050, #e0b050, #7ac25a, #4fc0c0, #5a7ee0, #b05ad8, #e05050); }
.range--temp::-webkit-slider-runnable-track { background: linear-gradient(90deg, #5d86c7, #a4a39e 50%, #d9a24f); }
.range--temp::-moz-range-track { background: linear-gradient(90deg, #5d86c7, #a4a39e 50%, #d9a24f); }
.range--tint::-webkit-slider-runnable-track { background: linear-gradient(90deg, #5fae63, #a4a39e 50%, #c262b6); }
.range--tint::-moz-range-track { background: linear-gradient(90deg, #5fae63, #a4a39e 50%, #c262b6); }
.range--kelvin::-webkit-slider-runnable-track { background: linear-gradient(90deg, #ff9e45, #ffd9a8 35%, #f4f1ea 55%, #c7d8ff); }
.range--kelvin::-moz-range-track { background: linear-gradient(90deg, #ff9e45, #ffd9a8 35%, #f4f1ea 55%, #c7d8ff); }

.sliders { display: flex; flex-direction: column; }
.srow {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 10px;
  padding: 6px 0;
}
.srow__label {
  font-size: 12.5px;
  color: var(--text-2);
  user-select: none;
  -webkit-user-select: none;
  cursor: default;
}
.srow__value {
  min-width: 46px;
  padding: 2px 6px;
  border-radius: 6px;
  text-align: right;
  font: 500 11.5px/1.4 var(--font-mono);
  color: var(--text-2);
  background: var(--bg-1);
  border: 1px solid var(--line-1);
  font-variant-numeric: tabular-nums;
}
.srow .range { grid-column: 1 / -1; }
.srow.is-changed .srow__label { color: var(--text-1); }
.srow.is-changed .srow__value { color: var(--accent); border-color: var(--accent-line); }
.srow.is-disabled { opacity: 0.45; pointer-events: none; }

/* Tooltip */
.tooltip {
  position: fixed;
  z-index: 400;
  max-width: 260px;
  padding: 6px 9px;
  border-radius: 7px;
  font-size: 12px;
  line-height: 1.4;
  color: #f1efea;
  background: rgba(20, 21, 25, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-2);
  pointer-events: none;
  white-space: nowrap;
  animation: fade-in 0.12s var(--ease);
}

/* Toasts */
.toasts {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
  pointer-events: none;
  width: min(92vw, 460px);
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 11px 12px 11px 14px;
  border-radius: 12px;
  background: rgba(24, 25, 30, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  color: #efede8;
  font-size: 13px;
  line-height: 1.5;
  pointer-events: auto;
  transform: translateY(12px);
  opacity: 0;
  transition: transform 0.35s var(--ease-out), opacity 0.35s var(--ease-out);
}
.toast.is-in { transform: none; opacity: 1; }
.toast__icon { margin-top: 1px; color: var(--steel); }
.toast--success .toast__icon { color: var(--ok); }
.toast--error .toast__icon { color: var(--danger); }
.toast--warning .toast__icon { color: var(--accent); }
.toast__body { flex: 1; min-width: 0; }
.toast__action { margin-top: 4px; }
.toast__close { color: #8f8d87; margin: -3px -4px 0 0; }

/* Popover */
.popover {
  position: fixed;
  z-index: 300;
  top: 60px;
  right: 14px;
  width: 316px;
  border-radius: var(--radius-lg);
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-3), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  animation: pop-in 0.18s var(--ease-out);
  overflow: hidden;
}
.acct { padding: 18px; }
.acct__title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.acct__desc { font-size: 12.5px; color: var(--text-2); margin-bottom: 14px; }
.acct__head { display: flex; align-items: center; gap: 12px; }
.acct__who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.acct__who b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct__who span { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct__credits { margin-top: 16px; padding: 12px; border-radius: 12px; background: var(--bg-1); border: 1px solid var(--line-1); }
.acct__row { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; color: var(--text-2); }
.acct__row b { font: 600 15px var(--font-mono); color: var(--text-1); }
.meter { height: 4px; margin: 9px 0 8px; border-radius: 4px; background: var(--track); overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: inherit; transition: width 0.4s var(--ease); }
.acct__reset { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-3); }
.acct__reset .icon { width: 13px; height: 13px; }
.acct__ends { margin-top: 6px; color: var(--text-2); }
.acct__menu { display: flex; flex-direction: column; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line-1); }
.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 10px;
  margin: 0 -10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-1);
  text-align: left;
}
.menu-item .icon { width: 16px; height: 16px; color: var(--text-2); }
.menu-item:hover { background: rgba(127, 127, 127, 0.1); }
.menu-item--danger, .menu-item--danger .icon { color: var(--danger); }
.acct__prefs { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line-1); background: var(--bg-1); }
body.is-studio [data-landing-only] { display: none; }

.lang-select { position: relative; display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.lang-select .icon { width: 16px; height: 16px; position: absolute; left: 9px; pointer-events: none; }
.lang-select__input {
  -webkit-appearance: none;
  appearance: none;
  height: 30px;
  padding: 0 10px 0 30px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--text-2);
  font-size: 12.5px;
  cursor: pointer;
}
.lang-select__input:hover { color: var(--text-1); border-color: var(--line-3); }
.lang-select__input option { background: var(--bg-2); color: var(--text-1); }
.lang-select--block { flex: 1; }
.lang-select--block .lang-select__input { width: 100%; }

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
}
.modal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(4, 5, 7, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fade-in 0.2s var(--ease);
}
:root[data-theme="light"] .modal__scrim { background: rgba(30, 30, 34, 0.32); }
.modal__card {
  position: relative;
  width: 100%;
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  overflow: auto;
  border-radius: var(--radius-xl);
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: pop-in 0.24s var(--ease-out);
}
.modal__card--xs { max-width: 380px; padding: 24px; }
.modal__card--sm { max-width: 420px; }
.modal__card--md { max-width: 640px; }
.modal__card--lg { max-width: 820px; }
.modal__card--xl { max-width: 1080px; padding-bottom: 28px; }
.modal__x { position: absolute; top: 14px; right: 14px; z-index: 2; }
.modal__head { padding: 26px 28px 0; }
.modal__head h2 { display: flex; align-items: center; gap: 10px; font: 500 20px/1.3 var(--font-display); letter-spacing: -0.005em; }
.modal__head p { margin-top: 6px; font-size: 13px; color: var(--text-2); max-width: 60ch; }
.modal__head--center { text-align: center; }
.modal__head--center p { margin-left: auto; margin-right: auto; }
.modal__foot {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--line-1);
  background: var(--bg-2);
}

.confirm__title { font: 500 17px/1.35 var(--font-display); margin-bottom: 8px; }
.confirm__text { font-size: 13.5px; color: var(--text-2); white-space: pre-line; }
.confirm__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }

.divider { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 12px; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line-1); }

.form-msg { margin-top: 12px; padding: 9px 12px; border-radius: 9px; font-size: 12.5px; line-height: 1.5; background: var(--bg-1); border: 1px solid var(--line-2); color: var(--text-2); }
.form-msg--error, .form-msg[data-type="error"] { color: #f3a3a3; border-color: rgba(236, 95, 95, 0.4); background: rgba(236, 95, 95, 0.08); }
.form-msg--ok, .form-msg[data-type="success"] { color: #9bdcb8; border-color: rgba(95, 199, 146, 0.4); background: rgba(95, 199, 146, 0.08); }
:root[data-theme="light"] .form-msg--error, :root[data-theme="light"] .form-msg[data-type="error"] { color: #b33a3a; }
:root[data-theme="light"] .form-msg--ok, :root[data-theme="light"] .form-msg[data-type="success"] { color: #237a4d; }

/* Progress & spinners */
.progress { height: 3px; border-radius: 3px; background: var(--track); overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.4s var(--ease); }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 1.6px solid var(--line-3); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(8px) scale(0.985); } }

/* ---------- 4. Landing ---------- */
.landing { position: relative; overflow-x: clip; background: var(--bg-0); }

.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
.js .reveal.is-in { opacity: 1; transform: none; }

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  height: var(--nav-h);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.site-nav.is-solid {
  background: rgba(8, 9, 11, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line-1);
}
:root[data-theme="light"] .site-nav.is-solid { background: rgba(233, 231, 226, 0.78); }
.site-nav__inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text-1); }
.brand__word { font: 600 17px/1 var(--font-display); font-stretch: 112%; letter-spacing: 0.01em; }
.brand__sub {
  font: 600 9.5px/1 var(--font-display);
  font-stretch: 118%;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 3px 0 0;
}
.site-nav__links { display: flex; gap: 26px; margin-left: 12px; }
.site-nav__links a { font-size: 13.5px; color: var(--text-2); transition: color 0.15s; }
.site-nav__links a:hover { color: var(--text-1); }
.site-nav__actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.site-nav__menu { display: none; }
.nav-account {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 4px 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--plate);
  box-shadow: var(--plate-hi);
}
.nav-account__credits { display: inline-flex; align-items: center; gap: 5px; font: 500 12.5px var(--font-mono); color: var(--text-1); }
.nav-account__credits .icon { width: 14px; height: 14px; color: var(--accent); }
.nav-account .avatar { width: 26px; height: 26px; font-size: 11px; }
.mobile-menu {
  position: absolute;
  top: var(--nav-h);
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  padding: 10px 24px 22px;
  background: rgba(10, 11, 13, 0.97);
  border-bottom: 1px solid var(--line-1);
  backdrop-filter: blur(16px);
}
:root[data-theme="light"] .mobile-menu { background: rgba(241, 240, 236, 0.97); }
.mobile-menu a { padding: 13px 0; font-size: 16px; border-bottom: 1px solid var(--line-1); color: var(--text-1); }

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--nav-h) + 40px) 0 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  isolation: isolate;
}
.hero__backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 70%, transparent 100%);
}
.hero__spot {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 60% at 72% 42%, rgba(196, 208, 224, 0.13), transparent 70%),
    radial-gradient(ellipse 40% 35% at 70% 92%, rgba(232, 180, 107, 0.06), transparent 70%),
    radial-gradient(ellipse 80% 70% at 50% 0%, rgba(255, 255, 255, 0.035), transparent 70%);
}
:root[data-theme="light"] .hero__spot {
  background:
    radial-gradient(ellipse 55% 60% at 72% 42%, rgba(255, 255, 255, 0.9), transparent 70%),
    radial-gradient(ellipse 80% 70% at 50% 0%, rgba(255, 255, 255, 0.5), transparent 70%);
}
.hero__lines {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--line-1) 1px, transparent 1px), linear-gradient(90deg, var(--line-1) 1px, transparent 1px);
  background-size: 120px 120px;
  background-position: center center;
  mask-image: radial-gradient(ellipse 70% 60% at 60% 45%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 60% 45%, #000 20%, transparent 75%);
  opacity: 0.55;
}
.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 5.2fr) minmax(0, 6.8fr);
  align-items: center;
  gap: 24px;
}
.hero__copy { position: relative; z-index: 2; padding-bottom: 40px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 30px;
  padding: 0 14px 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(127, 127, 127, 0.06);
  font-size: 12.5px;
  color: var(--text-2);
  margin-bottom: 26px;
}
.eyebrow__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-stretch: 108%;
  font-size: clamp(44px, 6.4vw, 96px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  background: var(--metal-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: 0.06em;
  text-wrap: balance;
}
:lang(zh-CN) .hero__title, :lang(ja) .hero__title, :lang(ko) .hero__title { font-weight: 300; letter-spacing: 0.01em; line-height: 1.12; font-size: clamp(40px, 5.6vw, 78px); }
/* 主标题字号上限按 1240px 容器内文案列宽 (约 500px) 计算，保证每个分句占一行 */
:lang(ja) .hero__title { font-size: clamp(32px, 4.4vw, 58px); }
:lang(ko) .hero__title { font-size: clamp(32px, 4.2vw, 55px); }
.hero__lead { margin-top: 26px; max-width: 34em; font-size: 17px; line-height: 1.75; color: var(--text-2); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero__note { margin-top: 22px; font-size: 12.5px; color: var(--text-3); letter-spacing: 0.02em; }

.hero__figure { position: relative; justify-self: end; width: min(100%, 680px); aspect-ratio: 1; }
.hero__plate {
  position: absolute;
  inset: 0;
  mask-image: linear-gradient(180deg, #000 72%, transparent 98%);
  -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent 98%);
}
.hero__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 40px 60px rgba(0, 0, 0, 0.6));
  transform: translate3d(calc(var(--mx, 0) * -10px), calc(var(--my, 0) * -8px), 0);
  transition: transform 0.6s var(--ease-out);
}
:root[data-theme="light"] .hero__img { filter: drop-shadow(0 40px 50px rgba(30, 30, 30, 0.22)); }
.hero__sheen {
  position: absolute;
  inset: 0;
  -webkit-mask-image: url("/static/media/spec/bust-cut.webp");
  mask-image: url("/static/media/spec/bust-cut.webp");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.5) 49%, rgba(205, 220, 240, 0.25) 53%, transparent 62%);
  background-size: 300% 100%;
  mix-blend-mode: overlay;
  animation: sheen 9s var(--ease) infinite;
  transform: translate3d(calc(var(--mx, 0) * -10px), calc(var(--my, 0) * -8px), 0);
  transition: transform 0.6s var(--ease-out);
}
@keyframes sheen {
  0%, 20% { background-position: 120% 0; }
  60%, 100% { background-position: -20% 0; }
}
.anno {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-2);
  white-space: nowrap;
  pointer-events: none;
}
.anno b, .anno em {
  padding: 4px 0;
}
.anno b {
  padding: 5px 8px;
  border-radius: 6px 0 0 6px;
  background: rgba(10, 11, 13, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.anno em {
  margin-left: -8px;
  padding: 4px 9px 4px 6px;
  border-radius: 0 6px 6px 0;
  background: rgba(10, 11, 13, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 0;
  color: #d9d7d1;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.anno i { width: 54px; height: 1px; background: linear-gradient(90deg, var(--line-3), transparent); position: relative; }
.anno i::before { content: ""; position: absolute; left: -3px; top: -3px; width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--text-2); background: var(--bg-0); }
.anno b { font: 600 10px/1 var(--font-display); font-stretch: 118%; letter-spacing: 0.2em; color: var(--accent); }
.anno em { font-style: normal; }
.anno--edge { top: 9%; left: 6%; }
.anno--light { top: 40%; right: -2%; flex-direction: row-reverse; }
.anno--light i { background: linear-gradient(270deg, var(--line-3), transparent); }
.anno--light i::before { left: auto; right: -3px; }
.anno--light b { border-radius: 0 6px 6px 0; border-right: 1px solid rgba(255, 255, 255, 0.08); border-left: 0; }
.anno--light em { margin-left: 0; margin-right: -8px; border-radius: 6px 0 0 6px; border-left: 1px solid rgba(255, 255, 255, 0.08); border-right: 0; padding: 4px 6px 4px 9px; }
.anno--grade { top: 74%; left: 2%; }
.anno--light i { order: 0; }

.hero__modules {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 8px;
}
.module-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--line-1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.25s, transform 0.25s var(--ease), background 0.25s;
}
:root[data-theme="light"] .module-card { background: rgba(255, 255, 255, 0.55); }
.module-card:hover { border-color: var(--line-3); transform: translateY(-2px); }
.module-card__thumb { width: 64px; height: 64px; flex: none; border-radius: 11px; overflow: hidden; background: var(--bg-3); border: 1px solid var(--line-1); }
.module-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.module-card__thumb--checker { background-color: #2a2b2f; background-image: conic-gradient(#3b3c41 25%, transparent 0 50%, #3b3c41 0 75%, transparent 0); background-size: 10px 10px; }
.module-card__thumb--checker img { object-fit: contain; }
.module-card__text { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: 12.5px; color: var(--text-2); line-height: 1.45; }
.module-card__text b { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--text-1); }
.module-card__text b .icon { width: 16px; height: 16px; color: var(--accent); }

/* Sections */
.section { position: relative; padding: 128px 0; }
.section + .section { border-top: 1px solid var(--line-1); }
.section-head { max-width: 760px; margin-bottom: 56px; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
  color: var(--text-2);
  margin-bottom: 18px;
}
.section-tag span:first-child { font: 500 11px/1 var(--font-mono); color: var(--accent); padding-right: 12px; border-right: 1px solid var(--line-2); }
.section-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-stretch: 106%;
  font-size: clamp(34px, 4.4vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  background: var(--metal-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: 0.05em;
}
:lang(zh-CN) .section-title, :lang(ja) .section-title, :lang(ko) .section-title { letter-spacing: 0.01em; line-height: 1.2; font-size: clamp(30px, 3.8vw, 52px); }
.section-lead { margin-top: 18px; font-size: 16px; line-height: 1.75; color: var(--text-2); max-width: 46em; }
.section-head--center .section-lead { margin-left: auto; margin-right: auto; }

/* Demo compare */
.demo__layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.compare {
  position: relative;
  aspect-ratio: 1;
  max-height: 78vh;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-3);
  background: var(--bg-2);
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  cursor: ew-resize;
}
.compare__layer { position: absolute; inset: 0; }
.compare__layer img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.compare__before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare__after[data-bg="checker"] { background-color: #2b2c30; background-image: conic-gradient(#3a3b40 25%, transparent 0 50%, #3a3b40 0 75%, transparent 0); background-size: 22px 22px; }
.compare__after[data-bg="white"] { background: #f4f3ef; }
.compare__after[data-bg="gray"] { background: #8d8c88; }
.compare__after[data-bg="black"] { background: #0b0b0d; }
.compare__after[data-bg="mask"] { background: #000; }
.compare__mask { position: absolute; inset: 0; opacity: 0; transition: opacity 0.3s; }
.compare__after[data-bg="mask"] .compare__mask { opacity: 1; }
.compare__after[data-bg="mask"] img:not(.compare__mask) { opacity: 0; }
.compare__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.9) 12%, rgba(255, 255, 255, 0.9) 88%, transparent);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.5);
  outline: none;
}
.compare__knob {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  background: var(--chrome);
  border: 1px solid #8f8c86;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 6px 18px rgba(0, 0, 0, 0.55);
  color: #222;
  transition: transform 0.2s var(--ease);
}
:root[data-theme="light"] .compare__knob { color: #f2f1ed; }
.compare__knob .icon { width: 14px; height: 14px; stroke-width: 2; }
.compare__knob .icon + .icon { margin-left: -2px; }
.compare__handle:focus-visible .compare__knob { box-shadow: 0 0 0 3px var(--accent), 0 6px 18px rgba(0, 0, 0, 0.55); }
.compare.is-dragging .compare__knob { transform: scale(1.06); }
.compare__label {
  position: absolute;
  top: 16px;
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 500;
  color: #ecebe6;
  background: rgba(10, 10, 12, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  pointer-events: none;
}
.compare__label--l { left: 16px; }
.compare__label--r { right: 16px; }

.demo__side { display: flex; flex-direction: column; gap: 26px; padding-top: 4px; }
.demo__group .micro { margin-bottom: 12px; }
.thumb-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.thumb-tab {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--line-1);
  background: var(--bg-2);
  font-size: 12px;
  color: var(--text-2);
  text-align: left;
  transition: border-color 0.2s, color 0.2s;
}
.thumb-tab img { aspect-ratio: 1; width: 100%; object-fit: cover; border-radius: 8px; }
.thumb-tab span { padding: 0 3px 2px; }
.thumb-tab:hover { color: var(--text-1); border-color: var(--line-3); }
.thumb-tab.is-active { color: var(--text-1); border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.swatch-row { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-3);
  background: var(--sw, transparent);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s, box-shadow 0.15s;
}
.swatch:hover { transform: scale(1.06); }
.swatch.is-active { box-shadow: 0 0 0 2px var(--bg-0), 0 0 0 4px var(--accent); }
.swatch--checker { background-color: #2b2c30; background-image: conic-gradient(#4a4b50 25%, transparent 0 50%, #4a4b50 0 75%, transparent 0); background-size: 10px 10px; }
.swatch--text { width: auto; padding: 0 12px; border-radius: 999px; font-size: 12px; color: var(--text-2); background: var(--bg-2); }
.demo__note {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--line-1);
  background: var(--bg-2);
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-2);
  min-height: 92px;
}

/* Features */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 64px;
  align-items: center;
  padding: 44px 0;
}
.feature + .feature { border-top: 1px solid var(--line-1); }
.feature--flip .feature__media { order: 2; }
.feature__kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--accent); margin-bottom: 16px; }
.feature__kicker .icon { width: 17px; height: 17px; }
.feature__title { font: 400 30px/1.25 var(--font-display); letter-spacing: -0.01em; }
:lang(zh-CN) .feature__title, :lang(ja) .feature__title, :lang(ko) .feature__title { font-size: 28px; line-height: 1.35; font-weight: 400; letter-spacing: 0.01em; }
.feature__text { margin-top: 16px; font-size: 15px; line-height: 1.8; color: var(--text-2); }
.ticks { margin-top: 22px; display: flex; flex-direction: column; gap: 11px; }
.ticks li { position: relative; padding-left: 26px; font-size: 14px; line-height: 1.6; color: var(--text-1); }
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 14px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.cutviz {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 10px;
}
.cutviz__cell {
  position: relative;
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line-1);
  background: var(--bg-3);
}
.cutviz__cell img { width: 100%; height: 100%; object-fit: cover; }
.cutviz__cell--mask { background: #000; }
.cutviz__cell--wide { grid-column: 1 / -1; aspect-ratio: 2.1 / 1; }
.cutviz__cell--wide img { object-fit: cover; object-position: 50% 30%; }
.cutviz__cell--checker { background-color: #2b2c30; background-image: conic-gradient(#3a3b40 25%, transparent 0 50%, #3a3b40 0 75%, transparent 0); background-size: 18px 18px; }
.cutviz__tag {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 11.5px;
  color: #ecebe6;
  background: rgba(10, 10, 12, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.genviz { position: relative; }
.genviz__frame {
  position: relative;
  aspect-ratio: 1;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  background: var(--bg-3);
  box-shadow: var(--shadow-3);
}
.genviz__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.04); filter: blur(10px) saturate(0.6); transition: opacity 1.2s var(--ease), transform 1.6s var(--ease-out), filter 1.2s var(--ease); }
.genviz__img.is-on { opacity: 1; transform: none; filter: none; }
.genviz__prompt {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 10px 10px 10px 16px;
  border-radius: 14px;
  background: rgba(14, 15, 18, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #ecebe6;
  font-size: 13.5px;
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.8);
}
.genviz__prompt > .icon { color: #8f8d86; }
.genviz__text { flex: 0 1 auto; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.genviz__caret { width: 1.5px; height: 16px; background: var(--accent); animation: caret 1s steps(1) infinite; flex: none; }
.genviz__go { margin-left: auto; width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--chrome); border: 1px solid #8f8c86; color: #18181a; }
.genviz__go .icon { width: 16px; height: 16px; }
:root[data-theme="light"] .genviz__go { color: #f2f1ed; }
@keyframes caret { 50% { opacity: 0; } }

.finviz { display: flex; flex-direction: column; gap: 12px; }
.finviz__stage {
  position: relative;
  aspect-ratio: 1;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-3);
  background: var(--bg-3);
}
.finviz__stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.6s var(--ease); }
.finviz[data-state="after"] .finviz__before { opacity: 0; }
.finviz[data-state="before"] .finviz__after { opacity: 0; }
.finviz__caption {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  color: #ecebe6;
  background: rgba(10, 10, 12, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: opacity 0.3s;
}
.finviz[data-state="before"] .finviz__caption { opacity: 0; }
.finviz__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.finviz__picks { display: flex; gap: 8px; }
.finviz__picks button { width: 44px; height: 44px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-2); opacity: 0.6; transition: opacity 0.2s, border-color 0.2s; }
.finviz__picks button img { width: 100%; height: 100%; object-fit: cover; }
.finviz__picks button:hover { opacity: 1; }
.finviz__picks button.is-active { opacity: 1; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* Workflow */
.flow { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 56px; align-items: center; }
.flow__ring { position: relative; width: 320px; height: 320px; margin: 0 auto; }
.flow__svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.flow__orbit { fill: none; stroke: var(--line-2); stroke-width: 1; }
.flow__orbit--run { stroke: var(--accent); stroke-dasharray: 60 640; stroke-linecap: round; animation: orbit 7s linear infinite; transform-origin: 160px 160px; opacity: 0.85; }
@keyframes orbit { to { transform: rotate(360deg); } }
.flow__node {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 92px;
  height: 92px;
  margin: -46px 0 0 -46px;
  border-radius: 50%;
  background: var(--plate);
  border: 1px solid var(--line-2);
  box-shadow: var(--plate-hi), var(--shadow-2);
  font-size: 13px;
}
.flow__node .icon { width: 22px; height: 22px; color: var(--accent); }
.flow__node b { font-weight: 500; }
.flow__node--a { left: 160px; top: 48px; }
.flow__node--b { left: 257px; top: 216px; }
.flow__node--c { left: 63px; top: 216px; }
.flow__core { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); text-align: center; display: flex; flex-direction: column; gap: 2px; }
.flow__core b { font: 300 22px/1.1 var(--font-display); font-stretch: 110%; }
.flow__core em { font-style: normal; font-size: 11.5px; color: var(--text-3); }
.flow__paths { display: flex; flex-direction: column; gap: 14px; }
.path-card { padding: 20px 22px; border-radius: 18px; border: 1px solid var(--line-1); background: linear-gradient(180deg, var(--bg-2), var(--bg-1)); }
.path-card__head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.path-card__no {
  width: 32px;
  height: 32px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 9px;
  font: 600 13px var(--font-display);
  font-stretch: 115%;
  color: var(--chrome-ink);
  background: var(--chrome);
  border: 1px solid var(--chrome-edge);
}
.path-card__head div { display: flex; flex-direction: column; line-height: 1.4; }
.path-card__head b { font-size: 15px; font-weight: 600; }
.path-card__head span { font-size: 12.5px; color: var(--text-3); }
.steps { display: flex; flex-wrap: wrap; gap: 6px 4px; align-items: center; counter-reset: s; }
.steps li { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text-2); }
.steps li::before { counter-increment: s; content: counter(s); font: 500 10px/18px var(--font-mono); width: 18px; height: 18px; text-align: center; border-radius: 50%; border: 1px solid var(--line-2); color: var(--text-3); }
.steps li + li::after { content: none; }
.steps li:not(:last-child)::after { content: ""; width: 18px; height: 1px; background: var(--line-3); margin: 0 4px 0 6px; }

/* Console */
.console__layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 56px; align-items: center; }
.mock {
  border-radius: 18px;
  border: 1px solid var(--line-2);
  background: var(--bg-1);
  box-shadow: var(--shadow-3), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}
.mock__bar { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 14px; border-bottom: 1px solid var(--line-1); background: var(--bg-2); }
.mock__dots { display: flex; gap: 6px; }
.mock__dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--bg-5); }
.mock__title { font-size: 12px; color: var(--text-3); }
.mock__pill { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px; border: 1px solid var(--line-2); font: 500 11px var(--font-mono); }
.mock__pill .icon { width: 12px; height: 12px; color: var(--accent); }
.mock__body { display: grid; grid-template-columns: 52px minmax(0, 1fr) 190px; min-height: 360px; }
.mock__rail { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 0; border-right: 1px solid var(--line-1); background: var(--bg-2); }
.mock__rail span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: var(--text-3); }
.mock__rail span.is-on { color: var(--accent); background: var(--accent-soft); }
.mock__rail .icon { width: 17px; height: 17px; }
.mock__stage { display: grid; place-items: center; padding: 22px; background: radial-gradient(circle at 50% 45%, #15171b, #0a0b0d 70%); }
:root[data-theme="light"] .mock__stage { background: radial-gradient(circle at 50% 45%, #e6e4df, #cfcdc7 70%); }
.mock__art { width: 78%; aspect-ratio: 1; border-radius: 6px; overflow: hidden; box-shadow: 0 24px 40px -18px rgba(0, 0, 0, 0.8); }
.mock__art img { width: 100%; height: 100%; object-fit: cover; }
.mock__panel { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-left: 1px solid var(--line-1); background: var(--bg-2); }
.mock__tabs { display: flex; gap: 2px; padding: 2px; border-radius: 8px; background: var(--bg-1); font-size: 10.5px; color: var(--text-3); }
.mock__tabs span { flex: 1; text-align: center; padding: 4px 0; border-radius: 6px; }
.mock__tabs span.is-on { color: var(--text-1); background: var(--bg-4); }
.mock__dial { width: 92px; height: 92px; margin: 4px auto; border-radius: 50%; border: 1px solid var(--line-2); background: radial-gradient(circle, transparent 30%, var(--line-1) 31%, transparent 32%, transparent 62%, var(--line-1) 63%, transparent 64%); position: relative; }
.mock__dial i { position: absolute; left: 24%; top: 26%; width: 12px; height: 12px; border-radius: 50%; background: var(--chrome); border: 1px solid #8f8c86; box-shadow: 0 0 14px rgba(232, 180, 107, 0.6); }
.mock__row { display: flex; flex-direction: column; gap: 6px; font-size: 10.5px; color: var(--text-3); }
.mock__row i { height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--accent) 0 var(--p), var(--track) var(--p)); }
.mock__cta { margin-top: auto; height: 28px; display: grid; place-items: center; border-radius: 8px; font-size: 11px; font-weight: 600; color: var(--chrome-ink); background: var(--chrome); border: 1px solid var(--chrome-edge); }
.mock__film { display: flex; gap: 6px; padding: 10px 14px; border-top: 1px solid var(--line-1); background: var(--bg-2); }
.mock__film i { width: 38px; height: 30px; border-radius: 5px; background: var(--bg-4); border: 1px solid var(--line-1); }
.mock__film i.is-on { border-color: var(--accent); }
.console__points { display: flex; flex-direction: column; gap: 20px; }
.console__points li { display: flex; gap: 14px; }
.console__points .icon { width: 20px; height: 20px; color: var(--accent); margin-top: 2px; }
.console__points div { display: flex; flex-direction: column; gap: 3px; }
.console__points b { font-size: 15px; font-weight: 600; }
.console__points span { font-size: 13.5px; line-height: 1.65; color: var(--text-2); }

/* Pricing */
.billing { display: flex; justify-content: center; margin-bottom: 36px; }
.billing__toggle {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--bg-1);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}
.billing__toggle button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
  border: 1px solid transparent;
}
.billing__toggle button em { font-style: normal; font-size: 11px; font-weight: 600; color: var(--accent); }
.billing__toggle button.is-active { color: var(--chrome-ink); background: var(--chrome); border-color: var(--chrome-edge); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85); }
.billing__toggle button.is-active em { color: var(--accent-2); }
:root:not([data-theme="light"]) .billing__toggle button.is-active em { color: #8a5d1e; }

.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.plans--compact { padding: 0 28px; gap: 14px; }
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px 26px 26px;
  border-radius: 20px;
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  box-shadow: var(--plate-hi);
}
.plan--featured {
  border: 1px solid transparent;
  background:
    linear-gradient(180deg, var(--bg-2), var(--bg-1)) padding-box,
    linear-gradient(180deg, #f3d9a6, #b88a44 30%, rgba(255, 255, 255, 0.08) 70%) border-box;
  box-shadow: 0 30px 80px -40px rgba(232, 180, 107, 0.45), var(--plate-hi);
}
.plan__ribbon {
  position: absolute;
  top: -11px;
  left: 26px;
  height: 22px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #1d1508;
  background: linear-gradient(180deg, #f6dca9, #d9a956);
  border: 1px solid #a8803e;
}
.plan__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.plan__name { font-size: 16px; font-weight: 600; }
.plan__sum { margin-top: 6px; font-size: 13px; color: var(--text-3); min-height: 2.8em; }
.plan__price { display: flex; align-items: baseline; gap: 6px; margin-top: 18px; }
.plan__price b { font: 300 44px/1 var(--font-display); font-stretch: 106%; letter-spacing: -0.02em; }
.plan__price span { font-size: 13px; color: var(--text-3); }
.plan__billed { margin-top: 8px; font-size: 12px; color: var(--text-3); min-height: 1.6em; }
.plan__billed s { color: var(--text-3); margin-right: 6px; }
.plan__credits {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 11px 12px;
  border-radius: 11px;
  border: 1px solid var(--line-1);
  background: var(--bg-1);
  font-size: 13px;
  color: var(--text-2);
}
.plan__credits .icon { width: 16px; height: 16px; color: var(--accent); }
.plan__credits b { font: 600 14px var(--font-mono); color: var(--text-1); }
.plan__features { display: flex; flex-direction: column; gap: 10px; margin: 20px 0 24px; flex: 1; }
.plan__features li { display: flex; gap: 10px; font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
.plan__features li .icon { width: 16px; height: 16px; color: var(--accent); margin-top: 1px; stroke-width: 2; }
.plan__features li.is-off { color: var(--text-3); }
.plan__features li.is-off .icon { color: var(--text-3); }
.plan__cta { margin-top: auto; }
.plan.is-current .plan__cta { pointer-events: none; }
.plans--compact .plan { padding: 22px 20px 20px; }
.plans--compact .plan__price b { font-size: 36px; }
.plans--compact .plan__features { margin: 14px 0 18px; gap: 8px; }
.plans--compact .plan__features li { font-size: 12.5px; }

.plans-legal { max-width: 640px; margin: 20px auto 0; padding: 0 24px; text-align: center; font-size: 12px; line-height: 1.65; color: var(--text-3); }
.plans-legal a,
.auth__foot a { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 2px; }
.plans-legal a:hover,
.auth__foot a:hover { color: var(--text-1); }

.usage { max-width: 760px; margin: 48px auto 0; padding: 24px 28px; border-radius: 18px; border: 1px solid var(--line-1); background: var(--bg-1); }
.usage__title { font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.usage__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
.usage__list div { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 0; border-bottom: 1px dashed var(--line-2); font-size: 13.5px; }
.usage__list dt { color: var(--text-2); }
.usage__list dd b { font: 600 14px var(--font-mono); color: var(--text-1); }
.usage__list dd { color: var(--text-3); font-size: 12.5px; }
.trust { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px 34px; margin-top: 36px; }
.trust li { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.trust .icon { width: 16px; height: 16px; color: var(--text-3); }

/* FAQ */
.faq__list { display: flex; flex-direction: column; }
.qa { border-bottom: 1px solid var(--line-1); }
.qa summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 2px;
  font-size: 16.5px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary .icon { color: var(--text-3); transition: transform 0.3s var(--ease); }
.qa[open] summary .icon { transform: rotate(45deg); color: var(--accent); }
.qa p { padding: 0 2px 24px; font-size: 14.5px; line-height: 1.8; color: var(--text-2); max-width: 64em; }

/* Finale */
.finale { position: relative; padding: 140px 0 150px; overflow: hidden; border-top: 1px solid var(--line-1); isolation: isolate; }
.finale__strip { position: absolute; inset: 0; z-index: -2; display: grid; grid-template-columns: repeat(4, 1fr); opacity: 0.32; filter: grayscale(0.2); }
.finale__strip img { width: 100%; height: 100%; object-fit: cover; }
.finale::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at center, rgba(8, 9, 11, 0.55), var(--bg-0) 78%), linear-gradient(180deg, var(--bg-0), transparent 30%, transparent 70%, var(--bg-0)); }
:root[data-theme="light"] .finale::before { background: radial-gradient(ellipse at center, rgba(233, 231, 226, 0.6), var(--bg-0) 78%), linear-gradient(180deg, var(--bg-0), transparent 30%, transparent 70%, var(--bg-0)); }
.finale__inner { text-align: center; }
.finale__title {
  font: 300 clamp(34px, 4.6vw, 64px)/1.12 var(--font-display);
  font-stretch: 106%;
  letter-spacing: -0.02em;
  background: var(--metal-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
:lang(zh-CN) .finale__title { letter-spacing: 0.01em; line-height: 1.25; }
.finale__lead { margin: 18px auto 0; font-size: 16px; color: var(--text-2); max-width: 36em; }
.finale__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.site-footer { border-top: 1px solid var(--line-1); padding: 40px 0 46px; background: var(--bg-0); }
.site-footer__inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.site-footer__brand p { margin-top: 12px; font-size: 13px; color: var(--text-3); }
.site-footer__links { display: flex; gap: 24px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.site-footer__links a:hover { color: var(--text-1); }
.site-footer__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 12px; color: var(--text-3); }
.site-footer__legal { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 16px; margin-bottom: 4px; font-size: 12.5px; color: var(--text-2); }
.site-footer__legal a:hover { color: var(--text-1); }

/* ---------- 5. Studio ---------- */
body.is-studio { overflow: hidden; background: var(--bg-1); }
.boot-studio #landingView { display: none; }

.studio {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr) var(--insp-w);
  grid-template-rows: var(--sbar-h) minmax(0, 1fr);
  grid-template-areas:
    "sbar sbar sbar"
    "rail work insp";
  background: var(--bg-1);
}

/* Top bar */
.sbar {
  grid-area: sbar;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 12px 0 0;
  border-bottom: 1px solid var(--line-1);
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  position: relative;
  z-index: 20;
}
.sbar__left, .sbar__right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sbar__brand {
  width: var(--rail-w);
  height: var(--sbar-h);
  flex: none;
  display: grid;
  place-items: center;
  border-right: 1px solid var(--line-1);
}
.sbar__brand:hover .brand__mark { transform: rotate(-12deg); }
.sbar__brand .brand__mark { transition: transform 0.4s var(--ease-out); }
.sbar__doc { display: flex; align-items: center; gap: 10px; min-width: 0; padding-left: 6px; }
.sbar__name {
  width: 220px;
  max-width: 34vw;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-1);
  text-overflow: ellipsis;
}
.sbar__name:hover { border-color: var(--line-2); }
.sbar__name:focus { outline: none; border-color: var(--accent-line); background: var(--bg-1); }
.sbar__name::placeholder { color: var(--text-2); }
.sbar__saved { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--text-3); white-space: nowrap; transition: opacity 0.3s; }
.sbar__saved .icon { width: 13px; height: 13px; color: var(--ok); }
.sbar__saved.is-saving .icon { color: var(--accent); }
.sbar__history { display: flex; gap: 2px; padding-left: 10px; border-left: 1px solid var(--line-1); }
.credit-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--plate);
  box-shadow: var(--plate-hi);
  font-size: 12px;
  color: var(--text-2);
  transition: border-color 0.2s;
}
.credit-pill:hover { border-color: var(--line-3); }
.credit-pill .icon { width: 15px; height: 15px; color: var(--accent); }
.credit-pill b { font: 600 13px var(--font-mono); color: var(--text-1); font-variant-numeric: tabular-nums; }
.credit-pill.is-low b { color: var(--danger); }
.credit-pill.is-bump { animation: bump 0.5s var(--ease-out); }
@keyframes bump { 30% { transform: scale(1.08); } }
.avatar-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; }
.avatar-btn:hover .avatar { box-shadow: 0 0 0 3px var(--accent-soft); }

/* Rail */
.rail {
  grid-area: rail;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 0 14px;
  border-right: 1px solid var(--line-1);
  background: var(--bg-2);
  z-index: 10;
}
.rail__item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 60px;
  height: 58px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
  transition: color 0.15s, background 0.15s;
}
.rail__item .icon { width: 21px; height: 21px; }
.rail__item:hover { color: var(--text-1); background: rgba(127, 127, 127, 0.08); }
.rail__item.is-active { color: var(--text-1); background: var(--plate); box-shadow: var(--plate-hi), var(--shadow-1); border: 1px solid var(--line-2); }
.rail__item.is-active .icon { color: var(--accent); }
.rail__item.is-active::before { content: ""; position: absolute; left: -8px; top: 16px; bottom: 16px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.rail__item kbd { position: absolute; top: 4px; right: 4px; min-width: 15px; height: 15px; font-size: 9px; padding: 0 3px; opacity: 0; transition: opacity 0.15s; }
.rail__item:hover kbd { opacity: 1; }
.rail__item--util { height: 48px; font-size: 10.5px; }
.rail__item--util .icon { width: 18px; height: 18px; }
.rail__sep { width: 28px; height: 1px; margin: 6px 0; background: var(--line-2); }
.rail__spacer { flex: 1; }
:root[data-theme="dark"] .theme-icon-light, :root:not([data-theme]) .theme-icon-light { display: none; }
:root[data-theme="light"] .theme-icon-dark { display: none; }

/* Workspace */
.workspace {
  grid-area: work;
  display: grid;
  grid-template-rows: var(--ctool-h) minmax(0, 1fr) var(--film-h);
  min-width: 0;
  min-height: 0;
  background: var(--stage-bg);
}
.ctoolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line-1);
  background: var(--bg-1);
  overflow-x: auto;
  scrollbar-width: none;
}
.ctoolbar::-webkit-scrollbar { display: none; }
.ctoolbar__group { display: flex; align-items: center; gap: 2px; flex: none; }
.ctoolbar__sep { width: 1px; height: 20px; background: var(--line-2); flex: none; }
.ctoolbar__matte { gap: 8px; }
.ctoolbar__info { margin-left: auto; font: 500 11.5px var(--font-mono); color: var(--text-3); white-space: nowrap; flex: none; }
.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  min-width: 30px;
  padding: 0 7px;
  justify-content: center;
  border-radius: 8px;
  color: var(--text-2);
  font-size: 12px;
  border: 1px solid transparent;
}
.tool-btn .icon { width: 17px; height: 17px; }
.tool-btn:hover:not(:disabled) { color: var(--text-1); background: rgba(127, 127, 127, 0.1); }
.tool-btn.is-active { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-line); }
.tool-btn:disabled { opacity: 0.35; cursor: default; }
.tool-btn--label { padding: 0 10px 0 8px; }
.zoom-readout { min-width: 54px; height: 28px; padding: 0 6px; border-radius: 7px; font: 500 11.5px var(--font-mono); color: var(--text-1); background: var(--bg-2); border: 1px solid var(--line-1); }
.zoom-readout:hover { border-color: var(--line-3); }
.mini-swatches { display: flex; gap: 5px; }
.mini-swatch { width: 18px; height: 18px; border-radius: 5px; border: 1px solid var(--line-3); background: var(--sw); }
.mini-swatch--checker { background-color: #2b2c30; background-image: conic-gradient(#55565b 25%, transparent 0 50%, #55565b 0 75%, transparent 0); background-size: 8px 8px; }
.mini-swatch.is-active { box-shadow: 0 0 0 2px var(--bg-1), 0 0 0 3.5px var(--accent); }

/* Stage */
.stage {
  position: relative;
  overflow: hidden;
  touch-action: none;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(255, 255, 255, 0.025), transparent 65%),
    var(--stage-bg);
  outline: none;
}
:root[data-theme="light"] .stage { background: radial-gradient(ellipse at 50% 40%, rgba(255, 255, 255, 0.35), transparent 65%), var(--stage-bg); }
.stage[data-matte="white"] { --matte: #f4f3ef; }
.stage[data-matte="gray"] { --matte: #7d7c79; }
.stage[data-matte="black"] { --matte: #050506; }
.stage__viewport { position: absolute; inset: 0; }
.stage__doc {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 30px 70px -20px rgba(0, 0, 0, 0.8);
  --cs: 16px;
}
:root[data-theme="light"] .stage__doc { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 30px 60px -24px rgba(0, 0, 0, 0.35); }
.stage[data-matte="checker"] .stage__doc {
  background-color: #2c2d31;
  background-image: conic-gradient(#3b3c41 25%, transparent 0 50%, #3b3c41 0 75%, transparent 0);
  background-size: var(--cs) var(--cs);
}
:root[data-theme="light"] .stage[data-matte="checker"] .stage__doc { background-color: #f3f2ee; background-image: conic-gradient(#dedcd6 25%, transparent 0 50%, #dedcd6 0 75%, transparent 0); }
.stage:not([data-matte="checker"]) .stage__doc { background: var(--matte); }
.stage__canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: auto; }
.stage.is-pixel .stage__canvas { image-rendering: pixelated; }
.stage__before { visibility: hidden; }
.stage.is-compare .stage__before { visibility: visible; clip-path: inset(0 calc(100% - var(--split, 50%)) 0 0); }
.stage.is-hold .stage__before { visibility: visible; clip-path: none; }
.stage.is-pan { cursor: grab; }
.stage.is-panning { cursor: grabbing; }
.stage.is-loupe { cursor: crosshair; }
.stage.is-empty .stage__doc, .stage.is-empty .stage__float { display: none; }

.split { position: absolute; top: 0; bottom: 0; left: var(--split-x, 50%); width: 0; z-index: 5; pointer-events: none; }
.split__line { position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: rgba(255, 255, 255, 0.92); box-shadow: 0 0 10px rgba(0, 0, 0, 0.6); }
.split__knob {
  position: absolute;
  top: 50%;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin: -19px 0 0 -19px;
  border-radius: 50%;
  background: var(--chrome);
  border: 1px solid #8f8c86;
  color: #1c1c1e;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 6px 18px rgba(0, 0, 0, 0.55);
  pointer-events: auto;
  cursor: ew-resize;
  touch-action: none;
}
:root[data-theme="light"] .split__knob { color: #f2f1ed; }
.split__knob .icon { width: 13px; height: 13px; stroke-width: 2.1; }
.split__knob .icon + .icon { margin-left: -2px; }
.split__label { position: absolute; top: 14px; padding: 4px 9px; border-radius: 6px; font-size: 11px; font-weight: 500; color: #ecebe6; background: rgba(10, 10, 12, 0.66); white-space: nowrap; }
.split__label--l { right: 12px; }
.split__label--r { left: 12px; }

.loupe {
  position: absolute;
  z-index: 6;
  width: 180px;
  height: 180px;
  margin: -90px 0 0 -90px;
  border-radius: 50%;
  overflow: hidden;
  pointer-events: none;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 18px 40px rgba(0, 0, 0, 0.6);
  background: #222;
}
.loupe canvas { width: 100%; height: 100%; }
.loupe::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.8); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4); }
.loupe__zoom { position: absolute; right: 50%; bottom: 14px; transform: translateX(50%); font: 600 10px var(--font-mono); color: #fff; background: rgba(0, 0, 0, 0.55); padding: 2px 6px; border-radius: 4px; }

.stage__empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; overflow: auto; }
.empty {
  width: min(560px, 100%);
  padding: 40px 36px 30px;
  border-radius: 24px;
  text-align: center;
  border: 1px dashed var(--line-3);
  background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.04), transparent 60%), rgba(19, 20, 24, 0.6);
  transition: border-color 0.2s, background 0.2s;
}
:root[data-theme="light"] .empty { background: rgba(255, 255, 255, 0.5); }
.stage.is-dragover .empty { border-color: var(--accent); }
.empty__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--plate);
  border: 1px solid var(--line-2);
  box-shadow: var(--plate-hi), var(--shadow-2);
  color: var(--accent);
}
.empty__icon .icon { width: 26px; height: 26px; }
.empty__title { font: 400 24px/1.3 var(--font-display); letter-spacing: -0.005em; }
.empty__text { margin-top: 8px; font-size: 13.5px; color: var(--text-2); }
.empty__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.empty__kbd { margin-top: 14px; font-size: 12px; color: var(--text-3); display: flex; align-items: center; justify-content: center; gap: 4px; }
.empty__samples { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line-1); }
.empty__samples .micro { margin-bottom: 12px; }
.sample-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.sample { display: flex; flex-direction: column; gap: 6px; font-size: 11.5px; color: var(--text-2); }
.sample img { aspect-ratio: 1; width: 100%; object-fit: cover; border-radius: 10px; border: 1px solid var(--line-1); transition: transform 0.25s var(--ease), border-color 0.2s; }
.sample:hover img { transform: translateY(-2px); border-color: var(--accent-line); }
.sample:hover { color: var(--text-1); }

.stage__busy { position: absolute; inset: 0; z-index: 8; display: grid; place-items: end center; padding-bottom: 28px; pointer-events: none; }
.scanline {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 30%;
  background: linear-gradient(180deg, transparent, rgba(232, 180, 107, 0.0) 40%, rgba(232, 180, 107, 0.14) 92%, rgba(255, 228, 180, 0.65) 100%);
  border-bottom: 1px solid rgba(255, 228, 180, 0.8);
  animation: scan 2.2s var(--ease) infinite;
  mix-blend-mode: screen;
}
@keyframes scan { 0% { transform: translateY(-100%); } 100% { transform: translateY(340%); } }
.busy-card {
  pointer-events: auto;
  width: min(340px, calc(100% - 32px));
  padding: 14px 16px 12px;
  border-radius: 14px;
  background: rgba(16, 17, 21, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #edebe6;
}
.busy-card__row { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.busy-card__step { margin: 6px 0 10px; font-size: 12px; color: #a3a19a; min-height: 1.4em; }
.busy-card .link-btn { margin-top: 10px; font-size: 12px; }

.next-steps {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 7;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 32px);
  padding: 6px 6px 6px 14px;
  border-radius: 999px;
  background: rgba(16, 17, 21, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: pop-in 0.3s var(--ease-out);
}
.next-steps .micro { color: #8f8d86; white-space: nowrap; }
.next-steps__chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.next-steps__chips::-webkit-scrollbar { display: none; }
.next-steps__chips button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; color: #ecebe6; border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.04); white-space: nowrap; }
.next-steps__chips button .icon { width: 15px; height: 15px; color: var(--accent); }
.next-steps__chips button:hover { border-color: rgba(255, 255, 255, 0.25); background: rgba(255, 255, 255, 0.08); }
.next-steps .icon-btn { color: #8f8d86; }

.stage__drop { position: absolute; inset: 10px; z-index: 9; display: grid; place-items: center; border-radius: 18px; border: 2px dashed var(--accent); background: rgba(232, 180, 107, 0.08); backdrop-filter: blur(2px); }
.stage__drop-card { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--text-1); font-size: 15px; }
.stage__drop-card .icon { width: 34px; height: 34px; color: var(--accent); }

.stage__float { position: absolute; right: 12px; top: 12px; z-index: 6; display: none; flex-direction: column; gap: 8px; }
.float-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: #ecebe6; background: rgba(16, 17, 21, 0.82); border: 1px solid rgba(255, 255, 255, 0.12); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.float-btn.is-active { color: var(--accent); border-color: var(--accent-line); }

/* Filmstrip */
.filmstrip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border-top: 1px solid var(--line-1);
  background: var(--bg-1);
  min-width: 0;
}
.film-add {
  width: 56px;
  height: 56px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px dashed var(--line-3);
  color: var(--text-2);
}
.film-add:hover { color: var(--accent); border-color: var(--accent-line); }
.film-list { display: flex; gap: 8px; overflow-x: auto; padding: 6px 2px; scrollbar-width: thin; min-width: 0; }
.film-item {
  position: relative;
  width: 64px;
  height: 56px;
  flex: none;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  background-color: #2b2c30;
  background-image: conic-gradient(#38393e 25%, transparent 0 50%, #38393e 0 75%, transparent 0);
  background-size: 8px 8px;
  transition: border-color 0.15s, transform 0.15s;
}
.film-item img { width: 100%; height: 100%; object-fit: contain; }
.film-item:hover { border-color: var(--line-3); }
.film-item.is-active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.film-item__kind {
  position: absolute;
  left: 3px;
  bottom: 3px;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 5px;
  color: #ecebe6;
  background: rgba(8, 8, 10, 0.72);
}
.film-item__kind .icon { width: 11px; height: 11px; stroke-width: 2; }
.film-item__del { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; display: none; place-items: center; border-radius: 5px; color: #fff; background: rgba(8, 8, 10, 0.72); }
.film-item__del .icon { width: 11px; height: 11px; stroke-width: 2; }
.film-item:hover .film-item__del { display: grid; }
.film-hint { font-size: 12px; color: var(--text-3); white-space: nowrap; }

/* Inspector */
.inspector {
  grid-area: insp;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-left: 1px solid var(--line-1);
  background: var(--bg-2);
  z-index: 10;
}
.inspector__grip { display: none; }
.panel { display: none; flex-direction: column; min-height: 0; height: 100%; }
.panel.is-active { display: flex; animation: panel-in 0.25s var(--ease-out); }
@keyframes panel-in { from { opacity: 0; transform: translateX(6px); } }
.panel__head { padding: 18px 20px 14px; border-bottom: 1px solid var(--line-1); }
.panel__title { display: flex; align-items: center; gap: 9px; font: 500 18px/1.3 var(--font-display); font-stretch: 104%; }
.panel__title .icon { width: 19px; height: 19px; color: var(--accent); }
.panel__desc { margin-top: 6px; font-size: 12.5px; line-height: 1.6; color: var(--text-2); }
.panel__tabs { padding: 12px 16px; border-bottom: 1px solid var(--line-1); }
.panel__tabs .seg > button { padding: 0 6px; font-size: 12px; gap: 5px; }
.panel__body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--bg-5) transparent; }
.panel__body::-webkit-scrollbar { width: 8px; }
.panel__body::-webkit-scrollbar-thumb { background: var(--bg-5); border-radius: 8px; border: 2px solid var(--bg-2); }
.panel__foot { padding: 14px 16px 16px; border-top: 1px solid var(--line-1); background: linear-gradient(180deg, var(--bg-2), var(--bg-1)); }
.panel__note { margin-top: 9px; font-size: 11.5px; color: var(--text-3); text-align: center; display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 1em; }
.panel__note:empty { display: none; }
.foot-row { display: flex; gap: 8px; }

.pgroup { padding: 16px 20px; border-bottom: 1px solid var(--line-1); }
.pgroup:last-child { border-bottom: 0; }
.pgroup__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.pgroup h3 { font-size: 12.5px; font-weight: 600; color: var(--text-1); letter-spacing: 0.02em; }
.pgroup__aside { font-size: 11.5px; color: var(--text-3); }
.pgroup--inline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pgroup.is-locked .sliders { opacity: 0.4; pointer-events: none; }
.tabpane { display: none; }
.tabpane.is-active { display: block; }
.tabpane > .btn { margin: 14px 20px 20px; width: calc(100% - 40px); }
.hint { font-size: 12px; line-height: 1.6; color: var(--text-3); margin-top: 10px; }
.hint--lock { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; }
.hint--lock .icon { width: 14px; height: 14px; }
.hint--warn { display: flex; gap: 6px; color: var(--accent); }
.hint--warn .icon { width: 15px; height: 15px; margin-top: 2px; }

.choice-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 11px 2px 10px;
  border-radius: 11px;
  border: 1px solid var(--line-1);
  background: var(--bg-1);
  color: var(--text-2);
  font-size: 11.5px;
  line-height: 1.2;
  text-align: center;
  transition: all 0.15s;
}
.choice .icon { width: 21px; height: 21px; }
.choice:hover { color: var(--text-1); border-color: var(--line-2); }
.choice.is-active {
  color: var(--text-1);
  border-color: var(--accent-line);
  background: linear-gradient(180deg, rgba(232, 180, 107, 0.11), rgba(232, 180, 107, 0.03));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.choice.is-active .icon { color: var(--accent); }

.tier-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tier-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line-1);
  background: var(--bg-1);
  text-align: left;
  transition: all 0.15s;
}
.tier-card:hover { border-color: var(--line-2); }
.tier-card__top { display: flex; align-items: center; justify-content: space-between; }
.tier-card__top b { font-size: 13.5px; font-weight: 600; }
.tier-card__desc { font-size: 11.5px; line-height: 1.5; color: var(--text-3); }
.tier-card.is-active { border-color: var(--accent-line); background: linear-gradient(180deg, rgba(232, 180, 107, 0.1), rgba(232, 180, 107, 0.02)); }
.tier-card.is-active .tier-card__desc { color: var(--text-2); }

.pro-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 13px;
  border: 1px solid var(--line-1);
  background: linear-gradient(135deg, rgba(158, 177, 198, 0.08), transparent 60%), var(--bg-1);
}
.pro-card__icon { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--plate); border: 1px solid var(--line-2); color: var(--steel); }
.pro-card__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 11.5px; color: var(--text-3); line-height: 1.45; }
.pro-card__text b { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--text-1); }
.pro-card__text .tier-badge { height: 17px; font-size: 9px; padding: 0 5px; }

.run-btn__cost { display: inline-flex; align-items: center; gap: 3px; margin-left: 4px; padding: 3px 7px; border-radius: 6px; background: rgba(0, 0, 0, 0.1); font: 600 12px/1 var(--font-mono); }
.btn--graphite .run-btn__cost { background: rgba(255, 255, 255, 0.06); color: var(--accent); }
:root[data-theme="light"] .btn--chrome .run-btn__cost { background: rgba(255, 255, 255, 0.12); }
.run-btn__cost .icon { width: 13px; height: 13px; }
.run-btn.is-busy { pointer-events: none; }
.run-btn.is-busy > .icon { animation: spin 1.2s linear infinite; }

.notice { margin: 14px 20px 0; padding: 11px 12px; border-radius: 11px; font-size: 12px; line-height: 1.55; color: var(--text-2); border: 1px solid var(--accent-line); background: var(--accent-soft); display: flex; gap: 8px; }
.notice .icon { width: 15px; height: 15px; color: var(--accent); margin-top: 1px; }

.prompt-box { border-radius: 13px; border: 1px solid var(--line-2); background: var(--bg-1); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25); transition: border-color 0.15s, box-shadow 0.15s; }
.prompt-box:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.prompt-box textarea { display: block; width: 100%; min-height: 112px; padding: 12px 13px 6px; border: 0; background: transparent; resize: vertical; font-size: 13.5px; line-height: 1.65; color: var(--text-1); }
.prompt-box textarea:focus { outline: none; }
.prompt-box textarea::placeholder { color: var(--text-3); }
.prompt-box__bar { display: flex; align-items: center; gap: 6px; padding: 8px; border-top: 1px solid var(--line-1); }
.prompt-box__count { margin-left: auto; font: 500 11px var(--font-mono); color: var(--text-3); }

.model-list { display: flex; flex-direction: column; gap: 6px; }
.model {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid var(--line-1);
  background: var(--bg-1);
  text-align: left;
  transition: all 0.15s;
}
.model:hover { border-color: var(--line-2); }
.model:disabled { opacity: 0.45; cursor: not-allowed; border-color: var(--line-1); }
.model__radio { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line-3); position: relative; }
.model.is-active { border-color: var(--accent-line); background: linear-gradient(180deg, rgba(232, 180, 107, 0.08), transparent); }
.model.is-active .model__radio { border-color: var(--accent); }
.model.is-active .model__radio::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent); }
.model__name { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.model__name b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.model__name span { font-size: 11.5px; color: var(--text-3); }

.ratio-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ratio {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  height: 66px;
  padding: 8px 2px 8px;
  border-radius: 11px;
  border: 1px solid var(--line-1);
  background: var(--bg-1);
  color: var(--text-2);
  font: 500 11px/1 var(--font-mono);
  transition: all 0.15s;
}
.ratio > span { font-family: var(--font-mono); }
.ratio i {
  display: block;
  --base: 26px;
  width: calc(var(--base) * var(--w) / max(var(--w), var(--h)));
  height: calc(var(--base) * var(--h) / max(var(--w), var(--h)));
  border: 1.5px solid currentColor;
  border-radius: 3px;
  opacity: 0.8;
}
.ratio i.ratio__orig { width: 26px; height: 20px; border-style: dashed; }
.ratio i.ratio__custom { width: 24px; height: 18px; border-style: dotted; }
.ratio:hover { color: var(--text-1); border-color: var(--line-2); }
.ratio.is-active { color: var(--accent); border-color: var(--accent-line); background: linear-gradient(180deg, rgba(232, 180, 107, 0.1), rgba(232, 180, 107, 0.02)); }
.ratio.is-active i { opacity: 1; }
.ratio-grid--canvas .ratio span:not(:only-child) { font-family: var(--font-ui); }

.custom-size { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.custom-size .field { flex: 1; }
.custom-size .field span { font: 500 11px var(--font-mono); color: var(--text-3); }
.custom-size .input { height: 32px; }
.custom-size__x, .custom-size__unit { color: var(--text-3); font-size: 12px; }

.fold summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; }
.fold summary::-webkit-details-marker { display: none; }
.fold summary .icon { width: 16px; height: 16px; color: var(--text-3); transition: transform 0.2s; }
.fold[open] summary .icon { transform: rotate(180deg); }
.fold__body { margin-top: 12px; display: flex; flex-direction: column; gap: 12px; }

.recent-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.recent-grid button { aspect-ratio: 1; border-radius: 9px; overflow: hidden; border: 1px solid var(--line-1); }
.recent-grid button img { width: 100%; height: 100%; object-fit: cover; }
.recent-grid button.is-active { border-color: var(--accent); }

.quick { padding: 14px 20px 16px; border-bottom: 1px solid var(--line-1); }
.quick .micro { margin-bottom: 10px; }
.quick__row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.quick__item { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; font-size: 11px; color: var(--text-2); text-align: center; line-height: 1.25; }
.quick__item > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick__item:hover { color: var(--text-1); }
.quick__sw { width: 100%; max-width: 50px; aspect-ratio: 1; border-radius: 12px; border: 1px solid var(--line-2); position: relative; overflow: hidden; transition: transform 0.15s, border-color 0.15s; }
.quick__item:hover .quick__sw { transform: translateY(-2px); border-color: var(--line-3); }
.quick__item.is-active .quick__sw { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.quick__sw::after { content: ""; position: absolute; left: 30%; right: 30%; top: 22%; bottom: 26%; border-radius: 40% 40% 20% 20%; background: var(--subj, #c9c6bf); }
.quick__sw::before { content: ""; position: absolute; left: 22%; right: 22%; bottom: 18%; height: 8%; border-radius: 50%; background: rgba(0, 0, 0, var(--sh, 0)); filter: blur(2px); }
.quick__sw--ecom { background: #fbfaf8; --sh: 0.28; --subj: #9a978f; }
.quick__sw--social { background: linear-gradient(180deg, #e9dccb, #cdb79c); --sh: 0.22; --subj: #6b5d4c; }
.quick__sw--poster { background: radial-gradient(circle at 50% 30%, #3a3d45, #0c0d10 70%); --sh: 0.5; --subj: #d8d4cb; }
.quick__sw--portrait { background: linear-gradient(180deg, #d9cdbf, #b4a593); --subj: #7a5f4b; }
.quick__sw--clear { background-color: #2b2c30; background-image: conic-gradient(#4a4b50 25%, transparent 0 50%, #4a4b50 0 75%, transparent 0); background-size: 10px 10px; --subj: #c9c6bf; }

.look-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.look {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11px;
  color: var(--text-2);
  text-align: center;
  line-height: 1.25;
}
.look__thumb { aspect-ratio: 1; border-radius: 9px; overflow: hidden; border: 1px solid var(--line-1); background: var(--bg-3); transition: border-color 0.15s; }
.look__thumb canvas, .look__thumb img { width: 100%; height: 100%; object-fit: cover; }
.look:hover { color: var(--text-1); }
.look:hover .look__thumb { border-color: var(--line-3); }
.look.is-active { color: var(--accent); }
.look.is-active .look__thumb { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }

.light-rig { display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: 16px; align-items: center; margin-bottom: 8px; }
.dial {
  position: relative;
  width: 136px;
  height: 136px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, var(--bg-2), var(--bg-1) 70%);
  border: 1px solid var(--line-2);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.45), var(--plate-hi);
  touch-action: none;
  cursor: crosshair;
  outline: none;
}
.dial:focus-visible { box-shadow: 0 0 0 3px var(--accent-soft), inset 0 2px 8px rgba(0, 0, 0, 0.45); }
.dial__ring { position: absolute; border-radius: 50%; border: 1px dashed var(--line-2); left: 50%; top: 50%; transform: translate(-50%, -50%); }
.dial__ring--1 { width: 66%; height: 66%; }
.dial__ring--2 { width: 33%; height: 33%; }
.dial__axis { position: absolute; inset: 8px; background: linear-gradient(var(--line-1), var(--line-1)) center / 1px 100% no-repeat, linear-gradient(var(--line-1), var(--line-1)) center / 100% 1px no-repeat; border-radius: 50%; }
.dial__subject { position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: radial-gradient(circle at var(--sx, 35%) var(--sy, 30%), #e9e6df, #6f6d67 70%); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); }
.dial__beam { position: absolute; left: 50%; top: 50%; height: 2px; transform-origin: 0 50%; background: linear-gradient(90deg, rgba(232, 180, 107, 0), rgba(232, 180, 107, 0.65)); border-radius: 2px; pointer-events: none; }
.dial__puck {
  position: absolute;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #fff, #f3d8a6 40%, #d49b48 100%);
  border: 1px solid #9a6d2b;
  box-shadow: 0 0 0 4px rgba(232, 180, 107, 0.18), 0 0 18px rgba(255, 200, 120, 0.7);
  pointer-events: none;
}
.light-rig__read { display: flex; flex-direction: column; gap: 10px; }
.light-rig__read > div { display: flex; flex-direction: column; gap: 3px; }
.light-rig__read b { font: 500 15px var(--font-mono); }
.light-rig__read .hint { margin-top: 0; }
#lightGroup.is-off .sliders { opacity: 0.45; pointer-events: none; }
#lightGroup.is-off .dial__puck { box-shadow: 0 0 0 4px rgba(232, 180, 107, 0.1); }

.color-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; }
.color-grid--gradient { grid-template-columns: repeat(4, 1fr); }
.cswatch { aspect-ratio: 1; border-radius: 9px; border: 1px solid var(--line-2); background: var(--sw); transition: transform 0.12s, box-shadow 0.12s; }
.color-grid--gradient .cswatch { aspect-ratio: 1.4; }
.cswatch:hover { transform: translateY(-1px); }
.cswatch.is-active { box-shadow: 0 0 0 2px var(--bg-2), 0 0 0 3.5px var(--accent); }
.color-field { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 7px 10px 7px 7px; border-radius: 10px; border: 1px solid var(--line-1); background: var(--bg-1); font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.color-field input[type="color"] { -webkit-appearance: none; appearance: none; width: 28px; height: 28px; padding: 0; border: 1px solid var(--line-3); border-radius: 7px; background: none; cursor: pointer; }
.color-field input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.color-field input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 6px; }
.color-field input[type="color"]::-moz-color-swatch { border: 0; border-radius: 6px; }
.color-field code { margin-left: auto; color: var(--text-1); }
.color-field--sm { margin-top: 0; flex: 1; }
.gradient-edit { display: flex; align-items: center; gap: 6px; margin: 12px 0; }
#gradStyle { margin-bottom: 6px; }
.bg-assets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.bg-assets button { aspect-ratio: 1; border-radius: 9px; overflow: hidden; border: 1px solid var(--line-1); }
.bg-assets button img { width: 100%; height: 100%; object-fit: cover; }
.bg-assets button.is-active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }

.ai-card { margin: 14px 16px 18px; padding: 16px; border-radius: 16px; border: 1px solid transparent; background: linear-gradient(var(--bg-1), var(--bg-1)) padding-box, linear-gradient(160deg, rgba(232, 180, 107, 0.55), rgba(255, 255, 255, 0.05) 45%, rgba(158, 177, 198, 0.3)) border-box; display: flex; flex-direction: column; gap: 12px; }
.ai-card__head { display: flex; gap: 12px; align-items: flex-start; }
.ai-card__head .hint { margin-top: 3px; }
.ai-card__icon { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 9px; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line); }
.ai-card__icon .icon { width: 17px; height: 17px; }

.asset-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 16px; }
.asset {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  border: 1px solid var(--line-1);
  background: var(--bg-1);
  overflow: hidden;
  text-align: left;
}
.asset.is-active { border-color: var(--accent); }
.asset__img { aspect-ratio: 1; background-color: #2b2c30; background-image: conic-gradient(#38393e 25%, transparent 0 50%, #38393e 0 75%, transparent 0); background-size: 10px 10px; }
.asset__img img { width: 100%; height: 100%; object-fit: contain; }
.asset__meta { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px 9px; font-size: 11px; color: var(--text-3); }
.asset__meta b { font-size: 12px; font-weight: 500; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset__actions { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity 0.15s; }
.asset:hover .asset__actions, .asset:focus-within .asset__actions { opacity: 1; }
.asset__actions button { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 7px; color: #fff; background: rgba(8, 8, 10, 0.75); }
.asset__actions .icon { width: 14px; height: 14px; }
.empty-mini { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 40px 24px; text-align: center; font-size: 12.5px; color: var(--text-3); }
.empty-mini .icon { width: 28px; height: 28px; }

.tabbar { display: none; }

/* Auth */
.auth { padding: 34px 32px 28px; text-align: center; }
.auth__mark { width: 40px; height: 40px; margin: 0 auto 16px; }
.auth__title { font: 400 22px/1.3 var(--font-display); }
.auth__sub { margin: 8px auto 22px; font-size: 13px; color: var(--text-2); max-width: 30em; }
.auth__google { display: flex; flex-direction: column; align-items: center; gap: 10px; }
#googleGsiContainer:empty { display: none; }
.auth__form { text-align: left; }
.auth-step { display: flex; flex-direction: column; gap: 14px; }
.auth__sent { font-size: 12.5px; color: var(--text-2); text-align: center; }
.auth__sent b { color: var(--text-1); }
.otp { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.otp input {
  width: 100%;
  min-width: 0;
  height: 52px;
  border-radius: 11px;
  border: 1px solid var(--line-2);
  background: var(--bg-1);
  text-align: center;
  font: 500 22px var(--font-mono);
  color: var(--text-1);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}
.otp input:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.auth__resend { align-self: center; }
.auth__foot { margin-top: 18px; font-size: 11.5px; color: var(--text-3); }

/* Export */
.export { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; padding: 20px 28px 24px; }
.export__preview {
  position: relative;
  align-self: start;
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  display: grid;
  place-items: center;
  background-color: #2c2d31;
  background-image: conic-gradient(#3b3c41 25%, transparent 0 50%, #3b3c41 0 75%, transparent 0);
  background-size: 14px 14px;
}
.export__preview canvas { width: 100%; height: 100%; object-fit: contain; }
.export__dims { position: absolute; left: 8px; bottom: 8px; padding: 3px 7px; border-radius: 6px; font: 500 11px var(--font-mono); color: #ecebe6; background: rgba(8, 8, 10, 0.72); }
.export__form { display: flex; flex-direction: column; gap: 16px; }
.export__form .seg { width: 100%; }
#exportCustom { margin-top: 8px; }

/* Batch */
.batch { padding: 18px 28px 22px; display: flex; flex-direction: column; gap: 16px; }
.batch__settings { display: flex; flex-wrap: wrap; gap: 14px 24px; }
.batch__drop { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px; border-radius: 16px; border: 1px dashed var(--line-3); color: var(--text-2); font-size: 13px; transition: border-color 0.2s, background 0.2s; }
.batch__drop .icon { width: 26px; height: 26px; color: var(--accent); }
.batch__drop.is-over { border-color: var(--accent); background: var(--accent-soft); }
.batch__list { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }
.batch__item { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 11px; border: 1px solid var(--line-1); background: var(--bg-1); }
.batch__item img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; }
.batch__item-main { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.batch__item-main b { font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.batch__item-status { font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
.batch__item[data-state="done"] .batch__item-status { color: var(--ok); }
.batch__item[data-state="error"] .batch__item-status { color: var(--danger); }
.batch__item[data-state="working"] .batch__item-status { color: var(--accent); }
.batch__summary { font-size: 12.5px; color: var(--text-2); }

/* Keys */
.keys { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 18px 28px 28px; }
.keys h3 { font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.keys dl div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-1); }
.keys dt { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); }
.keys dd { font-size: 12.5px; color: var(--text-1); text-align: right; }

/* Admin */
.admin { padding: 18px 28px 0; }
.admin__login { max-width: 360px; margin: 10px auto 28px; display: flex; flex-direction: column; gap: 14px; }
.admin__panel { display: flex; flex-direction: column; gap: 18px; }
.admin__pane { min-height: 260px; }
.admin__foot { position: sticky; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 14px 0 20px; background: var(--bg-2); border-top: 1px solid var(--line-1); }
.admin__foot .form-msg { margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.form-grid--1 { grid-template-columns: 1fr; }
.form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .field--wide { grid-column: 1 / -1; }
.table-wrap { max-height: 380px; overflow: auto; border-radius: 12px; border: 1px solid var(--line-1); }
.table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.table th { position: sticky; top: 0; text-align: left; font-weight: 500; color: var(--text-3); padding: 10px 12px; background: var(--bg-3); border-bottom: 1px solid var(--line-1); }
.table td { padding: 8px 12px; border-bottom: 1px solid var(--line-1); white-space: nowrap; }
.table td .input { height: 30px; width: 90px; }
.table td select.input { width: 104px; }

/* Celebrate */
.celebrate { padding: 36px 30px 28px; text-align: center; overflow: hidden; }
.celebrate::before { content: ""; position: absolute; left: 50%; top: -120px; width: 360px; height: 260px; transform: translateX(-50%); background: radial-gradient(circle, rgba(232, 180, 107, 0.35), transparent 70%); pointer-events: none; }
.celebrate__medal {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--chrome);
  border: 1px solid var(--chrome-edge);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 14px 40px -10px rgba(232, 180, 107, 0.6);
  color: var(--accent);
}
.celebrate__medal .icon { width: 30px; height: 30px; stroke-width: 1.8; }
.celebrate .tier-badge { height: 24px; font-size: 11px; padding: 0 10px; }
.celebrate__title { margin-top: 14px; font: 400 24px/1.3 var(--font-display); }
.celebrate__text { margin: 8px auto 20px; font-size: 13.5px; color: var(--text-2); max-width: 30em; }
.celebrate__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 22px; }
.celebrate__stats div { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 13px; border: 1px solid var(--line-1); background: var(--bg-1); }
.celebrate__stats b { font: 500 22px var(--font-mono); }

/* ---------- 6. Responsive ---------- */
@media (max-width: 1280px) {
  :root { --insp-w: 320px; }
}

@media (max-width: 1100px) {
  .site-nav__links { display: none; }
  .site-nav__menu { display: inline-grid; }
  .hero__inner { grid-template-columns: 1fr; }
  .hero__copy { padding-bottom: 0; text-align: left; }
  .hero__figure { justify-self: center; width: min(100%, 560px); margin-top: -10px; }
  .demo__layout { grid-template-columns: 1fr; }
  .demo__side { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .demo__side .btn { grid-column: 1 / -1; justify-self: start; }
  .thumb-tabs { grid-template-columns: repeat(4, 1fr); }
  .demo__note { grid-column: 1 / -1; }
  .feature, .feature--flip { grid-template-columns: 1fr; gap: 32px; }
  .feature--flip .feature__media { order: 0; }
  .flow { grid-template-columns: 1fr; gap: 40px; }
  .console__layout { grid-template-columns: 1fr; gap: 40px; }
  .plans { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
  .plans--compact { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: none; }
}

@media (max-width: 1023px) {
  :root { --rail-w: 64px; --insp-w: 300px; }
  .rail__item { width: 52px; font-size: 10.5px; }
  .ctoolbar__matte .micro, .tool-btn--label span { display: none; }
  .sbar__saved span { display: none; }
}

/* Mobile studio */
@media (max-width: 860px) {
  :root { --sbar-h: 50px; --film-h: 64px; }
  .studio {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: var(--sbar-h) minmax(0, 1fr) auto calc(56px + env(safe-area-inset-bottom));
    grid-template-areas: "sbar" "work" "insp" "tabbar";
  }
  .rail, .ctoolbar { display: none; }
  .workspace { grid-template-rows: minmax(0, 1fr) var(--film-h); }
  .sbar { padding-right: 8px; }
  .sbar__brand { width: 50px; }
  .sbar__name { width: 140px; max-width: 34vw; font-size: 13px; }
  .sbar__saved, .sbar__history { display: none; }
  .sbar__export span { display: none; }
  .sbar__export { width: 34px; padding: 0; }
  .credit-pill__unit { display: none; }
  .stage__float { display: flex; }
  .film-item { width: 52px; height: 44px; }
  .film-add { width: 44px; height: 44px; }
  .film-hint { display: none; }

  .inspector {
    border-left: 0;
    border-top: 1px solid var(--line-2);
    border-radius: 18px 18px 0 0;
    max-height: 44vh;
    max-height: 44dvh;
    box-shadow: 0 -18px 40px -24px rgba(0, 0, 0, 0.8);
    transition: max-height 0.35s var(--ease-out);
  }
  .inspector.is-expanded { max-height: 82vh; max-height: 82dvh; }
  .inspector.is-collapsed .panel__body, .inspector.is-collapsed .panel__tabs, .inspector.is-collapsed .panel__desc { display: none; }
  .inspector__grip { display: grid; place-items: center; height: 18px; flex: none; }
  .inspector__grip span { width: 40px; height: 4px; border-radius: 4px; background: var(--line-3); }
  .panel__head { padding: 2px 16px 10px; }
  .panel__title { font-size: 16px; }
  .panel__desc { font-size: 12px; }
  .panel__tabs { padding: 8px 12px; }
  .pgroup { padding: 14px 16px; }
  .quick { padding: 12px 16px 14px; }
  .quick__row { margin: 0 -16px; padding: 0 16px; }
  .panel__foot { padding: 10px 12px 12px; }
  .panel__note { display: none; }
  .btn--lg.run-btn { height: 44px; }

  .tabbar {
    grid-area: tabbar;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid var(--line-1);
    background: var(--bg-2);
    z-index: 12;
  }
  .tabbar__item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 56px; font-size: 11px; color: var(--text-3); }
  .tabbar__item .icon { width: 21px; height: 21px; }
  .tabbar__item.is-active { color: var(--text-1); }
  .tabbar__item.is-active .icon { color: var(--accent); }

  .popover { left: 8px; right: 8px; top: auto; bottom: calc(64px + env(safe-area-inset-bottom)); width: auto; }
  .next-steps { bottom: 10px; padding-left: 10px; }
  .next-steps .micro { display: none; }
  .empty { padding: 28px 20px 22px; }
  .empty__title { font-size: 20px; }
  .sample-row { gap: 8px; }
  .loupe { width: 140px; height: 140px; margin: -150px 0 0 -70px; }
}

@media (max-width: 760px) {
  .container { padding: 0 20px; }
  .section { padding: 88px 0; }
  .section-head { margin-bottom: 40px; }
  .site-nav__actions .nav-signin { display: none; }
  .site-nav__actions .lang-select { display: none; }
  .hero { padding-top: calc(var(--nav-h) + 24px); }
  .hero__lead { font-size: 15.5px; }
  .hero__modules { grid-template-columns: 1fr; gap: 10px; }
  .anno--edge { left: 4%; top: 8%; }
  .anno--light { left: 58%; }
  .anno em { display: none; }
  .demo__side { grid-template-columns: 1fr; }
  .compare__knob { width: 38px; height: 38px; margin: -19px 0 0 -19px; }
  .feature__title { font-size: 24px; }
  :lang(zh-CN) .feature__title { font-size: 23px; }
  .flow__ring { transform: scale(0.88); margin: -18px auto; }
  .mock__body { grid-template-columns: 44px minmax(0, 1fr); }
  .mock__panel { display: none; }
  .usage { padding: 18px; }
  .usage__list { grid-template-columns: 1fr; }
  .qa summary { font-size: 15px; padding: 18px 2px; }
  .finale { padding: 100px 0 110px; }
  .finale__strip { grid-template-columns: repeat(2, 1fr); }
  .site-footer__meta { align-items: flex-start; }
  .plans--compact { grid-template-columns: 1fr; padding: 0 16px; }

  .modal { padding: 0; place-items: end stretch; }
  .modal__card { max-height: 92vh; max-height: 92dvh; border-radius: 22px 22px 0 0; animation: sheet-in 0.3s var(--ease-out); }
  .modal__card--xs { border-radius: 18px; margin: 16px; width: auto; align-self: center; }
  .modal__head { padding: 22px 20px 0; }
  .export { grid-template-columns: 1fr; padding: 16px 20px 20px; }
  .export__preview { max-width: 220px; justify-self: center; width: 100%; }
  .batch, .keys, .admin { padding-left: 20px; padding-right: 20px; }
  .keys { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .auth { padding: 28px 22px 24px; }
}
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } }

@media (hover: none) {
  .rail__item kbd { display: none; }
  .film-item__del { display: grid; }
  .asset__actions { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
  .grain { display: none; }
}

/* ---------- 7. Refinements ---------- */
.srow__value--edit {
  width: 64px;
  height: 22px;
  padding: 0 6px;
  border-radius: 6px;
  border: 1px solid var(--accent-line);
  background: var(--bg-1);
  color: var(--text-1);
  font: 500 11.5px var(--font-mono);
  text-align: right;
  -moz-appearance: textfield;
}
.srow__value--edit::-webkit-outer-spin-button,
.srow__value--edit::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.srow__value--edit:focus { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.srow__value { cursor: text; }
.srow__value:hover { border-color: var(--line-3); }

.otp.is-shake { animation: shake 0.4s var(--ease); }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

.panel__body.is-empty-asset .quick,
.panel__body.is-empty-asset .tabpane { opacity: 0.45; pointer-events: none; }

.film-item { cursor: pointer; }
.film-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.run-btn__cost.is-free { font-family: var(--font-ui); font-size: 11.5px; letter-spacing: 0.02em; }

.chip-btn.is-busy { pointer-events: none; opacity: 0.7; }

.stage__busy.is-background { display: none; }

body.is-studio .toasts { bottom: calc(var(--film-h) + 16px); }
@media (max-width: 860px) {
  body.is-studio .toasts { bottom: auto; top: calc(var(--sbar-h) + 10px); }
}

.mobile-menu__actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 18px; }
.mobile-menu__actions .lang-select { flex: 1 1 100%; }
.mobile-menu__actions .lang-select__input { height: 40px; font-size: 14px; }
.mobile-menu__actions .btn { flex: 1; height: 42px; }
@media (max-width: 760px) {
  .brand__sub { display: none; }
  .site-nav__actions > .btn--chrome { display: none; }
  .nav-account__credits { display: none; }
  .nav-account { padding: 0 3px; }
  .site-nav__actions { gap: 6px; }
}
@media (hover: none) {
  .film-item:not(.is-active) .film-item__del { display: none; }
}

:root[data-theme="light"] .brand__mark, :root[data-theme="light"] .auth__mark { filter: invert(0.86); }

:root[data-theme="light"] .anno b,
:root[data-theme="light"] .anno em {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(20, 20, 22, 0.08);
}
:root[data-theme="light"] .anno em { color: #3b3a36; }
:root[data-theme="light"] .anno i::before { background: var(--bg-0); border-color: var(--text-3); }
:lang(en) .hero__title, :lang(es) .hero__title { font-size: clamp(40px, 4.9vw, 64px); }

.run-btn > span:not(.run-btn__cost) { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pro-card__text b { flex-wrap: wrap; }

.modal__head--center h2 { justify-content: center; }
.batch__item img.is-cut { object-fit: contain; background-color: #2b2c30; background-image: conic-gradient(#3a3b40 25%, transparent 0 50%, #3a3b40 0 75%, transparent 0); background-size: 8px 8px; }
:root[data-theme="light"] .batch__item img.is-cut { background-color: #f3f2ee; background-image: conic-gradient(#dedcd6 25%, transparent 0 50%, #dedcd6 0 75%, transparent 0); }

/* ---------- 站内公告 (后台发布) ---------- */
.notices {
  position: fixed;
  top: calc(var(--nav-h) + 12px);
  left: 50%;
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(94vw, 620px);
  transform: translateX(-50%);
  pointer-events: none;
}
.notices:empty { display: none; }
body.is-studio .notices { top: calc(var(--sbar-h) + 10px); }
.notice {
  --notice-tone: var(--steel);
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 11px 10px 11px 14px;
  border-radius: 12px;
  background: rgba(20, 21, 25, 0.96);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-2), var(--plate-hi);
  backdrop-filter: blur(10px);
  pointer-events: auto;
  animation: fade-in 0.2s var(--ease);
  overflow: hidden;
}
.notice::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 2px; background: var(--notice-tone); }
.notice--success { --notice-tone: var(--ok); }
.notice--warning { --notice-tone: var(--accent); }
.notice--critical { --notice-tone: var(--danger); border-color: rgba(236, 95, 95, 0.35); }
.notice__icon { flex: none; width: 17px; height: 17px; margin-top: 2px; color: var(--notice-tone); }
.notice__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.notice__title { font-size: 13.5px; font-weight: 600; color: var(--text-1); }
.notice__text { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-2); white-space: pre-line; overflow-wrap: anywhere; }
.notice__link { align-self: flex-start; margin-top: 2px; font-size: 12.5px; color: var(--accent); text-decoration: none; }
.notice__link:hover { text-decoration: underline; }
.notice__x { flex: none; width: 26px; height: 26px; margin: -3px 0 0; }
.notice__x .icon { width: 14px; height: 14px; }
:root[data-theme="light"] .notice { background: rgba(255, 255, 255, 0.97); }
@media (max-width: 860px) {
  .notices { top: calc(var(--nav-h) + 8px); }
  body.is-studio .notices { top: calc(var(--sbar-h) + 6px); }
}

/* ---------- 临时折扣：划掉的原价与折扣标签 ---------- */
.price-was { margin-right: 4px; font-weight: 400; color: var(--text-3); text-decoration-thickness: 1px; }
.run-btn__cost .price-was { color: inherit; opacity: 0.55; }
.promo-tag {
  display: inline-flex;
  align-items: center;
  flex: none;
  height: 18px;
  padding: 0 6px;
  margin-left: 6px;
  border-radius: 999px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
  font: 600 10.5px/1 var(--font-ui);
  letter-spacing: 0.02em;
  white-space: nowrap;
  vertical-align: middle;
}
/* 抠图档位卡：名称在左，折扣标签与积分在右 */
.tier-card__top { gap: 6px; }
.tier-card__top > b { order: -2; margin-right: auto; }
.tier-card__top .promo-tag { order: -1; margin-left: 0; }
.model:has(.promo-tag) { grid-template-columns: 16px minmax(0, 1fr) auto auto; }
.model .promo-tag { margin-left: 0; }
