/* ============================================================
   Tema base estilo Spotify + 4 identidades visuais
   (default, estresse, outro, espera) controladas por
   body[data-theme="..."] — os elementos fazem transição suave
   quando as variáveis mudam.
   ============================================================ */

:root {
  --bg: #121212;
  --bg-card: #181818;
  --bg-tile: #2a2a2a;
  --text: #ffffff;
  --text-sub: #b3b3b3;
  --accent: #1db954;
  --accent-bright: #1ed760;
  --accent-soft: rgba(30, 215, 96, 0.18);
  --on-accent: #000000;
  --card-msg: #2563eb;
  --tile-glass: rgba(255, 255, 255, 0.1);
  --track-bg: rgba(255, 255, 255, 0.2);
  --play-icon: #000000;
  --radius: 8px;
  --transicao-tema: 1.4s cubic-bezier(0.45, 0, 0.2, 1);
}

/* --- Identidade "ESTRESSE - Alee": campo enfumaçado, terno
       escuro e labaredas vermelhas cortando a cena --- */
body[data-theme="estresse"] {
  --bg: #161013;
  --bg-card: #221418;
  --bg-tile: #321b1e;
  --text-sub: #c9a8a8;
  --accent: #ff4b2e;
  --accent-bright: #ff6a45;
  --accent-soft: rgba(255, 75, 46, 0.2);
  --on-accent: #1a0703;
  --card-msg: #8c2418;
}

/* --- Identidade "Outro - Yunk Vino": serra esverdeada na
       janela, neblina e o quente da madeira por baixo --- */
body[data-theme="outro"] {
  --bg: #151a10;
  --bg-card: #212a1a;
  --bg-tile: #2f3a22;
  --text-sub: #c4d0ac;
  --accent: #9cbf6a;
  --accent-bright: #b8d985;
  --accent-soft: rgba(156, 191, 106, 0.22);
  --on-accent: #16200a;
  --card-msg: #54663a;
}

/* --- Identidade "Espera - nabru": moldura branca de foto
       analógica com o rosa forte do hibisco --- */
body[data-theme="espera"] {
  --bg: #f6f1ec;
  --bg-card: #ffffff;
  --bg-tile: #f3e2ea;
  --text: #322734;
  --text-sub: #8a7484;
  --accent: #ec4d92;
  --accent-bright: #f43f8e;
  --accent-soft: rgba(236, 77, 146, 0.22);
  --on-accent: #ffffff;
  --card-msg: #e15b9b;
  --tile-glass: rgba(50, 39, 52, 0.07);
  --track-bg: rgba(50, 39, 52, 0.18);
  --play-icon: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  transition: background-color var(--transicao-tema), color var(--transicao-tema);
}

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
img { display: block; }

/* ===== Camadas de fundo (crossfade entre identidades) ===== */
.bg-stack {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.bg-layer {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100%;
  max-width: 480px;
  opacity: 0;
  transform: translateX(-50%) scale(1.04);
  transition: opacity 2s cubic-bezier(0.45, 0, 0.2, 1), transform 2.4s cubic-bezier(0.3, 0, 0.2, 1);
  will-change: opacity, transform;
}
.bg-layer.active { opacity: 1; transform: translateX(-50%) scale(1); }

.bg-default {
  background: linear-gradient(180deg, #3a1d5c 0%, #121212 55%);
}
.bg-estresse {
  background:
    radial-gradient(110% 50% at 80% 30%, rgba(255, 64, 24, 0.34) 0%, transparent 60%),
    radial-gradient(90% 40% at 10% 45%, rgba(255, 96, 40, 0.18) 0%, transparent 65%),
    linear-gradient(180deg, #46505c 0%, #2c2026 38%, #161013 70%);
}
.bg-outro {
  background:
    radial-gradient(120% 55% at 50% 0%, rgba(255, 230, 170, 0.26) 0%, transparent 60%),
    radial-gradient(90% 40% at 80% 30%, rgba(116, 168, 132, 0.3) 0%, transparent 65%),
    linear-gradient(180deg, #6d8a55 0%, #45502c 38%, #151a10 72%);
}
.bg-espera {
  background:
    radial-gradient(95% 45% at 72% 16%, rgba(244, 63, 142, 0.3) 0%, transparent 58%),
    radial-gradient(85% 40% at 12% 45%, rgba(167, 209, 189, 0.45) 0%, transparent 62%),
    linear-gradient(180deg, #fbdce9 0%, #f8eef0 42%, #f6f1ec 75%);
}

.app {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  padding: 16px 16px calc(80px + env(safe-area-inset-bottom));
  min-height: 100dvh;
}

/* ===== Cabeçalho ===== */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 16px;
}
.header-left { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  transition: border-color var(--transicao-tema);
}
.header h1 { font-size: 1.8rem; font-weight: 800; letter-spacing: 0.02em; }
.header-heart {
  font-size: 1.2rem;
  transition: transform 0.15s;
}
.header-heart:active { transform: scale(1.3); }

/* ===== Atalhos rápidos ===== */
.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 24px;
}
.quick-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--tile-glass);
  border-radius: 6px;
  overflow: hidden;
  text-align: left;
  height: 52px;
  backdrop-filter: blur(10px);
  transition: background-color var(--transicao-tema);
}
.quick-tile:active { filter: brightness(1.3); }
.quick-tile img { width: 52px; height: 52px; object-fit: cover; flex-shrink: 0; }
.quick-tile span { font-size: 0.8rem; font-weight: 700; padding-right: 8px; }

/* ===== Seções ===== */
.section { margin-bottom: 28px; }
.section-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 4px; }
.section-sub { color: var(--text-sub); font-size: 0.85rem; margin-bottom: 14px; }
.section-head { display: flex; align-items: center; gap: 10px; }

