:root {
    color-scheme: light;
    --tp-ink: #13253d;
    --tp-muted: #5d6f83;
    --tp-soft: #edf4f0;
    --tp-canvas: #f4f7f6;
    --tp-surface: #ffffff;
    --tp-line: #d7e2dc;
    --tp-line-strong: #b9c9c0;
    --tp-green: #087443;
    --tp-green-dark: #055d35;
    --tp-green-light: #dff5e9;
    --tp-blue: #1265d8;
    --tp-blue-light: #eaf2ff;
    --tp-yellow: #a56200;
    --tp-yellow-light: #fff5d8;
    --tp-red: #bd2c36;
    --tp-red-light: #ffeaec;
    --tp-shadow: 0 18px 55px rgba(22, 55, 42, 0.1);
    --tp-shadow-small: 0 6px 22px rgba(22, 55, 42, 0.08);
    --tp-radius: 20px;
    --tp-radius-small: 13px;
    --tp-focus: 0 0 0 4px rgba(18, 101, 216, 0.2);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--tp-canvas);
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: var(--tp-ink);
    background:
        radial-gradient(circle at 6% -8%, rgba(8, 116, 67, 0.11), transparent 31rem),
        radial-gradient(circle at 97% 8%, rgba(18, 101, 216, 0.08), transparent 28rem),
        var(--tp-canvas);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
    color: inherit;
    font: inherit;
}

button,
a,
input,
select,
textarea,
[tabindex]:not([tabindex="-1"]) {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--tp-blue);
    outline-offset: 2px;
    box-shadow: var(--tp-focus);
}

