/* CLS: enquanto as fontes do Google não chegam, a reserva (Arial/Helvetica/Roboto) já ocupa o mesmo espaço
 * (size-adjust e métricas medidas contra a fonte de verdade) — a troca não muda quebra de linha nem empurra nada. */
@font-face { font-family: 'Nunito Fallback'; src: local('Arial'), local('Helvetica'), local('Roboto'); size-adjust: 99.5%; ascent-override: 101.5%; descent-override: 35.2%; line-gap-override: 0%; }
@font-face { font-family: 'Fredoka Fallback'; src: local('Arial'), local('Helvetica'), local('Roboto'); size-adjust: 93.2%; ascent-override: 104.1%; descent-override: 25.8%; line-gap-override: 0%; }
@font-face { font-family: 'Bricolage Fallback'; src: local('Arial'), local('Helvetica'), local('Roboto'); size-adjust: 92.7%; ascent-override: 100.3%; descent-override: 29.1%; line-gap-override: 0%; }

:root {
  --night: #0b0f2e;
  --night2: #1a1f55;
  --ink: #1d1534;
  --paper: #fffaf2;
  --red: #e0303f;
  --red2: #a81d2c;
  --gold: #ffcf5a;
  --gold2: #f5a623;
  --green: #2fa65a;
  --snow: #eef2ff;
  --muted: #a6b1dc;
  --line: #e8dccb;
  --display: 'Fredoka', 'Fredoka Fallback', 'Nunito', system-ui, sans-serif;
  --body: 'Nunito', 'Nunito Fallback', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --hand: 'Caveat', 'Bradley Hand', cursive;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  color: var(--snow);
  background:
    radial-gradient(900px 500px at 15% -5%, rgba(142, 79, 147, .55), transparent 60%),
    radial-gradient(900px 600px at 95% 10%, rgba(59, 85, 146, .55), transparent 60%),
    var(--night);
  background-attachment: fixed;
  min-height: 100vh;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button { font: inherit; }

/* ------------------------------- criador ------------------------------- */
#creator { max-width: 760px; margin: 0 auto; padding: 18px 16px 48px; }
.hero { text-align: center; padding: 10px 0 26px; }
.brand {
  font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: .5px;
  color: var(--gold); display: inline-flex; gap: 8px; align-items: center;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); padding: 6px 14px; border-radius: 999px;
}
.hero h1 {
  font-family: var(--display); font-weight: 700; font-size: clamp(30px, 7vw, 52px); line-height: 1.05;
  margin: 18px 0 12px; letter-spacing: -.5px;
}
.hero h1 em {
  font-style: normal; color: var(--gold);
  background: linear-gradient(180deg, #ffe39a, #ffb238); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.lead { color: var(--muted); font-size: clamp(16px, 3.6vw, 19px); line-height: 1.5; margin: 0 0 22px; }
.hero-stage {
  position: relative; border-radius: 20px; overflow: hidden; aspect-ratio: 16 / 9; margin: 0 0 22px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 30px 80px rgba(0,0,0,.55), 0 0 120px rgba(255,170,90,.15);
  background: #1a1440;
}
#demo { width: 100%; height: 100%; display: block; }
.hero-badge {
  position: absolute; left: 12px; bottom: 10px; font-size: 12px; font-weight: 800; color: #fff;
  background: rgba(15,10,40,.6); backdrop-filter: blur(6px); padding: 5px 10px; border-radius: 999px;
}
.hero-badge::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #ff4d5e; margin-right: 6px; box-shadow: 0 0 8px #ff4d5e; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .3; } }

.panel {
  background: var(--paper); color: var(--ink); border-radius: 22px;
  padding: 8px 22px 22px; box-shadow: 0 30px 70px rgba(0,0,0,.4);
  margin-bottom: 22px; position: relative;
}
.anchor { position: absolute; top: -20px; }
.step { padding: 20px 0 22px; border-bottom: 1px dashed var(--line); }
.step:last-of-type { border-bottom: 0; }
.step-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.step-head h2 { font-family: var(--display); font-weight: 600; font-size: 21px; margin: 0; }
.n {
  display: inline-grid; place-items: center; width: 30px; height: 30px; flex: none;
  background: linear-gradient(180deg, #ff5b68, var(--red)); color: #fff; border-radius: 10px; font-weight: 900; font-size: 15px;
  box-shadow: 0 3px 0 var(--red2);
}
.hint { margin: -4px 0 10px; color: #776d8c; font-size: 14px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .row { grid-template-columns: 1fr; } }
label { display: block; font-size: 13px; font-weight: 800; color: #5d5372; text-transform: uppercase; letter-spacing: .4px; }
input, textarea {
  width: 100%; margin-top: 6px; font: inherit; font-size: 17px; font-weight: 700; color: var(--ink);
  border: 2px solid var(--line); border-radius: 14px; padding: 13px 14px; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #b9aec8; font-weight: 600; }
input:focus, textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 4px rgba(224,48,63,.12); }
textarea { resize: vertical; line-height: 1.45; }
.count { text-align: right; font-size: 12px; color: #9a90ab; margin-top: 4px; }
.signs { display: grid; gap: 8px; }
.signs input { margin-top: 0; background: #fff8ef url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Crect x='2' y='4' width='16' height='10' rx='2' fill='%23c98a52'/%3E%3Crect x='5' y='14' width='2' height='5' fill='%236b4428'/%3E%3Crect x='13' y='14' width='2' height='5' fill='%236b4428'/%3E%3C/svg%3E") no-repeat 12px center; padding-left: 42px; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip {
  border: 1.5px solid var(--line); background: #fff; color: #5d5372; border-radius: 999px;
  padding: 6px 12px; font-size: 13px; font-weight: 800; cursor: pointer;
}
.chip:hover { border-color: var(--red); color: var(--red); }

.choices { display: grid; gap: 10px; }
.skins { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 560px) { .skins { grid-template-columns: repeat(3, 1fr); } }
.choice {
  border: 2px solid var(--line); background: #fff; border-radius: 16px; padding: 10px 6px 10px;
  color: var(--ink); cursor: pointer; text-align: center; position: relative;
  transition: transform .12s, border-color .12s, box-shadow .12s;
}
.choice:hover { transform: translateY(-3px); }
.choice[aria-pressed="true"] { border-color: var(--red); background: #fff2ee; box-shadow: 0 4px 0 var(--red2); }
.choice[aria-pressed="true"]::after {
  content: '✓'; position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--red); color: #fff; font-size: 13px; font-weight: 900; display: grid; place-items: center;
}
.choice canvas { width: 64px; height: 72px; display: block; margin: 0 auto 4px; }
.choice .t { font-weight: 900; font-size: 13px; }
.diffs { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 560px) { .diffs { grid-template-columns: 1fr; } }
.diffs .choice { text-align: left; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.diffs .e { font-size: 30px; line-height: 1; }
.diffs .t { font-family: var(--display); font-size: 18px; font-weight: 600; }
.diffs .d { font-size: 13px; color: #776d8c; line-height: 1.35; }
.diffs .choice[data-id="dificil"][aria-pressed="true"] { background: #1d1534; color: #fff; border-color: #ff4d5e; box-shadow: 0 4px 0 #7a0f1c, 0 0 30px rgba(255,77,94,.35); }
.diffs .choice[data-id="dificil"][aria-pressed="true"] .d { color: #ffb3bb; }
.style-row { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.mini-label { font-size: 13px; font-weight: 800; color: #5d5372; text-transform: uppercase; letter-spacing: .4px; }
.seg { display: inline-flex; background: #f1e8da; border-radius: 12px; padding: 4px; gap: 4px; }
.seg button {
  border: 0; background: transparent; padding: 8px 14px; border-radius: 9px; font-weight: 800; font-size: 14px; color: #5d5372; cursor: pointer;
}
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 2px 6px rgba(0,0,0,.1); }
.seg button[data-id="retro"] { font-family: 'Press Start 2P', monospace; font-size: 10px; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.actions .btn { flex: 1 1 200px; }
.actions.col { flex-direction: column; }
.actions.col .btn { flex: none; width: 100%; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--display); font-weight: 600; font-size: 18px; text-decoration: none;
  border: 0; border-radius: 16px; padding: 15px 20px; cursor: pointer;
  transition: transform .08s, box-shadow .08s, filter .15s;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(3px); }
.btn.primary { background: linear-gradient(180deg, #ff5b68, var(--red)); color: #fff; box-shadow: 0 5px 0 var(--red2), 0 12px 30px rgba(224,48,63,.35); }
.btn.primary:active { box-shadow: 0 2px 0 var(--red2); }
.btn.ghost { background: #f1e8da; color: var(--ink); box-shadow: 0 5px 0 #d6c7ae; }
.btn.whats { background: linear-gradient(180deg, #3ee07c, #22c362); color: #063d1c; box-shadow: 0 5px 0 #168a45; }
.btn.big { font-size: 20px; padding: 17px 30px; }
.pulse { animation: pulse 1.6s infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
.result { text-align: center; padding-top: 26px; }
.result h2 { font-family: var(--display); margin: 6px 0; font-size: 26px; }
.result p { margin: 0 0 14px; color: #5d5372; }
.result-icon { font-size: 52px; animation: wiggle 1.4s infinite; }
#link { font-size: 13px; color: #5d5372; font-weight: 600; }
.tip { margin-top: 16px !important; font-size: 14px; }
.foot { text-align: center; color: #5d6aa0; font-size: 12px; margin-top: 6px; }

/* -------------------------------- jogo -------------------------------- */
#player { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #05061a; touch-action: none; }
#player .overlay { touch-action: pan-y; }
/* orientação: --ar = largura/altura do mundo do jogo (16:9 deitado; pegar e quiz em pé têm o seu, ~9:16) */
#stage {
  position: relative; width: min(100vw, calc(100vh * var(--ar, 1.7778))); width: min(100vw, calc(100dvh * var(--ar, 1.7778))); aspect-ratio: var(--ar, 1.7778);
  background: #120f33; touch-action: none; user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent; cursor: pointer; overflow: hidden;
}
#game { width: 100%; height: 100%; display: block; }
.mute {
  position: absolute; right: 10px; top: 10px; border: 0; border-radius: 12px;
  background: rgba(15,10,40,.55); backdrop-filter: blur(6px); color: #fff; font-size: 18px; padding: 7px 10px; cursor: pointer;
}
.full-btn { top: 54px; font-size: 17px; line-height: 1.15; } /* debaixo do som: o canto de cima à direita tem placar no trenó */

/* ---------------- orientação: celular em pé num jogo 16:9 (corrida, trenó) ----------------
 * moldura em cima (quem deu → quem recebe, missão, recado da vez, progresso), palco na largura toda
 * e embaixo uma área de toque grande: a tela inteira é o botão. */
#player.framed { justify-content: flex-start; height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
#player.framed #stage { width: 100vw; flex: none; box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 18px 50px rgba(0,0,0,.55); }
.frame-top {
  width: 100%; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px;
  padding: 14px 18px 14px; text-align: center; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, rgba(142,79,147,.35), transparent 70%);
}
.ft-names { margin: 0; font-family: var(--display); font-weight: 600; font-size: clamp(17px, 5vw, 21px); line-height: 1.25; color: #fff; }
.ft-names strong { color: var(--gold); font-weight: 700; }
.ft-mission { margin: 0; font-size: 14px; line-height: 1.4; color: var(--muted); }
.ft-mission strong { color: #fff; }
.ft-mission .villain { color: #c9a7ff; }
.ft-sign {
  margin: 2px auto 0; max-width: 100%; padding: 7px 12px; border-radius: 12px; font-size: 13px; line-height: 1.35; color: #2b1404;
  background: #c98a52; box-shadow: inset 0 -3px 0 rgba(0,0,0,.18), 0 6px 18px rgba(0,0,0,.35);
  animation: ftSign .45s cubic-bezier(.2,1.4,.4,1);
}
.ft-sign span { font-weight: 800; }
.ft-sign q { font-family: var(--hand); font-weight: 700; font-size: 19px; quotes: '“' '”'; }
@keyframes ftSign { from { transform: translateY(6px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.ft-progress { height: 8px; border-radius: 999px; background: rgba(255,255,255,.12); overflow: hidden; margin-top: 4px; }
.ft-progress span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #ffd166, #ff8a5c); transition: width .2s linear; }
.tap-pad {
  position: relative; width: 100%; flex: 1.25 1 auto; min-height: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; cursor: pointer;
  padding-bottom: calc(18px + env(safe-area-inset-bottom)); -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none;
  background: radial-gradient(70% 60% at 50% 45%, rgba(255,207,90,.09), transparent 70%);
}
.tap-pad b { position: relative; font-family: var(--display); font-weight: 600; font-size: 17px; color: rgba(255,255,255,.82); text-align: center; padding: 0 20px; }
.pad-ring {
  position: relative; width: 88px; height: 88px; border-radius: 50%; flex: none;
  border: 2px dashed rgba(255,207,90,.4); animation: padBreath 2.4s ease-in-out infinite;
}
.pad-ring::after { content: ''; position: absolute; inset: 30px; border-radius: 50%; background: rgba(255,207,90,.55); box-shadow: 0 0 24px rgba(255,207,90,.6); }
.tap-pad.hit .pad-ring { animation: padHit .32s ease-out; border-style: solid; border-color: rgba(255,207,90,.8); }
@keyframes padBreath { 50% { transform: scale(1.08); opacity: .7; } }
@keyframes padHit { from { transform: scale(.82); } to { transform: scale(1.12); opacity: .4; } }
.tilt-chip {
  position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 12;
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; max-width: calc(100vw - 24px);
  border: 0; border-radius: 999px; padding: 8px 12px 8px 12px; cursor: pointer;
  font: 800 13px var(--body); color: #fff; background: rgba(15,10,40,.72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 8px 24px rgba(0,0,0,.4);
}
.tilt-ico { display: inline-block; animation: tilt 2.6s ease-in-out infinite; }
.tilt-x { opacity: .6; font-size: 12px; margin-left: 2px; }
@keyframes tilt { 0%, 45%, 100% { transform: rotate(0); } 60%, 85% { transform: rotate(-90deg); } }
#player.framed .preview-bar { bottom: calc(58px + env(safe-area-inset-bottom)); }
/* celular deitado e baixinho: a moldura não cabe — o palco fica sozinho */
@media (max-height: 520px) and (orientation: landscape) { .frame-top, .tap-pad, .tilt-chip { display: none !important; } }
@media (prefers-reduced-motion: reduce) {
  .pad-ring, .tilt-ico, .ft-sign, .tap-pad.hit .pad-ring { animation: none; }
  .ft-progress span { transition: none; }
}
.preview-bar {
  position: fixed; left: 50%; bottom: calc(10px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 15;
  background: var(--gold); color: var(--ink); font-weight: 800; font-size: 13px; padding: 8px 14px; border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0,0,0,.4); white-space: nowrap;
}
.link-btn { background: none; border: 0; font-weight: 900; color: var(--red2); text-decoration: underline; cursor: pointer; }

.overlay {
  position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px;
  background: rgba(6,6,24,.6); backdrop-filter: blur(3px); overflow-y: auto;
}
.overlay.dark { background: radial-gradient(circle at 50% 45%, rgba(60,30,90,.85), rgba(4,4,16,.96)); backdrop-filter: blur(4px); }
.sheet {
  width: min(470px, 100%); background: var(--paper); color: var(--ink); border-radius: 26px;
  padding: 26px 24px; text-align: center; box-shadow: 0 30px 80px rgba(0,0,0,.55);
  animation: pop .45s cubic-bezier(.2,1.5,.4,1);
}
.sheet h2 { font-family: var(--display); font-weight: 600; margin: 6px 0 10px; font-size: 24px; line-height: 1.2; }
.sheet p { margin: 0 0 14px; line-height: 1.5; color: #4a4060; font-size: 16px; }
.kicker { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: 2px; font-size: 13px !important; color: var(--red) !important; margin: 0 !important; }
.big-name { font-size: clamp(32px, 8vw, 44px) !important; margin: 2px 0 10px !important; color: var(--ink); }
.intro-gift { font-size: 64px; line-height: 1; animation: wiggle 1.3s infinite; filter: drop-shadow(0 10px 18px rgba(224,48,63,.35)); }
.mission { background: #f6eee2; border-radius: 14px; padding: 12px; }
.villain { color: #6a44a3; }
.how { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 0 0 18px; }
.how span { background: #1d1534; color: #fff; font-weight: 800; font-size: 13px; padding: 7px 12px; border-radius: 999px; }
.sound-hint { font-size: 13px !important; color: #9a90ab !important; margin: 12px 0 0 !important; }
.lose-emoji { font-size: 54px; line-height: 1; animation: wiggle .8s infinite; }
/* emoção: o quanto chegou perto */
.lose-meter { position: relative; height: 22px; margin: 4px 6px 12px; border-radius: 999px; background: #efe4d4; box-shadow: inset 0 2px 0 rgba(0,0,0,.08); overflow: hidden; }
.lose-meter span { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 999px; background: linear-gradient(90deg, #ffcf5a, #ff8a5c 70%, #e0303f); transition: width 1s cubic-bezier(.2,.9,.3,1) .25s; }
.lose-meter b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 13px; color: #1d1534; letter-spacing: .5px; }
.sheet p.lose-line { font-family: var(--display); font-weight: 600; font-size: 19px; color: var(--ink); margin-bottom: 6px; }
.sheet p.lose-sub { font-size: 14px; color: #8a7f9e; }

@keyframes pop { from { transform: scale(.8) translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-9deg); } 40% { transform: rotate(9deg); } 60% { transform: rotate(-4deg); } }

/* --------------------------- presente que abre --------------------------- */
.gift-step { text-align: center; color: #fff; }
.kicker.glow { color: var(--gold) !important; text-shadow: 0 0 18px rgba(255,207,90,.7); font-size: 15px !important; }
.giftbox {
  position: relative; width: 210px; height: 210px; margin: 26px auto 18px; display: block;
  border: 0; background: none; cursor: pointer; animation: float 2.4s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-8px); } }
.giftbox .box {
  position: absolute; left: 22px; right: 22px; bottom: 0; height: 128px; border-radius: 12px;
  background:
    linear-gradient(90deg, transparent 43%, var(--gold) 43%, #ffe08a 50%, var(--gold) 57%, transparent 57%),
    linear-gradient(180deg, #ff4f5e, #b81f2e);
  box-shadow: inset 0 -18px 0 rgba(0,0,0,.15), 0 20px 50px rgba(224,48,63,.4);
}
.giftbox .lid {
  position: absolute; left: 10px; right: 10px; top: 52px; height: 42px; border-radius: 12px; z-index: 2;
  background:
    linear-gradient(90deg, transparent 43%, var(--gold) 43%, #ffe08a 50%, var(--gold) 57%, transparent 57%),
    linear-gradient(180deg, #ff6b78, #d42a3a);
  box-shadow: 0 6px 0 rgba(0,0,0,.15);
  transition: transform .7s cubic-bezier(.2,1.4,.4,1), opacity .7s;
}
.giftbox .lid::before, .giftbox .lid::after {
  content: ''; position: absolute; top: -30px; width: 44px; height: 32px;
  border: 9px solid var(--gold); border-radius: 50% 50% 0 50%;
}
.giftbox .lid::before { left: 46px; transform: rotate(12deg); }
.giftbox .lid::after { right: 46px; transform: scaleX(-1) rotate(12deg); }
.giftbox .rays {
  position: absolute; left: 50%; top: 55%; width: 10px; height: 10px; transform: translate(-50%, -50%); border-radius: 50%;
  opacity: 0; transition: opacity .3s; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(255,230,140,.55) 0 8deg, transparent 8deg 22deg);
}
.giftbox.s1 { animation: shake1 .35s; }
.giftbox.s2 { animation: shake2 .45s; }
.giftbox.s2 .rays { opacity: .5; width: 260px; height: 260px; transition: all .5s; }
@keyframes shake1 { 25% { transform: rotate(-6deg) scale(1.03); } 75% { transform: rotate(6deg) scale(1.03); } }
@keyframes shake2 { 15% { transform: rotate(-10deg) scale(1.08); } 35% { transform: rotate(10deg) scale(1.1); } 55% { transform: rotate(-8deg) scale(1.08); } 75% { transform: rotate(8deg) scale(1.06); } }
.giftbox.open { animation: none; }
.giftbox.open .lid { transform: translateY(-260px) rotate(-40deg); opacity: 0; }
.giftbox.open .rays { opacity: 1; width: 900px; height: 900px; transition: all 1s ease-out; animation: spin 8s linear infinite; }
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.gift-hint { font-family: var(--display); font-weight: 600; font-size: 22px; color: #fff; animation: pulse 1.2s infinite; }

.letter {
  text-align: left; padding: 30px 28px 24px;
  background: #fffdf7 repeating-linear-gradient(transparent 0 33px, #f0e4d0 33px 34px);
  background-position: 0 22px;
}
.letter .to { font-family: var(--hand); font-size: 28px; color: #6a4a2a; margin: 0 0 6px; }
.letter .msg { font-family: var(--hand); font-size: clamp(28px, 6vw, 34px); line-height: 1.12; font-weight: 700; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; min-height: 1.2em; }
.letter .msg .cursor { display: inline-block; width: 2px; height: .9em; background: var(--ink); margin-left: 2px; animation: blink .7s infinite; vertical-align: -0.1em; }
.letter .from { text-align: right; font-family: var(--hand); font-size: 26px; color: #6a4a2a; }
.stats { list-style: none; padding: 0; margin: 6px 0 4px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stats li { background: #f6eee2; border-radius: 14px; padding: 9px 4px; text-align: center; font-size: 11px; font-weight: 800; color: #776d8c; text-transform: uppercase; letter-spacing: .3px; }
.stats b { display: block; font-family: var(--display); font-size: 21px; color: var(--ink); letter-spacing: 0; }
.fade-in { animation: fadeUp .5s both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.confetti { position: fixed; top: -12px; width: 9px; height: 14px; z-index: 40; pointer-events: none; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(112vh) rotate(760deg); } }

/* jogos: escolha do minigame no criador */
.games { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 560px) { .games { grid-template-columns: 1fr; } }
.games .choice { text-align: left; padding: 14px; display: flex; gap: 12px; align-items: center; }
.games .e { font-size: 30px; line-height: 1; flex: none; }
.games .t { font-family: var(--display); font-size: 17px; font-weight: 600; display: block; }
.games .d { font-size: 13px; color: #776d8c; line-height: 1.35; display: block; }

/* tela "deite o celular" (iPhone/sem trava): antes do 3-2-1 nas corridas; some sozinha ao virar */
.turn { z-index: 60; text-align: center; color: #fff; }
.turn-in { max-width: 320px; padding: 24px; }
.turn h2 { font-size: 26px; margin: 22px 0 8px; }
.turn p { color: rgba(255,255,255,.78); margin: 0 0 22px; }
.turn-phone { width: 64px; height: 112px; margin: 0 auto; border: 4px solid #fff; border-radius: 14px; position: relative;
  animation: turn-rot 2.4s cubic-bezier(.6,0,.3,1) infinite; box-shadow: 0 0 40px rgba(255,200,90,.35); }
.turn-screen { position: absolute; inset: 8px 5px; border-radius: 6px; background: linear-gradient(135deg, #ffcf5a, #ff5a6e); }
@keyframes turn-rot { 0%, 25% { transform: rotate(0); } 55%, 85% { transform: rotate(-90deg); } 100% { transform: rotate(0); } }
@media (prefers-reduced-motion: reduce) { .turn-phone { animation: none; transform: rotate(-90deg); } }
.turn .btn { background: rgba(255,255,255,.1); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.3); }
