/* Acorn Arcade — one stylesheet for every page.
   Look: the Little Elsewheres "specimen card": a warm cream card with a faint pencil grid, one warm ink for every line
   (never pure black), the Visitor's cobalt for actions, saturated accents, hard pixel shadows, pixel lettering. */

:root {
  --cream: #f0e8dc;
  --card: #f3ead8;
  --paper: #fffaf0;
  --pencil: #e2d7c3;
  --pencil-2: #d6cec0;
  --ink: #241c2c;
  --ink-2: #4a4058;
  --ink-3: #7a6f84;
  --cobalt: #2f4fc0;
  --cobalt-light: #5a7ee6;
  --cobalt-dark: #1c2e78;
  --cobalt-tint: #dfe6fb;
  --amber: #e2a83c;
  --amber-light: #f6d77a;
  --red: #d8443a;
  --rose: #e8857a;
  --green: #4f9a4a;
  --violet: #8a5ab8;
  --radius: 8px;
  --hard: 3px 3px 0 var(--ink);
  --hard-lg: 5px 5px 0 var(--ink);
  --header-h: 66px;
  --gutter: clamp(16px, 4vw, 32px);
  --max: 1240px;
  --font-display: 'Pixelify Sans', 'Trebuchet MS', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0; min-height: 100vh;
  font-family: var(--font-body); font-size: 16px; line-height: 1.55;
  color: var(--ink);
  background-color: var(--cream);
  background-image: linear-gradient(var(--pencil) 1px, transparent 1px), linear-gradient(90deg, var(--pencil) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: -1px -1px;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--amber-light); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--cobalt); color: var(--paper); padding: 8px 14px; border-radius: 6px; font-weight: 800; text-decoration: none; border: 2px solid var(--ink); }
.skip-link:focus { top: 12px; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.pixel { image-rendering: pixelated; image-rendering: crisp-edges; }
.icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------- header ---------------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 2px solid var(--ink); box-shadow: 0 3px 0 var(--pencil-2); }
.site-header .wrap { display: flex; align-items: center; gap: 14px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand img { width: 32px; height: 32px; }
.brand-name { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; letter-spacing: .5px; line-height: 1; color: var(--ink); }
.brand-name span { color: var(--cobalt); }
.search { position: relative; flex: 1; max-width: 440px; margin-left: auto; }
.search .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.search input { width: 100%; height: 42px; padding: 0 44px 0 40px; border-radius: var(--radius); border: 2px solid var(--ink); background: var(--card); color: var(--ink); transition: background .15s, box-shadow .15s; }
.search input::placeholder { color: var(--ink-3); }
.search input:focus { outline: none; background: var(--paper); box-shadow: 0 0 0 3px var(--cobalt-tint), var(--hard); }
.search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font: 700 12px/1 var(--font-display); color: var(--ink-2); border: 2px solid var(--ink-3); border-radius: 4px; padding: 3px 6px; pointer-events: none; background: var(--paper); }
.search input:focus + kbd, .search input:not(:placeholder-shown) + kbd { display: none; }
.header-actions { display: flex; gap: 8px; flex: none; align-items: center; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 42px; min-width: 42px; padding: 0 12px; border-radius: var(--radius); border: 2px solid var(--ink); background: var(--paper); color: var(--ink); text-decoration: none; font-weight: 800; font-size: .92rem; box-shadow: var(--hard); transition: transform .1s, box-shadow .1s, background .15s; }
.icon-btn:hover { background: var(--cobalt-tint); }
.icon-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.icon-btn .count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 4px; background: var(--red); color: var(--paper); font: 700 .75rem/20px var(--font-display); text-align: center; }
.icon-btn .count:empty { display: none; }
.wallet { background: var(--amber-light); font-family: var(--font-display); font-size: 1rem; }
.wallet:hover { background: var(--amber); }
.wallet img { width: 24px; height: 24px; }
.wallet.bump { animation: bump .45s ease; }
@keyframes bump { 30% { transform: translateY(-4px) scale(1.06); } 60% { transform: translateY(1px); } }
.showcase-badge { padding: 0; width: 42px; overflow: hidden; }
.showcase-badge img { width: 32px; height: 32px; }
.showcase-badge[hidden] { display: none; }
@media (max-width: 760px) {
  .site-header .wrap { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; row-gap: 10px; }
  .search { order: 3; flex-basis: 100%; max-width: none; margin-left: 0; }
  .header-actions { margin-left: auto; }
  .icon-btn .label { display: none; }
  .search kbd { display: none; }
  .brand-name { font-size: 1.3rem; }
}
@media (max-width: 400px) { .brand-name { display: none; } }

