/* ============ FXQC 飞行汽车 · 总成三维爆炸图 ============ */
:root {
  --bg-0: #04070f;
  --bg-1: #070d1a;
  --panel: rgba(10, 18, 32, 0.72);
  --panel-strong: rgba(10, 18, 32, 0.92);
  --stroke: rgba(120, 190, 255, 0.16);
  --stroke-strong: rgba(120, 200, 255, 0.38);
  --text: #dbe9ff;
  --text-dim: #7d92b3;
  --text-mute: #58698a;
  --accent: #49e0ff;
  --accent-2: #2b7bff;
  --accent-soft: rgba(73, 224, 255, 0.14);
  --warn: #ffb454;
  --radius: 14px;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
  --font: "Inter", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

#app { position: fixed; inset: 0; }

#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

/* ambient background layers */
#app::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(1200px 700px at 22% 8%, rgba(30, 90, 190, 0.20), transparent 62%),
    radial-gradient(1000px 620px at 82% 92%, rgba(0, 190, 220, 0.13), transparent 60%),
    radial-gradient(900px 500px at 50% 50%, rgba(9, 20, 40, 0.0), rgba(2, 4, 9, 0.85) 100%);
  pointer-events: none;
  z-index: 0;
}
#app::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(90, 160, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90, 160, 255, 0.028) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 50% 45%, rgba(0,0,0,0.9), transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 45%, rgba(0,0,0,0.9), transparent 78%);
  pointer-events: none;
  z-index: 1;
}
#scene { z-index: 2; }

/* ============ labels ============ */
.labels-layer { position: absolute; inset: 0; pointer-events: none; z-index: 6; overflow: hidden; }