a {
    color: var(--tp-green-dark);
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

.tp-skip-link {
    position: fixed;
    z-index: 999;
    top: 8px;
    left: 8px;
    padding: 12px 16px;
    border-radius: 10px;
    color: #fff;
    background: var(--tp-blue);
    transform: translateY(-140%);
    transition: transform 0.15s ease;
}

.tp-skip-link:focus {
    transform: translateY(0);
}

.tp-app {
    min-height: 100vh;
}

.tp-topbar {
    position: sticky;
    z-index: 40;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 74px;
    padding: 12px max(20px, calc((100vw - 1320px) / 2));
    border-bottom: 1px solid rgba(185, 201, 192, 0.78);
    background: rgba(250, 252, 251, 0.92);
    box-shadow: 0 3px 16px rgba(22, 55, 42, 0.04);
    backdrop-filter: blur(18px);
}

.tp-brand {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    gap: 11px;
    color: var(--tp-ink);
    text-decoration: none;
}

.tp-brand-mark {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 15px;
    color: #fff;
    background: linear-gradient(145deg, var(--tp-green), #0a9b58);
    box-shadow: 0 8px 20px rgba(8, 116, 67, 0.22);
    font-size: 22px;
}

.tp-brand strong,
.tp-brand small {
    display: block;
}

.tp-brand strong {
    font-size: 1.05rem;
    line-height: 1.1;
}

.tp-brand small {
    margin-top: 3px;
    color: var(--tp-muted);
    font-size: 0.78rem;
}

.tp-top-actions,
.tp-hero-actions,
.tp-page-actions,
.tp-form-actions,
.tp-dialog-actions,
.tp-inline-actions,
.tp-share-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.tp-button,
.tp-icon-button,
.tp-step-button,
.tp-score-button,
.tp-segment-button {
    min-height: 44px;
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 760;
    touch-action: manipulation;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.tp-button:hover,
.tp-icon-button:hover,
.tp-score-button:hover,
.tp-segment-button:hover {
    transform: translateY(-1px);
}

.tp-button:disabled,
.tp-icon-button:disabled,
.tp-score-button:disabled,
.tp-segment-button:disabled {
    cursor: not-allowed;
    opacity: 0.52;
    transform: none;
}

.tp-field input:disabled,
.tp-field select:disabled {
    cursor: not-allowed;
    opacity: 0.68;
    background: #eef1f4;
}

.tp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
}

.tp-button--primary {
    color: #fff;
    background: linear-gradient(135deg, var(--tp-green), #079552);
    box-shadow: 0 8px 22px rgba(8, 116, 67, 0.2);
}

.tp-button--primary:hover {
    background: linear-gradient(135deg, var(--tp-green-dark), var(--tp-green));
}

.tp-button--secondary {
    color: var(--tp-green-dark);
    border-color: #a8d5bd;
    background: var(--tp-green-light);
}

.tp-button--ghost,
.tp-button--quiet {
    color: var(--tp-ink);
    border-color: var(--tp-line);
    background: var(--tp-surface);
}

.tp-button--quiet {
    border-color: transparent;
    background: transparent;
}

.tp-button--danger {
    color: #fff;
    background: var(--tp-red);
}

.tp-button--large {
    min-height: 52px;
    padding-inline: 20px;
    border-radius: 14px;
}

.tp-button--compact {
    padding-inline: 12px;
    font-size: 0.9rem;
}

.tp-button--full {
    width: 100%;
}

.tp-icon-button {
    display: inline-grid;
    width: 44px;
    height: 44px;
    padding: 0;
    place-items: center;
    border-color: var(--tp-line);
    border-radius: 50%;
    background: var(--tp-surface);
    font-size: 1.45rem;
}

.tp-eyebrow {
    margin-bottom: 8px;
    color: var(--tp-green);
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.tp-lead {
    max-width: 66ch;
    color: var(--tp-muted);
    font-size: clamp(1.02rem, 2vw, 1.22rem);
}

.tp-small-note,
.tp-help,
.tp-meta {
    color: var(--tp-muted);
    font-size: 0.86rem;
}

.tp-guest-hero,
.tp-feature-section,
.tp-workspace {
    width: min(1320px, calc(100% - 40px));
    margin-inline: auto;
}

.tp-guest-hero {
    display: grid;
    min-height: min(720px, calc(100vh - 74px));
    align-items: center;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
    gap: clamp(42px, 7vw, 110px);
    padding-block: 80px;
}

.tp-hero-copy h1 {
    max-width: 15ch;
    margin-bottom: 22px;
    font-size: clamp(2.45rem, 6vw, 5.6rem);
    line-height: 0.99;
    letter-spacing: -0.055em;
}

.tp-hero-actions {
    margin: 28px 0 14px;
}

.tp-hero-preview {
    position: relative;
    overflow: hidden;
    padding: clamp(24px, 4vw, 42px);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 30px;
    color: #fff;
    background:
        linear-gradient(155deg, rgba(255, 255, 255, 0.12), transparent 58%),
        linear-gradient(145deg, #075f37, #063f2a);
    box-shadow: 0 35px 90px rgba(6, 63, 42, 0.24);
}

.tp-hero-preview::before,
.tp-hero-preview::after {
    position: absolute;
    border: 2px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    content: "";
}

.tp-hero-preview::before {
    width: 250px;
    height: 250px;
    top: -145px;
    right: -70px;
}

.tp-hero-preview::after {
    width: 120px;
    height: 120px;
    right: -60px;
    bottom: -35px;
}

.tp-preview-head,
.tp-preview-score,
.tp-preview-grid {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.tp-preview-head {
    font-size: 1.05rem;
    font-weight: 800;
}

.tp-preview-score {
    margin-block: 60px;
    text-align: center;
}

.tp-preview-score strong {
    font-size: clamp(2.4rem, 7vw, 4.8rem);
    line-height: 1;
    letter-spacing: -0.06em;
}

.tp-preview-grid {
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.86rem;
}

.tp-preview-progress {
    position: relative;
    z-index: 1;
    overflow: hidden;
    height: 7px;
    margin: 28px 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
}

.tp-preview-progress i {
    display: block;
    width: 68%;
    height: 100%;
    border-radius: inherit;
    background: #67e9a8;
}

.tp-hero-preview > p {
    position: relative;
    z-index: 1;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.85rem;
}

.tp-feature-section {
    padding-block: 70px 100px;
}

.tp-feature-section > h2 {
    max-width: 22ch;
    margin-bottom: 32px;
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

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

.tp-feature-grid article {
    min-height: 230px;
    padding: 24px;
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-radius);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--tp-shadow-small);
}

.tp-feature-grid article > span {
    display: grid;
    width: 48px;
    height: 48px;
    margin-bottom: 28px;
    place-items: center;
    border-radius: 15px;
    background: var(--tp-green-light);
    font-size: 1.4rem;
}

.tp-feature-grid h3 {
    margin-bottom: 8px;
    font-size: 1.05rem;
}

.tp-feature-grid p {
    margin-bottom: 0;
    color: var(--tp-muted);
    font-size: 0.92rem;
}

.tp-workspace {
    padding-block: 32px 90px;
}

.tp-loading-card,
.tp-empty-state {
    display: grid;
    min-height: 360px;
    padding: 36px;
    place-items: center;
    align-content: center;
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-radius);
    background: var(--tp-surface);
    box-shadow: var(--tp-shadow-small);
    text-align: center;
}

.tp-spinner {
    width: 42px;
    height: 42px;
    margin-bottom: 16px;
    border: 4px solid var(--tp-green-light);
    border-top-color: var(--tp-green);
    border-radius: 50%;
    animation: tp-spin 0.8s linear infinite;
}

@keyframes tp-spin {
    to { transform: rotate(360deg); }
}

.tp-page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 26px;
    gap: 20px;
}

.tp-page-head h1 {
    margin-bottom: 6px;
    font-size: clamp(2rem, 4vw, 3.3rem);
    line-height: 1;
    letter-spacing: -0.045em;
}

.tp-page-head p:last-child {
    margin-bottom: 0;
    color: var(--tp-muted);
}

.tp-dashboard-summary {
    display: grid;
    margin-bottom: 28px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.tp-summary-card {
    padding: 20px;
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-radius-small);
    background: rgba(255, 255, 255, 0.84);
}

.tp-summary-card strong,
.tp-summary-card span {
    display: block;
}

.tp-summary-card strong {
    margin-bottom: 2px;
    font-size: 1.85rem;
    letter-spacing: -0.04em;
}

.tp-summary-card span {
    color: var(--tp-muted);
    font-size: 0.84rem;
}

.tp-dashboard-section {
    margin-top: 34px;
}

.tp-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    gap: 16px;
}

.tp-section-title h2,
.tp-section-title h3 {
    margin-bottom: 0;
}

.tp-tournament-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.tp-tournament-card {
    display: flex;
    min-height: 270px;
    flex-direction: column;
    padding: 22px;
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-radius);
    background: var(--tp-surface);
    box-shadow: var(--tp-shadow-small);
}

.tp-tournament-card--live {
    border-color: #86c8a5;
    background: linear-gradient(180deg, #f5fff9, #fff);
}

.tp-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.tp-card-top h3 {
    margin-bottom: 4px;
    font-size: 1.18rem;
}

.tp-card-meta {
    display: flex;
    margin: 18px 0;
    flex-wrap: wrap;
    gap: 8px;
}

.tp-pill,
.tp-status,
.tp-group-badge,
.tp-offline-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 760;
}

.tp-pill {
    color: var(--tp-muted);
    border: 1px solid var(--tp-line);
    background: var(--tp-canvas);
}

.tp-status--draft {
    color: #5f5215;
    background: var(--tp-yellow-light);
}

.tp-status--published {
    color: #124b94;
    background: var(--tp-blue-light);
}

.tp-status--live {
    color: #075c36;
    background: #d9f9e9;
}

.tp-status--completed {
    color: #556273;
    background: #edf1f5;
}

.tp-progress {
    height: 9px;
    overflow: hidden;
    margin: auto 0 12px;
    border-radius: 999px;
    background: #e8eeeb;
}

.tp-progress > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--tp-green), #1cb66b);
}

