/* NÔ — estilos. Mobile-first; centrado em ecrãs largos. */

:root,
[data-theme="rosa"] {
  --bg: #fbf6f3;
  --surface: #ffffff;
  --surface-2: #f6ece8;
  --ink: #2b1d22;
  --muted: #7d6a70;
  --line: #ecdcd6;
  --accent: #c8416a;
  --accent-ink: #ffffff;
  --accent-soft: #fbe3ea;
  --hero-a: #f6c9d4;
  --hero-b: #fbe9dc;
  --danger: #c0392b;
  --ok: #2f8f5b;
  --shadow: 0 1px 2px rgb(60 20 30 / 6%), 0 8px 24px rgb(60 20 30 / 7%);
  color-scheme: light;
}
[data-theme="vinho"] {
  --bg: #f8f2f0; --surface: #fff; --surface-2: #f1e3e1; --ink: #2a1418; --muted: #7a5d62; --line: #e8d4d2;
  --accent: #8e1f3a; --accent-soft: #f3dce1; --hero-a: #e6b8c1; --hero-b: #f4e1d8;
}
[data-theme="terra"] {
  --bg: #f8f4ee; --surface: #fffdf9; --surface-2: #efe6da; --ink: #2d241b; --muted: #7b6b5a; --line: #e6dccd;
  --accent: #b5652b; --accent-soft: #f6e4d4; --hero-a: #ecc9a6; --hero-b: #f5ead9;
}
[data-theme="oceano"] {
  --bg: #f2f7f8; --surface: #fff; --surface-2: #e2eef1; --ink: #13262c; --muted: #5a7279; --line: #d5e4e8;
  --accent: #1f7a8c; --accent-soft: #d8eef2; --hero-a: #b6dde4; --hero-b: #e8f3ef;
}
[data-theme="noite"] {
  --bg: #15111a; --surface: #201a26; --surface-2: #2a2231; --ink: #f3ecf2; --muted: #a998a8; --line: #3a3042;
  --accent: #f07da0; --accent-ink: #1a1016; --accent-soft: #3d2533; --hero-a: #3a2340; --hero-b: #241b2c;
  --danger: #ff7a6b; --ok: #6fd39b;
  --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 30%);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}
body.no-scroll { overflow: hidden; }
h1, h2, h3, .brand-mark, .couple-names, .hero-title, .letter h2, .letter-body, .countdown {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
}
h1 { font-size: 1.75rem; line-height: 1.2; margin: 0 0 .25rem; letter-spacing: -.01em; }
h2 { font-size: 1.2rem; margin: 0 0 .5rem; }
p { margin: 0 0 .75rem; }
a { color: inherit; }
img, video { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; }

#app { max-width: 560px; margin: 0 auto; }
.view { padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); outline: none; display: flex; flex-direction: column; gap: 16px; }
.view-plain { padding-bottom: 32px; }
body:not(.has-tabbar) .view { padding-bottom: 32px; }

.muted { color: var(--muted); }
.small { font-size: .9rem; }
.tiny { font-size: .78rem; }
.center { text-align: center; }
.row { display: flex; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.gap { gap: 10px; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.link { color: var(--accent); text-decoration: none; font-weight: 600; }
.select { user-select: all; }
[hidden] { display: none !important; }

/* ------------------------------------------------ Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; min-height: 44px; border-radius: 999px; border: 1.5px solid var(--accent);
  background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform .08s ease, opacity .15s ease, background .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-lg { min-height: 52px; font-size: 1.05rem; width: 100%; }
.btn-small { min-height: 34px; padding: 6px 14px; font-size: .9rem; }
.btn-ghost { background: transparent; color: var(--accent); border-color: var(--line); }
.btn-icon { padding: 0; width: 48px; min-width: 48px; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger-text { color: var(--danger); }
.btn-mpesa { background: #e60000; border-color: #e60000; color: #fff; }
.btn.is-busy::after {
  content: ""; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite;
}
.btn-story { font-family: inherit; font-size: 1.1rem; }

/* ------------------------------------------------ Formulários */
.field { display: flex; flex-direction: column; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span, .field > legend { font-size: .9rem; font-weight: 600; color: var(--muted); padding: 0; }
.field em { font-weight: 400; font-style: normal; opacity: .8; }
.field small { color: var(--muted); font-size: .82rem; }
input:not([type=radio]):not([type=checkbox]):not([type=file]), textarea {
  width: 100%; padding: 12px 14px; min-height: 48px; border-radius: 14px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
  transition: border-color .15s;
}
input:focus, textarea:focus { border-color: var(--accent); outline: none; }
textarea { resize: vertical; line-height: 1.55; }
.code-input { text-transform: uppercase; letter-spacing: .2em; font-weight: 700; text-align: center; font-size: 1.2rem !important; }
.form-error { color: var(--danger); font-size: .92rem; margin: 0; background: color-mix(in srgb, var(--danger) 9%, transparent); padding: 10px 12px; border-radius: 12px; }
.note { background: var(--accent-soft); border-radius: 14px; padding: 12px 14px; margin: 0; }

.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices label, .icon-pick label { cursor: pointer; }
.choices input, .icon-pick input, .plan-opt input { position: absolute; opacity: 0; pointer-events: none; }
.choices span {
  display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); font-size: .92rem;
}
.choices input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.choices input:focus-visible + span, .icon-pick input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); }

.icon-pick { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 6px; border: 0; margin: 0 -16px; padding-inline: 16px; scrollbar-width: none; }
.icon-pick span { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--line); font-size: 1.4rem; }
.icon-pick input:checked + span { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.06); }

.drop {
  display: flex; align-items: center; justify-content: center; min-height: 80px; padding: 16px; text-align: center;
  border: 2px dashed var(--line); border-radius: 18px; background: var(--surface); color: var(--muted); font-weight: 600; cursor: pointer;
}
.photo-preview { border-radius: 18px; max-height: 340px; object-fit: cover; width: 100%; }
.file-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-2); border-radius: 999px; padding: 4px 6px 4px 12px; font-size: .85rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip button { border: 0; background: none; cursor: pointer; padding: 2px 6px; color: var(--muted); }

.uploads { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.uploads li { display: grid; grid-template-columns: 1fr 90px 28px; gap: 8px; align-items: center; font-size: .85rem; background: var(--surface); padding: 8px 12px; border-radius: 12px; }
.uploads .up-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uploads .up-state { text-align: right; color: var(--muted); font-size: .78rem; }
.uploads li.ok .up-state { color: var(--ok); }
.uploads li.fail .up-state { color: var(--danger); }
progress { width: 100%; height: 6px; appearance: none; border: 0; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--surface-2); }
progress::-webkit-progress-value { background: var(--accent); border-radius: 99px; }
progress::-moz-progress-bar { background: var(--accent); }

.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ------------------------------------------------ Cartões e secções */
.card { background: var(--surface); border-radius: 22px; padding: 18px; box-shadow: var(--shadow); text-decoration: none; display: block; }
.card.stack { display: flex; }
.section { display: flex; flex-direction: column; gap: 10px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 4px; }
.section-title { font-size: 1.1rem; margin: 6px 0 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; font-weight: 700; color: var(--accent); }
.pill { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); font-size: .8rem; font-weight: 600; width: fit-content; }
.pill-ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.pill-bad { background: color-mix(in srgb, var(--danger) 13%, transparent); color: var(--danger); }
.pill-hot { background: var(--accent); color: var(--accent-ink); }

.page-head { position: relative; padding-top: 6px; }
.page-head.with-back, .page-head:has(> .back) { padding-left: 44px; }
.page-head p { margin: 2px 0 0; }
.back {
  position: absolute; left: 0; top: 4px; width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 50%; background: var(--surface); box-shadow: var(--shadow); text-decoration: none; font-size: 1.6rem; line-height: 1; padding-bottom: 3px;
}
.auth .back { position: static; margin-bottom: -8px; }
.back.on-image { position: absolute; top: calc(12px + env(safe-area-inset-top)); left: 12px; z-index: 2; }

.empty { text-align: center; padding: 40px 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty.small { padding: 18px 8px; }
.empty-icon { font-size: 2.6rem; }

.loading { display: grid; place-items: center; min-height: 50vh; }
.loading span { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------ Marca, boas-vindas, autenticação */
.brand { display: flex; justify-content: center; }
.brand-mark { font-size: 2.6rem; font-weight: 700; color: var(--accent); letter-spacing: .02em; }
.brand-mark.small { font-size: 1.3rem; }
.hero, .auth { display: flex; flex-direction: column; gap: 18px; padding-top: 6vh; }
.hero { text-align: center; }
.hero-title { font-size: 2rem; line-height: 1.15; }
.hero-sub { color: var(--muted); font-size: 1.05rem; }
.hero-points { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 10px; text-align: left; }
.hero-points li { display: flex; gap: 12px; align-items: center; background: var(--surface); padding: 12px 14px; border-radius: 16px; }
.hero-points span { font-size: 1.3rem; }
.invite-heart { font-size: 4rem; animation: beat 1.6s ease-in-out infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.12); } 30% { transform: scale(1); } 45% { transform: scale(1.08); } }

/* ------------------------------------------------ Início */
.couple-hero {
  position: relative; overflow: hidden; margin: -16px -16px 0; padding: calc(14px + env(safe-area-inset-top)) 16px 26px;
  background: linear-gradient(160deg, var(--hero-a), var(--hero-b)); text-align: center;
  border-radius: 0 0 32px 32px; isolation: isolate;
}
.couple-hero .cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.couple-hero.has-cover::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(0 0 0 / 25%), rgb(0 0 0 / 55%)); }
.couple-hero.has-cover { color: #fff; }
.couple-hero.has-cover .brand-mark, .couple-hero.has-cover .bell { color: #fff; }
.couple-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.bell { position: relative; width: 40px; height: 40px; display: grid; place-items: center; color: var(--ink); }
.bell svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.badge { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: .7rem; font-weight: 700; display: grid; place-items: center; }
.couple-avatars { display: flex; justify-content: center; }
.couple-avatars .avatar + .avatar { margin-left: -14px; }
.couple-names { font-size: 1.9rem; margin: 10px 0 0; }
.couple-name { margin: 0; opacity: .8; font-style: italic; }
.together { margin: 12px 0 0; display: flex; flex-direction: column; }
.together strong { font-size: 1.15rem; }
.together span { font-size: .85rem; opacity: .8; }
.together-set { display: inline-block; margin-top: 10px; font-weight: 600; text-decoration: none; }
.couple-hero .pill { margin-top: 10px; background: rgb(255 255 255 / 70%); color: #2b1d22; }

.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; display: inline-grid; place-items: center; flex: none; border: 3px solid var(--surface); }
.avatar.lg { width: 76px; height: 76px; font-size: 1.8rem; }
.avatar-letter { background: var(--accent); color: var(--accent-ink); font-weight: 700; font-family: Georgia, serif; }
.avatar-empty { background: var(--surface-2); color: var(--muted); border-style: dashed; border-color: var(--muted); }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tile { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 4px 10px; background: var(--surface); border-radius: 18px; text-decoration: none; font-size: .82rem; font-weight: 600; box-shadow: var(--shadow); }
.tile span { font-size: 1.6rem; }
.tile small { color: var(--muted); font-weight: 500; }

.invite { display: flex; flex-direction: column; gap: 10px; text-align: center; border: 2px dashed var(--accent); }
.invite-code { font: 700 1.8rem/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .14em; padding: 14px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); border: 0; cursor: copy; }

.challenge-card { display: flex; flex-direction: column; gap: 8px; border-left: 4px solid var(--accent); }
.challenge-card strong { font-family: Georgia, serif; font-size: 1.1rem; font-weight: 600; }

.memory-row { display: flex; gap: 12px; align-items: center; background: var(--surface); padding: 10px; border-radius: 18px; text-decoration: none; box-shadow: var(--shadow); }
.memory-row img, .memory-row-icon { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; flex: none; }
.memory-row-icon { display: grid; place-items: center; background: var(--accent-soft); font-size: 1.6rem; }
.memory-row div { display: flex; flex-direction: column; min-width: 0; }
.memory-row strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.memory-row small { color: var(--muted); }

.upsell { display: flex; gap: 10px; align-items: center; padding: 14px 16px; border-radius: 18px; background: linear-gradient(120deg, var(--accent-soft), var(--surface)); text-decoration: none; font-size: .92rem; }

/* ------------------------------------------------ Linha do tempo */
.timeline, .timeline ol { list-style: none; margin: 0; padding: 0; }
.tl-year > h2 { position: sticky; top: 0; z-index: 1; background: var(--bg); padding: 10px 0 6px; font-size: 1.5rem; color: var(--accent); }
.tl-year > ol { position: relative; padding-left: 26px; display: flex; flex-direction: column; gap: 12px; padding-bottom: 12px; }
.tl-year > ol::before { content: ""; position: absolute; left: 10px; top: 0; bottom: 0; width: 2px; background: var(--line); border-radius: 2px; }
.tl-item { position: relative; }
.tl-dot { position: absolute; left: -32px; top: 12px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--line); font-size: 1rem; z-index: 1; }
.tl-card { display: flex; gap: 12px; align-items: center; background: var(--surface); border-radius: 18px; padding: 12px 12px 12px 18px; text-decoration: none; box-shadow: var(--shadow); }
.tl-card img { width: 72px; height: 72px; border-radius: 14px; object-fit: cover; flex: none; }
.tl-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tl-body small { color: var(--muted); font-size: .8rem; }
.tl-body strong { font-size: 1.02rem; }
.tl-body p { margin: 4px 0 0; color: var(--muted); font-size: .88rem; }
.tl-milestone { padding: 12px 0 12px 18px; }
.tl-milestone .tl-dot { background: var(--accent-soft); border-color: var(--accent); }
.tl-milestone strong { color: var(--accent); font-family: Georgia, serif; font-size: 1.1rem; }

