/* warm.css — warm, high-contrast redesign for a senior audience (branch preview/warm-redesign, 2026-10-09).
   The LAST stylesheet. It re-skins existing elements by id/class and adds nothing interactive of its own
   (js/warm.js adds the theme label, per-card page links and the in-game state).
   Many older rules are inline styles or carry !important, so the overrides here need !important too.
   Both themes: body text ≥ 7:1 contrast on its background; tap targets ≥ 48px; type a step bigger. */

/* ── tokens (dark is the site default; light via html[data-theme="light"]) ── */
:root{
  --w-bg:#1a130d; --w-bg2:#2a1d13; --w-card:#2f2218; --w-card2:#3a2a1d; --w-line:#6b4f33;
  --w-ink:#fff6e8; --w-ink2:#f3e2c7; --w-muted:#e2cba8;
  --w-accent:#f6b545; --w-accent2:#ffd27a; --w-on-accent:#2a1700;
  --w-table:#fffaf1; --w-table-ink:#2b1b0d; --w-table-ink2:#4a3420; --w-table-line:#e8cfa8;
  --w-nav:rgba(26,19,13,.97);
  --w-q1:#ffe08a; --w-q1b:#c98a00; --w-q2:#b9f0d2; --w-q2b:#2f9e66; --w-q3:#cfe0ff; --w-q3b:#4a78c9; --w-q4:#ffd0e1; --w-q4b:#c2507e;
  --w-q-ink:#1f1406;
  --w-ok:#15803d; --w-bad:#b91c1c;
}
html[data-theme="light"]{
  --w-bg:#fbf3e4; --w-bg2:#f4e3c6; --w-card:#ffffff; --w-card2:#fff7ea; --w-line:#e0c497;
  --w-ink:#2a1a0c; --w-ink2:#3d2a17; --w-muted:#5a4129;
  --w-accent:#b45309; --w-accent2:#92400e; --w-on-accent:#ffffff;
  --w-nav:rgba(255,250,240,.97);
}
/* review palettes (preview only; the shipped default is "honey") */
html[data-palette="garden"]{ --w-accent:#7fd18b; --w-accent2:#a7e8b0; --w-on-accent:#0d2a12; --w-line:#4f6b3a; --w-bg:#141a10; --w-bg2:#1e2817; --w-card:#22301a; --w-card2:#2b3b21; }
html[data-theme="light"][data-palette="garden"]{ --w-accent:#2f7d32; --w-accent2:#1f5c23; --w-on-accent:#fff; --w-line:#b8d4a3; --w-bg:#f3f8ec; --w-bg2:#e4f0d6; --w-card:#fff; --w-card2:#f6fbf0; }
html[data-palette="sea"]{ --w-accent:#5fd0d6; --w-accent2:#9be6ea; --w-on-accent:#06262a; --w-line:#2f5d68; --w-bg:#0e171b; --w-bg2:#15242a; --w-card:#1a2d34; --w-card2:#213840; }
html[data-theme="light"][data-palette="sea"]{ --w-accent:#0e7490; --w-accent2:#155e75; --w-on-accent:#fff; --w-line:#a9d5df; --w-bg:#eff8fa; --w-bg2:#dcefF3; --w-card:#fff; --w-card2:#f3fafc; }

/* ── page ── */
html body{ background:linear-gradient(170deg,var(--w-bg) 0%,var(--w-bg2) 100%) !important; background-attachment:fixed !important; color:var(--w-ink) !important; font-size:1.125rem; }
#ambientBg .ab-scrim{ background:linear-gradient(180deg,color-mix(in srgb,var(--w-bg) 78%,transparent),color-mix(in srgb,var(--w-bg) 92%,transparent)) !important; }
:focus-visible{ outline:3px solid var(--w-accent) !important; outline-offset:3px !important; }

/* ── header: bigger, labelled, warm ── */
html[data-theme] body nav{ background:var(--w-nav) !important; border-bottom:2px solid var(--w-line) !important; box-shadow:0 6px 24px rgba(0,0,0,.25) !important; }
html[data-theme] body nav h1{ font-size:1.6rem !important; background:none !important; -webkit-text-fill-color:currentColor !important; color:var(--w-ink) !important; }
html[data-theme] body nav #logoLetter{ width:2.75rem !important; height:2.75rem !important; background:none !important; box-shadow:none !important; }
html[data-theme] body nav button, html[data-theme] body nav select, html[data-theme] body nav #levelIndicator{ min-height:48px !important; font-size:1.05rem !important; border-radius:12px !important; border:2px solid var(--w-line) !important;
  background:var(--w-card) !important; color:var(--w-ink) !important; padding:6px 14px !important; }
html[data-theme] body nav button:hover{ border-color:var(--w-accent) !important; }
html[data-theme] body nav #themeBtn{ display:inline-flex !important; align-items:center; gap:8px; font-weight:700 !important; border-color:var(--w-accent) !important; }
html[data-theme] body nav #themeBtn .w-tl{ font-size:1rem; }
/* 2026-11-03: a control never shrinks below its own label (labels ran past the button edge into the language selector). */
html[data-theme] body nav > div > div:last-child > *{ flex:0 0 auto; }
html[data-theme] body nav #themeBtn{ white-space:nowrap; }
/* 2026-11-04: English-only text on a right-to-left page: each paragraph takes its direction from its own words, so a final period stays at the end. */
html[dir="rtl"] #gameInstructions, html[dir="rtl"] #modalTitle, html[dir="rtl"] #modalBody, html[dir="rtl"] [data-new-game] h3, html[dir="rtl"] [data-new-game] p, html[dir="rtl"] .w-sec-h, html[dir="rtl"] .w-sec-p{ unicode-bidi:plaintext; }
html[data-theme] body nav #themeBtn > *{ flex:none; }
html[data-theme] body nav #backBtn:not(.hidden){ background:var(--w-accent) !important; color:var(--w-on-accent) !important; border-color:var(--w-accent) !important; font-weight:800 !important; }
html[data-theme] body nav #inviteBtn{ color:var(--w-ink) !important; }
html[data-theme] body nav #profile-chip .nm{ color:var(--w-ink) !important; font-size:1rem !important; }
html[data-theme] body nav select option{ background:var(--w-card); color:var(--w-ink); }
/* phones: ONE header row — logo, title (the level during a game), ☰ Menu, Light/Dark, Back — as labelled icons.
   js/warm.js moves the other header controls (text size, sound, scores, awards, invite, profile, language) into
   a labelled grid at the top of the ☰ menu; nothing is removed, and wider screens get them back in the header. */
@media (max-width:639px){
  html[data-theme] body nav{ padding-top:6px !important; padding-bottom:6px !important; }
  html[data-theme] body nav > div{ flex-wrap:nowrap !important; gap:6px !important; padding-left:10px !important; padding-right:10px !important; }
  html[data-theme] body nav > div > div:first-child{ flex:1 1 auto; min-width:0; gap:8px !important; }
  html[data-theme] body nav > div > div:last-child{ flex:0 0 auto; flex-wrap:nowrap !important; gap:6px !important; }
  html[data-theme] body nav h1{ font-size:1.2rem !important; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; }
  html.in-game[data-theme] body nav h1{ display:none !important; }
  html[data-theme] body nav #logoLetter{ width:2.5rem !important; height:2.5rem !important; flex:0 0 auto; }
  html[data-theme] body nav #menuBtn, html[data-theme] body nav #themeBtn, html[data-theme] body nav #backBtn:not(.hidden){
    display:inline-flex !important; flex-direction:column; align-items:center; justify-content:center; gap:2px;
    min-width:56px; min-height:56px !important; padding:4px 6px !important; line-height:1.1; font-size:1.25rem !important; }
  html[data-theme] body nav #menuBtn::after{ content:attr(data-w-label); font-size:13px; font-weight:800; }
  html[data-theme] body nav #themeBtn .w-tl{ font-size:13px; font-weight:800; }
  html[data-theme] body nav #backBtn:not(.hidden){ font-size:14px !important; max-width:92px; white-space:normal; text-align:center; }
  html[data-theme] body nav #levelIndicator{ min-height:40px !important; font-size:.95rem !important; display:inline-flex; align-items:center; padding:4px 8px !important; }
  html[data-theme] body nav #levelIndicator.hidden, html[data-theme] body nav #personalBest.hidden{ display:none !important; }
  html[data-theme] body nav #personalBest{ display:none !important; }
  html[data-theme] body #gameMenu{ top:74px !important; max-height:calc(100dvh - 74px - 12px) !important; }
}
/* ☰ panel (2026-10-12, iPhone 390x844): the list could not scroll. The panel's inline overflow:hidden beat the old
   overflow-y:auto, and the list's max-height was 'none' on phones, so a 1,790 px list was clipped by a 754 px panel while
   the page scrolled behind it. Now the panel is a bounded flex column (header, tools and search keep their height) and
   only the list scrolls, inside the panel. */
html[data-theme] body #gameMenu:not(.hidden){ display:flex; flex-direction:column; max-height:calc(100dvh - 64px - 12px); }
html[data-theme] body #gameMenu > *{ flex-shrink:0; }
html[data-theme] body #gameMenu > #gameMenuList{ flex:1 1 auto; min-height:0; max-height:none !important; overflow-y:auto !important;
  -webkit-overflow-scrolling:touch; overscroll-behavior:contain; }
/* the tools grid inside the ☰ menu (phones only; empty and hidden on wider screens) */
#w-tools{ display:none; }
html.w-phone-head #w-tools{ display:block; padding:12px 14px 4px; border-bottom:2px solid var(--w-line); }
html.w-phone-head #w-tools .w-lang{ display:flex; align-items:center; gap:10px; margin-bottom:10px; font-weight:800; font-size:1.05rem; color:var(--w-ink); }
html.w-phone-head #w-tools .w-lang label{ white-space:nowrap; }
html.w-phone-head #w-tools #langSelect{ flex:1; min-height:52px !important; font-size:1.05rem !important; border-radius:12px !important;
  border:2px solid var(--w-line) !important; background:var(--w-card) !important; color:var(--w-ink) !important; padding:4px 10px !important; max-width:none !important; }
