/* ============================================================
   GAMERS//RESPAWN  —  Neon HUD Design System
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Tektur:wght@500;600;700;800&family=Chakra+Petch:wght@300;400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

:root {
  /* --- base / surfaces --- */
  --bg:        #06060f;
  --bg-2:      #0a0a1a;
  --panel:     #0e0e22;
  --panel-2:   #12122e;
  --line:      rgba(120, 140, 220, 0.14);
  --line-hot:  rgba(0, 240, 255, 0.35);

  /* --- neon accents --- */
  --cyan:      #22e7ff;
  --cyan-dim:  #0aa8bd;
  --magenta:   #ff2d95;
  --magenta-2: #ff5db1;
  --lime:      #c6ff34;
  --amber:     #ffb020;
  --violet:    #8b6cff;

  /* --- text --- */
  --ink:       #eef0ff;
  --ink-soft:  #a7abd6;
  --ink-mute:  #6b6f9c;

  /* --- effects --- */
  --glow-cyan:    0 0 24px rgba(34, 231, 255, 0.45);
  --glow-magenta: 0 0 24px rgba(255, 45, 149, 0.45);
  --radius: 3px;

  --font-display: 'Tektur', sans-serif;
  --font-body:    'Chakra Petch', sans-serif;
  --font-mono:    'Space Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* ---- Atmospheric backdrop: drifting grid + glow blooms + scanlines ---- */
body::before {
  content: '';
  position: fixed;
  inset: -50%;
  z-index: -2;
  background-image:
    linear-gradient(rgba(80, 100, 200, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80, 100, 200, 0.05) 1px, transparent 1px);
  background-size: 46px 46px;
  transform: perspective(500px) rotateX(0deg);
  animation: grid-drift 40s linear infinite;
  pointer-events: none;
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60vw 60vw at 12% -5%,  rgba(255, 45, 149, 0.16), transparent 60%),
    radial-gradient(55vw 55vw at 92% 8%,   rgba(34, 231, 255, 0.15), transparent 60%),
    radial-gradient(70vw 50vw at 50% 110%, rgba(139, 108, 255, 0.14), transparent 60%);
}
@keyframes grid-drift {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 46px 460px, 460px 46px; }
}

/* faint scanline film over everything */
.scanlines {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  background: repeating-linear-gradient(
    to bottom, rgba(0,0,0,0) 0, rgba(0,0,0,0) 2px, rgba(0,0,0,0.18) 3px);
  mix-blend-mode: multiply; opacity: .5;
}

/* ---------------- layout ---------------- */
.wrap { width: 100%; max-width: 1500px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 56px); }

/* ---------------- HUD panel (the signature) ---------------- */
.panel {
  position: relative;
  background:
    linear-gradient(155deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.panel::before {
  /* glowing top rail */
  content: '';
  position: absolute; top: 0; left: 18px; right: 34px; height: 2px;
  background: linear-gradient(90deg, var(--cyan), transparent 70%);
  opacity: .8;
}
.panel:hover {
  border-color: var(--line-hot);
  box-shadow: var(--glow-cyan);
  transform: translateY(-3px);
}
.panel--magenta::before { background: linear-gradient(90deg, var(--magenta), transparent 70%); }
.panel--magenta:hover   { border-color: rgba(255,45,149,.4); box-shadow: var(--glow-magenta); }
.panel--lime::before    { background: linear-gradient(90deg, var(--lime), transparent 70%); }

/* corner tick decoration */
.panel .tick {
  position: absolute; width: 8px; height: 8px; border: 1px solid var(--line-hot);
  opacity: .6;
}
.panel .tick.tl { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.panel .tick.br { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }

/* ---------------- typography ---------------- */
h1, h2, h3, .display { font-family: var(--font-display); letter-spacing: .01em; line-height: 1.02; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: .72rem; letter-spacing: .32em; text-transform: uppercase;
  color: var(--cyan); display: inline-flex; align-items: center; gap: .6em;
}
.eyebrow::before { content: ''; width: 26px; height: 1px; background: var(--cyan); box-shadow: var(--glow-cyan); }

.mono { font-family: var(--font-mono); }
.hi-cyan { color: var(--cyan); }
.hi-mag  { color: var(--magenta); }
.hi-lime { color: var(--lime); }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: .6em; white-space: nowrap;
  font-family: var(--font-display); font-weight: 600; font-size: .92rem;
  letter-spacing: .04em; text-transform: uppercase; text-decoration: none;
  padding: .85em 1.5em; cursor: pointer; border: 0; color: var(--bg);
  background: var(--cyan);
  clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 11px, 100% 100%, 11px 100%, 0 calc(100% - 11px));
  transition: transform .18s, box-shadow .18s, background .18s;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--glow-cyan); }
.btn:active { transform: translateY(0); }
.btn--discord { background: #5865F2; color: #fff; box-shadow: 0 0 22px rgba(88,101,242,.4); }
.btn--discord:hover { box-shadow: 0 0 30px rgba(88,101,242,.6); }
.btn--ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line-hot); box-shadow: inset 0 0 0 rgba(0,0,0,0);
}
.btn--ghost:hover { color: var(--cyan); box-shadow: inset 0 0 22px rgba(34,231,255,.12); }

/* ---------------- chips / tags ---------------- */
.chip {
  display: inline-flex; align-items: center; gap: .45em;
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
  padding: .3em .7em; border: 1px solid var(--line);
  color: var(--ink-soft); background: rgba(255,255,255,.02);
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: var(--glow-cyan); }
.chip[data-plat="PC"]      .dot { background: var(--cyan);   box-shadow: 0 0 10px var(--cyan); }
.chip[data-plat="XBOX"]    .dot { background: var(--lime);   box-shadow: 0 0 10px var(--lime); }
.chip[data-plat="PS5"]     .dot { background: var(--violet); box-shadow: 0 0 10px var(--violet); }
.chip[data-plat="SWITCH"]  .dot { background: var(--magenta);box-shadow: 0 0 10px var(--magenta); }
.chip[data-plat="TABLE"]   .dot { background: var(--amber);  box-shadow: 0 0 10px var(--amber); }

