/* ============================================================
   OLOBAY · FEAIA 拆解实验室 — 夜色标本室
   品牌继承 Olobay 门户（深紫夜幕 / 橙 / 鎏金 / 珊瑚粉）
   标本自体色：奶油白 / 酒红缎 / 鎏金 / 颊粉 / 焦糖
   ============================================================ */
:root {
  --site-bg: #120C1E;
  --site-fg: #E8EDF2;
  --site-accent: #FF6B35;
  --site-on-accent: #1A0E08;
  --site-surface: rgba(255, 255, 255, 0.045);
  --site-muted: #8899AA;
  --site-border: rgba(255, 255, 255, 0.09);
  --site-font: 'Plus Jakarta Sans', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --site-radius: 16px;
  --site-space: 1;
  --site-type: 1;
  --site-motion: 1;

  --bg2: #0D0818;
  --gold: #FFD166;
  --gold-deep: #C9A227;
  --coral: #FF4D7E;
  --plum: #B8A9C9;
  --info: #60A5FA;
  --ok: #7DD3A0;
  --warn: #FFD166;
  --danger: #FF4D7E;

  --sp-cream: #EFE7DC;
  --sp-blush: #F5B8A3;
  --sp-burg: #AA4053;
  --sp-burg-deep: #5E1F2C;
  --sp-caramel: #CBA581;

  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --pad: calc(24px * var(--site-space, 1));
  --gap: calc(12px * var(--site-space, 1));
  --dur: calc(180ms * var(--site-motion, 1));
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --spot: 0.85;
  --ring: 0 0 0 1px var(--site-border);
  --glow-accent: 0 0 0 1px rgba(255, 107, 53, 0.28);
}

[data-theme="burgundy"] {
  --site-bg: #1C0A10;
  --bg2: #14060B;
  --site-surface: rgba(255, 235, 225, 0.05);
  --site-border: rgba(255, 214, 190, 0.12);
  --site-muted: #B79A94;
  --site-accent: #E4576B;
  --site-on-accent: #24070C;
  --gold: #F0C465;
}
[data-theme="porcelain"] {
  --site-bg: #F4EDE4;
  --bg2: #EAE0D2;
  --site-fg: #2B1B22;
  --site-surface: rgba(60, 25, 35, 0.05);
  --site-border: rgba(60, 25, 35, 0.14);
  --site-muted: #7C6A66;
  --site-accent: #C2492F;
  --site-on-accent: #FFF6EC;
  --gold: #A97E1F;
  --gold-deep: #8A612B;
  --coral: #D64560;
  --plum: #7C6A8A;
  --info: #3E6FB0;
  --ok: #3E8E63;
  --warn: #A97E1F;
  --danger: #C23A52;
  --sp-cream: #6B5648;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--site-bg);
  color: var(--site-fg);
  font-family: var(--site-font);
  font-size: calc(15px * var(--site-type, 1));
  line-height: 1.55;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { display: block; }
::selection { background: rgba(255, 107, 53, 0.35); }

/* 滚动条 —— 标本室自己的语言 */
* { scrollbar-width: thin; scrollbar-color: var(--gold-deep) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--gold-deep), var(--sp-burg));
  border-radius: 8px;
  border: 2px solid var(--site-bg);
}
*::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ============================================================
   顶栏
   ============================================================ */