.part-label {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px 5px 8px;
  border-radius: 999px;
  background: rgba(6, 14, 26, 0.82);
  border: 1px solid var(--stroke-strong);
  backdrop-filter: blur(8px);
  white-space: nowrap;
  font-size: 12px;
  letter-spacing: 0.2px;
  color: #d8ecff;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45), 0 0 18px rgba(73, 224, 255, 0.10);
  transition: opacity 0.18s ease;
  will-change: transform;
}
.part-label .lb-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  flex: 0 0 auto;
}
.part-label .lb-name { font-weight: 600; }
.part-label .lb-meta {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-dim);
  padding-left: 6px;
  border-left: 1px solid rgba(120, 190, 255, 0.22);
}
.part-label.is-selected {
  border-color: rgba(73, 224, 255, 0.85);
  background: rgba(8, 26, 44, 0.92);
  box-shadow: 0 0 26px rgba(73, 224, 255, 0.38), 0 8px 26px rgba(0, 0, 0, 0.5);
}
.part-label.is-selected .lb-dot { background: #a6f4ff; }

/* ============ top bar ============ */
.topbar {
  position: absolute; top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px 0;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }

.brand { display: flex; align-items: center; gap: 13px; }
.brand-mark {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 13px;
  background: linear-gradient(160deg, rgba(20, 44, 80, 0.9), rgba(6, 14, 28, 0.9));
  border: 1px solid var(--stroke-strong);
  box-shadow: 0 0 24px rgba(43, 123, 255, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.brand-text h1 {
  font-size: 16px; font-weight: 700;
  letter-spacing: 0.6px;
  color: #eaf5ff;
  text-shadow: 0 0 22px rgba(73, 224, 255, 0.28);
}
.brand-text h1 .sep { color: var(--accent); opacity: 0.7; margin: 0 3px; font-weight: 400; }
.brand-text p {
  margin-top: 3px;
  font-size: 11px;
  color: var(--text-mute);
  letter-spacing: 1.1px;
}

.topbar-right { display: flex; align-items: center; gap: 14px; }

.view-presets {
  display: flex; gap: 2px;
  padding: 3px;
  border-radius: 11px;
  background: rgba(8, 16, 30, 0.7);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(10px);
}
.chip {
  appearance: none; border: 0; cursor: pointer;
  background: transparent;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 12px;
  padding: 6px 11px;
  border-radius: 8px;
  transition: all 0.18s ease;
}
.chip:hover { color: #eaf5ff; background: rgba(73, 224, 255, 0.09); }
.chip.is-active { color: #041018; background: linear-gradient(180deg, #7ceeff, #34c6e8); font-weight: 600; }

.toggles { display: flex; gap: 8px; }
.icon-btn {
  appearance: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(8, 16, 30, 0.7);
  border: 1px solid var(--stroke);
  color: var(--text-dim);
  font-family: inherit; font-size: 12px;
  backdrop-filter: blur(10px);
  transition: all 0.18s ease;
}
.icon-btn:hover { color: #eaf5ff; border-color: var(--stroke-strong); background: rgba(16, 32, 56, 0.85); }
.icon-btn[aria-pressed="true"] {
  color: #041018;
  background: linear-gradient(180deg, #7ceeff, #34c6e8);
  border-color: transparent;
  box-shadow: 0 0 20px rgba(73, 224, 255, 0.4);
}
.icon-btn span { font-size: 11.5px; }

/* ============ panels ============ */
.panel {
  position: absolute;
  z-index: 9;
  width: 306px;
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  backdrop-filter: blur(18px) saturate(120%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.panel-left { left: 22px; top: 92px; bottom: 92px; }
.panel-right {
  right: 22px; top: 92px;
  max-height: calc(100vh - 200px);
  transform: translateX(calc(100% + 30px));
  opacity: 0;
  pointer-events: none;
  transition: transform 0.34s cubic-bezier(.22,.9,.24,1), opacity 0.28s ease;
}
.panel-right.is-open { transform: none; opacity: 1; pointer-events: auto; }

.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(24, 48, 86, 0.35), transparent);
}
.panel-head h2 {
  font-size: 13px; font-weight: 600; letter-spacing: 1.2px;
  color: #cfe6ff; text-transform: none;
}
.panel-head .count {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(73, 224, 255, 0.25);
  border-radius: 20px;
}
.collapse-btn {
  appearance: none; cursor: pointer;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 7px;
  background: transparent; border: 1px solid transparent;
  color: var(--text-mute);
  transition: all 0.18s ease;
}
.collapse-btn:hover { color: #eaf5ff; background: rgba(73, 224, 255, 0.1); border-color: var(--stroke); }

.panel-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* search */
.search-wrap { position: relative; padding: 12px 14px 8px; }
.search-icon { position: absolute; left: 25px; top: 50%; transform: translateY(-40%); color: var(--text-mute); pointer-events: none; }
#searchInput {
  width: 100%;
  padding: 9px 12px 9px 32px;
  border-radius: 9px;
  background: rgba(4, 10, 20, 0.75);
  border: 1px solid var(--stroke);
  color: var(--text);
  font-family: inherit; font-size: 12.5px;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}
#searchInput::placeholder { color: var(--text-mute); }
#searchInput:focus { border-color: rgba(73, 224, 255, 0.5); box-shadow: 0 0 0 3px rgba(73, 224, 255, 0.1); }
#searchInput::-webkit-search-cancel-button { filter: invert(0.6); }

/* category chips */
.cat-filters { display: flex; flex-wrap: wrap; gap: 5px; padding: 4px 14px 10px; }
.cat-chip {
  appearance: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-family: inherit;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--stroke);
  transition: all 0.16s ease;
}
.cat-chip:hover { color: #eaf5ff; border-color: var(--stroke-strong); }
.cat-chip.is-active { color: #041018; font-weight: 600; }
.cat-chip .sw { width: 7px; height: 7px; border-radius: 2px; }

/* parts list */
.parts-scroll { flex: 1; overflow-y: auto; padding: 2px 8px 12px; scrollbar-width: thin; }
.parts-scroll::-webkit-scrollbar { width: 7px; }
.parts-scroll::-webkit-scrollbar-thumb { background: rgba(110, 170, 240, 0.22); border-radius: 10px; }
.parts-scroll::-webkit-scrollbar-thumb:hover { background: rgba(110, 170, 240, 0.4); }

.part-group-title {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 8px 5px;
  font-size: 10.5px; letter-spacing: 1.4px;
  color: var(--text-mute);
  font-family: var(--mono);
}
.part-group-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--stroke), transparent); }

.part-row {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 9px;
  border-radius: 9px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, transform 0.12s;
}
.part-row:hover { background: rgba(73, 224, 255, 0.07); border-color: rgba(73, 224, 255, 0.16); }
.part-row.is-active {
  background: linear-gradient(90deg, rgba(73, 224, 255, 0.16), rgba(43, 123, 255, 0.06));
  border-color: rgba(73, 224, 255, 0.45);
  box-shadow: inset 3px 0 0 var(--accent);
}
.part-row .swatch { width: 8px; height: 8px; border-radius: 2px; flex: 0 0 auto; box-shadow: 0 0 8px currentColor; }
.part-row .pr-name {
  flex: 1; min-width: 0;
  font-size: 12.5px;
  color: #cfe2fa;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.part-row .pr-qty {
  font-family: var(--mono); font-size: 10.5px;
  color: var(--text-mute);
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.045);
}
.part-row.is-active .pr-name { color: #eafaff; font-weight: 600; }
.part-row.is-active .pr-qty { color: var(--accent); background: rgba(73, 224, 255, 0.12); }
.empty-tip { padding: 22px 10px; text-align: center; font-size: 12px; color: var(--text-mute); }

/* ============ detail ============ */
.detail-empty {
  padding: 40px 22px; text-align: center;
  color: var(--text-mute);
}
.detail-empty svg { color: rgba(120, 190, 255, 0.5); margin-bottom: 12px; }
.detail-empty p { font-size: 12px; line-height: 1.9; }

.detail-head { padding: 16px 16px 12px; border-bottom: 1px solid var(--stroke); }
.detail-cat {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 20px;
  font-size: 10.5px; letter-spacing: 0.4px;
  margin-bottom: 9px;
}
.detail-cat .dot { width: 6px; height: 6px; border-radius: 50%; }
.detail-name {
  font-size: 19px; font-weight: 700; line-height: 1.3;
  color: #f0f8ff;
  word-break: break-word;
  text-shadow: 0 0 24px rgba(73, 224, 255, 0.2);
}
.detail-role { margin-top: 5px; font-size: 12px; color: var(--text-dim); }
.detail-desc {
  margin: 12px 16px 0;
  padding: 11px 12px;
  font-size: 12px; line-height: 1.75;
  color: #a9c1de;
  background: rgba(73, 224, 255, 0.045);
  border-left: 2px solid rgba(73, 224, 255, 0.5);
  border-radius: 0 8px 8px 0;
}

.spec-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 14px 16px 0;
  background: var(--stroke);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  overflow: hidden;
}
.spec {
  padding: 9px 11px;
  background: rgba(6, 13, 24, 0.86);
}
.spec .k { font-size: 10px; letter-spacing: 0.8px; color: var(--text-mute); }
.spec .v { margin-top: 3px; font-family: var(--mono); font-size: 12.5px; color: #d6ecff; }
.spec .v small { font-size: 10px; color: var(--text-dim); margin-left: 2px; }
.spec.full { grid-column: span 2; }

.detail-actions { display: flex; gap: 8px; padding: 14px 16px 16px; }
.btn-primary, .btn-ghost {
  flex: 1;
  appearance: none; cursor: pointer;
  padding: 9px 12px;
  border-radius: 9px;
  font-family: inherit; font-size: 12px; font-weight: 600;
  transition: all 0.18s ease;
}
.btn-primary {
  color: #04131c;
  background: linear-gradient(180deg, #7ceeff, #34c6e8);
  border: 1px solid transparent;
  box-shadow: 0 6px 20px rgba(73, 224, 255, 0.28);
}
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-ghost {
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--stroke);
}
.btn-ghost:hover { color: #eaf5ff; border-color: var(--stroke-strong); }

/* ============ mode switch ============ */
.mode-dock {
  position: absolute;
  left: 50%; bottom: 26px;
  transform: translateX(-50%);
  z-index: 11;
  display: flex; align-items: center; gap: 10px;
}

.mode-switch {
  position: relative;
  display: flex; align-items: center;
  padding: 5px;
  border-radius: 14px;
  background: rgba(7, 14, 26, 0.82);
  border: 1px solid var(--stroke-strong);
  backdrop-filter: blur(20px);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: background 0.6s ease, border-color 0.6s ease, box-shadow 0.6s ease;
}
.mode-btn {
  position: relative;
  appearance: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-dim);
  font-family: inherit; font-size: 13px; font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.22s ease;
  z-index: 1;
  white-space: nowrap;
}
.mode-btn .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: currentColor; opacity: 0.55;
  transition: all 0.22s ease;
}
.mode-btn:hover { color: #cfe6ff; }
.mode-btn.is-active {
  color: #04131c;
  background: linear-gradient(180deg, #7ceeff, #34c6e8);
  box-shadow: 0 8px 24px rgba(73, 224, 255, 0.35);
}
.mode-btn.is-active .dot { background: #04131c; opacity: 1; box-shadow: 0 0 8px rgba(4, 19, 28, 0.6); }

/* 天空模式下切换器配色变暖 */
body.is-sky .mode-switch {
  background: rgba(12, 26, 44, 0.72);
  border-color: rgba(255, 214, 150, 0.32);
  box-shadow: 0 16px 44px rgba(0, 20, 50, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
body.is-sky .mode-btn.is-active {
  background: linear-gradient(180deg, #ffe3a8, #ffbf5e);
  box-shadow: 0 8px 24px rgba(255, 191, 94, 0.35);
}

/* 爆炸形态按钮稍小，作为次级开关 */
.explode-switch { padding: 4px; }
.explode-switch .mode-btn {
  padding: 8px 15px;
  font-size: 12px;
  font-weight: 500;
}
.explode-switch .mode-btn.is-active {
  background: rgba(73, 224, 255, 0.16);
  color: #bff4ff;
  border-color: rgba(73, 224, 255, 0.45);
  box-shadow: none;
}
.explode-switch .mode-btn.is-active .dot { background: #7ceeff; box-shadow: 0 0 10px #7ceeff; }
body.is-sky .explode-switch .mode-btn.is-active {
  background: rgba(255, 191, 94, 0.16);
  color: #ffe7bc;
  border-color: rgba(255, 191, 94, 0.5);
}
body.is-sky .explode-switch .mode-btn.is-active .dot { background: #ffd08a; box-shadow: 0 0 10px #ffd08a; }

/* ============ hint bar ============ */
.hintbar {
  position: absolute;
  left: 24px; bottom: 30px;
  z-index: 9;
  display: flex; flex-wrap: wrap; gap: 14px;
  font-size: 11.5px;
  color: var(--text-mute);
  max-width: 40vw;
}
.hintbar span { display: inline-flex; align-items: center; gap: 6px; }
.hintbar kbd {
  font-family: var(--mono);
  font-size: 10.5px;
  padding: 2px 6px;
  border-radius: 5px;
  color: #a9c9ea;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--stroke);
}

/* ============ help fab ============ */
.help-fab {
  position: absolute;
  right: 24px; bottom: 30px;
  z-index: 11;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 12px;
  cursor: pointer;
  color: var(--text-dim);
  background: rgba(7, 14, 26, 0.8);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(14px);
  transition: all 0.18s ease;
}
.help-fab:hover { color: var(--accent); border-color: var(--stroke-strong); box-shadow: 0 0 22px rgba(73, 224, 255, 0.22); }

/* ============ loader ============ */
.loader {
  position: absolute; inset: 0; z-index: 50;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 45%, rgba(8, 20, 38, 0.96), rgba(2, 5, 11, 0.99));
  transition: opacity 0.6s ease, visibility 0.6s;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader-inner { text-align: center; width: 320px; }
.loader-ring { display: flex; justify-content: center; gap: 9px; margin-bottom: 22px; }
.loader-ring span {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent);
  animation: pulse 1.15s ease-in-out infinite;
}
.loader-ring span:nth-child(2) { animation-delay: 0.16s; background: #6fb6ff; box-shadow: 0 0 14px #6fb6ff; }
.loader-ring span:nth-child(3) { animation-delay: 0.32s; background: #2b7bff; box-shadow: 0 0 14px #2b7bff; }
@keyframes pulse { 0%, 100% { transform: translateY(0); opacity: 0.45; } 50% { transform: translateY(-8px); opacity: 1; } }
.loader h2 { font-size: 15px; font-weight: 600; letter-spacing: 2px; color: #d6ecff; }
.progress {
  margin: 16px auto 10px; width: 100%; height: 3px;
  border-radius: 4px; background: rgba(255, 255, 255, 0.07); overflow: hidden;
}
.progress-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #2b7bff, #7ceeff);
  box-shadow: 0 0 12px rgba(73, 224, 255, 0.8);
  transition: width 0.25s ease;
}
.loader-status { font-family: var(--mono); font-size: 11px; color: var(--text-mute); letter-spacing: 0.6px; }

/* ============ guide ============ */
.guide-overlay {
  position: absolute; inset: 0; z-index: 60;
  display: grid; place-items: center;
  background: rgba(2, 6, 12, 0.72);
  backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}
.guide-overlay.is-open { opacity: 1; visibility: visible; }
.guide-card {
  position: relative;
  width: min(560px, calc(100vw - 48px));
  padding: 30px 32px 28px;
  border-radius: 20px;
  background: linear-gradient(165deg, rgba(14, 28, 50, 0.98), rgba(6, 12, 22, 0.98));
  border: 1px solid var(--stroke-strong);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translateY(10px) scale(0.985);
  transition: transform 0.34s cubic-bezier(.22,.9,.24,1);
}
.guide-overlay.is-open .guide-card { transform: none; }
.guide-close {
  position: absolute; top: 14px; right: 16px;
  width: 30px; height: 30px;
  border: 0; border-radius: 8px;
  background: transparent; color: var(--text-mute);
  font-size: 22px; line-height: 1; cursor: pointer;
  transition: all 0.18s;
}
.guide-close:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.guide-kicker {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 3.2px;
  color: var(--accent); opacity: 0.85; margin-bottom: 8px;
}
.guide-card h2 { font-size: 22px; font-weight: 700; color: #f2f9ff; margin-bottom: 20px; }
.guide-list { list-style: none; display: flex; flex-direction: column; gap: 15px; }
.guide-list li { display: flex; gap: 13px; align-items: flex-start; }
.guide-list i {
  flex: 0 0 auto;
  width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center;
  border: 1px solid var(--stroke-strong);
  background: rgba(73, 224, 255, 0.08);
  position: relative;
}
.guide-list i::after {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 12px var(--accent);
}
.guide-list i.g2::after { border-radius: 2px; background: #6fb6ff; box-shadow: 0 0 12px #6fb6ff; }
.guide-list i.g3::after { border-radius: 2px 6px 2px 6px; background: #b388ff; box-shadow: 0 0 12px #b388ff; }
.guide-list i.g4::after { border-radius: 1px; background: #4ade80; box-shadow: 0 0 12px #4ade80; }
.guide-list strong { display: block; font-size: 13.5px; color: #e8f4ff; margin-bottom: 3px; }
.guide-list span { font-size: 12.5px; line-height: 1.7; color: #93aacb; }
.guide-start {
  margin-top: 24px; width: 100%;
  padding: 12px;
  border: 1px solid transparent; border-radius: 11px;
  cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 700; letter-spacing: 1px;
  color: #04131c;
  background: linear-gradient(180deg, #7ceeff, #34c6e8);
  box-shadow: 0 10px 30px rgba(73, 224, 255, 0.3);
  transition: all 0.2s;
}
.guide-start:hover { filter: brightness(1.07); transform: translateY(-1px); }

/* ============ responsive ============ */
@media (max-width: 1180px) {
  .panel-left { width: 268px; }
  .hintbar { max-width: 34vw; font-size: 11px; }
}
@media (max-width: 900px) {
  .topbar { padding: 12px 14px 0; flex-wrap: wrap; gap: 10px; }
  .brand-text p { display: none; }
  .view-presets { display: none; }
  .panel-left { top: 74px; bottom: 150px; left: 12px; width: 232px; }
  .panel-right { right: 12px; top: 74px; width: 258px; }
  .hintbar { display: none; }
  .mode-switch { bottom: 18px; }
  .mode-btn { padding: 9px 15px; font-size: 12px; }
  .help-fab { bottom: 18px; right: 14px; width: 38px; height: 38px; }
}

.panel-left.is-collapsed { width: 54px; }
.panel-left.is-collapsed .panel-body,
.panel-left.is-collapsed h2 { display: none; }

/* ============ sky theme (transitions) ============ */
body, .panel, .topbar, .mode-switch, .hintbar, .icon-btn, .chip {
  transition: background-color 0.9s ease, border-color 0.9s ease, box-shadow 0.9s ease, color 0.6s ease;
}
body.is-sky .panel {
  background: rgba(10, 22, 38, 0.72);
  border-color: rgba(190, 220, 255, 0.22);
  box-shadow: 0 18px 48px rgba(0, 30, 70, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
body.is-sky .panel-head {
  background: linear-gradient(180deg, rgba(160, 200, 240, 0.16), transparent);
}
body.is-sky .brand-text h1 { color: #ffffff; text-shadow: 0 0 24px rgba(255, 224, 160, 0.35); }
body.is-sky .brand-text p { color: #a8c4dd; }
body.is-sky .hintbar { color: #b9d2e8; }
body.is-sky .hintbar kbd { color: #e8f4ff; background: rgba(255, 255, 255, 0.12); border-color: rgba(255,255,255,0.18); }
body.is-sky .search-wrap input { background: rgba(4, 16, 30, 0.6); }

/* 转场提示条 */
.scene-tip {
  position: absolute;
  left: 50%; top: 84px;
  transform: translateX(-50%) translateY(-8px);
  z-index: 12;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 12.5px;
  letter-spacing: 2px;
  color: #d8f2ff;
  background: rgba(8, 20, 36, 0.78);
  border: 1px solid rgba(120, 200, 255, 0.35);
  backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
  white-space: nowrap;
}
.scene-tip.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }
body.is-sky .scene-tip {
  color: #fff4de;
  border-color: rgba(255, 210, 140, 0.45);
  background: rgba(16, 34, 54, 0.78);
}

@media (max-width: 900px) {
  .mode-dock { bottom: 16px; gap: 6px; flex-direction: column; }
  .mode-btn { padding: 8px 13px; font-size: 12px; }
  .explode-switch .mode-btn { padding: 6px 11px; font-size: 11px; }
  .scene-tip { top: 70px; font-size: 11px; }
}
/* ============ 转场闪光 ============ */
.transition-flash {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.55);
  background: radial-gradient(circle at 50% 58%, rgba(180,240,255,0.6), rgba(73,224,255,0) 62%);
  mix-blend-mode: screen;
}
.transition-flash.is-on { animation: flashSweep 1.5s cubic-bezier(.22,.8,.3,1) forwards; }
@keyframes flashSweep {
  0%   { opacity: 0;    transform: scale(0.5); }
  22%  { opacity: 0.62; transform: scale(1.0); }
  100% { opacity: 0;    transform: scale(1.85); }
}

/* 天空模式文字可读性 */
body.is-sky .hintbar { color: #1b3a55; }
body.is-sky .hintbar kbd { color: #0f2a42; background: rgba(255,255,255,0.85); border-color: rgba(30,65,100,0.25); }
body.is-sky .help-fab { color: #24425e; background: rgba(255,255,255,0.6); border-color: rgba(40,80,120,0.2); }
body.is-sky .brand-text h1 { color: #0d2740; text-shadow: 0 1px 14px rgba(255,255,255,0.6); }
body.is-sky .brand-text p { color: #3c5b78; }
body.is-sky .brand-mark { background: rgba(255,255,255,0.75); border-color: rgba(40,80,120,0.2); }
body.is-sky .chip, body.is-sky .icon-btn {
  background: rgba(255,255,255,0.86);
  border-color: rgba(30,65,100,0.24);
  color: #17364f;
  box-shadow: 0 4px 14px rgba(20,50,90,0.10);
}
body.is-sky .icon-btn:hover, body.is-sky .chip:hover { background: #ffffff; color: #0b2438; }
body.is-sky .icon-btn[aria-pressed="true"] {
  color: #3a2400;
  background: linear-gradient(180deg, #ffe3a8, #ffbf5e);
}
body.is-sky .view-presets { background: rgba(255,255,255,0.8); border-color: rgba(30,65,100,0.2); }
body.is-sky .chip.is-active { color: #3a2400; background: linear-gradient(180deg, #ffe3a8, #ffbf5e); }
body.is-sky .scene-tip { color: #17364f; background: rgba(255,255,255,0.9); border-color: rgba(30,65,100,0.2); }
/* ============ 天空模式暗角 ============ */
.vignette {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s ease;
  background: radial-gradient(ellipse at 50% 46%, rgba(0,0,0,0) 42%, rgba(12,38,66,0.22) 78%, rgba(8,26,48,0.38) 100%);
}
body.is-sky .vignette { opacity: 1; }
body.is-sky .brand-text p { color: #22425e; }
/* 播放速度 */
.speed-btn {
  appearance: none; cursor: pointer;
  width: 42px; height: 42px;
  border-radius: 12px;
  font-family: var(--mono);
  font-size: 11.5px; font-weight: 600;
  color: var(--text-dim);
  background: rgba(7, 14, 26, 0.82);
  border: 1px solid var(--stroke-strong);
  backdrop-filter: blur(14px);
  transition: all 0.2s ease;
}
.speed-btn:hover { color: #eaf5ff; border-color: rgba(120,200,255,0.6); }
body.is-sky .speed-btn {
  color: #17364f;
  background: rgba(255,255,255,0.86);
  border-color: rgba(30,65,100,0.24);
}
/* ============ 移动端适配 ============ */
.mobile-only { display: none; }

@media (max-width: 860px) {
  .mobile-only { display: inline-flex; }

  .topbar { padding: 10px 12px 0; gap: 8px; flex-wrap: nowrap; align-items: center; }
  .brand { gap: 8px; min-width: 0; }
  .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
  .brand-text h1 { font-size: 13.5px; letter-spacing: 0.2px; white-space: nowrap; }
  .brand-text p { display: none; }
  .topbar-right { gap: 6px; }
  .view-presets { display: none; }
  .toggles { gap: 4px; }
  .icon-btn { padding: 7px 8px; font-size: 11px; }
  .icon-btn span { display: none; }
  .icon-btn#btnMobileParts span { display: inline; font-size: 11px; }

  /* 清单：默认隐藏，按钮唤出为浮层 */
  .panel-left {
    left: 10px; right: 10px; width: auto;
    top: 64px; bottom: auto; max-height: 52vh;
    transform: translateY(-12px) scale(0.98);
    opacity: 0; pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
  }
  body.mobile-parts .panel-left { opacity: 1; transform: none; pointer-events: auto; }
  .panel-left.is-collapsed { width: auto; }

  /* 详情：底部抽屉 */
  .panel-right {
    left: 10px; right: 10px; width: auto;
    top: auto; bottom: 92px; max-height: 46vh;
    transform: translateY(14px); opacity: 0;
  }
  .panel-right.is-open { transform: none; opacity: 1; }

  /* 底部开关：单行紧凑 */
  .mode-dock { bottom: 12px; left: 50%; gap: 5px; align-items: center; }
  .mode-switch { padding: 4px; border-radius: 12px; }
  .mode-btn { padding: 8px 11px; font-size: 11.5px; gap: 5px; letter-spacing: 0; }
  .mode-btn .dot { width: 6px; height: 6px; }
  .explode-switch .mode-btn { padding: 7px 9px; font-size: 11px; }
  .speed-btn { width: 34px; height: 34px; font-size: 10.5px; border-radius: 10px; }

  .hintbar { display: none; }
  .help-fab { right: 14px; bottom: 74px; width: 38px; height: 38px; }
  .scene-tip { top: 84px; font-size: 11px; padding: 6px 12px; }

  .guide-card { padding: 22px 20px 20px; }
  .guide-card h2 { font-size: 18px; margin-bottom: 14px; }
  .guide-list { gap: 11px; }
  .guide-list span { font-size: 11.5px; }
  .detail-name { font-size: 16px; }
  .spec .v { font-size: 11.5px; }
}
@media (max-width: 860px) {
  /* 移动端：单行开关，隐藏速度按钮 */
  .speed-btn { display: none; }
  .mode-dock { flex-wrap: nowrap; gap: 6px; }
  .mode-btn { padding: 7px 10px; font-size: 11px; }
  .explode-switch .mode-btn { padding: 6px 8px; font-size: 10.5px; }
}
@media (max-width: 480px) {
  #btnFull { display: none; }
  #btnReset { display: none; }
  .brand-text h1 { font-size: 12.5px; }
  .icon-btn { padding: 6px 7px; }
}