:root {
  --red: #ef1734;
  --header-red: #f12536;
  --white: #ffffff;
  --soft-white: rgba(255, 255, 255, 0.82);
  --header-height: 50px;
}

* {
  box-sizing: border-box;
}

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

html {
  background: var(--red);
}

body {
  margin: 0;
  overflow: hidden;
  color: var(--white);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--red);
}

button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}

button,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  display: grid;
  grid-template-columns: 25% 50% 25%;
  align-items: center;
  background: var(--header-red);
  box-shadow: none;
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 460ms ease, transform 650ms cubic-bezier(.16, 1, .3, 1);
}

.site-header::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.16);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 900ms cubic-bezier(.16, 1, .3, 1) 180ms;
}

body.is-loaded .site-header {
  opacity: 1;
  transform: translateY(0);
}

body.is-loaded .site-header::after {
  transform: scaleX(1);
}

.header-column {
  height: 100%;
  display: flex;
  align-items: center;
}

.header-column-left {
  justify-content: flex-start;
  padding-left: 20px;
}

.header-column-right {
  justify-content: center;
  padding-right: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  text-decoration: none;
  opacity: 0;
  transform: scale(0.82) rotate(-7deg);
  transition: transform 220ms cubic-bezier(.2, .8, .2, 1), opacity 300ms ease;
}

body.is-loaded .brand {
  opacity: 1;
  transform: scale(1) rotate(0);
  transition-delay: 120ms;
}

.brand:hover {
  transform: rotate(-5deg) scale(1.08);
}

.brand:active {
  transform: rotate(2deg) scale(0.96);
}

.brand img {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.main-nav {
  height: 100%;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.refresh-button {
  position: relative;
  height: 50px;
  border: 0;
  padding: 0 26px;
  overflow: hidden;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}

.refresh-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 230ms ease;
}

.refresh-button::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -70%;
  width: 44%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transform: skewX(-22deg);
  transition: left 520ms ease;
  pointer-events: none;
}

.refresh-button:hover::before,
.refresh-button:focus-visible::before {
  transform: scaleX(1);
}

.refresh-button:hover::after {
  left: 128%;
}

.refresh-button span {
  position: relative;
  z-index: 1;
  display: inline-block;
  transition: transform 190ms cubic-bezier(.2, .8, .2, 1), letter-spacing 190ms ease;
}

.refresh-button:hover span {
  transform: translateY(-1px);
  letter-spacing: 0.018em;
}

.refresh-button:active span {
  transform: translateY(1px) scale(0.96);
}

.refresh-button.is-refreshing span {
  animation: refreshText 620ms cubic-bezier(.16, 1, .3, 1);
}

.refresh-button.is-refreshing::before {
  animation: refreshLine 620ms ease;
}

.refresh-button:focus-visible,
.carousel-card:focus-visible,
.carousel-arrow:focus-visible,
.mobile-tab:focus-visible,
.previous-select-shell:focus-within,
.social-links a:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.78);
  outline-offset: 3px;
}

.social-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 27px;
  transform: translateX(22px);
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--white);
  opacity: 0;
  transform: translateY(-8px) scale(0.82);
  transition: transform 190ms cubic-bezier(.2, .8, .2, 1), opacity 160ms ease;
}

body.is-loaded .social-links a {
  opacity: 1;
  transform: translateY(0) scale(1);
}

body.is-loaded .social-links a:nth-child(1) { transition-delay: 150ms; }
body.is-loaded .social-links a:nth-child(2) { transition-delay: 210ms; }
body.is-loaded .social-links a:nth-child(3) { transition-delay: 270ms; }

.social-links a:hover,
.social-links a:focus-visible {
  transform: translateY(-3px) scale(1.12) rotate(-3deg);
  opacity: 0.9;
  transition-delay: 0ms !important;
}

.social-links a:active {
  transform: translateY(1px) scale(0.94);
}

.social-links svg {
  width: 20px;
  height: 20px;
  overflow: visible;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 2.2;
}

.social-links .tiktok-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
  stroke: none;
}

.social-links svg rect,
.social-links svg circle:not(.icon-fill) {
  fill: none;
}

.social-links .icon-fill {
  fill: currentColor;
  stroke: none;
}

.social-links .play {
  fill: var(--header-red);
  stroke: none;
}

