:root {
    --squashr-live-bg: #07111f;
    --squashr-live-surface: #101b2c;
    --squashr-live-surface-raised: #172338;
    --squashr-live-border: rgba(148, 163, 184, 0.28);
    --squashr-live-text: #f8fafc;
    --squashr-live-muted: #a7b3c6;
    --squashr-live-accent: #2563eb;
    --squashr-live-accent-strong: #60a5fa;
    --squashr-live-green: #22c55e;
    --squashr-live-orange: #fb923c;
    --squashr-live-yellow: #facc15;
    --squashr-live-danger: #fb7185;
    color-scheme: dark;
}

html[data-squashr-theme="light"] {
    --squashr-live-bg: #f4f7fb;
    --squashr-live-surface: #ffffff;
    --squashr-live-surface-raised: #edf3fb;
    --squashr-live-border: rgba(15, 23, 42, 0.18);
    --squashr-live-text: #0f172a;
    --squashr-live-muted: #5b677a;
    --squashr-live-accent-strong: #1d4ed8;
    color-scheme: light;
}

body.squashr-live-scoring-page *,
body.squashr-live-scoring-page *::before,
body.squashr-live-scoring-page *::after {
    box-sizing: border-box;
}

html,
body.squashr-live-scoring-page {
    min-height: 100%;
    margin: 0;
    background: var(--squashr-live-bg);
}

