:root {
    color-scheme: dark;
    --page: #08090b;
    --shell: #0b0c0e;
    --text: #efede8;
    --muted: #b9bec5;
    --line: #23262b;
    --chip: #15181c;
    --field: #101215;
    --field-border: #575d65;
    --pin: #e8e6e1;
    --pin-border: #e8e6e1;
    --yellow: #f2b705;
    --accent-text: #f2b705;
    --subtle: #8a9098;
    --card: #131720;
    --card-border: #2a2f38;
    --panel: #0e1014;
}

:root[data-theme="light"] {
    color-scheme: light;
    --page: #dedad0;
    --shell: #f7f5f0;
    --text: #14171b;
    --muted: #3e444c;
    --line: #cbc5b8;
    --chip: #e4e0d7;
    --field: #fff;
    --field-border: #8c8676;
    --pin: #fff;
    --pin-border: #b6b0a2;
    --accent-text: #3e444c;
    --subtle: #5e636b;
    --card: #fff;
    --card-border: #c9c3b5;
    --panel: #efece4;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background: var(--page);
    color: var(--text);
    font-family: "Barlow", system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
a {
    font: inherit;
}

button {
    -webkit-tap-highlight-color: transparent;
}

.page-shell {
    min-height: 100vh;
    background: var(--shell);
}

.site-header {
    min-height: 82px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 48px;
    border-bottom: 1px solid var(--line);
}

.brand-mark {
    --brand-pin-size: 5px;
    --brand-pin-gap: 3px;
    --brand-row-gap: 2.5px;
    width: 29px;
    height: 28px;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--brand-row-gap);
}

.brand-mark-row {
    display: flex;
    justify-content: center;
    gap: var(--brand-pin-gap);
}

.brand-mark-row i {
    width: var(--brand-pin-size);
    height: var(--brand-pin-size);
    display: block;
    border-radius: 50%;
    background: var(--text);
}

.brand-mark-head i {
    background: var(--yellow);
    box-shadow: 0 0 8px rgb(242 183 5 / 45%);
}

.brand {
    flex: 1;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .2em;
    text-decoration: none;
    text-transform: uppercase;
}

.theme-toggle {
    padding: 9px 15px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--chip);
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
    border-color: var(--muted);
    color: var(--text);
}

.desktop-actions,
.hero-actions,
.mobile-actions {
    display: flex;
    gap: 12px;
}

.button {
    min-width: 120px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 33px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.1;
    text-align: center;
    text-decoration: none;
}

.button:disabled {
    cursor: not-allowed;
    opacity: 1;
}

.button-primary {
    background: var(--yellow);
    color: #100c00;
}

button.button-primary {
    cursor: pointer;
}

.button-secondary {
    border-color: var(--muted);
    background: transparent;
    color: var(--text);
}

.button-small {
    min-width: auto;
    padding: 9px 17px;
    border-radius: 9px;
    font-size: 14px;
}

.desktop-actions .button-secondary {
    border-color: var(--line);
}

.home-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 50;
    max-width: min(380px, calc(100vw - 48px));
    padding: 13px 16px;
    border: 1px solid var(--card-border);
    border-radius: 11px;
    background: var(--card);
    box-shadow: 0 16px 45px rgb(0 0 0 / 28%);
    color: var(--text);
    font-size: 14px;
    text-align: center;
    opacity: 0;
    transform: translate(-50%, calc(-50% + 8px));
}

.home-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.hero {
    width: min(100%, 1240px);
    min-height: calc(100vh - 82px);
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    align-items: center;
    gap: 80px;
    margin: 0 auto;
    padding: 60px 48px;
}

.hero-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
}

.eyebrow,
h1,
.lede {
    margin: 0;
}

.eyebrow {
    color: var(--accent-text);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .2em;
    text-transform: uppercase;
}

h1 {
    color: var(--text);
    font-family: "Barlow Condensed", sans-serif;
    font-size: clamp(58px, 6.2vw, 92px);
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: .9;
    text-transform: uppercase;
}

.lede {
    max-width: 430px;
    color: var(--muted);
    font-size: 19px;
    line-height: 1.5;
    text-wrap: pretty;
}

.hero-actions {
    margin-top: 6px;
}

