:root {
  /* synthwave / outrun palette */
  --bg0:#070212; --bg1:#12052c; --horizon:#3a0f52;
  --ink:#f2edff; --dim:#a99fd0; --faint:#7166a0;
  --magenta:#ff2d95; --cyan:#25e7ff; --purple:#a24be0; --gold:#ffd23f; --orange:#ff6a3d; --danger:#ff4d6d;
  --accent:#ffd23f;                       /* in-race HUD stays warm/readable */
  --panel: rgba(22,10,44,0.66); --line: rgba(150,120,230,0.22); --line2: rgba(150,120,230,0.42);
  --display:'Orbitron', sans-serif; --racing:'Racing Sans One', sans-serif; --body:'Inter', system-ui, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; user-select: none; }
html, body { height: 100%; overflow: hidden; background: #070212; font-family: var(--body); color: var(--ink); }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

/* ── in-race HUD ──────────────────────────────────────────────── */
#hudroot { position: fixed; inset: 0; pointer-events: none; }
.hud-tl { position: absolute; top: calc(0.7rem + env(safe-area-inset-top)); left: 0.9rem; }
.place-box { font-family: var(--display); font-weight: 900; font-size: clamp(2.4rem, 8.5vw, 4rem); line-height: 0.9; text-shadow: 0 3px 14px rgba(0,0,0,0.6); }
.place-box sup { font-size: 0.4em; color: var(--accent); }
.place-lbl { font-weight: 700; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); text-shadow: 0 1px 4px rgba(0,0,0,0.7); margin-top: -0.1rem; }
.hud-tr { position: absolute; top: calc(0.7rem + env(safe-area-inset-top)); right: 0.9rem; display: flex; gap: 0.7rem; }
.stat { text-align: right; font-family: var(--display); font-weight: 700; font-size: clamp(1.2rem, 4.2vw, 1.9rem); line-height: 1; text-shadow: 0 2px 8px rgba(0,0,0,0.6); }
.stat small { display: block; font-family: var(--body); font-weight: 700; font-size: 0.52rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.hud-bar { position: absolute; bottom: calc(0.9rem + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: min(70vw, 460px); }
.prog { height: 7px; border-radius: 99px; background: rgba(0,0,0,0.45); overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,0.5); }
.prog-fill { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--orange)); transition: width 0.2s linear; }
.lod { position: absolute; bottom: calc(0.7rem + env(safe-area-inset-bottom)); right: 0.9rem; font-size: 0.6rem; color: var(--dim); font-weight: 600; letter-spacing: 0.03em; text-shadow: 0 1px 3px rgba(0,0,0,0.8); }
.camtag { position: absolute; bottom: calc(1.4rem + env(safe-area-inset-bottom)); right: 0.9rem; font-size: 0.62rem; color: var(--dim); text-shadow: 0 1px 3px rgba(0,0,0,0.8); }
.camtag b { display: inline-block; background: rgba(0,0,0,0.4); border: 1px solid var(--line); border-radius: 4px; padding: 0 0.3rem; color: var(--ink); }

/* ── overlays / start card ────────────────────────────────────── */
.overlay, .start { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 1.2rem; background: radial-gradient(ellipse at center, rgba(6,2,16,0.45), rgba(6,2,16,0.86)); }
.start-card, .ov-card { background: var(--panel); border: 1px solid var(--line2); border-radius: 14px; padding: 1.6rem 1.4rem; max-width: 430px; width: 100%; text-align: center; backdrop-filter: blur(10px); box-shadow: 0 0 0 1px rgba(37,231,255,0.08), 0 24px 70px rgba(0,0,0,0.6); position: relative; }
.start-card::before, .ov-card::before { content: ''; position: absolute; top: 0; left: 14px; right: 14px; height: 2px; background: linear-gradient(90deg, transparent, var(--cyan), transparent); }
.tag { color: var(--dim); font-size: 0.9rem; line-height: 1.5; margin: 0.7rem 0 1.1rem; }
.ctrls { text-align: left; display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.82rem; color: var(--dim); background: rgba(0,0,0,0.3); border-radius: 10px; padding: 0.8rem 1rem; margin-bottom: 1.1rem; }
.ctrls b { color: var(--ink); }
.ov-card h1 { font-family: var(--display); font-weight: 900; text-transform: uppercase; letter-spacing: 0.04em; font-size: clamp(2rem, 8vw, 3rem); color: var(--danger); }
.ov-card p { color: var(--dim); font-size: 0.95rem; margin: 0.5rem 0 1.2rem; line-height: 1.5; }
.ov-card b { color: var(--ink); }

