/* Compact score sheets: names and totals stay visible while races scroll. */
#draws{--grid-name-width:170px;--grid-total-width:70px}
.scoring-setup{background:white;border:1px solid #b4caba;border-radius:10px;margin:12px 0;padding:0 16px}
.scoring-setup>summary{font-size:16px;color:#075638}
.scoring-setup>section{margin:0 0 12px;border:0;padding:0}
#draws>section>h2{font-size:1.4rem;margin:0 0 14px}
.score-grid-toolbar{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.score-grid-toolbar select{max-width:100%;min-width:180px}
.score-grid-panel{padding:0!important;border:0!important;background:transparent!important;margin:18px 0!important}
.score-grid-panel h3{font-size:1.2rem;margin:8px 0;color:#075638}
.score-grid-help{font-size:14px;color:#425f50;margin:6px 0 12px;line-height:1.5}
.score-grid-scroll{max-width:100%;overflow:auto;border:1px solid #a5bdac;border-radius:10px;scrollbar-color:#126e46 #edf4ef;isolation:isolate}
.score-grid{width:max-content;min-width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed;font-size:16px;color:#143e2b}
.score-grid caption{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%)}
.score-grid th,.score-grid td{padding:6px 8px;border-right:1px solid #d2dfd6;border-bottom:1px solid #d2dfd6;vertical-align:middle;text-align:center;background:white}
.score-grid tbody tr:nth-child(even)>*{background:#f0f6f2}
.score-grid thead th{background:#e0eee5;color:#075638;vertical-align:top;border-bottom:2px solid #126e46}
.score-grid .grid-name{width:var(--grid-name-width);min-width:var(--grid-name-width);max-width:var(--grid-name-width);position:sticky;left:0;z-index:3;text-align:left;white-space:normal;overflow-wrap:anywhere;font-weight:750}
.score-grid .grid-total{width:var(--grid-total-width);min-width:var(--grid-total-width);max-width:var(--grid-total-width);font-weight:800;background:#fff4b8!important;font-size:19px}
.score-grid .grid-total-left{position:sticky;left:var(--grid-name-width);z-index:3;box-shadow:3px 0 5px #173d2b16}
.score-grid .grid-race-heading{width:138px;min-width:138px;max-width:138px;overflow-wrap:anywhere}
.grid-race-heading small{display:block;font-weight:500;font-size:12px;margin-bottom:3px}
.grid-race-title{display:block;min-height:44px;font-size:15px;line-height:1.35}
.grid-race-state{display:block;font-size:11px;margin:3px 0;font-weight:600;color:#466351}
.grid-race-heading button{display:block;width:100%;min-height:32px;font-size:12px;padding:5px;margin:4px 0;line-height:1.2;border-width:1px;border-radius:6px}
.grid-race-heading button+button{background:white;color:#075638}
.grid-cell-inner{display:flex;align-items:center;justify-content:space-between;gap:5px}
.grid-entry{display:block;margin:0;font-size:10px;font-weight:500;color:#496454;text-align:center}
.grid-entry>span{display:block;line-height:12px}
.score-grid .grid-place-input{display:block;width:60px;min-width:60px;max-width:100%;min-height:40px;height:40px;padding:5px;margin:0 auto;font-size:14px;line-height:1.2;text-align:center;border-radius:6px;background:white;color:#173c30}
.grid-points{display:block;min-width:28px;font-size:23px;font-weight:800;line-height:28px;color:#075638}
.score-grid td.is-draft,.grid-race-state.is-draft{background:#fff0a0!important;color:#5b4300}
.score-grid-tools{margin-top:12px;padding:0 12px;border:1px solid #cfddd3;border-radius:8px;background:#f7faf8}
.score-grid-tools summary{font-size:15px;padding:10px 0}
.score-grid-tools .score-grid-tools{width:100%}
.score-grid-tools .score-grid-toolbar>div{width:100%}
.score-grid-tools button{font-size:14px;min-height:40px;padding:7px 10px}
.score-grid-scroll:focus-visible{outline:3px solid #c29400;outline-offset:2px}
@media(max-width:600px){#draws{--grid-name-width:115px;--grid-total-width:56px}.score-grid .grid-name{font-size:14px}.score-grid .grid-total{font-size:17px}.score-grid .grid-race-heading{width:118px;min-width:118px;max-width:118px}.score-grid-panel h3{font-size:1rem}}
@media print{.score-grid-toolbar,.score-grid-tools,.grid-race-heading button{display:none!important}.score-grid-scroll{overflow:visible}.score-grid .grid-name,.score-grid .grid-total-left{position:static}.score-grid{min-width:0;width:100%;font-size:9px}.score-grid .grid-race-heading{min-width:0;width:auto}.score-grid .grid-name{min-width:70px;width:70px}.score-grid .grid-place-input{width:40px;min-width:40px}.score-grid-help{font-size:9px}}

.hat-badge{display:block;width:fit-content;padding:.25rem .5rem;margin-bottom:.3rem;border:1px solid #25312b;border-radius:6px;font-size:.8rem;font-weight:800;white-space:normal}.hat-0{background:#1755c9;color:#fff}.hat-1{background:#c72430;color:#fff}.hat-2{background:#ffe45c;color:#17251c}.hat-3{background:#197b41;color:#fff}.hat-4{background:#ff9b38;color:#17251c}.hat-5{background:#ffb4d5;color:#17251c}.hat-6{background:#7435a0;color:#fff}.hat-7{background:#66e0dc;color:#17251c}.score-grid th.hat-name{border-left:6px solid var(--hat-colour)}.hat-row-0{--hat-colour:#1755c9}.hat-row-1{--hat-colour:#c72430}.hat-row-2{--hat-colour:#ffe45c}.hat-row-3{--hat-colour:#197b41}.hat-row-4{--hat-colour:#ff9b38}.hat-row-5{--hat-colour:#ffb4d5}.hat-row-6{--hat-colour:#7435a0}.hat-row-7{--hat-colour:#66e0dc}.lane-controls{margin:1rem 0;padding:.8rem;border:1px solid #abc7b5;border-radius:8px}.lane-controls summary{font-weight:bold;cursor:pointer}.lane-controls label{display:block;margin:.5rem 0}