.tp-card-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.tp-wizard {
    display: grid;
    align-items: start;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 22px;
}

.tp-wizard-sidebar {
    position: sticky;
    top: 96px;
    padding: 18px;
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-radius);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--tp-shadow-small);
}

.tp-wizard-back {
    width: 100%;
    margin-bottom: 14px;
}

.tp-step-list {
    display: grid;
    margin: 0;
    padding: 0;
    list-style: none;
    gap: 5px;
}

.tp-step-button {
    display: grid;
    width: 100%;
    min-height: 52px;
    padding: 7px 9px;
    border: 0;
    border-radius: 12px;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    background: transparent;
    text-align: left;
}

.tp-step-button:hover {
    background: var(--tp-canvas);
}

.tp-step-button[aria-current="step"] {
    color: var(--tp-green-dark);
    background: var(--tp-green-light);
}

.tp-step-number {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 1px solid var(--tp-line-strong);
    border-radius: 50%;
    background: #fff;
    font-size: 0.82rem;
}

.tp-step-button.is-complete .tp-step-number {
    color: #fff;
    border-color: var(--tp-green);
    background: var(--tp-green);
}

.tp-step-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tp-sidebar-progress {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--tp-line);
}

.tp-sidebar-progress p {
    display: flex;
    justify-content: space-between;
    margin-bottom: 7px;
    color: var(--tp-muted);
    font-size: 0.78rem;
}

.tp-wizard-main {
    min-width: 0;
}

.tp-wizard-head,
.tp-panel {
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-radius);
    background: var(--tp-surface);
    box-shadow: var(--tp-shadow-small);
}

.tp-wizard-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 14px;
    padding: 22px 24px;
    gap: 18px;
}

.tp-wizard-head h1 {
    margin-bottom: 5px;
    font-size: clamp(1.65rem, 3vw, 2.5rem);
    line-height: 1.05;
    letter-spacing: -0.035em;
}

