:root {
    color-scheme: light;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    --ink: #17252f;
    --muted: #60717c;
    --line: #d6e0e4;
    --surface: #ffffff;
    --canvas: #f2f6f6;
    --brand: #146c5f;
    --brand-dark: #0d4f46;
    --accent: #e3a928;
    --accent-soft: #fff5d7;
    --danger: #b83b3b;
    --danger-soft: #fff0f0;
    --success: #157a53;
    --success-soft: #e8f7ef;
}


.ta-played-bet-form,
.ta-played-bet-list {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--ta-border, #d9e1e7);
}

.ta-played-bet-events {
    display: grid;
    gap: .75rem;
    margin: 1rem 0;
}

.ta-played-bet-event {
    display: grid;
    gap: .65rem;
    padding: .8rem;
    border: 1px solid var(--ta-border, #d9e1e7);
    border-radius: .75rem;
    background: #fff;
}

.ta-played-bet-event.selected {
    border-color: #177b6b;
    background: #f2fbf8;
}

.ta-exact-score-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
}

.ta-played-bet-item.won,
.ta-played-bet-item li.won {
    border-color: var(--success);
    background: var(--success-soft);
}

.ta-played-bet-item.lost,
.ta-played-bet-item li.lost {
    border-color: var(--danger);
    background: var(--danger-soft);
}

.ta-played-bet-item.pending,
.ta-played-bet-item li.pending {
    border-color: var(--ta-border, #d9e1e7);
    background: var(--surface);
}

.ta-played-bet-outcome {
    font-weight: 800;
}

.ta-played-bet-item ul {
    display: grid;
    gap: .35rem;
    margin: .6rem 0 0;
    padding-left: 1.2rem;
}

.ta-played-bet-item li span {
    margin-left: .35rem;
}

.ta-played-bet-item li {
    padding: .35rem .5rem;
    border: 1px solid transparent;
    border-radius: .4rem;
}

@media (max-width: 520px) {
    .ta-exact-score-fields {
        grid-template-columns: 1fr;
    }
}
* { box-sizing: border-box; }
html, body, #app { min-height: 100%; margin: 0; }
body { background: var(--canvas); color: var(--ink); }
button, input, select { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }

.status-bar-safe-area { height: env(safe-area-inset-top); background: var(--brand-dark); }
.ta-shell { min-height: calc(100vh - env(safe-area-inset-top)); }
.ta-screen { min-height: calc(100vh - env(safe-area-inset-top)); padding: 16px; }
.ta-centered { display: grid; place-content: center; text-align: center; }
.ta-logo {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: var(--brand);
    color: white;
    font-size: 1.55rem;
    font-weight: 800;
}

.ta-access { display: grid; align-content: center; gap: 24px; max-width: 560px; margin: 0 auto; }
.ta-access-copy h1, .ta-header h1, .ta-section-heading h2, .ta-section-heading h3 {
    margin: 4px 0 0;
    line-height: 1.15;
    letter-spacing: 0;
}
.ta-access-copy p { margin: 10px 0 0; color: var(--muted); line-height: 1.45; }
.ta-kicker { color: var(--brand); font-size: .78rem; font-weight: 800; text-transform: uppercase; }
.ta-access-form { display: grid; gap: 12px; }
.ta-access-form input { min-height: 52px; font-size: 1.1rem; text-align: center; }
.ta-pin-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }

input, select {
    min-width: 0;
    min-height: 44px;
    width: 100%;
    padding: 9px 11px;
    border: 1px solid #afbec4;
    border-radius: 6px;
    background: white;
    color: var(--ink);
}
input:focus, select:focus { outline: 2px solid rgba(20,108,95,.24); border-color: var(--brand); }

