/* Archivo (SIL Open Font License 1.1, fonts/OFL.txt) stands in for San Francisco off Apple devices. */
@font-face {
    font-family: "Archivo";
    font-style: normal;
    font-weight: 100 900;
    font-stretch: 62% 125%;
    font-display: swap;
    src: url("fonts/archivo-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Archivo";
    font-style: normal;
    font-weight: 100 900;
    font-stretch: 62% 125%;
    font-display: swap;
    src: url("fonts/archivo-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* The "Primary" palette, radii and lines (spec 2026-10-10 §4.1, §13.2). tests/tokens_check.php
   compares each block with tests/design-tokens.json, SudokuKit's file: change one, change both. */
/* tokens: light */
:root {
    --paper: #F3F0E8;
    --surface: #FFFFFF;
    --ink: #151515;
    --ink2: #6B665E;
    --hairline: #DCD7CB;
    --error: #CF2E26;
    --easy-fill: #16754A;
    --easy-text: #16754A;
    --easy-on-fill: #F3F0E8;
    --medium-fill: #F2B300;
    --medium-text: #8A6000;
    --medium-on-fill: #151515;
    --hard-fill: #2149D6;
    --hard-text: #2149D6;
    --hard-on-fill: #F3F0E8;
    --extreme-fill: #CF2E26;
    --extreme-text: #CF2E26;
    --extreme-on-fill: #F3F0E8;
    --radius-board: 4px;
    --radius-key: 6px;
    --radius-button: 8px;
    --radius-card: 10px;
    --radius-floating-card: 12px;
    --line-box: 2.5px;
    --line-hairline: 1px;
}
/* tokens: dark */
@media (prefers-color-scheme: dark) {
    :root {
        --paper: #0E0E0F;
        --surface: #1B1B1D;
        --ink: #F1EEE6;
        --ink2: #9A958B;
        --hairline: #323235;
        --error: #FF6B5E;
        --easy-fill: #2FB673;
        --easy-text: #3CCB82;
        --easy-on-fill: #151515;
        --medium-fill: #FFC21A;
        --medium-text: #FFC21A;
        --medium-on-fill: #151515;
        --hard-fill: #5479FF;
        --hard-text: #7B98FF;
        --hard-on-fill: #151515;
        --extreme-fill: #FF5446;
        --extreme-text: #FF6B5E;
        --extreme-on-fill: #151515;
    }
}
/* tokens: highContrastLight */
@media (prefers-contrast: more) {
    :root {
        --paper: #FFFFFF;
        --surface: #FFFFFF;
        --ink: #000000;
        --ink2: #4A463F;
        --hairline: #8E897E;
        --error: #A8231C;
        --easy-fill: #0F6640;
        --easy-text: #0F5E3A;
        --easy-on-fill: #FFFFFF;
        --medium-fill: #F2B300;
        --medium-text: #6B4A00;
        --medium-on-fill: #000000;
        --hard-fill: #1A39A8;
        --hard-text: #1A39A8;
        --hard-on-fill: #FFFFFF;
        --extreme-fill: #B32820;
        --extreme-text: #A8231C;
        --extreme-on-fill: #FFFFFF;
        --line-box: 3px;
    }
}
/* tokens: highContrastDark */
@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
    :root {
        --paper: #000000;
        --surface: #161618;
        --ink: #FFFFFF;
        --ink2: #C2BDB3;
        --hairline: #706E68;
        --error: #FF8A80;
        --easy-fill: #3FD08A;
        --easy-text: #5FE09C;
        --easy-on-fill: #000000;
        --medium-fill: #FFD24D;
        --medium-text: #FFD24D;
        --medium-on-fill: #000000;
        --hard-fill: #7D9BFF;
        --hard-text: #9DB3FF;
        --hard-on-fill: #000000;
        --extreme-fill: #FF7468;
        --extreme-text: #FF8A80;
        --extreme-on-fill: #000000;
        --line-box: 3px;
    }
}

:root {
    color-scheme: light dark;

    /* The stylesheet's own names, on the tokens. No system blue remains: links and controls are ink. */
    --easy: var(--easy-fill);
    --medium: var(--medium-fill);
    --hard: var(--hard-fill);
    --extreme: var(--extreme-fill);
    --on-easy: var(--easy-on-fill);
    --on-medium: var(--medium-on-fill);
    --on-hard: var(--hard-on-fill);
    --on-extreme: var(--extreme-on-fill);
    --easy-ink: var(--easy-text);
    --medium-ink: var(--medium-text);
    --hard-ink: var(--hard-text);
    --extreme-ink: var(--extreme-text);
    --link: var(--ink);

    --bg: var(--paper);
    --bg-grouped: var(--surface);
    --bg-elevated: var(--surface);

    --label: var(--ink);
    --label-2: var(--ink2);
    --label-3: var(--ink2);
    --label-2-text: var(--ink2);
    --separator: var(--hairline);
    --fill: color-mix(in srgb, var(--ink) 10%, transparent);
    --fill-3: color-mix(in srgb, var(--ink) 6%, transparent);

    /* San Francisco on Apple devices (Safari and Chrome), Archivo elsewhere; width does the branding. */
    --font: -apple-system, BlinkMacSystemFont, "Archivo", system-ui, sans-serif;
    --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
    --stretch-wide: 125%;
    --stretch-display: 150%;

    --text-large-title: 2.125rem;
    --text-title1: 1.75rem;
    --text-title2: 1.375rem;
    --text-title3: 1.25rem;
    --text-body: 1.0625rem;
    --text-subheadline: .9375rem;
    --text-footnote: .8125rem;
    --text-caption: .75rem;
    --text-label: .6875rem;

    --radius-sm: var(--radius-key);
    --radius: var(--radius-button);
    --radius-lg: var(--radius-card);
    --hairline-width: 1px;
    --gutter: clamp(16px, 4vw, 24px);
    --header-height: 52px;
    --shadow-raised: 0 10px 30px rgba(0, 0, 0, .12), 0 1px 3px rgba(0, 0, 0, .08);

    --accent: var(--easy-fill);
    --on-accent: var(--easy-on-fill);
    --accent-ink: var(--easy-text);
}

@media (prefers-color-scheme: dark) {
    :root { --shadow-raised: 0 10px 30px rgba(0, 0, 0, .6), 0 0 0 1px var(--hairline); }
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
    :root { --hairline-width: .5px; }
}

.accent-easy { --accent: var(--easy-fill); --on-accent: var(--easy-on-fill); --accent-ink: var(--easy-text); }
.accent-medium { --accent: var(--medium-fill); --on-accent: var(--medium-on-fill); --accent-ink: var(--medium-text); }
.accent-hard { --accent: var(--hard-fill); --on-accent: var(--hard-on-fill); --accent-ink: var(--hard-text); }
.accent-extreme { --accent: var(--extreme-fill); --on-accent: var(--extreme-on-fill); --accent-ink: var(--extreme-text); }

/* Base */

*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: calc(var(--header-height) + 16px);
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--label);
    font-family: var(--font);
    font-size: var(--text-body);
    line-height: 1.47;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-wrap: break-word;
}

