/* =========================================================
   Shanghai International Circuit — 3D seat preview
   Liquid-glass interface
   ========================================================= */
:root {
  --text: #f4f1e9;
  --muted: rgba(244, 239, 227, 0.66);
  --faint: rgba(244, 239, 227, 0.4);
  --gold: #c6a76a;
  --gold-soft: #dbc699;
  --red: #a52735;
  --red-bright: #d84a58;
  --cyan: #9fbac0;
  --glass-tint: rgba(13, 18, 22, 0.62);
  --glass-tint-2: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-highlight: rgba(255, 255, 255, 0.5);
  --glass-blur: 24px;
  --panel-radius: 20px;
  --shadow-panel: 0 20px 55px rgba(25, 24, 20, 0.22), 0 3px 12px rgba(25, 24, 20, 0.1);
  --font: "Bahnschrift", "Segoe UI Variable Display", "Segoe UI", "Microsoft YaHei UI",
    "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  --font-display: "Bahnschrift SemiCondensed", "Bahnschrift", "Arial Narrow", "Microsoft YaHei UI",
    "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #f2efe8;
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

@supports (height: 100dvh) {
  html,
  body {
    height: 100dvh;
  }
}

button,
a,
[role="button"] {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

body.night {
  background: #0a1219;
}

body.night {
  --glass-tint: rgba(4, 9, 15, 0.66);
  --glass-tint-2: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.18);
  --glass-highlight: rgba(255, 255, 255, 0.42);
  --muted: rgba(238, 243, 250, 0.64);
  --faint: rgba(238, 243, 250, 0.38);
}

button {
  font-family: inherit;
  color: inherit;
}

button:focus-visible,
[tabindex]:focus-visible {
  outline: 1px solid var(--gold-soft);
  outline-offset: 4px;
}

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
}

@supports (height: 100dvh) {
  #scene {
    height: 100dvh;
  }
}

#scene.grabbing,
body.seat-mode #scene.grabbing {
  cursor: grabbing;
}

body.seat-mode #scene {
  cursor: grab;
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 17px;
  height: 17px;
  display: inline-block;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}

/* =========================================================
   Scene atmosphere
   ========================================================= */
.scene-fx {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.night-scrim {
  position: absolute;
  inset: 0;
  background: #04080c;
  opacity: 0;
  transition: opacity 0.9s ease;
  pointer-events: none;
}

body.night .night-scrim {
  opacity: 0.34;
}

.scene-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(140% 110% at 45% 8%, transparent 58%, rgba(40, 38, 32, 0.09) 100%),
    linear-gradient(180deg, rgba(250, 248, 243, 0.06) 0%, transparent 20%, transparent 80%, rgba(50, 48, 42, 0.08) 100%);
}

.scene-grain {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.7'/></svg>");
  background-size: 180px 180px;
}

.pov-frame {
  position: absolute;
  inset: 34px;
  opacity: 0;
  transition: opacity 0.7s ease;
}
body.seat-mode .pov-frame {
  opacity: 0.75;
}
.pov-frame .corner {
  position: absolute;
  width: 30px;
  height: 30px;
  border-color: rgba(45, 44, 39, 0.38);
  border-style: solid;
  filter: drop-shadow(0 1px 4px rgba(255, 255, 255, 0.35));
}
.pov-frame .tl {
  top: 0;
  left: 0;
  border-width: 1px 0 0 1px;
}
.pov-frame .tr {
  top: 0;
  right: 0;
  border-width: 1px 1px 0 0;
}
.pov-frame .bl {
  bottom: 0;
  left: 0;
  border-width: 0 0 1px 1px;
}
.pov-frame .br {
  bottom: 0;
  right: 0;
  border-width: 0 1px 1px 0;
}
.pov-reticle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border: 1px solid rgba(45, 44, 39, 0.45);
  border-radius: 50%;
  opacity: 0.75;
}

/* =========================================================
   Liquid glass primitives
   ========================================================= */
.glass-panel {
  position: relative;
  background:
    linear-gradient(165deg, rgba(28, 33, 37, 0.66), rgba(10, 14, 17, 0.7)),
    linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, var(--glass-tint-2) 34%, var(--glass-tint) 100%);
  border: 1px solid var(--glass-border);
  border-radius: var(--panel-radius);
  box-shadow:
    var(--shadow-panel),
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.25);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.25);
  isolation: isolate;
}

.glass-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: -1;
  background:
    linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.08) 9%, transparent 20%, transparent 84%, rgba(255, 255, 255, 0.04) 96%, transparent 100%);
  mix-blend-mode: screen;
  opacity: 0.55;
}

.glass-panel::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: calc(var(--panel-radius) - 1px);
  border: 1px solid rgba(255, 255, 255, 0.055);
  pointer-events: none;
}

.liquid {
  --mx: 50%;
  --my: 0%;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--glass-border);
  background:
    radial-gradient(130% 170% at var(--mx) var(--my), rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.05) 36%, transparent 62%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.025) 58%, rgba(8, 12, 15, 0.12));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -8px 18px rgba(255, 255, 255, 0.025),
    0 6px 18px rgba(20, 19, 16, 0.14);
  backdrop-filter: blur(16px) saturate(1.35);
  -webkit-backdrop-filter: blur(16px) saturate(1.35);
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.liquid::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background:
    radial-gradient(70% 90% at 24% 10%, rgba(255, 255, 255, 0.38), transparent 52%),
    conic-gradient(from 210deg at 50% 50%, transparent 0deg, rgba(255, 255, 255, 0.11) 70deg, transparent 125deg, rgba(255, 255, 255, 0.045) 230deg, transparent 300deg);
  opacity: 0.58;
  pointer-events: none;
}

.liquid::after {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.62), transparent);
  opacity: 0.55;
  pointer-events: none;
}

.liquid:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -8px 18px rgba(255, 255, 255, 0.035),
    0 9px 22px rgba(20, 19, 16, 0.17);
}

.liquid:active {
  transform: translateY(0) scale(0.985);
}

.liquid .icon,
.liquid svg {
  pointer-events: none;
}

/* =========================================================
   Brand panel / stands
   ========================================================= */
.brand-panel {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  width: max-content;
  max-width: min(540px, 54vw);
  padding: 10px 14px;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.7s ease 0.15s, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s, padding 0.4s ease;
}

body.ready .brand-panel {
  opacity: 1;
  transform: translateY(0);
}

.brand-panel .track-facts {
  flex: 0 0 auto;
  width: auto;
  margin-top: 0;
  padding-left: 16px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  grid-template-columns: repeat(3, minmax(46px, auto));
}

.brand-head {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  flex: 0 0 auto;
}

.sic-logo {
  position: relative;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 12px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.03) 55%),
    linear-gradient(145deg, #a2182a, #5c0d17);
  border: 1px solid rgba(255, 255, 255, 0.34);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.55),
    0 8px 24px rgba(90, 10, 20, 0.38);
  overflow: hidden;
}

.sic-logo .logo-speed {
  position: absolute;
  top: 12px;
  right: -14px;
  width: 45px;
  height: 4px;
  background: var(--gold);
  transform: rotate(-27deg);
  opacity: 0.9;
  box-shadow: 0 7px 0 rgba(232, 196, 118, 0.5), 0 14px 0 rgba(232, 196, 118, 0.25);
}

.sic-logo .logo-mark {
  position: absolute;
  left: 10px;
  bottom: 7px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 24px;
  letter-spacing: -0.07em;
  color: #f8f1df;
}

.sic-logo .logo-cn {
  position: absolute;
  right: 7px;
  top: 2px;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 12px;
  color: var(--gold);
  opacity: 0.82;
}

.brand-copy {
  min-width: 0;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 9px;
  line-height: 1.2;
  letter-spacing: 0.15em;
  color: var(--gold-soft);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-dot {
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--red-bright);
  box-shadow: 0 0 0 3px rgba(223, 51, 71, 0.12), 0 0 12px rgba(223, 51, 71, 0.6);
  animation: blink 2.2s ease infinite;
}

.brand-copy h1 {
  margin: 5px 0 1px;
  font-size: 23px;
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: #fffdf6;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.28);
  white-space: nowrap;
}

.track-latin {
  margin: 0;
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 0.13em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body:not([data-lang="zh"]) .brand-copy h1 {
  font-size: 16px;
  line-height: 1.14;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body[data-lang="en"] .brand-copy h1 {
  font-size: 15px;
}
body[data-lang="ja"] .brand-copy h1 {
  font-size: 15px;
}
body[data-lang="ko"] .brand-copy h1 {
  font-size: 14.5px;
}
body[data-lang="es"] .brand-copy h1,
body[data-lang="fr"] .brand-copy h1 {
  font-size: 14.5px;
}
body.seat-mode:not([data-lang="zh"]) .brand-copy h1 {
  -webkit-line-clamp: 1;
  font-size: 13px;
}

.track-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: 10px;
  padding: 0;
  flex: 0 0 auto;
}

.fact {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 5px 6px 4px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.fact b {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.94);
  font-weight: 700;
}
.fact span {
  font-size: 7px;
  letter-spacing: 0.05em;
  color: var(--faint);
  white-space: nowrap;
}
.fact.accent b {
  color: var(--gold);
  font-size: 10px;
}
.fact.accent span {
  font-size: 6.5px;
  letter-spacing: 0.08em;
}

.panel-divider {
  height: 1px;
  margin: 10px 0 8px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.17) 15%, rgba(255, 255, 255, 0.08) 85%, transparent);
  flex: 0 0 auto;
}