/* ------------------------------------------------ Memória */
.memory-hero { margin: -16px -16px 0; height: 46vh; max-height: 420px; min-height: 200px; position: relative; background: linear-gradient(160deg, var(--hero-a), var(--hero-b)); display: grid; place-items: center; overflow: hidden; }
.memory-hero img { width: 100%; height: 100%; object-fit: cover; }
.memory-hero:not(.has-cover) { height: 180px; min-height: 0; }
.memory-hero-icon { font-size: 4rem; }
.memory { display: flex; flex-direction: column; gap: 8px; margin-top: -28px; background: var(--bg); border-radius: 26px 26px 0 0; padding: 20px 0 0; position: relative; }
.memory-text { white-space: pre-wrap; font-size: 1.04rem; line-height: 1.65; }
.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; border-radius: 16px; overflow: hidden; }
.media-grid.dense { border-radius: 12px; }
.media-cell { position: relative; aspect-ratio: 1; padding: 0; border: 0; background: var(--surface-2); cursor: pointer; overflow: hidden; }
.media-cell img, .media-cell video { width: 100%; height: 100%; object-fit: cover; }
.media-cell .play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 1.6rem; text-shadow: 0 1px 6px rgb(0 0 0 / 50%); }
.media-cell.is-audio { display: grid; place-items: center; font-size: 2rem; }
.mini-map { height: 180px; border-radius: 18px; overflow: hidden; z-index: 0; }

