:root {
  --nelson-pink: #f2709c;
  --nelson-peach: #ff9472;
  --piggy-rose: #ee9ca7;
  --piggy-blush: #ffdde1;
  --rosewood: #8e2c4f;
  --rosewood-soft: #b0506f;
  --nelson: linear-gradient(135deg, var(--nelson-pink), var(--nelson-peach));
  --nelson-rev: linear-gradient(135deg, var(--nelson-peach), var(--nelson-pink));
  --glow: 0 14px 34px -10px rgba(242, 112, 156, 0.65);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --cursive: "Dancing Script", cursive;
  --sans: Poppins, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0; min-height: 100%; }
/* app-like feel on phones: no double-tap zoom, no text-size jumps on rotate */
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  color: var(--rosewood);
  background: linear-gradient(180deg, var(--piggy-blush), #ffe9ec 55%, rgba(238, 156, 167, .85));
  background-attachment: fixed;
  overflow-x: hidden;
}

#bg, #burst { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#bg { z-index: 0; }
#burst { z-index: 50; }

main {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  padding: max(16px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
}

button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }
canvas { display: block; }

/* ---------- screens & phases ---------- */

.screen { display: none; max-width: 520px; margin: 0 auto; }
.screen.active { display: block; animation: screen-in .55s var(--spring) backwards; }
#home.active { max-width: 1000px; animation-name: home-in; }
@keyframes screen-in { from { opacity: 0; transform: translateX(14%) scale(.92); } }
@keyframes home-in { from { opacity: 0; transform: scale(1.06); } }

.phase { display: none; }
.phase.show { display: block; animation: phase-in .45s var(--spring) backwards; }
@keyframes phase-in { from { opacity: 0; transform: scale(.88); } }

/* staggered entrance; restarts every time an ancestor becomes visible */
.reveal { animation: rise .8s var(--spring) backwards; animation-delay: var(--d, 0s); }
.reveal.from-left { animation-name: from-left; }
.reveal.from-right { animation-name: from-right; }
@keyframes rise { from { opacity: 0; transform: translateY(40px) scale(.85); } }
@keyframes from-left { from { opacity: 0; transform: translateX(-80px) scale(.9); } }
@keyframes from-right { from { opacity: 0; transform: translateX(80px) scale(.9); } }

/* ---------- home ---------- */

#home { text-align: center; padding-top: 4px; }

.header-art { position: relative; width: 170px; height: 170px; margin: 0 auto; }
.header-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.header-art .icon { inset: 25px; width: 120px; height: 120px; }

