dialog:has(.tournament-sessions){width:min(1040px,calc(100vw - 28px));max-width:calc(100vw - 28px)}
dialog[open]:has(#tournament-programme-error){display:flex;flex-direction:column;overflow:hidden}
dialog:has(#tournament-programme-error)>.dialog-head{flex-shrink:0;position:relative}
dialog:has(#tournament-programme-error)>.dialog-body{min-height:0;overflow-y:auto;overscroll-behavior:contain}
.tournament-programme-actions{flex-shrink:0;margin:0;padding:.8rem 1.5rem;border-bottom:1px solid var(--line)}
.tournament-programme-actions:empty{display:none}
@media(max-width:760px){.tournament-programme-actions{padding:.75rem 1rem}}
.tournament-sessions{display:grid;gap:.9rem;background:var(--surface-soft);padding:1rem;border-radius:10px;margin:.5rem 0 1rem;min-width:0}
.tournament-time-group{display:grid;grid-template-columns:4.5rem minmax(0,1fr);gap:.9rem;min-width:0}
.tournament-time{display:flex;align-items:center;justify-content:center;background:var(--blue-ink);color:white;border-radius:9px;padding:.6rem .3rem;font-size:1rem;white-space:nowrap}
.tournament-card-grid{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.85rem;min-width:0}
.tournament-match-card{display:flex;flex-direction:column;gap:.85rem;min-width:0;padding:1rem;border:1px solid #b7c6cf;border-left:5px solid #4798b8;background:white;overflow-wrap:anywhere}
.tournament-card-players{display:grid;gap:.85rem}
.tournament-player{display:flex;flex-direction:column;gap:.15rem;min-width:0;text-align:left}
.tournament-player-name{font-size:.95rem;font-weight:750;line-height:1.4;color:var(--blue-ink)}
.tournament-club{font-size:.78rem;line-height:1.4;color:#727c82}
.tournament-player.is-winner .tournament-player-name,.tournament-winner{color:#b65518}
.tournament-winner{font-weight:700;font-size:.83rem;line-height:1.4;margin-top:.2rem}
.tournament-score{margin:0;font-size:.85rem;color:var(--blue-ink)}
.tournament-match-actions{display:flex;gap:.5rem;flex-wrap:wrap;margin-top:auto}
.tournament-match-actions .btn{min-height:32px;padding:.3rem .65rem}
.tournament-select{display:flex;align-items:center;gap:.45rem;cursor:pointer;font-size:.8rem;color:var(--muted)}
.tournament-select input{margin:0}
.tournament-ignored .tournament-card-players{opacity:.45}
.tournament-selection-actions{display:flex;gap:.5rem;flex-wrap:wrap}
.tournament-poster-image{display:block;width:100%;height:auto;margin-top:1rem}
.tournament-poster-actions{margin:.5rem 0 1rem;justify-content:flex-start}
dialog:has(.tournament-poster-image){width:min(900px,calc(100vw - 28px))}
.tournament-privacy-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:.5rem}
.tournament-privacy-list .check{align-items:flex-start;padding:.65rem;border:1px solid var(--line);border-radius:8px;overflow-wrap:anywhere}
.tournament-privacy-list input{flex-shrink:0}
.tournament-poster-actions a[aria-disabled="true"]{pointer-events:none;opacity:.5}
.day-label .tournament-day-button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.2rem;width:100%;max-width:100%;margin-top:1rem;padding:.65rem .2rem;font-size:.78rem;white-space:normal}
.tournament-no-slots{padding:1.2rem;background:white;font-size:.85rem;color:var(--muted)}
.tournament-upload-zone{display:grid;gap:.75rem;padding:1.5rem;margin:1rem 0 .5rem;border:2px dashed var(--line);border-radius:12px;background:var(--surface-soft);text-align:center;cursor:pointer;transition:background .15s,border-color .15s}
.tournament-upload-zone.is-dragging,.tournament-upload-zone:focus-within{border-color:var(--blue-ink);background:var(--surface-accent)}
.tournament-upload-zone input{width:100%;min-width:0;font-size:.85rem}
#tournament-upload-status{overflow-wrap:anywhere}
.slot.schedule-inactive{background:var(--surface-soft);border-top:4px solid var(--muted);padding:1rem;gap:.7rem}
.slot.schedule-inactive .volunteers{display:none}
.slot.schedule-inactive .slot-note{margin:0;font-weight:600;color:var(--muted)}
.slots-grid.has-inactive{grid-auto-rows:1fr}
@media(max-width:760px){.day-label{flex-wrap:wrap}.day-label .tournament-day-button{width:auto;margin:0 0 0 auto;padding:.4rem .65rem;font-size:.8rem}}
@media(max-width:600px){
 dialog:has(.tournament-sessions) .dialog-body{padding:1rem}
 .tournament-sessions{padding:.65rem;gap:.65rem}
 .tournament-card-grid{grid-template-columns:minmax(0,1fr);gap:.65rem}
 .tournament-time-group{grid-template-columns:3.4rem minmax(0,1fr);gap:.6rem}
 .tournament-time{font-size:.9rem}
 .tournament-match-card{padding:.75rem}
 .tournament-match-actions>.btn{flex:1}
}