body.squashr-live-scoring-page {
    color: var(--squashr-live-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

.squashr-live-score-app {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 16px 16px max(20px, env(safe-area-inset-bottom));
    box-sizing: border-box;
}

.squashr-live-score-app .squashr-public-attribution {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3em;
    margin: 18px auto 0;
    color: var(--squashr-live-muted);
    font-size: 11px;
    line-height: 1.4;
    text-align: center;
}

.squashr-live-score-app .squashr-public-attribution a {
    color: inherit;
    font-weight: 700;
    text-decoration: none;
}

.squashr-live-score-app .squashr-public-attribution a:hover,
.squashr-live-score-app .squashr-public-attribution a:focus-visible {
    color: var(--squashr-live-accent-strong);
    text-decoration: underline;
    text-underline-offset: 3px;
}

html[data-squashr-theme="dark"] .squashr-live-score-app .squashr-public-attribution {
    color: #cbd5e1;
}

.squashr-live-score-topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    margin: -16px -16px 18px;
    padding: 16px 16px 14px;
    background: rgba(7, 17, 31, 0.92);
    border-bottom: 1px solid var(--squashr-live-border);
    backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.squashr-live-score-topbar-title {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.squashr-live-score-topbar .squashr-theme-control {
    display: grid;
    flex: 0 0 auto;
    gap: 3px;
    color: var(--squashr-live-muted);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
}

.squashr-live-score-topbar .squashr-theme-control select {
    min-height: 36px;
    padding: 6px 28px 6px 9px;
    border: 1px solid var(--squashr-live-border);
    border-radius: 10px;
    background: var(--squashr-live-surface);
    color: var(--squashr-live-text);
    font: inherit;
    text-transform: none;
}

.squashr-live-score-topbar .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.squashr-live-score-brand,
.squashr-live-score-kicker {
    color: var(--squashr-live-accent-strong);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.squashr-live-score-topbar strong {
    overflow: hidden;
    color: var(--squashr-live-text);
    font-size: clamp(1.05rem, 4vw, 1.35rem);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.squashr-live-score-hero,
.squashr-live-score-step,
.squashr-live-score-section,
.squashr-live-score-screen {
    width: min(100%, 720px);
    margin: 0 auto 18px;
}

.squashr-live-score-hero,
.squashr-live-score-step,
.squashr-live-score-screen {
    box-sizing: border-box;
    padding: 18px;
    border: 1px solid var(--squashr-live-border);
    border-radius: 18px;
    background: linear-gradient(180deg, var(--squashr-live-surface-raised), var(--squashr-live-surface));
    box-shadow: 0 22px 44px rgba(0, 0, 0, 0.28);
}

.squashr-live-score-hero h1,
.squashr-live-score-step h1 {
    margin: 4px 0 8px;
    font-size: clamp(2rem, 12vw, 4rem);
    line-height: 0.95;
    letter-spacing: 0;
}

.squashr-live-score-hero p,
.squashr-live-score-step p,
.squashr-live-score-helper {
    margin: 0;
    color: var(--squashr-live-muted);
    font-size: 1rem;
    line-height: 1.45;
}

.squashr-live-score-notice {
    width: min(100%, 720px);
    margin: 0 auto 14px;
    padding: 13px 14px;
    border: 1px solid rgba(251, 113, 133, 0.5);
    border-radius: 14px;
    background: rgba(251, 113, 133, 0.12);
    color: #fecdd3;
    font-weight: 700;
}

.squashr-live-score-inline-message {
    padding: 12px 14px;
    border: 1px solid rgba(96, 165, 250, 0.42);
    border-radius: 14px;
    background: rgba(96, 165, 250, 0.13);
    color: #dbeafe;
    font-weight: 800;
}

.squashr-live-score-inline-message.is-error {
    border-color: rgba(251, 113, 133, 0.5);
    background: rgba(251, 113, 133, 0.12);
    color: #fecdd3;
}

.squashr-live-score-inline-message.is-warning {
    border-color: rgba(251, 146, 60, 0.5);
    background: rgba(251, 146, 60, 0.12);
    color: #ffedd5;
}

.squashr-live-score-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 10px;
}

.squashr-live-score-section-heading h2 {
    margin: 0;
    font-size: 1.15rem;
}

.squashr-live-score-section-heading span {
    min-width: 34px;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--squashr-live-surface-raised);
    color: var(--squashr-live-muted);
    font-weight: 800;
    text-align: center;
}

.squashr-live-score-section-copy {
    margin: -2px 0 12px;
    color: var(--squashr-live-muted);
    line-height: 1.45;
}

.squashr-live-score-section--match-picker {
    padding: 18px;
    border: 1px solid rgba(96, 165, 250, 0.42);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(30, 58, 95, 0.34), rgba(15, 23, 42, 0.2));
}

.squashr-live-score-section--match-picker .squashr-live-score-section-copy {
    color: #dbeafe;
    font-size: 15px;
    font-weight: 700;
}

.squashr-live-score-collection-list {
    display: grid;
    gap: 10px;
}

.squashr-live-score-collection-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 15px 16px;
    border: 1px solid var(--squashr-live-border);
    border-radius: 16px;
    background: var(--squashr-live-surface);
    color: var(--squashr-live-text);
    text-decoration: none;
}

.squashr-live-score-collection-list a:focus-visible,
.squashr-live-score-collection-list a:hover {
    border-color: var(--squashr-live-accent-strong);
    background: var(--squashr-live-surface-raised);
}

.squashr-live-score-collection-list a span {
    display: grid;
    gap: 3px;
}

.squashr-live-score-collection-list small {
    color: var(--squashr-live-muted);
}

.squashr-live-score-collection-list b {
    min-width: 34px;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(96, 165, 250, 0.16);
    color: #bfdbfe;
    text-align: center;
}

.squashr-live-score-back-link {
    display: inline-flex;
    margin: 0 auto 14px;
    color: var(--squashr-live-accent-strong);
    font-weight: 850;
    text-decoration: none;
}

.squashr-live-score-hero--compact h1 {
    font-size: clamp(2rem, 10vw, 3.25rem);
}

.squashr-live-score-card-list {
    display: grid;
    gap: 12px;
}

.squashr-live-score-card,
.squashr-live-score-empty {
    border: 1px solid var(--squashr-live-border);
    border-radius: 16px;
    background: var(--squashr-live-surface);
}

.squashr-live-score-card {
    display: grid;
    gap: 14px;
    padding: 16px;
}

.squashr-live-score-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.squashr-live-score-card-meta span,
.squashr-live-score-status {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(96, 165, 250, 0.12);
    color: #bfdbfe;
    font-size: 0.76rem;
    font-weight: 800;
}

.squashr-live-score-status {
    gap: 4px;
}

.squashr-live-score-status > span {
    font-weight: 950;
}

.squashr-live-score-card-meta .squashr-live-score-card-court {
    border: 1px solid rgba(96, 165, 250, 0.28);
    background: rgba(96, 165, 250, 0.18);
    color: #dbeafe;
}

.squashr-live-score-status.is-on-court {
    background: rgba(251, 146, 60, 0.18);
    color: #fed7aa;
}

.squashr-live-score-status.is-suspended {
    background: rgba(251, 146, 60, 0.14);
    color: #ffedd5;
}

.squashr-live-score-status.is-called {
    background: rgba(250, 204, 21, 0.16);
    color: #fef08a;
}

.squashr-live-score-status.is-ready {
    background: rgba(96, 165, 250, 0.18);
    color: #bfdbfe;
}

.squashr-live-score-status.is-queued,
.squashr-live-score-status.is-waiting,
.squashr-live-score-status.is-cancelled {
    background: rgba(148, 163, 184, 0.16);
    color: #cbd5e1;
}

.squashr-live-score-card h3 {
    margin: 0;
    font-size: clamp(1.35rem, 7vw, 2rem);
    line-height: 1.08;
}

.squashr-live-score-card-footer {
    display: grid;
    gap: 10px;
}

.squashr-live-score-button,
.squashr-live-score-primary,
.squashr-live-score-secondary,
.squashr-live-score-court {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 0 18px;
    border: 0;
    border-radius: 14px;
    background: var(--squashr-live-accent);
    color: #fff;
    font-size: 1rem;
    font-weight: 900;
    text-decoration: none;
    touch-action: manipulation;
}

.squashr-live-score-secondary {
    background: rgba(96, 165, 250, 0.14);
    border: 1px solid rgba(96, 165, 250, 0.36);
    color: #bfdbfe;
}

.squashr-live-score-button:focus-visible,
.squashr-live-score-primary:focus-visible,
.squashr-live-score-secondary:focus-visible,
.squashr-live-score-court:focus-visible,
.squashr-live-score-back-link:focus-visible,
.squashr-live-score-collection-list a:focus-visible,
.squashr-live-score-search input:focus-visible,
.squashr-live-score-player-panel:focus-visible,
.squashr-live-score-toolbar button:focus-visible,
.squashr-live-score-popover button:focus-visible,
.squashr-live-score-popover summary:focus-visible,
.squashr-live-score-picker input:focus-visible + span,
.squashr-live-score-choice-group input:focus-visible + strong {
    outline: 3px solid var(--squashr-live-yellow);
    outline-offset: 3px;
}

.squashr-live-score-empty {
    padding: 16px;
    color: var(--squashr-live-muted);
    font-weight: 700;
}

.squashr-live-score-form {
    display: grid;
    gap: 16px;
    margin-top: 18px;
}

.squashr-live-score-step-context {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin-top: 12px;
}

.squashr-live-score-step-context span,
.squashr-live-score-step-context a {
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(96, 165, 250, 0.12);
    color: #bfdbfe;
    font-size: 0.78rem;
    font-weight: 800;
}

.squashr-live-score-step-context a {
    border: 1px solid rgba(96, 165, 250, 0.34);
    text-decoration: none;
}

.squashr-live-score-step-context a:focus-visible,
.squashr-live-score-step-context a:hover {
    outline: 3px solid var(--squashr-live-yellow);
    outline-offset: 2px;
}

.squashr-live-score-search {
    display: grid;
    gap: 8px;
    color: var(--squashr-live-muted);
    font-weight: 800;
}

.squashr-live-score-search input {
    width: 100%;
    min-height: 56px;
    box-sizing: border-box;
    border: 1px solid var(--squashr-live-border);
    border-radius: 14px;
    background: #0b1626;
    color: var(--squashr-live-text);
    font-size: 1rem;
    padding: 0 14px;
}

.squashr-live-score-picker,
.squashr-live-score-choice-group,
.squashr-live-score-court-grid {
    display: grid;
    gap: 10px;
}

.squashr-live-score-picker label,
.squashr-live-score-choice-group label {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    padding: 12px;
    border: 1px solid var(--squashr-live-border);
    border-radius: 14px;
    background: var(--squashr-live-surface);
}

.squashr-live-score-picker input,
.squashr-live-score-choice-group input {
    width: 22px;
    height: 22px;
    accent-color: var(--squashr-live-accent-strong);
}

.squashr-live-score-picker strong,
.squashr-live-score-choice-group strong {
    display: block;
    color: var(--squashr-live-text);
    font-size: 1.04rem;
}

.squashr-live-score-picker small {
    display: block;
    margin-top: 3px;
    color: var(--squashr-live-muted);
}

.squashr-live-score-picker label.is-hidden {
    display: none;
}

.squashr-live-score-picker-action {
    position: sticky;
    top: 82px;
    z-index: 8;
    margin: -4px 0 2px;
    padding: 8px 0;
    background: linear-gradient(
        180deg,
        rgba(23, 35, 56, 0.98) 0%,
        rgba(23, 35, 56, 0.98) 78%,
        rgba(23, 35, 56, 0) 100%
    );
}

.squashr-live-score-picker-action .squashr-live-score-primary {
    width: 100%;
    min-height: 50px;
}

.squashr-live-score-mini-list .is-hidden {
    display: none;
}

.squashr-live-score-choice-group > span {
    color: var(--squashr-live-muted);
    font-weight: 900;
}

.squashr-live-score-choice-group--players,
.squashr-live-score-choice-group--sides {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.squashr-live-score-choice-group--players > span,
.squashr-live-score-choice-group--sides > span {
    grid-column: 1 / -1;
}

.squashr-live-score-choice-group--players label,
.squashr-live-score-choice-group--sides label {
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 58px;
}

.squashr-live-score-court-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 18px;
}

.squashr-live-score-court-grid form {
    display: grid;
}

.squashr-live-score-court {
    width: 100%;
    min-height: 76px;
    background: var(--squashr-live-surface);
    border: 1px solid var(--squashr-live-border);
    font-size: 1.25rem;
}

.squashr-live-score-screen {
    display: grid;
    min-height: calc(100vh - 112px);
    min-height: calc(100dvh - 112px);
    grid-template-rows: auto 1fr auto auto;
    gap: 14px;
}

.squashr-live-score-screen-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--squashr-live-muted);
    font-weight: 800;
}

