/* The look of the static pages: /games, each game, the blog and its articles. scripts/prerender.mjs
   writes them, scripts/site-chrome.mjs holds the shared pieces and public/site.js the few behaviours.
   The header and footer match the landing's (src/styles/home.css), so nothing moves between pages.

/* TV Shelf Playful. The blog reads like the game-select screen on the TV: a dark room, capsule tiles
   with thick ink edges that lift and glow gold when focused, and long reads with a side list of
   sections that lights the one you are in. On top of that, the cartoon pieces of the games: hard ink
   shadows, a tilted gold date badge stuck on every tile and title card, and the eight player colours
   for anything that counts (numbered entries, steps, key points). Gold means: date, link, play, picked. */
@font-face { font-family: 'Fredoka'; src: url(/fonts/fredoka-500.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Fredoka'; src: url(/fonts/fredoka-600.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Fredoka'; src: url(/fonts/fredoka-700.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url(/fonts/nunito-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url(/fonts/nunito-700.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url(/fonts/nunito-800.woff2) format('woff2'); font-weight: 800; font-display: swap; }

:root {
  --room: #11141e;      /* the page, a dark living room */
  --shelf: #1b2031;     /* tiles and panels */
  --shelf-2: #262c42;   /* raised, hover, open */
  --ink: #06070a;       /* outlines and the hard shadow under everything */
  --text: #f3efe6;
  --head: #fffaf0;
  --soft: #b3b9cb;      /* 9:1 on --room, 8:1 on --shelf */
  --gold: #ffb520;
  --gold-dark: #c98a12;
  --navy: #1f2a44;
  /* PLAYER_COLORS, one per seat */
  --coral: #ff5c5c; --sky: #2f9cf5; --sun: #ffc72c; --leaf: #4cc964;
  --grape: #a05cf0; --flame: #ff8a3d; --teal: #24c6c6; --bubble: #ff6fb5;
  --glow: 0 0 0 4px var(--gold), 0 0 34px 6px rgba(255, 181, 32, 0.38);
  /* Colours the light theme swaps (see the end of this file) */
  --gold-text: var(--gold);   /* gold used as text or a thin line: links, the current page, hovers */
  --underline: rgba(255, 181, 32, 0.5);
  --focus: var(--gold);
  --on-color: #06070a;        /* numbers on a player colour, the same in both themes */
  --edge: #0b0c0f;            /* the landing's card and logo edge */
  --bar-text: rgba(255, 253, 248, 0.82);
  --bar-head: #fffdf8;
  --wash: rgba(255, 255, 255, 0.08);   /* hover tint on bar items and menu rows */
  --menu: #1f2027;
  --menu-edge: 1px solid rgba(255, 255, 255, 0.14);
  --menu-drop: 0 20px 50px rgba(0, 0, 0, 0.6);
  --foot: rgba(255, 253, 248, 0.55);
  --dash: rgba(255, 255, 255, 0.1);
  --c1: #22263a; --c2: #2b2238; --c3: #1b2e40;   /* step cards, as the landing */
  --ct: #fffdf8; --cs: rgba(255, 253, 248, 0.72); --eo: 0.22; --c-drop: rgba(0, 0, 0, 0.55);
  --dek: #d9dcea;
  --tc-wash: linear-gradient(90deg, rgba(12, 14, 24, 0.97) 0%, rgba(12, 14, 24, 0.92) 45%, rgba(12, 14, 24, 0.64) 75%, rgba(12, 14, 24, 0.42) 100%);
  --tc-wash-phone: linear-gradient(180deg, rgba(12, 14, 24, 0.86) 0%, rgba(12, 14, 24, 0.94) 100%);
  --tc-shadow: 0 3px 0 rgba(0, 0, 0, 0.35);
  --bar-drop: 0 10px 30px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
  --display: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 20px; }
body { margin: 0; background: var(--room); color: var(--text); font-family: var(--body); font-weight: 400; line-height: 1.6; overflow-x: hidden; }
img, video { max-width: 100%; }
a { color: var(--gold-text); }
a:focus-visible, summary:focus-visible, button:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pc0 { --c: var(--coral); } .pc1 { --c: var(--sky); } .pc2 { --c: var(--sun); } .pc3 { --c: var(--leaf); }
.pc4 { --c: var(--grape); } .pc5 { --c: var(--flame); } .pc6 { --c: var(--teal); } .pc7 { --c: var(--bubble); }

/* Header: the landing's bar (apps/web/src/styles/home.css .bar), item for item, so it does not move between pages */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.top { position: relative; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 20px; max-width: 1320px; margin: 0 auto; padding-inline: clamp(16px, 4vw, 48px); padding-block: 18px; line-height: normal; }
.mark { display: flex; align-items: center; gap: 10px; flex-shrink: 0; white-space: nowrap; color: var(--bar-head); text-decoration: none; font-family: var(--display); font-size: 24px; font-weight: 700; }
.mark img { width: 34px; height: 34px; border-radius: 9px; border: 2px solid var(--edge); box-shadow: 0 3px 0 var(--edge); }
.top nav { display: flex; align-items: center; gap: 26px; font-size: 15px; font-weight: 800; }
.top nav > a:not(.cta) { padding-block: 10px; color: var(--bar-text); text-decoration: none; white-space: nowrap; }
.top nav > a:not(.cta):hover, .top nav > a[aria-current] { color: var(--gold-text); }
/* The language menu: a <details>, so it opens with scripting off; each row is a real link */
.lang { position: relative; }
.lang > summary { display: inline-flex; align-items: center; gap: 7px; padding: 6px 8px; font-size: 15px; font-weight: 800; border-radius: 10px; color: var(--bar-text); cursor: pointer; list-style: none; white-space: nowrap; }
.lang > summary::-webkit-details-marker { display: none; }
.lang > summary:hover, .lang[open] > summary { color: var(--bar-head); background: var(--wash); }
.lang-flag { width: 20px; height: 20px; flex: none; clip-path: circle(50%); }
.lang-menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 60; min-width: 190px; margin: 0; padding: 8px; list-style: none; background: var(--menu); border: var(--menu-edge); border-radius: 16px; box-shadow: var(--menu-drop); }
.lang-menu a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; color: var(--bar-text); font-size: 14px; font-weight: 800; white-space: nowrap; text-decoration: none; }
.lang-menu a:hover, .lang-menu a.on { background: var(--wash); color: var(--bar-head); }
.lang-menu a.on::after { content: '✓'; margin-left: auto; color: var(--gold-text); }
/* The theme switch, as on the landing: ☀️ on dark, 🌙 on light. It only shows when the head script ran,
   because without scripting it could not do anything. */
.theme { display: none; place-items: center; flex: none; font-weight: 800; width: 34px; height: 34px; padding: 0; border-radius: 50%; border: 0; background: none; font-size: 20px; transition: transform 120ms ease-out; line-height: 1; cursor: pointer; }
.js .theme { display: inline-grid; }
.theme:hover { transform: scale(1.15); }
.theme .moon, .light .theme .sun { display: none; }
.light .theme .moon { display: inline; }

/* The ☰ menu. Up to 900px, with scripting on, the bar keeps only the logo and the ☰ button, and the
   links, the theme switch and the language fold into a panel under the bar (public/site.js opens it).
   On wider screens .tools melts into the bar and the ☰ and the panel labels stay hidden. */
.burger { display: none; }
.tools { display: contents; }
.tool-txt { display: none; }
@media (max-width: 900px) {
  .js .burger { display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; margin-right: -8px; padding: 0; border: 0; border-radius: 12px; background: none; color: var(--bar-head); cursor: pointer; }
  .js .burger:hover, .js .top.open .burger { background: var(--wash); }
  .burger > span { display: grid; gap: 5px; width: 22px; }
  .burger i { display: block; height: 3px; border-radius: 2px; background: currentColor; transition: transform 160ms ease-out, opacity 120ms; }
  .top.open .burger i:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .top.open .burger i:nth-child(2) { opacity: 0; }
  .top.open .burger i:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .js .top nav { display: none; position: absolute; top: calc(100% - 4px); left: clamp(16px, 4vw, 48px); right: clamp(16px, 4vw, 48px); flex-direction: column; align-items: stretch; gap: 2px; padding: 10px; max-height: calc(100vh - 90px); max-height: calc(100dvh - 90px); overflow-y: auto; font-size: 21px; background: var(--menu); border: var(--menu-edge); border-radius: 20px; box-shadow: var(--menu-drop); }
  .js .top.open nav { display: flex; }
  .js .top nav > a:not(.cta) { display: block; padding: 12px 14px; border-radius: 12px; font-family: var(--display); font-weight: 700; color: var(--bar-head); }
  .js .top nav > a:not(.cta):hover { background: var(--wash); }
  .js .top nav > a[aria-current] { color: var(--gold-text); }
  .js .top .tools { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; padding-top: 8px; border-top: 2px solid var(--wash); }
  .js .top .tool-txt { display: inline; }
  .js .top .theme, .js .top .lang > summary { display: flex; align-items: center; justify-content: flex-start; gap: 12px; width: 100%; height: auto; padding: 12px 14px; border-radius: 12px; font-size: 16px; font-weight: 800; color: var(--bar-text); text-align: start; }
  .js .top .theme .sun, .js .top .theme .moon { font-size: 20px; }
  .js .top .theme:hover { transform: none; background: var(--wash); }
  .js .top .lang-code { display: none; }
  .js .top .lang > summary::after { content: '▾'; margin-left: auto; transition: transform 120ms; }
  .js .top .lang[open] > summary::after { transform: rotate(180deg); }
  .js .top .lang-menu { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; min-width: 0; max-height: none; margin: 4px 0 0; padding: 0 4px; border: 0; box-shadow: none; background: none; }
}
@media (prefers-reduced-motion: reduce) { .burger i { transition: none; } }

.cta { display: inline-block; background: var(--gold); color: var(--navy) !important; text-decoration: none !important; font-family: var(--display); font-weight: 600; padding: 8px 18px; border-radius: 999px; border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); transition: transform 80ms, box-shadow 80ms; }
.cta:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); }
.cta:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.cta.big { font-size: 21px; line-height: 1.2; text-align: center; padding: 13px 28px; box-shadow: 0 6px 0 var(--ink); }
main { max-width: 1320px; margin: 0 auto; padding-inline: clamp(16px, 4vw, 48px); padding-bottom: 64px; }
.crumbs { color: var(--soft); font-size: 15px; margin: 4px 0 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs a { color: var(--soft); text-decoration: none; font-weight: 700; }
.crumbs a:hover { color: var(--gold-text); }

/* Footer: brand block, three link columns, bottom bar. Same markup and rules as the landing (home.css). */
.foot { margin-top: 24px; border-top: 1px solid var(--dash); color: var(--foot); font-size: 15px; font-weight: 700; line-height: 1.4; }
.foot-in { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 3fr); gap: 40px; max-width: 1320px; margin: 0 auto; padding: 48px clamp(16px, 4vw, 48px) 36px; }
.foot a { color: inherit; text-decoration: none; }
.foot a:hover { color: var(--gold-text); }
.foot .mark { display: inline-flex; color: var(--bar-head); font-size: 20px; }
.foot .mark img { width: 30px; height: 30px; }
.foot-tag { margin: 12px 0 18px; max-width: 30ch; color: var(--soft); font-weight: 600; }
.foot .social { display: flex; gap: 10px; }
.foot .social a { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, 0.07); }
.foot .social a:hover { background: rgba(255, 255, 255, 0.14); }
.foot .foot-mail { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 6px 0; font-weight: 800; }
.foot-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.foot-h { margin: 0 0 10px; color: var(--bar-head); font-family: var(--display); font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.foot-col ul { margin: 0; padding: 0; list-style: none; }
.foot-col a { display: inline-block; padding: 6px 0; }
.foot-bar { width: min(1224px, 100% - 2 * clamp(16px, 4vw, 48px)); margin: 0 auto; padding: 18px 0 28px; border-top: 1px solid var(--dash); font-size: 13px; }
@media (max-width: 860px) {
  .foot-in { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 40px; }
}
@media (max-width: 560px) {
  .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
}

/* "This article is also in …": a strip as wide as the title card under it */
.langbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -6px 0 26px; background: var(--shelf); border: 3px solid var(--ink); border-radius: 16px; box-shadow: 0 4px 0 var(--ink); padding: 9px 10px 9px 18px; font-family: var(--display); font-weight: 600; font-size: 17px; }
.langbar[hidden] { display: none; }
.langbar a { text-decoration-thickness: 2px; text-underline-offset: 3px; }
.langbar button { flex: none; width: 34px; height: 34px; display: grid; place-items: center; padding: 0 0 3px; background: var(--shelf-2); border: 2px solid var(--ink); border-radius: 50%; color: var(--text); font: 600 22px/1 var(--display); cursor: pointer; }
.langbar button:hover { background: var(--navy); color: var(--gold); }

