@font-face {
  font-family: "BebasLocal";
  src: url("../assets/bebas-neue.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #050608;
  --ink-2: #0b0e12;
  --paper: #f3efe4;
  --muted: #9b9a95;
  --line: rgba(255, 255, 255, 0.14);
  --red: #ff3b30;
  --red-deep: #8b100d;
  --amber: #ffb020;
  --acid: #e7ff63;
  --cyan: #67e8ff;
  --display: "BebasLocal", "Bahnschrift Condensed", "DIN Alternate", Impact, "Arial Narrow", sans-serif;
  --sans: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  overscroll-behavior: none;
}

body {
  position: fixed;
  inset: 0;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-text-size-adjust: 100%;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

#app {
  position: relative;
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background: #05080d;
}

#scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.scene-grade,
.film-grain,
.vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.scene-grade {
  background:
    linear-gradient(to bottom, rgba(2, 5, 9, 0.4), transparent 22%, transparent 66%, rgba(2, 4, 7, 0.56)),
    linear-gradient(115deg, rgba(20, 52, 78, 0.1), transparent 42%, rgba(103, 15, 7, 0.08));
  mix-blend-mode: normal;
}

.film-grain {
  opacity: 0.11;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
  background-size: 160px 160px;
  animation: grainShift 0.22s steps(2) infinite;
  z-index: 4;
}

.vignette {
  z-index: 3;
  background: radial-gradient(circle at 50% 45%, transparent 48%, rgba(0, 0, 0, 0.26) 76%, rgba(0, 0, 0, 0.61) 100%);
}

@keyframes grainShift {
  0% { transform: translate3d(0, 0, 0); }
  25% { transform: translate3d(-2%, 1%, 0); }
  50% { transform: translate3d(1%, -2%, 0); }
  75% { transform: translate3d(2%, 2%, 0); }
  100% { transform: translate3d(-1%, 1%, 0); }
}

.screen {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  transition: opacity 0.55s ease, visibility 0.55s ease, transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.is-hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* ---------------- loading ---------------- */
.loading {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  background:
    radial-gradient(circle at 50% 52%, rgba(40, 42, 46, 0.8), transparent 46%),
    #050608;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.loading.is-done {
  opacity: 0;
  visibility: hidden;
}

.loading-mark {
  font-family: var(--display);
  font-size: clamp(84px, 26vw, 152px);
  line-height: 0.8;
  letter-spacing: -0.02em;
  color: var(--paper);
}

.loading-line {
  width: 156px;
  height: 2px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
}

.loading-line i {
  display: block;
  width: 52%;
  height: 100%;
  background: var(--red);
  animation: loadingSweep 1.05s ease-in-out infinite;
}

@keyframes loadingSweep {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(320%); }
}

.loading p {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.24em;
  color: #817f79;
}

/* ---------------- start screen ---------------- */
.start-screen {
  justify-content: space-between;
  padding: calc(14px + var(--safe-top)) clamp(18px, 5.2vw, 34px) calc(12px + var(--safe-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background:
    linear-gradient(to bottom, rgba(4, 7, 11, 0.72) 0%, rgba(4, 7, 11, 0.03) 18%, rgba(4, 7, 11, 0.26) 30%, rgba(4, 7, 11, 0.7) 43%, rgba(4, 7, 11, 0.9) 57%, rgba(4, 6, 9, 0.97) 78%, #040609 100%);
}

.start-screen::-webkit-scrollbar {
  display: none;
}

.start-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
  z-index: 2;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(5, 7, 10, 0.45);
  backdrop-filter: blur(8px);
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.13em;
  color: rgba(255, 255, 255, 0.82);
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 10px rgba(255, 59, 48, 0.9);
  animation: livePulse 1.2s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

.icon-btn {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(8, 10, 14, 0.42);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.icon-btn svg {
  width: 19px;
  height: 19px;
  fill: rgba(255, 255, 255, 0.82);
  stroke: rgba(255, 255, 255, 0.82);
  stroke-width: 1.6;
  fill-rule: evenodd;
}

.icon-btn .wave {
  fill: none;
  stroke-linecap: round;
}

.icon-btn.muted .wave {
  display: none;
}

.icon-btn.muted::after {
  content: "";
  position: absolute;
  width: 21px;
  height: 1.5px;
  background: var(--red);
  transform: rotate(-46deg);
}

.start-copy {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding-top: 34px;
  max-width: 560px;
  animation: riseIn 0.9s 0.16s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.event-line {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.18em;
  color: rgba(243, 239, 228, 0.65);
}

.event-line i {
  width: 22px;
  height: 1px;
  background: var(--red);
}

.hero-number {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 7px;
  width: max-content;
  margin: 3px 0 0 -3px;
  color: var(--paper);
  isolation: isolate;
}

.hero-number .digits {
  font-family: var(--display);
  font-size: clamp(118px, 38vw, 196px);
  line-height: 0.8;
  letter-spacing: -0.035em;
  text-shadow: 0 0 44px rgba(255, 59, 48, 0.13);
}

.hero-number .unit {
  font-family: var(--display);
  font-size: clamp(17px, 4.4vw, 24px);
  letter-spacing: 0.08em;
  color: var(--red);
  padding-bottom: clamp(12px, 3.4vw, 24px);
}

.hero-slash {
  position: absolute;
  left: -1%;
  right: -4%;
  top: 43%;
  height: clamp(5px, 1.3vw, 8px);
  background: var(--red);
  transform: rotate(-3.2deg);
  box-shadow: 0 0 28px rgba(255, 59, 48, 0.34);
  z-index: -1;
}

.start-copy h1 {
  margin: 3px 0 12px;
  font-size: clamp(34px, 9.4vw, 54px);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.start-copy h1 em {
  font-style: normal;
  color: var(--red);
  position: relative;
}

.lede {
  margin: 0 0 18px;
  max-width: 440px;
  font-size: clamp(12.5px, 3.5vw, 15px);
  line-height: 1.76;
  color: rgba(241, 237, 227, 0.69);
  letter-spacing: 0.015em;
}

.lede b {
  color: var(--paper);
  font-weight: 700;
}

.start-btn {
  position: relative;
  width: 100%;
  min-height: 70px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 12px 55px 12px 18px;
  background: var(--red);
  color: #fff;
  text-align: left;
  overflow: hidden;
  box-shadow: 0 12px 38px rgba(130, 12, 8, 0.34);
  transition: transform 0.15s ease, filter 0.2s ease;
}

.start-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.22) 50%, transparent 67%);
  transform: translateX(-120%);
  animation: btnShine 3.4s 1.3s ease-in-out infinite;
}

@keyframes btnShine {
  0%, 58% { transform: translateX(-120%); }
  74%, 100% { transform: translateX(120%); }
}

.start-btn:active {
  transform: scale(0.985);
  filter: brightness(0.93);
}

.start-btn-main {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.start-btn-sub {
  margin-top: 3px;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  opacity: 0.78;
}

.start-btn-arrow {
  position: absolute;
  right: 19px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--display);
  font-size: 29px;
  font-style: normal;
  transition: transform 0.24s ease;
}

.start-btn:active .start-btn-arrow {
  transform: translate(5px, -50%);
}

.start-note {
  margin: 10px 0 0;
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: rgba(243, 239, 228, 0.38);
}

.domain-strip {
  display: flex;
  align-items: stretch;
  height: 29px;
  margin-top: 9px;
  border: 1px solid rgba(231, 255, 99, 0.22);
  background: linear-gradient(90deg, rgba(231, 255, 99, 0.07), rgba(8, 11, 10, 0.76));
  color: rgba(243, 239, 228, 0.66);
  text-decoration: none;
  overflow: hidden;
}

.domain-kicker {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding: 0 7px;
  background: var(--acid);
  color: #080a09;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.domain-marquee {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}

.domain-track {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: 0.06em;
  animation: domainScroll 24s linear infinite;
}

.domain-track a {
  color: rgba(243, 239, 228, 0.8);
  text-decoration: none;
  pointer-events: auto;
}

.domain-track a.hot {
  color: var(--acid);
}

.domain-track a.premium {
  color: #ffd45e;
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-shadow: 0 0 10px rgba(255, 187, 49, 0.55);
}

.domain-track a:active {
  color: #fff;
}

.domain-track i {
  font-style: normal;
  color: rgba(231, 255, 99, 0.33);
}

.domain-arrow {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding: 0 8px;
  color: var(--acid);
  font-size: 13px;
  text-decoration: none;
}

@keyframes domainScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.ad-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 6px;
  border: 1px solid rgba(231, 255, 99, 0.22);
  background: rgba(10, 16, 9, 0.5);
  color: rgba(231, 255, 99, 0.72);
  text-decoration: none;
  font-size: 8px;
  letter-spacing: 0.03em;
  pointer-events: auto;
  backdrop-filter: blur(6px);
}

.ad-chip b {
  padding: 1px 3px;
  background: var(--acid);
  color: #070908;
  font-size: 6.5px;
  line-height: 1.2;
  letter-spacing: 0.05em;
}

.start-bottom {
  flex: 0 0 auto;
  z-index: 2;
  margin-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 8px;
  animation: riseIn 0.9s 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.fact-strip {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.fact-index {
  flex: 0 0 auto;
  padding-top: 1px;
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--red);
}

.fact-strip p {
  margin: 0;
  font-size: 10.5px;
  line-height: 1.45;
  color: rgba(243, 239, 228, 0.47);
}

.fact-strip b {
  color: rgba(243, 239, 228, 0.84);
  font-weight: 600;
}

.facts-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0 3px;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: rgba(243, 239, 228, 0.46);
}

.facts-toggle span {
  font-size: 15px;
  line-height: 1;
}

.facts-panel {
  position: absolute;
  inset: 0;
  z-index: 30;
  padding: calc(28px + var(--safe-top)) 24px calc(30px + var(--safe-bottom));
  background: rgba(5, 7, 9, 0.97);
  backdrop-filter: blur(18px);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.35s ease, visibility 0.35s ease, transform 0.35s ease;
}

.facts-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.facts-close {
  position: absolute;
  top: calc(18px + var(--safe-top));
  right: 20px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  color: var(--paper);
}

.facts-panel h2 {
  margin: 0 0 22px;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.facts-panel p {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.8;
  color: rgba(243, 239, 228, 0.7);
}

.facts-panel p b {
  color: var(--red);
}

.facts-panel .fine {
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: rgba(243, 239, 228, 0.44);
}

.facts-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 11px;
  color: rgba(243, 239, 228, 0.4);
}

.facts-links a {
  color: var(--amber);
  text-underline-offset: 3px;
}

/* ---------------- HUD ---------------- */
.hud {
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.hud.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.hud-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(12px + var(--safe-top)) 14px 22px;
  background: linear-gradient(to bottom, rgba(2, 5, 9, 0.74), transparent);
}

.hud-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.hud-brand-mark {
  font-family: var(--display);
  font-size: 17px;
  letter-spacing: 0.04em;
  padding: 3px 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  line-height: 1;
  color: rgba(255, 255, 255, 0.78);
}

.hud-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.12;
}

.hud-brand-text b {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hud-brand-text span {
  margin-top: 3px;
  font-size: 8px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.42);
}

.hud-weather {
  margin-left: auto;
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-size: 8.5px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.46);
}

.hud-weather b {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.72);
}

.hud .icon-btn {
  pointer-events: auto;
  width: 34px;
  height: 34px;
}

.ticker {
  position: absolute;
  top: calc(61px + var(--safe-top));
  left: 14px;
  right: 14px;
  height: 24px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(3, 6, 9, 0.34);
  backdrop-filter: blur(6px);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: 32px;
  white-space: nowrap;
  will-change: transform;
  animation: tickerMove 42s linear infinite;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 8.5px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.47);
}