/* ---------------- stat bar ---------------- */
.stat-row { margin-top: .7rem; }
.stat-row .label {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .08em;
  color: var(--ink-mute); text-transform: uppercase; margin-bottom: .35rem;
}
.stat-row .label b { color: var(--ink); font-weight: 700; }
.bar { height: 6px; background: rgba(255,255,255,.06); position: relative; overflow: hidden; }
.bar > span {
  position: absolute; inset: 0 100% 0 0; display: block;
  background: linear-gradient(90deg, var(--cyan-dim), var(--cyan));
  box-shadow: var(--glow-cyan);
}
.bar.mag > span { background: linear-gradient(90deg, #b31567, var(--magenta)); box-shadow: var(--glow-magenta); }
.bar.lime > span { background: linear-gradient(90deg, #7fa311, var(--lime)); box-shadow: 0 0 18px rgba(198,255,52,.4); }

/* ---------------- reveal on load ---------------- */
.reveal { opacity: 0; transform: translateY(18px); animation: reveal .8s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes reveal { to { opacity: 1; transform: none; } }

/* ---------------- nav ---------------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(12px);
  background: linear-gradient(to bottom, rgba(6,6,15,.85), rgba(6,6,15,.4));
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 1.5rem; }
.brand { font-family: var(--font-display); font-weight: 800; font-size: 1.28rem; letter-spacing: .02em; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand .slash { color: var(--magenta); }
.brand .respawn { color: var(--cyan); text-shadow: var(--glow-cyan); }
.nav-links { display: flex; gap: 1.15rem; margin-left: auto; }
.nav-links a {
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
  color: var(--ink-soft); text-decoration: none; transition: color .2s; position: relative;
}
.nav-links a::after { content: ''; position: absolute; left: 0; bottom: -6px; width: 0; height: 1px; background: var(--cyan); transition: width .25s; }
.nav-links a:hover { color: var(--cyan); }
.nav-links a:hover::after { width: 100%; }
/* keep the top bar to one line: compact the right-side nav buttons */
.nav .wrap > .btn { padding: .5em .95em; font-size: .8rem; }
.nav .wrap { gap: 1rem; }

@media (max-width: 900px) { .nav-links { display: none; } }

/* ---------------- footer ---------------- */
.foot { border-top: 1px solid var(--line); margin-top: 6rem; padding: 3rem 0 2.5rem; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; align-items: center; }
.foot p { color: var(--ink-mute); font-family: var(--font-mono); font-size: .78rem; letter-spacing: .06em; }

/* ============================================================
   WATCH_DOGS // ctOS surveillance layer
   ============================================================ */

/* --- fixed ctOS status HUD (bottom-left) --- */
.ctos-hud {
  position: fixed; left: 18px; bottom: 16px; z-index: 200;
  font-family: var(--font-mono); font-size: .62rem; letter-spacing: .14em;
  color: var(--cyan); text-transform: uppercase; pointer-events: none;
  border-left: 2px solid var(--cyan); padding: .35rem .7rem;
  background: linear-gradient(90deg, rgba(34,231,255,.08), transparent);
  text-shadow: 0 0 8px rgba(34,231,255,.5);
}
.ctos-hud .live { color: var(--lime); }
.ctos-hud b { color: var(--ink); }
.ctos-hud .blink { animation: ct-blink 1.1s steps(1) infinite; }
@keyframes ct-blink { 50% { opacity: .15; } }
@media (max-width: 620px) { .ctos-hud { display: none; } }

/* --- surveillance data ticker --- */
.ticker {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: rgba(34,231,255,.03); overflow: hidden; white-space: nowrap;
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .14em;
  color: var(--ink-mute); text-transform: uppercase; padding: .5rem 0;
}
.ticker .track { display: inline-block; padding-left: 100%; animation: ticker 34s linear infinite; }
.ticker .track span { margin: 0 1.6rem; }
.ticker .track b { color: var(--cyan); }
.ticker .track .hot { color: var(--magenta); }
@keyframes ticker { to { transform: translateX(-100%); } }

/* --- ctOS scan frame: targeting brackets that sweep --- */
.scan-frame { position: relative; display: inline-block; }
.scan-frame::before, .scan-frame::after {
  content: ''; position: absolute; inset: -9px; pointer-events: none;
  border: 1.5px solid var(--cyan); opacity: .8;
}
.scan-frame::before { clip-path: polygon(0 0,34% 0,34% 3px,3px 3px,3px 34%,0 34%, 0 100%,3px 100%,3px 66%,0 66%); }
/* corner brackets via box-shadow trick */
.scan-frame .bracket { position: absolute; width: 16px; height: 16px; border: 2px solid var(--cyan); box-shadow: 0 0 8px rgba(34,231,255,.6); }
.scan-frame .bracket.tl { top: -9px; left: -9px; border-right: 0; border-bottom: 0; }
.scan-frame .bracket.tr { top: -9px; right: -9px; border-left: 0; border-bottom: 0; }
.scan-frame .bracket.bl { bottom: -9px; left: -9px; border-right: 0; border-top: 0; }
.scan-frame .bracket.br { bottom: -9px; right: -9px; border-left: 0; border-top: 0; }
.scan-frame::after {
  /* sweeping scan line */
  border: 0; inset: -9px; background: linear-gradient(to bottom, transparent, rgba(34,231,255,.35), transparent);
  height: 26px; animation: scan-sweep 2.6s ease-in-out infinite; opacity: .7;
  clip-path: none;
}
@keyframes scan-sweep { 0% { transform: translateY(-8px); opacity: 0; } 30% { opacity: .8; } 70% { opacity: .8; } 100% { transform: translateY(118px); opacity: 0; } }

/* --- ctOS profiler readout block --- */
.profiler {
  font-family: var(--font-mono); border: 1px solid var(--line-hot);
  background: linear-gradient(160deg, rgba(34,231,255,.06), rgba(6,6,15,.4));
  padding: .9rem 1.1rem; position: relative;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}
.profiler .pf-tag {
  position: absolute; top: -1px; right: 10px; font-size: .56rem; letter-spacing: .22em;
  color: var(--bg); background: var(--cyan); padding: .15em .6em; text-transform: uppercase;
}
.profiler .pf-line { display: flex; justify-content: space-between; gap: 1rem; font-size: .7rem; letter-spacing: .08em; padding: .18rem 0; text-transform: uppercase; }
.profiler .pf-line span { color: var(--ink-mute); }
.profiler .pf-line b { color: var(--ink); font-weight: 700; }
.profiler .pf-line b.threat { color: var(--magenta); text-shadow: var(--glow-magenta); }
.profiler .pf-trait { margin-top: .5rem; padding-top: .5rem; border-top: 1px dashed var(--line); font-size: .68rem; color: var(--cyan); letter-spacing: .06em; }
.profiler .pf-trait::before { content: '▸ TRAIT: '; color: var(--ink-mute); }

/* --- hackable triangle marker (Watch Dogs "hack this") --- */
.hackable { position: absolute; top: 12px; right: 14px; z-index: 3; cursor: pointer; }
.hackable .tri {
  width: 0; height: 0; border-left: 9px solid transparent; border-right: 9px solid transparent;
  border-bottom: 15px solid var(--cyan); filter: drop-shadow(0 0 6px rgba(34,231,255,.7));
  animation: hack-pulse 1.8s ease-in-out infinite;
}
.hackable .tri.mag { border-bottom-color: var(--magenta); filter: drop-shadow(0 0 6px rgba(255,45,149,.7)); }
.hackable .tri.lime { border-bottom-color: var(--lime); filter: drop-shadow(0 0 6px rgba(198,255,52,.7)); }
@keyframes hack-pulse { 0%,100% { opacity: .5; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.1); } }
.hackable .hint {
  position: absolute; top: 20px; right: 0; font-family: var(--font-mono); font-size: .56rem; letter-spacing: .18em;
  color: var(--cyan); text-transform: uppercase; opacity: 0; transform: translateY(-3px); transition: .2s; white-space: nowrap;
  background: var(--bg); border: 1px solid var(--line-hot); padding: .2em .5em;
}
.hackable:hover .hint { opacity: 1; transform: none; }

/* --- DedSec glitch accent --- */
.dedsec {
  font-family: var(--font-mono); font-weight: 700; letter-spacing: .12em; text-transform: lowercase;
  color: var(--ink); position: relative; display: inline-block;
}
.dedsec::before, .dedsec::after {
  content: 'dedsec_'; position: absolute; left: 0; top: 0; opacity: .9; clip-path: inset(0 0 0 0);
}
.dedsec::before { color: var(--magenta); animation: ds-glitch 3.5s infinite steps(1); }
.dedsec::after  { color: var(--cyan);    animation: ds-glitch 3.5s .1s infinite steps(1); }
@keyframes ds-glitch {
  0%, 88%, 100% { opacity: 0; transform: none; }
  90% { opacity: .8; transform: translate(-2px, 1px); }
  93% { opacity: .8; transform: translate(2px, -1px); }
  96% { opacity: .4; transform: translate(-1px, 0); }
}

/* ============================================================
   FULL ctOS  //  boot · matrix · glitch · surveillance · hack
   ============================================================ */

/* --- matrix data-rain (canvas, deep background) --- */
.matrix-rain { position: fixed; inset: 0; z-index: -3; opacity: .10; pointer-events: none; }

/* --- film grain / noise overlay --- */
.noise {
  position: fixed; inset: 0; z-index: 9998; pointer-events: none; opacity: .04; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --- occasional full-screen glitch flicker --- */
.glitch-flicker {
  position: fixed; inset: 0; z-index: 9997; pointer-events: none; opacity: 0; mix-blend-mode: screen;
  background: linear-gradient(90deg, rgba(255,45,149,.25), transparent 40%, rgba(34,231,255,.25));
}
.glitch-flicker.on { animation: flick .32s steps(2) 1; }
@keyframes flick { 0%{opacity:0;transform:translateX(0)} 20%{opacity:.9;transform:translateX(-6px)} 45%{opacity:.2;transform:translateX(5px)} 70%{opacity:.7;transform:translateX(-3px)} 100%{opacity:0;transform:translateX(0)} }

/* --- surveillance camera HUD (top-right) --- */
/* slim single-line surveillance readout pinned above the ticker (top edge of the nav band) */
.cam-hud {
  position: fixed; top: 5px; right: 20px; z-index: 101; pointer-events: none;
  display: flex; align-items: center; gap: .9rem;
  font-family: var(--font-mono); font-size: .54rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-mute);
}
.cam-hud .rec { color: var(--magenta); }
.cam-hud .rec::before { content: '●'; margin-right: .4em; animation: ct-blink 1.1s steps(1) infinite; }
.cam-hud .cross { display: none; }
@media (max-width: 900px) { .cam-hud { display: none; } }

/* --- ctOS boot / uplink overlay --- */
.boot {
  position: fixed; inset: 0; z-index: 10000; background: #04040c;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  padding: 0 clamp(1.5rem, 8vw, 8rem); font-family: var(--font-mono); color: var(--cyan);
  transition: opacity .5s, visibility .5s;
}
.boot.done { opacity: 0; visibility: hidden; }
.boot .bl { font-size: clamp(.72rem, 1.6vw, .95rem); letter-spacing: .08em; line-height: 2; text-shadow: 0 0 8px rgba(34,231,255,.5); white-space: pre; }
.boot .bl .ok { color: var(--lime); }
.boot .bl .warn { color: var(--magenta); }
.boot .btitle { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.6rem, 6vw, 3.4rem); color: var(--ink); margin: 1.4rem 0 .4rem; letter-spacing: .04em; text-transform: uppercase; opacity: 0; }
.boot .btitle.show { opacity: 1; animation: reveal .5s; }
.boot .btitle .respawn { color: var(--cyan); text-shadow: var(--glow-cyan); }
.boot .bprog { width: min(420px, 70vw); height: 4px; background: rgba(255,255,255,.08); margin-top: 1.4rem; overflow: hidden; }
.boot .bprog > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan-dim), var(--cyan)); box-shadow: var(--glow-cyan); }
.boot .skip { position: absolute; bottom: 2rem; right: clamp(1.5rem,8vw,8rem); font-size: .64rem; letter-spacing: .2em; color: var(--ink-mute); text-transform: uppercase; }
.boot .skip b { color: var(--cyan); }

