/* SNARE — NEATLABS™ */
:root {
  --bg: #05070b; --ink: #eef2f6; --mut: #9aa6b2; --dim: #5f6a77; --line: rgba(238,242,246,.1); --line2: rgba(238,242,246,.2);
  --panel: rgba(8,11,16,.8); --panel2: rgba(14,18,25,.94);
  --brand: #f47d3d; --brand2: #ff9a62; --bait: #ffd84d; --bait2: #ffe68a; --red: #ff3b4e; --low: #7fb4ff; --med: #f47d3d; --high: #ff3b4e; --city: #49c6ff; --green: #5be3a1;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink); font: 15px/1.45 var(--sans); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; }
a { color: var(--brand2); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--bait); outline-offset: 2px; }
#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

.btn { border: 1px solid var(--line2); background: rgba(14,18,25,.72); border-radius: 10px; padding: 11px 18px; cursor: pointer; font-weight: 600; font-size: 15px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); text-decoration: none; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #1a0d05; }
.btn.primary:hover { background: var(--brand2); }
.btn.big { font-size: 18px; padding: 14px 28px; }
.btn.ghost { background: rgba(6,8,12,.5); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.pill { border: 1px solid var(--line2); background: rgba(6,8,12,.55); border-radius: 999px; padding: 7px 14px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--mut); }
.pill:hover { color: var(--ink); border-color: var(--ink); }
.pill.sm { padding: 6px 11px; font-size: 12px; }
.pill.round { width: 32px; height: 32px; padding: 0; }
.sev { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }
.sev.low { background: var(--low); } .sev.med { background: var(--med); box-shadow: 0 0 8px var(--med); } .sev.high { background: var(--high); box-shadow: 0 0 10px var(--high); }
.sev.bait { background: var(--bait); box-shadow: 0 0 10px var(--bait); border-radius: 2px; transform: rotate(45deg); }

