:root{--navy:#071827;--ink:#10283a;--muted:#71838e;--line:#dce6e9;--paper:#edf3f5;--surface:#fff;--teal:#11a7ae;--orange:#ff6b35}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;background:#071827;color:var(--ink);font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
body{overflow-x:hidden}
.announcer-shell{min-height:100vh;background:linear-gradient(150deg,#edf4f5,#fff);display:grid;grid-template-rows:auto auto auto auto minmax(380px,1fr) auto}
.announcer-header{min-height:72px;padding:10px clamp(18px,3vw,46px);background:var(--navy);color:#fff;display:flex;align-items:center;gap:22px}
.announcer-brand{min-width:0;color:#fff;text-decoration:none;display:flex;align-items:center;gap:12px}
.announcer-brand>span{width:50px;height:50px;padding:5px;border-radius:12px;background:#fff;display:grid;place-items:center}
.announcer-brand img{width:100%;height:100%;object-fit:contain}
.announcer-brand small{display:block;color:#8edce4;font-size:10px;font-weight:900;letter-spacing:.12em;text-transform:uppercase}
.announcer-brand strong{display:block;max-width:54vw;margin-top:2px;overflow:hidden;font-size:18px;text-overflow:ellipsis;white-space:nowrap}
.announcer-live{margin-left:auto;display:flex;align-items:center;gap:8px;color:#c8d5db;font-size:11px;font-weight:850;text-transform:uppercase;letter-spacing:.08em}
.announcer-live i{width:10px;height:10px;border-radius:50%;background:#31ce83;box-shadow:0 0 0 7px rgba(49,206,131,.12)}
.announcer-live time{padding-left:12px;border-left:1px solid rgba(255,255,255,.2);font-variant-numeric:tabular-nums}
.icon-button{width:45px;height:45px;border:1px solid rgba(255,255,255,.22);border-radius:12px;background:rgba(255,255,255,.06);color:#fff;font-size:22px;cursor:pointer}
.event-banner{min-height:128px;padding:15px clamp(14px,2.5vw,38px);background:linear-gradient(115deg,#0a2132,#0c4e5c);color:#fff;display:grid;grid-template-columns:160px minmax(0,1fr) 160px;align-items:center;gap:20px;box-shadow:inset 0 -4px 0 var(--teal)}
.direction-button{height:64px;padding:0 18px;border:1px solid rgba(255,255,255,.22);border-radius:15px;background:rgba(255,255,255,.07);color:#fff;display:flex;align-items:center;justify-content:flex-start;gap:12px;font:inherit;cursor:pointer}
.direction-button.next{justify-content:flex-end}
.direction-button span{font-size:26px}
.direction-button small{font-size:10px;font-weight:850}
.direction-button:disabled{opacity:.3;cursor:not-allowed}
.event-identity{min-width:0;display:flex;align-items:center;justify-content:center;gap:22px}
.event-identity>div{width:82px;height:82px;flex:0 0 82px;border-radius:24px;background:#fff;color:var(--navy);display:grid;place-content:center;text-align:center;box-shadow:0 12px 30px rgba(0,0,0,.22)}
.event-identity>div span{font-size:8px;font-weight:900;letter-spacing:.14em;text-transform:uppercase}
.event-identity>div strong{font-size:35px;line-height:1}
.event-identity article{min-width:0}
.event-identity article>small{color:#8edce4;font-size:9px;font-weight:900;letter-spacing:.12em;text-transform:uppercase}
.event-identity h1{margin:4px 0 5px;overflow:hidden;font-size:clamp(24px,3vw,42px);line-height:1.05;text-overflow:ellipsis;white-space:nowrap}
.event-identity p{margin:0;color:#b6c9d1;font-size:11px}
.event-identity p span{color:#8ee5ef;font-weight:850}
.event-identity p b{margin-left:10px;font-weight:700}
.heat-toolbar{min-height:76px;padding:9px clamp(14px,3vw,46px);border-bottom:1px solid var(--line);background:#fff;display:grid;grid-template-columns:180px minmax(0,1fr) 180px;align-items:center;gap:16px}
.heat-toolbar button{height:46px;border:1px solid var(--line);border-radius:12px;background:#f7fafb;color:var(--ink);font:inherit;font-size:10px;font-weight:850;cursor:pointer}
.heat-toolbar button:last-child{background:var(--navy);color:#fff}
.heat-toolbar button:disabled{opacity:.35;cursor:not-allowed}
.heat-title{text-align:center}
.heat-title small{display:block;color:var(--muted);font-size:8px;font-weight:850;text-transform:uppercase;letter-spacing:.11em}
.heat-title strong{font-size:22px}
.heat-title span{margin-left:8px;color:var(--muted);font-size:10px}
.announcer-assistant{min-height:72px;padding:10px clamp(14px,3vw,46px);border-bottom:1px solid #b9dde0;background:linear-gradient(105deg,#e8f9f9,#f7fbfc);display:grid;grid-template-columns:46px minmax(0,1fr) auto;align-items:center;gap:14px}
.assistant-mark{width:42px;height:42px;border-radius:13px;background:linear-gradient(145deg,var(--teal),#087078);color:#fff;display:grid;place-items:center;font-size:18px;font-weight:950;box-shadow:0 8px 20px rgba(17,167,174,.2)}
.assistant-summary{min-width:0}
.assistant-summary small{display:block;color:#16818a;font-size:8px;font-weight:950;letter-spacing:.14em;text-transform:uppercase}
.assistant-summary p{margin:4px 0 0;overflow:hidden;color:var(--ink);font-size:clamp(12px,1.05vw,16px);font-weight:780;text-overflow:ellipsis;white-space:nowrap}
.assistant-actions{display:flex;gap:8px}
.assistant-actions button{height:38px;padding:0 13px;border:1px solid #afd7da;border-radius:10px;background:#fff;color:#146e75;font:inherit;font-size:9px;font-weight:900;cursor:pointer}
.assistant-actions .assistant-present{border-color:var(--navy);background:var(--navy);color:#fff}
.assistant-present span{margin-left:6px;color:#7ee3e7}
.lane-stage{min-height:0;padding:14px clamp(14px,3vw,46px) 18px;background:linear-gradient(145deg,#edf3f5,#f8fafb)}
.lane-table{width:100%;border-collapse:separate;border-spacing:0 7px;table-layout:fixed}
.lane-table thead th{padding:0 18px 4px;color:#667b86;font-size:9px;text-align:left;text-transform:uppercase;letter-spacing:.12em}
.lane-table thead th:first-child{width:100px;text-align:center}
.lane-table thead th:last-child{width:190px;text-align:right}
.lane-table tbody tr{height:clamp(52px,6.4vh,77px)}
.lane-table td{padding:9px 18px;background:#fff;border-top:1px solid var(--line);border-bottom:1px solid var(--line);box-shadow:0 5px 14px rgba(7,24,39,.045)}
.lane-table td:first-child{width:100px;border-left:1px solid var(--line);border-radius:15px 0 0 15px;text-align:center}
.lane-table td:last-child{width:190px;border-right:1px solid var(--line);border-radius:0 15px 15px 0;text-align:right}
.lane-number{display:inline-grid;width:48px;height:48px;border-radius:14px;background:linear-gradient(145deg,var(--navy),#14455b);color:#fff;place-items:center;font-size:25px;font-weight:900}
.swimmer-name{display:block;overflow:hidden;font-size:clamp(18px,2.25vw,31px);line-height:1.05;text-overflow:ellipsis;white-space:nowrap}
.swimmer-meta{display:flex;min-width:0;align-items:center;gap:12px;margin-top:4px;color:var(--muted);font-size:clamp(10px,1vw,14px);font-weight:700;white-space:nowrap}
.swimmer-meta>span:first-child{flex:0 0 auto}
.swimmer-helper{min-width:0;overflow:hidden;color:#16818a;font-size:clamp(8px,.74vw,11px);font-weight:800;display:flex;align-items:center;gap:7px;white-space:nowrap}
.swimmer-helper b{color:#0c6269;font-weight:950}
.swimmer-helper i{padding:0 5px;color:#9bb0b8;font-style:normal}
.helper-totals,.swimmer-alert{flex:0 0 auto}
.helper-best{min-width:0;overflow:hidden;text-overflow:ellipsis}
.swimmer-alert{max-width:38vw;overflow:hidden;padding:2px 6px;border:1px solid #f0c9a8;border-radius:999px;background:#fff6ec;color:#9a4c18;font-size:.92em;font-weight:900;text-overflow:ellipsis}
.entry-time{font-size:clamp(19px,2.1vw,30px);font-weight:900;font-variant-numeric:tabular-nums}
.entry-time small{display:block;margin-bottom:3px;color:var(--muted);font-size:8px;letter-spacing:.1em;text-transform:uppercase}
.announcer-loading,.announcer-empty{height:100%;min-height:360px;border:1px dashed #b9cdd3;border-radius:18px;background:#fff;display:flex;align-items:center;justify-content:center;flex-direction:column;color:var(--muted)}
.announcer-loading i{width:34px;height:34px;margin-bottom:14px;border:3px solid #dce6e9;border-top-color:var(--teal);border-radius:50%;animation:spin .8s linear infinite}
.announcer-empty strong{color:var(--ink);font-size:22px}
.announcer-empty p{font-size:12px}
@keyframes spin{to{transform:rotate(360deg)}
}
.announcer-footer{min-height:66px;padding:9px clamp(14px,3vw,46px);border-top:1px solid var(--line);background:#fff;display:flex;align-items:center;gap:16px}
.event-jump{display:flex;align-items:center;gap:8px}
.event-jump label{color:var(--muted);font-size:8px;font-weight:850;text-transform:uppercase}
.event-jump select{max-width:310px;height:38px;border:1px solid var(--line);border-radius:9px;background:#f8fafb;padding:0 10px;color:var(--ink);font:inherit;font-size:10px;font-weight:750}
.keyboard-help{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:8px}
.keyboard-help span{white-space:nowrap}
.keyboard-help kbd{min-width:22px;margin-right:2px;padding:3px 5px;border:1px solid #cbd8dc;border-bottom-width:2px;border-radius:5px;background:#f4f7f8;color:#405963;font:inherit;font-weight:850}
.follow-toggle{margin-left:auto;display:flex;align-items:center;gap:7px;color:#425b66;font-size:9px;font-weight:800}
.follow-toggle input{width:17px;height:17px;accent-color:var(--teal)}
.refresh-button{height:38px;padding:0 12px;border:1px solid var(--line);border-radius:9px;background:#f7fafb;color:var(--ink);font:inherit;font-size:9px;font-weight:850;cursor:pointer}
.updated{color:var(--muted);font-size:8px;white-space:nowrap}
.script-presenter{position:fixed;z-index:1000;inset:0;background:radial-gradient(circle at 80% 15%,rgba(17,167,174,.28),transparent 34%),linear-gradient(135deg,#051522,#0a3448);color:#fff;display:grid;grid-template-rows:auto 1fr auto}
.script-presenter[hidden]{display:none}
.script-presenter>header{min-height:100px;padding:20px clamp(24px,5vw,80px);border-bottom:1px solid rgba(255,255,255,.14);display:flex;align-items:center;justify-content:space-between;gap:25px}
.script-presenter>header small{color:#84e4e8;font-size:11px;font-weight:900;letter-spacing:.15em;text-transform:uppercase}
.script-presenter>header h2{margin:5px 0 0;font-size:clamp(22px,2.4vw,40px)}
.script-presenter>header button{width:58px;height:58px;border:1px solid rgba(255,255,255,.28);border-radius:17px;background:rgba(255,255,255,.08);color:#fff;font-size:35px;line-height:1;cursor:pointer}
.script-presenter>main{min-height:0;padding:clamp(28px,5vh,70px) clamp(24px,7vw,115px);display:grid;grid-template-rows:auto 1fr auto;gap:25px}
.script-progress{display:flex;align-items:center;gap:18px;color:#8be5e9;font-size:11px;font-weight:900;letter-spacing:.1em;text-transform:uppercase}
.script-progress i{height:6px;flex:1;border-radius:999px;background:rgba(255,255,255,.12);overflow:hidden}
.script-progress b{display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--teal),#84eef0);transition:width .25s ease}
.script-presenter article{margin:auto 0;padding:clamp(28px,4vw,65px);border:1px solid rgba(255,255,255,.17);border-radius:clamp(22px,3vw,42px);background:rgba(255,255,255,.08);box-shadow:0 30px 90px rgba(0,0,0,.25);font-size:clamp(34px,5vw,84px);font-weight:850;line-height:1.12;letter-spacing:-.025em;outline:none}
.script-presenter aside{display:flex;align-items:end;justify-content:space-between;gap:20px;color:#b1c5ce}
.script-presenter aside span{font-size:clamp(14px,1.3vw,22px);font-weight:750}
.script-presenter aside small{font-size:10px}
.script-presenter>footer{min-height:86px;padding:14px clamp(24px,5vw,80px);border-top:1px solid rgba(255,255,255,.14);display:grid;grid-template-columns:1fr auto 1fr;gap:14px}
.script-presenter>footer button{height:56px;padding:0 22px;border:1px solid rgba(255,255,255,.25);border-radius:14px;background:rgba(255,255,255,.07);color:#fff;font:inherit;font-size:12px;font-weight:900;cursor:pointer}
.script-presenter>footer button:disabled{opacity:.3}
.script-presenter>footer .next-cue{justify-self:end;min-width:190px;border-color:#5ee0e5;background:var(--teal)}
body.script-presenter-open{overflow:hidden}
@media(max-width:900px){.event-banner{grid-template-columns:64px minmax(0,1fr) 64px}
.direction-button{padding:0;justify-content:center!important}
.direction-button small{display:none}
.event-identity>div{width:68px;height:68px;flex-basis:68px}
.heat-toolbar{grid-template-columns:120px minmax(0,1fr) 120px}
.keyboard-help{display:none}
.announcer-footer{flex-wrap:wrap}
.updated{display:none}
}
@media(max-width:620px){.announcer-header{min-height:62px;padding:7px 11px}
.announcer-brand>span{width:42px;height:42px}
.announcer-brand strong{font-size:13px}
.announcer-live span,.announcer-live time{display:none}
.event-banner{min-height:105px;padding:10px;gap:8px}
.event-identity{gap:10px}
.event-identity>div{width:58px;height:58px;flex-basis:58px;border-radius:18px}
.event-identity>div strong{font-size:26px}
.event-identity h1{font-size:19px;white-space:normal}
.heat-toolbar{grid-template-columns:90px minmax(0,1fr) 90px;padding:7px 10px}
.heat-toolbar button{font-size:0}
.heat-toolbar button:first-child:after{content:"← Heat";font-size:9px}
.heat-toolbar button:last-child:after{content:"Heat →";font-size:9px}
.heat-title strong{font-size:17px}
.lane-stage{padding:8px}
.lane-table{border-spacing:0 5px}
.lane-table thead th{padding:0 8px 3px}
.lane-table thead th:first-child{width:64px}
.lane-table thead th:last-child{width:95px}
.lane-table td{padding:7px 8px}
.lane-table td:first-child{width:64px}
.lane-table td:last-child{width:95px}
.lane-number{width:40px;height:40px;border-radius:11px;font-size:20px}
.swimmer-name{font-size:16px}
.swimmer-meta{font-size:9px}
.swimmer-meta{gap:7px}
.swimmer-helper{font-size:7px}
.swimmer-helper i{padding:0 2px}
.swimmer-alert{max-width:34vw;padding:1px 4px}
.entry-time{font-size:16px}
.announcer-footer{gap:8px}
.event-jump{flex:1}
.event-jump label{display:none}
.event-jump select{width:100%;max-width:none}
.follow-toggle{margin-left:0}
}
@media(max-width:700px){.announcer-assistant{grid-template-columns:40px minmax(0,1fr)}
.assistant-actions{grid-column:1/-1}
.assistant-actions button{flex:1}
.script-presenter>main{padding:24px 18px}
.script-presenter article{font-size:clamp(29px,8vw,50px)}
.script-presenter aside small{display:none}
.script-presenter>footer{padding:10px 16px;grid-template-columns:1fr 1fr}
.script-presenter>footer #copyFullScriptButton{display:none}
.script-presenter>footer .next-cue{min-width:0;width:100%}
}

@media(max-height:950px) and (min-width:701px){html,body{height:100%;overflow:hidden}
.announcer-shell{height:100dvh;min-height:0;grid-template-rows:58px 92px 58px 62px minmax(0,1fr) 52px}
.announcer-header{min-height:0;padding:6px clamp(16px,2.4vw,34px)}
.announcer-brand>span{width:42px;height:42px;border-radius:10px}
.announcer-brand small{font-size:8px}
.announcer-brand strong{font-size:14px}
.icon-button{width:39px;height:39px}
.event-banner{min-height:0;padding:7px clamp(14px,2.4vw,32px);gap:14px}
.direction-button{height:48px;border-radius:12px}
.event-identity{gap:15px}
.event-identity>div{width:60px;height:60px;flex-basis:60px;border-radius:18px}
.event-identity>div strong{font-size:27px}
.event-identity h1{font-size:clamp(21px,2.4vw,31px)}
.event-identity article>small{font-size:8px}
.event-identity p{font-size:9px}
.heat-toolbar{min-height:0;padding:6px clamp(14px,2.4vw,34px)}
.heat-toolbar button{height:40px}
.heat-title strong{font-size:18px}
.announcer-assistant{min-height:0;padding:5px clamp(14px,2.4vw,34px)}
.assistant-mark{width:38px;height:38px}
.assistant-summary p{font-size:12px}
.assistant-actions button{height:34px}
.lane-stage{overflow:hidden;padding:5px clamp(14px,3vw,38px)}
.lane-table{height:100%;border-spacing:0 3px}
.lane-table thead{height:14px}
.lane-table thead th{padding:0 12px 1px;font-size:7px}
.lane-table tbody tr{height:min(62px,calc((100dvh - 385px)/var(--lane-count)))}
.lane-table td{padding:3px 13px}
.lane-table td:first-child{border-radius:11px 0 0 11px}
.lane-table td:last-child{border-radius:0 11px 11px 0}
.lane-number{width:34px;height:34px;border-radius:10px;font-size:18px}
.swimmer-name{font-size:clamp(16px,1.8vw,23px)}
.swimmer-meta{margin-top:2px;font-size:9px}
.swimmer-helper{font-size:7px}
.entry-time{font-size:clamp(17px,1.7vw,22px)}
.entry-time small{margin-bottom:1px;font-size:6px}
.announcer-footer{min-height:0;padding:5px clamp(14px,2.4vw,34px);gap:10px;flex-wrap:nowrap}
.keyboard-help{display:none}
.event-jump{min-width:0;flex:1}
.event-jump select{width:100%;max-width:340px;height:36px}
.follow-toggle{margin-left:0}
.refresh-button{height:36px}
.updated{display:none}
}

