/*
 * DevelopChess Reframe — September 2026
 * An original warm-paper visual system for the public product. The existing
 * stylesheets keep application state/layout contracts; this file owns the look.
 */

@font-face{font-family:"Quicksand";font-style:normal;font-weight:300 700;font-display:swap;src:url("/assets/fonts/Quicksand-Variable.woff2") format("woff2");unicode-range:U+0100-02FF,U+0300-036F,U+03C0,U+1E00-1EFF,U+2070-209F,U+20A0-20CF,U+2113,U+2116,U+2126,U+212E,U+215B-215E,U+2200-2265,U+25CA,U+FB01-FB02;}
@font-face{font-family:"Quicksand";font-style:normal;font-weight:300 700;font-display:swap;src:url("/assets/fonts/Quicksand-Latin-v1.woff2") format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}

:root {
    color-scheme: light;
    --ink: #22211f;
    --ink-soft: #4f4b47;
    --muted: #68615c;
    --paper: #fbf8f3;
    --paper-strong: #f5f0e9;
    --sheet: #fffdfa;
    --line: #dfd9d2;
    --line-hi: #cfc7bf;
    --brand: #ea765f;
    --brand-dark: #ad4635;
    --brand-soft: #fff0eb;
    --success: #267844;
    --success-dark: #1f6037;
    --success-soft: #eaf7ef;
    --green: var(--success);
    --green-dark: var(--success-dark);
    --green-soft: var(--success-soft);
    --red: #b7453e;
    --red-soft: #fff0ee;
    --point-loss-red: #c9453f;
    --point-loss-red-active: #df5d55;
    --yellow: #fff7dd;
    --blue: #f0f4ff;
    --lilac: #f4f0ff;
    --peach: #fff0eb;
    --accent: var(--brand);
    --accent-deep: var(--brand-dark);
    --accent-ink: var(--brand-dark);
    --accent-soft: #f4b1a3;
    --accent-pale: #fff0eb;
    --violet: #7557d6;
    --cyan: #078b74;
    --surface: #fffdfa;
    --surface-raised: #fffaf5;
    --surface-soft: #f5f0e9;
    --surface-input: #ffffff;
    --radius-card: var(--radius-limit, 14px);
    --radius-card-mobile: 10px;
    --radius-control: min(13px, var(--radius-limit, 14px));
    --radius-header: var(--radius-limit, 14px);
    --radius-header-mobile: var(--radius-limit, 14px);
    --display: "Quicksand", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --sans: "Quicksand", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --serif: "Quicksand", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --mono: "Inconsolata", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --shadow: 0 18px 50px rgba(52, 43, 36, .10);
    --shadow-soft: 0 10px 28px rgba(52, 43, 36, .07);
    --panel-edge: #d4c2ae;
    --panel-depth: 5px;
    --panel-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 -1px 0 rgba(87, 61, 39, .08), 0 var(--panel-depth) 0 var(--panel-edge), 0 12px 22px rgba(63, 48, 37, .10);
    --panel-shadow-shallow: inset 0 1px 0 rgba(255, 255, 255, .85), 0 3px 0 var(--panel-edge), 0 6px 12px rgba(63, 48, 37, .06);
    --panel-shadow-inset: inset 0 2px 4px rgba(63, 48, 37, .10), inset 0 -1px 0 rgba(255, 255, 255, .9);
    --focus: 0 0 0 3px rgba(234, 118, 95, .18);
    --field-depth:
        inset 0 2px 4px rgba(52, 43, 36, .13),
        inset 0 -1px 0 rgba(255, 255, 255, .92),
        0 2px 0 #d8cec5,
        0 6px 12px rgba(52, 43, 36, .04);
}

* {
    scrollbar-color: #cec5bc #f5f0e9;
}

html {
    background: var(--paper);
}

body {
    min-width: 0;
    background:
        radial-gradient(circle at 14% -8rem, rgba(234, 118, 95, .11), transparent 32rem),
        radial-gradient(circle at 96% 16rem, rgba(49, 100, 244, .055), transparent 30rem),
        radial-gradient(rgba(34, 33, 31, .026) .7px, transparent .8px),
        var(--paper);
    background-attachment: fixed;
    background-size: auto, auto, 5px 5px, auto;
    color: var(--ink);
    font: 15px/1.55 var(--sans);
    letter-spacing: -.01em;
}

::selection {
    background: var(--accent-soft);
    color: var(--ink);
}

a {
    text-underline-offset: 3px;
}

button,
input,
select,
textarea {
    font-family: var(--sans);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--accent) !important;
    outline-offset: 3px;
}

.skip-link {
    z-index: 1000;
    padding: 11px 15px;
    border: 1px solid var(--accent);
    border-radius: min(12px, var(--radius-limit, 14px));
    background: var(--surface-raised);
    color: var(--ink);
}

/* Floating command header */
.site-header {
    position: sticky;
    z-index: 210;
    top: 10px;
    width: min(1180px, calc(100% - 24px));
    max-width: none;
    min-height: 66px;
    height: auto;
    margin: 12px auto 0;
    padding: 9px 10px;
    border: 1px solid rgba(223, 217, 210, .88);
    border-radius: var(--radius-header);
    background: rgba(255, 253, 250, .92);
    box-shadow: 0 14px 42px rgba(52, 43, 36, .08);
    backdrop-filter: blur(18px) saturate(1.35);
}

.wordmark {
    gap: 8px;
    color: var(--ink);
    font-family: var(--sans);
    font-size: 23px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -.04em;
    text-transform: none;
}

.brand-mark {
    width: auto;
    height: 45px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    object-fit: contain;
}

.site-header-actions {
    gap: 9px;
}

.site-header nav {
    gap: 5px;
    padding: 4px;
    border: 1px solid #e8e1d9;
    border-radius: 999px;
    background: rgba(255, 253, 250, .86);
    box-shadow: 0 8px 24px rgba(52, 43, 36, .045);
}

.site-header nav a,
.site-header nav button {
    --nav-control-face: #fffdfa;
    --nav-control-edge: #c8bdb3;
    --nav-control-shadow: rgba(52, 43, 36, .1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    margin-bottom: 3px;
    padding: 8px 13px;
    border: 1px solid var(--nav-control-edge);
    border-radius: 999px;
    background: var(--nav-control-face);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .82),
        0 3px 0 var(--nav-control-edge),
        0 8px 15px var(--nav-control-shadow);
    color: #68615c;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    translate: 0 0;
    transition: border-color .14s ease, background .14s ease, box-shadow .1s ease, color .14s ease, translate .1s ease;
}

.site-header nav a:hover,
.site-header nav a:focus-visible,
.site-header nav button:hover,
.site-header nav button:focus-visible {
    --nav-control-face: #fffaf5;
    --nav-control-edge: #b9aca1;
    color: var(--ink);
}

.site-header nav a[aria-current="page"] {
    --nav-control-face: var(--accent);
    --nav-control-edge: #b94d39;
    --nav-control-shadow: rgba(185, 77, 57, .2);
    color: var(--ink);
    font-weight: 600;
}

.site-header nav a:hover,
.site-header nav a:focus-visible,
.site-header nav button:hover,
.site-header nav button:focus-visible {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .86),
        0 4px 0 var(--nav-control-edge),
        0 10px 18px var(--nav-control-shadow);
    outline: 0;
    translate: 0 -1px;
}

.site-header nav a:focus-visible,
.site-header nav button:focus-visible {
    outline: 3px solid rgba(234, 118, 95, .22);
    outline-offset: 2px;
}

.site-header nav a:active,
.site-header nav button:active {
    box-shadow:
        inset 0 1px 3px rgba(52, 43, 36, .14),
        0 1px 0 var(--nav-control-edge),
        0 4px 8px var(--nav-control-shadow);
    translate: 0 2px;
}

.nav-account-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 76px;
    min-height: 40px;
    margin-bottom: 3px;
    padding: 8px 15px;
    border: 1px solid #b94d39;
    border-radius: 999px;
    background: var(--accent);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .5),
        0 4px 0 #b94d39,
        0 9px 18px rgba(185, 77, 57, .18);
    color: var(--ink);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    transition: border-color .14s ease, background .14s ease, box-shadow .14s ease, translate .14s ease;
}

.nav-account-button:hover,
.nav-account-button:focus-visible {
    border-color: #c45742;
    background: var(--accent-soft);
    color: var(--ink);
}

.nav-account-button:active {
    box-shadow: inset 0 1px 3px rgba(52, 43, 36, .14), 0 1px 0 #b94d39;
    translate: 0 3px;
}

.nav-account-button.is-authenticated {
    min-width: 108px;
    padding: 6px 13px 6px 7px;
    border-color: #c9bdb2;
    background: #fff9f2;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .92),
        0 3px 0 #c9bdb2,
        0 8px 16px rgba(52, 43, 36, .10);
}

.nav-account-button.is-authenticated:hover,
.nav-account-button.is-authenticated:focus-visible {
    border-color: #d98b7c;
    background: var(--accent-pale);
}

.nav-account-button.is-authenticated:active {
    box-shadow: inset 0 1px 3px rgba(52, 43, 36, .13), 0 1px 0 #c9bdb2;
}

.nav-account-button.is-current,
.nav-account-button.is-progress {
    border-color: #c9bdb2;
    background: #fff9f2;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .92),
        0 3px 0 #c9bdb2,
        0 8px 16px rgba(52, 43, 36, .10);
}

.nav-account-button.is-current:hover,
.nav-account-button.is-current:focus-visible,
.nav-account-button.is-progress:hover,
.nav-account-button.is-progress:focus-visible {
    border-color: #b9aca1;
    background: #fffdf9;
}

.nav-account-button.is-current:active,
.nav-account-button.is-progress:active {
    box-shadow: inset 0 1px 3px rgba(52, 43, 36, .13), 0 1px 0 #c9bdb2;
}

.nav-account-avatar {
    display: grid;
    flex: 0 0 27px;
    width: 27px;
    height: 27px;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(34, 33, 31, .18);
    border-radius: 50%;
    background: #fffdfa;
    color: var(--accent-ink);
    font-size: 12px;
    font-weight: 700;
}

.nav-account-avatar[hidden],
.nav-account-avatar img[hidden] {
    display: none;
}

.nav-account-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nav-account-label {
    white-space: nowrap;
}

.chess-dna-icon {
    display: block;
    flex: 0 0 auto;
    object-fit: contain;
    filter: drop-shadow(0 3px 4px rgba(29, 35, 48, .18));
}

.chess-dna-icon[hidden] {
    display: none;
}

.dna-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .22em;
    line-height: 1;
    white-space: nowrap;
}

.dna-value > .chess-dna-icon {
    width: calc(var(--dna-value-size, 18px) * 1.3333);
    height: var(--dna-value-size, 18px);
}

.dna-value > .dna-number-text {
    font-size: var(--dna-value-size, inherit);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.dna-value-unit {
    align-self: flex-end;
    margin: 0 0 .08em -.04em;
    color: var(--muted);
    font-size: calc(var(--dna-value-size, 18px) * .48);
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
}

.nav-account-button.is-authenticated .nav-dna-value,
.nav-account-button.is-progress .nav-dna-value {
    --dna-value-size: 20px;
}

.nav-dna-icon {
    margin-left: -3px;
}

.nav-dna-value > .nav-context-icon {
    width: 28px;
    height: 28px;
    margin-left: -3px;
    object-fit: contain;
    filter: drop-shadow(0 3px 4px rgba(29, 35, 48, .18));
}

.nav-dna-value > .nav-context-icon.chess-dna-icon {
    width: calc(var(--dna-value-size, 20px) * 1.3333);
    height: var(--dna-value-size, 20px);
}

.nav-context-icon[hidden] {
    display: none;
}

.nav-account-button.is-authenticated .nav-account-label,
.nav-account-button.is-progress .nav-account-label {
    color: var(--accent-ink);
    font-size: var(--dna-value-size);
    font-weight: 800;
}

.nav-toggle,
.pwa-install-button {
    min-width: 40px;
    min-height: 40px;
    border: 1px solid var(--line-hi);
    border-radius: 999px;
    background: var(--surface);
    box-shadow: 0 6px 16px rgba(52, 43, 36, .07);
    color: var(--ink);
}

.nav-toggle {
    --nav-toggle-edge: #c8bdb3;
    margin-bottom: 3px;
    border-color: var(--nav-toggle-edge);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .84),
        0 3px 0 var(--nav-toggle-edge),
        0 8px 15px rgba(52, 43, 36, .1);
    translate: 0 0;
    transition: border-color .14s ease, background .14s ease, box-shadow .1s ease, translate .1s ease;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
    border-color: #b9aca1;
    background: #fffaf5;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .88),
        0 4px 0 #b9aca1,
        0 10px 18px rgba(52, 43, 36, .12);
    outline: 0;
    translate: 0 -1px;
}

.nav-toggle:focus-visible {
    outline: 3px solid rgba(234, 118, 95, .22);
    outline-offset: 2px;
}

.nav-toggle:active {
    box-shadow: inset 0 1px 3px rgba(52, 43, 36, .14), 0 1px 0 #b9aca1;
    translate: 0 2px;
}

.site-header nav .pwa-install-button {
    min-height: 38px;
    padding: 8px 11px;
    border-color: #d98b7c;
    background: var(--accent-pale);
    box-shadow: none;
    color: var(--accent-ink);
    font-size: 10px;
}

.pwa-install-banner {
    position: relative;
    z-index: 205;
    display: block;
    width: max-content;
    max-width: calc(100% - 24px);
    min-height: 42px;
    margin: 8px auto 4px;
    padding: 9px 15px;
    border-color: #b94d39;
    background: var(--accent);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .55),
        0 4px 0 #b94d39,
        0 10px 20px rgba(185, 77, 57, .2);
    color: var(--ink);
    font-size: 11px;
    font-weight: 600;
    translate: 0 0;
    transition: border-color .14s ease, background .14s ease, box-shadow .1s ease, translate .1s ease;
}

.pwa-install-banner:hover,
.pwa-install-banner:focus-visible {
    border-color: #a84332;
    background: var(--accent-soft);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .64),
        0 5px 0 #a84332,
        0 12px 22px rgba(185, 77, 57, .24);
    outline: 0;
    translate: 0 -1px;
}

.pwa-install-banner:focus-visible {
    outline: 3px solid rgba(234, 118, 95, .24);
    outline-offset: 2px;
}

.pwa-install-banner:active {
    box-shadow: inset 0 1px 3px rgba(52, 43, 36, .14), 0 1px 0 #a84332;
    translate: 0 3px;
}

.pwa-install-banner:disabled {
    box-shadow: inset 0 1px 2px rgba(52, 43, 36, .12), 0 2px 0 #b94d39;
    opacity: .68;
    translate: 0 2px;
}

body.is-quick-puzzle .pwa-install-banner {
    display: none !important;
}

.home-hub-tabs-wrap {
    width: min(1180px, calc(100% - 24px));
    max-width: none;
    margin: 14px auto 0;
    padding: 12px 16px;
}

.home-hub-tabs {
    grid-template-columns: repeat(9, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr);
    grid-auto-flow: column;
    gap: 6px;
    padding: 5px 5px 9px;
    border: 1px solid var(--line);
    border-radius: var(--radius-limit, 14px);
    background: rgba(255, 253, 250, .94);
    box-shadow: var(--shadow-soft);
}

.home-hub-tabs a {
    --hub-tab-face: #fffdfa;
    --hub-tab-edge: #c8bdb3;
    --hub-tab-shadow: rgba(52, 43, 36, .11);
    min-height: 54px;
    margin-bottom: 4px;
    padding: 10px 16px;
    border: 1px solid var(--hub-tab-edge);
    border-radius: var(--radius-limit, 14px);
    background: var(--hub-tab-face);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .84),
        0 4px 0 var(--hub-tab-edge),
        0 10px 19px var(--hub-tab-shadow);
    color: var(--muted);
    translate: 0 0;
    transition: border-color .14s ease, background .14s ease, box-shadow .1s ease, color .14s ease, translate .1s ease;
}

.home-hub-tabs a {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 32px auto;
    row-gap: 4px;
    align-content: center;
    align-items: center;
    justify-items: center;
    justify-content: center;
    text-align: center;
}

.home-hub-tab-icon {
    display: block;
    grid-column: 1;
    grid-row: 1;
    width: 32px;
    height: 32px;
    object-fit: contain;
}

@media (min-width: 621px) {
    .home-hub-tabs a {
        grid-template-rows: 44px auto;
    }

    .home-hub-tab-icon {
        width: 44px;
        height: 44px;
    }
}

.home-hub-tabs a > span {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
}

.home-hub-tabs a:hover,
.home-hub-tabs a:focus-visible {
    --hub-tab-face: #fffaf5;
    --hub-tab-edge: #b9aca1;
    color: var(--ink);
}

.home-hub-tabs a.active {
    --hub-tab-face: var(--accent);
    --hub-tab-edge: #b94d39;
    --hub-tab-shadow: rgba(185, 77, 57, .2);
    border-color: var(--hub-tab-edge);
    background: var(--hub-tab-face);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .58),
        0 4px 0 var(--hub-tab-edge),
        0 10px 19px var(--hub-tab-shadow);
    color: var(--ink);
}

.home-hub-tabs a:hover,
.home-hub-tabs a:focus-visible {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .88),
        0 5px 0 var(--hub-tab-edge),
        0 12px 22px var(--hub-tab-shadow);
    outline: 0;
    translate: 0 -1px;
}

.home-hub-tabs a:focus-visible {
    outline: 3px solid rgba(234, 118, 95, .22);
    outline-offset: 2px;
}

.home-hub-tabs a:active {
    box-shadow:
        inset 0 1px 3px rgba(52, 43, 36, .14),
        0 1px 0 var(--hub-tab-edge),
        0 4px 8px var(--hub-tab-shadow);
    translate: 0 3px;
}

.home-hub-tabs a.active small {
    color: rgba(34, 33, 31, .72);
}

.home-hub-tabs span {
    font-size: 14px;
}

.home-hub-tabs small {
    color: var(--muted);
    font-size: 9px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

/* Foundational surfaces */
.paper-card,
.analyzer-card,
.legal-page section,
.account-page-card {
    border-color: var(--line);
    border-radius: var(--radius-card);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    color: var(--ink);
}

.eyebrow,
.hero-brand {
    color: var(--accent-ink);
    font: 820 10px/1.2 var(--mono);
    letter-spacing: .16em;
    text-transform: uppercase;
}

.button {
    --button-face: var(--surface);
    --button-edge: #bfb4aa;
    --button-shadow: rgba(52, 43, 36, .12);
    min-height: 45px;
    padding: 10px 16px;
    border-color: var(--button-edge);
    border-radius: var(--radius-control);
    background: var(--button-face);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .78),
        inset 0 -1px 0 rgba(52, 43, 36, .10),
        0 4px 0 var(--button-edge),
        0 10px 18px var(--button-shadow);
    font: 600 14px/1 var(--sans);
    letter-spacing: -.01em;
    text-shadow: none;
    translate: 0 0;
    transition: background-color .12s ease, border-color .12s ease, box-shadow .09s ease, color .12s ease, translate .09s ease;
}

.primary-button {
    --button-face: var(--accent);
    --button-edge: #b94d39;
    --button-shadow: rgba(185, 77, 57, .22);
    border-color: var(--button-edge);
    background: var(--button-face);
    color: var(--ink);
}

.button:hover:not(:disabled) {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .82),
        inset 0 -1px 0 rgba(52, 43, 36, .10),
        0 5px 0 var(--button-edge),
        0 12px 22px var(--button-shadow);
    filter: none;
}

.button:not(.progress-share-sticky, .board-next-tactic):hover:not(:disabled) {
    translate: 0 -1px;
}

.button:active:not(:disabled) {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .55),
        inset 0 1px 3px rgba(52, 43, 36, .14),
        0 1px 0 var(--button-edge),
        0 4px 8px var(--button-shadow);
}

.button:not(.progress-share-sticky, .board-next-tactic):active:not(:disabled) {
    translate: 0 3px;
}

.button:disabled {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .5),
        0 2px 0 var(--button-edge);
    translate: 0 2px;
}

.primary-button:focus-visible {
    outline-color: var(--accent) !important;
}

.secondary-button {
    --button-face: var(--surface);
    --button-edge: #bfb4aa;
    --button-shadow: rgba(52, 43, 36, .12);
    border-color: var(--button-edge);
    background: var(--button-face);
    color: var(--ink);
}

.button:is(.board-reveal-tactic, .reveal-answer) {
    --button-face: var(--accent);
    --button-edge: #b94d39;
    --button-shadow: rgba(185, 77, 57, .22);
    border-color: var(--button-edge);
    background: var(--button-face);
    color: #fff0da;
    text-shadow: 0 1px 0 rgba(145, 62, 43, .42);
}

.secondary-button:hover {
    --button-face: var(--accent-pale);
    --button-edge: #d98b7c;
    border-color: var(--button-edge);
    background: var(--accent-pale);
}

.button:is(.board-reveal-tactic, .reveal-answer):hover:not(:disabled) {
    --button-face: #f08a75;
    --button-edge: #b94d39;
    border-color: var(--button-edge);
    background: var(--button-face);
}

@media (min-width: 721px) {
    .board-tactic-actions .board-reveal-tactic {
        font-size: 15px;
        font-weight: 850;
    }
}

.field > span,
.account-form label > span,
.deletion-form-card label > span,
.puzzle-tools label span {
    color: #5f5954;
    font: 780 9px/1.2 var(--mono);
    letter-spacing: .12em;
}