/* ---------------- buttons ---------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: var(--radius); border: 2px solid var(--ink); font-weight: 800; font-size: 1rem; text-decoration: none; white-space: nowrap; box-shadow: var(--hard); transition: transform .1s, box-shadow .1s, background .15s; }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-primary { background: var(--cobalt); color: var(--paper); }
.btn-primary:hover { background: var(--cobalt-light); }
.btn-ghost { background: var(--paper); color: var(--ink); }
.btn-ghost:hover { background: var(--cobalt-tint); }
.btn-amber { background: var(--amber-light); color: var(--ink); }
.btn-amber:hover { background: var(--amber); }
.btn .icon { width: 1.2em; height: 1.2em; }
.btn-primary .icon { fill: currentColor; stroke: none; }
.btn-ghost[aria-pressed="true"] { color: var(--red); }
.btn-ghost[aria-pressed="true"] .icon { fill: currentColor; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------------- spotlight (homepage hero) ---------------- */
.spotlight { padding: 28px 0 8px; }
.spot { position: relative; display: grid; grid-template-columns: 1.35fr 1fr; border-radius: 12px; background: var(--paper); border: 2px solid var(--ink); box-shadow: var(--hard-lg); min-height: 340px; }
.spot-media { position: relative; display: block; background: var(--ink); overflow: hidden; border-radius: 10px 0 0 10px; border-right: 2px solid var(--ink); }
.spot-media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 9; transition: transform .6s ease, opacity .35s; }
.spot-media:hover img { transform: scale(1.03); }
.spot-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: var(--cobalt); color: var(--paper); border: 3px solid var(--ink); box-shadow: var(--hard); transition: transform .2s; }
.spot-play .icon { width: 30px; height: 30px; fill: currentColor; stroke: none; margin-left: 4px; }
.spot-media:hover .spot-play { transform: translate(-50%, -50%) scale(1.08); }
.spot-body { position: relative; z-index: 1; padding: 30px clamp(30px, 13vw, 170px) 26px 30px; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: .95rem; letter-spacing: 1px; text-transform: uppercase; color: var(--cobalt); }
.eyebrow::before { content: ''; width: 9px; height: 9px; background: currentColor; }
.spot-title { margin: 0; font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.02; letter-spacing: .5px; }
.spot-text { margin: 0; color: var(--ink-2); font-size: 1.05rem; max-width: 40ch; }
.spot-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.spot-nav { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.spot-dots { display: flex; gap: 6px; }
.spot-dots button { width: 12px; height: 12px; border-radius: 2px; border: 2px solid var(--ink); padding: 0; background: var(--paper); transition: width .25s, background .25s; }
.spot-dots button[aria-current="true"] { width: 28px; background: var(--cobalt); }
.spot-arrow { width: 34px; height: 34px; border-radius: 6px; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); display: grid; place-items: center; box-shadow: 2px 2px 0 var(--ink); }
.spot-arrow:hover { background: var(--cobalt-tint); }
.spot.swap .spot-media img, .spot.swap .spot-body > * { opacity: 0; }
.spot-body > * { transition: opacity .3s; }
.spot-mascot { position: absolute; right: 18px; bottom: 0; width: 129px; height: auto; pointer-events: none; z-index: 2; }
@media (max-width: 1100px) { .spot-mascot { display: none; } .spot-body { padding-right: 30px; } }
@media (max-width: 860px) {
  .spot { grid-template-columns: 1fr; min-height: 0; }
  .spot-media { border-radius: 10px 10px 0 0; border-right: 0; border-bottom: 2px solid var(--ink); }
  .spot-body { padding: 18px 20px 22px; }
  .spot-play { width: 64px; height: 64px; }
}