.squashr-live-score-context-primary {
    flex: 1 1 100%;
    color: var(--squashr-live-text);
    font-size: 1.08rem;
}

.squashr-live-score-context-primary span {
    margin-inline: 3px;
    color: var(--squashr-live-muted);
}

.squashr-live-score-context-pill,
.squashr-live-score-serving-main > span {
    padding: 5px 9px;
    border: 1px solid var(--squashr-live-border);
    border-radius: 999px;
    background: rgba(11, 22, 38, 0.6);
    color: var(--squashr-live-muted);
    font-size: 0.78rem;
    line-height: 1.2;
}

.squashr-live-score-serving-main > .squashr-live-score-side-pill {
    border-color: rgba(250, 204, 21, 0.62);
    background: rgba(250, 204, 21, 0.2);
    color: #fef08a;
    font-weight: 900;
}

.squashr-live-score-serving {
    display: grid;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(11, 22, 38, 0.52);
    color: var(--squashr-live-muted);
}

.squashr-live-score-serving-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
}

.squashr-live-score-serving-main strong {
    margin-right: auto;
    color: var(--squashr-live-text);
    font-size: 0.94rem;
}

.squashr-live-score-scorer {
    font-size: 0.78rem;
    font-weight: 750;
}

.squashr-live-score-paused-pill {
    background: rgba(251, 146, 60, 0.18);
    color: #fed7aa;
}