.ticker-item b {
  color: var(--amber);
  font-weight: 500;
}

.ticker-item.hot b {
  color: var(--red);
}

.ticker-item.ad {
  color: rgba(231, 255, 99, 0.72);
}

.ticker-item.ad b {
  color: var(--acid);
  border: 1px solid rgba(231, 255, 99, 0.35);
  padding: 0 3px;
  font-size: 7px;
}

.ticker-item.ad a {
  color: rgba(231, 255, 99, 0.9);
  text-decoration: none;
  pointer-events: auto;
}

.ticker-item.ad a:active {
  color: #fff;
}

.ticker-item.ad a.premium {
  color: #ffd45e;
  font-weight: 900;
  text-shadow: 0 0 8px rgba(255, 190, 60, 0.55);
}

@keyframes tickerMove {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.auto-steer {
  position: absolute;
  left: 50%;
  top: calc(106px + var(--safe-top));
  transform: translate(-50%, -6px);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 7px;
  border: 1px solid rgba(103, 232, 255, 0.38);
  background: rgba(4, 17, 23, 0.68);
  color: var(--cyan);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  backdrop-filter: blur(8px);
}

.auto-steer.active {
  opacity: 1;
  transform: translate(-50%, 0);
}

.steer-icon {
  font-size: 16px;
  line-height: 1;
  animation: steerTurn 1.1s ease-in-out infinite;
}

@keyframes steerTurn {
  0%, 100% { transform: rotate(-13deg); }
  50% { transform: rotate(11deg); }
}

.distance-tag {
  position: absolute;
  right: 15px;
  top: calc(102px + var(--safe-top));
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 8.5px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.4);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.distance-tag.visible {
  opacity: 1;
}

.distance-tag b {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  color: rgba(255, 255, 255, 0.8);
}

.bottom-hud {
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: calc(10px + var(--safe-bottom));
  display: flex;
  align-items: flex-end;
  gap: 7px;
  pointer-events: none;
}

.gauge-wrap {
  position: relative;
  width: clamp(126px, 34vw, 176px);
  aspect-ratio: 1;
  flex: 0 0 auto;
  filter: drop-shadow(0 6px 22px rgba(0, 0, 0, 0.55));
}

.gauge {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.gauge-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.11);
  stroke-width: 5;
  stroke-linecap: round;
}