.hero {
  position: fixed;
  top: var(--header-height);
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
  background-image: url("assets/background.png");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 100% auto;
  background-color: var(--red);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -12%;
  background:
    radial-gradient(circle at 50% 43%, rgba(255, 255, 255, 0.13), transparent 25%),
    radial-gradient(circle at 20% 70%, rgba(255, 255, 255, 0.05), transparent 24%),
    radial-gradient(circle at 80% 24%, rgba(255, 255, 255, 0.05), transparent 22%);
  opacity: 0;
  transform: scale(0.96);
  pointer-events: none;
  transition: opacity 900ms ease, transform 1400ms cubic-bezier(.16, 1, .3, 1);
  animation: ambientGlow 8s ease-in-out infinite alternate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.19), transparent 0%, transparent 100%);
  opacity: 0;
  pointer-events: none;
}

body.is-loaded .hero::before {
  opacity: 1;
  transform: scale(1);
}

body.is-refresh-flash .hero::after {
  animation: heroRefreshFlash 820ms cubic-bezier(.16, 1, .3, 1);
}

body.is-navigation-pulse .hero::before {
  animation: ambientGlow 8s ease-in-out infinite alternate, navigationGlow 620ms ease;
}

.content-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 24px 20px;
}

.counter-stage {
  width: min(100%, 1040px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 23px;
}

.counter {
  position: relative;
  width: min(39vw, 385px);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 18px 28px rgba(145, 0, 28, 0.15));
  opacity: 0;
  transform: translateY(22px) scale(0.9) rotate(-1.8deg);
  transition: opacity 540ms ease 90ms, transform 820ms cubic-bezier(.16, 1, .3, 1) 90ms;
  isolation: isolate;
}

.counter::before,
.counter::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  width: 77%;
  height: 77%;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  pointer-events: none;
}

body.is-loaded .counter {
  opacity: 1;
  transform: translateY(0) scale(1) rotate(0);
}

body.is-loaded .counter::before {
  animation: haloPulse 3.4s ease-in-out 1.05s infinite;
}

body.is-loaded .counter::after {
  animation: haloPulse 3.4s ease-in-out 2.1s infinite;
}

.counter.is-turning-right {
  animation: counterTurnRight 520ms cubic-bezier(.22, .61, .36, 1);
}

.counter.is-turning-left {
  animation: counterTurnLeft 520ms cubic-bezier(.22, .61, .36, 1);
}

.counter.is-refreshed {
  animation: counterRefresh 700ms cubic-bezier(.16, 1, .3, 1);
}

.counter.is-count-complete::before {
  animation: completionRing 760ms cubic-bezier(.16, 1, .3, 1);
}

.counter.is-count-complete::after {
  animation: completionRing 760ms cubic-bezier(.16, 1, .3, 1) 90ms;
}

.counter-bubble {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  transition: transform 340ms cubic-bezier(.2, .8, .2, 1), filter 340ms ease;
  animation: bubbleFloat 5.2s ease-in-out 1.2s infinite;
}

.counter:hover .counter-bubble {
  transform: scale(1.022) rotate(-0.55deg);
  filter: drop-shadow(0 10px 16px rgba(145, 0, 28, 0.08));
  animation-play-state: paused;
}

.counter-content {
  position: relative;
  z-index: 1;
  width: 75%;
  height: 64%;
  margin-top: -7%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--red);
  text-align: center;
  text-transform: uppercase;
}

.counter-word,
.counter-suffix {
  font-weight: 900;
  line-height: 1;
  transition: transform 250ms ease, letter-spacing 250ms ease;
}

.counter:hover .counter-word {
  transform: translateY(-2px);
  letter-spacing: 0.06em;
}

.counter:hover .counter-suffix {
  transform: translateY(2px);
  letter-spacing: 0.15em;
}

.counter-word {
  margin-bottom: 10px;
  font-size: clamp(23px, 2.5vw, 34px);
  letter-spacing: 0.035em;
}

.counter-number {
  max-width: 100%;
  margin: 0 0 8px;
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  font-size: clamp(78px, 10.2vw, 138px);
  font-weight: 900;
  line-height: 0.88;
  letter-spacing: -0.08em;
  transform: translateX(-0.04em);
  transform-origin: center;
  will-change: transform, filter;
}