main { flex: 1 0 auto; }

h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
h1 { font-size: var(--text-large-title); font-weight: 700; line-height: 1.12; letter-spacing: -.01em; }
h2 { font-size: var(--text-title2); font-weight: 600; line-height: 1.25; }
h3 { font-size: var(--text-title3); font-weight: 600; line-height: 1.3; }
h4 { font-size: var(--text-body); font-weight: 600; line-height: 1.35; }
h1, h2, h3 { text-wrap: balance; }
h1, h2, h3, .large-title, .title1, .title2, .title3, .headline, .home-title, .home-h2, .brand { font-stretch: var(--stretch-wide); }
p, li { text-wrap: pretty; }

img, svg, video { max-width: 100%; }
img { height: auto; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: 1px; }
/* A link inside running text is underlined, so colour is never its only cue. */
.prose a, .footer-legal a, .today-next a, .daily-today { text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: 1px; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

hr { height: 0; margin: 0; border: 0; border-top: var(--hairline-width) solid var(--separator); }

::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }

:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }

.icon { width: 1.25em; height: 1.25em; flex: none; }

/* The App Store badge's own corners; in dark mode Apple's grey keyline keeps it off a black page. */
.store-badge { border-radius: 5.5% / 16%; }
@media (prefers-color-scheme: dark) {
    .store-badge { outline: 1px solid #A6A6A6; outline-offset: -1px; }
}

/* Layout */

.page {
    width: 100%;
    max-width: 1080px;
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.stack-4 > * + * { margin-top: 4px; }
.stack-8 > * + * { margin-top: 8px; }
.stack-12 > * + * { margin-top: 12px; }
.stack-16 > * + * { margin-top: 16px; }
.stack-24 > * + * { margin-top: 24px; }
.stack-32 > * + * { margin-top: 32px; }
.stack-48 > * + * { margin-top: 48px; }
.stack-64 > * + * { margin-top: 64px; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 100;
    padding: 10px 16px;
    border-radius: var(--radius);
    background: var(--bg-elevated);
    color: var(--label);
    box-shadow: var(--shadow-raised);
    transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* Type */

.kicker {
    font-size: var(--text-label);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--label-2-text);
}
.large-title { font-size: var(--text-large-title); font-weight: 700; line-height: 1.12; letter-spacing: -.01em; }
.title1 { font-size: var(--text-title1); font-weight: 700; line-height: 1.18; letter-spacing: -.005em; }
.title2 { font-size: var(--text-title2); font-weight: 600; line-height: 1.25; }
.title3 { font-size: var(--text-title3); font-weight: 600; line-height: 1.3; }
.headline { font-size: var(--text-body); font-weight: 600; }
.subheadline { font-size: var(--text-subheadline); }
.footnote { font-size: var(--text-footnote); }
.lead { font-size: var(--text-title3); line-height: 1.4; color: var(--label-2-text); }
.secondary { color: var(--label-2-text); }
.tertiary { color: var(--label-3); }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.display { font-stretch: var(--stretch-display); font-weight: 900; letter-spacing: -.03em; line-height: 1; }

/* Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 20px;
    border: 0;
    border-radius: var(--radius);
    background: transparent;
    font: inherit;
    font-size: var(--text-body);
    font-stretch: var(--stretch-wide);
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background-color .15s ease, opacity .15s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { opacity: .7; }
.btn .icon { width: 20px; height: 20px; }

.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: color-mix(in srgb, var(--ink) 86%, var(--paper)); }

.btn-secondary {
    background: transparent;
    box-shadow: inset 0 0 0 1.5px var(--ink);
    color: var(--ink);
}
.btn-secondary:hover { background: var(--fill-3); }

.btn-plain { color: var(--ink); padding-inline: 12px; }
.btn-plain:hover { background: var(--fill-3); }

.btn-compact {
    position: relative;
    min-height: 32px;
    padding: 6px 14px;
    border-radius: var(--radius-button);
    font-size: var(--text-subheadline);
}
.btn-compact::after { content: ""; position: absolute; inset: -6px -2px; }

.btn-block { display: flex; width: 100%; }

.btn:disabled, .btn[aria-disabled="true"] { opacity: .4; cursor: default; pointer-events: none; }

/* Surfaces */

.card {
    background: var(--bg-grouped);
    border-radius: var(--radius-lg);
    padding: 20px;
}
.card-tint { background: color-mix(in srgb, var(--accent) 12%, var(--bg)); }
@media (min-width: 600px) {
    .card { padding: 24px; }
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 4px 12px;
    border-radius: var(--radius-key);
    background: var(--fill);
    color: var(--label);
    font-size: var(--text-caption);
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
    line-height: 1.2;
    white-space: nowrap;
}
.pill-accent { background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent-ink); }
.pill-solid { background: var(--accent); color: var(--on-accent); }

.icon-circle {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex: none;
    border-radius: var(--radius-key);
    background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--hairline);
    color: var(--ink);
}
.icon-circle .icon { width: 22px; height: 22px; }

