/* CrokyCraft Eclipse page. 2010-era server-site look: bevelled stone panels, chunky pixel buttons,
   blood-red sky. Textures are generated in app.js (canvas) and handed over as CSS custom properties.
   No external fonts or images beyond self-hosted OFL fonts and our own drawings. */

@font-face { font-family: "PS2P"; src: url("/fonts/PressStart2P-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "VT323"; src: url("/fonts/VT323-Regular.ttf") format("truetype"); font-display: swap; }

:root {
  --red: #d2141a;
  --red-hi: #ff3b2f;
  --red-glow: rgba(255, 40, 30, .75);
  --blood: #4a0606;
  --yellow: #ffe23a;
  --ink: #f1e9df;
  --muted: #b9a89c;
  --stone-1: #6f6a66;
  --stone-2: #4d4845;
  --panel-bg: #2a2423;
  --bg-tex: none;
  --stone-tex: none;
  --px: "PS2P", ui-monospace, monospace;
  --vt: "VT323", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font: 22px/1.25 var(--vt);
  background-color: #1a0b0a;
  background-image: linear-gradient(rgba(20, 0, 0, .35), rgba(0, 0, 0, .55)), var(--bg-tex);
  background-size: auto, 64px 64px;
  image-rendering: pixelated;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

#ash { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; }
#crt { position: fixed; inset: 0; pointer-events: none; z-index: 60; display: none;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,.28) 0 1px, transparent 1px 3px),
              radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.55) 100%); }
body.crt #crt { display: block; }
body.crt .page { filter: saturate(1.15) contrast(1.05); }

.page { max-width: 1240px; margin: 0 auto; padding: 0 14px 24px; position: relative; }

