/* ══════════════════════════════════════════════════════════════
   GUÍA HUATULCO — Minimalismo oaxaqueño
   Arena · barro · turquesa del Pacífico · greca de Mitla
   ══════════════════════════════════════════════════════════════ */

:root {
  --sand: #F4EEE4;
  --paper: #FFFCF7;
  --paper-2: #F8F3EA;
  --ink: #1D1A17;
  --ink-2: #4D453D;
  --ink-3: #887D71;
  --line: #EAE2D6;
  --line-2: #DDD3C5;
  --barro: #B4532A;
  --barro-2: #96431F;
  --teal: #1F8A8C;
  --open: #2E7A53;
  --closed: #A3402E;
  --user: #2F6FED;

  --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  --r-lg: 24px;
  --r-md: 16px;
  --r-sm: 12px;
  --shadow-float: 0 10px 30px rgba(58, 40, 18, .13), 0 2px 6px rgba(58, 40, 18, .07);
  --shadow-sm: 0 1px 2px rgba(58, 40, 18, .08), 0 3px 10px rgba(58, 40, 18, .07);
  --ease: cubic-bezier(.2, .8, .2, 1);

  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --top-h: 112px;
  --panel-w: 400px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--sand);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
  overscroll-behavior: none;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; }
[hidden] { display: none !important; }
.ic { width: 20px; height: 20px; flex: none; }

.app { position: fixed; inset: 0; overflow: hidden; overflow: clip; }
.map { position: absolute; inset: 0; background: #F3EDE3; }

/* ── Barra superior ─────────────────────────────────────────── */

.top {
  position: absolute; z-index: 20; left: 0; right: 0; top: 0;
  padding: calc(var(--safe-t) + 10px) 12px 0;
  pointer-events: none;
}
.top > * { pointer-events: auto; }
.top-row { display: flex; gap: 8px; align-items: center; }

.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand-mark { width: 44px; height: 44px; border-radius: 12px; display: block; box-shadow: var(--shadow-sm); }
.brand-text { display: none; flex-direction: column; line-height: 1; text-align: left; }
.brand-text b { font-family: var(--serif); font-weight: 400; font-size: 25px; letter-spacing: -.01em; }
.brand-text small { font-size: 11px; color: var(--ink-3); letter-spacing: .08em; text-transform: uppercase; margin-top: 3px; }

.search {
  flex: 1; min-width: 0; height: 44px; display: flex; align-items: center; gap: 8px;
  padding: 0 6px 0 14px; background: var(--paper); border-radius: 999px; box-shadow: var(--shadow-sm);
}
.search-ic { color: var(--ink-3); display: grid; }
.search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; height: 100%;
  font-size: 15.5px; -webkit-appearance: none; appearance: none;
}
.search input::placeholder { color: var(--ink-3); }
.search input::-webkit-search-cancel-button { display: none; }
.search-clear { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); background: var(--paper-2); }
.search-clear .ic { width: 16px; height: 16px; }

.lang {
  flex: none; height: 44px; min-width: 44px; padding: 0 12px; border-radius: 999px;
  background: var(--paper); box-shadow: var(--shadow-sm); font-size: 12.5px; font-weight: 600; letter-spacing: .08em;
}

.chips {
  display: flex; gap: 6px; overflow-x: auto; padding: 10px 12px 12px; margin: 0 -12px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-padding: 12px;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px 0 11px;
  border-radius: 999px; background: var(--paper); box-shadow: var(--shadow-sm);
  font-size: 13.5px; font-weight: 500; color: var(--ink-2); white-space: nowrap;
  transition: background .2s, color .2s;
}
.chip .ic { width: 16px; height: 16px; color: var(--c, var(--ink)); }
.chip[aria-pressed="true"] { background: var(--c, var(--ink)); color: #fff; }
.chip[aria-pressed="true"] .ic { color: #fff; }

/* ── Botones flotantes del mapa ─────────────────────────────── */

.fabs {
  position: absolute; z-index: 15; right: 12px;
  bottom: calc(var(--peek-h, 120px) + 14px);
  display: flex; flex-direction: column; gap: 8px;
  transition: opacity .2s, transform .35s var(--ease);
}
.app[data-panel="half"] .fabs, .app[data-panel="full"] .fabs { opacity: 0; pointer-events: none; transform: translateY(8px); }
.fab {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--paper); box-shadow: var(--shadow-sm); color: var(--ink);
}
.fab.on { color: var(--user); }
.fab.busy .ic { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Pines ──────────────────────────────────────────────────── */

.pin {
  --size: 34px;
  width: var(--size); height: var(--size); border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  background: var(--c); border: 2.5px solid #fff;
  box-shadow: 0 2px 6px rgba(40, 26, 10, .28);
  transition: width .2s var(--ease), height .2s var(--ease), transform .2s var(--ease), box-shadow .2s;
  cursor: pointer;
}
.pin .ic { width: 17px; height: 17px; stroke-width: 1.9; transition: opacity .15s; }
.pin.example { border-style: dashed; }
.pin:hover { transform: scale(1.08); }
.pin.sel {
  --size: 46px; z-index: 5;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--c) 28%, transparent), 0 6px 16px rgba(40, 26, 10, .35);
}
.pin.sel .ic { width: 22px; height: 22px; }
.pin.off { display: none; }
.map.z-far .pin:not(.sel) { --size: 13px; border-width: 2px; }
.map.z-far .pin:not(.sel) .ic { opacity: 0; }
.map.z-far .pin.example:not(.sel) { border-style: solid; }