.counter-number.is-counting {
  animation: countingPulse 460ms ease-in-out infinite alternate;
}

.counter-number.is-digit-tick {
  filter: none;
}

.counter-number.is-counting-finish {
  animation: countFinish 720ms cubic-bezier(.22, .61, .36, 1);
}

.counter-suffix {
  font-size: clamp(21px, 2.2vw, 30px);
  letter-spacing: 0.13em;
}

.episode-navigation {
  width: min(100%, 900px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  transition: opacity 560ms ease 240ms, transform 760ms cubic-bezier(.16, 1, .3, 1) 240ms;
}

body.is-loaded .episode-navigation {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Desktop 3D timeline carousel. It deliberately does not wrap.
   Order: TOTAL -> newest episode -> older episodes. */
.desktop-episode-interface {
  width: min(100%, 860px);
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 10px;
}

.carousel-viewport {
  position: relative;
  height: 104px;
  overflow: hidden;
  perspective: 960px;
  perspective-origin: 50% 47%;
  mask-image: linear-gradient(90deg, transparent 0, black 9%, black 91%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, black 9%, black 91%, transparent 100%);
}

.carousel-viewport::before {
  content: "";
  position: absolute;
  z-index: 12;
  top: 50%;
  left: 50%;
  width: 176px;
  height: 78px;
  border-radius: 22px;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.13), transparent 70%);
  transform: translate(-50%, -50%);
  opacity: 0.7;
  pointer-events: none;
  animation: centreGlow 2.8s ease-in-out infinite alternate;
}

.carousel-viewport::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: 50%;
  bottom: 6px;
  width: 74%;
  height: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-top: 0;
  border-radius: 0 0 50% 50%;
  transform: translateX(-50%) perspective(240px) rotateX(65deg);
  opacity: 0.8;
  pointer-events: none;
}

.carousel-wheel {
  --drag-x: 0px;
  --drag-tilt: 0deg;
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: translateX(var(--drag-x)) rotateZ(var(--drag-tilt));
  transition: transform 360ms cubic-bezier(.22, .61, .36, 1);
  touch-action: pan-y;
  cursor: grab;
}

.carousel-wheel.is-dragging {
  transition: none;
  cursor: grabbing;
}

.carousel-wheel::after {
  content: "";
  position: absolute;
  z-index: 30;
  top: 7px;
  bottom: 7px;
  left: -32%;
  width: 28%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.09), transparent);
  transform: skewX(-18deg);
  opacity: 0;
  pointer-events: none;
}

.carousel-wheel.is-spinning-right::after,
.carousel-wheel.is-spinning-left::after {
  animation: none;
}

.carousel-card {
  --offset: 0;
  --abs-offset: 0;
  --card-delay: 0ms;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 158px;
  min-height: 70px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.19);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.13);
  color: rgba(255, 255, 255, 0.84);
  box-shadow: 0 14px 34px rgba(120, 0, 24, 0.14);
  backdrop-filter: blur(12px);
  cursor: pointer;
  text-align: center;
  transform-style: preserve-3d;
  transform:
    translate(-50%, -50%)
    translateX(calc(var(--offset) * 164px))
    translateZ(calc(var(--abs-offset) * -108px))
    rotateY(calc(var(--offset) * -32deg))
    translateY(calc(var(--abs-offset) * 2px))
    scale(calc(1 - (var(--abs-offset) * 0.07)));
  opacity: calc(1 - (var(--abs-offset) * 0.2));
  transition:
    transform 720ms cubic-bezier(.22, .61, .36, 1),
    opacity 560ms ease,
    background 320ms ease,
    color 320ms ease,
    border-color 320ms ease,
    box-shadow 420ms ease,
    filter 320ms ease;
  will-change: transform, opacity;
}

.carousel-card.is-outside {
  opacity: 0;
  pointer-events: none;
}

.carousel-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(115deg, transparent 20%, rgba(255, 255, 255, 0.16) 48%, transparent 74%);
  opacity: 0;
  transform: translateX(-55%);
  transition: opacity 220ms ease, transform 560ms ease;
  pointer-events: none;
}

.carousel-card:hover::before {
  opacity: 1;
  transform: translateX(50%);
}

.carousel-card:hover:not(.is-active) {
  border-color: rgba(255, 255, 255, 0.34);
  filter: brightness(1.08);
}

