/* ==========================================================================
   Jornada na Palavra — baseado no Glass Design System de murilosaez.com.br
   Liquid Glass · fonte do sistema · claro/escuro · mobile-first
   Toda cor é um token; não use cores fixas em componentes.
   ========================================================================== */

:root {
  --gutter: clamp(16px, 4.5vw, 28px);
  --maxw: 760px;

  --canvas: #f6f4ef;
  --canvas-raised: #ffffff;
  --ink: #1d1d1f;
  --ink-secondary: #5c5a57;
  --accent: #8a600f;
  --accent-tint: #f3e7cc;
  --link: #0066cc;
  --on-ink: #ffffff;
  --brand-gold: #f4b30c;
  --brand-ink: #111111;
  --success: #1e7a55;
  --success-tint: #dcf2e7;
  --danger: #b3261e;
  --danger-tint: #fbe3e1;

  --glass-fill: rgba(255, 255, 255, .6);
  --glass-strong: rgba(255, 255, 255, .84);
  --glass-stroke: rgba(255, 255, 255, .75);
  --glass-specular: rgba(255, 255, 255, .95);
  --hairline: rgba(0, 0, 0, .09);
  --surface-soft: rgba(255, 255, 255, .62);
  --surface-sunken: rgba(0, 0, 0, .045);
  --seg-bg: rgba(0, 0, 0, .06);
  --nav-bg: rgba(250, 248, 244, .72);
  --field-bg: rgba(255, 255, 255, .9);
  --heat-0: rgba(0, 0, 0, .06);
  --heat-1: #e9b949;

  --orb-gold: #f2c46d;
  --orb-sky: #a9cff5;
  --orb-mint: #a8e2c8;
  --orb-opacity: .5;

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --font-mono: "SF Mono", ui-monospace, Menlo, "Cascadia Code", Consolas, monospace;

  --radius-sm: 10px;
  --radius-md: 15px;
  --radius-card: 22px;
  --radius-pill: 999px;

  --shadow-glass: 0 8px 32px rgba(0, 0, 0, .07), inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 -1px 0 rgba(255, 255, 255, .3);
  --shadow-float: 0 14px 44px rgba(0, 0, 0, .14), inset 0 1px 0 rgba(255, 255, 255, .9);
  --blur-glass: blur(24px) saturate(180%);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --tabbar-h: 64px;

  color-scheme: light;
}

:root[data-theme="dark"] {
  --canvas: #0c0b0a;
  --canvas-raised: #1c1c1e;
  --ink: #f5f5f7;
  --ink-secondary: #aeaba6;
  --accent: #e8bd5f;
  --accent-tint: #3a2e15;
  --link: #4aa8ff;
  --on-ink: #0b0b0d;
  --success: #6fd3a5;
  --success-tint: #133628;
  --danger: #ff8a80;
  --danger-tint: #3d1714;

  --glass-fill: rgba(36, 35, 33, .55);
  --glass-strong: rgba(30, 29, 28, .9);
  --glass-stroke: rgba(255, 255, 255, .14);
  --glass-specular: rgba(255, 255, 255, .3);
  --hairline: rgba(255, 255, 255, .11);
  --surface-soft: rgba(255, 255, 255, .06);
  --surface-sunken: rgba(255, 255, 255, .05);
  --seg-bg: rgba(255, 255, 255, .1);
  --nav-bg: rgba(20, 19, 18, .76);
  --field-bg: rgba(255, 255, 255, .06);
  --heat-0: rgba(255, 255, 255, .08);
  --heat-1: #c9972f;

  --orb-gold: #6e5119;
  --orb-sky: #1d466f;
  --orb-mint: #1b5c49;
  --orb-opacity: .36;

  --shadow-glass: 0 8px 32px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 -1px 0 rgba(255, 255, 255, .04);
  --shadow-float: 0 14px 44px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .18);

  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: var(--canvas); color: var(--ink);
  font-family: var(--font-sans); font-size: 17px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--on-ink); padding: 10px 16px; border-radius: var(--radius-pill); font-size: 14px;
}
.skip-link:focus { top: 12px; }

