:root {
  --ink: #eaf6ff;
  --muted: rgba(214, 238, 252, 0.62);
  --faint: rgba(214, 238, 252, 0.38);
  --ice: #8fe8ff;
  --mint: #7dffc4;
  --gold: #ffd166;
  --coral: #ff8fab;
  --deep: #06111c;
  --glass: rgba(7, 20, 33, 0.58);
  --glass-border: rgba(152, 229, 255, 0.16);
  --glass-highlight: rgba(255, 255, 255, 0.08);
  --card-shadow: 0 40px 100px -24px rgba(0, 0, 0, 0.86);
  --font-display: "Bricolage Grotesque", "Outfit", system-ui, sans-serif;
  --font-body: "Outfit", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 10%, #0d263b 0%, transparent 38%),
    radial-gradient(circle at 80% 80%, #0a1f31 0%, transparent 45%), var(--deep);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  touch-action: none;
}

button {
  font: inherit;
  color: inherit;
}

button,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

#app {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  isolation: isolate;
}

.stage {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse at 50% 44%,
      transparent 34%,
      rgba(0, 8, 14, 0.2) 70%,
      rgba(0, 5, 10, 0.68) 100%
    ),
    linear-gradient(
      to bottom,
      rgba(2, 9, 16, 0.34),
      transparent 18%,
      transparent 76%,
      rgba(2, 8, 14, 0.38)
    );
}

.grain {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.032;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.86' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.7'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

.flash {
  position: absolute;
  inset: 0;
  z-index: 35;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    circle at 50% 44%,
    rgba(255, 255, 255, 0.9),
    rgba(255, 209, 102, 0.2) 32%,
    transparent 64%
  );
  mix-blend-mode: screen;
}

.flash.is-flashing {
  animation: flash 0.55s ease-out;
}

/* ---------- Top bar ---------- */

.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(16px, 2.4vw, 28px) clamp(16px, 3vw, 36px);
  pointer-events: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(
    155deg,
    rgba(18, 47, 68, 0.9),
    rgba(5, 15, 25, 0.66)
  );
  border: 1px solid rgba(152, 229, 255, 0.18);
  box-shadow:
    0 12px 30px -12px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(16px);
}

.brand-mark svg {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

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

.brand-text strong {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #f4fbff;
}

.brand-text span {
  margin-top: 4px;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.32em;
  color: var(--faint);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}

.best-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 15px;
  border-radius: 999px;
  background: linear-gradient(
    155deg,
    rgba(10, 28, 44, 0.72),
    rgba(5, 14, 23, 0.48)
  );
  border: 1px solid var(--glass-border);
  box-shadow:
    0 12px 30px -14px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px) saturate(120%);
}

.best-label {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--faint);
}

.best-chip strong {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  background: linear-gradient(
    155deg,
    rgba(10, 28, 44, 0.72),
    rgba(5, 14, 23, 0.48)
  );
  border: 1px solid var(--glass-border);
  color: #dff6ff;
  cursor: pointer;
  box-shadow:
    0 12px 30px -14px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px) saturate(120%);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.icon-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(143, 232, 255, 0.36);
  background: linear-gradient(
    155deg,
    rgba(17, 43, 63, 0.86),
    rgba(6, 18, 29, 0.62)
  );
}

.icon-btn:active {
  transform: scale(0.96);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

.icon-btn .icon-off {
  display: none;
}

.icon-btn.is-muted {
  color: var(--coral);
  border-color: rgba(255, 143, 171, 0.25);
}

.icon-btn.is-muted .icon-on {
  display: none;
}

.icon-btn.is-muted .icon-off {
  display: block;
}

/* ---------- Cards ---------- */

.card {
  position: absolute;
  top: 50%;
  right: clamp(24px, 5vw, 84px);
  z-index: 20;
  width: clamp(400px, 32vw, 470px);
  padding: 32px;
  border-radius: 28px;
  background: linear-gradient(
    155deg,
    rgba(10, 28, 45, 0.84),
    rgba(4, 12, 21, 0.6)
  );
  border: 1px solid rgba(152, 229, 255, 0.18);
  box-shadow:
    var(--card-shadow),
    inset 0 1px 0 var(--glass-highlight),
    inset 0 0 0 1px rgba(4, 14, 23, 0.3);
  backdrop-filter: blur(28px) saturate(130%);
  transform: translateY(-50%);
  transition:
    opacity 0.4s ease,
    visibility 0.4s ease,
    transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 0.3s ease,
    box-shadow 0.3s ease;
  pointer-events: auto;
}

.card.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-50%) translateX(30px) scale(0.982);
}