/* ---------------- greeting strip (the Visitor + the daily crate) ---------------- */
.greet { display: flex; align-items: center; gap: 16px; margin-top: 22px; padding: 10px 16px; background: var(--paper); border: 2px solid var(--ink); border-radius: 10px; box-shadow: var(--hard); }
.greet .greet-visitor { flex: none; width: 86px; height: 106px; margin: -24px -6px -12px -10px; }
.greet p { margin: 0; flex: 1; color: var(--ink-2); }
.greet strong { color: var(--ink); font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; }
@media (max-width: 600px) { .greet { flex-wrap: wrap; } .greet p { flex-basis: calc(100% - 90px); } .greet .btn { width: 100%; } }

/* ---------------- sections, chips, rows ---------------- */
section.block { padding: 26px 0 6px; scroll-margin-top: calc(var(--header-h) + 8px); }
@media (max-width: 760px) { section.block { scroll-margin-top: 124px; } }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; border-bottom: 2px solid var(--ink); padding-bottom: 8px; box-shadow: 0 3px 0 var(--pencil-2); }
.section-title { margin: 0; font-family: var(--font-display); font-size: 1.55rem; font-weight: 600; letter-spacing: .5px; display: flex; align-items: center; gap: 10px; }
.section-title .icon { color: var(--cobalt); }
.section-sub { color: var(--ink-3); font-family: var(--font-display); font-size: .85rem; letter-spacing: 1.5px; text-transform: uppercase; }
.link-btn { background: none; border: 0; color: var(--cobalt); font-weight: 800; font-size: .92rem; padding: 6px 4px; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--cobalt-dark); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 4px 12px 2px; scrollbar-width: none; -ms-overflow-style: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 6px; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); font-weight: 800; font-size: .93rem; box-shadow: 2px 2px 0 var(--ink); transition: background .15s; }
.chip:hover { background: var(--cobalt-tint); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.chip .n { font-family: var(--font-display); font-size: .8rem; opacity: .7; }
.chip .dot { width: 10px; height: 10px; border-radius: 2px; background: var(--c, var(--cobalt)); border: 1px solid var(--ink); }
.sort { display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: .9rem; font-weight: 700; }
.sort select { height: 36px; border-radius: 6px; border: 2px solid var(--ink); background: var(--paper); padding: 0 30px 0 10px; font-weight: 800; color: var(--ink); appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23241c2c' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 250px); gap: 16px; overflow-x: auto; padding: 4px 6px 16px 2px; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: var(--ink-3) transparent; }
.row > * { scroll-snap-align: start; }

/* ---------------- game cards ---------------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
@media (max-width: 520px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.card { position: relative; display: flex; flex-direction: column; border-radius: var(--radius); background: var(--paper); border: 2px solid var(--ink); overflow: hidden; text-decoration: none; box-shadow: var(--hard); transition: transform .15s ease, box-shadow .15s ease; --c: var(--cobalt); }
.card:hover, .card:focus-within { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.card-media { position: relative; aspect-ratio: 16 / 9; background: var(--ink); overflow: hidden; border-bottom: 2px solid var(--ink); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.card:hover .card-media img { transform: scale(1.05); }
.card-hover { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; opacity: 0; background: rgba(36, 28, 44, .28); transition: opacity .2s; }
.card-hover span { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: var(--cobalt); color: var(--paper); border: 3px solid var(--ink); transform: scale(.85); transition: transform .2s; }
.card-hover .icon { fill: currentColor; stroke: none; width: 20px; height: 20px; margin-left: 3px; }
.card:hover .card-hover, .card:focus-visible .card-hover { opacity: 1; }
.card:hover .card-hover span { transform: scale(1); }
.card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-title { margin: 0; font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; letter-spacing: .3px; line-height: 1.15; }
.card-tag { margin: 0; color: var(--ink-2); font-size: .88rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: inline-flex; align-self: flex-start; align-items: center; margin-top: auto; padding: 1px 8px; border-radius: 4px; font: 600 .75rem/1.5 var(--font-display); letter-spacing: 1px; text-transform: uppercase; color: var(--paper); background: var(--c); border: 2px solid var(--ink); }
.card .card-body > .card-meta { margin-top: auto; }
.card-tag + .card-meta { margin-top: 8px; }
.badge { position: absolute; z-index: 2; top: 8px; left: 8px; padding: 1px 8px; border-radius: 4px; font: 700 .72rem/1.4 var(--font-display); letter-spacing: 1px; background: var(--amber); color: var(--ink); border: 2px solid var(--ink); }
.fav-toggle { position: absolute; z-index: 3; top: 6px; right: 6px; width: 34px; height: 34px; border-radius: 6px; border: 2px solid var(--ink); display: grid; place-items: center; background: var(--paper); color: var(--ink); opacity: 0; transition: opacity .2s, transform .15s; }
.fav-toggle .icon { width: 17px; height: 17px; }
.card:hover .fav-toggle, .card:focus-within .fav-toggle, .fav-toggle[aria-pressed="true"], .fav-toggle:focus-visible { opacity: 1; }
.fav-toggle[aria-pressed="true"] { color: var(--red); }
.fav-toggle[aria-pressed="true"] .icon { fill: currentColor; }
.fav-toggle:hover { transform: scale(1.1); }
@media (hover: none) { .fav-toggle { opacity: 1; } .card-hover { display: none; } }
.card-link { position: absolute; inset: 0; z-index: 2; border-radius: inherit; }
.card-link:focus-visible { outline-offset: -4px; }
.card.mini .card-title { font-size: 1.05rem; }
.card.mini .card-tag { display: none; }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 30px 16px; border: 2px dashed var(--ink-3); border-radius: 10px; color: var(--ink-2); background: var(--paper); }
.empty img { width: 112px; height: auto; margin: 0 auto 10px; }
.empty h3 { margin: 0 0 6px; font-family: var(--font-display); font-size: 1.35rem; color: var(--ink); }
.empty p { margin: 0 0 16px; }

/* ---------------- ad slots (empty until ads are switched on: site.config.js) ---------------- */
.ad-slot { display: none; }
.ads-placeholders .ad-slot, .ads-on .ad-slot { display: flex; align-items: center; justify-content: center; margin: 22px auto; }
.ads-placeholders .ad-slot { border: 2px dashed var(--ink-3); border-radius: 8px; color: var(--ink-3); font: 600 .8rem/1.3 var(--font-display); letter-spacing: 1px; text-transform: uppercase; text-align: center; background: var(--card); }
.ad-slot[data-size="728x90"] { width: min(728px, 100%); min-height: 90px; }
.ad-slot[data-size="300x250"] { width: 300px; max-width: 100%; min-height: 250px; margin: 0 auto 18px; }
.ad-slot[data-size="card"] { margin: 0; min-height: 100%; }
.grid > .ad-slot { min-height: 220px; }

/* ---------------- game page ---------------- */
.crumbs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 18px 0 14px; color: var(--ink-3); font-size: .9rem; font-weight: 700; }
.crumbs a { color: var(--cobalt); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
@media (max-width: 1060px) { .game-layout { grid-template-columns: minmax(0, 1fr); } }
.player { position: relative; border-radius: 10px; overflow: hidden; background: var(--ink); border: 2px solid var(--ink); box-shadow: var(--hard-lg); aspect-ratio: 16 / 9; max-height: calc(100vh - var(--header-h) - 140px); min-height: 260px; width: 100%; }
@media (max-width: 720px) { .player { aspect-ratio: 4 / 3; max-height: none; min-height: 0; } }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: var(--ink); }
.poster { position: absolute; inset: 0; display: grid; place-items: center; cursor: pointer; border: 0; padding: 0; background: var(--ink); color: var(--paper); width: 100%; }
.poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.55) saturate(.9); }
.poster-inner { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 16px; }
.poster-inner .big-play { width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center; background: var(--cobalt); color: var(--paper); border: 3px solid var(--paper); box-shadow: 4px 4px 0 rgba(0, 0, 0, .4); animation: pulse 2.4s ease-in-out infinite; }
.poster-inner .big-play .icon { width: 36px; height: 36px; fill: currentColor; stroke: none; margin-left: 5px; }
.poster-title { font-family: var(--font-display); font-size: clamp(1.5rem, 3.6vw, 2.4rem); line-height: 1; text-shadow: 3px 3px 0 var(--ink); }
.poster-hint { font-size: .92rem; color: var(--card); text-shadow: 2px 2px 0 var(--ink); }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.loader { position: absolute; inset: 0; display: grid; place-items: center; background: var(--cream); z-index: 2; }
.loader[hidden] { display: none; }
.loader-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--ink-2); font-family: var(--font-display); letter-spacing: 1px; }
.player-exit { display: none; }
/* the walking mini Visitor: a 4-frame strip of 17x39 shown at 3x */
.walker { width: 51px; height: 117px; background: url("../art/mini_walk.png") 0 0 / 204px 117px no-repeat; image-rendering: pixelated; animation: walk .5s steps(4) infinite; }
@keyframes walk { to { background-position: -204px 0; } }
.player:fullscreen { max-height: none; border-radius: 0; border: 0; aspect-ratio: auto; }
.player:-webkit-full-screen { max-height: none; border-radius: 0; border: 0; aspect-ratio: auto; width: 100%; height: 100%; }
.player.pseudo-fs { position: fixed; inset: 0; z-index: 1000; width: 100vw; height: 100vh; height: 100dvh; max-height: none; aspect-ratio: auto; border-radius: 0; border: 0; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); background: var(--ink); }
.player.pseudo-fs .player-exit, .player:fullscreen .player-exit { display: grid; position: absolute; z-index: 5; top: calc(8px + env(safe-area-inset-top)); right: calc(8px + env(safe-area-inset-right)); width: 34px; height: 34px; border-radius: 6px; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); place-items: center; opacity: .9; }
body.no-scroll { overflow: hidden; }
.game-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; flex-wrap: wrap; }
.game-title-wrap { display: flex; align-items: center; gap: 14px; min-width: 0; }
.game-thumb { width: 64px; height: 36px; border-radius: 4px; object-fit: cover; border: 2px solid var(--ink); flex: none; }
.game-title { margin: 0; font-family: var(--font-display); font-size: clamp(1.6rem, 3.2vw, 2.1rem); line-height: 1.05; letter-spacing: .4px; }
.game-sub { color: var(--ink-3); font-size: .9rem; margin-top: 2px; font-weight: 700; }
.game-sub a { color: var(--c, var(--cobalt)); text-decoration: none; font-weight: 800; }
.game-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.game-actions .icon-btn[aria-pressed="true"] { color: var(--red); }
.game-actions .icon-btn[aria-pressed="true"] .icon { fill: currentColor; }
.rotate-tip { display: none; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 14px; border-radius: 8px; background: var(--cobalt-tint); border: 2px solid var(--ink); color: var(--ink-2); font-size: .9rem; font-weight: 700; }
@media (max-width: 720px) and (orientation: portrait) { .rotate-tip.show { display: flex; } }
.panel { background: var(--paper); border: 2px solid var(--ink); border-radius: 10px; padding: 18px 20px; box-shadow: var(--hard); }
.panel h2 { margin: 0 0 12px; font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; letter-spacing: .4px; display: flex; align-items: center; gap: 8px; }
.panel h2 .icon { color: var(--cobalt); }
.panel p { margin: 0 0 12px; color: var(--ink-2); }
.panel p:last-child { margin-bottom: 0; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.info-grid .wide { grid-column: 1 / -1; }
@media (max-width: 760px) { .info-grid { grid-template-columns: 1fr; } }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.steps li { counter-increment: s; position: relative; padding-left: 38px; color: var(--ink-2); }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 4px; display: grid; place-items: center; background: var(--cobalt); color: var(--paper); border: 2px solid var(--ink); font: 700 .9rem/1 var(--font-display); }
.controls { width: 100%; border-collapse: collapse; font-size: .93rem; }
.controls th, .controls td { text-align: left; padding: 8px 0; border-bottom: 1px dashed var(--ink-3); vertical-align: top; }
.controls tr:last-child td { border-bottom: 0; }
.controls td:first-child { width: 46%; padding-right: 12px; }
.key { display: inline-block; padding: 1px 7px; border-radius: 4px; background: var(--card); border: 2px solid var(--ink); border-bottom-width: 4px; font-weight: 800; font-size: .82rem; color: var(--ink); white-space: nowrap; }
.controls td:last-child { color: var(--ink-2); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tag { padding: 3px 10px; border-radius: 4px; background: var(--card); border: 2px solid var(--ink); color: var(--ink); font-size: .85rem; font-weight: 800; text-decoration: none; }
.tag:hover { background: var(--cobalt-tint); }
.facts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; color: var(--ink-3); font-size: .88rem; font-weight: 700; }
.facts span { display: inline-flex; align-items: center; gap: 6px; }
.side-list { display: grid; gap: 8px; }
.side-item { display: grid; grid-template-columns: 112px 1fr; gap: 12px; align-items: center; padding: 6px; border-radius: 8px; text-decoration: none; border: 2px solid transparent; transition: background .15s, border-color .15s; }
.side-item:hover { background: var(--cobalt-tint); border-color: var(--ink); }
.side-item img { width: 112px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; border: 2px solid var(--ink); }
.side-item strong { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; line-height: 1.15; }
.side-item small { color: var(--ink-3); font-size: .82rem; font-weight: 700; }
.not-found { text-align: center; padding: 50px 16px; }
.not-found h1 { font-family: var(--font-display); font-size: 2.4rem; margin: 0 0 8px; }
.not-found .nf-visitor { width: 114px; height: auto; margin: 0 auto 16px; }