.topbar {
  display: flex; align-items: center; gap: var(--gap);
  padding: 0 var(--pad);
  height: calc(56px * var(--site-space, 1));
  background: color-mix(in srgb, var(--site-bg) 78%, transparent);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--site-border);
  position: relative; z-index: 40;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.02em; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--site-accent), var(--gold));
  display: grid; place-items: center;
  color: var(--site-on-accent); font-size: 15px;
  box-shadow: 0 0 16px rgba(255, 107, 53, 0.35);
}
.brand small { display: block; font-size: 0.66rem; font-weight: 600; color: var(--site-muted); letter-spacing: 0.14em; }
.lab-title {
  font-size: calc(17px * var(--site-type, 1)); font-weight: 800; letter-spacing: -0.03em;
  padding-left: var(--gap); border-left: 1px solid var(--site-border);
  white-space: nowrap;
}
.lab-title em { font-style: normal; color: var(--gold); }
.spec-no {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em;
  color: var(--sp-burg); background: rgba(170, 64, 83, 0.14);
  border: 1px solid rgba(170, 64, 83, 0.4);
  padding: 3px 10px; border-radius: 100px;
}
[data-theme="porcelain"] .spec-no { color: var(--sp-burg-deep); }
.demo-chip {
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em;
  color: var(--site-muted); border: 1px dashed var(--site-border);
  padding: 3px 10px; border-radius: 100px;
}
.topbar .spacer { flex: 1; }
.icon-btn {
  height: 36px; min-width: 36px; padding: 0 12px;
  border-radius: 100px;
  background: var(--site-surface);
  box-shadow: var(--ring);
  font-size: 0.78rem; font-weight: 700;
  display: inline-flex; align-items: center; gap: 6px;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur);
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.1); transform: translateY(-1px); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn.on { box-shadow: var(--glow-accent); color: var(--site-accent); }
.icon-btn .led { width: 7px; height: 7px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 8px var(--danger); }
.icon-btn.on .led { background: var(--ok); box-shadow: 0 0 8px var(--ok); }

/* ============================================================
   主区：舞台 + 控制台
   ============================================================ */
.main { display: grid; grid-template-columns: 1fr 372px; min-height: 0; }
.stage {
  position: relative; overflow: hidden; min-height: 0;
  background:
    radial-gradient(120% 90% at 50% 108%, color-mix(in srgb, var(--sp-burg) 26%, transparent) 0%, transparent 55%),
    radial-gradient(90% 70% at 50% -10%, color-mix(in srgb, var(--plum) 14%, transparent) 0%, transparent 60%),
    linear-gradient(180deg, var(--site-bg), var(--bg2));
  cursor: grab;
}
.stage.dragging { cursor: grabbing; }
.stage::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(46% 42% at 50% 34%, rgba(255, 244, 224, calc(0.16 * var(--spot))) 0%, rgba(255, 214, 160, calc(0.07 * var(--spot))) 45%, transparent 72%);
  transition: opacity var(--dur) var(--ease);
}
.stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(130% 100% at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.42) 100%);
}
[data-theme="porcelain"] .stage::after { background: radial-gradient(130% 100% at 50% 50%, transparent 60%, rgba(90, 60, 50, 0.18) 100%); }
.stage.lights-off::before { opacity: 0; }
#dust { position: absolute; inset: 0; pointer-events: none; z-index: 3; }

.stage-hud {
  position: absolute; top: var(--gap); left: var(--pad); z-index: 6;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em;
  color: var(--site-muted); display: grid; gap: 4px; pointer-events: none;
}
.stage-hud b { color: var(--gold); font-weight: 600; }
.stage-hint {
  position: absolute; bottom: var(--gap); left: 50%; transform: translateX(-50%);
  z-index: 6; font-size: 0.7rem; color: var(--site-muted);
  background: color-mix(in srgb, var(--site-bg) 70%, transparent);
  border: 1px solid var(--site-border); border-radius: 100px;
  padding: 5px 14px; pointer-events: none; white-space: nowrap;
  backdrop-filter: blur(8px);
}

/* 3D 场景 */
.scene-wrap {
  position: absolute; inset: 0; display: grid; place-items: center;
  perspective: 1500px; perspective-origin: 50% 42%;
  z-index: 2;
}
.scene {
  position: relative; height: 80%; aspect-ratio: 1080 / 1920;
  transform-style: preserve-3d;
  will-change: transform;
}
.scene.lights-off { filter: brightness(0.32) saturate(0.55); }
.part {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  will-change: transform;
  pointer-events: none;
}
.part .cut {
  position: absolute; inset: 0;
  clip-path: var(--cut);
  -webkit-clip-path: var(--cut);
}
.part img {
  width: 100%; height: 100%;
  clip-path: var(--clip);
  -webkit-clip-path: var(--clip);
  transition: filter var(--dur) var(--ease), opacity var(--dur) var(--ease);
  pointer-events: none;
}
.part .hit {
  position: absolute; inset: 0;
  clip-path: var(--clip);
  -webkit-clip-path: var(--clip);
  cursor: pointer;
  pointer-events: auto;
}
.part .hit:focus-visible { outline: 2px solid var(--gold); outline-offset: -4px; }
.part:hover img, .part.hl img { filter: brightness(1.14) drop-shadow(0 0 14px rgba(255, 209, 102, 0.35)); }
.part.sel img { filter: brightness(1.1) drop-shadow(0 0 22px rgba(255, 209, 102, 0.55)); }
.scene.has-sel .part:not(.sel) img { opacity: 0.34; }
.scene.ghost .part img { opacity: 0.38; filter: saturate(0.5) brightness(1.2); }
.scene.ghost .part.sel img { opacity: 0.9; filter: saturate(0.9) drop-shadow(0 0 18px rgba(255, 209, 102, 0.5)); }

