/* Online screens deliberately use short forms and paged rosters. */
.wrap:has(.ov[data-mode="lobby"]),.wrap:has(.ov[data-mode="profile"]){height:100dvh;box-sizing:border-box;padding:10px;gap:8px}
.wrap:has(.ov[data-mode="lobby"])>header,.wrap:has(.ov[data-mode="profile"])>header{position:static;padding:0;background:none;display:flex;justify-content:space-between;flex:none}
.wrap:has(.ov[data-mode="lobby"])>header .meta,.wrap:has(.ov[data-mode="profile"])>header .meta{display:none}
.wrap:has(.ov[data-mode="lobby"])>header h1,.wrap:has(.ov[data-mode="profile"])>header h1{font-size:12px;display:block}
.wrap:has(.ov[data-mode="lobby"])>header .fsb,.wrap:has(.ov[data-mode="profile"])>header .fsb{width:auto;min-height:36px;padding:7px 10px;font-size:12px}
.stage.menu-open:has(.ov:is([data-mode="lobby"],[data-mode="profile"])){flex:1;min-height:0}
.stage.menu-open:has(.ov:is([data-mode="lobby"],[data-mode="profile"])) .screen{height:100%;min-height:0;box-sizing:border-box}
.stage.menu-open .ov:is([data-mode="lobby"],[data-mode="profile"]){height:100%;min-height:0;padding:14px;overflow:auto;background:radial-gradient(ellipse at top,#1c2a3c,#0b1017 65%)}
.ov:is([data-mode="lobby"],[data-mode="profile"]) .ovin{height:100%;max-width:680px;gap:10px;margin:auto;display:flex;flex-direction:column;justify-content:flex-start}
.room-heading{width:100%;flex:none;text-align:left}.room-heading h2{font-size:20px;margin:14px 0 5px}.room-heading>.room-line{color:#a8bcd1;font:600 12px var(--body)}
.room-progress{font:600 11px var(--body);letter-spacing:.1em;color:#ffcf75}
.room-body{flex:1;min-height:0;width:100%;display:flex;flex-direction:column;justify-content:center;gap:10px}
.room-card{background:#131e2b;border:1px solid #314358;border-radius:12px;padding:14px;display:grid;gap:12px;box-sizing:border-box;width:100%}
.room-card h3{font-size:12px;margin:0}.room-card p,.room-hint,.room-note{font:14px/1.4 var(--body);margin:0;color:#b6c5d6}
.room-fields{grid-template-columns:1fr 1fr;gap:12px}
.room-field{display:flex;flex-direction:column;gap:7px;text-align:left;min-width:0;font:600 11px var(--body);color:#a8bcd1}
.room-field select,.room-field input{box-sizing:border-box;width:100%;min-height:44px;border-radius:7px;border:1px solid #475c72;background:#0b121b;color:#f4f7fb;font:16px var(--body);padding:9px;min-width:0}
.room-field select:focus-visible,.room-field input:focus-visible{outline:2px solid #ffcf75;outline-offset:2px}
.room-line{display:flex;align-items:center;justify-content:space-between;gap:10px;font:15px var(--body)}
.room-colors{display:flex;align-items:center;justify-content:space-between;gap:8px;font:11px var(--body)}
.room-colors .sw{gap:7px;flex-wrap:nowrap}.room-colors .sw button{height:26px;width:26px;border-radius:50%}
.room-level{display:flex;align-items:center;gap:12px}.room-level .btn{padding:4px;min-width:40px;min-height:40px;font:24px var(--body)}.room-level output{min-width:18px;text-align:center}
.room-roster>.room-line{min-height:46px;border-bottom:1px solid #314358;padding-bottom:6px;text-align:left}.room-roster small{display:block;font-size:12px;color:#9bafc6;margin-top:4px}.room-roster strong{font:700 11px var(--body);white-space:nowrap}
.room-ready{color:#9ee7ae}.room-wait{color:#ffcf75}
.room-note{flex:none;min-height:18px;font-size:12px;text-align:left}.room-note:empty{display:none}
.room-actions{width:100%;flex:none;display:flex;justify-content:space-between;flex-wrap:nowrap;gap:8px;margin:0!important}
.ov[data-mode="lobby"] .btn,.ov[data-mode="profile"] .btn{border-radius:8px;font:700 13px var(--body);min-height:44px;padding:10px 14px;box-shadow:none;letter-spacing:.02em}
.room-actions .btn{flex:1;min-width:0}.room-body>.btn{flex:none;width:100%}
.ov[data-mode="lobby"] .btn:disabled{opacity:.45;cursor:not-allowed}
.ov[data-mode="lobby"] .room-level .btn{padding:4px;min-height:40px;font-size:24px}
#roomReady{background:#d8fba3;color:#14200d;border-color:#c6ec88}#roomReady.ghost{background:#163b2b;color:#b8f5c8;border-color:#39845d}
.ov[data-mode="profile"] .room-body{justify-content:flex-start}.league-list{display:grid;gap:8px;width:100%}.league-list .room-line{padding:10px;border-radius:6px;background:#131e2b}.league-tabs{display:flex;gap:6px}.league-tabs .btn{flex:1}
@media(max-width:480px){
 .stage.menu-open .ov:is([data-mode="lobby"],[data-mode="profile"]){padding:10px}.room-card{padding:12px;gap:10px}.room-heading h2{font-size:16px;margin-top:10px}.room-body{gap:8px}.room-hint{font-size:12px}.room-field select{font-size:14px}.room-fields{gap:10px}
}
@media(max-height:620px){
 .ov:is([data-mode="lobby"],[data-mode="profile"]) .ovin{gap:6px}.room-heading h2{font-size:15px;margin:6px 0 3px}.room-card{gap:6px;padding:9px}.room-body{gap:6px}.room-field{gap:4px}.room-hint{font-size:12px}.room-roster>.room-line{min-height:30px}.room-roster small{margin:0}.room-tune .room-line{font-size:13px}.room-tune .room-level .btn{min-height:34px;height:34px}.room-colors .sw button{width:24px;height:24px}.room-progress{font-size:10px}
}
@media(orientation:landscape) and (max-height:500px){
 .wrap:has(.ov[data-mode="lobby"])>header{display:none}.ov[data-mode="lobby"] .ovin{max-width:850px}.room-heading{display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:5px}.room-heading h2{text-align:right;margin:0}.room-heading .room-progress{display:none}.room-fields{grid-template-columns:repeat(3,1fr)}.room-car-preview{height:90px}.room-body:has(.room-tune):has(.room-colors){display:grid;grid-template-columns:1fr 1fr;align-content:center}.room-body:has(.room-tune):has(.room-colors)>.room-hint{grid-column:1}.room-roster{grid-template-columns:1fr 1fr}.room-roster>.room-line{min-height:32px}.room-actions .btn{min-height:36px;padding:8px}.room-body:has(.room-roster){gap:5px}
}
/* Keep chat off the navigation buttons; its panel opens into the room. */
.stage:has(.ov[data-mode="lobby"]) .room-chat{top:8px;bottom:auto;left:auto;right:10px}
.stage:has(.ov[data-mode="lobby"]) .chat-panel{top:44px;bottom:auto;left:auto;right:0;width:min(340px,calc(100vw - 44px))}
.ov[data-mode="lobby"] .room-heading{padding-right:84px;box-sizing:border-box}
.ov[data-mode="lobby"] .room-heading h2{font-family:var(--body);font-weight:800;letter-spacing:.03em;text-shadow:none}

/* The host and guest both choose in a viewport-sized garage. */
.wrap:has(.ov[data-showroom="true"])>header{display:none}
.stage.menu-open:has(.ov[data-showroom="true"]){position:fixed;inset:0;width:100%;height:100dvh;z-index:8;background:#0b1017}
.stage.menu-open:has(.ov[data-showroom="true"]) .screen{border:0;border-radius:0;box-shadow:none}
.stage.menu-open .ov[data-showroom="true"]{padding:max(10px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));background:radial-gradient(ellipse at 50% 60%,#263c50,#0a111b 72%)}
.ov[data-showroom="true"] .ovin{max-width:none;gap:8px}
.ov[data-showroom="true"] .room-heading h2,.ov[data-showroom="true"] .room-progress{display:none}
.ov[data-showroom="true"] .room-heading{display:block;min-height:28px}
.ov[data-showroom="true"] .room-heading>.room-line{justify-content:flex-start;gap:20px;font-size:11px}
.ov[data-showroom="true"] .room-body{justify-content:stretch}
.room-car-full{display:flex;flex:1;flex-direction:column;min-height:0;gap:8px}
.room-car-full .car-showroom{display:grid;flex:1;min-height:0;grid-template-rows:auto auto minmax(0,1fr) auto;gap:6px}
.room-car-full .car-name{margin:0;font-size:clamp(12px,2vw,22px);line-height:1.5;overflow-wrap:anywhere}
.room-car-full .car-gearbox{margin:0;font:12px var(--body)}
.room-car-full .car-stage{width:100%;max-width:none;min-height:0;height:100%;background:none;border-radius:0;touch-action:pan-y;user-select:none;cursor:grab}
.room-car-full .car-stage:active{cursor:grabbing}
.room-car-full .car-stage:focus-visible{outline:2px solid #ffcf75;outline-offset:-3px}
.room-car-full .car-stage canvas{width:100%;height:100%;min-height:0;aspect-ratio:auto}
.room-car-full .car-arrow{width:44px;height:56px;font-size:32px;border-radius:10px;background:#0b1426b3}
.room-car-full .car-specs{width:100%;max-width:780px;margin:0;justify-self:center;gap:16px}
.room-car-full .car-spec{font:12px var(--body);gap:4px}
.room-car-full .car-spec strong{font-size:clamp(15px,2vw,22px)}
.room-car-full .car-benchmark-note{display:none}
.room-swipe-hint{margin:0;width:100%;max-width:none;box-sizing:border-box;color:#afc6da;font:11px var(--body);text-align:center;letter-spacing:.04em}
.ov .room-swipe-hint{max-width:none}
.room-car-full .room-colors{justify-content:center;gap:14px;min-height:32px}
.ov[data-showroom="true"] .room-actions{max-width:780px;align-self:center}
@media(max-width:380px){
 .room-car-full .car-name{font-size:11px}.room-car-full .car-spec{font-size:10px}.room-car-full .car-specs{gap:8px}.room-swipe-hint{font-size:10px}
}
@media(orientation:landscape) and (max-height:550px){
 .ov[data-showroom="true"] .ovin{gap:4px}
 .room-car-full{gap:4px}
 .room-car-full .car-showroom{grid-template-columns:minmax(0,1fr) 170px;grid-template-rows:auto auto minmax(0,1fr);column-gap:20px}
 .room-car-full .car-name{grid-column:1;grid-row:1;font-size:13px}
 .room-car-full .car-gearbox{grid-column:1;grid-row:2;font-size:10px}
 .room-car-full .car-stage{grid-column:1;grid-row:3}
 .room-car-full .car-specs{grid-column:2;grid-row:1/4;grid-template-columns:1fr;align-self:center;gap:14px}
 .room-car-full .car-spec{font-size:11px}.room-car-full .car-spec strong{font-size:17px}
 .room-car-full .room-colors{position:absolute;bottom:max(10px,env(safe-area-inset-bottom));right:max(12px,env(safe-area-inset-right));width:170px;display:block;text-align:center}
 .room-car-full .room-colors>span{display:none}.room-car-full .room-colors .sw{justify-content:center;gap:5px;flex-wrap:wrap}
 .ov[data-showroom="true"] .room-actions{align-self:flex-start;width:calc(100% - 190px);max-width:none}
 .room-swipe-hint{padding-right:190px;font-size:10px}
}
