/* Momentos do Casamento — Alan & Raíla
   Mesma identidade do site principal: creme, papel, verde-sálvia, dourado e areia. */
:root {
  --cream: #f7f3eb;
  --paper: #fffdf9;
  --ink: #536d64;
  --ink-strong: #3f554d;
  --muted: #5f6a63;
  --sage: #70867d;
  --sage-dark: #61776e;
  --gold: #7d6b4c;
  --brown: #8a7458;
  --peach: #e5b890;
  --sand: #e9dccb;
  --sage-wash: #e8ede9;
  --line: rgba(97, 119, 110, .19);
  --shadow: 0 10px 30px rgba(63, 85, 77, .12);
  --serif: "Bodoni Moda", "Bodoni MT", Didot, Georgia, serif;
  --sans: "Montserrat", "Aptos", "Segoe UI", Arial, sans-serif;
  --radius: 14px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --ring: conic-gradient(from 210deg, #a28e6c, #e5b890, #70867d, #a28e6c);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: contain;
}
body.lock { overflow: hidden; }
a { color: inherit; }
button { font: inherit; color: inherit; }
img, video { max-width: 100%; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Topo ── */
.top {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 10px;
  min-height: calc(58px + var(--safe-top));
  padding: calc(8px + var(--safe-top)) 14px 8px;
  background: rgba(255, 253, 249, .94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top-title { flex: 1; min-width: 0; text-align: center; font-family: var(--serif); font-size: 19px; color: var(--sage-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-logo { width: 34px; height: 42px; object-fit: contain; }
.icon-btn {
  width: 42px; height: 42px; flex: 0 0 42px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%; background: transparent; cursor: pointer; color: var(--sage-dark);
}
.icon-btn:active { background: var(--sage-wash); }
.icon-btn svg { width: 22px; height: 22px; }
.me-chip {
  display: inline-flex; align-items: center; gap: 7px; max-width: 46%;
  padding: 4px 10px 4px 4px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--paper); cursor: pointer; font-size: 12px; font-weight: 600; color: var(--sage-dark);
}
.me-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Layout ── */
main { width: min(100%, 760px); margin: 0 auto; padding: 0 16px calc(110px + var(--safe-bottom)); }
.page-head { text-align: center; padding: 34px 6px 20px; }
.eyebrow { margin: 0 0 10px; color: var(--gold); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; color: var(--sage-dark); letter-spacing: -.01em; }
.page-head h1 { margin: 0; font-size: clamp(32px, 8vw, 46px); line-height: 1.08; }
.page-head p.lead { width: min(100%, 560px); margin: 14px auto 0; color: var(--muted); font-size: 15px; line-height: 1.7; }
.divider { width: 64px; height: 1px; margin: 22px auto 0; background: var(--peach); }

/* ── Botões ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 50px; padding: 0 22px;
  border: 1px solid var(--sage-dark); border-radius: 999px;
  background: var(--paper); color: var(--sage-dark);
  font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; text-decoration: none;
  cursor: pointer; transition: transform .15s ease, background .2s ease, opacity .2s;
  user-select: none;
}
.btn svg { width: 19px; height: 19px; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--sage-dark); color: #fff; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn.ghost { border-color: var(--line); }
.btn.block { width: 100%; }
.btn.small { min-height: 40px; padding: 0 15px; font-size: 11px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.btn-row .btn { flex: 1 1 200px; }
.link-btn { border: 0; background: none; color: var(--sage-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px; }

/* ── Cartões da página inicial ── */
.hero-logo { display: block; width: 70px; height: 86px; margin: 0 auto 16px; object-fit: contain; }
.cards { display: grid; gap: 14px; margin-top: 8px; }
.exp-card {
  position: relative; display: flex; align-items: center; gap: 16px;
  padding: 20px 18px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); text-decoration: none; box-shadow: 0 1px 0 rgba(255,255,255,.7) inset;
  transition: transform .2s ease, box-shadow .2s ease;
  animation: rise .5s ease both;
}
.exp-card:nth-child(2) { animation-delay: .07s; }
.exp-card:nth-child(3) { animation-delay: .14s; }
.exp-card:active { transform: scale(.985); }
.exp-card .ico {
  flex: 0 0 58px; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; color: var(--sage-dark);
  background: radial-gradient(circle at 30% 25%, #fff, var(--sage-wash));
  border: 1px solid var(--line);
}
.exp-card .ico svg { width: 26px; height: 26px; }
.exp-card h2 { margin: 0; font-size: 22px; line-height: 1.15; }
.exp-card p { margin: 5px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.exp-card .go { margin-left: auto; color: var(--gold); flex: 0 0 auto; }
.exp-card .go svg { width: 20px; height: 20px; }
.exp-card.featured {
  flex-direction: column; align-items: center; text-align: center; gap: 10px;
  padding: 30px 20px 26px; border: 1px solid rgba(162, 142, 108, .55);
  background: radial-gradient(ellipse at 50% 0%, #fff 0%, var(--paper) 55%, #f3ece0 100%);
  box-shadow: var(--shadow);
}
.exp-card.featured::before { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(162, 142, 108, .3); border-radius: 10px; pointer-events: none; }
.exp-card.featured h2 { font-size: clamp(30px, 8.5vw, 40px); line-height: 1.08; }
.exp-card.featured p { font-size: 15px; max-width: 420px; }
.exp-card.featured .btn { margin-top: 6px; pointer-events: none; }
.feat-tag { font-size: 10px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.feat-faces { display: flex; justify-content: center; margin: 6px 0 2px; }
.feat-faces .ring { width: 54px; height: 54px; margin: 0 -7px; border-radius: 50%; padding: 2.5px; background: var(--ring); }
.feat-faces .ring > * { width: 100%; height: 100%; border-radius: 50%; border: 2.5px solid var(--paper); font-size: 16px; }
.feat-faces .ring .avatar svg { width: 20px; height: 20px; }
.community { display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; margin: 28px 0 0; text-align: center; }
.community div { min-width: 86px; }
.community strong { display: block; font-family: var(--serif); font-size: 30px; font-weight: 400; color: var(--sage-dark); line-height: 1.1; }
.community span { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.note { margin: 26px auto 0; max-width: 560px; padding: 16px 18px; border-radius: var(--radius); background: var(--sage-wash); color: var(--ink); font-size: 13px; line-height: 1.6; }
.note strong { color: #4d6259; }
.back-site { display: block; margin: 26px auto 0; text-align: center; color: var(--muted); font-size: 13px; }

/* ── Abas ── */
.tabs { display: flex; gap: 6px; padding: 5px; margin: 0 auto 18px; width: max-content; max-width: 100%; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); }
.tabs button { min-height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: transparent; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); cursor: pointer; }
.tabs button.on { background: var(--sage-dark); color: #fff; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: 0 0 auto; min-height: 36px; padding: 0 15px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--sage-dark); font-size: 12px; font-weight: 600; cursor: pointer; }
.chips button.on { background: var(--sage-dark); border-color: var(--sage-dark); color: #fff; }

/* ── Fileira de Stories ── */
.rail { display: flex; gap: 14px; overflow-x: auto; padding: 6px 2px 14px; margin: 0 -16px 8px; padding-left: 16px; padding-right: 16px; scroll-snap-type: x proximity; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.story-bubble { flex: 0 0 auto; width: 76px; display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: none; padding: 0; cursor: pointer; scroll-snap-align: start; }
.story-bubble .ring { display: block; width: 72px; height: 72px; flex: 0 0 72px; border-radius: 50%; padding: 3px; background: var(--line); }
.story-bubble .ring > .avatar { display: grid; font-size: 22px; }
.story-bubble.unseen .ring { background: var(--ring); }
.story-bubble .ring > * { width: 100%; height: 100%; border-radius: 50%; border: 3px solid var(--cream); }
.story-bubble .name { width: 100%; font-size: 11px; font-weight: 600; text-align: center; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.story-bubble.add .ring { background: var(--paper); border: 1.5px dashed var(--gold); padding: 2px; }
.story-bubble.add .plus { position: absolute; right: -2px; bottom: -2px; width: 24px; height: 24px; border-radius: 50%; background: var(--gold); color: #fff; display: grid; place-items: center; border: 2px solid var(--cream); }
.story-bubble.add .plus svg { width: 14px; height: 14px; }
.story-bubble .ring-wrap { position: relative; display: block; width: 72px; height: 72px; }
.story-bubble .ring > svg { width: 100%; height: 100%; }

.avatar { display: grid; place-items: center; overflow: hidden; background: linear-gradient(135deg, var(--sage), var(--gold)); color: #fff; font-weight: 700; font-family: var(--sans); text-transform: uppercase; object-fit: cover; }
img.avatar { display: block; background: var(--sand); }
.avatar.sm { width: 32px; height: 32px; border-radius: 50%; font-size: 12px; }
.avatar.md { width: 44px; height: 44px; border-radius: 50%; font-size: 15px; }
.avatar.lg { width: 96px; height: 96px; border-radius: 50%; font-size: 32px; }

/* ── Grade da galeria ── */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin: 0 -16px; }
@media (min-width: 620px) { .grid { margin: 0; gap: 6px; grid-template-columns: repeat(4, 1fr); } .grid .tile { border-radius: 6px; } }
.tile { position: relative; aspect-ratio: 1 / 1; overflow: hidden; border: 0; padding: 0; background: var(--sand); cursor: pointer; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .35s ease; }
.tile img.ok { opacity: 1; }
.tile .badge { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: rgba(30, 42, 38, .45); color: #fff; }
.tile .badge svg { width: 13px; height: 13px; }
.tile .who { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 6px 5px; font-size: 10px; font-weight: 600; color: #fff; text-align: left; background: linear-gradient(transparent, rgba(30, 42, 38, .55)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile.pending::after { content: "Aguardando aprovação"; position: absolute; inset: auto 0 0 0; padding: 4px; font-size: 9px; text-align: center; background: rgba(162, 142, 108, .9); color: #fff; }
.tile .ph { width: 100%; height: 100%; display: grid; place-items: center; color: var(--gold); }
.tile .ph svg { width: 26px; height: 26px; }
.sentinel { height: 60px; }
.empty { margin: 18px 0; padding: 34px 22px; text-align: center; border: 1px dashed rgba(97, 119, 110, .4); border-radius: var(--radius); background: var(--paper); color: var(--muted); }
.empty svg { width: 34px; height: 34px; color: var(--gold); }
.empty p { margin: 10px 0 16px; font-size: 15px; }
.skeleton { background: linear-gradient(90deg, var(--sand) 0%, #f3ebdf 50%, var(--sand) 100%); background-size: 200% 100%; animation: shimmer 1.3s infinite linear; }

/* ── Perfil do convidado ── */
.profile-head { text-align: center; padding: 28px 0 18px; }
.profile-head .avatar.lg { margin: 0 auto 12px; box-shadow: 0 0 0 4px var(--paper), 0 0 0 6px var(--gold); }
.profile-head h1 { margin: 0; font-size: 26px; }
.stats { display: flex; justify-content: center; gap: 26px; margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.stats strong { display: block; font-size: 20px; color: var(--sage-dark); }

/* ── Missões ── */
.progress { margin: 0 auto 18px; max-width: 520px; }
.progress .label { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; color: var(--sage-dark); margin-bottom: 7px; }
.bar { height: 10px; border-radius: 999px; background: var(--sand); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--sage), var(--gold)); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.mission-stage { position: relative; max-width: 520px; margin: 0 auto; touch-action: pan-y; }
.mission-card {
  position: relative; padding: 26px 22px 22px; border-radius: 20px; text-align: center;
  background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow);
  overflow: hidden; animation: cardIn .38s cubic-bezier(.2, .8, .2, 1) both;
}
.mission-card::before { content: ""; position: absolute; inset: 9px; border: 1px solid rgba(162, 142, 108, .28); border-radius: 14px; pointer-events: none; }
.mission-card.out-left { animation: cardOutLeft .22s ease forwards; }
.mission-card.out-right { animation: cardOutRight .22s ease forwards; }
.mission-card.from-left { animation-name: cardInLeft; }
.mission-card .meta { display: flex; justify-content: space-between; align-items: center; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.type-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--sage-wash); color: var(--sage-dark); letter-spacing: .06em; }
.type-pill svg { width: 14px; height: 14px; }
.mission-card .big-ico { width: 84px; height: 84px; margin: 22px auto 14px; border-radius: 50%; display: grid; place-items: center; color: var(--sage-dark); background: radial-gradient(circle at 30% 25%, #fff, var(--sand)); border: 1px solid var(--line); }
.mission-card .big-ico svg { width: 38px; height: 38px; }
.mission-card h2 { margin: 0; font-size: clamp(26px, 7vw, 32px); line-height: 1.12; }
.mission-card p.desc { margin: 12px auto 0; max-width: 400px; font-size: 16px; line-height: 1.6; color: var(--ink); }
.mission-card .done-flag { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; padding: 6px 12px; border-radius: 999px; background: #e6efe9; color: var(--sage-dark); font-size: 12px; font-weight: 700; }
.mission-card .done-flag svg { width: 15px; height: 15px; }
.mission-actions { display: grid; gap: 10px; margin-top: 22px; }
.mission-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mission-hint { margin: 14px 0 0; text-align: center; font-size: 12px; color: var(--muted); }
.mission-list { display: grid; gap: 10px; }
.mission-row { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); cursor: pointer; text-align: left; }
.mission-row .thumb { flex: 0 0 56px; width: 56px; height: 56px; border-radius: 9px; overflow: hidden; background: var(--sand); display: grid; place-items: center; color: var(--gold); }
.mission-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.mission-row .thumb svg { width: 22px; height: 22px; }
.mission-row b { display: block; color: var(--sage-dark); font-size: 14px; }
.mission-row small { color: var(--muted); font-size: 11px; }
.badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 6px 0 22px; }
.badge-card { padding: 14px 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--paper); text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); }
.badge-card .seal { width: 54px; height: 54px; margin: 0 auto 8px; opacity: .3; filter: grayscale(1); }
.badge-card.on { color: var(--sage-dark); border-color: rgba(162, 142, 108, .45); }
.badge-card.on .seal { opacity: 1; filter: none; }
.section-title { margin: 26px 0 12px; font-family: var(--serif); font-size: 22px; color: var(--sage-dark); }

/* ── Folhas (modais de baixo) ── */
.overlay { position: fixed; inset: 0; z-index: 80; background: rgba(30, 42, 38, .45); opacity: 0; transition: opacity .25s ease; }
.overlay.show { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 81;
  max-height: 92vh; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  padding: 10px 18px calc(22px + var(--safe-bottom));
  border-radius: 22px 22px 0 0; background: var(--paper);
  transform: translateY(100%); transition: transform .32s cubic-bezier(.2, .8, .2, 1);
  box-shadow: 0 -10px 40px rgba(30, 42, 38, .18);
}
@media (min-width: 700px) { .sheet { left: 50%; right: auto; width: 620px; margin-left: -310px; bottom: 24px; border-radius: 22px; max-height: 88vh; } }
.sheet.show { transform: translateY(0); }
.sheet .grab { width: 44px; height: 5px; border-radius: 99px; background: var(--line); margin: 0 auto 10px; }
.sheet h2 { margin: 6px 0 4px; font-size: 26px; text-align: center; }
.sheet .sub { margin: 0 0 18px; text-align: center; color: var(--muted); font-size: 14px; }
.sheet .close { position: absolute; top: 10px; right: 10px; }
.field { display: block; margin: 0 0 16px; }
.field > span { display: block; margin-bottom: 6px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.input, textarea.input {
  width: 100%; min-height: 50px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; color: var(--ink-strong); font: inherit; font-size: 16px; outline: none;
}
textarea.input { min-height: 84px; resize: vertical; }
.input:focus { border-color: var(--sage); box-shadow: 0 0 0 3px rgba(112, 134, 125, .15); }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 12px; background: var(--cream); font-size: 13px; line-height: 1.55; cursor: pointer; }
.check input { flex: 0 0 22px; width: 22px; height: 22px; margin: 0; accent-color: var(--sage-dark); }
details.policy { margin: 10px 0 16px; font-size: 12px; color: var(--muted); }
details.policy summary { cursor: pointer; font-weight: 700; color: var(--sage-dark); }
details.policy p { margin: 8px 0; }
.avatar-pick { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 4px 0 18px; }
.avatar-pick .btn-row .btn { flex: 0 1 auto; }
.error-box { margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; background: #f8e9e2; color: #8a4b33; font-size: 13px; }
.info-box { margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; background: var(--sage-wash); color: var(--ink); font-size: 13px; }

/* ── Escolha de arquivos ── */
.pick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.pick-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 96px; padding: 10px 6px; border: 1px solid var(--line); border-radius: 16px; background: var(--cream); color: var(--sage-dark); font-size: 12px; font-weight: 700; text-align: center; cursor: pointer; }
.pick-btn svg { width: 28px; height: 28px; }
.pick-btn:active { background: var(--sage-wash); }
.previews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.preview { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--sand); display: grid; place-items: center; color: var(--gold); }
.preview img, .preview video { width: 100%; height: 100%; object-fit: cover; }
.preview .rm { position: absolute; top: 5px; right: 5px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(30, 42, 38, .6); color: #fff; display: grid; place-items: center; cursor: pointer; }
.preview .rm svg { width: 14px; height: 14px; }
.preview .tag { position: absolute; left: 5px; bottom: 5px; padding: 2px 7px; border-radius: 99px; background: rgba(30, 42, 38, .6); color: #fff; font-size: 10px; font-weight: 700; }
.preview.bad { outline: 2px solid #c9805f; }
.preview .bad-msg { position: absolute; inset: auto 0 0 0; padding: 4px; background: rgba(201, 128, 95, .92); color: #fff; font-size: 10px; text-align: center; }
.mission-tag { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--sage-wash); margin-bottom: 14px; font-size: 13px; }
.mission-tag svg { flex: 0 0 22px; width: 22px; height: 22px; color: var(--sage-dark); }

/* ── Bandeja de envios ── */
.tray { position: fixed; left: 12px; right: 12px; bottom: calc(12px + var(--safe-bottom)); z-index: 60; max-width: 560px; margin: 0 auto; border-radius: 18px; background: var(--ink-strong); color: #fff; box-shadow: 0 12px 34px rgba(30, 42, 38, .3); overflow: hidden; animation: rise .3s ease both; }
.tray-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; }
.tray-head .spin { width: 22px; height: 22px; flex: 0 0 22px; }
.tray-head .txt { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; }
.tray-head .txt small { display: block; font-weight: 400; opacity: .8; font-size: 11px; }
.tray .bar { height: 4px; background: rgba(255, 255, 255, .15); border-radius: 0; }
.tray .bar i { background: var(--peach); }
.tray-list { max-height: 40vh; overflow-y: auto; border-top: 1px solid rgba(255, 255, 255, .12); }
.tray-item { display: flex; align-items: center; gap: 10px; padding: 9px 14px; font-size: 12px; }
.tray-item .th { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 8px; overflow: hidden; background: rgba(255, 255, 255, .1); display: grid; place-items: center; }
.tray-item .th img { width: 100%; height: 100%; object-fit: cover; }
.tray-item .th svg { width: 18px; height: 18px; }
.tray-item .st { flex: 1; min-width: 0; }
.tray-item .st b { display: block; font-weight: 600; }
.tray-item .st span { opacity: .8; }
.tray-item button { border: 1px solid rgba(255, 255, 255, .35); background: transparent; color: #fff; border-radius: 99px; padding: 6px 11px; font-size: 11px; font-weight: 700; cursor: pointer; }
.tray-item.err .st span { color: #ffd2bf; opacity: 1; }

/* ── Avisos ── */
.toast-wrap { position: fixed; left: 0; right: 0; top: calc(66px + var(--safe-top)); z-index: 120; display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 14px; }
.toast { max-width: 520px; padding: 12px 18px; border-radius: 14px; background: var(--paper); color: var(--sage-dark); box-shadow: var(--shadow); border: 1px solid var(--line); font-size: 14px; font-weight: 600; text-align: center; animation: toastIn .3s ease both; pointer-events: auto; }
.toast.err { background: #fff5f0; color: #8a4b33; }
.toast.out { animation: toastOut .3s ease forwards; }

/* ── Comemoração ── */
.celebrate { position: fixed; inset: 0; z-index: 130; display: grid; place-items: center; padding: 24px; background: rgba(247, 243, 235, .94); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade .3s ease both; }
.celebrate .box { max-width: 420px; text-align: center; animation: pop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.celebrate h2 { margin: 12px 0 8px; font-size: 34px; }
.celebrate p { margin: 0 0 22px; color: var(--ink); font-size: 16px; line-height: 1.6; }
.celebrate .seal-big { width: 150px; height: 150px; margin: 0 auto; filter: drop-shadow(0 10px 20px rgba(162, 142, 108, .35)); animation: spinIn 1s cubic-bezier(.2, .9, .3, 1) both; }
.petal { position: fixed; top: -20px; z-index: 131; width: 12px; height: 16px; border-radius: 80% 0 80% 0; pointer-events: none; animation: fall linear forwards; }

/* ── Visualizador de Stories ── */
.sv { position: fixed; inset: 0; z-index: 100; background: #111612; color: #fff; display: flex; flex-direction: column; touch-action: none; user-select: none; -webkit-user-select: none; animation: fade .2s ease both; }
.sv-bg { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(34px) brightness(.45); transform: scale(1.1); opacity: .9; transition: background-image .3s; }
.sv-stage { position: absolute; inset: 0; display: grid; place-items: center; }
.sv-stage img, .sv-stage video { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; }
.sv-stage .sv-loading { position: absolute; width: 38px; height: 38px; }
.sv-top { position: relative; z-index: 3; padding: calc(8px + var(--safe-top)) 10px 0; background: linear-gradient(rgba(0, 0, 0, .45), transparent); }
.sv-bars { display: flex; gap: 4px; }
.sv-bars span { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .35); overflow: hidden; }
.sv-bars span i { display: block; height: 100%; width: 0; background: #fff; }
.sv-head { display: flex; align-items: center; gap: 10px; padding: 10px 2px 14px; }
.sv-head .who { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; border: 0; background: none; color: #fff; padding: 0; cursor: pointer; text-align: left; }
.sv-head .who b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sv-head .who small { font-size: 11px; opacity: .8; }
.sv-head .icon-btn { color: #fff; width: 40px; height: 40px; flex-basis: 40px; }
.sv-head .icon-btn:active { background: rgba(255, 255, 255, .15); }
.sv-zones { position: absolute; inset: 0; z-index: 2; display: flex; }
.sv-zones div { height: 100%; }
.sv-zones .l { width: 30%; }
.sv-zones .r { flex: 1; }
.sv-foot { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 30px 14px calc(14px + var(--safe-bottom)); background: linear-gradient(transparent, rgba(0, 0, 0, .6)); }
.sv-caption { margin: 0 0 10px; font-size: 15px; line-height: 1.45; text-shadow: 0 1px 8px rgba(0, 0, 0, .5); max-height: 30vh; overflow-y: auto; }
.sv-actions { display: flex; align-items: center; gap: 8px; }
.sv-mission { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; max-width: 70%; padding: 0 13px; border: 1px solid rgba(255, 255, 255, .4); border-radius: 999px; background: rgba(255, 255, 255, .12); color: #fff; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sv-mission svg { width: 15px; height: 15px; flex: 0 0 15px; }
.sv-actions .spacer { flex: 1; }
.sv-actions .icon-btn { color: #fff; background: rgba(255, 255, 255, .12); width: 40px; height: 40px; flex-basis: 40px; }
.sv-paused .sv-top, .sv-paused .sv-foot { opacity: 0; transition: opacity .2s; }
.sv-error { position: absolute; z-index: 1; text-align: center; padding: 20px; font-size: 14px; opacity: .85; }
.sv-tap-sound { position: absolute; z-index: 4; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 10px 16px; border-radius: 999px; background: rgba(0, 0, 0, .55); font-size: 13px; font-weight: 600; pointer-events: none; animation: fade .2s ease both; }

/* ── Animações ── */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes cardIn { from { opacity: 0; transform: translateX(40px) rotate(2deg); } to { opacity: 1; transform: none; } }
@keyframes cardInLeft { from { opacity: 0; transform: translateX(-40px) rotate(-2deg); } to { opacity: 1; transform: none; } }
@keyframes cardOutLeft { to { opacity: 0; transform: translateX(-60px) rotate(-3deg); } }
@keyframes cardOutRight { to { opacity: 0; transform: translateX(60px) rotate(3deg); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px); } }
@keyframes pop { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
@keyframes spinIn { from { transform: rotate(-120deg) scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fall { to { transform: translate3d(var(--dx, 0), 110vh, 0) rotate(540deg); opacity: .9; } }
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; }

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