/* The Arcade: shared by every page. The theme, the side menu, game previews, the ballz design, and
   the Arcade's own pages (home, Downloads). Each game's own look lives in its folder (games/<slug>/). */
[hidden] { display: none !important; }

/* ---------- theme: dark (the default) and light, chosen in the ☰ menu (data-theme on <html>) ---------- */
:root {
  --bg: #0d1017; --bg-2: #141926; --card: #181e2d; --line: #262e44; --text: #e8ebf4; --muted: #9aa3b8;
  --accent: #7cf5c4; --accent-ink: #062018; --accent-2: #ff7ad9; --warn: #ffd166; --danger: #ff6b6b;
  --shadow: 0 10px 30px rgb(0 0 0 / .35); --overlay: rgb(5 7 12 / .6);
  --pixel: "Courier New", ui-monospace, SFMono-Regular, Menlo, monospace;
  --glow-1: rgb(124 245 196 / .08); --glow-2: rgb(255 122 217 / .07);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f6f7fb; --bg-2: #eceff6; --card: #ffffff; --line: #d9dde8; --text: #1f2333; --muted: #5b6275;
  --accent: #0f9d74; --accent-ink: #ffffff; --accent-2: #d63fa8; --warn: #9a6400; --danger: #c62828;
  --shadow: 0 10px 30px rgb(30 40 70 / .12); --overlay: rgb(15 18 35 / .45);
  --glow-1: rgb(15 157 116 / .08); --glow-2: rgb(214 63 168 / .06);
  color-scheme: light;
}
/* Game titles: every letter wiggles when tapped, and one letter is a picture (on the dev site,
   5 taps on the picture open the secret Dev Menu, see devmenu.js), Caleb's design. */