html.w-phone-head #w-tools .w-grid{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin-bottom:10px; }
html.w-phone-head #w-tools .w-grid > *{ display:flex !important; flex-direction:column; align-items:center; justify-content:center; gap:2px;
  min-height:64px; border-radius:12px !important; border:2px solid var(--w-line) !important; background:var(--w-card) !important;
  color:var(--w-ink) !important; font-size:1.3rem !important; padding:6px 4px !important; cursor:pointer; }
html.w-phone-head #w-tools .w-grid > *::after{ content:attr(data-w-label); font-size:14px; font-weight:800; color:var(--w-ink); }
html.w-phone-head #w-tools #inviteBtn{ font-size:0 !important; }
html.w-phone-head #w-tools #inviteBtn::before{ content:"👥"; font-size:1.3rem; }
html.w-phone-head #w-tools #profile-chip .nm{ display:block !important; font-size:14px !important; font-weight:800; color:var(--w-ink) !important; max-width:100%; }
html.w-phone-head #w-tools #profile-chip .av{ font-size:1.3rem; }

/* ── hero + hub ── */
#hero{ background:transparent !important; border-bottom:2px solid var(--w-line) !important; }
#hero h2{ background:none !important; -webkit-text-fill-color:currentColor !important; color:var(--w-ink) !important; font-size:clamp(2rem,6vw,3rem) !important; }
#dailyQuote{ color:var(--w-ink2) !important; font-size:1.2rem !important; }
#greetingText{ color:var(--w-ink) !important; font-size:1.35rem !important; }
#streakText, #dailyGoalText, #totalGamesText{ color:var(--w-ink) !important; font-size:1.05rem !important; }
#why-train{ background:var(--w-card) !important; border:2px solid var(--w-line) !important; }
#why-train h3, #why-train h4{ background:none !important; -webkit-text-fill-color:currentColor !important; color:var(--w-ink) !important; }
#why-train p, #why-train div{ color:var(--w-ink2) !important; }
#why-train [style*="color:#f6c048"]{ color:var(--w-accent) !important; }
#homeScreen-header h2, #homeScreen-header h3{ color:var(--w-ink) !important; background:none !important; -webkit-text-fill-color:currentColor !important; font-size:1.9rem !important; }
#homeScreen-header p{ color:var(--w-ink2) !important; font-size:1.1rem !important; }

#homeScreen{ gap:22px !important; }
#homeScreen .premium-card{ background:var(--w-card) !important; border:2px solid var(--w-line) !important; border-radius:20px !important; overflow:hidden; box-shadow:0 10px 28px -12px rgba(0,0,0,.45) !important; }
#homeScreen .premium-card:hover{ border-color:var(--w-accent) !important; transform:translateY(-2px); }
#homeScreen .premium-card .thumbnail-container{ aspect-ratio:4/3; height:auto !important; }
#homeScreen .premium-card .thumbnail-img{ width:100%; height:100%; object-fit:cover; filter:saturate(1.08); }
#homeScreen .premium-card h3{ color:var(--w-ink) !important; font-size:1.4rem !important; line-height:1.25 !important; }
#homeScreen .premium-card p{ color:var(--w-ink2) !important; font-size:1.05rem !important; line-height:1.45 !important; }
#homeScreen .premium-card .btn-premium{ min-height:56px; font-size:1.2rem !important; border-radius:14px !important; background:var(--w-accent) !important; color:var(--w-on-accent) !important; border:0 !important; }
#homeScreen .premium-card a.w-page{ display:inline-flex; align-items:center; min-height:52px; padding:4px 2px; margin-top:8px; font-size:1rem; font-weight:700; color:var(--w-ink); text-decoration:underline; text-underline-offset:3px; }
@media (max-width:639px){
  #homeScreen{ grid-template-columns:1fr !important; gap:16px !important; }
  /* 4:3 on phones too (2026-10-10): the card pictures are now framed screenshots; 16:9 cut half the game off */
  #homeScreen .premium-card .thumbnail-container{ aspect-ratio:4/3; }
}

/* the all-games list: every game's own page, linked from the hub */
#all-games{ max-width:1100px; margin:36px auto 24px; padding:22px; background:var(--w-card); border:2px solid var(--w-line); border-radius:20px; color:var(--w-ink); }
#all-games h3{ font-size:1.5rem; font-weight:800; margin:0 0 14px; }
#all-games ul{ list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:8px 18px; }
#all-games li{ display:flex; align-items:center; gap:10px; min-height:48px; border-bottom:1px solid var(--w-line); }
#all-games .ag-page{ flex:1; color:var(--w-ink); font-weight:700; font-size:1.1rem; text-decoration:underline; text-underline-offset:3px; }
#all-games .ag-play{ flex:0 0 auto; padding:8px 14px; border-radius:10px; background:var(--w-accent); color:var(--w-on-accent); font-weight:800; text-decoration:none; }
html.in-game #all-games{ display:none; }