/* ---------- Masthead ---------- */
.masthead { position: relative; height: 230px; border: 4px solid #000; border-top: 0; overflow: hidden;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.6), 0 6px 0 #000; background: #3b0303; }
#sky { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.logo-box { position: relative; }
.logo-wrap { position: relative; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.logo { position: relative; margin: 0; text-align: center; line-height: 1; font-weight: normal; }
.logo-main, .logo-sub { position: relative; display: block; font-family: var(--px); letter-spacing: .02em; }
.logo-main { font-size: clamp(26px, 7.2vw, 78px); color: #2b2725;
  text-shadow: 0 1px 0 #24201f, 0 2px 0 #1e1a19, 0 3px 0 #191514, 0 4px 0 #141010, 0 5px 0 #0f0b0b, 0 6px 0 #0a0707,
               0 7px 0 #000, 0 10px 10px rgba(0,0,0,.8); }
.logo-main::after, .logo-sub::after { content: attr(data-text); position: absolute; left: 0; top: 0; width: 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; }
.logo-main::after {
  background-image:
    repeating-linear-gradient(90deg, rgba(0,0,0,.12) 0 3px, transparent 3px 7px, rgba(255,255,255,.08) 7px 9px, transparent 9px 13px),
    linear-gradient(#e2ddd7 0 18%, #b5aea8 18% 46%, #8d8580 46% 72%, #6a625e 72% 100%);
}
.logo-sub { margin-top: .35em; font-size: clamp(20px, 4.6vw, 50px); letter-spacing: .32em; padding-left: .32em; color: #2c0000;
  text-shadow: 0 1px 0 #250000, 0 2px 0 #1d0000, 0 3px 0 #150000, 0 4px 0 #0c0000, 0 5px 0 #000, 0 0 22px rgba(255,30,20,.7); }
.logo-sub::after { padding-left: .32em; background-image: linear-gradient(#ff6b4a 0 22%, #ec1c1c 22% 55%, #a80a0a 55% 100%); }

.splash { position: absolute; left: 100%; top: 70%; margin-left: -1.2em; margin: 0; font-family: var(--px);
  font-size: clamp(9px, 1.6vw, 16px); color: var(--yellow); text-shadow: 2px 2px 0 #3f3800; white-space: nowrap;
  transform: translateX(-50%) rotate(-17deg); animation: splash .55s ease-in-out infinite alternate; transform-origin: center; pointer-events: none; }
@keyframes splash { from { transform: translateX(-50%) rotate(-17deg) scale(.92); } to { transform: translateX(-50%) rotate(-17deg) scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .splash { animation: none; } }

/* ---------- Buttons: every control is a chunky bevelled block ---------- */
.btn {
  --b-face: #7b7470; --b-hi: #b3aca6; --b-lo: #3a3533;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 6px 12px; font: 11px/1.2 var(--px); color: var(--ink); text-decoration: none;
  text-shadow: 2px 2px 0 #1b1817; cursor: pointer; user-select: none; white-space: nowrap;
  background: var(--b-face) var(--stone-tex); background-size: 48px 48px; background-blend-mode: multiply;
  border: 3px solid; border-color: var(--b-hi) var(--b-lo) var(--b-lo) var(--b-hi);
  box-shadow: 0 0 0 2px #000, inset 0 0 0 1px rgba(0,0,0,.25); border-radius: 0;
  transition: box-shadow .12s, color .12s, filter .12s;
}
.btn:hover, .btn:focus-visible { color: var(--yellow); outline: none; filter: brightness(1.12);
  box-shadow: 0 0 0 2px #000, 0 0 0 4px var(--red), 0 0 16px 4px var(--red-glow), inset 0 0 0 1px rgba(0,0,0,.25); }
.btn:active, .btn.pressed { border-color: var(--b-lo) var(--b-hi) var(--b-hi) var(--b-lo); transform: translate(1px, 2px); filter: brightness(.9); }
.btn.toggle[aria-pressed="true"], .btn.chap.active { --b-face: #9a1010; --b-hi: #ff5a48; --b-lo: #4a0404; color: #fff; }
.btn.small { min-height: 34px; font-size: 10px; padding: 4px 10px; }
.ico { display: inline-block; width: 18px; height: 18px; flex: none; }
.ico svg { display: block; width: 100%; height: 100%; }

/* ---------- Nav + ticker ---------- */
.topnav { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 10px; margin-top: 6px;
  background: #241d1c var(--stone-tex); background-size: 64px 64px; background-blend-mode: multiply;
  border: 3px solid; border-color: #5d5552 #120e0d #120e0d #5d5552; box-shadow: 0 0 0 2px #000; }
.nav-spacer { flex: 1; }
.ticker { margin-top: 10px; overflow: hidden; white-space: nowrap; background: #090202; border: 3px solid #000;
  box-shadow: inset 0 0 0 2px #3c0909; color: var(--red-hi); font: 24px/1.6 var(--vt); text-shadow: 0 0 6px rgba(255,40,30,.6); }
.ticker-track { display: inline-block; padding-left: 100%; animation: ticker 38s linear infinite; }
.ticker-track span { margin-right: 2.2em; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation-duration: 120s; } }

/* ---------- Layout + panels ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; margin-top: 18px; align-items: start; }
main, .sidebar { display: grid; gap: 18px; min-width: 0; }

.panel { position: relative; padding: 14px 16px 16px; background: var(--panel-bg) var(--stone-tex); background-size: 64px 64px;
  background-blend-mode: multiply; border: 4px solid; border-color: #7a726d #171312 #171312 #7a726d;
  box-shadow: 0 0 0 3px #000, 6px 8px 0 rgba(0,0,0,.55); }
/* Cobwebs in two corners, drawn as SVG. */
.panel::before, .panel::after { content: ""; position: absolute; width: 58px; height: 58px; pointer-events: none; opacity: .55;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 60' fill='none' stroke='%23e8e2dc' stroke-width='1'%3E%3Cpath d='M0 0L60 22M0 0L42 42M0 0L22 60'/%3E%3Cpath d='M0 12Q8 9 13 4.5Q11 10 9 13Q3 14 0 12z' /%3E%3Cpath d='M0 24Q16 18 26 9Q22 21 18 26Q8 28 0 24z'/%3E%3Cpath d='M0 37Q24 28 40 15Q34 33 28 40Q12 43 0 37z'/%3E%3Cpath d='M0 50Q32 38 55 20Q46 46 38 54Q16 57 0 50z'/%3E%3C/svg%3E") no-repeat; }
.panel::before { left: -1px; top: -1px; }
.panel::after { right: -1px; top: -1px; transform: scaleX(-1); }
.panel-title { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; margin: -2px 0 14px; padding-bottom: 10px;
  font: 13px/1.4 var(--px); color: var(--yellow); text-shadow: 2px 2px 0 #3a1200; border-bottom: 3px solid #120e0d; box-shadow: 0 3px 0 #5d5552; }
.bullet { width: 12px; height: 12px; flex: none; background: #000; border-radius: 50%; box-shadow: 0 0 0 2px var(--red), 0 0 8px 2px var(--red-glow); }

/* ---------- Player ---------- */
.player { position: relative; background: #000; border: 4px solid; border-color: #120e0d #6a625e #6a625e #120e0d; }
.screen { position: relative; aspect-ratio: 16 / 9; background: #000; cursor: pointer; overflow: hidden; }
.screen video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
.bigplay { position: absolute; left: 50%; top: 50%; width: 96px; height: 96px; transform: translate(-50%, -50%); padding: 0;
  background: rgba(30, 4, 4, .82); border: 4px solid; border-color: #ff5a48 #4a0404 #4a0404 #ff5a48; box-shadow: 0 0 0 3px #000, 0 0 30px 6px var(--red-glow);
  cursor: pointer; color: #fff; }
.bigplay .ico { width: 44px; height: 44px; }
.bigplay:hover, .bigplay:focus-visible { outline: none; box-shadow: 0 0 0 3px #000, 0 0 44px 12px var(--red-glow); }
.player.playing .bigplay { display: none; }
.chapter-flash { position: absolute; left: 0; right: 0; top: 10%; text-align: center; font: clamp(12px, 2.4vw, 22px) var(--px); color: var(--yellow);
  text-shadow: 3px 3px 0 #000; opacity: 0; transition: opacity .4s; pointer-events: none; }
.chapter-flash.show { opacity: 1; }
.loading { position: absolute; right: 12px; top: 10px; font: 10px var(--px); color: var(--red-hi); text-shadow: 2px 2px 0 #000; }

.controls { padding: 10px; display: grid; gap: 10px; background: #1b1514 var(--stone-tex); background-size: 48px 48px; background-blend-mode: multiply;
  border-top: 3px solid #000; transition: opacity .25s; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; min-width: 0; }
.row-extra { flex-wrap: wrap; }
.row-spacer { flex: 1; }
.ctl { width: 44px; min-width: 44px; height: 40px; padding: 0; }
.time { flex: none; width: 11ch; text-align: center; font: 22px/1 var(--vt); font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink); text-shadow: 2px 2px 0 #000; }

.scrub { position: relative; flex: 1; min-width: 120px; height: 34px; cursor: pointer; touch-action: none; outline: none; }
.scrub-blocks { position: absolute; left: 0; right: 0; top: 7px; height: 20px; display: flex; gap: 2px; padding: 2px; background: #000; box-shadow: 0 0 0 2px #3c3533; }
.blk { flex: 1; min-width: 0; background: #2a2322; box-shadow: inset 2px 2px 0 rgba(255,255,255,.07), inset -2px -2px 0 rgba(0,0,0,.45); }
.blk.buf { background: #4d4542; }
.blk.on { background: #c3120f; box-shadow: inset 2px 2px 0 #ff6650, inset -2px -2px 0 #5a0303; }
.blk.ch2.on { background: #8d1fb0; box-shadow: inset 2px 2px 0 #d47cf0, inset -2px -2px 0 #34063f; }
.scrub-marker { position: absolute; top: 2px; width: 4px; height: 30px; margin-left: -2px; background: var(--yellow); box-shadow: 0 0 0 1px #000; pointer-events: none; }
.eye { position: absolute; top: 2px; width: 44px; height: 28px; margin-left: -22px; /* left is set in JS, clamped */ pointer-events: none;
  filter: drop-shadow(0 0 0 #000) drop-shadow(0 0 6px rgba(255,40,30,.9)); transition: transform .1s; }
.eye svg { width: 100%; height: 100%; display: block; }
.scrub:hover .eye, .scrub:focus-visible .eye, .scrub.dragging .eye { transform: scale(1.18); }
.scrub:focus-visible .scrub-blocks { box-shadow: 0 0 0 2px var(--red-hi), 0 0 12px 2px var(--red-glow); }

.vol { flex: none; display: flex; gap: 2px; padding: 2px; height: 26px; width: 96px; background: #000; box-shadow: 0 0 0 2px #3c3533; cursor: pointer; touch-action: none; outline: none; align-items: flex-end; }
.vol .blk { height: 100%; }
.vol .blk:nth-child(1) { height: 30%; } .vol .blk:nth-child(2) { height: 40%; } .vol .blk:nth-child(3) { height: 50%; } .vol .blk:nth-child(4) { height: 60%; }
.vol .blk:nth-child(5) { height: 70%; } .vol .blk:nth-child(6) { height: 80%; } .vol .blk:nth-child(7) { height: 90%; } .vol .blk:nth-child(8) { height: 100%; }
.vol .blk.on { background: #3fae3a; box-shadow: inset 2px 2px 0 #8de67a, inset -2px -2px 0 #14520f; }
.vol .blk.on.loud { background: #c3120f; box-shadow: inset 2px 2px 0 #ff6650, inset -2px -2px 0 #5a0303; }
.vol:focus-visible { box-shadow: 0 0 0 2px var(--red-hi), 0 0 12px 2px var(--red-glow); }

.chap .key { display: inline-grid; place-items: center; width: 18px; height: 18px; font-size: 9px; background: #000; color: var(--yellow); box-shadow: 0 0 0 1px #5d5552; text-shadow: none; }
.act { font-size: 10px; }

/* Fullscreen: controls float over the video and fade when idle. */
.player:fullscreen { display: flex; flex-direction: column; justify-content: center; border: 0; background: #000; }
.player:fullscreen .screen { aspect-ratio: auto; flex: 1; }
.player:fullscreen .controls { position: absolute; left: 0; right: 0; bottom: 0; }
.player:fullscreen.idle .controls { opacity: 0; }
.player:fullscreen.idle .screen { cursor: none; }

/* ---------- News ---------- */
.post { position: relative; z-index: 1; padding: 10px 12px; margin-bottom: 12px; background: rgba(0,0,0,.35); border: 2px solid #120e0d; box-shadow: inset 0 0 0 2px rgba(255,255,255,.05); }
.post:last-child { margin-bottom: 0; }
.post-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; margin-bottom: 4px; }
.post-title { font: 11px/1.6 var(--px); color: var(--red-hi); text-shadow: 2px 2px 0 #000; }
.post-meta { color: var(--muted); font-size: 19px; }
.post p { margin: 6px 0; }
.kbd { font: 10px var(--px); padding: 1px 5px; background: #000; color: var(--yellow); box-shadow: 0 0 0 1px #5d5552; }

/* ---------- Sidebar ---------- */
.ip-label, .cd-label, .hint { position: relative; z-index: 1; margin: 0 0 8px; }
.cd-label { color: var(--muted); }
.hint { margin: 10px 0 0; color: var(--muted); font-size: 19px; }
.ip-row { display: flex; gap: 10px; align-items: center; }
.ip { flex: 1; min-width: 0; padding: 8px; font: 11px var(--px); color: #7dff6a; background: #000; box-shadow: inset 0 0 0 2px #2b2523; text-shadow: 0 0 6px rgba(125,255,106,.6); overflow: hidden; text-overflow: ellipsis; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.cd-cell { display: grid; justify-items: center; padding: 8px 0 6px; background: #000; box-shadow: inset 0 0 0 2px #3c0909, 0 0 0 2px #000; }
.cd-num { font: 16px/1 var(--px); color: var(--red-hi); text-shadow: 0 0 8px var(--red-glow); font-variant-numeric: tabular-nums; }
.cd-unit { margin-top: 6px; font-size: 18px; color: var(--muted); }
.cd-done { margin: 10px 0 0; font: 11px/1.5 var(--px); color: var(--yellow); }
.mascot-panel { display: grid; justify-items: center; gap: 8px; }
/* Croky sits right of the bubble tail and faces left, towards her bubble and the page. */
#croky { justify-self: end; width: 128px; height: 128px; margin: -6px 18px 0 0; image-rendering: pixelated; cursor: pointer; }
.bubble { position: relative; z-index: 1; max-width: 240px; padding: 8px 10px; background: #f1e9df; color: #1a1312; font-size: 20px; line-height: 1.1;
  box-shadow: 0 0 0 3px #000, 4px 4px 0 3px rgba(0,0,0,.5); }
.bubble::after { content: ""; position: absolute; left: 62%; bottom: -12px; width: 12px; height: 12px; margin-left: -6px; background: #f1e9df; box-shadow: 3px 3px 0 #000; transform: rotate(45deg); }

/* ---------- Footer ---------- */
.footer { margin-top: 26px; padding: 16px; text-align: center; color: var(--muted); background: rgba(0,0,0,.6); border: 3px solid #000; box-shadow: inset 0 0 0 2px #2b2523; }
.footer p { margin: 8px 0 0; }
.small-print { font-size: 18px; opacity: .8; }
.badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.badges canvas { width: 88px; height: 31px; image-rendering: pixelated; }
@media (min-width: 900px) { .badges canvas { width: 132px; height: 46.5px; } }

/* ---------- Help + toast ---------- */
.help { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.72); }
.help[hidden] { display: none; }
.help-box { width: min(520px, 100%); max-height: 90vh; overflow-x: hidden; overflow-y: auto; }
.keys { position: relative; z-index: 1; display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0 0 14px; }
.keys dt { font: 10px/2 var(--px); color: var(--yellow); }
.keys dd { margin: 0; }
.toast { position: fixed; left: 50%; bottom: 22px; z-index: 90; transform: translate(-50%, 160%); opacity: 0; visibility: hidden; padding: 10px 16px; font: 11px var(--px);
  color: var(--yellow); background: #1b1514; border: 3px solid; border-color: #7a726d #171312 #171312 #7a726d; box-shadow: 0 0 0 2px #000, 0 0 18px var(--red-glow);
  transition: transform .25s, opacity .25s, visibility .25s; pointer-events: none; }
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
.noscript { padding: 12px; background: #000; color: var(--yellow); text-align: center; }


/* ---------- Achter de schermen: an old forum thread ---------- */
.thread-bar { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; margin-bottom: 12px; padding: 6px 10px;
  background: linear-gradient(#5a0909, #3a0505); border: 2px solid #000; box-shadow: inset 0 1px 0 #a3190f; color: #f1d9d0; font-size: 19px; }
.tpost { position: relative; z-index: 1; display: grid; grid-template-columns: 120px minmax(0, 1fr); margin-bottom: 12px; background: rgba(0,0,0,.4); border: 2px solid #120e0d; box-shadow: inset 0 0 0 2px rgba(255,255,255,.05); }
.tpost:last-child { margin-bottom: 0; }
.tpost-user { display: grid; justify-items: center; align-content: start; gap: 4px; padding: 10px 6px; border-right: 2px solid #120e0d; background: rgba(255,255,255,.03); text-align: center; }
.tpost-user b { font: 10px/1.4 var(--px); color: #7dff6a; }
.avatar { width: 64px; height: 48px; background: url("/img/croky.png") 0 0 / 832px 48px no-repeat; image-rendering: pixelated; box-shadow: 0 0 0 2px #000, 0 0 0 4px #3c3533; background-color: #1a1312; }
.rank { font-size: 17px; color: var(--yellow); }
.rank-bar { width: 70px; height: 8px; background: repeating-linear-gradient(90deg, var(--red) 0 8px, #000 8px 10px); box-shadow: 0 0 0 1px #000; }
.tpost-body { min-width: 0; padding: 8px 12px 12px; }
.tpost-head { display: flex; justify-content: space-between; color: var(--muted); font-size: 18px; border-bottom: 1px dashed #3c3533; padding-bottom: 4px; }
.tpost-n { color: #6a625e; }
.tpost-title { margin: 8px 0 2px; font: 11px/1.5 var(--px); color: var(--red-hi); text-shadow: 2px 2px 0 #000; }
.tpost-body p { margin: 4px 0 10px; }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.shot { display: block; padding: 5px 5px 14px; background: #e9e1d4; box-shadow: 0 0 0 2px #000, 3px 4px 0 2px rgba(0,0,0,.5); transform: rotate(-1deg); transition: transform .12s, box-shadow .12s; }
.shot:nth-child(2n) { transform: rotate(1.2deg); }
.shot:nth-child(3n) { transform: rotate(-.4deg); }
.shot:hover, .shot:focus-visible { transform: rotate(0) scale(1.04); outline: none; box-shadow: 0 0 0 2px #000, 0 0 0 4px var(--red), 0 0 16px 4px var(--red-glow); }
.shot img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: #000; }
.player.mini { margin-top: 6px; max-width: 640px; }
.player.mini.square { max-width: 320px; }
.player.mini.square .screen { aspect-ratio: 1 / 1; }
.player.mini .bigplay { width: 64px; height: 64px; }
.player.mini .bigplay .ico { width: 30px; height: 30px; }
.player.mini .controls { padding: 8px; }
.player.mini .ctl { width: 38px; min-width: 38px; height: 34px; }
.player.mini .time { font-size: 19px; width: 10ch; }
.player.mini .scrub { min-width: 60px; }

.lightbox { position: fixed; inset: 0; z-index: 85; display: grid; place-items: center; padding: 16px 64px; background: rgba(0,0,0,.88); }
.lightbox[hidden] { display: none; }
.lb-fig { margin: 0; max-width: 100%; max-height: 100%; display: grid; gap: 8px; justify-items: center; }
.lb-fig img { max-width: min(1600px, 100%); max-height: 80vh; object-fit: contain; box-shadow: 0 0 0 3px #000, 0 0 0 6px #5d5552, 0 0 30px rgba(255,40,30,.4); background: #000; }
.lb-fig figcaption { color: var(--yellow); font: 11px/1.5 var(--px); text-align: center; text-shadow: 2px 2px 0 #000; }
.lb-prev, .lb-next { position: fixed; top: 50%; width: 44px; transform: translateY(-50%); font-size: 14px; }
.lb-prev { left: 10px; } .lb-next { right: 10px; }
.lb-prev:active, .lb-next:active { transform: translate(1px, calc(-50% + 2px)); }
.lb-close { position: fixed; top: 12px; right: 12px; }
@media (max-width: 640px) {
  .tpost { grid-template-columns: 1fr; }
  .tpost-user { grid-template-columns: auto auto auto; justify-content: start; align-items: center; gap: 10px; border-right: 0; border-bottom: 2px solid #120e0d; padding: 6px 10px; }
  .tpost-user .avatar { width: 32px; height: 24px; background-size: 416px 24px; }
  .rank-bar { display: none; }
  .shots { grid-template-columns: repeat(2, 1fr); }
  .lightbox { padding: 12px 8px 60px; }
  .lb-prev, .lb-next { top: auto; bottom: 10px; transform: none; }
  .lb-prev:active, .lb-next:active { transform: translate(1px, 2px); }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}
@media (max-width: 1000px) {
  .splash { left: 50%; top: 100%; margin: 4px 0 0; font-size: clamp(9px, 1.5vw, 13px); transform: translateX(-50%) rotate(-5deg); }
  @keyframes splash { from { transform: translateX(-50%) rotate(-5deg) scale(.94); } to { transform: translateX(-50%) rotate(-5deg) scale(1.06); } }
}
@media (max-width: 640px) {
  body { font-size: 20px; }
  .page { padding: 0 8px 18px; }
  .masthead { height: 170px; }
  .vol { display: none; }
  .topnav { gap: 8px; padding: 10px 8px; }
  .nav-btn { font-size: 9px; padding: 4px 8px; min-height: 34px; }
  .nav-spacer { display: none; }
  .row-main { flex-wrap: wrap; }
  .scrub { order: -1; flex-basis: 100%; }
  .time { width: auto; min-width: 9ch; flex: 1; text-align: left; font-size: 20px; }
  .chap, .act { flex: 1 1 calc(50% - 10px); font-size: 9px; padding: 6px; }
  .row-spacer { display: none; }
  .bigplay { width: 72px; height: 72px; }
  .panel { padding: 12px; }
  .panel-title { font-size: 11px; }
}
@media (max-width: 380px) { .act .ico { display: none; } }

/* ---------- Halloween party ad: a 2010 web banner, tacky on purpose (728x90, 468x60 and 320x50) ---------- */
.ad-slot { display: grid; justify-items: center; gap: 2px; margin-top: 14px; }
.ad-label { font: 8px/1 var(--px); color: #8a7d76; letter-spacing: .1em; text-transform: uppercase; }
.ad { position: relative; display: flex; align-items: center; gap: 10px; width: 728px; max-width: 100%; height: 90px; padding: 0 12px; overflow: hidden;
  color: #fff; text-decoration: none; background:
    repeating-linear-gradient(135deg, rgba(0,0,0,.18) 0 6px, transparent 6px 12px),
    linear-gradient(#ff9a1f 0%, #f06a0c 48%, #b8420a 52%, #6a1fa0 100%);
  border: 3px solid #000; box-shadow: inset 0 0 0 2px #ffd36a, 0 0 0 2px #5b2a86, 0 0 18px rgba(255,140,30,.45); cursor: pointer; }
.ad:hover, .ad:focus-visible { outline: none; box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px #ffe23a, 0 0 26px rgba(255,180,40,.8); }
.ad-pumpkin { flex: none; align-self: flex-end; margin-bottom: 4px; width: 60px; height: 60px; image-rendering: pixelated; filter: drop-shadow(2px 2px 0 #000); }
.ad-pumpkin-r { align-self: center; margin-bottom: 0; }
.ad-copy { flex: 1; min-width: 0; display: grid; gap: 6px; padding-left: 12px; /* clear of the sticker */ }
.ad-head { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font: 11px/1.2 var(--px); color: #ffe23a; text-shadow: 2px 2px 0 #000, -1px -1px 0 #5b2a86; animation: adwobble 1.2s steps(2) infinite; }
.ad-head-short { display: none; }
.ad-sub { font: 21px/.95 var(--vt); color: #fff; text-shadow: 2px 2px 0 #000; }
.ad-url { color: #7dff6a; text-decoration: underline; text-underline-offset: 3px; }
.ad-side { flex: none; display: grid; justify-items: center; gap: 3px; }
.ad-timer { font: 8px/1.2 var(--px); color: #fff; text-shadow: 1px 1px 0 #000; }
.ad-clock { min-width: 9ch; padding: 1px 4px; text-align: center; font: 20px/1 var(--vt); color: #ff3b2f; background: #000; box-shadow: inset 0 0 0 1px #5a0909; font-variant-numeric: tabular-nums; }
.ad-clock:empty { display: none; }
.ad-cta { padding: 5px 8px; font: 10px/1 var(--px); color: #000; background: #7dff6a; border: 3px solid; border-color: #d6ffcc #1f7a17 #1f7a17 #d6ffcc; box-shadow: 0 0 0 2px #000; animation: adpulse .8s steps(2) infinite; }
.ad:hover .ad-cta { background: #ffe23a; border-color: #fff6b0 #9a7a00 #9a7a00 #fff6b0; }
/* Two-line sticker over the left pumpkin's head room, so it never covers the copy. */
.ad-sticker { position: absolute; left: 3px; top: 3px; width: 80px; padding: 3px 1px; text-align: center; font: 7px/1.3 var(--px); color: #fff; background: #e0101a; border: 2px solid #fff; box-shadow: 0 0 0 1px #000;
  transform: rotate(-8deg); animation: adblink .7s steps(1) infinite; }
.ad-shine { position: absolute; top: -20%; bottom: -20%; left: -30%; width: 22%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-20deg); animation: adshine 3.2s ease-in-out infinite; pointer-events: none; }
@keyframes adblink { 50% { background: #ffe23a; color: #000; } }
@keyframes adpulse { 50% { transform: scale(1.08); } }
@keyframes adwobble { 50% { transform: translateY(-1px); } }
@keyframes adshine { 0%, 55% { left: -30%; } 100% { left: 120%; } }
@media (prefers-reduced-motion: reduce) { .ad-sticker, .ad-cta, .ad-head, .ad-shine { animation: none; } .ad-shine { display: none; } }
@media (max-width: 780px) { /* 468x60 */
  .ad { width: 468px; height: 60px; gap: 6px; padding: 0 8px; }
  .ad-pumpkin { width: 36px; height: 36px; margin-bottom: 2px; }
  .ad-pumpkin-r { display: none; }
  .ad-copy { gap: 3px; padding-left: 6px; }
  .ad-head { font-size: 8px; }
  .ad-sub { font-size: 17px; }
  .ad-timer, .ad-clock { display: none; }
  .ad-cta { font-size: 8px; padding: 4px 6px; }
  .ad-sticker { width: 52px; font-size: 5px; padding: 1px; left: 2px; top: 2px; }
}
@media (max-width: 500px) { /* 320x50 */
  .ad { width: 320px; height: 50px; }
  .ad-pumpkin { width: 30px; height: 30px; align-self: center; margin: 0; }
  .ad-head-long { display: none; }
  .ad-head-short { display: block; font-size: 8px; }
  .ad-subtext { display: none; }
  .ad-sub { font-size: 18px; }
  .ad-cta { font-size: 7px; padding: 3px 4px; border-width: 2px; }
  .ad-sticker { left: auto; right: 2px; top: 1px; width: auto; white-space: nowrap; transform: rotate(3deg); font-size: 5px; }
  .ad-side { margin-top: 10px; }
}

/* ---------- Games: Croky Bonky in a 2010 flash-game portal box ---------- */
.game-card { position: relative; z-index: 1; display: grid; gap: 8px; justify-items: center; padding: 8px; text-decoration: none; color: var(--ink);
  background: linear-gradient(#1c3a6e, #0d1d3a); border: 3px solid; border-color: #6c8ad0 #0a1020 #0a1020 #6c8ad0; box-shadow: 0 0 0 2px #000; }
.game-card:hover, .game-card:focus-visible { outline: none; box-shadow: 0 0 0 2px #000, 0 0 0 4px var(--yellow), 0 0 16px 4px rgba(255,226,58,.5); }
.game-screen { position: relative; display: block; width: 100%; max-width: 240px; aspect-ratio: 120 / 68; box-shadow: 0 0 0 2px #000, 0 0 0 4px #3d5a99; }
#bonkyShot { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.game-bigplay { position: absolute; left: 26%; top: 68%; /* over the sofa, Croky stays visible */ display: grid; place-items: center; width: 58px; height: 58px; transform: translate(-50%, -50%); color: #fff;
  background: rgba(10, 60, 10, .85); border: 4px solid; border-color: #8de67a #14520f #14520f #8de67a; box-shadow: 0 0 0 3px #000, 0 0 18px 4px rgba(125,255,106,.6); }
.game-bigplay .ico { width: 28px; height: 28px; }
.game-card:hover .game-bigplay { transform: translate(-50%, -50%) scale(1.1); }
.game-new { position: absolute; right: -6px; top: -8px; padding: 3px 5px; font: 8px/1 var(--px); color: #000; background: var(--yellow); border: 2px solid #000; transform: rotate(8deg); animation: adblink .9s steps(1) infinite; }
.game-name { font: 14px/1 var(--px); color: var(--yellow); text-shadow: 2px 2px 0 #000, 0 0 10px rgba(255,226,58,.5); }
.game-play { --b-face: #2f8a29; --b-hi: #8de67a; --b-lo: #14520f; width: 100%; font-size: 10px; }
.game-card:hover .game-play { color: var(--yellow); filter: brightness(1.12); }
.game-desc { position: relative; z-index: 1; margin: 10px 0 6px; }
.game-keys { position: relative; z-index: 1; display: grid; grid-template-columns: max-content 1fr; gap: 2px 10px; margin: 0 0 6px; font-size: 19px; }
.game-keys dt { font: 9px/2.1 var(--px); color: var(--yellow); }
.game-keys dd { margin: 0; color: var(--muted); }
.game-meta { position: relative; z-index: 1; margin: 0; font-size: 18px; color: var(--muted); }
.game-stars { color: var(--yellow); letter-spacing: 2px; }
.game-host { color: #7dff6a; }

/* ---------- Language switch: two chunky pixel buttons in the masthead ---------- */
.lang-switch { position: absolute; left: 10px; top: 10px; z-index: 2; display: flex; gap: 8px; }
.lang-btn { --b-face: #4d4845; --b-hi: #9a928c; --b-lo: #1e1a19; display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 4px 8px;
  font: 10px/1 var(--px); color: var(--muted); text-shadow: 2px 2px 0 #000; cursor: pointer;
  background: var(--b-face) var(--stone-tex); background-size: 48px 48px; background-blend-mode: multiply;
  border: 3px solid; border-color: var(--b-hi) var(--b-lo) var(--b-lo) var(--b-hi); box-shadow: 0 0 0 2px #000; }
.lang-btn:hover, .lang-btn:focus-visible { outline: none; color: var(--yellow); box-shadow: 0 0 0 2px #000, 0 0 0 4px var(--red), 0 0 12px 2px var(--red-glow); }
.lang-btn:active { border-color: var(--b-lo) var(--b-hi) var(--b-hi) var(--b-lo); transform: translate(1px, 2px); }
.lang-btn[aria-pressed="true"] { --b-face: #9a1010; --b-hi: #ff5a48; --b-lo: #4a0404; color: #fff; }
.lang-btn .flag { width: 14px; height: 10px; box-shadow: 0 0 0 1px #000; }
.lang-nl .flag { background: linear-gradient(#ae1c28 0 33.3%, #fff 33.3% 66.6%, #21468b 66.6%); }
.lang-en .flag { background: linear-gradient(90deg, transparent 40%, #c8102e 40% 60%, transparent 60%), linear-gradient(transparent 35%, #c8102e 35% 65%, transparent 65%),
  linear-gradient(90deg, transparent 30%, #fff 30% 70%, transparent 70%), linear-gradient(transparent 25%, #fff 25% 75%, transparent 75%), #012169; }
@media (max-width: 640px) { .lang-switch { left: 6px; top: 6px; gap: 6px; } .lang-btn { min-height: 26px; padding: 3px 6px; font-size: 8px; } }
