.tournaments-shell{max-width:1100px;margin:auto;padding:130px 24px 64px;min-height:75vh}.tournaments-intro{max-width:730px;margin-bottom:38px}.tournaments-intro h1{font-size:clamp(2.4rem,6vw,4rem);line-height:1.1;margin:12px 0 18px}.tournaments-intro p{color:var(--muted,var(--color-on-surface-variant))}.search-controls{display:flex;gap:12px;margin:10px 0 25px}.search-controls input{min-width:0;flex:1}input,select{font:inherit;background:var(--color-surface);border:1px solid var(--color-outline);border-radius:10px;padding:13px;color:var(--color-primary)}button{font:inherit;background:var(--color-primary);color:var(--color-on-primary);border:0;border-radius:10px;padding:13px 22px;cursor:pointer}button:disabled{background:var(--color-surface-container-highest);color:var(--color-on-surface-variant);opacity:1;cursor:wait}button[hidden],[hidden]{display:none!important}a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,.results-scroll:focus-visible{outline:3px solid var(--color-primary);outline-offset:4px}.tournament-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(300px,100%),1fr));gap:18px;margin:22px 0}/* Public tournament cards follow the app TournamentItem hierarchy and status treatment. */
.tournament-card{--status-color:var(--color-primary);display:block;position:relative;overflow:hidden;padding:20px 20px 20px 26px;border:1px solid var(--color-outline-variant);border-radius:24px;background:var(--color-surface);box-shadow:0 3px 10px rgb(23 29 26 / .08);text-decoration:none;color:var(--color-on-surface)}
.tournament-card::before{content:"";position:absolute;inset:0 auto 0 0;width:8px;background:var(--status-color)}
.tournament-card.is-finished{--status-color:var(--color-error)}
.tournament-card:hover{border-color:var(--status-color);box-shadow:0 5px 14px rgb(23 29 26 / .12)}
.tournament-card h2{font-size:1.1875rem;font-weight:700;line-height:1.35;letter-spacing:normal;margin:0 0 8px;overflow-wrap:anywhere}
.tournament-card .tournament-card-meta{display:grid;gap:2px;font-size:.875rem;line-height:1.5;margin:0;color:var(--color-on-surface-variant);overflow-wrap:anywhere}
.tournament-card-meta p{margin:0}
.tournament-card-badges{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:8px}
.tournament-card-badges span{display:inline-block;max-width:100%;border-radius:999px;padding:6px 12px;font-size:.8125rem;font-weight:700;line-height:1.4;overflow-wrap:anywhere}
.tournament-format{background:var(--color-secondary-container);color:var(--color-on-secondary-container)}
.tournament-state{background:color-mix(in srgb,var(--status-color) 10%,var(--color-surface));color:var(--status-color)}
#detail h2{font-size:2rem;margin:20px 0 12px;overflow-wrap:anywhere}#detail select{display:block;margin:8px 0 20px;max-width:100%;min-width:200px}.results-scroll{overflow:auto;margin-bottom:20px;border:1px solid var(--color-outline-variant);border-radius:12px;max-height:65vh;background:var(--color-surface)}table{border-collapse:collapse;width:100%;font-size:.96rem;white-space:nowrap}th,td{text-align:left;padding:14px 16px;border-bottom:1px solid var(--color-outline-variant)}th{background:var(--color-surface-container-low);position:sticky;top:0;color:var(--color-primary)}td:nth-child(2),#round-panel td:nth-child(3){max-width:340px;overflow-wrap:anywhere;white-space:normal}caption{text-align:left;padding:14px;font-weight:600}.retention-note{margin-top:40px;color:var(--color-on-surface-variant);font-size:.9rem}.tournaments-footer{display:block;background:transparent;color:var(--color-primary);max-width:1100px;margin:auto;padding:20px 24px 36px;border-top:1px solid var(--color-outline-variant)}.tournaments-footer a{color:var(--color-primary)}#catalog-status,#detail-status{min-height:1.5em;color:var(--color-on-surface-variant)}@media(max-width:520px){.tournaments-shell{padding:104px 16px}.search-controls{flex-direction:column}th,td{padding:12px}.site-header nav{font-size:.85rem}}
/* Round workspace shares the site's existing palette and typography. */
.tournaments-shell:has(#detail:not([hidden])) .tournaments-intro{display:none}
#tournament-title{font-size:clamp(1.8rem,4vw,2.8rem);line-height:1.2;margin:24px 0 12px;overflow-wrap:anywhere}
.round-tabs{display:flex;gap:8px;overflow-x:auto;padding:12px 4px 20px;margin:16px -4px 0;scroll-padding:4px}
.round-tabs button{flex:none;min-height:44px;padding:10px 20px;border-radius:24px;color:var(--green-900);background:var(--green-100);border:1px solid var(--line)}
.round-tabs button[aria-selected=true]{background:var(--color-primary);color:var(--color-on-primary);border-color:var(--color-primary)}
#round-panel{background:var(--white);border:1px solid var(--line);border-radius:var(--radius);padding:24px}
.round-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
#detail .round-heading h2{font-size:1.35rem;margin:0}#round-note{color:var(--muted);margin:8px 0 0}
.round-actions{display:flex;gap:8px;flex-wrap:wrap}.round-actions button,dialog button{min-height:44px}
.round-actions button:last-child{background:var(--green-50);color:var(--green-900);border:1px solid var(--line)}
#round-panel .results-scroll{margin-top:24px;max-height:none}#round-panel table{table-layout:fixed;white-space:normal}#round-panel th:first-child{width:12%}#round-panel th:nth-child(3){width:25%}
#round-panel td{overflow-wrap:anywhere;vertical-align:top}#round-panel td:nth-child(3){text-align:center;font-weight:600}#round-panel th:nth-child(3){text-align:center}
.result-note{display:block;margin-top:4px;font-size:.8rem;font-weight:400;color:var(--muted)}
#standings-dialog{box-sizing:border-box;width:min(960px,calc(100% - 32px));max-height:calc(100dvh - 32px);padding:24px;border:1px solid var(--line);border-radius:24px;color:var(--ink);background:var(--white)}
#standings-dialog::backdrop{background:rgb(9 37 22 / .55)}#standings-dialog[open]{display:flex;flex-direction:column;gap:16px}
#standings-dialog header,#standings-dialog footer{flex-shrink:0}#standings-dialog .results-scroll{min-height:0;overflow:auto;margin:0}#standings-dialog h2{font-size:1.35rem;margin:0}#standings-dialog footer{display:flex;justify-content:flex-end;padding-top:8px}
#standings-status:empty{display:none}button:disabled{cursor:default}.round-actions button:disabled{background:var(--color-surface-container-highest);color:var(--color-on-surface-variant);border-color:var(--color-outline-variant)}button:hover:not(:disabled){filter:brightness(.94)}
@media(max-width:520px){#round-panel{padding:16px}#round-panel th,#round-panel td{padding:12px 6px;font-size:.88rem}#standings-dialog{padding:16px}.round-actions{width:100%}.round-actions button{flex:1;padding:10px}#round-panel th:first-child{width:13%}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
#standings-dialog footer{background:transparent;color:var(--ink);border:0;margin:0;padding:8px 0 0;width:auto;max-width:none}
#standings-dialog header{background:transparent;padding:0;margin:0}
#standings-dialog table{min-width:640px}#standings-dialog td:nth-child(2){min-width:180px}
#standings-dialog h2,.round-heading h2{letter-spacing:normal}
.tournament-facts{display:flex;flex-wrap:wrap;gap:8px;list-style:none;padding:0;margin:16px 0}.tournament-facts li{background:var(--green-50);color:var(--green-900);border:1px solid var(--line);border-radius:12px;padding:8px 12px}
#tiebreak-info{border:1px solid var(--line);border-radius:12px;background:var(--white);margin:16px 0;overflow:hidden}
#detail #tiebreak-title{font-size:1rem;font-weight:700;letter-spacing:normal;line-height:1.5;margin:0;padding:16px 16px 10px;color:var(--green-900)}
#tiebreak-preview{display:flex;flex-wrap:wrap;gap:8px 16px;list-style:none;counter-reset:priority;margin:0;padding:0 16px 16px}
#tiebreak-preview li{display:flex;align-items:baseline;gap:8px;min-width:0;max-width:100%;overflow-wrap:anywhere;counter-increment:priority}
#tiebreak-preview li::before{content:counter(priority);flex:none;align-self:flex-start;min-width:24px;height:24px;border-radius:50%;background:var(--green-50);color:var(--green-900);text-align:center;line-height:24px;font-size:.8rem;font-weight:700}
#tiebreak-info details{border-top:1px solid var(--line)}
#tiebreak-info summary{display:flex;align-items:center;gap:10px;min-height:48px;padding:12px 16px;list-style:none;cursor:pointer;background:var(--green-50);color:var(--green-900);font-weight:600;touch-action:manipulation}
#tiebreak-info summary::-webkit-details-marker{display:none}
#tiebreak-info summary:hover{background:var(--green-100)}
#tiebreak-info summary:focus-visible{outline:none}
#tiebreak-info summary:focus-visible span{outline:2px solid var(--green-800);outline-offset:4px;border-radius:4px}
.tiebreak-info-icon,.tiebreak-chevron{flex:none}.tiebreak-chevron{margin-left:auto}#tiebreak-info details[open] .tiebreak-chevron{transform:rotate(180deg)}
.tiebreak-explanation{padding:16px}#tiebreak-info p{color:var(--muted);margin:0 0 16px}#tiebreak-order{padding-left:24px;margin:0}#tiebreak-order li{padding-left:4px}#tiebreak-order li::marker{color:var(--green-900);font-weight:700}#tiebreak-order li:last-child p{margin-bottom:0}
@media(max-width:520px){#tiebreak-preview{flex-direction:column;gap:10px}}
.player-search{display:flex;flex-direction:column;gap:6px;max-width:420px;margin-top:20px}.player-search input{width:100%;box-sizing:border-box;min-height:44px;font-size:16px}#standings-dialog .player-search{margin:0;flex-shrink:0}#pairing-search-status:empty,#standing-search-status:empty{display:none}#pairing-search-status,#standing-search-status{color:var(--muted);margin:8px 0;font-size:.9rem}
