/*
 * 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: "Poppins";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/poppins-400-latin.woff2") format("woff2");
}

@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/poppins-500-latin.woff2") format("woff2");
}

@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/poppins-600-latin.woff2") format("woff2");
}

@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/poppins-700-latin.woff2") format("woff2");
}

:root {
    color-scheme: light;
    --ink: #22211f;
    --ink-soft: #4f4b47;
    --muted: #827b75;
    --paper: #fbf8f3;
    --paper-strong: #f5f0e9;
    --sheet: #fffdfa;
    --line: #dfd9d2;
    --line-hi: #cfc7bf;
    --green: #ea765f;
    --green-dark: #cf5944;
    --green-soft: #fff0eb;
    --red: #b7453e;
    --red-soft: #fff0ee;
    --point-loss-red: #c9453f;
    --point-loss-red-active: #df5d55;
    --yellow: #fff7dd;
    --blue: #f0f4ff;
    --lilac: #f4f0ff;
    --peach: #fff0eb;
    --accent: #ea765f;
    --accent-deep: #cf5944;
    --accent-ink: #ad4635;
    --accent-soft: #f4b1a3;
    --accent-pale: #fff0eb;
    --violet: #7557d6;
    --cyan: #078b74;
    --surface: #fffdfa;
    --surface-raised: #fffaf5;
    --surface-soft: #f5f0e9;
    --surface-input: #ffffff;
    --display: "Poppins", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --sans: "Poppins", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --serif: "Poppins", 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);
    --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: 12px;
    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: 22px;
    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: 19px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -.04em;
    text-transform: none;
}

.brand-mark {
    width: auto;
    height: 26px;
    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;
}

.nav-account-button.is-authenticated .nav-account-label,
.nav-account-button.is-progress .nav-account-label {
    color: var(--accent);
    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;
}

.site-header nav .puzzle-sound-toggle {
    display: inline-flex;
    width: 38px;
    min-width: 38px;
    min-height: 38px;
    padding: 0;
    gap: 8px;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}

.site-header nav .puzzle-sound-toggle:hover,
.site-header nav .puzzle-sound-toggle:focus-visible {
    border-color: #dfa395;
    background: var(--green-soft);
}

.site-header nav .puzzle-sound-toggle.is-muted {
    border-color: #dca39e;
    color: var(--red);
}

.nav-utility-label {
    display: none;
}

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

.home-hub-tabs {
    gap: 6px;
    padding: 5px 5px 9px;
    border: 1px solid var(--line);
    border-radius: 22px;
    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: 17px;
    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: 32px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 10px;
    row-gap: 1px;
    align-content: center;
    align-items: center;
    justify-content: stretch;
}

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

.home-hub-tabs a > span,
.home-hub-tabs a > small {
    grid-column: 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: #827b75;
    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: 24px;
    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: 13px;
    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:is(.board-reveal-tactic, .reveal-answer) {
    --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);
}

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

.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-guide-prompt textarea[readonly] {
    border-color: #cfc3b8;
    background: linear-gradient(180deg, #f6efe8 0, #fffdfa 27%, #fff 100%);
    border-radius: 13px;
    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-guide-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-guide-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: #827b75;
    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%;
    color: rgba(234, 118, 95, .075);
    content: "♞";
    font: 310px/.7 Georgia, serif;
    filter: drop-shadow(0 20px 35px rgba(52, 43, 36, .108));
    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: 11px;
    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: 17px;
    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: 12px;
    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;
}

.guided-game,
.guided-game: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: 18px;
    background: linear-gradient(145deg, var(--card-tint), transparent 62%), var(--surface);
    box-shadow: 0 8px 22px rgba(52, 43, 36, .055);
    color: var(--ink);
}

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

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

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

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

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

.guided-game:disabled,
.skill-node.locked {
    border-color: #ebe4dc;
    background: #f5f0e9;
    color: #9b948e;
    filter: none;
    opacity: .64;
}

.guided-game.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);
}

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

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

.guided-game.completed .game-status,
.guided-game.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 button,
.puzzle-branches button:nth-child(n) {
    border-color: #d9d2cb;
    border-radius: 13px;
    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: 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 .guided-game .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);
}

.guided-tree-branch,
.guided-lesson-panel {
    border-color: #d7d0c8;
    border-radius: 14px;
    background: #fffaf5;
}

.guided-branch-button {
    border-color: #d7d0c8;
    border-radius: 11px;
    background: linear-gradient(180deg, #ebe4dc, #fffaf5 58%, #fffaf5);
    box-shadow: inset 0 1px rgba(255, 255, 255, .06), inset 0 -2px rgba(52, 43, 36, .099), 0 4px 0 #e2dad2, 0 8px 15px rgba(52, 43, 36, .077);
    text-shadow: none;
}

.guided-branch-button:hover,
.guided-branch-button:focus-visible,
.guided-branch-button.active {
    border-color: #d98b7c;
    background: linear-gradient(180deg, #f4b1a3, #fff0eb 58%, #fff0eb);
    box-shadow: inset 0 1px rgba(255, 255, 255, .08), 0 4px 0 #cf5944, 0 9px 18px rgba(52, 43, 36, .087);
}

.guided-branch-copy small,
.guided-tree-intro,
.guided-lesson-heading p {
    color: var(--muted);
}

.guided-branch-progress,
.guided-lesson-heading small,
.tree-heading-actions > a {
    color: var(--accent-ink);
}

.guided-skill-button {
    border-color: #d7d0c8;
    border-radius: 9px;
    background: #fffdfa;
    color: var(--ink);
}

.guided-skill-button.active,
.guided-skill-button.complete {
    border-color: #dfa395;
    background: #fff0eb;
}

.guided-skill-button.complete:not(.active) {
    border-color: rgba(7, 139, 116, .35);
    background: #eefaf6;
}

.guided-skill-button.locked {
    background: #f5f0e9;
    color: #9b948e;
}

.guided-lessons-close {
    border-color: var(--line-hi);
    background: #fffaf5;
    color: var(--muted);
}

.guided-lessons-backdrop {
    background: rgba(34, 33, 31, .42);
    backdrop-filter: blur(7px);
}

.guided-lesson-panel.mobile-modal-open {
    border-color: #cec5bc;
    background: linear-gradient(145deg, rgba(234, 118, 95, .08), transparent 45%), rgba(255, 253, 250, .98);
    box-shadow: 0 28px 80px rgba(52, 43, 36, .2), inset 0 1px rgba(255, 255, 255, .04);
}

/* 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: 17px;
    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,
.skill-meter,
.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,
.skill-meter i,
.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, #cf5944, var(--accent));
}

/* Skill tree */
.skill-tree {
    border-color: #d7d0c8;
    background: radial-gradient(circle at 50% 0, rgba(234, 118, 95, .1), transparent 26%), #f8f3ed;
}

