:root {
  --bg-top: #fff0d8;
  --bg-bottom: #ff8f7a;
  --ink: #4a1231;
  --accent: #ffcf56;
  --rose: #ff5f8f;
  --peach: #ffb38a;
  --cream: #fff8ee;
  --shadow: 0 24px 70px rgba(101, 21, 54, 0.24);
  --frame-width: min(100vw, 430px);
  --frame-height: 100vh;
  --slide-gap: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.72), transparent 28%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  color: var(--ink);
  font-family: "Trebuchet MS", "Gill Sans", sans-serif;
}

body {
  display: grid;
  place-items: center;
}

.experience {
  position: relative;
  width: var(--frame-width);
  height: var(--frame-height);
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.7), transparent 18%),
    radial-gradient(circle at 80% 20%, rgba(255, 215, 128, 0.45), transparent 20%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, #ffe8c5 0%, #ffb483 55%, #ff8b7d 100%);
  box-shadow: var(--shadow);
  isolation: isolate;
}

.entry-lock {
  position: absolute;
  inset: 0;
  z-index: 9;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top, rgba(255, 243, 207, 0.68), rgba(81, 16, 42, 0.48)),
    linear-gradient(180deg, rgba(91, 16, 45, 0.42), rgba(62, 9, 31, 0.64));
  backdrop-filter: blur(8px);
  transition: opacity 420ms ease, visibility 420ms ease;
}

.entry-lock.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.entry-lock-card {
  width: min(100%, 360px);
  border-radius: 26px;
  padding: 20px;
  background: rgba(255, 249, 240, 0.92);
  box-shadow: 0 24px 46px rgba(44, 7, 22, 0.34);
  color: #5d1735;
  display: grid;
  gap: 12px;
}

.entry-lock-chip {
  display: inline-block;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(255, 228, 184, 0.72);
}

.entry-lock-card h2 {
  margin: 0;
  font-size: clamp(1.3rem, 6vw, 1.8rem);
  line-height: 1.05;
}

.entry-lock-text {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.35;
}

.entry-timer {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.entry-timer div {
  padding: 10px 6px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  text-align: center;
}

.entry-timer strong {
  display: block;
  font-size: 1.25rem;
  font-family: "Georgia", serif;
}

.entry-timer span {
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.entry-form {
  display: grid;
  gap: 8px;
}

.entry-form label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.entry-form input {
  border: 1px solid rgba(99, 23, 52, 0.26);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.96rem;
  background: rgba(255, 255, 255, 0.86);
  color: #4f1530;
}

.entry-form button,
.entry-bypass {
  border: none;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(90deg, #8f2250, #6f173d);
}

.entry-form button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.entry-bypass {
  background: rgba(85, 21, 46, 0.2);
  color: #5e1735;
}

.entry-error {
  margin: 0;
  min-height: 1em;
  color: #a52442;
  font-size: 0.8rem;
}

.entry-lock.production .entry-bypass {
  display: none;
}

.experience::before,
.experience::after {
  content: "";
  position: absolute;
  inset: auto;
  border-radius: 50%;
  filter: blur(4px);
  opacity: 0.55;
  animation: drift 16s ease-in-out infinite alternate;
  pointer-events: none;
}

.experience::before {
  width: 180px;
  height: 180px;
  top: 12%;
  right: -70px;
  background: rgba(255, 255, 255, 0.35);
}

.experience::after {
  width: 240px;
  height: 240px;
  bottom: -80px;
  left: -90px;
  background: rgba(255, 236, 199, 0.45);
  animation-duration: 20s;
}

.sparkles,
.confetti,
.petals {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.sparkles span,
.confetti span,
.petals span {
  position: absolute;
  display: block;
}

.sparkles span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.95);
  animation: twinkle var(--duration) ease-in-out infinite;
}

.confetti span {
  top: -30px;
  width: 10px;
  height: 18px;
  border-radius: 999px;
  background: var(--tone);
  opacity: 0.75;
  animation: fall var(--speed) linear infinite;
  animation-delay: var(--delay);
  transform: rotate(var(--tilt));
}

.petals span {
  top: -40px;
  width: 22px;
  height: 28px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 214, 228, 0.95), transparent 38%),
    linear-gradient(180deg, #ff7ea6, #e13d72);
  border-radius: 70% 0 70% 0;
  opacity: 0.82;
  filter: drop-shadow(0 8px 14px rgba(136, 29, 65, 0.18));
  animation: petalFall var(--speed) linear infinite;
  animation-delay: var(--delay);
  transform: rotate(var(--tilt));
}

.curtain-intro {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: end center;
  padding: 28px 20px max(34px, env(safe-area-inset-bottom) + 18px);
  overflow: hidden;
  transition: opacity 900ms ease, visibility 900ms ease;
  background: linear-gradient(180deg, rgba(53, 7, 27, 0.18), rgba(53, 7, 27, 0.38));
  cursor: pointer;
}

.curtain-intro * {
  pointer-events: none;
}

.curtain-intro.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.curtain-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 54%;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.14), transparent 35%),
    repeating-linear-gradient(
      90deg,
      rgba(115, 10, 49, 0.95) 0 18px,
      rgba(147, 17, 63, 0.98) 18px 38px,
      rgba(101, 6, 43, 0.98) 38px 56px
    );
  box-shadow: inset 0 0 40px rgba(32, 4, 18, 0.45);
  transition: transform 1300ms cubic-bezier(0.2, 0.8, 0.18, 1);
}

