/* =====================================================================
   Tripeando — "seu roteiro começa aqui"
   Paleta da marca: azul-marinho, azul-céu e creme
   ===================================================================== */
:root {
  --paper: #f6f4ee;
  --paper-2: #eae7de;
  --card: #fffefb;
  --ink: #0e2240;         /* azul-marinho da marca ("tripe") */
  --ink-2: #3f4d63;
  --ink-3: #7d8899;
  --line: #d9d6cc;
  --accent: #2f6595;      /* azul da marca ("ando") */
  --accent-ink: #ffffff;
  --sky: #8fbadf;         /* céu do ícone — destaques sobre fundo escuro */
  --danger: #c2412b;
  --teal: #1d6b67;        /* transporte */
  --mustard: #d99a1e;     /* restaurantes */
  --plum: #6b3f6e;        /* hospedagem */
  --shadow: 0 1px 0 rgba(14,34,64,.04), 0 10px 30px -14px rgba(14,34,64,.30);
  --radius: 18px;
  --font-display: "Outfit", "Figtree", system-ui, sans-serif;
  --font-body: "Figtree", "Segoe UI", system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0c1522; --paper-2: #13203a; --card: #172741;
    --ink: #eef2f7; --ink-2: #c3ccd9; --ink-3: #8a96a8; --line: #26364f;
    --accent: #6fa6dc; --accent-ink: #0c1522; --sky: #9cc6ea; --danger: #ef7b62; --teal: #3fa59e; --mustard: #e9b24a; --plum: #b685b9;
    --shadow: 0 10px 30px -12px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0c1522; --paper-2: #13203a; --card: #172741;
  --ink: #eef2f7; --ink-2: #c3ccd9; --ink-3: #8a96a8; --line: #26364f;
  --accent: #6fa6dc; --accent-ink: #0c1522; --sky: #9cc6ea; --danger: #ef7b62; --teal: #3fa59e; --mustard: #e9b24a; --plum: #b685b9;
  --shadow: 0 10px 30px -12px rgba(0,0,0,.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  /* textura de papel */
  background-image:
    radial-gradient(circle at 15% 0%, rgba(143,186,223,.22), transparent 45%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.topbar .back {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--card); display: grid; place-items: center; flex: none;
}
.topbar .title { font-family: var(--font-display); font-weight: 600; font-size: 19px; line-height: 1.1; min-width: 0; }
.topbar .title small { display: block; font-family: var(--font-body); font-weight: 500; font-size: 12px; color: var(--ink-3); letter-spacing: .02em; }
.topbar .title span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .spacer { flex: 1; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); display: grid; place-items: center; text-decoration: none;
}
.icon-btn svg, .back svg { width: 18px; height: 18px; }

/* ---------- containers ---------- */
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.fade-up { animation: fadeUp .5s cubic-bezier(.2,.7,.2,1) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- HOME / hero ---------- */
.hero { padding: 28px 0 8px; position: relative; }
.hero .kicker {
  font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--accent);
  display: inline-flex; align-items: center; gap: 8px;
}
.hero .kicker::before { content: ""; width: 22px; height: 2px; background: currentColor; }
.hero h1 {
  font-family: var(--font-display); font-weight: 700; font-optical-sizing: auto;
  font-size: clamp(40px, 11vw, 84px); line-height: .92; letter-spacing: -.03em; margin: 12px 0 10px;
}
.hero h1 em { font-style: normal; font-weight: 700; color: var(--accent); }
.hero p { color: var(--ink-2); max-width: 46ch; margin: 0; }
.trip-stats { display: flex; gap: 22px; margin: 22px 0 6px; flex-wrap: wrap; }
.trip-stats div { font-family: var(--font-display); font-size: 30px; font-weight: 600; line-height: 1; }
.trip-stats small { display: block; font-family: var(--font-body); font-size: 12px; color: var(--ink-3); font-weight: 500; margin-top: 4px; }

/* faixa "Hoje" */
.today {
  margin: 20px 0 6px; padding: 16px 18px; border-radius: var(--radius);
  background: var(--ink); color: var(--paper); display: flex; gap: 14px; align-items: center; text-decoration: none;
  box-shadow: var(--shadow);
}
.today .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--sky); box-shadow: 0 0 0 0 var(--sky); animation: pulse 1.8s infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.today b { font-family: var(--font-display); font-size: 18px; font-weight: 600; display: block; }
.today span { font-size: 13px; opacity: .75; }
.today .go { margin-left: auto; font-weight: 700; font-size: 14px; white-space: nowrap; }

/* rota da viagem (linha de cidades) */
.route-line { display: flex; gap: 0; overflow-x: auto; padding: 18px 2px 8px; scrollbar-width: none; }
.route-line::-webkit-scrollbar { display: none; }
.route-line .rl { display: flex; align-items: center; flex: none; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.route-line .rl i { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--accent); background: var(--paper); margin-right: 6px; }
.route-line .rl.done i { background: var(--accent); }
.route-line .rl::after { content: ""; width: 26px; height: 2px; margin: 0 8px; background: repeating-linear-gradient(90deg, var(--line) 0 4px, transparent 4px 7px); }
.route-line .rl:last-child::after { display: none; }

.section-title { font-family: var(--font-display); font-size: 24px; font-weight: 600; margin: 30px 0 14px; display: flex; align-items: baseline; gap: 10px; }
.section-title small { font-family: var(--font-body); font-size: 13px; color: var(--ink-3); font-weight: 500; }

