/* ==========================================================================
   Psiu: design system
   Mobile first (360px+). Cores da marca em :root. Temas de evento usam
   variáveis --t-* aplicadas no elemento .themed (ver helpers theme_style()).
   ========================================================================== */

:root {
  --brand: #FF3D6E;
  --brand-dark: #D91F52;
  --brand-rgb: 255, 61, 110;
  --ink: #1E1433;
  --accent: #FFC53D;
  --mint: #2EC4A6;

  --bg: #FBF8F6;
  --bg-2: #F4EEEA;
  --surface: #FFFFFF;
  --surface-2: #FAF6F3;
  --text: #1E1433;
  --muted: #6B6178;
  --line: #ECE4DE;
  --line-strong: #DCD1C8;
  --focus: #6C4CF1;

  --success: #12805C; --success-bg: #E3F6EE;
  --warn: #9A5B00;    --warn-bg: #FFF3D6;
  --danger: #C62845;  --danger-bg: #FDE8EC;
  --info: #3657C8;    --info-bg: #E8EDFD;

  /* tema padrão (sobrescrito por .themed) */
  --t-primary: var(--brand);
  --t-primary-rgb: var(--brand-rgb);
  --t-ink: var(--ink);
  --t-accent: var(--accent);
  --t-soft: #FFF0F4;
  --t-dark-soft: #2A1A24;

  --r-sm: 10px; --r: 16px; --r-lg: 24px; --r-xl: 32px; --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(30, 20, 51, .06), 0 1px 1px rgba(30, 20, 51, .04);
  --shadow: 0 8px 24px -8px rgba(30, 20, 51, .14), 0 2px 6px rgba(30, 20, 51, .05);
  --shadow-lg: 0 24px 60px -20px rgba(30, 20, 51, .28);

  --font-display: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --header-h: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #130E1D;
    --bg-2: #1A1426;
    --surface: #1E1730;
    --surface-2: #251D39;
    --text: #F4F0FA;
    --muted: #A99FB8;
    --line: #2F2645;
    --line-strong: #40355A;
    --focus: #A894FF;
    --success: #4DD4A0; --success-bg: rgba(77, 212, 160, .12);
    --warn: #FFC860;    --warn-bg: rgba(255, 200, 96, .12);
    --danger: #FF7A93;  --danger-bg: rgba(255, 122, 147, .12);
    --info: #8FA8FF;    --info-bg: rgba(143, 168, 255, .12);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, .6);
    --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, .7);
    --t-soft: var(--t-dark-soft);
    color-scheme: dark;
  }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip;
}
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration-color: rgba(var(--t-primary-rgb), .4); text-underline-offset: 3px; }
a:hover { color: var(--t-primary); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.02em; font-weight: 700; }
h1 { font-size: clamp(1.9rem, 6vw, 3rem); }
h2 { font-size: clamp(1.45rem, 4.4vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
[x-cloak] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--r-sm); }
.skip-link:focus { top: 12px; }

.icon { display: inline-block; vertical-align: -0.22em; width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 28px; height: 28px; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.container-sm { max-width: 720px; }
.container-xs { max-width: 460px; }
.stack > * + * { margin-top: var(--gap, 16px); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row-between { justify-content: space-between; }
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.main { padding: 24px 0 96px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; } .mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; } .mb-4 { margin-bottom: 16px; }
.w-full { width: 100%; }
.nowrap { white-space: nowrap; }
.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--t-primary); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.site-header .container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-family: var(--font-display); font-weight: 800; font-size: 1.45rem; letter-spacing: -.04em; color: var(--text); }
.logo-mark { width: 34px; height: 34px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a:not(.btn), .nav button.navlink { text-decoration: none; padding: 8px 12px; border-radius: var(--r-pill); font-weight: 600; font-size: .92rem; color: var(--muted); background: none; border: 0; cursor: pointer; }
.nav a:not(.btn):hover, .nav a.active, .nav button.navlink:hover { color: var(--text); background: var(--bg-2); }
.nav-desktop { display: none; }
@media (min-width: 820px) { .nav-desktop { display: flex; } .nav-mobile-toggle { display: none !important; } }
.menu-sheet { position: fixed; inset: var(--header-h) 0 auto 0; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg); padding: 12px 16px 20px; display: grid; gap: 4px; z-index: 39; }
.menu-sheet a, .menu-sheet button { display: flex; gap: 12px; align-items: center; padding: 14px 12px; border-radius: var(--r); text-decoration: none; font-weight: 600; background: none; border: 0; width: 100%; text-align: left; cursor: pointer; }
.menu-sheet a:hover, .menu-sheet button:hover { background: var(--bg-2); }

