:root {
  --azul: #1D5674; --azul-esc: #143F57; --azul-suave: #DBE4E9; --azul-claro-txt: #C8D8E0;
  --coral: #B94E35; --coral-txt: #A8442C; --coral-claro: #F4A48E; --coral-fundo: #F6E0D9;
  --areia: #F6F1E9; --areia-2: #EAE1D3; --linha: #DED4C4; --linha-2: #CDBFAA;
  --tinta: #1D2A2F; --tinta-2: #2F3C42; --cinza: #46545A; --cinza-2: #5E6A6F;
  --serif: 'Newsreader', Georgia, serif; --sans: 'Instrument Sans', system-ui, -apple-system, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--areia); }
body { font-family: var(--sans); color: var(--tinta); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button { font-family: inherit; color: inherit; }
a { color: var(--azul); }
#app { min-height: 100%; max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; }
.screen { flex: 1; display: flex; flex-direction: column; gap: 18px; padding: calc(var(--safe-t) + 28px) 24px 24px; }
.screen.has-nav { padding-bottom: calc(96px + var(--safe-b)); }
.screen.dark { background: var(--azul); color: #F6F1E9; min-height: 100vh; }
.screen.dark a { color: #F6F1E9; }
.top { display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.iconbtn { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: none; background: transparent; cursor: pointer; color: inherit; text-decoration: none; }
.iconbtn.left { margin-left: -12px; } .iconbtn.right { margin-right: -12px; }
.kicker { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--cinza-2); }
.dark .kicker { color: var(--azul-claro-txt); }
h1, .h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 34px; line-height: 1.1; letter-spacing: -0.01em; }
h2, .h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 24px; line-height: 1.2; }
.sub { margin: 0; font-size: 15px; line-height: 1.55; color: var(--cinza); }
.dark .sub { color: var(--azul-claro-txt); }
.lead-it { margin: 0; font-family: var(--serif); font-style: italic; font-size: 20px; line-height: 1.4; color: var(--azul); }
.sec { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--azul); }
.small { font-size: 12px; color: var(--cinza-2); line-height: 1.5; }
.dark .small { color: var(--azul-claro-txt); }
.note { background: var(--areia-2); border-radius: 4px 22px 22px 22px; padding: 16px 18px; }
.note .lbl { font-size: 12px; color: var(--cinza-2); font-weight: 500; }
.note p { margin: 6px 0 0; font-family: var(--serif); font-size: 18px; line-height: 1.45; }
.btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 56px; padding: 0 22px; border-radius: 28px; border: none; cursor: pointer; font-size: 16px; font-weight: 600; text-decoration: none; width: 100%; }
.btn.center { justify-content: center; }
.btn-coral { background: var(--coral); color: #fff !important; }
.btn-dark { background: var(--tinta); color: var(--areia) !important; }
.btn-azul { background: var(--azul); color: var(--areia) !important; }
.btn-out { background: transparent; color: var(--tinta) !important; border: 1px solid var(--linha-2); }
.dark .btn-out { color: #F6F1E9 !important; border-color: #7897A8; }
.btn-light { background: #F6F1E9; color: var(--azul) !important; }
.btn-text { background: transparent; border: none; color: var(--cinza); font-size: 14px; font-weight: 500; min-height: 40px; cursor: pointer; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { min-height: 40px; padding: 8px 16px; border-radius: 20px; font-size: 14px; font-weight: 500; cursor: pointer; background: transparent; color: var(--tinta); border: 1px solid var(--linha-2); text-align: left; }
.pill[aria-pressed="true"] { background: var(--azul); color: #fff; border-color: var(--azul); }
.pill.serif { font-family: var(--serif); font-style: italic; font-size: 17px; }
.seg { display: flex; padding: 4px; border-radius: 22px; background: var(--areia-2); }
.seg button { flex: 1; min-height: 36px; border-radius: 18px; border: none; background: transparent; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--cinza); }
.seg button[aria-pressed="true"] { background: #fff; color: var(--tinta); box-shadow: 0 1px 2px rgba(29,42,47,.12); }
.dark .seg { background: #17465F; }
.dark .seg button { color: var(--azul-claro-txt); }
.dark .seg button[aria-pressed="true"] { background: #F6F1E9; color: var(--azul); }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { border-top: 1px solid var(--linha); }
.list > li:last-child { border-bottom: 1px solid var(--linha); }
.row-link { display: flex; align-items: center; gap: 12px; padding: 12px 0; text-decoration: none; color: var(--tinta); }
.row-link .t { font-family: var(--serif); font-size: 20px; line-height: 1.2; display: block; }
.row-link .d { font-size: 13px; color: var(--cinza-2); margin-top: 2px; line-height: 1.4; display: block; }
.row-link .r { font-size: 12px; color: var(--coral-txt); font-weight: 600; flex-shrink: 0; }
.chev { flex-shrink: 0; color: #A99B85; }
.step { display: flex; gap: 16px; padding: 12px 0; border-top: 1px solid var(--linha); }
.step .n { width: 32px; height: 32px; border-radius: 16px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--azul); color: var(--areia); font-family: var(--serif); font-size: 17px; }
.step .tt { font-family: var(--serif); font-size: 22px; }
.step .dd { font-size: 15px; color: var(--cinza); line-height: 1.5; margin-top: 2px; }
.toggle { position: relative; width: 48px; height: 28px; border-radius: 14px; border: none; padding: 0; cursor: pointer; background: var(--linha-2); flex-shrink: 0; }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 11px; background: var(--areia); transition: left .2s; }
.toggle[aria-pressed="true"] { background: var(--azul); }
.toggle[aria-pressed="true"]::after { left: 23px; }
.timefield { font-family: var(--serif); font-size: 28px; color: var(--tinta); background: transparent; border: none; border-bottom: 1px solid var(--linha-2); padding: 2px 0; width: 100%; }
.textfield { font-family: var(--serif); font-size: 19px; color: var(--tinta); background: transparent; border: none; border-bottom: 1px solid var(--linha-2); padding: 8px 0; width: 100%; outline: none; resize: none; }
.textfield:focus, .timefield:focus { outline: none; border-bottom: 2px solid var(--coral); }
.round { width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--linha-2); background: transparent; font-size: 20px; cursor: pointer; }
nav.tabs { position: fixed; left: 0; right: 0; bottom: 0; max-width: 520px; margin: 0 auto; height: calc(74px + var(--safe-b)); padding-bottom: var(--safe-b); display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--linha); background: var(--areia); z-index: 10; }
nav.tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-decoration: none; color: var(--cinza-2); font-size: 12px; font-weight: 500; }
nav.tabs a[aria-current="page"] { color: var(--tinta); font-weight: 600; }
nav.tabs a[aria-current="page"] svg { stroke: var(--coral); }
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(90px + var(--safe-b)); max-width: 488px; margin: 0 auto; background: var(--tinta); color: var(--areia); border-radius: 18px; padding: 14px 16px; display: flex; gap: 12px; align-items: center; z-index: 20; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.toast a { color: var(--coral-claro); font-weight: 600; white-space: nowrap; }
.sheet-bg { position: fixed; inset: 0; background: rgba(29,42,47,.35); z-index: 30; display: flex; flex-direction: column; justify-content: flex-end; }
.sheet { background: var(--areia); border-radius: 26px 26px 0 0; padding: 14px 24px calc(24px + var(--safe-b)); max-width: 520px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; max-height: 88vh; overflow-y: auto; }
.grab { align-self: center; width: 40px; height: 4px; border-radius: 2px; background: var(--linha-2); }
.blob { animation: blob 11s ease-in-out infinite; }
@keyframes blob { 0%,100% { transform: scale(.82); opacity: .35 } 45% { transform: scale(1); opacity: .6 } }
@media (prefers-reduced-motion: reduce) { .blob { animation: none; } }
.hidden { display: none !important; }
.stat { background: #fff; border: 1px solid #E5DCCD; border-radius: 16px; padding: 12px 12px 10px; }
.stat .v { font-family: var(--serif); font-size: 26px; line-height: 1.1; }
.stat .l { font-size: 12px; color: var(--cinza); margin-top: 4px; }
.stat .s { font-size: 11px; color: var(--cinza-2); margin-top: 2px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