/* ---------- Backdrop ---------- */
.orbs { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: var(--orb-opacity); animation: drift 24s ease-in-out infinite alternate; }
.orb--gold { width: 420px; height: 420px; left: -140px; top: -120px; background: var(--orb-gold); }
.orb--sky { width: 360px; height: 360px; right: -160px; top: 30%; background: var(--orb-sky); animation-delay: -8s; }
.orb--mint { width: 320px; height: 320px; left: 10%; bottom: -160px; background: var(--orb-mint); animation-delay: -14s; }
@keyframes drift { to { transform: translate3d(6%, -4%, 0) scale(1.08); } }

/* ---------- Glass ---------- */
.glass {
  position: relative; isolation: isolate;
  background: var(--glass-fill);
  -webkit-backdrop-filter: var(--blur-glass); backdrop-filter: var(--blur-glass);
  border-radius: var(--radius-card); box-shadow: var(--shadow-glass);
}
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: -1;
  background: linear-gradient(140deg, var(--glass-specular), rgba(255, 255, 255, .12) 38%, rgba(255, 255, 255, 0) 60%, var(--glass-stroke));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}

/* ---------- Layout ---------- */
.app { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--nav-bg); box-shadow: 0 1px 0 var(--hairline);
  -webkit-backdrop-filter: var(--blur-glass); backdrop-filter: var(--blur-glass);
  padding-top: env(safe-area-inset-top);
}
.topbar__row { max-width: 1080px; margin: 0 auto; padding: 8px var(--gutter); display: flex; align-items: center; gap: 12px; min-height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 650; font-size: 16px; letter-spacing: -.01em; margin-right: auto; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.topnav { display: none; gap: 4px; }
.topnav a { color: var(--ink-secondary); font-size: 14px; font-weight: 500; padding: 8px 12px; border-radius: var(--radius-pill); }
.topnav a:hover { text-decoration: none; color: var(--ink); background: var(--surface-sunken); }
.topnav a[aria-current="page"] { color: var(--ink); background: var(--seg-bg); font-weight: 600; }
.topbar__tools { display: flex; align-items: center; gap: 6px; }

.main { flex: 1; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 20px var(--gutter) calc(var(--tabbar-h) + 40px + env(safe-area-inset-bottom)); }
.main:focus { outline: none; }

.tabbar {
  position: fixed; z-index: 45; left: 50%; transform: translateX(-50%);
  bottom: calc(10px + env(safe-area-inset-bottom));
  width: min(560px, calc(100% - 16px));
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  padding: 6px; border-radius: 26px;
  background: var(--nav-bg); box-shadow: var(--shadow-float);
  -webkit-backdrop-filter: var(--blur-glass); backdrop-filter: var(--blur-glass);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 52px; border-radius: 20px; color: var(--ink-secondary);
  font-size: 10.5px; font-weight: 600; letter-spacing: .01em;
}
.tabbar a:hover { text-decoration: none; color: var(--ink); }
.tabbar a[aria-current="page"] { color: var(--ink); background: var(--seg-bg); }
.tabbar a[aria-current="page"] svg { color: var(--accent); }
.tabbar svg { width: 22px; height: 22px; }

@media (min-width: 960px) {
  .topnav { display: flex; }
  .tabbar { display: none; }
  .main { padding-bottom: 64px; padding-top: 32px; }
}

.footer { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter) calc(var(--tabbar-h) + 32px); font-size: 13px; color: var(--ink-secondary); text-align: center; }
@media (min-width: 960px) { .footer { padding-bottom: 32px; } }
.footer a { color: var(--ink-secondary); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Typography ---------- */
.eyebrow { font: 600 12px/1.3 var(--font-mono); color: var(--accent); letter-spacing: .02em; }
.page-title { font-size: clamp(28px, 6vw, 36px); line-height: 1.1; font-weight: 650; letter-spacing: -.015em; }
.page-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.page-head p { color: var(--ink-secondary); }
.section-title { font-size: 20px; font-weight: 650; letter-spacing: -.01em; margin: 28px 0 12px; }
.muted { color: var(--ink-secondary); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }
.mono { font-family: var(--font-mono); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack--lg { gap: 18px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }

/* ---------- Cards ---------- */
.card { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.card--hero { padding: 24px; gap: 18px; }
.card__title { font-size: 19px; line-height: 1.25; font-weight: 650; }
.card__meta { font-size: 14px; color: var(--ink-secondary); }
.card + .card { margin-top: 14px; }
.cards { display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 700px) { .cards--2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.divider { height: 1px; background: var(--hairline); border: 0; margin: 4px 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border: 0; border-radius: var(--radius-pill);
  font: 600 15px/1 var(--font-sans); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .15s ease, background-color .2s ease;
  background: var(--seg-bg); color: var(--ink);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--primary { background: var(--ink); color: var(--on-ink); }
.btn--gold { background: var(--brand-gold); color: var(--brand-ink); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--hairline); }
.btn--danger { background: var(--danger-tint); color: var(--danger); }
.btn--done { background: var(--success-tint); color: var(--success); }
.btn--sm { min-height: 36px; padding: 0 14px; font-size: 13.5px; }
.btn--lg { min-height: 52px; padding: 0 26px; font-size: 16px; }
.btn--block { width: 100%; }
.btn--icon { min-height: 40px; min-width: 40px; padding: 0 10px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn.is-busy { cursor: progress; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--link); cursor: pointer; font: inherit; }
.link-btn:hover { text-decoration: underline; }

/* ---------- Chips & badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 2px 10px;
  border-radius: var(--radius-pill); background: var(--accent-tint); color: var(--ink);
  font: 600 12px/1.2 var(--font-sans);
}
.chip--soft { background: var(--surface-sunken); color: var(--ink-secondary); }
.chip--success { background: var(--success-tint); color: var(--success); }
.chip--danger { background: var(--danger-tint); color: var(--danger); }
.chip svg { width: 14px; height: 14px; }

.sync-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 600; color: var(--ink-secondary); background: var(--surface-sunken); }
.sync-pill svg { width: 16px; height: 16px; }
.sync-pill[data-state="ok"] { color: var(--success); }
.sync-pill[data-state="error"] { color: var(--danger); }
.sync-pill:hover { text-decoration: none; }
@media (max-width: 430px) { .sync-pill .sync-pill__text { display: none; } .sync-pill { padding: 0 9px; } }
.brand span { white-space: nowrap; }
@media (max-width: 340px) { .brand span { font-size: 14px; } }

/* ---------- Segmented control ---------- */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--radius-pill); background: var(--seg-bg); max-width: 100%; overflow-x: auto; }
.seg button, .seg a {
  min-height: 34px; padding: 0 14px; border: 0; border-radius: var(--radius-pill);
  background: none; color: var(--ink-secondary); font: 600 13.5px/1 var(--font-sans); cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center;
}
.seg a:hover { text-decoration: none; }
.seg [aria-pressed="true"], .seg [aria-current="page"] { background: var(--canvas-raised); color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }

/* ---------- Progress ---------- */
.progress { height: 8px; border-radius: var(--radius-pill); background: var(--surface-sunken); overflow: hidden; }
.progress__fill { height: 100%; width: var(--p, 0%); border-radius: inherit; background: linear-gradient(90deg, var(--brand-gold), var(--orb-gold)); transition: width .6s var(--ease); }
.progress--lg { height: 12px; }
.progress-label { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-secondary); margin-top: 6px; }

/* ---------- Today ---------- */
.greeting { font-size: 15px; color: var(--ink-secondary); }
.stats-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat { padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; border-radius: var(--radius-md); }
.stat__value { font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; display: flex; align-items: center; gap: 6px; }
.stat__value svg { width: 20px; height: 20px; color: var(--accent); }
.stat__label { font-size: 12.5px; color: var(--ink-secondary); line-height: 1.3; }

.refs { display: flex; flex-direction: column; gap: 10px; }
.ref {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; border-radius: var(--radius-md); background: var(--surface-soft); box-shadow: inset 0 1px 0 var(--glass-stroke);
}
.ref__name { font-weight: 650; font-size: 17px; }
.ref__links { display: flex; flex-wrap: wrap; gap: 6px; }
.ref-link {
  display: inline-flex; align-items: center; gap: 4px; min-height: 36px; min-width: 44px; padding: 0 12px; justify-content: center;
  border-radius: var(--radius-pill); background: var(--canvas-raised); color: var(--ink); font-size: 14px; font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
}
.ref-link:hover { text-decoration: none; background: var(--accent-tint); }
.ref-link svg { width: 14px; height: 14px; color: var(--accent); }

.done-banner { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius-md); background: var(--success-tint); color: var(--success); font-weight: 600; font-size: 15px; }
.done-banner svg { width: 20px; height: 20px; flex: none; }