.ta-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 1100px;
    margin: 0 auto 14px;
}
.ta-header h1 { font-size: 1.45rem; }
.ta-icon-button {
    min-width: 44px;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: white;
    color: var(--brand-dark);
    font-weight: 700;
}
.ta-button {
    min-height: 44px;
    padding: 9px 15px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-weight: 750;
}
.ta-button.primary { background: var(--brand); color: white; }
.ta-button.primary:active { background: var(--brand-dark); }
.ta-button.secondary { border-color: #a8babf; background: white; color: var(--brand-dark); }
.ta-button.danger { border-color: #e3aaaa; background: white; color: var(--danger); }
.ta-button.compact { min-height: 38px; padding: 6px 10px; font-size: .88rem; }

.ta-alert {
    max-width: 1100px;
    margin: 10px auto;
    padding: 11px 13px;
    border: 1px solid;
    border-radius: 6px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}
.ta-alert.error { border-color: #e9a5a5; background: var(--danger-soft); color: #872828; }
.ta-alert.success { border-color: #96d4b8; background: var(--success-soft); color: #0d6040; }
.ta-hint { margin: 7px 0 0; color: var(--muted); font-size: .84rem; line-height: 1.35; }

.ta-championship-select { max-width: 1100px; margin: 0 auto 12px; }
.ta-tabs, .ta-subtabs {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(90px, 1fr);
    max-width: 1100px;
    margin: 0 auto;
    overflow-x: auto;
    border-bottom: 1px solid var(--line);
}
.ta-tabs button, .ta-subtabs button {
    min-height: 44px;
    padding: 8px 10px;
    border: 0;
    border-bottom: 3px solid transparent;
    background: transparent;
    color: var(--muted);
    font-weight: 700;
    white-space: nowrap;
}
.ta-tabs button.active, .ta-subtabs button.active { border-bottom-color: var(--brand); color: var(--brand-dark); }
.ta-subtabs { margin-bottom: 14px; }

.ta-sheet-tools {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #edf3f3;
}
.ta-sheet-tools button {
    min-height: 44px;
    padding: 9px 12px;
    border: 1px solid #a8babf;
    border-radius: 6px;
    background: white;
    color: var(--brand-dark);
    font-weight: 750;
    text-align: left;
}
.ta-sheet-tools button:hover:not(:disabled) { border-color: var(--brand); background: var(--accent-soft); }
.ta-sheet-tools button:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, white); outline-offset: 2px; }
.ta-sheet-tools button.active { border-color: var(--brand); background: var(--brand); color: white; }
.ta-sheet-tools button:disabled { cursor: not-allowed; opacity: .55; }
.ta-sheet-tool-workspace { min-height: 120px; }

.ta-content { max-width: 1100px; margin: 0 auto; padding-top: 16px; }
.ta-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.ta-section-heading h2 { font-size: 1.25rem; }
.ta-section-heading h3 { font-size: 1.05rem; }
.ta-loading, .ta-empty {
    padding: 32px 16px;
    border: 1px solid var(--line);
    background: white;
    color: var(--muted);
    text-align: center;
}

.ta-standings, .ta-card-list, .ta-admin-list, .ta-history-detail { display: grid; gap: 8px; }
.ta-standing {
    display: grid;
    grid-template-columns: 34px 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 64px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-left: 4px solid transparent;
    border-radius: 6px;
    background: white;
}
.ta-standing.current { border-left-color: var(--accent); background: var(--accent-soft); }
.ta-position { text-align: center; font-size: 1.05rem; }
.ta-avatar {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--brand);
    color: white;
    font-size: .82rem;
    font-weight: 800;
}
.ta-standing-name { display: grid; min-width: 0; }
.ta-standing-name strong { overflow-wrap: anywhere; }
.ta-standing-name span { color: var(--muted); font-size: .78rem; }
.ta-score { color: var(--brand-dark); font-size: 1.1rem; white-space: nowrap; }

.ta-scorecard {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 76px;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: white;
    color: var(--ink);
    text-align: left;
}
.ta-scorecard-sequence {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--brand);
    color: white;
    font-weight: 800;
}
.ta-scorecard-main { display: grid; min-width: 0; gap: 2px; }
.ta-scorecard-main strong { overflow-wrap: anywhere; }
.ta-scorecard-main small { color: var(--muted); }
.ta-scorecard-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: stretch; }
.ta-scorecard-pdf { min-width: 88px; white-space: nowrap; }
.ta-status { padding: 5px 7px; border-radius: 4px; font-size: .75rem; font-weight: 800; }
.ta-status.open { background: var(--success-soft); color: var(--success); }
.ta-status.locked { background: var(--danger-soft); color: var(--danger); }
.ta-status.closed { background: #edf1f2; color: #53636c; }
.ta-payment-status { display: inline-flex; align-items: center; width: fit-content; padding: 4px 7px; border-radius: 999px; font-size: .75rem; font-weight: 800; }
.ta-payment-status.paid { background: var(--success-soft); color: var(--success); }
.ta-payment-status.unpaid { background: #fff1cc; color: #785900; }

.ta-detail-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 10px;
    border-bottom: 1px solid var(--line);
}
.ta-detail-toolbar > div { display: grid; min-width: 0; }
.ta-detail-toolbar span { color: var(--muted); font-size: .82rem; }
.ta-detail-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0 0 12px;
    border-bottom: 1px solid var(--line);
}
.ta-detail-tabs button {
    min-height: 44px;
    border: 0;
    border-bottom: 3px solid transparent;
    background: transparent;
    color: var(--muted);
    font-weight: 700;
}
.ta-detail-tabs button.active { border-bottom-color: var(--brand); color: var(--brand-dark); }
.ta-predictions { display: grid; gap: 10px; }
.ta-match {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: white;
}
.ta-match-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: .78rem; }
.ta-weight-badge {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 9px;
    padding: 4px 7px;
    border: 1px solid #dec476;
    border-radius: 4px;
    background: var(--accent-soft);
    color: #684e08;
    font-size: .76rem;
    font-weight: 750;
}
.ta-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin: 12px 0; text-align: center; }
.ta-teams strong { overflow-wrap: anywhere; }
.ta-teams span { color: var(--muted); font-size: .76rem; text-transform: uppercase; }
.ta-score-inputs { display: grid; grid-template-columns: minmax(64px, 1fr) auto minmax(64px, 1fr); align-items: center; gap: 8px; }
.ta-score-inputs input { text-align: center; font-size: 1.1rem; }
.ta-sticky-actions { position: sticky; bottom: 0; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); background: rgba(242,246,246,.96); }
.ta-sticky-actions .ta-button { width: 100%; }