.pin-field {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.pin-row {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.pin,
.head-pin {
    width: 74px;
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.pin {
    border: 1.5px solid var(--pin-border);
    background: var(--pin);
    color: #100c00;
    font-family: "Barlow Condensed", sans-serif;
    font-size: 26px;
    font-weight: 600;
}

.head-pin {
    background: var(--yellow);
    box-shadow: 0 0 46px rgb(242 183 5 / 33%);
    color: #100c00;
    font-family: "Barlow Condensed", sans-serif;
    font-size: 30px;
    font-weight: 600;
}

.mobile-actions {
    display: none;
}

.mobile-back {
    display: none;
}

.signup-main {
    width: min(100%, 1240px);
    min-height: calc(100vh - 82px);
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    align-items: center;
    gap: 80px;
    margin: 0 auto;
    padding: 64px 48px;
}

.signup-panel {
    width: 100%;
    max-width: 520px;
}

.signup-intro {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
}

.signup-intro h1 {
    font-size: clamp(52px, 5.4vw, 76px);
}

.signup-lede {
    margin: 0;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.5;
    text-wrap: pretty;
}

.signup-form {
    width: 100%;
    margin-top: 30px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-field {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.form-field-wide {
    grid-column: 1 / -1;
}

.form-field > span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.form-field input {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--field-border);
    border-radius: 11px;
    outline: none;
    background: var(--field);
    color: var(--text);
    font: 16px "Barlow", system-ui, sans-serif;
}

.form-field input::placeholder {
    color: var(--muted);
    opacity: .8;
}

.form-field input:focus {
    border-color: var(--yellow);
    box-shadow: 0 0 0 2px rgb(242 183 5 / 16%);
}

.form-field.has-error input {
    border-color: #ed6a5a;
}

.errorlist {
    margin: 0;
    padding: 0;
    color: #ff9688;
    font-size: 13px;
    line-height: 1.35;
    list-style: none;
}

:root[data-theme="light"] .errorlist {
    color: #a52a1a;
}

.form-alert {
    margin-bottom: 16px;
    color: #ff9688;
    font-size: 14px;
}

.signup-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 24px;
}

.signup-actions p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
}

.auth-text-link,
.forgot-password {
    color: var(--yellow);
    font-weight: 600;
}

.auth-text-link {
    padding: 0;
    border: 0;
    background: transparent;
    text-decoration: none;
    cursor: pointer;
}

.auth-text-link:hover {
    color: #ffd34d;
}

.forgot-password {
    justify-self: start;
    font-size: 15px;
    font-weight: 500;
}

:root[data-theme="light"] .auth-text-link,
:root[data-theme="light"] .forgot-password {
    color: var(--muted);
}

.login-form .form-grid {
    display: flex;
    flex-direction: column;
}

.mobile-login-lede {
    display: none;
}

@media (max-width: 899px) {
    body {
        display: flex;
        justify-content: center;
    }

    .page-shell {
        width: 100%;
        display: flex;
        flex-direction: column;
        padding: 22px clamp(22px, 5vw, 44px) 30px;
    }

    .signup-shell {
        min-height: 100vh;
    }

    .site-header {
        min-height: auto;
        gap: 10px;
        padding: 0;
        border: 0;
    }

    .desktop-actions {
        display: none;
    }

    .brand-mark {
        --brand-pin-size: 3px;
        --brand-pin-gap: 2px;
        --brand-row-gap: 1.5px;
        width: 18px;
        height: 17px;
    }

    .signup-header .mobile-back {
        display: inline;
    }

    .signup-login {
        display: none;
    }

    .brand {
        color: var(--muted);
        font-size: 11px;
        font-weight: 500;
        letter-spacing: .18em;
    }

    .theme-toggle {
        padding: 7px 12px;
        border-radius: 8px;
        font-size: 12px;
    }

    .hero {
        width: 100%;
        min-height: 0;
        flex: 1;
        display: flex;
        flex-direction: column-reverse;
        justify-content: center;
        gap: 26px;
        padding: 30px 0;
    }

    .hero-copy {
        align-items: center;
        gap: 8px;
        text-align: center;
    }

    .eyebrow,
    .hero-actions {
        display: none;
    }

    h1 {
        font-size: clamp(38px, 11vw, 50px);
        letter-spacing: -.015em;
        line-height: .94;
    }

    .lede {
        max-width: 280px;
        font-size: 15px;
        line-height: 1.35;
    }

    .pin-field {
        gap: min(3.2vw, 14px);
    }

    .pin-row {
        gap: min(3.6vw, 16px);
    }

    .pin,
    .head-pin {
        width: min(11vw, 46px);
        height: min(11vw, 46px);
        font-size: min(5vw, 20px);
    }

    .head-pin {
        box-shadow: 0 0 26px rgb(242 183 5 / 33%);
    }

    .mobile-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .mobile-actions .button {
        width: 100%;
        padding: 16px;
    }

    .mobile-actions .button-secondary {
        border-color: var(--line);
    }

    .signup-main {
        width: 100%;
        min-height: 0;
        display: block;
        padding: 38px 0 0;
    }

    .signup-panel {
        max-width: none;
    }

    .signup-intro {
        gap: 6px;
        padding-bottom: 26px;
    }

    .signup-intro .eyebrow {
        display: none;
    }

    .signup-intro h1 {
        font-size: 40px;
        line-height: .95;
    }

    .signup-lede {
        font-size: 15px;
    }

    .signup-form {
        margin-top: 0;
    }

    .form-grid {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .signup-actions {
        flex-direction: column;
        gap: 14px;
        margin-top: 26px;
        padding-bottom: 0;
    }

    .signup-actions .button {
        width: 100%;
        padding: 16px;
    }

    .signup-actions p {
        font-size: 14px;
        text-align: center;
    }

    .signup-pins {
        display: none;
    }

    .login-main {
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .login-panel,
    .login-form {
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .login-actions {
        margin-top: auto;
        padding-top: 26px;
    }

    .desktop-login-lede {
        display: none;
    }

    .mobile-login-lede {
        display: block;
    }

    .forgot-password {
        font-size: 14px;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .theme-toggle,
    .button,
    .pin,
    .head-pin,
    body,
    .page-shell {
        transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
    }
}

/* OCR fixture corpus builder */
.fixture-builder-body { min-height: 100vh; background: var(--page); color: var(--text); }
.fixture-builder-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding-bottom: 48px; }
.fixture-builder-header { min-height: 78px; display: flex; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); }
.fixture-builder-header .brand { margin-right: auto; color: var(--text); text-decoration: none; }
.fixture-builder-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 52px 0 28px; }
.fixture-builder-heading h1 { margin: 5px 0 8px; font: 700 clamp(38px, 6vw, 64px)/.95 "Barlow Condensed", sans-serif; }
.fixture-builder-heading p { max-width: 690px; margin: 0; color: var(--muted); }
.fixture-builder-heading > a { color: var(--muted); text-decoration: none; white-space: nowrap; }
.fixture-builder-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 20px; }
.fixture-builder-card { position: relative; display: flex; flex-direction: column; gap: 18px; padding: 28px; border: 1px solid var(--line); border-radius: 22px; background: var(--card); box-shadow: 0 18px 45px rgb(0 0 0 / 16%); }
.fixture-builder-card h2 { margin: 0 0 5px; font: 700 28px/1 "Barlow Condensed", sans-serif; }
.fixture-builder-card p { margin: 0; color: var(--muted); font-size: 14px; }
.fixture-step { position: absolute; top: 25px; right: 25px; display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: var(--yellow); color: #151515; font-weight: 700; }
.fixture-file-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 130px; padding: 22px; border: 1px dashed var(--field-border); border-radius: 14px; background: var(--chip); cursor: pointer; text-align: center; }
.fixture-file-drop.is-dragging { border-color: var(--yellow); background: color-mix(in srgb, var(--yellow) 12%, var(--chip)); box-shadow: 0 0 0 3px rgb(242 183 5 / 14%); }
.fixture-file-drop input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.fixture-file-drop span { font-weight: 700; }
.fixture-file-drop small { margin-top: 6px; color: var(--subtle); }
.fixture-image-preview { width: 100%; max-height: 300px; object-fit: contain; border-radius: 12px; background: #090909; }
.fixture-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fixture-options label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 600; }
.fixture-options select { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--field-border); border-radius: 10px; background: var(--chip); color: var(--text); }
.fixture-primary-button { min-height: 48px; padding: 12px 18px; border: 0; border-radius: 11px; background: var(--yellow); color: #18150b; font-weight: 700; cursor: pointer; }
.fixture-primary-button:disabled { cursor: not-allowed; opacity: .45; }
.fixture-builder-review textarea { min-height: 460px; resize: vertical; padding: 16px; border: 1px solid var(--field-border); border-radius: 12px; background: #111419; color: #e8edf5; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; tab-size: 2; }
.fixture-builder-review textarea:disabled { opacity: .65; }
.fixture-audit { color: var(--subtle); font-size: 12px; }
.fixture-builder-status { min-height: 24px; margin-top: 18px; padding: 0 4px; color: var(--muted); }
.fixture-builder-status[data-state="error"] { color: #ef767a; }
.fixture-builder-status[data-state="success"] { color: #55b889; }
.fixture-builder-path { margin: 10px 4px 0; color: var(--subtle); font-size: 12px; }
.fixture-builder-path code { overflow-wrap: anywhere; }

@media (max-width: 800px) {
    .fixture-builder-shell { width: min(100% - 24px, 620px); }
    .fixture-builder-header { min-height: 64px; }
    .fixture-builder-header .brand { display: none; }
    .fixture-builder-header .theme-toggle { margin-left: auto; }
    .fixture-builder-heading { align-items: start; padding-top: 32px; }
    .fixture-builder-heading > a { display: none; }
    .fixture-builder-grid { grid-template-columns: 1fr; }
    .fixture-builder-card { padding: 22px; border-radius: 16px; }
    .fixture-builder-review textarea { min-height: 380px; }
}

/* League game setup */
.league-game-body { background: var(--page); }
.league-game-shell { min-height: 100vh; background: var(--shell); }
.league-game-header {
    min-height: 74px; display: flex; align-items: center; gap: 16px;
    padding: 18px 48px; border-bottom: 1px solid var(--line);
}
.league-game-layout {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
    align-items: start; gap: 48px; padding: 50px clamp(24px, 3vw, 48px) 80px;
}
.league-game-main { min-width: 0; display: flex; flex-direction: column; gap: 30px; }
.league-game-intro { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.league-game-intro { position: relative; }
.league-game-reset {
    position: absolute;
    top: 0;
    right: 0;
    padding: 8px 12px;
    border: 1px solid var(--field-border);
    border-radius: 9px;
    background: transparent;
    color: var(--subtle);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .11em;
    text-transform: uppercase;
    cursor: pointer;
}
.league-game-reset:hover,
.league-game-reset:focus-visible {
    border-color: #d96767;
    color: #e58080;
    outline: none;
}
.league-game-reset:disabled { opacity: .55; cursor: wait; }
.league-game-back {
    margin-bottom: 8px; color: var(--muted); font-size: 12px; font-weight: 500;
    letter-spacing: .15em; text-decoration: none; text-transform: uppercase;
}
.league-game-back:hover, .league-game-back:focus-visible { color: var(--text); }
.league-game-intro h1 { font-size: clamp(48px, 5vw, 66px); }
.league-game-intro > p:last-child {
    max-width: 590px; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.45;
}
.lineup-picker { display: flex; flex-direction: column; gap: 8px; }
.lineup-heading { display: flex; align-items: center; gap: 12px; }
.lineup-heading h2 {
    flex: 1; margin: 0; color: var(--muted); font-size: 12px; font-weight: 500;
    letter-spacing: .16em; text-transform: uppercase;
}
.lineup-heading button {
    padding: 8px 14px; border: 1px solid var(--line); border-radius: 9px;
    background: transparent; color: var(--subtle); font-size: 11px; font-weight: 500;
    letter-spacing: .12em; text-transform: uppercase; cursor: pointer;
}
.lineup-heading button:hover, .lineup-heading button:focus-visible { border-color: var(--muted); color: var(--text); }
.lineup-list { display: flex; flex-direction: column; gap: 7px; }
.lineup-row {
    display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 8px 13px 8px 12px;
    border: 1px solid var(--line); border-radius: 11px; background: var(--card);
    transform-origin: center; transition: border-color .15s ease, box-shadow .18s ease, opacity .15s ease, transform .18s ease;
}
.lineup-row.is-here { border-color: var(--yellow); }
.lineup-row.is-out { background: transparent; }
.lineup-row.is-dragging {
    z-index: 1; border-color: color-mix(in srgb, var(--yellow) 70%, white);
    box-shadow: 0 15px 34px rgb(0 0 0 / 28%); opacity: .94; transform: scale(1.015);
}
.lineup-drag {
    width: 28px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; padding: 0;
    border: 0; background: transparent; color: var(--muted); cursor: grab; touch-action: none;
}
.lineup-drag:active { cursor: grabbing; }
.lineup-drag:hover, .lineup-drag:focus-visible { color: var(--text); }
.lineup-drag:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; border-radius: 5px; }
.lineup-drag:disabled { color: var(--line); cursor: default; }
.lineup-drag span { font-size: 21px; line-height: 1; transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) {
    .lineup-row { transition: none; }
}
.lineup-check {
    min-width: 0; flex: 1; display: flex; align-items: center; gap: 12px; padding: 6px 0;
    border: 0; background: transparent; color: var(--text); text-align: left; cursor: pointer;
}
.lineup-dot {
    width: 22px; height: 22px; flex: 0 0 auto; display: grid; place-items: center;
    border: 1.5px solid var(--muted); border-radius: 50%; color: #100c00;
    font-size: 12px; font-weight: 600;
}
.is-here .lineup-dot { border-color: var(--yellow); background: var(--yellow); }
.is-out .lineup-dot { border-color: var(--field-border); }
.lineup-check strong { font-size: 17px; font-weight: 600; }
.lineup-check small { flex: 1; color: var(--subtle); font-size: 13px; text-align: right; }
.is-out .lineup-check strong { color: var(--subtle); }
.lineup-blind {
    padding: 9px 14px; border: 1px solid var(--line); border-radius: 9px;
    background: transparent; color: var(--subtle); font-size: 10px; font-weight: 600;
    letter-spacing: .12em; text-transform: uppercase; cursor: pointer;
}
.is-blind .lineup-blind { border-color: var(--field-border); background: var(--chip); color: var(--text); }
.blind-score input {
    width: 72px; padding: 8px; border: 1px solid var(--field-border); border-radius: 9px;
    background: var(--field); color: var(--text); font-size: 15px; text-align: center;
}
.blind-score input:focus { outline: 2px solid var(--yellow); outline-offset: 1px; }
.lineup-empty { padding: 24px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); }
.league-game-options { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.league-game-option {
    min-height: 236px; display: flex; flex-direction: column; align-items: flex-start; gap: 18px;
    padding: 26px; border: 0; border-radius: 16px; text-align: left; cursor: pointer;
    text-decoration: none;
}
.league-game-options.is-resume { grid-template-columns: minmax(0, 1fr); }
.league-game-options.is-resume .league-game-option { min-height: 190px; }
.league-game-photo { background: var(--yellow); color: #100c00; }
.league-game-live { border: 1px solid var(--card-border); background: var(--card); color: var(--text); }
.league-game-option-copy { flex: 1; display: flex; flex-direction: column; gap: 7px; }
.league-game-option-copy strong {
    font-family: "Barlow Condensed", sans-serif; font-size: 28px; font-weight: 600;
    line-height: 1.02; text-transform: uppercase;
}
.league-game-option-copy small { font-size: 15px; line-height: 1.4; opacity: .75; }
.league-game-option-link { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.league-game-option-link i { font-size: 17px; font-style: normal; opacity: .55; }
.league-game-option.is-disabled { opacity: .55; }
.league-game-summary {
    display: flex; flex-direction: column; gap: 18px; padding: 24px;
    border: 1px solid var(--line); border-radius: 16px; background: var(--panel);
}
.league-game-summary h2, .league-game-summary h3, .league-game-summary p { margin: 0; }
.league-game-summary h2 {
    color: var(--text); font-family: "Barlow Condensed", sans-serif; font-size: 24px;
    font-weight: 600; text-transform: uppercase;
}
.league-game-summary > div:first-child p { margin-top: 5px; color: var(--muted); font-size: 14px; }
.league-game-summary hr { width: 100%; height: 1px; margin: 0; border: 0; background: var(--line); }
.league-game-order h3 {
    margin-bottom: 10px; color: var(--muted); font-size: 11px; font-weight: 500;
    letter-spacing: .16em; text-transform: uppercase;
}
.league-game-order ol { display: flex; flex-direction: column; gap: 9px; margin: 0; padding: 0; counter-reset: lineup; list-style: none; }
.league-game-order li { display: flex; align-items: center; gap: 11px; counter-increment: lineup; }
.league-game-order li::before {
    width: 22px; content: counter(lineup); color: var(--subtle);
    font-family: "Barlow Condensed", sans-serif; font-size: 16px; font-weight: 600;
}
.league-game-order li span { min-width: 0; flex: 1; font-size: 15px; font-weight: 500; }
.league-game-order li small {
    padding: 4px 9px; border-radius: 7px; background: var(--yellow); color: #100c00;
    font-size: 10px; font-weight: 600; letter-spacing: .11em; text-transform: uppercase;
}
.league-game-order li small.is-blind { background: var(--chip); color: var(--muted); }
.league-game-summary > p { color: var(--subtle); font-size: 13px; line-height: 1.45; }
.league-game-toast {
    position: fixed; bottom: 28px; left: 50%; z-index: 50; max-width: calc(100vw - 40px);
    padding: 13px 16px; border: 1px solid var(--card-border); border-radius: 11px;
    background: var(--card); box-shadow: 0 16px 45px rgb(0 0 0 / 28%); color: var(--text);
    font-size: 14px; opacity: 0; transform: translate(-50%, 8px);
}
.league-game-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 1140px) {
    .league-game-layout { grid-template-columns: minmax(0, 1fr); }
    .league-game-summary { grid-row: 2; }
}
@media (max-width: 720px) {
    .league-game-header { min-height: 68px; padding: 16px 20px; }
    .league-game-header .brand-mark {
        --brand-pin-size: 3px;
        --brand-pin-gap: 2px;
        --brand-row-gap: 1.5px;
        width: 18px;
        height: 17px;
        display: flex;
    }
    .league-game-header .brand { font-size: 11px; letter-spacing: .16em; }
    .league-game-header .theme-toggle { padding: 7px 10px; font-size: 12px; }
    .league-game-header .account-name, .league-game-header .account-caret { display: none; }
    .league-game-header .account-trigger {
        padding: 0;
        border: 1px solid var(--field-border);
        background: var(--chip);
    }
    .league-game-layout { gap: 26px; padding: 24px 20px 40px; }
    .league-game-main { gap: 24px; }
    .league-game-intro h1 { font-size: 42px; }
    .league-game-intro > p:last-child { font-size: 15px; }
    .lineup-heading h2 { font-size: 10px; line-height: 1.45; }
    .lineup-row { gap: 6px; padding: 7px 10px 7px 6px; }
    .lineup-check { gap: 9px; }
    .lineup-check strong { min-width: 0; overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
    .lineup-check small { flex: 0 0 auto; font-size: 11px; }
    .lineup-blind { padding: 8px 9px; }
    .blind-score input { width: 58px; }
    .league-game-options { grid-template-columns: 1fr; gap: 12px; }
    .league-game-option { min-height: 0; display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; padding: 18px; }
    .league-game-option .practice-camera, .league-game-option .practice-frame-icon { transform: scale(.72); transform-origin: top left; }
    .league-game-option-copy strong { font-family: "Barlow", sans-serif; font-size: 18px; text-transform: none; }
    .league-game-option-copy small { font-size: 13px; }
    .league-game-option-link { grid-column: 2 / -1; }
    .league-game-summary { padding: 20px; }
}

@media (prefers-reduced-motion: no-preference) {
    .lineup-row, .lineup-heading button, .league-game-option, .league-game-toast {
        transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, opacity 160ms ease, transform 160ms ease;
    }
}

/* Authenticated dashboard */
.dashboard-body {
    min-width: 320px;
    background: var(--page);
}

.dashboard-shell {
    min-height: 100vh;
    background: var(--shell);
}

.drawer-open {
    overflow: hidden;
}

.dashboard-header {
    min-height: 82px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 48px;
    border-bottom: 1px solid var(--line);
}

.account-trigger {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 12px 7px 8px;
    border: 1px solid var(--field-border);
    border-radius: 999px;
    background: var(--chip);
    color: var(--text);
    cursor: pointer;
}

.account-trigger:hover,
.account-trigger:focus-visible {
    border-color: var(--yellow);
    outline: none;
}

.account-avatar,
.drawer-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--yellow);
    color: #100c00;
    font-weight: 600;
}

.account-avatar {
    width: 28px;
    height: 28px;
    font-size: 12px;
}

.account-name {
    max-width: 190px;
    overflow: hidden;
    font-size: 14px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-caret {
    color: var(--subtle);
}

.dashboard-grid {
    width: min(100%, 1240px);
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(290px, .8fr);
    align-items: start;
    gap: 56px;
    margin: 0 auto;
    padding: 52px 48px 72px;
}

.dashboard-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.dashboard-intro {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.dashboard-intro h1 {
    font-size: clamp(48px, 4.6vw, 66px);
}

.dashboard-summary {
    margin: 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.45;
    text-wrap: pretty;
}

.practice-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding: 14px 24px;
    border: 0;
    border-radius: 12px;
    background: var(--yellow);
    color: #100c00;
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.practice-button:hover,
.practice-button:focus-visible {
    box-shadow: 0 0 0 3px rgb(242 183 5 / 18%);
    outline: none;
    transform: translateY(-1px);
}

.bowling-ball {
    position: relative;
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #100c00;
}

.bowling-ball i {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--yellow);
}

.bowling-ball i:nth-child(1) { top: 6px; left: 8px; }
.bowling-ball i:nth-child(2) { top: 5px; left: 15px; }
.bowling-ball i:nth-child(3) { top: 13px; left: 12px; }

.dashboard-section {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.dashboard-section h2 {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
}

.team-card,
.league-card {
    width: 100%;
    border: 1px solid var(--card-border);
    background: var(--card);
    color: var(--text);
    text-align: left;
    cursor: pointer;
}

.team-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
    border-radius: 14px;
    text-decoration: none;
}

.team-card:hover,
.team-card:focus-visible,
.league-card:hover,
.league-card:focus-visible {
    border-color: var(--field-border);
    outline: none;
    transform: translateY(-1px);
}

.team-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.team-initials {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--yellow);
    color: #100c00;
    font: 600 15px "Barlow Condensed", sans-serif;
}

.team-name {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    font-size: 20px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-arrow {
    color: var(--subtle);
    font-size: 19px;
}

.team-stat {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.team-stat strong {
    font: 600 30px/1 "Barlow Condensed", sans-serif;
}

.team-stat span {
    color: var(--subtle);
    font-size: 13px;
}

.league-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.league-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border-color: var(--line);
    border-radius: 13px;
    background: var(--panel);
}

.league-card > span:first-child {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.league-card strong {
    overflow: hidden;
    font-size: 19px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.league-card small {
    color: var(--subtle);
    font-size: 14px;
}

.league-link {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.league-link i {
    font-style: normal;
}

.empty-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
    border: 1px dashed var(--card-border);
    border-radius: 14px;
    color: var(--text);
}

.empty-card-compact {
    padding: 18px 20px;
}

.empty-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--chip);
    color: var(--yellow);
    font-size: 22px;
}

.empty-card div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.empty-card strong {
    font-size: 17px;
    font-weight: 600;
}

.empty-card div span {
    color: var(--subtle);
    font-size: 14px;
}

.dashboard-sidebar {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.action-panel {
    padding: 8px 24px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel);
}

.action-panel summary {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 0;
    color: var(--text);
    cursor: pointer;
    list-style: none;
}

.action-panel summary::-webkit-details-marker { display: none; }

.action-panel summary > span {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.action-panel summary strong {
    font: 600 24px "Barlow Condensed", sans-serif;
    letter-spacing: .01em;
    text-transform: uppercase;
}

.action-panel summary small {
    color: var(--subtle);
    font-size: 14px;
    line-height: 1.35;
}

.action-panel summary > i {
    color: var(--subtle);
    font-size: 15px;
    font-style: normal;
    transition: transform 180ms ease;
}

.action-panel[open] summary > i {
    transform: rotate(180deg);
}

.action-panel-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 2px 0 20px;
}

.action-panel-body hr {
    width: 100%;
    height: 1px;
    margin: 8px 0;
    border: 0;
    background: var(--line);
}

.dashboard-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dashboard-field span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.dashboard-field input {
    width: 100%;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--field-border);
    border-radius: 11px;
    outline: none;
    background: var(--field);
    color: var(--text);
    font: 16px "Barlow", system-ui, sans-serif;
}

.dashboard-field input:focus {
    border-color: var(--yellow);
    box-shadow: 0 0 0 2px rgb(242 183 5 / 16%);
}

.dashboard-submit {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--field-border);
    border-radius: 11px;
    background: var(--chip);
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.dashboard-submit-primary {
    border-color: var(--yellow);
    background: var(--yellow);
    color: #100c00;
}

.account-scrim {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgb(5 6 8 / 60%);
    backdrop-filter: blur(2px);
}

.account-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 41;
    width: min(88vw, 340px);
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--card-border);
    background: var(--shell);
    box-shadow: -24px 0 60px rgb(0 0 0 / 40%);
    transform: translateX(105%);
    visibility: hidden;
}

.account-drawer.is-open {
    transform: translateX(0);
    visibility: visible;
}

.drawer-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 22px 18px;
    border-bottom: 1px solid var(--line);
}

.drawer-avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    font-size: 14px;
}

.drawer-profile > span:nth-child(2) {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.drawer-profile strong,
.drawer-profile small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.drawer-profile strong { font-size: 17px; }
.drawer-profile small { color: var(--subtle); font-size: 13px; }

.drawer-profile button {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 26px;
    cursor: pointer;
}

.account-drawer nav {
    display: flex;
    flex-direction: column;
    padding: 14px 12px;
}

.account-drawer nav button,
.account-drawer nav a {
    display: flex;
    justify-content: space-between;
    padding: 13px 10px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--text);
    font-size: 15px;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.account-drawer nav button:hover,
.account-drawer nav a:hover { background: var(--chip); color: var(--text); }
.account-drawer nav i { color: var(--subtle); font-style: normal; }

.account-drawer-status {
    min-height: 20px;
    margin: 0;
    padding: 0 22px;
    color: var(--subtle);
    font-size: 13px;
}

.drawer-logout {
    margin-top: auto;
    padding: 18px 22px 24px;
    border-top: 1px solid var(--line);
}

.drawer-logout button {
    width: 100%;
    padding: 13px;
    border: 1px solid var(--field-border);
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
}

.dashboard-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 50;
    max-width: min(380px, calc(100vw - 48px));
    padding: 13px 16px;
    border: 1px solid var(--card-border);
    border-radius: 11px;
    background: var(--card);
    box-shadow: 0 16px 45px rgb(0 0 0 / 28%);
    color: var(--text);
    font-size: 14px;
    opacity: 0;
    transform: translateY(8px);
}

.dashboard-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 899px) {
    .dashboard-body {
        display: block;
    }

    .dashboard-shell {
        width: 100%;
        padding: 22px clamp(22px, 5vw, 44px) 34px;
    }

    .dashboard-header {
        min-height: auto;
        gap: 10px;
        padding: 0;
        border: 0;
    }

    .dashboard-header .brand-mark {
        width: 18px;
        height: 17px;
        display: flex;
    }

    .dashboard-header .brand {
        color: var(--text);
        font-size: 11px;
        font-weight: 600;
    }

    .account-trigger {
        width: 36px;
        height: 36px;
        justify-content: center;
        padding: 0;
        border-radius: 50%;
    }

    .account-avatar {
        width: auto;
        height: auto;
        background: transparent;
        color: var(--text);
        font-size: 13px;
    }

    .account-name,
    .account-caret {
        display: none;
    }

    .dashboard-grid {
        display: flex;
        flex-direction: column;
        gap: 28px;
        padding: 30px 0 0;
    }

    .dashboard-main {
        width: 100%;
        gap: 26px;
    }

    .dashboard-intro h1 {
        font-size: 38px;
    }

    .dashboard-intro .eyebrow {
        display: block;
    }

    .dashboard-summary {
        font-size: 15px;
    }

    .practice-button {
        width: 100%;
        margin-top: 10px;
        padding: 15px 18px;
    }

    .practice-button > span:last-child {
        flex: 1;
        text-align: left;
    }

    .team-grid {
        grid-template-columns: 1fr;
    }

    .team-card {
        gap: 10px;
        padding: 15px 16px;
    }

    .team-stat {
        padding-left: 50px;
    }

    .league-card {
        padding: 15px 16px;
    }

    .league-link {
        font-size: 0;
    }

    .league-link i {
        font-size: 18px;
    }

    .dashboard-sidebar {
        width: 100%;
        gap: 12px;
    }

    .action-panel {
        padding: 6px 16px;
        border-radius: 14px;
    }

    .action-panel summary {
        padding: 14px 0;
    }

    .action-panel summary strong {
        font: 500 11px "Barlow", system-ui, sans-serif;
        letter-spacing: .16em;
    }

    .action-panel summary small {
        display: none;
    }

    .dashboard-toast {
        right: 18px;
        bottom: 18px;
        max-width: calc(100vw - 36px);
    }
}