.squashr-live-score-board,
.squashr-live-score-touch-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.squashr-live-score-player-panel {
    display: grid;
    gap: 10px;
    align-content: center;
    min-height: 230px;
    padding: 16px;
    border: 1px solid var(--squashr-live-border);
    border-radius: 18px;
    background: #0b1626;
    color: var(--squashr-live-text);
    text-align: left;
    touch-action: manipulation;
    transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
    min-width: 0;
    overflow: hidden;
}

.squashr-live-score-player-panel:active:not(:disabled) {
    transform: scale(0.985);
    background: #13243b;
}

.squashr-live-score-player-panel.is-serving {
    border-color: rgba(250, 204, 21, 0.75);
    box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.14);
}

.squashr-live-score-player-panel:disabled {
    opacity: 0.58;
}

.squashr-live-score-player-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.squashr-live-score-player-meta strong {
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(250, 204, 21, 0.18);
    color: #fef08a;
    font-size: 0.76rem;
    text-transform: uppercase;
    max-width: 100%;
    white-space: nowrap;
}

.squashr-live-score-player-panel span,
.squashr-live-score-player-panel small {
    color: var(--squashr-live-muted);
    font-weight: 800;
}

.squashr-live-score-player-name {
    min-width: 0;
    min-height: 2.1em;
    overflow-wrap: anywhere;
    font-size: clamp(1.2rem, 7vw, 2.4rem);
    line-height: 1.05;
}