/* --- RGB-split glitch text --- */
.glitch { position: relative; display: inline-block; }
.glitch::before, .glitch::after {
  content: attr(data-text); position: absolute; inset: 0; pointer-events: none;
  clip-path: inset(0 0 0 0); opacity: .0;
}
.glitch::before { color: var(--magenta); }
.glitch::after  { color: var(--cyan); }
.glitch.go::before { animation: gl-a 2.6s infinite steps(2); }
.glitch.go::after  { animation: gl-b 2.9s infinite steps(2); }
@keyframes gl-a { 0%,90%,100%{opacity:0;transform:none} 92%{opacity:.85;transform:translate(-3px,-1px)} 96%{opacity:.6;transform:translate(2px,1px)} }
@keyframes gl-b { 0%,88%,100%{opacity:0;transform:none} 90%{opacity:.85;transform:translate(3px,1px)} 95%{opacity:.6;transform:translate(-2px,-1px)} }
/* burst on demand (JS toggles) */
.glitch.burst::before { animation: gl-a .28s steps(2) 2; opacity:.9; }
.glitch.burst::after  { animation: gl-b .28s steps(2) 2; opacity:.9; }

/* scramble/decrypt: dim while resolving */
[data-scramble].scrambling { color: var(--cyan); text-shadow: 0 0 10px rgba(34,231,255,.5); }

/* --- DedSec skull glyph --- */
.skull { width: 1em; height: 1em; display: inline-block; vertical-align: -.14em; fill: currentColor; filter: drop-shadow(0 0 6px currentColor); }

/* --- hack interaction states --- */
.char.hacking, .panel.hacking { animation: hack-shake .32s steps(2) infinite; }
@keyframes hack-shake { 0%,100%{transform:translate(0,0)} 25%{transform:translate(-2px,1px)} 50%{transform:translate(2px,-1px)} 75%{transform:translate(-1px,-1px)} }
.char .hackbar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(34,231,255,.15); overflow: hidden; opacity: 0; transition: opacity .2s; }
.char.hacking .hackbar { opacity: 1; }
.char .hackbar > i { display: block; height: 100%; width: 0; background: var(--cyan); box-shadow: var(--glow-cyan); }
.char.hacked { border-color: var(--lime) !important; }
.char.hacked .hackable .tri { border-bottom-color: var(--lime) !important; }
.char .decrypt-flash {
  position: absolute; inset: 0; display: grid; place-items: center; z-index: 5; pointer-events: none;
  background: rgba(4,4,12,.82); font-family: var(--font-mono); letter-spacing: .2em; text-transform: uppercase;
  color: var(--lime); font-weight: 700; font-size: .8rem; opacity: 0;
}
.char .decrypt-flash.show { animation: decrypt .9s ease-out forwards; }
@keyframes decrypt { 0%{opacity:0} 12%{opacity:1} 80%{opacity:1} 100%{opacity:0} }

/* --- terminal command divider --- */
.cmd { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .1em; color: var(--ink-mute); text-transform: uppercase; }
.cmd b { color: var(--cyan); }
.cmd .caret { color: var(--cyan); animation: ct-blink 1s steps(1) infinite; }

/* --- toast --- */
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px); z-index: 300;
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--bg); background: var(--lime); padding: .7em 1.3em; opacity: 0; transition: .35s;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  box-shadow: 0 0 26px rgba(198,255,52,.5);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .matrix-rain, .glitch-flicker, .cam-hud .rec::before { animation: none !important; }
  .glitch.go::before, .glitch.go::after { animation: none !important; }
}

/* ============================================================
   ctOS TERMINAL
   ============================================================ */
.term-tab {
  position: fixed; bottom: 16px; right: 18px; z-index: 210; cursor: pointer;
  font-family: var(--font-mono); font-size: .6rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--cyan); border: 1px solid var(--line-hot); padding: .4em .8em;
  background: rgba(34,231,255,.06); transition: .2s;
}
.term-tab:hover { background: rgba(34,231,255,.16); box-shadow: var(--glow-cyan); }
.term-tab b { color: var(--ink); }

.term {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9000;
  background: rgba(4,6,14,.97); border-bottom: 2px solid var(--cyan);
  box-shadow: 0 10px 44px rgba(34,231,255,.22);
  height: 0; overflow: hidden; transition: height .28s cubic-bezier(.3,.8,.3,1);
}
.term.open { height: min(360px, 62vh); }
.term-bar { display: flex; align-items: center; gap: .6rem; padding: .5rem 1.1rem; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: .64rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-mute); }
.term-bar .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--magenta); box-shadow: 0 0 8px var(--magenta); }
.term-bar .dot.g { background: var(--lime); box-shadow: 0 0 8px var(--lime); }
.term-bar .x { margin-left: auto; cursor: pointer; color: var(--ink-soft); }
.term-bar .x:hover { color: var(--magenta); }
.term-out { padding: 1rem 1.2rem; height: calc(100% - 40px - 46px); overflow-y: auto; font-family: var(--font-mono); font-size: .82rem; line-height: 1.75; color: var(--ink-soft); white-space: pre-wrap; }
.term-out .u { color: var(--lime); } .term-out .c { color: var(--cyan); } .term-out .m { color: var(--magenta); } .term-out .dim { color: var(--ink-mute); } .term-out b { color: var(--ink); }
.term-in { display: flex; align-items: center; gap: .6rem; padding: .7rem 1.2rem; border-top: 1px solid var(--line); }
.term-in .pr { color: var(--lime); font-family: var(--font-mono); font-weight: 700; }
.term-in input { flex: 1; background: transparent; border: 0; outline: 0; color: var(--ink); font-family: var(--font-mono); font-size: .84rem; caret-color: var(--cyan); }

/* ============================================================
   MODAL / OVERLAY / FORMS
   ============================================================ */
.overlay { position: fixed; inset: 0; z-index: 9500; background: rgba(3,3,10,.82); backdrop-filter: blur(7px); display: none; place-items: center; padding: 1.5rem; }
.overlay.open { display: grid; animation: reveal .28s; }
.modal {
  width: min(600px, 100%); max-height: 90vh; overflow-y: auto; position: relative;
  background: linear-gradient(160deg, var(--panel-2), var(--panel)); border: 1px solid var(--line-hot);
  box-shadow: 0 0 50px rgba(34,231,255,.18);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  padding: 1.8rem 1.9rem 2rem;
}
.modal::before { content: ''; position: absolute; top: 0; left: 20px; right: 40px; height: 2px; background: linear-gradient(90deg, var(--cyan), transparent 70%); }
.modal .m-eyebrow { font-family: var(--font-mono); font-size: .64rem; letter-spacing: .24em; text-transform: uppercase; color: var(--cyan); }
.modal h3 { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: 1.5rem; margin: .3rem 0 1.3rem; }
.modal .close { position: absolute; top: 1rem; right: 1.1rem; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--ink-soft); cursor: pointer; font-size: 1rem; background: transparent; transition: .2s; }
.modal .close:hover { border-color: var(--magenta); color: var(--magenta); }

.field { margin-bottom: 1.05rem; }
.field > label { display: block; font-family: var(--font-mono); font-size: .64rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: .4rem; }
.field input, .field select, .field textarea {
  width: 100%; background: rgba(255,255,255,.03); border: 1px solid var(--line); color: var(--ink);
  padding: .72em .85em; font-family: var(--font-body); font-size: .95rem; transition: .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34,231,255,.12); }
.field select option { background: var(--panel); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.seg { display: flex; gap: .4rem; flex-wrap: wrap; }
.seg button {
  flex: 1; min-width: 70px; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  padding: .6em .4em; border: 1px solid var(--line); background: transparent; color: var(--ink-soft); cursor: pointer; transition: .18s;
}
.seg button:hover { border-color: var(--line-hot); color: var(--cyan); }
.seg button.on { background: var(--cyan); color: var(--bg); border-color: var(--cyan); box-shadow: var(--glow-cyan); }
.modal .actions { display: flex; gap: .7rem; margin-top: 1.4rem; }
.modal .actions .btn { flex: 1; justify-content: center; }

/* ============================================================
   ctOS DOSSIER
   ============================================================ */
.dossier-scan { font-family: var(--font-mono); font-size: .8rem; color: var(--cyan); line-height: 1.9; min-height: 120px; }
.dossier-scan .ok { color: var(--lime); }
.dossier-body { font-family: var(--font-body); color: var(--ink-soft); line-height: 1.7; white-space: pre-wrap; }
.dossier-body strong { color: var(--cyan); }
.dossier-body .th { color: var(--magenta); font-weight: 700; }
.dossier-meta { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1rem 0; }
.dossier-cursor::after { content: '▮'; color: var(--cyan); animation: ct-blink 1s steps(1) infinite; }
.ai-badge { font-family: var(--font-mono); font-size: .58rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-mute); border: 1px solid var(--line); padding: .25em .6em; display: inline-block; }

