:root {
    color-scheme: dark;
    --bg: #12151b;
    --surface: #1b2028;
    --surface-2: #242a33;
    --surface-3: #2c333e;
    --text: #e6e7e8;
    --muted: #c7c9cc;
    --subtle: #9298a1;
    --green: #6aaa64;
    --green-dark: #477743;
    --yellow: #c9b458;
    --yellow-dark: #82742f;
    --absent: #515866;
    --line: rgba(255, 255, 255, 0.09);
    --focus: #f2d870;
    --danger: #ff938c;
    --radius: 24px;
    --type-xs: 0.75rem;
    --type-sm: 0.875rem;
    --type-base: 1rem;
    --type-lg: 1.125rem;
    --ease-standard: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 20px;
    background: var(--bg);
}

body {
    min-width: 280px;
    margin: 0;
    overflow-x: clip;
    background:
        radial-gradient(circle at 12% 8%, rgba(106, 170, 100, 0.10), transparent 28rem),
        radial-gradient(circle at 88% 26%, rgba(201, 180, 88, 0.07), transparent 25rem),
        var(--bg);
    color: var(--text);
    font-family: 'Vazirmatn', sans-serif;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button, a { font: inherit; }

[hidden] { display: none !important; }

.skip-link {
    position: fixed;
    z-index: 200;
    inset-block-start: 10px;
    inset-inline-start: 10px;
    padding: 11px 16px;
    border-radius: 12px;
    background: var(--focus);
    color: #12151b;
    font-weight: 800;
    transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--yellow);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.eyebrow > span {
    width: 7px;
    height: 7px;
    display: inline-block;
    margin-inline-end: 6px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 6px rgba(106, 170, 100, 0.12);
}

h1, h2, h3, p { margin-block-start: 0; }
h1, h2, h3 { line-height: 1.24; text-wrap: balance; }

.game-hero {
    position: relative;
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: clamp(48px, 5vw, 72px) 0 64px;
    display: grid;
    grid-template-columns: minmax(0, 0.96fr) minmax(500px, 1.04fr);
    gap: clamp(40px, 5vw, 64px);
    align-items: center;
}

.legacy-anchor {
    position: absolute;
    inset-block-start: 0;
    inset-inline-start: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.game-intro { min-width: 0; }

.game-intro h1 {
    margin-bottom: 20px;
    max-width: 620px;
    font-size: clamp(2.65rem, 4.4vw, 4rem);
    font-weight: 900;
    line-height: 1.18;
    letter-spacing: -0.025em;
}

[lang='en'] .game-intro h1 { font-size: clamp(2.5rem, 4vw, 3.9rem); letter-spacing: -0.035em; }

.game-intro h1 span { display: block; color: var(--green); }

.game-lede {
    max-width: 650px;
    margin-bottom: 24px;
    color: var(--muted);
    font-size: clamp(var(--type-base), 1.35vw, var(--type-lg));
    line-height: 1.85;
}

.quick-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin: 0;
    padding: 0;
    color: var(--muted);
    font-size: var(--type-sm);
    list-style: none;
}

.quick-facts li { display: inline-flex; align-items: baseline; gap: 4px; }
.quick-facts li + li::before { content: ''; width: 1px; height: 13px; margin-inline-end: 8px; background: var(--line); }
.quick-facts strong { color: var(--yellow); font-size: var(--type-base); }

.hero-app-cta {
    width: fit-content;
    max-width: 100%;
    margin-block-start: 28px;
    margin-inline-end: auto;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 18px;
    background: rgba(36, 42, 51, 0.72);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18), inset 0 1px rgba(255, 255, 255, 0.025);
}

.hero-app-cta-heading {
    margin-bottom: 14px;
    text-align: center;
}

.hero-app-cta-heading span { min-width: 0; display: grid; line-height: 1.4; }
.hero-app-cta-heading strong { color: var(--text); font-size: var(--type-sm); }
.hero-app-cta-heading small { margin-top: 3px; color: var(--subtle); font-size: var(--type-xs); }

