:root {
  --bg: #0A0D26;
  --bg-2: #11163a;
  --bg-3: #1a2150;
  --ink: #F2EBDD;
  --ink-dim: #a9a8c4;
  --line: #2b3470;
  --yellow: #FFE14D;
  --orange: #FF9900;
  --pink: #FF4D8D;
  --mint: #3DF5A7;
  --cyan: #4DD8FF;
  --violet: #A98BFF;
  --px: "Press Start 2P", monospace;
  --vt: "VT323", monospace;
  --sans: "Space Grotesk", system-ui, sans-serif;
  --hud-h: 48px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--hud-h) + 8px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body::after { /* CRT scanlines */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 90;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.025) 0 1px, transparent 1px 3px);
}
img, video { display: block; max-width: 100%; }
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: var(--yellow); }
b { color: #fff; font-weight: 700; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
kbd { font: 18px var(--vt); border: 1px solid var(--line); padding: 0 6px; background: var(--bg-2); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* ───────── HUD ───────── */
.hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80; height: var(--hud-h);
  display: flex; align-items: center; gap: 14px; padding: 0 16px;
  background: rgba(10,13,38,.92); border-bottom: 3px solid var(--line);
  font: 20px/1 var(--vt); letter-spacing: .04em;
  backdrop-filter: blur(6px);
  transform: translateY(-100%); transition: transform .35s steps(5);
}
.hud.on { transform: none; }
.hud-p1 { color: var(--ink-dim); text-decoration: none; white-space: nowrap; }
.hud-p1 b { color: var(--yellow); font-weight: 400; }
.hud-xp { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 60px; }
.hud-xp span { color: var(--mint); }
.xp-track { flex: 1; height: 12px; border: 2px solid var(--ink); background: var(--bg); position: relative; }
.xp-track i { position: absolute; inset: 1px auto 1px 1px; width: 0; background: repeating-linear-gradient(90deg, var(--mint) 0 8px, #27c886 8px 10px); }
.hud-lvl { color: var(--pink); white-space: nowrap; }
.hud-coins { display: flex; align-items: center; gap: 4px; color: var(--yellow); white-space: nowrap; }
.coin-ico { width: 12px; height: 12px; background: var(--yellow); box-shadow: inset -3px -3px 0 #c9a514; border-radius: 50%; }
.hud-sound { font: 18px var(--vt); background: none; color: var(--ink-dim); border: 2px solid var(--line); padding: 2px 8px; cursor: pointer; }
.hud-sound[aria-pressed="true"] { color: var(--mint); border-color: var(--mint); }
@media (max-width: 560px) {
  .hud { gap: 10px; font-size: 18px; }
  .hud-p1, .hud-xp span { display: none; }
}

/* ───────── shared ───────── */
.level { position: relative; padding: 96px 0 88px; border-top: 3px dashed var(--line); }
.level.dark { background: #070920; }
.world { font: 10px/1.6 var(--px); color: var(--pink); letter-spacing: .06em; margin: 0 0 14px; }
h2 { font: 400 clamp(24px, 4.6vw, 44px)/1.25 var(--px); margin: 0 0 18px; color: var(--ink); text-shadow: 4px 4px 0 var(--bg-3); }
h3 { margin: 0; }
.lede, .banter { font-size: 19px; color: var(--ink-dim); max-width: 62ch; margin: 0 0 32px; }
.banter { font-style: italic; border-left: 4px solid var(--yellow); padding-left: 14px; }
.facts { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 14px; }
.facts li { padding-left: 28px; position: relative; }
.facts li::before { content: "▸"; position: absolute; left: 4px; color: var(--mint); }
.why { font-size: 16px; background: var(--bg-2); border: 2px solid var(--line); padding: 14px 16px; margin: 24px 0 0; max-width: 70ch; }
.why span { display: block; font: 9px/1.6 var(--px); color: var(--yellow); margin-bottom: 6px; }
.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1.1fr .9fr; gap: 56px; } }

.pixel-frame {
  border: 4px solid var(--ink);
  box-shadow: 6px 6px 0 var(--bg-3), 6px 6px 0 4px var(--line);
  background: var(--bg-2);
  margin: 0;
}
.shot { position: relative; }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot figcaption, .char-sprite figcaption {
  position: absolute; left: 10px; bottom: 10px; right: 10px;
  font: 18px/1.2 var(--vt); background: rgba(10,13,38,.85); color: var(--yellow);
  padding: 6px 10px; border: 2px solid var(--yellow); width: fit-content; max-width: calc(100% - 20px);
}
.tilt-r { transform: rotate(1.5deg); }
.tilt-l { transform: rotate(-1.5deg); }

.press-start {
  font: 14px/1 var(--px); color: var(--bg); background: var(--yellow);
  border: 0; padding: 18px 26px; cursor: pointer;
  box-shadow: 0 6px 0 #b89a12, 0 6px 0 4px var(--bg);
  transition: transform .08s, box-shadow .08s;
}
.press-start:hover { background: #fff27f; }
.press-start:active { transform: translateY(5px); box-shadow: 0 1px 0 #b89a12; }
.press-start.small { font-size: 11px; padding: 14px 18px; }
.ghost-btn { font: 20px var(--vt); color: var(--ink); border: 2px solid var(--ink); padding: 10px 16px; text-decoration: none; display: inline-block; }
.ghost-btn:hover { background: var(--ink); color: var(--bg); }

/* ───────── title ───────── */
.title { position: relative; min-height: 100svh; display: grid; place-items: center; text-align: center; overflow: hidden; padding: 80px 0; }
.title-bg { position: absolute; inset: 0; background: url(media/lights.webp) center 40%/cover; opacity: .32; filter: saturate(1.2); }
.title-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(10,13,38,.3), var(--bg) 78%); }
#stars { position: absolute; inset: 0; width: 100%; height: 100%; }
.title-inner { position: relative; padding: 0 16px; max-width: 100%; }
.kicker { font: 9px/1.8 var(--px); color: var(--mint); letter-spacing: .14em; margin: 0 0 24px; }
.logo { margin: 0 0 22px; font-weight: 400; line-height: 1.05; }
.logo-1 {
  display: block; font: clamp(30px, 9.5vw, 104px)/1.05 var(--px); color: var(--yellow);
  text-shadow: 4px 4px 0 var(--pink), 8px 8px 0 var(--bg-3);
  animation: bob 2.4s steps(2) infinite;
}
.logo-2 { display: block; margin-top: 18px; font: clamp(14px, 3.2vw, 30px)/1.3 var(--px); color: var(--cyan); text-shadow: 3px 3px 0 var(--bg-3); }
.tagline { font-size: 19px; color: var(--ink-dim); margin: 0 auto 36px; max-width: 46ch; }
.press-start#press-start { animation: blink 1.1s steps(1) infinite; }
.title-hint { font: 20px var(--vt); color: var(--ink-dim); margin: 26px 0 0; }
.credit { font: 8px/1.8 var(--px); color: #5b6196; margin: 48px 0 0; }
@keyframes bob { 50% { transform: translateY(-6px); } }
@keyframes blink { 50% { opacity: .35; } }

/* ───────── player ───────── */
.char { display: grid; gap: 40px; }
@media (min-width: 860px) { .char { grid-template-columns: 340px 1fr; align-items: start; } }
.char-sprite { position: relative; aspect-ratio: 9/16; max-width: 340px; overflow: hidden; }
.char-sprite video { width: 100%; height: 100%; object-fit: cover; }
.char-card { background: var(--bg-2); border: 4px solid var(--ink); padding: 22px; box-shadow: 6px 6px 0 var(--bg-3); }
.char-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; border-bottom: 2px dashed var(--line); padding-bottom: 16px; margin-bottom: 16px; }
.char-no { font: 18px var(--vt); color: var(--ink-dim); margin: 0; }
.char-head h3 { font: 400 clamp(20px, 3.4vw, 28px)/1.3 var(--px); color: var(--yellow); margin: 4px 0 8px; }
.char-class { margin: 0; color: var(--ink-dim); font-size: 15px; }
.type-chip { font: 9px var(--px); background: var(--orange); color: var(--bg); padding: 8px 10px; white-space: nowrap; }
.stats { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 8px; }
.stats li { display: grid; grid-template-columns: 120px 1fr 34px; align-items: center; gap: 10px; font: 20px/1 var(--vt); }
.stats em { font-style: normal; text-align: right; color: var(--ink); }
.bar { height: 14px; border: 2px solid var(--ink); background: var(--bg); position: relative; overflow: hidden; }
.bar i { position: absolute; inset: 1px auto 1px 1px; width: 0; background: var(--mint); transition: width 1.2s steps(14); }
.in .bar i, .tracker .bar i { width: calc(var(--v) * 1% - 2px); }
.stat-sad .bar i { background: var(--pink); }
.stat-sad span, .stat-sad em { color: var(--pink); }
.abilities { margin: 0 0 18px; display: grid; gap: 8px; }
.abilities div { display: grid; grid-template-columns: 80px 1fr; gap: 10px; font-size: 15px; }
.abilities dt { font: 18px var(--vt); color: var(--cyan); }
.abilities dd { margin: 0; }
.real-label { font: 9px var(--px); color: var(--mint); margin: 0 0 10px; }
.trophies { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
@media (min-width: 560px) { .trophies { grid-template-columns: 1fr 1fr; } }
.trophies li { border: 2px solid var(--line); padding: 10px 12px; font-size: 15px; background: var(--bg); }
.trophies b { color: var(--yellow); font: 400 13px var(--px); margin-right: 6px; }
@media (max-width: 420px) { .stats li { grid-template-columns: 96px 1fr 30px; font-size: 18px; } }

/* ───────── map ───────── */
.map { padding: 40px 0; border-top: 3px dashed var(--line); background: #070920; }
.map-nodes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (min-width: 860px) { .map-nodes { grid-template-columns: repeat(8, 1fr); } }
.map-nodes a { display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; color: var(--ink-dim); font: 18px/1.1 var(--vt); text-align: center; }
.map-nodes i { font: normal 14px var(--px); width: 52px; height: 52px; display: grid; place-items: center; background: var(--bg-3); border: 3px solid var(--line); color: var(--ink); transition: transform .1s; }
.map-nodes a:hover i, .map-nodes a.done i { background: var(--mint); color: var(--bg); border-color: var(--ink); transform: translateY(-3px); }
.map-nodes a.done span { color: var(--mint); }
.map-nodes .boss i { background: var(--pink); color: #fff; }

/* ───────── hackathons ───────── */
.bosses { display: grid; gap: 28px; }
@media (min-width: 900px) { .bosses { grid-template-columns: 1fr 1fr; } }
.boss-card { border: 4px solid var(--ink); background: var(--bg-2); padding: 20px; box-shadow: 6px 6px 0 var(--bg-3); display: flex; flex-direction: column; }
.boss-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.boss-tag { font: 8px/1 var(--px); color: var(--mint); border: 2px solid var(--mint); padding: 6px 8px; }
.rank { font: 11px/1 var(--px); padding: 8px 10px; color: var(--bg); }
.rank.gold { background: var(--yellow); }
.rank.silver { background: #d4d8e8; }
.boss-card h3 { font: 400 16px/1.4 var(--px); margin-bottom: 12px; }
.boss-card p { margin: 0 0 12px; font-size: 16px; }
.loot { color: var(--ink-dim); font: 19px/1.3 var(--vt) !important; }
.boss-pics { margin-top: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.boss-pics img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border: 3px solid var(--ink); }

/* ───────── pitching ───────── */
.pitch-grid { display: grid; gap: 28px; }
@media (min-width: 900px) {
  .pitch-grid { grid-template-columns: 1.4fr .8fr; grid-template-areas: "wide tall" "copy tall"; }
  .pitch-grid .wide { grid-area: wide; }
  .pitch-grid .tall { grid-area: tall; }
  .pitch-copy { grid-area: copy; }
}
.pitch-grid .wide { aspect-ratio: 3/2; }
.pitch-grid .tall { aspect-ratio: 9/16; max-height: 640px; }
.pitch-copy .why { margin-top: 0; }

/* ───────── AI sec terminal ───────── */
.term { background: #04050f; border-color: var(--mint); box-shadow: 6px 6px 0 #0e3a2a; display: flex; flex-direction: column; min-height: 420px; }
.term-bar { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 2px solid var(--mint); font: 18px var(--vt); color: var(--mint); }
.term-bar i { width: 10px; height: 10px; background: var(--mint); opacity: .5; }
.term-bar span { margin-left: 8px; }
.term-log { flex: 1; padding: 12px 14px; font: 20px/1.3 var(--vt); overflow-y: auto; max-height: 300px; }
.term-log p { margin: 0 0 8px; }
.term-log .sys { color: var(--ink-dim); }
.term-log .you { color: var(--cyan); }
.term-log .you::before { content: "you> "; }
.term-log .bot { color: var(--mint); }
.term-log .bot::before { content: "guard> "; }
.term-log .win { color: var(--yellow); }
.term-in { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-top: 2px solid #0e3a2a; font: 20px var(--vt); color: var(--mint); }
.term-in input { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--ink); font: 20px var(--vt); outline: none; }
.term-in button, .term-chips button { font: 18px var(--vt); background: none; color: var(--mint); border: 2px solid var(--mint); padding: 2px 10px; cursor: pointer; }
.term-in button:hover, .term-chips button:hover { background: var(--mint); color: var(--bg); }
.term-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 12px; }

/* ───────── guilds ───────── */
.guild-wrap { display: grid; gap: 36px; align-items: start; }
@media (min-width: 900px) { .guild-wrap { grid-template-columns: .8fr 1.2fr; } }
.guild-wrap .shot { aspect-ratio: 3/4; }
.guilds { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
@media (min-width: 620px) { .guilds { grid-template-columns: 1fr 1fr; } .g-lead { grid-column: 1 / -1; } }
.guilds li { background: var(--bg-2); border: 3px solid var(--line); padding: 16px; position: relative; }
.guilds li:hover { border-color: var(--cyan); }
.g-lead { border-color: var(--yellow) !important; }
.g-badge { font: 8px/1 var(--px); padding: 6px 8px; background: var(--cyan); color: var(--bg); display: inline-block; margin-bottom: 10px; }
.g-lead .g-badge { background: var(--yellow); }
.guilds h3 { font-size: 19px; }
.g-role { font: 18px/1.2 var(--vt); color: var(--pink); margin: 4px 0 8px; }
.guilds p:last-child { margin: 0; font-size: 15px; color: var(--ink-dim); }

/* ───────── inventory ───────── */
.inv { display: grid; gap: 24px; }
@media (min-width: 900px) { .inv { grid-template-columns: 1fr 1fr; align-items: start; } }
.inv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.slot {
  aspect-ratio: 1; background: var(--bg-2); border: 3px solid var(--line); color: var(--ink); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 6px;
  font: 16px/1.05 var(--vt); position: relative;
}
.slot .ico { font-size: clamp(22px, 5vw, 34px); line-height: 1; }
.slot .nm { text-align: center; }
.slot.legendary { border-color: var(--orange); box-shadow: inset 0 0 0 2px rgba(255,153,0,.25); }
.slot.epic { border-color: var(--violet); }
.slot.rare { border-color: var(--cyan); }
.slot:hover { transform: translateY(-3px); }
.slot[aria-pressed="true"] { background: var(--bg-3); outline: 3px solid var(--yellow); outline-offset: 2px; }
.inv-detail { padding: 20px; min-height: 280px; }
.inv-detail .rar { font: 8px var(--px); padding: 6px 8px; display: inline-block; color: var(--bg); }
.inv-detail h3 { font: 400 16px/1.4 var(--px); margin: 12px 0 4px; color: var(--yellow); }
.inv-detail .sub { font: 19px/1.2 var(--vt); color: var(--pink); margin: 0 0 12px; }
.inv-detail p { margin: 0 0 12px; font-size: 16px; }
.inv-detail .tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 0; list-style: none; }
.inv-detail .tags li { font: 17px var(--vt); border: 2px solid var(--line); padding: 0 8px; color: var(--ink-dim); }
.inv-detail img { border: 3px solid var(--ink); margin-bottom: 12px; width: 100%; aspect-ratio: 16/9; object-fit: cover; object-position: top; }

/* ───────── wifi game ───────── */
.wifi-game { position: relative; padding: 16px; max-width: 640px; }
.wifi-hud { display: flex; justify-content: space-between; font: 22px var(--vt); margin-bottom: 14px; color: var(--ink-dim); }
.wifi-hud b { color: var(--yellow); font-weight: 400; }
.wifi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.router {
  aspect-ratio: 4/3; background: var(--bg-2); border: 3px solid var(--mint); cursor: pointer; color: var(--mint);
  display: grid; place-items: center; font: 14px var(--px); position: relative; user-select: none; -webkit-tap-highlight-color: transparent;
}
.router .sig { font-size: clamp(22px, 6vw, 34px); line-height: 1; }
.router .lbl { position: absolute; bottom: 6px; font: 16px var(--vt); color: var(--ink-dim); }
.router.down { border-color: var(--pink); color: var(--pink); background: #2a0f22; animation: shake .3s steps(3) infinite; }
.router.fixed { border-color: var(--yellow); color: var(--yellow); }
@keyframes shake { 33% { transform: translateX(-2px); } 66% { transform: translateX(2px); } }
.wifi-overlay { position: absolute; inset: 0; background: rgba(7,9,32,.92); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 18px; padding: 20px; }
.wifi-overlay[hidden] { display: none; }
.wifi-overlay p { font: 22px/1.3 var(--vt); max-width: 34ch; margin: 0; }

/* ───────── quests ───────── */
.quests { list-style: none; padding: 0; margin: 0 0 40px; display: grid; gap: 16px; }
@media (min-width: 900px) { .quests { grid-template-columns: 1fr 1fr; } }
.quest { background: var(--bg-2); border: 3px solid var(--line); padding: 18px; display: flex; flex-direction: column; transition: border-color .2s; }
.quest.accepted { border-color: var(--mint); background: #0d2030; }
.q-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.q-no { font: 11px var(--px); color: var(--bg); background: var(--yellow); padding: 6px; }
.q-head h3 { font-size: 19px; flex: 1; min-width: 12ch; }
.q-rar { font: 8px var(--px); padding: 5px 7px; border: 2px solid; }
.q-rar.main { color: var(--orange); }
.q-rar.epic { color: var(--violet); }
.q-rar.rare { color: var(--cyan); }
.quest > p { margin: 0 0 14px; font-size: 16px; }
.q-accept { margin-top: auto; align-self: flex-start; font: 9px var(--px); background: none; color: var(--mint); border: 2px solid var(--mint); padding: 10px 12px; cursor: pointer; }
.q-accept:hover { background: var(--mint); color: var(--bg); }
.quest.accepted .q-accept { background: var(--mint); color: var(--bg); }
.fineprint { margin: 0 0 14px; border: 2px dashed var(--yellow); padding: 10px 12px; background: #1b1a2a; }
.fineprint summary { cursor: pointer; font: 19px/1.2 var(--vt); color: var(--yellow); }
.fineprint ul { margin: 10px 0; padding-left: 20px; font-size: 15px; display: grid; gap: 6px; }
.fineprint p { margin: 0; font-size: 15px; }

.tracker { padding: 20px; max-width: 760px; }
.tracker-h { font: 11px/1.6 var(--px); color: var(--yellow); margin: 0 0 16px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tracker-h span { font: 18px var(--vt); color: var(--ink-dim); }
.tracker-row { display: grid; grid-template-columns: minmax(0, 190px) 1fr 44px; gap: 12px; align-items: center; font: 20px var(--vt); margin-bottom: 10px; }
.tracker-row em { font-style: normal; text-align: right; }
.tracker-note { margin: 12px 0 0; font-size: 15px; color: var(--ink-dim); }
@media (max-width: 480px) { .tracker-row { grid-template-columns: 1fr 44px; } .tracker-row .bar { grid-column: 1 / -1; grid-row: 2; } }

/* ───────── vote ───────── */
.vote { position: relative; min-height: 100svh; display: grid; place-items: center; text-align: center; overflow: hidden; border-top: 3px dashed var(--line); padding: 96px 0; }
.vote-bg { position: absolute; inset: 0; background: url(media/lights.webp) center/cover; opacity: .45; }
.vote-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(10,13,38,.4), var(--bg) 80%); }
.vote-inner { position: relative; }
.continue { font: 14px var(--px); color: var(--pink); margin: 0 0 28px; }
.continue b { font-weight: 400; color: var(--yellow); font-size: 28px; display: inline-block; min-width: 1.4em; vertical-align: middle; }
.vote h2 { font-size: clamp(26px, 7vw, 72px); line-height: 1.2; text-shadow: 5px 5px 0 var(--pink), 10px 10px 0 var(--bg-3); }
.vote h2 span { color: var(--yellow); }
.vote h2 small { font-size: .45em; color: var(--cyan); }
.vote-line { font-size: 20px; color: var(--ink-dim); margin: 0 auto 36px; }
.vote-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; align-items: center; }
.cheat { font: 18px var(--vt); color: #5b6196; margin: 40px 0 0; }

.foot { padding: 28px 16px 36px; text-align: center; font: 19px/1.4 var(--vt); color: var(--ink-dim); border-top: 3px dashed var(--line); }

/* ───────── coins, toasts, fx ───────── */
.coin {
  position: absolute; width: 22px; height: 22px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; z-index: 5;
  background: var(--yellow); box-shadow: inset -4px -4px 0 #c9a514, 0 0 0 3px var(--bg);
  animation: spin 1.2s steps(4) infinite;
}
.coin::after { content: ""; position: absolute; inset: -12px; } /* bigger tap target */
.coin.got { animation: grab .5s steps(5) forwards; pointer-events: none; }
@keyframes spin { 25% { transform: scaleX(.6); } 50% { transform: scaleX(.15); } 75% { transform: scaleX(.6); } }
@keyframes grab { to { transform: translateY(-60px); opacity: 0; } }
#player .coin { right: 6%; top: 60px; }
#hackathons .coin { left: 3%; bottom: 40px; }
#aisec .coin { right: 4%; bottom: 30px; }
#inventory .coin { left: 50%; top: 40px; }
#wifi .coin { right: 8%; top: 70px; }
#quests .coin { left: 4%; top: 64px; }
#vote .coin[data-coin="7"] { left: 12%; top: 22%; }
#vote .coin[data-coin="8"] { right: 14%; bottom: 18%; }

.toasts { position: fixed; left: 16px; bottom: 16px; z-index: 95; display: grid; gap: 8px; max-width: calc(100% - 32px); pointer-events: none; }
.toast { background: var(--bg); border: 3px solid var(--yellow); padding: 10px 14px; font: 20px/1.2 var(--vt); box-shadow: 4px 4px 0 var(--bg-3); animation: toast-in .3s steps(4); }
.toast small { display: block; font: 8px/1.6 var(--px); color: var(--yellow); margin-bottom: 4px; }
.toast.out { animation: toast-out .3s steps(4) forwards; }
@keyframes toast-in { from { transform: translateX(-120%); } }
@keyframes toast-out { to { transform: translateX(-120%); opacity: 0; } }

.rain { position: fixed; top: -40px; z-index: 85; pointer-events: none; font-size: 26px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(360deg); } }

/* reveal on scroll */
.level .wrap > * { transition: opacity .5s, transform .5s; }
.js .level:not(.in) .wrap > * { opacity: 0; transform: translateY(24px); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .js .level:not(.in) .wrap > * { opacity: 1; transform: none; }
}