.curtain-panel.left {
  left: 0;
  border-right: 2px solid rgba(255, 227, 178, 0.35);
}

.curtain-panel.right {
  right: 0;
  border-left: 2px solid rgba(255, 227, 178, 0.35);
}

.curtain-panel::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100%;
  background:
    radial-gradient(circle at top, rgba(255, 233, 177, 0.3), transparent 18%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.18));
}

.curtain-intro.open .curtain-panel.left {
  transform: translateX(-108%);
}

.curtain-intro.open .curtain-panel.right {
  transform: translateX(108%);
}

.intro-content {
  position: relative;
  z-index: 2;
  width: 100%;
  display: grid;
  gap: 18px;
  justify-items: center;
}

.stage-light {
  position: absolute;
  top: -5%;
  left: 50%;
  width: 240px;
  height: 420px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(255, 244, 200, 0.85), rgba(255, 244, 200, 0));
  clip-path: polygon(44% 0, 56% 0, 100% 100%, 0 100%);
  filter: blur(12px);
  opacity: 0.8;
}

.stage-floor {
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: -8%;
  height: 32%;
  background:
    radial-gradient(circle at center, rgba(255, 214, 130, 0.3), transparent 35%),
    linear-gradient(180deg, rgba(84, 10, 38, 0.18), rgba(47, 6, 21, 0.72));
  border-radius: 50% 50% 0 0;
  transform: perspective(600px) rotateX(72deg);
  transform-origin: bottom;
}

.intro-bubble {
  max-width: 270px;
  padding: 16px 18px;
  border-radius: 28px 28px 28px 10px;
  background: rgba(255, 249, 239, 0.9);
  color: #651433;
  box-shadow: 0 22px 36px rgba(45, 6, 20, 0.28);
  text-align: left;
  transform-origin: bottom left;
  animation: bubbleBob 2.8s ease-in-out infinite;
}

.intro-bubble strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.intro-bubble p {
  margin: 0;
  line-height: 1.4;
  font-size: 1.02rem;
}

.presenter-image {
  position: relative;
  display: block;
  width: 104px;
  max-width: 100%;
  border-radius: 18px;
  box-shadow: 0 10px 18px rgba(31, 5, 14, 0.14);
  animation: presenterRise 1.8s ease-out both;
}


.intro-tap {
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(255, 236, 200, 0.9);
  color: #6d1538;
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  box-shadow: 0 12px 24px rgba(70, 10, 31, 0.24);
  animation: pulse 2s ease-in-out infinite;
}

.name-tag {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 249, 239, 0.82);
  color: #75153b;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  box-shadow: 0 10px 20px rgba(70, 10, 31, 0.18);
}

