:root {
  --bg: #070a09;
  --fg: #f4f6f5;
  --muted: rgba(244, 246, 245, 0.66);
  --subtle: rgba(244, 246, 245, 0.12);
  --accent: #e43b52;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
}

body {
  color: var(--fg);
  overscroll-behavior: none;
  touch-action: none;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

.experience,
.stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
}

.experience {
  opacity: 0;
  visibility: hidden;
  transition: opacity 700ms var(--ease), visibility 700ms;
}

.experience.is-ready {
  opacity: 1;
  visibility: visible;
}

.media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  user-select: none;
  pointer-events: none;
  transition: opacity 180ms linear;
}

.media--poster {
  z-index: 1;
  opacity: 1;
}

.media--poster.is-hidden {
  opacity: 0;
}

.media--video {
  z-index: 2;
  opacity: 0;
}

.media--video.is-visible {
  opacity: 1;
}

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

.vignette {
  z-index: 3;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.42), transparent 29%, transparent 61%, rgba(0, 0, 0, 0.72)),
    radial-gradient(ellipse at center, transparent 42%, rgba(0, 0, 0, 0.52) 100%);
}

.grain {
  z-index: 4;
  opacity: 0.09;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.blackout {
  z-index: 15;
  opacity: 0;
  background: #000;
  transition: opacity 420ms ease;
}

.topbar {
  position: absolute;
  z-index: 20;
  top: max(24px, env(safe-area-inset-top));
  left: clamp(24px, 5vw, 80px);
  right: clamp(24px, 5vw, 80px);
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto minmax(210px, 1fr);
  align-items: center;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: 100%;
  color: var(--fg);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.brand__mark {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 20px rgba(228, 59, 82, 0.74);
}

.brand__edition {
  color: rgba(244, 246, 245, 0.48);
  font-size: 9px;
  font-weight: 620;
  letter-spacing: 0.1em;
}

.chapter-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(244, 246, 245, 0.13);
  border-radius: 999px;
  background: rgba(7, 10, 9, 0.24);
  backdrop-filter: blur(16px);
}

.chapter-nav button {
  min-width: 54px;
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(244, 246, 245, 0.58);
  cursor: pointer;
  font-size: 10px;
  font-weight: 690;
  letter-spacing: 0.12em;
  transition: color 220ms ease, background-color 220ms ease, opacity 220ms ease;
}

.chapter-nav button:hover,
.chapter-nav button[aria-current="page"] {
  color: var(--fg);
  background: rgba(244, 246, 245, 0.1);
}

.chapter-nav button:disabled {
  cursor: default;
  opacity: 0.36;
}

.topbar__cta {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(244, 246, 245, 0.28);
  border-radius: 999px;
  background: rgba(7, 10, 9, 0.24);
  backdrop-filter: blur(16px);
  font-size: 10px;
  font-weight: 720;
  letter-spacing: 0.1em;
  transition: border-color 220ms ease, background-color 220ms ease;
}

.topbar__cta:hover {
  border-color: var(--accent);
  background: rgba(228, 59, 82, 0.1);
}

.chapter-count {
  position: absolute;
  z-index: 20;
  top: max(94px, calc(env(safe-area-inset-top) + 72px));
  right: clamp(24px, 5vw, 80px);
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.12em;
}

#chapterNow {
  font-size: 17px;
  font-weight: 680;
}

.chapter-count__total {
  color: rgba(244, 246, 245, 0.46);
  font-size: 11px;
}

.caption {
  position: absolute;
  z-index: 20;
  left: clamp(24px, 5vw, 80px);
  bottom: clamp(120px, 15vh, 170px);
  width: min(610px, calc(100vw - 120px));
  opacity: 0;
  transform: translateY(24px);
  text-shadow: 0 2px 26px rgba(0, 0, 0, 0.5);
  transition: opacity 620ms var(--ease), transform 720ms var(--ease);
}

.caption.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.caption__eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: clamp(10px, 0.9vw, 13px);
  font-weight: 740;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.caption__title {
  max-width: 560px;
  margin: 0;
  font-size: clamp(50px, 7.2vw, 116px);
  font-weight: 780;
  line-height: 0.9;
  letter-spacing: -0.055em;
}