.stand-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  flex: 0 0 auto;
}

.stand-head h2 {
  margin: 0;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.015em;
  color: #fbf8ee;
}

.stand-head p {
  margin: 2px 0 0;
  font-size: 8.5px;
  letter-spacing: 0.015em;
  color: var(--faint);
}

.collapse-btn {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--muted);
  padding: 0;
}
.collapse-btn .icon,
.collapse-btn svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  transition: transform 0.45s ease;
}
.brand-panel.collapsed .collapse-btn svg {
  transform: rotate(180deg);
}

.stand-list {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow-y: auto;
  padding: 1px 3px 4px 1px;
  min-height: 0;
  flex: 1 1 auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}
.stand-list::-webkit-scrollbar {
  width: 4px;
}
.stand-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
}

.stand-item {
  width: 100%;
  min-height: 34px;
  padding: 3px 8px 3px 4px;
  border-radius: 9px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  text-align: left;
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.09);
  background:
    radial-gradient(120% 160% at var(--mx) var(--my), rgba(255, 255, 255, 0.13), transparent 60%),
    linear-gradient(140deg, rgba(20, 28, 34, 0.5), rgba(6, 10, 13, 0.38));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 1px 5px rgba(0, 0, 0, 0.1);
  transition: border-color 0.28s ease, background 0.28s ease, transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.stand-item:hover {
  transform: translateX(1px);
  border-color: rgba(255, 255, 255, 0.22);
}
.stand-item.active {
  border-color: color-mix(in srgb, var(--stand-accent) 38%, rgba(255, 255, 255, 0.28));
  background:
    radial-gradient(100% 180% at 0% 20%, color-mix(in srgb, var(--stand-accent) 12%, transparent), transparent 68%),
    linear-gradient(140deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.025));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 2px 0 0 var(--stand-accent),
    0 5px 14px rgba(0, 0, 0, 0.12);
}

.stand-badge {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid color-mix(in srgb, var(--stand-accent) 35%, rgba(255, 255, 255, 0.16));
  color: #f6f2e8;
  font-weight: 800;
  font-size: 12px;
  line-height: 1;
}
.stand-badge small {
  font-family: var(--font);
  font-size: 4.6px;
  letter-spacing: 0.07em;
  font-weight: 700;
  opacity: 0.72;
  margin-top: 1px;
}

.stand-info {
  min-width: 0;
}
.stand-info b {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fbf8f0;
}
.stand-info span {
  display: block;
  margin-top: 0;
  font-size: 7px;
  letter-spacing: 0.03em;
  color: rgba(241, 237, 226, 0.44);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stand-price {
  text-align: right;
  line-height: 1;
  padding-left: 4px;
}
.stand-price b {
  display: block;
  font-family: var(--font-display);
  font-size: 12.5px;
  letter-spacing: 0.012em;
  color: #d9cbb0;
  font-weight: 600;
}
.stand-price span {
  display: block;
  margin-top: 1px;
  font-size: 6.5px;
  letter-spacing: 0.05em;
  color: rgba(241, 237, 226, 0.38);
}

.price-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 7.5px;
  letter-spacing: 0.03em;
  color: var(--faint);
  flex: 0 0 auto;
}
.note-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.75;
}

/* ---------- 左侧看台面板（独立网格区域，不覆盖场景中心） ---------- */
.stand-panel {
  grid-column: 1;
  grid-row: 2;
  justify-self: start;
  align-self: start;
  display: flex;
  flex-direction: column;
  width: min(336px, 100%);
  max-height: 100%;
  min-height: 0;
  /* 留出顶部把手与底部票务区的呼吸空间 */
  padding: 12px 14px 10px;
  z-index: 2;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s ease 0.35s, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.35s,
    max-height 0.45s ease, padding 0.45s ease, border-color 0.3s ease;
}

body.ready .stand-panel {
  opacity: 1;
  transform: translateY(0);
}

.stand-panel .stand-list {
  margin-top: 7px;
}

.stand-panel .collapse-btn svg {
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.stand-panel.collapsed {
  max-height: 52px;
  padding-bottom: 12px;
}
.stand-panel.collapsed .stand-list,
.stand-panel.collapsed .price-note,
.stand-panel.collapsed .stand-sub {
  display: none;
}
.stand-panel.collapsed .collapse-btn svg {
  transform: rotate(180deg);
}

/* =========================================================
   Top controls
   ========================================================= */
.top-controls {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  max-width: 100%;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.7s ease 0.35s, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.35s;
}
body.ready .top-controls {
  opacity: 1;
  transform: translateY(0);
}

.lang-wrap {
  position: relative;
}

.top-controls .glass-btn {
  color: #f5f1e8;
  background:
    radial-gradient(130% 170% at var(--mx) var(--my), rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.04) 36%, transparent 62%),
    linear-gradient(145deg, rgba(27, 33, 38, 0.72), rgba(9, 13, 16, 0.68));
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    0 6px 18px rgba(25, 24, 20, 0.16);
}

.glass-btn {
  height: 38px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 12px;
  font-size: 10.5px;
  letter-spacing: 0.03em;
  color: var(--text);
}
.glass-btn .icon {
  width: 14px;
  height: 14px;
  color: rgba(255, 255, 255, 0.72);
}
.glass-btn .chevron {
  width: 11px;
  height: 11px;
  transition: transform 0.3s ease;
  color: var(--muted);
}
.glass-btn[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}
.glass-btn.icon-only {
  width: 38px;
  padding: 0;
}
.theme-btn {
  padding: 0 12px 0 10px;
  gap: 7px;
}
.theme-icon {
  display: grid;
  place-items: center;
  color: var(--gold-soft);
}
.theme-icon .icon {
  color: currentColor;
}

.lang-menu {
  position: absolute;
  top: 47px;
  right: 0;
  width: 224px;
  padding: 7px;
  border-radius: 18px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-7px) scale(0.97);
  transition: opacity 0.26s ease, transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
  transform-origin: top right;
}
.lang-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.lang-option {
  width: 100%;
  height: 36px;
  padding: 0 9px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--text);
  font-size: 11px;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease;
}
.lang-option:hover {
  background: rgba(255, 255, 255, 0.1);
}
.lang-option.active {
  background: rgba(255, 255, 255, 0.13);
}
.lang-code {
  width: 28px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-family: var(--font-display);
  font-size: 8px;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.lang-option.active .lang-code {
  color: #15191d;
  background: var(--gold);
  border-color: var(--gold);
}
.lang-name {
  flex: 1;
}
.lang-check {
  width: 14px;
  height: 14px;
  opacity: 0;
}
.lang-option.active .lang-check {
  opacity: 1;
  color: var(--gold);
}
.lang-check .icon {
  width: 14px;
  height: 14px;
}

/* =========================================================
   Mini map
   ========================================================= */
.mini-panel {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  width: 224px;
  padding: 10px 11px 8px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease 0.5s, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.5s;
}
body.ready .mini-panel {
  opacity: 1;
  transform: translateY(0);
}

.mini-live {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 18px;
  padding: 0 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-display);
  font-size: 6px;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.mini-live i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #f05c60;
  box-shadow: 0 0 7px rgba(240, 92, 96, 0.7);
  animation: blink 2.2s ease infinite;
}

.mini-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.mini-eyebrow {
  display: block;
  font-family: var(--font-display);
  font-size: 7.5px;
  letter-spacing: 0.12em;
  color: var(--gold);
  opacity: 0.8;
}
.mini-head h3 {
  margin: 3px 0 0;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.live-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 21px;
  padding: 0 8px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 7.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.live-chip i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #f05c60;
  box-shadow: 0 0 8px rgba(240, 92, 96, 0.7);
  animation: blink 2.2s ease infinite;
}

.mini-canvas-wrap {
  position: relative;
  margin-top: 9px;
  border-radius: 13px;
  background:
    radial-gradient(90% 100% at 50% 0%, rgba(255, 255, 255, 0.055), transparent 70%),
    rgba(4, 10, 16, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.065);
  overflow: hidden;
}
.mini-canvas-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(100% 100% at 50% 50%, #000 20%, transparent 88%);
  pointer-events: none;
}
#minimap {
  width: 100%;
  height: auto;
  display: block;
  position: relative;
  z-index: 1;
}

