:root{color-scheme:dark;--bg:#07090b;--panel:#0f1317;--panel-2:#151a20;--raise:#1a2027;--line:#252c34;--line-2:#323a44;--text:#f1f3f5;--muted:#95a0ad;--red:#dc2626;--red-2:#ef4444;--green:#4ade80;--gold:#facc15;--radius:10px;--display:'Barlow Condensed','Arial Narrow',Impact,sans-serif}
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;background:var(--bg);color:var(--text);font-family:Barlow,system-ui,-apple-system,Segoe UI,Arial,sans-serif;font-size:15px;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent}
button,a,input{font:inherit}
button,.button{cursor:pointer;color:inherit;background:var(--raise);border:1px solid var(--line-2);border-radius:7px;padding:9px 14px;font-weight:600;transition:background .15s,border-color .15s,transform .05s,color .15s;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:6px}
button:hover,.button:hover{background:#252c35;border-color:#58626f}
button:active{transform:translateY(1px)}
button:focus-visible,a:focus-visible,summary:focus-visible,.rows:focus-visible{outline:2px solid #fff;outline-offset:2px}
button:disabled{opacity:.42;cursor:default;transform:none}
button.primary,.button.primary{background:var(--red);border-color:var(--red);color:#fff;box-shadow:0 6px 22px #dc262640}
button.primary:hover:not(:disabled),.button.primary:hover{background:var(--red-2);border-color:var(--red-2)}
button.primary:disabled{box-shadow:none;background:#262a30;border-color:#374151;color:#9ca3af;opacity:1}
button.ghost{background:transparent}
button.small{padding:5px 10px;font-size:12px;border-radius:6px}
button.icon{width:36px;height:36px;padding:0;font-size:15px}
a{color:#ffffff}
small,.muted{color:var(--muted)}
h1,h2,h3,p,ol,ul{margin:0}
h1,h2{font-family:var(--display);font-weight:800;letter-spacing:.3px;line-height:1}
h1{font-size:40px;font-style:italic;text-transform:uppercase}
h2{font-size:28px;text-transform:uppercase}
h3{font-size:16px}
.kicker{font-size:11px;font-weight:700;letter-spacing:1.6px;text-transform:uppercase;color:var(--muted)}
.red{color:var(--red)}.green{color:var(--green)}
b,strong{font-weight:700}

/* Layout: one screen on desktop */
#app{height:100dvh;display:grid;grid-template-rows:62px 118px 46px minmax(0,1fr) 68px;overflow:hidden}
.header{padding:0 28px;display:flex;align-items:center;gap:18px;border-bottom:1px solid var(--line);background:#07090bf2}
.brand{width:190px;height:38px;object-fit:contain;object-position:left}
.badge{font-size:10px;font-weight:700;letter-spacing:1.2px;text-transform:uppercase;border:1px solid #3f454f;color:#cfd5dc;background:#ffffff08;border-radius:999px;padding:5px 10px;white-space:nowrap}
.header-right{margin-left:auto;display:flex;align-items:center;gap:10px}
.header-link{font-size:13px;color:#cfd5dc}
.operator-button{font-size:13px;border-color:#7f1d1d;background:#dc262614;color:#ffffff}
.operator-button:hover{background:#dc26262a;border-color:var(--red)}
.operator-button .dot{width:7px;height:7px;border-radius:50%;background:var(--red);box-shadow:0 0 0 3px #dc262633}
.balance{text-align:right;min-width:128px;padding-left:14px;border-left:1px solid var(--line);border-radius:6px;transition:background .3s}
.balance strong{display:block;font-size:24px;font-family:var(--display);font-weight:700;font-variant-numeric:tabular-nums;letter-spacing:.3px}
.balance strong small{font-size:13px}
.balance.flash strong{color:var(--green);animation:pop .6s ease}
@keyframes pop{40%{transform:scale(1.08)}}

/* Event band */
.event{position:relative;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px 28px;border-bottom:1px solid var(--line);background:linear-gradient(90deg,#07090b 22%,#07090bcc 48%,#07090b33 80%,#07090b66),url('/assets/hero.svg') right center/cover no-repeat,#0b0d10;overflow:hidden}
.event .kicker{color:#ef4444}
.event p{margin-top:8px;color:#c3cad2;font-size:13px}
.event-stats{display:flex;gap:10px;z-index:1}
.event-stats>div{background:#07090bb8;border:1px solid #ffffff1c;border-radius:9px;padding:9px 14px;min-width:132px;backdrop-filter:blur(6px)}
.event-stats small{display:block;font-size:10px;letter-spacing:1.2px;text-transform:uppercase}
.event-stats strong{font-family:var(--display);font-size:25px;font-variant-numeric:tabular-nums}
.event-stats em{font-style:normal;font-size:13px;color:var(--muted);margin-left:2px}

.steps{display:flex;padding:0 28px;border-bottom:1px solid var(--line);gap:4px;background:#0a0d10}
.step{flex:1;display:flex;align-items:center;justify-content:center;gap:8px;font-size:12px;font-weight:600;color:#6f7a87;border-bottom:3px solid transparent;white-space:nowrap}
.step.active{color:#fff;border-color:var(--red);background:linear-gradient(#dc262600,#dc262614)}
.step.done{color:var(--green)}
.step-number{font-size:10px;opacity:.8;font-variant-numeric:tabular-nums}

.workspace{min-height:0;height:100%;padding:16px 28px;display:grid;grid-template-columns:minmax(0,1fr) 350px;gap:18px;max-width:1640px;width:100%;margin:0 auto}
.board,.slip{min-height:0;border:1px solid var(--line);border-radius:var(--radius);background:var(--panel);display:flex;flex-direction:column;overflow:hidden;box-shadow:0 20px 50px #0006}
.board-head{padding:14px 18px 12px;display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.board-head p{font-size:12.5px;color:var(--muted);margin-top:5px}
.status{font-size:11.5px;font-weight:600;color:#cfd5dc;white-space:nowrap;display:flex;align-items:center;gap:6px;border:1px solid var(--line-2);border-radius:999px;padding:5px 10px}
.status.live{color:#fff;border-color:#7f1d1d;background:#dc262618}
.status.final{color:var(--green);border-color:#1f5134;background:#4ade8012}
.open-indicator,.race-indicator{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--green)}
.race-indicator{background:var(--red);animation:pulse 1s infinite}
@keyframes pulse{50%{opacity:.25}}

.market-tabs{display:grid;grid-template-columns:repeat(6,1fr);padding:0 10px;border-bottom:1px solid var(--line)}
.market-tabs button{border:0;border-radius:0;background:transparent;padding:9px 4px 8px;font-size:13px;color:var(--muted);border-bottom:2px solid transparent;flex-direction:column;gap:1px}
.market-tabs button small{font-size:10px;font-weight:500;font-variant-numeric:tabular-nums;opacity:.8}
.market-tabs button:hover{background:#ffffff08;color:#fff}
.market-tabs button.active{color:#fff;border-color:var(--red);background:#dc262614}
.market-tabs:has(button:only-child){grid-template-columns:minmax(0,180px)}
.pool-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 18px;font-size:12px;border-bottom:1px solid var(--line);color:var(--muted);min-height:42px}
.pool-bar strong{color:#fff;font-variant-numeric:tabular-nums}
.pool-label{color:#cfd5dc;font-weight:600}
.speed{display:flex;gap:4px}.speed .active{background:#343c47;border-color:#6a7481}
.progress{height:3px;background:#1d232a}.progress span{display:block;height:100%;background:linear-gradient(90deg,#991b1b,var(--red));transition:width .6s linear;box-shadow:0 0 12px var(--red)}

.board-head+.pool-bar{border-top:1px solid var(--line)}
.combination-preview{padding:8px 18px;display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:12.5px;background:#141a20;border-bottom:1px solid var(--line)}
.combination-preview small{color:#aab3bd}

/* Result chart */
.payouts{border-bottom:1px solid var(--line);background:linear-gradient(#11241a55,#0f1317)}
.payouts-head{display:flex;justify-content:space-between;align-items:baseline;padding:9px 18px 0;font-size:11px;letter-spacing:1.4px;text-transform:uppercase;font-weight:700;color:var(--green)}
.payout-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:6px;padding:8px 18px 11px}
.payout-cell{background:#0a0e11;border:1px solid #1f3a2a;border-radius:7px;padding:6px 8px;font-variant-numeric:tabular-nums;min-width:0}
.payout-cell>small{display:block;font-size:10px;text-transform:uppercase;letter-spacing:1px;margin-bottom:2px}
.payout-cell div{display:flex;justify-content:space-between;gap:6px;font-size:12px;line-height:1.45}
.payout-cell span{color:#cfd5dc;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.payout-cell b{color:#fff}

/* Field table */
.table-head,.driver-row{display:grid;grid-template-columns:46px 74px minmax(0,1fr) 172px;align-items:center;gap:8px;padding:0 18px}
.table-head{height:30px;flex-shrink:0;background:#141920;font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:1px;color:var(--muted);border-bottom:1px solid var(--line)}
.table-head span:last-child{text-align:right}
.rows{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#39414b transparent}
.rows::-webkit-scrollbar{width:8px}.rows::-webkit-scrollbar-thumb{background:#39414b;border-radius:8px}
.driver-row{min-height:54px;border-bottom:1px solid #1d232a;transition:background .15s}
.driver-row[data-action]{cursor:pointer}
.driver-row[data-action]:hover{background:#ffffff06}
.driver-row.selected{background:#dc262614;box-shadow:inset 3px 0 var(--red)}
.driver-row.backed{background:#dc262612;box-shadow:inset 3px 0 var(--red)}
.driver-row.podium .position{color:#fff;font-weight:700}
.driver-row.p1 .position{color:var(--gold)}
.position{color:var(--muted);font-size:12.5px;font-variant-numeric:tabular-nums;display:flex;flex-direction:column;line-height:1.1}
.move{font-style:normal;font-size:9.5px;font-weight:700}
.move.up{color:var(--green)}.move.down{color:#ef4444}
.plate{display:inline-flex;align-items:baseline;justify-content:center;min-width:62px;font-family:var(--display);font-weight:800;font-style:italic;line-height:1;color:var(--fg);text-shadow:2px 2px 0 var(--sh),-1px -1px 0 var(--sh),1px -1px 0 var(--sh),-1px 1px 0 var(--sh);transform:skew(-8deg);letter-spacing:-.5px}
.plate b{font-size:31px;font-weight:800}
.plate small{font-size:14px;color:var(--fg);margin:0 1px}
.driver-name{font-size:15.5px;font-weight:600;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.share{display:flex;align-items:center;gap:8px;margin-top:5px}
.share i{display:block;height:3px;border-radius:3px;background:linear-gradient(90deg,#991b1b,var(--red));max-width:110px;min-width:2px}
.share em{font-style:normal;font-size:10.5px;color:var(--muted);font-weight:500;font-variant-numeric:tabular-nums}
.your-pick{display:inline-block;margin-left:8px;color:#ef4444;font-size:9.5px;letter-spacing:1.2px;font-weight:700;text-transform:uppercase;border:1px solid #7f1d1d;border-radius:4px;padding:1px 5px;vertical-align:2px}
.quote-button{justify-self:end;width:162px;display:flex;justify-content:space-between;align-items:center;text-align:right;padding:6px 8px 6px 10px;background:#161c23;gap:8px}
.quote-button>span:first-child{flex:1}
.quote-button b{font-size:15px;display:block;font-variant-numeric:tabular-nums}
.quote-button small{display:block;font-size:10.5px;font-variant-numeric:tabular-nums}
.quote-button .plus,.select-button{width:26px;height:26px;border-radius:6px;display:grid;place-items:center;background:#252c35;font-weight:700}
.quote-button.on{border-color:var(--red);background:#dc26261f}
.quote-button.on .plus,.select-button.on{background:var(--red);color:#fff;border-color:var(--red)}
.select-button{justify-self:end;width:36px;height:34px;padding:0}
.timing{display:flex;justify-content:flex-end;gap:18px;font-variant-numeric:tabular-nums;font-size:13.5px;text-align:right}
.timing small{display:block;font-size:10px}
.waiting{color:var(--muted);font-size:12px}

/* Ticket slip */
.slip{border-top:3px solid var(--red)}
.slip-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px 16px;border-bottom:1px solid var(--line)}
.slip-head>div{display:flex;gap:6px}
.slip-head b{background:#343c47;border-radius:999px;padding:0 6px;font-size:11px}
.slip-body{padding:14px 16px;display:flex;flex-direction:column;gap:13px;flex:1;min-height:0;overflow-y:auto}
.slip-sub{font-size:12.5px;color:var(--muted);margin-top:4px}
.toggle{display:flex;gap:4px;background:#0a0d10;border:1px solid var(--line);padding:3px;border-radius:8px}
.toggle button{flex:1;padding:6px;border:0;background:transparent;font-size:13px}
.toggle .active{background:#dc262626;color:#fff}
.selection{display:flex;flex-wrap:wrap;gap:6px;min-height:42px;align-items:center;padding:7px;border:1px dashed var(--line-2);border-radius:8px}
.selection .hint{font-size:12.5px;color:var(--muted);padding-left:4px}
.pick{border:1px solid #7f1d1d;background:#2a1414;border-radius:6px;padding:5px 9px;font-weight:700;font-size:14px}
.pick small{color:#e5e7eb;margin-right:4px;font-size:11px}
.stake-row{display:flex;gap:5px}
.stake-row button{flex:1;padding:7px;font-variant-numeric:tabular-nums}
.stake-row button.active{border-color:#fff;background:#343c47}
.totals{border-top:1px solid var(--line);padding-top:11px;display:grid;gap:8px}
.total-row{display:flex;justify-content:space-between;gap:8px;font-size:13px;color:var(--muted)}
.total-row strong{color:#fff;font-variant-numeric:tabular-nums}
.total-row.payout strong{color:var(--green);font-size:20px;font-family:var(--display)}
.slip-note{font-size:11.5px;line-height:1.45;color:var(--muted)}
.slip-action{margin-top:auto;display:grid;gap:7px}
.slip-action button{width:100%}
.toast{color:var(--green);font-size:12.5px;background:#4ade8010;border:1px solid #1f5134;border-radius:7px;padding:7px 9px}
.result-block{display:flex;flex-direction:column;gap:12px}
.result-word{font:800 italic 44px var(--display);letter-spacing:.5px;line-height:1}
.stat-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.stat-grid>div{background:#0b0e11;border:1px solid var(--line);border-radius:8px;padding:9px 11px}
.stat-grid small{font-size:11px}
.stat-grid strong{display:block;font-size:22px;margin-top:3px;font-family:var(--display);font-variant-numeric:tabular-nums}
.ticket-list{display:grid;gap:5px}
.ticket-line{display:flex;justify-content:space-between;gap:8px;font-size:12.5px;border:1px solid var(--line);border-radius:7px;padding:7px 9px}
.ticket-line small{display:block;font-size:11px}
.ticket-line>span:last-child{text-align:right}
.ticket-line.won{border-color:#1f5134;background:#4ade800d}.ticket-line.won b{color:var(--green)}
.ticket-line.lost b{color:#ef4444}

.footer{padding:10px 28px;border-top:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:15px;background:#0a0d10}
.footer p{font-size:13.5px;margin-bottom:3px;color:#cfd5dc}
.footer p strong{color:#fff}
.footer small{font-size:11px}
.footer-actions{display:flex;align-items:center;gap:8px}
.footer-actions button{white-space:nowrap}
.cta{padding:11px 20px;font-size:15px;min-width:190px}
.mobile-only{display:none!important}

/* Modals */
.modal-backdrop{position:fixed;inset:0;z-index:20;background:#000c;display:grid;place-items:center;padding:20px;backdrop-filter:blur(3px);animation:fade .15s ease}
@keyframes fade{from{opacity:0}}
.modal-panel{background:#10151a;border:1px solid #3b444f;border-radius:14px;width:min(640px,100%);max-height:calc(100dvh - 40px);display:flex;flex-direction:column;box-shadow:0 30px 100px #000;animation:rise .18s ease}
.modal-panel.wide{width:min(820px,100%)}
@keyframes rise{from{transform:translateY(8px);opacity:0}}
.modal-head{padding:16px 20px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;gap:10px}
.modal-head h2{font-size:26px}
.modal-content{padding:20px;overflow:auto;line-height:1.55}
.modal-content p{margin-bottom:12px;color:#bbc4cf}
.modal-content p.lead{font-size:16px;color:#e3e7eb}
.modal-content .fine{font-size:12px;color:var(--muted)}
.modal-content h3{margin:20px 0 8px;font-size:13px;letter-spacing:1.4px;text-transform:uppercase;color:#ef4444}
.modal-content ul{padding-left:18px;color:#bbc4cf;display:grid;gap:5px;margin-bottom:6px}
.modal-content ul b{color:#fff}
.steps-list{list-style:none;padding:0;margin:4px 0 16px;display:grid;gap:10px;counter-reset:s}
.steps-list li{counter-increment:s;display:grid;grid-template-columns:34px 1fr;gap:10px;align-items:start;color:#bbc4cf;background:#0b0e11;border:1px solid var(--line);border-radius:9px;padding:10px 12px}
.steps-list li::before{content:counter(s);width:28px;height:28px;border-radius:50%;background:var(--red);color:#fff;display:grid;place-items:center;font:800 16px var(--display)}
.steps-list b{color:#fff}.steps-list li>div{padding-top:3px}
.modal-actions{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap;margin-top:6px}
.modal-row{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);padding:9px 0;gap:12px}
.right{text-align:right}
.modal-content table{width:100%;border-collapse:collapse;font-size:13px;font-variant-numeric:tabular-nums;margin-bottom:6px}
.modal-content td,.modal-content th{padding:7px 8px;border-bottom:1px solid var(--line);text-align:left}
.modal-content td+td,.modal-content th+th{text-align:right}
.modal-content th{color:var(--muted);font-weight:600;font-size:12px}
.modal-content tr.check td{font-weight:700;color:#fff;border-bottom:0}
.modal-content details{border:1px solid var(--line);border-radius:8px;padding:0 12px;margin-bottom:8px}
.modal-content summary{cursor:pointer;padding:10px 0;font-weight:600}
.modal-content .pager{display:flex;justify-content:space-between;align-items:center;margin-top:12px;font-size:12px;color:var(--muted)}
.kpis{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:4px 0 14px}
.kpis>div{background:#0b0e11;border:1px solid var(--line);border-radius:9px;padding:10px 12px}
.kpis small{font-size:11px;display:block}
.kpis strong{font:700 26px var(--display);font-variant-numeric:tabular-nums}
.contact{margin-top:18px;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;border:1px solid #7f1d1d;background:#dc26260f;border-radius:10px;padding:12px 14px}
.contact small{display:block;font-size:10px;letter-spacing:1.3px;text-transform:uppercase}
.contact strong{font-size:17px;margin-right:8px}
.contact span{color:#cfd5dc;font-size:13px}

/* Large screens */
@media(min-width:1500px){.workspace{grid-template-columns:minmax(0,1fr) 380px;gap:22px}.driver-name{font-size:17px}.slip-body{gap:16px;padding:18px 20px}}
/* Short laptop screens */
@media(max-height:780px) and (min-width:861px){#app{grid-template-rows:54px 92px 38px minmax(0,1fr) 60px}.event h1{font-size:32px}.event p{margin-top:5px}.event-stats>div{padding:6px 12px}.event-stats strong{font-size:21px}.workspace{padding:10px 22px}.board-head{padding:9px 16px}.board-head h2{font-size:24px}.slip-body{padding:10px 14px;gap:9px}.slip-body h2{font-size:24px}.slip-head{padding:9px 14px}.driver-row{min-height:46px}.pool-bar{padding:6px 16px;min-height:36px}.selection{min-height:36px}.totals{gap:5px;padding-top:8px}.cta{padding:9px 16px}}
/* Mid widths */
@media(max-width:1180px) and (min-width:861px){.badge{display:none}.event-stats>div{min-width:0}.table-head,.driver-row{grid-template-columns:40px 66px minmax(0,1fr) 150px}.quote-button{width:146px}.workspace{grid-template-columns:minmax(0,1fr) 320px}.payout-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
/* Phones and small tablets */
@media(max-width:860px){
 #app{grid-template-rows:56px 96px 40px minmax(0,1fr) auto}
 .header{padding:0 12px;gap:8px}.brand{width:132px}.badge,.header-link{display:none}.header-right{gap:8px}.operator-button{padding:7px 9px;font-size:12px}.balance{min-width:0;padding-left:8px}.balance .kicker{font-size:9px;letter-spacing:1px}.balance strong{font-size:19px}
 .event{padding:10px 14px;background:linear-gradient(90deg,#07090b 30%,#07090b99),url('/assets/hero.svg') right center/cover,#0b0d10}.event h1{font-size:28px}.event p{font-size:11.5px;margin-top:5px}.event .kicker{font-size:9.5px}.event-stats{display:none}
 .steps{padding:0 4px;gap:0;overflow-x:auto;scrollbar-width:none}.steps::-webkit-scrollbar{display:none}.step{flex:0 0 auto;padding:0 10px;font-size:11px}.step-number{display:none}.step:not(.active) .step-name{opacity:.9}
 .workspace{padding:8px;display:block;position:relative}.board{height:100%}
 .slip{display:none;position:absolute;inset:8px;z-index:3}.workspace.show-slip .slip{display:flex}.workspace.show-slip .board{visibility:hidden}
 .mobile-only{display:inline-flex!important}
 .board-head{padding:10px 12px}.board-head h2{font-size:24px}.board-head p{font-size:11.5px}.status{font-size:10.5px;padding:4px 8px}
 .market-tabs{padding:0;overflow-x:auto;grid-template-columns:repeat(6,minmax(76px,1fr));scrollbar-width:none}.market-tabs::-webkit-scrollbar{display:none}.market-tabs button{font-size:12px}
 .pool-bar{padding:7px 12px;font-size:11px}.combination-preview{padding:6px 12px;font-size:11.5px}
 .payout-grid{grid-template-columns:repeat(3,minmax(0,1fr));padding:6px 12px 9px}.payout-cell.combo div{flex-direction:column;gap:0}.payout-cell.combo span{white-space:normal;font-size:11.5px}.payouts-head{padding:8px 12px 0}
 .table-head,.driver-row{grid-template-columns:30px 52px minmax(0,1fr) 108px;padding:0 10px;gap:6px}
 .plate{min-width:48px}.plate b{font-size:25px}.plate small{font-size:11px}.driver-name{font-size:14px}.share em{font-size:9.5px}.share i{max-width:60px}
 .quote-button{width:104px;padding:5px 6px;gap:4px}.quote-button b{font-size:13px}.quote-button small{font-size:9.5px}.quote-button .plus{width:20px;height:20px}
 .table-head{font-size:9px;letter-spacing:.3px}.timing{gap:10px;font-size:12px}
 .footer{padding:8px 10px;gap:8px}.footer>div:first-child{min-width:0}.footer p{font-size:11.5px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.footer small{display:none}.footer-actions{gap:6px}.footer-actions button{font-size:12.5px;padding:10px 12px}.footer-actions .reset{display:none}.cta{min-width:0}
 .modal-backdrop{padding:8px;place-items:end center}.modal-content{padding:16px}.modal-panel{max-height:calc(100dvh - 16px);border-radius:14px}.modal-head h2{font-size:22px}.kpis{grid-template-columns:1fr 1fr 1fr;gap:6px}.kpis strong{font-size:20px}.modal-content td,.modal-content th{padding:6px 4px}
}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* v3: race-day situations, house rules, photo */
.amber{color:#fbbf24}
.race-indicator.amber{background:#fbbf24}
.status.review{color:#fde68a;border-color:#6b5320;background:#fbbf2414}
.linkish{background:none;border:0;padding:0;color:#ffffff;font:inherit;font-weight:600;text-decoration:underline;text-underline-offset:3px;cursor:pointer;display:inline}
.linkish:hover{background:none;color:#fff}
.pool-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
button.scenario-on{background:#fbbf2420;border-color:#a1782a;color:#fde68a}
.carry{color:#fde68a;font-weight:700}
.notice{border-bottom:1px solid var(--line);background:#fbbf240d;padding:9px 18px;display:grid;gap:5px}
.notice p{font-size:12.5px;line-height:1.45;color:#e8dcc0}
.notice b{color:#fde68a}
.flag{font-size:11px;font-weight:700;letter-spacing:1px;text-transform:uppercase;color:#fbbf24}
.driver-row.out{opacity:.55}
.driver-row.out .driver-name{text-decoration:line-through;text-decoration-color:#fbbf2488}
.payout-cell em{display:block;font-style:normal;font-size:9.5px;color:#fde68a;margin-top:2px}
.rule-tag{font-style:normal;font-size:10px;text-transform:uppercase;letter-spacing:1px;color:#fde68a;border:1px solid #6b5320;border-radius:4px;padding:1px 5px;margin-left:6px}
.small-note{font-size:11px;text-transform:none;letter-spacing:0;font-weight:500}
.rules{display:grid;gap:10px;background:#0b0e11;border:1px solid var(--line);border-radius:10px;padding:12px 14px;margin-bottom:6px}
.rules.locked{opacity:.7}
.rule-row{display:grid;grid-template-columns:170px 1fr;gap:10px;align-items:center}
.rule-row>label{font-size:13px;font-weight:600;color:#e3e7eb}
.takeouts{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:6px}
.mini{display:grid;gap:3px}.mini span{font-size:10.5px;color:var(--muted)}
select{font:inherit;font-size:13px;color:#fff;background:#161c23;border:1px solid var(--line-2);border-radius:6px;padding:6px 8px;width:100%;min-width:0}
select:focus-visible{outline:2px solid #fff;outline-offset:1px}
.scenario-list{display:grid;gap:7px;margin:4px 0 12px}
.scenario{display:grid;justify-items:start;justify-content:stretch;text-align:left;gap:2px;padding:10px 12px;background:#0b0e11;width:100%}
.scenario span{font-weight:400;font-size:12.5px;color:var(--muted)}
.scenario.on{border-color:#a1782a;background:#fbbf2414}
.ticket-line.refunded,.ticket-line.part-refund{border-color:#6b5320}.ticket-line.refunded b,.ticket-line.part-refund b{color:#fde68a}
@media(max-width:1180px) and (min-width:861px){.header-link{padding:7px 9px;font-size:12px}}
.event>div:first-child{flex:1;min-width:0}

.contact-lines{display:block;margin-top:3px;font-size:13px}.contact-lines a{color:#fff}
/* v4: phones and short screens scroll like a normal page instead of squeezing into one screen */
@media (max-width:860px), (max-height:540px){
 html,body{height:auto}
 #app{height:auto;min-height:100dvh;display:block;overflow:visible}
 .header{position:sticky;top:0;z-index:8;height:56px;background:#07090b}
 .steps{position:sticky;top:56px;z-index:7;height:42px;background:#0a0d10}
 .workspace{height:auto;padding:8px 8px calc(84px + env(safe-area-inset-bottom))}
 .board{height:auto;overflow:visible;box-shadow:none}
 .rows{overflow:visible;flex:none}
 .table-head{position:sticky;top:98px;z-index:3}
 .driver-row{min-height:56px}
 .footer{position:fixed;left:0;right:0;bottom:0;z-index:9;padding-bottom:calc(8px + env(safe-area-inset-bottom));box-shadow:0 -10px 30px #000a}
 .workspace.show-slip .slip{position:fixed;top:98px;left:8px;right:8px;bottom:calc(72px + env(safe-area-inset-bottom));z-index:6;display:flex}
 .workspace.show-slip .board{visibility:visible}
 .modal-backdrop{z-index:20}
}
@media (max-height:540px) and (min-width:861px){
 .workspace{display:grid;grid-template-columns:minmax(0,1fr) 330px;align-items:start}
 .slip{position:sticky;top:106px;max-height:calc(100dvh - 190px)}
 .table-head{top:98px}
 .event{padding:10px 24px}.event h1{font-size:28px}
}
@media (max-width:860px){ .event{padding:12px 14px}.event h1{font-size:27px}.event .kicker{font-size:9.5px;letter-spacing:1.2px}.header .balance .kicker{font-size:8.5px} }
@media (max-width:380px){ .operator-button{font-size:11px;padding:6px 8px}.brand{width:112px}.balance strong{font-size:17px}.footer-actions button{padding:10px 10px;font-size:12px}.footer p{font-size:11px} }

/* v6: simpler flow */
.mobile-session{display:none}
.tabs{display:flex;gap:4px;background:#0a0d10;border:1px solid var(--line);border-radius:10px;padding:4px;margin-bottom:16px;position:sticky;top:-20px;z-index:2}
.tabs button{flex:1;border:0;background:transparent;padding:9px 6px;font-size:13.5px;color:var(--muted);border-radius:7px}
.tabs button.active{background:#262d36;color:#fff}
.modal-actions.stack{flex-direction:column;align-items:stretch;gap:12px;text-align:center}
.modal-actions.stack .linkish{align-self:center;font-size:14px}
button.big{padding:14px 20px;font-size:16px}
button.block{width:100%;margin-top:10px}
.close-btn{font-size:13px;padding:7px 12px}
.modal-panel:focus{outline:none}
.test-chip{font-size:11px;font-weight:700;color:#fde68a;border:1px solid #6b5320;background:#fbbf2414;border-radius:999px;padding:3px 9px;white-space:nowrap}
.th-help{font-size:10px;font-weight:600;letter-spacing:1px;text-transform:uppercase;color:var(--muted);text-decoration:none}
.th-help:hover{color:#fff}
.ticket-chip{font-size:12px;font-weight:700;color:#fff;background:#262d36;border:1px solid var(--line-2);border-radius:999px;padding:6px 11px;white-space:nowrap}
.placed{border-top:1px solid var(--line);padding-top:10px;display:grid;gap:6px}
.placed-line{display:flex;justify-content:space-between;gap:8px;font-size:12.5px}
.placed-line small{color:var(--muted);margin-left:4px}
.snack{position:fixed;left:50%;bottom:92px;transform:translateX(-50%);z-index:30;background:#14532d;color:#fff;border:1px solid #22c55e66;border-radius:10px;padding:11px 16px;font-size:13.5px;font-weight:600;box-shadow:0 12px 40px #000c;max-width:calc(100vw - 24px);animation:rise .2s ease;text-align:center}
.slip-action .toast{display:none}
.result-word.small{font-size:30px}
.ms-row{display:flex;justify-content:space-between;align-items:flex-end;gap:10px}
.ms-stats{display:flex;gap:14px;text-align:right}
.ms-stats small{display:block;font-size:10px}
.ms-stats b{font-family:var(--display);font-size:20px;font-variant-numeric:tabular-nums}
@media (hover:none){button:hover{background:inherit}button.primary:hover:not(:disabled){background:var(--red);border-color:var(--red)}button.ghost:hover{background:transparent}.driver-row[data-action]:hover{background:inherit}}
@media (max-width:860px), (max-height:540px){
 .mobile-session{display:block;padding:12px 14px;border-bottom:1px solid var(--line);background:#0b0e11}
 .mobile-session .ticket-list{margin-top:10px}
 /* ticket = bottom sheet */
 .workspace .slip{display:none}
 .workspace.show-slip .slip{display:flex;position:fixed;left:0;right:0;top:auto;bottom:0;max-height:82dvh;z-index:12;border-radius:16px 16px 0 0;border:1px solid var(--line-2);border-bottom:0;padding-bottom:env(safe-area-inset-bottom);animation:sheet .22s ease;box-shadow:0 -20px 60px #000}
 .sheet-backdrop{position:fixed;inset:0;background:#000a;z-index:11;animation:fade .15s ease}
 .slip-head .icon{width:40px;height:40px;font-size:17px}
 .slip-note{display:none}
 .footer p{font-size:12px}
 .snack{bottom:calc(84px + env(safe-area-inset-bottom))}
 .modal-backdrop{place-items:stretch;padding:0}
 .modal-panel,.modal-panel.wide{width:100%;max-height:none;height:100dvh;border-radius:0;border:0}
 .modal-head{position:sticky;top:0;background:#10151a;z-index:3}
 .close-btn{font-size:14px;padding:9px 14px;border-color:var(--line-2)}
 .tabs{top:-16px}
 .tabs button{font-size:12.5px;padding:9px 4px}
}
@media (max-height:540px) and (min-width:861px){ .workspace{grid-template-columns:1fr} }
@keyframes sheet{from{transform:translateY(40%);opacity:.4}}
.show-sm{display:none}
.header-help{font-size:13px;color:#cfd5dc}
@media (max-width:860px){.hide-sm{display:none}.show-sm{display:inline}.header-help{display:inline-flex!important;width:38px;height:38px;padding:0;border-radius:50%;font-size:17px;font-weight:700}.header-right{gap:6px}}
.balance .kicker,.operator-button{white-space:nowrap}
@media (max-width:860px){.balance{padding-left:6px;border-left:0}.balance .kicker{font-size:8.5px;letter-spacing:.8px}}
@media (max-width:420px){.balance .kicker{display:none}.balance strong{font-size:18px}}

/* v7: clearer bet choice */
.qual-card{display:flex;gap:14px;align-items:center;margin:0 14px 12px;padding:14px 16px;border:1px solid #7f1d1d;background:linear-gradient(90deg,#dc262618,#dc262605);border-radius:12px}
.qual-icon{font-size:30px;width:52px;height:52px;border-radius:12px;background:#dc262626;display:grid;place-items:center;flex-shrink:0}
.qual-card h3{font-family:var(--display);font-size:24px;text-transform:uppercase;letter-spacing:.3px;margin:2px 0 4px}
.qual-card p{font-size:13.5px;color:#cfd5dc;line-height:1.45}
.bet-picker{padding:0 14px 12px}
.step-label{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:700;letter-spacing:1.2px;text-transform:uppercase;color:#e5e7eb;margin-bottom:8px}
.step-label span{width:20px;height:20px;border-radius:50%;background:var(--red);color:#fff;display:grid;place-items:center;font-size:11px;letter-spacing:0}
.step-label.inline{display:inline-flex;margin:0;font-size:12.5px;letter-spacing:.8px}
.bet-cards{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}
.bet-card{display:grid;justify-items:start;text-align:left;gap:2px;padding:10px 12px;background:#0b0e11;border:1.5px solid var(--line-2);border-radius:10px;min-height:74px}
.bet-card b{font-family:var(--display);font-size:20px;letter-spacing:.3px;text-transform:uppercase;line-height:1}
.bet-card span{font-size:12px;color:#cfd5dc;font-weight:500}
.bet-card small{font-size:10.5px;color:var(--muted);font-weight:500;margin-top:2px;font-variant-numeric:tabular-nums}
.bet-card.active{border-color:var(--red);background:#dc26261f;box-shadow:inset 0 -3px 0 var(--red)}
.bet-card.active b{color:#fff}
.pool-mini{margin-left:10px;color:var(--muted);font-size:11.5px}
.pool-bar{flex-wrap:wrap}
@media(max-width:1180px) and (min-width:861px){.bet-cards{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:860px){
 .qual-card{margin:0 10px 10px;padding:12px}.qual-card h3{font-size:20px}.qual-icon{width:42px;height:42px;font-size:22px}
 .bet-picker{padding:0 0 10px}.bet-picker .step-label{padding:0 12px}
 .bet-cards{display:flex;overflow-x:auto;padding:0 12px 4px;scroll-snap-type:x mandatory;scrollbar-width:none}.bet-cards::-webkit-scrollbar{display:none}
 .bet-card{flex:0 0 132px;scroll-snap-align:start;min-height:70px}
 .bet-card b{font-size:18px}
 .pool-mini{display:block;margin:4px 0 0}
}
/* v8 polish */
.snack{z-index:15}
.modal-content table.left td+td,.modal-content table.left th+th{text-align:left}
.modal-content table.left td:nth-child(n+4),.modal-content table.left th:nth-child(n+4){text-align:right}
.scenario-list{grid-template-columns:repeat(2,minmax(0,1fr))}
.scenario-list .scenario:first-child{grid-column:1/-1}
.scenario{padding:9px 12px}
@media(max-width:860px){.scenario-list{grid-template-columns:1fr}.modal-content table.left{font-size:12px}.modal-content table.left td:nth-child(3),.modal-content table.left th:nth-child(3){display:none}}
.scenario-list.levels{grid-template-columns:repeat(3,minmax(0,1fr))}
.scenario-list.levels .scenario:first-child{grid-column:auto}
.scenario:disabled{opacity:.55;cursor:not-allowed}
@media(max-width:860px){.scenario-list.levels{grid-template-columns:1fr}}
.modal-actions{flex-wrap:wrap}

/* v12: race imagery */
.event.has-photo{--photo:url('/assets/four-wide-1400.jpg');background:linear-gradient(90deg,#07090b 0%,#07090b 30%,#07090bd9 44%,#07090b59 64%,#07090b1a 100%),linear-gradient(0deg,#07090bcc,#07090b00 55%),var(--photo) right 32%/max(62%,760px) auto no-repeat,#0b0d10}
@supports (background-image:image-set(url('a.webp') type('image/webp'))){.event.has-photo{--photo:image-set(url('/assets/four-wide-1400.webp') type('image/webp'),url('/assets/four-wide-1400.jpg') type('image/jpeg'))}}
@media (min-width:1600px){.event.has-photo{--photo:url('/assets/four-wide-2200.jpg')}@supports (background-image:image-set(url('a.webp') type('image/webp'))){.event.has-photo{--photo:image-set(url('/assets/four-wide-2200.webp') type('image/webp'),url('/assets/four-wide-2200.jpg') type('image/jpeg'))}}}
.event>div:first-child{flex:1;min-width:0;position:relative;z-index:1}
.event-meta{display:flex;align-items:center;gap:12px;margin-top:8px;flex-wrap:wrap}
.event-meta p{margin:0}
.explain-chip{font-size:12px;font-weight:600;color:#fff;background:#07090b99;border:1px solid #ffffff33;border-radius:999px;padding:4px 11px;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
.explain-chip:hover{background:#dc262633;border-color:var(--red)}
.hero-photo{margin:0 0 16px;border-radius:12px;overflow:hidden;position:relative;border:1px solid var(--line);background:#0b0d10}
.hero-photo picture{display:block}
.hero-photo img{display:block;width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;object-position:50% 55%}
.hero-photo.small img{aspect-ratio:2/1;object-position:52% 58%}
.hero-photo.strip img{aspect-ratio:2210/794;object-position:50% 50%}
@media (max-width:860px){
 .event.has-photo{--photo:url('/assets/four-wide-800.jpg');background:linear-gradient(90deg,#07090bf2 0%,#07090bd9 42%,#07090b73 100%),linear-gradient(0deg,#07090bb3,#07090b00 60%),var(--photo) 62% 30%/cover no-repeat,#0b0d10}
 @supports (background-image:image-set(url('a.webp') type('image/webp'))){.event.has-photo{--photo:image-set(url('/assets/four-wide-800.webp') type('image/webp'),url('/assets/four-wide-800.jpg') type('image/jpeg'))}}
 .event-meta{gap:8px;margin-top:6px}.explain-chip{font-size:11px;padding:3px 9px}
 .hero-photo{border-radius:10px;margin-bottom:14px}
 .hero-photo.small img{aspect-ratio:16/9}
 .hero-photo.strip img{aspect-ratio:16/7;object-position:45% 50%}
}

/* v12 polish */
.balance strong{white-space:nowrap}
.close-btn{white-space:nowrap;gap:6px}
.tabs button{white-space:nowrap}
.bet-card{justify-content:start;align-content:start}
.combination-preview button{white-space:nowrap;flex-shrink:0}
.board-toggle{display:none}
.ticket-open .count{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 5px;margin-left:2px;border-radius:999px;background:var(--red);color:#fff;font-size:11.5px}
.show-md{display:none}
@media (max-width:1180px) and (min-width:861px){.hide-md{display:none}.show-md{display:inline}}
@media (max-width:860px){.hide-md{display:none}.show-md{display:inline}}
/* Wide screens: line every band up with the 1640px workspace */
@media (min-width:1700px){.header,.event,.steps,.footer{padding-left:calc((100vw - 1640px)/2 + 28px);padding-right:calc((100vw - 1640px)/2 + 28px)}}
/* Phones and small tablets */
@media (max-width:860px){
 .board-head h2 span{display:none}
 .board-head{align-items:center}
 .board-toggle{display:flex;margin:10px 12px 0}
 .board-toggle button{font-size:12.5px;padding:8px 6px}
 .table-head,.driver-row{grid-template-columns:38px 50px minmax(0,1fr) 104px}
 .table-head{letter-spacing:.2px}
 .your-pick{display:block;width:max-content;margin:3px 0 0;font-size:8.5px}
 .modal-actions:not(.stack){flex-direction:column-reverse;align-items:stretch}
 .modal-actions:not(.stack) button{width:100%;padding:12px}
 .close-btn{width:40px;height:40px;padding:0;font-size:16px;border-radius:50%}
 .modal-head h2{font-size:21px;line-height:1.05}
 .tabs button{font-size:12px;padding:9px 2px}
 .footer-actions .ticket-open{padding:10px 12px}
}
@media (max-width:520px){
 .table-head,.driver-row{grid-template-columns:36px 48px minmax(0,1fr) 92px}.quote-button{width:92px}
 .timing>div:first-child:not(:only-child){display:none}
 .pool-table td:nth-child(5),.pool-table th:nth-child(5){display:none}
}
/* Touch: comfortable tap targets */
@media (pointer:coarse),(max-width:860px),(max-height:540px){
 button.small{min-height:36px;padding:7px 12px;font-size:12.5px}
 .explain-chip{min-height:32px;padding:6px 12px}
 .pick{min-height:34px}
 .th-help{padding:8px 0;margin:-8px 0}
 select{min-height:38px}
 .speed button{min-width:44px}
}
/* Phone held sideways: keep the field in view */
@media (max-height:540px){
 .event{padding:8px 16px}.event .kicker,.event-meta{display:none}.event h1{font-size:22px}
}
@media (max-width:440px){
 .header{padding:0 10px;gap:6px}.brand{width:116px}.header-right{gap:6px}
 .header-help{width:36px!important;height:36px!important}
 .operator-button{min-height:36px;padding:6px 9px;font-size:12px}
 .balance{padding-left:2px}.balance strong{font-size:18px}.balance strong small{font-size:11px}
}
@media (max-width:370px){.brand{width:100px}.operator-button .dot{display:none}.operator-button{padding:6px 8px}}

/* v13: tote board */
#app{grid-template-rows:62px 130px 46px minmax(0,1fr) 68px}
.event{padding:12px 28px}
.tote{--led:#ffb627;--led-glow:#ff9f0a80;display:flex;align-items:stretch;flex-shrink:0;position:relative;z-index:1;border-radius:12px;overflow:hidden;
 background:radial-gradient(circle at 1px 1px,#ffffff0b 1px,transparent 1.4px) 0 0/4px 4px,linear-gradient(180deg,#0d1014f5,#050607f7);
 border:1px solid #2e353e;box-shadow:inset 0 1px 0 #ffffff10,0 0 0 3px #07090bcc,0 16px 40px #000d}
.tote-mob{display:none}
.tote-clock{display:grid;place-content:center;justify-items:center;gap:3px;min-width:96px;padding:8px 12px;background:linear-gradient(180deg,#0b0d10,#060708);border-right:1px solid #2e353e;text-align:center}
.tote-clock small{font-size:8.5px;letter-spacing:1.4px;text-transform:uppercase;color:#8b95a1;font-weight:700;white-space:nowrap}
.tote-clock b{font-family:var(--display);font-weight:800;font-size:44px;line-height:.9;color:#ff3b30;text-shadow:0 0 12px #ff3b30aa,0 0 2px #ffb4ae;font-variant-numeric:tabular-nums}
.tote-clock.post b{font-size:28px;animation:ledBlink 1.1s steps(2,start) infinite}
.tote-clock.off b{font-size:34px;color:#4ade80;text-shadow:0 0 12px #4ade80aa}
.tote-clock.inq b{font-size:19px;color:#fbbf24;text-shadow:0 0 10px #fbbf24aa;letter-spacing:.5px}
.tote-clock.final b{font-size:20px;color:#4ade80;text-shadow:0 0 10px #4ade80aa;letter-spacing:.5px}
@keyframes ledBlink{to{opacity:.25}}
.tote-main{display:flex;flex-direction:column;justify-content:center;gap:5px;padding:7px 10px 8px;min-width:0}
.tote-top{display:flex;justify-content:space-between;gap:14px;font-size:8.5px;letter-spacing:1.5px;text-transform:uppercase;font-weight:700;color:#8b95a1;white-space:nowrap}
.tote-top span:first-child{color:#ef4444}
.tote-cells{display:grid;grid-template-columns:repeat(var(--cols),minmax(0,1fr));row-gap:3px}
.tc{position:relative;display:grid;justify-items:center;align-content:start;gap:4px;padding:2px 4px 3px;min-width:54px;border-left:1px solid #ffffff10}
.tc:first-child{border-left:0}
.tc-n{font-family:var(--display);font-weight:800;font-size:12.5px;line-height:1;padding:2px 5px 1px;border-radius:3px;background:var(--bg);color:var(--fg);min-width:26px;text-align:center;letter-spacing:-.2px;box-shadow:inset 0 -1px 0 #0003}
.tc-o{font-family:var(--display);font-weight:700;font-size:25px;line-height:1;color:var(--led);text-shadow:0 0 9px var(--led-glow),0 0 1px #ffe2a8;font-variant-numeric:tabular-nums;white-space:nowrap}
.tc.fav::after{content:'';position:absolute;left:28%;right:28%;bottom:-2px;height:2px;border-radius:2px;background:var(--led);box-shadow:0 0 8px var(--led)}
.tc.scr .tc-o{color:#5b6470;text-shadow:none;font-size:15px;padding-top:5px}
.tc.scr .tc-n{opacity:.4}
.tc.chg .tc-o{animation:ledFlash 1.6s ease-out}
@keyframes ledFlash{0%,18%{color:#fff;text-shadow:0 0 16px #fff,0 0 4px #fff}}
.tc-arrow{position:absolute;top:0;right:2px;font-style:normal;font-size:8px;line-height:1}
.tc.down .tc-arrow{color:#4ade80}.tc.up .tc-arrow{color:#f87171}
.rows-2 .tc{min-width:36px;gap:2px;padding:1px 2px 2px}
.rows-2 .tc-o{font-size:17px}
.rows-2 .tc-n{font-size:10px;padding:1px 3px 0;min-width:20px}
.rows-2 .tc-arrow{font-size:6.5px}
.tote-pools{display:flex;gap:13px;font-variant-numeric:tabular-nums;border-top:1px solid #ffffff14;padding-top:5px;white-space:nowrap}
.tote-pools span{display:flex;gap:4px;align-items:baseline}
.tote-pools small{font-size:8.5px;letter-spacing:1.2px;text-transform:uppercase;color:#8b95a1;font-weight:700}
.tote-pools b{font-family:var(--display);font-size:13.5px;color:var(--led);font-weight:700;text-shadow:0 0 6px var(--led-glow)}
.tote-pools .tot{margin-left:auto}.tote-pools .tot b{color:#fff;text-shadow:none}
.tote-desk:has(.rows-2) .tote-top{display:none}
.quote-button.bump b,[data-slip].bump{animation:ledFlash 1.2s ease-out}
.quote-button.bump{animation:bumpBorder 1.2s ease-out}
@keyframes bumpBorder{0%,20%{border-color:#ffb62799}}
/* Laptops / small desktops */
@media (max-width:1280px) and (min-width:861px){
 .event h1{font-size:32px}.event .kicker{font-size:10px}
 .tc{min-width:42px}.tc-o{font-size:21px}.tote-clock{min-width:80px;padding:8px 10px}.tote-clock b{font-size:36px}
 .rows-2 .tc{min-width:30px}.rows-2 .tc-o{font-size:14.5px}.tote-pools{gap:9px}
}
@media (max-width:1060px) and (min-width:861px){.event h1{font-size:28px}.explain-chip{display:none}}
/* Short laptop screens */
@media (max-height:780px) and (min-width:861px){
 #app{grid-template-rows:54px 108px 38px minmax(0,1fr) 60px}
 .event{padding:8px 24px}.tote-top{display:none}.tote-main{gap:4px;padding:6px 10px}
 .tote-clock b{font-size:34px}.tc-o{font-size:21px}.rows-2 .tc-o{font-size:14px}.rows-2 .tc{gap:1px}
}
/* Phones, tablets and phones held sideways: the tote sits on top of the field */
@media (max-width:860px),(max-height:540px){
 .tote-desk{display:none}
 .tote-mob{display:flex;margin:0 12px 12px;border-radius:10px;box-shadow:inset 0 1px 0 #ffffff10}
 .tote-mob .tote-clock{min-width:70px;padding:6px 8px}.tote-mob .tote-clock b{font-size:34px}
 .tote-mob .tote-clock.post b{font-size:22px}.tote-mob .tote-clock.off b{font-size:26px}.tote-mob .tote-clock.inq b,.tote-mob .tote-clock.final b{font-size:15px}
 .tote-mob .tote-main{overflow-x:auto;scrollbar-width:none;padding:6px 8px 7px;flex:1}
 .tote-mob .tote-main::-webkit-scrollbar{display:none}
 .tote-mob .tc{min-width:30px;padding:2px 1px 3px}.tote-mob .tc-o{font-size:18px}
 .tote-mob .rows-2 .tc{min-width:34px}.tote-mob .rows-2 .tc-o{font-size:15px}
 .tote-mob .tote-cells,.tote-mob .tote-pools,.tote-mob .tote-top{min-width:max-content}
 .tote-mob .tote-cells{grid-template-columns:repeat(var(--cols),minmax(30px,1fr))}
 .tote-mob .tote-pools{gap:10px}.tote-mob .tote-pools .tot{margin-left:0}
}
@media (prefers-reduced-motion:reduce){.tote-clock.post b{animation:none}}

.cl-short{display:none}
.event{padding:9px 28px}
@media (max-width:1180px) and (min-width:861px){.event .kicker{display:none}.event h1{font-size:27px;line-height:.95}.event h1 .red{display:block}.event-meta{margin-top:6px}}
@media (max-height:780px) and (min-width:861px){
 .event{padding:6px 24px}.event .kicker{display:none}
 .rows-2 .tc-n{font-size:9px}.rows-2 .tc-o{font-size:13.5px}.rows-2 .tc{padding:0 2px 1px}.tote-cells{row-gap:1px}.tote-pools{padding-top:3px}
}
@media (max-width:860px),(max-height:540px){
 .cl-long{display:none}.cl-short{display:inline}
 .tote-mob .tote-clock{min-width:58px;padding:6px 6px}
 .tote-mob .tote-clock small{font-size:9px;letter-spacing:1.6px}
 .tote-mob .tote-top span:last-child{display:none}
 .tote-mob .tote-pools{min-width:0;flex-wrap:wrap;row-gap:2px;gap:4px 10px}
 .tote-mob .tote-top{min-width:0}
 .tote-mob .tote-main{overflow:hidden}
 .tote-mob .tote-cells{overflow-x:auto;scrollbar-width:none;min-width:0;padding-bottom:3px}
 .tote-mob .tote-cells::-webkit-scrollbar{display:none}
}

@media (max-width:380px){.hide-xs{display:none}}

/* v14: paged tote board — always one row */
.tc.empty{border-left:1px solid #ffffff10}
.tote-page{display:inline-flex;align-items:center;gap:8px;color:#cfd5dc}
.tote-page .dots{display:inline-flex;gap:4px}
.tote-page .dots b{width:5px;height:5px;border-radius:50%;background:#ffffff2e}
.tote-page .dots b.on{background:var(--led);box-shadow:0 0 6px var(--led)}
.tote-cells.flip .tc{animation:toteFlip .45s cubic-bezier(.2,.7,.2,1) both}
.tote-cells.flip .tc:nth-child(2n){animation-delay:.03s}.tote-cells.flip .tc:nth-child(3n){animation-delay:.06s}
@keyframes toteFlip{from{opacity:0;transform:translateY(-6px) rotateX(55deg)}}
.tote-cells{perspective:400px}
.tote-desk{min-width:540px}
.tote-desk .tote-main{flex:1}
.tote-desk .tc{min-width:50px}
@media (max-width:1280px) and (min-width:861px){.tote-desk{min-width:0}.tote-desk .tc{min-width:40px}}
@media (max-width:860px),(max-height:540px){
 .tote-mob .tote-cells{overflow:visible;grid-template-columns:repeat(var(--cols),minmax(0,1fr))}
 .tote-mob .tc{min-width:0}
 .tote-mob .tote-page{gap:6px}
}
@media (prefers-reduced-motion:reduce){.tote-cells.flip .tc{animation:none}}

/* v14 layout polish */
.qual-card{padding:10px 14px;gap:12px;margin-bottom:10px}
.qual-icon{width:40px;height:40px;font-size:21px;border-radius:10px}
.qual-card h3{font-size:20px;margin:1px 0 2px}
.qual-card p{font-size:13px}
.hero-photo{background:radial-gradient(120% 90% at 50% 30%,#1b2029,#0b0d10)}
.tote-pools .pg{display:none;margin-left:auto;align-items:center;gap:6px;font-size:9px;font-weight:700;letter-spacing:1px;color:#cfd5dc}
.tote-pools .pg .dots{display:inline-flex;gap:3px}.tote-pools .pg .dots b{width:5px;height:5px;border-radius:50%;background:#ffffff2e}.tote-pools .pg .dots b.on{background:var(--led);box-shadow:0 0 6px var(--led)}
@media (max-height:780px) and (min-width:861px){.tote-pools .pg{display:inline-flex}}
@media (max-width:860px),(max-height:540px){.tote-pools .pg{display:inline-flex}.tote-mob .tote-pools .tot{margin-left:0}}
.quote-button small{white-space:nowrap}
@media (max-width:520px){.quote-button b{font-size:12.5px;white-space:nowrap}.quote-button small{font-size:9px;letter-spacing:-.1px}.table-head,.driver-row{grid-template-columns:34px 46px minmax(0,1fr) 100px}.quote-button{width:100px}}
@media (max-width:860px),(max-height:540px){
 .qual-card{margin:0 12px 10px;padding:9px 11px;gap:10px}
 .qual-card p{display:none}
 .qual-card h3{font-size:17px;margin:0}
 .qual-card .kicker{font-size:9.5px}
 .qual-icon{width:34px;height:34px;font-size:18px}
 .tote-mob{margin-bottom:10px}
}

/* v15: tote lives in the right column; colors follow the SpeedStakes system (white, brand red, green) */
#app{grid-template-rows:62px 118px 46px minmax(0,1fr) 68px}
.event{padding:14px 28px}
.side{display:flex;flex-direction:column;gap:12px;min-height:0}
.side .slip{flex:1;min-height:0}
.tote{--led:#f8fafc;--led-glow:#ffffff40;--hot:#ef4444;--hot-glow:#ef444480;
 background:radial-gradient(circle at 1px 1px,#ffffff08 1px,transparent 1.4px) 0 0/4px 4px,var(--panel);
 border:1px solid var(--line);border-top:3px solid var(--red);border-radius:var(--radius);box-shadow:0 20px 50px #0006}
.tote-clock b{color:var(--hot);text-shadow:0 0 12px var(--hot-glow)}
.tote-clock.post b{color:var(--hot)}
.tote-clock.off b,.tote-clock.final b{color:var(--green);text-shadow:0 0 10px #4ade8066}
.tote-clock.inq b{color:#fbbf24;text-shadow:0 0 10px #fbbf2455}
.tote-top span:first-child{color:var(--red-2)}
.tc-o{color:var(--led);text-shadow:0 0 8px var(--led-glow)}
.tc.fav .tc-o{color:var(--hot);text-shadow:0 0 10px var(--hot-glow)}
.tc.fav::after{background:var(--hot);box-shadow:0 0 8px var(--hot)}
.tc-n{background:none;padding:0;min-width:0;box-shadow:none;border-radius:0;display:flex;justify-content:center;height:24px;align-items:center}
.tc-n .plate{min-width:0}.tc-n .plate b{font-size:20px}.tc-n .plate small{font-size:10px}
.tote-pools b{color:#fff;text-shadow:none}
.tote-pools small{color:var(--muted)}
.tote-pools .tot b{color:var(--green)}
.tote-page .dots b.on,.tote-pools .pg .dots b.on{background:var(--red);box-shadow:0 0 6px var(--red)}
@keyframes ledFlash{0%,18%{color:#fff;text-shadow:0 0 16px #fff,0 0 4px #fff}}
@keyframes bumpBorder{0%,20%{border-color:#ef444499}}

/* Desktop side panel layout: clock bar on top, one row of 8 cars, pools grid */
.tote-desk{display:flex;flex-direction:column;min-width:0;flex-shrink:0}
.tote-desk .tote-clock{flex-direction:row;display:flex;justify-content:space-between;align-items:center;min-width:0;padding:8px 14px;border-right:0;border-bottom:1px solid var(--line);background:#0b0e12}
.tote-desk .tote-clock small{font-size:10px}
.tote-desk .tote-clock b{font-size:30px}
.tote-desk .tote-clock.post b{font-size:24px}.tote-desk .tote-clock.off b{font-size:24px}
.tote-desk .tote-clock.inq b,.tote-desk .tote-clock.final b{font-size:18px}
.tote-desk .tote-main{padding:8px 12px 10px;gap:7px}
.tote-desk .tote-top{font-size:9px}
.tote-desk .tote-cells{grid-template-columns:repeat(8,minmax(0,1fr))}
.tote-desk .tc{min-width:0;padding:2px 0 4px;gap:3px}
.tote-desk .tc-o{font-size:22px}
.tote-desk .tote-pools{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px 10px;white-space:nowrap}
.tote-desk .tote-pools span{justify-content:space-between}
.tote-desk .tote-pools .tot{margin-left:0;grid-column:1/-1;border-top:1px solid #ffffff10;padding-top:4px}
.tote-desk .tote-pools .pg{display:none}
.tote-desk .tote-top{display:flex}
@media (max-width:1180px) and (min-width:861px){.tote-desk .tc-o{font-size:19px}.tote-desk .tc-n .plate b{font-size:17px}.tote-desk .tote-pools{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-height:780px) and (min-width:861px){
 #app{grid-template-rows:54px 92px 38px minmax(0,1fr) 60px}
 .event{padding:8px 24px}.side{gap:8px}
 .tote-desk .tote-clock{padding:5px 12px}.tote-desk .tote-clock b{font-size:24px}
 .tote-desk .tote-main{padding:6px 10px 7px;gap:5px}.tote-desk .tc-o{font-size:18px}.tote-desk .tc-n{height:20px}.tote-desk .tc-n .plate b{font-size:16px}
 .tote-desk .tote-pools{grid-template-columns:repeat(4,minmax(0,1fr))}.tote-desk .tote-pools small{font-size:8px}.tote-desk .tote-pools b{font-size:12px}
}
/* Header photo is fully visible again on desktop */
.event.has-photo{background:linear-gradient(90deg,#07090b 0%,#07090bee 26%,#07090b99 42%,#07090b26 62%,#07090b00 100%),linear-gradient(0deg,#07090b99,#07090b00 45%),var(--photo) right 34%/max(66%,820px) auto no-repeat,#0b0d10}
@media (max-width:860px),(max-height:540px){
 .side{display:contents}
 .tote-mob .tc-n{height:20px}.tote-mob .tc-n .plate b{font-size:16px}.tote-mob .tc-n .plate small{font-size:8px}
}
/* v15 compact side tote + always-visible Place button */
.tote-desk .tote-clock{padding:6px 12px}
.tote-desk .tote-clock b{font-size:24px}
.tote-desk .tote-main{padding:7px 12px 8px;gap:6px}
.tote-desk .tote-pools{grid-template-columns:repeat(4,minmax(0,1fr));gap:3px 14px;padding-top:6px}
.tote-desk .tote-pools span{justify-content:space-between;gap:6px}
.tote-desk .tote-pools small{font-size:8.5px}
.tote-desk .tote-pools b{font-size:12.5px}
.tote-desk .tote-pools .tot{grid-column:auto;border-top:0;padding-top:0}
@media (max-width:1180px) and (min-width:861px){.tote-desk .tote-pools{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (min-width:861px) and (min-height:541px){
 .slip-body{padding-bottom:0}
 .slip-action{position:sticky;bottom:0;z-index:2;background:linear-gradient(#0f131700,var(--panel) 14px);padding:14px 0 14px;margin-top:auto}
}
@media (max-height:900px) and (min-width:861px){.slip-body>.slip-note,.slip-body .slip-note:not(.slip-action .slip-note){display:none}}
@media (max-height:800px) and (min-width:861px){
 .tote-desk .tote-top{display:none}
 .tote-desk .tote-pools{grid-template-columns:repeat(4,minmax(0,1fr));gap:2px 10px}
 .tote-desk .tote-pools small{font-size:8px;letter-spacing:.6px}.tote-desk .tote-pools b{font-size:11.5px}
 .tote-desk .tote-clock{padding:4px 12px}.tote-desk .tote-clock b{font-size:21px}
 .slip-body{gap:9px}.slip-title h2{font-size:24px}.slip-sub{display:none}.selection{min-height:36px;padding:4px 7px}
 .stake-row button{padding:6px}.totals{gap:4px;padding-top:8px}
}
@media (max-height:800px) and (min-width:861px){.tote-desk .tote-pools .pg{display:inline-flex;grid-column:1/-1;justify-content:flex-end;margin:0}}
@media (max-width:860px),(max-height:540px){.tote-desk{display:none!important}}
/* ---- Consumer game (speedstakes.app) ---- */
.series-switch{display:inline-flex;gap:3px;background:#07090bcc;border:1px solid #ffffff33;border-radius:999px;padding:3px;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
.series-switch button{border:0;background:transparent;border-radius:999px;padding:4px 12px;font-size:12px;font-weight:700;color:#cfd5dc;min-height:0}
.series-switch button.on{background:var(--red);color:#fff}
.series-switch button:not(.on):hover{background:#ffffff14}
.event-meta{display:flex;align-items:center;flex-wrap:wrap}
.series-pick{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:0 0 14px}
.series-pick button{display:grid;justify-items:start;text-align:left;gap:3px;padding:12px 14px;background:#0b0e11}
.series-pick button b{font-family:var(--display);font-size:20px;letter-spacing:.3px;line-height:1}
.series-pick button span{font-size:12px;color:var(--muted);font-weight:500}
.series-pick button.on{border-color:var(--red);background:#dc262614;box-shadow:inset 0 0 0 1px var(--red)}
.inline-form{display:grid;gap:7px;margin:4px 0 14px;padding:12px 14px;border:1px solid var(--line-2);border-radius:10px;background:#0b0e11}
.inline-form label{font-weight:700;font-size:14px}
.inline-form>div{display:flex;gap:8px}
.inline-form input{flex:1;min-width:0;background:#07090b;color:var(--text);border:1px solid var(--line-2);border-radius:7px;padding:9px 12px;font-size:16px}
.inline-form input:focus{outline:2px solid #fff;outline-offset:1px}
.inline-form small{color:var(--muted);font-size:12px}
.form-msg{color:#fca5a5;font-size:13px;margin:0}
.posted{margin:4px 0 14px;padding:10px 14px;border:1px solid #166534;background:#4ade8012;border-radius:10px}
.share-row{justify-content:flex-start;margin:0 0 14px}
.share-row .button{padding:9px 14px}
table.lb td:first-child{width:36px;color:var(--muted);font-weight:700}
table.lb tr.me td{color:#fff;background:#dc26261c}
.field-table td:first-child{width:64px}
.field-table .plate{transform:scale(.85);transform-origin:left center}
@media(max-width:860px){.series-pick{grid-template-columns:1fr}.series-switch button{padding:4px 10px;font-size:11.5px}.share-row .button,.share-row button{flex:1}}
@media(max-height:540px),(max-width:860px){.event .event-meta{display:flex}}
table.lb th:nth-child(2),table.lb td:nth-child(2){text-align:left}