h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.005em; color: var(--head); }
h2 a { color: inherit; text-decoration: none; }
h2 a:hover { color: var(--gold-text); }

/* Small chips, as on the TV tiles */
.badge { display: inline-flex; align-items: center; height: 27px; padding: 0 11px; border-radius: 999px; background: var(--room); color: var(--text); font-family: var(--display); font-weight: 500; font-size: 14px; line-height: 1; white-space: nowrap; }
.badge.lang { background: var(--gold); color: var(--navy); }

/* The date badge: gold, chunky, stuck on a little crooked */
.dbadge { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; flex: none; width: 60px; height: 62px; background: var(--gold); color: var(--navy); border: 3px solid var(--ink); border-radius: 16px; box-shadow: 0 4px 0 var(--ink); font-family: var(--display); line-height: 1; transform: rotate(-4deg); transition: transform 140ms ease-out; }
.dbadge b { font-size: 25px; font-weight: 700; color: var(--navy); }
.dbadge span { font-size: 14px; font-weight: 600; margin-top: 2px; }

/* ---------------------------------------------------------------- the index */
.blog-index .intro { padding: 14px 0 38px; }
.blog-index .intro h1 { display: flex; align-items: flex-end; gap: 16px; font-size: clamp(66px, 10vw, 116px); font-weight: 700; line-height: 0.9; margin: 0 0 18px; color: var(--gold); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 0 6px 0 var(--ink); }
.critter { flex: none; width: 89px; height: 96px; margin-bottom: 2px; transform: rotate(8deg); transform-origin: bottom center; }
.critter i { display: block; width: 89px; height: 96px; background-repeat: no-repeat; background-position: -2px -2px; }
.blog-index .intro p { font-size: 20px; color: var(--soft); max-width: 640px; margin: 0; }
.blog-index main > h2 { font-size: 28px; margin: 56px 0 16px; }