.corner-rose,
.candle {
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

.corner-rose {
  width: 82px;
  height: 82px;
  background:
    radial-gradient(circle at center, #ffe9b7 0 8%, transparent 9%),
    radial-gradient(circle at 34% 34%, #ff96b7 0 22%, transparent 23%),
    radial-gradient(circle at 62% 34%, #ff6f9a 0 22%, transparent 23%),
    radial-gradient(circle at 38% 62%, #eb3f74 0 22%, transparent 23%),
    radial-gradient(circle at 64% 64%, #cf275c 0 22%, transparent 23%);
  animation: sway 5s ease-in-out infinite;
}

.corner-rose.top {
  top: 110px;
  right: 8px;
}

.corner-rose.bottom {
  bottom: 138px;
  left: 8px;
  animation-delay: -2s;
}

.candle {
  bottom: 146px;
  right: 24px;
  width: 34px;
  height: 96px;
  border-radius: 16px 16px 10px 10px;
  background: linear-gradient(90deg, #ffefc6 0 30%, #ff7e93 30% 48%, #fff3d6 48% 70%, #f35274 70% 100%);
  box-shadow: 0 12px 20px rgba(94, 10, 37, 0.16);
}

.candle::before {
  content: "";
  position: absolute;
  top: -11px;
  left: 50%;
  width: 4px;
  height: 15px;
  background: #5e2333;
  transform: translateX(-50%);
  border-radius: 999px;
}

.candle::after {
  content: "";
  position: absolute;
  top: -30px;
  left: 50%;
  width: 18px;
  height: 28px;
  transform: translateX(-50%);
  border-radius: 50% 50% 50% 50% / 70% 70% 30% 30%;
  background: radial-gradient(circle at 50% 35%, #fff8ce 0 22%, #ffb948 40%, #ff6b35 74%, rgba(255, 107, 53, 0) 76%);
  animation: flameFlicker 1s ease-in-out infinite;
  filter: drop-shadow(0 0 12px rgba(255, 198, 93, 0.7));
}

.slides {
  position: absolute;
  inset: 0;
}

.slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: space-between;
  gap: var(--slide-gap);
  padding: max(16px, env(safe-area-inset-top)) 22px 0;
  padding-bottom: max(16px, env(safe-area-inset-bottom) + 6px);
  opacity: 0;
  transform: translateX(12%) scale(0.98);
  transition: opacity 700ms ease, transform 700ms ease;
  pointer-events: none;
  overflow-y: auto;
  overflow-x: hidden;
}

.slide.active {
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
}

.topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.hero {
  display: grid;
  gap: 16px;
  align-content: center;
  padding-top: 20px;
}

.eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(74, 18, 49, 0.72);
}

h1,
h2 {
  margin: 0;
  line-height: 0.95;
  font-family: "Georgia", "Times New Roman", serif;
  letter-spacing: 0;
}

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

h2 {
  font-size: clamp(1.9rem, 9vw, 3.2rem);
}

.lead {
  margin: 0;
  max-width: 26ch;
  font-size: 1.02rem;
  line-height: 1.36;
  color: rgba(74, 18, 49, 0.84);
}

.lead-wide {
  max-width: none;
}

.princess-slide {
  gap: 12px;
}

.princess-frame {
  width: 100%;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 243, 225, 0.55);
  box-shadow: 0 18px 36px rgba(80, 18, 45, 0.22);
  background: rgba(255, 249, 240, 0.2);
}

.princess-frame img {
  display: block;
  width: 100%;
  height: min(32vh, 280px);
  object-fit: cover;
  object-position: center 30%;
}

.princess-frame.compact img {
  height: min(26vh, 260px);
  object-position: center 22%;
}

.quiz-board {
  gap: 10px;
}

.quiz-panel {
  padding: 12px;
  border-radius: 20px;
  background: rgba(255, 248, 238, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.48);
  backdrop-filter: blur(12px);
  box-shadow: 0 14px 28px rgba(93, 21, 51, 0.16);
}

.quiz-options {
  display: grid;
  gap: 8px;
}

.option {
  display: block;
  width: 100%;
  border: none;
  padding: 10px 11px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
  font-weight: 600;
  text-align: left;
  color: #5a1b38;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.option:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(91, 24, 52, 0.12);
}

.option.selected.correct {
  background: linear-gradient(90deg, rgba(255, 239, 178, 0.95), rgba(255, 216, 122, 0.95));
  color: #5b1733;
  box-shadow: 0 10px 18px rgba(255, 215, 106, 0.38);
}

.option.selected.correct {
  outline: 2px solid rgba(117, 31, 57, 0.48);
}

.option.selected.wrong {
  background: linear-gradient(90deg, rgba(255, 215, 210, 0.95), rgba(255, 177, 170, 0.95));
  color: #761d37;
  box-shadow: 0 10px 18px rgba(196, 64, 54, 0.2);
}

.quiz-result {
  margin: 8px 0 0;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6f1739;
  font-weight: 700;
}

.gift-card-placeholder {
  padding: 18px 14px;
  border-radius: 24px;
  border: 2px dashed rgba(122, 25, 60, 0.38);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.6), rgba(255, 246, 235, 0.32)),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.16) 0 10px, rgba(255, 255, 255, 0.05) 10px 20px);
  display: grid;
  gap: 8px;
}

.gift-card-placeholder span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(92, 22, 47, 0.76);
}