/* 签注：脱离组件的舞台两侧悬浮标签 + 引线 */
#leads {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 4; pointer-events: none; overflow: visible;
}
#leads line {
  stroke: color-mix(in srgb, var(--gold) 62%, transparent);
  stroke-width: 1; stroke-dasharray: 3 4;
}
#leads circle { fill: var(--gold); filter: drop-shadow(0 0 5px var(--gold)); }
#callouts { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.callout {
  position: absolute; pointer-events: auto; cursor: pointer;
  opacity: 0; transition: opacity var(--dur) var(--ease);
}
.callout.show { opacity: 1; }
.callout.side-L { left: 10px; }
.callout.side-R { right: 10px; }
.callout .chip {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.06em;
  color: var(--site-fg);
  background: color-mix(in srgb, var(--site-bg) 82%, transparent);
  border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
  border-radius: 100px; padding: 3px 9px 3px 7px;
  white-space: nowrap; backdrop-filter: blur(6px);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.callout .chip i { font-style: normal; color: var(--gold); }
.callout:hover .chip, .callout.sel .chip {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--gold) 35%, transparent), 0 0 14px rgba(255, 209, 102, 0.25);
}

/* 地面：阴影 + 3D 展台环 + 网格 */
.floor-shadow {
  position: absolute; left: 50%; bottom: 6%;
  width: 46%; height: 7%;
  transform: translateX(-50%);
  background: radial-gradient(50% 50% at 50% 50%, rgba(0, 0, 0, 0.5), transparent 70%);
  filter: blur(6px); z-index: 1; pointer-events: none;
}
[data-theme="porcelain"] .floor-shadow { background: radial-gradient(50% 50% at 50% 50%, rgba(90, 60, 50, 0.35), transparent 70%); }
.pedestal {
  position: absolute; left: 50%; bottom: 4%;
  width: 62%; aspect-ratio: 1 / 0.36;
  transform: translateX(-50%) rotateX(72deg);
  border-radius: 50%;
  border: 1px dashed color-mix(in srgb, var(--gold) 50%, transparent);
  background:
    repeating-linear-gradient(0deg, color-mix(in srgb, var(--gold) 12%, transparent) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(90deg, color-mix(in srgb, var(--gold) 12%, transparent) 0 1px, transparent 1px 24px),
    radial-gradient(50% 50% at 50% 50%, color-mix(in srgb, var(--sp-burg) 22%, transparent), transparent 70%);
  -webkit-mask-image: radial-gradient(50% 50% at 50% 50%, #000 30%, transparent 72%);
  mask-image: radial-gradient(50% 50% at 50% 50%, #000 30%, transparent 72%);
  z-index: 1; pointer-events: none;
}

/* 部件详情浮卡 */
.detail {
  position: absolute; left: var(--pad); bottom: var(--pad); z-index: 8;
  width: min(320px, 70%);
  background: color-mix(in srgb, var(--site-bg) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent);
  border-radius: var(--site-radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  backdrop-filter: blur(14px);
  padding: calc(14px * var(--site-space, 1));
  display: none;
}
.detail.show { display: block; animation: rise calc(240ms * var(--site-motion, 1)) var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.detail h3 { font-size: calc(16px * var(--site-type, 1)); letter-spacing: -0.02em; display: flex; align-items: baseline; gap: 8px; }
.detail h3 span { font-family: var(--mono); font-size: 0.62rem; color: var(--gold); letter-spacing: 0.1em; }
.detail .mat { font-size: 0.74rem; color: var(--sp-blush); margin: 4px 0 6px; font-weight: 700; }
[data-theme="porcelain"] .detail .mat { color: var(--sp-burg); }
.detail p { font-size: 0.76rem; color: var(--site-muted); }
.detail .row { display: flex; gap: 8px; margin-top: 10px; }

/* ============================================================
   控制台
   ============================================================ */
.panel {
  border-left: 1px solid var(--site-border);
  background: color-mix(in srgb, var(--bg2) 82%, var(--site-bg));
  display: flex; flex-direction: column; min-height: 0;
  position: relative; z-index: 10;
}
.tabs { display: flex; gap: 4px; padding: var(--gap) var(--gap) 0; }
.tabs button {
  flex: 1; padding: 8px 4px; border-radius: 100px;
  font-size: 0.76rem; font-weight: 700; color: var(--site-muted);
  transition: color var(--dur), background var(--dur);
}
.tabs button.on { color: var(--site-on-accent); background: linear-gradient(135deg, var(--site-accent), var(--gold)); }
.mode-row { display: flex; align-items: center; justify-content: space-between; padding: var(--gap) var(--gap) 0; }
.mode-row .lbl { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.12em; color: var(--site-muted); }
.seg { display: flex; background: var(--site-surface); border-radius: 100px; padding: 3px; box-shadow: var(--ring); }
.seg button { padding: 4px 12px; border-radius: 100px; font-size: 0.7rem; font-weight: 700; color: var(--site-muted); }
.seg button.on { background: var(--site-fg); color: var(--site-bg); }
.panel-body { overflow-y: auto; padding: var(--gap); display: grid; gap: var(--gap); align-content: start; }
.tab-page { display: none; gap: var(--gap); }
.tab-page.on { display: grid; }

.card {
  background: var(--site-surface);
  border-radius: var(--site-radius);
  box-shadow: var(--ring);
  padding: calc(14px * var(--site-space, 1));
  display: grid; gap: 10px;
}
.card > h4 {
  font-family: var(--mono); font-size: 0.64rem; font-weight: 600;
  letter-spacing: 0.16em; color: var(--gold);
  display: flex; align-items: center; gap: 8px;
}
.card > h4::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, color-mix(in srgb, var(--gold) 40%, transparent), transparent); }

.big-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn {
  border-radius: 100px; padding: 10px 14px;
  font-size: 0.8rem; font-weight: 800; letter-spacing: -0.01em;
  background: var(--site-surface); box-shadow: var(--ring);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur), background var(--dur);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn:hover { transform: translateY(-1px); background: rgba(255, 255, 255, 0.1); }
.btn:active { transform: scale(0.95); }
.btn.primary { background: linear-gradient(135deg, var(--site-accent), #FF9A5C); color: var(--site-on-accent); box-shadow: 0 4px 18px rgba(255, 107, 53, 0.3); }
.btn.gold { background: linear-gradient(135deg, var(--gold), var(--gold-deep)); color: #241505; box-shadow: 0 4px 18px rgba(255, 209, 102, 0.25); }
.btn.velvet { background: linear-gradient(135deg, var(--sp-burg), var(--sp-burg-deep)); color: #FFE9E2; box-shadow: 0 4px 18px rgba(170, 64, 83, 0.3); }
.btn.wide { grid-column: 1 / -1; }
.btn.sm { padding: 6px 12px; font-size: 0.72rem; }

.ctl { display: grid; gap: 5px; }
.ctl .head { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.74rem; font-weight: 700; }
.ctl .head output { font-family: var(--mono); font-size: 0.66rem; color: var(--gold); }
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 22px; background: transparent; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--site-accent), var(--gold));
  box-shadow: 0 0 0 1px var(--site-border);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px;
  border-radius: 50%; background: var(--site-fg);
  border: 3px solid var(--site-accent);
  box-shadow: 0 0 10px rgba(255, 107, 53, 0.5);
  transition: transform var(--dur) var(--ease);
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.2); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--site-accent), var(--gold)); }
input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--site-fg); border: 3px solid var(--site-accent); }

