.games-page {
    --g-bg: #001232;
    --g-surface: #102445;
    --g-text: #f4f7fb;
    --g-muted: #b5c5da;
    --g-line: #405576;
    --g-accent: #31d7a9;
    --g-accent-text: #00271d;
    --g-soft: #193953;
    --g-kids: #19294d;
    margin: 0;
    background: var(--g-bg);
    color: var(--g-text);
    font: 16px/1.7 "Segoe UI", "Arial", "DejaVu Sans", sans-serif;
    color-scheme: dark;
}
.white-mode .games-page {
    --g-bg: #f5f7fb;
    --g-surface: #fff;
    --g-text: #18283e;
    --g-muted: #52627a;
    --g-line: #c6cfdd;
    --g-accent: #126b56;
    --g-accent-text: #fff;
    --g-soft: #e8f6f1;
    --g-kids: #f0edff;
    color-scheme: light;
}
.games-page *, .games-page *::before, .games-page *::after { box-sizing: border-box; }
.games-page h1, .games-page h2, .games-page h3, .games-page p { margin: 0; }
.games-page h1, .games-page h2, .games-page h3 { line-height: 1.45; overflow-wrap: anywhere; }
.games-page button, .games-page select, .games-page input { font: inherit; }
.games-page button, .games-page a, .games-page select { -webkit-tap-highlight-color: transparent; }
.games-page a { color: inherit; text-decoration: none; }
.games-page button { cursor: pointer; }
.games-page button:disabled { cursor: default; opacity: .75; }
.games-page :focus-visible { outline: 3px solid #7384ff; outline-offset: 4px; }
.games-page [hidden] { display: none !important; }
.games-header, .games-container, .games-footer { width: min(1320px, calc(100% - 64px)); margin-inline: auto; }
.games-container--play { width: min(900px, calc(100% - 64px)); }
.games-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 100px; border-bottom: 1px solid var(--g-line); }
.games-brand { display: inline-flex; align-items: center; gap: 18px; }
.games-brand picture { display: flex; align-items: center; }
.games-brand img { object-fit: contain; max-width: 170px; height: auto; }
.games-brand-label { font-size: 12px; letter-spacing: .18em; font-weight: 800; padding: 4px 12px; border: 1px solid var(--g-line); border-radius: 30px; }
.games-header-actions { display: flex; align-items: center; gap: 14px; }
.games-languages { display: flex; align-items: center; gap: 4px; }
.games-languages a { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 44px; border-radius: 10px; font-size: 13px; font-weight: 700; }
.games-languages a[aria-current="page"] { color: var(--g-accent); background: var(--g-soft); }
.game-tutorial { padding: 16px; margin-bottom: 24px; border: 1px solid var(--g-line); border-radius: 16px; background: var(--g-soft); }
.game-tutorial summary { cursor: pointer; font-weight: 700; min-height: 36px; }
.game-instructions { margin: 12px 0; padding: 0 14px; border: 1px solid var(--g-line); border-radius: 12px; background: var(--g-soft); }
.game-instructions summary { cursor: pointer; min-height: 44px; padding: 8px 0; font-weight: 700; }
.game-instructions[open] { padding-bottom: 14px; }
.game-instructions p + p { margin-top: 10px; }
.game-demo-caption { color: var(--g-muted); font-size: 14px; text-align: center; margin: 4px 0 16px !important; }
.game-demo { display: flex; align-items: center; justify-content: center; gap: 14px; padding-bottom: 26px; min-height: 108px; }
.game-demo-sample { font-size: 34px; font-weight: 800; white-space: nowrap; }
.game-demo-arrow { font-size: 26px; color: var(--g-accent); }
.game-demo-choices { display: flex; gap: 7px; }
.game-demo-option { position: relative; display: grid; place-items: center; min-width: 42px; min-height: 48px; padding: 5px; border: 2px solid var(--g-line); border-radius: 10px; background: var(--g-surface); font-size: 25px; }
.game-demo-correct { border-color: var(--g-accent); animation: game-demo-match 4s ease-in-out infinite; }
.game-demo-hand { position: absolute; bottom: -28px; font-size: 29px; animation: game-demo-tap 4s ease-in-out infinite; }
.game-demo-check { position: absolute; top: -12px; right: -8px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: #fff; background: #126b56; font-size: 17px; animation: game-demo-match 4s ease-in-out infinite; }
.game-target-number, .game-target-letter { display: block; width: fit-content; min-width: 120px; margin: 12px auto; padding: 6px 20px; background: var(--g-soft); color: var(--g-accent); font-size: 76px; font-weight: 800; line-height: 1.4; border-radius: 22px; }
.game-target-arrow { display: block; color: var(--g-accent); font-size: 32px; line-height: 1.4; }
.game-letter-answer { font-size: 40px; font-weight: 700; line-height: 1.3; }
.game-target-swatch { width: 105px !important; height: 105px !important; margin-block: 20px !important; }
.game-target-shape { transform: scale(1.35); margin-block: 34px !important; }
@keyframes game-demo-tap { 0%, 20% { transform: translateY(12px); opacity: .3; } 45%, 100% { transform: translateY(0); opacity: 1; } }
@keyframes game-demo-match { 0%, 35% { opacity: .55; } 55%, 100% { opacity: 1; } }
.games-header .ts-theme-toggle { color: var(--g-text); border: 1px solid var(--g-line); background: var(--g-surface); }
.games-skip { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; z-index: 20; background: var(--g-surface); }
.games-skip:focus { position: fixed; top: 10px; left: 20px; width: auto; height: auto; padding: 12px 20px; overflow: visible; clip-path: none; }
.games-hero { display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; gap: 30px; padding: 48px 0 38px; }
.games-eyebrow { color: var(--g-accent); font-size: 13px; font-weight: 800; letter-spacing: .035em; margin-bottom: 12px !important; }
.games-hero h1 { font-size: clamp(36px, 4.5vw, 62px); font-weight: 800; letter-spacing: -.04em; }
.games-hero h1 span { color: var(--g-accent); }
.games-lead { font-size: clamp(20px, 2.1vw, 27px); margin-top: 15px !important; }
.games-hero-note { color: var(--g-muted); margin-top: 10px !important; }
.games-hero-art { width: 100%; max-height: 275px; object-fit: contain; }
.games-halloween-feature { display: grid; grid-template-columns: 280px 1fr; align-items: center; gap: 24px; padding: 16px 36px; margin: 12px 0 44px; border-radius: 26px; color: #fff; background: radial-gradient(ellipse at 12% 80%, #643a66, transparent 55%), linear-gradient(120deg, #17182e, #302144); border: 1px solid #956b9955; }
.games-halloween-feature picture { display: block; }
.games-halloween-feature img { display: block; width: 100%; height: auto; }
.games-halloween-feature h2 { font-size: clamp(25px, 3vw, 36px); margin-bottom: 10px; }
.games-halloween-feature p { color: #e5def2; max-width: 690px; }
.games-halloween-feature .games-eyebrow { color: #ffce86; }
.games-halloween-feature .games-button { margin-top: 18px; background: #ffc276; color: #352015; min-width: 150px; }
.halloween-hud { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; font-size: 18px; font-weight: 700; }
.halloween-hearts { color: #c84462; letter-spacing: 4px; }
.halloween-legend { display: flex; flex-wrap: wrap; gap: 10px 20px; margin: 18px 0; color: var(--g-muted); font-size: 14px; }
.halloween-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.halloween-stage { position: relative; width: min(100%, 640px); margin: 20px auto; }
.halloween-canvas { display: block; width: 100%; height: auto; min-height: 260px; object-fit: contain; aspect-ratio: 10/7; border-radius: 20px; background: #161527; touch-action: none; }
.halloween-overlay { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; gap: 12px; text-align: center; padding: 24px; border-radius: 20px; background: #141326eb; color: #fff; }
.halloween-overlay h2 { color: #ffd899; margin: 0; }
.halloween-overlay p { max-width: 410px; font-size: 15px; }
.games-page .halloween-overlay .games-button { background: #ffc276; color: #352015; }
.halloween-controls { display: flex; justify-content: center; gap: 24px; }
.halloween-controls button { min-width: 110px; min-height: 58px; font-size: 26px; touch-action: none; user-select: none; }
.halloween-controls button[aria-pressed="true"] { border-color: var(--g-accent); background: var(--g-soft); }
.halloween-status { min-height: 32px; margin-top: 12px !important; color: var(--g-accent); text-align: center; font-weight: 700; }
.halloween-shield { padding: 4px 12px; border-radius: 20px; background: var(--g-soft); color: var(--g-accent); font-size: 14px; }
.games-section { margin: 12px 0 48px; }
.games-section--kids { padding: 30px; background: var(--g-kids); border-radius: 28px; }
.games-section-heading { display: flex; gap: 15px; align-items: center; margin-bottom: 24px; }
.games-section-heading h2 { font-size: clamp(23px, 2.4vw, 29px); }
.games-section-heading p { color: var(--g-muted); margin-top: 4px; }
.games-section-number { display: grid; place-items: center; width: 46px; height: 46px; flex-shrink: 0; border-radius: 15px; background: var(--g-soft); color: var(--g-accent); font-weight: 800; }
.games-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.games-card { min-width: 0; border: 1px solid var(--g-line); border-radius: 22px; overflow: hidden; background: var(--g-surface); display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease; }
.games-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px #00123216; }
.games-card-art { position: relative; background: #e6e9ff; }
.games-card-art img { display: block; width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; }
.games-tag { position: absolute; bottom: 12px; left: 12px; background: #ffffffed; color: #24334a; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.games-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; align-items: stretch; }
.games-card h3 { font-size: 19px; margin-bottom: 16px; }
.games-button, .games-secondary { display: inline-flex; justify-content: center; align-items: center; gap: 12px; border: 1px solid transparent; border-radius: 12px; min-height: 48px; padding: 11px 20px; font-weight: 700; line-height: 1.5; text-align: center; }
.games-page .games-button { color: var(--g-accent-text); background: var(--g-accent); }
.games-page .games-secondary { background: var(--g-surface); border-color: var(--g-line); color: var(--g-text); }
.games-card .games-button { justify-content: space-between; margin-top: auto; }
.games-footer { padding: 26px 0 34px; color: var(--g-muted); text-align: center; font-size: 13px; }
.games-back { display: inline-flex; min-height: 48px; align-items: center; color: var(--g-muted) !important; margin-top: 22px; }
.games-play-heading { text-align: center; margin: 25px auto; max-width: 780px; }
.games-play-heading h1 { font-size: clamp(27px, 3vw, 40px); margin-bottom: 10px; }
.games-play-heading > p:last-child { color: var(--g-muted); }
.games-play { max-width: 900px; margin: 0 auto 45px; padding: 32px; background: var(--g-surface); border: 1px solid var(--g-line); border-radius: 24px; }
.games-container--play .games-play { width: 100%; }
.games-page .halloween-shield[hidden] { display: flex !important; visibility: hidden; }
.games-play h2 { font-size: clamp(21px, 2.5vw, 28px); margin-bottom: 18px; }
.game-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.game-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.game-controls label { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; max-width: 100%; }
.game-controls select { max-width: 100%; min-height: 48px; border-radius: 10px; border: 1px solid var(--g-line); padding: 8px 12px; background: var(--g-surface); color: var(--g-text); }
.game-muted { color: var(--g-muted); }
.game-progress { height: 7px; border-radius: 6px; background: var(--g-soft); overflow: hidden; margin-bottom: 24px; }
.game-progress > span { display: block; height: 100%; background: var(--g-accent); transition: width .2s; }
.game-question { text-align: center; padding: 18px 0; }
.game-question > h2[data-question]:focus-visible { outline: none; }
.game-emoji { display: block; font-size: clamp(40px, 7vw, 67px); letter-spacing: .08em; line-height: 1.6; margin-bottom: 20px; }
.game-answers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 24px; }
.game-answer { min-height: 64px; border: 2px solid var(--g-line); border-radius: 14px; background: var(--g-surface); color: var(--g-text); padding: 14px; overflow-wrap: anywhere; font-weight: 700; transition: background .15s; }
.game-answer:hover:not(:disabled) { background: var(--g-soft); border-color: var(--g-accent); }
.game-answer.is-correct { border-color: #16835f; background: #ddf7e9; color: #124632; }
.game-answer.is-wrong { border-color: #ba5d34; background: #fff0df; color: #723710; }
.game-feedback { min-height: 64px; padding-top: 16px; font-weight: 700; }
.game-next { margin-top: 14px; }
.game-result { text-align: center; padding: 35px 0; }
.game-result-icon { display: block; font-size: 64px; margin-bottom: 16px; }
.game-result p { margin: 14px 0 24px; }
.game-objects { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 470px; margin: 16px auto; font-size: 34px; }
.game-objects > span { width: 38px; }
.memory-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; max-width: 600px; margin: 20px auto; }
.memory-grid--large { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.memory-card { aspect-ratio: 1; min-height: 54px; background: var(--g-soft); border: 2px solid var(--g-line); border-radius: 15px; font-size: clamp(24px, 4vw, 38px); color: var(--g-accent); }
.memory-card.is-open { background: var(--g-surface); border-color: #7384ff; }
.memory-card.is-matched { border-color: #16835f; background: #ddf7e9; color: #124632; }
.memory-card { position:relative; overflow:hidden; padding:0; aspect-ratio:2/3; }
.memory-card:disabled { opacity:1; }
.memory-card-back, .memory-card-front { position:absolute; inset:0; display:grid; place-items:center; }
.memory-card-back { align-content:center; gap:10px; padding:6px; }
.memory-card-back .games-icon { width:34px; height:34px; }
.memory-card-back > span { font-size:10px; line-height:1.3; font-weight:700; letter-spacing:.02em; }
.memory-card-front { background:var(--g-surface); animation:memory-poster-reveal .18s ease-out; }
.memory-card-front img { display:block; width:100%; height:100%; object-fit:contain; pointer-events:none; user-select:none; }
.memory-image-fallback { display:grid; place-items:center; width:100%; height:100%; color:var(--g-accent); background:var(--g-soft); font-size:36px; font-weight:800; }
.memory-card.is-matched::after { content:""; position:absolute; inset:0; border:3px solid #16835f; border-radius:12px; pointer-events:none; }
.memory-loading { min-height:160px; display:grid; place-items:center; padding:24px; color:var(--g-muted); text-align:center; }
.memory-source-note { font-size:13px; margin-top:8px !important; }
@keyframes memory-poster-reveal { from { opacity:.4; transform:scale(.96); } to { opacity:1; transform:scale(1); } }
.alphabet-browser { text-align: center; margin: 22px 0; }
.alphabet-letter { color: var(--g-accent); font-size: clamp(60px, 10vw, 96px); font-weight: 800; }
.alphabet-picture { font-size: 75px; }
.alphabet-word { font-size: 28px; margin: 12px 0 !important; }
.alphabet-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; margin-top: 24px; }
.alphabet-grid button { min-height: 48px; padding: 4px; font-size: 18px; }
.alphabet-grid button[aria-pressed="true"] { border-color: var(--g-accent); background: var(--g-soft); }
.shape { display: block; width: 68px; height: 68px; margin: 0 auto 12px; background: var(--shape-color, #5268d4); }
.shape--circle { border-radius: 50%; }
.shape--triangle { clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.shape--rectangle { width: 92px; height: 54px; margin-top: 14px; }
.shape--square { border-radius: 2px; }
.color-swatch { display: block; width: 65px; height: 65px; border-radius: 50%; border: 2px solid #18283e55; margin: 0 auto 12px; background: var(--shape-color); }
.puzzle-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 24px; align-items: start; }
.puzzle-board, .puzzle-tray { display: grid; grid-template-columns: repeat(var(--puzzle-size), minmax(0, 1fr)); gap: 3px; width: 100%; aspect-ratio: 1; }
.puzzle-slot { min-width: 0; padding: 0; background: var(--g-soft); border: 1px dashed var(--g-line); border-radius: 4px; }
.puzzle-piece { padding: 0; min-width: 0; aspect-ratio: 1; border: 2px solid transparent; border-radius: 4px; background-repeat: no-repeat; touch-action: none; }
.puzzle-piece[aria-pressed="true"] { outline: 3px solid #7384ff; outline-offset: 1px; }
.puzzle-slot.is-filled { border: 0; background-repeat: no-repeat; }
.puzzle-slot.is-target { outline: 3px solid var(--g-accent); }
.puzzle-preview { display: block; width: min(100%, 350px); margin: 20px auto; border-radius: 16px; }
.puzzle-caption { text-align: center; margin: 10px 0 !important; color: var(--g-muted); }
.runner-stage { position: relative; margin: 20px auto; max-width: 600px; }
.runner-canvas { display: block; width: 100%; aspect-ratio: 3/2; border-radius: 18px; background: #071b36; touch-action: pan-y; }
.runner-overlay { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; text-align: center; padding: 25px; border-radius: 18px; background: #071b36e8; color: #fff; gap: 14px; }
.runner-overlay p { max-width: 400px; }
.runner-touch { display: flex; justify-content: center; gap: 24px; margin-top: 18px; }
.runner-touch button { min-width: 100px; min-height: 58px; font-size: 24px; touch-action: manipulation; }
.games-noscript { padding: 20px; text-align: center; }
.games-icon-definitions { position: absolute; overflow: hidden; pointer-events: none; }
.games-icon { display: inline-block; width: 24px; height: 24px; flex: 0 0 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.games-page { position: relative; isolation: isolate; background: radial-gradient(ellipse at 4% 12%, #4b46c81a, transparent 42%), radial-gradient(ellipse at 95% 58%, #13b99b1c, transparent 38%), var(--g-bg); }
.games-page::before, .games-page::after { content: ""; position: fixed; width: 420px; height: 420px; border-radius: 50%; pointer-events: none; z-index: -1; animation: games-orb-drift 24s ease-in-out infinite alternate; }
.games-page::before { top: 12%; left: -220px; background: radial-gradient(circle, #6b57ef33, #6b57ef00 70%); }
.games-page::after { top: 56%; right: -210px; background: radial-gradient(circle, #11b99538, #11b99500 70%); animation-delay: -12s; }
.games-hero-visual { position: relative; width: 100%; }
.games-hero-art { filter: saturate(1.4) drop-shadow(0 16px 22px #3e568525); animation: games-art-float 8s ease-in-out infinite; }
.games-hero-spark { position: absolute; display: grid; place-items: center; width: 52px; height: 52px; border: 1px solid var(--g-line); border-radius: 17px; background: var(--g-surface); color: var(--g-accent); box-shadow: 0 8px 22px #18283e1c; animation: games-art-float 6s ease-in-out infinite; }
.games-hero-spark--one { top: 10%; left: 3%; color: #9770e6; }
.games-hero-spark--two { top: 30%; right: 1%; animation-delay: -2s; }
.games-hero-spark--three { bottom: 2%; right: 19%; color: #d97630; animation-delay: -4s; }
.games-section-number { border: 1px solid var(--g-line); box-shadow: 0 5px 15px #1b927018; }
.games-section--kids { background: linear-gradient(135deg, var(--g-kids), var(--g-soft)); border: 1px solid var(--g-line); }
.games-card { border-color: var(--g-line); box-shadow: 0 4px 14px #142b4510; }
.games-card:hover { transform: translateY(-6px); box-shadow: 0 16px 34px #142b4528; border-color: var(--g-accent); }
.games-card-art { --art-a: #7062eb; --art-b: #ae72eb; overflow: hidden; isolation: isolate; background: linear-gradient(130deg, var(--art-a), var(--art-b)); }
.games-card-art--movie { --art-a: #7e67f0; --art-b: #bc80ed; }
.games-card-art--music { --art-a: #ff946b; --art-b: #ffce62; }
.games-card-art--instruments { --art-a: #f4af53; --art-b: #ffd981; }
.games-card-art--songs { --art-a: #aa6eec; --art-b: #f589bf; }
.games-card-art--memory { --art-a: #4c9eeb; --art-b: #48d6cf; }
.games-card-art--run { --art-a: #35c49a; --art-b: #a5df65; }
.games-card-art--numbers { --art-a: #ffc958; --art-b: #ff9274; }
.games-card-art--alphabet { --art-a: #c18aef; --art-b: #f18fb5; }
.games-card-art--puzzle { --art-a: #5bd5bf; --art-b: #6ccce7; }
.games-card-art--shapes { --art-a: #84a1f2; --art-b: #c38bee; }
.games-card-art::before { content: ""; position: absolute; width: 135px; height: 135px; right: -24px; top: -35px; border: 2px dashed #ffffff65; border-radius: 50%; animation: games-ring-turn 25s linear infinite; pointer-events: none; }
.games-card-art img { position: relative; mix-blend-mode: multiply; filter: saturate(1.45) contrast(1.04); animation: games-card-float 7s ease-in-out infinite; }
.games-card-art--instruments img { animation-name: games-instruments-float; }
.games-card-art--sweet { --art-a:#ffd78d; --art-b:#ffb47e; }
.games-card-art--sweet img { mix-blend-mode:normal; filter:saturate(1.06) drop-shadow(0 8px 12px #9b4d2b22); }
.games-card:nth-child(2) .games-card-art img { animation-delay: -1.5s; }
.games-card:nth-child(3) .games-card-art img { animation-delay: -3s; }
.games-card:nth-child(4) .games-card-art img { animation-delay: -4.5s; }
.games-card h3 { display: flex; align-items: flex-start; gap: 9px; }
.games-card h3 > span { min-width: 0; }
.games-card h3 > .games-icon { width: 22px; height: 26px; flex-basis: 22px; color: var(--g-accent); }
.games-tag { z-index: 1; box-shadow: 0 3px 10px #17223c1a; }
.games-page .games-button { background: linear-gradient(120deg, var(--g-accent), #15967c); box-shadow: 0 4px 12px #14957326; transition: transform .2s ease, box-shadow .2s ease; }
.white-mode .games-page .games-button { background: linear-gradient(120deg, #08795f, #075c70); }
.games-page .games-button:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 9px 22px #14957335; }
.games-button .games-icon { transition: transform .2s ease; }
.games-button:hover .games-icon { transform: translateX(3px); }
.games-halloween-feature picture { animation: games-art-float 8s ease-in-out infinite; }
.games-page .games-halloween-feature .games-button, .games-page .halloween-overlay .games-button { background: linear-gradient(120deg, #ffc276, #ffb657); color: #352015; box-shadow: 0 5px 18px #e4a24424; }
.halloween-hearts { display: inline-flex; align-items: center; gap: 4px; letter-spacing: 0; }
.halloween-hearts .is-filled { fill: currentColor; }
.halloween-hearts .is-empty { opacity: .45; }
.halloween-shield { display: flex; width: fit-content; align-items: center; gap: 8px; }
.halloween-legend .games-icon { width: 23px; height: 23px; flex-basis: 23px; color: var(--g-accent); }
.halloween-result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 100%; }
.halloween-result-actions .games-button { padding: 10px 14px; font-size: 14px; }
.halloween-challenge { display: flex; align-items: center; gap: 12px; margin-bottom: 20px !important; padding: 14px 18px; color: var(--g-accent); background: var(--g-soft); border: 1px solid var(--g-line); border-radius: 14px; font-weight: 700; }
.halloween-share-panel { margin-top: 18px; padding: 16px; background: var(--g-soft); border-radius: 14px; }
.halloween-share-panel label { display: block; margin-bottom: 10px; color: var(--g-text); }
.halloween-share-panel textarea { display: block; width: 100%; min-height: 110px; padding: 12px; border: 1px solid var(--g-line); border-radius: 10px; color: var(--g-text); background: var(--g-surface); font: inherit; resize: vertical; }
.halloween-progress { margin-top:12px; }
.halloween-progress > div { display:flex; align-items:center; justify-content:space-between; gap:12px; color:var(--g-muted); font-size:13px; }
.halloween-progress strong { color:var(--g-accent); font-variant-numeric:tabular-nums; }
.halloween-progress progress { display:block; width:100%; height:8px; margin-top:6px; border:0; border-radius:8px; overflow:hidden; accent-color:var(--g-accent); }
.halloween-progress progress::-webkit-progress-bar { background:var(--g-soft); border-radius:8px; }
.halloween-progress progress::-webkit-progress-value { background:var(--g-accent); border-radius:8px; }
.halloween-progress progress::-moz-progress-bar { background:var(--g-accent); border-radius:8px; }
.games-page .halloween-milestone { position:absolute; top:12px; left:12px; right:12px; z-index:2; margin:0; padding:10px 14px; border:1px solid #ffc27680; border-radius:12px; background:#291d36ed; color:#ffe0a5; text-align:center; font-size:14px; pointer-events:none; box-shadow:0 5px 20px #100b2a44; }
.halloween-tools { display:flex; align-items:flex-start; gap:12px; margin-top:12px; padding-top:8px; border-top:1px solid var(--g-line); }
.games-page--halloween .halloween-tools .game-instructions { flex:1; min-width:0; border:0; margin:0; padding:0; }
.halloween-tools > button { flex:0 0 44px; width:44px; min-height:44px; padding:9px; }
.halloween-victory-mark { position:relative; z-index:1; display:grid; place-items:center; width:66px; height:66px; border:1px solid #ffcd7c80; border-radius:50%; background:#ffb85c1f; color:#ffd886; box-shadow:0 0 30px #ffb65e33; }
.halloween-victory-mark .games-icon { width:40px; height:40px; }
.halloween-overlay.is-celebrating > h2, .halloween-overlay.is-celebrating > p, .halloween-overlay.is-celebrating > .halloween-result-actions { position:relative; z-index:1; }
.halloween-confetti { position:absolute; inset:0; overflow:hidden; border-radius:inherit; pointer-events:none; }
.halloween-confetti i { position:absolute; left:var(--left); top:-16px; width:8px; height:14px; border-radius:2px; background:var(--color); opacity:0; animation:halloween-confetti-fall 4s var(--delay) ease-out forwards; }
@keyframes halloween-confetti-fall { 0% { transform:translateY(0) rotate(0); opacity:1; } 85% { opacity:1; } 100% { transform:translateY(600px) rotate(var(--turn)); opacity:0; } }
@media (max-width:600px) { .halloween-victory-mark { width:48px; height:48px; } .halloween-victory-mark .games-icon { width:30px; height:30px; } }
@media (prefers-reduced-motion:reduce) { .halloween-confetti { display:none; } }
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
    .games-hero h1 span { background: linear-gradient(110deg, var(--g-accent), #a171ee, var(--g-accent)); background-size: 200% auto; background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; animation: games-title-flow 12s linear infinite; }
}
@keyframes games-art-float { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-9px) rotate(1deg); } }
@keyframes games-card-float { 0%, 100% { transform: translateY(1px) rotate(-.7deg); } 50% { transform: translateY(-4px) rotate(.7deg); } }
@keyframes games-instruments-float { 0%, 100% { transform: translateY(1px); } 50% { transform: translateY(-3px); } }
@keyframes games-ring-turn { to { transform: rotate(360deg); } }
@keyframes games-orb-drift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(65px, -65px, 0); } }
@keyframes games-title-flow { to { background-position: 200% center; } }
/* Each game has a local palette and a visual motif related to its subject. */
.games-page.games-page--guess-movie { --g-bg:#170f16; --g-surface:#2b1b26; --g-text:#fff4de; --g-muted:#d7bdc8; --g-line:#72515b; --g-accent:#ffc46a; --g-accent-text:#321a0b; --g-soft:#402732; }
.white-mode .games-page.games-page--guess-movie { --g-bg:#fbf0e4; --g-surface:#fffcf7; --g-text:#3b2130; --g-muted:#735466; --g-line:#d2b9bc; --g-accent:#923f39; --g-accent-text:#fffaf2; --g-soft:#f6e3df; }
.games-page.games-page--music-quiz { --g-bg:#18150f; --g-surface:#30251c; --g-text:#fff2d8; --g-muted:#d8c5a6; --g-line:#766044; --g-accent:#efc174; --g-accent-text:#30200c; --g-soft:#443523; }
.white-mode .games-page.games-page--music-quiz { --g-bg:#fcf4e4; --g-surface:#fffaf0; --g-text:#473126; --g-muted:#7a624c; --g-line:#d8bf93; --g-accent:#86501f; --g-accent-text:#fffaf0; --g-soft:#f7e9ce; }
.games-page.games-page--songs-quiz { --g-bg:#170f2c; --g-surface:#291c45; --g-text:#fff2ff; --g-muted:#d7bfe8; --g-line:#78608d; --g-accent:#efa1dc; --g-accent-text:#34122e; --g-soft:#402856; }
.white-mode .games-page.games-page--songs-quiz { --g-bg:#f9efff; --g-surface:#fffaff; --g-text:#462350; --g-muted:#795287; --g-line:#d2b4df; --g-accent:#873c8e; --g-accent-text:#fff8ff; --g-soft:#f2dff7; }
.games-page.games-page--memory { --g-bg:#0c2228; --g-surface:#15363e; --g-text:#ecfcff; --g-muted:#b4d4db; --g-line:#54818d; --g-accent:#77e4d7; --g-accent-text:#083d3a; --g-soft:#214a53; }
.white-mode .games-page.games-page--memory { --g-bg:#eaf8f8; --g-surface:#faffff; --g-text:#214c56; --g-muted:#4c707c; --g-line:#9dc9cf; --g-accent:#116a71; --g-accent-text:#fff; --g-soft:#d4eeee; }
.games-page.games-page--ticket-run { --g-bg:#0a172f; --g-surface:#132b49; --g-text:#eef8ff; --g-muted:#b7cde5; --g-line:#557ca3; --g-accent:#7dd9ff; --g-accent-text:#07324b; --g-soft:#203e60; }
.white-mode .games-page.games-page--ticket-run { --g-bg:#eaf4ff; --g-surface:#fcfeff; --g-text:#173f65; --g-muted:#4a6987; --g-line:#acc6df; --g-accent:#175c9b; --g-accent-text:#fff; --g-soft:#dceeff; }
.games-page.games-page--numbers { --g-bg:#102238; --g-surface:#1a3550; --g-text:#fff9e1; --g-muted:#bfd6e9; --g-line:#5f8aa7; --g-accent:#ffcd69; --g-accent-text:#493004; --g-soft:#294c67; }
.white-mode .games-page.games-page--numbers { --g-bg:#edf8ff; --g-surface:#fffdf6; --g-text:#28495c; --g-muted:#526c80; --g-line:#a9cbd9; --g-accent:#81501c; --g-accent-text:#fff9ed; --g-soft:#fff0c8; }
.games-page.games-page--armenian-alphabet { --g-bg:#281a19; --g-surface:#392a25; --g-text:#fff4db; --g-muted:#dbc4ac; --g-line:#8c6f54; --g-accent:#ffc28a; --g-accent-text:#48230e; --g-soft:#4e382a; }
.white-mode .games-page.games-page--armenian-alphabet { --g-bg:#fff2e4; --g-surface:#fffdf7; --g-text:#56372c; --g-muted:#7a6052; --g-line:#d8bd9f; --g-accent:#94452f; --g-accent-text:#fffaf1; --g-soft:#fce7ce; }
.games-page.games-page--puzzle { --g-bg:#0e261d; --g-surface:#1a392b; --g-text:#f0ffe9; --g-muted:#c0d9ba; --g-line:#628765; --g-accent:#b6e28a; --g-accent-text:#253c16; --g-soft:#2b4f36; }
.white-mode .games-page.games-page--puzzle { --g-bg:#f0f8e8; --g-surface:#fffff7; --g-text:#365136; --g-muted:#5c7656; --g-line:#b3cea1; --g-accent:#4a7024; --g-accent-text:#fff; --g-soft:#e4efcf; }
.games-page.games-page--colors-shapes { --g-bg:#271a33; --g-surface:#3c2948; --g-text:#fff3f9; --g-muted:#dfc4db; --g-line:#997498; --g-accent:#ffb3c7; --g-accent-text:#502438; --g-soft:#563951; }
.white-mode .games-page.games-page--colors-shapes { --g-bg:#fff0f5; --g-surface:#fffaff; --g-text:#56334f; --g-muted:#7d6076; --g-line:#d4b7cf; --g-accent:#92375e; --g-accent-text:#fff; --g-soft:#f7dfeb; }
.games-page[class*="games-page--"]:not(.games-page--halloween) { background: radial-gradient(ellipse at 8% 15%, var(--g-soft), transparent 60%), var(--g-bg); }
.games-page[class*="games-page--"]:not(.games-page--halloween)::before, .games-page[class*="games-page--"]:not(.games-page--halloween)::after { background:radial-gradient(circle,var(--g-soft),transparent 70%); }
.games-page[class*="games-page--"] .games-brand-label { color:var(--g-accent); background:var(--g-soft); border-color:var(--g-line); }
.games-page[class*="games-page--"]:not(.games-page--halloween) .games-button { background:var(--g-accent); color:var(--g-accent-text); box-shadow:0 6px 18px #15162b17; }
.games-page[class*="games-page--"]:not(.games-page--halloween) .games-play { border-color:var(--g-line); box-shadow:0 16px 48px #15162b18; }
.game-heading-mark { display:grid; place-items:center; width:66px; height:66px; margin:0 auto 14px; color:var(--g-accent); background:var(--g-soft); border:1px solid var(--g-line); border-radius:22px; box-shadow:0 7px 18px #162e4815; }
.game-heading-mark .games-icon { width:36px; height:36px; }
.games-page--guess-movie .games-play { border-left:8px dashed var(--g-line); border-right:8px dashed var(--g-line); background:radial-gradient(ellipse at 50% 0%, var(--g-soft), transparent 65%),var(--g-surface); }
.games-page--guess-movie .game-toolbar { border-bottom:1px solid var(--g-line); padding-bottom:16px; }
.games-page--guess-movie .game-heading-mark { border-radius:12px; transform:rotate(-5deg); }
.games-page--music-quiz .game-heading-mark { position:relative; border-radius:18px; }
.games-page--music-quiz .game-heading-mark::before, .games-page--music-quiz .game-heading-mark::after { content:""; position:absolute; top:50%; width:44px; height:40px; transform:translateY(-50%); background:repeating-linear-gradient(transparent 0 7px,var(--g-line) 7px 8px); opacity:.65; pointer-events:none; }
.games-page--music-quiz .game-heading-mark::before { right:calc(100% + 12px); }
.games-page--music-quiz .game-heading-mark::after { left:calc(100% + 12px); }
.games-page--music-quiz .game-answer { border-radius:8px 18px 8px 18px; }
.games-page--songs-quiz .game-heading-mark { border-radius:50%; box-shadow:0 0 0 7px var(--g-bg),0 0 0 8px var(--g-line),0 0 28px #d769d044; }
.games-page--songs-quiz .games-play { border-top:4px solid var(--g-accent); background:linear-gradient(155deg,var(--g-soft),var(--g-surface) 55%); }
.games-page--songs-quiz .game-progress { height:10px; }
.games-page--songs-quiz::after { width:350px; height:200px; border-radius:0; background:repeating-linear-gradient(90deg,var(--g-soft) 0 12px,transparent 12px 20px); clip-path:polygon(0 90%,10% 65%,20% 80%,30% 20%,40% 50%,50% 0,60% 45%,70% 25%,80% 70%,90% 40%,100% 80%,100% 100%,0 100%); }
.games-page--songs-quiz .game-answer { border-radius:24px; }
.games-page--memory .games-play { background:radial-gradient(circle,var(--g-line) 1px,transparent 1px) 0 0/22px 22px,var(--g-surface); }
.games-page--memory .memory-card:not(.is-open):not(.is-matched) { background:repeating-linear-gradient(45deg,transparent 0 8px,var(--g-line) 8px 9px),var(--g-soft); box-shadow:3px 4px 0 var(--g-line); }
.games-page--ticket-run .games-play { background:linear-gradient(90deg,transparent 49.8%,var(--g-line) 50%,transparent 50.2%) 0 0/80px 100%,var(--g-surface); }
.games-page--ticket-run .runner-stage { box-shadow:0 0 0 5px var(--g-soft),0 0 0 6px var(--g-line); border-radius:18px; }
.games-page--numbers .game-heading-mark { border-radius:26px 14px; transform:rotate(5deg); }
.games-page--numbers .games-play { background:radial-gradient(circle,var(--g-soft) 4px,transparent 5px) 12px 12px/40px 40px,var(--g-surface); }
.games-page--numbers .game-answer { border-radius:24px; font-size:24px; }
.games-page--armenian-alphabet .games-play { background:repeating-linear-gradient(transparent 0 35px,var(--g-soft) 35px 36px),var(--g-surface); border-radius:8px 24px 24px 8px; border-left:8px solid var(--g-line); }
.games-page--armenian-alphabet .game-heading-mark { border-radius:8px 20px 20px 8px; }
.games-page--armenian-alphabet .alphabet-letter { text-shadow:3px 3px 0 var(--g-soft); }
.games-page--puzzle .games-play-heading { background:radial-gradient(ellipse,var(--g-soft),transparent 68%); }
.games-page--puzzle .game-heading-mark { border-radius:32px 16px 32px 16px; }
.games-page--puzzle .puzzle-board { border:4px solid var(--g-line); padding:6px; border-radius:16px; background:var(--g-soft); }
.games-page--colors-shapes .game-heading-mark { border-radius:50% 16px 50% 16px; background:linear-gradient(135deg,var(--g-soft) 50%,var(--g-surface) 50%); }
.games-page--colors-shapes .game-answer { box-shadow:0 4px 0 var(--g-line); }
.games-page--colors-shapes .game-sample { border-radius:22px; }
@media (max-width:600px) {
    .games-page--halloween .halloween-canvas, .games-page--ticket-run .runner-canvas { aspect-ratio: 10/11; min-height: 0; }
    .game-heading-mark { width:46px; height:46px; border-radius:16px; margin-bottom:8px; }
    .game-heading-mark .games-icon { width:28px; height:28px; }
    .games-page--guess-movie .games-play { border-left-width:4px; border-right-width:4px; }
}
/* Halloween has a night scene and its own warm light-theme variant. */
.games-page.games-page--halloween {
    --g-bg: #100d1c;
    --g-surface: #21182f;
    --g-text: #fff3e3;
    --g-muted: #c9bad5;
    --g-line: #59405f;
    --g-accent: #ffb45d;
    --g-accent-text: #29150b;
    --g-soft: #30213d;
    background: radial-gradient(ellipse at 12% 8%, #6d3d643d, transparent 45%), radial-gradient(ellipse at 90% 65%, #a34f2326, transparent 40%), var(--g-bg);
}
.white-mode .games-page.games-page--halloween {
    --g-bg: #fbf0e4;
    --g-surface: #fff9f0;
    --g-text: #35213c;
    --g-muted: #6c5676;
    --g-line: #d8bdd0;
    --g-accent: #8d400d;
    --g-accent-text: #fff9f0;
    --g-soft: #f4e4de;
}
.games-page--halloween::before { background: radial-gradient(circle, #c276332e, transparent 70%); }
.games-page--halloween::after { background: radial-gradient(circle, #9d50b333, transparent 70%); }
.games-page--halloween .games-header { border-bottom-color: var(--g-line); }
.games-page--halloween .games-brand-label { color: var(--g-accent); border-color: var(--g-line); background: var(--g-soft); }
.games-page--halloween .games-back { gap: 8px; }
.games-page--halloween .games-play-heading { display: grid; grid-template-columns: 96px auto; align-items: center; gap: 0 16px; width: fit-content; max-width: 100%; text-align: left; margin: 10px auto 22px; }
.games-page--halloween .halloween-heading-art { grid-row: 1 / 3; display: block; width: 96px; height: 96px; filter: drop-shadow(0 8px 20px #ed8c2733); animation: games-art-float 7s ease-in-out infinite; }
.halloween-heading-art img { display: block; width: 100%; height: 100%; }
.games-page--halloween .games-play-heading .games-eyebrow { align-self: end; font-size: 12px; letter-spacing: .04em; color: var(--g-accent); }
.games-page--halloween .games-play-heading h1 { align-self: start; margin: 4px 0 0; color: var(--g-text); font-size: clamp(25px, 3vw, 38px); }
.games-page--halloween .games-play { position: relative; background: linear-gradient(145deg, var(--g-soft), var(--g-surface) 45%); border-color: var(--g-line); box-shadow: 0 24px 80px #07041233, inset 0 1px 0 #ffffff12; padding: 24px; border-radius: 28px; }
.games-page--halloween .halloween-hud { gap: 12px; }
.games-page--halloween [data-halloween-score] { padding: 10px 16px; border-radius: 14px; color: var(--g-accent); background: var(--g-soft); border: 1px solid var(--g-line); font-variant-numeric: tabular-nums; }
.games-page--halloween .halloween-hearts { color: #ec7492; }
.white-mode .games-page--halloween .halloween-hearts { color: #b32f5c; }
.games-page--halloween .halloween-shield { font-size: 12px; line-height: 20px; margin-top: 6px; padding: 0 10px; }
.games-page--halloween .halloween-legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0 16px; }
.games-page--halloween .halloween-legend > span { align-items: center; padding: 10px 12px; border: 1px solid var(--g-line); border-radius: 12px; background: var(--g-soft); font-size: 12px; line-height: 1.5; }
.games-page--halloween .halloween-legend .games-icon { color: var(--g-accent); flex-shrink: 0; }
.games-page--halloween .game-instructions { background: transparent; border: 0; border-top: 1px solid var(--g-line); border-radius: 0; margin: 16px 0 0; padding-inline: 4px; }
.games-page--halloween .game-instructions summary { color: var(--g-accent); font-size: 14px; }
.games-page--halloween .halloween-stage { width: min(100%, 640px); margin: 0 auto 16px; border: 1px solid #98644080; border-radius: 20px; overflow: hidden; box-shadow: 0 12px 36px #07041244, 0 0 32px #ff952810; }
.games-page--halloween .halloween-canvas { border-radius: 18px; }
.games-page--halloween .halloween-overlay { border-radius: 18px; background: radial-gradient(ellipse at 50% 30%, #5f344954, transparent 70%), linear-gradient(180deg, #161326b8, #161020e8); }
.games-page--halloween .halloween-overlay h2 { color: #ffd18a; text-shadow: 0 3px 18px #ff9a3433; margin-bottom: 0; }
.games-page--halloween .halloween-overlay p { color: #eddfef; }
.games-page--halloween .halloween-overlay .games-button { background: linear-gradient(135deg, #ffcc75, #ff993b); box-shadow: 0 6px 24px #ff992b33; border-color: #ffd69999; color: #321908; }
.games-page--halloween .halloween-controls { width: min(100%, 640px); margin-inline: auto; gap: 12px; }
.games-page--halloween .halloween-controls .games-secondary { flex: 1; max-width: none; border-color: var(--g-line); background: var(--g-soft); color: var(--g-accent); box-shadow: inset 0 1px 0 #ffffff0c; }
.games-page--halloween .games-secondary:hover, .games-page--halloween .halloween-controls button[aria-pressed="true"] { background: var(--g-soft); border-color: var(--g-accent); }
.games-page--halloween :focus-visible { outline-color: #eb9853; }
.games-page--halloween .halloween-status { font-size: 14px; min-height: 26px; }
@media (max-width: 600px) {
    .games-page--halloween .games-play-heading { grid-template-columns: 58px minmax(0, 1fr); gap: 0 10px; margin: 8px auto 16px; }
    .games-page--halloween .halloween-heading-art { width: 58px; height: 68px; }
    .games-page--halloween .games-play-heading h1 { font-size: 23px; line-height: 1.35; }
    .games-page--halloween .games-play-heading .games-eyebrow { font-size: 10px; letter-spacing: 0; }
    .games-page--halloween .games-play[data-game="halloween"] { padding: 12px; border-radius: 22px; }
    .games-page--halloween .halloween-hud { gap: 6px 10px; }
    .games-page--halloween [data-halloween-score] { border: 0; background: none; padding: 0; font-size: 16px; }
    .games-page--halloween .halloween-legend { gap: 6px; margin: 8px 0 12px; }
    .games-page--halloween .halloween-legend > span { flex-direction: column; text-align: center; gap: 4px; padding: 8px 4px; font-size: 10px; }
    .games-page--halloween .halloween-stage { margin-bottom: 12px; }
    .games-page--halloween .halloween-controls .games-secondary { min-height: 54px; }
    .games-page--halloween .game-instructions { margin-top: 10px; }
}
@media (min-width: 1280px) {
    .games-header, .games-container, .games-footer { width: 85%; }
}
@media (max-width: 1100px) {
    .games-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .games-hero { grid-template-columns: 1.4fr 1fr; }
    .games-section--kids { padding: 24px; }
}
@media (max-width: 600px) {
    .games-container:has(.games-play) .games-back { margin-top: 14px; margin-bottom: 0; }
    .games-play-heading { margin: 12px auto 16px; }
    .games-play-heading h1 { font-size: 25px; margin-bottom: 0; }
    .games-play-heading .games-eyebrow { font-size: 12px; }
    .games-play[data-game="halloween"] { padding: 12px; }
    .halloween-hud { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 16px; }
    .halloween-hud > button { grid-column: 2; grid-row: 1 / 3; min-height: 44px; padding: 8px 12px; }
    .halloween-hearts .games-icon { width: 20px; height: 20px; }
    .halloween-legend { gap: 6px 12px; margin: 10px 0; font-size: 12px; }
    .halloween-legend .games-icon { width: 18px; height: 18px; flex-basis: 18px; }
    .halloween-stage { margin: 12px auto; }
    .halloween-controls { gap: 12px; }
    .halloween-controls button { flex: 1; min-width: 0; min-height: 56px; max-width: 180px; }
    .games-halloween-feature { grid-template-columns: 1fr; gap: 0; padding: 20px; text-align: center; }
    .games-halloween-feature picture { max-width: 230px; margin: 0 auto; }
    .halloween-overlay { padding: 16px 12px; gap: 8px; }
    .halloween-overlay h2 { font-size: 21px; }
    .halloween-overlay p { font-size: 13px; }
    .games-header, .games-container, .games-footer { width: calc(100% - 32px); }
    .games-header { min-height: 68px; }
    .games-brand { gap: 10px; }
    .games-brand img { width: 100px; }
    .games-brand-label { font-size: 10px; letter-spacing: .04em; padding: 3px 6px; }
    .games-hero { grid-template-columns: 1fr; gap: 0; padding: 30px 0; }
    .games-hero-art { max-height: 190px; margin-top: 15px; }
    .games-hero-spark { width: 38px; height: 38px; border-radius: 12px; }
    .games-hero-spark--one { left: 16%; }
    .games-hero-spark--two { right: 14%; }
    .games-hero h1 { font-size: 38px; }
    .games-section--kids { padding: 20px 12px; margin-inline: -4px; }
    .games-grid { gap: 12px; }
    .games-card-body { padding: 15px; }
    .games-card h3 { font-size: 17px; }
    .games-tag { font-size: 10px; left: 8px; bottom: 8px; }
    .games-play { padding: 20px 14px; border-radius: 18px; }
    .game-answer { padding: 12px 8px; }
    .memory-grid, .memory-grid--large { gap: 7px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .alphabet-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .puzzle-layout { grid-template-columns: 1fr; gap: 20px; }
    .puzzle-board, .puzzle-tray { max-width: 360px; margin: auto; }
}
@media (max-width: 419px) {
    .games-brand { gap: 6px; }
    .games-brand img { width: 84px; }
    .games-header-actions { gap: 6px; }
    .games-header { gap: 8px; }
    .games-languages a { min-width: 34px; }
    .game-tutorial { padding: 12px 8px; }
    .game-demo { gap: 7px; }
    .game-demo-sample { font-size: 26px; }
    /* Keep two readable cards per row on narrow phones. */
    .games-card-body { padding: 12px 10px; }
    .games-card h3 { font-size: 15px; gap: 6px; }
    .games-card h3 > .games-icon { width: 18px; height: 22px; flex-basis: 18px; }
    .games-card .games-button { font-size: 14px; padding: 10px 8px; gap: 6px; }
    .games-tag { font-size: 9px; line-height: 1.4; left: 6px; bottom: 6px; padding: 3px 6px; max-width: calc(100% - 12px); }
    .game-answers { gap: 10px; }
    .game-controls { align-items: stretch; }
    .game-controls label { display: grid; width: 100%; gap: 6px; }
    .game-controls select { width: 100%; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .games-page::before, .games-page::after { animation: none !important; }
    .games-page *, .games-page *::before, .games-page *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
/* Arcade boards keep the same outer game box, with their own compact play area. */
.games-page--snake { --g-accent:#b7ee80; --g-accent-text:#173923; --g-soft:#183c31; background:radial-gradient(ellipse at 50% 25%,#28513555,transparent 65%),var(--g-bg); }
.white-mode .games-page--snake { --g-accent:#2c743e; --g-accent-text:#fff; --g-soft:#e7f3de; }
.games-page--sweet-match { --g-accent:#efa0d0; --g-accent-text:#48213f; --g-soft:#392b51; background:radial-gradient(ellipse at 50% 30%,#8f468333,transparent 60%),var(--g-bg); }
.white-mode .games-page--sweet-match { --g-accent:#9c3675; --g-accent-text:#fff; --g-soft:#f6e7f2; }
.snake-settings, .snake-hud { width:min(100%,460px); margin-inline:auto; }
.snake-settings { justify-content:space-between; gap:12px; }
.snake-hud { display:grid; grid-template-columns:1fr auto; align-items:center; gap:0 12px; margin-block:12px; font-weight:700; font-variant-numeric:tabular-nums; }
.snake-hud p:first-child { color:var(--g-accent); font-size:20px; }
.snake-hud p:nth-child(2) { grid-row:2; font-size:13px; color:var(--g-muted); }
.snake-hud button { grid-column:2; grid-row:1/3; }
.snake-stage { position:relative; width:min(100%,400px); margin:auto; border:2px solid #7bb574; border-radius:18px; overflow:hidden; box-shadow:0 12px 35px #071b2244; }
.snake-canvas { display:block; width:100%; height:auto; touch-action:none; }
.snake-overlay { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:16px; padding:22px; background:#0e281ee8; text-align:center; color:#f4ffe7; }
.snake-overlay h2 { color:#c4f29b; font-size:24px; }
.snake-overlay p { font-size:15px; }
.snake-overlay .games-secondary { background:#173e2c; color:#e5ffd1; border-color:#7bb574; }
.snake-pad { display:grid; grid-template-columns:repeat(3,64px); justify-content:center; gap:8px; margin:16px auto; }
.snake-pad button { font-size:26px; padding:4px; min-height:54px; touch-action:manipulation; }
.snake-pad [data-snake-direction="up"] { grid-column:2; }
.snake-pad [data-snake-direction="left"] { grid-column:1; grid-row:2; }
.snake-pad [data-snake-direction="down"] { grid-column:2; grid-row:2; }
.snake-pad [data-snake-direction="right"] { grid-column:3; grid-row:2; }
.sweet-shell { width:min(100%,540px); margin:auto; }
.sweet-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:16px; }
.sweet-heading h2 { font-size:23px; }
.sweet-heading .games-eyebrow { color:var(--g-accent); font-size:12px; }
.sweet-heading button { font-size:13px; padding:8px 12px; flex-shrink:0; }
.sweet-stats { display:grid; grid-template-columns:1fr 1.5fr; gap:10px; margin-bottom:12px; }
.sweet-stats > div { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:2px 12px; padding:10px 14px; border:1px solid var(--g-line); border-radius:14px; background:var(--g-soft); }
.sweet-stats span { font-size:12px; color:var(--g-muted); }
.sweet-stats strong { font-size:21px; font-variant-numeric:tabular-nums; color:var(--g-accent); }
.sweet-goals { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:12px; }
.sweet-goal { display:inline-flex; align-items:center; gap:6px; padding:3px 9px; border:1px solid var(--g-line); border-radius:12px; font-size:13px; font-variant-numeric:tabular-nums; }
.sweet-goal > svg { width:25px; height:25px; }
.sweet-goal.is-complete { border-color:#78b895; }
.sweet-ice-symbol { display:block; width:22px; height:22px; border:3px solid #b7e9ff; border-radius:5px; background:#79b8df55; }
.sweet-stage { position:relative; border:1px solid #c98bb9; border-radius:20px; overflow:hidden; box-shadow:0 12px 35px #180c2633; }
.sweet-board { display:grid; grid-template-columns:repeat(var(--sweet-size),minmax(0,1fr)); gap:5px; padding:10px; background:linear-gradient(145deg,#5f3c70,#352544); touch-action:none; }
.sweet-cell { position:relative; min-width:0; aspect-ratio:1; padding:8%; border:1px solid #c28cbd33; border-radius:13px; background:#221b3188; transition:background .15s,transform .15s; }
.sweet-cell svg { display:block; width:100%; height:100%; filter:drop-shadow(0 3px 1px #11091c44); pointer-events:none; }
.sweet-cell:hover { background:#77518b; }
.sweet-cell.is-selected { background:#b879a4; outline:3px solid #fff0af; outline-offset:-3px; }
.sweet-cell.is-hint { animation:sweet-hint 1s ease-in-out infinite; outline:2px solid #fff0af; outline-offset:-2px; }
.sweet-cell.has-ice::after { content:""; position:absolute; inset:2px; border:2px solid #bbebff; background:linear-gradient(135deg,#b5ecff33,transparent 45%,#b5ecff44); border-radius:10px; pointer-events:none; }
.sweet-cell.has-thick-ice::after { border-width:4px; box-shadow:inset 0 0 0 2px #fff7; }
.sweet-cell.is-invalid { border-color:#ff8d73; }
.sweet-cell.is-bursting::before { content:""; position:absolute; inset:8%; border:3px solid #ffeda1; border-radius:50%; pointer-events:none; animation:sweet-fruit-burst .24s ease-out both; }
.sweet-cell svg { transform-origin:center; }
.sweet-cell.is-moving { z-index:2; }
.sweet-cell:focus-visible { z-index:1; outline:3px solid #fff5b4; outline-offset:-3px; }
.sweet-overlay { position:absolute; inset:0; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:16px; padding:20px; background:linear-gradient(145deg,#3d244ff5,#231731f5); text-align:center; color:#fff6e9; }
.sweet-overlay h2 { color:#ffdfa1; font-size:28px; }
.sweet-overlay p { font-size:15px; max-width:380px; }
.sweet-win-stars { display:flex; gap:12px; color:#ffe08f; }
.sweet-win-stars .games-icon { width:40px; height:40px; }
.sweet-result-actions { display:flex; justify-content:center; flex-wrap:wrap; gap:10px; }
.sweet-overlay .games-secondary { background:#523257; color:#fff5e4; border-color:#af82ab; }
.sweet-bottom { display:flex; align-items:center; gap:12px; margin:14px 0; }
.sweet-bottom > button { flex-shrink:0; }
.sweet-bottom p { margin:0; min-height:0; font-size:13px; }
.sweet-level-map { margin-top:18px; border-top:1px solid var(--g-line); }
.sweet-level-map summary { cursor:pointer; padding:12px 0; font-weight:700; min-height:44px; }
.sweet-level-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; padding:8px 0; }
.sweet-level-grid button { flex-direction:column; gap:0; padding:7px 4px; min-height:56px; }
.sweet-level-grid button:disabled { opacity:.45; }
.sweet-level-grid button.is-current { border-color:var(--g-accent); background:var(--g-soft); }
.sweet-level-grid button > .games-icon { width:14px; height:14px; }
.sweet-level-stars { display:flex; min-height:14px; }
.sweet-level-stars .games-icon { width:12px; height:12px; }
@keyframes sweet-hint { 50% { background:#ad779c; } }
@keyframes sweet-clear { to { transform:scale(.35); opacity:.2; } }
@keyframes sweet-invalid { 25% { transform:translateX(-3px); } 75% { transform:translateX(3px); } }
@keyframes sweet-fruit-burst { from { transform:scale(.5); opacity:1; } to { transform:scale(1.7); opacity:0; } }
/* Warm orchard colours, glossy fruit and clear recessed board cells. */
.games-page.games-page--sweet-match { --g-accent:#ffbe5b; --g-accent-text:#462309; --g-soft:#3d2d3b; background:radial-gradient(ellipse at 10% 20%,#b43e5038,transparent 48%),radial-gradient(ellipse at 90% 50%,#ed92252b,transparent 48%),#21192d; }
.white-mode .games-page.games-page--sweet-match { --g-bg:#fff5df; --g-surface:#fffdf5; --g-text:#38283c; --g-muted:#756072; --g-line:#e0bea1; --g-accent:#a44b0c; --g-accent-text:#fff8e7; --g-soft:#fff0cb; background:radial-gradient(ellipse at 10% 20%,#ffc17855,transparent 45%),radial-gradient(ellipse at 95% 55%,#e8a7b83b,transparent 45%),var(--g-bg); }
.games-page--sweet-match .game-heading-mark { background:linear-gradient(145deg,#ffd38b,#ffae78); color:#944119; border-color:#eaad6d; box-shadow:0 6px 20px #e9953326; }
.games-page--sweet-match .games-play { background:linear-gradient(155deg,var(--g-soft),var(--g-surface) 50%); border-color:var(--g-line); box-shadow:0 20px 65px #6d3a2420; }
.sweet-heading .games-eyebrow { letter-spacing:.02em; }
.sweet-stats > div { background:linear-gradient(135deg,var(--g-soft),var(--g-surface)); border-color:var(--g-line); box-shadow:inset 0 1px 0 #ffffff20; }
.sweet-stage { border:3px solid #d79a59; background:#5d344e; box-shadow:0 14px 32px #542b4333,0 0 0 4px #e9b86e22; }
.sweet-board { background:radial-gradient(ellipse at 50% 0%,#9a4a64,transparent 70%),linear-gradient(145deg,#6a3553,#3b2948); }
.sweet-shell[data-world="2"] .sweet-board { background:linear-gradient(145deg,#943b52,#4b2447); }
.sweet-shell[data-world="3"] .sweet-board { background:linear-gradient(145deg,#567344,#263c3b); }
.sweet-shell[data-world="4"] .sweet-board { background:linear-gradient(145deg,#b2654a,#71384e); }
.sweet-shell[data-world="5"] .sweet-board { background:linear-gradient(145deg,#805096,#392d67); }
.sweet-cell { padding:5%; background:linear-gradient(145deg,#2b183b66,#1d163580); border-color:#edbdd42b; box-shadow:inset 0 2px 5px #130d2633,inset 0 -1px 0 #ffd6c31a; }
.sweet-cell svg { filter:drop-shadow(0 3px 1px #1d102a80); }
.sweet-cell:hover { background:#b7768544; }
.sweet-cell.is-selected { background:#d49c4877; outline-color:#ffe8a7; box-shadow:inset 0 0 15px #ffc35d55,0 0 12px #ffc35d22; }
.sweet-goal { background:var(--g-surface); border-color:var(--g-line); }
.sweet-goal > svg { width:30px; height:30px; }
.sweet-overlay { background:radial-gradient(ellipse at 50% 30%,#a55d2b55,transparent 65%),linear-gradient(145deg,#42213cf5,#2b1b32f5); }
.sweet-overlay h2 { color:#ffdc8e; }
.sweet-overlay .games-button { background:linear-gradient(135deg,#ffd47b,#ffad50); color:#592b12; border-color:#ffe1a0; box-shadow:0 6px 20px #ffb75126; }
.sweet-level-grid .is-current { box-shadow:0 0 0 2px var(--g-accent); }
@media (max-width:600px) {
    .games-play[data-game="snake"], .games-play[data-game="sweet-match"] { padding:16px 10px; }
    .sweet-board { padding:6px; gap:3px; }
    .sweet-cell { border-radius:8px; }
    .sweet-cell.has-ice::after { inset:1px; border-radius:6px; }
    .sweet-cell.has-thick-ice::after { border-width:3px; }
    .sweet-heading { gap:8px; }
    .sweet-heading h2 { font-size:20px; }
    .sweet-stats > div { padding:8px 10px; }
    .sweet-stats strong { font-size:18px; }
    .sweet-overlay { gap:10px; padding:12px; }
    .sweet-overlay h2 { font-size:22px; }
    .sweet-overlay p { font-size:13px; }
    .sweet-result-actions button { font-size:13px; padding:8px 10px; }
    .sweet-win-stars .games-icon { width:28px; height:28px; }
}
@media (max-width:419px) {
    .snake-settings { display:grid; grid-template-columns:1fr 1fr; gap:10px; font-size:13px; }
    .snake-overlay { gap:10px; padding:12px; }
    .snake-overlay h2 { font-size:21px; }
    .snake-overlay p { font-size:13px; }
    .sweet-heading { align-items:flex-start; }
    .sweet-heading button { font-size:11px; padding:7px; gap:4px; }
    .sweet-heading button .games-icon { width:17px; height:17px; }
    .sweet-heading h2 { font-size:18px; }
    .sweet-heading .games-eyebrow { font-size:10px; }
    .sweet-overlay p { font-size:11px; }
    .sweet-overlay h2 { font-size:19px; }
    .sweet-win-stars .games-icon { width:24px; height:24px; }
    .sweet-result-actions { gap:6px; }
    .sweet-result-actions button { font-size:11px; padding:7px 8px; gap:4px; }
    .sweet-result-actions .games-icon { width:17px; height:17px; }
    .halloween-victory-mark { width:36px; height:36px; }
    .halloween-result-actions { gap:6px; }
    .halloween-result-actions .games-button { font-size:12px; padding:8px 9px; gap:4px; }
    .halloween-result-actions .games-icon { width:20px; height:20px; }
}
@media (prefers-reduced-motion:reduce) { .sweet-cell, .sweet-cell svg { animation:none !important; transition:none !important; } }
/* Ticket rain uses branded ticket artwork and the shared game-panel spacing. */
.games-page.games-page--ticket-run { --g-bg:#111a35; --g-surface:#1b2b49; --g-text:#f5f5ff; --g-muted:#c3c9e4; --g-line:#59658d; --g-accent:#b7a3ff; --g-accent-text:#251b4c; --g-soft:#2c3459; background:radial-gradient(ellipse at 10% 20%,#875edb26,transparent 45%),radial-gradient(ellipse at 90% 65%,#4cbcd526,transparent 45%),var(--g-bg); }
.white-mode .games-page.games-page--ticket-run { --g-bg:#f2f2fb; --g-surface:#fff; --g-text:#29314c; --g-muted:#606b85; --g-line:#c4c5e1; --g-accent:#6b46bd; --g-accent-text:#fff; --g-soft:#eeebfc; }
.games-page--ticket-run .games-play { background:linear-gradient(145deg,var(--g-soft),var(--g-surface) 55%); }
.games-page--ticket-run .runner-stage { border:1px solid #9d89cf; overflow:hidden; box-shadow:0 14px 40px #100f3033; }
.runner-canvas { touch-action:none; }
.runner-hud { gap:12px; margin-bottom:12px; }
.runner-hud [data-run-stats] { color:var(--g-accent); font-weight:800; font-size:18px; font-variant-numeric:tabular-nums; }
.runner-hud .games-secondary { font-size:14px; padding:10px 14px; }
.runner-overlay { display:flex; flex-direction:column; justify-content:center; background:linear-gradient(180deg,#141c35b8,#181a36eb); }
.runner-overlay h2 { color:#eee0ff; margin:0; font-size:26px; }
.runner-overlay p { color:#e1daef; font-size:15px; }
.runner-overlay .games-button { background:linear-gradient(135deg,#dec3ff,#a697ff); color:#302147; box-shadow:0 6px 24px #b28dff2e; }
.runner-overlay .games-secondary { background:#302a52; color:#f5e8ff; border-color:#a08aca; }
.runner-ready-mark { display:grid; place-items:center; width:66px; height:66px; border-radius:22px; color:#dbc8ff; background:#b08ce529; border:1px solid #d4b9f34d; }
.runner-ready-mark .games-icon { width:38px; height:38px; }
.runner-touch { max-width:600px; margin-inline:auto; gap:12px; }
.runner-touch button { flex:1; max-width:220px; min-height:56px; }
.games-card-art--run { --art-a:#bda2fa; --art-b:#8dd8eb; }
.games-card-art--run img { mix-blend-mode:normal; filter:drop-shadow(0 8px 14px #40326f26); }
/* Snake follows the same light/dark surfaces and board frame as other games. */
.games-page.games-page--snake { --g-bg:#101f32; --g-surface:#193448; --g-text:#effbf7; --g-muted:#b9d5cf; --g-line:#517b7b; --g-accent:#83dbb6; --g-accent-text:#163b33; --g-soft:#234d50; background:radial-gradient(ellipse at 8% 20%,#40b58b20,transparent 45%),var(--g-bg); }
.white-mode .games-page.games-page--snake { --g-bg:#f1f8f5; --g-surface:#fff; --g-text:#213b3c; --g-muted:#567573; --g-line:#b1d0c2; --g-accent:#1b775d; --g-accent-text:#fff; --g-soft:#e3f2e9; }
.games-page--snake .games-play { background:linear-gradient(145deg,var(--g-soft),var(--g-surface) 50%); border-color:var(--g-line); }
.games-page--snake .game-heading-mark { color:var(--g-accent); border-color:var(--g-line); background:var(--g-soft); }
.snake-stage { width:min(100%,440px); border-color:var(--g-line); box-shadow:0 12px 32px #14363422; }
.snake-settings,.snake-hud { width:min(100%,440px); }
.snake-settings label { flex:1; align-items:stretch; flex-direction:column; gap:6px; font-size:14px; }
.snake-settings select { width:100%; min-width:0; }
.snake-overlay { background:linear-gradient(180deg,#122d3aa8,#122d3ae8); color:#effbf7; }
.snake-overlay h2 { color:#9debc5; }
.white-mode .snake-overlay { background:linear-gradient(180deg,#eaf6edb8,#eaf6edef); color:#254b3c; }
.white-mode .snake-overlay h2 { color:#207752; }
.white-mode .snake-overlay .games-secondary { background:#fff; color:#25694e; border-color:#9fbdab; }
.snake-hud p:first-child { font-size:18px; }
.snake-hud button { font-size:14px; padding:10px 12px; gap:7px; }
.snake-pad button { box-shadow:0 3px 0 var(--g-line); color:var(--g-accent); }
.snake-pad button:active { box-shadow:none; transform:translateY(2px); }
.games-card-art--snake { --art-a:#96e2bb; --art-b:#b4e7e8; }
.games-card-art--snake img { mix-blend-mode:normal; filter:drop-shadow(0 8px 14px #2b75512b); }
@media (max-width:600px) {
    .runner-overlay { gap:10px; padding:14px; }
    .runner-overlay h2 { font-size:22px; }
    .runner-overlay p { font-size:13px; }
    .runner-ready-mark { width:50px; height:50px; border-radius:16px; }
    .runner-ready-mark .games-icon { width:30px; height:30px; }
    .runner-hud [data-run-stats] { font-size:14px; }
    .runner-hud .games-secondary { font-size:12px; padding:8px 10px; gap:6px; }
    .runner-touch { margin-top:12px; }
    .snake-hud p:first-child { font-size:15px; }
    .snake-hud button { font-size:12px; padding:8px 10px; gap:5px; }
}
.games-card-art--clock { --art-a:#8fd7cb; --art-b:#ffe1a0; }
.games-card-art--clock img { mix-blend-mode:normal; filter:drop-shadow(0 8px 14px #3d8b7a26); }
.games-page.games-page--clock { --g-bg:#0e2436; --g-surface:#183649; --g-text:#f1fbf7; --g-muted:#bdd3d4; --g-line:#597f83; --g-accent:#8ee0c9; --g-accent-text:#173d35; --g-soft:#254b53; background:radial-gradient(ellipse at 8% 20%,#4ab49522,transparent 45%),var(--g-bg); }
.white-mode .games-page.games-page--clock { --g-bg:#f1f9f5; --g-surface:#fffdf5; --g-text:#294553; --g-muted:#5d777a; --g-line:#b7d4ca; --g-accent:#237c68; --g-accent-text:#fff; --g-soft:#e6f4e8; }
.clock-settings { display:flex; justify-content:space-between; gap:18px; flex-wrap:wrap; align-items:center; margin-bottom:20px; }
.clock-settings > label { display:grid; gap:6px; font-size:13px; }
.clock-settings select { background:var(--g-surface); color:var(--g-text); border:1px solid var(--g-line); border-radius:12px; min-height:48px; padding:8px 12px; font:inherit; max-width:100%; }
.clock-modes { display:flex; gap:8px; flex-wrap:wrap; }
.clock-modes button { padding:10px 14px; }
.clock-modes [aria-pressed="true"] { border-color:var(--g-accent); background:var(--g-soft); color:var(--g-accent); box-shadow:inset 0 -3px 0 var(--g-accent); }
.clock-legend { display:flex; justify-content:center; flex-wrap:wrap; gap:12px 24px; margin:10px 0; font-size:13px; }
.clock-legend span { display:inline-flex; align-items:center; gap:8px; }
.clock-legend i { display:inline-block; width:22px; height:6px; border-radius:4px; background:currentColor; }
.clock-legend .clock-legend-minute i { width:32px; height:4px; }
.clock-legend-hour,.clock-digital-hour { color:#71b8ed; }
.clock-legend-minute,.clock-digital-minute { color:#ffc080; }
.white-mode .clock-legend-hour,.white-mode .clock-digital-hour { color:#285e9e; }
.white-mode .clock-legend-minute,.white-mode .clock-digital-minute { color:#a85317; }
.clock-display { width:min(100%,360px); margin:10px auto; }
.learning-clock { display:block; width:100%; height:auto; overflow:visible; }
.clock-rim { fill:#f8d99b; stroke:#c89f60; stroke-width:3px; }
.clock-face { fill:#fffdf3; }
.clock-tick { stroke:#bacfc9; stroke-width:1.5px; }
.clock-hour-tick { stroke:#6f9795; stroke-width:3px; }
.clock-number { fill:#294955; font:700 24px Arial,sans-serif; text-anchor:middle; }
.clock-minute-number { fill:#f5ba80; font:700 13px Arial,sans-serif; text-anchor:middle; }
.white-mode .clock-minute-number { fill:#a4521c; }
.clock-hand { transform-origin:50% 50%; transform-box:view-box; }
.clock-hand line { stroke-linecap:round; }
.clock-hand--hour line { stroke:#367ab7; stroke-width:12px; }
.clock-hand--minute line { stroke:#dc883d; stroke-width:7px; }
.clock-pivot { fill:#3c7c9b; }
.clock-digital { display:flex; justify-content:center; align-items:center; gap:10px; font-size:48px; font-weight:800; line-height:1.3; font-variant-numeric:tabular-nums; }
.clock-tip { margin:12px auto 20px !important; max-width:580px; text-align:center; font-size:14px; color:var(--g-muted); }
.clock-adjustments { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); max-width:460px; gap:20px; margin:16px auto; text-align:center; }
.clock-adjustments > div > div { display:flex; justify-content:center; gap:8px; margin-top:8px; }
.clock-adjustments button { min-width:64px; padding:10px 14px; font-size:20px; font-weight:800; }
.clock-progress { text-align:center; color:var(--g-muted); font-size:14px; }
.clock-progress-bar { display:block; width:min(100%,460px); height:7px; margin:10px auto 18px; accent-color:var(--g-accent); }
.games-play .clock-question { text-align:center; margin:8px 0 0; font-size:23px; }
.clock-answers { max-width:460px; margin:12px auto; }
.clock-answers button { font-size:27px; font-variant-numeric:tabular-nums; }
.clock-feedback { max-width:580px; margin:auto; text-align:center; font-size:14px; min-height:56px; }
.clock-next { display:flex; margin:12px auto 20px; }
.clock-celebration { color:var(--g-accent); margin-bottom:16px; }
.clock-celebration svg { width:64px; height:64px; }
@media (max-width:600px) {
    .clock-settings { gap:12px; }
    .clock-settings > label { width:100%; }
    .clock-modes { display:grid; grid-template-columns:1fr 1fr; width:100%; }
    .clock-modes button { padding:10px 8px; font-size:14px; gap:7px; }
    .clock-legend { gap:7px 12px; font-size:11px; }
    .clock-adjustments { gap:12px; }
    .clock-adjustments button { min-width:0; flex:1; padding:8px 6px; }
    .clock-digital { font-size:40px; }
    .clock-tip { font-size:13px; }
}
/* Puzzle selection and play are separate, compact views. */
.games-play[data-game="puzzle"] { scroll-margin-top:12px; }
.puzzle-picker-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; }
.puzzle-picker-heading > div { min-width:0; }
.games-play .puzzle-picker-heading h2 { margin:0 0 5px; font-size:23px; }
.puzzle-picker-heading p { color:var(--g-muted); font-size:13px; }
.puzzle-picker-heading > button { flex-shrink:0; font-size:13px; padding:8px 10px; gap:6px; }
.puzzle-level-buttons { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:16px; }
.puzzle-level-buttons button { justify-content:flex-start; text-align:left; gap:10px; font-size:13px; padding:10px; }
.puzzle-level-buttons strong { display:grid; place-items:center; width:34px; height:34px; flex-shrink:0; border-radius:11px; background:var(--g-soft); color:var(--g-accent); font-size:20px; }
.puzzle-level-buttons [aria-pressed="true"],.puzzle-piece-settings [aria-pressed="true"] { border-color:var(--g-accent); background:var(--g-soft); box-shadow:inset 0 0 0 1px var(--g-accent); }
.puzzle-picture-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); align-content:start; gap:12px; max-height:480px; overflow-y:auto; overscroll-behavior:contain; padding:4px 6px 8px; scrollbar-color:var(--g-line) transparent; border:1px solid var(--g-line); border-radius:16px; }
.puzzle-picture-choice { position:relative; display:flex; flex-direction:column; gap:6px; min-width:0; padding:5px; color:var(--g-text); background:var(--g-surface); border:2px solid transparent; border-radius:13px; }
.puzzle-picture-choice img { display:block; width:100%; height:auto; aspect-ratio:1; object-fit:cover; border-radius:9px; }
.puzzle-picture-choice span { width:100%; padding:0 2px 4px; text-align:center; font-size:12px; line-height:1.4; overflow-wrap:anywhere; }
.puzzle-picture-choice[aria-pressed="true"] { border-color:var(--g-accent); background:var(--g-soft); }
.puzzle-picture-choice[aria-pressed="true"]::after { content:"✓"; position:absolute; top:10px; right:10px; display:grid; place-items:center; width:25px; height:25px; border-radius:50%; background:var(--g-accent); color:var(--g-accent-text); font-size:17px; box-shadow:0 2px 6px #123b3e33; }
.puzzle-picker-footer { position:sticky; bottom:10px; display:grid; grid-template-columns:1fr 1fr; align-items:center; gap:18px; margin-top:16px; padding:12px; border:1px solid var(--g-line); border-radius:16px; background:var(--g-surface); z-index:2; box-shadow:0 6px 22px #1b3f2722; }
.puzzle-picker .puzzle-picker-footer { position:relative; bottom:auto; }
.puzzle-piece-settings { display:flex; align-items:center; justify-content:space-between; gap:10px; font-size:13px; }
.puzzle-piece-settings > div { display:flex; gap:6px; }
.puzzle-piece-settings button { min-width:44px; min-height:44px; padding:8px; font-weight:800; }
.puzzle-topline { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.puzzle-topline > img { flex-shrink:0; border-radius:10px; object-fit:cover; }
.puzzle-topline > div { flex:1; min-width:0; }
.puzzle-topline p { font-size:11px; color:var(--g-muted); }
.games-play .puzzle-topline h2 { margin:0; font-size:17px; overflow-wrap:anywhere; }
.puzzle-topline > button { flex-shrink:0; padding:8px 10px; min-height:44px; font-size:13px; gap:6px; }
.puzzle-progress-row { display:flex; align-items:center; gap:12px; color:var(--g-accent); font-size:12px; font-variant-numeric:tabular-nums; }
.puzzle-progress-row progress { flex:1; min-width:0; height:7px; accent-color:var(--g-accent); }
.puzzle-touch-help { text-align:center; color:var(--g-muted); font-size:12px; margin:10px 0 !important; }
.puzzle-session .puzzle-layout { margin-top:12px; gap:20px; }
.puzzle-session,.puzzle-tray-section,.puzzle-board-section { min-width:0; max-width:100%; }
.puzzle-session .puzzle-board { aspect-ratio:1; }
.puzzle-board.has-selection .puzzle-slot:not(:disabled) { border-color:var(--g-accent); }
.puzzle-tray-heading { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:10px; color:var(--g-muted); font-size:12px; }
.puzzle-tray-heading > span { display:none; }
.puzzle-session .puzzle-piece.is-used { visibility:hidden; }
.puzzle-session .puzzle-piece[aria-pressed="true"] { border-color:var(--g-accent); outline-color:var(--g-accent); outline-offset:1px; }
.puzzle-session .puzzle-feedback { min-height:0; padding:0; margin:8px 0; font-size:12px; text-align:center; }
.puzzle-game-tools { display:flex; justify-content:center; gap:10px; margin-top:12px; }
.puzzle-game-tools button { min-height:44px; padding:8px 14px; font-size:13px; gap:7px; }
.puzzle-howto { margin-bottom:0; font-size:13px; }
.puzzle-result-buttons { display:flex; flex-wrap:wrap; justify-content:center; gap:10px; }
.puzzle-complete-art { display:block; width:min(100%,260px); height:auto; aspect-ratio:1; margin:16px auto; border-radius:16px; }
.puzzle-session .puzzle-finish { padding:24px 0 12px; }
.puzzle-preview-dialog { width:min(90vw,520px); max-height:90svh; margin:auto; padding:16px; color:var(--g-text); background:var(--g-surface); border:1px solid var(--g-line); border-radius:20px; box-shadow:0 24px 80px #071b3b66; }
.puzzle-preview-dialog::backdrop { background:#071322b3; backdrop-filter:blur(3px); }
.puzzle-preview-dialog > header { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:12px; }
.games-play .puzzle-preview-dialog h2 { margin:0; font-size:17px; }
.puzzle-icon-button { min-width:44px; min-height:44px; padding:8px; }
.puzzle-preview-dialog .puzzle-preview { display:block; width:100%; height:auto; max-height:70svh; aspect-ratio:1; object-fit:contain; margin:0; }
.puzzle-drag-ghost { position:fixed; z-index:9999; width:80px; height:80px; background-repeat:no-repeat; border:2px solid #fff5cb; border-radius:9px; box-shadow:0 6px 20px #132c4e66; transform:translate(-50%,-80%); pointer-events:none; }
@media (max-width:600px) {
    .games-play[data-game="puzzle"] { padding:14px 10px; }
    .puzzle-picker-heading { margin-bottom:12px; }
    .games-play .puzzle-picker-heading h2 { font-size:20px; }
    .puzzle-picture-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; max-height:36svh; }
    .puzzle-picture-choice { padding:3px; border-radius:10px; }
    .puzzle-picture-choice span { font-size:11px; }
    .puzzle-level-buttons { gap:8px; margin-bottom:12px; }
    .puzzle-level-buttons button { font-size:11px; gap:6px; padding:8px 6px; }
    .puzzle-level-buttons strong { width:26px; height:30px; font-size:17px; }
    .puzzle-picker-footer { grid-template-columns:1fr; gap:10px; margin-top:12px; padding:10px; }
    .puzzle-picker-footer > button { min-height:48px; }
    .puzzle-topline > img { width:36px; height:36px; }
    .games-play .puzzle-topline h2 { font-size:14px; }
    .puzzle-topline > button { font-size:11px; padding:7px; gap:4px; }
    .puzzle-topline > button .games-icon { width:18px; height:18px; flex-basis:18px; }
    .puzzle-session .puzzle-layout { display:grid; grid-template-columns:minmax(0,1fr); gap:12px; margin-top:4px; }
    .puzzle-touch-help { margin:6px 0 !important; }
    .puzzle-session .puzzle-feedback:empty { display:none; }
    .puzzle-session .puzzle-board { width:min(100%,34svh,300px); max-width:none; margin:auto; }
    .puzzle-session .puzzle-tray { --puzzle-tile:clamp(64px,18vw,80px); width:100%; max-width:none; display:grid; grid-template-columns:none; grid-template-rows:repeat(2,var(--puzzle-tile)); grid-auto-flow:column; grid-auto-columns:var(--puzzle-tile); gap:6px; aspect-ratio:auto; overflow-x:auto; overflow-y:hidden; padding:5px; margin:0; overscroll-behavior-x:contain; touch-action:pan-x; scrollbar-color:var(--g-line) transparent; }
    .puzzle-session .puzzle-piece { width:var(--puzzle-tile); height:var(--puzzle-tile); touch-action:none; }
    .puzzle-tray-heading { margin-bottom:4px; }
    .puzzle-tray-heading > span { display:inline; font-size:10px; }
    .puzzle-game-tools { margin-top:8px; }
    .puzzle-game-tools button { flex:1; padding:8px; font-size:12px; }
    .puzzle-session .puzzle-howto { margin-top:10px; }
    .puzzle-preview-dialog { padding:12px; }
}
@media (forced-colors: active) {
    .games-hero h1 span { background: none; -webkit-text-fill-color: currentColor; }
    .games-page::before, .games-page::after { display: none; }
}

/* Compact discovery, retaining the existing artwork and catalogue components. */
html:has(.games-section-jumps) { scroll-behavior:smooth; }
.games-hero { grid-template-columns:minmax(0,2fr) minmax(140px,1fr); gap:24px; padding:16px 0 12px; }
.games-hero h1 { font-size:clamp(32px,3.5vw,46px); line-height:1.2; }
.games-hero-art { max-height:145px; margin:0; }
.games-hero-spark { width:34px; height:34px; border-radius:11px; }
.games-hero-spark .games-icon { width:21px; height:21px; }
.games-section-jumps { display:flex; flex-wrap:wrap; gap:12px; margin-top:12px; }
.games-section-jumps .games-button { min-height:56px; padding:10px 18px; gap:10px; justify-content:center; }
.games-section-jumps .games-jump-kids { background:var(--g-soft); color:var(--g-text); border:1px solid var(--g-line); box-shadow:none; }
.games-hero .games-lead { margin-top:10px; font-size:17px; }
.games-halloween-feature { grid-template-columns:90px minmax(0,1fr); gap:18px; padding:10px 20px; margin:12px 0 24px; border-radius:22px; }
.games-halloween-feature picture { max-width:90px; margin:0; }
.games-halloween-feature img { width:90px; height:90px; object-fit:contain; }
.games-halloween-feature > div { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:2px 18px; text-align:left; }
.games-halloween-feature .games-eyebrow { grid-column:1; font-size:12px; }
.games-halloween-feature h2 { grid-column:1; font-size:clamp(20px,2.2vw,28px); margin:0; }
.games-halloween-feature .games-button { grid-column:2; grid-row:1 / 3; margin:0; min-height:56px; }
.games-card h3 { min-height:2.9em; }
.games-section-heading h2 { scroll-margin-top:24px; }

/* Colours/shapes uses the shared question engine with a visual, compact renderer. */
.games-page--colors-shapes .games-back { margin-top:10px; font-size:14px; }
.games-page--colors-shapes .games-play-heading { display:grid; grid-template-columns:46px minmax(0,auto); align-items:center; justify-content:center; gap:0 12px; margin:10px auto 14px; text-align:left; }
.games-page--colors-shapes .game-heading-mark { grid-row:1 / 3; width:46px; height:46px; margin:0; border-radius:15px; }
.games-page--colors-shapes .game-heading-mark .games-icon { width:27px; height:27px; }
.games-page--colors-shapes .games-play-heading .games-eyebrow { font-size:11px; letter-spacing:0; }
.games-page--colors-shapes .games-play-heading h1 { font-size:clamp(23px,2.4vw,30px); line-height:1.3; margin:0; }
[data-game="colors-shapes"] { padding:20px; }
.cs-icon { width:26px; height:26px; flex-shrink:0; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.cs-start h2 { font-size:18px; text-align:center; color:var(--g-muted); margin-bottom:14px; }
.cs-modes { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.cs-mode-card { display:flex; flex-direction:column; align-items:center; justify-content:center; min-width:0; min-height:240px; gap:12px; padding:18px 12px; border:2px solid var(--g-line); border-radius:24px; background:var(--g-surface); color:var(--g-text); box-shadow:0 5px 0 var(--g-soft); touch-action:manipulation; }
.cs-mode-card:hover { border-color:var(--g-accent); background:var(--g-soft); }
.cs-mode-art { display:block; width:min(100%,180px); height:130px; }
.cs-mode-name { font-size:19px; font-weight:700; line-height:1.4; }
.cs-shape { display:block; width:76px; height:76px; overflow:visible; flex-shrink:0; }
.cs-shape > * { fill:var(--cs-color); stroke:#66778b; stroke-width:2; }
.cs-demo { display:flex; align-items:center; justify-content:center; gap:8px; width:100%; }
.cs-demo-sample { display:block; flex-shrink:0; }
.cs-demo .cs-shape { width:38px; height:38px; }
.cs-demo > .cs-icon { width:22px; height:22px; color:var(--g-muted); }
.cs-demo-options { display:flex; gap:6px; min-width:0; }
.cs-demo-choice { position:relative; display:block; padding:3px; border-radius:10px; border:2px solid transparent; }
.cs-demo-choice.is-match { border-color:var(--g-accent); background:var(--g-soft); animation:cs-example 3s ease-in-out infinite; }
.cs-demo-choice > .cs-icon { position:absolute; right:-3px; bottom:-4px; width:19px; height:19px; padding:2px; border-radius:50%; background:var(--g-accent); color:var(--g-accent-text); }
.cs-round-toolbar { position:relative; display:grid; grid-template-columns:64px minmax(0,1fr) 64px; align-items:center; gap:8px; margin-bottom:8px; }
.games-page--colors-shapes .cs-icon-button { display:flex; align-items:center; justify-content:center; width:64px; height:64px; min-height:64px; padding:0; border-radius:18px; color:var(--g-text); }
.cs-progress { display:flex; flex-direction:column; align-items:center; gap:4px; font-size:12px; line-height:1.4; color:var(--g-muted); }
.cs-progress-dots { display:flex; gap:4px; align-items:center; }
.cs-progress-dots i { display:block; width:8px; height:8px; border-radius:50%; background:var(--g-line); }
.cs-progress-dots .is-done { background:var(--g-accent); }.cs-progress-dots .is-current { background:var(--g-accent); outline:2px solid var(--g-accent); outline-offset:2px; }
.cs-help { position:static; }.cs-help summary { list-style:none; cursor:pointer; }.cs-help summary::-webkit-details-marker { display:none; }
.cs-help[open] summary { border-color:var(--g-accent); }
.cs-help-popover { position:absolute; inset-inline:0; top:calc(100% + 8px); z-index:5; padding:22px 14px 14px; border:2px solid var(--g-line); border-radius:20px; background:var(--g-surface); box-shadow:0 14px 30px #00123230; text-align:center; }
.cs-help-popover p { margin-top:12px; font-size:14px; color:var(--g-muted); }
.games-page--colors-shapes .cs-round [data-question] { font-size:16px; font-weight:500; line-height:1.4; color:var(--g-muted); margin:0 0 4px; }
.cs-round .game-visual-target { display:flex; flex-direction:column; align-items:center; gap:0; padding:4px 0 8px; border-radius:22px; }
.cs-round .game-visual-target .cs-shape { width:110px; height:110px; filter:drop-shadow(0 3px 2px #00123218); }
.cs-sample-name { font-size:13px; line-height:1.4; color:var(--g-muted); }
.cs-round .game-answers { gap:12px; margin-top:4px; }
.games-page--colors-shapes .cs-round .game-answer { position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:0; min-height:112px; padding:5px 8px; border-radius:20px; touch-action:manipulation; }
.cs-answer-name { font-size:14px; line-height:1.4; font-weight:600; }
.games-page--colors-shapes .game-answer.is-wrong { background:var(--g-soft); border-color:var(--g-line); color:var(--g-text); opacity:1; box-shadow:none; }
.cs-round:has(.is-wrong) .game-visual-target { outline:2px dashed var(--g-accent); outline-offset:-2px; }
.games-page--colors-shapes .game-answer.is-correct { opacity:1; animation:cs-confirm .32s ease-out; }
.cs-correct-mark { display:flex; align-items:center; justify-content:center; position:absolute; top:7px; right:7px; width:26px; height:26px; border-radius:50%; color:#fff; background:#126b56; }
.cs-correct-mark .cs-icon { width:20px; height:20px; }
.cs-round .game-feedback { min-height:34px; margin:8px 0 4px; font-size:14px; line-height:1.4; color:var(--g-text); }
.games-page--colors-shapes .cs-next { width:100%; min-height:64px; justify-content:center; gap:18px; margin-top:4px; padding:10px 18px; font-size:18px; touch-action:manipulation; }
.cs-next .cs-icon { width:30px; height:30px; }
.cs-result-art { position:relative; display:block; width:180px; margin:0 auto 16px; }.cs-result-art>.cs-icon { position:absolute; right:0; bottom:0; width:50px; height:50px; padding:9px; border-radius:50%; background:var(--g-accent); color:var(--g-accent-text); }
.cs-result-actions { display:flex; justify-content:center; flex-wrap:wrap; gap:12px; margin-top:22px; }.cs-result-actions button { min-height:64px; gap:10px; }
@keyframes cs-example { 0%,25%,100%{opacity:.55} 45%,85%{opacity:1} }
@keyframes cs-confirm { from{opacity:.6} to{opacity:1} }
@media(max-width:600px) {
    .games-hero { grid-template-columns:minmax(0,1fr) 90px; gap:10px; padding:16px 0 10px; }
    .games-hero>div:first-child { display:contents; }.games-hero h1 { grid-column:1; grid-row:1; font-size:30px; line-height:1.2; }
    .games-hero-visual { grid-column:2; grid-row:1; }.games-hero-art { max-height:90px; margin:0; }.games-hero-spark { display:none; }
    .games-section-jumps { grid-column:1 / -1; margin:0; gap:10px; flex-wrap:nowrap; }.games-section-jumps .games-button { flex:1; min-width:0; padding:9px 10px; gap:7px; font-size:14px; line-height:1.4; }
    .games-section-jumps .games-icon { width:23px; height:23px; flex-basis:23px; }.games-hero .games-lead { grid-column:1 / -1; margin:0; font-size:15px; }
    .games-halloween-feature { grid-template-columns:56px minmax(0,1fr); gap:10px; padding:10px 12px; margin:10px 0 20px; text-align:left; }.games-halloween-feature picture { max-width:56px; }.games-halloween-feature img { width:56px; height:64px; }
    .games-halloween-feature>div { gap:6px; }.games-halloween-feature .games-eyebrow { display:none; }.games-halloween-feature h2 { font-size:17px; line-height:1.4; }.games-halloween-feature .games-button { grid-row:1; min-width:0; padding:8px 10px; font-size:14px; }
    [data-game="colors-shapes"] { padding:12px; }.cs-modes { gap:12px; }.cs-mode-card { min-height:220px; gap:9px; padding:14px 7px; border-radius:20px; }.cs-mode-name { font-size:17px; }.cs-mode-art { height:100px; }
    .cs-mode-card .cs-demo { gap:3px; }.cs-mode-card .cs-demo .cs-shape { width:25px; height:25px; }.cs-mode-card .cs-demo>.cs-icon { width:15px; height:15px; }.cs-mode-card .cs-demo-options { gap:2px; }.cs-mode-card .cs-demo-choice { padding:0; border-width:1px; }.cs-mode-card .cs-demo-choice>.cs-icon { width:14px; height:14px; }
    .cs-round .game-visual-target .cs-shape { width:94px; height:94px; }.cs-round .game-answers { gap:10px; }.games-page--colors-shapes .cs-round .game-answer { min-height:96px; padding:3px 6px; }.cs-round .game-answer .cs-shape { width:62px; height:62px; }.cs-round .game-feedback { min-height:38px; margin-top:7px; font-size:13px; }
}
@media(max-height:700px) {
    .cs-round .game-visual-target .cs-shape { width:80px; height:80px; }.cs-round .game-visual-target { padding:0 0 4px; }.cs-round .game-feedback { min-height:36px; }
}
@media(max-height:550px) and (min-width:600px) {
    .cs-round .game-answers { grid-template-columns:repeat(4,minmax(0,1fr)); }.games-page--colors-shapes .cs-round .game-answer { min-height:90px; }.cs-round .game-answer .cs-shape { width:58px; height:58px; }
}
@media(prefers-reduced-motion:reduce) { html:has(.games-section-jumps) { scroll-behavior:auto; } }