.tp-save-state {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 5px 10px;
    border-radius: 999px;
    color: var(--tp-muted);
    background: var(--tp-canvas);
    font-size: 0.77rem;
    font-weight: 730;
    white-space: nowrap;
}

.tp-save-state.is-saving::before,
.tp-save-state.is-saved::before,
.tp-save-state.is-error::before {
    margin-right: 6px;
}

.tp-save-state.is-saving::before { content: "↻"; }
.tp-save-state.is-saved::before { color: var(--tp-green); content: "✓"; }
.tp-save-state.is-error::before { color: var(--tp-red); content: "!"; }

.tp-panel {
    padding: clamp(20px, 4vw, 34px);
}

.tp-panel + .tp-panel {
    margin-top: 14px;
}

.tp-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 18px;
}

.tp-panel-head h2,
.tp-panel-head h3 {
    margin-bottom: 5px;
    line-height: 1.15;
}

.tp-panel-head p {
    margin-bottom: 0;
    color: var(--tp-muted);
}

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

.tp-form-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tp-field {
    position: relative;
    display: grid;
    align-content: start;
    gap: 7px;
}

.tp-field--full {
    grid-column: 1 / -1;
}

.tp-field label,
.tp-field legend,
.tp-field-label {
    color: #29405b;
    font-size: 0.88rem;
    font-weight: 760;
}

.tp-required {
    color: var(--tp-red);
}

.tp-field input,
.tp-field select,
.tp-field textarea {
    width: 100%;
    min-height: 48px;
    padding: 11px 13px;
    border: 1px solid var(--tp-line-strong);
    border-radius: 11px;
    background: #fff;
}

.tp-field textarea {
    min-height: 132px;
    resize: vertical;
}

.tp-field input:hover,
.tp-field select:hover,
.tp-field textarea:hover {
    border-color: #81998c;
}

.tp-field input:invalid:not(:placeholder-shown),
.tp-field select:invalid:not(:focus) {
    border-color: #dc8990;
}

.tp-checkbox {
    display: flex;
    min-height: 48px;
    align-items: flex-start;
    gap: 11px;
}

.tp-checkbox input {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    accent-color: var(--tp-green);
}

.tp-checkbox span {
    color: var(--tp-ink);
    font-size: 0.92rem;
}

.tp-form-actions {
    justify-content: space-between;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--tp-line);
}

.tp-notice,
.tp-recommendation,
.tp-warning,
.tp-error-box,
.tp-offline-banner {
    padding: 14px 16px;
    border: 1px solid;
    border-radius: 12px;
}

.tp-notice,
.tp-recommendation {
    color: #164c36;
    border-color: #a8d5bd;
    background: #effbf5;
}

.tp-warning {
    color: #72520a;
    border-color: #ebcf87;
    background: var(--tp-yellow-light);
}

.tp-error-box {
    color: #8a2129;
    border-color: #efadb3;
    background: var(--tp-red-light);
}

.tp-notice strong,
.tp-recommendation strong,
.tp-warning strong,
.tp-error-box strong {
    display: block;
    margin-bottom: 3px;
}

.tp-club-combobox {
    position: relative;
}

.tp-club-results {
    position: absolute;
    z-index: 25;
    top: calc(100% + 5px);
    right: 0;
    left: 0;
    overflow: auto;
    max-height: 320px;
    padding: 6px;
    border: 1px solid var(--tp-line-strong);
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(19, 37, 61, 0.18);
}

.tp-club-results[hidden] {
    display: none;
}

.tp-club-option {
    display: grid;
    width: 100%;
    min-height: 54px;
    padding: 8px 10px;
    border: 0;
    border-radius: 9px;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.tp-club-option:hover,
.tp-club-option[aria-selected="true"] {
    background: var(--tp-green-light);
}

.tp-club-option small {
    color: var(--tp-muted);
}

.tp-club-logo,
.tp-club-initials {
    display: grid;
    width: 38px;
    height: 38px;
    overflow: hidden;
    place-items: center;
    border: 1px solid var(--tp-line);
    border-radius: 10px;
    background: var(--tp-canvas);
    object-fit: contain;
    font-size: 0.74rem;
    font-weight: 850;
}

.tp-team-list {
    display: grid;
    margin: 0;
    padding: 0;
    list-style: none;
    gap: 9px;
}

.tp-team-row {
    display: grid;
    min-height: 68px;
    padding: 9px 10px;
    border: 1px solid var(--tp-line);
    border-radius: 13px;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    background: #fbfdfc;
}

.tp-team-row h3,
.tp-team-row p {
    margin-bottom: 0;
}

.tp-team-row h3 {
    font-size: 0.96rem;
}

.tp-team-row p {
    color: var(--tp-muted);
    font-size: 0.78rem;
}

.tp-bulk-preview {
    display: grid;
    margin-top: 14px;
    gap: 6px;
}

.tp-bulk-line {
    display: grid;
    min-height: 44px;
    padding: 7px 10px;
    border: 1px solid var(--tp-line);
    border-radius: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    font-size: 0.86rem;
}

.tp-confidence--exact { color: var(--tp-green); }
.tp-confidence--possible { color: var(--tp-yellow); }
.tp-confidence--new { color: var(--tp-blue); }

.tp-field-editor {
    display: grid;
    gap: 9px;
}

.tp-field-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    align-items: start;
    gap: 8px;
}