.gift-card-placeholder strong {
  font-size: 1rem;
  color: #651433;
}

.stage-note {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 249, 239, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.38);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.stage-note::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff6d90;
  box-shadow: 0 0 10px rgba(255, 109, 144, 0.7);
}

.glass-card {
  padding: 16px;
  border-radius: 26px;
  background: rgba(255, 248, 238, 0.44);
  border: 1px solid rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 40px rgba(111, 25, 58, 0.16);
}

.number-burst {
  position: relative;
  min-height: 220px;
  display: grid;
  place-items: center;
}

.number-burst::before {
  content: "";
  position: absolute;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.9) 0 14%, rgba(255, 255, 255, 0) 14%),
    conic-gradient(from 0deg, #fff4b0, #ff9f8b, #ff6790, #ffd66a, #fff4b0);
  filter: blur(0.5px);
  animation: spin 16s linear infinite;
  opacity: 0.85;
}

.number-burst strong {
  position: relative;
  z-index: 1;
  font-size: clamp(5rem, 28vw, 8rem);
  line-height: 1;
  color: #7f183f;
  text-shadow: 0 12px 30px rgba(255, 255, 255, 0.5);
}

.mini-candles {
  display: flex;
  gap: 10px;
  align-items: end;
  min-height: 74px;
}

.mini-candles span {
  position: relative;
  width: 18px;
  border-radius: 10px 10px 6px 6px;
  background: linear-gradient(90deg, #fff0cf 0 35%, #ff7f9a 35% 60%, #fff7df 60% 100%);
  box-shadow: 0 10px 18px rgba(100, 17, 47, 0.16);
}

.mini-candles span:nth-child(1) {
  height: 50px;
}

.mini-candles span:nth-child(2) {
  height: 64px;
}

.mini-candles span:nth-child(3) {
  height: 56px;
}

.mini-candles span::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  width: 3px;
  height: 10px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #6d2438;
}