.carousel-card-inner {
  position: relative;
  z-index: 1;
  min-height: 68px;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 260ms cubic-bezier(.2, .8, .2, 1);
}

.carousel-card:hover .carousel-card-inner {
  transform: translateY(-1px) scale(1.008);
}

.carousel-card.is-active {
  border-color: rgba(255, 255, 255, 0.72);
  background: var(--white);
  color: var(--red);
  box-shadow: 0 17px 38px rgba(128, 0, 25, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.18);
  filter: none;
  animation: activeCardGlow 5.2s ease-in-out infinite alternate;
}

.carousel-card.is-active::before {
  background: linear-gradient(115deg, transparent 20%, rgba(239, 23, 52, 0.08) 48%, transparent 74%);
}

.carousel-card.is-landing .carousel-card-inner,
.carousel-card.is-settling .carousel-card-inner {
  animation: activeCardSettle 680ms cubic-bezier(.22, .61, .36, 1);
}

.carousel-card.is-card-tapped .carousel-card-inner {
  animation: cardTap 380ms cubic-bezier(.16, 1, .3, 1);
}

.carousel-card-title,
.carousel-card-date,
.carousel-card-count {
  display: block;
}

.carousel-card-title {
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.carousel-card-date {
  margin-top: 5px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  opacity: 0.78;
  white-space: nowrap;
}

.carousel-card-count {
  margin-top: 5px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.68;
}

.carousel-card-total {
  font-size: 14px;
}

.carousel-arrow {
  position: relative;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.19);
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.11);
  color: var(--white);
  box-shadow: 0 10px 26px rgba(120, 0, 24, 0.1);
  backdrop-filter: blur(10px);
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  transition: transform 190ms cubic-bezier(.2, .8, .2, 1), background 190ms ease, opacity 190ms ease, border-color 190ms ease;
}

.carousel-arrow::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: conic-gradient(from 0deg, transparent, rgba(255, 255, 255, 0.2), transparent 35%);
  opacity: 0;
  transition: opacity 180ms ease;
}

.carousel-arrow span {
  position: relative;
  z-index: 1;
  display: inline-block;
  transition: transform 190ms cubic-bezier(.2, .8, .2, 1);
}

.carousel-arrow:hover:not(:disabled) {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.19);
  border-color: rgba(255, 255, 255, 0.35);
}

.carousel-arrow:hover:not(:disabled)::before {
  opacity: 1;
  animation: arrowSpin 1.1s linear infinite;
}

.carousel-arrow-left:hover:not(:disabled) span {
  transform: translateX(-2px);
}

.carousel-arrow-right:hover:not(:disabled) span {
  transform: translateX(2px);
}

.carousel-arrow:active:not(:disabled) {
  transform: scale(0.93);
}

.carousel-arrow:disabled,
.carousel-arrow.is-disabled {
  cursor: default;
  opacity: 0.24;
  filter: saturate(0.6);
}

.carousel-arrow.is-edge-bump {
  animation: edgeBump 360ms cubic-bezier(.2, .8, .2, 1);
}

.desktop-carousel-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 16px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.105em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 500ms ease 560ms, transform 600ms cubic-bezier(.16, 1, .3, 1) 560ms;
}

body.is-loaded .desktop-carousel-hint {
  opacity: 1;
  transform: translateY(0);
}

.hint-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.22);
  animation: hintDot 2.2s ease-in-out infinite;
}

.hint-separator {
  opacity: 0.45;
}

.mobile-episode-interface {
  display: none;
}

/* Tracking origin */
.tracking-origin {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 18px;
  padding: 0 8px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 420ms ease 690ms, transform 560ms cubic-bezier(.16, 1, .3, 1) 690ms;
}

body.is-loaded .tracking-origin {
  opacity: 1;
  transform: translateY(0);
}

.tracking-origin-line {
  width: 26px;
  height: 1px;
  margin-right: 8px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42));
  transform-origin: right;
  animation: originLine 2.8s ease-in-out infinite alternate;
}

.tracking-origin-dot {
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  margin-right: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
  animation: originDot 2.4s ease-in-out infinite;
}

.tracking-origin-text strong {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 900;
}

@keyframes ambientGlow {
  0% { transform: scale(0.99) translate3d(-0.4%, 0.2%, 0); opacity: 0.72; }
  100% { transform: scale(1.025) translate3d(0.5%, -0.35%, 0); opacity: 1; }
}