.map-track-base {
  fill: none;
  stroke: rgba(255, 255, 255, 0.17);
  stroke-width: 34;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.map-track-outline {
  fill: none;
  stroke: rgba(4, 9, 14, 0.88);
  stroke-width: 23;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.map-sector {
  fill: none;
  stroke-width: 9;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.98;
}
.sector-1 { stroke: #df4554; }
.sector-2 { stroke: #e7c476; }
.sector-3 { stroke: #7bc6d8; }

.map-pit {
  fill: none;
  stroke: rgba(255, 255, 255, 0.26);
  stroke-width: 1.2;
  stroke-dasharray: 3 3;
}
.map-start {
  fill: #f4efe2;
}
.map-start-check {
  fill: #13181d;
}
.map-marker {
  cursor: pointer;
}
.marker-halo {
  fill: none;
  stroke-width: 1.4;
  opacity: 0.6;
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.map-marker:hover .marker-halo,
.map-marker.active .marker-halo {
  opacity: 1;
  transform: scale(1.35);
}
.marker-body {
  fill: rgba(10, 17, 24, 0.8);
  stroke: rgba(255, 255, 255, 0.55);
  stroke-width: 1;
  transition: fill 0.25s ease, stroke 0.25s ease;
}
.map-marker:hover .marker-body,
.map-marker.active .marker-body {
  fill: var(--marker-accent, #e7c476);
  stroke: #fff;
}
.marker-letter {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  fill: #f5f1e8;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
}
.map-marker.active .marker-letter {
  fill: #11161b;
}
.marker-label {
  display: none;
}
.map-marker.active .marker-label {
  fill: rgba(255, 255, 255, 0.9);
}
.seat-pin {
  pointer-events: none;
}

.seat-pin .pin-core {
  fill: #ff5964;
  stroke: #fff;
  stroke-width: 1.2;
}
.seat-pin .pin-pulse {
  fill: none;
  stroke: #ff5964;
  stroke-width: 1.2;
  opacity: 0.6;
  transform-box: fill-box;
  transform-origin: center;
  animation: pinPulse 2.4s ease-out infinite;
}
.seat-pin .pin-line {
  stroke: rgba(255, 90, 100, 0.5);
  stroke-width: 0.8;
  stroke-dasharray: 2 2;
}
.map-compass {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 20px;
  height: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: rgba(255, 255, 255, 0.56);
  font-family: var(--font-display);
  font-size: 7px;
  z-index: 2;
}
.map-compass i {
  width: 1px;
  height: 15px;
  background: rgba(255, 255, 255, 0.4);
  position: relative;
}
.map-compass i::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -2.5px;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-bottom: 6px solid rgba(255, 255, 255, 0.56);
}
.map-scale {
  position: absolute;
  left: 9px;
  bottom: 7px;
  display: flex;
  align-items: center;
  gap: 4px;
  color: rgba(255, 255, 255, 0.36);
  font-family: var(--font-display);
  font-size: 5.5px;
  letter-spacing: 0.06em;
  z-index: 2;
}
.map-scale i {
  width: 18px;
  height: 4px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-top: 0;
}

.mini-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 7.5px;
  letter-spacing: 0.025em;
  color: var(--faint);
}

.mini-osm {
  display: block;
  margin-top: 4px;
  font-size: 6.5px;
  line-height: 1.2;
  letter-spacing: 0.015em;
  color: var(--faint);
  opacity: 0.68;
  text-decoration: none;
}

.mini-osm:hover {
  opacity: 1;
  text-decoration: underline;
}

.mini-osm-short {
  display: none;
}
.mini-seat {
  font-family: var(--font-display);
  color: var(--gold-soft);
  font-size: 7.5px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* =========================================================
   Ticket panel
   ========================================================= */
.ticket-panel {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  width: 304px;
  box-sizing: border-box;
  padding: 13px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease 0.6s, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.6s, padding 0.4s ease;
}
body.ready .ticket-panel {
  opacity: 1;
  transform: translateY(0);
}

.ticket-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ticket-letter {
  width: 45px;
  height: 45px;
  flex: 0 0 auto;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 900;
  color: #14181d;
  background: linear-gradient(150deg, var(--stand-accent, #e8c476), color-mix(in srgb, var(--stand-accent, #e8c476) 45%, #5a0d16));
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.45), 0 7px 18px rgba(0, 0, 0, 0.2);
}
.ticket-title-wrap {
  min-width: 0;
  flex: 1;
}
.ticket-kicker {
  display: block;
  font-family: var(--font-display);
  font-size: 7px;
  letter-spacing: 0.13em;
  color: var(--gold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ticket-title-wrap h3 {
  margin: 3px 0 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.availability {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 7px;
  border-radius: 7px;
  background: rgba(74, 182, 124, 0.1);
  border: 1px solid rgba(105, 205, 148, 0.2);
  color: #9cdfb7;
  font-size: 7px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.availability i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #6ddf9a;
  box-shadow: 0 0 7px rgba(109, 223, 154, 0.65);
}
.ticket-desc {
  margin: 11px 0 10px;
  font-size: 9.5px;
  line-height: 1.55;
  color: var(--muted);
  min-height: 30px;
}
.feature-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.feature-chip {
  height: 19px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 7px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.045);
  font-size: 7px;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.64);
}
.feature-chip .icon {
  width: 10px;
  height: 10px;
  color: var(--gold);
  opacity: 0.8;
}
.ticket-seat-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 11px;
  padding: 7px 8px;
  border-radius: 8px;
  background: rgba(5, 10, 15, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.055);
  font-size: 7px;
  letter-spacing: 0.025em;
  color: var(--faint);
}
.ticket-seat-line > span:first-child {
  display: flex;
  align-items: center;
  gap: 5px;
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--font-display);
  font-size: 8px;
  letter-spacing: 0.06em;
}
.ticket-seat-line .icon {
  width: 11px;
  height: 11px;
  color: var(--gold);
}
.ticket-buy-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}
.ticket-price {
  display: flex;
  align-items: baseline;
  gap: 1px;
  line-height: 1;
}
.price-currency {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--gold-soft);
}
.ticket-price b {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: -0.025em;
  font-weight: 800;
  color: #fff8e8;
}
.price-unit {
  margin-left: 5px;
  font-size: 7px;
  letter-spacing: 0.04em;
  color: var(--faint);
  white-space: nowrap;
}
.book-btn {
  height: 40px;
  padding: 0 13px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  white-space: nowrap;
  background:
    radial-gradient(120% 180% at var(--mx) var(--my), rgba(255, 255, 255, 0.34), transparent 50%),
    linear-gradient(140deg, rgba(194, 34, 52, 0.82), rgba(113, 18, 30, 0.8));
  border-color: rgba(255, 159, 168, 0.36);
  color: #fff6ea;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4), 0 7px 20px rgba(83, 8, 18, 0.35);
}
.book-btn:hover {
  border-color: rgba(255, 186, 192, 0.55);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.5), 0 10px 28px rgba(83, 8, 18, 0.45), 0 0 25px rgba(219, 49, 66, 0.15);
}
.book-btn .icon {
  color: var(--gold-soft);
}
.book-btn .icon.external {
  width: 11px;
  height: 11px;
  opacity: 0.62;
}
.ticket-note {
  margin: 8px 0 0;
  font-size: 7.5px;
  letter-spacing: 0.03em;
  color: rgba(242, 236, 224, 0.34);
  text-align: right;
}

/* =========================================================
   Seat mode HUD
   ========================================================= */
.view-hud {
  position: relative;
  z-index: 4;
  transform: translateY(-10px);
  height: 42px;
  padding: 0 7px 0 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 14px;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.5s ease, transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.5s;
  width: max-content;
  max-width: 100%;
}
body.seat-mode .view-hud {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: translateY(0);
}
.pov-badge {
  height: 21px;
  padding: 0 7px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--red);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff5ec;
  font-family: var(--font-display);
  font-size: 8px;
  letter-spacing: 0.08em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.view-hud-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.view-hud-copy span {
  font-size: 7px;
  letter-spacing: 0.08em;
  color: var(--faint);
}
.view-hud-copy b {
  font-size: 9px;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-display);
  font-weight: 600;
}
.hud-back {
  height: 29px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  border-radius: 8px;
  font-size: 8px;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.82);
}
.hud-back .icon {
  width: 12px;
  height: 12px;
}

body.seat-mode .brand-panel {
  width: auto;
  max-height: none;
  min-height: 0;
  padding: 9px 13px;
}
body.seat-mode .brand-panel .track-facts {
  display: none;
}
body.seat-mode .stand-panel {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
body.seat-mode .brand-copy h1 {
  font-size: 19px;
}
body.seat-mode .sic-logo {
  width: 45px;
  height: 45px;
  border-radius: 11px;
}
body.seat-mode .sic-logo .logo-mark {
  font-size: 19px;
}
body.seat-mode .eyebrow {
  font-size: 7.5px;
}
body.seat-mode .track-latin {
  font-size: 7.5px;
}
body.seat-mode .mini-panel {
  opacity: 0.88;
}
body.seat-mode .ticket-panel {
  width: 326px;
}
body.seat-mode .ticket-desc {
  display: none;
}
body.seat-mode .site-credit {
  opacity: 0;
}
body.seat-mode .scene-hint {
  opacity: 0.7;
}

.scene-hint {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 7px;
  height: 26px;
  padding: 0 10px;
  border-radius: 9px;
  background: rgba(5, 11, 16, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.075);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: rgba(255, 255, 255, 0.48);
  font-size: 7.5px;
  letter-spacing: 0.04em;
  opacity: 0;
  transition: opacity 1s ease 1.2s;
  pointer-events: none;
  white-space: nowrap;
}
body.ready .scene-hint {
  opacity: 0.9;
}
.hint-icon {
  display: grid;
  place-items: center;
  color: var(--gold);
  opacity: 0.8;
}
.hint-icon .icon {
  width: 12px;
  height: 12px;
}

/* =========================================================
   Toast
   ========================================================= */
.toast {
  position: fixed;
  z-index: 80;
  top: 82px;
  left: 50%;
  transform: translate(-50%, -12px);
  min-width: 240px;
  max-width: 420px;
  padding: 11px 15px 11px 11px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.toast-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(88, 196, 130, 0.14);
  border: 1px solid rgba(111, 220, 152, 0.25);
  color: #8fe4ab;
}
.toast-icon .icon {
  width: 15px;
  height: 15px;
}
.toast b {
  display: block;
  font-size: 10px;
  letter-spacing: 0.02em;
}
.toast span:not(.toast-icon) {
  display: block;
  margin-top: 2px;
  font-size: 8px;
  line-height: 1.4;
  color: var(--faint);
}

/* =========================================================
   Modal
   ========================================================= */
.modal-backdrop {
  position: fixed;
  z-index: 70;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2, 7, 11, 0.52);
  backdrop-filter: blur(12px) saturate(0.9);
  -webkit-backdrop-filter: blur(12px) saturate(0.9);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}
.modal-card {
  position: relative;
  width: min(410px, 100%);
  padding: 26px;
  border-radius: 26px;
  transform: translateY(16px) scale(0.97);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.modal-backdrop.open .modal-card {
  transform: translateY(0) scale(1);
}
.modal-close {
  position: absolute;
  top: 13px;
  right: 13px;
  width: 29px;
  height: 29px;
  border-radius: 9px;
  padding: 0;
}
.modal-close .icon {
  width: 13px;
  height: 13px;
}
.modal-kicker {
  display: block;
  font-family: var(--font-display);
  font-size: 7px;
  letter-spacing: 0.16em;
  color: var(--gold);
}
.modal-card h3 {
  margin: 7px 0 3px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.modal-sub {
  margin: 0;
  font-size: 9px;
  letter-spacing: 0.02em;
  color: var(--faint);
}
.modal-seat-card {
  margin-top: 19px;
  padding: 11px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.075);
  display: flex;
  align-items: center;
  gap: 10px;
}
.modal-letter {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, var(--stand-accent, #e8c476), color-mix(in srgb, var(--stand-accent, #e8c476) 40%, #4f0b14));
  color: #10151a;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 21px;
}
.modal-seat-card b {
  display: block;
  font-size: 11px;
}
.modal-seat-card span {
  display: block;
  margin-top: 2px;
  font-size: 8px;
  color: var(--faint);
  letter-spacing: 0.02em;
}
.modal-unit-price {
  margin-left: auto;
  font-family: var(--font-display);
  color: var(--gold-soft);
  font-size: 11px;
}
.modal-unit-price b {
  font-size: 17px;
  display: inline;
}
.qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 17px;
  font-size: 10px;
  color: var(--muted);
}
.qty-control {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 34px;
  padding: 0 4px;
  border-radius: 10px;
  cursor: default;
}
.qty-control button {
  width: 28px;
  height: 27px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  border-radius: 7px;
  color: var(--text);
  cursor: pointer;
}
.qty-control button:hover {
  background: rgba(255, 255, 255, 0.09);
}
.qty-control .icon {
  width: 12px;
  height: 12px;
}
.qty-control b {
  width: 28px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 13px;
}
.modal-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 10px;
  color: var(--muted);
}
.modal-total b {
  font-family: var(--font-display);
  font-size: 27px;
  color: #fff7e5;
  letter-spacing: -0.02em;
}
.modal-confirm {
  width: 100%;
  height: 44px;
  margin-top: 17px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  background:
    radial-gradient(120% 180% at var(--mx) var(--my), rgba(255, 255, 255, 0.38), transparent 55%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.03)),
    linear-gradient(135deg, rgba(164, 24, 42, 0.85), rgba(78, 10, 20, 0.75));
  border-color: rgba(255, 187, 193, 0.35);
}
.modal-confirm .icon {
  color: var(--gold-soft);
}
.modal-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 11px 0 0;
  font-size: 7.5px;
  color: var(--faint);
}