/* Lists and badges */

.stat-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    min-height: 44px;
    padding: 11px 0;
}
.stat-row + .stat-row { border-top: var(--hairline-width) solid var(--separator); }
.stat-row > :last-child {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    text-align: end;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--radius-key);
    /* 8% keeps every text tone at 4.5:1 on its tint (Extreme is the tightest). */
    background: color-mix(in srgb, var(--accent) 8%, var(--surface));
    color: var(--accent-ink);
    font-size: var(--text-caption);
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: .13em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--bg) 80%, transparent);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: var(--hairline-width) solid var(--separator);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .site-header { background: var(--bg); }
}

.site-header-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: var(--header-height);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    margin-right: auto;
    flex: none;
    color: var(--label);
    font-weight: 800;
    white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand-icon { width: 32px; height: 32px; flex: none; border-radius: 7px; box-shadow: 0 0 0 var(--hairline-width) var(--separator); }

.site-nav { display: flex; align-items: center; gap: 2px; }
.site-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 12px;
    border-radius: var(--radius-button);
    color: var(--label);
    font-size: var(--text-subheadline);
}
.site-nav a:hover { background: var(--fill-3); text-decoration: none; }
.site-nav a[aria-current="page"] { font-weight: 600; }

.header-cta { margin-left: 8px; }

.nav-menu { display: none; position: relative; }
.nav-menu > summary {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-button);
    color: var(--label);
    list-style: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu > summary:hover { background: var(--fill-3); }
.nav-menu > summary .icon { width: 22px; height: 22px; display: block; }
.nav-menu-close, .nav-menu[open] .nav-menu-open { display: none; }
.nav-menu[open] .nav-menu-close { display: block; }

.nav-menu-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(260px, calc(100vw - 2 * var(--gutter)));
    padding: 6px;
    border-radius: var(--radius-card);
    background: var(--bg-elevated);
    box-shadow: var(--shadow-raised);
}
.nav-menu-panel a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 12px;
    border-radius: var(--radius-key);
    color: var(--label);
}
.nav-menu-panel a + a { margin-top: 2px; }
.nav-menu-panel a:hover { background: var(--fill-3); text-decoration: none; }
.nav-menu-panel a[aria-current="page"] { font-weight: 600; }

@media (max-width: 719.98px) {
    .site-nav { display: none; }
    .nav-menu { display: block; }
    .header-cta { margin-left: 0; }
}
@media (max-width: 419.98px) {
    .header-cta { display: none; }
}

/* Footer */

.site-footer {
    margin-top: clamp(56px, 8vw, 96px);
    background: var(--bg-grouped);
    border-top: var(--hairline-width) solid var(--separator);
    color: var(--label-2-text);
    font-size: var(--text-footnote);
}
.site-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 4px 24px;
    padding-block: 16px calc(16px + env(safe-area-inset-bottom, 0px));
}
.footer-legal a { color: inherit; }
.footer-links { display: flex; flex-wrap: wrap; margin-inline: -10px; }
.footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 10px;
    color: var(--label);
}

/* Documents */

.doc { padding-top: clamp(32px, 6vw, 64px); }