/* ============================================================
   PARTY FINDER / LFG
   ============================================================ */
.lfg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.2rem; }
.lfg { padding: 1.5rem; display: flex; flex-direction: column; }
.lfg .lfg-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: .5rem; }
.lfg .game { font-family: var(--font-mono); font-size: .64rem; letter-spacing: .16em; text-transform: uppercase; color: var(--cyan); }
.lfg h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; text-transform: uppercase; margin: .15rem 0 .5rem; line-height: 1.1; }
.lfg .desc { color: var(--ink-soft); font-size: .92rem; margin-bottom: 1rem; }
.lfg .lfg-meta { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.lfg .slots { margin-top: auto; }
.lfg .slots .label { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: .4rem; }
.lfg .slots .label b { color: var(--lime); }
.lfg .pips { display: flex; gap: .3rem; }
.lfg .pips i { flex: 1; height: 6px; background: rgba(255,255,255,.08); }
.lfg .pips i.f { background: var(--lime); box-shadow: 0 0 10px rgba(198,255,52,.5); }
.lfg .when { font-family: var(--font-mono); font-size: .66rem; color: var(--ink-mute); letter-spacing: .08em; }
.lfg .join { margin-top: 1.1rem; }

/* ============================================================
   ARCADE LAYER — reticle cursor · sfx dock · XP · achievements · compare · konami
   ============================================================ */

/* --- custom targeting reticle cursor --- */
.reticle { position: fixed; left: 0; top: 0; width: 30px; height: 30px; margin: -15px 0 0 -15px; z-index: 9996; pointer-events: none; will-change: transform; transition: width .14s, height .14s, margin .14s; }
.reticle .h, .reticle .v { position: absolute; background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }
.reticle .h { top: 50%; left: -5px; right: -5px; height: 1px; transform: translateY(-.5px); }
.reticle .v { left: 50%; top: -5px; bottom: -5px; width: 1px; transform: translateX(-.5px); }
.reticle .b { position: absolute; width: 8px; height: 8px; border: 1.5px solid var(--cyan); box-shadow: 0 0 6px var(--cyan); }
.reticle .b.tl { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.reticle .b.tr { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.reticle .b.bl { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.reticle .b.br { bottom: 0; right: 0; border-left: 0; border-top: 0; }
.reticle .dot { position: absolute; top: 50%; left: 50%; width: 3px; height: 3px; margin: -1.5px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }
.reticle.lock { width: 46px; height: 46px; margin: -23px 0 0 -23px; }
.reticle.lock .h, .reticle.lock .v, .reticle.lock .dot { background: var(--magenta); box-shadow: 0 0 8px var(--magenta); }
.reticle.lock .b { border-color: var(--magenta); box-shadow: 0 0 8px var(--magenta); }
.reticle.click .b { animation: ret-click .3s ease-out; }
@keyframes ret-click { 0% { transform: scale(1); } 50% { transform: scale(1.7); } 100% { transform: scale(1); } }
body.reticle-on { cursor: none; }
body.reticle-on a, body.reticle-on button, body.reticle-on .hackable, body.reticle-on .fbtn, body.reticle-on .seg button { cursor: none; }
body.reticle-on input, body.reticle-on textarea, body.reticle-on select { cursor: auto; }
@media (hover: none) { .reticle { display: none !important; } body.reticle-on { cursor: auto !important; } }

/* --- mini toggle buttons (sfx / cursor) --- */
.mini-toggle { position: fixed; right: 18px; z-index: 211; font-family: var(--font-mono); font-size: .58rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); border: 1px solid var(--line); padding: .42em .7em; background: rgba(10,10,26,.85); cursor: pointer; transition: .2s; }
.mini-toggle:hover { border-color: var(--line-hot); color: var(--cyan); }
.mini-toggle.off { opacity: .5; }

/* --- XP panel --- */
.xp-panel { padding: 1.4rem 1.7rem; }
.xp-top { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }
.xp-lvl { font-family: var(--font-display); font-weight: 800; font-size: 2rem; color: var(--cyan); text-shadow: var(--glow-cyan); line-height: 1; }
.xp-lvl small { display: block; font-family: var(--font-mono); font-size: .58rem; letter-spacing: .2em; color: var(--ink-mute); margin-top: .2rem; }
.xp-info { flex: 1; min-width: 200px; }
.xp-info .row { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: .4rem; }
.xp-info .row b { color: var(--ink); }
.xp-bar { height: 8px; background: rgba(255,255,255,.06); overflow: hidden; }
.xp-bar > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan-dim), var(--cyan)); box-shadow: var(--glow-cyan); transition: width .8s cubic-bezier(.2,.7,.2,1); }
.xp-count { font-family: var(--font-mono); font-size: .72rem; color: var(--lime); letter-spacing: .1em; }

/* --- achievements grid --- */
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.ach { padding: 1.05rem 1.15rem; display: flex; gap: .9rem; align-items: center; opacity: .45; filter: grayscale(1); transition: opacity .4s, filter .4s, border-color .4s; }
.ach.un { opacity: 1; filter: none; }
.ach .ico { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; font-size: 1.25rem; color: var(--ink-soft); border: 1px solid var(--line); clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px)); }
.ach.un .ico { color: var(--lime); border-color: var(--lime); box-shadow: 0 0 16px rgba(198,255,52,.3); }
.ach .n { font-family: var(--font-display); font-weight: 700; font-size: .95rem; text-transform: uppercase; }
.ach .d { font-family: var(--font-mono); font-size: .6rem; color: var(--ink-mute); letter-spacing: .03em; margin-top: .15rem; }
.ach .xpv { margin-left: auto; align-self: flex-start; font-family: var(--font-mono); font-size: .58rem; color: var(--cyan); letter-spacing: .06em; }
.ach.un .xpv { color: var(--lime); }
.ach.pop { animation: ach-pop .6s ease-out; }
@keyframes ach-pop { 0% { transform: scale(1); } 30% { transform: scale(1.05); box-shadow: 0 0 30px rgba(198,255,52,.5); } 100% { transform: scale(1); } }

/* --- achievement unlock toast (richer than plain toast) --- */
.ach-toast { position: fixed; top: 84px; left: 50%; transform: translateX(-50%) translateY(-20px); z-index: 320; display: flex; gap: .8rem; align-items: center; background: linear-gradient(160deg, var(--panel-2), var(--panel)); border: 1px solid var(--lime); padding: .8rem 1.2rem; opacity: 0; transition: .4s; box-shadow: 0 0 34px rgba(198,255,52,.35); clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px)); }
.ach-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.ach-toast .ai { width: 38px; height: 38px; display: grid; place-items: center; font-size: 1.2rem; color: var(--lime); border: 1px solid var(--lime); }
.ach-toast .at-k { font-family: var(--font-mono); font-size: .56rem; letter-spacing: .2em; text-transform: uppercase; color: var(--lime); }
.ach-toast .at-n { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; }
.ach-toast .at-x { font-family: var(--font-mono); font-size: .62rem; color: var(--cyan); }