.gauge-green {
  fill: none;
  stroke: rgba(124, 255, 173, 0.5);
  stroke-width: 6;
  stroke-linecap: butt;
}

.gauge-red {
  fill: none;
  stroke: rgba(255, 59, 48, 0.7);
  stroke-width: 6;
  stroke-linecap: butt;
}

.gauge-progress {
  fill: none;
  stroke: url(#gaugeGrad);
  stroke-width: 5;
  stroke-linecap: round;
  transition: stroke-dasharray 0.08s linear;
}

.gauge-ticks line {
  stroke: rgba(255, 255, 255, 0.3);
  stroke-width: 1;
}

.gauge-ticks line.major {
  stroke: rgba(255, 255, 255, 0.62);
  stroke-width: 1.6;
}

.gauge-needle {
  stroke: #fff;
  stroke-width: 2.4;
  stroke-linecap: round;
  transform-origin: 110px 110px;
  transform: rotate(-135deg);
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.55));
}

.gauge-hub {
  fill: #11151b;
  stroke: rgba(255, 255, 255, 0.8);
  stroke-width: 2;
}

.gauge-readout {
  position: absolute;
  inset: 35% 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.gauge-readout span {
  font-family: var(--display);
  font-size: clamp(37px, 10.8vw, 54px);
  line-height: 0.82;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.12);
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.gauge-readout span.fast {
  color: #ff6b62;
  text-shadow: 0 0 24px rgba(255, 59, 48, 0.65);
}

.gauge-readout small {
  margin-top: 5px;
  font-family: var(--display);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.46);
}

.gauge-labels {
  position: absolute;
  inset: 0;
  font-size: 6.5px;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.38);
  pointer-events: none;
}

.gauge-labels span {
  position: absolute;
}

.gauge-labels span {
  position: absolute;
  font-size: 6px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.gauge-labels .gl-green {
  left: 18%;
  bottom: 5%;
  color: rgba(144, 255, 188, 0.68);
}

.gauge-labels .gl-red {
  right: 0;
  top: 34%;
  color: rgba(255, 106, 96, 0.84);
  text-align: right;
}

.center-meta {
  flex: 1 1 auto;
  min-width: 0;
  padding-bottom: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.meta-line {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 8px;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.36);
  white-space: nowrap;
}

.meta-line b {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.82);
}

.meta-line b.red {
  color: #ff6b62;
  text-shadow: 0 0 12px rgba(255, 59, 48, 0.3);
}

.meta-line small {
  font-size: 6.5px;
  color: rgba(255, 255, 255, 0.3);
}

.meta-tip {
  font-size: 7.5px;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.35);
  text-align: center;
  min-height: 11px;
  white-space: nowrap;
}

