/* Rider-only KartRider Rush+ room composition; no shared game/theme overrides. */
body { --rider-ink:#163d78; --rider-line:#97c7ed; }
body:has(#panel:not([hidden])) #scene { filter:brightness(.7) saturate(.75); }
body > header { background:linear-gradient(180deg,#245ca5f5,#244e91dc); color:#fff; height:60px; }
body > header a { color:#dcf5ff; }
body > header button { background:#356fac; color:#fff; border:1px solid #83b8e1; border-radius:4px; min-height:44px; }
body > header > #ggBugReport { background:#356fac; color:#fff; border:1px solid #83b8e1; border-radius:4px; }
#panel:has([data-endpoint="/rider/rooms"]) { display:flex; flex-direction:column; left:50%; transform:translateX(-50%); top:76px; bottom:24px; width:min(1120px,calc(100vw - 48px)); padding:20px 24px; gap:14px; background:linear-gradient(125deg,#356ab3f7,#20477fef); border:1px solid #83b8e2; border-radius:8px; box-shadow:0 16px 44px #071e4a66; color:#fff; }
#panel > .brand-line { color:#c6eaff; font-size:11px; }
#panel > .brand-line .flag { color:#a1e7ff; }
#panel > h1 { flex:none; font-size:32px; line-height:1.1; letter-spacing:-1.5px; margin:0; color:#fff; }
#panel > h1 span { color:#fff; }
#panel > h1 i { display:inline; margin-left:14px; font-size:11px; letter-spacing:2px; color:#aadaff; }
#panel > #boot-status { margin:0; background:#e2f0fe; color:var(--rider-ink); border-radius:4px; }
#panel #entry { display:flex; flex-direction:column; flex:1; min-height:0; margin:0; gap:14px; }
.rider-identity { display:flex; align-items:center; gap:14px; flex:none; }
#panel:has([data-room-directory]) .rider-identity label { font-size:14px; margin:0; white-space:nowrap; }
#panel:has([data-room-directory]) .rider-identity input { width:230px; min-height:46px; font-size:16px; }
#panel input { background:#f4faff; color:var(--rider-ink); border:1px solid var(--rider-line); border-radius:4px!important; }
#panel .gg-room-directory { display:flex; flex-direction:column; flex:1; min-height:150px; margin:0; padding:18px; background:#e8f4ff; color:var(--rider-ink); border:1px solid var(--rider-line); border-radius:5px; box-shadow:none; }
#panel .gg-room-directory__head { flex:none; border-bottom:1px solid #c1d9ed; padding-bottom:10px; }
#panel .gg-room-directory__head h2 { font-size:19px; }
#panel .gg-room-directory button.gg-room-directory__refresh { background:#d7ecff; color:#235f99; border:1px solid #acd0eb; border-radius:3px; min-height:44px; font-size:14px; }
#panel .gg-room-directory__list { flex:1; max-height:none; overflow:auto; align-content:start; gap:8px; }
#panel .gg-room-directory__room { min-height:72px; grid-template-columns:minmax(0,1fr) auto; background:#fff; color:var(--rider-ink); border:1px solid #adcce4; border-radius:4px!important; box-shadow:none; }
#panel .gg-room-directory__room small { color:#486b91; }
#panel .gg-room-directory__room b { color:#1a6cae; }
#panel .gg-room-directory__room[aria-pressed=true] { background:#cdeaff; border-color:#237dcc; box-shadow:inset 4px 0 #237dcc; }
#panel .gg-room-directory__empty { color:#406388; margin:auto; text-align:center; padding:32px 12px; }
.rider-entry-footer { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:14px; }
#panel:has([data-room-directory]) #entry .join { margin:0; flex:1; max-width:420px; }
#panel:has([data-room-directory]) #entry .join input { min-height:52px; }
#panel:has([data-room-directory]) #entry .entry-actions { margin:0; flex:none; flex-wrap:nowrap; }
#panel:has([data-room-directory]) #entry .entry-actions button { flex:none; min-width:150px; }
#panel button, #setup-dialog button { color:var(--rider-ink); border:1px solid #99c4e5; background:#d7edff; border-radius:4px!important; }
#panel #open-room-setup, #panel #start, #setup-dialog #create, #setup-dialog #practice { background:#ffda53; color:#463611; border-color:#f3bf31; font-weight:900; }
#panel #start { min-width:190px; justify-content:center; font-size:21px; }
#panel button:not(:disabled):active, #setup-dialog button:not(:disabled):active { filter:brightness(.9); box-shadow:inset 0 3px 4px #10284933; }
#panel button:disabled, #setup-dialog button:disabled { opacity:.55; cursor:not-allowed; }
#panel :is(button,input):focus-visible, #setup-dialog :is(button,input):focus-visible { outline:3px solid #ffde65!important; outline-offset:3px; }
#panel #error { flex:none; color:#ffe0d1; margin:0; }
#panel #error:empty, #setup-error:empty { display:none; }
#panel:has(#entry[hidden]) > :is(.brand-line,h1) { display:none; }
#panel #lobby { display:flex; flex-direction:column; flex:1; min-height:0; gap:14px; }
#lobby .room-row { flex:none; gap:12px; }
#lobby .room-row > span { display:flex; align-items:center; gap:14px; font-size:14px; }
#lobby .room-row strong { color:#fff; font-size:24px; }
#lobby .room-row button { min-height:44px; padding:8px 14px; }
#panel:has([data-room-directory]) #lobby #members { display:grid; flex:1; grid-template-columns:repeat(4,minmax(0,1fr)); grid-template-rows:repeat(2,minmax(138px,1fr)); gap:10px; margin:0; }
#members li { position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:9px; min-width:0; min-height:138px; padding:14px 8px; border:1px solid #9bd2f9; border-radius:5px; background:linear-gradient(155deg,#d7f3ff,#88c0ed 65%,#5596d4); color:#123c73; font-size:14px; white-space:normal; text-align:center; overflow-wrap:anywhere; }
#members li.rider-seat-empty { color:#c8e9ff; border-color:#71a6d6; background:linear-gradient(145deg,#508cbe77,#3767a388); font-size:30px; }
#members .dot { display:none; }
.rider-seat-kart { display:block; width:100%; max-width:235px; height:145px; object-fit:contain; flex:none; margin:0; }
.rider-lobby-footer { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:14px; flex:none; }
#lobby-settings { flex:1; min-width:0; }
#lobby-settings #rider-setup { display:grid; grid-template-columns:1fr 1.25fr auto; align-items:end; gap:10px; }
#lobby-settings #mode-picker { flex-direction:column; margin:0; }
#lobby-settings #mode-picker button { min-height:44px; }
#lobby-settings .section-title { display:none; }
#lobby-settings #maps .current-track { padding:6px 9px; min-height:44px; border-radius:4px; background:#d7edff; color:var(--rider-ink); border:1px solid #99c4e5; }
#lobby-settings .current-track svg { width:36px; height:28px; }
#lobby-settings .current-track small { display:none; }
#lobby-settings .current-track strong { font-size:13px; }
#lobby-settings #show-tracks { margin-top:4px; min-height:44px; }
#lobby-settings #open-garage { margin:0; min-height:92px; display:flex; flex-direction:column; gap:4px; padding:8px; background:#d7edff; box-shadow:none; }
#lobby-settings #open-garage :is(.garage-open-icon,.garage-open-arrow,.garage-open-copy small) { display:none; }
#lobby-settings #rider-host-actions { display:none; }
#lobby .entry-actions { margin:0; flex:none; }
#lobby .entry-actions button { min-height:54px; }
#panel #mode-picker button[aria-pressed=true], #setup-dialog #mode-picker button[aria-pressed=true] { background:#1d86cb; border-color:#8bdfff; color:#fff; }
#setup-modal { position:fixed; inset:0; z-index:7; display:grid; place-items:center; padding:16px; background:#0a2455b8; }
#setup-dialog { width:min(610px,100%); max-height:calc(100dvh - 32px); overflow:auto; background:#e9f3ff; border:2px solid #82b9e4; border-radius:6px; box-shadow:0 24px 80px #081f4b99; color:var(--rider-ink); }
.rider-dialog-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 18px; background:#3474b9; color:#fff; }
.rider-dialog-head h2 { margin:0; font-size:21px; }
#setup-dialog #rider-setup { padding:22px; }
#setup-dialog #mode-picker { margin:0 0 18px; }
#setup-dialog #mode-picker button { min-height:50px; font-size:15px; }
#setup-dialog .section-title { margin:0 0 10px; }
#setup-dialog .section-title span, #setup-dialog .current-track small { color:#52759d; }
#setup-dialog .current-track { background:#fff; border-color:#b8d5ec; border-radius:4px; }
#setup-dialog #show-tracks { color:var(--rider-ink); background:#d7edff; border-color:#99c4e5; }
#setup-dialog #open-garage { background:#fff; box-shadow:none; border-color:#b8d5ec; }
#setup-dialog .garage-open-icon { background:#287abe; color:#fff3b5; }
#setup-dialog :is(.garage-open-copy small,.garage-open-arrow) { color:#52759d; }
#setup-dialog #rider-host-actions { justify-content:end; margin:22px 0 0; }
#setup-dialog #rider-host-actions button { min-height:54px; min-width:170px; flex:none; justify-content:center; font-size:19px; }
#setup-dialog[data-action=create] #practice, #setup-dialog[data-action=practice] #create { display:none; }
#setup-error { margin:0 22px 18px; color:#9d302c; font-size:14px; }
#track-dialog, #garage-dialog { background:#e9f3ff; color:var(--rider-ink); border-color:#97c7ed; border-radius:6px; }
#garage-dialog button { background:#d7edff; color:var(--rider-ink); border-color:#99c4e5; border-radius:4px; }
#garage-dialog #garage-cards button[aria-pressed=true] { background:#cceaff; border-color:#2582c5; box-shadow:none; }
#garage-dialog :is(.garage-kicker,.garage-head h2,.garage-head p,#garage-status,.garage-progress) { color:#365e8a; }
#garage-showcase { background:#dceeff; border-color:#adcdeb; }
#track-dialog .map-button { background:#fff; border-radius:4px; }
#track-dialog .map-button[aria-pressed=true] { background:#cceaff; border-color:#2582c5; }
@media(max-width:760px) {
 #panel:has([data-endpoint="/rider/rooms"]) { left:12px; right:12px; top:70px; bottom:12px; transform:none; width:auto; padding:16px; gap:12px; display:flex; }
 #panel > h1 { font-size:27px; }
 #panel > h1 i { display:none; }
 #panel:has([data-room-directory]) #entry { margin:0; }
 #panel .gg-room-directory { padding:12px; min-height:160px; }
 .rider-identity { gap:10px; }
 #panel:has([data-room-directory]) .rider-identity input { width:100%; }
 .rider-entry-footer { display:grid; grid-template-columns:1fr; }
 #panel:has([data-room-directory]) #entry .entry-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
 #panel:has([data-room-directory]) #entry .entry-actions button { min-width:0; min-height:54px; padding:8px; font-size:16px; }
 #panel:has([data-room-directory]) #lobby #members { grid-template-columns:repeat(2,minmax(0,1fr)); grid-template-rows:repeat(4,95px); height:410px; flex:none; }
 #members li { min-height:95px; font-size:12px; padding:6px; gap:5px; }
 .rider-seat-kart { height:63px; max-width:135px; }
 .rider-lobby-footer { grid-template-columns:1fr; align-items:stretch; }
 #lobby-settings #rider-setup { grid-template-columns:1fr 1.2fr; }
 #lobby-settings #open-garage { grid-column:1/-1; min-height:44px; }
 #lobby .entry-actions { position:static; padding:8px 0; background:#285797; }
 #panel #start { min-width:0; flex:1; font-size:18px; }
 #lobby .room-row > span { display:block; font-size:12px; }
 #lobby .room-row strong { display:block; font-size:20px; letter-spacing:2px; }
 #lobby .room-row button { font-size:12px; }
}
@media(max-width:600px) {
 body > header { display:grid; grid-template-columns:minmax(0,1fr) auto auto auto; gap:2px 6px; height:60px; padding:6px 12px; }
 body > header > a { grid-column:1; grid-row:1; font-size:10px; letter-spacing:.6px; white-space:nowrap; }
 body > header > #connection { grid-column:1; grid-row:2; margin-left:0; font-size:11px; }
 body > header > :is(#exit,#sound,#ggBugReport) { grid-row:1/span 2; min-height:44px; padding:7px 9px; font-size:12px; white-space:nowrap; }
 body > header > #exit { grid-column:2; }
 body > header > #sound { grid-column:3; }
 body > header > #ggBugReport { grid-column:4; }
}
@media(max-height:520px) and (min-width:761px) {
 body > header { height:48px; }
 #panel:has([data-endpoint="/rider/rooms"]) { top:58px; bottom:12px; padding:12px 18px; gap:10px; }
 #panel > .brand-line { display:none; }
 #panel > h1 { font-size:24px; }
 #panel .gg-room-directory { min-height:80px; }
 #panel:has([data-room-directory]) #lobby #members { grid-template-rows:repeat(2,70px); height:150px; flex:none; }
 #members li { min-height:70px; padding:6px; font-size:12px; gap:0; }
 .rider-seat-kart { height:48px; max-width:100px; margin:0; }
 #lobby-settings #rider-setup { grid-template-columns:1fr 1.25fr 64px; }
 #lobby-settings #mode-picker { flex-direction:row; gap:4px; }
 #lobby-settings #mode-picker button { padding:5px; font-size:11px; }
 #lobby-settings #map-picker { display:flex; align-items:center; gap:5px; }
 #lobby-settings #maps { flex:1; min-width:0; }
 #lobby-settings .current-track svg { display:none; }
 #lobby-settings .current-track strong { font-size:11px; }
 #lobby-settings #show-tracks { width:76px; margin:0; font-size:12px; padding:5px; white-space:nowrap; }
 #lobby-settings #open-garage { display:flex; min-height:44px; }
 #panel #start { min-width:140px; font-size:18px; }
 #lobby .entry-actions { flex-direction:row; gap:6px; }
 #lobby .entry-actions button { min-height:44px; }
}