@keyframes navigationGlow {
  0% { filter: brightness(1); }
  45% { filter: brightness(1.22); }
  100% { filter: brightness(1); }
}

@keyframes heroRefreshFlash {
  0% { opacity: 0; background-size: 0% 0%; }
  28% { opacity: 0.62; background-size: 46% 46%; }
  100% { opacity: 0; background-size: 130% 130%; }
}

@keyframes refreshText {
  0% { transform: translateY(0) scale(1); }
  28% { transform: translateY(2px) scale(0.93); }
  62% { transform: translateY(-2px) scale(1.045); letter-spacing: 0.04em; }
  100% { transform: translateY(0) scale(1); }
}

@keyframes refreshLine {
  0% { transform: scaleX(0); opacity: 0; }
  34% { transform: scaleX(1); opacity: 1; }
  72% { transform: scaleX(0.55); opacity: 0.7; }
  100% { transform: scaleX(0); opacity: 0; }
}

@keyframes bubbleFloat {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-3px) rotate(0.22deg); }
}

@keyframes haloPulse {
  0% { transform: translate(-50%, -50%) scale(0.83); opacity: 0; }
  30% { opacity: 0.2; }
  100% { transform: translate(-50%, -50%) scale(1.16); opacity: 0; }
}

@keyframes completionRing {
  0% { transform: translate(-50%, -50%) scale(0.86); opacity: 0; border-width: 1px; }
  35% { opacity: 0.48; }
  100% { transform: translate(-50%, -50%) scale(1.24); opacity: 0; border-width: 0; }
}

@keyframes counterRefresh {
  0% { transform: scale(1) rotate(0); }
  28% { transform: scale(0.975) rotate(-0.25deg); }
  66% { transform: scale(1.015) rotate(0.12deg); }
  100% { transform: scale(1) rotate(0); }
}

@keyframes counterTurnRight {
  0%, 100% { transform: translateX(0) rotate(0) scale(1); }
  48% { transform: translateX(-2px) rotate(-0.16deg) scale(0.998); }
}

@keyframes counterTurnLeft {
  0%, 100% { transform: translateX(0) rotate(0) scale(1); }
  48% { transform: translateX(2px) rotate(0.16deg) scale(0.998); }
}

@keyframes countingPulse {
  from { transform: translateX(-0.04em) scale(1); filter: none; }
  to { transform: translateX(-0.04em) scale(1.006); filter: none; }
}

@keyframes countFinish {
  0% { transform: translateX(-0.04em) scale(1); }
  42% { transform: translateX(-0.04em) scale(1.022); }
  100% { transform: translateX(-0.04em) scale(1); }
}

@keyframes centreGlow {
  from { opacity: 0.48; transform: translate(-50%, -50%) scale(0.95); }
  to { opacity: 0.8; transform: translate(-50%, -50%) scale(1.05); }
}

@keyframes wheelSweepRight {
  0% { left: -32%; opacity: 0; }
  24% { opacity: 1; }
  100% { left: 108%; opacity: 0; }
}

@keyframes wheelSweepLeft {
  0% { left: 108%; opacity: 0; }
  24% { opacity: 1; }
  100% { left: -32%; opacity: 0; }
}

@keyframes activeCardGlow {
  from { box-shadow: 0 17px 38px rgba(128, 0, 25, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.16); }
  to { box-shadow: 0 19px 42px rgba(128, 0, 25, 0.26), 0 0 0 2px rgba(255, 255, 255, 0.07); }
}

@keyframes activeCardLand {
  0% { transform: translateY(2px) scale(0.95); filter: blur(0.7px); }
  55% { transform: translateY(-2px) scale(1.035); filter: blur(0); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes activeCardSettle {
  0% { opacity: 0.92; transform: scale(0.992); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes cardTap {
  0% { transform: scale(1); }
  40% { transform: scale(0.94); }
  74% { transform: scale(1.025); }
  100% { transform: scale(1); }
}

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

@keyframes edgeBump {
  0%, 100% { transform: translateX(0) scale(1); }
  35% { transform: translateX(3px) scale(0.96); }
  65% { transform: translateX(-2px) scale(1.02); }
}

@keyframes hintDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.22); opacity: 0.6; }
  50% { box-shadow: 0 0 0 5px rgba(255, 255, 255, 0); opacity: 1; }
}

@keyframes originLine {
  from { transform: scaleX(0.72); opacity: 0.55; }
  to { transform: scaleX(1); opacity: 1; }
}

@keyframes originDot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08); }
  50% { box-shadow: 0 0 0 6px rgba(255, 255, 255, 0); }
}