.tp-field-config {
    display: grid;
    padding: 12px;
    border: 1px solid var(--tp-line);
    border-radius: 12px;
    gap: 12px;
    background: #fbfdfc;
}

.tp-capacity-card {
    display: grid;
    margin-top: 22px;
    padding: 18px;
    border: 1px solid var(--tp-line);
    border-radius: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    background: var(--tp-canvas);
}

.tp-capacity-card div {
    min-width: 0;
}

.tp-capacity-card strong,
.tp-capacity-card span {
    display: block;
}

.tp-capacity-card strong {
    font-size: 1.2rem;
}

.tp-capacity-card span {
    color: var(--tp-muted);
    font-size: 0.78rem;
}

.tp-mode-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.tp-mode-card {
    position: relative;
    display: block;
}

.tp-mode-card input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.tp-mode-card-body {
    display: block;
    min-height: 190px;
    padding: 20px;
    border: 2px solid var(--tp-line);
    border-radius: 16px;
    cursor: pointer;
    background: #fff;
}

.tp-mode-card-body > span:first-child {
    display: block;
    margin-bottom: 20px;
    font-size: 1.6rem;
}

.tp-mode-card-body strong,
.tp-mode-card-body small {
    display: block;
}

.tp-mode-card-body small {
    margin-top: 7px;
    color: var(--tp-muted);
    line-height: 1.42;
}

.tp-mode-card input:checked + .tp-mode-card-body {
    border-color: var(--tp-green);
    background: var(--tp-green-light);
    box-shadow: 0 0 0 3px rgba(8, 116, 67, 0.08);
}

.tp-mode-card input:focus-visible + .tp-mode-card-body {
    outline: 2px solid var(--tp-blue);
    outline-offset: 2px;
    box-shadow: var(--tp-focus);
}

.tp-segmented {
    display: inline-flex;
    padding: 4px;
    border: 1px solid var(--tp-line);
    border-radius: 12px;
    background: var(--tp-canvas);
}

.tp-segment-button {
    padding: 8px 14px;
    border: 0;
    border-radius: 9px;
    color: var(--tp-muted);
    background: transparent;
}

.tp-segment-button[aria-pressed="true"] {
    color: var(--tp-ink);
    background: #fff;
    box-shadow: 0 3px 10px rgba(19, 37, 61, 0.08);
}

.tp-advanced-box {
    margin-top: 18px;
    padding: 18px;
    border: 1px dashed var(--tp-line-strong);
    border-radius: 14px;
    background: #fbfdfc;
}

.tp-schedule-summary {
    display: grid;
    margin-bottom: 18px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.tp-metric {
    padding: 14px;
    border: 1px solid var(--tp-line);
    border-radius: 12px;
    background: var(--tp-canvas);
}

.tp-metric strong,
.tp-metric span {
    display: block;
}

.tp-metric strong {
    font-size: 1.2rem;
}

.tp-metric span {
    color: var(--tp-muted);
    font-size: 0.76rem;
}

.tp-schedule-list {
    display: grid;
    gap: 8px;
}

.tp-match-row {
    display: grid;
    min-height: 74px;
    padding: 10px 12px;
    border: 1px solid var(--tp-line);
    border-radius: 13px;
    grid-template-columns: 84px minmax(0, 1fr) auto;
    align-items: center;
    gap: 13px;
    background: #fbfdfc;
}

.tp-match-time strong,
.tp-match-time small {
    display: block;
}

.tp-match-time small {
    color: var(--tp-muted);
    font-size: 0.73rem;
}

.tp-match-teams {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    text-align: center;
}

.tp-match-teams span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tp-match-teams i {
    color: var(--tp-muted);
    font-style: normal;
    font-size: 0.78rem;
}

.tp-group-badge {
    color: #254b71;
    background: var(--tp-blue-light);
}

.tp-checklist {
    display: grid;
    margin: 0;
    padding: 0;
    list-style: none;
    gap: 8px;
}

.tp-checklist li {
    display: grid;
    min-height: 52px;
    padding: 8px 10px;
    border: 1px solid var(--tp-line);
    border-radius: 11px;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
}

.tp-check-icon {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 50%;
    color: var(--tp-muted);
    background: #edf1f5;
}

.tp-checklist li.is-complete .tp-check-icon {
    color: #fff;
    background: var(--tp-green);
}

.tp-publish-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 22px;
}

