:root {
  --bg: #f3f4f6; --surface: #fff; --surface-2: #f7f8fa; --ink: #14171c; --ink-2: #3b424c; --muted: #6b7380; --line: #e4e7eb;
  --accent: #c8161d; --accent-ink: #fff; --accent-soft: #fdecec;
  --ok: #17803d; --ok-soft: #e6f4ea; --warn: #b26a00; --warn-soft: #fff4e0; --bad: #b42318; --bad-soft: #fdecea; --info: #1f5fbf; --info-soft: #e8f0fb;
  --r: 14px; --r-sm: 10px; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 4px 16px rgba(16,24,40,.06); --shadow-lg: 0 8px 32px rgba(16,24,40,.16);
  --top: 64px; --tabs: 64px; --panel-w: 440px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
/* Desactiva "deslizar para actualizar" de Chrome Android: debe ir en html (el body no basta) */
html { overscroll-behavior-y: none; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; font-size: 15px; line-height: 1.4; overscroll-behavior: none; }
button { font: inherit; color: inherit; cursor: pointer; }
svg[viewBox="0 0 24 24"] { width: 22px; height: 22px; flex: none; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }

/* ---------- Layout ---------- */
.app { height: 100dvh; display: grid; grid-template-rows: var(--top) 1fr; grid-template-columns: 1fr; position: relative; overflow: hidden; }
.topbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 0 14px; padding-top: env(safe-area-inset-top); background: var(--surface); border-bottom: 1px solid var(--line); z-index: 1001; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; min-width: 0; }
.logo-slot { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; overflow: hidden; flex: none; }
.logo-slot img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong { font-size: 16px; font-weight: 750; letter-spacing: -.01em; white-space: nowrap; }
.brand-text small { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn { width: 44px; height: 44px; border: 0; background: transparent; border-radius: 12px; display: grid; place-items: center; color: var(--ink-2); }
.icon-btn:hover { background: var(--surface-2); }
.rt-pill { height: 32px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.rt-pill i { width: 8px; height: 8px; border-radius: 50%; background: #9aa1ab; }
.rt-pill.live i { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); animation: pulse 2s infinite; }
.rt-pill.demo { background: var(--warn-soft); border-color: #f3d9a6; color: #7a4a00; }
.rt-pill.demo i { background: #e39b1b; }
.rt-pill.down i { background: var(--bad); }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px transparent; } }

.map-wrap { position: absolute; inset: var(--top) 0 0 0; z-index: 1; }
#map { position: absolute; inset: 0; background: #e9ecef; }
#map.notiles { background-color: #eef0f3; background-image: linear-gradient(#e2e5e9 1px, transparent 1px), linear-gradient(90deg, #e2e5e9 1px, transparent 1px); background-size: 48px 48px; }

/* Mobile: hoja inferior sobre el mapa */
.panel { position: absolute; left: 0; right: 0; bottom: 0; top: calc(var(--top) + 34vh); z-index: 1000; background: var(--surface); border-radius: 20px 20px 0 0; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; transition: top .28s cubic-bezier(.2,.8,.2,1); padding-bottom: calc(var(--tabs) + env(safe-area-inset-bottom)); }
.app.sheet-min .panel { top: calc(100dvh - 150px - var(--tabs) - env(safe-area-inset-bottom)); }
.app.sheet-max .panel { top: calc(var(--top) + 8px); }
.sheet-handle { height: 28px; width: 100%; border: 0; background: transparent; display: grid; place-items: center; flex: none; touch-action: none; cursor: grab; -webkit-user-select: none; user-select: none; }
.sheet-handle:active { cursor: grabbing; }
.sheet-handle span { width: 40px; height: 5px; border-radius: 9px; background: #d5d9df; }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--tabs) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface); border-top: 1px solid var(--line); z-index: 1002; }
.tabs button { border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 12px; font-weight: 600; color: var(--muted); min-height: 44px; }
.tabs button[aria-selected="true"] { color: var(--accent); }
.view { flex: 1; overflow-y: auto; padding: 4px 16px 24px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.map-btn { position: absolute; right: 12px; z-index: 900; width: 46px; height: 46px; border-radius: 14px; border: 0; background: var(--surface); box-shadow: var(--shadow); display: grid; place-items: center; color: var(--ink-2); }
.map-btn.locate { top: 12px; }
.map-area { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 900; height: 40px; padding: 0 16px; border-radius: 99px; border: 0; background: var(--ink); color: #fff; font-weight: 600; font-size: 13.5px; display: inline-flex; align-items: center; gap: 8px; box-shadow: var(--shadow-lg); }
.map-area svg { width: 18px; height: 18px; }
.map-chip { position: absolute; left: 12px; top: 12px; z-index: 900; max-width: calc(100% - 140px); background: rgba(20,23,28,.86); color: #fff; font-size: 12.5px; font-weight: 600; padding: 7px 12px; border-radius: 10px; }

@media (min-width: 960px) {
  .app { grid-template-columns: var(--panel-w) 1fr; }
  .map-wrap { inset: var(--top) 0 0 var(--panel-w); }
  .panel, .app.sheet-min .panel, .app.sheet-max .panel { position: relative; top: auto; left: auto; right: auto; bottom: auto; grid-row: 2; grid-column: 1; border-radius: 0; box-shadow: none; border-right: 1px solid var(--line); padding-bottom: 0; min-height: 0; }
  .sheet-handle { display: none; }
  .tabs { position: static; height: 56px; padding: 6px 12px 0; border-top: 0; border-bottom: 1px solid var(--line); gap: 4px; }
  .tabs button { flex-direction: row; gap: 8px; font-size: 14px; border-radius: 10px 10px 0 0; border-bottom: 2.5px solid transparent; }
  .tabs button[aria-selected="true"] { border-bottom-color: var(--accent); }
  .tabs svg { width: 19px; height: 19px; }
  .view { padding: 8px 20px 32px; }
  .topbar { padding: 0 20px; }
}

/* ---------- Componentes ---------- */
.banner { display: flex; align-items: center; gap: 4px; margin: 8px 16px 0; padding: 4px 4px 4px 12px; border-radius: var(--r-sm); background: var(--warn-soft); color: #6b4100; font-size: 13px; line-height: 1.35; }
.v-head { display: flex; align-items: center; gap: 8px; padding: 8px 0 10px; position: sticky; top: -4px; background: var(--surface); z-index: 5; }
.v-head h2 { font-size: 19px; font-weight: 750; letter-spacing: -.015em; margin: 0; line-height: 1.2; }
.v-head .sub { font-size: 13px; color: var(--muted); margin-top: 2px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.v-head .titles { min-width: 0; flex: 1; }
.back { width: 40px; height: 40px; margin-left: -8px; border: 0; background: transparent; border-radius: 12px; display: grid; place-items: center; flex: none; }
.back:hover { background: var(--surface-2); }
.section-title { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; display: flex; justify-content: space-between; align-items: center; }
.section-title button { border: 0; background: none; color: var(--accent); font-size: 12.5px; font-weight: 600; text-transform: none; letter-spacing: 0; padding: 6px 0; }
.muted { color: var(--muted); }
.code { font-variant-numeric: tabular-nums; font-size: 12px; font-weight: 650; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; color: var(--ink-2); }
.btn { min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 650; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.block { width: 100%; }
.btn svg { width: 19px; height: 19px; }

.search-box { position: relative; margin: 6px 0 4px; }
.search-box input { width: 100%; height: 52px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface-2); padding: 0 44px 0 46px; font: inherit; font-size: 16px; color: var(--ink); }
.search-box input:focus { outline: none; border-color: var(--ink); background: var(--surface); }
.search-box > svg { position: absolute; left: 14px; top: 15px; color: var(--muted); }
.search-box .clear { position: absolute; right: 4px; top: 4px; }
.hints { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 2px; }
.hint-chip { height: 34px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 600; color: var(--ink-2); }

.list { display: flex; flex-direction: column; }
.item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 10px 4px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; }
.item:hover { background: var(--surface-2); }
.ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); flex: none; }
.ic.station { background: var(--accent-soft); color: var(--accent); }
.ic svg { width: 20px; height: 20px; }
.item .t { flex: 1; min-width: 0; }
.item .t b { display: block; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .t span { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .r { text-align: right; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.item .r b { display: block; color: var(--ink); font-size: 15px; }
.item > svg:last-child { color: #b3b9c2; width: 18px; }

.badge { display: inline-grid; place-items: center; min-width: 46px; height: 34px; padding: 0 8px; border-radius: 8px; background: var(--c, var(--accent)); color: #fff; font-weight: 800; font-size: 15.5px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; flex: none; }
.badge.lg { min-width: 64px; height: 46px; font-size: 21px; border-radius: 11px; }
.badge.sm { min-width: 36px; height: 24px; font-size: 12.5px; border-radius: 6px; }

/* Llegadas */
.arr { border-bottom: 1px solid var(--line); }
.arr-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 68px; padding: 10px 2px; border: 0; background: transparent; text-align: left; }
.arr-row .t { flex: 1; min-width: 0; }
.arr-row .dest { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-top: 2px; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: #a3aab3; }
.status.official i, .status.live i { background: var(--ok); }
.status.official, .status.live { color: var(--ok); }
.status.gps i { background: var(--info); } .status.gps { color: var(--info); }
.status.demo i { background: #e39b1b; } .status.demo { color: #8a5600; }
.eta { text-align: right; flex: none; font-variant-numeric: tabular-nums; min-width: 64px; }
.eta b { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1; display: block; }
.eta small { font-size: 12px; color: var(--muted); font-weight: 600; }
.eta.now b { color: var(--ok); font-size: 20px; }
.eta.none b { font-size: 14px; color: var(--muted); font-weight: 600; }
.arr-more { padding: 0 2px 14px 58px; display: flex; flex-direction: column; gap: 10px; }
.next-list { display: flex; gap: 8px; flex-wrap: wrap; }
.bus-card { background: var(--surface-2); border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: var(--r-sm); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.bus-art { background: #fff; border-radius: 8px; padding: 8px; display: flex; justify-content: center; align-items: flex-end; }
.bus-pic { display: block; width: 100%; height: auto; }
.bus-card.compact { margin: 4px 0 12px; }
.bus-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.bus-title b { font-size: 15px; font-weight: 700; }
.bus-title span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.bus-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 13px; color: var(--ink-2); line-height: 1.35; }
.bus-facts li { display: flex; gap: 8px; align-items: flex-start; }
.bus-facts svg { width: 16px; height: 16px; flex: none; margin-top: 1px; color: var(--muted); }
.next-list span { font-size: 13px; font-weight: 650; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 4px 9px; font-variant-numeric: tabular-nums; }
.meta { font-size: 12.5px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; }
.meta span { display: inline-flex; gap: 5px; align-items: center; }
.meta svg { width: 15px; height: 15px; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { height: 36px; padding: 0 12px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex: none; }
.chip[aria-pressed="true"] { border-color: var(--c, var(--ink)); background: color-mix(in srgb, var(--c, var(--ink)) 10%, white); color: var(--ink); }
.chip i { width: 9px; height: 9px; border-radius: 3px; background: var(--c); }

.hero { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; background: var(--surface); box-shadow: var(--shadow); margin: 6px 0 4px; }
.ic.lg { width: 44px; height: 44px; border-radius: 12px; }
.eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.hero-top { display: flex; align-items: flex-start; gap: 12px; }
.hero h3 { margin: 0; font-size: 17px; font-weight: 750; letter-spacing: -.01em; }
.hero .meta { margin-top: 4px; }
.hero .arr:last-child { border-bottom: 0; }
.hero-cta { margin-top: 6px; }
.notice { font-size: 12.5px; color: var(--muted); background: var(--surface-2); border-radius: var(--r-sm); padding: 9px 11px; margin: 10px 0; line-height: 1.4; }
.updated { font-size: 12px; color: var(--muted); text-align: center; margin: 14px 0 0; font-variant-numeric: tabular-nums; }

/* Ruta */
.dir-switch { display: flex; gap: 8px; margin: 2px 0 10px; }
.dir-switch button { flex: 1; min-height: 46px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 650; font-size: 13.5px; text-align: left; padding: 6px 12px; line-height: 1.2; }
.dir-switch button small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.dir-switch button[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.facts { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 6px; }
.fact { font-size: 12.5px; font-weight: 600; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 5px 9px; display: inline-flex; gap: 6px; align-items: center; }
.fact svg { width: 15px; height: 15px; }
.plan { border-radius: var(--r); padding: 14px; margin: 8px 0 6px; border: 1.5px solid; }
.plan.catch { background: var(--ok-soft); border-color: #bfe3cb; }
.plan.tight { background: var(--warn-soft); border-color: #f3d9a6; }
.plan.miss, .plan.none { background: var(--surface-2); border-color: var(--line); }
.plan .k { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.plan .big { font-size: 17px; font-weight: 750; margin: 4px 0 6px; letter-spacing: -.01em; line-height: 1.3; }
.plan .steps { display: grid; grid-template-columns: auto 1fr auto; gap: 6px 10px; align-items: center; font-size: 14px; }
.plan .steps svg { width: 18px; height: 18px; color: var(--ink-2); }
.plan .steps b { font-variant-numeric: tabular-nums; }
.plan .btn { margin-top: 12px; }

.timeline { position: relative; margin: 6px 0 0; }
.tl-stop { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 8px 2px 8px 0; border: 0; background: transparent; text-align: left; }
.tl-stop::before { content: ''; position: absolute; left: 15px; top: 0; bottom: 0; width: 4px; background: var(--c); opacity: .9; }
.tl-stop:first-child::before { top: 50%; } .tl-stop:last-child::before { bottom: 50%; }
.tl-dot { position: relative; z-index: 1; width: 34px; display: grid; place-items: center; flex: none; }
.tl-dot i { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--c); }
.tl-stop.best .tl-dot i { width: 20px; height: 20px; border-width: 5px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 25%, transparent); border-color: var(--ok); }
.tl-stop.far { opacity: .62; }
.tl-stop .t { flex: 1; min-width: 0; }
.tl-stop .t b { display: block; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-stop .t span { font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.tl-stop .t span svg { width: 14px; height: 14px; }
.tl-bus { position: relative; display: flex; align-items: center; gap: 12px; min-height: 34px; padding-left: 0; font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.tl-bus::before { content: ''; position: absolute; left: 15px; top: 0; bottom: 0; width: 4px; background: var(--c); }
.tl-bus .bi { position: relative; z-index: 1; width: 34px; display: grid; place-items: center; }
.tl-bus .bi span { width: 26px; height: 26px; border-radius: 8px; background: var(--c); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 3px #fff; }
.tl-bus .bi svg { width: 16px; height: 16px; }
.tag { font-size: 12px; font-weight: 700; border-radius: 7px; padding: 4px 8px; white-space: nowrap; display: inline-block; }
.tag.catch { background: var(--ok-soft); color: var(--ok); }
.tag.tight { background: var(--warn-soft); color: var(--warn); }
.tag.miss { background: var(--bad-soft); color: var(--bad); }
.tag.none { background: var(--surface-2); color: var(--muted); }
.tl-right { text-align: right; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-variant-numeric: tabular-nums; }
.tl-right b { font-size: 17px; font-weight: 800; }
.tl-right b small { font-size: 11.5px; color: var(--muted); font-weight: 600; margin-left: 2px; }

.empty { text-align: center; padding: 28px 12px; color: var(--muted); }
.empty svg { width: 40px; height: 40px; color: #b8bec6; margin-bottom: 8px; }
.empty b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }
.empty .btn { margin-top: 14px; }
.skel { height: 60px; border-radius: 12px; margin: 8px 0; background: linear-gradient(90deg, #f0f2f4 25%, #f8f9fa 37%, #f0f2f4 63%); background-size: 400% 100%; animation: sk 1.3s infinite; }
@keyframes sk { to { background-position: -100% 0; } }

/* Mapa */
.leaflet-container { font-family: var(--font); }
.leaflet-tile-pane { filter: saturate(.75) brightness(1.03); }
.leaflet-control-attribution { font-size: 10.5px; }
.stop-pin { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid #39414b; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.stop-pin.station { width: 22px; height: 22px; border-radius: 7px; background: var(--accent); border: 2.5px solid #fff; display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 800; }
.stop-pin.sel { transform: scale(1.35); border-color: var(--ink); box-shadow: 0 0 0 5px rgba(20,23,28,.18); }
.stop-pin.best { border-color: var(--ok); box-shadow: 0 0 0 6px rgba(23,128,61,.25); }
.stop-pin.onroute { width: 13px; height: 13px; border-width: 3px; border-color: var(--c); }
.bus-pin { position: relative; width: 34px; height: 34px; }
.bus-pin .arrow { position: absolute; inset: -9px; display: grid; place-items: start center; }
.bus-pin .arrow::before { content: ''; width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 9px solid var(--c); }
.bus-pin .body { position: absolute; inset: 3px; border-radius: 9px; background: var(--c); border: 2.5px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); display: grid; place-items: center; color: #fff; }
.bus-pin .body svg { width: 16px; height: 16px; }
.bus-pin .lbl { position: absolute; left: 50%; top: 36px; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 10.5px; font-weight: 750; border-radius: 5px; padding: 1px 5px; white-space: nowrap; }
.me-pin { width: 20px; height: 20px; border-radius: 50%; background: #1a73e8; border: 3.5px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.08), 0 0 0 10px rgba(26,115,232,.18); }
.me-pin.demo { background: #e39b1b; box-shadow: 0 0 0 1px rgba(0,0,0,.08), 0 0 0 10px rgba(227,155,27,.2); }
.leaflet-popup-content-wrapper { border-radius: 12px; box-shadow: var(--shadow-lg); }
.leaflet-popup-content { margin: 12px 14px; font-size: 13.5px; line-height: 1.4; }
.pop b { font-size: 14.5px; } .pop .muted { font-size: 12.5px; }
.pop .btn { min-height: 36px; margin-top: 8px; padding: 0 12px; font-size: 13px; }

/* Ajustes */
.sheet-dialog { border: 0; padding: 0; border-radius: 20px; width: min(480px, calc(100vw - 24px)); max-height: calc(100dvh - 40px); box-shadow: var(--shadow-lg); }
.sheet-dialog::backdrop { background: rgba(16,20,26,.45); }
.settings { display: flex; flex-direction: column; }
.settings header { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 4px 20px; }
.settings h2 { margin: 0; font-size: 19px; }
.settings fieldset { border: 0; margin: 0; padding: 10px 20px; }
.settings legend { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; padding: 0; }
.settings input[type=text] { width: 100%; height: 46px; border-radius: 12px; border: 1.5px solid var(--line); padding: 0 12px; font: inherit; font-size: 14px; }
.settings footer { padding: 12px 20px 20px; }
.settings footer .btn { width: 100%; }
.hint { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; }
.seg { display: flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 3px; }
.seg label { flex: 1; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: grid; place-items: center; min-height: 40px; border-radius: 9px; font-weight: 650; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.seg input:checked + span { background: var(--surface); box-shadow: var(--shadow); color: var(--ink); }
.seg input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.diag { font-size: 13px; background: var(--surface-2); border-radius: 12px; padding: 10px 12px; line-height: 1.6; font-variant-numeric: tabular-nums; word-break: break-word; }
.diag code { font-size: 12px; }

.banner .icon-btn { width: 36px; height: 36px; flex: none; color: #8a5600; margin-left: auto; }
.banner .icon-btn svg { width: 18px; height: 18px; }