/* --- compare profiles --- */
.cmp-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.4rem; }
.cmp-who { flex: 1; text-align: center; }
.cmp-av { width: 52px; height: 52px; margin: 0 auto .45rem; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; color: #fff; clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px)); }
.cmp-who .nm { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: 1rem; }
.cmp-who .th { font-family: var(--font-mono); font-size: .58rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute); }
.cmp-vs { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; color: var(--magenta); text-shadow: var(--glow-magenta); }
.cmp-row { margin: .85rem 0; }
.cmp-row .clab { text-align: center; font-family: var(--font-mono); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: .35rem; }
.cmp-duel { display: grid; grid-template-columns: 54px 1fr 54px; gap: .7rem; align-items: center; }
.cmp-duel .mid { display: grid; gap: .3rem; min-width: 0; }
.cmp-duel .val { font-family: var(--font-display); font-weight: 700; font-size: 1rem; }
.cmp-duel .val.l { text-align: right; }
.cmp-duel .val.win { color: var(--lime); text-shadow: 0 0 10px rgba(198,255,52,.4); }
.cmp-duel .mb { height: 7px; background: rgba(255,255,255,.06); overflow: hidden; position: relative; }
.cmp-duel .mb > i { position: absolute; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, var(--cyan-dim), var(--cyan)); box-shadow: var(--glow-cyan); transition: width .7s; }
.cmp-duel .mb.l > i { right: 0; background: linear-gradient(270deg, #b31567, var(--magenta)); box-shadow: var(--glow-magenta); }
.cmp-result { text-align: center; margin-top: 1.4rem; font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: 1.1rem; }
.cmp-result b { color: var(--lime); text-shadow: 0 0 12px rgba(198,255,52,.4); }

/* --- konami system-compromised takeover --- */
.konami { position: fixed; inset: 0; z-index: 11000; background: #05000a; display: grid; place-items: center; text-align: center; cursor: pointer; animation: reveal .2s; }
.konami .inner { animation: kn-glitch .18s steps(2) infinite; }
.konami .sk { width: 110px; height: 110px; color: var(--cyan); filter: drop-shadow(0 0 24px currentColor); }
.konami h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.8rem, 7vw, 4.4rem); color: var(--magenta); text-transform: uppercase; text-shadow: 3px 0 var(--cyan), -3px 0 var(--lime); margin: 1rem 0 .4rem; }
.konami p { font-family: var(--font-mono); font-size: .8rem; letter-spacing: .24em; text-transform: uppercase; color: var(--ink-soft); }
.konami small { font-family: var(--font-mono); font-size: .62rem; letter-spacing: .2em; color: var(--ink-mute); display: block; margin-top: 1.6rem; }
@keyframes kn-glitch { 0%,100% { transform: none; } 25% { transform: translate(-4px, 2px); } 50% { transform: translate(3px, -2px); } 75% { transform: translate(-2px, -1px); } }

/* --- LEVEL-UP CELEBRATION --- */
.levelup { position: fixed; inset: 0; z-index: 12000; display: grid; place-items: center; cursor: pointer;
  background: radial-gradient(circle at 50% 45%, rgba(34,231,255,.14), rgba(3,3,10,.86) 60%);
  opacity: 0; transition: opacity .35s; }
.levelup.show { opacity: 1; }
.levelup .lu-inner { text-align: center; transform: scale(.85); transition: transform .45s cubic-bezier(.16,1.2,.3,1); }
.levelup.show .lu-inner { transform: scale(1); }
.lu-eyebrow { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .34em; text-transform: uppercase; color: var(--cyan); text-shadow: var(--glow-cyan); }
.lu-ring { width: 168px; height: 168px; margin: 1.4rem auto 1.2rem; display: grid; place-items: center; position: relative;
  border: 2px solid var(--cyan); border-radius: 50%; box-shadow: var(--glow-cyan), inset 0 0 30px rgba(34,231,255,.2); animation: lu-spin 8s linear infinite; }
.lu-ring::before { content: ''; position: absolute; inset: -10px; border: 1px dashed rgba(34,231,255,.4); border-radius: 50%; }
.lu-ring span { font-family: var(--font-display); font-weight: 800; font-size: 5rem; line-height: 1; color: #fff; text-shadow: var(--glow-cyan); animation: lu-count .5s cubic-bezier(.16,1.4,.3,1); }
.lu-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.6rem, 6vw, 3rem); text-transform: uppercase; color: var(--magenta); text-shadow: 2px 0 var(--cyan), -2px 0 var(--lime); }
.lu-rank { font-family: var(--font-mono); font-size: .82rem; letter-spacing: .2em; text-transform: uppercase; color: var(--lime); margin-top: .8rem; animation: lu-pulse 1s ease-in-out infinite; }
.lu-rank b { color: #fff; }
.levelup small { display: block; margin-top: 1.8rem; font-family: var(--font-mono); font-size: .62rem; letter-spacing: .2em; color: var(--ink-mute); }
@keyframes lu-spin { to { transform: rotate(360deg); } }
@keyframes lu-count { from { transform: scale(.3); opacity: 0; } }
@keyframes lu-pulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }
.lu-ring span, .lu-title { animation-fill-mode: both; }

/* --- hero XP-to-next-level bar (dashboard) --- */
.lvl-prog { width: 120px; margin-top: .35rem; }
.lvl-prog .track { height: 4px; background: rgba(255,255,255,.08); overflow: hidden; }
.lvl-prog .track > i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--lime)); transition: width .8s cubic-bezier(.2,.7,.2,1); }
.lvl-prog .cap { font-family: var(--font-mono); font-size: .56rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute); margin-top: .3rem; text-align: right; }

/* --- HACK MINIGAME (breach protocol) --- */
.hackgame { position: fixed; inset: 0; z-index: 11500; display: grid; place-items: center; padding: 1.2rem;
  background: radial-gradient(circle at 50% 40%, rgba(34,231,255,.08), rgba(3,3,10,.92) 65%); opacity: 0; transition: opacity .3s; }
.hackgame.open { opacity: 1; }
.hg-box { width: min(520px, 100%); background: linear-gradient(160deg, var(--panel-2, #0d0d1f), var(--panel, #080814)); border: 1px solid var(--line-hot);
  box-shadow: 0 24px 70px rgba(0,0,0,.6), 0 0 40px rgba(34,231,255,.12); position: relative; transform: scale(.94); transition: transform .3s cubic-bezier(.16,1.1,.3,1);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px)); padding: 1.3rem 1.4rem 1.4rem; }
.hackgame.open .hg-box { transform: scale(1); }
.hg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.hg-eye { font-family: var(--font-mono); font-size: .62rem; letter-spacing: .22em; text-transform: uppercase; color: var(--cyan); text-shadow: var(--glow-cyan); }
.hg-name { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 1.15rem; margin-top: .25rem; }
.hg-timer { font-family: var(--font-mono); font-weight: 700; font-size: 1.15rem; color: var(--cyan); border: 1px solid var(--line-hot); padding: .2em .5em; letter-spacing: .06em; }
.hg-timer.low { color: var(--magenta); border-color: var(--magenta); box-shadow: var(--glow-magenta); animation: hg-blink .6s steps(2) infinite; }
@keyframes hg-blink { 50% { opacity: .5; } }
.hg-stage { display: flex; align-items: center; gap: .5rem; position: relative; }
.hg-src, .hg-tgt { position: absolute; font-size: 1.1rem; color: var(--ink-mute); transform: translateY(-50%); transition: color .2s, text-shadow .2s; }
.hg-src { left: -.2rem; } .hg-tgt { right: -.2rem; }
.hg-src.live { color: var(--cyan); text-shadow: var(--glow-cyan); }
.hg-tgt.live { color: var(--lime); text-shadow: 0 0 12px var(--lime); }
.hg-grid { flex: 1; display: grid; grid-template-columns: repeat(var(--cols, 5), 1fr); gap: 4px; margin: 0 1.1rem; }
.hg-tile { aspect-ratio: 1; background: rgba(255,255,255,.02); border: 1px solid var(--line); cursor: pointer; padding: 0; display: grid; place-items: center; transition: background .15s, border-color .15s; }
.hg-tile:hover { border-color: var(--line-hot); background: rgba(34,231,255,.05); }
.hg-tile.on { border-color: var(--cyan); background: rgba(34,231,255,.06); }
.hg-tile svg { width: 100%; height: 100%; }
.hg-tile svg path { stroke: var(--ink-mute); stroke-width: 4; fill: none; stroke-linecap: round; transition: stroke .2s; }
.hg-tile svg circle { fill: var(--ink-mute); transition: fill .2s; }
.hg-tile svg.pw path { stroke: var(--cyan); filter: drop-shadow(0 0 4px var(--cyan)); }
.hg-tile svg.pw circle { fill: var(--cyan); }
.hg-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.2rem; flex-wrap: wrap; }
.hg-hint { font-family: var(--font-mono); font-size: .68rem; color: var(--ink-soft); flex: 1; min-width: 180px; }
.hg-hint b { color: var(--cyan); }
.hg-btns { display: flex; gap: .5rem; }
.hg-btns .btn { font-size: .68rem; padding: .5em .85em; }
.hg-flash { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.2rem, 5vw, 2rem); text-transform: uppercase; letter-spacing: .06em;
  opacity: 0; pointer-events: none; background: rgba(3,3,10,.55); }
.hg-flash.show { opacity: 1; animation: hg-pop .3s; }
.hg-flash.ok { color: var(--lime); text-shadow: 0 0 20px var(--lime); }
.hg-flash.bad { color: var(--magenta); text-shadow: var(--glow-magenta); }
@keyframes hg-pop { from { transform: scale(.8); } }
@media (max-width: 520px) { .hg-grid { margin: 0 .8rem; } }