.caption__copy {
  max-width: 480px;
  margin: 20px 0 0;
  color: rgba(244, 246, 245, 0.76);
  font-size: clamp(13px, 1.14vw, 17px);
  line-height: 1.72;
  letter-spacing: 0.045em;
}

.progress-rail {
  position: absolute;
  z-index: 20;
  top: 50%;
  right: clamp(24px, 5vw, 80px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transform: translateY(-50%);
}

.progress-rail button {
  position: relative;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.progress-rail button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(244, 246, 245, 0.3);
  transform: translate(-50%, -50%);
  transition: transform 300ms var(--ease), background-color 300ms ease, box-shadow 300ms ease;
}

.progress-rail button[aria-current="step"]::before {
  background: var(--accent);
  transform: translate(-50%, -50%) scale(1.75);
  box-shadow: 0 0 16px rgba(228, 59, 82, 0.82);
}

.progress-rail button:disabled {
  cursor: default;
  opacity: 0.4;
}

.chapter-loader {
  position: absolute;
  z-index: 30;
  left: 50%;
  bottom: max(46px, calc(env(safe-area-inset-bottom) + 30px));
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 20px;
  width: min(360px, calc(100vw - 48px));
  padding: 16px 18px;
  border: 1px solid rgba(244, 246, 245, 0.14);
  border-radius: 14px;
  background: rgba(7, 10, 9, 0.82);
  backdrop-filter: blur(20px);
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 10px;
  font-weight: 680;
  letter-spacing: 0.12em;
}

.chapter-loader__track {
  grid-column: 1 / -1;
  position: relative;
  height: 2px;
  overflow: hidden;
  background: rgba(244, 246, 245, 0.12);
}

#chapterLoaderBar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 140ms linear;
}