/* ---------- Plans ---------- */
.plan-card { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.plan-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.plan-card__name { font-size: 18px; font-weight: 650; line-height: 1.25; }
.plan-card__desc { font-size: 15px; color: var(--ink-secondary); }
.plan-card__meta { display: flex; flex-wrap: wrap; gap: 6px; }
.status-list { display: flex; flex-direction: column; gap: 12px; }

.day-list { display: flex; flex-direction: column; gap: 8px; }
.day {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-md);
  background: var(--surface-soft); box-shadow: inset 0 1px 0 var(--glass-stroke);
}
.day.is-next { box-shadow: inset 0 0 0 2px var(--brand-gold); }
.day__num { flex: none; width: 44px; font: 600 12px/1.2 var(--font-mono); color: var(--ink-secondary); text-align: center; }
.day__refs { flex: 1; min-width: 0; font-size: 15px; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.day__refs a { color: var(--ink); font-weight: 500; }
.day.is-done .day__refs a { color: var(--ink-secondary); }
.check {
  flex: none; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--hairline); background: var(--canvas-raised);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: transparent; padding: 0;
  transition: background-color .2s ease, border-color .2s ease, transform .15s ease;
}
.check:active { transform: scale(.92); }
.check svg { width: 20px; height: 20px; }
.check[aria-pressed="true"] { background: var(--success); border-color: var(--success); color: var(--on-ink); }
:root[data-theme="dark"] .check[aria-pressed="true"] { color: #0b0b0d; }

/* ---------- Journey ---------- */
.level-card { padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.level-card__name { font-size: 26px; font-weight: 700; letter-spacing: -.015em; }
.heatmap { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 1fr); gap: 4px; overflow-x: auto; padding-bottom: 4px; }
.heatmap span { width: 14px; height: 14px; border-radius: 4px; background: var(--heat-0); }
.heatmap span.is-on { background: var(--heat-1); }
.heatmap span.is-today { box-shadow: 0 0 0 2px var(--ink-secondary); }
.heatmap span.is-future { visibility: hidden; }
.achievements { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 640px) { .achievements { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.badge { padding: 14px; border-radius: var(--radius-md); display: flex; flex-direction: column; gap: 6px; background: var(--surface-soft); box-shadow: inset 0 1px 0 var(--glass-stroke); }
.badge__icon { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--accent-tint); color: var(--accent); }
.badge__icon svg { width: 22px; height: 22px; }
.badge__name { font-weight: 650; font-size: 15px; line-height: 1.25; }
.badge__desc { font-size: 13px; color: var(--ink-secondary); line-height: 1.35; }
.badge.is-locked .badge__icon { background: var(--surface-sunken); color: var(--ink-secondary); }
.badge.is-locked .badge__name { color: var(--ink-secondary); }

/* ---------- Groups ---------- */
.member { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--hairline); }
.member:last-child { border-bottom: 0; }
.avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--accent-tint); color: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.member__name { font-weight: 600; }
.member__meta { font-size: 13px; color: var(--ink-secondary); }
.rank { flex: none; width: 28px; font: 700 14px/1 var(--font-mono); color: var(--accent); text-align: center; }
.code-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: var(--radius-md); background: var(--surface-sunken); }
.code-box__code { font: 700 22px/1 var(--font-mono); letter-spacing: .12em; }