/* --- ctOS PROFILER scan-card (Watch Dogs hover dossier) --- */
.scancard { position: fixed; z-index: 9800; width: 258px; padding: .85rem .9rem 1rem; pointer-events: none;
  background: linear-gradient(155deg, rgba(13,13,31,.98), rgba(6,6,16,.98)); border: 1px solid var(--cyan);
  box-shadow: 0 12px 40px rgba(0,0,0,.6), 0 0 26px rgba(34,231,255,.16); overflow: hidden;
  clip-path: polygon(0 10px, 10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  opacity: 0; transform: translateY(6px) scale(.97); transition: opacity .16s, transform .16s; }
.scancard.show { opacity: 1; transform: none; }
.sc-b { position: absolute; width: 12px; height: 12px; border: 2px solid var(--cyan); pointer-events: none; }
.sc-b.tl { top: 5px; left: 5px; border-right: 0; border-bottom: 0; }
.sc-b.tr { top: 5px; right: 5px; border-left: 0; border-bottom: 0; }
.sc-b.bl { bottom: 5px; left: 5px; border-right: 0; border-top: 0; }
.sc-b.br { bottom: 5px; right: 5px; border-left: 0; border-top: 0; }
.sc-scan { position: absolute; left: 0; right: 0; height: 40px; top: -40px; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(34,231,255,.14), transparent); animation: sc-sweep 2.2s linear infinite; }
@keyframes sc-sweep { to { top: 100%; } }
.sc-head { font-family: var(--font-mono); font-size: .56rem; letter-spacing: .18em; color: var(--cyan); text-transform: uppercase; }
.sc-head .sc-live { color: var(--lime); animation: sc-blink 1.1s steps(2) infinite; }
@keyframes sc-blink { 50% { opacity: .3; } }
.sc-id { display: flex; align-items: center; gap: .65rem; margin: .6rem 0 .5rem; }
.sc-av { width: 42px; height: 42px; flex: 0 0 42px; overflow: hidden; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; color: #fff; font-size: 1rem;
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px)); }
.sc-av img { width: 100%; height: 100%; object-fit: cover; }
.sc-name { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 1rem; line-height: 1.05; }
.sc-handle { font-family: var(--font-mono); font-size: .64rem; color: var(--cyan); }
.sc-threat { font-family: var(--font-mono); font-size: .58rem; letter-spacing: .12em; color: var(--ink-mute); text-transform: uppercase; margin-bottom: .6rem; }
.sc-threat b { color: var(--magenta); }
.sc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .3rem; margin-bottom: .6rem; }
.sc-grid > div { border: 1px solid var(--line); padding: .35rem .2rem; text-align: center; }
.sc-grid span { display: block; font-family: var(--font-mono); font-size: .5rem; letter-spacing: .1em; color: var(--ink-mute); }
.sc-grid b { font-family: var(--font-display); font-weight: 700; font-size: 1rem; color: var(--cyan); }
.sc-plats { display: flex; flex-wrap: wrap; gap: .25rem; margin-bottom: .5rem; }
.sc-plats span { font-family: var(--font-mono); font-size: .54rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); border: 1px solid var(--line); padding: .1em .4em; }
.sc-trait { font-family: var(--font-mono); font-size: .62rem; color: var(--lime); letter-spacing: .02em; }

/* --- GLITCH PAGE TRANSITIONS --- */
.page-fx { position: fixed; inset: 0; z-index: 12500; display: grid; place-items: center; background: #05050f; opacity: 0; pointer-events: none; overflow: hidden; }
.page-fx.cover { opacity: 1; pointer-events: all; }
.page-fx.reveal { animation: pfx-reveal .42s ease forwards; }
.page-fx::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(34,231,255,.05) 0 1px, transparent 1px 3px); mix-blend-mode: screen; pointer-events: none; }
.pfx-bars { position: absolute; inset: 0; background: repeating-linear-gradient(0deg, transparent 0 8px, rgba(255,45,149,.07) 8px 9px, transparent 9px 16px, rgba(34,231,255,.07) 16px 17px); animation: pfx-bars 1.2s linear infinite; }
@keyframes pfx-bars { to { background-position: 0 40px; } }
.pfx-title { position: relative; font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: clamp(1.4rem, 6vw, 3rem); color: #fff; letter-spacing: .04em; }
.page-fx.glitching .pfx-title { animation: pfx-glitch .5s steps(2) infinite; }
.pfx-title::before, .pfx-title::after { content: attr(data-t); position: absolute; inset: 0; }
.pfx-title::before { color: var(--cyan); mix-blend-mode: screen; clip-path: inset(0 0 55% 0); transform: translate(-2px, 0); }
.pfx-title::after { color: var(--magenta); mix-blend-mode: screen; clip-path: inset(55% 0 0 0); transform: translate(2px, 0); }
.page-fx.glitching .pfx-title::before { animation: pfx-sh1 .4s steps(2) infinite; }
.page-fx.glitching .pfx-title::after { animation: pfx-sh2 .4s steps(2) infinite; }
.pfx-sub { position: absolute; bottom: 24%; font-family: var(--font-mono); font-size: .7rem; letter-spacing: .3em; color: var(--cyan); text-transform: uppercase; opacity: .85; }
@keyframes pfx-glitch { 0%,100% { transform: none; } 20% { transform: translate(-3px,1px) skewX(-3deg); } 40% { transform: translate(3px,-1px); } 60% { transform: translate(-2px,0) skewX(2deg); } }
@keyframes pfx-sh1 { 0%,100% { transform: translate(-2px,0); } 50% { transform: translate(-6px,1px); } }
@keyframes pfx-sh2 { 0%,100% { transform: translate(2px,0); } 50% { transform: translate(6px,-1px); } }
@keyframes pfx-reveal { 0% { opacity: 1; transform: scale(1); } 60% { opacity: .5; transform: scale(1.01) skewX(1deg); } 100% { opacity: 0; transform: scale(1.03); } }
@media (prefers-reduced-motion: reduce) { .page-fx { display: none !important; } }

/* ============================================================
   UI LAYER — themes · command palette · mobile nav · polish · sheet · kanban · charts · dice
   ============================================================ */

/* --- accent theme presets (remap the dominant neon) --- */
:root[data-accent="magenta"] { --cyan:#ff2d95; --cyan-dim:#b31567; --glow-cyan:0 0 24px rgba(255,45,149,.5); --line-hot:rgba(255,45,149,.4); }
:root[data-accent="lime"]    { --cyan:#c6ff34; --cyan-dim:#7fa311; --glow-cyan:0 0 24px rgba(198,255,52,.5); --line-hot:rgba(198,255,52,.4); }
:root[data-accent="amber"]   { --cyan:#ffb020; --cyan-dim:#b3760f; --glow-cyan:0 0 24px rgba(255,176,32,.5); --line-hot:rgba(255,176,32,.4); }
:root[data-accent="violet"]  { --cyan:#8b6cff; --cyan-dim:#5a3fd6; --glow-cyan:0 0 24px rgba(139,108,255,.5); --line-hot:rgba(139,108,255,.4); }

/* --- theme popover --- */
.theme-pop { position: fixed; right: 18px; bottom: 130px; z-index: 260; background: rgba(10,10,26,.96); border: 1px solid var(--line-hot); padding: .8rem; display: none; box-shadow: 0 0 30px rgba(0,0,0,.5); clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px)); }
.theme-pop.open { display: block; animation: reveal .2s; }
.theme-pop .lbl { font-family: var(--font-mono); font-size: .56rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: .5rem; }
.swatches { display: flex; gap: .5rem; }
.swatch { width: 26px; height: 26px; border: 2px solid transparent; cursor: pointer; clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px)); transition: transform .15s; }
.swatch:hover { transform: scale(1.15); }
.swatch.on { border-color: #fff; }

/* --- command palette --- */
.cmdk { position: fixed; inset: 0; z-index: 9600; background: rgba(3,3,10,.7); backdrop-filter: blur(6px); display: none; justify-content: center; align-items: flex-start; padding: 12vh 1.2rem 0; }
.cmdk.open { display: flex; animation: reveal .2s; }
.cmdk-box { width: min(600px, 100%); background: linear-gradient(160deg, var(--panel-2), var(--panel)); border: 1px solid var(--line-hot); box-shadow: 0 20px 60px rgba(0,0,0,.6); clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px)); overflow: hidden; }
.cmdk-in { display: flex; align-items: center; gap: .7rem; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); }
.cmdk-in .pr { color: var(--cyan); font-family: var(--font-mono); }
.cmdk-in input { flex: 1; background: transparent; border: 0; outline: 0; color: var(--ink); font-family: var(--font-body); font-size: 1.05rem; }
.cmdk-in kbd { font-family: var(--font-mono); font-size: .58rem; color: var(--ink-mute); border: 1px solid var(--line); padding: .2em .5em; letter-spacing: .1em; }
.cmdk-list { max-height: 52vh; overflow-y: auto; padding: .5rem; }
.cmdk-item { display: flex; align-items: center; gap: .9rem; padding: .7rem .8rem; cursor: pointer; border: 1px solid transparent; }
.cmdk-item .ci { width: 30px; text-align: center; color: var(--cyan); font-size: 1rem; }
.cmdk-item .ct { font-family: var(--font-body); font-size: .95rem; color: var(--ink); }
.cmdk-item .ch { margin-left: auto; font-family: var(--font-mono); font-size: .58rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute); }
.cmdk-item.sel, .cmdk-item:hover { background: rgba(34,231,255,.08); border-color: var(--line-hot); }
.cmdk-empty { padding: 1.5rem; text-align: center; font-family: var(--font-mono); font-size: .8rem; color: var(--ink-mute); }