.final-actions {
  position: absolute;
  z-index: 22;
  left: clamp(24px, 5vw, 80px);
  bottom: max(66px, calc(env(safe-area-inset-bottom) + 48px));
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 720;
  letter-spacing: 0.1em;
  transition: transform 200ms ease, border-color 200ms ease, background-color 200ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button--primary {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.button--secondary {
  border-color: rgba(244, 246, 245, 0.28);
  background: rgba(7, 10, 9, 0.36);
  color: var(--fg);
  backdrop-filter: blur(12px);
}

.input-hint {
  position: absolute;
  z-index: 20;
  right: clamp(24px, 5vw, 80px);
  bottom: max(64px, calc(env(safe-area-inset-bottom) + 48px));
  display: flex;
  align-items: center;
  gap: 11px;
  color: rgba(244, 246, 245, 0.58);
  font-size: 10px;
  font-weight: 680;
  letter-spacing: 0.16em;
  transition: opacity 260ms ease;
}

.input-hint.is-busy {
  opacity: 0.28;
}

.input-hint__key {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  border: 1px solid rgba(244, 246, 245, 0.26);
  border-radius: 999px;
  color: var(--fg);
  font-size: 12px;
  letter-spacing: 0;
}

.input-hint__mobile {
  display: none;
}

.disclaimer {
  position: absolute;
  z-index: 20;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  width: min(760px, calc(100vw - 48px));
  color: rgba(244, 246, 245, 0.42);
  font-size: 9px;
  line-height: 1.5;
  letter-spacing: 0.06em;
  text-align: center;
  transform: translateX(-50%);
}

.loading {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 38%, rgba(103, 16, 40, 0.2), transparent 38%),
    var(--bg);
  transition: opacity 780ms var(--ease), visibility 780ms;
}

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

.loading__inner {
  width: min(720px, calc(100vw - 48px));
  text-align: center;
}

.loading__kicker {
  margin: 0;
  color: var(--accent);
  font-size: 11px;
  font-weight: 740;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.loading__name {
  position: relative;
  width: max-content;
  max-width: 100%;
  margin: 20px auto 0;
  color: rgba(244, 246, 245, 0.12);
  font-size: clamp(52px, 10vw, 134px);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.07em;
  white-space: nowrap;
}

.loading__name-fill {
  position: absolute;
  inset: 0;
  overflow: hidden;
  width: 0%;
  color: var(--fg);
  white-space: nowrap;
  transition: width 150ms linear;
}

.loading__meta {
  display: flex;
  justify-content: space-between;
  margin-top: 34px;
  color: rgba(244, 246, 245, 0.58);
  font-size: 10px;
  font-weight: 680;
  letter-spacing: 0.16em;
}

.loading__track {
  position: relative;
  display: block;
  height: 2px;
  margin-top: 14px;
  overflow: hidden;
  background: rgba(244, 246, 245, 0.14);
}

#loadingBar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  background: var(--accent);
  box-shadow: 0 0 16px rgba(228, 59, 82, 0.7);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 150ms linear;
}

.loading__enter {
  margin-top: 34px;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 420ms ease, transform 420ms ease, border-color 200ms ease;
}

.loading__enter.is-ready {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.loading__error {
  min-height: 20px;
  margin: 18px 0 0;
  color: #ff8b9a;
  font-size: 12px;
}

.toast {
  position: fixed;
  z-index: 120;
  left: 50%;
  bottom: max(34px, calc(env(safe-area-inset-bottom) + 20px));
  padding: 12px 16px;
  border: 1px solid rgba(244, 246, 245, 0.18);
  border-radius: 999px;
  background: rgba(7, 10, 9, 0.88);
  color: var(--fg);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
  font-size: 11px;
}

.noscript {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 32px;
  background: var(--bg);
  color: var(--fg);
  text-align: center;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .chapter-nav {
    position: absolute;
    top: 58px;
    left: 0;
    justify-content: flex-start;
  }

  .chapter-count {
    top: max(126px, calc(env(safe-area-inset-top) + 104px));
  }

  .caption {
    bottom: 138px;
  }
}

@media (max-width: 720px) {
  .topbar {
    top: max(18px, env(safe-area-inset-top));
    left: 20px;
    right: 20px;
    gap: 12px;
  }

  .brand {
    font-size: 10px;
  }

  .brand__edition {
    display: none;
  }

  .topbar__cta {
    min-height: 38px;
    padding: 0 13px;
    font-size: 9px;
  }

  .chapter-nav {
    top: 54px;
    width: calc(100vw - 40px);
    overflow-x: auto;
    justify-content: space-between;
    scrollbar-width: none;
  }

  .chapter-nav::-webkit-scrollbar {
    display: none;
  }

  .chapter-nav button {
    min-width: 48px;
    min-height: 36px;
    padding: 0 10px;
  }

  .chapter-count {
    top: max(116px, calc(env(safe-area-inset-top) + 98px));
    right: 22px;
  }

  .caption {
    left: 24px;
    bottom: max(126px, calc(env(safe-area-inset-bottom) + 108px));
    width: calc(100vw - 54px);
  }

  .caption__eyebrow {
    margin-bottom: 9px;
    font-size: 10px;
  }

  .caption__title {
    max-width: calc(100vw - 54px);
    font-size: clamp(43px, 15vw, 68px);
  }

  .caption__copy {
    max-width: calc(100vw - 54px);
    margin-top: 14px;
    font-size: 13px;
    line-height: 1.62;
  }

  .progress-rail {
    top: auto;
    right: 20px;
    bottom: max(136px, calc(env(safe-area-inset-bottom) + 118px));
    flex-direction: row;
    gap: 2px;
    transform: none;
  }

  .progress-rail button {
    width: 24px;
    height: 28px;
  }

  .input-hint {
    right: auto;
    left: 24px;
    bottom: max(64px, calc(env(safe-area-inset-bottom) + 48px));
  }

  .input-hint__desktop {
    display: none;
  }

  .input-hint__mobile {
    display: inline;
  }

  .final-actions {
    left: 24px;
    right: 24px;
    bottom: max(64px, calc(env(safe-area-inset-bottom) + 48px));
    gap: 8px;
  }

  .final-actions .button {
    min-height: 42px;
    padding: 0 15px;
    font-size: 10px;
  }

  .disclaimer {
    bottom: max(8px, env(safe-area-inset-bottom));
    width: calc(100vw - 32px);
    font-size: 8px;
  }

  .loading__name {
    font-size: clamp(46px, 18vw, 88px);
  }

  .media {
    object-position: 52% center;
  }
}

@media (max-height: 720px) and (min-width: 721px) {
  .caption {
    bottom: 104px;
  }

  .caption__title {
    font-size: clamp(46px, 6.2vw, 92px);
  }

  .caption__copy {
    margin-top: 14px;
    line-height: 1.55;
  }
}

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

  .grain {
    display: none;
  }
}
