/* =========================================================
   OPERATIE PIMPERNEL — De Grensjacht
   Nachtblauw tactisch scherm. Geel = lopers (de Chiroshirts),
   rood = jagers, mint = radar, ijsblauw = bevroren.
   ========================================================= */
@font-face { font-family: 'Anton'; src: url('/fonts/anton.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/inter.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'DM Mono'; src: url('/fonts/dmmono.woff2') format('woff2'); font-weight: 500; font-display: swap; }

:root {
  color-scheme: dark;
  --night: #070b1c;
  --deck: #0e1531;
  --deck-2: #152044;
  --line: #24305e;
  --ink: #eef2ff;
  --mute: #8b94bb;
  --yellow: #f2c200;
  --yellow-deep: #b68f00;
  --red: #ff2e4d;
  --red-deep: #9c1027;
  --mint: #3df5b0;
  --ice: #8fd8ff;
  --orange: #ff8a1f;
  --role: var(--yellow);
  --display: 'Anton', 'Impact', 'Arial Narrow', sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'DM Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--night); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.45; }
body { overscroll-behavior: none; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--mint); outline-offset: 2px; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--deck); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; width: 100%; }
a { color: var(--yellow); }
.hidden { display: none !important; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.display { font-family: var(--display); font-weight: 400; letter-spacing: 0.01em; line-height: 0.92; text-transform: uppercase; }
#app { position: fixed; inset: 0; overflow: hidden; }
.grain::after { content: ''; position: fixed; inset: -50%; pointer-events: none; z-index: 90; opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ---------- knoppen ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 22px; border-radius: 14px;
  background: var(--deck-2); border: 1px solid var(--line); font-weight: 650; font-size: 1rem; transition: transform .08s ease, background .2s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--yellow); color: #1b1400; border-color: transparent; }
.btn.danger { background: var(--red); color: #fff; border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.small { min-height: 40px; padding: 0 14px; font-size: .9rem; border-radius: 11px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.wide { width: 100%; }

/* ---------- portretten ---------- */
.por { position: relative; display: inline-block; width: var(--s, 56px); height: calc(var(--s, 56px) * 1.15); flex: none;
  border-radius: 12px 12px 50% 50% / 12px 12px 18% 18%; overflow: hidden; background: radial-gradient(120% 90% at 50% 100%, var(--deck-2), var(--deck)); }
.por img { position: absolute; left: 50%; top: 4%; width: 142%; transform: translateX(-50%); }
.por.circle { border-radius: 50%; height: var(--s, 56px); }
.por.circle img { top: 6%; width: 165%; }
.por.ring { box-shadow: 0 0 0 2px var(--role), 0 0 18px -4px var(--role); }
.stack { display: flex; }
.stack .por { margin-left: calc(var(--s, 56px) * -0.28); box-shadow: 0 0 0 3px var(--night); }
.stack .por:first-child { margin-left: 0; }

/* ---------- scherm: join ---------- */
.join { position: absolute; inset: 0; display: flex; flex-direction: column; padding: calc(28px + var(--safe-t)) 22px calc(24px + var(--safe-b)); overflow-y: auto;
  background: radial-gradient(90% 60% at 50% 0%, #1a2a6b 0%, transparent 70%), var(--night); }
.join-logo { width: 74px; opacity: .95; }
.join h1 { font-family: var(--display); font-weight: 400; font-size: clamp(3.4rem, 17vw, 6rem); line-height: .86; margin: 28px 0 10px; text-transform: uppercase; }
.join h1 span { display: block; color: var(--yellow); }
.join .lede { color: var(--mute); max-width: 32ch; margin: 0 0 28px; }
.join .codebox { display: flex; gap: 10px; margin-top: auto; }
.join .codebox input { font-family: var(--mono); font-size: 1.4rem; letter-spacing: .3em; text-transform: uppercase; text-align: center; }
.err { color: var(--red); font-weight: 600; min-height: 1.4em; margin: 10px 0 0; }
.who-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 14px 10px; margin: 6px 0 24px; }
.who { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 2px; border-radius: 14px; }
.who .por { --s: 72px; }
.who span { font-size: .86rem; font-weight: 600; text-align: center; }
.who:active { background: var(--deck); }
.search { margin: 0 0 16px; }

/* ---------- scherm: wachten / lobby ---------- */
.wait { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; }
.wait .radar-bg { position: absolute; inset: 0; overflow: hidden; }
.wait .msg { position: relative; z-index: 2; }
.wait .big { font-family: var(--display); font-size: clamp(3rem, 15vw, 5.6rem); line-height: .9; text-transform: uppercase; margin: 22px 0 12px; }
.wait p { color: var(--mute); margin: 0 auto; max-width: 30ch; }

.sweep { position: absolute; left: 50%; top: 50%; width: 160vmax; height: 160vmax; transform: translate(-50%, -50%); border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(61,245,176,.0) 0deg, rgba(61,245,176,.0) 300deg, rgba(61,245,176,.22) 355deg, rgba(61,245,176,.5) 360deg);
  animation: spin 4s linear infinite; }
.rings { position: absolute; inset: 0; background: repeating-radial-gradient(circle at 50% 50%, transparent 0 58px, rgba(61,245,176,.10) 59px 60px); }
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .sweep { animation: none; } }

/* ---------- scherm: spel ---------- */
.game { position: absolute; inset: 0; }
.map { position: absolute; inset: 0; background: var(--night); }
.map-fallback { position: absolute; inset: 0; background: repeating-linear-gradient(0deg, transparent 0 39px, rgba(61,245,176,.06) 40px), repeating-linear-gradient(90deg, transparent 0 39px, rgba(61,245,176,.06) 40px), var(--night); }
.game .vignette { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to bottom, rgba(7,11,28,.92) 0%, rgba(7,11,28,0) 26%, rgba(7,11,28,0) 58%, rgba(7,11,28,.95) 82%); }

.strip { position: absolute; left: 0; right: 0; top: 0; padding: calc(10px + var(--safe-t)) 14px 0; display: flex; align-items: center; gap: 12px; z-index: 5; }
.strip .stack .por { --s: 46px; }
.strip .who-text { min-width: 0; flex: 1; }
.strip .tname { font-family: var(--display); font-size: 1.5rem; line-height: 1; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip .tmeta { font-size: .8rem; color: var(--mute); display: flex; gap: 10px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 99px; font-size: .74rem; font-weight: 700; background: var(--role); color: #14100a; }
.chip.hunter { background: var(--red); color: #fff; }
.chip.bad { background: transparent; color: var(--red); border: 1px solid var(--red); }
.chip.ok { background: transparent; color: var(--mint); border: 1px solid rgba(61,245,176,.5); }

.stateword { position: absolute; left: 14px; right: 14px; top: calc(74px + var(--safe-t)); z-index: 4; pointer-events: none; }
.stateword .w { font-family: var(--display); font-size: clamp(4.2rem, 24vw, 9rem); line-height: .82; color: var(--sw, var(--role)); text-transform: uppercase;
  text-shadow: 0 6px 40px rgba(0,0,0,.6); }
.stateword .sub { margin-top: 8px; font-weight: 600; max-width: 30ch; text-shadow: 0 2px 10px rgba(0,0,0,.9); }
.stateword .sub b { color: var(--sw, var(--role)); }
.stateword.pulse .w { animation: throb 1.2s ease-in-out infinite; }
@keyframes throb { 50% { opacity: .55; } }

.flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.flag { font-size: .78rem; font-weight: 700; padding: 5px 10px; border-radius: 10px; background: rgba(14,21,49,.86); border: 1px solid var(--line); backdrop-filter: blur(8px); display: flex; gap: 6px; align-items: center; }
.flag .mono { color: var(--mute); }
.flag.warn { border-color: var(--red); color: #ffd6dc; }
.flag.good { border-color: rgba(61,245,176,.6); }

.recenter { position: absolute; right: 12px; bottom: calc(212px + var(--safe-b)); z-index: 5; width: 46px; height: 46px; border-radius: 50%; background: rgba(14,21,49,.9); border: 1px solid var(--line); display: grid; place-items: center; font-size: 1.2rem; }

.dock { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; padding: 0 12px calc(12px + var(--safe-b)); }
.timers { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.timer { background: rgba(14,21,49,.88); border: 1px solid var(--line); border-radius: 14px; padding: 8px 10px; backdrop-filter: blur(10px); }
.timer .l { font-size: .72rem; color: var(--mute); font-weight: 600; }
.timer .v { font-family: var(--mono); font-size: 1.35rem; font-variant-numeric: tabular-nums; line-height: 1.15; }
.timer.hot { border-color: var(--red); }
.timer.hot .v { color: var(--red); }
.timer.lockon { border-color: var(--orange); }
.timer.lockon .v { color: var(--orange); }
.primary-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-bottom: 8px; }
.pak { min-height: 78px; border-radius: 20px; font-family: var(--display); font-size: 2.6rem; text-transform: uppercase; letter-spacing: .02em; background: var(--deck-2); color: var(--mute); border: 1px solid var(--line); line-height: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.pak small { font-family: var(--body); font-size: .78rem; font-weight: 600; letter-spacing: 0; text-transform: none; }
.pak.close { color: var(--orange); border-color: var(--orange); }
.pak.catch { background: var(--red); color: #fff; border-color: transparent; box-shadow: 0 0 0 0 rgba(255,46,77,.7); animation: pakglow 1s ease-out infinite; }
.pak.runner { background: var(--yellow); color: #1b1400; border-color: transparent; font-size: 2.1rem; }
@keyframes pakglow { 0% { box-shadow: 0 0 0 0 rgba(255,46,77,.7); } 100% { box-shadow: 0 0 0 22px rgba(255,46,77,0); } }
.side { min-width: 88px; border-radius: 20px; background: var(--deck-2); border: 1px solid var(--line); font-weight: 700; font-size: .85rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0 12px; }
.side .ico { font-size: 1.5rem; }
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tab { min-height: 50px; border-radius: 14px; background: rgba(14,21,49,.9); border: 1px solid var(--line); font-weight: 650; font-size: .86rem; display: flex; align-items: center; justify-content: center; gap: 6px; position: relative; }
.tab .n { min-width: 20px; height: 20px; border-radius: 10px; background: var(--role); color: #14100a; font-size: .72rem; display: grid; place-items: center; padding: 0 5px; }
.hunter-mode .tab .n { color: #fff; }

body.final .vignette { background: linear-gradient(to bottom, rgba(40,4,12,.92) 0%, rgba(40,4,12,0) 28%, rgba(40,4,12,0) 56%, rgba(25,3,8,.96) 82%); }
body.final .map { filter: saturate(1.25) hue-rotate(-12deg); }

/* ---------- sheets ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 40; background: rgba(3,5,14,.6); display: flex; align-items: flex-end; animation: fade .18s ease; }
.sheet { width: 100%; max-height: 86vh; overflow-y: auto; background: var(--deck); border-top: 1px solid var(--line); border-radius: 22px 22px 0 0; padding: 18px 16px calc(20px + var(--safe-b)); animation: up .22s cubic-bezier(.2,.9,.3,1); }
.sheet h2 { font-family: var(--display); font-weight: 400; font-size: 2.2rem; line-height: 1; margin: 4px 0 14px; text-transform: uppercase; }
.sheet .grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 10px; }
.sheet .note { color: var(--mute); font-size: .9rem; margin: 0 0 14px; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

.card { background: var(--deck-2); border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin-bottom: 10px; }
.card .top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.card h3 { margin: 0; font-size: 1.08rem; }
.card p { margin: 6px 0 12px; color: #c9d0ee; }
.card .meta { font-size: .78rem; color: var(--mute); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.card .acts { display: flex; gap: 8px; }
.card.risk { border-color: var(--red); background: linear-gradient(160deg, rgba(255,46,77,.14), var(--deck-2) 60%); }
.stars { color: var(--yellow); letter-spacing: 2px; }
.item { display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: center; }
.item .ico { font-size: 2rem; width: 52px; height: 52px; display: grid; place-items: center; background: var(--deck); border-radius: 14px; border: 1px solid var(--line); }
.rar-2 { border-color: #7a5cff; }
.rar-3 { border-color: var(--yellow); box-shadow: 0 0 24px -8px var(--yellow); }
.targets { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.code-big { font-family: var(--mono); font-size: 4.4rem; letter-spacing: .14em; text-align: center; color: var(--yellow); margin: 8px 0; }
.rules li { margin-bottom: 8px; }

/* ---------- overlays ---------- */
.ov { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; background: rgba(4,6,16,.94); animation: fade .2s ease; }
.ov .t { font-family: var(--display); font-size: clamp(3rem, 16vw, 8rem); line-height: .86; text-transform: uppercase; margin: 0 0 14px; }
.ov .s { color: #c9d0ee; max-width: 32ch; font-size: 1.05rem; }
.ov .close-hint { position: absolute; bottom: calc(24px + var(--safe-b)); color: var(--mute); font-size: .85rem; }
.ov.red { background: radial-gradient(80% 60% at 50% 40%, rgba(255,46,77,.35), rgba(4,6,16,.97) 70%); }
.ov.red .t { color: var(--red); }
.ov.yellow { background: radial-gradient(80% 60% at 50% 40%, rgba(242,194,0,.3), rgba(4,6,16,.97) 70%); }
.ov.yellow .t { color: var(--yellow); }
.ov.ice { background: radial-gradient(80% 60% at 50% 40%, rgba(143,216,255,.32), rgba(4,6,16,.97) 70%); }
.ov.ice .t { color: var(--ice); }
.ov.mint .t { color: var(--mint); }
.ov .count { font-family: var(--mono); font-size: 3rem; margin-top: 18px; }
.ov .teams-new { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; width: min(100%, 420px); }
.ov .tn { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--deck); text-align: left; }
.ov .tn.mine { border-color: var(--red); box-shadow: 0 0 30px -10px var(--red); }
.ov .tn b { font-family: var(--display); font-weight: 400; font-size: 1.4rem; text-transform: uppercase; }
.ov .loot { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; justify-content: center; }
.ov .loot .card { width: 150px; animation: flip .5s cubic-bezier(.2,.9,.3,1.3) both; }
.ov .loot .card:nth-child(2) { animation-delay: .25s; }
@keyframes flip { from { transform: rotateY(90deg) scale(.6); opacity: 0; } }
.ov .por-row { display: flex; gap: 10px; justify-content: center; margin: 18px 0; }
.ov .por-row .por { --s: 92px; animation: drop .6s cubic-bezier(.2,.9,.3,1.2) both; }
.ov .por-row .por:nth-child(2) { animation-delay: .12s; }
.ov .por-row .por:nth-child(3) { animation-delay: .24s; }
@keyframes drop { from { transform: translateY(-40px) scale(.7); opacity: 0; } }
.radar-flash { position: fixed; inset: 0; z-index: 55; pointer-events: none; overflow: hidden; }
.radar-flash::before { content: ''; position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--mint); transform: translate(-50%, -50%); animation: shock 1.4s ease-out forwards; }
@keyframes shock { to { width: 260vmax; height: 260vmax; opacity: 0; border-width: 1px; } }

.toasts { position: fixed; left: 12px; right: 12px; top: calc(70px + var(--safe-t)); z-index: 70; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { background: rgba(14,21,49,.97); border: 1px solid var(--line); border-left: 4px solid var(--mint); border-radius: 12px; padding: 12px 14px; font-weight: 600; animation: up .25s ease; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.toast.bad { border-left-color: var(--red); }
.toast.alert { border-left-color: var(--orange); }

.conn { position: fixed; left: 12px; right: 12px; bottom: calc(10px + var(--safe-b)); z-index: 80; background: var(--red-deep); border-radius: 14px; padding: 12px 14px; font-weight: 600; }
.conn b { display: block; font-family: var(--display); font-weight: 400; font-size: 1.3rem; text-transform: uppercase; }

/* ---------- kaartmarkers ---------- */
.mk { position: relative; transform: translateY(-50%); }
.mk .lbl { position: absolute; left: 50%; bottom: calc(100% + 4px); transform: translateX(-50%); white-space: nowrap; font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 8px; background: rgba(7,11,28,.9); border: 1px solid var(--line); }
.mk .lbl .mono { color: var(--mute); font-weight: 500; margin-left: 4px; }
.mk-ping .dot { width: 18px; height: 18px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px rgba(7,11,28,.8), 0 0 18px var(--mint); }
.mk-ping .ripple { position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--mint); transform: translate(-50%, -50%); animation: rip 2.4s ease-out infinite; }
.mk-ping.old .dot { background: #2a9a73; box-shadow: 0 0 0 3px rgba(7,11,28,.8); }
.mk-ping.stale { opacity: .45; }
@keyframes rip { to { width: 90px; height: 90px; opacity: 0; } }
.mk-live .dot { width: 20px; height: 20px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px #fff, 0 0 22px var(--red); animation: throb .8s infinite; }
.mk-me .dot { width: 20px; height: 20px; border-radius: 50%; background: var(--role); box-shadow: 0 0 0 4px rgba(7,11,28,.85), 0 0 0 7px var(--role); }
.mk-hunter .dot { width: 16px; height: 16px; border-radius: 4px; background: var(--red); transform: rotate(45deg); box-shadow: 0 0 14px var(--red); }
.mk-runner .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 12px var(--yellow); }
.mk-base { font-size: 26px; filter: drop-shadow(0 0 10px var(--yellow)); }
.mk-base .lbl { color: var(--yellow); }
.mk-por .por { --s: 40px; box-shadow: 0 0 0 2px var(--mint); }

/* ---------- tv ---------- */
.tv { position: absolute; inset: 0; background: var(--night); }
.tv-stage { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; }
.tv-orbit { position: absolute; left: 50%; top: 50%; width: 0; height: 0; z-index: 1; }
.tv-orbit .por { position: absolute; --s: 6.2vh; transition: transform 1.1s cubic-bezier(.6,.05,.2,1), opacity .6s, filter .6s; }
.tv-center { position: relative; z-index: 3; text-align: center; }
.tv-center .t { font-family: var(--display); font-size: 10vh; line-height: .9; text-transform: uppercase; }
.tv-center .s { font-family: var(--mono); color: var(--mint); font-size: 2.4vh; letter-spacing: .2em; margin-top: 1.6vh; }
.tv-reveal-card { position: absolute; z-index: 4; text-align: center; }
.tv-reveal-card .name { font-family: var(--display); font-size: 11vh; line-height: .9; text-transform: uppercase; color: var(--yellow); min-height: 1em; }
.tv-reveal-card .mem { display: flex; justify-content: center; gap: 3vh; margin-top: 3vh; }
.tv-reveal-card .mem .por { --s: 22vh; animation: drop .7s cubic-bezier(.2,.9,.3,1.2) both; }
.tv-reveal-card .mem .por:nth-child(2) { animation-delay: .15s; }
.tv-reveal-card .mem .por:nth-child(3) { animation-delay: .3s; }
.tv-reveal-card .mem span { display: block; font-weight: 700; font-size: 2.6vh; margin-top: 1vh; }
.tv-roll { position: absolute; left: 2vw; right: 2vw; bottom: 2vh; z-index: 5; display: flex; flex-wrap: wrap; gap: 1vh; justify-content: center; }
.tv-roll .mini { display: flex; align-items: center; gap: .8vh; padding: .6vh 1.2vh; border-radius: 1.4vh; background: rgba(14,21,49,.9); border: 1px solid var(--line); animation: up .4s ease; }
.tv-roll .mini .por { --s: 4.4vh; }
.tv-roll .mini b { font-family: var(--display); font-weight: 400; font-size: 2.2vh; text-transform: uppercase; }
.tv-roll .mini.h { border-color: var(--red); }
.tv-roll .mini.h b { color: var(--red); }
.tv.alarm .tv-stage { animation: alarm 0.5s steps(2) 6; }
@keyframes alarm { 50% { background: #3a0610; } }
.tv-join { position: absolute; right: 3vw; top: 4vh; z-index: 6; display: flex; gap: 2vh; align-items: center; background: rgba(14,21,49,.9); border: 1px solid var(--line); border-radius: 2vh; padding: 1.6vh; }
.tv-join svg, .tv-join canvas, .tv-join img { display: block; flex: none; width: 16vh; height: 16vh; background: #fff; border-radius: 1vh; padding: .8vh; }
.tv-join .u { font-size: 2.2vh; font-weight: 700; }
.tv-join .c { font-family: var(--mono); font-size: 4.4vh; color: var(--yellow); letter-spacing: .2em; }
.tv-btn { position: absolute; left: 50%; bottom: 24vh; transform: translateX(-50%); z-index: 7; }
.tv-btn .btn { min-height: 7vh; font-size: 2.6vh; padding: 0 5vh; border-radius: 2vh; }

.live { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 34vw; }
.live .map { position: relative; }
.live aside { padding: 3vh 2.4vw; display: flex; flex-direction: column; gap: 2vh; border-left: 1px solid var(--line); background: var(--deck); overflow: hidden; }
.live .clock { font-family: var(--mono); font-size: 9vh; line-height: 1; }
.live .phase { font-family: var(--display); font-size: 4.4vh; text-transform: uppercase; color: var(--yellow); }
.live .nums { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.4vh; }
.live .num { background: var(--deck-2); border: 1px solid var(--line); border-radius: 1.6vh; padding: 1.4vh; }
.live .num b { display: block; font-family: var(--display); font-weight: 400; font-size: 6vh; line-height: 1; }
.live .num span { color: var(--mute); font-size: 1.7vh; font-weight: 600; }
.live .feed { flex: 1; overflow: hidden; display: flex; flex-direction: column; gap: 1vh; }
.live .ev { display: flex; gap: 1.2vh; align-items: baseline; font-size: 2.1vh; padding: 1vh 1.2vh; border-radius: 1.2vh; background: var(--deck-2); }
.live .ev .mono { color: var(--mute); font-size: 1.7vh; }
.live .ev.catch { border-left: 4px solid var(--red); }
.live .ev.mission { border-left: 4px solid var(--mint); }
.live .ev.alert, .live .ev.storm { border-left: 4px solid var(--orange); }

.results { position: absolute; inset: 0; overflow-y: auto; padding: calc(28px + var(--safe-t)) 18px calc(28px + var(--safe-b)); background: radial-gradient(80% 50% at 50% 0%, #2a1840 0%, transparent 70%), var(--night); }
.results h1 { font-family: var(--display); font-weight: 400; font-size: clamp(3rem, 14vw, 7rem); line-height: .88; text-transform: uppercase; margin: 0 0 22px; }
.award { margin-bottom: 26px; }
.award h2 { font-family: var(--display); font-weight: 400; font-size: 1.9rem; text-transform: uppercase; color: var(--yellow); margin: 0 0 10px; }
.award .row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.award .row .por { --s: 44px; }
.award .row b { flex: 1; }
.totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.totals div { background: var(--deck); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.totals b { display: block; font-family: var(--display); font-weight: 400; font-size: 2.4rem; line-height: 1; }
.totals span { color: var(--mute); font-size: .85rem; }

/* ---------- control ---------- */
.ctl { position: absolute; inset: 0; overflow-y: auto; padding: 18px; }
.ctl header { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.ctl header h1 { font-family: var(--display); font-weight: 400; font-size: 2.4rem; margin: 0; text-transform: uppercase; }
.ctl section { background: var(--deck); border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin-bottom: 16px; }
.ctl section h2 { margin: 0 0 12px; font-size: 1.1rem; }
.ctl .row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ctl label { font-size: .85rem; color: var(--mute); display: grid; gap: 4px; }
.ctl .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ctl .ppl { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.ctl .pp { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border-radius: 14px; border: 1px solid var(--line); background: var(--deck-2); font-size: .8rem; font-weight: 600; }
.ctl .pp .por { --s: 54px; }
.ctl .pp.off { opacity: .35; filter: grayscale(1); }
.ctl .pp small { color: var(--mute); font-weight: 500; }
.ctl table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.ctl th, .ctl td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ctl th { color: var(--mute); font-weight: 600; }
.ctl .minimap { height: 360px; border-radius: 14px; overflow: hidden; position: relative; }
.ctl .log { max-height: 280px; overflow-y: auto; font-size: .86rem; }
.ctl .log div { padding: 4px 0; border-bottom: 1px solid var(--line); }
.ctl .status { font-family: var(--mono); padding: 6px 12px; border-radius: 10px; background: var(--deck-2); }
.dotc { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--mute); }
.dotc.on { background: var(--mint); }
.dotc.warn { background: var(--orange); }
.dotc.off { background: var(--red); }

.maplibregl-ctrl-attrib { font-size: 10px; background: rgba(7,11,28,.7) !important; color: var(--mute); }
.maplibregl-ctrl-attrib a { color: var(--mute); }
.game .maplibregl-ctrl-bottom-right { bottom: calc(196px + var(--safe-b)); }

.is-hunter .btn.primary { background: var(--red); color: #fff; }
.is-hunter .sheet .chip { color: #fff; }