html[data-squashr-theme="light"] .squashr-live-score-topbar {
    background: rgba(244, 247, 251, 0.94);
}

html[data-squashr-theme="light"] .squashr-live-score-hero,
html[data-squashr-theme="light"] .squashr-live-score-step,
html[data-squashr-theme="light"] .squashr-live-score-screen {
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
}

html[data-squashr-theme="light"] .squashr-live-score-player-panel,
html[data-squashr-theme="light"] .squashr-live-score-search input {
    background: #ffffff;
}

html[data-squashr-theme="light"] .squashr-live-score-player-panel:active:not(:disabled) {
    background: #e7eef8;
}

html[data-squashr-theme="light"] .squashr-live-score-player-panel.is-serving {
    border-color: #d97706;
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.16);
}

html[data-squashr-theme="light"] .squashr-live-score-player-meta strong {
    background: #fef08a;
    color: #713f12;
}

html[data-squashr-theme="light"] .squashr-live-score-serving-main > .squashr-live-score-side-pill {
    border-color: #eab308;
    background: #fef08a;
    color: #713f12;
}

html[data-squashr-theme="light"] .squashr-live-score-serving,
html[data-squashr-theme="light"] .squashr-live-score-context-pill,
html[data-squashr-theme="light"] .squashr-live-score-serving-main > span,
html[data-squashr-theme="light"] .squashr-live-score-complete div,
html[data-squashr-theme="light"] .squashr-live-score-popover details,
html[data-squashr-theme="light"] .squashr-live-score-summary-grid div,
html[data-squashr-theme="light"] .squashr-live-score-summary-section,
html[data-squashr-theme="light"] .squashr-live-score-event-log li {
    background: rgba(226, 232, 240, 0.58);
}

html[data-squashr-theme="light"] .squashr-live-score-inline-message,
html[data-squashr-theme="light"] .squashr-live-score-section--match-picker,
html[data-squashr-theme="light"] .squashr-live-score-game-result {
    color: #1e3a5f;
}

html[data-squashr-theme="light"] .squashr-live-score-section--match-picker .squashr-live-score-section-copy,
html[data-squashr-theme="light"] .squashr-live-score-game-result span,
html[data-squashr-theme="light"] .squashr-live-score-game-result strong,
html[data-squashr-theme="light"] .squashr-live-score-game-result small {
    color: #1e3a5f;
}

html[data-squashr-theme="light"] .squashr-live-score-section--match-picker {
    border-color: #bfdbfe;
    background: #eff6ff;
}

html[data-squashr-theme="light"] .squashr-live-score-section--match-picker .squashr-live-score-section-heading span,
html[data-squashr-theme="light"] .squashr-live-score-collection-list b {
    background: #dbeafe;
    color: #1e40af;
}

html[data-squashr-theme="light"] .squashr-live-score-toolbar button {
    color: #526174;
}

html[data-squashr-theme="light"] .squashr-live-score-card-meta span {
    background: #e8f1ff;
    color: #1e40af;
}

html[data-squashr-theme="light"] .squashr-live-score-card-meta .squashr-live-score-card-court {
    border-color: #93c5fd;
    background: #dbeafe;
    color: #1e3a8a;
}

html[data-squashr-theme="light"] .squashr-live-score-status.is-on-court {
    border: 1px solid #fb923c;
    background: #ffedd5;
    color: #9a3412;
}

html[data-squashr-theme="light"] .squashr-live-score-status > span {
    background: transparent;
    color: inherit;
}

html[data-squashr-theme="light"] .squashr-live-score-status.is-suspended {
    border: 1px solid #f97316;
    background: #ffedd5;
    color: #7c2d12;
}

