/* cu-carrace: Car race mini game. Builds on the Stock tap look (stocktap/st.css: st-ov, st-box, st-* pieces). */
html.rc-lock .viewport .screen.active { overflow: hidden !important; }
html.rc-play .viewport > :not(.rc-ov) { visibility: hidden; }
html.rc-play, html.rc-play body { overscroll-behavior: none; }
.rc-ov { z-index: 8710; }
/* pre-race */
.rc-hero { position: relative; display: flex; align-items: center; gap: 12px; margin: 0 0 10px; padding: 10px; border-radius: 18px;
  background: radial-gradient(120% 120% at 0% 50%, rgba(0,163,255,0.2), transparent 60%), rgba(5,12,24,0.6); border: 1px solid rgba(0,163,255,0.3); }
.rc-hero-pic { flex: 0 0 44%; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; background: #0b1730; }
.rc-hero-pic img, .rc-c-pic img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 58%; }
.rc-hero-pic.tall img, .rc-c-pic.tall img { object-position: 50% 50%; }
.flip img { transform: scaleX(-1); }
.rc-hero-cap { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rc-hero-k { font-size: 10px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: #9fdcff; }
.rc-hero-cap > b { font-size: 16px; font-weight: 900; line-height: 1.15; }
.rc-hero-s { display: flex; align-items: center; gap: 7px; margin-top: 4px; font-size: 11px; font-weight: 800; color: #9aa3b2; }
.rc-hero-s .rc-spd { flex: 1; }
.rc-hero-s b { color: #ffd25e; font-size: 12px; white-space: nowrap; }
.rc-hero-m { font-size: 11px; font-weight: 700; color: #9fb4c9; line-height: 1.3; }
.rc-spd { display: block; height: 7px; border-radius: 7px; background: rgba(255,255,255,0.1); overflow: hidden; box-shadow: 0 0 0 1px rgba(255,255,255,0.06) inset; }
.rc-spd i { display: block; height: 100%; border-radius: 7px; background: linear-gradient(90deg, #2ee68c, #ffd25e 55%, #ff6b80); background-size: 220px 100%; }
.rc-hint { margin: 0 0 10px; padding: 8px 11px; border-radius: 12px; font-size: 12.5px; font-weight: 700; line-height: 1.35; color: #cfe9ff; background: rgba(0,163,255,0.1); border: 1px dashed rgba(0,163,255,0.4); }
.rc-rules li { padding: 8px 12px; font-size: 13px; }
/* play */
.rc-playv { padding-bottom: calc(12px + env(safe-area-inset-bottom)); overflow: hidden; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: none; }
.rc-hud { display: flex; align-items: flex-end; gap: 14px; padding-right: 44px; }
.rc-time { flex: 1; min-width: 0; }
.rc-hc, .rc-hl { text-align: right; }
.rc-hc b { display: block; font-size: 30px; line-height: 1.05; font-weight: 900; font-variant-numeric: tabular-nums; color: #ffd25e; min-width: 2.2em; }
.rc-h { display: flex; gap: 4px; justify-content: flex-end; height: 32px; align-items: center; }
.rc-h i { width: 16px; height: 16px; border-radius: 50%; background: rgba(255,255,255,0.12); box-shadow: 0 0 0 1px rgba(255,255,255,0.15) inset; transition: background .2s ease; }
.rc-h i.on { background: radial-gradient(circle at 35% 30%, #ffb3c0, #ff5d73 60%, #d32846); box-shadow: 0 0 10px rgba(255,93,115,0.55); }
.rc-stat.gold { color: #ffd25e; background: rgba(255,210,94,0.12); border-color: rgba(255,210,94,0.45); }
.rc-stat.hot { color: #ffb37a; background: rgba(255,140,60,0.12); border-color: rgba(255,140,60,0.45); }
.rc-stage { position: relative; flex: 1; min-height: 220px; border-radius: 18px; overflow: hidden; background: #0b1424; border: 1px solid rgba(0,163,255,0.22); touch-action: none; cursor: pointer; }
.rc-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.rc-pause { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(3,8,16,0.72); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); cursor: default; }
.rc-pause[hidden] { display: none; }
.rc-pause-in { width: min(86%, 320px); display: grid; gap: 9px; text-align: center; padding: 16px; border-radius: 18px; background: rgba(11,20,36,0.94); border: 1px solid rgba(0,163,255,0.3); }
.rc-pause-h { font-size: 22px; font-weight: 900; }
.rc-pause-t { margin: 0 0 4px; font-size: 13px; line-height: 1.4; color: #cfd6e2; }
.rc-pause .btn-ghost { min-height: 46px; }
.rc-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.rc-b { min-height: 64px; border-radius: 18px; font: inherit; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; color: #e8f6ff;
  border: 1px solid rgba(127,214,255,0.55); background: linear-gradient(180deg, rgba(0,163,255,0.32), rgba(0,110,190,0.22)); box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 8px 20px rgba(0,0,0,0.3);
  touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; transition: transform .08s ease; }
.rc-b b { font-size: 22px; line-height: 1; }
.rc-b small { font-size: 13px; font-weight: 900; letter-spacing: .04em; }
.rc-b:active { transform: scale(0.95) translateY(1px); }
/* results */
.rc-big { font-size: 56px; }
.rc-why { margin: 2px 0 4px; text-align: center; font-size: 13.5px; font-weight: 800; color: #dfe5ee; }
/* entry: Garage card */
.rc-host { display: block; }
.rc-card { display: block; width: 100%; margin: 4px 0 14px; padding: 12px 12px 11px; border-radius: 18px; font: inherit; text-align: left; color: #fff; cursor: pointer;
  background: radial-gradient(120% 140% at 0% 0%, rgba(0,163,255,0.24), transparent 60%), linear-gradient(135deg, rgba(0,163,255,0.14), rgba(255,210,94,0.08));
  border: 1px solid rgba(0,163,255,0.5); box-shadow: 0 8px 24px rgba(0,0,0,0.35), 0 0 22px rgba(0,163,255,0.14); -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: transform .12s ease; }
.rc-card:active { transform: scale(0.98); }
.rc-c-top { display: flex; align-items: center; gap: 11px; }
.rc-c-pic { flex: 0 0 auto; width: 84px; height: 54px; border-radius: 12px; overflow: hidden; background: #0b1730; box-shadow: 0 0 0 1px rgba(127,214,255,0.35) inset; }
.rc-c-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rc-c-tx b { font-size: 17px; font-weight: 800; line-height: 1.2; }
.rc-c-tx small { font-size: 11px; font-weight: 700; color: #9fdcff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-c-spd { display: flex; align-items: center; gap: 7px; margin-top: 3px; }
.rc-c-spd .rc-spd { flex: 1; height: 6px; }
.rc-c-spd em { font-style: normal; font-size: 10.5px; font-weight: 900; color: #ffd25e; white-space: nowrap; }
.rc-card .rc-c-go { padding: 9px 16px; font-size: 15px; border-radius: 13px; }
.rc-card .st-c-stats { margin-top: 10px; }
/* entry: slim chip under Stock tap */
.rc-chip { display: flex; align-items: center; gap: 10px; width: 100%; margin: -6px 0 14px; padding: 8px 10px 8px 11px; border-radius: 14px; font: inherit; text-align: left; color: #fff; cursor: pointer;
  background: rgba(0,163,255,0.08); border: 1px solid rgba(0,163,255,0.32); -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: transform .12s ease; }
.rc-chip:active { transform: scale(0.98); }
.rc-chip-ic { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; background: rgba(127,214,255,0.14); box-shadow: 0 0 0 1px rgba(127,214,255,0.4) inset; }
.rc-chip-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rc-chip-tx b { font-size: 13.5px; font-weight: 800; line-height: 1.2; }
.rc-chip-tx small { font-size: 11px; font-weight: 700; color: #9fdcff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-chip-go { flex: 0 0 auto; font-size: 13px; font-weight: 900; color: #7fd6ff; }
@media (prefers-reduced-motion: reduce) { .rc-card, .rc-chip, .rc-b { transition: none; } }
.rc-c-min { font-style: normal; font-size: 10.5px; font-weight: 900; letter-spacing: .06em; color: #9fdcff; vertical-align: 2px; margin-left: 4px; padding: 2px 6px; border-radius: 6px; background: rgba(0,163,255,0.14); }

/* Night Run controls */
.rc-btns { grid-template-columns: 1fr 1.3fr 1fr; }
.rc-boost { flex-direction: column; gap: 3px; background: linear-gradient(135deg,#084b67,#165596); border-color:#51dbff; }
.rc-boost:disabled { opacity:.55; cursor:default; }
.rc-boost:not(:disabled) { box-shadow:0 0 20px #24c8ff55; color:#c8ffff; }
.rc-boost small { font-size:10px; }
.rc-time b { font-size:clamp(22px,6vw,32px); }
.rc-c-tx b { font-size:16px; }
.rc-c-min { margin-left:0; }
@media(max-height:600px) { .rc-stage { min-height:140px; } .rc-b { min-height:44px; } .rc-stat { margin:4px 0; } }

/* Night Run v2: district bar caption, drawn boost bolt, portrait-only overlay */
.rc-nd { display: block; margin-top: 4px; font-size: 10px; font-weight: 800; letter-spacing: 0; color: #9fb4c9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-bolt { display: block; width: 22px; height: 22px; color: #7f9db8; transition: color .2s ease, transform .2s ease; }
.rc-boost:not(:disabled) .rc-bolt { color: #ffd25e; filter: drop-shadow(0 0 6px rgba(255,210,94,.7)); }
.rc-boost:disabled .rc-bolt { opacity: .9; }
.rc-rot { display: none; position: fixed; inset: 0; z-index: 2147483000; align-items: center; justify-content: center; padding: 20px;
  background: radial-gradient(120% 120% at 50% 0%, rgba(0,163,255,0.18), transparent 60%), #050b16; color: #fff; text-align: center; touch-action: none; }
.rc-rot.on { display: flex; }
.rc-rot-in { display: grid; justify-items: center; gap: 10px; max-width: 340px; }
.rc-rot-in b { font-size: 22px; font-weight: 900; line-height: 1.2; }
.rc-rot-in p { margin: 0; font-size: 14px; font-weight: 700; line-height: 1.4; color: #9fb4c9; }
.rc-rot-ph { position: relative; width: 34px; height: 58px; border-radius: 8px; border: 3px solid #7fd6ff; box-shadow: 0 0 18px rgba(0,163,255,.45); animation: rcRot 2.2s ease-in-out infinite; }
.rc-rot-ph i { position: absolute; left: 50%; bottom: 4px; width: 8px; height: 3px; margin-left: -4px; border-radius: 2px; background: #7fd6ff; }
@keyframes rcRot { 0%, 25% { transform: rotate(-90deg); } 55%, 100% { transform: rotate(0deg); } }
@media (prefers-reduced-motion: reduce) { .rc-rot-ph { animation: none; } }

/* cu-lb-race: Top drivers (best distance) on the start + result screens */
.rc-top { margin: 12px 0 4px; padding: 10px; border-radius: 16px; background: rgba(5,12,24,0.6); border: 1px solid rgba(255,255,255,0.1); }
.rc-top-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 2px 6px; }
.rc-top-h span { font-size: 14px; font-weight: 900; }
.rc-top-h small { font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: #9aa3b2; }
.rc-top-msg { margin: 4px 2px; font-size: 12.5px; font-weight: 600; color: #9aa3b2; line-height: 1.4; }
.rc-top-l { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.rc-tr { display: grid; grid-template-columns: 26px 52px minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 12px; border: 1px solid transparent; }
.rc-tr.me { background: rgba(0,163,255,0.1); border-color: rgba(0,163,255,0.45); }
.rc-tr-rk { justify-self: center; font-size: 12.5px; font-weight: 900; color: #3bb7ff; font-variant-numeric: tabular-nums; }
.rc-tr-rk.rk1, .rc-tr-rk.rk2, .rc-tr-rk.rk3 { display: grid; place-items: center; box-sizing: border-box; border-radius: 50%; line-height: 1; color: #1a1204; }
.rc-tr-rk.rk1 { width: 26px; height: 26px; font-size: 13px; background: linear-gradient(180deg,#ffe58a,#f5a321); border: 1.5px solid #fff1b8; box-shadow: 0 0 8px rgba(255,200,80,.4); }
.rc-tr-rk.rk2 { width: 23px; height: 23px; font-size: 12px; background: linear-gradient(180deg,#f4f7fb,#a9b4c2); border: 1.5px solid #fff; }
.rc-tr-rk.rk3 { width: 21px; height: 21px; font-size: 11.5px; background: linear-gradient(180deg,#f2b88a,#b8693a); border: 1.5px solid #ffd7b5; }
.rc-tr-car { width: 52px; height: 32px; border-radius: 8px; overflow: hidden; background: #0b1730; }
.rc-tr-car img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 58%; }
.rc-tr-who { min-width: 0; display: flex; flex-direction: column; }
.rc-tr-who b { font-size: 13px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-tr-who small { font-size: 11px; font-weight: 700; color: #9aa3b2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-tr-d { font-size: 13px; font-weight: 900; color: #ffd25e; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rc-top-gap { text-align: center; color: rgba(255,255,255,.3); font-size: 14px; font-weight: 800; letter-spacing: .3em; line-height: 1; padding: 3px 0; }
.rc-tr-who b.rc-hasadm { display: flex; align-items: center; min-width: 0; }
.rc-tr-who b.rc-hasadm > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* namefit: full names (max 16), wrap instead of ellipsis; the ADMIN tag drops under a long name */
.rc-tr-who b { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: break-word; line-height: 1.2; }
.rc-tr-who b.rc-hasadm { flex-wrap: wrap; row-gap: 2px; }
.rc-tr-who b.rc-hasadm > span { overflow: visible; text-overflow: clip; overflow-wrap: break-word; }
.rc-adm { flex: 0 0 auto; font-style: normal; display: inline-block; margin-left: 6px; padding: 1px 5px; border-radius: 999px; font-size: 9px; font-weight: 900; letter-spacing: .06em; vertical-align: 1px; color: #2a1500; background: linear-gradient(180deg,#ffe58a,#f5a321); border: 1px solid #fff1b8; }   /* cu-admin */

/* ---- night-run-6: sound toggle, stats, daily challenge, tuning, week tabs ---- */
.rc-mute { position: absolute; top: 12px; right: 62px; z-index: 6; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.14); background: rgba(10,16,30,.75); color: #fff; font-size: 18px; line-height: 1; display: grid; place-items: center; }
.rc-mute.off { opacity: .7; }
.rc-hc.bump b { animation: rc-bump .22s ease-out; }
@keyframes rc-bump { 50% { transform: scale(1.18); color: #fff3b0; } }
.rc-tunebtn { margin-top: 6px; align-self: flex-start; padding: 7px 11px; border-radius: 999px; border: 1px solid rgba(255,210,94,.45); background: rgba(255,210,94,.1); color: #ffe7a6; font: inherit; font-size: 12px; font-weight: 800; }
.rc-stats { margin: 0 0 10px; padding: 10px 12px; border-radius: 16px; background: rgba(12,22,42,.7); border: 1px solid rgba(120,170,255,.16); display: grid; gap: 6px; }
.rc-srow { display: grid; grid-template-columns: 74px 1fr auto; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; color: #9fb4c9; }
.rc-srow b { color: #fff; font-size: 12px; white-space: nowrap; } .rc-srow b small { color: #64ffdb; font-weight: 800; }
.rc-lv { grid-template-columns: 74px 1fr; } .rc-lv b { letter-spacing: 1px; font-size: 13px; }
.rc-pips { display: flex; gap: 4px; } .rc-pips i { flex: 1; height: 7px; border-radius: 4px; background: rgba(255,255,255,.1); max-width: 34px; }
.rc-pips i.on { background: linear-gradient(90deg, #3fb7ff, #64ffdb); } .rc-pips i.up { background: linear-gradient(90deg, #ffd25e, #ff9a3d); }
.rc-pips.sm { margin-top: 5px; } .rc-pips.sm i { height: 5px; max-width: 26px; }
.rc-perk { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; line-height: 1.35; color: #c9d6e6; padding: 7px 9px; border-radius: 12px; background: rgba(100,255,219,.07); border: 1px dashed rgba(100,255,219,.3); }
.rc-perk b { color: #64ffdb; }
.rc-ch { margin: 0 0 10px; padding: 11px 12px; border-radius: 16px; background: linear-gradient(135deg, rgba(155,123,255,.18), rgba(63,183,255,.1)); border: 1px solid rgba(155,123,255,.4); }
.rc-ch.done { border-color: rgba(46,230,140,.55); background: linear-gradient(135deg, rgba(46,230,140,.16), rgba(63,183,255,.08)); }
.rc-ch-h { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; font-size: 13px; font-weight: 900; color: #fff; } .rc-ch-h small { font-size: 11px; color: #d9ccff; font-weight: 800; text-align: right; }
.rc-ch.done .rc-ch-h small { color: #7dffb9; }
.rc-ch-t { display: flex; gap: 8px; align-items: center; margin: 6px 0 7px; font-size: 14px; line-height: 1.3; } .rc-ch-ic { font-size: 20px; }
.rc-ch-bar { height: 8px; border-radius: 5px; background: rgba(255,255,255,.1); overflow: hidden; } .rc-ch-bar i { display: block; height: 100%; background: linear-gradient(90deg, #9b7bff, #64ffdb); border-radius: 5px; }
.rc-ch-p { display: block; margin-top: 5px; font-size: 11px; color: #a9b6c8; font-weight: 700; }
.rc-c-ch { color: #d9ccff !important; }
.rc-earn { margin: 8px 0; padding: 9px 12px; border-radius: 14px; background: rgba(255,210,94,.1); border: 1px solid rgba(255,210,94,.3); font-weight: 900; color: #ffe7a6; font-size: 14px; } .rc-earn small { color: #b8a77a; font-weight: 700; }
.rc-chwin { margin: 0 0 8px; padding: 10px 12px; border-radius: 14px; background: rgba(46,230,140,.16); border: 1px solid rgba(46,230,140,.5); font-weight: 800; color: #c9ffe3; font-size: 14px; animation: rc-bump .5s ease-out; }
.rc-wallet { margin: 0 0 10px; padding: 10px 12px; border-radius: 14px; background: rgba(255,210,94,.1); border: 1px solid rgba(255,210,94,.35); font-size: 15px; color: #ffe7a6; } .rc-wallet small { display: block; font-size: 11px; color: #b8a77a; font-weight: 700; margin-top: 2px; }
.rc-hero-sm { justify-content: center; } .rc-hero-sm .rc-hero-pic { flex: 0 0 70%; background: transparent; } .rc-hero-pic.cut img { object-fit: contain; }
.rc-hero-pic.flip.cut img { transform: scaleX(-1); }
.rc-sub { margin: 14px 0 6px; font-size: 14px; font-weight: 900; color: #fff; } .rc-sub small { color: #8b97a8; font-weight: 700; font-size: 11px; margin-left: 4px; }
.rc-tu { display: flex; align-items: center; gap: 10px; padding: 9px 10px; margin-bottom: 6px; border-radius: 14px; background: rgba(12,22,42,.7); border: 1px solid rgba(120,170,255,.14); }
.rc-tu-ic { font-size: 22px; } .rc-tu-tx { flex: 1; min-width: 0; } .rc-tu-tx b { display: block; font-size: 14px; } .rc-tu-tx small { display: block; font-size: 11px; color: #9fb4c9; line-height: 1.3; }
.rc-tu-b { min-width: 82px; padding: 9px 10px; font-size: 13px; } .rc-tu-b[disabled] { opacity: .45; }
.rc-tu-max { font-weight: 900; color: #64ffdb; font-size: 12px; padding: 0 8px; }
.rc-sws { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.rc-sw { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px; border-radius: 12px; background: rgba(12,22,42,.7); border: 1px solid rgba(120,170,255,.14); color: #fff; font: inherit; }
.rc-sw i { width: 26px; height: 26px; border-radius: 50%; box-shadow: 0 0 10px currentColor; border: 2px solid rgba(255,255,255,.4); } .rc-sw i.none { background: repeating-linear-gradient(45deg, #333 0 4px, #555 4px 8px); }
.rc-sw small { font-size: 10px; font-weight: 800; line-height: 1.15; text-align: center; color: #c9d6e6; } .rc-sw em { font-style: normal; font-size: 10px; font-weight: 900; color: #ffd25e; }
.rc-sw.on { border-color: #64ffdb; background: rgba(100,255,219,.1); } .rc-sw.on em { color: #64ffdb; } .rc-sw[disabled] { opacity: .45; }
.rc-tabs { display: inline-flex; gap: 2px; padding: 2px; border-radius: 999px; background: rgba(255,255,255,.07); }
.rc-tabs button { border: 0; background: transparent; color: #9fb4c9; font: inherit; font-size: 11px; font-weight: 900; padding: 5px 10px; border-radius: 999px; }
.rc-tabs button[aria-selected="true"] { background: #ffd25e; color: #1a1300; }
.rc-stage > .rc-mute { top: 8px; right: 8px; width: 34px; height: 34px; font-size: 15px; background: rgba(5,10,20,.55); }
.rc-mute[hidden] { display: none; }

/* ---- night-run-14: landscape race (phone sideways). Wide road, HUD in one slim row, Up/Down on the left thumb, Boost on the right. ---- */
@media (orientation: landscape) and (max-height: 500px) {
  .rc-ov.playing { position: fixed; inset: 0; }
  .rc-ov.playing .rc-box { position: relative; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; border-radius: 0; border: 0;
    padding: 6px max(10px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); overflow: hidden; }
  .rc-ov.playing .st-x { top: 6px; right: max(8px, env(safe-area-inset-right)); width: 34px; height: 34px; }
  .rc-ov.playing .rc-playv { height: 100%; padding: 0; display: grid; gap: 6px 8px; grid-template-columns: 84px 1fr 96px; grid-template-rows: auto 1fr 1fr;
    grid-template-areas: "hud hud hud" "up stage boost" "down stage boost"; }
  .rc-ov.playing .rc-hud { grid-area: hud; align-items: center; gap: 16px; padding-right: 46px; min-height: 36px; }
  .rc-ov.playing .rc-hud .st-k { font-size: 9px; }
  .rc-ov.playing .rc-time { display: flex; align-items: center; gap: 10px; flex: 0 1 260px; }
  .rc-ov.playing .rc-time b { font-size: 20px; white-space: nowrap; } .rc-ov.playing .rc-time .st-tbar { flex: 1; min-width: 60px; margin: 0; }
  .rc-ov.playing .rc-hc { display: flex; align-items: center; gap: 6px; } .rc-ov.playing .rc-hc b { font-size: 22px; min-width: 1.6em; }
  .rc-ov.playing .rc-hl { display: flex; align-items: center; gap: 6px; } .rc-ov.playing .rc-h { height: 22px; } .rc-ov.playing .rc-h i { width: 13px; height: 13px; }
  .rc-ov.playing .rc-stat { position: absolute; z-index: 3; top: 50px; left: 50%; transform: translateX(-50%); width: auto; max-width: 52%; margin: 0; padding: 4px 12px; font-size: 12px; pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .95; }
  .rc-ov.playing .rc-stage { grid-area: stage; min-height: 0; border-radius: 14px; }
  .rc-ov.playing .rc-btns { display: contents; }
  .rc-ov.playing .rc-b { min-height: 0; margin: 0; flex-direction: column; gap: 2px; border-radius: 16px; }
  .rc-ov.playing .rc-b[data-rc-lane="-1"] { grid-area: up; } .rc-ov.playing .rc-b[data-rc-lane="1"] { grid-area: down; }
  .rc-ov.playing .rc-boost { grid-area: boost; }
  html.rc-play .viewport { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; }
}
.rc-rot-up { margin-top: 10px; padding: 9px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.22); background: transparent; color: #9fb4c9; font: inherit; font-size: 13px; font-weight: 800; }
@keyframes rcRot { 0%, 25% { transform: rotate(0deg); } 55%, 100% { transform: rotate(-90deg); } }
/* cu-modes: mode picker (Endless / Time trial / 60-second sprint) + crash counter in the HUD */
.rc-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 4px 0 12px; }
.rc-md { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 9px 4px 8px; border-radius: 14px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); color: #cfe0f2; font: inherit; text-align: center; cursor: pointer; }
.rc-md span { font-size: 20px; line-height: 1.1; }
.rc-md b { font-size: 12.5px; font-weight: 900; color: #fff; }
.rc-md small { font-size: 10.5px; color: #8fa6bd; line-height: 1.2; }
.rc-md.on { border-color: #ffd25e; background: rgba(255,210,94,.12); box-shadow: 0 0 0 1px rgba(255,210,94,.5) inset; }
.rc-md.on small { color: #ffe3a0; }
.rc-h.rc-hn { font-size: 20px; font-weight: 900; color: #ffd0d8; }
.rc-hud-m .rc-t { font-variant-numeric: tabular-nums; }

/* cu-rcmem (14 Oct 2026): no full-screen backdrop blur behind the race overlay (results / garage). On iPhone (landscape, DPR 3) the
   blur over the whole viewport right after the race was one of the heaviest layers; an almost opaque background looks the same. */
.st-ov.rc-ov, .st-ov.rc-ov.on { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(3,8,16,0.95); }
/* cu-noframe: landscape HUD: show the whole next-district name ("→ Harbor Lights") next to the distance bar instead of an ellipsis */
@media (orientation: landscape) and (max-height: 500px) {
  html body .rc-ov.playing .rc-time { flex: 0 1 380px; }
  html body .rc-ov.playing .rc-nd { flex: 0 0 auto; margin-top: 0; overflow: visible; text-overflow: clip; font-size: 11px; }
  html body .rc-ov:not(.playing) .rc-box { max-height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
}


/* portraitlock (30 Oct 2026): Full screen = CSS 90° rotate while phone stays upright */
.rc-fs { position: absolute; top: 12px; right: 108px; z-index: 6; height: 40px; padding: 0 10px; border-radius: 20px;
  border: 1px solid rgba(255,255,255,.14); background: rgba(10,16,30,.75); color: #fff; font-size: 12px; font-weight: 800;
  letter-spacing: .2px; white-space: nowrap; display: grid; place-items: center; }
.rc-fs.on { background: rgba(0,163,255,.22); border-color: rgba(127,214,255,.7); color: #7fd6ff; }
.rc-ov.playing .rc-fs { top: 6px; right: 100px; height: 34px; font-size: 11px; border-radius: 17px; }
.rc-ov.rc-wide {
  position: fixed !important; inset: auto !important; top: 50% !important; left: 50% !important;
  width: 100vh !important; height: 100vw !important; max-width: none !important; max-height: none !important;
  transform: translate(-50%, -50%) rotate(90deg) !important; transform-origin: center center !important;
  border-radius: 0 !important; z-index: 2147483000 !important;
  display: flex !important; opacity: 1 !important;
}
.rc-ov.rc-wide .rc-box {
  width: 100% !important; max-width: none !important; height: 100% !important; max-height: none !important;
  margin: 0 !important; border-radius: 0 !important; border: 0 !important;
  padding: 6px 10px !important; overflow: hidden !important;
}
.rc-ov.rc-wide .rc-playv {
  height: 100%; padding: 0; display: grid; gap: 6px 8px;
  grid-template-columns: 84px 1fr 96px; grid-template-rows: auto 1fr 1fr;
  grid-template-areas: "hud hud hud" "up stage boost" "down stage boost";
}