/* ---------- Recovery key ---------- */
.recovery-key {
  font: 700 clamp(17px, 5vw, 22px)/1.5 var(--font-mono); letter-spacing: .06em; text-align: center;
  padding: 16px; border-radius: var(--radius-md); background: var(--surface-sunken);
  overflow-wrap: anywhere; user-select: all; -webkit-user-select: all;
}

/* ---------- Journal ---------- */
.entry { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.entry__body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16px; }
.entry__meta { font-size: 13px; color: var(--ink-secondary); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field__label { font-size: 14px; font-weight: 600; }
.field__hint { font-size: 13px; color: var(--ink-secondary); }
.field__error { font-size: 13px; color: var(--danger); font-weight: 600; }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--hairline); background: var(--field-bg); color: var(--ink); font-size: 16px;
}
.textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
.textarea--mono { font-family: var(--font-mono); font-size: 14px; }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); }
.switch { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.switch input { appearance: none; -webkit-appearance: none; flex: none; width: 48px; height: 28px; margin: 0; border-radius: var(--radius-pill); background: var(--seg-bg); position: relative; cursor: pointer; transition: background-color .2s ease; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--canvas-raised); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s var(--ease); }
.switch input:checked { background: var(--success); }
.switch input:checked::after { transform: translateX(20px); }
.switch input:disabled { opacity: .5; cursor: not-allowed; }
.switch__text { display: flex; flex-direction: column; gap: 2px; font-size: 15px; }