html[data-squashr-theme="light"] .squashr-live-score-status.is-called {
    border: 1px solid #eab308;
    background: #fef9c3;
    color: #713f12;
}

html[data-squashr-theme="light"] .squashr-live-score-status.is-ready {
    border: 1px solid #60a5fa;
    background: #dbeafe;
    color: #1e3a8a;
}

html[data-squashr-theme="light"] .squashr-live-score-status.is-queued {
    border: 1px solid #a78bfa;
    background: #ede9fe;
    color: #5b21b6;
}

html[data-squashr-theme="light"] .squashr-live-score-status.is-waiting {
    border: 1px solid #94a3b8;
    background: #e2e8f0;
    color: #334155;
}

html[data-squashr-theme="light"] .squashr-live-score-status.is-cancelled {
    border: 1px solid #f87171;
    background: #fee2e2;
    color: #991b1b;
}

html[data-squashr-theme="light"] .squashr-live-score-status.is-completed {
    border: 1px solid #4ade80;
    background: #dcfce7;
    color: #166534;
}

html[data-squashr-theme="light"] .squashr-live-score-step-context span {
    background: #dbeafe;
    color: #1e3a8a;
}

html[data-squashr-theme="light"] .squashr-live-score-step-context a,
html[data-squashr-theme="light"] .squashr-live-score-secondary {
    border-color: #93c5fd;
    background: #eff6ff;
    color: #1d4ed8;
}

html[data-squashr-theme="light"] .squashr-live-score-picker-action {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.98) 0%,
        rgba(255, 255, 255, 0.98) 78%,
        rgba(255, 255, 255, 0) 100%
    );
}

html[data-squashr-theme="light"] .squashr-live-score-court {
    background: #ffffff;
    color: #0f172a;
}

.squashr-live-score-current {
    color: var(--squashr-live-text) !important;
    font-size: clamp(4rem, 25vw, 8rem);
    font-weight: 950;
    line-height: 0.9;
}

.squashr-live-score-prompt,
.squashr-live-score-complete,
.squashr-live-score-popover {
    padding: 16px;
    border: 1px solid rgba(250, 204, 21, 0.42);
    border-radius: 18px;
    background: rgba(250, 204, 21, 0.1);
}

.squashr-live-score-prompt h2,
.squashr-live-score-complete h1 {
    margin: 4px 0 12px;
    font-size: clamp(1.5rem, 9vw, 3rem);
    line-height: 1;
}

.squashr-live-score-prompt-actions,
.squashr-live-score-game-history {
    display: grid;
    gap: 10px;
}

.squashr-live-score-prompt-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.squashr-live-score-prompt-actions button,
.squashr-live-score-popover button {
    min-height: 64px;
    border: 1px solid var(--squashr-live-border);
    border-radius: 14px;
    background: var(--squashr-live-surface-raised);
    color: var(--squashr-live-text);
    font-size: 1rem;
    font-weight: 900;
}

.squashr-live-score-game-history {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
}

.squashr-live-score-game-result {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid rgba(96, 165, 250, 0.24);
    border-radius: 14px;
    background: rgba(96, 165, 250, 0.12);
}

.squashr-live-score-game-result small {
    color: #93c5fd;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.squashr-live-score-game-result span {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    color: #bfdbfe;
}

.squashr-live-score-game-result b {
    overflow: hidden;
    font-size: 0.82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.squashr-live-score-game-result strong {
    color: #f8fafc;
    font-size: 1rem;
    font-weight: 900;
}

.squashr-live-score-game-history-empty {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--squashr-live-muted);
    font-weight: 800;
}

.squashr-live-score-complete {
    display: grid;
    gap: 14px;
    text-align: center;
}

.squashr-live-score-complete dl {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.squashr-live-score-complete div {
    padding: 12px;
    border-radius: 14px;
    background: rgba(11, 22, 38, 0.58);
}

.squashr-live-score-complete dt {
    color: var(--squashr-live-muted);
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.squashr-live-score-complete dd {
    margin: 4px 0 0;
    font-weight: 900;
}

.squashr-live-score-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.squashr-live-score-toolbar button {
    flex: 1 1 96px;
    min-height: 52px;
    border: 1px solid var(--squashr-live-border);
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.08);
    color: rgba(203, 213, 225, 0.68);
    font-weight: 900;
}

.squashr-live-score-popover {
    display: grid;
    gap: 10px;
}

.squashr-live-score-popover details {
    display: grid;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--squashr-live-border);
    border-radius: 14px;
    background: rgba(11, 22, 38, 0.5);
}