.pedal {
  position: relative;
  width: clamp(96px, 26vw, 126px);
  aspect-ratio: 1;
  flex: 0 0 auto;
  border-radius: 50%;
  pointer-events: auto;
  touch-action: none;
  background: radial-gradient(circle at 50% 34%, #ff5a45, #c51e16 56%, #780b07 100%);
  box-shadow:
    0 12px 34px rgba(132, 15, 9, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    inset 0 -6px 16px rgba(49, 0, 0, 0.42);
  transition: transform 0.12s ease, filter 0.12s ease;
  -webkit-user-select: none;
}

.pedal::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(255, 255, 255, 0.19);
  border-radius: 50%;
}

.pedal-ring {
  position: absolute;
  inset: -7px;
  border: 1px solid rgba(255, 59, 48, 0.3);
  border-radius: 50%;
  animation: pedalPulse 2.1s ease-out infinite;
}

@keyframes pedalPulse {
  0% { transform: scale(0.92); opacity: 0.7; }
  75% { transform: scale(1.12); opacity: 0; }
  100% { transform: scale(1.12); opacity: 0; }
}

.pedal-core {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.pedal-core b {
  font-size: clamp(17px, 4.8vw, 22px);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 7px rgba(62, 0, 0, 0.35);
}

.pedal-core small {
  font-family: var(--display);
  font-size: 8px;
  letter-spacing: 0.25em;
  opacity: 0.65;
}

.pedal.is-held,
.pedal:active {
  transform: scale(0.93);
  filter: brightness(1.13);
}

.hud.is-impact .pedal,
.hud.is-impact .pedal-hint {
  opacity: 0;
  pointer-events: none;
}

.hud.is-impact .pedal-ring {
  animation: none;
  opacity: 0;
}

.pedal.is-held .pedal-ring {
  animation-duration: 0.7s;
}

.pedal-hint {
  position: absolute;
  right: 13px;
  bottom: calc(clamp(96px, 26vw, 126px) + 25px + var(--safe-bottom));
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.76);
  text-shadow: 0 2px 8px #000;
  animation: hintFloat 1.8s ease-in-out infinite;
  opacity: 1;
  transition: opacity 0.25s ease;
}

.pedal-hint.hide {
  opacity: 0;
}

.hand-tap {
  font-size: 17px;
  transform: rotate(-15deg);
  filter: drop-shadow(0 2px 4px #000);
}

@keyframes hintFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* ---------------- impact overlay ---------------- */
.impact-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: 15vh;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease;
  background: radial-gradient(circle at 50% 47%, transparent 15%, rgba(3, 4, 6, 0.22) 66%, rgba(3, 4, 6, 0.68));
}

.impact-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.impact-speed {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 5px 12px;
  margin-bottom: 17px;
  border: 1px solid rgba(255, 255, 255, 0.19);
  background: rgba(4, 6, 9, 0.55);
  backdrop-filter: blur(8px);
  font-size: 8px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.53);
}

.impact-speed b {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
  color: var(--paper);
}

.impact-speed small {
  font-family: var(--display);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.4);
}

.fire-timer {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  color: var(--red);
  text-shadow: 0 0 30px rgba(255, 59, 48, 0.55);
}

.fire-timer-label {
  position: absolute;
  transform: translateY(-27px);
  font-size: 8.5px;
  letter-spacing: 0.24em;
  color: rgba(255, 255, 255, 0.62);
  text-shadow: none;
}

.fire-timer b {
  font-family: var(--display);
  font-size: clamp(70px, 20vw, 108px);
  font-weight: 400;
  line-height: 0.85;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}

.fire-timer-unit {
  font-family: var(--display);
  font-size: 16px;
  color: rgba(255, 114, 104, 0.6);
}

.fire-stages {
  display: flex;
  gap: 16px;
  margin-top: 9px;
  font-size: 8px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.27);
}

.fire-stages span {
  position: relative;
  padding-top: 7px;
  transition: color 0.2s ease;
}

.fire-stages span::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  transform: translateX(-50%);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.fire-stages span.active {
  color: var(--red);
}

.fire-stages span.active::before {
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
}

.fire-stages span.done {
  color: rgba(255, 255, 255, 0.58);
}

.fire-stages span.done::before {
  background: rgba(255, 220, 180, 0.7);
}

.impact-caption {
  margin-top: 18px;
  min-height: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--paper);
  text-align: center;
  text-shadow: 0 2px 10px #000;
}

.impact-overlay.low .fire-timer {
  color: #9be8c1;
  text-shadow: 0 0 28px rgba(86, 235, 168, 0.26);
}

.impact-overlay.low .fire-timer-value,
.impact-overlay.low .fire-timer-unit {
  opacity: 0.9;
}

.impact-overlay.low .fire-stages span.active,
.impact-overlay.low .fire-stages span.done {
  color: rgba(155, 232, 193, 0.8);
}

.impact-overlay.low .fire-stages span.active::before,
.impact-overlay.low .fire-stages span.done::before {
  background: #7bf0b9;
  box-shadow: 0 0 8px rgba(123, 240, 185, 0.75);
}

.start-note.challenge,
#challengeNote.challenge {
  padding: 8px 9px;
  margin-top: 9px;
  border-left: 2px solid var(--red);
  background: rgba(255, 59, 48, 0.08);
  color: rgba(243, 239, 228, 0.74);
  font-size: 10px;
  line-height: 1.55;
}

#challengeNote.challenge b {
  color: var(--red);
}

#challengeNote.challenge span {
  color: rgba(243, 239, 228, 0.38);
  font-size: 8px;
}

.toast {
  position: absolute;
  left: 50%;
  bottom: calc(34% + var(--safe-bottom));
  transform: translate(-50%, 8px);
  padding: 8px 13px;
  background: rgba(5, 7, 10, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--paper);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  white-space: nowrap;
  z-index: 50;
}

.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* ---------------- result ---------------- */
.result-screen {
  justify-content: flex-end;
  background:
    linear-gradient(to bottom, rgba(2, 4, 7, 0.1), rgba(2, 4, 7, 0.35) 28%, rgba(2, 4, 7, 0.88) 58%, rgba(2, 4, 7, 0.97) 100%);
  overflow: hidden;
}

.result-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 22%, rgba(255, 77, 33, 0.08), transparent 38%);
  pointer-events: none;
}