.field textarea,
.field input,
.field select,
.account-form input,
.deletion-form-card input,
.puzzle-tools input,
.puzzle-tools select,
.training-mode-field select,
.progress-username-form input,
.admin-login-form input[type="password"],
.admin-search input[type="search"],
.admin-notification-compose input[type="text"],
.admin-notification-compose input[type="search"],
.admin-notification-compose input[type="datetime-local"],
.admin-notification-compose textarea,
.admin-notification-compose select,
.admin-source-prompt textarea[readonly] {
    border-color: #cfc3b8;
    background: linear-gradient(180deg, #f6efe8 0, #fffdfa 27%, #fff 100%);
    border-radius: min(13px, var(--radius-limit, 14px));
    box-shadow: var(--field-depth);
    color: var(--ink);
    transition: border-color .14s ease, background .14s ease, box-shadow .14s ease;
}

.field textarea {
    font-family: var(--mono);
}

.field textarea::placeholder,
.field input::placeholder,
.account-form input::placeholder {
    color: #9b948e;
}

.field textarea:focus,
.field input:focus,
.field select:focus,
.account-form input:focus,
.puzzle-tools input:focus,
.puzzle-tools select:focus,
.training-mode-field select:focus,
.progress-username-form input:focus,
.admin-login-form input[type="password"]:focus,
.admin-search input[type="search"]:focus,
.admin-notification-compose input[type="text"]:focus,
.admin-notification-compose input[type="search"]:focus,
.admin-notification-compose input[type="datetime-local"]:focus,
.admin-notification-compose textarea:focus,
.admin-notification-compose select:focus,
.admin-source-prompt textarea[readonly]:focus {
    border-color: #ea765f;
    background: #fffdfa;
    box-shadow: var(--field-depth), var(--focus);
}

.deletion-form-card input:focus {
    border-color: var(--red);
    background: #fffdfa;
    box-shadow: var(--field-depth), 0 0 0 3px rgba(183, 69, 62, .14);
}

.deletion-form-card input:focus-visible {
    outline-color: var(--red) !important;
}

.deletion-form-card input[readonly],
.admin-source-prompt textarea[readonly] {
    background: linear-gradient(180deg, #ebe4dc 0, #f5f0e9 32%, #f8f4ef 100%);
    box-shadow:
        inset 0 2px 4px rgba(52, 43, 36, .10),
        inset 0 -1px 0 rgba(255, 255, 255, .76),
        0 1px 0 #d8cec5;
}

select {
    color-scheme: light;
}

/* Hero and entry workspace */
.capability-strip {
    width: min(1180px, calc(100% - 24px));
    height: auto;
    min-height: 34px;
    margin: 8px auto 0;
    padding: 0 8px;
    border: 0;
    background: transparent;
}

.capability-strip span {
    padding: 5px 8px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font: 760 9px/1 var(--mono);
    letter-spacing: .12em;
    text-transform: uppercase;
}

.view-home .capability-strip span + span::before {
    color: #cec5bc;
    content: "/";
}

.hero,
.directory-hero {
    position: relative;
    width: min(1180px, calc(100% - 24px));
    max-width: none;
    margin: 0 auto;
    padding: 66px 30px 32px;
    overflow: hidden;
    text-align: left;
}

.hero::after,
.directory-hero::after {
    position: absolute;
    z-index: -1;
    right: 6%;
    top: 48%;
    width: 310px;
    height: 310px;
    background: center / contain no-repeat url('/assets/images/tabs/play-clay-v1.png');
    content: "";
    filter: drop-shadow(0 20px 35px rgba(52, 43, 36, .108));
    opacity: .09;
    transform: translateY(-50%) rotate(-8deg);
}

.hero h1,
.directory-hero h1 {
    max-width: 850px;
    margin: 10px 0 15px;
    color: var(--ink);
    font: 860 clamp(52px, 7.5vw, 92px)/.91 var(--display);
    letter-spacing: -.075em;
}

.directory-hero h1 {
    font-size: clamp(47px, 6.5vw, 78px);
}

.hero h1 em,
.directory-hero h1 em,
.progress-page-hero h1 em,
.comparison-index-hero h1 em {
    color: var(--accent-ink);
    font-style: normal;
    font-weight: inherit;
}

.hero > p:last-child,
.directory-hero > p:last-child {
    max-width: 680px;
    margin: 0;
    color: #68615c;
    font-size: 18px;
    line-height: 1.58;
}

body.view-puzzles .directory-hero.puzzle-directory-hero {
    width: min(1100px, 100%);
    padding-inline: 20px;
}

body.view-puzzles .directory-hero.puzzle-directory-hero h1 {
    max-width: none;
    font-size: clamp(36px, 5vw, 66px);
    text-wrap: balance;
}

body.view-puzzles .directory-hero.puzzle-directory-hero > p:last-child {
    max-width: none;
    font-size: clamp(16px, 2.24vw, 18px);
    text-wrap: balance;
}

body.view-puzzles .directory-hero.workout-directory-hero h1 {
    font-size: clamp(28px, 4vw, 42px);
}

.directory-hero-action,
.library-more-link {
    border-color: #dfa395;
    border-radius: 10px;
    background: #fffaf5;
    color: var(--accent-ink);
}

.analyzer-wrap {
    max-width: 1180px;
    margin-bottom: 42px;
}

body.view-puzzles .site-header,
body.view-puzzles .home-hub-tabs-wrap {
    width: min(1060px, calc(100% - 40px));
}

.analyzer-card {
    padding: 0 26px 25px;
    overflow: hidden;
}

.analyzer-heading {
    padding-top: 3px;
}

.analyzer-heading h2,
.section-heading h2,
.coming-grid h2,
.how-section h2,
.progress-dashboard-grid h2,
.training-section-heading h2 {
    color: var(--ink);
    font-family: var(--display);
    font-weight: 820;
}

.analyzer-heading p:not(.eyebrow),
.section-heading p,
.analysis-options p,
.library-note,
.example-row,
.fen-actions p {
    color: var(--muted);
}

.coach-note {
    border-color: #dfd2a6;
    border-radius: 10px;
    background: #fff7dd;
    color: #80661e;
    font: 650 12px/1.4 var(--sans);
    transform: none;
}

.coach-note::before {
    display: none;
}

.input-tabs,
.puzzle-mode-tabs {
    gap: 5px;
    margin: 0 -26px 22px;
    padding: 6px;
    border-bottom-color: var(--line);
    background: #ffffff;
}

.input-tabs button,
.puzzle-mode-tabs button {
    min-height: 50px;
    padding: 10px 17px;
    border: 1px solid transparent;
    border-radius: min(11px, var(--radius-limit, 14px));
    background: transparent;
    color: var(--muted);
}

.input-tabs button.active,
.puzzle-mode-tabs button.active {
    border-color: #cec5bc;
    background: linear-gradient(180deg, #f5f0e9, #fffaf5);
    box-shadow: inset 0 -3px var(--accent), inset 0 1px rgba(255, 255, 255, .04);
    color: var(--ink);
}

.analysis-options {
    border-top-color: var(--line);
}

.text-button,
.account-text-button {
    border-color: #d98b7c;
    color: var(--accent-ink);
}

.analysis-progress {
    border-color: var(--line);
    border-radius: var(--radius-limit, 14px);
    background: var(--surface-raised);
}

.thinking-knight {
    border-color: #c9bfb5;
    background: radial-gradient(circle, #fff0eb, #fffaf5);
    color: var(--accent-ink);
}

/* Puzzle and lesson library */
.curriculum-count {
    border-color: #d4ccc4;
    border-radius: min(12px, var(--radius-limit, 14px));
    background: #f8f3ed;
    box-shadow: inset 0 2px 4px rgba(52, 43, 36, .105);
}

.curriculum-count strong {
    color: var(--accent-ink);
    font-family: var(--display);
}

.game-library {
    gap: 9px;
}

.puzzle-card,
.puzzle-card:nth-child(n),
.quick-puzzle,
.stationery-card,
.stationery-card.blue,
.stationery-card.yellow,
.stationery-card.green {
    --card-tint: rgba(7, 139, 116, .06);
    border-color: var(--line);
    border-radius: var(--radius-limit, 14px);
    background: linear-gradient(145deg, var(--card-tint), transparent 62%), var(--surface);
    box-shadow: 0 8px 22px rgba(52, 43, 36, .055);
    color: var(--ink);
}

.puzzle-card:nth-child(5n + 2),
.stationery-card.yellow {
    --card-tint: rgba(234, 118, 95, .1);
}

.puzzle-card:nth-child(5n + 3),
.stationery-card.green {
    --card-tint: rgba(49, 100, 244, .075);
}

.puzzle-card:nth-child(5n + 4) {
    --card-tint: rgba(117, 87, 214, .075);
}

.puzzle-card:nth-child(5n + 5) {
    --card-tint: rgba(255, 200, 92, .11);
}

.puzzle-card:hover:not(:disabled) {
    border-color: var(--accent-soft);
    box-shadow: 0 16px 34px rgba(52, 43, 36, .11);
}

.puzzle-card:disabled {
    border-color: #ebe4dc;
    background: #f5f0e9;
    color: #9b948e;
    filter: none;
    opacity: .64;
}

.puzzle-card.completed,
.quick-puzzle.completed {
    border-color: rgba(7, 139, 116, .42);
    background: linear-gradient(145deg, rgba(7, 139, 116, .09), transparent 62%), #fffdfa;
    box-shadow: inset 0 0 0 1px rgba(7, 139, 116, .08), 0 8px 22px rgba(52, 43, 36, .055);
}

.puzzle-card small,
.puzzle-card p,
.stationery-card small,
.stationery-card p {
    color: var(--muted);
}

.puzzle-card .game-status,
.puzzle-card .game-reward,
.puzzle-card.completed .game-reward {
    color: var(--accent-ink);
}

.puzzle-card.completed .game-status,
.puzzle-card.completed .game-reward,
.quick-puzzle.completed .game-status {
    color: var(--cyan);
}

.carousel-arrow,
.puzzle-page-controls button {
    border-color: var(--line-hi);
    background: #fffaf5;
    color: var(--ink);
}

.puzzle-branches {
    gap: 8px;
}

.puzzle-branches strong {
    font-size: clamp(13px, 1.1vw, 15px);
    line-height: 1.2;
}

.puzzle-branches small {
    margin-top: 3px;
    font-size: clamp(9px, .75vw, 10px);
    line-height: 1.2;
}

@media (max-width: 720px) {
    .puzzle-branches strong {
        font-size: clamp(11.5px, 3.33vw, 13px);
    }
}

@media (min-width: 721px) {
    .puzzle-workout-summary-stats {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

.puzzle-workout-summary-stats span b {
    color: inherit;
    font: inherit;
}

@media (max-width: 360px) {
    .puzzle-branches button,
    .puzzle-branches button:nth-child(n) {
        grid-template-columns: 30px minmax(0, 1fr);
        gap: 5px;
        padding-inline: 7px;
    }

    .puzzle-branches button > span {
        min-width: 0;
    }

    .puzzle-branch-icon {
        width: 30px;
        height: 30px;
    }
}

.puzzle-branches button,
.puzzle-branches button:nth-child(n) {
    border-color: #d9d2cb;
    border-radius: min(13px, var(--radius-limit, 14px));
    background: linear-gradient(145deg, rgba(49, 100, 244, .055), transparent 60%), #fffaf5;
    color: var(--ink);
}

.puzzle-branches button:hover,
.puzzle-branches button:focus-visible {
    border-color: #c4bbb2;
    background-color: #fffaf5;
}

.puzzle-branches button.active {
    border-color: #d98b7c;
    background: linear-gradient(145deg, rgba(234, 118, 95, .16), transparent 60%), #fff0eb;
    box-shadow: inset 3px 0 var(--accent);
}

.puzzle-mate-depths,
.puzzle-tools,
.puzzle-pagination,
.puzzle-workout-launch {
    border-color: #d7d0c8;
    border-radius: var(--radius-limit, 14px);
    background: #fffaf5;
}

.puzzle-tools-toggle {
    border-color: var(--line-hi);
    background: linear-gradient(145deg, rgba(234, 118, 95, .055), transparent 58%), #fffaf5;
    color: var(--ink);
}

.puzzle-tools-toggle b {
    border-color: #c9bfb5;
    background: #f5f0e9;
    color: var(--accent-ink);
}

.game-library .puzzle-card .game-status,
.game-library.quick-library .quick-puzzle .game-status {
    border-color: #c4bbb2;
    background: #f5f0e9;
    color: var(--accent-ink);
}

.puzzle-mate-depths button,
.puzzle-page-controls button,
.puzzle-workout-durations button {
    border-color: var(--line-hi);
    border-radius: 9px;
    background: #fffaf5;
    color: var(--ink);
}

.puzzle-mate-depths button.active,
.puzzle-page-controls button[aria-current="page"],
.puzzle-workout-durations button.active {
    border-color: #ea765f;
    background: var(--accent);
    box-shadow: inset 0 1px rgba(255, 255, 255, .45);
    color: var(--ink);
}


/* Home narrative and DNA */
.how-section {
    border-color: var(--line);
}

.how-section li {
    border-color: var(--line-hi);
}

.how-section li span {
    border-color: #c8bfb6;
    background: #fffdfa;
    color: var(--accent-ink);
}

.coming-grid article,
.coming-grid article:first-child,
.coming-grid article:last-child {
    border-color: var(--line);
    border-radius: var(--radius-limit, 14px);
    background: linear-gradient(145deg, rgba(49, 100, 244, .09), transparent 58%), var(--surface);
}

.coming-grid article:last-child {
    background: linear-gradient(145deg, rgba(7, 139, 116, .08), transparent 58%), var(--surface);
}

.dna-overview {
    border-color: #d4ccc4;
    background: linear-gradient(135deg, rgba(234, 118, 95, .1), transparent 42%), var(--surface);
}

.dna-focus {
    border-color: var(--line-hi);
}

.dna-focus > strong,
.dna-stat strong {
    color: var(--ink);
}

.dna-history {
    border-color: var(--line);
}

.dna-history span {
    border-color: var(--line-hi);
    background: #f8f3ed;
}

.dna-meter,
.progress-track,
.board-point-meter,
.report-dna-mini-stat > i,
.share-preview-row i,
.training-dna-meter,
.progress-domain-row i,
.progress-level-meter {
    overflow: hidden;
    border-radius: 999px;
    background: #e8e1d9;
}

.dna-meter i,
.progress-track span,
.board-point-meter i,
.report-dna-mini-stat > i b,
.share-preview-row b,
.training-dna-meter i,
.progress-domain-row b,
.progress-level-meter i {
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent-deep), var(--accent));
}

.report-dna-mini-stat > i {
    border: 1px solid rgba(86, 65, 55, .2);
    background: linear-gradient(180deg, #d5cbc2 0%, #e7dfd7 52%, #f6f1ec 100%);
    box-shadow:
        inset 0 2px 3px rgba(54, 40, 34, .28),
        inset 0 -1px 0 rgba(255, 255, 255, .88),
        0 1px 0 rgba(255, 255, 255, .7);
}

.report-dna-mini-stat > i b {
    background: linear-gradient(180deg, #f39682 0%, var(--accent) 45%, var(--accent-deep) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .42),
        inset 0 -2px 2px rgba(111, 46, 35, .3),
        1px 0 2px rgba(72, 43, 35, .2);
}

.progress-avatar {
    background: linear-gradient(145deg, #f4b1a3, #fff0eb);
    color: var(--accent-ink);
}

/* Progress dashboard */
.progress-page {
    max-width: 1180px;
}

.progress-rhythm-card {
    grid-column: 2;
    grid-row: 1;
}

.progress-domains-card {
    grid-column: 1;
    grid-row: 1;
}

@media (max-width: 720px) {
    .progress-rhythm-card,
    .progress-domains-card {
        grid-column: 1;
        grid-row: auto;
    }
}

.progress-page-hero h1 {
    color: var(--ink);
    font-family: var(--display);
    font-weight: 860;
}

.progress-identity {
    border-color: #d4ccc4;
    background: linear-gradient(145deg, rgba(7, 139, 116, .08), transparent 58%), var(--surface);
}

.progress-account-action,
.progress-username-form button,
.progress-chart-switch {
    border-color: var(--line-hi);
    background: #f8f3ed;
    color: var(--accent-ink);
}

.progress-kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.progress-kpis article {
    min-height: 122px;
    padding: 17px;
}

.progress-kpis article:nth-child(2n) {
    background: linear-gradient(145deg, rgba(49, 100, 244, .07), transparent 58%), var(--surface);
}

.progress-kpis strong {
    color: var(--accent-ink);
    font-family: var(--display);
}

.progress-kpis .progress-dna-kpi {
    display: block;
}

.progress-dna-value {
    --dna-value-size: 32px;
    justify-content: flex-start;
    margin: 7px 0 2px;
}

.progress-kpis .progress-dna-value {
    display: inline-flex;
}

.progress-kpis .progress-dna-value > .dna-number-text {
    margin: 0;
    color: var(--accent-ink);
    font-family: var(--display);
    font-weight: 800;
}

.dna-history-value {
    --dna-value-size: 15px;
}

.dna-history .dna-total-history {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.dna-history .dna-history-value {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.report-dna-value {
    --dna-value-size: 14px;
}

.report-dna-total-line {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.progress-level-runway,
.progress-rhythm-card,
.progress-milestones-card {
    background: linear-gradient(145deg, rgba(234, 118, 95, .08), transparent 60%), var(--surface);
}

.progress-level-medallion {
    border-color: #dfa395;
    background: #f8f3ed;
    color: var(--accent-ink);
}

.progress-momentum-card header > span {
    background: #f8f3ed;
}

.progress-momentum-card header > span[data-trend="up"] {
    background: #eefaf6;
    color: var(--cyan);
}

.progress-week-stats span,
.progress-rhythm-stats span,
.progress-recent-item,
.progress-milestone,
.progress-milestone.locked,
.progress-chart-switch button[aria-pressed="true"] {
    border-color: var(--line);
    background: #f8f3ed;
    color: var(--muted);
}

.progress-week-stats strong,
.progress-rhythm-stats strong,
.progress-recent-item strong {
    color: var(--ink);
}

.progress-coach-card {
    background: linear-gradient(145deg, rgba(49, 100, 244, .22), transparent 60%), #f6f4ff;
}

.progress-coach-card .eyebrow {
    color: var(--accent-ink);
}

.progress-coach-card h2 {
    color: var(--ink);
}

.progress-coach-card > p {
    color: var(--muted);
}

.progress-coach-piece {
    color: rgba(117, 87, 214, .08);
}

.progress-coach-card .button {
    border-color: #ea765f;
    background: var(--accent);
    color: var(--ink);
}

.progress-chart {
    background: repeating-linear-gradient(to bottom, transparent 0 46px, rgba(130, 123, 117, .22) 46px 47px);
}

.progress-chart-bar {
    background: linear-gradient(180deg, var(--accent), var(--accent-deep));
}

.progress-chart-bar.zero,
.progress-heatmap i,
.rhythm-share-grid i {
    background: #e8e1d9;
}

.rhythm-share-grid i {
    border-radius: 5px;
}

.progress-heatmap i.active,
.rhythm-share-grid i.active {
    background: #f4b1a3;
}

.progress-heatmap i.strong,
.rhythm-share-grid i.strong {
    background: var(--accent);
}

.progress-heatmap i.today,
.rhythm-share-grid i.today {
    outline-color: var(--violet);
}

.trophy-tier {
    border-color: #d7d0c8;
    background: linear-gradient(145deg, #fffaf5, #fffdfa 52%, #fffaf5);
    box-shadow: inset 0 1px rgba(255, 255, 255, .05), 0 9px 22px rgba(52, 43, 36, .087);
}

.trophy-tier-heading {
    border-color: #d7d0c8;
    color: var(--ink);
}

.trophy-tier-heading p {
    color: var(--muted);
}

.trophy-tier-heading > span {
    border-color: #cec5bc;
    background: #f5f0e9;
    color: var(--accent-ink);
}

.progress-milestone,
.progress-milestone.locked {
    border-right-color: rgba(255, 255, 255, .045);
    border-bottom-color: #d7d0c8;
    background: linear-gradient(90deg, rgba(255, 255, 255, .025), transparent 50%, rgba(52, 43, 36, .037));
    box-shadow: inset 0 -3px #fffaf5, 0 4px 0 #ddd4cb;
    color: var(--ink);
}

.progress-milestone-copy,
.progress-milestone-image {
    border-color: #d7d0c8;
    background: rgba(255, 253, 250, .76);
}

.progress-milestone strong {
    color: var(--ink);
}

.progress-share-sticky .button {
    --button-edge: #b94d39;
    --button-shadow: rgba(185, 77, 57, .22);
    border-color: #ea765f;
    background: var(--accent);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .52),
        inset 0 -1px 0 rgba(117, 43, 30, .16),
        0 5px 0 var(--button-edge),
        0 16px 32px var(--button-shadow);
    color: var(--ink);
}

.progress-share-sticky .button:hover:not(:disabled) {
    background: #f28a75;
}

.progress-trophy-account {
    border-color: #cec5bc;
    background: linear-gradient(145deg, rgba(49, 100, 244, .08), transparent 60%), #fffaf5;
    color: var(--muted);
}

.progress-trophy-account button {
    border-color: #d98b7c;
    background: var(--accent);
    box-shadow: 0 3px 0 #b94d39;
    color: var(--ink);
}

.progress-rhythm-head > button {
    border-color: #c9bfb5;
    background: #f5f0e9;
    color: var(--accent-ink);
}

.progress-rhythm-head > button:hover,
.progress-rhythm-head > button:focus-visible {
    border-color: #d98b7c;
    background: #fff0eb;
}

/* Chessboard workspace — warm cream and dusty slate complement the coral accent. */
.report-shell {
    max-width: 1240px;
}

@media (min-width: 901px) {
    body.is-quick-puzzle .report-shell {
        padding-top: 5px;
    }
}

.back-link,
.report-copy-link {
    color: #736d67;
}

.report-hero h1 {
    color: var(--ink);
    font-family: var(--display);
    font-weight: 850;
}

.report-hero h1 span,
.matchup-vs,
.report-hero .report-skill-update {
    color: var(--accent-ink);
}

.matchup-result,
.report-hero .report-skill-update {
    border-color: #cec5bc;
    background: #fffaf5;
}

.board-paper {
    padding: 15px;
    border-color: #d7d0c8;
    background: linear-gradient(145deg, rgba(234, 118, 95, .055), transparent 44%), #fffdfa;
}

/* Full-size boards share the compact raised card used by Learn lessons. */
.shared-board-card.shared-board-card {
    padding: 5px;
    border: 1px solid #dcd2c5;
    border-radius: var(--radius-limit, 14px);
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 12px 0 rgba(63, 48, 37, .1), 0 22px 44px rgba(63, 48, 37, .12);
}

.shared-board-card.shared-board-card > .puzzle-board-status-row {
    margin: 8px 4px 2px;
}

.shared-board-card.shared-board-card > .puzzle-board-status-row > .puzzle-board-prompt {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.shared-board-card.shared-board-card > .puzzle-board-status-row > .puzzle-board-prompt strong {
    font: 700 15px/1.2 var(--serif);
}

@media (max-width: 350px) {
    .shared-board-card.shared-board-card {
        padding: 10px;
    }
}

.board-task {
    border-color: #d7d0c8;
    border-radius: min(12px, var(--radius-limit, 14px));
    background: #f8f3ed;
}

.board-label {
    color: var(--muted);
    font-family: var(--mono);
}

.board-label .puzzle-solve-timer {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--accent-ink);
}

.board-label .puzzle-solve-timer::before {
    content: '';
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    background: url('/assets/images/puzzle-timer-orange-clay-v1-64.webp') center / contain no-repeat;
}

:is(body.is-quick-puzzle, .arcade-board-panel) .board-label > .puzzle-board-back {
    display: grid;
    width: 34px;
    height: 32px;
    min-height: 0;
    padding: 0;
    place-items: center;
    border: 1px solid #d4bda5;
    border-radius: 9px;
    background: var(--mobile-header-cream);
    box-shadow: inset 0 1px 0 #fffdf8, inset 0 -1px 0 #ead8c3, 0 4px 0 #c4a98e, 0 6px 8px #79451f1a;
    color: #ad4635;
    font-size: 18px;
}

:is(body.is-quick-puzzle, .arcade-board-panel) .board-label > .board-sound-toggle {
    margin-right: 5px;
}

:is(body.is-quick-puzzle, .arcade-board-panel) .board-label > .puzzle-copy-button {
    margin-right: 47px;
}

.chessboard {
    border: 7px solid var(--board-frame);
    border-radius: var(--radius-limit, 14px);
    background: var(--board-light);
    box-shadow: 0 4px 0 var(--board-frame), 0 15px 34px rgba(52, 43, 36, .093), inset 0 0 0 1px rgba(255, 255, 255, .05);
}

.board-square.light {
    background: var(--board-light);
}

.board-square.dark {
    background: var(--board-dark);
}

.board-side-cue {
    border-color: rgba(234, 118, 95, .45);
    background: rgba(34, 33, 31, .92);
    color: #fff;
}

.puzzle-board-prompt {
    border-color: var(--line);
    border-radius: min(12px, var(--radius-limit, 14px));
    background: var(--surface-soft);
}

.puzzle-board-prompt span {
    color: var(--accent-ink);
}

.puzzle-board-prompt.incorrect {
    border-color: #dca39e;
    background: var(--red-soft);
}

.puzzle-board-prompt.incorrect strong,
.puzzle-board-prompt.incorrect span {
    color: #b7453e;
}

.puzzle-board-prompt.correct {
    border-color: rgba(7, 139, 116, .38);
    background: #eefaf6;
}

.puzzle-board-prompt.correct strong,
.puzzle-board-prompt.correct span {
    color: var(--cyan);
}

.puzzle-board-prompt.answer {
    border-color: #ddca82;
    background: #fff7dd;
}

body.is-quick-puzzle .puzzle-board-prompt {
    justify-content: center;
    text-align: center;
}

.puzzle-board-status-row:not(:has(> :not([hidden]))) {
    display: none;
}

:is(body.is-quick-puzzle, .arcade-board-panel) .puzzle-board-status-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    text-align: center;
}

:is(body.is-quick-puzzle, .arcade-board-panel) .puzzle-board-status-row > .puzzle-board-prompt:not([hidden]),
:is(body.is-quick-puzzle, .arcade-board-panel) .puzzle-board-status-row > .puzzle-task-meta:not([hidden]) {
    display: contents;
}

:is(body.is-quick-puzzle, .arcade-board-panel) .puzzle-board-status-row :is(#puzzle-instruction, #arcade-move-instruction) {
    grid-column: 2;
    grid-row: 1;
    white-space: nowrap;
}

:is(body.is-quick-puzzle, .arcade-board-panel) .puzzle-board-status-row .puzzle-task-rating {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
}

:is(body.is-quick-puzzle, .arcade-board-panel) .puzzle-board-status-row .puzzle-task-difficulty {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
}

body.is-quick-puzzle #puzzle-position-count,
body.is-quick-puzzle #board-share-actions {
    display: none !important;
}

body.is-quick-puzzle #board-task .puzzle-task-side {
    display: none;
}

body.is-quick-puzzle #board-task.puzzle-task-fox:not([hidden]) {
    display: grid !important;
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: end;
    gap: 0;
    margin: 3px 0 0;
    padding: 6px 5px 13px 0;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
    text-align: left;
}

body.is-quick-puzzle .board-column > #board-task.puzzle-task-fox:not([hidden]) {
    margin-top: 20px;
}

.puzzle-task-fox > img {
    position: relative;
    z-index: 2;
    width: 78px;
    height: 78px;
    object-fit: contain;
    filter: drop-shadow(0 8px 8px rgba(91, 50, 35, .2));
    transform: translate(4px, 6px);
}

.puzzle-task-fox-bubble {
    position: relative;
    z-index: 1;
    display: grid;
    min-width: 0;
    min-height: 74px;
    margin-left: -5px;
    padding: 13px 16px 14px 20px;
    place-content: center;
    border: 1px solid #d9c4b5;
    border-radius: var(--radius-limit, 14px) var(--radius-limit, 14px) var(--radius-limit, 14px) min(12px, var(--radius-limit, 14px));
    background: radial-gradient(circle at 90% 5%, rgba(255, 226, 212, .48), transparent 37%), linear-gradient(155deg, #fffefd 0%, #fff8f3 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .98), inset 0 -2px 5px rgba(153, 91, 61, .07), 0 5px 0 #cfa58d, 0 12px 23px rgba(68, 43, 32, .17);
    color: #67554d;
    text-align: center;
}

.puzzle-task-side {
    display: block;
    margin-bottom: 4px;
    color: #815f52;
    font: 700 12px/1.1 var(--sans);
    letter-spacing: .01em;
}

.puzzle-task-meta {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 9px;
    padding: 0 2px;
    color: var(--muted);
    font: 800 10px/1.2 var(--sans);
    font-variant-numeric: tabular-nums;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.puzzle-task-rating {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    cursor: pointer;
    white-space: nowrap;
}

.puzzle-task-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.puzzle-task-elo-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.puzzle-task-rating b {
    color: inherit;
    font: inherit;
}

.puzzle-task-difficulty {
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    cursor: pointer;
    white-space: nowrap;
}

.puzzle-task-rating:focus-visible,
.puzzle-task-difficulty:focus-visible {
    border-radius: 5px;
    outline: 2px solid rgba(234, 118, 95, .55);
    outline-offset: 3px;
}

.puzzle-task-fox-bubble::before {
    position: absolute;
    z-index: -1;
    left: -8px;
    bottom: 18px;
    width: 23px;
    height: 20px;
    border: 1px solid #d9c4b5;
    border-width: 0 0 1px 1px;
    border-radius: 2px 2px 2px 6px;
    background: #fff9f5;
    box-shadow: -3px 3px 0 #cfa58d;
    content: "";
    transform: skew(-24deg) rotate(-7deg);
}

.puzzle-task-fox-bubble strong {
    display: block;
    color: #492d24;
    font: 800 17px/1.15 var(--serif);
    letter-spacing: 0;
}

.puzzle-task-fox.is-wrong {
    animation: puzzle-task-fox-wrong-shake .46s cubic-bezier(.36, .07, .19, .97) both;
}

.puzzle-task-fox.is-wrong .puzzle-task-fox-bubble {
    border-color: #dca39e;
    background: linear-gradient(155deg, #fffdfc 0%, #fff0ed 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .98), inset 0 -2px 5px rgba(183, 69, 62, .08), 0 5px 0 #c98178, 0 12px 23px rgba(91, 45, 39, .18);
}

.puzzle-task-fox.is-wrong .puzzle-task-fox-bubble strong {
    color: #a43f38;
}

.puzzle-task-fox.is-wrong .puzzle-task-side {
    color: #8d5c57;
}

@keyframes puzzle-task-fox-wrong-shake {
    0%, 100% { transform: translateX(0); }
    18%, 54% { transform: translateX(-8px) rotate(-1deg); }
    36%, 72% { transform: translateX(8px) rotate(1deg); }
    88% { transform: translateX(-3px); }
}

    .puzzle-task-standing {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        margin-top: 7px;
        color: #67554d;
        font: 700 11px/1 var(--sans);
        font-variant-numeric: tabular-nums;
    }

    .puzzle-task-standing > span {
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }

    .puzzle-task-standing img {
        display: block;
        width: auto;
        height: 18px;
        object-fit: contain;
        filter: none;
        transform: none;
    }

    .puzzle-task-standing b {
        color: inherit;
        font: inherit;
    }

@media (max-width: 680px) {
    body.is-quick-puzzle #board-task.puzzle-task-fox:not([hidden]) {
        grid-template-columns: 68px minmax(0, 1fr);
        padding: 6px 5px 13px 0;
    }

    .puzzle-task-fox > img {
        width: 72px;
        height: 72px;
        transform: translate(4px, 6px);
    }

    .puzzle-task-fox-bubble {
        min-height: 73px;
        padding: 13px 14px 14px 18px;
        border-radius: var(--radius-limit, 14px) var(--radius-limit, 14px) var(--radius-limit, 14px) 10px;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .98), inset 0 -2px 4px rgba(153, 91, 61, .06), 0 4px 0 #cfa58d, 0 9px 17px rgba(68, 43, 32, .16);
    }

    .puzzle-task-fox-bubble strong {
        font-size: 15px;
    }

}

@media (prefers-reduced-motion: reduce) {
    .puzzle-task-fox.is-wrong {
        animation: none;
    }
}

.board-point-gain {
    position: relative;
    border-color: var(--accent-deep);
    border-radius: var(--radius-limit, 14px);
    background: linear-gradient(145deg, rgba(234, 118, 95, .09), transparent 58%), #fffaf5;
    animation: none;
}

.board-point-gain.actions-only.is-solved-puzzle {
    padding: 12px;
    border: 1px solid var(--accent-deep);
    background: linear-gradient(145deg, rgba(234, 118, 95, .09), transparent 58%), #fffaf5;
    box-shadow: 0 7px 20px rgba(56, 80, 60, .09);
}

.puzzle-result-metrics {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin-bottom: 0;
    overflow: visible;
}

.board-point-gain > header.puzzle-result-metrics {
    display: grid;
    width: 100%;
    margin-bottom: 0;
}

.puzzle-result-metrics.has-elo {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.puzzle-result-metrics > .puzzle-result-metric {
    appearance: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 36px;
    padding: 4px 6px;
    border: 1px solid rgba(72, 67, 60, .14);
    border-radius: 9px;
    background: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .68);
    cursor: pointer;
    font: inherit;
    text-align: center;
}

.puzzle-result-metrics > .puzzle-result-metric:hover {
    filter: brightness(1.025);
}

.puzzle-result-metrics > .puzzle-result-metric:focus-visible,
.puzzle-result-metrics > .puzzle-result-metric[aria-expanded="true"] {
    outline: 3px solid rgba(82, 112, 84, .24);
    outline-offset: 2px;
}

.puzzle-result-metrics > .puzzle-result-metric[hidden] {
    display: none;
}

.puzzle-result-metrics > .puzzle-result-metric > small {
    color: inherit;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.puzzle-result-metrics > .puzzle-result-metric > strong {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    color: inherit;
    font: 900 15px/1 var(--display);
    font-variant-numeric: tabular-nums;
}

.puzzle-result-metrics > .puzzle-result-dna {
    position: relative;
    border-color: rgba(181, 82, 60, .22);
    background: linear-gradient(135deg, #e96f59, #cf5946);
    color: #fff8ef;
}

.puzzle-result-dna > .puzzle-result-dna-value,
.board-feedback-card > header > .board-feedback-total-wrap {
    --dna-value-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 70px;
    height: 38px;
    padding: 0 8px 0 4px;
}

.puzzle-result-dna > .puzzle-result-dna-value {
    justify-content: center;
    min-width: 0;
    height: auto;
    padding: 0;
}

.puzzle-result-dna > .puzzle-result-dna-value .chess-dna-icon {
    width: 20px;
    height: 15px;
}

.puzzle-result-dna-change {
    position: relative;
    flex: 0 0 auto;
    margin-left: -2px;
    color: rgba(255, 248, 239, .56);
    font: 900 8px/1 var(--sans);
    white-space: nowrap;
    pointer-events: none;
}

.puzzle-result-dna-change[hidden] {
    display: none;
}

.puzzle-result-metrics > .puzzle-result-elo {
    position: relative;
    border-color: rgba(49, 92, 61, .24);
    background: linear-gradient(135deg, #edf5e9, #dbead7);
    color: #294d31;
}

.puzzle-result-elo-change {
    position: relative;
    flex: 0 0 auto;
    margin-left: -2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(55, 108, 69, .58);
    font: 900 8px/1 var(--sans);
    white-space: nowrap;
    pointer-events: none;
}

.puzzle-result-elo-change[hidden] {
    display: none;
}

.puzzle-result-dna-change::after,
.puzzle-result-elo-change::after {
    position: absolute;
    top: 50%;
    left: 50%;
    color: currentColor;
    content: attr(data-float-label);
    font: inherit;
    opacity: 0;
    pointer-events: none;
    text-shadow: 0 2px 5px rgba(43, 38, 32, .18);
    transform: translate(-50%, -50%);
    white-space: nowrap;
    will-change: transform, opacity;
}

.puzzle-result-dna.is-dna-animating .puzzle-result-dna-change::after,
.puzzle-result-elo.is-elo-animating .puzzle-result-elo-change::after {
    animation: result-change-float 2s cubic-bezier(.18, .68, .2, 1) both;
}

.puzzle-result-elo-icon {
    display: block;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    object-fit: contain;
    filter: drop-shadow(0 2px 2px rgba(29, 35, 48, .18));
}

.puzzle-result-metrics > .puzzle-result-elo.is-rating-down {
    border-color: rgba(149, 70, 54, .24);
    background: linear-gradient(135deg, #fff0eb, #f5dcd5);
    color: #773b30;
}

.puzzle-result-elo.is-rating-down .puzzle-result-elo-change {
    color: rgba(166, 79, 61, .58);
}

.puzzle-result-elo-save-status {
    margin-left: 5px;
    color: currentColor;
    font-size: 7px !important;
    letter-spacing: .04em !important;
    opacity: .68;
    white-space: nowrap;
}

.puzzle-result-elo.is-rating-pending .puzzle-result-elo-save-status {
    display: inline;
}

.puzzle-result-elo.is-rating-queued .puzzle-result-elo-save-status {
    color: #8a493d;
    opacity: .9;
}

.puzzle-metric-popover {
    position: absolute;
    z-index: 36;
    bottom: calc(100% + 9px);
    box-sizing: border-box;
    width: min(354px, 100%);
    max-height: min(480px, calc(100dvh - 86px));
    padding: 15px;
    overflow-y: auto;
    border: 1px solid #cfc6bc;
    border-radius: var(--radius-limit, 14px);
    background: #fffdfa;
    box-shadow: 0 18px 48px rgba(42, 42, 36, .22), 0 3px 10px rgba(42, 42, 36, .1);
    color: var(--ink);
    text-align: left;
}

.puzzle-metric-popover[hidden] {
    display: none;
}

.puzzle-metric-board-overlay {
    position: absolute;
    z-index: 35;
    inset: 0;
    display: grid;
    box-sizing: border-box;
    padding: 10px;
    place-items: center;
    border-radius: inherit;
    background: rgba(24, 30, 25, .58);
    backdrop-filter: blur(1.5px);
}

.puzzle-metric-popover.is-board-overlay {
    position: relative;
    z-index: 1;
    inset: auto;
    width: min(354px, 100%);
    max-height: 100%;
}

.puzzle-metric-popover.is-board-overlay::after {
    display: none;
}

.puzzle-metric-popover::after {
    position: absolute;
    bottom: -7px;
    width: 12px;
    height: 12px;
    border-right: 1px solid #cfc6bc;
    border-bottom: 1px solid #cfc6bc;
    background: #fffdfa;
    content: "";
    transform: rotate(45deg);
}

.puzzle-dna-popover {
    left: 0;
}

.puzzle-dna-popover::after {
    left: 25%;
}

.puzzle-elo-popover {
    right: 0;
}

.puzzle-elo-popover::after {
    right: 25%;
}

.puzzle-metric-popover > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.puzzle-metric-popover > header small,
.puzzle-metric-popover > header strong {
    display: block;
}

.puzzle-metric-popover > header small {
    color: var(--green-dark);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.puzzle-metric-popover > header strong {
    margin-top: 2px;
    color: var(--ink);
    font: 850 25px/1 var(--display);
    font-variant-numeric: tabular-nums;
}

.puzzle-metric-popover > header > button {
    display: grid;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    padding: 0;
    place-items: center;
    border: 1px solid #d9d1c8;
    border-radius: 50%;
    background: #f6f1eb;
    color: #615b54;
    cursor: pointer;
    font: 20px/1 Arial, sans-serif;
}

.puzzle-metric-popover > header > button:hover,
.puzzle-metric-popover > header > button:focus-visible {
    border-color: var(--green);
    color: var(--ink);
    outline: 2px solid rgba(82, 112, 84, .18);
    outline-offset: 1px;
}

.puzzle-metric-popover > p {
    margin: 9px 0 12px;
    color: #6f6860;
    font-size: 11px;
    line-height: 1.45;
}

.puzzle-dna-popover-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.puzzle-dna-popover-grid > span {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 7px;
    padding: 7px 8px;
    border: 1px solid #e2dbd2;
    border-radius: 8px;
    background: #faf7f1;
    color: #655f58;
    font-size: 9px;
    font-weight: 750;
}

.puzzle-dna-popover-grid > span b {
    flex: none;
    color: var(--ink);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.puzzle-elo-popover-intro {
    margin-bottom: 11px !important;
}

.puzzle-elo-history {
    padding-top: 10px;
    border-top: 1px solid #e0d9d0;
}

.puzzle-elo-history > div:first-child {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.puzzle-elo-history > div:first-child strong {
    font-size: 10px;
}

.puzzle-elo-history > div:first-child span {
    color: #736d65;
    font-size: 8px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.puzzle-elo-chart {
    display: grid;
    min-height: 92px;
    margin-top: 7px;
    place-items: center;
    border: 1px solid #e0ddd5;
    border-radius: 9px;
    background: linear-gradient(to bottom, rgba(82, 112, 84, .05), transparent), repeating-linear-gradient(to bottom, transparent 0 29px, rgba(82, 112, 84, .09) 29px 30px);
    color: #777168;
    font-size: 9px;
    text-align: center;
}

.puzzle-elo-chart svg {
    display: block;
    width: 100%;
    height: 92px;
    overflow: visible;
}

.puzzle-elo-chart .puzzle-elo-chart-line {
    fill: none;
    stroke: #527054;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 3;
    vector-effect: non-scaling-stroke;
}

.puzzle-elo-chart .puzzle-elo-chart-area {
    fill: rgba(82, 112, 84, .12);
}

.puzzle-elo-chart circle {
    fill: #fffdfa;
    stroke: #527054;
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
}

.puzzle-elo-chart text {
    fill: #625d56;
    font: 800 8px var(--sans);
    font-variant-numeric: tabular-nums;
}

@keyframes result-change-float {
    0% { opacity: 0; transform: translate(-50%, calc(-50% + 4px)) scale(.84) rotate(-3deg); }
    12% { opacity: .92; transform: translate(-55%, calc(-50% - 8px)) scale(1.06) rotate(1deg); }
    35% { opacity: .82; transform: translate(-48%, calc(-50% - 18px)) scale(1) rotate(-1deg); }
    70% { opacity: .48; transform: translate(-42%, calc(-50% - 32px)) scale(.96) rotate(1deg); }
    100% { opacity: 0; transform: translate(-36%, calc(-50% - 46px)) scale(.9) rotate(2deg); }
}

.board-point-gain.is-dna-down .puzzle-result-dna,
.puzzle-result-dna.is-dna-down {
    background: linear-gradient(135deg, #b95745, #934235);
}

@media(min-width:721px) {
    body.is-quick-puzzle #puzzle-desktop-controls > #board-point-gain.desktop-puzzle-result {
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: var(--radius-limit, 14px);
        background: var(--sheet);
        box-shadow: var(--shadow-soft);
    }

    .desktop-puzzle-result > #puzzle-result-metrics {
        gap: 12px;
        align-items: stretch;
        margin: 0;
    }

    .desktop-puzzle-result #puzzle-result-metrics > .puzzle-result-metric {
        flex-direction: column;
        justify-content: flex-start;
        gap: 10px;
        min-width: 0;
        min-height: 84px;
        padding: 12px 6px;
        border: 1px solid #b8cdb2;
        border-radius: 8px;
        background: linear-gradient(135deg, #edf5e9, #dbead7);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 3px 0 #afc3a9, 0 6px 10px rgba(41, 77, 49, .10);
        color: #294d31;
    }

    .desktop-puzzle-result #puzzle-result-metrics > .puzzle-result-dna {
        border-color: #cf5946;
        background: linear-gradient(135deg, #e96f59, #cf5946);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 3px 0 #af4939, 0 6px 10px rgba(155, 67, 49, .15);
        color: #fff8ef;
    }

    .desktop-puzzle-result #puzzle-result-metrics > .puzzle-result-elo.is-rating-down {
        border-color: #dab4a9;
        background: linear-gradient(135deg, #fff0eb, #f5dcd5);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 3px 0 #c7a294, 0 6px 10px rgba(119, 59, 48, .10);
        color: #773b30;
    }

    .desktop-puzzle-result .puzzle-result-metric::before {
        color: inherit;
        font: 700 11px/1.2 var(--sans);
        letter-spacing: 0;
    }

    .desktop-puzzle-result .puzzle-result-dna::before { content: "Chess DNA"; }
    .desktop-puzzle-result .puzzle-result-elo::before { content: "Puzzle Elo"; }

    .desktop-puzzle-result #puzzle-result-metrics > .puzzle-result-metric > strong {
        --dna-value-size: 24px;
        flex-wrap: wrap;
        gap: 6px;
        font-size: 24px;
        line-height: 1.2;
    }

    .desktop-puzzle-result .puzzle-result-dna > .puzzle-result-dna-value .chess-dna-icon {
        width: 28px;
        height: 21px;
    }

    .desktop-puzzle-result .puzzle-result-elo-icon {
        flex-basis: 24px;
        width: 24px;
        height: 24px;
    }

    .desktop-puzzle-result :is(.puzzle-result-dna-change, .puzzle-result-elo-change) {
        margin-left: 0;
        color: #40754c;
        font-size: 11px;
    }

    .desktop-puzzle-result .puzzle-result-dna-change {
        color: #fff2df;
    }

    .desktop-puzzle-result .is-rating-down .puzzle-result-elo-change {
        color: #a43f38;
    }

    .desktop-puzzle-result > #board-tactic-actions {
        gap: 12px;
        margin: 0;
        padding-top: 0;
        border-top: 0;
    }

    .desktop-puzzle-result > #board-tactic-actions .button {
        min-height: 44px;
        border-radius: 8px;
        font-size: 13px;
    }

    .desktop-puzzle-result > #board-tactic-actions .secondary-button {
        border-color: #d9ddd7;
        background: #f7f8f5;
        box-shadow: none;
        color: #465249;
    }

    body.is-quick-puzzle .board-paper > .puzzle-result-metrics {
        width: 100%;
        margin-top: 9px;
    }
}

@media(max-width:720px) {
    #report-dna-mini.mobile-modal-open.is-puzzle-result-modal:not(.is-celebration-modal) {
        animation: none;
    }

    .board-point-gain.compact-puzzle-result {
        width: 100%;
        max-width: none;
        margin: 9px 0 0;
        padding: 9px 11px;
        border: 0;
        background: transparent;
        box-shadow: none;
        animation: none;
    }

    .board-point-gain.compact-puzzle-result > .board-tactic-actions {
        display: none;
    }

    .board-point-gain.compact-puzzle-result > .trophy-progress-deck {
        margin: 10px 0 0;
        padding: 10px;
        border: 1px solid #d7cab6;
        border-radius: min(13px, var(--radius-limit, 14px));
        background: #fffdfa;
    }

    .board-point-gain.compact-puzzle-result > .puzzle-explanation.in-puzzle-result {
        width: 100%;
        margin: 10px 0;
    }

    .board-point-gain.compact-puzzle-result > .puzzle-result-metrics {
        width: 100%;
        margin: 0;
    }

    .puzzle-result-metrics.has-elo {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .report-dna-mini.mobile-modal-open.is-puzzle-result-modal > header,
    .report-dna-mini.mobile-modal-open.is-puzzle-result-modal > .report-dna-share-actions {
        display: none;
    }

    .report-dna-mini.mobile-modal-open.is-puzzle-result-modal > .mobile-point-summary {
        margin-top: 0;
    }

    .report-dna-mini.mobile-modal-open.is-puzzle-result-modal:not(.is-celebration-modal) > .mobile-point-summary {
        margin-top: 38px;
    }
}

.dna-point-change > .chess-dna-icon {
    filter: drop-shadow(0 2px 2px rgba(29, 35, 48, .22));
}

.dna-point-change > .dna-point-sign,
.dna-point-change > span:last-child {
    color: #fff0da;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.dna-point-change > .dna-point-sign {
    flex: 0 0 auto;
    margin-right: -2px;
    font-size: var(--dna-value-size, 24px);
    font-weight: 800;
    line-height: 1;
}

.training-point-gain[data-result-type="deduction"] .dna-point-sign,
.board-feedback-card.incorrect .dna-point-sign {
    color: var(--accent);
}

.report-dna-mini header small,
.report-dna-share,
.board-point-gain .board-point-row.increased .board-point-delta {
    color: var(--accent-ink);
}

.board-point-meter b,
.board-point-meter b.loss,
.board-feedback-progress .board-point-meter b.loss,
.report-dna-mini-stat > i .dna-meter-increase,
.report-dna-mini-stat > i .dna-meter-decrease {
    background: var(--accent-soft);
    animation: none;
}

.board-point-meter b,
.board-point-meter b.loss,
.board-feedback-progress .board-point-meter b.loss {
    clip-path: inset(0 calc(100% - var(--point-segment-end, 100%)) 0 var(--point-segment-start, 0%) round 0 999px 999px 0);
}

.board-point-meter b::after,
.board-point-meter b.loss::after {
    content: none;
    animation: none;
}

.board-feedback-overlay {
    border-color: #dca39e;
    border-radius: var(--radius-limit, 14px);
    background: rgba(255, 240, 238, .98);
    box-shadow: 0 18px 45px rgba(52, 43, 36, .13);
    color: #b7453e;
}

.board-feedback-card,
.board-feedback-card.incorrect {
    border-color: #e6bbb6;
    border-radius: var(--radius-limit, 14px);
    background: linear-gradient(145deg, rgba(216, 86, 79, .09), transparent 58%), #fff7f5;
    color: var(--ink);
}

.board-feedback-card > header {
    grid-template-columns: minmax(0, 1fr) auto auto;
}

.board-feedback-card > header.no-deduction {
    grid-template-columns: minmax(0, 1fr) auto;
}

.mobile-reveal-results {
    display: none;
}

.puzzle-try-again-fox-row {
    display: flex;
    justify-content: center;
    margin: 7px 0 -5px;
}

.puzzle-try-again-fox {
    display: block;
    width: 140px;
    height: 140px;
    object-fit: contain;
}

@media(max-width:720px) {
    .mobile-reveal-results:not([hidden]) {
        display: grid;
        gap: 10px;
        margin: 12px 0 calc(62px + env(safe-area-inset-bottom));
    }

    .mobile-reveal-results > .puzzle-explanation {
        width: 100%;
        margin: 0;
        padding: 12px;
        border-radius: min(13px, var(--radius-limit, 14px));
        box-shadow: none;
    }

    .board-feedback-card > header {
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: 6px;
    }

    .board-feedback-card > header.no-deduction {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .puzzle-try-again-fox {
        width: 120px;
        height: 120px;
    }
}

.board-feedback-card > header > span,
.board-feedback-card .board-feedback-total {
    background: var(--red);
    color: #fffdfa;
}

.board-feedback-card > header > .board-feedback-total-wrap {
    background: #fff0ee;
    color: var(--red);
    box-shadow: inset 0 0 0 1px #dfaba5;
}

.board-feedback-card .board-feedback-total-wrap .board-feedback-total {
    display: inline;
    min-width: 0;
    height: auto;
    padding: 0;
    background: transparent;
    color: var(--red);
}

.share-dna-value {
    --dna-value-size: 17px;
    color: var(--accent-ink);
}

.share-preview-level .share-dna-value > strong {
    color: var(--accent-ink);
    font-weight: 800;
}

.board-feedback-close {
    border-color: #dfaba5;
    background: #fff0ee;
    color: var(--red);
}

.board-feedback-boxes > div {
    border-color: #edd2cf;
    background: #fff0ee;
}

.lesson-jump {
    border-color: var(--line);
    border-radius: var(--radius-limit, 14px);
    background: rgba(255, 253, 250, .94);
    backdrop-filter: blur(14px);
}

.lesson-jump button.active {
    border-color: #dfa395;
    background: linear-gradient(180deg, #fff0eb, #fff0eb);
    box-shadow: inset 0 1px rgba(255, 255, 255, .06), 0 3px 0 #fffdfa, 0 8px 15px rgba(52, 43, 36, .077);
    color: var(--ink);
    text-shadow: none;
}

.lesson-jump button.done:not(.active),
.lesson-jump button.next-ready {
    background: #fff0eb;
    color: var(--accent-ink);
}

.moment-card,
.moment-card:nth-child(n) {
    border-color: #d7d0c8;
    border-radius: var(--radius-limit, 14px);
    background: linear-gradient(145deg, rgba(49, 100, 244, .065), transparent 52%), #fffdfa;
    color: var(--ink);
}

.moment-number i,
.move-chip {
    border-color: var(--line-hi);
    background: #fffdfa;
    color: var(--ink);
}

.reason-summary,
.moment-card > p,
.lesson-reveal .explanation {
    color: #68615c !important;
}

.puzzle-feedback.correct {
    background: #eefaf6;
    color: var(--cyan) !important;
}

.puzzle-feedback.incorrect {
    background: var(--red-soft);
    color: #b7453e !important;
}

@media(max-width:360px) {
    .board-feedback-card > header {
        grid-template-columns: minmax(0, 1fr) auto auto;
    }

    .board-feedback-card > header.no-deduction {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .board-feedback-card > header > div {
        min-width: 0;
    }

    .board-feedback-card > header strong {
        font-size: 15px;
    }

    .puzzle-try-again-fox {
        width: 96px;
        height: 96px;
    }
}

.board-feedback-card:has(> header.no-deduction) {
    padding: 18px;
}

.board-feedback-card:has(> header.no-deduction) > header {
    gap: 12px;
}

.board-feedback-card:has(> header.no-deduction) > header small {
    font-size: 10px;
    line-height: 1.2;
}

.board-feedback-card:has(> header.no-deduction) > header strong {
    margin-top: 4px;
    font-size: 22px;
    line-height: 1.08;
}

.board-feedback-card:has(> header.no-deduction) > header .board-feedback-close {
    width: 44px;
    height: 44px;
    font-size: 26px;
}

.board-feedback-card:has(> header.no-deduction) > p {
    margin: 14px 0 2px;
    color: var(--ink);
    font-size: 16px;
    line-height: 1.4;
}

@media(max-width:720px) {
    .board-feedback-card:has(> header.no-deduction) {
        padding: 16px;
    }

    .board-feedback-card:has(> header.no-deduction) > header .board-feedback-close {
        width: 48px;
        height: 48px;
    }
}

.puzzle-feedback.answer,
.puzzle-feedback.hint {
    background: #fff7dd;
    color: #8a6b18 !important;
}

.puzzle-explanation {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    align-items: end;
    gap: 0;
    margin: 3px 0 13px;
    padding: 8px 7px 16px 0;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--ink);
}

.puzzle-explanation[hidden] {
    display: none;
}

.puzzle-explanation-avatar {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: end center;
    width: 96px;
    min-height: 88px;
    transform: translate(6px, 7px);
}

.puzzle-explanation-fox {
    display: block;
    width: 94px;
    height: 94px;
    object-fit: contain;
    filter: drop-shadow(0 8px 8px rgba(91, 50, 35, .2));
}

.puzzle-explanation-lock {
    display: block;
    width: 72px;
    height: 72px;
    object-fit: contain;
    filter: drop-shadow(0 7px 7px rgba(173, 75, 20, .2));
}

.puzzle-explanation-lock[hidden] {
    display: none;
}

.puzzle-explanation-bubble {
    position: relative;
    z-index: 1;
    min-width: 0;
    min-height: 88px;
    margin-left: -5px;
    padding: 15px 18px 16px 22px;
    border: 1px solid #d9c4b5;
    border-radius: var(--radius-limit, 14px) var(--radius-limit, 14px) var(--radius-limit, 14px) min(12px, var(--radius-limit, 14px));
    background:
        radial-gradient(circle at 90% 5%, rgba(255, 226, 212, .48), transparent 37%),
        linear-gradient(155deg, #fffefd 0%, #fff8f3 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .98),
        inset 0 -2px 5px rgba(153, 91, 61, .07),
        0 5px 0 #cfa58d,
        0 12px 23px rgba(68, 43, 32, .17);
}

.puzzle-explanation-bubble::before {
    position: absolute;
    z-index: -1;
    left: -8px;
    bottom: 18px;
    width: 23px;
    height: 20px;
    border: 1px solid #d9c4b5;
    border-width: 0 0 1px 1px;
    border-radius: 2px 2px 2px 6px;
    background: #fff9f5;
    box-shadow: -3px 3px 0 #cfa58d;
    content: "";
    transform: skew(-24deg) rotate(-7deg);
}

.puzzle-explanation-body {
    min-width: 0;
}

.puzzle-explanation-body > h3 {
    margin: 0 0 5px;
    color: #492d24;
    font: 800 18px/1.12 var(--serif);
    letter-spacing: -.015em;
}

.puzzle-explanation-body > h3[hidden] {
    display: none;
}

.puzzle-explanation-body > p {
    margin: 0;
    color: #67554d;
    font-size: 13.5px;
    line-height: 1.42;
}

.puzzle-explanation-body > p.is-streaming::after {
    display: inline-block;
    width: 2px;
    height: 1em;
    margin-left: 3px;
    border-radius: 2px;
    background: var(--accent-deep);
    content: "";
    vertical-align: -.12em;
    animation: puzzle-chat-caret .68s steps(1, end) infinite;
}

.puzzle-explanation-locked {
    position: relative;
    min-height: 104px;
    overflow: hidden;
    border: 1px solid rgba(176, 115, 86, .2);
    border-radius: var(--radius-limit, 14px);
    background: rgba(255, 253, 250, .72);
}

.puzzle-explanation-locked[hidden] {
    display: none;
}

.puzzle-explanation-locked > p {
    margin: 0;
    padding: 13px;
    color: #75645d;
    font-size: 12px;
    line-height: 1.5;
    filter: blur(3.5px);
    opacity: .58;
    user-select: none;
}

.puzzle-explanation-lock-message {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 10px;
    background: radial-gradient(circle at 50% 50%, rgba(255, 250, 247, .97) 0 38%, rgba(255, 250, 247, .79) 72%, rgba(255, 250, 247, .42));
    color: var(--ink);
    text-align: center;
}

.puzzle-explanation-lock-message strong {
    font: 800 15px/1.1 var(--serif);
}

.puzzle-explanation-lock-message span {
    color: #6f5b23;
    font-size: 10px;
}

.puzzle-explanation-lock-message button {
    margin-top: 4px;
    padding: 7px 11px;
    border: 1px solid #cf674e;
    border-radius: 9px;
    background: linear-gradient(180deg, #fffdf8, #ffd9c5);
    box-shadow: 0 3px 0 #bd5b49;
    color: #9c3927;
    font: 850 10px/1 var(--sans);
    cursor: pointer;
}

.puzzle-explanation-lock-message button:hover,
.puzzle-explanation-lock-message button:focus-visible {
    background: #fff;
    outline: 3px solid rgba(234, 118, 95, .24);
    outline-offset: 2px;
}

.puzzle-explanation-loading {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 54px;
    color: #5f5954;
    font-size: 12px;
}

.puzzle-explanation-loading[hidden] {
    display: none;
}

.puzzle-explanation-loading > span {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    min-width: 31px;
}

.puzzle-explanation-loading i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-deep);
    animation: puzzle-chat-dot .9s ease-in-out infinite;
}

.puzzle-explanation-loading i:nth-child(2) {
    animation-delay: .12s;
}

.puzzle-explanation-loading i:nth-child(3) {
    animation-delay: .24s;
}

.puzzle-explanation-retry {
    justify-self: end;
    padding: 7px 10px;
    border: 1px solid #d9a295;
    border-radius: 9px;
    background: #fff0eb;
    color: var(--accent-ink);
    font: 750 11px/1 var(--sans);
    cursor: pointer;
}

@keyframes puzzle-chat-dot {
    0%, 60%, 100% { opacity: .32; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-4px); }
}

@keyframes puzzle-chat-caret {
    50% { opacity: 0; }
}

@media (max-width: 720px) {
    .puzzle-explanation {
        grid-template-columns: 68px minmax(0, 1fr);
        padding: 6px 5px 13px 0;
    }

    .puzzle-explanation-avatar {
        width: 74px;
        min-height: 68px;
        transform: translate(4px, 6px);
    }

    .puzzle-explanation-fox {
        width: 72px;
        height: 72px;
    }

    .puzzle-explanation-lock {
        width: 60px;
        height: 60px;
    }

    .puzzle-explanation-bubble {
        min-height: 73px;
        padding: 13px 14px 14px 18px;
        border-radius: var(--radius-limit, 14px) var(--radius-limit, 14px) var(--radius-limit, 14px) 10px;
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, .98),
            inset 0 -2px 4px rgba(153, 91, 61, .06),
            0 4px 0 #cfa58d,
            0 9px 17px rgba(68, 43, 32, .16);
    }

    .puzzle-explanation-body > h3 {
        margin-bottom: 4px;
        font-size: 15px;
    }

    .puzzle-explanation-body > p {
        font-size: 12px;
        line-height: 1.4;
    }

    .board-paper > .puzzle-explanation:not(.in-mobile-modal) {
        margin: 11px 0 calc(62px + env(safe-area-inset-bottom));
    }

    .report-dna-mini.mobile-modal-open > .puzzle-explanation {
        margin: 0 0 11px;
        box-shadow: none;
    }

    .report-dna-mini.mobile-modal-open > .puzzle-explanation .puzzle-explanation-body > p {
        font-size: 12px;
        line-height: 1.45;
    }
}

@media (max-width: 360px) {
    .puzzle-explanation {
        grid-template-columns: 58px minmax(0, 1fr);
    }

    .puzzle-explanation-avatar {
        width: 63px;
        min-height: 58px;
    }

    .puzzle-explanation-fox {
        width: 61px;
        height: 61px;
    }

    .puzzle-explanation-lock {
        width: 52px;
        height: 52px;
    }

    .puzzle-explanation-bubble {
        padding: 12px 11px 13px 15px;
    }

    .puzzle-explanation-body > h3 {
        font-size: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .puzzle-explanation-loading i,
    .puzzle-explanation-body > p.is-streaming::after {
        animation: none;
    }
}

.is-coach-report .report-hero {
    max-width: none;
    text-align: center;
}

.is-coach-report .report-hero #report-matchup {
    justify-content: center;
}

.board-arrow-layer .coach-better-arrow {
    stroke: #078b74;
    stroke-width: 1.8;
    stroke-dasharray: 4 2;
}

.is-coach-report .board-legend {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 10px 0 0;
    color: var(--ink);
}

.is-coach-report .board-legend[hidden] {
    display: none;
}

.is-coach-report .board-legend span {
    justify-content: center;
    min-height: 44px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-raised);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
}

.is-coach-report .board-legend i {
    width: 34px;
    height: 3px;
    flex: none;
    border-radius: 0;
}

.is-coach-report .legend-played {
    background: repeating-linear-gradient(90deg, var(--red) 0 6px, transparent 6px 10px);
}

.is-coach-report .legend-better {
    background: repeating-linear-gradient(90deg, #078b74 0 6px, transparent 6px 10px);
}

@media (max-width: 340px) {
    .is-coach-report .board-legend {
        grid-template-columns: 1fr;
    }
}

.better-move,
.lesson-reveal,
.explore-game {
    border-color: var(--line);
}

.better-move strong,
.better-icon {
    color: var(--accent-ink);
}

.better-icon {
    background: #fff0eb;
}

.lesson-note {
    border-color: #ddca82;
    border-radius: min(12px, var(--radius-limit, 14px));
    background: #fff7dd;
    color: #715a19;
    transform: none;
}

.board-controls button {
    border-color: var(--line-hi);
    background: #fffaf5;
    color: var(--ink);
}

.board-controls button:hover {
    background: #fff0eb;
}

.workout-panel {
    border-color: #c4bbb2;
    border-radius: var(--radius-limit, 14px);
    background: linear-gradient(145deg, rgba(234, 118, 95, .08), transparent 48%), #fffaf5;
}

.workout-step,
.workout-step.lesson-step,
.workout-step.final-step {
    border-color: var(--line);
    border-radius: var(--radius-limit, 14px);
    background: #fffdfa;
    color: var(--ink);
}

.workout-step.lesson-step {
    background: linear-gradient(145deg, rgba(255, 211, 100, .09), transparent), #fffbeb;
}

.workout-step.final-step {
    background: linear-gradient(145deg, rgba(49, 100, 244, .15), transparent), #f6f4ff;
}

/* Dialogs and overlays */
dialog,
.account-dialog,
.share-dialog,
.training-summary-dialog,
.training-break-dialog,
.puzzle-workout-summary {
    color-scheme: light;
}

.account-dialog,
.share-dialog,
.training-summary-dialog,
.training-break-dialog,
.puzzle-workout-summary {
    border: 1px solid var(--line);
    border-radius: var(--radius-limit, 14px);
    background: var(--surface);
    box-shadow: 0 34px 100px rgba(52, 43, 36, .18);
    color: var(--ink);
}

.account-dialog::backdrop,
.share-dialog::backdrop,
.training-summary-dialog::backdrop,
.training-break-dialog::backdrop,
.puzzle-workout-summary::backdrop {
    background: rgba(34, 33, 31, .44);
    backdrop-filter: blur(10px) saturate(.78);
}

dialog[open] {
    animation: reframe-dialog-in .2s cubic-bezier(.22, 1, .36, 1);
}

@keyframes reframe-dialog-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

/* Source-aware modal motion: expands from the control that opened it. */
dialog[data-modal-motion="ready"][open].modal-motion-opening {
    transform-origin: center;
    animation: modal-source-open .42s cubic-bezier(.18, .9, .22, 1.12);
}

dialog[data-modal-motion="ready"][open].modal-motion-closing {
    pointer-events: none;
    transform-origin: center;
    animation: modal-source-close .19s cubic-bezier(.4, 0, 1, 1) forwards;
}

dialog[data-modal-motion="ready"][open].modal-motion-opening::backdrop {
    animation: modal-backdrop-in .28s ease-out;
}

dialog[data-modal-motion="ready"][open].modal-motion-closing::backdrop {
    animation: modal-backdrop-out .19s ease-in forwards;
}

@keyframes modal-source-open {
    0% {
        opacity: 0;
        transform: translate3d(var(--modal-source-x, 0), var(--modal-source-y, 30vh), 0) scale(.22);
    }
    68% {
        opacity: 1;
        transform: translate3d(0, -2px, 0) scale(1.025);
    }
    100% { opacity: 1; transform: none; }
}

@keyframes modal-source-close {
    0% { opacity: 1; transform: none; }
    100% {
        opacity: 0;
        transform: translate3d(var(--modal-source-x, 0), var(--modal-source-y, 30vh), 0) scale(.22);
    }
}

@keyframes modal-backdrop-in {
    from { background-color: transparent; backdrop-filter: blur(0) saturate(1); }
}

@keyframes modal-backdrop-out {
    to { background-color: transparent; backdrop-filter: blur(0) saturate(1); }
}

/* The mobile solved-puzzle card is a custom dialog, so keep its centered base transform. */
#report-dna-mini.mobile-modal-open.is-celebration-modal {
    animation: none;
}

#report-dna-mini.mobile-modal-open.is-celebration-modal.modal-motion-surface-opening {
    transform-origin: center;
    animation: mobile-source-modal-open .42s cubic-bezier(.18, .9, .22, 1.12);
}

#report-dna-mini.mobile-modal-open.is-celebration-modal.modal-motion-surface-closing {
    pointer-events: none;
    transform-origin: center;
    animation: mobile-source-modal-close .19s cubic-bezier(.4, 0, 1, 1) forwards;
}

.mobile-dna-backdrop.modal-motion-backdrop-opening {
    animation: modal-backdrop-in .28s ease-out;
}

.mobile-dna-backdrop.modal-motion-backdrop-closing {
    pointer-events: none;
    animation: modal-backdrop-out .19s ease-in forwards;
}

@keyframes mobile-source-modal-open {
    0% {
        opacity: 0;
        transform: translate3d(var(--modal-source-x, 0), calc(-50% + var(--modal-source-y, 30vh)), 0) scale(.22);
    }
    68% {
        opacity: 1;
        transform: translate3d(0, calc(-50% - 2px), 0) scale(1.025);
    }
    100% { opacity: 1; transform: translateY(-50%); }
}

@keyframes mobile-source-modal-close {
    0% { opacity: 1; transform: translateY(-50%); }
    100% {
        opacity: 0;
        transform: translate3d(var(--modal-source-x, 0), calc(-50% + var(--modal-source-y, 30vh)), 0) scale(.22);
    }
}

.account-dialog-head,
.share-dialog-head {
    border-color: var(--line);
}

.account-dialog-head h2,
.share-dialog-head h2,
.training-summary-dialog h2,
.puzzle-workout-summary h2 {
    color: var(--ink);
    font-family: var(--display);
    font-weight: 850;
}

.account-close,
.share-dialog-close,
.report-dna-close {
    width: 40px;
    height: 40px;
    border-color: var(--line);
    border-radius: 999px;
    background: var(--paper-strong);
    color: var(--ink-soft);
}

.account-close:hover,
.share-dialog-close:hover,
.report-dna-close:hover {
    border-color: var(--accent-soft);
    background: var(--accent-pale);
    color: var(--accent-ink);
}

.account-tabs {
    gap: 5px;
    padding: 6px;
    border-color: var(--line);
    border-radius: 999px;
    background: var(--paper-strong);
}

.account-tabs button,
.training-account-dialog .account-tabs button {
    min-height: 43px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
}

.account-tabs button.active,
.training-account-dialog .account-tabs button.active {
    border-color: var(--accent);
    background: var(--accent);
    box-shadow: 0 6px 16px rgba(207, 89, 68, .14);
    color: var(--ink);
}

.account-form > p,
.account-form label small,
.account-signed-in p,
.share-privacy,
.account-page-copy {
    color: var(--muted);
}

.account-signed-in .account-check {
    background: #eefaf6;
    color: var(--cyan);
}

.share-card-preview,
.rhythm-share-preview {
    border-color: var(--line);
    border-radius: var(--radius-limit, 14px);
    background: linear-gradient(145deg, rgba(234, 118, 95, .07), transparent 58%), var(--paper-strong);
    box-shadow: none;
}

.share-preview-head h3,
.rhythm-share-preview-head h3,
.share-preview-level b {
    color: var(--ink);
}

.share-preview-head > div:first-child small,
.rhythm-share-preview-head small,
.share-card-preview footer,
.rhythm-share-preview footer,
.share-account-button {
    color: var(--accent-ink);
}

.share-evidence,
.rhythm-share-summary {
    border-color: var(--line);
}

.rhythm-share-summary span {
    border-color: var(--line);
    background: #fffdfa;
}

.report-dna-mini,
.report-dna-mini.mobile-modal-open,
.training-result-dna.mobile-modal-open {
    border-color: var(--line);
    border-radius: var(--radius-limit, 14px);
    background: linear-gradient(145deg, rgba(234, 118, 95, .08), transparent 48%), #fffdfa;
    color: var(--ink);
}

.mobile-dna-backdrop {
    background: rgba(34, 33, 31, .44);
    backdrop-filter: blur(7px);
}


.lesson-loader {
    background: rgba(34, 33, 31, .48);
    backdrop-filter: blur(12px);
}

.lesson-loader-card {
    border-color: #cec5bc;
    background: linear-gradient(150deg, #fffdfa, #f8f3ed);
}

.loader-board {
    border-color: #ddd6cf;
    border-radius: var(--radius-limit, 14px);
    background: repeating-conic-gradient(#667b8d 0 25%, #f0e4d2 0 50%) 0 / 34px 34px;
    color: var(--ink);
    box-shadow: 0 9px 22px rgba(52, 43, 36, .093);
}

.toast {
    right: 18px;
    bottom: 18px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-limit, 14px);
    background: rgba(255, 253, 250, .96);
    color: var(--ink);
    box-shadow: 0 16px 42px rgba(52, 43, 36, .13);
    backdrop-filter: blur(12px);
}

/* Puzzle workout controls */
.puzzle-workout-setup {
    border-color: #d4ccc4;
    background: linear-gradient(145deg, rgba(49, 100, 244, .08), transparent 58%), var(--surface);
}

.puzzle-workout-start.is-loading,
.puzzle-workout-resume.is-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: wait;
}

.puzzle-workout-loading-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: navigation-loader-spin .8s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
    .puzzle-workout-loading-icon {
        animation-duration: 1.6s;
    }
}

.puzzle-workout-bar,
.training-session-bar {
    border-color: #d4ccc4;
    border-radius: var(--radius-limit, 14px);
    background: rgba(255, 253, 250, .94);
    box-shadow: inset 0 1px rgba(255, 255, 255, .035), 0 10px 28px rgba(52, 43, 36, .074);
}

.puzzle-workout-bar > div:first-child span,
.training-session-bar > div:first-child span,
.puzzle-workout-actions button,
.training-session-actions a {
    color: var(--accent-ink);
}

.puzzle-workout-paused {
    border-color: #cec5bc;
    border-radius: var(--radius-limit, 14px);
    background: linear-gradient(150deg, #fffdfa, #f8f3ed);
    color: var(--ink);
}

.puzzle-workout-paused::before {
    background: rgba(34, 33, 31, .44);
}

.puzzle-workout-summary-stats div,
.training-summary-stats div {
    border-color: var(--line);
    border-radius: min(12px, var(--radius-limit, 14px));
    background: #f8f3ed;
}

.puzzle-workout-summary-stats strong,
.training-summary-stats strong {
    color: var(--accent-ink);
}

.training-summary-stats .training-summary-dna-value {
    --dna-value-size: 29px;
    display: inline-flex;
}

/* Legacy /dna training workspace */
.training-hero {
    max-width: 1120px;
}

.training-hero-copy h1 {
    color: var(--ink);
    font-family: var(--display);
    font-weight: 860;
}

.training-hero-copy h1 em {
    color: var(--accent-ink);
    font-style: normal;
}

.training-launch-card {
    border-color: #cec5bc;
    background: linear-gradient(145deg, rgba(234, 118, 95, .09), transparent 58%), var(--surface);
}

.duration-options button {
    border-color: #d7d0c8;
    border-radius: min(11px, var(--radius-limit, 14px));
    background: #f8f3ed;
    color: var(--ink);
}

.duration-options button.active,
.duration-options button:focus-visible {
    border-color: #d98b7c;
    background: #fff0eb;
    box-shadow: inset 0 0 0 1px rgba(234, 118, 95, .2);
    color: var(--accent-ink);
}

.training-mode-grid button,
.training-mode-grid a {
    border-color: #d9d2cb;
    border-radius: var(--radius-limit, 14px);
    background: #fffdfa;
    color: var(--ink);
}

.training-mode-grid button:hover,
.training-mode-grid button:focus-visible,
.training-mode-grid a:hover,
.training-mode-grid a:focus-visible {
    border-color: #dfa395;
    background: #fff0eb;
}

.training-mode-grid i,
.training-mode-grid > :nth-child(n) i {
    background: #fff0eb;
    color: var(--accent-ink);
}

.training-board-panel {
    border-color: #d7d0c8;
    border-radius: var(--radius-limit, 14px);
    background: #f8f3ed;
}

.training-side-to-move {
    border-color: #cec5bc;
    background: #fffdfa;
    color: var(--ink);
}

.training-decision-panel {
    border-color: #d7d0c8;
}

.training-choice-list button {
    border-color: #d7d0c8;
    border-radius: min(11px, var(--radius-limit, 14px));
    background: #f8f3ed;
    color: var(--ink);
}

.training-choice-list button.active {
    border-color: #ddca82;
    background: #fff7dd;
}

.training-choice-list button.is-correct {
    border-color: rgba(7, 139, 116, .4);
    background: #eefaf6;
    color: var(--cyan);
}

.training-choice-list button.is-wrong {
    border-color: #dfaba5;
    background: var(--red-soft);
}

.selected-move,
.candidate-list {
    border-color: #cec5bc;
    border-radius: min(11px, var(--radius-limit, 14px));
    background: #fffaf5;
}

.candidate-list b {
    background: #e8e1d9;
}

.training-feedback {
    border-color: var(--line);
}

.training-board-panel > .training-point-gain {
    background: #fffaf5;
}

.training-break-dialog h2 {
    color: var(--ink);
}

/* Legal, account, and footer */
.legal-page {
    max-width: 900px;
}

.legal-page h1,
.account-page-card h1 {
    color: var(--ink);
    font-family: var(--display);
    font-weight: 860;
}

.legal-page .legal-intro,
.legal-page section p,
.deletion-summary ul,
.deletion-form-card > p {
    color: #68615c;
}

.legal-page section {
    border-radius: var(--radius-limit, 14px);
}

.deletion-form-card {
    border-color: #dca39e !important;
    background: linear-gradient(145deg, rgba(216, 86, 79, .075), transparent 58%), #fff7f5 !important;
}

.deletion-button {
    --button-edge: #a83934;
    --button-shadow: rgba(168, 57, 52, .2);
    border-color: #b7453e;
    border-radius: min(12px, var(--radius-limit, 14px));
    background: linear-gradient(180deg, #e36b63, #c9453f);
    box-shadow: inset 0 1px rgba(255, 255, 255, .35), 0 4px 0 #a83934;
    color: #fffdfa;
    font-weight: 850;
}

.deletion-button:hover,
.deletion-button:focus-visible {
    background: linear-gradient(180deg, #b7453e, #b7453e);
}

.site-footer,
.comparison-footer {
    width: min(1120px, calc(100% - 32px));
    max-width: none;
    border-color: var(--line);
    color: var(--muted);
}

.site-footer .wordmark,
.comparison-footer .wordmark {
    color: var(--ink);
}

.maker-credit {
    border-color: #dfa395;
    background: rgba(255, 253, 250, .96);
    box-shadow: 0 12px 30px rgba(52, 43, 36, .093);
    color: var(--ink);
    backdrop-filter: blur(12px);
}

.maker-credit-copy small,
.maker-credit-arrow {
    color: var(--accent-ink);
}

/* Comparisons */
.comparison-index-hero h1,
.comparison-article-hero h1,
.comparison-method h2,
.comparison-directory h2,
.comparison-article h2,
.comparison-related h2,
.comparison-card h3,
.comparison-choice h3 {
    color: var(--ink);
    font-family: var(--display);
    font-weight: 840;
}

.comparison-breadcrumbs a,
.comparison-card-names,
.comparison-read,
.comparison-byline a,
.comparison-pick-grid span,
.comparison-sources li a,
.comparison-related article > span,
.comparison-related article > a,
.comparison-all-link {
    color: var(--accent-ink);
}

.comparison-method,
.comparison-article-hero,
.comparison-related,
.comparison-faq details {
    border-color: var(--line);
}

.comparison-card,
.comparison-choice,
.comparison-related article {
    border-color: #d9d2cb;
    border-radius: var(--radius-limit, 14px);
    background: linear-gradient(145deg, var(--card-accent), transparent 48%), var(--surface);
    box-shadow: inset 0 1px rgba(255, 255, 255, .03), var(--shadow-soft);
}

.comparison-card::before,
.comparison-article-hero::before {
    opacity: .14;
    filter: blur(4px);
}

.comparison-card-names i {
    border-color: var(--line-hi);
    background: #fffdfa;
}

.comparison-card dl div,
.comparison-pick-grid > div,
.comparison-choice-grid > div,
.comparison-choice-grid > div:last-child {
    border-color: var(--line);
    background: #f8f3ed;
}

.comparison-quick-answer {
    border-color: #e2aea3;
    border-radius: var(--radius-limit, 14px);
    background: linear-gradient(135deg, rgba(234, 118, 95, .1), transparent 58%), var(--surface);
}

.comparison-deck,
.comparison-prose p:not(.eyebrow) {
    color: #68615c;
}

.comparison-table-wrap {
    border-color: var(--line);
    border-radius: var(--radius-limit, 14px);
    background: var(--surface);
}

.comparison-table-section th,
.comparison-table-section td {
    border-color: var(--line);
}

.comparison-table-section thead th,
.comparison-table-section tbody th {
    background: #f8f3ed;
    color: var(--ink);
}

.comparison-disclosure,
.comparison-together {
    border-color: #ddca82;
    border-radius: var(--radius-limit, 14px);
    background: linear-gradient(145deg, rgba(255, 211, 100, .08), transparent), #fffbeb;
}

.comparison-disclosure p,
.comparison-together p:last-child {
    color: #6f675f;
}

.comparison-together > div:first-child {
    border-color: #d7c790;
    background: #f5f0e9;
    color: var(--accent-ink);
}

.comparison-sources {
    border-color: var(--line);
    border-radius: var(--radius-limit, 14px);
    background: #f8f3ed;
}

.comparison-sources li a {
    border-color: var(--line-hi);
    background: #fffaf5;
}

.comparison-cta {
    border: 1px solid #d4ccc4;
    border-radius: var(--radius-limit, 14px);
    background: linear-gradient(145deg, rgba(49, 100, 244, .15), transparent 55%), #f6f4ff;
}

.comparison-cta .secondary-button {
    background: #f6f4ff;
    color: var(--ink);
}

/* Compact choices keep their state colors while gaining a shallow, tactile edge. */
:where(
    .carousel-arrow,
    .puzzle-tools-toggle,
    .puzzle-branches button,
    .puzzle-mate-depths button,
    .puzzle-page-controls button,
    .puzzle-workout-durations button,
    .lesson-jump button,
    .board-controls button,
    .duration-options button,
    .training-mode-grid button,
    .training-mode-grid a,
    .training-choice-list button
) {
    --control-edge: #c8bdb2;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .72),
        0 2px 0 var(--control-edge),
        0 6px 11px rgba(52, 43, 36, .08);
    translate: 0 0;
    transition: background-color .12s ease, border-color .12s ease, box-shadow .08s ease, translate .08s ease;
}

:where(
    .carousel-arrow,
    .puzzle-tools-toggle,
    .puzzle-branches button,
    .puzzle-mate-depths button,
    .puzzle-page-controls button,
    .puzzle-workout-durations button,
    .lesson-jump button,
    .board-controls button,
    .duration-options button,
    .training-mode-grid button,
    .training-mode-grid a,
    .training-choice-list button
):active:not(:disabled) {
    box-shadow:
        inset 0 1px 3px rgba(52, 43, 36, .13),
        0 1px 0 var(--control-edge),
        0 3px 6px rgba(52, 43, 36, .07);
    translate: 0 1px;
}

.puzzle-branches button.active,
.puzzle-mate-depths button.active,
.puzzle-page-controls button[aria-current="page"],
.puzzle-workout-durations button.active,
.lesson-jump button.active,
.duration-options button.active,
.training-choice-list button.active {
    --control-edge: #c45742;
}

.training-choice-list button.is-correct {
    --control-edge: #077461;
}

.training-choice-list button.is-wrong {
    --control-edge: #a93f38;
}

/* Responsive */
@media (max-width: 900px) {
    .site-header {
        top: 7px;
        width: calc(100% - 16px);
        margin-top: 7px;
    }

    .site-header nav a,
    .site-header nav button {
        padding-inline: 10px;
        font-size: 12px;
    }

    .hero,
    .directory-hero {
        width: calc(100% - 16px);
        padding-top: 48px;
    }

    .hero::after,
    .directory-hero::after {
        right: -2%;
        font-size: 240px;
    }

    .progress-kpis {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .analysis-layout {
        gap: 16px;
    }
}

@media (max-width: 760px) {
    body.view-puzzles .directory-hero.puzzle-directory-hero {
        padding-inline: 10px;
    }

    body:is(.view-home, .view-puzzles, .view-progress) .site-header nav:not(.open),
    .training-page .site-header nav:not(.open),
    .coach-site .site-header nav:not(.open) {
        display: none;
    }

    body:is(.view-home, .view-puzzles, .view-progress) .site-header nav.open,
    .training-page .site-header nav.open,
    .coach-site .site-header nav.open {
        position: absolute;
        left: 0;
        right: 0;
        top: calc(100% + 8px);
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 5px;
        padding: 8px;
        border: 1px solid #d4ccc4;
        border-radius: var(--radius-limit, 14px);
        background: rgba(255, 253, 250, .98);
        box-shadow: 0 22px 55px rgba(52, 43, 36, .161);
        backdrop-filter: blur(18px);
    }

    body:is(.view-home, .view-puzzles, .view-progress) .site-header nav.open a,
    body:is(.view-home, .view-puzzles, .view-progress) .site-header nav.open button,
    .training-page .site-header nav.open a,
    .training-page .site-header nav.open button,
    .coach-site .site-header nav.open a,
    .coach-site .site-header nav.open button {
        width: 100%;
        min-height: 46px;
        padding-inline: 8px;
        justify-content: center;
    }

    .nav-toggle {
        display: grid;
        place-items: center;
        padding: 7px 11px;
    }

    body.view-puzzles.is-menu-free-practice-tab .site-header nav:not(.open) {
        position: static;
        display: flex;
        padding: 8px 10px;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    body.view-puzzles.is-menu-free-practice-tab .site-header nav:not(.open) > a,
    body.view-puzzles.is-menu-free-practice-tab .nav-toggle {
        display: none;
    }

    .comparison-site .site-header,
    .legal-site .site-header,
    .account-deletion-site .site-header {
        flex-wrap: wrap;
    }

    .comparison-site .site-header nav,
    .legal-site .site-header nav,
    .account-deletion-site .site-header nav {
        position: static;
        display: flex;
        order: 3;
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        overflow: visible;
        scrollbar-width: none;
    }

    .comparison-site .site-header nav::-webkit-scrollbar,
    .legal-site .site-header nav::-webkit-scrollbar,
    .account-deletion-site .site-header nav::-webkit-scrollbar {
        display: none;
    }

    .comparison-site .site-header nav a,
    .legal-site .site-header nav a,
    .account-deletion-site .site-header nav a {
        flex: none;
        min-height: 34px;
        padding-inline: 8px;
    }

    .hero,
    .directory-hero {
        padding: 42px 18px 26px;
    }

    .hero h1,
    .directory-hero h1 {
        font-size: clamp(45px, 14vw, 68px);
    }

    .hero::after,
    .directory-hero::after {
        display: none;
    }

    .analyzer-wrap {
        padding-inline: 10px;
    }

    body.view-puzzles .site-header,
    body.view-puzzles .home-hub-tabs-wrap {
        width: calc(100% - 20px);
    }

    .analyzer-card {
        padding-inline: 16px;
    }

    .input-tabs,
    .puzzle-mode-tabs {
        margin-inline: -16px;
    }

    .progress-page {
        padding-inline: 10px;
    }

    .progress-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .comparison-index-hero,
    .comparison-article,
    .comparison-related,
    .comparison-method,
    .comparison-directory,
    .comparison-disclosure,
    .comparison-not-found {
        width: calc(100% - 20px);
    }

    .site-footer,
    .comparison-footer {
        width: calc(100% - 20px);
    }
}

@media (max-width: 620px) {
    :root { --radius-card: var(--radius-card-mobile); }
    dialog[open] {
        animation-name: reframe-dialog-mobile-in;
    }

    .site-header {
        position: relative;
        top: auto;
        min-height: 58px;
        padding: 7px;
        border-radius: var(--radius-header-mobile);
    }

    .brand-mark {
        width: auto;
        height: 45px;
        border-radius: 0;
    }

    .wordmark {
        gap: 8px;
        font-size: 20px;
    }

    .home-hub-tabs-wrap {
        position: fixed;
        z-index: 230;
        right: max(8px, env(safe-area-inset-right));
        bottom: max(8px, env(safe-area-inset-bottom));
        left: max(8px, env(safe-area-inset-left));
        width: auto;
        margin: 0;
        padding: 0;
    }

    .home-hub-tabs {
        gap: 2px;
        padding: 5px;
        overflow: visible;
        border-color: rgba(207, 197, 188, .94);
        border-radius: var(--radius-limit, 14px);
        background: rgba(255, 253, 250, .96);
        box-shadow: 0 16px 42px rgba(52, 43, 36, .22), inset 0 1px rgba(255, 255, 255, .92);
        backdrop-filter: blur(18px) saturate(1.25);
    }

    .home-hub-tabs a {
        min-height: 60px;
        margin: 0;
        padding: 5px 1px 4px;
        grid-template-columns: 1fr;
        grid-template-rows: 32px auto;
        row-gap: 2px;
        align-items: center;
        justify-items: center;
        border-color: transparent;
        border-radius: var(--radius-card-mobile);
        background: transparent;
        box-shadow: none;
        translate: 0 0;
    }

    .home-hub-tab-icon {
        width: 32px;
        height: 32px;
    }

    .home-hub-tabs a > span {
        font-size: 9px;
        line-height: 1;
    }

    .home-hub-tabs a:hover,
    .home-hub-tabs a:focus-visible {
        border-color: #d9cec5;
        background: #fffaf5;
        box-shadow: none;
        translate: 0 0;
    }

    .home-hub-tabs a.active {
        border-color: #b94d39;
        background: var(--accent);
        box-shadow: inset 0 1px rgba(255, 255, 255, .62), 0 4px 0 #b94d39, 0 9px 16px rgba(185, 77, 57, .24);
        translate: 0 -6px;
    }

    .home-hub-tabs a.active:hover,
    .home-hub-tabs a.active:focus-visible {
        box-shadow: inset 0 1px rgba(255, 255, 255, .68), 0 4px 0 #b94d39, 0 10px 18px rgba(185, 77, 57, .27);
        translate: 0 -7px;
    }

    .home-hub-tabs a:active,
    .home-hub-tabs a.active:active {
        box-shadow: inset 0 2px 3px rgba(52, 43, 36, .14), 0 1px 0 #b94d39, 0 4px 8px rgba(52, 43, 36, .12);
        translate: 0 -2px;
    }

    body:is(.view-puzzles, .view-path, .training-page, .coach-site, .arcade-page, .battle-page, .play-page, .strategy-page) {
        padding-bottom: calc(84px + env(safe-area-inset-bottom));
    }

    body:is(.view-puzzles, .view-path).has-report,
    body.is-quick-puzzle,
    body.is-puzzle-workout-active,
    body.training-page.is-training-active,
    body.arcade-page.is-playing,
    body.battle-page.is-playing,
    body.play-page.is-playing,
    body.strategy-page.is-strategy-active {
        padding-bottom: 0;
    }

    body.is-quick-puzzle.has-puzzle-sticky-actions {
        padding-bottom: calc(96px + env(safe-area-inset-bottom));
    }

    .home-hub-tabs a > small {
        font-size: 7px;
        letter-spacing: .03em;
        line-height: 1.05;
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
    }

    .capability-strip {
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
    }

    .hero > p:last-child,
    .directory-hero > p:last-child {
        font-size: 16px;
    }

    .paper-card,
    .analyzer-card,
    .legal-page section,
    .account-page-card {
        border-radius: var(--radius-card-mobile);
    }

    .game-library {
        gap: 8px;
    }

    .puzzle-card,
    .puzzle-card:nth-child(n),
    .quick-puzzle {
        border-radius: min(13px, var(--radius-limit, 14px));
    }

    .puzzle-branches button {
        min-height: 58px;
    }

    .report-shell {
        padding-inline: 5px;
    }

    .board-paper {
        padding: 7px;
        border-radius: var(--radius-limit, 14px);
    }

    .chessboard {
        border-width: 5px;
        border-radius: 10px;
    }

    .puzzle-board-prompt {
        border-radius: 10px;
    }

    .puzzle-sticky-actions .button {
        border-radius: min(12px, var(--radius-limit, 14px));
    }

    .account-dialog,
    .share-dialog,
    .training-summary-dialog,
    .training-break-dialog,
    .puzzle-workout-summary {
        width: calc(100% - 12px);
        max-width: calc(100% - 12px);
        max-height: calc(100dvh - 20px);
        margin: auto auto max(10px, env(safe-area-inset-bottom));
        border-radius: var(--radius-limit, 14px) var(--radius-limit, 14px) var(--radius-limit, 14px) var(--radius-limit, 14px);
    }

    .account-dialog {
        width: min(440px, calc(100% - 24px));
        max-width: calc(100% - 24px);
    }

    .share-actions,
    .account-tabs {
        gap: 6px;
    }

    .toast {
        left: 10px;
        right: 10px;
        bottom: max(10px, env(safe-area-inset-bottom));
        text-align: center;
    }

    .legal-page {
        margin-top: 32px;
        padding-inline: 12px;
    }

    .progress-share-sticky {
        left: 10px;
        right: 10px;
        bottom: max(10px, env(safe-area-inset-bottom));
        width: auto;
        transform: none;
    }

    .maker-credit {
        right: 10px;
        bottom: max(10px, env(safe-area-inset-bottom));
    }
}

@keyframes reframe-dialog-mobile-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 420px) {
    .wordmark span {
        font-size: inherit;
    }

    body.view-puzzles.is-menu-free-practice-tab .site-header nav:not(.open):empty {
        display: none;
        padding: 0;
    }

    body.view-puzzles .site-header-actions {
        min-width: 0;
    }

    body.view-puzzles .nav-account-button.is-authenticated {
        min-width: 0;
        max-width: 100%;
        gap: 5px;
        padding: 6px 9px 6px 6px;
    }

    body.view-puzzles .nav-account-button.is-authenticated .nav-dna-value {
        --dna-value-size: 18px;
    }

    body.view-puzzles .nav-dna-value > .nav-context-icon {
        width: 24px;
        height: 24px;
        margin-left: 0;
    }

    .site-header-actions {
        gap: 5px;
    }

    .site-header nav .pwa-install-button {
        max-width: none;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .hero,
    .directory-hero {
        padding-inline: 12px;
    }

    .hero h1,
    .directory-hero h1,
    .view-home .hero h1 {
        font-size: clamp(43px, 14.5vw, 58px);
    }

    .analysis-options {
        gap: 9px;
    }

    .progress-kpis article {
        min-height: 108px;
        padding: 14px;
    }

    .puzzle-tools,
    .puzzle-pagination {
        border-radius: min(12px, var(--radius-limit, 14px));
    }

    .share-card-preview,
    .rhythm-share-preview {
        border-radius: min(13px, var(--radius-limit, 14px));
    }
}

@media (max-width: 350px) {
    .nav-account-button.is-authenticated {
        width: auto;
        min-width: 66px;
        padding: 6px 9px 6px 6px;
    }

    .nav-account-button.is-authenticated .nav-account-avatar {
        display: none;
    }

    .nav-account-button.is-authenticated .nav-account-label {
        display: inline;
        font-size: var(--dna-value-size);
    }

    .nav-account-button.is-authenticated .nav-dna-value {
        --dna-value-size: 19px;
    }

    .nav-dna-icon {
        margin-left: 0;
    }
}

/* Private operations workspace: same palette, denser information hierarchy. */
.admin-body {
    background-color: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
}

.admin-login-body {
    background-image:
        linear-gradient(rgba(234, 118, 95, .055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(234, 118, 95, .055) 1px, transparent 1px);
}

.admin-sidebar {
    border-right-color: #171513;
    background: #292521;
}

.admin-nav a:hover,
.admin-nav a:focus-visible {
    background: #403934;
}

.admin-nav a.is-active {
    border-color: var(--accent-deep);
    background: var(--accent);
    box-shadow: inset 3px 0 var(--accent-deep);
    color: var(--ink);
}

.admin-nav a.is-active > strong {
    color: #5d2c24;
}

.admin-search button,
.admin-login-form button,
.admin-report-detail header a,
.admin-puzzle-upload-form button,
.admin-puzzle-import-form button,
.admin-generator-start button,
.admin-notification-compose > button {
    color: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
    dialog[open] {
        animation: none;
    }

    dialog[data-modal-motion="ready"][open].modal-motion-opening,
    dialog[data-modal-motion="ready"][open].modal-motion-closing,
    dialog[data-modal-motion="ready"][open].modal-motion-opening::backdrop,
    dialog[data-modal-motion="ready"][open].modal-motion-closing::backdrop {
        animation: none;
    }

    #report-dna-mini.mobile-modal-open.is-celebration-modal.modal-motion-surface-opening,
    #report-dna-mini.mobile-modal-open.is-celebration-modal.modal-motion-surface-closing,
    .mobile-dna-backdrop.modal-motion-backdrop-opening,
    .mobile-dna-backdrop.modal-motion-backdrop-closing {
        animation: none;
    }

    .puzzle-explanation-loading > span {
        animation: none;
    }

    .button,
    .nav-account-button,
    :where(
        .carousel-arrow,
        .puzzle-tools-toggle,
        .puzzle-branches button,
        .puzzle-mate-depths button,
        .puzzle-page-controls button,
        .puzzle-workout-durations button,
        .lesson-jump button,
        .board-controls button,
        .duration-options button,
        .training-mode-grid button,
        .training-mode-grid a,
        .training-choice-list button
    ) {
        transition: none;
        translate: 0 0;
    }
}

/* Homepage puzzle previews mirror Coach's board-first cards. */
.game-library.quick-library .quick-puzzle {
    min-height: 0;
    padding: 7px;
}

.quick-puzzle-preview-board {
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    pointer-events: none;
}

.quick-puzzle-preview-board .board-square {
    cursor: pointer;
}

.quick-puzzle-preview-board .coord {
    display: none;
}

.quick-puzzle-preview-copy {
    display: grid;
    gap: 5px;
    padding: 9px 4px 4px;
    text-align: center;
}

.game-library.quick-library .quick-puzzle .quick-puzzle-tag {
    overflow: hidden;
    width: 100%;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-library.quick-library .quick-puzzle .game-reward {
    position: absolute;
    z-index: 2;
    top: 11px;
    right: 11px;
    bottom: auto;
    left: auto;
    overflow: visible;
    width: auto;
    max-width: calc(100% - 22px);
    padding: 3px 5px;
    border: 1px solid rgba(82, 73, 65, .12);
    border-radius: 999px;
    background: rgba(255, 253, 250, .7);
    box-shadow: 0 3px 9px rgba(52, 43, 36, .1);
    color: var(--accent-ink);
    font-size: 10px;
    line-height: 1.35;
    text-align: center;
    text-overflow: clip;
    white-space: nowrap;
    backdrop-filter: blur(5px);
}

.game-library.quick-library .quick-puzzle .game-reward .point-award-visual {
    width: auto;
    flex-wrap: nowrap;
    gap: 4px;
}

.game-library.quick-library .quick-puzzle .game-reward .point-domain-icon {
    width: 18px;
    height: 18px;
    flex-basis: 18px;
}

.game-library.quick-library .quick-puzzle.completed .game-reward {
    color: var(--cyan);
}

@media (max-width: 720px) {
    .game-library.quick-library .quick-puzzle {
        min-height: 0;
        padding: 6px;
    }

    .quick-puzzle-preview-copy {
        gap: 4px;
        padding: 8px 2px 3px;
    }

    .game-library.quick-library .quick-puzzle .quick-puzzle-tag,
    .game-library.quick-library .quick-puzzle .game-reward {
        font-size: 9px;
    }

    .game-library.quick-library .quick-puzzle .game-reward {
        top: 9px;
        right: 9px;
        max-width: calc(100% - 18px);
        padding: 3px 4px;
    }

    .game-library.quick-library .quick-puzzle .game-reward .point-domain-icon {
        width: 16px;
        height: 16px;
        flex-basis: 16px;
    }
}

.puzzle-reward-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 11px 0 12px;
    padding: 5px 7px;
}

.puzzle-tools {
    grid-template-columns: minmax(210px, 1fr) 145px 140px 145px auto;
}

.puzzle-reward-filter-label {
    margin-right: 3px;
    color: #5f5954;
    font: 780 9px/1.2 var(--mono);
    letter-spacing: .12em;
    text-transform: uppercase;
}

.puzzle-reward-filter {
    --reward-button-edge: #c5bbb2;
    display: grid;
    place-items: center;
    width: 42px;
    height: 38px;
    padding: 5px;
    border: 1px solid var(--reward-button-edge);
    border-radius: min(12px, var(--radius-limit, 14px));
    background: linear-gradient(180deg, #fff 0, #fff8f1 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 3px 0 var(--reward-button-edge), 0 6px 12px rgba(52, 43, 36, .09);
    cursor: pointer;
    transition: border-color .14s, box-shadow .14s, translate .14s;
}

.puzzle-reward-filter:hover,
.puzzle-reward-filter:focus-visible {
    --reward-button-edge: #d98b7c;
    border-color: var(--reward-button-edge);
    outline: 2px solid rgba(234, 118, 95, .24);
    outline-offset: 2px;
}

.puzzle-reward-filter.active {
    --reward-button-edge: #d45d48;
    background: linear-gradient(180deg, #fff0eb 0, #ffd9d0 100%);
    box-shadow: inset 0 2px 4px rgba(94, 50, 41, .12), 0 1px 0 var(--reward-button-edge);
    translate: 0 2px;
}

.puzzle-reward-filter:disabled {
    cursor: wait;
    opacity: .58;
}

@media (min-width: 721px) and (max-width: 1000px) {
    .puzzle-tools {
        grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(120px, .65fr));
    }

    .puzzle-tools .surprise-button {
        grid-column: 4;
    }
}

.puzzle-reward-filter .point-domain-icon {
    width: 27px;
    height: 27px;
}

@media (max-width: 720px) {
    .puzzle-reward-filters {
        justify-content: center;
        flex-wrap: wrap;
        gap: 7px;
        margin: 10px 0 12px;
        padding-inline: 2px;
    }

    .puzzle-tools {
        grid-template-columns: 1fr 1fr;
    }

    .puzzle-tools label:first-child {
        grid-column: 1 / -1;
    }

    .puzzle-tools .surprise-button {
        grid-column: 2;
    }

    .puzzle-reward-filter-label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .puzzle-reward-filter {
        width: 35px;
        height: 34px;
    }

    .puzzle-reward-filter .point-domain-icon {
        width: 23px;
        height: 23px;
    }
}

@media (max-width: 420px) {
    .puzzle-tools {
        grid-template-columns: 1fr;
    }

    .puzzle-tools label:first-child,
    .puzzle-tools .surprise-button {
        grid-column: 1;
    }
}

/* Point rewards use compact skill emoji instead of repeating skill names. */
.point-award-visual,
.point-award-entry,
.point-domain-label {
    display: inline-flex;
    align-items: center;
}

.point-domain-label {
    gap: 6px;
}

.point-award-visual {
    justify-content: center;
    gap: 5px;
}

.point-award-entry {
    gap: 2px;
    white-space: nowrap;
}

.point-award-join {
    color: var(--muted);
}

.point-award-prefix {
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
}

.point-domain-icon {
    display: block;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    object-fit: contain;
}

.game-reward .point-domain-icon {
    width: 22px;
    height: 22px;
    flex-basis: 22px;
}

.game-reward .point-award-visual {
    display: flex;
    width: 100%;
    max-width: 100%;
    flex-wrap: wrap;
}

.board-point-row .point-domain-label,
.report-dna-mini-stat .point-domain-label {
    min-width: 24px;
}

@media (max-width: 720px) {
    .game-reward .point-award-visual {
        gap: 2px 3px;
    }

    .game-reward .point-domain-icon {
        width: 20px;
        height: 20px;
        flex-basis: 20px;
    }

    .game-reward .point-award-prefix {
        font-size: 20px;
    }
}
@media (max-width: 480px) {
    .home-hub-tabs {
        grid-template-columns: repeat(8, minmax(0, 1fr));
        overflow: visible;
    }

    .home-hub-tabs a > span {
        font-size: 10px;
    }
}

@media (max-width: 360px) {
    .home-hub-tabs-wrap {
        right: max(2px, env(safe-area-inset-right));
        left: max(2px, env(safe-area-inset-left));
    }

    .home-hub-tabs {
        gap: 0;
        padding: 2px;
    }

    .home-hub-tabs a {
        min-width: 0;
        padding-right: 0;
        padding-left: 0;
    }

    .home-hub-tabs a > span {
        font-size: 8px;
    }
}

/* Keep the desktop learning switcher compact without changing the mobile dock. */
@media (min-width: 621px) {
    .home-hub-tabs-wrap.home-hub-tabs-wrap {
        width: min(980px, calc(100% - 40px));
        margin-top: 10px;
    }

    .home-hub-tabs {
        gap: 4px;
        padding: 4px 4px 7px;
        border-radius: var(--radius-limit, 14px);
    }

    .home-hub-tabs a {
        min-height: 0;
        margin-bottom: 3px;
        padding: 6px 10px;
        grid-template-rows: 36px auto;
        row-gap: 2px;
        border-radius: min(13px, var(--radius-limit, 14px));
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, .84),
            0 3px 0 var(--hub-tab-edge),
            0 7px 13px var(--hub-tab-shadow);
    }

    .home-hub-tab-icon {
        width: 36px;
        height: 36px;
    }

    .home-hub-tabs a > span {
        font-size: 13px;
        line-height: 1.1;
    }

    .home-hub-tabs a.active {
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, .58),
            0 3px 0 var(--hub-tab-edge),
            0 7px 13px var(--hub-tab-shadow);
    }

    .home-hub-tabs a:hover,
    .home-hub-tabs a:focus-visible {
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, .88),
            0 4px 0 var(--hub-tab-edge),
            0 9px 16px var(--hub-tab-shadow);
    }

    .home-hub-tabs a:active {
        box-shadow:
            inset 0 1px 3px rgba(52, 43, 36, .14),
            0 1px 0 var(--hub-tab-edge),
            0 3px 6px var(--hub-tab-shadow);
        translate: 0 2px;
    }
}

/* Progress keeps activity, Rhythm, and Chess DNA visually distinct. */
.progress-activity-card{background:linear-gradient(145deg,rgba(117,87,214,.08),transparent 58%),var(--surface)}
.progress-activity-key{border-color:var(--line);background:#f8f3ed}
.progress-activity-chart{background:repeating-linear-gradient(to bottom,transparent 0 43px,rgba(130,123,117,.18) 43px 44px)}
.progress-recent-item{background:#f8f3ed}
.progress-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
.progress-activity-card{margin-bottom:10px}
.progress-dashboard-grid{grid-template-columns:minmax(260px,.75fr) minmax(0,1.65fr)}
.progress-rhythm-card{grid-column:1;grid-row:1}
.progress-domains-card{grid-column:2;grid-row:1}
@media(max-width:760px){.progress-dashboard-grid{grid-template-columns:1fr}.progress-activity-card,.progress-rhythm-card,.progress-domains-card{grid-column:1;grid-row:auto}}

/* Activity overview: a clear summary, multicolor timeline, and compact breakdown. */
.progress-activity-card {
    position: relative;
    overflow: hidden;
    padding: 24px;
    border-color: var(--line);
    background:
        radial-gradient(circle at 96% 4%, rgba(234, 118, 95, .1), transparent 28%),
        linear-gradient(145deg, #fffdfa 0%, #faf6ef 100%);
    box-shadow: var(--shadow);
    color: var(--ink);
}

.progress-activity-card::after {
    position: absolute;
    right: -58px;
    bottom: -88px;
    width: 210px;
    height: 210px;
    border: 1px solid rgba(234, 118, 95, .08);
    border-radius: 50%;
    box-shadow: 0 0 0 26px rgba(234, 118, 95, .035), 0 0 0 52px rgba(234, 118, 95, .02);
    content: "";
    pointer-events: none;
}

.progress-activity-card > * {
    position: relative;
    z-index: 1;
}

.progress-activity-card .eyebrow {
    color: var(--red);
}

.progress-activity-card h2 {
    color: var(--ink);
    font-size: 29px;
}

.progress-activity-card > header {
    align-items: center;
}

.progress-activity-card > header > .progress-activity-period {
    padding: 6px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .72);
    color: var(--muted);
    font: 750 8px/1 var(--mono);
    letter-spacing: .04em;
}

.progress-activity-overview {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    align-items: stretch;
    gap: 23px;
    margin-top: 23px;
}

.progress-activity-total {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    padding: 17px 16px;
    border: 1px solid #efdcd5;
    border-radius: var(--radius-control);
    background: linear-gradient(145deg, #fff3ee, #fffaf6);
}

.progress-activity-total strong,
.progress-activity-total span,
.progress-activity-total small {
    display: block;
}

.progress-activity-total strong {
    color: var(--red);
    font: 800 54px/.82 var(--serif);
    letter-spacing: -.06em;
}

.progress-activity-total span {
    margin-top: 9px;
    color: var(--red);
    font: 800 9px/1 var(--mono);
    letter-spacing: .1em;
    text-transform: uppercase;
}

.progress-activity-total small {
    margin-top: 8px;
    color: var(--muted);
    font-size: 8px;
    white-space: nowrap;
}

.progress-activity-plot {
    min-width: 0;
}

.progress-activity-card .progress-activity-chart {
    height: 132px;
    gap: 4px;
    margin: 0;
    padding: 10px 3px 0;
    border-bottom-color: var(--line);
    background: repeating-linear-gradient(to bottom, transparent 0 39px, rgba(130, 123, 117, .14) 39px 40px);
}

.progress-activity-card .progress-activity-day.today {
    background: linear-gradient(to top, rgba(234, 118, 95, .11), transparent 76%);
}

.progress-activity-card .progress-activity-bar {
    min-height: 3px;
    border-radius: 3px 3px 1px 1px;
    background: #e5dfd6;
}

.progress-activity-card .progress-activity-bar i {
    min-height: 2px;
    border-top: 1px solid rgba(255, 255, 255, .48);
    background: var(--activity-color);
}

.progress-activity-card .progress-activity-axis {
    margin-top: 7px;
    color: var(--muted);
}

.progress-activity-card .progress-activity-legend {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px 13px;
    margin-top: 19px;
    padding-top: 17px;
    border-top: 1px solid var(--line);
}

.progress-activity-card .progress-activity-key {
    gap: 7px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 9px;
}

.progress-activity-card .progress-activity-key i {
    width: 25px;
    height: 25px;
    flex-basis: 25px;
    border: 1px solid color-mix(in srgb, var(--activity-color) 42%, white);
    border-radius: 8px;
    background: color-mix(in srgb, var(--activity-color) 10%, white);
    box-shadow: none;
    color: var(--ink);
    font-size: 12px;
}

.progress-activity-card .progress-activity-key b {
    color: var(--ink);
    font-size: 11px;
}

@media (max-width: 900px) {
    .progress-activity-card .progress-activity-legend {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .progress-activity-card {
        padding: 19px 17px;
    }

    .progress-activity-overview {
        grid-template-columns: 1fr;
        gap: 17px;
        margin-top: 20px;
    }

    .progress-activity-total {
        display: grid;
        grid-template-columns: auto auto minmax(0, 1fr);
        align-items: end;
        justify-content: start;
        gap: 8px;
        padding: 13px 14px;
        border: 1px solid #efdcd5;
    }

    .progress-activity-total strong {
        font-size: 44px;
    }

    .progress-activity-total span {
        margin: 0 0 4px;
    }

    .progress-activity-total small {
        justify-self: end;
        margin: 0 0 3px;
    }

    .progress-activity-card .progress-activity-chart {
        height: 120px;
        gap: 3px;
        padding-inline: 2px;
    }

    .progress-activity-card .progress-activity-legend {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px 15px;
    }
}

@media (max-width: 360px) {
    .progress-activity-card > header > .progress-activity-period {
        padding-inline: 7px;
        font-size: 7px;
    }

    .progress-activity-card .progress-activity-chart {
        gap: 2px;
    }
}

/* Progress board appearance */
.progress-appearance-card {
    display: grid;
    grid-template-columns: minmax(360px, .92fr) minmax(0, 1.08fr);
    gap: 26px;
    margin-bottom: 10px;
    padding: 24px;
    border-color: #d4ccc4;
    background: #fff;
}

.progress-appearance-preview-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    align-items: center;
    gap: 22px;
    min-width: 0;
}

.progress-appearance-heading h2 {
    margin: 4px 0 9px;
    font: 850 clamp(25px, 2.5vw, 35px)/1 var(--display);
    letter-spacing: -.045em;
}

.progress-appearance-heading > p:last-child {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.progress-appearance-preview {
    width: 190px;
    container-type: inline-size;
    pointer-events: none;
}

.progress-appearance-preview .coord {
    display: none;
}

.progress-appearance-controls {
    display: grid;
    align-content: center;
    gap: 16px;
    min-width: 0;
}

.progress-appearance-controls fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.progress-appearance-controls legend {
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.progress-theme-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.progress-piece-theme-options {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.progress-board-theme-options {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.progress-theme-options button {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    min-height: 48px;
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: min(12px, var(--radius-limit, 14px));
    background: #faf8f3;
    text-align: left;
}

.progress-theme-options button:hover,
.progress-theme-options button:focus-visible {
    border-color: var(--accent);
    background: #fff7f1;
    outline: 0;
}

.progress-theme-options button:focus-visible {
    box-shadow: 0 0 0 3px rgba(234, 118, 95, .2);
}

.progress-theme-options button[aria-pressed="true"] {
    border-color: #d36550;
    background: #fff0eb;
    box-shadow: inset 0 0 0 1px #d36550;
}

.progress-theme-options strong {
    min-width: 0;
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
}

.progress-piece-sample,
.progress-board-swatch {
    display: grid;
    width: 32px;
    height: 32px;
    flex: none;
    place-items: center;
    border-radius: 8px;
}

.progress-piece-sample[data-piece-sample="classic"] {
    background: center / 28px 28px no-repeat url('/assets/pieces/classic/bN.svg');
}

.progress-piece-sample[data-piece-sample="chessnut"] { background: #e9e1d4 center / 28px 28px no-repeat url('/assets/pieces/chessnut/bN.svg'); }
.progress-piece-sample[data-piece-sample="rhosgfx"] { background: #e9e1d4 center / 28px 28px no-repeat url('/assets/pieces/rhosgfx/bN.svg'); }
.progress-piece-sample[data-piece-sample="fantasy"] { background: #e9e1d4 center / 28px 28px no-repeat url('/assets/pieces/fantasy/bN.svg'); }
.progress-piece-sample[data-piece-sample="celtic"] { background: #e9e1d4 center / 28px 28px no-repeat url('/assets/pieces/celtic/bN.svg'); }
.progress-piece-sample[data-piece-sample="spatial"] { background: #e9e1d4 center / 28px 28px no-repeat url('/assets/pieces/spatial/bN.svg'); }
.progress-piece-sample[data-piece-sample="merida"] { background: #e9e1d4 center / 28px 28px no-repeat url('/assets/pieces/merida/bN.svg'); }
.progress-piece-sample[data-piece-sample="papercut"] { background: #e9e1d4 center / 28px 28px no-repeat url('/assets/pieces/papercut/bN.svg'); }

.progress-board-swatch {
    border: 1px solid rgba(34, 35, 31, .18);
    background-size: 50% 50%;
}

.progress-board-swatch.is-slate { background: conic-gradient(#f0e4d2 25%, #667b8d 0 50%, #f0e4d2 0 75%, #667b8d 0); }
.progress-board-swatch.is-forest { background: conic-gradient(#e8ecd9 25%, #6e8b68 0 50%, #e8ecd9 0 75%, #6e8b68 0); }
.progress-board-swatch.is-walnut { background: conic-gradient(#ead7bd 25%, #9b6948 0 50%, #ead7bd 0 75%, #9b6948 0); }
.progress-board-swatch.is-plum { background: conic-gradient(#eee5ed 25%, #80647f 0 50%, #eee5ed 0 75%, #80647f 0); }
.progress-board-swatch.is-ocean { background: conic-gradient(#dceaf0 25%, #4d7f96 0 50%, #dceaf0 0 75%, #4d7f96 0); }
.progress-board-swatch.is-rose { background: conic-gradient(#f2dfe1 25%, #b66f79 0 50%, #f2dfe1 0 75%, #b66f79 0); }
.progress-board-swatch.is-sand { background: conic-gradient(#f1e7c9 25%, #b39358 0 50%, #f1e7c9 0 75%, #b39358 0); }
.progress-board-swatch.is-midnight { background: conic-gradient(#ccd2dc 25%, #48546a 0 50%, #ccd2dc 0 75%, #48546a 0); }

.progress-appearance-status {
    min-height: 16px;
    margin: -4px 0 0;
    color: var(--cyan);
    font-size: 9px;
    font-weight: 800;
}

@media (max-width: 900px) {
    .progress-appearance-card {
        grid-template-columns: 1fr;
    }

    .progress-appearance-preview-wrap {
        grid-template-columns: minmax(0, 1fr) 170px;
    }

    .progress-appearance-preview {
        width: 170px;
    }

    .progress-piece-theme-options {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .progress-appearance-card {
        gap: 18px;
        padding: 17px;
    }

    .progress-appearance-preview-wrap {
        grid-template-columns: minmax(0, 1fr) 126px;
        gap: 13px;
    }

    .progress-appearance-preview {
        width: 126px;
        border-width: 5px;
        border-radius: 10px;
    }

    .progress-appearance-heading h2 {
        font-size: 23px;
    }

    .progress-appearance-heading > p:last-child {
        font-size: 9px;
    }

    .progress-board-theme-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .progress-piece-theme-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 360px) {
    .progress-appearance-preview-wrap {
        grid-template-columns: 1fr;
    }

    .progress-appearance-preview {
        width: min(100%, 180px);
        margin: auto;
    }

    .progress-theme-options {
        grid-template-columns: 1fr;
    }

    .progress-board-theme-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .progress-piece-theme-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Final activity layout: graph-first, minimal, and free of decorative icon tiles. */
.progress-activity-card {
    padding: 22px;
    border-color: var(--line);
    background: var(--surface);
    box-shadow: var(--shadow);
    color: var(--ink);
}

.progress-activity-card::after {
    display: none;
}

.progress-activity-card > header {
    align-items: flex-start;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--line);
}

.progress-activity-card h2 {
    font-size: 27px;
}

.progress-activity-card .progress-activity-total {
    display: grid;
    grid-template-columns: auto auto;
    align-items: baseline;
    justify-content: end;
    gap: 0 6px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    text-align: right;
}

.progress-activity-card .progress-activity-total > strong {
    color: var(--ink);
    font: 800 30px/.9 var(--serif);
    letter-spacing: -.04em;
}

.progress-activity-card .progress-activity-total > span {
    margin: 0;
    color: var(--red);
    font: 800 8px/1 var(--mono);
    letter-spacing: .08em;
    text-transform: uppercase;
}

.progress-activity-card .progress-activity-total > small {
    display: flex;
    grid-column: 1 / -1;
    justify-content: flex-end;
    gap: 5px;
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 8px;
    white-space: nowrap;
}

.progress-activity-card .progress-activity-total > small > span {
    margin: 0;
    color: inherit;
    font: inherit;
    letter-spacing: normal;
    text-transform: none;
}

.progress-activity-overview {
    display: block;
    margin-top: 17px;
}

.progress-activity-card .progress-activity-chart {
    position: relative;
    display: block;
    width: 100%;
    height: 175px;
    padding: 0;
    border-bottom: 0;
    background: transparent;
}

.progress-activity-card .progress-activity-chart canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.progress-activity-card .progress-activity-legend {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px 18px;
    margin-top: 15px;
    padding-top: 15px;
}

.progress-activity-card .progress-activity-key {
    gap: 6px;
    padding: 0;
    color: var(--muted);
    font-size: 9px;
    text-decoration: none;
}

.progress-activity-card .progress-activity-key:hover,
.progress-activity-card .progress-activity-key:focus-visible {
    color: var(--ink);
}

.progress-activity-card .progress-activity-key:focus-visible {
    border-radius: 4px;
    outline: 2px solid var(--activity-color);
    outline-offset: 4px;
}

.progress-activity-card .progress-activity-key i {
    width: 8px;
    height: 8px;
    flex-basis: 8px;
    border: 0;
    border-radius: 50%;
    background: var(--activity-color);
    color: transparent;
    font-size: 0;
}

.progress-activity-card .progress-activity-key b {
    font-size: 11px;
}

.progress-activity-card .progress-activity-link-arrow {
    margin-left: auto;
    color: var(--activity-color);
    font-size: 11px;
    font-weight: 800;
}

@media (max-width: 720px) {
    .progress-activity-card {
        padding: 17px;
    }

    .progress-activity-card > header {
        gap: 12px;
    }

    .progress-activity-card h2 {
        font-size: 25px;
    }

    .progress-activity-card .progress-activity-total {
        display: grid;
        padding: 0;
        border: 0;
    }

    .progress-activity-card .progress-activity-total > strong {
        font-size: 27px;
    }

    .progress-activity-card .progress-activity-chart {
        height: 150px;
    }

    .progress-activity-card .progress-activity-legend {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px 16px;
    }
}

@media (max-width: 360px) {
    .progress-activity-card .progress-activity-total > small {
        gap: 3px;
        font-size: 7px;
    }
}

.progress-activity-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 10px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: var(--radius-limit, 14px);
    background: var(--paper-deep);
    box-shadow: 0 7px 20px rgba(52, 43, 36, .07);
}

.progress-activity-tabs button {
    --tab-face: #fffdfa;
    --tab-edge: #c8bdb3;
    --tab-shadow: rgba(52, 43, 36, .11);
    min-height: 42px;
    margin-bottom: 3px;
    padding: 8px 12px;
    border: 1px solid var(--tab-edge);
    border-radius: min(11px, var(--radius-limit, 14px));
    background: var(--tab-face);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .84), 0 3px 0 var(--tab-edge), 0 8px 14px var(--tab-shadow);
    color: var(--muted);
    font-size: 13px;
    font-weight: 850;
    translate: 0 0;
    transition: border-color .14s ease, background .14s ease, box-shadow .1s ease, color .14s ease, translate .1s ease;
}

.progress-activity-tabs button[aria-selected="true"] {
    --tab-face: var(--accent);
    --tab-edge: #b94d39;
    --tab-shadow: rgba(185, 77, 57, .2);
    color: var(--ink);
}

.progress-activity-tabs button:hover,
.progress-activity-tabs button:focus-visible {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .88), 0 4px 0 var(--tab-edge), 0 10px 18px var(--tab-shadow);
    translate: 0 -1px;
}

.progress-activity-tabs button:focus-visible {
    outline: 3px solid rgba(234, 118, 95, .25);
    outline-offset: 1px;
}

.progress-metric-card {
    padding: 22px;
    border-color: var(--line);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.progress-metric-card[hidden],
[data-progress-activity-panel][hidden] {
    display: none;
}

.progress-metric-card > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--line);
}

.progress-metric-range-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
    margin-top: 14px;
}

.progress-metric-range-tabs button {
    min-height: 30px;
    padding: 5px 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8f3ed;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 2px 0 rgba(52, 43, 36, .1);
    color: var(--muted);
    font: 800 9px/1 var(--mono);
    letter-spacing: .04em;
    transition: border-color .14s ease, background .14s ease, color .14s ease, translate .1s ease;
}

.progress-metric-range-tabs button[aria-pressed="true"] {
    border-color: #b94d39;
    background: var(--accent);
    color: var(--ink);
}

.progress-metric-range-tabs button:hover,
.progress-metric-range-tabs button:focus-visible {
    border-color: var(--accent);
    color: var(--ink);
    translate: 0 -1px;
}

.progress-metric-range-tabs button:focus-visible {
    outline: 2px solid rgba(234, 118, 95, .35);
    outline-offset: 1px;
}

.progress-metric-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.progress-metric-heading > img {
    display: block;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    object-fit: contain;
    filter: drop-shadow(0 3px 3px rgba(29, 35, 48, .15));
}

.progress-metric-card-dna .progress-metric-heading > img {
    width: 54px;
    height: 40px;
    flex-basis: 54px;
}

.progress-metric-heading h2 {
    margin: 0;
    font: 800 27px/1 var(--serif);
    letter-spacing: -.035em;
}

.progress-metric-heading p,
.progress-metric-note {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.45;
}

.progress-metric-summary {
    flex: 0 0 auto;
    text-align: right;
}

.progress-metric-summary strong,
.progress-metric-summary span {
    display: block;
}

.progress-metric-summary strong {
    font: 800 30px/.9 var(--serif);
    font-variant-numeric: tabular-nums;
    letter-spacing: -.04em;
}

.progress-metric-summary span {
    margin-top: 6px;
    color: var(--muted);
    font: 800 9px/1 var(--mono);
    letter-spacing: .04em;
    text-transform: uppercase;
}

.progress-metric-summary span.is-up {
    color: var(--green-dark);
}

.progress-metric-summary span.is-down {
    color: var(--red);
}

.progress-metric-chart {
    position: relative;
    width: 100%;
    height: 240px;
    margin-top: 17px;
}

.progress-metric-chart canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.progress-metric-note {
    margin-top: 12px;
    text-align: right;
}

@media (max-width: 720px) {
    .progress-activity-tabs {
        gap: 4px;
        padding: 4px;
    }

    .progress-activity-tabs button {
        min-height: 40px;
        padding-inline: 8px;
        font-size: 12px;
    }

    .progress-metric-card {
        padding: 17px;
    }

    .progress-metric-card > header {
        align-items: flex-start;
        gap: 10px;
    }

    .progress-metric-heading {
        align-items: flex-start;
        gap: 8px;
    }

    .progress-metric-heading > img {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }

    .progress-metric-card-dna .progress-metric-heading > img {
        width: 42px;
        height: 32px;
        flex-basis: 42px;
    }

    .progress-metric-heading h2 {
        font-size: 22px;
    }

    .progress-metric-heading p {
        max-width: 190px;
        font-size: 9px;
    }

    .progress-metric-summary strong {
        font-size: 27px;
    }

    .progress-metric-chart {
        height: 205px;
    }
}

/* Progress Chess DNA summary and orange-and-cream achievement cabinet. */
.progress-domains-card .progress-domains-header {
    align-items: center;
}

.progress-domains-heading > span {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: clamp(12px, 1.05vw, 14px);
    font-weight: 800;
}

.progress-domains-total {
    display: grid;
    flex: none;
    justify-items: end;
}

.progress-domains-total .progress-dna-value {
    --dna-value-size: 34px;
    display: inline-flex;
    justify-content: flex-end;
    margin: 0;
}

.progress-domains-total .dna-number-text {
    color: var(--accent-ink);
    font-family: var(--display);
    font-weight: 850;
}

.progress-domains-total > small {
    margin-top: 2px;
    color: var(--muted);
    font-size: clamp(11px, .95vw, 13px);
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.progress-trophy-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: flex-start;
    gap: 0 24px;
    margin-bottom: 18px;
    padding: 4px 2px 0;
}

.progress-trophy-header h2 {
    margin: 3px 0 6px;
    font: 850 clamp(27px, 3vw, 38px)/1 var(--display);
    letter-spacing: -.045em;
}

.progress-trophy-header > p:last-child {
    grid-column: 1 / -1;
    width: 100%;
    max-width: none;
    margin: 0;
    color: var(--muted);
    font-size: clamp(13px, 1.15vw, 15px);
    line-height: 1.5;
}

.progress-trophy-header > span {
    flex: none;
    padding: 7px 11px;
    border: 1px solid #e3b779;
    border-radius: 999px;
    background: #fff4df;
    color: #9b4d18;
    font-size: clamp(12px, 1vw, 14px);
    font-weight: 900;
    white-space: nowrap;
}

.progress-trophy-tiers {
    display: grid;
    column-gap: 14px;
    row-gap: 8px;
}

.progress-trophy-loader {
    min-height: 128px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    color: var(--muted);
    text-align: center;
}

.progress-trophy-loader[hidden] { display: none; }

.progress-trophy-loader-icon {
    width: 32px;
    height: 32px;
    border: 4px solid rgba(64, 105, 75, .18);
    border-top-color: var(--green);
    border-radius: 50%;
    animation: progress-trophy-loader-spin .7s linear infinite;
}

.progress-trophy-loader strong { font-size: 11px; }

@keyframes progress-trophy-loader-spin { to { transform: rotate(1turn); } }

@media (prefers-reduced-motion: reduce) {
    .progress-trophy-loader-icon { animation-duration: 1.8s; }
}

.progress-trophy-tier {
    overflow: hidden;
    border: 1px solid #ead5bb;
    border-radius: var(--radius-limit, 14px);
    background: rgba(255, 253, 247, .8);
    box-shadow: 0 8px 22px rgba(115, 69, 31, .07);
}

.progress-trophy-tier > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px 10px;
    border-bottom: 1px solid #eddcc7;
    background: linear-gradient(90deg, rgba(240, 126, 31, .1), rgba(255, 248, 235, .2));
}

.progress-trophy-tier h3 {
    margin: 0;
    color: #7f3e14;
    font: 850 17px/1 var(--display);
    letter-spacing: -.025em;
}

.progress-trophy-tier header p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: clamp(12px, 1vw, 14px);
    line-height: 1.4;
}

.progress-trophy-tier header > span {
    flex: none;
    min-width: 48px;
    padding: 5px 8px;
    border: 1px solid #e8c99e;
    border-radius: 999px;
    background: #fff8ea;
    color: #9b4d18;
    font-size: clamp(11px, .95vw, 13px);
    font-weight: 900;
    text-align: center;
}

.progress-trophy-grid {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 1px;
    padding: 1px;
    background: #ead5bb;
}

.progress-trophy-item {
    position: relative;
    display: grid;
    min-width: 0;
    padding: 8px 6px 7px;
    border: 0;
    border-radius: 0;
    background: #fffaf0;
    color: inherit;
    font: inherit;
    text-align: inherit;
}

.progress-trophy-item.earned {
    background:
        radial-gradient(circle at 50% 38%, rgba(255, 181, 74, .2), transparent 48%),
        #fffdf7;
}

.progress-trophy-image {
    display: grid;
    aspect-ratio: 1;
    place-items: center;
}

.progress-trophy-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: filter .2s ease, opacity .2s ease, transform .2s ease;
}

.progress-trophy-item.earned:hover .progress-trophy-image img {
    transform: translateY(-2px) scale(1.035);
}

.progress-trophy-item:focus-visible {
    z-index: 2;
    outline: 3px solid rgba(234, 118, 95, .42);
    outline-offset: -3px;
}

.progress-trophy-item.locked .progress-trophy-image img {
    filter: grayscale(.7) saturate(.45);
    opacity: .48;
}

.progress-trophy-item.earned::after {
    content: "✓";
    position: absolute;
    right: 7px;
    top: 7px;
    display: grid;
    width: 18px;
    height: 18px;
    place-items: center;
    border: 2px solid #fffaf0;
    border-radius: 50%;
    background: #ee7e20;
    color: white;
    font-size: 10px;
    font-weight: 900;
    box-shadow: 0 2px 6px rgba(139, 64, 14, .2);
}

.progress-trophy-copy {
    min-width: 0;
    text-align: center;
}

.progress-trophy-copy strong,
.progress-trophy-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.progress-trophy-copy strong {
    color: #4f3020;
    font-size: clamp(11px, .9vw, 13px);
    font-weight: 850;
}

.progress-trophy-copy small {
    margin-top: 2px;
    color: #9c7963;
    font-size: clamp(10px, .8vw, 12px);
    font-weight: 750;
}

.progress-trophy-item.earned .progress-trophy-copy small {
    color: #b85514;
}

@media (max-width: 900px) {
    .progress-trophy-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .progress-domains-card .progress-domains-header {
        display: flex;
    }

    .progress-domains-total .progress-dna-value {
        --dna-value-size: 30px;
    }

    .progress-trophy-header {
        gap: 12px;
    }

    .progress-trophy-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .progress-trophy-item {
        padding: 6px 4px;
    }

}

@media (max-width: 360px) {
    .progress-trophy-header {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .progress-trophy-header > span {
        grid-row: 3;
        justify-self: start;
    }
}

/* Mode-based Progress: global consistency, focused sections, and eight mode tabs. */
body.view-progress .eyebrow {
    display: none;
}

.progress-overview-row {
    display: grid;
    grid-template-columns: minmax(280px, .55fr) minmax(0, 1.45fr);
    align-items: start;
    gap: 12px;
    margin-bottom: 12px;
}

.progress-profile-overview {
    display: grid;
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    margin: 0;
}

.progress-profile-overview .progress-identity {
    min-width: 0;
    height: auto;
    margin: 0;
    align-content: center;
}

.progress-consistency-stack {
    display: grid;
    grid-column: 2;
    grid-row: 1;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    min-width: 0;
}

.progress-consistency-stack > .progress-puzzle-rating-overview {
    grid-column: 1;
    grid-row: 1;
}

.progress-consistency-stack > .progress-rhythm-global {
    grid-column: 1;
    grid-row: 2;
}

.progress-rhythm-global {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(250px, .55fr);
    gap: 0 24px;
    min-width: 0;
    margin: 0;
    padding: 20px;
}

.progress-rhythm-global .progress-rhythm-head,
.progress-rhythm-global .progress-heatmap,
.progress-rhythm-global .progress-heatmap-axis {
    grid-column: 1;
}

.progress-rhythm-global .progress-rhythm-stats,
.progress-rhythm-global > .button {
    grid-column: 2;
}

.progress-rhythm-global .progress-rhythm-stats {
    grid-row: 1 / span 2;
    align-self: end;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 38px 0 9px;
}

.progress-rhythm-global > .button {
    grid-row: 3;
    align-self: end;
}

.progress-section-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
    margin-bottom: 10px;
    padding: 5px;
    border: 1px solid #d9d0c7;
    border-radius: var(--radius-limit, 14px);
    background: #eee8e0;
    box-shadow: 0 7px 20px rgba(52, 43, 36, .07);
}

.progress-puzzle-skills-card {
    position: relative;
    padding: 0 0 22px;
    overflow: hidden;
    background:
        radial-gradient(circle at 92% 8%, rgba(244, 190, 73, .32), transparent 24%),
        linear-gradient(145deg, #fffdf8, #f4efe5);
}

.progress-puzzle-skills-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px;
    border-bottom: 1px solid rgba(82, 111, 84, .18);
    background: linear-gradient(120deg, #263f2b, #527054);
    color: #fffdf8;
}

.progress-puzzle-skills-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.progress-puzzle-skills-art {
    display: grid;
    width: 68px;
    height: 68px;
    flex: 0 0 68px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: var(--radius-limit, 14px);
    background: rgba(255, 255, 255, .14);
    transform: rotate(-3deg);
}

.progress-puzzle-skills-art img {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.progress-puzzle-skills-header h2,
.progress-puzzle-classification-groups h3 {
    margin: 0;
    font-family: var(--serif);
}

.progress-puzzle-skills-header p {
    max-width: 620px;
    margin: 6px 0 0;
    color: rgba(255, 255, 255, .76);
    font-size: 12px;
}

.progress-puzzle-analyzed {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    flex: 0 0 auto;
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 999px;
    background: var(--yellow);
    color: var(--ink);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.progress-puzzle-analyzed strong {
    font: 900 18px/1 var(--display);
}

.progress-puzzle-disclosure {
    margin: 14px 22px 0;
    overflow: hidden;
    border: 1px solid rgba(97, 75, 58, .16);
    border-radius: var(--radius-limit, 14px);
    background: rgba(255, 255, 255, .76);
}

.progress-puzzle-coaching {
    border-color: rgba(82, 111, 84, .18);
    background: transparent;
}

.progress-puzzle-coaching > summary {
    background: rgba(255, 255, 255, .52);
}

.progress-puzzle-coaching .progress-puzzle-disclosure-body {
    background: rgba(255, 255, 255, .26);
}

.progress-puzzle-disclosure[hidden] {
    display: none;
}

.progress-puzzle-disclosure > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 62px;
    padding: 13px 16px;
    cursor: pointer;
    list-style: none;
}

.progress-puzzle-disclosure > summary::-webkit-details-marker {
    display: none;
}

.progress-puzzle-disclosure > summary::after {
    content: "+";
    display: grid;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    place-items: center;
    border-radius: 50%;
    background: var(--paper-deep);
    color: var(--green-dark);
    font: 900 18px/1 var(--display);
}

.progress-puzzle-disclosure[open] > summary::after {
    content: "−";
}

.progress-puzzle-disclosure > summary > span:first-child {
    min-width: 0;
}

.progress-puzzle-disclosure > summary small,
.progress-puzzle-disclosure > summary strong {
    display: block;
}

.progress-puzzle-disclosure > summary small {
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.progress-puzzle-disclosure > summary strong {
    font-family: var(--serif);
    font-size: 17px;
}

.progress-puzzle-disclosure-count {
    margin-left: auto;
    color: var(--muted);
    font-size: 10px;
    font-weight: 750;
    text-align: right;
}

.progress-puzzle-disclosure-count b {
    color: var(--green-dark);
    font: 900 16px/1 var(--display);
}

.progress-puzzle-disclosure-body {
    padding: 14px 16px 16px;
    border-top: 1px solid rgba(97, 75, 58, .12);
}

.progress-puzzle-focus-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.progress-puzzle-focus-grid[hidden] {
    display: none;
}

.progress-puzzle-focus-grid article {
    min-width: 0;
    padding: 14px;
    border-radius: var(--radius-limit, 14px);
}

.progress-puzzle-focus-grid article.is-strongest {
    background: #efe8ff;
}

.progress-puzzle-focus-grid article.is-next {
    background: #e5f1ed;
}

.progress-puzzle-focus-grid small,
.progress-puzzle-focus-grid strong,
.progress-puzzle-focus-grid span {
    display: block;
}

.progress-puzzle-focus-grid small {
    color: var(--muted);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.progress-puzzle-focus-grid strong {
    margin-top: 7px;
    font: 900 17px/1.1 var(--display);
}

.progress-puzzle-focus-grid span {
    margin-top: 5px;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.45;
}

.progress-puzzle-ratings-ready {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 9px;
}

.progress-puzzle-ratings-ready strong {
    color: var(--green-dark);
}

.progress-puzzle-signal-group + .progress-puzzle-signal-group {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(97, 75, 58, .12);
}

.progress-puzzle-signal-group h3 {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.progress-puzzle-signal-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.progress-puzzle-signal-chip,
.progress-puzzle-signal-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 31px;
    padding: 6px 9px;
    border-radius: 999px;
    background: #fff0d9;
    color: #5f4a2d;
    font-size: 10px;
}

.progress-puzzle-signal-chip small {
    display: grid;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    place-items: center;
    border-radius: 999px;
    background: rgba(95, 74, 45, .1);
    font-size: 8px;
}

.progress-puzzle-signal-more {
    background: var(--paper-deep);
    color: var(--muted);
    font-weight: 800;
}

.progress-puzzle-technical .progress-puzzle-disclosure-body p {
    margin: 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.55;
}

.progress-puzzle-rating {
    flex: none;
    min-width: 154px;
    padding: 13px 16px;
    border: 1px solid rgba(49, 92, 61, .2);
    border-radius: var(--radius-limit, 14px);
    background: linear-gradient(135deg, #f5f8f2, #e5eee2);
    box-shadow: 0 5px 0 rgba(49, 92, 61, .16);
    color: var(--ink);
}

.progress-puzzle-rating-overview {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
    min-width: 0;
    padding: 13px 18px;
}

.progress-puzzle-rating .progress-puzzle-rating-value {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.progress-puzzle-rating-value img {
    display: block;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    object-fit: contain;
    filter: drop-shadow(0 2px 2px rgba(29, 35, 48, .18));
}

.progress-puzzle-rating-value #progress-puzzle-rating {
    color: inherit;
    font: inherit;
    letter-spacing: normal;
}

.progress-puzzle-rating .progress-puzzle-rating-label {
    color: #46614a;
    font-size: 12px;
    letter-spacing: .14em;
}

.progress-puzzle-rating strong,
.progress-puzzle-rating span,
.progress-puzzle-rating small {
    display: block;
}

.progress-puzzle-rating strong {
    margin: 3px 0;
    color: var(--ink);
    font: 900 36px/.95 var(--display);
}

.progress-puzzle-rating span {
    color: #5e5127;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.progress-puzzle-rating small {
    color: #6d6038;
    font-size: 8px;
    font-weight: 750;
}

.progress-puzzle-skill-overview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    margin: 18px 22px 0;
}

.progress-puzzle-skill-overview article {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: min(13px, var(--radius-limit, 14px));
    background: rgba(255, 255, 255, .74);
    box-shadow: 0 4px 0 rgba(71, 62, 52, .08);
}

.progress-puzzle-skill-overview strong,
.progress-puzzle-skill-overview span {
    display: block;
}

.progress-puzzle-skill-overview strong {
    color: var(--green-dark);
    font: 900 25px/1 var(--display);
}

.progress-puzzle-skill-overview span {
    margin-top: 5px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}

.progress-puzzle-rating-note {
    margin: 10px 22px 0;
    color: var(--muted);
    font-size: 9px;
}

.progress-puzzle-classification-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 22px 0;
}

.progress-puzzle-disclosure .progress-puzzle-classification-groups {
    margin: 0;
}

.progress-puzzle-classification-groups[hidden] {
    display: none;
}

.progress-puzzle-classification-groups > section {
    min-width: 0;
    padding: 4px 0 0;
}

.progress-puzzle-classification-groups > section.is-patterns {
    padding-right: 14px;
    border-right: 1px solid rgba(97, 75, 58, .14);
}

.progress-puzzle-classification-groups > section.is-skills {
    padding-left: 2px;
}

.progress-puzzle-classification-groups > section > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.progress-puzzle-classification-groups > section > header small {
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.progress-puzzle-classification-groups > section > header > strong {
    display: grid;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    place-items: center;
    border: 1px solid rgba(82, 111, 84, .2);
    border-radius: 50%;
    background: rgba(255, 255, 255, .7);
    color: var(--green-dark);
    font: 900 15px/1 var(--display);
}

.progress-puzzle-classification-list {
    display: grid;
    gap: 0;
    margin-top: 12px;
}

.progress-puzzle-classification {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 9px;
    padding: 10px 2px;
    border-bottom: 1px solid rgba(97, 75, 58, .13);
}

.progress-puzzle-classification:last-child {
    border-bottom: 0;
}

.progress-puzzle-classification strong,
.progress-puzzle-classification small {
    display: block;
}

.progress-puzzle-classification strong {
    font-size: 12px;
}

.progress-puzzle-classification small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 8px;
}

.progress-puzzle-classification-mark {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 50%;
    background: var(--green-soft);
    color: var(--green-dark);
    font: 900 14px/1 var(--display);
}

.is-patterns .progress-puzzle-classification-mark {
    background: #fff0bd;
    color: #765d13;
}

.progress-puzzle-classification-score {
    text-align: right;
}

.progress-puzzle-classification-score strong,
.progress-puzzle-classification-score small {
    display: block;
}

.progress-puzzle-classification-score strong {
    color: var(--green-dark);
    font: 900 18px/1 var(--display);
}

.progress-puzzle-classification-score small {
    margin-top: 2px;
    font-size: 7px;
    font-weight: 850;
    text-transform: uppercase;
}

.progress-puzzle-classification.is-building .progress-puzzle-classification-score strong {
    color: var(--muted);
    font-size: 13px;
}

.progress-puzzle-classification-practice {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    justify-content: center;
    padding: 4px 9px;
    border: 1px solid rgba(82, 111, 84, .25);
    border-radius: 999px;
    background: rgba(255, 255, 255, .74);
    color: var(--green-dark);
    font-size: 8px;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
}

.progress-puzzle-classification-practice:hover {
    border-color: var(--green);
    background: #fff;
}

.progress-puzzle-classification-practice:focus-visible {
    outline: 3px solid rgba(82, 111, 84, .22);
    outline-offset: 2px;
}

.progress-puzzle-classification-meter {
    display: block;
    grid-column: 2 / -1;
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: #ded9cf;
}

.progress-puzzle-classification-meter b {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--green), #86aa84);
}

.is-patterns .progress-puzzle-classification-meter b {
    background: linear-gradient(90deg, #d89b26, #f1c253);
}

.progress-puzzle-skills-empty,
.progress-puzzle-skills-guest {
    margin: 14px 22px 0;
    padding: 13px;
    border: 1px dashed var(--line);
    border-radius: 9px;
    color: var(--muted);
    font-size: 11px;
}

.progress-section-tabs button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 9px 14px;
    border: 1px solid transparent;
    border-radius: min(11px, var(--radius-limit, 14px));
    background: transparent;
    color: var(--muted);
    font-size: 14px;
    font-weight: 850;
}

.progress-section-tabs button.is-locked {
    color: #756e68;
    cursor: pointer;
}

.progress-section-tabs button.is-locked:hover,
.progress-section-tabs button.is-locked:focus-visible {
    color: var(--accent-ink);
    --tab-face: #fffaf5;
    --tab-edge: #c9a89e;
}

.progress-tab-lock {
    display: inline-grid;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    place-items: center;
    border: 1px solid #c9a89e;
    border-radius: 50%;
    background: #fff8f2;
    color: #9c4e3e;
}

.progress-tab-lock[hidden] {
    display: none;
}

.progress-tab-lock svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.progress-section-tabs button:hover {
    color: var(--ink);
    background: rgba(255, 255, 255, .55);
}

.progress-section-tabs button[aria-selected="true"] {
    border-color: #e39a89;
    background: #fffaf5;
    color: var(--accent-ink);
    box-shadow: 0 3px 10px rgba(98, 68, 51, .11);
}

.progress-section-tabs button:focus-visible {
    outline: 3px solid rgba(234, 118, 95, .25);
    outline-offset: 1px;
}

.progress-mode-tabs {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 10px;
    padding: 6px;
    border: 1px solid #d9d0c7;
    border-radius: var(--radius-limit, 14px);
    background: #eee8e0;
    box-shadow: 0 7px 20px rgba(52, 43, 36, .07);
}

.progress-mode-tabs button {
    display: grid;
    min-width: 0;
    min-height: 58px;
    padding: 7px 4px;
    place-items: center;
    gap: 2px;
    border-radius: min(11px, var(--radius-limit, 14px));
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
}

.progress-mode-tabs button > img {
    display: block;
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.progress-mode-tabs button:focus-visible {
    outline: 3px solid rgba(234, 118, 95, .25);
    outline-offset: 1px;
}

.progress-mode-card {
    min-width: 0;
    padding: 22px;
}

.progress-mode-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.progress-mode-heading {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 13px;
}

.progress-mode-heading > span {
    display: grid;
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    place-items: center;
    border: 1px solid #e0d7cf;
    border-radius: var(--radius-limit, 14px);
    background: #f8f3ed;
}

.progress-mode-heading > span img {
    display: block;
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.progress-mode-heading h2 {
    margin: 2px 0 3px;
    font: 850 27px/1 var(--display);
    letter-spacing: -.04em;
}

.progress-mode-heading p:last-child {
    max-width: 650px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.progress-mode-header > .button {
    flex: none;
    white-space: nowrap;
}

.progress-mode-empty {
    margin: 16px 0 0;
    padding: 12px 14px;
    border: 1px dashed #d7cdc4;
    border-radius: min(11px, var(--radius-limit, 14px));
    background: #faf6f0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.progress-mode-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 9px;
    margin-top: 16px;
}

.progress-mode-kpis article {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: min(12px, var(--radius-limit, 14px));
    background: #f8f3ed;
}

.progress-mode-kpis small,
.progress-mode-kpis strong {
    display: block;
}

.progress-mode-kpis small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.progress-mode-kpis strong {
    margin-top: 6px;
    color: var(--ink);
    font: 850 28px/1 var(--display);
    letter-spacing: -.03em;
}

.progress-mode-kpis article.is-text strong {
    font-size: 18px;
    line-height: 1.15;
}

.progress-puzzle-stats {
    display: grid;
    grid-template-columns: minmax(270px, .7fr) minmax(0, 1.3fr);
    align-items: start;
    gap: 12px;
    margin-top: 12px;
}

.progress-puzzle-stats[hidden] {
    display: none;
}

.progress-puzzle-stats .progress-level-runway,
.progress-puzzle-stats .progress-domains-card {
    min-width: 0;
    margin: 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: linear-gradient(145deg, rgba(234, 118, 95, .06), transparent 60%), #fffdfa;
}

.progress-puzzle-stats .progress-level-runway h2 {
    margin: 2px 0 0;
    font: 850 24px/1 var(--display);
    letter-spacing: -.04em;
}

/* All customer-facing tab buttons share the same raised, pressable surface. */
:is(.input-tabs, .puzzle-mode-tabs, .account-tabs, .training-account-dialog .account-tabs, .progress-section-tabs, .progress-mode-tabs) button {
    --tab-face: #fffdfa;
    --tab-edge: #c8bdb3;
    --tab-shadow: rgba(52, 43, 36, .11);
    margin-bottom: 3px;
    border: 1px solid var(--tab-edge);
    background: var(--tab-face);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .84),
        0 3px 0 var(--tab-edge),
        0 8px 14px var(--tab-shadow);
    color: var(--muted);
    translate: 0 0;
    transition: border-color .14s ease, background .14s ease, box-shadow .1s ease, color .14s ease, translate .1s ease;
}

:is(.input-tabs, .puzzle-mode-tabs, .account-tabs, .training-account-dialog .account-tabs, .progress-section-tabs, .progress-mode-tabs) button:is(.active, [aria-selected="true"]) {
    --tab-face: var(--accent);
    --tab-edge: #b94d39;
    --tab-shadow: rgba(185, 77, 57, .2);
    border-color: var(--tab-edge);
    background: var(--tab-face);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .58),
        0 3px 0 var(--tab-edge),
        0 8px 14px var(--tab-shadow);
    color: var(--ink);
}

:is(.input-tabs, .puzzle-mode-tabs, .account-tabs, .training-account-dialog .account-tabs, .progress-section-tabs, .progress-mode-tabs) button:hover:not(:disabled),
:is(.input-tabs, .puzzle-mode-tabs, .account-tabs, .training-account-dialog .account-tabs, .progress-section-tabs, .progress-mode-tabs) button:focus-visible {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .88),
        0 4px 0 var(--tab-edge),
        0 10px 18px var(--tab-shadow);
    translate: 0 -1px;
}

:is(.input-tabs, .puzzle-mode-tabs, .account-tabs, .training-account-dialog .account-tabs, .progress-section-tabs, .progress-mode-tabs) button:active:not(:disabled) {
    box-shadow:
        inset 0 1px 3px rgba(52, 43, 36, .14),
        0 1px 0 var(--tab-edge),
        0 4px 8px var(--tab-shadow);
    translate: 0 2px;
}

.progress-tab-panel[hidden] {
    display: none;
}

.progress-tab-panel > .progress-activity-card,
.progress-tab-panel > .progress-metric-card,
.progress-tab-panel > .progress-appearance-card {
    margin: 0;
}

@media (max-width: 900px) {
    .progress-overview-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .progress-profile-overview .progress-identity {
        height: auto;
    }

    .progress-profile-overview,
    .progress-consistency-stack {
        grid-column: 1;
        grid-row: auto;
    }
}

@media (max-width: 760px) {
    .progress-rhythm-global {
        display: block;
    }

    .progress-rhythm-global .progress-rhythm-stats {
        margin-top: 17px;
    }

    .progress-puzzle-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {
    .progress-section-tabs {
        gap: 3px;
        padding: 4px;
        border-radius: min(13px, var(--radius-limit, 14px));
    }

    .progress-section-tabs button {
        min-height: 40px;
        padding-inline: 5px;
        font-size: 12px;
    }

    .progress-puzzle-skills-card {
        padding: 0 0 15px;
    }

    .progress-puzzle-skills-header {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
        padding: 15px;
    }

    .progress-puzzle-analyzed {
        align-self: flex-start;
    }

    .progress-puzzle-disclosure {
        margin-right: 15px;
        margin-left: 15px;
    }

    .progress-puzzle-disclosure > summary {
        gap: 9px;
        padding: 12px;
    }

    .progress-puzzle-disclosure-count {
        max-width: 96px;
    }

    .progress-puzzle-disclosure-body {
        padding: 12px;
    }

    .progress-puzzle-focus-grid {
        grid-template-columns: 1fr;
    }

    .progress-puzzle-classification-groups > section.is-patterns {
        padding-right: 0;
        padding-bottom: 12px;
        border-right: 0;
        border-bottom: 1px solid rgba(97, 75, 58, .14);
    }

    .progress-puzzle-classification-groups > section.is-skills {
        padding-top: 12px;
        padding-left: 0;
    }

    .progress-puzzle-rating {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 14px;
        width: 100%;
        min-width: 0;
    }

    .progress-puzzle-skills-art {
        width: 54px;
        height: 54px;
        flex-basis: 54px;
        border-radius: var(--radius-limit, 14px);
    }

    .progress-puzzle-skills-art img {
        width: 47px;
        height: 47px;
    }

    .progress-puzzle-skill-overview {
        margin: 14px 15px 0;
    }

    .progress-puzzle-skill-overview article {
        padding: 10px 7px;
    }

    .progress-puzzle-skill-overview strong {
        font-size: 21px;
    }

    .progress-puzzle-skill-overview span {
        font-size: 7px;
    }

    .progress-puzzle-rating-note,
    .progress-puzzle-skills-empty,
    .progress-puzzle-skills-guest {
        margin-right: 15px;
        margin-left: 15px;
    }

    .progress-puzzle-classification-groups {
        grid-template-columns: 1fr;
        margin: 14px 15px 0;
    }

    .progress-rhythm-global,
    .progress-mode-card {
        padding: 15px;
    }

    .progress-rhythm-global .progress-rhythm-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .progress-mode-tabs {
        grid-template-columns: repeat(8, minmax(0, 1fr));
        gap: 3px;
        padding: 4px;
    }

    .progress-mode-tabs button {
        min-height: 48px;
        padding: 5px 1px;
        gap: 1px;
        font-size: clamp(7px, 2.25vw, 9px);
    }

    .progress-mode-tabs button > img {
        width: 25px;
        height: 25px;
    }

    .progress-mode-header {
        display: grid;
        gap: 13px;
    }

    .progress-mode-header > .button {
        width: 100%;
        justify-content: center;
    }

    .progress-mode-heading > span {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }

    .progress-mode-heading > span img {
        width: 36px;
        height: 36px;
    }

    .progress-mode-heading h2 {
        font-size: 24px;
    }

    .progress-mode-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .progress-mode-kpis strong {
        font-size: 24px;
    }

    .progress-puzzle-stats .progress-level-runway,
    .progress-puzzle-stats .progress-domains-card {
        padding: 14px;
    }
}

@media (min-width: 761px) {
    .pwa-install-banner {
        display: none !important;
    }
}

.progress-trophy-dialog {
    width: min(410px, calc(100% - 28px));
    overflow: visible;
    padding: 28px 24px 24px;
    border: 1px solid #e3bd8a;
    border-radius: var(--radius-card);
    background: radial-gradient(circle at 14% 10%, rgba(241, 139, 54, .17), transparent 34%), #fffaf0;
    box-shadow: 0 28px 80px rgba(63, 38, 23, .28);
    color: var(--ink);
}

.progress-trophy-dialog[open] {
    display: grid;
    justify-items: center;
    gap: 14px;
}

.progress-trophy-dialog::backdrop {
    background: rgba(42, 30, 22, .48);
    backdrop-filter: blur(4px);
}

.progress-trophy-dialog > img {
    display: block;
    width: 220px;
    height: 220px;
    object-fit: contain;
}

.progress-trophy-dialog-copy {
    display: grid;
    justify-items: center;
    min-width: 0;
    text-align: center;
}

.progress-trophy-dialog h2 {
    margin: 0 0 7px;
    font: 850 clamp(27px, 5vw, 34px)/1 var(--display);
    letter-spacing: -.045em;
}

#progress-trophy-dialog-requirement {
    margin: 0;
    color: var(--muted);
    font-size: clamp(14px, 2.7vw, 17px);
    font-weight: 700;
    line-height: 1.45;
}

.progress-trophy-dialog-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 15px;
    padding: 9px 13px;
    border: 1px solid #e5d4bd;
    border-radius: min(12px, var(--radius-limit, 14px));
    background: #f6eee3;
}

.progress-trophy-dialog-status strong {
    color: #7a5d49;
    font-size: 13px;
}

.progress-trophy-dialog-status.earned {
    border-color: #e3b779;
    background: #fff4df;
}

.progress-trophy-dialog-status.earned strong,
.progress-trophy-earned-check {
    color: #b85514;
}

.progress-trophy-earned-check {
    display: grid;
    width: 21px;
    height: 21px;
    place-items: center;
    border-radius: 50%;
    background: #ee7e20;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
}

.progress-trophy-dialog-action {
    width: 100%;
    margin-top: 12px;
    justify-content: center;
    text-align: center;
}

.progress-trophy-dialog-close {
    position: absolute;
    right: 14px;
    top: 14px;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    padding: 0;
    border: 1px solid #ddc9b0;
    border-radius: 50%;
    background: #fffdf8;
    color: #75462a;
    font-size: 22px;
    line-height: 1;
}

@media (max-width: 540px) {
    .progress-trophy-dialog {
        padding: 20px;
    }

    .progress-trophy-dialog[open] {
        gap: 10px;
    }

    .progress-trophy-dialog > img {
        width: min(180px, 58vw);
        height: min(180px, 58vw);
    }

    .progress-trophy-dialog h2 {
        margin-bottom: 6px;
    }
}

/* Public design-system consistency pass — September 10, 2026. */
body.view-puzzles .site-header,
body.view-puzzles .home-hub-tabs-wrap,
.battle-header,
.arcade-header {
    width: min(1180px, calc(100% - 24px));
}

.site-header nav {
    padding: 1px;
}

.site-header nav a,
.site-header nav button {
    min-height: 40px;
    margin-bottom: 0;
}

.battle-header,
.arcade-header {
    min-height: 66px;
    height: auto;
    padding: 9px 10px;
    border-radius: var(--radius-header);
}

.section-page-title {
    margin: 22px 8px 18px;
    color: var(--ink);
    font: 800 clamp(34px, 4vw, 46px)/1 var(--display);
    letter-spacing: -.05em;
}

.progress-premium-strip {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    min-height: 112px;
    margin-bottom: 14px;
    padding: 14px 20px 14px 15px;
    overflow: hidden;
    border: 1px solid #a9472f;
    background: radial-gradient(circle at 84% 0%, rgba(255, 247, 232, .32), transparent 30%), linear-gradient(135deg, #f6b29f, #ea765f);
    box-shadow: 0 6px 0 #a9472f, 0 16px 30px rgba(111, 50, 31, .15);
    color: #6f321f;
    text-decoration: none;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.progress-premium-strip:hover,
.progress-premium-strip:focus-visible {
    border-color: #a9472f;
    box-shadow: 0 7px 0 #a9472f, 0 19px 34px rgba(111, 50, 31, .2);
    outline: 3px solid rgba(238, 128, 104, .22);
    outline-offset: 3px;
    transform: translateY(-1px);
}

.progress-premium-icon {
    display: grid;
    width: 76px;
    height: 76px;
    place-items: center;
}

.progress-premium-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.progress-premium-copy {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.progress-premium-copy small {
    color: #a9472f;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .12em;
    line-height: 1.3;
    text-transform: uppercase;
}

.progress-premium-copy strong {
    overflow: hidden;
    color: #6f321f;
    font: 820 clamp(20px, 2.2vw, 28px)/1.08 var(--display);
    letter-spacing: -.035em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.progress-premium-copy > span {
    overflow: hidden;
    color: #6f321f;
    font-size: 12px;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.progress-premium-plan {
    display: grid;
    justify-items: end;
    gap: 8px;
}

.progress-premium-plan > strong {
    color: #6f321f;
    font: 820 15px/1 var(--display);
}

.progress-premium-plan > span {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border: 1px solid #a9472f;
    border-radius: min(11px, var(--radius-limit, 14px));
    background: var(--accent);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 4px 0 #ad4432;
    color: #6f321f;
    font-size: 13px;
    font-weight: 820;
    white-space: nowrap;
}

.progress-access-summary{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:-2px 0 14px;padding:13px 17px;border-color:#f0b19f;background:#fff7e8}.progress-access-summary>div:first-child{display:grid;gap:2px;min-width:0}.progress-access-summary small{color:#a9472f;font-size:8px;font-weight:900;letter-spacing:.1em;text-transform:uppercase}.progress-access-summary strong{color:#6f321f;font-size:13px}.progress-access-summary span{color:#6f321f;font-size:9px;line-height:1.4}.progress-access-allowances{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:6px}.progress-access-allowances>span{padding:6px 8px;border:1px solid #f0b19f;border-radius:999px;background:#fffdf5;white-space:nowrap}.progress-access-allowances strong{color:#a9472f;font-size:11px}

.progress-premium-plan b {
    font-size: 16px;
}

@media (max-width: 620px) {
    .progress-premium-strip {
        grid-template-columns: 62px minmax(0, 1fr);
        gap: 10px 13px;
        min-height: 0;
        padding: 14px;
        border-radius: var(--radius-card-mobile);
    }

    .progress-premium-icon {
        width: 62px;
        height: 62px;
    }

    .progress-premium-copy strong,
    .progress-premium-copy > span {
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
    }

    .progress-premium-copy strong {
        font-size: 20px;
    }

    .progress-premium-copy > span {
        margin-top: 2px;
        font-size: 11px;
    }

    .progress-premium-plan {
        display: flex;
        grid-column: 1 / -1;
        align-items: center;
        justify-content: space-between;
        padding-top: 2px;
    }

    .progress-premium-plan > span {
        min-height: 40px;
        padding: 9px 13px;
        font-size: 12px;
    }
    .progress-access-summary{align-items:flex-start;flex-direction:column;gap:9px;padding:12px}.progress-access-allowances{justify-content:flex-start}
}

.nav-account-button.is-current,
.nav-account-button.is-progress {
    border-color: #b94d39;
    background: var(--accent);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .5),
        0 4px 0 #b94d39,
        0 9px 18px rgba(185, 77, 57, .18);
    color: var(--ink);
}

.nav-account-button.is-current:hover,
.nav-account-button.is-current:focus-visible,
.nav-account-button.is-progress:hover,
.nav-account-button.is-progress:focus-visible {
    border-color: #c45742;
    background: var(--accent-soft);
}

.nav-account-button.is-current .nav-account-label,
.nav-account-button.is-progress .nav-account-label {
    color: var(--ink);
}

.coach-hero h1,
.arcade-hero h1,
.battle-lobby h1,
.training-hero-copy h1 {
    font: 800 clamp(42px, 6.4vw, 78px)/.94 var(--display);
    letter-spacing: -.065em;
}

.coach-hero h1 em,
.arcade-hero h1 em,
.battle-lobby h1 em,
.training-hero-copy h1 em {
    color: var(--accent-ink);
}

.battle-page .battle-lobby #battle-find-match,
.arcade-page .arcade-card-foot .button,
body.view-path .path-next-level-action {
    --button-face: var(--accent);
    --button-edge: #b94d39;
    --button-shadow: rgba(185, 77, 57, .22);
    min-height: 45px;
    padding: 10px 16px;
    border: 1px solid var(--button-edge);
    border-radius: var(--radius-control);
    background: var(--button-face);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .78),
        inset 0 -1px 0 rgba(52, 43, 36, .10),
        0 4px 0 var(--button-edge),
        0 10px 18px var(--button-shadow);
    color: var(--ink);
    font: 600 14px/1 var(--sans);
    text-shadow: none;
}

.battle-page .battle-lobby #battle-find-match:hover:not(:disabled),
.battle-page .battle-lobby #battle-find-match:focus-visible,
.arcade-page .arcade-card-foot .button:hover:not(:disabled),
.arcade-page .arcade-card-foot .button:focus-visible,
body.view-path .path-next-level-action:hover:not(:disabled),
body.view-path .path-next-level-action:focus-visible {
    border-color: #b94d39;
    background: var(--accent-soft);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .82),
        inset 0 -1px 0 rgba(52, 43, 36, .10),
        0 5px 0 var(--button-edge),
        0 12px 22px var(--button-shadow);
    color: var(--ink);
    text-shadow: none;
}

.legal-page section,
.account-page-card,
.deletion-form-card,
.comparison-card,
.comparison-choice,
.comparison-related article,
.comparison-quick-answer,
.comparison-table-wrap,
.comparison-disclosure,
.comparison-together,
.comparison-sources,
.comparison-cta {
    border-radius: var(--radius-card);
}

.comparison-card dl div,
.comparison-pick-grid > div,
.comparison-choice-grid > div,
.comparison-choice-grid > div:last-child,
.comparison-table-section thead th,
.comparison-table-section tbody th,
.comparison-sources {
    background: var(--surface-soft);
}

.comparison-cta p:not(.eyebrow) {
    color: var(--ink-soft);
}

.path-rules strong,
.path-leaderboard header > span {
    color: #89651a;
}

.coach-game-result.win,
.coach-progress-steps li.complete > span {
    border-color: var(--success);
    background: var(--success-soft);
    color: var(--success);
}

.coach-game-hero .coach-game-result.win strong,
.coach-progress-live,
.coach-progress-steps li.complete,
.coach-progress-steps li.complete > span::after,
.arcade-feedback > span,
.battle-task > p.is-correct,
.battle-player-you strong,
.battle-final-score strong:first-child,
.matchmaking-record {
    color: var(--success) !important;
}

.coach-progress-live i,
.arcade-choices button.is-correct,
.matchmaking-person.is-matched .matchmaking-avatar {
    border-color: var(--success);
}

.coach-progress-live i {
    background: var(--success);
}

.arcade-choices button.is-correct {
    background: linear-gradient(180deg, #f2fbf4 0%, var(--success-soft) 100%);
    box-shadow: inset 0 1px 0 #fff, 0 4px 0 var(--success), 0 8px 14px rgba(38, 120, 68, .18);
    color: var(--success-dark);
}

.arcade-feedback > span {
    background: var(--success-soft);
}

.battle-avatar,
.matchmaking-avatar {
    background: var(--surface-soft);
    box-shadow: 0 3px 0 var(--line-hi);
}

.matchmaking-person.is-matched .matchmaking-avatar {
    box-shadow: 0 6px 0 var(--success-dark), 0 14px 25px rgba(52, 43, 36, .15);
}

@media (max-width: 760px) {
    .comparison-site .site-header,
    .legal-site .site-header,
    .account-deletion-site .site-header {
        flex-wrap: nowrap;
    }

    .comparison-site .site-header nav,
    .legal-site .site-header nav,
    .account-deletion-site .site-header nav {
        position: static;
        order: initial;
        width: auto;
        min-width: 0;
        flex: 1;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .comparison-table-wrap {
        width: 100%;
        margin-right: 0;
        margin-left: 0;
    }
}

@media (max-width: 620px) {
    body.view-puzzles .site-header,
    body.view-puzzles .home-hub-tabs-wrap,
    .battle-header,
    .arcade-header {
        width: calc(100% - 16px);
    }

    .battle-page .battle-header,
    .arcade-page .arcade-header {
        min-height: 61px;
        height: auto;
        padding: 7px;
        border-radius: var(--radius-header-mobile);
    }

    .arcade-page .arcade-header .brand-mark {
        height: 45px;
    }

    .arcade-page .arcade-header .wordmark {
        font-size: 20px;
    }

    .arcade-page .arcade-title-desktop {
        display: inline;
    }

    .arcade-page .arcade-title-mobile {
        display: none;
    }

    .coach-hero h1,
    .arcade-hero h1,
    .battle-lobby h1,
    .training-hero-copy h1 {
        font-size: 42px;
    }

    .section-page-title {
        margin: 20px 2px 16px;
        font-size: 30px;
    }

    .paper-card,
    .analyzer-card,
    .path-sidebar .paper-card,
    .legal-page section,
    .account-page-card,
    .deletion-form-card,
    .comparison-card,
    .comparison-choice,
    .comparison-related article,
    .comparison-quick-answer,
    .comparison-table-wrap,
    .comparison-disclosure,
    .comparison-together,
    .comparison-sources,
    .comparison-cta {
        border-radius: var(--radius-card-mobile);
    }

    body:is(.view-home, .view-progress) {
        padding-bottom: calc(84px + env(safe-area-inset-bottom));
    }

    .progress-share-sticky {
        position: static;
        width: calc(100% - 20px);
        margin: 18px auto 8px;
        transform: none;
    }

    .progress-share-sticky .button {
        min-height: 45px;
        padding: 10px 8px;
        font-size: 14px;
    }

    body.view-home .maker-credit {
        bottom: calc(92px + env(safe-area-inset-bottom));
    }
}

@media (max-width: 350px) {
    body.view-home .wordmark span {
        display: none;
    }
}

/* Readable product type scale: keep compact text consistent after the Quicksand reframe. */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

:root {
    --type-caption: 12px;
    --type-supporting: 13px;
    --type-control: 14px;
}

.eyebrow,
.hero-brand,
.field > span,
.account-form label > span,
.deletion-form-card label > span,
.puzzle-tools label span {
    font-size: var(--type-caption);
    line-height: 1.35;
}

.home-hub-tabs small,
.home-hub-tabs a > span,
.footer-column-title,
.footer-column a,
.footer-meta,
.back-link,
.comparison-site .site-header nav a,
.legal-site .site-header nav a,
.account-deletion-site .site-header nav a {
    font-size: var(--type-caption);
}

/* Progress account, milestone, activity, appearance, and achievement metadata. */
.progress-identity small,
.progress-identity span,
.progress-level-runway footer,
.progress-rhythm-head > button,
.progress-heatmap-axis,
.progress-rhythm-stats span,
.progress-domain-row strong,
.progress-activity-card > header > .progress-activity-period,
.progress-activity-card .progress-activity-total > span,
.progress-activity-card .progress-activity-total > small,
.progress-activity-card .progress-activity-key,
.progress-activity-card .progress-activity-key b,
.progress-activity-card .progress-activity-link-arrow,
.progress-appearance-controls legend,
.progress-theme-options strong,
.progress-appearance-status,
.progress-domains-total > small,
.progress-trophy-copy small {
    font-size: var(--type-caption);
    line-height: 1.4;
}

.progress-account-action,
.progress-username-form button {
    min-height: 36px;
    padding: 8px 11px;
    font-size: var(--type-supporting);
}

.progress-identity:has(.progress-username-form:not([hidden])) {
    grid-template-columns: 52px minmax(0, 1fr) auto;
    align-items: start;
}

.progress-identity:has(.progress-username-form:not([hidden])) .progress-avatar-control {
    grid-row: 1 / span 2;
}

.progress-identity:has(.progress-username-form:not([hidden])) .progress-identity-copy,
.progress-identity:has(.progress-username-form:not([hidden])) .progress-profile-meta,
.progress-identity:has(.progress-username-form:not([hidden])) #progress-member-identity {
    display: contents;
}

.progress-identity:has(.progress-username-form:not([hidden])) .progress-access-tier {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
}

.progress-identity:has(.progress-username-form:not([hidden])) .progress-username-display {
    display: none;
}

.progress-identity:has(.progress-username-form:not([hidden])) .progress-username-form {
    display: grid;
    grid-column: 2 / -1;
    grid-row: 2;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 6px;
    margin-top: 4px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: min(13px, var(--radius-limit, 14px));
    background: rgba(255, 253, 250, .74);
    box-shadow: inset 0 1px 3px rgba(52, 43, 36, .06);
}

.progress-identity:has(.progress-username-form:not([hidden])) .progress-username-form input,
.progress-identity:has(.progress-username-form:not([hidden])) .progress-username-form button {
    min-height: 38px;
}

.progress-identity:has(.progress-username-form:not([hidden])) .progress-username-form input {
    height: 38px;
    padding: 7px 10px;
    font-size: 13px;
}

.progress-identity:has(.progress-username-form:not([hidden])) .progress-username-form button {
    padding: 7px 11px;
    border: 1px solid var(--button-edge);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 850;
}

.progress-identity:has(.progress-username-form:not([hidden])) .progress-username-form button[type="submit"] {
    border-color: var(--accent-deep);
    background: var(--accent);
    box-shadow: 0 3px 0 var(--accent-deep);
    color: #fff;
}

.progress-identity:has(.progress-username-form:not([hidden])) .progress-username-form button[type="submit"]:active {
    box-shadow: 0 1px 0 var(--accent-deep);
    translate: 0 2px;
}

.progress-username-cancel {
    background: var(--surface);
    color: var(--ink-soft);
}

.progress-username-cancel[hidden] {
    display: none;
}

.progress-identity:has(.progress-username-form:not([hidden])) .progress-account-controls {
    grid-column: 3;
    grid-row: 1;
}

.progress-identity:has(.progress-username-form:not([hidden])) .progress-username-message {
    grid-column: 2 / -1;
    grid-row: 3;
    margin-top: 0;
    white-space: normal;
}

@media (max-width: 350px) {
    .progress-identity:has(.progress-username-form:not([hidden])) .progress-username-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .progress-identity:has(.progress-username-form:not([hidden])) .progress-username-form input {
        grid-column: 1 / -1;
    }

    .progress-identity:has(.progress-username-form:not([hidden])) .progress-username-form:has(.progress-username-cancel[hidden]) button[type="submit"] {
        grid-column: 1 / -1;
    }
}

.progress-level-runway footer {
    align-items: baseline;
}

.progress-appearance-heading > p:last-child,
.progress-trophy-copy strong {
    font-size: var(--type-supporting);
    line-height: 1.4;
}

/* Puzzle library and workout controls. */
#library-count-label,
.puzzle-reward-filter-label,
.puzzle-tools-toggle span,
.quick-puzzle-tag,
.puzzle-page-summary,
.puzzle-page-controls button,
.puzzle-workout-launch-head,
.puzzle-workout-launch-head strong,
.puzzle-workout-resume,
.puzzle-workout-bar > div:first-child span,
.puzzle-workout-progress > span {
    font-size: var(--type-caption);
    line-height: 1.4;
}

.puzzle-branches small,
.puzzle-branches strong,
.game-library.quick-library .quick-puzzle .quick-puzzle-tag,
.puzzle-tools-toggle small,
.puzzle-tools-toggle .puzzle-tools-toggle-state,
.puzzle-workout-durations button small {
    font-size: var(--type-caption);
    line-height: 1.35;
}

.puzzle-tools .surprise-button,
.library-note,
.puzzle-workout-setup-copy > p:last-child {
    font-size: var(--type-supporting);
    line-height: 1.5;
}

.puzzle-tools-toggle strong {
    font-size: var(--type-supporting);
}

/* Route-specific supporting text that previously fell below the shared scale. */
.path-map small,
.path-leaderboard-note,
.path-rules small,
.coach-proof span,
#coach-plan-badge,
#coach-billing-note,
.arcade-page .eyebrow,
.arcade-game-card > div:not(.arcade-card-foot) > p.eyebrow,
.arcade-card-foot > span,
.battle-page .eyebrow,
.battle-record,
.deletion-form-card label > span,
.deletion-help,
.account-page-copy,
.account-form label small {
    font-size: var(--type-caption);
    line-height: 1.45;
}

.deletion-help,
.account-page-copy {
    font-size: var(--type-supporting);
}

.deletion-help,
.deletion-help a {
    font-size: var(--type-supporting) !important;
}

/* Comparison cards use the same label, support, and action hierarchy. */
.comparison-card-names,
.comparison-card dt,
.comparison-card-names i {
    font-size: var(--type-caption);
    line-height: 1.35;
}

.comparison-card dd,
.comparison-card > p,
.comparison-method span,
.comparison-directory > header > p,
.comparison-read,
.comparison-disclosure p {
    font-size: var(--type-supporting);
    line-height: 1.5;
}

.comparison-breadcrumbs,
.comparison-disclosure strong {
    font-size: var(--type-caption);
    line-height: 1.4;
}

@media (max-width: 620px) {
    .progress-identity {
        row-gap: 8px;
    }

    .progress-identity:has(.progress-username-form:not([hidden])) {
        grid-template-columns: 42px minmax(0, 1fr) auto;
    }

    .progress-level-runway footer {
        flex-wrap: wrap;
        row-gap: 3px;
    }

    .progress-rhythm-stats span {
        padding-block: 11px;
    }

    .progress-domain-row > div {
        align-items: center;
    }

    .comparison-card dl div {
        min-height: 0;
    }
}

/* Keep the fuller destination name on desktop and use the compact action label in the mobile dock. */
@media (max-width: 760px) {
    .home-hub-tabs [data-mobile-label] {
        font-size: 0 !important;
    }

    .home-hub-tabs [data-mobile-label]::after {
        content: attr(data-mobile-label);
    }

    .home-hub-tabs a > span:not([data-mobile-label]),
    .home-hub-tabs [data-mobile-label]::after {
        font-size: 9px;
    }
}

@media (max-width: 480px) {
    .home-hub-tabs a > span:not([data-mobile-label]),
    .home-hub-tabs [data-mobile-label]::after {
        font-size: 10px;
    }
}

@media (max-width: 360px) {
    .home-hub-tabs a > span:not([data-mobile-label]),
    .home-hub-tabs [data-mobile-label]::after {
        font-size: 8px;
    }
}

/* The Progress profile is a welcoming identity card, not a utility toolbar. */
.progress-profile-overview .progress-identity {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    min-height: 116px;
    padding: 18px;
    overflow: hidden;
    border: 1px solid #d9cec4;
    border-radius: var(--radius-limit, 14px);
    background:
        radial-gradient(circle at 100% 0, rgba(244, 177, 163, .34), transparent 42%),
        linear-gradient(145deg, #fffdfa 0%, #f8f1e9 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .95),
        0 5px 0 #cfc2b7,
        0 14px 30px rgba(64, 48, 40, .1);
}

.progress-profile-overview .progress-identity::before {
    position: absolute;
    z-index: -1;
    top: 0;
    right: 22px;
    left: 22px;
    height: 3px;
    border-radius: 0 0 999px 999px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    content: "";
    opacity: .75;
}

.progress-profile-overview .progress-avatar-control {
    width: 62px;
    height: 62px;
}

.progress-profile-overview .progress-avatar {
    border: 3px solid rgba(255, 255, 255, .86);
    background: linear-gradient(145deg, var(--accent), #f7c0b5);
    box-shadow:
        0 0 0 1px rgba(146, 75, 60, .16),
        0 7px 16px rgba(118, 66, 53, .18);
}

.progress-profile-overview .progress-identity #progress-avatar-fallback {
    color: #fff;
    font: 800 30px/1 var(--display);
    text-shadow: 0 1px 1px rgba(91, 44, 35, .18);
}

.progress-profile-overview .progress-avatar-upload {
    right: -2px;
    bottom: -2px;
    width: 24px;
    height: 24px;
    border: 3px solid var(--surface);
    background: var(--ink);
    box-shadow: 0 3px 7px rgba(34, 35, 31, .22);
    font-size: 14px;
}

.progress-profile-overview .progress-identity-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
}

.progress-profile-meta {
    display: flex;
    min-width: 0;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 9px;
}

.progress-identity .progress-access-tier {
    margin: 0;
    padding: 4px 8px;
    border-color: rgba(143, 112, 98, .2);
    background: rgba(255, 255, 255, .66);
    color: var(--accent-ink);
    font-size: 9px;
    line-height: 1.2;
}

.progress-profile-overview .progress-username-display {
    gap: 7px;
}

.progress-profile-overview .progress-username-display strong,
.progress-guest-identity strong {
    display: block;
    margin: 0;
    color: var(--ink);
    font: 850 19px/1.15 var(--display);
    letter-spacing: -.025em;
}

.progress-profile-overview .progress-username-edit {
    width: 27px;
    height: 27px;
    flex-basis: 27px;
    border: 1px solid rgba(137, 111, 98, .16);
    border-radius: 8px;
    background: rgba(255, 255, 255, .66);
}

.progress-profile-overview .progress-username-edit svg {
    width: 12px;
    height: 12px;
}

.progress-guest-identity {
    min-width: 0;
}

.progress-guest-identity[hidden] {
    display: none;
}

.progress-guest-identity span {
    margin-top: 4px;
    color: var(--ink-soft);
    font-size: 10px;
    line-height: 1.35;
}

.progress-guest-identity strong {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
}

.progress-profile-overview .progress-guest-signin {
    grid-column: 1 / -1;
    display: flex;
    width: 100%;
    min-height: 56px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 1px;
    padding: 10px 13px 10px 15px;
    border-color: #a84332;
    border-radius: var(--radius-limit, 14px);
    background: linear-gradient(180deg, #ed745f 0%, var(--accent) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .34),
        0 4px 0 #a84332,
        0 9px 17px rgba(142, 68, 53, .18);
    color: #fff;
    text-align: left;
}

.progress-profile-overview .progress-guest-signin[hidden] {
    display: none;
}

.progress-profile-overview .progress-guest-signin > span {
    min-width: 0;
}

.progress-profile-overview .progress-guest-signin strong,
.progress-profile-overview .progress-guest-signin small {
    display: block;
}

.progress-profile-overview .progress-guest-signin strong {
    font-size: 13px;
    line-height: 1.25;
}

.progress-profile-overview .progress-guest-signin small {
    margin-top: 2px;
    color: rgba(255, 255, 255, .82);
    font-size: 9px;
    font-weight: 650;
    line-height: 1.3;
}

.progress-profile-overview .progress-guest-signin svg {
    width: 22px;
    height: 22px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.progress-profile-overview .progress-account-action {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    gap: 6px;
    padding: 7px 9px;
    border-color: rgba(117, 96, 85, .2);
    border-radius: 10px;
    background: rgba(255, 255, 255, .58);
    color: var(--ink-soft);
}

.progress-profile-overview .progress-account-action:hover,
.progress-profile-overview .progress-account-action:focus-visible {
    border-color: rgba(168, 67, 50, .3);
    background: var(--accent-pale);
    color: var(--accent-ink);
}

.progress-profile-overview .progress-account-action svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.progress-profile-overview .progress-identity:has(.progress-username-form:not([hidden])) {
    grid-template-columns: 62px minmax(0, 1fr) auto;
    align-items: start;
}

.progress-profile-overview .progress-identity:has(.progress-username-form:not([hidden])) .progress-profile-meta {
    grid-column: 2;
    align-self: center;
}

@media (min-width: 901px) {
    .progress-overview-row {
        grid-template-columns: minmax(340px, .65fr) minmax(0, 1.35fr);
    }
}

@media (max-width: 620px) {
    .progress-profile-overview .progress-identity,
    .progress-profile-overview .progress-identity:has(.progress-username-form:not([hidden])) {
        grid-template-columns: 54px minmax(0, 1fr) auto;
        gap: 12px;
        min-height: 106px;
        padding: 16px;
        border-radius: var(--radius-limit, 14px);
    }

    .progress-profile-overview .progress-avatar-control {
        width: 54px;
        height: 54px;
    }

    .progress-profile-overview .progress-identity #progress-avatar-fallback {
        font-size: 27px;
    }

    .progress-profile-overview .progress-username-display strong,
    .progress-guest-identity strong {
        font-size: 17px;
    }

    .progress-profile-overview .progress-account-action span {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }

    .progress-profile-overview .progress-account-action {
        width: 34px;
        justify-content: center;
        padding: 7px;
    }

    .progress-profile-overview .progress-identity:has(.progress-username-form:not([hidden])) .progress-username-form,
    .progress-profile-overview .progress-identity:has(.progress-username-form:not([hidden])) .progress-username-message {
        grid-column: 1 / -1;
    }
}

@media (max-width: 350px) {
    .progress-profile-overview .progress-identity,
    .progress-profile-overview .progress-identity:has(.progress-username-form:not([hidden])) {
        grid-template-columns: 48px minmax(0, 1fr) auto;
        gap: 10px;
        padding: 14px;
    }

    .progress-profile-overview .progress-avatar-control {
        width: 48px;
        height: 48px;
    }

    .progress-guest-identity span {
        white-space: normal;
    }
}

/* Keep decorative and status artwork in the shared 3D clay visual language. */
.game-library.quick-library .quick-puzzle .quick-puzzle-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.quick-puzzle-tag-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    object-fit: contain;
    filter: drop-shadow(0 2px 2px rgba(52, 43, 36, .16));
}

.puzzle-tools .surprise-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.puzzle-tools .surprise-button img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    filter: drop-shadow(0 3px 3px rgba(52, 43, 36, .14));
}

.clay-state-art {
    display: block;
    width: 92px;
    height: 92px;
    margin: 0 auto 10px;
    object-fit: contain;
    filter: drop-shadow(0 9px 10px rgba(52, 43, 36, .16));
}

.loader-board-art {
    position: relative;
    z-index: 2;
    width: 72px;
    height: 72px;
    object-fit: contain;
    filter: drop-shadow(0 5px 5px rgba(52, 43, 36, .2));
    animation: knight-think 1.3s ease-in-out infinite;
}

.account-signed-in .account-check {
    overflow: visible;
    background: transparent;
}

.account-check img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    filter: drop-shadow(0 5px 6px rgba(38, 120, 68, .18));
}

.path-world-trophy-art,
.path-world-gate-art,
.path-leaderboard-icon,
.path-leaderboard-lock-art,
.path-leaderboard-score img,
.path-rules img {
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 4px 4px rgba(87, 62, 35, .16));
}

.path-world-trophy-art {
    width: 34px;
    height: 34px;
}

.path-world-gate-art {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
}

.path-leaderboard-icon {
    width: 46px;
    height: 46px;
}

.path-rules > p:not(.eyebrow) {
    display: grid;
    gap: 8px;
    line-height: 1.4;
}

.path-rules > p:not(.eyebrow) > span,
.path-leaderboard-score,
.path-leaderboard-guest-lock {
    display: inline-flex;
    align-items: center;
}

.path-rules > p:not(.eyebrow) > span {
    gap: 8px;
}

.path-rules img {
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
}

.path-leaderboard-score {
    justify-content: flex-end;
    gap: 4px;
}

.path-leaderboard-score img {
    width: 18px;
    height: 18px;
}

.path-leaderboard-guest-lock {
    justify-content: center;
    gap: 7px;
}

.path-leaderboard li.path-leaderboard-guest-lock {
    display: block;
    padding: 12px 0;
}

.path-leaderboard-guest-lock .button {
    display: inline-flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 7px;
    white-space: nowrap;
}

.path-leaderboard-lock-art {
    width: 26px;
    height: 26px;
}

.comparison-together > div:first-child img {
    width: 76px;
    height: 76px;
    object-fit: contain;
    filter: drop-shadow(0 8px 8px rgba(52, 43, 36, .17));
}

.comparison-not-found > .clay-state-art {
    width: 104px;
    height: 104px;
}

@media (max-width: 900px) and (min-width: 621px) {
    .hero::after,
    .directory-hero::after {
        width: 240px;
        height: 240px;
    }
}

@media (max-width: 620px) {
    .quick-puzzle-tag-icon {
        width: 16px;
        height: 16px;
        flex-basis: 16px;
    }

    .comparison-together > div:first-child img {
        width: 58px;
        height: 58px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .loader-board-art {
        animation: none;
    }
}

/* Pair the featured board with the complete puzzle launcher. */
body.view-puzzles .analyzer-wrap {
    padding-bottom: 25px;
}

.puzzle-library-title {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.puzzle-library-intro {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: clamp(24px, 3vw, 38px);
    margin-bottom: 20px;
    padding: 26px 8px 30px;
    border-bottom: 1px solid var(--line);
}

.puzzle-library-intro:has(.mobile-puzzle-launch[hidden]) {
    grid-template-columns: minmax(0, 1fr);
}

.puzzle-library-intro:has(.mobile-puzzle-launch[hidden]) .puzzle-library-chooser {
    width: min(100%, 720px);
    margin-inline: auto;
}

.puzzle-library-chooser {
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--line-hi);
    border-radius: var(--radius-card);
    background:
        radial-gradient(circle at 100% 0, rgba(234, 118, 95, .12), transparent 38%),
        linear-gradient(150deg, #fffdfa, #f8f2eb);
    box-shadow: 0 14px 34px rgba(52, 43, 36, .1);
}

.puzzle-library-chooser-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 14px;
}

.puzzle-library-chooser-heading h2 {
    margin: 0;
    font: 700 clamp(24px, 2.4vw, 31px)/1.05 var(--display);
    letter-spacing: -.025em;
}

.puzzle-library-chooser .puzzle-branches {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}

.puzzle-library-chooser .puzzle-branches button,
.puzzle-library-chooser .puzzle-branches button:nth-child(n) {
    min-height: 60px;
}

.puzzle-library-chooser .puzzle-branches strong {
    font-size: 13px;
}

.puzzle-library-chooser .puzzle-branches small {
    font-size: 9.5px;
}

.puzzle-library-chooser .puzzle-reward-filters {
    flex-wrap: wrap;
    margin: 0;
    padding: 7px 8px 9px;
    border: 1px solid rgba(52, 43, 36, .09);
    border-radius: var(--radius-limit, 14px);
    background: rgba(255, 253, 250, .64);
}

.puzzle-library-chooser .puzzle-reward-filter {
    width: 38px;
    height: 36px;
}

.puzzle-first-paint { cursor: wait; }

.puzzle-library-chooser .puzzle-branches .puzzle-first-paint {
    min-width: 0;
    height: 60px;
}

.puzzle-first-paint-board {
    display: block;
    aspect-ratio: 1;
    background: linear-gradient(110deg, #eee8df 30%, #f9f5ef 48%, #eee8df 66%);
    background-size: 250% 100%;
    animation: puzzle-first-paint-shimmer 1.2s linear infinite;
}

.puzzle-first-paint .quick-puzzle-tag,
.puzzle-first-paint.puzzle-reward-filter,
.puzzle-branches .puzzle-first-paint { opacity: .68; }

@keyframes puzzle-first-paint-shimmer { to { background-position: -250% 0; } }

@media (prefers-reduced-motion: reduce) {
    .puzzle-first-paint-board { animation: none; }
}

.puzzle-library-chooser .puzzle-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin: 0;
    padding: 12px;
}

.puzzle-library-chooser .puzzle-tools label:first-child {
    grid-column: auto;
}

.puzzle-library-chooser .puzzle-tools .surprise-button {
    grid-column: auto;
    min-width: 0;
}

.puzzle-library-access-note {
    margin: 0;
    padding-inline: 3px;
    font-size: 10px;
    line-height: 1.35;
    text-align: center;
}

.mobile-puzzle-launch {
    display: grid;
    justify-items: center;
    gap: 12px;
    width: min(100%, 440px);
    margin-inline: auto;
}

.mobile-puzzle-launch[hidden] {
    display: none;
}

.mobile-puzzle-preview {
    position: relative;
    display: block;
    width: 100%;
    padding: 8px;
    border: 1px solid var(--line-hi);
    border-radius: var(--radius-limit, 14px);
    background: var(--sheet);
    box-shadow: 0 16px 38px rgba(52, 43, 36, .15);
    color: var(--ink);
    cursor: pointer;
    touch-action: manipulation;
}

.mobile-puzzle-preview:hover,
.mobile-puzzle-preview:focus-visible {
    border-color: var(--accent);
    outline: 3px solid rgba(234, 118, 95, .2);
    outline-offset: 2px;
}

.mobile-puzzle-preview-board {
    width: 100%;
    overflow: hidden;
    border-radius: min(11px, var(--radius-limit, 14px));
    pointer-events: none;
}

.mobile-puzzle-preview-board .coord {
    display: none;
}

.mobile-puzzle-turn {
    position: absolute;
    left: 50%;
    bottom: 7px;
    padding: 6px 10px;
    border: 1px solid rgba(52, 43, 36, .15);
    border-radius: 999px;
    background: rgba(255, 253, 250, .9);
    box-shadow: 0 4px 12px rgba(52, 43, 36, .13);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    transform: translateX(-50%);
    backdrop-filter: blur(5px);
}

.mobile-puzzle-start {
    width: 100%;
    min-height: 50px;
    font-size: 14px;
}

@media (max-width: 900px) {
    .puzzle-library-intro {
        grid-template-columns: minmax(0, 1fr);
    }

    .puzzle-library-chooser {
        width: min(100%, 620px);
        margin-inline: auto;
    }
}

@media (max-width: 720px) {
    body.view-puzzles .game-library { margin-right: -10px; }

    body.view-puzzles .workout-directory-hero {
        margin-block: 29px 20px;
        padding-block: 42px 26px;
    }

    .puzzle-library-intro {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
        margin-bottom: 18px;
        padding: 14px 0 24px;
    }

    .puzzle-library-chooser {
        gap: 11px;
        padding: 14px;
    }

    .puzzle-library-chooser-heading h2 {
        font-size: clamp(23px, 7vw, 28px);
    }

    .puzzle-library-chooser .puzzle-tools-toggle {
        margin: 0;
    }

    .puzzle-library-chooser .puzzle-tools {
        margin-top: -1px;
    }

    .puzzle-library-chooser .puzzle-reward-filter-label {
        position: static;
        width: auto;
        height: auto;
        flex-basis: 100%;
        overflow: visible;
        clip-path: none;
        text-align: center;
        white-space: normal;
    }

    .mobile-puzzle-launch {
        gap: 10px;
        width: min(100%, 318px);
    }

    .mobile-puzzle-preview {
        padding: 7px;
        border-radius: var(--radius-limit, 14px);
    }

    .mobile-puzzle-turn {
        bottom: 7px;
        padding: 5px 9px;
        font-size: 10px;
    }

    .mobile-puzzle-start {
        min-height: 48px;
    }
}

@media (max-width: 360px) {
    body.view-puzzles .analyzer-card {
        padding-inline: 10px;
    }

    .puzzle-library-intro {
        margin-inline: -4px;
    }

    .puzzle-library-chooser {
        padding: 11px;
    }

    .puzzle-library-chooser .puzzle-branches strong {
        font-size: 11.5px;
    }

    .puzzle-library-chooser .puzzle-branches small {
        font-size: 9px;
    }

    .puzzle-library-chooser .puzzle-branches button,
    .puzzle-library-chooser .puzzle-branches button:nth-child(n) {
        padding-inline: 5px;
    }

    .mobile-puzzle-preview {
        padding: 5px;
    }
}

@media (min-width: 621px) {
    body .home-hub-tabs-wrap.home-hub-tabs-wrap {
        width: min(980px, calc(100% - 40px));
    }
}

/* Mobile groups the learning destinations into five equal dock buttons. */
.mobile-hub-nav {
    display: none;
}

@media (max-width: 620px) {
    .home-hub-tabs {
        display: none;
    }

    body .home-hub-tabs-wrap.home-hub-tabs-wrap {
        bottom: max(2px, env(safe-area-inset-bottom));
        width: auto;
    }

    .mobile-hub-nav {
        position: relative;
        display: block;
    }

    .mobile-hub-surface {
        position: absolute;
        inset: 0;
        border: 1px solid rgba(207, 197, 188, .94);
        border-radius: var(--radius-limit, 14px) var(--radius-limit, 14px) min(12px, var(--radius-limit, 14px)) min(12px, var(--radius-limit, 14px));
        background: rgba(255, 253, 250, .96);
        box-shadow: 0 16px 42px rgba(52, 43, 36, .22), inset 0 1px rgba(255, 255, 255, .92);
        pointer-events: none;
        backdrop-filter: blur(18px) saturate(1.25);
    }

    .mobile-hub-tabs {
        position: relative;
        isolation: isolate;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        align-items: end;
        gap: 2px;
        padding: 3px 5px 5px;
        overflow: visible;
        border: 0;
        background: transparent;
    }

    .mobile-hub-tabs > * {
        position: relative;
        z-index: 2;
    }

    .mobile-hub-tab {
        display: grid;
        grid-template-rows: 34px 12px;
        row-gap: 1px;
        align-content: center;
        align-items: center;
        justify-items: center;
        min-width: 0;
        height: 50px;
        min-height: 50px;
        padding: 0 1px;
        border: 1px solid transparent;
        border-radius: min(13px, var(--radius-limit, 14px));
        background: transparent;
        color: var(--muted);
        font: inherit;
        text-decoration: none;
        cursor: pointer;
        transition: background .16s ease, border-color .16s ease, box-shadow .14s ease, color .16s ease, translate .14s ease;
    }

    .mobile-hub-tab img {
        display: block;
        width: 36px;
        height: 36px;
        object-fit: contain;
    }

    .mobile-hub-tab > span {
        max-width: 100%;
        overflow: hidden;
        font-size: 11px;
        font-weight: 850;
        line-height: 1;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-hub-tab:hover,
    .mobile-hub-tab:focus-visible,
    .mobile-hub-tab[aria-expanded="true"] {
        border-color: #d9cec5;
        background: #fffaf5;
        color: var(--ink);
        outline: 0;
    }

    .mobile-hub-tab:focus-visible {
        outline: 3px solid rgba(234, 118, 95, .26);
        outline-offset: 2px;
    }

    .mobile-hub-tab.is-current {
        border-color: #b94d39;
        background: var(--accent);
        box-shadow: inset 0 1px rgba(255, 255, 255, .62), 0 4px 0 #b94d39, 0 9px 16px rgba(185, 77, 57, .24);
        color: var(--ink);
        translate: 0 -3px;
    }

    .mobile-hub-tab:active,
    .mobile-hub-tab.is-current:active {
        box-shadow: inset 0 2px 3px rgba(52, 43, 36, .14), 0 1px 0 #b94d39, 0 4px 8px rgba(52, 43, 36, .12);
        translate: 0 -1px;
    }

    .mobile-hub-tab-puzzle {
        width: 100%;
        border-color: var(--green-dark);
        background: var(--green);
        box-shadow: inset 0 1px rgba(255, 255, 255, .38), 0 4px 0 var(--green-dark), 0 9px 16px rgba(38, 120, 68, .24);
        color: white;
        translate: none;
    }

    .mobile-hub-tab-puzzle.is-current {
        border-color: #b94d39;
        background: linear-gradient(180deg, #f89076 0%, var(--accent) 55%, #d85f49 100%);
        box-shadow: inset 0 1px rgba(255, 255, 255, .55), 0 4px 0 #b94d39, 0 9px 16px rgba(185, 77, 57, .24);
        color: var(--ink);
        translate: 0 -3px;
    }

    .mobile-hub-tab-puzzle:not(.is-current):hover,
    .mobile-hub-tab-puzzle:not(.is-current):focus-visible {
        border-color: var(--green-dark);
        background: linear-gradient(180deg, #318a50, var(--green));
        color: white;
    }

    .mobile-hub-tab-puzzle:focus-visible {
        outline: 3px solid rgba(38, 120, 68, .28);
        outline-offset: 2px;
    }

    .mobile-hub-tab-puzzle.is-current:focus-visible {
        outline-color: rgba(234, 118, 95, .3);
    }

    .mobile-hub-tab-puzzle:active {
        border-color: var(--green-dark);
        background: #1f6b3b;
        box-shadow: inset 0 2px 3px rgba(20, 73, 40, .2), 0 1px 0 var(--green-dark), 0 4px 8px rgba(31, 96, 55, .12);
        color: white;
        translate: 0 -1px;
    }

    .mobile-hub-tab-puzzle.is-current:active {
        border-color: #a74331;
        background: linear-gradient(180deg, var(--accent), #cf563f);
        box-shadow: inset 0 2px 3px rgba(111, 46, 35, .18), 0 1px 0 #a74331, 0 4px 8px rgba(111, 46, 35, .14);
        color: var(--ink);
        translate: 0 -1px;
    }

    .mobile-menu-cluster {
        position: relative;
        align-self: end;
        height: 50px;
        min-width: 0;
    }

    .mobile-menu-trigger {
        width: 100%;
    }

    .mobile-menu-trigger img {
        width: 38px;
        height: 38px;
        margin-top: -1px;
    }

    .mobile-menu-trigger[aria-expanded="true"] {
        border-color: #d89a8d;
        background: #fff0ea;
        box-shadow: inset 0 1px rgba(255, 255, 255, .72), 0 3px 0 #d89a8d, 0 8px 15px rgba(185, 77, 57, .18);
        color: var(--ink);
    }

    .mobile-menu-expander {
        position: absolute;
        z-index: 5;
        right: 0;
        bottom: calc(100% + 6px);
        display: grid;
        width: 100%;
        gap: 5px;
    }

    .mobile-menu-trigger.is-current + .mobile-menu-expander {
        bottom: calc(100% + 11px);
    }

    .mobile-menu-expander[hidden] {
        display: none;
    }

    .mobile-menu-expander > a {
        position: relative;
        display: grid;
        grid-template-rows: 34px 12px;
        row-gap: 1px;
        align-content: center;
        align-items: center;
        justify-items: center;
        width: 100%;
        height: 50px;
        padding: 0 1px;
        border: 1px solid #d6cbc2;
        border-radius: min(13px, var(--radius-limit, 14px));
        background: rgba(255, 253, 250, .985);
        box-shadow: inset 0 1px rgba(255, 255, 255, .94), 0 4px 0 #c8bdb3, 0 10px 22px rgba(52, 43, 36, .18);
        color: var(--muted);
        text-decoration: none;
        opacity: 0;
        transform: translate3d(0, 18px, 0) scale(.55);
        transform-origin: 50% 100%;
        backdrop-filter: blur(18px) saturate(1.2);
        will-change: transform, opacity, filter;
    }

    .mobile-menu-expander > a img {
        width: 36px;
        height: 36px;
        object-fit: contain;
    }

    .mobile-menu-expander > a > span:not(.mobile-menu-selected-arrow) {
        max-width: 100%;
        overflow: hidden;
        font-size: 11px;
        font-weight: 850;
        line-height: 1;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-menu-cluster.is-open .mobile-menu-expander > a {
        animation: mobile-play-tile-expand .3s cubic-bezier(.2, .9, .24, 1.16) forwards;
    }

    .mobile-menu-cluster.is-open .mobile-menu-expander > a:nth-child(4) {
        animation-delay: 0s;
    }

    .mobile-menu-cluster.is-open .mobile-menu-expander > a:nth-child(3) {
        animation-delay: .045s;
    }

    .mobile-menu-cluster.is-open .mobile-menu-expander > a:nth-child(2) {
        animation-delay: .09s;
    }

    .mobile-menu-cluster.is-open .mobile-menu-expander > a:nth-child(1) {
        animation-delay: .135s;
    }

    .mobile-menu-expander.is-closing > a {
        animation: mobile-play-tile-collapse .16s cubic-bezier(.4, 0, .8, .2) forwards;
    }

    .mobile-menu-expander.is-closing > a:nth-child(2) {
        animation-delay: .02s;
    }

    .mobile-menu-expander.is-closing > a:nth-child(3) {
        animation-delay: .04s;
    }

    .mobile-menu-expander.is-closing > a:nth-child(4) {
        animation-delay: .06s;
    }

    @keyframes mobile-play-tile-expand {
        0% {
            filter: blur(1.5px);
            opacity: 0;
            transform: translate3d(0, 18px, 0) scale(.55);
        }
        70% {
            filter: blur(0);
            opacity: 1;
            transform: translate3d(0, -2px, 0) scale(1.06);
        }
        100% {
            filter: blur(0);
            opacity: 1;
            transform: translate3d(0, 0, 0) scale(1);
        }
    }

    @keyframes mobile-play-tile-collapse {
        from {
            filter: blur(0);
            opacity: 1;
            transform: translate3d(0, 0, 0) scale(1);
        }
        to {
            filter: blur(1px);
            opacity: 0;
            transform: translate3d(0, 15px, 0) scale(.6);
        }
    }

    .mobile-menu-expander > a:hover,
    .mobile-menu-expander > a:focus-visible {
        border-color: #d9cec5;
        background: #fff7f0;
        outline: 0;
    }

    .mobile-menu-expander > a.active {
        border-color: #b94d39;
        background: var(--accent);
        box-shadow: inset 0 1px rgba(255, 255, 255, .62), 0 4px 0 #b94d39, 0 10px 22px rgba(185, 77, 57, .22);
        color: var(--ink);
    }

    .mobile-menu-selected-arrow {
        position: absolute;
        top: 3px;
        right: 4px;
        color: var(--accent-ink);
        font-size: 10px;
        font-weight: 900;
        opacity: 0;
    }

    .mobile-menu-expander > a.active .mobile-menu-selected-arrow {
        opacity: 1;
    }
}

@media (max-width: 360px) {
    .mobile-hub-tabs {
        gap: 0;
        padding-inline: 3px;
    }

    .mobile-hub-tab img {
        width: 34px;
        height: 34px;
    }

    .mobile-menu-trigger img {
        width: 36px;
        height: 36px;
    }

    .mobile-hub-tab > span,
    .mobile-menu-expander > a > span:not(.mobile-menu-selected-arrow) {
        font-size: 10.5px;
    }

    .mobile-menu-expander > a img {
        width: 34px;
        height: 34px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mobile-menu-cluster.is-open .mobile-menu-expander > a,
    .mobile-menu-expander.is-closing > a {
        animation-duration: .01ms;
        animation-delay: 0s;
    }
}

/* The signed-in avatar opens the same springy option stack used by Play. */
.site-header-actions {
    position: relative;
}

.nav-account-button.has-account-menu {
    width: 46px;
    min-width: 46px;
    min-height: 43px;
    padding: 5px;
    gap: 0;
    border-radius: 50%;
}

.nav-account-button.has-account-menu .nav-account-avatar {
    display: grid;
    flex-basis: 31px;
    width: 31px;
    height: 31px;
}

.nav-account-button.has-account-menu .nav-dna-value {
    display: none;
}

.account-menu {
    position: absolute;
    z-index: 260;
    top: calc(100% + 9px);
    right: 0;
    width: max-content;
    max-width: calc(100vw - 24px);
    max-height: min(540px, calc(100dvh - 100px));
    padding: 3px;
    overflow: auto;
    border: 0;
    border-radius: var(--radius-limit, 14px);
    background: transparent;
    box-shadow: none;
    overscroll-behavior: contain;
}

.account-menu[hidden] {
    display: none;
}

.account-menu-list {
    display: grid;
    gap: 5px;
}

.account-menu-list > a {
    display: grid;
    grid-template-columns: 27px minmax(0, 1fr) auto;
    align-items: center;
    justify-self: end;
    gap: 8px;
    width: min(218px, calc(100vw - 30px));
    min-height: 39px;
    padding: 5px 10px 5px 5px;
    border: 1px solid #d8cec5;
    border-radius: 999px;
    background: rgba(255, 253, 250, .985);
    box-shadow: inset 0 1px rgba(255, 255, 255, .96), 0 2px 0 #c8bdb3, 0 6px 13px rgba(52, 43, 36, .13);
    color: var(--ink);
    text-decoration: none;
    opacity: 0;
    transform: translate3d(0, -16px, 0) scale(.72);
    transform-origin: 100% 0;
    will-change: transform, opacity, filter;
}

.account-menu-list > a:hover,
.account-menu-list > a:focus-visible {
    border-color: #d98b7c;
    background: var(--accent-pale);
    outline: 0;
}

.account-menu-list > a:active {
    box-shadow: inset 0 2px 3px rgba(52, 43, 36, .14), 0 1px 0 #c8bdb3, 0 4px 8px rgba(52, 43, 36, .1);
    translate: 0 2px;
}

.account-menu-list > a > img,
.account-menu-profile-icon {
    display: grid;
    width: 27px;
    height: 27px;
    place-items: center;
    object-fit: contain;
}

.account-menu-list > a > img {
    filter: drop-shadow(0 3px 4px rgba(52, 43, 36, .13));
}

.account-menu-label {
    min-width: 0;
    overflow: hidden;
    color: #665c54;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-menu-list > a > strong {
    color: var(--ink);
    font-size: 12px;
    font-weight: 850;
    line-height: 1;
    text-align: right;
    white-space: nowrap;
}

.account-menu-list > .account-menu-profile {
    margin-top: 2px;
    border-color: #d98b7c;
    background: #fff0ea;
    box-shadow: inset 0 1px rgba(255, 255, 255, .94), 0 2px 0 #d98b7c, 0 6px 13px rgba(185, 77, 57, .13);
}

.account-menu-profile-icon {
    overflow: hidden;
    border: 1px solid rgba(34, 33, 31, .16);
    border-radius: 50%;
    background: #fffdfa;
    color: var(--accent-ink);
    font-size: 12px;
    font-weight: 850;
}

.account-menu-profile-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.account-menu.is-open .account-menu-list > a {
    animation: account-menu-tile-expand .3s cubic-bezier(.2, .9, .24, 1.16) forwards;
    animation-delay: calc(var(--account-menu-index) * 28ms);
}

.account-menu.is-closing .account-menu-list > a {
    animation: account-menu-tile-collapse .17s cubic-bezier(.4, 0, .8, .2) forwards;
    animation-delay: calc(var(--account-menu-reverse-index) * 12ms);
}

@keyframes account-menu-tile-expand {
    0% {
        filter: blur(1.5px);
        opacity: 0;
        transform: translate3d(0, -16px, 0) scale(.72);
    }
    70% {
        filter: blur(0);
        opacity: 1;
        transform: translate3d(0, 2px, 0) scale(1.025);
    }
    100% {
        filter: blur(0);
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

@keyframes account-menu-tile-collapse {
    from {
        filter: blur(0);
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
    to {
        filter: blur(1px);
        opacity: 0;
        transform: translate3d(0, -13px, 0) scale(.76);
    }
}

@media (max-width: 620px) {
    .nav-account-button.has-account-menu {
        width: 45px;
        min-width: 45px;
        padding: 5px;
    }

    .nav-account-button.has-account-menu .nav-account-avatar {
        display: grid;
    }

    .account-menu {
        right: -1px;
        width: max-content;
        max-width: calc(100vw - 20px);
        max-height: calc(100dvh - 82px);
        padding: 3px;
        border-radius: var(--radius-limit, 14px);
    }

    .account-menu-list {
        gap: 5px;
    }

    .account-menu-list > a {
        min-height: 39px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .account-menu.is-open .account-menu-list > a,
    .account-menu.is-closing .account-menu-list > a {
        animation-duration: .01ms;
        animation-delay: 0s;
    }
}

/* Immediate feedback while a primary page navigation waits on the network. */
.navigation-loader {
    position: fixed;
    z-index: 10000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(43, 38, 33, .42);
    backdrop-filter: blur(5px);
    animation: navigation-loader-in .14s ease-out both;
}

.navigation-loader[hidden] {
    display: none;
}

.navigation-loader-card {
    display: grid;
    justify-items: center;
    width: min(280px, calc(100vw - 40px));
    padding: 25px 24px 22px;
    border: 1px solid rgba(207, 197, 188, .96);
    border-radius: var(--radius-limit, 14px);
    background: var(--sheet, #fffdfa);
    box-shadow: 0 24px 70px rgba(35, 29, 24, .28), inset 0 1px rgba(255, 255, 255, .9);
    color: var(--ink, #25231f);
    text-align: center;
}

.navigation-loader-icon {
    position: relative;
    display: grid;
    width: 86px;
    height: 86px;
    margin-bottom: 13px;
    place-items: center;
}

.navigation-loader-icon::before {
    position: absolute;
    inset: 0;
    border: 4px solid #eadfd7;
    border-top-color: var(--accent, #ea765f);
    border-right-color: #078b74;
    border-radius: 50%;
    content: "";
    animation: navigation-loader-spin .8s linear infinite;
}

.navigation-loader-icon img {
    display: block;
    width: 68px;
    height: 68px;
    object-fit: contain;
}

.navigation-loader-card strong {
    font: 800 24px/1.1 var(--serif, Georgia, serif);
    letter-spacing: -.02em;
}

.navigation-loader-card > span:last-child {
    margin-top: 7px;
    color: var(--muted, #6f6962);
    font-size: 12px;
    font-weight: 650;
}

.is-navigation-loading,
.is-navigation-loading body {
    cursor: progress;
}

@keyframes navigation-loader-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes navigation-loader-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .navigation-loader,
    .navigation-loader-icon::before {
        animation-duration: .01ms;
        animation-iteration-count: 1;
    }
}

/* Daily training plan */
.daily-plan {
    display: grid;
    grid-template-columns: minmax(210px, .72fr) minmax(360px, 1.55fr);
    gap: 18px 28px;
    width: min(1180px, calc(100% - 24px));
    margin: 22px auto 28px;
    padding: 25px 27px 23px;
    overflow: hidden;
    border: 1px solid #cfc5bc;
    background:
        radial-gradient(circle at 8% 5%, rgba(234, 118, 95, .15), transparent 27%),
        radial-gradient(circle at 96% 92%, rgba(7, 139, 116, .1), transparent 31%),
        var(--sheet);
    box-shadow: 0 7px 0 #d8cec5, 0 18px 38px rgba(62, 48, 39, .1);
}

.view-progress .daily-plan {
    width: 100%;
    margin: 0 0 22px;
}

.daily-plan-header {
    display: flex;
    grid-column: 1 / -1;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.daily-plan-header .daily-plan-kicker,
.daily-plan-header h2,
.daily-plan-header p,
.daily-plan-focus p,
.daily-plan-footer p {
    margin: 0;
}

.daily-plan-kicker {
    color: var(--accent-ink);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.daily-plan-header h2 {
    margin-top: 4px;
    font: 800 clamp(28px, 3.2vw, 40px)/1 var(--display);
    letter-spacing: -.045em;
}

.daily-plan-header > div > p:last-child {
    margin-top: 7px;
    color: var(--muted);
    font-size: 13px;
}

.daily-plan-count {
    flex: 0 0 auto;
    padding: 8px 11px;
    border: 1px solid #e1b7ac;
    border-radius: 999px;
    background: #fff2ee;
    color: var(--accent-ink);
    font-size: 12px;
    font-weight: 850;
}

.daily-plan-focus {
    display: grid;
    grid-template-columns: 66px minmax(0, 1fr);
    align-content: start;
    align-items: center;
    gap: 13px;
    padding: 16px;
    border: 1px solid rgba(7, 139, 116, .2);
    border-radius: var(--radius-limit, 14px);
    background: rgba(241, 250, 247, .82);
}

.daily-plan-focus-art {
    display: grid;
    width: 66px;
    height: 66px;
    place-items: center;
    border-radius: var(--radius-limit, 14px);
    background: white;
    box-shadow: inset 0 0 0 1px rgba(7, 139, 116, .12), 0 5px 14px rgba(41, 83, 73, .1);
}

.daily-plan-focus-art img {
    display: block;
    width: 57px;
    height: 57px;
    object-fit: contain;
}

.daily-plan-focus small,
.daily-plan-focus strong {
    display: block;
}

.daily-plan-focus small {
    color: #087765;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.daily-plan-focus strong {
    margin-top: 3px;
    font: 800 21px/1.08 var(--display);
    letter-spacing: -.025em;
}

.daily-plan-focus p {
    grid-column: 1 / -1;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.daily-plan-steps {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.daily-plan-steps li {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    min-height: 59px;
    padding: 8px 11px;
    border: 1px solid var(--line);
    border-radius: min(12px, var(--radius-limit, 14px));
    background: rgba(255, 255, 255, .68);
}

.daily-plan-steps li > span {
    display: grid;
    width: 31px;
    height: 31px;
    place-items: center;
    border: 1px solid #d8cec5;
    border-radius: 10px;
    background: #f8f3ed;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.daily-plan-steps strong,
.daily-plan-steps small {
    display: block;
}

.daily-plan-steps strong {
    font-size: 13px;
}

.daily-plan-steps small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
}

.daily-plan-steps li > b {
    color: #a59a91;
    font-size: 10px;
    text-transform: uppercase;
}

.daily-plan-steps li.is-current {
    border-color: #e09a89;
    background: #fff5f1;
    box-shadow: inset 3px 0 var(--accent);
}

.daily-plan-steps li.is-current > span {
    border-color: var(--accent);
    background: var(--accent);
    color: white;
}

.daily-plan-steps li.is-current > b {
    color: var(--accent-ink);
}

.daily-plan-steps li.is-complete {
    border-color: rgba(7, 139, 116, .24);
    background: rgba(235, 249, 245, .72);
}

.daily-plan-steps li.is-complete > span {
    border-color: #078b74;
    background: #078b74;
    color: white;
}

.daily-plan-steps li.is-complete > b {
    color: #087765;
}

.daily-plan-footer {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: minmax(120px, 1fr) auto;
    align-items: center;
    gap: 9px 16px;
}

.daily-plan-progress {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e7ddd5;
    box-shadow: inset 0 1px 2px rgba(56, 42, 33, .12);
}

.daily-plan-progress i {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), #078b74);
    transition: width .35s ease;
}

.daily-plan-action {
    min-width: min(100%, 250px);
    justify-content: center;
    text-align: center;
}

.daily-plan-footer p {
    grid-column: 1;
    color: var(--muted);
    font-size: 10px;
}

.daily-plan.is-complete {
    border-color: rgba(7, 139, 116, .38);
}

.daily-plan.is-complete .daily-plan-count {
    border-color: rgba(7, 139, 116, .25);
    background: #eaf8f4;
    color: #087765;
}

@media (max-width: 760px) {
    .daily-plan {
        grid-template-columns: 1fr;
        gap: 13px;
        margin-top: 15px;
        padding: 18px;
        border-radius: var(--radius-limit, 14px);
        box-shadow: 0 5px 0 #d8cec5, 0 13px 28px rgba(62, 48, 39, .09);
    }

    .view-progress .daily-plan {
        margin-bottom: 18px;
    }

    .daily-plan-header {
        grid-column: 1;
        padding-bottom: 13px;
    }

    .daily-plan-header h2 {
        font-size: 29px;
    }

    .daily-plan-header > div > p:last-child {
        max-width: 250px;
        font-size: 11px;
        line-height: 1.4;
    }

    .daily-plan-focus {
        grid-template-columns: 54px minmax(0, 1fr);
        padding: 12px;
    }

    .daily-plan-focus-art {
        width: 54px;
        height: 54px;
        border-radius: var(--radius-limit, 14px);
    }

    .daily-plan-focus-art img {
        width: 48px;
        height: 48px;
    }

    .daily-plan-focus strong {
        font-size: 18px;
    }

    .daily-plan-footer {
        grid-template-columns: 1fr;
    }

    .daily-plan-action {
        grid-row: 1;
        width: 100%;
        min-width: 0;
    }

    .daily-plan-progress {
        grid-row: 2;
    }

    .daily-plan-footer p {
        grid-row: 3;
    }
}

@media (max-width: 360px) {
    .daily-plan {
        width: min(100% - 18px, 1180px);
        padding: 14px;
    }

    .view-progress .daily-plan {
        width: 100%;
    }

    .daily-plan-count {
        padding: 6px 8px;
        font-size: 10px;
    }

    .daily-plan-steps li {
        grid-template-columns: 30px minmax(0, 1fr) auto;
        gap: 8px;
        padding-inline: 8px;
    }

    .daily-plan-steps li > span {
        width: 28px;
        height: 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .daily-plan-progress i {
        transition: none;
    }
}

/* Fox-guided daily plan: progress lives with the guide; actions live in the speech bubble. */
.daily-plan.daily-plan {
    --daily-plan-progress: 0%;
    display: grid;
    grid-template-columns: 265px minmax(0, 1fr);
    align-items: center;
    gap: 12px 24px;
    width: min(1120px, calc(100% - 24px));
    margin: 0 auto;
    padding: 10px 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.view-progress .daily-plan.daily-plan {
    width: 100%;
    margin: 0;
}

.daily-plan-guide {
    position: relative;
    z-index: 2;
    align-self: center;
    min-width: 0;
}

.daily-plan-fox-orbit {
    position: relative;
    width: 245px;
    max-width: 100%;
    aspect-ratio: 1;
    margin: 0 auto;
    isolation: isolate;
}

.daily-plan-fox-orbit::before {
    content: "";
    position: absolute;
    z-index: 0;
    inset: 18px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 45% 42%, #fffaf0 0 50%, transparent 51%),
        conic-gradient(from -40deg, #ffddd3, #fff2c7 31%, #d9f2ec 64%, #eadff7 100%);
    box-shadow: 0 14px 34px rgba(74, 51, 38, .13);
}

.daily-plan-orbit-meter {
    position: absolute;
    z-index: 1;
    inset: 8px;
    border-radius: 50%;
    background: conic-gradient(from -90deg, #078b74 0 var(--daily-plan-progress), rgba(161, 143, 127, .24) var(--daily-plan-progress) 100%);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 calc(100% - 8px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 calc(100% - 8px));
    filter: drop-shadow(0 2px 3px rgba(7, 139, 116, .2));
    pointer-events: none;
    transition: background .35s ease;
}

.daily-plan-fox {
    position: absolute;
    z-index: 2;
    inset: 11px 7px 8px 2px;
    display: block;
    width: calc(100% - 9px);
    height: calc(100% - 19px);
    object-fit: contain;
    filter: drop-shadow(0 10px 8px rgba(68, 43, 27, .13));
}

.daily-plan-orbit-step {
    position: absolute;
    z-index: 3;
    display: grid;
    width: 31px;
    height: 31px;
    place-items: center;
    border: 3px solid #fffaf4;
    border-radius: 50%;
    background: #e9dfd5;
    box-shadow: 0 4px 10px rgba(66, 44, 31, .2);
    color: #7f7268;
    font-size: 11px;
    font-weight: 900;
    transition: transform .22s ease, background .22s ease;
}

.daily-plan-orbit-step.is-current {
    background: var(--accent);
    color: white;
    transform: scale(1.13);
}

.daily-plan-orbit-step.is-complete {
    background: #078b74;
    color: white;
}

.daily-plan-orbit-puzzle { top: 17px; right: 28px; }
.daily-plan-orbit-learn { right: 5px; bottom: 62px; }
.daily-plan-orbit-workout { bottom: 7px; left: 55px; }

.daily-plan-count.daily-plan-count {
    position: absolute;
    z-index: 3;
    right: 28px;
    bottom: 16px;
    padding: 7px 10px;
    border: 2px solid #fffaf4;
    background: #342c28;
    box-shadow: 0 4px 12px rgba(52, 44, 40, .2);
    color: white;
    font-size: 10px;
}

.daily-plan-focus.daily-plan-focus {
    position: relative;
    z-index: 4;
    display: grid;
    width: 235px;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    margin: -26px auto 0;
    padding: 9px 11px;
    border: 1px solid rgba(7, 139, 116, .25);
    border-radius: var(--radius-limit, 14px);
    background: rgba(249, 255, 252, .96);
    box-shadow: 0 8px 20px rgba(38, 77, 68, .14);
    backdrop-filter: blur(8px);
}

.daily-plan-focus .daily-plan-focus-art {
    width: 48px;
    height: 48px;
    border-radius: min(13px, var(--radius-limit, 14px));
}

.daily-plan-focus .daily-plan-focus-art img {
    width: 43px;
    height: 43px;
}

.daily-plan-focus .daily-plan-focus-art + div {
    min-width: 0;
}

.daily-plan-focus .daily-plan-focus-art + div > small {
    font-size: 11px;
    line-height: 1.2;
}

.daily-plan-focus .daily-plan-focus-art + div > strong {
    overflow: hidden;
    font-size: 20px;
    line-height: 1.12;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.daily-plan-focus.daily-plan-focus p {
    grid-column: 1 / -1;
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.daily-plan-bubble {
    position: relative;
    min-width: 0;
    padding: 20px;
    border: 1px solid #d7c8bb;
    border-radius: var(--radius-limit, 14px);
    background:
        radial-gradient(circle at 97% 0, rgba(255, 226, 177, .33), transparent 26%),
        linear-gradient(145deg, #fffefa, #fffaf4);
    box-shadow: 0 8px 0 #dfd1c4, 0 20px 42px rgba(67, 49, 37, .13);
}

.daily-plan-bubble::before,
.daily-plan-bubble::after {
    content: "";
    position: absolute;
    top: 91px;
    left: -22px;
    width: 0;
    height: 0;
    border-top: 17px solid transparent;
    border-right: 23px solid #d7c8bb;
    border-bottom: 17px solid transparent;
}

.daily-plan-bubble::after {
    top: 93px;
    left: -19px;
    border-top-width: 15px;
    border-right: 21px solid #fffdf8;
    border-bottom-width: 15px;
}

.daily-plan .daily-plan-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 0 15px;
    border-bottom: 0;
}

.daily-plan .daily-plan-header h2 {
    margin: 0;
    color: var(--accent-ink);
    font: 850 11px/1.2 var(--sans);
    letter-spacing: .08em;
    text-transform: uppercase;
}

.daily-plan .daily-plan-header > div > p:last-child {
    margin-top: 5px;
    font-size: 11px;
}

.daily-plan-carousel-controls {
    position: absolute;
    z-index: 5;
    top: 67px;
    right: 6px;
    left: 6px;
    display: flex;
    flex: 0 0 auto;
    justify-content: space-between;
    gap: 6px;
    margin: 0;
    pointer-events: none;
}

.daily-plan-carousel-controls .daily-plan-arrow {
    pointer-events: auto;
}

.daily-plan-arrow {
    display: grid;
    width: 35px;
    height: 33px;
    padding: 0;
    place-items: center;
    border: 1px solid #d0b99b;
    border-radius: 10px;
    background: linear-gradient(180deg, #fffdf8, #f6e7d4);
    box-shadow: 0 3px 0 #c9ad8c;
    color: #784c2e;
    font: 900 17px/1 var(--sans);
    cursor: pointer;
}

.daily-plan-arrow:hover:not(:disabled),
.daily-plan-arrow:focus-visible {
    border-color: #c9785c;
    background: #fff8ef;
    outline: 2px solid rgba(234, 118, 95, .22);
    outline-offset: 2px;
}

.daily-plan-arrow:active:not(:disabled) {
    box-shadow: none;
    transform: translateY(3px);
}

.daily-plan-arrow:disabled {
    cursor: default;
    opacity: .35;
}

.daily-plan-carousel {
    min-width: 0;
    margin-inline: 0;
    overflow: hidden;
    filter: drop-shadow(0 5px 5px rgba(24, 96, 81, .13));
}

.daily-plan .daily-plan-steps {
    display: flex;
    gap: 10px;
    max-width: 100%;
    margin: 0;
    padding: 2px 1px 8px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-padding-inline: 1px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.daily-plan .daily-plan-steps::-webkit-scrollbar { display: none; }

.daily-plan .daily-plan-steps:focus-visible {
    border-radius: var(--radius-limit, 14px);
    outline: 2px solid rgba(7, 139, 116, .4);
    outline-offset: 3px;
}

.daily-plan .daily-plan-card {
    --plan-card-accent: #0aa991;
    --plan-card-deep: #087b6b;
    --plan-card-pad-y: 12px;
    --plan-card-pad-x: 14px;
    --plan-card-side-width: 96px;
    --plan-ticket-seam: calc(100% - var(--plan-card-side-width) - var(--plan-card-pad-x) - 1px);
    --plan-ticket-surface: radial-gradient(circle at var(--plan-ticket-seam) 0, transparent 9px, #0aa991 9.5px 11px, transparent 11.5px), radial-gradient(circle at var(--plan-ticket-seam) 100%, transparent 9px, #0aa991 9.5px 11px, transparent 11.5px), linear-gradient(120deg, #fffefa, #f6fcf9);
    position: relative;
    display: grid;
    flex: 0 0 calc(50% - 5px);
    grid-template-columns: 78px minmax(0, 1fr) var(--plan-card-side-width);
    grid-template-rows: minmax(106px, auto);
    align-items: center;
    column-gap: 12px;
    row-gap: 0;
    box-sizing: border-box;
    min-width: 0;
    min-height: 132px;
    padding: var(--plan-card-pad-y) var(--plan-card-pad-x);
    overflow: visible;
    border: 2px solid var(--plan-card-accent);
    border-radius: var(--radius-limit, 14px);
    background: var(--plan-ticket-surface);
    background-origin: border-box;
    box-shadow: inset 4px 0 0 #78d5c6, inset 6px 0 0 rgba(10, 169, 145, .15);
    mask-image: radial-gradient(circle at var(--plan-ticket-seam) 0, transparent 9px, #000 9.5px), radial-gradient(circle at var(--plan-ticket-seam) 100%, transparent 9px, #000 9.5px);
    mask-composite: intersect;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.daily-plan .daily-plan-card.is-current {
    border-color: var(--plan-card-accent);
    background: var(--plan-ticket-surface);
    background-origin: border-box;
    box-shadow: inset 4px 0 0 #64cebc, inset 6px 0 0 rgba(10, 169, 145, .18);
}

.daily-plan .daily-plan-card.is-complete {
    border-color: var(--plan-card-accent);
    background: var(--plan-ticket-surface);
    background-origin: border-box;
}

.daily-plan .daily-plan-card > .daily-plan-card-art {
    position: relative;
    z-index: 1;
    display: grid;
    grid-column: 1;
    grid-row: 1;
    width: 74px;
    height: 74px;
    place-items: center;
    border: 0;
    border-radius: var(--radius-limit, 14px);
    background: transparent;
    box-shadow: none;
}

.daily-plan-card-art img {
    display: block;
    width: 68px;
    height: 68px;
    object-fit: contain;
}

.daily-plan-card > .daily-plan-card-copy {
    position: relative;
    z-index: 1;
    display: grid;
    grid-column: 2;
    grid-row: 1;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    column-gap: 8px;
    min-width: 0;
}

.daily-plan-card-actions {
    position: relative;
    z-index: 1;
    display: flex;
    grid-column: 3;
    grid-row: 1;
    align-self: stretch;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding-left: 12px;
    border-left: 2px dotted rgba(10, 169, 145, .6);
}

.daily-plan-card small,
.daily-plan-card strong,
.daily-plan-card p {
    display: block;
    grid-column: 1;
    margin: 0;
}

.daily-plan-card-action {
    position: relative;
    z-index: 1;
    margin: 0;
    padding: 8px 12px;
    border: 1px solid #c9553e;
    border-radius: 9px;
    background: linear-gradient(180deg, #f48469, #ea6e54);
    box-shadow: 0 3px 0 #b94a36;
    color: #fff9ee;
    font-size: 10px;
    font-weight: 850;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.daily-plan-card-skip {
    position: absolute;
    left: var(--plan-card-pad-x);
    bottom: var(--plan-card-pad-y);
    z-index: 2;
    width: 78px;
    max-width: 78px;
    padding: 2px 3px 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--plan-card-deep);
    font: 800 10px/1 var(--sans);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    cursor: pointer;
    white-space: nowrap;
}

.daily-plan-card .daily-plan-card-duration {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    white-space: nowrap;
    color: var(--plan-card-deep);
    font-size: 11px;
    line-height: 1;
    text-align: center;
}

.daily-plan-card-skip:hover,
.daily-plan-card-skip:focus-visible {
    background: color-mix(in srgb, var(--plan-card-accent) 10%, transparent);
    outline: 2px solid color-mix(in srgb, var(--plan-card-accent) 28%, transparent);
    outline-offset: 1px;
}

.daily-plan-card-action:hover,
.daily-plan-card-action:focus-visible {
    background: linear-gradient(180deg, #f89076, #ed765c);
    outline: 2px solid rgba(234, 110, 84, .28);
    outline-offset: 2px;
}

.daily-plan-card small {
    color: var(--plan-card-deep);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.daily-plan-card strong {
    margin-top: 5px;
    font: 800 20px/1.12 var(--display);
    letter-spacing: -.025em;
}

.daily-plan-card p {
    max-width: 420px;
    margin-top: 7px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.daily-plan-dots {
    display: flex;
    justify-content: center;
    gap: 7px;
    min-height: 12px;
    margin-top: 1px;
}

.daily-plan-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #d1c5bb;
    cursor: pointer;
    transition: width .2s ease, background .2s ease;
}

.daily-plan-dot.is-active {
    width: 24px;
    background: var(--accent);
}

.daily-plan-dot.is-complete { background: #078b74; }

#daily-plan-skip-status {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.daily-plan .daily-plan-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px 16px;
    margin-top: 13px;
}

.daily-plan .daily-plan-action {
    grid-column: 2;
    grid-row: 1;
    min-width: min(100%, 265px);
    justify-content: center;
    text-align: center;
}

.daily-plan .daily-plan-footer p {
    grid-column: 1;
    grid-row: 1;
    color: var(--muted);
    font-size: 10px;
}



@media (max-width: 760px) {
    .daily-plan.daily-plan {
        grid-template-columns: 1fr;
        gap: 4px;
        width: min(100% - 18px, 620px);
        margin: 15px auto 8px;
        padding: 0;
    }

    .view-progress .daily-plan.daily-plan { width: 100%; }

    .daily-plan-guide {
        display: grid;
        grid-template-columns: minmax(130px, 160px) minmax(0, 1fr);
        align-items: center;
        gap: 5px;
        width: min(100%, 410px);
        margin: 0 auto -3px;
    }

    .daily-plan-fox-orbit { width: 154px; }
    .daily-plan-fox-orbit::before { inset: 13px; }
    .daily-plan-orbit-meter { inset: 5px; }
    .daily-plan-orbit-step { width: 25px; height: 25px; border-width: 2px; font-size: 9px; }
    .daily-plan-orbit-puzzle { top: 10px; right: 16px; }
    .daily-plan-orbit-learn { right: 0; bottom: 39px; }
    .daily-plan-orbit-workout { bottom: 2px; left: 32px; }

    .daily-plan-count.daily-plan-count {
        right: 14px;
        bottom: 7px;
        padding: 5px 7px;
        font-size: 8px;
    }

    .daily-plan-focus.daily-plan-focus {
        width: 100%;
        margin: 0;
        padding: 8px;
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 7px;
    }

    .daily-plan-focus .daily-plan-focus-art { width: 42px; height: 42px; }
    .daily-plan-focus .daily-plan-focus-art img { width: 38px; height: 38px; }
    .daily-plan-focus .daily-plan-focus-art + div > small { font-size: 10px; }
    .daily-plan-focus .daily-plan-focus-art + div > strong { font-size: 18px; }
    .daily-plan-focus.daily-plan-focus p { font-size: 11px; -webkit-line-clamp: 3; }

    .daily-plan-bubble {
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .daily-plan-carousel-controls {
        display: none;
    }

    .daily-plan-carousel { margin-inline: 0; }

    .daily-plan-bubble::before,
    .daily-plan-bubble::after {
        display: none;
    }

    .daily-plan .daily-plan-steps {
        gap: 8px;
        padding: 2px 2px 6px;
    }

    .daily-plan .daily-plan-card {
        --plan-card-pad-y: 10px;
        --plan-card-pad-x: 12px;
        --plan-card-side-width: 80px;
        flex-basis: calc(100% - 1px);
        grid-template-columns: 68px minmax(0, 1fr) var(--plan-card-side-width);
        grid-template-rows: minmax(110px, auto);
        column-gap: 10px;
        row-gap: 0;
        min-height: 132px;
        padding: var(--plan-card-pad-y) var(--plan-card-pad-x);
        overflow: visible;
        border-radius: var(--radius-limit, 14px);
        background: var(--plan-ticket-surface);
        background-origin: border-box;
        box-shadow: inset 4px 0 0 #78d5c6, inset 6px 0 0 rgba(10, 169, 145, .15);
    }

    .daily-plan .daily-plan-card > .daily-plan-card-art { width: 68px; height: 76px; border-radius: var(--radius-limit, 14px); background: transparent; box-shadow: none; }
    .daily-plan-card-art img { width: 68px; height: 76px; }
    .daily-plan-card-actions { gap: 9px; padding-left: 9px; }
    .daily-plan-card-skip { width: 68px; max-width: 68px; font-size: 10px; padding-bottom: 2px; }
    .daily-plan-card .daily-plan-card-duration { font-size: 10px; }
    .daily-plan-card small { font-size: 10px; line-height: 1.15; }
    .daily-plan-card strong { margin-top: 4px; font-size: 19px; line-height: 1.14; }
    .daily-plan-card p { margin-top: 4px; font-size: 11px; line-height: 1.35; }
    .daily-plan-card-action { padding: 9px 10px; font-size: 11px; }
    .daily-plan-dots { margin-top: 4px; }
    .daily-plan .daily-plan-footer { grid-template-columns: 1fr; margin-top: 7px; }
    .daily-plan .daily-plan-footer p { grid-column: 1; grid-row: 1; text-align: center; }
}

@media (max-width: 420px) {
    .daily-plan-guide { grid-template-columns: 124px minmax(0, 1fr); }
    .daily-plan-fox-orbit { width: 130px; }
    .daily-plan-focus.daily-plan-focus { padding: 7px; }
    .daily-plan-focus .daily-plan-focus-art { width: 36px; height: 36px; }
    .daily-plan-focus .daily-plan-focus-art img { width: 33px; height: 33px; }
    .daily-plan-focus .daily-plan-focus-art + div > strong { font-size: 17px; }
    .daily-plan-orbit-step { width: 22px; height: 22px; font-size: 8px; }
    .daily-plan-orbit-puzzle { top: 8px; right: 13px; }
    .daily-plan-orbit-learn { bottom: 33px; }
    .daily-plan-orbit-workout { bottom: 1px; left: 26px; }
    .daily-plan-count.daily-plan-count { right: 10px; bottom: 4px; }
    .daily-plan-carousel { margin-inline: 0; }
    .daily-plan-arrow { width: 31px; height: 30px; font-size: 15px; }
    .daily-plan .daily-plan-card {
        --plan-card-pad-y: 9px;
        --plan-card-pad-x: 10px;
        --plan-card-side-width: 76px;
        grid-template-columns: 68px minmax(0, 1fr) var(--plan-card-side-width);
        column-gap: 9px;
        row-gap: 0;
        min-height: 132px;
        padding: var(--plan-card-pad-y) var(--plan-card-pad-x);
    }
    .daily-plan-card strong { font-size: 19px; }
    .daily-plan-card p { margin-top: 4px; font-size: 11px; }
}

@media (max-width: 340px) {
    .daily-plan-guide { grid-template-columns: 112px minmax(0, 1fr); }
    .daily-plan-fox-orbit { width: 118px; }
    .daily-plan-focus.daily-plan-focus p { -webkit-line-clamp: 2; }
    .daily-plan .daily-plan-header h2 { font-size: 10px; }
    .daily-plan .daily-plan-card { --plan-card-pad-y: 8px; --plan-card-pad-x: 8px; --plan-card-side-width: 66px; grid-template-columns: 54px minmax(0, 1fr) var(--plan-card-side-width); column-gap: 7px; row-gap: 0; min-height: 132px; padding: var(--plan-card-pad-y) var(--plan-card-pad-x); }
    .daily-plan .daily-plan-card > .daily-plan-card-art { width: 54px; height: 68px; border-radius: min(13px, var(--radius-limit, 14px)); }
    .daily-plan-card-art img { width: 54px; height: 68px; }
    .daily-plan-card strong { font-size: 17px; }
    .daily-plan-card-actions { padding-left: 7px; }
    .daily-plan-card-action { padding-inline: 7px; font-size: 10px; }
    .daily-plan-card-skip { width: 54px; max-width: 54px; font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
    .daily-plan-orbit-meter,
    .daily-plan-orbit-step,
    .daily-plan-dot { transition: none; }
}

/* Punch progress fits inside the existing card copy. */
.daily-plan-punches {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    color: var(--plan-card-deep);
}
.daily-plan-punch-marks { display: flex; gap: 5px; }
.daily-plan-punch {
    display: block;
    box-sizing: border-box;
    width: 12px;
    height: 12px;
    border: 1px solid #a5b8b1;
    border-radius: 50%;
    background: linear-gradient(145deg, #b8c7bf, #eaf0e9);
    box-shadow: inset 1px 2px 3px rgba(43, 66, 53, .42), 0 1px 0 #fff;
}
.daily-plan-punch.is-filled {
    border: 1px solid #086d59;
    background: linear-gradient(145deg, #07966f, #41cd9b);
    box-shadow: inset 1px 2px 3px rgba(0, 62, 44, .62), inset -1px -1px 1px rgba(132, 255, 199, .65), 0 1px 0 #fff;
}
.daily-plan-punch-label { font: 700 10px/1.3 var(--sans); white-space: nowrap; }

.daily-plan-card-duration img { width: 18px; height: 18px; flex: 0 0 18px; object-fit: contain; }

.daily-plan-card .daily-plan-card-done {
    margin-top: -5px;
    color: var(--plan-card-deep);
    font-size: 10px;
    line-height: 1.2;
    text-transform: none;
    letter-spacing: 0;
}

/* Page backgrounds share the same texture in the picker, preview and play. */
:root[data-background-theme="wood"], .progress-background-swatch.is-wood {
    --page-background-color: #d8bb96;
    --page-background-image: url('/assets/images/backgrounds/wood-v3.webp');
    --page-background-size: 720px 720px;
}
:root[data-background-theme="marble"], .progress-background-swatch.is-marble {
    --page-background-color: #f0efec;
    --page-background-image: url('/assets/images/backgrounds/marble-v2.svg');
    --page-background-size: 960px 960px;
}
:root[data-background-theme="linen"], .progress-background-swatch.is-linen {
    --page-background-color: #e8e0d1;
    --page-background-image: url('/assets/images/backgrounds/linen-v1.svg');
    --page-background-size: 240px 240px;
}
:root[data-background-theme="slate"], .progress-background-swatch.is-slate {
    --page-background-color: #cbd2d5;
    --page-background-image: url('/assets/images/backgrounds/slate-v1.svg');
    --page-background-size: 640px 640px;
}
:root[data-background-theme="cork"], .progress-background-swatch.is-cork {
    --page-background-color: #cfab7b;
    --page-background-image: url('/assets/images/backgrounds/cork-v1.svg');
    --page-background-size: 480px 480px;
}
:root[data-background-theme="paper"], .progress-background-swatch.is-paper {
    --page-background-color: #f4eddf;
    --page-background-image: url('/assets/images/backgrounds/paper-v1.svg');
    --page-background-size: 360px 360px;
}
:root[data-background-theme="terrazzo"], .progress-background-swatch.is-terrazzo {
    --page-background-color: #ede7df;
    --page-background-image: url('/assets/images/backgrounds/terrazzo-v1.svg');
    --page-background-size: 600px 600px;
}
:root[data-background-theme="walnut"], .progress-background-swatch.is-walnut {
    --page-background-color: #916747;
    --page-background-image: url('/assets/images/backgrounds/walnut-v1.svg');
    --page-background-size: 720px 720px;
}
html[data-background-theme="cork"], html[data-background-theme="cork"] body,
html[data-background-theme="paper"], html[data-background-theme="paper"] body,
html[data-background-theme="terrazzo"], html[data-background-theme="terrazzo"] body,
html[data-background-theme="walnut"], html[data-background-theme="walnut"] body,
html[data-background-theme="linen"], html[data-background-theme="slate"],
html[data-background-theme="linen"] body, html[data-background-theme="slate"] body,
html[data-background-theme="wood"], html[data-background-theme="marble"],
html[data-background-theme="wood"] body, html[data-background-theme="marble"] body {
    background-color: var(--page-background-color);
    background-image: var(--page-background-image);
    background-size: var(--page-background-size);
    background-attachment: scroll;
}
html[data-background-theme="cork"] .progress-appearance-preview-wrap,
html[data-background-theme="paper"] .progress-appearance-preview-wrap,
html[data-background-theme="terrazzo"] .progress-appearance-preview-wrap,
html[data-background-theme="walnut"] .progress-appearance-preview-wrap,
html[data-background-theme="linen"] .progress-appearance-preview-wrap,
html[data-background-theme="slate"] .progress-appearance-preview-wrap,
html[data-background-theme="wood"] .progress-appearance-preview-wrap,
html[data-background-theme="marble"] .progress-appearance-preview-wrap {
    padding: 14px;
    border-radius: min(12px, var(--radius-limit, 14px));
    background: var(--page-background-color) var(--page-background-image) center / var(--page-background-size);
}
.progress-background-swatch {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(34, 33, 31, .15);
    border-radius: 7px;
    background: var(--page-background-color, #fbf8f3) var(--page-background-image, none) center / 160px 160px;
}
.progress-background-swatch.is-default {
    --page-background-color: #fbf8f3;
    --page-background-image: radial-gradient(rgba(34, 33, 31, .06) .7px, transparent .8px);
    background-size: 5px 5px;
}
@media (max-width: 380px) {
    .progress-background-theme-options button { flex-direction: column; gap: 4px; text-align: center; }
}

.progress-background-theme-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }

html[data-background-theme="walnut"] .progress-appearance-heading h2,
html[data-background-theme="walnut"] .progress-appearance-heading > p:last-child { color: #fff6e8; }

/* Generated raster material images; each square uses one quadrant of its atlas. */
html[data-board-theme="wood"] { --board-light: #f0d5ad; --board-dark: #a56d31; --board-frame: #634326; --board-coord-dark: #fff8ea; --board-texture: url('/assets/images/boards/wood-photo-v1.webp'); }
html[data-board-theme="marble"] { --board-light: #e9e9e7; --board-dark: #4a5057; --board-frame: #30363b; --board-coord-dark: #fff8ea; --board-texture: url('/assets/images/boards/marble-photo-v1.webp'); --board-dark-overlay: linear-gradient(#e9e9e740, #e9e9e740); }
html[data-board-theme="walnut-grain"] { --board-light: #f0d4ad; --board-dark: #69422f; --board-frame: #402b20; --board-coord-dark: #fff8ea; --board-texture: url('/assets/images/boards/walnut-grain-photo-v1.webp'); --board-dark-overlay: linear-gradient(#f0d4ad38, #f0d4ad38); }
:where(html[data-board-theme="wood"], html[data-board-theme="marble"], html[data-board-theme="walnut-grain"], html[data-board-theme="travertine"], html[data-board-theme="terrazzo"], html[data-board-theme="green-marble"], html[data-board-theme="blue-onyx"], html[data-board-theme="rose-marble"], html[data-board-theme="bamboo"], html[data-board-theme="leather"], html[data-board-theme="brushed-metal"], html[data-board-theme="granite"], html[data-board-theme="ebony-ivory"], html[data-board-theme="sandstone"]) .board-square.light,
:where(html[data-board-theme="wood"], html[data-board-theme="marble"], html[data-board-theme="walnut-grain"], html[data-board-theme="travertine"], html[data-board-theme="terrazzo"], html[data-board-theme="green-marble"], html[data-board-theme="blue-onyx"], html[data-board-theme="rose-marble"], html[data-board-theme="bamboo"], html[data-board-theme="leather"], html[data-board-theme="brushed-metal"], html[data-board-theme="granite"], html[data-board-theme="ebony-ivory"], html[data-board-theme="sandstone"]) .board-square.dark {
    background-image: var(--board-texture);
    background-size: 200% 200%;
    background-position: var(--board-texture-position);
    background-repeat: no-repeat;
}
:where(html[data-board-theme="wood"], html[data-board-theme="marble"], html[data-board-theme="walnut-grain"], html[data-board-theme="travertine"], html[data-board-theme="terrazzo"], html[data-board-theme="green-marble"], html[data-board-theme="blue-onyx"], html[data-board-theme="rose-marble"], html[data-board-theme="bamboo"], html[data-board-theme="leather"], html[data-board-theme="brushed-metal"], html[data-board-theme="granite"], html[data-board-theme="ebony-ivory"], html[data-board-theme="sandstone"]) .board-square.light { --board-texture-position: 0% 0%; }
:where(html[data-board-theme="wood"], html[data-board-theme="marble"], html[data-board-theme="walnut-grain"], html[data-board-theme="travertine"], html[data-board-theme="terrazzo"], html[data-board-theme="green-marble"], html[data-board-theme="blue-onyx"], html[data-board-theme="rose-marble"], html[data-board-theme="bamboo"], html[data-board-theme="leather"], html[data-board-theme="brushed-metal"], html[data-board-theme="granite"], html[data-board-theme="ebony-ivory"], html[data-board-theme="sandstone"]) .board-square.dark { --board-texture-position: 100% 0%; }
:where(html[data-board-theme="wood"], html[data-board-theme="marble"], html[data-board-theme="walnut-grain"], html[data-board-theme="travertine"], html[data-board-theme="terrazzo"], html[data-board-theme="green-marble"], html[data-board-theme="blue-onyx"], html[data-board-theme="rose-marble"], html[data-board-theme="bamboo"], html[data-board-theme="leather"], html[data-board-theme="brushed-metal"], html[data-board-theme="granite"], html[data-board-theme="ebony-ivory"], html[data-board-theme="sandstone"]) .board-square.light:nth-child(4n+2),
:where(html[data-board-theme="wood"], html[data-board-theme="marble"], html[data-board-theme="walnut-grain"], html[data-board-theme="travertine"], html[data-board-theme="terrazzo"], html[data-board-theme="green-marble"], html[data-board-theme="blue-onyx"], html[data-board-theme="rose-marble"], html[data-board-theme="bamboo"], html[data-board-theme="leather"], html[data-board-theme="brushed-metal"], html[data-board-theme="granite"], html[data-board-theme="ebony-ivory"], html[data-board-theme="sandstone"]) .board-square.light:nth-child(4n+3) { --board-texture-position: 100% 100%; }
:where(html[data-board-theme="wood"], html[data-board-theme="marble"], html[data-board-theme="walnut-grain"], html[data-board-theme="travertine"], html[data-board-theme="terrazzo"], html[data-board-theme="green-marble"], html[data-board-theme="blue-onyx"], html[data-board-theme="rose-marble"], html[data-board-theme="bamboo"], html[data-board-theme="leather"], html[data-board-theme="brushed-metal"], html[data-board-theme="granite"], html[data-board-theme="ebony-ivory"], html[data-board-theme="sandstone"]) .board-square.dark:nth-child(4n+1),
:where(html[data-board-theme="wood"], html[data-board-theme="marble"], html[data-board-theme="walnut-grain"], html[data-board-theme="travertine"], html[data-board-theme="terrazzo"], html[data-board-theme="green-marble"], html[data-board-theme="blue-onyx"], html[data-board-theme="rose-marble"], html[data-board-theme="bamboo"], html[data-board-theme="leather"], html[data-board-theme="brushed-metal"], html[data-board-theme="granite"], html[data-board-theme="ebony-ivory"], html[data-board-theme="sandstone"]) .board-square.dark:nth-child(4n) { --board-texture-position: 0% 100%; }
:where(html[data-board-theme="wood"], html[data-board-theme="marble"], html[data-board-theme="walnut-grain"], html[data-board-theme="travertine"], html[data-board-theme="terrazzo"], html[data-board-theme="green-marble"], html[data-board-theme="blue-onyx"], html[data-board-theme="rose-marble"], html[data-board-theme="bamboo"], html[data-board-theme="leather"], html[data-board-theme="brushed-metal"], html[data-board-theme="granite"], html[data-board-theme="ebony-ivory"], html[data-board-theme="sandstone"]) .board-square.selected {
    background-image: radial-gradient(circle, rgba(255,255,255,.32), transparent 60%), var(--board-texture);
    background-size: 100% 100%, 200% 200%;
    background-position: center, var(--board-texture-position);
}
/* Lighten the darkest materials while retaining their texture and highlights. */
html:is([data-board-theme="marble"], [data-board-theme="walnut-grain"], [data-board-theme="travertine"], [data-board-theme="terrazzo"], [data-board-theme="green-marble"], [data-board-theme="blue-onyx"], [data-board-theme="leather"], [data-board-theme="brushed-metal"], [data-board-theme="granite"], [data-board-theme="ebony-ivory"]) .board-square.dark {
    background-image: var(--board-dark-overlay), var(--board-texture);
    background-size: 100% 100%, 200% 200%;
    background-position: center, var(--board-texture-position);
}
html:is([data-board-theme="marble"], [data-board-theme="walnut-grain"], [data-board-theme="travertine"], [data-board-theme="terrazzo"], [data-board-theme="green-marble"], [data-board-theme="blue-onyx"], [data-board-theme="leather"], [data-board-theme="brushed-metal"], [data-board-theme="granite"], [data-board-theme="ebony-ivory"]) .board-square.dark.selected {
    background-image: radial-gradient(circle, rgba(255,255,255,.32), transparent 60%), var(--board-dark-overlay), var(--board-texture);
    background-size: 100% 100%, 100% 100%, 200% 200%;
    background-position: center, center, var(--board-texture-position);
}
.progress-board-swatch.is-wood { background: url('/assets/images/boards/wood-thumb-v1.webp') center / cover; }
.progress-board-swatch.is-marble { background: url('/assets/images/boards/marble-thumb-v1.webp') center / cover; }
.progress-board-swatch.is-walnut-grain { background: url('/assets/images/boards/walnut-grain-thumb-v1.webp') center / cover; }
.progress-piece-sample[data-piece-sample="studio"] { background: #e9e1d4 center / 28px 28px no-repeat url('/assets/pieces/studio/bN.svg'); }

.progress-piece-sample[data-piece-sample="firi"] { background: #e9e1d4 center / 28px 28px no-repeat url('/assets/pieces/firi/bN.svg'); }
.progress-piece-sample[data-piece-sample="kiwen"] { background: #e9e1d4 center / 28px 28px no-repeat url('/assets/pieces/kiwen/bN.svg'); }
.progress-piece-sample[data-piece-sample="totoy"] { background: #e9e1d4 center / 28px 28px no-repeat url('/assets/pieces/totoy/bN.svg'); }

/* Keep dark pieces distinct from photographic dark stone and wood. */
:where(html[data-board-theme="wood"], html[data-board-theme="marble"], html[data-board-theme="walnut-grain"], html[data-board-theme="travertine"], html[data-board-theme="terrazzo"], html[data-board-theme="green-marble"], html[data-board-theme="blue-onyx"], html[data-board-theme="rose-marble"], html[data-board-theme="bamboo"], html[data-board-theme="leather"], html[data-board-theme="brushed-metal"], html[data-board-theme="granite"], html[data-board-theme="ebony-ivory"], html[data-board-theme="sandstone"]) .board-square.dark .chess-piece.black-piece {
    filter: drop-shadow(0 0 .65px rgba(255,250,235,.9)) drop-shadow(0 1px 1px rgba(0,0,0,.32));
}

html[data-board-theme="travertine"] { --board-light: #eee4d0; --board-dark: #916e50; --board-frame: #5a4736; --board-coord-dark: #fff8ea; --board-texture: url('/assets/images/boards/travertine-photo-v1.webp'); --board-dark-overlay: linear-gradient(#eee4d033, #eee4d033); }
.progress-board-swatch.is-travertine { background: url('/assets/images/boards/travertine-thumb-v1.webp') center / cover; }
html[data-board-theme="terrazzo"] { --board-light: #eee6db; --board-dark: #4d4a46; --board-frame: #353330; --board-coord-dark: #fff8ea; --board-texture: url('/assets/images/boards/terrazzo-photo-v1.webp'); --board-dark-overlay: linear-gradient(#eee6db40, #eee6db40); }
.progress-board-swatch.is-terrazzo { background: url('/assets/images/boards/terrazzo-thumb-v1.webp') center / cover; }
html[data-board-theme="green-marble"] { --board-light: #ecefe6; --board-dark: #245c49; --board-frame: #203e32; --board-coord-dark: #fff8ea; --board-texture: url('/assets/images/boards/green-marble-photo-v1.webp'); --board-dark-overlay: linear-gradient(#c9e3c745, #c9e3c745); }
.progress-board-swatch.is-green-marble { background: url('/assets/images/boards/green-marble-thumb-v1.webp') center / cover; }

html[data-board-theme="blue-onyx"] { --board-light: #ede9dd; --board-dark: #214d74; --board-frame: #233948; --board-coord-dark: #fff8ea; --board-texture: url('/assets/images/boards/blue-onyx-photo-v1.webp'); --board-dark-overlay: linear-gradient(#c5dcef47, #c5dcef47); }
.progress-board-swatch.is-blue-onyx { background: url('/assets/images/boards/blue-onyx-thumb-v1.webp') center / cover; }
html[data-board-theme="rose-marble"] { --board-light: #f0e5dd; --board-dark: #a36571; --board-frame: #67464f; --board-coord-dark: #fff8ea; --board-texture: url('/assets/images/boards/rose-marble-photo-v1.webp'); }
.progress-board-swatch.is-rose-marble { background: url('/assets/images/boards/rose-marble-thumb-v1.webp') center / cover; }
html[data-board-theme="bamboo"] { --board-light: #ecd5a3; --board-dark: #99602f; --board-frame: #614322; --board-coord-dark: #fff8ea; --board-texture: url('/assets/images/boards/bamboo-photo-v1.webp'); }
.progress-board-swatch.is-bamboo { background: url('/assets/images/boards/bamboo-thumb-v1.webp') center / cover; }
html[data-board-theme="leather"] { --board-light: #e9dfce; --board-dark: #503326; --board-frame: #37251f; --board-coord-dark: #fff8ea; --board-texture: url('/assets/images/boards/leather-photo-v1.webp'); --board-dark-overlay: linear-gradient(#e9dfce42, #e9dfce42); }
.progress-board-swatch.is-leather { background: url('/assets/images/boards/leather-thumb-v1.webp') center / cover; }
html[data-board-theme="brushed-metal"] { --board-light: #d5d8da; --board-dark: #515960; --board-frame: #30373d; --board-coord-dark: #fff8ea; --board-texture: url('/assets/images/boards/brushed-metal-photo-v1.webp'); --board-dark-overlay: linear-gradient(#d5d8da3d, #d5d8da3d); }
.progress-board-swatch.is-brushed-metal { background: url('/assets/images/boards/brushed-metal-thumb-v1.webp') center / cover; }
html[data-board-theme="granite"] { --board-light: #d8d8d4; --board-dark: #444b50; --board-frame: #30363b; --board-coord-dark: #fff8ea; --board-texture: url('/assets/images/boards/granite-photo-v1.webp'); --board-dark-overlay: linear-gradient(#d8d8d447, #d8d8d447); }
.progress-board-swatch.is-granite { background: url('/assets/images/boards/granite-thumb-v1.webp') center / cover; }
html[data-board-theme="ebony-ivory"] { --board-light: #eaddc5; --board-dark: #30251f; --board-frame: #241e1a; --board-coord-dark: #fff8ea; --board-texture: url('/assets/images/boards/ebony-ivory-photo-v1.webp'); --board-dark-overlay: linear-gradient(#eaddc54d, #eaddc54d); }
.progress-board-swatch.is-ebony-ivory { background: url('/assets/images/boards/ebony-ivory-thumb-v1.webp') center / cover; }
html[data-board-theme="sandstone"] { --board-light: #eed8bc; --board-dark: #a45d40; --board-frame: #68432f; --board-coord-dark: #fff8ea; --board-texture: url('/assets/images/boards/sandstone-photo-v1.webp'); }
.progress-board-swatch.is-sandstone { background: url('/assets/images/boards/sandstone-thumb-v1.webp') center / cover; }

/* Keep introductory copy readable over every appearance background. */
main .coach-hero-copy,
main .coach-how,
main .arcade-hero,
main .battle-lobby-copy,
main .play-hero,
main .strategy-section-title,
main .section-page-title,
main .p2-unlocks > header {
    box-sizing: border-box;
    min-width: 0;
    padding: clamp(18px, 3vw, 30px);
    border: 1px solid #ded6c8;
    border-radius: var(--radius-card);
    background: #fff7ea;
    color: #263238;
    box-shadow: var(--panel-shadow);
}

main .coach-how { margin-top: 32px; }
main .strategy-section-title,
main .section-page-title { padding: 16px 20px; }

/* Quicksand: slightly stronger reading text and extra emphasis for headings. */
body { font-weight: 550; }
button, .button, h1, h2, h3, h4, h5, h6 { font-weight: 700; }
input, select, textarea { font-weight: 550; }
/* Quicksand tops out at 700; a subtle stroke adds heading weight without widening layout. */
h1, h2, h3, h4, h5, h6 { -webkit-text-stroke: .2px currentColor; }

/* Session choices live inside Today’s Focus, below its description. */
.daily-plan-session { grid-column: 1 / -1; min-width: 0; }
.daily-plan-session[hidden], .daily-plan [data-plan-step][hidden], #daily-plan-start[hidden] { display: none; }
.daily-plan-session-options { display: flex; width: 100%; gap: 2px; padding: 2px; border: 1px solid #d7c8bb; border-radius: min(12px, var(--radius-limit, 14px)); background: #fffaf4; }
.daily-plan-session-options button { flex: 1 1 0; min-width: 0; min-height: 32px; padding: 6px 3px; white-space: nowrap; border: 0; border-radius: 9px; background: transparent; color: #42372e; font: 700 12px/1.2 var(--sans); cursor: pointer; }
.daily-plan-session-options button[aria-pressed="true"] { background: #087e69; color: #fff; }
.daily-plan-session-options button:focus-visible { outline: 3px solid #b26624; outline-offset: 2px; }
#daily-plan-session-summary:not(.visually-hidden) { margin: 0; color: var(--accent-ink); font: 600 12px/1.4 var(--sans); }
#daily-plan-start { min-height: 36px; padding: 7px 10px; font-size: 12px; white-space: nowrap; }
.daily-plan.is-complete .daily-plan-session { flex-wrap: wrap; }
.daily-plan .daily-plan-carousel-controls { top: 67px; }
@media (max-width: 760px) {
    .daily-plan-session-options button { padding-inline: 2px; font-size: 11px; }
}

#daily-plan-session-summary.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.daily-plan-card-footer { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; margin-top: 5px; }
.daily-plan-card-footer .daily-plan-dots { grid-column: 2; }
.daily-plan-card-footer #daily-plan-start { grid-column: 3; justify-self: end; }
/* Shared corner limit; circular and pill shapes keep their own radii. */
:root { --radius-limit: 14px; }
@media (max-width: 620px) { :root { --radius-limit: 10px; } }

/* Reserve the focus summary's clamped lines before personalized content arrives. */
.daily-plan #daily-plan-focus-reason { min-height: 2.8em; }
@media (min-width: 341px) and (max-width: 760px) {
    .daily-plan #daily-plan-focus-reason { min-height: 4.2em; }
}

/* Raised content surfaces; board frames and existing sculpted cards keep their own depth. */
.arcade-game-card,
.arcade-session-bar,
.arcade-decision,
.arcade-summary,
.battle-scoreboard,
.coach-signin-gate,
.coach-connect,
.coach-week-grid > article,
.coach-empty,
.coach-plan-card,
.coach-game,
.play-game-panel,
.custom-analysis,
.path-world-gate,
.path-leaderboard,
.path-rules,
.puzzle-workout-setup,
.puzzle-workout-summary,
.puzzle-library-chooser,
.legal-page section,
.account-page-card {
    box-shadow: var(--panel-shadow);
}
.daily-plan-focus.daily-plan-focus {
    --panel-edge: #bdd2c5;
    box-shadow: var(--panel-shadow-shallow);
}
.coach-connection {
    background: var(--surface);
    box-shadow: var(--panel-shadow-shallow);
}
.puzzle-workout-launch,
.custom-move-list,
.custom-castling-values,
.play-moves,
.coach-connect-form,
.path-leaderboard-tabs,
.puzzle-reward-filters {
    box-shadow: var(--panel-shadow-inset);
}
@media (max-width: 620px) {
    :root { --panel-depth: 4px; }
}

/* Orange plan tickets: keep the cutouts and give their silhouette a solid depth edge. */
body:not(.view-progress) .daily-plan.daily-plan { column-gap: 32px; }
body:not(.view-progress) .daily-plan .daily-plan-card {
    --plan-card-accent: #dc873d;
    --plan-card-deep: #874315;
    --plan-ticket-surface: radial-gradient(circle at var(--plan-ticket-seam) 0, transparent 9px, #dc873d 9.5px 11px, transparent 11.5px), radial-gradient(circle at var(--plan-ticket-seam) 100%, transparent 9px, #dc873d 9.5px 11px, transparent 11.5px), linear-gradient(rgba(255, 253, 250, .96), rgba(255, 253, 250, .96));
    box-shadow: inset 0 2px 0 #fffaf0, inset 0 -3px 0 #e8aa67, inset 4px 0 0 #ffc987, inset 6px 0 0 rgba(220, 135, 61, .18);
}
/* A shadow on the carousel follows the masked ticket instead of being cut off by its mask. */
body:not(.view-progress) .daily-plan-carousel {
    filter: drop-shadow(0 5px 0 #bc7438) drop-shadow(0 7px 5px rgba(108, 59, 24, .16));
}
body:not(.view-progress) .daily-plan-card-actions { border-left-color: rgba(180, 93, 28, .6); }
body:not(.view-progress) .daily-plan-punch {
    border-color: #c49a70;
    background: linear-gradient(145deg, #d8ad7e, #fff0d7);
    box-shadow: inset 1px 2px 3px rgba(105, 61, 24, .3), 0 1px 0 #fff;
}
body:not(.view-progress) .daily-plan-punch.is-filled {
    border-color: #ab581e;
    background: linear-gradient(145deg, #dd791f, #ffc16d);
    box-shadow: inset 1px 2px 3px rgba(112, 51, 13, .4), inset -1px -1px 1px #ffdc9c, 0 1px 0 #fff;
}
@media (max-width: 760px) {
    body:not(.view-progress) .daily-plan.daily-plan { row-gap: 14px; }
    body:not(.view-progress) .daily-plan-guide { margin-bottom: 0; }
}

/* Today's Focus matches the orange ticket, including its nested controls. */
body:not(.view-progress) .daily-plan-focus.daily-plan-focus {
    border-color: #dc873d;
    background: rgba(255, 253, 250, .96);
    box-shadow: inset 0 2px 0 #fffaf0, inset 0 -2px 0 #efb876, 0 6px 0 #bc7438, 0 11px 17px rgba(108, 59, 24, .14);
}
body:not(.view-progress) .daily-plan-focus small { color: #874315; }
body:not(.view-progress) .daily-plan-focus-art {
    background: rgba(255, 253, 250, .96);
    box-shadow: inset 0 1px 0 #fff, 0 3px 0 #d9a16b, 0 5px 9px rgba(108, 59, 24, .1);
}
body:not(.view-progress) .daily-plan-focus .learning-focus-details {
    border-color: #dfb180;
    background: rgba(255, 253, 250, .96);
    color: #874315;
    box-shadow: inset 0 1px 0 #fffaf0, 0 2px 0 #d9a16b;
}
body:not(.view-progress) .daily-plan-focus .daily-plan-session-options {
    border-color: #dfb180;
    background: rgba(255, 253, 250, .96);
    padding-bottom: 5px;
    box-shadow: inset 0 2px 3px rgba(108, 59, 24, .09);
}
body:not(.view-progress) .daily-plan-focus .daily-plan-session-options button[aria-pressed="true"] {
    background: linear-gradient(#f6ad63, #e58a36);
    color: #512808;
    box-shadow: inset 0 1px 0 #ffe3bc, 0 3px 0 #b7692d;
}

/* Keep catalog puzzle spacing aligned with the shared report shell. */
body.view-puzzles.is-quick-puzzle:not(.is-puzzle-workout-active) .report-shell {
    padding-top: 5px;
}

/* One shared five-second timeline aligns fingertip contact, ripple, and button response. */
.daily-plan.is-tap-hint .daily-plan-card.is-current:not(.is-complete) a.daily-plan-card-action {
    animation: daily-plan-touch-button 5s cubic-bezier(.4, 0, .2, 1) both;
}
.daily-plan.is-tap-hint .daily-plan-card.is-current:not(.is-complete) a.daily-plan-card-action::after {
    content: "";
    position: absolute;
    z-index: 2;
    width: 32px;
    height: 32px;
    left: calc(50% - 13px);
    top: calc(50% - 1px);
    background: url('/assets/images/daily-plan-tap-clay-v3.webp?v=20260924tap3') center / contain no-repeat;
    pointer-events: none;
    transform-origin: 41% 3%;
    transform: rotate(-20deg);
    animation: daily-plan-tap 5s cubic-bezier(.4, 0, .2, 1) both;
}
.daily-plan.is-tap-hint .daily-plan-card.is-current:not(.is-complete) a.daily-plan-card-action::before {
    content: "";
    position: absolute;
    z-index: 1;
    left: 50%;
    top: 50%;
    width: 22px;
    height: 22px;
    border: 2px solid #fff5d8;
    border-radius: 50%;
    background: rgba(255, 245, 216, .24);
    pointer-events: none;
    animation: daily-plan-touch-ripple 5s cubic-bezier(.16, 1, .3, 1) both;
}
@keyframes daily-plan-tap {
    0% { opacity: 0; transform: translate(6px, 9px) rotate(-20deg) scale(1); }
    10%, 46% { opacity: 1; transform: translate(4px, 7px) rotate(-20deg) scale(1); }
    24%, 64% { opacity: 1; transform: translate(0, 0) rotate(-20deg) scale(1); }
    29%, 69% { opacity: 1; transform: translate(0, 0) rotate(-20deg) scale(.94); }
    40%, 80%, 88% { opacity: 1; transform: translate(4px, 7px) rotate(-20deg) scale(1); }
    100% { opacity: 0; transform: translate(6px, 10px) rotate(-20deg) scale(1); }
}
@keyframes daily-plan-touch-ripple {
    0%, 23.9%, 63.9% { opacity: 0; transform: translate(-50%, -50%) scale(.15); }
    24%, 64% { opacity: .9; transform: translate(-50%, -50%) scale(.15); }
    40%, 80% { opacity: 0; transform: translate(-50%, -50%) scale(1.25); }
    40.1%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(.15); }
}
@keyframes daily-plan-touch-button {
    0%, 23%, 40%, 63%, 80%, 100% { box-shadow: 0 3px 0 #b94a36; }
    26%, 29%, 66%, 69% { box-shadow: 0 2px 0 #b94a36, inset 0 0 0 2px rgba(255, 245, 216, .38); }
}
.daily-plan-card a.daily-plan-card-action:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #b94a36;
}
@media (prefers-reduced-motion: reduce) {
    .daily-plan.is-tap-hint .daily-plan-card.is-current:not(.is-complete) a.daily-plan-card-action,
    .daily-plan.is-tap-hint .daily-plan-card.is-current:not(.is-complete) a.daily-plan-card-action::after {
        animation: none;
    }
    .daily-plan.is-tap-hint .daily-plan-card.is-current:not(.is-complete) a.daily-plan-card-action::before { content: none; }
    .daily-plan-card a.daily-plan-card-action:active { transform: none; }
}

/* Generated landscape page backgrounds. */
:root[data-background-theme="misty-forest"], .progress-background-swatch.is-misty-forest {
    --page-background-color: #e6e9df;
    --page-background-image: url("/assets/images/backgrounds/misty-forest-v1.webp");
    --page-background-size: cover;
}
:root[data-background-theme="desert-dawn"], .progress-background-swatch.is-desert-dawn {
    --page-background-color: #f2e2d3;
    --page-background-image: url("/assets/images/backgrounds/desert-dawn-v1.webp");
    --page-background-size: cover;
}
:root[data-background-theme="cloud-study"], .progress-background-swatch.is-cloud-study {
    --page-background-color: #e5edf1;
    --page-background-image: url("/assets/images/backgrounds/cloud-study-v1.webp");
    --page-background-size: cover;
}
html[data-background-theme="misty-forest"], html[data-background-theme="misty-forest"] body,
html[data-background-theme="desert-dawn"], html[data-background-theme="desert-dawn"] body,
html[data-background-theme="cloud-study"], html[data-background-theme="cloud-study"] body {
    background-color: var(--page-background-color);
    background-image: var(--page-background-image);
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    background-attachment: fixed;
}
html[data-background-theme="misty-forest"] .progress-appearance-preview-wrap,
html[data-background-theme="desert-dawn"] .progress-appearance-preview-wrap,
html[data-background-theme="cloud-study"] .progress-appearance-preview-wrap {
    padding: 14px;
    border-radius: min(12px, var(--radius-limit, 14px));
    background: var(--page-background-color) var(--page-background-image) center / cover no-repeat;
}
.progress-background-swatch.is-misty-forest,
.progress-background-swatch.is-desert-dawn,
.progress-background-swatch.is-cloud-study { background-size: cover; }

/* Additional generated landscape page backgrounds. */
:root[data-background-theme="lavender-hills"], .progress-background-swatch.is-lavender-hills {
    --page-background-color: #ece5ee;
    --page-background-image: url("/assets/images/backgrounds/lavender-hills-v1.webp");
    --page-background-size: cover;
}
:root[data-background-theme="moonlit-lake"], .progress-background-swatch.is-moonlit-lake {
    --page-background-color: #e0e7ee;
    --page-background-image: url("/assets/images/backgrounds/moonlit-lake-v1.webp");
    --page-background-size: cover;
}
:root[data-background-theme="bamboo-garden"], .progress-background-swatch.is-bamboo-garden {
    --page-background-color: #e4eadf;
    --page-background-image: url("/assets/images/backgrounds/bamboo-garden-v1.webp");
    --page-background-size: cover;
}
:root[data-background-theme="coastal-breeze"], .progress-background-swatch.is-coastal-breeze {
    --page-background-color: #e2eeeb;
    --page-background-image: url("/assets/images/backgrounds/coastal-breeze-v1.webp");
    --page-background-size: cover;
}
:root[data-background-theme="autumn-woodland"], .progress-background-swatch.is-autumn-woodland {
    --page-background-color: #f0e4d6;
    --page-background-image: url("/assets/images/backgrounds/autumn-woodland-v1.webp");
    --page-background-size: cover;
}
html[data-background-theme="lavender-hills"], html[data-background-theme="lavender-hills"] body,
html[data-background-theme="moonlit-lake"], html[data-background-theme="moonlit-lake"] body,
html[data-background-theme="bamboo-garden"], html[data-background-theme="bamboo-garden"] body,
html[data-background-theme="coastal-breeze"], html[data-background-theme="coastal-breeze"] body,
html[data-background-theme="autumn-woodland"], html[data-background-theme="autumn-woodland"] body {
    background-color: var(--page-background-color);
    background-image: var(--page-background-image);
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    background-attachment: fixed;
}
html[data-background-theme="lavender-hills"] .progress-appearance-preview-wrap,
html[data-background-theme="moonlit-lake"] .progress-appearance-preview-wrap,
html[data-background-theme="bamboo-garden"] .progress-appearance-preview-wrap,
html[data-background-theme="coastal-breeze"] .progress-appearance-preview-wrap,
html[data-background-theme="autumn-woodland"] .progress-appearance-preview-wrap {
    padding: 14px;
    border-radius: min(12px, var(--radius-limit, 14px));
    background: var(--page-background-color) var(--page-background-image) center / cover no-repeat;
}
.progress-background-swatch.is-lavender-hills,
.progress-background-swatch.is-moonlit-lake,
.progress-background-swatch.is-bamboo-garden,
.progress-background-swatch.is-coastal-breeze,
.progress-background-swatch.is-autumn-woodland { background-size: cover; }

/* Keep the navbar brand prominent across shared page headers. */
.site-header .wordmark {
    font-size: 26px;
    text-transform: uppercase;
}
@media (max-width: 760px) {
    .site-header .wordmark,
    .arcade-page .arcade-header .wordmark {
        font-size: 22px;
    }
}

/* Lock the usual raised Fox bubble without adding a second card. */
.explanation-upgrade-lock { display: none; }
.puzzle-explanation.is-quota-locked .puzzle-explanation-locked { min-height: 64px; border: 0; border-radius: 0; background: transparent; overflow: visible; }
.puzzle-explanation.is-quota-locked .puzzle-explanation-locked > p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; padding: 0; font-size: 14px; line-height: 1.6; filter: blur(3px); opacity: .7; }
.puzzle-explanation.is-quota-locked .puzzle-explanation-lock-message { flex-direction: row; align-items: center; background: transparent; padding: 0; gap: 8px; }
.puzzle-explanation.is-quota-locked .puzzle-explanation-lock-message > :is(strong,span) { display: none; }
.puzzle-explanation.is-quota-locked .explanation-upgrade-lock { display: block; width: 56px; height: 56px; object-fit: contain; filter: drop-shadow(0 4px 3px #793f2433); }
.puzzle-explanation.is-quota-locked .puzzle-explanation-lock-message :is(button,a) {
    display: inline-flex;
    min-height: 34px;
    padding: 8px 13px;
    flex: none;
    align-items: center;
    justify-content: center;
    border: 1px solid #0d0e0c;
    border-radius: 9px;
    background: linear-gradient(180deg, #3a3b35 0%, #252621 48%, #171815 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), inset 0 -2px 0 rgba(0, 0, 0, .42), 0 3px 0 #0b0c0a, 0 7px 12px rgba(34, 35, 31, .24);
    color: #fffefa;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    text-shadow: 0 1px 0 rgba(0, 0, 0, .55);
    transition: filter .12s ease, box-shadow .1s ease, transform .1s ease;
}

.puzzle-explanation.is-quota-locked .puzzle-explanation-lock-message :is(button,a):hover,
.puzzle-explanation.is-quota-locked .puzzle-explanation-lock-message :is(button,a):focus-visible {
    filter: brightness(1.1);
    outline: 3px solid rgba(34, 33, 31, .22);
    outline-offset: 2px;
}

.puzzle-explanation.is-quota-locked .puzzle-explanation-lock-message :is(button,a):active {
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .4), 0 1px 0 #0b0c0a, 0 3px 6px rgba(34, 35, 31, .2);
    transform: translateY(2px);
}
.puzzle-explanation.is-quota-locked #board-ai-review { display: none; }
#arcade-feedback.is-quota-locked #arcade-feedback-title { display: block; }

.puzzle-explanation .explanation-quota-summary { margin: 7px 0 10px; color: var(--muted); font: 600 12px/1.5 var(--sans); }

#arcade-feedback.is-quota-locked .arcade-ai-explanation-placeholder { padding: 0; }

/* Step through the revealed puzzle line beneath the board. */
.puzzle-move-controls { display:flex; align-items:center; justify-content:center; gap:6px; width:100%; margin:8px 0 0; }
.puzzle-move-controls > .puzzle-result-metrics { flex:1; min-width:0; margin:0; }
.puzzle-move-controls > .coach-analysis-step { flex:0 0 50px; }
.puzzle-move-controls[hidden] { display:none; }
.puzzle-move-controls .coach-analysis-step {
    position: relative;
    width: 50px;
    height: 50px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    box-shadow: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.puzzle-move-controls .coach-analysis-step::before {
    position: absolute;
    top: 3px;
    left: 5px;
    width: 40px;
    height: 40px;
    border: 1px solid #dc513f;
    border-radius: 50%;
    background:
        radial-gradient(circle at 34% 24%, rgba(255, 255, 255, .55) 0 8%, transparent 9%),
        linear-gradient(145deg, #ff9d7d 0%, #f5715e 52%, #dc4938 100%);
    box-shadow:
        inset 0 2px 1px rgba(255, 255, 255, .7),
        inset 0 -4px 4px rgba(156, 39, 26, .2),
        0 4px 0 #bd3c2e,
        0 7px 9px rgba(126, 49, 38, .24);
    content: "";
    transition: filter .14s ease, transform .09s ease, box-shadow .09s ease;
}

.puzzle-move-controls .coach-analysis-step::after {
    position: absolute;
    z-index: 1;
    top: 14px;
    left: 19px;
    width: 14px;
    height: 18px;
    background: linear-gradient(90deg, #fff7eb, #fff);
    clip-path: polygon(10% 0, 100% 50%, 10% 100%);
    content: "";
    filter: drop-shadow(0 1px 1px rgba(116, 39, 29, .42));
    transform: translateX(1px);
    transition: transform .09s ease;
}

.puzzle-move-controls .coach-analysis-step.previous::after {
    transform: translateX(-1px) rotate(180deg);
}

.puzzle-move-controls .coach-analysis-step:hover::before {
    filter: saturate(1.06) brightness(1.03);
}

.puzzle-move-controls .coach-analysis-step:focus-visible {
    box-shadow: 0 0 0 3px rgba(234, 118, 95, .28);
    outline: 0;
}

.puzzle-move-controls .coach-analysis-step:active::before {
    box-shadow:
        inset 0 3px 5px rgba(129, 31, 21, .26),
        inset 0 1px 1px rgba(255, 255, 255, .32),
        0 1px 0 #bd3c2e,
        0 2px 3px rgba(126, 49, 38, .18);
    filter: saturate(1.04) brightness(.98);
    transform: translateY(4px);
}

.puzzle-move-controls .coach-analysis-step:active::after {
    transform: translate(1px, 4px);
}

.puzzle-move-controls .coach-analysis-step.previous:active::after {
    transform: translate(-1px, 4px) rotate(180deg);
}


.puzzle-move-controls button:disabled { opacity:.35; cursor:default; }
.puzzle-move-controls button:not(:disabled) { cursor:pointer; }
@media (prefers-reduced-motion: reduce) {
    .puzzle-move-controls .coach-analysis-step::before,
    .puzzle-move-controls .coach-analysis-step::after { transition:none; }
}
#puzzle-move-status { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
@media(max-width:380px) {
    .puzzle-move-controls { gap:2px; }
    .puzzle-move-controls > .puzzle-result-metrics { gap:4px; }
    .puzzle-move-controls .puzzle-result-metric { padding:4px 2px; }
    .puzzle-move-controls .puzzle-result-metric > strong { font-size:13px; gap:2px; }
    .puzzle-move-controls .puzzle-result-elo-icon { width:21px; height:21px; }
    .puzzle-move-controls .chess-dna-icon { width:24px; height:18px; }
}

/* The result cards move into the replay row; their old mobile wrapper has no spacing left to reserve. */
@media(max-width:720px) {
    .puzzle-move-controls:not([hidden]) + .board-point-gain.compact-puzzle-result {
        margin:0;
        padding:0;
    }
}

.shared-board-card:has(> .puzzle-move-controls:not([hidden])) > .puzzle-board-status-row {
    display:none;
}

/* Compact artwork with separate, non-overlapping 44px interaction targets. */
.daily-plan-dots{gap:0;min-height:44px}
.daily-plan-dot,.daily-plan-dot.is-active,.daily-plan-dot.is-complete{position:relative;flex:0 0 44px;width:44px;height:44px;background:transparent;transition:none}
.daily-plan-dot::after{content:"";position:absolute;left:50%;top:50%;width:8px;height:8px;border-radius:999px;background:#d1c5bb;transform:translate(-50%,-50%);transition:width .2s ease,background .2s ease;pointer-events:none}
.daily-plan-dot.is-active::after{width:24px;background:var(--accent)}
.daily-plan-dot.is-complete::after{background:#078b74}
.daily-plan-dot:focus-visible{outline:2px solid var(--accent);outline-offset:-3px}
.daily-plan-card-skip::after{content:"";position:absolute;inset:auto 0 0;height:44px}
.board-sound-toggle{position:relative}
.board-sound-toggle::after{content:"";position:absolute;left:50%;top:50%;width:44px;height:44px;transform:translate(-50%,-50%)}
@media(prefers-reduced-motion:reduce){.daily-plan-dot::after{transition:none}}

/* Compact mobile Daily Plan: keep the featured puzzle and its action in view. */
@media (max-width: 760px) {
    body.view-puzzles .daily-plan.daily-plan {
        row-gap: 8px;
        margin-bottom: 0;
    }
    body.view-puzzles .daily-plan-guide {
        grid-template-columns: 108px minmax(0, 1fr);
        gap: 6px;
    }
    body.view-puzzles .daily-plan-fox-orbit { width: 108px; }
    body.view-puzzles .daily-plan-fox-orbit::before { box-shadow: 0 4px 12px #4a332612; }
    body.view-puzzles .daily-plan-fox { filter: drop-shadow(0 3px 4px #442b1b14); }
    body.view-puzzles .daily-plan-orbit-puzzle { top: 4px; right: 5px; }
    body.view-puzzles .daily-plan-orbit-learn { top: 34px; right: 0; bottom: auto; }
    body.view-puzzles .daily-plan-orbit-workout { top: 64px; right: 5px; bottom: auto; left: auto; }
    body.view-puzzles .daily-plan-count.daily-plan-count { right: 14px; bottom: -3px; }
    body.view-puzzles .daily-plan-focus.daily-plan-focus {
        grid-template-columns: 32px minmax(0, 1fr);
        gap: 4px 7px;
        padding: 7px;
        border-color: #eac39d;
        box-shadow: 0 3px 8px #6c3b1812;
    }
    body.view-puzzles .daily-plan-focus .daily-plan-focus-art,
    body.view-puzzles .daily-plan-focus .daily-plan-focus-art img { width: 32px; height: 32px; }
    body.view-puzzles .daily-plan-focus-art { box-shadow: 0 1px 3px #6c3b1814; }
    body.view-puzzles .daily-plan-focus .learning-focus-details {
        padding: 5px 8px;
        border-color: #ead5bd;
        box-shadow: none;
    }
    body.view-puzzles .daily-plan-focus .daily-plan-session-options {
        padding: 2px;
        border-color: #ead5bd;
        box-shadow: none;
    }
    body.view-puzzles .daily-plan-focus .daily-plan-session-options button[aria-pressed="true"] {
        box-shadow: inset 0 1px 0 #ffe3bc;
    }
    body.view-puzzles .daily-plan .daily-plan-steps { padding-bottom: 3px; }
    body.view-puzzles .daily-plan .daily-plan-card {
        --plan-card-pad-y: 8px;
        --plan-card-pad-x: 10px;
        --plan-card-side-width: 72px;
        --plan-card-accent: #e8b986;
        --plan-ticket-surface: linear-gradient(#fffdfa, #fffaf5);
        grid-template-columns: 56px minmax(0, 1fr) var(--plan-card-side-width);
        grid-template-rows: minmax(90px, auto);
        column-gap: 8px;
        min-height: 110px;
        border-width: 1px;
        box-shadow: none;
    }
    body.view-puzzles .daily-plan-carousel { filter: drop-shadow(0 3px 3px #6c3b1812); }
    body.view-puzzles .daily-plan .daily-plan-card > .daily-plan-card-art,
    body.view-puzzles .daily-plan-card-art img { width: 56px; height: 62px; }
    body.view-puzzles .daily-plan-card-skip { width: 56px; max-width: 56px; font-size: 10px; }
    body.view-puzzles .daily-plan-card strong { font-size: 18px; }
    body.view-puzzles .daily-plan-card-actions { gap: 7px; padding-left: 8px; border-left-color: #dab691; }
    body.view-puzzles .daily-plan-card-footer,
    body.view-puzzles .daily-plan-dots { margin-top: 0; }
    body.view-puzzles .puzzle-library-intro { padding-top: 0; }
}
@media (max-width: 340px) {
    body.view-puzzles .daily-plan-guide { grid-template-columns: 94px minmax(0, 1fr); }
    body.view-puzzles .daily-plan-fox-orbit { width: 94px; }
    body.view-puzzles .daily-plan-orbit-workout { top: 59px; right: 0; }
    body.view-puzzles .daily-plan-count.daily-plan-count { right: 18px; bottom: -8px; }
    body.view-puzzles .daily-plan .daily-plan-card {
        --plan-card-pad-x: 8px;
        --plan-card-side-width: 66px;
        grid-template-columns: 48px minmax(0, 1fr) var(--plan-card-side-width);
        column-gap: 7px;
    }
    body.view-puzzles .daily-plan .daily-plan-card > .daily-plan-card-art,
    body.view-puzzles .daily-plan-card-art img { width: 48px; height: 58px; }
    body.view-puzzles .daily-plan-card-skip { width: 48px; max-width: 48px; }
    body.view-puzzles .daily-plan-card strong { font-size: 17px; }
}