.prose {
    max-width: 680px;
    margin-inline: auto;
    font-size: var(--text-body);
    line-height: 1.55;
}
.prose > * + *, .prose section > * + * { margin-top: 1em; }
.prose h1 { font-size: var(--text-large-title); }
.prose h2 { margin-top: 2em; }
.prose h3 { margin-top: 1.75em; font-size: var(--text-body); }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose h3 + p, .prose h3 + ul { margin-top: .35em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--label-2); }
.prose strong { font-weight: 600; }
.prose .kicker + h1 { margin-top: 8px; }
.prose .doc-meta { margin-top: 12px; color: var(--label-2-text); font-size: var(--text-subheadline); }
.prose .lead { margin-top: 12px; }

.release + .release {
    margin-top: 56px;
    padding-top: 48px;
    border-top: var(--hairline-width) solid var(--separator);
}
.prose .doc-intro + .release { margin-top: 48px; }
.release h2 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    font-size: var(--text-title1);
    font-weight: 700;
    letter-spacing: -.005em;
}

/* Game */

.game {
    width: 100%;
    max-width: 1040px;
    margin-inline: auto;
    padding: 0 16px;
}
.game [hidden] { display: none !important; }
html.has-sheet { overflow: hidden; }

.game-layout {
    display: grid;
    grid-template-columns: minmax(0, 520px);
    grid-template-areas: "bar" "intro" "board" "input" "app";
    justify-content: center;
    row-gap: 16px;
}
.game-bar { grid-area: bar; }
.game-intro { grid-area: intro; }
.game-board { grid-area: board; min-width: 0; }
.game-input { grid-area: input; }
.game-app { grid-area: app; }

.game-bar {
    display: grid;
    grid-template-columns: minmax(44px, 1fr) auto minmax(44px, 1fr);
    grid-template-areas: "back heading timer";
    align-items: center;
    column-gap: 8px;
    min-height: 52px;
    margin-bottom: -8px;
}
.game-back {
    grid-area: back;
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 44px;
    min-height: 44px;
    margin-left: -10px;
    padding: 0 10px;
    border-radius: var(--radius-button);
    color: var(--ink);
    font-size: var(--text-subheadline);
    white-space: nowrap;
}
.game-back:hover { text-decoration: none; }
@media (hover: hover) {
    .game-back:hover { background: var(--fill-3); }
}
.game-back .icon { width: 22px; height: 22px; }
.game-back-label { display: none; }
.game-heading { grid-area: heading; min-width: 0; text-align: center; }
.game-title {
    font-size: var(--text-body);
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.game-title-name {
    display: block;
    color: var(--label-2-text);
    font-size: var(--text-label);
    font-stretch: 100%;
    font-weight: 700;
    letter-spacing: .13em;
    line-height: 1.3;
    text-transform: uppercase;
}
.game-title-number { display: block; font-stretch: var(--stretch-display); font-weight: 900; letter-spacing: -.03em; line-height: 1.05; }
.game-rule { color: var(--label-2-text); font-size: var(--text-caption); line-height: 1.3; }
.game-level {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--label-2-text);
    font-size: var(--text-label);
    font-weight: 700;
    letter-spacing: .13em;
    line-height: 1.3;
    text-transform: uppercase;
}
/* ● Easy, ▲ Medium, ■ Hard, ◆ Extreme: decorative, the level is always named beside it. */
.mark { width: 8px; height: 8px; flex: none; background: var(--accent); }
.accent-easy .mark { border-radius: 50%; }
.accent-medium .mark { clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.accent-extreme .mark { clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.game-timer {
    grid-area: timer;
    justify-self: end;
    color: var(--label);
    font-family: var(--font-mono);
    font-size: var(--text-body);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: .01em;
}

/* Board: hairlines between cells, 2 px box edges, a rounded 14 px frame. */

.board {
    display: grid;
    grid-template-rows: repeat(9, minmax(0, 1fr));
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border: var(--line-box) solid var(--ink);
    border-radius: var(--radius-board);
    background: var(--surface);
    container-type: inline-size;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}
.board-row {
    display: grid;
    grid-template-columns: repeat(9, minmax(0, 1fr));
    min-height: 0;
}
.cell {
    position: relative;
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-right: 1px solid var(--separator);
    border-bottom: 1px solid var(--separator);
    border-radius: 0;
    background-color: transparent;
    background-clip: padding-box;
    color: var(--accent-ink);
    font-family: var(--font);
    font-stretch: var(--stretch-wide);
    font-size: clamp(18px, 6.2vw, 34px);
    font-size: calc(100cqi / 9 * .56);
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: background-color .12s ease;
}
.cell:nth-child(3n) { border-right: var(--line-box) solid var(--ink); }
.cell:last-child { border-right: 0; }
.board-row:nth-child(3n) > .cell { border-bottom: var(--line-box) solid var(--ink); }
.board-row:last-child > .cell { border-bottom: 0; }

.cell.is-given { color: var(--ink); font-weight: 500; }
.cell.is-diag { background-color: color-mix(in srgb, var(--fill) 50%, transparent); }
/* The selection's peers and the focused number's candidates share one wash, as in the app. */
.cell.is-peer, .cell.is-candidate { background-color: color-mix(in srgb, var(--accent) 12%, transparent); }
@media (prefers-color-scheme: dark) {
    .cell.is-peer, .cell.is-candidate { background-color: color-mix(in srgb, var(--accent) 10%, transparent); }
}
@media (prefers-contrast: more) {
    .cell.is-peer, .cell.is-candidate { background-color: color-mix(in srgb, var(--accent) 15%, transparent); }
}
.cell.is-same { font-weight: 800; }
/* The focused number's ring, in the text tone, which holds 3:1 against the cells. */
.cell.is-same:not(.is-selected)::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 3px solid var(--accent-ink);
    pointer-events: none;
}
/* While a number is focused, the player's other entries recede, so it is the one colored digit left. */
.cell.is-receded { color: var(--ink2); }
.cell.is-conflict { color: var(--error); }
.cell.is-conflict::after {
    content: "";
    position: absolute;
    left: 28%;
    right: 28%;
    bottom: 14%;
    height: 2px;
    background: currentColor;
}
.cell.is-selected {
    background-color: var(--accent);
    color: var(--on-accent);
}
/* Medium's fill is under 3:1 on the light surface, so its selected cell takes an ink border there. */
@media (prefers-color-scheme: light) {
    .accent-medium .cell.is-selected { box-shadow: inset 0 0 0 2px var(--ink); }
}
.cell:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: -2px; }
.cell-digit { display: block; }