.hero-qr-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    direction: ltr;
}

.hero-qr-card {
    min-width: 0;
    display: grid;
    justify-items: center;
    gap: 9px;
    padding: 10px 10px 11px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    background: rgba(15, 18, 24, 0.54);
    color: var(--text);
    text-decoration: none;
    transition: border-color 180ms var(--ease-standard), background 180ms var(--ease-standard), transform 140ms var(--ease-standard);
}

.hero-qr-card:hover {
    border-color: rgba(106, 170, 100, 0.42);
    background: rgba(24, 29, 36, 0.78);
}

.hero-qr-card:active { transform: scale(0.98); }
.hero-qr-card:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.hero-qr-card > img {
    width: clamp(116px, 10vw, 144px);
    height: auto;
    aspect-ratio: 1;
    display: block;
    border-radius: 10px;
    background: #fff;
}

.hero-qr-card span { display: grid; justify-items: center; line-height: 1.35; }
.hero-qr-card strong { font-size: var(--type-sm); }
.hero-qr-card small { color: var(--subtle); font-size: var(--type-xs); }
.hero-qr-card:hover small { color: var(--muted); }

.hero-qr-card img {
    transition: filter 180ms var(--ease-standard);
}
.hero-qr-card:hover img { filter: brightness(1.03); }

.daily-device-frame {
    position: relative;
    z-index: 0;
    width: min(100%, 584px);
    min-width: 0;
    justify-self: center;
    padding: 8px;
    border: 1px solid rgba(106, 170, 100, 0.28);
    border-radius: 46px;
    background: #0b0e13;
    box-shadow:
        0 18px 44px -20px rgba(0, 0, 0, 0.72),
        0 54px 110px -44px rgba(0, 0, 0, 0.9),
        0 0 42px -24px rgba(106, 170, 100, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.daily-device-frame::before {
    content: '';
    position: absolute;
    z-index: -1;
    inset: auto 8% -32px;
    height: 68px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.76);
    filter: blur(22px);
    transform: scaleX(0.96);
    pointer-events: none;
}

.game-shell {
    position: relative;
    min-width: 0;
    width: 100%;
    min-height: 850px;
    padding: 24px clamp(16px, 2.5vw, 24px) 28px;
    overflow: hidden;
    border: 1px solid #26313a;
    border-radius: 40px;
    background: var(--bg);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.game-shell::before {
    content: '';
    position: absolute;
    width: 180px;
    height: 180px;
    inset-block-start: -100px;
    inset-inline-end: -70px;
    border-radius: 50%;
    background: rgba(201, 180, 88, 0.07);
    filter: blur(12px);
    pointer-events: none;
}

.game-topline {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    margin-bottom: 11px;
    color: var(--muted);
    font-size: var(--type-sm);
    font-weight: 800;
}

.game-mark, .live-chip { display: inline-flex; align-items: center; }
.game-mark { color: var(--text); font-size: var(--type-lg); }
.live-chip {
    gap: 10px;
    min-height: 32px;
    padding: 5px 11px;
    border: 1px solid rgba(106, 170, 100, 0.18);
    border-radius: 999px;
    background: rgba(106, 170, 100, 0.075);
    color: var(--muted);
    font-size: 0.8rem;
    white-space: nowrap;
}
.live-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(106, 170, 100, 0.11); }

.daily-calendar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 46px;
    margin-bottom: 16px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(36, 42, 51, 0.55);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.02);
}