.result-card {
  position: relative;
  width: min(100%, 500px);
  max-height: 91dvh;
  margin: 0 auto;
  padding: 18px 18px calc(14px + var(--safe-bottom));
  background:
    linear-gradient(170deg, rgba(18, 21, 26, 0.97), rgba(7, 9, 13, 0.985)),
    #090b0f;
  border-top: 2px solid var(--red);
  box-shadow: 0 -22px 90px rgba(0, 0, 0, 0.72);
  overflow-y: auto;
  overscroll-behavior: contain;
  animation: sheetUp 0.58s cubic-bezier(0.16, 1, 0.3, 1) both;
  scrollbar-width: none;
}

.result-card::-webkit-scrollbar {
  display: none;
}

@keyframes sheetUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.result-media {
  position: relative;
  height: 205px;
  margin: -18px -18px 13px;
  background: #0b0f14 center center / cover no-repeat;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.result-media.wide {
  background-size: 145% auto;
  background-position: center 34%;
}

.result-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(7, 9, 13, 0.96), rgba(7, 9, 13, 0.05) 70%),
    radial-gradient(circle at 65% 45%, transparent, rgba(4, 6, 9, 0.32));
}

.result-media-label {
  position: absolute;
  left: 12px;
  bottom: 8px;
  z-index: 1;
  font-family: var(--display);
  font-size: 8px;
  letter-spacing: 0.16em;
  color: rgba(243, 239, 228, 0.54);
}

.result-ribbon {
  position: absolute;
  top: 0;
  left: 18px;
  z-index: 2;
  padding: 4px 9px;
  background: var(--red);
  color: #fff;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.result-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
}

.result-eyebrow {
  margin-bottom: 6px;
  font-family: var(--display);
  font-size: 8.5px;
  letter-spacing: 0.2em;
  color: rgba(243, 239, 228, 0.36);
}

.result-head h2 {
  margin: 0;
  font-size: clamp(28px, 8.2vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.055em;
  font-weight: 900;
}

.result-head p {
  margin: 6px 0 0;
  font-size: 10.5px;
  line-height: 1.5;
  color: rgba(243, 239, 228, 0.53);
}

.result-ribbon.brake {
  background: #e85d25;
}

.result-ribbon.reward {
  background: #3f9d6b;
}

.result-stamp {
  flex: 0 0 auto;
  width: 68px;
  height: 68px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border: 2px solid var(--red);
  color: var(--red);
  transform: rotate(-9deg);
  opacity: 0.92;
  mix-blend-mode: screen;
}

.result-stamp span {
  font-size: 8px;
  letter-spacing: 0.22em;
}

.result-stamp b {
  font-size: 17px;
  letter-spacing: 0.06em;
}

.result-stamp.reward {
  border-color: #8ff2b8;
  color: #8ff2b8;
}

.result-stamp.brake {
  border-color: #ff9a55;
  color: #ff9a55;
}

.result-speed {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 15px 0 11px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.result-speed b {
  font-family: var(--display);
  font-size: clamp(62px, 18vw, 86px);
  line-height: 0.76;
  font-weight: 400;
  letter-spacing: 0.005em;
  color: var(--paper);
}

.result-speed span {
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: rgba(243, 239, 228, 0.43);
}

.result-speed em {
  margin-left: auto;
  padding: 3px 6px;
  border: 1px solid rgba(255, 59, 48, 0.32);
  color: #ff8077;
  font-style: normal;
  font-size: 8px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 11px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  border-left: 1px solid rgba(255, 255, 255, 0.09);
}

.stat {
  min-height: 72px;
  padding: 9px 10px 8px;
  border-right: 1px solid rgba(255, 255, 255, 0.09);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.stat > span {
  display: block;
  font-size: 8px;
  letter-spacing: 0.08em;
  color: rgba(243, 239, 228, 0.38);
}

.stat b {
  display: block;
  margin-top: 2px;
  font-family: var(--display);
  font-size: 26px;
  line-height: 1.05;
  font-weight: 400;
  color: var(--paper);
}

.stat b small {
  margin-left: 2px;
  font-family: var(--sans);
  font-size: 9px;
  color: rgba(243, 239, 228, 0.38);
}

.stat i {
  display: block;
  margin-top: 2px;
  font-style: normal;
  font-size: 7.5px;
  letter-spacing: 0.02em;
  color: rgba(243, 239, 228, 0.37);
}

.event-alert {
  position: absolute;
  top: calc(112px + var(--safe-top));
  left: 50%;
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 8px 11px;
  border: 1px solid rgba(255, 59, 48, 0.55);
  background: rgba(24, 7, 6, 0.88);
  box-shadow: 0 0 28px rgba(255, 59, 48, 0.16);
  backdrop-filter: blur(8px);
  transform: translate(-50%, -8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
  z-index: 4;
}

.event-alert.visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  animation: alertPulse 0.55s ease-in-out infinite alternate;
}

.event-icon {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 59, 48, 0.5);
  color: var(--red);
  font-size: 14px;
}

.event-alert b {
  display: block;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: #ff8a82;
}

.event-alert small {
  display: block;
  margin-top: 2px;
  font-size: 7.5px;
  color: rgba(255, 218, 214, 0.48);
}

@keyframes alertPulse {
  from { border-color: rgba(255, 59, 48, 0.35); }
  to { border-color: rgba(255, 59, 48, 0.95); }
}

/* ---------------- 251 warning ---------------- */
.warning251 {
  position: absolute;
  inset: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 4px),
    radial-gradient(circle at 50% 48%, rgba(255, 59, 48, 0.18), transparent 46%),
    #050607;
  pointer-events: none;
  animation: w251In 0.18s steps(2) both;
}

.warning251::before,
.warning251::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 7vh;
  background: repeating-linear-gradient(135deg, #ff3b30 0 18px, #111 18px 36px);
  opacity: 0.72;
  animation: hazardMove 0.8s linear infinite;
}

.warning251::before { top: 0; }
.warning251::after { bottom: 0; transform: rotate(180deg); }

.w251-lines {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 49.7%, rgba(255, 59, 48, 0.42) 50%, transparent 50.3%);
  opacity: 0.5;
  animation: scanline 1.1s linear infinite;
}