/* Equalizer animado ao lado do título */
.equalizer { display: flex; align-items: flex-end; gap: 2px; height: 16px; }
.equalizer[hidden] { display: none; }
.equalizer span {
  width: 3px;
  border-radius: 2px;
  background: var(--accent-bright);
  animation: eq 0.9s ease-in-out infinite;
  transition: background-color var(--transicao-tema);
}
.equalizer span:nth-child(1) { height: 60%; animation-delay: 0s; }
.equalizer span:nth-child(2) { height: 100%; animation-delay: 0.2s; }
.equalizer span:nth-child(3) { height: 45%; animation-delay: 0.4s; }
.equalizer span:nth-child(4) { height: 80%; animation-delay: 0.1s; }
@keyframes eq {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}

/* ===== Player ===== */
.player-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 12px;
  transition: background-color var(--transicao-tema), box-shadow var(--transicao-tema);
}
.player-card.playing {
  box-shadow: 0 10px 40px var(--accent-soft);
}
.player-cover {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  margin-bottom: 16px;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.player-card.playing .player-cover { transform: scale(1.02); }
.player-song { font-size: 1.15rem; font-weight: 700; }
.player-artist { color: var(--text-sub); font-size: 0.9rem; margin-top: 2px; transition: color var(--transicao-tema); }

.player-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 6px;
  font-size: 0.7rem;
  color: var(--text-sub);
  font-variant-numeric: tabular-nums;
}
.progress-track {
  flex: 1;
  height: 4px;
  background: var(--track-bg);
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
  transition: background-color var(--transicao-tema);
}
.progress-fill {
  width: 0%;
  height: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: background-color var(--transicao-tema);
}
.player-card.playing .progress-fill { background: var(--accent-bright); }

.player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding: 4px 8px 0;
}
.ctrl svg { width: 24px; height: 24px; fill: var(--text-sub); transition: fill 0.2s; }
.ctrl:active svg { fill: var(--text); }
.ctrl.play {
  width: 56px;
  height: 56px;
  background: var(--text);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s, background-color var(--transicao-tema);
}
.ctrl.play:active { transform: scale(0.95); }
.ctrl.play svg { width: 24px; height: 24px; fill: var(--play-icon); transition: fill var(--transicao-tema); }
.player-card.playing .ctrl.play { background: var(--accent-bright); }
.player-card.playing .ctrl.play svg { fill: var(--on-accent); }

/* ===== Carrossel de músicas ===== */
.track-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 16px 0 4px;
  scrollbar-width: none;
}
.track-row::-webkit-scrollbar { display: none; }
.track-card {
  position: relative;
  flex: 0 0 124px;
  text-align: left;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 10px;
  border: 1px solid transparent;
  transition: background-color var(--transicao-tema), border-color 0.4s, transform 0.15s;
}
.track-card:active { transform: scale(0.97); }
.track-card.active { border-color: var(--accent); background: var(--bg-tile); }
.track-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 8px;
}
.track-card .track-name { font-size: 0.82rem; font-weight: 700; }
.track-card small { color: var(--text-sub); font-size: 0.7rem; transition: color var(--transicao-tema); }