/* ── inside a game: a warm "table", the game's own photo on top, big readable text ── */
#gameView > div{ background:var(--w-table) !important; color:var(--w-table-ink); border:3px solid var(--w-table-line) !important; border-radius:24px !important; padding:0 !important; }
/* the game's photo is a soft, light band at the top that fades into the ivory table; the title sits on the light
   part in dark ink (2026-10-09: no dark photo headers) */
#gameView > div > div:first-child{ position:relative; margin:0 0 16px !important; padding:26px 20px 16px !important; border-bottom:0 !important; min-height:140px;
  display:flex; flex-direction:column; justify-content:flex-end; color:var(--w-table-ink); border-radius:21px 21px 0 0;
  background:linear-gradient(180deg,rgba(255,250,241,.30) 0%,rgba(255,250,241,.80) 45%,var(--w-table) 92%), var(--game-photo, none) center 35%/cover no-repeat, #f4e3c6 !important; }
#gameView #gameTitle{ color:var(--w-table-ink) !important; font-size:clamp(1.9rem,5vw,2.6rem) !important; text-shadow:0 1px 0 rgba(255,250,241,.9); background:none !important; -webkit-text-fill-color:var(--w-table-ink) !important; }
#gameView #gameInstructions{ color:var(--w-table-ink2) !important; font-size:1.2rem !important; font-weight:600; text-shadow:none; }
#gameView #gameContent{ padding:0 18px 26px; color:var(--w-table-ink); font-size:1.15rem; }
#gameView #gameContent .text-gray-400, #gameView #gameContent .text-gray-500{ color:var(--w-table-ink2) !important; }
#gameView #gameContent .text-gray-600, #gameView #gameContent .text-gray-700, #gameView #gameContent .text-gray-800, #gameView #gameContent .text-slate-800{ color:var(--w-table-ink) !important; }
@media (min-width:768px){ #gameView > div > div:first-child{ min-height:180px; padding:40px 40px 20px !important; } #gameView #gameContent{ padding:0 40px 32px; } }

/* answer buttons in the quiz-style games (the games draw them with border-gray-200 / border-blue-200): four warm
   colours, dark text, centred, big. A button the game has marked right / wrong loses those classes and gets the
   feedback rules below instead. */
:is(html[data-game="trivia"],html[data-game="math"],html[data-game="flags"],html[data-game="proverbs"],html[data-game="numseq"],html[data-game="counting"],html[data-game="clock"],html[data-game="category"],html[data-game="letters"]) #gameContent :is(button.border-gray-200,button.border-blue-200){ text-align:center !important; min-height:64px; color:var(--w-q-ink) !important; border-width:3px !important; font-weight:800 !important; }
:is(html[data-game="trivia"],html[data-game="math"],html[data-game="flags"],html[data-game="proverbs"],html[data-game="numseq"],html[data-game="counting"],html[data-game="clock"],html[data-game="category"],html[data-game="letters"]) #gameContent :is(button.border-gray-200,button.border-blue-200):nth-child(4n+1){ background:var(--w-q1) !important; border-color:var(--w-q1b) !important; }
:is(html[data-game="trivia"],html[data-game="math"],html[data-game="flags"],html[data-game="proverbs"],html[data-game="numseq"],html[data-game="counting"],html[data-game="clock"],html[data-game="category"],html[data-game="letters"]) #gameContent :is(button.border-gray-200,button.border-blue-200):nth-child(4n+2){ background:var(--w-q2) !important; border-color:var(--w-q2b) !important; }
:is(html[data-game="trivia"],html[data-game="math"],html[data-game="flags"],html[data-game="proverbs"],html[data-game="numseq"],html[data-game="counting"],html[data-game="clock"],html[data-game="category"],html[data-game="letters"]) #gameContent :is(button.border-gray-200,button.border-blue-200):nth-child(4n+3){ background:var(--w-q3) !important; border-color:var(--w-q3b) !important; }
:is(html[data-game="trivia"],html[data-game="math"],html[data-game="flags"],html[data-game="proverbs"],html[data-game="numseq"],html[data-game="counting"],html[data-game="clock"],html[data-game="category"],html[data-game="letters"]) #gameContent :is(button.border-gray-200,button.border-blue-200):nth-child(4n+4){ background:var(--w-q4) !important; border-color:var(--w-q4b) !important; }
/* right / wrong: strong colour AND a mark, so it does not depend on telling colours apart */
#gameContent button.bg-green-50, #gameContent button.bg-green-100{ background:var(--w-ok) !important; border-color:var(--w-ok) !important; color:#fff !important; }
#gameContent button.bg-red-50, #gameContent button.bg-red-100{ background:var(--w-bad) !important; border-color:var(--w-bad) !important; color:#fff !important; }
#gameContent button.bg-green-50::after, #gameContent button.bg-green-100::after{ content:"  ✓"; font-weight:900; }
#gameContent button.bg-red-50::after, #gameContent button.bg-red-100::after{ content:"  ✗"; font-weight:900; }

/* klondike: a green felt table (its controls and empty foundation slots are drawn light-on-dark; on the ivory
   game card they were white on white, on the live site too) */
html[data-game="klondike"] #gameContent{ background:radial-gradient(ellipse at 50% 30%,#2f7a4a 0%,#1d5534 70%,#163f27 100%); border-radius:18px; padding:18px 10px 22px; margin:0 12px 18px; }
html[data-game="klondike"] #gameContent .kl-btn{ background:#fff7e6 !important; color:#2b1b0d !important; border:2px solid #e8cfa8 !important; min-height:48px; font-size:1.05rem !important; font-weight:800 !important; }
html[data-game="klondike"] #gameContent .kl-count{ color:#fff6e8 !important; font-size:1.05rem !important; font-weight:700; }
html[data-game="klondike"] #gameContent .kl-slot{ border-color:rgba(255,255,255,.55) !important; background:rgba(255,255,255,.08) !important; }

/* phones: the board games did not fit 390px on the live site either (Sudoku lost its outer columns, Klondike showed
   5 of 7 piles). Less side padding, and boards sized to the card instead of to the viewport. */
@media (max-width:639px){
  html.in-game main{ padding-left:8px !important; padding-right:8px !important; }
  #gameView > div{ border-width:2px !important; }
  #gameView #gameContent{ padding:0 6px 20px; }
  html[data-game="sudoku"] #gameContent [style*="92vw"]{ width:100% !important; max-width:26rem; }
  html[data-game="klondike"] #gameContent{ margin:0 0 14px; padding:12px 4px 16px; }
  html[data-game="klondike"] #gameContent .kl-row{ gap:4px !important; }
  html[data-game="klondike"] #gameContent .kl-pile{ min-width:0 !important; width:calc((100% - 24px) / 7) !important; }
}

/* memory: plain warm card backs (no photo), an even grid that fits the cards, no empty band above or below */
html[data-game="memory"] #gameContent .card-face.bg-slate-700{ background:#b45309 !important; border:3px solid #92400e !important;
  color:#fff7e6 !important; font-size:2.2rem; box-shadow:inset 0 0 0 4px rgba(255,247,230,.35), 0 4px 10px rgba(80,40,0,.25) !important; }
html[data-game="memory"] #gameContent .card-back{ border-color:#92400e !important; }
html[data-game="memory"] #gameContent{ display:block !important; min-height:0 !important; padding-top:4px !important; padding-bottom:20px !important; }
html[data-game="memory"] #gameContent .mem-grid{ max-width:34rem; }
@media (min-width:768px){
  html[data-game="memory"] #gameContent .mem-grid{ grid-template-columns:repeat(var(--mem-cols,4),minmax(0,1fr)) !important; max-width:calc(var(--mem-cols,4) * 8.5rem); }
}

/* end-of-game modal */
#modal > div{ background:var(--w-table) !important; color:var(--w-table-ink) !important; border-top-color:var(--w-q1b) !important; border-radius:24px !important; }
#modal #modalTitle{ color:var(--w-table-ink) !important; font-size:2rem !important; }
#modal #modalBody{ color:var(--w-table-ink2) !important; font-size:1.25rem !important; }
#modal button{ min-height:56px; font-size:1.2rem !important; }
#modal #nextLevelBtn{ background:#b45309 !important; color:#fff !important; }

/* footer */
html[data-theme] body footer{ background:var(--w-bg2) !important; border-top:2px solid var(--w-line) !important; }
html[data-theme] body footer, html[data-theme] body footer *{ color:var(--w-ink2) !important; }
html[data-theme] body footer > div{ font-size:1.05rem; }

/* ── ads: the existing #adBar ticker shows on the hub and between games (end-of-game modal), never mid-game ── */
html.in-game:not(.between-games) #adBar{ display:none !important; }
html.in-game:not(.between-games) body{ padding-bottom:0 !important; }
#adBar{ background:var(--w-nav) !important; border-top:2px solid var(--w-line) !important; }
#adBar, #adBar *{ color:var(--w-ink) !important; }
#adBar #adX{ min-width:48px; min-height:48px; font-size:1.3rem; }
html.between-games #adBar{ z-index:60; }

@media (prefers-reduced-motion:reduce){ #homeScreen .premium-card:hover{ transform:none; } }

/* ── 2026-10-09 fixes ── */
/* no dark photo behind the page: dark theme = plain warm gradient; light theme = the photo only as a pale cream wash */
html:not([data-theme="light"]) #ambientBg .ab-layer{ display:none !important; }
html[data-theme="light"] #ambientBg .ab-scrim{ background:linear-gradient(180deg,rgba(251,243,228,.90),rgba(244,227,198,.95)) !important; }

/* light-mode readability: older light-theme rules out-ranked the warm ones; these win by specificity */
html[data-theme] body #hero h2, html[data-theme] body #why-train h3{ background:none !important; -webkit-background-clip:border-box !important; background-clip:border-box !important;
  -webkit-text-fill-color:var(--w-ink) !important; color:var(--w-ink) !important; }
html[data-theme] body #hero #dailyQuote{ color:var(--w-ink2) !important; }
html[data-theme] body #hero #greetingText, html[data-theme] body #hero #streakText, html[data-theme] body #hero #dailyGoalText, html[data-theme] body #hero #totalGamesText{ color:var(--w-ink) !important; }
html[data-theme] body #hero .streak-pill, html[data-theme] body #hero #retentionBar .rounded-full{ background:var(--w-card) !important; border:2px solid var(--w-line) !important; }
html[data-theme] body #brain-score-slot *{ color:var(--w-ink) !important; }
html[data-theme] body #brain-score-slot > *{ background:var(--w-card) !important; border:2px solid var(--w-line) !important; }
html[data-theme] body #why-train [style*="color:#f6c048"]{ color:var(--w-accent) !important; }
html[data-theme="light"] body #why-train [style*="color:#f6c048"]{ color:#92400e !important; }
/* the tip bar */
html[data-theme] body #tips-slot > *{ background:var(--w-card) !important; border:2px solid var(--w-line) !important; color:var(--w-ink) !important; }
html[data-theme] body #tips-slot #tips-text{ color:var(--w-ink) !important; font-size:1.05rem; }
/* the profile chip: always ink on a card colour, in both themes */
html[data-theme] body #profile-chip{ background:var(--w-card) !important; border:2px solid var(--w-line) !important; }
html[data-theme] body #profile-chip .nm{ color:var(--w-ink) !important; }
/* hub difficulty buttons */
html[data-theme] body .diff-btn{ color:var(--w-ink) !important; background:var(--w-card) !important; border:2px solid var(--w-line) !important; min-height:48px; font-weight:800; }
html[data-theme] body .diff-btn.active{ background:var(--w-accent) !important; color:var(--w-on-accent) !important; border-color:var(--w-accent) !important; }
html[data-theme] body #adBar #adX{ color:var(--w-ink) !important; }
/* jigsaw: its set-up screen was drawn for a dark page; on the ivory table the piece-count chips were near-invisible */
html[data-game="jigsaw"] #gameContent .jig-title{ color:var(--w-table-ink) !important; }
html[data-game="jigsaw"] #gameContent .jig-label, html[data-game="jigsaw"] #gameContent .jig-diffhint, html[data-game="jigsaw"] #gameContent .jig-diffhint b{ color:var(--w-table-ink2) !important; font-size:1.05rem; }
html[data-game="jigsaw"] #gameContent .jig-chip{ color:var(--w-table-ink) !important; background:#fff !important; border:3px solid var(--w-table-line) !important;
  min-width:56px; min-height:56px; font-size:1.25rem !important; font-weight:800 !important; box-shadow:none !important; }