.w251-panel {
  position: relative;
  z-index: 2;
  width: min(88vw, 470px);
  padding: 17px 18px 15px;
  border: 2px solid var(--red);
  background: rgba(9, 10, 12, 0.9);
  box-shadow: 0 0 80px rgba(255, 59, 48, 0.24), inset 0 0 38px rgba(255, 59, 48, 0.08);
  text-align: center;
  animation: w251Shake 0.28s steps(2) infinite;
}

.w251-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: rgba(243, 239, 228, 0.42);
}

.w251-top span {
  color: var(--acid);
  letter-spacing: 0.05em;
}

.w251-num {
  margin: 2px 0 -4px;
  font-family: var(--display);
  font-size: clamp(112px, 32vw, 180px);
  line-height: 0.82;
  letter-spacing: -0.02em;
  color: var(--red);
  text-shadow: 4px 0 rgba(60, 220, 255, 0.3), -4px 0 rgba(255, 40, 30, 0.35), 0 0 34px rgba(255, 59, 48, 0.42);
  animation: w251Glitch 1.7s steps(3) infinite;
}

.w251-panel h2 {
  margin: 3px 0 7px;
  font-size: 25px;
  line-height: 1.1;
  letter-spacing: 0.22em;
}

.w251-panel p {
  margin: 0;
  font-size: 11px;
  line-height: 1.8;
  color: rgba(243, 239, 228, 0.62);
}

.w251-panel p b {
  color: #ff8a82;
  font-weight: 700;
}

.w251-foot {
  margin-top: 11px;
  padding-top: 7px;
  border-top: 1px solid rgba(255, 59, 48, 0.2);
  font-size: 7px;
  letter-spacing: 0.04em;
  color: rgba(243, 239, 228, 0.3);
}

.w251-redacted {
  position: absolute;
  z-index: 2;
  bottom: calc(10vh + 12px);
  font-family: var(--mono, monospace);
  font-size: 8px;
  letter-spacing: 0.12em;
  color: rgba(255, 59, 48, 0.55);
}

@keyframes w251In {
  from { opacity: 0; transform: scale(1.04); filter: contrast(2); }
  to { opacity: 1; transform: scale(1); filter: contrast(1); }
}

@keyframes w251Shake {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(1px, -1px); }
  66% { transform: translate(-1px, 1px); }
}

@keyframes w251Glitch {
  0%, 86%, 100% { transform: translate(0, 0); }
  88% { transform: translate(-5px, 2px) skewX(5deg); }
  90% { transform: translate(5px, -2px) skewX(-5deg); }
  92% { transform: translate(0, 0); }
}

@keyframes hazardMove {
  from { background-position: 0 0; }
  to { background-position: 36px 0; }
}

@keyframes scanline {
  from { transform: translateY(-3%); }
  to { transform: translateY(3%); }
}

.cause-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 11px;
  padding: 8px 10px;
  border-left: 3px solid var(--red);
  background: rgba(255, 59, 48, 0.075);
}

.cause-banner > span {
  flex: 0 0 auto;
  font-size: 15px;
  color: var(--red);
}

.cause-banner b {
  display: block;
  font-size: 10.5px;
  letter-spacing: 0.02em;
  color: rgba(243, 239, 228, 0.9);
}

.cause-banner small {
  display: block;
  margin-top: 2px;
  font-size: 7.5px;
  color: rgba(243, 239, 228, 0.42);
}

.cause-banner.reward {
  border-left-color: #8ff2b8;
  background: rgba(91, 225, 143, 0.065);
}

.cause-banner.reward > span,
.cause-banner.reward b {
  color: #a0f5c1;
}

.cause-banner.legal {
  border-left-color: var(--acid);
  background: linear-gradient(90deg, rgba(255, 59, 48, 0.1), rgba(231, 255, 99, 0.06));
}

.cause-banner.legal > span,
.cause-banner.legal b {
  color: var(--acid);
}

.cicada-reward {
  display: grid;
  grid-template-columns: 58px 1fr 44px;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 9px;
  border: 1px solid rgba(143, 242, 184, 0.24);
  background:
    linear-gradient(115deg, rgba(143, 242, 184, 0.09), rgba(231, 255, 99, 0.025)),
    rgba(8, 14, 11, 0.6);
}

.cicada-toy {
  display: grid;
  place-items: center;
  animation: cicadaSwing 1.35s ease-in-out infinite;
  transform-origin: 50% 4px;
}

.cicada-toy svg {
  width: 54px;
  height: 60px;
  filter: drop-shadow(0 0 12px rgba(143, 242, 184, 0.25));
}

.cicada-copy span {
  display: block;
  font-size: 7px;
  letter-spacing: 0.1em;
  color: rgba(143, 242, 184, 0.72);
}

.cicada-copy h3 {
  margin: 2px 0 3px;
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #d9ffe7;
}

.cicada-copy p {
  margin: 0;
  font-size: 8px;
  line-height: 1.5;
  color: rgba(243, 239, 228, 0.42);
}

.cicada-btn {
  height: 30px;
  border: 1px solid rgba(143, 242, 184, 0.3);
  background: rgba(143, 242, 184, 0.08);
  color: #a7f7c5;
  font-size: 8px;
  letter-spacing: 0.06em;
}

@keyframes cicadaSwing {
  0%, 100% { transform: rotate(-9deg); }
  50% { transform: rotate(9deg); }
}