/* Selo "tocando" sobre a capa da faixa ativa */
.track-playing-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
  padding: 3px 5px;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 4px;
}
.track-card.is-playing .track-playing-badge { display: flex; }
.track-playing-badge span {
  width: 2.5px;
  border-radius: 1px;
  background: var(--accent-bright);
  animation: eq 0.9s ease-in-out infinite;
}
.track-playing-badge span:nth-child(1) { height: 55%; }
.track-playing-badge span:nth-child(2) { height: 100%; animation-delay: 0.25s; }
.track-playing-badge span:nth-child(3) { height: 70%; animation-delay: 0.45s; }

/* ===== Sobre o casal ===== */
.sobre-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
}
.sobre-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.sobre-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  padding: 6px 10px;
  border-radius: 20px;
}

/* ===== Em sintonia (blend + flores) ===== */
.duo-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.blend-card, .flores-card {
  border-radius: 12px;
  padding: 18px 14px;
  text-align: center;
  background: var(--bg-card);
  transition: background-color var(--transicao-tema);
}
.blend-avatars {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}
.blend-avatars img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  transition: border-color var(--transicao-tema);
}
.blend-avatars img:last-child { margin-left: -12px; }
.blend-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--text-sub);
  margin-bottom: 6px;
  transition: color var(--transicao-tema);
}
.blend-percent {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent-bright);
  line-height: 1.1;
  transition: color var(--transicao-tema);
}
.blend-bar {
  height: 5px;
  border-radius: 3px;
  background: var(--track-bg);
  margin: 10px 6px 8px;
  overflow: hidden;
  transition: background-color var(--transicao-tema);
}
.blend-fill {
  width: 0%;
  height: 100%;
  border-radius: 3px;
  background: var(--accent-bright);
  transition: width 1.4s cubic-bezier(0.22, 1, 0.36, 1), background-color var(--transicao-tema);
}
.blend-caption { font-size: 0.72rem; color: var(--text-sub); transition: color var(--transicao-tema); }

.flores-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: transform 0.15s, background-color var(--transicao-tema);
}
.flores-card:active { transform: scale(0.96); }
.flores-icon { font-size: 1.6rem; color: var(--accent-bright); margin-bottom: 6px; transition: color var(--transicao-tema); }
.flores-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--text-sub);
  margin-bottom: 4px;
  transition: color var(--transicao-tema);
}
.flores-nome { font-size: 1.05rem; font-weight: 700; }
.flores-e { font-size: 0.8rem; color: var(--text-sub); }

/* ===== Contador ===== */
.counter-wrap { display: flex; flex-direction: column; gap: 10px; }
.counter-hero {
  position: relative;
  border-radius: 14px;
  padding: 26px 16px 22px;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--accent-soft);
  box-shadow: 0 8px 32px var(--accent-soft);
  overflow: hidden;
  transition: background-color var(--transicao-tema), border-color var(--transicao-tema), box-shadow var(--transicao-tema);
}
.counter-hero-heart {
  display: block;
  font-size: 1rem;
  color: var(--accent-bright);
  animation: pulse 1.6s ease-in-out infinite;
  margin-bottom: 6px;
  transition: color var(--transicao-tema);
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  35% { transform: scale(1.25); }
}
.counter-hero strong {
  display: block;
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, var(--text) 30%, var(--accent-bright));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.counter-hero-label {
  display: block;
  margin-top: 8px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--text-sub);
  transition: color var(--transicao-tema);
}
.counter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.counter-box {
  background: var(--bg-tile);
  border-radius: var(--radius);
  padding: 14px 8px;
  text-align: center;
  transition: background-color var(--transicao-tema);
}
.counter-box strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.counter-box span {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text-sub);
  transition: color var(--transicao-tema);
}
.counter-box strong.tick, .counter-hero strong.tick { animation: tickpop 0.45s ease; }
@keyframes tickpop {
  0% { transform: scale(1); }
  40% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

/* ===== Mensagem especial ===== */
.message-card {
  position: relative;
  background: var(--card-msg);
  border-radius: 12px;
  padding: 20px;
  overflow: hidden;
  transition: background-color var(--transicao-tema);
}
.message-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(0, 0, 0, 0.18));
  pointer-events: none;
}
.message-card > * { position: relative; }
.message-card h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 12px; }
.msg-saudacao { font-weight: 600; margin-bottom: 10px; }
.msg-texto {
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 16px;
  white-space: pre-line;
}
.msg-btn {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 700;
  transition: background 0.2s;
}
.msg-btn:active { background: rgba(255, 255, 255, 0.3); }