.switch-row { display: flex; align-items: center; justify-content: space-between; font-size: 0.76rem; font-weight: 700; }
.switch { position: relative; width: 40px; height: 22px; border-radius: 100px; background: var(--site-surface); box-shadow: var(--ring); transition: background var(--dur); flex: none; }
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--site-muted);
  transition: transform var(--dur) var(--ease), background var(--dur);
}
.switch.on { background: color-mix(in srgb, var(--site-accent) 40%, transparent); }
.switch.on::after { transform: translateX(18px); background: var(--gold); box-shadow: 0 0 8px var(--gold); }

select {
  width: 100%; padding: 8px 12px;
  background: var(--site-surface); color: var(--site-fg);
  border: 1px solid var(--site-border); border-radius: calc(var(--site-radius) * 0.6);
  font-family: inherit; font-size: 0.76rem; font-weight: 600;
  outline: none; cursor: pointer;
}
select:focus { border-color: var(--site-accent); box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.18); }
option { background: var(--site-bg); color: var(--site-fg); }
.ctl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.adv { display: none; gap: var(--gap); }
body.pro .adv { display: grid; }

/* 部件清单 */
.parts-list { display: grid; gap: 6px; }
.prow {
  display: grid; grid-template-columns: 26px 1fr auto auto; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: calc(var(--site-radius) * 0.7);
  background: var(--site-surface); box-shadow: var(--ring);
  cursor: pointer; transition: box-shadow var(--dur), transform var(--dur) var(--ease);
  text-align: left; font-size: 0.76rem; font-weight: 700;
}
.prow:hover { transform: translateX(2px); }
.prow.sel { box-shadow: var(--glow-accent); }
.prow .idx { font-family: var(--mono); font-size: 0.62rem; color: var(--gold); }
.prow .st { font-family: var(--mono); font-size: 0.6rem; padding: 2px 8px; border-radius: 100px; }
.prow .st.in { color: var(--ok); background: rgba(125, 211, 160, 0.12); }
.prow .st.out { color: var(--danger); background: rgba(255, 77, 126, 0.12); }
.prow .act { font-size: 0.66rem; font-weight: 800; color: var(--site-accent); padding: 4px 8px; border-radius: 100px; background: rgba(255, 107, 53, 0.12); }

