/* Laurota. On the iPhone the text is Apple's own (SF Pro, SF Pro Rounded for times); Inter and Nunito are the
   stand-ins elsewhere (and in the screenshot tests). */
@font-face { font-family: 'Inter'; src: url(/fonts/inter.woff2) format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: 'Nunito'; src: url(/fonts/nunito.woff2) format('woff2'); font-weight: 200 1000; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+2212; }

:root { --f: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif; --fr: ui-rounded, 'Nunito', -apple-system, sans-serif;
  --amarela: #FFCC00; --vermelha: #FF3366; --live: #2FA84F; color-scheme: light; }
:root.m-dark { color-scheme: dark; --live: #4CCB6B; }

/* ---------- themes: light and dark of each ---------- */
.t-amarelo.m-light { --bg:#FAF6EA; --surface:#FFFFFF; --fill:#EFE8D3; --fill-2:#E3DAC0; --seg-on:#FFFFFF; --line:#EDE6D2;
  --text:#2B2618; --text-2:#6E6550; --text-3:#968D76; --accent:#F3CF5A; --accent-soft:#FBF0C6; --accent-ink:#835F00; --on-accent:#2B2618; --warn:#A84A32; --bus:#EFE8D3; --bus-ink:#2B2618; --scrim: rgba(43,38,24,.28); }
.t-amarelo.m-dark { --bg:#14120C; --surface:#211E15; --fill:#2E2A1E; --fill-2:#3A3526; --seg-on:#4A4432; --line:#312C1F;
  --text:#F6F1E2; --text-2:#B5AC93; --text-3:#8A826C; --accent:#F2D16B; --accent-soft:#383019; --accent-ink:#F2D16B; --on-accent:#1E1A0E; --warn:#F0A58A; --bus:#3A3526; --bus-ink:#F6F1E2; --scrim: rgba(0,0,0,.5); }
.t-rosa.m-light { --bg:#FBF3F5; --surface:#FFFFFF; --fill:#F2E3E8; --fill-2:#E7D2DA; --seg-on:#FFFFFF; --line:#F1E3E8;
  --text:#2E2227; --text-2:#735F68; --text-3:#9C8992; --accent:#F2A7BE; --accent-soft:#FBE4EB; --accent-ink:#A3405F; --on-accent:#3A1E29; --warn:#A84A32; --bus:#F2E3E8; --bus-ink:#2E2227; --scrim: rgba(46,34,39,.28); }
.t-rosa.m-dark { --bg:#161013; --surface:#241B1F; --fill:#33272C; --fill-2:#3F3036; --seg-on:#54424A; --line:#33272D;
  --text:#F8EEF1; --text-2:#BBA6AE; --text-3:#8E7B83; --accent:#F4A9C0; --accent-soft:#3B2530; --accent-ink:#F6B8CB; --on-accent:#3A1E29; --warn:#F0A58A; --bus:#3F3036; --bus-ink:#F8EEF1; --scrim: rgba(0,0,0,.5); }
.t-azul.m-light { --bg:#F0F6FB; --surface:#FFFFFF; --fill:#E0EBF3; --fill-2:#CFDEEA; --seg-on:#FFFFFF; --line:#DFE9F1;
  --text:#1E2A33; --text-2:#5B6B77; --text-3:#84929D; --accent:#9CCDEE; --accent-soft:#DCEEFA; --accent-ink:#245F8A; --on-accent:#10283A; --warn:#A84A32; --bus:#E0EBF3; --bus-ink:#1E2A33; --scrim: rgba(30,42,51,.28); }
.t-azul.m-dark { --bg:#0E1317; --surface:#1A2128; --fill:#252E36; --fill-2:#303A43; --seg-on:#45515C; --line:#27313A;
  --text:#EBF3F9; --text-2:#9DAEBB; --text-3:#728390; --accent:#9ACFF2; --accent-soft:#1D3242; --accent-ink:#A8D7F6; --on-accent:#0E2333; --warn:#F0A58A; --bus:#303A43; --bus-ink:#EBF3F9; --scrim: rgba(0,0,0,.5); }

/* ---------- iOS basics ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overscroll-behavior-x: none; scrollbar-width: none; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.35 var(--f); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; min-height: 100vh; }
:where(button) { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.num { font-family: var(--fr); font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.b { font-weight: 650; }
.warn { color: var(--warn); }
.ok { color: var(--accent-ink); }
.arw { display: inline-block; width: .9em; height: .9em; vertical-align: -.08em; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: 480px; margin: 0 auto; padding: calc(10px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(32px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }

/* ---------- top bar ---------- */
.top { position: relative; display: flex; justify-content: center; align-items: center; padding: 4px 0 12px; }
.seg { display: inline-flex; background: var(--fill); border-radius: 9px; padding: 2px; }
.seg button { min-width: 96px; height: 30px; padding: 0 10px; border-radius: 7px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.seg button[aria-pressed="true"] { background: var(--seg-on); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.10), 0 0 0 .5px rgba(0,0,0,.04); }
.seg.full { display: flex; } .seg.full button { flex: 1; min-width: 0; }
.iconbtn { position: absolute; right: 0; top: 3px; width: 34px; height: 34px; border-radius: 50%; background: var(--fill); display: grid; place-items: center; color: var(--text-2); }
.iconbtn svg { width: 18px; height: 18px; }

/* ---------- cards ---------- */
.card { background: var(--surface); border-radius: 14px; }
.ask .row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 50px; padding: 0 14px; }
.ask .row + .row { border-top: .5px solid var(--line); }
.ask .lbl { font-size: 16px; }
.pill { position: relative; display: inline-block; font-family: var(--fr); font-weight: 700; font-size: 18px; color: var(--accent-ink); background: var(--accent-soft); padding: 5px 12px; border-radius: 8px; font-variant-numeric: tabular-nums; }
/* the native picker sits invisibly on top of what it changes, so a tap opens the iPhone's own wheel */
.picker { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; padding: 0; margin: 0; -webkit-appearance: none; appearance: none; font-size: 16px; }
.chips2 { display: inline-flex; gap: 6px; }
.chip { position: relative; font-size: 14px; font-weight: 600; padding: 6px 12px; border-radius: 99px; background: var(--fill); color: var(--text-2); white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }

.h { margin: 22px 4px 7px; font-size: 13px; letter-spacing: .02em; text-transform: uppercase; color: var(--text-2); font-weight: 500; }
.note { margin: 12px 4px 0; padding: 10px 12px; border-radius: 12px; background: var(--fill); color: var(--text-2); font-size: 14px; }
.note.warnbox { background: color-mix(in srgb, var(--warn) 12%, var(--surface)); color: var(--text); }

/* where a time comes from */
.src { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--text-3); white-space: nowrap; }
.src::before { content: ''; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid currentColor; box-sizing: border-box; }
.src.live { color: var(--live); }
.src.live::before { background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, var(--live) 22%, transparent); }

.bus { display: inline-grid; place-items: center; min-width: 44px; height: 24px; padding: 0 7px; border-radius: 7px; background: var(--bus); color: var(--bus-ink); font-weight: 750; font-size: 14px; font-variant-numeric: tabular-nums; }
.bus.sm { min-width: 38px; height: 20px; font-size: 13px; padding: 0 6px; border-radius: 6px; }
.mline { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; }
.mline i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.mline.am i { background: var(--amarela); }
.mline.vm i { background: var(--vermelha); }
.tile { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; }
.tile svg { width: 18px; height: 18px; }
.tile.bus-t { background: var(--bus); color: var(--bus-ink); }
.tile.am-t { background: var(--amarela); color: #3A2E00; }
.tile.vm-t { background: var(--vermelha); color: #fff; }
.tile.walk-t { color: var(--text-3); }

/* switch, iOS style */
.switch { width: 51px; height: 31px; border-radius: 99px; background: var(--fill-2); position: relative; flex-shrink: 0; transition: background-color .2s; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.18); transition: transform .2s; }
.switch[aria-checked="true"] { background: var(--accent-ink); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }
.switch:disabled { opacity: .45; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; margin-top: 12px; width: 100%; text-align: left; }

/* ---------- layout "Hora de sair" ---------- */
.hero { margin-top: 14px; background: var(--accent-soft); border-radius: 22px; padding: 18px 18px 16px; }
.hero .k { font-size: 15px; font-weight: 600; color: var(--text-2); }
.hero .big { font-family: var(--fr); font-weight: 750; font-size: 68px; line-height: 1; letter-spacing: -1px; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.hero .cd { font-size: 16px; font-weight: 650; color: var(--accent-ink); }
.hero .sep { height: .5px; background: color-mix(in srgb, var(--text) 14%, transparent); margin: 14px 0 12px; }
.hero .line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hero .line + .line { margin-top: 8px; }
.steps .st { display: flex; gap: 12px; align-items: center; padding: 11px 14px; }
.steps .st + .st { border-top: .5px solid var(--line); }
.steps .st.walk { padding-top: 7px; padding-bottom: 7px; }
.steps .mid { flex: 1; min-width: 0; }
.steps .t1 { font-weight: 600; }
.steps .t2 { font-size: 13px; color: var(--text-2); margin-top: 1px; }
.steps .rt { text-align: right; }
.steps .tt { font-family: var(--fr); font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.alt .r { display: flex; align-items: center; gap: 10px; padding: 11px 14px; }
.alt .r + .r { border-top: .5px solid var(--line); }
.alt .tag { width: 84px; flex-shrink: 0; font-size: 13px; font-weight: 600; color: var(--text-2); }
.alt .mid { flex: 1; }
.alt .rt { text-align: right; }

/* ---------- layout "Linha do tempo" ---------- */
.sum { margin: 16px 4px 0; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.sum .a { font-size: 22px; font-weight: 700; letter-spacing: -.3px; }
.sum .a .num { font-weight: 800; }
.tl { margin-top: 10px; padding: 8px 0; }
.tl .n { display: grid; grid-template-columns: 62px 22px 1fr; align-items: start; }
.tl .tm { text-align: right; padding: 9px 0 0; font-family: var(--fr); font-weight: 750; font-size: 17px; font-variant-numeric: tabular-nums; }
.tl .tm.sub { color: var(--text-2); font-weight: 650; font-size: 15px; }
.tl .rail { position: relative; align-self: stretch; }
.tl .rail::before { content: ''; position: absolute; left: 9px; top: 0; bottom: 0; width: 4px; border-radius: 2px; background: var(--seg, transparent); }
.tl .n.first .rail::before { top: 14px; }
.tl .n.last .rail::before { display: none; }
.tl .rail.walk::before { background: none; border-left: 3px dotted var(--text-3); width: 0; left: 9.5px; border-radius: 0; }
.tl .dot { position: absolute; left: 4px; top: 13px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--text-3); z-index: 1; }
.tl .dot.fill { border-color: var(--surface); }
.tl .dot.end { width: 18px; height: 18px; left: 2px; top: 11px; border: 5px solid var(--accent-ink); }
.tl .body { padding: 8px 14px 12px 6px; min-width: 0; }
.tl .ttl { font-weight: 650; font-size: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl .d { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.picks { display: flex; gap: 8px; margin-top: 8px; }
.picks button { flex: 1; min-width: 0; text-align: center; padding: 8px 0 7px; border-radius: 12px; background: var(--surface); }
.picks .x { font-family: var(--fr); font-weight: 750; font-size: 17px; font-variant-numeric: tabular-nums; }
.picks .y { font-size: 12px; color: var(--text-2); }
.picks .y.warn { color: var(--warn); }
.picks button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.picks button[aria-pressed="true"] .y { color: var(--on-accent); opacity: .8; }
.picks button.past { opacity: .5; }

.foot { margin: 22px 8px 0; text-align: center; font-size: 12px; color: var(--text-3); line-height: 1.5; }
.foot .src { margin: 0 6px; }

/* ---------- login ---------- */
.login { padding-top: 12vh; }
.brand { text-align: center; }
.brand img { width: 76px; height: 76px; border-radius: 18px; box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.brand h1 { font-size: 28px; margin: 14px 0 4px; letter-spacing: -.3px; }
.brand p { margin: 0 0 24px; color: var(--text-2); }
.input { width: 100%; min-height: 52px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 17px; letter-spacing: .04em;
  -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; -webkit-appearance: none; appearance: none; }
.btn { display: block; width: 100%; min-height: 50px; margin-top: 12px; border-radius: 12px; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 17px; }
.btn:disabled { opacity: .6; }
.btn.quiet { background: var(--fill); color: var(--text); font-weight: 600; font-size: 16px; min-height: 46px; }
.err { color: var(--warn); margin: 10px 4px 0; font-size: 14px; }

/* ---------- Ajustes sheet ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; background: var(--scrim); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s ease-out; }
.sheet { width: 100%; max-width: 480px; max-height: calc(100% - env(safe-area-inset-top, 0px) - 10px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; background: var(--bg);
  border-radius: 14px 14px 0 0; padding: 8px 16px calc(24px + env(safe-area-inset-bottom, 0px)); animation: up .32s cubic-bezier(.32,.72,0,1); }
.sheet .grab { width: 36px; height: 5px; border-radius: 3px; background: var(--fill-2); margin: 0 auto 8px; }
.sheet header { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 6px; }
.sheet h2 { font-size: 20px; margin: 0; }
.sheet .done { font-weight: 650; color: var(--accent-ink); font-size: 17px; padding: 6px 4px; }
.list .r { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 8px 14px; }
.list .r + .r { border-top: .5px solid var(--line); }
.list .r .sub { font-size: 13px; color: var(--text-2); }
.swatches { display: flex; gap: 10px; padding: 12px 14px; }
.swatches button { flex: 1; padding: 10px 0 8px; border-radius: 12px; border: 2px solid transparent; background: var(--fill); font-size: 13px; font-weight: 600; color: var(--text-2); }
.swatches button i { display: block; width: 30px; height: 30px; border-radius: 50%; margin: 0 auto 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.swatches button[aria-pressed="true"] { border-color: var(--accent-ink); color: var(--text); }
.stepper { display: inline-flex; align-items: center; gap: 4px; background: var(--fill); border-radius: 9px; padding: 2px; flex-shrink: 0; }
.stepper button { width: 34px; height: 30px; border-radius: 7px; font-size: 20px; font-weight: 500; color: var(--text); }
.stepper button:disabled { color: var(--text-3); }
.stepper span { min-width: 54px; text-align: center; font-weight: 650; font-variant-numeric: tabular-nums; font-size: 15px; }
.segwrap { padding: 10px 14px; }
.link { color: var(--accent-ink); font-weight: 600; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60; background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 12px; font-size: 14px; font-weight: 600; max-width: calc(100% - 32px); animation: fade .2s ease-out both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