.tree-user-card {
    border-color: #dfa395;
    border-radius: 18px;
    background: #fffaf5;
}

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

.tree-user-stats {
    border-color: var(--line);
    background: #f8f3ed;
}

.tree-trunk,
.tree-trunk::before,
.tree-trunk::after,
.skill-node-grid::before,
.skill-node:nth-child(n + 3)::before {
    border-color: #d4ccc4;
    background-color: #d4ccc4;
}

.tree-branch header {
    border-color: #d7d0c8;
    border-radius: 13px;
    background: linear-gradient(180deg, #fff7f1, #fffdfa);
    box-shadow: inset 0 1px rgba(255, 255, 255, .05), 0 7px 18px rgba(52, 43, 36, .068);
}

.tree-branch header > strong {
    color: var(--accent-ink);
}

.skill-node,
.skill-node.unlocked,
.skill-node.complete {
    border-color: #d7d0c8;
    border-radius: 13px;
    background: #fffaf5;
    color: var(--ink);
}

.skill-node.unlocked {
    border-color: #c5bcb3;
    background: #fff0eb;
}

.skill-node.complete {
    border-color: rgba(7, 139, 116, .36);
    background: linear-gradient(145deg, rgba(7, 139, 116, .09), transparent), #eefaf6;
}

/* 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-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), #cf5944);
}

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

.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-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: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: 8px;
    }
}

@media (min-width: 721px) {
    body.is-quick-puzzle .board-paper > #board-task,
    body.is-quick-puzzle .board-paper > #board-share-actions {
        display: none !important;
    }
}

.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;
}

.board-task {
    border-color: #d7d0c8;
    border-radius: 12px;
    background: #f8f3ed;
}

.board-label {
    color: #827b75;
    font-family: var(--mono);
}

.board-label .puzzle-solve-timer {
    color: var(--accent-ink);
}

.puzzle-solve-time-box {
    border-color: #c9bfb5;
    background: #fff0eb;
    box-shadow: inset 0 2px 3px rgba(52, 43, 36, .099);
}

.chessboard {
    border: 7px solid #343b46;
    border-radius: 14px;
    background: #f0e4d2;
    box-shadow: 0 4px 0 #343b46, 0 15px 34px rgba(52, 43, 36, .093), inset 0 0 0 1px rgba(255, 255, 255, .05);
}

.board-square.light {
    background: #f0e4d2;
}

.board-square.dark {
    background: #667b8d;
}

.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: 12px;
    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;
}

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

.board-point-gain > header > span {
    border-radius: 9px;
    background: var(--accent);
    color: var(--ink);
}

.board-point-gain > header small,
.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: 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: 15px;
    background: linear-gradient(145deg, rgba(216, 86, 79, .09), transparent 58%), #fff7f5;
    color: var(--ink);
}

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

.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: 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: 18px;
    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;
}

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

.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: 12px;
    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: 18px;
    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: 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: 28px;
    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; }
}

.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: 20px;
    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: 22px;
    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);
}

body.mobile-dna-modal-open .guide-sticky-steps {
    visibility: hidden;
    pointer-events: none;
}

.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: 15px;
    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: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    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-bar,
.training-session-bar {
    border-color: #d4ccc4;
    border-radius: 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: 20px;
    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: 12px;
    background: #f8f3ed;
}

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

/* 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: 11px;
    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: 15px;
    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: 17px;
    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: 11px;
    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: 11px;
    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: 17px;
}

.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: 12px;
    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: 18px;
    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: 18px;
    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: 16px;
    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: 16px;
    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: 16px;
    background: #f8f3ed;
}

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

.comparison-cta {
    border: 1px solid #d4ccc4;
    border-radius: 18px;
    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,
    .guided-skill-button:not(.locked),
    .skill-node:not(.locked),
    .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,
    .guided-skill-button:not(.locked),
    .skill-node:not(.locked),
    .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,
.guided-skill-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: 11px;
    }

    .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-tree, .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-tree, .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: 16px;
        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-tree, .view-progress) .site-header nav.open a,
    body:is(.view-home, .view-puzzles, .view-tree, .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;
    }

    .site-header nav.open .puzzle-sound-toggle {
        grid-column: 1 / -1;
        padding-inline: 12px;
        justify-content: flex-start;
    }

    .site-header nav.open .puzzle-sound-toggle svg {
        flex: 0 0 auto;
    }

    .site-header nav.open .nav-utility-label {
        display: inline;
    }

    .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: 0;
        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) {
    dialog[open] {
        animation-name: reframe-dialog-mobile-in;
    }

    .site-header {
        min-height: 58px;
        padding: 7px;
        border-radius: 16px;
    }

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

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

    .home-hub-tabs-wrap {
        width: calc(100% - 16px);
        margin-top: 10px;
    }

    .home-hub-tabs {
        border-radius: 14px;
    }

    .home-hub-tabs a {
        min-height: 50px;
        padding: 8px 7px;
        grid-template-columns: 22px minmax(0, 1fr);
        column-gap: 5px;
    }

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

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

    .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: 15px;
    }

    .game-library {
        gap: 8px;
    }

    .guided-game,
    .guided-game:nth-child(n),
    .quick-puzzle {
        border-radius: 13px;
    }

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

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

    .board-paper {
        padding: 7px;
        border-radius: 15px;
    }

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

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

    .puzzle-sticky-actions .button,
    .guide-sticky-actions .button {
        border-radius: 12px;
    }

    .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: 26px 26px 20px 20px;
    }

    .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 {
        right: 10px;
        bottom: max(10px, env(safe-area-inset-bottom));
    }

    .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;
    }

    .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: 12px;
    }

    .share-card-preview,
    .rhythm-share-preview {
        border-radius: 13px;
    }
}

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

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

    .nav-account-button.is-authenticated .nav-account-label {
        display: inline;
        font-size: 10px;
    }
}

/* 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;
    }

    .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,
        .guided-skill-button,
        .skill-node,
        .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: 12px;
    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;
    }
}

/* Tactics and Calculation use the same compact 3D emoji language. */
.tree-branch header > .skill-emoji-shell {
    overflow: visible;
    border: 0;
}

.skill-emoji-shell img,
.skill-node-emoji {
    display: block;
    object-fit: contain;
}

.skill-node-top > strong.has-skill-emoji {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 7px;
}

.skill-node-emoji {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
}

@media (max-width: 680px) {
    .tree-branch header > .skill-emoji-shell {
        display: grid;
        width: 28px;
        height: 28px;
        flex: 0 0 28px;
    }

    .tree-branch header > .skill-emoji-shell img {
        width: 28px;
        height: 28px;
    }
}

/* 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;
    }
}