.ta-history-participants { display: grid; gap: 8px; }
.ta-history-participant {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 64px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: white;
    color: var(--ink);
    text-align: left;
}
.ta-history-participant strong { min-width: 0; overflow-wrap: anywhere; }
.ta-history-table-shell {
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: white;
}
.ta-history-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}
.ta-history-table th, .ta-history-table td {
    min-width: 0;
    padding: 10px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
}
.ta-history-table tr > :last-child { border-right: 0; }
.ta-history-table tbody tr:last-child > * { border-bottom: 0; }
.ta-history-table thead th {
    background: #edf3f3;
    color: #3e505a;
    font-size: .75rem;
    text-transform: uppercase;
}
.ta-history-table thead th:first-child { width: 26%; }
.ta-history-match strong, .ta-history-match span { display: block; }
.ta-history-match strong { font-size: .88rem; }
.ta-history-match span { margin-top: 4px; color: var(--muted); font-size: .72rem; font-weight: 400; }
.ta-history-pick { display: grid; gap: 4px; min-width: 0; }
.ta-history-pick > span {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: baseline;
    gap: 5px;
    min-width: 0;
}
.ta-history-pick small { color: var(--muted); font-size: .66rem; text-transform: uppercase; }
.ta-history-pick strong { min-width: 0; font-size: .78rem; text-align: right; overflow-wrap: anywhere; }
.ta-history-pick > span:last-child strong { color: var(--brand-dark); }
.ta-history-missing { display: block; color: var(--muted); text-align: center; }