/* ---------- Bottom nav (app, mobile) ---------- */
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; display: flex; justify-content: space-around; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.tabbar a { display: grid; justify-items: center; gap: 2px; font-size: .72rem; font-weight: 600; color: var(--muted); text-decoration: none; padding: 4px 14px; border-radius: var(--r); }
.tabbar a.active { color: var(--brand); }
@media (min-width: 820px) { .tabbar { display: none; } .main { padding-bottom: 64px; } }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--t-primary); --btn-fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: var(--r-pill); border: 0;
  background: var(--btn-bg); color: var(--btn-fg); font-weight: 700; font-size: 1rem; line-height: 1.1;
  text-decoration: none; cursor: pointer; white-space: nowrap; position: relative;
  box-shadow: 0 6px 18px -6px rgba(var(--t-primary-rgb), .55), inset 0 -2px 0 rgba(0, 0, 0, .12);
  transition: transform .15s var(--ease), box-shadow .2s var(--ease), filter .2s;
}
.btn:hover { color: var(--btn-fg); filter: brightness(1.05); transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn[disabled], .btn.is-loading { opacity: .65; pointer-events: none; }
.btn.is-loading::after { content: ''; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.btn-secondary { --btn-bg: var(--surface); --btn-fg: var(--text); box-shadow: var(--shadow-sm), inset 0 0 0 1.5px var(--line-strong); }
.btn-secondary:hover { --btn-fg: var(--text); }
.btn-ghost { --btn-bg: transparent; --btn-fg: var(--text); box-shadow: none; }
.btn-ghost:hover { background: var(--bg-2); }
.btn-dark { --btn-bg: var(--ink); box-shadow: 0 8px 20px -8px rgba(30, 20, 51, .6); }
.btn-danger { --btn-bg: var(--danger); box-shadow: none; }
.btn-soft { --btn-bg: rgba(var(--t-primary-rgb), .1); --btn-fg: var(--t-primary); box-shadow: none; }
.btn-soft:hover { --btn-fg: var(--t-primary); }
.btn-sm { min-height: 38px; padding: 8px 14px; font-size: .88rem; }
.btn-lg { min-height: 58px; padding: 16px 30px; font-size: 1.08rem; }
.btn-block { width: 100%; }
.btn-icon { width: 42px; min-height: 42px; padding: 0; border-radius: 50%; }
@media (prefers-color-scheme: dark) { .btn-dark { --btn-bg: #fff; --btn-fg: var(--ink); } .btn-dark:hover { --btn-fg: var(--ink); } }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow-sm); }
.card-lg { padding: 28px; }
@media (min-width: 640px) { .card { padding: 24px; } .card-lg { padding: 36px; } }
.card-title { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; margin-bottom: 14px; }
.card-title .icon { color: var(--t-primary); }
.card-link { text-decoration: none; display: block; transition: transform .2s var(--ease), box-shadow .2s; }
.card-link:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: inherit; }
.divider { height: 1px; background: var(--line); margin: 20px 0; border: 0; }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; }
.field + .field, .field + .row, .row + .field { margin-top: 16px; }
.label { font-weight: 600; font-size: .92rem; }
.hint { font-size: .82rem; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; min-height: 50px; padding: 12px 16px; background: var(--surface);
  border: 1.5px solid var(--line-strong); border-radius: var(--r); font-size: 1rem;
  transition: border-color .15s, box-shadow .15s; appearance: none;
}
.textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236B6178' stroke-width='2'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--t-primary); box-shadow: 0 0 0 4px rgba(var(--t-primary-rgb), .15); }
.input::placeholder, .textarea::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.input-group { position: relative; }
.input-group .input { padding-right: 48px; }
.input-group .btn-icon { position: absolute; right: 4px; top: 4px; width: 42px; min-height: 42px; }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: .95rem; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--t-primary); flex: none; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 12px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 48px; height: 28px; border-radius: 99px; background: var(--line-strong); transition: background .2s; position: relative; flex: none; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s var(--ease); }
.switch input:checked + .track { background: var(--t-primary); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 3px solid var(--focus); outline-offset: 2px; }
.form-grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .form-grid-2 { grid-template-columns: 1fr 1fr; } }
.form-grid .field + .field { margin-top: 0; }