.squashr-live-score-popover summary {
    cursor: pointer;
    font-weight: 950;
}

.squashr-live-score-mini-list {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.squashr-live-score-mini-list button {
    display: grid;
    gap: 3px;
    text-align: left;
}

.squashr-live-score-mini-list span {
    color: var(--squashr-live-muted);
    font-size: 0.85rem;
}

.squashr-live-score-popover[hidden] {
    display: none;
}

.squashr-live-score-popover p {
    margin: 0;
    color: var(--squashr-live-muted);
    font-weight: 900;
}

.squashr-live-score-screen.is-saving {
    cursor: progress;
}

.squashr-live-score-screen.is-saving button {
    filter: saturate(0.75);
}

.squashr-live-score-screen.is-fresh {
    animation: squashr-live-score-fresh 320ms ease-out;
}

.squashr-live-score-summary {
    display: grid;
    gap: 16px;
}

.squashr-live-score-summary-sections {
    display: grid;
    gap: 12px;
}

.squashr-live-score-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin: 0;
}

.squashr-live-score-summary-grid div,
.squashr-live-score-summary-section {
    padding: 12px;
    border: 1px solid var(--squashr-live-border);
    border-radius: 14px;
    background: rgba(11, 22, 38, 0.55);
}

.squashr-live-score-summary-grid dt {
    color: var(--squashr-live-muted);
    font-size: 0.76rem;
    font-weight: 950;
    text-transform: uppercase;
}

.squashr-live-score-summary-grid dd {
    margin: 5px 0 0;
    font-weight: 950;
}

.squashr-live-score-summary-section h2 {
    margin: 0 0 10px;
    font-size: 1rem;
}

.squashr-live-score-summary-section ol {
    display: grid;
    gap: 8px;
    margin: 0;
    padding-left: 20px;
}

.squashr-live-score-summary-section span {
    color: var(--squashr-live-muted);
}

.squashr-live-score-event-log {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.squashr-live-score-event-log li {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 10px;
    padding: 12px;
    border: 1px solid var(--squashr-live-border);
    border-radius: 14px;
    background: rgba(11, 22, 38, 0.55);
}

.squashr-live-score-event-log span,
.squashr-live-score-event-log small,
.squashr-live-score-event-log em {
    color: var(--squashr-live-muted);
}

.squashr-live-score-event-log em {
    font-style: normal;
}

.squashr-live-score-event-meta {
    display: grid;
    grid-column: 2;
    gap: 2px;
}

.squashr-live-score-summary-actions {
    display: grid;
    gap: 10px;
}

@keyframes squashr-live-score-fresh {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }

    35% {
        box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.24);
    }

    100% {
        box-shadow: 0 22px 44px rgba(0, 0, 0, 0.28);
    }
}

@media (min-width: 700px) {
    .squashr-live-score-app {
        padding-inline: 24px;
    }

    .squashr-live-score-card-footer {
        grid-template-columns: auto minmax(180px, max-content);
        align-items: center;
        justify-content: space-between;
    }
}

@media (min-width: 900px) {
    .squashr-live-score-step.squashr-live-score-summary {
        width: min(100%, 1080px);
        padding: 28px;
    }

    .squashr-live-score-summary h1 {
        font-size: clamp(2.25rem, 5vw, 3.5rem);
    }

    .squashr-live-score-summary-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .squashr-live-score-summary-sections {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: stretch;
    }

    .squashr-live-score-summary-section {
        padding: 18px;
    }

    .squashr-live-score-event-log li {
        grid-template-columns: 48px minmax(280px, 1fr) 90px minmax(180px, auto);
        align-items: center;
        padding: 14px 16px;
    }

    .squashr-live-score-event-meta {
        grid-column: 4;
    }

    .squashr-live-score-summary-actions {
        grid-template-columns: repeat(3, max-content);
        align-items: center;
    }
}