.me {
  width: 18px; height: 18px; border-radius: 50%; background: var(--user); border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .3); position: relative;
}
.me::after {
  content: ''; position: absolute; inset: -12px; border-radius: 50%;
  background: color-mix(in srgb, var(--user) 25%, transparent); animation: pulse 2s ease-out infinite;
}
@keyframes pulse { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }

/* ── Panel (hoja inferior en celular, columna en escritorio) ── */

.panel {
  position: absolute; z-index: 30; left: 0; right: 0;
  top: calc(var(--top-h) + 6px);
  height: calc(100% - var(--top-h) - 6px);
  background: var(--paper);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  box-shadow: 0 -6px 30px rgba(58, 40, 18, .14);
  transform: translateY(var(--y, 70vh));
  transition: transform .42s var(--ease);
  display: flex; flex-direction: column;
  touch-action: none;
  overflow: hidden;
  overflow: clip;
}
.panel.dragging { transition: none; }
.panel-grip { flex: none; height: 22px; display: grid; place-items: center; cursor: grab; touch-action: none; }
.panel-grip span { width: 38px; height: 5px; border-radius: 3px; background: var(--line-2); }
.panel-scroll {
  flex: 1; min-height: 0; overflow: hidden; overscroll-behavior: contain;
  padding-bottom: calc(var(--safe-b) + 16px);
}
.panel[data-state="full"] .panel-scroll { overflow-y: auto; touch-action: pan-y; -webkit-overflow-scrolling: touch; }
.panel[data-view="detail"] .panel-grip {
  position: absolute; z-index: 4; top: 0; left: 0; right: 0;
}
.panel[data-view="detail"] .panel-grip span { background: rgba(255, 255, 255, .85); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }

.d-bar {
  position: absolute; z-index: 3; top: 0; left: 0; right: 0; height: 56px; padding: 14px 12px 0 20px;
  display: flex; align-items: center; gap: 12px; background: var(--paper); border-bottom: 1px solid var(--line);
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.d-bar b { flex: 1; min-width: 0; font-family: var(--serif); font-weight: 400; font-size: 21px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-bar-close { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); }
.d-bar-close .ic { width: 17px; height: 17px; }
.panel.scrolled[data-view="detail"] .d-bar { opacity: 1; pointer-events: auto; }
.panel.scrolled[data-view="detail"] .panel-grip span { background: var(--line-2); box-shadow: none; }

/* Lista */
.list-head { padding: 2px 20px 14px; }
.list-head h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.05; letter-spacing: -.01em; }
.list-head p { margin: 4px 0 0; color: var(--ink-3); font-size: 13px; }

.cards { list-style: none; margin: 0; padding: 0 12px; }
.card {
  width: 100%; display: flex; gap: 14px; align-items: center; text-align: left;
  padding: 10px 8px; border-radius: var(--r-md); transition: background .15s;
}
.card:hover, .card:focus-visible { background: var(--paper-2); outline: none; }
.cards li + li .card { border-top: 1px solid var(--line); border-radius: 0; }
.cards li + li .card:hover { border-radius: var(--r-md); border-top-color: transparent; }
.thumb {
  flex: none; width: 74px; height: 74px; border-radius: 14px; overflow: hidden; position: relative;
  background-color: color-mix(in srgb, var(--c) 13%, var(--paper));
  display: grid; place-items: center; color: var(--c);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .ic { width: 26px; height: 26px; stroke-width: 1.5; }
.card-body { min-width: 0; flex: 1; }
.kicker {
  display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kicker .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c); flex: none; }