/* --- mobile nav --- */
.nav-burger { display: none; width: 40px; height: 40px; border: 1px solid var(--line-hot); background: transparent; cursor: pointer; flex-direction: column; gap: 4px; align-items: center; justify-content: center; }
.nav-burger span { width: 18px; height: 2px; background: var(--cyan); box-shadow: 0 0 6px var(--cyan); transition: .2s; }
.mobile-menu { position: fixed; inset: 0 0 0 auto; width: min(300px, 82vw); z-index: 9200; background: linear-gradient(180deg, var(--panel-2), var(--bg)); border-left: 2px solid var(--cyan); transform: translateX(100%); transition: transform .3s cubic-bezier(.3,.8,.3,1); padding: 5rem 1.6rem 2rem; display: flex; flex-direction: column; gap: .4rem; box-shadow: -20px 0 50px rgba(0,0,0,.5); }
.mobile-menu.open { transform: none; }
.mobile-menu a { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; font-size: 1.1rem; color: var(--ink-soft); text-decoration: none; padding: .7rem 0; border-bottom: 1px solid var(--line); transition: color .2s; }
.mobile-menu a:hover { color: var(--cyan); }
.mobile-menu .mm-close { position: absolute; top: 1.2rem; right: 1.3rem; font-size: 1.4rem; color: var(--ink-soft); cursor: pointer; background: none; border: 0; }
.mm-backdrop { position: fixed; inset: 0; z-index: 9199; background: rgba(3,3,10,.6); backdrop-filter: blur(3px); display: none; }
.mm-backdrop.open { display: block; }
@media (max-width: 900px) { .nav-burger { display: flex; } .nav .btn:not(.nav-burger) { display: none; } }

/* --- scroll progress rail --- */
.scroll-rail { position: fixed; top: 0; left: 0; height: 2px; z-index: 9995; background: linear-gradient(90deg, var(--cyan), var(--magenta)); width: 0; box-shadow: var(--glow-cyan); }

/* --- page wipe transition --- */
.page-wipe { position: fixed; inset: 0; z-index: 10500; background: var(--bg); pointer-events: none; opacity: 0; }
.page-wipe.in { animation: wipe-in .28s forwards; pointer-events: all; }
.page-wipe.out { animation: wipe-out .4s forwards; }
@keyframes wipe-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes wipe-out { from { opacity: 1; } to { opacity: 0; } }

/* --- tilt --- */
.tilt { transform-style: preserve-3d; will-change: transform; }

/* --- character detail sheet (wide modal) --- */
.modal.sheet { width: min(760px, 100%); }
.sheet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; }
@media (max-width: 620px){ .sheet-grid { grid-template-columns: 1fr; } }
.radar { width: 100%; max-width: 260px; margin: 0 auto; display: block; }
.radar .grid-line { stroke: var(--line); fill: none; }
.radar .axis { stroke: var(--line); }
.radar .shape { fill: rgba(34,231,255,.18); stroke: var(--cyan); stroke-width: 2; filter: drop-shadow(0 0 8px rgba(34,231,255,.5)); }
.radar .pt { fill: var(--cyan); }
.radar text { fill: var(--ink-mute); font-family: var(--font-mono); font-size: 8px; letter-spacing: .05em; }
.sheet-stat { margin-bottom: .8rem; }
.timeline { border-left: 1px solid var(--line-hot); padding-left: 1rem; margin-top: .5rem; }
.timeline .tl { position: relative; padding: .3rem 0 .8rem; font-size: .88rem; color: var(--ink-soft); }
.timeline .tl::before { content: ''; position: absolute; left: -1.3rem; top: .55rem; width: 8px; height: 8px; background: var(--cyan); box-shadow: var(--glow-cyan); border-radius: 50%; }
.timeline .tl b { color: var(--ink); display: block; font-family: var(--font-mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute); }
.sheet-notes { width: 100%; margin-top: .4rem; }

/* --- KANBAN / library --- */
.kanban { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 900px){ .kanban { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px){ .kanban { grid-template-columns: 1fr; } }
.kcol { background: rgba(255,255,255,.015); border: 1px solid var(--line); min-height: 200px; padding: .9rem; transition: border-color .2s, background .2s; }
.kcol.drag-over { border-color: var(--cyan); background: rgba(34,231,255,.05); }
.kcol-head { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: .8rem; padding-bottom: .5rem; border-bottom: 1px solid var(--line); }
.kcol-head .n { color: var(--cyan); }
.kcard { background: linear-gradient(155deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); padding: .8rem .9rem; margin-bottom: .7rem; cursor: grab; transition: border-color .2s, transform .1s; }
.kcard:hover { border-color: var(--line-hot); }
.kcard.dragging { opacity: .4; }
.kcard .kg { font-family: var(--font-display); font-weight: 600; font-size: .95rem; }
.kcard .kp { font-family: var(--font-mono); font-size: .58rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute); margin-top: .2rem; }
.kadd { font-family: var(--font-mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute); border: 1px dashed var(--line-hot); padding: .55em; text-align: center; cursor: pointer; transition: .2s; }
.kadd:hover { color: var(--cyan); background: rgba(34,231,255,.05); }

/* --- CHARTS / stats --- */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.4rem; }
@media (max-width: 760px){ .stat-cards { grid-template-columns: 1fr 1fr; } }
.charts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
@media (max-width: 820px){ .charts { grid-template-columns: 1fr; } }
.chart-panel { padding: 1.5rem; }
.chart-panel h3 { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: 1.1rem; margin-bottom: 1.2rem; }
.hbar { margin-bottom: .9rem; }
.hbar .hl { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: .3rem; }
.hbar .hl b { color: var(--ink); }
.hbar .ht { height: 10px; background: rgba(255,255,255,.06); overflow: hidden; }
.hbar .ht > i { display: block; height: 100%; width: 0; transition: width 1s cubic-bezier(.2,.7,.2,1); }
.legend { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1rem; }
.legend span { font-family: var(--font-mono); font-size: .64rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); display: flex; align-items: center; gap: .4rem; }
.legend i { width: 10px; height: 10px; display: inline-block; }
.donut-wrap { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }
.spark { width: 100%; height: 90px; }

/* --- DICE roller --- */
.dice-grid { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.2rem; }
.dice-grid button { font-family: var(--font-display); font-weight: 700; font-size: .9rem; padding: .6em 1em; border: 1px solid var(--line); background: transparent; color: var(--ink-soft); cursor: pointer; transition: .18s; }
.dice-grid button:hover { border-color: var(--cyan); color: var(--cyan); box-shadow: var(--glow-cyan); }
.dice-result { text-align: center; padding: 1.4rem; border: 1px solid var(--line-hot); background: rgba(34,231,255,.04); margin-bottom: 1rem; }
.dice-result .big { font-family: var(--font-display); font-weight: 800; font-size: 3.4rem; color: var(--cyan); text-shadow: var(--glow-cyan); line-height: 1; }
.dice-result .big.rolling { animation: dice-spin .5s steps(5); }
@keyframes dice-spin { 0%{opacity:.4;transform:translateY(-6px)} 100%{opacity:1;transform:none} }
.dice-result .sub { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute); margin-top: .5rem; }
.dice-hist { font-family: var(--font-mono); font-size: .72rem; color: var(--ink-mute); max-height: 120px; overflow-y: auto; }
.dice-hist div { padding: .3rem 0; border-bottom: 1px solid var(--line); }
.dice-hist b { color: var(--cyan); }
.dice-custom { display: flex; gap: .5rem; margin-bottom: 1rem; }
.dice-custom input { flex: 1; background: rgba(255,255,255,.03); border: 1px solid var(--line); color: var(--ink); padding: .6em .8em; font-family: var(--font-mono); }