/* ── logo (chrome + neon) ─────────────────────────────────────── */
.logo { font-family: var(--display); font-weight: 900; text-transform: uppercase; letter-spacing: 0.05em; line-height: 0.98;
  background: linear-gradient(180deg, #ffffff 0%, #d6f4ff 42%, var(--cyan) 60%, #0c9fd0 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 12px rgba(37,231,255,0.45)); }
.logo span { background: linear-gradient(180deg, #ffffff 0%, #ffd4ec 42%, var(--magenta) 62%, #c01c74 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 12px rgba(255,45,149,0.5)); }

/* ── buttons (angular neon) ───────────────────────────────────── */
.ov-btn { font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: 0.95rem; letter-spacing: 0.08em;
  padding: 0.7rem 1.4rem; border: none; cursor: pointer; pointer-events: auto; margin: 0.3rem; color: #0b0418;
  background: linear-gradient(180deg, #ffe27a, var(--gold)); position: relative;
  clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 11px, 100% 100%, 11px 100%, 0 calc(100% - 11px));
  box-shadow: 0 0 18px rgba(255,210,63,0.4); transition: transform 0.1s, box-shadow 0.12s, filter 0.12s; }
.ov-btn:hover { filter: brightness(1.08); box-shadow: 0 0 28px rgba(255,210,63,0.6); }
.ov-btn:active { transform: translateY(2px); }
.ov-btn.big { font-size: 1.15rem; padding: 0.9rem 2rem; }
.ov-btn.mag { background: linear-gradient(180deg, #ff6bb4, var(--magenta)); color: #fff; box-shadow: 0 0 20px rgba(255,45,149,0.5); }
.ov-btn.mag:hover { box-shadow: 0 0 30px rgba(255,45,149,0.7); }
.ov-btn.cyan { background: linear-gradient(180deg, #8ff2ff, var(--cyan)); color: #06222b; box-shadow: 0 0 20px rgba(37,231,255,0.5); }
.ov-btn.ghost { background: transparent; color: var(--dim); box-shadow: none; clip-path: none; border: 1px solid var(--line2); border-radius: 8px; }
.ov-btn.ghost:hover { color: var(--ink); border-color: var(--cyan); filter: none; }
.ov-btn:disabled { filter: grayscale(0.7) brightness(0.6); cursor: not-allowed; box-shadow: none; }
[hidden] { display: none !important; }

/* ── shared synthwave background (title / tracks / vehicles / career) ── */
body.title, body.tracks, body.vehsel, body.career { overflow: auto;
  background: linear-gradient(180deg, #070212 0%, #0d0430 40%, #250a48 58%, #4a1152 70%, #7a1652 80%, #2a0a2e 90%, #0a0316 100%) fixed; }
.title-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,0.16) 0 1px, transparent 1px 3px);   /* scanlines */
  box-shadow: inset 0 0 240px 70px rgba(7,2,18,0.92); }                                        /* vignette */
/* outrun sun on the horizon */
.title-bg::before { content: ''; position: absolute; left: 50%; top: 33%; transform: translate(-50%, -50%);
  width: min(60vw, 440px); height: min(60vw, 440px); border-radius: 50%;
  background: linear-gradient(180deg, #fff4c0 0%, var(--gold) 24%, var(--orange) 50%, var(--magenta) 74%, #a8186a 100%);
  box-shadow: 0 0 120px 34px rgba(255,80,130,0.34);
  -webkit-mask: radial-gradient(closest-side, #000 99%, transparent 100%), repeating-linear-gradient(0deg, #000 0 9px, transparent 9px 15px);
  -webkit-mask-composite: source-in; mask: radial-gradient(closest-side, #000 99%, transparent 100%), repeating-linear-gradient(0deg, #000 0 9px, transparent 9px 15px); mask-composite: intersect; }
/* perspective neon grid floor, scrolling toward the viewer */
.title-bg::after { content: ''; position: absolute; left: -30%; right: -30%; bottom: -4%; height: 48%;
  background-image:
    repeating-linear-gradient(90deg, rgba(255,45,149,0.55) 0 2px, transparent 2px 86px),
    repeating-linear-gradient(0deg, rgba(37,231,255,0.62) 0 2px, transparent 2px 64px);
  background-size: 86px 100%, 100% 64px;
  -webkit-mask: linear-gradient(180deg, transparent 0%, #000 34%); mask: linear-gradient(180deg, transparent 0%, #000 34%);
  transform: perspective(340px) rotateX(75deg); transform-origin: 50% 100%; opacity: 0.9;
  animation: gridscroll 1.3s linear infinite; }
@keyframes gridscroll { from { background-position: 0 0, 0 0; } to { background-position: 0 0, 0 64px; } }
@media (prefers-reduced-motion: reduce) { .title-bg::after { animation: none; } }
/* on content-heavy pages the sun/grid recede to a faint backdrop so cards stay legible
   (the title screen keeps them at hero strength). */
body.tracks .title-bg::before, body.career .title-bg::before { opacity: 0.28; top: 20%; }
body.tracks .title-bg::after, body.career .title-bg::after { opacity: 0.5; }
body.tracks .title-bg, body.career .title-bg { box-shadow: inset 0 0 300px 120px rgba(7,2,18,0.95); }

/* ── TITLE SCREEN ─────────────────────────────────────────────── */
.title-wrap { position: relative; z-index: 1; min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem 1.2rem calc(3rem + env(safe-area-inset-bottom)); gap: 0.15rem; }
.title-eyebrow { font-family: var(--display); font-weight: 600; font-size: clamp(0.55rem, 2vw, 0.8rem); letter-spacing: 0.28em; text-transform: uppercase; color: var(--cyan); text-shadow: 0 0 14px rgba(37,231,255,0.6); margin-bottom: 0.5rem; animation: drop 0.6s cubic-bezier(.2,.9,.3,1.2) both; }
.logo.big { font-size: clamp(2.3rem, 11vw, 6rem); letter-spacing: 0.005em; text-align: center; line-height: 0.92; animation: drop 0.7s cubic-bezier(.2,.9,.3,1.2) both; }
.logo.big span { display: block; }
/* GRL wordmark: the title screen is the logo and nothing else — no eyebrow, no tagline.
   GRAVITY sits large, RACING LEAGUE tracks out wide underneath so the two lines share an
   optical width at any viewport instead of the second line running long on a phone. */
.logo.big.wordmark { font-size: clamp(2.6rem, 13vw, 7rem); line-height: 0.86; }
.logo.big.wordmark span { font-size: 0.365em; letter-spacing: 0.185em; margin-top: 0.42em; padding-left: 0.185em; }
@media (max-width: 420px) { .logo.big.wordmark span { letter-spacing: 0.12em; padding-left: 0.12em; } }
   /* stack the second word under the first — fits any width + classic outrun stack */
@keyframes drop { from { opacity: 0; transform: translateY(-22px) scale(0.96); } to { opacity: 1; transform: none; } }
.title-wrap .tag { font-family: var(--body); font-weight: 600; font-size: clamp(0.85rem, 2.6vw, 1.1rem); color: #d9caff; margin: 0.6rem 0 2rem; text-shadow: 0 2px 12px rgba(0,0,0,0.5); animation: drop 0.7s 0.1s cubic-bezier(.2,.9,.3,1.2) both; }
.modes { display: flex; gap: 1.1rem; flex-wrap: wrap; justify-content: center; width: 100%; max-width: 780px; }
.mode-card { pointer-events: auto; text-decoration: none; color: var(--ink); flex: 1 1 300px; max-width: 340px; position: relative;
  background: var(--panel); border: 1px solid var(--line); border-radius: 3px; padding: 1.6rem 1.4rem 1.5rem; overflow: hidden;
  backdrop-filter: blur(10px); box-shadow: 0 18px 50px rgba(0,0,0,0.5); text-align: center;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
  animation: rise 0.6s 0.2s cubic-bezier(.2,.9,.3,1.2) both; }
.mode-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--edge, var(--cyan)); box-shadow: 0 0 16px var(--edge, var(--cyan)); opacity: 0.85; }
.mode-card:nth-child(2) { animation-delay: 0.32s; } .mode-card:nth-child(3) { animation-delay: 0.44s; }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
.mode-card:hover, .mode-card:focus-visible { transform: translateY(-6px); box-shadow: 0 26px 66px rgba(0,0,0,0.6), 0 0 40px -8px var(--edge, var(--cyan)); border-color: var(--edge, var(--cyan)); outline: none; }
.mode-card.career { --edge: var(--gold); } .mode-card.race { --edge: var(--magenta); } .mode-card.practice { --edge: var(--cyan); }
.mc-emoji { font-size: 2.5rem; line-height: 1; margin-bottom: 0.7rem; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5)); }
.mc-title { font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; font-size: 1.3rem; margin-bottom: 0.4rem; color: var(--edge, var(--ink)); text-shadow: 0 0 18px color-mix(in srgb, var(--edge, var(--cyan)) 45%, transparent); }
.mc-sub { font-size: 0.82rem; color: var(--dim); line-height: 1.5; }

/* ── practice HUD ─────────────────────────────────────────────── */
.hud-btn { position: absolute; top: calc(0.7rem + env(safe-area-inset-top)); left: 0.9rem; pointer-events: auto;
  text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); background: var(--panel);
  border: 1px solid var(--line2); border-radius: 8px; padding: 0.45rem 0.8rem; backdrop-filter: blur(8px); transition: border-color 0.12s, color 0.12s; }
.hud-btn:hover { border-color: var(--cyan); color: #fff; }
.hud-btn:active { transform: translateY(1px); }
.telemetry { position: absolute; bottom: calc(3.2rem + env(safe-area-inset-bottom)); left: 0.9rem;
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--dim);
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 0.6rem 0.75rem; backdrop-filter: blur(8px); min-width: 128px; }
.telemetry .wh { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.28rem; color: var(--dim); }
.telemetry .wh i { display: block; height: 5px; border-radius: 99px; background: var(--cyan); box-shadow: 0 0 6px var(--cyan); transition: width 0.1s linear; }
.telemetry .wh.off { opacity: 0.4; } .telemetry .wh.off i { background: var(--dim); box-shadow: none; }
.help { position: absolute; bottom: calc(0.8rem + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  white-space: nowrap; font-size: 0.68rem; color: var(--dim); background: rgba(14,6,30,0.66); border-radius: 99px; padding: 0.35rem 0.9rem; backdrop-filter: blur(6px); max-width: 96vw; overflow: hidden; text-overflow: ellipsis; }
.help b { color: var(--ink); }

/* ── race start card: track binding ───────────────────────────── */
.trackname { margin: 0.2rem 0 0.7rem; }
.trackname b { font-family: var(--racing); font-size: 1.25rem; color: var(--gold); }
.trackname span { display: block; font-size: 0.72rem; color: var(--dim); letter-spacing: 0.03em; }
.trackname em { display: inline-block; margin-top: 0.35rem; font-style: normal; font-weight: 700; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--cyan); }

/* ── shared menu chrome (header used by tracks/vehicles/career) ── */
.menu-wrap { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: 1.1rem 1.1rem calc(3rem + env(safe-area-inset-bottom)); }
.menu-head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1.4rem; padding-top: calc(0.4rem + env(safe-area-inset-top)); }
.menu-head .back, .menu-head .hud-btn { position: static; }
.menu-head .logo { font-size: clamp(1.4rem, 5vw, 2.4rem); flex: 1; text-align: center; }
.menu-head .logo span { display: inline; }
.steps { display: flex; align-items: center; justify-content: center; gap: 0.4rem; margin: -0.6rem 0 1.3rem; font-family: var(--display); font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.steps b { color: var(--cyan); text-shadow: 0 0 10px rgba(37,231,255,0.5); } .steps s { color: var(--faint); text-decoration: none; }

/* ── TRACK SELECT ─────────────────────────────────────────────── */
.tracks-wrap { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: 1.1rem 1.1rem calc(3rem + env(safe-area-inset-bottom)); }
.tracks-head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.3rem; padding-top: calc(0.4rem + env(safe-area-inset-top)); }
.tracks-head .back, .tracks-head .dice { position: static; }
.tracks-head .logo { font-size: clamp(1.4rem, 5vw, 2.4rem); flex: 1; text-align: center; }
.hud-btn.dice { background: linear-gradient(180deg, #ff6bb4, var(--magenta)); color: #fff; border-color: transparent; box-shadow: 0 0 16px rgba(255,45,149,0.4); }
.biome { margin-bottom: 1.6rem; }
.biome-title { display: flex; align-items: center; gap: 0.55rem; font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.95rem; margin-bottom: 0.75rem; color: var(--ink); }
.biome-title i { width: 8px; height: 18px; border-radius: 2px; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.biome-title span { font-family: var(--body); font-size: 0.56rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); }
.track-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 0.85rem; }
.trk { pointer-events: auto; text-decoration: none; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; display: flex; flex-direction: column; backdrop-filter: blur(8px); box-shadow: 0 12px 34px rgba(0,0,0,0.45); transition: transform 0.14s ease, border-color 0.14s, box-shadow 0.14s; }
.trk:hover, .trk:focus-visible { transform: translateY(-6px); border-color: var(--cyan); box-shadow: 0 20px 46px rgba(0,0,0,0.6), 0 0 34px -10px var(--cyan); outline: none; }
.trk-prev { height: 122px; position: relative; }
.trk-prev svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.trk-prev::after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 -30px 30px -18px rgba(10,3,24,0.9); }
.trk-body { padding: 0.55rem 0.7rem 0.75rem; }
.trk-name { font-family: var(--racing); font-size: 1.05rem; line-height: 1; }
.trk-theme { font-size: 0.66rem; color: var(--dim); margin-top: 0.16rem; }
.trk-meta { display: flex; justify-content: space-between; align-items: center; font-size: 0.64rem; color: var(--dim); margin-top: 0.5rem; }
.trk-diff { color: var(--gold); letter-spacing: 1px; }
.trk-diff .dim { color: rgba(255,255,255,0.14); }

/* ── VEHICLE SELECT ───────────────────────────────────────────── */
.vehsel-wrap { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: 1.1rem 1.1rem calc(3rem + env(safe-area-inset-bottom)); }
.veh-track { font-family: var(--display); font-weight: 600; font-size: 0.76rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); margin-bottom: 1.3rem; text-align: center; }
.veh-track b { color: var(--cyan); text-shadow: 0 0 12px rgba(37,231,255,0.5); }
.veh-kit { margin: 0 auto 1.3rem; max-width: 640px; background: rgba(255,255,255,0.03); border: 1px solid var(--line2); border-radius: 12px; padding: 0.9rem 1.1rem; }
.kit-head { font-family: var(--display); font-weight: 600; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); text-align: center; margin-bottom: 0.6rem; }
.kit-head em, .veh-kit em { font-style: normal; color: var(--faint); text-transform: none; letter-spacing: 0; font-size: 0.66rem; margin-left: 0.4rem; }
.kit-list { display: flex; flex-direction: column; gap: 0.3rem; }
.kit-slot { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.kit-lbl { min-width: 5.2rem; font-family: var(--display); font-weight: 600; font-size: 0.64rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--dim); }
.opt.tiny { padding: 0.32rem 0.62rem; font-size: 0.64rem; }
.veh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 0.9rem; }
.veh { pointer-events: auto; text-decoration: none; color: var(--ink); display: flex; gap: 0.8rem; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 0.85rem; backdrop-filter: blur(8px); box-shadow: 0 12px 32px rgba(0,0,0,0.45); position: relative; overflow: hidden; transition: transform 0.14s ease, border-color 0.14s, box-shadow 0.14s; }
.veh::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--vc); box-shadow: 0 0 14px var(--vc); }
.veh:hover, .veh:focus-visible { transform: translateY(-5px); border-color: var(--vc); box-shadow: 0 18px 40px rgba(0,0,0,0.6), 0 0 34px -12px var(--vc); outline: none; }
.veh-badge { width: 70px; flex: none; border-radius: 6px; background: radial-gradient(circle at 50% 28%, color-mix(in srgb, var(--vc) 30%, transparent), rgba(0,0,0,0.5)); display: flex; align-items: center; justify-content: center; }
.veh-badge svg { width: 52px; height: 70px; filter: drop-shadow(0 3px 6px rgba(0,0,0,0.6)); }
.veh-body { flex: 1; min-width: 0; }
.veh-name { font-family: var(--racing); font-size: 1.2rem; line-height: 1; color: var(--vc); }
.veh-desc { font-size: 0.68rem; color: var(--dim); line-height: 1.35; margin: 0.28rem 0 0.6rem; }
.veh-stats { display: flex; flex-direction: column; gap: 0.26rem; }
.vbar { display: flex; align-items: center; gap: 0.5rem; font-size: 0.54rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--dim); }
.vbar span { width: 3.1rem; flex: none; }
.vbar i { display: flex; gap: 3px; }
.vbar b { width: 15px; height: 7px; border-radius: 1px; background: rgba(255,255,255,0.1); }
.vbar b.on { background: var(--vc); box-shadow: 0 0 6px color-mix(in srgb, var(--vc) 60%, transparent); }

/* ── CAREER ───────────────────────────────────────────────────── */
.career-wrap { position: relative; z-index: 1; max-width: 1040px; margin: 0 auto; padding: 1.1rem 1rem calc(2.5rem + env(safe-area-inset-bottom)); }
.career-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.6rem; padding-top: calc(0.4rem + env(safe-area-inset-top)); }
.career-head .back { position: static; }
.career-head .logo { font-size: clamp(1.5rem, 5.5vw, 2.4rem); }
.career-head .logo span { display: inline; color: var(--dim); -webkit-text-fill-color: currentColor; font-size: 0.5em; filter: none; }