@keyframes mobileTabLand {
  0% { transform: scale(0.95); }
  55% { transform: scale(1.025); }
  100% { transform: scale(1); }
}

@keyframes mobileTap {
  0% { transform: scale(1); }
  45% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

@keyframes selectPulse {
  0% { transform: scale(1); box-shadow: 0 10px 28px rgba(118, 0, 20, 0.1); }
  45% { transform: scale(1.012); box-shadow: 0 13px 32px rgba(118, 0, 20, 0.18), 0 0 0 3px rgba(255, 255, 255, 0.08); }
  100% { transform: scale(1); box-shadow: 0 10px 28px rgba(118, 0, 20, 0.1); }
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 22% 48% 30%;
  }

  .social-links {
    transform: none;
  }

  .counter {
    width: min(52vw, 365px);
  }

  .desktop-episode-interface {
    width: min(100%, 740px);
  }

  .carousel-card {
    width: 148px;
    transform:
      translate(-50%, -50%)
      translateX(calc(var(--offset) * 150px))
      translateZ(calc(var(--abs-offset) * -104px))
      rotateY(calc(var(--offset) * -32deg))
      translateY(calc(var(--abs-offset) * 2px))
      scale(calc(1 - (var(--abs-offset) * 0.07)));
  }
}

@media (max-width: 700px) {
  .hero {
    background-image: url("assets/background-mobile.png");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
  }

  .site-header {
    grid-template-columns: 70px 1fr auto;
    padding-right: 14px;
  }

  .header-column-left {
    padding-left: 12px;
  }

  .header-column-right {
    justify-content: flex-end;
  }

  .brand {
    width: 38px;
    height: 38px;
  }

  .brand img {
    width: 36px;
    height: 36px;
  }

  .refresh-button {
    padding: 0 15px;
    font-size: 16px;
  }

  .social-links {
    gap: 12px;
  }

  .social-links a,
  .social-links svg,
  .social-links .tiktok-icon {
    width: 18px;
    height: 18px;
  }

  .content-shell {
    padding: 12px 14px 14px;
  }

  .counter-stage {
    gap: 16px;
  }

  .counter {
    width: min(70vw, 335px);
  }

  .counter-bubble {
    animation-duration: 5.8s;
  }

  .episode-navigation {
    width: min(100%, 410px);
    gap: 0;
  }

  .desktop-episode-interface,
  .desktop-carousel-hint {
    display: none;
  }

  .mobile-episode-interface {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 11px;
  }

  .mobile-latest-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.17);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.11);
    box-shadow: 0 14px 38px rgba(118, 0, 20, 0.12);
    backdrop-filter: blur(12px);
    overflow: hidden;
  }

  .mobile-tab {
    position: relative;
    min-width: 0;
    min-height: 54px;
    padding: 8px 7px;
    border: 0;
    border-radius: 13px;
    overflow: hidden;
    background: transparent;
    color: rgba(255, 255, 255, 0.82);
    cursor: pointer;
    text-align: center;
    opacity: 0;
    transform: translateY(10px) scale(0.96);
    transition: transform 190ms cubic-bezier(.2, .8, .2, 1), background 190ms ease, color 190ms ease, box-shadow 190ms ease, opacity 350ms ease;
  }

  body.is-loaded .mobile-tab {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition-delay: calc(360ms + (var(--mobile-index) * 70ms));
  }

  .mobile-tab::before {
    content: "";
    position: absolute;
    top: -45%;
    bottom: -45%;
    left: -65%;
    width: 42%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.17), transparent);
    transform: rotate(13deg);
    transition: left 520ms ease;
  }

  .mobile-tab:active {
    transform: scale(0.96);
    transition-delay: 0ms !important;
  }

  .mobile-tab:hover::before,
  .mobile-tab.is-active::before {
    left: 120%;
  }

  .mobile-tab.is-active {
    background: var(--white);
    color: var(--red);
    box-shadow: 0 7px 20px rgba(166, 0, 31, 0.16);
  }

  .mobile-tab.is-active::before {
    background: linear-gradient(90deg, transparent, rgba(239, 23, 52, 0.09), transparent);
  }

  .mobile-tab.is-mobile-landing {
    animation: mobileTabLand 520ms cubic-bezier(.16, 1, .3, 1);
  }

  .mobile-tab.is-mobile-tapped {
    animation: mobileTap 360ms cubic-bezier(.16, 1, .3, 1);
  }

  .mobile-tab-title,
  .mobile-tab-date,
  .mobile-tab-mini-count {
    position: relative;
    z-index: 1;
    display: block;
  }

  .mobile-tab-title {
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.035em;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .mobile-tab-date {
    margin-top: 5px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    opacity: 0.8;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .mobile-tab-total {
    font-size: 12px;
  }

  .mobile-tab-mini-count {
    margin-top: 5px;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    opacity: 0.72;
  }

  .previous-episodes-block {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 420ms ease 570ms, transform 520ms cubic-bezier(.16, 1, .3, 1) 570ms;
  }

  body.is-loaded .previous-episodes-block {
    opacity: 1;
    transform: translateY(0);
  }

  .previous-episodes-block[hidden] {
    display: none;
  }

  .previous-episodes-label {
    padding-left: 4px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 9px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.13em;
    text-transform: uppercase;
  }

  .previous-select-shell {
    position: relative;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 28px rgba(118, 0, 20, 0.1);
    backdrop-filter: blur(12px);
    transition: transform 190ms ease, background 190ms ease, border-color 190ms ease, box-shadow 190ms ease;
  }

  .previous-select-shell:hover,
  .previous-select-shell:focus-within {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.28);
  }

  .previous-select-shell.is-selected-pulse {
    animation: selectPulse 600ms cubic-bezier(.16, 1, .3, 1);
  }

  .previous-select-shell select {
    width: 100%;
    height: 44px;
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    outline: 0;
    padding: 0 42px 0 14px;
    background: transparent;
    color: var(--white);
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
  }

  .previous-select-shell select option {
    color: #222;
    background: var(--white);
  }

  .select-chevron {
    position: absolute;
    top: 50%;
    right: 14px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 17px;
    line-height: 1;
    transform: translateY(-58%);
    pointer-events: none;
    transition: transform 200ms cubic-bezier(.2, .8, .2, 1);
  }

  .previous-select-shell:focus-within .select-chevron {
    transform: translateY(-48%) rotate(180deg);
  }

  .tracking-origin {
    display: none;
  }
}

