/* GHOSTCLICK GC-01 — a moonorb case
   Tokens · Base · Loader · Top · Views · Configurator · Rail · Overlays · Lab · Mobile · Motion */

@font-face { font-family: "Archivo"; src: url("../fonts/archivo-latin-standard-normal.woff2") format("woff2-variations");
  font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Archivo"; src: url("../fonts/archivo-latin-ext-standard-normal.woff2") format("woff2-variations");
  font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --void: #000000;
  --glass: rgba(10, 11, 13, 0.58);
  --glass-hi: rgba(255, 255, 255, 0.06);
  --edge: rgba(236, 234, 228, 0.12);
  --edge-hi: rgba(236, 234, 228, 0.32);
  --bone: #eceae4;
  --ash: #8a8d94;
  --moon: #ffe100;                 /* moonorb house accent – case badge only */
  --lumen: #7fe3ff;                /* driven by the mouse's RGB light */
  --lumen-ink: #001017;
  --lumen-soft: color-mix(in srgb, var(--lumen) 22%, transparent);

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --pad: clamp(16px, 2.6vw, 44px);
  --top-h: 72px;
  --cfg-w: 384px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--void); color: var(--bone);
  font-family: var(--font); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow: hidden; overscroll-behavior: none;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--lumen); color: var(--lumen-ink); }
:focus-visible { outline: 1.5px solid var(--lumen); outline-offset: 3px; border-radius: 4px; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; touch-action: none; outline: none; }
#labfx { position: fixed; inset: 0; width: 100vw; height: 100dvh; pointer-events: none; opacity: 0; transition: opacity .6s; }
body[data-mode="lab"] #labfx { opacity: 1; }
#leaders { position: fixed; inset: 0; width: 100vw; height: 100dvh; pointer-events: none; overflow: visible; }

