:root {
  --ink: #0e2238;
  --ink-2: #1b3550;
  --lagoon: #0b6f96;
  --lagoon-deep: #08536f;
  --lagoon-soft: #e1f0f6;
  --sun: #ffb73d;
  --sun-soft: #fff1d3;
  --mint: #17835f;
  --mint-soft: #dcf3ea;
  --rose: #c0364e;
  --rose-soft: #fbe3e7;
  --bg: #f2f6f9;
  --paper: #ffffff;
  --line: #dce5ec;
  --line-strong: #b9c9d6;
  --muted: #566b7d;
  --radius: 14px;
  --radius-sm: 10px;
  --gutter: 16px;
  --shadow: 0 1px 2px rgba(14, 34, 56, .06), 0 6px 20px rgba(14, 34, 56, .06);
  --font: "Avenir Next", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --nav-h: 64px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 .5rem; }
main h2 { margin-top: 1.7rem; }
main h2:first-child, .page-head h2, .panel > h2, .form-card h2, .empty h2 { margin-top: 0; }
h1 { font-size: 1.8rem; font-weight: 800; }
h2 { font-size: 1.2rem; font-weight: 750; }
h3 { font-size: 1.02rem; font-weight: 700; }
p { margin: 0 0 .75rem; }
a { color: var(--lagoon); }
small, .muted { color: var(--muted); }
.icon { flex: none; vertical-align: middle; }

:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 6px; box-shadow: 0 0 0 5px var(--ink); }
/* títulos recebem foco só por programa (acessibilidade na troca de tela): sem contorno */
h1[tabindex="-1"]:focus, main:focus { outline: none; box-shadow: none; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .5rem 1rem; z-index: 99; }
.skip:focus { left: 8px; top: 8px; }

