/* The garage and every menu, in stage units (see style.css: #ui is a stage at least 960 x 540, scaled as one piece).
   Sizes here are fixed numbers on purpose: there is one layout, and it is the same picture at every window size. */

/* ============================================================ the garage: the street, one bar of places, four ways out */
#s-garage { pointer-events: none; }
/* THE BAR: the garage's five places in one row, in the same spot on the street and inside every place */
.gar-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 8px; min-height: 50px;
  padding: calc(var(--safe-t) + 6px) calc(var(--safe-r) + var(--edge)) 6px calc(var(--safe-l) + var(--edge));
  background: linear-gradient(180deg, rgba(8,10,14,.86), rgba(8,10,14,.55) 70%, rgba(8,10,14,0)); pointer-events: none; }
.gar-top > * { pointer-events: auto; }
.gar-top.in-place { background: rgba(12,14,20,.94); border-bottom: 1px solid var(--line2); z-index: 22; }
.sec-tabs { display: flex; align-items: center; gap: 4px; }
.sec-tab { position: relative; display: inline-flex; align-items: center; gap: 5px; min-height: 38px; padding: 0 10px; border-radius: 11px; background: rgba(11,13,18,.74); border: 1px solid var(--line2);
  color: var(--ink); font-weight: 900; font-size: 13px; letter-spacing: .03em; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.sec-tab:hover, .sec-tab:focus-visible { border-color: var(--amber); outline: none; }
.sec-tab.on { background: #ff9f1c; border-color: #ffd98a; color: #1a1200; }
.sec-tab .badge { margin-left: 1px; }
.sec-tab.on .badge { background: #1a1200; color: var(--amber2); }
/* inside a place the row shares the bar with the way back, the cash and Drive (or Start race): the names alone */
.gar-top.in-place .sec-tab .badge { display: none; }
.gar-tools { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.gar-tools .cash { margin-right: 4px; font-size: 17px; text-shadow: 0 2px 8px rgba(0,0,0,.7); }
.btn.tool { position: relative; background: rgba(11,13,18,.74); min-height: 38px; padding: 0 11px; }
.btn.tool.iconbtn { width: 38px; padding: 0; }
.btn.tool .ico { width: 18px; height: 18px; }
.tool .newdot { display: none; position: absolute; top: -3px; right: -3px; width: 10px; height: 10px; border-radius: 50%; background: var(--hot); box-shadow: 0 0 0 2px rgba(10,12,18,.9), 0 0 10px var(--hot); }
.tool.unread .newdot { display: block; animation: updpulse 2.2s ease-in-out infinite; }
@keyframes updpulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.25); opacity: .72; } }
.tool .badge { position: absolute; top: -7px; right: -6px; }
.gar-top .btn.drive { min-height: 38px; padding: 0 16px; }
.gar-bottom { position: absolute; left: 50%; bottom: calc(var(--safe-b) + 12px); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; }
.gar-bottom > * { pointer-events: auto; }
.gar-cta { display: flex; align-items: center; gap: 10px; }
.gar-cta .btn.big { min-width: 118px; min-height: 48px; }
.gar-cta .btn.drive { min-width: 140px; }
/* THE MODE DECK (v0.9.6): the modes in a column on the left, clear of the car; each card says what is waiting in it */
.gar-bottom:has(> .deck) { z-index: 22; left: calc(var(--safe-l) + var(--edge, 14px)); transform: none; align-items: stretch; width: min(280px, 34vw); }
.gar-bottom:has(> .deck) > .gift-banner.garage { order: -1; width: auto; padding: 6px 10px; }
.gar-bottom:has(> .deck) > .gift-banner.garage .small { display: none; }
.deck { flex-direction: column; align-items: stretch; gap: 7px; }
.deck-card { position: relative; display: flex; align-items: center; gap: 11px; padding: 9px 12px; min-height: 56px; border-radius: 14px; text-align: left; font: inherit; color: var(--ink); cursor: pointer;
  background: rgba(12,14,20,.86); border: 1px solid var(--line2); box-shadow: 0 8px 22px rgba(0,0,0,.4); transition: transform .12s, border-color .12s, background .12s; }
.deck-card:hover { transform: translateX(3px); }
.deck-card .dk-ico { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.06); }
.deck-card .dk-ico .ico { width: 18px; height: 18px; }
.deck-card .dk-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.deck-card .dk-t b { font-size: 16px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.deck-card .dk-l { font-size: 12px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deck-card .badge { position: absolute; top: -7px; right: -7px; }
.deck-card.drive { min-height: 66px; background: linear-gradient(180deg, var(--amber2), var(--amber)); border-color: var(--amber); color: #2a1200; }
.deck-card.drive .dk-ico { background: rgba(42,18,0,.16); } .deck-card.drive .dk-l { color: rgba(42,18,0,.75); } .deck-card.drive .dk-t b { font-size: 19px; }
.deck-card.race { border-color: var(--amber3); } .deck-card.race .dk-ico { color: var(--amber2); background: rgba(255,159,28,.12); }
.deck-card.job { border-color: rgba(190,120,220,.45); } .deck-card.job .dk-ico { color: #d9a8f0; background: rgba(190,120,220,.12); }
.deck-card.events { border-color: var(--violet3); } .deck-card.events .dk-ico { color: var(--violet2); background: rgba(166,107,255,.14); }
.deck-card.clubs { border-color: rgba(20,184,166,.55); } .deck-card.clubs .dk-ico { color: #5eead4; background: rgba(20,184,166,.14); }
.gar-tools .cash { display: inline-flex; align-items: center; gap: 5px; } .gar-tools .cash.wallet b { margin-right: 6px; color: #e9ddff; }
.mp-chip { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font: inherit; font-size: 12px; font-weight: 800;
  background: rgba(12,14,20,.7); border: 1px dashed rgba(160,195,240,.45); color: #a9c4e6; cursor: default; }
.mp-chip .soon-t { font-weight: 600; color: var(--dim); }
/* a mid-height window (laptops, the CrazyGames frame): the five cards tighten so the deck stays clear of the signs */
@media (max-height: 760px) and (min-height: 521px) {
  .deck { gap: 5px; } .deck-card { min-height: 46px; padding: 6px 10px; gap: 9px; } .deck-card.drive { min-height: 54px; }
  .deck-card .dk-ico { width: 28px; height: 28px; } .deck-card .dk-t b { font-size: 14px; } .deck-card.drive .dk-t b { font-size: 16px; } .deck-card .dk-l { font-size: 11px; }
  .gar-bottom:has(> .deck) > .gift-banner.garage { padding: 4px 8px; }
}
/* a short window (phones held sideways, the small CrazyGames frame): the deck becomes one row along the bottom */
@media (max-height: 520px) {
  .gar-bottom:has(> .deck) { left: 50%; transform: translateX(-50%); width: min(96vw, 760px); }
  .deck { flex-direction: row; } .deck-card { flex: 1 1 0; min-width: 0; min-height: 48px; padding: 6px 9px; gap: 7px; }
  .deck-card.drive { min-height: 48px; } .deck-card .dk-l { display: none; } .deck-card .dk-t b, .deck-card.drive .dk-t b { font-size: 14px; }
  .deck-card .dk-ico { width: 26px; height: 26px; } .mp-chip:not(.live) { display: none; }
  .gar-bottom:has(> .deck) > .gift-banner.garage { align-self: center; }
}
.btn.race { background: linear-gradient(180deg, #3a2f18, #241c0e); border-color: var(--amber3); color: var(--amber2); }
.btn.job { background: linear-gradient(180deg, #33203a, #1c1122); border-color: rgba(190,120,220,.45); color: #d9a8f0; }
.btn.events { position: relative; background: linear-gradient(180deg, #2c1d4a, #1a1030); border-color: var(--violet3); color: var(--violet2); }
.btn.events .badge { position: absolute; top: -8px; right: -8px; }
/* multiplayer, coming soon: in the row, faded, with its label hanging off the corner */
.btn.mp { position: relative; background: linear-gradient(180deg, #1d2a3a, #121a26); border-color: rgba(120,170,230,.35); color: #a9c4e6; }
.btn.mp.soon { opacity: .55; filter: saturate(.6); cursor: default; }
.btn.mp.soon:hover { transform: none; filter: saturate(.6); }
.btn.mp .badge.soon { position: absolute; top: -9px; right: -10px; background: #2b3950; color: #dce8f8; border: 1px solid rgba(160,195,240,.55); font-size: 11px; letter-spacing: .03em; white-space: nowrap; }
/* a gift waiting: one banner, above the four buttons */
.gift-banner { display: flex; align-items: center; gap: 11px; text-align: left; padding: 8px 12px; border-radius: 13px; background: linear-gradient(90deg, rgba(20,60,44,.94), rgba(44,26,80,.94)); border: 1px solid var(--mint); color: var(--ink); animation: giftPulse 1.6s ease-in-out infinite; }
.gift-banner > .ico { width: 24px; height: 24px; color: var(--mint2); }
.gift-banner .gb-text { flex: 1; min-width: 0; line-height: 1.25; }
.gift-banner b { font-size: 14px; }
.gift-banner.garage { width: 440px; }
.gift-banner.slim { padding: 4px 6px 4px 10px; border-radius: 11px; }
.gift-banner.slim b { font-size: 12.5px; white-space: nowrap; }
@keyframes giftPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(61,220,151,0); } 50% { box-shadow: 0 0 20px 1px rgba(61,220,151,.4); } }
/* a race picked on the list, waiting while the car is tuned for it */
.race-next { width: 500px; display: flex; flex-direction: column; gap: 6px; padding: 9px 13px; border-radius: 13px; border: 1px solid var(--amber3); background: rgba(12,14,20,.92); }
.race-next .rn-t { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.race-next .rn-t b { font-size: 15px; font-weight: 900; }
.race-next .rn-win { color: var(--mint); font-weight: 900; white-space: nowrap; }

/* ---- the signs standing on the places: on the street they are how a place is opened (Uday, 02-10) */
.shop-pins { position: absolute; inset: 0; pointer-events: none; z-index: 20; }
.shop-pins[hidden], .shop-tray[hidden], .shop-mid[hidden], .pin-badge[hidden] { display: none !important; }
.pin { position: absolute; left: 0; top: 0; pointer-events: auto; display: inline-flex; gap: 7px; align-items: center; min-height: 38px; padding: 0 14px 0 11px; border-radius: 12px; background: rgba(12,14,20,.9); color: #f4f1ea; border: 1px solid rgba(255,190,90,.6); font-weight: 900; font-size: 14px; letter-spacing: .03em; white-space: nowrap; box-shadow: 0 6px 18px rgba(0,0,0,.45); transition: background .15s, border-color .15s, color .15s; }
/* the stem: from the sign down to the thing it names, longer when the sign has climbed clear of another */
.pin::after { content: ''; position: absolute; left: 50%; top: 100%; width: 2px; height: var(--stem, 14px); margin-left: -1px; background: linear-gradient(180deg, rgba(255,190,90,.85), rgba(255,190,90,.15)); pointer-events: none; }
.pin::before { content: ''; position: absolute; left: 50%; top: calc(100% + var(--stem, 14px)); width: 7px; height: 7px; margin: -3px 0 0 -3.5px; border-radius: 50%; background: var(--amber2); box-shadow: 0 0 8px rgba(255,170,60,.8); pointer-events: none; }
.pin:hover, .pin.hot, .pin:focus-visible { background: #ff9f1c; border-color: #ffd98a; color: #1a1200; outline: none; }
.pin:hover .ico, .pin.hot .ico { color: #1a1200; }
.pin.edge-left::after, .pin.edge-right::after, .pin.edge-left::before, .pin.edge-right::before { display: none; }
.pin .ico { width: 16px; height: 16px; color: var(--amber2); }
.pin-badge { min-width: 19px; height: 19px; line-height: 19px; text-align: center; background: #ff3b30; color: #fff; border-radius: 999px; padding: 0 5px; font-size: 11px; font-weight: 900; }

/* ---- a place: the car large and whole across the top, its numbers beside it, and a tray of everything it offers */
.shop-tray { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--tray) + var(--safe-b)); z-index: 21; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0;
  padding: 0 calc(var(--safe-r) + 6px) var(--safe-b) calc(var(--safe-l) + 6px); pointer-events: auto; color: #f1ede3; background: rgba(12,14,20,.96); border-top: 1px solid var(--line2); box-shadow: 0 -18px 50px rgba(0,0,0,.5);
  transform: translateY(30px); opacity: 0; transition: transform .28s cubic-bezier(.2,.8,.2,1), opacity .2s; }
.shop-tray.in { transform: none; opacity: 1; }
.shop-tray.full { grid-template-columns: minmax(0, 1fr); }
.shop-tray.drafting { grid-template-columns: 318px minmax(0, 1fr); }
.tray-half { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 7px 7px 8px; }
.tray-half + .tray-half { border-left: 1px solid var(--line); }
.tray-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 24px; padding: 0 2px 5px; }
.tray-head b { font-weight: 900; font-size: 15px; letter-spacing: .03em; text-transform: uppercase; font-style: italic; color: var(--amber2); white-space: nowrap; padding-right: .1em; }
.tray-head .small { text-align: right; line-height: 1.2; }
.tray-head .ico { color: var(--amber2); }
.tray-extra { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 2px 9px; font-size: 11.5px; font-weight: 800; }
.tray-extra .btn.small { min-height: 33px; padding: 0 12px; font-size: 11px; }
.tray-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 0 2px; }
/* the car's numbers: beside the car, above the left end of the tray */
.shop-mid { position: absolute; left: calc(var(--safe-l) + var(--edge)); bottom: calc(var(--tray) + var(--safe-b) + 8px); width: 222px; z-index: 21; pointer-events: none; }
.spec-card { padding: 7px 11px 8px; border-radius: 13px; background: rgba(12,14,20,.9); border: 1px solid var(--line2); box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.spec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.spec-head b { font-size: 15px; font-style: italic; text-transform: uppercase; white-space: nowrap; }
.spec-head .tag { text-align: right; line-height: 1.15; }
.spec-note { margin-top: 4px; line-height: 1.25; }
.spec-rows { display: grid; grid-template-columns: 15px 52px minmax(26px, 1fr) auto; gap: 3px 7px; align-items: center; font-size: 12px; }
.spec-rows .ico { width: 15px; height: 15px; color: var(--dim); }
.spec-rows .sl { color: var(--ink2); white-space: nowrap; }
.spec-rows .sv { font-weight: 800; white-space: nowrap; text-align: right; min-width: 60px; }

/* ---- Cars: two lists of cards, two across */
.car-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; align-content: start; }
.grid-tag { grid-column: 1 / -1; margin-top: 4px; }
.car-card { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; padding: 3px 5px 3px 11px; border-radius: 11px; min-width: 0; background: rgba(255,255,255,.04); border: 1px solid var(--line); text-align: left; transition: border-color .15s, background .15s; }
button.car-card:hover { border-color: var(--line2); background: rgba(255,255,255,.07); }
.car-card.selected { border-color: var(--amber); box-shadow: 0 0 0 1px rgba(255,159,28,.3) inset; }
.car-card.previewing { border-color: rgba(61,220,151,.75); box-shadow: 0 0 0 1px rgba(61,220,151,.4) inset; }
.car-card.locked { opacity: .7; }
.car-card.event { border-color: rgba(166,107,255,.35); }
.car-card.event .name { color: var(--violet2); }
.car-card.unbuilt { filter: saturate(.75); }
.car-card.owned { opacity: .62; }
.cc-name { flex: 1 1 auto; min-width: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 9px; }
.car-card .name { font-size: 14px; line-height: 1.15; font-weight: 900; font-style: italic; text-transform: uppercase; }
.car-card .tagline { color: var(--ink2); font-size: 12px; line-height: 1.2; }
.cc-act { flex: none; }
/* ---- Upgrades: the eight parts, four across */
.part-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.part-card { display: flex; flex-direction: column; gap: 5px; min-width: 0; padding: 6px 7px 7px; border-radius: 11px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.part-card.can:hover { border-color: rgba(61,220,151,.5); background: rgba(61,220,151,.06); }
.pc-top { display: flex; align-items: center; gap: 7px; min-width: 0; }
.part-ico { flex: none; width: 26px; height: 26px; border-radius: 8px; background: rgba(255,159,28,.1); border: 1px solid rgba(255,159,28,.3); display: flex; align-items: center; justify-content: center; color: var(--amber2); }
.part-ico .ico { width: 17px; height: 17px; }
.part-thumb { width: 24px; height: 24px; display: block; }
.pc-name { min-width: 0; line-height: 1.15; }
.pc-name .nm { font-size: 12.5px; white-space: nowrap; }
.part-card .delta { font-size: 11px; font-weight: 800; white-space: nowrap; color: var(--dim); }
.delta.up { color: var(--mint); } .delta.down { color: var(--amber); }
.part-card .pips i { width: auto; flex: 1; }
.part-card .btn, .part-card .chip { width: 100%; justify-content: center; }
.part-card .btn.small { min-height: 33px; padding: 0 4px; }
/* ---- Tune: the six slots, three across; press one to choose from what you own */
.slot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.slot-card { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; min-width: 0; min-height: 82px; padding: 6px 8px; border-radius: 11px; text-align: left; background: rgba(255,255,255,.04); border: 1px solid var(--line2); color: var(--ink); line-height: 1.2; }
.slot-card:hover:not(:disabled) { border-color: var(--amber); background: rgba(255,159,28,.08); }
.slot-card.on { border-color: var(--mint); background: rgba(61,220,151,.08); }
.slot-card.empty { border-style: dashed; border-color: var(--line2); background: none; }
.slot-card .nm { font-size: 12.5px; }
.slot-card .fitted { font-size: 13px; font-weight: 900; color: var(--ink2); }
.slot-card .small { font-size: 11px; }
.slot-card.empty .fitted { color: var(--dim); font-weight: 800; }
.kit-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kit-card { text-align: left; background: rgba(11,13,18,.6); border: 1px solid var(--line2); border-radius: 11px; padding: 10px; min-width: 0; }
.kit-card:hover { border-color: rgba(255,255,255,.3); }
.kit-card.on { border-color: var(--mint); background: rgba(61,220,151,.1); }
/* v0.9.6: replays. A small play button at the end of each board row that has one; the panel over the replay */
.ev-row { position: relative; }
.ev-row .rp-btn { width: 20px; height: 20px; padding: 0; border-radius: 50%; display: inline-grid; place-items: center; background: rgba(255,159,28,.16); border: 1px solid rgba(255,159,28,.6); color: var(--amber2); cursor: pointer; }
.ev-row .rp-btn:hover { background: var(--amber); color: #2a1200; }
.ev-row .rp-btn .ico { width: 10px; height: 10px; } .ev-row .rp-none { width: 20px; }
.replay-hud { position: absolute; left: calc(var(--safe-l, 0px) + 14px); bottom: calc(var(--safe-b, 0px) + 14px); width: min(320px, 46vw); padding: 10px 12px; border-radius: 12px;
  background: rgba(10,12,18,.86); border: 1px solid rgba(255,159,28,.55); display: flex; flex-direction: column; gap: 3px; pointer-events: auto; z-index: 6; }
.replay-hud .rh-top { display: flex; align-items: center; gap: 8px; } .replay-hud .rh-top b { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.replay-hud .rh-tag { font-size: 10px; font-weight: 900; letter-spacing: .12em; padding: 2px 6px; border-radius: 5px; background: var(--hot); color: #fff; }
.replay-hud .btn { align-self: flex-start; margin-top: 4px; }
/* v0.9.6: what a piece does to the numbers against what is fitted, before you fit it */
.kit-deltas { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.kit-deltas .delta { font-size: 11px; padding: 1px 6px; border-radius: 6px; background: rgba(255,255,255,.05); font-weight: 800; }
.kit-deltas .delta.up { color: var(--mint); background: rgba(61,220,151,.1); } .kit-deltas .delta.down { color: var(--hot); background: rgba(255,80,60,.1); }
.kit-deltas.same { color: var(--mint); font-weight: 800; }
.kit-card.season { border-color: color-mix(in srgb, var(--sa) 70%, transparent); background: linear-gradient(160deg, color-mix(in srgb, var(--sa) 14%, transparent), rgba(11,13,18,.6)); }
.kit-card .nm { font-size: 14px; line-height: 1.2; margin-bottom: 2px; }
.kit-card .what { font-size: 12px; line-height: 1.3; color: var(--ink2); }
.what.up { color: var(--mint); } .what.down { color: var(--amber); }
.kit-thumb { display: block; width: 52px; height: 52px; margin: 0 auto 3px; }
/* ---- Custom: five kinds, a column each, every swatch on show. A swatch is its colour and what it costs; its name is
   on the head of its column when you point at it or wear it */
.shop-tray.full .tray-half { padding: 7px 12px 8px; }
.shop-tray.full .tray-body { overflow: hidden; }
.style-cols { display: flex; justify-content: space-between; gap: 8px; }
.style-col { flex: none; min-width: 0; }
.style-col .tray-head { justify-content: flex-start; gap: 6px; min-height: 22px; padding-bottom: 4px; }
.style-col .tray-head b { font-size: 13px; }
.swatches { display: grid; gap: 3px; }
.sw { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; width: 48px; height: 54px; padding: 0; border: 1px solid transparent; border-radius: 9px; min-width: 0; }
.sw i { flex: none; display: block; width: 30px; height: 26px; border-radius: 7px; border: 1px solid rgba(255,255,255,.22); background: repeating-linear-gradient(45deg, #2a2d34 0 6px, #33373f 6px 12px); }
.sw .sub { font-size: 11px; line-height: 1; color: var(--amber2); font-weight: 800; white-space: nowrap; }
.sw .sub.crate, .sw .sub.have { color: var(--dim); font-weight: 700; }
.sw.on { border-color: var(--mint); background: rgba(61,220,151,.1); }
.sw.on .sub { color: var(--mint); }
.sw:hover { border-color: rgba(255,255,255,.3); }
.sw.buyable { border-color: rgba(255,209,102,.4); }
.sw.cantafford i { filter: saturate(.85) brightness(.85); }
.sw.crateonly { opacity: .72; } .sw.crateonly i { filter: saturate(.7) brightness(.75); }

/* ---- lists inside cards (Quests, Record) */
.list-tag { margin-top: 6px; }
.item.quest .bar { margin-top: 6px; }
.rewards-card { display: flex; flex-direction: column; gap: 8px; padding: 9px 11px 10px; border-radius: 12px; background: rgba(255,255,255,.035); border: 1px solid var(--line2); }
.rewards-card > .tag { display: none; }
.reward-row { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.reward-row > .ico { width: 15px; height: 15px; color: var(--amber2); }
.reward-row.ready > .ico { color: var(--mint); }
.rw-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; line-height: 1.25; }
.rec-row { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.rec-row > :last-child { white-space: nowrap; font-weight: 800; }
.ach { display: flex; gap: 10px; align-items: center; padding: 8px 11px; border-radius: 11px; background: rgba(255,255,255,.035); border: 1px solid var(--line); }
.ach.done { border-color: rgba(61,220,151,.4); }
.ach .dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,.12); flex: none; }
.ach.done .dot { background: var(--mint); box-shadow: 0 0 10px rgba(61,220,151,.6); }
.ach .nm { font-size: 13.5px; } .ach .tx { font-size: 12px; color: var(--ink2); line-height: 1.3; }
.ach-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }

/* anything on top of the garage takes the garage's own controls off the screen (Uday, 23-09) */
body.covered #s-garage, body.covered .shop-pins, body.covered .shop-tray, body.covered .shop-mid { visibility: hidden !important; pointer-events: none !important; }

/* ============================================================ gifts */
.gift-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.gift-day { border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 6px 4px 7px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; }
.gift-day.today { border-color: var(--mint); }
.gift-day.car { border-color: rgba(242,194,48,.6); background: rgba(242,194,48,.08); }
.gift-day.got { opacity: .55; }
.gift-day .gd-n { font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; color: var(--ink2); }
.gift-day .gd-w { font-size: 11px; line-height: 1.2; overflow-wrap: anywhere; }
.gift-day .ico { color: var(--amber2); }

/* ============================================================ crates */
.crate-row { display: flex; gap: 5px; flex-wrap: wrap; }
.crate-chip { display: inline-block; width: 14px; height: 14px; border-radius: 3px; background: #b9bec7; box-shadow: 0 0 8px rgba(185,190,199,.5); }
.crate-chip.blue { background: #3f8fd8; box-shadow: 0 0 10px rgba(63,143,216,.7); }
.crate-chip.gold { background: #f2c230; box-shadow: 0 0 12px rgba(242,194,48,.8); }
.crate-line { display: flex; align-items: center; gap: 10px; }
/* the crate reveal. Every animation name here is unique to this block. */
.crate-host { border: 1px solid var(--line2); border-radius: 13px; padding: 6px; background: rgba(11,13,18,.7); min-height: 196px; position: relative; overflow: hidden; }
.crate-host.doubled { border-color: rgba(255,209,102,.6); }
.crate-stage { --spd: 1; --c: #b9bec7; position: relative; height: 184px; display: flex; align-items: center; justify-content: center; }
.crate-stage.blue { --c: #3f8fd8; } .crate-stage.gold { --c: #f2c230; }
.crate-stage.fast { --spd: .32; }
.crate-glow { position: absolute; inset: 0; background: radial-gradient(circle at 50% 60%, var(--c) 0%, transparent 60%); opacity: 0; }
.crate-box { position: relative; width: 110px; height: 78px; transform-origin: 50% 100%; }
.crate-box .body { position: absolute; left: 0; right: 0; bottom: 0; height: 56px; border-radius: 8px; background: linear-gradient(180deg, #4a3b2a, #2e2419); border: 2px solid var(--c); box-shadow: inset 0 -8px 16px rgba(0,0,0,.35); }
.crate-box .body .strap { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 14px; margin-left: -7px; background: var(--c); opacity: .85; border-radius: 3px; }
.crate-box .lid { position: absolute; left: -4px; right: -4px; top: 0; height: 26px; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, #5c4a34, #3a2d1f); border: 2px solid var(--c); transform-origin: 8% 100%; z-index: 2; }
.crate-loot { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -30%) scale(.4); opacity: 0; width: 320px; text-align: center; z-index: 3; }
.loot { background: rgba(11,13,18,.94); border: 1px solid var(--c); border-radius: 12px; padding: 9px 14px 10px; box-shadow: 0 0 30px color-mix(in srgb, var(--c) 45%, transparent); }
.loot .tag { color: var(--amber); }
.loot h3 { margin: 2px 0 3px; font-size: 22px; line-height: 1.1; }
.loot.cash h3 { color: var(--mint); font-size: 28px; }
.loot .what { font-size: 12.5px; }
.loot-thumb { display: block; width: 70px; height: 70px; margin: 2px auto 0; filter: drop-shadow(0 6px 10px rgba(0,0,0,.45)); }
.crate-stage.go .crate-box { animation: crateShake calc(.6s * var(--spd)) ease-in-out both; }
.crate-stage.go .lid { animation: crateLid calc(.35s * var(--spd)) calc(.6s * var(--spd)) cubic-bezier(.2,.9,.3,1.2) both; }
.crate-stage.go .crate-glow { animation: crateGlow calc(.6s * var(--spd)) calc(.7s * var(--spd)) ease-out both; }
.crate-stage.go .crate-loot { animation: crateFly calc(.5s * var(--spd)) calc(.95s * var(--spd)) cubic-bezier(.2,.9,.3,1.15) both; }
.crate-stage.go.done .crate-box, .crate-stage.go.done .lid, .crate-stage.go.done .crate-glow, .crate-stage.go.done .crate-loot, .crate-stage.done .crate-box, .crate-stage.done .lid, .crate-stage.done .crate-glow, .crate-stage.done .crate-loot { animation: none; }
.crate-stage.done .lid { transform: rotate(-118deg) translateY(-4px); }
.crate-stage.done .crate-glow { opacity: .55; }
.crate-stage.done .crate-loot { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.crate-stage.done .crate-box { transform: translateY(46px) scale(.8); opacity: .8; }
@keyframes crateShake { 0% { transform: rotate(0); } 15% { transform: rotate(-6deg) translateX(-3px); } 30% { transform: rotate(6deg) translateX(3px); } 45% { transform: rotate(-7deg); } 60% { transform: rotate(7deg) translateY(-6px); } 75% { transform: rotate(-4deg); } 100% { transform: rotate(0) translateY(46px) scale(.8); opacity: .8; } }
@keyframes crateLid { from { transform: rotate(0); } to { transform: rotate(-118deg) translateY(-4px); } }
@keyframes crateGlow { from { opacity: 0; } 60% { opacity: .9; } to { opacity: .55; } }
@keyframes crateFly { from { opacity: 0; transform: translate(-50%, 10%) scale(.35); } 70% { opacity: 1; transform: translate(-50%, -56%) scale(1.06); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
.crate-summary { display: flex; flex-direction: column; gap: 10px; }
.sum-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.sum-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 7px; }
.sum-card { display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; padding: 8px 6px; border-radius: 11px; background: rgba(255,255,255,.04); border: 1px solid var(--line2); min-width: 0; }
.sum-card .sum-art { width: 42px; height: 42px; object-fit: contain; }
.sum-card .sum-art.coin { color: var(--amber2); }
.sum-card .sum-name { font-weight: 900; font-size: 12.5px; line-height: 1.15; overflow-wrap: anywhere; }
.sum-card .sum-kind { font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .05em; }
.sum-card.best { border-color: rgba(61,220,151,.6); background: rgba(61,220,151,.1); }

/* ============================================================ updates, how to play, settings */
.upd-ver { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; background: rgba(240,180,41,.12); border: 1px solid rgba(240,180,41,.34); color: var(--amber2); font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.upd-cols { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.upd-headline { position: relative; padding: 12px 14px; border-radius: 13px; overflow: hidden; background: linear-gradient(135deg, rgba(61,220,151,.2), rgba(74,163,255,.16) 55%, rgba(215,155,255,.16)); border: 1px solid rgba(61,220,151,.45); }
.upd-hl-tag { display: inline-block; font-size: 11px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: #0d0f14; background: var(--mint); padding: 2px 9px; border-radius: 999px; }
.upd-hl-t { font-family: var(--font-display); font-weight: 900; font-size: 20px; line-height: 1.1; margin: 7px 0 4px; }
.upd-hl-d { font-size: 12.5px; color: var(--ink2); line-height: 1.35; }
.upd-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; }
.upd-row { display: grid; grid-template-columns: 9px minmax(0, 1fr); gap: 8px; align-items: start; padding: 5px 7px; border-radius: 8px; background: rgba(255,255,255,.028); }
.upd-row .dot { width: 5px; height: 5px; margin: 6px 0 0 2px; border-radius: 1px; transform: rotate(45deg); background: var(--mint); }
.upd-list.next .upd-row .dot { background: var(--amber2); }
.upd-row .nm { font-size: 13px; line-height: 1.25; }
.upd-row .small { line-height: 1.35; margin-top: 1px; }
.offer.upd-gift { padding: 8px 11px; }
.how-keys { display: flex; flex-direction: column; gap: 3px; }
.how-row { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 10px; align-items: center; min-height: 28px; padding: 2px 0; border-bottom: 1px solid var(--line); }
.how-row .k { font-weight: 900; text-transform: uppercase; font-size: 11px; letter-spacing: .07em; color: var(--ink2); }
.how-row .v { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 12px; color: var(--ink2); }
.how-p p { margin-top: 3px; line-height: 1.45; }
.set-row { display: grid; grid-template-columns: 104px minmax(0, 1fr); align-items: center; gap: 8px; min-height: 32px; }
.set-row label { display: flex; align-items: center; gap: 6px; font-weight: 900; text-transform: uppercase; font-size: 11px; letter-spacing: .06em; color: var(--ink2); line-height: 1.2; }
.set-row label .ico { width: 15px; height: 15px; color: var(--amber2); }
.settings-panel .col { gap: 5px; }
.settings-panel .seg button { padding: 0 8px; }
.set-more { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 7px; margin-top: 3px; border-top: 1px solid var(--line); }
.set-build { margin-left: auto; }
.set-privacy { line-height: 1.3; font-size: 11px; }

/* ============================================================ the cards after a run, a race, a job */
.over-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 16px; }
.payout { text-align: center; }
.payout .big { font-family: var(--font-display); font-weight: 900; font-size: 40px; color: var(--mint); text-shadow: 0 0 30px rgba(61,220,151,.4); line-height: 1; }
.lost { color: #ff8a80; font-weight: 900; font-size: 12.5px; margin-top: 4px; }
.offer.stack { flex-direction: column; align-items: stretch; gap: 8px; }
.offer.stack .offer-actions { flex-wrap: wrap; }
.over-quests { display: flex; flex-direction: column; gap: 5px; }
.oq { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 6px 10px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid var(--line2); }
.oq.done { border-color: rgba(61,220,151,.5); background: rgba(61,220,151,.08); }
.oq .bar { grid-column: 1 / -1; }
.race-order { display: flex; flex-direction: column; gap: 3px; }
.race-order .ro { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 5px 10px; border-radius: 9px; background: rgba(255,255,255,.035); border: 1px solid transparent; }
.race-order .ro.you { background: rgba(255,159,28,.14); border-color: var(--amber3); }
.race-order .ro.out { opacity: .5; }
.race-order .ro b { color: var(--dim); font-weight: 900; text-align: right; }
.race-order .ro.you b { color: var(--amber2); }
.race-order .ro i { font-style: normal; white-space: nowrap; }
.dialogue { display: flex; flex-direction: column; gap: 8px; padding: 10px 13px; border-radius: 12px; background: rgba(16,12,22,.55); border-left: 3px solid rgba(190,120,220,.6); }
.dialogue .ln { display: flex; flex-direction: column; gap: 1px; }
.dialogue .ln b { font-size: 11px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; color: #c99ce4; }
.dialogue .ln.me b { color: var(--amber2); }
.dialogue .ln span { line-height: 1.4; font-size: 13.5px; }

/* ============================================================ races */
/* the filter: what kind of race, which cars, and which way the page is ordered. It stays at the top while the list scrolls */
.race-filter { position: sticky; top: -10px; z-index: 3; display: flex; flex-direction: column; gap: 5px; margin: -10px 0 0; padding: 10px 0 7px; background: var(--panel, #12151d); border-bottom: 1px solid var(--line); }
.rf-row { display: flex; align-items: center; gap: 5px; min-width: 0; }
.rf-row .k { flex: none; width: 40px; font-weight: 900; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--dim); }
.rf-row .k.sp { width: auto; margin-left: auto; padding: 0 4px 0 12px; }
.rf-opt { flex: none; min-height: 33px; min-width: 36px; padding: 0 8px; font-size: 11.5px; }
.race-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@container stage (min-width: 1000px) { .race-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.race-card { display: flex; flex-direction: column; gap: 7px; text-align: left; padding: 10px 11px 11px; border-radius: 13px; min-width: 0; background: linear-gradient(180deg, rgba(43,48,64,.55), rgba(19,22,30,.75)); border: 1px solid var(--line2); transition: transform .12s, border-color .12s, filter .12s; }
.race-card:hover { transform: translateY(-2px); border-color: var(--amber3); filter: brightness(1.08); }
.race-card.mismatch { border-color: rgba(255,159,28,.35); }
.race-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.race-head > :first-child { min-width: 0; }
.race-head .nm { font-size: 14.5px; line-height: 1.2; }
.race-pay { text-align: right; flex: none; }
.race-pay .v { color: var(--mint); font-weight: 900; font-size: 17px; line-height: 1.1; white-space: nowrap; }
.race-shot { position: relative; height: 84px; border-radius: 10px; overflow: hidden; background: #0b0d12; border: 1px solid var(--line2); }
.rs-img, .bs-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.rs-fade, .bs-fade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,9,13,.1) 0%, rgba(8,9,13,0) 38%, rgba(8,9,13,.84) 100%); }
.race-shot.wet .rs-fade { background: linear-gradient(180deg, rgba(20,30,52,.22) 0%, rgba(8,9,13,0) 42%, rgba(8,9,13,.86) 100%); }
.rs-grid { position: absolute; left: 9px; right: 9px; bottom: 6px; display: flex; flex-wrap: wrap; gap: 1px 9px; }
.rs-grid span { font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.86); text-shadow: 0 1px 4px rgba(0,0,0,.9); white-space: nowrap; }
.chip.tier { font-weight: 900; letter-spacing: .04em; }
.chip.tier.t1 { color: var(--mint); border-color: rgba(61,220,151,.45); }
.chip.tier.t2 { color: var(--amber2); border-color: var(--amber3); }
.chip.tier.t3, .chip.tier.t4 { color: #d79bff; border-color: rgba(215,155,255,.5); background: rgba(80,30,120,.35); }
.race-warn { font-weight: 800; }
.race-warn.amber { color: var(--amber2); } .race-warn.hot { color: #ff8a80; }
.race-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }
.rc-card { grid-column: 1 / -1; border-color: var(--amber3); padding: 9px 12px; background: linear-gradient(90deg, rgba(40,26,8,.96) 30%, rgba(19,22,30,.55)), url(assets/shots/loc-hill.jpg) center / cover; }
.rc-card .race-head { align-items: center; }
.rc-row { display: grid; grid-template-columns: 80px minmax(0, 1fr); align-items: center; gap: 8px; }
.rc-row .k { font-weight: 900; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--dim); }
.rc-opts { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 5px; }
.rc-opt { min-height: 34px; padding: 0 3px; border-radius: 9px; background: rgba(255,255,255,.045); border: 1px solid var(--line2); font-weight: 800; font-size: 12px; color: var(--ink2); white-space: nowrap; transition: background .12s, border-color .12s; }
.rc-opt:hover:not(:disabled) { background: rgba(255,255,255,.1); }
.rc-opt.on { background: rgba(255,159,28,.18); border-color: var(--amber3); color: var(--amber2); }
.rc-opt.on.t1 { background: rgba(61,220,151,.14); border-color: rgba(61,220,151,.5); color: var(--mint); }
.rc-opt.on.t3 { background: rgba(80,30,120,.45); border-color: rgba(215,155,255,.55); color: #d79bff; }
.rc-opt.on.t4 { background: linear-gradient(180deg, rgba(242,194,48,.28), rgba(120,70,0,.35)); border-color: #f2c230; color: #ffe07a; }
.rc-opt:disabled { opacity: .3; }
.rc-note { padding-left: 88px; min-height: 16px; }
.rc-win .v { color: var(--mint); font-weight: 900; font-size: 22px; line-height: 1.1; }

/* ============================================================ the story */
.story-arc { display: flex; flex-direction: column; gap: 7px; padding: 10px 13px; border-radius: 12px; background: rgba(30,18,38,.5); border: 1px solid rgba(190,120,220,.24); }
.story-arc .bar i { background: linear-gradient(90deg, #a35fd0, #d9a8f0); }
.job-list { display: flex; flex-direction: column; gap: 6px; }
.job-row { display: flex; align-items: center; gap: 11px; text-align: left; width: 100%; padding: 9px 13px; border-radius: 12px; background: linear-gradient(180deg, rgba(43,48,64,.5), rgba(19,22,30,.72)); border: 1px solid var(--line2); transition: border-color .12s, filter .12s; }
.job-row:hover:not(:disabled) { border-color: rgba(190,120,220,.5); filter: brightness(1.08); }
.job-row.now { border-color: rgba(190,120,220,.65); box-shadow: 0 0 0 1px rgba(190,120,220,.2) inset; }
.job-row.done { opacity: .74; }
.job-row.locked { opacity: .4; }
.job-n { width: 30px; flex: none; text-align: center; color: var(--dim); }
.job-n b { font-size: 18px; font-weight: 900; font-style: italic; }
.job-row.done .job-n { color: var(--mint); }
.job-mid { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.job-mid .nm { font-size: 14.5px; line-height: 1.2; }
.job-chips { margin-top: 3px; }
.job-chips .chip { font-size: 11px; padding: 2px 7px; }
.job-pay { text-align: right; flex: none; }
.job-pay .v { color: var(--mint); font-weight: 900; font-size: 15px; white-space: nowrap; }
.job-pay .v.dim { color: var(--dim); }
.brief { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 12px; align-items: start; }
.brief-shot { position: relative; height: 160px; border-radius: 12px; overflow: hidden; background: #0b0d12; border: 1px solid var(--line2); }
.bs-where { position: absolute; left: 9px; bottom: 9px; }
.brief-terms { gap: 10px; }
/* the job's verb runs to "Pick him up, drop him off": it wraps inside its own tile, never out of it (player, 11-10) */
.brief-facts .stat .v.wrap { white-space: normal; overflow-wrap: anywhere; line-height: 1.12; }

/* ============================================================ events: four tiles and the wheel, then one event's three boards */
.events-panel .dlg-aside .gift-banner { max-width: 300px; }
.ev-layout { display: grid; grid-template-columns: minmax(0, 1fr) 232px; gap: 10px; align-items: start; }
.ev-list.four { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ev-tile { display: flex; flex-direction: column; min-width: 0; border-radius: 13px; overflow: hidden; cursor: pointer; background: linear-gradient(180deg, rgba(43,48,64,.55), rgba(19,22,30,.75)); border: 1px solid var(--line2); transition: transform .12s, border-color .12s; }
.ev-tile:hover { transform: translateY(-2px); border-color: var(--violet); }
.ev-hero { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 1px; min-height: 62px; padding: 6px 9px 6px; overflow: hidden; }
.ev-hero > img, .ev-hero-fade { position: absolute; inset: 0; width: 100%; height: 100%; }
.ev-hero > img { object-fit: cover; display: block; }
.ev-hero-fade { background: linear-gradient(180deg, rgba(10,8,20,.42) 0%, rgba(10,8,20,.5) 40%, rgba(10,8,20,.92)); }
.ev-hero > :not(img):not(.ev-hero-fade) { position: relative; }
.ev-hero-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: auto; padding-bottom: 3px; }
.ev-hero-row .nm { display: flex; align-items: center; gap: 6px; font-size: 14px; font-style: italic; color: var(--violet2); text-shadow: 0 2px 8px rgba(0,0,0,.8); white-space: nowrap; }
.ev-tile.special .ev-hero-row .nm { color: #ffd166; }
.ev-title { font-size: 12.5px; font-weight: 900; line-height: 1.2; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.9); }
.ev-shape { font-size: 11px; line-height: 1.25; color: var(--ink2); text-shadow: 0 1px 4px rgba(0,0,0,.9); }
/* on the narrowest stage the tile keeps its name and its three boards: the shape of the event is on its own page */
@container stage (max-width: 860px) { .ev-tile .ev-shape { display: none; } .ev-hero { min-height: 50px; } }
/* the day's photo takes the day's light and weather, so a new combination never needs a new picture (23-09) */
.ev-hero.hour-golden img { filter: sepia(.35) saturate(1.3) hue-rotate(-12deg) brightness(.95); }
.ev-hero.hour-dusk img { filter: sepia(.25) saturate(.9) hue-rotate(-25deg) brightness(.62) contrast(1.05); }
.ev-hero.hour-night img { filter: brightness(.34) saturate(.6) hue-rotate(200deg) contrast(1.15); }
.ev-hero.wet img { filter: saturate(.6) brightness(.72) hue-rotate(-8deg) contrast(.95); }
.ev-hero.wet.hour-night img { filter: brightness(.3) saturate(.5) hue-rotate(200deg); }
/* the three boards of an event read as three buttons, each in its board's colour */
.ev-sp3 { display: flex; flex-direction: column; gap: 2px; padding: 4px 6px 5px; }
.ev-srow { display: grid; grid-template-columns: 64px minmax(0, 1fr) 30px; align-items: center; gap: 7px; min-height: 33px; padding: 0 8px; border-radius: 8px; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.11); border-left-width: 3px; font-size: 12px; text-align: left; color: var(--ink); }
.ev-srow:hover, .ev-srow:focus-visible { border-color: var(--violet); background: rgba(166,107,255,.14); outline: none; }
.ev-srow .sp { font-weight: 900; white-space: nowrap; }
.ev-srow.own { border-left-color: var(--mint2); } .ev-srow.own .sp { color: var(--mint2); }
.ev-srow.spec { border-left-color: var(--gold); } .ev-srow.spec .sp { color: var(--gold); }
.ev-srow.pick { border-left-color: var(--violet2); } .ev-srow.pick .sp { color: var(--violet2); }
.ev-srow .mine { font-variant-numeric: tabular-nums; font-weight: 800; white-space: nowrap; }
.ev-srow .mine.dim { color: var(--dim); font-weight: 700; }
.ev-srow .pay { display: inline-flex; align-items: center; gap: 2px; justify-content: flex-end; color: var(--gold); font-weight: 900; }
.ev-srow .pay .ico { width: 12px; height: 12px; }
.ev-srow .go { display: none; }
/* ---- the wheel */
.ev-wheel { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 10px 11px 12px; border-radius: 13px; background: linear-gradient(180deg, rgba(58,32,110,.45), rgba(20,12,40,.75)); border: 1px solid var(--violet3); text-align: center; }
.wh-wrap { position: relative; width: 196px; height: 196px; margin: 8px auto 0; }
.wh-disc { position: absolute; inset: 0; overflow: hidden; border-radius: 50%; border: 5px solid #1a1030; box-shadow: 0 0 0 2px var(--violet3), 0 10px 30px rgba(0,0,0,.6); }
.wh-lbl { position: absolute; inset: 0; display: flex; flex-direction: row; align-items: flex-start; justify-content: center; gap: 1px; padding-top: 5%; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.8); pointer-events: none; }
.wh-lbl b, .wh-lbl small { writing-mode: vertical-rl; white-space: nowrap; line-height: 1; }
.wh-lbl b { font-size: 12px; font-weight: 900; }
.wh-lbl small { font-size: 7.5px; font-weight: 800; opacity: .92; text-transform: uppercase; letter-spacing: .02em; }
.wh-lbl.jp b { color: var(--gold); font-size: 14px; }
.wh-pointer { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); width: 0; height: 0; z-index: 2; border-left: 11px solid transparent; border-right: 11px solid transparent; border-top: 20px solid var(--gold); filter: drop-shadow(0 2px 3px rgba(0,0,0,.6)); }
.wh-hub { position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; transform: translate(-50%, -50%); border-radius: 50%; background: #1a1030; border: 3px solid var(--gold); display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 16px; color: var(--gold); }
.wh-out { min-height: 18px; font-size: 13px; line-height: 1.3; font-weight: 900; color: var(--violet2); }
.wh-btns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.wh-btns .btn { min-height: 36px; padding: 0 2px; font-size: 11px; letter-spacing: 0; min-width: 0; }
/* the chances are a sheet over the wheel: what is under it is put away, not read through it */
.ev-wheel.show-odds .wh-wrap, .ev-wheel.show-odds .wh-out { visibility: hidden; }
.wh-info { flex: none; width: 33px; height: 33px; border-radius: 50%; border: 1px solid var(--violet); color: var(--violet2); background: rgba(166,107,255,.12); font-weight: 900; font-style: italic; font-family: Georgia, serif; font-size: 13px; }
.wh-info.on { background: var(--violet); color: #fff; }
.wh-odds { display: none; position: absolute; left: 6px; right: 6px; top: 48px; z-index: 3; padding: 10px 11px; border-radius: 12px; background: rgba(16,10,32,.98); border: 1px solid var(--violet3); box-shadow: 0 12px 30px rgba(0,0,0,.6); grid-template-columns: minmax(0, 1fr); gap: 3px; text-align: left; }
.wh-odds.on { display: grid; }
.wh-odd { display: grid; grid-template-columns: 11px minmax(0, 1fr) auto; align-items: center; gap: 7px; font-size: 11px; color: var(--ink2); }
.wh-odd i { width: 11px; height: 11px; border-radius: 3px; }
.wh-odds-note { margin-top: 4px; line-height: 1.35; font-size: 11px; }
/* ---- one event: three boards side by side, each with its own Race button (Uday, 30-09: no toggles) */
.ev-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: stretch; }
.ev-col { display: flex; flex-direction: column; gap: 5px; padding: 7px 9px 8px; border-radius: 12px; border: 1px solid var(--line2); background: rgba(255,255,255,.03); min-width: 0; }
.ev-col.focus { border-color: var(--violet); background: rgba(166,107,255,.09); box-shadow: 0 0 0 1px rgba(166,107,255,.35) inset; }
.ev-col-head { display: flex; flex-direction: column; gap: 1px; }
.ev-col-head b { font-size: 15px; line-height: 1.15; font-weight: 900; font-style: italic; }
.ev-col.own .ev-col-head b { color: var(--mint2); } .ev-col.spec .ev-col-head b { color: var(--gold); } .ev-col.pick .ev-col-head b { color: var(--violet2); }
.ev-col-head .small { color: var(--ink2); }
/* three cars, each as wide as its name needs (a fixed third cut "Thunderhead" on the smallest phone, 03-10) */
.ev-picks { display: flex; gap: 5px; }
.ev-picks > .ev-pick { flex: 1 1 auto; }
.ev-pick { display: flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 2px 6px 3px; border-radius: 9px; border: 1px solid var(--line2); background: rgba(255,255,255,.04); color: var(--ink); text-align: left; min-width: 0; }
.ev-pick b { font-size: 11.5px; line-height: 1.2; white-space: nowrap; }
.ev-pick .small { font-size: 11px; color: var(--ink2); white-space: nowrap; }
.ev-pick.on { border-color: var(--mint); background: rgba(61,220,151,.12); }
.ev-col-you { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 1px 8px; padding: 5px 9px; border-radius: 9px; background: rgba(166,107,255,.12); }
.ev-col-you > span:first-child { font-weight: 900; font-size: 14px; color: var(--violet2); white-space: nowrap; }
.ev-col-you .small { color: var(--ink2); }
.ev-col-you.none > span:first-child { color: var(--dim); }
.ev-board { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; }
.ev-board-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); padding: 0 3px 1px; }
.ev-row { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto 20px; align-items: center; gap: 6px; min-height: 20px; padding: 0 7px; border-radius: 7px; background: rgba(255,255,255,.035); border: 1px solid transparent; font-size: 12px; }
.ev-row b { color: var(--dim); font-weight: 900; text-align: right; }
.ev-row .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-row i { display: none; }
.ev-row .mono { text-align: right; font-weight: 800; white-space: nowrap; }
.ev-row.you { background: rgba(166,107,255,.18); border-color: var(--violet); }
.ev-row.you b { color: var(--violet2); }
.ev-col .ev-race { width: 100%; }
.ev-ladline { display: flex; flex-wrap: wrap; align-items: center; gap: 1px 10px; font-size: 11.5px; color: var(--ink2); padding: 0 2px; }
.ev-ladline .k { font-weight: 900; text-transform: uppercase; letter-spacing: .05em; font-size: 11px; color: var(--dim); }
.ev-ladline .rung { white-space: nowrap; }
.ev-ladline .rung b { display: inline-flex; align-items: center; gap: 2px; color: var(--gold); }
.ev-ladline .rung b .ico { width: 11px; height: 11px; }
.ev-ladline .rung.now { color: var(--mint2); }

/* ============================================================ the reveal (23-09)
   Every reward shown like an achievement: a box in the tier's colour shakes, bursts, and the prize
   rises out of it. Rarer = longer shake, bigger burst, rays behind it. */
.reveal-layer { position: absolute; inset: 0; z-index: 70; display: none; pointer-events: auto; }
.reveal-layer.on { display: block; }
.rv-wrap { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(4,4,10,.88); animation: rvFade .2s ease-out; cursor: pointer; }
.rv-wrap.out { animation: rvFadeOut .22s ease-in forwards; }
@keyframes rvFade { from { opacity: 0; } }
@keyframes rvFadeOut { to { opacity: 0; } }
.rv-card { --c: #9aa4b8; --c2: #d8dee8; --cg: rgba(154,164,184,.45); position: relative; width: 400px; min-height: 250px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.rv-card.tier-rare { --c: #3f8fd8; --c2: #9fd0ff; --cg: rgba(63,143,216,.45); }
.rv-card.tier-epic { --c: #a66bff; --c2: #e0ccff; --cg: rgba(166,107,255,.45); }
.rv-card.tier-legendary { --c: #f2c230; --c2: #fff1b8; --cg: rgba(242,194,48,.5); }
.rv-rays { position: absolute; left: 50%; top: 42%; width: 460px; height: 460px; margin: -230px 0 0 -230px; opacity: 0; pointer-events: none; background: repeating-conic-gradient(from 0deg, var(--cg) 0deg 8deg, transparent 8deg 22deg);
  mask: radial-gradient(circle, #000 20%, transparent 65%); -webkit-mask: radial-gradient(circle, #000 20%, transparent 65%); }
.rv-card.tier-epic.go .rv-rays, .rv-card.tier-legendary.go .rv-rays { animation: rvRays 6s linear var(--shake) infinite, rvIn .5s ease-out var(--shake) forwards; }
@keyframes rvRays { to { transform: rotate(360deg); } }
@keyframes rvIn { to { opacity: 1; } }
.rv-box { position: relative; width: 104px; height: 88px; margin-bottom: -20px; }
.rv-box .rv-body { position: absolute; left: 0; right: 0; bottom: 0; height: 60px; border-radius: 10px; background: linear-gradient(180deg, var(--c), rgba(0,0,0,.55)), var(--c); box-shadow: 0 0 30px var(--cg), inset 0 2px 0 rgba(255,255,255,.35); }
.rv-box .rv-lid { position: absolute; left: -6px; right: -6px; top: 10px; height: 22px; border-radius: 8px; background: var(--c2); box-shadow: 0 3px 0 rgba(0,0,0,.25); transform-origin: 10% 100%; z-index: 1; }
.rv-card.go .rv-box { animation: rvShake var(--shake) ease-in-out, rvDrop .5s ease-in var(--shake) forwards; }
.rv-card.go .rv-lid { animation: rvLid .45s cubic-bezier(.2,1.6,.4,1) var(--shake) forwards; }
@keyframes rvShake { 0%, 100% { transform: translate(0,0) rotate(0); } 10% { transform: translate(-5px,1px) rotate(-6deg); } 20% { transform: translate(6px,-1px) rotate(6deg); }
  30% { transform: translate(-7px,0) rotate(-8deg); } 40% { transform: translate(7px,1px) rotate(8deg); } 50% { transform: translate(-8px,-1px) rotate(-9deg); }
  60% { transform: translate(8px,0) rotate(9deg); } 70% { transform: translate(-6px,1px) rotate(-7deg); } 80% { transform: translate(5px,0) rotate(5deg); } 90% { transform: translate(-3px,0) rotate(-3deg); } }
@keyframes rvLid { to { transform: translate(-30px,-40px) rotate(-55deg); opacity: 0; } }
@keyframes rvDrop { to { transform: translateY(60px) scale(.8); opacity: 0; } }
.rv-prize { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; opacity: 0; transform: translateY(24px) scale(.6); }
.rv-card.go .rv-prize { animation: rvPrize .55s cubic-bezier(.2,1.5,.4,1) var(--shake) forwards; }
@keyframes rvPrize { to { opacity: 1; transform: none; } }
.rv-ico { width: 68px; height: 68px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--c2); background: radial-gradient(circle, var(--cg), transparent 70%); }
.rv-ico .ico { width: 40px; height: 40px; }
.rv-tag { font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .14em; color: var(--c); }
.rv-title { font-size: 28px; line-height: 1.1; font-weight: 900; font-style: italic; color: #fff; text-shadow: 0 0 22px var(--cg), 0 3px 10px rgba(0,0,0,.7); padding: 0 .1em; }
.rv-card.tier-legendary .rv-title { font-size: 32px; color: var(--c2); }
.rv-sub { font-size: 13.5px; color: var(--ink2); max-width: 360px; line-height: 1.35; }
.rv-lines { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; max-height: 150px; overflow: auto; width: 100%; }
.rv-line { font-size: 12.5px; font-weight: 800; padding: 3px 10px; border-radius: 7px; background: rgba(255,255,255,.06); flex: none; }
.rv-line.tier-rare { color: #9fd0ff; } .rv-line.tier-epic { color: #e0ccff; } .rv-line.tier-legendary { color: var(--gold); }
.rv-tap { margin-top: 8px; font-size: 11px; color: var(--dim); letter-spacing: .08em; text-transform: uppercase; }
/* the reveal's headline (26-10, Uday: "keep short crisp texts but make them feel like they achieved big things") */
.rv-head { font-family: var(--font-display); font-size: 15px; line-height: 1.05; font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: .14em; color: var(--c2); text-shadow: 0 0 12px var(--cg), 0 2px 6px rgba(0,0,0,.7); padding-right: .14em; }
.rv-card.go .rv-head { animation: rvHead .6s cubic-bezier(.2,1.5,.4,1) calc(var(--shake) + .05s) both; }
.rv-card.tier-epic .rv-head { font-size: 17px; }
.rv-card.tier-legendary .rv-head { font-size: 21px; color: var(--gold); }
@keyframes rvHead { from { opacity: 0; letter-spacing: .4em; transform: scale(.7); } to { opacity: 1; letter-spacing: .14em; transform: none; } }
.rv-card > .fx-burst { left: 50%; top: 42%; }
.rv-card .fx-burst i { animation-delay: calc(var(--shake) + var(--d)); }

/* ============================================================ the finish moment (26-10-2026, src/ui/reveal.js cheer)
   A result card's title is the headline, sized to the result; one line of the key stat under it; a burst behind it.
   Gold for the big ones, amber for a good one, the card's own colour for a plain finish. All CSS once it starts, low
   alpha, small pieces (no glare), nothing that takes a tap, and a tap ends it (.fm-done). */
.panel .dlg-title h2.fm-head { font-size: 22px; letter-spacing: .03em; }
.panel .dlg-title h2.fm-head.fm-g1 { color: var(--amber2); }
.panel .dlg-title h2.fm-head.fm-g2, .panel .dlg-title h2.fm-head.fm-g3 { color: var(--gold); text-shadow: 0 0 14px rgba(242,194,48,.3), 0 2px 6px rgba(0,0,0,.6); }
.panel .dlg-title h2.fm-head.fm-g3 { font-size: 25px; }
.panel .dlg-title h2.fm-head.fm-quiet { font-size: 19px; text-shadow: none; }
/* playtest 26-10: a wreck or a bust is the headline in the crash colour, the cause right under it, and what the run still
   earned (a record, an achievement) a small gold chip below, never the title (reveal.js cheer `fail` / `badge`) */
.panel .dlg-title h2.fm-head.fm-fail { color: #ff8a80; font-size: 24px; text-shadow: 0 2px 6px rgba(0,0,0,.6); }
.fm-fail + .fm-sub { color: #ffd0cb; font-size: 13.5px; }
.fm-badge { display: inline-block; max-width: 100%; margin-top: 5px; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 900; letter-spacing: .04em;
  text-transform: uppercase; color: var(--gold); background: rgba(242,194,48,.12); border: 1px solid rgba(242,194,48,.45); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fm .fm-badge { animation: fmSub .4s ease-out .45s both; }
.fm-done .fm-badge { animation: none; }
.fm-sub { margin-top: 2px; font-size: 12.5px; font-weight: 800; color: var(--ink); letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fm .fm-head { transform-origin: left center; animation: fmHead .55s cubic-bezier(.2,1.5,.4,1) .06s both; }
.fm .fm-sub { animation: fmSub .4s ease-out .3s both; }
.fm-done .fm-head, .fm-done .fm-sub { animation: none; }
.fm-done .fm-streak { display: none; }
@keyframes fmHead { from { opacity: 0; transform: scale(.72); letter-spacing: .24em; } to { opacity: 1; transform: none; letter-spacing: .03em; } }
@keyframes fmSub { from { opacity: 0; transform: translateY(6px); } }
.panel > .fx-burst { left: min(30%, 220px); top: 30px; }
.fm-streak { position: absolute; left: 0; right: 0; top: 0; height: 64px; pointer-events: none; z-index: 4; opacity: 0;
  background: linear-gradient(100deg, transparent 38%, rgba(255,209,102,.12) 47%, rgba(255,241,184,.2) 50%, rgba(255,209,102,.12) 53%, transparent 62%) 120% 0 / 260% 100% no-repeat;
  animation: fmStreak 1.1s ease-out .12s both; }
@keyframes fmStreak { 0% { opacity: 1; background-position: 120% 0; } 80% { opacity: 1; } 100% { opacity: 0; background-position: -20% 0; } }
/* the burst: confetti for the big moments, a few sparks for a plain one; each bit's path is set once in JS (burst()) */
.fx-burst { position: absolute; width: 0; height: 0; pointer-events: none; z-index: 5; }
.fx-burst i { position: absolute; left: -3px; top: -4px; width: 6px; height: 9px; border-radius: 1.5px; opacity: 0; animation: fxBit 1.2s cubic-bezier(.15,.75,.35,1) var(--d) forwards; }
.fx-burst.sparks i { left: -2px; top: -2px; width: 4px; height: 4px; border-radius: 50%; animation-name: fxSpark; animation-duration: .9s; }
@keyframes fxBit { 0% { opacity: 1; transform: translate(0,0) rotate(0) scale(.5); } 55% { opacity: 1; transform: translate(calc(var(--x) * .85), var(--y)) rotate(calc(var(--r) * .6)) scale(1); }
  100% { opacity: 0; transform: translate(var(--x), calc(var(--y) + 70px)) rotate(var(--r)) scale(.9); } }
@keyframes fxSpark { 0% { opacity: 0; transform: translate(0,0) scale(.4); } 25% { opacity: .9; } 100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(1); } }
/* a phone on its side (844x390): the same moment, a size down, and the reveal's haul list shorter */
@media (max-height: 430px) {
  .panel .dlg-title h2.fm-head { font-size: 19px; } .panel .dlg-title h2.fm-head.fm-g3 { font-size: 21px; }
  .panel .dlg-title h2.fm-head.fm-fail { font-size: 21px; }
  .fm-sub { font-size: 11.5px; } .fm-fail + .fm-sub { font-size: 12px; }
  .fm-badge { margin-top: 3px; padding: 1px 7px; font-size: 10px; }
  /* playtest 26-10: "the stat list is clipped and needs scrolling at 844x390". The result cards' numbers compact to one
     tight grid, the payout a size down, and the long lists show their top rows (the player's own row always stays) */
  .over-panel .stats, .race-result .stats { gap: 4px; }
  .over-panel .stat, .race-result .stat { padding: 3px 7px; border-radius: 8px; }
  .over-panel .stat .v, .race-result .stat .v { font-size: 13.5px; }
  .over-panel .stat .k, .race-result .stat .k { font-size: 9.5px; letter-spacing: .04em; }
  .over-panel .dlg-body, .race-result .dlg-body { padding-top: 6px; padding-bottom: 6px; gap: 6px; }
  .payout .big { font-size: 30px; }
  .over-cols { gap: 10px; }
  .over-panel .offer { padding: 5px 9px; gap: 6px; }
  .over-panel .offer.stack { gap: 5px; }
  .over-panel .offer .t { font-size: 12.5px; } .over-panel .offer .d { font-size: 11px; }
  .over-panel .offer .btn.small { min-height: 30px; }
  .over-panel .ach { padding-top: 3px; padding-bottom: 3px; }
  .over-panel .ach .tx { display: none; }
  .over-quests { gap: 3px; } .over-quests .oq { padding: 3px 8px; }
  .over-quests .oq:nth-child(n+3) { display: none; }
  .race-result .race-order .ro { padding: 2px 8px; }
  .race-result .race-order .ro:nth-child(n+5):not(.you) { display: none; }
  .rv-head { font-size: 13px; } .rv-card.tier-epic .rv-head { font-size: 15px; } .rv-card.tier-legendary .rv-head { font-size: 17px; }
  .rv-lines { max-height: 96px; }
}
/* less motion asked for: no bursts or streaks, the headline and the prize simply there */
@media (prefers-reduced-motion: reduce) {
  .fx-burst, .fm-streak, .rv-box { display: none; }
  .fm .fm-head, .fm .fm-sub, .rv-card.go .rv-head { animation: none; }
  .rv-card.go .rv-rays { animation: none; opacity: .5; }
  .rv-card.go .rv-prize { animation: none; opacity: 1; transform: none; }
}

/* ============================================================ the Season (11-10-2026, src/ui/events.js seasonPanel) */
.ss-stats .stat .v { font-size: 15px; }
.ss-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.ss-col { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ss-bar { position: relative; height: 10px; border-radius: 6px; background: rgba(255,255,255,.07); border: 1px solid var(--line); margin: 2px 0 4px; }
.ss-bar > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; background: linear-gradient(90deg, var(--amber), var(--mint)); }
.ss-tick { position: absolute; top: -3px; width: 3px; height: 14px; margin-left: -1.5px; border-radius: 2px; background: rgba(255,255,255,.28); }
.ss-tick.on { background: var(--mint2); }
.ss-row { display: flex; align-items: center; gap: 10px; padding: 6px 9px; border-radius: 10px; background: rgba(255,255,255,.035); border: 1px solid var(--line); min-width: 0; }
.ss-row.ready { border-color: var(--mint); }
.ss-row.done { opacity: .62; }
.ss-at { flex: none; min-width: 34px; font-size: 15px; font-weight: 900; color: var(--amber2); }
.ss-what { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.ss-row > .chip, .ss-row > .btn { flex: none; }
.ss-late { margin-top: 4px; }
.ss-how { line-height: 1.35; }

/* ============================================================ the garage tour (11-10-2026, src/ui/tour.js) */
.tour { position: absolute; inset: 0; z-index: 60; pointer-events: none; }
.tour-ring { position: absolute; border-radius: 14px; border: 2px solid var(--amber2); box-shadow: 0 0 0 9999px rgba(5,6,10,.42), 0 0 18px rgba(255,209,102,.7); transition: left .28s, top .28s, width .28s, height .28s; }
.tour-bubble { position: absolute; display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 12px; background: rgba(16,18,26,.96); border: 1px solid var(--line2); box-shadow: 0 8px 26px rgba(0,0,0,.5); pointer-events: auto; transition: left .28s, top .28s; }
.tour-t { font-size: 16px; color: var(--amber2); }
.tour-d { line-height: 1.3; overflow-wrap: anywhere; }
.tour-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

/* the rank ladder on the Season tab */
.ss-rung { display: flex; align-items: center; gap: 10px; padding: 6px 9px; border-radius: 10px; background: rgba(255,255,255,.035); border: 1px solid var(--line); min-width: 0; }
.ss-rung.ready { border-color: var(--mint); }
.ss-rung.done { opacity: .7; }
.ss-rung.mine { box-shadow: inset 3px 0 0 var(--amber); }
.ss-tier { flex: none; min-width: 74px; text-align: center; padding: 3px 8px; border-radius: 8px; font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; }
.ss-tier.t0 { background: #6b4226; color: #f3d2b0; } .ss-tier.t1 { background: #4a5260; color: #e6ebf2; } .ss-tier.t2 { background: #7a5c0c; color: #ffe08a; }
.ss-tier.t3 { background: #2b5f66; color: #c8f4f7; } .ss-tier.t4 { background: #3a1a5c; color: #e3c8ff; }
.ss-rung > .chip, .ss-rung > .btn { flex: none; }
.ss-how { display: flex; flex-wrap: wrap; gap: 5px; }
.ss-how .chip { font-size: 11px; }
.ss-race { align-self: flex-start; margin-top: 4px; }
.ev-season-line .offer-actions .btn { white-space: nowrap; }

/* ============================================================ Events v2 (12-10-2026): Season first, the big toggle */
.ev-toggle { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid var(--line2); flex: none; }
.ev-tog { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: 11px; border: 0; background: transparent; color: var(--dim);
  font: inherit; font-size: 14px; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; cursor: pointer; }
.ev-tog .ico { width: 18px; height: 18px; }
.ev-tog.on { background: linear-gradient(180deg, #ffb444, var(--amber)); color: #2a1200; box-shadow: 0 4px 14px rgba(255,159,28,.35); }
.ev-tog:not(.on):hover { color: var(--ink); background: rgba(255,255,255,.06); }
.ev-tog .n { min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: rgba(255,255,255,.14); color: var(--ink); font-size: 11px; display: inline-grid; place-items: center; }
.ev-tog .n.mint, .ev-tog.on .n.mint { background: var(--mint); color: #00261a; }
.ev-tog.on .n { background: rgba(42,18,0,.25); color: #2a1200; }
.sr-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto; gap: 10px; align-items: start; }
.sr-road { grid-column: 1 / 3; padding-bottom: 6px; }
.sr-line { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
/* the road's cells (26-10): one per step, evenly, what it pays and its Claim; the bar above them measures (src/ui/seasonbar.js) */
.sr-stops { display: grid; grid-template-columns: repeat(var(--n, 7), minmax(0, 1fr)); gap: 4px; }
.sr-stop { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 3px; border-radius: 9px; background: rgba(255,255,255,.03); border: 1px solid var(--line); min-width: 0; }
.sr-stop.got { opacity: .72; } .sr-stop.got .sr-p { color: var(--mint); }
.sr-stop.ready { border-color: var(--mint); background: rgba(61,220,151,.08); box-shadow: 0 0 12px rgba(61,220,151,.25); }
.sr-stop.next { border-color: var(--amber); box-shadow: inset 0 0 0 1px rgba(255,159,28,.35); }
.sr-stop.lim:not(.got) { background: linear-gradient(180deg, rgba(139,92,246,.10), rgba(255,255,255,.02)); }
.sr-k { display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 12px; min-width: 0; max-width: 100%; }
.sr-k .ss-tier { min-width: 0; max-width: 100%; padding: 1px 5px; font-size: 9.5px; letter-spacing: .02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-p { display: flex; align-items: center; gap: 3px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; font-size: 10.5px; }
.sr-p .ico { width: 12px; height: 12px; flex: none; }
.sr-claim { padding: 2px 10px !important; min-height: 0 !important; font-size: 11px !important; }
.sr-words { font-weight: 800; color: var(--ink); } .sr-pend { color: var(--amber2); }
@media (max-height: 430px) { .sr-stop:not(.ready) .sr-p { display: none; } .sr-stop { padding: 3px 2px; } }
.lb, .wk { display: flex; flex-direction: column; gap: 3px; }
.lb-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto 40px; align-items: center; gap: 8px; padding: 3px 8px; border-radius: 8px; font-size: 13px; min-width: 0; }
.lb-row:nth-of-type(odd) { background: rgba(255,255,255,.025); }
.lb-row.me { background: rgba(255,159,28,.14); box-shadow: inset 0 0 0 1px rgba(255,159,28,.55); }
.lb-p { font-weight: 900; color: var(--dim); text-align: center; }
.lb-p.gold { color: var(--gold); } .lb-p.silver { color: #d6dde8; } .lb-p.bronze { color: #e0a36b; }
.lb-row.me .lb-p { color: var(--amber2); }
.lb-n { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.lb-v { text-align: right; color: var(--amber2); font-variant-numeric: tabular-nums; }
.lb-row .ss-tier { min-width: 0; padding: 1px 6px; font-size: 10.5px; }
.lb-empty { padding: 6px 8px; }
.lb-how { margin-top: 2px; }
.wk .ss-row { padding: 4px 8px; }
.wk .ss-race { align-self: stretch; margin-top: 4px; }
.sr-layout .card { border-radius: 12px; background: rgba(255,255,255,.035); border: 1px solid var(--line); padding: 7px 10px; min-width: 0; }
.sr-layout .tag { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
/* v0.9.6: the season car at the Legend end of the road, the leaderboard's six parts, the final standing of the last season */
.sr-main { display: flex; align-items: stretch; gap: 10px; }
/* THE LEAGUE TAB (v0.9.7): the road, then its two boards, then what a place pays */
.lg-layout { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: stretch; }
.lg-hero { display: flex; flex-direction: column; gap: 8px; padding: 8px !important; border-radius: 12px; background: rgba(255,255,255,.035); border: 1px solid var(--line); }
.lg-hero .ev-hero { border-radius: 10px; min-height: 130px; }
.lg-me { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 2px 4px; }
.lg-tier { display: inline-flex; align-items: center; gap: 5px; } .lg-tier b { color: var(--tc); }
.lg-pay { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 8px; padding: 7px 10px; border-radius: 10px; background: rgba(255,255,255,.03); border: 1px solid var(--line); font-size: 12px; }
.lg-pay .k { color: var(--dim); font-weight: 800; margin-right: 4px; }
.lg-rung { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 8px; background: rgba(255,255,255,.04); } .lg-rung i { font-style: normal; color: var(--ink2); }
@media (max-height: 520px), (max-width: 900px) { .lg-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .lg-hero { grid-column: 1 / -1; flex-direction: row; } .lg-hero .ev-hero { flex: 1 1 auto; min-height: 76px; } .lg-me { flex-direction: column; align-items: flex-start; } .lg-pay .k { display: none; } }
.sr-main .sr-line { flex: 1 1 auto; min-width: 0; }
.sr-car { flex: 0 0 auto; width: clamp(150px, 19vw, 230px); display: flex; flex-direction: column; align-items: stretch; gap: 2px; padding: 3px 4px 4px; border-radius: 10px; cursor: pointer;
  background: linear-gradient(160deg, color-mix(in srgb, var(--sa) 26%, transparent), rgba(10,12,18,.6)); border: 1px solid color-mix(in srgb, var(--sa) 60%, transparent); color: var(--ink); font: inherit; text-align: left; }
.sr-car:hover { border-color: var(--sa); box-shadow: 0 0 14px color-mix(in srgb, var(--sa) 45%, transparent); }
.sr-car img { width: 100%; height: 52px; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0,0,0,.45)); }
.sr-car-t { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; font-size: 12px; padding: 0 3px; min-width: 0; }
.sr-car-t b { color: var(--sa); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .sr-car-t .small { color: var(--ink2); white-space: nowrap; font-size: 10.5px; }
.lb-parts { margin-top: 4px; padding-top: 5px; border-top: 1px solid var(--line); }
.lbp-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 3px; } .lbp-head b { color: var(--sa); }
.lbp-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; }
.lbp { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 3px 2px 2px; border-radius: 8px; background: rgba(255,255,255,.03); border: 1px solid var(--line); opacity: .62; }
.lbp.on { opacity: 1; border-color: var(--sa); background: color-mix(in srgb, var(--sa) 16%, transparent); }
.lbp .lbp-img, .lbp .ico { width: 34px; height: 34px; object-fit: contain; }
.lbp-b { font-size: 10px; font-weight: 900; letter-spacing: .02em; color: var(--ink2); white-space: nowrap; } .lbp.on .lbp-b { color: var(--sa); }
.sr-final { grid-column: 1 / 3; display: flex; align-items: center; gap: 12px; padding: 6px 10px !important; border-color: var(--sa, var(--mint)) !important; background: color-mix(in srgb, var(--sa, #3ddc97) 12%, transparent) !important; }
.sr-final b { white-space: nowrap; } .sr-final .small { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .sr-final .btn { flex: 0 0 auto; }
.season-car .sc-views { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 6px; margin-bottom: 8px; border-radius: 10px; padding: 6px; background: linear-gradient(160deg, color-mix(in srgb, var(--sa) 22%, transparent), rgba(10,12,18,.5)); }
.season-car .sc-shot { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }
@media (max-height: 430px) { .sr-car img { height: 40px; } .lbp .lbp-img, .lbp .ico { width: 26px; height: 26px; } .lb-how { display: none; } .sr-car-t .small { display: none; } }

/* the season board on the street (garage.js seasonMini) */
/* v0.9.6 (Uday, 15-10: "its so small - big names are getting outflowed"): wider, larger type, one line per driver with
   long names cut by an ellipsis (the whole name on hover), medal colours for the top three, your row set apart */
.season-mini { position: absolute; right: calc(var(--safe-r) + var(--edge)); top: calc(var(--safe-t) + 54px); width: clamp(220px, 21vw, 268px); padding: 8px 10px 9px; border-radius: 12px;
  background: rgba(12,14,20,.9); border: 1px solid var(--line2); box-shadow: 0 8px 24px rgba(0,0,0,.45); color: var(--ink); font: inherit; text-align: left; cursor: pointer; pointer-events: auto; z-index: 3; }
.season-mini:hover { border-color: var(--amber); }
.sm-head { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; color: var(--amber2); margin-bottom: 5px; }
.sm-head i { margin-left: auto; font-style: normal; font-size: 16px; }
.sm-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 14px; line-height: 1.25; padding: 4px 6px; border-radius: 7px; }
.sm-row + .sm-row { margin-top: 1px; }
.sm-row .sm-p { color: var(--dim); font-weight: 900; text-align: center; font-variant-numeric: tabular-nums; }
.sm-row .sm-p.gold { color: var(--gold); } .sm-row .sm-p.silver { color: #d6dde8; } .sm-row .sm-p.bronze { color: #e0a36b; }
.sm-row b { color: var(--amber2); font-variant-numeric: tabular-nums; text-align: right; min-width: 3ch; }
.sm-row .sm-n { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.sm-gap { height: 1px; margin: 4px 6px; background: var(--line2); }
.sm-row.me { background: rgba(255,159,28,.14); box-shadow: inset 0 0 0 1px rgba(255,159,28,.45); } .sm-row.me .sm-p { color: var(--amber2); }
@media (max-width: 760px), (max-height: 430px) { .season-mini { width: 200px; padding: 6px 8px 7px; } .sm-row { font-size: 13px; padding: 3px 5px; } }

/* ===================================================================== CLUBS (v0.9.7, src/ui/clubs.js) */
.emblem { width: 32px; height: 32px; flex: none; filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); }
.emblem.sm { width: 22px; height: 22px; } .emblem.md { width: 38px; height: 38px; } .emblem.lg { width: 54px; height: 54px; } .emblem.xl { width: 96px; height: 96px; }
.emblem.live .em-sym { animation: emPulse 2.6s ease-in-out infinite; transform-origin: 16px 16px; }
.emblem.champ { filter: drop-shadow(0 0 6px rgba(255,209,102,.75)) drop-shadow(0 2px 4px rgba(0,0,0,.5)); }
@keyframes emPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.clubs .dlg-body { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.clubs.panel, .clubs .panel, .panel.clubs { background: rgba(12,14,20,.97); }
.btn.primary .amt b { color: inherit; } .cl-seats { padding: 2px 4px; }
.cl-empty { padding: 18px; text-align: center; color: var(--ink2); }
.cl-hero { display: flex; align-items: center; gap: 16px; } .cl-hero b { font-size: 18px; }
.cl-search { width: 100%; padding: 9px 12px; border-radius: 10px; background: rgba(0,0,0,.35); border: 1px solid var(--line2); color: var(--ink); font: inherit; }
.cl-list { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; min-height: 0; max-height: min(52vh, 420px); padding-right: 4px; }
.cl-row, .cl-mem, .cl-wrow, .cl-req { display: grid; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 11px; background: rgba(255,255,255,.035); border: 1px solid var(--line); }
.cl-row { grid-template-columns: auto minmax(0, 1fr) auto auto; }
.cl-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; } .cl-name b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cl-name .small { flex-basis: 100%; }
.cl-tag { font-size: 11px; font-weight: 900; letter-spacing: .08em; padding: 1px 6px; border-radius: 6px; background: rgba(255,255,255,.08); color: var(--amber2); }
.cl-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 14px; background: linear-gradient(120deg, rgba(20,184,166,.12), rgba(109,75,255,.12)); border: 1px solid var(--line2); }
.cl-head .cl-name b { font-size: 19px; }
.cl-tabs { display: flex; gap: 4px; padding: 3px; border-radius: 12px; background: rgba(0,0,0,.35); }
.cl-tab { padding: 7px 14px; border-radius: 9px; font: inherit; font-weight: 900; color: var(--ink2); background: none; border: 0; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.cl-tab.on { background: var(--amber); color: #2a1200; } .cl-tab .n { min-width: 18px; height: 18px; border-radius: 9px; background: var(--hot); color: #fff; font-size: 11px; display: inline-grid; place-items: center; }
.cl-members { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.cl-mem { grid-template-columns: 22px minmax(0, 1fr) auto auto auto; } .cl-mem.me { border-color: rgba(255,159,28,.6); background: rgba(255,159,28,.1); }
.cl-pos { font-weight: 900; color: var(--dim); text-align: center; font-variant-numeric: tabular-nums; }
.cl-role { font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 6px; background: rgba(255,255,255,.06); color: var(--ink2); }
.cl-role.r-leader { background: rgba(242,194,48,.18); color: var(--gold); } .cl-role.r-deputy { background: rgba(74,163,255,.16); color: #9cc9ff; }
.cl-tier { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 800; color: var(--tc); white-space: nowrap; }
.cl-acts { display: flex; gap: 4px; }
.cl-reqs { display: flex; flex-direction: column; gap: 5px; padding: 8px; border-radius: 11px; border: 1px dashed rgba(61,220,151,.5); }
.cl-req { grid-template-columns: minmax(0, 1fr) auto auto; padding: 4px 8px; }
.cl-chatwrap { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.cl-chat { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; height: min(40vh, 330px); padding: 8px; border-radius: 12px; background: rgba(0,0,0,.28); border: 1px solid var(--line); }
.cl-chat.cl-bannered { border-top: 3px solid var(--sa); }
.cl-msg { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: baseline; gap: 8px; padding: 4px 6px; border-radius: 8px; font-size: 13px; }
.cl-msg b { color: var(--amber2); white-space: nowrap; } .cl-msg.me b { color: var(--mint); } .cl-msg .cl-txt { overflow-wrap: anywhere; }
.cl-msg.k-system { grid-template-columns: 1fr; color: var(--ink2); text-align: center; font-style: italic; } .cl-msg.k-quick .cl-txt { color: #c4a6ff; font-weight: 700; }
.cl-more { background: none; border: 0; color: var(--dim); cursor: pointer; font-size: 15px; padding: 0 4px; } .cl-more:hover { color: var(--ink); }
.cl-quick { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; } .cl-quick .chip { white-space: nowrap; cursor: pointer; }
.cl-send { display: flex; gap: 8px; } .cl-input { flex: 1; min-width: 0; padding: 9px 12px; border-radius: 10px; background: rgba(0,0,0,.35); border: 1px solid var(--line2); color: var(--ink); font: inherit; }
.cl-war { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 10px; }
.cl-war .card, .cl-club .card { border-radius: 12px; background: rgba(255,255,255,.035); border: 1px solid var(--line); padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.cl-war .tag, .cl-club .tag { display: flex; justify-content: space-between; gap: 8px; }
.cl-war-road .ev-hero { border-radius: 10px; min-height: 120px; } .cl-war-me { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cl-wrow { grid-template-columns: 22px auto minmax(0, 1fr) auto auto; padding: 5px 8px; } .cl-wrow.me { border-color: rgba(20,184,166,.7); background: rgba(20,184,166,.12); }
.cl-wrow b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .cl-pts { color: var(--amber2); }
.cl-war-pay { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.cl-club { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 10px; }
.cl-ladder { display: flex; flex-direction: column; gap: 3px; } .cl-lv { display: grid; grid-template-columns: 32px 1fr; gap: 8px; align-items: baseline; padding: 3px 6px; border-radius: 7px; color: var(--ink2); }
.cl-lv.got { color: var(--ink); } .cl-lv.got b { color: var(--mint); } .cl-lv.next { background: rgba(255,159,28,.12); color: var(--ink); } .cl-lv.next b { color: var(--amber2); }
.cl-give-b { display: flex; flex-wrap: wrap; gap: 8px; } .cl-leave { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
.cl-create-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 14px; }
.cl-preview { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--line2); text-align: center; }
.cl-preview b { font-size: 16px; overflow-wrap: anywhere; }
.cl-form { display: flex; flex-direction: column; gap: 8px; min-width: 0; } .cl-row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.cl-field { display: flex; flex-direction: column; gap: 3px; } .cl-field .k { font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); }
.cl-field input { padding: 8px 10px; border-radius: 9px; background: rgba(0,0,0,.35); border: 1px solid var(--line2); color: var(--ink); font: inherit; }
.cl-pick { display: flex; flex-wrap: wrap; gap: 4px; }
.cl-opt { width: 34px; height: 34px; padding: 0; display: grid; place-items: center; border-radius: 8px; background: rgba(255,255,255,.04); border: 1px solid var(--line); cursor: pointer; }
.cl-opt.on { border-color: var(--amber); background: rgba(255,159,28,.16); box-shadow: 0 0 0 1px var(--amber); }
.cl-opt.sw { background: linear-gradient(135deg, var(--c1) 0 50%, var(--c2) 50% 100%); }
.cl-rewards .dlg-body { display: flex; flex-direction: column; gap: 8px; }
.cl-rw-list { display: flex; flex-direction: column; gap: 5px; }
.cl-rw { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid var(--line); font-size: 13px; }
.cl-rw-tot { display: flex; justify-content: flex-end; align-items: center; gap: 14px; padding: 8px 10px; border-radius: 10px; background: rgba(61,220,151,.08); border: 1px solid rgba(61,220,151,.35); font-size: 15px; }
.cl-intro .dlg-body { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.cl-intro-art { min-height: 100px; display: grid; place-items: center; } .cl-dots { display: flex; gap: 6px; } .cl-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.2); } .cl-dots i.on { background: var(--amber); }
@media (max-height: 520px), (max-width: 820px) {
  .cl-war, .cl-club { grid-template-columns: 1fr 1fr; } .cl-war-road .ev-hero { min-height: 70px; } .cl-create-grid { grid-template-columns: 140px minmax(0, 1fr); }
  .emblem.xl { width: 64px; height: 64px; } .cl-chat { height: 34vh; } .cl-list { max-height: 44vh; } .cl-head { padding: 6px 10px; gap: 10px; } .cl-head .emblem.lg { width: 40px; height: 40px; }
  .cl-mem { grid-template-columns: 20px minmax(0, 1fr) auto auto; } .cl-mem .cl-tier { display: none; }
}

.cl-week-me { display: flex; flex-direction: column; gap: 4px; padding: 6px; border-radius: 10px; background: rgba(20,184,166,.1); border: 1px solid rgba(20,184,166,.4); }

/* ===================================================================== UI sweep fixes (v0.9.7, 16-10-2026) */
.cl-chat { height: clamp(120px, calc(100vh - 470px), 330px); }
.part-card .pc-name { min-width: 0; } .part-card .pc-name .nm, .part-card .pc-name .delta { display: block; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.part-card .pc-name .delta { font-size: 11px; }
.cl-preview .btn { width: 100%; justify-content: center; white-space: normal; line-height: 1.15; }
.cl-create .dlg-body { overflow-y: auto; }
.season-car .sc-views { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gift-chip { animation: giftPulse 1.6s ease-in-out infinite; white-space: nowrap; }
@media (max-width: 1100px) { .ev-tog { padding-left: 10px; padding-right: 10px; } }
@media (pointer: coarse) {
  .btn.small { min-height: 32px; } .dlg-head .close { min-width: 34px; min-height: 34px; }
  .cl-quick .chip { min-height: 32px; display: inline-flex; align-items: center; } .cl-msg .cl-more { min-width: 32px; min-height: 32px; }
  .set-row input[type=range] { height: 28px; } .cl-opt { width: 36px; height: 36px; } .cl-tab { min-height: 34px; }
}
@media (max-height: 520px), (max-width: 820px) { .cl-create-grid { grid-template-columns: 160px minmax(0, 1fr); } .cl-chat { height: 34vh; } }

/* ===================================================================== chat actions as words (CrazyGames review, 16-10-2026) */
.cl-acts { display: inline-flex; gap: 4px; }
.cl-act { background: none; border: 1px solid transparent; border-radius: 6px; color: var(--dim); cursor: pointer; font: 700 11px/1 inherit; letter-spacing: .02em; padding: 4px 6px; }
.cl-act:hover, .cl-act:focus-visible { color: var(--ink); border-color: rgba(255,255,255,.18); }
.cl-act.del:hover, .cl-act.del:focus-visible { color: #ff8a7a; border-color: rgba(255,138,122,.4); }
.cl-msg.k-sys, .cl-msg.k-system { grid-template-columns: minmax(0, 1fr) auto; color: var(--ink2); font-style: italic; }
.cl-msg.k-sys > .small, .cl-msg.k-system > .small { text-align: center; }
@media (pointer: coarse) { .cl-act { min-height: 32px; padding: 6px 9px; } }

/* ===================================================================== the street's right column: season, clubs, chat (16-10-2026) */
.side-stack { position: absolute; right: calc(var(--safe-r) + var(--edge)); top: calc(var(--safe-t) + 54px); width: clamp(220px, 21vw, 268px); display: flex; flex-direction: column; gap: 8px; z-index: 3; max-height: calc(100vh - var(--safe-t) - 150px); }
.side-stack .season-mini { position: static; width: auto; }
.club-board, .home-chat { padding: 8px 10px 9px; border-radius: 12px; background: rgba(12,14,22,.82); border: 1px solid rgba(20,184,166,.45); backdrop-filter: blur(6px); box-shadow: 0 8px 22px rgba(0,0,0,.35); }
.club-board .sm-head { color: #5eead4; }
.cb-togs { display: inline-flex; margin-left: auto; background: rgba(255,255,255,.06); border-radius: 999px; padding: 2px; }
.cb-tog { border: 0; background: none; color: var(--dim); font: 800 10px/1 inherit; letter-spacing: .06em; text-transform: uppercase; padding: 4px 8px; border-radius: 999px; cursor: pointer; }
.cb-tog.on { background: rgba(20,184,166,.28); color: #ccfbf1; }
.cb-open { border: 0; background: none; color: #5eead4; font-size: 16px; cursor: pointer; padding: 0 2px 0 6px; }
.cb-row .cb-n { display: flex; align-items: center; gap: 6px; min-width: 0; }
.cb-row .emblem.cb-em { width: 18px; height: 18px; flex: 0 0 auto; }
.cb-row.me { background: rgba(20,184,166,.16); box-shadow: inset 0 0 0 1px rgba(20,184,166,.5); }
.cb-empty { color: var(--ink2); padding: 4px 6px; }
.cb-pay { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 11px; color: var(--ink2); margin: 6px 4px 6px; }
.cb-pay i { font-style: normal; color: var(--dim); }
.cb-cta { width: 100%; justify-content: center; position: relative; }
.cb-cta .cb-left { margin-left: 6px; font-size: 11px; opacity: .8; font-variant-numeric: tabular-nums; }
.cb-cta .badge { position: absolute; top: -7px; right: -7px; }
.home-chat { display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.hc-head { display: flex; align-items: center; gap: 6px; border: 0; background: none; color: #5eead4; font: 900 12px/1 inherit; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; padding: 0; }
.hc-head i { margin-left: auto; font-style: normal; font-size: 16px; } .hc-head .badge { position: static; }
.hc-lines { display: flex; flex-direction: column; gap: 3px; min-height: 0; overflow: hidden; }
.hc-line { font-size: 12.5px; line-height: 1.3; color: var(--ink); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.hc-line b { color: var(--amber2); margin-right: 5px; } .hc-line.me b { color: var(--mint); } .hc-line.sys { color: var(--ink2); font-style: italic; }
.hc-send { display: flex; gap: 6px; } .hc-input { flex: 1; min-width: 0; height: 30px; border-radius: 8px; border: 1px solid var(--line2); background: rgba(0,0,0,.35); color: var(--ink); padding: 0 8px; font: inherit; font-size: 12.5px; }
.hc-input:focus { outline: none; border-color: #5eead4; }
/* the Drive choice (Uday 26-10): Endless and Story, two big cards side by side */
.drive-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.drive-opt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 168px; padding: 14px 10px; border-radius: 16px; text-align: center; font: inherit; color: var(--ink); cursor: pointer; background: linear-gradient(180deg, #1c2230, #12161f); border: 1px solid var(--line2); }
.drive-opt:hover { transform: translateY(-2px); }
.drive-opt .do-ico { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: rgba(255,255,255,.06); } .drive-opt .do-ico .ico { width: 30px; height: 30px; }
.drive-opt b { font-size: 22px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; } .drive-opt .do-l { font-size: 13px; color: var(--ink2); line-height: 1.25; }
.drive-opt.endless { background: linear-gradient(180deg, var(--amber2), var(--amber)); border-color: var(--amber); color: #2a1200; box-shadow: 0 3px 0 #8a3f08, 0 8px 20px rgba(255,120,30,.3); }
.drive-opt.endless .do-ico { background: rgba(42,18,0,.16); } .drive-opt.endless .do-l { color: rgba(42,18,0,.75); }
.drive-opt.story { border-color: rgba(190,120,220,.55); } .drive-opt.story .do-ico { color: #d9a8f0; background: rgba(190,120,220,.14); }
@media (max-height: 520px), (max-width: 480px) { .drive-opt { min-height: 112px; padding: 8px; gap: 3px; } .drive-opt .do-ico { width: 40px; height: 40px; } .drive-opt .do-ico .ico { width: 22px; height: 22px; } .drive-opt b { font-size: 18px; } .drive-opt .do-l { font-size: 12px; } }
/* the deck: Events and League share one row */
.deck-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.deck-pair .deck-card { min-width: 0; padding: 8px 9px; gap: 8px; } .deck-pair .deck-card .dk-ico { width: 30px; height: 30px; }
.deck-pair .deck-card .dk-t b { font-size: 14px; }
.deck-card.league { border-color: rgba(201,162,39,.6); } .deck-card.league .dk-ico { color: var(--gold); background: rgba(201,162,39,.14); }
.ss-league { margin-top: 8px; width: 100%; justify-content: center; border-color: rgba(201,162,39,.6); } .ss-league .chip { margin-left: 8px; }
/* short and narrow screens (phones on their side): the season list shows you only, the clubs' table its top two, the chat one line */
@media (max-height: 520px), (max-width: 760px) {
  .side-stack { width: 210px; gap: 6px; top: calc(var(--safe-t) + 46px); max-height: calc(100vh - var(--safe-t) - 60px); }
  .club-board, .home-chat { padding: 6px 8px 7px; }
  .club-board .cb-row:nth-of-type(n+4) { display: none; } .cb-pay { display: none; }
  .hc-lines .hc-line:not(:last-child) { display: none; } .hc-input { height: 28px; }
  .deck-pair .deck-card .dk-l { font-size: 10.5px; }
}
@media (max-height: 430px) { .side-stack .season-mini .sm-row:not(.me) { display: none; } .side-stack .season-mini .sm-gap { display: none; } }
@media (pointer: coarse) { .cb-tog { padding: 7px 10px; } .hc-input { height: 34px; } }

/* ===================================================================== the bench's way on never leaves the screen (Uday 16-10: "CTAs are cut off ... trying to update my car and hit race") */
.bench-go { display: flex; align-items: center; gap: 6px; }
/* the top bar has no room for them on any screen once the tabs and wallet are in: Cancel, back and Start float over the car, just above the tray, always in reach */
@media all {
  .gar-top.in-place .bench-go { position: fixed; right: calc(var(--safe-r) + 10px); bottom: calc(var(--tray, 0px) + var(--safe-b) + 10px); z-index: 30; padding: 6px; border-radius: 14px;
    background: rgba(10,12,18,.92); border: 1px solid var(--line2); box-shadow: 0 10px 26px rgba(0,0,0,.5); }
  .gar-top.in-place .bench-go .btn.drive { min-height: 40px; padding: 0 16px; font-size: 15px; }
}

/* the street's ad reward pill (16-10) */
.ad-pill { display: flex; align-items: center; gap: 9px; width: 100%; margin-top: 8px; padding: 7px 12px; border-radius: 12px; border: 1px solid rgba(255,196,0,.55); background: linear-gradient(180deg, rgba(255,196,0,.2), rgba(255,140,0,.12)); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.ad-pill .ico { color: var(--gold); } .ad-pill .ap-t { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.ad-pill b { font-size: 13.5px; font-weight: 900; color: #ffe08a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .ad-pill i { font-style: normal; font-size: 11px; color: var(--ink2); }
.ad-pill.ready { animation: giftPulse 1.8s ease-in-out infinite; } .ad-pill:disabled { opacity: .65; cursor: default; animation: none; }
@media (max-height: 520px), (max-width: 760px) { .ad-pill { padding: 5px 9px; margin-top: 6px; } .ad-pill i { display: none; } }

.side-stack, .side-stack > * { pointer-events: auto; }

.cb-togs { flex: 0 0 auto; } .club-board .sm-head { gap: 5px; min-width: 0; }
@media (max-height: 520px), (max-width: 760px) { .cb-tog { padding: 4px 6px; font-size: 9.5px; } }

/* ===================================================================== inside the garage (16-10): the picture, its signs, the cash and Back */
.gar-inside { gap: 12px; } .gar-inside .gi-title { font-size: 18px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: var(--amber2); text-shadow: 0 2px 10px rgba(0,0,0,.7); }
.gar-inside #btn-garage-exit { min-height: 36px; padding: 0 14px; font-size: 14px; }
.gar-hint { position: absolute; left: 50%; bottom: calc(var(--safe-b) + 18px); transform: translateX(-50%); padding: 6px 14px; border-radius: 999px; background: rgba(10,12,18,.72); color: var(--ink2); font-size: 12.5px; pointer-events: none; white-space: nowrap; }
.deck-card.garage { border-color: rgba(255,159,28,.55); } .deck-card.garage .dk-ico { color: var(--amber2); background: rgba(255,159,28,.12); }

/* the phone deck (16-10 pass): seven cards share the row evenly; the Events/League pair unpacks into it */
@media (max-height: 520px) {
  .deck-pair { display: contents; }
  .deck-card { justify-content: center; } .deck-card .dk-t { align-items: center; }
  .ad-pill { position: fixed; left: calc(var(--safe-l) + var(--edge)); top: calc(var(--safe-t) + 54px); width: auto; max-width: 220px; margin: 0; z-index: 3; }
}
@media (max-height: 520px) and (max-width: 760px) {
  .deck { gap: 4px; } .deck-card { padding: 6px 4px; } .deck-card .dk-ico { display: none; }
  .deck-card .dk-t b, .deck-card.drive .dk-t b { font-size: 12.5px; letter-spacing: .02em; }
}

/* PHONES ON THEIR SIDE (Uday 16-10: "left side is empty - you can use that space"): the deck is a two-column panel down
   the left, Drive across the top, the car keeps the middle and the boards keep the right */
@media (max-height: 520px) {
  .gar-bottom:has(> .deck) { left: calc(var(--safe-l) + var(--edge)); right: auto; transform: none; width: clamp(230px, 34vw, 290px); bottom: calc(var(--safe-b) + 8px); align-items: stretch; }
  .deck { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
  .deck-card, .deck-card.drive { min-height: 40px; padding: 5px 8px; gap: 6px; justify-content: flex-start; }
  .deck-card .dk-t { align-items: flex-start; }
  .deck-card.drive { grid-column: 1 / -1; min-height: 46px; justify-content: center; }
  .deck-card.solo { grid-column: 1 / -1; justify-content: center; }   /* the odd card out (Garage) takes the whole row: no empty cell */
  .deck-card .dk-ico, .deck-card.drive .dk-ico { display: grid; width: 22px; height: 22px; } .deck-card .dk-ico .ico { width: 14px; height: 14px; }
  .deck-card .dk-t b { font-size: 12.5px; } .deck-card.drive .dk-t b { font-size: 15px; }
  .gar-bottom:has(> .deck) > .gift-banner.garage { align-self: stretch; padding: 4px 8px; }
  .gar-bottom:has(> .deck) > .gift-banner.garage .small { display: none; }
}

/* THE GIFT BUTTON NEVER CLIPS (Uday 16-10: "the button in main menu is cut off in the top in full screen, its just green"):
   it leaves the top of the deck column and stands at the bottom, just right of the deck, on the open ground */
.gar-bottom:has(> .deck) > .gift-banner.garage { position: fixed; order: 0; bottom: calc(var(--safe-b) + 12px); left: calc(var(--safe-l) + var(--edge, 14px) + min(280px, 34vw) + 14px);
  width: auto; max-width: min(420px, calc(100vw - var(--safe-l) - var(--safe-r) - min(280px, 34vw) - 60px)); align-self: auto; z-index: 4; }
@media (max-height: 520px) { .gar-bottom:has(> .deck) > .gift-banner.garage { left: calc(var(--safe-l) + var(--edge, 14px) + clamp(230px, 34vw, 290px) + 12px); bottom: calc(var(--safe-b) + 8px);
  max-width: calc(100vw - var(--safe-l) - var(--safe-r) - clamp(230px, 34vw, 290px) - 40px); } }

/* ===================================================================== clubs, 16-10-2026 evening: the chat box always in view, messages, drivers, the war notice */
.cl-on-chat .dlg-body { overflow: hidden; }
.cl-on-chat .cl-chatwrap { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.cl-on-chat .cl-chat, .cl-dm .cl-chat { flex: 1 1 auto; height: auto !important; min-height: 60px; overflow-y: auto; }
.cl-on-chat .cl-quick, .cl-on-chat .cl-send { flex: none; }
.cl-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .cl-tools .cl-search { flex: 1 1 200px; min-width: 0; }
.cl-dm-btn { position: relative; } .cl-dm-btn .badge, .cl-tab .badge { position: static; margin-left: 4px; }
.cl-seen { color: var(--dim); } .cl-seen.on { color: var(--mint); } .cl-seen.on::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); margin-right: 5px; box-shadow: 0 0 6px var(--mint); }
.cl-thread { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; } .cl-thread.unread b { color: var(--mint); }
.cl-thread .cl-name .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46ch; }
.cl-invites { border-color: rgba(52,211,153,.5); }
.cl-inbox { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.war-notice { display: flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 10px; border: 1px solid rgba(255,90,60,.55); background: linear-gradient(90deg, rgba(255,70,40,.28), rgba(20,12,16,.85)); color: var(--ink); font: inherit; font-size: 12px; cursor: pointer; text-align: left; }
.war-notice b { text-transform: uppercase; letter-spacing: .06em; font-size: 11.5px; color: #ffb4a0; white-space: nowrap; } .war-notice .wn-t { color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.war-notice .wn-dot { width: 8px; height: 8px; border-radius: 50%; background: #ff5a3c; box-shadow: 0 0 8px #ff5a3c; flex: none; animation: wnPulse 1.2s ease-in-out infinite; }
.war-notice.hot { border-color: #ff5a3c; animation: giftPulse 1.8s ease-in-out infinite; }
@keyframes wnPulse { 50% { opacity: .35; } }
@media (max-height: 520px) { .war-notice { padding: 4px 8px; font-size: 11px; } }

/* the right-hand column always fits (16-10 evening): under 860 px of height the two boards show the leader and you, the chat its last two lines */
@media (max-height: 860px) {
  .side-stack .season-mini .sm-row:not(.me) ~ .sm-row:not(.me), .side-stack .cb-row:not(.me) ~ .cb-row:not(.me) { display: none; }
  .side-stack .cb-pay { display: none; }
  .hc-lines .hc-line:nth-last-child(n+3) { display: none; }
}
.side-stack { overflow: hidden; }

/* another club's page (16-10) */
.cl-link { cursor: pointer; } .cl-wrow.cl-link:hover, .cb-row.cl-link:hover { background: rgba(255,255,255,.06); }
button.cl-name.cl-link { background: none; border: 0; padding: 0; text-align: left; font: inherit; color: inherit; } button.cl-name.cl-link:hover b { color: var(--amber2); text-decoration: underline; text-underline-offset: 3px; }
.cl-mrow { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto auto; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 10px; background: rgba(255,255,255,.03); }
.cl-mrow + .cl-mrow { margin-top: 4px; }
.cl-desc { color: var(--ink2); padding: 0 4px; }
.cl-peek .dlg-foot { justify-content: center; }
@media (max-height: 520px) { .cl-mrow { grid-template-columns: 22px minmax(0, 1fr) auto auto; } .cl-mrow .cl-tier { display: none; } }

/* the war's drivers' board under the road card (16-10) */
.cl-war-col { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.cl-war-drivers { flex: 1 1 auto; min-height: 0; }
.cl-dlist { display: flex; flex-direction: column; gap: 3px; overflow-y: auto; min-height: 0; max-height: 220px; }
.cl-drow { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto auto auto; gap: 8px; align-items: center; padding: 4px 8px; border-radius: 8px; font-size: 13px; cursor: pointer; }
.cl-drow:hover { background: rgba(255,255,255,.06); }
.cl-drow .cl-dn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.cl-drow .cl-dclub { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; color: var(--ink2); }
.cl-drow .cl-dclub .emblem { width: 16px; height: 16px; } .cl-drow .cl-dt { font-variant-numeric: tabular-nums; color: var(--ink2); }
.cl-drow.me { background: rgba(255,159,28,.14); box-shadow: inset 0 0 0 1px rgba(255,159,28,.45); } .cl-drow.mate { background: rgba(20,184,166,.1); }
.cl-pos.gold { color: var(--gold); } .cl-pos.silver { color: #d6dde8; } .cl-pos.bronze { color: #e0a36b; }
@media (max-height: 520px) { .cl-dlist { max-height: 110px; } .cl-drow { font-size: 12px; padding: 3px 6px; } }

/* two rows of parts fit the tray without a cut (16-10 full-screen pass); phones keep the shorter tray */
@media (min-height: 600px) { :root { --tray: 230px; } }
/* A PHONE ON ITS SIDE, INSIDE A PLACE (playtest 26-10, 844x390: "3D preview only ~150px tall, only 2-3 list rows visible, the
   'Garage' title hidden behind the tab bar, and the second row of upgrade buttons cut off"). The bar gets thinner and the
   way back never shrinks under the tabs (the tabs scroll sideways first); the tray is a little shorter, so the car has
   more of the picture (ShopFront measures the tray, so the framing follows), and everything in it is a size denser, so
   two rows of parts, both rows of slots and five or six list rows fit. Anything that still does not fit scrolls inside
   the tray, the Custom columns too: nothing is cut */
@media (max-height: 430px) {
  :root { --tray: 196px; }
  .gar-top { min-height: 40px; gap: 6px; padding-top: calc(var(--safe-t) + 3px); padding-bottom: 3px; }
  .gar-top .shop-back { flex: none; min-height: 32px; padding: 0 10px; }
  .gar-top.in-place .sec-tabs { flex: 0 1 auto; min-width: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
  .gar-top.in-place .sec-tabs::-webkit-scrollbar { display: none; }
  .gar-top.in-place .sec-tab { flex: none; min-height: 32px; padding: 0 8px; font-size: 12px; }
  .gar-top.in-place .gar-tools { flex: none; }
  .gar-top.in-place .gar-tools .cash { font-size: 15px; }
  .gar-top.in-place .btn.drive { min-height: 32px; padding: 0 12px; }
  .tray-half { padding: 4px 6px 5px; }
  .tray-head { min-height: 20px; padding-bottom: 3px; }
  .tray-head b { font-size: 13px; }
  .tray-head .small { font-size: 10.5px; }
  .tray-extra .btn.small { min-height: 28px; }
  .shop-tray .tray-body, .shop-tray.full .tray-body { overflow-y: auto; }
  .shop-mid { bottom: calc(var(--tray) + var(--safe-b) + 5px); }
  .spec-card { padding: 5px 9px 6px; } .spec-rows { gap: 1px 7px; font-size: 11.5px; }
  .car-grid { gap: 4px; } .car-card { min-height: 32px; padding: 2px 4px 2px 9px; }
  .car-card .name { font-size: 13px; } .car-card .tagline { font-size: 11px; }
  .car-card .btn.small { min-height: 28px; }
  .part-grid { gap: 4px; }
  .part-card { gap: 3px; padding: 4px 5px 5px; }
  .part-ico { width: 20px; height: 20px; } .part-ico .ico { width: 14px; height: 14px; } .part-thumb { width: 18px; height: 18px; }
  .pc-name .nm { font-size: 11.5px; } .part-card .delta { font-size: 10px; }
  .part-card .btn.small { min-height: 27px; font-size: 11px; }
  .slot-grid { gap: 4px; } .slot-card { min-height: 58px; padding: 4px 7px; }
  .style-col .tray-head { min-height: 18px; padding-bottom: 2px; }
  .sw { height: 46px; gap: 2px; } .sw i { height: 21px; }
}

/* laptops and the CrazyGames frame (521-900 px tall, 16-10 pass): the deck is the same two-column grid as on phones, Drive across
   the top, so all seven cards sit well under the top bar */
@media (min-height: 521px) and (max-height: 900px) {
  .deck { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .deck-pair { display: contents; }
  .deck-card { min-height: 46px; padding: 6px 9px; gap: 8px; } .deck-card.drive { grid-column: 1 / -1; min-height: 52px; }
  .deck-card .dk-ico { width: 26px; height: 26px; } .deck-card .dk-t b { font-size: 13.5px; } .deck-card .dk-l { font-size: 10.5px; }
}

/* ghosts (16-10): the gap chip, the board's watch / race / your-run buttons */
.ghost-gap { position: absolute; left: 50%; top: calc(var(--safe-t) + 64px); transform: translateX(-50%); z-index: 12; padding: 6px 14px; border-radius: 999px; background: rgba(8,10,16,.78); border: 1px solid rgba(127,211,255,.6); color: #e8f7ff; font-weight: 800; font-size: 14px; pointer-events: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ghost-gap.behind { border-color: rgba(255,106,90,.75); color: #ffd2cc; } .ghost-gap.ahead { border-color: rgba(52,211,153,.75); color: #c9ffe8; }
.rp-btns { display: inline-flex; gap: 4px; } .rp-btn.race { color: #ff8a7a; } .rp-btn.mine { color: #7fd3ff; }
.rh-ghosts { color: #9fe0ff; }

/* Heatline Daily (16-10) */
.daily-news .dn-fight .ev-hero { min-height: 150px; border-radius: 12px; }
.dn-vs { position: relative; display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 10px; }
.dn-vs i { font-style: italic; font-weight: 900; color: var(--amber2); font-size: 18px; text-transform: uppercase; }
.dn-p { display: flex; flex-direction: column; align-items: center; padding: 6px 14px; border-radius: 10px; background: rgba(8,10,16,.72); min-width: 0; }
.dn-p b { font-size: 16px; max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .dn-p.a b { color: #ffd27a; } .dn-p.b b { color: #ffb4a8; }
.dn-gap { position: relative; text-align: center; margin-top: 6px; color: var(--ink2); }
.dn-fight .btn { align-self: center; margin-top: 8px; }
.dn-list { display: flex; flex-direction: column; gap: 4px; }
.dn-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 6px 10px; border-radius: 10px; background: rgba(255,255,255,.035); }
.dn-row.top { background: rgba(255,196,0,.1); box-shadow: inset 0 0 0 1px rgba(255,196,0,.35); } .dn-rank { color: var(--amber2); font-size: 16px; }
.dn-ev { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
@media (max-height: 520px) { .daily-news .dn-fight .ev-hero { min-height: 96px; } .dn-gap { display: none; } }

/* [TAG] Name on every board (16-10): one line, the tag kept, the name cut with an ellipsis */
.dname { display: flex; align-items: baseline; gap: 4px; min-width: 0; overflow: hidden; white-space: nowrap; }
.dname .ctag { flex: none; font-style: normal; font-weight: 800; font-size: .82em; color: #5eead4; }
.dname .dn-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* the chat: Global / Club on the street, and the side panel (16-10) */
.hc-head { display: flex; align-items: center; gap: 6px; color: #5eead4; }
.hc-tabs { display: inline-flex; gap: 2px; background: rgba(255,255,255,.06); border-radius: 999px; padding: 2px; }
.hc-tab { border: 0; background: none; color: var(--dim); font: 800 10.5px/1 inherit; letter-spacing: .06em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.hc-tab.on { background: rgba(20,184,166,.28); color: #ccfbf1; } .hc-tab .badge { position: static; font-size: 9px; min-width: 15px; height: 15px; }
.hc-open { margin-left: auto; border: 0; background: none; color: #5eead4; font-size: 16px; cursor: pointer; padding: 0 2px; }
.hc-line { display: flex; gap: 5px; align-items: baseline; } .hc-line .hc-who { flex: 0 1 auto; max-width: 48%; font-weight: 800; color: var(--amber2); } .hc-line.me .hc-who { color: var(--mint); }
.hc-line > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the side panel: full height on the right, the street still visible beside it */
#s-chatPanel.screen.modal { justify-content: flex-end; align-items: stretch; background: rgba(6,8,12,.35); }
.chat-panel.panel { max-width: min(440px, 94vw); height: 100%; max-height: none; border-radius: 16px 0 0 16px; }
.chat-panel .cp-who { flex: 0 1 auto; max-width: 140px; font-weight: 800; color: var(--amber2); } .chat-panel .cl-msg.me .cp-who { color: var(--mint); }
.chat-panel .cl-msg { grid-template-columns: auto minmax(0, 1fr) auto auto; }
@media (pointer: coarse) { .hc-tab { padding: 7px 10px; } .hc-open { min-width: 32px; min-height: 32px; } }

/* name styles (16-10) */
.dname.ns .dn-t { font-weight: 800; } .dname .ns-badge { flex: none; font-size: .9em; }
.dname .dn-t.grad { -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 200% 100%; animation: nsShine 3.2s linear infinite; }
@keyframes nsShine { to { background-position: -200% 0; } }
.hc-style { border: 0; background: none; color: #f0abfc; font-size: 14px; cursor: pointer; padding: 0 2px; }
.cp-aside { display: inline-flex; align-items: center; gap: 6px; }
.ns-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.ns-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.ns-card.on { border-color: var(--mint); background: rgba(52,211,153,.08); } .ns-card.t-legendary { border-color: rgba(255,196,0,.5); } .ns-card.t-epic { border-color: rgba(192,38,211,.45); }
.ns-card .ns-prev { font-size: 15px; max-width: 100%; }
@media (pointer: coarse) { .hc-style { min-width: 30px; min-height: 30px; } }

.daily-news .tag { display: flex; justify-content: space-between; gap: 10px; }

/* the outbox (19-10): lines on their way, and a Send button that shows the wait */
.cl-msg.pend, .hc-line.pend { opacity: .6; } .cl-msg.pend.failed, .hc-line.pend.failed { opacity: 1; }
.cl-msg.pend.failed .cl-txt, .hc-line.pend.failed span { color: #ffb4a8; } .cl-msg.pend.failed i { color: #ff8a7a; }
.cl-msg.pend.sending i::after { content: ''; display: inline-block; width: 8px; height: 8px; margin-left: 5px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: csSpin .8s linear infinite; vertical-align: -1px; }
.cl-sendbtn { min-width: 84px; justify-content: center; position: relative; font-variant-numeric: tabular-nums; }
.cl-sendbtn.btn.small { min-width: 62px; }
.cl-sendbtn .cs-spin { display: inline-block; width: 12px; height: 12px; margin-right: 6px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: csSpin .8s linear infinite; }
.cl-sendbtn.cooling { background: conic-gradient(rgba(255,255,255,.28) calc(var(--p, 0) * 360deg), transparent 0) , linear-gradient(180deg, #ffbf3f, #ff7a1a); opacity: .85; }
.cl-sendbtn:disabled { cursor: default; }
@keyframes csSpin { to { transform: rotate(360deg); } }

/* the right column sheds detail until it fits (fitSideStack in src/ui/garage.js, CrazyGames 20-10) */
.side-stack.fit-1 { gap: 6px; } .side-stack.fit-1 .cb-pay { display: none; } .side-stack.fit-1 .club-board .cb-row:nth-of-type(n+4) { display: none; }
.side-stack.fit-1 .hc-lines .hc-line:nth-last-child(n+3) { display: none; }
.side-stack.fit-2 .season-mini .sm-row:not(.me), .side-stack.fit-2 .season-mini .sm-gap { display: none; }
.side-stack.fit-2 .hc-lines .hc-line:not(:last-child) { display: none; } .side-stack.fit-2 .club-board, .side-stack.fit-2 .home-chat { padding: 6px 8px 7px; }
.side-stack.fit-3 .hc-lines { display: none; } .side-stack.fit-3 .club-board .cb-row:not(.me) { display: none; }
.side-stack.fit-4 .season-mini { display: none; }
.side-stack.fit-5 .club-board .cb-row { display: none; } .side-stack.fit-5 .war-notice .wn-t { display: none; }
.side-stack.fit-6 .club-board { display: none; }

/* the street's chat button (20-10): one line, the unread counts, opens the chat pop-up */
.home-chat:has(.hc-btn) { padding: 0; background: none; border: 0; box-shadow: none; backdrop-filter: none; }
.hc-btn { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 12px; border-radius: 12px; cursor: pointer; text-align: left;
  background: rgba(12,14,22,.82); border: 1px solid rgba(20,184,166,.45); box-shadow: 0 8px 22px rgba(0,0,0,.35); backdrop-filter: blur(6px); color: #5eead4; font: inherit; }
.hc-btn b { font: 900 12.5px/1 inherit; letter-spacing: .08em; text-transform: uppercase; }
.hc-btn .badge { position: static; } .hc-btn:hover, .hc-btn:focus-visible { border-color: #5eead4; background: rgba(20,184,166,.16); outline: none; }
.hc-club { display: inline-flex; align-items: center; gap: 4px; margin-left: 4px; color: var(--ink2); font: 800 10.5px/1 inherit; letter-spacing: .06em; text-transform: uppercase; }
.hc-go { margin-left: auto; font-style: normal; font-size: 18px; line-height: 1; color: #5eead4; }
@media (max-height: 520px), (max-width: 760px) { .hc-btn { padding: 8px 10px; } }

/* THE CHAT POP-UP (Uday 20-10: "rather than side panel have a BIG popup because text is getting flowed over every 3 letters"):
   centred and large, each message on the full width with its time and actions in a quiet line under it */
#s-chatPanel.screen.modal { justify-content: center; align-items: center; background: rgba(6,8,12,.72); }
/* sized to its screen, not the window: the UI is scaled to fit, so vh and vw overshoot on some windows */
#s-chatPanel .chat-panel.panel { width: min(900px, 100%); max-width: min(900px, 100%); height: min(680px, 100%); max-height: 100%; border-radius: 16px; display: flex; flex-direction: column; }
.chat-panel .dlg-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.chat-panel .cl-chatwrap { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.chat-panel .cp-list { flex: 1 1 auto; min-height: 0; height: auto; max-height: none; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.cp-msg { display: flex; flex-direction: column; gap: 2px; padding: 7px 10px; border-radius: 10px; }
.cp-msg:nth-child(odd) { background: rgba(255,255,255,.03); } .cp-msg.me { background: rgba(61,220,151,.07); }
.cp-msg.k-sys { color: var(--ink2); font-style: italic; text-align: center; }
.cp-line { font-size: 14.5px; line-height: 1.4; overflow-wrap: anywhere; color: var(--ink); }
.cp-line .cp-who { display: inline-flex; max-width: 220px; margin-right: 8px; vertical-align: baseline; font-weight: 800; color: var(--amber2); }
.cp-msg.me .cp-who { color: var(--mint); }
.cp-meta { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.cp-meta .cl-acts { opacity: .75; } .cp-msg:hover .cp-meta .cl-acts { opacity: 1; }
.chat-panel .cl-msg.pend { display: flex; gap: 8px; align-items: baseline; padding: 7px 10px; flex-wrap: wrap; }
/* the time and actions sit on the message's own line when there is room, under it when there is not */
.cp-msg { flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 12px; }
.cp-line { flex: 1 1 320px; min-width: 0; } .cp-meta { flex: 0 0 auto; margin-left: auto; }
@media (max-height: 520px) { .cp-line { font-size: 13.5px; } .cp-msg { padding: 5px 8px; } }

/* level 25: the Legend frame (20-10) */
.emblem.legend { filter: drop-shadow(0 0 4px rgba(165,243,252,.85)) drop-shadow(0 0 9px rgba(240,171,252,.5)); }

/* ===================================================================== THE CLUB HUB AND THE TURF WAR (20-10-2026) */
.cl-tabs-hidden { display: none !important; }
.cl-hub { display: flex; flex-direction: column; gap: 10px; }
.cl-hub-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.cl-tile { position: relative; display: flex; align-items: center; gap: 11px; min-height: 70px; padding: 12px 14px; border-radius: 14px; text-align: left; font: inherit; color: var(--ink); cursor: pointer;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02)); border: 1px solid var(--line2); transition: transform .12s, border-color .12s; }
.cl-tile:hover, .cl-tile:focus-visible { transform: translateY(-2px); border-color: rgba(255,191,63,.6); outline: none; }
.cl-tile .ct-ico { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.07); color: var(--amber2); }
.cl-tile .ct-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cl-tile .ct-t b { font-size: 15px; font-weight: 900; letter-spacing: .02em; }
.cl-tile .ct-t .small { color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-tile .badge { position: absolute; top: -6px; right: -6px; }
.cl-tile.big { grid-column: span 2; min-height: 96px; }
.cl-tile.big .ct-ico { width: 52px; height: 52px; } .cl-tile.big .ct-t b { font-size: 19px; }
.cl-tile.turf { border-color: rgba(236,72,153,.55); background: linear-gradient(135deg, rgba(236,72,153,.22), rgba(124,58,237,.12)); } .cl-tile.turf .ct-ico { color: #f9a8d4; }
.cl-tile.war { border-color: rgba(255,122,26,.55); background: linear-gradient(135deg, rgba(255,122,26,.2), rgba(255,191,63,.08)); }
.cl-tile.hot { animation: clHot 1.6s ease-in-out infinite; }
@keyframes clHot { 50% { box-shadow: 0 0 0 3px rgba(255,191,63,.28); } }
.cl-hub-note { color: var(--ink2); text-align: center; }
.cl-turf { display: flex; flex-direction: column; gap: 10px; }
.cl-turf-road b { font-size: 16px; } .cl-turf-road { display: flex; flex-direction: column; gap: 4px; }
.cl-turf-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: rgba(0,0,0,.3); border: 1px solid var(--line2); }
.ts-side { display: flex; align-items: center; gap: 8px; font: inherit; color: var(--ink); background: none; border: 0; padding: 0; } .ts-side.them { justify-content: flex-end; cursor: pointer; flex-direction: row-reverse; }
.ts-side b { font-size: 16px; font-weight: 900; } .ts-pts { display: flex; align-items: center; gap: 10px; font-size: 30px; font-weight: 900; font-variant-numeric: tabular-nums; }
.cl-duels { display: flex; flex-direction: column; gap: 4px; }
.cl-duel { display: grid; grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr); align-items: center; gap: 8px; padding: 6px 10px; border-radius: 10px; background: rgba(255,255,255,.03); }
.cl-duel.me { box-shadow: inset 0 0 0 1px rgba(61,220,151,.55); }
.cd-n { display: flex; align-items: baseline; gap: 8px; min-width: 0; } .cd-n b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .cd-n i { font-style: normal; color: var(--ink2); font-variant-numeric: tabular-nums; }
.cd-n.them { justify-content: flex-end; flex-direction: row-reverse; }
.cd-vs { text-align: center; font: 900 11px/1 inherit; letter-spacing: .08em; color: var(--dim); }
.cl-duel.won .cd-vs { color: var(--mint); } .cl-duel.lost .cd-vs { color: #ff8a7a; }
.cl-turf-acts { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.cl-turf-rules { text-align: center; }
.cl-picklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.cl-pick-m { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; font: inherit; color: var(--ink); text-align: left; cursor: pointer; background: rgba(255,255,255,.04); border: 1px solid var(--line2); min-width: 0; }
.cl-pick-m b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; } .cl-pick-m .small { margin-left: auto; white-space: nowrap; }
.cl-pick-m.on { border-color: var(--mint); background: rgba(61,220,151,.12); } .cl-pick-m:disabled { opacity: .45; cursor: default; }
.cl-tick { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; border: 1px solid var(--line2); color: var(--mint); font-weight: 900; }
.cl-look .cl-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.cl-opt.sw.locked { opacity: .5; position: relative; } .sw-lock { position: absolute; inset: auto 0 -2px 0; font: 800 9px/1 inherit; color: #fff; text-shadow: 0 1px 2px #000; text-align: center; }
@media (max-width: 900px), (max-height: 520px) {
  .cl-hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .cl-tile { min-height: 56px; padding: 8px 10px; } .cl-tile.big { min-height: 66px; } .cl-tile .ct-ico { width: 34px; height: 34px; } .cl-tile.big .ct-ico { width: 40px; height: 40px; }
  .cl-tile.big .ct-t b { font-size: 16px; } .ts-pts { font-size: 24px; }
}
.cl-turf-road .tag { display: flex; justify-content: space-between; gap: 10px; } .cl-turf-road { padding: 10px 14px; border-radius: 14px; background: rgba(0,0,0,.3); border: 1px solid var(--line2); }
/* short screens keep four columns (the hub fits a phone on its side without scrolling); only a narrow one goes to two (20-10) */
@media (max-height: 520px) and (min-width: 700px) { .cl-hub-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; } .cl-tile, .cl-tile.big { min-height: 52px; padding: 7px 9px; gap: 8px; } .cl-tile .ct-ico, .cl-tile.big .ct-ico { width: 30px; height: 30px; } .cl-tile .ct-t b, .cl-tile.big .ct-t b { font-size: 14px; } }
/* ------------------------------------------------------------ THE LEADERBOARDS (26-10-2026, src/ui/leaderboards.js)
   Uday 26-10: "a dedicated leaderboard CTA which pops-up full size and we can filter via many options and see rewards too".
   The chips across the top, the table on the left (only its rows scroll, your row pinned under them), the Rewards panel on
   the right. On a short screen (a phone on its side, 844x390) the chips are one line that scrolls sideways and the Rewards
   panel folds into a toggle above the table, so the table keeps the height. */
.lbx .dlg-body { overflow: hidden; gap: 8px; }
.lbx-chips { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.lbx-grp { display: flex; align-items: center; gap: 5px; flex: none; }
.lbx-gk { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); font-weight: 900; margin-right: 1px; }
.lbx-chip { min-height: 30px; padding: 0 11px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid var(--line); font: 800 12px/1 inherit; color: var(--ink2); white-space: nowrap; cursor: pointer; }
.lbx-chip:hover { border-color: var(--line2); color: var(--ink); }
.lbx-chip.on { background: rgba(255,159,28,.16); border-color: var(--amber); color: var(--amber2); }
.lbx-sub { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.lbx-seg button { min-height: 28px; display: inline-flex; align-items: center; gap: 5px; text-transform: none; font-size: 12px; }
.lbx-signin { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 6px 5px 12px; border-radius: 10px; background: rgba(61,220,151,.08); border: 1px solid rgba(61,220,151,.35); font-size: 13px; }
.lbx-main { flex: 1 1 auto !important; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 300px); grid-template-areas: 'table side'; gap: 10px; }
.lbx .card { border-radius: 12px; background: rgba(255,255,255,.035); border: 1px solid var(--line); padding: 7px 10px; min-width: 0; }
.lbx .card > .tag { display: flex; justify-content: space-between; gap: 8px; flex: none; }
.lbx .card > .tag span:last-child { text-transform: none; letter-spacing: 0; font-weight: 700; color: var(--ink2); text-align: right; }
.lbx-table { grid-area: table; display: flex; flex-direction: column; min-height: 0; padding: 4px 6px; }
.lbx-head, .lbx-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto minmax(64px, auto); gap: 10px; align-items: center; padding: 0 8px; }
.lbx-head { flex: none; min-height: 24px; color: var(--dim); font-weight: 900; text-transform: uppercase; letter-spacing: .08em; font-size: 10.5px; border-bottom: 1px solid var(--line); }
.lbx-head span:first-child { text-align: center; }
.lbx-rows { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 3px 0; }
.lbx-row { min-height: 31px; border-radius: 8px; font-size: 13.5px; }
.lbx-row:nth-child(even) { background: rgba(255,255,255,.025); }
.lbx-row.cl-link:hover { background: rgba(255,255,255,.07); }
.lbx-row.me { background: rgba(255,159,28,.14); box-shadow: inset 0 0 0 1px rgba(255,159,28,.5); }
.lbx-row.pinned { flex: none; margin: 2px 0 2px; border-top: 1px dashed var(--line2); border-radius: 0 0 8px 8px; }
.lbx-rk { text-align: center; font-weight: 900; color: var(--dim); font-variant-numeric: tabular-nums; }
.lbx-rk.gold { color: var(--gold); font-size: 15px; } .lbx-rk.silver { color: #d6dde8; font-size: 15px; } .lbx-rk.bronze { color: #e0a36b; font-size: 15px; }
.lbx-row.me .lbx-rk { color: var(--amber2); }
.lbx-who { display: flex; align-items: center; gap: 7px; min-width: 0; overflow: hidden; }
.lbx-who .lbx-n { font-weight: 700; }
.lbx-em { flex: none; width: 20px; height: 20px; }
.lbx-x { white-space: nowrap; }
.lbx-v { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lbx-state { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 22px 12px; text-align: center; color: var(--ink2); }
.lbx-side { grid-area: side; display: flex; flex-direction: column; gap: 7px; min-height: 0; }
.lbx-you { flex: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; padding: 6px 9px; border-radius: 9px; background: rgba(255,159,28,.12); border: 1px solid rgba(255,159,28,.4); font-weight: 800; font-size: 13px; }
.lbx-you.dim { background: rgba(255,255,255,.04); border-color: var(--line); color: var(--ink2); font-weight: 700; }
.lbx-pay { flex: 0 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; }
.lbx-prow { display: grid; grid-template-columns: 68px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 4px 7px; border-radius: 8px; font-size: 12.5px; }
.lbx-prow .lbx-pl { font-variant-numeric: tabular-nums; white-space: nowrap; }
.lbx-prow .lbx-pn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink2); }
.lbx-prow.on { background: rgba(255,159,28,.14); box-shadow: inset 0 0 0 1px rgba(255,159,28,.5); }
.lbx-prow.on .lbx-pn { color: var(--amber2); }
.lbx-bits { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.lbx-parts { font-weight: 800; color: var(--violet2); white-space: nowrap; }
.lbx-note { flex: none; line-height: 1.3; }
.lbx-brag { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 14px 6px; }
.lbx-brag b { color: var(--amber2); font-size: 15px; }
.lbx-paytog { display: none; }
.lbx-paytog i { font-style: normal; color: var(--dim); }
.lbx-paytog.on { border-color: var(--amber); color: var(--amber2); }
@media (max-height: 520px), (max-width: 700px) {
  .lbx .dlg-body { padding: 6px 10px; gap: 6px; }
  .lbx .dlg-head { min-height: 42px; }
  .lbx .dlg-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .lbx-chips, .lbx-sub { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; padding-bottom: 3px; }
  .lbx-chip { min-height: 28px; padding: 0 10px; }
  .lbx-seg { flex-wrap: nowrap; flex: none; }
  .lbx-signin { padding: 3px 4px 3px 10px; font-size: 12px; }
  .lbx-main { display: flex; flex-direction: column; gap: 6px; }
  .lbx-paytog { display: inline-flex; align-self: flex-start; flex: none; min-height: 28px; }
  .lbx-side { display: none; }
  .lbx-main.pay-open .lbx-side { display: flex; flex: 0 1 auto; max-height: 55%; }
  .lbx-main.pay-open .lbx-pay { overflow-y: auto; }
  .lbx-table { flex: 1 1 auto; min-height: 96px; }
  .lbx-row { min-height: 28px; font-size: 13px; }
}


/* ===================================================================== THE SEASON BAR (26-10-2026, src/ui/seasonbar.js)
   Uday: "The slider showing progress as platinum, legend etc, is slightly broken - fix it cleanly". Every step's mark at its real
   points on 0..1,000, the fill clamped, today's runs a lighter stretch. Labels: by turn above (.up) and below (.dn) the rail, the
   ends anchored inward (.l, .r); a narrow bar (.compact, or a phone-wide page) keeps only the step you hold above the rail and the
   next one below it, so the two can never meet. */
.sbar { min-width: 0; }
.sbar-track { position: relative; height: 40px; margin: 0 10px; }
.sbar-rail { position: absolute; left: 0; right: 0; top: 15px; height: 9px; border-radius: 6px; background: rgba(255,255,255,.08); overflow: hidden; }
.sbar-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; background: linear-gradient(90deg, var(--amber), var(--mint)); }
.sbar-pend { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, rgba(255,207,58,.55) 0 4px, rgba(255,207,58,.22) 4px 8px); border-radius: 0 6px 6px 0; }
.sbar-m { position: absolute; top: 0; bottom: 0; width: 0; }
.sbar-m i { position: absolute; left: -1.5px; top: 12px; width: 3px; height: 15px; border-radius: 2px; background: rgba(255,255,255,.28); }
.sbar-m b { position: absolute; transform: translateX(-50%); font-size: 10.5px; font-weight: 900; line-height: 12px; white-space: nowrap; color: var(--dim); font-variant-numeric: tabular-nums; }
.sbar-m.up b { top: 0; } .sbar-m.dn b { top: 28px; }
.sbar-m.l b { transform: translateX(-3px); } .sbar-m.r b { transform: translateX(calc(-100% + 3px)); }
.sbar-m.got i { background: var(--mint); } .sbar-m.got b { color: var(--ink2); }
.sbar-m.next i { background: var(--amber); box-shadow: 0 0 8px rgba(255,159,28,.7); } .sbar-m.next b { color: var(--amber2); }
.sbar-m.t5.got i, .sbar-m.t5.next i { background: #a78bfa; box-shadow: 0 0 8px rgba(167,139,250,.8); }
.sbar-m.t6.got i, .sbar-m.t6.next i { background: #f59e0b; box-shadow: 0 0 8px rgba(245,158,11,.85); }
.sbar.compact .sbar-track { height: 34px; margin: 0 4px; }
.sbar.compact .sbar-rail { top: 13px; height: 7px; } .sbar.compact .sbar-m i { top: 11px; height: 11px; }
.sbar.compact .sbar-m b { display: none; font-size: 10px; }
.sbar.compact .sbar-m.prev b, .sbar.compact .sbar-m.next b { display: block; }
.sbar.compact .sbar-m.prev b { top: 0; } .sbar.compact .sbar-m.next b { top: 23px; }
@media (max-width: 640px) {
  .sbar .sbar-m b { display: none; } .sbar .sbar-m.prev b, .sbar .sbar-m.next b { display: block; }
  .sbar .sbar-m.prev b { top: 0; } .sbar .sbar-m.next b { top: 28px; }
}
/* the street's season box: the words and the compact bar under its head */
.sm-bar { display: flex; flex-direction: column; gap: 1px; margin: 0 2px 4px; }
.sm-words { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; line-height: 1.25; } .sm-words b { color: var(--ink); font-size: 12px; } .sm-words i { font-style: normal; color: var(--amber2); font-size: 11px; }
@media (max-height: 430px) { .sm-bar .sbar { display: none; } }
.side-stack.fit-2 .sm-bar .sbar { display: none; }

/* the two steps above Legend, as tier chips */
.ss-tier.t5 { background: linear-gradient(90deg, #3b0764, #5b21b6, #0c4a6e); color: #e0f2fe; box-shadow: 0 0 8px rgba(139,92,246,.45); }
.ss-tier.t6 { background: linear-gradient(90deg, #7f1d1d, #c2410c, #b45309); color: #fde68a; box-shadow: 0 0 9px rgba(245,158,11,.55); }
.ss-tier.none { background: rgba(255,255,255,.07); color: var(--dim); }

/* ===================================================================== LIMITED SKINS AND TITLES (26-10-2026)
   Uday: "Each of them look cool and the order of coolness should be there to make rarer ones look crazy good which appears on
   leaderboards, chat etc." Cheap on purpose: CSS only, a background moving under clipped text, no layout work; every one of them
   stands still under prefers-reduced-motion. Order: Crown/Inferno < Master < Grandmaster (skins); Master < Grandmaster <
   Prince/Princess < King/Queen (titles). */
.dname.ns-master .dn-t.grad { background-size: 300% 100%; animation: nsFlow 5s linear infinite; filter: drop-shadow(0 0 2px rgba(139,92,246,.9)) drop-shadow(0 0 7px rgba(125,211,252,.45)); }
.dname.ns-master .ns-badge { color: #c4b5fd; text-shadow: 0 0 6px rgba(167,139,250,.95), 0 0 12px rgba(125,211,252,.5); animation: nsPulse 2.4s ease-in-out infinite; }
.dname.ns-grandmaster .dn-t.grad { background-image: linear-gradient(100deg, transparent 0 40%, rgba(255,250,230,.95) 50%, transparent 60% 100%), linear-gradient(90deg, #7f1d1d, #dc2626, #f97316, #fde68a, #f59e0b, #dc2626, #7f1d1d) !important;
  background-size: 260% 100%, 300% 100%; animation: gmFlow 3.2s linear infinite; filter: drop-shadow(0 0 2px rgba(220,38,38,.85)) drop-shadow(0 0 8px rgba(245,158,11,.55)); }
.dname .ns-crest { display: inline-grid; place-items: center; width: 1.1em; height: 1.22em; font-size: .78em; color: #3b0606 !important; align-self: center;
  clip-path: polygon(50% 0, 100% 14%, 100% 58%, 50% 100%, 0 58%, 0 14%); background: linear-gradient(160deg, #fff7d6, #f59e0b 45%, #b91c1c); filter: drop-shadow(0 0 4px rgba(245,158,11,.8)); }
@keyframes nsFlow { to { background-position: -300% 0; } }
@keyframes gmFlow { from { background-position: 160% 0, 0 0; } to { background-position: -60% 0, -300% 0; } }
@keyframes nsPulse { 50% { opacity: .7; transform: scale(.92); } }
.ns-card.t-mythic { border-color: rgba(167,139,250,.65); background: linear-gradient(160deg, rgba(91,33,182,.16), rgba(255,255,255,.03)); }
.ns-card.t-ultimate { border-color: rgba(245,158,11,.7); background: linear-gradient(160deg, rgba(185,28,28,.18), rgba(245,158,11,.06)); }
.ns-card.locked { opacity: .82; } .ns-card.locked .ns-prev { filter: saturate(.55) brightness(.85); }
.ttl { flex: none; align-self: center; display: inline-flex; align-items: center; gap: 3px; margin-left: 3px; padding: 0 6px; height: 1.5em; border-radius: 999px; font-size: .7em; font-weight: 900;
  letter-spacing: .05em; text-transform: uppercase; line-height: 1; white-space: nowrap; -webkit-text-fill-color: currentColor; }
.ttl b { font-size: 1.1em; } .ttl i { font-style: normal; }
.ttl.tr1 { background: rgba(91,33,182,.32); color: #ddd6fe; box-shadow: inset 0 0 0 1px rgba(167,139,250,.6); }
.ttl.tr2 { background: linear-gradient(90deg, #7f1d1d, #b45309); color: #fde68a; box-shadow: inset 0 0 0 1px #f59e0b, 0 0 6px rgba(245,158,11,.35); }
.ttl.tr3 { background: linear-gradient(100deg, #cbd5e1, #fbcfe8 40%, #ffffff 50%, #fbcfe8 60%, #cbd5e1); background-size: 250% 100%; color: #4a0d33; box-shadow: 0 0 7px rgba(249,168,212,.5); animation: ttlShine 4.5s linear infinite; }
.ttl.tr4 { background: linear-gradient(100deg, #92400e, #fbbf24 30%, #fffbe6 46%, #fbbf24 62%, #92400e); background-size: 260% 100%; color: #3a2000; box-shadow: inset 0 0 0 1px #fde68a, 0 0 8px rgba(251,191,36,.65), 0 0 18px rgba(251,191,36,.25); animation: ttlShine 2.6s linear infinite; }
.ttl.tr4 b { color: #7c2d12; text-shadow: 0 0 4px rgba(255,251,230,.9); }
@keyframes ttlShine { from { background-position: 130% 0; } to { background-position: -130% 0; } }
/* where a row is narrow the title keeps its glyph and drops the word */
.sm-row .ttl i, .side-stack .ttl i, .cb-row .ttl i { display: none; } .sm-row .ttl, .side-stack .ttl { padding: 0 4px; }
@media (max-width: 900px) { .lb-row .ttl i, .cl-msg .ttl i, .lbx-row .ttl i { display: none; } .lb-row .ttl, .lbx-row .ttl { padding: 0 4px; } }
@media (prefers-reduced-motion: reduce) { .dname .dn-t.grad, .dname .ns-badge, .ttl, .sbar-m i { animation: none !important; } }
/* a name that opens a profile */
.dname.pl-link { cursor: pointer; } .dname.pl-link:hover .dn-t { text-decoration: underline; text-underline-offset: 2px; }
.cl-msg .cl-who { color: var(--amber2); font-weight: 800; max-width: 200px; } .cl-msg.me .cl-who { color: var(--mint); }
.cl-name .cl-mn { font-weight: 800; max-width: 100%; }

/* ===================================================================== PROFILES (26-10-2026, src/ui/profile.js) */
.pf-card .dlg-body { display: flex; flex-direction: column; gap: 10px; }
.pf-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: center; padding: 10px 12px; border-radius: 12px; background: linear-gradient(160deg, rgba(255,159,28,.10), rgba(255,255,255,.02)); border: 1px solid var(--line2); }
.pf-id { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pf-name { font-size: 22px; font-weight: 900; max-width: 100%; }
.pf-bar { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pf-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pf-stat { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px !important; border-radius: 12px; background: rgba(255,255,255,.035); border: 1px solid var(--line); min-width: 0; }
.pf-stat .k { font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); }
.pf-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; } .pf-row .ss-tier { min-width: 0; padding: 2px 7px; font-size: 10.5px; }
.pf-club { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pf-cash { color: var(--mint); font-size: 16px; } .pf-pend { color: var(--amber2); }
.pf-pick { display: flex; flex-direction: column; gap: 8px; min-height: 0; } .pf-seg { align-self: flex-start; }
.pf-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.pf-tnote { margin-bottom: 6px; } .pf-tprev { max-width: 100%; min-width: 0; display: flex; }
.pf-lock { display: inline-flex; align-items: center; gap: 4px; } .pf-lock .ico { width: 13px; height: 13px; }
.pf-held { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 15px; } .pf-held .k { color: var(--dim); font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.pf-skinchip { font-size: 11px; }
@media (max-width: 900px), (max-height: 520px) { .pf-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pf-name { font-size: 18px; } .pf-head { padding: 8px 10px; } }
@media (max-width: 560px) { .pf-head { grid-template-columns: minmax(0, 1fr); } }
/* a shared profile in the chat */
.pf-line { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-width: 0; padding: 5px 10px; border-radius: 10px; border: 1px solid var(--line2); background: linear-gradient(160deg, rgba(255,159,28,.10), rgba(255,255,255,.03)); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.pf-line:hover { border-color: var(--amber); } .pf-line .ico { width: 16px; height: 16px; flex: none; color: var(--amber2); }
.pf-line .pf-line-n { max-width: 170px; font-weight: 800; } .pf-line .small { white-space: nowrap; } .pf-line i { font-style: normal; color: var(--amber2); font-weight: 900; white-space: nowrap; }
.cl-msg .cl-pfwrap { grid-column: 1 / 3; min-width: 0; }
@media (max-width: 760px) { .pf-line .small { display: none; } }

/* Drive's three ways in (26-10): Endless, Race, Story side by side; stacked on a narrow screen */
.drive-pick .drive-opts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 560px) { .drive-pick .drive-opts { grid-template-columns: 1fr; } .drive-pick .drive-opt { min-height: 84px; flex-direction: row; justify-content: flex-start; text-align: left; } }
@media (max-height: 430px) { .drive-pick .drive-opt { min-height: 120px; padding: 10px 8px; } .drive-pick .drive-opt b { font-size: 18px; } }
/* the deck's cards never cut their words (26-10: "Events and clubs CTA in home screen is cut short"): the line wraps to two */
.deck-pair .deck-card { min-height: 58px; align-items: center; }
.deck-card .dk-t { min-width: 0; flex: 1 1 auto; }
.deck-card .dk-t b { white-space: nowrap; overflow: visible; }
.deck-card .dk-l { white-space: normal; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.2; }

/* v0.9.9 clubs: tab bar always shown, home actions, applicant cards */
.clubs .cl-tabs { flex-wrap: wrap; row-gap: 4px; }
.clubs .cl-tab { padding: 6px 11px; font-size: 13px; }
.cl-hub-ask { display: flex; align-items: center; gap: 10px; width: 100%; margin: 0 0 8px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(52,211,153,.55); background: rgba(52,211,153,.12); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.cl-hub-ask b { color: var(--mint); } .cl-hub-ask .small { color: var(--ink2); flex: 1; } .cl-hub-ask .chev { font-size: 22px; color: var(--mint); }
.cl-hub-acts { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.cl-hub-acts .cl-leave-btn { color: #ff9b8a; border-color: rgba(255,120,100,.45); }
.cl-reqs { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.cl-req.card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 9px 11px; border-radius: 12px; border: 1px solid rgba(52,211,153,.35); }
.cl-req-who { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.cl-req-facts { grid-column: 1 / 2; display: flex; flex-wrap: wrap; gap: 4px 6px; color: var(--ink2); }
.cl-req-facts span { padding: 1px 7px; border-radius: 8px; background: rgba(255,255,255,.06); }
.cl-req-acts { grid-column: 2; grid-row: 1 / 3; display: flex; gap: 6px; align-items: center; }
@media (max-width: 820px) { .cl-req.card { grid-template-columns: 1fr; } .cl-req-acts { grid-column: 1; grid-row: auto; justify-content: flex-end; } }

/* v0.9.9 scoring help and yesterday's winners */
.ev-tog.ev-help, .cl-tab.cl-help { min-width: 34px; justify-content: center; font-weight: 900; border: 1px solid rgba(255,209,102,.6); color: #ffd166; border-radius: 50%; padding: 4px 0; }
.ev-tog.ev-final { color: #ffd166; }
.hl-help .dlg-body, .hl-final .dlg-body { display: flex; flex-direction: column; gap: 10px; }
.hl-help-sec { padding: 10px 12px; } .hl-help-sec > b { display: block; margin-bottom: 4px; color: #ffd166; } .hl-help-sec p { margin: 6px 0 0; line-height: 1.4; }
.hl-help-tab { display: grid; gap: 2px; margin-top: 6px; }
.hl-help-row { display: grid; grid-template-columns: 1.2fr 2fr 1fr 1fr; gap: 8px; padding: 3px 8px; border-radius: 6px; background: rgba(255,255,255,.04); }
.hl-help-row.head { background: none; color: var(--ink2); font-weight: 800; text-transform: uppercase; font-size: 10px; letter-spacing: .08em; }
.hl-fin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.hl-fin-ev { padding: 9px 11px; } .hl-fin-ev > b { display: block; margin-bottom: 6px; }
.hl-fin-splits { display: flex; flex-direction: column; gap: 6px; } .hl-fin-sp .tag { display: block; margin-bottom: 2px; }
.hl-fin-r { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 6px; align-items: baseline; font-size: 13px; }
.hl-fin-r i { font-style: normal; font-weight: 900; text-align: center; } .hl-fin-r.gold i { color: #ffcf3a; } .hl-fin-r.silver i { color: #c9d2dc; } .hl-fin-r.bronze i { color: #c27a45; }

@media (max-width: 1100px) { .ev-final .evf-l { display: none; } .ev-final { text-transform: capitalize; } }

/* v0.9.10 gifts strip on the garage home */
.gstrip { display: flex; gap: 8px; flex-wrap: wrap; }
.gstrip-chip { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1 1 200px; padding: 7px 10px; border-radius: 12px; border: 1px solid rgba(255,209,102,.35); background: rgba(12,14,20,.78); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.gstrip-chip.ready { border-color: rgba(52,211,153,.75); box-shadow: 0 0 0 1px rgba(52,211,153,.35), 0 0 18px rgba(52,211,153,.25); animation: gsPulse 2.2s ease-in-out infinite; }
.gstrip-chip .gs-t { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.gstrip-chip .gs-t b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gstrip-chip .gs-t i { font-style: normal; font-size: 11px; color: var(--ink2); }
.gstrip-chip .gs-bar { display: block; height: 4px; margin: 3px 0 1px; border-radius: 2px; background: rgba(255,255,255,.12); overflow: hidden; }
.gstrip-chip .gs-bar u { display: block; height: 100%; background: linear-gradient(90deg, #ff9f1c, #ffd166); text-decoration: none; }
@keyframes gsPulse { 50% { box-shadow: 0 0 0 1px rgba(52,211,153,.5), 0 0 26px rgba(52,211,153,.4); } }
@media (prefers-reduced-motion: reduce) { .gstrip-chip.ready { animation: none; } }
.gift-day.hl-milestone { border-color: rgba(255,209,102,.7); background: rgba(255,209,102,.1); }

/* v0.9.11: compact Events header by the UI stage's width (the stage is scaled, so a 1366 px window is an 854 px stage) */
.st-narrow .ev-tog { padding-left: 10px; padding-right: 10px; }
.st-narrow .ev-final .evf-l { display: none; }
.st-narrow .ev-final { text-transform: capitalize; }
.st-narrow .events-panel .ev-toggle .ev-tog:not(.ev-help) .ico { display: none; }
.events-panel .dlg-aside .ev-toggle { min-width: 0; }
.st-narrow .events-panel .dlg-aside .gift-chip { font-size: 0; gap: 0; padding-left: 9px; padding-right: 9px; }
.events-panel .dlg-title { flex: 1 1 0; min-width: 120px; }
.events-panel .dlg-title .dlg-sub { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.events-panel .dlg-aside { flex: none; }
/* pick-a-car buttons: three equal columns, every line cut to its column */
.ev-picks > .ev-pick { flex: 1 1 0; overflow: hidden; }
.ev-pick b, .ev-pick .small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.ev-pick .ev-tune { font-size: 10px; }
/* "Click to drive" never shows through a menu */
body:has(.screen.modal.active) .focus-ask { display: none !important; }

/* v0.9.11: two pictures under the Updates headline */
.upd-hl-imgs { display: flex; gap: 8px; margin-top: 9px; }
.upd-hl-imgs img { flex: 1 1 0; min-width: 0; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .12); display: block; }

/* v0.9.11: live multiplayer */
.mp-chip.live { cursor: pointer; border-style: solid; border-color: rgba(94,234,212,.5); color: #b9f5ea; }
.mp-chip.live.open { background: rgba(20,184,166,.22); border-color: #2dd4bf; color: #fff; box-shadow: 0 0 0 0 rgba(45,212,191,.5); animation: mpPulse 2s ease-out infinite; }
@keyframes mpPulse { 0% { box-shadow: 0 0 0 0 rgba(45,212,191,.45); } 100% { box-shadow: 0 0 0 10px rgba(45,212,191,0); } }
.mp-panel .mp-body { display: flex; flex-direction: column; gap: 10px; }
.mp-slot { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.mp-slot.open { border-color: rgba(45,212,191,.45); background: rgba(20,184,166,.1); }
.mp-slot b { font-size: 15px; }
.mp-pick { display: flex; gap: 10px; flex-wrap: wrap; }
.mp-cols { display: flex; gap: 10px; } .mp-cols > .mp-box { flex: 1 1 0; min-width: 0; }
.mp-box { padding: 9px 11px; border-radius: 11px; background: rgba(255,255,255,.03); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.mp-row { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; } .mp-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-grid { display: flex; flex-direction: column; gap: 4px; }
.mp-gr { display: grid; grid-template-columns: 26px 1fr auto auto; gap: 10px; align-items: center; padding: 6px 10px; border-radius: 9px; background: rgba(255,255,255,.035); }
.mp-gr.me { background: rgba(250,204,21,.12); outline: 1px solid rgba(250,204,21,.45); }
.mp-gr.left { opacity: .45; } .mp-gr .pos { font-weight: 900; color: var(--amber, #f5b942); } .mp-gr b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-d { font-weight: 800; font-size: 12px; min-width: 64px; text-align: right; }
.mp-note { line-height: 1.35; }
.mp-pill { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 40; pointer-events: auto; padding: 7px 14px; border-radius: 999px; font: inherit; font-weight: 800; font-size: 13px; color: #fff; background: rgba(13,148,136,.92); border: 1px solid #5eead4; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.4); }

/* v0.9.11: league table on the League tab */
.lg-table { display: flex; flex-direction: column; gap: 3px; padding: 6px 4px 2px; border-top: 1px solid var(--line); min-width: 0; }
.lg-chips { display: flex; gap: 4px; margin-bottom: 2px; }
.lg-chip { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; padding: 4px 6px; border-radius: 999px; border: 1px solid var(--line2); background: rgba(255,255,255,.04); color: var(--ink2); font: inherit; font-size: 11.5px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.lg-chip:hover { border-color: rgba(255,159,28,.55); color: var(--ink); }
.lg-chip.on { background: rgba(255,159,28,.18); border-color: rgba(255,159,28,.7); color: var(--amber2); }
.lg-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 21px; padding: 0 8px; border-radius: 7px; font-size: 12.5px; background: rgba(255,255,255,.03); min-width: 0; }
.lg-row.me { background: rgba(255,159,28,.14); box-shadow: inset 0 0 0 1px rgba(255,159,28,.55); }
.lg-row .lb-p { font-weight: 900; color: var(--dim); text-align: right; }
.lg-row .lb-p.gold { color: var(--gold); } .lg-row .lb-p.silver { color: #cfd6df; } .lg-row .lb-p.bronze { color: #d99a62; }
.lg-row .lb-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.lg-row .lb-v { font-variant-numeric: tabular-nums; }
.lg-empty { padding: 6px 4px; }
.lg-all { flex: 0 0 auto; width: 28px; height: 26px; padding: 0; display: inline-grid; place-items: center; border-radius: 999px; border: 1px solid var(--line2); background: rgba(255,255,255,.04); color: var(--ink2); cursor: pointer; }
.lg-all:hover { border-color: rgba(255,159,28,.6); color: var(--amber2); }
.lg-hero:has(.lg-table) .ev-hero { min-height: 104px; }
@media (max-height: 520px), (max-width: 900px) { .lg-hero .lg-table { flex: 1 1 52%; border-top: 0; border-left: 1px solid var(--line); padding: 0 0 0 8px; } }