.tp-share-card,
.tp-qr-card {
    padding: 18px;
    border: 1px solid var(--tp-line);
    border-radius: 14px;
    background: var(--tp-canvas);
}

.tp-share-link {
    display: grid;
    margin: 10px 0 14px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.tp-share-link input {
    min-width: 0;
    min-height: 46px;
    padding: 10px;
    border: 1px solid var(--tp-line-strong);
    border-radius: 10px;
    background: #fff;
}

.tp-qr-card {
    display: grid;
    min-height: 260px;
    place-items: center;
    align-content: center;
    text-align: center;
}

.tp-qr-card canvas {
    max-width: 100%;
    height: auto !important;
    padding: 10px;
    border-radius: 10px;
    background: #fff;
}

.tp-live-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: start;
    gap: 18px;
}

.tp-live-toolbar {
    position: sticky;
    z-index: 20;
    top: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 13px 15px;
    border: 1px solid #8bceb0;
    border-radius: 15px;
    color: #fff;
    background: linear-gradient(135deg, #075f37, #087443);
    box-shadow: 0 12px 30px rgba(8, 116, 67, 0.2);
    gap: 12px;
}

.tp-live-toolbar h2,
.tp-live-toolbar p {
    margin-bottom: 0;
}

.tp-live-toolbar p {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.82rem;
}

.tp-live-toolbar .tp-button {
    color: var(--tp-ink);
    border-color: rgba(255, 255, 255, 0.4);
    background: #fff;
}

.tp-offline-badge {
    color: #704c00;
    background: #fff0bd;
}

.tp-live-matches,
.tp-checkin-list {
    display: grid;
    gap: 10px;
}

.tp-live-match {
    padding: 18px;
    border: 1px solid var(--tp-line);
    border-radius: 17px;
    background: #fff;
    box-shadow: var(--tp-shadow-small);
}

.tp-live-match.is-complete {
    background: #f4faf7;
}

.tp-live-match-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    color: var(--tp-muted);
    gap: 10px;
    font-size: 0.82rem;
}

.tp-score-editor {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
}

.tp-score-team {
    min-width: 0;
    text-align: center;
}

.tp-score-team strong {
    display: block;
    overflow: hidden;
    min-height: 45px;
    margin-bottom: 10px;
    text-overflow: ellipsis;
}

.tp-score-controls {
    display: grid;
    grid-template-columns: 48px minmax(58px, 1fr) 48px;
    align-items: center;
    gap: 7px;
}

.tp-score-button {
    display: grid;
    width: 48px;
    height: 48px;
    padding: 0;
    place-items: center;
    border-color: var(--tp-line-strong);
    border-radius: 13px;
    background: var(--tp-canvas);
    font-size: 1.45rem;
}

.tp-score-value {
    min-width: 58px;
    font-size: 2.1rem;
    font-weight: 860;
    letter-spacing: -0.05em;
    text-align: center;
}

.tp-score-divider {
    color: var(--tp-muted);
    font-size: 1.4rem;
    font-weight: 800;
}

.tp-live-match-actions {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

.tp-checkin-card {
    position: sticky;
    top: 170px;
    padding: 18px;
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-radius);
    background: #fff;
    box-shadow: var(--tp-shadow-small);
}

.tp-checkin-card h3 {
    margin-bottom: 5px;
}

.tp-checkin-card > p {
    color: var(--tp-muted);
    font-size: 0.84rem;
}

.tp-checkin-item {
    display: grid;
    min-height: 52px;
    padding: 7px 0;
    border-bottom: 1px solid var(--tp-line);
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}

.tp-checkin-item:last-child {
    border-bottom: 0;
}

.tp-switch {
    position: relative;
    display: inline-flex;
    width: 52px;
    height: 32px;
}

.tp-switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.tp-switch span {
    width: 52px;
    height: 32px;
    border-radius: 999px;
    background: #d5ddda;
    cursor: pointer;
    transition: background 0.15s ease;
}

.tp-switch span::after {
    display: block;
    width: 26px;
    height: 26px;
    margin: 3px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 5px rgba(19, 37, 61, 0.22);
    content: "";
    transition: transform 0.15s ease;
}

.tp-switch input:checked + span {
    background: var(--tp-green);
}

.tp-switch input:checked + span::after {
    transform: translateX(20px);
}