.card-glow {
  position: absolute;
  top: -90px;
  right: -70px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(125, 255, 196, 0.2),
    rgba(143, 232, 255, 0.08) 42%,
    transparent 70%
  );
  pointer-events: none;
  filter: blur(8px);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--ice);
}

.eyebrow-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 10px rgba(125, 255, 196, 0.9);
  animation: dotPulse 2.4s ease-in-out infinite;
}

.title-card h1 {
  position: relative;
  display: flex;
  flex-direction: column;
  margin: 18px 0 14px;
  font-family: var(--font-display);
  font-size: clamp(44px, 4.4vw, 66px);
  font-weight: 800;
  line-height: 0.88;
  letter-spacing: -0.05em;
  color: #f4fbff;
}

.title-accent {
  background: linear-gradient(
    100deg,
    #eaf6ff 0%,
    var(--ice) 34%,
    var(--mint) 68%,
    var(--gold) 112%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 26px rgba(125, 255, 196, 0.16));
}

.lede {
  max-width: 35ch;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.steps {
  margin: 22px 0 24px;
  border-top: 1px solid rgba(152, 229, 255, 0.12);
}

.step {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(152, 229, 255, 0.1);
}

.step-num {
  padding-top: 1px;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ice);
  opacity: 0.75;
}

.step strong {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #f4fbff;
}

.step p {
  margin-top: 3px;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--muted);
}

.primary-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 14px 15px 14px 20px;
  border: 0;
  border-radius: 15px;
  background: linear-gradient(112deg, #b8f4ff 0%, #7dffc4 58%, #ffd166 128%);
  color: #041c26;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  box-shadow:
    0 14px 34px -10px rgba(125, 255, 196, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.primary-btn::after {
  content: "";
  position: absolute;
  top: -40%;
  left: -30%;
  width: 40%;
  height: 180%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.55),
    transparent
  );
  transform: rotate(18deg) translateX(-140%);
  transition: transform 0.55s ease;
  pointer-events: none;
}

.primary-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
  box-shadow:
    0 18px 44px -10px rgba(125, 255, 196, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.primary-btn:hover::after {
  transform: rotate(18deg) translateX(430%);
}

.primary-btn:active {
  transform: translateY(0) scale(0.99);
}

.btn-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(4, 28, 38, 0.13);
  font-size: 16px;
  line-height: 1;
}

.btn-icon svg {
  width: 15px;
  height: 15px;
}

.title-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 16px;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.17em;
  color: var(--faint);
}

.title-foot strong {
  color: var(--ice);
  font-weight: 700;
}

.dot-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(214, 238, 252, 0.3);
}

/* ---------- Result ---------- */

.result-card {
  width: clamp(380px, 30vw, 440px);
}

.result-card.is-new-best {
  border-color: rgba(255, 209, 102, 0.48);
  box-shadow:
    0 40px 100px -24px rgba(0, 0, 0, 0.86),
    0 0 70px -20px rgba(255, 209, 102, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.result-card.is-new-best .card-glow {
  background: radial-gradient(
    circle,
    rgba(255, 209, 102, 0.24),
    rgba(255, 143, 171, 0.06) 45%,
    transparent 70%
  );
}

.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.new-best.is-hidden {
  display: none;
}

.new-best {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 209, 102, 0.14);
  border: 1px solid rgba(255, 209, 102, 0.42);
  color: var(--gold);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.16em;
  box-shadow: 0 0 18px -4px rgba(255, 209, 102, 0.6);
  animation: badgePulse 2s ease-in-out infinite;
}

.result-distance {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin: 14px 0 2px;
  font-family: var(--font-display);
  font-size: clamp(70px, 6.4vw, 92px);
  font-weight: 800;
  line-height: 0.86;
  letter-spacing: -0.065em;
  color: #f7fdff;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 10px 50px rgba(143, 232, 255, 0.18);
}

.result-distance .unit {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--gold);
}

.result-divider {
  height: 1px;
  margin: 20px 0 0;
  background: linear-gradient(
    90deg,
    rgba(143, 232, 255, 0.4),
    rgba(125, 255, 196, 0.14),
    transparent
  );
}

