/* Kart Prodigy finishing layer (loaded last). Broadcast-style motorsport graphics: carbon panels with a
   1 px line, condensed uppercase headings, Inter for reading, JetBrains Mono for times. One accent (kart orange); every
   other colour carries meaning (timing: green = personal best, purple = session best; flags; classes). 8 px grid. */

html, body { font-weight: 450; letter-spacing: .003em; }
.disp { font-family: var(--disp); font-weight: 800; letter-spacing: .02em; line-height: .95; }
h5 { font-family: var(--disp); font-weight: 700; letter-spacing: .12em; color: var(--muted); font-size: max(.8rem, 12px); }
.dim { color: var(--muted); }
.type, .eyebrow { font-family: var(--disp); font-weight: 700; letter-spacing: .14em; color: var(--y); }
.mono { font-family: var(--mono); }

/* panels */
.glass, .mbox { background: rgba(15, 23, 48, .94); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 .6rem 1.8rem rgba(0, 0, 0, .38); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.hud2 .glass { background: rgba(7, 11, 26, .82); border-width: 1px; border-radius: 8px; box-shadow: 0 .3rem 1rem rgba(0, 0, 0, .35); }

/* buttons: orange primary, carbon secondary; uppercase condensed */
.btn { font-family: var(--disp); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: linear-gradient(180deg, #22d3ee, var(--y)); color: #fff; border: 1px solid #5fe3ff; border-radius: 8px; box-shadow: 0 .3rem 1rem rgba(30, 155, 255, .28); padding: .62rem 1.3rem; }
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); box-shadow: 0 .1rem .4rem rgba(30, 155, 255, .3); background: var(--y2); }
.btn.alt, .btn.ghost { background: var(--card2); color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn.alt:hover, .btn.ghost:hover { border-color: #33447a; background: #1b2850; }
.btn svg { fill: currentColor; }
button:focus-visible { outline: 2px solid var(--y); outline-offset: 2px; }

/* segmented controls and filter chips: one row, equal heights, the active one orange */
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--carbon); border: 1px solid var(--line); border-radius: 8px; padding: 3px; }
.seg button { background: transparent; color: var(--muted); border: 0; border-radius: 6px; padding: .34rem .8rem; font-family: var(--disp); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; font-size: max(.9rem, 12px); box-shadow: none; }
.seg button:hover { color: var(--ink); background: var(--card2); }
.seg button.on { background: var(--y); color: #fff; }
.seg button[disabled], .seg button.lockd { opacity: .38; cursor: not-allowed; }

/* bars */
.bar { background: var(--carbon); border: 1px solid var(--line); border-radius: 4px; }
.bar > i { background: var(--y); border-radius: 3px; }
.kerb { border: 0; border-radius: 2px; background: repeating-linear-gradient(90deg, var(--kerb) 0 1.6rem, #f3f3f3 1.6rem 3.2rem); height: .45rem; }

/* top bar: driver card, class chip, settings */
.topbar .me, .topbar .chip, .topbar .btn.icon, .topbar .back { background: rgba(15, 23, 48, .9); border: 1px solid var(--line); box-shadow: 0 .3rem 1rem rgba(0, 0, 0, .3); color: var(--ink); }
.av { border: 2px solid var(--y); color: #fff; }
.me-t i { color: var(--muted); }
.kl-lg { border: 1px solid var(--line); border-radius: 4px; font-family: var(--disp); font-weight: 700; }

/* tables: standings, qualifying, results (row lines, the player in orange, numbers in mono) */
.k2-stand .r, .k2-rows > *, .qlist .qr, .res-l .r, .kl-st .r { border-bottom: 1px solid rgba(42, 52, 65, .7); }
.k2-stand .r.me, .k2-rows .me, .qlist .qr.me, .res-l .me, .tw2.me { background: linear-gradient(90deg, rgba(30, 155, 255, .95), rgba(30, 155, 255, .75)); color: #fff; border-radius: 4px; }
.tw2.me .g { color: #fff; }
.riv { color: #ff8a65; font-style: normal; font-family: var(--disp); font-weight: 700; letter-spacing: .06em; font-size: .8em; }

/* tiles on the hub */
.k2-tile { background: rgba(15, 23, 48, .94); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); box-shadow: 0 .4rem 1.2rem rgba(0, 0, 0, .3); }
.k2-tile:hover { border-color: var(--y); }
.k2-tile b { font-family: var(--disp); font-weight: 700; letter-spacing: .08em; }
.k2-tile.soon { opacity: .55; }
.k2-tile.soon em { background: var(--card2); color: var(--muted); border: 1px solid var(--line); border-radius: 4px; }
.k2-tile svg { fill: var(--y); }

/* modal */
#modal { background: rgba(5, 8, 12, .62); }
.mbox h2, .mbox .disp { color: var(--ink); }

/* HUD */
.myc { background: rgba(8, 11, 15, .92); border: 1px solid #1c2850; }
.h2-rc { background: rgba(7, 11, 26, .86); }
.h2-rc[data-f="yellow"], .h2-rc[data-f="double"] { background: var(--flagy); color: #111; }
.h2-rc[data-f="blue"] { background: #2f7bff; color: #fff; }
.h2-rc[data-f="bw"] { background: #f2f2f2; color: #111; }
.h2-rc[data-f="nose"] { background: #ff8a1f; color: #111; }
.h2-pen { background: rgba(60, 12, 10, .9); border-color: var(--kerb); }
#coach .pill, .kl-prompt, .kl-notice { background: rgba(7, 11, 26, .9); color: var(--ink); border: 1px solid var(--line); border-left: 3px solid var(--y); border-radius: 8px; box-shadow: 0 .4rem 1.2rem rgba(0, 0, 0, .4); font-family: var(--body); font-weight: 600; }
.key, .kl-prompt .key { background: var(--card2); color: var(--ink); border: 1px solid #33447a; border-radius: 4px; font-family: var(--mono); font-weight: 700; padding: 0 .4rem; }
.h-msg .m { background: rgba(7, 11, 26, .88); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; font-family: var(--disp); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.h-msg .m.good { border-left: 3px solid var(--good); } .h-msg .m.warn { border-left: 3px solid var(--flagy); } .h-msg .m.bad { border-left: 3px solid var(--kerb); }

/* loading screen: the v3 lockup on a real in-game shot, a thin orange progress line, a tip that teaches */
/* loading screens (boot + the race's load card): the full track picture edge to edge, no dark band at the top;
   only a soft shade behind the logo keeps the words readable */
#boot, #loadcard { background: radial-gradient(42% 46% at 50% 52%, rgba(7, 11, 26, .58), rgba(7, 11, 26, .22) 62%, rgba(7, 11, 26, 0) 100%), url(assets/ui/boot-v3.jpg) center / cover, #3d6fb0; }
.boot-word { font-family: var(--disp); font-weight: 800; font-size: 6.2rem; letter-spacing: .01em; color: #fff; -webkit-text-stroke: 0; text-shadow: 0 .3rem 1.6rem rgba(0, 0, 0, .55); transform: skewX(-8deg); line-height: .84; }
.boot-word span { color: #fff; display: block; position: relative; }
.boot-word span::after { content: ""; display: block; height: .1em; margin-top: .06em; background: repeating-linear-gradient(90deg, var(--spark) 0 .5em, #f3f3f3 .5em 1em); }
.boot-inner .kerb { display: none; }
.boot-bar { height: 4px; background: rgba(255, 255, 255, .14); border: 0; border-radius: 2px; box-shadow: none; }
.boot-bar i { background: var(--y); border-radius: 2px; }
.boot-bar::after { display: none; }
.boot-tag { font-family: var(--body); font-weight: 500; color: #d4dae1; text-shadow: 0 1px 3px #000; text-align: center; max-width: 30rem; }

/* the hub logo */
.kl-logo, .logo { font-family: var(--disp); font-weight: 800; color: #fff; -webkit-text-stroke: 0; text-shadow: 0 .3rem 1.4rem rgba(0, 0, 0, .5); transform: skewX(-8deg); }
.logo .y, .kl-logo .y { color: #fff; }

/* custom scrollbar */
* { scrollbar-width: thin; scrollbar-color: #33447a transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-thumb { background: #33447a; border-radius: 4px; } ::-webkit-scrollbar-track { background: transparent; }

/* segmented controls hug their options instead of stretching into bars */
.seg { width: max-content; max-width: 100%; }
/* career ladder: one chip per championship; done = green line, current = orange, ahead = dim */
.lv span { background: var(--card2); color: var(--muted); border: 1px solid var(--line); border-radius: 6px; opacity: 1; font-family: var(--disp); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.lv span.d { background: rgba(34, 208, 122, .14); color: var(--good); border-color: rgba(34, 208, 122, .5); }
.lv span.c { background: var(--y); color: #fff; border-color: var(--y); }

/* Quick race v3: two columns, aligned table, preview on the right */
.k3-q { width: min(64rem, 100%); }
.k3-cols { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(16rem, 1fr); gap: 1.4rem; min-height: 0; }
.k3-left, .k3-right { min-width: 0; display: flex; flex-direction: column; }
.k3-filt { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.k3-thead, .k3-tr { display: grid; grid-template-columns: minmax(0, 1fr) 6rem 5.2rem; align-items: center; gap: .6rem; padding: .42rem .7rem; }
.k3-thead { margin-top: .7rem; font-family: var(--disp); font-weight: 700; font-size: max(.75rem, 12px); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.k3-thead span:last-child, .k3-tr em { text-align: right; }
.k3-tracks { overflow: auto; max-height: 15.5rem; display: grid; }
.k3-tr { text-align: left; border-bottom: 1px solid rgba(42, 52, 65, .6); border-radius: 0; color: var(--ink); }
.k3-tr b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k3-tr span { color: var(--muted); font-size: max(.85rem, 12px); }
.k3-tr em { font-style: normal; color: var(--muted); font-size: max(.85rem, 12px); }
.k3-tr:hover { background: var(--card2); }
.k3-tr.on { background: rgba(30, 155, 255, .16); box-shadow: inset 3px 0 0 var(--y); }
.k3-tr.on b { color: #fff; }
.k3-right { background: var(--carbon); border: 1px solid var(--line); border-radius: 8px; padding: .8rem 1rem 1rem; }
.k3-map { display: grid; place-items: center; height: 8.5rem; }
.k3-map svg { max-height: 100%; max-width: 100%; }
.k3-tn { font-size: 1.5rem; margin-top: .4rem; }
.k3-facts { display: grid; gap: .2rem; margin: .4rem 0 .2rem; font-size: max(.9rem, 12px); }
.k3-facts em { font-style: normal; color: var(--muted); font-family: var(--disp); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-right: .5rem; font-size: .85em; }
.k3-right .k2-qgo { margin-top: auto; padding-top: .9rem; display: flex; justify-content: flex-end; }
@media (max-height: 560px) { .k3-tracks { max-height: 9rem; } .k3-map { height: 5.5rem; } }
/* track outlines: dark casing, white ribbon, orange start */
.k2-map path:first-child { stroke: #0b0f14; }

/* hub: championship calendar and the standings header */
.k3-cal { margin-top: .9rem; border-top: 1px solid var(--line); display: grid; min-height: 0; overflow: auto; }
.k3-ch, .k3-cr { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr) 7.5rem 6.5rem; gap: .6rem; align-items: center; padding: .3rem .5rem; }
.k3-ch, .k3-sh { font-family: var(--disp); font-weight: 700; font-size: max(.75rem, 12px); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.k3-cr { border-bottom: 1px solid rgba(42, 52, 65, .55); font-size: max(.9rem, 12px); }
.k3-cr span:nth-child(3) { color: var(--muted); }
.k3-cr b { text-align: right; font-weight: 600; } .k3-ch span:last-child { text-align: right; }
.k3-cr.done { color: var(--muted); } .k3-cr.done b { color: var(--good); }
.k3-cr.now { background: rgba(30, 155, 255, .14); box-shadow: inset 3px 0 0 var(--y); border-radius: 0; }
.k3-cr.now b { color: var(--y); }
.k3-sh { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr) auto; gap: .6rem; padding: .25rem .5rem; border-bottom: 1px solid var(--line); }
.k2-facts em { color: var(--muted); font-family: var(--disp); font-weight: 700; letter-spacing: .08em; }
.k2-next { display: flex; flex-direction: column; min-height: 0; }
.k2-stand { display: flex; flex-direction: column; } .k2-stand .k2-rows { flex: 0 0 auto; } .k2-stand > .dim { margin-top: auto; }

/* MyChron damage diagram */
.myc-dmg { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr); gap: .5rem; align-items: center; border-top: 1px solid #1c2850; padding-top: .35rem; margin-top: .1rem; }
.myc-dmg svg { width: 2.2rem; height: 3.1rem; }
.myc-dmg svg [data-p] { fill: #33447a; transition: fill .3s; }
.myc-dmg svg .core { fill: #162143; }
.myc-dmg span { font-size: 14px; line-height: 1.2; color: #d4dae1; }

/* audit fixes: nothing under 12 px (HUD text >= 15.5 px before the HUD zoom), Play always in view on short screens */
.riv { font-size: max(.8em, 12px); }
.myc-dmg span { font-size: 15.5px; }
.k3-facts em, .k3-tr span, .k3-tr em { font-size: max(.8rem, 12px); }
@media (max-height: 620px) {
  .k3-map, .k3-tn { display: none; }
  .k3-right { padding: .5rem .8rem .7rem; }
  .k3-right h5, .k3-left h5 { margin: .35rem 0 .2rem; }
  .k3-tracks { max-height: 7.2rem; }
  .k3-thead { margin-top: .35rem; }
  .k3-q .k2-h .dim { display: none; }
}
@media (max-height: 420px) { .k3-tracks { max-height: 5.4rem; } .k3-facts { display: none; } }
@media (max-height: 460px) {
  .myc-dmg { grid-template-columns: 1.5rem minmax(0, 1fr); gap: .35rem; padding-top: .2rem; }
  .myc-dmg svg { width: 1.5rem; height: 1.9rem; }
  .myc-dmg span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-height: 380px) {
  .k3-q .k2-h, .k3-left h5, .k3-right h5 { display: none; }
  .k3-filt { gap: .5rem; } .k3-left .seg { margin-bottom: .25rem; }
  .k3-tracks { max-height: 4.6rem; }
  .k3-right .seg { margin-bottom: .3rem; }
  .k3-right .k2-qgo { padding-top: .3rem; }
}

/* ===== HUD v3: the places racing players already look =====
   top left = position, lap, standings · top right = pause/settings · bottom left = the kart (tyres, damage)
   bottom centre = speed, gear, revs · bottom right = lap timing over the map · top centre = race control, coach */
.hud2 .h2-left { left: 14px; top: 14px; width: 270px; }
.hud2 .h2-pos { position: static; display: flex; align-items: baseline; gap: 10px; padding: 6px 12px; background: rgba(7, 11, 26, .86); transform: none; }
.hud2 .h2-pos b { font-size: 34px; color: var(--y); line-height: 1; }
.hud2 .h2-pos span { font-size: 15.5px; font-weight: 700; color: var(--ink); font-family: var(--disp); letter-spacing: .06em; text-transform: uppercase; }
.h3-kart { position: absolute; left: 14px; bottom: 14px; width: 230px; padding: 8px 12px 10px; display: grid; gap: 4px; pointer-events: none; }
.h3-cap { font-family: var(--disp); font-weight: 700; font-size: 15.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.h3-ok { font-size: 15.5px; color: var(--good); font-weight: 600; }
.h3-kart .myc-row { font-size: 16px; }
.h3-speed { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: grid; justify-items: center; gap: 2px; pointer-events: none; text-shadow: 0 2px 10px rgba(0, 0, 0, .65); }
.h3-speed .myc-rpm { width: 240px; height: 8px; border-radius: 4px; background: rgba(7, 11, 26, .7); border: 1px solid rgba(255, 255, 255, .12); position: relative; overflow: hidden; }
.h3-speed .myc-rpm i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #22d07a, #ffd23f 70%, #e5392b); border-radius: 4px; }
.h3-speed .leds { display: none; }
.h3-spd { display: flex; align-items: baseline; gap: 6px; color: #fff; }
.h3-spd b { font-size: 56px; font-weight: 800; line-height: .95; font-variant-numeric: tabular-nums; min-width: 2.2ch; text-align: right; }
.h3-spd span { font-family: var(--disp); font-weight: 700; font-size: 18px; letter-spacing: .08em; color: #d4dae1; }
.h3-spd .myc-gear { font-style: normal; font-family: var(--disp); font-weight: 800; font-size: 26px; color: var(--y); margin-left: 6px; min-width: 1ch; }
.h3-spd .myc-gear:empty { display: none; }
.hud2 .h2-dash { top: auto; bottom: 164px; right: 14px; width: 210px; }
.hud2 .h2-map { right: 14px; bottom: 14px; top: auto; width: 210px; height: 140px; }
.hud2.onboard .h2-dash { width: 170px; }
/* the coach speaks from the top centre, under race control (the bottom centre is the speed) */
#coach .pill { position: fixed !important; left: 50% !important; right: auto !important; top: 118px !important; bottom: auto !important; transform: translateX(-50%) !important; max-width: min(34rem, 56vw) !important; font-family: var(--body) !important; font-weight: 600 !important; font-size: 16px !important; }
#coach .pill .key { font-size: 14px !important; }
/* touch: the bottom corners belong to the controls, every panel sits above them */
.hud2.is-touch .h2-left { width: 210px; }
.hud2.is-touch .h2-pos b { font-size: 24px; }
.hud2.is-touch .h3-kart { bottom: 128px; width: 190px; padding: 5px 9px 6px; }
.hud2.is-touch .h3-cap { display: none; }
.hud2.is-touch .h3-speed { bottom: 120px; }
.hud2.is-touch .h3-spd b { font-size: 38px; }
.hud2.is-touch .h3-speed .myc-rpm { width: 160px; height: 6px; }
.hud2.is-touch .h2-dash { top: 14px; bottom: auto; right: 74px; width: 158px; }
.hud2.is-touch .h2-map { width: 150px; height: 102px; right: 14px; bottom: 128px; top: auto; }
@media (max-height: 560px) {
  .hud2:not(.is-touch) .h2-dash { bottom: 150px; }
  #coach .pill { top: 96px !important; }
}
/* skip tips lives under the pause button; the coach pill is a carbon card with the orange edge */
.hud2 .skip, #hud .skip, .skip { position: fixed !important; left: auto !important; right: 14px !important; top: 70px !important; bottom: auto !important; transform: none !important; }
#coach .pill { background: rgba(7, 11, 26, .9) !important; color: var(--ink) !important; border: 1px solid var(--line) !important; border-left: 4px solid var(--y) !important; border-radius: 8px !important; box-shadow: 0 .4rem 1.2rem rgba(0, 0, 0, .45) !important; padding: 8px 14px !important; }

/* ===== home menu: brand on the left, four calls to action, the live race behind ===== */
.k3-menu { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(20rem, 30rem); align-items: center; gap: 2rem; padding: 5.6rem 3rem 2.4rem; background: linear-gradient(90deg, rgba(7, 11, 26, .1), rgba(7, 11, 26, .72) 70%); }
.k3-brand { display: grid; gap: .6rem; align-self: end; margin-bottom: 1.2rem; }
.k3-logo { font-size: clamp(3.6rem, 8vw, 7rem); line-height: .82; color: #fff; transform: skewX(-8deg); text-shadow: 0 .3rem 1.6rem rgba(0, 0, 0, .55); }
.k3-logo span { display: block; }
.k3-logo span::after { content: ""; display: block; height: .09em; margin-top: .06em; width: 70%; background: repeating-linear-gradient(90deg, var(--spark) 0 .5em, #f3f3f3 .5em 1em); }
.k3-tag { font-family: var(--disp); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #e6eaee; text-shadow: 0 2px 8px rgba(0, 0, 0, .6); }
.k3-ctas { display: grid; gap: .7rem; }
.k3-cta { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem; text-align: left; background: rgba(15, 23, 48, .9); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); box-shadow: 0 .5rem 1.4rem rgba(0, 0, 0, .35); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: transform .12s, border-color .12s, background .12s; }
.k3-cta:hover { transform: translateX(-4px); border-color: var(--y); }
.k3-ct { display: grid; gap: .15rem; flex: 1; min-width: 0; }
.k3-ct b { font-family: var(--disp); font-weight: 800; font-size: 1.9rem; letter-spacing: .03em; text-transform: uppercase; line-height: 1; }
.k3-ct span { color: var(--muted); font-size: max(.95rem, 12px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k3-cta .k3-arrow { font-style: normal; font-size: 2rem; color: var(--muted); }
.k3-cta.main { background: linear-gradient(180deg, #22d3ee, var(--y)); border-color: #5fe3ff; }
.k3-cta.main .k3-ct span { color: #e6fbff; } .k3-cta.main .k3-arrow { color: #fff; }
.k3-cta.soon { opacity: .78; }
.k3-cta em { font-style: normal; font-family: var(--disp); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: max(.8rem, 12px); color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: .15rem .45rem; }
@media (max-height: 560px) { .k3-menu { padding: 4.6rem 1.6rem 1.2rem; } .k3-cta { padding: .6rem .9rem; } .k3-ct b { font-size: 1.4rem; } }
@media (max-width: 760px) { .k3-menu { grid-template-columns: 1fr; } .k3-brand { display: none; } }
/* online: three coming-soon tiles */
.k3-online { position: absolute; left: 1.4rem; right: 1.4rem; top: 5.4rem; bottom: 1.4rem; display: grid; align-content: start; gap: 1rem; max-width: 60rem; margin: 0 auto; }
.k3-online > .k2-h { background: rgba(15, 23, 48, .9); border: 1px solid var(--line); border-radius: 10px; padding: .9rem 1.1rem; }
.k3-ogrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.k3-on { padding: 1.1rem; display: grid; gap: .5rem; align-content: start; min-height: 11rem; }
.k3-on b { font-size: 1.6rem; } .k3-oi svg { width: 2rem; height: 2rem; fill: var(--y); }
.k3-on em { font-style: normal; justify-self: start; font-family: var(--disp); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: max(.8rem, 12px); color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: .15rem .45rem; }
@media (max-width: 760px) { .k3-ogrid { grid-template-columns: 1fr; } }

/* ===== campaign: team offers, story cards, objective, reward path ===== */
.k3-offers { position: absolute; left: 1.4rem; right: 1.4rem; top: 5.4rem; bottom: 1.4rem; display: grid; align-content: start; gap: 1rem; max-width: 66rem; margin: 0 auto; }
.k3-offers > .k2-h { background: rgba(15, 23, 48, .9); border: 1px solid var(--line); border-radius: 10px; padding: .9rem 1.1rem; }
.k3-offer { padding: 1rem 1.1rem; display: grid; gap: .7rem; align-content: start; }
.k3-offer.stay { align-content: center; justify-items: start; }
.k3-oh { display: flex; gap: .7rem; align-items: center; } .k3-oh b { font-size: 1.45rem; display: block; } .k3-oh .dim { margin: 0; }
.k3-boss { display: flex; gap: .6rem; align-items: center; } .k3-boss em, .k3-terms em, .k3-obj em, .k3-trv em { font-style: normal; display: block; font-family: var(--disp); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: max(.75rem, 12px); color: var(--muted); }
.k3-terms { display: grid; gap: .35rem; font-size: max(.92rem, 12px); border-top: 1px solid var(--line); padding-top: .6rem; }
.k3-offer .btn { justify-self: stretch; }
.k3-story { width: min(34rem, 92vw); padding: 1.2rem 1.4rem; display: grid; gap: .6rem; }
.k3-sh { display: flex; gap: .8rem; align-items: center; } .k3-sh b { display: block; font-size: 1.15rem; } .k3-sh .type { display: block; }
.k3-line { font-size: 1.25rem; font-weight: 600; line-height: 1.35; margin: .2rem 0; } .k3-line.small { font-size: max(.95rem, 12px); }
.k3-obj { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .7rem; align-items: center; background: var(--carbon); border: 1px solid var(--line); border-left: 3px solid var(--y); border-radius: 8px; padding: .5rem .7rem; margin: .5rem 0; }
.k3-obj b { font-weight: 600; } .k3-trv { text-align: right; } .k3-trv b { font-size: 1.3rem; }
.k3-objr { padding: .8rem 1rem; display: grid; gap: .4rem; margin-bottom: .8rem; }
.k3-objr.met { border-left: 3px solid var(--good); } .k3-objr.miss { border-left: 3px solid var(--kerb); }
.k3-trust { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: .6rem; align-items: center; font-size: max(.9rem, 12px); }
.k3-trust .bar > i { transition: width .8s; }
.k3-path { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: .7rem 1rem; text-align: left; color: var(--ink); }
.k3-pl { font-family: var(--disp); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-size: max(.8rem, 12px); }
.k3-pd { display: flex; gap: 4px; align-items: center; }
.k3-pd i { flex: 1; height: 8px; border-radius: 4px; background: var(--card2); border: 1px solid var(--line); }
.k3-pd i.big { height: 12px; } .k3-pd i.done { background: var(--good); border-color: var(--good); } .k3-pd i.now { background: var(--y); border-color: var(--y); box-shadow: 0 0 0 3px rgba(30, 155, 255, .25); }
.k3-pn { font-size: max(.9rem, 12px); color: var(--ink); white-space: nowrap; }
.k3-con { display: grid; gap: .25rem; border: 1px solid var(--line); border-radius: 8px; padding: .7rem .9rem; margin: .4rem 0; background: var(--carbon); }
.k3-con.released { border-left: 3px solid var(--kerb); } .k3-con.stay-up { border-left: 3px solid var(--good); } .k3-con.stay { border-left: 3px solid var(--flagy); }
@media (max-height: 560px) { .k3-offer { padding: .6rem .8rem; gap: .45rem; } .k3-terms { font-size: 12px; } }
.k3-story { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 50; }
.mate { color: #7fb4ff; font-style: normal; font-family: var(--disp); font-weight: 700; letter-spacing: .06em; font-size: max(.8em, 12px); }
.k3-goal { color: var(--ink); font-weight: 600; }

/* Kart Prodigy: the brand is the name (KART over PRODIGY); the player and the main calls to action are cyan */
.k3-logo, .boot-word { display: grid; grid-template-columns: auto; justify-content: start; }
.boot-word { justify-content: center; justify-items: center; }
.k3-logo > b, .boot-word > b { display: block; font: inherit; }
.k3-logo span, .boot-word span { color: var(--cyan); }
.hud2 .h2-pos b { color: var(--cyan); }
.k3-cta.main { background: linear-gradient(135deg, #22d3ee, #1e6bff); border-color: #5fe3ff; }
.btn { background: linear-gradient(135deg, #22d3ee, #1e7bff); border-color: #5fe3ff; text-shadow: 0 1px 2px rgba(7, 11, 26, .35); }
.btn:active { background: var(--y2); }

/* ===== home menu v3.2: leaderboard left, CTAs + rewards right, the live race in the middle ===== */
.k3-menu { grid-template-columns: minmax(19rem, 29rem) minmax(0, 1fr) minmax(19rem, 28rem); align-items: stretch; gap: 1.4rem; padding: 5.2rem 2rem 1.6rem; overflow-y: auto; background: linear-gradient(90deg, rgba(7, 11, 26, .78), rgba(7, 11, 26, .1) 38%, rgba(7, 11, 26, .1) 62%, rgba(7, 11, 26, .78)); }
.k3-mleft, .k3-mright { display: flex; flex-direction: column; gap: .8rem; min-width: 0; min-height: 0; }
.k3-mleft { grid-column: 1; } .k3-mright { grid-column: 3; justify-content: flex-end; }
.k3-brand { align-self: auto; margin: 0; gap: .3rem; }
.k3-logo { font-size: clamp(2.6rem, 4.6vw, 4.4rem); }
.k3-tag { font-size: max(.85rem, 11px); }
.k3-lb { display: flex; flex-direction: column; gap: .55rem; padding: .9rem 1rem; min-height: 0; }
.k3-lbh { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.k3-lbh b.disp { font-size: 1.35rem; text-transform: uppercase; letter-spacing: .04em; }
.k3-lbt { flex-wrap: nowrap; width: 100%; } .k3-lbt button { flex: 1; white-space: nowrap; }
.k3-lbme { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: .7rem; padding: .5rem .7rem; border-radius: 8px; background: rgba(34, 211, 238, .1); border: 1px solid rgba(34, 211, 238, .35); }
.k3-lbme span { color: var(--muted); font-size: max(.9rem, 12px); }
.k3-lbme b { font-size: 1.9rem; line-height: 1; color: #fff; }
.k3-lbme i { font-style: normal; font-family: var(--disp); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: max(.85rem, 12px); }
.k3-lrs { display: grid; gap: 2px; overflow-y: auto; min-height: 0; }
.k3-lr { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto 3.4rem; align-items: center; gap: .5rem; padding: .32rem .5rem; border-radius: 6px; background: rgba(255, 255, 255, .03); font-size: max(.95rem, 12px); }
.k3-lr:nth-child(-n+3) > span:first-child { color: var(--flagy); font-weight: 700; }
.k3-lr .n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k3-lr .ai { font-style: normal; font-size: max(.7rem, 10px); color: var(--muted); border: 1px solid var(--line); border-radius: 3px; padding: 0 .25rem; margin-left: .2rem; }
.k3-lr .band { font-style: normal; font-family: var(--disp); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: max(.75rem, 11px); }
.k3-lr b { text-align: right; }
.k3-lr.me { background: rgba(34, 211, 238, .16); outline: 1px solid rgba(34, 211, 238, .5); }
.k3-lgap { text-align: center; color: var(--muted); line-height: .8; }
.k3-lbf { margin-top: auto; }
.k3-ctas { gap: .55rem; }
.k3-cta { padding: .8rem 1.1rem; }
.k3-ct b { font-size: 1.65rem; }
.k3-rw { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; }
.k3-gift, .k3-daily { position: relative; display: flex; align-items: center; gap: .6rem; padding: .65rem .8rem; text-align: left; color: var(--ink); border-radius: 10px; overflow: hidden; min-width: 0; }
.k3-gift svg, .k3-daily svg { width: 1.7rem; height: 1.7rem; flex: none; color: var(--cyan); }
.k3-rwt { display: grid; min-width: 0; } .k3-rwt b { font-family: var(--disp); text-transform: uppercase; letter-spacing: .04em; font-size: 1.05rem; }
.k3-rwt span { color: var(--muted); font-size: max(.85rem, 11px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k3-gift .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border: 0; border-radius: 0; background: rgba(255, 255, 255, .08); }
.k3-gift .bar > i { background: var(--cyan); transition: width .25s linear; }
.k3-gift.ready, .k3-daily.ready { border-color: var(--spark); box-shadow: 0 0 0 1px var(--spark), 0 .4rem 1.4rem rgba(255, 91, 31, .35); animation: k3pulse 1.6s ease-in-out infinite; }
.k3-gift.ready svg, .k3-daily.ready svg { color: var(--spark); }
/* a reward waiting: the button hops every couple of seconds so it is seen */
.k3-gift.ready, .k3-daily.ready { animation: k3pulse 1.6s ease-in-out infinite, k3hop 2.2s ease-in-out infinite; }
@keyframes k3hop { 0%, 58%, 100% { transform: translateY(0); } 68% { transform: translateY(-8px); } 78% { transform: translateY(0); } 86% { transform: translateY(-3px); } 93% { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .k3-gift.ready, .k3-daily.ready { animation: k3pulse 1.6s ease-in-out infinite; } }
.k3-gift.ready .k3-rwt span, .k3-daily.ready .k3-rwt span { color: #ffd2bf; }
@keyframes k3pulse { 50% { box-shadow: 0 0 0 1px var(--spark), 0 .4rem 2rem rgba(255, 91, 31, .6); } }
.k3-chal { display: grid; gap: .35rem; padding: .7rem .9rem; }
.k3-chr { display: grid; grid-template-columns: minmax(0, 1fr) 3.2rem 2.4rem 2.8rem; align-items: center; gap: .5rem; font-size: max(.9rem, 12px); }
.k3-chr > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k3-chr .bar { height: .4rem; } .k3-chr b { text-align: right; } .k3-chr em { font-style: normal; color: var(--flagy); text-align: right; }
.k3-chr.done > span { color: var(--muted); text-decoration: line-through; } .k3-chr.done b { color: #22d07a; }
.k3-chr .wk { display: inline-block; margin-right: .3rem; font-style: normal; font-family: var(--disp); font-weight: 700; text-transform: uppercase; font-size: max(.72rem, 10px); color: var(--spark); letter-spacing: .06em; }
.k3-cash b { color: var(--flagy); }
@media (max-width: 1100px) { .k3-menu { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: rgba(7, 11, 26, .55); } .k3-mright { grid-column: 2; } }
@media (max-height: 640px) { .k3-menu { padding: 4.4rem 1.4rem 1rem; gap: 1rem; } .k3-brand { display: none; } .k3-mright { justify-content: flex-start; overflow-y: auto; } .k3-cta { padding: .5rem .9rem; } .k3-ct b { font-size: 1.3rem; } .k3-ct span { font-size: max(.8rem, 11px); } .k3-chal { gap: .2rem; padding: .5rem .8rem; } .k3-lr { padding: .2rem .5rem; } }
@media (max-width: 760px) { .k3-menu { grid-template-columns: 1fr; padding: 4.6rem 1rem 1.2rem; align-items: start; } .k3-mleft, .k3-mright { grid-column: 1; } .k3-mright { order: -1; } .k3-lrs { overflow: visible; } }
/* daily login calendar */
.k3-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .4rem; margin: .8rem 0; }
.k3-dd { display: grid; justify-items: center; gap: .15rem; padding: .6rem .2rem; border-radius: 8px; background: var(--card2); border: 1px solid var(--line); }
.k3-dd span { font-size: max(.75rem, 10px); color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.k3-dd b { font-size: 1.15rem; } .k3-dd i { font-style: normal; font-size: max(.7rem, 10px); color: var(--muted); }
.k3-dd.got { background: rgba(34, 208, 122, .14); border-color: rgba(34, 208, 122, .5); }
.k3-dd.now { border-color: var(--spark); box-shadow: 0 0 0 1px var(--spark); }
.k3-dd:last-child b { color: var(--flagy); }
.k3-dgot { font-family: var(--disp); font-weight: 800; font-size: 1.4rem; text-transform: uppercase; color: var(--flagy); text-align: center; }
.k3-dailybox { max-width: 36rem; }
@media (max-width: 520px) { .k3-days { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* garage upgrades */
.k3-ugs { display: grid; gap: .4rem; margin-bottom: .6rem; }
.k3-ug { display: grid; grid-template-columns: minmax(0, 1fr) auto 4.6rem; align-items: center; gap: .6rem; padding: .45rem .6rem; border-radius: 8px; background: var(--card2); border: 1px solid var(--line); }
.k3-ugn { display: grid; } .k3-ugn b { font-family: var(--disp); text-transform: uppercase; letter-spacing: .04em; }
.k3-pips { display: flex; gap: 3px; } .k3-pips i { width: .8rem; height: .8rem; border-radius: 2px; background: var(--line); transform: skewX(-12deg); } .k3-pips i.on { background: var(--cyan); }
.k3-ug .btn { justify-self: stretch; padding: .35rem .5rem; } .k3-ug em { font-style: normal; text-align: center; }
/* results: the three ratings + completed challenges */
.k3-rts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; padding: .7rem; }
.k3-rt { display: grid; justify-items: center; gap: .1rem; padding: .4rem; }
.k3-rt span { font-size: max(.8rem, 11px); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.k3-rt b { font-size: 1.8rem; line-height: 1; } .k3-rt em { font-style: normal; font-weight: 700; } .k3-rt em.up { color: #22d07a; } .k3-rt em.dn { color: #ff6b5b; }
.k3-rt i { font-style: normal; font-family: var(--disp); font-weight: 700; text-transform: uppercase; font-size: max(.75rem, 10px); letter-spacing: .06em; }
.k3-chd { display: grid; grid-template-columns: 1fr auto; gap: .2rem .8rem; padding: .6rem .9rem; } .k3-chd span { color: #22d07a; } .k3-chd b { color: var(--flagy); }

/* ===== hub v3.2: header, objective, circuit map + facts, Play at the foot; standings / calendar as tabs ===== */
.k2-next .k2-info { flex: 0 1 auto; overflow: visible; margin-top: .6rem; align-items: center; }
.k2-next .k2-map { width: auto; height: clamp(6rem, 24vh, 13rem); max-height: none; max-width: 40%; flex: none; }
.k2-next .k2-go { margin-top: auto; padding-top: .8rem; }
.k3-goal { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k2-stand .k2-h { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.k3-htab button { min-width: 7rem; }
.k2-stand .k3-cal { margin-top: .3rem; border-top: 0; align-content: start; }
.k2-stand .k3-ch, .k2-stand .k3-cr { grid-template-columns: 1.8rem minmax(0, 1fr) 6.6rem 4.6rem; }
.k3-cr span:nth-child(2) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-height: 600px) {
  .k2-next .k2-map { height: min(7rem, 19vh); }
  .k2-next .k2-facts span:nth-child(n+3) { display: none; }
  .k2-next .k2-go { padding-top: .4rem; }
  .k2-next .k2-go .btn.big { padding: .55rem 1.4rem; font-size: 1.25rem; }
  .k3-obj { padding: .35rem .6rem; } .k3-obj .face, .k3-obj svg:first-child { width: 32px; height: 32px; }
  .k2-stand .k3-cr { padding: .18rem .5rem; }
}
@media (max-height: 470px) {
  .k3-goal { display: none; }
  .k2-next .k2-map { height: 15vh; }
}
/* home menu: very short frames keep every card whole */
@media (max-height: 500px) { .k3-ct span { display: none; } .k3-ct b { font-size: 1.2rem; } .k3-cta { padding: .45rem .9rem; } .k3-rwt span { font-size: max(.75rem, 11px); } .k3-lrs .k3-lr:nth-child(n+6):not(.me) { display: none; } }

/* ===== Quick race v3.2: the panel fills the frame, the circuit list takes the height that is left ===== */
.k3-q { display: flex; flex-direction: column; height: 100%; max-height: 40rem; }
.k3-q .k3-cols { flex: 1 1 auto; min-height: 0; grid-template-rows: minmax(0, 1fr); }
.k3-q .k3-left { min-height: 0; }
.k3-q .k3-tracks { flex: 1 1 auto; min-height: 4rem; max-height: none; align-content: start; }
.k3-q .k3-right { min-height: 0; }
.k3-q .k3-map { flex: 1 1 8.5rem; min-height: 3.5rem; height: auto; max-height: 10rem; }
.k3-q .k3-map svg { height: 100%; width: auto; }
@media (max-height: 620px) {
  .k3-q .k3-map { display: grid; }
  .k3-q .k3-tn { display: block; font-size: 1.2rem; margin-top: .2rem; }
  .k3-q .k3-left > h5, .k3-q .k3-filt h5 { display: none; }
  .k3-q .k3-filt { gap: .4rem 1rem; margin-top: .4rem; }
  .k3-q .k3-tracks { max-height: none; }
  .k3-q .k3-tr { padding: .3rem .7rem; }
}
@media (max-height: 420px) { .k3-q .k3-tracks { max-height: none; } .k3-q .k3-facts { display: none; } .k3-q .k3-map { flex-basis: 3.5rem; } }
@media (max-height: 380px) { .k3-q .k3-tracks { max-height: none; } }

/* very short frames: challenges move behind a third reward button */
.k3-chbtn { display: none; }
.k3-chalbox .k3-chal { background: none; border: 0; box-shadow: none; padding: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
@media (max-height: 500px) {
  .k3-rw { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .k3-chbtn { position: relative; display: flex; align-items: center; gap: .5rem; padding: .55rem .7rem; text-align: left; color: var(--ink); border-radius: 10px; min-width: 0; }
  .k3-chbtn svg, .k3-gift svg, .k3-daily svg { width: 1.4rem; height: 1.4rem; flex: none; color: var(--cyan); }
  .k3-mright > .k3-chal { display: none; }
  .k3-gift, .k3-daily { padding: .55rem .7rem; gap: .5rem; }
}
.k3-q .k3-tracks, .k3-lrs { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 1.2rem), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 1.2rem), transparent); padding-bottom: .8rem; }

/* ===== audit fixes v3.2 ===== */
/* results: the panels scroll between the header and the buttons, the buttons never leave the frame */
.k2-res .res-r { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.k2-res .res-mid { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: grid; gap: .6rem; align-content: start; }
.k2-res .res-r > .next { flex: none; }
.k2-res .k3-objr { margin-bottom: 0; padding: .6rem .9rem; gap: .3rem; }
.k3-rts { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: .5rem .7rem; gap: .2rem .5rem; }
.k3-rt { grid-template-columns: auto auto; justify-content: center; align-items: baseline; gap: 0 .4rem; padding: .2rem; }
.k3-rt span { grid-column: 1 / -1; text-align: center; font-size: 12px; }
.k3-rt b { font-size: 1.5rem; } .k3-rt i { grid-column: 1 / -1; text-align: center; font-size: 12px; }
.k3-chd { grid-column: 1 / -1; padding: .35rem .2rem 0; border-top: 1px solid var(--line); }
@media (max-height: 560px) {
  .k2-res .k3-objr .k3-line { display: none; }
  .k3-rt i { display: none; } .k3-rt b { font-size: 1.25rem; }
}
/* nothing under 12 px on the new panels */
.k3-tag, .k3-lr .ai, .k3-lr .band, .k3-rwt span, .k3-chr .wk, .k3-dd span, .k3-dd i, .k3-lbme i { font-size: 12px; }
/* home menu: two columns down to 560 px wide (phones in landscape); one column only below that */
@media (max-width: 760px) { .k3-menu { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 4.4rem 1rem 1rem; align-items: stretch; } .k3-mleft { grid-column: 1; } .k3-mright { grid-column: 2; order: 0; } .k3-lrs { overflow-y: auto; } }
@media (max-width: 560px) { .k3-menu { grid-template-columns: 1fr; align-items: start; } .k3-mleft, .k3-mright { grid-column: 1; } .k3-mright { order: -1; } .k3-lrs { overflow: visible; } }
/* online and offers: three across down to 520 px wide; compact on short frames */
@media (max-width: 760px) { .k3-ogrid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; } }
@media (max-width: 520px) { .k3-ogrid { grid-template-columns: 1fr; } }
@media (max-height: 460px) {
  .k3-online, .k3-offers { top: 4.4rem; bottom: .8rem; gap: .6rem; }
  .k3-online > .k2-h, .k3-offers > .k2-h { padding: .5rem .8rem; }
  .k3-offers > .k2-h .dim { display: none; }
  .k3-on { min-height: 0; padding: .7rem; gap: .3rem; } .k3-on b { font-size: 1.25rem; } .k3-oi svg { width: 1.5rem; height: 1.5rem; }
  .k3-offer { padding: .5rem .7rem; gap: .35rem; }
  .k3-oh b { font-size: 1.15rem; } .k3-oh .dim { display: none; }
  .k3-terms { padding-top: .35rem; gap: .15rem; } .k3-terms span:first-child { display: none; }
  .k3-offer .btn { padding: .45rem .6rem; }
}
/* HUD: the dash clears the minimap; on touch the pedals own the bottom corners and Look back the bottom centre */
.hud2 .h2-dash { bottom: 164px; }
@media (max-height: 560px) { .hud2:not(.is-touch) .h2-dash { bottom: 162px; } }
.hud2.is-touch .h2-map { bottom: 146px; }
.hud2.is-touch .h3-speed { bottom: 80px; }
.hud2 .touch .t-m .tb-back { position: static; right: auto; bottom: auto; }

/* ===== team radio: a face, who is talking, one short call in big type ===== */
#coach .radio { position: fixed; left: 50%; top: 112px; transform: translateX(-50%); display: grid; grid-template-columns: auto minmax(0, auto) auto; align-items: center; gap: 12px; padding: 8px 16px 8px 8px; background: rgba(7, 11, 26, .92); border: 1px solid var(--line); border-left: 4px solid var(--cyan); border-radius: 999px 14px 14px 999px; box-shadow: 0 .5rem 1.6rem rgba(0, 0, 0, .5); color: var(--ink); pointer-events: none; white-space: nowrap; max-width: calc(100vw - 2rem); }
#coach .radio.in { animation: rdIn .22s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes rdIn { from { opacity: 0; transform: translate(-50%, -8px) scale(.96); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
#coach .rd-face { width: 46px; height: 46px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 2px var(--cyan); }
#coach .rd-face svg { display: block; }
#coach .rd-body { display: grid; gap: 1px; min-width: 0; }
#coach .rd-body em { font-style: normal; font-family: var(--disp); font-weight: 700; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); display: flex; align-items: center; gap: 6px; }
#coach .rd-dot { width: 7px; height: 7px; border-radius: 50%; background: #ff3b3b; box-shadow: 0 0 6px #ff3b3b; animation: rdBlink 1s steps(2) infinite; }
@keyframes rdBlink { 50% { opacity: .25; } }
#coach .rd-body b { font-family: var(--disp); font-weight: 800; font-size: 28px; line-height: 1.05; letter-spacing: .02em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; }
#coach .rd-body .key { display: inline-block; font-family: var(--mono); font-size: 18px; line-height: 1.2; padding: 0 .4rem; margin: 0 .1rem; border-radius: 5px; background: var(--cyan); color: #071022; vertical-align: .15em; }
#coach .rd-wave { display: flex; align-items: center; gap: 3px; height: 26px; }
#coach .rd-wave i { width: 4px; height: 100%; border-radius: 2px; background: var(--cyan); animation: rdWave .9s ease-in-out infinite; }
#coach .rd-wave i:nth-child(2) { animation-delay: -.3s; } #coach .rd-wave i:nth-child(3) { animation-delay: -.6s; } #coach .rd-wave i:nth-child(4) { animation-delay: -.15s; }
@keyframes rdWave { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }
@media (max-height: 560px) {
  #coach .radio { top: 92px; padding: 5px 12px 5px 5px; gap: 9px; }
  #coach .rd-face { width: 36px; height: 36px; } #coach .rd-face svg { width: 36px; height: 36px; }
  #coach .rd-body b { font-size: 22px; } #coach .rd-body .key { font-size: 15px; }
  #coach .rd-wave { height: 20px; }
}
@media (prefers-reduced-motion: reduce) { #coach .radio.in, #coach .rd-wave i, #coach .rd-dot { animation: none; } }
/* the kart needs repairs: a pit tag under the damage line (four words or fewer, like every in-race call) */
#dDmg.pitme::after { content: "Pit: keep left"; display: block; grid-column: 1 / -1; margin-top: 4px; width: max-content; padding: 1px 7px; border-radius: 4px; background: var(--flagy); color: #071022; font-family: var(--disp); font-weight: 800; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; animation: rdBlink 1.2s steps(2) infinite; }

/* ===== team offers v3.3: list | the team kart | what you get and what they expect ===== */
.k3-offers2 { position: absolute; left: 1.4rem; right: 1.4rem; top: 5.2rem; bottom: 1.2rem; display: grid; grid-template-columns: minmax(17rem, 21rem) minmax(0, 1fr) minmax(23rem, 28rem); gap: 1rem; min-height: 0; }
.k3-ol { display: flex; flex-direction: column; gap: .55rem; min-height: 0; overflow-y: auto; }
.k3-olh { display: grid; gap: .2rem; padding: .2rem .2rem .4rem; } .k3-olh b { font-size: 1.9rem; text-transform: uppercase; text-shadow: 0 2px 10px rgba(0, 0, 0, .6); } .k3-olh .dim { color: #c9d3ea; text-shadow: 0 1px 6px rgba(0, 0, 0, .7); }
.k3-orow { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: .7rem; padding: .7rem .8rem; text-align: left; color: var(--ink); background: rgba(15, 23, 48, .92); border: 1px solid var(--line); border-left: 5px solid var(--tc); border-radius: 10px; transition: transform .12s, border-color .12s, box-shadow .12s; }
.k3-orow:hover { transform: translateX(3px); border-color: var(--tc); }
.k3-orow.on { border-color: var(--cyan); border-left-color: var(--tc); box-shadow: 0 0 0 1px var(--cyan), 0 .5rem 1.6rem rgba(0, 0, 0, .45); background: linear-gradient(90deg, color-mix(in srgb, var(--tc) 22%, rgba(15, 23, 48, .95)), rgba(15, 23, 48, .95) 70%); }
.k3-orn { display: grid; min-width: 0; } .k3-orn b { font-family: var(--disp); font-size: 1.2rem; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k3-orn > span { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k3-orp { display: grid; justify-items: end; } .k3-orp b { color: var(--flagy); font-size: 1.15rem; } .k3-orp em { font-style: normal; color: var(--muted); font-size: 12px; }
.k3-otag { position: absolute; top: -9px; right: 10px; font-style: normal; font-family: var(--disp); font-weight: 800; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; padding: 1px 8px; border-radius: 999px; background: var(--spark); color: #fff; }
.k3-stars { font-style: normal; color: var(--flagy); letter-spacing: 1px; } .k3-stars s { text-decoration: none; color: #3a4670; }
.k3-ostage { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; pointer-events: none; padding-bottom: .6rem; }
.k3-oname { display: grid; justify-items: center; gap: .1rem; } .k3-oname b { font-size: 2.6rem; line-height: .95; text-transform: uppercase; transform: skewX(-8deg); color: #fff; text-shadow: 0 .3rem 1.4rem rgba(0, 0, 0, .6); }
.k3-oname em { font-style: normal; font-family: var(--disp); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); font-size: 13px; }
.k3-od { position: relative; display: flex; flex-direction: column; gap: .75rem; padding: 1rem 1.1rem 0; min-height: 0; overflow-y: auto; border-top: 5px solid var(--tc); background: linear-gradient(160deg, color-mix(in srgb, var(--tc) 20%, rgba(15, 23, 48, .96)), rgba(15, 23, 48, .96) 45%); }
.k3-odh { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .8rem; align-items: center; }
.k3-odh em { font-style: normal; font-family: var(--disp); font-weight: 700; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); }
.k3-odh b.disp { display: block; font-size: 1.9rem; line-height: 1; text-transform: uppercase; } .k3-odh .dim { font-size: 14px; }
.k3-odb { display: flex; align-items: center; gap: .6rem; padding: .45rem .6rem; border-radius: 8px; background: rgba(7, 11, 26, .55); }
.k3-odb em { font-style: normal; display: block; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-family: var(--disp); font-weight: 700; }
.k3-sec { display: grid; gap: .5rem; } .k3-sec h5 { margin: 0; font-family: var(--disp); font-weight: 800; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.k3-pays { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; }
.k3-pays > div { display: grid; justify-items: start; gap: .1rem; padding: .55rem .6rem; border-radius: 8px; background: var(--card2); border: 1px solid var(--line); min-width: 0; }
.k3-pays svg { width: 22px; height: 22px; color: var(--flagy); } .k3-pays > div:last-child svg { color: var(--cyan); }
.k3-pays b { font-size: 1.25rem; line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; } .k3-pays > div:last-child b { font-family: var(--disp); font-size: 1.05rem; text-transform: uppercase; }
.k3-pays em { font-style: normal; font-size: 12px; color: var(--muted); }
.k3-sts { display: grid; gap: .3rem; }
.k3-st { display: grid; grid-template-columns: 7rem minmax(0, 1fr) 4.4rem; align-items: center; gap: .6rem; font-size: 14px; }
.k3-st .bar { height: .55rem; } .k3-st .bar > i { background: linear-gradient(90deg, var(--tc), var(--cyan)); } .k3-st b { text-align: right; color: #bff3ff; }
.k3-expect { padding: .7rem .75rem; border-radius: 10px; background: rgba(7, 11, 26, .6); border: 1px solid color-mix(in srgb, var(--tc) 55%, var(--line)); }
.k3-expect h5 { color: #fff; }
.k3-ex { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: .65rem; }
.k3-exi { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: color-mix(in srgb, var(--tc) 30%, #10183a); color: #fff; } .k3-exi svg { width: 19px; height: 19px; }
.k3-ex b { display: block; font-size: 1.02rem; line-height: 1.15; } .k3-ex em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.k3-sign { position: sticky; bottom: 0; margin: auto -1.1rem 0; border-radius: 0 0 8px 8px; justify-content: center; padding: .9rem 1rem; font-size: 1.35rem; box-shadow: 0 -.6rem 1.2rem rgba(7, 11, 26, .8); }
@media (max-width: 1100px) { .k3-offers2 { grid-template-columns: minmax(15rem, 19rem) minmax(0, 1fr) minmax(21rem, 25rem); } .k3-oname b { font-size: 1.9rem; } }
@media (max-width: 900px) { .k3-offers2 { grid-template-columns: minmax(14rem, 17rem) minmax(0, 1fr); } .k3-ostage { display: none; } }
@media (max-height: 640px) {
  .k3-offers2 { top: 4.4rem; bottom: .8rem; gap: .7rem; }
  .k3-olh b { font-size: 1.4rem; } .k3-olh .dim { display: none; }
  .k3-orow { padding: .45rem .6rem; gap: .5rem; } .k3-orow svg { width: 32px; height: 32px; }
  .k3-od { gap: .45rem; padding: .7rem .8rem 0; } .k3-odh b.disp { font-size: 1.45rem; } .k3-odh .dim { display: none; } .k3-odh svg { width: 44px; height: 44px; }
  .k3-odb { display: none; } .k3-pays > div { padding: .35rem .45rem; } .k3-st { font-size: 13px; } .k3-expect { padding: .45rem .55rem; gap: .35rem; }
  .k3-ex { grid-template-columns: 28px minmax(0, 1fr); } .k3-exi { width: 28px; height: 28px; } .k3-ex em { display: none; }
  .k3-sign { margin: auto -.8rem 0; padding: .6rem; font-size: 1.15rem; }
}

/* team offers v3.3b: expectations first (a 2 x 2 of tiles), the boss in the header, stats in two columns */
.k3-odh .k3-odb { display: flex; align-items: center; gap: .4rem; margin-top: .35rem; padding: 0; background: none; font-size: 13px; color: var(--muted); }
.k3-odh .k3-odb svg { width: 24px; height: 24px; flex: none; } .k3-odh .k3-odb b { color: var(--ink); }
.k3-exg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.k3-exg .k3-ex { align-items: start; padding: .5rem .55rem; border-radius: 8px; background: rgba(255, 255, 255, .04); }
.k3-exg .k3-ex b { font-size: 1rem; }
.k3-sts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem 1rem; }
.k3-st { grid-template-columns: minmax(0, 1fr) 3.9rem; grid-template-rows: auto auto; gap: .15rem .4rem; font-size: 13px; }
.k3-st > span { grid-column: 1; } .k3-st > b { grid-column: 2; grid-row: 1; } .k3-st .bar { grid-column: 1 / -1; grid-row: 2; }
.k3-stn { margin-top: -.15rem; }
@media (max-width: 900px) { .k3-orn b, .k3-orn > span { white-space: normal; } .k3-orn b { font-size: 1.05rem; line-height: 1.05; } .k3-orow { grid-template-columns: 34px minmax(0, 1fr); } .k3-orp { grid-column: 2; justify-items: start; grid-auto-flow: column; gap: .3rem; align-items: baseline; } }
@media (max-height: 640px) {
  .k3-exg { gap: .35rem; } .k3-exg .k3-ex { padding: .35rem .45rem; } .k3-exg .k3-ex b { font-size: .92rem; }
  .k3-pays em, .k3-stn, .k3-odh .k3-odb { display: none; } .k3-pays b { font-size: 1.05rem; }
  .k3-sts { gap: .2rem .8rem; }
}

/* garage: part levels that open in a higher class */
.k3-pips i.lock { background: repeating-linear-gradient(45deg, #24315c 0 2px, transparent 2px 4px); }
.k3-uglock { font-style: normal; text-align: center; font-family: var(--disp); font-weight: 700; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border: 1px dashed var(--line); border-radius: 6px; padding: .3rem .2rem; }
.k3-lsub { margin: .35rem 0 .1rem; padding-top: .35rem; border-top: 1px solid var(--line); font-family: var(--disp); font-weight: 700; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.k3-lempty { margin: .2rem 0; color: #c9d3ea; }
/* offers v3.3c: fits the frame without scrolling at every desktop size; nothing under 12 px */
@media (max-height: 820px) { .k3-od { gap: .5rem; padding-top: .8rem; } .k3-odh svg { width: 48px; height: 48px; } .k3-odh b.disp { font-size: 1.65rem; } .k3-stn { display: none; } .k3-exg { gap: .4rem; } .k3-exg .k3-ex { padding: .4rem .5rem; } .k3-ex em { font-size: 12px; } .k3-pays > div { padding: .4rem .5rem; } .k3-sign { padding: .75rem 1rem; } }
@media (max-height: 640px) { .k3-exg .k3-ex b { font-size: max(.92rem, 12px); } }
@media (max-height: 470px) { .k3-sts { display: none; } .k3-odh svg { width: 36px; height: 36px; } .k3-odh b.disp { font-size: 1.3rem; } .k3-odh em { display: none; } .k3-exg .k3-ex { padding: .3rem .4rem; } .k3-exi { width: 24px; height: 24px; } .k3-exi svg { width: 15px; height: 15px; } .k3-ex { grid-template-columns: 24px minmax(0, 1fr); gap: .45rem; } .k3-sec h5 { font-size: 12px; } }
@media (max-height: 380px) { .k3-od { gap: .32rem; padding-top: .55rem; } .k3-sign { padding: .55rem; } }
/* text pass: chips instead of sentences, a key grid instead of a line of controls */
.k3-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .15rem 0 .1rem; }
.k3-chips i { font-style: normal; display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .6rem; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); color: var(--ink); font-size: 13px; font-weight: 600; }
.k3-chips i svg.ico { width: 15px; height: 15px; }
.k3-keys { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem .9rem; margin-top: .2rem; }
.k3-keys span { display: flex; align-items: center; gap: .55rem; font-size: 14px; color: var(--ink); }
.k3-keys .key { min-width: 2.6rem; text-align: center; padding: .15rem .4rem; border-radius: 6px; background: var(--card2); border: 1px solid var(--line); font-family: var(--mono); font-weight: 700; font-size: 13px; color: var(--cyan); }
/* settings: two columns and the controls underneath, room to breathe; setup rows spaced */
.k3-setbox { width: min(46rem, calc(100vw - 2rem)); }
.k3-set { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .2rem 2rem; }
.k3-set h5 { margin: .9rem 0 .4rem !important; } .k3-set > div > h5:first-child { margin-top: .2rem !important; }
.k3-setc { grid-column: 1 / -1; border-top: 1px solid var(--line); margin-top: .6rem; padding-top: .2rem; }
.k3-keys { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .55rem 1rem; }
.su { gap: .9rem; } .su-r h5 { margin: 0 0 .4rem !important; } .su-r .dim { margin-top: .35rem !important; }
@media (max-height: 560px) { .k3-set h5 { margin: .5rem 0 .3rem !important; } .k3-keys { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .35rem .7rem; } .su { gap: .5rem; } }
@media (max-width: 760px) { .k3-set { grid-template-columns: 1fr; } .k3-keys { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* ladder: more air between the class columns and their lines */
.lad .lc { gap: .35rem; } .lad .lc .dim { line-height: 1.35; }

/* the pit limit on the speedo: shown in the lane, red and pulsing when over it */
.h3-pitlim { display: none; margin: 4px auto 0; width: max-content; padding: 2px 10px; border-radius: 6px; background: #ffd23f; color: #071022; font-family: var(--disp); font-weight: 800; font-size: 14px; letter-spacing: .08em; }
#hSpeed.pit .h3-pitlim { display: block; }
#hSpeed.pit.over .h3-pitlim { background: #e5392b; color: #fff; animation: rdBlink .5s steps(2) infinite; }
#hSpeed.pit.inwin .h3-pitlim { background: #22d07a; color: #071022; }
#hSpeed.pit.serve .h3-pitlim { background: #e5392b; color: #fff; }
#hSpeed.pit.over #dSpd { color: #ff6b5b; }
/* top centre, in order: race control, the radio right under it, then lights, messages and prompts below the radio, all centred */
#coach .radio { top: 58px; }
#hud #hStack .kl-prompt { position: static !important; left: auto !important; right: auto !important; top: auto !important; bottom: auto !important; transform: none !important; justify-self: center; margin: 0 auto; }
@media (max-height: 560px) { #coach .radio { top: 50px; } }

/* the loading card between screens and races: the boot screen's look */
#loadcard { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; transition: opacity .4s; }
#loadcard.gone { opacity: 0; pointer-events: none; }
#loadcard .boot-inner { display: grid; justify-items: center; gap: 14px; }
#loadcard .boot-bar { width: min(22rem, 70vw); }

/* the last part of a load: the card lets the 3D view through a touch (see main.js) */
#boot.settle:not(.gone), #loadcard.settle:not(.gone) { opacity: .93; transition: opacity .25s; }

#dDmg.pitme.pitright::after { content: "Pit: keep right"; }

/* championship standings after a round (screens.js standings2) */
.scr-standings { display: grid; place-items: center; padding: 1.2rem; }
.k3-standv { width: min(40rem, 100%); display: grid; gap: .8rem; }
.k3-sth { display: grid; gap: .15rem; }
.k3-sth .type { color: var(--cyan); font-family: var(--disp); letter-spacing: .08em; text-transform: uppercase; font-size: .85rem; }
.k3-sth b { font-size: 2.2rem; line-height: 1; }
.k3-stt { padding: .5rem .8rem; max-height: 62vh; overflow-y: auto; }
.k3-sr { display: grid; grid-template-columns: 2.6rem 1fr 4rem 3.6rem; align-items: center; padding: .42rem .3rem; border-radius: 6px; }
.k3-sr > b, .k3-sr .add { text-align: right; }
.k3-sr .add { color: var(--good); }
.k3-srh { color: var(--dim, #8fa0c0); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }
.k3-sr.up > span:first-child { color: var(--good); }
.k3-sr.me { background: linear-gradient(90deg, rgba(34, 211, 238, .22), rgba(34, 211, 238, .06)); outline: 1px solid rgba(34, 211, 238, .5); }
.k3-cut { margin: .3rem 0; border-top: 2px dashed var(--good); position: relative; height: 0; }
.k3-cut span { position: absolute; right: .3rem; top: -.75rem; background: var(--bg, #070b1a); padding: 0 .4rem; color: var(--good); font-size: .72rem; font-family: var(--disp); letter-spacing: .06em; text-transform: uppercase; }
.k3-stl { display: grid; gap: .2rem; }
.k3-stl b { font-size: 1.3rem; }
.k3-stb { display: flex; justify-content: flex-end; gap: .7rem; }

/* first visit: Coach Ray's welcome, the race held behind it (main.js welcome) */
#welcome { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: rgba(7, 11, 26, .45); padding: 1rem; }
.k3-wel { display: grid; grid-template-columns: auto 1fr; gap: 1rem 1.2rem; align-items: center; padding: 1.4rem 1.6rem; width: min(34rem, 100%); }
.k3-wel .rd-face { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; border: 2px solid var(--cyan); }
.k3-welt { display: grid; gap: .25rem; }
.k3-welt em { font-style: normal; color: var(--cyan); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.k3-welt b { font-size: 1.5rem; line-height: 1.15; }
.k3-wel .btn { grid-column: 1 / -1; justify-self: stretch; animation: k3hop 2.2s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .k3-wel .btn { animation: none; } }

/* results: race control's decisions under the classification */
.res-notes { margin-top: .8rem; padding-top: .6rem; border-top: 1px solid var(--line); display: grid; gap: .3rem; }
.res-notes .type { color: var(--dim, #8fa0c0); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
.res-notes .rn { display: grid; grid-template-columns: 1fr auto 6.5rem; gap: .6rem; align-items: baseline; font-size: .9rem; }
.res-notes .rn span { overflow-wrap: anywhere; }
.res-notes .rn em { font-style: normal; color: var(--dim, #8fa0c0); font-size: .8rem; text-align: right; }

/* the scouts' review after the flag (main.js scoutEval) */
#evalcard { position: fixed; inset: 0; z-index: 65; display: grid; place-items: center; background: radial-gradient(120% 90% at 50% 40%, rgba(18, 32, 74, .96), rgba(7, 11, 26, .98) 70%); transition: opacity .4s; animation: evIn .3s ease-out; padding: 1rem; }
#evalcard.gone { opacity: 0; pointer-events: none; }
@keyframes evIn { from { opacity: 0; } }
.k3-eval { display: grid; gap: .5rem; width: min(30rem, 100%); }
.k3-eval .type { color: var(--cyan); font-family: var(--disp); letter-spacing: .08em; text-transform: uppercase; font-size: .85rem; }
.k3-eval > b { font-size: 2rem; line-height: 1.05; margin-bottom: .6rem; }
.k3-evl { display: grid; gap: .7rem; }
.k3-evi { display: grid; grid-template-columns: 1.6rem 1fr; gap: .8rem; align-items: center; opacity: .35; animation: evOn .35s ease-out forwards; animation-delay: calc(.35s + var(--i) * .55s); }
.k3-evi span { display: grid; }
.k3-evi b { font-family: var(--disp); font-size: 1.15rem; letter-spacing: .04em; text-transform: uppercase; }
.k3-evi em { font-style: normal; color: var(--dim, #8fa0c0); font-size: .9rem; }
.k3-evt { width: 1.4rem; height: 1.4rem; border-radius: 50%; border: 2px solid rgba(34, 211, 238, .45); border-top-color: var(--cyan); animation: evSpin .8s linear infinite; }
.k3-evi { --done: calc(.35s + var(--i) * .55s + .5s); }
.k3-evi .k3-evt { animation: evSpin .8s linear infinite, evTick .01s linear forwards; animation-delay: 0s, var(--done); }
@keyframes evOn { to { opacity: 1; } }
@keyframes evSpin { to { transform: rotate(360deg); } }
@keyframes evTick { to { border-color: var(--good); background: var(--good); box-shadow: inset 0 0 0 4px #0b1530; } }
@media (prefers-reduced-motion: reduce) { .k3-evi, .k3-evt { animation: none !important; opacity: 1; } }

.k3-ohint { color: var(--cyan); font-size: .85rem; font-family: var(--disp); letter-spacing: .04em; }

/* time trials (screens.js tt2 / ttEnd) */
.scr-tt, .scr-ttend, .scr-events, .scr-evend, .scr-clubs { padding: 5.2rem 1rem 1rem; }
.scr-events, .scr-clubs { overflow-y: auto; }
.k3-tt { display: grid; grid-template-columns: minmax(16rem, 24rem) minmax(0, 1fr); gap: 1rem; height: calc(100vh - 7rem); max-width: 72rem; margin: 0 auto; }
.k3-ttl { display: grid; grid-template-rows: auto 1fr; padding: .9rem; min-height: 0; }
.k3-ttls { overflow-y: auto; display: grid; gap: .35rem; align-content: start; padding-right: .2rem; }
.k3-ttr { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .5rem; padding: .55rem .7rem; text-align: left; color: var(--ink); background: rgba(255, 255, 255, .03); border: 1px solid transparent; border-radius: 8px; }
.k3-ttr.on { border-color: var(--cyan); background: rgba(34, 211, 238, .1); }
.k3-ttr .n { display: grid; }
.k3-ttr em { font-style: normal; color: var(--dim, #8fa0c0); font-size: .78rem; }
.k3-ttd { padding: 1.1rem 1.3rem; display: grid; gap: .8rem; align-content: start; overflow-y: auto; }
.k3-ttd .type, .k3-tte .type { color: var(--cyan); font-family: var(--disp); letter-spacing: .08em; text-transform: uppercase; font-size: .85rem; }
.k3-ttd > b.disp { font-size: 2rem; line-height: 1; }
.k3-ttf { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .6rem; }
.k3-ttf span { display: grid; gap: .1rem; padding: .55rem .7rem; background: rgba(255, 255, 255, .04); border-radius: 8px; }
.k3-ttf em { font-style: normal; color: var(--dim, #8fa0c0); font-size: .78rem; }
.k3-ttb { display: grid; gap: .25rem; }
.k3-ttbr { display: grid; grid-template-columns: 2rem 1fr auto 4.6rem; gap: .5rem; align-items: center; padding: .3rem .4rem; border-radius: 6px; }
.k3-ttbr.me { background: rgba(34, 211, 238, .14); }
.k3-tg { font-size: .75rem; padding: .2rem .5rem; border-radius: 6px; border: 1px solid var(--line); background: none; color: var(--dim, #8fa0c0); font-family: var(--disp); letter-spacing: .05em; text-transform: uppercase; }
.k3-tg.on { border-color: var(--cyan); color: var(--cyan); background: rgba(34, 211, 238, .12); }
.k3-ttd .btn.big { justify-self: start; }
.k3-tte { width: min(30rem, 100%); padding: 1.4rem 1.6rem; display: grid; gap: .6rem; }
.k3-tte > b.disp { font-size: 2.6rem; line-height: 1; }
@media (max-width: 760px) { .k3-tt { grid-template-columns: 1fr; height: auto; } .k3-ttls { max-height: 40vh; } }

/* the tour (main.js tour): the thing it is about lit above a dim screen, a bubble beside it */
#tour { position: fixed; inset: 0; z-index: 90; background: rgba(4, 7, 18, .55); }
.k3-tour-on { position: relative; z-index: 91; box-shadow: 0 0 0 3px var(--cyan), 0 0 24px rgba(34, 211, 238, .55) !important; border-radius: 10px; }
.k3-tourb { position: fixed; width: min(18rem, calc(100vw - 24px)); display: grid; gap: .45rem; padding: .9rem 1rem; background: #0f1830; border: 1px solid var(--cyan); border-radius: 10px; box-shadow: 0 .6rem 2rem rgba(0, 0, 0, .5); z-index: 92; }
.k3-tourb .type { color: var(--cyan); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; font-family: var(--disp); }
.k3-tourb b { font-size: 1.05rem; }
.k3-tourb .btn { justify-self: end; }

#tour.tip { background: none; pointer-events: none; }
#tour.tip .k3-tourb { pointer-events: auto; }
.k3-tourc { font-style: normal; color: var(--cyan); font-size: .85rem; font-family: var(--disp); letter-spacing: .05em; text-transform: uppercase; }

/* the offers list over the daylit test track: its header on a panel */
.k3-offers2 .k3-olh { background: rgba(7, 11, 26, .78); padding: .6rem .8rem; border-radius: 10px; }

/* a tour step you do: the dim lets the click reach the lit button (a guard drops the rest) */
#tour.do { pointer-events: none; }
#tour.do .k3-tourb { pointer-events: auto; }

/* race control: every decision listed under the classification (no badges on the rows) */
.res-l { display: flex; flex-direction: column; }
.res-notes { flex: 1; min-height: 0; overflow-y: auto; }
.res-notes .rn.you span b { color: var(--cyan); }
.res-notes .rn span b { font-weight: 700; }

/* the tours' spotlight: a hole in the dark over the target, a pulsing neon ring; the tour box above it */
#tour { background: none !important; pointer-events: none; z-index: 92; }
#tour .k3-tourb { pointer-events: auto; z-index: 93; }
#tourSpot { position: fixed; z-index: 91; border-radius: 12px; pointer-events: none; transition: left .25s, top .25s, width .25s, height .25s;
  box-shadow: 0 0 0 200vmax rgba(2, 5, 14, .74), 0 0 0 3px #22d3ee, 0 0 24px 6px rgba(34, 211, 238, .7); animation: spotPulse 1.3s ease-in-out infinite; }
@keyframes spotPulse { 50% { box-shadow: 0 0 0 200vmax rgba(2, 5, 14, .74), 0 0 0 4px #67e8f9, 0 0 38px 12px rgba(34, 211, 238, .95); } }
.k3-tour-on { box-shadow: none !important; }

/* the tours: a light card with a gold edge, a gold spotlight ring, the thing to click bouncing */
.k3-tourb { background: #fffaf0 !important; color: #0f1f3d; border: 2px solid #f59e0b !important; box-shadow: 0 10px 30px rgba(0, 0, 0, .35), 0 0 0 4px rgba(245, 158, 11, .18); }
.k3-tourb .type, .k3-tourb .k3-tourc { color: #b45309 !important; }
.k3-tourb b { color: #0f1f3d; }
.k3-tourb .btn { background: linear-gradient(180deg, #fbbf24, #f59e0b) !important; color: #0f1f3d !important; border: 0 !important; }
#tourSpot { box-shadow: 0 0 0 200vmax rgba(2, 5, 14, .74), 0 0 0 3px #f59e0b, 0 0 24px 6px rgba(245, 158, 11, .7) !important; animation: spotGold 1.3s ease-in-out infinite !important; }
@keyframes spotGold { 50% { box-shadow: 0 0 0 200vmax rgba(2, 5, 14, .74), 0 0 0 4px #fcd34d, 0 0 38px 12px rgba(245, 158, 11, .95); } }
.k3-bounce { animation: k3Bounce .9s cubic-bezier(.3, 1.6, .5, 1) infinite; }
@keyframes k3Bounce { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-9px) scale(1.04); } }

/* the welcome card can come up over the loading art while the race finishes loading behind it */
#welcome.early { z-index: 101; background: rgba(7, 11, 26, .25); }
#welcome button:disabled { opacity: .85; cursor: progress; }

/* windowed desktop (the portal's page, not full screen): team names wrap instead of cutting off, stat values stay on
   one line, the garage prices stay small */
@media (max-width: 1240px) { .k3-orn b { white-space: normal; font-size: 1.02rem; line-height: 1.05; } .k3-orp em { font-size: 11px; } }
.k3-st b { white-space: nowrap; }
@media (max-width: 1100px) { .kl-garage .sw em { font-size: 9.5px; letter-spacing: -.02em; } }

/* race control rows sit at the top of their column; the radio stays off the results and report screens */
.res-notes { align-content: start; }
body:has(#ui.scr-results) #coach, body:has(#ui.scr-report) #coach { display: none !important; }
/* in-race radio switch: beside the pause button, top right */
#radioBtn { position: absolute; right: 4.9rem; top: 1rem; left: auto; pointer-events: auto; z-index: 3; padding: .45rem .8rem; font-size: .8rem; }
.k3-set .k3-mult { font-style: normal; color: #f59e0b; font-weight: 800; margin-left: .4rem; }
.k3-asst { display: grid; grid-template-columns: auto 1fr; gap: .3rem .6rem; align-items: center; }
.k3-asst > span { font-size: .85rem; opacity: .85; }
/* ---- online events: the season ladder on top, the day's four below */
.k3-ev { display: grid; grid-template-rows: auto 1fr auto; gap: .8rem; height: calc(100vh - 7rem); max-width: 84rem; margin: 0 auto; min-height: 0; }
.k3-evs { display: grid; grid-template-columns: minmax(11rem, 15rem) minmax(0, 1fr) minmax(13rem, 18rem); gap: 1.1rem; align-items: center; padding: .9rem 1.2rem; }
.k3-evst { display: grid; gap: .15rem; }
.k3-evst .type, .k3-evc .type, .k3-eve .type { color: var(--cyan); font-family: var(--disp); letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; }
.k3-evst b.disp { font-size: 2rem; line-height: 1; }
.k3-evsp { display: grid; gap: .35rem; min-width: 0; }
.k3-evsn { display: flex; align-items: baseline; gap: .45rem; }
.k3-evsn b { font-size: 1.6rem; }
.k3-evsn span { color: var(--dim, #8fa0c0); font-size: .85rem; }
.k3-evsp .bar { display: block; height: .5rem; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.k3-evsp .bar > i { display: block; height: 100%; border-radius: inherit; }
.k3-evtiers { display: flex; flex-wrap: wrap; gap: .3rem; }
.k3-evtiers i { font-style: normal; font-size: .72rem; font-weight: 700; padding: .12rem .5rem; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); color: var(--c); opacity: .55; }
.k3-evtiers i.got { opacity: 1; background: color-mix(in srgb, var(--c) 18%, transparent); }
.k3-evsb h5, .k3-evb h5 { margin: 0 0 .25rem; }
.k3-evg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; min-height: 0; }
.k3-evc { display: grid; grid-template-rows: auto auto auto auto 1fr auto auto; gap: .45rem; padding: 1rem 1.05rem; min-height: 0; overflow-y: auto; animation: k3evin .35s ease both; animation-delay: calc(var(--i) * 60ms); }
@keyframes k3evin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.k3-evc > b.disp { font-size: 1.45rem; line-height: 1.05; }
.k3-evc .k3-chips i { font-size: 12px; padding: .15rem .5rem; }
.k3-evbl { min-height: 2.2em; }
.k3-evb { display: grid; gap: .2rem; align-content: start; }
.k3-evr { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr) auto; gap: .45rem; align-items: center; padding: .22rem .35rem; border-radius: 6px; font-size: .9rem; }
.k3-evr .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k3-evr.me { background: rgba(34, 211, 238, .14); }
.k3-evy { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; }
.k3-evy span { display: grid; gap: .05rem; padding: .45rem .6rem; background: rgba(255, 255, 255, .04); border-radius: 8px; }
.k3-evy em { font-style: normal; color: var(--dim, #8fa0c0); font-size: .75rem; }
.k3-evc .btn.big { width: 100%; justify-content: center; }
.k3-evf { text-align: center; }
.k3-evup { display: grid; gap: .15rem; padding: .6rem .8rem; border-radius: 10px; background: rgba(245, 158, 11, .14); border: 1px solid rgba(245, 158, 11, .45); }
.k3-evup b { color: #f59e0b; }
@media (max-width: 1240px) { .k3-evg { grid-template-columns: repeat(2, minmax(0, 1fr)); } .k3-ev { height: auto; } .k3-evc { overflow: visible; } .k3-evs { grid-template-columns: 1fr 1.6fr; } .k3-evsb { grid-column: 1 / -1; } }
@media (max-width: 760px) { .k3-evg, .k3-evs { grid-template-columns: 1fr; } }
/* the endurance clock */
.ev-clock { position: absolute; top: 5.4rem; left: 50%; transform: translateX(-50%); display: grid; justify-items: center; gap: 0; padding: .35rem 1.1rem .45rem; border-radius: 12px; background: rgba(7, 12, 26, .72); border: 1px solid rgba(255, 255, 255, .14); pointer-events: none; }
.ev-clock em { font-style: normal; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; opacity: .75; }
.ev-clock b { font-size: 2.1rem; line-height: 1; }
.ev-clock span { font-size: .75rem; opacity: .8; }
.ev-clock.low b { color: #f87171; }
.k2-tile:not(.soon) em { font-style: normal; font-size: max(.72rem, 12px); opacity: .75; } button.k2-tile { cursor: pointer; font: inherit; }
/* ---- windowed desktop (the portal's embedded frame, ~960x540 to 1400x760): as composed as full screen */
@media (max-height: 640px) and (min-width: 761px) {
  .k3-menu { align-items: center; }
  .k3-mleft { justify-content: center; }
  .k3-brand { display: flex !important; align-items: baseline; gap: .7rem; margin: 0 0 .1rem; }
  .k3-brand .k3-logo { display: flex; gap: .45rem; font-size: 1.8rem !important; line-height: 1; }
  .k3-brand .k3-logo > * { font-size: inherit !important; line-height: 1; display: inline; }
  .k3-brand .k3-tag { font-size: .7rem; }
  .k3-mright { justify-content: center; }
}
@media (max-height: 760px) and (min-width: 900px) {
  .k3-ev { height: calc(100vh - 6.2rem); gap: .55rem; }
  .k3-evs { grid-template-columns: auto minmax(0, 1fr); gap: 1rem; padding: .55rem 1rem; }
  .k3-evst { gap: 0; } .k3-evst b.disp { font-size: 1.35rem; } .k3-evst .dim { display: none; }
  .k3-evsb { display: none; }
  .k3-evsn b { font-size: 1.2rem; } .k3-evtiers i { font-size: .62rem; padding: .05rem .4rem; }
  .k3-evg { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .55rem; }
  .k3-evc { padding: .65rem .7rem; gap: .3rem; overflow-y: auto; grid-template-rows: auto auto auto 1fr auto auto; }
  .k3-evc > b.disp { font-size: 1.05rem; } .k3-evbl { display: none; }
  .k3-evc .k3-chips i { font-size: 11px; padding: .1rem .4rem; }
  .k3-evr { font-size: .78rem; padding: .1rem .25rem; grid-template-columns: 1.2rem minmax(0, 1fr) auto; }
  .k3-evy span { padding: .3rem .45rem; } .k3-evy b { font-size: .85rem; }
  .k3-evc .btn.big { padding: .45rem .6rem; font-size: 1rem; }
  .k3-evf { font-size: .7rem; }
}
/* ---- What's new: the topbar button (a gold dot while a gift waits) and the modal */
.k3-updb { position: relative; font-size: .85rem; padding: .5rem .9rem; margin-right: .5rem; }
.k3-updb.gift { border-color: #f59e0b; color: #f59e0b; }
.k3-updb i { position: absolute; top: -.2rem; right: -.2rem; width: .6rem; height: .6rem; border-radius: 50%; background: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, .25); animation: k3pulse 1.4s ease-in-out infinite; }
@keyframes k3pulse { 50% { box-shadow: 0 0 0 7px rgba(245, 158, 11, 0); } }
.k3-updbox { width: min(40rem, calc(100vw - 2rem)); }
.k3-updbox .mbody { max-height: min(62vh, 34rem); overflow-y: auto; display: grid; gap: 1rem; }
.k3-upd { display: grid; gap: .45rem; }
.k3-upd.old { opacity: .72; border-top: 1px solid var(--line); padding-top: .8rem; }
.k3-updh { display: grid; gap: .1rem; }
.k3-updh .type { color: var(--cyan); font-family: var(--disp); letter-spacing: .08em; text-transform: uppercase; font-size: .78rem; }
.k3-updh b.disp { font-size: 1.4rem; line-height: 1.1; }
.k3-upd ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .2rem; }
.k3-upd ul.next li { color: var(--dim, #8fa0c0); }
.k3-upd h5 { margin: .3rem 0 0; }
.k3-updg { justify-self: start; }
span.k3-updg.got { color: #22c55e; font-weight: 700; font-size: .9rem; }
@media (max-height: 640px) { .k3-updb { padding: .4rem .7rem; font-size: .78rem; } }
/* ---- clubs: the list and founding one; your club's page (Club Cup, drivers, chat) */
.k3-clubs { max-width: 84rem; margin: 0 auto; height: calc(100vh - 7rem); min-height: 0; display: grid; }
.k3-cmsg { display: grid; gap: .4rem; place-content: center; text-align: center; padding: 2.4rem; align-self: center; justify-self: center; max-width: 32rem; }
.k3-cmsg b.disp { font-size: 1.8rem; }
.k3-clubs .k2-go { justify-content: center; }
.k3-ctag { font-style: normal; font-family: var(--disp); font-weight: 700; font-size: .72em; letter-spacing: .06em; padding: .05rem .4rem; border-radius: 4px; background: rgba(245, 158, 11, .16); color: #f59e0b; border: 1px solid rgba(245, 158, 11, .4); vertical-align: middle; }
.k3-cbadge { flex: none; display: block; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .4)); }
.k3-cbrowse { display: grid; grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr); gap: .8rem; min-height: 0; }
.k3-cside { display: flex; flex-direction: column; gap: .7rem; padding: 1.1rem 1.2rem; overflow-y: auto; }
.k3-cside .type, .k3-cht .type { color: var(--cyan); font-family: var(--disp); letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; }
.k3-cside b.disp { font-size: 1.9rem; line-height: 1; }
.k3-cwhy { margin: 0; padding-left: 1.1rem; display: grid; gap: .35rem; font-size: .92rem; }
.k3-cpay { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; }
.k3-cpay span { display: grid; padding: .4rem .6rem; border-radius: 8px; background: rgba(255, 255, 255, .04); }
.k3-cpay em { font-style: normal; color: var(--dim, #8fa0c0); font-size: .75rem; }
.k3-cpay b { color: #f59e0b; }
.k3-cside .btn.big { justify-content: center; margin-top: auto; }
.k3-clist { display: grid; grid-template-rows: auto auto 1fr; gap: .55rem; padding: 1rem 1.1rem; min-height: 0; }
.k3-cfind, .k3-cin { display: flex; gap: .5rem; }
.k3-cfind input, .k3-cin input, .k3-cff input { user-select: text; -webkit-user-select: text; flex: 1; min-width: 0; background: var(--carbon); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: .55rem .7rem; font: inherit; }
.k3-cfind input:focus, .k3-cin input:focus, .k3-cff input:focus { outline: 2px solid var(--cyan); outline-offset: 1px; }
.k3-crows { display: grid; gap: .4rem; align-content: start; overflow-y: auto; min-height: 0; }
.k3-crow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; gap: .8rem; align-items: center; padding: .55rem .7rem; border-radius: 10px; background: rgba(255, 255, 255, .035); border: 1px solid transparent; }
.k3-crow:hover { border-color: var(--line); }
.k3-crow .n { display: grid; min-width: 0; }
.k3-crow .n b, .k3-crow .n em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k3-crow .n em, .k3-cst em, .k3-cht em, .k3-cupn em, .k3-cupn i { font-style: normal; color: var(--dim, #8fa0c0); font-size: .78rem; }
.k3-cst { display: grid; text-align: right; min-width: 3.6rem; }
.k3-cpage { display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: .55rem; min-height: 0; }
.k3-cbody { display: grid; gap: .8rem; min-height: 0; }
.k3-t-home { grid-template-columns: minmax(0, 1fr) minmax(20rem, 1.1fr); }
.k3-chead { display: flex; align-items: center; gap: 1rem; padding: .65rem 1.1rem; }
.k3-cht { display: grid; gap: .1rem; min-width: 0; }
.k3-cht b.disp { font-size: 1.7rem; line-height: 1.05; }
.k3-ccol { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: .8rem; min-height: 0; }
.k3-ccup, .k3-cmem, .k3-cchat { padding: .9rem 1.05rem; display: grid; gap: .55rem; min-height: 0; }
.k3-ccup .btn { justify-self: start; }
.k3-cupn { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; }
.k3-cupn span { display: grid; padding: .5rem .65rem; border-radius: 8px; background: rgba(255, 255, 255, .04); }
.k3-cupn b { font-size: 1.5rem; line-height: 1.1; }
.k3-cmem { grid-template-rows: auto minmax(0, 1fr); }
.k3-cms { display: grid; gap: .2rem; align-content: start; overflow-y: auto; min-height: 0; }
.k3-cm { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr) auto auto; gap: .5rem; align-items: center; padding: .25rem .4rem; border-radius: 6px; font-size: .92rem; }
.k3-cm .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k3-cm.me { background: rgba(34, 211, 238, .14); }
.k3-cm .btn.small { padding: .1rem .5rem; min-height: 0; }
.k3-clead { font-style: normal; font-size: .7rem; font-weight: 700; color: #f59e0b; }
.k3-cchat { grid-template-rows: auto minmax(0, 1fr) auto auto; }
.k3-chatl { display: flex; flex-direction: column; gap: .3rem; overflow-y: auto; min-height: 6rem; padding-right: .2rem; }
.k3-chat0 { margin: auto; }
.k3-cl { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: .5rem; align-items: baseline; padding: .3rem .5rem; border-radius: 8px; background: rgba(255, 255, 255, .035); font-size: .92rem; }
.k3-cl b { color: var(--cyan); white-space: nowrap; }
.k3-cl.me { background: rgba(34, 211, 238, .1); }
.k3-cl.me b { color: #f59e0b; }
.k3-cl span { overflow-wrap: anywhere; }
.k3-cl em { font-style: normal; color: var(--dim, #8fa0c0); font-size: .72rem; }
.k3-cl .link { opacity: .45; font-size: .72rem; }
.k3-cl:hover .link { opacity: 1; }
.k3-quick { display: flex; flex-wrap: wrap; gap: .3rem; }
.k3-quick .btn.small { padding: .2rem .55rem; font-size: .78rem; min-height: 0; }
.k3-cformbox { max-width: 40rem; }
.k3-cform { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 1.1rem; align-items: start; }
.k3-cfp { display: grid; justify-items: center; gap: .35rem; text-align: center; padding-top: .4rem; }
.k3-cfp b { overflow-wrap: anywhere; }
.k3-cff { display: grid; gap: .55rem; }
.k3-cff label { display: grid; gap: .2rem; font-size: .82rem; color: var(--dim, #8fa0c0); }
.k3-cff h5 { margin: .2rem 0 0; }
.k3-csws, .k3-cembs { display: flex; flex-wrap: wrap; gap: .35rem; }
.k3-csw { width: 1.9rem; height: 1.9rem; border-radius: 6px; border: 2px solid transparent; cursor: pointer; padding: 0; }
.k3-cemb { background: rgba(255, 255, 255, .04); border: 2px solid transparent; border-radius: 8px; padding: .15rem; cursor: pointer; }
.k3-csw.on, .k3-cemb.on { border-color: #f59e0b; }
.k3-cerr { color: #ff6b5e; margin: 0; font-weight: 600; }
/* the club page: text at least 12 px at every desktop size */
.k3-cpage .k3-cupn em, .k3-cpage .k3-cupn i, .k3-cpage .k3-cht em, .k3-cpage .k3-cl em, .k3-cpage .k3-cl .link, .k3-cpage .k3-clead { font-size: max(.75rem, 12px); }
.k3-cpage .k3-cm, .k3-cpage .k3-cl { font-size: max(.92rem, 12px); }
.k3-cpage .k3-quick .btn.small { font-size: max(.78rem, 12px); }
.k3-cpage .k3-cht .type { font-size: max(.8rem, 12px); }
.k3-cpage .k3-ctag { font-size: max(.72em, 12px); }
.k3-cbrowse .k3-crow .n em, .k3-cbrowse .k3-cst em, .k3-cbrowse .k3-cpay em, .k3-cbrowse .k3-cside .type { font-size: max(.78rem, 12px); }
.k3-cbrowse .k3-cwhy { font-size: max(.88rem, 12px); }
/* the club page: level, treasury, tabs (Overview, War, Turf, Kart, Donations, Rewards) */
.k3-clvl { display: flex; align-items: center; gap: .8rem; min-width: 0; margin-left: .4rem; }
.k3-lvn { display: grid; place-items: center; align-content: center; gap: .2rem; width: 3.4rem; height: 3.6rem; border-radius: 12px; background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25), 0 .3rem .8rem rgba(0, 0, 0, .35); text-shadow: 0 1px 3px rgba(0, 0, 0, .7); line-height: 1; flex: none; }
.k3-lvn em { font-style: normal; font-size: max(.62rem, 12px); text-transform: uppercase; letter-spacing: .06em; }
.k3-lvn b { font-size: 1.7rem; }
.k3-lvb { display: grid; gap: .25rem; width: clamp(8rem, 14vw, 13rem); }
.k3-lvb .bar { height: .55rem; } .k3-lvb .bar > i { background: linear-gradient(90deg, #f59e0b, #ffd23f); }
.k3-lvb em, .k3-cbank em { font-style: normal; color: var(--muted); font-size: max(.78rem, 12px); }
.k3-cbank { display: grid; padding-left: .8rem; border-left: 1px solid var(--line); }
.k3-cbank b { color: #f59e0b; font-size: 1.25rem; }
.k3-ctabs { display: flex; gap: .4rem; }
.k3-ctabs button { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem 1rem; border-radius: 10px; border: 1px solid var(--line); background: rgba(15, 23, 48, .9); color: var(--muted); font-family: var(--disp); font-weight: 700; font-size: max(1.05rem, 13px); letter-spacing: .05em; text-transform: uppercase; cursor: pointer; transition: color .12s, border-color .12s, background .12s; }
.k3-ctabs button svg { width: 1.15rem; height: 1.15rem; flex: none; }
.k3-ctabs button:hover { color: var(--ink); border-color: #3a4a80; }
.k3-ctabs button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.k3-ctabs button.on { color: #fff; background: linear-gradient(180deg, rgba(34, 211, 238, .22), rgba(30, 107, 255, .2)); border-color: var(--cyan); box-shadow: inset 0 -3px 0 var(--c2, #f59e0b); }
.k3-ctabs button.on svg { color: var(--c2, #f59e0b); }
.k3-ctitle { font-style: normal; font-size: max(.72rem, 12px); font-weight: 700; letter-spacing: .02em; color: #d8ccff; padding: 0 .4rem; border-radius: 4px; background: rgba(124, 77, 255, .22); border: 1px solid rgba(160, 130, 255, .4); white-space: nowrap; }
.av.k3-frame { box-shadow: 0 0 0 2px var(--f1), 0 0 0 4px var(--f2), 0 .2rem .6rem rgba(0, 0, 0, .4); }
.k3-kartsvg { display: block; }
.k3-cbody > .k3-cmsg { grid-column: 1 / -1; }
/* Kart */
.k3-t-kart { grid-template-columns: minmax(0, 1.25fr) minmax(19rem, 1fr); }
.k3-ckstage { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; min-height: 0; pointer-events: none; }
.k3-ckplate { display: grid; text-align: center; gap: .1rem; padding: .5rem 1.2rem; }
.k3-ckplate b { font-size: 1.6rem; line-height: 1; } .k3-ckplate em { font-style: normal; color: var(--muted); font-size: max(.85rem, 12px); }
.k3-ckside { display: grid; gap: .5rem; align-content: start; padding: .9rem 1.05rem; overflow-y: auto; min-height: 0; }
.k3-ckside .k2-h .mono { color: #f59e0b; }
.k3-ckt { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .7rem; padding: .4rem .65rem; border-radius: 10px; background: rgba(255, 255, 255, .035); border: 1px solid transparent; }
.k3-ckt.on { border-color: var(--cyan); background: rgba(34, 211, 238, .08); }
.k3-ckp { background: none; border: 0; padding: 0; cursor: pointer; border-radius: 8px; }
.k3-ckp:focus-visible { outline: 2px solid var(--cyan); }
.k3-ckn { display: grid; min-width: 0; } .k3-ckn b { font-family: var(--disp); font-size: 1.2rem; letter-spacing: .03em; text-transform: uppercase; }
.k3-ckn em, .k3-ckst { font-style: normal; color: var(--muted); font-size: max(.8rem, 12px); }
.k3-ckt.own .k3-ckn em { color: var(--good); }
.k3-ckst { text-align: right; max-width: 9rem; } .k3-ckst.lock { color: #ffb02e; }
.k3-cknext { display: grid; gap: .35rem; padding: .6rem .7rem; border-radius: 10px; border: 1px dashed #34437a; }
.k3-cknext .type { color: var(--cyan); font-family: var(--disp); letter-spacing: .08em; text-transform: uppercase; font-size: max(.8rem, 12px); }
.k3-cknext .btn { justify-self: start; }
.k3-ckbar { display: grid; grid-template-columns: 6.2rem minmax(0, 1fr) auto; gap: .55rem; align-items: center; }
.k3-ckbar em { font-style: normal; color: var(--muted); font-size: max(.8rem, 12px); } .k3-ckbar b { font-size: max(.85rem, 12px); }
.k3-ckbar .bar { height: .5rem; } .k3-ckbar .bar > i { background: linear-gradient(90deg, var(--c1, #f59e0b), var(--c2, #ffd23f)); }
.k3-dsave { display: flex; align-items: center; gap: .8rem; padding: .45rem .6rem; border-radius: 10px; background: rgba(255, 255, 255, .04); }
.k3-dsave .k3-ckbar { flex: 1; grid-template-columns: minmax(0, 1fr) auto; } .k3-dsave .k3-ckbar em { grid-column: 1 / -1; }
/* Donations */
.k3-t-don { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
.k3-dgive, .k3-dtop, .k3-dlog { padding: .9rem 1.05rem; display: grid; gap: .55rem; min-height: 0; align-content: start; }
.k3-dtop, .k3-dlog { grid-template-rows: auto minmax(0, 1fr); }
.k3-dlog { grid-column: 2; grid-row: 1 / 3; }
.k3-dbank { display: flex; align-items: center; gap: 1.2rem; }
.k3-dbank svg { width: 2.6rem; height: 2.6rem; color: #f59e0b; flex: none; filter: drop-shadow(0 2px 6px rgba(245, 158, 11, .35)); }
.k3-dbank span { display: grid; } .k3-dbank em { font-style: normal; color: var(--muted); font-size: max(.8rem, 12px); }
.k3-dbank b { font-size: 1.7rem; line-height: 1.1; } .k3-dbank span:nth-child(2) b { color: #f59e0b; }
.k3-dsteps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.k3-dsteps .btn { font-size: 1.3rem; padding: .55rem .5rem; }
.k3-dsteps .btn[disabled] { opacity: .45; cursor: not-allowed; }
.k3-dday { display: grid; gap: .25rem; } .k3-dday .bar { height: .5rem; } .k3-dday .bar > i { background: #f59e0b; }
.k3-dday em { font-style: normal; color: var(--muted); font-size: max(.8rem, 12px); }
.k3-dtl, .k3-dls { display: grid; gap: .25rem; align-content: start; overflow-y: auto; min-height: 0; }
.k3-dt { display: grid; grid-template-columns: 1.4rem minmax(0, 1fr) 32% 4.2rem; gap: .5rem; align-items: center; font-size: max(.92rem, 12px); }
.k3-dt .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .k3-dt b { text-align: right; color: #f59e0b; }
.k3-dt:first-child > span:first-child { color: var(--flagy); font-weight: 700; }
.k3-dt .bar { height: .45rem; } .k3-dt .bar > i { background: linear-gradient(90deg, var(--c1, #f59e0b), var(--c2, #ffd23f)); }
.k3-dl { display: grid; grid-template-columns: minmax(0, 1fr) auto 3.4rem; gap: .5rem; align-items: baseline; padding: .28rem .5rem; border-radius: 8px; background: rgba(255, 255, 255, .035); font-size: max(.9rem, 12px); }
.k3-dl b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; } .k3-dl span { color: var(--good); }
.k3-dl em { font-style: normal; color: var(--muted); font-size: max(.75rem, 12px); text-align: right; }
.k3-dl.buy b { color: var(--cyan); } .k3-dl.buy span { color: #ff8a5e; }
/* War and Turf (v3.23): the road card, the standings, the duels, the lineup */
.k3-t-war { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, .95fr); }
.k3-t-turf { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.15fr) minmax(0, .8fr); }
.k3-wroad, .k3-wstand, .k3-wtop, .k3-troad, .k3-tduel, .k3-tline { padding: .85rem 1rem; display: grid; gap: .55rem; min-height: 0; align-content: start; }
.k3-wroad, .k3-troad { overflow-y: auto; background: linear-gradient(160deg, color-mix(in srgb, var(--c1, #1e4da1) 30%, transparent), rgba(15, 23, 48, .82) 55%); }
.k3-wstand { grid-template-rows: auto auto minmax(0, 1fr) auto; }
.k3-wtop { grid-template-rows: auto minmax(0, 1.3fr) auto minmax(0, 1fr); }
.k3-tduel { grid-template-rows: auto minmax(0, 1fr); }
.k3-tline { grid-template-rows: auto minmax(0, 1fr) auto; }
.k3-road { display: grid; grid-template-columns: 5.2rem minmax(0, 1fr); gap: .8rem; align-items: center; }
.k3-roadm { display: grid; place-items: center; width: 5.2rem; height: 4.4rem; border-radius: 12px; background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .1); padding: .35rem; }
.k3-roadm svg { width: 100%; height: 100%; display: block; }
.k3-roadt { display: grid; gap: .15rem; min-width: 0; }
.k3-roadt .type { color: var(--c2, #f59e0b); font-family: var(--disp); letter-spacing: .08em; text-transform: uppercase; font-size: max(.8rem, 12px); }
.k3-roadt b.disp { font-size: 1.55rem; line-height: 1.05; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k3-roadt .k3-chips { margin: .1rem 0 0; gap: .3rem; } .k3-roadt .k3-chips i { font-size: 12px; padding: .12rem .5rem; }
.k3-wleft { display: inline-flex; align-items: center; gap: .35rem; color: var(--muted); font-size: max(.85rem, 12px); }
.k3-wleft svg { width: 15px; height: 15px; color: var(--cyan); flex: none; } .k3-wleft b { color: var(--ink); }
.k3-wme { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
.k3-wme > span { display: grid; padding: .4rem .6rem; border-radius: 9px; background: rgba(255, 255, 255, .05); }
.k3-wme em { font-style: normal; color: var(--muted); font-size: max(.75rem, 12px); } .k3-wme b { font-size: 1.25rem; line-height: 1.15; }
.k3-wme.none { grid-template-columns: 1fr; } .k3-wme.none > span { grid-template-columns: auto minmax(0, 1fr); column-gap: .6rem; align-items: center; border: 1px dashed #3a4a80; background: rgba(34, 211, 238, .05); }
.k3-wme.none svg { width: 1.6rem; height: 1.6rem; color: var(--cyan); grid-row: 1 / 3; } .k3-wme.none b { font-size: 1.05rem; }
.k3-gold { color: #f59e0b; }
.k3-wroad .k2-go, .k3-troad .k2-go { display: flex; align-items: center; gap: .7rem; margin: 0; justify-content: flex-start; flex-wrap: wrap; }
.k3-wroad .k2-go .btn.big, .k3-troad .k2-go .btn.big { padding: .5rem 1.4rem; font-size: 1.15rem; }
.k3-wpay2 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .3rem; }
.k3-wpay2 span { display: grid; justify-items: center; text-align: center; padding: .3rem .2rem; border-radius: 8px; background: rgba(255, 255, 255, .04); border: 1px solid transparent; min-width: 0; }
.k3-wpay2 span.on { border-color: #f59e0b; background: rgba(245, 158, 11, .12); }
.k3-wpay2 em { font-style: normal; color: var(--muted); font-size: 12px; white-space: nowrap; } .k3-wpay2 b { font-size: max(.85rem, 12px); color: var(--cyan); }
.k3-wpay2 i { font-style: normal; font-size: max(.85rem, 12px); color: #f59e0b; font-weight: 700; }
.k3-tpay { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.k3-wcap { color: var(--muted); font-size: max(.8rem, 12px); margin-bottom: -.25rem; } .k3-wcap b { color: var(--cyan); font-weight: 600; } .k3-wcap i { font-style: normal; color: #f59e0b; }
.k3-wlast2 { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: .55rem; align-items: center; padding: .45rem .6rem; border-radius: 10px; background: rgba(0, 0, 0, .22); border: 1px solid var(--line); }
.k3-wlast2 .type { color: var(--muted); font-family: var(--disp); letter-spacing: .06em; text-transform: uppercase; font-size: 12px; }
.k3-wlast2 .n { display: grid; min-width: 0; } .k3-wlast2 .n b, .k3-wlast2 .n em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k3-wlast2 .n em, .k3-wlast2 > em { font-style: normal; color: var(--muted); font-size: 12px; }
.k3-wlast2 .btn.small { padding: .25rem .7rem; animation: k3hop 2.2s ease-in-out infinite; }
.k3-paid { color: var(--good); font-weight: 700; font-size: max(.85rem, 12px); }
.k3-wpl { font-family: var(--disp); font-weight: 800; font-size: 1.3rem; padding: .05rem .45rem; border-radius: 6px; background: rgba(255, 255, 255, .08); }
.k3-wpl.p1 { background: linear-gradient(135deg, #f59e0b, #ffd23f); color: #1b1f24; } .k3-wpl.p2 { background: linear-gradient(135deg, #cbd5e1, #f1f5f9); color: #1b1f24; } .k3-wpl.p3 { background: linear-gradient(135deg, #c9814a, #e0a878); color: #1b1f24; }
.k3-wch, .k3-wc { display: grid; grid-template-columns: 1.5rem 26px minmax(0, 1fr) 2.6rem 3.4rem; gap: .45rem; align-items: center; }
.k3-wch { color: var(--muted); font-size: 12px; padding: 0 .4rem; } .k3-wch em, .k3-wch b { font-style: normal; font-weight: 400; text-align: right; }
.k3-wcs { display: grid; gap: .2rem; align-content: start; overflow-y: auto; min-height: 0; }
.k3-wc { padding: .2rem .4rem; border-radius: 7px; background: rgba(255, 255, 255, .035); font-size: max(.9rem, 12px); }
.k3-wc .k3-cbadge { width: 26px; height: 26px; }
.k3-wc .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .k3-wc em { font-style: normal; color: var(--muted); text-align: right; } .k3-wc b { text-align: right; color: #f59e0b; }
.k3-wc.me { background: rgba(34, 211, 238, .14); box-shadow: inset 3px 0 0 var(--cyan); }
.k3-wcs .k3-wc:nth-child(1) .k3-wcp { color: #ffd23f; font-weight: 800; } .k3-wcs .k3-wc:nth-child(2) .k3-wcp { color: #e2e8f0; font-weight: 800; } .k3-wcs .k3-wc:nth-child(3) .k3-wcp { color: #e0a878; font-weight: 800; }
.k3-wbar { height: .4rem; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; } .k3-wbar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--c1, #f59e0b), var(--c2, #ffd23f)); }
.k3-wtop .k3-dt { grid-template-columns: 1.4rem minmax(0, 1fr) auto 2rem; }
.k3-wtop .k3-dt em { font-style: normal; color: var(--muted); font-size: max(.85rem, 12px); }
.k3-dt.me .n { color: #f59e0b; font-weight: 700; }
/* turf */
.k3-tst { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .65rem; align-items: center; padding: .55rem .7rem; border-radius: 10px; border: 1px dashed #3a4a80; background: rgba(34, 211, 238, .06); }
.k3-tst.wait { border-color: rgba(245, 158, 11, .6); background: rgba(245, 158, 11, .08); }
.k3-tst > span:last-child { display: grid; min-width: 0; } .k3-tst em { font-style: normal; color: var(--muted); font-size: max(.82rem, 12px); }
.k3-tic svg { width: 1.8rem; height: 1.8rem; color: var(--cyan); display: block; } .k3-tst.wait .k3-tic svg { color: #f59e0b; animation: k3pulse 1.6s ease-in-out infinite; }
.k3-tvs { display: grid; grid-template-columns: auto auto auto auto auto; justify-content: center; align-items: center; gap: .7rem; padding: .3rem; border-radius: 12px; background: rgba(0, 0, 0, .25); }
.k3-tvs .disp { color: var(--muted); font-size: 1.2rem; } .k3-tsc { font-size: 2rem; line-height: 1; } .k3-tsc.up { color: #4be39a; }
.k3-tvn { grid-column: 1 / -1; text-align: center; font-weight: 700; font-size: max(.85rem, 12px); } .k3-tvn em { font-style: normal; color: var(--muted); }
.k3-dus { display: grid; gap: .22rem; align-content: start; overflow-y: auto; min-height: 0; }
.k3-du { display: grid; grid-template-columns: 1.3rem minmax(0, 1fr) 4.4rem 1.2rem 4.4rem minmax(0, 1fr); gap: .4rem; align-items: center; padding: .24rem .45rem; border-radius: 7px; background: rgba(255, 255, 255, .035); font-size: max(.88rem, 12px); }
.k3-du .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .k3-du .n.b { text-align: right; } .k3-du em { font-style: normal; text-align: center; color: var(--muted); }
.k3-du.w { background: linear-gradient(90deg, rgba(34, 208, 122, .2), rgba(255, 255, 255, .03) 60%); } .k3-du.w .n.a, .k3-du.w em:nth-of-type(1) { color: #4be39a; font-weight: 700; }
.k3-du.l { background: linear-gradient(270deg, rgba(229, 57, 43, .2), rgba(255, 255, 255, .03) 60%); } .k3-du.l .n.b, .k3-du.l em:nth-of-type(2) { color: #ff8a7e; font-weight: 700; }
.k3-dum { font-style: normal; text-align: center; color: var(--muted); } .k3-du.w .k3-dum { color: #4be39a; } .k3-du.l .k3-dum { color: #ff8a7e; }
.k3-tpks { display: grid; gap: .22rem; align-content: start; overflow-y: auto; min-height: 0; }
.k3-tpk { display: grid; grid-template-columns: 1.4rem minmax(0, 1fr); gap: .5rem; align-items: center; padding: .24rem .45rem; border-radius: 7px; background: rgba(255, 255, 255, .035); border: 1px solid transparent; color: var(--ink); font: 600 max(.88rem, 12px) / 1.2 var(--body); text-align: left; }
button.k3-tpk { cursor: pointer; } button.k3-tpk:hover { border-color: #3a4a80; } button.k3-tpk:focus-visible { outline: 2px solid var(--cyan); }
.k3-tpk .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k3-tbox { display: grid; place-content: center; width: 1.3rem; height: 1.3rem; border-radius: 5px; border: 2px solid #3a4a80; font-style: normal; font-size: 12px; font-weight: 800; color: #1b1f24; }
.k3-tpk.on { border-color: var(--cyan); background: rgba(34, 211, 238, .1); } .k3-tpk.on .k3-tbox, .k3-tpk.ro .k3-tbox { background: var(--cyan); border-color: var(--cyan); }
.k3-tline .k2-go { margin: 0; justify-content: stretch; } .k3-tline .k2-go .btn { flex: 1; }
.k3-tline .k2-go .btn[disabled] { opacity: .5; cursor: not-allowed; }
.k3-wr { font-family: var(--disp); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; text-align: center; font-size: max(.85rem, 12px); padding: .12rem .4rem; border-radius: 5px; background: rgba(255, 255, 255, .08); color: var(--muted); white-space: nowrap; }
.k3-wr.w { background: rgba(34, 208, 122, .2); color: #4be39a; } .k3-wr.l { background: rgba(229, 57, 43, .2); color: #ff7a6e; } .k3-wr.d { background: rgba(255, 210, 63, .18); color: var(--flagy); } .k3-wr.n { background: rgba(30, 155, 255, .14); color: #8fc8ff; }
/* the "?" help */
.k3-chelp { width: 2.1rem; padding: .3rem 0 !important; font-weight: 800; font-size: 1.05rem !important; border-color: rgba(34, 211, 238, .55); color: var(--cyan); }
.k3-helpbox { max-width: 46rem; }
.k3-help { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem 1rem; }
.k3-hs { padding: .6rem .75rem; border-radius: 10px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.k3-hs > b { display: flex; align-items: center; gap: .45rem; font-family: var(--disp); text-transform: uppercase; letter-spacing: .05em; color: var(--c2, #f59e0b); }
.k3-hs svg { width: 1.1rem; height: 1.1rem; color: var(--cyan); }
.k3-hs ul { margin: .35rem 0 0; padding-left: 1.05rem; display: grid; gap: .15rem; font-size: max(.86rem, 12px); }
@media (max-width: 760px) { .k3-help { grid-template-columns: 1fr; } }
@media (max-width: 1100px) { .k3-t-war { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr) minmax(0, .92fr); } .k3-road { grid-template-columns: 3.6rem minmax(0, 1fr); gap: .55rem; } .k3-roadm { width: 3.6rem; height: 3.2rem; } .k3-roadt b.disp { font-size: 1.25rem; } .k3-du { grid-template-columns: 1.1rem minmax(0, 1fr) 3.9rem 1rem 3.9rem minmax(0, 1fr); gap: .3rem; } .k3-wch, .k3-wc { grid-template-columns: 1.3rem 22px minmax(0, 1fr) 3rem 2.9rem; gap: .3rem; } .k3-wc .k3-cbadge { width: 22px; height: 22px; } }
@media (max-height: 600px) {
  .k3-wroad, .k3-wstand, .k3-wtop, .k3-troad, .k3-tduel, .k3-tline { padding: .5rem .7rem; gap: .38rem; }
  .k3-roadm { width: 3.2rem; height: 2.8rem; padding: .2rem; } .k3-road { grid-template-columns: 3.2rem minmax(0, 1fr); gap: .5rem; } .k3-roadt b.disp { font-size: 1.15rem; }
  .k3-wme > span { padding: .25rem .45rem; } .k3-wme b { font-size: 1.05rem; } .k3-wme.none em { display: none; }
  .k3-wroad .k2-go .dim, .k3-troad .k2-go .dim { display: none; } .k3-wroad .k2-go .btn.big, .k3-troad .k2-go .btn.big { padding: .3rem 1.1rem; font-size: 1rem; }
  .k3-wpay2 span { padding: .15rem .15rem; } .k3-wlast2 { padding: .3rem .5rem; } .k3-tst { padding: .35rem .55rem; } .k3-tst em { display: none; } .k3-tic svg { width: 1.4rem; height: 1.4rem; }
  .k3-tsc { font-size: 1.5rem; } .k3-tvs .k3-cbadge { width: 30px; height: 30px; } .k3-tvs { gap: .5rem; padding: .15rem; }
  .k3-du, .k3-tpk, .k3-wc { padding: .14rem .4rem; } }
/* Rewards */
.k3-t-rew { grid-template-columns: minmax(15rem, 19rem) minmax(0, 1fr); }
.k3-rme { display: grid; justify-items: center; align-content: start; gap: .5rem; text-align: center; padding: 1rem 1.05rem; overflow-y: auto; min-height: 0; }
.k3-rring { position: relative; width: 6.4rem; height: 6.4rem; border-radius: 50%; display: grid; place-content: center; justify-items: center; line-height: 1; background: conic-gradient(#f59e0b calc(var(--f) * 1%), rgba(255, 255, 255, .1) 0); }
.k3-rring::before { content: ""; position: absolute; inset: .45rem; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--c1), #0b1228 75%); box-shadow: inset 0 0 0 2px var(--c2); }
.k3-rring b, .k3-rring em { position: relative; } .k3-rring b { font-size: 2.6rem; text-shadow: 0 2px 4px rgba(0, 0, 0, .6); }
.k3-rring em { font-style: normal; font-size: max(.7rem, 12px); text-transform: uppercase; letter-spacing: .08em; }
.k3-rxp { color: #f59e0b; font-weight: 700; }
.k3-rhow { list-style: none; margin: .2rem 0 0; padding: 0; display: grid; gap: .3rem; text-align: left; width: 100%; font-size: max(.85rem, 12px); }
.k3-rhow li { display: flex; align-items: center; gap: .5rem; padding: .3rem .5rem; border-radius: 8px; background: rgba(255, 255, 255, .04); }
.k3-rhow svg { width: 1.1rem; height: 1.1rem; flex: none; color: var(--cyan); }
.k3-rlist { padding: .9rem 1.05rem; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: .55rem; min-height: 0; }
.k3-rls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(5, minmax(min-content, 4.4rem)); grid-auto-flow: column; gap: .35rem .6rem; align-content: start; overflow-y: auto; min-height: 0; }
.k3-rl { display: grid; grid-template-columns: 2.1rem minmax(0, 1fr) auto; align-items: center; gap: .55rem; padding: .35rem .5rem; border-radius: 10px; background: rgba(255, 255, 255, .03); border: 1px solid transparent; }
.k3-rl:not(.got) { opacity: .7; } .k3-rl.got { background: rgba(34, 211, 238, .06); } .k3-rl.cur { border-color: var(--cyan); }
.k3-rln { width: 2.1rem; height: 2.1rem; border-radius: 50%; display: grid; place-content: center; font-family: var(--disp); font-size: 1.15rem; background: var(--line); color: var(--muted); }
.k3-rl.got .k3-rln { background: linear-gradient(135deg, var(--c1), var(--c2)); color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .3); }
.k3-rli { display: flex; flex-wrap: wrap; gap: .3rem; min-width: 0; }
.k3-rw { display: inline-flex; align-items: center; gap: .35rem; padding: .22rem .55rem; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); color: var(--ink); font: 600 max(.82rem, 12px) / 1.2 var(--body); }
.k3-rw svg { width: 14px; height: 14px; flex: none; color: var(--cyan); }
.k3-rl:not(.got) .k3-rw svg { color: var(--muted); }
.k3-rw em { font-style: normal; font-family: var(--disp); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: 12px; color: var(--cyan); }
button.k3-rw { cursor: pointer; } button.k3-rw:hover { border-color: var(--cyan); } button.k3-rw:focus-visible { outline: 2px solid var(--cyan); outline-offset: 1px; }
.k3-rw.on { background: rgba(245, 158, 11, .18); border-color: #f59e0b; } .k3-rw.on em { color: #f59e0b; }
.k3-rlx { font-style: normal; color: var(--muted); font-size: 12px; }
@media (max-height: 760px) { .k3-clubs { height: calc(100vh - 6.2rem); } .k3-cside { gap: .5rem; padding: .8rem .9rem; } .k3-cside b.disp { font-size: 1.5rem; } .k3-cwhy { font-size: .84rem; gap: .2rem; } .k3-chead { padding: .55rem .9rem; } .k3-cupn b { font-size: 1.25rem; } }
/* windowed desktop sizes: the same layout, tighter */
@media (max-width: 1100px) { .k3-cht em { display: none; } .k3-cbank { display: none; } .k3-ctabs button { padding: .4rem .75rem; } .k3-t-home { grid-template-columns: minmax(0, 1fr) minmax(17rem, 1.1fr); } .k3-t-kart { grid-template-columns: minmax(0, 1fr) minmax(19rem, 1.15fr); } .k3-t-rew { grid-template-columns: minmax(13rem, 15rem) minmax(0, 1fr); } }
@media (max-height: 600px) { .k3-chead { padding: .4rem .8rem; gap: .7rem; } .k3-chead .k3-cbadge { width: 40px; height: 40px; } .k3-cht b.disp { font-size: 1.35rem; } .k3-cht .type { font-size: max(.7rem, 12px); } .k3-cht em { display: none; } .k3-lvn { width: 2.9rem; height: 3rem; gap: .1rem; } .k3-lvn b { font-size: 1.3rem; } .k3-ctabs button { padding: .3rem .7rem; } .k3-cpage { gap: .45rem; } .k3-cbody { gap: .6rem; }
  .k3-ccup, .k3-cmem, .k3-cchat, .k3-ckside, .k3-dgive, .k3-dtop, .k3-dlog, .k3-wnowc, .k3-wlast, .k3-rme, .k3-rlist { padding: .55rem .75rem; gap: .4rem; }
  .k3-ckt { padding: .25rem .5rem; } .k3-ckt .k3-kartsvg { width: 72px; height: 30px; } .k3-ckside > .dim { display: none; } .k3-cknext { padding: .4rem .6rem; gap: .25rem; }
  .k3-wbest, .k3-wlast { padding: .55rem .75rem; gap: .4rem; } .k3-dsave { padding: .3rem .5rem; } .k3-dsave .k3-kartsvg { width: 56px; height: 24px; }
  .k3-dbank b { font-size: 1.35rem; } .k3-dbank svg { width: 2rem; height: 2rem; } .k3-dgive > .dim { display: none; } .k3-dsteps .btn { font-size: 1.1rem; padding: .35rem .4rem; }
  .k3-wsc { font-size: 1.8rem; } .k3-wside .k3-cbadge { width: 46px; height: 46px; } .k3-wvs { padding: 0; } .k3-wpay span { padding: .3rem .5rem; }
  .k3-rring { width: 4.8rem; height: 4.8rem; } .k3-rring b { font-size: 2rem; } .k3-rme > .dim:last-child { display: none; } .k3-rhow li { padding: .2rem .45rem; } .k3-rl { padding: .22rem .45rem; } .k3-rln { width: 1.8rem; height: 1.8rem; font-size: 1rem; } .k3-rw { padding: .12rem .45rem; } }
@media (max-width: 760px) { .k3-clubs { height: auto; } .k3-cbrowse, .k3-cbody { grid-template-columns: 1fr !important; } .k3-dlog { grid-column: auto; grid-row: auto; } .k3-ckstage { min-height: 12rem; } .k3-rls { grid-template-columns: 1fr; grid-auto-flow: row; grid-template-rows: none; } .k3-chatl { max-height: 40vh; } .k3-crow { grid-template-columns: auto minmax(0, 1fr) auto; } .k3-crow .k3-cst { display: none; } .k3-cform { grid-template-columns: 1fr; } .k3-clvl .k3-lvb { display: none; } .k3-ctabs { overflow-x: auto; } }

/* the kart panel (bottom left): diagram + temp / tyre life / stops; what is broken, in words, sits above it */
.h3-kart { width: 236px; padding: 0; display: flex; flex-direction: column; gap: 6px; background: none; border: 0; box-shadow: none; }
.h3-main { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px 12px 8px 10px; }
.h3-svg svg { width: 3rem; height: 4.2rem; display: block; }
.h3-svg svg [data-p] { fill: #33447a; transition: fill .3s; }
.h3-svg svg .core { fill: #162143; }
.h3-stats { display: grid; gap: 3px; min-width: 0; }
.h3-stats .myc-row { font-size: 15.5px; align-items: center; }
.h3-stats .myc-row b { display: inline-flex; align-items: center; gap: 5px; }
.h3-stats em { font-style: normal; }
.h3-stats em.cold { color: #5ec8ff; } .h3-stats em.ok { color: #3ccf7a; } .h3-stats em.hot, .h3-stats em.gone { color: #ff6a3d; } .h3-stats em.worn { color: #ff8a1f; }
.h3-stats .tw { display: inline-block; width: 28px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.h3-stats .tw i { display: block; height: 100%; border-radius: 3px; background: #3ccf7a; }
.h3-stats .tw i.worn { background: #ff8a1f; } .h3-stats .tw i.gone { background: #e5392b; }
.h3-stats .tt { margin-right: 0; }
.h3-broke { padding: 6px 10px; display: grid; }
.h3-broke span { display: grid; gap: 2px; }
.h3-broke b { font-size: 15.5px; font-weight: 600; line-height: 1.2; color: #d4dae1; }
.h3-broke b.s1 { color: #ffd23f; } .h3-broke b.s2 { color: #ff8a1f; } .h3-broke b.s3 { color: #ff6a5a; }
.hud2.is-touch .h3-kart { width: 190px; padding: 0; }
.hud2.is-touch .h3-main { grid-template-columns: 2.1rem minmax(0, 1fr); gap: 7px; padding: 5px 8px; }
.hud2.is-touch .h3-svg svg { width: 2.1rem; height: 2.9rem; }
.hud2.is-touch .h3-broke b:nth-child(n+3) { display: none; }
@media (max-height: 460px) { .h3-broke b:nth-child(n+2) { display: none; } .h3-svg svg { width: 2.3rem; height: 3.2rem; } .h3-main { grid-template-columns: 2.3rem minmax(0, 1fr); } }

/* the global chat: a Chat button in the home topbar opens a popup docked under it on the right */
.k3-chatb { position: relative; display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; padding: .5rem .9rem; margin-right: .5rem; border-color: rgba(34, 211, 238, .55); color: var(--cyan); }
.k3-chatb svg { width: 1.05rem; height: 1.05rem; }
.k3-chatb.on { background: rgba(34, 211, 238, .16); }
.k3-chatn { position: absolute; top: -.45rem; right: -.45rem; min-width: 1.2rem; height: 1.2rem; padding: 0 .3rem; border-radius: .6rem; background: #e5392b; color: #fff; font-style: normal; font-weight: 800; font-size: .7rem; line-height: 1.2rem; text-align: center; box-shadow: 0 0 0 2px #0b1226; }
.k3-chatn[hidden] { display: none; }
#gchat { position: fixed; top: 4.6rem; right: 1.4rem; z-index: 30; width: min(24rem, calc(100vw - 2rem)); height: min(34rem, calc(100vh - 6rem)); }
.gch { height: 100%; display: flex; flex-direction: column; gap: .5rem; padding: .8rem .9rem .7rem; animation: gchIn .18s ease-out; }
@keyframes gchIn { from { opacity: 0; transform: translateY(-.4rem); } to { opacity: 1; transform: none; } }
.gch-h { display: flex; align-items: baseline; gap: .6rem; }
.gch-h b { font-size: 1.15rem; }
.gch-h .dim { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gch-x { align-self: center; width: 2rem; height: 2rem; min-height: 0; padding: 0; font-size: 1.2rem; line-height: 1; }
.gch-l { flex: 1; min-height: 0; }
.gch .k3-cl .k3-ctag { font-size: .62rem; padding: .05rem .3rem; vertical-align: .1em; }
.gch-f { font-size: max(.72rem, 12px); }
@media (prefers-reduced-motion: reduce) { .gch { animation: none; } }
@media (max-height: 640px) { .k3-chatb { padding: .4rem .7rem; font-size: .78rem; } #gchat { top: 4.7rem; height: calc(100vh - 5.5rem); } }
@media (max-width: 560px) { .k3-chatb span { display: none; } #gchat { left: .6rem; right: .6rem; width: auto; } }

/* windowed desktop: the compact logo whenever the window is short (a 1366x768 screen's browser window is ~650 px
   tall; the big logo pushed the leaderboard's last rows out of view) */
@media (max-height: 800px) and (min-width: 761px) {
  .k3-brand { display: flex !important; align-items: baseline; gap: .7rem; margin: 0 0 .1rem; }
  .k3-brand .k3-logo { display: flex; gap: .45rem; font-size: 1.8rem !important; line-height: 1; }
  .k3-brand .k3-logo > * { font-size: inherit !important; line-height: 1; display: inline; }
  .k3-brand .k3-tag { font-size: .7rem; }
  .k3-menu { align-items: center; }
  .k3-mleft, .k3-mright { justify-content: center; }
}

/* small frames (the 800x450 QA size, phones): nothing under 12 px on the newer panels */
@media (max-width: 821px), (max-height: 462px) {
  .k3-updb, .k3-chatb, .type, .k3-brand .k3-tag, .k3-evsn span, .k3-evtiers i, .k3-evy em, .k3-ohint, .swatches .sw em,
  .res-notes .rn b, .res-notes .rn span, .res-notes .rn em, .k3-evi em, .k3-orp em, .k3-asst span { font-size: 12px !important; }
  #radioBtn { font-size: 15.5px !important; } /* inside the HUD zoom */
}
/* the kart panel gives way to the penalty column on short frames (hud.js fitKart) */
.h3-kart.words .h3-broke, .h3-kart.tight .h3-stats { display: none; }
.h3-kart.tight { width: auto; }
.h3-kart.tight .h3-main { grid-template-columns: auto; padding: 5px 7px; }
.h3-kart.gone { visibility: hidden; }
/* events on short, narrow frames (800x450, phones): the day's events first so the first Start is in view; the season
   ladder follows below */
@media (max-width: 899px) and (max-height: 560px) {
  .k3-ev { display: flex; flex-direction: column; }
  .k3-ev > .k3-evs { order: 9; }
}
/* the kart panel's rows stay on in every view (the old timing panel's rows hid on touch, onboard and short frames);
   on touch the values alone (the colours carry the meaning), no labels */
#hKart .h3-stats .myc-row:not([hidden]) { display: flex; }
.hud2.is-touch #hKart .h3-stats .myc-row { justify-content: flex-start; }
.hud2.is-touch #hKart .h3-stats .myc-row > span { display: none; }

/* the global chat, bigger (v3.22): a larger button with a pulsing count, a larger popup with larger lines, and a
   new-lines card bottom right on the home screens */
.k3-chatb { font-size: .95rem; padding: .6rem 1.1rem; gap: .5rem; border-width: 2px; }
.k3-chatb svg { width: 1.3rem; height: 1.3rem; }
.k3-chatn { top: -.55rem; right: -.55rem; min-width: 1.5rem; height: 1.5rem; line-height: 1.5rem; border-radius: .75rem; font-size: .82rem; box-shadow: 0 0 0 3px rgba(229, 57, 43, .3); animation: k3pulse 1.4s ease-in-out infinite; }
#gchat { width: min(30rem, calc(100vw - 2rem)); height: min(44rem, calc(100vh - 6rem)); }
.gch { gap: .65rem; padding: 1rem 1.1rem .85rem; }
.gch-h b { font-size: 1.35rem; }
.gch .k3-cl { font-size: 1rem; padding: .45rem .65rem; }
.gch .k3-cl em { font-size: .78rem; }
.gch .k3-quick .btn.small { font-size: .85rem; padding: .3rem .65rem; }
.gch .k3-cin input { font-size: 1rem; padding: .65rem .8rem; }
#gnote { position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 29; width: min(23rem, calc(100vw - 2rem)); }
.gnote { display: grid; gap: .45rem; padding: .85rem 1rem .9rem; border: 2px solid rgba(34, 211, 238, .6); box-shadow: 0 .8rem 2rem rgba(0, 0, 0, .45); animation: gnoteIn .25s ease-out; }
@keyframes gnoteIn { from { opacity: 0; transform: translateY(.8rem); } to { opacity: 1; transform: none; } }
.gnote-h { display: flex; align-items: center; gap: .5rem; color: var(--cyan); }
.gnote-h svg { width: 1.3rem; height: 1.3rem; }
.gnote-h b { font-size: 1.05rem; color: var(--ink); }
.gnote-h i { font-style: normal; font-weight: 800; font-size: .8rem; color: #fff; background: #e5392b; border-radius: .7rem; padding: .1rem .5rem; }
.gnote-x { margin-left: auto; width: 1.8rem; height: 1.8rem; min-height: 0; padding: 0; font-size: 1.1rem; line-height: 1; }
.gnote-l { display: grid; gap: .1rem; padding: .4rem .6rem; border-radius: 8px; background: rgba(255, 255, 255, .05); font-size: 1rem; }
.gnote-l b { color: var(--cyan); font-size: .9rem; }
.gnote-l span { overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gnote-go { justify-self: end; }
@media (max-height: 640px) { .k3-chatb { padding: .45rem .8rem; font-size: .85rem; } #gnote { bottom: .8rem; right: .8rem; } }
@media (prefers-reduced-motion: reduce) { .gnote, .k3-chatn { animation: none; } }
/* windowed sizes (v3.22): the garage's choice rows wrap inside the panel (they were sized to their content and ran
   past it); the event cards fit their content with the circuit drawn top right */
.k3-evc { position: relative; }
.k3-evmap { position: absolute; top: .7rem; right: .8rem; width: 4.6rem; height: 3.4rem; opacity: .9; pointer-events: none; }
.k3-evmap svg { width: 100%; height: 100%; display: block; }
.k3-evc > .type, .k3-evc > b.disp { padding-right: 5rem; }
@media (min-width: 761px) {
  .k3-ev { height: auto; grid-template-rows: auto auto auto; align-content: start; }
  .k3-evc { grid-template-rows: auto auto auto auto minmax(4.5rem, 1fr) auto auto; overflow: visible; }
}
/* the garage on short windows: one column in the panel's own scroll (the two-column grid split each heading from its
   swatches), and the pattern row wraps inside it */
@media (max-height: 700px) and (min-width: 761px) { .kl-garage .cust { display: block; } }
.kl-garage .cust .seg.wrap { width: auto; }
/* locked colours: the price under each swatch is wider than a small swatch (a 12 px "600" is ~21 px, a swatch 18 px on
   short windows), so the row keeps a column gap that leaves the prices apart ("120 120", never "120120") */
.kl-garage .swatches { column-gap: max(.35rem, 11px); }
/* clubs, explained (src/clubguide.js): one card per part of a club */
.k3-cgbox { width: min(44rem, calc(100vw - 2rem)); }
.k3-cgbox .mbody { max-height: min(66vh, 36rem); overflow-y: auto; }
.k3-cguide { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin-top: .6rem; }
.k3-cgi { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); gap: .65rem; align-items: start; padding: .65rem .75rem; border-radius: 10px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.k3-cgi i { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: rgba(34, 211, 238, .14); color: var(--cyan); }
.k3-cgi i svg { width: 1.3rem; height: 1.3rem; }
.k3-cgi:nth-child(2) i, .k3-cgi:nth-child(3) i { background: rgba(229, 57, 43, .16); color: #ff6a5a; }
.k3-cgi:nth-child(4) i, .k3-cgi:nth-child(5) i { background: rgba(245, 158, 11, .16); color: #f59e0b; }
.k3-cgi b { display: block; font-family: var(--disp); letter-spacing: .03em; }
.k3-cgi em { display: block; font-style: normal; color: var(--dim, #9fb3be); font-size: max(.88rem, 12px); line-height: 1.35; }
@media (max-width: 760px) { .k3-cguide { grid-template-columns: 1fr; } }
/* full launch (v3.24): the one 320x50 banner, at the top in the top bar's free middle (src/banner.js) */
#kp-banner { position: fixed; z-index: 60; width: 320px; height: 50px; overflow: hidden; }
#kp-banner[style*="visibility: hidden"], #kp-banner[style*="visibility: hidden"] * { visibility: hidden !important; pointer-events: none !important; } /* QA 19-11: hidden, never cleared */
#kp-banner .kp-fake { width: 100%; height: 100%; display: grid; place-items: center; background: repeating-linear-gradient(45deg, #2a3242 0 10px, #313a4d 10px 20px); color: #cfd6e2; font: 600 13px/1 Inter, sans-serif; letter-spacing: .06em; border: 1px dashed #7b879c; }
/* the top bar makes room for it in steps (body[data-tbfit] 1-4): labels to icons, then the less needed chips */
body[data-tbfit] .topbar { gap: .45rem; }
body[data-tbfit] .k3-chatb span { display: none; }
body[data-tbfit] .k3-chatb, body[data-tbfit] .k3-updb { padding-left: .7rem; padding-right: .7rem; margin-right: 0; }
body[data-tbfit="2"] .topbar > .chip:not(.k3-cash), body[data-tbfit="3"] .topbar > .chip:not(.k3-cash), body[data-tbfit="4"] .topbar > .chip:not(.k3-cash) { display: none; }
body[data-tbfit="3"] .topbar .me-t > span, body[data-tbfit="4"] .topbar .me-t > span { display: none; }
body[data-tbfit="4"] .topbar .me-t { display: none; }
body[data-tbfit="4"] .k3-updb { font-size: 12px !important; }
/* rewarded bonuses: a video icon, the reward, optional (the other buttons stay the same size); timers and notes */
.kp-rw { display: inline-flex; align-items: center; gap: .5rem; background: linear-gradient(180deg, #f5b400, #e09a00); color: #14181d; border-color: #b77e00; }
.kp-rw svg { width: 1.2rem; height: 1.2rem; flex: none; }
.kp-rw-off, .kp-rw-done { display: inline-flex; align-items: center; gap: .35rem; font-size: max(.85rem, 12px); color: var(--dim, #9fb3be); }
.kp-rw-done { color: #3ccf7a; font-weight: 700; }
.kp-rwrow { display: flex; justify-content: center; margin: .5rem 0; min-height: 0; }
.kp-rwrow:empty { display: none; }
#rwPrize:empty { display: none; }
/* local test stand-in for a video ad (?fakeads=1, never on the portal) */
.kp-fake-ad { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; background: #000c; color: #fff; font: 700 22px Inter, sans-serif; }
/* the results header only as wide as what it says (it spanned the row, so a banner at the top met its empty box) */
.k2-res .res-h { justify-self: start; }
/* the header banner stays up while a popup is open: on windows tall enough, popups open below it */
@media (min-height: 600px) {
  body.kp-ban #modal .modal { padding-top: calc(var(--ban-b, 70px) + 10px); box-sizing: border-box; }
  body.kp-ban #modal .mbox { max-height: calc(100vh - var(--ban-b, 70px) - 1.4rem); }
}
/* localhost ad stand-ins: what plays, and why */
#kp-banner .kp-fake { display: flex; flex-direction: column; gap: 3px; text-align: center; }
#kp-banner .kp-fake b { font-size: 13px; letter-spacing: .06em; color: #ffd23f; }
#kp-banner .kp-fake span { font-size: 10px; font-weight: 500; opacity: .8; }
.kp-fake-ad { display: flex !important; flex-direction: column; justify-content: center; align-items: center; gap: 10px; text-align: center; padding: 0 2rem; }
.kp-fake-ad b { font-size: 30px; letter-spacing: .08em; color: #ffd23f; }
.kp-fake-ad span { font-size: 16px; font-weight: 500; max-width: 38rem; }
.kp-fake-ad.skip { inset: auto 0 2rem 0; background: none; pointer-events: none; }
.kp-fake-ad.skip b, .kp-fake-ad.skip span { background: #000d; padding: 6px 14px; border-radius: 8px; }
.kp-fake-ad.skip b { font-size: 16px; }
.kp-fake-ad.skip span { font-size: 13px; }
/* the home menu's chat, in the middle column (1100 px and wider): World or Club; narrower windows keep the Chat button */
.k3-mmid { display: none; }
@media (min-width: 1100px) {
  .k3-mmid { display: flex; grid-column: 2; grid-row: 1; align-self: stretch; min-width: 0; min-height: 0; align-items: flex-end; justify-content: center; }
  #ui.scr-menu .k3-chatb { display: none; }
}
.k3-mchat { width: min(100%, 30rem); height: min(100%, 30rem); display: flex; flex-direction: column; gap: .5rem; padding: .8rem .9rem .75rem; min-height: 0; }
.k3-mch-h { display: flex; align-items: center; gap: .6rem; }
.k3-mch-h > svg { width: 1.2rem; height: 1.2rem; flex: none; color: var(--cyan); }
.k3-mch-h .dim { flex: 1; min-width: 0; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k3-mseg { display: flex; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); border-radius: 8px; padding: 2px; }
.k3-mseg button { background: none; border: 0; color: var(--dim, #9aa6bd); font: 700 .85rem/1 var(--disp); letter-spacing: .06em; text-transform: uppercase; padding: .45rem .9rem; border-radius: 6px; cursor: pointer; }
.k3-mseg button.on { background: var(--cyan, #1fa4ff); color: #04101f; }
.k3-mseg .k3-ctag { font-size: .6rem; padding: .05rem .3rem; }
.k3-mch-l { flex: 1; min-height: 0; }
.k3-mchat .k3-cl .k3-ctag { font-size: .62rem; padding: .05rem .3rem; vertical-align: .1em; }
.k3-mch-0 { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; text-align: center; padding: 1rem; }
.k3-mch-0 b { font-size: 1.3rem; }
.k3-mch-0 .dim { max-width: 22rem; }
@media (max-height: 640px) { .k3-mchat { height: 100%; } }
/* the read tour's buttons: Skip (quiet) and Next */
.k3-tourbtns { display: flex; align-items: center; justify-content: flex-end; gap: .8rem; }
.k3-tourbtns .link { background: none; border: 0; color: #475569; text-decoration: underline; cursor: pointer; font: inherit; font-size: .85rem; }
/* the menu chat never sizes the menu: it fills its column (from the bottom, up to 30rem), lines scroll inside */
@media (min-width: 1100px) {
  .k3-mmid { position: relative; }
  .k3-mchat { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); max-height: 100%; }
}
/* a line: name, time and Mute on top, the text under it (the middle column is narrow) */
.k3-mchat .k3-cl { grid-template-columns: minmax(0, 1fr) auto auto; row-gap: .1rem; }
.k3-mchat .k3-cl b { overflow: hidden; text-overflow: ellipsis; }
.k3-mchat .k3-cl span { grid-column: 1 / -1; grid-row: 2; }

/* race control: give the place back / ease off, with its timer (v3.25) */
#hud .h-owe { display: grid; gap: .15rem; padding: .45rem .8rem .5rem; border-left-color: #ff8a00; justify-self: center; margin: 0 auto; min-width: 14rem; text-align: center; }
#hud .h-owe b { font-size: 1.05rem; letter-spacing: .02em; }
#hud .h-owe span { font-size: .85rem; opacity: .9; }
#hud .h-owe-bar { display: block; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .15); overflow: hidden; }
#hud .h-owe-bar i { display: block; height: 100%; background: #ff8a00; transition: width .9s linear; }

/* CrazyGames QA 13-11-2026: the chats make room for the header banner (src/banner.js: body.kp-ban while it shows,
   --ban-b its bottom edge, --ban-chat the height the home chat may take under it): >= 10 px below it, never under it */
body.kp-ban #gchat { top: max(4.6rem, calc(var(--ban-b, 60px) + 10px)); height: min(44rem, calc(100vh - max(4.6rem, calc(var(--ban-b, 60px) + 10px)) - .8rem)); }
@media (min-width: 1100px) { body.kp-ban .k3-mchat[data-banyield] { max-height: min(100%, var(--ban-chat, 100%)); } }
/* Skip: on the welcome card (a clear second button under Enter), in the scout race and on every tour box */
.k3-wel .btn.k3-welskip { animation: none; justify-self: center; min-width: 12rem; font-size: 1rem; padding: .55rem 1.2rem; background: rgba(255, 255, 255, .06); color: var(--ink); border: 1px solid rgba(255, 255, 255, .35); box-shadow: none; }
.k3-wel .btn.k3-welskip:hover { background: rgba(255, 255, 255, .14); }
.k3-tourbtns .btn.k3-tskip { justify-self: auto; background: transparent !important; color: #0f1f3d !important; border: 1.5px solid #b45309 !important; box-shadow: none; font-size: .95rem; padding: .45rem .9rem; }
.k3-tourbtns .btn.k3-tskip:hover { background: rgba(245, 158, 11, .15) !important; }
.k3-tourb .k3-tourbtns { margin-top: .2rem; }

/* v3.29 the start limiter button: the rolling start only, above the speedo, clickable on every device */
.h-lim { position: absolute; left: 50%; bottom: 150px; transform: translateX(-50%); z-index: 30; pointer-events: auto; cursor: pointer; padding: 9px 16px; border-radius: 999px; border: 2px solid rgba(255,255,255,.55); background: rgba(10,16,28,.82); color: #fff; font: 600 15px/1.1 inherit; letter-spacing: .02em; white-space: nowrap; touch-action: manipulation; }
.h-lim b { color: #ffcf4d; } .h-lim.on { border-color: #3ddc84; } .h-lim.on b { color: #3ddc84; }
.h-lim .key { display: inline-block; min-width: 1.4em; padding: 1px 5px; border-radius: 5px; background: #fff; color: #111; text-align: center; margin-right: 4px; }
@media (max-height: 520px) { .h-lim { bottom: 112px; font-size: 13px; padding: 7px 12px; } }