/* season HUD strip */
.season-hud { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem; margin-bottom: 1rem; }
@media (max-width: 560px) { .season-hud { grid-template-columns: repeat(2, 1fr); } }
.shud { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 0.6rem 0.75rem; position: relative; overflow: hidden; backdrop-filter: blur(8px); }
.shud::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--sc, var(--cyan)); box-shadow: 0 0 10px var(--sc, var(--cyan)); }
.shud .k { font-family: var(--body); font-size: 0.52rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.shud .v { font-family: var(--display); font-weight: 800; font-size: 1.35rem; line-height: 1.1; margin-top: 0.15rem; color: var(--ink); }
.shud .v small { font-size: 0.62rem; color: var(--dim); font-weight: 600; }
.shud.credits { --sc: var(--gold); } .shud.credits .v { color: var(--gold); }
.shud.rank { --sc: var(--cyan); } .shud.rep { --sc: var(--magenta); } .shud.rep .v { color: var(--magenta); }

.career-cols { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 1rem; align-items: start; }
@media (max-width: 720px) { .career-cols { grid-template-columns: 1fr; } }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 5px; padding: 1rem 1rem 1.1rem; backdrop-filter: blur(10px); box-shadow: 0 16px 44px rgba(0,0,0,0.5); position: relative; }
.panel::before { content: ''; position: absolute; top: 0; left: 14px; right: 14px; height: 2px; background: linear-gradient(90deg, transparent, var(--cyan), transparent); opacity: 0.6; }
.panel h3 { font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.95rem; margin-bottom: 0.7rem; display: flex; justify-content: space-between; align-items: baseline; }
.panel h3 em { font-style: normal; font-size: 0.58rem; font-weight: 700; letter-spacing: 0.1em; color: var(--faint); }
.panel + .panel { margin-top: 1rem; }