.cicada-reward.swing {
  animation: rewardPop 0.45s cubic-bezier(0.2, 1.4, 0.3, 1);
}

@keyframes rewardPop {
  0% { transform: scale(1); }
  36% { transform: scale(1.035) rotate(-0.6deg); }
  100% { transform: scale(1); }
}

.share-domains {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 7px;
  margin-top: 9px;
  font-size: 8px;
  color: rgba(243, 239, 228, 0.33);
}

.share-domains span {
  color: var(--acid);
}

.share-domains a {
  color: rgba(243, 239, 228, 0.62);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.share-domains a.hot {
  color: var(--acid);
  border-color: rgba(231, 255, 99, 0.35);
}

.share-domains a.premium {
  color: #ffd45e;
  border-color: rgba(255, 190, 60, 0.45);
  font-weight: 900;
}

.domain-sale {
  margin-top: 11px;
  padding: 8px 9px 7px;
  border: 1px solid rgba(231, 255, 99, 0.16);
  background:
    linear-gradient(105deg, rgba(231, 255, 99, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(7, 10, 10, 0.6);
}

.domain-sale-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 7.5px;
  letter-spacing: 0.08em;
  color: rgba(243, 239, 228, 0.42);
}

.domain-sale-head b {
  color: var(--acid);
  font-weight: 800;
}

.domain-sale-head small {
  font-size: 6.5px;
  color: rgba(243, 239, 228, 0.28);
}

.domain-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.domain-links a {
  padding: 2px 5px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(243, 239, 228, 0.75);
  font-family: var(--display);
  font-size: 9px;
  letter-spacing: 0.05em;
  text-decoration: none;
}

.domain-links a.hot {
  border-color: rgba(231, 255, 99, 0.35);
  color: var(--acid);
}

.domain-links a.premium {
  border-color: rgba(255, 190, 60, 0.52);
  background: rgba(255, 176, 32, 0.1);
  color: #ffd45e;
  font-weight: 900;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-shadow: 0 0 10px rgba(255, 176, 32, 0.42);
}

.official-card {
  margin-top: 12px;
  padding: 10px 11px 8px;
  background: #f5f2e9;
  color: #16181b;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
}

.official-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 9px;
  font-weight: 700;
  color: #2b2d30;
}

.official-card-head small {
  font-size: 7px;
  font-weight: 400;
  color: #8a8b8c;
}

.wechat-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 4px;
  border-radius: 50%;
  background: #10b981;
}

.stamp-small {
  flex: 0 0 auto;
  padding: 2px 4px;
  border: 1px solid #d64a3c;
  color: #c1382d;
  font-size: 7px;
  font-weight: 500;
  letter-spacing: 0.08em;
  transform: rotate(-3deg);
}

.official-card p {
  margin: 8px 0 7px;
  font-size: 9.5px;
  line-height: 1.72;
  color: #3a3b3d;
  min-height: 49px;
}

.official-card p::after {
  content: "▍";
  color: #c1382d;
  animation: cursorBlink 0.8s step-end infinite;
}

.official-card p.typed::after {
  content: "";
}

@keyframes cursorBlink {
  50% { opacity: 0; }
}

.official-foot {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  padding-top: 5px;
  font-size: 7px;
  color: #929394;
}

.official-foot span:last-child {
  color: #c1382d;
}

.result-actions {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.btn-primary,
.btn-secondary {
  min-height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 8px 22px rgba(115, 9, 6, 0.3);
}

.btn-primary span {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.btn-primary small {
  font-size: 8px;
  opacity: 0.7;
}

.btn-secondary {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.045);
  font-size: 11px;
  font-weight: 600;
  color: rgba(243, 239, 228, 0.86);
}

.btn-primary:active,
.btn-secondary:active {
  transform: scale(0.98);
  filter: brightness(0.93);
}

.challenge-btn {
  width: 100%;
  margin-top: 7px;
  padding: 7px;
  font-size: 8.5px;
  letter-spacing: 0.03em;
  color: rgba(243, 239, 228, 0.43);
  border: 1px dashed rgba(255, 255, 255, 0.14);
}

.leaderboard {
  margin-top: 11px;
}

.leaderboard-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 4px;
  font-size: 8px;
  letter-spacing: 0.1em;
  color: rgba(243, 239, 228, 0.43);
}

.leaderboard-head small {
  font-size: 7px;
  color: rgba(243, 239, 228, 0.24);
}

.leaderboard ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.leaderboard li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.065);
  font-size: 8px;
  color: rgba(243, 239, 228, 0.48);
}

.leaderboard li .rank {
  width: 13px;
  font-family: var(--display);
  font-size: 12px;
  color: rgba(243, 239, 228, 0.3);
}

.leaderboard li .lb-speed {
  font-family: var(--display);
  font-size: 16px;
  color: var(--paper);
}

.leaderboard li .lb-tag {
  margin-left: auto;
  font-size: 7px;
  color: rgba(255, 152, 71, 0.74);
}

.result-disclaimer {
  margin: 10px 0 0;
  font-size: 7.5px;
  line-height: 1.65;
  letter-spacing: 0.02em;
  text-align: center;
  color: rgba(243, 239, 228, 0.26);
}

