.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; }
.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: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; }
@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-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 .games-play-heading { background:repeating-linear-gradient(transparent 0 10px,var(--g-line) 10px 11px,transparent 11px 20px) center 30px/220px 90px no-repeat; }
.games-page--music-quiz .game-heading-mark { border-radius:50% 50% 16px 16px; }
.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; }
}
@media (forced-colors: active) {
    .games-hero h1 span { background: none; -webkit-text-fill-color: currentColor; }
    .games-page::before, .games-page::after { display: none; }
}