/* ---------------- footer ---------------- */
.site-footer { margin-top: 56px; border-top: 2px solid var(--ink); background: var(--paper); box-shadow: 0 -3px 0 var(--pencil-2); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-top: 26px; padding-bottom: 34px; color: var(--ink-3); font-size: .9rem; }
.site-footer .brand-name { font-size: 1.2rem; }
.site-footer p { margin: 8px 0 0; max-width: 46ch; color: var(--ink-2); }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-start; }
.foot-links a { color: var(--cobalt); text-decoration: none; font-weight: 800; }
.foot-links a:hover { text-decoration: underline; }

/* ---------------- daily crate + badge book ---------------- */
.showcase-badge { width: 50px; }
.crate-panel { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; background: var(--paper); border: 2px solid var(--ink); border-radius: 12px; box-shadow: var(--hard-lg); padding: 20px 26px; }
.crate-stage { display: flex; align-items: flex-end; gap: 6px; min-height: 246px; }
.crate-copy .crate-status { font-family: var(--font-display); font-size: 1.6rem; margin: 0 0 6px; }
.crate-copy .crate-status strong { color: var(--cobalt); font-weight: 600; }
.crate-hint { margin: 0 0 14px; color: var(--ink-2); max-width: 46ch; }
.crate-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.crate-odds { margin: 14px 0 0; color: var(--ink-3); font-size: .85rem; font-weight: 700; }
@media (max-width: 760px) { .crate-panel { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 16px; } .crate-actions { justify-content: center; } .crate-stage { min-height: 0; } }
.reel-wrap { position: relative; margin-top: 18px; height: 168px; overflow: hidden; background: var(--ink); border: 2px solid var(--ink); border-radius: 10px; box-shadow: var(--hard-lg); }
.reel { display: flex; height: 100%; align-items: center; will-change: transform; }
.reel-tile { flex: none; width: 148px; height: 150px; display: grid; place-items: center; margin: 0; border-right: 2px solid rgba(255, 250, 240, .12); background: linear-gradient(180deg, transparent 60%, color-mix(in srgb, var(--r) 45%, transparent)); border-bottom: 4px solid var(--r); }
.reel-tile.win { background: color-mix(in srgb, var(--r) 55%, var(--ink)); }
.reel-marker { position: absolute; z-index: 2; left: 50%; top: 0; bottom: 0; width: 4px; margin-left: -2px; background: var(--amber); box-shadow: 0 0 0 2px var(--ink); pointer-events: none; }
.reel-marker::before, .reel-marker::after { content: ''; position: absolute; left: 50%; transform: translateX(-50%); border: 9px solid transparent; }
.reel-marker::before { top: -2px; border-top-color: var(--amber); }
.reel-marker::after { bottom: -2px; border-bottom-color: var(--amber); }
.reveal { display: flex; align-items: center; gap: 24px; margin-top: 18px; padding: 18px 24px; background: var(--paper); border: 2px solid var(--ink); border-radius: 12px; box-shadow: 5px 5px 0 var(--r, var(--ink)); animation: pop .35s ease; }
.reveal[hidden] { display: none; }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
.reveal-rarity { display: inline-block; padding: 1px 10px; border-radius: 4px; background: var(--r); color: var(--paper); border: 2px solid var(--ink); font: 600 .85rem/1.5 var(--font-display); letter-spacing: 1px; text-transform: uppercase; }
.reveal-name { margin: 8px 0 4px; font-family: var(--font-display); font-size: 2rem; line-height: 1.05; }
.reveal-note { margin: 0 0 14px; color: var(--ink-2); }
@media (max-width: 600px) { .reveal { flex-direction: column; text-align: center; } .reveal .crate-actions { justify-content: center; } }
.book-help { margin: -4px 0 14px; color: var(--ink-2); }
.book-group { margin-bottom: 22px; }
.book-rarity { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }
.book-rarity .dot { width: 12px; height: 12px; border-radius: 2px; background: var(--r); border: 2px solid var(--ink); }
.book-rarity small { color: var(--ink-3); font-size: .85rem; letter-spacing: .5px; }
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
@media (max-width: 520px) { .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .book-badge canvas { width: 132px !important; height: 132px !important; max-width: 100%; } }
.book-badge { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px 8px; background: var(--paper); border: 2px solid var(--ink); border-radius: 8px; box-shadow: 2px 2px 0 var(--ink); font: 700 .8rem/1.2 var(--font-body); color: var(--ink); text-align: center; }
button.book-badge:hover { background: var(--cobalt-tint); }
.book-badge.showcased { box-shadow: 0 0 0 3px var(--amber), 3px 3px 0 var(--ink); }
.book-badge.locked { background: var(--card); color: var(--ink-3); border-style: dashed; box-shadow: none; }
.book-badge.locked canvas { filter: brightness(0) opacity(.18); }
.book-badge em { position: absolute; top: 4px; right: 6px; font: 700 .75rem/1 var(--font-display); font-style: normal; color: var(--ink-2); }
.greet .btn { flex: none; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 22px; z-index: 2000; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 9px 16px; border-radius: 8px; background: var(--ink); color: var(--paper); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--cobalt); font-weight: 800; font-size: .92rem; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- Little Elsewheres videos (watch.html + the homepage strip) ---------------- */
.icon-btn[aria-current="page"] { background: var(--cobalt); color: var(--paper); }
.btn-yt { background: var(--red); color: var(--paper); }
.btn-yt:hover { background: #e9584e; }
.btn-yt .icon { fill: currentColor; stroke: none; }
.watch-hero { position: relative; display: flex; align-items: center; gap: 28px; margin-top: 28px; padding: 22px 30px 22px 22px; background: var(--card); border: 2px solid var(--ink); border-radius: 12px; box-shadow: var(--hard-lg); overflow: hidden;
  background-image: linear-gradient(var(--pencil) 1px, transparent 1px), linear-gradient(90deg, var(--pencil) 1px, transparent 1px); background-size: 12px 12px; }
.watch-visitor { flex: none; width: 114px; height: auto; margin: -4px 0 -26px; }
.watch-copy { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.watch-plate { align-self: flex-start; font: 600 .82rem/1 var(--font-display); letter-spacing: 2px; color: var(--ink-2); padding-bottom: 6px; border-bottom: 3px double var(--ink); }
.watch-title { margin: 0; font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.02; letter-spacing: .5px; }
.watch-tag { margin: 0; color: var(--ink-2); font-size: 1.05rem; max-width: 46ch; }
.watch-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.watch-scale { position: absolute; right: 16px; bottom: 12px; display: flex; align-items: center; gap: 8px; font: 600 .75rem/1 var(--font-display); letter-spacing: 1.5px; color: var(--ink-2); }
.watch-scale span { width: 46px; height: 6px; background: linear-gradient(90deg, var(--ink) 50%, var(--paper) 50%); border: 2px solid var(--ink); }
@media (max-width: 600px) {
  .watch-hero { gap: 14px; padding: 16px 16px 40px 10px; align-items: flex-start; }
  .watch-visitor { width: 72px; margin: 6px 0 -40px; }
  .watch-actions .btn { width: 100%; }
}
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 20px; }
@media (max-width: 520px) { .vgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.vrow { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 180px); gap: 16px; overflow-x: auto; padding: 4px 6px 16px 2px; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: var(--ink-3) transparent; }
.vrow > * { scroll-snap-align: start; }
.vcard { display: flex; flex-direction: column; background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: var(--hard); overflow: hidden; }
.vcard-media { position: relative; display: block; width: 100%; aspect-ratio: 9 / 16; padding: 0; border: 0; background: var(--cobalt-dark); overflow: hidden; }
iframe.vcard-media { background: var(--ink); }
.vcard-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.vcard:hover .vcard-media img { transform: scale(1.04); }
.vcard-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: var(--paper); border: 3px solid var(--ink); box-shadow: var(--hard); transition: transform .2s; }
.vcard-play .icon { width: 24px; height: 24px; fill: currentColor; stroke: none; margin-left: 3px; }
.vcard:hover .vcard-play { transform: translate(-50%, -50%) scale(1.08); }
.vcard-title { margin: 0; padding: 8px 10px 10px; border-top: 2px solid var(--ink); font-family: var(--font-display); font-size: 1.02rem; font-weight: 600; line-height: 1.2; }
.watch-note { margin: 18px 0 0; color: var(--ink-3); font-size: .85rem; font-weight: 700; }

/* phones: the spotlight's dots (one per featured game) wrap instead of widening the page, and the header's Random button
   (also in the footer) steps aside so the shortcuts stay on one line next to the logo */
.spot { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.spot-nav { min-width: 0; }
.spot-dots { flex-wrap: wrap; min-width: 0; row-gap: 6px; }
@media (max-width: 860px) { .spot { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 440px) { .header-actions [data-random] { display: none; } .header-actions { gap: 6px; } }