.ta-admin-panel, .ta-modal-inline {
    margin-bottom: 14px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: white;
}
.ta-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.ta-field { display: grid; gap: 5px; min-width: 0; color: #3e505a; font-size: .82rem; font-weight: 650; }
.ta-field.full { grid-column: 1 / -1; }
.ta-check, .ta-switch { display: flex; align-items: center; gap: 8px; color: #3e505a; font-size: .88rem; }
.ta-check input, .ta-switch input { width: 20px; min-height: 20px; margin: 0; }
.ta-action-row, .ta-inline-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.ta-option-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 8px 0 14px;
}
.ta-admin-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: white;
}
.ta-admin-item > div:first-child { display: grid; min-width: 0; }
.ta-admin-item span { color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.ta-match-picker { display: grid; gap: 8px; max-height: 420px; overflow-y: auto; }
.ta-match-picker article { display: grid; grid-template-columns: minmax(0, 1fr) minmax(130px, 220px); align-items: center; gap: 10px; padding: 9px; border: 1px solid var(--line); }
.ta-match-picker .ta-check span { display: grid; }
.ta-match-picker small { color: var(--muted); }
.ta-event-config { display: grid; gap: 7px; }
.ta-admin-panel-spaced { margin-top: 14px; }
.ta-result-list { display: grid; gap: 8px; margin: 12px 0; }
.ta-result-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, auto);
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: white;
}
.ta-result-row > div:first-child { display: grid; min-width: 0; }
.ta-result-row small { color: var(--muted); }
.ta-result-row.busy { border-color: #9ebdb8; background: #f7fbfa; }
.ta-result-controls {
    display: grid;
    grid-template-columns: minmax(150px, 190px) minmax(160px, 190px);
    align-items: start;
    justify-content: end;
    gap: 10px;
}
.ta-result-actions { display: grid; gap: 8px; min-width: 0; }
.ta-result-provider-action { display: grid; gap: 5px; min-width: 0; }
.ta-result-manual-action { display: grid; gap: 5px; min-width: 0; }
.ta-result-provider-action .ta-button,
.ta-result-manual-action .ta-button { width: 100%; white-space: nowrap; }
.ta-result-feedback {
    color: var(--muted);
    font-size: .74rem;
    font-weight: 650;
    line-height: 1.3;
    overflow-wrap: anywhere;
}
.ta-result-feedback.success { color: var(--success); }
.ta-result-feedback.live { color: #8a5b00; }
.ta-result-feedback.error { color: var(--danger); }
.ta-result-standings {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}
.ta-result-standings-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 9px;
}
.ta-result-standings-heading > div:first-child { display: grid; gap: 2px; }
.ta-result-standings-heading h4 { margin: 0; font-size: 1rem; }
.ta-result-standings-heading span { color: var(--muted); font-size: .76rem; }
.ta-result-standings-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(76px, 1fr));
    overflow: hidden;
    border: 1px solid #a8babf;
    border-radius: 6px;
}
.ta-result-standings-tabs button {
    min-height: 36px;
    padding: 6px 10px;
    border: 0;
    background: white;
    color: var(--brand-dark);
    font-weight: 700;
}
.ta-result-standings-tabs button + button { border-left: 1px solid #a8babf; }
.ta-result-standings-tabs button.active { background: var(--brand); color: white; }
.ta-result-standings-empty { margin: 0; padding: 13px 0; color: var(--muted); font-size: .84rem; }
.ta-result-ranking { border-top: 1px solid var(--line); }
.ta-result-ranking-row {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 7px 4px;
    border-bottom: 1px solid var(--line);
}
.ta-result-ranking-position { text-align: center; }
.ta-result-ranking-name { min-width: 0; overflow-wrap: anywhere; }
.ta-result-ranking-row small { white-space: nowrap; }
.ta-modal-inline { border-left: 4px solid var(--accent); margin-top: 14px; }
.ta-sheet-list-heading { margin-top: 18px; }
.ta-dialog-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(18, 35, 43, .7);
}
.ta-dialog {
    display: flex;
    flex-direction: column;
    width: min(1500px, 100%);
    max-height: calc(100dvh - 32px);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: white;
    box-shadow: 0 18px 52px rgba(6, 26, 34, .28);
}
.ta-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}
.ta-dialog-header > div { display: grid; min-width: 0; gap: 2px; }
.ta-dialog-header h3 { margin: 0; }
.ta-dialog-header span { color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.ta-dialog-error { margin: 14px 16px; }
.ta-distribution-message-dialog { width: min(680px, 100%); }
.ta-distribution-message-dialog > .ta-dialog-header { flex: 0 0 auto; }
.ta-distribution-message-dialog > .ta-activation-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.ta-distribution-release { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--canvas); }
.ta-distribution-release p { margin: 0; white-space: pre-wrap; }
.ta-distribution-release .ta-button { justify-self: start; }
.ta-distribution-dismiss { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.ta-distribution-dismiss input { width: 20px; height: 20px; margin: 0; accent-color: var(--brand); }
.ta-activation-dialog { width: min(620px, 100%); }
.ta-activation-body { display: grid; gap: 14px; padding: 16px; }
.ta-activation-code {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 1rem;
    letter-spacing: .03em;
    cursor: copy;
}
.ta-alert.warning { border-color: #d8a03e; background: #fff8e8; color: #6f4700; }
.ta-percentages-scroll {
    min-height: 0;
    overflow: auto;
    margin: 14px 16px 16px;
    border: 1px solid var(--line);
    border-radius: 6px;
}
.ta-percentages-table {
    width: 100%;
    min-width: 1050px;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    font-size: .82rem;
}
.ta-percentages-table th,
.ta-percentages-table td {
    padding: 8px 10px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    text-align: right;
    white-space: nowrap;
}
.ta-percentages-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--brand);
    color: white;
    font-weight: 800;
}
.ta-percentages-table th:first-child,
.ta-percentages-table td:first-child { text-align: left; }
.ta-percentages-table td:first-child { min-width: 230px; }
.ta-percentages-table tr:last-child td { border-bottom: 0; }
.ta-percentages-table th:last-child,
.ta-percentages-table td:last-child { border-right: 0; }