/* ---------- Notices, empty, loading ---------- */
.notice { padding: 12px 14px; border-radius: var(--radius-md); background: var(--accent-tint); font-size: 14.5px; display: flex; gap: 10px; align-items: flex-start; }
.notice svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--accent); }
.notice--error { background: var(--danger-tint); color: var(--danger); }
.notice--error svg { color: var(--danger); }
.notice--success { background: var(--success-tint); color: var(--success); }
.notice--success svg { color: var(--success); }
.empty { text-align: center; padding: 32px 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty__icon { width: 56px; height: 56px; border-radius: 18px; display: flex; align-items: center; justify-content: center; background: var(--accent-tint); color: var(--accent); }
.empty__icon svg { width: 28px; height: 28px; }
.empty p { color: var(--ink-secondary); max-width: 420px; }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 40px 0; color: var(--ink-secondary); }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--hairline); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Dialog ---------- */
dialog.dialog {
  border: 0; padding: 0; width: min(440px, calc(100% - 32px)); border-radius: var(--radius-card);
  background: var(--glass-strong); color: var(--ink); box-shadow: var(--shadow-float);
  -webkit-backdrop-filter: var(--blur-glass); backdrop-filter: var(--blur-glass);
}
dialog.dialog::backdrop { background: rgba(0, 0, 0, .35); }
.dialog__body { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.dialog__title { font-size: 19px; font-weight: 650; }
.dialog__actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

/* ---------- Toast & celebration ---------- */
.toasts { position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + 26px + env(safe-area-inset-bottom)); width: min(460px, calc(100% - 24px)); display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
@media (min-width: 960px) { .toasts { bottom: 24px; } }
.toast {
  pointer-events: auto; padding: 12px 16px; border-radius: var(--radius-md); background: var(--ink); color: var(--on-ink);
  box-shadow: var(--shadow-float); font-size: 14.5px; font-weight: 500; display: flex; gap: 10px; align-items: center;
  animation: toast-in .35s var(--ease);
}
.toast svg { width: 18px; height: 18px; flex: none; color: var(--brand-gold); }
.toast--error { background: var(--danger); color: #fff; }
.toast--error svg { color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.celebrate { position: fixed; inset: 0; pointer-events: none; z-index: 55; overflow: hidden; }
.celebrate i { position: absolute; top: 45%; left: 50%; width: 8px; height: 8px; border-radius: 2px; background: var(--brand-gold); opacity: 0; animation: burst 1.1s var(--ease) forwards; }
.celebrate i:nth-child(3n) { background: var(--orb-mint); border-radius: 50%; }
.celebrate i:nth-child(3n + 1) { background: var(--orb-sky); }
@keyframes burst {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(.6); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--r)) scale(1); }
}
.pop { animation: pop .5s var(--ease); }
@keyframes pop { 40% { transform: scale(1.06); } }

/* ---------- Prose (privacidade) ---------- */
.prose { display: flex; flex-direction: column; gap: 12px; font-size: 16px; }
.prose h2 { font-size: 19px; margin-top: 12px; }
.prose ul { list-style: disc; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .orb { animation: none; }
  .celebrate { display: none; }
}