@media (max-width: 480px) {
    .squashr-live-score-app {
        padding: 10px 10px max(12px, env(safe-area-inset-bottom));
    }

    .squashr-live-score-topbar {
        margin: -10px -10px 10px;
        padding: 12px 12px 10px;
    }

    .squashr-live-score-topbar .squashr-theme-control select {
        min-height: 34px;
    }

    .squashr-live-score-screen {
        min-height: 0;
        grid-template-rows: none;
        gap: 9px;
        margin-bottom: 10px;
        padding: 12px;
        border-radius: 15px;
    }

    .squashr-live-score-screen-header {
        gap: 6px;
    }

    .squashr-live-score-context-primary {
        font-size: 0.94rem;
    }

    .squashr-live-score-context-pill,
    .squashr-live-score-serving-main > span {
        padding: 4px 8px;
        font-size: 0.72rem;
    }

    .squashr-live-score-serving {
        gap: 4px;
        padding: 8px 10px;
        border-radius: 12px;
    }

    .squashr-live-score-serving-main strong {
        font-size: 0.88rem;
    }

    .squashr-live-score-board {
        gap: 8px;
    }

    .squashr-live-score-court-grid {
        grid-template-columns: 1fr;
    }

    .squashr-live-score-prompt {
        padding: 12px;
    }

    .squashr-live-score-prompt h2 {
        margin-bottom: 10px;
        font-size: clamp(1.35rem, 8vw, 2rem);
    }

    .squashr-live-score-prompt-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .squashr-live-score-prompt-actions button {
        min-width: 0;
        min-height: 54px;
        padding-inline: 6px;
    }

    .squashr-live-score-screen.has-pending-prompt > .squashr-live-score-inline-message,
    .squashr-live-score-screen.has-pending-prompt > .squashr-live-score-game-history,
    .squashr-live-score-screen.has-pending-prompt > .squashr-live-score-toolbar {
        display: none;
    }

    .squashr-live-score-complete dl {
        grid-template-columns: 1fr;
    }

    .squashr-live-score-player-panel {
        min-height: 158px;
        gap: 6px;
        padding: 10px;
        border-radius: 15px;
    }

    .squashr-live-score-player-meta {
        align-content: start;
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .squashr-live-score-player-name {
        font-size: clamp(1.08rem, 6.4vw, 1.65rem);
    }

    .squashr-live-score-current {
        font-size: clamp(3.6rem, 22vw, 6.2rem);
    }

    .squashr-live-score-game-history {
        gap: 7px;
    }

    .squashr-live-score-game-result {
        gap: 3px;
        padding: 8px 10px;
        border-radius: 12px;
    }

    .squashr-live-score-toolbar {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
    }

    .squashr-live-score-toolbar button {
        min-width: 0;
        min-height: 46px;
        padding-inline: 4px;
        font-size: 0.82rem;
    }
}

@media (display-mode: standalone) {
    .squashr-live-score-topbar {
        padding-top: max(16px, env(safe-area-inset-top));
    }
}

@media (display-mode: standalone) and (max-width: 480px) {
    .squashr-live-score-topbar {
        padding-top: max(12px, env(safe-area-inset-top));
    }
}

@media (max-width: 480px) and (display-mode: browser) {
    .squashr-live-score-topbar {
        position: static;
        top: auto;
        padding-top: 12px;
    }
}

@media (max-width: 340px) {
    .squashr-live-score-board {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
.squashr-live-score-sync-status {
    margin: 14px 0;
    padding: 12px 14px;
    border: 1px solid rgba(37, 99, 235, 0.35);
    border-radius: 12px;
    background: rgba(37, 99, 235, 0.1);
    color: inherit;
    font-weight: 700;
}

.squashr-live-score-sync-status.is-offline {
    border-color: rgba(245, 158, 11, 0.55);
    background: rgba(245, 158, 11, 0.14);
}

.squashr-live-score-sync-status.is-syncing {
    border-color: rgba(14, 165, 233, 0.45);
    background: rgba(14, 165, 233, 0.12);
}

.squashr-live-score-sync-status.is-error {
    border-color: rgba(220, 38, 38, 0.5);
    background: rgba(220, 38, 38, 0.12);
}