/* ---------- topo ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(10px + env(safe-area-inset-top)) calc(var(--gutter) + env(safe-area-inset-right)) 10px calc(var(--gutter) + env(safe-area-inset-left)); background: var(--ink); color: #fff; }
.topbar a { color: #fff; text-decoration: none; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; }
.logo-pin { fill: var(--sun); }
.logo-plane { fill: var(--ink); }
.topbar .who { display: flex; align-items: center; gap: 10px; font-size: .92rem; }
.topbar .who .name { max-width: 28vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .btn-quiet { color: #fff; min-height: 40px; }

main { max-width: 960px; margin: 0 auto; padding: 18px var(--gutter) 48px; outline: none; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.page-head h1, .page-head h2 { margin: 0; }
.crumb { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 8px; font-size: .9rem; text-decoration: none; }

/* ---------- botões e formulários ---------- */
.btn, .btn-primary, .btn-danger, .btn-quiet, .btn-sun {
  font: inherit; font-weight: 650; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink);
}
.btn:hover { border-color: var(--lagoon); }
.btn-primary { background: var(--lagoon); border-color: var(--lagoon); color: #fff; }
.btn-primary:hover { background: var(--lagoon-deep); }
.btn-sun { background: var(--sun); border-color: var(--sun); color: var(--ink); }
.btn-danger { background: var(--rose); border-color: var(--rose); color: #fff; }
.btn-quiet { border-color: transparent; background: transparent; color: var(--lagoon); padding: 0 10px; }
.btn:disabled, .btn-primary:disabled, .btn-danger:disabled { opacity: .6; cursor: progress; }
.btn-sm { min-height: 38px; padding: 0 12px; font-size: .9rem; }
.btn-icon { width: 40px; min-height: 40px; padding: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.field label, legend { font-weight: 650; font-size: .95rem; }
input, select, textarea {
  font: inherit; color: inherit; min-height: 46px; padding: 8px 12px; background: var(--paper);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--lagoon); }
textarea { min-height: 88px; resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: 22px; height: 22px; min-height: 0; accent-color: var(--lagoon); flex: none; }
.hint { font-size: .85rem; color: var(--muted); }
fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px 12px; margin: 0 0 14px; background: var(--paper); min-width: 0; }
.check { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-height: 40px; font-weight: 500; }
.check.disabled { color: var(--muted); }
.grid2 { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
.form-error { color: var(--rose); font-weight: 650; margin: 0 0 10px; }
.form-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }

/* interruptor (participa do rateio) */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; min-height: 44px; }
.switch input { position: absolute; opacity: 0; width: 44px; height: 26px; margin: 0; }
.switch .track { width: 44px; height: 26px; border-radius: 99px; background: var(--line-strong); position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.switch input:checked + .track { background: var(--mint); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 3px solid var(--sun); outline-offset: 2px; }
.switch input:disabled + .track { opacity: .5; }

/* ---------- avatares e etiquetas ---------- */
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; color: #fff; font-weight: 800; font-size: .85rem; letter-spacing: .02em; flex: none; }
.avatar.sm { width: 28px; height: 28px; font-size: .68rem; border: 2px solid var(--stack-bg, #fff); }
.avatar.lg { width: 52px; height: 52px; font-size: 1.05rem; }
.av-0 { background: #0b6f96; } .av-1 { background: #4c55c4; } .av-2 { background: #a93a8a; } .av-3 { background: #b85c0b; }
.av-4 { background: #17835f; } .av-5 { background: #7143d1; } .av-6 { background: #c0364e; } .av-7 { background: #496a80; }
.av-more { background: var(--ink-2); }
.avatar-stack { display: inline-flex; }
.avatar-stack .avatar + .avatar { margin-left: -8px; }
.tag { display: inline-block; white-space: nowrap; font-size: .75rem; font-weight: 650; padding: 1px 8px; border-radius: 99px; background: var(--lagoon-soft); color: var(--lagoon-deep); margin-left: 6px; vertical-align: 1px; }
.tag-muted { background: #e9eef2; color: var(--muted); }
.chip { display: inline-block; font-size: .8rem; padding: 1px 8px; border-radius: 99px; background: var(--lagoon-soft); color: var(--ink); }

/* categorias: --c é a cor da categoria */
.cat-food { --c: #e07b22; } .cat-stay { --c: #4c55c4; } .cat-move { --c: #0b6f96; }
.cat-fun { --c: #a93a8a; } .cat-shop { --c: #17835f; } .cat-other { --c: #6b7f8e; }
.chip-ico { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 12px; flex: none; color: var(--c); background: #eef3f6; background: color-mix(in srgb, var(--c) 14%, white); }
.seg { stroke: var(--c); }

/* ---------- listas ---------- */
.rows { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.rows > li { padding: 12px 14px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: space-between; }
.rows > li:first-child { border-top: 0; }
.rows .lead { display: flex; align-items: center; gap: 12px; flex: 1 1 260px; min-width: 0; }
.rows .main { flex: 1 1 200px; min-width: 0; }
.rows .title { font-weight: 700; overflow-wrap: anywhere; }
.rows a.title { text-decoration: none; color: var(--ink); }
.rows .meta { font-size: .88rem; color: var(--muted); overflow-wrap: anywhere; }
.rows .amount { font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.rows .row-actions { display: flex; gap: 6px; }
.day-head { display: flex; justify-content: space-between; align-items: baseline; margin: 22px 2px 8px; }
.day-head h3 { margin: 0; font-size: .98rem; }
.day-head h3::first-letter { text-transform: uppercase; }
.rows ~ .panel { margin-top: 22px; }
.day-head span { font-size: .9rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.pos { color: var(--mint); } .neg { color: var(--rose); }
.trip-badge { width: 48px; height: 48px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; flex: none; }

/* ---------- navegação da viagem ---------- */
.hero { --stack-bg: var(--ink); background: var(--ink); color: #fff; margin: 0 calc(var(--gutter) * -1) 0; padding: 18px var(--gutter) 20px; position: relative; overflow: hidden; }
.hero > :not(.hero-bg):not(.hero-route):not(.credit-hero) { position: relative; z-index: 2; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; display: block; }
.hero-photo::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(14, 34, 56, .5) 0%, rgba(14, 34, 56, .9) 100%); }
.hero-photo h1, .hero-photo .hero-cities, .hero-photo .hero-meta { text-shadow: 0 1px 10px rgba(0, 0, 0, .55); }
.hero-cities { display: flex; align-items: center; gap: 4px; margin: -4px 0 10px; color: #dbe9f2; font-weight: 600; }
.chip-sun { background: var(--sun); color: var(--ink); font-weight: 750; }
.chip-during { background: var(--mint); color: #fff; }
.chip-after { background: #cfd9e1; color: var(--ink); }
.hero a.crumb { color: #b8d4e6; }
.hero h1 { color: #fff; overflow-wrap: anywhere; margin-bottom: 10px; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.hero-meta .muted { color: #b8d4e6; }
.hero .code-box { background: rgba(255, 255, 255, .08); border: 1px dashed rgba(255, 255, 255, .4); color: #fff; }
.hero .code-box .muted { color: #b8d4e6; }
.hero .btn-quiet { color: var(--sun); }
.hero .btn { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .28); color: #fff; }
.hero-route { position: absolute; right: -10px; bottom: -6px; width: 260px; opacity: .22; pointer-events: none; }
.hero-route .route-line { fill: none; stroke: #fff; stroke-width: 2; stroke-dasharray: 3 7; stroke-linecap: round; }
.hero-route .route-dot { fill: var(--sun); }
.code-box { display: inline-flex; align-items: center; gap: 10px; background: var(--paper); border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); padding: 2px 4px 2px 12px; }
.code-box code { font-size: 1.1rem; font-weight: 800; letter-spacing: .14em; }

.tabs { display: none; }
.bottom-nav { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5, 1fr); background: var(--paper); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.bottom-nav a, .bottom-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font: inherit; font-size: .72rem; font-weight: 650; color: var(--muted); text-decoration: none; background: none; border: 0; cursor: pointer; padding: 6px 2px; }
.bottom-nav [aria-current="page"] { color: var(--lagoon); }
.bottom-nav [aria-current="page"] .icon { stroke-width: 2.3; }
main.has-nav { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 28px); }

/* ---------- painel ---------- */
.kpis { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; margin: 18px 0; }
.kpi { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.kpi b { display: block; font-size: clamp(1.05rem, 4.8vw, 1.4rem); white-space: nowrap; font-variant-numeric: tabular-nums; }
.kpi span { font-size: .85rem; color: var(--muted); }
.kpi-total { grid-column: 1 / -1; background: var(--ink); border-color: var(--ink); color: #fff; padding: 16px 18px; }
.kpi-total b { font-size: 2.3rem; color: var(--sun); letter-spacing: -0.02em; }
.kpi-total span { color: #b8d4e6; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.panel > h2 { margin-bottom: 12px; }
.charts { display: grid; gap: 16px; grid-template-columns: 1fr; }
.charts .panel { margin-bottom: 0; }
.actions + .muted, .panel + .actions { margin-top: 14px; }
.note { background: var(--sun-soft); border-radius: var(--radius-sm); padding: 10px 14px; font-size: .92rem; }
.note-info { background: var(--lagoon-soft); }

.donut-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.donut { width: 180px; height: 180px; flex: none; }
.donut-track { stroke: #edf2f6; }
.donut-label { font-size: 13px; fill: var(--muted); }
.donut-value { font-size: 19px; font-weight: 800; fill: var(--ink); }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; flex: 1 1 220px; min-width: 0; }
.legend li { display: grid; grid-template-columns: 36px 1fr auto auto; gap: 10px; align-items: center; }
.legend-name { font-weight: 600; }
.legend-pct { color: var(--muted); font-size: .85rem; min-width: 2.4em; text-align: right; }
.legend-val { font-weight: 700; font-variant-numeric: tabular-nums; }

.scroll-x { overflow-x: auto; padding-bottom: 6px; }
.columns .axis { stroke: var(--line-strong); }
.columns .col { fill: var(--lagoon); }
.columns .col-val { font-size: 10px; fill: var(--ink); font-weight: 700; }
.columns .col-lbl { font-size: 10.5px; fill: var(--muted); }

.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.bars li { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; }
.bars-name { font-weight: 650; overflow-wrap: anywhere; }
.bar { width: 100%; height: 12px; display: block; margin-top: 2px; }
.bar-track { stroke: #edf2f6; }
.bar-pos { stroke: var(--mint); } .bar-neg { stroke: var(--rose); }
.bar-mid { stroke: var(--line-strong); stroke-width: 1; }
.bars-amt { font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; line-height: 1.2; }
.bars-amt small { display: block; font-weight: 500; }

/* ---------- cartão de embarque (acertos) ---------- */
.passes { display: grid; gap: 14px; margin: 12px 0 20px; }
.pass { position: relative; display: grid; grid-template-columns: 1fr auto; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.pass .route { padding: 14px 16px; display: grid; grid-template-columns: auto 1fr auto; gap: 4px 10px; align-items: center; min-width: 0; }
.pass .who { display: flex; flex-direction: column; align-items: center; gap: 4px; max-width: 120px; text-align: center; font-weight: 700; font-size: .9rem; overflow-wrap: anywhere; }
.pass .who small { font-weight: 500; }
.pass .flight { display: flex; align-items: center; gap: 6px; color: var(--lagoon); min-width: 36px; }
.pass .flight::before, .pass .flight::after { content: ""; flex: 1; border-top: 2px dotted var(--line-strong); }
.pass .via { grid-column: 1 / -1; font-size: .82rem; color: var(--muted); text-align: center; }
.pass .stub { padding: 14px 18px; border-left: 2px dashed var(--line-strong); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2px; font-weight: 800; font-size: 1.2rem; font-variant-numeric: tabular-nums; position: relative; background: var(--sun-soft); border-radius: 0 16px 16px 0; }
.pass .stub small { font-size: .72rem; font-weight: 600; color: var(--muted); }
.pass .stub::before, .pass .stub::after { content: ""; position: absolute; left: -11px; width: 20px; height: 20px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); }
.pass .stub::before { top: -11px; clip-path: inset(50% 0 0 0); }
.pass .stub::after { bottom: -11px; clip-path: inset(0 0 50% 0); }

/* ---------- ajustes: quem divide e quem paga ---------- */
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.people .title { font-weight: 700; }
.edit-row { display: grid; grid-template-columns: 1fr auto 56px; gap: 8px; align-items: center; margin-bottom: 8px; }
.edit-row .chip { text-align: center; }
.people > li { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 10px 14px; grid-template-columns: auto 1fr; align-items: center; }
.people .opts { grid-column: 1 / -1; display: grid; gap: 4px 16px; grid-template-columns: 1fr; align-items: start; }
.people .opts .field { margin: 0; }

/* ---------- vazio / erro / aviso ---------- */
.empty { background: var(--paper); border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 22px 18px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.empty .art { width: min(220px, 70%); height: auto; margin-bottom: 6px; }
.empty p { color: var(--muted); max-width: 44ch; }
.empty .actions { justify-content: center; }
.error-box { background: var(--rose-soft); border: 1px solid #f0b8c0; color: #7a1a2a; border-radius: var(--radius-sm); padding: 12px 14px; }
.loading { color: var(--muted); }

/* ---------- ilustrações ---------- */
.art-shadow { fill: #dbe5ec; }
.art-sea { fill: var(--lagoon); } .art-sun { fill: var(--sun); } .art-ink { fill: var(--ink); } .art-ink-soft { fill: var(--ink-2); opacity: .85; }
.art-paper, .art-paper-fill { fill: #fff; }
.art-outline { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.art-stroke { fill: none; stroke: var(--ink); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.art-stroke-thin { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.art-check { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.art-dash { fill: none; stroke: var(--lagoon); stroke-width: 3; stroke-dasharray: 2 8; stroke-linecap: round; }
.art-spark { fill: none; stroke: var(--sun); stroke-width: 3.5; stroke-linecap: round; }

/* ---------- login ---------- */
.auth { display: grid; gap: 22px; align-items: center; margin-top: 8px; }
.auth-hero .art { width: min(300px, 80%); height: auto; display: block; margin: 0 0 8px; }
.auth-hero h1 { font-size: 2rem; }
.auth-hero p { color: var(--muted); font-size: 1.05rem; max-width: 40ch; }
.points { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.points li { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.points .icon { color: var(--mint); }

/* ---------- diálogos e avisos ---------- */
.dlg { border: 0; border-radius: 18px; padding: 0; width: min(580px, calc(100vw - 24px)); max-height: calc(100vh - 24px); color: var(--ink); box-shadow: 0 20px 60px rgba(14, 34, 56, .35); }
.dlg::backdrop { background: rgba(14, 34, 56, .6); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 0; }
.dlg-head h2 { margin: 0; }
.dlg-body { padding: 14px 18px 20px; overflow-y: auto; max-height: calc(100vh - 100px); }
.more-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.more-list a { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius-sm); text-decoration: none; color: var(--ink); font-weight: 650; background: var(--bg); }
#toasts { position: fixed; z-index: 50; left: var(--gutter); right: var(--gutter); bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 14px); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; background: var(--ink); color: #fff; padding: 11px 16px; border-radius: var(--radius-sm); max-width: 520px; box-shadow: 0 6px 20px rgba(14, 34, 56, .3); }
.toast-error { background: var(--rose); }
.noscript { padding: var(--gutter); }

@media (max-width: 639px) {
  main.has-nav { padding-top: 0; }
  .dlg { margin: auto 0 0; width: 100vw; max-width: 100vw; border-radius: 20px 20px 0 0; }
  .pass { grid-template-columns: 1fr; }
  .pass .stub { border-left: 0; border-top: 2px dashed var(--line-strong); flex-direction: row; justify-content: space-between; border-radius: 0 0 16px 16px; }
  .pass .stub::before, .pass .stub::after { left: auto; top: -11px; bottom: auto; clip-path: none; }
  .pass .stub::before { left: -11px; clip-path: inset(0 50% 0 0); }
  .pass .stub::after { right: -11px; clip-path: inset(0 0 0 50%); }
  .legend li { grid-template-columns: 36px 1fr auto; }
  .legend-pct { display: none; }
}
@media (min-width: 640px) {
  :root { --gutter: 24px; }
  .grid2 { grid-template-columns: 1fr 1fr; }
  .kpis { grid-template-columns: 2fr 1fr 1fr; }
  .kpi-total { grid-column: auto; }
  .charts { grid-template-columns: 1fr 1fr; }
  .charts .wide { grid-column: 1 / -1; }
  .people .opts { grid-template-columns: 1fr 1fr; }
  .auth { grid-template-columns: 1.1fr 1fr; gap: 40px; }
  .bottom-nav { display: none; }
  main.has-nav { padding-bottom: 48px; }
  #toasts { bottom: 20px; }
  .hero { margin: 0; border-radius: var(--radius); padding: 22px 26px 24px; }
  .hero-route { width: 340px; }
  .tabs { display: flex; gap: 0; overflow-x: auto; margin: 14px 0 18px; padding: 0 2px; border-bottom: 2px solid var(--line); }
  .tabs a { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 11px 10px; font-size: .94rem; text-decoration: none; color: var(--muted); font-weight: 650; border-bottom: 3px solid transparent; margin-bottom: -2px; }
  .tabs a:hover { color: var(--ink); }
  .tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--lagoon); }
  .tabs a[aria-current="page"] .icon { color: var(--lagoon); }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- leitura sem conta ---------- */
.chip-ro { display: inline-flex; align-items: center; gap: 6px; background: var(--sun); color: var(--ink); font-weight: 700; margin-bottom: 8px; }
.hero + .kpis { margin-top: 18px; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; }
.checks .ok .icon { color: var(--mint); }
.checks .bad .icon { color: var(--rose); }
.checks .title { font-weight: 650; }
.note-ok { background: var(--mint-soft); }
.shares-box { flex: 1 1 100%; margin-top: 4px; }
.shares-box summary { cursor: pointer; font-size: .9rem; color: var(--lagoon); font-weight: 650; padding: 6px 0; }
.shares { list-style: none; margin: 4px 0 6px; padding: 0; display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.shares li { display: flex; align-items: center; gap: 8px; background: var(--bg); border-radius: var(--radius-sm); padding: 6px 10px; }
.shares li b { margin-left: auto; font-variant-numeric: tabular-nums; }
.meta.ok { color: var(--mint); font-weight: 600; }
.meta.bad { color: var(--rose); font-weight: 700; }
.foot { margin-top: 18px; font-size: .9rem; }
.row-actions.wrap { flex-wrap: wrap; justify-content: flex-end; }

.gap { margin-top: 1.7rem; }

/* ---------- aviso de instalação ---------- */
.install { display: flex; align-items: center; gap: 12px; background: var(--ink); color: #fff; border-radius: var(--radius); padding: 12px 14px; margin-bottom: 16px; }
.install > .icon { color: var(--sun); }
.install-text { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: .92rem; }
.install-text span { color: #b8d4e6; }
.install .btn-quiet { color: #fff; }
.icon.inline { vertical-align: -3px; }
@media (display-mode: standalone) { body { overscroll-behavior-y: none; } }

/* ---------- roteiro ---------- */
.credit { font-size: .74rem; color: var(--muted); margin: 4px 2px 10px; }
.credit a { color: inherit; }
.credit-hero { position: absolute; right: 12px; bottom: 6px; margin: 0; z-index: 2; color: #cfe0ec; max-width: 60%; text-align: right; }
.dest { margin: 0 0 30px; }
.dest > h2 { margin-top: 0; }
.dest-banner { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; min-height: 168px; border-radius: var(--radius); overflow: hidden; background: var(--ink-2); color: #fff; padding: 16px; }
.dest-banner::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(14, 34, 56, .22) 0%, rgba(14, 34, 56, .92) 100%); }
.dest-info { text-shadow: 0 1px 10px rgba(0, 0, 0, .6); }
.dest-banner > :not(.hero-bg) { position: relative; z-index: 2; }
.dest-info h2 { color: #fff; margin: 0; font-size: 1.7rem; }
.dest-sub { color: #dbe9f2; margin: 2px 0 8px; font-weight: 600; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; font-weight: 650; padding: 2px 9px; border-radius: 99px; background: rgba(255, 255, 255, .18); color: #fff; }
.badge-warn { background: var(--sun); color: var(--ink); }
.dest-actions { display: flex; gap: 6px; align-self: flex-start; margin-left: auto; }
.dest-actions .btn { background: rgba(14, 34, 56, .55); border-color: rgba(255, 255, 255, .35); color: #fff; }
.quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 4px; }
.timeline { list-style: none; margin: 14px 0 0 6px; padding: 0 0 0 16px; display: grid; gap: 16px; border-left: 2px solid var(--line); }
.tl-day { position: relative; }
.tl-day::before { content: ""; position: absolute; left: -23px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 3px solid var(--lagoon); }
.tl-empty::before { border-color: var(--line-strong); }
.tl-today::before { background: var(--sun); border-color: var(--ink); }
.tl-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.tl-today .tl-head b { color: var(--lagoon); }
.tl-free { margin: 0; font-size: .88rem; }
.tl-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tl-item { display: grid; grid-template-columns: 56px 36px 1fr auto; gap: 4px 10px; align-items: start; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.tl-time { font-weight: 800; font-variant-numeric: tabular-nums; font-size: .9rem; padding-top: 7px; }
.tl-secondary { background: transparent; border-style: dashed; }
.tl-body { min-width: 0; }
.tl-body .title { font-weight: 700; overflow-wrap: anywhere; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.pay { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; font-weight: 700; padding: 2px 9px; border-radius: 99px; }
.pay small { font-weight: 600; }
.pay-ok { background: var(--mint-soft); color: var(--mint); }
.pay-due { background: var(--sun-soft); color: #8a5a00; }
.pay-late { background: var(--rose-soft); color: var(--rose); }
.pay-none { background: #e9eef2; color: var(--muted); }
.resv { font: inherit; display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; padding: 2px 9px; border-radius: 8px; border: 1px dashed var(--line-strong); background: var(--paper); color: var(--ink); cursor: pointer; }
.ilink { display: inline-flex; align-items: center; gap: 4px; font-size: .82rem; font-weight: 650; text-decoration: none; }
.panel-warn { border-color: #f1d49a; background: #fffaf0; }
.panel-warn > h2 { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.photo-preview { width: 100%; max-height: 220px; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: 10px; }
.form-group { margin: 20px 0 10px; font-size: 1rem; padding-top: 12px; border-top: 1px solid var(--line); }
.dest-plain { margin-top: 10px; }
@media (max-width: 639px) {
  .tl-item { grid-template-columns: 40px 1fr; }
  .tl-item .chip-ico { grid-column: 1; grid-row: 1; }
  .tl-time { grid-column: 2; grid-row: 1; padding: 0; font-size: .82rem; color: var(--muted); }
  .tl-body { grid-column: 2; }
  .tl-item .row-actions { grid-column: 2; justify-content: flex-start; margin-top: 4px; }
  .dest-banner { min-height: 190px; flex-direction: column; align-items: stretch; justify-content: flex-end; }
  .dest-banner > .dest-actions { position: absolute; top: 10px; right: 10px; }
  .hero > .credit-hero { position: static; max-width: none; text-align: right; margin-top: 8px; }
}

@media (min-width: 640px) {
  .hero-photo::before { background: linear-gradient(90deg, rgba(14, 34, 56, .9) 0%, rgba(14, 34, 56, .6) 50%, rgba(14, 34, 56, .12) 100%), linear-gradient(180deg, rgba(14, 34, 56, 0) 55%, rgba(14, 34, 56, .55) 100%); }
}
