/* Diseño: mapa a pantalla completa, controles flotantes redondeados, botones píldora azules y un botón grande de Reportar. */
:root {
  --bg: #f1f6fa; --surface: #ffffff; --ink: #202124; --muted: #5f6b76; --line: #dbe5ec;
  --brand: #0b72dc; --brand-2: #33ccff; --brand-ink: #ffffff; --brand-soft: #e1f0ff;
  --libre: #0b7d47; --ocupado: #c25400; --fila: #f5b800; --danado: #c8242f; --nodata: #667480;
  --shadow: 0 6px 20px rgba(20, 50, 80, .18);
  --sea: #bfe3f5; --land: #eaf0f5; --casing: #c6d1da; --road: #ffffff; --hwy: #ffe39a; --hwycase: #e0bf5c; --park: #d9eadd;
}
:root[data-theme="dark"] {
  --bg: #121c28; --surface: #1c2a3a; --ink: #eef4fa; --muted: #9fb0c0; --line: #2c3e52;
  --brand: #3bb0ff; --brand-2: #33ccff; --brand-ink: #05253d; --brand-soft: #173a56;
  --sea: #0f3550; --land: #1b2735; --casing: #121b26; --road: #3a4c61; --hwy: #7a6a3a; --hwycase: #3a3118;
  --shadow: 0 6px 20px rgba(0, 0, 0, .5);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121c28; --surface: #1c2a3a; --ink: #eef4fa; --muted: #9fb0c0; --line: #2c3e52;
    --brand: #3bb0ff; --brand-2: #33ccff; --brand-ink: #05253d; --brand-soft: #173a56;
    --sea: #0f3550; --land: #1b2735; --casing: #121b26; --road: #3a4c61; --hwy: #7a6a3a; --hwycase: #3a3118;
    --shadow: 0 6px 20px rgba(0, 0, 0, .5);
  }
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.4 "Nunito", system-ui, sans-serif; font-weight: 600; -webkit-font-smoothing: antialiased; }
button { font: inherit; font-weight: 800; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.app { max-width: 480px; margin: 0 auto; height: 100%; display: flex; flex-direction: column; position: relative; background: var(--bg); overflow: hidden; }
@media (min-width: 560px) { .app { box-shadow: 0 0 0 1px var(--line), var(--shadow); } }

/* barra flotante superior */
.top { position: absolute; z-index: 6; left: 12px; right: 12px; top: 12px; display: flex; align-items: center; gap: 8px; pointer-events: none; }
.top > * { pointer-events: auto; }
.logo { display: flex; align-items: center; gap: 8px; background: var(--surface); border-radius: 999px; padding: 8px 14px 8px 8px; box-shadow: var(--shadow); font-weight: 900; font-size: 17px; letter-spacing: -.01em; }
.logo .demo { font-size: 9.5px; padding: 2px 6px; margin-left: 2px; }
.logo .dot { width: 30px; height: 30px; border-radius: 50%; background: var(--brand); display: grid; place-items: center; }
.logo .dot svg { width: 16px; height: 16px; fill: #fff; }
.demo { background: var(--ink); color: var(--bg); font-size: 11px; font-weight: 900; padding: 4px 9px; border-radius: 999px; letter-spacing: .06em; }
.sp { flex: 1; }
.lvl { white-space: nowrap; background: var(--surface); border-radius: 999px; padding: 7px 12px; box-shadow: var(--shadow); font-size: 13px; font-weight: 900; display: flex; align-items: center; gap: 6px; }
.lvl i { width: 10px; height: 10px; border-radius: 50%; background: var(--fila); }
.fab-s { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--surface); box-shadow: var(--shadow); font-size: 18px; display: grid; place-items: center; padding: 0; }

.view { flex: 1; min-height: 0; position: relative; overflow-y: auto; padding-top: 70px; }
.view.map { overflow: hidden; padding-top: 0; }
.nav { position: absolute; z-index: 6; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; background: var(--surface); border-radius: 999px; box-shadow: var(--shadow); padding: 5px; }
.nav button { border: 0; background: none; padding: 7px 2px; font-size: 11.5px; flex-direction: column; gap: 1px; font-weight: 800; color: var(--muted); border-radius: 999px; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.nav button svg { width: 20px; height: 20px; fill: currentColor; }
.nav button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav button[aria-current="page"] { background: var(--brand); color: var(--brand-ink); }
.view:not(.map) { padding-bottom: 90px; }

/* mapa */
#mapsvg { width: 100%; height: 100%; display: block; touch-action: none; background: var(--land); cursor: grab; }
#mapsvg:active { cursor: grabbing; }
.zoom { position: absolute; right: 12px; top: 124px; display: flex; flex-direction: column; gap: 8px; z-index: 4; }
.zoom button { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--surface); box-shadow: var(--shadow); font-size: 20px; display: grid; place-items: center; padding: 0; }
.attr { position: absolute; left: 14px; bottom: 134px; font-size: 10px; color: var(--muted); background: color-mix(in srgb, var(--surface) 85%, transparent); padding: 1px 7px; border-radius: 8px; z-index: 3; }
.pin { cursor: pointer; }
.pin:focus-visible path.body { stroke: var(--ink); stroke-width: 3; }
.fab { position: absolute; z-index: 5; right: 14px; bottom: 140px; border: 0; background: var(--brand); color: var(--brand-ink); border-radius: 999px; padding: 0 20px 0 14px; height: 56px; box-shadow: var(--shadow); font-size: 16px; font-weight: 900; display: flex; align-items: center; gap: 8px; }
.fab svg { width: 26px; height: 26px; fill: currentColor; }

/* hoja de estación */
.sheet { position: absolute; z-index: 7; left: 0; right: 0; bottom: 0; background: var(--surface); border-radius: 26px 26px 0 0; box-shadow: 0 -10px 34px rgba(20, 50, 80, .25); padding: 10px 16px max(18px, env(safe-area-inset-bottom)); max-height: 80%; overflow-y: auto; }
.sheet[hidden], .modal[hidden] { display: none; }
.sheet::before { content: ""; display: block; width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 10px; }
.sheet h2 { margin: 0 0 2px; font-size: 20px; font-weight: 900; letter-spacing: -.01em; padding-right: 44px; }
.sheet .close, .modal .close { position: absolute; right: 12px; top: 14px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--bg); font-size: 16px; display: grid; place-items: center; padding: 0; }
.sub { color: var(--muted); font-size: 13px; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-weight: 900; font-size: 15px; padding: 6px 14px; border-radius: 999px; color: #fff; margin: 10px 6px 4px 0; }
.meta { font-size: 13px; color: var(--muted); }
.tag { display: inline-block; font-size: 11px; font-weight: 900; border-radius: 999px; padding: 3px 9px; background: var(--brand-soft); color: var(--ink); margin-right: 4px; }
.tag.sim { background: #fff1c2; color: #5b4500; }
.tag.off { background: #cfe3ff; color: #0e2d63; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.fact { background: var(--bg); border-radius: 18px; padding: 10px 12px; }
.fact b { display: block; font-size: 18px; font-weight: 900; letter-spacing: -.02em; }
.fact small { color: var(--muted); font-size: 11px; }
.nodata { color: var(--muted); font-style: normal; }
.est { background: var(--brand-soft); border-radius: 20px; padding: 12px 14px; margin-top: 12px; }
.est b { font-size: 16px; font-weight: 900; }
h3 { font-size: 14px; margin: 16px 0 4px; font-weight: 900; }
.srcs { font-size: 12px; color: var(--muted); margin: 8px 0 0; padding-left: 16px; }
.btn { border: 0; background: var(--brand); color: var(--brand-ink); font-weight: 900; padding: 12px 20px; border-radius: 999px; min-height: 46px; }
.btn.block { width: 100%; margin-top: 12px; }
.btn.ghost { background: var(--brand-soft); color: var(--brand); box-shadow: none; }

/* menú de reporte */
.modal { position: absolute; z-index: 8; inset: 0; background: rgba(10, 25, 40, .45); display: flex; align-items: flex-end; }
.modal .panel { position: relative; width: 100%; background: var(--surface); border-radius: 26px 26px 0 0; padding: 18px 16px max(20px, env(safe-area-inset-bottom)); max-height: 88%; overflow-y: auto; }
.modal h2 { margin: 0 0 2px; font-size: 20px; font-weight: 900; padding-right: 44px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.tile { border: 0; background: var(--bg); border-radius: 22px; padding: 16px 8px 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 15px; font-weight: 900; min-height: 112px; }
.tile .ic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; }
.tile .ic svg { width: 28px; height: 28px; fill: currentColor; }
.pick { display: grid; gap: 8px; margin-top: 12px; }
.pick button { text-align: left; border: 0; background: var(--bg); border-radius: 18px; padding: 12px 14px; min-height: 52px; }

/* pestañas internas */
.pad { padding: 4px 14px 14px; display: grid; gap: 12px; }
.card { background: var(--surface); border-radius: 24px; padding: 16px; box-shadow: 0 2px 10px rgba(20, 50, 80, .08); }
.card h2 { margin: 0 0 6px; font-size: 17px; font-weight: 900; }
.ring { display: grid; place-items: center; position: relative; }
.ring svg { width: 170px; height: 170px; }
.ring .num { position: absolute; text-align: center; }
.ring .num b { font-size: 44px; font-weight: 900; letter-spacing: -.04em; display: block; line-height: 1; }
label { font-weight: 800; font-size: 13px; display: block; margin: 10px 0 4px; }
input[type=range] { width: 100%; accent-color: var(--brand); min-height: 32px; }
input[type=number] { width: 100%; padding: 10px 14px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 800; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 800; font-size: 12px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.ladder { display: grid; gap: 6px; margin: 8px 0; padding: 0; list-style: none; counter-reset: n; }
.ladder li { counter-increment: n; background: var(--bg); border-radius: 18px; padding: 10px 12px 10px 46px; position: relative; font-size: 13px; }
.ladder li::before { content: counter(n); position: absolute; left: 10px; top: 9px; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-weight: 900; display: grid; place-items: center; font-size: 13px; }
.notice { background: #fff6d6; color: #4d3a00; border-radius: 18px; padding: 10px 14px; font-size: 13px; }
:root[data-theme="dark"] .notice { background: #3b3306; color: #ffe9a0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .notice { background: #3b3306; color: #ffe9a0; } }
.toast { position: absolute; left: 16px; right: 16px; bottom: 200px; background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 20px; font-weight: 800; z-index: 9; box-shadow: var(--shadow); }
.toast[hidden] { display: none; }
@media (max-width: 400px) { .logo { font-size: 15px; padding-right: 11px; } .lvl { font-size: 12px; padding: 6px 10px; } .top { gap: 6px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* filtros */
.chips { position: absolute; z-index: 5; left: 0; right: 0; top: 62px; display: flex; gap: 8px; overflow-x: auto; padding: 4px 12px 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 0; background: var(--surface); box-shadow: var(--shadow); border-radius: 999px; padding: 0 14px; min-height: 40px; font-size: 14px; font-weight: 800; }
.chip.on { background: var(--brand); color: var(--brand-ink); }
.chip.clear { background: var(--ink); color: var(--bg); }
.fpanel { position: absolute; z-index: 6; left: 12px; right: 12px; top: 112px; background: var(--surface); border-radius: 22px; box-shadow: var(--shadow); padding: 12px 14px; }
.fpanel .ft { font-weight: 900; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.pill { border: 0; background: var(--bg); border-radius: 999px; padding: 0 14px; min-height: 40px; font-size: 14px; font-weight: 800; box-shadow: inset 0 0 0 2px var(--line); }
.pill.on { background: var(--brand); color: var(--brand-ink); box-shadow: none; }
.zonebar { position: absolute; z-index: 5; left: 12px; right: 12px; bottom: 80px; height: 48px; border: 0; background: var(--surface); box-shadow: var(--shadow); border-radius: 24px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; font-size: 15px; font-weight: 800; }
.zonebar .more { color: var(--brand); font-weight: 900; }
.zonebar b { font-size: 17px; }

/* ficha */
a.btn { display: block; text-align: center; text-decoration: none; line-height: 22px; padding: 12px 20px; }
.rowh { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.link { border: 0; background: none; color: var(--brand); font-weight: 900; padding: 8px 0; min-height: 40px; }
.ch { display: grid; grid-template-columns: 1.1fr .8fr 1fr; gap: 4px 8px; align-items: center; background: var(--bg); border-radius: 18px; padding: 10px 14px; margin-bottom: 8px; }
.ch .chs { grid-column: 1 / -1; }
.ch .chk, .ch .chp { font-weight: 800; }

/* modales extra */
.leg { display: flex; gap: 12px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.leg > div { flex: 1; min-width: 160px; font-size: 14px; }
.mini { flex: none; color: #fff; font-weight: 900; font-size: 14px; border-radius: 999px; padding: 6px 12px; min-width: 96px; text-align: center; }
.dots { flex: none; display: flex; gap: 4px; min-width: 96px; }
.dots i { width: 16px; height: 16px; border-radius: 50%; display: inline-block; }
.pick .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; }
select, input[type=text] { width: 100%; padding: 10px 14px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 800; min-height: 44px; }
.opt { display: flex; gap: 10px; align-items: flex-start; background: var(--bg); border-radius: 18px; padding: 10px 14px; margin: 8px 0 0; font-weight: 600; }
.opt input { margin-top: 4px; width: 20px; height: 20px; accent-color: var(--brand); flex: none; }

/* pantalla de crear carro */
.flow { position: absolute; z-index: 20; inset: 0; background: var(--bg); display: flex; flex-direction: column; }
.flow[hidden] { display: none; }
.fhead { display: flex; align-items: center; gap: 12px; padding: 14px 14px 10px; border-bottom: 1px solid var(--line); background: var(--surface); }
.fhead h2 { margin: 0; font-size: 18px; font-weight: 900; }
.fback { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--bg); font-size: 18px; display: grid; place-items: center; padding: 0; flex: none; }
.fbody { flex: 1; overflow-y: auto; padding: 14px; display: grid; gap: 10px; align-content: start; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
.frow { text-align: left; border: 0; background: var(--surface); border-radius: 20px; padding: 12px 16px; min-height: 60px; display: flex; align-items: center; gap: 12px; box-shadow: 0 2px 8px rgba(20,50,80,.08); width: 100%; }
.frow .ini { flex: none; width: 44px; height: 44px; border-radius: 14px; background: var(--brand-soft); display: grid; place-items: center; font-weight: 900; }
.frow .tx { flex: 1; min-width: 0; }
.frow .tx b { display: block; overflow: hidden; text-overflow: ellipsis; }
.frow .go { color: var(--muted); font-size: 20px; }
.fsearch { width: 100%; }
.fgrid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.vsheet { position: absolute; left: 0; right: 0; bottom: 0; background: var(--surface); border-radius: 26px 26px 0 0; padding: 14px 16px max(18px, env(safe-area-inset-bottom)); box-shadow: 0 -10px 34px rgba(20,50,80,.25); max-height: 70%; overflow-y: auto; }
.vsheet h3 { text-align: center; font-size: 17px; margin: 4px 0 10px; }
.vrow { display: block; width: 100%; text-align: left; border: 0; background: var(--bg); border-radius: 18px; padding: 12px 14px; margin-bottom: 8px; min-height: 56px; }
.ok { background: var(--brand-soft); border-radius: 18px; padding: 12px 14px; font-size: 14px; }
.garage { display: grid; gap: 8px; margin-top: 8px; }
.gitem { display: flex; align-items: center; gap: 8px; background: var(--bg); border-radius: 18px; padding: 10px 12px; }
.gitem .tx { flex: 1; min-width: 0; }
.gitem .sm { border: 0; background: var(--surface); border-radius: 999px; padding: 0 12px; min-height: 36px; font-size: 13px; box-shadow: inset 0 0 0 2px var(--line); }
.gitem.on { box-shadow: inset 0 0 0 2px var(--brand); }
.heart { border: 0; background: var(--bg); width: 38px; height: 38px; border-radius: 50%; font-size: 18px; display: grid; place-items: center; padding: 0; }
.sheet .heart { position: absolute; right: 56px; top: 14px; }
.rt { display: grid; gap: 8px; }
.rt label { margin: 0; }
.rt select { width: 100%; }

.ub { background: var(--bg); border-radius: 16px; padding: 10px 12px; margin-top: 8px; font-size: 14px; }

.ico { display: inline-block; vertical-align: -3px; flex: none; }
.chip .ico { vertical-align: -2px; }
.zonebar .more { display: inline-flex; align-items: center; gap: 2px; }
.fback .ico, .go .ico, .frow .ini .ico { display: block; }
.btn .ico { vertical-align: -4px; }

/* Ruta */
.rh { margin: 4px 0 4px; font-size: 26px; font-weight: 900; letter-spacing: -.02em; }
.rf { display: flex; align-items: center; gap: 8px; }
.rf input { flex: 1; min-width: 0; }
.rdot { flex: none; width: 12px; height: 12px; border-radius: 50%; border: 3px solid var(--libre); }
.rdot.d { border-color: var(--ink); background: var(--ink); }
.ib { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--bg); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.ib:disabled { opacity: .4; cursor: default; }
.sug { display: grid; gap: 4px; background: var(--bg); border-radius: 18px; padding: 6px; }
.sug[hidden] { display: none; }
.sug button { text-align: left; border: 0; background: transparent; border-radius: 12px; padding: 9px 12px; color: var(--ink); font: inherit; cursor: pointer; }
.sug button:hover, .sug button:focus-visible { background: var(--surface); }
.sug .meta { padding: 8px 12px; }
.plcs { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.plc { display: inline-flex; align-items: center; background: var(--brand-soft); border-radius: 999px; max-width: 100%; }
.plc button { border: 0; background: transparent; color: var(--ink); font: inherit; font-weight: 800; font-size: 13px; padding: 7px 4px 7px 12px; cursor: pointer; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plc button.x { padding: 7px 10px 7px 4px; opacity: .6; }
.big { font-size: 26px; color: var(--brand); }
.qb { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; }
.qb button { border: 0; border-radius: 14px; min-height: 44px; background: var(--bg); color: var(--ink); font: inherit; font-weight: 800; cursor: pointer; }
.qb button.on { background: var(--brand); color: var(--brand-ink); }
.rmap { display: block; width: 100%; height: auto; max-width: 100%; background: var(--bg); border-radius: 18px; }
.stop { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.stop:first-of-type { border-top: 0; }
.stop .num { flex: none; width: 28px; height: 28px; border-radius: 50%; background: #ffc21a; color: #1c1500; font-weight: 900; display: grid; place-items: center; }
.stop .tx { min-width: 0; }
details.rinfo summary { cursor: pointer; font-weight: 800; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.rinfo summary::after { content: "+"; font-size: 20px; font-weight: 900; }
details.rinfo[open] summary::after { content: "–"; }
details.rinfo summary::-webkit-details-marker { display: none; }

/* socio fundador */
.tag.socio { background: #ffc21a; color: #1c1500; }
.photos { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -2px 10px; padding: 2px; }
.photos .foto { flex: none; width: 78%; max-width: 280px; height: auto; border-radius: 16px; scroll-snap-align: start; }
.promo { background: var(--brand-soft); border-radius: 14px; padding: 10px 12px; margin: 8px 0; font-size: 14px; }

/* predicción e informe */
.pred { background: var(--bg); border-radius: 16px; padding: 10px 12px; margin: 8px 0; }
.pred .rowh { align-items: center; }
.pbars { display: block; width: 100%; height: auto; max-width: 100%; margin: 8px 0 4px; }

/* reseñas */
.rv { margin-top: 12px; }
.rvtags { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.rvi { background: var(--bg); border-radius: 14px; padding: 8px 12px; margin-top: 6px; font-size: 14px; }
.rvs { color: #e0a100; letter-spacing: 1px; }
.stars { display: flex; gap: 6px; margin-top: 10px; }
.stars button { flex: 1; min-height: 48px; border: 0; border-radius: 14px; background: var(--bg); color: var(--line); font-size: 26px; cursor: pointer; }
.stars button.on { color: #ffc21a; background: var(--brand-soft); }
.tagsel { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tagsel label { margin: 0; }
.tagsel input { position: absolute; opacity: 0; pointer-events: none; }
.tagsel span { display: inline-block; padding: 8px 12px; border-radius: 999px; background: var(--bg); font-weight: 800; font-size: 13px; cursor: pointer; border: 2px solid transparent; }
.tagsel input:checked + span { background: var(--brand-soft); border-color: var(--brand); }
.tagsel input:focus-visible + span { outline: 3px solid var(--sun); outline-offset: 2px; }
textarea { width: 100%; padding: 10px 14px; border-radius: 18px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; resize: vertical; }

/* gamificación */
.bigxp { font-size: 44px; font-weight: 900; color: var(--brand); letter-spacing: -.03em; }
.xpbar { height: 12px; border-radius: 999px; background: var(--bg); margin: 12px 0 6px; overflow: hidden; }
.xpbar i { display: block; height: 100%; border-radius: 999px; background: var(--brand); transition: width .6s; }
.mis { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; }
.mis .mk { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--bg); font-weight: 900; font-size: 13px; }
.mis.ok .mk { background: var(--brand); color: var(--brand-ink); }
.logros { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.logro { background: var(--bg); border-radius: 16px; padding: 10px 12px; display: grid; gap: 2px; opacity: .55; }
.logro.on { opacity: 1; background: var(--brand-soft); }
.logro b { font-size: 14px; } .logro span { font-size: 12.5px; color: var(--muted); } .logro i { font-style: normal; font-size: 12px; font-weight: 900; color: var(--brand); }
.rec { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); opacity: .6; }
.rec.on { opacity: 1; }

/* =====================================================================
   Rediseño 2026-10: oscuro y minimalista (mapa MapLibre a pantalla completa,
   búsqueda arriba, botones flotantes y barra inferior Mapa · viaje · Cuenta)
   ===================================================================== */
:root:root:root {
  --bg: #0b0d10; --surface: #15181d; --surface-2: #1d2128; --ink: #f2f4f7; --muted: #9aa4b2; --line: #262b33;
  --brand: #3aa0ff; --brand-2: #33ccff; --brand-ink: #04213f; --brand-soft: #14304f;
  --libre: #2bd47f; --ocupado: #ff9f43; --fila: #ffd23f; --danado: #ff5d6c; --nodata: #8a96a8;
  --shadow: 0 10px 30px rgba(0, 0, 0, .55); color-scheme: dark;
}
html, body { background: var(--bg); overscroll-behavior: none; }
.app { position: fixed; inset: 0; max-width: none; height: 100%; height: 100dvh; display: block; box-shadow: none; }
.map { position: absolute; inset: 0; background: #0c0c0c; }
.maplibregl-ctrl-bottom-left { bottom: calc(env(safe-area-inset-bottom, 0px) + 96px); }
.maplibregl-ctrl-attrib { background: rgba(21, 24, 29, .85) !important; color: var(--muted) !important; font-size: 11px; }
.maplibregl-ctrl-attrib a { color: var(--muted) !important; }
.maplibregl-ctrl-attrib-button { filter: invert(1); }
.nomap { position: absolute; inset: 0; display: grid; place-content: center; gap: 10px; text-align: center; padding: 24px; color: var(--muted); }
.nomap b { color: var(--ink); font-size: 18px; }

/* barra superior */
.topbar { position: absolute; z-index: 15; top: calc(env(safe-area-inset-top, 0px) + 12px); left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); display: flex; gap: 10px; align-items: flex-start; }
body[data-tab]:not([data-tab="mapa"]) .topbar, body[data-tab]:not([data-tab="mapa"]) .rbtns, body[data-tab]:not([data-tab="mapa"]) .binfo { visibility: hidden; }
.tb-btn { flex: none; width: 50px; height: 50px; border-radius: 16px; border: 1px solid var(--line); background: rgba(21, 24, 29, .92); color: var(--ink); display: grid; place-items: center; box-shadow: var(--shadow); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.search { position: relative; flex: 1; min-width: 0; }
.search input { width: 100%; height: 50px; border-radius: 16px; border: 1px solid var(--line); background: rgba(21, 24, 29, .92); color: var(--ink); font: inherit; font-size: 17px; font-weight: 700; padding: 0 64px 0 18px; box-shadow: var(--shadow); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); -webkit-appearance: none; appearance: none; }
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { display: none; }
.demo-tag { position: absolute; right: 12px; top: 15px; font-size: 10px; font-weight: 900; letter-spacing: .08em; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 7px; pointer-events: none; }
.qres { position: absolute; left: 0; right: 0; top: 58px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 6px; display: grid; gap: 2px; max-height: 60vh; overflow-y: auto; }
.qres[hidden] { display: none; }
.qres button { display: flex; gap: 12px; align-items: center; text-align: left; border: 0; background: transparent; border-radius: 12px; padding: 10px; color: var(--ink); }
.qres button:hover, .qres button:focus-visible { background: var(--surface-2); }
.qres b { display: block; font-size: 15px; } .qres small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.qi { flex: none; width: 32px; height: 32px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }

/* botones flotantes de la derecha y barra inferior */
.rbtns { position: absolute; z-index: 14; right: max(12px, env(safe-area-inset-right, 0px)); bottom: calc(env(safe-area-inset-bottom, 0px) + 118px); display: grid; gap: 10px; }
.rbtns .tb-btn { width: 54px; height: 54px; border-radius: 18px; }
.binfo { position: absolute; z-index: 14; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(env(safe-area-inset-bottom, 0px) + 36px); width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(21, 24, 29, .9); color: var(--ink); font-weight: 900; font-family: Georgia, serif; }
.dock { position: absolute; z-index: 40; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom, 0px) + 18px); width: min(440px, calc(100% - 96px)); height: 64px; border-radius: 999px; background: rgba(28, 31, 37, .94); border: 1px solid var(--line); box-shadow: var(--shadow); display: grid; grid-template-columns: 1fr 84px 1fr; align-items: center; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.dock button { border: 0; background: transparent; color: var(--muted); display: grid; justify-items: center; gap: 2px; font-size: 13px; font-weight: 800; padding: 6px 0; }
.dock button svg { width: 24px; height: 24px; }
.dock button[aria-current="page"] { color: var(--ink); }
.dock .center { width: 74px; height: 74px; margin: -26px auto 0; border-radius: 50%; background: #1f232a; border: 1px solid #343a44; box-shadow: 0 10px 30px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .06); display: grid; place-items: center; }
.dock .center svg { width: 30px; height: 30px; fill: none; color: var(--brand); }
.dock .center[aria-current="page"] { background: var(--brand); border-color: var(--brand); }
.dock .center[aria-current="page"] svg { color: #04213f; }
.toast { bottom: calc(env(safe-area-inset-bottom, 0px) + 100px); z-index: 70; position: absolute; background: var(--ink); color: var(--bg); max-width: 520px; margin: 0 auto; }

/* páginas (Cuenta, Viaje, Operadores) */
.view.page { position: absolute; inset: 0; z-index: 20; overflow-y: auto; padding: calc(env(safe-area-inset-top, 0px) + 16px) max(16px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 120px) max(16px, env(safe-area-inset-left, 0px)); background: var(--bg); }
.view.page[hidden] { display: none; }
.view.page > * { max-width: 560px; margin-left: auto; margin-right: auto; }
.view.page .pad { padding: 0; }
.ptitle { font-size: 38px; font-weight: 900; letter-spacing: -.03em; margin: 8px 0 6px; }
.sec { font-size: 13px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 26px 2px 10px; }
.rows { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.rowi { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; border: 0; background: transparent; color: var(--ink); padding: 16px 18px; text-decoration: none; }
.rowi + .rowi { border-top: 1px solid var(--line); }
.rowi > span:first-child, .rowi > span:nth-child(2) { flex: 1; min-width: 0; }
.rowi b { display: block; font-size: 17px; font-weight: 800; }
.rowi small { display: block; color: var(--muted); font-size: 14px; font-weight: 600; margin-top: 2px; }
.rowi .ico { flex: none; color: var(--muted); }
.rowi.static { cursor: default; }
.rv-st { color: var(--muted); font-weight: 700; font-size: 14px; flex: none; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot.big { width: 14px; height: 14px; }
.empty { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 60px 18px; color: var(--muted); }
.empty b { color: var(--ink); font-size: 20px; } .empty .btn { margin-top: 8px; }
.lead2 { color: var(--muted); font-size: 16px; margin: 4px 2px 0; }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 14px; display: grid; gap: 10px; }
.box label { margin: 4px 0 0; font-weight: 800; color: var(--muted); }
.box input[type=text], .box input[type=number], .box textarea { background: var(--surface-2); border-color: transparent; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg button { border: 0; border-radius: 14px; min-height: 48px; background: var(--surface-2); color: var(--ink); }
.seg button.on { background: var(--brand); color: var(--brand-ink); }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; } .thumbs img { width: 76px; height: 76px; object-fit: cover; border-radius: 12px; }
.fchips { display: flex; flex-wrap: wrap; gap: 8px; }
.fc { border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); border-radius: 999px; padding: 9px 14px; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.fc.on { background: var(--brand-soft); border-color: var(--brand); }
.fgrp { margin-top: 12px; } .fgrp .sec { margin: 0 0 8px; }
.leg2 { display: flex; flex-wrap: wrap; gap: 12px; margin: 6px 0; } .leg2 span { display: inline-flex; gap: 6px; align-items: center; font-weight: 800; } .leg2 i { width: 12px; height: 12px; border-radius: 50%; }

/* Cuenta */
.carhero { display: grid; place-items: center; padding: 4px 0 8px; } .carsvg { width: min(340px, 90%); height: auto; }
.carsel { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 14px 18px; color: var(--ink); }
.carsel > span:first-child { flex: 1; min-width: 0; } .carsel small { display: block; color: var(--muted); font-size: 14px; } .carsel b { display: block; font-size: 20px; font-weight: 800; }
.carsel .km { color: var(--muted); font-weight: 700; }
.carlist { margin-top: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.carlist[hidden] { display: none; }
.carlist button { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; border: 0; background: transparent; color: var(--ink); padding: 14px 18px; }
.carlist button + button { border-top: 1px solid var(--line); } .carlist small { display: block; color: var(--muted); font-weight: 600; } .carlist span:first-child { flex: 1; }
.plugs { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 8px; }
.plugb { border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 16px; min-height: 80px; font-size: 13px; display: grid; justify-items: center; align-content: center; gap: 8px; font-size: 14px; }
.plugb.on { color: var(--ink); border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }

/* ficha de estación a pantalla completa */
.det { position: absolute; inset: 0; z-index: 30; overflow-y: auto; background: var(--bg); padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 120px); }
.det[hidden] { display: none; }
.dhero { position: relative; min-height: 300px; }
.dhero .hero { position: absolute; inset: 0; width: 100%; height: 100%; }
.dphotos { position: absolute; inset: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; }
.dphotos .foto { flex: none; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; border-radius: 0; }
.hshade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 13, 16, .35) 0%, rgba(11, 13, 16, 0) 30%, rgba(11, 13, 16, .2) 45%, var(--bg) 100%); pointer-events: none; z-index: 1; }
.hchip { position: absolute; z-index: 2; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top, 0px) + 80px); font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; background: rgba(0, 0, 0, .55); color: #fff; padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.dphotos .foto text, .dphotos .foto rect[rx="9"] { display: none; }
.hb { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 16px); width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(40, 44, 52, .75); color: #fff; display: grid; place-items: center; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); z-index: 2; }
.hb.back { left: 16px; }
.hbr { position: absolute; right: 16px; top: 0; display: flex; gap: 10px; z-index: 2; } .hbr .hb { position: relative; }
.dtitle { position: absolute; left: 20px; right: 90px; bottom: 6px; z-index: 2; }
.dtitle .eyebrow { font-size: 13px; letter-spacing: .22em; text-transform: uppercase; color: rgba(255, 255, 255, .7); font-weight: 800; margin-bottom: 4px; }
.dtitle h1 { margin: 0; font-size: clamp(30px, 8.5vw, 42px); line-height: 1.08; font-weight: 900; letter-spacing: -.02em; text-wrap: balance; text-shadow: 0 2px 18px rgba(0, 0, 0, .6); }
.drate { position: absolute; right: 18px; bottom: 30px; text-align: center; z-index: 2; } .drate b { font-size: 26px; display: block; } .drate small { color: var(--muted); }
.dbody { padding: 10px 20px 0; max-width: 620px; margin: 0 auto; }
.dlines { display: grid; gap: 8px; font-size: 17px; font-weight: 700; color: var(--ink); }
.dlines > div { display: flex; align-items: center; gap: 10px; } .dlines .ico, .dlines svg { flex: none; color: var(--muted); }
.dlines .warn { color: #ffb347; } .dlines .warn .dot { background: #ffb347; }
.dlines .good { color: var(--libre); } .dlines .good .dot { background: var(--libre); }
.dtags { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 4px; }
.dstate { margin: 22px auto 0; width: fit-content; max-width: 100%; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 10px 18px; font-weight: 800; }
.dstate i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dspecs { margin: 18px 0 6px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 14px; font-weight: 800; }
.dspecs span { display: inline-flex; align-items: center; gap: 6px; } .dspecs .sep { width: 1px; height: 18px; background: var(--line); }
.bays { margin: 14px 0 0; } .bays svg { width: 100%; height: auto; display: block; }
.bay { cursor: pointer; } .bay:focus { outline: none; } .bay.on rect:first-child, .bay:focus-visible rect:first-child { stroke: var(--brand); stroke-width: 2.5; }
.bayinfo { text-align: center; color: var(--muted); font-weight: 700; margin-top: 6px; min-height: 22px; } .bayinfo b { color: var(--ink); }
.okc { color: var(--libre); } .noc { color: #ffb347; }
.dact { margin-top: 10px; }
.dfind { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; display: grid; gap: 4px; }
.det .card, .det .pred, .det .rv, .det .promo { margin-top: 12px; }
.det .pred, .det .rvi, .det .ub { background: var(--surface); }
.pickl { display: block; text-align: left; border-radius: 18px; padding: 12px 14px; background: var(--bg); color: var(--ink); text-decoration: none; font-weight: 800; }
.rowh h3 { margin: 0; }
.det h3 { font-size: 18px; }
@media (min-width: 900px) { .dhero { min-height: 340px; } }
.modal { z-index: 60; background: rgba(0, 0, 0, .55); }
.modal .panel { max-width: 560px; margin: 0 auto; border: 1px solid var(--line); border-bottom: 0; }
.flow { z-index: 50; }
.fhead { padding-top: calc(env(safe-area-inset-top, 0px) + 14px); background: var(--bg); border-bottom-color: var(--line); }
.fbody { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 28px); }
.fbody > * { width: 100%; max-width: 560px; margin-left: auto; margin-right: auto; }
.card { box-shadow: none; border: 1px solid var(--line); }
.btn.ghost { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.btn { color: var(--brand-ink); }
.notice { background: #2e2a12; color: #ffe9a0; }
.tag { background: var(--surface-2); color: var(--ink); }
.tag.sim { background: #3b3306; color: #ffe9a0; }
.tag.off { background: #14304f; color: #cfe3ff; }
input[type=text], input[type=number], select, textarea { background: var(--surface-2); border-color: var(--line); color: var(--ink); }

/* búsqueda a pantalla completa y tarjetas de estación */
.sbtn { width: 100%; height: 50px; border-radius: 16px; border: 1px solid var(--line); background: rgba(21, 24, 29, .92); color: var(--muted); font-size: 17px; font-weight: 700; text-align: left; padding: 0 64px 0 18px; box-shadow: var(--shadow); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.shead { display: flex; align-items: center; gap: 14px; padding: calc(env(safe-area-inset-top, 0px) + 12px) max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px)); background: var(--bg); }
.shead input { flex: 1; min-width: 0; height: 50px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: inherit; font-size: 17px; font-weight: 700; padding: 0 16px; -webkit-appearance: none; appearance: none; }
.shead .link { font-size: 17px; color: var(--ink); font-weight: 700; flex: none; }
.sbody { flex: 1; overflow-y: auto; padding: 4px max(16px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 24px) max(16px, env(safe-area-inset-left, 0px)); display: grid; gap: 14px; align-content: start; }
.sbody > * { width: 100%; max-width: 620px; margin: 0 auto; }
.srow { display: flex; align-items: center; gap: 12px; text-align: left; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 16px; padding: 12px 14px; }
.srow b { display: block; } .srow small { display: block; color: var(--muted); font-weight: 600; } .srow .ico { color: var(--muted); flex: none; }
.tlist { display: grid; gap: 14px; }
.tcard { position: relative; display: block; width: 100%; height: 150px; border-radius: 22px; overflow: hidden; border: 1px solid #23282f; background: #101317; text-align: left; color: #fff; padding: 0; }
.tc-img, .tc-bg { position: absolute; inset: 0; }
.tc-img svg { width: 100%; height: 100%; display: block; }
.tc-bg { background: radial-gradient(120% 90% at 85% 0%, color-mix(in srgb, var(--c) 22%, transparent), transparent 60%), linear-gradient(160deg, #191d24, #0d0f13); display: grid; place-items: start center; padding-top: 22px; }
.tc-bg svg { width: 46px; height: 46px; fill: #ffffff; opacity: .1; }
.tc-sh { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, .78)); }
.tc-c { position: absolute; left: 18px; right: 18px; bottom: 14px; display: grid; gap: 6px; }
.tc-c b { font-size: 21px; font-weight: 800; line-height: 1.15; text-shadow: 0 1px 10px rgba(0, 0, 0, .5); }
.tc-bs { display: flex; gap: 6px; flex-wrap: wrap; }
.tc-b { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; background: rgba(0, 0, 0, .55); border-radius: 999px; padding: 4px 10px; }
.tc-b i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.tc-m { display: flex; gap: 14px; flex-wrap: wrap; color: rgba(255, 255, 255, .78); font-size: 14.5px; font-weight: 700; }
.tc-m span { display: inline-flex; align-items: center; gap: 5px; }
.plibre { text-align: center; margin: 16px 0 0; font-size: 17px; font-weight: 800; color: var(--muted); }
.plibre b { font-size: 30px; font-weight: 900; margin-right: 4px; }
.plibre.pl-ok { color: var(--libre); } .plibre.pl-no { color: var(--ocupado); } .plibre.pl-mal { color: var(--danado); }
.bay.occ rect:first-child { fill: #171b21; }

.tc-img img, .dhero .himg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.tc-img img { filter: saturate(.92) brightness(.82); }
.dhero .himg { filter: saturate(.95) brightness(.78); }
.fcred { font-size: 11.5px; color: var(--muted); margin: 0 0 10px; }
.fcred a { color: inherit; text-decoration: underline; }

/* ---- ficha compacta + escena isométrica ---- */
.dhero { min-height: 210px; }
.dtitle h1 { font-size: clamp(26px, 7vw, 34px); }
.dbody { padding: 6px 20px 0; }
.dlines { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14.5px; font-weight: 700; }
.dlines > div { gap: 7px; } .dlines .warn, .dlines .good { flex-basis: 100%; }
.dstate { margin-top: 12px; padding: 7px 14px; font-size: 14px; }
.dspecs { margin: 12px 0 4px; font-size: 14px; gap: 6px 12px; }
.plibre { margin-top: 10px; font-size: 14px; } .plibre b { font-size: 24px; }
.bays { margin: 6px 0 0; } .bays svg { max-height: 330px; }
.bay .slot { transition: stroke .2s; } .bay.on .slot, .bay:focus-visible .slot { stroke: var(--brand); stroke-opacity: 1; stroke-width: 2.4; }
.bay.on > text, .bay { outline: none; }
.car { animation: drive .9s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes drive { from { transform: translate(var(--dx), var(--dy)); opacity: 0; } 60% { opacity: 1; } to { transform: none; opacity: 1; } }
.cable { stroke-dasharray: 5 5; animation: flow 1s linear infinite; filter: drop-shadow(0 0 3px #3dd68c); }
@keyframes flow { to { stroke-dashoffset: -20; } }
.led.on { animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }
.bay:not(.occ) .slot { animation: libre 2.4s ease-in-out infinite; }
@keyframes libre { 50% { fill: rgba(61, 214, 140, .16); } }
@media (prefers-reduced-motion: reduce) { .car, .cable, .led.on, .bay:not(.occ) .slot { animation: none; } }
.dact { display: flex; gap: 10px; margin-top: 10px; } .dact .btn { flex: 1; text-align: center; }
details.mas { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 8px; }
details.mas summary { cursor: pointer; font-weight: 800; color: var(--muted); padding: 8px 0; list-style: none; }
details.mas summary::-webkit-details-marker { display: none; } details.mas summary::after { content: ' ▾'; }
details.mas[open] summary::after { content: ' ▴'; }
@media (min-width: 900px) {
  .det { inset: 12px auto 12px 12px; width: 400px; border-radius: 22px; border: 1px solid #23282f; box-shadow: 0 18px 50px rgba(0, 0, 0, .5); padding-bottom: 24px; }
  .dhero { min-height: 170px; } .dbody { padding: 4px 18px 0; }
  .dtitle h1 { font-size: 27px; } .dtitle .eyebrow { font-size: 11px; }
  .hb { width: 38px; height: 38px; top: 12px; } .hb.back { left: 12px; } .hbr { right: 12px; top: 0; } .hbr .hb { position: relative; top: 12px; }
  .hchip { top: 58px; font-size: 10px; }
}

.navs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.nv { display: grid; justify-items: center; gap: 6px; background: none; border: 0; color: var(--ink); text-decoration: none; font-size: 11.5px; font-weight: 800; padding: 0; }
.nv i { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: #232a33; border: 1px solid #2f3742; }
.nv i.g { background: #2f9e5b; border-color: #2f9e5b; } .nv i.w { background: #2a9fd6; border-color: #2a9fd6; } .nv i.a { background: #3a3f48; } .nv i.s { background: #232a33; }
.vchip { display: inline-flex; align-items: center; gap: 6px; } .vchip i { width: 11px; height: 11px; border-radius: 50%; background: var(--c); }
.gchip { color: var(--libre); } .tag.gr { background: #123a28; color: #3dd68c; }
.tc-b.gr { background: #123a28; color: #3dd68c; } .tc-b i { background: var(--c); }
.dtitle h1 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.nv i, .nv i.g, .nv i.w, .nv i.a { background: #1a1f26; border: 1px solid #2f3742; } .nv i img { display: block; object-fit: contain; }
.gchip { color: #ffd60a; } .tag.gr, .tc-b.gr { background: #3a3000; color: #ffd60a; }

.carhero { display: grid; justify-items: center; align-content: center; gap: 6px; }
.carmodel { width: min(78%, 330px); height: auto; filter: drop-shadow(0 16px 14px rgba(0, 0, 0, .55)); }
.carcap { font-size: 12px; color: var(--muted); font-weight: 700; }
.cthumb { width: 56px; height: auto; flex: none; }
.carlist button { display: flex; align-items: center; gap: 12px; }
.ghost:not(.btn) { opacity: .5; filter: saturate(.7); } /* el carro transparente; los botones .btn.ghost no se atenúan */

/* foto 2D con efecto 3D */
.car3d { padding: 6px 0 4px; }
.stage { --rx: 0deg; --ry: 0deg; --gx: 50%; position: relative; width: min(94%, 430px); perspective: 900px; margin: 0 auto; }
.stage .floor { position: absolute; left: 6%; right: 6%; bottom: 8%; height: 26%; border-radius: 50%; background: radial-gradient(closest-side, rgba(61, 214, 140, .22), rgba(61, 214, 140, 0) 72%), radial-gradient(closest-side, rgba(0, 0, 0, .7), rgba(0, 0, 0, 0) 78%); filter: blur(2px); transform: rotateX(70deg); }
.carwrap { position: relative; transform-style: preserve-3d; transform: rotateY(var(--ry)) rotateX(var(--rx)); transition: transform .25s ease-out; animation: sway 7s ease-in-out infinite; -webkit-box-reflect: below -2px linear-gradient(transparent 62%, rgba(255, 255, 255, .22)); }
.stage.live .carwrap { animation: none; }
@keyframes sway { 0%, 100% { transform: rotateY(-5deg) rotateX(1deg); } 50% { transform: rotateY(5deg) rotateX(-1deg); } }
.carphoto { display: block; width: 100%; height: auto; filter: drop-shadow(0 14px 12px rgba(0, 0, 0, .55)) saturate(1.05) contrast(1.04); }
.gloss { position: absolute; inset: 0; background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .5) var(--gx), transparent calc(var(--gx) + 14%)); mix-blend-mode: soft-light; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; pointer-events: none; transition: background .2s; }
.carcap a { color: inherit; text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { .carwrap { animation: none; } }
.stage { margin-bottom: 64px; } .car3d .carcap { display: grid; gap: 2px; text-align: center; padding: 0 16px; } .car3d .carcap small { font-size: 10.5px; opacity: .8; font-weight: 600; }

.cmpc { display: flex; align-items: center; gap: 10px; margin: 4px 0 10px; } .cmpc label { font-weight: 800; color: var(--muted); }
.cmpc select { flex: 1; min-width: 0; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; font-weight: 700; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; font-size: 13px; color: var(--muted); font-weight: 700; text-align: center; }
.pager button { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; font: inherit; font-weight: 800; white-space: nowrap; }
.pager button:disabled { opacity: .35; }
.gnote { margin: 12px auto 0; max-width: 100%; text-align: center; font-size: 12.5px; font-weight: 700; color: #ffd60a; background: #2a2400; border: 1px solid #4a3f00; border-radius: 12px; padding: 7px 12px; }

:root:root:root { --ocupado: #b072ff; --fila: #19c3d6; --danado: #f1f5f9; }

/* fotos de la comunidad y moderación */
.dact { flex-wrap: wrap; } .dact .btn { min-width: 0; }
.filebtn { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 12px 0 8px; padding: 14px; border: 1px dashed #3a4350; border-radius: 16px; color: var(--ink); font-weight: 800; cursor: pointer; }
.fprev img, .fbig, .modimg { display: block; width: 100%; max-height: 300px; object-fit: contain; background: #0b0d10; border-radius: 14px; }
.chk { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 6px; font-size: 13.5px; font-weight: 600; color: var(--muted); } .chk input { margin-top: 3px; flex: none; }
.fthumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; } .fthumbs button { flex: none; border: 0; padding: 0; background: none; } .fthumbs img { display: block; width: 92px; height: 70px; object-fit: cover; border-radius: 12px; }
.mfoto { display: flex; align-items: center; gap: 12px; } .mfoto img { width: 56px; height: 44px; object-fit: cover; border-radius: 8px; flex: none; }
.modc { display: grid; gap: 8px; } .modc .row { display: flex; gap: 8px; } .modc .row .btn { flex: 1; } .rej { display: flex; gap: 8px; } .rej select { flex: 1; min-width: 0; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 10px; font: inherit; }
.warnm { font-size: 13px; font-weight: 700; color: #ffb347; background: #2a1d00; border-radius: 10px; padding: 7px 10px; }
.rej[hidden], .fcom[hidden], .fprev[hidden] { display: none; }

/* panel lateral (menú) estilo alterna: carro, batería, filtros, leyenda */
.drw { position: absolute; inset: 0; z-index: 70; display: flex; }
.drw-p { width: min(88%, 380px); height: 100%; overflow-y: auto; background: var(--bg); padding: max(14px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom)); animation: drwin .22s ease-out; box-shadow: 8px 0 30px rgba(0, 0, 0, .45); }
.drw-s { flex: 1; border: 0; background: rgba(0, 0, 0, .5); padding: 0; cursor: pointer; }
@keyframes drwin { from { transform: translateX(-100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .drw-p { animation: none; } }
.drw-c { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--surface-2, #1b2129); display: grid; place-items: center; padding: 0; color: var(--ink); }
.dcarbox { display: grid; justify-items: center; gap: 4px; padding: 6px 0 10px; }
.dcar { width: min(78%, 250px); height: auto; filter: drop-shadow(0 12px 10px rgba(0, 0, 0, .5)); }
.dsec { margin: 18px 2px 8px; font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.dcard { border: 1px solid var(--line); border-radius: 20px; background: var(--surface); padding: 6px 14px 12px; }
.dcard #dbat { padding-top: 8px; }
.bat { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.bat svg { color: var(--ink); }
.bat .sub { margin: 0; }
#dsoc { width: 100%; margin: 12px 0 4px; accent-color: #fff; }
.tg { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 0; background: none; color: var(--ink); text-align: left; padding: 12px 0; font-weight: 700; border-bottom: 1px solid var(--line); }
.sw { flex: none; width: 52px; height: 30px; border-radius: 15px; background: #3a414c; position: relative; transition: background .15s; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #f1f5f9; transition: transform .15s; }
.sw.on { background: var(--brand); }
.sw.on::after { transform: translateX(22px); }
.dgrp { padding: 12px 0 2px; border-bottom: 1px solid var(--line); }
.dgrp:last-of-type { border-bottom: 0; }
.dt { font-weight: 800; margin-bottom: 8px; }
.dcount { margin-top: 10px; font-size: 13px; color: var(--muted); }
.drw .rows { display: grid; gap: 8px; }

/* panel lateral más compacto */
.drw-p { width: min(72%, 300px); padding: max(10px, env(safe-area-inset-top)) 12px max(18px, env(safe-area-inset-bottom)); font-size: 13px; }
.drw-c { width: 32px; height: 32px; }
.drw-c svg { width: 18px; height: 18px; }
.dcarbox { padding: 2px 0 4px; gap: 2px; }
.dcar { width: min(62%, 170px); }
.dcarbox .sub { font-size: 12px; }
.dsec { margin: 12px 2px 6px; font-size: 10.5px; letter-spacing: .14em; }
.dcard { border-radius: 14px; padding: 2px 10px 8px; font-size: 13px; }
.bat { font-size: 14px; gap: 8px; }
.bat svg { width: 24px; height: 11px; }
#dsoc { margin: 8px 0 2px; }
.tg { padding: 8px 0; font-size: 13px; gap: 8px; }
.sw { width: 38px; height: 22px; border-radius: 11px; }
.sw::after { width: 16px; height: 16px; top: 3px; left: 3px; }
.sw.on::after { transform: translateX(16px); }
.dgrp { padding: 8px 0 2px; }
.dt { font-size: 12.5px; margin-bottom: 6px; }
.drw .fchips { gap: 5px; }
.drw .fc { padding: 5px 10px; font-size: 12px; min-height: 0; }
.dcount { font-size: 12px; margin-top: 8px; }
.drw .leg2 { font-size: 12px; gap: 5px 10px; }
.drw .dcard .meta { font-size: 11.5px; }
.drw .rowi { padding: 9px 12px; min-height: 0; }
.drw .rowi b { font-size: 13px; }
.drw .rowi small { font-size: 11.5px; }
.drw .rows { gap: 5px; }

/* panel del botón de capas: entra por la derecha */
.drw-h { display: flex; align-items: center; gap: 10px; }
.drw-h b { font-size: 15px; font-weight: 900; }
.drw-r { flex-direction: row-reverse; }
.drw-r .drw-p { animation-name: drwinr; box-shadow: -8px 0 30px rgba(0, 0, 0, .45); }
@keyframes drwinr { from { transform: translateX(100%); } to { transform: none; } }
.drw-r .drw-c svg { transform: none; }

/* marcas de la leyenda */
.leg2 i.lg-gr { background: none; border: 2.5px solid #ffd60a; }
.leg2 i.lg-of { background: none; border: 2.5px solid #3aa0ff; }
.leg2 i.lg-st { background: none; color: #ffc21a; font-style: normal; font-size: 15px; line-height: 12px; width: auto; height: auto; border-radius: 0; text-align: center; }

/* promoción de socio: mensaje por tiempo limitado */
.promob { display: flex; align-items: center; gap: 12px; margin: 10px 0; padding: 12px 14px; border-radius: 16px; background: linear-gradient(120deg, #3a2f00, #1f1a05); border: 1px solid #ffc21a; color: #fff3c4; }
.promob .pb-i { flex: none; width: 38px; height: 38px; border-radius: 50%; background: #ffc21a; color: #1a1400; display: grid; place-items: center; font-weight: 900; font-size: 19px; animation: pbpulse 2.2s ease-in-out infinite; }
.promob div { display: grid; gap: 1px; min-width: 0; }
.promob b { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #ffc21a; }
.promob span { font-size: 15px; font-weight: 800; color: #fff; }
.promob small { font-size: 12px; font-weight: 700; color: #ffe08a; }
@keyframes pbpulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 194, 26, .5); } 50% { box-shadow: 0 0 0 8px rgba(255, 194, 26, 0); } }
@media (prefers-reduced-motion: reduce) { .promob .pb-i { animation: none; } }
.tc-b.pm { background: #ffc21a; color: #1a1400; }

/* lugar: centro comercial, restaurante o supermercado */
.lugarb { display: flex; align-items: center; gap: 12px; margin: 10px 0; padding: 12px 14px; border-radius: 16px; background: #2a1a0c; border: 1px solid #ff8a3d; color: #ffe2cc; }
.lugarb .lg-i { flex: none; width: 38px; height: 38px; border-radius: 50%; background: #ff8a3d; color: #1a0e04; display: grid; place-items: center; }
.lugarb div { display: grid; gap: 1px; min-width: 0; }
.lugarb b { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #ff8a3d; }
.lugarb span { font-size: 14.5px; font-weight: 800; color: #fff; }
.lugarb small { font-size: 11.5px; font-weight: 700; color: #ffc9a3; }
.tc-b.lu { background: #ff8a3d; color: #1a0e04; }
.leg2 i.lg-lu { background: #ff8a3d; }

.lugarb.salud { background: #2a0f10; border-color: #e5484d; color: #ffd9da; }
.lugarb.salud .lg-i { background: #fff; color: #e5484d; }
.lugarb.salud b { color: #ff8b8f; }
.tc-b.lu.sa { background: #fff; color: #e5484d; }
.leg2 i.lg-sa { background: #fff; color: #e5484d; font-style: normal; font-weight: 900; font-size: 12px; line-height: 12px; text-align: center; }

.leg2 i.lg-gr { width: auto; height: auto; border-radius: 8px; border: 1.5px solid #0b0d10; background: #fff; color: #0b0d10; font-style: normal; font-weight: 900; font-size: 9px; line-height: 1; padding: 2px 5px; }

/* primera vez: configuración básica */
.onb { position: absolute; inset: 0; z-index: 45; background: var(--bg); overflow-y: auto; }
.onbp { max-width: 460px; margin: 0 auto; padding: max(28px, env(safe-area-inset-top)) 20px max(28px, env(safe-area-inset-bottom)); display: grid; gap: 12px; }
.onbp h1 { margin: 0; font-size: 26px; font-weight: 900; }
.onbp .sub { margin: 0; }
.onbc { display: grid; gap: 8px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); padding: 14px; }
.onbc input[type=text] { width: 100%; box-sizing: border-box; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; }
.onbc .tg { padding: 4px 0 0; border: 0; }
.onbs { justify-self: center; background: none; border: 0; color: var(--muted); font-weight: 800; padding: 8px; }

/* botones: se nota cuál se puede tocar y cuál está de verdad desactivado */
.btn { cursor: pointer; transition: transform .12s ease, filter .12s ease, background-color .15s ease, box-shadow .15s ease; box-shadow: 0 2px 0 rgba(0, 0, 0, .14); }
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px) scale(.98); box-shadow: none; }
.btn.ghost { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--brand) 38%, transparent); }
.btn.ghost:hover { background: color-mix(in srgb, var(--brand-soft) 75%, var(--brand)); }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.6); box-shadow: none; transform: none; }
.tgb { display: inline-flex; align-items: center; gap: 9px; min-height: 46px; padding: 8px 16px 8px 12px; border-radius: 999px; border: 0; cursor: pointer; font: inherit; font-weight: 900; text-align: left;
  background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); transition: background-color .15s ease, box-shadow .15s ease, transform .12s ease; }
.tgb::before { content: ""; flex: none; width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--muted); background: transparent center / 14px no-repeat; transition: background-color .15s ease, box-shadow .15s ease; }
.tgb em { font-style: normal; font-weight: 800; font-size: 12px; opacity: .75; margin-left: auto; padding-left: 4px; }
.tgb[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); box-shadow: 0 2px 0 rgba(0, 0, 0, .14); }
.tgb[aria-pressed="true"]::before { box-shadow: none; background-color: var(--brand-ink); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%230b72dc' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.tgb:hover { box-shadow: inset 0 0 0 2px var(--brand); }
.tgb[aria-pressed="true"]:hover { filter: brightness(1.06); }
.tgb:active { transform: scale(.97); }
.tgb:disabled { opacity: .5; cursor: progress; }
.tgb.peligro[aria-pressed="true"] { background: #d93a3a; color: #fff; }
.tgb.peligro[aria-pressed="true"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23d93a3a' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

.det .appreq, .appreq { display: flex; gap: 8px; align-items: flex-start; background: var(--brand-soft); color: var(--ink); border-radius: 14px; padding: 10px 12px; margin-top: 8px; }
.appreq svg { flex: none; margin-top: 2px; color: var(--brand); }
.appreq a { color: var(--brand); font-weight: 800; }
.appreq small { display: block; margin-top: 2px; }
