:root{font-family:system-ui,-apple-system,sans-serif;color:#142d45;background:#edf3f8}*{box-sizing:border-box}body{margin:0}header{background:#083466;color:white;padding:16px;display:flex;align-items:center;justify-content:space-between;gap:12px}header h1{font-size:1.35rem;margin:3px 0}header small{letter-spacing:.12em}#state{font-size:.8rem}main{max-width:1100px;margin:auto;padding:12px}.toolbar{display:flex;flex-wrap:wrap;gap:10px;align-items:end;background:white;padding:12px;border-radius:12px}.toolbar label{flex:1 1 120px}label{font-size:.85rem;font-weight:650;display:grid;gap:5px}input,select,button{font:inherit;min-height:44px;border:1px solid #9aafc1;border-radius:8px;padding:9px;background:white}button{font-weight:700;cursor:pointer}button:disabled{opacity:.5}#startAll,.start{background:#dcae32;color:#182f45;border-color:#b18a25}.note{font-size:.82rem;color:#5b6872}.lanes{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr));gap:12px}.lane,.history{background:white;border-radius:12px;padding:12px;border:1px solid #d1dce5}.lane h2{font-size:1.1rem;margin:0}.lane-top,.actions,.history h2{display:flex;align-items:center;justify-content:space-between;gap:8px}.lane-top button{min-height:36px}.athletes{display:grid;gap:8px;margin:12px 0}.athlete{padding:10px;border:1px solid #d3dfe8;border-radius:9px}.athlete strong{display:block}.time{font-size:1.9rem;font-variant-numeric:tabular-nums;font-weight:800;margin:8px 0}.actions button{flex:1}.split{font-variant-numeric:tabular-nums;font-size:.8rem;margin:6px 0}.history{margin-top:14px}.history h2{font-size:1.05rem}#history{max-height:300px;overflow:auto}.record{padding:8px 0;border-bottom:1px solid #e2e8ee;font-size:.85rem}input[type=text]{width:100%}@media(max-width:500px){header{padding:12px}main{padding:8px}.toolbar{gap:6px}.toolbar label{flex:1 1 100px}.time{font-size:1.6rem}}

.import-label{display:inline-flex;gap:.4rem;align-items:center;flex-wrap:wrap;font-size:.9rem}.import-label input{max-width:12rem}

.toolbar input{min-height:44px;padding:8px;font-size:16px;max-width:100%}.lane-top{flex-wrap:wrap}.athlete>button{margin:3px}.actions{flex-wrap:wrap}.actions button{min-height:44px}

/* 1.0-inspired compact on-deck layout; three lanes side by side in phone portrait. */
.global-setup{background:#fff;border:1px solid #c6d5e3;border-radius:9px;margin-bottom:7px;overflow:hidden}
.global-setup>summary{cursor:pointer;display:flex;align-items:center;gap:8px;min-height:44px;padding:8px 11px;background:#103451;color:white;flex-wrap:wrap;font-size:13px}
.global-setup>summary span{font-size:11px;color:#d3e3f1;font-weight:400}
.global-setup .toolbar{border-radius:0}
#lanes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;align-items:start}
.lane{min-width:0;padding:6px;border-radius:7px;overflow-wrap:anywhere}
.lane h2{font-size:12px;line-height:1.2}
.lane-top{display:flex;flex-wrap:nowrap;gap:3px;align-items:center}
.lane-options{position:relative;margin-left:auto;min-width:0}
.lane-options summary{cursor:pointer;font-weight:800;font-size:17px;min-width:30px;min-height:32px;display:grid;place-items:center;border:1px solid #a7bbcf;border-radius:5px;list-style:none}
.lane-options[open]{grid-column:1/-1}
.lane-options button{display:block;width:100%;min-height:37px;font-size:11px;padding:5px;margin-top:3px}
.lane label{font-size:10px;gap:3px;margin-top:5px}
.lane input[type=text]{font-size:16px;padding:5px;min-height:44px;width:100%;min-width:0}
.lane>button{width:100%;padding:5px 2px;font-size:11px;min-height:40px;margin-top:3px;overflow-wrap:anywhere}
.athletes{margin:5px 0;gap:5px}
.athlete{min-width:0;padding:5px 3px;border-radius:5px}
.athlete strong{font-size:11px;line-height:1.25;overflow-wrap:anywhere}
.athlete>span{font-size:10px}
.athlete>button{font-size:10px;min-height:30px;padding:4px;max-width:100%;margin:2px}
.athlete .time{font-size:clamp(13px,3.8vw,21px);font-variant-numeric:tabular-nums;letter-spacing:-.04em;margin:5px 0}
.athlete .split{font-size:10px;overflow-wrap:anywhere}
.athlete .actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px}
.athlete .actions button{min-width:0;min-height:44px;padding:4px 2px;font-size:11px;overflow-wrap:anywhere}
.syncbar{display:flex;align-items:center;flex-wrap:wrap;gap:6px}
.syncbar #roster-status{font-size:11px}
@media (max-width:650px){
 header{padding:7px 9px}
 header h1{font-size:16px}
 main{padding:5px}
 .note{font-size:11px;line-height:1.3;margin:5px 2px}
 #lanes{gap:3px}
 .lane{padding:4px 3px}
 .lane h2{font-size:11px}
 .athlete .actions button{font-size:10px}
}

/* Compact six-swimmer lane grid: high-priority touch targets remain >=44px. */
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.syncbar{padding:3px 5px;margin:0 0 5px;min-height:25px}
.syncbar strong{font-size:11px}
#lanes{grid-template-columns:repeat(3,minmax(0,1fr));gap:3px}
.lane{padding:3px;min-width:0}
.lane-top{min-height:30px}
.lane-top h2{font-size:11px;margin:2px}
.add-row{display:grid;grid-template-columns:1fr 1.8fr 28px;gap:2px;margin:2px 0 4px;align-items:center}
.add-row select,.add-row input{width:100%;min-width:0;height:35px;min-height:35px!important;padding:3px!important;font-size:11px!important}
.add-row button{min-width:28px;min-height:35px;padding:2px;font-size:17px}
.athletes{display:flex;flex-direction:column;gap:3px;margin:0}
.athlete{padding:3px!important;border:1px solid #d1dce7}
.swimmer-head{display:flex;align-items:baseline;justify-content:space-between;gap:2px;min-width:0}
.swimmer-head strong{font-size:11px;line-height:1.15;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.swimmer-head span{font-size:9px;flex:0 0 auto}
.athlete .time{font-size:16px;margin:1px 0;line-height:1.15}
.athlete .split{font-size:9px;min-height:11px;line-height:1.1;margin:1px 0}
.athlete .actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px}
.athlete .actions button{min-height:44px!important;font-size:10px!important;padding:2px!important;margin:0}
.swimmer-options{margin:0}
.swimmer-options summary{font-size:9px;min-height:15px;line-height:1;cursor:pointer}
.swimmer-options[open] button{min-height:34px;font-size:10px;padding:3px}
.history{margin-top:12px}
@media(max-width:650px){main{padding:3px}.lane{padding:2px}.athlete{padding:2px!important}.add-row{grid-template-columns:1fr 1.5fr 26px}.add-row select{font-size:10px!important}.swimmer-head strong{font-size:10px}.swimmer-head span{font-size:8px}}

.add-row select[id^="name-"]{width:100%;min-width:0;max-width:100%;font-size:11px!important;min-height:36px!important;padding:3px 1px!important}
.add-row input[id^="name-"]{width:100%;min-width:0}