/* ===== Memórias ===== */
.memo-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 0 8px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.memo-row::-webkit-scrollbar { display: none; }
.memo-card {
  flex: 0 0 200px;
  scroll-snap-align: start;
  background: var(--bg-card);
  border-radius: 10px;
  padding: 10px 10px 12px;
  transition: background-color var(--transicao-tema);
}
.memo-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 10px;
}
.memo-card figcaption {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-sub);
  line-height: 1.35;
  transition: color var(--transicao-tema);
}

/* ===== CTA do story ===== */
.story-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  background: var(--accent);
  border-radius: 12px;
  padding: 16px;
  text-align: left;
  transition: transform 0.1s, background-color var(--transicao-tema);
}
.story-cta:active { transform: scale(0.98); background: var(--accent-bright); }
.story-cta-icon {
  width: 44px;
  height: 44px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  color: #fff;
}
.story-cta strong { display: block; font-size: 1rem; color: var(--on-accent); }
.story-cta small { color: var(--on-accent); opacity: 0.75; font-size: 0.8rem; font-weight: 600; }

/* ===== Rodapé ===== */
.footer {
  text-align: center;
  color: var(--text-sub);
  font-size: 0.75rem;
  padding: 12px 0 24px;
  transition: color var(--transicao-tema);
}

/* ===== Navegação inferior ===== */
:root { --nav-bg: rgba(8, 8, 8, 0.72); }
body[data-theme="espera"] { --nav-bg: rgba(255, 252, 250, 0.82); }
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
  justify-content: space-around;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
  z-index: 5;
  transition: background-color var(--transicao-tema);
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-sub);
  font-size: 0.65rem;
}
.nav-item svg { width: 24px; height: 24px; fill: currentColor; }
.nav-item.active { color: var(--text); }

/* ===== Story overlay ===== */
.story-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 100;
  max-width: 480px;
  margin: 0 auto;
}
.story-overlay[hidden] { display: none; }

.story-progress {
  position: absolute;
  top: calc(8px + env(safe-area-inset-top));
  left: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
  z-index: 4;
}
.story-progress .seg {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  overflow: hidden;
}
.story-progress .seg::after {
  content: "";
  display: block;
  height: 100%;
  width: 0%;
  background: #fff;
}
.story-progress .seg.done::after { width: 100%; }
.story-progress .seg.current::after {
  width: 100%;
  animation: fillbar 6s linear forwards;
}
@keyframes fillbar { from { width: 0%; } to { width: 100%; } }

.story-top {
  position: absolute;
  top: calc(20px + env(safe-area-inset-top));
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 4;
}
.story-close {
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.story-slide { position: absolute; inset: 0; overflow: hidden; }
.story-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: kenburns 7s ease-out forwards;
}
@keyframes kenburns {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}
.story-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.story-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, transparent 25%, transparent 55%, rgba(0, 0, 0, 0.85) 100%);
  pointer-events: none;
}

.story-caption {
  position: absolute;
  left: 20px;
  right: 80px;
  bottom: calc(48px + env(safe-area-inset-bottom));
  z-index: 2;
}
.story-title { font-size: 1.8rem; font-weight: 800; margin-bottom: 8px; }
.story-sub { color: #d7d7d7; font-size: 0.9rem; line-height: 1.4; }

.story-like {
  position: absolute;
  right: 16px;
  bottom: calc(64px + env(safe-area-inset-bottom));
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  color: #d7d7d7;
}
.story-like svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.5;
  transition: fill 0.2s, stroke 0.2s, transform 0.2s;
}
.story-like.liked svg { fill: var(--accent-bright); stroke: var(--accent-bright); transform: scale(1.15); }

/* Slide final — a arte do casal desfocada ao fundo, com
   brilho pulsando ao redor da foto e conteúdo subindo suave */