.card-title { font-size: 16.5px; font-weight: 600; margin-top: 2px; line-height: 1.25; letter-spacing: -.01em; }
.card-sub { color: var(--ink-2); font-size: 13.5px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; margin-top: 4px; font-size: 13px; color: var(--ink-3); }
.meta > * + *::before { content: '·'; margin: 0 6px; color: var(--line-2); }
.st-open { color: var(--open); font-weight: 600; }
.st-closed { color: var(--closed); font-weight: 600; }
.badge {
  display: inline-flex; align-items: center; height: 19px; padding: 0 7px; border-radius: 999px;
  font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-2); background: var(--paper-2); border: 1px dashed var(--line-2);
}
.empty { padding: 20px; text-align: center; color: var(--ink-3); }
.empty button, .btn-link { margin-top: 10px; color: var(--barro); font-weight: 600; }

.list-foot { padding: 18px 20px 6px; }
.biz-cta {
  display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r-md);
  background: var(--sand); text-decoration: none;
}
.biz-cta .greca { width: 46px; height: 46px; border-radius: 12px; flex: none; background-color: var(--barro); }
.biz-cta b { display: block; font-size: 14.5px; }
.biz-cta span { color: var(--barro); font-weight: 600; font-size: 13.5px; }
.credits { margin: 16px 0 0; font-size: 11.5px; color: var(--ink-3); line-height: 1.5; }
.credits a { color: inherit; }

/* ── Ficha (detalle) ────────────────────────────────────────── */

