/* Fuentes propias (OFL, ver public/fuentes/OFL-*.txt): sin Google Fonts en producción */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(../fuentes/bricolage-grotesque-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(../fuentes/bricolage-grotesque-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(../fuentes/instrument-sans-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(../fuentes/instrument-sans-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ==========================================================
   TLAPI — estilos
   Paleta base (de la referencia): #1A120E #3A2418 #6B4A2E
   #A88462 #D5C4AE #4A4A46  + papel #F6F1EA y ámbar #C9772E
   ========================================================== */

:root {
  /* Paleta */
  --espresso: #1A120E;
  --cacao: #3A2418;
  --caramelo: #6B4A2E;
  --latte: #A88462;
  --arena: #D5C4AE;
  --grafito: #4A4A46;
  --papel: #F6F1EA;
  --blanco: #FFFDFB;
  --ambar: #C9772E;
  --ambar-claro: #E0954F;
  --verde: #3F6B3A;
  --rojo: #8E2B1F;
  /* Variantes de la paleta (estados y fondos suaves) */
  --verde-suave: #DDE6D4;
  --verde-oscuro: #2C4B28;
  --rojo-hover: #A33326;
  --arena-hover: #E3D6C4;
  --placeholder: #9A8C7E;
  --live-28: color-mix(in srgb, var(--ambar) 28%, transparent);
  --live-20: color-mix(in srgb, var(--ambar) 20%, transparent);
  --velo: color-mix(in srgb, var(--espresso) 50%, transparent);

  /* Tokens semánticos (tema claro = dueño) */
  --bg: var(--papel);
  --surface: var(--blanco);
  --surface-2: #EFE6DA;
  --text: var(--espresso);
  --text-2: var(--grafito);
  --line: #E6DACB;
  --line-soft: #EFE6DA;
  --btn-bg: var(--espresso);
  --btn-tx: var(--papel);
  --btn-hover: var(--cacao);
  --accent: var(--caramelo);
  --live: var(--ambar);
  --warn-bg: #F3D9C2;
  --warn-tx: #6B3A12;
  --map-bg: #E9DFD1;
  --map-block: #DFD2C1;
  --map-park: #CFC8A8;
  --map-street: #F6F1EA;

  /* Tipografía */
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Instrument Sans", system-ui, sans-serif;

  /* Forma */
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --shadow: 0 18px 40px -22px color-mix(in srgb, var(--espresso) 45%, transparent);

  /* Movimiento (ease-out fuerte, duraciones cortas) */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --t-fast: 160ms;
  --t-med: 240ms;
  --t-slow: 320ms;
}

/* Tema oscuro para el modo paseador */
.tema-paseador {
  --bg: var(--espresso);
  --surface: #261A14;
  --surface-2: var(--cacao);
  --text: var(--papel);
  --text-2: var(--arena);
  --line: #3A2418;
  --line-soft: #2E2019;
  --btn-bg: var(--arena);
  --btn-tx: var(--espresso);
  --btn-hover: #E6D8C5;
  --accent: var(--ambar-claro);
  --map-bg: #241913;
  --map-block: #2E2019;
  --map-park: #2F3324;
  --map-street: #3A2418;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }

h1, h2, .display {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  line-height: 1.02;
  font-weight: 700;
}

.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.accent { color: var(--accent); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible {
  outline: 3px solid var(--ambar);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ==========================================================
   BOTONES
   ========================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  background: var(--btn-bg);
  color: var(--btn-tx);
  font-weight: 650;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--t-fast) var(--ease-out),
              background-color var(--t-fast) var(--ease-out),
              border-color var(--t-fast) var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-lg { height: 56px; font-size: 17px; padding: 0 26px; }
.btn-sm { height: 38px; padding: 0 14px; font-size: 14px; border-radius: var(--r-sm); }
.btn-block { width: 100%; }
/* Botón con datos del usuario (ej. nombre de mascota): parte el texto en vez de salirse de la pantalla */
.btn-ajusta { max-width: 100%; height: auto; min-height: 48px; padding-block: 10px; white-space: normal; overflow-wrap: anywhere; text-align: center; }
.btn-lg.btn-ajusta { min-height: 56px; padding-block: 12px; }
.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
}
.btn-soft { background: var(--surface-2); color: var(--text); }
.btn-arena { background: var(--arena); color: var(--espresso); }
.btn-danger { background: var(--rojo); color: var(--papel); }

.icon-btn {
  width: 44px;
  height: 44px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  position: relative;
  text-decoration: none;
  transition: transform var(--t-fast) var(--ease-out);
}
.icon-btn:active { transform: scale(0.95); }
.icon-btn .dot {
  position: absolute; top: 9px; right: 10px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--ambar);
}

@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--btn-hover); }
  .btn-ghost:hover, .btn-soft:hover { background: var(--surface-2); border-color: var(--arena); }
  .btn-arena:hover { background: var(--arena-hover); }
  .btn-danger:hover { background: var(--rojo-hover); }
  .icon-btn:hover { border-color: var(--arena); }
}

/* ==========================================================
   CHIPS, BADGES, FORMULARIOS
   ========================================================== */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--t-fast) var(--ease-out),
              color var(--t-fast) var(--ease-out),
              transform var(--t-fast) var(--ease-out);
}
.chip:active { transform: scale(0.97); }
.chip.on { background: var(--btn-bg); color: var(--btn-tx); border-color: var(--btn-bg); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips.scroll::-webkit-scrollbar { display: none; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}
.badge-live { background: var(--espresso); color: var(--papel); }
.tema-paseador .badge-live { background: var(--papel); color: var(--espresso); }
.badge-ok { background: var(--verde-suave); color: var(--verde-oscuro); }
.badge-warn { background: var(--warn-bg); color: var(--warn-tx); }
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--live);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--ambar) 22%, transparent);
  animation: pulso 1.8s var(--ease-out) infinite;
}
@keyframes pulso {
  0%, 100% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ambar) 25%, transparent); }
  50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--ambar) 5%, transparent); }
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span, .field > label { font-size: 13px; font-weight: 650; color: var(--text-2); }
.input, .select, .textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  transition: border-color var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out);
}
.textarea { min-height: 84px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--caramelo);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--caramelo) 15%, transparent);
}
.input::placeholder, .textarea::placeholder { color: var(--placeholder); }
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.form-grid .wide { grid-column: 1 / -1; }

/* Grupo de campos tipo "lista" (como iOS) */
.stack-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 4px 16px;
}
.stack-form label {
  display: flex; flex-direction: column; gap: 2px;
  padding: 11px 0; border-bottom: 1px solid var(--line-soft);
}
.stack-form label:last-child { border-bottom: 0; }
.stack-form label span { font-size: 12px; font-weight: 650; color: var(--text-2); }
.stack-form input {
  border: 0; outline: 0; background: transparent; padding: 3px 0; font-size: 16px; font-weight: 500;
}

/* Interruptor */
.switch {
  width: 60px; height: 34px; border-radius: 999px; border: 0; padding: 3px;
  background: var(--grafito); cursor: pointer; display: inline-flex; flex: none;
  transition: background-color var(--t-med) var(--ease-out);
}
.switch::after {
  content: ""; width: 28px; height: 28px; border-radius: 50%; background: var(--papel);
  transition: transform var(--t-med) var(--ease-out);
}
.switch[aria-checked="true"] { background: var(--ambar); }
.switch[aria-checked="true"]::after { transform: translateX(26px); }

/* Segmentado */
.segmented {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px;
  padding: 4px; background: var(--surface-2); border-radius: 14px;
}
.segmented button {
  height: 40px; border: 0; border-radius: 11px; background: transparent;
  color: var(--text-2); font-weight: 650; cursor: pointer;
  transition: background-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out);
}
.segmented button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px color-mix(in srgb, var(--espresso) 12%, transparent); }

/* ==========================================================
   SUPERFICIES
   ========================================================== */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
}
.card-dark {
  background: var(--espresso);
  color: var(--papel);
  border-radius: var(--r-xl);
  padding: 22px;
}
.tema-paseador .card-dark { background: var(--papel); color: var(--espresso); }
.panel {
  background: var(--surface-2);
  border-radius: var(--r-lg);
  padding: 16px;
}
.list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.list-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--line-soft);
  color: var(--text); text-decoration: none; background: transparent;
  width: 100%; border-left: 0; border-right: 0; border-top: 0; text-align: left; cursor: pointer;
  transition: background-color var(--t-fast) var(--ease-out);
}
.list-row:last-child { border-bottom: 0; }
@media (hover: hover) and (pointer: fine) {
  a.list-row:hover, button.list-row:hover { background: var(--surface-2); }
}
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-main b { font-size: 16px; }
.row-main span { font-size: 14px; color: var(--text-2); }
.row-end { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }

.avatar {
  width: 52px; height: 52px; flex: none; border-radius: 17px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 18px;
  color: var(--espresso); background: var(--latte); overflow: hidden;
}
.avatar { position: relative; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 40px; height: 40px; border-radius: 13px; font-size: 14px; }
.avatar.lg { width: 96px; height: 96px; border-radius: 28px; font-size: 32px; }
.avatar.round { border-radius: 50%; }

.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { padding: 14px; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--line-soft); }
.stat:last-child { border-right: 0; }
.stat b { font-family: var(--font-display); font-size: 24px; letter-spacing: -0.02em; }
.stat span { font-size: 12px; color: var(--text-2); }

.tile {
  min-height: 108px; padding: 16px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line);
  display: flex; flex-direction: column; justify-content: space-between; gap: 12px;
  color: var(--text); text-decoration: none; cursor: pointer;
  transition: transform var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out);
}
.tile:active { transform: scale(0.98); }
.tile b { font-size: 16px; }
.tile small { font-size: 13px; color: var(--text-2); }
.tile svg { color: var(--accent); }
@media (hover: hover) and (pointer: fine) { .tile:hover { border-color: var(--arena); } }

.alert {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: 14px; font-size: 14px; line-height: 1.45;
  background: var(--warn-bg); color: var(--warn-tx);
}
.alert.soft { background: var(--surface-2); color: var(--text); }
.alert svg { flex: none; margin-top: 1px; }

.empty {
  border: 1.5px dashed var(--latte); border-radius: var(--r-lg);
  padding: 28px 20px; text-align: center; color: var(--text-2);
}

.progress { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.progress > span {
  display: block; height: 100%; background: var(--live); border-radius: 4px;
  transition: width var(--t-slow) var(--ease-out);
}

.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ==========================================================
   LAYOUT GENERAL
   ========================================================== */

.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.g4 { gap: 4px; } .g8 { gap: 8px; } .g12 { gap: 12px; } .g16 { gap: 16px; }
.g20 { gap: 20px; } .g24 { gap: 24px; } .g32 { gap: 32px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.section-title h2 { font-size: 22px; }
.section-title a { font-size: 14px; font-weight: 650; text-decoration: none; }

/* ==========================================================
   BARRA LATERAL Y PIE (estructura de Necutla, plan 2026-11-16)
   Cerrada solo muestra iconos; con hover o foco se abre encima del contenido.
   ≤ 860 px: barra superior + cajón que sale de la izquierda.
   ========================================================== */
:root {
  --side-w: 76px;
  --side-w-abierta: 264px;
  --side-pad: 15px;          /* (76 - 2 de borde - 44 del icono) / 2 */
  --side-marca: var(--caramelo);
  --t-lenta: 450ms;          /* apertura de la barra y del cajón (excepción de plans/CLAUDE.md) */
}
.tema-paseador { --side-marca: var(--latte); }

.saltar {
  position: fixed; left: 12px; top: -60px; z-index: 1200; padding: 10px 14px; border-radius: var(--r-sm);
  background: var(--btn-bg); color: var(--btn-tx); font-weight: 650; text-decoration: none;
}
.saltar:focus { top: 12px; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); padding: 0 8px; }
.brand-mark { display: block; width: 38px; height: 38px; border-radius: 12px; flex: none; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 24px; letter-spacing: -0.02em; line-height: 1; }
.brand-badge { font-size: 12px; font-weight: 650; color: var(--text-2); letter-spacing: 0; }

.topbar, .side-cerrar, .side-fondo { display: none; }

.pagina { min-height: 100vh; padding-left: var(--side-w); display: flex; flex-direction: column; background: var(--bg); color: var(--text); }
.pagina > main, .pagina > .landing { flex: 1 0 auto; }

.sidebar {
  position: fixed; z-index: 800; top: 0; bottom: 0; left: 0;
  width: var(--side-w); display: flex; flex-direction: column; gap: 16px; padding: 16px 0;
  background: var(--surface); color: var(--text); border-right: 1px solid var(--line);
  transition: width var(--t-lenta) var(--ease-out), box-shadow var(--t-lenta) var(--ease-out);
}
.sidebar:hover, .sidebar:focus-within { width: var(--side-w-abierta); box-shadow: var(--shadow); }

/* Textos: aparecen un poco después de que la barra se ensancha */
.side-text { white-space: nowrap; opacity: 0; transition: opacity var(--t-fast); min-width: 0; }
.sidebar:hover .side-text, .sidebar:focus-within .side-text { opacity: 1; transition: opacity var(--t-med) 100ms; }

.side-top { display: flex; align-items: center; justify-content: space-between; padding: 0 var(--side-pad); }
.side-brand { display: flex; align-items: center; gap: 12px; min-width: 0; overflow: hidden; color: var(--text); text-decoration: none; border-radius: var(--r-sm); }
.side-brand .brand-mark { width: 44px; height: 44px; }
.side-marca { display: flex; flex-direction: column; gap: 3px; }
.side-marca .brand-name { font-size: 22px; }

.side-scroll {
  flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 16px;
  overflow-x: hidden; overflow-y: auto; scrollbar-width: none;
}
.side-scroll::-webkit-scrollbar { display: none; }
.side-nav { list-style: none; margin: 0; display: flex; flex-direction: column; gap: 4px; padding: 0 var(--side-pad); }
.side-abajo { margin: 0 var(--side-pad); padding: 12px 0 0; border-top: 1px solid var(--line); }

.side-link {
  position: relative; display: flex; align-items: center; gap: 8px; height: 44px; border-radius: var(--r-sm);
  color: var(--text); font-size: 15px; font-weight: 600; text-decoration: none;
  transition: background-color var(--t-med) var(--ease-out), color var(--t-med) var(--ease-out);
}
.side-ico { position: relative; flex: 0 0 44px; height: 44px; display: grid; place-items: center; transition: transform var(--t-med) var(--ease-out); }
.side-ico-av { margin: 2px; width: 40px !important; height: 40px !important; flex: none; }
.side-usuario { height: 52px; }
.side-usuario-txt { display: flex; flex-direction: column; line-height: 1.25; }
.side-usuario-txt b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.side-usuario-txt small { font-size: 12px; color: var(--text-2); font-weight: 550; }
@media (hover: hover) and (pointer: fine) {
  .side-link:hover { background: var(--surface-2); }
  .side-link:hover .side-ico { transform: translateX(2px); }
}
/* Opción activa: rellena con el color del botón principal y una marca a la izquierda */
.side-link[aria-current="page"] { background: var(--btn-bg); color: var(--btn-tx); }
.side-link[aria-current="page"]::before {
  content: ""; position: absolute; top: 10px; bottom: 10px; left: -9px; width: 3px; border-radius: 2px; background: var(--side-marca);
}
@media (hover: hover) and (pointer: fine) { .side-link[aria-current="page"]:hover { background: var(--btn-hover); } }

.volver { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; color: var(--text-2); font-weight: 650; font-size: 14px; text-decoration: none; min-height: 44px; }

/* Pie de página (By YANCORE) */
.site-footer { flex-shrink: 0; background: var(--espresso); color: var(--arena); }
.tema-paseador .site-footer { background: var(--surface); }
.footer-main { max-width: 1240px; margin: 0 auto; padding: 56px 24px 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.2fr 1.2fr; gap: 36px; }
.footer-col h3 { color: var(--papel); font-size: 16px; margin-bottom: 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--arena); text-decoration: none; }
.footer-col a:hover { color: var(--papel); text-decoration: underline; }
.footer-marca { display: flex; flex-direction: column; gap: 14px; max-width: 360px; }
.footer-marca .side-brand { color: var(--papel); }
.footer-bottom { border-top: 1px solid var(--cacao); font-size: 14px; }
.footer-bottom-fila {
  max-width: 1240px; margin: 0 auto; padding: 20px 24px;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px;
}
.footer-bottom-fila a { color: var(--arena); }
.footer-autor { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; color: var(--papel); }
.footer-autor img { width: 32px; height: 32px; border-radius: 8px; }
.site-footer.compacto { background: transparent; color: var(--text-2); border-top: 1px solid var(--line); }
.site-footer.compacto .footer-bottom-fila { max-width: 1080px; padding: 18px 32px; font-size: 13px; }
.site-footer.compacto a { color: var(--text-2); }
.site-footer.compacto .footer-autor { color: var(--text); }
@media (max-width: 992px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .footer-grid { grid-template-columns: 1fr; } .footer-main { padding: 40px 16px 28px; } .footer-bottom-fila { padding: 18px 16px; } }