/* =========================================================
   Loader
   ========================================================= */
.loader {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #070d13;
  transition: opacity 0.9s ease, visibility 0.9s ease;
}
.loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-bg {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(52% 50% at 50% 42%, rgba(160, 25, 42, 0.24), transparent 72%),
    radial-gradient(38% 45% at 20% 80%, rgba(55, 108, 126, 0.16), transparent 70%),
    linear-gradient(135deg, #070d13, #0b1620 52%, #060b10);
  animation: loaderGlow 6s ease-in-out infinite alternate;
}
.loader-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 70px 70px;
  mask-image: radial-gradient(55% 55% at 50% 50%, #000 20%, transparent 80%);
}
.loader-content {
  position: relative;
  width: min(520px, calc(100vw - 64px));
  text-align: center;
  padding-bottom: 20px;
}
.loader-emblem {
  position: relative;
  width: 112px;
  height: 112px;
  margin: 0 auto 30px;
  border-radius: 28px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.02) 58%),
    linear-gradient(145deg, #9e1729, #4f0a13);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    inset 0 2px 2px rgba(255, 255, 255, 0.4),
    0 30px 80px rgba(112, 7, 20, 0.35),
    0 0 80px rgba(177, 30, 48, 0.12);
  transform: rotate(-3deg);
}
.loader-emblem::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 21px;
}
.loader-mark {
  position: absolute;
  left: 15px;
  bottom: 13px;
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 900;
  letter-spacing: -0.08em;
  color: #faf2df;
  line-height: 1;
}
.loader-cn {
  position: absolute;
  right: 15px;
  top: 11px;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 17px;
  color: var(--gold);
  opacity: 0.9;
}
.loader-speed-line {
  position: absolute;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.6;
  filter: drop-shadow(0 0 6px rgba(232, 196, 118, 0.4));
}
.loader-speed-line.l1 {
  width: 70px;
  top: 24px;
  right: -8px;
  transform: rotate(-32deg);
}
.loader-speed-line.l2 {
  width: 46px;
  top: 35px;
  right: -3px;
  transform: rotate(-32deg);
  opacity: 0.32;
}
.loader-speed-line.l3 {
  width: 26px;
  top: 46px;
  right: 2px;
  transform: rotate(-32deg);
  opacity: 0.18;
}
.loader-content h1 {
  margin: 0;
  font-size: clamp(25px, 3.2vw, 36px);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #f8f2e4;
}
.loader-content > p {
  margin: 9px 0 0;
  font-family: var(--font-display);
  font-size: 8.5px;
  letter-spacing: 0.34em;
  color: rgba(242, 235, 220, 0.42);
}
.loader-track {
  width: 100%;
  height: 2px;
  margin: 37px 0 12px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}
.loader-track i {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, rgba(228, 189, 111, 0.2), var(--gold), #fff2ce);
  box-shadow: 0 0 17px rgba(232, 196, 118, 0.55);
  transition: width 0.45s cubic-bezier(0.3, 0.7, 0.2, 1);
}
.loader-status {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 8px;
  letter-spacing: 0.06em;
  color: rgba(242, 235, 220, 0.36);
}
.loader-status #loaderPercent {
  font-family: var(--font-display);
  color: var(--gold);
}
.loader-credit {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 7px;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.22);
  white-space: nowrap;
}

/* =========================================================
   Footer
   ========================================================= */
.site-credit {
  position: fixed;
  z-index: 4;
  left: 50%;
  bottom: 9px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 5.7px;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.22);
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.credit-sep {
  opacity: 0.4;
}

/* =========================================================
   UI initial reveal
   ========================================================= */
body:not(.ready) .toast {
  opacity: 0 !important;
}

body.flying .scene-hint {
  opacity: 0;
}

body.modal-open #scene {
  pointer-events: none;
}

body.loading .site-credit {
  opacity: 0;
}

/* =========================================================
   UI shell — 分区布局
   顶部栏 / 左侧看台 / 底部栏（地图 · 提示 · 票务）
   三块区域由 Grid 占位，任何视口下都不再互相覆盖。
   ========================================================= */
.ui-shell {
  --ui-pad-x: 14px;
  --ui-pad-y: 14px;
  position: fixed;
  inset: 0;
  z-index: 5;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 336px) minmax(0, 1fr) minmax(0, 336px);
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  padding:
    calc(var(--ui-pad-y) + env(safe-area-inset-top))
    calc(var(--ui-pad-x) + env(safe-area-inset-right))
    calc(var(--ui-pad-y) + env(safe-area-inset-bottom))
    calc(var(--ui-pad-x) + env(safe-area-inset-left));
  box-sizing: border-box;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.55s ease;
}