/* 标本档案 */
.swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.swatch { display: grid; gap: 4px; justify-items: center; font-family: var(--mono); font-size: 0.56rem; color: var(--site-muted); }
.swatch i { width: 100%; aspect-ratio: 1; border-radius: 10px; box-shadow: var(--ring); }
.archive p { font-size: 0.76rem; color: var(--site-muted); }
.archive p b { color: var(--site-fg); }
.archive .kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 0.74rem; }
.archive .kv span { color: var(--site-muted); }
.archive .kv b { font-family: var(--mono); font-weight: 600; color: var(--gold); }

/* ============================================================
   底部步骤运输条
   ============================================================ */
.stepbar {
  display: flex; align-items: center; gap: var(--gap);
  padding: 0 var(--pad);
  height: calc(64px * var(--site-space, 1));
  border-top: 1px solid var(--site-border);
  background: color-mix(in srgb, var(--site-bg) 86%, transparent);
  backdrop-filter: blur(14px);
  position: relative; z-index: 30;
}
.progress-ring { position: relative; width: 44px; height: 44px; flex: none; }
.progress-ring svg { transform: rotate(-90deg); }
.progress-ring .bgc { stroke: var(--site-border); }
.progress-ring .fgc { stroke: url(#pgrad); stroke-linecap: round; transition: stroke-dashoffset calc(300ms * var(--site-motion, 1)) var(--ease); }
.progress-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--mono); font-size: 0.6rem; color: var(--gold); }
.step-dots { display: flex; gap: 5px; }
.step-dots i {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--site-surface); box-shadow: var(--ring);
  transition: background var(--dur), box-shadow var(--dur), transform var(--dur);
}
.step-dots i.done { background: var(--gold); box-shadow: 0 0 8px rgba(255, 209, 102, 0.6); }
.step-dots i.cur { background: var(--site-accent); transform: scale(1.35); box-shadow: 0 0 10px rgba(255, 107, 53, 0.7); }
.step-cap { flex: 1; min-width: 0; }
.step-cap b { display: block; font-size: 0.82rem; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step-cap span { font-size: 0.68rem; color: var(--site-muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.transport { display: flex; gap: 6px; }

/* ============================================================
   覆盖层：指南 / 完成
   ============================================================ */
.overlay {
  position: fixed; inset: 0; z-index: 90;
  display: none; place-items: center;
  background: rgba(8, 4, 14, 0.62);
  backdrop-filter: blur(10px);
}
.overlay.show { display: grid; }
.sheet {
  width: min(560px, calc(100vw - 48px));
  max-height: calc(100vh - 96px); overflow-y: auto;
  background: linear-gradient(160deg, color-mix(in srgb, var(--site-bg) 92%, var(--sp-burg)), var(--bg2));
  border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent);
  border-radius: calc(var(--site-radius) * 1.25);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  padding: calc(28px * var(--site-space, 1));
  animation: rise calc(280ms * var(--site-motion, 1)) var(--ease);
}
.sheet .kicker { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.22em; color: var(--gold); }
.sheet h2 { font-size: calc(28px * var(--site-type, 1)); letter-spacing: -0.04em; margin: 6px 0 10px; }
.sheet p.lead { color: var(--site-muted); font-size: 0.86rem; }
.guide-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; }
.guide-grid div {
  background: var(--site-surface); box-shadow: var(--ring);
  border-radius: var(--site-radius); padding: 12px 14px;
  font-size: 0.76rem; color: var(--site-muted);
}
.guide-grid b { display: block; color: var(--site-fg); font-size: 0.8rem; margin-bottom: 3px; }
.guide-grid kbd {
  font-family: var(--mono); font-size: 0.62rem; color: var(--gold);
  border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent);
  border-radius: 5px; padding: 1px 5px;
}
.sheet .row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
.done-stats { display: flex; gap: 10px; margin: 16px 0; }
.done-stats div { flex: 1; text-align: center; background: var(--site-surface); box-shadow: var(--ring); border-radius: var(--site-radius); padding: 12px 6px; }
.done-stats b { display: block; font-family: var(--mono); font-size: calc(22px * var(--site-type, 1)); color: var(--gold); }
.done-stats span { font-size: 0.66rem; color: var(--site-muted); }

