:root {
  --cream: #fff8ed;
  --paper: #fffdf7;
  --ink: #3f2a26;
  --red: #b23a35;
  --red-dark: #86302b;
  --maroon: #6e2420;
  --gold: #c8943a;
  --gold-light: #efd18c;
  --marigold: #f5a524;
  --marigold-dark: #dc7417;
  --leaf: #5f7f37;
  --muted: #8a6f64;
  --line: #ead9c5;
  --serif: "Tiro Devanagari Hindi", "Noto Serif Devanagari", serif;
  --hand: "Kalam", "Noto Sans Devanagari", cursive;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(900px 500px at 50% -10%, #f6e4cc, transparent), #e9ddd0;
  font-family: "DM Sans", "Noto Sans Devanagari", sans-serif;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; touch-action: manipulation; }
:is(button, a, input):focus-visible { outline: 3px solid #637d81; outline-offset: 4px; }

/* ---------- Phone shell ---------- */

.phone {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 480px;
  height: 100svh;
  min-height: 540px;
  margin: 0 auto;
  overflow: hidden;
  background-color: var(--cream);
  background-image: radial-gradient(#f4e6d2 .8px, transparent 1px);
  background-size: 15px 15px;
  box-shadow: 0 0 80px #49352222;
}

/* Sari-border strip along the top edge */
.phone::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  z-index: 3;
  background: repeating-linear-gradient(90deg, var(--red) 0 12px, var(--gold-light) 12px 15px, var(--marigold) 15px 24px, var(--gold-light) 24px 27px);
}

.petals { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.petals i {
  position: absolute;
  top: -20px;
  width: var(--s);
  height: calc(var(--s) * 1.4);
  border-radius: 50% 50% 50% 0;
  background: var(--c);
  opacity: .55;
  animation: drift var(--d) linear var(--delay) infinite;
}

.phone-header, .segments, .screen, .phone-footer { position: relative; z-index: 1; }

.phone-header {
  height: 62px;
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 22px 4px;
  color: var(--muted);
  font-size: 12px;
}
.phone-header > span { font-family: var(--hand); font-size: 15px; color: var(--red-dark); }

.back {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  font-size: 19px;
}
.back:disabled { visibility: hidden; }

.header-controls { display: flex; align-items: center; gap: 9px; }

.music-toggle {
  min-height: 36px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f4e6d1;
  font-size: 11px;
}
.music-toggle[aria-pressed="true"] { background: #e3ebcf; border-color: #c4d1a6; }
.music-toggle[aria-pressed="true"]::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--leaf); animation: pulse 1.2s ease-in-out infinite; }

.step-count { letter-spacing: 1px; font-size: 11px; }

.segments { flex-shrink: 0; display: flex; gap: 5px; padding: 8px 24px; }
.segments span { flex: 1; height: 4px; border-radius: 4px; background: #eadbca; transition: background .3s; }
.segments span.filled { background: linear-gradient(90deg, var(--red), var(--marigold-dark)); }

.screen {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  touch-action: pan-y;
  scrollbar-width: none;
}
.screen::-webkit-scrollbar { display: none; }

.slide {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100%;
  padding: 18px 26px 0;
  text-align: center;
  animation: arrive-right .35s ease-out;
}
.slide.from-left { animation-name: arrive-left; }

.eyebrow {
  margin: 0 0 12px;
  color: var(--red);
  letter-spacing: 2.4px;
  font: 600 10px "DM Sans", "Noto Sans Devanagari", sans-serif;
}
.eyebrow::before, .eyebrow::after { content: "✦"; margin: 0 8px; color: var(--gold); }

.slide h1 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: 33px;
  font-weight: 400;
  line-height: 1.45;
}
.slide h1:focus { outline: none; }
.slide h1 em { color: var(--red); font-style: normal; }

.line { margin: 16px 0 12px; font-size: 16px; line-height: 1.85; }

.tap-hint { margin: 10px 0; color: var(--muted); font-size: 13px; line-height: 1.8; }

.feedback { min-height: 18px; margin: 12px 0 8px; color: var(--red); font-size: 13px; line-height: 1.7; }

.little-note {
  width: 100%;
  margin-top: 14px;
  padding: 16px 15px;
  background: #f3ecd8;
  border: 1px dashed #bfae84;
  border-radius: 12px;
  font-family: var(--hand);
  font-size: 18px;
  line-height: 1.7;
  animation: pop-in .4s ease-out;
}

.handwritten {
  margin: 20px 0 10px;
  color: var(--red);
  font-family: var(--hand);
  font-size: 21px;
  line-height: 1.6;
}

.text-link {
  margin: 8px 0 0;
  padding: 8px 10px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 12px;
  text-decoration: underline;
}

/* ---------- Footer ---------- */

.phone-footer {
  flex-shrink: 0;
  z-index: 2;
  padding: 12px 24px max(16px, env(safe-area-inset-bottom));
  background: var(--cream);
  box-shadow: 0 -10px 18px #fff8edd9;
}

.main-cta {
  position: relative;
  width: 100%;
  min-height: 54px;
  padding: 13px 16px;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #c2443e, var(--red));
  color: #fff7ed;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 4px var(--red-dark);
}
.main-cta:active { transform: translateY(2px); box-shadow: 0 2px var(--red-dark); }
.main-cta.locked { background: linear-gradient(180deg, #c9877c, #b8766c); box-shadow: 0 4px #96594f; }
.theme-0 .main-cta::after, .main-cta.ready::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, #ffffff55, transparent);
  transform: skewX(-20deg);
  animation: shine 2.8s ease-in-out infinite;
}

.footer-meta { margin-top: 12px; color: var(--muted); font-size: 11px; text-align: center; }

.replay {
  display: block;
  margin: 6px auto 0;
  padding: 6px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 12px;
}

/* ---------- 0: Jharokha (arched window) portrait ---------- */

.jharokha { position: relative; width: 72%; max-width: 290px; margin: 16px 0 4px; }
.jh-arch {
  position: relative;
  height: clamp(200px, 33svh, 330px);
  padding: 8px;
  border-radius: 999px 999px 18px 18px;
  background: linear-gradient(150deg, #f6dd9b, #c48b2c 38%, #f8e7b2 58%, #b07a22);
  box-shadow: 0 14px 26px #7a4a1a33;
}
.jh-arch::before {
  content: "";
  position: absolute;
  inset: 8px;
  z-index: 1;
  border-radius: 999px 999px 12px 12px;
  box-shadow: inset 0 0 0 2px #7d2a22aa, inset 0 0 22px #3a1a0a44;
  pointer-events: none;
}
.jh-arch::after {
  content: "❁";
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gold);
  font-size: 30px;
  text-shadow: 0 1px #7a4a1a55;
}
.jh-arch img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
  border-radius: 999px 999px 12px 12px;
}

/* Marigold strings hanging on both sides */
.strand {
  position: absolute;
  top: 16%;
  width: 16px;
  height: 66%;
  z-index: 2;
  background: radial-gradient(circle, #ffd257 0 2.5px, #f8a51f 3.5px 5.5px, #d9701a 6.4px, transparent 7.2px) 0 0 / 16px 14px repeat-y;
  filter: drop-shadow(0 2px 1px #7a3a0a40);
}
.strand::after {
  content: "";
  position: absolute;
  bottom: -14px;
  left: 4px;
  width: 8px;
  height: 14px;
  border-radius: 0 0 50% 50%;
  background: var(--gold);
}
.strand.left { left: -12px; }
.strand.right { right: -12px; }

.sticker {
  position: absolute;
  right: -22px;
  bottom: 14px;
  z-index: 3;
  padding: 7px 13px 5px;
  background: repeating-linear-gradient(45deg, #f6e1a6 0 8px, #f2d993 8px 16px);
  font-family: var(--hand);
  font-size: 17px;
  transform: rotate(7deg);
  box-shadow: 2px 3px 0 #30292318;
}

/* ---------- Gift intro ---------- */

.gift-intro {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  background: radial-gradient(circle at 50% 45%, #fff3dc, var(--cream) 60%);
  transition: opacity .6s ease, transform .6s ease;
}
.gift-intro.leaving { opacity: 0; transform: scale(1.06); pointer-events: none; }
.gift-kicker { margin: 0; color: var(--red); font-family: var(--hand); font-size: 24px; }
.gift-title { margin: 4px 0 26px; font-family: var(--serif); font-size: 30px; font-weight: 400; }
.gift-hint { margin: 30px 0 0; color: var(--muted); font-size: 14px; }

.gift { position: relative; width: 170px; height: 170px; border: 0; background: none; padding: 0; animation: wiggle 2.4s ease-in-out infinite; }
.gift-box {
  position: absolute;
  left: 15px;
  bottom: 0;
  width: 140px;
  height: 110px;
  border-radius: 6px;
  background: linear-gradient(90deg, transparent 58px, var(--gold-light) 58px 82px, transparent 82px), linear-gradient(180deg, #c8463f, #9e2f2a);
  box-shadow: inset 0 -8px 0 #00000018;
}
.gift-lid {
  position: absolute;
  left: 5px;
  top: 32px;
  width: 160px;
  height: 36px;
  border-radius: 6px;
  background: linear-gradient(90deg, transparent 68px, var(--gold-light) 68px 92px, transparent 92px), linear-gradient(180deg, #d24f47, #b23a35);
  box-shadow: 0 4px 0 #00000014;
  transition: transform .7s cubic-bezier(.3, 1.4, .5, 1);
}
.gift-bow { position: absolute; left: 50%; top: -26px; width: 0; height: 0; }
.gift-bow::before, .gift-bow::after {
  content: "";
  position: absolute;
  top: 0;
  width: 34px;
  height: 26px;
  border: 7px solid var(--gold-light);
  border-radius: 50% 50% 10% 50%;
}
.gift-bow::before { right: 0; transform: rotate(-18deg); }
.gift-bow::after { left: 0; transform: scaleX(-1) rotate(-18deg); }
.gift.open { animation: none; }
.gift.open .gift-lid { transform: translate(40px, -120px) rotate(35deg); }

/* ---------- 1: KitKat ---------- */

.kitkat {
  position: relative;
  width: 235px;
  min-height: 165px;
  margin: 30px 0 18px;
  padding: 15px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(160deg, #c8403b, #a92f2b);
  transform: rotate(-7deg);
  box-shadow: 5px 8px #8f2924;
  transition: transform .3s;
}
.kitkat:active { transform: rotate(-7deg) scale(.97); }
.wrapper {
  display: block;
  color: #fff6e7;
  font-family: Georgia, serif;
  font-size: 37px;
  font-style: italic;
  font-weight: 700;
  line-height: 1.2;
}
.choc-bars {
  display: flex;
  justify-content: center;
  gap: 5px;
  height: 57px;
  margin: 12px 0 3px;
  padding-top: 4px;
  background: linear-gradient(180deg, #e5e5e5, #b9b9b9 30%, transparent 30%);
  border-radius: 4px;
}
.choc-bars i {
  display: block;
  width: 39px;
  background: linear-gradient(90deg, #6d3720, #8a4a2c 50%, #6d3720);
  border: 3px outset #9b6243;
  border-radius: 3px;
  transition: transform .45s cubic-bezier(.3, 1.6, .5, 1);
}
.snapped .choc-bars i:nth-child(2n) { transform: translateY(18px) rotate(10deg); }
.snapped .choc-bars i:nth-child(3) { transform: translateY(-4px) rotate(-4deg); }

.crumb {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: #6d3720;
  pointer-events: none;
  animation: crumb .8s ease-out forwards;
}

/* ---------- 2: Heart ---------- */

.heart-stage { position: relative; }
.heart-button {
  position: relative;
  width: 178px;
  height: 178px;
  margin: 22px 0 12px;
  border: 1px solid #e3cf98;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff4cf, #f2dea6 70%);
  font-size: 72px;
  transition: transform .4s;
  box-shadow: 0 8px #dac793, 0 0 0 10px #f6ead0;
  animation: heartbeat 1.6s ease-in-out infinite;
}
.heart-button span { display: block; color: #795d35; font-size: 12px; }
.heart-button.opened { animation: none; transform: rotate(-5deg) scale(1.03); }
.float-heart {
  position: absolute;
  left: 50%;
  top: 45%;
  color: var(--red);
  font-size: 22px;
  pointer-events: none;
  animation: float-up 1.4s ease-out forwards;
}

/* ---------- 3: Leave application card ---------- */

.leave-card {
  position: relative;
  width: 100%;
  margin: 6px 0 4px;
  padding: 14px 14px 16px;
  text-align: left;
  background: linear-gradient(transparent 31px, #ead9c5 32px) 0 0 / 100% 32px, var(--paper);
  border: 1px solid #e0cbb0;
  border-radius: 10px;
  box-shadow: 0 6px 16px #6b4a3518;
  transform: rotate(-1.5deg);
}
.leave-card.shake { animation: shake .35s ease-in-out; }
.leave-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.leave-head b { font-family: var(--serif); font-size: 20px; font-weight: 400; color: var(--maroon); }
.leave-head small { color: var(--muted); font-size: 9px; letter-spacing: 1.5px; }
.leave-body { display: flex; gap: 14px; align-items: flex-start; }

.id-photo {
  position: relative;
  flex-shrink: 0;
  width: 92px;
  height: 116px;
  padding: 5px 5px 16px;
  background: #fff;
  box-shadow: 0 3px 8px #00000022;
  transform: rotate(-3deg);
}
.id-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.id-photo::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 14px;
  width: 12px;
  height: 34px;
  border: 2.5px solid #9aa3a8;
  border-radius: 8px;
  z-index: 1;
}

.leave-fields { margin: 0; flex: 1; font-size: 13px; }
.leave-fields div { display: flex; gap: 8px; padding: 3px 0; border-bottom: 1px dotted #d9c5ab; }
.leave-fields dt { width: 40px; flex-shrink: 0; color: var(--muted); }
.leave-fields dd { margin: 0; font-family: var(--hand); font-size: 15px; }

.stamp {
  position: absolute;
  right: 10px;
  bottom: 12px;
  padding: 6px 12px 4px;
  border: 3px double #2f7a3e;
  border-radius: 8px;
  color: #2f7a3e;
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.1;
  text-align: center;
  opacity: 0;
  transform: rotate(-14deg) scale(2.4);
  pointer-events: none;
  mix-blend-mode: multiply;
}
.stamp small { display: block; font: 700 9px "DM Sans", sans-serif; letter-spacing: 2px; }
.approved-card .stamp { animation: stamp .45s cubic-bezier(.2, 1.4, .5, 1) forwards; }

.approval {
  min-height: 50px;
  margin-top: 4px;
  padding: 12px 24px;
  border: 2px dashed #b27b57;
  border-radius: 10px;
  background: #fcf2dd;
  font-size: 16px;
  transform: rotate(-2deg);
}
.approval.approved { color: #3f6a2c; background: #e3ebcf; border-color: #8a9b73; transform: rotate(2deg); }

/* ---------- 4: Suitcase ---------- */

.case-wrap { position: relative; margin: 34px 0 6px; }
.case {
  position: relative;
  width: 200px;
  height: 132px;
  border-radius: 18px;
  background: linear-gradient(180deg, #c98a52, #a8673a);
  box-shadow: inset 0 -10px 0 #00000016, 0 8px 0 #7d4b28;
}
.case.full { animation: bounce .6s ease; }
.case-handle {
  position: absolute;
  top: -24px;
  left: 70px;
  width: 60px;
  height: 30px;
  border: 7px solid #7d4b28;
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
}
.case-strap { position: absolute; top: 0; bottom: 0; width: 14px; background: #7d4b28; }
.case-strap.l { left: 44px; }
.case-strap.r { right: 44px; }
.case-sticker {
  position: absolute;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--paper);
  font-size: 22px;
  box-shadow: 0 2px 0 #00000022;
  animation: pop-in .4s cubic-bezier(.3, 1.6, .5, 1);
}
.case-stickers { position: absolute; inset: 0; }
.case-sticker:nth-child(1) { left: 8px; top: 14px; rotate: -12deg; }
.case-sticker:nth-child(2) { left: 77px; top: 44px; rotate: 6deg; }
.case-sticker:nth-child(3) { right: 8px; top: 18px; rotate: 14deg; }
.case-count {
  position: absolute;
  right: -16px;
  bottom: -14px;
  padding: 10px 9px;
  border-radius: 50%;
  background: var(--gold-light);
  font: 700 13px "DM Sans", sans-serif;
}

.pack-choices { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin: 8px 0; }
.pack-choices button {
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid #ccb695;
  border-radius: 30px;
  background: var(--paper);
  font-size: 15px;
  transition: transform .2s;
}
.pack-choices button:active { transform: scale(.95); }
.pack-choices button[aria-pressed="true"] { background: #e3ebcf; border-color: #8b9b73; }

/* ---------- 5: Polaroid stack ---------- */

.polaroids {
  --ph: clamp(170px, 34svh, 320px);
  position: relative;
  width: calc(var(--ph) * .8 + 24px);
  height: calc(var(--ph) + 64px);
  margin: 10px 0 4px;
  padding: 0;
  border: 0;
  background: none;
}
.polaroid {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 12px 12px 0;
  background: #fffefa;
  box-shadow: 0 6px 18px #4b322522, 0 1px 2px #4b322533;
  transform: rotate(var(--r));
  transition: transform .45s cubic-bezier(.3, .9, .4, 1), opacity .45s;
}
.polaroid img {
  display: block;
  width: 100%;
  height: var(--ph);
  object-fit: cover;
  background: #eee3d3;
}
.polaroid figcaption {
  padding: 8px 4px 0;
  font-family: var(--hand);
  font-size: 19px;
  color: #4a3530;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.polaroid .tape {
  position: absolute;
  top: -10px;
  left: 50%;
  width: 84px;
  height: 24px;
  background: #f1d78fcc;
  transform: translateX(-50%) rotate(-3deg);
}
.polaroid.fly { transform: translateX(130%) rotate(20deg); opacity: 0; }

.photo-next {
  display: flex;
  flex-shrink: 0;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 54px;
  margin: 18px 0 0;
  padding: 12px 18px;
  border: 2px solid #a96e24;
  border-radius: 14px;
  background: linear-gradient(180deg, #f7d27a, #f0c058);
  color: #492a13;
  font-size: 17px;
  font-weight: 700;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 4px #b67b30;
}
.photo-next span { display: flex; align-items: center; gap: 14px; }
.photo-next b { font-size: 24px; line-height: 1; }
.photo-next small {
  padding: 5px 10px;
  border-radius: 20px;
  background: #fff8df;
  color: #69441c;
  white-space: nowrap;
  font: 700 12px "DM Sans", sans-serif;
}
.photo-next:active { transform: translateY(2px); box-shadow: 0 2px #b67b30; }
.theme-5 .line { margin: 14px 0 4px; font-size: 15px; }

/* ---------- 6: Envelope & letter ---------- */

.envelope {
  position: relative;
  width: 250px;
  height: 160px;
  margin: 44px 0 12px;
  padding: 0;
  border: 0;
  background: none;
  perspective: 600px;
  transform: rotate(-4deg);
}
.env-back, .env-front, .env-flap, .env-letter { position: absolute; left: 0; right: 0; }
.env-back { inset: 0; border-radius: 8px; background: #d9bd92; }
.env-letter { z-index: 1; }
.env-front { z-index: 2; }
.env-letter {
  left: 16px;
  right: 16px;
  top: 14px;
  height: 120px;
  padding-top: 22px;
  border-radius: 4px;
  background: var(--paper);
  font-family: var(--hand);
  font-size: 16px;
  color: var(--red);
  transition: transform .6s ease .25s;
}
.env-front {
  inset: 0;
  border-radius: 8px;
  background: #ead3ad;
  clip-path: polygon(0 0, 50% 55%, 100% 0, 100% 100%, 0 100%);
  box-shadow: inset 0 -6px 0 #00000010;
}
.env-flap {
  top: 0;
  height: 96px;
  background: #e1c79c;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top;
  transition: transform .5s ease;
  z-index: 3;
}
.env-seal {
  position: absolute;
  left: 50%;
  top: 70px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-left: -23px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #d2534b, #8e2a25);
  color: #ffd8cf;
  font-size: 20px;
  box-shadow: 0 2px 4px #00000040;
  transition: opacity .3s, transform .3s;
  animation: pulse-soft 1.8s ease-in-out infinite;
}
.envelope.open .env-seal { opacity: 0; transform: scale(.5); animation: none; }
.envelope.open .env-flap { transform: rotateX(180deg); z-index: 0; }
.envelope.open .env-letter { transform: translateY(-70px); }

.sorry-note {
  width: 100%;
  margin: 12px 0 18px;
  padding: 18px 18px 14px 34px;
  text-align: left;
  background: linear-gradient(90deg, transparent 22px, #e9a6a0 22px 23.5px, transparent 23.5px), linear-gradient(transparent 29px, #e6d8c4 30px) 0 8px / 100% 30px, var(--paper);
  border: 1px solid #dfccb4;
  border-radius: 4px;
  font-family: var(--hand);
  font-size: 18px;
  line-height: 30px;
  box-shadow: 0 6px 16px #6b4a3518;
  transform: rotate(-1deg);
  transform-origin: top;
  animation: unfold .6s ease-out;
}
.sorry-note p { margin: 0 0 12px; }
.sorry-note small { color: var(--muted); font-size: 14px; }

.sorry-choices { display: flex; gap: 10px; width: 100%; }
.sorry-choices button {
  flex: 1;
  min-height: 52px;
  padding: 12px 7px;
  border: 1px solid #ccb79a;
  border-radius: 10px;
  background: #f3e6d2;
  font-size: 13px;
}
.sorry-choices button[aria-pressed="true"] { background: #e3ebcf; border-color: #8b9b73; }

/* ---------- 7: Locket & scratch card ---------- */

.locket {
  position: relative;
  width: 132px;
  height: 132px;
  margin: 14px 0 0;
  padding: 5px;
  border-radius: 50%;
  background: linear-gradient(150deg, #f6dd9b, #c48b2c 40%, #f8e7b2 60%, #b07a22);
  box-shadow: 0 8px 18px #7a4a1a33;
}
.locket img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: 55% 30%; border: 3px solid var(--paper); }
.locket-tulip { position: absolute; right: -14px; bottom: -4px; font-size: 34px; transform: rotate(12deg); }

.dream-art { position: relative; margin: 14px 0 0; font-size: 76px; line-height: 1.1; }
.dream-art span { position: absolute; top: -6px; right: -28px; color: var(--gold); font-size: 34px; animation: twinkle 1.8s ease-in-out infinite; }

.scratch { position: relative; width: 100%; margin-top: 8px; }
.scratch .little-note { margin: 0; animation: none; }
.scratch canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  touch-action: none;
  cursor: grab;
  transition: opacity .6s;
}
.scratch canvas.gone { opacity: 0; pointer-events: none; }

/* ---------- 8: Cake ---------- */

.cake { position: relative; width: 190px; height: 150px; margin: 14px 0 4px; }
.candles { position: absolute; left: 50%; top: 0; display: flex; gap: 22px; transform: translateX(-50%); }
.candle {
  position: relative;
  width: 10px;
  height: 36px;
  margin-top: 22px;
  border-radius: 3px;
  background: repeating-linear-gradient(160deg, #fff 0 5px, #e9a6a0 5px 10px);
}
.flame {
  position: absolute;
  left: 50%;
  top: -22px;
  width: 14px;
  height: 22px;
  margin-left: -7px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(circle at 50% 75%, #fff7c2, #ffc53d 45%, #f07b1a 80%);
  box-shadow: 0 0 14px 4px #ffbf4a88;
  transform-origin: 50% 90%;
  animation: flicker .5s ease-in-out infinite alternate;
  transition: transform .4s, opacity .4s;
}
.blown .flame { transform: scale(0); opacity: 0; animation: none; }
.blown .candle::after {
  content: "";
  position: absolute;
  left: -3px;
  top: -14px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #cfc6bf;
  opacity: 0;
  animation: smoke 1.6s ease-out .2s;
}
.tier { position: absolute; left: 50%; transform: translateX(-50%); border-radius: 10px 10px 6px 6px; }
.tier.top {
  top: 58px;
  width: 120px;
  height: 38px;
  background: radial-gradient(circle at 10px -2px, #fff6ea 9px, transparent 10px) 0 0 / 20px 20px repeat-x, linear-gradient(180deg, #f6c6c0, #eba79f);
}
.tier.bottom {
  top: 92px;
  width: 176px;
  height: 46px;
  background: radial-gradient(circle at 11px -2px, #fff6ea 10px, transparent 11px) 0 0 / 22px 22px repeat-x, linear-gradient(180deg, #c8584f, #a8403a);
}
.tier.bottom::after {
  content: "• • • • • • •";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  color: var(--gold-light);
  font-size: 12px;
  letter-spacing: 3px;
}
.plate { position: absolute; left: 50%; bottom: 0; width: 200px; height: 14px; border-radius: 50%; background: #e2d2bd; transform: translateX(-50%); }

.promise-line { margin: 4px 0 0; font-family: var(--serif); font-size: 30px; line-height: 1.6; }
.promise-line em { color: var(--red); font-style: normal; }
.theme-8 .eyebrow { margin-bottom: 4px; }

/* ---------- Confetti ---------- */

.confetti { position: absolute; inset: 0; z-index: 15; overflow: hidden; pointer-events: none; }
.confetti i {
  position: absolute;
  top: -30px;
  font-style: normal;
  animation: fall var(--d, 2.8s) ease-in forwards;
}
.confetti i.petal { width: 12px; height: 17px; border-radius: 50% 50% 50% 0; background: var(--c); }

/* ---------- Animations ---------- */

@keyframes arrive-right { from { opacity: .3; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes arrive-left { from { opacity: .3; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
@keyframes pop-in { from { opacity: 0; transform: scale(.85); } to { opacity: 1; } }
@keyframes fall { to { transform: translate(var(--x, 0), 108svh) rotate(var(--rot, 340deg)); } }
@keyframes drift {
  0% { transform: translate(0, -20px) rotate(0); }
  50% { transform: translate(28px, 50svh) rotate(160deg); }
  100% { transform: translate(-10px, 105svh) rotate(320deg); }
}
@keyframes shine { 0%, 55% { left: -60%; } 100% { left: 130%; } }
@keyframes wiggle { 0%, 70%, 100% { transform: rotate(0); } 76% { transform: rotate(-6deg); } 84% { transform: rotate(5deg); } 92% { transform: rotate(-3deg); } }
@keyframes heartbeat { 0%, 100% { transform: scale(1); } 14% { transform: scale(1.06); } 28% { transform: scale(1); } 42% { transform: scale(1.05); } }
@keyframes float-up { from { opacity: 1; transform: translate(-50%, 0) scale(.6); } to { opacity: 0; transform: translate(calc(-50% + var(--x)), -150px) scale(1.2); } }
@keyframes crumb { to { opacity: 0; transform: translate(var(--x), var(--y)) rotate(200deg); } }
@keyframes stamp { to { opacity: .9; transform: rotate(-14deg) scale(1); } }
@keyframes shake { 0%, 100% { transform: rotate(-1.5deg); } 25% { transform: rotate(-1.5deg) translate(-4px, 2px); } 75% { transform: rotate(-1.5deg) translate(4px, -2px); } }
@keyframes bounce { 0%, 100% { transform: none; } 30% { transform: translateY(-14px) rotate(-3deg); } 60% { transform: translateY(0) rotate(2deg); } }
@keyframes unfold { from { opacity: 0; transform: rotate(-1deg) scaleY(.4); } to { opacity: 1; transform: rotate(-1deg); } }
@keyframes flicker { from { transform: rotate(-3deg) scaleY(1); } to { transform: rotate(3deg) scaleY(1.12); } }
@keyframes smoke { 0% { opacity: .7; transform: translateY(0) scale(.5); } 100% { opacity: 0; transform: translateY(-40px) scale(1.6); } }
@keyframes twinkle { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.8); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@keyframes pulse-soft { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }

/* ---------- Short screens ---------- */

@media (max-height: 740px) {
  .phone-header { height: 54px; padding-top: 10px; }
  .slide { padding-top: 12px; }
  .slide h1 { margin-bottom: 4px; font-size: 28px; }
  .line { margin: 10px 0 8px; font-size: 14px; }
  .jharokha { width: 62%; }
  .jh-arch { height: 26svh; min-height: 160px; }
  .kitkat { min-height: 140px; margin: 20px 0 10px; }
  .heart-button { width: 150px; height: 150px; margin: 16px 0 8px; font-size: 58px; }
  .little-note { margin-top: 10px; padding: 12px; font-size: 16px; }
  .id-photo { width: 78px; height: 98px; }
  .leave-head { margin-bottom: 6px; }
  .case-wrap { margin-top: 28px; transform: scale(.85); }
  .polaroids { --ph: 27svh; }
  .photo-next { min-height: 48px; margin-top: 12px; font-size: 16px; }
  .envelope { margin: 36px 0 8px; transform: rotate(-4deg) scale(.9); }
  .sorry-note { margin: 8px 0 12px; padding: 12px 14px 10px 32px; font-size: 16px; line-height: 27px; }
  .dream-art { font-size: 58px; }
  .locket { width: 104px; height: 104px; margin-top: 8px; }
  .handwritten { margin-top: 12px; font-size: 18px; }
  .cake { transform: scale(.82); margin: 0 0 -14px; }
  .promise-line { font-size: 26px; }
  .phone-footer { padding-top: 10px; }
  .footer-meta { margin-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after { transition: none !important; animation: none !important; }
  .petals, .confetti { display: none; }
  .approved-card .stamp { opacity: .9; transform: rotate(-14deg); }
}