@supports (height: 100dvh) {
  .ui-shell {
    height: 100dvh;
  }
}

body.ready .ui-shell {
  opacity: 1;
}

.ui-shell > * {
  min-width: 0;
}

.ui-shell .glass-panel,
.ui-shell .liquid,
.ui-shell button,
.ui-shell a,
.ui-shell .stand-list {
  pointer-events: auto;
}

/* ---------- 顶部栏 ---------- */
.ui-topbar {
  grid-column: 1 / -1;
  grid-row: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  pointer-events: none;
}

.ui-topbar > * {
  pointer-events: none;
}

/* 固定顶栏三列：品牌 / 中央状态 / 控件，隐藏某一块时其他块不跳位 */
.ui-topbar .brand-panel {
  grid-column: 1;
}

.ui-topbar .ui-top-center {
  grid-column: 2;
}

.ui-topbar .top-controls {
  grid-column: 3;
}

.ui-topbar .brand-panel,
.ui-topbar .top-controls {
  pointer-events: auto;
}

.ui-top-center {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-width: 0;
}

.ui-top-center > * {
  pointer-events: auto;
}

/* ---------- 底部栏 ---------- */
.bottom-bar {
  grid-column: 1 / -1;
  grid-row: 3;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  pointer-events: none;
}

.bottom-bar > * {
  pointer-events: auto;
}

.ui-bottom-center {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

/* ---------- 移动端抽屉遮罩 ---------- */
.panel-scrim {
  position: fixed;
  inset: 0;
  z-index: 7;
  background: rgba(3, 8, 12, 0.46);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  pointer-events: none;
}

body.panel-open {
  overflow: hidden;
}

body.panel-open .panel-scrim {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.stands-toggle {
  display: none;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1279px) and (min-width: 961px) {
  .ui-shell {
    --ui-pad-x: 12px;
    --ui-pad-y: 12px;
    grid-template-columns: minmax(0, 304px) minmax(0, 1fr) minmax(0, 304px);
    gap: 10px;
  }
  .brand-panel .track-facts {
    display: none;
  }
  .brand-panel {
    max-width: min(430px, 46vw);
  }
  .brand-copy h1 {
    font-size: 20px;
  }
  .stand-panel {
    width: min(304px, 100%);
  }
  .mini-panel {
    width: 200px;
  }
  .ticket-panel {
    width: 286px;
  }
  .ticket-desc {
    font-size: 9px;
  }
}

@media (max-width: 960px) and (min-width: 721px) {
  .ui-shell {
    --ui-pad-x: 12px;
    --ui-pad-y: 12px;
    grid-template-columns: minmax(0, 286px) minmax(0, 1fr) minmax(0, 286px);
    gap: 10px;
  }
  .brand-panel {
    max-width: 300px;
  }
  .brand-panel .track-facts {
    display: none;
  }
  .brand-copy h1 {
    font-size: 18px;
  }
  .stand-panel {
    width: min(286px, 100%);
  }
  .mini-panel {
    width: 186px;
  }
  .mini-canvas-wrap {
    margin-top: 6px;
  }
  .ticket-panel {
    width: 262px;
    padding: 11px;
  }
  .ticket-desc {
    display: none;
  }
  .ticket-price b {
    font-size: 22px;
  }
  .book-btn {
    height: 36px;
    padding: 0 10px;
    font-size: 9px;
  }
}

/* ---------- 手机：上下分区 + 底部泊靠（横屏小高度同样适用） ---------- */
@media (max-width: 720px), (max-height: 540px) and (max-width: 960px) {
  .ui-shell {
    --ui-pad-x: 8px;
    --ui-pad-y: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
  }

  .ui-topbar {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
  }

  .ui-topbar .top-controls {
    grid-column: 2;
  }

  .ui-topbar .brand-panel {
    grid-column: 1;
  }

  .ui-top-center {
    position: fixed;
    left: 50%;
    top: calc(env(safe-area-inset-top) + 64px);
    transform: translateX(-50%);
    z-index: 6;
    width: max-content;
    max-width: calc(100vw - 16px);
  }

  .brand-panel {
    width: 100%;
    max-width: none;
    gap: 8px;
    padding: 7px 10px;
  }

  .brand-copy .eyebrow,
  .brand-copy .track-latin,
  .brand-panel .track-facts {
    display: none;
  }

  .brand-copy h1 {
    margin: 0;
    font-size: 15px;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body:not([data-lang="zh"]) .brand-copy h1 {
    font-size: 13px;
  }

  .sic-logo {
    width: 34px;
    height: 34px;
    border-radius: 9px;
  }

  .sic-logo .logo-speed {
    top: 8px;
    right: -10px;
    width: 32px;
    height: 3px;
  }

  .sic-logo .logo-mark {
    left: 7px;
    bottom: 5px;
    font-size: 16px;
  }

  .sic-logo .logo-cn {
    right: 5px;
    top: 1px;
    font-size: 9px;
  }

  .top-controls {
    gap: 5px;
    flex-wrap: nowrap;
  }

  .glass-btn {
    height: 34px;
    padding: 0 9px;
    font-size: 9.5px;
    border-radius: 10px;
  }

  .glass-btn.icon-only {
    width: 34px;
  }

  .glass-btn .icon {
    width: 14px;
    height: 14px;
  }

  .glass-btn .chevron {
    display: none;
  }

  .stands-toggle {
    display: flex;
  }

  /* 座位视角只保留 POV 条，避免与品牌条争夺顶部空间 */
  body.seat-mode .brand-panel,
  body.seat-mode .stands-toggle {
    display: none;
  }

  body.seat-mode .stand-panel {
    display: none;
  }

  .theme-btn span:not(.theme-icon),
  .car-btn span:not(.icon) {
    display: none;
  }

  .lang-menu {
    position: fixed;
    top: calc(env(safe-area-inset-top) + 50px);
    right: 8px;
    width: min(216px, calc(100vw - 16px));
    z-index: 12;
  }

  /* 底部：地图 + 票务并排，高度可控 */
  .bottom-bar {
    width: 100%;
    gap: 8px;
    align-items: flex-end;
    flex: 0 0 auto;
  }

  .mini-panel {
    width: 124px;
    padding: 6px;
    border-radius: 15px;
  }

  .mini-head {
    display: none;
  }

  .mini-canvas-wrap {
    margin-top: 0;
    border-radius: 10px;
  }

  .mini-foot {
    display: none;
  }

  .mini-osm {
    display: none;
  }

  .mini-osm-short {
    display: block;
    margin-top: 4px;
    font-size: 7.5px;
    line-height: 1.3;
    letter-spacing: 0.02em;
    text-align: center;
    color: var(--faint);
    text-decoration: none;
  }

  .map-compass {
    right: 5px;
    top: 5px;
    transform: scale(0.7);
    transform-origin: top right;
  }

  .map-scale {
    display: none;
  }

  .ticket-panel {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    padding: 9px 10px;
    border-radius: 17px;
  }

  .ticket-head {
    gap: 8px;
  }

  .ticket-letter {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    font-size: 17px;
  }

  .ticket-kicker {
    font-size: 6px;
  }

  .ticket-title-wrap h3 {
    font-size: 12.5px;
  }

  .ticket-desc,
  .ticket-seat-line,
  .ticket-note {
    display: none;
  }

  .ticket-buy-row {
    margin-top: 8px;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .ticket-price b {
    font-size: 20px;
  }

  .price-unit {
    font-size: 6.5px;
  }

  .book-btn {
    height: 32px;
    width: 100%;
    padding: 0 8px;
    font-size: 8.5px;
    justify-content: center;
    border-radius: 10px;
  }

  .book-btn .icon {
    width: 11px;
    height: 11px;
  }

  /* 手机上提示条/机位栏不占底栏位置（机位栏为独立浮层） */
  .ui-bottom-center {
    display: none;
  }

  body.car-mode .ui-bottom-center {
    display: flex;
  }

  .scene-hint {
    display: none;
  }

  /* 座位 HUD 贴在顶部栏下方，居中不压两边 */
  .view-hud {
    width: max-content;
    max-width: calc(100vw - 16px);
    height: 36px;
    padding: 0 5px 0 8px;
    gap: 7px;
  }

  .pov-badge {
    height: 19px;
    font-size: 7px;
    padding: 0 6px;
  }

  .view-hud-copy span {
    font-size: 6px;
  }

  .view-hud-copy b {
    font-size: 8px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hud-back {
    height: 26px;
    font-size: 7.5px;
    padding: 0 8px;
  }

  /* 看台面板改为底部抽屉，默认收起 */
  .stand-panel {
    position: fixed;
    left: 8px;
    right: auto;
    bottom: calc(8px + env(safe-area-inset-bottom));
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    max-height: 58vh;
    max-height: min(58dvh, 430px);
    z-index: 9;
    padding: 16px 12px 10px;
    border-radius: 20px;
    opacity: 1;
    visibility: hidden;
    transform: translateY(calc(100% + 24px));
    box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.36);
    transition: transform 0.46s cubic-bezier(0.22, 0.9, 0.24, 1), visibility 0.46s;
  }

  body.ready .stand-panel {
    opacity: 1;
    transform: translateY(calc(100% + 24px));
  }

  body.panel-open .stand-panel {
    transform: translateY(0);
    visibility: visible;
  }

  /* 抽屉打开时底部地图/票务暂时隐藏，避免层叠遮挡 */
  body.panel-open .bottom-bar {
    visibility: hidden;
    pointer-events: none;
  }

  .stand-panel.collapsed {
    max-height: none;
  }

  .stand-panel .collapse-btn {
    display: grid;
    width: 30px;
    height: 30px;
  }

  .stand-panel::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 50%;
    width: 38px;
    height: 4px;
    margin-left: -19px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.22);
    pointer-events: none;
  }

  .stand-panel .stand-list {
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    gap: 3px;
    padding-bottom: 4px;
    max-height: calc(58vh - 92px);
    max-height: calc(min(58dvh, 430px) - 92px);
  }

  .stand-item {
    flex: none;
    min-height: 40px;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    scroll-snap-align: none;
  }

  .stand-badge {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }

  .stand-info b {
    font-size: 11.5px;
  }

  .stand-price {
    display: block;
  }

  .stand-price b {
    font-size: 11.5px;
  }

  .stand-sub {
    display: block;
  }

  .price-note {
    display: flex;
  }

  /* 赛车模式：底部机位栏 */
  #carBar {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    width: auto;
    padding: 8px;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    z-index: 9;
  }

  .car-bar-head {
    display: none;
  }

  .car-cam {
    padding: 7px 8px;
    font-size: 8px;
  }

  .car-exit-btn {
    padding: 7px 8px;
    font-size: 8px;
  }

  #carHud {
    min-width: 176px;
  }

  .car-hud-speed b {
    font-size: 28px;
  }

  .toast {
    top: calc(env(safe-area-inset-top) + 56px);
    width: calc(100vw - 24px);
    max-width: none;
    min-width: 0;
  }
}