/* ---------- Loader: the ghost draws itself, then the eclipse takes over */
.loader {
  position: fixed; inset: 0; z-index: 50; display: grid; place-content: center; justify-items: center; gap: 28px;
  background: var(--void); transition: opacity 1.1s var(--ease) .1s, visibility 0s linear 1.3s;
}
.loader-mark { width: 74px; height: auto; aspect-ratio: 460 / 615; fill: transparent; stroke: var(--bone); stroke-width: 3; }
.loader-mark use { stroke-dasharray: 1600; stroke-dashoffset: 1600; animation: draw 2.4s var(--ease-io) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.loader-meta { display: flex; gap: 18px; font-size: 13px; color: var(--ash); }
.loader-meta .mono { color: var(--bone); min-width: 4ch; }
.loader-bar { width: 180px; height: 1px; background: var(--edge); overflow: hidden; }
.loader-bar i { display: block; height: 100%; width: 100%; background: var(--bone); transform: scaleX(0); transform-origin: left; transition: transform .3s; }
html:not(.is-loading) .loader { opacity: 0; visibility: hidden; }

/* ---------- Top bar */
.top {
  position: fixed; inset: 0 0 auto; z-index: 10; height: var(--top-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
  padding: 0 var(--pad);
  background: linear-gradient(#000c, #0000);
}
.brand { display: inline-flex; align-items: center; gap: 12px; justify-self: start; }
.brand-mark { width: 22px; height: 30px; fill: var(--bone); transition: fill .4s; }
.brand-word { width: 88px; height: 29px; fill: var(--bone); }
.brand-model { font-family: var(--mono); font-size: 11px; color: var(--ash); border-left: 1px solid var(--edge-hi); padding-left: 12px; }
.brand:hover .brand-mark { fill: var(--lumen); }

.modes { position: relative; display: flex; gap: 4px; padding: 4px; border: 1px solid var(--edge); border-radius: 999px; background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.modes button {
  position: relative; z-index: 1; height: 34px; padding: 0 16px; border-radius: 999px;
  font-size: 13px; font-weight: 500; color: var(--ash); transition: color .3s; white-space: nowrap;
}
.modes button:hover { color: var(--bone); }
.modes button[aria-current="true"] { color: var(--lumen-ink); }
.modes-ink { position: absolute; z-index: 0; top: 4px; height: 34px; left: 0; width: 0; border-radius: 999px; background: var(--lumen);
  box-shadow: 0 0 24px var(--lumen-soft); transition: transform .55s var(--ease), width .55s var(--ease), background-color .4s; }

.tools { justify-self: end; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--edge); background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: border-color .3s, background-color .3s, color .3s;
}
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover { border-color: var(--lumen); color: var(--lumen); }
#btnSound .i-mute { display: none; }
#btnSound[aria-pressed="false"] .i-wave { display: none; }
#btnSound[aria-pressed="false"] .i-mute { display: inline; }
.lang-btn span { font-family: var(--mono); font-size: 11px; }
.case-link {
  display: inline-flex; align-items: center; gap: 10px; height: 38px; padding: 0 16px 0 12px; margin-left: 6px;
  border: 1px solid var(--edge); border-radius: 999px; font-size: 12px; color: var(--ash); transition: color .3s, border-color .3s;
}
.case-link:hover { color: var(--bone); border-color: var(--moon); }
.case-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--moon); box-shadow: -5px 0 0 -1px var(--void) inset; position: relative; }
.case-dot::before { content: ""; position: absolute; inset: 0 0 0 -6px; border-radius: 50%; border: 1px solid var(--bone); opacity: .7; width: 14px; }

/* ---------- Buttons */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 26px; border-radius: 999px; font-size: 14px; font-weight: 600; letter-spacing: .005em;
  overflow: hidden; isolation: isolate; transition: color .35s, border-color .35s, box-shadow .5s, transform .5s var(--ease);
}
.btn::after { /* sweep */
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: radial-gradient(120px 120px at var(--mx, 50%) var(--my, 50%), #ffffff55, transparent 70%);
  opacity: 0; transition: opacity .3s;
}
.btn:hover::after { opacity: 1; }
.btn:active { transform: scale(.97); }
.btn-lumen { background: var(--lumen); color: var(--lumen-ink); box-shadow: 0 0 0 0 var(--lumen-soft), 0 10px 40px -12px var(--lumen); }
.btn-lumen:hover { box-shadow: 0 0 0 6px var(--lumen-soft), 0 18px 50px -12px var(--lumen); }
.btn-line { border: 1px solid var(--edge-hi); color: var(--bone); background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.btn-line:hover { border-color: var(--bone); }
.chip {
  height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--edge); font-size: 13px; color: var(--ash);
  background: var(--glass); transition: color .25s, border-color .25s, background-color .25s;
}
.chip:hover { color: var(--bone); border-color: var(--edge-hi); }
.chip[aria-pressed="true"] { color: var(--lumen-ink); background: var(--lumen); border-color: var(--lumen); }

/* ---------- Views */
.view {
  position: fixed; z-index: 5; left: var(--pad); bottom: 132px; width: min(640px, 44vw);
  opacity: 0; visibility: hidden; transform: translateY(14px);
  transition: opacity .6s var(--ease), transform .8s var(--ease), visibility 0s linear .6s;
}
body[data-mode="showroom"] .view-showroom,
body[data-mode="anatomy"] .view-anatomy,
body[data-mode="lab"] .view-lab { opacity: 1; visibility: visible; transform: none; transition-delay: .25s, .25s, 0s; }

.hero-h, .view-h {
  margin: 0; font-weight: 760; font-stretch: 112%; letter-spacing: -0.025em; line-height: .94;
  font-size: clamp(40px, 4.3vw, 80px); text-wrap: balance;
}
.view-h { font-size: clamp(32px, 3.4vw, 60px); }
.hero-h { text-shadow: 0 2px 40px #000; }
.hero-p, .view-p { margin: 22px 0 0; max-width: 42ch; color: #c9c8c2; font-size: 16px; line-height: 1.55; }
.hero-ctas { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.hint { margin: 22px 0 0; font-size: 12px; color: var(--ash); }

/* ---------- Hotspots */
.hotspots, .labels { position: fixed; inset: 0; pointer-events: none; z-index: 4; }
.hs {
  position: absolute; left: 0; top: 0; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%;
  pointer-events: auto; display: grid; place-items: center; opacity: 0; transition: opacity .5s;
}
.hs::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--bone); box-shadow: 0 0 0 1px #0006; transition: background-color .3s, transform .4s var(--ease); }
.hs::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--bone); opacity: .6; animation: ping 2.6s var(--ease) infinite; }
.hs:hover::before, .hs.is-on::before { background: var(--lumen); transform: scale(1.25); }
@keyframes ping { 0% { transform: scale(.45); opacity: .9; } 80%, 100% { transform: scale(1.3); opacity: 0; } }
body[data-mode="showroom"].is-ready .hs.is-front { opacity: 1; }
body:not([data-mode="showroom"]) .hs { pointer-events: none; visibility: hidden; }
.hs-label {
  position: absolute; left: 24px; top: 50%; transform: translate(-6px, -50%); white-space: nowrap;
  font-size: 12px; font-weight: 600; opacity: 0; transition: opacity .3s, transform .4s var(--ease); pointer-events: none;
  text-shadow: 0 1px 8px #000;
}
.hs:hover .hs-label { opacity: 1; transform: translate(0, -50%); }
.hs.is-on .hs-label { opacity: 0; }
.hs-card {
  position: fixed; z-index: 6; width: 260px; padding: 16px 18px; border-radius: 14px;
  background: var(--glass); border: 1px solid var(--edge); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  pointer-events: none; animation: rise .5s var(--ease);
}
.hs-card b { display: block; font-size: 14px; color: var(--lumen); }
.hs-card p { margin: 6px 0 0; font-size: 13px; color: #c9c8c2; line-height: 1.45; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Anatomy labels */
.alabel {
  position: absolute; left: 0; top: 0; pointer-events: auto; cursor: pointer;
  display: grid; gap: 1px; padding: 6px 10px; border-radius: 8px; white-space: nowrap;
  transition: opacity .4s, background-color .25s; opacity: 0;
}
.alabel .n { font-size: 13px; font-weight: 600; }
.alabel .s { font-family: var(--mono); font-size: 11px; color: var(--ash); }
.alabel.is-r { text-align: left; }
.alabel.is-l { text-align: right; }
.alabel:hover, .alabel.is-on { background: var(--glass-hi); }
.alabel:hover .n, .alabel.is-on .n { color: var(--lumen); }
body[data-mode="anatomy"].labels-on .alabel { opacity: 1; }
body[data-mode="anatomy"].labels-on .alabel.is-dim { opacity: .28; }
#leaders path { fill: none; stroke: var(--edge-hi); stroke-width: 1; transition: stroke .3s, opacity .4s; opacity: 0; }
#leaders circle { fill: var(--bone); opacity: 0; transition: opacity .4s; }
body[data-mode="anatomy"].labels-on #leaders path, body[data-mode="anatomy"].labels-on #leaders circle { opacity: 1; }
#leaders path.is-on { stroke: var(--lumen); }
#leaders .is-dim { opacity: .2 !important; }
.ana-ctrl { margin-top: 28px; display: grid; gap: 16px; max-width: 360px; }
.toggles { display: flex; gap: 8px; flex-wrap: wrap; }
.part-card {
  position: fixed; z-index: 6; right: var(--pad); bottom: 132px; width: 300px; padding: 20px 22px; border-radius: 16px;
  background: var(--glass); border: 1px solid var(--edge); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  display: grid; gap: 4px; animation: rise .5s var(--ease);
}
.pc-name { font-size: 22px; font-weight: 720; font-stretch: 112%; letter-spacing: -0.01em; }
.pc-spec { color: var(--lumen); }
.part-card p { margin: 8px 0 0; font-size: 14px; color: #c9c8c2; }
body:not([data-mode="anatomy"]) .part-card { display: none; }

/* ---------- Range / segmented / small controls */
.slider-row { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; font-size: 13px; color: var(--ash); }
.slider-row output { color: var(--bone); }
.slider-row .range { grid-column: 1 / -1; }
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; cursor: pointer; }
.range::-webkit-slider-runnable-track { height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--lumen) var(--p, 50%), var(--edge-hi) var(--p, 50%)); }
.range::-moz-range-track { height: 2px; background: var(--edge-hi); }
.range::-moz-range-progress { height: 2px; background: var(--lumen); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -7px; border-radius: 50%; background: var(--bone); border: 4px solid var(--void); box-shadow: 0 0 0 1px var(--bone); transition: transform .2s; }
.range::-moz-range-thumb { width: 10px; height: 10px; border-radius: 50%; background: var(--bone); border: 4px solid var(--void); box-shadow: 0 0 0 1px var(--bone); }
.range:active::-webkit-slider-thumb { transform: scale(1.2); }
.range-hue::-webkit-slider-runnable-track { height: 8px; border-radius: 8px; background: linear-gradient(90deg, hsl(0 90% 60%), hsl(60 90% 60%), hsl(120 90% 60%), hsl(180 90% 60%), hsl(240 90% 65%), hsl(300 90% 60%), hsl(360 90% 60%)); }
.range-hue::-webkit-slider-thumb { margin-top: -4px; }
.range-hue::-moz-range-track { height: 8px; border-radius: 8px; background: linear-gradient(90deg, hsl(0 90% 60%), hsl(60 90% 60%), hsl(120 90% 60%), hsl(180 90% 60%), hsl(240 90% 65%), hsl(300 90% 60%), hsl(360 90% 60%)); }
.range-hue::-moz-range-progress { background: transparent; }