.media { position: relative; background: var(--sand); }
.carousel {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  aspect-ratio: 16 / 10.5; touch-action: pan-x; overscroll-behavior-x: contain;
}
.panel[data-state="full"] .carousel { touch-action: pan-x pan-y; }
.carousel::-webkit-scrollbar { display: none; }
.slide { flex: none; width: 100%; height: 100%; scroll-snap-align: center; position: relative; margin: 0; overflow: hidden; }
.slide img, .slide video, .slide iframe { width: 100%; height: 100%; object-fit: cover; display: block; border: 0; background: #000; }
.slide img { background: var(--sand); }
.slide-video { background: #15120F; }
.slide-video .play {
  position: absolute; inset: 0; display: grid; place-items: center; width: 100%;
  background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.35));
}
.slide-video .play span {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 252, 247, .92); color: var(--ink); box-shadow: 0 6px 20px rgba(0,0,0,.3);
}
.slide-video .play .ic { width: 26px; height: 26px; margin-left: 3px; }
.cover {
  aspect-ratio: 16 / 9; display: grid; place-items: center; color: var(--c);
  background-color: color-mix(in srgb, var(--c) 12%, var(--paper));
  background-repeat: repeat-x; background-position: left bottom 18px; background-size: 24px 12px;
}
.cover .ic { width: 44px; height: 44px; stroke-width: 1.3; }
.credit {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 14px 8px; pointer-events: none;
  font-size: 10.5px; color: rgba(255,255,255,.85); background: linear-gradient(transparent, rgba(0,0,0,.4));
}
.credit a { pointer-events: auto; text-decoration: none; }
.dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.55); transition: width .2s, background .2s; }
.dots i.on { width: 16px; border-radius: 3px; background: #fff; }
.media-btn {
  position: absolute; top: 14px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 252, 247, .9); color: var(--ink); box-shadow: 0 2px 10px rgba(0,0,0,.18);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); z-index: 5;
}
.media-btn.close { right: 14px; }
.media-btn .ic { width: 18px; height: 18px; }
.video-pill {
  position: absolute; z-index: 5; left: 14px; top: 14px; display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px 0 9px; border-radius: 999px; background: rgba(29,26,23,.72); color: #fff;
  font-size: 12px; font-weight: 600; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.video-pill .ic { width: 14px; height: 14px; }
.count {
  position: absolute; z-index: 5; right: 14px; bottom: 12px; height: 22px; padding: 0 8px; border-radius: 999px;
  display: none; align-items: center; background: rgba(29,26,23,.6); color: #fff; font-size: 11px; font-weight: 600;
}

.d-body { padding: 18px 20px 8px; }
.d-title { margin: 6px 0 0; font-family: var(--serif); font-weight: 400; font-size: 36px; line-height: 1.02; letter-spacing: -.015em; }
.d-tagline { margin: 6px 0 0; font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1.25; color: var(--ink-2); }
.d-body .meta { font-size: 14px; margin-top: 10px; }

.actions { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; margin: 18px -6px 4px; }
.act { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 500; color: var(--ink-2); text-decoration: none; padding: 2px 0; white-space: nowrap; letter-spacing: -.01em; }
.act span {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: var(--paper-2); border: 1px solid var(--line); color: var(--ink); transition: transform .15s;
}
.act:active span { transform: scale(.94); }
.act.primary span { background: var(--barro); border-color: var(--barro); color: #fff; }
.act.primary { color: var(--barro-2); font-weight: 600; }

.greca-rule { height: 12px; margin: 18px 0; background-repeat: repeat-x; background-size: 24px 12px; opacity: .5; }

.d-desc { margin: 0; font-size: 16px; line-height: 1.62; color: var(--ink-2); white-space: pre-line; }
.sec { margin-top: 24px; }
.sec h3 { margin: 0 0 8px; font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.hours { list-style: none; margin: 0; padding: 0; font-size: 14.5px; }
.hours li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.hours li:last-child { border-bottom: 0; }
.hours li.today { font-weight: 600; }
.hours li.today span:first-child::after { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--barro); margin-left: 8px; vertical-align: middle; }
.hours .closed { color: var(--ink-3); }
.note { font-size: 14.5px; color: var(--ink-2); display: flex; gap: 8px; align-items: center; }
.note .ic { width: 18px; height: 18px; color: var(--ink-3); }

.rows { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line);
  text-decoration: none; font-size: 14.5px; color: var(--ink); min-width: 0;
}
.row:last-child { border-bottom: 0; }
.row .ic { color: var(--ink-3); }
.row b { font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .chev { width: 16px; height: 16px; color: var(--line-2); }
.row-btn { width: 100%; text-align: left; }
.coords { font-variant-numeric: tabular-nums; color: var(--ink-3); font-size: 13px; }

/* ── Bienvenida ─────────────────────────────────────────────── */

.welcome {
  position: absolute; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(29, 26, 23, .28); animation: fade .35s ease;
}
@keyframes fade { from { opacity: 0; } }
.welcome-card {
  width: 100%; max-height: 100%; overflow: auto; background: var(--paper);
  border-radius: var(--r-lg) var(--r-lg) 0 0; animation: rise .5s var(--ease);
  padding-bottom: calc(var(--safe-b) + 18px);
}
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
.welcome-img { position: relative; height: 30vh; min-height: 180px; max-height: 320px; background: var(--sand) center / cover no-repeat; }
.welcome-img .credit { font-size: 10px; }
.welcome-logo { position: absolute; left: 16px; top: calc(var(--safe-t) + 14px); width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); }
.welcome-lang {
  position: absolute; top: calc(var(--safe-t) + 14px); right: 14px; display: flex; padding: 3px; gap: 2px;
  border-radius: 999px; background: rgba(255, 252, 247, .9); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.welcome-lang button { height: 30px; padding: 0 12px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .06em; color: var(--ink-2); }
.welcome-lang button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.welcome-body { padding: 22px 24px 4px; }
.welcome-body .kicker { color: var(--barro); }
.welcome-body h1 { margin: 8px 0 0; font-family: var(--serif); font-weight: 400; font-size: 44px; line-height: 1; letter-spacing: -.02em; }
.welcome-body p { margin: 12px 0 0; font-size: 16px; color: var(--ink-2); line-height: 1.55; }
.welcome-body .greca-rule { margin: 20px 0 18px; }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 52px;
  border-radius: 999px; font-size: 15.5px; font-weight: 600; text-decoration: none;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-ghost { color: var(--ink); margin-top: 6px; }
.small-note { margin: 10px 0 0; font-size: 12px; color: var(--ink-3); text-align: center; }

/* ── Hoja "Cómo llegar" ─────────────────────────────────────── */

.modal {
  position: absolute; inset: 0; z-index: 70; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(29, 26, 23, .32); animation: fade .25s ease;
}
.modal-card {
  width: 100%; max-width: 440px; background: var(--paper); border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: 10px 18px calc(var(--safe-b) + 14px); animation: rise .35s var(--ease);
}
.modal-card h3 { margin: 12px 4px 2px; font-family: var(--serif); font-weight: 400; font-size: 26px; }
.modal-card p { margin: 0 4px 10px; color: var(--ink-3); font-size: 13.5px; }
.nav-opt {
  display: flex; align-items: center; gap: 14px; padding: 14px 6px; border-top: 1px solid var(--line);
  text-decoration: none; font-weight: 500; font-size: 16px;
}
.nav-opt .logo { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff; flex: none; }
.nav-opt .logo .ic { width: 19px; height: 19px; }
.nav-opt .chev { margin-left: auto; color: var(--line-2); width: 18px; height: 18px; }
.modal-card .btn-ghost { border-top: 1px solid var(--line); border-radius: 0; margin-top: 0; color: var(--ink-3); font-weight: 500; }

/* ── Visor de fotos ─────────────────────────────────────────── */

.lightbox { position: absolute; inset: 0; z-index: 80; background: #0E0C0A; animation: fade .2s ease; }
.lightbox .carousel { aspect-ratio: auto; height: 100%; touch-action: pan-x; }
.lightbox .slide img { object-fit: contain; background: #0E0C0A; }
.lightbox .media-btn { top: calc(var(--safe-t) + 14px); }
.lightbox .counter { position: absolute; top: calc(var(--safe-t) + 22px); left: 18px; color: rgba(255,255,255,.8); font-size: 13px; font-weight: 600; }
.lightbox .credit { padding-bottom: calc(var(--safe-b) + 12px); }

/* ── Aviso ──────────────────────────────────────────────────── */

.toast {
  position: absolute; z-index: 90; left: 50%; top: calc(var(--top-h) + 12px); transform: translate(-50%, -8px);
  max-width: calc(100% - 32px); padding: 11px 16px; border-radius: 14px; background: var(--ink); color: #fff;
  font-size: 13.5px; line-height: 1.4; box-shadow: var(--shadow-float); opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s var(--ease);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ── MapLibre ───────────────────────────────────────────────── */

.maplibregl-ctrl-top-right { top: calc(var(--top-h) + 4px); }
.maplibregl-ctrl-attrib.maplibregl-compact { background: rgba(255, 252, 247, .85); }
.maplibregl-ctrl-attrib a { color: var(--ink-2); }
.maplibregl-ctrl-group { border-radius: 14px !important; box-shadow: var(--shadow-sm) !important; overflow: hidden; }
.maplibregl-ctrl-group button { width: 40px; height: 40px; }
.maplibregl-canvas:focus-visible { outline: none; }

/* ── Escritorio ─────────────────────────────────────────────── */

@media (min-width: 960px) {
  .top { right: auto; width: calc(var(--panel-w) + 16px); padding: 16px 0 0 16px; }
  .top-row { flex-wrap: wrap; row-gap: 12px; }
  .brand { width: 100%; padding: 2px 2px 4px; }
  .brand-text { display: flex; }
  .brand-mark { width: 40px; height: 40px; border-radius: 11px; }
  .chips { margin: 0 -16px 0 -16px; padding: 10px 16px 12px; scroll-padding: 16px;
    mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 24px), transparent); }
  .panel {
    left: 16px; right: auto; width: var(--panel-w);
    top: calc(var(--top-h) + 4px); bottom: 16px; height: auto;
    border-radius: var(--r-lg); transform: none; box-shadow: var(--shadow-float); touch-action: auto;
  }
  .panel-grip { display: none; }
  .panel .panel-scroll { overflow-y: auto; touch-action: auto; }
  .panel-scroll { padding-top: 6px; }
  .panel[data-view="detail"] .panel-scroll { padding-top: 0; }
  .carousel { touch-action: auto; }
  .fabs { bottom: 120px; right: 16px; }
  .app[data-panel] .fabs { opacity: 1; pointer-events: auto; transform: none; }
  .welcome { align-items: center; padding: 24px; }
  .welcome-card { max-width: 460px; border-radius: var(--r-lg); }
  .welcome-lang { top: 14px; }
  .welcome-logo { top: 14px; }
  .modal { align-items: center; }
  .modal-card { border-radius: var(--r-lg); padding-bottom: 14px; }
  .toast { left: calc(var(--panel-w) + 32px + (100% - var(--panel-w) - 32px) / 2); top: 24px; }
  .maplibregl-ctrl-top-right { top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