@media (prefers-reduced-motion: no-preference) {
    .home-toast,
    .account-drawer,
    .dashboard-toast,
    .practice-button,
    .team-card,
    .league-card {
        transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, opacity 180ms ease, transform 180ms ease;
    }
}

/* Team detail */
.team-page-body {
    min-width: 320px;
    background: var(--page);
}

.team-page-shell {
    min-height: 100vh;
    background: var(--shell);
}

.team-page-header {
    min-height: 82px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 48px;
    border-bottom: 1px solid var(--line);
}

.team-page-back {
    display: none;
}

.team-dashboard-link {
    padding: 9px 16px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.team-dashboard-link:hover,
.team-dashboard-link:focus-visible {
    border-color: var(--field-border);
    color: var(--text);
    outline: none;
}

.team-page-grid {
    width: min(100%, 1240px);
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(300px, .8fr);
    align-items: start;
    gap: 56px;
    margin: 0 auto;
    padding: 52px 48px 72px;
}

.team-page-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 34px;
}

.team-page-title {
    display: flex;
    align-items: center;
    gap: 18px;
}

.team-page-initials {
    width: 64px;
    height: 64px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--yellow);
    color: #100c00;
    font: 600 26px "Barlow Condensed", sans-serif;
}

.team-page-title > span:last-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.team-page-title h1,
.team-page-title .eyebrow {
    margin: 0;
}

