:root{
  --ink:#070a10;
  --ink2:#0c1119;
  --ink3:#121926;
  --gold:#e6c07b;
  --gold-bright:#f6dca4;
  --gold-dim:#a6864d;
  --paper:#efe5d1;
  --muted:#9aa4b4;
  --line:rgba(230,192,123,.22);
  --red:#d94a41;
  --red-bright:#ff6a5c;
  --amber:#e0a33c;
  --teal:#7fc3cf;
  --display:"Iowan Old Style","Palatino Linotype","Book Antiqua",Palatino,Georgia,serif;
  --ui:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  --mono:ui-monospace,"SFMono-Regular",Consolas,"Liberation Mono",monospace;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;height:100%;background:var(--ink);color:var(--paper);font-family:var(--ui);-webkit-tap-highlight-color:transparent}
body{overflow:hidden}
button{font-family:inherit;color:inherit;cursor:pointer}
.hidden{display:none!important}
#app{height:100dvh;display:flex;flex-direction:column;overflow:hidden}

/* ---------- HUD ---------- */
#hud{
  flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:14px;
  padding:8px 16px;min-height:58px;position:relative;z-index:20;
  background:linear-gradient(180deg,rgba(8,11,17,.98),rgba(8,11,17,.82));
  border-bottom:1px solid var(--line);
}
.hud-brand{display:flex;flex-direction:column;line-height:1;min-width:132px}
.brand-mark{font-family:var(--display);font-size:16px;letter-spacing:.16em;color:var(--gold)}
.brand-sub{font-size:9px;letter-spacing:.34em;color:var(--muted);margin-top:4px}
.hud-timer{display:flex;align-items:center;gap:12px;flex:0 0 auto}
.hud-alert{flex:0 0 auto}
.hud-brand{flex:0 0 auto}
#timer{font-family:var(--mono);font-size:20px;letter-spacing:.04em;color:var(--paper);font-variant-numeric:tabular-nums}
.cache-mini{display:flex;gap:5px;align-items:center}
.cache-mini i{width:11px;height:15px;border:1px solid rgba(230,192,123,.45);border-radius:1px;display:block;position:relative;transform:skewY(-3deg);transition:.25s}
.cache-mini i.on{background:linear-gradient(160deg,var(--gold-bright),var(--gold-dim));border-color:var(--gold-bright);box-shadow:0 0 9px rgba(230,192,123,.6)}
.hud-alert{display:flex;align-items:center;gap:14px;margin-left:auto}
.detect-wrap{display:flex;align-items:center;gap:7px}
.eye-ico{width:17px;height:17px;fill:none;stroke:var(--muted);stroke-width:1.7;flex:0 0 auto;transition:.2s}
.detect-bar{width:88px;height:6px;border-radius:3px;background:rgba(255,255,255,.1);overflow:hidden;border:1px solid rgba(255,255,255,.08)}
.detect-bar i{display:block;height:100%;width:0%;background:linear-gradient(90deg,#7cae7a,var(--amber));transition:width .08s linear,background .2s}
.detect-label{font-family:var(--mono);font-size:9px;letter-spacing:.14em;color:var(--muted);min-width:44px}
.detect-wrap.seen .eye-ico{stroke:var(--amber)}
.detect-wrap.danger .eye-ico{stroke:var(--red-bright)}
.detect-wrap.danger .detect-label{color:var(--red-bright)}
.hud-btns{display:flex;gap:6px;align-items:center}
.icon-btn{
  width:34px;height:34px;border-radius:50%;border:1px solid rgba(230,192,123,.28);
  background:rgba(255,255,255,.03);display:flex;align-items:center;justify-content:center;
  font-size:15px;color:var(--gold);transition:.18s;padding:0;line-height:1;
}
.icon-btn:hover{background:rgba(230,192,123,.13);border-color:var(--gold)}
.icon-btn svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.icon-btn svg path[d^="M4 9"]{fill:none}
.pause-glyph{width:11px;height:13px;border-left:3px solid currentColor;border-right:3px solid currentColor;display:block}

#main{flex:1 1 auto;min-height:0;display:grid;grid-template-columns:minmax(0,1fr);position:relative}
#stage{position:relative;min-height:0;overflow:hidden;background:
  radial-gradient(120% 70% at 50% 0%,#111824 0%,#080b11 55%,#04060a 100%);}
#game{position:absolute;inset:0}
#game canvas{display:block;margin:0 auto}
.vignette{position:absolute;inset:0;pointer-events:none;z-index:6;
  background:radial-gradient(130% 90% at 50% 45%,transparent 45%,rgba(0,0,0,.5) 100%)}
.alarm-flash{position:absolute;inset:0;pointer-events:none;z-index:7;opacity:0;
  background:radial-gradient(140% 100% at 50% 50%,transparent 45%,rgba(190,30,24,.42) 100%)}
.alarm-flash.on{animation:alarmPulse 1.1s ease-in-out infinite}
@keyframes alarmPulse{0%,100%{opacity:.25}50%{opacity:.85}}

/* ---------- side panels ---------- */
.side-panel{
  display:none;overflow-y:auto;padding:16px 16px 24px;
  background:linear-gradient(180deg,rgba(10,14,21,.96),rgba(7,10,15,.96));
  border-right:1px solid var(--line);scrollbar-width:thin;scrollbar-color:rgba(230,192,123,.3) transparent;
}
.mission-panel{border-right:none;border-left:1px solid var(--line)}
.panel-title{font-family:var(--display);font-size:13px;letter-spacing:.28em;color:var(--gold);margin:2px 0 6px}
.panel-hint{font-size:11px;line-height:1.5;color:var(--muted);margin:0 0 12px}
.crew-list{display:flex;flex-direction:column;gap:8px}
.crew-card{
  display:grid;grid-template-columns:52px 1fr;gap:9px;padding:7px;position:relative;
  border:1px solid rgba(230,192,123,.14);border-radius:6px;background:rgba(255,255,255,.022);
  text-align:left;transition:.18s;overflow:hidden;width:100%;
}
.crew-card:hover{border-color:rgba(230,192,123,.45);background:rgba(230,192,123,.055)}
.crew-card.leader{cursor:default;border-color:rgba(230,192,123,.3)}
.crew-card .portrait{width:52px;height:66px;display:flex;align-items:flex-end;justify-content:center;
  background:radial-gradient(70% 70% at 50% 70%,rgba(230,192,123,.16),transparent 70%);border-radius:4px;overflow:hidden}
.crew-card .portrait img{max-width:100%;max-height:100%;object-fit:contain;filter:drop-shadow(0 4px 6px rgba(0,0,0,.6))}
.crew-card .who{min-width:0;display:flex;flex-direction:column;gap:1px;padding-top:2px}
.crew-card .nm{font-family:var(--display);font-size:14px;letter-spacing:.03em;color:var(--paper)}
.crew-card .rl{font-size:9px;letter-spacing:.16em;text-transform:uppercase;color:var(--muted)}
.crew-card .ab{font-size:12px;color:var(--gold);margin-top:4px;display:flex;align-items:center;gap:6px}
.crew-card .ab .key{font-family:var(--mono);font-size:9px;border:1px solid rgba(230,192,123,.35);border-radius:3px;padding:1px 4px;color:var(--gold-dim)}
.crew-card .ds{font-size:10px;line-height:1.35;color:#8792a3;margin-top:2px}
.crew-card .cdline{grid-column:1/-1;height:2px;background:rgba(255,255,255,.06);border-radius:1px;overflow:hidden;margin:2px 0 -2px}
.crew-card .cdline i{display:block;height:100%;width:0;background:var(--gold);transition:width .2s linear}
.crew-card.on-cd .portrait,.crew-card.on-cd .who{opacity:.5}
.crew-card.combo-ready{box-shadow:0 0 0 1px var(--gold-bright),0 0 16px rgba(230,192,123,.35);animation:comboGlow 1s ease-in-out infinite}
@keyframes comboGlow{50%{box-shadow:0 0 0 1px var(--gold-bright),0 0 24px rgba(230,192,123,.65)}}
.crew-card.flash{animation:cardFlash .4s}
@keyframes cardFlash{0%{background:rgba(230,192,123,.4)}100%{background:rgba(255,255,255,.022)}}
.combo-book{margin-top:20px;border-top:1px solid var(--line);padding-top:12px}
.combo-book h3,.mission-tips h3{font-size:10px;letter-spacing:.24em;color:var(--gold);margin:0 0 8px;font-weight:600}
.combo-list{display:flex;flex-direction:column;gap:7px}
.combo-item{border:1px solid rgba(127,195,207,.22);background:linear-gradient(120deg,rgba(30,48,58,.5),rgba(20,26,36,.4));border-radius:5px;padding:7px 8px}
.combo-item .cn{font-family:var(--display);font-size:12px;letter-spacing:.12em;color:var(--gold-bright)}
.combo-item .cp{font-size:9.5px;color:#8fa6b5;letter-spacing:.04em;margin-top:2px;text-transform:uppercase}
.combo-item .cx{font-size:10px;line-height:1.35;color:#aab4c2;margin-top:3px}
.combo-hint{font-size:10px;color:var(--muted);line-height:1.4;margin:8px 0 0}
.mission-objective{border:1px solid var(--line);border-radius:6px;padding:10px;background:rgba(255,255,255,.02);margin-bottom:14px}
.mission-label{font-size:9px;letter-spacing:.2em;color:var(--muted)}
.cache-big{display:flex;gap:7px;margin:9px 0 8px}
.cache-big i{width:22px;height:29px;border:1px solid rgba(230,192,123,.4);border-radius:2px;position:relative;transform:skewY(-2deg);transition:.3s}
.cache-big i.on{background:linear-gradient(160deg,var(--gold-bright),#8f6b2e);border-color:var(--gold-bright);box-shadow:0 0 14px rgba(230,192,123,.55)}
.mission-text{font-size:11px;line-height:1.45;color:#aab4c2}
.mission-stats{display:flex;flex-direction:column;gap:0;border-top:1px solid var(--line);margin-bottom:14px}
.mission-stats>div{display:flex;justify-content:space-between;align-items:baseline;padding:8px 0;border-bottom:1px solid rgba(255,255,255,.05);font-size:10px;letter-spacing:.1em;color:var(--muted)}
.mission-stats strong{font-family:var(--mono);font-size:13px;color:var(--paper);letter-spacing:.02em}
.mission-tips ul{list-style:none;margin:0 0 14px;padding:0;display:flex;flex-direction:column;gap:8px}
.mission-tips li{font-size:10.5px;line-height:1.45;color:#98a3b2;padding-left:12px;position:relative}
.mission-tips li:before{content:"";position:absolute;left:0;top:6px;width:4px;height:4px;background:var(--gold-dim);transform:rotate(45deg)}
.mission-keys{display:grid;grid-template-columns:1fr 1fr;gap:5px;border-top:1px solid var(--line);padding-top:10px}
.mission-keys span{font-size:9.5px;color:var(--muted)}
.mission-keys b{color:var(--gold-dim);font-family:var(--mono);font-weight:400}

/* ---------- toasts ---------- */
.toasts{position:absolute;left:50%;top:16px;transform:translateX(-50%);z-index:12;display:flex;flex-direction:column;align-items:center;gap:7px;pointer-events:none;width:calc(100% - 32px);max-width:420px}
.toast{
  background:rgba(8,11,16,.92);border:1px solid rgba(230,192,123,.4);border-radius:4px;
  padding:8px 14px;font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--gold-bright);
  box-shadow:0 8px 30px rgba(0,0,0,.55);text-align:center;animation:toastIn .3s ease-out;
  backdrop-filter:blur(4px);line-height:1.35;
}
.toast.alert{border-color:rgba(217,74,65,.6);color:#ffb3ac;background:rgba(30,8,8,.9)}
.toast.combo{border-color:rgba(127,195,207,.55);color:#cbebf1;background:rgba(8,20,24,.92)}
.toast.fade{animation:toastOut .4s forwards}
@keyframes toastIn{from{opacity:0;transform:translateY(-7px)}to{opacity:1;transform:none}}
@keyframes toastOut{to{opacity:0;transform:translateY(-6px)}}

/* ---------- touch controls ---------- */
.touch-ui{display:none;position:absolute;inset:0;z-index:10;pointer-events:none}
body.touch .touch-ui,.touch-ui.force{display:block}
.joy-zone{position:absolute;left:12px;bottom:14px;width:168px;height:168px;pointer-events:auto;touch-action:none}
.joy-base{position:absolute;left:18px;bottom:12px;width:120px;height:120px;border-radius:50%;
  border:1px solid rgba(230,192,123,.28);background:radial-gradient(circle at 50% 45%,rgba(20,28,40,.55),rgba(6,9,14,.35));
  box-shadow:inset 0 0 24px rgba(0,0,0,.5)}
.joy-base:before{content:"";position:absolute;inset:24px;border-radius:50%;border:1px dashed rgba(230,192,123,.16)}
.joy-knob{position:absolute;left:50%;top:50%;width:52px;height:52px;margin:-26px 0 0 -26px;border-radius:50%;
  background:radial-gradient(circle at 40% 35%,#3a4657,#151c27);border:1px solid rgba(230,192,123,.45);
  box-shadow:0 4px 12px rgba(0,0,0,.5);transition:transform .04s linear}
.touch-right{position:absolute;right:12px;bottom:14px;display:flex;flex-direction:column;align-items:flex-end;gap:10px;pointer-events:none}
.ability-bar{display:grid;grid-template-columns:repeat(2,52px);grid-auto-rows:52px;gap:8px;pointer-events:auto}
.ability-btn{
  position:relative;width:52px;height:52px;border-radius:50%;padding:0;overflow:hidden;
  border:1px solid rgba(230,192,123,.4);background:#101722;pointer-events:auto;
  box-shadow:0 3px 12px rgba(0,0,0,.5);transition:box-shadow .15s,border-color .15s;
}
.ability-btn img{width:100%;height:100%;object-fit:cover;object-position:50% 18%;opacity:.92}
.ability-btn .kb{position:absolute;left:2px;top:1px;font-family:var(--mono);font-size:8px;color:var(--gold-bright);background:rgba(0,0,0,.55);border-radius:2px;padding:0 2px;line-height:11px}
.ability-btn .cool{position:absolute;inset:0;border-radius:50%;background:conic-gradient(rgba(4,6,10,.82) calc(var(--cd,0)*1%),rgba(4,6,10,0) 0)}
.ability-btn .secs{position:absolute;inset:0;display:none;align-items:center;justify-content:center;font-family:var(--mono);font-size:14px;color:var(--gold-bright);text-shadow:0 1px 4px #000}
.ability-btn.on-cd .secs{display:flex}
.ability-btn.combo-ready{border-color:var(--gold-bright);box-shadow:0 0 0 2px rgba(230,192,123,.55),0 0 18px rgba(230,192,123,.45)}
.ability-btn.pressed{transform:scale(.93)}
.sprint-btn{
  width:74px;height:74px;border-radius:50%;pointer-events:auto;border:1px solid rgba(230,192,123,.4);
  background:radial-gradient(circle at 45% 35%,rgba(48,58,72,.85),rgba(12,17,25,.9));
  color:var(--gold);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;
  font-size:9px;letter-spacing:.16em;box-shadow:0 4px 16px rgba(0,0,0,.5);touch-action:none;
}
.sprint-btn svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round}
.sprint-btn.active{background:radial-gradient(circle at 45% 35%,rgba(120,100,58,.9),rgba(30,24,12,.92));border-color:var(--gold-bright);box-shadow:0 0 18px rgba(230,192,123,.5)}
body:not(.touch) .touch-right{gap:10px}

/* ---------- overlays ---------- */
.overlay{position:fixed;inset:0;z-index:50;display:flex;align-items:center;justify-content:center;overflow-y:auto;padding:20px}
.panel-overlay{background:rgba(4,6,10,.82);backdrop-filter:blur(7px)}
.panel-card{
  width:100%;max-width:560px;background:linear-gradient(170deg,#121925,#0a0e15 70%);
  border:1px solid rgba(230,192,123,.32);border-radius:9px;padding:26px 26px 22px;
  box-shadow:0 30px 90px rgba(0,0,0,.7),inset 0 1px 0 rgba(255,255,255,.05);
  position:relative;
}
.panel-card:before{content:"";position:absolute;inset:5px;border:1px solid rgba(230,192,123,.09);border-radius:6px;pointer-events:none}
.panel-card h2{font-family:var(--display);font-size:clamp(22px,4vw,30px);letter-spacing:.12em;color:var(--gold-bright);margin:0 0 12px;font-weight:500}
.panel-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.panel-head h2{margin:0}
.btn-primary{
  display:block;width:100%;padding:15px 22px;border-radius:4px;border:1px solid var(--gold);
  background:linear-gradient(180deg,#e9c987,#b28a47);color:#161006;font-weight:700;
  letter-spacing:.18em;font-size:12px;text-transform:uppercase;transition:.18s;
  box-shadow:0 8px 26px rgba(230,192,123,.18);margin-top:16px;
}
.btn-primary:hover{background:linear-gradient(180deg,#f7e0ac,#cda158);box-shadow:0 10px 32px rgba(230,192,123,.35)}
.btn-primary:active{transform:translateY(1px)}
.btn-primary:disabled{opacity:.55;cursor:wait}
.btn-ghost{
  display:block;width:100%;padding:12px 18px;margin-top:9px;border-radius:4px;
  border:1px solid rgba(230,192,123,.28);background:transparent;color:var(--gold);
  letter-spacing:.16em;font-size:10.5px;text-transform:uppercase;transition:.18s;
}
.btn-ghost:hover{background:rgba(230,192,123,.09);border-color:var(--gold)}

/* help */
.help-card{max-width:720px;max-height:90dvh;overflow-y:auto}
.help-body{display:flex;flex-direction:column;gap:16px;margin-top:8px}
.help-body section h3{font-size:10px;letter-spacing:.24em;color:var(--gold);margin:0 0 5px;font-weight:600}
.help-body section p{font-size:12px;line-height:1.55;color:#b7c0cd;margin:0}
.help-body b{color:var(--paper)}
.help-crew{display:flex;flex-direction:column;gap:6px;margin-top:4px}
.help-member{display:flex;gap:9px;align-items:center;border:1px solid rgba(230,192,123,.14);border-radius:5px;padding:5px 8px}
.help-member img{width:32px;height:40px;object-fit:contain;filter:drop-shadow(0 2px 4px #000)}
.help-member .hm-t{font-size:11.5px;color:var(--paper);line-height:1.3}
.help-member .hm-t b{color:var(--gold)}
.help-member .hm-d{font-size:10px;color:#98a3b2;line-height:1.35}
.help-member .hm-k{margin-left:auto;font-family:var(--mono);font-size:10px;color:var(--gold-dim);border:1px solid rgba(230,192,123,.3);border-radius:3px;padding:2px 5px;flex:0 0 auto}
.help-combos{display:flex;flex-direction:column;gap:7px;margin-bottom:6px}
.help-combo{border-left:2px solid var(--teal);padding:4px 0 4px 9px;font-size:11px;color:#a9b6c3;line-height:1.45}
.help-combo b{display:block;color:var(--gold-bright);letter-spacing:.1em;font-size:10.5px}
.small-card{max-width:360px;text-align:center}
.small-card .btn-primary{margin-top:6px}
.pause-line{font-size:12px;color:var(--muted);margin:0 0 14px}

/* results */
.results-card{max-width:520px;text-align:left}
.results-card .kicker{margin-bottom:4px}
.results-card h2{margin-bottom:6px}
.result-line{font-size:12px;line-height:1.5;color:#aab4c2;margin:0 0 16px;font-style:italic}
.result-grid{display:grid;grid-template-columns:1fr 1fr;gap:1px;background:rgba(230,192,123,.16);border:1px solid rgba(230,192,123,.16);border-radius:5px;overflow:hidden}
.result-grid>div{background:#0c121b;padding:10px 12px;display:flex;flex-direction:column;gap:3px}
.result-grid span{font-size:9px;letter-spacing:.18em;color:var(--muted)}
.result-grid strong{font-family:var(--mono);font-size:17px;color:var(--paper);font-weight:400}
#resultRank{color:var(--gold-bright);font-family:var(--display);font-size:22px}
.result-best{font-size:11px;color:var(--gold);margin:12px 0 0;letter-spacing:.05em;min-height:16px}
.leaderboard{border-top:1px solid var(--line);margin-top:14px;padding-top:10px}
.leaderboard h3{font-size:9px;letter-spacing:.22em;color:var(--muted);margin:0 0 6px}
.leaderboard ol{margin:0;padding:0 0 0 18px;font-size:11px;color:#aab4c2;display:flex;flex-direction:column;gap:3px}
.leaderboard a{color:var(--gold);text-decoration:none}
.result-actions{display:flex;gap:9px;margin-top:16px}
.result-actions button{margin-top:0}
.result-actions .btn-primary{flex:1.6}
.result-actions .btn-ghost{flex:1}

/* ---------- menu ---------- */
.menu-overlay{padding:0;display:block;overflow-y:auto;background:#05080d}
.menu-bg{position:fixed;inset:0;background:url("assets/hero.webp") center 28%/cover no-repeat;filter:saturate(.95) brightness(.78);transform:scale(1.04);animation:heroDrift 26s ease-in-out infinite alternate}
@keyframes heroDrift{from{transform:scale(1.03) translateY(0)}to{transform:scale(1.1) translateY(-1.4%)}}
.menu-scrim{position:fixed;inset:0;background:
  linear-gradient(90deg,rgba(4,6,10,.94) 0%,rgba(4,6,10,.78) 38%,rgba(4,6,10,.38) 68%,rgba(4,6,10,.66) 100%),
  linear-gradient(180deg,rgba(4,6,10,.75) 0%,rgba(4,6,10,.15) 40%,rgba(4,6,10,.9) 100%)}
.menu-inner{position:relative;z-index:2;max-width:1080px;margin:0 auto;min-height:100dvh;padding:clamp(24px,6vh,72px) clamp(20px,5vw,60px) 40px;display:flex;flex-direction:column;justify-content:center}
.kicker{font-size:10px;letter-spacing:.42em;color:var(--gold);text-transform:uppercase;margin:0 0 12px}
.title{
  font-family:var(--display);font-weight:500;margin:0;line-height:.86;letter-spacing:.015em;
  font-size:clamp(62px,12vw,132px);color:var(--gold-bright);
  text-shadow:0 2px 0 #5e4520,0 10px 40px rgba(0,0,0,.7);
}
.title:after{content:"";display:block;width:min(340px,55vw);height:1px;margin:22px 0 0;background:linear-gradient(90deg,var(--gold),transparent)}
.tagline{font-family:var(--display);font-size:clamp(17px,2.4vw,23px);color:#e7ddc9;margin:16px 0 0;font-style:italic;max-width:560px}
.menu-story{font-size:13px;line-height:1.6;color:#aeb7c4;max-width:520px;margin:12px 0 0}
.crew-strip{display:flex;gap:10px;margin:24px 0 4px;flex-wrap:wrap;max-width:640px}
.crew-chip{display:flex;flex-direction:column;align-items:center;width:78px;gap:4px}
.crew-chip .ph{width:64px;height:80px;display:flex;align-items:flex-end;justify-content:center;border-bottom:1px solid rgba(230,192,123,.3);background:radial-gradient(60% 55% at 50% 75%,rgba(230,192,123,.12),transparent 70%)}
.crew-chip img{max-width:100%;max-height:100%;object-fit:contain;filter:drop-shadow(0 4px 6px rgba(0,0,0,.65))}
.crew-chip .cn{font-family:var(--display);font-size:11px;letter-spacing:.03em;color:var(--paper);text-align:center;line-height:1.1}
.crew-chip .ca{font-size:8px;letter-spacing:.1em;color:var(--gold-dim);text-transform:uppercase;text-align:center;line-height:1.2}
.menu-actions{display:flex;gap:11px;margin-top:22px;max-width:520px;align-items:stretch}
.menu-actions .btn-primary{flex:1.5;margin-top:0;padding:17px 20px;font-size:12px}
.menu-actions .btn-ghost{flex:1;margin-top:0;padding:17px 14px}
.menu-best{font-family:var(--mono);font-size:11px;color:var(--gold);letter-spacing:.1em;margin:14px 0 0;min-height:14px}
.menu-note{font-size:10px;color:var(--muted);margin:7px 0 0;min-height:13px;line-height:1.4;max-width:520px}
.menu-foot{font-family:var(--display);font-style:italic;font-size:12px;color:#7f8897;margin:26px 0 0}
.menu-credit{position:fixed;right:18px;bottom:14px;z-index:3;font-size:9px;letter-spacing:.22em;text-transform:uppercase;color:rgba(230,192,123,.4)}

/* fatal */
.fatal{position:fixed;inset:0;z-index:100;background:#05080d;display:flex;align-items:center;justify-content:center;padding:30px;text-align:center;font-size:14px;line-height:1.6;color:#c9d1db}
.fatal b{display:block;font-family:var(--display);color:var(--gold-bright);font-size:24px;margin-bottom:10px}

/* ---------- responsive ---------- */
@media (min-width:1000px){
  #main{grid-template-columns:minmax(240px,300px) minmax(0,1fr) minmax(240px,300px)}
  .side-panel{display:block}
}
@media (max-width:999px){
  #hud{padding:6px 9px;min-height:48px;gap:6px}
  .hud-brand{display:none}
  #timer{font-size:15px;letter-spacing:0}
  .hud-timer{gap:7px;min-width:0}
  .cache-mini{gap:3px}
  .cache-mini i{width:9px;height:12px}
  .detect-bar{width:42px}
  .detect-label{display:none}
  .eye-ico{width:14px;height:14px}
  .hud-alert{gap:5px;margin-left:0}
  .hud-btns{gap:4px}
  .icon-btn{width:29px;height:29px;font-size:13px}
  .icon-btn svg{width:16px;height:16px}
  .pause-glyph{width:9px;height:11px;border-left-width:2px;border-right-width:2px}
  .title{font-size:clamp(58px,15vw,96px)}
  .menu-inner{justify-content:flex-end;pad-top:40px}
  .menu-story{font-size:12px;max-width:440px}
  .crew-strip{gap:6px;margin-top:18px}
  .crew-chip{width:64px}
  .crew-chip .ph{width:54px;height:66px}
  .menu-actions{flex-direction:column;max-width:420px}
  .menu-actions .btn-primary,.menu-actions .btn-ghost{flex:none;width:100%}
}
.faith-mini{
  font-family:var(--mono);font-size:9px;line-height:1;color:var(--gold-bright);
  border:1px solid rgba(230,192,123,.4);border-radius:2px;padding:2px 3px;margin-left:3px;
  letter-spacing:0;
}
.faith-mini.spent{color:#5b6470;border-color:#333b46;text-decoration:line-through}
.cache-mini{flex-wrap:nowrap}
@media (max-width:620px){
  .menu-inner{justify-content:flex-end;padding-bottom:26px}
  .title{font-size:clamp(54px,17vw,80px)}
  .tagline{font-size:16px;margin-top:12px}
  .menu-story{font-size:11.5px;line-height:1.5;margin-top:9px}
  .crew-strip{margin-top:14px;gap:4px}
  .crew-chip{width:58px}
  .crew-chip .ph{width:48px;height:58px}
  .crew-chip .cn{font-size:9.5px}
  .crew-chip .ca{font-size:7px}
  .menu-foot{margin-top:16px}
  .menu-credit{display:none}
  .panel-card{padding:20px 18px 18px}
  .help-body{gap:13px}
  .result-actions{flex-direction:column}
}
@media (max-height:700px){
  .menu-story{display:none}
  .menu-inner{justify-content:flex-end;padding-top:20px;padding-bottom:20px}
  .title{font-size:clamp(48px,12vh,84px)}
  .crew-strip{margin-top:12px}
  .menu-foot{display:none}
  .menu-actions{margin-top:14px}
}
@media (prefers-reduced-motion:reduce){
  .menu-bg{animation:none}
  .alarm-flash.on{animation:none;opacity:.55}
  .crew-card.combo-ready{animation:none}
}
