:root {
  color-scheme: light;
  --ink: #240817;
  --white: #fff8fb;
  --soft: rgba(255, 248, 251, 0.78);
  --line: rgba(255, 255, 255, 0.38);
  --hot: #ff2f8d;
  --pink: #ff76b7;
  --blush: #ffd1e7;
  --berry: #8f0f58;
  --plum: #3b1246;
  --coral: #ff8b6c;
  --gold: #ffd36f;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  color: var(--white);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 211, 111, 0.46), transparent 25%),
    radial-gradient(circle at 88% 12%, rgba(255, 139, 108, 0.44), transparent 24%),
    linear-gradient(135deg, #ff4ca3 0%, #d91f87 42%, #5e1a6e 100%);
}

button {
  font: inherit;
}

.story-app {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 28px);
  isolation: isolate;
}

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.72;
  pointer-events: none;
  z-index: -2;
}

.ambient-one {
  width: 42vmax;
  height: 42vmax;
  left: -15vmax;
  bottom: -18vmax;
  background: rgba(255, 118, 183, 0.52);
}

.ambient-two {
  width: 34vmax;
  height: 34vmax;
  right: -12vmax;
  top: -12vmax;
  background: rgba(255, 211, 111, 0.44);
}

.story-shell {
  position: relative;
  width: min(100%, 520px);
  height: min(920px, calc(100svh - clamp(24px, 6vw, 56px)));
  min-height: 620px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 30px;
  background: rgba(68, 9, 58, 0.34);
  box-shadow: 0 30px 90px rgba(56, 8, 45, 0.4);
  backdrop-filter: blur(22px);
}

.progress {
  position: absolute;
  inset: 16px 16px auto;
  display: grid;
  grid-template-columns: repeat(var(--count), 1fr);
  gap: 5px;
  z-index: 8;
}

.progress span {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.progress span::before {
  content: "";
  display: block;
  width: var(--fill, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--white);
  transition: width 220ms ease;
}

.story-top,
.story-bottom {
  position: absolute;
  left: 22px;
  right: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 8;
  color: rgba(255, 248, 251, 0.84);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.story-top {
  top: 34px;
}

.story-bottom {
  bottom: 22px;
}

.ghost-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  font-size: 1.2rem;
  cursor: pointer;
}

.slides {
  height: 100%;
  display: flex;
  transform: translateX(calc(var(--index, 0) * -100%));
  transition: transform 360ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.slide {
  position: relative;
  flex: 0 0 100%;
  min-width: 0;
  height: 100%;
  padding: 96px clamp(22px, 6vw, 42px) 86px;
  display: grid;
  align-content: center;
  gap: 18px;
  overflow: hidden;
}

.slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--bg);
}

.slide::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(36, 8, 23, 0.08), rgba(36, 8, 23, 0.5)),
    radial-gradient(circle at 80% 18%, rgba(255, 255, 255, 0.24), transparent 28%);
}

.slide.hero-slide {
  align-content: end;
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -3;
}

.hero-slide::before {
  background: linear-gradient(180deg, rgba(82, 7, 62, 0.04), rgba(82, 7, 62, 0.86));
  z-index: -2;
}

.kicker {
  margin: 0;
  color: var(--blush);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  max-width: 10ch;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 0.91;
}

h1 {
  font-size: clamp(4.15rem, 17vw, 6.9rem);
}

h2 {
  max-width: 11ch;
  font-size: clamp(2.55rem, 10vw, 4.45rem);
}

.copy {
  max-width: 34rem;
  margin: 0;
  color: var(--soft);
  font-size: clamp(1rem, 3.7vw, 1.18rem);
  font-weight: 650;
  line-height: 1.46;
}

.mega {
  display: block;
  color: var(--white);
  font-size: clamp(5.4rem, 24vw, 9rem);
  font-weight: 900;
  line-height: 0.86;
  letter-spacing: -0.04em;
  text-shadow: 0 14px 42px rgba(92, 5, 65, 0.34);
}