.seg { display: flex; padding: 3px; gap: 2px; border: 1px solid var(--edge); border-radius: 999px; background: #0006; }
.seg button { flex: 1; height: 30px; padding: 0 10px; border-radius: 999px; font-size: 12px; color: var(--ash); transition: color .25s, background-color .25s; white-space: nowrap; }
.seg button:hover { color: var(--bone); }
.seg button[aria-checked="true"] { background: var(--bone); color: var(--void); }
.seg-sm button { height: 26px; font-size: 11.5px; padding: 0 9px; }
.check { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--ash); cursor: pointer; }
.check input { -webkit-appearance: none; appearance: none; width: 30px; height: 18px; border-radius: 99px; border: 1px solid var(--edge-hi); position: relative; cursor: pointer; transition: background-color .25s, border-color .25s; flex: none; }
.check input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--bone); transition: transform .3s var(--ease); }
.check input:checked { background: var(--lumen); border-color: var(--lumen); }
.check input:checked::after { transform: translateX(12px); background: var(--lumen-ink); }

/* ---------- Configurator panel */
.cfg {
  position: fixed; z-index: 7; top: calc(var(--top-h) + 8px); right: var(--pad); bottom: 112px; width: var(--cfg-w);
  border: 1px solid var(--edge); border-radius: 20px; background: var(--glass);
  backdrop-filter: blur(22px) saturate(1.2); -webkit-backdrop-filter: blur(22px) saturate(1.2);
  opacity: 0; visibility: hidden; transform: translateX(24px);
  transition: opacity .5s var(--ease), transform .7s var(--ease), visibility 0s linear .5s;
  overflow: hidden;
}
body[data-mode="configure"] .cfg { opacity: 1; visibility: visible; transform: none; transition-delay: .15s, .15s, 0s; }
.cfg-scroll { height: 100%; overflow-y: auto; padding: 8px 22px 28px; scrollbar-width: thin; scrollbar-color: var(--edge-hi) transparent; }
.cfg-sec { padding: 20px 0 22px; border-bottom: 1px solid var(--edge); display: grid; gap: 14px; }
.cfg-sec:last-child { border-bottom: 0; }
.cfg-sec h3 { margin: 0; font-size: 13px; font-weight: 650; font-stretch: 112%; letter-spacing: .01em; color: var(--bone); }
.sec-note { margin: -8px 0 0; font-size: 12px; color: var(--ash); }
.sub-h { font-size: 12px; color: var(--ash); margin-top: 4px; }