/* cards de cidade */
.cities { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; padding-bottom: 40px; }
.city-card {
  position: relative; display: block; text-decoration: none; border-radius: var(--radius); overflow: hidden;
  background: var(--card); box-shadow: var(--shadow); min-height: 230px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.city-card:active { transform: scale(.985); }
@media (hover: hover) { .city-card:hover { transform: translateY(-3px) rotate(-.3deg); } }
.city-card .ph { position: absolute; inset: 0; background: linear-gradient(135deg, var(--teal), var(--ink)); }
.city-card .ph img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s; }
.city-card .ph img.on { opacity: 1; }
.city-card .ph::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,12,16,.05) 30%, rgba(10,12,16,.82)); }
.city-card .body { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; min-height: 230px; padding: 18px; color: #fff; }
.city-card .num { position: absolute; top: 14px; left: 16px; font-family: var(--font-display); font-size: 13px; letter-spacing: .1em; opacity: .9; color:#fff; }
.city-card h3 { font-family: var(--font-display); font-size: 34px; line-height: 1; margin: 0 0 6px; font-weight: 700; letter-spacing: -.02em; }
.city-card .meta { font-size: 13px; opacity: .88; display: flex; gap: 10px; flex-wrap: wrap; }
.stamp {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  border: 2px solid rgba(255,255,255,.9); color: #fff; border-radius: 10px; padding: 5px 9px 4px;
  font-family: var(--font-display); font-weight: 700; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; line-height: 1.15; text-align: center;
  transform: rotate(6deg); backdrop-filter: blur(2px);
}
.stamp b { display: block; font-size: 18px; letter-spacing: 0; }
.city-card.now .stamp { background: var(--accent); border-color: var(--accent); }
.badge-processing { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: var(--mustard); color: #1c1608; }

.empty {
  text-align: center; padding: 50px 20px; border: 2px dashed var(--line); border-radius: var(--radius); color: var(--ink-2); margin: 20px 0 40px;
}
.empty h3 { font-family: var(--font-display); font-size: 24px; margin: 0 0 6px; color: var(--ink); }

/* ---------- CITY ---------- */
.city-hero { position: relative; border-radius: 0 0 28px 28px; overflow: hidden; background: var(--ink); color: #fff; margin: 0 -16px; }
.city-hero .ph { position: absolute; inset: 0; }
.city-hero .ph img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s; }
.city-hero .ph img.on { opacity: .75; }
.city-hero .ph::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.1), rgba(0,0,0,.75)); }
.city-hero .in { position: relative; padding: 70px 22px 24px; max-width: 1100px; margin: 0 auto; }
.city-hero .country { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; opacity: .9; }
.city-hero h1 { font-family: var(--font-display); font-size: clamp(46px, 13vw, 96px); line-height: .9; margin: 6px 0 10px; letter-spacing: -.03em; }
.city-hero h1 em { font-style: normal; font-weight: 400; font-size: .42em; opacity: .85; letter-spacing: 0; display: block; margin-top: 6px; }
.city-hero p { margin: 0; max-width: 56ch; opacity: .92; }

.day-list { display: grid; gap: 14px; padding: 22px 0 30px; }
.day-row {
  display: grid; grid-template-columns: 74px 1fr auto; align-items: center; gap: 14px;
  background: var(--card); border-radius: var(--radius); padding: 14px; text-decoration: none; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.day-row .dd { text-align: center; border-right: 2px dashed var(--line); padding-right: 12px; }
.day-row .dd b { display: block; font-family: var(--font-display); font-size: 34px; line-height: 1; font-weight: 700; color: var(--accent); }
.day-row .dd small { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-3); font-weight: 700; }
.day-row h3 { font-family: var(--font-display); font-size: 19px; line-height: 1.15; margin: 0 0 4px; font-weight: 600; }
.day-row p { margin: 0; color: var(--ink-2); font-size: 13.5px; }
.day-row .chev { color: var(--ink-3); }
.day-row.is-today { outline: 2px solid var(--accent); }
.day-row .today-tag { position: absolute; top: 0; right: 0; background: var(--accent); color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .1em; padding: 3px 10px; border-bottom-left-radius: 10px; }

.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; padding-bottom: 50px; }
.info-card { background: var(--paper-2); border-radius: var(--radius); padding: 16px 18px; }
.info-card h4 { margin: 0 0 8px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.info-card p, .info-card li { margin: 0; font-size: 14px; color: var(--ink-2); }
.info-card ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }

/* ---------- DAY (mapa + timeline) ---------- */
.day-layout { display: grid; grid-template-columns: minmax(0, 1fr); }
.day-layout > * { min-width: 0; }
.map-wrap { position: sticky; top: 63px; z-index: 5; height: 42vh; min-height: 260px; background: var(--paper-2); }
#map { position: absolute; inset: 0; }
.map-fab {
  position: absolute; right: 12px; bottom: 12px; z-index: 10;
  display: flex; gap: 8px;
}
.map-fab button, .map-fab a {
  height: 40px; padding: 0 14px; border-radius: 99px; border: 0; background: var(--card); color: var(--ink);
  box-shadow: var(--shadow); display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; text-decoration: none;
}
.map-fab svg { width: 16px; height: 16px; }

.timeline-panel { background: var(--paper); position: relative; z-index: 6; border-radius: 24px 24px 0 0; margin-top: -18px; padding: 8px 16px calc(40px + var(--safe-b)); box-shadow: 0 -12px 30px -18px rgba(0,0,0,.35); }
.grabber { width: 42px; height: 5px; border-radius: 9px; background: var(--line); margin: 6px auto 12px; }

.day-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.day-head h2 { font-family: var(--font-display); font-size: 26px; line-height: 1.08; margin: 0; font-weight: 600; letter-spacing: -.01em; }
.day-head p { margin: 6px 0 0; color: var(--ink-2); font-size: 14px; }