.tp-switch input:focus-visible + span {
    outline: 2px solid var(--tp-blue);
    outline-offset: 3px;
}

.tp-dialog {
    width: min(680px, calc(100% - 28px));
    max-height: min(820px, calc(100vh - 28px));
    padding: 0;
    border: 0;
    border-radius: 24px;
    color: var(--tp-ink);
    background: #fff;
    box-shadow: 0 30px 100px rgba(12, 34, 25, 0.28);
}

.tp-dialog::backdrop {
    background: rgba(11, 26, 20, 0.54);
    backdrop-filter: blur(4px);
}

.tp-dialog-shell {
    overflow: auto;
    max-height: inherit;
    padding: clamp(22px, 4vw, 34px);
}

.tp-dialog-shell--small {
    max-width: 500px;
}

.tp-dialog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 22px;
    gap: 18px;
}

.tp-dialog-head h2 {
    margin-bottom: 0;
}

.tp-dialog-actions {
    justify-content: flex-end;
    margin-top: 26px;
}

.tp-onboarding-visual {
    display: grid;
    min-height: 230px;
    padding: 30px;
    place-items: center;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(145deg, #075f37, #0b8b52);
    text-align: center;
}

.tp-onboarding-visual > span {
    font-size: 4rem;
}

.tp-onboarding-copy {
    margin-top: 20px;
}

.tp-onboarding-copy h3 {
    margin-bottom: 8px;
    font-size: 1.35rem;
}

.tp-onboarding-copy p {
    color: var(--tp-muted);
}

.tp-onboarding-dots {
    display: flex;
    justify-content: center;
    margin-top: 16px;
    gap: 6px;
}

.tp-onboarding-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d8dfdc;
}

.tp-onboarding-dots span.is-active {
    width: 24px;
    border-radius: 999px;
    background: var(--tp-green);
}

.tp-toast-region {
    position: fixed;
    z-index: 100;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    display: grid;
    width: min(390px, calc(100% - 32px));
    gap: 9px;
    pointer-events: none;
}

.tp-toast {
    padding: 13px 15px;
    border: 1px solid var(--tp-line);
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 14px 40px rgba(19, 37, 61, 0.18);
    pointer-events: auto;
}