@media (max-width: 420px) {
  #langLabel,
  #themeLabel,
  #carBtnLabel {
    display: none;
  }

  .lang-wrap .glass-btn,
  .glass-btn {
    padding: 0 8px;
  }  .mini-panel {
    width: 112px;
  }

  .ticket-kicker {
    display: none;
  }

  .ticket-price b {
    font-size: 18px;
  }
}

@media (max-width: 360px) {
  .mini-panel {
    width: 104px;
  }

  .brand-copy h1 {
    font-size: 13px;
  }

  .stand-list .stand-price {
    display: none;
  }
}

/* 横屏手机 / 超矮窗口：优先保证场景可视面积 */
@media (max-height: 540px) {
  .ui-shell {
    --ui-pad-x: 8px;
    --ui-pad-y: 8px;
    gap: 8px;
  }

  .brand-panel {
    width: 288px;
    max-width: 288px;
    padding: 5px 10px;
  }

  .brand-copy .track-latin,
  .brand-copy .eyebrow,
  .brand-panel .track-facts,
  .ticket-desc,
  .ticket-seat-line,
  .ticket-note {
    display: none;
  }

  .brand-copy h1 {
    font-size: 14px;
  }

  .mini-panel {
    width: 130px;
  }

  .mini-head,
  .mini-foot {
    display: none;
  }

  .mini-osm {
    font-size: 4.5px;
  }

  .ticket-panel {
    flex: 0 0 auto;
    width: 300px;
    padding: 9px;
  }

  .ticket-buy-row {
    margin-top: 8px;
  }

  .stand-panel {
    max-height: 64dvh;
  }
}

@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
  .glass-panel,
  .liquid,
  .scene-hint {
    background: rgba(11, 19, 26, 0.86);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Screenshot / kiosk mode */
body.hide-ui .ui-shell,
body.hide-ui .brand-panel,
body.hide-ui .top-controls,
body.hide-ui .mini-panel,
body.hide-ui .ticket-panel,
body.hide-ui .view-hud,
body.hide-ui .scene-hint,
body.hide-ui .toast,
body.hide-ui .site-credit,
body.hide-ui .pov-frame {
  display: none !important;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

@keyframes pinPulse {
  0% {
    transform: scale(1);
    opacity: 0.62;
  }
  70% {
    transform: scale(2.7);
    opacity: 0;
  }
  100% {
    transform: scale(2.7);
    opacity: 0;
  }
}

@keyframes loaderGlow {
  0% {
    transform: translate3d(-2%, 1%, 0) scale(1);
  }
  100% {
    transform: translate3d(2%, -1%, 0) scale(1.06);
  }
}


/* =========================================================
   F1 car camera UI
   ========================================================= */
body.car-mode .scene-hint,
body.car-mode .brand-panel,
body.car-mode .stand-panel,
body.car-mode .mini-panel,
body.car-mode .ticket-panel,
body.car-mode .view-hud,
body.car-mode .stands-toggle {
  display: none !important;
}

.car-btn {
  gap: 6px;
}

.car-btn .icon {
  width: 14px;
  height: 14px;
}

#carBar {
  display: none;
  position: relative;
  z-index: 4;
  max-width: 100%;
  padding: 9px 12px;
  border-radius: 16px;
  align-items: center;
  gap: 12px;
  color: var(--text);
}

body.car-mode #carBar {
  display: flex;
}

.car-bar-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  white-space: nowrap;
}

.car-bar-head span {
  font-size: 7px;
  letter-spacing: 0.14em;
  color: var(--faint);
}

.car-bar-head b {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--gold-soft);
  letter-spacing: 0.03em;
}

.car-cam-list {
  display: flex;
  gap: 4px;
}

.car-cam {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  border-radius: 9px;
  padding: 7px 9px;
  font-size: 9px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  cursor: pointer;
}

.car-cam:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.25);
}

.car-cam.active {
  color: #1c2024;
  background: var(--gold-soft);
  border-color: var(--gold-soft);
  font-weight: 700;
}

.car-exit-btn {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(15, 18, 20, 0.34);
  color: var(--muted);
  border-radius: 9px;
  padding: 7px 10px;
  font-size: 9px;
  cursor: pointer;
  white-space: nowrap;
}

.car-exit-btn:hover {
  color: var(--text);
}

#carHud {
  display: none;
  position: relative;
  z-index: 4;
  min-width: 218px;
  padding: 9px 15px 8px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(8, 12, 15, 0.72), rgba(15, 20, 24, 0.42));
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f4f1e8;
  text-align: center;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

body.car-mode #carHud {
  display: block;
}

.car-hud-team {
  font-size: 7px;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
}

.car-hud-speed {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  margin-top: 2px;
}

.car-hud-speed b {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--gold-soft);
  line-height: 1;
}

.car-hud-speed span {
  font-size: 7px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.5);
}

.car-hud-speed em {
  margin-left: 8px;
  font-style: normal;
  font-size: 11px;
  color: #f4f1e8;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  padding-left: 8px;
}

.car-hud-hint {
  margin-top: 3px;
  font-size: 7px;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 700px) {
  #carBar {
    bottom: 12px;
    padding: 8px;
    gap: 7px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .car-bar-head {
    display: none;
  }
  .car-cam {
    padding: 7px 7px;
    font-size: 8px;
  }
  .car-exit-btn {
    padding: 7px 8px;
    font-size: 8px;
  }
  #carHud {
    top: 62px;
    min-width: 190px;
  }
  .car-hud-speed b {
    font-size: 28px;
  }
}

/* =========================================================
   Launch gate — 进入页面不加载 3D，点击启动按钮后再构建场景
   ========================================================= */