/* ---------------- share ---------------- */
.share-modal {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(2, 3, 5, 0.82);
  backdrop-filter: blur(12px);
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.share-panel {
  position: relative;
  width: min(100%, 500px);
  max-height: 94dvh;
  display: flex;
  flex-direction: column;
  padding: 15px 16px calc(14px + var(--safe-bottom));
  background: #0b0d11;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  animation: sheetUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.share-close {
  position: absolute;
  top: 9px;
  right: 12px;
  z-index: 2;
  width: 32px;
  height: 32px;
  font-size: 22px;
  line-height: 1;
  color: rgba(243, 239, 228, 0.65);
}

.share-panel-head {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 0 11px;
}

.share-preview {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0 18px;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

#shareCanvas {
  max-width: 100%;
  max-height: 58dvh;
  height: auto;
  object-fit: contain;
  box-shadow: 0 12px 50px rgba(0, 0, 0, 0.6);
  background: #06080b;
}

.share-actions {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.share-tip {
  margin: 8px 0 0;
  text-align: center;
  font-size: 8px;
  letter-spacing: 0.04em;
  color: rgba(243, 239, 228, 0.32);
}

/* ---------------- responsive ---------------- */
@media (min-width: 720px) {
  .start-screen {
    padding-left: 7vw;
    padding-right: 7vw;
    background:
      linear-gradient(90deg, rgba(4, 7, 11, 0.93) 0%, rgba(4, 7, 11, 0.72) 37%, rgba(4, 7, 11, 0.08) 70%, rgba(4, 7, 11, 0.25) 100%),
      linear-gradient(to bottom, rgba(4, 7, 11, 0.44) 0%, transparent 24%, transparent 63%, rgba(4, 6, 9, 0.9) 100%);
  }

  .start-copy {
    max-width: 500px;
    margin-bottom: auto;
    padding-top: 8vh;
  }

  .start-bottom {
    width: min(560px, 60vw);
  }

  .start-copy h1 {
    font-size: 58px;
  }

  .hud-top {
    padding-left: 24px;
    padding-right: 24px;
  }

  .ticker {
    left: 24px;
    right: 24px;
  }

  .bottom-hud {
    left: 26px;
    right: 26px;
    bottom: 20px;
  }

  .gauge-wrap {
    width: 174px;
  }

  .pedal {
    width: 126px;
  }

  .center-meta {
    padding-bottom: 18px;
    gap: 7px;
  }

  .meta-line {
    font-size: 9px;
  }

  .meta-line b {
    font-size: 20px;
  }

  .result-screen {
    align-items: center;
    padding: 24px 20px;
  }

  .result-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 2px solid var(--red);
    max-height: 90dvh;
    padding: 20px 24px 20px;
  }

  .result-media {
    height: 230px;
    margin: -20px -24px 15px;
  }

  .result-media[style*="data:image"] {
    background-position: center center;
  }

  .result-ribbon {
    left: 24px;
  }

  .result-head h2 {
    font-size: 42px;
  }

  .result-speed b {
    font-size: 84px;
  }

  .stat {
    min-height: 78px;
  }

  .stat b {
    font-size: 30px;
  }

  .official-card p {
    font-size: 10.5px;
  }

  .result-actions {
    grid-template-columns: 1.3fr 1fr;
  }

  .share-panel {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    margin-bottom: 3vh;
  }
}

@media (max-height: 720px) and (max-width: 719px) {
  .start-copy {
    padding-top: 14px;
  }

  .hero-number .digits {
    font-size: clamp(92px, 31vw, 132px);
  }

  .start-copy h1 {
    font-size: clamp(30px, 8vw, 38px);
    margin-bottom: 7px;
  }

  .lede {
    font-size: 11.5px;
    line-height: 1.58;
    margin-bottom: 11px;
  }

  .start-btn {
    min-height: 60px;
  }

  .start-btn-main {
    font-size: 16px;
  }

  .start-note {
    margin-top: 6px;
  }

  .start-bottom {
    margin-top: 9px;
    padding-top: 4px;
  }

  .fact-strip {
    padding: 3px 0;
  }

  .fact-strip:nth-child(2) {
    display: none;
  }

  .facts-toggle {
    padding-top: 5px;
  }

  .result-card {
    max-height: 94dvh;
  }
}

@media (max-width: 370px) {
  .hud-weather {
    display: none;
  }

  .ad-chip span {
    display: none;
  }
}

@media (max-height: 590px) {
  .start-bottom {
    display: none;
  }

  .start-note {
    display: none;
  }

  .start-copy {
    padding-top: 8px;
  }

  .hero-number .digits {
    font-size: 86px;
  }

  .start-copy h1 {
    font-size: 28px;
  }

  .lede {
    font-size: 10.5px;
    line-height: 1.45;
    margin-bottom: 8px;
  }

  .start-btn {
    min-height: 54px;
  }

  .ticker {
    display: none;
  }
}

@media (orientation: landscape) and (max-height: 560px) {
  .start-screen {
    padding-left: max(26px, 7vw);
    padding-right: max(26px, 7vw);
  }

  .start-copy {
    max-width: 47vw;
    margin-top: auto;
    padding-top: 0;
    padding-bottom: 4px;
  }

  .hero-number .digits {
    font-size: 90px;
  }

  .start-copy h1 {
    font-size: 32px;
    margin-bottom: 7px;
  }

  .lede {
    font-size: 10.5px;
    line-height: 1.5;
    margin-bottom: 9px;
  }

  .start-btn {
    min-height: 52px;
    max-width: 340px;
  }

  .start-bottom {
    display: none;
  }

  .start-note {
    font-size: 8px;
    margin-top: 6px;
  }

  .bottom-hud {
    left: 18px;
    right: 18px;
    bottom: calc(8px + var(--safe-bottom));
  }

  .gauge-wrap {
    width: 124px;
  }

  .pedal {
    width: 92px;
    margin-left: auto;
  }

  .pedal-hint {
    bottom: calc(118px + var(--safe-bottom));
    right: 20px;
  }

  .center-meta {
    display: none;
  }

  .result-screen {
    justify-content: center;
    align-items: flex-end;
    padding-right: 18px;
  }

  .result-card {
    width: min(460px, 54vw);
    max-height: 95dvh;
    margin-right: 2vw;
  }

  .result-head h2 {
    font-size: 30px;
  }

  .result-speed b {
    font-size: 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