/* 响应式 */
@media (max-width: 1280px) { .demo-chip { display: none; } }
@media (max-width: 1024px) { .spec-no { display: none; } }
@media (max-width: 1100px) {
  .main { grid-template-columns: 1fr; }
  .panel {
    position: fixed; right: 0; top: 56px; bottom: 64px; width: min(372px, 92vw);
    transform: translateX(102%); transition: transform calc(260ms * var(--site-motion, 1)) var(--ease);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.5);
  }
  body.panel-open .panel { transform: none; }
  #panelToggle { display: inline-flex; }
  .lab-title { display: none; }
}
@media (min-width: 1101px) { #panelToggle { display: none; } }
@media (max-width: 720px) {
  .demo-chip, .spec-no { display: none; }
  .step-cap span { display: none; }
  .guide-grid { grid-template-columns: 1fr; }
  .callout .chip { font-size: 0.55rem; padding: 2px 6px 2px 5px; gap: 4px; }
  .callout.side-L { left: 6px; }
  .callout.side-R { right: 6px; }
  .topbar { gap: 6px; padding: 0 10px; }
  .brand { gap: 6px; font-size: 0.8rem; }
  .brand small { display: none; }
  .icon-btn { font-size: 0.6rem; padding: 5px 8px; }
  .stepbar { gap: 8px; padding: 0 10px; }
  .stage-hud span:last-child { display: none; }
  .step-dots { gap: 3px; }
  .step-dots i { width: 7px; height: 7px; }
  .step-cap b { font-size: 0.7rem; }
  .transport { gap: 4px; }
  .transport .btn { font-size: 0.62rem; padding: 6px 8px; }
}
@media (max-width: 480px) {
  .step-dots { display: none; }
  .brand .mark { width: 26px; height: 26px; font-size: 13px; }
  .stage-hint { font-size: 0.6rem; padding: 4px 10px; max-width: 92%; white-space: normal; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
