:root {
  --ink: #5a3f4f;
  --ink-soft: #8f7585;
  --rose: #ee93ad;
  --rose-deep: #d8688b;
  --pink: #ffd9e3;
  --lilac: #dccbff;
  --mint: #c9efdc;
  --sky: #d3e8ff;
  --butter: #fff0b3;
  --peach: #ffdcc8;
  --paper: #fffdfa;
  --glass: rgba(255, 255, 255, 0.72);
  --shadow: 0 14px 34px -14px rgba(160, 80, 115, 0.38);
  --shadow-sm: 0 6px 16px -8px rgba(160, 80, 115, 0.4);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.3, 1.4, 0.5, 1);
  --display: "Fraunces", Georgia, serif;
  --body: "Quicksand", system-ui, -apple-system, sans-serif;
  --hand: "Caveat", "Segoe Print", cursive;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100svh;
  overflow-x: hidden;
  background: #fff6f8;
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; -webkit-user-select: none; user-select: none; }
button:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--rose); outline-offset: 3px; }
img { -webkit-user-drag: none; }
[hidden] { display: none !important; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Background ---------- */
.bg {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background: linear-gradient(170deg, #fff4f7 0%, #fbf0ff 45%, #eef6ff 100%);
}
.blob {
  position: absolute; border-radius: 50%; filter: blur(50px); opacity: 0.55;
  animation: drift 18s ease-in-out infinite alternate;
}
.b1 { width: 60vmax; height: 60vmax; background: #ffd6e2; top: -20vmax; left: -15vmax; }
.b2 { width: 50vmax; height: 50vmax; background: #e2d4ff; top: 30%; right: -20vmax; animation-delay: -6s; }
.b3 { width: 45vmax; height: 45vmax; background: #d2f1e3; bottom: -18vmax; left: -10vmax; animation-delay: -12s; }
.b4 { width: 30vmax; height: 30vmax; background: #fff0bf; top: 55%; left: 30%; animation-delay: -3s; opacity: 0.4; }
@keyframes drift { to { transform: translate(6vmax, -5vmax) scale(1.12); } }
.sparkles span {
  position: absolute; color: #fff; font-size: 12px; opacity: 0;
  text-shadow: 0 0 6px rgba(255, 190, 210, 0.9);
  animation: twinkle 4s ease-in-out infinite;
}
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(0.4); } 50% { opacity: 0.9; transform: scale(1); } }

/* ---------- Shared ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 12px 24px; border: 0; border-radius: 999px;
  background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm); font-weight: 700; font-size: 1rem; letter-spacing: 0.01em;
  transition: transform 0.25s var(--spring), box-shadow 0.25s;
}
.btn:active { transform: scale(0.95); }
.btn svg { width: 20px; height: 20px; fill: currentColor; }
.btn-primary { background: linear-gradient(135deg, #ffa9c1, #e57b9c); color: #fff; box-shadow: 0 12px 26px -12px rgba(216, 104, 139, 0.8); }
.round {
  display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 50%;
  background: var(--glass); box-shadow: var(--shadow-sm); transition: transform 0.2s var(--spring), opacity 0.2s;
}
.round:active { transform: scale(0.9); }
.round:disabled { opacity: 0.35; pointer-events: none; }
.round svg { width: 22px; height: 22px; }
.hint { margin: 0; font-size: 0.9rem; color: var(--ink-soft); }
.eyebrow { margin: 0; font-family: var(--hand); font-size: 1.6rem; color: var(--rose-deep); line-height: 1; }
.fade-swap { transition: opacity 0.22s, transform 0.22s; }
.fade-swap.out { opacity: 0; transform: translateY(6px); }

/* ---------- Hero / cake ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: max(28px, env(safe-area-inset-top)) 16px 40px; text-align: center; overflow: hidden;
}
.chip {
  margin: 0; padding: 7px 16px; border-radius: 999px; background: var(--glass); box-shadow: var(--shadow-sm);
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--rose-deep);
  animation: rise 0.9s var(--ease) both;
}
.hero h1 {
  margin: 4px 0 0; font-family: var(--display); font-weight: 400; font-size: clamp(2.1rem, 9.5vw, 4.2rem);
  line-height: 1.02; letter-spacing: -0.01em; animation: rise 0.9s 0.1s var(--ease) both;
}
.hero h1 em { display: block; font-style: italic; font-weight: 500; color: var(--rose-deep); }
.hero h1 .age { display: block; font-family: var(--hand); font-size: 0.5em; color: var(--ink-soft); font-style: normal; margin-top: 4px; }
.hero-sub { margin: 0; max-width: 30ch; min-height: 3em; font-size: 1.05rem; color: var(--ink-soft); animation: rise 0.9s 0.2s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

.cake-zone {
  position: relative; width: min(84vw, 390px); aspect-ratio: 320 / 330; margin: 0 auto;
  touch-action: manipulation; animation: rise 1s 0.3s var(--ease) both;
}
.cake-zone.has-toppers { margin-top: calc(min(84vw, 390px) * 0.19); }
.hero[data-mode="slice"] .cake-zone { touch-action: none; cursor: grab; }
.plate, .cake-stack, .piece, .piece svg, .trail { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.trail { pointer-events: none; z-index: 3; }
.trail polyline { fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 6px rgba(238, 147, 173, 0.9)); transition: opacity 0.4s; }
.piece { transition: transform 0.9s var(--ease), opacity 0.6s; transform-origin: 50% 85%; }
.cake-stack.split .p-left { transform: translateX(-6%) rotate(-3deg); }
.cake-stack.split .p-right { transform: translateX(6%) rotate(3deg); }
.cake-stack.split .p-slice { transform: translateY(5%) scale(1.04); }
.cake-stack.served .p-slice { transform: translateY(20%) scale(1.4); opacity: 0; transition-duration: 1.1s, 0.9s; }
.cake-stack.served .p-left { transform: translateX(-3%) rotate(-1.5deg); }
.cake-stack.served .p-right { transform: translateX(3%) rotate(1.5deg); }

.cake-name { font-family: var(--hand); font-weight: 700; fill: #fff; stroke: #e98aa6; stroke-width: 3px; paint-order: stroke; }
.topper { animation: topperSway 5s ease-in-out var(--d, 0s) infinite alternate; }
.topper-card { filter: drop-shadow(0 2px 3px rgba(150, 90, 115, 0.28)); }
.toppers { transition: transform 0.5s var(--ease), opacity 0.5s; }
.toppers.lift { transform: translateY(-40px); opacity: 0; }
@keyframes topperSway { from { transform: rotate(-1.6deg); } to { transform: rotate(1.6deg); } }
@media (prefers-reduced-motion: reduce) { .topper { animation: none; } }
.candle { cursor: pointer; outline: none; }
.candle:focus-visible .wax { stroke: var(--rose-deep); stroke-width: 2; }
.glow { pointer-events: none; animation: glow 1.6s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
@keyframes glow { to { opacity: 0.7; transform: scale(0.9); } }
.flame-wrap { transform-box: fill-box; transform-origin: 50% 100%; transition: opacity 0.35s, transform 0.35s var(--ease); }
.flame-lean { transform-box: fill-box; transform-origin: 50% 100%; transform: skewX(calc(var(--lean, 0) * -22deg)) scaleY(calc(1 - var(--lean, 0) * 0.3)); transition: transform 0.12s; }
.flame { transform-box: fill-box; transform-origin: 50% 100%; animation: flicker 0.18s ease-in-out infinite alternate; }
.candle:nth-child(2n) .flame { animation-duration: 0.23s; animation-delay: -0.1s; }
.candle:nth-child(3n) .flame { animation-duration: 0.2s; }
@keyframes flicker { from { transform: scale(1, 1) rotate(-2deg); } to { transform: scale(0.94, 1.07) rotate(2deg); } }
.candle.out .flame-wrap { opacity: 0; transform: scale(0.15) translateY(-6px); }
.smoke circle { fill: #d9cfd6; opacity: 0; transform-box: fill-box; transform-origin: center; animation: smoke 1.8s ease-out forwards; }
.smoke circle:nth-child(2) { animation-delay: 0.15s; }
.smoke circle:nth-child(3) { animation-delay: 0.3s; }
@keyframes smoke {
  0% { opacity: 0.8; transform: translate(0, 0) scale(0.6); }
  100% { opacity: 0; transform: translate(var(--sx, 6px), -46px) scale(2.4); }
}

.knife {
  position: absolute; z-index: 4; left: 0; top: 0; width: 34px; height: 100px; pointer-events: none;
  opacity: 0; transform: translate(-50%, -100%) rotate(8deg); transition: opacity 0.3s;
  filter: drop-shadow(0 6px 8px rgba(120, 60, 90, 0.25));
}
.knife svg { width: 100%; height: 100%; transform: rotate(180deg); }
.hero[data-mode="slice"] .knife.idle { opacity: 1; left: 62%; top: 22%; animation: knifeHint 1.8s var(--ease) infinite; }
.knife.active { opacity: 1; transition: none; }
@keyframes knifeHint { 0%, 15% { transform: translate(-50%, -100%) rotate(8deg); } 60% { transform: translate(-50%, 45%) rotate(8deg); opacity: 1; } 75%, 100% { transform: translate(-50%, 45%) rotate(8deg); opacity: 0; } }

.hero-actions { display: flex; flex-direction: column; align-items: center; gap: 10px; min-height: 92px; animation: rise 1s 0.4s var(--ease) both; }
.btn-mic { color: var(--rose-deep); }
.btn-mic .mic-ring {
  position: absolute; inset: -4px; border-radius: inherit; border: 3px solid var(--rose); opacity: 0;
  transform: scale(calc(1 + var(--level, 0) * 0.18)); transition: transform 0.08s, opacity 0.3s;
}
.btn-mic.listening { background: #fff; }
.btn-mic.listening .mic-ring { opacity: 0.8; }
.hero:not([data-mode="blow"]) .btn-mic { display: none; }

.scroll-cue {
  position: absolute; bottom: max(18px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 2px; border: 0; background: none;
  color: var(--rose-deep); font-weight: 700; font-size: 0.85rem; animation: bob 1.6s ease-in-out infinite;
}
.scroll-cue svg { width: 26px; height: 26px; }
@keyframes bob { 50% { transform: translate(-50%, 6px); } }

/* ---------- Sections ---------- */
.section { position: relative; max-width: 1040px; margin: 0 auto; padding: 80px 16px 64px; }
.section-head { text-align: center; margin: 0 auto 30px; max-width: 34rem; }
.section-head h2 { margin: 6px 0 8px; font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 8vw, 3.2rem); line-height: 1.08; }
.lede { margin: 0; color: var(--ink-soft); }
.next-wrap { display: flex; justify-content: center; margin-top: 30px; }

/* ---------- Scrapbook ---------- */
.gallery { overflow: hidden; }
.scrapbook { display: flex; align-items: flex-start; gap: 16px; padding: 10px 2px; }
.scrapbook .col { flex: 1; min-width: 0; }
.scrapbook .col:nth-child(2) { padding-top: 36px; }
@media (min-width: 720px) { .scrapbook { gap: 28px; } }
.polaroid {
  position: relative; display: block; width: 100%; margin: 0 0 22px; padding: 8px 8px 0;
  border: 0; border-radius: 3px; background: var(--paper); box-shadow: var(--shadow);
  text-align: center; cursor: zoom-in;
  transform: rotate(var(--r, 0deg)); opacity: 0; translate: 0 34px;
  transition: opacity 0.8s var(--ease), translate 0.8s var(--ease), transform 0.35s var(--spring), box-shadow 0.3s;
}
.polaroid.in { opacity: 1; translate: 0 0; }
.polaroid:hover, .polaroid:focus-visible { transform: rotate(0deg) scale(1.03); box-shadow: 0 20px 40px -16px rgba(160, 80, 115, 0.5); z-index: 2; }
.polaroid:active { transform: rotate(0deg) scale(0.98); }
.polaroid .ph { display: block; overflow: hidden; border-radius: 2px; background: #f8eef2; }
.polaroid img { display: block; width: 100%; height: auto; }
.polaroid .cap { display: block; padding: 10px 4px 4px; font-family: var(--hand); font-size: 1.28rem; line-height: 1.1; color: var(--ink); }
.polaroid .date { display: block; padding-bottom: 10px; font-size: 0.72rem; color: var(--ink-soft); letter-spacing: 0.05em; }
.polaroid .cap:last-child { padding-bottom: 14px; }
.tape {
  position: absolute; z-index: 2; top: -11px; left: 50%; width: 70px; height: 22px;
  transform: translateX(-50%) rotate(var(--tr, -4deg)); opacity: 0.85;
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.45) 0 6px, transparent 6px 12px), var(--tc, #ffc9d8);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}
.tape.t1 { --tc: #d9cbff; } .tape.t2 { --tc: #bfeed7; } .tape.t3 { --tc: #ffe7a6; }
.tape.corner { top: -8px; left: -14px; width: 54px; transform: rotate(-38deg); }
.sticker { position: absolute; z-index: 2; right: -10px; bottom: 34px; font-size: 1.9rem; transform: rotate(14deg); filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.12)); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  padding: max(64px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  background: rgba(255, 238, 244, 0.88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  opacity: 0; transition: opacity 0.3s;
}
.lightbox.open { opacity: 1; }
.lb-card {
  margin: 0; padding: 12px 12px 0; max-width: min(92vw, 560px); border-radius: 4px; background: var(--paper); box-shadow: var(--shadow);
  transform: scale(0.9) rotate(-2deg); transition: transform 0.45s var(--spring), opacity 0.2s; touch-action: pan-y;
}
.lightbox.open .lb-card { transform: scale(1) rotate(-1deg); }
.lb-card.swap { opacity: 0; }
.lb-card img { display: block; width: 100%; max-height: 62svh; object-fit: contain; background: #f8eef2; }
.lb-card figcaption { padding: 12px 8px 18px; font-family: var(--hand); font-size: 1.7rem; line-height: 1.1; text-align: center; }
.lb-close { position: absolute; top: max(14px, env(safe-area-inset-top)); right: 14px; }
.lb-nav { display: flex; align-items: center; gap: 18px; font-weight: 700; color: var(--ink-soft); }

/* ---------- Journey ---------- */
.track { position: relative; height: 84px; margin: 0 34px 6px; --p: 0; }
.track-line { position: absolute; left: 0; right: 0; top: 40px; height: 4px; border-radius: 4px; background: rgba(238, 147, 173, 0.22); overflow: hidden; }
.track-fill { width: calc(var(--p) * 100%); height: 100%; background: linear-gradient(90deg, var(--lilac), var(--rose)); }
.stop {
  position: absolute; top: 42px; left: calc(var(--x) * 100%); width: 44px; height: 44px; padding: 0;
  display: grid; place-items: center; border: 2px solid var(--pink); border-radius: 50%; background: #fff;
  font-size: 1.2rem; transform: translate(-50%, -50%); transition: transform 0.3s var(--spring), border-color 0.3s, box-shadow 0.3s;
}
.stop.active { border-color: var(--rose); box-shadow: 0 0 0 6px rgba(238, 147, 173, 0.18); transform: translate(-50%, -50%) scale(1.12); }
.stop .lbl { position: absolute; top: 48px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 0.72rem; font-weight: 700; color: var(--ink-soft); }
.stop.active .lbl { color: var(--rose-deep); }
.traveller { position: absolute; top: 2px; left: calc(var(--p) * 100%); transform: translateX(-50%); color: var(--rose-deep); font-size: 1.3rem; animation: hop 1.2s ease-in-out infinite; }
@keyframes hop { 50% { translate: 0 -5px; } }

.stages {
  position: relative; display: flex; gap: 14px; margin: 0 -16px; padding: 22px 7vw 26px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
  outline: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.stages::-webkit-scrollbar { display: none; }
@media (min-width: 720px) {
  .stages { margin: 0; padding-inline: calc(50% - 260px); gap: 24px; }
}
.stage {
  flex: 0 0 86vw; max-width: 520px; scroll-snap-align: center; padding: 22px 20px 26px;
  border-radius: 30px; background: rgba(255, 255, 255, 0.78); box-shadow: var(--shadow);
  transform: scale(var(--s, 1)); opacity: var(--o, 1);
}
@media (min-width: 720px) { .stage { flex-basis: 520px; padding: 28px 30px 32px; } }
.stage-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.era { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--pink); font-size: 0.82rem; font-weight: 700; color: var(--rose-deep); }
.stage:nth-child(3n+2) .era { background: var(--lilac); color: #7a5cc0; }
.stage:nth-child(3n) .era { background: var(--mint); color: #3e8a69; }
.when { font-family: var(--hand); font-size: 1.25rem; color: var(--ink-soft); }
.stack { position: relative; display: block; width: min(62vw, 220px); aspect-ratio: 4 / 4.9; margin: 26px auto 22px; padding: 0; border: 0; background: none; }
.snap {
  position: absolute; inset: 0; padding: 7px 7px 28px; border-radius: 3px; background: var(--paper); box-shadow: var(--shadow-sm);
  transform: translate(var(--tx, 0), var(--ty, 0)) rotate(var(--r, 0deg)); transition: transform 0.5s var(--spring), opacity 0.3s;
}
.snap img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 2px; background: #f8eef2; }
.snap.fling { transform: translate(115%, -8%) rotate(22deg); opacity: 0; transition: transform 0.32s ease-in, opacity 0.32s; }
.stage h3 { margin: 0 0 8px; font-family: var(--display); font-weight: 500; font-size: 1.45rem; line-height: 1.2; }
.stage .note { margin: 0; line-height: 1.65; color: var(--ink-soft); }
.stage-nav { display: flex; align-items: center; justify-content: center; gap: 18px; font-weight: 700; color: var(--ink-soft); }

/* ---------- Finale ---------- */
.finale {
  position: relative; min-height: 100svh; display: grid; place-items: center; padding: 70px 16px 120px; text-align: center;
  background: radial-gradient(ellipse at 50% 35%, rgba(255, 214, 226, 0.75), transparent 65%);
}
.finale-inner { width: 100%; max-width: 580px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.big-heart {
  width: 160px; height: 150px; margin: 18px 0 4px; padding: 0; border: 0; background: none;
  filter: drop-shadow(0 16px 26px rgba(216, 104, 139, 0.45)); animation: beat 1.3s ease-in-out infinite;
  transition: width 0.8s var(--ease), height 0.8s var(--ease), margin 0.8s var(--ease);
}
.big-heart svg { width: 100%; height: 100%; }
@keyframes beat { 0%, 100% { scale: 1; } 14% { scale: 1.13; } 28% { scale: 0.97; } 42% { scale: 1.08; } 60% { scale: 1; } }
.finale.opened .big-heart { width: 64px; height: 60px; margin: 0; pointer-events: none; }
.finale.opened #fHint { display: none; }
.letter {
  position: relative; width: 100%; padding: 34px 26px 30px; border-radius: 6px; text-align: left;
  background:
    repeating-linear-gradient(180deg, transparent 0 35px, rgba(238, 147, 173, 0.18) 35px 36px),
    var(--paper);
  background-position: 0 22px; box-shadow: var(--shadow); font-family: var(--hand); font-size: 1.55rem; line-height: 36px;
  animation: letterIn 0.9s var(--ease) both;
}
.letter::before { content: ""; position: absolute; top: -12px; left: 50%; width: 90px; height: 24px; transform: translateX(-50%) rotate(-3deg); background: repeating-linear-gradient(45deg, rgba(255,255,255,.45) 0 6px, transparent 6px 12px), #ffc9d8; opacity: 0.9; }
@keyframes letterIn { from { opacity: 0; transform: translateY(40px) scale(0.96); } }
.letter h3 { margin: 0 0 8px; font-family: var(--hand); font-weight: 700; font-size: 2.1rem; color: var(--rose-deep); }
.letter p { margin: 0 0 18px; }
.letter > * { animation: rise 0.9s var(--ease) both; animation-delay: calc(0.4s + var(--i, 0) * 0.55s); }
.letter .sig { margin: 0; font-weight: 700; font-size: 2rem; color: var(--rose-deep); }
.letter .signoff { margin-bottom: 0; }
.finale-end { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-top: 12px; animation: rise 1s var(--ease) both; }
.ending { margin: 0; font-family: var(--display); font-style: italic; font-size: clamp(1.9rem, 8vw, 2.8rem); line-height: 1.1; color: var(--rose-deep); }

/* ---------- Player ---------- */
.player {
  position: fixed; z-index: 50; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 8px; padding: 6px 7px 6px 6px; max-width: calc(100vw - 24px);
  border-radius: 999px; background: rgba(255, 255, 255, 0.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow); transform: translateY(160%); transition: transform 0.7s var(--spring);
}
.player.show { transform: none; }
.disc {
  flex: none; position: relative; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%;
  background: radial-gradient(circle, #fff 0 4px, #f4a7bd 4px 11px, #3d2d36 11px 12px, #4a3843 12px 15px, #3d2d36 15px 16px, #4a3843 16px);
  animation: spin 3.2s linear infinite paused;
}
.disc span { position: absolute; inset: 0; border-radius: 50%; background: linear-gradient(135deg, rgba(255,255,255,.25), transparent 50%); }
.player.playing .disc { animation-play-state: running; }
@keyframes spin { to { transform: rotate(360deg); } }
.meta { display: flex; flex-direction: column; min-width: 0; width: 118px; line-height: 1.2; text-align: left; }
.meta .t { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 700; font-size: 0.84rem; }
.meta .a { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 0.72rem; color: var(--ink-soft); }
.pbtn { flex: none; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: linear-gradient(135deg, #ffb3c8, #e98aa6); color: #fff; transition: transform 0.2s var(--spring); }
.pbtn:active { transform: scale(0.88); }
.pbtn svg { width: 20px; height: 20px; fill: currentColor; }
.pbtn.ghost { background: var(--pink); color: var(--rose-deep); }
.pbtn .i-pause, .player.playing .pbtn .i-play { display: none; }
.player.playing .pbtn .i-pause { display: block; }
.player.nudge .pbtn:not(.ghost) { animation: nudge 1s ease-in-out infinite; }
@keyframes nudge { 50% { box-shadow: 0 0 0 8px rgba(238, 147, 173, 0.3); } }
.playlist {
  position: absolute; right: 0; bottom: calc(100% + 10px); width: min(300px, calc(100vw - 24px)); padding: 14px 10px 10px;
  border-radius: 22px; background: #fff; box-shadow: var(--shadow); transform-origin: 90% 100%; animation: pop 0.35s var(--spring);
}
@keyframes pop { from { opacity: 0; transform: scale(0.85) translateY(10px); } }
.pl-title { margin: 0 8px 8px; font-family: var(--hand); font-size: 1.4rem; color: var(--rose-deep); }
.playlist ul { margin: 0; padding: 0; list-style: none; }
.playlist li button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border: 0; border-radius: 14px; background: none; text-align: left; }
.playlist li button:hover { background: #fff3f6; }
.playlist li button.active { background: var(--pink); }
.pl-num { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #fff; font-size: 0.8rem; font-weight: 700; color: var(--rose-deep); box-shadow: var(--shadow-sm); }
.pl-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.pl-meta b { font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-meta small { font-size: 0.75rem; color: var(--ink-soft); }
.eq { display: none; gap: 2px; align-items: flex-end; height: 14px; margin-left: auto; }
.player.playing .active .eq { display: flex; }
.eq i { width: 3px; background: var(--rose-deep); border-radius: 2px; animation: eq 0.8s ease-in-out infinite alternate; }
.eq i:nth-child(2) { animation-delay: -0.3s; } .eq i:nth-child(3) { animation-delay: -0.55s; }
@keyframes eq { from { height: 3px; } to { height: 14px; } }

/* ---------- Portal, fx, toast ---------- */
.portal {
  position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; pointer-events: none; visibility: hidden;
  background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), #fff 0, #ffe2eb 35%, #eadcff 80%);
  clip-path: circle(0 at var(--x, 50%) var(--y, 50%)); transition: clip-path 1s cubic-bezier(0.7, 0, 0.2, 1), opacity 0.7s;
}
.portal span { font-size: 64px; color: var(--rose-deep); opacity: 0; transform: scale(0.4); transition: opacity 0.5s 0.4s, transform 0.8s 0.4s var(--spring); }
.portal.open { visibility: visible; pointer-events: auto; clip-path: circle(150vmax at var(--x, 50%) var(--y, 50%)); }
.portal.open span { opacity: 1; transform: scale(1); }
.portal.fade { opacity: 0; }
.fx { position: fixed; inset: 0; z-index: 80; width: 100%; height: 100%; pointer-events: none; }
.toast {
  position: fixed; z-index: 90; top: max(14px, env(safe-area-inset-top)); left: 50%; max-width: calc(100vw - 32px);
  padding: 12px 18px; border-radius: 18px; background: #fff; box-shadow: var(--shadow); font-weight: 600; font-size: 0.9rem; text-align: center;
  transform: translate(-50%, calc(-100% - 40px)); transition: transform 0.45s var(--spring);
}
.toast.show { transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .blob, .sparkles span, .flame, .glow, .traveller, .scroll-cue, .disc, .eq i, .big-heart { animation: none !important; }
  .polaroid { translate: 0 0; opacity: 1; }
}