.cell-notes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    width: 100%;
    height: 100%;
    padding: 1px 2px;
    color: var(--label-2-text);
    font-family: var(--font);
    font-stretch: var(--stretch-wide);
    font-size: 10px;
    font-size: max(10px, 100cqi / 9 * .25);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.cell-notes > span { display: grid; place-items: center; }
/* The focused number's notes sit on a chip of the fill, so every candidate spot reads across the board. */
.cell-notes > .is-focus { margin: 1px; border-radius: 3px; background: var(--accent); color: var(--on-accent); font-weight: 800; }
.cell.is-selected .cell-notes { color: var(--on-accent); }
.cell.is-selected .cell-notes > .is-focus { background: none; color: var(--on-accent); font-weight: 800; }

@keyframes cell-pop {
    from { opacity: 0; transform: scale(.55); }
    to { opacity: 1; transform: none; }
}
@keyframes cell-shake {
    0%, 100% { transform: none; }
    20%, 60% { transform: translateX(-3px); }
    40%, 80% { transform: translateX(3px); }
}
@keyframes cell-wave {
    35% { background-color: color-mix(in srgb, var(--accent) 32%, transparent); }
}
.cell.is-new .cell-digit { animation: cell-pop .2s ease-out both; }
.cell.is-shake .cell-digit { animation: cell-shake .3s linear; }
.board.is-celebrating .cell { animation: cell-wave .7s ease; animation-delay: calc(var(--wave, 0) * 55ms); }

.game-noscript { margin-top: 12px; color: var(--label-2-text); font-size: var(--text-subheadline); text-align: center; }

/* Keypad and tools */

.game-input { display: grid; gap: 10px; }

.keypad {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}
.key {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 52px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: var(--radius-key);
    background: var(--surface);
    color: var(--ink);
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
    transition: background-color .15s ease, opacity .15s ease, transform .1s ease;
}
@media (hover: hover) {
    .key:hover { background: var(--fill); }
}
.key:active { background: var(--fill); transform: scale(.97); }
.key-digit { font-size: 1.75rem; font-stretch: var(--stretch-wide); font-weight: 700; transition: font-size .15s ease, color .15s ease; }
.key-count {
    position: absolute;
    top: 6px;
    right: 9px;
    color: var(--label-2-text);
    font-family: var(--font-mono);
    font-size: var(--text-caption);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.key.is-done { opacity: .35; }
.key.is-active { background: var(--accent); color: var(--on-accent); }
.game.is-notes .key { background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline); }
.game.is-notes .key-digit { color: var(--accent-ink); font-size: 1.25rem; font-weight: 600; }
.game.is-notes .key.is-active { background: var(--accent); box-shadow: none; }
.game.is-notes .key.is-active .key-digit { color: var(--on-accent); }
.key.is-active .key-count { color: var(--on-accent); }