@media (max-width: 500px) {
  .site-header {
    grid-template-columns: 56px 1fr auto;
    padding-right: 8px;
  }

  .header-column-left {
    padding-left: 8px;
  }

  .refresh-button {
    padding: 0 8px;
    font-size: 14px;
  }

  .social-links {
    gap: 8px;
  }

  .social-links a,
  .social-links svg,
  .social-links .tiktok-icon {
    width: 16px;
    height: 16px;
  }

  .counter {
    width: min(76vw, 320px);
  }

  .counter-number {
    font-size: clamp(66px, 18vw, 108px);
  }

  .counter-word {
    font-size: clamp(20px, 6vw, 28px);
  }

  .counter-suffix {
    font-size: clamp(18px, 5vw, 25px);
  }

  .episode-navigation {
    width: min(100%, 370px);
  }
}

@media (max-height: 690px) and (max-width: 700px) {
  .counter {
    width: min(59vw, 265px);
  }

  .counter-stage {
    gap: 10px;
  }

  .mobile-latest-tabs {
    padding: 5px;
  }

  .mobile-tab {
    min-height: 48px;
    padding: 7px 5px;
  }

  .previous-select-shell select {
    height: 40px;
  }
}

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


/* v2.5 desktop smoothing: keep the 3D motion, remove the snap/overshoot. */
@media (min-width: 701px) {
  body.is-navigation-pulse .hero::before {
    animation: ambientGlow 8s ease-in-out infinite alternate;
  }

  .carousel-wheel::after {
    display: none;
  }

  .carousel-card {
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
  }

  .counter.is-turning-left,
  .counter.is-turning-right {
    will-change: transform;
  }
}