.mega.medium {
  font-size: clamp(4.2rem, 19vw, 7.2rem);
}

.tag {
  width: fit-content;
  max-width: 100%;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.stack {
  display: grid;
  gap: 12px;
}

.metric-card,
.rank-card {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 18px 54px rgba(84, 8, 60, 0.24);
}

.metric-card {
  padding: 18px;
}

.metric-card span,
.rank-card span {
  color: rgba(255, 248, 251, 0.74);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-card strong {
  display: block;
  margin-top: 5px;
  font-size: clamp(2rem, 8vw, 3rem);
  font-weight: 900;
  line-height: 1;
}

.meter {
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.26);
}

.meter span {
  display: block;
  width: var(--width);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--white));
}

.split-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--soft);
  font-size: 0.9rem;
  font-weight: 900;
}

.chart {
  height: 260px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: end;
  gap: 7px;
}

.bar {
  min-width: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 8px;
  height: 100%;
}

.bar i {
  align-self: end;
  min-height: 7px;
  border-radius: 999px 999px 4px 4px;
  background: linear-gradient(180deg, var(--white), var(--gold));
  box-shadow: 0 8px 22px rgba(255, 248, 251, 0.22);
}

.bar b {
  overflow-wrap: anywhere;
  color: rgba(255, 248, 251, 0.72);
  font-size: 0.58rem;
  text-align: center;
}

.rank-list {
  display: grid;
  gap: 10px;
}

.rank-card {
  padding: 12px 15px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
}

.rank-card b {
  font-size: 1.1rem;
}

.rank-card strong {
  font-size: 0.98rem;
}

.emoji-wall {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.emoji {
  min-height: 84px;
  padding: 12px 8px;
  display: grid;
  place-items: center;
  gap: 2px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.16);
}

.emoji b {
  font-size: clamp(2rem, 9vw, 3.1rem);
  line-height: 1;
}

.emoji span {
  color: rgba(255, 248, 251, 0.78);
  font-size: 0.74rem;
  font-weight: 900;
}

.tap-zone {
  position: absolute;
  top: 72px;
  bottom: 72px;
  z-index: 7;
  width: 34%;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0);
  cursor: pointer;
}

.tap-zone span {
  position: absolute;
  top: 50%;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.74);
  font-size: 2rem;
  line-height: 1;
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity 160ms ease;
}

.tap-zone:hover span,
.tap-zone:focus-visible span {
  opacity: 1;
}

.tap-left {
  left: 0;
}

.tap-left span {
  left: 14px;
}

.tap-right {
  right: 0;
}

.tap-right span {
  right: 14px;
}

.tap-zone:focus-visible,
.ghost-button:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: -2px;
}

.tap-zone:focus-visible {
  outline: 0;
}

.tap-zone:focus-visible span {
  opacity: 1;
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

@media (min-width: 900px) {
  .story-shell {
    width: min(100%, 680px);
  }

  .slide {
    padding-inline: 56px;
  }
}

@media (max-width: 520px) {
  .story-app {
    padding: 0;
  }

  .story-shell {
    width: 100%;
    height: 100svh;
    min-height: 0;
    border: 0;
    border-radius: 0;
  }

  .slide {
    padding-inline: 22px;
  }

  .chart {
    height: 230px;
  }
}

@media (max-height: 760px) {
  .slide {
    gap: 9px;
    padding-top: 82px;
    padding-bottom: 66px;
  }

  h1 {
    font-size: clamp(3.4rem, 14vw, 5.4rem);
  }

  h2 {
    font-size: clamp(2.28rem, 8.6vw, 3.65rem);
  }

  .mega {
    font-size: clamp(4.5rem, 19vw, 7rem);
  }

  .metric-card {
    padding: 10px 13px;
  }

  .rank-list {
    gap: 8px;
  }

  .rank-card {
    padding: 9px 12px;
  }

  .chart {
    height: 176px;
  }

  .emoji {
    min-height: 68px;
  }
}