.daily-date, .daily-reset { min-width: 0; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.daily-date { overflow: hidden; color: var(--muted); }
.daily-reset { color: var(--yellow); }
.daily-date svg, .daily-reset svg { width: 17px; height: 17px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.daily-date strong { overflow: hidden; color: var(--text); font-size: 0.8125rem; text-overflow: ellipsis; }
.daily-reset small { color: var(--subtle); font-size: var(--type-xs); font-weight: 700; }
.daily-reset strong { color: var(--text); font-size: 0.8125rem; }
#daily-countdown, #result-countdown { font-variant-numeric: tabular-nums; letter-spacing: 0.08em; }

.game-message {
    position: relative;
    min-height: 27px;
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 0.84rem;
    text-align: center;
}

.game-message[data-tone='error'] { color: var(--danger); }
.game-message[data-tone='success'] { color: #9bd696; }
.game-message[data-tone='warning'] { color: #e8d47f; }

.game-stage { display: grid; gap: 28px; }

.game-board {
    width: min(100%, 374px);
    margin-inline: auto;
    display: grid;
    gap: 7px;
    direction: rtl;
    perspective: 700px;
}

.board-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 7px;
    direction: rtl;
}

.game-tile {
    aspect-ratio: 1;
    min-width: 0;
    display: grid;
    place-items: center;
    border: 2px solid #30363e;
    border-radius: 8px;
    background: #12151b;
    color: var(--text);
    font-size: clamp(1.38rem, 4vw, 1.82rem);
    font-weight: 900;
    line-height: 1;
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

.game-tile.filled { border-color: #666e78; background: #171b22; }
.game-tile.correct, .demo-tile.correct { border-color: var(--green); background: var(--green); color: #fff; }
.game-tile.present, .demo-tile.present { border-color: var(--yellow); background: var(--yellow); color: #fff; }
.game-tile.absent, .demo-tile.absent { border-color: var(--absent); background: var(--absent); color: #fff; }

.game-tile.pop { animation: tile-pop 150ms ease-out; }
.game-tile.revealing {
    will-change: transform;
    animation: tile-reveal 320ms cubic-bezier(.4, 0, .2, 1) both;
}
.board-row.shake { animation: row-shake 420ms ease; }

.game-keyboard {
    width: 100%;
    max-width: 540px;
    margin-inline: auto;
    display: grid;
    gap: 8px;
    direction: ltr;
}

.keyboard-row { display: flex; gap: 4px; direction: ltr; }

.game-keyboard button {
    min-width: 0;
    height: 58px;
    flex: 1 1 0;
    display: inline-grid;
    place-items: center;
    padding: 0 2px;
    border: 1px solid rgba(255, 255, 255, 0.045);
    border-radius: 12px;
    background: var(--surface-3);
    color: #fff;
    font-family: 'Vazirmatn', sans-serif;
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .23);
    transition: transform 100ms ease, filter 140ms ease, background 180ms var(--ease-standard);
}

.game-keyboard button:hover:not(:disabled) { filter: brightness(1.1); }
.game-keyboard button:active:not(:disabled) { transform: scale(.96); box-shadow: 0 2px 5px rgba(0, 0, 0, .18); }
.game-keyboard button:disabled { cursor: default; }
.game-shell[data-ready='false'] .game-keyboard button { opacity: 0.48; }
.game-keyboard button.correct { background: var(--green); box-shadow: 0 4px 10px rgba(47, 92, 43, .3); color: #fff; }
.game-keyboard button.present { background: var(--yellow); box-shadow: 0 4px 10px rgba(109, 93, 28, .3); color: #fff; }
.game-keyboard button.absent { background: #565758; box-shadow: 0 4px 10px rgba(0, 0, 0, .22); color: #fff; }
.game-keyboard button.status-settle { animation: key-status-settle 160ms cubic-bezier(.2, .8, .2, 1); }
.game-keyboard .action-key { flex-grow: 1.5; background: rgba(201, 180, 88, .20); border-color: rgba(201, 180, 88, .2); }
.action-key svg { width: 22px; height: 22px; display: block; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.action-key .delete-key-icon { stroke-width: 1.9; }
.action-key span { display: none; }

.result-card {
    margin-top: 20px;
    padding: 22px;
    border: 1px solid rgba(106, 170, 100, 0.3);
    border-radius: 20px;
    background: rgba(18, 21, 27, 0.72);
    text-align: center;
}

.result-kicker { margin-bottom: 5px; color: var(--yellow); font-size: 0.72rem; font-weight: 800; }
.result-card h2 { margin-bottom: 5px; font-size: 1.35rem; }
.result-card > p { margin-bottom: 10px; }
.answer-line { font-size: 1rem; }
.answer-line strong { color: #a8dea3; font-size: 1.4rem; }
.meaning { max-height: 120px; overflow: auto; padding: 12px; border-radius: 12px; background: var(--surface-2); color: var(--muted); font-size: 0.82rem; white-space: pre-line; text-align: start; }
.result-timer { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 0.78rem; }
.result-timer strong { color: var(--text); }

.share-button, .retry-button {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 10px 20px;
    border: 0;
    border-radius: 13px;
    background: var(--green);
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}

.share-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.retry-button { position: relative; z-index: 4; margin: 18px auto 0; }

.game-loading, .game-rollover {
    position: absolute;
    z-index: 3;
    inset: 58px 0 0;
    display: grid;
    place-items: center;
    background: rgba(27, 32, 40, 0.68);
    backdrop-filter: blur(3px);
}

.game-loading span { width: 32px; height: 32px; border: 3px solid rgba(255,255,255,.18); border-top-color: var(--green); border-radius: 50%; animation: spin 700ms linear infinite; }
.game-rollover span { padding: 13px 18px; border-radius: 12px; background: var(--green); color: white; font-weight: 900; }

.game-toast {
    position: fixed;
    z-index: 210;
    left: 50%;
    right: auto;
    inset-block-end: max(22px, env(safe-area-inset-bottom));
    transform: translateX(-50%);
    min-width: min(310px, calc(100vw - 32px));
    padding: 12px 18px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #eff0f1;
    color: #171a20;
    font-size: 0.86rem;
    font-weight: 800;
    text-align: center;
    box-shadow: 0 18px 50px rgba(0,0,0,.35);
}

.independence-note {
    grid-column: 1 / -1;
    width: min(700px, 100%);
    margin: -12px auto 0;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(27, 32, 40, 0.52);
    color: var(--muted);
    font-size: 0.8125rem;
    line-height: 1.65;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    text-align: start;
}
.independence-note svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: var(--yellow); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.how-section, .faq-section, .editorial-section, .app-cta {
    width: min(1080px, calc(100% - 40px));
    margin: 0 auto;
}

.how-section, .faq-section { padding: clamp(68px, 8vw, 96px) 0; }
.section-heading { max-width: 690px; margin: 0 auto 34px; text-align: center; }
.section-heading h2, .editorial-section h2, .app-cta h2 { margin-bottom: 14px; font-size: clamp(1.8rem, 3vw, 2.75rem); font-weight: 900; letter-spacing: -0.02em; }
.section-heading > p:last-child, .editorial-copy, .app-cta p { color: var(--muted); }

.rules-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.rules-grid article { min-width: 0; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: rgba(36, 42, 51, 0.62); }
.demo-tile { width: 58px; height: 58px; display: grid; place-items: center; margin-bottom: 22px; border: 2px solid #56606d; border-radius: 10px; font-size: 1.6rem; font-weight: 900; }
.rules-grid h3 { margin-bottom: 8px; font-size: 1.02rem; }
.rules-grid p { margin-bottom: 0; color: var(--muted); font-size: 0.89rem; }

.editorial-section {
    padding: clamp(54px, 8vw, 92px) clamp(20px, 5vw, 64px);
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(44, 51, 62, .75), rgba(27, 32, 40, .55));
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: clamp(30px, 7vw, 80px);
}
.editorial-copy p:last-child { margin-bottom: 0; }

.faq-list { max-width: 820px; margin: 0 auto; display: grid; gap: 10px; }
.faq-list details { border: 1px solid var(--line); border-radius: 14px; background: rgba(36, 42, 51, .58); }
.faq-list summary { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 18px; cursor: pointer; font-weight: 800; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: '+'; color: var(--yellow); font-size: 1.35rem; line-height: 1; }
.faq-list details[open] summary::after { content: '−'; }
.faq-list details p { margin: 0; padding: 0 18px 18px; color: var(--muted); font-size: .9rem; }

.app-cta {
    width: min(760px, calc(100% - 40px));
    margin-bottom: 80px;
    padding: clamp(28px, 5vw, 42px);
    border: 1px solid rgba(106, 170, 100, .27);
    border-radius: 24px;
    background: rgba(36, 42, 51, .68);
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 18px;
    text-align: center;
}
.app-cta > img { width: 80px; height: 80px; border-radius: 19px; box-shadow: 0 16px 38px rgba(0,0,0,.24); }
.app-cta > div { max-width: 540px; }
.app-cta h2 { margin-bottom: 8px; font-size: clamp(1.35rem, 2.2vw, 2rem); }
.app-cta p { margin-bottom: 0; font-size: .86rem; }
.app-cta .store-badges { justify-content: center; }
.store-badges {
    --store-badge-height: 48px;
    display: flex;
    align-items: center;
    gap: 10px;
    direction: ltr;
}
.store-badges a {
    position: relative;
    width: calc(var(--store-badge-height) * 3.357143);
    height: var(--store-badge-height);
    border-radius: 8px;
    background: #000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: clip;
    transition: filter 180ms var(--ease-standard);
}
.store-badges a:hover { filter: brightness(1.08); }
.store-badges a:active { filter: brightness(0.92); }
.store-badges a::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid #a6a6a6;
    border-radius: inherit;
    pointer-events: none;
}
.store-badges img {
    width: auto;
    height: var(--store-badge-height);
    max-width: none;
    display: block;
    object-fit: contain;
}
/* The official Google Play PNG carries transparent padding around its badge.
   Crop that canvas inside the shared slot so both official marks read at one height. */
.store-badges a[href*="play.google.com"] img { height: calc(var(--store-badge-height) * 1.488095); }
.store-badges a[href*="apps.apple.com"] img { clip-path: inset(1.5px round 6px); }

.smart-banner {
    position: relative;
    z-index: 100;
    min-height: 68px;
    padding: 8px max(14px, env(safe-area-inset-right)) 8px max(14px, env(safe-area-inset-left));
    border-bottom: 1px solid var(--line);
    background: #f3f3f4;
    color: #15181e;
    display: flex;
    align-items: center;
    gap: 10px;
}
.smart-banner img { border-radius: 11px; }
.banner-close { width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: #62666d; font-size: 1.5rem; cursor: pointer; }
.banner-copy { min-width: 0; flex: 1; display: grid; line-height: 1.2; }
.banner-copy small { margin-top: 3px; color: #686d74; font-size: .7rem; }
.smart-banner > a { min-height: 44px; display: inline-flex; align-items: center; padding: 7px 16px; border-radius: 10px; background: var(--green-dark); color: white; font-size: .8rem; font-weight: 900; text-decoration: none; }

@keyframes tile-pop { 50% { transform: scale(1.1); } }
@keyframes tile-reveal { 0% { transform: rotateY(0); } 49.9% { transform: rotateY(90deg); } 50.1% { transform: rotateY(90deg); } 100% { transform: rotateY(0); } }
@keyframes key-status-settle { 0% { transform: scale(.94); } 60% { transform: scale(1.035); } 100% { transform: scale(1); } }
@keyframes row-shake { 15%, 45%, 75% { transform: translateX(-5px); } 30%, 60%, 90% { transform: translateX(5px); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 980px) {
    .game-hero { grid-template-columns: 1fr; gap: 38px; padding-top: 52px; }
    .game-intro { max-width: 720px; margin-inline: auto; text-align: center; }
    .game-lede { margin-inline: auto; }
    .quick-facts { justify-content: center; }
    .hero-app-cta { margin-inline: auto; }
    .independence-note { margin-top: -8px; }
}

@media (max-width: 700px) {
    .game-hero, .how-section, .faq-section, .editorial-section, .app-cta { width: min(100% - 28px, 1080px); }
    .game-hero { padding-top: 36px; padding-bottom: 44px; gap: 30px; }
    .daily-device-frame { grid-row: 1; }
    .game-intro { grid-row: 2; }
    .independence-note { grid-row: 3; }
    .game-intro h1 { font-size: clamp(2.15rem, 10vw, 3rem); }
    [lang='en'] .game-intro h1 { font-size: clamp(2rem, 9vw, 2.85rem); }
    .game-shell { border-radius: 24px; }
    .rules-grid { grid-template-columns: 1fr; }
    .rules-grid article { display: grid; grid-template-columns: auto 1fr; column-gap: 18px; align-items: center; }
    .rules-grid .demo-tile { grid-row: 1 / 3; margin: 0; }
    .rules-grid h3 { margin: 0; }
    .rules-grid p { align-self: start; }
    .editorial-section { grid-template-columns: 1fr; gap: 18px; border-radius: 24px; }
}

@media (max-width: 430px) {
    .game-hero { width: 100%; }
    .game-intro, .independence-note { width: calc(100% - 28px); }
    .game-intro h1 { font-size: 2.35rem; }
    [lang='en'] .game-intro h1 { font-size: 2.05rem; }
    .daily-device-frame { width: calc(100% - 16px); padding: 4px; border-radius: 38px; }
    .daily-device-frame::before { inset-inline: 12%; bottom: -22px; height: 50px; filter: blur(18px); }
    .game-shell { min-height: 760px; padding: 16px 8px 18px; border-radius: 33px; }
    .game-topline { margin-inline: 3px; }
    .game-mark { font-size: 1rem; }
    .live-chip { min-height: 32px; padding-inline: 9px; font-size: var(--type-xs); }
    .daily-calendar { gap: 4px; min-height: 42px; padding: 8px; border-radius: 13px; }
    .daily-date, .daily-reset { gap: 5px; }
    .daily-date { flex: 1 1 0; }
    .daily-reset { flex: 0 0 auto; }
    .daily-date strong { min-width: 0; }
    .daily-date strong, .daily-reset strong { font-size: var(--type-xs); }
    .daily-reset small, .daily-reset svg { display: none; }
    .game-board { width: min(100%, 282px); }
    .board-row, .game-board { gap: 5px; }
    .keyboard-row { gap: 3px; }
    .game-keyboard { gap: 7px; }
    .game-keyboard button { height: 48px; border-radius: 10px; font-size: .95rem; }
    .action-key span { display: none; }
    .independence-note { margin-top: -10px; }
    .store-badges { flex-direction: column; }
    .hero-app-cta { width: 100%; padding: 13px; }
    .hero-qr-grid { gap: 8px; }
    .hero-qr-card { padding: 8px 7px 9px; }
    .hero-qr-card > img { width: min(116px, 100%); }
}

@media (max-width: 340px) {
    .live-chip { padding-inline: 8px; }
    .live-chip i { display: none; }
    .game-intro h1 { font-size: 2.05rem; }
}

@media (orientation: landscape) and (max-height: 500px) and (max-width: 900px) {
    .game-hero { padding-top: 16px; gap: 18px; }
    .daily-device-frame { max-width: 820px; border-radius: 34px; }
    .game-shell { min-height: 0; padding-block: 10px 14px; border-radius: 28px; }
    .game-message { min-height: 22px; margin-bottom: 6px; }
    .game-stage { grid-template-columns: minmax(190px, .7fr) minmax(350px, 1.3fr); align-items: center; gap: 14px; }
    .game-board { width: min(100%, 220px); }
    .game-keyboard button { height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media (forced-colors: active) {
    .game-tile, .game-keyboard button, .demo-tile { forced-color-adjust: none; }
    .correct { background: CanvasText !important; color: Canvas !important; border-color: CanvasText !important; }
    .present { background: Highlight !important; color: HighlightText !important; border-color: Highlight !important; }
    .absent { background: Canvas !important; color: CanvasText !important; border-style: dashed !important; }
}
