.coql-page{--org-color:#0057b7;--org-onbrand:#fff;--org-nav:#173b70;--org-onnav:#fff;--org-link:#0050a8;--org-link-dark:#80bfff;--org-accent:#ffd700}
body.coql-page.org-theme .matches-header{background:var(--org-nav);color:var(--org-onnav)}
.coql-page .matches-header a{color:var(--org-onnav)}
.coql-page .matches-header .brand{border-bottom:2px solid var(--org-accent)}
.coql-page .coql-header-name{font-size:1rem;font-weight:500}
.coql-page .matches-header .coql-auth{margin-left:auto;background:transparent;color:var(--org-onnav);border-color:currentColor;white-space:nowrap}
.coql-page main{padding-top:.75rem}
.coql-page main>h1{font-size:clamp(1.5rem,2.5vw,2rem);line-height:1.15}
.coql-page .button.primary{background:var(--org-color);border-color:var(--org-color);color:var(--org-onbrand)}
.coql-page main a{color:var(--org-link)}
:root[data-theme=dark] .coql-page main a{color:var(--org-link-dark)}
@media(prefers-color-scheme:dark){:root:not([data-theme=light]) .coql-page main a{color:var(--org-link-dark)}}
.coql-controls{display:flex;align-items:end;gap:.6rem;flex-wrap:wrap;margin:.9rem 0}
.coql-controls #filters{display:flex;gap:.35rem;flex-wrap:wrap}
.coql-controls #filters .button{white-space:nowrap}
.coql-controls #filters [aria-pressed=true]{background:var(--org-color);color:var(--org-onbrand);border-color:var(--org-color)}
.coql-controls label{display:grid;gap:.15rem;font-size:.85rem;min-width:9rem}
.coql-controls .coql-search{flex:1 1 12rem;max-width:22rem}
.coql-controls input,.coql-controls select{min-width:0;width:100%;padding:.3rem .4rem}
#standings{display:flex;align-items:center;gap:.35rem 1rem;flex-wrap:wrap;margin:.5rem 0 1rem;font-size:.9rem}
#standings :is(.previous-week-links,.current-week-links,.next-week-links,.standings-links){display:flex;align-items:center;gap:.35rem .6rem;flex-wrap:wrap}
#standings .coql-shortcuts-label{color:var(--matches-muted)}
#standings .current-week-button{white-space:nowrap;padding:.25rem .5rem}
#standings .current-week-button[aria-pressed=true]{background:var(--org-color);color:var(--org-onbrand);border-color:var(--org-color)}
.coql-page .table-wrap{width:fit-content;max-width:100%}
#coqlTable{width:max-content;max-width:100%}
#coqlTable :is(th,td){padding:.45rem;min-width:0}
#coqlTable :is(th,td):is(:nth-child(1),:nth-child(2),:nth-child(3),:nth-child(4),:nth-child(5),:nth-child(7),:nth-child(9),:nth-child(10),:nth-child(12)){width:1%;white-space:nowrap}
#coqlTable :is(th,td):is(:nth-child(6),:nth-child(8)){min-width:11rem;max-width:20rem}
#coqlTable .team-name{font-weight:600}
#coqlTable .team-players{display:flex;flex-wrap:wrap;gap:.1rem .6rem;color:var(--matches-muted);font-size:.8rem;line-height:1.35}
#coqlTable.hide-team-players .team-players{display:none}
#coqlTable .team-players span{display:inline-flex;align-items:baseline}
#coqlTable .button{white-space:nowrap;padding:.25rem .5rem}
#coqlTable .coql-row-actions{display:flex;gap:.35rem;flex-wrap:wrap}
#coqlTable .start-soon{background:var(--matches-soon);color:var(--matches-soon-text);border-color:var(--matches-soon-text)}
.coql-time{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem}
.host-links{display:flex;align-items:center;flex-wrap:wrap;gap:.4rem;margin:.5rem 0}
.host-links .host-copy-field{flex:1 1 17rem;min-width:12rem}
.host-copy-field{display:flex;align-items:center;gap:.4rem;min-width:0;max-width:100%}
.host-copy-field input{flex:1 1 auto;min-width:0;width:100%;padding:.3rem .4rem;font:inherit}
.host-copy-field .button{flex:none;white-space:nowrap}
.host-tiebreak{padding:.7rem .85rem;margin:.2rem 0 .9rem;border-left:4px solid var(--org-accent);border-radius:.3rem;background:var(--matches-soft)}
.host-tiebreak h3{margin:0 0 .35rem}
.host-tiebreak p{margin:.25rem 0}
.host-tiebreak ul{margin:.45rem 0 .1rem;padding-left:1.35rem}
.host-tiebreak li+li{margin-top:.2rem}
.host-teams{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem;margin:.7rem 0}
.host-team{min-width:0;padding:.55rem .65rem;border:1px solid var(--matches-line);border-radius:.45rem}
.host-team h3{margin:0 0 .25rem;font-size:1rem}
.host-team-players{display:flex;flex-wrap:wrap;gap:.15rem .65rem;font-size:.9rem;color:var(--matches-muted)}
.host-player{display:inline-flex;align-items:baseline;gap:.15rem;white-space:nowrap}
#hostDialog{width:min(96vw,64rem);max-width:calc(100vw - 1rem);box-sizing:border-box}
#hostStatsDialog{width:min(96vw,72rem);max-width:calc(100vw - 1rem);box-sizing:border-box}
.host-stats-controls{display:flex;gap:.65rem;flex-wrap:wrap;margin:.7rem 0}
.host-stats-controls label{display:grid;gap:.2rem;min-width:10rem}
.host-stats-controls select{width:100%;padding:.3rem .4rem}
#hostStatsBody h3{margin:1rem 0 .4rem}
.host-stats-scroll{max-width:100%;overflow-x:auto}
.host-stats-table{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums}
.host-stats-table :is(th,td){padding:.35rem .55rem;border-bottom:1px solid var(--matches-line);text-align:right;white-space:nowrap}
.host-stats-table :is(th,td):first-child{text-align:left}
.host-stats-table thead,.host-stats-table tfoot{background:var(--matches-soft)}
.host-plan{margin:.65rem 0}
.host-plan form{display:flex;align-items:center;gap:.4rem;flex-wrap:wrap}
.host-plan input{flex:1 1 14rem;min-width:0;width:auto}
.host-plan-actions{display:flex;gap:.4rem;flex:0 0 auto}
.host-admin-panel{margin-top:.5rem}
.host-admin-panel[hidden]{display:none!important}
.host-admin-editor form{display:flex;align-items:end;gap:.4rem;flex-wrap:wrap}
.host-admin-editor label{flex:1 1 15rem;min-width:0}
.host-admin-editor input{width:100%;min-width:0}
.host-admin-note{color:var(--matches-muted);font-size:.9rem;margin:.3rem 0 0}
.host-meta{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:.3rem .8rem;margin:.75rem 0}
.host-meta dt{color:var(--matches-muted)}
.host-meta dd{margin:0;overflow-wrap:anywhere}
.host-assignment{display:flex;align-items:center;gap:.35rem .6rem;flex-wrap:wrap}
.host-start-line{display:flex;align-items:center;gap:.35rem .6rem;flex-wrap:wrap}
.host-start-line .button,.host-countdown{white-space:nowrap}
.host-start-edit{display:grid;grid-template-columns:minmax(10rem,1.2fr) 5rem 5rem minmax(12rem,1fr) auto;align-items:end;gap:.4rem;margin:.55rem 0 0}
.host-start-edit[hidden]{display:none!important}
.host-start-edit label{min-width:0}
.host-start-edit :is(input,select){width:100%;min-width:0}
.host-start-edit-actions{display:flex;gap:.4rem;white-space:nowrap}
.host-countdown{font-variant-numeric:tabular-nums;font-weight:600}
.host-alert-status{font-size:.85rem;color:var(--matches-muted)}
.host-warmup{margin:.7rem 0}
.host-scores{margin-top:1rem;padding:.7rem;border:1px solid var(--matches-line);border-radius:.5rem}
.host-scores summary{cursor:pointer;font-weight:600}
.host-scores form{margin-top:.75rem}
.host-score-row{display:grid;grid-template-columns:minmax(0,1fr) 5rem 5rem;gap:.35rem;align-items:end}
.host-score-row input{width:100%}
dialog form{display:grid;gap:.65rem}
dialog form label{display:grid;gap:.2rem}
dialog textarea{min-height:8rem;width:100%}
#hostDialog .claim-invite{resize:none;overflow-y:auto}
@media(max-width:1199px){
 .coql-page .coql-controls{position:sticky;top:0;z-index:4;background:var(--matches-soft);padding:.4rem;border:1px solid var(--matches-line);border-radius:.5rem}
 .coql-page .table-wrap{width:100%;max-width:100%;border:0;background:transparent}
 #coqlTable{display:block;width:100%}
 #coqlTable thead{display:none}
 #rows{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem}
 #rows tr{display:grid;grid-template-columns:repeat(4,minmax(0,1fr)) minmax(4.5rem,max-content);min-width:0;border:1px solid var(--matches-line);border-radius:.5rem;background:var(--matches-surface)}
 #rows td{display:block;min-width:0;width:auto!important;max-width:none!important;white-space:normal!important;overflow-wrap:anywhere;padding:.35rem .45rem}
 #rows td::before{content:attr(data-label);display:block;font-size:.7rem;color:var(--matches-muted);font-weight:600}
 #rows td:only-child{grid-column:1/-1}
 #rows td:nth-child(6),#rows td:nth-child(8){grid-column:span 4}
 #rows td:nth-child(7),#rows td:nth-child(9){grid-column:5}
 #rows td:nth-child(10){grid-column:span 3}
 #rows td:nth-child(11){grid-column:span 2}
 #rows td:nth-child(12){grid-column:1/-1}
}
@media(max-width:760px){#rows{grid-template-columns:1fr}.coql-controls .coql-search{max-width:none}}
@media(max-width:800px){.host-start-edit{grid-template-columns:repeat(2,minmax(0,1fr))}.host-start-edit-actions{grid-column:1/-1}}
@media(max-width:600px){.coql-page .matches-header{flex-wrap:wrap;gap:.25rem .7rem}.coql-page .coql-header-name{order:3;width:100%}.host-teams{grid-template-columns:1fr}.host-meta{grid-template-columns:1fr;gap:.05rem}.host-meta dd{margin-bottom:.45rem}}
