/* ==================================================================
   FFX Runner Remastered — title screen, loading screen and panels.
   Language: early-2000s arcade racer remastered — chrome + racing
   yellow, condensed italic type, angled (parallelogram) controls,
   dark glass over a live 3D backdrop.
   ================================================================== */
:root {
  --y: #ffd21e;
  --y2: #ffb000;
  --ink: #f6f3ea;
  --dim: rgba(246, 243, 234, .64);
  --glass: rgba(9, 12, 20, .62);
  --glass-2: rgba(16, 21, 33, .78);
  --edge: rgba(255, 255, 255, .13);
  --red: #ff3b2f;
  --cond: "Saira Condensed", "Arial Narrow", system-ui, sans-serif;
  --sans: "Saira", system-ui, sans-serif;
}

/* ---------- logo lockup (shared by loading + title) ---------------- */
.t2-logo { margin: 0; line-height: .82; font-family: var(--cond); font-weight: 900; font-style: italic; text-transform: uppercase;
  display: flex; flex-direction: column; letter-spacing: -.02em; transform: skewX(-4deg); }
.t2-ffx { font-size: clamp(64px, 9.5vw, 132px);
  background: linear-gradient(180deg, #ffffff 0%, #d9e2ec 38%, #7d8a99 52%, #f4f7fb 70%, #aab4c0 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 #0b0f17) drop-shadow(0 10px 22px rgba(0,0,0,.55));
  /* background-clip:text only paints inside the box; the italic X overhangs it */
  padding: .08em .16em .02em .04em; margin: -.08em -.16em -.02em -.04em; }
.t2-runner { font-size: clamp(52px, 7.6vw, 108px); color: var(--y); margin-top: -.06em;
  -webkit-text-stroke: 3px #1b1300; paint-order: stroke fill;
  text-shadow: 0 5px 0 #8a5a00, 0 12px 28px rgba(255, 180, 0, .35); }
.t2-sub { margin: 10px 0 0; display: flex; align-items: center; gap: 12px; font: 700 15px var(--sans);
  letter-spacing: .5em; text-transform: uppercase; color: var(--ink); }
.t2-sub::before, .t2-sub::after { content: ""; height: 2px; flex: 0 0 34px; background: linear-gradient(90deg, transparent, var(--y)); }
.t2-sub::after { background: linear-gradient(90deg, var(--y), transparent); }

/* ---------- loading -------------------------------------------- */
.load2.overlay { backdrop-filter: none; }
.load2 { background: radial-gradient(120% 80% at 50% 40%, #1a2333 0%, #070a10 70%) !important; display: grid; place-items: center; }
.load2-inner { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 24px; }
.load2 .t2-logo { align-items: center; }
.load2 .bar { width: min(420px, 80vw); height: 8px; margin-top: 26px; border-radius: 6px; background: rgba(255,255,255,.1); overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); transform: skewX(-14deg); }
.load2 #loadBar { height: 100%; width: 0; background: linear-gradient(90deg, var(--y2), var(--y), #fff6b8); box-shadow: 0 0 16px rgba(255,210,30,.7); transition: width .25s; }
.load2 #loadMsg { margin: 10px 0 0; font: 600 13px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.load2-tip { margin: 22px 0 0; max-width: 460px; font: 500 15px/1.45 var(--sans); color: var(--dim); }

/* ---------- title screen ------------------------------------------ */
#menu.title2 { position: absolute; inset: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none;
  align-items: stretch; justify-content: stretch; display: grid;
  grid-template-columns: minmax(340px, 1fr) minmax(320px, 420px); grid-template-rows: 1fr auto;
  gap: 18px 36px; padding: calc(var(--banner-h, 48px) + 24px) clamp(22px, 4.5vw, 64px) 18px; color: var(--ink);
  font-family: var(--sans); overflow: hidden; }
#menu.title2.hidden { display: none; }
.t2-shade { position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(5,8,14,.86) 0%, rgba(5,8,14,.55) 36%, rgba(5,8,14,0) 62%),
    linear-gradient(0deg, rgba(5,8,14,.85) 0%, rgba(5,8,14,0) 26%),
    radial-gradient(90% 70% at 70% 40%, transparent 50%, rgba(5,8,14,.5) 100%); }
.t2-left, .t2-car, .t2-foot, .t2-panel { position: relative; z-index: 1; }
.t2-left { display: grid; align-content: center; gap: 30px; animation: t2-in .6s cubic-bezier(.2,.9,.3,1) both; }
.t2-kicker { margin: 0 0 12px; font: 600 12px var(--sans); letter-spacing: .3em; text-transform: uppercase; color: var(--y); }
.t2-story { margin: 18px 0 0; max-width: 430px; font: 500 16px/1.5 var(--sans); color: var(--dim); }

.t2-actions { display: grid; gap: 10px; max-width: 400px; }
.t2-btn { --skew: -12deg; position: relative; display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 14px;
  padding: 9px 22px 9px 14px; border: 0; cursor: pointer; text-align: left; color: var(--ink);
  background: linear-gradient(90deg, rgba(255,255,255,.07), rgba(255,255,255,.02)), var(--glass);
  clip-path: polygon(14px 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
  box-shadow: inset 4px 0 0 var(--y);
  transition: transform .18s cubic-bezier(.3,1.4,.5,1), background .18s, box-shadow .18s; }
.t2-btn img { width: 44px; height: 44px; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(0,0,0,.5)); }
.t2-btn-txt { display: grid; gap: 1px; }
.t2-btn b { font: 800 italic 24px/1 var(--cond); letter-spacing: .02em; text-transform: uppercase; }
.t2-btn small { font: 500 12px var(--sans); color: var(--dim); letter-spacing: .04em; }
.t2-btn kbd { font: 700 11px var(--sans); }
.t2-btn:hover, .t2-btn:focus-visible { transform: translateX(8px); background: linear-gradient(90deg, rgba(255,210,30,.18), rgba(255,255,255,.03)), var(--glass-2); outline: none; }
.t2-btn[aria-expanded="true"] { box-shadow: inset 4px 0 0 var(--y), inset 0 0 0 1px rgba(255,210,30,.45); }
.t2-btn.is-primary { padding-top: 14px; padding-bottom: 14px; color: #160f00;
  background: linear-gradient(180deg, #fff3a6 0%, var(--y) 42%, var(--y2) 100%);
  box-shadow: 0 0 0 0 rgba(255,210,30,.6); animation: t2-glow 2.4s ease-in-out infinite; }
.t2-btn.is-primary b { font-size: 34px; }
.t2-btn.is-primary small { color: rgba(22,15,0,.7); }
.t2-btn.is-primary:hover, .t2-btn.is-primary:focus-visible { background: linear-gradient(180deg, #fffbd6 0%, #ffe14d 45%, var(--y) 100%); }
@keyframes t2-glow { 50% { filter: drop-shadow(0 0 18px rgba(255,210,30,.55)); } }

kbd { display: inline-block; min-width: 1.7em; padding: 2px 6px; border-radius: 5px; text-align: center;
  font: 700 12px/1.3 var(--sans); color: var(--ink); background: linear-gradient(180deg, #3a4354, #222936);
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.12); }
.t2-btn.is-primary kbd { color: #160f00; background: rgba(255,255,255,.5); box-shadow: inset 0 -2px 0 rgba(0,0,0,.18); }

/* ---- car card ---- */
.t2-car { align-self: end; margin-bottom: 8px; padding: 18px 20px 16px; display: grid; gap: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,0) 30%), var(--glass);
  border: 1px solid var(--edge); border-radius: 18px; backdrop-filter: blur(10px) saturate(1.2); -webkit-backdrop-filter: blur(10px) saturate(1.2);
  box-shadow: 0 24px 60px rgba(0,0,0,.45); animation: t2-in .6s .08s cubic-bezier(.2,.9,.3,1) both; }
.t2-car-head { display: grid; gap: 4px; }
.t2-drive { justify-self: start; padding: 3px 10px; border-radius: 6px; font: 800 italic 14px var(--cond); letter-spacing: .12em; color: #0b0f17; background: var(--y); }
.t2-drive[data-drive="RWD"] { background: #ff6a4a; color: #fff; }
.t2-drive[data-drive="AWD"] { background: #3aa0ff; color: #fff; }
.t2-car-name { margin: 2px 0 0; font: 900 italic 46px/0.95 var(--cond); text-transform: uppercase; letter-spacing: -.01em; }
.t2-car-tag { margin: 0; font: 500 14px/1.45 var(--sans); color: var(--dim); }
.t2-stats { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 7px 14px; align-items: center; }
.t2-stats dt { font: 600 11px var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--dim); }
.t2-stats dd { margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; transform: skewX(-14deg); }
.t2-stats dd i { height: 9px; border-radius: 2px; background: rgba(255,255,255,.1); }
.t2-stats dd i.on { background: linear-gradient(180deg, #fff3a6, var(--y)); box-shadow: 0 0 8px rgba(255,210,30,.45); }

.t2-strip { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.t2-strip .car-chip { width: 100%; height: 100%; min-height: 54px; padding: 7px 8px; display: grid; align-content: center; gap: 2px; cursor: pointer;
  border: 1px solid var(--edge); border-radius: 10px; color: var(--ink); background: rgba(255,255,255,.04); text-align: left; transition: border-color .15s, background .15s, transform .15s; }
.t2-strip .car-chip strong { font: 800 italic 15px/1 var(--cond); text-transform: uppercase; }
.t2-strip .car-chip small { display: none; }
.t2-strip .car-chip .chip-state { font: 600 10px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.t2-strip .car-chip:hover:not(:disabled) { transform: translateY(-2px); border-color: rgba(255,210,30,.5); }
.t2-strip .car-chip[aria-checked="true"] { border-color: var(--y); background: rgba(255,210,30,.14); box-shadow: inset 0 -3px 0 var(--y); }
.t2-strip .car-chip:disabled { opacity: .42; cursor: not-allowed; }
.t2-paint { display: flex; align-items: center; gap: 12px; }
.t2-lab { font: 600 11px var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--dim); }
.title2 .swatches { display: flex; gap: 8px; }
.title2 .swatch { width: 28px; height: 28px; border-radius: 50%; cursor: pointer; border: 2px solid rgba(255,255,255,.25);
  box-shadow: inset 0 -6px 10px rgba(0,0,0,.35), inset 0 4px 8px rgba(255,255,255,.35); transition: transform .15s; }
.title2 .swatch[aria-checked="true"] { border-color: #fff; transform: scale(1.12); box-shadow: 0 0 0 3px var(--y), inset 0 -6px 10px rgba(0,0,0,.35); }

/* ---- slide-in panels (settings, leaderboard) ---- */
.t2-panel { position: absolute; z-index: 3; right: clamp(18px, 4vw, 56px); top: calc(var(--banner-h, 48px) + 24px);
  width: min(420px, calc(100% - 36px)); max-height: calc(100% - var(--banner-h, 48px) - 120px); overflow: auto;
  padding: 16px 18px; background: var(--glass-2); border: 1px solid var(--edge); border-radius: 18px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 30px 80px rgba(0,0,0,.6);
  animation: t2-panel .28s cubic-bezier(.2,.9,.3,1) both; }
.t2-panel.hidden { display: none; }
.t2-panel header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.t2-panel h3 { margin: 0; font: 900 italic 26px var(--cond); text-transform: uppercase; }
.t2-x { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--edge); background: rgba(255,255,255,.06); color: var(--ink); font-size: 20px; cursor: pointer; }
.t2-board { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; counter-reset: pos; }
.t2-board li { display: grid; grid-template-columns: 30px 1fr auto auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px;
  background: rgba(255,255,255,.04); font: 500 14px var(--sans); counter-increment: pos; }
.t2-board li::before { content: counter(pos); font: 900 italic 20px var(--cond); color: var(--dim); text-align: center; }
.t2-board li:nth-child(1)::before { color: var(--y); }
.t2-board li:nth-child(2)::before { color: #e1e7ef; }
.t2-board li:nth-child(3)::before { color: #e09a5a; }
.t2-board .b-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t2-board .b-car { font-size: 12px; color: var(--dim); }
.t2-board .b-time { font: 800 18px var(--cond); color: var(--y); font-variant-numeric: tabular-nums; }
.t2-board li.t2-board-empty { display: block; color: var(--dim); text-align: center; }
.t2-board li.t2-board-empty::before { content: none; }

.t2-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; font: 500 13px var(--sans); color: var(--dim); }
.t2-foot kbd { margin-right: 3px; }
.t2-credit { margin-left: auto; }
.t2-credit a { color: var(--ink); }

@keyframes t2-in { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
@keyframes t2-panel { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

/* settings form inside the panel */
.t2-panel .options-form { display: grid; gap: 12px; }
.t2-panel .opt-row { display: grid; gap: 6px; }
.t2-panel .opt-row > span, .t2-panel .opt-label { font: 600 12px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.t2-panel .seg, .t2-panel .segmented, #pauseSettings .segmented { display: flex; flex-wrap: wrap; gap: 6px; }
.t2-panel .opt-toggle { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
/* the switch itself is styled in styles.css (.opt-toggle input): an 18 px override here squashed the pill into a dot with the knob hanging out of it */
.t2-panel .opt-toggle input { flex: none; margin-top: 2px; }
.t2-panel .opt-toggle-text { display: grid; gap: 2px; }
.t2-panel .seg-btn, #pauseSettings .seg-btn { padding: 7px 14px; border-radius: 8px; border: 1px solid var(--edge); background: rgba(255,255,255,.05); color: var(--ink);
  font: 700 italic 15px var(--cond); text-transform: uppercase; letter-spacing: .04em; cursor: pointer; }
.t2-panel .seg-btn[aria-checked="true"], #pauseSettings .seg-btn[aria-checked="true"] { background: var(--y); color: #160f00; border-color: var(--y); }
.t2-panel .opt-impact, .t2-panel .opt-desc { font-size: 12px; color: var(--dim); margin: 0; }

@media (max-width: 900px) {
  #menu.title2 { grid-template-columns: 1fr; grid-template-rows: auto auto auto; overflow: auto; gap: 18px; }
  .t2-left { gap: 18px; }
  .t2-story { display: none; }
  .t2-car { align-self: start; }
  .t2-credit { margin-left: 0; }
}

/* ==================================================================
   In-game panels: pause, game over, win, controls, garage
   ================================================================== */
#pause, #gameover, #win, #help, #setup, #unsupported { background: radial-gradient(100% 80% at 50% 50%, rgba(5,8,14,.55), rgba(5,8,14,.86)); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
#pause .panel, #gameover .panel, #win .panel, #help .panel, #setup .panel, #unsupported .panel {
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,0) 30%), var(--glass-2);
  border: 1px solid var(--edge); border-radius: 20px; box-shadow: 0 30px 80px rgba(0,0,0,.6); color: var(--ink); font-family: var(--sans); }
#pause h2, #gameover h2, #win h2, #help h2, #setup h2 { font: 900 italic clamp(34px, 4vw, 52px)/1 var(--cond); text-transform: uppercase; letter-spacing: -.01em; margin: 0 0 8px; }
#win h2 { color: var(--y); -webkit-text-stroke: 1.5px #2a1d00; paint-order: stroke fill; text-shadow: 0 4px 0 rgba(0,0,0,.3), 0 0 30px rgba(255,210,30,.45); }
#gameover h2 { color: #fff; text-shadow: 0 0 30px rgba(255,59,47,.6); }
.btn { border: 0; cursor: pointer; padding: 11px 22px; color: var(--ink); background: rgba(255,255,255,.08);
  font: 800 italic 18px var(--cond); letter-spacing: .04em; text-transform: uppercase;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%); transition: transform .15s, background .15s; }
.btn:hover, .btn:focus-visible { background: rgba(255,210,30,.2); transform: translateY(-1px); outline: none; }
.btn.primary { color: #160f00; background: linear-gradient(180deg, #fff3a6 0%, var(--y) 45%, var(--y2) 100%); }
.btn.primary:hover { background: linear-gradient(180deg, #fffbd6, #ffe14d); }
.btn.ghost { box-shadow: inset 0 0 0 1px var(--edge); background: rgba(255,255,255,.04); }

.result-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0 18px; }
.result-stats div { padding: 10px; border-radius: 12px; background: rgba(255,255,255,.05); text-align: center; }
.result-stats b { display: block; font: 800 italic 26px var(--cond); color: var(--y); font-variant-numeric: tabular-nums; }
.result-stats span { font: 600 10px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.submit-row { display: flex; gap: 8px; margin: 0 0 14px; }
.submit-row input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--edge); background: rgba(0,0,0,.35); color: var(--ink); font: 600 16px var(--sans); }
.submit-row input:focus { outline: 2px solid var(--y); outline-offset: 1px; }
.submit-note { margin: -6px 0 12px; font-size: 13px; color: var(--dim); min-height: 1.2em; }

/* Touch devices: no keyboard hints */
html.is-touch .t2-btn kbd, html.is-touch .t2-foot span:not(.t2-credit) { display: none; }

/* ==================================================================
   Arcade menu (v2.4): one cursor, items that slide in and out, and a
   dedicated car-select step between Drive and the run.
   ================================================================== */
#menu.title2 { grid-template-columns: minmax(340px, 560px) 1fr; }
a.t2-btn { text-decoration: none; }
.t2-actions > :nth-child(1) { --i: 0; } .t2-actions > :nth-child(2) { --i: 1; } .t2-actions > :nth-child(3) { --i: 2; }
.t2-actions > :nth-child(4) { --i: 3; } .t2-actions > :nth-child(5) { --i: 4; } .t2-actions > :nth-child(6) { --i: 5; }

/* the cursor: whichever item has focus (mouse hover moves focus too) */
.t2-btn { overflow: hidden; }
.t2-btn::after { content: ""; position: absolute; inset: -20% auto -20% 0; width: 38%; pointer-events: none; opacity: 0;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent); transform: translateX(-160%) skewX(-18deg); }
.t2-btn img { transition: transform .22s cubic-bezier(.3,1.6,.5,1); }
.t2-btn:focus { outline: none; }
.t2-btn:focus, .t2-btn:focus-visible { transform: translateX(16px) scale(1.02); box-shadow: inset 8px 0 0 var(--y), 0 10px 30px rgba(0,0,0,.35);
  background: linear-gradient(90deg, rgba(255,210,30,.28), rgba(255,255,255,.04)), var(--glass-2); }
.t2-btn.is-primary:focus { background: linear-gradient(180deg, #fffbd6 0%, #ffe14d 45%, var(--y) 100%); box-shadow: inset 8px 0 0 #fff, 0 0 26px rgba(255,210,30,.6); }
.t2-btn:focus img { transform: scale(1.16) rotate(-8deg); }
.t2-btn:focus::after { opacity: 1; animation: t2-sheen .7s ease-out; }
.t2-actions:focus-within .t2-btn:not(:focus) { opacity: .72; }
@keyframes t2-sheen { to { transform: translateX(380%) skewX(-18deg); } }

/* entry / exit */
#menu.entering .t2-brand { animation: t2-logo-in .75s cubic-bezier(.2,1.5,.4,1) both; }
#menu.entering .t2-actions > * { animation: t2-item-in .5s cubic-bezier(.2,1.3,.4,1) both; animation-delay: calc(.15s + var(--i) * .07s); }
#menu.entering .t2-foot { animation: t2-fade-in .6s .5s both; }
#menu.leaving .t2-brand { animation: t2-logo-out .3s ease-in both; }
#menu.leaving .t2-actions > * { animation: t2-item-out .26s ease-in both; animation-delay: calc(var(--i) * .03s); }
#menu.leaving .t2-foot, #menu.leaving .t2-panel { animation: t2-fade-out .2s both; }
@keyframes t2-logo-in { from { transform: translateY(-40px) scale(1.25); opacity: 0; filter: blur(6px); } }
@keyframes t2-logo-out { to { transform: translateY(-50px) scale(.9); opacity: 0; } }
@keyframes t2-item-in { from { transform: translateX(-115%) skewX(-14deg); opacity: 0; } }
@keyframes t2-item-out { to { transform: translateX(-120%) skewX(-14deg); opacity: 0; } }
@keyframes t2-fade-in { from { opacity: 0; } }
@keyframes t2-fade-out { to { opacity: 0; } }

/* ---------- car select ---------- */
#carSelect.cs { position: absolute; inset: 0; z-index: 6; display: grid; color: var(--ink); font-family: var(--sans);
  grid-template-columns: 1fr minmax(320px, 410px); grid-template-rows: auto 1fr auto auto;
  gap: 12px 34px; padding: calc(var(--banner-h, 48px) + 18px) clamp(18px, 4vw, 60px) 16px;
  background: none; backdrop-filter: none; -webkit-backdrop-filter: none; pointer-events: none; overflow: hidden; }
#carSelect.cs.hidden { display: none; }
#carSelect.cs > * { pointer-events: auto; }
/* the wipe covers the whole screen above the controls: it must never take clicks
   (the rule above out-ranked .cs-wipe's own pointer-events: none) */
#carSelect.cs > .cs-wipe { pointer-events: none; }
#carSelect.cs::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(270deg, rgba(5,8,14,.85) 0%, rgba(5,8,14,.45) 30%, rgba(5,8,14,0) 52%),
              linear-gradient(0deg, rgba(5,8,14,.9) 0%, rgba(5,8,14,0) 30%), linear-gradient(180deg, rgba(5,8,14,.6), rgba(5,8,14,0) 22%); }
.cs-top { grid-column: 1 / -1; position: relative; }
.cs-step { margin: 0 0 4px; font: 600 12px var(--sans); letter-spacing: .3em; text-transform: uppercase; color: var(--y); }
.cs-step b { color: var(--ink); font-weight: 700; }
.cs-title { margin: 0; font: 900 italic clamp(40px, 5.4vw, 72px)/.9 var(--cond); text-transform: uppercase;
  background: linear-gradient(180deg, #fff 0%, #dbe3ee 40%, #7d8a99 55%, #f4f7fb 75%); -webkit-background-clip: text; background-clip: text; color: transparent;
  padding: .06em .14em .02em .02em; margin-left: -.02em; filter: drop-shadow(0 3px 0 #0b0f17) drop-shadow(0 12px 24px rgba(0,0,0,.6)); }

.cs-info { grid-column: 2; grid-row: 2; align-self: center; position: relative; display: grid; gap: 12px; padding: 22px 22px 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,0) 30%), var(--glass);
  border: 1px solid var(--edge); border-top: 3px solid var(--car-accent, var(--y)); border-radius: 18px;
  backdrop-filter: blur(10px) saturate(1.2); -webkit-backdrop-filter: blur(10px) saturate(1.2); box-shadow: 0 24px 60px rgba(0,0,0,.45); }
.cs-drive { justify-self: start; }
.cs-name { margin: 0; font: 900 italic clamp(40px, 4.4vw, 60px)/.92 var(--cond); text-transform: uppercase; letter-spacing: -.01em;
  color: #fff; text-shadow: 0 4px 0 rgba(0,0,0,.35), 0 0 30px color-mix(in srgb, var(--car-accent, #ffd21e) 50%, transparent); }
.cs-tag { margin: 0; font: 500 15px/1.45 var(--sans); color: var(--dim); }
.cs-lock { margin: 0; padding: 8px 12px; border-radius: 10px; font: 500 13px var(--sans); color: #ffd6d3; background: rgba(255,59,47,.14); box-shadow: inset 0 0 0 1px rgba(255,59,47,.45); }
.cs-lock b { margin-right: 6px; font: 800 italic 15px var(--cond); text-transform: uppercase; color: #ff6a5f; }
.cs-info.swap .cs-name { animation: cs-name-in .42s cubic-bezier(.2,1.4,.4,1) both; }
.cs-info.swap .cs-tag, .cs-info.swap .cs-drive { animation: t2-fade-in .35s .08s both; }
.cs-info.swap .t2-stats dd i.on { animation: cs-bar .45s cubic-bezier(.2,1.2,.4,1) both; }
.cs-info.swap .t2-stats dd i:nth-child(2) { animation-delay: .04s; } .cs-info.swap .t2-stats dd i:nth-child(3) { animation-delay: .08s; }
.cs-info.swap .t2-stats dd i:nth-child(4) { animation-delay: .12s; } .cs-info.swap .t2-stats dd i:nth-child(5) { animation-delay: .16s; }
@keyframes cs-name-in { from { transform: translateX(40px) skewX(-12deg); opacity: 0; } }
@keyframes cs-bar { from { transform: scaleX(0); transform-origin: left; } }

.cs-arrow { position: absolute; top: 50%; z-index: 2; width: 64px; height: 96px; border: 0; cursor: pointer; color: #160f00;
  background: linear-gradient(180deg, #fff3a6, var(--y) 50%, var(--y2)); clip-path: polygon(22% 0, 100% 0, 78% 100%, 0 100%);
  font-size: 28px; transform: translateY(-50%); transition: transform .15s cubic-bezier(.3,1.6,.5,1), filter .15s; filter: drop-shadow(0 8px 18px rgba(0,0,0,.45)); }
.cs-arrow.prev { left: clamp(14px, 3vw, 48px); }
.cs-arrow.next { right: calc(410px + clamp(18px, 4vw, 60px) + 34px); }
.cs-arrow:hover, .cs-arrow:focus-visible { transform: translateY(-50%) scale(1.1); filter: drop-shadow(0 0 20px rgba(255,210,30,.7)); outline: none; }
.cs-arrow.kick.prev { animation: cs-kick-l .25s ease-out; } .cs-arrow.kick.next { animation: cs-kick-r .25s ease-out; }
@keyframes cs-kick-l { 40% { transform: translateY(-50%) translateX(-10px) scale(1.12); } }
@keyframes cs-kick-r { 40% { transform: translateY(-50%) translateX(10px) scale(1.12); } }

.cs-strip { grid-column: 1 / -1; grid-row: 3; list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.cs-strip .car-chip { min-width: 120px; padding: 8px 14px; display: grid; gap: 2px; cursor: pointer; text-align: left; color: var(--ink);
  border: 1px solid var(--edge); background: var(--glass); clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  transition: transform .15s, background .15s; }
.cs-strip .car-chip strong { font: 800 italic 17px/1 var(--cond); text-transform: uppercase; }
.cs-strip .car-chip small { display: none; }
.cs-strip .car-chip .chip-state { font: 600 10px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.cs-strip .car-chip.locked { opacity: .55; }
.cs-strip .car-chip.locked .chip-state::before { content: "🔒 "; }
.cs-strip .car-chip:hover, .cs-strip .car-chip:focus-visible { transform: translateY(-3px); outline: none; background: rgba(255,210,30,.14); }
.cs-strip .car-chip[aria-current="true"] { opacity: 1; color: #160f00; background: linear-gradient(180deg, #fff3a6, var(--y) 55%, var(--y2)); transform: translateY(-4px) scale(1.06); }
.cs-strip .car-chip[aria-current="true"] strong { color: #160f00; }
.cs-strip .car-chip[aria-current="true"] .chip-state { color: rgba(22,15,0,.7); }

.cs-paint .swatch { width: 30px; height: 30px; border-radius: 50%; cursor: pointer; border: 2px solid rgba(255,255,255,.25); transition: transform .15s; }
.cs-paint .swatches { display: flex; gap: 9px; }
.cs-paint .swatch[aria-checked="true"] { border-color: #fff; transform: scale(1.15); box-shadow: 0 0 0 3px var(--y); }

.cs-actions { grid-column: 1 / -1; grid-row: 4; display: flex; justify-content: center; gap: 14px; }
.cs-btn { display: inline-flex; align-items: center; gap: 12px; min-height: 58px; padding: 0 30px; border: 0; cursor: pointer;
  font: 900 italic 26px var(--cond); text-transform: uppercase; letter-spacing: .03em; color: var(--ink);
  clip-path: polygon(14px 0, 100% 0, calc(100% - 14px) 100%, 0 100%); transition: transform .15s cubic-bezier(.3,1.6,.5,1), filter .15s; }
.cs-btn.ghost { background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.03)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); font-size: 20px; }
.cs-btn.go { min-width: 260px; justify-content: center; color: #160f00; background: linear-gradient(180deg, #fff6b8 0%, #ffe14a 25%, var(--y) 55%, var(--y2) 100%);
  animation: t2-glow 2.2s ease-in-out infinite; position: relative; overflow: hidden; }
.cs-btn.go b { font-size: 34px; }
.cs-btn.go kbd { color: #160f00; background: rgba(255,255,255,.5); box-shadow: inset 0 -2px 0 rgba(0,0,0,.18); }
.cs-btn.go::after { content: ""; position: absolute; inset: -30% auto -30% 0; width: 40%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.85), transparent);
  transform: translateX(-160%) skewX(-18deg); animation: cs-sheen 2.6s cubic-bezier(.5,0,.3,1) infinite; mix-blend-mode: soft-light; }
@keyframes cs-sheen { 0%, 50% { transform: translateX(-160%) skewX(-18deg); } 100% { transform: translateX(380%) skewX(-18deg); } }
.cs-btn:hover, .cs-btn:focus-visible { transform: scale(1.05); outline: none; filter: drop-shadow(0 0 18px rgba(255,210,30,.55)); }
.cs-btn.go:disabled { cursor: not-allowed; animation: none; filter: grayscale(.8) brightness(.7); }
.cs-hint { grid-column: 1 / -1; grid-row: 4; justify-self: end; align-self: center; margin: 0; font: 600 12px var(--sans); color: var(--ink); opacity: .85; text-shadow: 0 1px 3px #000; }

/* diagonal yellow wipe when the screen arrives */
.cs-wipe { position: absolute; inset: 0; pointer-events: none; z-index: 5; opacity: 0;
  background: linear-gradient(105deg, transparent 0 38%, rgba(255,210,30,.9) 38% 46%, #fff 46% 47%, rgba(255,210,30,.9) 47% 55%, transparent 55%); }
#carSelect.entering .cs-wipe { animation: cs-wipe .55s cubic-bezier(.5,0,.3,1) both; }
@keyframes cs-wipe { from { opacity: 1; transform: translateX(-80%); } 80% { opacity: 1; } to { opacity: 0; transform: translateX(80%); } }
#carSelect.entering .cs-top { animation: t2-logo-in .6s .1s cubic-bezier(.2,1.5,.4,1) both; }
#carSelect.entering .cs-info { animation: cs-in-right .55s .18s cubic-bezier(.2,1.2,.4,1) both; }
#carSelect.entering .cs-strip, #carSelect.entering .cs-actions { animation: cs-in-up .5s .26s cubic-bezier(.2,1.2,.4,1) both; }
#carSelect.entering .cs-arrow { animation: cs-pop .45s .34s cubic-bezier(.2,1.8,.4,1) both; }
#carSelect.leaving .cs-info { animation: cs-out-right .26s ease-in both; }
#carSelect.leaving .cs-top, #carSelect.leaving .cs-strip, #carSelect.leaving .cs-actions, #carSelect.leaving .cs-arrow, #carSelect.leaving .cs-hint { animation: t2-fade-out .22s both; }
@keyframes cs-in-right { from { transform: translateX(120%) skewX(-8deg); opacity: 0; } }
@keyframes cs-out-right { to { transform: translateX(120%) skewX(-8deg); opacity: 0; } }
@keyframes cs-in-up { from { transform: translateY(60px); opacity: 0; } }
@keyframes cs-pop { from { transform: translateY(-50%) scale(0); } }

@media (max-width: 900px) {
  #carSelect.cs { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto auto auto; overflow: auto; }
  .cs-btn.go { min-width: 0; flex: 1; }
  .cs-actions { gap: 8px; }
  .cs-info { grid-column: 1; grid-row: 3; }
  .cs-strip { grid-row: 4; } .cs-actions { grid-row: 5; } .cs-hint { display: none; }
  .cs-arrow { width: 46px; height: 70px; top: 36%; }
  .cs-arrow.next { right: 14px; }
  #carSelect.cs::before { background: linear-gradient(0deg, rgba(5,8,14,.92) 0%, rgba(5,8,14,.6) 45%, rgba(5,8,14,0) 70%); }
}
html.is-touch .cs-hint, html.is-touch .cs-btn kbd { display: none; }
@media (prefers-reduced-motion: reduce) {
  .t2-btn::after, .cs-btn.go::after { display: none; }
  .cs-btn.go, .t2-btn.is-primary { animation: none; }
}

/* Short screens (landscape phones): everything on one screen, no scrolling */
@media (max-height: 520px) {
  #menu.title2 { grid-template-columns: 1fr; padding-top: calc(var(--banner-h, 48px) + 8px); padding-bottom: 8px; gap: 8px; overflow: hidden; }
  .t2-left { gap: 10px; align-content: start; }
  .t2-kicker, .t2-story, .t2-sub, .t2-foot { display: none; }
  .t2-ffx { font-size: 54px; } .t2-runner { font-size: 44px; }
  .t2-actions { grid-template-columns: 1fr 1fr; max-width: 600px; gap: 6px 10px; }
  .t2-btn { padding: 5px 14px 5px 10px; grid-template-columns: 30px 1fr auto; gap: 8px; }
  .t2-btn img { width: 30px; height: 30px; }
  .t2-btn b { font-size: 19px; } .t2-btn small { display: none; }
  .t2-btn.is-primary { grid-column: 1 / -1; padding-top: 7px; padding-bottom: 7px; }
  .t2-btn.is-primary b { font-size: 26px; }
  .t2-btn:focus, .t2-btn:focus-visible { transform: translateX(6px) scale(1.02); }

  #carSelect.cs { grid-template-columns: 1fr minmax(250px, 300px); grid-template-rows: auto 1fr auto; overflow: hidden;
    padding: calc(var(--banner-h, 48px) + 6px) 14px 8px; gap: 6px 14px; }
  .cs-step, .cs-tag, .cs-hint { display: none; }
  .cs-top { grid-column: 1; grid-row: 1; }
  .cs-title { font-size: 30px; }
  .cs-info { grid-column: 2; grid-row: 1 / 3; align-self: start; padding: 10px 12px; gap: 6px; }
  .cs-name { font-size: 28px; }
  .cs-stats { gap: 4px 10px; }
  .cs-paint .swatch { width: 22px; height: 22px; }
  .cs-strip { grid-column: 1; grid-row: 3; justify-content: flex-start; gap: 5px; flex-wrap: nowrap; }
  .cs-strip .car-chip { min-width: 0; padding: 5px 9px; }
  .cs-strip .car-chip strong { font-size: 13px; } .cs-strip .car-chip .chip-state { display: none; }
  .cs-actions { grid-column: 2; grid-row: 3; justify-content: stretch; gap: 6px; }
  .cs-btn { min-height: 42px; padding: 0 14px; font-size: 16px; }
  .cs-btn.go { min-width: 0; flex: 1; } .cs-btn.go b { font-size: 24px; }
  .cs-arrow { width: 42px; height: 64px; top: 46%; }
  .cs-arrow.next { right: calc(300px + 28px); }
  #carSelect.cs::before { background: linear-gradient(270deg, rgba(5,8,14,.85) 0%, rgba(5,8,14,.4) 34%, rgba(5,8,14,0) 55%), linear-gradient(0deg, rgba(5,8,14,.85) 0%, rgba(5,8,14,0) 30%); }
}
