:root {
  color-scheme: light;
  font-family: Nunito, "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #2b2540;
  background: #2b2540;
  --ink: #2b2540;
  --muted: #74697c;
  --red: #c83d4a;
  --red-dark: #922b37;
  --gold: #f3c453;
  --purple: #9c78c5;
  --blue: #315bb8;
  --paper: #fff8e8;
}
* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; margin: 0; }
body {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  overflow: hidden;
  background: #2b2540 url("./assets/circus-route-hero-v1.webp") center 48% / cover no-repeat;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 48% 8%, rgba(255,248,232,.18), transparent 33%),
    linear-gradient(90deg, rgba(43,37,64,.22), transparent 28% 72%, rgba(43,37,64,.3)),
    linear-gradient(180deg, rgba(43,37,64,.04), rgba(43,37,64,.2));
}
button { font: inherit; }
.route-shell {
  position: relative;
  z-index: 1;
  width: min(1200px, calc(100% - 36px));
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  gap: 18px;
  margin-inline: auto;
  padding: clamp(18px, 3.4vw, 40px) 0;
}
.route-brand {
  width: max-content;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 7px 14px 7px 9px;
  border: 1px solid rgba(255,248,232,.82);
  border-radius: 18px 7px 18px 18px;
  background: rgba(255,250,240,.9);
  box-shadow: 0 14px 34px rgba(43,37,64,.2), inset 0 1px #fff;
  backdrop-filter: blur(14px);
}
.route-brand img {
  width: 128px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 5px 8px rgba(92,49,71,.2));
}
.route-brand small {
  max-width: 112px;
  color: #6f526e;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}
.route-card {
  position: relative;
  width: min(760px, 100%);
  overflow: hidden;
  padding: clamp(25px, 4vw, 42px);
  border: 2px solid rgba(255,248,232,.94);
  border-radius: 28px 10px 28px 28px;
  background: linear-gradient(145deg, rgba(255,250,240,.96), rgba(255,244,226,.91));
  box-shadow: 0 9px 0 rgba(146,43,55,.74), 0 34px 90px rgba(43,37,64,.34), inset 0 1px #fff;
  backdrop-filter: blur(16px) saturate(1.05);
}
.route-card::after {
  content: "";
  position: absolute;
  inset: 9px;
  z-index: -1;
  border: 1px dashed rgba(200,61,74,.2);
  border-radius: 21px 7px 21px 21px;
  pointer-events: none;
}
.route-intro { position: relative; min-height: 170px; }
.route-intro-copy { position: relative; z-index: 2; min-width: 0; }
.route-character {
  position: absolute;
  z-index: 1;
  top: -20px;
  right: -8px;
  display: block;
  width: clamp(190px, 30vw, 265px);
  height: auto;
  object-fit: contain;
  opacity: .16;
  filter: saturate(.85);
  pointer-events: none;
}
.stage-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 11px;
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}
.stage-label::before {
  content: "";
  width: 28px;
  height: 3px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--red), var(--gold));
}
h1 {
  max-width: 650px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(38px, 4.4vw, 54px);
  line-height: .98;
  letter-spacing: -1.9px;
}
h1 .headline-line { display: block; max-width: 100%; }
h1 em { color: var(--red); font-style: normal; }
.route-copy {
  max-width: 610px;
  margin: 17px 0 0;
  color: #5e5268;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.62;
}
.route-stage {
  position: relative;
  height: 168px;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid rgba(111,75,115,.2);
  border-radius: 18px 7px 18px 18px;
  background:
    radial-gradient(circle at 50% 0, rgba(255,244,185,.58), transparent 46%),
    linear-gradient(180deg, #5b3f70 0 58%, #32253e 59% 100%);
  box-shadow: inset 0 1px rgba(255,255,255,.35), inset 0 -24px 34px rgba(25,16,31,.22);
}
.route-stage::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 28px;
  background: repeating-linear-gradient(90deg, #b92f3e 0 34px, #f3c453 34px 38px, #6c3d75 38px 72px, #f3c453 72px 76px);
  box-shadow: inset 0 7px 10px rgba(43,37,64,.3), 0 -2px rgba(255,248,232,.4);
}
.stage-spotlight {
  position: absolute;
  top: -52px;
  width: 145px;
  height: 230px;
  opacity: .42;
  background: linear-gradient(180deg, rgba(255,245,190,.82), rgba(255,245,190,0));
  clip-path: polygon(43% 0, 57% 0, 100% 100%, 0 100%);
  transform-origin: 50% 0;
}
.stage-spotlight-left { left: 16%; transform: rotate(15deg); }
.stage-spotlight-right { right: 16%; transform: rotate(-15deg); }
.is-live .stage-spotlight-left { animation: spotlight-left 3.2s ease-in-out infinite alternate; }
.is-live .stage-spotlight-right { animation: spotlight-right 3.2s ease-in-out infinite alternate; }
.stage-curtain {
  position: absolute;
  z-index: 4;
  top: -26px;
  width: 38%;
  height: 76px;
  background: repeating-linear-gradient(90deg, #831f31 0 19px, #b92f3e 19px 39px, #6f1728 39px 52px);
  box-shadow: 0 8px 14px rgba(43,18,32,.3);
}
.stage-curtain::after {
  content: "";
  position: absolute;
  right: 10%;
  bottom: -13px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 4px 0 #b77a21;
}
.stage-curtain-left { left: -5%; transform: skewY(-7deg); border-radius: 0 0 65% 0; }
.stage-curtain-right { right: -5%; transform: scaleX(-1) skewY(-7deg); border-radius: 0 0 65% 0; }
.stage-tent {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 27px;
  width: 188px;
  height: 102px;
  transform: translateX(-50%);
  overflow: hidden;
  border: 4px solid #f0c258;
  border-radius: 50% 50% 12px 12px / 58% 58% 12px 12px;
  background: repeating-linear-gradient(90deg, #c83d4a 0 29px, #fff0c7 29px 58px);
  box-shadow: 0 10px 22px rgba(27,17,34,.34), inset 0 1px #fff;
}
.stage-tent::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -3px;
  width: 48px;
  height: 58px;
  transform: translateX(-50%);
  border-radius: 50% 50% 0 0;
  background: #33243f;
  box-shadow: inset 13px 0 #8d3550, inset -13px 0 #6e2741;
}
.stage-tent::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -28px;
  width: 3px;
  height: 30px;
  transform: translateX(-50%);
  background: #f3c453;
}
.stage-tent i {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 12px;
  width: 18px;
  height: 18px;
  transform: translateX(-50%) rotate(45deg);
  background: var(--gold);
  box-shadow: 0 0 18px rgba(243,196,83,.75);
}
.stage-tent b {
  position: absolute;
  left: calc(50% + 2px);
  top: 0;
  width: 42px;
  height: 24px;
  transform: translateY(-22px);
  clip-path: polygon(0 0,100% 27%,0 100%);
  background: var(--red);
}
.stage-orbit {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 30px;
  width: 170px;
  height: 74px;
  transform: translateX(-50%);
}
.stage-orbit i {
  position: absolute;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  box-shadow: 0 3px 0 rgba(43,37,64,.25), 0 0 12px rgba(255,255,255,.22);
}
.stage-orbit i:nth-child(1) { left: 4%; bottom: 2px; background: var(--red); }
.stage-orbit i:nth-child(2) { left: calc(50% - 8px); top: 0; background: var(--gold); }
.stage-orbit i:nth-child(3) { right: 4%; bottom: 2px; background: #6f8be3; }
.is-live .stage-orbit i:nth-child(1) { animation: circus-ball-left 1.45s cubic-bezier(.45,0,.55,1) infinite; }
.is-live .stage-orbit i:nth-child(2) { animation: circus-ball-center 1.45s cubic-bezier(.45,0,.55,1) -.48s infinite; }
.is-live .stage-orbit i:nth-child(3) { animation: circus-ball-right 1.45s cubic-bezier(.45,0,.55,1) -.96s infinite; }
.stage-marquee {
  position: absolute;
  z-index: 7;
  inset: auto 14px 8px;
  display: flex;
  justify-content: space-between;
}
.stage-marquee i,
.progress i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ffe8a0;
  box-shadow: 0 0 10px #ffd866, 0 0 3px #fff;
}
.is-live .stage-marquee i { animation: bulb 1.15s ease-in-out infinite alternate; }
.stage-marquee i:nth-child(2n) { animation-delay: -.57s; }
.route-state {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0,1fr);
  align-items: center;
  margin-top: 18px;
  padding: 13px 14px;
  border: 1px solid #e5d3c1;
  border-radius: 13px;
  background: rgba(255,250,240,.92);
}
.status { color: #59475d; font-size: 12px; font-weight: 900; }
.progress { min-height: 20px; display: flex; align-items: flex-end; gap: 7px; margin-top: 8px; }
.progress i { width: 13px; height: 13px; opacity: .38; animation: route-progress 1.18s ease-in-out infinite; }
.progress i:nth-child(2) { animation-delay: .1s; background: var(--red); }
.progress i:nth-child(3) { animation-delay: .2s; background: var(--gold); }
.progress i:nth-child(4) { animation-delay: .3s; background: var(--purple); }
.progress i:nth-child(5) { animation-delay: .4s; background: var(--blue); }
.progress i:nth-child(6) { animation-delay: .5s; background: var(--red); }
.error {
  display: none;
  margin-top: 11px;
  padding: 11px 12px;
  border: 1px solid #e6aeb4;
  border-radius: 12px;
  background: #fff0ef;
  color: #a53243;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
}
.route-card.failed .error { display: block; }
.route-card.failed .progress { display: none; }
.route-card.failed .route-stage * { animation-play-state: paused; }
.route-retry {
  min-height: 40px;
  margin-top: 12px;
  padding: 0 17px;
  border: 1px solid var(--red);
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 4px 0 var(--red-dark);
}
.route-retry:hover { transform: translateY(-1px); box-shadow: 0 6px 0 var(--red-dark); }
.route-meta { display: flex; justify-content: space-between; gap: 20px; color: rgba(255,248,232,.92); font-size: 10px; font-weight: 900; letter-spacing: .8px; text-shadow: 0 2px 9px rgba(43,37,64,.5); }
@keyframes spotlight-left { to { transform: rotate(-13deg); opacity: .62; } }
@keyframes spotlight-right { to { transform: rotate(13deg); opacity: .62; } }
@keyframes circus-ball-left { 0%,100% { transform: translate(0,0); } 50% { transform: translate(67px,-57px); } }
@keyframes circus-ball-center { 0%,100% { transform: translate(0,0); } 50% { transform: translate(65px,56px); } }
@keyframes circus-ball-right { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-67px,-57px); } }
@keyframes bulb { to { opacity: .38; transform: scale(.78); } }
@keyframes route-progress { 0%,100% { opacity: .3; transform: translateY(0) scale(.86); } 45% { opacity: 1; transform: translateY(-5px) scale(1.08); } }
@media (max-width: 720px) {
  body { overflow: auto; background-position: 58% center; }
  .route-shell { width: min(100% - 22px, 620px); padding: 14px 0 18px; gap: 13px; }
  .route-brand { padding: 5px 10px 5px 7px; }
  .route-brand img { width: 104px; height: 48px; }
  .route-card { padding: 25px 19px 22px; border-radius: 23px 8px 23px 23px; }
  .route-intro { min-height: 0; }
  .route-character { top: -2px; right: -18px; width: 150px; opacity: .11; }
  h1 { max-width: 100%; font-size: clamp(32px, 10vw, 45px); letter-spacing: -1.4px; }
  .route-copy { max-width: 100%; font-size: 12px; }
  .route-stage { height: 142px; }
  .stage-tent { width: 154px; height: 88px; }
  .stage-orbit { top: 23px; width: 146px; }
  .route-meta { padding-inline: 4px; }
}
@media (max-height: 760px) and (min-width: 721px) {
  .route-shell { gap: 10px; padding-block: 12px; }
  .route-brand img { width: 108px; height: 48px; }
  .route-card { padding: 24px 32px; }
  .route-intro { min-height: 144px; }
  .route-stage { height: 132px; margin-top: 12px; }
  .stage-tent { height: 84px; }
  .route-state { margin-top: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}