.launch {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding:
    calc(22px + env(safe-area-inset-top))
    calc(20px + env(safe-area-inset-right))
    calc(18px + env(safe-area-inset-bottom))
    calc(20px + env(safe-area-inset-left));
  background: #060b11;
  color: var(--text);
  -webkit-user-select: none;
  user-select: none;
  transition: opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.9s;
}
.launch.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.launch-bg {
  position: absolute;
  inset: -12%;
  background:
    radial-gradient(50% 46% at 50% 40%, rgba(158, 23, 41, 0.3), transparent 72%),
    radial-gradient(40% 45% at 14% 82%, rgba(53, 104, 122, 0.18), transparent 70%),
    radial-gradient(36% 40% at 88% 16%, rgba(198, 167, 106, 0.12), transparent 72%),
    linear-gradient(135deg, #070d13, #0a1520 52%, #050a0f);
  animation: launchGlow 12s ease-in-out infinite alternate;
}

.launch-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(58% 58% at 50% 50%, #000 18%, transparent 82%);
  mask-image: radial-gradient(58% 58% at 50% 50%, #000 18%, transparent 82%);
  pointer-events: none;
}

.launch-circuit {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(980px, 118vmin);
  height: auto;
  transform: translate(-50%, -50%);
  opacity: 0.72;
  pointer-events: none;
  z-index: 0;
}
.launch-circuit-glow {
  fill: none;
  stroke: rgba(231, 200, 120, 0.2);
  stroke-width: 24;
  stroke-linecap: round;
  filter: blur(12px);
  opacity: 0;
  animation: launchGlowIn 1.8s 1.2s ease forwards;
}
.launch-circuit-line {
  fill: none;
  stroke: rgba(219, 198, 153, 0.4);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 6400;
  stroke-dashoffset: 6400;
  filter: drop-shadow(0 0 14px rgba(231, 200, 120, 0.3));
  animation: launchDraw 2.9s 0.3s cubic-bezier(0.55, 0, 0.25, 1) forwards;
}
.launch-start-dot {
  fill: #e7c878;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: launchDot 2.4s 2.6s ease-in-out infinite;
}

.launch-inner {
  position: relative;
  z-index: 2;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 580px;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.6s ease;
}

.launch-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  animation: launchIn 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0.12s forwards;
}
.launch-brand .sic-logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  margin-bottom: 18px;
}
.launch-brand .sic-logo .logo-mark {
  font-size: 30px;
  left: 13px;
  bottom: 9px;
}
.launch-brand .sic-logo .logo-cn {
  font-size: 15px;
  right: 9px;
  top: 4px;
}
.launch-brand .sic-logo .logo-speed {
  top: 16px;
  right: -16px;
  width: 54px;
  height: 4px;
}
.launch-kicker {
  font-family: var(--font-display);
  font-size: 8.5px;
  letter-spacing: 0.24em;
  color: var(--gold-soft);
  text-transform: uppercase;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}
.launch-brand h1 {
  margin: 10px 0 4px;
  font-size: clamp(28px, 4.6vw, 44px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fffdf6;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.launch-latin {
  margin: 0;
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 0.32em;
  color: rgba(242, 235, 220, 0.42);
  white-space: nowrap;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

.launch-facts {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 26px;
  opacity: 0;
  animation: launchIn 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s forwards;
}
.launch-facts div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}
.launch-facts b {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}
.launch-facts span {
  font-size: 7px;
  letter-spacing: 0.08em;
  color: rgba(244, 239, 227, 0.4);
}
.launch-facts i {
  width: 1px;
  height: 22px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.18), transparent);
}

.launch-start {
  --mx: 50%;
  --my: 50%;
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 316px;
  margin-top: 30px;
  padding: 12px 24px 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 210, 160, 0.36);
  background:
    radial-gradient(130% 180% at var(--mx) var(--my), rgba(255, 255, 255, 0.3), transparent 56%),
    linear-gradient(135deg, rgba(194, 34, 52, 0.92), rgba(108, 16, 28, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 22px 55px rgba(90, 8, 20, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.04);
  color: #fff7ec;
  cursor: pointer;
  overflow: hidden;
  opacity: 0;
  animation: launchIn 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0.45s forwards;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease, opacity 0.3s ease;
}
.launch-start::after {
  content: "";
  position: absolute;
  top: -60%;
  left: -30%;
  width: 34%;
  height: 220%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transform: rotate(18deg);
  animation: launchSweep 4.6s 1.2s ease-in-out infinite;
  pointer-events: none;
}
.launch-start:hover {
  transform: translateY(-2px) scale(1.012);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 26px 62px rgba(90, 8, 20, 0.5);
}
.launch-start:active {
  transform: scale(0.985);
}
.launch-start-ring {
  position: absolute;
  inset: -5px;
  border-radius: 22px;
  border: 1px solid rgba(255, 205, 160, 0.28);
  opacity: 0;
  pointer-events: none;
}
body.launching .launch-start-ring {
  animation: launchRing 1.7s ease-out infinite;
}
.launch-start-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.launch-start-icon .icon {
  width: 17px;
  height: 17px;
  margin-left: 2px;
  fill: currentColor;
  stroke: none;
}
.launch-start-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  text-align: left;
}
.launch-start-copy b {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.launch-start-copy small {
  font-size: 8px;
  letter-spacing: 0.04em;
  color: rgba(255, 238, 228, 0.62);
}
body.launching .launch-start {
  opacity: 0.52;
  transform: scale(0.988);
  pointer-events: none;
}
body.launching .launch-start::after {
  animation: none;
}

.launch-meter {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(340px, 78vw);
  margin-top: 18px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
body.launching .launch-meter {
  opacity: 1;
  transform: translateY(0);
}
.launch-meter-bar {
  flex: 1 1 auto;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}
.launch-meter-bar i {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, rgba(228, 189, 111, 0.25), #e7c878, #fff3d0);
  box-shadow: 0 0 14px rgba(231, 200, 120, 0.6);
  transition: width 0.45s cubic-bezier(0.3, 0.7, 0.2, 1);
}
.launch-meter-num {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--gold-soft);
  min-width: 32px;
  text-align: right;
}
.launch-status {
  margin: 12px 0 0;
  max-width: 430px;
  font-size: 8.5px;
  line-height: 1.7;
  letter-spacing: 0.05em;
  color: rgba(244, 239, 227, 0.4);
  opacity: 0;
  animation: launchIn 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0.6s forwards;
}
body.launching .launch-status {
  color: rgba(244, 239, 227, 0.62);
}
body.load-error .launch-status {
  color: #ff9fa6;
}

.launch-foot {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 6.5px;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.22);
  white-space: nowrap;
  opacity: 0;
  animation: launchIn 1s ease 0.9s forwards;
}
.launch-foot i {
  width: 1px;
  height: 8px;
  background: rgba(255, 255, 255, 0.16);
}

/* =========================================================
   平台兼容：Safari / Chrome / Edge / 华为 / 小米
   ========================================================= */
@supports not (padding: env(safe-area-inset-top)) {
  .ui-shell {
    padding: 14px;
  }
  .launch {
    padding: 22px 20px 18px;
  }
}