.title {
  margin: 0;
  font: 700 clamp(48px, 12vw, 76px)/1.1 var(--cursive);
  background: linear-gradient(90deg, var(--nelson-pink), var(--nelson-peach), #e8457a, var(--nelson-pink));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 10px rgba(242, 112, 156, .25));
  animation: rise .8s var(--spring) backwards, title-shift 6s linear infinite alternate;
  animation-delay: var(--d), 0s;
}
@keyframes title-shift { to { background-position: 100% 0; } }

.typewriter { margin: 6px 0 0; font-weight: 500; font-size: 17px; letter-spacing: 1px; min-height: 26px; }
.caret { display: inline-block; width: 2px; height: 18px; margin-left: 3px; vertical-align: -3px; background: var(--nelson-pink); animation: blink .9s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.cards { display: grid; gap: 22px; margin: 28px auto 0; max-width: 520px; }
@media (min-width: 900px) { .cards { grid-template-columns: 1fr 1fr; max-width: 1000px; gap: 28px; } }

.card-slot { display: block; text-decoration: none; color: #fff; animation: from-left .9s var(--spring) backwards; animation-delay: var(--d); }
.card-slot.from-right { animation-name: from-right; }
.card-slot:focus-visible { outline: none; }
.card-slot:focus-visible .card { box-shadow: 0 0 0 4px #fff, var(--glow); }

.card-bob { animation: bob 3.9s ease-in-out infinite; }
.card-bob.alt { animation-delay: -1.95s; }
@keyframes bob {
  0%, 100% { transform: translateY(-5px) rotate(-.8deg); }
  50% { transform: translateY(5px) rotate(.8deg); }
}

.card {
  --rx: 0deg; --ry: 0deg;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 190px;
  padding: 22px 12px 22px 24px;
  border-radius: 32px;
  text-align: left;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, .75);
  box-shadow: 0 22px 44px -14px rgba(242, 112, 156, .75), 0 8px 18px -8px rgba(255, 148, 114, .6);
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .35s var(--spring), box-shadow .3s;
}
.card-love { background: var(--nelson); }
.card-flames { background: var(--nelson-rev); }
.card:hover { box-shadow: 0 30px 60px -16px rgba(242, 112, 156, .85), 0 10px 22px -8px rgba(255, 148, 114, .6); }
.card-slot:active .card { transform: perspective(900px) scale(.95); transition-duration: .12s; }
/* glossy shine sweep */
.card::after, .btn-grad::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .38) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: shine 3.2s linear infinite;
  pointer-events: none;
}
.card-flames::after { animation-delay: 1.2s; }
@keyframes shine { to { transform: translateX(120%); } }

.card-hearts { position: absolute; inset: 0; width: 100%; height: 100%; }
.card::before {
  content: "";
  position: absolute;
  right: -40px; top: 50%;
  width: 230px; height: 230px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
}
.card-text { position: relative; flex: 1; z-index: 1; }
.card h2 { margin: 0; font: 700 40px/1.05 var(--cursive); text-shadow: 0 2px 8px rgba(142, 44, 79, .2); }
.card p { margin: 4px 0 14px; font-size: 13px; line-height: 1.4; opacity: .95; }
.card-icon { position: relative; z-index: 1; width: 118px; height: 118px; flex: none; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 99px;
  background: rgba(255, 255, 255, .95);
  color: var(--nelson-pink); font-weight: 700; font-size: 13px;
}
.chip b { color: var(--nelson-peach); display: inline-block; animation: nudge .7s ease-in-out infinite alternate; }
@keyframes nudge { to { transform: translateX(4px); } }

.play-badge {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 30px; padding: 10px 22px 10px 18px;
  border-radius: 16px; background: #2b1220; color: #fff; text-decoration: none;
  box-shadow: var(--glow);
  transition: transform .3s var(--spring);
}
.play-badge:hover { transform: translateY(-3px) scale(1.04); }
.play-badge svg { width: 26px; height: 26px; fill: var(--nelson-peach); }
.play-badge span { display: grid; text-align: left; font-weight: 700; font-size: 18px; line-height: 1.1; }
.play-badge small { font-weight: 500; font-size: 11px; opacity: .8; }

footer { margin-top: 22px; font-size: 13px; color: var(--rosewood-soft); }
footer a { color: inherit; font-weight: 600; text-underline-offset: 3px; }

/* ---------- top bar ---------- */

.topbar { display: flex; align-items: center; gap: 14px; padding: 4px 0 8px; }
.topbar h2, .topbar h1 {
  margin: 0; font: 700 38px/1.2 var(--cursive);
  background: var(--nelson); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.back {
  position: relative; width: 46px; height: 46px; flex: none;
  border-radius: 50%; border: 1.5px solid #fff;
  background: rgba(255, 255, 255, .85);
  box-shadow: 0 6px 16px -4px rgba(242, 112, 156, .6);
  transition: transform .3s var(--spring);
}
.back::before {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 11px; height: 11px;
  border-left: 3px solid var(--nelson-pink); border-bottom: 3px solid var(--nelson-pink);
  border-radius: 2px;
  transform: translate(-30%, -50%) rotate(45deg);
}
.back:hover { transform: translateX(-3px); }
.back:active { transform: scale(.85); }

/* ---------- inputs ---------- */

.icon-lg { width: 130px; height: 130px; margin: 0 auto; }
.lead { text-align: center; font-size: 16px; margin: 0 0 26px; }

.name-form { display: flex; flex-direction: column; align-items: stretch; }

.field {
  position: relative; display: block;
  border-radius: 24px;
  background: rgba(255, 255, 255, .6);
  border: 2px solid #fff;
  box-shadow: 0 4px 12px -4px rgba(242, 112, 156, .4);
  transition: transform .35s var(--spring), box-shadow .35s, background .35s, border-color .35s;
}
.field:focus-within {
  transform: scale(1.02);
  background: rgba(255, 255, 255, .88);
  border-color: var(--nelson-pink);
  box-shadow: 0 14px 30px -8px rgba(242, 112, 156, .7);
}
.field-heart { position: absolute; left: 14px; top: 50%; width: 28px; height: 28px; transform: translateY(-50%); }
.field input {
  width: 100%; padding: 26px 18px 10px 54px;
  border: 0; background: transparent; outline: none;
  font: 600 18px var(--sans); color: var(--rosewood);
}
.field span {
  position: absolute; left: 54px; top: 50%; transform: translateY(-50%);
  color: var(--rosewood-soft); pointer-events: none;
  transition: all .25s var(--spring);
}
.field input:focus + span, .field input:not(:placeholder-shown) + span {
  top: 14px; font-size: 12px; color: var(--nelson-pink); font-weight: 600;
}

.link { display: grid; place-items: center; padding: 10px 0; perspective: 300px; }
.spin-heart { width: 44px; height: 44px; animation: spin-y 2.4s ease-in-out infinite; }
@keyframes spin-y { to { transform: rotateY(360deg); } }

.amp { text-align: center; font: 700 34px var(--cursive); color: var(--nelson-pink); padding: 4px 0; }

.legend { display: flex; justify-content: center; gap: 8px; margin-bottom: 24px; }
.legend div { display: grid; justify-items: center; font-weight: 700; font-size: 14px; animation: wave 2s ease-in-out infinite; animation-delay: calc(var(--i) * -.22s); }
.legend div span { font-size: 20px; }
@keyframes wave { 50% { transform: translateY(-6px); } }

/* ---------- buttons ---------- */

.btn-grad {
  position: relative; overflow: hidden;
  margin-top: 34px; padding: 16px 32px;
  border: 0; border-radius: 99px;
  background: var(--nelson); color: #fff;
  font-weight: 700; font-size: 18px; letter-spacing: 1px;
  box-shadow: var(--glow);
  animation: breathe 1.8s ease-in-out infinite;
  transition: transform .25s var(--spring), opacity .3s;
}
.btn-grad.reveal { animation: rise .8s var(--spring) backwards, breathe 1.8s ease-in-out .8s infinite; animation-delay: var(--d), calc(var(--d) + .8s); }
.btn-grad::after { animation-duration: 2.2s; }
.btn-grad:active { transform: scale(.94); }
.btn-grad.disabled { opacity: .55; }
@keyframes breathe { 50% { scale: 1.035; } }

@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.btn-share {
  position: relative; display: block;
  margin: 16px auto 0; padding: 3px;
  border: 0; border-radius: 99px;
  background: conic-gradient(from var(--angle), var(--nelson-pink), var(--nelson-peach), var(--piggy-rose), #fff, var(--nelson-pink));
  box-shadow: 0 12px 26px -10px rgba(255, 148, 114, .8);
  animation: spin-border 2.6s linear infinite;
  transition: transform .25s var(--spring);
}
.btn-share:active { transform: scale(.94); }
.btn-share > span {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 30px; border-radius: 99px; background: #fff;
}
.btn-share > span::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(238, 156, 167, .5) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: shine 2.6s linear .9s infinite;
}
.btn-share em {
  font-style: normal; font-weight: 700; font-size: 18px; letter-spacing: 1px;
  background: var(--nelson); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.share-icon { width: 24px; height: 24px; }
@keyframes spin-border { to { --angle: 360deg; } }

/* WhatsApp: green pill with a pinging ring, shine and wiggling logo */
.btn-wa {
  position: relative; display: block;
  margin: 14px auto 0; padding: 0;
  border: 0; border-radius: 99px;
  background: linear-gradient(135deg, #25d366, #128c7e);
  box-shadow: 0 12px 26px -10px rgba(18, 140, 126, .9);
  transition: transform .25s var(--spring);
}
.btn-wa:active { transform: scale(.94); }
.btn-wa::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  border: 2px solid #25d366;
  animation: ping 1.8s ease-out infinite;
  pointer-events: none;
}
@keyframes ping { from { opacity: .8; transform: scale(1); } to { opacity: 0; transform: scale(1.18, 1.5); } }
.btn-wa > span {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 28px; border-radius: 99px; color: #fff;
}
.btn-wa > span::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .35) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: shine 2.8s linear 1.4s infinite;
}
.btn-wa svg { width: 24px; height: 24px; animation: wiggle 2.4s ease-in-out infinite; }
.btn-wa .bubble { fill: none; stroke: #fff; stroke-width: 1.8; stroke-linejoin: round; }
.btn-wa .phone { fill: #fff; }
.btn-wa em { font-style: normal; font-weight: 700; font-size: 17px; letter-spacing: .5px; }
@keyframes wiggle {
  0%, 60%, 100% { transform: rotate(0); }
  68% { transform: rotate(-14deg) scale(1.12); }
  76% { transform: rotate(12deg) scale(1.12); }
  84% { transform: rotate(-8deg); }
  92% { transform: rotate(4deg); }
}

.link-btn { display: block; margin: 12px auto 0; padding: 10px 18px; border: 0; border-radius: 99px; background: none; color: var(--rosewood); font-weight: 600; }
.link-btn:hover, .skip:hover { background: rgba(255, 255, 255, .5); }

/* ---------- glass ---------- */

.glass {
  border-radius: 28px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .82), rgba(255, 255, 255, .6));
  border: 1.5px solid #fff;
  box-shadow: 0 16px 32px -14px rgba(242, 112, 156, .6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

/* ---------- love match ---------- */

[data-phase="calc"] { text-align: center; padding-top: 12vh; }
.merge { width: 100%; height: 240px; }
.calc-text { font-size: 18px; font-weight: 600; }
.dots { width: 100px; height: 30px; margin: 16px auto 0; }

.names { display: flex; align-items: center; justify-content: center; gap: 4px; font: 700 34px var(--cursive); }
.names span { max-width: 42%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--nelson); -webkit-background-clip: text; background-clip: text; color: transparent; padding: 0 4px; }
.mini-heart { width: 42px; height: 42px; flex: none; }

.liquid-wrap { position: relative; width: min(280px, 80vw); aspect-ratio: 1; margin: 10px auto 8px; }
.liquid { width: 100%; height: 100%; }
.pct { position: absolute; inset: 0 0 24px; display: grid; place-content: center; text-align: center; color: #fff; text-shadow: 0 4px 12px rgba(142, 44, 79, .5); }
.pct b { font-size: 56px; font-weight: 800; line-height: 1; }
.pct span { font-weight: 700; font-size: 14px; letter-spacing: 6px; }
.measuring { text-align: center; color: var(--rosewood-soft); }

.after-reveal { display: none; }
.revealed .after-reveal { display: block; }
.revealed .measuring { display: none; }
.after-reveal > * { animation: rise .8s var(--spring) backwards; }
.after-reveal > :nth-child(2) { animation-delay: .1s; }
.after-reveal > :nth-child(3) { animation-delay: .2s; }
.after-reveal .btn-share { animation: rise .8s var(--spring) .2s backwards, spin-border 2.6s linear infinite; }
.after-reveal .btn-wa, .flames-result .btn-wa { animation: rise .8s var(--spring) .3s backwards; }
.after-reveal .btn-grad { width: 100%; margin-top: 24px; animation: rise .8s var(--spring) .1s backwards, breathe 1.8s ease-in-out .9s infinite; }

.msg { text-align: center; }
.msg p { margin: 6px 0 0; font-size: 18px; font-weight: 600; }
.emoji { font-size: 44px; line-height: 1.2; }
.bounce { display: inline-block; animation: bounce .6s ease-in-out infinite alternate; }
@keyframes bounce { to { transform: translateY(-8px) scale(1.12); } }

/* ---------- flames ---------- */

[data-phase="play"] .names { margin-bottom: 10px; }
.tiles { display: flex; justify-content: space-evenly; padding: 18px 10px 14px; }
.tile { display: grid; justify-items: center; gap: 6px; }
.tile .disc {
  position: relative; display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, #fff, var(--piggy-blush));
  border: 1.5px solid var(--piggy-rose);
  font-weight: 800; font-size: 20px;
  box-shadow: 0 3px 6px -2px rgba(242, 112, 156, .4);
  transition: transform .35s var(--spring), opacity .45s, background .2s, color .2s, box-shadow .2s;
}
.tile small { font-size: 14px; transition: opacity .45s; }
.tile.hop .disc, .tile.winner .disc {
  background: var(--nelson); color: #fff; border-color: #fff;
  transform: scale(1.25);
  box-shadow: 0 10px 22px -6px rgba(242, 112, 156, .9);
}
.tile.winner .disc { transform: scale(1.3); animation: flip-y .9s ease-out; }
@keyframes flip-y { from { transform: scale(1.3) rotateY(360deg); } }
.tile.gone .disc { transform: scale(.78) rotate(-12deg); opacity: .4; }
.tile.gone small { opacity: .3; }
.tile .disc::before, .tile .disc::after {
  content: ""; position: absolute; left: 22%; right: 22%; top: 50%;
  height: 3px; border-radius: 3px; background: var(--rosewood);
  transform: rotate(45deg) scaleX(0); transition: transform .45s ease-out;
}
.tile .disc::after { transform: rotate(-45deg) scaleX(0); }
.tile.gone .disc::before { transform: rotate(45deg) scaleX(1); }
.tile.gone .disc::after { transform: rotate(-45deg) scaleX(1); }

.boards { margin-top: 18px; text-align: center; }
.letters { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 16px; margin-bottom: 12px; border-radius: 22px; }
.chipl {
  position: relative; display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, #fff, var(--piggy-blush));
  font-weight: 700; font-size: 16px;
  animation: rise .6s var(--spring) backwards;
  animation-delay: calc(var(--i) * 45ms);
  transition: transform .35s var(--spring), opacity .35s, background .2s, color .2s;
}
.chipl::after {
  content: ""; position: absolute; left: 12%; right: 12%; top: 50%;
  height: 3px; border-radius: 3px; background: var(--nelson-pink);
  transform: rotate(-40deg) scaleX(0); transition: transform .35s ease-out;
}
.chipl.active { background: var(--nelson); color: #fff; transform: scale(1.3); }
.chipl.struck { opacity: .45; transform: scale(.85); }
.chipl.struck::after { transform: rotate(-40deg) scaleX(1); }

.count-badge {
  display: none; width: fit-content; margin: 4px auto 0;
  padding: 10px 22px; border-radius: 99px;
  background: var(--nelson); color: #fff; font-weight: 500;
  box-shadow: 0 10px 22px -8px rgba(242, 112, 156, .9);
}
.count-badge b { font-size: 24px; font-weight: 800; margin-left: 6px; vertical-align: -2px; }
.count-badge.show { display: block; animation: pop .6s var(--spring) backwards; }
@keyframes pop { from { opacity: 0; transform: scale(.3); } }

.skip { margin-top: 18px; padding: 8px 16px; border: 0; border-radius: 99px; background: none; color: var(--rosewood-soft); font-weight: 600; }

.flames-result { display: none; }
.finished .boards { display: none; }
.finished .flames-result { display: block; margin-top: 22px; }
.flames-result > * { animation: rise .8s var(--spring) backwards; }
.flames-result .btn-grad { width: 100%; margin-top: 24px; animation: rise .8s var(--spring) .1s backwards, breathe 1.8s ease-in-out .9s infinite; }
.flames-result .btn-share { animation: rise .8s var(--spring) .2s backwards, spin-border 2.6s linear infinite; }
.flames-result .change-names { animation-delay: .4s; }

.result-card { text-align: center; animation-name: rise-far; }
@keyframes rise-far { from { opacity: 0; transform: translateY(80px) scale(.85); } }
.result-card .lbl { color: var(--rosewood-soft); }
.medal {
  position: relative; overflow: hidden;
  display: grid; place-items: center;
  width: 130px; height: 130px; margin: 14px auto;
  border-radius: 50%; border: 4px solid #fff;
  background: var(--nelson);
  font-size: 64px;
  box-shadow: 0 18px 40px -10px rgba(242, 112, 156, .9);
  animation: medal-flip 1.1s ease-out backwards, glow-pulse 1.6s ease-in-out 1.1s infinite alternate;
}
.medal::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .45) 50%, transparent 65%);
  transform: translateX(-120%); animation: shine 2.4s linear infinite;
}
@keyframes medal-flip { from { transform: perspective(600px) rotateY(540deg); } }
@keyframes glow-pulse { from { scale: .92; } to { scale: 1.06; } }
.result-card h3 {
  margin: 0; font: 700 56px/1.1 var(--cursive);
  background: var(--nelson); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.result-card p { margin: 6px 0 0; font-size: 17px; font-weight: 500; }
.result-card .count { font-size: 12px; color: var(--rosewood-soft); margin-top: 10px; }
.result-card .mirror { font-size: 56px; }

/* ---------- privacy page ---------- */

a.back { display: block; }
.legal { padding-bottom: 12px; }
.legal .glass { margin-bottom: 16px; }
.legal h2 { margin: 0 0 8px; font: 700 26px/1.2 var(--cursive); color: var(--nelson-pink); }
.legal p, .legal li { font-size: 15px; line-height: 1.65; }
.legal p { margin: 0 0 8px; }
.legal p:last-child { margin-bottom: 0; }
.legal ul { margin: 0; padding-left: 20px; }
.legal li + li { margin-top: 8px; }
.legal li::marker { color: var(--nelson-pink); }
.legal a { color: var(--nelson-pink); font-weight: 600; text-underline-offset: 3px; }
.legal .lead-text { font-size: 16px; }
.legal .meta { margin-top: 12px; font-size: 13px; color: var(--rosewood-soft); }
.legal .badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.legal .pill { padding: 6px 12px; border-radius: 99px; background: var(--nelson); color: #fff; font-size: 13px; font-weight: 600; }
.legal .mail { display: inline-block; padding: 10px 18px; border-radius: 99px; background: #fff; border: 1.5px solid var(--piggy-rose); text-decoration: none; transition: transform .3s var(--spring); }
.legal .mail:hover { transform: translateY(-2px); }
.legal footer { text-align: center; }

/* ---------- WhatsApp paste dialog ---------- */

#wa-dialog {
  width: min(380px, calc(100% - 32px));
  padding: 22px 22px 12px;
  border: 1.5px solid #fff; border-radius: 28px;
  background: linear-gradient(180deg, #fff, var(--piggy-blush));
  color: var(--rosewood); text-align: center;
  box-shadow: 0 24px 60px -16px rgba(142, 44, 79, .55);
}
#wa-dialog[open] { animation: pop .5s var(--spring) backwards; }
#wa-dialog::backdrop { background: rgba(142, 44, 79, .35); backdrop-filter: blur(4px); }
#wa-dialog img {
  width: 150px; aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: 16px; box-shadow: 0 12px 26px -10px rgba(242, 112, 156, .8);
  animation: bounce 1.2s ease-in-out infinite alternate;
}
#wa-dialog h3 { margin: 14px 0 4px; font: 700 30px var(--cursive); color: var(--nelson-pink); }
#wa-dialog p { margin: 0; font-size: 15px; line-height: 1.5; }
#wa-dialog kbd { white-space: nowrap; padding: 2px 8px; border-radius: 6px; background: #fff; border: 1px solid var(--piggy-rose); font: 600 13px var(--sans); }
#wa-dialog .btn-wa { width: fit-content; margin-top: 18px; text-decoration: none; }

/* ---------- sound toggle ---------- */

#sound {
  position: fixed; z-index: 40;
  top: max(14px, env(safe-area-inset-top)); right: 14px;
  display: grid; place-items: center;
  width: 46px; height: 46px; padding: 0;
  border-radius: 50%; border: 1.5px solid #fff;
  background: rgba(255, 255, 255, .85);
  box-shadow: 0 6px 16px -4px rgba(242, 112, 156, .6);
  transition: transform .3s var(--spring);
}
#sound:active { transform: scale(.85); }
#sound .bars { display: flex; align-items: flex-end; gap: 3px; height: 18px; }
#sound .bars i { width: 3px; height: 100%; border-radius: 2px; background: var(--nelson); transform-origin: bottom; animation: eq .9s ease-in-out infinite alternate; }
#sound .bars i:nth-child(2) { animation-delay: -.3s; }
#sound .bars i:nth-child(3) { animation-delay: -.6s; }
#sound .bars i:nth-child(4) { animation-delay: -.45s; }
@keyframes eq { from { transform: scaleY(.25); } to { transform: scaleY(1); } }
#sound .note { display: none; width: 22px; height: 22px; fill: var(--rosewood-soft); }
#sound.off .bars { display: none; }
#sound.off .note { display: block; }
#sound.off::after {
  content: ""; position: absolute; width: 26px; height: 2.5px; border-radius: 2px;
  background: var(--rosewood-soft); transform: rotate(-45deg);
}

#sound-hint {
  position: fixed; z-index: 40;
  top: calc(max(14px, env(safe-area-inset-top)) + 8px); right: 70px;
  padding: 7px 14px; border-radius: 99px;
  background: var(--nelson); color: #fff;
  font-size: 13px; font-weight: 600; white-space: nowrap;
  box-shadow: 0 8px 18px -6px rgba(242, 112, 156, .8);
  pointer-events: none;
  opacity: 0; transform: translateX(10px) scale(.9);
  transition: opacity .4s, transform .4s var(--spring);
}
#sound-hint::after {
  content: ""; position: absolute; right: -5px; top: 50%;
  width: 10px; height: 10px; background: var(--nelson-peach);
  transform: translateY(-50%) rotate(45deg); border-radius: 2px;
}
#sound-hint.show { opacity: 1; transform: none; animation: hint-pulse 1.6s ease-in-out .5s infinite; }
@keyframes hint-pulse { 50% { transform: scale(1.06); } }

/* ---------- toast ---------- */

#toast {
  position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 60; max-width: calc(100% - 32px);
  padding: 12px 20px; border-radius: 99px;
  background: var(--rosewood); color: #fff; font-weight: 600; font-size: 14px;
  box-shadow: 0 12px 26px -8px rgba(142, 44, 79, .7);
  opacity: 0; transform: translate(-50%, 30px); pointer-events: none;
}
#toast.show { animation: toast 3s var(--spring) backwards; }
@keyframes toast {
  0% { opacity: 0; transform: translate(-50%, 30px); }
  12%, 85% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 10px); }
}

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