.game-tools {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}
.tool {
    gap: 6px;
    padding: 10px 8px;
    border-radius: var(--radius-key);
    background: transparent;
    box-shadow: inset 0 0 0 1.5px var(--ink);
    color: var(--ink);
    font-size: var(--text-subheadline);
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
}
@media (hover: hover) {
    .tool:hover { background: var(--fill-3); }
}
.tool[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.tool[aria-disabled="true"] { opacity: .4; cursor: default; }

/* Spaced hints rather than "·" separators, which would dangle at the end of a wrapped line. */
.game-keys { display: none; flex-wrap: wrap; justify-content: center; gap: 0 16px; color: var(--label-2-text); font-size: var(--text-footnote); line-height: 1.9; }
.game-keys > span { white-space: nowrap; }
.game-keys kbd {
    display: inline-block;
    min-width: 1.6em;
    padding: 1px 5px;
    border-radius: var(--radius-key);
    background: var(--fill-3);
    box-shadow: inset 0 -1px 0 var(--separator);
    color: var(--label);
    font: inherit;
    font-family: var(--font-mono);
    text-align: center;
}
@media (hover: hover) and (pointer: fine) {
    .game-keys { display: flex; }
}

.game.is-won .keypad, .game.is-won .game-tools, .game.is-won .game-keys { display: none; }
.game-done {
    display: grid;
    gap: 12px;
    padding: 20px;
    border-radius: var(--radius-lg);
    background: var(--surface);
}
.game-done-line { display: flex; align-items: center; gap: 12px; font-size: var(--text-title3); font-weight: 600; }
.game-done-line .num { color: var(--accent-ink); }

.game-app {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    grid-template-areas: "icon text" "icon cta";
    align-items: start;
    column-gap: 14px;
    row-gap: 10px;
    padding: 16px;
    border-radius: var(--radius-lg);
}
.game-app-icon { grid-area: icon; width: 48px; height: 48px; border-radius: 11px; box-shadow: 0 0 0 var(--hairline-width) var(--separator); }
.game-app-text { grid-area: text; }
.game-app .btn { grid-area: cta; justify-self: start; }

@media (min-width: 900px) {
    .game { padding: 40px 24px 0; }
    .game-layout {
        grid-template-columns: minmax(0, 560px) minmax(300px, 360px);
        grid-template-rows: auto auto auto auto 1fr;
        grid-template-areas: "board bar" "board intro" "board input" "board app" "board .";
        column-gap: clamp(40px, 5vw, 72px);
        row-gap: 24px;
        align-items: start;
    }
    .game-bar {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "back back" "heading timer";
        align-items: end;
        row-gap: 10px;
        min-height: 0;
        margin-bottom: 0;
    }
    .game-back-label { display: inline; }
    .game-heading { text-align: start; }
    .game-title { white-space: normal; }
    .game-title-number { font-size: 3.875rem; }
    .game-rule { margin-top: 2px; font-size: var(--text-subheadline); }
    .game-timer { font-size: var(--text-title2); line-height: 1.2; }
    .key { min-height: 60px; }
    .key-digit { font-size: 1.875rem; }
}

/* Finish sheet */

.sheet {
    width: min(420px, calc(100vw - 32px));
    max-width: none;
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 0;
    overflow: auto;
    overscroll-behavior: contain;
    border: 0;
    border-radius: var(--radius-floating-card);
    background: var(--bg-elevated);
    color: var(--label);
    box-shadow: var(--shadow-raised);
}
.sheet::backdrop { background: rgba(0, 0, 0, .4); }
.sheet-body { position: relative; padding: 28px 24px 24px; text-align: center; }
.sheet-body > * + * { margin-top: 12px; }
.sheet-close {
    position: absolute;
    top: 8px;
    right: 8px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--label-2);
    -webkit-tap-highlight-color: transparent;
}
.sheet-close .icon { width: 30px; height: 30px; padding: 7px; border-radius: 50%; background: var(--fill-3); }
@media (hover: hover) {
    .sheet-close:hover .icon { background: var(--fill); }
}
.sheet-body > .kicker { margin-top: 4px; }
.sheet-title { margin-top: 4px; font-size: var(--text-title1); font-weight: 700; line-height: 1.18; }
.sheet-body > .sheet-time {
    margin-top: 6px;
    color: var(--accent-ink);
    font-size: 3.5rem;
    font-stretch: var(--stretch-display);
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    line-height: 1.05;
    letter-spacing: -.03em;
}
.sheet-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 10px;
    color: var(--label-2-text);
    font-size: var(--text-subheadline);
}
.sheet-stats .badge { font-size: var(--text-subheadline); padding: 3px 10px; }
.sheet-rival {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-card);
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    text-align: start;
}
.sheet-rival > .icon { width: 22px; height: 22px; color: var(--accent-ink); }
.sheet-rival-outcome { font-weight: 600; line-height: 1.3; }
.sheet-rival-times { color: var(--label-2-text); font-family: var(--font-mono); font-size: var(--text-footnote); font-variant-numeric: tabular-nums; }
.sheet-rival[data-outcome="loss"] { background: var(--fill-3); }
.sheet-rival[data-outcome="loss"] > .icon { color: var(--label-2); }

.sheet-body > .sheet-field { margin-top: 20px; text-align: start; }
.sheet-field label, .sheet-fallback label {
    display: block;
    margin-bottom: 6px;
    color: var(--label-2-text);
    font-size: var(--text-footnote);
    font-weight: 600;
}
.sheet-field input, .sheet-fallback input {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--separator);
    border-radius: var(--radius-button);
    background: var(--bg);
    font-size: 1.0625rem;
}
.sheet-field input:focus-visible, .sheet-fallback input:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 0; border-color: transparent; }
.sheet-field input[aria-invalid="true"] { border-color: var(--extreme); }
.field-hint { margin-top: 6px; color: var(--label-2-text); font-size: var(--text-footnote); }
.field-hint.is-error { color: var(--extreme-ink); }

