:root { color-scheme: light; font-family: Inter, ui-sans-serif, system-ui, sans-serif; color: #19231f; background: #eef1eb; }
* { box-sizing: border-box; }
.application-body { margin: 0; background: linear-gradient(145deg, #f5f2e9 0%, #e8eee8 55%, #dfe8e3 100%); min-height: 100vh; }
.app-shell { width: min(1500px, calc(100% - 40px)); margin: 0 auto; padding: 26px 0 42px; }
.page-navigation { min-height: 34px; margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.section-navigation { display: flex; gap: 5px; }
.section-navigation a { padding: 6px 9px; border-radius: 7px; color: #315e4d; font-weight: 700; text-decoration: none; }
.section-navigation a:hover { background: rgba(255,255,255,.65); }
.section-navigation form { margin: 0; }
.section-navigation .navigation-button { padding: 6px 9px; border-radius: 7px; background: transparent; color: #315e4d; font-weight: 700; }
.section-navigation .navigation-button:hover { background: rgba(255,255,255,.65); }
.account-icon-link, .account-menu > summary { display: grid; place-items: center; width: 36px; height: 36px; padding: 0 !important; border-radius: 50% !important; color: #315e4d; cursor: pointer; }
.account-menu { position: relative; }
.account-menu > summary { list-style: none; }
.account-menu > summary::-webkit-details-marker { display: none; }
.account-menu > summary:hover, .account-menu[open] > summary { background: rgba(255,255,255,.72); }
.account-menu-panel { position: absolute; top: calc(100% + 6px); right: 0; z-index: 50; min-width: 150px; padding: 6px; border: 1px solid #c8d1cc; border-radius: 10px; background: white; box-shadow: 0 12px 30px rgba(31,55,44,.16); }
.account-menu-panel a, .account-menu-panel .navigation-button { display: block; width: 100%; padding: 9px 10px; border-radius: 7px; color: #315e4d; font-weight: 700; text-align: left; text-decoration: none; white-space: nowrap; }
.account-menu-panel a:hover, .account-menu-panel .navigation-button:hover { background: #eef3ef; }
.app-header { display: flex; justify-content: space-between; align-items: end; gap: 28px; margin-bottom: 22px; }
.brand-heading, .brand-page-title { display: flex; align-items: center; gap: 16px; }
.brand-heading { margin-bottom: 2px; }
.brand-heading-logo, .brand-page-logo, .projection-logo { display: block; flex: none; filter: drop-shadow(0 7px 12px rgba(31,55,44,.14)); }
.brand-heading-logo { width: 72px; height: 72px; }
.brand-page-logo { width: 76px; height: 76px; }
.compact-tournament-header { --compact-header-progress: 0; --compact-header-offset: -100%; position: fixed; inset-inline: 0; top: var(--compact-header-offset); z-index: 120; height: calc(56px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); border-bottom: 1px solid rgba(38,64,52,.16); background: rgba(247,247,241,.98); box-shadow: 0 8px 25px rgba(31,55,44,.12); opacity: var(--compact-header-progress); pointer-events: none; }
.compact-tournament-header.is-interactive { pointer-events: auto; }
.compact-tournament-header-inner { width: min(1500px, calc(100% - 40px)); height: 56px; margin: 0 auto; display: flex; align-items: center; gap: 6px; }
.compact-tournament-identity { flex: 1 1 160px; min-width: 0; display: flex; align-items: baseline; gap: 9px; }
.compact-tournament-identity strong { overflow: hidden; color: #1d352b; font-family: Georgia, serif; font-size: 18px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.compact-tournament-identity span { flex: none; color: #68736e; font-size: 12px; font-weight: 750; white-space: nowrap; }
.compact-save-status { min-width: 0; max-width: 180px; overflow: hidden; padding: 0 5px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.compact-primary-actions { flex: none; display: flex; align-items: center; gap: 5px; }
.compact-header-action { display: inline-flex; align-items: center; justify-content: center; height: 40px; min-height: 40px; padding: 0 12px; border: 1px solid #c8d1cc; border-radius: 9px; background: white; color: #315e4d; font: inherit; font-size: 13px; font-weight: 750; text-decoration: none; white-space: nowrap; }
.compact-header-action:hover { background: #e8efeb; }
.compact-pair-action { border-color: #1f5b46; background: #1f5b46; color: white; }
.compact-pair-action:hover { background: #184936; }
.compact-action-narrow { display: none; }
.compact-icon-button, .compact-navigation-menu > summary { flex: none; display: grid; place-items: center; width: 40px; height: 40px; min-height: 40px; padding: 0; border: 1px solid #c8d1cc; border-radius: 9px; background: white; color: #315e4d; font-size: 24px; line-height: 1; cursor: pointer; }
a.compact-icon-button { text-decoration: none; }
.compact-icon-button:hover, .compact-navigation-menu > summary:hover, .compact-navigation-menu[open] > summary { background: #e8efeb; }
.compact-user-button svg { width: 21px; height: 21px; }
.compact-navigation-menu { position: relative; flex: none; }
.compact-navigation-menu > summary { list-style: none; font-size: 23px; }
.compact-navigation-menu > summary::-webkit-details-marker { display: none; }
.compact-navigation-backdrop { position: fixed; inset: calc(56px + env(safe-area-inset-top)) 0 0; z-index: 1; background: rgba(20,34,28,.25); }
.compact-navigation-panel { position: fixed; top: calc(56px + env(safe-area-inset-top)); right: 0; bottom: 0; z-index: 2; width: min(390px, calc(100% - 12px)); overflow-y: auto; overscroll-behavior: contain; padding: 14px; border-left: 1px solid #c8d1cc; background: #f8f8f4; box-shadow: -14px 20px 40px rgba(31,55,44,.2); }
.compact-navigation-panel section { display: grid; gap: 4px; padding: 4px 0 14px; }
.compact-navigation-panel section + section { padding-top: 14px; border-top: 1px solid #d6ddd9; }
.compact-navigation-panel h2 { margin: 0 8px 5px; color: #68736e; font-family: inherit; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.compact-navigation-panel a, .compact-navigation-panel section > button, .compact-navigation-panel form button { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 10px 12px; border: 0; border-radius: 8px; background: transparent; color: #294f40; font: inherit; font-weight: 700; text-align: left; text-decoration: none; }
.compact-navigation-panel a:hover, .compact-navigation-panel section > button:hover, .compact-navigation-panel form button:hover { background: #e8efeb; }
.compact-navigation-panel .compact-primary-link { background: #1f5b46; color: white; }
.compact-navigation-panel form { margin: 0; }
.compact-navigation-panel .compact-danger-zone button { background: #a33c2f; color: white; }
.eyebrow { margin: 0 0 7px; color: #a44e2b; font-weight: 750; font-size: 12px; letter-spacing: .13em; text-transform: uppercase; }
h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(34px, 4vw, 58px); line-height: .98; font-weight: 500; }
.lede { margin: 13px 0 0; color: #56625d; }
.mobile-grid-help { display: none; }
.header-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 9px; }
.output-actions { position: relative; }
.output-actions summary { list-style: none; border: 1px solid #c8d1cc; border-radius: 9px; padding: 10px 15px; background: white; color: #33423c; font-weight: 700; text-align: center; cursor: pointer; }
.output-actions summary::-webkit-details-marker { display: none; }
.output-actions[open] > div { position: absolute; right: 0; z-index: 30; min-width: 210px; margin-top: 6px; padding: 6px; display: grid; gap: 2px; border: 1px solid #c8d1cc; border-radius: 10px; background: white; box-shadow: 0 12px 30px rgba(31,55,44,.16); }
.output-actions a, .output-actions[open] > div > button { width: 100%; padding: 9px 10px; border: 0; border-radius: 7px; background: transparent; color: #315e4d; font-weight: 700; text-align: left; text-decoration: none; white-space: nowrap; }
.output-actions a:hover, .output-actions[open] > div > button:hover { background: #eef3ef; }
.pairing-run-card { align-items: flex-start; }
.pairing-run-card > div { width: 100%; }
.run-breakdown { margin-top: 10px; }
.run-breakdown summary { cursor: pointer; font-weight: 700; color: #315e4d; }
.run-breakdown p { margin: 7px 0 0; }
button { border: 0; border-radius: 9px; padding: 11px 15px; background: #1f5b46; color: white; font: inherit; font-weight: 700; cursor: pointer; }
input.button-submit { min-height: 44px; border: 0; border-radius: 9px; padding: 11px 15px; background: #1f5b46; color: white; font: inherit; font-weight: 700; cursor: pointer; }
input.button-submit:disabled { opacity: .55; cursor: default; }
button.secondary { background: white; color: #33423c; border: 1px solid #c8d1cc; }
button.danger { background: #a33c2f; }
button:disabled { opacity: .55; cursor: wait; }
.button-link { display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; padding: 10px 15px; background: #1f5b46; color: white; font-weight: 700; text-decoration: none; white-space: nowrap; }
.button-link.secondary { background: white; color: #33423c; border: 1px solid #c8d1cc; }
.breadcrumbs { margin: 0; color: #66736d; font-size: 14px; }
.breadcrumbs a { color: #315e4d; }
.page-header { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 22px; }
.narrow-shell { max-width: 1050px; }
.form-shell { max-width: 720px; }
.entity-card-list { display: grid; gap: 12px; }
.roster-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-bottom: 14px; }
.roster-toolbar .form-context { flex: 1 1 280px; }
.roster-tools { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 14px; }
.roster-tools > details { flex: 1 1 280px; }
.roster-copy-panel { flex: 1 1 360px; padding: 14px; border: 1px solid rgba(38,64,52,.14); border-radius: 12px; background: rgba(255,255,255,.78); }
.roster-copy-panel > p:first-child { margin-top: 0; }
.roster-copy-panel > details { margin-top: 10px; }
.roster-copy-panel .form-actions { align-items: center; }
.roster-tools summary { border: 1px solid #c8d1cc; border-radius: 9px; padding: 10px 15px; background: white; color: #33423c; font-weight: 700; cursor: pointer; }
.roster-tools .bulk-roster-form { margin-top: 8px; }
.roster-tools textarea { width: 100%; resize: vertical; border: 1px solid #b9c6bf; border-radius: 8px; padding: 11px 12px; background: white; color: #19231f; font: inherit; }
.entity-card, .entity-table-card, .entity-form { background: rgba(255,255,255,.9); border: 1px solid rgba(38,64,52,.14); border-radius: 14px; box-shadow: 0 12px 36px rgba(31,55,44,.08); }
.entity-card { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px; }
.entity-card h2 { margin: 0 0 5px; font-family: Georgia, serif; font-size: 25px; font-weight: 500; }
.entity-card h2 a { color: #19231f; text-decoration: none; }
.entity-card p { margin: 0; color: #66736d; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.row-actions form { margin: 0; }
.entity-table td.row-actions { display: table-cell; text-align: right; }
.entity-table td.row-actions > * { display: inline-flex; margin-left: 8px; vertical-align: middle; }
.entity-table td.row-actions > :first-child { margin-left: 0; }
.entity-form { margin-top: 24px; padding: 24px; display: grid; gap: 18px; }
.entity-form label { display: grid; gap: 7px; color: #415049; font-weight: 700; }
.entity-form input[type="text"], .entity-form input[type="email"], .entity-form input[type="password"], .entity-form input[type="number"], .entity-form select, .entity-form textarea, .inline-enrollment input, .inline-enrollment select { width: 100%; border: 1px solid #b9c6bf; border-radius: 8px; padding: 11px 12px; background: white; color: #19231f; font: inherit; }
.account-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.account-links a { color: #315e4d; font-weight: 700; }
.join-link-card { margin-bottom: 14px; }
.join-link-card h2 { margin: 0; font-family: Georgia, serif; font-weight: 500; }
.join-link-layout { display: grid; grid-template-columns: 180px minmax(0, 1fr); align-items: center; gap: 20px; padding-top: 12px; overflow-wrap: anywhere; }
.qr-code svg { display: block; width: 180px; max-width: 100%; height: auto; padding: 7px; background: white; border: 1px solid #d5ddd8; }
.form-context { margin: 0; padding: 11px 12px; border-radius: 8px; background: #eef3ef; }
.tournament-type-summary { padding: 16px 18px; border: 1px solid #cbd5cf; border-left: 4px solid #527d60; border-radius: 10px; background: #f5f9f4; color: #344b3f; line-height: 1.5; }
.tournament-type-summary[hidden], .tournament-type-summary [hidden] { display: none; }
.tournament-type-summary h2 { margin: 0 0 8px; font-size: 19px; }
.tournament-type-summary p { margin: 7px 0; }
.tournament-type-summary dl { display: grid; gap: 9px; margin: 12px 0 0; }
.tournament-type-summary dl > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; }
.tournament-type-summary dt { font-weight: 750; }
.tournament-type-summary dd { margin: 0; }
.tournament-type-summary a { color: #235c45; font-weight: 700; }
.tournament-type-summary-note { padding-top: 9px; border-top: 1px solid #d5e1d7; }
@media (max-width: 520px) { .tournament-type-summary dl > div { grid-template-columns: 1fr; gap: 2px; } }
.custom-rules-panel { display: grid; gap: 16px; margin: 0; padding: 18px; border: 1px solid #cbd5cf; border-radius: 10px; }
.custom-rules-panel[hidden] { display: none; }
.custom-rules-panel legend { padding: 0 7px; font-weight: 800; }
.custom-rules-panel small { color: #68736e; font-weight: 400; }
.entity-form .checkbox-label { display: flex; grid-template-columns: none; align-items: center; gap: 9px; }
.form-actions { display: flex; gap: 9px; margin-top: 4px; }
.form-errors, .flash { border-radius: 9px; padding: 12px 15px; }
.form-errors { color: #852f25; background: #f8e5e1; }
.form-errors ul { margin-bottom: 0; }
.flash { margin-bottom: 15px; background: #dceee5; color: #24513f; }
.entity-table-card { overflow: hidden; }
.entity-table { width: 100%; border-collapse: collapse; }
.entity-table th, .entity-table td { padding: 13px 15px; border-bottom: 1px solid #e4eae6; text-align: left; }
.entity-table th { background: #234f3e; color: white; }
.entity-table td:last-child { width: 1%; white-space: nowrap; }
.entity-table th:first-child, .entity-table td:first-child { width: 1%; text-align: center; }
.bulk-delete-form { margin-top: 14px; }
.bulk-delete-actions { display: flex; justify-content: flex-end; }
.empty-state { padding: 25px; color: #66736d; text-align: center; }
.section-title { margin: 24px 0 10px; font-family: Georgia, serif; font-size: 28px; font-weight: 500; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.detail-card { margin-top: 0; align-content: start; }
.detail-card h2, .participation-card h2 { margin: 0; font-family: Georgia, serif; font-weight: 500; }
.person-code-primary { display: grid; gap: 4px; margin: 2px 0 4px; padding: 15px 17px; border: 1px solid #9abaaa; border-radius: 12px; background: #e3f0e9; color: #173e2f; }
.person-code-primary span { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.person-code-primary strong { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: clamp(25px, 5vw, 36px); line-height: 1.1; letter-spacing: .035em; overflow-wrap: anywhere; }
.person-code-full { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.person-code-help { line-height: 1.5; }
.detail-card dl { margin: 0; display: grid; grid-template-columns: 120px 1fr; gap: 9px 14px; }
.detail-card dt { color: #68736e; font-weight: 700; }
.detail-card dd { margin: 0; }
.inline-enrollment { display: grid; gap: 13px; }
.inline-enrollment label { display: grid; gap: 6px; font-weight: 700; }
.participation-card { margin-top: 14px; padding-top: 18px; }
.participation-card h2 { padding: 0 15px 16px; }
.workflow-steps { display: grid; gap: 14px; }
.workflow-step { padding: 18px; border: 1px solid rgba(38,64,52,.14); border-radius: 14px; background: rgba(255,255,255,.9); box-shadow: 0 12px 36px rgba(31,55,44,.07); }
.workflow-step.current-step { border-color: #6c9a86; }
.workflow-step > div:first-child { display: flex; align-items: center; gap: 10px; }
.workflow-step h2 { margin: 0; font-family: Georgia, serif; font-size: 25px; font-weight: 500; }
.workflow-number { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #234f3e; color: white; font-weight: 800; }
.workflow-round-links { display: flex; flex-wrap: wrap; gap: 3px; margin-left: 4px; font-size: 13px; color: #68736e; }
.workflow-round-links a, .workflow-round-links span { min-width: 24px; padding: 3px 6px; border-radius: 999px; text-align: center; }
.workflow-round-links a { color: #627069; text-decoration: underline; text-decoration-color: rgba(98,112,105,.45); text-underline-offset: 2px; }
.workflow-round-links .current { background: #e4ece8; color: #234f3e; font-weight: 700; }
.workflow-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 15px; }
.workflow-links a { color: #315e4d; font-weight: 700; }
.safe-results-form { margin-top: 15px; }
.safe-table-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.safe-table-card { min-width: 0; margin: 0; padding: 12px; border: 1px solid #cbd5cf; border-radius: 11px; }
.safe-table-card legend { padding: 0 7px; color: #234f3e; font-weight: 800; }
.player-result-guidance { margin: 2px 0 10px; padding: 10px 12px; border-radius: 9px; background: #edf4f0; color: #40554c; font-size: 14px; line-height: 1.4; }
.player-result-guidance strong { color: #173e2f; }
.other-results-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 13px 0 2px; padding-top: 11px; border-top: 1px solid #dbe2de; color: #58675f; font-size: 13px; font-weight: 750; }
.other-results-heading span { color: #78847e; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.safe-result-columns { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 10px; padding: 2px 0 3px; color: #68736e; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.safe-result-columns span:last-child { text-align: right; }
.safe-table-card.table-result-state.draft { border-color: #c7ceca; background: #f4f5f4; }
.safe-table-card.table-result-state.draft input:not(:placeholder-shown) { background: #e8ebe9; color: #59645f; }
.safe-table-card.table-result-state.confirmed { border-color: #6c9a86; background: #f2f8f5; box-shadow: inset 0 3px #4d846d; }
.safe-table-card.table-result-state.confirmed input { background: #e4f0e9; color: #173e2f; font-weight: 750; }
.table-state-badge { display: inline-block; margin-left: 5px; padding: 2px 7px; border-radius: 999px; background: #e1e5e3; color: #68736e; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.table-result-state.confirmed .table-state-badge { background: #d5eadf; color: #24513f; }
.safe-result-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px; align-items: center; gap: 10px; padding: 7px 0; }
.safe-result-row small { display: inline-block; min-width: 2em; color: #68736e; text-align: right; }
.safe-result-row input { width: 100%; min-height: 44px; border: 1px solid #aebdb5; border-radius: 8px; padding: 9px 10px; font: inherit; font-size: 16px; text-align: right; }
.safe-result-row.current-player-row { margin: 2px -8px; padding: 9px 8px; border-radius: 9px; background: #e1eee7; box-shadow: inset 3px 0 #2d7358; }
.safe-result-row.current-player-row input { border-color: #4d846d; background: #fbfffc; font-size: 19px; font-weight: 750; }
.current-player-marker { display: inline-block; margin-left: 5px; padding: 2px 6px; border-radius: 999px; background: #2d7358; color: white; font-size: 11px; line-height: 1.3; vertical-align: middle; }
.table-lock-actions { margin-top: 9px; padding-top: 9px; border-top: 1px solid #dbe2de; }
.table-lock-actions form, .table-lock-actions button, .table-lock-actions .button-link { box-sizing: border-box; width: 100%; text-align: center; }
.table-lock-actions .quiet-action { color: #68736e; font-size: 13px; }
.table-confirmation-panel { margin-top: 18px; padding-top: 16px; border-top: 1px solid #d5ddd8; }
.table-confirmation-panel p { max-width: 620px; margin: 0 0 10px; color: #5b6761; font-size: 14px; line-height: 1.4; }
.table-confirmation-panel form { margin: 0; }
.table-confirmation-panel .confirm-lock { background: #8b4b28; }
.new-round-alert { display: grid; gap: 4px; max-height: 180px; overflow: hidden; margin-bottom: 18px; padding: 18px 20px; border: 2px solid #2d7358; border-radius: 14px; background: #dff2e7; color: #173e2f; box-shadow: 0 12px 32px rgba(31,91,70,.18); opacity: 1; transform: translateY(0); transition: opacity .18s ease, transform .18s ease, max-height .22s ease, margin-bottom .22s ease, padding-block .22s ease, border-width .22s ease; }
.new-round-alert.is-dismissing { max-height: 0; margin-bottom: 0; padding-block: 0; border-width: 0; opacity: 0; transform: translateY(-6px); }
.new-round-alert strong { font-family: Georgia, serif; font-size: clamp(24px, 5vw, 34px); font-weight: 500; }
.new-round-alert span { font-size: 17px; font-weight: 700; }
.workflow-step > .round-waiting-card:first-child { display: grid; gap: 10px; text-align: center; }
.round-waiting-card h2 { margin: 0; font-size: clamp(27px, 5vw, 38px); }
.round-waiting-card > p:not(.eyebrow) { max-width: 620px; margin: 0 auto; color: #56625d; line-height: 1.5; }
.player-score-summary { width: min(560px, 100%); margin: 8px auto 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 10px; }
.player-points, .player-secondary { min-width: 0; padding: 15px; border-radius: 12px; background: #e6f0ea; color: #234f3e; }
.player-points span, .player-points strong, .player-secondary span, .player-secondary strong { display: block; }
.player-points span, .player-secondary span { font-size: 13px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.player-points strong, .player-secondary strong { margin-top: 3px; font-family: Georgia, serif; font-size: 40px; font-weight: 500; overflow-wrap: anywhere; }
.player-secondary { background: #edf0e3; color: #4d5425; }
.player-secondary strong { font-size: clamp(25px, 5vw, 36px); }
.player-result-history { margin-top: 24px; padding-top: 20px; border-top: 1px solid #d5ddd8; }
.player-result-history h2 { margin: 0 0 12px; font-size: 24px; }
.player-result-history table { width: 100%; border-collapse: collapse; }
.player-result-history th, .player-result-history td { padding: 10px; border-bottom: 1px solid #e1e7e3; text-align: center; }
.player-result-history thead th { color: #68736e; font-size: 13px; }
.player-played-tables { margin-top: 28px; padding-top: 22px; border-top: 1px solid #d5ddd8; }
.player-played-tables > h2 { margin: 0; font-size: 24px; }
.player-played-tables > p { margin: 7px 0 15px; color: #68736e; font-size: 14px; }
.player-played-table-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.player-played-table-card { overflow: hidden; border: 1px solid #cbd5cf; border-radius: 12px; background: white; }
.player-played-table-card h3 { margin: 0; padding: 10px 13px; display: flex; justify-content: space-between; gap: 10px; background: #edf3ef; color: #234f3e; font-size: 17px; }
.player-played-table-card h3 span { color: #58675f; font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: 13px; }
.player-played-table-card table { width: 100%; border-collapse: collapse; }
.player-played-table-card th, .player-played-table-card td { padding: 9px 12px; border-bottom: 1px solid #e5eae7; text-align: left; }
.player-played-table-card tr:last-child td { border-bottom: 0; }
.player-played-table-card th:last-child, .player-played-table-card td:last-child { width: 86px; text-align: right; font-variant-numeric: tabular-nums; }
.player-played-table-card thead th { color: #68736e; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.player-played-table-card tr.current-player td { background: #e1eee7; color: #173e2f; font-weight: 750; }
.player-played-table-card tr.current-player td:first-child { box-shadow: inset 3px 0 #2d7358; }
.player-played-table-card tr.current-player strong { display: inline-block; margin-left: 5px; padding: 2px 6px; border-radius: 999px; background: #2d7358; color: white; font-size: 10px; line-height: 1.3; vertical-align: middle; }
.save-status { min-width: 110px; text-align: right; color: #627069; font-size: 14px; }
.save-status[data-state="editing"], .save-status[data-state="pending"], .save-status[data-state="saving"] { color: #8b4b28; font-weight: 700; }
.save-status[data-state="error"] { color: #a33c2f; font-weight: 700; }
.save-status[data-state="live"] { color: #2d7358; font-weight: 700; }
.live-sync-status { color: #68736e; font-size: 13px; }
.live-sync-status[data-state="pending"] { color: #8b4b28; font-weight: 700; }
.live-sync-status[data-state="error"] { color: #a33c2f; }
.pairing-penalty { flex-basis: 100%; color: #5c6862; font-size: 13px; text-align: right; }
.pairing-breakdown { flex-basis: 100%; color: #536159; font-size: 13px; text-align: right; }
.pairing-breakdown summary { cursor: pointer; font-weight: 700; }
.pairing-breakdown p { margin: 5px 0 0; }
.grid-card { overflow: hidden; padding: 12px; border: 1px solid rgba(38, 64, 52, .14); border-radius: 15px; background: rgba(255, 255, 255, .86); box-shadow: 0 18px 50px rgba(31, 55, 44, .10); }
.result-state-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 10px 6px 0; color: #68736e; font-size: 12px; }
.result-state-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.result-state-legend > span:last-child { margin-left: auto; }
.result-state-swatch { width: 16px; height: 16px; border: 1px solid #c7ceca; border-radius: 4px; }
.result-state-swatch.draft { border-color: #d7c89f; background: #f4ecd7; }
.tabulator { border: 0 !important; background: transparent !important; font-size: 14px; }
.tabulator .tabulator-header { border: 0 !important; background: #234f3e !important; color: #f7fbf9 !important; }
.tabulator .tabulator-header .tabulator-col { background: #234f3e !important; border-color: rgba(255,255,255,.32) !important; color: #f7fbf9 !important; }
.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title { color: #f7fbf9 !important; font-weight: 750; }
.tabulator .tabulator-header .tabulator-col.tabulator-col-group > .tabulator-col-content .tabulator-col-title { color: #fff !important; font-weight: 800; }
.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols { border-color: rgba(255,255,255,.32) !important; }
.tabulator .tabulator-header .tabulator-col[aria-sort="none"] .tabulator-col-sorter .tabulator-arrow { border-bottom-color: rgba(255,255,255,.72) !important; }
.tabulator .tabulator-header .tabulator-col[aria-sort="ascending"] .tabulator-col-sorter .tabulator-arrow { border-bottom-color: #fff !important; }
.tabulator .tabulator-header .tabulator-col[aria-sort="descending"] .tabulator-col-sorter .tabulator-arrow { border-top-color: #fff !important; }
.tabulator .tabulator-header .round-sort-header > .tabulator-col-content,
.tabulator .tabulator-header .results-sort-header > .tabulator-col-content { cursor: pointer; }
.tabulator .tabulator-header .round-sort-header > .tabulator-col-content:hover,
.tabulator .tabulator-header .results-sort-header > .tabulator-col-content:hover { background: rgba(255,255,255,.08); }
.tabulator .tabulator-header .tabulator-col.round-st-column { border-right: 0 !important; }
.tabulator .tabulator-row { border-color: #e6ebe7 !important; }
.tabulator .tabulator-row:nth-child(even) { background: #f5f7f4; }
.tabulator .tabulator-cell.round-st-column { border-right: 0 !important; }
.tabulator .tabulator-row.round-table-divider-before { border-bottom-color: transparent !important; }
.tabulator .tabulator-cell.round-table-divider { box-shadow: inset 0 1px #6e9b82; }
.tabulator .tabulator-cell[tabulator-field="name"] { font-weight: 650; }
.tabulator .tabulator-cell.result-draft { background: #f4ecd7 !important; color: #35443d; font-weight: 700; }
.tabulator .tabulator-header .tabulator-col.grid-active-column { background: #346b50 !important; }
.tabulator .tabulator-cell.grid-active-column { background: #e9f3ed !important; }
.tabulator .tabulator-cell.grid-previous-table { background: #e0ece4 !important; }
.tabulator .tabulator-cell.grid-repeat-table { background: #f0ddb2 !important; }
.tabulator .tabulator-cell.grid-current-table { background: #c9e8d5 !important; }
.tabulator .tabulator-cell.result-draft.grid-active-column { background: #f2ebd2 !important; }
.tabulator .tabulator-cell.result-draft.grid-previous-table { background: #e9ebd6 !important; }
.tabulator .tabulator-cell.result-draft.grid-repeat-table { background: #ecdaa9 !important; }
.tabulator .tabulator-cell.result-draft.grid-current-table { background: #dce8c7 !important; }
.tabulator .tabulator-cell.tabulator-editing input[type="number"] { appearance: textfield; text-align: center; }
.tabulator .tabulator-cell.tabulator-editing input[type="number"]::-webkit-inner-spin-button,
.tabulator .tabulator-cell.tabulator-editing input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.tabulator .tabulator-tableholder { -webkit-overflow-scrolling: touch; overscroll-behavior-inline: contain; }
.footnote { color: #68736e; font-size: 13px; margin: 13px 4px 0; }
.print-table-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.print-table-card { break-inside: avoid; background: white; border: 1px solid #cfd8d3; border-radius: 12px; overflow: hidden; }
.print-table-card h2 { margin: 0; padding: 11px 15px; background: #234f3e; color: white; font-size: 20px; }
.print-table-card ol { list-style: none; margin: 0; padding: 7px 0; }
.print-table-card li { display: grid; grid-template-columns: 42px 1fr; gap: 8px; padding: 8px 15px; border-bottom: 1px solid #edf0ee; }
.print-table-card li:last-child { border-bottom: 0; }
.print-start-number { color: #66736d; text-align: right; }
.bye-player { color: #7c5a23; font-style: italic; }
.table-slip-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5mm 8mm; }
.table-slips-printout .table-slip-grid { box-sizing: border-box; padding: clamp(14px, 2.5vw, 28px); border: 1px solid #d5ddd8; border-radius: 15px; background: white; box-shadow: 0 14px 38px rgba(31,55,44,.08); }
.table-slip { min-width: 0; min-height: 34mm; display: grid; grid-template-columns: 24mm minmax(0, 1fr); gap: 2mm; align-items: stretch; break-inside: avoid; background: white; color: #000; font-family: Georgia, "Times New Roman", serif; }
.table-slips-printout .table-slip { background: transparent; }
.table-slip-meta { min-width: 0; display: grid; grid-template-rows: 5mm 5mm 23mm; gap: .5mm; align-items: end; }
.table-slip-qr { align-self: end; }
.table-slip-qr svg { box-sizing: border-box; display: block; width: 23mm; height: 23mm; padding: 1.5mm; border: 0; background: white; }
.table-slip-number { display: grid; grid-template-columns: 9mm auto; align-items: baseline; justify-content: start; gap: 1mm; padding-left: .4mm; }
.table-slip-number span { font-size: 8pt; font-weight: 600; line-height: 1; text-align: left; white-space: nowrap; }
.table-slip-number strong { font-size: 17pt; font-weight: 700; line-height: .8; font-variant-numeric: tabular-nums; text-align: right; }
.table-slip table { width: 100%; height: 100%; border-collapse: collapse; table-layout: fixed; }
.table-slip thead { height: 6mm; }
.table-slip th { padding: 0 1.3mm 1mm; border: 0; font-size: 7.5pt; font-weight: 400; line-height: .95; text-align: left; vertical-align: bottom; }
.table-slip td { height: 6.7mm; padding: .7mm 1.3mm; border: .25mm solid #000; font-size: 8.5pt; line-height: 1; text-align: left; overflow: hidden; }
.table-slip th:first-child, .table-slip td:first-child { width: 13mm; text-align: center; }
.table-slip th:last-child, .table-slip td:last-child { width: 14mm; }
.table-slip .result-space { background: white; }
.table-slips-printout .table-slip .result-space { background: transparent; }
.projection-shell { min-height: 100vh; padding: clamp(18px, 3vw, 46px); background: #13251e; color: #f4f8f5; }
.projection-header { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 28px; }
.projection-logo { align-self: flex-end; width: 58px; height: auto; }
.projection-header h1 { font-size: clamp(38px, 5vw, 76px); }
.projection-header p { margin: 10px 0 0; color: #c5d4cc; font-size: clamp(16px, 1.8vw, 25px); }
.projection-meta { display: grid; justify-items: end; gap: 8px; color: #aebfb6; }
.projection-meta-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px 16px; }
.projection-meta a { color: #e4efe9; }
.projection-standings-toggle { display: inline-flex; align-items: center; gap: 6px; color: #c5d4cc; font-size: 13px; cursor: pointer; white-space: nowrap; }
.projection-standings-toggle input { width: 15px; height: 15px; margin: 0; accent-color: #87b39e; }
.projection-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 30px; align-items: start; }
.projection-layout.standings-hidden { grid-template-columns: minmax(0, 1fr); }
.projection-layout h2 { margin: 0 0 14px; font-size: clamp(22px, 2.3vw, 34px); }
.projection-tables { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.projection-tables article, .projection-standings { border: 1px solid #456154; border-radius: 13px; background: #1d352b; overflow: hidden; }
.projection-tables h3 { margin: 0; padding: 11px 15px; display: flex; justify-content: space-between; align-items: center; gap: 10px; background: #2c5745; font-size: 22px; }
.projection-tables .projection-table-locked { border-color: #87b39e; box-shadow: inset 0 0 0 1px rgba(135,179,158,.22); }
.projection-tables .projection-table-locked h3 { background: #527a68; }
.projection-tables h3 small { padding: 3px 7px; border: 1px solid rgba(226,242,234,.45); border-radius: 999px; color: #dcebe4; font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.projection-table-columns { display: grid; grid-template-columns: minmax(0, 1fr) 70px 86px; gap: 8px; padding: 8px 15px 3px; color: #9fb2a8; font-size: 9px; font-weight: 800; line-height: 1.15; letter-spacing: .04em; text-transform: uppercase; }
.projection-table-columns span:not(:first-child) { text-align: right; }
.projection-tables ul, .projection-standings ol { list-style: none; margin: 0; padding: 5px 0; }
.projection-tables li { display: grid; grid-template-columns: minmax(0, 1fr) 70px 86px; gap: 8px; padding: 9px 15px; border-bottom: 1px solid #304a3f; font-size: clamp(15px, 1.25vw, 20px); }
.projection-tables li > span { min-width: 0; overflow-wrap: anywhere; line-height: 1.15; }
.projection-tables li > strong, .projection-tables li > b { text-align: right; font-variant-numeric: tabular-nums; }
.projection-tables li:last-child { border-bottom: 0; }
.projection-standings h2 { padding: 13px 16px 0; }
.projection-standings li { display: grid; grid-template-columns: 42px 1fr auto; gap: 9px; padding: 8px 15px; border-bottom: 1px solid #304a3f; font-size: clamp(15px, 1.4vw, 21px); }
.projection-empty { padding: 25px; border: 1px solid #456154; border-radius: 13px; background: #1d352b; }
@media print { @page { margin: 12mm; } .application-body { background: white; } .print-shell { width: 100%; max-width: none; margin: 0; padding: 0; } .print-shell .page-navigation, .print-action, .no-print { display: none !important; } .print-header { margin-bottom: 8mm; } .table-slips-printout .print-header { display: none; } .table-slips-printout .table-slip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5mm 8mm; padding: 0; border: 0; border-radius: 0; background: white; box-shadow: none; } .table-slips-printout .table-slip, .table-slips-printout .table-slip .result-space { background: white; } .print-table-grid { grid-template-columns: repeat(2, 1fr); gap: 5mm; } .print-table-card, .print-results { box-shadow: none; } a { color: inherit; text-decoration: none; } }
@media (max-width: 800px) {
  .app-shell { width: min(100% - 16px, 1500px); padding-top: 10px; padding-bottom: 28px; }
  .compact-tournament-header-inner { width: calc(100% - 12px); gap: 3px; }
  .compact-tournament-identity, .compact-save-status { display: none; }
  .compact-primary-actions { flex: 1 1 auto; min-width: 0; gap: 3px; }
  .compact-header-action { flex: 1 1 auto; min-width: 0; padding-inline: 6px; font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
  .compact-action-wide { display: none; }
  .compact-action-narrow { display: inline; }
  .compact-icon-button { width: 38px; }
  .compact-navigation-menu > summary { width: 42px; }
  .page-navigation { margin-bottom: 14px; flex-wrap: wrap; gap: 5px 10px; }
  .breadcrumbs { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .section-navigation { width: 100%; justify-content: flex-end; }
  .single-line-navigation { flex-wrap: nowrap; }
  .single-line-navigation .breadcrumbs { width: auto; min-width: 0; }
  .single-line-navigation .section-navigation { width: auto; flex: none; }
  h1 { max-width: 100%; overflow-wrap: anywhere; font-size: clamp(31px, 10vw, 42px); line-height: 1.02; }
  .app-header, .page-header, .entity-card { align-items: stretch; flex-direction: column; gap: 14px; }
  .brand-page-title { align-items: center; }
  .brand-heading { gap: 12px; }
  .brand-heading-logo { width: 60px; height: 60px; }
  .desktop-grid-help { display: none; }
  .mobile-grid-help { display: block; font-size: 14px; line-height: 1.4; }
  .header-actions, .row-actions { justify-content: flex-start; flex-wrap: wrap; }
  .page-header > .header-actions, .page-header > .row-actions { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .page-header > .header-actions > *, .page-header > .row-actions > * { min-width: 0; margin: 0; }
  .page-header > .header-actions .button-link, .page-header > .header-actions button, .page-header > .row-actions .button-link, .page-header > .row-actions button { width: 100%; min-height: 44px; }
  .app-header .header-actions { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .app-header .header-actions > * { min-width: 0; margin: 0; }
  .app-header .header-actions .button-link, .app-header .header-actions button, .app-header .header-actions summary { width: 100%; min-height: 44px; }
  .app-header .header-actions .mobile-primary-action { order: -4; grid-column: 1 / -1; background: #1f5b46; color: white; border-color: #1f5b46; }
  .app-header .header-actions .save-status { order: -5; grid-column: 1 / -1; min-width: 0; text-align: left; }
  .app-header .header-actions .pairing-penalty { grid-column: 1 / -1; min-width: 0; text-align: left; }
  .app-header .header-actions .pairing-breakdown { display: none; }
  .app-header .header-actions button[data-action="tournament-grid#pair"], .app-header .header-actions form { grid-column: 1 / -1; }
  .output-actions[open] > div { position: fixed; top: 58px; right: 8px; left: 8px; z-index: 100; width: auto; max-height: calc(100dvh - 70px); overflow-y: auto; margin: 0; padding: 8px; }
  .output-actions a, .output-actions[open] > div > button { min-height: 44px; padding: 11px 12px; white-space: normal; }
  .form-actions { display: grid; grid-template-columns: 1fr; }
  .form-actions > *, .form-actions .button-link, .form-actions button, .form-actions input[type="submit"] { width: 100%; min-height: 44px; }
  .entity-card .row-actions { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .entity-card .row-actions > *, .entity-card .row-actions button, .entity-card .row-actions .button-link { width: 100%; min-height: 44px; }
  .grid-card { padding: 3px; border-radius: 9px; }
  .tabulator { font-size: 13px; }
  .tabulator .tabulator-header .tabulator-col { min-height: 44px; }
  .tabulator .tabulator-header .tabulator-col .tabulator-col-content { padding: 7px 4px; }
  .tabulator .tabulator-row .tabulator-cell { min-height: 44px; padding: 11px 4px; }
  .tabulator .tabulator-row .tabulator-cell.tabulator-editing { padding: 0; }
  .tabulator .tabulator-row .tabulator-cell.tabulator-editing input { min-height: 42px; padding: 8px 4px; font-size: 16px; }
  .save-status { text-align: left; }
  .entity-table-card { overflow: visible; background: transparent; border: 0; box-shadow: none; }
  .responsive-cards thead { display: none; }
  .responsive-cards, .responsive-cards tbody, .responsive-cards tr, .responsive-cards td { display: block; width: 100%; }
  .responsive-cards tbody { display: grid; gap: 10px; }
  .responsive-cards tr { padding: 10px 12px; border: 1px solid rgba(38,64,52,.14); border-radius: 12px; background: rgba(255,255,255,.92); box-shadow: 0 8px 24px rgba(31,55,44,.07); }
  .responsive-cards td, .responsive-cards td:last-child { display: grid; grid-template-columns: minmax(82px, .7fr) minmax(0, 1.3fr); gap: 10px; width: 100%; padding: 7px 0; border: 0; white-space: normal; text-align: left; }
  .responsive-cards td::before { content: attr(data-label); color: #68736e; font-weight: 700; }
  .responsive-cards td.row-actions { display: grid; justify-content: stretch; text-align: left; }
  .responsive-cards td.row-actions > * { width: 100%; margin: 0 0 6px; }
  .responsive-cards td.row-actions .button-link, .responsive-cards td.row-actions button { width: 100%; min-height: 44px; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-card dl { grid-template-columns: minmax(90px, .7fr) minmax(0, 1.3fr); }
  .table-slip-grid { grid-template-columns: 1fr; }
  .safe-table-grid { grid-template-columns: 1fr; }
  .join-link-layout { grid-template-columns: 120px minmax(0, 1fr); gap: 12px; }
  .qr-code svg { width: 120px; }
  .safe-result-row { grid-template-columns: minmax(0, 1fr) 96px; min-height: 52px; }
  .safe-result-columns { grid-template-columns: minmax(0, 1fr) 96px; }
  .workflow-step { padding: 15px; }
  .workflow-step .button-link, .workflow-step button { min-height: 44px; }
  .projection-header { align-items: flex-start; flex-direction: column; }
  .projection-meta { justify-items: start; }
  .projection-meta .projection-logo { align-self: flex-end; }
  .projection-layout { grid-template-columns: 1fr; }
}
