.games-section{--game-accent:#7044e8;--game-soft:#f2ecff;--game-ink:#462395;width:var(--ozdru-main);margin:28px auto 40px;padding:24px;border:1px solid var(--line);border-radius:26px;background:linear-gradient(125deg,rgba(123,75,244,.065),transparent 48%,rgba(17,173,152,.07)),var(--card);box-shadow:var(--shadow-soft);scroll-margin-top:100px}
.games-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}
.games-eyebrow{display:inline-block;color:var(--purple);font-size:10px;font-weight:800;letter-spacing:.11em}
.games-heading h2{font-size:23px;letter-spacing:-.035em;margin:6px 0;line-height:1.25}
.games-heading p{font-size:12px;color:var(--muted);line-height:1.6;margin:0}
.game-stats{font-size:11px;line-height:1.7;text-align:right;flex-shrink:0;padding:10px 14px;border:1px solid rgba(123,75,244,.19);border-radius:16px;background:var(--card);box-shadow:0 4px 14px rgba(89,49,159,.04)}
.game-stats b{color:var(--purple);font-size:15px}
.game-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.game-card{--accent:#7044e8;--soft:#f0e9ff;--ink:#462395;position:relative;isolation:isolate;display:grid;grid-template-columns:46px minmax(0,1fr) 23px;gap:5px 10px;align-items:center;text-align:left;padding:18px 14px;border:1px solid color-mix(in srgb,var(--accent) 24%,var(--line));border-radius:20px;background:linear-gradient(135deg,var(--soft),var(--card) 88%);color:var(--text);overflow:hidden;box-shadow:0 6px 18px color-mix(in srgb,var(--accent) 8%,transparent);transition:transform .2s,box-shadow .2s,border-color .2s}
.game-card[data-game="sentence"]{--accent:#008b79;--soft:#e2f8f1;--ink:#086153}
.game-card[data-game="type"]{--accent:#c26417;--soft:#fff0dc;--ink:#8c3d0b}
.game-card::before{content:'';position:absolute;width:85px;height:85px;right:-25px;top:-35px;border:12px solid color-mix(in srgb,var(--accent) 8%,transparent);border-radius:50%;z-index:-1;pointer-events:none}
.game-card::after{content:'↗';grid-column:3;grid-row:1/4;display:grid;place-items:center;width:24px;height:24px;border-radius:50%;color:var(--ink);font-size:16px;background:color-mix(in srgb,var(--accent) 9%,transparent)}
.game-card:hover{transform:translateY(-3px);border-color:var(--accent);box-shadow:0 10px 22px color-mix(in srgb,var(--accent) 15%,transparent)}
.game-card[aria-pressed="true"]{border-color:var(--accent);box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 18%,transparent)}
.game-card strong{grid-column:2;grid-row:1;font-size:13px;line-height:1.45;color:var(--ink)}
.game-card>span:not(.game-icon){display:block;grid-column:2;grid-row:2;font-size:11px;line-height:1.6;color:var(--muted)}
.game-card small{grid-column:2;grid-row:3;justify-self:start;margin-top:4px;padding:3px 7px;border-radius:7px;background:color-mix(in srgb,var(--accent) 9%,transparent);color:var(--ink);font-size:9px;font-weight:700;line-height:1.5}
.game-icon{grid-column:1;grid-row:1/4;display:grid;place-items:center;width:46px;height:46px;background:linear-gradient(140deg,color-mix(in srgb,var(--accent) 75%,white),var(--accent));color:white;border-radius:15px;font-size:25px;font-weight:700;box-shadow:0 5px 12px color-mix(in srgb,var(--accent) 20%,transparent)}
.game-arena{margin-top:18px;padding:24px;border:1px solid color-mix(in srgb,var(--game-accent) 22%,var(--line));border-radius:22px;background:linear-gradient(145deg,var(--game-soft),var(--card) 55%);scroll-margin-top:100px;animation:game-enter .25s ease-out}
.game-arena[data-mode="sentence"]{--game-accent:#008b79;--game-soft:#e9faf5;--game-ink:#086153}
.game-arena[data-mode="type"]{--game-accent:#c26417;--game-soft:#fff5e7;--game-ink:#8c3d0b}
.game-arena[hidden]{display:none}
.game-top{display:flex;align-items:center;justify-content:space-between;gap:12px;color:var(--muted);font-size:11px}
.game-top b{color:var(--game-ink);font-size:13px}
.game-top>span{padding:5px 10px;background:var(--card);border-radius:20px;color:var(--game-ink);font-weight:800}
.game-progress{height:6px;background:color-mix(in srgb,var(--game-accent) 12%,var(--card));border-radius:10px;margin:15px 0 18px;overflow:hidden}
.game-progress span{display:block;height:100%;background:linear-gradient(90deg,var(--game-accent),color-mix(in srgb,var(--game-accent) 55%,white));border-radius:10px;transition:width .25s}
.game-arena>p{font-size:12px;color:var(--muted);line-height:1.7;margin:8px 0}
.game-question{font-size:clamp(20px,2.4vw,26px);line-height:1.5;margin:10px 0 20px;letter-spacing:-.02em;overflow-wrap:anywhere;color:var(--text)}
.game-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:14px 0}
.game-option{display:flex;align-items:center;gap:11px;min-height:56px;padding:12px 14px;border:1px solid var(--line);border-radius:14px;color:var(--text);background:var(--card);text-align:left;font-size:12px;line-height:1.6;overflow-wrap:anywhere;transition:background .18s,border-color .18s,transform .18s}
.game-choice-letter{display:grid;place-items:center;flex-shrink:0;width:27px;height:27px;border-radius:9px;background:var(--game-soft);color:var(--game-ink);font-size:11px;font-weight:800}
.game-option:hover:not(:disabled){border-color:var(--game-accent);transform:translateY(-1px);background:color-mix(in srgb,var(--game-soft) 40%,var(--card))}
.game-option:disabled{cursor:default;opacity:1}
.game-option.correct{border-color:#18916c;background:#e4f8ed;color:#105d40}
.game-option.correct .game-choice-letter{background:#18916c;color:white}
.game-option.wrong{border-color:#d54f6c;background:#fff0f3;color:#9b2444}
.game-option.wrong .game-choice-letter{background:#d54f6c;color:white}
.game-action{min-height:43px;padding:11px 20px;border:0;border-radius:12px;color:#fff;background:var(--game-accent);text-align:center;font-size:12px;font-weight:750;box-shadow:0 4px 10px color-mix(in srgb,var(--game-accent) 18%,transparent)}
.game-close{background:var(--card);border:1px solid var(--line);border-radius:9px;color:var(--muted);padding:7px 10px;font-size:10px;flex-shrink:0}
.game-feedback{font-size:12px;line-height:1.7;margin:16px 0;padding:14px 16px;border-radius:14px;background:var(--card);border:1px solid var(--line)}
.game-feedback:empty{display:none}
.game-feedback b{color:var(--game-ink)}
.game-feedback p{margin:4px 0 0;color:var(--muted)}
.games-note{color:var(--muted);font-size:10px;line-height:1.6;margin:15px 0 0}
.game-result{font-size:42px;font-weight:800;letter-spacing:-.04em;margin:18px 0 8px;color:var(--game-ink)}
.game-result-medal{display:grid;place-items:center;width:56px;height:56px;margin-top:20px;border-radius:18px;background:linear-gradient(135deg,#ffe397,#efb642);color:#774700;font-size:28px;box-shadow:0 5px 15px rgba(207,149,22,.16)}
.games-section button:focus-visible{outline:3px solid var(--game-accent);outline-offset:4px}
[data-theme="dark"] .game-card{--soft:#291d46;--ink:#ceb7ff}
[data-theme="dark"] .game-card[data-game="sentence"]{--soft:#143c35;--ink:#80e3c8}
[data-theme="dark"] .game-card[data-game="type"]{--soft:#402b1b;--ink:#ffd095}
[data-theme="dark"] .game-arena{--game-soft:#291d46;--game-ink:#ceb7ff}
[data-theme="dark"] .game-arena[data-mode="sentence"]{--game-soft:#143c35;--game-ink:#80e3c8}
[data-theme="dark"] .game-arena[data-mode="type"]{--game-soft:#402b1b;--game-ink:#ffd095}
[data-theme="dark"] .game-option.correct{background:#153b2d;color:#a3ebc1}
[data-theme="dark"] .game-option.wrong{background:#42212d;color:#ffb4c4}
@keyframes game-enter{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:900px){.game-card{grid-template-columns:38px minmax(0,1fr);padding:15px 12px}.game-icon{width:38px;height:38px;border-radius:12px;font-size:22px}.game-card::after{display:none}}
@media(max-width:760px){.games-section{padding:17px;margin:22px auto 30px}.game-cards{grid-template-columns:1fr;gap:9px}.game-card{grid-template-columns:42px minmax(0,1fr) 24px;padding:13px 14px}.game-card::after{display:grid}.game-icon{width:42px;height:42px}.game-card small{grid-row:2;grid-column:2;justify-self:end;font-size:8px}.game-card>span:not(.game-icon){grid-row:3}.games-heading{align-items:flex-start;gap:10px}.games-heading h2{font-size:20px}.game-stats{font-size:10px;padding:8px 10px}.game-arena{padding:17px}.game-card strong{padding-right:0}}
@media(max-width:480px){.game-options{grid-template-columns:1fr}.game-top{flex-wrap:wrap;gap:8px}.game-top b{flex:1}.game-top>span{order:3}.game-card small{grid-row:4;justify-self:start}.games-heading p{max-width:200px}.game-stats b{font-size:13px}}
@media(prefers-reduced-motion:reduce){.game-card,.game-option,.game-progress span{transition:none}.game-card:hover,.game-option:hover{transform:none}.game-arena{animation:none}}
/* Strong color cards and an accessible native dialog. */
.game-card{--accent:#7137ff;--ink:#fff;background:linear-gradient(120deg,#7137ff,#5022ca);border-color:transparent;color:white;box-shadow:0 8px 18px #7137ff25}
.game-card[data-game="sentence"]{--accent:#007cdb;--ink:#fff;background:linear-gradient(120deg,#007cdb,#004fae)}
.game-card[data-game="type"]{--accent:#ec4a28;--ink:#fff;background:linear-gradient(120deg,#ec4a28,#b93016)}
.game-card strong,.game-card small,.game-card::after{color:#fff}
.game-card>span:not(.game-icon){color:#fff;opacity:.87}
.game-card small,.game-card::after{background:#ffffff20}
.game-card::before{border-color:#ffffff14}
.game-icon{background:#ffffff20;box-shadow:inset 0 1px 0 #ffffff35;color:white}
.game-card[aria-pressed="true"]{outline:3px solid var(--accent);outline-offset:3px}
.game-modal{--game-accent:#7137ff;--game-ink:#5423be;--game-soft:#f3ecff;border:0;padding:0;border-radius:26px;width:min(660px,calc(100vw - 28px));max-width:none;max-height:calc(100dvh - 40px);overflow:auto;background:var(--card);color:var(--text);box-shadow:0 30px 100px #0d092370}
.game-modal[open]{animation:modal-in .28s cubic-bezier(.2,.8,.2,1)}
.game-modal::backdrop{background:rgba(14,10,33,.72);backdrop-filter:blur(8px)}
.game-modal .game-arena{position:relative;margin:0;border:0;border-radius:0;padding:28px;overflow:hidden;animation:none;background:linear-gradient(155deg,var(--game-soft),var(--card) 60%);border-top:6px solid var(--game-accent)}
.game-modal .game-arena[data-mode="sentence"]{--game-accent:#007cdb;--game-soft:#edf5ff;--game-ink:#00559b}
.game-modal .game-arena[data-mode="type"]{--game-accent:#ec4a28;--game-soft:#fff0eb;--game-ink:#b42d16}
.game-sound{font-size:10px;padding:7px 10px;border:1px solid var(--line);border-radius:9px;background:var(--card);color:var(--game-ink);white-space:nowrap}
.game-modal .game-question{padding:18px;border-radius:16px;border-left:4px solid var(--game-accent);background:var(--card);box-shadow:0 5px 18px #00000004;animation:question-in .25s ease-out}
.game-modal .game-options{counter-reset:choices}
.game-modal .game-option{animation:question-in .25s ease-out both}
.game-modal .game-option:nth-child(2){animation-delay:.035s}.game-modal .game-option:nth-child(3){animation-delay:.07s}.game-modal .game-option:nth-child(4){animation-delay:.105s}
.game-modal .game-option.correct{animation:answer-pop .3s ease-out}
.game-modal .game-option.wrong{animation:answer-shake .3s ease-out}
.game-modal .game-feedback:not(:empty){animation:question-in .2s ease-out}
.game-modal .game-result-medal{animation:medal-pop .55s cubic-bezier(.15,.7,.2,1.25)}
.game-confetti{position:absolute;inset:0;overflow:hidden;pointer-events:none}
.game-confetti i{position:absolute;top:-15px;left:var(--x);width:7px;height:12px;background:#7137ff;border-radius:2px;animation:confetti-fall 1.8s ease-in calc(var(--i)*.03s) both}
.game-confetti i:nth-child(3n){background:#00a58c}.game-confetti i:nth-child(3n + 1){background:#f5b828}.game-confetti i:nth-child(3n + 2){background:#ec4a28}
[data-theme="dark"] .game-modal .game-arena[data-mode="sentence"]{--game-soft:#112b48;--game-ink:#95caff}
[data-theme="dark"] .game-modal .game-arena[data-mode="type"]{--game-soft:#422219;--game-ink:#ffae99}
@keyframes modal-in{from{opacity:0;transform:translateY(18px) scale(.96)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes question-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@keyframes answer-pop{50%{transform:scale(1.025)}}
@keyframes answer-shake{25%{transform:translateX(-5px)}75%{transform:translateX(5px)}}
@keyframes medal-pop{from{opacity:0;transform:scale(.4) rotate(-20deg)}to{opacity:1;transform:scale(1) rotate(0)}}
@keyframes confetti-fall{from{opacity:1;transform:translateY(-20px) rotate(0)}to{opacity:0;transform:translateY(550px) rotate(440deg)}}
@media(max-width:480px){.game-modal{max-height:calc(100dvh - 24px);border-radius:20px}.game-modal .game-arena{padding:18px}.game-top b{flex-basis:100%}.game-modal .game-question{font-size:20px;padding:14px}.game-modal .game-option{min-height:48px}.game-modal .game-action{width:100%}}
@media(prefers-reduced-motion:reduce){.game-modal[open],.game-modal .game-question,.game-modal .game-option,.game-modal .game-feedback,.game-modal .game-result-medal{animation:none}.game-confetti{display:none}.game-modal::backdrop{backdrop-filter:none}}


/* Clearer type hierarchy for cards and game dialogs. */
.games-heading h2{font-size:25px;font-weight:850}
.games-eyebrow{font-size:11px;font-weight:800}
.games-heading p{font-size:13px;font-weight:600}
.game-card{font-family:inherit}
.game-card strong{font-size:15px;font-weight:800;line-height:1.4}
.game-card>span:not(.game-icon){font-size:12px;font-weight:600;opacity:1;line-height:1.65}
.game-card small{font-size:10px;font-weight:750}
.game-stats{font-weight:600;font-size:12px}
.game-stats b{font-size:16px;font-weight:850}
.game-modal .game-top b{font-size:15px;font-weight:800}
.game-modal .game-top>span{font-size:12px;font-weight:800}
.game-modal .game-arena>p{font-size:14px;font-weight:600}
.game-modal .game-question{font-size:clamp(23px,2.5vw,29px);font-weight:800;line-height:1.5}
.game-modal .game-option{font-family:inherit;font-size:14px;font-weight:700;line-height:1.6}
.game-modal .game-choice-letter{font-size:12px;font-weight:800}
.game-modal .game-action{font-family:inherit;font-size:14px;font-weight:800}
.game-modal .game-close,.game-modal .game-sound{font-family:inherit;font-size:11px;font-weight:700}
.game-modal .game-feedback{font-size:14px;font-weight:600}
.game-modal .game-feedback b{font-weight:800}
.game-modal .game-feedback p{font-weight:600;line-height:1.7}
.game-modal .game-result{font-weight:850}
.games-note{font-size:11px;font-weight:550}
@media(max-width:760px){.games-heading h2{font-size:22px}.game-card strong{font-size:14px}.game-card small{font-size:9px}}
@media(max-width:480px){.game-modal .game-question{font-size:23px}.game-modal .game-option{font-size:13px}.game-modal .game-top b{font-size:14px}.game-modal .game-feedback{font-size:13px}}

