/* ============================================================================
   МИССИЯ НА ЛУНУ · кабинет ученика — layout + screen styles
   Tokens/components/cosmic come from ds/*.css. This file is layout only,
   plus the few bespoke pieces (timeline, helmet avatar, video HUD, boot).
   ========================================================================== */
*{ box-sizing:border-box; }
html,body{ margin:0; height:100%; }
body{
  font-family:var(--font-text); color:var(--text); background:var(--kv-ink-950);
  overflow:hidden;
  /* tweak-driven heading scale */
  --h-scale: 1;
}
#root{ height:100%; }

/* ===== global sky (canvas) sits behind everything ===== */
.sky-canvas{ position:fixed; inset:0; width:100vw; height:100vh; z-index:0; pointer-events:none; display:block; }
.sky-haze{ position:fixed; left:0; right:0; bottom:0; height:46vh; z-index:0; pointer-events:none;
  background:radial-gradient(120% 100% at 50% 140%,
    color-mix(in srgb, var(--team) 30%, transparent) 0%,
    color-mix(in srgb, #1BAAE3 14%, transparent) 34%, transparent 70%);
  mix-blend-mode:screen; opacity:.8; }

/* ============================================================================
   SHELL (post-auth)
   ========================================================================== */
.app{ position:relative; z-index:1; display:grid; grid-template-columns:84px 1fr;
  grid-template-rows:auto 1fr; height:100vh; grid-template-areas:"top top" "rail main"; }

.topbar{ grid-area:top; display:flex; align-items:center; gap:18px; padding:12px 24px;
  border-bottom:1px solid var(--border); background:rgba(8,14,24,.55); backdrop-filter:blur(12px); z-index:6; }
.topbar .logo{ height:34px; opacity:.92; }
.topbar .mission-id{ display:flex; flex-direction:column; gap:2px; padding-left:6px; border-left:1px solid var(--divider); margin-left:2px; }
.topbar .mission-id b{ font-family:var(--font-display); font-weight:700; font-size:15px; line-height:1; letter-spacing:.01em; }
.topbar .spacer{ flex:1; }
.topbar .tele{ display:flex; gap:8px; align-items:center; }
.topbar .who{ display:flex; align-items:center; gap:10px; padding:5px 6px 5px 12px; border:1px solid var(--border);
  border-radius:var(--r-pill); background:var(--surface-2); }
.topbar .who .wn{ display:flex; flex-direction:column; gap:1px; line-height:1.15; }
.topbar .who .wn b{ font-family:var(--font-display); font-weight:600; font-size:13px; }
.topbar .who .wn span{ font-family:var(--font-mono); font-size:10px; letter-spacing:.12em; color:var(--text-faint); text-transform:uppercase; }

.rail{ grid-area:rail; display:flex; flex-direction:column; align-items:center; gap:8px; padding:18px 0;
  border-right:1px solid var(--border); background:rgba(8,14,24,.4); backdrop-filter:blur(8px); z-index:5; }
.rail .nav-btn{ width:50px; height:50px; border-radius:13px; display:flex; flex-direction:column; gap:2px; align-items:center; justify-content:center;
  color:var(--text-faint); background:transparent; border:1px solid transparent; cursor:pointer;
  transition:all var(--dur) var(--ease-out); position:relative; }
.rail .nav-btn:hover{ color:var(--text); background:var(--surface-3); }
.rail .nav-btn.is-active{ color:var(--accent); border-color:var(--border-strong); background:var(--accent-soft); box-shadow:var(--glow); }
.rail .nav-btn.is-active::before{ content:""; position:absolute; left:-18px; top:50%; transform:translateY(-50%);
  width:3px; height:22px; border-radius:2px; background:var(--accent); box-shadow:var(--glow); }
.rail .nav-btn svg{ width:22px; height:22px; }
.rail .nav-btn .nl{ font-family:var(--font-mono); font-size:8px; letter-spacing:.06em; text-transform:uppercase; }
.rail .nav-spacer{ flex:1; }

.main{ grid-area:main; overflow-y:auto; overflow-x:hidden; position:relative; scroll-behavior:smooth; }
.main-inner{ max-width:1180px; margin:0 auto; padding:30px 36px 80px; position:relative; z-index:1; }

.page-head{ display:flex; align-items:flex-end; justify-content:space-between; margin-bottom:26px; gap:16px; }
.page-head .ph-title{ display:flex; flex-direction:column; gap:8px; }

/* heading scale hook */
.t-h1{ font-size:calc(var(--fs-h1) * var(--h-scale)); }
.t-h2{ font-size:calc(var(--fs-h2) * var(--h-scale)); }
.t-display{ font-size:calc(var(--fs-display) * var(--h-scale)); }

/* generic layout helpers */
.stack{ display:flex; flex-direction:column; gap:14px; }
.row{ display:flex; gap:14px; align-items:center; }
.between{ display:flex; align-items:center; justify-content:space-between; gap:12px; }
.wrap{ flex-wrap:wrap; }

/* ============================================================================
   ENTRANCE ANIMATIONS (staggered panel reveal, gated by [data-deck-active])
   ========================================================================== */
@media (prefers-reduced-motion: no-preference){
  .reveal{ opacity:0; transform:translateY(14px); }
  .stage-on .reveal{ animation:rv .6s var(--ease-out) both; }
  .stage-on .reveal[data-d="1"]{ animation-delay:.06s; }
  .stage-on .reveal[data-d="2"]{ animation-delay:.16s; }
  .stage-on .reveal[data-d="3"]{ animation-delay:.28s; }
  .stage-on .reveal[data-d="4"]{ animation-delay:.4s; }
  .stage-on .reveal[data-d="5"]{ animation-delay:.52s; }
  .stage-on .reveal[data-d="6"]{ animation-delay:.64s; }
}
@keyframes rv{ to{ opacity:1; transform:none; } }
.fadein{ animation:fade .4s var(--ease-out) both; }
@keyframes fade{ from{ opacity:0; transform:translateY(6px);} to{ opacity:1; transform:none;} }
@media (prefers-reduced-motion:reduce){ .fadein,.reveal{ animation:none !important; opacity:1 !important; transform:none !important; } }

/* ============================================================================
   MISSION TIMELINE (hero centrepiece of cabinet)
   ========================================================================== */
.mtl{ position:relative; padding:30px 30px 26px; }
.mtl-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:24px; }
.mtl-prog{ display:flex; align-items:baseline; gap:10px; }
.mtl-prog .big{ font-family:var(--font-mono); font-weight:700; font-size:40px; line-height:1; color:var(--text); font-variant-numeric:tabular-nums; }
.mtl-prog .den{ font-family:var(--font-mono); font-size:18px; color:var(--text-faint); }

/* the rail line + phases */
.mtl-track{ position:relative; }
.mtl-line{ position:absolute; left:0; right:0; top:23px; height:2px;
  background:repeating-linear-gradient(to right, var(--hud-line) 0 7px, transparent 7px 13px); }
.mtl-fill{ position:absolute; left:0; top:22px; height:4px; border-radius:2px;
  background:linear-gradient(90deg, color-mix(in srgb,var(--team) 55%,#000), var(--team));
  box-shadow:0 0 14px color-mix(in srgb,var(--team) 70%,transparent);
  width:0; transition:width 1.4s var(--ease-out); }
.mtl-nodes{ position:relative; display:grid; grid-auto-flow:column; grid-auto-columns:1fr; }
.mnode{ display:flex; flex-direction:column; align-items:center; gap:9px; text-align:center; cursor:pointer; }
.mnode .dot{ width:18px; height:18px; border-radius:50%; border:2px solid var(--hud-line);
  background:var(--surface-inset); display:flex; align-items:center; justify-content:center; position:relative; z-index:2;
  transition:transform var(--dur) var(--ease-out); }
.mnode .dot svg{ width:11px; height:11px; }
.mnode.done .dot{ border-color:var(--team); background:var(--team); color:var(--team-ink); }
.mnode.cur .dot{ width:24px; height:24px; border-color:var(--team); background:var(--team-soft); color:var(--team);
  box-shadow:0 0 0 5px color-mix(in srgb,var(--team) 16%,transparent), 0 0 18px color-mix(in srgb,var(--team) 55%,transparent); }
.mnode.cur .dot::after{ content:""; position:absolute; inset:-5px; border-radius:50%; border:1px solid var(--team);
  animation:cz-ping 2.4s var(--ease-out) infinite; }
@keyframes cz-ping{ 0%{ transform:scale(.7); opacity:.8;} 100%{ transform:scale(1.7); opacity:0; } }
@media (prefers-reduced-motion:reduce){ .mnode.cur .dot::after{ animation:none; } }
.mnode:hover .dot{ transform:scale(1.12); }
.mnode .nlbl{ font-family:var(--font-mono); font-size:9px; letter-spacing:.06em; color:var(--text-faint); text-transform:uppercase; }
.mnode.cur .nlbl{ color:var(--team); }
.mnode .nidx{ font-family:var(--font-mono); font-size:10px; color:var(--text-faint); }

/* phase ribbon under nodes */
.mtl-phases{ display:flex; gap:10px; margin-top:26px; }
.mphase{ flex:1; padding:11px 13px; border:1px solid var(--border); border-radius:var(--radius-control);
  background:var(--surface-2); display:flex; flex-direction:column; gap:5px; }
.mphase.is-cur{ border-color:var(--border-strong); background:var(--accent-soft); }
.mphase .pp{ display:flex; align-items:center; gap:8px; }
.mphase .pp svg{ width:15px; height:15px; color:var(--team); }
.mphase .pn{ font-family:var(--font-display); font-weight:600; font-size:12.5px; }
.mphase .pm{ font-family:var(--font-mono); font-size:9px; letter-spacing:.08em; text-transform:uppercase; color:var(--text-faint); }

/* ============================================================================
   CABINET grid
   ========================================================================== */
.cab-grid{ display:grid; grid-template-columns:1.7fr 1fr; gap:18px; align-items:start; }
.cab-stat{ display:grid; grid-template-columns:repeat(2,1fr); gap:1px; background:var(--divider);
  border:1px solid var(--border); border-radius:var(--radius-card); overflow:hidden; }
.cab-stat .cell{ background:var(--surface-2); padding:16px 18px; }

/* current-stage hero card */
.cur-card{ position:relative; overflow:hidden; }
.cur-card .tag{ display:flex; align-items:center; gap:10px; }
.cur-card .stage-icn{ width:46px; height:46px; border-radius:12px; display:flex; align-items:center; justify-content:center;
  background:var(--team-soft); color:var(--team); border:1px solid var(--team-line); }
.cur-card .stage-icn svg{ width:24px; height:24px; }

/* badge grid (mastery) */
.badges{ display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.mbadge{ position:relative; aspect-ratio:1; border:1px solid var(--border); border-radius:var(--radius-control);
  background:var(--surface-2); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:7px;
  padding:8px; text-align:center; transition:all var(--dur) var(--ease-out); }
.mbadge .hex{ width:40px; height:40px; display:flex; align-items:center; justify-content:center;
  clip-path:polygon(50% 0,93% 25%,93% 75%,50% 100%,7% 75%,7% 25%); }
.mbadge .hex svg{ width:19px; height:19px; }
.mbadge.earned{ border-color:var(--team-line); }
.mbadge.earned .hex{ background:linear-gradient(150deg,color-mix(in srgb,var(--team) 80%,#000),var(--team)); color:var(--team-ink);
  box-shadow:0 0 16px color-mix(in srgb,var(--team) 45%,transparent); }
.mbadge.locked{ opacity:.5; }
.mbadge.locked .hex{ background:var(--surface-inset); color:var(--text-faint); border:1px dashed var(--border-strong); }
.mbadge .bl{ font-family:var(--font-display); font-weight:600; font-size:10.5px; line-height:1.2; color:var(--text-muted); }
.mbadge.earned .bl{ color:var(--text); }

/* rank meter */
.rank-row{ display:flex; align-items:center; gap:14px; }
.rank-medal{ width:54px; height:54px; flex:none; border-radius:14px; display:flex; align-items:center; justify-content:center;
  background:linear-gradient(150deg,color-mix(in srgb,var(--team) 70%,#000),var(--team)); color:var(--team-ink);
  box-shadow:var(--glow); }
.rank-medal svg{ width:26px; height:26px; }

/* ============================================================================
   STAGE screen
   ========================================================================== */
.seg{ display:inline-flex; padding:3px; gap:3px; border:1px solid var(--border); border-radius:var(--r-pill); background:var(--surface-2); }
.seg button{ font-family:var(--font-display); font-weight:600; font-size:13px; padding:8px 18px; border-radius:var(--r-pill);
  border:none; background:transparent; color:var(--text-faint); cursor:pointer; transition:all var(--dur) var(--ease-out); }
.seg button.on{ background:var(--accent); color:var(--accent-contrast); box-shadow:var(--glow); }

.stage-grid{ display:grid; grid-template-columns:1.5fr 1fr; gap:18px; align-items:start; }

/* dropzone */
.dropz{ border:1.5px dashed var(--border-strong); border-radius:var(--radius-card); padding:30px 24px; text-align:center;
  background:var(--surface-inset); transition:all var(--dur) var(--ease-out); cursor:pointer; }
.dropz.hot{ border-color:var(--accent); background:var(--accent-soft); box-shadow:var(--glow); }
.dropz .dz-icn{ width:52px; height:52px; margin:0 auto 12px; border-radius:14px; display:flex; align-items:center; justify-content:center;
  background:var(--surface-3); color:var(--accent); border:1px solid var(--border); }
.dropz .dz-icn svg{ width:26px; height:26px; }
.filelist{ display:flex; flex-direction:column; gap:9px; }
.fileitem{ display:flex; align-items:center; gap:12px; padding:11px 13px; border:1px solid var(--border); border-radius:var(--radius-control); background:var(--surface-2); }
.fileitem .fi-icn{ width:34px; height:34px; border-radius:8px; flex:none; display:flex; align-items:center; justify-content:center;
  background:var(--team-soft); color:var(--team); }
.fileitem .fi-icn svg{ width:17px; height:17px; }
.fileitem .fi-meta{ flex:1; min-width:0; }
.fileitem .fi-meta b{ display:block; font-family:var(--font-display); font-weight:600; font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.fileitem .fi-bar{ height:4px; border-radius:2px; background:var(--surface-inset); overflow:hidden; margin-top:5px; }
.fileitem .fi-bar i{ display:block; height:100%; background:var(--team); border-radius:2px; }
.fileitem .x{ background:none; border:none; color:var(--text-faint); cursor:pointer; padding:4px; display:flex; }
.fileitem .x:hover{ color:var(--error); }

/* feedback loop */
.feedback{ display:flex; gap:14px; align-items:flex-start; padding:18px; border-radius:var(--radius-card);
  border:1px solid color-mix(in srgb,var(--pending) 40%,transparent); background:var(--pending-soft); }
.feedback.accepted{ border-color:color-mix(in srgb,var(--success) 40%,transparent); background:var(--success-soft); }
.feedback .fb-av{ width:44px; height:44px; flex:none; border-radius:50%; display:flex; align-items:center; justify-content:center;
  font-family:var(--font-display); font-weight:700; font-size:14px; background:var(--surface-3); color:var(--text);
  border:1.5px solid var(--av-border); }
.feedback .fb-body{ flex:1; }
.feedback .fb-who{ display:flex; align-items:center; gap:8px; margin-bottom:6px; }

/* status pill rail */
.status-rail{ display:flex; flex-direction:column; gap:0; }
.status-rail .sr{ display:flex; gap:12px; padding:11px 0; position:relative; }
.status-rail .sr .srd{ width:11px; height:11px; border-radius:50%; flex:none; margin-top:3px; border:2px solid var(--border-strong); background:var(--surface-inset); }
.status-rail .sr.done .srd{ background:var(--success); border-color:var(--success); }
.status-rail .sr.cur .srd{ background:var(--pending); border-color:var(--pending); box-shadow:0 0 0 4px var(--pending-soft); }
.status-rail .sr:not(:last-child)::after{ content:""; position:absolute; left:5px; top:22px; bottom:-4px; width:1px; background:var(--divider); }
.status-rail .sr.done:not(:last-child)::after{ background:color-mix(in srgb,var(--success) 50%,transparent); }

/* quiz options reused from kit */
.opt{ display:flex; align-items:center; gap:13px; padding:15px 16px; border:1px solid var(--border);
  border-radius:var(--radius-control); cursor:pointer; transition:all var(--dur) var(--ease-out); background:var(--surface-2); }
.opt:hover{ border-color:var(--border-strong); }
.opt.is-sel{ border-color:var(--accent); background:var(--accent-soft); box-shadow:var(--glow); }
.opt .opt-key{ width:28px; height:28px; border-radius:8px; display:flex; align-items:center; justify-content:center;
  font-family:var(--font-mono); font-weight:700; font-size:13px; border:1px solid var(--border-strong); color:var(--text-muted); flex:none; }
.opt.is-sel .opt-key{ background:var(--accent); color:var(--accent-contrast); border-color:var(--accent); }

/* ============================================================================
   ONBOARDING (full-screen pre-auth)
   ========================================================================== */
.boot{ position:fixed; inset:0; z-index:40; display:flex; align-items:center; justify-content:center;
  background:radial-gradient(120% 90% at 50% 30%, #0b1726 0%, #060b14 70%, #04070d 100%); }
.boot-grid{ position:absolute; inset:0; opacity:.5;
  background-image:linear-gradient(var(--hud-line) 1px,transparent 1px),linear-gradient(90deg,var(--hud-line) 1px,transparent 1px);
  background-size:46px 46px; mask:radial-gradient(70% 60% at 50% 45%,#000 0%,transparent 85%); }
.boot-core{ position:relative; width:min(640px,86vw); text-align:center; }
.boot-recticle-wrap{ display:flex; justify-content:center; margin-bottom:26px; }
.boot-log{ font-family:var(--font-mono); font-size:13px; text-align:left; max-width:440px; margin:24px auto 0;
  display:flex; flex-direction:column; gap:7px; min-height:140px; }
.boot-log .ln{ display:flex; align-items:center; gap:12px; color:var(--text-muted); opacity:0; transform:translateX(-8px);
  animation:lnin .4s var(--ease-out) forwards; }
@keyframes lnin{ to{ opacity:1; transform:none; } }
.boot-log .ln .lbl{ flex:1; letter-spacing:.06em; }
.boot-log .ln .st{ font-weight:700; letter-spacing:.1em; }
.boot-log .ln .st.ok{ color:var(--success); }
.boot-log .ln .st.run{ color:var(--accent); }
@media (prefers-reduced-motion:reduce){ .boot-log .ln{ animation:none; opacity:1; transform:none; } }

.auth-screen{ position:relative; z-index:1; width:100%; min-height:100%; display:flex;
  padding:40px 24px; }
.auth-screen > *{ margin:auto; }
.auth-card{ width:min(520px,94vw); }
.auth-logo{ height:38px; margin-bottom:6px; opacity:.9; }

/* code input — launch-code segmented digits */
.codebox{ display:flex; gap:10px; justify-content:center; margin:6px 0 4px; }
.codebox input{ width:54px; height:64px; text-align:center; font-family:var(--font-mono); font-weight:700; font-size:26px;
  color:var(--text); background:var(--surface-inset); border:1.5px solid var(--border-strong); border-radius:var(--radius-control);
  transition:all var(--dur) var(--ease-out); caret-color:var(--accent); }
.codebox input:focus{ outline:none; border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-ring), var(--glow); background:var(--accent-soft); }
.codebox input.filled{ border-color:color-mix(in srgb,var(--accent) 55%,transparent); color:var(--accent); }
.codebox.err input{ border-color:var(--error); animation:shake .35s; }
@keyframes shake{ 0%,100%{transform:translateX(0);} 25%{transform:translateX(-6px);} 75%{transform:translateX(6px);} }

/* ---- crew assembly: avatar constructor ---- */
.assemble{ display:grid; grid-template-columns:300px 1fr; gap:26px; width:min(820px,94vw); align-items:start; }
.assemble .preview{ display:flex; flex-direction:column; align-items:center; gap:16px;
  position:sticky; top:20px; align-self:start; }
.helmet-stage{ width:230px; height:230px; border-radius:24px; position:relative; display:flex; align-items:center; justify-content:center;
  background:radial-gradient(80% 80% at 50% 35%, color-mix(in srgb,var(--team) 22%,transparent), transparent 70%), var(--surface-inset);
  border:1px solid var(--border); box-shadow:inset 0 0 40px rgba(0,0,0,.5); overflow:hidden; }
.helmet-stage::after{ content:""; position:absolute; inset:0; pointer-events:none;
  background:repeating-linear-gradient(to bottom,transparent 0 3px,var(--scanline) 3px 4px); opacity:.6; }
.opt-group{ display:flex; flex-direction:column; gap:9px; }
@media (max-width:560px){ .opt-row{ grid-template-columns:1fr; } }
.swatches{ display:flex; gap:10px; flex-wrap:wrap; }
.swatch{ width:42px; height:42px; border-radius:11px; cursor:pointer; border:2px solid transparent; position:relative;
  transition:transform var(--dur) var(--ease-out); }
.swatch:hover{ transform:scale(1.08); }
.swatch.on{ border-color:#fff; box-shadow:0 0 0 2px var(--kv-ink-900), 0 0 16px currentColor; }
.choicechips{ display:flex; gap:9px; flex-wrap:wrap; }
.choicechips--grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:9px; }
.choicechips--grid .choicechip{ justify-content:center; }
.choicechip{ display:flex; align-items:center; gap:9px; padding:10px 14px; border:1px solid var(--border); border-radius:var(--radius-control);
  background:var(--surface-2); color:var(--text-muted); cursor:pointer; font-family:var(--font-display); font-weight:600; font-size:13px;
  transition:all var(--dur) var(--ease-out); }
.choicechip:hover{ border-color:var(--border-strong); color:var(--text); }
.choicechip.on{ border-color:var(--accent); background:var(--accent-soft); color:var(--text); box-shadow:var(--glow); }
.choicechip svg{ width:18px; height:18px; }

/* ---- login: affix + error ---- */
.input--err{ border-color:var(--error) !important; box-shadow:0 0 0 3px var(--error-soft) !important; }
.input-affix{ position:relative; display:flex; }
.input-affix .input{ padding-right:42px; }
.affix-btn{ position:absolute; right:6px; top:50%; transform:translateY(-50%); width:32px; height:32px;
  display:flex; align-items:center; justify-content:center; border:none; background:transparent;
  color:var(--text-faint); cursor:pointer; border-radius:8px; transition:all var(--dur) var(--ease-out); }
.affix-btn:hover{ color:var(--text); background:var(--surface-2); }
.auth-error{ display:flex; align-items:center; gap:8px; font-size:13px; color:var(--error);
  background:var(--error-soft); border:1px solid color-mix(in srgb,var(--error) 40%,transparent);
  padding:9px 12px; border-radius:var(--radius-control); }
.auth-error svg{ flex:none; }

/* ---- settings ---- */
.set-card{ padding:22px; gap:16px; }
.set-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:16px; }
.set-field{ display:flex; flex-direction:column; gap:6px; }
.set-field > label{ font-family:var(--font-text); font-size:13px; font-weight:600; color:var(--text-muted); }
.set-locked{ display:flex; align-items:center; justify-content:space-between; gap:10px;
  background:var(--surface-2); border:1px solid var(--border); border-radius:var(--radius-control);
  padding:10px 12px; color:var(--text); font-weight:600; }
.set-locked svg{ color:var(--text-faint); flex:none; }
.set-msg{ display:flex; align-items:center; gap:7px; font-size:13px; font-weight:600; }
.set-msg.ok{ color:var(--success); }
.set-msg.err{ color:var(--error); }
.pw-show{ color:var(--text-muted); cursor:pointer; font-size:13px; align-items:center; }
.pw-show input{ accent-color:var(--accent); width:15px; height:15px; }

/* ============================================================================
   VIDEO REPORT
   ========================================================================== */
.video-wrap{ max-width:880px; margin:0 auto; }
.cam-frame{ position:relative; aspect-ratio:16/10; border-radius:var(--radius-card); overflow:hidden;
  background:#04070d; border:1px solid var(--border-strong); box-shadow:var(--shadow-lg), var(--glow); }
.cam-frame video{ width:100%; height:100%; object-fit:cover; display:block; transform:scaleX(-1); background:#04070d; }
.cam-sim{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; }
/* HUD overlay layers */
.cam-hud{ position:absolute; inset:0; pointer-events:none; }
.cam-hud .scan{ position:absolute; inset:0; background:repeating-linear-gradient(to bottom,transparent 0 3px,rgba(120,190,230,.07) 3px 4px); mix-blend-mode:screen; }
.cam-hud .vignette{ position:absolute; inset:0; box-shadow:inset 0 0 120px rgba(0,0,0,.6); }
.cam-bk{ position:absolute; width:30px; height:30px; border:2px solid var(--hud-tick); opacity:.9; }
.cam-bk.tl{ top:16px; left:16px; border-width:2px 0 0 2px; }
.cam-bk.tr{ top:16px; right:16px; border-width:2px 2px 0 0; }
.cam-bk.bl{ bottom:16px; left:16px; border-width:0 0 2px 2px; }
.cam-bk.br{ bottom:16px; right:16px; border-width:0 2px 2px 0; }
.cam-center-reticle{ position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); }
.cam-topstrip{ position:absolute; top:14px; left:60px; right:60px; display:flex; align-items:center; justify-content:space-between; }
.cam-rec{ display:inline-flex; align-items:center; gap:8px; font-family:var(--font-mono); font-weight:700; font-size:13px; letter-spacing:.16em; color:var(--rec);
  background:rgba(4,7,13,.55); padding:5px 11px; border-radius:6px; border:1px solid color-mix(in srgb,var(--rec) 50%,transparent); }
.cam-rec .d{ width:10px; height:10px; border-radius:50%; background:var(--rec); animation:cz-pulse 1.4s var(--ease-out) infinite; }
.cam-time{ font-family:var(--font-mono); font-weight:700; font-size:14px; color:var(--text); background:rgba(4,7,13,.55); padding:5px 11px; border-radius:6px; border:1px solid var(--border); }
.cam-botstrip{ position:absolute; bottom:16px; left:60px; right:60px; display:flex; align-items:flex-end; justify-content:space-between; gap:14px; }
.cam-telecol{ display:flex; flex-direction:column; gap:4px; }
.cam-telecol .tr{ font-family:var(--font-mono); font-size:11px; letter-spacing:.08em; color:rgba(234,242,251,.82); text-shadow:0 1px 4px #000; }
.cam-telecol .tr b{ color:var(--accent); }
/* 60s limit bar */
.limit-bar{ position:absolute; left:0; right:0; bottom:0; height:4px; background:rgba(120,190,230,.18); }
.limit-bar i{ display:block; height:100%; background:linear-gradient(90deg,var(--accent),var(--rec)); width:0; }
.cam-controls{ display:flex; align-items:center; justify-content:center; gap:18px; margin-top:20px; }
.rec-btn{ width:70px; height:70px; border-radius:50%; border:3px solid var(--border-strong); background:transparent; cursor:pointer;
  display:flex; align-items:center; justify-content:center; transition:all var(--dur) var(--ease-out); }
.rec-btn:hover{ border-color:var(--rec); }
.rec-btn .core{ width:30px; height:30px; border-radius:50%; background:var(--rec); transition:all var(--dur) var(--ease-out); }
.rec-btn.recording .core{ border-radius:6px; width:26px; height:26px; }
.cam-state{ position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px; text-align:center;
  background:rgba(4,7,13,.66); backdrop-filter:blur(3px); }

/* mono readout reused styling */
.kv-list{ display:flex; flex-direction:column; gap:10px; }
.kv-list .kv{ display:flex; align-items:center; justify-content:space-between; gap:12px; }
.kv-list .kv .k{ font-family:var(--font-mono); font-size:11px; letter-spacing:.1em; text-transform:uppercase; color:var(--text-faint); }
.kv-list .kv .v{ font-family:var(--font-mono); font-weight:600; font-size:13px; color:var(--text); }

/* scrollbar */
.main::-webkit-scrollbar{ width:10px; }
.main::-webkit-scrollbar-thumb{ background:var(--border-strong); border-radius:5px; border:3px solid transparent; background-clip:padding-box; }

@media (max-width:880px){
  .cab-grid,.stage-grid{ grid-template-columns:1fr; }
  .assemble{ grid-template-columns:1fr; }
  .assemble .preview{ position:static; }
  .mtl-phases{ flex-wrap:wrap; }
  .mphase{ min-width:40%; }
}