.team-page-title h1 {
    overflow: hidden;
    font-size: clamp(44px, 4.2vw, 60px);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.team-page-title small {
    overflow: hidden;
    color: var(--subtle);
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.start-night-button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 26px 28px;
    border: 0;
    border-radius: 16px;
    background: var(--yellow);
    color: #100c00;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.start-night-button:hover,
.start-night-button:focus-visible {
    box-shadow: 0 0 0 3px rgb(242 183 5 / 18%);
    outline: none;
    transform: translateY(-1px);
}

.start-night-ball {
    position: relative;
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #100c00;
}

.start-night-ball i {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--yellow);
}

.start-night-ball i:nth-child(1) { top: 10px; left: 12px; }
.start-night-ball i:nth-child(2) { top: 8px; left: 26px; }
.start-night-ball i:nth-child(3) { top: 22px; left: 19px; }

.start-night-button > span:nth-child(2) {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.start-night-button strong {
    font: 600 34px/1 "Barlow Condensed", sans-serif;
    letter-spacing: .01em;
    text-transform: uppercase;
}

.start-night-button small {
    color: rgb(16 12 0 / 80%);
    font-size: 15px;
    font-weight: 500;
}

.start-night-button > i {
    color: rgb(16 12 0 / 60%);
    font-size: 26px;
    font-style: normal;
}

.team-roster {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.team-section-heading {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.team-section-heading h2 {
    flex: 1;
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.team-section-heading span {
    color: var(--subtle);
    font-size: 14px;
}

.team-roster-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.roster-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border: 1px solid var(--card-border);
    border-radius: 13px;
    background: var(--card);
    color: var(--text);
    text-decoration: none;
}

.roster-card:hover,
.roster-card:focus-visible {
    border-color: var(--field-border);
    outline: none;
}

.roster-avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--chip);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
}

.roster-avatar.is-captain {
    background: var(--yellow);
    color: #100c00;
}

.roster-person {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.roster-person strong,
.roster-person small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.roster-person strong {
    font-size: 18px;
    font-weight: 600;
}

.roster-person small {
    color: var(--subtle);
    font-size: 14px;
}

.roster-role {
    flex: 0 0 auto;
    color: var(--subtle);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.roster-role.is-unclaimed {
    padding: 6px 8px;
    border: 1px solid var(--field-border);
    border-radius: 999px;
    color: var(--muted);
    letter-spacing: .1em;
}

.roster-person .roster-claim-code {
    color: var(--accent-text);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.roster-chevron {
    color: var(--subtle);
    font-size: 20px;
    font-style: normal;
}

.solo-note {
    margin: 0;
    padding: 18px 20px;
    border: 1px dashed var(--field-border);
    border-radius: 13px;
    color: var(--subtle);
    font-size: 15px;
    line-height: 1.45;
    text-wrap: pretty;
}

.add-bowler-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 17px;
    border: 1px dashed var(--field-border);
    border-radius: 13px;
    background: transparent;
    color: var(--text);
    font: 600 12px "Barlow", system-ui, sans-serif;
    letter-spacing: .16em;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
}

.add-bowler-button span {
    color: var(--yellow);
    font-size: 19px;
    font-weight: 400;
    line-height: 1;
}

.add-bowler-button:hover,
.add-bowler-button:focus-visible {
    border-color: var(--yellow);
    outline: none;
}

.team-invite-panel {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel);
}

.team-invite-intro {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.team-invite-intro h2,
.team-member-panel h2 {
    margin: 0;
    color: var(--text);
    font: 600 24px "Barlow Condensed", sans-serif;
    letter-spacing: .01em;
    text-transform: uppercase;
}

.team-invite-intro p,
.team-member-panel p {
    margin: 0;
    color: var(--subtle);
    font-size: 14px;
    line-height: 1.45;
    text-wrap: pretty;
}

.team-invite-form,
.team-invite-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.team-invite-field > span,
.invite-code-block > span,
.pending-invites h3 {
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.team-invite-field input {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--field-border);
    border-radius: 11px;
    outline: none;
    background: var(--field);
    color: var(--text);
    font: 16px "Barlow", system-ui, sans-serif;
}

.team-invite-field input:focus {
    border-color: var(--yellow);
    box-shadow: 0 0 0 2px rgb(242 183 5 / 16%);
}

.team-invite-field.has-error input {
    border-color: #ed6a5a;
}

.team-invite-form > button {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--field-border);
    border-radius: 11px;
    background: var(--chip);
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.invite-submit-mobile {
    display: none;
}

.team-invite-panel > hr {
    width: 100%;
    height: 1px;
    margin: 0;
    border: 0;
    background: var(--line);
}

.invite-code-block {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.invite-code-block > div {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--field);
}

.invite-code-block strong {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    font: 600 24px "Barlow Condensed", sans-serif;
    letter-spacing: .12em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.invite-code-block button {
    flex: 0 0 auto;
    padding: 9px 14px;
    border: 1px solid var(--field-border);
    border-radius: 9px;
    background: transparent;
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.pending-invites {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding-top: 4px;
}

.pending-invites h3 {
    margin: 0;
}

.pending-invites div {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: 14px;
}

.pending-invites div span {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pending-invites div small {
    flex: 0 0 auto;
    color: var(--subtle);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.invite-note {
    margin: 0;
    color: var(--subtle);
    font-size: 13px;
    line-height: 1.45;
    text-wrap: pretty;
}

.team-page-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 50;
    max-width: min(380px, calc(100vw - 48px));
    padding: 13px 16px;
    border: 1px solid var(--card-border);
    border-radius: 11px;
    background: var(--card);
    box-shadow: 0 16px 45px rgb(0 0 0 / 28%);
    color: var(--text);
    font-size: 14px;
    opacity: 0;
    transform: translateY(8px);
}

.team-page-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 899px) {
    .team-page-body {
        display: block;
    }

    .team-page-shell {
        width: 100%;
        padding: 22px clamp(22px, 5vw, 44px) 34px;
    }

    .team-page-header {
        min-height: auto;
        gap: 10px;
        padding: 0;
        border: 0;
    }

    .team-page-back {
        flex: 1;
        display: block;
        color: var(--muted);
        font-size: 11px;
        font-weight: 500;
        letter-spacing: .18em;
        text-decoration: none;
        text-transform: uppercase;
    }

    .team-page-header .brand-mark,
    .team-page-header .brand,
    .team-dashboard-link {
        display: none;
    }

    .team-page-grid {
        display: flex;
        flex-direction: column;
        gap: 26px;
        padding: 30px 0 0;
    }

    .team-page-main {
        width: 100%;
        gap: 28px;
    }

    .team-page-title {
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr);
        column-gap: 13px;
        row-gap: 0;
    }

    .team-page-initials {
        width: 44px;
        height: 44px;
        border-radius: 11px;
        font-size: 18px;
        grid-column: 1;
        grid-row: 1 / span 2;
    }

    .team-page-title > span:last-child {
        display: contents;
    }

    .team-page-title .eyebrow {
        display: block;
        font-size: 11px;
        grid-column: 2;
        grid-row: 1;
    }

    .team-page-title h1 {
        font-size: 32px;
        grid-column: 2;
        grid-row: 2;
    }

    .team-page-title small {
        margin-top: 6px;
        font-size: 14px;
        grid-column: 1 / -1;
        grid-row: 3;
    }

    .start-night-button {
        gap: 14px;
        padding: 20px 18px;
        border-radius: 14px;
    }

    .start-night-ball {
        width: 34px;
        height: 34px;
    }

    .start-night-ball i {
        width: 5px;
        height: 5px;
    }

    .start-night-ball i:nth-child(1) { top: 7px; left: 9px; }
    .start-night-ball i:nth-child(2) { top: 6px; left: 19px; }
    .start-night-ball i:nth-child(3) { top: 16px; left: 14px; }

    .start-night-button strong {
        font-size: 20px;
    }

    .start-night-button small {
        font-size: 13px;
    }

    .start-night-button > i {
        font-size: 20px;
    }

    .roster-card {
        gap: 13px;
        padding: 15px 16px;
        border-radius: 12px;
    }

    .roster-avatar {
        width: 34px;
        height: 34px;
        font-size: 13px;
    }

    .roster-person strong {
        font-size: 16px;
    }

    .roster-person small {
        font-size: 13px;
    }

    .roster-role {
        display: none;
    }

    .roster-role.is-unclaimed {
        display: block;
        padding: 5px 7px;
        font-size: 9px;
    }

    .solo-note {
        padding: 15px 16px;
        border-radius: 12px;
        font-size: 14px;
    }

    .add-bowler-button {
        gap: 9px;
        padding: 15px;
        border-radius: 12px;
    }

    .add-bowler-button span {
        font-size: 17px;
    }

    .team-invite-panel {
        width: 100%;
        gap: 14px;
        padding: 18px 16px;
        border-radius: 14px;
    }

    .team-invite-intro h2 {
        font: 500 11px "Barlow", system-ui, sans-serif;
        letter-spacing: .16em;
    }

    .team-invite-intro p {
        display: none;
    }

    .team-invite-form {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 9px;
    }

    .team-invite-field {
        display: contents;
    }

    .team-invite-field > span {
        display: none;
    }

    .team-invite-field input {
        min-width: 0;
        grid-column: 1;
    }

    .team-invite-field .errorlist {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .team-invite-form > button {
        width: auto;
        padding-inline: 18px;
        grid-column: 2;
        grid-row: 1;
    }

    .invite-submit-desktop {
        display: none;
    }

    .invite-submit-mobile {
        display: inline;
    }

    .team-page-header .account-trigger {
        display: none;
    }

    .team-page-toast {
        right: 18px;
        bottom: 18px;
        max-width: calc(100vw - 36px);
    }

}

@media (prefers-reduced-motion: no-preference) {
    .team-dashboard-link,
    .start-night-button,
    .add-bowler-button,
    .team-invite-form > button,
    .invite-code-block button,
    .team-page-toast {
        transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, opacity 180ms ease, transform 180ms ease;
    }
}

/* Profile */
.profile-page-body {
    min-width: 320px;
    background: var(--page);
}

.profile-page-shell {
    min-height: 100vh;
    background: var(--shell);
}

.profile-page-header {
    min-height: 82px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 48px;
    border-bottom: 1px solid var(--line);
}

.profile-page-back {
    display: none;
}

.profile-dashboard-link {
    padding: 9px 16px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.profile-page-content {
    width: min(100%, 1240px);
    display: flex;
    flex-direction: column;
    gap: 38px;
    margin: 0 auto;
    padding: 52px 48px 72px;
}

.profile-hero {
    display: flex;
    align-items: center;
    gap: 22px;
}

.profile-avatar {
    width: 88px;
    height: 88px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--yellow);
    color: #100c00;
    font: 600 34px "Barlow Condensed", sans-serif;
}

.profile-identity {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.profile-identity h1,
.profile-identity .eyebrow {
    margin: 0;
}

.profile-identity h1 {
    overflow: hidden;
    font-size: clamp(46px, 4.4vw, 62px);
    line-height: .9;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-identity small {
    overflow: hidden;
    color: var(--subtle);
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-edit {
    border: 1px solid var(--field-border);
    background: transparent;
    color: var(--text);
    font: 600 12px "Barlow", system-ui, sans-serif;
    letter-spacing: .16em;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
}

.profile-edit-desktop {
    flex: 0 0 auto;
    padding: 14px 24px;
    border-radius: 11px;
}

.profile-edit-mobile {
    display: none;
}

.profile-edit:hover,
.profile-edit:focus-visible {
    border-color: var(--yellow);
    outline: none;
}

.unclaimed-profile-banner {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 17px 20px;
    border: 1px solid var(--field-border);
    border-radius: 14px;
    background: var(--panel);
}

.unclaimed-profile-banner > span {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.unclaimed-profile-banner strong {
    font-size: 16px;
}

.unclaimed-profile-banner small {
    color: var(--subtle);
    font-size: 14px;
}

.unclaimed-profile-banner code {
    padding: 8px 10px;
    border-radius: 8px;
    background: var(--chip);
    color: var(--accent-text);
    font: 600 13px "Barlow", system-ui, sans-serif;
    letter-spacing: .08em;
}

.unclaimed-profile-banner a {
    flex: 0 0 auto;
    padding: 11px 15px;
    border-radius: 10px;
    background: var(--yellow);
    color: #100c00;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.profile-stats article {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 22px 24px;
    border: 1px solid var(--card-border);
    border-radius: 15px;
    background: var(--card);
}

.profile-stats article > span {
    color: var(--subtle);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.profile-stats article > strong {
    overflow: hidden;
    font: 700 48px/1 "Barlow Condensed", sans-serif;
    text-overflow: ellipsis;
}

.profile-stats article > small {
    overflow: hidden;
    color: var(--subtle);
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, .68fr);
    align-items: start;
    gap: 44px;
}

.recent-games {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.profile-section-heading {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.profile-section-heading h2,
.career-panel h2 {
    margin: 0;
    color: var(--text);
    font: 600 24px "Barlow Condensed", sans-serif;
    letter-spacing: .01em;
    text-transform: uppercase;
}

.profile-section-heading h2 {
    flex: 1;
}

.profile-section-heading > span {
    display: none;
    color: var(--subtle);
    font-size: 13px;
}

.profile-section-heading > button {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--yellow);
    font: 500 14px "Barlow", system-ui, sans-serif;
    cursor: pointer;
}

.recent-night {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) minmax(0, 340px) 84px;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    border: 1px solid var(--card-border);
    border-radius: 14px;
    background: var(--card);
}

.recent-night-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.recent-night-info strong {
    overflow: hidden;
    font-size: 18px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-night-info small {
    overflow: hidden;
    color: var(--subtle);
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-night-games {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.recent-night-games > span {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--field);
}

.recent-night-games small,
.recent-night-series small {
    color: var(--subtle);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.recent-night-games strong {
    overflow: hidden;
    font: 600 24px/1 "Barlow Condensed", sans-serif;
    text-overflow: ellipsis;
}

.recent-night-games strong.is-best {
    color: var(--yellow);
}

.recent-night-series {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
}

.recent-night-series strong {
    font: 700 34px/1 "Barlow Condensed", sans-serif;
}

.all-scoresheets-mobile {
    display: none;
}

.profile-empty-state {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 22px 24px;
    border: 1px dashed var(--field-border);
    border-radius: 14px;
    color: var(--subtle);
}

.profile-empty-state strong {
    color: var(--text);
    font-size: 16px;
}

.career-panel {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel);
}

.career-panel hr {
    width: 100%;
    height: 1px;
    margin: 0;
    border: 0;
    background: var(--line);
}

.career-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.career-list > div {
    display: flex;
    align-items: baseline;
    gap: 14px;
}

.career-list span {
    flex: 1;
    color: var(--muted);
    font-size: 15px;
}

.career-list strong {
    flex: 0 0 auto;
    font-size: 17px;
    font-weight: 600;
}

.average-by-game {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.average-by-game h3 {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.average-by-game > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.average-by-game span {
    width: 52px;
    flex: 0 0 auto;
    color: var(--subtle);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.average-by-game i {
    height: 8px;
    flex: 1;
    overflow: hidden;
    border-radius: 4px;
    background: var(--field);
}

.average-by-game b {
    height: 100%;
    display: block;
    border-radius: 4px;
    background: var(--yellow);
}

.average-by-game strong {
    width: 34px;
    flex: 0 0 auto;
    font-size: 15px;
    font-weight: 600;
    text-align: right;
}

.profile-page-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 50;
    max-width: min(380px, calc(100vw - 48px));
    padding: 13px 16px;
    border: 1px solid var(--card-border);
    border-radius: 11px;
    background: var(--card);
    box-shadow: 0 16px 45px rgb(0 0 0 / 28%);
    color: var(--text);
    font-size: 14px;
    opacity: 0;
    transform: translateY(8px);
}

.profile-page-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 899px) {
    .profile-page-body {
        width: 100%;
        display: block;
        overflow-x: hidden;
    }

    .profile-page-shell {
        width: 100%;
        min-width: 0;
        padding: 22px clamp(22px, 5vw, 44px) 40px;
    }

    .profile-page-header {
        min-height: auto;
        gap: 10px;
        padding: 0;
        border: 0;
    }

    .profile-page-back {
        flex: 1;
        display: block;
        color: var(--muted);
        font-size: 11px;
        font-weight: 500;
        letter-spacing: .18em;
        text-decoration: none;
        text-transform: uppercase;
    }

    .profile-page-header .brand-mark,
    .profile-page-header .brand,
    .profile-dashboard-link {
        display: none;
    }

    .profile-page-content {
        gap: 0;
        padding: 30px 0 0;
    }

    .profile-hero {
        gap: 15px;
        padding-bottom: 18px;
    }

    .profile-avatar {
        width: 62px;
        height: 62px;
        font-size: 24px;
    }

    .profile-identity {
        gap: 3px;
    }

    .profile-identity h1 {
        font-size: 34px;
    }

    .profile-identity small {
        font-size: 14px;
    }

    .profile-team-schedule {
        display: none;
    }

    .profile-edit-desktop {
        display: none;
    }

    .profile-edit-mobile {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 14px 16px;
        border-color: var(--line);
        border-radius: 12px;
        background: var(--chip);
        text-align: left;
    }

    .profile-edit-mobile span {
        flex: 1;
    }

    .profile-edit-mobile i {
        color: var(--subtle);
        font-size: 18px;
        font-style: normal;
    }

    .unclaimed-profile-banner {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
        margin-top: 4px;
        padding: 15px 16px;
    }

    .unclaimed-profile-banner code,
    .unclaimed-profile-banner a {
        text-align: center;
    }

    .profile-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 11px;
        padding-top: 22px;
    }

    .profile-stats article {
        gap: 5px;
        padding: 15px 16px;
        border-radius: 13px;
    }

    .profile-stats article > span {
        font-size: 10px;
    }

    .profile-stats article > strong {
        font-size: 32px;
    }

    .profile-stats article > small {
        font-size: 12px;
    }

    .profile-detail-grid {
        display: flex;
        flex-direction: column;
        gap: 28px;
        padding-top: 28px;
    }

    .recent-games {
        width: 100%;
        gap: 11px;
    }

    .profile-section-heading h2 {
        color: var(--muted);
        font: 500 11px "Barlow", system-ui, sans-serif;
        letter-spacing: .16em;
    }

    .profile-section-heading > span {
        display: block;
    }

    .profile-section-heading > button {
        display: none;
    }

    .recent-night {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 11px;
        padding: 15px 16px;
        border-radius: 13px;
    }

    .recent-night-info {
        position: relative;
        padding-right: 84px;
    }

    .recent-night-info strong {
        font-size: 16px;
    }

    .recent-night-info small {
        font-size: 13px;
    }

    .recent-night-series {
        position: absolute;
        right: 16px;
        margin-top: 1px;
    }

    .recent-night-series strong {
        font-size: 24px;
    }

    .recent-night-games {
        gap: 9px;
    }

    .recent-night-games > span {
        padding: 10px 11px;
    }

    .recent-night-games strong {
        font-size: 21px;
    }

    .all-scoresheets-mobile {
        width: 100%;
        display: block;
        padding: 14px;
        border: 1px solid var(--field-border);
        border-radius: 12px;
        background: transparent;
        color: var(--text);
        font: 600 12px "Barlow", system-ui, sans-serif;
        letter-spacing: .16em;
        text-transform: uppercase;
        cursor: pointer;
    }

    .career-panel {
        width: 100%;
        gap: 11px;
        padding: 0;
        border: 0;
        background: transparent;
    }

    .career-panel h2 {
        color: var(--muted);
        font: 500 11px "Barlow", system-ui, sans-serif;
        letter-spacing: .16em;
    }

    .career-panel hr,
    .average-by-game {
        display: none;
    }

    .career-list {
        gap: 10px;
        padding: 16px;
        border: 1px solid var(--line);
        border-radius: 13px;
        background: var(--panel);
    }

    .career-list span {
        font-size: 14px;
    }

    .career-list strong {
        font-size: 16px;
    }

    .profile-page-toast {
        right: 18px;
        bottom: 18px;
        max-width: calc(100vw - 36px);
    }
}

@media (prefers-reduced-motion: no-preference) {
    .profile-edit,
    .profile-dashboard-link,
    .profile-page-toast,
    .all-scoresheets-mobile {
        transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, opacity 180ms ease, transform 180ms ease;
    }
}

/* Claim a bowler */
.claim-bowler-body {
    min-width: 320px;
    background: var(--page);
}

.claim-bowler-shell {
    min-height: 100vh;
    background: var(--shell);
}

.claim-bowler-header {
    min-height: 82px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 48px;
    border-bottom: 1px solid var(--line);
}

.claim-bowler-back {
    display: none;
}

.claim-bowler-cancel {
    padding: 9px 16px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.claim-bowler-layout {
    width: 100%;
    max-width: 1050px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, .72fr);
    align-items: start;
    gap: 64px;
    margin: 0 auto;
    padding: 58px 48px 72px;
}

.claim-bowler-form {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.claim-bowler-intro {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.claim-bowler-intro h1 {
    margin: 0;
    font: 700 clamp(46px, 4.4vw, 62px) / .9 "Barlow Condensed", sans-serif;
    letter-spacing: -.02em;
    text-transform: uppercase;
}

.claim-bowler-intro p {
    max-width: 580px;
    margin: 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.45;
}

.claim-bowler-form > label {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.claim-bowler-form > label > span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.claim-bowler-form input {
    width: 100%;
    padding: 16px;
    border: 1px solid var(--field-border);
    border-radius: 12px;
    outline: none;
    background: var(--field);
    color: var(--text);
    font-size: 18px;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.claim-bowler-form input:focus {
    border-color: var(--yellow);
    box-shadow: 0 0 0 3px rgb(242 183 5 / 12%);
}

.claim-bowler-form .has-error input {
    border-color: #d96767;
}

.claim-bowler-form .errorlist,
.claim-bowler-errors .errorlist {
    margin: 0;
    padding: 0;
    list-style: none;
    color: #e58080;
    font-size: 13px;
}

.claim-bowler-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.claim-bowler-actions button,
.claim-bowler-actions a {
    padding: 16px 28px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
}

.claim-bowler-actions button {
    border: 0;
    background: var(--yellow);
    color: #100c00;
    cursor: pointer;
}

.claim-bowler-actions a {
    border: 1px solid var(--field-border);
    color: var(--text);
}

.claim-bowler-info {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel);
}

.claim-bowler-info h2 {
    margin: 0;
    font: 600 25px "Barlow Condensed", sans-serif;
    text-transform: uppercase;
}

.claim-bowler-info ul {
    display: flex;
    flex-direction: column;
    gap: 13px;
    margin: 0;
    padding: 18px 0;
    border-block: 1px solid var(--line);
    list-style: none;
}

.claim-bowler-info li {
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 14px;
    font-weight: 500;
}

.claim-bowler-info li i {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--yellow);
    color: #100c00;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
}

.claim-bowler-info p {
    margin: 0;
    color: var(--subtle);
    font-size: 13px;
    line-height: 1.45;
}

@media (max-width: 899px) {
    .claim-bowler-shell {
        padding: 22px clamp(22px, 5vw, 44px) 34px;
    }

    .claim-bowler-header {
        min-height: auto;
        gap: 10px;
        padding: 0;
        border: 0;
    }

    .claim-bowler-back {
        flex: 1;
        display: block;
        color: var(--muted);
        font-size: 11px;
        font-weight: 500;
        letter-spacing: .18em;
        text-decoration: none;
        text-transform: uppercase;
    }

    .claim-bowler-header .brand-mark,
    .claim-bowler-header .brand,
    .claim-bowler-cancel {
        display: none;
    }

    .claim-bowler-layout {
        display: block;
        padding: 34px 0 0;
    }

    .claim-bowler-form {
        gap: 22px;
    }

    .claim-bowler-intro h1 {
        font-size: 38px;
    }

    .claim-bowler-intro p {
        font-size: 15px;
    }

    .claim-bowler-actions {
        flex-direction: column;
        gap: 12px;
    }

    .claim-bowler-actions button,
    .claim-bowler-actions a {
        width: 100%;
        text-align: center;
    }

    .claim-bowler-info {
        margin-top: 28px;
        padding: 20px;
    }
}

/* Edit profile */
.edit-profile-body {
    min-width: 320px;
    background: var(--page);
}

.edit-profile-shell {
    min-height: 100vh;
    background: var(--shell);
}

.edit-profile-header {
    min-height: 82px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 48px;
    border-bottom: 1px solid var(--line);
}

.edit-profile-back {
    display: none;
}

.edit-profile-cancel-header {
    padding: 9px 16px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.edit-profile-grid {
    width: min(100%, 1180px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, .78fr);
    align-items: start;
    gap: 64px;
    margin: 0 auto;
    padding: 52px 48px 72px;
}

.edit-profile-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.edit-profile-intro {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.edit-profile-intro h1,
.edit-profile-intro p {
    margin: 0;
}

.edit-profile-intro h1 {
    font-size: clamp(46px, 4.4vw, 62px);
    line-height: .9;
}

.edit-profile-intro p {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.45;
    text-wrap: pretty;
}

.edit-profile-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.edit-profile-fields label {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.edit-profile-fields label > span,
.profile-preview-panel > h2 {
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.edit-profile-fields input {
    width: 100%;
    min-width: 0;
    padding: 15px 16px;
    border: 1px solid var(--field-border);
    border-radius: 12px;
    outline: none;
    background: var(--field);
    color: var(--text);
    font: 16px "Barlow", system-ui, sans-serif;
}

.edit-profile-fields input:focus {
    border-color: var(--yellow);
    box-shadow: 0 0 0 2px rgb(242 183 5 / 16%);
}

.edit-profile-fields .errorlist,
.edit-profile-errors .errorlist {
    margin: 0;
    padding: 0;
    color: var(--yellow);
    font-size: 13px;
    list-style: none;
}

.edit-profile-email-field {
    grid-column: 1 / -1;
}

.edit-profile-email-field > small {
    color: var(--subtle);
    font-size: 14px;
    line-height: 1.4;
}

.edit-profile-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.edit-profile-actions > button,
.edit-profile-actions > a {
    padding: 16px 28px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
}

.edit-profile-actions > button {
    padding-inline: 34px;
    border: 0;
    background: var(--yellow);
    color: #100c00;
    font: 600 17px "Barlow", system-ui, sans-serif;
    cursor: pointer;
}

.edit-profile-actions > a {
    border: 1px solid var(--field-border);
    color: var(--text);
    text-decoration: none;
}

.edit-profile-errors {
    order: 3;
}

.profile-preview-panel {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel);
}

.profile-preview-panel > h2 {
    margin: 0;
}

.profile-preview-card,
.edit-profile-mobile-preview {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--card-border);
    border-radius: 13px;
    background: var(--card);
}

.edit-profile-preview-avatar {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--yellow);
    color: #100c00;
    font-size: 18px;
    font-weight: 600;
}

.profile-preview-card > span:last-child,
.edit-profile-mobile-preview > span:last-child {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-preview-card strong,
.profile-preview-card small,
.edit-profile-mobile-preview strong,
.edit-profile-mobile-preview small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-preview-card strong {
    font-size: 19px;
}

.profile-preview-card small,
.edit-profile-mobile-preview small {
    color: var(--subtle);
    font-size: 14px;
}

.profile-preview-panel hr {
    width: 100%;
    height: 1px;
    margin: 0;
    border: 0;
    background: var(--line);
}

.profile-preview-facts {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.profile-preview-facts > div {
    display: flex;
    align-items: baseline;
    gap: 14px;
}

.profile-preview-facts span {
    width: 96px;
    flex: 0 0 auto;
    color: var(--subtle);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.profile-preview-facts strong {
    min-width: 0;
    flex: 1;
    font-size: 15px;
    font-weight: 500;
}

.profile-preview-password,
.edit-profile-mobile-password {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--field);
    color: var(--text);
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.profile-preview-password > span,
.edit-profile-mobile-password > span {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-preview-password strong,
.edit-profile-mobile-password strong {
    font-size: 16px;
    font-weight: 600;
}

.profile-preview-password small,
.edit-profile-mobile-password small {
    color: var(--subtle);
    font-size: 13px;
}

.profile-preview-password i,
.edit-profile-mobile-password i {
    color: var(--subtle);
    font-size: 20px;
    font-style: normal;
}

.edit-profile-mobile-preview,
.edit-profile-mobile-password {
    display: none;
}

.edit-profile-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 50;
    max-width: min(380px, calc(100vw - 48px));
    padding: 13px 16px;
    border: 1px solid var(--card-border);
    border-radius: 11px;
    background: var(--card);
    box-shadow: 0 16px 45px rgb(0 0 0 / 28%);
    color: var(--text);
    font-size: 14px;
    opacity: 0;
    transform: translateY(8px);
}

.edit-profile-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 899px) {
    .edit-profile-shell {
        padding: 22px clamp(22px, 5vw, 44px) 34px;
    }

    .edit-profile-header {
        min-height: auto;
        gap: 10px;
        padding: 0;
        border: 0;
    }

    .edit-profile-back {
        flex: 1;
        display: block;
        color: var(--muted);
        font-size: 11px;
        font-weight: 500;
        letter-spacing: .18em;
        text-decoration: none;
        text-transform: uppercase;
    }

    .edit-profile-header .brand-mark,
    .edit-profile-header .brand,
    .edit-profile-cancel-header {
        display: none;
    }

    .edit-profile-grid {
        display: block;
        padding: 32px 0 0;
    }

    .edit-profile-main {
        gap: 20px;
    }

    .edit-profile-intro {
        gap: 6px;
        padding-bottom: 4px;
    }

    .edit-profile-intro h1 {
        font-size: 38px;
    }

    .edit-profile-intro p {
        font-size: 15px;
    }

    .edit-profile-mobile-preview {
        display: flex;
        padding: 15px 16px;
    }

    .edit-profile-mobile-preview .edit-profile-preview-avatar {
        width: 44px;
        height: 44px;
        font-size: 17px;
    }

    .edit-profile-mobile-preview strong {
        font-size: 17px;
    }

    .edit-profile-mobile-preview small {
        font-size: 13px;
    }

    .edit-profile-fields {
        gap: 16px 12px;
    }

    .edit-profile-fields input {
        padding: 15px 14px;
        border-radius: 11px;
    }

    .edit-profile-email-field > small {
        font-size: 13px;
    }

    .profile-preview-panel {
        display: none;
    }

    .edit-profile-mobile-password {
        display: flex;
        margin-top: 0;
        background: var(--panel);
    }

    .edit-profile-actions {
        flex-direction: column;
        gap: 12px;
        padding-top: 2px;
    }

    .edit-profile-actions > button,
    .edit-profile-actions > a {
        width: 100%;
        padding: 16px;
        text-align: center;
    }

    .edit-profile-actions > button { order: 2; }
    .edit-profile-actions > a { order: 3; }
    .edit-profile-errors { width: 100%; order: 1; }

    .edit-profile-toast {
        right: 18px;
        bottom: 18px;
        max-width: calc(100vw - 36px);
    }
}

@media (prefers-reduced-motion: no-preference) {
    .edit-profile-cancel-header,
    .edit-profile-actions > button,
    .edit-profile-actions > a,
    .profile-preview-password,
    .edit-profile-mobile-password,
    .edit-profile-toast {
        transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, opacity 180ms ease, transform 180ms ease;
    }
}

/* Update password */
.update-password-body {
    min-width: 320px;
    background: var(--page);
}

.update-password-shell {
    min-height: 100vh;
    background: var(--shell);
}

.update-password-header {
    min-height: 82px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 48px;
    border-bottom: 1px solid var(--line);
}

.update-password-back {
    display: none;
}

.update-password-cancel-header {
    padding: 9px 16px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.update-password-grid {
    width: 100%;
    max-width: 1180px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, .78fr);
    align-items: start;
    gap: 64px;
    margin: 0 auto;
    padding: 52px 48px 72px;
}

.update-password-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.update-password-intro {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.update-password-intro h1 {
    margin: 0;
    color: var(--text);
    font: 700 clamp(46px, 4.4vw, 62px) / .9 "Barlow Condensed", sans-serif;
    letter-spacing: -.02em;
    text-transform: uppercase;
}

.update-password-intro p,
.password-rules-panel p {
    margin: 0;
    color: var(--muted);
}

.update-password-intro p {
    font-size: 17px;
}

.update-password-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
}

.update-password-fields label {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.update-password-current {
    grid-column: 1 / -1;
}

.update-password-fields label > span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.update-password-fields input {
    width: 100%;
    min-width: 0;
    padding: 15px 16px;
    border: 1px solid var(--field-border);
    border-radius: 12px;
    outline: none;
    background: var(--field);
    color: var(--text);
    font: 16px "Barlow", sans-serif;
}

.update-password-fields input:focus {
    border-color: var(--yellow);
    box-shadow: 0 0 0 3px rgb(242 183 5 / 12%);
}

.update-password-fields .has-error input {
    border-color: #d96767;
}

.update-password-fields .errorlist,
.update-password-errors .errorlist {
    margin: 0;
    padding: 0;
    list-style: none;
    color: #e58080;
    font-size: 13px;
}

.update-password-helper {
    display: flex;
    align-items: center;
    gap: 14px;
}

.update-password-helper button {
    flex: 0 0 auto;
    padding: 11px 16px;
    border: 1px solid var(--field-border);
    border-radius: 10px;
    background: var(--chip);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.update-password-helper span {
    color: var(--subtle);
    font-size: 14px;
}

.update-password-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.update-password-actions button,
.update-password-actions a {
    padding: 16px 28px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
}

.update-password-actions button {
    padding-inline: 34px;
    border: 0;
    background: var(--yellow);
    color: #100c00;
    font-size: 17px;
    cursor: pointer;
}

.update-password-actions a {
    border: 1px solid var(--field-border);
    color: var(--text);
}

.password-rules-panel {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel);
}

.password-rules-panel h2 {
    margin: 0 0 5px;
    color: var(--text);
    font: 600 24px "Barlow Condensed", sans-serif;
    letter-spacing: .01em;
    text-transform: uppercase;
}

.password-rules-panel p {
    font-size: 14px;
}

.password-rules-panel hr {
    width: 100%;
    height: 1px;
    margin: 0;
    border: 0;
    background: var(--line);
}

.password-rule-list {
    display: flex;
    flex-direction: column;
    gap: 11px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.password-rule-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
}

.password-rule-list i {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--line);
}

.password-rule-list .is-met i {
    background: var(--yellow);
}

.password-account-fact {
    display: flex;
    align-items: baseline;
    gap: 14px;
}

.password-account-fact span {
    width: 96px;
    flex: 0 0 auto;
    color: var(--subtle);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.password-account-fact strong {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 15px;
    font-weight: 500;
}

@media (max-width: 899px) {
    .update-password-shell {
        display: flex;
        flex-direction: column;
        padding: 22px clamp(22px, 5vw, 44px) 34px;
    }

    .update-password-header {
        min-height: auto;
        gap: 10px;
        padding: 0;
        border: 0;
    }

    .update-password-back {
        flex: 1;
        display: block;
        color: var(--muted);
        font-size: 11px;
        font-weight: 500;
        letter-spacing: .18em;
        text-decoration: none;
        text-transform: uppercase;
    }

    .update-password-header .brand-mark,
    .update-password-header .brand,
    .update-password-cancel-header {
        display: none;
    }

    .update-password-grid {
        flex: 1;
        display: block;
        padding: 32px 0 0;
    }

    .update-password-main {
        min-height: calc(100vh - 112px);
        gap: 20px;
    }

    .update-password-intro {
        gap: 6px;
        padding-bottom: 4px;
    }

    .update-password-intro h1 {
        font-size: 38px;
        line-height: .95;
    }

    .update-password-intro p {
        font-size: 15px;
    }

    .update-password-fields {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .update-password-fields input {
        padding: 15px 14px;
        border-radius: 11px;
    }

    .update-password-helper {
        gap: 12px;
    }

    .update-password-helper button {
        padding: 9px 14px;
        border-radius: 9px;
        font-size: 13px;
    }

    .update-password-helper span {
        font-size: 13px;
    }

    .password-rules-panel {
        display: none;
    }

    .update-password-actions {
        flex-direction: column;
        gap: 12px;
        margin-top: auto;
        padding-top: 22px;
    }

    .update-password-actions button,
    .update-password-actions a {
        width: 100%;
        padding: 16px;
        text-align: center;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .update-password-cancel-header,
    .update-password-helper button,
    .update-password-actions button,
    .update-password-actions a,
    .password-rule-list i {
        transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
    }
}

/* Add bowlers */
.add-bowlers-body {
    min-width: 320px;
    background: var(--page);
}

.add-bowlers-shell {
    min-height: 100vh;
    background: var(--shell);
}

.add-bowlers-header {
    min-height: 82px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 48px;
    border-bottom: 1px solid var(--line);
}

.add-bowlers-back {
    display: none;
}

.add-bowlers-cancel-header {
    padding: 9px 16px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.add-bowlers-grid {
    width: min(100%, 1180px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, .78fr);
    align-items: start;
    gap: 64px;
    margin: 0 auto;
    padding: 52px 48px 72px;
}

.add-bowlers-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.add-bowlers-intro {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.add-bowlers-intro h1,
.add-bowlers-intro p {
    margin: 0;
}

.add-bowlers-intro h1 {
    font-size: clamp(46px, 4.4vw, 62px);
    line-height: .9;
}

.add-bowlers-intro p {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.45;
    text-wrap: pretty;
}

.bowler-form-area,
.bowler-rows {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bowler-column-headings,
.bowler-row {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) minmax(0, 1fr) 92px;
    align-items: center;
    gap: 12px;
}

.bowler-column-headings {
    padding: 0 4px;
}

.bowler-column-headings span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.bowler-column-headings span:first-child,
.bowler-row-number {
    color: var(--subtle);
}

.bowler-row-number {
    font: 600 16px "Barlow Condensed", sans-serif;
}

.bowler-row-heading {
    display: none;
}

.bowler-field {
    min-width: 0;
}

.bowler-field input {
    width: 100%;
    min-width: 0;
    padding: 15px 16px;
    border: 1px solid var(--field-border);
    border-radius: 12px;
    outline: none;
    background: var(--field);
    color: var(--text);
    font: 16px "Barlow", system-ui, sans-serif;
}

.bowler-field input:focus {
    border-color: var(--yellow);
    box-shadow: 0 0 0 2px rgb(242 183 5 / 16%);
}

.bowler-field .errorlist,
.bowler-row > .errorlist,
.add-bowlers-errors .errorlist {
    margin: 7px 0 0;
    padding: 0;
    color: var(--yellow);
    font-size: 13px;
    list-style: none;
}

.bowler-row > .errorlist {
    grid-column: 2 / 4;
}

.bowler-row > input[name$="-DELETE"] {
    display: none;
}

.bowler-row.is-removed {
    display: none;
}

.bowler-remove-desktop,
.bowler-row-heading button {
    padding: 11px 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: transparent;
    color: var(--subtle);
    font: 500 11px "Barlow", system-ui, sans-serif;
    letter-spacing: .12em;
    text-transform: uppercase;
    cursor: pointer;
}

.bowler-remove-desktop:hover,
.bowler-remove-desktop:focus-visible,
.bowler-row-heading button:hover,
.bowler-row-heading button:focus-visible {
    border-color: var(--field-border);
    color: var(--text);
    outline: none;
}

.add-another-bowler {
    align-self: flex-start;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 20px;
    border: 1px dashed var(--field-border);
    border-radius: 12px;
    background: transparent;
    color: var(--text);
    font: 600 12px "Barlow", system-ui, sans-serif;
    letter-spacing: .16em;
    text-transform: uppercase;
    cursor: pointer;
}

.add-another-bowler span {
    color: var(--yellow);
    font-size: 18px;
    font-weight: 400;
    line-height: 1;
}

.add-another-bowler:hover,
.add-another-bowler:focus-visible {
    border-color: var(--yellow);
    outline: none;
}

.add-bowlers-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.add-bowlers-actions > button,
.add-bowlers-actions > a {
    padding: 16px 28px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
}

.add-bowlers-actions > button {
    padding-inline: 34px;
    border: 0;
    background: var(--yellow);
    color: #100c00;
    font-size: 17px;
    cursor: pointer;
}

.add-bowlers-actions > a {
    border: 1px solid var(--field-border);
    color: var(--text);
    text-decoration: none;
}

.add-bowlers-errors {
    order: 3;
    color: var(--yellow);
}

.claim-panel,
.add-bowlers-mobile-help {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel);
}

.claim-panel h2,
.claim-panel p,
.add-bowlers-mobile-help p {
    margin: 0;
}

.claim-panel h2 {
    font: 600 24px "Barlow Condensed", sans-serif;
    letter-spacing: .01em;
    text-transform: uppercase;
}

.claim-panel > div:first-child {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.claim-panel > div:first-child p,
.claim-panel li p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
    text-wrap: pretty;
}

.claim-panel hr {
    width: 100%;
    height: 1px;
    margin: 0;
    border: 0;
    background: var(--line);
}

.claim-panel ol {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.claim-panel li {
    display: flex;
    gap: 12px;
}

.claim-panel li > span {
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--chip);
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
}

.claim-code {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--field);
}

.claim-code > span {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.claim-code small {
    color: var(--subtle);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.claim-code strong {
    overflow: hidden;
    font: 600 22px "Barlow Condensed", sans-serif;
    letter-spacing: .12em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.claim-code button {
    padding: 9px 14px;
    border: 1px solid var(--field-border);
    border-radius: 9px;
    background: transparent;
    color: var(--text);
    font: 500 13px "Barlow", system-ui, sans-serif;
    cursor: pointer;
}

.claim-panel .bowler-count-note {
    color: var(--subtle);
    font-size: 13px;
}

.add-bowlers-mobile-help {
    display: none;
}

@media (max-width: 899px) {
    .add-bowlers-shell {
        padding: 22px clamp(22px, 5vw, 44px) 34px;
    }

    .add-bowlers-header {
        min-height: auto;
        gap: 10px;
        padding: 0;
        border: 0;
    }

    .add-bowlers-back {
        flex: 1;
        display: block;
        color: var(--muted);
        font-size: 11px;
        font-weight: 500;
        letter-spacing: .18em;
        text-decoration: none;
        text-transform: uppercase;
    }

    .add-bowlers-header .brand-mark,
    .add-bowlers-header .brand,
    .add-bowlers-cancel-header {
        display: none;
    }

    .add-bowlers-grid {
        display: block;
        padding: 32px 0 0;
    }

    .add-bowlers-main {
        gap: 24px;
    }

    .add-bowlers-intro {
        gap: 6px;
    }

    .add-bowlers-team-name {
        display: none;
    }

    .add-bowlers-intro h1 {
        font-size: 38px;
    }

    .add-bowlers-intro p {
        font-size: 15px;
    }

    .bowler-column-headings {
        display: none;
    }

    .bowler-rows {
        gap: 14px;
    }

    .bowler-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 10px;
        padding: 15px 15px 16px;
        border: 1px solid var(--card-border);
        border-radius: 13px;
        background: var(--card);
    }

    .bowler-row-heading {
        grid-column: 1 / -1;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .bowler-row-heading > span {
        flex: 1;
        color: var(--muted);
        font-size: 11px;
        font-weight: 500;
        font-style: normal;
        letter-spacing: .16em;
        text-transform: uppercase;
    }

    .bowler-row-heading i {
        font-style: normal;
    }

    .bowler-row-heading button {
        padding: 5px 10px;
        border-radius: 8px;
    }

    .bowler-row-number,
    .bowler-remove-desktop {
        display: none;
    }

    .bowler-field input {
        padding: 14px;
        border-radius: 11px;
    }

    .bowler-row > .errorlist {
        grid-column: 1 / -1;
    }

    .add-another-bowler {
        width: 100%;
        justify-content: center;
        gap: 9px;
        padding: 15px;
    }

    .add-another-bowler span {
        font-size: 17px;
    }

    .claim-panel {
        display: none;
    }

    .add-bowlers-mobile-help {
        display: flex;
        gap: 7px;
        padding: 16px;
        border-radius: 13px;
    }

    .add-bowlers-mobile-help strong {
        color: var(--muted);
        font-size: 11px;
        font-weight: 500;
        letter-spacing: .16em;
        text-transform: uppercase;
    }

    .add-bowlers-mobile-help p,
    .add-bowlers-mobile-help a {
        color: var(--muted);
        font-size: 14px;
        line-height: 1.45;
    }

    .add-bowlers-mobile-help a {
        color: var(--yellow);
        font-weight: 500;
    }

    .add-bowlers-actions {
        flex-direction: column;
        gap: 12px;
        padding-top: 0;
    }

    .add-bowlers-actions > button,
    .add-bowlers-actions > a {
        width: 100%;
        padding: 16px;
        text-align: center;
    }

    .add-bowlers-actions > button {
        order: 2;
    }

    .add-bowlers-actions > a {
        order: 3;
    }

    .add-bowlers-errors {
        width: 100%;
        order: 1;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .add-bowlers-cancel-header,
    .add-another-bowler,
    .bowler-remove-desktop,
    .bowler-row-heading button,
    .add-bowlers-actions > button,
    .add-bowlers-actions > a,
    .claim-code button {
        transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 180ms ease;
    }
}

/* Create team */
.create-team-body {
    min-width: 320px;
    background: var(--page);
}

.create-team-shell {
    min-height: 100vh;
    background: var(--shell);
}

.create-team-header {
    min-height: 82px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 48px;
    border-bottom: 1px solid var(--line);
}

.create-team-back {
    display: none;
}

.header-cancel {
    padding: 9px 16px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.header-cancel:hover,
.header-cancel:focus-visible {
    border-color: var(--field-border);
    color: var(--text);
    outline: none;
}

.create-team-grid {
    width: min(100%, 1180px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(290px, .78fr);
    align-items: start;
    gap: 64px;
    margin: 0 auto;
    padding: 52px 48px 72px;
}

.create-team-form {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.create-team-intro {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.create-team-intro h1,
.create-team-intro p {
    margin: 0;
}

.create-team-intro h1 {
    font-size: clamp(46px, 4.4vw, 62px);
}

.create-team-intro > p:last-child {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.45;
    text-wrap: pretty;
}

.create-team-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.create-team-field {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.create-team-field-wide {
    grid-column: 1 / -1;
}

.create-team-field > span:first-child {
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.create-team-field input,
.create-team-field select {
    width: 100%;
    min-width: 0;
    padding: 15px 14px;
    border: 1px solid var(--field-border);
    border-radius: 11px;
    outline: none;
    background: var(--field);
    color: var(--text);
    font: 16px "Barlow", system-ui, sans-serif;
}

.create-team-field select {
    appearance: none;
    padding-right: 38px;
}

.select-wrap {
    position: relative;
}

.select-wrap::after {
    content: "⌄";
    position: absolute;
    top: 50%;
    right: 14px;
    color: var(--subtle);
    pointer-events: none;
    transform: translateY(-58%);
}

.create-team-field input:focus,
.create-team-field select:focus {
    border-color: var(--yellow);
    box-shadow: 0 0 0 2px rgb(242 183 5 / 16%);
}

.create-team-field.has-error input,
.create-team-field.has-error select {
    border-color: #ed6a5a;
}

.create-team-alert {
    color: #ff9688;
    font-size: 14px;
}

.create-team-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.create-team-actions button,
.create-team-actions a {
    padding: 16px 34px;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.1;
    text-decoration: none;
}

.create-team-actions button {
    border: 1px solid var(--yellow);
    background: var(--yellow);
    color: #100c00;
    cursor: pointer;
}

.create-team-actions a {
    padding-right: 28px;
    padding-left: 28px;
    border: 1px solid var(--field-border);
    color: var(--text);
}

.create-team-actions button:hover,
.create-team-actions button:focus-visible {
    box-shadow: 0 0 0 3px rgb(242 183 5 / 18%);
    outline: none;
}

.create-team-actions a:hover,
.create-team-actions a:focus-visible {
    border-color: var(--muted);
    color: var(--text);
    outline: none;
}

.team-preview {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel);
}

.team-preview h2 {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.team-preview-card {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 18px;
    border: 1px solid var(--card-border);
    border-radius: 13px;
    background: var(--card);
}

.team-preview-initials {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--yellow);
    color: #100c00;
    font: 600 15px "Barlow Condensed", sans-serif;
}

.team-preview-card > span:last-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.team-preview-card strong,
.team-preview-card small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.team-preview-card strong {
    color: var(--text);
    font-size: 19px;
    font-weight: 600;
}

.team-preview-card small {
    color: var(--subtle);
    font-size: 13px;
}

.team-preview hr {
    width: 100%;
    height: 1px;
    margin: 0;
    border: 0;
    background: var(--line);
}

.team-preview dl {
    display: flex;
    flex-direction: column;
    gap: 11px;
    margin: 0;
}

.team-preview dl div {
    display: flex;
    align-items: baseline;
    gap: 14px;
}

.team-preview dt {
    width: 96px;
    flex: 0 0 auto;
    color: var(--subtle);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.team-preview dd {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.team-preview > p {
    margin: 0;
    color: var(--subtle);
    font-size: 13px;
    line-height: 1.45;
    text-wrap: pretty;
}

@media (max-width: 899px) {
    .create-team-body {
        display: block;
    }

    .create-team-shell {
        width: 100%;
        display: flex;
        flex-direction: column;
        padding: 22px clamp(22px, 5vw, 44px) 34px;
    }

    .create-team-header {
        min-height: auto;
        gap: 10px;
        padding: 0;
        border: 0;
    }

    .create-team-back {
        flex: 1;
        display: block;
        color: var(--muted);
        font-size: 11px;
        font-weight: 500;
        letter-spacing: .18em;
        text-decoration: none;
        text-transform: uppercase;
    }

    .create-team-header .brand-mark,
    .create-team-header .brand,
    .header-cancel {
        display: none;
    }

    .create-team-grid {
        flex: 1;
        display: block;
        padding: 32px 0 0;
    }

    .create-team-form {
        min-height: calc(100vh - 88px);
        gap: 24px;
    }

    .create-team-intro {
        gap: 6px;
    }

    .create-team-intro .eyebrow {
        display: block;
    }

    .create-team-intro h1 {
        font-size: 38px;
    }

    .create-team-intro > p:last-child {
        font-size: 15px;
    }

    .create-team-fields {
        gap: 16px 12px;
    }

    .create-team-actions {
        flex-direction: column;
        gap: 12px;
        margin-top: auto;
        padding-top: 8px;
    }

    .create-team-actions button,
    .create-team-actions a {
        width: 100%;
        padding: 16px;
        text-align: center;
    }

    .team-preview {
        display: none;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .header-cancel,
    .create-team-actions button,
    .create-team-actions a,
    .create-team-field input,
    .create-team-field select {
        transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
    }
}

/* Practice hub */
.practice-body {
    min-width: 320px;
    background: var(--page);
}

.practice-shell {
    min-height: 100vh;
    background: var(--shell);
}

.practice-header {
    min-height: 82px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 48px;
    border-bottom: 1px solid var(--line);
}

.practice-header .brand {
    flex: 1;
}

.practice-layout {
    width: min(100%, 1240px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 64px;
    margin: 0 auto;
    padding: 56px 48px 80px;
}

.practice-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 34px;
}

.practice-intro {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
}

.practice-back {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .16em;
    text-decoration: none;
    text-transform: uppercase;
}

.practice-back:hover,
.practice-back:focus-visible {
    color: var(--text);
    outline: none;
}

.practice-intro h1,
.practice-intro p {
    margin: 0;
}

.practice-intro h1 {
    font-size: clamp(48px, 4.6vw, 66px);
}

.practice-intro > p:last-child {
    max-width: 520px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.45;
    text-wrap: pretty;
}

.practice-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.practice-option {
    min-width: 0;
    min-height: 230px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    padding: 26px;
    border: 1px solid transparent;
    border-radius: 16px;
    color: var(--text);
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.practice-option:hover,
.practice-option:focus-visible {
    outline: none;
    transform: translateY(-2px);
}

.practice-option-photo {
    background: var(--yellow);
    color: #100c00;
}

.practice-option-photo:hover,
.practice-option-photo:focus-visible {
    box-shadow: 0 0 0 3px rgb(242 183 5 / 18%);
}

.practice-option-live {
    border-color: var(--card-border);
    background: var(--card);
}

.practice-option-live:hover,
.practice-option-live:focus-visible {
    border-color: var(--field-border);
}

.practice-option-copy {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.practice-option-copy strong {
    font: 600 28px/1.02 "Barlow Condensed", sans-serif;
    letter-spacing: .01em;
    text-transform: uppercase;
}

.practice-option-copy small {
    color: var(--subtle);
    font-size: 15px;
    line-height: 1.42;
    text-wrap: pretty;
}

.practice-option-photo .practice-option-copy small {
    color: rgb(16 12 0 / 78%);
}

.practice-option-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
}

.practice-option-link i {
    color: var(--subtle);
    font-size: 17px;
    font-style: normal;
    font-weight: 500;
}

.practice-option-photo .practice-option-link i {
    color: rgb(16 12 0 / 58%);
}

.practice-camera {
    position: relative;
    width: 56px;
    height: 44px;
    flex: 0 0 auto;
    display: block;
    border-radius: 11px;
    background: #100c00;
}

.practice-camera i {
    position: absolute;
    top: -7px;
    left: 16px;
    width: 22px;
    height: 8px;
    border-radius: 4px 4px 0 0;
    background: #100c00;
}

.practice-camera b {
    position: absolute;
    top: 9px;
    left: 18px;
    width: 23px;
    height: 23px;
    border: 4px solid var(--yellow);
    border-radius: 50%;
}

.practice-camera em {
    position: absolute;
    top: 9px;
    left: 8px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--yellow);
}

.practice-frame-icon {
    width: 56px;
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.practice-frame-icon i {
    height: 22px;
    border: 2px solid var(--text);
    border-radius: 4px;
}

.practice-frame-icon i.is-filled {
    border-color: var(--yellow);
    background: var(--yellow);
}

.practice-frame-icon i.is-dim {
    opacity: .4;
}

.practice-note {
    margin: 0;
    color: var(--subtle);
    font-size: 14px;
    line-height: 1.45;
    text-wrap: pretty;
}

.practice-rack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding-top: 40px;
}

.practice-rack span {
    display: flex;
    gap: 18px;
}

.practice-rack i {
    width: 74px;
    height: 74px;
    display: block;
    border-radius: 50%;
    background: var(--text);
}

.practice-rack i.is-head-pin {
    background: var(--yellow);
    box-shadow: 0 0 46px rgb(242 183 5 / 20%);
}

.practice-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 50;
    max-width: min(380px, calc(100vw - 48px));
    padding: 13px 16px;
    border: 1px solid var(--card-border);
    border-radius: 11px;
    background: var(--card);
    box-shadow: 0 16px 45px rgb(0 0 0 / 28%);
    color: var(--text);
    font-size: 14px;
    opacity: 0;
    transform: translateY(8px);
}

.practice-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1140px) {
    .practice-layout {
        display: block;
    }

    .practice-rack {
        display: none;
    }
}

@media (max-width: 899px) {
    .practice-shell {
        width: 100%;
        padding: 22px clamp(22px, 5vw, 44px) 34px;
    }

    .practice-header {
        min-height: auto;
        gap: 10px;
        padding: 0;
        border: 0;
    }

    .practice-header .brand-mark {
        width: 18px;
        height: 17px;
    }

    .practice-header .brand {
        color: var(--text);
        font-size: 11px;
        font-weight: 600;
    }

    .practice-layout {
        padding: 26px 0 0;
    }

    .practice-main {
        gap: 22px;
    }

    .practice-intro {
        gap: 6px;
    }

    .practice-back {
        margin-bottom: 7px;
        font-size: 11px;
    }

    .practice-intro h1 {
        font-size: 38px;
    }

    .practice-intro .eyebrow {
        display: block;
        font-size: 11px;
    }

    .practice-intro > p:last-child {
        font-size: 15px;
    }

    .practice-options {
        grid-template-columns: 1fr;
        gap: 13px;
    }

    .practice-option {
        min-height: 0;
        display: grid;
        grid-template-columns: 40px minmax(0, 1fr) auto;
        align-items: start;
        gap: 14px;
        padding: 20px 18px;
        border-radius: 14px;
    }

    .practice-option-copy {
        gap: 4px;
    }

    .practice-option-copy strong {
        font: 600 19px/1.15 "Barlow", system-ui, sans-serif;
        letter-spacing: 0;
        text-transform: none;
    }

    .practice-option-copy small {
        font-size: 14px;
        line-height: 1.4;
    }

    .practice-option-link {
        align-self: start;
        gap: 0;
        margin-top: 2px;
        color: transparent;
        font-size: 0;
    }

    .practice-option-link i {
        font-size: 19px;
    }

    .practice-camera {
        width: 40px;
        height: 32px;
        margin-top: 2px;
        border-radius: 8px;
    }

    .practice-camera i {
        top: -5px;
        left: 11px;
        width: 15px;
        height: 6px;
        border-radius: 3px 3px 0 0;
    }

    .practice-camera b {
        top: 7px;
        left: 13px;
        width: 16px;
        height: 16px;
        border-width: 3px;
    }

    .practice-camera em {
        top: 6px;
        left: 5px;
        width: 4px;
        height: 4px;
    }

    .practice-frame-icon {
        width: 40px;
        grid-template-columns: repeat(2, 1fr);
        gap: 3px;
        margin-top: 3px;
    }

    .practice-frame-icon i {
        height: 17px;
        border-radius: 3px;
    }

    .practice-frame-icon i:nth-child(n + 5) {
        display: none;
    }

    .practice-note {
        font-size: 13px;
    }

    .practice-toast {
        right: 18px;
        bottom: 18px;
        max-width: calc(100vw - 36px);
    }
}

@media (prefers-reduced-motion: no-preference) {
    .practice-back,
    .practice-option,
    .practice-toast {
        transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, opacity 180ms ease, transform 180ms ease;
    }
}

.practice-option-form {
    min-width: 0;
    display: flex;
}

.practice-option-form .practice-option {
    width: 100%;
    height: 100%;
}

.practice-history {
    display: flex;
    flex-direction: column;
    gap: 13px;
    padding-top: 4px;
}

.practice-history-heading {
    display: flex;
    align-items: baseline;
    gap: 16px;
}

.practice-history-heading h2 {
    flex: 1;
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.practice-history-heading span {
    color: var(--subtle);
    font-size: 13px;
}

.practice-game-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.practice-game-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 17px 19px;
    border: 1px solid var(--card-border);
    border-radius: 13px;
    background: var(--card);
    color: var(--text);
    text-decoration: none;
}

.practice-game-card:hover,
.practice-game-card:focus-visible {
    border-color: var(--field-border);
    color: var(--text);
    outline: none;
    transform: translateY(-1px);
}

.practice-game-number {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--chip);
    color: var(--yellow);
    font: 600 19px "Barlow Condensed", sans-serif;
}

.practice-game-copy,
.practice-game-score,
.practice-game-resume {
    display: flex;
    flex-direction: column;
}

.practice-game-copy {
    min-width: 0;
    flex: 1;
    gap: 3px;
}

.practice-game-copy strong {
    overflow: hidden;
    font-size: 17px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.practice-game-copy small,
.practice-game-score small,
.practice-game-resume small {
    color: var(--subtle);
    font-size: 12px;
}

.practice-game-copy small i {
    font-style: normal;
}

.practice-game-score,
.practice-game-resume {
    flex: 0 0 auto;
    align-items: flex-end;
    gap: 1px;
}

.practice-game-score strong {
    color: var(--yellow);
    font: 600 26px/1 "Barlow Condensed", sans-serif;
}

.practice-game-resume strong {
    font-size: 13px;
    font-weight: 600;
}

.practice-game-arrow {
    color: var(--subtle);
    font-size: 20px;
    font-style: normal;
}

.practice-history-empty {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border: 1px dashed var(--card-border);
    border-radius: 13px;
}

.practice-history-empty > span {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--chip);
    color: var(--yellow);
    font-size: 20px;
}

.practice-history-empty p {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin: 0;
}

.practice-history-empty strong {
    font-size: 16px;
}

.practice-history-empty small {
    color: var(--subtle);
    font-size: 13px;
}

/* Solo practice score sheet */
.score-sheet-body {
    min-width: 320px;
    background: var(--page);
}

.score-sheet-shell {
    min-height: 100vh;
    background: var(--shell);
}

.score-sheet-header {
    min-height: 82px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 48px;
    border-bottom: 1px solid var(--line);
}

.score-sheet-header .brand {
    flex: 0 1 auto;
}

.score-sheet-context {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    color: var(--subtle);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .18em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.score-sheet-layout {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
    align-items: start;
    gap: 32px;
    padding: 34px clamp(24px, 3vw, 48px) 60px;
}

.score-sheet-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.score-sheet-toolbar {
    display: flex;
    align-items: center;
    gap: 14px;
}

.score-sheet-toolbar h1 {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    color: var(--muted);
    font: 600 15px "Barlow", system-ui, sans-serif;
    letter-spacing: .16em;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.score-sheet-back,
.score-sheet-undo {
    flex: 0 0 auto;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--chip);
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}

.score-sheet-back:hover,
.score-sheet-back:focus-visible,
.score-sheet-undo:hover,
.score-sheet-undo:focus-visible {
    border-color: var(--field-border);
    color: var(--text);
    outline: none;
}

.score-sheet-undo:disabled {
    opacity: .45;
    cursor: default;
}

.score-board {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
}

.score-board-header,
.score-board-row {
    min-width: 720px;
    display: grid;
    grid-template-columns: 112px repeat(9, minmax(0, 1fr)) 1.6fr;
}

.score-board-header {
    align-items: end;
    border-bottom: 1px solid var(--line);
}

.score-board-header span {
    padding: 8px 0;
    color: var(--subtle);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .1em;
    text-align: center;
}

.score-board-row {
    background: color-mix(in srgb, var(--card) 32%, transparent);
}

.score-board-row + .score-board-row {
    border-top: 1px solid var(--line);
}

.league-score-board {
    max-height: min(58vh, 560px);
    overflow: auto;
}

.league-score-board .score-board-row.is-current .score-player {
    background: color-mix(in srgb, var(--yellow) 8%, transparent);
    box-shadow: inset 3px 0 0 var(--yellow);
}

.league-score-board .score-board-row.is-blind {
    background: color-mix(in srgb, var(--chip) 72%, transparent);
}

.league-score-board .score-board-row.is-blind .score-frame {
    color: var(--subtle);
    opacity: .58;
}

.score-player small {
    color: var(--subtle);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.score-player {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding: 10px;
    border-right: 1px solid var(--line);
}

.score-player strong {
    overflow: hidden;
    font-size: 13px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.score-player span {
    color: var(--yellow);
    font: 600 23px/1 "Barlow Condensed", sans-serif;
}

.score-frame {
    min-height: 72px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--line);
}

.score-frame:last-child {
    border-right: 0;
}

.score-frame.is-active {
    background: color-mix(in srgb, var(--yellow) 7%, transparent);
    box-shadow: inset 0 0 0 1.5px var(--yellow);
}

.score-frame.is-editable {
    cursor: pointer;
}

.score-frame.is-editable:hover,
.score-frame.is-editable:focus-visible,
.score-frame.is-editing {
    background: color-mix(in srgb, var(--yellow) 10%, transparent);
    box-shadow: inset 0 0 0 2px var(--yellow);
    outline: none;
}

.score-frame-marks {
    height: 27px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border-bottom: 1px solid var(--line);
}

.score-frame-tenth .score-frame-marks {
    grid-template-columns: repeat(3, 1fr);
}

.score-frame-marks span {
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid var(--line);
    color: var(--text);
    font: 600 16px "Barlow Condensed", sans-serif;
}

.score-frame-marks span:first-child {
    border-left: 0;
}

.score-frame-marks span.is-special {
    color: var(--yellow);
    text-shadow: 0 0 10px rgb(242 183 5 / 40%);
}

.score-frame > strong {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font: 500 18px "Barlow Condensed", sans-serif;
}

.score-sheet-help {
    margin: 0;
    color: var(--subtle);
    font-size: 13px;
    line-height: 1.4;
}

.scorecard-view-control {
    display: none;
}

.score-entry {
    position: sticky;
    top: 24px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel);
}

.score-entry-active {
    display: flex;
    align-items: center;
    gap: 12px;
}

.score-entry-active > span:first-child {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.score-entry-active strong {
    overflow: hidden;
    font: 600 26px "Barlow Condensed", sans-serif;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.score-entry-active small {
    color: var(--subtle);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.score-entry-tabs {
    flex: 0 0 auto;
    display: flex;
    gap: 3px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--chip);
}

.score-entry-tabs button {
    padding: 8px 12px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--subtle);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.score-entry-tabs button.is-active {
    background: var(--yellow);
    color: #100c00;
}

.pin-entry {
    display: flex;
    flex-direction: column;
    gap: 17px;
}

.practice-pin-deck {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 11px;
    padding: 7px 0 2px;
}

.practice-pin-deck > span {
    display: flex;
    justify-content: center;
    gap: 11px;
}

.practice-pin-deck button {
    width: clamp(48px, 5vw, 64px);
    height: clamp(48px, 5vw, 64px);
    flex: 0 0 auto;
    border: 1.5px solid var(--pin-border);
    border-radius: 50%;
    background: var(--pin);
    color: #14171b;
    font: 600 clamp(19px, 2vw, 25px) "Barlow Condensed", sans-serif;
    cursor: pointer;
}

.practice-pin-deck button.is-selected {
    border-color: var(--yellow);
    background: var(--yellow);
    box-shadow: 0 0 14px rgb(242 183 5 / 40%);
    color: #100c00;
}

.practice-pin-deck button.is-down {
    border-color: var(--line);
    background: transparent;
    color: transparent;
    opacity: 1;
    visibility: visible;
    pointer-events: none;
}

.score-entry-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.score-entry-actions.has-selection {
    grid-template-columns: 1fr;
}

.score-record,
.score-quick {
    min-width: 0;
    padding: 10px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--text);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.score-record {
    min-height: 44px;
    background: var(--chip);
}

.score-record.is-highlighted {
    border-color: var(--yellow);
    background: var(--yellow);
    color: #100c00;
}

.score-quick {
    width: 100%;
    min-height: 50px;
    border-color: var(--yellow);
    background: transparent;
    font-size: 18px;
}

.score-record:disabled,
.score-quick:disabled {
    cursor: wait;
    opacity: .65;
}

.number-entry {
    min-height: 305px;
}

.number-pad {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.number-pad button {
    min-height: 64px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--chip);
    color: var(--text);
    font: 600 25px "Barlow Condensed", sans-serif;
    cursor: pointer;
}

.number-pad button.is-special {
    border-color: var(--yellow);
    background: var(--yellow);
    color: #100c00;
}

.score-complete {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 18px 6px 5px;
    text-align: center;
}

.score-complete-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
    border-radius: 50%;
    background: var(--yellow);
    color: #100c00;
    font-size: 21px;
    font-weight: 700;
}

.score-complete p,
.score-complete strong,
.score-complete small {
    margin: 0;
}

.score-complete p {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.score-complete > strong {
    color: var(--yellow);
    font: 700 72px/.95 "Barlow Condensed", sans-serif;
}

.score-complete small {
    color: var(--subtle);
    font-size: 14px;
}

.score-complete form,
.score-complete form button,
.score-complete > a {
    width: 100%;
}

.score-complete form {
    margin-top: 17px;
}

.score-complete form button,
.score-complete > a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    border-radius: 11px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
}

.score-complete form button {
    border: 0;
    background: var(--yellow);
    color: #100c00;
    cursor: pointer;
}

.score-complete > a {
    margin-top: 5px;
    border: 1px solid var(--field-border);
    color: var(--text);
}

.score-complete > a.league-next-game {
    border-color: var(--yellow);
    background: var(--yellow);
    color: #100c00;
}

.score-complete > a.score-complete-new-game {
    margin-top: 17px;
    border-color: var(--yellow);
    background: var(--yellow);
    color: #100c00;
}

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

[hidden] {
    display: none !important;
}

@media (min-width: 900px) {
    .score-board {
        overflow-x: hidden;
    }

    .score-board-header,
    .score-board-row {
        width: 100%;
        min-width: 0;
        grid-template-columns: 96px repeat(9, minmax(0, 1fr)) 1.45fr;
    }
}

.score-import-review-shell {
    width: min(1500px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 48px;
}

.score-import-review-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.score-import-review-heading a,
.score-import-review-heading p,
.score-import-review-heading h1 {
    margin: 0;
}

.score-import-review-heading a {
    color: var(--muted);
    font-size: 13px;
    text-decoration: none;
}

.score-import-review-heading h1 {
    margin-top: 8px;
    font: 700 clamp(30px, 4vw, 48px) "Barlow Condensed", sans-serif;
}

.score-import-review-heading p {
    max-width: 680px;
    color: var(--subtle);
}

.score-import-audit {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    color: var(--subtle);
    font-size: 12px;
}

.score-import-review-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.score-import-view-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.score-import-view-control > span:first-child {
    flex: 1;
    color: var(--subtle);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.score-import-view-control > span:last-child {
    flex: 0 0 auto;
    display: flex;
    gap: 3px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--chip);
}

.score-import-view-control button {
    padding: 6px 10px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--subtle);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.score-import-view-control button.is-active {
    background: var(--yellow);
    color: #100c00;
}

.score-import-debug {
    margin-bottom: 22px;
    padding: 16px;
    border: 1px solid color-mix(in srgb, var(--yellow) 45%, var(--line));
    border-radius: 16px;
    background: color-mix(in srgb, var(--yellow) 5%, var(--panel));
}

.score-import-debug-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 14px;
}

.score-import-debug-heading small,
.score-import-debug-heading h2,
.score-import-debug-heading p,
.score-import-debug figure,
.score-import-debug figure p {
    margin: 0;
}

.score-import-debug-heading small {
    color: var(--yellow);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
}

.score-import-debug-heading h2 {
    font: 700 24px "Barlow Condensed", sans-serif;
}

.score-import-debug-heading p,
.score-import-debug figure p {
    color: var(--subtle);
    font-size: 12px;
}

.score-import-debug-images {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.score-import-debug figure {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.score-import-debug figcaption {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    color: var(--subtle);
    font-size: 11px;
    font-weight: 600;
}

.score-import-debug figcaption small {
    flex: 0 0 auto;
    color: var(--muted);
    font: inherit;
    font-weight: 500;
}

.score-import-debug img {
    width: 100%;
    max-height: 420px;
    border-radius: 10px;
    background: #080808;
    object-fit: contain;
}

.score-import-debug details {
    margin-top: 14px;
}

.score-import-debug summary {
    cursor: pointer;
    color: var(--yellow);
    font-size: 13px;
    font-weight: 600;
}

.score-import-debug pre {
    max-height: 520px;
    margin: 10px 0 0;
    padding: 14px;
    overflow: auto;
    border-radius: 10px;
    background: #080808;
    color: #e9e9e9;
    font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    white-space: pre-wrap;
}

.score-import-review-row {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel);
    overflow: hidden;
}

.score-import-review-row.is-ignored {
    opacity: .62;
}

.score-import-review-row.is-selected-score {
    border-color: color-mix(in srgb, var(--yellow) 68%, var(--line));
    box-shadow: 0 0 0 1px rgb(242 183 5 / 10%);
}

.score-import-row-frames {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: color-mix(in srgb, var(--card) 32%, transparent);
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
}

.score-import-scorecard-header,
.score-import-scorecard-row {
    width: 100%;
    min-width: 760px;
    display: grid;
    grid-template-columns: 132px repeat(9, minmax(0, 1fr)) 1.55fr;
}

.score-import-row-frames.is-fit {
    overflow-x: hidden;
}

.score-import-row-frames.is-fit .score-import-scorecard-header,
.score-import-row-frames.is-fit .score-import-scorecard-row {
    min-width: 0;
}

.score-import-scorecard-header {
    border-bottom: 1px solid var(--line);
}

.score-import-scorecard-header span {
    padding: 7px 0;
    color: var(--subtle);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .08em;
    text-align: center;
}

.score-import-scorecard-player {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 9px 11px;
    border-right: 1px solid var(--line);
}

.score-import-scorecard-player small,
.score-import-row-identity small {
    color: var(--subtle);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.score-import-scorecard-player > strong {
    overflow: hidden;
    font-size: 14px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.score-import-scorecard-player > span {
    display: flex;
    align-items: baseline;
    gap: 6px;
    color: var(--yellow);
}

.score-import-scorecard-player i {
    color: var(--subtle);
    font-size: 8px;
    font-style: normal;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.score-import-scorecard-player b {
    font: 600 22px/1 "Barlow Condensed", sans-serif;
}

.score-import-scorecard-frame {
    min-width: 0;
    min-height: 72px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--line);
}

.score-import-scorecard-frame:last-child {
    border-right: 0;
}

.score-import-scorecard-frame input {
    width: 100%;
    height: 31px;
    min-width: 0;
    padding: 4px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: color-mix(in srgb, var(--field) 68%, transparent);
    color: var(--text);
    font: 600 15px "Barlow Condensed", sans-serif;
    text-align: center;
    text-transform: uppercase;
}

.score-import-scorecard-frame input:focus {
    position: relative;
    z-index: 1;
    background: color-mix(in srgb, var(--yellow) 8%, var(--field));
    box-shadow: inset 0 0 0 2px var(--yellow);
    outline: none;
}

.score-import-scorecard-frame output {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--yellow);
    font: 600 19px "Barlow Condensed", sans-serif;
}

.score-import-row-footer {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
    align-items: end;
    gap: 16px;
}

.score-import-row-identity {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.score-import-row-identity select {
    width: 100%;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid var(--field-border);
    border-radius: 9px;
    background: var(--field);
    color: var(--text);
    font: 600 14px "Barlow", sans-serif;
}

.score-import-practice-select {
    width: 100%;
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid var(--yellow);
    border-radius: 9px;
    background: transparent;
    color: var(--yellow);
    font: 700 14px "Barlow", sans-serif;
}

.score-import-practice-select:hover,
.score-import-practice-select:focus-visible {
    background: color-mix(in srgb, var(--yellow) 10%, transparent);
    outline: none;
}

.score-import-practice-select[aria-pressed="true"] {
    background: var(--yellow);
    color: #100c00;
}

.score-import-practice-select[aria-pressed="true"]::before {
    content: "✓";
}

.score-import-row-notes {
    min-width: 0;
    color: var(--subtle);
    font-size: 11px;
}

.score-import-row-notes ul,
.score-import-row-notes p {
    margin: 0;
    padding-left: 17px;
}

.score-import-existing-conflict {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 10px;
    color: var(--yellow);
    font-weight: 600;
}

.score-import-review-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    margin-top: 22px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: color-mix(in srgb, var(--panel) 94%, transparent);
    backdrop-filter: blur(12px);
}

.score-import-review-actions p {
    margin: 0 auto 0 0;
    color: var(--subtle);
    font-size: 13px;
}

.score-import-review-actions button {
    min-height: 48px;
    padding: 12px 22px;
    border: 1px solid var(--yellow);
    border-radius: 10px;
    background: var(--yellow);
    color: #100c00;
    font-weight: 700;
}

.score-import-review-actions button:disabled {
    border-color: var(--line);
    background: var(--chip);
    color: var(--subtle);
}

.score-import-empty {
    padding: 40px;
    border: 1px dashed var(--line);
    border-radius: 14px;
    color: var(--subtle);
    text-align: center;
}

@media (max-width: 800px) {
    .score-import-review-shell {
        width: min(100% - 20px, 1500px);
        padding-top: 20px;
    }

    .score-import-review-heading,
    .score-import-review-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .score-import-audit {
        align-items: flex-start;
    }

    .score-import-debug-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .score-import-debug-images {
        grid-template-columns: 1fr;
    }

    .score-import-review-row {
        padding: 12px;
    }

    .score-import-scorecard-header,
    .score-import-scorecard-row {
        min-width: 700px;
    }

    .score-import-row-frames.is-fit .score-import-scorecard-header,
    .score-import-row-frames.is-fit .score-import-scorecard-row {
        min-width: 0;
        grid-template-columns: 76px repeat(9, minmax(0, 1fr)) 1.5fr;
    }

    .score-import-row-frames.is-fit .score-import-scorecard-header span {
        padding-block: 5px;
        font-size: 8px;
        letter-spacing: 0;
    }

    .score-import-row-frames.is-fit .score-import-scorecard-player {
        padding: 5px 6px;
    }

    .score-import-row-frames.is-fit .score-import-scorecard-player small,
    .score-import-row-frames.is-fit .score-import-scorecard-player i {
        font-size: 6px;
        letter-spacing: .06em;
    }

    .score-import-row-frames.is-fit .score-import-scorecard-player > strong {
        font-size: 10px;
    }

    .score-import-row-frames.is-fit .score-import-scorecard-player b {
        font-size: 17px;
    }

    .score-import-row-frames.is-fit .score-import-scorecard-frame {
        min-height: 54px;
    }

    .score-import-row-frames.is-fit .score-import-scorecard-frame input {
        height: 23px;
        padding: 2px 1px;
        font-size: 11px;
    }

    .score-import-row-frames.is-fit .score-import-scorecard-frame output {
        font-size: 14px;
    }

    .score-import-row-footer {
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: 12px;
    }

    .score-import-row-frames {
        padding-bottom: 8px;
    }

    .score-import-review-actions p {
        margin: 0;
    }
}

@media (max-width: 899px) {
    .score-sheet-body {
        overflow: hidden;
    }

    .league-score-sheet-body .score-sheet-header {
        display: none;
    }

    .league-score-sheet-body .score-sheet-shell {
        padding-top: 0;
    }

    .league-score-sheet-body .score-sheet-layout {
        padding-top: 14px;
    }

    .practice-game-card {
        gap: 12px;
        padding: 15px 16px;
    }

    .practice-game-number {
        width: 34px;
        height: 34px;
        border-radius: 9px;
        font-size: 17px;
    }

    .practice-game-copy strong {
        font-size: 16px;
    }

    .practice-game-score strong {
        font-size: 23px;
    }

    .practice-game-resume small {
        display: none;
    }

    .score-sheet-shell {
        width: 100%;
        height: 100vh;
        height: 100svh;
        min-width: 0;
        display: flex;
        flex-direction: column;
        padding: 14px 0 0;
        overflow: hidden;
    }

    .score-sheet-header {
        min-height: auto;
        flex: 0 0 auto;
        gap: 10px;
        padding: 0 14px 13px;
    }

    .score-sheet-header .brand-mark {
        width: 18px;
        height: 17px;
    }

    .score-sheet-header .brand {
        color: var(--text);
        font-size: 11px;
    }

    .score-sheet-header .theme-toggle {
        margin-left: auto;
    }

    .score-sheet-context {
        display: none;
    }

    .score-sheet-layout {
        min-height: 0;
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 13px 0 0;
        overflow: hidden;
    }

    .score-sheet-main {
        width: 100%;
        flex: 0 0 auto;
        gap: 10px;
    }

    .score-sheet-toolbar {
        padding: 0 14px;
    }

    .scorecard-view-control {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 0 14px;
    }

    .scorecard-view-control > span:first-child {
        flex: 1;
        color: var(--subtle);
        font-size: 10px;
        font-weight: 500;
        letter-spacing: .12em;
        text-transform: uppercase;
    }

    .scorecard-view-control > span:last-child {
        flex: 0 0 auto;
        display: flex;
        gap: 3px;
        padding: 3px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: var(--chip);
    }

    .scorecard-view-control button {
        padding: 6px 10px;
        border: 0;
        border-radius: 5px;
        background: transparent;
        color: var(--subtle);
        font-size: 11px;
        font-weight: 600;
        cursor: pointer;
    }

    .scorecard-view-control button.is-active {
        background: var(--yellow);
        color: #100c00;
    }

    .score-sheet-toolbar h1 {
        font-size: 13px;
    }

    .score-sheet-back,
    .score-sheet-undo {
        padding: 7px 10px;
        font-size: 12px;
    }

    .score-board {
        width: 100%;
        max-width: 100%;
        border-right: 0;
        border-left: 0;
        border-radius: 0;
    }

    .league-score-board {
        max-height: 38svh;
        overflow: auto;
    }

    .score-board-header,
    .score-board-row {
        min-width: 650px;
        grid-template-columns: 78px repeat(9, minmax(0, 1fr)) 1.5fr;
    }

    .score-board.is-fit {
        overflow-x: hidden;
    }

    .score-board.is-fit .score-board-header,
    .score-board.is-fit .score-board-row {
        width: 100%;
        min-width: 100%;
        grid-template-columns: 52px repeat(9, minmax(0, 1fr)) 1.35fr;
    }

    .score-board.is-fit .score-board-header span {
        padding: 5px 0;
        font-size: 8px;
        letter-spacing: 0;
    }

    .score-board.is-fit .score-player {
        gap: 1px;
        padding: 4px;
    }

    .score-board.is-fit .score-player strong {
        font-size: 9px;
    }

    .score-board.is-fit .score-player span {
        font-size: 16px;
    }

    .score-board.is-fit .score-frame {
        min-height: 50px;
    }

    .score-board.is-fit .score-frame-marks {
        height: 20px;
    }

    .score-board.is-fit .score-frame-marks span {
        font-size: 11px;
    }

    .score-board.is-fit .score-frame > strong {
        font-size: 12px;
    }

    .score-board-header span {
        padding: 6px 0;
        font-size: 9px;
    }

    .score-frame {
        min-height: 58px;
    }

    .score-frame-marks {
        height: 22px;
    }

    .score-frame-marks span {
        font-size: 13px;
    }

    .score-frame > strong {
        font-size: 15px;
    }

    .score-player {
        padding: 7px;
    }

    .score-player strong {
        font-size: 11px;
    }

    .score-player span {
        font-size: 19px;
    }

    .score-sheet-help {
        padding: 0 14px;
        font-size: 12px;
    }

    .score-entry {
        position: static;
        width: 100%;
        min-height: 0;
        flex: 1;
        gap: 12px;
        padding: 16px 14px calc(32px + env(safe-area-inset-bottom));
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 0;
        overflow: hidden;
    }

    .score-entry-active strong {
        font-size: 21px;
    }

    .score-entry-tabs button {
        padding: 7px 11px;
    }

    .practice-pin-deck {
        flex: 1;
        justify-content: center;
        gap: clamp(5px, min(2.5cqw, 3cqh), 12px);
        padding: 2px 0;
        container-type: size;
    }

    .pin-entry {
        min-height: 0;
        flex: 1;
        justify-content: space-between;
    }

    .practice-pin-deck > span {
        gap: clamp(5px, min(2.5cqw, 3cqh), 12px);
    }

    .practice-pin-deck button {
        width: clamp(34px, min(15cqw, 20cqh), 60px);
        height: clamp(34px, min(15cqw, 20cqh), 60px);
        font-size: clamp(17px, min(6cqw, 8cqh), 25px);
    }

    .score-entry-actions {
        gap: 8px;
    }

    .score-record,
    .score-quick {
        padding: 10px 12px;
        font-size: 15px;
    }

    .score-quick {
        font-size: 17px;
    }

    .number-entry {
        min-height: 0;
        flex: 1;
    }

    .number-pad {
        height: 100%;
        grid-auto-rows: 1fr;
        gap: 8px;
        align-content: center;
    }

    .number-pad button {
        min-height: 58px;
    }

    .score-complete {
        flex: 1;
        justify-content: center;
        padding-top: 10px;
    }

    .score-complete > strong {
        font-size: 64px;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .practice-game-card,
    .score-sheet-back,
    .score-sheet-undo,
    .practice-pin-deck button,
    .score-record,
    .score-quick,
    .number-pad button,
    .score-complete form button,
    .score-complete > a {
        transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, opacity 160ms ease, transform 160ms ease;
    }

    .scorecard-view-control button {
        transition: background-color 160ms ease, color 160ms ease;
    }
}

/* Photo score sheet */
.photo-score-body {
    min-width: 320px;
    background: var(--page);
}

.photo-score-shell {
    width: 100%;
    min-height: 100vh;
    background: var(--shell);
}

.photo-score-desktop-header {
    min-height: 82px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 48px;
    border-bottom: 1px solid var(--line);
}

.photo-score-desktop-header .brand {
    flex: 0 0 auto;
}

.photo-score-context {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    color: var(--subtle);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .18em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.photo-score-team-link {
    padding: 9px 16px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.photo-score-mobile-header {
    display: none;
}

.photo-score-content {
    width: min(100%, 1180px);
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 34px clamp(24px, 3vw, 48px) 60px;
}

.photo-score-toolbar {
    display: flex;
    align-items: center;
    gap: 14px;
}

.photo-score-toolbar a,
.photo-score-toolbar button,
.photo-score-mobile-header button {
    flex: 0 0 auto;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--chip);
    color: var(--muted);
    font: 500 13px "Barlow", system-ui, sans-serif;
    text-decoration: none;
}

.photo-score-toolbar button:disabled,
.photo-score-mobile-header button:disabled {
    cursor: default;
    opacity: 1;
}

.photo-score-toolbar h1 {
    min-width: 0;
    flex: 1;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    font: 600 15px "Barlow", system-ui, sans-serif;
    letter-spacing: .16em;
    text-align: center;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.photo-score-board {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
}

.photo-score-board-header,
.photo-score-row {
    min-width: 720px;
    display: grid;
    grid-template-columns: 112px repeat(9, minmax(0, 1fr)) 1.6fr;
}

.photo-score-board-header {
    align-items: end;
    border-bottom: 1px solid var(--line);
}

.photo-score-board-header span {
    padding: 8px 0;
    color: var(--subtle);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .1em;
    text-align: center;
}

.photo-score-row {
    background: color-mix(in srgb, var(--card) 32%, transparent);
}

.photo-score-row + .photo-score-row {
    border-top: 1px solid var(--line);
}

.photo-score-row.is-blind {
    background: color-mix(in srgb, var(--chip) 72%, transparent);
}

.photo-score-player {
    min-width: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1px;
    padding: 8px 10px;
    border-right: 1px solid var(--line);
}

.photo-score-player strong {
    overflow: hidden;
    font-size: 13px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.photo-score-player > span {
    color: var(--yellow);
    font: 600 22px/1 "Barlow Condensed", sans-serif;
}

.photo-score-player small {
    position: absolute;
    right: 8px;
    bottom: 9px;
    color: var(--subtle);
    font-size: 8px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.photo-score-frame {
    min-height: 56px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--line);
}

.photo-score-frame:last-child {
    border-right: 0;
}

.photo-score-boxes {
    height: 22px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border-bottom: 1px solid var(--line);
}

.photo-score-frame.is-tenth .photo-score-boxes {
    grid-template-columns: repeat(3, 1fr);
}

.photo-score-boxes i + i {
    border-left: 1px solid var(--line);
}

.photo-score-frame > strong {
    flex: 1;
}

.photo-score-empty {
    margin: 0;
    padding: 28px;
    color: var(--muted);
    font-size: 14px;
}

.photo-entry-panel {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 22px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
}

.photo-entry-copy {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.photo-entry-copy h2,
.photo-entry-copy p,
.photo-entry-copy small {
    margin: 0;
}

.photo-entry-copy h2 {
    color: var(--yellow);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.photo-entry-copy p {
    color: var(--subtle);
    font-size: 14px;
    line-height: 1.4;
    text-wrap: pretty;
}

.photo-entry-copy small {
    color: var(--subtle);
    font-size: 11px;
    line-height: 1.35;
}

.photo-selection-preview {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.photo-preview-image-wrap {
    width: 100%;
    height: clamp(260px, 46vh, 480px);
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--field);
}

.photo-preview-image-wrap img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.photo-preview-image-wrap > span {
    padding: 8px;
    color: var(--subtle);
    font-size: 9px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-transform: uppercase;
}

.photo-preview-details {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-inline: 2px;
}

.photo-preview-details strong,
.photo-preview-details small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.photo-preview-details strong {
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
}

.photo-preview-details small {
    color: var(--subtle);
    font-size: 11px;
}

.photo-preview-details span {
    color: var(--yellow);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.photo-preview-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.photo-preview-options label {
    display: grid;
    gap: 6px;
    color: var(--subtle);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.photo-preview-options select {
    width: 100%;
    min-height: 44px;
    padding: 9px 34px 9px 12px;
    border: 1px solid var(--field-border);
    border-radius: 10px;
    background: var(--field);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    letter-spacing: normal;
    text-transform: none;
}

.photo-preview-options select:focus-visible {
    border-color: var(--yellow);
    outline: 2px solid color-mix(in srgb, var(--yellow) 30%, transparent);
    outline-offset: 1px;
}

.photo-preview-fallback-note {
    color: var(--subtle);
    font-size: 11px;
    line-height: 1.4;
}

.photo-preview-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 10px;
}

.photo-preview-actions label,
.photo-preview-actions button {
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 20px;
    border-radius: 11px;
    font-size: 15px;
    font-weight: 600;
}

.photo-preview-change {
    border: 1px solid var(--field-border);
    background: var(--chip);
    color: var(--text);
    cursor: pointer;
}

.photo-preview-upload {
    border: 1px solid var(--yellow);
    background: var(--yellow);
    color: #100c00;
}

.photo-preview-upload:disabled {
    cursor: default;
    opacity: 1;
}

.photo-preview-cancel {
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.photo-preview-cancel:hover,
.photo-preview-cancel:focus-visible {
    color: var(--text);
    outline: none;
}

.photo-entry-actions {
    flex: 0 0 auto;
    display: flex;
    gap: 10px;
}

.photo-entry-actions label {
    min-height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 15px 24px;
    border-radius: 12px;
    font: 600 16px "Barlow", system-ui, sans-serif;
    cursor: pointer;
}

.photo-entry-camera {
    border: 1px solid var(--yellow);
    background: var(--yellow);
    color: #100c00;
}

.photo-entry-library {
    border: 1px solid var(--field-border);
    background: var(--chip);
    color: var(--text);
}

.photo-entry-actions input:focus-visible + label {
    outline: 2px solid var(--yellow);
    outline-offset: 3px;
}

.photo-entry-panel.has-selection {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
}

.photo-entry-panel.has-selection .photo-entry-copy {
    width: 100%;
    flex: none;
}

.photo-entry-panel.has-selection .photo-entry-actions {
    display: none;
}

@media (min-width: 900px) {
    .photo-score-board {
        overflow-x: hidden;
    }

    .photo-score-board-header,
    .photo-score-row {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 899px) {
    .photo-score-shell {
        min-height: 100svh;
    }

    .photo-score-desktop-header {
        display: none;
    }

    .photo-score-mobile-header {
        min-height: 55px;
        display: grid;
        grid-template-columns: minmax(68px, 1fr) auto minmax(68px, 1fr);
        align-items: center;
        gap: 8px;
        padding: 10px 14px;
        border-bottom: 1px solid var(--line);
    }

    .photo-score-mobile-header a {
        overflow: hidden;
        color: var(--subtle);
        font-size: 12px;
        font-weight: 500;
        text-decoration: none;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .photo-score-mobile-header strong {
        color: var(--muted);
        font-size: 11px;
        font-weight: 600;
        letter-spacing: .12em;
        text-align: center;
        text-transform: uppercase;
        white-space: nowrap;
    }

    .photo-score-mobile-header button {
        justify-self: end;
        padding: 6px 10px;
        font-size: 12px;
    }

    .photo-score-content {
        width: 100%;
        gap: 0;
        padding: 10px 0 max(22px, env(safe-area-inset-bottom));
    }

    .photo-score-toolbar {
        display: none;
    }

    .photo-score-board {
        width: calc(100% - 16px);
        margin: 0 8px;
        overflow: hidden;
        border-right: 0;
        border-left: 0;
        border-radius: 0;
    }

    .photo-score-board-header,
    .photo-score-row {
        width: 100%;
        min-width: 0;
        grid-template-columns: 62px repeat(9, minmax(0, 1fr)) 1.5fr;
    }

    .photo-score-board-header span {
        padding: 5px 0;
        font-size: 8px;
        letter-spacing: 0;
    }

    .photo-score-player {
        gap: 0;
        padding: 5px 7px;
    }

    .photo-score-player strong {
        font-size: 9px;
    }

    .photo-score-player > span {
        font-size: 17px;
    }

    .photo-score-player small {
        right: 5px;
        bottom: 5px;
        font-size: 6px;
    }

    .photo-score-frame {
        min-height: 40px;
    }

    .photo-score-boxes {
        height: 15px;
    }

    .photo-entry-panel {
        flex-direction: column;
        align-items: stretch;
        gap: 11px;
        margin-top: 14px;
        padding: 0 14px;
        border: 0;
        border-radius: 0;
        background: transparent;
    }

    .photo-entry-copy {
        display: grid;
        grid-template-columns: 112px minmax(0, 1fr);
        align-items: baseline;
        gap: 4px 8px;
    }

    .photo-entry-copy h2 {
        white-space: nowrap;
    }

    .photo-entry-copy p {
        min-width: 0;
        max-width: none;
        overflow: hidden;
        font-size: 12px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .photo-entry-copy small {
        grid-column: 1 / -1;
        font-size: 10px;
    }

    .photo-selection-preview {
        width: 100%;
    }

    .photo-preview-image-wrap {
        height: min(46vh, 340px);
    }

    .photo-preview-actions {
        grid-template-columns: 1fr 1fr;
    }

    .photo-preview-actions label,
    .photo-preview-actions button {
        min-width: 0;
        padding-inline: 10px;
        font-size: 14px;
    }

    .photo-preview-cancel {
        grid-column: 1 / -1;
        min-height: 42px;
    }

    .photo-entry-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .photo-entry-actions label {
        min-width: 0;
        min-height: 56px;
        padding: 14px 10px;
        font-size: 15px;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .photo-score-toolbar a,
    .photo-score-team-link {
        transition: border-color 160ms ease, color 160ms ease;
    }
}