/* ---------- Badges / chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-pill); font-size: .76rem; font-weight: 700; white-space: nowrap; background: var(--bg-2); color: var(--muted); }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-brand { background: rgba(var(--t-primary-rgb), .12); color: var(--t-primary); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--line); font-size: .86rem; font-weight: 500; }

/* ---------- Alerts / empty ---------- */
.alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r); font-size: .94rem; background: var(--info-bg); color: var(--text); }
.alert .icon { color: var(--info); margin-top: 2px; }
.alert-warn { background: var(--warn-bg); } .alert-warn .icon { color: var(--warn); }
.alert-danger { background: var(--danger-bg); } .alert-danger .icon { color: var(--danger); }
.alert-success { background: var(--success-bg); } .alert-success .icon { color: var(--success); }
.empty { text-align: center; padding: 36px 20px; border: 2px dashed var(--line-strong); border-radius: var(--r-lg); background: var(--surface-2); }
.empty-art { width: 92px; height: 92px; margin: 0 auto 12px; }
.empty h3 { margin-bottom: 6px; }
.empty p { color: var(--muted); max-width: 380px; margin: 0 auto 16px; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; z-index: 100; left: 12px; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); display: grid; gap: 8px; pointer-events: none; }
@media (min-width: 640px) { .toasts { left: auto; right: 24px; bottom: 24px; width: 380px; } }
.toast { pointer-events: auto; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); background: var(--ink); color: #fff; box-shadow: var(--shadow-lg); font-size: .94rem; font-weight: 500; animation: toast-in .35s var(--ease); }
.toast .icon { margin-top: 1px; }
.toast-success .icon { color: #5BE3AE; } .toast-error .icon { color: #FF8BA2; } .toast-info .icon { color: #A9BBFF; }
.toast button { margin-left: auto; background: none; border: 0; color: inherit; opacity: .6; cursor: pointer; padding: 0 0 0 8px; }
@media (prefers-color-scheme: dark) { .toast { background: #fff; color: var(--ink); } }

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(19, 14, 29, .55); backdrop-filter: blur(4px); display: grid; place-items: end center; padding: 0; animation: fade .2s; }
@media (min-width: 640px) { .modal-backdrop { place-items: center; padding: 24px; } }
.modal { width: 100%; max-width: 520px; max-height: 92vh; overflow: auto; background: var(--surface); border-radius: var(--r-xl) var(--r-xl) 0 0; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); box-shadow: var(--shadow-lg); animation: sheet-up .3s var(--ease); }
@media (min-width: 640px) { .modal { border-radius: var(--r-xl); padding: 28px; animation: pop .25s var(--ease); } }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 20px; }
@media (max-width: 480px) { .modal-actions .btn { flex: 1; } }