/* tabs de dias */
.day-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; scrollbar-width: none; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.day-tabs::-webkit-scrollbar { display: none; }
.day-tabs a {
  flex: none; text-decoration: none; padding: 7px 13px; border-radius: 99px; border: 1px solid var(--line); background: var(--card);
  font-size: 13px; font-weight: 600; color: var(--ink-2); display: flex; flex-direction: column; align-items: center; line-height: 1.15; min-width: 64px;
}
.day-tabs a small { font-size: 10.5px; font-weight: 500; color: var(--ink-3); }
.day-tabs a.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.day-tabs a.on small { color: color-mix(in srgb, var(--paper) 70%, transparent); }
.day-tabs a.is-today:not(.on) { border-color: var(--accent); color: var(--accent); }

/* seletor de modo */
.mode-switch {
  display: grid; grid-template-columns: repeat(3, 1fr); background: var(--paper-2); border-radius: 14px; padding: 4px; gap: 4px; margin: 4px 0 14px;
}
.mode-switch button {
  border: 0; background: transparent; border-radius: 11px; padding: 9px 6px; font-size: 13px; font-weight: 700; color: var(--ink-2);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.mode-switch button svg { width: 16px; height: 16px; }
.mode-switch button.on { background: var(--card); color: var(--ink); box-shadow: 0 2px 8px -3px rgba(0,0,0,.25); }

.day-summary { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 99px; background: var(--paper-2); font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.chip svg { width: 14px; height: 14px; }

.tips-box { background: color-mix(in srgb, var(--mustard) 14%, var(--card)); border: 1px solid color-mix(in srgb, var(--mustard) 35%, transparent); border-radius: 16px; padding: 12px 14px; margin-bottom: 18px; font-size: 14px; }
.tips-box b { display: block; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: color-mix(in srgb, var(--mustard) 70%, var(--ink)); margin-bottom: 4px; }
.tips-box ul { margin: 0; padding-left: 18px; color: var(--ink-2); }

/* timeline: trilho vertical */
.stops { list-style: none; margin: 0; padding: 0; position: relative; }
.stop { position: relative; padding-left: 50px; }
.stop .pin {
  position: absolute; left: 0; top: 14px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 15px; color: #fff; background: var(--ink);
  box-shadow: 0 0 0 4px var(--paper); z-index: 2;
}
.stop[data-kind="food"] .pin { background: var(--mustard); color: #241a05; }
.stop[data-kind="sight"] .pin { background: var(--accent); }
.stop[data-kind="hotel"] .pin { background: var(--plum); }
.stop[data-kind="move"] .pin { background: var(--teal); }

.stop-card {
  width: 100%; text-align: left; border: 0; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 14px 14px 16px; display: grid; grid-template-columns: 1fr 64px; gap: 12px; align-items: center; position: relative;
  transition: transform .2s;
}
.stop-card:active { transform: scale(.985); }
.stop-card.focus { outline: 2px solid var(--accent); }
.stop-card .t { font-size: 12px; font-weight: 800; letter-spacing: .06em; color: var(--accent); display: flex; gap: 8px; align-items: center; }
.stop-card .t .ty { color: var(--ink-3); font-weight: 600; letter-spacing: .02em; text-transform: none; }
.stop-card h3 { font-family: var(--font-display); font-size: 18px; line-height: 1.15; margin: 3px 0 4px; font-weight: 600; }
.stop-card .sub { font-size: 13px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.stop-card .thumb { width: 64px; height: 64px; border-radius: 14px; background: var(--paper-2); overflow: hidden; display: grid; place-items: center; color: var(--ink-3); }
.stop-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.stop-card .thumb svg { width: 26px; height: 26px; }
.price-tag { display: inline-flex; gap: 6px; align-items: center; margin-top: 6px; font-size: 12.5px; font-weight: 700; color: color-mix(in srgb, var(--mustard) 75%, var(--ink)); }
.price-tag .lvl { letter-spacing: 1px; }
.price-tag .lvl i { font-style: normal; opacity: .3; }
.note-flag svg { width: 14px; height: 14px; }
.note-flag { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--teal); }

/* perna entre paradas */
.leg { position: relative; padding: 6px 0 6px 50px; min-height: 52px; display: flex; align-items: center; }
.leg::before {
  content: ""; position: absolute; left: 17px; top: -14px; bottom: -14px; width: 2px;
  background: repeating-linear-gradient(180deg, var(--line) 0 5px, transparent 5px 10px);
}
.leg.transit::before { background: var(--teal); width: 3px; left: 16.5px; }
.leg-info {
  display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; font-size: 13px; color: var(--ink-2); width: 100%;
}
.leg-info .m { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--ink); }
.leg.transit .leg-info .m { color: var(--teal); }
.leg-info .m svg { width: 16px; height: 16px; }
.leg-info .muted { color: var(--ink-3); }
.leg-info { min-width: 0; flex: 1; }
.leg-info .lt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leg-info .m { flex: none; }
.leg-info a.go {
  margin-left: auto; text-decoration: none; font-weight: 700; font-size: 12.5px; color: var(--ink);
  border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 5px 11px; display: inline-flex; align-items: center; gap: 5px;
}
.leg-info a.go svg { width: 13px; height: 13px; }
.leg .loading { display: inline-block; width: 60px; height: 10px; border-radius: 4px; background: linear-gradient(90deg, var(--paper-2), var(--line), var(--paper-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- SHEET (detalhe do lugar) ---------- */
.sheet-bg { position: fixed; inset: 0; background: rgba(8,10,14,.5); z-index: 80; opacity: 0; transition: opacity .25s; }
.sheet-bg.on { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; max-height: 92vh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--paper); border-radius: 26px 26px 0 0; transform: translateY(105%); transition: transform .35s cubic-bezier(.2,.8,.2,1);
  padding-bottom: calc(24px + var(--safe-b));
}
.sheet.on { transform: none; }
@media (min-width: 900px) {
  .sheet { left: auto; right: 20px; top: 20px; bottom: 20px; width: 460px; border-radius: 24px; max-height: none; transform: translateX(110%); }
}
.sheet .cover { position: relative; height: 220px; background: linear-gradient(135deg, var(--teal), var(--ink)); overflow: hidden; }
.sheet .cover img { width: 100%; height: 100%; object-fit: cover; }
.sheet .cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.55)); }
.sheet .close { position: absolute; top: 12px; right: 12px; z-index: 3; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(0,0,0,.45); color: #fff; display: grid; place-items: center; backdrop-filter: blur(6px); }
.sheet .close svg { width: 18px; height: 18px; }
.sheet .credit { position: absolute; right: 12px; bottom: 8px; z-index: 2; font-size: 10px; color: rgba(255,255,255,.75); }
.sheet .in { padding: 18px 20px; }
.sheet .t { font-size: 12px; font-weight: 800; letter-spacing: .08em; color: var(--accent); text-transform: uppercase; }
.sheet h2 { font-family: var(--font-display); font-size: 30px; line-height: 1.05; margin: 6px 0 4px; letter-spacing: -.01em; }
.sheet .alt { color: var(--ink-3); font-size: 14px; margin-bottom: 10px; }
.sheet .desc { font-size: 15.5px; color: var(--ink-2); margin: 10px 0 16px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 18px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--card); font-weight: 700; font-size: 14.5px; text-decoration: none; padding: 0 16px;
}
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: wait; }