.standings { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.standings th { text-align: left; font-size: 0.56rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); padding: 0 0.4rem 0.45rem; }
.standings td { padding: 0.34rem 0.4rem; border-top: 1px solid var(--line); }
.standings td:first-child { color: var(--faint); width: 1.5rem; font-family: var(--display); }
.standings td.pts { text-align: right; font-weight: 800; font-family: var(--display); }
.standings td.car { color: var(--dim); font-size: 0.68rem; }
.standings td.last { color: var(--dim); font-size: 0.72rem; }
.standings tr.me td { color: var(--cyan); font-weight: 700; text-shadow: 0 0 12px rgba(37,231,255,0.35); }
.standings tr.rival td { color: var(--magenta); }
.standings tr.rival td:first-child { color: var(--magenta); }

/* rivalry callout */
.rival-box { display: flex; align-items: center; gap: 0.7rem; background: linear-gradient(90deg, rgba(255,45,149,0.14), transparent); border: 1px solid rgba(255,45,149,0.3); border-radius: 5px; padding: 0.6rem 0.75rem; margin-bottom: 0.9rem; }
.rival-box .vs { font-family: var(--display); font-weight: 900; color: var(--magenta); font-size: 1.1rem; text-shadow: 0 0 14px rgba(255,45,149,0.5); }
.rival-box .rt { flex: 1; min-width: 0; } .rival-box .rt b { color: var(--ink); } .rival-box .rt small { display: block; font-size: 0.66rem; color: var(--dim); margin-top: 0.1rem; }
.rival-box .gap { font-family: var(--display); font-weight: 800; font-size: 0.9rem; color: var(--magenta); text-align: right; }
.rival-box .gap small { display: block; font-family: var(--body); font-size: 0.5rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }

/* calendar */
.sched { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1rem; }
.ev { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.6rem; border-radius: 4px; background: rgba(0,0,0,0.26); border: 1px solid transparent; }
.ev.now { border-color: var(--cyan); background: rgba(37,231,255,0.09); box-shadow: 0 0 18px -6px var(--cyan); }
.ev.done { opacity: 0.66; }
.ev-n { font-family: var(--display); font-weight: 700; color: var(--faint); width: 1.2rem; text-align: center; }
.ev-sw { width: 0.9rem; height: 0.9rem; border-radius: 3px; flex: none; }
.ev-name { flex: 1; font-weight: 700; font-size: 0.84rem; line-height: 1.15; }
.ev-name small { display: block; font-weight: 500; font-size: 0.64rem; color: var(--dim); }
.ev-place { font-family: var(--display); font-weight: 800; font-size: 0.78rem; color: var(--ink); }
.ev-place b { color: var(--gold); }
.ev-go { font-family: var(--display); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--cyan); }
.ev-lock { color: var(--faint); }

/* garage */
.garage { display: flex; flex-direction: column; gap: 0.5rem; }
.gcar { display: flex; align-items: center; gap: 0.7rem; padding: 0.55rem 0.65rem; border-radius: 4px; background: rgba(0,0,0,0.26); border: 1px solid var(--line); cursor: pointer; transition: border-color 0.12s, background 0.12s; position: relative; }
.gcar:hover { border-color: var(--gc, var(--cyan)); }
.gcar.sel { border-color: var(--gc); background: color-mix(in srgb, var(--gc) 12%, transparent); box-shadow: 0 0 18px -8px var(--gc); }
.gcar.locked { opacity: 0.85; }
.gcar-badge { width: 40px; height: 40px; flex: none; border-radius: 5px; background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--gc) 32%, transparent), rgba(0,0,0,0.5)); display: flex; align-items: center; justify-content: center; }
.gcar-badge svg { width: 30px; height: 40px; }
.gcar-info { flex: 1; min-width: 0; }
.gcar-name { font-family: var(--racing); font-size: 1rem; line-height: 1; color: var(--gc); }
.gcar-stat { font-size: 0.58rem; color: var(--dim); letter-spacing: 0.03em; margin-top: 0.18rem; text-transform: uppercase; }
.gcar-act { font-family: var(--display); font-weight: 700; font-size: 0.7rem; text-align: right; }
.gcar-act .own { color: var(--cyan); } .gcar-act .cost { color: var(--gold); } .gcar-act .cant { color: var(--faint); }
.gcar .tick { position: absolute; top: -7px; right: -6px; background: var(--cyan); color: #04222b; font-size: 0.55rem; font-weight: 800; padding: 0.05rem 0.35rem; border-radius: 99px; }

/* result reveal (podium after a race) */
.reveal { position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; padding: 1.2rem; background: radial-gradient(ellipse at 50% 30%, rgba(20,6,44,0.75), rgba(6,2,16,0.94)); animation: fadein 0.3s ease both; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.reveal-card { background: var(--panel); border: 1px solid var(--line2); border-radius: 10px; padding: 1.8rem 1.6rem 1.5rem; max-width: 380px; width: 100%; text-align: center; backdrop-filter: blur(12px); box-shadow: 0 0 0 1px rgba(37,231,255,0.1), 0 30px 80px rgba(0,0,0,0.7); position: relative; overflow: hidden; }
.reveal-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--magenta), var(--gold), var(--cyan)); }
.reveal-place { font-family: var(--display); font-weight: 900; font-size: 4rem; line-height: 0.9; background: linear-gradient(180deg, #fff, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 20px rgba(255,210,63,0.5)); animation: pop 0.5s cubic-bezier(.2,1.4,.4,1) both; }
.reveal-place sup { font-size: 0.34em; -webkit-text-fill-color: var(--gold); }
@keyframes pop { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: none; } }
.reveal-sub { font-family: var(--display); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.72rem; color: var(--dim); margin-top: 0.3rem; }
.reveal-rows { display: flex; flex-direction: column; gap: 0.4rem; margin: 1.2rem 0; }
.rev-row { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0.7rem; background: rgba(0,0,0,0.3); border-radius: 4px; border-left: 2px solid var(--rc, var(--cyan)); animation: slidein 0.4s cubic-bezier(.2,.9,.3,1.1) both; }
.rev-row:nth-child(2) { animation-delay: 0.12s; } .rev-row:nth-child(3) { animation-delay: 0.24s; }
@keyframes slidein { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
.rev-row .rk { font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.rev-row .rv { font-family: var(--display); font-weight: 800; font-size: 1.05rem; color: var(--rc, var(--cyan)); }
.reveal-note { font-size: 0.76rem; color: var(--dim); line-height: 1.4; margin-bottom: 1.1rem; }
.reveal-note b { color: var(--ink); }
/* neon confetti burst */
.spark { position: absolute; width: 7px; height: 7px; border-radius: 1px; opacity: 0; pointer-events: none; animation: burst 1s ease-out forwards; }
@keyframes burst { 0% { opacity: 1; transform: translate(0,0) scale(1); } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.3); } }

.season-done { text-align: center; padding: 0.5rem 0 0.2rem; }
.season-done h2 { font-family: var(--display); font-weight: 900; text-transform: uppercase; letter-spacing: 0.04em; font-size: 1.5rem; }
.season-done p { color: var(--dim); font-size: 0.85rem; line-height: 1.5; margin: 0.4rem 0 1rem; }
.panel .ov-btn.big { width: 100%; }
.panel .ov-btn.ghost { width: 100%; margin-top: 0.5rem; }

/* ── single-page shell ────────────────────────────────────────── */
#app { position: relative; z-index: 1; min-height: 100%; }
#game { position: fixed; inset: 0; width: 100%; height: 100%; border: 0; z-index: 10; background: #060310; }

/* title: featured Career card (primary) + secondary mode cards + footer */
.feature-card { pointer-events: auto; text-decoration: none; color: var(--ink); display: flex; align-items: center; gap: 1.1rem; width: 100%; max-width: 720px; margin: 0.2rem 0 1.1rem; padding: 1.15rem 1.35rem; position: relative; overflow: hidden;
  background: linear-gradient(100deg, rgba(255,210,63,0.14), var(--panel) 58%); border: 1px solid rgba(255,210,63,0.34); border-radius: 4px; backdrop-filter: blur(10px);
  box-shadow: 0 18px 50px rgba(0,0,0,0.5), 0 0 40px -14px var(--gold); animation: rise 0.6s 0.16s cubic-bezier(.2,.9,.3,1.2) both; transition: transform 0.16s, box-shadow 0.16s, border-color 0.16s; }
.feature-card::before { content: ''; position: absolute; top: 0; left: 0; bottom: 0; width: 4px; background: var(--gold); box-shadow: 0 0 18px var(--gold); }
.feature-card:hover, .feature-card:focus-visible { transform: translateY(-4px); border-color: var(--gold); box-shadow: 0 26px 62px rgba(0,0,0,0.6), 0 0 54px -10px var(--gold); outline: none; }
.fc-emoji { font-size: 2.7rem; flex: none; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5)); }
.fc-txt { flex: 1; min-width: 0; text-align: left; }
.fc-kicker { font-family: var(--display); font-size: 0.56rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }
.fc-title { font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em; font-size: 1.3rem; color: var(--gold); margin: 0.12rem 0 0.28rem; text-shadow: 0 0 20px rgba(255,210,63,0.4); }
.fc-sub { font-size: 0.8rem; color: var(--dim); line-height: 1.4; }
.fc-go { font-family: var(--display); font-size: 1.5rem; color: var(--gold); flex: none; opacity: 0.85; }
.title-foot { margin-top: 1.5rem; font-family: var(--display); font-size: 0.58rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); animation: drop 0.7s 0.4s cubic-bezier(.2,.9,.3,1.2) both; }

