@media (max-width:900px) {
  #app{min-height:0;height:100dvh;overflow:hidden}
  .topbar,#app[data-screen="race"] .topbar,#app[data-screen="result"] .topbar{height:146px;padding:0 14px;gap:0;align-items:flex-start;flex-wrap:nowrap}
  .brand,#app[data-screen="race"] .brand,#app[data-screen="result"] .brand{top:-7px;left:50%;transform:translateX(-50%);width:330px;height:103px}
  .brand img{width:82%;height:80px}
  .garage-nav{position:absolute;top:94px;left:16px;height:44px;gap:7px}
  .garage-nav button{height:44px;min-width:105px;border-width:12px;font-size:13px;letter-spacing:.4px;padding:0 3px}
  .garage-nav button span{font-size:8px;margin-right:4px}
  .top-actions{position:absolute;right:15px;top:87px;height:55px;gap:5px;margin:0}
  .wallet{height:57px;min-width:148px;border-width:13px;padding:0 3px 0 0;gap:4px}
  .wallet .coin-symbol{width:32px;height:33px}
  .wallet small{font-size:7px;letter-spacing:.5px}
  .wallet strong{font-size:22px}
  .credit-label{font-size:8px;margin-top:9px}
  .icon-button{width:39px;height:43px;border-width:10px;font-size:20px}
  .race-header{display:none!important}
  #illustrated-stage{background-position:50% 50%}
  .setup-screen{inset:150px 16px 120px;overflow:auto;scrollbar-width:thin;scrollbar-color:#1685bd #041222;overscroll-behavior:contain}
  #garage-screen{display:grid;grid-template-columns:minmax(0,1fr) minmax(230px,.7fr);grid-template-rows:110px minmax(230px,1fr) 151px;gap:10px}
  .garage-intro{display:none}
  .vehicle-details{position:relative;grid-column:1;grid-row:1;inset:auto;width:auto;max-width:none;min-height:0;border-width:19px;padding:0 6px;align-self:stretch}
  .vehicle-details .eyebrow{font-size:8px;letter-spacing:1px;gap:6px}
  .vehicle-details .small-line{width:16px}
  #vehicle-name{font-size:43px;margin:7px 0 4px;line-height:.9}
  #vehicle-tagline{font-size:11px;line-height:1.25;margin:0;max-width:none;display:block}
  .showroom-hero{position:relative;inset:auto;grid-column:1;grid-row:2;min-height:0;overflow:visible}
  .showroom-hero img{height:100%;width:115%;max-width:none;object-fit:contain;margin-left:-4%}
  .vehicle-specs{position:relative;grid-column:2;grid-row:2;inset:auto;width:auto;max-width:none;padding:4px 6px;border-width:20px;align-self:center}
  .vehicle-specs>.panel-title{font-size:9px;margin-bottom:14px}
  .vehicle-specs>.panel-title span{font-size:7px}
  #vehicle-stats,.vehicle-stats{display:grid;grid-template-columns:1fr;gap:14px;width:100%}
  .stat-row{gap:6px}
  .stat-row small{font-size:10px;width:55px;letter-spacing:.3px}
  .stat-bar{gap:2px;min-width:0}
  .stat-bar i{height:11px;min-width:0;max-width:12px}
  .stat-row b{font-size:16px;min-width:33px}
  .stat-row b span{font-size:10px}
  .livery-row{display:flex;margin-top:15px;padding-top:10px;gap:8px}
  .livery-row small{font-size:7px;letter-spacing:.5px}
  #vehicle-color{width:24px;height:16px}
  .circuit-preview{position:relative;grid-column:2;grid-row:1;inset:auto;width:auto;max-width:none}
  .circuit-art{height:88px;border-width:15px}
  .tile-index{font-size:6px;left:5px;right:5px;top:3px;letter-spacing:.5px}
  .tile-index b{font-size:13px}
  .tile-caption{left:6px;bottom:2px}
  .tile-caption small{font-size:6px;letter-spacing:1px}
  .tile-caption strong{font-size:24px}
  .track-specs{padding:2px 7px;gap:8px}
  .track-specs small{display:none}
  .track-specs b{font-size:8px;letter-spacing:.3px}
  .vehicle-shelf{position:relative;grid-column:1/-1;grid-row:3;inset:auto;min-width:0}
  .shelf-label{font-size:10px;letter-spacing:1px;margin:6px 5px 7px}
  .shelf-label small{font-size:7px;letter-spacing:.4px}
  .vehicle-grid{grid-template-columns:repeat(7,minmax(98px,1fr));gap:5px;overflow-x:auto;overflow-y:hidden;padding:6px 2px 9px;scroll-snap-type:x proximity;scrollbar-width:thin;scrollbar-color:#258bc1 #041222}
  .vehicle-card,.vehicle-card.active{height:111px;border-width:15px;min-width:0;scroll-snap-align:start;transform:none}
  .vehicle-card img{inset:-8px -7px 13px;width:calc(100% + 14px);height:calc(100% - 1px)}
  .vehicle-card strong{font-size:14px;bottom:-4px}
  .vehicle-card .car-id{display:none}
  .setup-footer{height:114px;gap:15px;padding:8px 20px;justify-content:flex-end;background:linear-gradient(transparent,#010918cc 35%);overflow:visible}
  .footer-meta{display:none}
  .bet-control{width:232px;flex:0 0 232px;border-width:18px;padding:0 5px}
  .bet-control label{font-size:9px;margin-bottom:5px;letter-spacing:.5px}
  .bet-control label small{font-size:7px}
  .bet-control>div{height:35px;gap:5px}
  .bet-control button{width:34px;height:36px;border-width:10px;font-size:27px}
  .bet-control input{width:80px;font-size:28px}
  .race-button{min-width:260px;height:91px;font-size:29px;padding:0 29px;gap:15px;flex:0 1 auto}
  .race-button b{font-size:26px}
  #tracks-screen{display:grid;grid-template-rows:39px minmax(250px,1fr) 155px 38px;gap:9px}
  .track-heading{position:relative;inset:auto;margin:0;grid-row:1;align-self:center}
  .track-heading h1{font-size:26px;letter-spacing:3px;max-width:none;line-height:1;margin:0}
  .track-feature{position:relative;inset:auto;grid-row:2;border-width:20px;min-height:0}
  .track-feature-image{right:28%;background-size:100% 500%}
  .track-feature-title{padding:14px 16px;max-width:72%;width:72%}
  .track-feature-title small{font-size:9px;letter-spacing:1.5px}
  .track-feature-title h2{font-size:34px;margin-top:5px}
  .track-feature-details{inset:-3px -3px -3px auto;width:29%;border-width:14px;padding:3px 5px;gap:6px}
  .track-feature-details svg{min-height:60px;height:42%}
  .track-feature-details>div{font-size:11px;padding-top:6px;letter-spacing:.5px}
  .track-feature-details strong{font-size:24px}
  #track-weather,#track-risk{font-size:10px}
  .track-grid{position:relative;inset:auto;grid-row:3;grid-template-columns:repeat(5,minmax(132px,1fr));gap:6px;overflow-x:auto;overflow-y:hidden;padding:6px 2px 8px;scroll-snap-type:x proximity;scrollbar-width:thin;scrollbar-color:#258bc1 #041222}
  .track-card,.track-card.active{height:137px;min-height:0;border-width:15px;scroll-snap-align:start}
  .track-card .track-number{font-size:6px;letter-spacing:.4px;top:3px;left:4px}
  .track-card.active .track-number:after{font-size:5px;margin-left:4px}
  .track-card .track-copy{left:3px;right:3px;bottom:0}
  .track-card strong{font-size:21px}
  .track-disclosure{position:relative;inset:auto;grid-row:4;font-size:9px;line-height:1.5;padding:0 4px;margin:0}
  .track-disclosure>span{font-size:9px;display:block;margin:0;letter-spacing:1px}
  #race-screen{inset:147px 13px 12px}
  .leaderboard{top:0;width:176px;border-width:17px;padding:3px}
  .leaderboard .panel-title{font-size:8px;letter-spacing:.5px}
  .standing{height:31px;gap:4px;padding:0 2px;font-size:10px}
  .standing>strong{width:14px;font-size:18px}
  .standing img{width:46px;height:28px}
  .standing span{letter-spacing:.4px}
  .standing small{display:none}
  .telemetry{top:0;width:165px}
  .mini-map{display:block;height:143px;border-width:16px;padding:0}
  .mini-map svg{height:93px;width:100%}
  .mini-map small{font-size:8px;letter-spacing:1px}
  .speedometer{height:112px;margin-top:6px;border-width:16px;padding:9px 0 0 39px}
  .speedometer:before{width:54px;height:60px;left:-8px;top:2px}
  .speedometer>span{font-size:37px}
  .speedometer>small{font-size:9px;letter-spacing:2px}
  .speedometer>div{font-size:7px;gap:4px;margin-top:4px}
  .speedometer b{font-size:13px}
  .race-top-center{top:0;width:180px;border-width:15px;padding:3px 8px}
  .race-top-center .eyebrow{font-size:7px;letter-spacing:.7px}
  .lap-display{font-size:12px;letter-spacing:2px;margin-top:4px}
  .lap-display b{font-size:28px}
  .lap-display>span{font-size:11px}
  .race-progress{margin-top:7px}
  .race-bottom{bottom:45px;grid-template-columns:1fr 1fr;gap:7px;align-items:stretch}
  .health-panel{grid-column:1;grid-row:1;max-width:none;border-width:17px;padding:0 6px 2px;min-height:103px}
  .health-panel>img{height:42px;margin:-10px auto -3px;width:120px}
  .health-title>span{font-size:10px;letter-spacing:.4px}
  .health-title strong{font-size:22px}
  .health-title small{font-size:11px}
  .health-track{height:6px;margin:5px 0 3px}
  #health-state{font-size:7px;letter-spacing:.6px}
  .collection-panel{grid-column:2;grid-row:1;border-width:17px;padding:2px 10px 0;min-height:103px}
  .collection-coins{width:70px;height:71px;top:-6px;left:1px}
  .collection-panel>small{font-size:8px;letter-spacing:.7px}
  .collection-panel strong{font-size:42px;line-height:1;margin-top:4px}
  .collection-panel em{font-size:25px}
  #coin-trail{gap:4px;margin-top:5px;height:12px}
  #coin-trail span{font-size:8px}
  .power-panel{grid-column:1/-1;grid-row:2;border-width:17px;padding:0 3px 2px}
  .power-panel .panel-title{font-size:9px;margin-bottom:4px}
  .power-panel .panel-title span{display:block;font-size:7px}
  #power-grid{gap:4px}
  .power-icon{height:67px}
  .power-icon>.power-art{height:52px;width:52px;max-width:100%;margin:auto}
  .power-icon small{font-size:9px;letter-spacing:.3px;margin-top:2px}
  .race-toolbar{gap:8px}
  .small-button{height:37px;border-width:11px;padding:0 7px;font-size:9px;letter-spacing:.6px}
  .race-toolbar>span{font-size:7px;letter-spacing:.5px}
  .race-toolbar b{font-size:8px;margin-left:7px}
  #race-announcement{top:39%;font-size:27px;letter-spacing:1px;max-width:96%;white-space:normal;width:max-content}
  #race-announcement small{font-size:9px;letter-spacing:1px}
  #countdown{top:40%;font-size:95px}
  #pause-overlay,#result-screen{inset:145px 0 0;overflow-y:auto;overscroll-behavior:contain;padding:15px 0}
  #pause-overlay>div{width:min(570px,94vw);max-width:94vw;border-width:30px;padding:12px 15px 20px}
  #pause-overlay h2{font-size:33px;margin:14px 0}
  #pause-overlay p{font-size:12px}
  #pause-overlay .race-button{min-width:240px;font-size:24px;height:78px}
  .result-card{width:min(660px,94vw);border-width:29px;padding:12px 16px;align-self:center}
  .result-card h2{font-size:33px}
  #result-position{position:static;font-size:76px;line-height:1.1}
  .result-card>p{font-size:12px;margin:8px 0 14px}
  .result-calculation{gap:12px;padding:10px 0}
  .result-calculation small{font-size:8px;letter-spacing:.5px}
  .result-calculation b{font-size:24px}
  .result-payout{min-width:210px;padding:0 50px;margin:13px auto}
  .result-payout:before{width:73px;height:73px;left:-9px;top:-5px}
  .result-payout strong{font-size:37px}
  .result-actions{gap:10px}
  .result-actions .race-button{min-width:230px;font-size:24px;height:74px;padding:0 20px}
  .result-actions .race-button b{font-size:23px}
  .result-actions .secondary-button{font-size:14px;padding:4px 15px;border-width:16px}
  .result-card>small{font-size:8px;line-height:1.4;overflow-wrap:anywhere}
  dialog{width:min(720px,96vw);max-height:94dvh;border-width:27px;padding:8px 10px 15px}
  .modal-header{position:sticky;top:-8px;background:#030c19;z-index:2;padding-bottom:9px;gap:10px}
  .modal-header .eyebrow{font-size:9px;letter-spacing:1px}
  .modal-header .icon-button{flex-shrink:0;width:39px;height:42px}
  dialog h2{font-size:32px;margin:17px 0 13px}
  dialog p,dialog .intro{font-size:13px;line-height:1.55}
  dialog h3{font-size:15px;margin-top:22px}
  .rules-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .rule-power{border-width:14px;padding:0 2px 4px}
  .rule-power>.power-art{width:75px;height:75px}
  .rule-power h4{font-size:15px;margin:6px 0}
  .rule-power p{font-size:12px}
  .payout-table{font-size:12px;table-layout:fixed;width:100%;overflow-wrap:break-word}
  .payout-table th{font-size:9px}
  .payout-table td,.payout-table th{padding:9px 6px}
  .settings-row{min-height:80px;border-width:15px;padding:3px 7px;gap:12px}
  .settings-row label{font-size:16px}
  .settings-row small{font-size:10px}
  .settings-row input[type=range]{width:150px;min-width:95px}
  .settings-row select{max-width:180px;font-size:13px;padding:6px}
  .settings-footer{display:flex;flex-wrap:wrap;gap:8px}
  .settings-footer .secondary-button{font-size:12px;border-width:15px;padding:4px 8px;min-height:43px}
  .history-row{font-size:11px;border-width:11px;padding:5px 0;gap:7px}
  #toast{bottom:120px;border-width:16px;padding:3px 8px;font-size:12px;width:max-content}
  .boot-logo{width:min(550px,94vw);height:150px;margin-bottom:20px}
  .boot-console{border-width:25px;padding:15px 18px}
  .boot-console .eyebrow{font-size:12px;letter-spacing:2px}
  .boot-line{width:min(260px,65vw)}
}

@media (max-width:600px) and (orientation:portrait) {
  .topbar,#app[data-screen="race"] .topbar,#app[data-screen="result"] .topbar{height:166px;padding:0 10px}
  .brand,#app[data-screen="race"] .brand,#app[data-screen="result"] .brand{top:-7px;width:250px;height:84px}
  .brand img{height:64px}
  .top-actions{top:70px;left:10px;right:10px;height:48px;gap:6px}
  .wallet{margin-right:auto;min-width:155px;height:48px;border-width:11px}
  .wallet .coin-symbol{width:30px;height:30px}
  .wallet strong{font-size:22px}
  .wallet small{font-size:7px}
  .icon-button{width:40px;height:43px;border-width:10px;font-size:21px}
  .garage-nav{top:120px;left:10px;right:10px;gap:7px;height:43px}
  .garage-nav button{flex:1;height:43px;min-width:0;font-size:14px;border-width:11px}
  .garage-nav button span{font-size:9px;margin-right:6px}
  .setup-screen{inset:170px 9px 104px}
  #garage-screen{grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:91px minmax(175px,1fr) 112px 123px;gap:7px}
  .vehicle-details{grid-column:1;grid-row:1;border-width:15px;padding:0 3px}
  .vehicle-details .eyebrow{font-size:6px;gap:4px;letter-spacing:.6px}
  .vehicle-details .small-line{display:none}
  #vehicle-name{font-size:33px;margin:7px 0 4px;letter-spacing:0}
  #vehicle-tagline{font-size:9px;line-height:1.2}
  .circuit-preview{grid-column:2;grid-row:1}
  .circuit-art{height:72px;border-width:13px}
  .tile-index{font-size:5px;top:1px;left:3px;right:3px}
  .tile-caption{left:3px;bottom:0}
  .tile-caption small{font-size:5px;letter-spacing:.5px}
  .tile-caption strong{font-size:21px}
  .track-specs{padding:1px 4px;gap:5px;white-space:nowrap}
  .track-specs b{font-size:6px;letter-spacing:0}
  .showroom-hero{grid-column:1/-1;grid-row:2}
  .showroom-hero img{width:111%;height:112%;margin-left:0;max-height:250px}
  .vehicle-specs{grid-column:1/-1;grid-row:3;align-self:stretch;border-width:15px;padding:0 5px}
  .vehicle-specs>.panel-title{font-size:7px;margin-bottom:7px}
  .vehicle-specs>.panel-title span{font-size:6px}
  #vehicle-stats,.vehicle-stats{display:grid;grid-template-columns:1fr 1fr;gap:8px 14px}
  .stat-row{gap:4px}
  .stat-row small{font-size:8px;min-width:43px;width:43px;letter-spacing:0}
  .stat-bar{gap:1px}
  .stat-bar i{height:8px;min-width:2px;max-width:6px}
  .stat-row b{font-size:12px;min-width:26px}
  .stat-row b span{font-size:8px}
  .livery-row{margin-top:7px;padding-top:5px;gap:7px;justify-content:center}
  .livery-row small{font-size:6px}
  #vehicle-color{width:18px;height:11px}
  .vehicle-shelf{grid-row:4}
  .shelf-label{font-size:8px;margin:3px 3px 4px;letter-spacing:.6px}
  .shelf-label small{font-size:5px;letter-spacing:0}
  .vehicle-grid{grid-template-columns:repeat(7,100px);gap:5px;padding-top:5px;padding-bottom:6px}
  .vehicle-card,.vehicle-card.active{height:96px;border-width:13px}
  .vehicle-card strong{font-size:13px}
  .setup-footer{height:100px;padding:5px 8px;gap:6px;justify-content:space-between}
  .bet-control{flex:0 0 170px;width:170px;border-width:14px;padding:0 1px}
  .bet-control label{font-size:7px;letter-spacing:.1px;margin-bottom:5px}
  .bet-control label small{font-size:6px}
  .bet-control>div{height:33px;gap:3px}
  .bet-control button{width:30px;height:34px;border-width:9px;font-size:26px;flex-shrink:0}
  .bet-control input{width:55px;font-size:24px}
  .bet-control>div>span{font-size:7px}
  .race-button{height:80px;flex:1;min-width:0;font-size:21px;padding:0 13px;gap:7px;letter-spacing:.2px}
  .race-button b{font-size:19px}
  #tracks-screen{grid-template-rows:38px minmax(235px,1fr) 150px 45px;gap:7px}
  .track-heading h1{font-size:22px;letter-spacing:1.2px;line-height:1.1}
  .track-feature{border-width:16px}
  .track-feature-image{right:0;bottom:66px;background-size:100% 500%}
  .track-feature-title{max-width:100%;width:100%;padding:10px 11px}
  .track-feature-title small{font-size:8px;letter-spacing:1px}
  .track-feature-title h2{font-size:29px}
  .track-feature-details{inset:auto -2px -2px -2px;width:auto;height:70px;border-width:10px;padding:0 3px;display:grid;grid-template-columns:62px 1fr 1fr;grid-template-rows:1fr 1fr;gap:0 7px;align-items:center}
  .track-feature-details svg{height:50px;min-height:0;width:62px;grid-row:1/3}
  .track-feature-details>div{font-size:9px;letter-spacing:0;border:0;padding:0;white-space:nowrap}
  .track-feature-details strong{font-size:21px;margin-right:3px}
  #track-weather,#track-risk{font-size:7px}
  .track-grid{grid-template-columns:repeat(5,143px);gap:6px}
  .track-card,.track-card.active{height:131px;border-width:14px}
  .track-card strong{font-size:21px}
  .track-disclosure{font-size:8px;line-height:1.5;padding:0 8px}
  .track-disclosure>span{font-size:8px;margin-bottom:2px}
  #app[data-screen="race"] .topbar,#app[data-screen="result"] .topbar{height:122px}
  #race-screen{inset:129px 7px 10px}
  .leaderboard{width:125px;border-width:12px;padding:2px 0}
  .leaderboard .panel-title{font-size:6px;letter-spacing:0}
  .leaderboard .panel-title span{font-size:5px}
  .standing{height:25px;gap:2px;padding:0 1px;font-size:8px}
  .standing>strong{width:11px;font-size:15px}
  .standing img{width:34px;height:24px}
  .standing span{letter-spacing:0}
  .telemetry{width:111px}
  .mini-map{height:103px;border-width:12px}
  .mini-map svg{height:65px;width:100%}
  .mini-map small{font-size:6px;letter-spacing:.5px}
  .speedometer{height:97px;border-width:12px;padding:6px 0 0 22px}
  .speedometer:before{width:38px;height:44px;left:-8px;top:5px}
  .speedometer>span{font-size:31px}
  .speedometer>small{font-size:8px;letter-spacing:1px}
  .speedometer>div{font-size:5px;gap:3px;margin-top:4px}
  .speedometer b{font-size:12px}
  .race-top-center{width:111px;left:50%;top:0;border-width:11px;padding:2px 3px}
  .race-top-center .eyebrow{font-size:5px;letter-spacing:.25px;line-height:1.2}
  .lap-display{font-size:9px;letter-spacing:1px;margin-top:4px}
  .lap-display b{font-size:26px}
  .lap-display>span{font-size:10px;margin-left:4px}
  .race-progress{height:2px;margin-top:5px}
  .race-bottom{bottom:43px;gap:6px}
  .health-panel,.collection-panel{min-height:103px;border-width:13px;padding:0 4px}
  .health-panel>img{width:110px;height:40px;margin:-8px auto 0}
  .health-title>span{font-size:7px;letter-spacing:0}
  .health-title strong{font-size:18px}
  .health-title small{font-size:8px}
  #health-state{font-size:6px}
  .collection-panel{padding-top:3px}
  .collection-panel>small{font-size:6px;letter-spacing:.3px}
  .collection-coins{width:57px;height:61px;top:9px;left:-7px}
  .collection-panel strong{font-size:37px;margin-top:9px}
  .collection-panel em{font-size:22px}
  #coin-trail{margin-top:5px;gap:4px}
  #coin-trail span{font-size:7px}
  .power-panel{border-width:13px;padding:1px 0 2px}
  .power-panel .panel-title{font-size:7px;margin-bottom:4px}
  .power-panel .panel-title span{font-size:5px}
  #power-grid{gap:1px}
  .power-icon{height:50px}
  .power-icon>.power-art{width:38px;height:38px}
  .power-icon small{font-size:6px;letter-spacing:0;margin-top:2px}
  .race-toolbar{gap:7px}
  .race-toolbar>span{display:none}
  .small-button{height:36px;font-size:8px;padding:0 7px;border-width:10px;letter-spacing:.4px}
  #race-announcement{font-size:23px;top:40%;max-width:95%}
  #race-announcement small{font-size:8px;letter-spacing:.5px}
  #countdown{font-size:83px;top:39%}
  #pause-overlay,#result-screen{top:122px;padding:12px 0}
  #pause-overlay>div{border-width:22px;padding:12px 8px 17px}
  #pause-overlay h2{font-size:28px}
  #pause-overlay .race-button{min-width:0;width:250px;max-width:100%;height:75px;font-size:23px;margin-top:15px}
  .result-card{border-width:22px;padding:11px 8px;width:96vw}
  .result-card>.eyebrow{font-size:8px}
  .result-card h2{font-size:27px;margin-top:9px}
  #result-position{font-size:71px;line-height:1.1}
  #result-position>span{font-size:23px}
  .result-card>p{font-size:11px;margin:8px 0 11px}
  .result-calculation{gap:6px;padding:9px 0}
  .result-calculation small{font-size:6px;letter-spacing:.1px}
  .result-calculation b{font-size:22px}
  .calculation-times{font-size:16px}
  .result-payout{padding:0 34px;min-width:195px;margin:14px auto}
  .result-payout:before{width:64px;height:65px;left:-17px;top:-4px}
  .result-payout strong{font-size:35px}
  .result-payout>small{font-size:8px}
  .result-actions{gap:7px}
  .result-actions .race-button{min-width:0;flex:1;font-size:20px;padding:0 12px;gap:6px;height:69px}
  .result-actions .race-button b{font-size:16px}
  .result-actions .secondary-button{font-size:11px;padding:3px 7px;border-width:13px;flex:0 0 88px}
  .result-card>small{font-size:7px;margin-top:8px}
  dialog{width:97vw;max-height:96dvh;border-width:19px;padding:7px 7px 12px}
  .modal-header .eyebrow{font-size:7px;letter-spacing:.7px}
  .modal-header .icon-button{width:38px;height:40px}
  dialog h2{font-size:27px;line-height:1.05}
  dialog p,dialog .intro{font-size:12px}
  dialog h3{font-size:14px}
  .rules-grid{gap:6px}
  .rule-power{border-width:12px;padding:0 1px 3px}
  .rule-power>.power-art{width:65px;height:65px}
  .rule-power h4{font-size:14px}
  .rule-power p{font-size:11px}
  .payout-table{font-size:10px}
  .payout-table th{font-size:7px}
  .payout-table td,.payout-table th{padding:8px 4px}
  .settings-row{border-width:12px;min-height:83px;padding:3px 4px;gap:8px;flex-wrap:wrap}
  .settings-row label{font-size:14px;flex:1;min-width:127px}
  .settings-row small{font-size:9px;max-width:170px}
  .settings-row input[type=range]{width:115px;min-width:90px}
  .settings-row select{width:128px;max-width:100%;font-size:12px;padding:6px 3px}
  .settings-row input[type=checkbox]{width:23px;height:23px}
  .history-row{font-size:9px;gap:4px;border-width:10px;padding:5px 0}
  #toast{bottom:105px;font-size:11px;border-width:14px;padding:3px 5px}
  .boot-logo{width:96vw;height:111px;margin-bottom:18px}
  .boot-console{border-width:20px;padding:12px 10px}
  .boot-console .eyebrow{font-size:11px;letter-spacing:1.2px}
}

/* The short landscape composition keeps the race scene open between two compact side stacks. */
@media (max-height:500px) and (orientation:landscape) {
  #app{height:100dvh;min-height:0;overflow:hidden}
  .topbar,#app[data-screen="race"] .topbar,#app[data-screen="result"] .topbar{height:61px;padding:0 10px;gap:0}
  .brand,#app[data-screen="race"] .brand,#app[data-screen="result"] .brand{top:-9px;left:50%;transform:translateX(-50%);width:222px;height:76px}
  .brand img{height:57px}
  .garage-nav{position:absolute;left:9px;top:9px;height:43px;gap:4px}
  .garage-nav button{height:42px;min-width:91px;font-size:11px;border-width:10px;padding:0 2px}
  .garage-nav button span{font-size:7px;margin-right:3px}
  .top-actions{position:absolute;top:8px;right:9px;left:auto;height:43px;gap:4px}
  .wallet{height:44px;min-width:126px;border-width:10px;padding:0 2px;gap:3px;margin:0}
  .wallet .coin-symbol{height:27px;width:26px}
  .wallet small{font-size:5px;letter-spacing:.3px}
  .wallet strong{font-size:19px}
  .credit-label{font-size:6px;margin-top:7px}
  .icon-button{height:36px;width:34px;font-size:18px;border-width:9px}
  .race-header{display:none!important}
  .setup-screen{inset:65px 10px 71px;overflow:auto;scrollbar-width:thin}
  #garage-screen{display:grid;grid-template-columns:172px minmax(165px,1fr) 211px;grid-template-rows:minmax(145px,1fr) 88px;gap:4px 7px}
  .garage-intro{display:none}
  .vehicle-details{position:relative;grid-column:1;grid-row:1;inset:auto;align-self:start;max-width:none;width:auto;min-height:0;height:70px;border-width:13px;padding:0 3px}
  .vehicle-details .eyebrow{font-size:5px;letter-spacing:.4px;gap:3px}
  .vehicle-details .small-line{display:none}
  #vehicle-name{font-size:27px;line-height:.9;margin:5px 0 3px}
  #vehicle-tagline{display:block;font-size:8px;line-height:1.1;margin:0}
  .showroom-hero{position:relative;grid-column:2;grid-row:1;inset:auto;min-height:0;align-self:stretch}
  .showroom-hero img{height:117%;width:115%;margin:-3% 0 0;object-fit:contain}
  .vehicle-specs{position:relative;grid-column:3;grid-row:1;inset:auto;width:auto;max-width:none;border-width:14px;padding:0 5px;align-self:stretch}
  .vehicle-specs>.panel-title{font-size:6px;margin-bottom:7px}
  .vehicle-specs>.panel-title span{font-size:5px}
  #vehicle-stats,.vehicle-stats{display:grid;grid-template-columns:1fr;gap:7px;width:100%}
  .stat-row{gap:4px}
  .stat-row small{width:45px;font-size:8px;letter-spacing:0}
  .stat-bar{gap:2px}
  .stat-bar i{height:7px;min-width:0;max-width:7px}
  .stat-row b{font-size:12px;min-width:25px}
  .stat-row b span{font-size:8px}
  .livery-row{display:flex;margin-top:7px;padding-top:5px;gap:6px}
  .livery-row small{font-size:5px}
  #vehicle-color{width:17px;height:10px}
  .circuit-preview{position:relative;grid-column:1;grid-row:1;inset:auto;width:auto;max-width:none;align-self:end;height:70px}
  .circuit-art{height:57px;border-width:10px}
  .tile-index{font-size:5px;top:1px;left:3px;right:3px}
  .tile-caption{left:3px;bottom:0}
  .tile-caption small{font-size:4px;letter-spacing:.4px}
  .tile-caption strong{font-size:17px}
  .track-specs{display:flex;padding:0 4px;gap:4px;border:0}
  .track-specs small{display:none}
  .track-specs b{font-size:5px;letter-spacing:0}
  .vehicle-shelf{position:relative;grid-column:1/-1;grid-row:2;inset:auto}
  .shelf-label{font-size:6px;margin:0 3px 2px;letter-spacing:.5px}
  .shelf-label small{font-size:5px;letter-spacing:0}
  .vehicle-grid{grid-template-columns:repeat(7,minmax(83px,1fr));gap:5px;padding:3px 2px 3px;overflow-x:auto;overflow-y:hidden}
  .vehicle-card,.vehicle-card.active{height:66px;border-width:10px;transform:none}
  .vehicle-card img{inset:-6px -5px 9px;height:calc(100% - 1px);width:calc(100% + 10px)}
  .vehicle-card strong{font-size:11px;bottom:-4px}
  .vehicle-card .car-id{display:none}
  .setup-footer{height:67px;padding:1px 12px;gap:15px;justify-content:flex-end;background:linear-gradient(transparent,#010915cc)}
  .footer-meta{display:none}
  .bet-control{width:194px;flex:0 0 194px;border-width:12px;padding:0 5px}
  .bet-control label{font-size:6px;margin-bottom:2px;letter-spacing:.4px}
  .bet-control label small{font-size:5px}
  .bet-control>div{height:25px;gap:3px}
  .bet-control button{width:27px;height:29px;border-width:8px;font-size:22px}
  .bet-control input{width:62px;font-size:23px}
  .bet-control>div>span{font-size:6px}
  .race-button{height:65px;min-width:215px;flex:0 1 auto;font-size:23px;padding:0 25px;gap:13px}
  .race-button b{font-size:20px}
  #tracks-screen{display:grid;grid-template-columns:minmax(280px,1fr) minmax(310px,1fr);grid-template-rows:26px minmax(140px,1fr) 26px;gap:5px 12px}
  .track-heading{position:relative;inset:auto;grid-column:1/-1;grid-row:1;margin:0}
  .track-heading h1{font-size:19px;letter-spacing:3px;line-height:1;margin:0}
  .track-feature{position:relative;inset:auto;grid-column:1;grid-row:2;border-width:13px;min-height:0}
  .track-feature-image{right:28%;bottom:0}
  .track-feature-title{padding:7px 9px;max-width:72%;width:72%}
  .track-feature-title small{font-size:6px;letter-spacing:.7px}
  .track-feature-title h2{font-size:23px;margin-top:4px}
  .track-feature-details{inset:-2px -2px -2px auto;width:29%;height:auto;border-width:9px;padding:0 3px;display:flex;gap:2px}
  .track-feature-details svg{min-height:38px;height:39%;width:100%}
  .track-feature-details>div{font-size:7px;padding-top:2px;letter-spacing:0}
  .track-feature-details strong{font-size:14px;margin-right:4px}
  #track-weather,#track-risk{font-size:6px}
  .track-grid{position:relative;inset:auto;grid-column:2;grid-row:2;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:1fr 1fr;gap:3px;padding:0 1px 2px;overflow:visible}
  .track-card,.track-card.active{height:auto;min-height:65px;border-width:9px}
  .track-card .track-number{font-size:4px;top:1px;left:1px;letter-spacing:0}
  .track-card.active .track-number:after{font-size:4px;margin-left:3px}
  .track-card .track-copy{left:0;right:0;bottom:-3px}
  .track-card strong{font-size:13px}
  .track-disclosure{position:relative;inset:auto;grid-column:1/-1;grid-row:3;font-size:7px;line-height:1.4;margin:0;text-align:center}
  .track-disclosure>span{display:inline;font-size:7px;margin-right:9px;letter-spacing:.5px}
  #race-screen{inset:65px 9px 5px}
  .leaderboard{width:134px;top:0;border-width:11px;padding:2px 0}
  .leaderboard .panel-title{font-size:5px;letter-spacing:0}
  .leaderboard .panel-title span{font-size:5px}
  .standing{height:18px;gap:3px;padding:0 1px;font-size:7px}
  .standing>strong{font-size:12px;width:10px}
  .standing img{width:30px;height:18px}
  .standing span{letter-spacing:0}
  .standing small{display:none}
  .race-top-center{top:0;width:165px;border-width:10px;padding:1px 6px}
  .race-top-center .eyebrow{font-size:5px;letter-spacing:.6px}
  .lap-display{font-size:9px;letter-spacing:2px;margin-top:2px}
  .lap-display b{font-size:23px}
  .lap-display>span{font-size:9px}
  .race-progress{height:2px;margin-top:4px}
  .telemetry{width:125px;top:0}
  .mini-map{display:block;height:90px;border-width:10px;padding:0}
  .mini-map svg{height:59px;width:100%}
  .mini-map small{font-size:5px;letter-spacing:.6px}
  .speedometer{height:77px;border-width:10px;margin-top:3px;padding:4px 0 0 33px}
  .speedometer:before{width:40px;height:46px;left:-6px;top:1px}
  .speedometer>span{font-size:29px}
  .speedometer>small{font-size:6px;letter-spacing:1px}
  .speedometer>div{font-size:5px;gap:4px;margin-top:1px}
  .speedometer b{font-size:9px}
  .race-bottom{bottom:29px;grid-template-columns:145px minmax(0,1fr) 130px;gap:7px;align-items:end}
  .health-panel{grid-column:1;grid-row:1;border-width:10px;min-height:78px;padding:0 3px}
  .health-panel>img{height:26px;width:90px;margin:-6px auto 0}
  .health-title>span{font-size:6px;letter-spacing:0}
  .health-title strong{font-size:14px}
  .health-title small{font-size:7px}
  .health-track{height:4px;margin:4px 0 2px}
  #health-state{font-size:5px;letter-spacing:.4px}
  .power-panel{grid-column:2;grid-row:1;border-width:10px;padding:0 2px 1px}
  .power-panel .panel-title{font-size:6px;margin-bottom:3px}
  .power-panel .panel-title span{font-size:5px}
  #power-grid{gap:2px}
  .power-icon{height:46px}
  .power-icon>.power-art{height:35px;width:35px;max-width:100%;margin:auto}
  .power-icon small{font-size:6px;margin-top:1px;letter-spacing:0}
  .collection-panel{grid-column:3;grid-row:1;min-height:78px;border-width:10px;padding:2px 3px 0}
  .collection-panel>small{font-size:5px;letter-spacing:0}
  .collection-coins{height:46px;width:43px;left:-5px;top:7px}
  .collection-panel strong{font-size:32px;margin-top:7px;line-height:1}
  .collection-panel em{font-size:18px}
  #coin-trail{height:8px;margin-top:3px;gap:3px}
  #coin-trail span{font-size:5px}
  .race-toolbar{gap:7px}
  .small-button{height:26px;border-width:8px;font-size:6px;padding:0 6px;letter-spacing:.5px}
  .race-toolbar>span{display:block;font-size:6px}
  .race-toolbar b{font-size:6px;margin-left:8px}
  #race-announcement{font-size:23px;top:40%;letter-spacing:1px}
  #race-announcement small{font-size:7px;letter-spacing:.8px}
  #countdown{font-size:70px;top:39%}
  #pause-overlay,#result-screen{inset:60px 0 0;padding:5px 0;overflow-y:auto}
  #pause-overlay>div{width:500px;max-width:95vw;border-width:22px;padding:5px 15px}
  #pause-overlay .eyebrow{font-size:8px}
  #pause-overlay h2{font-size:28px;margin:9px 0 4px}
  #pause-overlay p{font-size:10px;margin:4px}
  #pause-overlay .race-button{height:62px;min-width:230px;font-size:23px;margin-top:10px}
  .result-card{width:min(620px,95vw);border-width:21px;padding:5px 19px;max-height:100%;overflow-y:auto}
  .result-card>.eyebrow{font-size:7px}
  .result-card h2{font-size:25px;margin:5px 50px 3px}
  #result-position{position:absolute;top:12px;right:15px;font-size:39px;line-height:1}
  #result-position>span{font-size:15px}
  .result-card>p{font-size:9px;margin:3px 0 7px}
  .result-calculation{padding:5px 0;gap:15px}
  .result-calculation small{font-size:6px;letter-spacing:.4px}
  .result-calculation b{font-size:19px}
  .calculation-times{font-size:15px}
  .result-payout{margin:5px auto 3px;padding:0 40px;min-width:190px}
  .result-payout:before{width:49px;height:49px;left:0;top:0}
  .result-payout>small{font-size:6px}
  .result-payout strong{font-size:28px;margin-top:2px}
  .result-payout strong span{font-size:12px}
  .result-actions{gap:9px}
  .result-actions .race-button{height:54px;min-width:210px;font-size:20px;padding:0 21px;gap:13px}
  .result-actions .race-button b{font-size:18px}
  .result-actions .secondary-button{font-size:11px;border-width:12px;padding:2px 11px}
  .result-card>small{font-size:6px;margin-top:3px}
  dialog{width:min(690px,96vw);max-height:94dvh;border-width:19px;padding:5px 13px 12px}
  .modal-header{padding-bottom:6px;top:-5px}
  .modal-header .eyebrow{font-size:8px}
  .modal-header .icon-button{height:32px;width:33px;font-size:17px;border-width:9px}
  dialog h2{font-size:27px;margin:13px 0}
  dialog p,dialog .intro{font-size:12px}
  .rules-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
  .rule-power{border-width:11px}
  .rule-power>.power-art{width:59px;height:59px}
  .rule-power h4{font-size:12px}
  .rule-power p{font-size:10px}
  .settings-row{min-height:64px;border-width:12px;margin:7px 0;padding:2px 7px}
  .settings-row label{font-size:14px}
  .settings-row small{font-size:9px}
  .settings-row select{font-size:12px;padding:5px}
  .settings-footer .secondary-button{font-size:10px;border-width:12px}
  #toast{bottom:77px;border-width:12px;font-size:10px;padding:3px 8px}
  .boot-logo{width:370px;height:105px;margin-bottom:5px}
  .boot-console{border-width:20px;padding:10px 17px}
  .boot-console .eyebrow{font-size:10px;letter-spacing:1px}
  .boot-line{margin-top:12px}
  #boot p{font-size:10px;margin:9px 0 0}
}


/* Illustrated compact layouts. Live controls remain HTML above the painted chrome. */

/* Responsive arrangement of the original illustrated HUD. */
@media (max-width:900px) and (min-width:601px) and (orientation:portrait) {
  .showroom-hero img{width:100%;margin-left:0}
  #app[data-screen="race"] .topbar{height:100px}
  #app[data-screen="race"] .brand{top:0;width:62%;height:96px}
  #race-screen{inset:0;--hud-unit:7px}
  #race-screen .leaderboard{top:110px;left:8px;width:21%;height:37.7vw}
  #race-screen .standing{font-size:11px}
  #race-screen .standing>strong{font-size:21px}
  #race-screen .standing span{font-size:10px}
  #race-screen .standing small{font-size:14px}
  #race-screen .mini-map{top:110px;right:8px;width:22%;height:21.2vw}
  #race-screen .speedometer{top:calc(110px + 21.2vw);right:8px;width:22%;height:14.3vw}
  #race-screen .speedometer>span{font-size:39px}
  #race-screen .race-top-center{top:111px;width:180px}
  #race-screen .race-top-center .eyebrow{font-size:7px}
  #race-screen .lap-display{font-size:10px}
  #race-screen .lap-display b{font-size:22px}
  #race-screen .health-panel{top:auto;bottom:248px;left:8px;width:44%;height:145px}
  #race-screen .health-title strong{font-size:22px}
  #race-screen .health-title small{font-size:15px}
  #race-screen .collection-panel{top:auto;bottom:248px;left:auto;right:8px;width:48%;height:145px}
  #race-screen .collection-panel strong{font-size:65px}
  #race-screen .power-panel{top:auto;bottom:137px;left:8px;right:8px;width:auto;height:106px}
  #race-screen .coin-panel{top:auto;bottom:37px;left:8px;width:39%;height:90px}
  #race-screen .race-wager-console{top:auto;bottom:37px;left:40%;right:8px;width:auto;height:93px}
  #race-screen .committed-wager>strong{font-size:25px}
  #race-screen .committed-wager>small{font-size:6px}
  #race-screen .race-wager-console>.race-button{font-size:31px}
  #race-screen .collected-coin b{font-size:17px}
  #race-screen .coin-tray-empty{font-size:9px}
  #race-screen .race-toolbar{left:8px;right:8px;top:auto;bottom:5px;height:27px;gap:10px}
  #race-screen .race-toolbar .small-button{font-size:8px;padding:0 9px}
  #race-screen .race-toolbar>span{font-size:8px}
  #race-screen #race-announcement{top:44%;font-size:30px;width:60%}
  #race-screen #race-announcement small{font-size:10px}
  #race-screen #countdown{top:43%;font-size:92px}
}

@media (max-width:600px) and (orientation:portrait) {
  #app[data-screen="race"] .topbar{height:87px}
  #app[data-screen="race"] .brand{top:0;left:50%;transform:translateX(-50%);width:91%;height:86px;max-width:410px}
  #race-screen{inset:0;--hud-unit:4px}
  #race-screen .leaderboard{top:92px;left:5px;width:32.5%;height:230px}
  #race-screen .standing{font-size:9px}
  #race-screen .standing>strong{font-size:19px}
  #race-screen .standing span{font-size:8px}
  #race-screen .standing small{font-size:11px}
  #race-screen .mini-map{top:92px;right:5px;width:30%;height:119px}
  #race-screen .speedometer{top:211px;right:5px;width:30%;height:83px}
  #race-screen .speedometer>span{font-size:29px}
  #race-screen .race-top-center{top:94px;width:29%;left:51.5%}
  #race-screen .race-top-center .eyebrow{font-size:5px;letter-spacing:.6px;padding-top:6px}
  #race-screen .lap-display{font-size:9px}
  #race-screen .lap-display b{font-size:19px}
  #race-screen .lap-display>span{font-size:9px}
  #race-screen .health-panel{top:auto;bottom:251px;left:5px;width:44%;height:83px}
  #race-screen .health-title strong{font-size:12px}
  #race-screen .health-title small{font-size:9px}
  #race-screen .collection-panel{top:auto;bottom:251px;left:auto;right:5px;width:52%;height:83px}
  #race-screen .collection-panel strong{font-size:39px}
  #race-screen .power-panel{top:auto;bottom:186px;left:5px;right:5px;width:auto;height:57px}
  #race-screen .coin-panel{top:auto;bottom:114px;left:5px;right:5px;width:auto;height:65px}
  #race-screen .race-wager-console{top:auto;bottom:30px;left:5px;right:5px;width:auto;height:78px}
  #race-screen .committed-wager>strong{font-size:23px}
  #race-screen .committed-wager>small{font-size:5px;letter-spacing:.12em}
  #race-screen .race-wager-console>.race-button{font-size:28px}
  #race-screen .collected-coin i{width:43px;max-width:100%;height:38px}
  #race-screen .collected-coin b{font-size:14px}
  #race-screen .coin-tray-empty{font-size:8px}
  #race-screen .race-toolbar{left:5px;right:5px;top:auto;bottom:2px;height:25px;gap:7px}
  #race-screen .race-toolbar .small-button{font-size:7px;padding:0 9px;min-width:53px}
  #race-screen .race-toolbar>span{display:none}
  #race-screen #race-announcement{top:45%;font-size:21px;width:94%;white-space:normal}
  #race-screen #race-announcement small{font-size:8px}
  #race-screen #countdown{top:44%;font-size:79px}
  #app[data-screen="race"] #pause-overlay{top:87px}
}

@media (max-height:500px) and (orientation:landscape) {
  #app[data-screen="race"] .topbar{height:13.5vh}
  #app[data-screen="race"] .brand{top:0;left:50%;width:44%;height:13.5vh;transform:translateX(-50%)}
  #race-screen{inset:0;--hud-unit:min(1vw,1.7778vh)}
  #race-screen .race-wager-console>.race-button{font-size:calc(var(--hud-unit)*3.2)}
  #app[data-screen="race"] #pause-overlay{top:13.5vh}
}

@media (max-width:900px) and (min-height:501px) and (orientation:landscape) {
  #app[data-screen="race"] .topbar{height:13.5vh}
  #app[data-screen="race"] .brand{top:0;left:50%;width:44%;height:13.5vh;transform:translateX(-50%)}
  #race-screen{inset:0;--hud-unit:min(1vw,1.7778vh)}
}
@media (max-width:600px) and (max-height:740px) and (orientation:portrait) {
  #app[data-screen="race"] .topbar{height:72px}
  #app[data-screen="race"] .brand{height:71px;width:85%}
  #race-screen .leaderboard{top:76px;height:190px}
  #race-screen .standing>strong{font-size:16px}
  #race-screen .mini-map{top:76px;height:96px}
  #race-screen .speedometer{top:172px;height:69px}
  #race-screen .speedometer>span{font-size:25px}
  #race-screen .race-top-center{top:77px}
  #race-screen .health-panel,#race-screen .collection-panel{bottom:211px;height:65px}
  #race-screen .collection-panel strong{font-size:31px}
  #race-screen .power-panel{bottom:158px;height:48px}
  #race-screen .coin-panel{bottom:95px;height:57px}
  #race-screen .race-wager-console{bottom:25px;height:65px}
  #race-screen .race-wager-console>.race-button{font-size:24px}
  #race-screen .race-toolbar{bottom:0;height:23px}
  #race-screen .collected-coin i{height:32px;width:36px}
  #race-screen .collected-coin b{font-size:12px}
  #app[data-screen="race"] #pause-overlay{top:72px}
}

/* Portrait uses the original generated component artwork around live values. */
@media (max-width:900px) and (orientation:portrait) {
  #race-screen{--portrait-frame:18px}
  #hud-illustration{display:none}
  #app[data-screen="race"] .brand{background:var(--header-art) center / 100% 130% no-repeat;clip-path:none;filter:drop-shadow(0 0 10px #078aff44)}
  #app[data-screen="race"] .brand img{display:block;visibility:visible;width:83%;height:83%;object-fit:contain}
  #race-screen .leaderboard,#race-screen .mini-map,#race-screen .speedometer,#race-screen .health-panel,#race-screen .power-panel,#race-screen .collection-panel,#race-screen .coin-panel,#race-screen .race-wager-console{background:none;border:0;border-image:none;clip-path:none;padding:0;isolation:isolate;filter:none;box-shadow:none}
  #race-screen .leaderboard:after,#race-screen .mini-map:after,#race-screen .speedometer:after,#race-screen .health-panel:after,#race-screen .power-panel:after,#race-screen .collection-panel:after,#race-screen .coin-panel:after,#race-screen .race-wager-console:after{content:"";position:absolute;inset:0;border:var(--portrait-frame) solid transparent;border-image:var(--frame) 16% fill stretch;pointer-events:none;z-index:-1}
  #race-screen .leaderboard>.panel-title{display:none}
  #race-screen #leaderboard{position:absolute;inset:5% 7%;background:none;display:flex;flex-direction:column}
  #race-screen .standing{height:12.5%;flex:1;min-height:0;gap:3%;padding:0 2%;border-bottom:1px solid #1d416155}
  #race-screen .standing>strong{width:16%;height:80%;display:grid;place-items:center;line-height:1}
  #race-screen .standing img{width:43%;height:94%;object-fit:contain}
  #race-screen .standing span{font-weight:700;letter-spacing:0}
  #race-screen .standing small{display:block;width:10%;color:#ffd56c}
  #race-screen .mini-map svg{position:absolute;inset:10% 9% 18%;width:82%;height:72%;background:none;border-radius:0}
  #race-screen .mini-map small{display:block;position:absolute;bottom:9%;left:10%;right:10%;font-size:8px;letter-spacing:.8px;text-align:center;color:#8bc9f3}
  #race-screen .speedometer:before{content:"";display:block;position:absolute;left:7%;top:15%;width:39%;height:62%;background:url('../public/assets/ui-v2/dial.png') center / contain no-repeat}
  #race-screen .speedometer>span{left:43%;top:18%;width:48%;height:43%;background:none}
  #race-screen .speedometer>small{display:block;position:absolute;left:auto;right:12%;top:auto;bottom:17%;font-size:11px;letter-spacing:1.5px;color:#bdedff}
  #race-screen .speedometer>div{display:none}
  #race-screen .health-panel>img{position:absolute;left:7%;top:9%;width:86%;height:57%;margin:0;background:none;object-fit:contain;transform:scale(1.2)}
  #race-screen .health-panel:before{content:"♥";display:block;position:absolute;left:8%;right:auto;top:66%;height:auto;background:none;color:#56ff8d;font-size:25px;line-height:1;filter:drop-shadow(0 0 4px #20ef7c55)}
  #race-screen .health-title{left:56%;right:7%;top:69%;height:17%;background:none;display:flex;justify-content:flex-end;gap:0}
  #race-screen .health-title>span{display:none}
  #race-screen .health-title strong{white-space:nowrap;line-height:1}
  #race-screen .health-track{left:18%;top:74%;height:6.5%;width:34%;margin:0;position:absolute;border-radius:4px;background:#12251d}
  #race-screen .health-track>span{border-radius:3px;height:100%}
  #race-screen .collection-coins{display:block;position:absolute;left:5%;top:17%;width:38%;height:62%;object-fit:contain}
  #race-screen .collection-panel strong{position:absolute;left:43%;right:7%;top:18%;height:43%;background:none;display:flex;justify-content:center;align-items:center;margin:0}
  #race-screen .collection-panel>small{display:block;position:absolute;inset:auto 9% 15%;font-size:11px;letter-spacing:.8px;text-align:center;color:#ddeaf7}
  #race-screen .power-panel .panel-title{display:none}
  #race-screen #power-grid{position:absolute;inset:10% 3%;display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:1%;background:none}
  #race-screen .power-icon{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;min-width:0;padding:0;border:0;background:none;opacity:1;border-radius:4px}
  #race-screen .power-icon>.power-art{display:block;visibility:visible;width:100%;height:calc(100% - 14px);min-height:0;max-width:75px;flex:1;background-image:url('../public/assets/ui-v2/power-badges.png');background-size:400% 200%;background-position:var(--badge-x) var(--badge-y);background-repeat:no-repeat}
  #race-screen .power-icon>small{display:block;visibility:visible;font-size:10px;margin:0;line-height:1.2;letter-spacing:.2px}
  #race-screen .power-icon.active{background:color-mix(in srgb,var(--power) 8%,transparent);filter:brightness(1.25);box-shadow:0 0 12px color-mix(in srgb,var(--power) 50%,transparent)}
  #race-screen #race-coin-trail{position:absolute;inset:16% 6% 14%;background:none;display:flex;align-items:center;gap:3%}
  #race-screen .collected-coin i{background:url('../public/assets/ui-v2/coin.png') center / contain no-repeat;border-radius:0;filter:drop-shadow(0 0 3px #ffbd5244)}
  #race-screen .coin-tray-empty{left:8%;right:8%;top:43%;color:#90b9db}
  #race-screen .committed-wager{background:none;border-radius:0}
  #race-screen .committed-wager>strong{background:#03101f;box-shadow:inset 0 0 7px #008bca44}
  #race-screen .wager-dec,#race-screen .wager-inc{background:var(--frame) center / 100% 100% no-repeat;border:0;border-image:none;clip-path:none;display:grid;place-items:center;opacity:1;color:#8ce2ff;font-size:0;text-shadow:0 0 5px #0095ff}
  #race-screen .wager-dec:before{content:"−";font-size:34px;line-height:1;font-weight:700}
  #race-screen .wager-inc:before{content:"+";font-size:32px;line-height:1;font-weight:700}
  #race-screen .race-wager-console>.race-button{background:var(--gold-art) center / 100% 140% no-repeat;min-width:0;border:0;clip-path:none}
}
@media (max-width:600px) and (orientation:portrait) {
  #race-screen{--portrait-frame:12px}
  #race-screen .brand img{height:82%}
  #race-screen .mini-map small{font-size:5px;letter-spacing:.5px}
  #race-screen .speedometer>small{font-size:7px;letter-spacing:1px}
  #race-screen .health-panel:before{font-size:17px}
  #race-screen .collection-panel>small{font-size:7px;letter-spacing:.3px}
  #race-screen .power-icon>.power-art{height:calc(100% - 9px);max-width:40px}
  #race-screen .power-icon>small{font-size:6px;letter-spacing:0}
  #race-screen .wager-dec:before,#race-screen .wager-inc:before{font-size:26px}
}
@media (max-width:600px) and (max-height:740px) and (orientation:portrait) {
  #race-screen{--portrait-frame:10px}
  #race-screen .health-panel:before{font-size:14px}
  #race-screen .collection-panel>small{font-size:6px}
  #race-screen .power-icon>small{font-size:5px}
}