.facts { display: grid; gap: 10px; margin-bottom: 18px; }
.fact { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; background: var(--card); border-radius: 14px; padding: 12px; }
.fact .ic { width: 34px; height: 34px; border-radius: 10px; background: var(--paper-2); display: grid; place-items: center; color: var(--ink-2); }
.fact .ic svg { width: 17px; height: 17px; }
.fact small { display: block; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.fact div { font-size: 14px; color: var(--ink); }

.block-title { font-family: var(--font-display); font-size: 19px; font-weight: 600; margin: 20px 0 10px; }
.bullets { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.bullets li { position: relative; padding-left: 22px; font-size: 14.5px; color: var(--ink-2); }
.bullets li::before { content: ""; position: absolute; left: 4px; top: 8px; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); transform: rotate(45deg); }
.bullets.tips li::before { background: var(--teal); border-radius: 50%; transform: none; }
.user-note { background: color-mix(in srgb, var(--teal) 10%, var(--card)); border-left: 4px solid var(--teal); border-radius: 12px; padding: 12px 14px; font-size: 14.5px; white-space: pre-line; }
.user-note b { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); margin-bottom: 3px; }

/* restaurante */
.menu-head { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 14px; }
.menu-head div { background: var(--card); border-radius: 14px; padding: 12px 10px; text-align: center; }
.menu-head b { display: block; font-family: var(--font-display); font-size: 21px; line-height: 1.1; }
.menu-head small { font-size: 11px; color: var(--ink-3); font-weight: 600; }
.menu-head .brl { display: block; font-size: 11.5px; color: var(--teal); font-weight: 700; margin-top: 2px; }
.dishes { background: var(--card); border-radius: 16px; padding: 4px 16px; }
.dish { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.dish:last-child { border-bottom: 0; }
.dish b { font-size: 15px; }
.dish .p { font-family: var(--font-display); font-weight: 700; text-align: right; white-space: nowrap; }
.dish .p small { display: block; font-family: var(--font-body); font-weight: 600; font-size: 11px; color: var(--teal); }
.dish p { grid-column: 1 / -1; margin: 0; font-size: 13px; color: var(--ink-3); }
.rank { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--mustard); color: #241a05; font-size: 11px; font-weight: 800; margin-right: 6px; vertical-align: 1px; }
.ai-note { font-size: 12px; color: var(--ink-3); margin-top: 18px; display: flex; gap: 6px; align-items: flex-start; }
.ai-note svg { width: 14px; height: 14px; flex: none; margin-top: 2px; }

/* ---------- login / formulários ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 400px; background: var(--card); border-radius: 26px; padding: 30px 26px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.auth-card::before { content: ""; position: absolute; top: -60px; right: -60px; width: 180px; height: 180px; border-radius: 50%; border: 3px dashed color-mix(in srgb, var(--accent) 40%, transparent); }
.auth-card h1 { font-family: var(--font-display); font-size: 38px; line-height: 1; margin: 6px 0 6px; letter-spacing: -.02em; }
.auth-card h1 em { color: var(--accent); font-style: normal; }
.auth-card p { color: var(--ink-2); margin: 0 0 20px; font-size: 14.5px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.field input, .field select, .field textarea {
  font: inherit; color: var(--ink); background: var(--paper); border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 140px; resize: vertical; font-size: 14px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.field .hint { font-size: 12px; color: var(--ink-3); }
.err { color: var(--danger); font-size: 13.5px; font-weight: 600; min-height: 20px; margin: 0 0 8px; }

/* toast */
.toast { position: fixed; left: 50%; bottom: calc(22px + var(--safe-b)); transform: translate(-50%, 30px); opacity: 0; z-index: 200; background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 14px; font-size: 14px; font-weight: 600; transition: all .3s; max-width: calc(100% - 32px); box-shadow: var(--shadow); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

.offline-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 300; background: var(--mustard); color: #241a05; text-align: center; font-size: 12.5px; font-weight: 700; padding: 4px; display: none; }
body.offline .offline-bar { display: block; }

.loader { display: grid; place-items: center; min-height: 60vh; color: var(--ink-3); gap: 12px; font-size: 14px; }
.loader .ring { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* marcador do mapa (Google e Leaflet) */
.mk {
  width: 32px; height: 32px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); display: grid; place-items: center;
  background: var(--ink); border: 2.5px solid #fff; box-shadow: 0 4px 10px rgba(0,0,0,.35); cursor: pointer; transition: transform .2s;
}
.mk span { transform: rotate(45deg); color: #fff; font: 700 13px/1 var(--font-display); }
.mk.food { background: var(--mustard); } .mk.food span { color: #241a05; }
.mk.sight { background: var(--accent); }
.mk.hotel { background: var(--plum); }
.mk.move { background: var(--teal); }
.mk.on { transform: rotate(-45deg) scale(1.25); }
.leaflet-div-icon { background: none !important; border: 0 !important; }
.me-dot { width: 16px; height: 16px; border-radius: 50%; background: #2a7bf6; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(42,123,246,.25); }

/* ---------- desktop ---------- */
@media (min-width: 900px) {
  .day-layout { grid-template-columns: minmax(380px, 470px) 1fr; min-height: calc(100vh - 63px); }
  .map-wrap { order: 2; height: calc(100vh - 63px); top: 63px; }
  .timeline-panel { order: 1; margin-top: 0; border-radius: 0; box-shadow: none; padding: 16px 24px 60px; }
  .grabber { display: none; }
  .day-tabs { margin: 0 -24px; padding-left: 24px; padding-right: 24px; }
  .city-hero { margin: 0; border-radius: 0 0 32px 32px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- próxima parada + visitado ---------- */
.next-card { background: var(--ink); color: var(--paper); border-radius: var(--radius); padding: 14px 16px 16px; margin: 0 0 16px; display: grid; gap: 4px; box-shadow: var(--shadow); }
.next-card small { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--sky); }
.next-card b { font-family: var(--font-display); font-size: 21px; line-height: 1.15; font-weight: 600; }
.next-card .eta { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; opacity: .8; }
.next-card .eta svg { width: 15px; height: 15px; }
.next-card .row { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 10px; }
.next-card .btn.ghost { background: transparent; color: var(--paper); border-color: color-mix(in srgb, var(--paper) 30%, transparent); }
.next-card.done b { font-size: 18px; }
.btn.ghost { background: transparent; }
.stop.done .stop-card { opacity: .55; }
.stop.done .pin { background: var(--teal) !important; color: #fff !important; }
.leg-info a.go.transit { color: var(--teal); border-color: color-mix(in srgb, var(--teal) 45%, var(--line)); }

/* =====================================================================
   v1.1 — experiência mobile: mini mapa por parada, rota dentro do app
   ===================================================================== */
html { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }
a, button, [role="button"] { touch-action: manipulation; }
body.noscroll { overflow: hidden; }
.topbar { padding-top: calc(12px + env(safe-area-inset-top, 0px)); padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.icon-btn, .back { width: 42px; height: 42px; }
.loading { display: inline-block; width: 60px; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--paper-2), var(--line), var(--paper-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.muted { color: var(--ink-3); } .small { font-size: 12.5px; }

/* instalar */
.install-card { position: relative; display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; align-items: center; background: var(--card); border-radius: var(--radius); padding: 12px 12px 12px 14px; margin: 16px 0 4px; box-shadow: var(--shadow); }
.install-card .ic { width: 42px; height: 42px; border-radius: 12px; background: var(--accent); color: #fff; display: grid; place-items: center; }
.install-card .ic svg { width: 22px; height: 22px; }
.install-card b { display: block; font-size: 15px; }
.install-card span { font-size: 13px; color: var(--ink-3); line-height: 1.35; display: block; }
.install-card .btn { height: 40px; padding: 0 14px; font-size: 14px; }
.install-card .x { position: absolute; top: -8px; right: -8px; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--paper); border: 0; display: grid; place-items: center; }
.install-card .x svg { width: 12px; height: 12px; }
.inst-steps { list-style: none; margin: 16px 0; padding: 0; display: grid; gap: 10px; }
.inst-steps li { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; background: var(--card); border-radius: 16px; padding: 12px; }
.inst-steps .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--paper-2); display: grid; place-items: center; color: #2a7bf6; }
.inst-steps .ic svg { width: 22px; height: 22px; }
.inst-steps b { display: block; font-size: 15px; }
.inst-steps small { color: var(--ink-3); font-size: 13px; }
.sheet.install .in { padding-top: 8px; }
.sheet.install h2 { margin-top: 4px; }

/* dia */
.day { max-width: 720px; margin: 0 auto; padding: 6px 16px calc(120px + var(--safe-b)); }
.day .day-tabs { margin: 0 -16px; padding: 8px 16px 12px; }
.day .day-head { display: block; margin: 4px 0 14px; }
.day .day-head h2 { font-family: var(--font-display); font-size: 27px; line-height: 1.08; margin: 0; font-weight: 600; letter-spacing: -.01em; }
.day .day-head p { margin: 6px 0 0; color: var(--ink-2); font-size: 14.5px; }
details.tips-box { padding: 0; }
details.tips-box summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; }
details.tips-box summary::-webkit-details-marker { display: none; }
details.tips-box summary b { margin: 0; }
details.tips-box summary span { font-size: 12px; font-weight: 800; background: var(--mustard); color: #241a05; border-radius: 99px; padding: 1px 8px; }
details.tips-box ul { padding: 0 14px 12px 32px; margin: 0; }

.stop { padding-left: 46px; }
.stop .pin { top: 12px; width: 34px; height: 34px; font-size: 14px; }
.stop-card { display: block; padding: 0; overflow: hidden; cursor: pointer; text-align: left; -webkit-user-select: none; user-select: none; }
.stop-card:focus-visible { outline: 2px solid var(--accent); }
.sc-media { position: relative; aspect-ratio: 640 / 240; background: var(--paper-2); }
.sc-media .smap { width: 100%; height: 100%; object-fit: cover; display: block; }
:root[data-theme="dark"] .sc-media .smap { filter: brightness(.85) contrast(1.05); }
.sc-media.nomap { display: none; }
.sc-media.photo img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s; }
.sc-media.photo img.on { opacity: 1; }
.sc-photo { position: absolute; right: 12px; bottom: -24px; width: 58px; height: 58px; border-radius: 16px; border: 3px solid var(--card); overflow: hidden; background: var(--paper-2); box-shadow: 0 6px 14px -6px rgba(0,0,0,.4); }
.sc-photo img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s; }
.sc-photo img.on { opacity: 1; }
.sc-time { position: absolute; left: 10px; top: 10px; background: var(--ink); color: var(--paper); font-weight: 800; font-size: 12.5px; letter-spacing: .03em; padding: 5px 10px; border-radius: 99px; }
.sc-body { padding: 12px 16px 14px; }
.sc-media + .sc-body { padding-right: 82px; }
.sc-media.photo + .sc-body, .sc-media.nomap + .sc-body { padding-right: 16px; }
.stop-card .t .ty svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.stop-card .t:empty { display: none; }
.stop-card h3 { font-size: 19px; margin: 4px 0 4px; }

.leg { padding: 6px 0 6px 46px; min-height: 56px; }
.leg::before { left: 16px; }
.leg.transit::before { left: 15.5px; }
.leg-btn { width: 100%; display: flex; align-items: center; gap: 10px; background: transparent; border: 0; padding: 8px 6px 8px 0; border-radius: 14px; min-height: 48px; text-align: left; color: var(--ink-2); font-size: 13.5px; }
.leg-btn:active { background: var(--paper-2); }
.leg-btn .m { flex: none; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--paper-2); color: var(--ink); }
.leg.transit .leg-btn .m { background: color-mix(in srgb, var(--teal) 14%, var(--card)); color: var(--teal); }
.leg-btn .m svg { width: 17px; height: 17px; }
.leg-btn .lt { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; }
.leg-btn .lt b { color: var(--ink); font-size: 14.5px; }
.lines { display: inline-flex; gap: 4px; flex-wrap: nowrap; }
.lines i { font-style: normal; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 6px; background: var(--teal); color: #fff; white-space: nowrap; }
.leg-btn .go { flex: none; display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 13px; color: var(--accent); padding: 8px 12px; border-radius: 99px; background: color-mix(in srgb, var(--accent) 10%, var(--card)); }
.leg.transit .leg-btn .go { color: var(--teal); background: color-mix(in srgb, var(--teal) 10%, var(--card)); }
.leg-btn .go svg { width: 15px; height: 15px; }

.fab { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: calc(18px + var(--safe-b)); z-index: 50; height: 54px; padding: 0 20px; border-radius: 99px; background: var(--ink); color: var(--paper); border: 0; display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; box-shadow: 0 14px 30px -10px rgba(0,0,0,.55); }
.fab svg { width: 20px; height: 20px; }

/* sobreposição: traçar rota / mapa do dia */
.rv { position: fixed; inset: 0; z-index: 100; background: var(--paper); display: grid; grid-template-rows: 46dvh 1fr; transform: translateY(100%); transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.rv.on { transform: none; }
.rv-map { position: relative; background: var(--paper-2); }
.rv-map > div[id] { position: absolute; inset: 0; }
.rv-btn { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); z-index: 5; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--card); color: var(--ink); box-shadow: 0 6px 18px -6px rgba(0,0,0,.45); display: grid; place-items: center; }
.rv-btn svg { width: 20px; height: 20px; }
.rv-close { left: 12px; } .rv-follow { right: 12px; }
.rv.tracking .rv-follow { background: var(--accent); color: #fff; }
.rv-panel { position: relative; z-index: 2; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; margin-top: -20px; border-radius: 22px 22px 0 0; background: var(--paper); padding: 4px 16px calc(28px + var(--safe-b)); box-shadow: 0 -12px 30px -18px rgba(0,0,0,.4); transition: transform .3s; }
.rv-head small { font-size: 11.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.rv-head h3 { font-family: var(--font-display); font-size: 21px; line-height: 1.15; margin: 4px 0 0; font-weight: 600; }
.rv-head h3 i { font-style: normal; color: var(--accent); }
.rv-opts { display: grid; gap: 8px; margin: 14px 0 12px; }
.seg.mini { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--paper-2); padding: 4px; border-radius: 13px; }
.seg.mini button { border: 0; background: transparent; border-radius: 10px; padding: 10px 6px; font-size: 13px; font-weight: 700; color: var(--ink-2); display: flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 42px; }
.seg.mini button svg { width: 15px; height: 15px; flex: none; }
.seg.mini button.on { background: var(--card); color: var(--ink); box-shadow: 0 2px 8px -3px rgba(0,0,0,.25); }
.rv-sum { min-height: 60px; }
.rv-sum .big b { font-family: var(--font-display); font-size: 36px; line-height: 1; }
.rv-sum .big span { color: var(--ink-3); margin-left: 8px; font-weight: 600; }
.rv-sum .meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); margin-top: 6px; }
.rv-sum .meta svg { width: 16px; height: 16px; }
#rvLeft { color: var(--accent); font-weight: 800; margin-left: 4px; }
.rv-sum .lines { margin-top: 8px; flex-wrap: wrap; }
.rv-sum .lines i { font-size: 12.5px; padding: 4px 9px; }
.rv-actions { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin: 14px 0 16px; }
.rv-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rv-steps > li { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; background: var(--card); border-radius: 16px; padding: 12px; transition: outline-color .2s; outline: 2px solid transparent; }
.rv-steps > li.now { outline-color: var(--accent); }
.rv-steps .ic, .rv-steps .ln { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--paper-2); font-weight: 800; font-size: 13px; }
.rv-steps .ln { background: var(--teal); color: #fff; padding: 0 2px; text-align: center; line-height: 1.05; }
.rv-steps .ic svg { width: 19px; height: 19px; }
.rv-steps b { display: block; font-size: 15px; margin-bottom: 2px; }
.rv-steps span { display: block; font-size: 13.5px; color: var(--ink-2); }
.rv-steps ul { margin: 6px 0 0; padding-left: 16px; font-size: 13px; color: var(--ink-3); display: grid; gap: 4px; }
.rv-ext { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; font-size: 13px; font-weight: 600; color: var(--ink-3); text-decoration: none; padding: 8px 0; }
.rv-ext svg { width: 14px; height: 14px; }
.rv.daymap { grid-template-rows: 1fr auto; }
.dm-strip { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 12px 12px calc(12px + var(--safe-b)); background: var(--paper); scrollbar-width: none; }
.dm-strip::-webkit-scrollbar { display: none; }
.dm-strip button { flex: none; width: 176px; scroll-snap-align: center; text-align: left; background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 12px; display: grid; grid-template-columns: 28px 1fr; gap: 0 8px; align-items: center; }
.dm-strip .n { grid-row: span 2; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-weight: 800; font-size: 12.5px; }
.dm-strip .nm { font-weight: 700; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-strip small { color: var(--ink-3); font-size: 12px; }
.dm-strip button.on { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.dm-strip button.done .n { background: var(--teal); }

/* ficha (bottom sheet) */
.sheet-layer .sheet-bg { opacity: 0; }
.sheet-layer.on .sheet-bg { opacity: 1; }
.sheet { z-index: 110; }
.sheet-bg { z-index: 105; }
.grab-on-cover { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 42px; height: 5px; border-radius: 9px; background: rgba(255,255,255,.75); z-index: 3; }
.sheet .cover { height: 200px; }
.sheet-map { display: block; width: 100%; border: 0; padding: 0; border-radius: 16px; overflow: hidden; position: relative; background: var(--paper-2); margin: 2px 0 16px; }
.sheet-map img { width: 100%; aspect-ratio: 640 / 220; object-fit: cover; display: block; }
.sheet-map span { position: absolute; left: 10px; bottom: 10px; background: var(--ink); color: var(--paper); font-weight: 800; font-size: 13px; padding: 8px 12px; border-radius: 99px; display: inline-flex; align-items: center; gap: 6px; }
.sheet-map span svg { width: 15px; height: 15px; }
.actions .btn svg { width: 18px; height: 18px; }

@media (min-width: 900px) {
  .rv { grid-template-columns: 1fr 440px; grid-template-rows: 100dvh; transform: translateX(100%); }
  .rv.on { transform: none; }
  .rv-panel { margin-top: 0; border-radius: 0; padding-top: 24px; }
  .rv-panel .grabber { display: none; }
  .rv.daymap { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .fab { bottom: 28px; right: 28px; }
}
.sheet .cover img { opacity: 0; transition: opacity .5s; }
.sheet .cover img.on { opacity: 1; }
.sheet .cover.is-map::after { background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.25)); }

/* mapa do roteiro completo (topo do dia) */
.day-map-card { position: relative; height: 280px; border-radius: var(--radius); overflow: hidden; background: var(--paper-2); box-shadow: var(--shadow); margin: 0 0 16px; isolation: isolate; }
.day-map-card #dayMapInline { position: absolute; inset: 0; }
.day-map-card .loader svg { width: 28px; height: 28px; opacity: .5; }
.dm-expand { position: absolute; right: 10px; bottom: 10px; z-index: 500; height: 40px; padding: 0 14px; border-radius: 99px; border: 0; background: var(--ink); color: var(--paper); font-weight: 800; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; box-shadow: 0 6px 16px -6px rgba(0,0,0,.5); }
.dm-expand svg { width: 16px; height: 16px; }
@media (min-width: 900px) { .day-map-card { height: 360px; } }

/* =====================================================================
   v1.2 — Tripeando: acesso, conta e marca
   ===================================================================== */
.tb-logo { width: 38px; height: 38px; border-radius: 10px; flex: none; box-shadow: 0 2px 8px -3px rgba(14,34,64,.35); }
.avatar { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--ink); color: var(--paper); font: 700 16px/1 var(--font-display); display: grid; place-items: center; flex: none; }
.avatar.big { width: 52px; height: 52px; font-size: 21px; background: var(--accent); color: #fff; }

/* telas de acesso */
body.is-auth { background-image: radial-gradient(120% 60% at 50% 0%, color-mix(in srgb, var(--sky) 35%, transparent), transparent 70%); }
.auth { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: calc(24px + env(safe-area-inset-top, 0px)) 16px calc(20px + var(--safe-b)); }
.auth-card { width: 100%; max-width: 420px; padding: 26px 22px 24px; border-radius: 26px; }
.auth-card::before { display: none; }
.brand-lock { display: grid; justify-items: center; gap: 10px; margin: 0 0 18px; }
.bl-icon { width: 84px; height: 84px; border-radius: 22px; box-shadow: 0 12px 26px -12px rgba(14,34,64,.55); }
.bl-word { width: 100%; max-width: 250px; height: auto; }
.bl-dark { display: none; }
:root[data-theme="dark"] .bl-light { display: none; }
:root[data-theme="dark"] .bl-dark { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bl-light { display: none; } :root:not([data-theme="light"]) .bl-dark { display: block; } }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--paper-2); padding: 4px; border-radius: 14px; margin: 0 0 18px; }
.auth-tabs a { text-align: center; text-decoration: none; padding: 11px 6px; border-radius: 11px; font-weight: 700; font-size: 14.5px; color: var(--ink-2); }
.auth-tabs a.on { background: var(--card); color: var(--ink); box-shadow: 0 2px 8px -3px rgba(0,0,0,.25); }
.auth-title { font-family: var(--font-display); font-size: 26px; line-height: 1.15; margin: 0 0 6px; font-weight: 700; letter-spacing: -.01em; }
.auth-sub { color: var(--ink-2); margin: 0 0 18px; font-size: 15px; }
.auth-sub.small { font-size: 13.5px; margin-top: -8px; }
.auth-alt { text-align: center; margin: 16px 0 0; font-size: 14.5px; color: var(--ink-2); }
.auth-alt a, .link-right, .check button, .auth-foot button { color: var(--accent); font-weight: 700; text-decoration: none; }
.link-right { display: block; text-align: right; font-size: 14px; margin: -4px 0 10px; padding: 6px 0; }
.auth-back { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-3); text-decoration: none; font-weight: 600; font-size: 14px; margin: -6px 0 10px; padding: 6px 0; }
.auth-back svg { width: 16px; height: 16px; }
.auth-foot { margin: 18px 0 0; font-size: 12.5px; color: var(--ink-3); text-align: center; }
.auth-foot button { background: none; border: 0; padding: 4px; font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.auth .field input { font-size: 16px; min-height: 50px; } /* 16px evita o zoom automático do iPhone */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 52px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; background: none; color: var(--ink-3); display: grid; place-items: center; border-radius: 10px; }
.pw-eye svg { width: 20px; height: 20px; }
.pw-rules { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.pw-rules .ok { color: var(--teal); }
.field.valid input { border-color: var(--teal); }
.field.invalid input { border-color: var(--danger); }
.field.valid .hint { color: var(--teal); font-weight: 600; }
.field.invalid .hint { color: var(--danger); font-weight: 600; }
.check { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; margin: 4px 0 12px; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 0; accent-color: var(--accent); }
.check button { background: none; border: 0; padding: 0; font: inherit; text-align: left; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ok-box { background: color-mix(in srgb, var(--teal) 12%, var(--card)); border: 1px solid color-mix(in srgb, var(--teal) 35%, transparent); color: var(--ink); border-radius: 12px; padding: 12px 14px; font-size: 14px; font-weight: 600; margin: 0 0 14px; }
.sent { text-align: center; }
.sent-ic { font-size: 44px; display: block; margin: 4px 0 8px; }
.spin { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; margin-right: 8px; vertical-align: -3px; }

/* termos e conta */
.sheet.terms h2, .sheet.acct h2 { font-family: var(--font-display); margin: 4px 0 2px; }
.sheet.terms h3 { font-size: 15px; margin: 18px 0 4px; }
.sheet.terms p { margin: 0; font-size: 14.5px; color: var(--ink-2); line-height: 1.55; }
.sheet.terms .btn { margin-top: 22px; }
.acct-head { display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: center; margin: 6px 0 16px; }
.acct-head b { display: block; font-size: 17px; }
.acct-head span { color: var(--ink-3); font-size: 14px; word-break: break-all; }
.acct-row { width: 100%; display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; background: var(--card); border: 0; border-radius: 16px; padding: 12px; margin: 0 0 8px; text-decoration: none; color: var(--ink); text-align: left; }
.acct-row > svg:first-child { width: 40px; height: 40px; padding: 10px; border-radius: 12px; background: var(--paper-2); }
.acct-row > svg:last-child { color: var(--ink-3); }
.acct-row b { display: block; font-size: 15px; }
.acct-row small { color: var(--ink-3); font-size: 13px; }
.acct-row.danger { color: var(--danger); grid-template-columns: 40px 1fr; margin-top: 12px; }
.acct-row.danger > svg { background: color-mix(in srgb, var(--danger) 12%, var(--card)); }

/* boas-vindas e nova cidade */
.welcome { background: var(--card); border-radius: 22px; padding: 22px 20px; box-shadow: var(--shadow); margin: 8px 0 40px; }
.welcome h3 { font-family: var(--font-display); font-size: 22px; line-height: 1.2; margin: 0 0 14px; }
.welcome ol { margin: 0 0 18px; padding: 0; list-style: none; counter-reset: w; display: grid; gap: 12px; }
.welcome li { counter-increment: w; display: grid; grid-template-columns: 32px 1fr; column-gap: 12px; }
.welcome li::before { content: counter(w); grid-row: span 2; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 800; }
.welcome li b { font-size: 15px; }
.welcome li span { color: var(--ink-2); font-size: 14px; }
.welcome .btn svg { width: 18px; height: 18px; }
.new-city { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; border: 2px dashed var(--line); border-radius: var(--radius); padding: 14px; text-decoration: none; color: var(--ink); margin: -24px 0 40px; }
.new-city > svg { width: 44px; height: 44px; padding: 11px; border-radius: 12px; background: var(--accent); color: #fff; }
.new-city b { display: block; } .new-city small { color: var(--ink-3); }
.auth .err:empty { min-height: 0; margin: 0; }
.auth .err { margin: 4px 0 10px; }
.auth form > .link-right + .err:empty + .btn { margin-top: 6px; }
.auth-foot a { color: var(--ink-3); font-weight: 600; text-decoration: none; padding: 4px; }
.terms-links { display: grid; gap: 8px; margin: 20px 0 0 !important; }
.terms-links a { color: var(--accent); font-weight: 700; text-decoration: none; font-size: 14.5px; }
