/* ============================================================
   Galerías Pacífico · Mapa Interactivo (estilo tótem premium)
   Azul vivo · Poppins · Material Symbols · tarjetas redondeadas
   Tema claro (Google Maps) + variante oscura
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ---------- Tokens ---------- */
:root {
  --bg:           #ececee;
  --map-paper:    #f7f7f8;
  --map-corridor: #ffffff;
  --map-stroke:   #d9dade;
  --surface:      #ffffff;
  --surface-2:    #f1f4f9;
  --border:       #e6e8ec;

  --shadow:       0 4px 24px rgba(20,28,46,.14), 0 1px 4px rgba(20,28,46,.08);
  --shadow-lg:    0 18px 50px rgba(20,28,46,.22), 0 6px 16px rgba(20,28,46,.12);
  --shadow-sm:    0 2px 10px rgba(20,28,46,.10);

  --text:         #1a2230;
  --text-2:       #5b6472;
  --text-3:       #8a93a3;
  --on-accent:    #ffffff;

  --accent:       #1769e0;          /* azul vivo del tótem */
  --accent-2:     #0f57c2;
  --accent-weak:  #e9f1fe;
  --ok:           #1aa251;          /* "Abierto" */
  --no:           #e0413a;          /* "Cerrado" */
  --gp-gold:      #9a7b3f;

  --label:        #38414f;
  --label-halo:   #ffffff;
  --poi-bg:       #ffffff;
  --poi-ink:      #46505f;

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-pill: 999px;

  --font: "Poppins", "Segoe UI", system-ui, -apple-system, sans-serif;

  --ctrl: 48px;
  --ctrl-font: 24px;
  --side-w: clamp(300px, 24vw, 760px);   /* ancho del panel de opciones */
}

:root[data-tema="oscuro"] {
  --bg:           #14161c;
  --map-paper:    #262a33;
  --map-corridor: #2e333d;
  --map-stroke:   #434a57;
  --surface:      #1e222a;
  --surface-2:    #2a2f3a;
  --border:       #313742;
  --shadow:       0 6px 28px rgba(0,0,0,.55), 0 1px 4px rgba(0,0,0,.4);
  --shadow-lg:    0 22px 60px rgba(0,0,0,.6);
  --shadow-sm:    0 2px 12px rgba(0,0,0,.5);
  --text:         #eaedf2;
  --text-2:       #aab2c0;
  --text-3:       #7e8796;
  --accent:       #4f93f7;
  --accent-2:     #3b7fe6;
  --accent-weak:  #1f2c40;
  --label:        #e7eaf0;
  --label-halo:   #14161c;
  --poi-bg:       #2a2f3a;
  --poi-ink:      #c2c9d4;
}

html, body {
  height: 100%;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; }

/* Material Symbols */
.msym {
  font-family: "Material Symbols Rounded";
  font-weight: normal; font-style: normal; line-height: 1;
  letter-spacing: normal; text-transform: none; white-space: nowrap;
  display: inline-block; -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased; font-variation-settings: "FILL" 1;
  user-select: none;
}

/* ============================================================
   MAPA
   ============================================================ */
#mapWrap { position: fixed; inset: 0; left: var(--side-w); overflow: hidden; background: var(--bg); cursor: grab; touch-action: none; }
#mapWrap.dragging { cursor: grabbing; }
#mapInner { position: absolute; inset: 0; }

/* ============================================================
   CANVAS 3D
   ============================================================ */
#threeCanvas {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  display: none;
  background: var(--bg);
  touch-action: none;
}

/* Modo 3D activo — oculta el SVG 2D, muestra el canvas 3D */
body.view-3d #mapWrap   { display: none; }
body.view-3d #threeCanvas { display: block; }

/* Ajustes UI en modo 3D (oculta zoom/fit, muestra ayuda) */
body.view-3d #zFit,
body.view-3d .zoomGroup {
  display: none !important;
}
body:not(.view-3d) #zHelp3D {
  display: none !important;
}

/* ============================================================
   FAB 2D / 3D
   ============================================================ */
.fab3d {
  position: fixed;
  /* Arriba-izquierda, en la zona VACÍA (no sobre el plano), encima del cartel. */
  top: clamp(14px, 2vmin, 56px);
  left: calc(var(--side-w) + clamp(60px, 10vw, 320px));
  transform: translateX(-50%);
  z-index: 40;

  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 20px;
  height: 46px;
  border: none;
  border-radius: var(--r-pill);
  cursor: pointer;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--on-accent);
  background: var(--accent);
  box-shadow: 0 4px 20px rgba(23,105,224,.38), 0 1px 4px rgba(23,105,224,.22);
  transition: background 200ms ease, box-shadow 200ms ease,
              transform 180ms cubic-bezier(.34,1.56,.64,1), opacity 160ms ease;
  will-change: transform;
}
.fab3d:hover {
  background: var(--accent-2);
  box-shadow: 0 6px 28px rgba(23,105,224,.55), 0 2px 8px rgba(23,105,224,.3);
  transform: translateX(-50%) translateY(-2px);
}
.fab3d:active {
  transform: translateX(-50%) scale(.95);
}

/* Estado 3D activado */
.fab3d[aria-pressed="true"] {
  background: #e8f0fe;
  color: var(--accent);
  box-shadow: 0 3px 14px rgba(23,105,224,.22);
}
.fab3d[aria-pressed="true"]:hover {
  background: #d2e3fc;
  transform: translateX(-50%) translateY(-2px);
}

/* Dark mode */
:root[data-tema="oscuro"] .fab3d[aria-pressed="true"] {
  background: var(--accent-weak);
  color: var(--accent);
}

.fab3d-icon {
  font-size: 20px;
  transition: transform 300ms cubic-bezier(.34,1.56,.64,1);
}
.fab3d[aria-pressed="true"] .fab3d-icon {
  transform: rotateY(180deg);
}
.fab3d-label {
  min-width: 18px;
  text-align: left;
}

.floorSvg { position: absolute; inset: 0; width: 100%; height: 100%; display: none; }
.floorSvg.is-active { display: block; }
.floorSvg .baseLayer path { vector-effect: non-scaling-stroke; }
.floorSvg .baseLayer path[fill="#f4f2ee"] { fill: var(--map-paper); stroke: none; }
/* Estética plana (ref. tótem Andino): paredes y contornos en gris suave,
   nada de líneas negras pesadas. */