.mini-candles span::after {
  content: "";
  position: absolute;
  top: -23px;
  left: 50%;
  width: 12px;
  height: 18px;
  transform: translateX(-50%);
  border-radius: 50% 50% 50% 50% / 70% 70% 30% 30%;
  background: radial-gradient(circle at 50% 35%, #fff8ce 0 22%, #ffb948 40%, #ff6b35 74%, rgba(255, 107, 53, 0) 76%);
  filter: drop-shadow(0 0 8px rgba(255, 198, 93, 0.7));
}

.slide-blooms {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.slide-blooms span {
  position: absolute;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #ffe9b7 0 8%, transparent 9%),
    radial-gradient(circle at 34% 34%, #ff96b7 0 22%, transparent 23%),
    radial-gradient(circle at 62% 34%, #ff6f9a 0 22%, transparent 23%),
    radial-gradient(circle at 38% 62%, #eb3f74 0 22%, transparent 23%),
    radial-gradient(circle at 64% 64%, #cf275c 0 22%, transparent 23%);
  opacity: 0.9;
}

.slide-blooms span:first-child {
  top: 140px;
  right: -10px;
}

.slide-blooms span:last-child {
  bottom: 170px;
  left: -6px;
}

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

.timer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.timer-cell {
  padding: 12px 8px;
  border-radius: 20px;
  text-align: center;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.42);
}

.timer-cell strong {
  display: block;
  font-size: 1.55rem;
  font-family: "Georgia", serif;
}

.timer-cell span {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.photo-placeholder {
  min-height: 182px;
  border-radius: 28px;
  padding: 16px;
  display: grid;
  align-content: end;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.22)),
    repeating-linear-gradient(
      -45deg,
      rgba(255, 255, 255, 0.18) 0 10px,
      rgba(255, 255, 255, 0.05) 10px 20px
    );
  border: 2px dashed rgba(127, 24, 63, 0.35);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.photo-placeholder.large {
  grid-column: 1 / -1;
  min-height: 220px;
}

.photo-placeholder span {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

.message {
  padding: 14px 16px;
  border-radius: 22px;
  background: rgba(255, 248, 238, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.4);
  line-height: 1.35;
  font-size: 0.98rem;
}

.finale {
  display: grid;
  gap: 12px;
  align-content: center;
  text-align: center;
}

.ribbon {
  justify-self: center;
  padding: 8px 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffefae, #ffd76a);
  color: #7b153b;
  font-size: 0.76rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  box-shadow: 0 12px 30px rgba(255, 215, 106, 0.4);
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.78rem;
  color: rgba(74, 18, 49, 0.72);
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, rgba(255, 232, 197, 0), rgba(255, 232, 197, 0.95));
  padding-top: 12px;
  z-index: 10;
}

.progress {
  display: flex;
  gap: 6px;
  align-items: center;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(74, 18, 49, 0.22);
  transition: transform 200ms ease, background 200ms ease;
}

.dot.active {
  background: #7f183f;
  transform: scale(1.35);
}

.nav {
  display: flex;
  gap: 10px;
}

.nav button {
  appearance: none;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  padding: 10px 14px;
  font: inherit;
  cursor: pointer;
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 22px rgba(111, 25, 58, 0.12);
}

.nav button:disabled {
  opacity: 0.46;
  cursor: not-allowed;
  box-shadow: none;
}

.slide[data-quiz="true"] {
  align-content: space-between;
  gap: 10px;
}

.slide[data-quiz="true"] h2 {
  font-size: clamp(1.55rem, 7vw, 2.25rem);
  line-height: 1.05;
}

.slide[data-quiz="true"] .princess-frame.compact {
  display: none;
}

.slide[data-quiz="true"] .footer {
  margin-top: 8px;
}

.pulse {
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.15;
    transform: scale(0.7);
  }

  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

@keyframes drift {
  from {
    transform: translateY(0) translateX(0);
  }

  to {
    transform: translateY(18px) translateX(-16px);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.03);
  }
}

@keyframes fall {
  0% {
    transform: translateY(-20px) rotate(var(--tilt));
  }

  100% {
    transform: translateY(110vh) rotate(calc(var(--tilt) + 180deg));
  }
}

@keyframes petalFall {
  0% {
    transform: translateY(-20px) rotate(var(--tilt));
  }

  50% {
    transform: translateY(55vh) translateX(16px) rotate(calc(var(--tilt) + 60deg));
  }

  100% {
    transform: translateY(112vh) translateX(-12px) rotate(calc(var(--tilt) + 140deg));
  }
}

@keyframes presenterRise {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes wave {
  0%,
  100% {
    transform: rotate(-40deg);
  }

  50% {
    transform: rotate(-18deg);
  }
}

@keyframes bubbleBob {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

@keyframes flameFlicker {
  0%,
  100% {
    transform: translateX(-50%) scaleY(1) scaleX(1);
  }

  50% {
    transform: translateX(-50%) scaleY(1.08) scaleX(0.9);
  }
}

@keyframes sway {
  0%,
  100% {
    transform: rotate(0deg) translateY(0);
  }

  50% {
    transform: rotate(6deg) translateY(-5px);
  }
}

@media (max-width: 380px) {
  .slide {
    padding-inline: 16px;
  }

  .timer-grid {
    gap: 8px;
  }

  .timer-cell strong {
    font-size: 1.3rem;
  }

  .photo-placeholder {
    min-height: 155px;
  }

  .presenter-image {
    width: 104px;
  }
}

.celebrate-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at center, rgba(255, 215, 80, 0.28), rgba(255, 120, 150, 0.12) 55%, transparent 80%);
  z-index: 20;
}

.celebrate-petal {
  position: absolute;
  width: 18px;
  height: 24px;
  border-radius: 70% 0 70% 0;
  pointer-events: none;
  z-index: 21;
  opacity: 0.9;
  filter: drop-shadow(0 4px 8px rgba(136, 29, 65, 0.2));
}

.celebrate-confetti {
  position: absolute;
  width: 9px;
  height: 16px;
  border-radius: 999px;
  pointer-events: none;
  z-index: 21;
  opacity: 0.8;
}

.photo-carousel {
  display: grid;
  gap: 12px;
}

.carousel-inner {
  position: relative;
  width: 100%;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 243, 225, 0.55);
  box-shadow: 0 18px 36px rgba(80, 18, 45, 0.22);
  background: rgba(255, 249, 240, 0.2);
}

.carousel-image {
  display: none;
  width: 100%;
  height: min(32vh, 320px);
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 800ms ease;
}

.carousel-image.active {
  display: block;
  opacity: 1;
}

.carousel-counter {
  text-align: center;
  font-size: 0.9rem;
  color: rgba(74, 18, 49, 0.6);
  letter-spacing: 0.08em;
}

.fortune-container {
  display: grid;
  gap: 20px;
  align-content: center;
  text-align: center;
}

.fortune-header {
  display: grid;
  gap: 8px;
}

.fortune-header h2 {
  font-size: clamp(2rem, 8vw, 2.8rem);
  margin: 0;
}

.wheel-stage {
  display: grid;
  place-items: center;
  min-height: 260px;
  position: relative;
}

.wheel-wrapper {
  position: relative;
  width: 220px;
  height: 220px;
}

.fortune-wheel {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    repeating-conic-gradient(
      from 0deg,
      transparent 0deg 59.9deg,
      rgba(80, 20, 40, 0.4) 59.9deg 60.1deg
    ),
    conic-gradient(
      from 0deg,
      #FFB3D9 0deg 60deg,
      #FF8FA3 60deg 120deg,
      #FF6B9D 120deg 180deg,
      #FF5B8A 180deg 240deg,
      #FF7BA8 240deg 300deg,
      #FF9BC5 300deg 360deg
    );
  box-shadow: 0 20px 50px rgba(255, 107, 157, 0.3), inset 0 0 30px rgba(255, 255, 255, 0.2);
  border: 4px solid rgba(255, 255, 255, 0.9);
  display: grid;
  place-items: center;
  transition: none;
}

.wheel-segment {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transform: rotate(calc(var(--segment) * 60deg));
}

.segment-label {
  position: absolute;
  top: 30px;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.08em;
  width: 60px;
  text-align: center;
  line-height: 1.2;
}

.wheel-pointer {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 20px solid rgba(255, 107, 157, 0.9);
  z-index: 10;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.spin-info {
  font-size: 1.1rem;
  color: #6f1739;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.spin-btn {
  appearance: none;
  border: none;
  padding: 14px 32px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #ff6b9d, #ff8fa3);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(255, 107, 157, 0.4);
  transition: all 200ms ease;
}

.spin-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(255, 107, 157, 0.5);
}

.spin-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.fortune-result {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 248, 238, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 32px rgba(111, 25, 58, 0.2);
  animation: slideUpResult 500ms ease-out;
}

.fortune-result[hidden] {
  display: none;
}

.result-content {
  display: grid;
  gap: 12px;
}

.result-emoji {
  font-size: clamp(1.6rem, 10vw, 3rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  animation: bounceEmoji 600ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

#resultText {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: #651433;
  line-height: 1.4;
}

.next-spin-btn {
  appearance: none;
  border: none;
  padding: 10px 24px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.7);
  color: #6f1739;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(111, 25, 58, 0.12);
  transition: all 200ms ease;
}

.next-spin-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 24px rgba(111, 25, 58, 0.18);
}

.slide[data-fortune="true"] {
  align-content: center;
  gap: 12px;
}

@keyframes slideUpResult {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounceEmoji {
  0% {
    transform: scale(0) rotate(-45deg);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.fortune-wheel.spinning {
  animation: wheelSpin 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 1;
}