html[data-game="jigsaw"] #gameContent .jig-chip.active{ background:#b45309 !important; border-color:#92400e !important; color:#fff !important; }
html[data-theme] body #homeScreen .why-line{ color:var(--w-ink2) !important; }

/* ── 2026-10-09 round 3: one icon family (Lucide, js/icons.js) instead of keyboard emoji ── */
.lc{ display:inline-block; pointer-events:none; flex-shrink:0; vertical-align:-0.2em; }  /* Tailwind preflight makes svg display:block */
.lc-ui{ margin-inline-end:.15em; }      /* never the click target (the ☰ outside-click check compares e.target) */
.lc-sym{ display:inline-flex; align-items:center; justify-content:center; color:var(--c); line-height:0; vertical-align:middle; }
.lc-sym svg{ width:100%; height:100%; }
/* memory: deep amber back with a cream frame and the brain mark; faces are big icons on white */
html[data-game="memory"] #gameContent .mem-back{ background:linear-gradient(145deg,#c2410c,#92400e) !important; color:#fde7c4 !important;
  border:3px solid #7c2d12 !important; box-shadow:inset 0 0 0 5px #b45309, inset 0 0 0 7px rgba(253,231,196,.6), 0 4px 10px rgba(80,40,0,.25) !important; }
html[data-game="memory"] #gameContent .mem-face .lc-sym{ width:66%; height:66%; }
/* odd one out */
#gameContent .odd-tile{ border:2px solid #e7d3b0 !important; }
#gameContent .odd-tile .lc-sym{ width:74%; height:74%; }
/* quick count */
#gameContent .cnt-field{ display:flex; flex-wrap:wrap; justify-content:center; gap:10px 14px; font-size:clamp(2.1rem,7vw,2.7rem); line-height:1; }
#gameContent .cnt-q{ font-size:1.6em; vertical-align:-0.35em; }
/* picture recall */
#gameContent .rc-ic{ font-size:2.8rem; line-height:0; padding:4px 0; }
/* time journey: white icons in a soft disc on the coloured scene cards */
#gameContent .ls-ic{ display:inline-flex; align-items:center; justify-content:center; width:1.6em; height:1.6em; border-radius:50%;
  background:rgba(255,255,255,.18); color:#fff; }