/* ---------- title ---------- */
.screen { position: fixed; inset: 0; z-index: 20; }
.title { display: flex; flex-direction: column; pointer-events: none; background: radial-gradient(1100px 800px at 8% 55%, rgba(5,7,11,.9), rgba(5,7,11,.35) 55%, transparent 75%); }
.title > * { pointer-events: auto; }
.t-top { display: flex; justify-content: space-between; align-items: center; padding: 22px 32px; }
.neat { font-weight: 800; font-size: 18px; letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
.neat span { color: var(--brand); }
.t-main { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 0 6vw 60px; max-width: 780px; }
.t-kick { margin: 0 0 4px; font: 600 14px var(--mono); color: var(--bait); letter-spacing: .03em; }
.t-word { margin: 0; font-weight: 900; font-size: clamp(72px, 14vw, 190px); line-height: .84; letter-spacing: .01em; display: flex; }
.t-word span { display: inline-block; animation: arm 1.6s cubic-bezier(.2,.8,.2,1) both; }
.t-word span:nth-child(2) { animation-delay: .07s; } .t-word span:nth-child(3) { animation-delay: .14s; color: var(--bait); text-shadow: 0 0 46px rgba(255,216,77,.45); animation-name: armA; }
.t-word span:nth-child(4) { animation-delay: .21s; } .t-word span:nth-child(5) { animation-delay: .28s; }
@keyframes arm { 0% { opacity: 0; transform: translateY(24px); filter: blur(10px); } 100% { opacity: 1; transform: none; filter: none; } }
@keyframes armA { 0% { opacity: 0; transform: translateY(24px) scale(.9); filter: blur(10px); } 70% { opacity: 1; transform: scale(1.06); filter: none; } 100% { opacity: 1; transform: none; } }
.t-line { margin: 16px 0 6px; font-size: clamp(22px, 3vw, 34px); font-weight: 700; letter-spacing: -.01em; }
.t-sub { margin: 0 0 18px; color: var(--mut); font-size: 17px; max-width: 560px; }
.t-today { display: flex; gap: 14px; align-items: stretch; margin: 0 0 20px; max-width: 560px; flex-wrap: wrap; }
.t-today .card { flex: 1 1 220px; border: 1px solid var(--line2); border-radius: 12px; padding: 11px 14px; background: rgba(6,8,12,.62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.t-today .card span { display: block; font-size: 12px; color: var(--mut); }
.t-today .card b { display: block; font-size: 16px; }
.t-today .card em { font-style: normal; font-size: 13px; color: var(--mut); }
.t-today .card.intr b { color: #ff7a86; }
.t-btns { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.t-stats { margin: 16px 0 0; color: var(--mut); font-size: 14px; } .t-stats b { color: var(--ink); }
.t-next { margin: 4px 0 0; color: var(--dim); font: 13px var(--mono); }
.t-challenge { border: 1px solid var(--bait); color: var(--bait2); border-radius: 10px; padding: 10px 14px; margin: 0 0 16px; font-weight: 600; max-width: 560px; background: rgba(6,8,12,.65); }
.t-done { border: 1px solid var(--line2); border-radius: 12px; padding: 12px 16px; margin: 0 0 16px; max-width: 560px; background: rgba(6,8,12,.65); }
.t-done p { margin: 0 0 8px; } .t-done .row { display: flex; gap: 10px; flex-wrap: wrap; }
.t-legend { position: absolute; right: 32px; bottom: 54px; display: flex; gap: 16px; align-items: center; font-size: 13px; color: var(--mut); flex-wrap: wrap; justify-content: flex-end; }
.t-legend span { display: inline-flex; align-items: center; gap: 7px; }
.t-fine { position: absolute; left: 32px; right: 32px; bottom: 14px; margin: 0; font-size: 11.5px; color: var(--dim); max-width: 900px; }

/* ---------- HUD ---------- */
.hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
.hud > * { pointer-events: auto; }
.h-top { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 18px; padding: 10px 16px; background: linear-gradient(180deg, rgba(5,7,11,.92), rgba(5,7,11,0)); }
.logo { font-weight: 900; letter-spacing: .06em; font-size: 22px; color: var(--ink); text-decoration: none; }
.logo span { color: var(--bait); }
.h-mission { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.h-mission b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .h-mission span { font-size: 12px; color: var(--mut); white-space: nowrap; }
.h-clock { margin-left: auto; display: flex; align-items: baseline; gap: 8px; }
.h-clock b { font: 600 28px var(--mono); }
.h-clock span { font-size: 12px; color: var(--mut); }
.h-inside { display: flex; flex-direction: column; line-height: 1.1; }
.h-inside span { font-size: 11px; color: var(--mut); } .h-inside b { font: 600 15px var(--mono); color: #ff7a86; }
.h-kit { display: flex; flex-direction: column; gap: 3px; line-height: 1; }
.h-kit > span { font-size: 11px; color: var(--mut); }
.kit { display: flex; gap: 3px; }
.kit i { width: 11px; height: 11px; transform: rotate(45deg); border: 1.5px solid rgba(255,216,77,.35); border-radius: 2px; }
.kit i.on { background: var(--bait); border-color: var(--bait); box-shadow: 0 0 8px rgba(255,216,77,.7); }
.kit i.fill { background: linear-gradient(0deg, rgba(255,216,77,.45) var(--p), transparent var(--p)); }
.kit i.spend { animation: spend .5s ease; }
@keyframes spend { 0% { transform: rotate(45deg) scale(1.6); background: #fff; } 100% { transform: rotate(45deg); } }
.h-speed { display: flex; border: 1px solid var(--line2); border-radius: 999px; overflow: hidden; background: rgba(6,8,12,.55); }
.h-speed button { background: none; border: 0; padding: 6px 10px; font: 600 12px var(--mono); color: var(--mut); cursor: pointer; min-width: 38px; }
.h-speed button.on { background: var(--ink); color: var(--bg); }
.paused .h-clock b { animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: .35; } }

.panel { position: absolute; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.p-left { left: 14px; top: 76px; width: 320px; bottom: 92px; display: flex; flex-direction: column; overflow: hidden; }
.p-left h3 { margin: 0; padding: 12px 14px 6px; display: flex; align-items: center; justify-content: space-between; font-size: 14px; }
.drawer { background: none; border: 0; padding: 0; font-weight: 700; font-size: 14px; cursor: default; display: inline-flex; gap: 8px; align-items: center; }
.drawer em { font: 600 11px var(--mono); font-style: normal; background: rgba(238,242,246,.1); border-radius: 999px; padding: 2px 7px; color: var(--mut); }
.lowtog { font-size: 12px; color: var(--mut); font-weight: 500; display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.lowtog input { accent-color: var(--bait); }
.a-hint { margin: 0; padding: 0 14px 8px; font-size: 12px; color: var(--dim); }
.alerts { list-style: none; margin: 0; padding: 0 6px 8px; overflow-y: auto; flex: 1; scrollbar-width: thin; }
.alerts li { display: grid; grid-template-columns: 9px 44px 1fr; gap: 8px; align-items: baseline; padding: 7px 8px; border-radius: 8px; cursor: pointer; font-size: 13px; line-height: 1.3; }
.alerts li:hover, .alerts li.sel { background: rgba(238,242,246,.07); }
.alerts li .sev { transform: translateY(1px); }
.alerts li time { font: 500 11.5px var(--mono); color: var(--dim); }
.alerts li.new { animation: newA 1.4s ease; }
.alerts li.high span { color: #ffd0d4; }
.alerts li.evt { grid-template-columns: 1fr; color: var(--bait2); font-size: 12.5px; cursor: default; background: rgba(255,216,77,.06); }
.alerts li.evt.bad { color: #ffb0b8; background: rgba(255,59,78,.08); }
.alerts.nolow li.low { display: none; }
@keyframes newA { 0% { background: rgba(255,255,255,.16); } 100% { background: transparent; } }

.p-right { right: 14px; top: 76px; width: 340px; max-height: calc(100% - 172px); overflow-y: auto; scrollbar-width: thin; }
.ins { padding: 14px 16px 16px; }
.ins-k { margin: 0; font: 600 11.5px var(--mono); color: var(--mut); text-transform: none; }
.ins h4 { margin: 2px 0 4px; font-size: 20px; letter-spacing: -.01em; }
.ins .bl { margin: 0 0 10px; color: var(--mut); font-size: 13.5px; }
.ins .heat { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--mut); margin: 0 0 10px; }
.ins .heat b { color: var(--ink); font-weight: 600; }
.ins .seen { border: 1px solid rgba(255,59,78,.5); background: rgba(255,59,78,.1); color: #ffc3c9; border-radius: 8px; padding: 7px 10px; font-size: 13px; margin: 0 0 10px; }
.ins .clean { border: 1px solid var(--line2); color: var(--mut); border-radius: 8px; padding: 7px 10px; font-size: 13px; margin: 0 0 10px; }
.ins .here { border-color: var(--line2); }
.ins .dlist { margin: 0 0 12px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.ins .dlist li { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; padding: 6px 9px; border-radius: 8px; background: rgba(255,216,77,.08); border: 1px solid rgba(255,216,77,.25); }
.ins .dlist li.burned { opacity: .5; text-decoration: line-through; background: none; }
.ins .dlist span { display: flex; flex-direction: column; min-width: 0; } .ins .dlist span b { font-weight: 600; } .ins .dlist .sev { margin-top: 4px; }
.ins .dlist code { font: 500 12px var(--mono); color: var(--bait2); word-break: break-all; }
.ins .dlist small { margin-left: auto; color: var(--mut); white-space: nowrap; }
.acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.act { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; border: 1px solid var(--line2); background: rgba(255,255,255,.03); border-radius: 10px; padding: 9px 10px; cursor: pointer; position: relative; }
.act:hover:not(:disabled) { border-color: var(--bait); background: rgba(255,216,77,.07); }
.act b { font-size: 13.5px; } .act small { font-size: 11.5px; color: var(--mut); line-height: 1.25; }
.act .cost { position: absolute; right: 9px; top: 8px; font: 600 11px var(--mono); color: var(--bait); }
.act:disabled { opacity: .4; cursor: not-allowed; }
.act.on { border-color: var(--bait); background: rgba(255,216,77,.1); }
.tiers { margin: 10px 0 0; border: 1px solid rgba(255,216,77,.35); border-radius: 10px; padding: 10px; background: rgba(255,216,77,.05); }
.tiers p { margin: 0 0 8px; font-size: 12.5px; color: var(--mut); }
.tier { display: grid; grid-template-columns: 92px 1fr; gap: 2px 8px; width: 100%; text-align: left; border: 1px solid var(--line2); background: rgba(5,7,11,.5); border-radius: 8px; padding: 8px 10px; cursor: pointer; margin: 0 0 6px; }
.tier:hover { border-color: var(--bait); }
.tier b { font-size: 13px; } .tier code { font: 500 12px var(--mono); color: var(--bait2); word-break: break-all; } .tier small { grid-column: 1 / -1; color: var(--mut); font-size: 11.5px; }
.links { margin: 12px 0 0; }
.links p { margin: 0 0 6px; font-size: 12.5px; color: var(--mut); }
.lk { display: flex; align-items: center; gap: 8px; width: 100%; border: 1px solid var(--line); background: none; border-radius: 8px; padding: 6px 9px; margin: 0 0 5px; cursor: pointer; font-size: 13px; text-align: left; }
.lk:hover:not(:disabled) { border-color: var(--bait); }
.lk span { flex: 1; } .lk small { font: 600 11px var(--mono); color: var(--bait); }
.lk.armed { border-color: rgba(255,216,77,.5); background: rgba(255,216,77,.08); } .lk.armed small { color: var(--bait2); }
.lk:disabled { opacity: .45; cursor: default; }
.ins-empty { padding: 16px; color: var(--mut); font-size: 13.5px; }
.ins-empty b { color: var(--ink); display: block; font-size: 15px; margin: 0 0 4px; }
.ins-x { position: absolute; right: 10px; top: 10px; background: none; border: 0; color: var(--mut); font-size: 20px; cursor: pointer; display: none; }

.h-bottom { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 14px; align-items: flex-end; padding: 12px 16px 14px; background: linear-gradient(0deg, rgba(5,7,11,.9), rgba(5,7,11,0)); pointer-events: none; }
.h-bottom > * { pointer-events: auto; }
.intel { display: flex; flex-direction: column; align-items: flex-start; border: 1px solid rgba(255,59,78,.45); background: rgba(40,6,12,.55); border-radius: 12px; padding: 8px 14px; cursor: pointer; text-align: left; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.intel:hover { border-color: var(--red); }
.intel .i-tag { font-size: 11px; color: #ff9aa4; } .intel b { font-size: 15px; } .intel em { font-style: normal; font-size: 12px; color: var(--mut); }
.objective { flex: 0 1 360px; margin-left: auto; border: 1px solid var(--line2); background: rgba(6,8,12,.6); border-radius: 12px; padding: 8px 14px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.objective span { font-size: 11px; color: var(--mut); display: block; } .objective b { font-size: 14px; }
.o-bar { height: 4px; border-radius: 4px; background: rgba(255,255,255,.08); margin-top: 6px; overflow: hidden; }
.o-bar i { display: block; height: 100%; width: 0; background: var(--red); box-shadow: 0 0 10px var(--red); transition: width .4s ease; }
.intel-card { position: absolute; left: 16px; bottom: 84px; width: 360px; background: var(--panel2); border: 1px solid rgba(255,59,78,.4); border-radius: 14px; padding: 14px 16px; z-index: 3; }
.intel-card h4 { margin: 0 0 2px; font-size: 17px; } .intel-card .k { margin: 0 0 8px; color: var(--mut); font-size: 12.5px; }
.intel-card ul { margin: 0 0 8px; padding-left: 18px; font-size: 13.5px; } .intel-card ul li { margin: 0 0 3px; }
.intel-card .adv { margin: 0; font-size: 13px; color: var(--bait2); }

.toasts { position: absolute; left: 50%; top: 74px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; z-index: 4; width: min(560px, 90vw); }
.toast { background: var(--panel2); border: 1px solid var(--line2); border-radius: 10px; padding: 9px 14px; font-size: 14px; animation: tin .35s ease both; max-width: 100%; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.toast.bait { border-color: rgba(255,216,77,.6); color: var(--bait2); } .toast.bad { border-color: rgba(255,59,78,.6); color: #ffc3c9; } .toast.good { border-color: rgba(91,227,161,.6); color: #c9f7df; }
.toast.out { animation: tout .4s ease both; }
@keyframes tin { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes tout { to { opacity: 0; transform: translateY(-8px); } }

/* labels over buildings */
#labels { position: fixed; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
.lbl { position: absolute; left: 0; top: 0; transform: translate(-50%, -100%); font-size: 11.5px; font-weight: 600; color: rgba(238,242,246,.86); white-space: nowrap; text-shadow: 0 1px 3px #000, 0 0 10px #000; padding: 2px 6px; border-radius: 6px; transition: opacity .2s; display: flex; align-items: center; gap: 5px; }
.lbl.ws { color: rgba(170,190,215,.85); font-weight: 500; }
.lbl.crit { color: #fff; }
.lbl.sel { background: rgba(255,216,77,.16); color: var(--bait2); }
.lbl.pot { color: var(--bait2); }
.lbl i { font-style: normal; font: 600 10px var(--mono); color: var(--bait); }
.lbl .ht { width: 6px; height: 6px; border-radius: 50%; background: var(--med); box-shadow: 0 0 8px var(--med); }
.lbl .ht.high { background: var(--high); box-shadow: 0 0 8px var(--high); }
.lbl.trap { color: var(--red); font-size: 14px; font-weight: 800; }
.lbl.stop { font: 600 11px var(--mono); color: #ffb0b8; background: rgba(40,6,12,.75); border: 1px solid rgba(255,59,78,.5); }
.lbl.nearm { font: 600 11px var(--mono); color: var(--bait2); background: rgba(40,32,6,.75); border: 1px solid rgba(255,216,77,.5); }
.hidelabels .lbl.ws:not(.sel) { opacity: 0; }

/* modals */
.modal { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; background: rgba(3,4,7,.62); padding: 18px; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.m-box { background: var(--panel2); border: 1px solid var(--line2); border-radius: 18px; padding: 26px 28px; max-width: 520px; width: 100%; max-height: calc(100% - 20px); overflow-y: auto; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.m-box.wide { max-width: 760px; }
.m-kick { margin: 0 0 6px; font: 600 13px var(--mono); color: var(--bait); }
.m-box h2 { margin: 0 0 10px; font-size: 26px; letter-spacing: -.015em; line-height: 1.15; }
.m-lead { margin: 0 0 16px; color: var(--mut); font-size: 15.5px; }
.who { border: 1px solid rgba(255,59,78,.45); background: linear-gradient(135deg, rgba(255,59,78,.12), rgba(255,59,78,.02)); border-radius: 14px; padding: 14px 16px; margin: 0 0 16px; display: grid; grid-template-columns: 1fr 1.2fr; gap: 6px 18px; }
.who .wk { font-size: 12px; color: #ff9aa4; } .who h3 { margin: 0; font-size: 20px; } .who .kd { margin: 0; color: var(--mut); font-size: 13px; }
.who ul { margin: 0; padding-left: 18px; font-size: 14px; grid-row: span 3; grid-column: 2; } .who ul li { margin: 0 0 3px; }
.who .adv { grid-column: 1 / -1; margin: 6px 0 0; font-size: 13.5px; color: var(--bait2); }
.steps3 { list-style: none; counter-reset: s; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.steps3 li { counter-increment: s; border: 1px solid var(--line); border-radius: 12px; padding: 12px; font-size: 13.5px; }
.steps3 li::before { content: counter(s); display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--bait); color: #1d1600; font-weight: 800; font-size: 12px; margin: 0 0 6px; }
.steps3 b { display: block; margin: 0 0 3px; } .steps3 span { color: var(--mut); }
.m-btns { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.help-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 4px 0 14px; }
.help-grid > div { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; grid-template-columns: 34px 1fr auto; gap: 0 10px; align-items: center; }
.help-grid b { font-size: 14.5px; } .help-grid small { font: 600 11px var(--mono); color: var(--bait); }
.help-grid p { grid-column: 1 / -1; margin: 6px 0 0; font-size: 13.5px; color: var(--mut); }
.help-fine { color: var(--dim); font-size: 13px; margin: 0 0 14px; }
.ico { width: 30px; height: 30px; border-radius: 8px; background: rgba(255,216,77,.12) center/20px no-repeat; border: 1px solid rgba(255,216,77,.35); }

/* verdict */
.verdict { position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; pointer-events: none; padding: 18px; background: radial-gradient(700px 420px at 50% 52%, rgba(5,7,11,.72), rgba(5,7,11,0) 75%); }
.v-box { pointer-events: auto; text-align: center; max-width: 640px; animation: vin .9s cubic-bezier(.2,.9,.2,1) both; }
.v-kick { margin: 0; font: 600 14px var(--mono); color: var(--bait); }
.v-box h2 { margin: 0; font-size: clamp(52px, 10vw, 132px); font-weight: 900; line-height: .9; letter-spacing: .02em; color: var(--bait); text-shadow: 0 0 60px rgba(255,216,77,.55), 0 4px 0 #000; }
.verdict.lost .v-box h2 { color: var(--red); text-shadow: 0 0 60px rgba(255,59,78,.6), 0 4px 0 #000; } .verdict.lost .v-kick { color: #ff9aa4; }
.v-how { margin: 14px auto 6px; font-size: 19px; font-weight: 600; max-width: 560px; text-shadow: 0 2px 10px #000; }
.v-meta { margin: 0 0 20px; color: var(--mut); font: 500 14px var(--mono); text-shadow: 0 2px 8px #000; }
@keyframes vin { 0% { opacity: 0; transform: scale(1.4); filter: blur(12px); } 100% { opacity: 1; transform: none; filter: none; } }

/* debrief */
.debrief { position: fixed; right: 0; top: 0; bottom: 0; width: min(560px, 100%); z-index: 25; background: linear-gradient(90deg, rgba(5,7,11,.0), rgba(5,7,11,.9) 7%, rgba(5,7,11,.96)); overflow-y: auto; scrollbar-width: thin; }
.d-inner { padding: 26px 28px 40px 46px; }
.d-top { display: flex; justify-content: space-between; align-items: center; margin: 0 0 16px; }
.d-k { margin: 0; font: 600 13px var(--mono); color: var(--bait); }
.d-h { margin: 2px 0 6px; font-size: 34px; line-height: 1.05; letter-spacing: -.02em; }
.d-h.lost { color: #ff7a86; } .d-h.won { color: var(--bait); }
.d-how { margin: 0 0 16px; font-size: 15.5px; }
.score { display: flex; align-items: center; gap: 18px; border: 1px solid var(--line2); border-radius: 14px; padding: 14px 18px; margin: 0 0 16px; background: rgba(255,255,255,.02); }
.grade { width: 64px; height: 64px; border-radius: 14px; display: grid; place-items: center; font-size: 36px; font-weight: 900; background: var(--bait); color: #1d1600; flex: none; }
.grade.F { background: var(--red); color: #fff; }
.score .pts b { display: block; font: 700 30px var(--mono); line-height: 1; } .score .pts span { font-size: 12.5px; color: var(--mut); }
.score .brk { margin-left: auto; font: 500 11.5px var(--mono); color: var(--dim); text-align: right; line-height: 1.5; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 18px; }
.stats div { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.stats b { display: block; font: 600 20px var(--mono); } .stats span { font-size: 12px; color: var(--mut); }
.d-sec { margin: 0 0 18px; }
.d-sec h4 { margin: 0 0 8px; font-size: 15px; }
.path { list-style: none; margin: 0; padding: 0; position: relative; }
.path li { display: grid; grid-template-columns: 56px 14px 1fr; gap: 8px; align-items: start; font-size: 13.5px; padding: 3px 0; }
.path li time { font: 500 12px var(--mono); color: var(--dim); padding-top: 1px; }
.path li i { width: 10px; height: 10px; border-radius: 50%; background: #ff7a86; margin-top: 4px; box-shadow: 0 0 8px rgba(255,59,78,.6); }
.path li.ws i { background: #6f86a8; box-shadow: none; } .path li.trap i { background: var(--bait); box-shadow: 0 0 10px var(--bait); transform: rotate(45deg); border-radius: 2px; }
.path li.near i { background: transparent; border: 1.5px solid var(--bait); box-shadow: none; }
.path li.near span { color: var(--bait2); font-size: 12.5px; }
.path li.evt span { color: #ffb0b8; font-size: 12.5px; }
.path li.lostp i { background: var(--red); }
.sig { margin: 0 0 8px; font-size: 14px; color: var(--mut); } .sig b { color: var(--ink); }
.alist { list-style: none; margin: 0; padding: 0; max-height: 210px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; scrollbar-width: thin; }
.alist li { display: grid; grid-template-columns: 50px 1fr 70px; gap: 8px; padding: 6px 10px; font-size: 12.5px; border-bottom: 1px solid var(--line); }
.alist li:last-child { border: 0; }
.alist li time { font: 500 11.5px var(--mono); color: var(--dim); }
.alist li em { font-style: normal; font: 600 11px var(--mono); color: var(--dim); text-align: right; }
.alist li.real { background: rgba(255,59,78,.08); } .alist li.real em { color: #ff9aa4; }
.lesson { border-left: 3px solid var(--bait); padding: 2px 0 2px 12px; margin: 0 0 10px; font-size: 14px; color: var(--mut); }
.lesson b { color: var(--ink); }
.sharebox { border: 1px solid var(--line2); border-radius: 14px; padding: 14px; margin: 0 0 16px; background: rgba(255,255,255,.02); }
.sharebox pre { margin: 0 0 12px; font: 500 13.5px/1.5 var(--mono); white-space: pre-wrap; color: var(--ink); }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.d-cta { border: 1px solid rgba(244,125,61,.4); border-radius: 14px; padding: 14px 16px; margin: 0 0 16px; background: linear-gradient(135deg, rgba(244,125,61,.1), transparent); }
.d-cta p { margin: 0 0 10px; font-size: 14px; color: var(--mut); } .d-cta b { color: var(--ink); }
.d-foot { color: var(--dim); font-size: 12px; margin: 10px 0 0; }

#flash { position: fixed; inset: 0; z-index: 28; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 50%, rgba(255,216,77,.55), rgba(255,216,77,0) 60%); }
#flash.red { background: radial-gradient(circle at 50% 50%, rgba(255,59,78,.55), rgba(255,59,78,0) 60%); }
#flash.go { animation: fl 1.1s ease-out; }
@keyframes fl { 0% { opacity: 1; } 100% { opacity: 0; } }
#fade { position: fixed; inset: 0; z-index: 50; pointer-events: none; background: #000; opacity: 0; transition: opacity .5s; }
#fade.on { opacity: 1; }

/* ---------- phones ---------- */
@media (max-width: 900px) {
  .h-inside, .h-mission span { display: none; }
  .p-left { width: 280px; }
  .p-right { width: 300px; }
}
@media (max-width: 760px) {
  body { font-size: 14px; }
  .t-top { padding: 14px 18px; }
  .t-main { padding: 0 18px 110px; justify-content: flex-end; }
  .t-sub { font-size: 15px; }
  .t-legend { display: none; }
  .t-fine { left: 18px; right: 18px; font-size: 10.5px; bottom: 10px; }
  .title { background: linear-gradient(0deg, rgba(5,7,11,.96) 35%, rgba(5,7,11,.4) 75%, transparent); }
  .h-top { gap: 10px; padding: 8px 10px; flex-wrap: wrap; }
  .logo { font-size: 18px; }
  .h-mission { flex: 1; } .h-mission b { font-size: 12.5px; }
  .h-clock { margin-left: 0; } .h-clock b { font-size: 20px; } .h-clock span { display: none; }
  .h-kit > span, #hMute { display: none; }
  .h-kit { order: 5; }
  .h-speed { order: 6; margin-left: auto; }
  .kit i { width: 9px; height: 9px; }
  .p-left { left: 8px; right: 8px; width: auto; top: auto; bottom: 70px; height: auto; max-height: 34vh; }
  .p-left.closed { max-height: 42px; }
  .p-left.closed .a-hint, .p-left.closed .alerts, .p-left.closed .lowtog { display: none; }
  .drawer { cursor: pointer; }
  .drawer::after { content: '▾'; font-size: 12px; color: var(--mut); }
  .p-left.closed .drawer::after { content: '▸'; }
  .p-left .a-hint { display: none; }
  .p-right { left: 8px; right: 8px; width: auto; top: auto; bottom: 70px; max-height: 58vh; z-index: 6; box-shadow: 0 -10px 40px rgba(0,0,0,.5); background: var(--panel2); }
  .p-right.empty { display: none; }
  .ins-x { display: block; }
  .h-bottom { padding: 8px 8px 10px; gap: 8px; }
  .intel { padding: 6px 10px; } .intel b { font-size: 13px; } .intel em { display: none; }
  .objective { padding: 6px 10px; flex: 1; } .objective b { font-size: 12.5px; }
  .intel-card { left: 8px; right: 8px; width: auto; bottom: 70px; z-index: 7; }
  .toasts { top: 92px; }
  .m-box { padding: 20px 18px; } .m-box h2 { font-size: 21px; }
  .who { grid-template-columns: 1fr; } .who ul { grid-column: 1; grid-row: auto; }
  .steps3 { grid-template-columns: 1fr; gap: 8px; } .steps3 li { display: grid; grid-template-columns: 30px 1fr; } .steps3 li::before { grid-row: span 2; }
  .help-grid { grid-template-columns: 1fr; }
  .debrief { width: 100%; top: 34vh; background: linear-gradient(180deg, rgba(5,7,11,0), rgba(5,7,11,.95) 40px, rgba(5,7,11,.98)); }
  .d-inner { padding: 40px 18px 40px; }
  .d-h { font-size: 27px; }
  .stats { grid-template-columns: repeat(3, 1fr); gap: 6px; } .stats b { font-size: 16px; }
  .lbl { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .t-word span, .v-box, .toast, .alerts li.new { animation: none !important; }
}