.result-card h2 {
  margin-top: 18px;
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f4fbff;
}

.result-message {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.result-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid rgba(152, 229, 255, 0.11);
}

.result-best span {
  display: block;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--faint);
}

.result-best strong {
  display: block;
  margin-top: 3px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--ice);
  font-variant-numeric: tabular-nums;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 20px;
}

.ghost-btn {
  padding: 0 18px;
  border-radius: 15px;
  border: 1px solid rgba(143, 232, 255, 0.2);
  background: rgba(143, 232, 255, 0.055);
  color: rgba(226, 246, 255, 0.76);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.ghost-btn:hover {
  background: rgba(143, 232, 255, 0.11);
  border-color: rgba(143, 232, 255, 0.34);
  transform: translateY(-1px);
}

.ghost-btn:active {
  transform: scale(0.98);
}

.result-foot {
  margin-top: 13px;
  text-align: center;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--faint);
}

/* ---------- Live HUD ---------- */

.live-hud {
  position: absolute;
  top: clamp(82px, 10vh, 110px);
  left: 50%;
  z-index: 12;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
  transition:
    opacity 0.35s ease,
    visibility 0.35s ease,
    transform 0.45s ease;
}

.live-hud.is-hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-12px);
}

.live-distance {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
  font-family: var(--font-display);
  font-size: clamp(44px, 5vw, 64px);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.06em;
  color: #f7fdff;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 8px 40px rgba(0, 0, 0, 0.55);
}

.live-unit {
  font-size: 18px;
  font-weight: 700;
  color: var(--ice);
  letter-spacing: -0.01em;
}

.live-meta {
  margin-top: 5px;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.28em;
  color: rgba(214, 238, 252, 0.56);
}

/* ---------- Hint, footer, toast ---------- */

.hint {
  position: absolute;
  bottom: clamp(24px, 4vw, 40px);
  left: clamp(16px, 3vw, 36px);
  z-index: 12;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(4, 14, 23, 0.48);
  border: 1px solid rgba(152, 229, 255, 0.12);
  color: rgba(214, 238, 252, 0.6);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  backdrop-filter: blur(14px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    visibility 0.3s ease;
  pointer-events: none;
}

.hint.is-hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
}

.footer-notes {
  position: absolute;
  right: clamp(16px, 3vw, 36px);
  bottom: clamp(24px, 4vw, 40px);
  z-index: 12;
  display: flex;
  gap: 14px;
  color: rgba(214, 238, 252, 0.34);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  pointer-events: none;
}

.footer-notes kbd {
  display: inline-block;
  margin-right: 3px;
  padding: 2px 5px;
  border-radius: 4px;
  border: 1px solid rgba(152, 229, 255, 0.16);
  background: rgba(255, 255, 255, 0.035);
  color: rgba(214, 238, 252, 0.58);
  font-family: var(--font-body);
  font-size: 7.5px;
  letter-spacing: 0.08em;
}

.toast {
  position: absolute;
  bottom: 130px;
  left: 50%;
  z-index: 40;
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(7, 22, 34, 0.92);
  border: 1px solid rgba(255, 209, 102, 0.32);
  color: #ffe9b8;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 12px);
  box-shadow:
    0 16px 40px -12px rgba(0, 0, 0, 0.8),
    0 0 30px -10px rgba(255, 209, 102, 0.3);
  backdrop-filter: blur(18px);
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease,
    transform 0.3s ease;
}

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

/* ---------- Loading ---------- */

.loading {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: radial-gradient(
    circle at 50% 38%,
    #0d263b 0%,
    #06111c 62%,
    #030a10 100%
  );
  transition:
    opacity 0.6s ease,
    visibility 0.6s ease;
}

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

.loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.loading-mark {
  position: relative;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 2px solid rgba(143, 232, 255, 0.12);
  border-top-color: var(--ice);
  border-right-color: rgba(125, 255, 196, 0.55);
  box-shadow:
    0 0 34px rgba(143, 232, 255, 0.16),
    inset 0 0 18px rgba(143, 232, 255, 0.06);
  animation: spin 1.15s linear infinite;
}

.loading-mark span {
  position: absolute;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 10px rgba(125, 255, 196, 0.9);
}

.loading-mark span:nth-child(1) {
  top: 7px;
  left: 27px;
  width: 6px;
  height: 6px;
}