/* --- now playing + streak --- */
.now-playing { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--lime); border: 1px solid var(--line); padding: .4em .8em; cursor: pointer; transition: .2s; margin-top: .8rem; }
.now-playing:hover { border-color: var(--lime); }
.now-playing::before { content: '▶'; animation: ct-blink 1.6s steps(1) infinite; }
.streak-panel { padding: 1.2rem 1.4rem; display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.streak-flame { font-size: 2rem; filter: drop-shadow(0 0 10px var(--amber)); }
.streak-n { font-family: var(--font-display); font-weight: 800; font-size: 1.8rem; color: var(--amber); }
.streak-n small { display: block; font-family: var(--font-mono); font-size: .58rem; letter-spacing: .18em; color: var(--ink-mute); }

/* --- nav account chip (logged-in) --- */
.gr-account { display: flex; align-items: center; gap: .55rem; padding: .3rem .55rem; border: 1px solid var(--line-hot); background: rgba(34,231,255,.05); }
.gr-account img, .gr-account .gr-av-fallback { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 2px; object-fit: cover; display: grid; place-items: center; background: linear-gradient(135deg, var(--magenta), var(--violet)); color: #fff; font-family: var(--font-display); font-weight: 800; font-size: .8rem; }
.gr-account .gr-name { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; color: var(--ink); text-transform: uppercase; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gr-account .gr-acc-link { display: flex; align-items: center; gap: .55rem; text-decoration: none; }
.gr-account .gr-logout { display: inline-flex; align-items: center; gap: .3em; color: var(--ink-soft); text-decoration: none; font-family: var(--font-mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; border: 1px solid var(--line-hot); padding: .45em .8em; transition: color .2s, border-color .2s, background .2s; }
.gr-account .gr-logout:hover { color: var(--magenta); border-color: var(--magenta); background: rgba(255,45,149,.08); }
@media (max-width: 820px) { .gr-account .gr-name { display: none; } .nav .gr-login { display: inline-flex !important; padding: .6em 1em; } }

/* ============================================================
   SOCIAL LAYER — notifications · crew · leaderboard · game page · showcase · tour
   ============================================================ */

/* --- notifications bell --- */
.notif-btn { position: relative; width: 42px; height: 42px; border: 1px solid var(--line); background: transparent; color: var(--ink-soft); cursor: pointer; display: grid; place-items: center; font-size: 1.1rem; transition: .2s; }
.notif-btn:hover { border-color: var(--line-hot); color: var(--cyan); }
.notif-badge { position: absolute; top: -6px; right: -6px; min-width: 17px; height: 17px; padding: 0 4px; background: var(--magenta); color: #fff; font-family: var(--font-mono); font-size: .58rem; font-weight: 700; border-radius: 9px; display: grid; place-items: center; box-shadow: var(--glow-magenta); }
.notif-badge.hidden { display: none; }
.notif-panel { position: fixed; top: 74px; right: 16px; width: min(360px, 92vw); z-index: 250; background: linear-gradient(160deg, var(--panel-2), var(--panel)); border: 1px solid var(--line-hot); box-shadow: 0 20px 50px rgba(0,0,0,.6); display: none; clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px)); }
.notif-panel.open { display: block; animation: reveal .2s; }
.notif-head { display: flex; justify-content: space-between; align-items: center; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-mute); }
.notif-head b { color: var(--cyan); }
.notif-head .clear { cursor: pointer; color: var(--ink-soft); }
.notif-head .clear:hover { color: var(--magenta); }
.notif-list { max-height: 60vh; overflow-y: auto; }
.notif-row { display: flex; gap: .8rem; padding: .8rem 1.1rem; border-bottom: 1px solid var(--line); align-items: flex-start; }
.notif-row.unread { background: rgba(34,231,255,.05); }
.notif-row .ni { font-size: 1rem; color: var(--cyan); margin-top: .1rem; }
.notif-row .nt { font-size: .88rem; color: var(--ink); }
.notif-row .nt b { color: var(--cyan); }
.notif-row .nw { font-family: var(--font-mono); font-size: .58rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-mute); margin-top: .25rem; }
.notif-empty { padding: 2rem; text-align: center; font-family: var(--font-mono); font-size: .78rem; color: var(--ink-mute); }

/* --- respawner roster / crew cards --- */
.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.1rem; }
.rcard { padding: 1.3rem; display: flex; flex-direction: column; }
.rcard-top { display: flex; gap: .9rem; align-items: center; margin-bottom: 1rem; }
.rav { width: 50px; height: 50px; flex: 0 0 50px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; color: #fff; clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px)); }
.rcard .rh { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.rcard .rr { font-family: var(--font-mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--cyan); margin-top: .1rem; }
img.rav, img.lb-av { object-fit: cover; }
.rstatus { display: inline-flex; align-items: center; gap: .4em; font-family: var(--font-mono); font-size: .58rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute); }
.rstatus .sd { width: 7px; height: 7px; border-radius: 50%; }
.rstatus.online .sd { background: var(--lime); box-shadow: 0 0 8px var(--lime); }
.rstatus.idle .sd { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.rstatus.offline .sd { background: var(--ink-mute); }
.rcard .rtags { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 1rem; }
.rcard .ractions { margin-top: auto; display: flex; gap: .5rem; }
.rcard .ractions .btn { flex: 1; justify-content: center; font-size: .78rem; padding: .6em; }
.section-sub { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-mute); margin: 2.4rem 0 1.1rem; display: flex; align-items: center; gap: 1rem; }
.section-sub::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* --- leaderboard --- */
.lb-tabs { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1.6rem 0 1.4rem; }
.lb-tab { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; padding: .5em 1em; border: 1px solid var(--line); background: transparent; color: var(--ink-soft); cursor: pointer; transition: .2s; }
.lb-tab:hover { border-color: var(--line-hot); color: var(--cyan); }
.lb-tab.on { background: var(--cyan); color: var(--bg); border-color: var(--cyan); box-shadow: var(--glow-cyan); }
.lb-row { display: grid; grid-template-columns: 44px 44px 1fr auto; gap: 1rem; align-items: center; padding: .9rem 1.1rem; border: 1px solid var(--line); margin-bottom: .6rem; background: rgba(255,255,255,.015); transition: border-color .2s; }
.lb-row:hover { border-color: var(--line-hot); }
.lb-row.you { border-color: var(--cyan); box-shadow: var(--glow-cyan); background: rgba(34,231,255,.05); }
.lb-rank { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: var(--ink-mute); text-align: center; }
.lb-row:nth-child(1) .lb-rank { color: var(--amber); text-shadow: 0 0 10px var(--amber); }
.lb-row:nth-child(2) .lb-rank { color: #cfd3e6; }
.lb-row:nth-child(3) .lb-rank { color: #d98a4a; }
.lb-av { width: 40px; height: 40px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; color: #fff; font-size: .9rem; clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 7px 100%, 0 calc(100% - 7px)); }
.lb-name { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; }
.lb-name small { display: block; font-family: var(--font-mono); font-size: .58rem; letter-spacing: .08em; color: var(--ink-mute); text-transform: uppercase; }
.lb-val { font-family: var(--font-mono); font-weight: 700; color: var(--cyan); font-size: 1.05rem; text-align: right; }
.lb-you-tag { font-family: var(--font-mono); font-size: .54rem; letter-spacing: .12em; color: var(--bg); background: var(--cyan); padding: .1em .4em; margin-left: .5em; }

/* --- game detail page --- */
.game-hero { position: relative; padding: clamp(2.5rem,7vh,4.5rem) 0; overflow: hidden; margin-bottom: 2rem; border-bottom: 1px solid var(--line); }
.game-hero .cover { position: absolute; inset: 0; z-index: -1; opacity: .5; }
.game-hero .cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, var(--bg), transparent 60%), linear-gradient(90deg, var(--bg) 10%, transparent 60%); }
.game-hero h1 { font-size: clamp(2.2rem,7vw,4.4rem); font-weight: 800; text-transform: uppercase; }
.game-hero .gmeta { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.game-hero p { color: var(--ink-soft); max-width: 60ch; font-size: 1.05rem; }
.game-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 800px){ .game-cols { grid-template-columns: 1fr; } }
.mini-player { display: flex; align-items: center; gap: .7rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.mini-player:last-child { border-bottom: 0; }
.mini-player .rav { width: 38px; height: 38px; flex: 0 0 38px; font-size: .85rem; }

/* --- trophy showcase --- */
.showcase { display: flex; gap: .7rem; flex-wrap: wrap; margin: 1.4rem 0 .5rem; }
.trophy { display: flex; align-items: center; gap: .6rem; padding: .55rem .9rem; border: 1px solid var(--lime); background: rgba(198,255,52,.06); }
.trophy .ti { font-size: 1.1rem; color: var(--lime); }
.trophy .tn { font-family: var(--font-display); font-weight: 700; font-size: .82rem; text-transform: uppercase; }
.trophy.locked { border-color: var(--line); background: transparent; opacity: .5; }
.trophy.locked .ti { color: var(--ink-mute); }

/* --- onboarding tour --- */
.tour-dim { position: fixed; inset: 0; z-index: 10800; pointer-events: auto; }
.tour-spot { position: fixed; z-index: 10801; border: 2px solid var(--cyan); box-shadow: 0 0 0 9999px rgba(3,3,10,.82), var(--glow-cyan); pointer-events: none; transition: all .3s cubic-bezier(.3,.8,.3,1); border-radius: 3px; }
.tour-tip { position: fixed; z-index: 10802; width: min(320px, 88vw); background: linear-gradient(160deg, var(--panel-2), var(--panel)); border: 1px solid var(--line-hot); box-shadow: 0 16px 40px rgba(0,0,0,.6); padding: 1.2rem 1.3rem; clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px)); transition: all .3s; }
.tour-tip .tk { font-family: var(--font-mono); font-size: .58rem; letter-spacing: .2em; text-transform: uppercase; color: var(--cyan); }
.tour-tip h4 { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: 1.15rem; margin: .3rem 0 .5rem; }
.tour-tip p { color: var(--ink-soft); font-size: .92rem; }
.tour-tip .tactions { display: flex; align-items: center; gap: .5rem; margin-top: 1.1rem; }
.tour-tip .tprog { font-family: var(--font-mono); font-size: .62rem; color: var(--ink-mute); margin-right: auto; }
.tour-tip .tbtn { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; font-size: .78rem; padding: .5em 1em; cursor: pointer; border: 1px solid var(--line-hot); background: transparent; color: var(--ink); transition: .2s; }
.tour-tip .tbtn:hover { color: var(--cyan); }
.tour-tip .tbtn.pri { background: var(--cyan); color: var(--bg); border-color: var(--cyan); }
.tour-tip .tskip { font-family: var(--font-mono); font-size: .6rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-mute); cursor: pointer; }
.tour-tip .tskip:hover { color: var(--magenta); }

::selection { background: var(--magenta); color: #fff; }

/* scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: #1c1c40; border: 2px solid var(--bg-2); }
::-webkit-scrollbar-thumb:hover { background: var(--cyan-dim); }