/* Celular y tableta: barra superior y cajón */
@media (max-width: 860px) {
  .pagina { padding-left: 0; }
  body.sin-scroll { overflow: hidden; }
  .topbar {
    position: sticky; top: 0; z-index: 700; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line);
  }
  .topbar .side-brand .brand-mark { width: 40px; height: 40px; }
  .sidebar, .sidebar:hover, .sidebar:focus-within {
    width: min(300px, 86vw); border-radius: 0 var(--r-lg) var(--r-lg) 0; box-shadow: none;
  }
  .sidebar { visibility: hidden; transform: translateX(-105%); transition: transform var(--t-lenta) var(--ease-out), visibility 0s linear var(--t-lenta); }
  .sidebar.is-drawer { visibility: visible; transform: none; box-shadow: var(--shadow); transition: transform var(--t-lenta) var(--ease-out), visibility 0s; }
  .side-text { opacity: 1; }
  .side-cerrar { display: inline-flex; }
  .side-fondo {
    display: block; position: fixed; inset: 0; z-index: 790; background: var(--velo);
    opacity: 0; visibility: hidden; transition: opacity var(--t-lenta) var(--ease-out), visibility 0s linear var(--t-lenta);
  }
  .side-fondo.is-visible { opacity: 1; visibility: visible; transition: opacity var(--t-lenta) var(--ease-out), visibility 0s; }
  .site-footer.compacto .footer-bottom-fila { padding: 18px 16px; }
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.user-card {
  display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text);
}
.view {
  width: 100%; max-width: 1080px; margin: 0 auto; padding: 32px 32px 64px;
  display: flex; flex-direction: column; gap: 24px;
  animation: entrar var(--t-med) var(--ease-out);
}
.view.narrow { max-width: 760px; }
.view.full { max-width: none; padding: 0; }
.view.no-anim { animation: none; }
.mobile-cta { display: none; }
@keyframes entrar {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(30px, 4vw, 42px); }
.page-head p { color: var(--text-2); margin-top: 6px; }
.eyebrow { font-size: 14px; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; }

/* Paseo en vivo como en las apps de viajes (plan 2026-11-16): mapa grande y hoja con el paseador y las acciones */
.view.ancho-vivo { max-width: 1240px; }
.vivo { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); gap: 20px; align-items: start; }
.vivo-mapa { position: relative; position: sticky; top: 16px; }
.vivo-mapa .map { height: min(640px, calc(100vh - 140px)); }
.vivo-mapa .map-overlay { left: auto; right: 12px; top: 12px; z-index: 500; }
.vivo-hoja { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.vivo-asa { display: none; }
.vivo-paseador { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.vivo-paseador .row-main span { color: var(--text-2); }
.vivo-acciones { display: grid; grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); gap: 8px; }
.vivo-accion {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 64px; padding: 8px 4px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--text);
  font-size: 13px; font-weight: 650; text-decoration: none; cursor: pointer;
  transition: transform var(--t-fast) var(--ease-out), background-color var(--t-fast) var(--ease-out);
}
.vivo-accion:active { transform: scale(0.97); }
.vivo-accion:disabled { opacity: 0.5; cursor: not-allowed; }
.vivo-accion.peligro { color: var(--rojo); border-color: color-mix(in srgb, var(--rojo) 35%, var(--line)); }
@media (hover: hover) and (pointer: fine) { .vivo-accion:not(:disabled):hover { background: var(--surface-2); } }
.chat-hoja { max-height: 52vh; min-height: 220px; border-radius: var(--r-md); border: 1px solid var(--line); }
.seguir { padding: 32px 0 64px; display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 899px) {
  .view.ancho-vivo { padding-left: 0; padding-right: 0; padding-top: 0; gap: 0; }
  .view.ancho-vivo > .volver { margin: 8px 16px; }
  .vivo { grid-template-columns: 1fr; gap: 0; }
  .vivo-mapa { position: relative; top: 0; }
  .vivo-mapa .map { height: 52vh; min-height: 300px; border-radius: 0; }
  .seguir .vivo-mapa .map { border-radius: var(--r-lg); }
  .vivo-hoja {
    position: relative; z-index: 2; margin-top: -28px; padding: 6px 16px 16px; background: var(--bg);
    border-radius: var(--r-xl) var(--r-xl) 0 0; box-shadow: var(--shadow);
  }
  .seguir .vivo-hoja { margin-top: 12px; border-radius: var(--r-lg); box-shadow: none; padding: 0; }
  .vivo-asa { display: flex; justify-content: center; width: 100%; min-height: 32px; padding: 8px 0 0; border: 0; background: none; cursor: pointer; }
  .vivo-asa .sheet-handle { margin: 0; }
  .vivo-hoja.compacta #live-status { display: none; }
}

/* Favorito (corazón) */
.icon-btn.favorito[aria-pressed="true"] { color: var(--caramelo); border-color: var(--caramelo); }
.icon-btn.favorito[aria-pressed="true"] svg { fill: currentColor; }

/* ==========================================================
   TLAPITOOLS (plan 2026-11-16): entrada en dos pasos y panel
   ========================================================== */
.pagina.sola { padding-left: 0; }
.tools-entrada { flex: 1 0 auto; display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.tools-caja {
  width: 100%; max-width: 480px; display: flex; flex-direction: column; gap: 20px; padding: 32px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow);
}
.tools-marca { display: flex; align-items: center; gap: 14px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.tools-marca .brand-mark { width: 48px; height: 48px; }
.tools-pasos { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 12px; }
.tools-pasos li { line-height: 1.5; }
.tools-clave {
  margin: 10px 0; padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface-2);
  font-size: 18px; font-weight: 700; letter-spacing: 0.06em; word-break: break-all;
}
.tools-codigos { list-style: none; margin: 0; padding: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px;
  background: var(--surface-2); border-radius: var(--r-md); font-size: 17px; font-weight: 700; }
.tools-respaldo summary { cursor: pointer; font-weight: 650; color: var(--accent); min-height: 44px; display: flex; align-items: center; }
.u-w-auto { width: auto !important; }
.view.ancho-panel { max-width: 1240px; }
@media (max-width: 480px) { .tools-caja { padding: 22px 16px; } .tools-codigos { grid-template-columns: 1fr; } }

/* Tarjetas de números del panel */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
@media (max-width: 480px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .kpi { padding: 12px; } .kpi-valor { font-size: 24px; } }
.kpi { display: flex; flex-direction: column; gap: 4px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); min-width: 0; }
.kpi-titulo { font-size: 13px; font-weight: 650; color: var(--text-2); }
.kpi-valor { font-family: var(--font-display); font-size: 30px; letter-spacing: -0.03em; line-height: 1.1; }
.kpi-nota { font-size: 12px; color: var(--text-2); }
.kpi-cambio { font-size: 12px; font-weight: 650; color: var(--text-2); }
.kpi-cambio.sube { color: var(--verde); }
.kpi-cambio.baja { color: var(--rojo); }

