/* ============================================================
   NEON VELOCITY · 样式（车库 + 比赛 HUD + 结算）
   ============================================================ */
:root {
  --bg: #05070f;
  --bg2: #0a1020;
  --cyan: #22d3ee;
  --purple: #a855f7;
  --orange: #ff6a00;
  --red: #ff2d55;
  --ink: #e8f2ff;
  --muted: #8a9bb4;
  --line: rgba(120, 180, 230, 0.18);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  overscroll-behavior: none;
}
button { font-family: inherit; color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
b, .mono { font-variant-numeric: tabular-nums; }

/* ============================== 车库 ============================== */
body.garage {
  height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(1200px 700px at 62% 58%, #0d1a30 0%, #060a14 55%, #04060d 100%);
}
#showcase {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}
.grid-floor {
  position: fixed;
  left: -40%;
  right: -40%;
  bottom: -8vh;
  height: 58vh;
  z-index: 0;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.30) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168, 85, 247, 0.22) 1px, transparent 1px);
  background-size: 64px 64px;
  transform: perspective(600px) rotateX(72deg);
  transform-origin: bottom center;
  opacity: 0.5;
  mask-image: linear-gradient(to top, #000 5%, transparent 85%);
  -webkit-mask-image: linear-gradient(to top, #000 5%, transparent 85%);
  animation: gridflow 6s linear infinite;
  pointer-events: none;
}
@keyframes gridflow { to { background-position: 0 64px, 0 0; } }
.vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 45%, transparent 30%, rgba(3, 5, 12, 0.55) 78%, rgba(2, 3, 8, 0.92) 100%),
    linear-gradient(to top, rgba(2, 4, 10, 0.95) 0%, transparent 34%);
}

.top {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 30px;
}
.logo {
  font-weight: 900;
  letter-spacing: 0.16em;
  font-size: 13px;
  color: #cfe6ff;
  border: 1px solid var(--line);
  padding: 8px 12px;
  border-radius: 4px;
  background: rgba(7, 12, 22, 0.6);
  backdrop-filter: blur(8px);
}
.logo span { color: var(--cyan); }
.top-right { display: flex; align-items: center; gap: 10px; }
.credits {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 11px; letter-spacing: 0.18em; color: var(--muted);
  border: 1px solid var(--line); border-radius: 4px;
  padding: 7px 12px; background: rgba(7, 12, 22, 0.6);
}
.credits b { font-size: 14px; color: var(--orange); letter-spacing: 0.04em; }
.icon-btn {
  width: 34px; height: 34px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(7, 12, 22, 0.6);
  color: #cfe6ff;
  font-size: 15px;
  transition: 0.2s;
}
.icon-btn:hover { border-color: var(--cyan); color: var(--cyan); box-shadow: 0 0 18px rgba(34, 211, 238, 0.28); }
.icon-btn.off { opacity: 0.35; text-decoration: line-through; }