.segmented { display: flex; background: var(--surface-2); padding: 4px; border-radius: 999px; }
.segmented button { flex: 1; border: 0; background: none; padding: 9px; border-radius: 999px; font-weight: 600; color: var(--muted); cursor: pointer; }
.segmented button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* ------------------------------------------------ Visualizador */
.viewer { position: fixed; inset: 0; z-index: 50; background: #000; color: #fff; display: flex; flex-direction: column; }
.viewer-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 10px 8px; font-size: .9rem; }
.viewer-actions { display: flex; gap: 6px; }
.viewer-btn { background: rgb(255 255 255 / 14%); border: 0; color: #fff; border-radius: 999px; padding: 8px 14px; cursor: pointer; min-height: 38px; }
.viewer-stage { flex: 1; display: grid; place-items: center; min-height: 0; padding-bottom: env(safe-area-inset-bottom); }
.viewer-stage img, .viewer-stage video { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer-audio { display: flex; flex-direction: column; align-items: center; gap: 16px; font-size: 4rem; }
.viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgb(255 255 255 / 14%); color: #fff; border: 0; width: 44px; height: 44px; border-radius: 50%; font-size: 1.8rem; cursor: pointer; }
.viewer-nav.prev { left: 10px; }
.viewer-nav.next { right: 10px; }

/* ------------------------------------------------ Cartas e cápsulas */
.letter-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.letter-row { display: flex; gap: 12px; align-items: center; background: var(--surface); padding: 14px; border-radius: 18px; text-decoration: none; box-shadow: var(--shadow); }
.letter-row div { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.letter-row small { color: var(--muted); }
.letter-row.locked { opacity: .85; }
.letter-row.new { border: 2px solid var(--accent); }
.letter-icon { font-size: 1.6rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.letter-paper { font-family: Georgia, serif; font-size: 1.05rem !important; background: repeating-linear-gradient(var(--surface), var(--surface) 30px, var(--line) 31px) !important; line-height: 31px !important; }
.letter { background: var(--surface); border-radius: 22px; padding: 26px 22px; box-shadow: var(--shadow); }
.letter-body { white-space: pre-wrap; font-size: 1.12rem; line-height: 1.75; margin: 12px 0; }
.letter-sign { text-align: right; font-family: Georgia, serif; font-style: italic; font-size: 1.1rem; }
.reveal { animation: reveal .9s cubic-bezier(.2, .8, .2, 1); }
@keyframes reveal { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }

.sealed { text-align: center; padding: 30px 10px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.seal { font-size: 4rem; width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); margin-bottom: 8px; }
.countdown { font-size: 1.8rem; color: var(--accent); margin-top: 6px; }
.countdown.small { font-size: 1rem; }
.capsules { display: grid; gap: 10px; }
.capsule { display: flex; flex-direction: column; gap: 2px; background: var(--surface); border-radius: 20px; padding: 16px; text-decoration: none; box-shadow: var(--shadow); position: relative; }
.capsule small { color: var(--muted); }
.capsule-icon { font-size: 1.6rem; }
.capsule.sealed-c { background: linear-gradient(140deg, var(--surface), var(--accent-soft)); }
.capsule.new { border: 2px solid var(--accent); }
.capsule .countdown { position: absolute; right: 16px; top: 16px; margin: 0; }
button.recording { background: var(--danger); color: #fff; border-color: var(--danger); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .75; } }

/* ------------------------------------------------ Desafio */
.challenge-main { text-align: center; background: linear-gradient(150deg, var(--hero-a), var(--hero-b)); }
.challenge-main h2 { font-size: 1.4rem; }
.answers { display: grid; gap: 12px; }
.answer { background: var(--surface); border-radius: 18px; padding: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.answer p { margin: 0; white-space: pre-wrap; }
.answer-who { display: flex; align-items: center; gap: 10px; }
.answer-photo { border-radius: 14px; width: 100%; max-height: 420px; object-fit: cover; }
.answer.waiting { align-items: center; text-align: center; color: var(--muted); border: 2px dashed var(--line); box-shadow: none; background: transparent; }
.history { display: grid; gap: 8px; }
.history summary { cursor: pointer; display: flex; flex-direction: column; list-style: none; }
.history summary::-webkit-details-marker { display: none; }
.history small { color: var(--muted); }
.history details[open] summary { margin-bottom: 12px; }

/* ------------------------------------------------ Mapa */
.map-full { height: calc(100dvh - 210px); min-height: 320px; border-radius: 22px; overflow: hidden; z-index: 0; }
.map-pick { height: 50vh; border-radius: 16px; overflow: hidden; margin-bottom: 12px; }
.pin span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--surface); border: 2px solid var(--accent); box-shadow: var(--shadow); font-size: 1.1rem; }
.pin i { transform: rotate(45deg); font-style: normal; }
.map-pop { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: #2b1d22; min-width: 160px; }
.map-pop img { width: 100%; height: 100px; object-fit: cover; border-radius: 8px; margin-bottom: 4px; }
.map-pop small { color: #7d6a70; }

/* ------------------------------------------------ Notificações */
.notes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.note-row { display: block; padding: 14px; border-radius: 16px; background: var(--surface); text-decoration: none; }
.note-row.unread { border-left: 4px solid var(--accent); }
.note-row p { margin: 2px 0; color: var(--muted); font-size: .92rem; }
.note-row small { color: var(--muted); font-size: .78rem; }

/* ------------------------------------------------ Perfil e plano */
.profile-head { display: flex; gap: 14px; align-items: center; }
.profile-head div { display: flex; flex-direction: column; min-width: 0; }
.avatar-edit { position: relative; cursor: pointer; }
.avatar-edit > .edit-badge { position: absolute; right: 0; bottom: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: .8rem; }
.themes { display: flex; gap: 10px; }
.theme-dot { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1.5px var(--line); cursor: pointer; }
.theme-dot.on { box-shadow: 0 0 0 3px var(--accent); }
.t-rosa { background: linear-gradient(135deg, #f6c9d4, #c8416a); }
.t-vinho { background: linear-gradient(135deg, #e6b8c1, #8e1f3a); }
.t-noite { background: linear-gradient(135deg, #3a2340, #f07da0); }
.t-terra { background: linear-gradient(135deg, #ecc9a6, #b5652b); }
.t-oceano { background: linear-gradient(135deg, #b6dde4, #1f7a8c); }
.plan-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.plan-card div { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.plan-card small { color: var(--muted); }
.danger-zone { border: 1.5px solid color-mix(in srgb, var(--danger) 35%, transparent); border-radius: 20px; padding: 16px; }
.danger-zone h2 { color: var(--danger); font-size: 1rem; }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plan-col { background: var(--surface); border-radius: 20px; padding: 16px 14px; }
.plan-col.plus { background: linear-gradient(160deg, var(--accent-soft), var(--surface)); border: 2px solid var(--accent); }
.plan-col ul { margin: 0; padding-left: 18px; font-size: .88rem; display: grid; gap: 6px; }
.plans { display: grid; gap: 10px; }
.plan-opt span { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 16px; border-radius: 18px; border: 2px solid var(--line); background: var(--surface); cursor: pointer; }
.plan-opt em { font-style: normal; color: var(--muted); }
.plan-opt b { margin-left: auto; }
.plan-opt input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.payments { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .9rem; }
.payments li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; background: var(--surface); padding: 10px 14px; border-radius: 14px; }
.steps { padding-left: 20px; display: grid; gap: 10px; }

/* ------------------------------------------------ Barra de navegação */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 560px; z-index: 20;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.tab { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; font-size: .7rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tab.on { color: var(--accent); }
.tab-add span { display: grid; place-items: center; width: 54px; height: 54px; margin-top: -26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 2rem; font-weight: 300; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 45%, transparent); border: 4px solid var(--bg); }

/* ------------------------------------------------ Folhas e avisos */
.sheet-wrap { position: fixed; inset: 0; z-index: 40; }
.sheet-backdrop { position: absolute; inset: 0; background: rgb(20 10 15 / 45%); opacity: 0; transition: opacity .25s; }
.sheet {
  position: absolute; left: 50%; bottom: 0; transform: translate(-50%, 100%); width: 100%; max-width: 560px; max-height: 92dvh; overflow: auto;
  background: var(--bg); border-radius: 26px 26px 0 0; padding: 10px 18px calc(20px + env(safe-area-inset-bottom));
  transition: transform .25s cubic-bezier(.2, .8, .2, 1); display: flex; flex-direction: column; gap: 12px;
}
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet-wrap.open .sheet { transform: translate(-50%, 0); }
.sheet-grip { width: 40px; height: 5px; border-radius: 99px; background: var(--line); margin: 0 auto 4px; }
.sheet-title { margin: 0; }

.toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); z-index: 60;
  background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 14px; font-size: .92rem; width: max-content; max-width: min(520px, calc(100% - 32px)); text-align: center;
  box-shadow: var(--shadow); opacity: 0; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-error { background: var(--danger); color: #fff; }
.toast-ok { background: var(--ok); color: #fff; }

/* Leaflet dentro do tema escuro */
[data-theme="noite"] .leaflet-container { background: #2a2231; }
.leaflet-popup-content { margin: 10px 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media (min-width: 600px) {
  .view { padding-top: 24px; }
  .couple-hero, .memory-hero { margin-top: -24px; border-radius: 0 0 32px 32px; }
}
.actions { margin-top: 12px; }
.row > input[type=time] { width: 128px !important; flex: none; }
.legal { padding-bottom: 48px; }
.legal h2 { margin-top: 12px; }
.legal ul { padding-left: 20px; display: grid; gap: 6px; }
.voice-box { background: var(--surface); border-radius: 18px; padding: 14px; gap: 8px; }
.voice-box p { margin: 0; }
.voice-preview { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.voice-preview audio, .letter-voice audio { width: 100%; }
.letter-voice { display: flex; flex-direction: column; gap: 8px; background: var(--accent-soft); border-radius: 16px; padding: 14px; margin: 8px 0; font-weight: 600; color: var(--accent); }
.share-preview { width: 62%; max-width: 280px; margin: 0 auto; border-radius: 18px; box-shadow: var(--shadow); aspect-ratio: 9 / 16; object-fit: cover; }
.icon-btn { border: 0; background: rgb(255 255 255 / 60%); color: inherit; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; font-size: 1.1rem; }
.couple-hero.has-cover .icon-btn { background: rgb(0 0 0 / 30%); color: #fff; }
.couple-top-right { display: flex; gap: 6px; align-items: center; }

/* Estou a pensar em ti */
.nudge { display: flex; align-items: center; gap: 14px; }
.nudge-btn {
  flex: none; width: 76px; height: 76px; border-radius: 50%; border: 0; cursor: pointer; font-size: 2.2rem;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--accent) 70%, #fff), var(--accent));
  box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 45%, transparent); transition: transform .12s;
  -webkit-tap-highlight-color: transparent;
}
.nudge-btn:active { transform: scale(.92); }
.nudge-btn.pop { animation: pop .5s ease; }
@keyframes pop { 30% { transform: scale(1.18); } 60% { transform: scale(.95); } }
.nudge-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nudge-text strong { font-family: Georgia, serif; font-size: 1.1rem; }
.nudge-text small { color: var(--muted); }
.nudge-text .recv { color: var(--accent); font-weight: 600; }
.float-heart { position: fixed; pointer-events: none; z-index: 70; font-size: 2rem; animation: floatUp 1.4s ease-out forwards; }
@keyframes floatUp { to { transform: translate(var(--dx), -260px) scale(1.4); opacity: 0; } }

.push-card { display: flex; gap: 12px; align-items: center; }
.push-card div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.push-card small { color: var(--muted); }
.pay-number { white-space: nowrap; font-size: 1.15rem; letter-spacing: .03em; color: var(--accent); }
.pay-claim { display: flex; flex-direction: column; gap: 10px; border-left: 4px solid var(--accent); }
.pay-code { font: 700 1.6rem/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .08em; user-select: all; }
.pay-amount { font-size: 1.3rem; font-weight: 700; display: flex; gap: 8px; align-items: center; }
.pay-claim dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: .92rem; }
.pay-claim dt { color: var(--muted); }
.pay-claim dd { margin: 0; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stats div { background: var(--surface); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; }
.stats strong { font-size: 1.25rem; }
.stats small { color: var(--muted); font-size: .8rem; }
/* Administração */
.admin-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 16px; }
.admin-tabs button { border: 0; background: none; border-radius: 12px; padding: 8px 2px; font-size: .7rem; font-weight: 600; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; }
.admin-tabs button span { font-size: 1.2rem; }
.admin-tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
[data-panel] { display: flex; flex-direction: column; gap: 12px; }
.stats.three { grid-template-columns: repeat(3, 1fr); }
.admin-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.admin-list li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--surface); padding: 12px 14px; border-radius: 14px; }
.admin-list li > div { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.admin-list small { color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.admin-list.compact li { padding: 8px 12px; background: var(--surface-2); }
.admin-list .clickable { cursor: pointer; }
.admin-list .clickable:active { transform: scale(.99); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; font-size: .9rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.admin-actions { border-top: 1px solid var(--line); padding-top: 12px; }
select { padding: 12px 14px; min-height: 48px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; }
.funnel-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; margin-bottom: 10px; }
.funnel-row small { grid-column: 1 / -1; color: var(--muted); font-size: .75rem; }
.funnel-bar { grid-column: 1 / -1; height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.funnel-bar span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; align-items: end; height: 120px; margin: 8px 0; }
.bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.bar span { width: 100%; min-height: 2px; background: var(--accent); border-radius: 6px 6px 2px 2px; }
.bar small { font-size: .55rem; color: var(--muted); }
.bc-preview { display: flex; flex-direction: column; gap: 2px; background: var(--surface-2); border-radius: 16px; padding: 12px 14px; font-size: .9rem; }
.bc-preview span { font-size: .72rem; color: var(--muted); }
.bc-preview small { color: var(--muted); }
.health { display: flex; flex-direction: column; gap: 4px; border-left: 4px solid var(--ok); }
.health.bad { border-left-color: var(--danger); }
.health small { color: var(--muted); }
.uploads li { grid-template-columns: 1fr 70px minmax(28px, auto); }
.uploads .up-retry { grid-column: 1 / -1; justify-self: start; }
/* Primeiros passos */
.steps-card { display: flex; flex-direction: column; gap: 10px; }
.steps-head { display: flex; align-items: center; gap: 10px; }
.steps-head div { flex: 1; display: flex; flex-direction: column; }
.steps-head strong { font-family: Georgia, serif; font-size: 1.15rem; }
.steps-head small { color: var(--muted); font-size: .85rem; }
.steps-progress { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.steps-progress span { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .4s; }
.steps-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.steps-card .step { display: flex; align-items: center; gap: 12px; padding: 9px 4px; text-decoration: none; border-radius: 12px; }
.steps-card .step > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.steps-card .step small { color: var(--muted); font-size: .8rem; }
.steps-card .check { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: .8rem; font-weight: 700; }
.steps-card li.done .check { background: var(--ok); border-color: var(--ok); color: #fff; }
.steps-card li.done strong { color: var(--muted); text-decoration: line-through; font-weight: 500; }
.steps-card li.next .step { background: var(--accent-soft); }
.steps-card li.next .check { border-color: var(--accent); }
.steps-card .go { color: var(--accent); font-size: 1.3rem; }
.ended { text-align: left; }
.ended h1, .ended > p { text-align: center; }
.ended-icon { font-size: 3.6rem; text-align: center; }

/* ------------------------------------------------ Conversa */
.tab { position: relative; }
.tab-badge { position: absolute; top: 2px; left: 50%; margin-left: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: .68rem; font-weight: 700; display: grid; place-items: center; }
body.chat-mode .tabbar { display: none; }
body.chat-mode .view { padding: 0; }
body.chat-mode { overflow: hidden; }
.chat {
  position: fixed; inset: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 560px;
  display: flex; flex-direction: column; background: var(--bg);
  background-image: radial-gradient(circle at 20px 20px, color-mix(in srgb, var(--accent) 7%, transparent) 2px, transparent 3px);
  background-size: 40px 40px;
}
.chat-head {
  display: flex; align-items: center; gap: 10px; padding: calc(8px + env(safe-area-inset-top)) 12px 8px;
  background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); z-index: 2;
}
.chat-head .avatar { width: 40px; height: 40px; border-width: 2px; }
.chat-back { font-size: 2rem; line-height: 1; text-decoration: none; padding: 0 6px 4px 0; color: var(--accent); }
.chat-who { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-who strong { font-size: 1.05rem; }
.chat-who small { color: var(--muted); font-size: .78rem; }
.chat-who small.typing { color: var(--accent); font-weight: 600; }
.chat-head .icon-btn { background: var(--accent-soft); }
.chat-head .icon-btn.pop { animation: pop .5s ease; }
.chat-list { flex: 1; overflow-y: auto; padding: 10px 10px 6px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.chat-more { text-align: center; margin: 4px 0 10px; }
.chat-day { text-align: center; margin: 12px 0 8px; }
.chat-day span { background: color-mix(in srgb, var(--surface) 90%, transparent); color: var(--muted); font-size: .75rem; font-weight: 600; padding: 4px 12px; border-radius: 99px; box-shadow: var(--shadow); text-transform: capitalize; }
.chat-empty { text-align: center; color: var(--muted); padding: 30vh 20px 0; }
.chat-empty div { font-size: 3rem; }

.msg { display: flex; flex-direction: column; margin: 2px 0; max-width: 82%; transition: transform .15s; position: relative; }
.msg.mine { margin-left: auto; align-items: flex-end; }
.msg.theirs { margin-right: auto; align-items: flex-start; }
.msg + .msg.mine, .msg + .msg.theirs { margin-top: 2px; }
.msg.theirs + .msg.mine, .msg.mine + .msg.theirs { margin-top: 10px; }
.msg-bubble { position: relative; padding: 7px 10px 6px; border-radius: 16px; box-shadow: 0 1px 1px rgb(0 0 0 / 8%); max-width: 100%; word-wrap: break-word; overflow-wrap: anywhere; }
.msg.mine .msg-bubble { background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 5px; }
.msg.theirs .msg-bubble { background: var(--surface); color: var(--ink); border-bottom-left-radius: 5px; }
.msg-text { margin: 0; white-space: pre-wrap; line-height: 1.4; }
.msg-text a { color: inherit; text-decoration: underline; }
.msg-meta { display: inline-flex; align-items: center; gap: 3px; float: right; margin: 6px 0 -2px 10px; font-size: .68rem; opacity: .75; white-space: nowrap; }
.ticks { letter-spacing: -3px; padding-right: 3px; }
.ticks.read { color: #9be7ff; opacity: 1; font-weight: 700; }
.msg.theirs .ticks { display: none; }
.msg-pending { font-size: .7rem; }
.msg-fail { color: #ffdddd; font-weight: 600; white-space: normal; }
.msg.theirs .msg-fail { color: var(--danger); }
.msg-deleted { margin: 0; font-style: italic; opacity: .7; }
.msg.has-media .msg-bubble { padding: 4px 4px 6px; }
.msg.has-media .msg-text, .msg.has-media .msg-meta { padding: 0 6px; }
.msg-img { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; }
.msg-img img { display: block; width: 240px; max-width: 100%; max-height: 320px; object-fit: cover; border-radius: 12px; background: rgb(0 0 0 / 8%); }
.msg-video { width: 260px; max-width: 100%; border-radius: 12px; display: block; background: #000; }
.msg-audio { width: 250px; max-width: 70vw; height: 40px; display: block; }
.msg-bubble progress { width: 100%; margin-top: 4px; }
.msg-quote { display: flex; flex-direction: column; text-align: left; width: 100%; border: 0; border-left: 3px solid currentColor; border-radius: 8px; background: rgb(0 0 0 / 10%); color: inherit; padding: 5px 8px; margin: 0 0 5px; cursor: pointer; font-size: .82rem; }
.msg.theirs .msg-quote { background: var(--surface-2); border-left-color: var(--accent); }
.msg-quote strong { font-size: .78rem; }
.msg-quote span { opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.msg-reacts { display: flex; gap: 2px; margin-top: -6px; padding: 1px 5px; background: var(--surface); border-radius: 99px; box-shadow: var(--shadow); font-size: .85rem; z-index: 1; }
.msg.mine .msg-reacts { margin-right: 8px; }
.msg.theirs .msg-reacts { margin-left: 8px; }
.msg.flash .msg-bubble { animation: flash 1.2s ease; }
@keyframes flash { 30% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 45%, transparent); } }
.chat-down { position: absolute; right: 14px; bottom: calc(80px + env(safe-area-inset-bottom)); width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--surface); box-shadow: var(--shadow); font-size: 1.2rem; cursor: pointer; z-index: 3; }
.chat-reply { display: flex; align-items: center; gap: 8px; margin: 0 10px; padding: 8px 10px; background: var(--surface); border-left: 4px solid var(--accent); border-radius: 12px 12px 0 0; }
.chat-reply div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-reply strong { color: var(--accent); font-size: .82rem; }
.chat-reply small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-compose { display: flex; align-items: flex-end; gap: 6px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 94%, transparent); border-top: 1px solid var(--line); }
.chat-compose textarea { flex: 1; min-height: 42px !important; max-height: 140px; padding: 10px 14px !important; border-radius: 22px !important; resize: none; line-height: 1.35; }
.chat-attach { flex: none; width: 42px; height: 42px; cursor: pointer; background: transparent; font-size: 1.25rem; }
.chat-send { flex: none; min-width: 44px; height: 44px; border-radius: 22px; border: 0; background: var(--accent); color: var(--accent-ink); font-size: 1.15rem; cursor: pointer; padding: 0 12px; }
.chat-mic.recording { background: var(--danger); color: #fff; font-size: .85rem; animation: pulse 1.2s infinite; }
.react-row { display: flex; justify-content: space-between; gap: 4px; background: var(--surface); border-radius: 99px; padding: 6px 8px; box-shadow: var(--shadow); }
.react-row button { border: 0; background: none; font-size: 1.6rem; padding: 4px; border-radius: 50%; cursor: pointer; transition: transform .1s; }
.react-row button:active { transform: scale(1.3); }
.react-row button.on { background: var(--accent-soft); }
.menu-list { display: flex; flex-direction: column; background: var(--surface); border-radius: 16px; overflow: hidden; }
.menu-list button { border: 0; background: none; text-align: left; padding: 14px 16px; font-size: 1rem; cursor: pointer; border-bottom: 1px solid var(--line); }
.menu-list button:last-child { border-bottom: 0; }
.menu-list .danger { color: var(--danger); }

/* ------------------------------------------------ Botões e ícones (estilo redes sociais) */
.ic { display: block; flex: none; }
.btn {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 88%, #fff), var(--accent) 55%, color-mix(in srgb, var(--accent) 82%, #000));
  border-color: transparent;
  box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--accent) 70%, transparent), inset 0 1px 0 rgb(255 255 255 / 18%);
  letter-spacing: .01em;
  transition: transform .12s ease, box-shadow .2s ease, filter .2s ease;
}
.btn:hover { filter: brightness(1.04); }
.btn:active { transform: scale(.97); box-shadow: 0 2px 8px -4px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn-ghost { background: var(--surface); color: var(--accent); border: 1.5px solid var(--line); box-shadow: 0 1px 2px rgb(0 0 0 / 4%); }
.btn-ghost:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.btn-danger { background: linear-gradient(135deg, #e0574a, var(--danger)); }
.btn-mpesa { background: linear-gradient(135deg, #ff3b30, #d40000); }

/* Botão redondo de ícone (cabeçalhos) */
.hbtn {
  position: relative; flex: none; width: 42px; height: 42px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: transparent; color: var(--accent); cursor: pointer; text-decoration: none; transition: background .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
}
.hbtn:hover { background: var(--accent-soft); }
.hbtn:active { transform: scale(.9); }
.hbtn-glass { background: rgb(255 255 255 / 55%); color: var(--ink); backdrop-filter: blur(8px); box-shadow: 0 2px 10px rgb(0 0 0 / 6%); }
.couple-hero.has-cover .hbtn-glass { background: rgb(0 0 0 / 28%); color: #fff; }
.hbtn-heart { color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 80%, #fff), var(--accent)); box-shadow: 0 4px 12px -4px var(--accent); }
.hbtn-heart:hover { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 80%, #fff), var(--accent)); filter: brightness(1.05); }
.hbtn-heart.pop { animation: pop .5s ease; }
.bell .badge { top: -2px; right: -2px; border: 2px solid var(--bg); }

/* Barra de baixo: separador activo com pastilha */
.tab svg { transition: transform .15s; }
.tab.on svg { transform: translateY(-1px); }
.tab.on::before { content: ""; position: absolute; top: 2px; width: 44px; height: 30px; border-radius: 99px; background: var(--accent-soft); z-index: -1; }
.tab { isolation: isolate; }
.tab-add span { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 85%, #fff), var(--accent) 60%, color-mix(in srgb, var(--accent) 80%, #000)); }

/* Início: botão do coração */
.nudge-btn { display: grid; place-items: center; color: #fff; font-size: 0; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 75%, #fff), var(--accent) 60%, color-mix(in srgb, var(--accent) 80%, #000)); }

/* Conversa: cabeçalho e barra de escrita */
.chat-back { display: grid; place-items: center; width: 34px; height: 42px; padding: 0; color: var(--accent); }
.chat-head { gap: 4px; }
.chat-head .avatar { margin-right: 6px; }
.chat-head .icon-btn { display: none; }
.chat-attach {
  flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  color: var(--accent); background: var(--accent-soft); transition: transform .1s;
}
.chat-attach:active { transform: scale(.9); }
.chat-send {
  display: grid; place-items: center; width: 44px; min-width: 44px; padding: 0; border-radius: 50%;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 85%, #fff), var(--accent) 60%, color-mix(in srgb, var(--accent) 80%, #000));
  box-shadow: 0 4px 12px -4px var(--accent); transition: transform .1s;
}
.chat-send:active { transform: scale(.9); }
.chat-send .ic { transform: translateX(1px); }
.chat-mic.recording { width: auto; padding: 0 14px; border-radius: 22px; background: var(--danger); box-shadow: 0 0 0 6px color-mix(in srgb, var(--danger) 20%, transparent); }
.chat-compose textarea { background: var(--surface) !important; border: 1.5px solid var(--line) !important; }
.chat-compose textarea:focus { border-color: var(--accent) !important; }
.chat-down { display: grid; place-items: center; color: var(--accent); }
.msg-bubble { box-shadow: 0 1px 2px rgb(0 0 0 / 7%); }
.msg.mine .msg-bubble { background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 90%, #fff), var(--accent)); }

/* ------------------------------------------------ Chamadas */
.call-screen {
  position: fixed; inset: 0; z-index: 80; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  background: radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--accent) 55%, #1a0f16), #120a10 70%);
  padding: calc(18px + env(safe-area-inset-top)) 20px calc(34px + env(safe-area-inset-bottom));
}
@keyframes fadeIn { from { opacity: 0; } }
.call-remote { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; display: none; }
.call-screen.is-video.is-connected .call-remote { display: block; }
.call-audio { display: none; }
.call-top { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 6vh; text-align: center; transition: margin .3s; }
.call-screen.is-video.is-connected .call-top { margin-top: 0; text-shadow: 0 1px 6px rgb(0 0 0 / 60%); }
.call-screen.is-video.is-connected .call-avatar { display: none; }
.call-lock { font-size: .75rem; opacity: .75; }
.call-avatar { width: 128px; height: 128px; border-radius: 50%; object-fit: cover; border: 3px solid rgb(255 255 255 / 25%); box-shadow: 0 0 0 0 rgb(255 255 255 / 35%); animation: ripple 2s infinite; }
.call-screen.is-connected .call-avatar { animation: none; }
.call-avatar-letter { display: grid; place-items: center; background: var(--accent); font: 700 3.2rem Georgia, serif; }
@keyframes ripple { 70% { box-shadow: 0 0 0 26px rgb(255 255 255 / 0%); } 100% { box-shadow: 0 0 0 0 rgb(255 255 255 / 0%); } }
.call-name { font-size: 1.9rem; margin: 6px 0 0; color: #fff; }
.call-status { margin: 0; opacity: .85; font-variant-numeric: tabular-nums; }
.call-local {
  position: absolute; z-index: 3; right: 16px; top: calc(16px + env(safe-area-inset-top)); width: 104px; height: 150px; object-fit: cover;
  border-radius: 16px; background: #222; box-shadow: 0 6px 20px rgb(0 0 0 / 45%); display: none;
}
.call-local.mirror { transform: scaleX(-1); }
.call-screen.is-video .call-local { display: block; }
.call-controls { position: relative; z-index: 3; display: flex; gap: 18px; align-items: center; justify-content: center; padding: 14px 18px; border-radius: 99px; background: rgb(255 255 255 / 10%); backdrop-filter: blur(16px); }
.call-incoming { background: none; backdrop-filter: none; gap: 64px; }
.call-incoming > div { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: .85rem; opacity: .95; }
.cbtn { width: 58px; height: 58px; border-radius: 50%; border: 0; display: grid; place-items: center; color: #fff; background: rgb(255 255 255 / 18%); cursor: pointer; transition: transform .1s, background .15s; }
.cbtn:active { transform: scale(.9); }
.cbtn.off { background: #fff; color: #222; }
.cbtn-end { background: #ff3b30; }
.cbtn-ok { background: #34c759; animation: bounce 1.2s infinite; }
.cbtn-xl { width: 72px; height: 72px; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.call-screen.is-ending { opacity: .85; }

/* Chamadas na conversa */
.msg-call { display: flex; justify-content: center; margin: 10px 0; }
.msg-call button { display: flex; align-items: center; gap: 10px; border: 0; background: var(--surface); color: var(--ink); padding: 8px 14px 8px 8px; border-radius: 16px; box-shadow: var(--shadow); cursor: pointer; text-align: left; }
.msg-call button span:last-child { display: flex; flex-direction: column; }
.msg-call strong { font-size: .9rem; }
.msg-call small { color: var(--muted); font-size: .72rem; }
.msg-call-ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.msg-call.missed .msg-call-ic { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.msg-call.missed strong { color: var(--danger); }

/* ------------------------------------------------ Início: 6 atalhos em 3 colunas */
.tiles { grid-template-columns: repeat(3, 1fr); }
.tile-gift small { color: var(--accent); font-weight: 700; }

/* ------------------------------------------------ Presentes: lista e editor */
.gift-list { display: grid; gap: 10px; }
.gift-card { display: flex; gap: 12px; align-items: center; background: var(--surface); border-radius: 20px; padding: 10px; text-decoration: none; box-shadow: var(--shadow); }
.gift-card-cover { width: 72px; height: 72px; border-radius: 16px; overflow: hidden; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.gift-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.gift-card-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.gift-card-body strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gift-card-body small { color: var(--muted); }
.btn .ic { margin-right: 2px; }
.drop .ic { margin-right: 8px; }
.gift-edit-photos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.gift-edit-photo { display: flex; flex-direction: column; gap: 6px; background: var(--surface-2); border-radius: 14px; padding: 6px; }
.gift-edit-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.gift-edit-photo input { min-height: 38px !important; padding: 6px 10px !important; font-size: .85rem; }
.gift-edit-photo .row { justify-content: space-between; }
.gift-edit-photo .btn-small { padding: 4px 10px; min-height: 32px; }
.gift-actions { display: flex; gap: 10px; position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 5; padding: 10px; margin: 0 -10px; border-radius: 22px; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); }
.gift-actions .btn { white-space: nowrap; }
.gift-share { display: flex; flex-direction: column; align-items: center; gap: 10px; border: 2px solid var(--accent); }
.gift-share-head { text-align: center; display: flex; flex-direction: column; }
.gift-share-head small { color: var(--muted); }
.gift-qr { width: 210px; height: 210px; background: #fff; padding: 10px; border-radius: 18px; box-shadow: var(--shadow); }
.gift-share-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
.gift-share-btns .btn:first-child { grid-column: 1 / -1; }

/* ------------------------------------------------ A página-presente */
body.gift-mode .view { padding: 0; }
.gift { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; text-align: center; padding: calc(24px + env(safe-area-inset-top)) 20px 48px; background: linear-gradient(170deg, var(--hero-a), var(--hero-b) 60%, var(--bg)); position: relative; overflow: hidden; }
.gift-preview-bar { position: sticky; top: 0; z-index: 9; align-self: stretch; margin: -12px -8px 12px; padding: 8px 12px; border-radius: 12px; background: rgb(0 0 0 / 70%); color: #fff; text-decoration: none; font-size: .85rem; }
.gift-kicker { color: var(--accent); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: .8rem; margin: 2vh 0 10px; }
.gift-envelope-screen { justify-content: center; gap: 6px; }
.gift-to { font-size: 2.2rem; margin: 18px 0 0; }
.gift-from { color: var(--muted); font-style: italic; font-family: Georgia, serif; font-size: 1.1rem; }
.gift-open-btn { max-width: 320px; margin-top: 12px; }
.gift-hint { color: var(--muted); font-size: .8rem; }
.gift-pin { width: 100%; max-width: 320px; }
.gift-pin label { display: flex; flex-direction: column; gap: 8px; font-size: .9rem; color: var(--muted); }
.gift-pin input { text-align: center; font-size: 1.4rem !important; letter-spacing: .4em; }

/* Envelope animado */
.gift-envelope { position: relative; width: 240px; height: 160px; border: 0; background: none; cursor: pointer; perspective: 800px; margin-top: 4vh; animation: floaty 3s ease-in-out infinite; }
@keyframes floaty { 50% { transform: translateY(-8px) rotate(-1deg); } }
.gift-envelope > span { position: absolute; left: 0; right: 0; }
.env-back { inset: 0; background: color-mix(in srgb, var(--accent) 80%, #000); border-radius: 12px; }
.env-letter { left: 14px !important; right: 14px !important; top: 14px; height: 130px; background: #fffaf6; border-radius: 8px; box-shadow: 0 2px 8px rgb(0 0 0 / 15%); display: grid; place-items: center; font-family: Georgia, serif; color: #2b1d22; font-size: 1.05rem; transition: transform .8s cubic-bezier(.2, .8, .2, 1) .35s; }
.env-front { inset: 0; border-radius: 12px; background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 70%, #fff), var(--accent)); clip-path: polygon(0 0, 50% 52%, 100% 0, 100% 100%, 0 100%); }
.env-flap { top: 0; height: 92px; background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 85%, #000), var(--accent)); clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: top; transition: transform .6s ease; border-radius: 12px 12px 0 0; z-index: 2; }
.env-seal { left: calc(50% - 26px) !important; right: auto !important; top: 64px; width: 52px; height: 52px; border-radius: 50%; background: #fff; color: var(--accent); display: grid; place-items: center; box-shadow: 0 3px 10px rgb(0 0 0 / 25%); z-index: 3; transition: opacity .3s, transform .3s; }
.gift-envelope.opening { animation: none; }
.gift-envelope.opening .env-flap { transform: rotateX(180deg); z-index: 0; }
.gift-envelope.opening .env-seal { opacity: 0; transform: scale(.4); }
.gift-envelope.opening .env-letter { transform: translateY(-110px) scale(1.05); }
.burst-heart { position: fixed; z-index: 90; pointer-events: none; font-size: 26px; animation: burst 1.4s cubic-bezier(.2, .8, .2, 1) forwards; }
@keyframes burst { to { transform: translate(var(--x), var(--y)) scale(1.6) rotate(20deg); opacity: 0; } }

/* A história */
.gift-story { gap: 28px; padding-bottom: 80px; }
.float-bg-heart { position: absolute; bottom: -30px; color: var(--accent); opacity: .18; animation: rise linear infinite; pointer-events: none; z-index: 0; }
@keyframes rise { to { transform: translateY(-120vh) rotate(25deg); } }
.gift-story > * { position: relative; z-index: 1; }
.gift-story > .float-bg-heart { position: absolute; z-index: 0; }
.gift-hero h1 { font-size: 2.4rem; line-height: 1.15; margin: 0 0 14px; }
.gift-heart { color: var(--accent); display: grid; place-items: center; animation: beat 1.6s ease-in-out infinite; }
.gift-music { position: fixed !important; top: calc(14px + env(safe-area-inset-top)); right: 14px; z-index: 20 !important; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgb(255 255 255 / 70%); color: var(--accent); display: grid; place-items: center; backdrop-filter: blur(8px); box-shadow: var(--shadow); cursor: pointer; }
.gift-counter p { color: var(--muted); margin: 0 0 10px; }
.counter-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 340px; }
.counter-grid div { background: rgb(255 255 255 / 70%); border-radius: 16px; padding: 10px 6px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.counter-grid strong { font: 700 1.7rem Georgia, serif; color: var(--accent); font-variant-numeric: tabular-nums; }
.counter-grid small { color: var(--muted); font-size: .75rem; }
.gift-message { max-width: 480px; background: rgb(255 255 255 / 75%); border-radius: 22px; padding: 26px 22px; box-shadow: var(--shadow); text-align: left; }
.gift-message p { font: 1.15rem/1.8 Georgia, serif; margin: 0 0 16px; white-space: pre-wrap; color: #2b1d22; }
.gift-message p:last-child { margin: 0; }
.gift-photos { display: flex; flex-direction: column; gap: 26px; width: 100%; max-width: 420px; }
.gift-photo { margin: 0; background: #fff; padding: 12px 12px 16px; border-radius: 6px; box-shadow: 0 10px 30px rgb(60 20 30 / 18%); }
.gift-photo.tilt-l { transform: rotate(-2deg); }
.gift-photo.tilt-r { transform: rotate(2deg); }
.gift-photo img { width: 100%; display: block; border-radius: 3px; object-fit: cover; background: #f2ece9; }
.gift-photo figcaption { font: italic 1.1rem Georgia, serif; color: #2b1d22; margin-top: 10px; }
.gift-end h2 { font-size: 1.8rem; line-height: 1.3; }
.gift-heart.big { margin-bottom: 8px; }
.gift-cta { max-width: 420px; background: var(--surface); border-radius: 22px; padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; align-items: center; }
.gift-cta strong { color: var(--accent); font: 700 1.2rem Georgia, serif; }
.gift-cta p { margin: 0; color: var(--muted); font-size: .9rem; }
.gift-missing { justify-content: center; gap: 10px; }
.gift-env-emoji { font-size: 4rem; }
.reveal-up { opacity: 0; transform: translateY(26px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .8, .2, 1); }
.reveal-up.in { opacity: 1; transform: none; }
.gift-photo.reveal-up.in.tilt-l { transform: rotate(-2deg); }
.gift-photo.reveal-up.in.tilt-r { transform: rotate(2deg); }
@media (prefers-reduced-motion: reduce) { .reveal-up { opacity: 1; transform: none; } }

/* ------------------------------------------------ Molduras das fotos nos presentes */
.gift-photo { position: relative; margin: 0 auto; width: 100%; background: none; padding: 0; box-shadow: none; border-radius: 0; }
.gift-photo-img { position: relative; overflow: hidden; }
.gift-photo-img img { display: block; width: 100%; height: auto; object-fit: cover; background: #f2ece9; }
.gift-photo figcaption { font: italic 1.1rem Georgia, serif; color: #2b1d22; margin-top: 10px; }

/* Polaroid */
.frame-polaroid { background: #fff; padding: 12px 12px 18px; border-radius: 4px; box-shadow: 0 10px 30px rgb(60 20 30 / 18%); }
.frame-polaroid .gift-photo-img { border-radius: 2px; }

/* Coração */
.frame-heart { width: 92%; }
.frame-heart .gift-photo-img {
  aspect-ratio: 1; filter: drop-shadow(0 10px 18px rgb(120 20 50 / 30%));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 92'%3E%3Cpath d='M50 90C24 70 2 54 2 29 2 13 14 2 28 2c10 0 17 5 22 13C55 7 62 2 72 2c14 0 26 11 26 27 0 25-22 41-48 61z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 92'%3E%3Cpath d='M50 90C24 70 2 54 2 29 2 13 14 2 28 2c10 0 17 5 22 13C55 7 62 2 72 2c14 0 26 11 26 27 0 25-22 41-48 61z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.frame-heart .gift-photo-img img, .frame-circle .gift-photo-img img { width: 100%; height: 100%; aspect-ratio: 1; }
.frame-heart figcaption { color: var(--accent); font-size: 1.25rem; }

/* Círculo */
.frame-circle { width: 84%; }
.frame-circle .gift-photo-img { aspect-ratio: 1; border-radius: 50%; border: 8px solid #fff; box-shadow: 0 0 0 3px var(--accent), 0 14px 30px rgb(60 20 30 / 25%); }

/* Película de cinema */
.frame-film { background: #1b1416; padding: 26px 14px; border-radius: 6px; box-shadow: 0 12px 30px rgb(0 0 0 / 30%); }
.frame-film::before, .frame-film::after {
  content: ""; position: absolute; left: 10px; right: 10px; height: 12px;
  background: repeating-linear-gradient(90deg, #f6efe9 0 12px, transparent 12px 26px); border-radius: 2px; opacity: .9;
}
.frame-film::before { top: 7px; }
.frame-film::after { bottom: 7px; }
.frame-film .gift-photo-img { border-radius: 3px; }
.frame-film .gift-photo-img img { filter: saturate(1.1) contrast(1.05); }
.frame-film figcaption { color: #f6efe9; font: 600 .85rem ui-monospace, Menlo, monospace; letter-spacing: .12em; text-transform: uppercase; margin: 10px 0 -8px; }

/* Postal com selo */
.frame-postcard { background: #fffaf2; padding: 16px 16px 18px; border-radius: 6px; box-shadow: 0 10px 26px rgb(60 20 30 / 18%); border: 1px solid #efe2d4; }
.frame-postcard .gift-photo-img { border-radius: 3px; outline: 1px dashed #d8c5b4; outline-offset: 5px; }
.frame-postcard figcaption { font: italic 1.25rem "Brush Script MT", "Segoe Script", Georgia, cursive; color: #5b3a40; text-align: left; padding-left: 4px; }
.postcard-stamp {
  position: absolute; top: 4px; right: 4px; width: 46px; height: 54px; display: grid; place-items: center; color: var(--accent);
  background: #fff; border: 2px dashed color-mix(in srgb, var(--accent) 50%, #fff); border-radius: 4px; transform: rotate(6deg); box-shadow: 0 2px 6px rgb(0 0 0 / 12%);
}

/* Moldura dourada */
.frame-gold {
  padding: 16px; border-radius: 6px;
  background: linear-gradient(135deg, #8a6420, #f3d77e 22%, #b3872e 45%, #f6e3a1 62%, #8a6420 85%, #d9b45a);
  box-shadow: 0 14px 30px rgb(80 50 10 / 35%), inset 0 0 0 2px rgb(255 255 255 / 35%);
}
.frame-gold .gift-photo-img { box-shadow: inset 0 0 0 4px #5a3f12, 0 0 0 4px #3b2a0c; }
.frame-gold figcaption { color: #fff8e6; text-shadow: 0 1px 2px rgb(0 0 0 / 50%); font-weight: 600; margin-bottom: -4px; }

/* Fita-cola */
.frame-tape { background: #fff; padding: 10px; box-shadow: 0 8px 22px rgb(60 20 30 / 16%); }
.frame-tape::before, .frame-tape::after {
  content: ""; position: absolute; z-index: 2; width: 92px; height: 28px;
  background: color-mix(in srgb, var(--accent) 35%, rgb(255 255 255 / 70%)); opacity: .85; box-shadow: 0 1px 3px rgb(0 0 0 / 10%);
}
.frame-tape::before { top: -12px; left: -18px; transform: rotate(-35deg); }
.frame-tape::after { top: -12px; right: -18px; transform: rotate(35deg); }

/* Ecrã inteiro */
.frame-full { width: calc(100% + 40px); margin: 0 -20px; }
.frame-full .gift-photo-img img { max-height: 90vh; }
.frame-full figcaption { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 40px 20px 18px; color: #fff; background: linear-gradient(transparent, rgb(0 0 0 / 60%)); font-size: 1.2rem; }

.gift-photos { gap: 34px; }
.gift-edit-photo select { min-height: 38px; padding: 6px 10px; font-size: .85rem; }
.gift-edit-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gift-edit-photo { min-width: 0; }
.gift-edit-photo input, .gift-edit-photo select { width: 100%; min-width: 0; }

/* ------------------------------------------------ Confirmação de email */
.email-hint { color: var(--accent) !important; font-size: .85rem !important; }
.link-btn { border: 0; background: none; padding: 0; color: var(--accent); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.link-btn.muted { color: var(--muted); font-weight: 500; }
.verify-banner { display: flex; gap: 12px; align-items: flex-start; border: 2px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.verify-banner > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.verify-banner small { color: var(--muted); overflow-wrap: anywhere; }
.verify-ic { font-size: 1.6rem; }
.email-status { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; overflow-wrap: anywhere; }
.change-email summary { cursor: pointer; list-style: none; }
.change-email[open] summary { margin-bottom: 12px; }

/* ---------- Ativação e pagamentos ---------- */
.trial-banner { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit;
  border: 2px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.trial-days { display: grid; place-items: center; min-width: 54px; height: 54px; border-radius: 16px;
  background: var(--accent-soft); color: var(--accent); line-height: 1; }
.trial-days b { font: 700 22px Georgia, serif; }
.trial-days small { font-size: 11px; }
.trial-text { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.trial-text small { color: var(--muted); }
.activate { position: relative; gap: 16px; }
.activate-back { position: absolute; left: 0; top: 0; }
.activate-hero { text-align: center; }
.activate-hero h1 { margin: 10px 0 2px; }
.activate-heart { display: inline-grid; place-items: center; width: 84px; height: 84px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); animation: beat 1.6s ease-in-out infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.12); } 30% { transform: scale(1); } 45% { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .activate-heart { animation: none; } }
.activate-lead { text-align: center; margin: 0; }
.activate-price { text-align: center; display: flex; flex-direction: column; gap: 4px; }
.activate-price > strong { font: 700 40px Georgia, serif; color: var(--accent); }
.activate-price > span { color: var(--muted); }
.benefits { list-style: none; padding: 0; margin: 12px 0 0; text-align: left; display: grid; gap: 8px; }
.benefits li { padding-left: 26px; position: relative; }
.benefits li::before { content: '✓'; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.pay-buttons { display: grid; gap: 10px; }
.btn-pay { display: flex; flex-direction: column; gap: 2px; padding-block: 12px; }
.pay-main { font-size: 17px; }
.pay-sub { font-size: 12px; font-weight: 500; opacity: .9; }
.pay-logos { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.pay-logos span { font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; color: #fff; }
.w-mpesa { background: #e60000; } .w-emola { background: #f28c00; } .w-card { background: #2b3a67; }
.pay-return { text-align: center; }

/* ------------------------------------------------ Início: 8 atalhos em 4 colunas */
.tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tiles .tile { font-size: .76rem; padding: 12px 2px 8px; }
.tiles .tile span { font-size: 1.45rem; }
.tiles .tile small { font-size: .68rem; }

/* ------------------------------------------------ Mapa: lugares e última memória */
.map-filters { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 10px; padding: 0 16px; }
.map-chip { flex: none; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 7px 12px; font: inherit; font-size: .85rem; cursor: pointer; }
.map-chip b { color: var(--muted); font-weight: 600; margin-left: 2px; }
.map-chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.map-wrap { position: relative; isolation: isolate; }
.map-hint .link { border: 0; background: none; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; padding: 0 4px; }
.map-wrap .map-full { height: calc(100dvh - 290px); }
.map-full.placing { cursor: crosshair; outline: 3px dashed var(--accent); outline-offset: -3px; }
.map-fab { position: absolute; right: 12px; bottom: 12px; z-index: 500; box-shadow: var(--shadow); }
.map-hint { position: absolute; left: 12px; right: 12px; top: 12px; z-index: 500; margin: 0; background: var(--surface); border-radius: 14px; padding: 10px 14px; box-shadow: var(--shadow); text-align: center; font-weight: 600; }
.map-latest { position: absolute; left: 54px; right: 10px; top: 10px; z-index: 450; display: flex; align-items: center; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); padding: 6px; }
.map-hint:not([hidden]) ~ .map-latest { display: none; }
.map-latest-card { flex: 1; min-width: 0; display: flex; gap: 10px; align-items: center; border: 0; background: none; text-align: left; color: inherit; font: inherit; cursor: pointer; padding: 2px; }
.map-latest-card img, .map-latest-ic { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; flex: none; display: grid; place-items: center; background: var(--accent-soft); font-size: 1.4rem; }
.map-latest-card span:last-child { display: flex; flex-direction: column; min-width: 0; }
.map-latest-card strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-latest-card small { color: var(--muted); font-size: .74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-latest-card small:first-child { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .66rem; }
.pin-estivemos span { border-color: var(--ok); }
.pin-queremos span { border-style: dashed; border-color: #d98a00; background: #fff8e8; }
.map-pop-kind { font-weight: 700; }
.map-pop-kind.queremos { color: #b06f00 !important; }
.map-pop-kind.estivemos { color: #2f8f5b !important; }
.map-pop-actions { display: flex; gap: 6px; margin-top: 6px; }
.switch-row { display: flex; align-items: center; gap: 8px; margin: 10px 2px; color: var(--muted); cursor: pointer; }
.wish-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.wish-list li { display: flex; align-items: center; gap: 8px; background: var(--surface); border-radius: 16px; padding: 8px 10px; box-shadow: var(--shadow); }
.wish-go { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.wish-go > span:first-child { font-size: 1.5rem; }
.wish-go > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.wish-go small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ------------------------------------------------ Pergunta do dia */
.q-card, .q-home { background: linear-gradient(150deg, var(--hero-a), var(--hero-b)); }
.q-card { text-align: center; }
.q-card h2 { font-size: 1.35rem; line-height: 1.35; margin: 8px 0 4px; }
.q-home { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; }
.q-divertidas { background: linear-gradient(150deg, #ffe08a, #ffc6a8); }
.q-isto-ou-aquilo { background: linear-gradient(150deg, #c9e4ff, #e7d4ff); }
.q-quem { background: linear-gradient(150deg, #ffd1e8, #ffe9c7); }
.q-profundas { background: linear-gradient(150deg, #d6dcff, #e9e3f7); }
.q-futuro { background: linear-gradient(150deg, #cdf1e6, #d9e6ff); }
.q-picantes { background: linear-gradient(150deg, #ffb3b3, #ffd6c2); }
:is(.q-divertidas, .q-isto-ou-aquilo, .q-quem, .q-profundas, .q-futuro, .q-picantes) { color: #2b1d22; }
:is(.q-divertidas, .q-isto-ou-aquilo, .q-quem, .q-profundas, .q-futuro, .q-picantes) .eyebrow { color: #8a2347; }
.q-options { display: flex; align-items: stretch; gap: 10px; }
.q-or { align-self: center; color: var(--muted); font-weight: 700; }
.q-opt { flex: 1; min-height: 76px; border: 2px solid var(--line); background: var(--surface); border-radius: 18px; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; padding: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; transition: transform .15s, border-color .15s; }
.q-opt:active { transform: scale(.97); }
.q-opt.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.answer-pick { font-weight: 700; font-size: 1.05rem; color: var(--accent); }
.q-match { text-align: center; font-weight: 700; font-size: 1.05rem; background: color-mix(in srgb, var(--ok) 14%, var(--surface)); border-radius: 16px; padding: 12px; margin: 0; }
.q-match.q-diff { background: var(--accent-soft); }
.q-themes summary { cursor: pointer; color: var(--accent); font-weight: 600; text-align: center; list-style: none; padding: 6px; }
.q-themes summary::-webkit-details-marker { display: none; }
.q-theme-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.q-theme { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); background: var(--surface); border-radius: 14px; padding: 10px; font: inherit; font-size: .88rem; color: var(--ink); cursor: pointer; text-align: left; }
.q-theme span { font-size: 1.3rem; }
.q-theme.on { border-color: var(--accent); background: var(--accent-soft); }

/* ------------------------------------------------ Cupões */
.seg { display: flex; background: var(--surface-2); border-radius: 999px; padding: 4px; gap: 4px; margin: 14px 0; }
.seg button { flex: 1; border: 0; background: none; border-radius: 999px; padding: 9px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg b { background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 0 7px; font-size: .78rem; }
.seg b:empty { display: none; }
.seg b.hot { background: var(--accent); color: var(--accent-ink); }
.coupons { display: grid; gap: 12px; }
.coupon { --c1: #f6c9d4; --c2: #fbe3ea; --ci: #8a2347; display: flex; border-radius: 18px; overflow: hidden; color: #2b1d22; box-shadow: var(--shadow); background: linear-gradient(135deg, var(--c1), var(--c2)); position: relative; }
.coupon-rosa { --c1: #f6c9d4; --c2: #fde7ee; --ci: #a3284f; }
.coupon-vinho { --c1: #b83a5c; --c2: #e07a96; --ci: #fff; color: #fff; }
.coupon-dourado { --c1: #f5cf72; --c2: #fff0c4; --ci: #8a5a00; }
.coupon-mar { --c1: #8fd3e8; --c2: #d8f1f7; --ci: #11627a; }
.coupon-verde { --c1: #a8dfb6; --c2: #e1f5e6; --ci: #2a6e3e; }
.coupon-noite { --c1: #2c2a4a; --c2: #4b3f72; --ci: #ffd27a; color: #fff; }
.coupon-main { flex: 1; min-width: 0; display: flex; gap: 12px; padding: 16px 14px; align-items: flex-start; }
.coupon-emoji { font-size: 2.1rem; line-height: 1; }
.coupon-text { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.coupon-text strong { font: 700 1.1rem Georgia, serif; }
.coupon-text p { margin: 0; font-size: .9rem; opacity: .85; }
.coupon-text small { font-size: .74rem; opacity: .75; }
.coupon-stub { width: 92px; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 10px 6px; border-left: 2px dashed color-mix(in srgb, currentColor 35%, transparent); position: relative; }
.coupon-stub::before, .coupon-stub::after { content: ''; position: absolute; left: -9px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); }
.coupon-stub::before { top: -8px; } .coupon-stub::after { bottom: -8px; }
.coupon-status { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--ci); text-align: center; }
.coupon-btn { background: var(--ci); border-color: var(--ci); color: #fff; }
.coupon-noite .coupon-btn, .coupon-vinho .coupon-btn { color: #2b1d22; }
.coupon.is-used { filter: saturate(.35); opacity: .75; }
.coupon-templates { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 12px; padding: 0 16px 4px; }
.chip-btn { flex: none; border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 12px; font: inherit; font-size: .85rem; color: var(--ink); cursor: pointer; }
.chip-btn:hover { border-color: var(--accent); }
.coupon-emoji-field { width: 76px; flex: none; }
.coupon-emoji-field input { text-align: center; font-size: 1.3rem; }
.color-dot { display: inline-flex; align-items: center; gap: 6px; }
.color-dot::before { content: ''; flex: none; display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: linear-gradient(135deg, var(--c1), var(--c2)); border: 1px solid rgb(0 0 0 / 15%); }
.choices .color-dot { --c1: #ccc; --c2: #eee; color: var(--ink); }
.choices .coupon-rosa { --c1: #f6c9d4; --c2: #fde7ee; } .choices .coupon-vinho { --c1: #b83a5c; --c2: #e07a96; }
.choices .coupon-dourado { --c1: #f5cf72; --c2: #fff0c4; } .choices .coupon-mar { --c1: #8fd3e8; --c2: #d8f1f7; }
.choices .coupon-verde { --c1: #a8dfb6; --c2: #e1f5e6; } .choices .coupon-noite { --c1: #2c2a4a; --c2: #4b3f72; }

/* ------------------------------------------------ Localização em tempo real */
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #2fbf6b; box-shadow: 0 0 0 0 rgb(47 191 107 / 60%); animation: livePulse 1.6s infinite; vertical-align: middle; }
.live-dot.big { width: 14px; height: 14px; }
@keyframes livePulse { 70% { box-shadow: 0 0 0 9px rgb(47 191 107 / 0%); } 100% { box-shadow: 0 0 0 0 rgb(47 191 107 / 0%); } }
@media (prefers-reduced-motion: reduce) { .live-dot, .live-pin.is-live .live-pin-ring { animation: none; } }
.live-indicator { position: fixed; top: calc(env(safe-area-inset-top) + 8px); left: 50%; transform: translateX(-50%); z-index: 900; display: flex; align-items: center; gap: 8px; background: #1f2a24; color: #fff; text-decoration: none; font-size: .8rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; box-shadow: 0 4px 14px rgb(0 0 0 / 25%); white-space: nowrap; }
.live-map-wrap { position: relative; isolation: isolate; }
.live-map { height: min(52dvh, 460px); min-height: 300px; border-radius: 22px; overflow: hidden; }
.live-map-btns { position: absolute; right: 10px; top: 10px; z-index: 500; display: flex; flex-direction: column; gap: 8px; }
.live-map-btns .hbtn { width: 46px; height: 46px; display: grid; place-items: center; font-size: 1.3rem; padding: 0; }
.live-map-btns .avatar { width: 36px; height: 36px; border-width: 2px; font-size: .95rem; }
.live-pin { position: relative; }
.live-pin .avatar { position: relative; width: 48px; height: 48px; border: 3px solid #fff; box-shadow: 0 3px 10px rgb(0 0 0 / 30%); font-size: 1.2rem; }
.live-pin-ring { position: absolute; inset: 0; border-radius: 50%; }
.live-pin.is-live .live-pin-ring { animation: liveRing 1.8s ease-out infinite; background: rgb(200 65 106 / 35%); }
@keyframes liveRing { from { transform: scale(1); opacity: .9; } to { transform: scale(2.3); opacity: 0; } }
.live-card { display: flex; flex-direction: column; gap: 12px; }
.live-row { display: flex; gap: 12px; align-items: center; }
.live-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.live-info small { color: var(--muted); }
.live-durations { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.live-durations .chip-btn { padding: 12px; font-weight: 600; border-radius: 14px; }
.live-upsell { text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.live-upsell-art { width: 96px; height: 96px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; position: relative; }
.live-upsell-art .live-dot { position: absolute; right: 18px; top: 18px; }
.live-home { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; border: 2px solid rgb(47 191 107 / 45%); }
.live-home > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.live-home small { color: var(--muted); }
.live-link { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); background: var(--surface); border-radius: 999px; padding: 7px 14px; margin-bottom: 10px; box-shadow: var(--shadow); font-weight: 600; font-size: .88rem; }
.live-link b { color: var(--accent); font-size: .75rem; }

/* ------------------------------------------------ Procurar lugares e tipos de mapa */
.place-search { position: relative; margin-bottom: 10px; z-index: 5; }
.place-search-box { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px; padding: 0 6px 0 14px; box-shadow: var(--shadow); }
.place-search-box:focus-within { border-color: var(--accent); }
.place-search-box input, .place-search-box input:focus { flex: 1; min-width: 0; border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 12px 0 !important; font: inherit; color: var(--ink); outline: none; border-radius: 0 !important; }
.place-search-box input::-webkit-search-cancel-button { display: none; }
.place-search-x { border: 0; background: var(--surface-2); color: var(--muted); width: 28px; height: 28px; border-radius: 50%; cursor: pointer; }
.place-results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); list-style: none; margin: 0; padding: 6px; background: var(--surface); border-radius: 16px; box-shadow: 0 10px 30px rgb(0 0 0 / 18%); max-height: 300px; overflow-y: auto; }
.place-results button { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; border: 0; background: none; padding: 10px; border-radius: 12px; font: inherit; color: var(--ink); cursor: pointer; }
.place-results button:hover, .place-results button:focus-visible { background: var(--accent-soft); }
.place-results small { color: var(--muted); font-size: .8rem; }
.place-msg { padding: 10px; color: var(--muted); font-size: .9rem; }
.pin-search span { border-color: #2f7cf6; }
.leaflet-control-layers { border-radius: 12px !important; border: 0 !important; box-shadow: var(--shadow) !important; font: inherit; }
.leaflet-control-layers-expanded { padding: 8px 12px !important; }
.leaflet-control-layers label { padding: 4px 0; font-size: .9rem; }

/* ------------------------------------------------ Chamada: minimizar, partilha de ecrã, qualidade */
.call-remote.fit { object-fit: contain; }
.call-screen.remote-screen .call-remote { display: block; object-fit: contain; }
.call-screen.remote-screen .call-avatar { display: none; }
.call-screen.remote-screen.is-connected .call-top { margin-top: 0; text-shadow: 0 1px 6px rgb(0 0 0 / 60%); }
.call-screen.is-video.is-connected.remote-cam-off:not(.remote-screen) .call-remote { display: none; }
.call-screen.is-video.is-connected.remote-cam-off:not(.remote-screen) .call-avatar { display: grid; margin-top: 8vh; }
.call-screen.sharing .call-local { display: block; object-fit: contain; background: #000; width: 150px; height: 96px; }
.call-mini-btn { position: absolute; z-index: 4; left: 14px; top: calc(14px + env(safe-area-inset-top)); width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; color: #fff; background: rgb(0 0 0 / 28%); backdrop-filter: blur(10px); cursor: pointer; }
.call-screen:has([data-incoming]:not([hidden])) .call-mini-btn { display: none; }
.call-mini-bar { display: none; }
.call-controls { flex-wrap: wrap; max-width: calc(100vw - 24px); }

/* Janela pequena: flutua por cima da app e arrasta-se */
.call-screen.is-mini {
  inset: auto; left: var(--x, calc(100vw - 132px)); top: var(--y, calc(100dvh - 300px)); width: 120px; height: 172px;
  padding: 0; border-radius: 18px; overflow: hidden; justify-content: flex-end; box-shadow: 0 12px 34px rgb(0 0 0 / 45%);
  cursor: grab; touch-action: none; transition: left .2s, top .2s; z-index: 85;
}
.call-screen.is-mini.dragging { transition: none; cursor: grabbing; }
.call-screen.is-mini .call-top, .call-screen.is-mini .call-controls, .call-screen.is-mini .call-mini-btn, .call-screen.is-mini .call-local { display: none !important; }
.call-screen.is-mini .call-mini-bar { display: flex; position: relative; z-index: 3; width: 100%; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 6px 6px 10px; background: linear-gradient(transparent, rgb(0 0 0 / 70%)); }
.call-mini-info { display: flex; flex-direction: column; min-width: 0; font-size: .75rem; line-height: 1.2; }
.call-mini-info strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.call-mini-info small { opacity: .85; font-variant-numeric: tabular-nums; }
.cbtn-sm { width: 34px; height: 34px; flex: none; }
/* Chamada de voz minimizada: uma pílula com nome, tempo e desligar */
.call-screen.is-mini:not(.is-video):not(.remote-screen) { width: 200px; height: 56px; border-radius: 999px; justify-content: center; left: var(--x, calc(100vw - 212px)); top: var(--y, calc(100dvh - 160px)); }
.call-screen.is-mini:not(.is-video):not(.remote-screen) .call-mini-bar { background: none; padding: 0 8px 0 18px; height: 100%; }
@media (prefers-reduced-motion: reduce) { .call-screen.is-mini { transition: none; } }

/* ------------------------------------------------ Mapa em ecrã inteiro */
.map-full-btn { width: 36px; height: 36px; border: 0; border-radius: 10px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); font-size: 1.15rem; cursor: pointer; display: grid; place-items: center; }
.map-wrap.map-fullscreen, .live-map-wrap.map-fullscreen { position: fixed; inset: 0; z-index: 70; background: var(--bg); }
.map-fullscreen .map-full, .map-fullscreen .live-map { height: 100dvh !important; border-radius: 0; }
.map-fullscreen .map-latest { top: calc(10px + env(safe-area-inset-top)); }
.map-fullscreen .leaflet-top { top: env(safe-area-inset-top); }
.map-fullscreen .map-fab { bottom: calc(20px + env(safe-area-inset-bottom)); }
.live-map-wrap .live-map-btns { right: 56px; }
.map-fullscreen .live-map-btns { top: calc(10px + env(safe-area-inset-top)); }

/* ------------------------------------------------ Boas-vindas: demonstração animada */
.demo { display: flex; flex-direction: column; align-items: center; gap: 14px; margin: 10px 0 4px; }
.demo-title { font-size: 1.25rem; margin: 0; }
.demo-phone {
  --dk: #2b1d22; position: relative; width: min(264px, 74vw); aspect-ratio: 9 / 17; border-radius: 36px; padding: 10px;
  background: linear-gradient(160deg, #3a2a30, #17100f); box-shadow: 0 24px 60px rgb(60 20 30 / 28%), inset 0 0 0 2px rgb(255 255 255 / 8%);
  user-select: none; -webkit-user-select: none; touch-action: pan-y; outline: none;
}
.demo-phone:focus-visible { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 55%, transparent); }
.demo-bars { position: absolute; z-index: 4; left: 22px; right: 22px; top: 18px; display: flex; gap: 3px; }
.demo-bars span { flex: 1; height: 3px; border-radius: 3px; background: rgb(43 29 34 / 18%); overflow: hidden; }
.demo-bars i { display: block; height: 100%; width: 0; background: var(--accent); }
.demo-screen { position: relative; height: 100%; border-radius: 28px; overflow: hidden; background: #fbf6f3; color: var(--dk); }
.demo-scene { position: absolute; inset: 0; text-align: left; padding: 30px 12px 12px; display: flex; flex-direction: column; gap: 8px; opacity: 0; transform: scale(.97); transition: opacity .35s, transform .35s; pointer-events: none; font-size: 11px; line-height: 1.3; }
.demo-scene.on { opacity: 1; transform: none; }
.demo-scene b { font-weight: 700; }
.demo-scene small { display: block; color: #7d6a70; font-size: 9.5px; }
.demo-nav { position: absolute; z-index: 5; top: 0; bottom: 0; width: 40%; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.demo-nav.prev { left: 0; } .demo-nav.next { right: 0; width: 60%; }
.demo-phone.paused .demo-scene.on * { animation-play-state: paused !important; }
.demo-caption { text-align: center; max-width: 320px; min-height: 76px; }
.demo-caption b { font: 700 1.1rem Georgia, serif; color: var(--accent); }
.demo-caption p { margin: 4px 0 0; color: var(--muted); font-size: .92rem; }

/* peças comuns */
.d-av { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; font: 700 15px Georgia, serif; border: 2px solid #fff; flex: none; }
.d-av.a { background: #c8416a; } .d-av.t { background: #6a3f8f; }
.d-av.sm { width: 22px; height: 22px; font-size: 10px; border-width: 1.5px; }
.d-av.xl { width: 70px; height: 70px; font-size: 30px; }
.d-card { background: #fff; border-radius: 14px; padding: 8px 10px; box-shadow: 0 2px 8px rgb(60 20 30 / 8%); display: flex; align-items: center; gap: 8px; }
.d-title { font: 700 14px Georgia, serif; margin-bottom: 2px; }
.d-center { text-align: center; }
@keyframes dIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes dPop { 0% { transform: scale(0); opacity: 0; } 70% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes dDrop { 0% { transform: translateY(-40px) rotate(-45deg); opacity: 0; } 70% { transform: translateY(3px) rotate(-45deg); opacity: 1; } 100% { transform: translateY(0) rotate(-45deg); opacity: 1; } }

/* 1. início */
.d-hero { text-align: center; padding: 12px 0 10px; margin: -30px -12px 0; padding-top: 34px; background: linear-gradient(180deg, #f6c9d4, #fbe9dc); border-radius: 0 0 22px 22px; }
.d-avs { display: flex; justify-content: center; margin-bottom: 4px; } .d-avs .d-av + .d-av { margin-left: -8px; }
.d-names { display: block; font: 700 16px Georgia, serif; }
.d-heart { color: #c8416a; font-size: 22px; display: inline-block; }
.demo-scene.on .d-heart { animation: dBeat 1s ease-in-out .6s 3; }
@keyframes dBeat { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.35); } 60% { transform: scale(.95); } }
.d-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.d-tiles span { background: #fff; border-radius: 10px; text-align: center; padding: 8px 0; font-size: 16px; box-shadow: 0 2px 6px rgb(60 20 30 / 7%); }
.demo-scene.on .d-tiles span { animation: dIn .4s both; }
.demo-scene.on .d-tiles span:nth-child(n) { animation-delay: calc(.9s + var(--n, 0) * 60ms); }

/* 2. história */
.d-row { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 12px; padding: 7px 8px; box-shadow: 0 2px 6px rgb(60 20 30 / 7%); opacity: 0; }
.demo-scene.on .d-row { animation: dIn .4s calc(.2s + var(--i) * .3s) both; }
.d-dot { width: 26px; height: 26px; border-radius: 9px; background: #fbe3ea; display: grid; place-items: center; font-size: 14px; flex: none; }

/* 3. conversa */
.d-chathead { display: flex; align-items: center; gap: 6px; padding-bottom: 6px; border-bottom: 1px solid #ecdcd6; }
.d-chathead > span:nth-child(2) { flex: 1; } .d-chathead small { color: #2f8f5b; }
.d-icons { font-size: 12px; letter-spacing: 4px; }
.d-msgs { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
.d-msg { margin: 0; max-width: 78%; padding: 6px 9px; border-radius: 12px; opacity: 0; }
.d-msg.them { background: #fff; align-self: flex-start; border-bottom-left-radius: 4px; box-shadow: 0 1px 3px rgb(0 0 0 / 7%); }
.d-msg.me { background: #c8416a; color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.d-msg i { font-style: normal; font-size: 8px; color: #9be7ff; margin-left: 4px; }
.d-voice { letter-spacing: 1px; color: #c8416a; }
.demo-scene.on .d-msg { animation: dIn .3s calc(.2s + var(--i) * .38s) both; }
.d-typing { margin: 0; align-self: flex-start; background: #fff; border-radius: 12px; padding: 7px 10px; display: flex; gap: 3px; opacity: 0; }
.d-typing span { width: 5px; height: 5px; border-radius: 50%; background: #b9a6ad; }
.demo-scene.on .d-typing { animation: dIn .3s calc(.2s + var(--i) * .38s) both; }
.demo-scene.on .d-typing span { animation: dBlink 1s infinite; } .d-typing span:nth-child(2) { animation-delay: .2s !important; } .d-typing span:nth-child(3) { animation-delay: .4s !important; }
@keyframes dBlink { 50% { opacity: .3; } }

/* 4. chamada */
.d-chamada { padding: 0; }
.d-call { position: absolute; inset: 0; background: radial-gradient(120% 80% at 50% 0%, #6b2a44, #120a10 70%); color: #fff; display: flex; flex-direction: column; align-items: center; padding-top: 44px; gap: 5px; }
.d-call small { color: rgb(255 255 255 / 75%); }
.d-call-them .d-av { box-shadow: 0 0 0 0 rgb(255 255 255 / 40%); }
.demo-scene.on .d-call-them .d-av { animation: dRipple 1.6s infinite; }
@keyframes dRipple { 70% { box-shadow: 0 0 0 18px rgb(255 255 255 / 0%); } 100% { box-shadow: 0 0 0 0 rgb(255 255 255 / 0%); } }
.d-callname { font: 700 18px Georgia, serif; }
.d-call-me { position: absolute; right: 12px; top: 40px; width: 52px; height: 74px; border-radius: 10px; background: linear-gradient(160deg, #e48aa6, #8a2347); display: grid; place-items: center; }
.d-call-ctrl { position: absolute; bottom: 18px; display: flex; gap: 10px; background: rgb(255 255 255 / 12%); padding: 8px 12px; border-radius: 99px; }
.d-call-ctrl span { width: 30px; height: 30px; border-radius: 50%; background: rgb(255 255 255 / 18%); display: grid; place-items: center; font-size: 13px; }
.d-call-ctrl .end { background: #ff3b30; transform: rotate(135deg); }

/* 5. mapa */
.d-search { background: #fff; border-radius: 99px; padding: 7px 10px; box-shadow: 0 2px 6px rgb(60 20 30 / 9%); white-space: nowrap; overflow: hidden; }
.d-typed { display: inline-block; overflow: hidden; vertical-align: bottom; width: 0; white-space: nowrap; border-right: 1.5px solid #c8416a; }
.demo-scene.on .d-typed { animation: dType .9s steps(13) .2s forwards; }
@keyframes dType { to { width: 13ch; } }
.d-map { position: relative; flex: 1; border-radius: 16px; overflow: hidden; background: linear-gradient(135deg, #e9f0dc 0%, #f4efe4 55%, #cfe6f2 55.5%, #bcdcef 100%); }
.d-map::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(#fff 1px, transparent 1px), linear-gradient(90deg, #fff 1px, transparent 1px); background-size: 34px 34px; opacity: .6; }
.d-pin { position: absolute; width: 26px; height: 26px; border-radius: 50% 50% 50% 0; background: #fff; border: 2px solid #c8416a; display: grid; place-items: center; transform: rotate(-45deg); opacity: 0; font-size: 11px; }
.d-pin.wish { border-style: dashed; border-color: #d98a00; background: #fff8e8; }
.p1 { left: 18%; top: 30%; } .p2 { left: 58%; top: 52%; } .p3 { left: 30%; top: 62%; } .p4 { left: 46%; top: 22%; }
.demo-scene.on .d-pin { animation: dDrop .5s both; } .demo-scene.on .p1 { animation-delay: 1s; } .demo-scene.on .p2 { animation-delay: 1.2s; } .demo-scene.on .p3 { animation-delay: 1.4s; } .demo-scene.on .p4 { animation-delay: 1.6s; }
.d-mapchip { position: absolute; left: 8px; bottom: 8px; background: #fff; border-radius: 99px; padding: 4px 9px; font-weight: 700; box-shadow: 0 2px 6px rgb(0 0 0 / 10%); }

/* 6. cartas */
.d-envelope { position: relative; align-self: center; width: 150px; height: 100px; margin: 26px 0 8px; background: linear-gradient(160deg, #fde7ee, #f6c9d4); border-radius: 10px; box-shadow: 0 8px 20px rgb(200 65 106 / 25%); }
.d-flap { position: absolute; inset: 0 0 auto; height: 60px; background: linear-gradient(160deg, #f6c9d4, #e9a3b6); clip-path: polygon(0 0, 100% 0, 50% 100%); border-radius: 10px 10px 0 0; transform-origin: top; }
.d-seal { position: absolute; z-index: 2; left: 50%; top: 42px; transform: translateX(-50%); width: 30px; height: 30px; border-radius: 50%; background: #c8416a; display: grid; place-items: center; font-size: 13px; }
.demo-scene.on .d-seal { animation: dPop .5s .4s both; }
.d-count { display: flex; justify-content: center; gap: 8px; margin-top: 6px; }
.d-count span { background: #fff; border-radius: 10px; padding: 6px 9px; text-align: center; box-shadow: 0 2px 6px rgb(60 20 30 / 8%); }
.d-count b { font: 700 16px Georgia, serif; color: #c8416a; display: block; }
.demo-scene.on .d-count span { animation: dIn .4s both; } .demo-scene.on .d-count span:nth-child(2) { animation-delay: .15s; } .demo-scene.on .d-count span:nth-child(3) { animation-delay: .3s; }

/* 7. pergunta */
.d-q { background: linear-gradient(150deg, #c9e4ff, #e7d4ff); border-radius: 16px; padding: 16px 12px; text-align: center; margin-top: 8px; }
.d-q small { color: #8a2347; font-weight: 700; letter-spacing: .06em; }
.d-q b { font: 700 17px Georgia, serif; }
.d-answers { display: flex; flex-direction: column; gap: 6px; }
.d-ans { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 12px; padding: 7px 9px; font-weight: 700; opacity: 0; box-shadow: 0 2px 6px rgb(60 20 30 / 7%); }
.demo-scene.on .d-ans { animation: dIn .4s calc(.4s + var(--i) * .5s) both; }
.d-match { margin: 4px 0 0; text-align: center; font-weight: 700; background: #e3f3ea; border-radius: 12px; padding: 8px; opacity: 0; }
.demo-scene.on .d-match { animation: dPop .5s 1.5s both; }

/* 8. cupões */
.d-coupon { display: flex; align-items: center; gap: 8px; border-radius: 12px; padding: 12px 10px; margin-top: 6px; background: linear-gradient(135deg, #f6c9d4, #fde7ee); opacity: 0; position: relative; }
.d-coupon span { font-size: 20px; } .d-coupon b { flex: 1; font: 700 12px Georgia, serif; }
.d-coupon i { font-style: normal; font-size: 8.5px; font-weight: 800; padding: 4px 7px; border-radius: 99px; background: #a3284f; color: #fff; }
.d-coupon.dourado { background: linear-gradient(135deg, #f5cf72, #fff0c4); } .d-coupon.dourado i { background: #8a5a00; }
.d-coupon.noite { background: linear-gradient(135deg, #2c2a4a, #4b3f72); color: #fff; } .d-coupon.noite i { background: #ffd27a; color: #2b1d22; }
.demo-scene.on .d-coupon { animation: dIn .4s calc(.2s + var(--i) * .35s) both; }

/* 9. presentes */
.d-gift { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 14px; text-align: center; }
.d-giftbox { font-size: 46px; display: inline-block; }
.demo-scene.on .d-giftbox { animation: dShake .6s .4s 2; }
@keyframes dShake { 25% { transform: rotate(-10deg); } 75% { transform: rotate(10deg); } }
.d-qr { margin-top: 10px; display: grid; grid-template-columns: repeat(7, 9px); gap: 2px; padding: 8px; background: #fff; border-radius: 10px; box-shadow: 0 2px 8px rgb(60 20 30 / 10%); }
.d-qr i { width: 9px; height: 9px; border-radius: 2px; background: #f3e9ec; } .d-qr i.on { background: #2b1d22; }
.d-floaty { position: absolute; bottom: 10px; left: var(--x); color: #e46b8f; font-size: 16px; opacity: 0; }
.demo-scene.on .d-floaty { animation: dFloat 2.2s var(--d, 0s) ease-out infinite; }
@keyframes dFloat { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(-160px); opacity: 0; } }

/* 10. ao vivo */
.d-map.live { margin-top: 4px; }
.d-road { position: absolute; left: -10%; right: -10%; top: 48%; height: 12px; background: #f3c58a; transform: rotate(-18deg); border: 2px solid #fff; }
.d-live { position: absolute; left: 12%; top: 58%; border-radius: 50%; }
.d-live::before { content: ''; position: absolute; inset: -4px; border-radius: 50%; background: rgb(106 63 143 / 35%); animation: dRipple2 1.5s infinite; }
@keyframes dRipple2 { from { transform: scale(.8); opacity: .9; } to { transform: scale(2.2); opacity: 0; } }
.demo-scene.on .d-live { animation: dWalk 3.4s ease-in-out forwards; }
@keyframes dWalk { to { left: 62%; top: 32%; } }
.d-me { position: absolute; right: 18%; top: 22%; width: 14px; height: 14px; border-radius: 50%; background: #2f7cf6; border: 3px solid #fff; box-shadow: 0 1px 4px rgb(0 0 0 / 25%); }

@media (prefers-reduced-motion: reduce) {
  .demo-scene, .demo-scene * { animation: none !important; transition: none !important; }
  .demo-scene.on .d-row, .demo-scene.on .d-msg, .demo-scene.on .d-pin, .demo-scene.on .d-ans, .demo-scene.on .d-match, .demo-scene.on .d-coupon, .demo-scene.on .d-typing { opacity: 1; }
  .d-typed { width: auto; border: 0; }
}

.d-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 2px; }
.d-photos span { aspect-ratio: 1; border-radius: 10px; display: grid; place-items: center; font-size: 20px; opacity: 0; }
.d-photos span:nth-child(1) { background: linear-gradient(135deg, #ffd59e, #f78ca2); } .d-photos span:nth-child(2) { background: linear-gradient(135deg, #8fd3e8, #4b8fd6); } .d-photos span:nth-child(3) { background: linear-gradient(135deg, #b7e4a6, #4fa36b); }
.demo-scene.on .d-photos span { animation: dPop .45s both; } .demo-scene.on .d-photos span:nth-child(1) { animation-delay: 1.5s; } .demo-scene.on .d-photos span:nth-child(2) { animation-delay: 1.65s; } .demo-scene.on .d-photos span:nth-child(3) { animation-delay: 1.8s; }
@media (prefers-reduced-motion: reduce) { .demo-scene.on .d-photos span { opacity: 1; } }
.d-qmini { background: linear-gradient(150deg, #ffe08a, #ffc6a8); }
.d-qmini small { color: #8a2347 !important; font-weight: 700; letter-spacing: .05em; font-size: 8.5px !important; }
.demo-scene.on .d-qmini, .demo-scene.on .d-tiles ~ .d-card:last-child { animation: dIn .4s 1.5s both; }
.d-street { position: absolute; height: 7px; background: #fff; border-radius: 4px; box-shadow: 0 0 0 1px #e6dccd; }
.d-street.s1 { left: -10%; right: 20%; top: 40%; transform: rotate(-12deg); background: #f6d38c; }
.d-street.s2 { left: 25%; width: 7px; height: 80%; top: 5%; transform: rotate(8deg); }
.d-street.s3 { left: 5%; right: -10%; top: 70%; transform: rotate(6deg); }
.d-green { color: #2fbf6b; font-style: normal; }

/* ------------------------------------------------ Pagamentos: avisos e chamadas NÔ+ */
.trial-banner.soft { border-color: var(--line); }
.trial-banner .trial-days:not(:has(b)) { font-size: 1.5rem; }
.hbtn.is-locked { position: relative; opacity: .7; }
.hbtn.is-locked::after { content: '🔒'; position: absolute; right: -2px; bottom: -2px; font-size: 11px; }
.calls-upsell { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.calls-upsell-ic { width: 72px; height: 72px; border-radius: 50%; background: var(--accent-soft); display: grid; place-items: center; font-size: 2rem; }
.calls-upsell p { margin: 0; }
.activate-heart.waiting { font-size: 2.6rem; animation: none; }
.activate-wait { display: flex; flex-direction: column; gap: 8px; }
.activate-wait p { margin: 0; }

/* ------------------------------------------------ Ícones (um só estilo em toda a app) */
.ic { flex: none; display: inline-block; vertical-align: middle; }
.ic-inline { vertical-align: -0.2em; margin-right: .2em; }
.ic-title { color: var(--accent); vertical-align: -0.18em; margin-right: .15em; }
.ic-ok { color: var(--ok); } .ic-bad { color: var(--danger); }
.pill { display: inline-flex; align-items: center; gap: 5px; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; }
.note .ic-inline { color: var(--accent); }

/* Estados vazios e ecrãs de aviso: ícone dentro de um círculo de cor suave */
.empty-icon, .ended-icon, .chat-empty .empty-icon {
  width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 6px;
  background: var(--accent-soft); color: var(--accent); font-size: inherit;
}
.empty-icon.ok { background: color-mix(in srgb, var(--ok) 15%, var(--surface)); color: var(--ok); }
.chat-empty div.empty-icon { font-size: inherit; }
.invite-heart { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto; background: var(--accent-soft); color: var(--accent); font-size: inherit; }
.seal { color: var(--accent); font-size: inherit; }
.verify-ic, .soft-ic { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: inherit; }
.push-card { display: flex; align-items: center; gap: 12px; }

/* Atalhos do início: quadrado colorido com o ícone (cada secção tem a sua cor) */
.tile .tile-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 4px;
  color: var(--t); background: color-mix(in srgb, var(--t) 13%, var(--surface)); font-size: inherit; }
.tile:active .tile-ic { transform: scale(.94); }

/* Listas de cartas e cápsulas */
.letter-icon, .capsule-icon { flex: none; width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-size: inherit; }
.letter-icon.is-new { background: var(--accent-soft); color: var(--accent); }
.letter-icon.is-locked { background: color-mix(in srgb, #b07d2b 14%, var(--surface)); color: #b07d2b; }

/* Primeiros passos, administração, boas-vindas */
.steps-card .check .ic { color: #fff; }
.steps-card .go { display: grid; place-items: center; color: var(--muted); }
.admin-tabs button span { font-size: inherit; display: grid; place-items: center; height: 22px; }
.hero-points span { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: inherit; }
.trial-days .ic { color: var(--accent); }
.map-chip { display: inline-flex; align-items: center; gap: 5px; }
.place-search-ic { display: grid; place-items: center; color: var(--muted); }
.media-cell.is-audio span, .viewer-audio span { display: grid; place-items: center; color: var(--accent); }
.msg-fail .ic, .msg-deleted .ic { vertical-align: -0.15em; margin-right: 3px; }
.chat-menu button, .msg-menu button { display: flex; align-items: center; gap: 10px; }
.calls-upsell-ic { color: var(--accent); }
.up-state { display: inline-grid; place-items: center; }
.drop { display: flex; align-items: center; justify-content: center; gap: 8px; }
.photo-drop { flex-direction: column; }
.verify-banner { align-items: center; }
.d-tiles span { color: var(--t); background: color-mix(in srgb, var(--t) 13%, #fff); display: grid; place-items: center; box-shadow: none; }
.d-qic { color: #8a2347; display: grid; place-items: center; }
/* Chamada a tocar: ainda não há câmara própria, por isso não mostra a caixa da pré-visualização. */
.call-screen.is-video:has([data-incoming]:not([hidden])) .call-local { display: none; }