.loading-mark span:nth-child(2) {
  bottom: 12px;
  left: 12px;
  width: 4px;
  height: 4px;
  opacity: 0.7;
}

.loading-mark span:nth-child(3) {
  right: 10px;
  bottom: 18px;
  width: 3px;
  height: 3px;
  opacity: 0.5;
}

.loading-inner p {
  margin-top: 18px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.32em;
  color: var(--muted);
}

.loading-bar {
  width: 180px;
  height: 3px;
  margin-top: 16px;
  border-radius: 999px;
  background: rgba(143, 232, 255, 0.1);
  overflow: hidden;
}

.loading-bar span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--ice), var(--mint));
  box-shadow: 0 0 12px rgba(125, 255, 196, 0.5);
  animation: loadingSweep 1.35s ease-in-out infinite;
}

/* ---------- Animations ---------- */

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes loadingSweep {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(340%);
  }
}

@keyframes dotPulse {
  0%,
  100% {
    opacity: 0.7;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

@keyframes badgePulse {
  0%,
  100% {
    box-shadow: 0 0 18px -4px rgba(255, 209, 102, 0.55);
  }
  50% {
    box-shadow: 0 0 26px 0 rgba(255, 209, 102, 0.8);
  }
}

@keyframes flash {
  0% {
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 1120px) {
  .card {
    width: clamp(360px, 38vw, 420px);
    padding: 27px;
  }

  .title-card h1 {
    font-size: clamp(42px, 4.8vw, 58px);
  }
}

@media (max-width: 900px) {
  .card {
    right: 20px;
    width: min(390px, calc(100vw - 40px));
  }

  .result-card {
    width: min(370px, calc(100vw - 40px));
  }
}

@media (max-width: 760px) {
  .topbar {
    padding: 14px 16px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .brand-mark svg {
    width: 28px;
    height: 28px;
  }

  .brand-text strong {
    font-size: 13px;
  }

  .brand-text span {
    font-size: 7.5px;
  }

  .best-chip {
    height: 38px;
    padding: 0 12px;
  }

  .best-label {
    display: none;
  }

  .best-chip strong {
    font-size: 13px;
  }

  .icon-btn {
    width: 38px;
    height: 38px;
  }

  .card {
    top: auto;
    right: 16px;
    bottom: 16px;
    left: 16px;
    width: auto;
    max-height: calc(100dvh - 92px);
    padding: 22px;
    border-radius: 23px;
    overflow-y: auto;
    transform: none;
  }

  .card.is-hidden {
    transform: translateY(18px) scale(0.985);
  }

  .card-glow {
    top: -70px;
    right: -50px;
    width: 220px;
    height: 220px;
  }

  .title-card h1 {
    margin: 14px 0 10px;
    font-size: clamp(38px, 11vw, 48px);
  }

  .lede {
    font-size: 12.5px;
  }

  .steps {
    margin: 16px 0 18px;
  }

  .step {
    padding: 9px 0;
  }

  .step p {
    display: none;
  }

  .primary-btn {
    padding: 13px 13px 13px 17px;
  }

  .title-foot {
    gap: 7px;
    margin-top: 12px;
    font-size: 7.5px;
  }

  .result-card {
    width: auto;
  }

  .result-distance {
    font-size: 64px;
    margin-top: 10px;
  }

  .result-card h2 {
    margin-top: 13px;
    font-size: 21px;
  }

  .result-meta {
    margin-top: 14px;
    padding-top: 12px;
  }

  .card-actions {
    margin-top: 15px;
  }

  .live-hud {
    top: 74px;
  }

  .live-distance {
    font-size: 44px;
  }

  .live-unit {
    font-size: 15px;
  }

  .hint,
  .footer-notes {
    display: none;
  }

  .toast {
    bottom: 112px;
    max-width: calc(100vw - 32px);
    white-space: normal;
    text-align: center;
  }
}

@media (max-width: 420px) {
  .brand-text span {
    display: none;
  }

  .title-card h1 {
    font-size: 36px;
  }

  .title-foot span:first-child,
  .title-foot .dot-sep {
    display: none;
  }

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

  .ghost-btn {
    padding: 13px 18px;
  }
}

@media (max-height: 720px) and (max-width: 760px) {
  .steps,
  .lede {
    display: none;
  }

  .title-card h1 {
    margin-bottom: 14px;
  }
}

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