.stage {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(300px, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 92px 4vw 168px 4vw;
  pointer-events: none;
}
.stage > * { pointer-events: auto; }

.headline { align-self: center; max-width: 560px; }
.kicker {
  font-size: 11px; letter-spacing: 0.42em; color: var(--cyan);
  margin-bottom: 14px; opacity: 0.85;
}
.headline h1 {
  margin: 0;
  font-size: clamp(46px, 6.6vw, 96px);
  line-height: 0.86;
  letter-spacing: -0.035em;
  font-weight: 900;
  text-transform: uppercase;
  text-shadow: 0 0 40px rgba(34, 211, 238, 0.18);
}
.headline h1 span {
  background: linear-gradient(100deg, #22d3ee 0%, #7dd3fc 30%, #a855f7 62%, #ff6a00 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 26px rgba(120, 90, 255, 0.35));
}
.headline p { color: var(--muted); font-size: 13px; letter-spacing: 0.06em; margin: 16px 0 22px; }
.records { display: flex; flex-wrap: wrap; gap: 8px; }
.records span {
  font-size: 11px; color: #9fb2c9;
  border: 1px solid var(--line);
  background: rgba(8, 14, 26, 0.62);
  padding: 6px 10px; border-radius: 3px;
  letter-spacing: 0.04em;
}
.records b { color: #dfefff; font-weight: 600; }

.carpanel {
  width: 340px;
  align-self: center;
  padding: 22px 20px 20px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: linear-gradient(160deg, rgba(10, 18, 32, 0.88), rgba(5, 9, 18, 0.92));
  backdrop-filter: blur(14px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.cp-head { display: flex; justify-content: space-between; align-items: flex-start; }
.cp-name { font-size: 24px; font-weight: 800; letter-spacing: 0.04em; }
.cp-sub { font-size: 11px; color: var(--muted); letter-spacing: 0.3em; margin-top: 4px; }
.cp-index { font-size: 11px; color: var(--muted); letter-spacing: 0.2em; }
.cp-index span { color: var(--orange); font-size: 16px; font-weight: 700; }

.bars { margin: 20px 0 16px; display: grid; gap: 11px; }
.bar { display: grid; grid-template-columns: 34px 1fr 30px; align-items: center; gap: 10px; font-size: 11px; color: var(--muted); }
.bar .track { height: 5px; background: rgba(120, 170, 220, 0.13); border-radius: 3px; overflow: hidden; }
.bar .track i { display: block; height: 100%; border-radius: 3px; transition: width 0.45s cubic-bezier(0.2, 0.8, 0.2, 1); }
.bar b { text-align: right; color: #cfe6ff; font-size: 11px; }

.spec { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; border-top: 1px solid var(--line); padding-top: 14px; }
.spec > div { display: grid; gap: 4px; }
.spec span { font-size: 10px; color: var(--muted); letter-spacing: 0.16em; }
.spec b { font-size: 17px; font-weight: 700; }
.spec em { font-style: normal; font-size: 9px; color: var(--muted); letter-spacing: 0.1em; }

.livery-row { display: flex; gap: 9px; margin-top: 18px; }
.sw {
  width: 34px; height: 34px; padding: 3px;
  border: 1px solid var(--line); border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
  transition: 0.18s;
}
.sw i { display: block; width: 100%; height: 100%; border-radius: 2px; }
.sw.on { border-color: #fff; box-shadow: 0 0 16px rgba(255, 255, 255, 0.28); transform: translateY(-2px); }
.livery-name { margin-top: 10px; font-size: 11px; color: var(--muted); letter-spacing: 0.1em; }
.livery-name b { color: #dfefff; margin-left: 4px; }

.dock {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 0 4vw 40px;
}
.modes { display: flex; gap: 12px; }
.mode-btn {
  position: relative;
  min-width: 216px;
  text-align: left;
  padding: 15px 20px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(8, 14, 26, 0.72);
  backdrop-filter: blur(10px);
  transition: 0.2s;
  overflow: hidden;
}
.mode-btn::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(120, 220, 255, 0.12) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.6s;
}
.mode-btn:hover::after { transform: translateX(120%); }
.mode-btn:hover { border-color: rgba(34, 211, 238, 0.6); transform: translateY(-2px); }
.mode-btn.primary {
  border-color: rgba(255, 106, 0, 0.55);
  background: linear-gradient(120deg, rgba(255, 106, 0, 0.22), rgba(255, 60, 0, 0.08));
  box-shadow: 0 12px 40px rgba(255, 106, 0, 0.18);
}
.mode-btn.primary:hover { border-color: var(--orange); box-shadow: 0 14px 50px rgba(255, 106, 0, 0.32); }
.m-tag { font-size: 9px; letter-spacing: 0.34em; color: var(--cyan); display: block; margin-bottom: 6px; }
.mode-btn.primary .m-tag { color: #ffb27a; }
.mode-btn b { font-size: 19px; font-weight: 800; letter-spacing: 0.04em; display: block; }
.mode-btn em { font-style: normal; font-size: 11px; color: var(--muted); display: block; margin-top: 5px; }

.diff { display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--muted); letter-spacing: 0.16em; }
.chips { display: flex; gap: 6px; }
.chip {
  padding: 7px 13px; font-size: 12px;
  border: 1px solid var(--line); border-radius: 3px;
  background: rgba(8, 14, 26, 0.7);
  color: #a9bcd2; transition: 0.18s;
}
.chip:hover { border-color: rgba(34, 211, 238, 0.5); }
.chip.on { border-color: var(--cyan); color: #eaf9ff; box-shadow: 0 0 16px rgba(34, 211, 238, 0.28); background: rgba(34, 211, 238, 0.12); }

.hintbar {
  position: fixed; left: 0; right: 0; bottom: 10px;
  z-index: 20;
  display: flex; gap: 18px; flex-wrap: wrap;
  padding: 0 4vw;
  font-size: 10px; letter-spacing: 0.08em; color: rgba(150, 175, 205, 0.5);
  pointer-events: none;
}
.hintbar a { pointer-events: auto; margin-left: auto; color: rgba(150, 190, 230, 0.65); }
.hintbar a:hover { color: var(--cyan); }

/* ============================== 比赛 ============================== */
body.race { overflow: hidden; background: #04060c; }
#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

.loading {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center;
  background: #04060c;
  transition: opacity 0.6s;
}
.loading.hide { opacity: 0; pointer-events: none; }
.ld-inner { text-align: center; }
.ld-logo { font-size: 26px; font-weight: 900; letter-spacing: 0.2em; }
.ld-logo span { color: var(--orange); margin-left: 8px; }
.ld-bar { width: 220px; height: 3px; margin: 18px auto 12px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.ld-bar i { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--cyan), var(--orange)); transition: width .25s ease; }
@keyframes ld { 0% { transform: translateX(-120%); } 100% { transform: translateX(320%); } }
.loading p { font-size: 11px; color: var(--muted); letter-spacing: 0.2em; }

#hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
.hud-tl { position: absolute; top: 22px; left: 26px; }
.hud-tl .pos { display: flex; align-items: baseline; gap: 3px; font-weight: 900; }
.hud-tl .pos b { font-size: 40px; line-height: 1; letter-spacing: -0.02em; }
.hud-tl .pos span { font-size: 14px; color: var(--muted); }
.hud-tl .lap { margin-top: 6px; font-size: 11px; letter-spacing: 0.24em; color: var(--muted); }
.hud-tl .lap b { color: var(--orange); font-size: 13px; }

.hud-tc { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); text-align: center; }
#lights {
  display: flex; gap: 10px; justify-content: center;
  margin-bottom: 8px; opacity: 0; transition: opacity 0.2s;
}
#lights.show { opacity: 1; }
#lights i {
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(160, 190, 220, 0.25);
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.7);
  transition: background 0.08s, box-shadow 0.08s;
}
#lights i.on {
  background: radial-gradient(circle at 36% 32%, #ff8a8a, #e0102c 62%, #6d0110);
  border-color: #ff4d5f;
  box-shadow: 0 0 22px rgba(255, 45, 85, 0.9), inset 0 0 6px rgba(255, 255, 255, 0.5);
}
#lights i.go {
  background: radial-gradient(circle at 36% 32%, #b6ffc8, #16c94a 62%, #04591f);
  border-color: #46ff7a;
  box-shadow: 0 0 26px rgba(34, 255, 110, 0.9), inset 0 0 6px rgba(255, 255, 255, 0.6);
}
#timer {
  font-family: "SF Mono", "Roboto Mono", ui-monospace, monospace;
  font-size: 27px; font-weight: 700; letter-spacing: 0.06em;
  text-shadow: 0 0 24px rgba(34, 211, 238, 0.45);
}
#lastLap {
  font-family: ui-monospace, monospace;
  font-size: 11px; color: var(--muted); letter-spacing: 0.16em; margin-top: 3px;
  min-height: 14px;
}

.hud-tr { position: absolute; top: 20px; right: 22px; }
#minimap { display: block; border-radius: 50%; background: rgba(5, 10, 20, 0.55); border: 1px solid var(--line); }

.hud-br {
  position: absolute; right: 24px; bottom: 26px;
  width: 154px; height: 154px;
  display: grid; place-items: center;
  --glow: 0.5;
}
.dial { position: absolute; inset: 0; width: 100%; height: 100%; }
.dial-bg { fill: none; stroke: rgba(120, 170, 220, 0.16); stroke-width: 6; }
.dial-arc {
  fill: none; stroke: #22d3ee; stroke-width: 6; stroke-linecap: round;
  transform: rotate(-90deg); transform-origin: 70px 70px;
  filter: drop-shadow(0 0 calc(var(--glow) * 14px) rgba(34, 211, 238, 0.9));
  transition: stroke-dashoffset 0.1s linear;
}
.spd { text-align: center; margin-top: -6px; }
.spd b { display: block; font-size: 42px; font-weight: 800; line-height: 1; letter-spacing: -0.04em; }
.spd span { font-size: 9px; letter-spacing: 0.3em; color: var(--muted); }
.gear {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  font-size: 12px; font-weight: 700; color: var(--orange);
  border: 1px solid rgba(255, 106, 0, 0.5); border-radius: 3px;
  padding: 1px 8px; background: rgba(255, 106, 0, 0.12);
}

.nitro { position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%); width: 250px; }
.nlabel { font-size: 9px; letter-spacing: 0.36em; color: var(--muted); margin-bottom: 6px; text-align: center; }
.nbar { height: 8px; background: rgba(120, 170, 220, 0.15); border: 1px solid var(--line); border-radius: 2px; overflow: hidden; transform: skewX(-18deg); }
.nbar i { display: block; height: 100%; width: 50%; background: linear-gradient(90deg, #0ea5b7, #67e8f9); box-shadow: 0 0 16px rgba(34, 211, 238, 0.75); transition: width 0.08s linear; }
.nbar i.full { background: linear-gradient(90deg, #22d3ee, #a855f7, #22d3ee); animation: npulse 0.7s linear infinite; }
@keyframes npulse { 50% { filter: brightness(1.6); } }

#drift {
  position: absolute; left: 26px; bottom: 40px;
  display: flex; align-items: baseline; gap: 8px;
  opacity: 0; transform: translateY(10px); transition: 0.2s;
}
#drift.on { opacity: 1; transform: none; }
#drift span { font-size: 11px; letter-spacing: 0.34em; color: var(--cyan); }
#drift b { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; text-shadow: 0 0 20px rgba(34, 211, 238, 0.6); }
#drift em { font-style: normal; font-size: 14px; color: var(--orange); font-weight: 700; }

#wrong {
  position: absolute; top: 82px; left: 50%; transform: translateX(-50%);
  font-size: 13px; letter-spacing: 0.2em; color: #fff;
  background: rgba(255, 45, 85, 0.85); padding: 5px 14px; border-radius: 3px;
  opacity: 0; transition: 0.2s;
}
#wrong.on { opacity: 1; animation: blink 0.6s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0.35; } }

#countdown {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: clamp(90px, 18vw, 190px);
  font-weight: 900; letter-spacing: -0.05em;
  color: #fff;
  text-shadow: 0 0 60px rgba(34, 211, 238, 0.8), 0 0 140px rgba(34, 211, 238, 0.35);
  opacity: 0;
}
#countdown.on { opacity: 1; animation: cdpop 0.95s cubic-bezier(0.2, 0.9, 0.2, 1); }
#countdown.go { color: var(--orange); text-shadow: 0 0 70px rgba(255, 106, 0, 0.9); }
@keyframes cdpop {
  0% { transform: scale(1.7); opacity: 0; filter: blur(10px); }
  22% { transform: scale(1); opacity: 1; filter: blur(0); }
  100% { transform: scale(1); opacity: 1; filter: blur(0); }
}

#toast {
  position: absolute; top: 96px; left: 50%; transform: translateX(-50%) translateY(-8px);
  font-size: 12px; letter-spacing: 0.22em; color: #cfeaff;
  border: 1px solid var(--line); border-radius: 3px;
  background: rgba(6, 12, 22, 0.8); padding: 8px 16px;
  opacity: 0; transition: 0.3s; white-space: nowrap;
}
#toast.on { opacity: 1; transform: translateX(-50%); }

/* 触屏 */
.touchpad { display: none; position: fixed; inset: auto 0 0 0; z-index: 15; justify-content: space-between; padding: 0 18px 22px; pointer-events: none; }
.tp-left, .tp-right { display: flex; gap: 12px; align-items: flex-end; pointer-events: auto; }
.tbtn {
  width: 72px; height: 72px; border-radius: 50%;
  border: 1px solid rgba(120, 200, 240, 0.35);
  background: rgba(8, 16, 30, 0.42);
  backdrop-filter: blur(4px);
  font-size: 20px; color: #dff2ff;
  touch-action: none; user-select: none;
}
.tbtn.acc { border-color: rgba(255, 106, 0, 0.6); background: rgba(255, 106, 0, 0.2); }
.tbtn.small { width: 58px; height: 58px; font-size: 11px; letter-spacing: 0.1em; border-color: rgba(168, 85, 247, 0.6); }
.tbtn.act { background: rgba(34, 211, 238, 0.35); transform: scale(0.95); }
@media (hover: none), (pointer: coarse) {
  .touchpad { display: flex; }
  .hud-br { width: 118px; height: 118px; right: 14px; bottom: 116px; }
  .spd b { font-size: 32px; }
  .nitro { width: 170px; bottom: 150px; }
  #drift { bottom: 150px; }
  .hud-tl { top: 14px; left: 14px; }
  .hud-tr { top: 12px; right: 12px; }
  #minimap { width: 110px !important; height: 110px !important; }
  #timer { font-size: 20px; }
}

/* 覆盖层 */
.overlay {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  background: rgba(3, 6, 14, 0.88);
  backdrop-filter: blur(12px);
  opacity: 0; pointer-events: none; transition: 0.25s;
}
.overlay.on { opacity: 1; pointer-events: auto; }
.panel {
  width: min(400px, 88vw);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: linear-gradient(160deg, rgba(12, 20, 36, 0.96), rgba(6, 10, 20, 0.98));
  padding: 26px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
}
.panel h2 { margin: 0 0 18px; font-size: 18px; letter-spacing: 0.16em; font-weight: 700; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  padding: 11px 18px; font-size: 13px; letter-spacing: 0.08em;
  border: 1px solid var(--line); border-radius: 3px;
  background: rgba(255, 255, 255, 0.04);
  transition: 0.18s;
}
.btn:hover { border-color: rgba(34, 211, 238, 0.6); }
.btn.pri {
  border-color: rgba(255, 106, 0, 0.7);
  background: linear-gradient(120deg, #ff6a00, #ff3d00);
  color: #12060a; font-weight: 700;
}
.btn.pri:hover { box-shadow: 0 10px 30px rgba(255, 106, 0, 0.35); }
.hint { font-size: 11px; color: var(--muted); margin: 16px 0 0; line-height: 1.7; }
.set-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; font-size: 13px; color: #c3d5e8; }

/* 结算 */
.result { background: radial-gradient(1200px 600px at 30% 40%, rgba(12, 26, 48, 0.94), rgba(3, 6, 12, 0.97)); }
.res-wrap {
  width: min(1080px, 92vw);
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 34px;
  align-items: center;
}
.res-left { display: flex; flex-direction: column; gap: 6px; }
.res-rank { display: flex; align-items: flex-start; line-height: 0.8; }
.res-rank b {
  font-size: clamp(110px, 15vw, 190px);
  font-weight: 900; letter-spacing: -0.06em;
  background: linear-gradient(180deg, #ffffff, #7dd3fc 55%, #22d3ee);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 50px rgba(34, 211, 238, 0.4));
}
.res-rank span { font-size: 22px; font-weight: 800; color: var(--orange); margin-top: 18px; letter-spacing: 0.1em; }
.res-meta #rTitle { font-size: 12px; letter-spacing: 0.34em; color: var(--muted); }
.res-meta #rTime { font-family: ui-monospace, monospace; font-size: 27px; font-weight: 700; margin-top: 6px; }
.board { display: grid; gap: 5px; }
.rrow {
  display: grid; grid-template-columns: 26px 1fr auto;
  gap: 10px; align-items: center;
  padding: 7px 11px; font-size: 12.5px;
  border: 1px solid transparent; border-radius: 3px;
  color: #a9bdd4;
}
.rrow:nth-child(1) { color: #fff; background: rgba(34, 211, 238, 0.06); }
.rrow.you { border-color: rgba(255, 106, 0, 0.6); background: rgba(255, 106, 0, 0.12); color: #fff; }
.rn { font-weight: 800; color: var(--muted); font-size: 11px; }
.rrow.you .rn { color: var(--orange); }
.rt { font-family: ui-monospace, monospace; font-size: 11px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 22px; }
.stats > div {
  border: 1px solid var(--line); border-radius: 4px;
  padding: 10px 12px; background: rgba(255, 255, 255, 0.02);
}
.stats span { display: block; font-size: 10px; color: var(--muted); letter-spacing: 0.12em; }
.stats b { font-size: 16px; font-weight: 700; display: block; margin-top: 3px; }
.stats b.money { color: #ffb27a; }

/* ============================== 响应式 ============================== */
@media (max-width: 980px) {
  .stage { grid-template-columns: 1fr; padding: 82px 22px 210px; align-content: start; gap: 12px; }
  .headline { max-width: none; }
  .headline h1 { font-size: clamp(40px, 12vw, 66px); }
  .headline p { margin: 10px 0 14px; }
  .carpanel { width: 100%; max-width: 430px; justify-self: end; align-self: auto; }
  .dock { flex-direction: column; align-items: stretch; padding: 0 22px 34px; gap: 12px; }
  .modes { width: 100%; }
  .mode-btn { flex: 1; min-width: 0; padding: 12px 14px; }
  .mode-btn b { font-size: 16px; }
  .mode-btn em { font-size: 10px; }
  .diff { justify-content: flex-end; }
  .res-wrap { grid-template-columns: 1fr; gap: 18px; }
  .res-rank b { font-size: 90px; }
  .board { max-height: 30vh; overflow: auto; }
}
@media (max-height: 700px) and (min-width: 981px) {
  .headline h1 { font-size: clamp(40px, 5vw, 68px); }
  .records { display: none; }
}

/* 右下角小入口：AI 价格总表 */
.hintbar .price-link {
  pointer-events: auto;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 999px;
  background: rgba(7, 12, 22, 0.8);
  backdrop-filter: blur(8px);
  color: #cfe9ff;
  font-size: 11px;
  letter-spacing: 0.06em;
  transition: 0.18s;
}
.hintbar .price-link:hover {
  border-color: rgba(255, 106, 0, 0.7);
  color: #ffd9bd;
  box-shadow: 0 8px 24px rgba(255, 106, 0, 0.2);
  transform: translateY(-1px);
}
@media (max-width: 980px) {
  .hintbar { justify-content: flex-end; }
  .hintbar > span { display: none; }
}