.tp-toast--success { border-left: 5px solid var(--tp-green); }
.tp-toast--error { border-left: 5px solid var(--tp-red); }
.tp-toast--warning { border-left: 5px solid #d49217; }

.tp-noscript {
    position: fixed;
    z-index: 200;
    right: 10px;
    bottom: 10px;
    left: 10px;
    padding: 14px;
    border-radius: 12px;
    color: #fff;
    background: var(--tp-red);
    text-align: center;
}

.tp-hidden {
    display: none !important;
}

.tp-sr-only {
    position: absolute !important;
    overflow: hidden !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    border: 0 !important;
    margin: -1px !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
}

@media (max-width: 1060px) {
    .tp-feature-grid,
    .tp-tournament-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tp-wizard {
        grid-template-columns: 220px minmax(0, 1fr);
    }

    .tp-mode-grid {
        grid-template-columns: 1fr;
    }

    .tp-mode-card-body {
        min-height: 0;
    }

    .tp-live-shell {
        grid-template-columns: minmax(0, 1fr) 290px;
    }
}

@media (max-width: 820px) {
    .tp-topbar {
        padding-inline: 16px;
    }

    .tp-top-actions .tp-button--quiet {
        display: none;
    }

    .tp-guest-hero {
        min-height: auto;
        padding-block: 52px;
        grid-template-columns: 1fr;
    }

    .tp-hero-copy h1 {
        max-width: 13ch;
    }

    .tp-hero-preview {
        max-width: 620px;
    }

    .tp-wizard {
        grid-template-columns: 1fr;
    }

    .tp-wizard-sidebar {
        position: static;
        overflow-x: auto;
        padding: 10px;
    }

    .tp-wizard-back,
    .tp-sidebar-progress {
        display: none;
    }

    .tp-step-list {
        display: flex;
        width: max-content;
    }

    .tp-step-button {
        width: auto;
        min-width: 58px;
        grid-template-columns: 34px;
        justify-content: center;
    }

    .tp-step-label {
        display: none;
    }

    .tp-form-grid--three {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tp-publish-grid,
    .tp-live-shell {
        grid-template-columns: 1fr;
    }

    .tp-checkin-card {
        position: static;
        order: -1;
    }
}

@media (max-width: 620px) {
    .tp-guest-hero,
    .tp-feature-section,
    .tp-workspace {
        width: min(100% - 24px, 1320px);
    }

    .tp-topbar {
        min-height: 66px;
    }

    .tp-brand-mark {
        width: 40px;
        height: 40px;
    }

    .tp-brand small {
        display: none;
    }

    .tp-top-actions .tp-button {
        min-height: 42px;
        padding: 8px 11px;
        font-size: 0.86rem;
    }

    .tp-hero-copy h1 {
        font-size: clamp(2.35rem, 13vw, 4rem);
    }

    .tp-hero-actions,
    .tp-page-actions,
    .tp-form-actions,
    .tp-dialog-actions,
    .tp-share-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .tp-hero-actions .tp-button,
    .tp-page-actions .tp-button,
    .tp-form-actions .tp-button,
    .tp-share-actions .tp-button {
        width: 100%;
    }

    .tp-preview-score {
        margin-block: 44px;
    }

    .tp-feature-grid,
    .tp-tournament-grid,
    .tp-dashboard-summary,
    .tp-form-grid,
    .tp-form-grid--three,
    .tp-capacity-card,
    .tp-schedule-summary {
        grid-template-columns: 1fr;
    }

    .tp-feature-grid article {
        min-height: 0;
    }

    .tp-page-head,
    .tp-wizard-head,
    .tp-panel-head {
        align-items: stretch;
        flex-direction: column;
    }

    .tp-wizard-head {
        padding: 18px;
    }

    .tp-panel {
        padding: 18px;
    }

    .tp-card-actions {
        grid-template-columns: 1fr;
    }

    .tp-team-row {
        grid-template-columns: 42px minmax(0, 1fr) 44px;
    }

    .tp-match-row {
        grid-template-columns: 64px minmax(0, 1fr);
    }

    .tp-match-row > :last-child {
        grid-column: 2;
        justify-self: start;
    }

    .tp-match-teams {
        grid-template-columns: 1fr;
        justify-items: start;
        text-align: left;
    }

    .tp-match-teams i {
        display: none;
    }

    .tp-share-link {
        grid-template-columns: 1fr;
    }

    .tp-live-toolbar {
        top: 72px;
        align-items: stretch;
        flex-direction: column;
    }

    .tp-score-editor {
        grid-template-columns: 1fr;
    }

    .tp-score-divider {
        display: none;
    }

    .tp-score-team {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 10px;
        text-align: left;
    }

    .tp-score-team strong {
        min-height: 0;
        margin-bottom: 0;
    }

    .tp-score-controls {
        grid-template-columns: 52px 62px 52px;
    }

    .tp-score-button {
        width: 52px;
        height: 52px;
    }

    .tp-dialog {
        width: calc(100% - 16px);
        max-height: calc(100vh - 16px);
        border-radius: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media print {
    body {
        background: #fff;
    }

    .tp-topbar,
    .tp-wizard-sidebar,
    .tp-form-actions,
    .tp-page-actions,
    .tp-live-toolbar,
    .tp-toast-region {
        display: none !important;
    }

    .tp-workspace,
    .tp-wizard {
        width: 100%;
        padding: 0;
        display: block;
    }

    .tp-panel,
    .tp-wizard-head,
    .tp-live-match {
        break-inside: avoid;
        border-color: #aaa;
        box-shadow: none;
    }
}

/* Standalone access hand-off */
.tp-access-shell {
    width: min(100% - 32px, 720px);
    min-height: calc(100vh - 112px);
    margin: 0 auto;
    display: grid;
    place-items: center;
    padding: 48px 0;
}

.tp-access-card {
    width: 100%;
    text-align: center;
    padding: clamp(28px, 6vw, 52px);
}

.tp-access-card h1 {
    margin: 8px 0 12px;
}

.tp-access-card > p:not(.tp-eyebrow) {
    color: var(--tp-muted);
    font-size: 1.02rem;
}

.tp-access-icon {
    width: 76px;
    height: 76px;
    margin: 0 auto 18px;
    border-radius: 24px;
    display: grid;
    place-items: center;
    font-size: 2.25rem;
    background: linear-gradient(145deg, var(--tp-primary-soft), #eaf8f1);
    box-shadow: inset 0 0 0 1px rgba(7, 95, 55, 0.12);
}

.tp-access-loading {
    margin-top: 24px;
}

.tp-access-actions {
    justify-content: center;
    margin-top: 26px;
}

.tp-access-actions[hidden],
.tp-access-loading[hidden] {
    display: none !important;
}

.tp-manager-access .tp-share-link input {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.82rem;
}

@media (max-width: 640px) {
    .tp-access-shell {
        width: min(100% - 20px, 720px);
        min-height: calc(100vh - 92px);
        padding: 24px 0;
    }

    .tp-access-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
}