.logo .ll, .secret-pic { display: inline-block; cursor: default; -webkit-tap-highlight-color: transparent; }
.secret-pic svg { width: .82em; height: .82em; vertical-align: -.06em; display: inline-block; filter: drop-shadow(.04em .04em 0 #0008); }
.pause-pic svg { width: 44px; height: 44px; }
.logo .ll.bump, .secret-pic.bump { animation: arcade-wiggle .18s; }
@keyframes arcade-wiggle { 50% { transform: scale(1.18) rotate(-6deg); } }
/* The top of the screen (Caleb's rule for every page): phones held upright draw the clock and
   battery over the top of the page, blurred on iPhone, so leave room for them, but not too much.
   Measured with the Lab (games/lab, Screen) on an iPhone 13, iOS 27, in the Home Screen app: the page
   starts below the status bar (safe area 0) and the blur fades onto it: 29-30px is the sweet spot, so 30px.
   Where the page goes under the status bar (a safe area), the safe area minus 20px, as before.
   Everything uses var(--safe-top) instead of env(safe-area-inset-top). */
:root { --safe-top: env(safe-area-inset-top, 0px); }
@media (hover: none) and (pointer: coarse) and (orientation: portrait) {
  :root { --safe-top: max(calc(env(safe-area-inset-top, 0px) - 20px), 40px); }
}
@media (hover: none) and (pointer: coarse) and (orientation: portrait) and (display-mode: fullscreen),
       (hover: none) and (pointer: coarse) and (orientation: portrait) and (display-mode: standalone) {
  :root { --safe-top: max(calc(env(safe-area-inset-top, 0px) - 20px), 30px); }
}
/* No zooming anywhere. touch-action has to be on every element (an element-level
   "manipulation" was still letting double-taps zoom on iOS). Scrolling still works. */
*, *::before, *::after { touch-action: pan-x pan-y; }

/* ---------- ☰ menu button + slide-out drawer ---------- */
.menu-btn {
  flex-shrink: 0; width: 44px; height: 44px; border: 0; border-radius: 14px; font-size: 1.35rem; line-height: 1;
  background: var(--card); color: var(--text); border: 1px solid var(--line); box-shadow: 0 2px 6px rgba(0, 0, 0, .15); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.menu-overlay { position: fixed; inset: 0; background: var(--overlay); z-index: 90; }
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 100; width: min(320px, 86vw);
  background: var(--bg); color: var(--text); border-right: 1px solid var(--line); box-shadow: 8px 0 30px rgba(0, 0, 0, .3);
  transform: translateX(-105%); transition: transform .22s ease-out; overflow-y: auto;
  padding: calc(14px + var(--safe-top)) 14px calc(14px + env(safe-area-inset-bottom));
  font-family: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
}
.drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.drawer-head b { font: 900 1.1rem var(--pixel); letter-spacing: .04em; }
.drawer-head button { border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 12px; width: 38px; height: 38px; font-size: 1.1rem; cursor: pointer; }
.menu-label { margin: 14px 4px 6px; font: 700 .75rem var(--pixel); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.menu-item {
  display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 16px; margin-bottom: 8px;
  color: inherit; text-decoration: none; background: var(--card); border: 2px solid transparent;
}
.menu-item[aria-current="page"] { border-color: var(--accent); }
.menu-item .preview { width: 64px; height: 64px; flex-shrink: 0; border-radius: 12px; }
.menu-item b { display: block; font-size: .98rem; }
.menu-item small { color: var(--muted); }

/* ---------- "new version" bar (nav.js) ---------- */
.update-bar {
  position: fixed; left: 50%; top: calc(10px + var(--safe-top)); transform: translateX(-50%); z-index: 80;
  border: 0; border-radius: 999px; padding: 12px 20px; font: 700 .98rem ui-rounded, system-ui, sans-serif; white-space: nowrap;
  color: #fff; background: linear-gradient(135deg, #7c3aed, #e5262f); box-shadow: 0 6px 20px rgba(0, 0, 0, .25); cursor: pointer;
  animation: update-in .35s cubic-bezier(.2, 1.4, .4, 1), update-glow 1.6s ease-in-out .4s infinite alternate;
}
@keyframes update-in { from { transform: translate(-50%, -80px); } to { transform: translateX(-50%); } }
@keyframes update-glow { to { box-shadow: 0 6px 26px rgba(124, 58, 237, .65); } }

/* "🎉 Updated to vX!" after a new version arrived since your last visit: green, and it slides away */
.updated-bar { background: linear-gradient(135deg, #16a34a, #0ea5e9); animation: update-in .35s cubic-bezier(.2, 1.4, .4, 1); transition: opacity .4s, transform .4s; }
.updated-bar.going { opacity: 0; transform: translate(-50%, -80px); }

/* ---------- What's new sheet (nav.js) ---------- */
dialog.whatsnew {
  border: 0; border-radius: 24px; padding: 22px 18px 16px; width: min(440px, calc(100% - 28px)); max-height: min(82vh, 640px);
  background: var(--bg); color: var(--text); border: 1px solid var(--line); box-shadow: 0 20px 60px rgba(0, 0, 0, .4); text-align: left;
  font: 16px/1.45 ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
}
dialog.whatsnew[open] { display: flex; flex-direction: column; }
dialog.whatsnew::backdrop { background: var(--overlay); }
.whatsnew h2 { margin: 0 0 12px; font-size: 1.3rem; text-align: center; }
.wn-list { overflow-y: auto; flex: 1; }
.wn-sub { color: var(--muted); text-align: center; }
.wn-version { background: var(--card); border-radius: 16px; padding: 12px 14px; margin-bottom: 10px; }
.wn-version.latest { box-shadow: inset 0 0 0 2px var(--accent); }
.wn-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.wn-head small { color: var(--muted); white-space: nowrap; }
.wn-version ul { margin: 6px 0 0; padding-left: 4px; list-style: none; }
.wn-version li { margin: 4px 0; }
.wn-version li.wn-group { margin-top: 10px; }
.wn-version li.wn-group > b { display: block; font-size: 1.05rem; font-weight: 800; }
.wn-version li.wn-group > ul { margin: 2px 0 0; padding-left: 10px; }
.wn-buttons { display: flex; gap: 10px; margin-top: 8px; }
.wn-buttons button { flex: 1; border: 1px solid var(--line); border-radius: 14px; padding: 13px; font: inherit; font-weight: 800; cursor: pointer; background: var(--card); color: var(--text); }
.wn-buttons .wn-go { color: #fff; background: linear-gradient(135deg, #7c3aed, #e5262f); }
.menu-news { width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-top: 6px; font: inherit; font-weight: 800; cursor: pointer;
  background: var(--card); color: var(--text); }
.menu-news:hover, .menu-item:hover { border-color: var(--accent); }
.build[role="button"] { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }

/* ---------- page previews (drawn with CSS, so they never go stale) ---------- */
.preview { position: relative; overflow: hidden; display: grid; place-items: center; box-sizing: border-box; }
/* sized as % of the preview itself (padding % would follow the page width) */
.preview-thumb { background: #000; }
.preview-thumb img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; display: block; }
.preview-downloads { background: linear-gradient(160deg, var(--bg-2), var(--card)); }
.preview-downloads .pv-dl { font-size: 2em; }
.menu-item .preview-downloads { font-size: 14px; }
.preview-home { background: linear-gradient(160deg, var(--bg-2), var(--card)); grid-template-columns: repeat(2, 30%); gap: 7%; place-content: center; }
.preview-home .pv-tile { width: 100%; aspect-ratio: 1; border-radius: 18%; background: var(--accent); opacity: .75; }
/* Dino Kingdom: a jungle chessboard with a crowned T-rex and a raptor */

/* ---------- the ballz (our own design: diagonal stripe + star, not anyone else's) ---------- */
.ball {
  --c1: #f7f8fb; --c2: #d3d7e2; --band: #9aa0b3; --star: #ffffff;
  display: block; aspect-ratio: 1; border-radius: 50%; position: relative; border: 0; padding: 0;
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 255, 255, .95) 0 7%, rgba(255, 255, 255, 0) 24%),
    linear-gradient(135deg, var(--c1) 0 43%, var(--band) 43% 57%, var(--c2) 57% 100%);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .12), inset -6px -8px 14px rgba(0, 0, 0, .12), 0 4px 10px rgba(0, 0, 0, .18);
}
.ball::after {
  content: ""; position: absolute; width: 34%; height: 34%; left: 33%; top: 33%; background: var(--star);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.ball.basic { --c1: #f7f8fb; --c2: #d3d7e2; --band: #9aa0b3; --star: #ffffff; }
.ball.super { --c1: #63b3ff; --c2: #1d5fd6; --band: #ffffff; --star: #1d5fd6; }
.ball.mega { --c1: #c08bff; --c2: #6d28d9; --band: #ffd23f; --star: #6d28d9; }
.ball.legendary {
  --band: #ffffff; --star: #ffcc00;
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 255, 255, .95) 0 7%, rgba(255, 255, 255, 0) 24%),
    linear-gradient(135deg, transparent 0 43%, var(--band) 43% 57%, transparent 57% 100%),
    conic-gradient(from 0deg, #ff4d4d, #ffb13d, #ffe94d, #4dff88, #4dc3ff, #9b5cff, #ff4dd2, #ff4d4d);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .12), 0 0 14px rgba(255, 220, 90, .8), 0 4px 10px rgba(0, 0, 0, .18);
}
.ball.legendary::after { filter: drop-shadow(0 0 2px #fff); }
.ball.secret {
  --band: rgba(160, 230, 255, .55); --star: #b8f3ff;
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 255, 255, .7) 0 5%, rgba(255, 255, 255, 0) 18%),
    radial-gradient(circle at 70% 30%, #fff 0 1.2%, transparent 2%), radial-gradient(circle at 24% 62%, #fff 0 1%, transparent 1.8%),
    radial-gradient(circle at 58% 78%, #fff 0 1.4%, transparent 2.2%), radial-gradient(circle at 82% 60%, #fff 0 .9%, transparent 1.6%),
    radial-gradient(circle at 40% 20%, #fff 0 .8%, transparent 1.5%),
    linear-gradient(135deg, transparent 0 45%, var(--band) 45% 55%, transparent 55% 100%),
    radial-gradient(circle at 30% 70%, rgba(236, 72, 153, .75), transparent 45%),
    radial-gradient(circle at 75% 35%, rgba(34, 211, 238, .65), transparent 45%),
    radial-gradient(circle at 50% 50%, #312e81, #0b0a26 75%);
  box-shadow: inset 0 0 0 2px rgba(180, 240, 255, .35), 0 0 18px rgba(120, 200, 255, .9), 0 4px 10px rgba(0, 0, 0, .3);
}
.ball.secret::after { filter: drop-shadow(0 0 3px #7dd3fc); }

/* ---------- the Arcade's own pages: home and Downloads (body.shell), mattrobey.co.uk's look ---------- */
body.shell {
  margin: 0; min-height: 100vh; min-height: 100dvh; color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(1200px 600px at 80% -10%, var(--glow-1), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, var(--glow-2), transparent 60%), var(--bg);
  padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  -webkit-tap-highlight-color: transparent;
}
.shell a { color: var(--accent); }
.shell :focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px;
  padding: calc(8px + var(--safe-top)) 16px 8px; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 75%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.shell .brand { font: 900 1.05rem var(--pixel); letter-spacing: .06em; color: var(--text); text-decoration: none; white-space: nowrap; }
.topbar-link { margin-left: auto; font-weight: 700; text-decoration: none; white-space: nowrap; }
.wrap { width: 100%; max-width: 68rem; margin: 0 auto; padding: 1.5rem 1rem 2rem; box-sizing: border-box; }
.wrap.narrow { max-width: 46rem; }
.eyebrow { font: 700 .78rem var(--pixel); color: var(--accent); letter-spacing: .25em; text-transform: uppercase; margin: .5rem 0 .4rem; }
.shell h1 { font-size: clamp(1.7rem, 5vw, 2.6rem); line-height: 1.1; margin: 0; letter-spacing: -.02em; }
.lead { color: var(--muted); margin: .6rem 0 1rem; max-width: 40rem; }
.saved-mark { color: var(--accent); font-weight: 900; }
.note { color: var(--muted); }
.offline-note { padding: .7rem 1rem; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--warn); color: var(--text); }

/* tag filters */
.chips { display: flex; flex-wrap: wrap; gap: .45rem; margin: 1rem 0 1.25rem; }
.chip { text-transform: lowercase; font: 700 .78rem var(--pixel); padding: .4rem .8rem; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-2); color: var(--muted); cursor: pointer; }
.chip:hover { border-color: var(--accent); }
.chip.chip-by { color: var(--text); }
.chip[aria-pressed="true"] { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.chip.clear { background: transparent; }

/* game cards */
.grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); }
.game {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease, opacity .2s;
}
.game:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow); }
.game.unavailable { opacity: .4; }
.game.unavailable a { pointer-events: none; }
.game .thumb { position: relative; display: block; aspect-ratio: 16 / 10; background: #000; overflow: hidden; }
.game .thumb > img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; display: block; }
.game .thumb > .preview { position: absolute; inset: 0; font-size: 20px; }
.game .play-hint { position: absolute; inset: 0; display: grid; place-items: center; background: rgb(0 0 0 / .45); opacity: 0;
  transition: opacity .15s ease; font: 900 1rem var(--pixel); letter-spacing: .2em; color: #7cf5c4; }
.game:hover .play-hint { opacity: 1; }
.game .body { padding: .9rem 1rem 1.1rem; display: flex; flex-direction: column; gap: .4rem; }
.game h3 { margin: 0; font-size: 1.12rem; }
.game h3 a { color: var(--text); text-decoration: none; }
.game h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }  /* the whole card plays the game */
.game p { margin: 0; color: var(--muted); }
.game .by { font-size: .85rem; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag { font: 700 .7rem var(--pixel); letter-spacing: .06em; padding: .2rem .5rem; border-radius: 6px; background: var(--bg-2); border: 1px solid var(--line); color: var(--muted); }
.tag.wip { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.tag.preview { border-style: dashed; }
.tag.ok { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.dl {
  position: absolute; top: .55rem; right: .55rem; z-index: 2; min-width: 40px; height: 36px; padding: 0 .7rem;
  border-radius: 999px; border: 1px solid rgb(255 255 255 / .25); background: rgb(13 16 23 / .85); color: #e8ebf4;
  font: 800 .9rem system-ui, sans-serif; cursor: pointer; backdrop-filter: blur(4px);
}
.dl:hover { border-color: #7cf5c4; }
.dl[data-state="saved"] { color: #062018; background: #7cf5c4; border-color: #7cf5c4; }
.dl[data-state="update"] { color: #241a00; background: #ffd166; border-color: #ffd166; }
.dl[data-state="online"] { cursor: default; opacity: .8; }

/* how a game was made: small GitHub-style labels, on the picture and in the legend */
.made { display: inline-flex; align-items: center; font: 600 .75rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; padding: 0 .55rem; border-radius: 2em; border: 1px solid; white-space: nowrap; }
.game .thumb .made { position: absolute; top: .6rem; left: .6rem; }
.made.hand { color: #a8fbdc; border-color: rgb(124 245 196 / .45); background: linear-gradient(rgb(124 245 196 / .18), rgb(124 245 196 / .18)), rgb(13 16 23 / .9); }
.made.assist { color: #ffe3a3; border-color: rgb(255 209 102 / .45); background: linear-gradient(rgb(255 209 102 / .18), rgb(255 209 102 / .18)), rgb(13 16 23 / .9); }
.made.vibe { color: #ffb8ec; border-color: rgb(255 122 217 / .45); background: linear-gradient(rgb(255 122 217 / .18), rgb(255 122 217 / .18)), rgb(13 16 23 / .9); }
.legend { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); margin-top: 2rem; padding: 1.1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); }
.legend div { display: flex; flex-direction: column; gap: .4rem; align-items: flex-start; }
.legend p { margin: 0; color: var(--muted); font-size: .9rem; }

/* Downloads page */
.panel { margin: 1rem 0; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); }
.switch-row { display: flex; align-items: center; gap: 1rem; cursor: pointer; }
.switch-row span { flex: 1; display: flex; flex-direction: column; gap: .2rem; }
.switch-row small { color: var(--muted); }
.switch-row input { appearance: none; -webkit-appearance: none; width: 52px; height: 30px; border-radius: 999px; background: var(--line); position: relative; cursor: pointer; flex-shrink: 0; transition: background .15s; margin: 0; }
.switch-row input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch-row input:checked { background: var(--accent); }
.switch-row input:checked::after { transform: translateX(22px); }
.dl-list { display: flex; flex-direction: column; gap: .7rem; }
.dl-row { display: flex; align-items: center; gap: .9rem; padding: .7rem; border: 1px solid var(--line); border-radius: 14px; background: var(--card); flex-wrap: wrap; }
.dl-art { width: 72px; height: 72px; border-radius: 10px; overflow: hidden; flex-shrink: 0; position: relative; background: #000; }
.dl-art > img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.dl-art > .preview { position: absolute; inset: 0; font-size: 10px; }
.dl-text { flex: 1; min-width: 10rem; display: flex; flex-direction: column; gap: .15rem; }
.dl-text b a { color: var(--text); text-decoration: none; }
.dl-text small { color: var(--muted); }
.dl-status { font: 700 .78rem var(--pixel); color: var(--muted); }
.state-saved .dl-status { color: var(--accent); }
.state-update .dl-status { color: var(--warn); }
.dl-bar { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: .3rem; }
.dl-bar span { display: block; height: 100%; background: var(--accent); transition: width .2s; }
.dl-buttons, .dl-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: .4rem; padding: .6rem 1rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.danger:hover { border-color: var(--danger); color: var(--danger); }
.dl-foot .note { margin-top: 0; }

.shell .build { text-align: center; color: var(--muted); font: 11px ui-monospace, monospace; opacity: .7; margin: 0 0 14px; }
.menu-extra { display: block; text-align: center; text-decoration: none; color: inherit; box-sizing: border-box; }
.install-tip {
  position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 40;
  display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 16px; border-radius: 18px;
  background: var(--card); color: var(--text); border: 1px solid var(--line); box-shadow: 0 8px 30px rgb(0 0 0 / .35); font-weight: 700;
}
.install-tip span { flex: 1; }
body:has(.install-tip) { padding-bottom: 120px; }  /* so the last tile can scroll clear of the tip */
.install-go { border: 0; border-radius: 12px; padding: 10px 14px; background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 800; cursor: pointer; white-space: nowrap; }
.install-x { border: 0; background: none; font-size: 18px; padding: 6px; cursor: pointer; color: var(--muted); }

/* the shared ⚙️ Settings menu (settings.js): every game keeps its settings in here */
.settings-row { margin-top: 2px; }
.settings-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; width: min(100%, 640px); margin-top: 44px; }
.set-opt { flex: 0 1 calc(50% - 4px); border: 3px solid #fff; border-radius: 10px; background: #1f3d27; color: #fff; font: inherit; font-weight: 700; font-size: clamp(12px, 2.2vw, 15px); padding: 9px 10px; box-shadow: 0 3px 0 #000; text-align: center; cursor: pointer; }
.set-opt.off { background: #4a2a2a; color: #ffb3b3; }
.settings-note { max-width: 560px; text-align: center; }
@media (orientation: portrait) { .set-opt { flex-basis: 100%; } }
@media (orientation: landscape) and (max-height: 520px) { .settings-list { margin-top: 34px; gap: 5px; } .set-opt { padding: 5px 8px; } }

/* game cards are wider than they are tall (each game's preview.css can size its drawing for .game) */

.game .preview-home { grid-template-columns: repeat(2, 20%); }

/* "inspired by": a game that's our own take on a classic says so (game.json inspired_by) */
.game .inspired { font-size: .78rem; color: var(--muted); border-left: 2px solid var(--line); padding-left: .5rem; }
.notice { margin-top: 1.5rem; font-size: .8rem; color: var(--muted); text-align: center; }
.inspired-note { font-size: 11px; opacity: .7; text-align: center; max-width: 40rem; margin: 4px auto; }


/* Downloads: progress backup */
#restoreBox { margin-top: .8rem; display: grid; gap: .6rem; }
#restoreBox[hidden] { display: none; }
#restoreText { width: 100%; box-sizing: border-box; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: .6rem; font: 13px ui-monospace, Menlo, monospace; }
.panel h2 { margin: 0 0 .3rem; font-size: 1.05rem; }

/* sorting the games (home.js): newest first or a to z */
.chips.sort { margin-top: -.6rem; align-items: center; }
.sort-label { font: 700 .78rem var(--pixel); color: var(--muted); margin-right: .2rem; }
.game .by time { white-space: nowrap; }