/* 不支持 color-mix 的 Safari < 16.2 / 旧版华为·小米浏览器 */
@supports not (color: color-mix(in srgb, #fff, #000)) {
  .stand-item.active {
    border-color: rgba(255, 255, 255, 0.28);
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.025));
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.18),
      inset 2px 0 0 var(--stand-accent),
      0 5px 14px rgba(0, 0, 0, 0.12);
  }
  .stand-badge {
    border-color: rgba(255, 255, 255, 0.2);
  }
  .ticket-letter {
    background: linear-gradient(150deg, var(--stand-accent, #e8c476), #7a1a22);
  }
  .modal-letter {
    background: linear-gradient(150deg, var(--stand-accent, #e8c476), #651419);
  }
}

/* 触屏设备不使用 hover 位移，避免点按后卡在悬停态 */
@media (hover: none) {
  .liquid:hover,
  .stand-item:hover,
  .launch-start:hover {
    transform: none;
  }
}

/* 低性能设备（华为/小米中低端、旧 iPad）：去掉实时模糊，缩短动画 */
body.perf-low .glass-panel,
body.perf-low .liquid,
body.perf-low .scene-hint,
body.perf-low #carHud,
body.perf-low .panel-scrim {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
body.perf-low .glass-panel {
  background: linear-gradient(165deg, rgba(21, 26, 30, 0.93), rgba(9, 13, 16, 0.95));
}
body.perf-low .liquid {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.035));
}
body.perf-low .glass-panel::before,
body.perf-low .scene-grain,
body.perf-low .launch-grid {
  display: none;
}
body.perf-low .launch-bg {
  animation: none;
}
body.perf-low .launch-start::after {
  animation: none;
}

@media (max-width: 720px) {
  .launch {
    padding-top: calc(30px + env(safe-area-inset-top));
  }
  .launch-circuit {
    width: 112vw;
    opacity: 0.72;
    top: 47%;
  }
  .launch-brand .sic-logo {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    margin-bottom: 14px;
  }
  .launch-brand .sic-logo .logo-mark {
    font-size: 25px;
    left: 11px;
    bottom: 8px;
  }
  .launch-brand h1 {
    font-size: clamp(25px, 7.6vw, 32px);
  }
  .launch-latin {
    font-size: 7.5px;
    letter-spacing: 0.2em;
  }
  .launch-facts {
    margin-top: 20px;
    gap: 12px;
  }
  .launch-facts b {
    font-size: 14px;
  }
  .launch-start {
    margin-top: 24px;
    min-width: 0;
    width: min(340px, 86vw);
    padding: 11px 16px 11px 12px;
    gap: 11px;
  }
  .launch-start-copy b {
    font-size: 14px;
  }
  .launch-start-copy small {
    font-size: 7.5px;
  }
  .launch-status {
    font-size: 8px;
    max-width: 82vw;
  }
  .launch-foot {
    font-size: 5.5px;
    letter-spacing: 0.12em;
    gap: 7px;
  }
}

@media (max-width: 720px) and (max-height: 700px) {
  .launch-facts {
    display: none;
  }
  .launch-brand .sic-logo {
    margin-bottom: 10px;
  }
  .launch-start {
    margin-top: 16px;
  }
  .launch-status {
    display: none;
  }
  .launch-brand h1 {
    margin: 6px 0 2px;
  }
}

@media (max-height: 540px) {
  .launch-facts {
    display: none;
  }
  .launch-brand .sic-logo {
    width: 44px;
    height: 44px;
    margin-bottom: 8px;
  }
  .launch-brand .sic-logo .logo-mark {
    font-size: 20px;
    left: 9px;
    bottom: 6px;
  }
  .launch-brand h1 {
    font-size: 24px;
    margin: 5px 0 2px;
  }
  .launch-latin {
    display: none;
  }
  .launch-start {
    margin-top: 14px;
    padding: 8px 16px 8px 10px;
  }
  .launch-start-icon {
    width: 34px;
    height: 34px;
  }
  .launch-meter {
    margin-top: 10px;
  }
  .launch-status {
    margin-top: 7px;
  }
  .launch-foot {
    display: none;
  }
  .launch-circuit {
    width: 120vmin;
    opacity: 0.42;
  }
}

@keyframes launchGlow {
  0% {
    transform: translate3d(-1.5%, 1%, 0) scale(1);
  }
  100% {
    transform: translate3d(1.5%, -1%, 0) scale(1.05);
  }
}
@keyframes launchDraw {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes launchGlowIn {
  to {
    opacity: 1;
  }
}
@keyframes launchDot {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.85);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}
@keyframes launchIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes launchSweep {
  0%,
  62% {
    left: -40%;
  }
  86%,
  100% {
    left: 120%;
  }
}
@keyframes launchRing {
  0% {
    opacity: 0.7;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.12);
  }
}


/* =========================================================
   信息来源 / 版权与免责（按钮 + 弹层）
   ========================================================= */
.credits-btn {
  width: 100%;
  height: 24px;
  margin-top: 6px;
  padding: 0 7px;
  display: flex;
  align-items: center;
  gap: 5px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(120% 160% at var(--mx) var(--my), rgba(255, 255, 255, 0.12), transparent 60%),
    rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 0.02em;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.credits-btn:hover {
  border-color: rgba(231, 200, 120, 0.36);
  color: rgba(255, 255, 255, 0.86);
}
.credits-btn .icon {
  width: 11px;
  height: 11px;
  color: var(--gold);
  opacity: 0.9;
}
.credits-btn-label {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
  white-space: nowrap;
}
.credits-btn-sub {
  margin-left: auto;
  font-family: var(--font-display);
  font-size: 5.5px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.32);
  white-space: nowrap;
}

.credits-backdrop {
  z-index: 90;
  padding:
    calc(18px + env(safe-area-inset-top))
    calc(18px + env(safe-area-inset-right))
    calc(18px + env(safe-area-inset-bottom))
    calc(18px + env(safe-area-inset-left));
}
.credits-card {
  width: min(760px, 100%);
  max-height: min(84vh, 860px);
  max-height: min(84dvh, 860px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 26px 26px 18px;
  border-radius: 24px;
  text-align: left;
}
.credits-card h3 {
  margin: 7px 0 4px;
  font-size: 22px;
}
.credits-lead {
  margin: 0;
  font-size: 11px;
  line-height: 1.65;
  color: rgba(231, 200, 120, 0.9);
}
.credits-body {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 16px;
}
.credits-body section {
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.075);
}
.credits-body section:first-child {
  padding-top: 0;
  border-top: 0;
}
.credits-body h4 {
  margin: 0 0 8px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--gold-soft);
}
.credits-body p {
  margin: 0;
  font-size: 12px;
  line-height: 1.85;
  color: var(--muted);
}
.credits-body p + p {
  margin-top: 6px;
}
.credits-body ul {
  margin: 0;
  padding-left: 15px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.credits-body li {
  font-size: 12px;
  line-height: 1.85;
  color: var(--muted);
}
.credits-body b {
  color: rgba(255, 255, 255, 0.86);
  font-weight: 600;
}
.credits-body a {
  color: var(--gold-soft);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.credits-body code,
.credits-foot code {
  font-family: var(--font-display);
  font-size: 0.95em;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.075);
  color: rgba(255, 255, 255, 0.82);
}
.credits-body .en {
  font-size: 10.5px;
  line-height: 1.7;
  color: rgba(238, 243, 250, 0.48);
}
.credits-foot {
  margin: 16px 0 0;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 7.5px;
  line-height: 1.6;
  color: var(--faint);
}
body.modal-open {
  overflow: hidden;
}

@media (max-width: 720px) {
  .credits-btn {
    height: 28px;
    margin-top: 5px;
    padding: 0 5px;
    font-size: 8.5px;
    justify-content: center;
  }
  .credits-btn .icon {
    width: 11px;
    height: 11px;
  }
  .credits-btn-sub {
    display: none;
  }
  .credits-backdrop {
    padding:
      calc(10px + env(safe-area-inset-top))
      10px
      calc(10px + env(safe-area-inset-bottom))
      10px;
  }
  .credits-card {
    width: 100%;
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    padding: 22px 16px 14px;
    border-radius: 20px;
  }
  .credits-card h3 {
    font-size: 19px;
    padding-right: 30px;
  }
  .credits-lead {
    font-size: 9.5px;
  }
  .credits-body {
    gap: 13px;
  }
  .credits-body h4 {
    font-size: 11.5px;
  }
  .credits-body p,
  .credits-body li {
    font-size: 11px;
    line-height: 1.8;
  }
  .credits-body .en {
    font-size: 9.5px;
  }
  .credits-body ul {
    padding-left: 13px;
  }
  .credits-foot {
    font-size: 7px;
  }
}


/* =========================================================
   打赏 / 微信赞赏码
   ========================================================= */
.donate-btn {
  width: 100%;
  height: 30px;
  margin-top: 9px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 9px;
  border: 1px solid rgba(231, 200, 120, 0.3);
  background:
    radial-gradient(120% 180% at var(--mx) var(--my), rgba(255, 236, 190, 0.22), transparent 58%),
    linear-gradient(135deg, rgba(190, 140, 52, 0.3), rgba(95, 58, 16, 0.24));
  color: #f6e7c6;
  font-size: 8.5px;
  letter-spacing: 0.03em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  text-align: left;
}
.donate-btn:hover {
  border-color: rgba(231, 200, 120, 0.55);
  color: #fff6df;
}
.donate-btn .icon {
  width: 12px;
  height: 12px;
  color: var(--gold-soft);
  fill: rgba(231, 200, 120, 0.16);
}
.donate-btn-sub {
  margin-left: auto;
  font-family: var(--font-display);
  font-size: 5.8px;
  letter-spacing: 0.14em;
  color: rgba(255, 246, 223, 0.4);
}

.donate-backdrop {
  z-index: 91;
  padding:
    calc(16px + env(safe-area-inset-top))
    calc(16px + env(safe-area-inset-right))
    calc(16px + env(safe-area-inset-bottom))
    calc(16px + env(safe-area-inset-left));
}
.donate-card {
  width: min(470px, 100%);
  max-height: min(88vh, 860px);
  max-height: min(88dvh, 860px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 26px 22px 16px;
  border-radius: 24px;
  text-align: center;
}
.donate-card h3 {
  margin: 6px 0 4px;
  font-size: 22px;
}
.donate-lead {
  margin: 10px 0 0;
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
  text-align: left;
}
.donate-lead b {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}
.donate-qr-wrap {
  width: min(292px, 100%);
  margin: 16px auto 0;
  padding: 10px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}
.donate-qr-wrap img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}
.donate-qr-wrap span {
  display: block;
  margin-top: 8px;
  font-size: 9.5px;
  letter-spacing: 0.04em;
  color: #6d4308;
}
.donate-note {
  margin: 14px 0 0;
  font-size: 9px;
  line-height: 1.75;
  color: var(--faint);
  text-align: left;
}
.donate-dismiss {
  width: 100%;
  height: 38px;
  margin-top: 14px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.82);
}

@media (max-width: 720px) {
  .donate-btn {
    height: 28px;
    margin-top: 7px;
    padding: 0 8px;
    font-size: 8px;
  }
  .donate-btn-sub {
    display: none;
  }
  .donate-backdrop {
    padding:
      calc(10px + env(safe-area-inset-top))
      10px
      calc(10px + env(safe-area-inset-bottom))
      10px;
  }
  .donate-card {
    width: 100%;
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    padding: 22px 16px 14px;
    border-radius: 20px;
  }
  .donate-card h3 {
    font-size: 19px;
    padding-right: 30px;
  }
  .donate-lead {
    font-size: 10px;
  }
  .donate-qr-wrap {
    width: min(250px, 72vw);
    margin-top: 13px;
    padding: 8px;
    border-radius: 14px;
  }
  .donate-qr-wrap span {
    font-size: 9px;
  }
  .donate-note {
    font-size: 8.4px;
  }
  .donate-dismiss {
    height: 36px;
    font-size: 10px;
  }
}

@media (max-height: 540px) {
  .donate-card {
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    padding: 18px 20px 12px;
  }
  .donate-qr-wrap {
    width: min(190px, 42vh);
    margin-top: 8px;
  }
  .donate-lead {
    font-size: 8.5px;
  }
  .donate-note {
    display: none;
  }
}