/* Gráficas en SVG (js/graficas.js): colores por token */
.panel-graficas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 760px) { .panel-graficas { grid-template-columns: 1fr; } }
.panel-graficas > .card:first-child { grid-column: 1 / -1; }
.grafica { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.grafica-titulo { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.g-svg { width: 100%; height: auto; display: block; }
.g-rejilla { stroke: var(--line); stroke-width: 1; }
.g-eje { fill: var(--text-2); font-size: 11px; font-family: var(--font-body); }
.g-total { fill: var(--text); font-family: var(--font-display); font-size: 28px; font-weight: 700; }
.g-linea { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.g-punto { stroke: var(--surface); stroke-width: 2; }
.g-hueco { fill: var(--surface); }
.g-rejilla-relleno { fill: var(--surface-2); }
.g-linea.g-c1 { stroke: var(--verde); } .g-punto.g-c1, .g-sector.g-c1, .g-muestra.g-c1 { fill: var(--verde); background: var(--verde); }
.g-linea.g-c2 { stroke: var(--caramelo); } .g-punto.g-c2, .g-sector.g-c2, .g-muestra.g-c2 { fill: var(--caramelo); background: var(--caramelo); }
.g-sector.g-c3, .g-muestra.g-c3 { fill: var(--latte); background: var(--latte); }
.g-sector.g-c4, .g-muestra.g-c4 { fill: var(--rojo); background: var(--rojo); }
.g-sector.g-c5, .g-muestra.g-c5 { fill: var(--grafito); background: var(--grafito); }
.g-sector.g-c6, .g-muestra.g-c6 { fill: var(--arena); background: var(--arena); }
.g-sector.g-vivo, .g-muestra.g-vivo { fill: var(--ambar); background: var(--ambar); }
.g-sector.g-vivo2, .g-muestra.g-vivo2 { fill: var(--ambar-claro); background: var(--ambar-claro); }
.g-leyenda { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; color: var(--text-2); margin: 0; padding: 0; list-style: none; }
.g-leyenda span, .g-leyenda li { display: inline-flex; align-items: center; gap: 6px; }
.g-leyenda.vertical { flex-direction: column; gap: 8px; }
.g-leyenda.vertical b { margin-left: auto; color: var(--text); }
.g-muestra { width: 12px; height: 12px; border-radius: 3px; display: inline-block; flex: none; }
.g-dona { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.g-svg-dona { width: 180px; height: 180px; flex: none; }
.g-dona .g-leyenda { flex: 1 1 140px; }
.g-barras { display: flex; flex-direction: column; gap: 10px; }
.g-barra { display: grid; grid-template-columns: minmax(90px, 140px) 1fr auto; align-items: center; gap: 10px; font-size: 14px; }
.g-barra-nombre { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-barra-pista { height: 12px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.g-barra-pista i { display: block; height: 100%; width: 0; border-radius: 6px; background: var(--caramelo); transition: width var(--t-slow) var(--ease-out); }
@media (prefers-reduced-motion: reduce) { .g-barra-pista i { transition: none; } }

/* Dos columnas (lista + detalle/mapa) */
.split { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.split > .split-main { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.split > .split-aside { flex: 1 1 320px; min-width: 0; position: sticky; top: 24px; display: flex; flex-direction: column; gap: 16px; }

/* ==========================================================
   MAPA (Leaflet + OpenStreetMap; ilustración si no hay teselas)
   ========================================================== */

.map {
  position: relative; overflow: hidden; border-radius: var(--r-xl);
  background: var(--map-bg); min-height: 260px;
}
.map svg.map-base { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-pin {
  position: absolute; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px 0 4px;
  border-radius: 999px; background: var(--blanco); color: var(--espresso);
  font-size: 13px; font-weight: 700; box-shadow: var(--shadow); border: 0; cursor: pointer; white-space: nowrap;
  transition: transform var(--t-fast) var(--ease-out);
}
.map-pin:active { transform: translate(-50%, -50%) scale(0.95); }
.map-pin .avatar { width: 24px; height: 24px; border-radius: 50%; font-size: 10px; }
.map-me {
  position: absolute; transform: translate(-50%, -50%);
  width: 22px; height: 22px; border-radius: 50%; background: var(--espresso);
  border: 4px solid var(--papel); box-shadow: 0 0 0 10px color-mix(in srgb, var(--espresso) 12%, transparent);
}
.map-walker {
  position: absolute; transform: translate(-50%, -50%);
  transition: left 1.2s var(--ease-in-out), top 1.2s var(--ease-in-out);
}
.map-overlay { position: absolute; left: 16px; right: 16px; top: 16px; display: flex; gap: 10px; align-items: center; }

/* ==========================================================
   HOJA INFERIOR / MODAL
   ========================================================== */

.sheet-backdrop {
  position: fixed; inset: 0; z-index: 1000; background: var(--velo);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; transition: opacity var(--t-med) var(--ease-out);
}
.sheet-backdrop.open { opacity: 1; }
.sheet {
  width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto;
  background: var(--bg); color: var(--text);
  border-radius: 28px 28px 0 0; padding: 10px 22px 28px;
  transform: translateY(100%);
  transition: transform var(--t-slow) var(--ease-out);
}
.sheet-backdrop.open .sheet { transform: translateY(0); }
.sheet-handle { width: 40px; height: 5px; border-radius: 3px; background: var(--arena); margin: 0 auto 14px; }
@media (min-width: 900px) {
  .sheet-backdrop { align-items: center; padding: 24px; }
  .sheet {
    border-radius: 28px; transform: translateY(12px) scale(0.97); opacity: 0;
    transition: transform var(--t-med) var(--ease-out), opacity var(--t-med) var(--ease-out);
  }
  .sheet-backdrop.open .sheet { transform: none; opacity: 1; }
  .sheet-handle { display: none; }
}

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 1100;
  transform: translate(-50%, 16px); opacity: 0;
  background: var(--espresso); color: var(--papel);
  padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: 15px;
  box-shadow: var(--shadow); pointer-events: none; max-width: calc(100% - 32px);
  transition: transform var(--t-med) var(--ease-out), opacity var(--t-med) var(--ease-out);
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
@media (min-width: 900px) { .toast { bottom: 32px; } }

/* ==========================================================
   COMPONENTES ESPECÍFICOS
   ========================================================== */

/* Opción de tipo de paseo */
.option {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 14px 16px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
  text-align: left; cursor: pointer;
  transition: background-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
.option:active { transform: scale(0.99); }
.option .radio {
  width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--latte); flex: none;
  transition: border-width var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out);
}
.option.on { background: var(--btn-bg); color: var(--btn-tx); border-color: var(--btn-bg); }
.option.on .radio { border: 6px solid var(--arena); }
.tema-paseador .option.on .radio { border-color: var(--espresso); }
.option .opt-main { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.option .opt-main span { font-size: 14px; opacity: 0.75; }
.option .opt-price { font-family: var(--font-display); font-size: 20px; font-weight: 700; }

/* Estrellas */
.stars { display: inline-flex; align-items: center; gap: 2px; color: var(--accent); }
.stars-input { display: flex; gap: 6px; }
.stars-input button {
  width: 48px; height: 48px; border: 0; background: transparent; color: var(--arena);
  cursor: pointer; padding: 0; transition: transform var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out);
}
.stars-input button.on { color: var(--ambar); }
.stars-input button:active { transform: scale(0.9); }

/* Días de la semana */
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.day {
  height: 42px; border-radius: 12px; border: 0; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; background: var(--surface-2); color: var(--text-2);
}
.day.on { background: var(--btn-bg); color: var(--btn-tx); }
button.day { cursor: pointer; transition: transform var(--t-fast) var(--ease-out), background-color var(--t-fast) var(--ease-out); }
button.day:active { transform: scale(0.94); }

/* Línea de tiempo del paseo */
.timeline { display: flex; flex-direction: column; }
.tl-step { display: flex; gap: 12px; position: relative; padding-bottom: 18px; }
.tl-step:last-child { padding-bottom: 0; }
.tl-step::before {
  content: ""; position: absolute; left: 11px; top: 24px; bottom: 0; width: 2px; background: var(--line);
}
.tl-step:last-child::before { display: none; }
.tl-dot {
  width: 24px; height: 24px; border-radius: 50%; flex: none; z-index: 1;
  border: 2px solid var(--latte); background: var(--bg);
  display: flex; align-items: center; justify-content: center; color: var(--papel);
}
.tl-step.done .tl-dot { background: var(--verde); border-color: var(--verde); }
.tl-step.done::before { background: var(--verde); }
.tl-step.now .tl-dot { background: var(--ambar); border-color: var(--ambar); }
.tl-step b { font-size: 15px; }
.tl-step span { font-size: 13px; color: var(--text-2); }

/* PIN */
.pin { display: flex; gap: 8px; }
.pin span, .pin input {
  width: 52px; height: 60px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface); display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 28px; font-weight: 700; text-align: center;
}

/* Fotos del paseo */
.photos { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.photo {
  width: 96px; height: 96px; flex: none; border-radius: 16px; background: var(--latte);
  display: flex; align-items: flex-end; padding: 8px; font-size: 12px; font-weight: 700; color: var(--espresso);
  position: relative; overflow: hidden;
}
.photo:nth-child(2n) { background: var(--caramelo); color: var(--papel); }
.photo:nth-child(3n) { background: var(--arena); }

/* Chat */
.chat-wrap { display: flex; gap: 0; border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; background: var(--surface); min-height: 560px; }
.chat-list { width: 320px; flex: none; border-right: 1px solid var(--line); overflow-y: auto; }
.chat-list .list-row.on { background: var(--surface-2); }
.chat-pane { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.chat-msgs { flex: 1; padding: 18px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; background: var(--bg); }
.msg {
  max-width: 78%; padding: 10px 14px; border-radius: 18px; font-size: 15px; line-height: 1.4;
  background: var(--surface); border: 1px solid var(--line); align-self: flex-start;
  animation: entrar var(--t-fast) var(--ease-out);
}
.msg.me { align-self: flex-end; background: var(--btn-bg); color: var(--btn-tx); border-color: var(--btn-bg); }
.msg small { display: block; font-size: 11px; opacity: 0.65; margin-top: 2px; }
.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat-input input { flex: 1; }

/* Barras de ganancias */
.bars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; align-items: end; height: 180px; }
.bar { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar i {
  display: block; width: 100%; max-width: 40px; border-radius: 10px 10px 4px 4px; background: var(--latte);
  transform-origin: bottom; animation: crecer var(--t-slow) var(--ease-out) both;
}
.bar.hoy i { background: var(--ambar-claro); }
.bar span { font-size: 12px; color: var(--text-2); font-weight: 600; }
@keyframes crecer { from { transform: scaleY(0.2); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }

/* Producto (tienda) */
.product {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 14px; display: flex; flex-direction: column; gap: 10px;
}
.product-img {
  height: 130px; border-radius: 14px; background: var(--surface-2);
  display: flex; align-items: center; justify-content: center; color: var(--caramelo);
}

/* Pasos (postulación) */
.steps-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.steps-bar span { height: 5px; border-radius: 3px; background: var(--arena); transition: background-color var(--t-med) var(--ease-out); }
.steps-bar span.on { background: var(--text); }
.upload {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border: 1.5px dashed var(--latte); border-radius: var(--r-md); cursor: pointer; background: var(--surface);
}
.upload input { display: none; }
.upload.ok { border-style: solid; border-color: var(--verde); }

/* Tabla de comportamientos (ficha) */
.behav-row { display: grid; grid-template-columns: 1fr 1fr 1fr 44px; gap: 8px; margin-bottom: 8px; }
.behav-head { display: grid; grid-template-columns: 1fr 1fr 1fr 44px; gap: 8px; font-size: 13px; font-weight: 650; color: var(--text-2); margin-bottom: 6px; }

/* ==========================================================
   LANDING
   ========================================================== */

.landing { background: var(--papel); color: var(--espresso); }
/* Estructura de Necutla: contenedor, hero en dos columnas con tablero, secciones con encabezado y rejilla */
.container { width: min(1200px, 92%); margin: 0 auto; }
.hero { padding: 56px 0 64px; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.hero-copy h1 { font-size: clamp(36px, 4.6vw, 60px); line-height: 1.02; }
.hero-copy .lead { font-size: 19px; color: var(--grafito); max-width: 540px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-giro { display: inline-block; color: var(--caramelo); }
.giro-palabra { display: inline-block; transition: opacity var(--t-med) var(--ease-out), transform var(--t-med) var(--ease-out); }
.giro-palabra.sale { opacity: 0; transform: translateY(-10px); }
.tablero {
  background: var(--espresso); color: var(--papel); border-radius: var(--r-xl); padding: 24px;
  display: flex; flex-direction: column; gap: 18px; min-width: 0;
}
.tablero-marca { display: flex; align-items: center; gap: 14px; padding-bottom: 16px; border-bottom: 1px solid var(--cacao); }
.tablero-marca b { font-family: var(--font-display); font-size: 22px; letter-spacing: -0.02em; }
.tablero-marca span { color: var(--arena); font-size: 14px; }
.tablero-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.tablero-fila { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--r-sm); background: var(--cacao); }
.tablero-fila .row-main b { color: var(--papel); font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tablero-fila .row-main span { color: var(--arena); font-size: 13px; }
.tablero-fila .esqueleto { background: var(--grafito); }
.tablero-fila .badge-live { background: var(--papel); color: var(--espresso); }
.tablero-precio { font-weight: 700; color: var(--papel); }
.tablero-vacio { color: var(--arena); padding: 14px 4px; }
.tablero-pie { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--arena); font-size: 14px; padding-top: 14px; border-top: 1px solid var(--cacao); }
.tablero-pie span { display: inline-flex; align-items: center; gap: 6px; }
.secciones { display: flex; flex-direction: column; }
.seccion { padding: 64px 0 0; display: flex; flex-direction: column; gap: 0; }
.secciones > .seccion:last-child { padding-bottom: 72px; }
.seccion h2 { font-size: clamp(30px, 3.6vw, 44px); max-width: 680px; }
.section-header-row {
  display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 12px 24px;
  margin-bottom: 28px; padding-bottom: 16px; border-bottom: 1px solid var(--line);
}
.section-header-row p { max-width: 480px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 0; padding: 0; }
.grid > .empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.cifras { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0; background: var(--blanco); border: 1px solid var(--line); border-radius: var(--r-lg); }
.cifras > div { padding: 24px; border-right: 1px solid var(--line-soft); display: flex; flex-direction: column-reverse; gap: 4px; }
.cifras > div:last-child { border-right: 0; }
.cifras dt { color: var(--grafito); font-size: 14px; }
.cifras dd { margin: 0; font-family: var(--font-display); font-size: 40px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.pasos { list-style: none; }
.paso { display: flex; flex-direction: column; gap: 10px; }
.paso-num { font-family: var(--font-display); font-size: 44px; font-weight: 700; color: var(--latte); line-height: 1; }
.paso h3 { font-size: 20px; }
.paso p { color: var(--grafito); }
.l-walker-in { padding: 72px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 48px; }
.faq.seccion { padding-bottom: 72px; gap: 24px; }
/* Aparición al hacer scroll: solo se oculta si el script pudo activarla */
.con-revelar .revelar:not(.visible), .con-revelar .revelar-grid > *:not(.visible) { opacity: 0; transform: translateY(18px); }
.revelar, .revelar-grid > * { transition: opacity 600ms var(--ease-out) var(--retraso, 0ms), transform 600ms var(--ease-out) var(--retraso, 0ms); }
@media (max-width: 992px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cifras { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cifras > div:nth-child(2) { border-right: 0; }
  .cifras > div:nth-child(-n+2) { border-bottom: 1px solid var(--line-soft); }
}
@media (max-width: 760px) {
  .hero { padding: 28px 0 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
  .cifras dd { font-size: 32px; }
  .cifras > div { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .revelar, .revelar-grid > *, .giro-palabra { transition: none !important; opacity: 1 !important; transform: none !important; }
}
.l-search {
  display: flex; flex-wrap: wrap; gap: 10px; padding: 10px; border-radius: 20px;
  background: var(--blanco); border: 1px solid var(--line); max-width: 580px;
}
.l-search label { flex: 1 1 220px; display: flex; flex-direction: column; padding: 4px 12px; }
.l-search label span { font-size: 13px; font-weight: 650; color: var(--caramelo); }
.l-band { background: var(--blanco); border-block: 1px solid var(--line); }
.l-price { background: var(--blanco); border: 1px solid var(--line); border-radius: 24px; padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.l-price.dark { background: var(--espresso); color: var(--papel); border-color: var(--espresso); }
.l-price .amt { font-family: var(--font-display); font-size: 52px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.l-price p { color: var(--grafito); }
.l-price.dark p { color: var(--arena); }
/* Portada: paseadores y veterinarias destacados (plan 2026-11-09-tlapi-paseadores-veterinarias) */
.tarjeta-paseador, .tarjeta-vet {
  background: var(--blanco); border: 1px solid var(--line); border-radius: 24px; padding: 28px;
  display: flex; flex-direction: column; gap: 14px; min-width: 0;
}
.tarjeta-paseador { align-items: center; text-align: center; }
.tarjeta-paseador h3, .tarjeta-vet h3 { font-size: 22px; overflow-wrap: anywhere; }
.tarjeta-paseador .amt { font-family: var(--font-display); font-size: 40px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.tarjeta-paseador .amt small { font-family: var(--font-body); font-size: 15px; font-weight: 550; color: var(--grafito); letter-spacing: 0; }
.tarjeta-paseador .stars { color: var(--caramelo); }
.dias { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.dias span { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 650; background: var(--surface-2); color: var(--grafito); }
.dias span.on { background: var(--espresso); color: var(--papel); }
.tarjeta-paseador .btn, .tarjeta-vet .btn { margin-top: auto; }
.tarjeta-vet .vet-icono { width: 52px; height: 52px; border-radius: 17px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2); color: var(--caramelo); }
.tarjeta-vet .dato { display: flex; align-items: center; gap: 8px; color: var(--grafito); }

.l-safety { display: flex; flex-wrap: wrap; gap: 40px; }
.l-safety h2 { flex: 1 1 300px; }
.l-safety-list { flex: 2 1 520px; min-width: 0; }
.l-safety-list div { display: flex; gap: 20px; padding: 18px 0; border-top: 1px solid var(--arena); flex-wrap: wrap; }
.l-safety-list div:last-child { border-bottom: 1px solid var(--arena); }
.l-safety-list b { flex: 0 0 200px; }
.l-safety-list span { flex: 1 1 240px; color: var(--grafito); }
.l-walker { background: var(--espresso); color: var(--papel); }
.l-walker h2 { font-size: clamp(38px, 5vw, 68px); }
.l-walker-stats { flex: 1 1 360px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.l-walker-stats div { background: var(--cacao); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 4px; }
.l-walker-stats b { font-family: var(--font-display); font-size: 40px; letter-spacing: -0.02em; }
.l-walker-stats span { color: var(--arena); font-size: 14px; }
.faq details { border-top: 1px solid var(--arena); padding: 18px 0; }
.faq details:last-child { border-bottom: 1px solid var(--arena); }
.faq summary { cursor: pointer; font-weight: 650; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: "+"; font-family: var(--font-display); font-size: 24px; line-height: 1; transition: transform var(--t-med) var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin-top: 10px; color: var(--grafito); max-width: 720px; }

/* ==========================================================
   ACCESO
   ========================================================== */

/* Acceso con panel deslizante (estructura de Necutla, plan 2026-11-16).
   Entrar a la izquierda y crear cuenta a la derecha; el panel tapa el formulario que no se usa y se desliza
   (650 ms, excepción de plans/CLAUDE.md). El alto lo mide public/js/publico.js (ajustarAlto). */
.acceso { padding: 48px 0 72px; }
.auth {
  --t-panel: 650ms cubic-bezier(0.65, 0, 0.35, 1);
  position: relative; display: grid; grid-template-columns: 1fr 1fr; align-items: start;
  max-width: 920px; margin-inline: auto; height: var(--alto-auth, auto); transition: height var(--t-panel);
  padding: 8px; background: var(--blanco); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow); overflow: hidden;
}
.auth-form {
  grid-row: 1; display: flex; flex-direction: column; gap: 6px; padding: 32px 36px;
  transition: opacity 350ms var(--ease-out) 250ms, transform var(--t-panel);
}
.auth-entrar { grid-column: 1; }
.auth-registro { grid-column: 2; }
.auth-titulo { font-size: 32px; }
.auth-campos { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.auth.is-registro .auth-entrar, .auth:not(.is-registro) .auth-registro { opacity: 0; transition: opacity 250ms var(--ease-out), transform var(--t-panel); }
.auth.is-registro .auth-entrar { transform: translateX(-32px); }
.auth:not(.is-registro) .auth-registro { transform: translateX(32px); }

/* Campo con icono a la izquierda y botón para ver la contraseña a la derecha */
.campo-icono { position: relative; }
.campo-icono > svg { position: absolute; top: 50%; left: 14px; transform: translateY(-50%); color: var(--text-2); pointer-events: none; transition: color var(--t-fast); }
.campo-icono:focus-within > svg { color: var(--caramelo); }
.campo-icono .input { padding-left: 42px; }
.campo-icono.con-ver .input { padding-right: 52px; }
.campo-ver {
  position: absolute; top: 50%; right: 4px; transform: translateY(-50%); display: grid; place-items: center;
  width: 44px; height: 40px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--text-2); cursor: pointer;
}
.campo-ver[aria-pressed="true"] { color: var(--caramelo); }
@media (hover: hover) and (pointer: fine) { .campo-ver:hover { background: var(--surface-2); color: var(--text); } }
.estado-campo { font-size: 13px; color: var(--text-2); }
.field.is-valido .input { border-color: var(--verde); }
.field.is-valido .estado-campo { color: var(--verde); font-weight: 650; }
.field.is-invalido .input { border-color: var(--rojo); }
.field.is-invalido .estado-campo { color: var(--rojo); font-weight: 650; }

/* Casillas (mayoría de edad, aceptar términos) */
.casilla { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; color: var(--text); cursor: pointer; }
.casilla input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--espresso); cursor: pointer; }
.casilla a { font-weight: 650; }

/* Panel: tapa la mitad derecha; con .is-registro se desliza a la izquierda */
.auth-panel {
  position: absolute; z-index: 2; top: 8px; bottom: 8px; left: 50%; width: calc(50% - 8px);
  display: grid; overflow: hidden; border-radius: var(--r-lg); background: var(--espresso); color: var(--papel);
  transition: transform var(--t-panel);
}
.auth.is-registro .auth-panel { transform: translateX(-100%); }
.auth-parque { position: absolute; left: -6%; bottom: 0; width: 112%; height: 42%; transition: transform var(--t-panel); }
.auth.is-registro .auth-parque { transform: translateX(5%); }
.auth-parque .loma-2 { fill: var(--cacao); }
.auth-parque .loma-1 { fill: var(--caramelo); }
.auth-parque .arbol rect { fill: var(--cacao); }
.auth-parque .arbol circle { fill: var(--latte); }
.auth-parque .huella { fill: var(--arena); transition: fill 200ms var(--ease-out); }
/* Contraseña equivocada: las huellas se ponen rojas un momento */
.auth.is-alarma .auth-parque .huella { fill: var(--rojo); }
@media (prefers-reduced-motion: no-preference) {
  .auth-parque .huella { animation: huella-paso 3.6s ease-in-out infinite; }
  .auth-parque .huella:nth-of-type(2n) { animation-delay: 0.36s; }
  .auth-parque .huella:nth-of-type(3n) { animation-delay: 0.72s; }
  .auth-parque .huella:nth-of-type(4n) { animation-delay: 1.08s; }
  .auth.is-alarma .auth-parque .huella { animation: huella-alarma 0.4s steps(1, end) 4; }
}
@keyframes huella-paso { 0%, 70%, 100% { opacity: 1; } 80% { opacity: 0.35; } }
@keyframes huella-alarma { 50% { opacity: 0.2; } }
/* Los dos textos ocupan el mismo lugar y cambian a la mitad del recorrido */
.auth-panel-texto {
  grid-area: 1 / 1; position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  align-self: start; gap: 12px; height: 58%; padding: 32px 40px 8px;
  transition: opacity 300ms var(--ease-out) 300ms, transform 300ms var(--ease-out) 300ms;
}
.auth-panel-titulo { font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; color: var(--papel); }
.auth-panel-texto p:not(.auth-panel-titulo) { color: var(--arena); max-width: 32ch; }
.auth-panel-texto .btn { margin-top: 6px; }
.auth:not(.is-registro) .auth-panel-texto[data-modo="registro"], .auth.is-registro .auth-panel-texto[data-modo="entrar"] {
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out), visibility 0s linear 200ms;
}
@media (max-width: 760px) {
  .acceso { padding: 16px 0 40px; width: min(1200px, calc(100% - 24px)); }
  .auth { grid-template-columns: 1fr; grid-template-rows: max-content max-content; border-radius: var(--r-lg); }
  .auth-panel { position: relative; grid-row: 1; top: auto; bottom: auto; left: auto; width: auto; min-height: 200px; }
  .auth.is-registro .auth-panel { transform: none; }
  .auth-panel-texto { height: auto; padding: 22px 20px 92px; gap: 8px; }
  .auth-panel-titulo { font-size: 24px; }
  .auth-parque { height: 84px; }
  .auth-form, .auth-entrar, .auth-registro { grid-row: 2; grid-column: 1; padding: 22px 14px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth, .auth-form, .auth-panel, .auth-parque, .auth-panel-texto { transition: none !important; }
}
.role-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.role-card {
  text-align: left; padding: 14px; border-radius: 16px; border: 1px solid var(--arena); min-height: 44px;
  background: var(--blanco); color: var(--espresso); cursor: pointer; display: flex; flex-direction: column; gap: 2px;
  transition: background-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
.role-card b { font-size: 16px; }
.role-card span { font-size: 14px; opacity: 0.8; }
.role-card.on { background: var(--espresso); color: var(--papel); border-color: var(--espresso); }
.role-card:active { transform: scale(0.98); }
.texto-legal ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.texto-legal.en-hoja { gap: 12px; font-size: 15px; }
.texto-legal.en-hoja h2 { font-size: 19px; }

/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 899px) {
  .view { padding: 16px 16px calc(32px + env(safe-area-inset-bottom)); gap: 20px; }
  .split > .split-aside { position: static; }
  .split.map-first > .split-aside { order: -1; }
  .mobile-cta {
    display: flex; align-items: center; gap: 16px;
    position: fixed; left: 0; right: 0; z-index: 25;
    bottom: 0; padding-bottom: calc(12px + env(safe-area-inset-bottom));
    padding-top: 12px; padding-left: 16px; padding-right: 16px; background: var(--surface); border-top: 1px solid var(--line);
  }
  .view:has(.mobile-cta) { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
  .split.map-first .map { height: 280px !important; }
  .chat-list { width: 100%; border-right: 0; }
  .chat-wrap.has-open .chat-list { display: none; }
  .chat-wrap:not(.has-open) .chat-pane { display: none; }
  .behav-row, .behav-head { grid-template-columns: 1fr; }
  .behav-head { display: none; }
  .behav-row { background: var(--surface-2); padding: 10px; border-radius: 14px; }
}

@media (max-width: 480px) {
  .stat b { font-size: 20px; }
  .btn-lg { height: 54px; }
  .pin span, .pin input { width: 48px; height: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
  .sheet, .toast, .map-walker { transition-property: opacity !important; }
  .sidebar, .sidebar .side-text, .side-fondo, .side-ico { transition: none !important; }
  .sheet { transform: none !important; }
}

/* ==========================================================
   AGREGADOS PARA LA VERSIÓN CON BACKEND
   (plan 2026-11-01-huella-app-backend-ionos y plan de reels 2026-11-01-reels-otp-esqueletos-botones)
   ========================================================== */

/* Tonos de avatar y mascota: el dato guarda el nombre del token, nunca un hex */
.tono-latte { background: var(--latte); color: var(--espresso); }
.tono-caramelo { background: var(--caramelo); color: var(--papel); }
.tono-arena { background: var(--arena); color: var(--espresso); }
.tono-cacao { background: var(--cacao); color: var(--arena); }
.tono-grafito { background: var(--grafito); color: var(--papel); }

/* Chip de mascota en el inicio (sobre la tarjeta oscura) */
.chip-mascota { height: 42px; padding-left: 5px; background: var(--cacao); color: var(--arena); border-color: var(--cacao); }
.chip-mascota.on { background: var(--papel); color: var(--espresso); border-color: var(--papel); }
.chip-mascota .avatar { width: 30px; height: 30px; font-size: 12px; }

/* Mapa: alto por clase (sin estilos en línea); Leaflet queda dentro de su propio contexto de apilamiento */
.map { isolation: isolate; }
.map-h-240 { height: 240px; } .map-h-260 { height: 260px; } .map-h-300 { height: 300px; } .map-h-360 { height: 360px; }
.map-h-420 { height: 420px; } .map-h-460 { height: 460px; } .map-h-540 { height: 540px; }
.map.leaflet-container { font-family: var(--font-body); background: var(--map-bg); }
.map .leaflet-div-icon { background: none; border: 0; }
.map .leaflet-control-attribution { font-size: 11px; background: color-mix(in srgb, var(--blanco) 85%, transparent); color: var(--grafito); }
.map .leaflet-control-attribution a { color: var(--caramelo); }
.map .leaflet-control-zoom a { color: var(--espresso); }
.map-zona { position: absolute; transform: translate(-50%, -50%); border-radius: 50%; }
.map-casa {
  position: absolute; transform: translate(-50%, -50%); width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: var(--espresso); color: var(--arena);
  border: 3px solid var(--papel); box-shadow: var(--shadow);
}
.mapa-ruta { stroke: var(--live); }
/* Ilustración de respaldo: cada marcador se coloca con left/top (CSSOM) y su contenido se centra en el punto */
.map-ilu { position: absolute; width: 0; height: 0; }
.map-ilu-btn { border: 0; background: none; padding: 0; cursor: pointer; }

/* Anillo de cuenta regresiva del pedido entrante (SVG, sin degradados) */
.anillo { position: relative; width: 46px; height: 46px; flex: none; }
.anillo svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.anillo circle { fill: none; stroke-width: 4; }
.anillo .fondo { stroke: var(--line); }
.anillo .avance { stroke: var(--ambar); stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.anillo b { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; }

/* Fotos reales del paseo y de la mascota */
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo small { position: relative; z-index: 1; background: color-mix(in srgb, var(--espresso) 60%, transparent); color: var(--papel); padding: 2px 6px; border-radius: 8px; }
.foto-mascota { width: 96px; height: 96px; border-radius: 28px; object-fit: cover; flex: none; }

/* Barra de progreso y barras de ganancias: el ancho/alto lo pone JavaScript (CSSOM) */
.progress > span { width: 0; }
.bar i { height: 4px; }

/* Insignia con número (chats sin leer, avisos) */
.contador { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--ambar); color: var(--espresso);
  font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

/* Requisitos de la contraseña (se marcan mientras escribes) */
.requisitos { display: flex; flex-wrap: wrap; gap: 6px; }
.requisitos span { font-size: 12px; padding: 3px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); }
.requisitos span.ok { background: var(--verde-suave); color: var(--verde-oscuro); }

/* Tablas del admin */
.tabla { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabla th, .tabla td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.tabla th { font-size: 13px; color: var(--text-2); font-weight: 650; }
.tabla-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.doc-vista { width: 100%; max-height: 70vh; object-fit: contain; border-radius: var(--r-md); background: var(--surface-2); }

/* Páginas de texto (aviso de privacidad, términos) */
.texto-legal { display: flex; flex-direction: column; gap: 14px; max-width: 68ch; line-height: 1.6; }
.texto-legal h2 { font-size: 22px; margin-top: 12px; }

/* Botón de texto (acción terciaria dentro de un párrafo) */
.link-btn { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 650; cursor: pointer; text-decoration: underline; }

/* ==========================================================
   ESTADOS DE BOTÓN (reel DfDuWCKsfqm: variantes y estados)
   ========================================================== */

.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 1; background: var(--surface-2); color: var(--text-2); border-color: var(--line);
  cursor: not-allowed; transform: none;
}
@media (hover: hover) and (pointer: fine) {
  .btn:disabled:hover, .btn[aria-disabled="true"]:hover { background: var(--surface-2); border-color: var(--line); }
}
/* Ocupado: mismo aspecto que el normal, sin spinner; el texto dice la acción en curso */
.btn[aria-busy="true"], .btn[aria-busy="true"]:disabled {
  background: var(--btn-bg); color: var(--btn-tx); border-color: transparent; cursor: progress;
}
.btn-ghost[aria-busy="true"], .btn-ghost[aria-busy="true"]:disabled { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-danger[aria-busy="true"], .btn-danger[aria-busy="true"]:disabled { background: var(--rojo); color: var(--papel); }

/* ==========================================================
   ESQUELETOS DE CARGA (reel DfBJ5MGtFj_: sin spinners)
   ========================================================== */

.esqueleto { display: block; background: var(--surface-2); border-radius: var(--r-sm); animation: esq-pulso 1.2s ease-in-out infinite alternate; }
.tema-paseador .esqueleto { background: var(--line); }
@keyframes esq-pulso { from { opacity: 1; } to { opacity: 0.55; } }
.esq-linea { height: 14px; }
.esq-linea.corta { width: 40%; }
.esq-linea.media { width: 65%; }
.esq-titulo { height: 38px; width: min(320px, 70%); border-radius: var(--r-sm); }
.esq-avatar { width: 52px; height: 52px; border-radius: 17px; flex: none; }
.esq-fila { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
.esq-fila:last-child { border-bottom: 0; }
.esq-fila .stack { flex: 1; gap: 8px; }
.esq-tarjeta { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.esq-mapa { height: 360px; border-radius: var(--r-xl); }
.esq-boton { height: 48px; border-radius: var(--r-md); }

/* ==========================================================
   CÓDIGO DE VERIFICACIÓN (reel DfCQB9LMm5Y: OTP animado)
   ========================================================== */

.otp { display: flex; gap: 8px; justify-content: center; }
.otp-casilla {
  width: 48px; height: 56px; border-radius: var(--r-sm); border: 2px solid var(--line);
  background: var(--surface); color: var(--text); text-align: center;
  font-family: var(--font-display); font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums;
  transition: border-color var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
.otp-casilla:focus { outline: none; border-color: var(--caramelo); box-shadow: 0 0 0 3px color-mix(in srgb, var(--caramelo) 15%, transparent); }
.otp-casilla.pop { animation: otp-pop var(--t-fast) var(--ease-out); }
@keyframes otp-pop { 50% { transform: scale(1.08); } }
.otp.mal { animation: otp-sacudida 280ms var(--ease-out); }
.otp.mal .otp-casilla { border-color: var(--rojo); }
@keyframes otp-sacudida { 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
/* Brillo verde solo para el código correcto (excepción escrita en plans/CLAUDE.md, "Movimiento") */
.otp.bien .otp-casilla { border-color: var(--verde); box-shadow: 0 0 0 4px color-mix(in srgb, var(--verde) 22%, transparent); }
.otp[aria-busy="true"] .otp-casilla { opacity: 0.7; }
.otp-estado { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 22px; font-size: 14px; font-weight: 650; }
.otp-estado.bien { color: var(--verde); }
.otp-estado.mal { color: var(--rojo); }
.otp.pin-4 .otp-casilla { width: 56px; height: 64px; font-size: 30px; }
@media (max-width: 380px) { .otp { gap: 6px; } .otp-casilla { width: 42px; height: 52px; font-size: 22px; } }
@media (prefers-reduced-motion: reduce) {
  .otp-casilla.pop, .otp.mal, .esqueleto { animation: none !important; }
}

/* ==========================================================
   UTILIDADES (salen de los style="…" del diseño original de Huella;
   generadas para cumplir la CSP sin estilos en línea)
   ========================================================== */
.u-ai-baseline { align-items: baseline !important; }
.u-ai-center { align-items: center !important; }
.u-ai-flex-end { align-items: flex-end !important; }
.u-ai-flex-start { align-items: flex-start !important; }
.u-ai-stretch { align-items: stretch !important; }
.u-as-flex-end { align-self: flex-end !important; }
.u-as-flex-start { align-self: flex-start !important; }
.u-bc-arena { border-color: var(--arena) !important; }
.u-bc-btn-bg { border-color: var(--btn-bg) !important; }
.u-bc-caramelo { border-color: var(--caramelo) !important; }
.u-bc-latte { border-color: var(--latte) !important; }
.u-bd-0 { border: 0 !important; }
.u-bg-arena { background: var(--arena) !important; }
.u-bg-blanco { background: var(--blanco) !important; }
.u-bg-btn-bg { background: var(--btn-bg) !important; }
.u-bg-cacao { background: var(--cacao) !important; }
.u-bg-caramelo { background: var(--caramelo) !important; }
.u-bg-espresso { background: var(--espresso) !important; }
.u-bg-live-20 { background: var(--live-20) !important; }
.u-bg-live-28 { background: var(--live-28) !important; }
.u-bg-none { background: none !important; }
.u-bg-papel { background: var(--papel) !important; }
.u-bg-surface-2 { background: var(--surface-2) !important; }
.u-bg-transparent { background: transparent !important; }
.u-bg-verde-suave { background: var(--verde-suave) !important; }
.u-br-14 { border-radius: 14px !important; }
.u-br-50p { border-radius: 50% !important; }
.u-bt-line { border-top: 1px solid var(--line) !important; }
.u-c-accent { color: var(--accent) !important; }
.u-c-ambar-claro { color: var(--ambar-claro) !important; }
.u-c-arena { color: var(--arena) !important; }
.u-c-btn-tx { color: var(--btn-tx) !important; }
.u-c-caramelo { color: var(--caramelo) !important; }
.u-c-espresso { color: var(--espresso) !important; }
.u-c-grafito { color: var(--grafito) !important; }
.u-c-inherit { color: inherit !important; }
.u-c-latte { color: var(--latte) !important; }
.u-c-papel { color: var(--papel) !important; }
.u-c-rojo { color: var(--rojo) !important; }
.u-c-text { color: var(--text) !important; }
.u-c-text-2 { color: var(--text-2) !important; }
.u-c-verde { color: var(--verde) !important; }
.u-cols-1-2 { grid-template-columns: 1fr 2fr !important; }
.u-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.u-cols-auto-130 { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important; }
.u-cols-auto-150 { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important; }
.u-cols-auto-190 { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)) !important; }
.u-cols-auto-200 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important; }
.u-cur-default { cursor: default !important; }
.u-cur-pointer { cursor: pointer !important; }
.u-d-grid { display: grid !important; }
.u-d-none { display: none !important; }
.u-dir-column { flex-direction: column !important; }
.u-fs-11 { font-size: 11px !important; }
.u-fs-12 { font-size: 12px !important; }
.u-fs-13 { font-size: 13px !important; }
.u-fs-14 { font-size: 14px !important; }
.u-fs-15 { font-size: 15px !important; }
.u-fs-16 { font-size: 16px !important; }
.u-fs-17 { font-size: 17px !important; }
.u-fs-18 { font-size: 18px !important; }
.u-fs-19 { font-size: 19px !important; }
.u-fs-20 { font-size: 20px !important; }
.u-fs-22 { font-size: 22px !important; }
.u-fs-24 { font-size: 24px !important; }
.u-fs-26 { font-size: 26px !important; }
.u-fs-28 { font-size: 28px !important; }
.u-fs-30 { font-size: 30px !important; }
.u-fs-32 { font-size: 32px !important; }
.u-fs-34 { font-size: 34px !important; }
.u-fs-40 { font-size: 40px !important; }
.u-fs-48 { font-size: 48px !important; }
.u-fs-hero { font-size: clamp(32px, 5vw, 44px) !important; }
.u-fs-hero-2 { font-size: clamp(30px, 4vw, 40px) !important; }
.u-fw-600 { font-weight: 600 !important; }
.u-fw-650 { font-weight: 650 !important; }
.u-fw-700 { font-weight: 700 !important; }
.u-fw-800 { font-weight: 800 !important; }
.u-fx-1 { flex: 1 !important; }
.u-fx-1-1-200 { flex: 1 1 200px !important; }
.u-fx-1-1-220 { flex: 1 1 220px !important; }
.u-fx-1-1-460 { flex: 1 1 460px !important; }
.u-fx-none { flex: none !important; }
.u-gap-10 { gap: 10px !important; }
.u-gap-12 { gap: 12px !important; }
.u-gap-24 { gap: 24px !important; }
.u-gap-4 { gap: 4px !important; }
.u-gap-6 { gap: 6px !important; }
.u-gap-8 { gap: 8px !important; }
.u-gcol-span-2 { grid-column: span 2 !important; }
.u-h-100p { height: 100% !important; }
.u-h-120 { height: 120px !important; }
.u-h-14 { height: 14px !important; }
.u-h-20 { height: 20px !important; }
.u-h-24 { height: 24px !important; }
.u-h-26 { height: 26px !important; }
.u-h-34 { height: 34px !important; }
.u-h-36 { height: 36px !important; }
.u-h-38 { height: 38px !important; }
.u-h-46 { height: 46px !important; }
.u-h-52 { height: 52px !important; }
.u-h-90 { height: 90px !important; }
.u-inset-0 { inset: 0 !important; }
.u-jc-center { justify-content: center !important; }
.u-jc-space-between { justify-content: space-between !important; }
.u-left-18p { left: 18% !important; }
.u-left-68p { left: 68% !important; }
.u-lh-1 { line-height: 1 !important; }
.u-lh-1_15 { line-height: 1.15 !important; }
.u-lh-1_3 { line-height: 1.3 !important; }
.u-lh-1_5 { line-height: 1.5 !important; }
.u-lh-1_6 { line-height: 1.6 !important; }
.u-m-0-auto { margin: 0 auto !important; }
.u-mb-18 { margin-bottom: 18px !important; }
.u-minw-190 { min-width: 190px !important; }
.u-minw-20 { min-width: 20px !important; }
.u-minw-200 { min-width: 200px !important; }
.u-minw-90 { min-width: 90px !important; }
.u-ml-auto { margin-left: auto !important; }
.u-mt-1 { margin-top: 1px !important; }
.u-mt-4 { margin-top: 4px !important; }
.u-mt-8 { margin-top: 8px !important; }
.u-mt-auto { margin-top: auto !important; }
.u-mw-380 { max-width: 380px !important; }
.u-mw-480 { max-width: 480px !important; }
.u-mw-760 { max-width: 760px !important; }
.u-of-cover { object-fit: cover !important; }
.u-op-0_75 { opacity: 0.75 !important; }
.u-ov-hidden { overflow: hidden !important; }
.u-p-0 { padding: 0 !important; }
.u-p-0-14 { padding: 0 14px !important; }
.u-p-12 { padding: 12px !important; }
.u-p-14 { padding: 14px !important; }
.u-p-14-16 { padding: 14px 16px !important; }
.u-p-16-18 { padding: 16px 18px !important; }
.u-p-18-20 { padding: 18px 20px !important; }
.u-p-32-20 { padding: 32px 20px !important; }
.u-p-36-20 { padding: 36px 20px !important; }
.u-pi-center { place-items: center !important; }
.u-pos-absolute { position: absolute !important; }
.u-pt-0 { padding-top: 0 !important; }
.u-pt-12 { padding-top: 12px !important; }
.u-ta-center { text-align: center !important; }
.u-ta-left { text-align: left !important; }
.u-td-none { text-decoration: none !important; }
.u-td-underline { text-decoration: underline !important; }
.u-tf-centro { transform: translate(-50%,-50%) !important; }
.u-top-30p { top: 30% !important; }
.u-top-62p { top: 62% !important; }
.u-tov-ellipsis { text-overflow: ellipsis !important; }
.u-tt-capitalize { text-transform: capitalize !important; }
.u-w-100p { width: 100% !important; }
.u-w-110 { width: 110px !important; }
.u-w-120 { width: 120px !important; }
.u-w-14 { width: 14px !important; }
.u-w-20 { width: 20px !important; }
.u-w-36 { width: 36px !important; }
.u-w-38 { width: 38px !important; }
.u-w-46 { width: 46px !important; }
.u-w-52 { width: 52px !important; }
.u-w-62p { width: 62% !important; }
.u-w-90 { width: 90px !important; }
.u-wrap-wrap { flex-wrap: wrap !important; }
.u-ws-nowrap { white-space: nowrap !important; }
.captcha-caja { position: fixed; right: 16px; bottom: 16px; z-index: 1150; }