.sheet-body > .sheet-actions { display: grid; gap: 8px; margin-top: 20px; }
.sheet-fallback { text-align: start; }
.share-icon, .copied-icon { display: inline-flex; }
.copied-icon, .is-copied .share-icon { display: none; }
.is-copied .copied-icon { display: inline-flex; }
.sheet-body > .sheet-store-note { margin-top: 20px; color: var(--label-2-text); font-size: var(--text-footnote); text-wrap: balance; }
.sheet-store { display: inline-block; margin-top: 16px; border-radius: 9px; }
.sheet-body > .sheet-store-note + .sheet-store { margin-top: 8px; }
.open-hint { color: var(--label-2-text); font-size: var(--text-footnote); text-wrap: balance; }
.open-hint a { text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: 1px; }
.sheet-store img { display: block; width: auto; height: 44px; }

@media (max-width: 599.98px) {
    .sheet {
        width: 100%;
        max-width: 100%;
        max-height: calc(100dvh - 24px);
        margin: auto 0 0;
        border-radius: var(--radius-floating-card) var(--radius-floating-card) 0 0;
    }
    .sheet-body { padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
}

@keyframes sheet-in {
    from { opacity: 0; transform: translateY(16px) scale(.98); }
}
@keyframes sheet-up {
    from { transform: translateY(100%); }
}
@keyframes backdrop-in {
    from { opacity: 0; }
}
.sheet[open] { animation: sheet-in .3s cubic-bezier(.2, .8, .2, 1); }
.sheet[open]::backdrop { animation: backdrop-in .25s ease; }
@media (max-width: 599.98px) {
    .sheet[open] { animation: sheet-up .34s cubic-bezier(.2, .8, .2, 1); }
}

/* Daily */

.game-intro { display: grid; gap: 12px; }
.daily-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px 14px;
    color: var(--label-2-text);
    font-size: var(--text-subheadline);
    line-height: 1.3;
    text-align: center;
}
.daily-date { display: inline-flex; align-items: center; gap: 6px; }
.daily-date .icon { width: 16px; height: 16px; }
.daily-today { position: relative; font-weight: 600; }
.daily-today::after { content: ""; position: absolute; inset: -13px -4px; }

.challenge {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-card);
    background: var(--surface);
}
.challenge[hidden] { display: none; }
.challenge > .icon-circle { width: 40px; height: 40px; background: color-mix(in srgb, var(--accent) 20%, transparent); }
.challenge > .icon-circle .icon { width: 20px; height: 20px; }
/* Clips the separator dot that would otherwise start a wrapped line of facts. */
.challenge-text { min-width: 0; overflow: hidden; }
.challenge-line { line-height: 1.3; }
.challenge-line strong { font-weight: 600; }
.challenge-line .num { color: var(--accent-ink); font-weight: 700; white-space: nowrap; }
.challenge-facts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    row-gap: 2px;
    margin: 4px 0 0 -15px;
    color: var(--label-2-text);
    font-size: var(--text-footnote);
    line-height: 1.35;
}
.challenge-facts > * { position: relative; margin-left: 15px; }
.challenge-facts > *::before {
    content: "·";
    content: "·" / "";
    position: absolute;
    left: -10px;
    color: var(--label-2);
    font-weight: 400;
}
.challenge-cta { margin-top: 4px; color: var(--accent-ink); font-weight: 700; line-height: 1.3; }
.challenge[data-outcome="loss"] { background: var(--fill-3); }
.challenge[data-outcome="loss"] > .icon-circle { background: var(--fill); color: var(--label-2); }
.challenge[data-outcome="loss"] .challenge-cta { color: var(--label); }

@media (min-width: 900px) {
    .daily-meta { justify-content: flex-start; text-align: start; }
}

.daily-status-stack { display: grid; gap: 16px; max-width: 560px; margin-inline: auto; }
.daily-status { text-align: center; }
.daily-status .icon-circle { margin-inline: auto; }
.daily-status h1 .num { color: var(--accent-ink); white-space: nowrap; }
.daily-status-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; padding-top: 4px; }
.daily-status-actions > .open-hint { flex-basis: 100%; }
.daily-store { display: inline-block; border-radius: 9px; }
.daily-store img { display: block; width: auto; height: 44px; }

/* Not found */

.notfound { max-width: 560px; margin-inline: auto; text-align: center; }
.notfound .icon-circle { margin-inline: auto; }
.notfound-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

/* Home */

.home { overflow-x: clip; }

.home-hero {
    display: grid;
    justify-items: center;
    gap: 48px;
    padding-top: clamp(40px, 8vw, 96px);
    text-align: center;
}
.home-hero-text { max-width: 560px; }
.home-hero-text > .kicker + .home-title { margin-top: 14px; }
.home-title {
    font-size: clamp(2.5rem, 1.25rem + 4.6vw, 4.25rem);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -.025em;
}
.home-sub {
    margin-top: 20px;
    color: var(--label-2-text);
    font-size: clamp(1.1875rem, 1.05rem + .45vw, 1.375rem);
    line-height: 1.4;
    text-wrap: balance;
}
.home-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px 16px;
    margin-top: 32px;
}
.home-store { display: inline-block; border-radius: 10px; }
.home-store img { display: block; width: auto; height: 50px; }
.home-actions .btn { min-height: 50px; padding-inline: 22px; }