.editions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ed {
  position: relative; display: grid; gap: 8px; padding: 10px; border-radius: 12px; border: 1px solid var(--edge);
  text-align: left; background: #0005; transition: border-color .25s, background-color .25s;
}
.ed:hover { border-color: var(--edge-hi); }
.ed[aria-pressed="true"] { border-color: var(--lumen); background: var(--glass-hi); }
.ed-chips { display: flex; height: 22px; border-radius: 6px; overflow: hidden; }
.ed-chips i { flex: 1; }
.ed-chips i:last-child { flex: .45; }
.ed-n { font-size: 12.5px; font-weight: 600; }

.zones { display: flex; flex-wrap: wrap; gap: 6px; }
.zones button { height: 30px; padding: 0 10px 0 6px; display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; border: 1px solid var(--edge); font-size: 12px; color: var(--ash); transition: border-color .2s, color .2s; }
.zones button i { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px #fff3; }
.zones button[aria-selected="true"] { color: var(--bone); border-color: var(--bone); }
.swatches { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; }
.sw {
  aspect-ratio: 1; border-radius: 50%; position: relative;
  box-shadow: inset 0 0 0 1px #ffffff26, inset -4px -6px 10px #0006, inset 3px 4px 8px #ffffff1c;
  transition: transform .3s var(--ease);
}
.sw:hover { transform: scale(1.12); }
.sw[aria-pressed="true"]::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1.5px solid var(--bone); }
.sw-custom { background: conic-gradient(from 90deg, #f55, #fd5, #5f8, #5df, #85f, #f5d, #f55); overflow: hidden; }
.sw-custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }

.finishes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fin {
  display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center;
  padding: 10px; border-radius: 12px; border: 1px solid var(--edge); text-align: left; background: #0005; transition: border-color .25s, background-color .25s;
}
.fin:hover { border-color: var(--edge-hi); }
.fin[aria-pressed="true"] { border-color: var(--lumen); background: var(--glass-hi); }
.fin-ball { grid-row: 1 / 3; width: 34px; height: 34px; border-radius: 50%; }
.fin-n { font-size: 12.5px; font-weight: 600; display: flex; justify-content: space-between; align-items: baseline; gap: 4px; line-height: 1.25; }
.fin-n em { white-space: nowrap; font-style: normal; font-family: var(--mono); font-size: 10.5px; color: var(--ash); font-weight: 400; }
.fin-d { font-size: 11px; color: var(--ash); line-height: 1.3; }
.fb-matte { background: radial-gradient(circle at 35% 30%, #4a4b50, #141518 70%); }
.fb-satin { background: radial-gradient(circle at 35% 30%, #6c6d74 0, #26272c 40%, #0f1012 75%); }
.fb-gloss { background: radial-gradient(circle at 34% 28%, #fff 0 6%, #3a3b40 12%, #0a0a0c 70%), #000; }
.fb-anodized { background: radial-gradient(circle at 35% 30%, #d9dbe0 0, #7b7e86 35%, #2e3036 70%); }
.fb-aurora { background: radial-gradient(circle at 35% 30%, #fff 0 5%, transparent 14%), conic-gradient(from 200deg, #ffb7e6, #b9c9ff, #a8ffe8, #fff2b0, #ffb7e6); }
.fb-ghost { background: radial-gradient(circle at 34% 28%, #fff 0 5%, transparent 12%), radial-gradient(circle at 60% 70%, #9fb3c855, #0b0e12 70%); box-shadow: inset 0 0 0 1px #ffffff40; }

.light-swatches { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; }
.light-swatches .sw { box-shadow: 0 0 14px -2px currentColor, inset 0 0 0 1px #ffffff40; }
.hue-row { display: block; }

.hw-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--ash); }
.stepper { display: flex; align-items: center; border: 1px solid var(--edge); border-radius: 999px; height: 32px; }
.stepper button { width: 32px; height: 30px; border-radius: 999px; font-size: 16px; color: var(--bone); }
.stepper button:hover { color: var(--lumen); }
.stepper output { min-width: 64px; text-align: center; color: var(--bone); }
.engrave { display: flex; gap: 8px; }
.engrave input {
  flex: 1; min-width: 0; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--edge-hi); background: #0006;
  font-family: var(--mono); font-size: 13px; letter-spacing: .06em; outline: none; transition: border-color .25s;
}
.engrave input:focus { border-color: var(--lumen); }
.engrave .chip { height: 38px; white-space: nowrap; }

/* ---------- Rail (bottom) */
.rail {
  position: fixed; z-index: 8; left: var(--pad); right: var(--pad); bottom: 28px; height: 64px;
  display: flex; align-items: center; justify-content: space-between; pointer-events: none;
}
.rail > * { pointer-events: auto; }
.specs { margin: 0; display: flex; gap: clamp(18px, 3vw, 48px); transition: opacity .5s, transform .6s var(--ease); }
.specs div { display: grid; gap: 2px; }
.specs dt { font-size: 11.5px; color: var(--ash); }
.specs dd { margin: 0; font-size: 14px; color: var(--bone); }
.specs dd span { transition: color .3s; }
.specs dd span.flash { color: var(--lumen); }
.buildbar {
  position: absolute; right: 0; top: 50%; translate: 0 -50%;
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 22px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--edge); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  opacity: 0; transform: translateY(16px); visibility: hidden; transition: opacity .5s var(--ease), transform .7s var(--ease), visibility 0s linear .5s;
}
body[data-mode="configure"] .buildbar { opacity: 1; transform: none; visibility: visible; transition-delay: .2s, .2s, 0s; }
body[data-mode="configure"] .rail { justify-content: space-between; }
body:not([data-mode="showroom"]):not([data-mode="configure"]) .specs { opacity: 0; transform: translateY(10px); pointer-events: none; }
.bb-code { display: grid; font-size: 11px; color: var(--ash); padding-right: 14px; border-right: 1px solid var(--edge); }
.bb-code b { font-size: 13px; color: var(--bone); font-weight: 500; }
.bb-price { display: grid; padding: 0 12px 0 6px; font-size: 10.5px; color: var(--ash); text-align: right; }
.bb-price b { font-size: 20px; font-weight: 720; font-stretch: 110%; color: var(--bone); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.buildbar .btn { height: 44px; }

/* ---------- Overlays */
.overlay { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: #000c; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: fade .4s var(--ease); }
@keyframes fade { from { opacity: 0; } }
.rx-stage { position: absolute; inset: 0; display: grid; place-items: center; cursor: crosshair; user-select: none; -webkit-user-select: none; }
.rx-ghost { position: absolute; width: min(22vw, 200px); height: auto; aspect-ratio: 460 / 615; fill: var(--lumen); opacity: 0; transform: scale(.85); filter: drop-shadow(0 0 40px var(--lumen)); transition: none; }
.rx.is-go .rx-ghost { opacity: 1; transform: none; transition: opacity .04s, transform .3s var(--ease); }
.rx.is-go { background: radial-gradient(circle at 50% 50%, var(--lumen-soft), #000e 60%); }
.rx-panel { position: relative; z-index: 2; width: min(460px, calc(100vw - 32px)); padding: 32px; border-radius: 22px; background: #0b0c0ef2; border: 1px solid var(--edge); text-align: center; cursor: default; }
.rx.is-running .rx-panel { display: none; }
.rx-panel h2 { margin: 0; font-size: 30px; font-weight: 760; font-stretch: 118%; letter-spacing: -0.02em; }
.rx-panel p { margin: 10px 0 0; color: #c9c8c2; }
.rx-dots { display: flex; justify-content: center; gap: 8px; margin: 20px 0 0; }
.rx-dots i { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--edge-hi); }
.rx-dots i.done { background: var(--lumen); border-color: var(--lumen); }
.rx-result { margin-top: 20px; display: grid; gap: 14px; }
.rx-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rx-nums div { padding: 14px; border-radius: 14px; border: 1px solid var(--edge); }
.rx-nums dt { font-size: 12px; color: var(--ash); }
.rx-nums dd { margin: 4px 0 0; font-size: 30px; font-weight: 720; font-stretch: 110%; font-variant-numeric: tabular-nums; }
.rx-nums dd small { font-size: 13px; color: var(--ash); font-weight: 400; margin-left: 3px; }
.rx-gain { margin: 0; color: var(--lumen) !important; font-weight: 600; }
.rx-gnote { margin: -8px 0 0 !important; font-size: 12px; color: var(--ash) !important; }
.rx-pb { font-size: 12px; color: var(--moon); }
.rx-actions { display: flex; justify-content: center; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.rx-big { position: absolute; z-index: 1; bottom: 14vh; left: 0; right: 0; text-align: center; font-size: 15px; color: var(--ash); pointer-events: none; }
.rx-big b { display: block; font-family: var(--font); font-size: clamp(48px, 9vw, 120px); font-weight: 780; font-stretch: 115%; color: var(--bone); letter-spacing: -0.03em; line-height: 1; }

.res-card { width: min(860px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; display: grid; grid-template-columns: 1.1fr 1fr; border-radius: 24px; background: #0b0c0e; border: 1px solid var(--edge); animation: rise .6s var(--ease); }
.res-shot { width: 100%; height: 100%; object-fit: cover; min-height: 320px; background: #000; }
.res-body { padding: 30px; display: grid; gap: 12px; align-content: start; }
.res-body h2 { margin: 0; font-size: 30px; font-weight: 760; font-stretch: 118%; letter-spacing: -0.02em; }
.res-code { color: var(--lumen); }
.res-list { margin: 6px 0 0; display: grid; gap: 0; }
.res-list div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--edge); font-size: 13px; }
.res-list dt { color: var(--ash); }
.res-list dd { margin: 0; text-align: right; }
.res-list .total { border-bottom: 0; padding-top: 12px; font-size: 16px; font-weight: 700; }
.res-note { margin: 4px 0 0; font-size: 12.5px; color: var(--ash); }
.res-body .rx-actions { justify-content: flex-start; margin-top: 10px; }

.toast {
  position: fixed; z-index: 40; left: 50%; top: calc(var(--top-h) + 12px); transform: translate(-50%, -10px);
  padding: 10px 18px; border-radius: 999px; background: var(--bone); color: var(--void); font-size: 13px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity .3s, transform .5s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Sensor lab */
.lab-hud { margin-top: 26px; display: grid; gap: 10px; max-width: 420px; }
.lab-row { display: grid; grid-template-columns: 96px auto 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: baseline; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--edge); background: var(--glass); }
.lab-k { font-size: 12.5px; color: var(--ash); }
.lab-v { font-size: 13px; color: var(--ash); }
.lab-v b { font-family: var(--font); font-size: 28px; font-weight: 720; font-stretch: 110%; color: var(--bone); letter-spacing: -0.02em; }
.lab-s { text-align: right; color: var(--ash); }
.lab-bar { grid-column: 1 / -1; height: 3px; margin-top: 10px; background: var(--edge); border-radius: 3px; overflow: hidden; }
.lab-bar i { display: block; height: 100%; width: 0; background: var(--bone); transition: width .4s var(--ease); }
.is-ours .lab-k, .is-ours .lab-v b { color: var(--lumen); }
.is-ours .lab-bar i { background: var(--lumen); box-shadow: 0 0 10px var(--lumen); }
.lab-stats { margin: 4px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.lab-stats dt { font-size: 11.5px; color: var(--ash); }
.lab-stats dd { margin: 2px 0 0; color: var(--bone); }
.lab-verdict { margin: 8px 0 0; font-size: 15px; font-weight: 600; color: var(--bone); min-height: 1.5em; }
.lab-legend { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11.5px; color: var(--ash); }
.lg-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--bone); }
.lg-line { width: 18px; height: 2px; background: var(--lumen); margin-left: 8px; box-shadow: 0 0 6px var(--lumen); }
.lab-touch { margin: 0; font-size: 12px; color: var(--ash); }
body[data-mode="lab"] #gl { cursor: none; }

/* ---------- Mode-specific chrome */
body[data-mode="configure"] .view-showroom { display: none; }
.noscript { position: fixed; inset: 0; display: grid; place-items: center; }

/* ---------- Responsive */
@media (max-width: 1180px) {
  .modes button { padding: 0 12px; }
  .case-link span:last-child { display: none; }
  .case-link { padding: 0 12px; }
  .view { width: min(460px, 46vw); }
}
@media (max-width: 860px) {
  :root { --top-h: 112px; --cfg-w: auto; }
  .top { grid-template-columns: 1fr auto; grid-template-rows: 56px 48px; row-gap: 0; padding-top: env(safe-area-inset-top); }
  .modes { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; overflow-x: auto; scrollbar-width: none; }
  .modes::-webkit-scrollbar { display: none; }
  .modes button { flex: none; height: 32px; }
  .modes-ink { height: 32px; }
  .brand-word { width: 76px; }
  .brand-model { display: none; }
  .view { left: 16px; right: 16px; width: auto; bottom: 108px; }
  .hero-h { font-size: clamp(36px, 10vw, 56px); }
  .hero-p, .view-p { font-size: 14.5px; margin-top: 14px; }
  .hint { display: none; }
  .specs { gap: 16px; overflow-x: auto; scrollbar-width: none; width: 100%; }
  .specs div:nth-child(n+4) { display: none; }
  .specs dd { white-space: nowrap; }
  .view-anatomy .view-h { font-size: 26px; }
  .view-anatomy { bottom: 96px; }
  .ana-ctrl { margin-top: 14px; }
  .rail { left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); }
  .cfg { left: 0; right: 0; top: auto; bottom: 0; height: 52dvh; border-radius: 22px 22px 0 0; transform: translateY(30px); border-bottom: 0; }
  .cfg-scroll { padding: 4px 16px 110px; }
  body[data-mode="configure"] .rail { bottom: calc(10px + env(safe-area-inset-bottom)); }
  body[data-mode="configure"] .specs { display: none; }
  .buildbar { left: 0; right: 0; padding-left: 16px; gap: 6px; }
  .buildbar .btn { padding: 0 16px; font-size: 13px; }
  .bb-code { display: none; }
  .bb-price { margin-right: auto; text-align: left; padding: 0; }
  .view-anatomy .view-p { display: none; }
  .view-lab .view-p { display: none; }
  .view-lab { bottom: auto; top: calc(var(--top-h) + 8px); }
  .view-lab .view-h { font-size: 28px; }
  .lab-row { padding: 8px 12px; }
  .lab-v b { font-size: 22px; }
  .part-card { left: 16px; right: 16px; width: auto; bottom: auto; top: calc(var(--top-h) + 8px); }
  .res-card { grid-template-columns: 1fr; }
  .res-shot { min-height: 200px; max-height: 240px; }
  .alabel .s { display: none; }
}

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

/* ---------- Reel mode (video render) */
body.reel .top, body.reel .view, body.reel .cfg, body.reel .rail, body.reel #hotspots, body.reel #labels,
body.reel #leaders, body.reel #labfx, body.reel .loader, body.reel .toast { display: none !important; }