#gameContent .ls-ic .lc{ width:62%; height:62%; }
/* hero brain mark, the end-of-game mark and the games-menu icons */
.w-hero-mark, .w-modal-mark{ display:inline-flex; align-items:center; justify-content:center; border-radius:50%; color:#b45309;
  background:#fff3e0; border:2px solid #f0c27a; }
.w-hero-mark{ width:84px; height:84px; font-size:48px; margin-bottom:.5rem; }
.w-modal-mark{ width:96px; height:96px; font-size:54px; }
html:not([data-theme="light"]) .w-hero-mark{ color:#f6c048; background:rgba(246,192,72,.12); border-color:rgba(246,192,72,.45); }
.w-menu-ic{ color:#b45309; line-height:0; }
html:not([data-theme="light"]) .w-menu-ic{ color:#f6c048; }
html[data-theme] body #homeScreen .why-line .lc-why{ color:var(--w-accent); }
html[data-theme] body nav button .lc{ font-size:1.1rem; }

/* shape sorter: solid shapes sized to the tile */
#gameContent .shp{ display:inline-flex; width:72%; height:72%; line-height:0; }
#gameContent .shp-slot{ display:inline-flex; align-items:center; justify-content:center; width:100%; height:100%; }
#gameContent .shp-slot .shp{ width:72%; height:72%; }
#gameContent .shp .lc{ width:100%; height:100%; }
/* favourite heart on the card photo: white outline, solid red once saved */
#homeScreen .pin-btn{ color:#fff !important; }
#homeScreen .pin-btn.pinned{ color:#f87171 !important; }
/* safari: the "Find the …" line was amber-300 on the ivory table */
html[data-game="safari"] #gameContent #sf-task{ color:var(--w-table-ink) !important; }
html[data-game="safari"] #gameContent .text-green-400{ color:#15803d !important; }

/* light background, settled (round 3): no ambient photo in either theme. The pale wash left grey smudges of the old
   dark photo behind the cards; a plain warm gradient is cleaner on desktop and phone. */
#ambientBg .ab-layer{ display:none !important; }

/* daily challenge strip: its game buttons were pale amber on light amber (unreadable in light mode) */
html[data-theme] body #daily-challenge-banner{ background:var(--w-card) !important; border:2px solid var(--w-line) !important; }
html[data-theme] body #daily-challenge-banner span[style*="color:#f6c048"]{ color:var(--w-accent) !important; font-size:1rem !important; }
html[data-theme] body #daily-challenge-banner .dc-game-pill{ color:var(--w-ink) !important; background:var(--w-bg) !important; border:2px solid var(--w-line) !important;
  font-size:1rem !important; font-weight:700; padding:8px 14px !important; min-height:44px; display:inline-flex; align-items:center; gap:6px; }
html[data-theme] body #daily-challenge-banner .dc-game-pill.done{ border-color:#15803d !important; }
html[data-theme] body #daily-challenge-banner .dc-game-pill.done .lc{ color:#15803d; }
html[data-theme] body #daily-challenge-banner #dc-stars{ color:#a16207; }
html[data-theme] body #daily-challenge-banner #dc-stars + div{ color:var(--w-ink2) !important; }

/* footer links row (2026-10-10): About · Privacy · Cookie settings, 48px targets, readable in both themes */
footer .w-footlinks{ margin-top:.25rem; font-size:1.05rem; }
footer .w-footlinks a, footer .w-footlinks button{ display:inline-flex; align-items:center; min-height:48px; padding:0 .4rem;
  font:inherit; font-weight:700; text-decoration:underline; text-underline-offset:3px; color:inherit; background:none; border:0; cursor:pointer; }
/* memory (2026-10-10): opacity below 1 on the 3D-flipping card flattens it, and Chromium then showed a MATCHED card's
   back (the brain) instead of its picture - so found pairs looked unturned. The card stays opaque; only the picture is
   softened, and the green "found" frame comes from the existing .matched rules. */
#gameContent .card-inner.matched{ opacity:1 !important; }
#gameContent .card-inner.matched .mem-face{ opacity:.92; }
/* first visit (2026-10-10): the cookie banner and the small welcome card both sit at the bottom. The welcome card
   waits (it stays on the page, hidden) until the visitor has answered the banner, then appears as before. */
html.show--consent .pw-card{ display:none !important; }
/* hub sections for the games added from 2026-10 (tools/new_games.json): a heading row spanning the grid. order:99
   matches the unpinned cards (js/favorites.js), so a section stays together with its cards. */
#homeScreen .w-sec{ margin:26px 0 2px; padding:14px 4px 0; scroll-margin-top:96px; border-top:3px solid var(--w-accent); }
#homeScreen .w-sec-h{ font-size:clamp(1.45rem,3.2vw,1.9rem); font-weight:900; color:var(--w-ink); margin:0 0 4px; line-height:1.2; }
#homeScreen .w-sec-p{ font-size:1.1rem; color:var(--w-ink2); margin:0; }
/* Jigsaw (2026-10-10 review): after Start the board and tray took their natural ~474px width inside a 354px card on a
   390px phone, so pieces and buttons were cut off with no way to reach them. Everything now shrinks to the card. */
html[data-game="jigsaw"] #gameContent{ min-width:0; }
html[data-game="jigsaw"] #gameContent .jig-wrap,
html[data-game="jigsaw"] #gameContent .jig-layout{ width:100%; max-width:100%; min-width:0; box-sizing:border-box; }
html[data-game="jigsaw"] #gameContent .jig-board{ width:100%; max-width:520px; min-width:0; }
html[data-game="jigsaw"] #gameContent .jig-tray{ width:100%; box-sizing:border-box; grid-template-columns:repeat(auto-fill,minmax(min(84px,26%),1fr)); }
html[data-game="jigsaw"] #gameContent .jig-progress{ width:100%; }
@media (min-width:820px){ html[data-game="jigsaw"] #gameContent .jig-board{ flex:1 1 520px; } html[data-game="jigsaw"] #gameContent .jig-tray{ width:auto; flex:0 1 340px; } }
/* the play area is the ivory table in both themes: the jigsaw's own light-on-dark colors (help/peek buttons, tip,
   tray) were near-invisible on it. Dark ink and a cream button, like the rest of the site. */
html[data-game="jigsaw"] #gameContent .jig-act-c{ background:#fff7e6; color:#3b1d0e; border:2px solid #b45309; box-shadow:0 2px 0 #b45309; }
html[data-game="jigsaw"] #gameContent .jig-act.on{ background:#f59e0b; color:#2a1700; border-color:#92400e; }
html[data-game="jigsaw"] #gameContent .jig-tip,
html[data-game="jigsaw"] #gameContent .jig-tray-head{ color:var(--w-table-ink); font-size:1.05rem; opacity:.9; }
html[data-game="jigsaw"] #gameContent .jig-count{ color:#92400e; }
html[data-game="jigsaw"] #gameContent .jig-bar{ background:rgba(59,29,14,.15); }
html[data-game="jigsaw"] #gameContent .jig-tray{ background:rgba(59,29,14,.06); border-color:rgba(59,29,14,.18); }
html[data-game="jigsaw"] #gameContent .jig-piece{ background:#fffdf7; border-color:rgba(59,29,14,.2); }
html[data-game="jigsaw"] #gameContent .jig-board{ background:rgba(59,29,14,.06); box-shadow:0 10px 30px -12px rgba(59,29,14,.45),inset 0 0 0 2px rgba(59,29,14,.15); }

/* hub top (2026-10-10 review): Continue + favorites + genre chips first; the health block sits below the games */
#hub-nav{ display:flex; flex-direction:column; gap:12px; }
#hub-nav .hn-quick{ display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
#hub-nav .hn-continue{ min-height:56px; padding:10px 22px; border-radius:16px; border:0; background:var(--w-accent); color:var(--w-on-accent); font-weight:900; font-size:1.2rem; cursor:pointer; display:inline-flex; align-items:center; gap:8px; box-shadow:0 4px 0 rgba(0,0,0,.18); }
#hub-nav .hn-favs{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
#hub-nav .hn-label{ font-weight:800; color:var(--w-ink); display:inline-flex; align-items:center; gap:4px; }
#hub-nav .hn-fav{ min-height:48px; padding:6px 16px; border-radius:999px; border:2px solid var(--w-accent); background:var(--w-card); color:var(--w-ink); font-weight:800; font-size:1.05rem; cursor:pointer; }
#hub-nav .hn-chips{ display:flex; flex-wrap:wrap; gap:8px; }
#hub-nav .hn-chip{ min-height:52px; padding:8px 20px; border-radius:999px; border:2px solid var(--w-line); background:var(--w-card); color:var(--w-ink); font-weight:800; font-size:1.1rem; cursor:pointer; }
#hub-nav .hn-chip[aria-pressed="true"]{ background:var(--w-ink); color:var(--w-bg, #fff); border-color:var(--w-ink); }
#hub-nav-empty{ font-size:1.2rem; font-weight:700; color:var(--w-ink2); padding:20px 4px; }
#why-train-wrap{ max-width:1100px; margin:0 auto 30px; padding:0 16px; }
html.in-game #why-train-wrap{ display:none; }

/* ── Batch 1 (draft): compact in-game header on tablets and laptops ──
   Between 640 and 1500 px the header wrapped into 2-3 rows (134 px at 1265 wide, about 200 px in a real laptop
   browser) and stayed pinned, so about a quarter of the screen was header while playing. In a game the secondary
   buttons (invite, profile) go back to the hub and menu; text size, sound, theme, language and Back stay. */
@media (min-width:640px) and (max-width:1500px){
  html.in-game[data-theme] body nav{ padding-top:6px !important; padding-bottom:6px !important; }
  html.in-game[data-theme] body nav #inviteBtn,
  html.in-game[data-theme] body nav #profile-chip{ display:none !important; }
  html.in-game[data-theme] body nav #langSelect{ width:auto !important; max-width:9rem; }
}
@media (min-width:900px) and (max-width:1500px){
  html.in-game[data-theme] body nav > div{ flex-wrap:nowrap !important; }
  html.in-game[data-theme] body nav > div > div:first-child{ flex:0 0 auto; }
  html.in-game[data-theme] body nav > div > div:last-child{ flex:0 1 auto; min-width:0; flex-wrap:wrap !important; justify-content:flex-end; gap:8px !important; }
}
@media (min-width:640px) and (max-width:899px){
  /* on tablets in portrait the header still needs 2-3 rows: let it scroll away instead of staying pinned */
  html.in-game[data-theme] body nav{ position:static !important; }
}

/* ── Batch 1 (draft): small motion cues, all off when the visitor asks for reduced motion ── */
@keyframes bp-pop{0%{transform:scale(1)}45%{transform:scale(1.18)}100%{transform:scale(1)}}
@keyframes bp-slide-in{from{opacity:0;transform:translateY(-14px)}to{opacity:1;transform:none}}
.ws-cell.found{ animation:bp-pop .45s ease-out 1; }
.hz .hz-trick .gk-card{ animation:bp-slide-in .28s ease-out 1; }
@media (prefers-reduced-motion:reduce){
  .ws-cell.found, .hz .hz-trick .gk-card{ animation:none !important; }
}

/* ── Batch 1 (draft): Memory Match uses illustrated pairs and a printed card back ── */
html[data-game="memory"] #gameContent .mem-back{ background:#0f4c52 url(../images/art/back-sq.webp) center/cover no-repeat !important; border:3px solid #f3e3bf !important;
  box-shadow:0 4px 10px rgba(60,30,0,.35) !important; }
html[data-game="memory"] #gameContent .mem-face{ padding:0 !important; overflow:hidden; background:#f6ead0 !important; border:3px solid #f3e3bf !important; }
html[data-game="memory"] #gameContent .mem-face .mem-art{ width:100%; height:100%; object-fit:cover; display:block; border-radius:inherit; pointer-events:none; }
html[data-game="memory"] #gameContent .card-inner.matched .card-face.card-back{ background:#f6ead0 !important; border-color:#2f9e66 !important; box-shadow:0 0 0 4px rgba(47,158,102,.55), 0 4px 12px rgba(0,0,0,.25) !important; }
/* Batch 1 (draft): in-page jumps clear the sticky header */
html{ scroll-padding-top:84px; }

/* ── Batch 1 (draft): table surfaces, printed card backs, desk scenes for the other four games ── */
html[data-game] .pw-card{ display:none !important; } /* first-visit name card no longer covers a game board; it still shows on the hub */
/* Hearts + Klondike: green felt table with walnut rim, burgundy printed card back */
html[data-game="hearts"] .gk-table, html[data-game="klondike"] .gk-table{ background:#1c5a38 url(../images/art/felt.jpg) center/cover no-repeat !important;
  border:3px solid #6b3f1d !important; box-shadow:inset 0 0 40px rgba(0,0,0,.35), 0 10px 30px -14px rgba(0,0,0,.55) !important; border-radius:22px !important; }
.gk-card.gk-down, .kl-card.kl-down, .hz-fan .gk-down{ background:#5a1220 url(../images/art/back-card.webp) center/cover no-repeat !important; border:2px solid #f3e3bf !important; }
html[data-game="klondike"] .kl-card.kl-up, html[data-game="hearts"] .gk-card:not(.gk-down){ background:#fffaf0 !important; border:1px solid #d9c8a3; }
/* Crossword: newsprint desk with glasses, pencil and coffee; the grid sits on a cream sheet */
html[data-game="crossword"] #gameContent{ background:#f3e4c4 url(../images/art/paper.jpg) center/cover no-repeat; border-radius:18px; padding:18px 12px; }
html[data-game="crossword"] #gameContent .cw-grid{ box-shadow:0 8px 22px rgba(60,35,10,.35); border:3px solid #2b1b0d; }
/* Word Search: letterpress workshop desk, tiles on a warm board */
html[data-game="wordsearch"] #gameContent{ background:#a9722f url(../images/art/letters.jpg) center/cover no-repeat; border-radius:18px; padding:18px 12px; }
html[data-game="wordsearch"] #gameContent .ws-cell{ background:#fff7e4 !important; color:#2a1a0c !important; border:2px solid #b98a4a !important; box-shadow:0 2px 0 #9a6f35; }
html[data-game="wordsearch"] #gameContent .ws-cell.found{ background:#2f9e66 !important; color:#fff !important; border-color:#1f7a4c !important; }
html[data-game="wordsearch"] #gameContent .ws-cell.selected{ background:#f6b545 !important; color:#2a1700 !important; }
html[data-game="wordsearch"] #gameContent > div > div:first-child{ background:rgba(120,70,20,.88) !important; border-color:#5a3512 !important; }
.hz .hz-fan i{ background:#5a1220 url(../images/art/back-card.webp) center/cover no-repeat !important; }
html[data-game="klondike"] .kl-board{ background:#1c5a38 url(../images/art/felt.jpg) center/cover no-repeat; border:3px solid #6b3f1d; border-radius:22px; padding:12px; box-shadow:inset 0 0 40px rgba(0,0,0,.35); }
html[data-game="klondike"] #gameContent *:has(> .kl-board){ background:#1c5a38 url(../images/art/felt.jpg) center/cover no-repeat; border-radius:22px; }
html[data-game="klondike"] .kl-board{ background:none; border:0; box-shadow:none; }

/* ── Muse originals (draft): navy/cream ornamental card back, Queen of Spades portrait, softer crossword desk ── */
.gk-card.gk-down, .kl-card.kl-down, .hz .hz-fan i{ background:#10213f url(../images/art/muse-back.webp) center/cover no-repeat !important; border:2px solid #f3e3bf !important; }
/* Queen of Spades: portrait fills the face; rank and suit sit on a cream plate so they stay readable. Shows only on a card the player can already see. */
.gk-card.gk-up[aria-label="Q♠"]{ background:#fffaf0 url(../images/art/muse-queen.webp) center 30%/cover no-repeat !important; }
.gk-card.gk-up[aria-label="Q♠"] .gk-s{ display:none; }
.gk-card.gk-up[aria-label="Q♠"] .gk-tl{ background:rgba(255,250,240,.96); border-radius:6px; padding:0 3px; position:relative; z-index:1; box-shadow:0 0 0 1px rgba(60,40,10,.25); }
html[data-game="crossword"] #gameContent{ background:linear-gradient(rgba(250,240,215,.88),rgba(250,240,215,.88)), url(../images/art/muse-desk.webp) center/cover no-repeat !important; }
html[data-game="hearts"] .gk-card.gk-up[aria-label="Q♠"]{ background:#fffaf0 url(../images/art/muse-queen.webp) center 32%/cover no-repeat !important; }

/* ── batch 2: Muse scenes (original AI generated, decorative, no text) ──
   header band for games that had no photo; same soft fade into the table as the photo band above */
html[data-game="dominoes"] #gameView, html[data-game="checkers"] #gameView{ --game-photo:url(../images/art/scene-tabletop.webp) !important; }
html[data-game="fifteen"] #gameView, html[data-game="g2048"] #gameView, html[data-game="nonogram"] #gameView, html[data-game="minesweeper"] #gameView{ --game-photo:url(../images/art/scene-numbers.webp) !important; }
html[data-game="cryptoquote"] #gameView, html[data-game="wordladder"] #gameView{ --game-photo:url(../images/art/scene-library.webp) !important; }
html[data-game="crossword"] #gameView{ --game-photo:url(../images/art/scene-worddesk.webp) !important; }
html[data-game="lifesim"] #gameView{ --game-photo:url(../images/art/scene-journey.webp) !important; }
:is(html[data-game="dominoes"],html[data-game="checkers"],html[data-game="fifteen"],html[data-game="g2048"],html[data-game="nonogram"],html[data-game="minesweeper"],html[data-game="cryptoquote"],html[data-game="wordladder"],html[data-game="crossword"],html[data-game="lifesim"]) #gameView > div > div:first-child{
  background:linear-gradient(180deg,rgba(255,250,241,.20) 0%,rgba(255,250,241,.88) 42%,var(--w-table) 88%), var(--game-photo, none) center 40%/cover no-repeat, #f4e3c6 !important; }
/* home page: the picture sits left (light theme), the words sit on its cream side; phones get the picture as a band above the words */
html[data-theme="light"] #hero{ background:linear-gradient(90deg,rgba(248,239,221,0) 0%,rgba(248,239,221,0) 30%,rgba(248,239,221,.9) 47%,rgba(248,239,221,.9) 100%), url(../images/art/hero-home.webp) left center/cover no-repeat, #f8efdd !important; }
@media (min-width:900px){ html[data-theme="light"] #hero > .container{ margin-left:45%; width:55%; max-width:none; } }
@media (max-width:899px){ html[data-theme="light"] #hero{ background:linear-gradient(180deg,rgba(248,239,221,0) 0,rgba(248,239,221,0) 150px,#f8efdd 215px), url(../images/art/hero-home.webp) center top/auto 215px no-repeat, #f8efdd !important; padding-top:170px !important; } }
html[data-game="crossword"] #gameView > div > div:first-child{ background-position:center 28%, center 28%, 0 0 !important; }
/* Time Journey intro line: the page set it pale grey (text-gray-200) for a dark background, but the table is ivory */
html[data-game="lifesim"] #gameContent p.text-gray-200{ color:var(--w-table-ink) !important; }
/* ── batch 3: Muse scenes for the games that still had no header photo (original AI generated, decorative, no text).
   The card stack is blank and face down; the case, pegs and still life are props, not the game's board or state. ── */
:is(html[data-game="hearts"],html[data-game="freecell"],html[data-game="spider"],html[data-game="ginrummy"],html[data-game="gofish"],html[data-game="crazy8"]) #gameView{ --game-photo:url(../images/art/scene-cards.webp) !important; }
html[data-game="backgammon"] #gameView{ --game-photo:url(../images/art/scene-backgammon.webp) !important; }
html[data-game="mastermind"] #gameView{ --game-photo:url(../images/art/scene-pegs.webp) !important; }
html[data-game="spotdiff"] #gameView{ --game-photo:url(../images/art/scene-still.webp) !important; }
:is(html[data-game="hearts"],html[data-game="freecell"],html[data-game="spider"],html[data-game="ginrummy"],html[data-game="gofish"],html[data-game="crazy8"],html[data-game="backgammon"],html[data-game="mastermind"],html[data-game="spotdiff"]) #gameView > div > div:first-child{
  background:linear-gradient(180deg,rgba(255,250,241,.20) 0%,rgba(255,250,241,.88) 42%,var(--w-table) 88%), var(--game-photo, none) center 50%/cover no-repeat, #f4e3c6 !important; }
html[data-game="backgammon"] #gameView > div > div:first-child{ background-position:center 0, center 62%, 0 0 !important; }
html[data-game="mastermind"] #gameView > div > div:first-child{ background-position:center 0, center 72%, 0 0 !important; }
html[data-game="spotdiff"] #gameView > div > div:first-child{ background-position:center 0, center 58%, 0 0 !important; }
:is(html[data-game="hearts"],html[data-game="freecell"],html[data-game="spider"],html[data-game="ginrummy"],html[data-game="gofish"],html[data-game="crazy8"]) #gameView > div > div:first-child{ background-position:center 0, center 80%, 0 0 !important; }
/* ── batch 4 (art04): one original header each for FreeCell, Spider, Gin Rummy and Go Fish (AI generated, decorative, no text,
   blank cards only). Hearts and Crazy Eights keep the shared card scene. The boards stay code-rendered.
   Spider's picture is 2:1 (the others 3:1): it is never stretched, only cropped by the band, so each game sets its own focus. ── */
html[data-game="freecell"] #gameView{ --game-photo:url(../images/art/scene-freecell.webp) !important; }
html[data-game="spider"] #gameView{ --game-photo:url(../images/art/scene-spider.webp) !important; }
html[data-game="ginrummy"] #gameView{ --game-photo:url(../images/art/scene-ginrummy.webp) !important; }
html[data-game="gofish"] #gameView{ --game-photo:url(../images/art/scene-gofish.webp) !important; }
html[data-game="freecell"] #gameView > div > div:first-child{ background-position:center 0, 0% 20%, 0 0 !important; }
html[data-game="spider"] #gameView > div > div:first-child{ background-position:center 0, 0% 12%, 0 0 !important; }
html[data-game="ginrummy"] #gameView > div > div:first-child{ background-position:center 0, 100% 55%, 0 0 !important; }
html[data-game="gofish"] #gameView > div > div:first-child{ background-position:center 0, 0% 85%, 0 0 !important; }
/* Go Fish on phones: the picture's subject (rod, reeds, water, cards) sits at its bottom, exactly where the shared fade is
   almost opaque, so only faint reeds showed. Enlarge the art, bring the subject up into the lightly faded top of the band and
   use a lighter fade. The title and instructions keep dark ink; contrast is measured on the rendered pixels. */
@media (max-width:640px){
  html[data-game="gofish"] #gameView > div > div:first-child{
    background:linear-gradient(180deg,rgba(255,250,241,.06) 0%,rgba(255,250,241,.62) 46%,var(--w-table) 92%), var(--game-photo, none) 0 -130px/auto 215% no-repeat, #f4e3c6 !important; }
}

/* 2026-11 article-linked games: decorative headers only (ART-MAPPING.md); boards and rules stay in code */
html[data-game="patternworkshop"] #gameView{ --game-photo:url(../images/art/scene-garden.webp) !important; }
html[data-game="namegarden"] #gameView{ --game-photo:url(../images/art/scene-quiz.webp) !important; }
html[data-game="quietshelf"] #gameView{ --game-photo:url(../images/art/scene-still.webp) !important; }
html[data-game="daytown"] #gameView{ --game-photo:url(../images/art/scene-journey.webp) !important; }
:is(html[data-game="patternworkshop"],html[data-game="namegarden"],html[data-game="quietshelf"],html[data-game="daytown"]) #gameView > div > div:first-child{
  background:linear-gradient(180deg,rgba(255,250,241,.20) 0%,rgba(255,250,241,.88) 42%,var(--w-table) 88%), var(--game-photo, none) center 40%/cover no-repeat, #f4e3c6 !important; }
@media (max-width:640px){ :is(html[data-game="patternworkshop"],html[data-game="namegarden"],html[data-game="quietshelf"],html[data-game="daytown"]) #gameView > div > div:first-child{
  background:linear-gradient(180deg,rgba(255,250,241,.45) 0%,rgba(255,250,241,.82) 34%,var(--w-table) 88%), var(--game-photo, none) center 40%/cover no-repeat, #f4e3c6 !important; } }
/* 2026-11-04 Muse batch: decorative headers only (images/art/muse-provenance-batch4.json); boards and rules stay in code */
html[data-game="bingo"] #gameView{ --game-photo:url(../images/art/scene-bingo.webp) !important; }
html[data-game="moonland"] #gameView{ --game-photo:url(../images/art/scene-moonland.webp) !important; }
html[data-game="railyard"] #gameView{ --game-photo:url(../images/art/scene-railyard.webp) !important; }
html[data-game="salvo"] #gameView{ --game-photo:url(../images/art/scene-salvo.webp) !important; }
html[data-game="bingo"] #gameView > div > div:first-child{ background:linear-gradient(180deg,rgba(255,250,241,.20) 0%,rgba(255,250,241,.88) 42%,var(--w-table) 88%), var(--game-photo, none) center 30%/cover no-repeat, #f4e3c6 !important; }
html[data-game="moonland"] #gameView > div > div:first-child{ background:linear-gradient(180deg,rgba(255,250,241,.20) 0%,rgba(255,250,241,.88) 42%,var(--w-table) 88%), var(--game-photo, none) center 50%/cover no-repeat, #f4e3c6 !important; }
html[data-game="railyard"] #gameView > div > div:first-child{ background:linear-gradient(180deg,rgba(255,250,241,.20) 0%,rgba(255,250,241,.88) 42%,var(--w-table) 88%), var(--game-photo, none) center 60%/cover no-repeat, #f4e3c6 !important; }
html[data-game="salvo"] #gameView > div > div:first-child{ background:linear-gradient(180deg,rgba(255,250,241,.20) 0%,rgba(255,250,241,.88) 42%,var(--w-table) 88%), var(--game-photo, none) center 72%/cover no-repeat, #f4e3c6 !important; }
@media (max-width:640px){
html[data-game="bingo"] #gameView > div > div:first-child{ background:linear-gradient(180deg,rgba(255,250,241,.45) 0%,rgba(255,250,241,.82) 34%,var(--w-table) 88%), var(--game-photo, none) center 30%/cover no-repeat, #f4e3c6 !important; }
html[data-game="moonland"] #gameView > div > div:first-child{ background:linear-gradient(180deg,rgba(255,250,241,.45) 0%,rgba(255,250,241,.82) 34%,var(--w-table) 88%), var(--game-photo, none) center 50%/cover no-repeat, #f4e3c6 !important; }
html[data-game="railyard"] #gameView > div > div:first-child{ background:linear-gradient(180deg,rgba(255,250,241,.45) 0%,rgba(255,250,241,.82) 34%,var(--w-table) 88%), var(--game-photo, none) center 60%/cover no-repeat, #f4e3c6 !important; }
html[data-game="salvo"] #gameView > div > div:first-child{ background:linear-gradient(180deg,rgba(255,250,241,.45) 0%,rgba(255,250,241,.82) 34%,var(--w-table) 88%), var(--game-photo, none) center 72%/cover no-repeat, #f4e3c6 !important; }
}
/* ── 2026-11-04 review: the playing area is the priority. The game header (photo band + title + one-line rule) was
   140-180px tall and pushed boards such as Chess below an 800px-high laptop screen. Same look, less height;
   title and rule keep large type (title >= 1.6rem, rule 1.1rem). ── */
#gameView > div > div:first-child{ min-height:92px !important; padding:16px 16px 8px !important; margin:0 0 10px !important; }
@media (min-width:768px){ #gameView > div > div:first-child{ min-height:100px !important; padding:18px 32px 10px !important; } }
#gameView #gameTitle{ font-size:clamp(1.6rem,3.6vw,2.3rem) !important; line-height:1.15 !important; margin:0 !important; }
#gameView #gameInstructions{ font-size:1.1rem !important; line-height:1.35 !important; margin-top:4px !important; }
/* hub search (2026-11): a big, plain search box above the chips; the count is read out as it changes */
#hub-nav .hn-search{ margin:0 0 12px; }
#hub-nav .hn-qrow{ display:flex; gap:8px; flex-wrap:wrap; margin-top:4px; }
#hub-nav #hn-q{ flex:1 1 16rem; min-width:0; min-height:56px; padding:10px 16px; font-size:1.2rem; border:2px solid var(--w-line); border-radius:14px; background:var(--w-card); color:var(--w-ink); }
#hub-nav #hn-q:focus{ outline:3px solid #f59e0b; outline-offset:2px; }
#hub-nav .hn-clear{ min-height:56px; padding:8px 18px; border-radius:14px; border:2px solid var(--w-line); background:var(--w-card); color:var(--w-ink); font-weight:800; font-size:1.05rem; cursor:pointer; }
#hub-nav .hn-count{ margin:6px 2px 0; font-weight:700; font-size:1.05rem; color:var(--w-ink); opacity:.85; }
.hn-empty{ font-size:1.2rem; font-weight:700; text-align:center; padding:24px 8px; }

/* 2026-11-15: the dismissible notice belongs to document flow, not over content.
   A taller translated notice or text-size setting now pushes later content down. */
html body #adBar{position:relative!important;inset:auto!important;height:auto!important;min-height:52px;box-sizing:border-box;transform:none!important;transition:none!important;z-index:auto!important;flex-shrink:0;}
html body #adBar.closed{display:none!important;}