/* ---------- Tables -> listas no mobile ---------- */
.list { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.list-item .btn-icon { width: 38px; min-height: 38px; }
@media (max-width: 400px) { .list-item { padding: 12px 10px; gap: 10px; } .list-item > .avatar { --size: 38px; } }
.list-item .grow .badge { white-space: normal; }
@media (max-width: 520px) {
  .list-item:has(.item-actions) { flex-wrap: wrap; }
  .list-item .item-actions { width: 100%; justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 6px; margin-top: 2px; }
}
.list-item { display: flex; gap: 12px; align-items: center; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th { font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--surface-2); }
.table tr:last-child td { border-bottom: 0; }

/* ---------- Avatar ---------- */
.avatar { --size: 44px; width: var(--size); height: var(--size); border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: calc(var(--size) * .38); color: #fff; background: linear-gradient(135deg, var(--t-primary), color-mix(in srgb, var(--t-primary) 50%, var(--t-accent))); overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { --size: 84px; }
.avatar-xl { --size: 112px; }

/* ---------- Themed header (grupo) ---------- */
.themed { --brand-rgb: var(--t-primary-rgb); }
/* Tema do grupo: o fundo suave muda no modo escuro (antes ficava claro com texto claro) */
.themed { --t-soft: var(--t-soft-l, #FFF0F4); }
@media (prefers-color-scheme: dark) { .themed { --t-soft: var(--t-soft-d, #2A1A24); } }
.group-hero { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 24px 20px; background: var(--t-soft); color: var(--t-ink); isolation: isolate; }
.group-hero .meta { color: var(--t-ink); opacity: 1; }
@media (prefers-color-scheme: dark) { .group-hero { color: #fff; } .group-hero .meta { color: rgba(255,255,255,.9); } }
.group-hero.has-cover, .group-hero.has-cover .meta { color: #fff; }
.group-hero.has-cover h1, .group-hero.has-cover p, .group-hero.has-cover .meta { text-shadow: 0 1px 12px rgba(0,0,0,.35); }
@media (min-width: 640px) { .group-hero { padding: 36px; } }
.group-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; opacity: .5; background-image: var(--pattern); background-size: 48px 48px; }
.group-hero.has-cover { color: #fff; background: #000; }
.group-hero .cover { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.group-hero.has-cover::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(10, 6, 18, .62) 0%, rgba(10, 6, 18, .25) 70%, rgba(10, 6, 18, .1) 100%), linear-gradient(180deg, transparent 40%, rgba(10, 6, 18, .45)); }
.group-hero.has-cover::before { display: none; }
.group-hero h1 { font-size: clamp(1.7rem, 6vw, 2.6rem); margin-bottom: 8px; }
.type-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: var(--r-pill); background: var(--surface); color: var(--t-primary); font-weight: 700; font-size: .86rem; box-shadow: var(--shadow-sm); margin-bottom: 14px; }
.type-pill .emoji { font-size: 1.1rem; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .92rem; font-weight: 500; opacity: .92; }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.pattern-stars { --pattern: radial-gradient(circle at 25% 25%, rgba(var(--t-primary-rgb), .18) 2px, transparent 2.5px), radial-gradient(circle at 75% 75%, rgba(var(--t-primary-rgb), .12) 1.5px, transparent 2px); }
.pattern-dots { --pattern: radial-gradient(rgba(var(--t-primary-rgb), .16) 2px, transparent 2.5px); }
.pattern-eggs { --pattern: radial-gradient(ellipse 5px 7px at 30% 30%, rgba(var(--t-primary-rgb), .18) 98%, transparent), radial-gradient(ellipse 4px 6px at 75% 70%, rgba(95, 201, 168, .25) 98%, transparent); }
.pattern-lines { --pattern: repeating-linear-gradient(-45deg, rgba(var(--t-primary-rgb), .08) 0 2px, transparent 2px 14px); }
.pattern-grapes { --pattern: radial-gradient(circle at 30% 30%, rgba(var(--t-primary-rgb), .15) 4px, transparent 4.5px), radial-gradient(circle at 40% 42%, rgba(var(--t-primary-rgb), .12) 4px, transparent 4.5px); }
.pattern-spots { --pattern: radial-gradient(ellipse 7px 5px at 30% 30%, rgba(43, 33, 24, .14) 98%, transparent), radial-gradient(ellipse 5px 7px at 75% 70%, rgba(43, 33, 24, .1) 98%, transparent); }
.pattern-waves { --pattern: radial-gradient(circle at 50% 120%, transparent 18px, rgba(var(--t-primary-rgb), .1) 19px, transparent 21px); }

/* ---------- Countdown ---------- */
.countdown { display: flex; gap: 8px; }
.countdown div { min-width: 62px; text-align: center; padding: 10px 6px; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-sm); }
.countdown strong { display: block; font-family: var(--font-display); font-size: 1.6rem; line-height: 1; color: var(--t-primary); font-variant-numeric: tabular-nums; }
.countdown small { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }

/* ---------- Revelação ---------- */
.reveal-card { position: relative; overflow: hidden; border-radius: var(--r-xl); background: linear-gradient(160deg, var(--surface) 0%, var(--t-soft) 100%); border: 1px solid var(--line); padding: 22px 20px; box-shadow: var(--shadow); }
@media (min-width: 640px) { .reveal-card { padding: 32px; } }
.reveal-card .secret-zone { position: relative; transition: filter .9s var(--ease), opacity .6s; }
.reveal-card.is-locked .secret-zone { filter: blur(9px) saturate(.6); opacity: .75; user-select: none; pointer-events: none; }
.reveal-card .unblur { animation: unblur 1.1s var(--ease) both; }
.ph-line { height: 14px; border-radius: 8px; background: color-mix(in srgb, var(--text) 18%, transparent); margin: 8px 0; }
.ph-name { height: 30px; width: 70%; border-radius: 10px; background: color-mix(in srgb, var(--t-primary) 45%, transparent); }
.locked-area { position: relative; }
.lock-overlay { position: absolute; inset: 0; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; text-align: center; padding: 12px 0; }
.lock-overlay .card { padding: 18px 14px; }
.lock-overlay .lock-badge { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 12px; background: var(--surface); color: var(--t-primary); box-shadow: var(--shadow); }
.lock-overlay .lock-badge .icon { width: 28px; height: 28px; }
.timer-ring { --p: 1; position: relative; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--t-primary) calc(var(--p) * 360deg), var(--line) 0); flex: none; }
.timer-ring::before { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: var(--surface); }
.timer-ring span { position: relative; font-weight: 800; font-variant-numeric: tabular-nums; font-size: .95rem; }
.giftee-head { display: flex; gap: 16px; align-items: center; }
.giftee-name { font-family: var(--font-display); font-size: clamp(1.7rem, 7vw, 2.4rem); line-height: 1.05; font-weight: 800; color: var(--t-primary); margin: 0; }

/* Tela de código (OTP) */
.otp { display: flex; gap: 6px; justify-content: center; }
.otp input { flex: 1 1 0; min-width: 0; max-width: 54px; width: 46px; height: 58px; text-align: center; font-size: 1.6rem; font-weight: 800; font-family: var(--font-display); border: 2px solid var(--line-strong); border-radius: 14px; background: var(--surface); caret-color: var(--t-primary); transition: border-color .15s, transform .15s; }
@media (min-width: 400px) { .otp { gap: 8px; } .otp input { height: 62px; } }
.otp input:focus { outline: none; border-color: var(--t-primary); box-shadow: 0 0 0 4px rgba(var(--t-primary-rgb), .15); transform: translateY(-2px); }
.otp.shake { animation: shake .4s; }
.otp input.filled { border-color: var(--t-primary); }

/* Presente da primeira revelação */
.gift-stage { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--t-primary) 35%, #120b1c), #0d0814 75%); color: #fff; text-align: center; padding: 24px; animation: fade .3s; }
.gift-box { width: 200px; height: 200px; cursor: pointer; border: 0; background: none; padding: 0; animation: wobble 1.6s ease-in-out infinite; }
.gift-box:focus-visible { outline-offset: 10px; }
.gift-box svg { width: 100%; height: 100%; overflow: visible; }
.gift-box .lid { transform-origin: 100px 78px; transition: transform .7s var(--ease); }
.gift-box.open { animation: none; }
.gift-box.open .lid { transform: translate(40px, -140px) rotate(28deg); opacity: 0; transition: transform .7s var(--ease), opacity .5s .4s; }
.gift-reveal { animation: rise .8s var(--ease) both; }
.gift-reveal .giftee-name { color: #fff; font-size: clamp(2.2rem, 10vw, 3.6rem); }
.confetti-canvas { position: fixed; inset: 0; pointer-events: none; z-index: 99; }

/* Selo de confiança */
.trust { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--r-lg); background: linear-gradient(135deg, rgba(46, 196, 166, .12), rgba(46, 196, 166, .04)); border: 1px solid rgba(46, 196, 166, .3); }
.trust .shield { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--mint); color: #fff; flex: none; }
.trust strong { display: block; font-family: var(--font-display); font-size: 1.05rem; }

/* ---------- Wishlist ---------- */
.wish { display: grid; grid-template-columns: 72px 1fr; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.wish-img { width: 72px; height: 72px; border-radius: 14px; object-fit: cover; background: var(--t-soft); display: grid; place-items: center; font-size: 1.8rem; overflow: hidden; }
.wish-img img { width: 100%; height: 100%; object-fit: cover; }
.wish h4 { font-family: var(--font); font-size: 1rem; margin: 0 0 4px; letter-spacing: 0; }
.wish .row { gap: 6px; }
.prio-1 { color: var(--danger); } .prio-2 { color: var(--warn); } .prio-3 { color: var(--muted); }
.video-card { display: flex; gap: 10px; align-items: center; margin-top: 8px; padding: 8px; border-radius: 12px; background: var(--surface-2); text-decoration: none; font-size: .85rem; font-weight: 600; }
.video-card img { width: 64px; height: 40px; object-fit: cover; border-radius: 8px; }
.prefs { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .prefs { grid-template-columns: repeat(3, 1fr); } }
.pref { padding: 12px 14px; border-radius: var(--r); background: var(--surface-2); }
.pref small { display: block; font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

/* ---------- Type picker ---------- */
.type-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .type-grid { grid-template-columns: repeat(4, 1fr); } }
.type-option { position: relative; cursor: pointer; }
.type-option input { position: absolute; opacity: 0; }
.type-option .box { display: grid; gap: 6px; padding: 14px; height: 100%; border-radius: var(--r); border: 2px solid var(--line); background: var(--surface); transition: all .2s var(--ease); }
.type-option .emoji { font-size: 1.8rem; line-height: 1; }
.type-option strong { font-size: .95rem; }
.type-option small { font-size: .76rem; color: var(--muted); line-height: 1.35; }
.type-option .swatch { display: flex; gap: 4px; }
.type-option .swatch i { width: 14px; height: 14px; border-radius: 50%; }
.type-option input:checked + .box { border-color: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 18%, transparent); transform: translateY(-2px); }
.type-option input:focus-visible + .box { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- Plans ---------- */
.plans { display: grid; gap: 16px; }
@media (min-width: 720px) { .plans { grid-template-columns: 1fr 1fr; align-items: stretch; } }
.plan { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 26px 22px; border-radius: var(--r-xl); background: var(--surface); border: 2px solid var(--line); }
.plan.featured { border-color: var(--brand); box-shadow: 0 24px 50px -24px rgba(var(--brand-rgb), .55); }
.plan .ribbon { position: absolute; top: -13px; left: 22px; padding: 4px 12px; border-radius: var(--r-pill); background: var(--brand); color: #fff; font-size: .76rem; font-weight: 800; letter-spacing: .03em; }
.plan .price { font-family: var(--font-display); font-size: 2.6rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.plan .price small { font-size: 1rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .95rem; }
.plan li { display: flex; gap: 10px; }
.plan li .icon { color: var(--mint); margin-top: 2px; }
.plan .btn { margin-top: auto; }

/* ---------- Stats (admin / organizador) ---------- */
.stat { padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.stat small { display: block; font-size: .78rem; font-weight: 600; color: var(--muted); }
.stat strong { display: block; font-family: var(--font-display); font-size: 1.7rem; line-height: 1.2; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.progress { height: 8px; border-radius: 8px; background: var(--line); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--t-primary); border-radius: inherit; transition: width .6s var(--ease); }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 120px; }
.bars i { flex: 1; min-height: 2px; background: rgba(var(--brand-rgb), .25); border-radius: 4px 4px 0 0; position: relative; }
.bars i:hover { background: var(--brand); }

/* ---------- Checklist ---------- */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--r); background: var(--surface-2); }
.checklist .ok { color: var(--success); } .checklist .bad { color: var(--danger); } .checklist .meh { color: var(--warn); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: var(--r-pill); background: var(--bg-2); overflow-x: auto; scrollbar-width: none; }
.tabs button { flex: 1; padding: 10px 14px; border: 0; border-radius: var(--r-pill); background: none; font-weight: 600; font-size: .9rem; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ---------- Auth pages ---------- */
.auth-wrap { min-height: 100vh; display: grid; }
@media (min-width: 960px) { .auth-wrap { grid-template-columns: 1.05fr 1fr; } }
.auth-side { display: none; position: relative; overflow: hidden; background: var(--ink); color: #fff; padding: 48px; }
@media (min-width: 960px) { .auth-side { display: flex; flex-direction: column; justify-content: space-between; } }
.auth-side h2 { font-size: 2.6rem; max-width: 440px; }
.auth-main { display: grid; place-items: center; padding: 32px 16px 48px; }
.auth-box { width: 100%; max-width: 420px; }
.auth-box h1 { font-size: 2rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 120px; font-size: .9rem; color: var(--muted); }
@media (min-width: 820px) { .site-footer { padding-bottom: 40px; } }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* ---------- Landing ---------- */
.hero { position: relative; overflow: hidden; padding: 40px 0 56px; }
@media (min-width: 960px) { .hero { padding: 72px 0 96px; } }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.1fr .9fr; } }
.hero h1 { font-size: clamp(2.5rem, 9vw, 4.6rem); line-height: .98; letter-spacing: -.045em; font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--brand); position: relative; white-space: nowrap; }
.hero h1 em svg { position: absolute; left: -4%; bottom: -.18em; width: 108%; height: .4em; }
.hero .lead { font-size: clamp(1.05rem, 3.2vw, 1.25rem); color: var(--muted); max-width: 540px; }
.hero-blob { position: absolute; z-index: -1; border-radius: 50%; filter: blur(60px); opacity: .55; }
.proof { display: flex; gap: 10px; align-items: center; font-size: .9rem; color: var(--muted); }
.proof .faces { display: flex; }
.proof .faces span { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--bg); margin-left: -8px; display: grid; place-items: center; font-size: 1rem; background: var(--surface); }
.proof .faces span:first-child { margin-left: 0; }
.section { padding: 64px 0; }
@media (min-width: 960px) { .section { padding: 96px 0; } }
.section-head { max-width: 640px; margin: 0 auto 40px; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.steps { display: grid; gap: 16px; counter-reset: s; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { position: relative; padding: 28px 24px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); }
.step::before { counter-increment: s; content: counter(s); position: absolute; top: 20px; right: 22px; font-family: var(--font-display); font-weight: 800; font-size: 3.2rem; line-height: 1; color: rgba(var(--brand-rgb), .14); }
.step .ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 16px; color: #fff; }
.types-showcase { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 820px) { .types-showcase { grid-template-columns: repeat(4, 1fr); gap: 16px; } }
.type-card { position: relative; overflow: hidden; padding: 20px 16px; border-radius: var(--r-lg); color: var(--ink-on, #fff); min-height: 160px; display: flex; flex-direction: column; justify-content: flex-end; transition: transform .25s var(--ease); }
.type-card:hover { transform: translateY(-4px) rotate(-.6deg); }
.type-card .emoji { position: absolute; top: 12px; right: 12px; font-size: 2.6rem; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .2)); }
.type-card strong { font-family: var(--font-display); font-size: 1.15rem; line-height: 1.15; }
.type-card small { opacity: .85; font-size: .8rem; line-height: 1.35; margin-top: 4px; }
.secret-block { border-radius: var(--r-xl); background: var(--ink); color: #fff; padding: 36px 22px; position: relative; overflow: hidden; }
@media (min-width: 820px) { .secret-block { padding: 64px; } }
.secret-block .muted { color: rgba(255, 255, 255, .7); }
.secret-points { display: grid; gap: 14px; margin-top: 24px; }
@media (min-width: 820px) { .secret-points { grid-template-columns: repeat(3, 1fr); } }
.secret-points div { padding: 18px; border-radius: var(--r-lg); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); }
.phone { width: 290px; max-width: 100%; margin: 0 auto; border-radius: 44px; padding: 12px; background: #120c1c; box-shadow: var(--shadow-lg), inset 0 0 0 2px #2c2240; }
.phone-screen { border-radius: 34px; overflow: hidden; background: var(--bg); min-height: 520px; padding: 22px 16px; position: relative; }
.phone-notch { width: 96px; height: 24px; border-radius: 20px; background: #120c1c; margin: -10px auto 16px; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.4rem; line-height: 1; color: var(--brand); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 12px 0 0; color: var(--muted); }
.cta-final { text-align: center; border-radius: var(--r-xl); padding: 48px 22px; background: linear-gradient(135deg, var(--brand), #FF7A59 60%, var(--accent)); color: #fff; }
.cta-final h2 { font-size: clamp(1.9rem, 6vw, 3rem); }
.marquee { overflow: hidden; white-space: nowrap; padding: 14px 0; background: var(--accent); color: var(--ink); font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; transform: rotate(-1.2deg); margin: 0 -10px; }
.marquee div { display: inline-block; animation: marquee 30s linear infinite; }
.prose { max-width: 720px; }
.prose h2 { font-size: 1.4rem; margin-top: 2em; }
.prose p, .prose li { color: var(--text); }

/* Animação de entrada ao rolar */
.reveal-on-scroll { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal-on-scroll.in { opacity: 1; transform: none; }

/* ---------- Keyframes ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.94); } }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.97); } }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@keyframes unblur { from { filter: blur(14px); opacity: .3; transform: scale(.98); } to { filter: none; opacity: 1; transform: none; } }
@keyframes wobble { 0%, 100% { transform: rotate(0) scale(1); } 20% { transform: rotate(-4deg) scale(1.03); } 40% { transform: rotate(4deg); } 60% { transform: rotate(-2deg) scale(1.02); } 80% { transform: rotate(1deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(30px) scale(.9); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes float { 50% { transform: translateY(-10px) rotate(2deg); } }
.float { animation: float 5s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal-on-scroll { opacity: 1; transform: none; }
}

/* ---------- Bonequinhos (avatares) ---------- */
.avatar.has-img { background: var(--surface-2); }
.avatar-picker { border: 0; padding: 0; margin: 16px 0 0; min-width: 0; }
.avatar-preview { width: 72px; height: 72px; border-radius: 50%; box-shadow: var(--shadow-sm); flex: none; }
.avatar-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); align-content: start; gap: 8px; max-height: 280px; overflow-y: auto; padding: 4px; }
@media (max-width: 400px) { .avatar-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.avatar-grid button { display: block; width: 100%; padding: 0; border: 3px solid transparent; border-radius: 50%; background: none; cursor: pointer; transition: transform .15s var(--ease), border-color .15s; line-height: 0; }
.avatar-grid button:hover { transform: scale(1.06); }
.avatar-grid button.is-selected { border-color: var(--t-primary); }
.avatar-grid img { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: 50%; }

/* ---------- Link de convite e card de prontidão ---------- */
.btn-wa { --btn-bg: #1FA855; box-shadow: 0 6px 18px -6px rgba(31, 168, 85, .55); }
.ready-card { border: 2px solid var(--line-strong); background: var(--surface); }
.ready-card.is-ready { border-color: var(--success); background: var(--success-bg); }
.invite-card { border: 2px dashed rgba(var(--t-primary-rgb), .45); }
.alert-info { background: var(--info-bg); }
.avatar-xs { --size: 26px; font-size: .6rem; }
.trust-big { padding: 18px; }
.trust-big strong { font-size: 1.15rem; margin-bottom: 4px; }
.trust-big .small { color: var(--text); opacity: .85; }
.promo-card { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 20px; border-radius: var(--r-xl); text-decoration: none; color: #fff; background: linear-gradient(135deg, var(--brand), #FF7A59 60%, #FFB020); box-shadow: 0 18px 40px -20px rgba(var(--brand-rgb), .7); transition: transform .2s var(--ease); }
.promo-card:hover { color: #fff; transform: translateY(-2px); }
.promo-art { width: 56px; height: 56px; border-radius: 18px; background: rgba(255,255,255,.2); display: grid; place-items: center; font-size: 1.8rem; flex: none; }
.promo-title { display: block; font-family: var(--font-display); font-size: 1.25rem; line-height: 1.2; margin: 2px 0 4px; }

/* ---------- Modelos de capa ---------- */
.cover-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 560px) { .cover-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.cover-option { display: grid; gap: 4px; cursor: pointer; text-align: center; font-size: .8rem; font-weight: 600; position: relative; }
.cover-option input { position: absolute; opacity: 0; }
.cover-thumb { display: grid; place-items: center; width: 100%; aspect-ratio: 5 / 2; object-fit: cover; border-radius: 12px; border: 3px solid transparent; transition: border-color .15s, transform .15s var(--ease); overflow: hidden; color: var(--muted); }
.cover-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cover-upload { background: var(--surface-2); border-style: dashed; border-color: var(--line-strong); }
.cover-option input:checked + .cover-thumb { border-color: var(--t-primary); border-style: solid; transform: translateY(-2px); box-shadow: 0 0 0 3px rgba(var(--t-primary-rgb), .18); }
.cover-option input:focus-visible + .cover-thumb { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- Faixas de preço ---------- */
.tier-grid { display: grid; gap: 16px; max-width: 1100px; margin-inline: auto; }
@media (min-width: 640px) { .tier-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .tier-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tier-grid .plan .price { font-size: 2.1rem; }

@media (prefers-color-scheme: dark) { .type-pill { color: var(--text); } }
details > summary .icon { margin-right: 4px; }