/* career: next-race hero */
.next-hero { display: flex; gap: 1rem; align-items: stretch; margin-bottom: 1rem; position: relative; overflow: hidden;
  background: linear-gradient(100deg, rgba(255,45,149,0.12), var(--panel) 55%); border: 1px solid rgba(255,45,149,0.3); border-radius: 5px; backdrop-filter: blur(10px); box-shadow: 0 16px 44px rgba(0,0,0,0.5); }
.nh-prev { position: relative; width: 120px; flex: none; overflow: hidden; border-right: 1px solid var(--line); }
.nh-prev svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.nh-round { position: absolute; top: 0.4rem; left: 0.4rem; font-family: var(--display); font-weight: 800; font-size: 0.68rem; color: #fff; background: rgba(0,0,0,0.55); border: 1px solid var(--line2); border-radius: 3px; padding: 0.05rem 0.35rem; }
.nh-body { flex: 1; min-width: 0; padding: 0.9rem 1.05rem; display: flex; flex-direction: column; }
.nh-kicker { font-family: var(--display); font-size: 0.58rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--magenta); }
.nh-title { font-family: var(--racing); font-size: 1.65rem; line-height: 1; margin: 0.18rem 0; }
.nh-sub { font-size: 0.72rem; color: var(--dim); margin-bottom: 0.45rem; }
.nh-machine { font-size: 0.74rem; color: var(--dim); margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.45rem; }
.nh-machine b { color: var(--ink); } .nh-dot { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.nh-body .ov-btn { align-self: flex-start; margin-top: auto; }
.next-hero.done { text-align: center; padding: 0.6rem; } .next-hero.done .nh-body { align-items: center; }
@media (max-width: 560px) { .nh-prev { width: 90px; } .nh-title { font-size: 1.35rem; } }

/* ── mobile / touch controls ─────────────────────────────────────── */
.k-touch { display: none; }
.touchhints { display: none; position: absolute; inset: 0; pointer-events: none; opacity: 0.5; transition: opacity 0.9s ease; }
.touchhints.hide { opacity: 0; }
.th-side { position: absolute; top: 50%; transform: translateY(-50%); font-family: var(--display); font-weight: 800; font-size: 0.82rem; line-height: 1.15; letter-spacing: 0.12em; color: rgba(255,255,255,0.62); text-align: center; text-shadow: 0 2px 6px rgba(0,0,0,0.9); }
.th-left { left: 1rem; } .th-right { right: 1rem; }
.th-brake { position: absolute; bottom: calc(3.4rem + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: 36%; max-width: 190px; text-align: center; font-family: var(--display); font-weight: 800; font-size: 0.66rem; letter-spacing: 0.12em; color: rgba(255,255,255,0.64); border: 1.5px dashed rgba(255,255,255,0.32); border-radius: 12px; padding: 0.55rem 0.4rem; text-shadow: 0 2px 6px rgba(0,0,0,0.9); }
@media (pointer: coarse) { .k-touch { display: inline; } .k-key { display: none; } .touchhints { display: block; } }
/* bigger tap targets on touch */
@media (pointer: coarse) {
  .ov-btn { padding: 0.85rem 1.6rem; }
  .ov-btn.ghost { padding: 0.7rem 1.3rem; }
  .hud-btn { padding: 0.55rem 0.9rem; }
}
/* phone layout polish */
@media (max-width: 480px) {
  .career-wrap, .tracks-wrap, .vehsel-wrap, .menu-wrap { padding-left: 0.7rem; padding-right: 0.7rem; }
  .track-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.6rem; }
  .standings { font-size: 0.72rem; }
  .standings td, .standings th { padding-left: 0.25rem; padding-right: 0.25rem; }
  .season-hud .shud .v { font-size: 1rem; }
  .reveal-place { font-size: 3.4rem; }
  .ctrls { font-size: 0.78rem; }
}

/* ── animated 3D title scene + modern menu ───────────────────────── */
#titlecanvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: none; background: #0a0420; }
body.title #titlecanvas { display: block; }
body.title .title-bg { display: none; }   /* the live 3D scene replaces the CSS backdrop on the title */
.title-scanlines { position: fixed; inset: 0; z-index: 1; pointer-events: none; display: none; background: repeating-linear-gradient(rgba(0,0,0,0) 0 2px, rgba(0,0,0,0.16) 2px 3px); opacity: 0.55; }
body.title .title-scanlines { display: block; }

.title-menu { position: relative; z-index: 2; min-height: 100vh; box-sizing: border-box; display: flex; flex-direction: column; justify-content: space-between; gap: 1.35rem; max-width: 640px; margin: 0 auto; padding: 2.2rem 1.4rem calc(2rem + env(safe-area-inset-bottom)); }
.tm-head { text-align: center; padding: 1rem 1rem 1.6rem; border-radius: 12px; text-shadow: 0 2px 34px rgba(10,4,32,0.95); background: linear-gradient(180deg, rgba(9,3,26,0.9) 22%, rgba(9,3,26,0.55) 62%, transparent); }
.title-menu .logo.big { filter: drop-shadow(0 0 20px rgba(255,45,149,0.55)) drop-shadow(0 3px 12px rgba(0,0,0,0.95)); }   /* neon glow so it reads over the dark scene */
.tm-bottom { display: flex; flex-direction: column; gap: 1rem; }
.title-menu .logo.big { margin: 0.1rem 0; }
.tm-nav { display: flex; flex-direction: column; gap: 0.7rem; }
.tm-item { display: flex; align-items: center; gap: 0.9rem; text-decoration: none; color: var(--ink); padding: 0.95rem 1.1rem; border-radius: 4px; position: relative; overflow: hidden;
  background: linear-gradient(100deg, rgba(20,10,30,0.68), rgba(20,10,30,0.36)); border: 1px solid rgba(255,255,255,0.14); backdrop-filter: blur(6px);
  transition: transform .16s, border-color .16s, box-shadow .16s, background .16s; }
.tm-item::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--cyan); box-shadow: 0 0 14px var(--cyan); opacity: 0.75; transition: opacity .16s; }
.tm-item.primary::before { background: var(--gold); box-shadow: 0 0 16px var(--gold); }
.tm-item:hover, .tm-item:focus-visible { transform: translateX(6px); border-color: var(--cyan); box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 40px -12px var(--cyan); background: linear-gradient(100deg, rgba(32,14,46,0.82), rgba(32,14,46,0.42)); outline: none; }
.tm-item.primary:hover, .tm-item.primary:focus-visible { border-color: var(--gold); box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 44px -10px var(--gold); }
.tm-ic { font-size: 1.7rem; flex: none; filter: drop-shadow(0 3px 8px rgba(0,0,0,0.6)); }
.tm-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.14rem; }
.tm-tx b { font-family: var(--display); font-weight: 800; font-size: 1.02rem; letter-spacing: 0.03em; text-transform: uppercase; }
.tm-item.primary .tm-tx b { color: var(--gold); text-shadow: 0 0 18px rgba(255,210,63,0.4); }
.tm-tx em { font-style: normal; font-size: 0.72rem; color: var(--dim); line-height: 1.35; }
.tm-go { font-family: var(--display); color: var(--cyan); opacity: 0.7; transition: transform .16s, opacity .16s; }
.tm-item:hover .tm-go { transform: translateX(4px); opacity: 1; }
.tm-foot { font-family: var(--display); font-size: 0.56rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }

/* ── driver creator ──────────────────────────────────────────────── */
.creator { display: grid; grid-template-columns: minmax(150px, 230px) 1fr; gap: 1.4rem; align-items: start; margin-top: 0.5rem; }
.creator-prev { background: linear-gradient(160deg, rgba(37,231,255,0.1), rgba(20,6,40,0.55)); border: 1px solid var(--line2); border-radius: 10px; padding: 1rem; display: flex; align-items: center; justify-content: center; box-shadow: inset 0 0 44px -18px var(--dc, #25e7ff); }
.creator-prev svg { width: 100%; max-width: 200px; height: auto; filter: drop-shadow(0 6px 18px rgba(0,0,0,0.5)); }
.creator-opts h4 { font-family: var(--display); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); margin: 0.95rem 0 0.45rem; }
.creator-opts h4:first-child { margin-top: 0; }
.creator-opts h4 em { font-style: normal; color: var(--faint); text-transform: none; letter-spacing: 0; font-size: 0.66rem; margin-left: 0.45rem; }
.sw-row, .opt-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.sw { width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.22); cursor: pointer; padding: 0; transition: transform .12s, border-color .12s, box-shadow .12s; }
.sw:hover { transform: scale(1.1); }
.sw.on { border-color: #fff; box-shadow: 0 0 0 2px var(--cyan), 0 0 14px var(--cyan); transform: scale(1.12); }
.opt { font-family: var(--display); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.04em; padding: 0.5rem 0.9rem; border-radius: 7px; cursor: pointer; color: var(--ink); background: rgba(255,255,255,0.06); border: 1px solid var(--line2); transition: background .12s, color .12s, border-color .12s; }
.opt:hover { border-color: var(--cyan); }
.opt.on { background: var(--cyan); color: #04121a; border-color: transparent; }
.creator-opts .ov-btn.big { margin-top: 1.4rem; width: 100%; }
@media (max-width: 520px) { .creator { grid-template-columns: 1fr; } .creator-prev { max-width: 220px; margin: 0 auto; } }

[data-go] { cursor: pointer; }

/* ── CAREER: the week screen ─────────────────────────────────────────────── */
.wk-hud { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin: .2rem 0 .5rem; }
.wk-cell { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: .6rem .7rem; }
.wk-cell b { display: block; font-family: var(--display); font-size: 1.05rem; letter-spacing: .02em; }
.wk-cell b.bad { color: #ff3b6b; }
.wk-cell em { font-style: normal; font-size: .68rem; opacity: .6; }
.wk-flags { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .9rem; }
.hb { font-size: .7rem; font-weight: 700; padding: .3rem .6rem; border-radius: 999px; border: 1px solid currentColor; }
.hb.hurt { color: #ff8a5c; } .hb.prot { color: #6fe3a0; } .hb.debt { color: #ffd23f; } .hb.jail { color: #ff3b6b; }

.ev-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .7rem; }
.ev-tile { text-align: left; font: inherit; color: var(--ink); cursor: pointer; position: static;
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.15); border-left: 3px solid var(--cyan); border-radius: 12px; padding: .8rem .85rem;
  display: flex; flex-direction: column; gap: .4rem; min-height: 132px; transition: transform .12s ease, border-color .12s ease; }
.ev-tile:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--cyan); }
.ev-tile.care { border-left-color: #6fe3a0; }
.ev-tile.prison { border-left-color: #ff3b6b; background: linear-gradient(180deg, rgba(255,59,107,.1), rgba(255,255,255,.02)); }
.ev-tile.locked { opacity: .42; cursor: default; }
.ev-top { display: flex; align-items: center; gap: .45rem; }
.ev-ic { font-size: 1.05rem; }
.ev-nm { font-family: var(--display); font-weight: 800; font-size: .95rem; flex: 1; }
.ev-fee { font-size: .78rem; font-weight: 800; color: var(--gold, #ffd23f); }
.ev-blurb { font-size: .76rem; opacity: .72; line-height: 1.35; }
.ev-facts { display: flex; flex-wrap: wrap; gap: .3rem .7rem; font-size: .7rem; opacity: .85; margin-top: auto; }
.ev-pay { font-size: .7rem; color: #9fe08a; }
.ev-no { font-size: .68rem; color: #ff8a5c; }

.run-hero { border-left: 3px solid var(--magenta, #ff2d95); }
.run-hero.prison { border-left-color: #ff3b6b; }
.rh-kick { font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; opacity: .6; }
.run-hero h2 { font-family: var(--display); font-size: 1.5rem; margin: .1rem 0 .3rem; }
.rh-sub { font-size: .82rem; opacity: .75; margin-bottom: .7rem; }
.rh-prog { position: relative; height: 20px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; margin-bottom: .7rem; }
.rh-prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--magenta)); }
.rh-prog span { position: absolute; inset: 0; display: grid; place-items: center; font-size: .68rem; font-weight: 700; }
.rh-facts { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .72rem; opacity: .8; margin-bottom: .8rem; }
.run-tbl { width: 100%; margin-top: .8rem; font-size: .78rem; border-collapse: collapse; }
.run-tbl th, .run-tbl td { text-align: left; padding: .28rem .3rem; border-bottom: 1px solid rgba(255,255,255,.08); }

.hist-row { display: flex; gap: .6rem; align-items: baseline; font-size: .76rem; padding: .35rem 0; border-bottom: 1px solid rgba(255,255,255,.07); }
.hist-row b { flex: 1; } .hist-row .hp { color: #9fe08a; }
.world-stat { display: flex; gap: 1.2rem; font-size: .78rem; opacity: .75; }

.report-panel h2, .death-panel h2, .loan-panel h2 { font-family: var(--display); font-size: 1.45rem; margin-bottom: .6rem; }
.rep-line { font-size: .86rem; line-height: 1.5; margin: .3rem 0; }
.rep-line.good { color: #9fe08a; } .rep-line.bad { color: #ff5c7a; } .rep-line.dim { opacity: .6; }
.rep-sec { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; opacity: .55; margin: .8rem 0 .2rem; }
.death-panel { text-align: center; border: 1px solid rgba(255,59,107,.4); }
.death-mark { font-size: 3.4rem; line-height: 1; margin-bottom: .3rem; }
.loan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .7rem; margin: .8rem 0; }
.loan-opt { display: flex; flex-direction: column; gap: .22rem; text-align: left; font: inherit; color: var(--ink); cursor: pointer;
  position: static; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16); border-radius: 10px; padding: .75rem; }
.loan-opt:hover { border-color: var(--gold, #ffd23f); }
.loan-opt b { font-family: var(--display); font-size: .95rem; }
.lo-amt { font-size: 1.15rem; font-weight: 800; color: #ffd23f; }
.lo-terms { font-size: .74rem; opacity: .8; } .lo-note { font-size: .72rem; opacity: .6; } .lo-tot { font-size: .72rem; color: #ff8a5c; }
@media (max-width: 560px) {
  .wk-hud { grid-template-columns: 1fr 1fr; }
  .ev-grid { grid-template-columns: 1fr; }
  .ev-tile { min-height: 0; }
}