.story-final {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: #0d0a14;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  text-align: center;
  overflow: hidden;
}
.story-final[hidden] { display: none; }
.story-final::before {
  content: "";
  position: absolute;
  inset: -8%;
  background: url("../map.jpg") center / cover no-repeat;
  filter: blur(22px) brightness(0.4) saturate(1.3);
  animation: final-zoom 16s ease-in-out infinite alternate;
}
@keyframes final-zoom {
  from { transform: scale(1); }
  to { transform: scale(1.12); }
}
.story-final::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(80% 55% at 50% 42%, rgba(220, 38, 60, 0.22) 0%, transparent 65%),
    linear-gradient(180deg, rgba(13, 10, 20, 0.45) 0%, transparent 35%, rgba(13, 10, 20, 0.75) 100%);
}
.story-final > * { position: relative; z-index: 1; }
.story-final img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.55);
  margin-bottom: 28px;
  animation: final-glow 2.4s ease-in-out infinite, final-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes final-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.25), 0 12px 50px rgba(220, 38, 60, 0.35); }
  50% { box-shadow: 0 0 0 14px rgba(255, 255, 255, 0.06), 0 12px 60px rgba(220, 38, 60, 0.5); }
}
.final-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 12px;
  animation: final-rise 0.9s 0.15s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.final-names {
  font-size: 2.2rem;
  font-weight: 800;
  color: #ffe3ea;
  text-shadow: 0 4px 30px rgba(220, 38, 60, 0.45);
  animation: final-rise 0.9s 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.final-since {
  margin-top: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.6);
  animation: final-rise 0.9s 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes final-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Áreas de toque para navegar */
.story-tap-left, .story-tap-right {
  position: absolute;
  top: 80px;
  bottom: 140px;
  width: 35%;
  z-index: 3;
}
.story-tap-left { left: 0; }
.story-tap-right { right: 0; width: 65%; }

/* ===== Mockup das flores ===== */
.flores-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.flores-overlay[hidden] { display: none; }
.flores-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 6, 10, 0.7);
  backdrop-filter: blur(14px);
}
.flores-overlay.open .flores-backdrop { animation: fade-in 0.5s ease both; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.flores-modal {
  position: relative;
  z-index: 2;
  width: min(330px, 86vw);
  background: linear-gradient(180deg, #1c1016 0%, #120a0f 100%);
  border: 1px solid rgba(247, 168, 200, 0.25);
  border-radius: 18px;
  padding: 14px 14px 22px;
  text-align: center;
  box-shadow: 0 24px 80px rgba(244, 63, 142, 0.25);
}
.flores-overlay.open .flores-modal {
  animation: bloom 0.85s cubic-bezier(0.34, 1.45, 0.5, 1) both;
}
@keyframes bloom {
  0% { opacity: 0; transform: scale(0.25) rotate(-10deg); }
  60% { opacity: 1; transform: scale(1.04) rotate(1.5deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}
.flores-frame {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}
.flores-frame img {
  width: 100%;
  max-height: 56vh;
  object-fit: cover;
  animation: flores-reveal 1.6s 0.25s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes flores-reveal {
  from { transform: scale(1.25); filter: saturate(0.4) brightness(0.6); }
  to { transform: scale(1); filter: saturate(1) brightness(1); }
}
.flores-close {
  position: absolute;
  top: -14px;
  right: -10px;
  width: 38px;
  height: 38px;
  background: #f43f8e;
  color: #fff;
  border-radius: 50%;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(244, 63, 142, 0.5);
  z-index: 3;
}
.flores-modal-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  color: #f7a8c8;
  margin-bottom: 6px;
  animation: final-rise 0.7s 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.flores-modal-titulo {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  animation: final-rise 0.7s 0.62s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.flores-modal-sub {
  margin-top: 6px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.65);
  animation: final-rise 0.7s 0.74s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Pétalas caindo */
.flores-petals {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}
.petal {
  position: absolute;
  top: -8vh;
  animation: petal-fall linear infinite;
  text-shadow: 0 2px 12px rgba(244, 63, 142, 0.4);
}
@keyframes petal-fall {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  8% { opacity: 0.95; }
  50% { transform: translate(var(--sway, 40px), 55vh) rotate(160deg); }
  100% { transform: translate(calc(var(--sway, 40px) * -0.4), 116vh) rotate(320deg); opacity: 0.7; }
}

/* ===== Corações pela tela ===== */
.hearts-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 200;
  overflow: hidden;
}
.heart-float {
  position: absolute;
  bottom: -40px;
  animation: heart-rise 3s ease-out forwards;
  will-change: transform, opacity;
}
@keyframes heart-rise {
  0% { transform: translate(0, 0) scale(0.4) rotate(-8deg); opacity: 0; }
  12% { opacity: 1; }
  100% {
    transform: translate(var(--drift, 0px), -105vh) scale(1.15) rotate(10deg);
    opacity: 0;
  }
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(12px);
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid var(--accent-soft);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 24px;
  z-index: 210;
  opacity: 0;
  transition: opacity 0.4s, transform 0.4s;
  pointer-events: none;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== Telas maiores ===== */
@media (min-width: 480px) {
  .app { border-left: 1px solid #222; border-right: 1px solid #222; }
}