.ta-password-gate { min-height: 100vh; display: grid; place-items: center; padding: 18px; }
.ta-password-panel {
    width: min(100%, 520px);
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    box-shadow: 0 18px 46px rgba(20, 34, 42, .24);
}
.ta-password-heading { margin-bottom: 14px; }
.ta-password-heading h2 { margin: 4px 0 6px; font-size: 1.45rem; }
.ta-password-heading p { margin: 0 0 8px; color: var(--muted); }

.ta-footer { max-width: 1100px; margin: 24px auto 0; padding: 12px 0 calc(8px + env(safe-area-inset-bottom)); color: var(--muted); font-size: .75rem; text-align: center; }
.ta-access-version { margin-top: 0; padding-top: 0; }
#blazor-error-ui { display: none; }

@media (max-width: 640px) {
    :root { font-size: 15px; }
    .ta-screen { padding: 12px; }
    .ta-header h1 { font-size: 1.25rem; }
    .ta-tabs { margin-inline: -12px; padding-inline: 6px; }
    .ta-sheet-tools {
        grid-auto-flow: column;
        grid-auto-columns: minmax(150px, 72vw);
        grid-template-columns: none;
        margin-inline: -12px;
        padding-inline: 12px;
        overflow-x: auto;
        scroll-snap-type: x proximity;
    }
    .ta-sheet-tools button { scroll-snap-align: start; }
    .ta-section-heading { align-items: flex-end; }
    .ta-standing { grid-template-columns: 28px 38px minmax(0, 1fr) auto; padding: 8px; gap: 7px; }
    .ta-avatar { width: 36px; height: 36px; }
    .ta-standing-name span { display: none; }
    .ta-scorecard { grid-template-columns: 34px minmax(0, 1fr); }
    .ta-scorecard .ta-status { grid-column: 2; justify-self: start; }
    .ta-scorecard-row { grid-template-columns: 1fr; }
    .ta-scorecard-pdf { width: 100%; }
    .ta-form-grid { grid-template-columns: 1fr; }
    .ta-option-grid { grid-template-columns: 1fr; }
    .ta-field.full { grid-column: auto; }
    .ta-admin-item { align-items: flex-start; flex-direction: column; }
    .ta-inline-actions { justify-content: flex-start; margin-top: 2px; }
    .ta-match-picker article, .ta-result-row, .ta-result-controls { grid-template-columns: 1fr; }
    .ta-result-controls { justify-content: stretch; }
    .ta-result-standings-heading { align-items: stretch; flex-direction: column; }
    .ta-result-standings-tabs { width: 100%; }
    .ta-result-ranking-row { grid-template-columns: 28px minmax(0, 1fr) auto; gap: 7px; }
    .ta-result-ranking-row small { grid-column: 2; white-space: normal; }
    .ta-result-ranking-row .ta-score { grid-column: 3; grid-row: 1 / span 2; }
    .ta-history-table-shell { overflow: visible; border: 0; border-radius: 0; background: transparent; }
    .ta-history-table, .ta-history-table tbody { display: grid; width: 100%; gap: 8px; }
    .ta-history-table thead { display: none; }
    .ta-history-table tbody tr {
        display: grid;
        min-width: 0;
        overflow: hidden;
        border: 1px solid var(--line);
        border-radius: 6px;
        background: white;
    }
    .ta-history-table tbody tr > *,
    .ta-history-table tbody tr:last-child > * {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
    .ta-history-table tbody tr > :last-child,
    .ta-history-table tbody tr:last-child > :last-child { border-bottom: 0; }
    .ta-history-table .ta-history-match { display: block; width: 100%; background: #edf3f3; }
    .ta-history-table td {
        display: grid;
        grid-template-columns: minmax(76px, .4fr) minmax(0, 1fr);
        align-items: start;
        gap: 8px;
        width: 100%;
    }
    .ta-history-table td::before {
        content: attr(data-label);
        color: #3e505a;
        font-size: .7rem;
        font-weight: 800;
        text-transform: uppercase;
        overflow-wrap: anywhere;
    }
    .ta-history-missing { text-align: right; }
    .ta-dialog-backdrop { padding: 6px; }
    .ta-dialog { max-height: calc(100dvh - 12px); }
    .ta-dialog-header { align-items: flex-start; padding: 12px; }
    .ta-dialog-header span { display: none; }
    .ta-percentages-scroll { margin: 10px; }
}

@media (min-width: 900px) {
    .ta-content { padding-top: 20px; }
    .ta-standings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ta-card-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ta-history-participants { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ta-predictions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ta-admin-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.ta-cash-total {
    margin: 0 auto 1.25rem;
    max-width: 28rem;
    padding: 1.4rem;
    border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
    border-radius: 1rem;
    background: color-mix(in srgb, var(--accent) 10%, var(--surface));
    text-align: center;
    display: grid;
    gap: .25rem;
}

.ta-cash-total span,
.ta-cash-total small {
    color: var(--muted);
}

.ta-cash-total strong {
    color: var(--accent);
    font-size: clamp(1.8rem, 5vw, 2.7rem);
}

.ta-cash-day {
    align-items: center;
}

.ta-cash-day-balance {
    font-size: 1.05rem;
    font-weight: 800;
    white-space: nowrap;
}

.ta-cash-dialog {
    width: min(860px, 100%);
}

.ta-cash-dialog > .ta-dialog-header {
    flex: 0 0 auto;
}

.ta-cash-dialog-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 16px;
}

.ta-cash-breakdown {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
    margin-bottom: 1rem;
}

.ta-cash-breakdown > div {
    border: 1px solid var(--line);
    border-radius: .8rem;
    padding: .9rem;
    background: var(--surface);
    display: grid;
    gap: .2rem;
}

.ta-cash-breakdown span,
.ta-cash-breakdown small,
.ta-cash-movement small {
    color: var(--muted);
}

.ta-cash-breakdown strong {
    font-size: 1.1rem;
}

.ta-cash-breakdown .ta-cash-balance {
    grid-column: 1 / -1;
    text-align: center;
    background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}

.ta-cash-breakdown .ta-cash-balance strong {
    color: var(--accent);
    font-size: 1.55rem;
}

.ta-cash-confirm {
    display: grid;
    gap: .75rem;
    margin-bottom: 1rem;
}

.ta-cash-movement > div:first-child {
    display: grid;
    gap: .2rem;
}

@media (max-width: 640px) {
    .ta-cash-dialog-body {
        padding: 12px;
    }

    .ta-cash-breakdown {
        grid-template-columns: 1fr;
    }

    .ta-cash-breakdown .ta-cash-balance {
        grid-column: auto;
    }

    .ta-cash-day {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .ta-cash-day-balance {
        grid-column: 2;
        justify-self: start;
    }
}