.floorSvg .baseLayer path[stroke="#2a2823"] { stroke: #c3c7ce; stroke-width: 1.6px; }
.floorSvg .baseLayer path[stroke="#b0aba0"] { stroke: #e2e4e8; }
/* Floor-hole marker paths are editor-only reference shapes — the actual void is
   already baked into the floor fill path's compound geometry (even-odd rule). */
.floorSvg .baseLayer path[data-type="floor-hole"] { display: none; }
.floorSvg .baseLayer path.escalator {
  stroke: #e0c878;
  stroke-width: 3.5px;
  stroke-dasharray: 6,4;
  fill: none;
}
.floorSvg .baseLayer rect.esc-well {
  fill: none;
  stroke: #b9bdc5;
  stroke-width: 1.4px;
  vector-effect: non-scaling-stroke;
}

/* Unidades — bloques grises planos separados por juntas blancas (ref. Andino).
   Cuando una marca paga, el bloque entero se pinta con su color y/o logo. */
.unit {
  fill: var(--unit-fill, rgba(0,0,0,0.035));
  stroke: #ffffff;
  stroke-width: 1.8px; vector-effect: non-scaling-stroke;
  cursor: pointer; transition: fill 140ms ease, stroke 140ms ease, opacity 140ms ease;
}
.unit:hover { fill: var(--unit-hover, rgba(23,105,224,0.22)); }
.unit.is-selected {
  fill: var(--accent) !important; fill-opacity: .9;
  stroke: #fff; stroke-width: 2.5px;
  filter: drop-shadow(0 2px 6px rgba(23,105,224,.5));
  opacity: 1 !important;
}
.unit.no-local { pointer-events: none; fill: transparent; }
.unit.dim { opacity: .22; }
.unit.is-match { fill: var(--unit-match, rgba(23,105,224,0.34)); stroke: var(--accent); }
.unit:focus { outline: none; }
.unit:focus-visible { stroke: var(--accent); stroke-width: 2.5px; }

/* Etiquetas — discretas en gris medio; blancas sobre bloques de marca */
.lbl {
  font-family: var(--font); font-size: 13px; font-weight: 500;
  fill: #5a626f; paint-order: stroke; stroke: var(--label-halo);
  stroke-width: 3px; stroke-linejoin: round;
  text-anchor: middle; dominant-baseline: middle;
  pointer-events: none; user-select: none;
}
.lbl.hidden { display: none; }
.lbl.anchor { font-weight: 600; font-size: 15px; }
/* Local sin marca asignada: sólo el número, bien tenue */
.lbl.lbl-num { fill: #a6acb6; font-weight: 500; }
/* Local con color de marca: nombre blanco sobre el bloque pintado */
.lbl.lbl-brand { fill: #ffffff; stroke: rgba(0,0,0,.28); stroke-width: 2.6px; font-weight: 700; }

/* POIs */
.poi { cursor: pointer; }
.poi .poi-dot {
  fill: var(--poi-bg);
  stroke: rgba(20,28,46,.12);
  stroke-width: 1;
  filter: drop-shadow(0 1px 2px rgba(20,28,46,.18));
  transition: fill 140ms ease, stroke 140ms ease, transform 140ms ease;
  transform-origin: center;
  transform-box: fill-box;
}
.poi text.poi-ic {
  font-family: "Material Symbols Rounded";
  font-size: 16px;
  fill: var(--poi-ink);
  text-anchor: middle;
  dominant-baseline: central;
  font-variation-settings: "FILL" 1;
  transition: fill 140ms ease, transform 140ms ease;
  transform-origin: center;
  transform-box: fill-box;
  pointer-events: none;
}
.poi:hover .poi-dot {
  fill: var(--accent);
  stroke: var(--accent-2);
  transform: scale(1.15);
}
.poi:hover text.poi-ic {
  fill: #ffffff;
  transform: scale(1.15);
}
.poi.hidden { display: none; }

/* Tótem "Usted está aquí" */
.totem .ring { fill: rgba(23,105,224,.22); animation: pulse 2.4s ease-out infinite; transform-origin: center; transform-box: fill-box; }
.totem .core { fill: var(--accent); stroke: #fff; stroke-width: 2.5; }
@keyframes pulse { 0%{transform:scale(.5);opacity:.8} 70%{transform:scale(2);opacity:0} 100%{opacity:0} }

/* Marcador "Ud. está aquí" (badge con ícono de persona + etiqueta) */
.youhere { pointer-events: none; }
.youhere .yh-pulse { fill: rgba(23,105,224,.28); transform-origin: center; transform-box: fill-box;
  animation: pulse 2.2s ease-out infinite; }
.youhere .yh-badge { fill: var(--accent); stroke: #fff; stroke-width: 3px; }
.youhere .yh-ic { fill: #fff; font-size: 26px; }
.youhere .yh-pill { fill: #23262b; stroke: #fff; stroke-width: 2px; }
.youhere .yh-txt { fill: #fff; font-family: var(--font); font-weight: 800; font-size: 17px; letter-spacing: .2px; }

/* Destino (pulso al trazar ruta / seleccionar) */
.destPin .ring2 { fill: rgba(23,105,224,.28); animation: pulse 1.8s ease-out infinite; transform-origin: center; transform-box: fill-box; }
.destPin .pin { fill: var(--accent); stroke: #fff; stroke-width: 2; }
.destPin .pinDot { fill: #fff; }

@media (prefers-reduced-motion: reduce){ .totem .ring, .destPin .ring2, .routeLayer path { animation: none !important; } }

/* Ruta sólida azul con flujo */
.routeLayer .route-base { fill:none; stroke: var(--accent); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; vector-effect:non-scaling-stroke; opacity:.95; }
.routeLayer .route-flow { fill:none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 2 16; vector-effect:non-scaling-stroke; animation: flow 1s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -18; } }
.routeLayer .route-origin { fill: #fff; stroke: var(--accent); stroke-width: 3; }
.routeLayer .route-arrow-bg { fill: var(--accent); stroke: #fff; stroke-width: 2.5; }
.routeLayer .route-arrow-tri { fill: #fff; }
.routeLayer .connMarker .conn-dot { fill: var(--accent); stroke: #fff; stroke-width: 2.5; }
.routeLayer .connMarker .conn-ic { font-family: "Material Symbols Rounded"; font-size: 15px; fill: #fff; text-anchor: middle; dominant-baseline: central; font-variation-settings: "FILL" 1; }

/* ============================================================
   TOPBAR / BUSCADOR
   ============================================================ */
.topbar {
  position: fixed; top: 16px; left: 16px; z-index: 40;
  display: flex; align-items: stretch; gap: 12px;
  max-width: min(440px, calc(100vw - 32px));
}
.searchbox {
  flex: 1; display: flex; align-items: center; gap: 10px;
  background: var(--surface); border-radius: var(--r-pill);
  box-shadow: var(--shadow); padding: 0 8px 0 16px; height: 56px; position: relative;
}
.searchbox .ic-search { color: var(--accent); font-size: 24px; }
.searchbox .brand { display:flex; flex-direction:column; line-height:1.05; padding-right:12px; border-right:1px solid var(--border); }
.searchbox .brand b { font-size: 12.5px; font-weight: 700; color: var(--text); letter-spacing:.2px; }
.searchbox .brand span { font-size: 9px; letter-spacing:1.6px; color: var(--gp-gold); text-transform: uppercase; font-weight:600; }
.searchbox input { flex:1; border:none; outline:none; background:transparent; font-size:15.5px; font-weight:500; color:var(--text); min-width:0; }
.searchbox input::placeholder { color: var(--text-3); font-weight:400; }
.searchbox .clear-btn { border:none; background:transparent; color:var(--text-2); width:36px; height:36px; border-radius:50%; cursor:pointer; display:none; align-items:center; justify-content:center; font-size:20px; }
.searchbox .clear-btn:hover { background: var(--surface-2); }
.searchbox.has-text .clear-btn { display:flex; }

.icon-btn {
  width: 56px; height: 56px; flex:none; border:none; border-radius: 50%;
  background: var(--surface); color: var(--accent); box-shadow: var(--shadow);
  cursor: pointer; display:flex; align-items:center; justify-content:center; font-size: 26px;
  transition: transform .12s;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active { transform: scale(.94); }

/* Autocompletado */
.suggest {
  position:absolute; top:calc(100% + 10px); left:0; right:0; z-index:100;
  background:var(--surface); border-radius:var(--r-md); box-shadow:var(--shadow-lg);
  overflow:hidden; max-height:min(62vh,480px); overflow-y:auto; display:none;
}
.suggest.open { display:block; }
.sug-item { display:flex; align-items:center; gap:14px; padding:13px 16px; cursor:pointer; border-bottom:1px solid var(--border); }
.sug-item:last-child { border-bottom:none; }
.sug-item:hover, .sug-item.active { background: var(--surface-2); }
.sug-ic { width:40px; height:40px; flex:none; border-radius:12px; display:flex; align-items:center; justify-content:center; color:#fff; font-size:21px; }
/* Logos dentro del autocompletado: mismo estilo que el menú, en chico */
.sug-item .cl-logo { width:42px; border-radius:12px; }
.sug-item .cl-logo-i { font-size:18px; }
.sug-tx { min-width:0; flex:1; }
.sug-tx b { font-size:14.5px; font-weight:600; color:var(--text); display:block; }
.sug-tx span { font-size:12px; color:var(--text-2); }
.sug-tag { font-size:11px; color:var(--text-3); white-space:nowrap; font-weight:600; }
.sug-empty { padding:22px 18px; color:var(--text-2); font-size:14px; line-height:1.6; }
.sug-empty b { color:var(--text); }

/* ============================================================
   SELECTOR DE PISOS (pastillas abajo-centro)
   ============================================================ */
.floorPicker {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 35;
  display: flex; gap: 6px; background: var(--surface);
  border-radius: var(--r-pill); box-shadow: var(--shadow); padding: 6px;
}
.floorPicker button {
  min-width: 56px; height: 48px; padding: 0 14px; border:none; background:transparent; cursor:pointer;
  border-radius: var(--r-pill); display:flex; flex-direction:column; align-items:center; justify-content:center;
  color: var(--text-2); transition: background .16s, color .16s, transform .12s;
}
.floorPicker button b { font-size: 15px; font-weight: 700; line-height:1; }
.floorPicker button small { font-size: 8.5px; letter-spacing:.4px; text-transform:uppercase; color: var(--text-3); margin-top:2px; }
.floorPicker button:hover { background: var(--surface-2); }
.floorPicker button:active { transform: scale(.95); }
.floorPicker button.is-active { background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(23,105,224,.45); }
.floorPicker button.is-active small { color: rgba(255,255,255,.85); }

/* ============================================================
   CONTROLES DE ZOOM (abajo-der)
   ============================================================ */
.mapTools { position: fixed; bottom: 22px; right: 16px; z-index: 35; display:flex; flex-direction:column; gap:12px; align-items:center; }
.zoomGroup { display:flex; flex-direction:column; background:var(--surface); border-radius:var(--r-sm); box-shadow:var(--shadow); overflow:hidden; }
.zoomGroup button, .tool-single { width:var(--ctrl); height:var(--ctrl); border:none; background:var(--surface); cursor:pointer; color:var(--text); display:flex; align-items:center; justify-content:center; font-size:var(--ctrl-font); }
.zoomGroup button:hover, .tool-single:hover { background:var(--surface-2); color:var(--accent); }
.zoomGroup button + button { border-top:1px solid var(--border); }
.tool-single { border-radius:var(--r-sm); box-shadow:var(--shadow); }

/* ============================================================
   TARJETA DE LUGAR
   ============================================================ */
.placecard {
  position: fixed; z-index: 50; left: calc(var(--act-w) + var(--side-w) + 24px); bottom: 84px;
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  width: 480px; max-width: calc(100vw - 32px); overflow: hidden;
  transform: translateY(24px) scale(.98); opacity:0; pointer-events:none;
  transition: transform .26s cubic-bezier(.2,.8,.2,1), opacity .22s ease;
}
.placecard.open { transform: translateY(0) scale(1); opacity:1; pointer-events:auto; }

.pc-head { position: relative; height: 240px; overflow: hidden; }
.pc-photo { position:absolute; inset:0; background-size: cover; background-position: center; }
.pc-head::after { content:""; position:absolute; inset:0; background: linear-gradient(to top, rgba(0,0,0,.62) 0%, rgba(0,0,0,.05) 55%, rgba(0,0,0,.18) 100%); }
.pc-close {
  position:absolute; top:14px; right:14px; z-index:2; width:42px; height:42px; border-radius:50%;
  background: rgba(255,255,255,.92); color:#222; border:none; cursor:pointer; font-size:24px;
  display:flex; align-items:center; justify-content:center;
}
.pc-head-bottom { position:absolute; left:0; right:0; bottom:0; z-index:2; display:flex; align-items:flex-end; gap:16px; padding:18px 20px; }
.pc-logo {
  width:68px; height:68px; flex:none; border-radius:18px; background:#fff; color:var(--accent);
  display:flex; align-items:center; justify-content:center; font-size:32px; font-weight:800;
  box-shadow: 0 3px 10px rgba(0,0,0,.25); background-size:cover; background-position:center;
}
.pc-title { flex:1; min-width:0; color:#fff; font-size:32px; font-weight:700; line-height:1.1; text-shadow:0 1px 6px rgba(0,0,0,.4); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pc-route {
  flex:none; display:flex; align-items:center; gap:7px; height:52px; padding:0 20px;
  background:#fff; color:var(--accent); border:none; border-radius:var(--r-pill); cursor:pointer;
  font-size:18px; font-weight:700; box-shadow:0 3px 12px rgba(0,0,0,.25); transition: transform .12s;
}
.pc-route .msym { font-size:22px; }
.pc-route:active { transform: scale(.95); }

.pc-body { padding: 22px 24px 24px; }
.pc-status-row { display:flex; align-items:center; justify-content:space-between; }
.pc-status { display:flex; align-items:center; gap:9px; font-size:18px; font-weight:700; color: var(--ok); }
.pc-status .dot { width:11px; height:11px; border-radius:50%; background: var(--ok); box-shadow:0 0 0 3px rgba(26,162,81,.18); }
.pc-status.closed { color: var(--no); }
.pc-status.closed .dot { background: var(--no); box-shadow:0 0 0 3px rgba(224,65,58,.18); }
.pc-num { font-size:14px; font-weight:700; color:var(--text-3); background:var(--surface-2); padding:6px 13px; border-radius:var(--r-pill); letter-spacing:.4px; }

.pc-grid { margin-top:18px; display:flex; flex-direction:column; gap:15px; }
.pc-row { display:flex; align-items:center; gap:14px; font-size:18px; color:var(--text-2); font-weight:500; }
.pc-row .ic { color:var(--text-3); font-size:27px; flex:none; }
.pc-row.hours { color: var(--accent); font-weight:700; }
.pc-row.hours .ic { color: var(--accent); }
.pc-desc { margin-top:18px; font-size:16px; color:var(--text-2); line-height:1.55; }
.pc-actions { display:flex; gap:10px; margin-top:22px; }
.pc-actions .btn { height:56px; font-size:17px; }
.btn { flex:1; height:46px; border-radius:var(--r-pill); border:none; cursor:pointer; font-size:14.5px; font-weight:700; display:flex; align-items:center; justify-content:center; gap:8px; transition: background .15s, box-shadow .15s, transform .12s; }
.btn .msym { font-size:19px; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color:#fff; }
.btn-primary:hover { background: var(--accent-2); box-shadow:0 4px 16px rgba(23,105,224,.45); }
.btn-ghost { background: var(--surface-2); color: var(--accent); }
.btn-ghost:hover { background: var(--accent-weak); }

/* ============================================================
   MODAL "RUTA DESDE"
   ============================================================ */
.modal-scrim {
  position: fixed; inset:0; z-index: 70; background: rgba(15,22,38,.4);
  display:flex; align-items:center; justify-content:center; padding: 24px;
  opacity:0; pointer-events:none; transition: opacity .2s;
}
.modal-scrim.open { opacity:1; pointer-events:auto; }
.route-modal {
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  width: 420px; max-width: 100%; padding: 22px 24px 24px;
  transform: translateY(16px) scale(.96); transition: transform .24s cubic-bezier(.2,.8,.2,1);
}
.modal-scrim.open .route-modal { transform: none; }
.rm-head { display:flex; align-items:center; gap:10px; }
.rm-head b { font-size:20px; font-weight:700; flex:1; }
.rm-ic { color: var(--accent); font-size:26px; }
.rm-close { width:36px; height:36px; border:none; background:var(--surface-2); border-radius:50%; cursor:pointer; color:var(--text-2); font-size:20px; display:flex; align-items:center; justify-content:center; }
.rm-stats { text-align:center; margin-top:16px; color:var(--text-2); font-size:14.5px; line-height:1.9; }
.rm-stats b { color:var(--text); font-weight:700; }
.rm-sep { color: var(--accent); font-weight:800; }
.rm-section { text-align:center; margin-top:18px; font-size:17px; font-weight:700; color:var(--text); }
.rm-hint { text-align:center; margin-top:6px; font-size:12.5px; color:var(--text-3); }
.rm-toggle { display:flex; justify-content:center; gap:10px; margin-top:14px; }
.rm-toggle button {
  width:58px; height:58px; border-radius:50%; border:2px solid var(--border); background:var(--surface);
  color:var(--text-2); cursor:pointer; display:flex; align-items:center; justify-content:center; font-size:27px;
  transition: all .15s;
}
.rm-toggle button.on { background: var(--accent); border-color: var(--accent); color:#fff; box-shadow:0 4px 14px rgba(23,105,224,.4); }
.rm-dest { margin-top:18px; padding-top:16px; border-top:1px solid var(--border); display:flex; align-items:center; gap:12px; }
.rm-dest .rd-ic { width:42px; height:42px; flex:none; border-radius:12px; display:flex; align-items:center; justify-content:center; color:#fff; font-size:22px; }
.rm-dest .rd-tx b { display:block; font-size:16px; font-weight:700; color:var(--text); }
.rm-dest .rd-tx span { font-size:12.5px; color:var(--text-2); }
.rm-steps { margin-top:14px; display:flex; flex-direction:column; gap:8px; }
.rm-steps-t { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.6px; color:var(--text-3); }
.rm-step { display:flex; align-items:center; gap:10px; font-size:13.5px; font-weight:600; color:var(--text-2); background:var(--surface-2); border-radius:var(--r-sm); padding:9px 12px; }
.rm-step .msym { font-size:19px; color:var(--accent); flex:none; }
.rm-step.aviso { color: var(--no); background: rgba(224,65,58,.08); }
.rm-step.aviso .msym { color: var(--no); }
.rm-go.is-disabled { opacity:.45; pointer-events:none; }
.rm-go { margin-top:18px; }
/* ============================================================
   MODAL AYUDA 3D (Estilo premium adaptado)
   ============================================================ */
.help-3d-modal {
  width: 540px !important;
  max-width: 100%;
}
.help-3d-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}
@media (min-width: 560px) {
  .help-3d-grid {
    flex-direction: row;
  }
}
.help-3d-card {
  flex: 1;
  background: var(--surface-2);
  border-radius: var(--r-sm);
  padding: 16px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.help-3d-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.h3d-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 4px;
}
.h3d-card-title .msym {
  color: var(--accent);
  font-size: 20px;
}
.h3d-item {
  display: flex;
  align-items: center;
  gap: 12px;
}
.h3d-icon-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.h3d-icon-circle .msym {
  font-size: 18px;
}
.h3d-text {
  display: flex;
  flex-direction: column;
}
.h3d-text b {
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
  line-height: 1.2;
}
.h3d-text span {
  font-size: 11.5px;
  color: var(--text-2);
  margin-top: 2px;
}
.h3d-footer {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}
.h3d-footer button {
  width: 100%;
  padding: 12px;
}

/* ============================================================
   MENÚ / INICIO (panel lateral)
   ============================================================ */
.directory {
  position: fixed; top:0; left:0; bottom:0; z-index:60; width:400px; max-width:90vw;
  background: var(--surface); box-shadow: var(--shadow-lg);
  transform: translateX(-105%); transition: transform .3s cubic-bezier(.3,0,.15,1);
  display:flex; flex-direction:column;
}
.directory.open { transform: translateX(0); }
.dir-head { display:flex; align-items:center; gap:12px; padding:18px 18px 12px; }
.dir-home { flex:1; display:flex; align-items:center; gap:10px; border:none; background:transparent; cursor:pointer; font-size:20px; font-weight:700; color:var(--text); }
.dir-home .msym { color: var(--accent); font-size:26px; }
.dir-head .close { width:40px; height:40px; border:none; background:var(--surface-2); border-radius:50%; cursor:pointer; color:var(--text-2); font-size:22px; display:flex; align-items:center; justify-content:center; }
.dir-scroll { flex:1; overflow-y:auto; padding:0 0 28px; }
.dir-section-t { padding:14px 18px 8px; font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.7px; color:var(--text-3); }
.dir-section-t span { color: var(--accent); }

/* Grilla de categorías (Inicio) */
.quick-cats { display:grid; grid-template-columns: repeat(3, 1fr); gap:10px; padding:0 16px; }
.qc {
  background: var(--surface-2); border:none; border-radius:var(--r-md); cursor:pointer;
  padding:16px 8px 12px; display:flex; flex-direction:column; align-items:center; gap:9px;
  transition: transform .12s, box-shadow .15s, background .15s;
}
.qc:hover { background: var(--accent-weak); box-shadow: var(--shadow-sm); }
.qc:active { transform: scale(.95); }
.qc .qc-ic { width:46px; height:46px; border-radius:14px; display:flex; align-items:center; justify-content:center; color:#fff; font-size:25px; }
.qc .qc-tx { font-size:11.5px; font-weight:600; color:var(--text); text-align:center; line-height:1.2; }
.qc.on { background: var(--accent-weak); outline:2px solid var(--accent); }

/* Chips de filtro */
.dir-filters { padding:8px 16px 4px; display:flex; flex-wrap:wrap; gap:8px; }
.chip { display:inline-flex; align-items:center; gap:7px; border:1.5px solid var(--border); background:var(--surface); border-radius:var(--r-pill); padding:7px 13px; font-size:12.5px; font-weight:600; color:var(--text-2); cursor:pointer; user-select:none; transition: all .14s; }
.chip .dot { width:10px; height:10px; border-radius:50%; }
.chip.on { background: var(--accent-weak); border-color: var(--accent); color: var(--accent); }
:root[data-tema="oscuro"] .chip.on { color: var(--text); }

.dir-list { padding:6px 0 10px; }
.dir-group-title { display:flex; align-items:center; gap:8px; padding:14px 18px 6px; font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.6px; color:var(--text-3); }
.dir-group-title .dot { width:9px; height:9px; border-radius:50%; }
.dir-item { display:flex; align-items:center; gap:13px; padding:11px 18px; cursor:pointer; border:none; background:transparent; width:100%; text-align:left; }
.dir-item:hover { background: var(--surface-2); }
.dir-item .di-ic { width:40px; height:40px; flex:none; border-radius:12px; display:flex; align-items:center; justify-content:center; color:#fff; font-size:20px; }
.dir-item .di-tx { min-width:0; flex:1; }
.dir-item .di-tx b { font-size:14.5px; font-weight:600; color:var(--text); display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dir-item .di-tx span { font-size:12px; color:var(--text-2); }
.dir-item .di-num { font-size:12px; color:var(--text-3); font-weight:700; }

/* Leyenda */
.legend { position: fixed; left:16px; bottom:84px; z-index:30; background:var(--surface); border-radius:var(--r-sm); box-shadow:var(--shadow-sm); padding:11px 13px; font-size:12px; max-width:210px; transition: opacity .2s; }
.legend h4 { font-size:10.5px; text-transform:uppercase; letter-spacing:.6px; color:var(--text-3); margin-bottom:8px; font-weight:700; }
.legend .lg-row { display:flex; align-items:center; gap:9px; padding:2.5px 0; color:var(--text-2); font-weight:500; }
.legend .lg-row .dot { width:11px; height:11px; border-radius:4px; flex:none; }
.legend.hidden { display:none; }

/* Scrim */
.scrim { position:fixed; inset:0; background:rgba(15,22,38,.35); z-index:55; opacity:0; pointer-events:none; transition:opacity .22s; }
.scrim.show { opacity:1; pointer-events:auto; }

/* Toast */
.toast { position:fixed; bottom:146px; left:50%; transform:translateX(-50%); background:#1f2733; color:#fff; padding:13px 22px; border-radius:var(--r-pill); font-size:13.5px; font-weight:600; z-index:80; box-shadow:var(--shadow-lg); opacity:0; pointer-events:none; transition:opacity .25s; }
.toast.show { opacity:1; }

/* Tema */
.theme-toggle { position:fixed; top:16px; right:16px; z-index:35; width:48px; height:48px; border:none; border-radius:50%; background:var(--surface); box-shadow:var(--shadow); cursor:pointer; color:var(--text); display:flex; align-items:center; justify-content:center; font-size:22px; }
.theme-toggle:hover { background:var(--surface-2); color:var(--accent); }

/* ============================================================
   PANEL DE OPCIONES (lateral fijo, al lado del mapa) — tótem 4K
   ============================================================ */
.welcome {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 30;
  width: var(--side-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  box-shadow: 8px 0 40px rgba(20,28,46,.08);
  display: flex; flex-direction: column;
  gap: clamp(14px, 1.6vmin, 36px);
  padding: clamp(16px, 1.8vmin, 48px);
  overflow-y: auto;
}
.welcome-inner { display: flex; flex-direction: column; gap: clamp(14px, 1.6vmin, 36px); }
.welcome-head { display: flex; align-items: center; gap: clamp(12px, 1.4vmin, 28px); }
.welcome-logo {
  width: clamp(48px, 5vmin, 120px); height: clamp(48px, 5vmin, 120px); flex: none;
}
.welcome-logo img { width: 100%; height: 100%; object-fit: contain; }
.welcome-head h1 { font-size: clamp(18px, 2.1vmin, 52px); font-weight: 700; color: var(--text); line-height: 1.1; }
.welcome-head h1 b { color: #991d39; }
.welcome-head p { font-size: clamp(12px, 1.2vmin, 30px); color: var(--text-2); margin-top: .3em; font-weight: 500; }

/* El buscador real (.topbar) se monta acá adentro por JS */
#welcomeSearchHost { display: block; }
.welcome .topbar {
  position: static; left: auto; top: auto; right: auto;
  max-width: none; width: 100%; z-index: auto;
}
.welcome .topbar .searchbox { height: clamp(48px, 4.4vmin, 104px); }
.welcome .topbar .brand { display: none; }   /* panel angosto: priorizamos el input */

.welcome-cats-t {
  font-size: clamp(11px, 1vmin, 26px); font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-3); padding: 0 .2em;
}
.welcome-grid {
  display: grid; gap: clamp(10px, 1.1vmin, 26px);
  grid-template-columns: repeat(auto-fill, minmax(clamp(118px, 9vmin, 300px), 1fr));
}
.wtile {
  background: var(--surface); border: 1px solid var(--border); border-radius: clamp(14px, 1.4vmin, 32px); cursor: pointer;
  box-shadow: var(--shadow-sm); padding: clamp(14px, 1.6vmin, 40px) clamp(8px, 1vmin, 22px);
  display: flex; flex-direction: column; align-items: center; gap: clamp(8px, 1vmin, 22px);
  transition: transform .12s, box-shadow .15s, border-color .15s;
}
.wtile:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--accent-weak); }
.wtile:active { transform: scale(.96); }
.wtile.is-active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-weak), var(--shadow); }
.wtile-ic {
  width: clamp(44px, 4.6vmin, 110px); height: clamp(44px, 4.6vmin, 110px);
  border-radius: clamp(12px, 1.2vmin, 26px); display:grid; place-items:center; color:#fff;
}
.wtile-ic .msym { font-size: clamp(24px, 2.6vmin, 62px); }
.wtile-tx { font-size: clamp(12px, 1.2vmin, 30px); font-weight: 600; color: var(--text); text-align:center; line-height:1.15; }

/* Controles flotantes corridos para no quedar tapados por el panel */
.floorPicker { left: calc(50% + var(--side-w) / 2); }
.legend { display: none; }   /* las categorías ya viven en el panel */

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
  .topbar { left:10px; right:10px; top:10px; max-width:none; }
  .placecard { left:10px; right:10px; bottom:84px; width:auto; max-width:none; }
  .legend { display:none; }
  .mapTools { right:10px; bottom:82px; }
  .floorPicker { bottom:14px; }
  .fab3d { top:12px; bottom:auto; height:40px; padding:0 16px; font-size:13px; }
  .pc-title { font-size:21px; }
}

/* Tótem vertical (portrait alto): controles grandes y táctiles */
@media (orientation: portrait) and (min-height: 900px) {
  :root { --ctrl: 64px; --ctrl-font: 32px; }
  .searchbox { height:66px; }
  .searchbox input { font-size:19px; }
  .icon-btn { width:66px; height:66px; font-size:30px; }
  .theme-toggle { width:58px; height:58px; font-size:26px; }
  .floorPicker button { min-width:70px; height:60px; }
  .floorPicker button b { font-size:19px; }
  .placecard { width:auto; left:24px; right:24px; bottom:110px; }
  .pc-head { height: 320px; }
  .pc-logo { width: 78px; height: 78px; font-size: 36px; border-radius: 18px;}
  .pc-title { font-size: 40px; }
  .pc-num { font-size: 16px; }
  .pc-status { font-size: 20px; }
  .pc-row { font-size: 21px; }
  .pc-row .ic { font-size: 28px; }
  .pc-desc { font-size: 18px; }
  .pc-route { height: 60px; font-size: 22px; padding: 0 24px; }
  .pc-route .msym { font-size: 24px; }
  .btn { height: 62px; font-size: 19px; }
  .topbar { top:24px; left:24px; right:24px; max-width:none; }
  .mapTools { bottom:120px; right:24px; gap:16px; }
  .route-modal { width:480px; padding:28px 30px 30px; }
  .rm-head b { font-size:24px; }
  .quick-cats { gap:14px; }
}



/* ============================================================
   MODO ATRACCIÓN — publicidades a pantalla completa (idle)
   ============================================================ */
.attract {
  position: fixed; inset: 0; z-index: 200;
  background: #000;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.attract[hidden] { display: none; }
.attract-media { width: 100%; height: 100%; }
.attract-media img,
.attract-media video {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.attract-hint {
  position: absolute; bottom: 4vmin; left: 50%; transform: translateX(-50%);
  color: #fff; background: rgba(0,0,0,.55); backdrop-filter: blur(4px);
  padding: .6em 1.5em; border-radius: 999px;
  font-family: var(--font); font-weight: 600;
  font-size: clamp(14px, 1.8vmin, 34px);
  animation: attractPulse 2s ease-in-out infinite;
}
@keyframes attractPulse { 0%,100%{opacity:.65} 50%{opacity:1} }

/* ============================================================
   BARRA DE ACCIONES (vertical, extremo izquierdo) + LISTA POR RUBRO
   Estilo "tótem Andino": barra azul fija + lista a pantalla completa
   ============================================================ */
:root { --act-w: clamp(72px, 5.4vw, 150px); }

/* La barra ocupa el extremo izquierdo: corremos panel y mapa hacia la derecha */
.actionbar {
  position: fixed; left: 0; top: 0; bottom: 0; width: var(--act-w);
  z-index: 180; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: clamp(10px, 2vmin, 34px);
  background: linear-gradient(180deg, #1769e0, #0f4fb0);
  box-shadow: 4px 0 24px rgba(15,28,60,.22);
}
.ab-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; width: clamp(56px, 4.4vw, 120px); aspect-ratio: 1;
  border: none; border-radius: clamp(14px, 1.4vmin, 26px);
  background: rgba(255,255,255,.12); color: #fff; cursor: pointer;
  transition: background .15s, transform .12s;
}
.ab-btn:hover { background: rgba(255,255,255,.22); }
.ab-btn:active { transform: scale(.93); }
.ab-btn .msym { font-size: clamp(24px, 2.5vmin, 58px); }
.ab-tx { font-family: var(--font); font-size: clamp(10px, 1vmin, 24px); font-weight: 600; letter-spacing: .2px; }
.ab-btn.on { background: #fff; color: var(--accent); box-shadow: 0 6px 18px rgba(0,0,0,.18); }

/* Desplazamos la interfaz a la derecha de la barra */
.welcome { left: var(--act-w); padding-top: clamp(30px, 4vmin, 96px); }  /* baja el contenido: entra bien el logo */
#mapWrap { left: calc(var(--act-w) + var(--side-w)); }
.floorPicker { left: calc(50% + (var(--act-w) + var(--side-w)) / 2); }

/* El menú viejo (botón de apps que abre el directorio) ya no se usa: lo ocultamos */
.welcome .topbar #btnMenu { display: none; }

/* ---- Lista de locales por rubro (panel lateral, deja ver el mapa) ---- */
.catlist {
  position: fixed; top: 0; bottom: 0; left: var(--act-w);
  width: var(--side-w); right: auto;
  z-index: 120; background: var(--surface, #fff);
  border-right: 1px solid var(--border, #e8ebf1);
  box-shadow: 18px 0 50px rgba(15,28,60,.12);
  display: flex; flex-direction: column;
  transform: translateX(-12px); opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.catlist.open { transform: none; opacity: 1; pointer-events: auto; }
.cl-head {
  display: flex; align-items: center; gap: clamp(12px, 1.4vmin, 30px);
  padding: clamp(18px, 2.2vmin, 52px) clamp(18px, 2vmin, 48px) clamp(14px, 1.6vmin, 36px);
  background: var(--surface, #fff); border-bottom: 1px solid var(--border, #eef1f6);
}
.cl-back {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
  border: 1.5px solid var(--border, #e3e7ee); background: var(--surface, #fff);
  color: var(--text, #1a2230); border-radius: var(--r-pill, 999px);
  padding: clamp(10px, 1.1vmin, 22px) clamp(16px, 1.6vmin, 34px);
  font-family: var(--font); font-weight: 600; font-size: clamp(14px, 1.4vmin, 32px);
  cursor: pointer; transition: background .15s, border-color .15s;
}
.cl-back:hover { border-color: var(--accent); color: var(--accent); }
.cl-back:active { transform: scale(.96); }
.cl-back .msym { font-size: 1.25em; }
.cl-head-tx h2 { font-family: var(--font); font-size: clamp(20px, 2.4vmin, 58px); font-weight: 700; color: var(--text, #1a2230); line-height: 1.05; }
.cl-count { font-family: var(--font); font-size: clamp(12px, 1.2vmin, 28px); color: var(--text-2, #5b6472); font-weight: 500; margin-top: .25em; }

.cl-body {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: clamp(12px, 1.4vmin, 32px) clamp(14px, 1.6vmin, 38px) clamp(40px, 6vmin, 140px);
  display: flex; flex-direction: column; gap: clamp(8px, 1vmin, 22px);
}
.cl-item {
  display: flex; align-items: center; gap: clamp(12px, 1.3vmin, 26px);
  padding: clamp(10px, 1.1vmin, 22px) clamp(12px, 1.3vmin, 26px);
  background: var(--surface, #fff); border: 1.5px solid var(--border, #e8ebf1);
  border-radius: var(--r-sm, 16px); cursor: pointer; text-align: left;
  transition: box-shadow .15s, transform .12s, border-color .15s;
}
.cl-item:hover { box-shadow: var(--shadow, 0 14px 40px rgba(20,28,46,.14)); border-color: var(--accent-weak, #bcd6fb); transform: translateY(-2px); }
.cl-item:active { transform: scale(.98); }
.cl-logo {
  flex-shrink: 0; width: clamp(46px, 3.6vw, 96px); aspect-ratio: 1;
  border-radius: 14px; background-size: cover; background-position: center;
  background-color: var(--bg-2, #eef1f6);
  display: flex; align-items: center; justify-content: center;
}
.cl-logo-i { color: #fff; font-family: var(--font); font-weight: 700; font-size: clamp(20px, 2vmin, 48px); }
.cl-logo-img { width: 62%; height: 62%; object-fit: contain; pointer-events: none; user-select: none; }
/* Logo de lista con el SVG nuevo: fondo blanco y RECORTE para mostrar sólo el
   ícono (el SVG trae el nombre abajo, que acá no queremos). */
.cl-logo.cl-svg { background: #fff; overflow: hidden; position: relative; border: 1px solid rgba(0,0,0,.06); }
.cl-logo.cl-svg .cl-logo-img { position: absolute; width: 171%; height: auto; max-width: none; left: -35.6%; top: -16.7%; }
.cl-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cl-tx b { font-family: var(--font); font-size: clamp(15px, 1.5vmin, 36px); font-weight: 700; color: var(--text, #1a2230); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-tx span { font-family: var(--font); font-size: clamp(12px, 1.15vmin, 26px); color: var(--text-2, #5b6472); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-floor {
  flex-shrink: 0; display: flex; align-items: center; gap: 5px;
  font-family: var(--font); font-size: clamp(12px, 1.15vmin, 26px); font-weight: 600;
  color: var(--accent, #1769e0); background: var(--accent-weak, #e8f1fe);
  padding: 6px 12px; border-radius: var(--r-pill, 999px); white-space: nowrap;
}
.cl-floor .msym { font-size: 1.2em; }
.cl-empty { grid-column: 1 / -1; text-align: center; padding: 8vmin 0; color: var(--text-2, #5b6472); font-family: var(--font); font-size: clamp(14px, 1.4vmin, 32px); }

/* ============================================================
   MENÚ TIPO ANDINO — sin barra lateral azul, logos grandes,
   todos los rubros entran en pantalla (sin scroll)
   ============================================================ */
/* Menú ancho con aire. Los cuadrados se miden por el ALTO (así SIEMPRE entran
   las 6 filas sin cortarse ni scroll); el menú es un poco más ancho para que
   quede espacio/aire alrededor de los logos. */
:root { --act-w: 0px; --side-w: clamp(380px, 51vh, 1010px); }
.actionbar { display: none !important; }

.welcome { left: 0; overflow: hidden; padding: clamp(12px, 1.6vmin, 48px); gap: clamp(8px, 1vmin, 26px); }
.welcome-inner { flex: 1 1 auto; min-height: 0; }
.welcome-grid {
  flex: 1 1 auto; min-height: 0;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 1fr;
  gap: clamp(10px, 1.4vmin, 34px);
}
.wtile {
  height: 100%; justify-content: center;
  padding: clamp(6px, 1vmin, 28px);
  gap: clamp(5px, .9vmin, 20px);
  border-radius: clamp(14px, 1.6vmin, 34px);
}
.wtile-ic {
  width: clamp(46px, 6vmin, 130px); height: clamp(46px, 6vmin, 130px);
  border-radius: clamp(12px, 1.4vmin, 30px);
}
.wtile-ic .msym { font-size: clamp(26px, 3.6vmin, 78px); }
.wtile-tx { font-size: clamp(13px, 1.6vmin, 36px); line-height: 1.05; }

/* ============================================================
   FICHA DEL LOCAL — panel lateral izquierdo (no tapa el mapa),
   con toda la info, y botón Ruta abajo que muta a accesibilidad
   ============================================================ */
.placecard {
  left: 0; right: auto; top: 0; bottom: 0;
  width: var(--side-w); max-width: none; height: 100vh;
  border-radius: 0; z-index: 130;
  display: flex; flex-direction: column;
  transform: translateX(-18px);
}
.placecard.open { transform: none; }
.pc-head { flex: none; }
.pc-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; }
.pc-actions { margin-top: auto; display: flex; gap: 12px; align-items: center; }

/* Botón Ruta grande al pie; muta a botón circular de accesibilidad */
.pc-route {
  position: static; flex: 1 1 auto; width: 100%;
  height: clamp(48px, 5.4vmin, 116px); border-radius: var(--r-pill);
  background: var(--accent); color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font); font-weight: 700; font-size: clamp(15px, 1.9vmin, 42px);
  box-shadow: 0 6px 22px rgba(23,105,224,.35); transition: background .15s, transform .12s;
}
.pc-route .msym { font-size: 1.3em; }
.pc-route:active { transform: scale(.96); }
.pc-route.is-acc {
  flex: none; width: clamp(48px, 5.4vmin, 116px); padding: 0; border-radius: 50%;
  background: var(--surface-2); color: var(--accent); box-shadow: var(--shadow-sm);
}
.pc-route.is-acc.on { background: var(--accent); color: #fff; box-shadow: 0 6px 22px rgba(23,105,224,.35); }

/* ============================================================
   SELECTOR DE PISOS al costado derecho (vertical) +
   CARTEL "Usted está en ..." arriba del mapa
   ============================================================ */
.floorPicker {
  left: auto; right: clamp(16px, 1.4vw, 48px); bottom: auto;
  top: 50%; transform: translateY(-50%);
  flex-direction: column; gap: clamp(6px, .8vmin, 16px);
  padding: clamp(6px, .8vmin, 16px);
}
.floorPicker button {
  width: 100%; min-width: clamp(64px, 5vw, 132px);
  height: clamp(50px, 5.2vmin, 120px);
}
.floorPicker button b { font-size: clamp(15px, 1.6vmin, 40px); }
.floorPicker button small { font-size: clamp(8.5px, .9vmin, 22px); }

.floor-banner {
  /* Ubicado en la zona vacía de arriba-izquierda del mapa (no centrado). */
  position: fixed; z-index: 34; top: clamp(70px, 12vmin, 240px);
  left: calc(var(--side-w) + clamp(60px, 10vw, 320px));
  right: auto; margin: 0; transform: translateX(-50%);
  width: max-content; max-width: 40vw;
  display: flex; align-items: center; gap: .45em;
  padding: clamp(9px, 1.3vmin, 30px) clamp(20px, 2.4vmin, 66px);
  background: var(--accent); color: #fff; border-radius: var(--r-pill);
  box-shadow: 0 8px 30px rgba(23,105,224,.42);
  font-family: var(--font); font-weight: 600; letter-spacing: .3px;
  font-size: clamp(15px, 2.1vmin, 50px);
  pointer-events: none; text-align: center; white-space: nowrap;
}
.floor-banner b { font-weight: 800; }
.floor-banner .msym { font-size: 1.25em; font-variation-settings: "FILL" 1; }

/* ============================================================
   ANIMACIÓN TIPO ASCENSOR al cambiar de piso
   (sube si vas más arriba, baja si vas más abajo)
   ============================================================ */
@keyframes elevRise { 0% { transform: translateY(9vh); opacity: .35; } 100% { transform: translateY(0); opacity: 1; } }
@keyframes elevFall { 0% { transform: translateY(-9vh); opacity: .35; } 100% { transform: translateY(0); opacity: 1; } }
#mapWrap.floor-up   { animation: elevRise .55s cubic-bezier(.22,.9,.25,1); }
#mapWrap.floor-down { animation: elevFall .55s cubic-bezier(.22,.9,.25,1); }

/* ============================================================
   ACCESOS — flecha a la entrada + nombre de calle (mapa oficial)
   ============================================================ */
.floorSvg .acc-line { stroke: #39414f; stroke-width: 6; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.floorSvg .acc-head { fill: #39414f; }
.floorSvg .acc-txt {
  font-family: var(--font); font-weight: 800; font-size: 13px; letter-spacing: .2px;
  fill: #2b3444; paint-order: stroke; stroke: #fff; stroke-width: 3.4px; stroke-linejoin: round;
  pointer-events: none; user-select: none;
}
:root[data-tema="oscuro"] .floorSvg .acc-line { stroke: #c2c9d4; }
:root[data-tema="oscuro"] .floorSvg .acc-head { fill: #c2c9d4; }
:root[data-tema="oscuro"] .floorSvg .acc-txt { fill: #eaedf2; stroke: #14161c; }

/* ============================================================
   RUBROS (zio) — recuadros CUADRADOS y más chicos, con el logo
   de línea blanca sobre fondo oscuro y el nombre debajo.
   ============================================================ */
.welcome-grid {
  grid-template-columns: repeat(2, 1fr);    /* 2 columnas iguales */
  grid-auto-rows: max-content;
  justify-content: stretch;
  column-gap: clamp(10px, 1.4vmin, 30px);
  row-gap: clamp(10px, 1.4vmin, 30px);
  overflow-y: auto;                         /* con scroll... */
  overflow-x: hidden;
  align-content: start;
  flex: 1 1 auto; min-height: 0;
  padding: 4px 2px 14px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;                    /* ...pero SIN barra visible (Firefox) */
  -ms-overflow-style: none;                 /* (Edge/IE) */
}
.welcome-grid::-webkit-scrollbar { width: 0; height: 0; display: none; }  /* (Chrome/Safari) */
/* Las tarjetas nuevas (SVG) ya son el recuadro blanco con ícono + nombre. */
.wtile {
  aspect-ratio: 1 / 1;
  width: 100%; min-width: 0;
  background: transparent; border: none; box-shadow: none; padding: 0;
  border-radius: clamp(14px, 1.6vmin, 30px);
  display: block; cursor: pointer;
  transition: transform .12s ease;
}
.wtile:hover { transform: translateY(-2px); }
.wtile:active { transform: scale(.97); }
.wtile-img {
  width: 100%; height: 100%; object-fit: contain; display: block;
  /* Sombra sutil y ceñida (no un "plato" gris alrededor). */
  filter: drop-shadow(0 3px 5px rgba(0,0,0,.10));
  pointer-events: none; user-select: none;
}
.wtile.is-active .wtile-img,
.wtile.is-active .wtile-ic {
  outline: 3px solid var(--accent); outline-offset: -1px;
  border-radius: clamp(14px, 1.6vmin, 30px);
}
/* Respaldo (Deportes, sin SVG): mismo look de tarjeta blanca con ícono oscuro. */
.wtile .wtile-ic {
  width: 100%; height: 100%; background: #fff; overflow: hidden;
  border-radius: clamp(14px, 1.6vmin, 30px);
  box-shadow: 0 3px 5px rgba(0,0,0,.10);
  container-type: inline-size;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6%;
}
.wtile .wtile-ic .msym { color: #434343; font-size: 34cqw; line-height: 1; font-weight: 300; max-width: 100%; overflow: hidden; }
.wtile-ic-tx { color: #434343; font-weight: 600; text-align: center; line-height: 1.1; font-size: 11cqw; }
.wtile-tx { display: none; }   /* el nombre ya viene en el SVG */

/* Encabezado más compacto → la grilla se queda con más alto → cuadrados/logos
   más grandes (sin scroll). */
/* Encabezado con MÁS AIRE (el menú scrollea, así que sobra lugar). */
.welcome { padding: clamp(14px, 1.8vmin, 48px); gap: clamp(10px, 1.3vmin, 32px); }
.welcome-inner { gap: clamp(16px, 2.2vmin, 52px); }
/* Título destacado, TODO EN UNA LÍNEA (se auto-ajusta al ancho disponible). */
.welcome-head { gap: clamp(12px, 1.5vmin, 30px); }
.welcome-tx { flex: 1 1 auto; min-width: 0; container-type: inline-size; }
.welcome-head h1 { font-size: clamp(16px, 6.1cqw, 72px); font-weight: 800; line-height: 1.1;
  white-space: nowrap; }
.welcome-head p { display: none; }
.welcome-logo { width: clamp(52px, 5.2vmin, 128px); height: clamp(52px, 5.2vmin, 128px); }
/* Buscador MÁS GRANDE (barra alta, casi hasta los íconos). */
.welcome .topbar .searchbox { height: clamp(60px, 6.4vmin, 156px); padding: 0 14px 0 22px; }
.welcome .topbar .searchbox .ic-search { font-size: clamp(24px, 2.6vmin, 62px); }
.welcome .topbar .searchbox input { font-size: clamp(16px, 1.9vmin, 46px); }
.welcome-cats-t { font-size: clamp(14px, 1.5vmin, 38px); margin: 0; letter-spacing: .12em; }