.home-shot { position: relative; isolation: isolate; width: min(290px, 74vw); }
.home-shot::before {
    content: "";
    position: absolute;
    inset: -10% -45%;
    z-index: -1;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--easy) 16%, transparent), transparent);
}
.home-shot img {
    display: block;
    width: 100%;
    border-radius: 36px;
    box-shadow: 0 40px 80px -28px rgba(0, 0, 0, .3), 0 12px 32px -12px rgba(0, 0, 0, .14);
}

@media (min-width: 768px) {
    .home-hero {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        justify-items: start;
        column-gap: clamp(40px, 7vw, 112px);
        text-align: start;
    }
    .home-actions { justify-content: flex-start; }
    .home-shot { width: clamp(250px, 29vw, 330px); }
}

.home-section { padding-top: clamp(80px, 11vw, 136px); }
.home-head { max-width: 720px; margin-inline: auto; text-align: center; }
.home-head > .kicker + .home-h2 { margin-top: 8px; }
.home-h2 {
    font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.625rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -.02em;
}

.today-grid, .feature-grid, .gallery-track, .level-grid { margin: 0; padding: 0; list-style: none; }

.today-grid { display: grid; gap: 12px; margin-top: 40px; }
.today-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "icon name play" "icon line play";
    align-items: center;
    column-gap: 14px;
    padding: 16px;
    border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.today-card > .icon-circle { grid-area: icon; }
.today-name { grid-area: name; align-self: end; font-size: var(--text-body); font-weight: 600; }
.today-line { grid-area: line; align-self: start; color: var(--label-2-text); font-size: var(--text-subheadline); line-height: 1.35; }
.today-play { grid-area: play; gap: 6px; min-height: 40px; padding-inline: 16px 18px; }
.today-play .icon { width: 15px; height: 15px; }

@media (min-width: 720px) {
    .today-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
    .today-card {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto 1fr auto;
        grid-template-areas: "icon" "name" "line" "play";
        align-items: start;
        padding: 24px;
    }
    .today-card > .icon-circle { margin-bottom: 16px; }
    .today-name { font-size: var(--text-title3); }
    .today-line { margin-top: 4px; font-size: var(--text-body); }
    .today-play { justify-self: start; margin-top: 24px; }
}

.today-next {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
    color: var(--label-2-text);
    font-size: var(--text-subheadline);
    text-align: center;
}
.today-next .icon { width: 17px; height: 17px; }
.today-next .num { color: var(--label); font-weight: 600; }

.feature-grid { display: grid; gap: 32px; }
.feature {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    align-content: start;
    column-gap: 16px;
}
.feature > .icon-circle { grid-row: span 2; }
.feature-title { align-self: center; font-size: var(--text-body); font-weight: 600; line-height: 1.3; }
.feature-text { margin-top: 2px; color: var(--label-2-text); }

@media (min-width: 600px) {
    .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 40px; }
    .feature { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
    .feature > .icon-circle { grid-row: auto; width: 52px; height: 52px; margin-bottom: 18px; }
    .feature > .icon-circle .icon { width: 26px; height: 26px; }
    .feature-title { font-size: var(--text-title3); }
    .feature-text { margin-top: 6px; }
}
@media (min-width: 960px) {
    .feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 64px 56px; }
}

.gallery {
    --gallery-inset: max(var(--gutter), calc((100% - 1080px) / 2 + var(--gutter)));
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gallery-inset);
    scrollbar-width: none;
    padding-block: 8px 40px;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery:focus-visible { outline-offset: -2px; }
.gallery-track {
    display: flex;
    gap: clamp(16px, 2.4vw, 28px);
    width: max-content;
    padding-inline: var(--gallery-inset);
}
.gallery-track > li { flex: none; width: clamp(220px, 62vw, 280px); scroll-snap-align: start; }
.gallery-track img {
    display: block;
    width: 100%;
    border-radius: 28px;
    background: var(--fill-3);
    box-shadow: 0 24px 48px -24px rgba(0, 0, 0, .3), 0 0 0 var(--hairline-width) var(--separator);
}

.gallery-nav { display: none; justify-content: flex-end; gap: 12px; margin-top: -12px; }
@media (hover: hover) and (pointer: fine) {
    .gallery-nav { display: flex; }
}
.gallery-nav[hidden] { display: none; }
.gallery-btn {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--fill-3);
    color: var(--label);
    transition: background-color .15s ease, opacity .15s ease;
}
.gallery-btn:hover { background: var(--fill); }
.gallery-btn .icon { width: 22px; height: 22px; }
.gallery-btn[aria-disabled="true"] { opacity: .35; cursor: default; }
.gallery-btn[aria-disabled="true"]:hover { background: var(--fill-3); }

.level-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 40px; }
.level { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 18px 16px 8px; }
.level-count { color: var(--label-2-text); font-size: var(--text-subheadline); }
.level-count .num { display: block; color: var(--label); font-size: var(--text-title1); font-weight: 700; line-height: 1.15; }
.level-try { gap: 2px; margin-left: -12px; padding-inline: 12px 8px; }
.level-try .icon { width: 18px; height: 18px; }

@media (min-width: 768px) {
    .level-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
    .level { padding: 24px 24px 12px; }
}

.home-note { margin-top: 24px; color: var(--label-2-text); text-align: center; text-wrap: balance; }

/* Motion */

@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}