/* ---------------------------------------------------------------- the shelf of capsules */
.shelf { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 26px; }
.cap { min-width: 0; }
.cap > a { position: relative; display: flex; flex-direction: column; height: 100%; background: var(--shelf); color: var(--text); text-decoration: none; border: 3px solid var(--ink); border-radius: 20px; overflow: hidden; box-shadow: 0 7px 0 var(--ink); transition: transform 120ms ease-out, box-shadow 120ms ease-out, background 120ms; }
.cap-art { display: block; aspect-ratio: 1200 / 509; background: var(--shelf-2); border-bottom: 3px solid var(--ink); overflow: hidden; }
.cap-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: left center; }
.cap-body { position: relative; display: flex; flex-direction: column; gap: 9px; padding: 16px 18px 20px; flex: 1; }
.cap-badges { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; min-height: 27px; padding-right: 66px; }
.cap-time { color: var(--soft); font-size: 14px; font-weight: 700; }
.cap-title { font-family: var(--display); font-weight: 600; font-size: 21px; line-height: 1.2; color: var(--head); }
.cap-desc { color: var(--soft); font-size: 15px; line-height: 1.5; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
/* On a regular tile the date badge is a sticker across the edge between the art and the words */
.cap:not(.lead) .dbadge { position: absolute; right: 16px; top: -34px; }
.cap:nth-child(even) .dbadge { transform: rotate(4deg); }

/* Focus: the tile lifts and glows gold, as on the TV, and its sticker tips a little further. With
   nothing hovered or focused, the lead tile holds the cursor, so the shelf always shows where you are. */
.cap > a:hover, .cap > a:focus-visible,
.shelf.has-lead:not(:hover):not(:focus-within) > .cap:first-child > a { background: var(--shelf-2); box-shadow: var(--glow), 0 7px 0 var(--ink); transform: translateY(-6px); outline: none; border-color: var(--ink); }
.cap > a:active { transform: translateY(2px); box-shadow: var(--glow), 0 2px 0 var(--ink); }
.cap > a:hover .dbadge, .cap > a:focus-visible .dbadge { transform: rotate(-9deg) scale(1.06); }
.cap:nth-child(even) > a:hover .dbadge, .cap:nth-child(even) > a:focus-visible .dbadge { transform: rotate(9deg) scale(1.06); }

/* The newest post on the index: one wide capsule, art left and words right, laid out like a title card */
.cap.lead { grid-column: 1 / -1; }
.cap.lead > a { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
.cap.lead .cap-art { aspect-ratio: auto; height: 100%; min-height: 300px; border-bottom: 0; border-right: 3px solid var(--ink); }
.cap.lead .cap-body { justify-content: center; gap: 16px; padding: 30px 34px; }
.cap.lead .cap-badges { gap: 14px; padding: 0; }
.cap.lead .cap-title { font-size: clamp(26px, 2.6vw, 36px); line-height: 1.1; }
.cap.lead .cap-desc { font-size: 17px; -webkit-line-clamp: 5; }
.cap.lead .cap-time { font-size: 15px; }

/* ---------------------------------------------------------------- a post: the title card */
.title-card { grid-area: head; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 44px; align-items: center; padding: 6px 0 54px; }
.title-card h1 { font-size: clamp(34px, 4.3vw, 54px); font-weight: 700; line-height: 1.07; margin: 0 0 22px; text-wrap: balance; }
.byline { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 14px; margin: 0 0 20px; }
.byline .dbadge { width: 56px; height: 58px; }
.byline .dbadge b { font-size: 23px; }
.byline .dbadge span { font-size: 13px; }
.byline-txt { display: flex; flex-direction: column; line-height: 1.35; font-size: 15px; color: var(--soft); margin-right: 8px; }
.byline-txt span:first-child { color: var(--head); font-weight: 700; }
.share { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font: 600 16px/1 var(--display); color: #fffdf8; background: var(--navy); border: 3px solid var(--ink); border-radius: 999px; padding: 9px 16px; box-shadow: 0 4px 0 var(--ink); transition: transform 80ms, box-shadow 80ms; }
.share[hidden] { display: none; }
.share::before { content: ''; width: 16px; height: 16px; background: currentColor; -webkit-mask: var(--share-icon) center / contain no-repeat; mask: var(--share-icon) center / contain no-repeat; }
.share:hover { background: #2a3858; }
.share:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.share.done { background: var(--leaf); color: var(--ink); }
:root { --share-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 14a5 5 0 0 0 7 0l3-3a5 5 0 0 0-7-7l-1 1'/%3E%3Cpath d='M14 10a5 5 0 0 0-7 0l-3 3a5 5 0 0 0 7 7l1-1'/%3E%3C/svg%3E"); }
.title-card .dek { color: var(--soft); font-size: 19px; line-height: 1.55; margin: 0; max-width: 34em; }
.tc-art img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 509; object-fit: cover; border: 4px solid var(--ink); border-radius: 22px; box-shadow: 0 8px 0 var(--ink); background: var(--shelf); }

.reader { display: grid; grid-template-columns: 256px minmax(0, 1fr); grid-template-areas: 'head head' 'toc body'; column-gap: 76px; }
.reader.no-toc { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'head' 'body'; }
.reader > .post { grid-area: body; min-width: 0; max-width: 800px; }
.reader.no-toc > .post { max-width: 760px; }

/* The side list of sections: sticky, and the section you are reading is the picked tile */
.toc-side { grid-area: toc; position: sticky; top: 20px; align-self: start; max-height: calc(100vh - 40px); overflow-y: auto; padding: 4px 6px 12px 0; scrollbar-width: thin; scrollbar-color: var(--shelf-2) transparent; }
.toc-h { font-family: var(--display); font-weight: 600; font-size: 17px; color: var(--head); margin: 0 0 10px 14px; }
.toc-side ol, .toc-fold ol { list-style: none; margin: 0; padding: 0; }
.toc-side li { margin: 2px 0; }
.toc-side a { display: flex; align-items: flex-start; gap: 9px; padding: 7px 12px; border-radius: 12px; color: var(--soft); text-decoration: none; font-size: 15px; font-weight: 700; line-height: 1.3; border: 2px solid transparent; transition: background 120ms, color 120ms; }
.toc-side a:hover { color: var(--text); background: var(--shelf); }
.toc-side a[aria-current] { background: var(--gold); color: var(--navy); border-color: var(--ink); box-shadow: 0 3px 0 var(--ink); }
/* A numbered entry keeps its player colour in the list */
.tn { flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; margin-top: -1px; border: 2px solid var(--ink); border-radius: 7px; background: var(--c); color: var(--on-color); font: 700 13px/1 var(--display); }
.toc-fold { display: none; }

/* ---------------------------------------------------------------- reading */
.post p, .post li { font-size: 19px; line-height: 1.72; }
.post p { margin: 0 0 1.05em; }
.post b { font-weight: 800; color: var(--head); }
.post a { text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--underline); }
.post a:hover { text-decoration-color: var(--gold-text); }
.post h2 { font-size: clamp(26px, 3vw, 31px); line-height: 1.16; margin: 2.1em 0 0.55em; scroll-margin-top: 20px; text-wrap: balance; }
.post h3 { font-size: 22px; margin: 1.6em 0 0.4em; }
.post ul, .post ol { padding-left: 26px; margin: 0 0 1.2em; }
.post li { margin: 0.35em 0; padding-left: 4px; }
.post ul li::marker { color: var(--gold-text); font-size: 0.95em; }
.post ol li::marker { color: var(--gold-text); font-family: var(--display); font-weight: 600; }

/* Key points: the short answer, one player colour per point */
.keypoints { margin: 2em 0 2.2em; padding: 20px 24px 8px; background: var(--shelf); border: 3px solid var(--ink); border-radius: 22px; box-shadow: 0 6px 0 var(--ink); }
/* Privacy and terms: the date under the title, and the short version in the same box as key points */
.legal .updated { margin: -0.4em 0 1.4em; opacity: 0.7; font-size: 15px; font-weight: 700; }
.post .keypoints > p { margin: 0 0 12px; font-size: 18px; line-height: 1.55; }
.post .keypoints h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; font-size: 23px; }
.keypoints h2::before { content: ''; flex: none; width: 32px; height: 32px; border: 3px solid var(--ink); border-radius: 50%; transform: rotate(-6deg); background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2306070a' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 18px no-repeat; }
.post .keypoints ul { list-style: none; padding: 0; margin: 0 0 6px; }
.post .keypoints li { position: relative; margin: 0; padding: 11px 0 11px 28px; font-size: 18px; line-height: 1.55; border-top: 2px dashed var(--dash); }
.post .keypoints li:first-child { border-top: 0; }
.keypoints li::before { content: ''; position: absolute; left: 3px; top: 21px; width: 12px; height: 12px; border: 2px solid var(--ink); border-radius: 4px; background: var(--teal); transform: rotate(45deg); }
.keypoints li:nth-child(8n+2)::before { background: var(--sun); }
.keypoints li:nth-child(8n+3)::before { background: var(--bubble); }
.keypoints li:nth-child(8n+4)::before { background: var(--sky); }
.keypoints li:nth-child(8n+5)::before { background: var(--leaf); }
.keypoints li:nth-child(8n+6)::before { background: var(--grape); }
.keypoints li:nth-child(8n+7)::before { background: var(--flame); }
.keypoints li:nth-child(8n+8)::before { background: var(--coral); }

/* Numbered entries: a ranked list fills up like a lobby, one player colour per seat */
.post h2.entry { display: flex; align-items: center; gap: 14px; margin-top: 2.3em; }
.num { flex: none; display: inline-grid; place-items: center; width: 50px; height: 50px; padding-bottom: 2px; font: 700 27px/1 var(--display); color: var(--on-color); background: var(--c, var(--gold)); border: 3px solid var(--ink); border-radius: 15px; box-shadow: 0 4px 0 var(--ink); transform: rotate(-5deg); }
.post h2.entry:nth-of-type(even) .num { transform: rotate(4deg); }
.post .specs { font-size: 16px; line-height: 1.6; padding: 12px 16px; background: var(--shelf); border: 2px solid var(--shelf-2); border-radius: 14px; color: var(--soft); }
.post .specs b { color: var(--head); }

/* FAQ: accordions that work without script */
.faq { display: grid; gap: 12px; margin: 18px 0 28px; }
.faq details { background: var(--shelf); border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 4px 0 var(--ink); }
.faq details[open] { background: var(--shelf-2); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px 14px 20px; font: 600 19px/1.3 var(--display); color: var(--head); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; flex: none; width: 32px; height: 32px; border: 3px solid var(--ink); border-radius: 50%; background: linear-gradient(var(--ink), var(--ink)) center / 16px 4px no-repeat, linear-gradient(var(--ink), var(--ink)) center / 4px 16px no-repeat, var(--sky); transition: transform 150ms ease; }
.faq details[open] summary::after { background: linear-gradient(var(--ink), var(--ink)) center / 16px 4px no-repeat, var(--gold); transform: rotate(180deg); }
.faq summary:hover { color: var(--gold-text); }
.faq summary:focus-visible { outline-offset: -3px; border-radius: 15px; }
.post .faq p { margin: 0; padding: 0 20px 18px; font-size: 18px; }

/* Game cards inside an article: small capsules */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; margin: 22px 0 18px; }
.card { display: flex; flex-direction: column; gap: 4px; background: var(--shelf); color: var(--text) !important; text-decoration: none !important; border: 3px solid var(--ink); border-radius: 16px; overflow: hidden; padding-bottom: 12px; box-shadow: 0 5px 0 var(--ink); transition: transform 120ms ease-out, box-shadow 120ms ease-out; }
.card:hover, .card:focus-visible { transform: translateY(-4px); box-shadow: var(--glow), 0 5px 0 var(--ink); outline: none; }
.card img { display: block; width: 100%; height: auto; aspect-ratio: 560 / 237; object-fit: cover; border-bottom: 3px solid var(--ink); background: var(--shelf-2); }
.card b { padding: 8px 12px 0; font-family: var(--display); font-weight: 600; font-size: 18px; line-height: 1.2; color: var(--head) !important; }
.card span { padding: 0 12px; color: var(--soft); font-size: 14px; line-height: 1.45; }

/* Before and after clips */
.post .ba { margin: 26px 0 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.post .ba > div { position: relative; }
.post .ba video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 14px; border: 3px solid var(--ink); box-shadow: 0 5px 0 var(--ink); background: var(--shelf); }
.post .ba span { position: absolute; left: 10px; top: 10px; padding: 3px 11px; border-radius: 999px; background: #3a4160; color: #fff; border: 2px solid var(--ink); font: 600 13px/1.3 var(--display); }
.post .ba > div:last-of-type span { background: var(--leaf); color: var(--ink); }
.post .ba figcaption { grid-column: 1 / -1; margin-top: 4px; font: 600 15px/1.3 var(--display); text-align: center; }
.post .ba figcaption a { text-decoration: none; }

/* How it works: the landing's step cards (tinted, ink edge, a slight tilt, a gold number, the emoji
   big and faint behind the words), then a short version of its closing banner */
.how { margin: 88px 0 0; }
.how > h2 { margin: 0 0 34px; text-align: center; font-size: clamp(32px, 4vw, 52px); font-weight: 700; line-height: 1.05; text-wrap: balance; }
.steps { list-style: none; margin: 0; padding: 18px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.step { position: relative; overflow: visible; padding: 30px; background: var(--c1); border: 4px solid var(--edge); border-radius: 22px; box-shadow: 0 6px 0 var(--c-drop); transform: rotate(-1.2deg); transition: transform 0.18s cubic-bezier(0.2, 1, 0.3, 1); }
.step:nth-child(2) { background: var(--c2); transform: rotate(1.2deg); }
.step:nth-child(3) { background: var(--c3); }
.step:hover { transform: translateY(-4px); }
.step::before { content: '1'; position: absolute; top: -18px; left: -18px; z-index: 2; transform: rotate(-8deg); display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--gold); border: 4px solid var(--navy); box-shadow: 0 3px 0 var(--navy); color: var(--navy); font-family: var(--display); font-weight: 700; font-size: 22px; line-height: 1; }
/* the card is a size container so a title can shrink to stay on one line: ironthumbs.com can't wrap,
   and 9cqi fits "Открой ironthumbs.com", the longest one-line title (Turkish wraps between words) */
.step { container-type: inline-size; }
/* size containment also scopes CSS counters, so each card gets its number directly */
.step:nth-child(2)::before { content: '2'; }
.step:nth-child(3)::before { content: '3'; }
.step h3 { position: relative; z-index: 1; margin: 0 0 8px; color: var(--ct); font-size: min(27px, 9cqi); font-weight: 700; line-height: 1.15; }
.step p { position: relative; z-index: 1; margin: 0; color: var(--cs); font-size: 16px; font-weight: 700; line-height: 1.5; }
.step .e { position: absolute; right: 14px; bottom: 10px; font-size: 96px; line-height: 1; opacity: var(--eo); filter: grayscale(0.15); pointer-events: none; }
.close { margin-top: 46px; padding: 54px 24px 58px; text-align: center; color: var(--navy); background: linear-gradient(135deg, #ff5c5c, #ffb520 50%, #c77dff); border: 4px solid var(--ink); border-radius: 30px; box-shadow: 0 8px 0 var(--ink); }
.close-h { margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(32px, 4.4vw, 56px); line-height: 1.02; letter-spacing: -0.01em; text-wrap: balance; }
.close p:not(.close-h) { margin: 12px auto 26px; max-width: 560px; font-size: 18px; font-weight: 700; line-height: 1.5; text-wrap: balance; }
.close .btn { display: inline-flex; align-items: center; gap: 10px; padding: 17px 30px; border-radius: 16px; background: var(--navy); color: #fffdf8; text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 21px; line-height: 1.1; white-space: nowrap; box-shadow: 0 6px 0 #000; transition: transform 0.15s; }
.close .btn:hover { transform: translateY(-2px); }
.close .btn:active { transform: translateY(2px); box-shadow: none; }
.close .btn:focus-visible { outline: 3px solid var(--navy); outline-offset: 4px; }

/* Related posts under an article */
.related > h2 { font-size: 30px; margin: 72px 0 26px; }

/* Reading progress, added by blog.js */
#readbar { position: fixed; left: 0; top: 0; z-index: 50; width: 100%; height: 5px; background: var(--gold); border-bottom: 1px solid var(--ink); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; }

/* The phone play bar (shown at 700px and below) */
.playbar { display: none; }

/* ---------------------------------------------------------------- narrower screens */
@media (max-width: 1060px) {
  .reader { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'head' 'body'; }
  .reader > .post { max-width: 720px; }
  .toc-side { display: none; }
  .toc-fold { display: block; margin: 0 0 30px; background: var(--shelf); border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 5px 0 var(--ink); }
  .toc-fold summary { display: flex; align-items: center; gap: 10px; padding: 13px 18px; cursor: pointer; list-style: none; font-family: var(--display); font-weight: 600; font-size: 19px; color: var(--head); }
  .toc-fold summary::-webkit-details-marker { display: none; }
  .toc-fold summary::after { content: ''; margin-left: auto; width: 10px; height: 10px; border-right: 3px solid var(--gold-text); border-bottom: 3px solid var(--gold-text); transform: translateY(-3px) rotate(45deg); transition: transform 150ms; }
  .toc-fold[open] summary::after { transform: translateY(2px) rotate(-135deg); }
  .toc-n { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px; background: var(--room); color: var(--soft); font-size: 14px; font-weight: 500; }
  .toc-fold ol { padding: 4px 10px 12px; border-top: 3px solid var(--ink); }
  .toc-fold li { margin: 0; padding: 0; font-size: 17px; line-height: 1.35; }
  .toc-fold li::marker { content: none; }
  .toc-fold a { display: flex; align-items: flex-start; gap: 10px; padding: 9px 8px; color: var(--text); text-decoration: none; font-weight: 700; border-radius: 10px; }
  .toc-fold a:hover { background: var(--shelf-2); color: var(--gold-text); }
  .toc-fold .tn { margin-top: 0; }
  .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .title-card { grid-template-columns: minmax(0, 1fr); gap: 26px; padding-bottom: 34px; }
  .cap.lead > a { display: flex; }
  .cap.lead .cap-art { aspect-ratio: 1200 / 509; min-height: 0; height: auto; border-right: 0; border-bottom: 3px solid var(--ink); }
  .cap.lead .cap-body { padding: 18px 20px 20px; gap: 10px; }
  .cap.lead .dbadge { position: absolute; right: 16px; top: -34px; }
  .cap.lead .cap-badges { padding-right: 66px; }
}
@media (max-width: 700px) {
  /* The sticky play bar steps in on phones; blog.js moves it away while another play button shows */
  body { padding-bottom: 104px; }
  .playbar { position: fixed; z-index: 40; left: 10px; right: 10px; bottom: 10px; display: flex; align-items: center; gap: 12px; padding: 7px 7px 7px 16px; background: var(--navy); border: 3px solid var(--ink); border-radius: 999px; box-shadow: 0 5px 0 var(--ink), var(--bar-drop); transition: transform 200ms ease, opacity 200ms ease; }
  .playbar span { flex: 1; min-width: 0; font: 500 14px/1.25 var(--display); color: var(--head); }
  .playbar .cta { flex: none; padding: 9px 18px; font-size: 17px; box-shadow: 0 3px 0 var(--ink); }
  .playbar.away { transform: translateY(140%); opacity: 0; pointer-events: none; }
}
@media (max-width: 600px) {
  main { padding-bottom: 48px; }
  .cta { padding: 7px 14px; }
  .cta.big { font-size: 19px; padding: 12px 22px; }
  .crumbs { font-size: 14px; margin-bottom: 16px; }
  .langbar { font-size: 16px; padding-left: 14px; margin-top: -4px; }
  .blog-index .intro { padding: 4px 0 26px; }
  .blog-index .intro h1 { gap: 8px; -webkit-text-stroke-width: 2px; text-shadow: 0 4px 0 var(--ink); margin-bottom: 14px; }
  .critter { transform: scale(0.8) rotate(8deg); margin: 0 0 -6px -6px; }
  .blog-index .intro p { font-size: 18px; }
  .shelf { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .cap.lead .cap-title { font-size: 25px; }
  .cap.lead .cap-desc { font-size: 16px; }
  .cap:not(.lead) .dbadge, .cap.lead .dbadge { width: 54px; height: 56px; top: -32px; right: 14px; border-radius: 14px; }
  .cap .dbadge b { font-size: 22px; }
  .cap .dbadge span { font-size: 13px; }
  .title-card h1 { font-size: 33px; margin-bottom: 18px; }
  .byline { margin-bottom: 16px; }
  .share { padding: 8px 13px; font-size: 15px; }
  .title-card .dek { font-size: 17px; }
  .tc-art img { border-width: 3px; border-radius: 16px; box-shadow: 0 6px 0 var(--ink); }
  .post p, .post li { font-size: 18px; line-height: 1.68; }
  .post h2 { font-size: 25px; }
  .post h2.entry { gap: 12px; }
  .num { width: 42px; height: 42px; font-size: 23px; border-radius: 12px; }
  .keypoints { padding: 16px 16px 4px; border-radius: 18px; }
  .post .keypoints h2 { font-size: 21px; }
  .post .keypoints li { font-size: 17px; }
  .faq summary { font-size: 17px; padding: 12px 12px 12px 16px; }
  .post .faq p { padding: 0 16px 16px; font-size: 17px; }
  .post .ba { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  /* Game cards become a row you swipe, like a shelf on the TV, with the next card peeking in */
  .grid { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 18px -16px 14px; padding: 4px 16px 16px; scroll-padding: 0 16px; scrollbar-width: none; }
  .grid::-webkit-scrollbar { display: none; }
  .grid > .card { flex: 0 0 72%; scroll-snap-align: start; }
  .card b { font-size: 16px; padding: 6px 10px 0; }
  .card span { font-size: 13px; padding: 0 10px; }
  .related > h2 { font-size: 26px; margin-top: 60px; }
}
@media (max-width: 400px) {
  .playbar span { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .cap > a:hover, .cap > a:focus-visible, .shelf.has-lead:not(:hover):not(:focus-within) > .cap:first-child > a, .card:hover, .card:focus-visible { transform: none; }
}


/* Title card: the game card fills the whole top section, darkened on the text side */
.title-card { position: relative; isolation: isolate; overflow: hidden; grid-template-columns: minmax(0, 1fr); align-items: center; min-height: 380px; padding: 52px 48px; margin-bottom: 54px; border: 4px solid var(--ink); border-radius: 26px; box-shadow: 0 8px 0 var(--ink); background: var(--shelf); }
.title-card .tc-text { position: relative; z-index: 1; max-width: 640px; }
.title-card h1 { text-shadow: var(--tc-shadow); }
.title-card .dek { color: var(--dek); }
.tc-art { position: absolute; inset: 0; z-index: 0; }
.tc-art img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; object-position: center; border: 0; border-radius: 0; box-shadow: none; }
.tc-art::after { content: ''; position: absolute; inset: 0; background: var(--tc-wash); }
@media (max-width: 1060px) {
  .title-card { padding: 40px 32px; min-height: 0; margin-bottom: 34px; }
}
@media (max-width: 700px) {
  .title-card { padding: 28px 20px; border-width: 3px; border-radius: 20px; box-shadow: 0 6px 0 var(--ink); }
  .tc-art::after { background: var(--tc-wash-phone); }
}

/* Article text justified, with hyphenation so lines don't open gaps */
.post p, .post li { text-align: justify; -webkit-hyphens: auto; hyphens: auto; hyphenate-limit-chars: 7 3 3; }
.post .specs, .post .ba figcaption { text-align: left; }

/* Header, steps and footer on smaller screens, as the landing does them: "How it works" leaves the bar
   at 900px, "FAQ" at 560px; the steps stack at 900px and become a swipe row at 560px. At 700px and
   below the gold button moves from the bar to the play bar at the bottom. */
@media (max-width: 900px) {
  .top { padding-top: 14px; padding-bottom: 14px; }
  .top nav { gap: 12px; font-size: 14px; }
  .top nav .hide-m { display: none; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 18px; max-width: 620px; margin: 0 auto; }
}
@media (max-width: 700px) {
}
@media (max-width: 560px) {
  .mark { font-size: 20px; }
  .mark img { width: 30px; height: 30px; }
  .top nav .hide-s { display: none; }
  .theme { width: 30px; height: 30px; font-size: 18px; }
  .how { margin-top: 64px; }
  .how > h2 { margin-bottom: 20px; }
  .steps { display: flex; gap: 12px; max-width: none; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; margin: 0 -16px; padding: 22px 16px 14px 24px; scroll-padding-inline: 16px; }
  .step::before { top: -14px; left: -12px; width: 42px; height: 42px; font-size: 20px; }
  .steps::-webkit-scrollbar { display: none; }
  .step { flex: 0 0 86%; scroll-snap-align: start; padding: 32px 20px 20px; }
  .step h3 { font-size: min(24px, 9cqi); }
  .step .e { font-size: 84px; }
  .close { margin-top: 30px; padding: 38px 18px 42px; border-width: 3px; border-radius: 24px; box-shadow: 0 6px 0 var(--ink); }
  .close p:not(.close-h) { font-size: 17px; margin-bottom: 22px; }
  .close .btn { font-size: 19px; padding: 15px 22px; }
}
/* Phones: five things share the bar (logo and name, Games, Blog, the theme switch, the language), so
   the gaps tighten and the language button shows its flag only (its label still names the language) */
@media (max-width: 420px) {
  .top { gap: 12px; }
  .top nav { gap: 8px; }
  .lang-code { display: none; }
}
/* Under 360px the name leaves the bar (still read out), so the four items fit beside the logo */
@media (max-width: 359px) {
  .top { gap: 10px; }
  .top .mark-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  .step, .step:nth-child(2) { transition: none; }
  .step:hover { transform: rotate(-1.2deg); }
  .step:nth-child(2):hover { transform: rotate(1.2deg); }
}

/* Short screens: car head units (800x480, 1024x600, 1280x480), phones held sideways, 720p TVs.
   The header, crumbs and title card tighten so the title, date and first lines fit the first view. */
@media (max-height: 620px) and (min-width: 600px) {
  .top { padding-top: 10px; padding-bottom: 10px; }
  .crumbs { margin-bottom: 14px; }
  .langbar { margin-bottom: 18px; padding-top: 6px; padding-bottom: 6px; }
  .title-card { min-height: 0; padding: 30px 36px; margin-bottom: 32px; }
  .title-card h1 { font-size: clamp(30px, 3.4vw, 42px); margin-bottom: 14px; }
  .title-card .dek { font-size: 17px; }
  .blog-index .intro { padding: 4px 0 24px; }
  .blog-index .intro h1 { font-size: clamp(56px, 7vw, 84px); margin-bottom: 10px; }
}
@media (max-height: 440px) and (min-width: 600px) {
  .title-card .dek { display: none; }
}

/* Big screens at 100% scale (QHD and 4K monitors, 4K TV browsers that report full resolution):
   scale the whole page so it reads like a 1600-1900px screen instead of a thin column in the dark. */
@media (min-width: 2100px) { html { zoom: 1.25; } }
@media (min-width: 2500px) { html { zoom: 1.5; } }
@media (min-width: 3400px) { html { zoom: 2; } }

/* Language menu on short screens: two columns, so all eleven fit under the bar without scrolling the page */
.lang-menu { max-height: calc(100vh - 80px); max-height: calc(100dvh - 80px); overflow-y: auto; }
@media (max-height: 620px) and (min-width: 600px) {
  .lang-menu { display: grid; grid-template-columns: 1fr 1fr; column-gap: 4px; min-width: 340px; }
}

/* ---------------------------------------------------------------- light theme
   The landing's light language (home.css .home.light): a paper page, ink words and outlines, white,
   paper-2 and ice cards with an ink edge and a hard ink drop. Gold stays the fill for anything you press
   or that marks a date; where gold would be text or a thin line it turns dark amber, which reads on paper.
   Set by the head script as <html class="light"> before the first paint; blog.js flips it. */
:root.light {
  color-scheme: light;
  --room: #fff6e6;      /* paper */
  --shelf: #fffdf8;     /* white */
  --shelf-2: #fbebd2;   /* paper-2 */
  --ink: #1f2a44;
  --text: #1f2a44;      /* 13:1 on paper */
  --head: #1f2a44;
  --soft: #565c70;      /* 6.2:1 on paper, 5.7:1 on paper-2 and ice */
  --gold-text: #8f5600; /* 5.6:1 on paper, 5.1:1 on paper-2 */
  --underline: #c98a12;
  --focus: #1f2a44;
  --glow: 0 0 0 4px var(--gold), 0 0 30px 4px rgba(201, 138, 18, 0.32);
  --edge: #1f2a44;
  --bar-text: #1f2a44;
  --bar-head: #1f2a44;
  --wash: rgba(31, 42, 68, 0.08);
  --menu: #fffdf8;
  --menu-edge: 3px solid #1f2a44;
  --menu-drop: 0 6px 0 #1f2a44, 0 18px 40px rgba(31, 42, 68, 0.18);
  --foot: #565c70;
  --dash: rgba(31, 42, 68, 0.16);
  --c1: #fffdf8; --c2: #fbebd2; --c3: #ddf1fb;
  --ct: #1f2a44; --cs: #565c70; --eo: 0.18; --c-drop: #1f2a44;
  --dek: #3d4459;
  /* The title card keeps its game art and lays paper over the words side instead of the dark room */
  --tc-wash: linear-gradient(90deg, rgb(255, 246, 230) 0%, rgb(255, 246, 230) 38%, rgba(255, 246, 230, 0.9) 54%, rgba(255, 246, 230, 0.58) 78%, rgba(255, 246, 230, 0.2) 100%);
  --tc-wash-phone: linear-gradient(180deg, rgba(255, 246, 230, 0.9) 0%, rgba(255, 246, 230, 0.95) 100%);
  --tc-shadow: none;
  --bar-drop: 0 10px 26px rgba(31, 42, 68, 0.22);
}
.light .foot .social a { background: rgba(31, 42, 68, 0.08); }
.light .foot .social a:hover { background: rgba(31, 42, 68, 0.16); }
.light .share { color: var(--ink); background: var(--shelf); }
.light .share:hover { background: var(--shelf-2); }
.light .share.done { background: var(--leaf); }
.light .langbar button:hover { color: var(--gold); }
.light .post .specs { border-color: var(--dash); }
.light .post .ba span { background: var(--navy); }
.light .close .btn { box-shadow: 0 6px 0 var(--ink); }
.light .playbar { background: var(--shelf); }
.light .toc-side a:hover { background: var(--shelf-2); }


/* ---------------------------------------------------------------- games
   The list is the card art alone, which carries each game's name; the page of a game puts its words
   beside its card, then reads like an article. */
.page-intro { padding: 14px 0 34px; }
.page-intro h1 { font-size: clamp(42px, 6vw, 76px); font-weight: 700; line-height: 0.98; margin: 0 0 16px; color: var(--gold); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 0 5px 0 var(--ink); text-wrap: balance; }
.page-intro p { font-size: 20px; color: var(--soft); margin: 0; text-wrap: pretty; }
.gshelf { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.gtile { min-width: 0; }
.gtile a { display: block; border: 3px solid var(--ink); border-radius: 16px; overflow: hidden; background: var(--shelf-2); box-shadow: 0 5px 0 var(--ink); transition: transform 120ms ease-out, box-shadow 120ms ease-out; }
.gtile a:hover, .gtile a:focus-visible { transform: translateY(-5px); box-shadow: var(--glow), 0 5px 0 var(--ink); outline: none; }
.gtile a:active { transform: translateY(2px); box-shadow: var(--glow), 0 1px 0 var(--ink); }
.gtile img { display: block; width: 100%; height: auto; aspect-ratio: 560 / 237; object-fit: cover; }
.more-link { margin: 26px 0 0; font-family: var(--display); font-weight: 600; font-size: 19px; }
.more-link a { text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--underline); }
.ghero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 48px; align-items: center; padding: 6px 0 54px; }
.ghero h1 { font-size: clamp(40px, 5vw, 66px); font-weight: 700; line-height: 1; margin: 0 0 16px; color: var(--gold); -webkit-text-stroke: 2.5px var(--ink); paint-order: stroke fill; text-shadow: 0 4px 0 var(--ink); text-wrap: balance; }
.ghero .dek { color: var(--dek); font-size: 20px; line-height: 1.5; margin: 0 0 20px; max-width: 32em; }
.facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; padding: 0; }
/* the play button runs exactly as wide as the row of facts above it */
.ghero-go { display: grid; width: max-content; max-width: 100%; }
.ghero-go .facts { margin-bottom: 18px; }
.ghero-go .cta { text-align: center; }
.facts li { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border-radius: 999px; background: var(--shelf); border: 2px solid var(--ink); color: var(--text); font: 500 15px/1.2 var(--display); }
/* The game as it looks on the TV, in a dark bezel, and its phone controller in a phone */
.tvframe { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; border: 10px solid #0b0e16; border-radius: 18px; box-shadow: 0 0 0 3px var(--ink), 0 8px 0 3px var(--ink), 0 22px 40px rgba(0, 0, 0, .3); transform: rotate(1deg); }
.tvframe video { display: block; width: 100%; height: 100%; object-fit: cover; }
.gphone { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 56px); align-items: center; margin: 10px 0 56px; }
.gphone h2 { font-size: clamp(26px, 3vw, 31px); line-height: 1.16; margin: 0 0 0.45em; }
.gphone p { color: var(--dek); font-size: 19px; line-height: 1.55; margin: 0; max-width: 30em; }
.phframe { overflow: hidden; background: #0b0e16; border: solid #0b0e16; border-width: 12px 22px; border-radius: 34px; box-shadow: 0 0 0 3px var(--ink), 0 8px 0 3px var(--ink), 0 22px 40px rgba(0, 0, 0, .3); transform: rotate(-2deg); }
.phframe img { display: block; width: 100%; height: auto; border-radius: 10px; }
/* the two games played with the phone upright */
.gphone.tall .phframe { width: min(230px, 100%); justify-self: center; border-width: 22px 12px; }
/* a game's rules are a few short bullets, so they run the page's full width like the intro */
.gpost { max-width: none; }
.gpost p, .gpost li { text-wrap: pretty; }
.gpost > h2:first-child { margin-top: 0; }
.related .gshelf { margin-top: 0; }
@media (min-width: 700px) { .gshelf { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; } }
@media (min-width: 1100px) { .gshelf { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; } }
@media (max-width: 860px) {
  .ghero { grid-template-columns: minmax(0, 1fr); gap: 26px; padding-bottom: 38px; }
  .ghero-art { order: -1; }
  .tvframe { transform: none; }
  .gphone { grid-template-columns: minmax(0, 1fr); gap: 22px; margin-bottom: 44px; }
  .phframe { transform: none; }
}
@media (max-width: 600px) {
  .page-intro { padding: 4px 0 24px; }
  .page-intro h1 { -webkit-text-stroke-width: 2px; text-shadow: 0 4px 0 var(--ink); margin-bottom: 12px; }
  .page-intro p { font-size: 18px; }
  .gtile a { border-width: 2px; border-radius: 12px; box-shadow: 0 4px 0 var(--ink); }
  .ghero h1 { font-size: 38px; -webkit-text-stroke-width: 2px; }
  .ghero .dek { font-size: 18px; }
  .ghero-go { width: auto; }
  .tvframe { border-width: 7px; border-radius: 14px; box-shadow: 0 0 0 3px var(--ink), 0 6px 0 3px var(--ink); }
  .phframe { border-width: 9px 16px; border-radius: 26px; box-shadow: 0 0 0 3px var(--ink), 0 6px 0 3px var(--ink); }
  .gphone.tall .phframe { border-width: 16px 9px; }
  .gphone p { font-size: 18px; }
  .gphone h2 { font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  .gtile a:hover, .gtile a:focus-visible { transform: none; }
}
/* Four columns hold four related games; the two extra fill the rows of narrower screens */
@media (min-width: 1100px) { .related .gtile:nth-child(n+5) { display: none; } }
/* A game's short rule lines read better ragged than justified */
.gpost p, .gpost li { text-align: start; -webkit-hyphens: manual; hyphens: manual; }

/* Arabic: letter spacing pulls joined letters apart, and a line of tight display type needs room
   for the dots above and below. */
html[lang='ar'] * { letter-spacing: 0 !important; }
html[lang='ar'] h1, html[lang='ar'] h2, html[lang='ar'] h3, html[lang='ar'] .close-h { line-height: 1.35; }
/* Thai puts spaces only between phrases, so justifying a line stretches those few into holes. */
html[lang='th'] .post p, html[lang='th'] .post li { text-align: start; }
