/*
 * La app de Tu Masterplan.
 *
 * Mismo sistema visual que el sitio publicado: Plus Jakarta Sans, grises zinc,
 * cromado de tinta, tarjetas con borde y sombra mínima. La única fotografía es
 * la de cada loteo, así que el resto se queda callado: fondo gris claro,
 * tarjetas blancas, tinta. El verde queda para "construido" y "publicado".
 */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(/fuente.woff2) format('woff2');
}

:root {
  --zinc-50: #fafafa; --zinc-100: #f4f4f5; --zinc-200: #e4e4e7; --zinc-300: #d4d4d8;
  --zinc-400: #a1a1aa; --zinc-500: #71717a; --zinc-600: #52525b; --zinc-700: #3f3f46;
  --zinc-800: #27272a; --zinc-900: #18181b; --zinc-950: #09090b;
  --marca-50: #f4f4f5; --marca-100: #e4e4e7; --marca-700: #27272a; --marca-800: #18181b;
  --marca-900: #09090b; --marca-anillo: rgb(39 39 42 / 0.25);
  --verde-50: #f0fdf4; --verde-100: #bbf7d0; --verde-700: #15803d; --verde-800: #166534;
  --ambar-50: #fffbeb; --ambar-200: #fde68a; --ambar-800: #92400e;
  --rojo-50: #fef2f2; --rojo-200: #fecaca; --rojo-700: #b91c1c;
  --violeta: #7c3aed; --violeta-anillo: rgb(124 58 237 / 0.2);
  --sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --radio-sm: 0.375rem; --radio-md: 0.5rem; --radio-lg: 0.75rem;
  --sombra: 0 1px 2px 0 rgb(0 0 0 / 0.03), 0 1px 3px 0 rgb(0 0 0 / 0.04);
  --sombra-alta: 0 10px 30px -10px rgb(0 0 0 / 0.25);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--zinc-50);
  color: var(--zinc-900);
  font: 400 0.875rem/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--marca-700); outline-offset: 2px; }

/* --- Barra ------------------------------------------------------------------ */

/* La barra no tiene fondo mientras estás arriba: el logotipo, la isla de secciones
   y el avatar flotan sobre la página. Al bajar, toma un vidrio claro para que lo
   que pasa por debajo no se lea a través. */
.barra {
  position: sticky; top: 0; z-index: 10;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem;
  height: 5rem; padding: 0 2rem;
  background: rgb(250 250 250 / 0.82); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--zinc-200);
}
@supports (animation-timeline: scroll()) {
  .barra {
    background: transparent; backdrop-filter: none; border-bottom-color: transparent;
    animation: barra-vidrio linear both; animation-timeline: scroll(root block); animation-range: 0 48px;
  }
}
@keyframes barra-vidrio {
  to { background: rgb(250 250 250 / 0.82); backdrop-filter: blur(14px); border-bottom-color: var(--zinc-200); }
}

/* El logotipo de la landing: «tu masterplan» con un punto verde que late. */
.logotipo { display: flex; align-items: baseline; gap: 5px; justify-self: start; text-decoration: none; white-space: nowrap; color: var(--zinc-900); }
.logotipo__tu { font: 500 0.9375rem/1 var(--sans); opacity: 0.72; }
.logotipo__nombre { font: 800 1.5rem/1 var(--sans); letter-spacing: -0.045em; }
.logotipo__punto {
  width: 8px; height: 8px; margin-left: -3px; border-radius: 50%; align-self: flex-end; margin-bottom: 3px;
  background: var(--verde-700); animation: latido-marca 2.4s ease-out infinite;
}
@keyframes latido-marca {
  0% { box-shadow: 0 0 0 0 rgb(21 128 61 / 0.5); }
  70% { box-shadow: 0 0 0 7px rgb(21 128 61 / 0); }
  100% { box-shadow: 0 0 0 0 rgb(21 128 61 / 0); }
}

/* La isla de secciones: flota al centro y una píldora de tinta se desliza bajo la
   activa (barra.js la ubica). Se lee dónde estás sin tener que leer. */
.pestanas {
  position: relative; display: flex; padding: 0.375rem;
  background: rgb(255 255 255 / 0.78); backdrop-filter: blur(14px);
  border: 1px solid var(--zinc-200); border-radius: 999px;
  box-shadow: 0 14px 34px -18px rgb(9 9 11 / 0.35);
}
.pestanas__pildora {
  position: absolute; top: 0.375rem; left: 0; height: 2.75rem;
  width: var(--pildora-ancho, 0); transform: translateX(var(--pildora-x, 0));
  border-radius: 999px; background: var(--zinc-900); box-shadow: 0 8px 18px -8px rgb(9 9 11 / 0.6);
  transition: transform 500ms cubic-bezier(0.16, 1, 0.3, 1), width 500ms cubic-bezier(0.16, 1, 0.3, 1);
}
.pestanas__pildora--quieta { transition: none; }
.pestanas a {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  height: 2.75rem; padding: 0 1.1rem; border-radius: 999px;
  color: var(--zinc-600); font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: color 350ms;
}
.pestanas a:hover { color: var(--zinc-900); }
.pestanas a[aria-current="page"] { color: #fff; }
.pestanas svg {
  width: 1.125rem; height: 1.125rem; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
  transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1);
}
.pestanas a:hover svg { transform: translateY(-1px); }
.pestanas .contador { margin-left: 0; background: #f59e0b; color: var(--zinc-900); animation: avisar 1.8s ease-in-out infinite; }
@keyframes avisar { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); } }

.barra__fin { display: flex; align-items: center; gap: 0.75rem; justify-self: end; min-width: 0; }
.cuenta { position: relative; }

/* "Trabajando en", solo del equipo de CTP: dice en qué loteadora cae lo que se crea.
   Con una loteadora ajena elegida se pinta en tinta, como el avatar del equipo, para
   que se note de un vistazo que no es la propia. */
.trabajo { position: relative; min-width: 0; }
.trabajo__boton {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 0.4rem; align-items: center;
  max-width: 15rem; padding: 0.35rem 0.75rem 0.4rem 0.95rem; text-align: left;
  background: rgb(255 255 255 / 0.78); border: 1px solid var(--zinc-200); border-radius: 999px;
  box-shadow: 0 14px 34px -18px rgb(9 9 11 / 0.35); transition: background 150ms, border-color 150ms;
}
.trabajo__boton:hover, .trabajo__boton[aria-expanded="true"] { background: #fff; border-color: var(--zinc-300); }
.trabajo__rotulo { grid-column: 1; font-size: 0.6875rem; line-height: 1.2; color: var(--zinc-500); }
.trabajo__nombre {
  grid-column: 1; font-weight: 600; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.trabajo__boton svg {
  grid-column: 2; grid-row: 1 / span 2; width: 1rem; height: 1rem;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.trabajo--ajena .trabajo__boton { background: var(--marca-800); border-color: var(--marca-800); color: #fff; }
.trabajo--ajena .trabajo__boton:hover,
.trabajo--ajena .trabajo__boton[aria-expanded="true"] { background: var(--marca-700); }
.trabajo--ajena .trabajo__rotulo { color: var(--zinc-300); }
.trabajo__lista { max-height: min(24rem, 70vh); overflow-y: auto; }
/* La elegida lleva un check: es un menú de una sola opción a la vez. */
.menu .trabajo__opcion { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.menu .trabajo__opcion[aria-checked="true"] { font-weight: 600; }
.menu .trabajo__opcion[aria-checked="true"]::after { content: "✓"; color: var(--verde-700); }
.trabajo__nota { margin: 0.25rem 0.625rem 0.375rem; font-size: 0.75rem; color: var(--zinc-500); }
/* En el menú del avatar el selector solo aparece donde la barra no le da espacio. */
.menu__trabajo { display: none; }
.menu__titulo {
  display: block; padding: 0.25rem 0.625rem 0.125rem;
  font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--zinc-500);
}
/* Con las seis pestañas del equipo, bajo ~1360 px el selector quedaría apretado al
   lado de la isla y cortaría el nombre de la loteadora: pasa al menú del avatar. */
@media (max-width: 85rem) {
  .trabajo { display: none; }
  .menu__trabajo:not([hidden]) {
    display: block; margin-bottom: 0.25rem; padding-bottom: 0.25rem; border-bottom: 1px solid var(--zinc-100);
  }
}

/* La franja de "Trabajando en": arriba del contenido mientras se está dentro de una
   loteadora ajena. En tinta y no en rojo: no es un error, es un recordatorio. */
.franja-trabajo {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem 1rem; flex-wrap: wrap;
  width: min(61rem, calc(100% - 3rem)); margin: 1rem auto 0; padding: 0.625rem 0.75rem 0.625rem 1rem;
  background: var(--marca-800); color: #fff; border-radius: var(--radio-lg);
  box-shadow: 0 14px 34px -18px rgb(9 9 11 / 0.55);
}
.franja-trabajo p { margin: 0; overflow-wrap: anywhere; }
.franja-trabajo strong { font-weight: 700; }
.franja-trabajo__salir {
  flex: none; padding: 0.375rem 0.875rem; border: 0; border-radius: 999px;
  background: #fff; color: var(--zinc-900); font-weight: 600;
}
.franja-trabajo__salir:hover { background: var(--zinc-100); }
.franja-trabajo__salir:focus-visible { outline-color: #fff; }
body.pantalla-ancha .franja-trabajo { width: min(107rem, calc(100% - 3rem)); }
/* Un anillo con los colores de los estados gira despacio alrededor del avatar. */
.avatar-anillo { position: relative; display: grid; place-items: center; width: 2.875rem; height: 2.875rem; }
.avatar-anillo::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(#15803d, #f59e0b, #3b82f6, #15803d);
  animation: girar-anillo 6s linear infinite;
}
.avatar-anillo:hover::before { animation-duration: 1.5s; }
@keyframes girar-anillo { to { transform: rotate(360deg); } }
.avatar {
  position: relative; display: grid; place-items: center; width: 2.5rem; height: 2.5rem;
  background: var(--zinc-100); border: 2px solid var(--zinc-50); border-radius: 999px;
  color: var(--zinc-700); font: 700 0.8125rem/1 var(--sans); letter-spacing: 0.02em;
  transition: background 150ms;
}
.avatar:hover, .avatar[aria-expanded="true"] { background: #fff; }
/* El equipo de CTP, en tinta: opera todas las loteadoras y conviene notarlo. */
.avatar--equipo { background: var(--marca-800); color: #fff; }
.avatar--equipo:hover, .avatar--equipo[aria-expanded="true"] { background: var(--marca-700); }

.menu {
  position: absolute; right: 0; top: calc(100% + 0.5rem); z-index: 20;
  display: grid; min-width: 15rem; padding: 0.375rem;
  background: #fff; border: 1px solid var(--zinc-200); border-radius: var(--radio-lg);
  box-shadow: var(--sombra-alta);
  transform-origin: top right; animation: aparecer 140ms cubic-bezier(0.16, 1, 0.3, 1);
}
.menu__quien {
  display: grid; gap: 0.1rem; padding: 0.5rem 0.625rem 0.625rem; margin-bottom: 0.25rem;
  border-bottom: 1px solid var(--zinc-100);
}
.menu__quien strong { font-weight: 600; overflow-wrap: anywhere; }
.menu__quien span { font-size: 0.75rem; color: var(--zinc-500); }
.menu button, .menu a {
  display: block; width: 100%; padding: 0.5rem 0.625rem; text-align: left;
  background: transparent; border: 0; border-radius: var(--radio-sm);
  color: inherit; font: inherit; text-decoration: none;
}
.menu button:hover, .menu button:focus-visible,
.menu a:hover, .menu a:focus-visible { background: var(--zinc-100); outline: none; }
.menu form:last-child { margin-top: 0.25rem; padding-top: 0.25rem; border-top: 1px solid var(--zinc-100); }
@keyframes aparecer { from { opacity: 0; transform: scale(0.96) translateY(-4px); } }
@media (prefers-reduced-motion: reduce) {
  .menu, .logotipo__punto, .pestanas .contador, .avatar-anillo::before { animation: none; }
  .pestanas__pildora, .pestanas a, .pestanas svg { transition: none; }
}

/* --- Botones ---------------------------------------------------------------- */

.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  height: 2.5rem; padding: 0 1rem;
  border: 1px solid transparent; border-radius: var(--radio-sm);
  background: var(--marca-700); color: #fff;
  font: 500 0.875rem/1 var(--sans); text-decoration: none;
  transition: background 150ms, border-color 150ms, color 150ms;
}
.boton:hover { background: var(--marca-800); }
.boton:active { background: var(--marca-900); }
.boton--contorno { background: #fff; border-color: var(--zinc-300); color: var(--zinc-900); }
.boton--contorno:hover { background: var(--zinc-50); }
.boton--texto { background: transparent; color: var(--zinc-600); }
.boton--texto:hover { background: var(--zinc-100); color: var(--zinc-900); }
.boton[disabled] { background: var(--zinc-300); border-color: transparent; color: #fff; cursor: not-allowed; }
.boton--contorno[disabled] { background: var(--zinc-100); color: var(--zinc-400); }
.boton svg { width: 1.1rem; height: 1.1rem; }
.boton--grande { height: 3rem; padding: 0 2rem; font-size: 0.9375rem; font-weight: 600; }
.boton--peligro { color: var(--rojo-700); }
.boton--peligro:hover { background: var(--rojo-50); color: var(--rojo-700); }
/* Lleno, para lo que no tiene vuelta (eliminar una loteadora). Deshabilitado queda
   gris como cualquier botón: el rojo se gana escribiendo el nombre. */
.boton--rojo { background: var(--rojo-700); }
.boton--rojo:not([disabled]):hover { background: #991b1b; }
.boton--rojo:not([disabled]):active { background: #7f1d1d; }
.boton--contorno.boton--peligro { border-color: var(--rojo-200); }

/* Respuesta al tiro. El botón se hunde apenas se aprieta, y mientras el servidor
   contesta (aria-busy, lo pone js/ocupado.js) muestra un círculo que gira: la consola
   puede tardar un par de segundos en despertar y sin esto parecía que no se apretó.
   El círculo asoma recién a los 120 ms, para que lo que contesta al tiro no parpadee. */
.boton:not([disabled]):active { transform: scale(0.97); transition-duration: 60ms; }
:is(button, .boton)[aria-busy="true"] { cursor: progress; }
button[aria-busy="true"]:not(.boton) { opacity: 0.6; }
.boton[aria-busy="true"]::after {
  content: ""; flex: none; width: 0.9em; height: 0.9em; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: girar-anillo 700ms linear infinite, asomar-giro 150ms 120ms both;
}
@keyframes asomar-giro { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .boton:not([disabled]):active { transform: none; }
  .boton[aria-busy="true"]::after { animation-duration: 1.6s, 1ms; }
}

/* --- Pantallas ------------------------------------------------------------------ */

.lienzo { max-width: 64rem; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.pantalla { display: grid; gap: 1.25rem; animation: entrar 220ms cubic-bezier(0.16, 1, 0.3, 1); }
.pantalla--angosta { max-width: 44rem; margin: 0 auto; }
@keyframes entrar { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .pantalla { animation: none; } }

.pantalla h1 { margin: 0; font: 700 1.75rem/1.15 var(--sans); letter-spacing: -0.025em; }
.pantalla__cabecera { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.pantalla__cabecera .guia { margin: 0.4rem 0 0; }
/* El texto toma el ancho que sobra y los botones se quedan a la derecha; en pantallas
   angostas los botones bajan. */
.pantalla__cabecera > div:first-child { flex: 1 1 20rem; min-width: 0; }
.pantalla__cabecera > .boton, .pantalla__acciones { flex-shrink: 0; }
.volver {
  justify-self: start; margin-bottom: -0.5rem;
  color: var(--zinc-500); font-size: 0.8125rem; text-decoration: none;
}
.volver:hover { color: var(--zinc-900); }

/* --- Mis planos ------------------------------------------------------------------ */

/* Los colores de estado de Tu Masterplan (pipeline/config.py), un punto más claros:
   aquí van sobre foto o sobre tinta. Son los de la consola y no siguen al diseño de
   cada loteadora (ese se elige en Mis diseños, tarjeta "Parcelas"). */
:root {
  --estado-disponible: #22c55e; --estado-reservado: #f59e0b;
  --estado-vendido: #3b82f6; --estado-no_disponible: #71717a; --estado-total: #fafafa;
  --curva-salida: cubic-bezier(0.16, 1, 0.3, 1);
}

.antetitulo {
  display: block; margin-bottom: 0.4rem;
  font: 700 0.75rem/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--zinc-500);
}
#pantalla-planos { gap: 1.75rem; }
#pantalla-planos h1 { font: 800 2.75rem/1.02 var(--sans); letter-spacing: -0.035em; }
#pantalla-planos .guia { font-size: 0.9375rem; }

/* Nuevo master: un brillo lo recorre cada tanto, para que se note dónde empieza todo. */
.boton-nuevo { position: relative; overflow: hidden; height: 3rem; padding: 0 1.4rem; border-radius: 0.875rem; font-size: 0.9375rem; font-weight: 600;
  transition: transform 250ms var(--curva-salida), background 200ms; }
.boton-nuevo:hover { transform: translateY(-2px); }
.boton-nuevo::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.2), transparent);
  transform: translateX(-120%); animation: brillo 3.6s ease-in-out infinite 1.2s;
}
/* El manual va al lado de Nuevo master, sin competirle: contorno, misma altura y radio. */
.boton-manual { height: 3rem; padding: 0 1.2rem; border-radius: 0.875rem; font-size: 0.9375rem; font-weight: 600; white-space: nowrap; }
.boton-manual svg, .nota-manual svg { flex: none; }
.boton-manual svg { width: 1.15rem; height: 1.15rem; }
.nota-manual svg { width: 0.95em; height: 0.95em; margin-right: 0.2em; vertical-align: -0.12em; }
@keyframes brillo { 0% { transform: translateX(-120%); } 55%, 100% { transform: translateX(280%); } }

/* El resumen: lo que suman todos los loteos, sobre tinta. */
.resumen-planos {
  display: grid; gap: 1rem; padding: 1.5rem; border-radius: 1.375rem;
  background: var(--zinc-900); color: var(--zinc-50);
}
.resumen-planos__cifras { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin: 0; }
.resumen-planos__cifras div { display: grid; gap: 0.4rem; }
.resumen-planos__cifras dt {
  display: flex; align-items: center; gap: 0.5rem;
  font: 600 0.75rem/1 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--zinc-400);
}
.resumen-planos__cifras dd { margin: 0; font: 800 2.5rem/1 var(--sans); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.resumen-planos__barra { height: 10px; background: var(--zinc-700); }
.resumen-planos__pie { margin: 0; font-size: 0.8125rem; color: var(--zinc-400); }
.punto-estado { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.punto-estado--total { background: var(--estado-total); }
.punto-estado--disponible { background: var(--estado-disponible); }
.punto-estado--reservado { background: var(--estado-reservado); }
.punto-estado--vendido { background: var(--estado-vendido); }

.barra-estados { display: flex; height: 6px; border-radius: 999px; overflow: hidden; background: rgb(255 255 255 / 0.18); }
.tramo { display: block; height: 100%; }
.tramo--disponible { background: var(--estado-disponible); }
.tramo--reservado { background: var(--estado-reservado); }
.tramo--vendido { background: var(--estado-vendido); }
.tramo--no_disponible { background: var(--estado-no_disponible); }

/* La rejilla: el primero destacado y dos a su lado; el resto de a tres. */
.planos {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.25rem; margin: 0; padding: 0; list-style: none;
}
.planos__item { display: grid; min-width: 0; }
.planos__item--destacada { grid-column: span 7; grid-row: span 2; }
.planos__item--lateral { grid-column: span 5; }
.planos__item--tercio { grid-column: span 4; }
.planos__item--mitad { grid-column: span 6; grid-row: span 2; }
.planos__item--ancha { grid-column: span 12; }
/* Alturas por forma: la destacada mide lo que las dos de su lado, gap incluido. */
.planos__item--lateral .plano, .planos__item--tercio .plano { min-height: 15.5rem; }
.planos__item--destacada .plano { min-height: 32.25rem; }
.planos__item--mitad .plano, .planos__item--ancha .plano { min-height: 26rem; }

.plano {
  position: relative; isolation: isolate; display: flex; flex-direction: column;
  border-radius: 1.375rem; overflow: hidden; text-decoration: none; color: #fff;
  /* Sin construir no hay foto: queda una trama de loteo sobre tinta. */
  background-color: var(--zinc-900);
  background-image:
    linear-gradient(rgb(255 255 255 / 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.045) 1px, transparent 1px);
  background-size: 24px 24px;
  box-shadow: 0 12px 30px -18px rgb(9 9 11 / 0.35);
  transition: transform 450ms var(--curva-salida), box-shadow 450ms var(--curva-salida);
}
.plano:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -24px rgb(9 9 11 / 0.45); }
.plano:focus-visible { outline-offset: 4px; }
.plano__foto { position: absolute; inset: 0; z-index: -2; overflow: hidden; transition: transform 1.2s var(--curva-salida); }
.plano:hover .plano__foto { transform: scale(1.05); }
/* La foto deriva despacio, como el dron que la tomó. */
.plano__foto img { display: block; width: 100%; height: 100%; object-fit: cover; animation: deriva 26s ease-in-out infinite alternate; }
@keyframes deriva { from { transform: scale(1.04) translate(1.5%, 0); } to { transform: scale(1.12) translate(-2.5%, -1%); } }
.plano__velo {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgb(9 9 11 / 0.35) 0%, rgb(9 9 11 / 0) 32%, rgb(9 9 11 / 0.15) 55%, rgb(9 9 11 / 0.88) 100%);
}
.plano__arriba { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; padding: 1rem 1.15rem; }
.plano .pastilla, .plano__vistas {
  display: inline-flex; align-items: center; gap: 0.45rem; height: 1.9rem; padding: 0 0.75rem;
  border-radius: 999px; background: rgb(255 255 255 / 0.16); color: #fff; box-shadow: none;
  backdrop-filter: blur(10px); font: 700 0.75rem/1 var(--sans);
}
.plano__vistas { font-weight: 600; }
.punto-vivo { width: 8px; height: 8px; border-radius: 50%; background: var(--estado-disponible); animation: latido 2s ease-out infinite; }
@keyframes latido {
  0% { box-shadow: 0 0 0 0 rgb(34 197 94 / 0.55); }
  70% { box-shadow: 0 0 0 8px rgb(34 197 94 / 0); }
  100% { box-shadow: 0 0 0 0 rgb(34 197 94 / 0); }
}
.plano__abajo { margin-top: auto; display: grid; gap: 0.9rem; padding: 1.15rem 1.25rem 1.25rem; }
.plano__titulo { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.plano__nombre { margin: 0; font: 800 1.6rem/1.05 var(--sans); letter-spacing: -0.03em; text-wrap: balance; }
.planos__item--destacada .plano__nombre, .planos__item--ancha .plano__nombre { font-size: 2.4rem; }
.plano__abrir {
  display: inline-flex; align-items: center; gap: 0.35rem; flex: none; font-weight: 600;
  opacity: 0; transform: translateX(-8px); transition: opacity 450ms, transform 450ms var(--curva-salida);
}
.plano__abrir svg { width: 1.15rem; height: 1.15rem; }
.plano:hover .plano__abrir, .plano:focus-visible .plano__abrir { opacity: 1; transform: none; }
.plano__cifras { display: flex; gap: 1.75rem; margin: 0; flex-wrap: wrap; }
.plano__cifras div { display: grid; gap: 0.15rem; }
.plano__cifras dt { font: 700 0.6875rem/1 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: rgb(255 255 255 / 0.72); }
.plano__cifras dd { margin: 0; font: 700 1.25rem/1.2 var(--sans); font-variant-numeric: tabular-nums; }
.plano__cifras dd span { color: rgb(255 255 255 / 0.6); font-weight: 500; }

/* Primeros pasos: hasta el primer master publicado. Una lista que se marca sola;
   el paso que toca lleva el botón lleno, los demás de contorno. */
.primeros-pasos {
  display: grid; gap: 0.35rem; padding: 1.5rem 1.6rem;
  border: 1px solid var(--zinc-200); border-radius: 1.375rem; background: #fff;
  box-shadow: var(--sombra);
}
.primeros-pasos h2 { margin: 0; font: 700 1.125rem/1.3 var(--sans); letter-spacing: -0.01em; }
.primeros-pasos > .nota { margin: 0 0 0.6rem; color: var(--zinc-500); }
.primeros-pasos__lista { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.primer-paso {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1rem;
  padding: 0.9rem 0; border-top: 1px solid var(--zinc-100);
}
.primer-paso__marca {
  display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%;
  border: 1.5px solid var(--zinc-300); color: var(--zinc-500); font: 700 0.8125rem/1 var(--sans);
}
.primer-paso__marca svg { width: 1rem; height: 1rem; }
.primer-paso--hecho .primer-paso__marca { border-color: var(--verde-700); background: var(--verde-700); color: #fff; }
.primer-paso--siguiente .primer-paso__marca { border-color: var(--zinc-900); color: var(--zinc-900); }
.primer-paso__cuerpo { display: grid; gap: 0.15rem; }
.primer-paso__cuerpo strong { font-size: 0.9375rem; }
.primer-paso__cuerpo strong i { font-style: normal; font-weight: 500; font-size: 0.75rem; color: var(--zinc-500); }
.primer-paso__cuerpo p { margin: 0; color: var(--zinc-600); max-width: 62ch; }
.primer-paso--hecho .primer-paso__cuerpo strong { color: var(--zinc-500); }
.primer-paso--hecho .primer-paso__cuerpo p { display: none; }
.primer-paso .boton { white-space: nowrap; border-radius: 0.75rem; }
@media (max-width: 40rem) {
  .primeros-pasos { padding: 1.25rem; }
  .primer-paso { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
  .primer-paso .boton { grid-column: 2; justify-self: start; }
}

/* La invitación al próximo master. */
.plano-nuevo {
  display: flex; align-items: center; gap: 1.5rem; padding: 1.6rem 2rem;
  border: 1.5px dashed var(--zinc-400); border-radius: 1.375rem;
  background: rgb(255 255 255 / 0.5); color: var(--zinc-900); text-decoration: none;
  transition: border-color 300ms, background 300ms;
}
.plano-nuevo:hover { border-color: var(--zinc-900); background: #fff; }
.plano-nuevo__icono { position: relative; display: grid; place-items: center; width: 4.5rem; height: 4.5rem; flex: none; }
.plano-nuevo__icono svg { width: 1.9rem; height: 1.9rem; }
.plano-nuevo__orbita { position: absolute; inset: 0; border: 1.5px dashed var(--zinc-400); border-radius: 50%; animation: orbita 9s linear infinite; }
.plano-nuevo__orbita::before {
  content: ""; position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; margin-left: -5px;
  border-radius: 50%; background: var(--zinc-900);
}
.plano-nuevo:hover .plano-nuevo__orbita { animation-duration: 3s; }
@keyframes orbita { to { transform: rotate(360deg); } }
.plano-nuevo__textos { display: grid; gap: 0.25rem; }
.plano-nuevo__textos strong { font-size: 1.125rem; letter-spacing: -0.01em; }
.plano-nuevo__textos span { color: var(--zinc-600); }

/* La entrada, solo al llegar a la pantalla: escalonada, y las barras se llenan. */
@keyframes asomar { from { opacity: 0; transform: translateY(18px); } }
@keyframes llenar { from { transform: scaleX(0); } }
.resumen-planos--entrando { animation: asomar 700ms var(--curva-salida) both; }
.resumen-planos--entrando .barra-estados { transform-origin: left; animation: llenar 1.4s var(--curva-salida) both 300ms; }
.planos--entrando .planos__item { animation: asomar 700ms var(--curva-salida) both; animation-delay: calc(150ms + var(--orden) * 90ms); }
.planos--entrando .barra-estados { transform-origin: left; animation: llenar 1.4s var(--curva-salida) both; animation-delay: calc(550ms + var(--orden) * 120ms); }

@media (max-width: 52rem) {
  .planos__item { grid-column: span 12 !important; grid-row: auto !important; }
  .planos__item .plano { min-height: 16.5rem; }
  .planos__item--destacada .plano { min-height: 20rem; }
  /* Sin foto no hay nada que mirar: la tarjeta se achica y deja pasar a la siguiente. */
  .planos__item .plano--sin-foto { min-height: 11rem; }
  .resumen-planos__cifras { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .resumen-planos__cifras dd { font-size: 1.85rem; }
  #pantalla-planos h1 { font-size: 2.25rem; }
  .plano__abrir { display: none; }
}
/* En el teléfono, Nuevo master queda abajo, al alcance del pulgar. */
@media (max-width: 40rem) {
  /* Solo Nuevo master baja; el manual se queda en la cabecera, a lo ancho. */
  #pantalla-planos .pantalla__acciones { flex: 1 1 100%; }
  #pantalla-planos .boton-manual { flex: 1 1 auto; }
  #pantalla-planos .boton-nuevo { position: fixed; z-index: 5; left: 1rem; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom));
    justify-content: center; height: 3.5rem; box-shadow: 0 18px 40px -16px rgb(9 9 11 / 0.6); }
  #pantalla-planos { padding-bottom: 5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .plano, .plano__foto, .plano__abrir, .boton-nuevo { transition: none; }
  .plano:hover, .plano:hover .plano__foto { transform: none; }
  .plano__foto img, .punto-vivo, .plano-nuevo__orbita, .boton-nuevo::after { animation: none; }
}

/* --- Nuevo master ----------------------------------------------------------------- */

.formulario {
  display: grid; gap: 1.1rem; padding: 1.75rem;
  background: #fff; border: 1px solid var(--zinc-200); border-radius: var(--radio-lg);
  box-shadow: var(--sombra);
}
.renglon { display: grid; grid-template-columns: 8rem 1fr; align-items: start; gap: 1rem; }
.renglon__rotulo { padding-top: 0.6rem; font-weight: 600; color: var(--zinc-800); }
.renglon__rotulo i { display: block; font: 400 0.75rem var(--sans); font-style: normal; color: var(--zinc-400); }
.renglon input[type="text"], .renglon select {
  height: 2.5rem; padding: 0 0.75rem; width: 100%;
  background: #fff; border: 1px solid var(--zinc-300); border-radius: var(--radio-sm);
  outline: none; transition: border-color 150ms, box-shadow 150ms;
}
.renglon input:focus, .renglon select:focus { border-color: var(--marca-700); box-shadow: 0 0 0 3px var(--marca-anillo); }
.renglon select[disabled] { background: var(--zinc-50); color: var(--zinc-500); }

/* Un campo de archivo que se ve como caja: se hace clic o se suelta encima. */
.archivo {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 2.5rem; padding: 0.5rem 0.875rem;
  background: var(--zinc-50); border: 1px dashed var(--zinc-300); border-radius: var(--radio-sm);
  color: var(--zinc-600); font-size: 0.8125rem; text-align: center; cursor: pointer;
  transition: background 150ms, border-color 150ms, color 150ms;
}
.archivo input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.archivo:hover, .archivo.soltadero--encima { background: var(--marca-50); border-color: var(--marca-700); color: var(--marca-800); }
.archivo:focus-within { box-shadow: 0 0 0 3px var(--marca-anillo); border-color: var(--marca-700); }
.archivo--alto { min-height: 6.5rem; flex-direction: column; }
.archivo--alto svg { width: 1.5rem; height: 1.5rem; }
.archivo--lleno { background: var(--verde-50); border-style: solid; border-color: var(--verde-100); color: var(--verde-800); font-weight: 500; }
.archivo--lleno::before { content: "✓"; font-weight: 700; }
.archivo--alto.archivo--lleno::before { content: none; }
/* El menú de la zona del vuelo: el mismo de la cuenta, pero colgando centrado de la
   zona, porque el clic pudo ser en cualquier parte de ella. */
/* En "Subir archivos" la zona es un .soltadero, que no posiciona: sin esto el menú se
   colgaría del <dialog> (por debajo de él) y su overflow lo escondería. */
.soltadero:has(> .zona-menu) { position: relative; }
.zona-menu.menu {
  left: 50%; right: auto; top: calc(100% + 0.25rem); min-width: 12rem;
  transform: translateX(-50%); transform-origin: top center;
  color: var(--zinc-800); font-size: 0.875rem; font-weight: 400; text-align: left; cursor: default;
  animation-name: aparecer-centrado;
}
@keyframes aparecer-centrado { from { opacity: 0; transform: translateX(-50%) scale(0.96) translateY(-4px); } }
/* Dentro de un <dialog> no hay lugar abajo: colgando de la zona tapaba el pie y el
   overflow del diálogo lo cortaba. Ahí se abre sobre la zona, centrado. */
dialog .soltadero > .zona-menu.menu {
  top: 50%; transform: translate(-50%, -50%); transform-origin: center;
  animation-name: aparecer-sobre;
}
@keyframes aparecer-sobre { from { opacity: 0; transform: translate(-50%, -50%) scale(0.96); } }
@media (prefers-reduced-motion: reduce) {
  .zona-menu.menu, dialog .soltadero > .zona-menu.menu { animation: none; }
}
.nota { margin: 0.4rem 0 0; font-size: 0.75rem; color: var(--zinc-500); }
.enlace { color: var(--zinc-700); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.enlace:hover { color: var(--zinc-900); }
button.enlace { padding: 0; background: none; border: 0; font: inherit; }

.avance { display: grid; gap: 0.4rem; font-size: 0.8125rem; color: var(--zinc-600); }
.avance .progreso { margin: 0; }
.formulario__pie { display: flex; justify-content: center; padding-top: 0.5rem; }

/* --- Mis diseños ------------------------------------------------------------------ */

#pantalla-disenos h1 { font: 800 2.75rem/1.02 var(--sans); letter-spacing: -0.035em; }
.disenos {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1.25rem;
  margin: 0; padding: 0; list-style: none;
}
.disenos > li { display: grid; }
.diseno {
  display: flex; flex-direction: column; border: 1px solid var(--zinc-200); border-radius: 1.375rem;
  background: #fff; overflow: hidden; text-decoration: none; color: inherit;
  box-shadow: 0 12px 30px -24px rgb(9 9 11 / 0.35);
  transition: transform 450ms var(--curva-salida), box-shadow 450ms var(--curva-salida), border-color 300ms;
}
.diseno:not(.diseno--nuevo):hover { transform: translateY(-4px); box-shadow: 0 26px 50px -26px rgb(9 9 11 / 0.45); }
/* La muestra: el sitio en chico, con la marca puesta sobre la foto del campo. */
.diseno__vista {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 1rem;
  aspect-ratio: 16 / 10; padding: 0.75rem; overflow: hidden;
  background: linear-gradient(180deg, #9cc3e6 0 38%, #7c9b5b 38% 100%) center / cover no-repeat;
  font-family: var(--sans);
}
.diseno__vista::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(9 9 11 / 0.1), rgb(9 9 11 / 0) 40%, rgb(9 9 11 / 0.35)); }
.diseno__isla, .diseno__boton { position: relative; z-index: 1; }
.diseno__isla {
  align-self: flex-start; display: flex; align-items: center; gap: 0.5rem; max-width: 100%;
  padding: 0.3rem 0.85rem 0.3rem 0.3rem; border-radius: 999px;
  background: rgb(255 255 255 / 0.85); backdrop-filter: blur(10px); box-shadow: 0 10px 24px -14px rgb(9 9 11 / 0.6);
  color: var(--zinc-900);
}
.diseno__isla img { height: 1.75rem; max-width: 5.5rem; object-fit: contain; }
.diseno__hito { display: grid; place-items: center; width: 1.75rem; height: 1.75rem; padding: 0.3rem; border-radius: 50%; background: var(--marca-700); color: #fff; flex: none; }
.diseno__hito svg { width: 100%; height: 100%; }
.diseno__isla strong { font-size: 0.8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.diseno__boton {
  align-self: stretch; display: grid; place-items: center; height: 2.4rem; border-radius: 0.75rem;
  background: var(--marca-700); color: #fff; font: 600 0.875rem/1 var(--sans);
  box-shadow: 0 10px 22px -12px rgb(9 9 11 / 0.7);
  transition: transform 450ms var(--curva-salida);
}
.diseno:hover .diseno__boton { transform: translateY(-2px); }
.diseno__pie { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0.15rem 0.75rem; padding: 0.9rem 1.1rem 1rem; }
.diseno__nombre { font: 700 1.0625rem/1.2 var(--sans); }
.diseno__usos { grid-column: 1; font-size: 0.8125rem; color: var(--zinc-500); }
.diseno__color {
  grid-column: 2; grid-row: 1 / span 2; display: inline-flex; align-items: center; gap: 0.4rem;
  font: 500 0.75rem var(--mono); color: var(--zinc-500);
}
.diseno__color::before { content: ""; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: var(--muestra); box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.1); }
.diseno--nuevo {
  align-items: center; justify-content: center; gap: 0.5rem; min-height: 17rem; padding: 1.5rem; text-align: center;
  border: 1.5px dashed var(--zinc-400); background: rgb(255 255 255 / 0.5); box-shadow: none;
}
.diseno--nuevo:hover { border-color: var(--zinc-900); background: #fff; }
.diseno--nuevo strong { font-size: 1.0625rem; }
.diseno--nuevo > span:last-child { max-width: 15rem; font-size: 0.8125rem; line-height: 1.5; color: var(--zinc-500); }
.diseno__nuevo-icono { position: relative; display: grid; place-items: center; width: 4.5rem; height: 4.5rem; margin-bottom: 0.25rem; }
.diseno__nuevo-icono svg { width: 1.9rem; height: 1.9rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.diseno--nuevo:hover .plano-nuevo__orbita { animation-duration: 3s; }
.disenos--entrando > li { animation: asomar 700ms var(--curva-salida) both; animation-delay: calc(120ms + var(--orden, 0) * 80ms); }
@media (prefers-reduced-motion: reduce) {
  .diseno, .diseno__boton { transition: none; }
  .diseno:hover { transform: none; }
  .disenos--entrando > li { animation: none; }
}

/* --- Reservas ---------------------------------------------------------------------- */

/* El número de la pestaña: solicitudes esperando que alguien las mire. En ámbar,
   como "reservado" en el visor: es una parcela apartada, no un error. */
.contador {
  display: inline-grid; place-items: center; min-width: 1.25rem; height: 1.25rem; margin-left: 0.4rem;
  padding: 0 0.35rem; border-radius: 999px; background: var(--ambar-200); color: var(--ambar-800);
  font: 700 0.6875rem/1 var(--sans); font-variant-numeric: tabular-nums;
}
#pantalla-reservas { gap: 1.75rem; }
#pantalla-reservas h1 { font: 800 2.75rem/1.02 var(--sans); letter-spacing: -0.035em; }
#pantalla-reservas .guia { max-width: 46rem; font-size: 0.9375rem; }
.resumen-reservas dd small { margin-left: 0.3rem; font-size: 1rem; font-weight: 600; letter-spacing: 0; color: var(--zinc-400); }

/* El filtro por loteo: píldoras, la elegida en tinta, con las que esperan en ámbar. */
.filtro-loteos { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: -0.5rem; }
.filtro-loteos button {
  display: inline-flex; align-items: center; gap: 0.45rem; height: 2.375rem; padding: 0 1rem;
  border: 1px solid var(--zinc-200); border-radius: 999px; background: #fff; color: var(--zinc-700);
  font-weight: 600; transition: background 200ms, color 200ms, border-color 200ms, transform 250ms var(--curva-salida);
}
.filtro-loteos button:hover { border-color: var(--zinc-400); transform: translateY(-1px); }
.filtro-loteos button[aria-pressed="true"] { background: var(--zinc-900); border-color: var(--zinc-900); color: #fff; }
.filtro-loteos__cuenta {
  display: inline-grid; place-items: center; min-width: 1.25rem; height: 1.25rem; padding: 0 0.35rem;
  border-radius: 999px; background: var(--ambar-200); color: var(--ambar-800); font-size: 0.6875rem; font-weight: 800;
}

.reservas { display: grid; gap: 2rem; }
.reservas__grupo { display: grid; gap: 0.75rem; }
.reservas__grupo h2 { display: flex; align-items: center; gap: 0.5rem; margin: 0; font: 700 1.25rem/1.2 var(--sans); letter-spacing: -0.015em; }
.reservas__lista { display: grid; gap: 0.75rem; margin: 0; padding: 0; list-style: none; }

/* Una solicitud: la parcela en grande, quién la pidió, el reloj y qué hacer. */
.solicitud {
  display: grid; grid-template-columns: 7.5rem minmax(0, 1fr) auto auto; align-items: center; gap: 1.5rem;
  padding: 1.25rem 1.5rem; background: #fff; border: 1px solid var(--zinc-200); border-radius: 1.375rem;
  transition: transform 400ms var(--curva-salida), box-shadow 400ms var(--curva-salida), border-color 300ms;
}
.solicitud:hover { transform: translateY(-2px); border-color: var(--zinc-300); box-shadow: 0 18px 36px -24px rgb(9 9 11 / 0.35); }
.solicitud--pendiente { border-color: var(--ambar-200); box-shadow: inset 4px 0 0 var(--estado-reservado); }
.solicitud--pendiente:hover { box-shadow: inset 4px 0 0 var(--estado-reservado), 0 18px 36px -24px rgb(9 9 11 / 0.35); }
.solicitud--confirmada { box-shadow: inset 4px 0 0 var(--estado-disponible); }
.solicitud__parcela { display: grid; gap: 0.15rem; min-width: 0; }
.solicitud__rotulo { font: 700 0.625rem/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--zinc-400); }
.solicitud__lote { font: 800 2rem/1 var(--sans); letter-spacing: -0.04em; overflow-wrap: anywhere; }
.solicitud__loteo { color: var(--zinc-500); font-size: 0.8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.solicitud__comprador { display: grid; gap: 0.7rem; min-width: 0; }
.solicitud__quien { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.solicitud__quien div { display: grid; min-width: 0; }
.solicitud__quien strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.solicitud__quien small { color: var(--zinc-500); font-size: 0.8125rem; }
.solicitud__avatar {
  display: grid; place-items: center; flex: none; width: 2.5rem; height: 2.5rem; border-radius: 50%;
  background: var(--ambar-50); color: var(--ambar-800); font-weight: 800; font-size: 0.875rem; box-shadow: inset 0 0 0 1px var(--ambar-200);
}
.solicitud__contactos { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.contacto {
  display: inline-flex; align-items: center; height: 2rem; padding: 0 0.75rem; border-radius: 999px;
  background: var(--zinc-100); color: var(--zinc-800); font-size: 0.8125rem; font-weight: 600; text-decoration: none;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: background 200ms, color 200ms, transform 250ms var(--curva-salida);
}
.contacto:hover { background: var(--zinc-200); transform: translateY(-1px); }
.contacto--whatsapp { background: #dcfce7; color: #166534; }
.contacto--whatsapp::before { content: ""; width: 0.5rem; height: 0.5rem; margin-right: 0.45rem; border-radius: 50%; background: #22c55e; }
.contacto--whatsapp:hover { background: #bbf7d0; }
.solicitud__acciones { display: grid; gap: 0.35rem; justify-items: stretch; }
.solicitud__confirmar { position: relative; overflow: hidden; height: 2.75rem; padding: 0 1.25rem; border-radius: 0.875rem; font-weight: 600; }
.solicitud__confirmar::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.2), transparent);
  transform: translateX(-120%); animation: brillo 3.6s ease-in-out infinite 1.2s;
}

/* El reloj: el anillo ámbar se vacía con el plazo; con poco tiempo se pone rojo y late. */
.reloj { display: grid; justify-items: center; gap: 0.3rem; }
.reloj__hora { font-size: 0.75rem; font-weight: 600; color: var(--zinc-500); font-variant-numeric: tabular-nums; white-space: nowrap; }
.reloj__anillo { position: relative; display: grid; place-items: center; width: 5.5rem; height: 5.5rem; flex: none; }
.reloj svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.reloj circle { fill: none; stroke-width: 5; }
.reloj__fondo { stroke: var(--zinc-100); }
.reloj__resto {
  stroke: var(--estado-reservado); stroke-linecap: round; stroke-dasharray: 100;
  stroke-dashoffset: calc(100 - var(--resto, 1) * 100); transition: stroke-dashoffset 900ms var(--curva-salida), stroke 300ms;
}
.reloj__texto { position: relative; display: grid; justify-items: center; text-align: center; line-height: 1.1; }
.reloj__texto strong { font: 800 1.0625rem/1.1 var(--sans); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.reloj__texto small { font-size: 0.6875rem; color: var(--zinc-500); }
.reloj--urgente .reloj__resto { stroke: var(--rojo-700); }
.reloj--urgente .reloj__anillo { animation: latido-reloj 1.6s ease-in-out infinite; }
.reloj--urgente .reloj__hora { color: var(--rojo-700); }
@keyframes latido-reloj { 50% { transform: scale(1.04); } }
.reservas--entrando .reloj__resto { animation: vaciar 1.4s var(--curva-salida) both 400ms; }
@keyframes vaciar { from { stroke-dashoffset: 0; } }

.solicitud__sello { display: flex; align-items: center; gap: 0.75rem; max-width: 18rem; }
.solicitud__sello svg {
  width: 2.5rem; height: 2.5rem; flex: none; padding: 0.55rem; border-radius: 50%;
  background: var(--verde-50); fill: none; stroke: var(--verde-700); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}
.solicitud__sello div { display: grid; gap: 0.1rem; }
.solicitud__sello small { color: var(--zinc-500); font-size: 0.75rem; }

.anterior {
  display: grid; grid-template-columns: 7.5rem minmax(0, 1fr) minmax(0, 1fr) auto auto; align-items: center; gap: 1rem;
  padding: 0.7rem 1.5rem; border-radius: 1rem; color: var(--zinc-500); font-size: 0.875rem;
}
.anterior:hover { background: #fff; }
.anterior strong { color: var(--zinc-700); }
.anterior span, .anterior small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.anterior__estado { justify-self: start; padding: 0.15rem 0.6rem; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--zinc-300); font-size: 0.75rem; font-weight: 600; }

.reservas--entrando .solicitud, .reservas--entrando .anterior {
  animation: asomar 650ms var(--curva-salida) both; animation-delay: calc(200ms + var(--orden) * 80ms);
}

/* --- Contactos: el formulario de la landing, en la misma línea que Reservas --------- */
.mensaje {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 1rem 1.5rem;
  padding: 1.25rem 1.5rem; background: #fff; border: 1px solid var(--zinc-200); border-radius: 1.375rem;
  transition: transform 400ms var(--curva-salida), box-shadow 400ms var(--curva-salida), border-color 300ms;
}
.mensaje:hover { transform: translateY(-2px); border-color: var(--zinc-300); box-shadow: 0 18px 36px -24px rgb(9 9 11 / 0.35); }
/* Ámbar lo que nadie ha contestado, igual que una reserva por confirmar. */
.mensaje--nuevo { border-color: var(--ambar-200); box-shadow: inset 4px 0 0 var(--estado-reservado); }
.mensaje--nuevo:hover { box-shadow: inset 4px 0 0 var(--estado-reservado), 0 18px 36px -24px rgb(9 9 11 / 0.35); }
.mensaje--atendido { opacity: 0.8; }
.mensaje__cuerpo { display: grid; gap: 0.75rem; min-width: 0; }
.mensaje__pedido { margin: 0; font-size: 0.9375rem; font-weight: 700; letter-spacing: -0.01em; }
.mensaje__texto {
  margin: 0; padding: 0.75rem 0.9rem; border-radius: 0.875rem; background: var(--zinc-50);
  color: var(--zinc-700); font-size: 0.875rem; white-space: pre-wrap; overflow-wrap: anywhere;
}
.mensaje__accion { height: 2.75rem; padding: 0 1.25rem; border-radius: 0.875rem; font-weight: 600; white-space: nowrap; }
@media (max-width: 40rem) { .mensaje { grid-template-columns: 1fr; } }

.reservas-vacio {
  display: grid; justify-items: center; gap: 0.5rem; padding: 3.5rem 1.5rem; text-align: center;
  border: 1.5px dashed var(--zinc-300); border-radius: 1.375rem; color: var(--zinc-500);
}
.reservas-vacio strong { color: var(--zinc-900); font-size: 1.0625rem; }
.reservas-vacio p { max-width: 28rem; margin: 0; }
.reservas-vacio__icono { position: relative; display: grid; place-items: center; width: 4.5rem; height: 4.5rem; margin-bottom: 0.5rem; }
.reservas-vacio__icono svg { width: 1.75rem; height: 1.75rem; fill: none; stroke: var(--zinc-500); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 56rem) {
  .solicitud { grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; }
  .solicitud__comprador { grid-column: 1 / -1; grid-row: 2; }
  .solicitud__acciones { grid-column: 1 / -1; grid-template-columns: 1fr auto; }
  .solicitud__sello { grid-column: 1 / -1; max-width: none; }
  .anterior { grid-template-columns: minmax(0, 1fr) auto; row-gap: 0.15rem; }
  .anterior > :nth-child(2), .anterior > :nth-child(3) { grid-column: 1; }
}
@media (max-width: 40rem) {
  #pantalla-reservas h1 { font-size: 2.25rem; }
  .solicitud { padding: 1rem 1.1rem; border-radius: 1.125rem; }
  .solicitud__lote { font-size: 1.75rem; }
  .reloj__anillo { width: 4.75rem; height: 4.75rem; }
}
@media (prefers-reduced-motion: reduce) {
  .solicitud__confirmar::after, .reloj--urgente .reloj__anillo, .reservas--entrando .reloj__resto,
  .reservas--entrando .solicitud, .reservas--entrando .anterior { animation: none; }
}

/* --- Interesados: la lista a la izquierda, el elegido a la derecha ----------------- */
#pantalla-interesados h1 { font: 800 2.75rem/1.02 var(--sans); letter-spacing: -0.035em; }
.interesados__acciones { align-items: center; }
.interesados__estado select {
  height: 2.5rem; padding: 0 2rem 0 0.85rem; border: 1px solid var(--zinc-300); border-radius: 0.75rem; background: #fff;
}
.interesados-cuerpo { display: grid; grid-template-columns: minmax(0, 1fr) 23rem; gap: 1.25rem; align-items: start; }
.interesados__lista {
  display: grid; margin: 0; padding: 0; list-style: none; overflow: hidden;
  background: #fff; border: 1px solid var(--zinc-200); border-radius: 1.375rem;
}
.interesado-fila + .interesado-fila { border-top: 1px solid var(--zinc-100); }
.interesado-fila button {
  display: grid; grid-template-columns: 6.5rem minmax(0, 1.4fr) minmax(0, 1fr) 8.5rem minmax(0, 0.8fr);
  align-items: center; gap: 1rem; width: 100%; padding: 0.9rem 1.25rem; border: 0; background: none;
  text-align: left; cursor: pointer; transition: background 200ms;
}
.interesado-fila button:hover { background: var(--zinc-50); }
.interesado-fila button[aria-pressed="true"] { background: var(--zinc-100); box-shadow: inset 4px 0 0 var(--zinc-900); }
.interesado-fila--nuevo button { font-weight: 600; }
.interesado-fila__cuando, .interesado-fila__responsable { color: var(--zinc-500); font-size: 0.8125rem; }
.interesado-fila__quien, .interesado-fila__parcela { display: grid; min-width: 0; }
.interesado-fila__quien strong, .interesado-fila__parcela small, .interesado-fila__quien small {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.interesado-fila small { color: var(--zinc-500); font-size: 0.8125rem; font-weight: 400; }
.interesado-fila__responsable { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.insignia-interes {
  justify-self: start; padding: 0.25rem 0.6rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700;
  background: var(--zinc-100); color: var(--zinc-700); white-space: nowrap;
}
/* Ámbar lo que nadie ha llamado, igual que una reserva por confirmar. */
.insignia-interes--nuevo { background: var(--ambar-50); color: var(--ambar-800); box-shadow: inset 0 0 0 1px var(--ambar-200); }
.insignia-interes--contactado { background: #eff6ff; color: #1d4ed8; }
.insignia-interes--visita { background: #f5f3ff; color: #6d28d9; }
.insignia-interes--reservo { background: var(--verde-50); color: var(--verde-800); }
.insignia-interes--descartado { color: var(--zinc-500); }

.interesado {
  position: sticky; top: 6rem; display: grid; gap: 1.1rem; padding: 1.5rem;
  background: #fff; border: 1px solid var(--zinc-200); border-radius: 1.375rem;
}
.interesado__cabeza { display: grid; gap: 0.35rem; }
.interesado__cabeza h2 { margin: 0.25rem 0 0; font: 800 1.5rem/1.15 var(--sans); letter-spacing: -0.025em; overflow-wrap: anywhere; }
.interesado__cabeza p { margin: 0; color: var(--zinc-600); font-size: 0.875rem; }
.interesado__contactos { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.interesado__contactos .boton { height: 2.75rem; border-radius: 0.875rem; font-weight: 700; }
.interesado .boton--whatsapp { background: #25d366; color: var(--zinc-950); border-color: transparent; }
.interesado .boton--whatsapp:hover { background: #20ba59; }
.interesado__datos { display: grid; gap: 0.4rem; margin: 0; font-size: 0.875rem; }
.interesado__datos div { display: flex; justify-content: space-between; gap: 1rem; }
.interesado__datos dt { color: var(--zinc-500); }
.interesado__datos dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.interesado__campos { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.interesado__campo { display: grid; gap: 0.35rem; min-width: 0; }
.interesado__campo > span { font: 700 0.6875rem/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--zinc-500); }
.interesado__campo select, .interesado__campo input, .interesado__campo textarea {
  width: 100%; min-width: 0; padding: 0.55rem 0.75rem; border: 1px solid var(--zinc-300); border-radius: 0.75rem;
  background: #fff; font: inherit; font-size: 0.9375rem; outline: none;
}
.interesado__campo select, .interesado__campo input { height: 2.6rem; padding-block: 0; }
.interesado__campo textarea { resize: vertical; min-height: 4.5rem; }
.interesado__campo :focus { border-color: var(--zinc-700); box-shadow: 0 0 0 3px var(--marca-anillo); }
.interesado__nota { display: grid; gap: 0.5rem; }
.interesado__guardar { justify-self: end; height: 2.4rem; padding: 0 1rem; border-radius: 0.75rem; }
.interesado .nota { margin: 0; font-size: 0.75rem; }

@media (max-width: 64rem) {
  .interesados-cuerpo { grid-template-columns: 1fr; }
  /* En pantallas angostas el elegido va arriba: es lo que se viene a hacer. */
  .interesado { position: static; order: -1; }
  .interesado-fila button { grid-template-columns: minmax(0, 1fr) auto; row-gap: 0.4rem; }
  .interesado-fila__cuando { grid-column: 2; grid-row: 1; text-align: right; }
  .interesado-fila__quien { grid-column: 1; grid-row: 1; }
  .interesado-fila__parcela { grid-column: 1; }
  .interesado-fila .insignia-interes { grid-column: 2; justify-self: end; }
  .interesado-fila__responsable { display: none; }
}
@media (max-width: 40rem) {
  #pantalla-interesados h1 { font-size: 2.25rem; }
  .interesados__acciones { flex: 1 1 100%; flex-shrink: 1; }
  .interesados__estado { flex: 1 1 100%; }
  .interesados__estado select { width: 100%; }
  .interesados__acciones .boton { flex: 1; }
  .interesado { padding: 1.1rem; }
}

/* --- Estadísticas del sitio, en el detalle de un loteo publicado ------------------- */
.estadisticas { display: grid; gap: 1rem; }
.estadisticas[aria-busy="true"] .estadisticas__tarjetas, .estadisticas[aria-busy="true"] .estadisticas__cuerpo { opacity: 0.55; transition: opacity 200ms; }
.estadisticas__cabecera { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.estadisticas__cabecera h2 { margin: 0; font: 800 1.5rem/1.15 var(--sans); letter-spacing: -0.025em; }
.estadisticas__cabecera .nota { margin: 0.25rem 0 0; }
.segmentos { display: inline-flex; padding: 0.25rem; gap: 0.25rem; border-radius: 0.875rem; background: var(--zinc-100); }
.segmentos button {
  height: 2.25rem; padding: 0 0.9rem; border: 0; border-radius: 0.625rem; background: none;
  color: var(--zinc-600); font-size: 0.875rem; font-weight: 600; cursor: pointer;
}
.segmentos button[aria-pressed="true"] { background: #fff; color: var(--zinc-900); box-shadow: var(--sombra); }
.estadisticas__tarjetas { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.75rem; margin: 0; }
.estadistica { display: grid; gap: 0.35rem; align-content: start; padding: 1.1rem 1.2rem; background: #fff; border: 1px solid var(--zinc-200); border-radius: 1.125rem; }
.estadistica dt { font: 700 0.6875rem/1.2 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--zinc-500); }
.estadistica dd { margin: 0; font: 800 2rem/1 var(--sans); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--zinc-900); }
.estadistica small { color: var(--zinc-500); font-size: 0.8125rem; }
.estadisticas__cuerpo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 0.75rem; }
.estadisticas__panel { display: grid; align-content: start; gap: 0.75rem; min-width: 0; padding: 1.25rem; background: #fff; border: 1px solid var(--zinc-200); border-radius: 1.375rem; }
.estadisticas__panel h3 { margin: 0; font: 700 1rem/1.2 var(--sans); }
.estadisticas__panel .nota { margin: 0; }
.estadisticas__lectura { margin: 0; padding: 0.7rem 0.9rem; border-radius: 0.875rem; background: var(--ambar-50); color: var(--ambar-800); font-size: 0.875rem; }

/* Una sola serie: un color, barras finas con la punta redondeada y la grilla callada. */
.grafico { position: relative; padding-top: 1.25rem; }
.grafico__maximo { position: absolute; top: 0; left: 0; color: var(--zinc-400); font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.grafico__barras {
  display: grid; grid-template-columns: repeat(var(--barras, 30), minmax(0, 1fr)); gap: 2px; align-items: end;
  height: 11rem; border-top: 1px dashed var(--zinc-200); border-bottom: 1px solid var(--zinc-300);
}
.grafico__columna { position: relative; display: flex; align-items: flex-end; justify-content: center; height: 100%; outline: none; cursor: default; }
.grafico__barra { width: min(100%, 1.75rem); min-height: 2px; border-radius: 4px 4px 0 0; background: var(--zinc-800); transition: background 150ms; }
.grafico__columna:hover .grafico__barra, .grafico__columna:focus-visible .grafico__barra { background: var(--verde-700); }
.grafico__rotulo {
  position: absolute; top: calc(100% + 0.35rem); left: 0; white-space: nowrap;
  color: var(--zinc-500); font-size: 0.6875rem;
}
.grafico__barras { margin-bottom: 1.5rem; }
.grafico__columna:hover::after, .grafico__columna:focus-visible::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 0.4rem); left: 50%; transform: translateX(-50%); z-index: 2;
  padding: 0.35rem 0.6rem; border-radius: 0.5rem; background: var(--zinc-900); color: #fff;
  font-size: 0.75rem; font-weight: 600; white-space: nowrap; pointer-events: none;
}
.grafico--vacio .grafico__barra { background: var(--zinc-200); }

/* El embudo: barras horizontales contra las visitas, para ver de un vistazo dónde se cae la gente. */
.embudo { display: grid; gap: 0.6rem; padding-top: 0.75rem; border-top: 1px solid var(--zinc-100); }
.embudo h4 { margin: 0; font: 700 0.875rem/1.2 var(--sans); }
.embudo__pasos { display: grid; gap: 0.7rem; margin: 0; padding: 0; list-style: none; }
.embudo__paso { display: grid; gap: 0.25rem; min-width: 0; }
.embudo__linea { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; font-size: 0.875rem; }
.embudo__rotulo { min-width: 0; color: var(--zinc-700); }
.embudo__cifra { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--zinc-900); }
.embudo__pista { height: 0.5rem; border-radius: 999px; background: var(--zinc-100); overflow: hidden; }
.embudo__barra { display: block; height: 100%; border-radius: inherit; background: var(--verde-700); }
.embudo__barra--con { min-width: 2px; }
.embudo__detalle { color: var(--zinc-500); font-size: 0.75rem; }

.estadisticas__tabla { overflow-x: auto; }
.estadisticas__tabla table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.estadisticas__tabla th, .estadisticas__tabla td { padding: 0.55rem 0.4rem; border-bottom: 1px solid var(--zinc-100); text-align: left; white-space: nowrap; }
.estadisticas__tabla thead th { font: 700 0.6875rem/1.2 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--zinc-500); border-bottom-color: var(--zinc-200); }
.estadisticas__tabla tbody th { font-weight: 800; }
.estadisticas__tabla .num { text-align: right; font-variant-numeric: tabular-nums; }
.estado-parcela { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--zinc-700); }

@media (max-width: 64rem) {
  .estadisticas__tarjetas { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .estadisticas__cuerpo { grid-template-columns: 1fr; }
}
@media (max-width: 40rem) {
  .estadisticas__tarjetas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .estadistica dd { font-size: 1.6rem; }
}

/* --- Mis KMZ ---------------------------------------------------------------------- */

/* Nuevo master y Nuevo KMZ, juntos y alineados a la derecha de la cabecera. */
.pantalla__acciones { display: flex; gap: 0.5rem; flex-wrap: wrap; }

#pantalla-kmzs h1 { font: 800 2.75rem/1.02 var(--sans); letter-spacing: -0.035em; }

/* Una tarjeta por KMZ: la miniatura del plano arriba, en qué paso va abajo. */
.mis-kmz {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1.25rem;
  margin: 0; padding: 0; list-style: none;
}
.mi-kmz {
  position: relative; display: flex; flex-direction: column;
  border: 1px solid var(--zinc-200); border-radius: 1.375rem; background: #fff; overflow: hidden;
  box-shadow: 0 12px 30px -24px rgb(9 9 11 / 0.35);
  transition: transform 450ms var(--curva-salida), box-shadow 450ms var(--curva-salida), border-color 300ms;
}
.mi-kmz:not(.mi-kmz--nuevo):hover { transform: translateY(-4px); box-shadow: 0 26px 50px -26px rgb(9 9 11 / 0.45); border-color: var(--zinc-300); }
.mi-kmz__abrir { display: flex; flex-direction: column; flex: 1; text-decoration: none; color: inherit; }
.mi-kmz__abrir:focus-visible { outline: 2px solid var(--marca-700); outline-offset: -2px; border-radius: 1.375rem; }
/* El plano sobre papel cuadriculado, como en la mesa del topógrafo. */
.mi-kmz__plano {
  position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; overflow: hidden;
  background-color: var(--zinc-50);
  background-image: linear-gradient(var(--zinc-200) 1px, transparent 1px), linear-gradient(90deg, var(--zinc-200) 1px, transparent 1px);
  background-size: 18px 18px;
  border-bottom: 1px solid var(--zinc-100);
}
.mi-kmz__plano img { width: 100%; height: 100%; object-fit: contain; padding: 0.75rem; mix-blend-mode: multiply; transition: transform 1.2s var(--curva-salida); }
.mi-kmz:hover .mi-kmz__plano img { transform: scale(1.06); }
.mi-kmz__plano > svg { width: 2.5rem; height: 2.5rem; fill: none; stroke: var(--zinc-400); stroke-width: 1.4; stroke-linejoin: round; }
.mi-kmz__estado { position: absolute; top: 0.75rem; left: 0.75rem; box-shadow: 0 6px 14px -8px rgb(9 9 11 / 0.4); }
.mi-kmz__estado.pastilla--ok { background: var(--verde-50); color: var(--verde-800); box-shadow: inset 0 0 0 1px var(--verde-100), 0 6px 14px -8px rgb(9 9 11 / 0.4); }
.mi-kmz__cuerpo { display: grid; gap: 0.35rem; padding: 1rem 1.15rem 0.75rem; }
.mi-kmz__nombre { font: 700 1.125rem/1.2 var(--sans); letter-spacing: -0.015em; overflow-wrap: anywhere; }
.mi-kmz__detalle { font-size: 0.8125rem; color: var(--zinc-500); }
/* Cinco tramos, uno por paso: encendidos los hechos; el que corre, latiendo. */
.mi-kmz__avance { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 0.4rem; }
.mi-kmz__avance i { height: 5px; border-radius: 999px; background: var(--zinc-200); }
.mi-kmz__avance i.hecho { background: var(--verde-700); }
.mi-kmz__avance i.en-curso { background: var(--zinc-900); animation: latir-tramo 1.2s ease-in-out infinite; }
@keyframes latir-tramo { 50% { opacity: 0.35; } }
.mi-kmz__acciones { display: flex; align-items: center; gap: 0.375rem; padding: 0 1rem 1rem 1.15rem; }
.mi-kmz__acciones .boton { border-radius: 0.75rem; white-space: nowrap; }
.mi-kmz__acciones .boton svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mi-kmz__icono {
  display: grid; place-items: center; width: 2.25rem; height: 2.25rem; margin-left: auto; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--zinc-500); text-decoration: none; transition: background 150ms, color 150ms;
}
.mi-kmz__icono + .mi-kmz__icono { margin-left: 0; }
.mi-kmz__icono:hover { background: var(--zinc-100); color: var(--zinc-900); }
.mi-kmz__icono--peligro:hover { background: var(--rojo-50); color: var(--rojo-700); }
.mi-kmz__icono[disabled] { opacity: 0.35; cursor: not-allowed; }
.mi-kmz__icono svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* La invitación a otro KMZ, como la del próximo master. */
.mi-kmz--nuevo { border: 1.5px dashed var(--zinc-400); background: rgb(255 255 255 / 0.5); box-shadow: none; }
.mi-kmz--nuevo:hover { border-color: var(--zinc-900); background: #fff; }
.mi-kmz__nuevo {
  flex: 1; display: grid; place-items: center; align-content: center; gap: 0.5rem; min-height: 16rem;
  padding: 1.5rem; border: 0; background: transparent; text-align: center; color: var(--zinc-900);
}
.mi-kmz__nuevo strong { font-size: 1.0625rem; }
.mi-kmz__nuevo > span:last-child { max-width: 16rem; font-size: 0.8125rem; line-height: 1.5; color: var(--zinc-500); }
.mi-kmz__nuevo-icono { position: relative; display: grid; place-items: center; width: 4.5rem; height: 4.5rem; margin-bottom: 0.25rem; }
.mi-kmz__nuevo-icono svg { width: 1.9rem; height: 1.9rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.mi-kmz--nuevo:hover .plano-nuevo__orbita { animation-duration: 3s; }

.mis-kmz--entrando .mi-kmz { animation: asomar 700ms var(--curva-salida) both; animation-delay: calc(120ms + var(--orden, 0) * 80ms); }
@media (prefers-reduced-motion: reduce) {
  .mi-kmz, .mi-kmz__plano img { transition: none; }
  .mi-kmz:hover { transform: none; }
  .mi-kmz__avance i.en-curso, .mis-kmz--entrando .mi-kmz { animation: none; }
}

/* El nombre del KMZ con su lápiz, en la pantalla de los pasos. */
.kmz-cabecera { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

/* Nuevo master: elegir uno de Mis KMZ en vez de subir el archivo. */
.nuevo-mio { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; }
.nuevo-mio select {
  height: 2.25rem; max-width: 100%; padding: 0 0.5rem;
  border: 1px solid var(--zinc-300); border-radius: var(--radio-sm); background: #fff; font: inherit; color: var(--zinc-900);
}

.editor { display: grid; grid-template-columns: minmax(0, 1fr) 21rem; gap: 1.5rem; align-items: start; }
.editor__form .formulario__pie { padding-top: 0; }
.color { display: flex; align-items: center; gap: 0.625rem; flex-wrap: wrap; }
.colores { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-right: 0.25rem; }
.muestra-color {
  width: 2.25rem; height: 2.25rem; padding: 0; border: 0; border-radius: 50%; background: var(--muestra);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.12); transition: transform 200ms var(--curva-salida), box-shadow 200ms;
}
.muestra-color:hover { transform: scale(1.1); }
.muestra-color[aria-pressed="true"] { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--muestra); }
.color input[type="color"] {
  width: 2.5rem; height: 2.5rem; padding: 0.2rem;
  background: #fff; border: 1px solid var(--zinc-300); border-radius: 50%; cursor: pointer;
}
.color input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.color input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 50%; }
.ajustes .color input[type="text"] { width: 7rem; font-family: var(--mono); }
/* Los campos del editor estiran sus entradas; el selector de color y los textos de
   las tarjetas de letra y del logo no son campos de texto. */
.ajustes .color input[type="color"] { width: 2.5rem; height: 2.5rem; padding: 0; border: 1px solid var(--zinc-300); border-radius: 50%; background: #fff; }
.ajustes .letra span, .ajustes .archivo span {
  font: 500 0.8125rem/1.3 var(--sans); letter-spacing: 0; text-transform: none; color: var(--zinc-500);
}
.ajustes .archivo span { color: inherit; }
.color .nota { margin: 0; flex-basis: 100%; }
/* La letra se elige viéndola: una tarjeta por familia, escrita en esa familia. */
.letras { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.625rem; }
.letra {
  position: relative; display: grid; justify-items: center; gap: 0.25rem; padding: 0.9rem 0.5rem;
  border: 1px solid var(--zinc-200); border-radius: 1rem; background: var(--zinc-50); cursor: pointer;
  transition: border-color 200ms, background 200ms, box-shadow 200ms;
}
.letra input { position: absolute; opacity: 0; pointer-events: none; }
.letra b { font-size: 1.75rem; line-height: 1; }
.letra span { font-size: 0.75rem; color: var(--zinc-500); }
.letra:hover { border-color: var(--zinc-400); }
.letra:has(input:checked) { border-color: var(--zinc-900); background: #fff; box-shadow: 0 0 0 3px rgb(24 24 27 / 0.08); }
.letra:has(input:focus-visible) { outline: 2px solid var(--marca-700); outline-offset: 2px; }
.letra--jakarta b { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; }
.letra--serif b { font-family: Georgia, 'Iowan Old Style', 'Times New Roman', serif; }
.letra--sistema b { font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
/* Parcelas: una fila por estado con su punto, su nombre, el selector y el hex. */
.estados-color { display: grid; gap: 0.5rem; }
.estado-color {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 0.625rem;
  padding: 0.4rem 0.4rem 0.4rem 0.875rem; border: 1px solid var(--zinc-200); border-radius: 0.875rem; background: var(--zinc-50);
}
.estado-color__punto { width: 0.75rem; height: 0.75rem; border-radius: 50%; box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgb(0 0 0 / 0.12); }
.estado-color__nombre { font: 600 0.875rem/1.2 var(--sans); color: var(--zinc-800); }
/* Más específico que `.ajustes .campo input`, que estira las entradas del editor. */
.ajustes .estado-color input[type="color"] {
  width: 2.25rem; height: 2.25rem; padding: 0; border: 1px solid var(--zinc-300); border-radius: 50%; background: #fff; cursor: pointer;
}
.estado-color input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.estado-color input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 50%; }
.ajustes .estado-color input[type="text"] { width: 6.5rem; height: 2.25rem; padding: 0 0.625rem; background: #fff; font-family: var(--mono); font-size: 0.875rem; }
.estados-color__pie { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem; margin: 0; }
.estados-color__pie .enlace { padding: 0; border: 0; background: none; font: 500 0.8125rem/1.3 var(--sans); }
/* Vacía no ocupa lugar pero sigue en la página: una región en vivo que aparece
   junto con su texto no siempre se anuncia. */
.estados-color__pie .nota:empty { visibility: hidden; width: 0; }
.nota--aviso { margin: 0; color: #a16207; font-weight: 600; }
/* En un teléfono angosto "No disponible", el selector y el hex no caben en una fila:
   el nombre arriba y los controles abajo, sin correr de lado. */
@media (max-width: 24rem) {
  .estado-color { grid-template-columns: 2.25rem minmax(0, 1fr); gap: 0.4rem 0.625rem; padding: 0.6rem; }
  .estado-color__punto { justify-self: center; }
  .ajustes .estado-color input[type="text"] { width: 100%; }
}
/* Las opciones de números, con la misma tarjeta que la letra y una muestra chica
   de cómo queda: pastillas con número o puntos (los colores los pone disenos.js). */
.numeros { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.numeros__opcion { padding: 0.9rem 0.75rem; text-align: center; }
.numeros__opcion strong { font-size: 0.875rem; color: var(--zinc-900); }
.numeros__muestra { display: flex; align-items: center; justify-content: center; gap: 0.3rem; height: 1.5rem; margin-bottom: 0.15rem; }
.numeros__disco, .numeros__punto { border-radius: 999px; box-shadow: 0 0 0 1.5px #fff, 0 1px 3px rgb(0 0 0 / 0.35); }
.numeros__disco { display: grid; place-items: center; min-width: 1.4rem; height: 1.4rem; padding: 0 0.25rem; font: 700 0.625rem/1 var(--sans); font-style: normal; font-variant-numeric: tabular-nums; }
.numeros__punto { width: 0.5rem; height: 0.5rem; }
/* Líneas: los estilos rápidos arriba y un bloque por grupo (contorno, divisiones,
   caminos), cada uno con sus campos de a dos. Las opciones usan la tarjeta de la
   letra con una muestra de la línea en vez de las letras. */
.estilos-lineas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.625rem; }
.estilo-lineas {
  display: grid; justify-items: center; gap: 0.4rem; padding: 0.5rem 0.5rem 0.6rem;
  border: 1px solid var(--zinc-200); border-radius: 1rem; background: var(--zinc-50); cursor: pointer;
  font: 600 0.8125rem/1.2 var(--sans); color: var(--zinc-800);
  transition: border-color 200ms, background 200ms, box-shadow 200ms;
}
/* Va dentro de un .campo, cuyo rótulo es en versalitas: el nombre del estilo no. */
.ajustes .estilo-lineas span { font: 600 0.8125rem/1.2 var(--sans); letter-spacing: 0; text-transform: none; color: var(--zinc-800); text-align: center; }
.estilo-lineas:hover { border-color: var(--zinc-400); }
.estilo-lineas[aria-pressed="true"] { border-color: var(--zinc-900); background: #fff; box-shadow: 0 0 0 3px rgb(24 24 27 / 0.08); }
.estilo-lineas:focus-visible { outline: 2px solid var(--marca-700); outline-offset: 2px; }
/* Un pasto de mentira: las líneas blancas no se verían sobre la tarjeta clara. */
.estilo-lineas__muestra { display: block; width: 100%; max-width: 6rem; height: auto; border-radius: 0.5rem;
  background: linear-gradient(135deg, #7c9b5b, #5f7d45); }
.lineas-grupo { display: grid; gap: 0.875rem; padding-top: 1rem; border-top: 1px solid var(--zinc-100); }
.ajustes .lineas-grupo__titulo.interruptor { padding: 0; border-top: 0; }
p.lineas-grupo__titulo { display: grid; gap: 0.1rem; margin: 0; font-size: 0.8125rem; line-height: 1.45; color: var(--zinc-500); }
p.lineas-grupo__titulo b { color: var(--zinc-900); font-size: 0.875rem; font-weight: 600; }
.lineas-grupo__campos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.875rem 1rem; }
.lineas-grupo__casilla { grid-column: 1 / -1; }
.lineas-grupo__casilla span { color: var(--zinc-700); }
/* Apagado se ve lo que volverá al prenderlo, pero claramente quieto. */
.lineas-grupo--apagado .lineas-grupo__campos { opacity: 0.5; }
.lineas-grupo--apagado .letra, .lineas-grupo--apagado .casilla-ajuste,
.lineas-grupo--apagado .color input { cursor: not-allowed; }
.lineas-grupo--apagado .letra:hover { border-color: var(--zinc-200); }
.lineas-opciones { grid-template-columns: repeat(var(--opciones, 3), minmax(0, 1fr)); gap: 0.4rem; }
.linea-opcion { padding: 0.55rem 0.25rem 0.5rem; gap: 0.3rem; border-radius: 0.75rem; color: var(--zinc-900); }
.linea-opcion b.linea-opcion__muestra { display: block; width: 100%; max-width: 3.5rem; height: 1rem; font-size: 0; }
.linea-opcion__muestra svg { display: block; width: 100%; height: 100%; overflow: visible; }
.formulario__pie--separado { justify-content: space-between; }
.formulario__pie--separado .boton:only-child { margin-left: auto; }

/* La vista previa: un teléfono con la foto del campo, la isla de la marca arriba y
   la ficha de una parcela abajo. `aplicarMarca` pone las mismas variables --marca-*
   y --sans que usa el visor; lo de acá solo dibuja la escena. */
.previa { position: sticky; top: 6rem; display: grid; gap: 0.75rem; justify-items: center; font-family: var(--sans); }
.previa__rotulo {
  font: 700 0.6875rem/1 'Plus Jakarta Sans', system-ui, sans-serif; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--zinc-500);
}
.previa__telefono {
  position: relative; width: 100%; max-width: 19rem; aspect-ratio: 9 / 17; overflow: hidden;
  border: 8px solid var(--zinc-900); border-radius: 2.5rem; background: var(--zinc-900);
  box-shadow: 0 30px 60px -30px rgb(9 9 11 / 0.6);
}
.previa__foto {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, #9cc3e6 0 32%, #7c9b5b 32% 100%) center / cover no-repeat;
}
/* El loteo de ejemplo con las líneas del diseño: estirado al teléfono como las
   pastillas, que se ubican en porcentaje de las mismas coordenadas (disenos.js). */
.previa__lineas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
/* Parcelas de ejemplo sobre la foto, con el aspecto de las del visor
   (web/css/estilos.css, .parcela__disco y .parcela--punto). */
.previa__parcelas { position: absolute; z-index: 1; inset: 0; pointer-events: none; }
.previa__parcela {
  position: absolute; transform: translate(-50%, -50%);
  display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%;
  border: 1.5px solid rgb(255 255 255 / 0.9); filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.4));
  font: 700 0.625rem/1 var(--sans); font-variant-numeric: tabular-nums;
  transition: background 200ms, width 200ms var(--curva-salida), height 200ms var(--curva-salida);
}
.previa__parcela--punto { width: 0.6rem; height: 0.6rem; border-width: 1.5px; }
.previa__barra {
  position: absolute; z-index: 1; top: 0.75rem; left: 0.75rem; right: 0.75rem;
  display: flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0.8rem 0.3rem 0.3rem;
  border-radius: 999px; background: rgb(255 255 255 / 0.85); backdrop-filter: blur(10px);
  box-shadow: 0 10px 24px -14px rgb(9 9 11 / 0.6);
}
.previa__marca { display: grid; place-items: center; width: 2rem; height: 2rem; padding: 0.35rem; background: var(--marca-700); border-radius: 50%; color: #fff; flex: none; }
.previa__marca--logo { width: auto; max-width: 6rem; padding: 0; background: none; border-radius: 0; }
.previa__marca--logo .previa__hito { display: none; }
.previa__marca img { display: block; height: 2rem; max-width: 6rem; object-fit: contain; }
.previa__hito { width: 100%; height: 100%; }
.previa__nombre { display: grid; gap: 0.05rem; min-width: 0; color: var(--zinc-900); }
.previa__nombre strong { font-size: 0.8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.previa__nombre small { font-size: 0.625rem; color: var(--zinc-500); }
.previa__ficha {
  position: absolute; z-index: 1; left: 0; right: 0; bottom: 0;
  display: grid; gap: 0.45rem; padding: 0.9rem 0.9rem 1.1rem;
  border-radius: 1.5rem 1.5rem 0 0; background: #fff; color: var(--zinc-900);
  box-shadow: 0 -12px 30px -18px rgb(9 9 11 / 0.6);
}
.previa__ficha::before { content: ""; justify-self: center; width: 2.25rem; height: 4px; margin-bottom: 0.2rem; border-radius: 2px; background: var(--zinc-300); }
.previa__ficha strong { font-size: 1rem; }
.previa__estado { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.75rem; color: var(--zinc-700); }
/* El color de "disponible" que eligió el diseño (disenos.js pone --previa-disponible). */
.previa__estado i { width: 0.6rem; height: 0.6rem; border-radius: 999px; background: var(--previa-disponible, #15803d); }
.previa__precio { font-weight: 700; font-size: 0.9375rem; }
.previa__precio small { font-weight: 400; color: var(--zinc-500); }
.previa__boton {
  display: grid; place-items: center; height: 2.4rem; padding: 0 0.75rem;
  background: var(--marca-700); color: #fff; border-radius: 0.75rem;
  font: 600 0.8125rem/1 var(--sans); text-align: center; transition: background 250ms;
}
.previa__boton--contorno { background: #fff; color: var(--zinc-900); box-shadow: inset 0 0 0 1px var(--zinc-300); }

/* --- Un master ------------------------------------------------------------------- */

#pantalla-plano { gap: 0; }
.plano-detalle { display: grid; gap: 1.5rem; }
.plano-detalle--vacio > :not(.plano-detalle__cabecera) { display: none; }
.plano-detalle--vacio .plano-detalle__acciones { display: none; }

/* La portada del dron a todo el ancho, con el nombre, el estado y las acciones encima. */
.heroe {
  position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: space-between;
  min-height: 28rem; border-radius: 1.75rem; overflow: hidden; color: #fff;
  background-color: var(--zinc-900);
  background-image:
    linear-gradient(rgb(255 255 255 / 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.045) 1px, transparent 1px);
  background-size: 24px 24px;
  animation: asomar 700ms var(--curva-salida) both;
}
.portada { position: absolute; inset: 0; z-index: -2; margin: 0; overflow: hidden; }
.portada img { display: block; width: 100%; height: 100%; object-fit: cover; animation: deriva 26s ease-in-out infinite alternate; }
.portada--vacia { display: grid; place-items: center; padding: 6rem 2rem 9rem; }
.portada--vacia figcaption { max-width: 30rem; text-align: center; color: rgb(255 255 255 / 0.75); font-size: 0.9375rem; line-height: 1.55; }
.heroe__velo {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgb(9 9 11 / 0.45) 0%, rgb(9 9 11 / 0) 28%, rgb(9 9 11 / 0.1) 50%, rgb(9 9 11 / 0.9) 100%);
}
.heroe__arriba { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; padding: 1.25rem 1.4rem; }
.heroe .volver {
  display: inline-flex; align-items: center; gap: 0.5rem; height: 2.4rem; padding: 0 0.9rem; margin: 0;
  border-radius: 999px; background: rgb(255 255 255 / 0.16); backdrop-filter: blur(12px);
  color: #fff; font-size: 0.8125rem; font-weight: 600; transition: background 250ms;
}
.heroe .volver:hover { background: rgb(255 255 255 / 0.28); color: #fff; }
.heroe .volver svg, .publicar svg, .inventario__cabeza svg, .grupo__titulo svg {
  width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.heroe__estado { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem; }
.heroe .pastilla {
  display: inline-flex; align-items: center; gap: 0.45rem; height: 2.4rem; padding: 0 0.9rem;
  border-radius: 999px; background: rgb(255 255 255 / 0.16); color: #fff; box-shadow: none;
  backdrop-filter: blur(12px); font: 700 0.8125rem/1 var(--sans);
}
.heroe .pastilla--aviso { background: var(--ambar-200); color: var(--ambar-800); }
.heroe .pastilla--enlace { background: #fff; color: var(--zinc-900); transition: transform 250ms var(--curva-salida); }
.heroe .pastilla--enlace:hover { transform: translateY(-1px); box-shadow: none; }
.heroe__abajo { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.25rem; padding: 0 1.75rem 1.75rem; }
.plano-detalle__identidad { display: grid; gap: 0.875rem; min-width: 0; max-width: 42rem; }
.pantalla .heroe h1 { font: 800 4rem/0.98 var(--sans); letter-spacing: -0.04em; text-wrap: balance; }
.meta { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.meta__dato { padding: 0.375rem 0.625rem; border-radius: 0.5rem; background: rgb(255 255 255 / 0.14); font-size: 0.75rem; font-weight: 600; }
.plano-detalle__acciones { display: flex; gap: 0.625rem; flex-wrap: wrap; }

/* Botones sobre foto y sobre tinta. */
.boton--vidrio {
  height: 2.75rem; border: 1px solid rgb(255 255 255 / 0.28); border-radius: 0.75rem;
  background: rgb(255 255 255 / 0.12); backdrop-filter: blur(12px); color: #fff; font-weight: 600;
  transition: background 250ms, transform 250ms var(--curva-salida);
}
.boton--vidrio:hover { background: rgb(255 255 255 / 0.26); transform: translateY(-1px); }
.boton--claro {
  height: 2.75rem; border-radius: 0.75rem; background: #fff; color: var(--zinc-900); font-weight: 700;
  transition: transform 250ms var(--curva-salida), background 200ms;
}
.boton--claro:hover { background: var(--zinc-100); transform: translateY(-1px); }
.boton--contorno-claro { height: 2.75rem; border-radius: 0.75rem; border: 1px solid rgb(255 255 255 / 0.25); background: transparent; color: #fff; font-weight: 600; }
.boton--contorno-claro:hover { background: rgb(255 255 255 / 0.08); }
.boton--icono-claro { width: 2.75rem; height: 2.75rem; padding: 0; justify-content: center; border-radius: 0.75rem; border: 1px solid rgb(255 255 255 / 0.25); background: transparent; color: #fff; }
.boton--icono-claro:hover { background: rgb(255 255 255 / 0.08); }
.boton--vidrio[disabled], .boton--claro[disabled], .boton--contorno-claro[disabled] { opacity: 0.45; background: rgb(255 255 255 / 0.12); color: #fff; transform: none; cursor: not-allowed; }

/* Las cifras: el reparto de parcelas sobre tinta y, al lado, el medidor del sol. */
.cifras { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; gap: 1rem; }
.cifras__estados { display: grid; gap: 1rem; padding: 1.5rem; border-radius: 1.375rem; background: var(--zinc-900); color: var(--zinc-50); }
.cifras__lista { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; margin: 0; }
/* Un rótulo en dos líneas no desalinea su número: todos quedan abajo. */
.cifras__lista div { display: grid; gap: 0.4rem; align-content: space-between; }
.cifras__lista dt { display: flex; align-items: center; gap: 0.5rem; font: 600 0.6875rem/1 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--zinc-400); }
.cifras__lista dd { margin: 0; font: 800 2.25rem/1 var(--sans); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.cifras__barra { height: 10px; background: var(--zinc-700); }
.punto-estado--no_disponible { background: var(--estado-no_disponible); }
.punto-estado--no_en_venta { background: var(--zinc-300); }
.cifras__sol { display: grid; align-content: space-between; gap: 0.75rem; padding: 1.4rem; border-radius: 1.375rem; background: #fff; border: 1px solid var(--zinc-200); }
.cifras__rotulo { font: 700 0.6875rem/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--zinc-500); }
.cifras__medidor { display: flex; align-items: center; gap: 1rem; }
.cifras__medidor svg { width: 7.5rem; height: 4.25rem; flex: none; }
.medidor__fondo, .medidor__arco { fill: none; stroke-width: 9; stroke-linecap: round; }
.medidor__fondo { stroke: var(--zinc-200); }
.medidor__arco { stroke: var(--verde-700); stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--sol, 0) * 100); }
.cifras__sol--revisar .medidor__arco { stroke: #d97706; }
.cifras__grados { display: grid; gap: 0.15rem; }
.cifras__grados strong { font: 800 2rem/1 var(--sans); letter-spacing: -0.03em; }
.cifras__grados span { font-size: 0.8125rem; font-weight: 600; color: var(--verde-700); }
.cifras__sol--revisar .cifras__grados span { color: var(--ambar-800); }
.cifras__pie { font-size: 0.75rem; line-height: 1.5; color: var(--zinc-500); }
/* La semana del sitio publicado, bajo las cifras y el sol, a todo el ancho: rellena el
   hueco que dejaba la columna izquierda, más corta que la de Publicar. */
.cifras__semana { grid-column: 1 / -1; display: grid; gap: 1rem; padding: 1.4rem; border-radius: 1.375rem; background: #fff; border: 1px solid var(--zinc-200); }
.cifras__semana[hidden] { display: none; }
.semana__cabeza { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.semana__ver { font-size: 0.8125rem; font-weight: 600; white-space: nowrap; }
/* Tres en fila siempre, también en el teléfono: son pocas y se leen juntas. */
.semana__cifras { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 0; }
.semana__cifra { display: grid; gap: 0.4rem; align-content: space-between; min-width: 0; }
.semana__cifra dt { font: 600 0.6875rem/1.25 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--zinc-500); }
.semana__cifra dd { margin: 0; font: 800 2rem/1 var(--sans); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--zinc-900); }
.semana__cifra dd.semana__sin { color: var(--zinc-300); }
.cifras__semana[aria-busy="true"] .semana__cifra dd { color: var(--zinc-300); }
@keyframes arco { from { stroke-dashoffset: 100; } }
.cifras--entrando .cifras__estados { animation: asomar 700ms var(--curva-salida) both 80ms; }
.cifras--entrando .cifras__sol { animation: asomar 700ms var(--curva-salida) both 160ms; }
.cifras--entrando .cifras__semana { animation: asomar 700ms var(--curva-salida) both 240ms; }
.cifras--entrando .cifras__barra { transform-origin: left; animation: llenar 1.4s var(--curva-salida) both 350ms; }
.cifras--entrando .medidor__arco { animation: arco 1.6s var(--curva-salida) both 500ms; }

.pastilla {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.125rem 0.625rem; border-radius: 999px;
  background: var(--zinc-100); color: var(--zinc-700);
  box-shadow: inset 0 0 0 1px var(--zinc-200);
  font: 500 0.75rem/1.25rem var(--sans);
}
.pastilla--ok { background: var(--marca-50); color: var(--marca-800); box-shadow: inset 0 0 0 1px var(--marca-100); }
.pastilla--aviso { background: var(--ambar-50); color: var(--ambar-800); box-shadow: inset 0 0 0 1px var(--ambar-200); }
.pastilla--error { background: var(--rojo-50); color: var(--rojo-700); box-shadow: inset 0 0 0 1px var(--rojo-200); }
.pastilla--curso { background: var(--zinc-900); color: #fff; box-shadow: none; }
.pastilla--enlace { text-decoration: none; background: #fff; }
.pastilla--enlace:hover { box-shadow: inset 0 0 0 1px var(--zinc-400); }
.ruta { font: 400 0.75rem var(--mono); color: var(--zinc-500); }


/* --- Ajustes ----------------------------------------------------------------- */

.campo { display: grid; gap: 0.3rem; }
.campo--ancho { grid-column: 1 / -1; }
/* La dirección del link: se cambia con su botón, no con el guardado automático. */
.campo-ruta { display: flex; gap: 0.5rem; }
.campo-ruta input { flex: 1; min-width: 0; }
.campo span { font: 600 0.625rem/1 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--zinc-500); }
.campo span i { font-style: normal; text-transform: none; letter-spacing: 0; color: var(--zinc-400); }
.campo input, .campo select, .fila input, .fila select {
  height: 2.25rem; padding: 0 0.625rem;
  background: #fff; border: 1px solid var(--zinc-300); border-radius: var(--radio-sm);
  font-size: 0.875rem; outline: none;
  transition: border-color 150ms, box-shadow 150ms;
}
.campo input:focus, .fila input:focus, .fila select:focus { border-color: var(--marca-700); box-shadow: 0 0 0 3px var(--marca-anillo); }

/* Los datos del loteo, en tres grupos que dicen para qué sirve cada uno. */
.plano-detalle__cuerpo { display: grid; grid-template-columns: minmax(0, 1fr) 22.5rem; gap: 1.5rem; align-items: start; }
.ajustes { display: grid; gap: 1rem; }
.grupo { display: grid; gap: 1rem; margin: 0; padding: 1.4rem; border: 1px solid var(--zinc-200); border-radius: 1.375rem; background: #fff; }
.grupo__titulo { display: flex; align-items: center; gap: 0.75rem; padding: 0; float: left; width: 100%; }
.grupo__titulo svg { width: 2.25rem; height: 2.25rem; padding: 0.55rem; flex: none; border-radius: 0.625rem; background: var(--zinc-100); }
.grupo__titulo span { display: grid; gap: 0.15rem; }
.grupo__titulo strong { font-size: 1rem; font-weight: 700; }
.grupo__titulo strong i { font-style: normal; font-weight: 500; font-size: 0.75rem; color: var(--zinc-400); }
.grupo__titulo small { font-size: 0.8125rem; color: var(--zinc-500); }
.grupo__campos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; clear: both; }
.ajustes .campo { gap: 0.4rem; min-width: 0; }
.ajustes .campo span { font-size: 0.6875rem; font-weight: 700; color: var(--zinc-600); }
.ajustes .campo input, .ajustes .campo select {
  width: 100%; height: 2.875rem; padding: 0 0.875rem; border-color: var(--zinc-200); border-radius: 0.75rem;
  background: var(--zinc-50); font-size: 0.9375rem; font-weight: 500;
}
.ajustes .campo input:focus, .ajustes .campo select:focus { border-color: var(--zinc-900); background: #fff; box-shadow: 0 0 0 4px rgb(24 24 27 / 0.08); }
.ajustes__quitar { justify-self: start; }

/* Color de las fotos: cerrado ocupa lo mismo que un campo; abierto, un cuadro por
   filtro con la miniatura de la foto del propio loteo. */
.fotos-color__menu { border: 1px solid var(--zinc-200); border-radius: 0.75rem; background: var(--zinc-50); }
.fotos-color__menu[open] { background: #fff; }
.fotos-color__elegido { display: flex; align-items: center; gap: 0.75rem; min-height: 2.875rem; padding: 0.375rem 0.875rem 0.375rem 0.375rem; cursor: pointer; list-style: none; }
.fotos-color__elegido::-webkit-details-marker { display: none; }
.fotos-color__elegido::after { content: ''; margin-left: auto; width: 0.5rem; height: 0.5rem; border: solid var(--zinc-600); border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); transition: transform 150ms; }
.fotos-color__menu[open] .fotos-color__elegido::after { transform: translateY(2px) rotate(225deg); }
.fotos-color__elegido img { width: 3.25rem; height: 2.25rem; flex: none; border-radius: 0.5rem; object-fit: cover; }
.fotos-color__elegido div { display: grid; gap: 0.1rem; min-width: 0; }
.fotos-color__elegido b { font-size: 0.9375rem; font-weight: 600; }
.fotos-color__elegido small { font-size: 0.75rem; color: var(--zinc-500); }
.fotos-color__cuadros { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; padding: 0.25rem 0.75rem 0.25rem; }
.fotos-color__pie { margin: 0; padding: 0.625rem 0.875rem 0.875rem; font-size: 0.75rem; color: var(--zinc-500); }
.color-foto { position: relative; display: grid; align-content: start; gap: 0.35rem; padding: 0.375rem 0.375rem 0.55rem; border: 1px solid var(--zinc-200); border-radius: 0.875rem; background: #fff; cursor: pointer; }
.color-foto:hover { border-color: var(--zinc-400); }
.color-foto img { width: 100%; aspect-ratio: 4 / 3; border-radius: 0.6rem; object-fit: cover; display: block; }
.color-foto b { padding: 0 0.25rem; font-size: 0.8125rem; font-weight: 700; }
.color-foto small { padding: 0 0.25rem; font-size: 0.6875rem; line-height: 1.3; color: var(--zinc-500); }
/* El radio queda para el teclado y el formulario; lo que se ve es el cuadro. */
.ajustes .color-foto input { position: absolute; width: 1px; height: 1px; padding: 0; opacity: 0; pointer-events: none; }
.color-foto:has(input:checked) { border-color: var(--zinc-900); box-shadow: 0 0 0 3px rgb(24 24 27 / 0.12); }
.color-foto:has(input:focus-visible) { outline: 2px solid var(--zinc-900); outline-offset: 2px; }
.color-foto:has(input:checked)::after {
  content: ''; position: absolute; top: 0.75rem; right: 0.75rem; width: 1.375rem; height: 1.375rem; border-radius: 50%;
  background: var(--zinc-900) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 62% no-repeat;
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.3);
}
/* Sin construir todavía no hay miniatura: un degradé neutro en su lugar. */
.fotos-color img.sin-muestra { background: linear-gradient(160deg, var(--zinc-200), var(--zinc-100)); }

/* --- El vuelo: construir y publicar ------------------------------------------- */

.vuelo {
  /* Los colores de estado son los del sitio publicado: la animación muestra el
     mismo loteo que va a ver el comprador, pintándose. */
  --lote-disponible: #15803d; --lote-reservado: #f59e0b; --lote-vendido: #2563eb;
  --vuelo-curva: cubic-bezier(0.45, 0, 0.55, 1);
  display: grid; grid-template-columns: minmax(12rem, 22rem) 1fr; gap: 0.75rem 1.5rem;
  align-items: center; padding: 1rem 1.25rem;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 70%);
  border: 1px solid var(--zinc-200); border-radius: var(--radio-lg);
}
.vuelo__escena { width: 100%; height: auto; color: var(--zinc-900); overflow: visible; }
.vuelo__suelo { fill: #e7eadf; }
.vuelo__camino { fill: #d6d3c4; }
.vuelo__lote {
  fill: #f4f5ef; stroke: #fff; stroke-width: 1.4;
  transition: fill 700ms ease-out;
}
.vuelo__lote[data-estado="disponible"] { fill: var(--lote-disponible); }
.vuelo__lote[data-estado="reservado"] { fill: var(--lote-reservado); }
.vuelo__lote[data-estado="vendido"] { fill: var(--lote-vendido); }

.vuelo__sombra { fill: rgb(9 9 11 / 0.16); }
.vuelo__haz { fill: url(#vuelo-haz); }
.vuelo__fuselaje { fill: var(--zinc-900); }
.vuelo__brazo { stroke: var(--zinc-700); stroke-width: 2.4; stroke-linecap: round; fill: none; }
.vuelo__helice { fill: rgb(63 63 70 / 0.55); }
.vuelo__camara { fill: var(--zinc-600); stroke: #fff; stroke-width: 1; }

/* Todo el movimiento es transform u opacidad: lo hace la tarjeta gráfica. */
.vuelo__ruta, .vuelo__dron, .vuelo__cuerpo, .vuelo__sombra, .vuelo__helice, .vuelo__haz {
  transform-box: fill-box; transform-origin: center;
}
.vuelo[data-estado="volando"] .vuelo__ruta { animation: vuelo-patrulla 7s var(--vuelo-curva) infinite alternate; }
.vuelo[data-estado="volando"] .vuelo__dron { animation: vuelo-flotar 1.8s ease-in-out infinite alternate; }
.vuelo[data-estado="volando"] .vuelo__sombra { animation: vuelo-sombra 1.8s ease-in-out infinite alternate; }
.vuelo[data-estado="volando"] .vuelo__helice { animation: vuelo-helice 0.11s linear infinite alternate; }
.vuelo[data-estado="volando"] .vuelo__haz { animation: vuelo-haz 2.4s ease-in-out infinite; }
/* En cola: el dron espera en el aire, sin recorrer el loteo, hasta que le toque. */
.vuelo[data-estado="cola"] .vuelo__dron { animation: vuelo-flotar 2.6s ease-in-out infinite alternate; }
.vuelo[data-estado="cola"] .vuelo__sombra { animation: vuelo-sombra 2.6s ease-in-out infinite alternate; }
.vuelo[data-estado="cola"] .vuelo__helice { animation: vuelo-helice 0.11s linear infinite alternate; }
.vuelo[data-estado="cola"] .vuelo__haz { opacity: 0; }

/* Listo: se queda quieto sobre el loteo, sin haz. Falló: se apaga y se inclina. */
.vuelo[data-estado="listo"] .vuelo__haz,
.vuelo[data-estado="fallo"] .vuelo__haz { opacity: 0; transition: opacity 400ms; }
.vuelo[data-estado="listo"] .vuelo__dron { transform: translateY(6px); transition: transform 900ms var(--vuelo-curva); }
.vuelo[data-estado="fallo"] .vuelo__cuerpo { transform: rotate(-9deg) translateY(4px); transition: transform 600ms; }
.vuelo[data-estado="fallo"] .vuelo__fuselaje { fill: var(--zinc-400); }
.vuelo[data-estado="fallo"] .vuelo__suelo { fill: var(--zinc-100); }
/* Cancelado: el dron baja y se apaga, en gris y sin el rojo del fallo; el loteo no
   tiene nada malo, solo no se terminó. */
.vuelo[data-estado="cancelado"] .vuelo__haz { opacity: 0; transition: opacity 400ms; }
.vuelo[data-estado="cancelado"] .vuelo__dron { transform: translateY(6px); transition: transform 900ms var(--vuelo-curva); }
.vuelo[data-estado="cancelado"] .vuelo__fuselaje { fill: var(--zinc-400); }

/* Choque: construir o actualizar falló. La escena quieta es la pose final (el dron
   volcado sobre el plano, una hélice tirada al lado); `data-choque="anima"` le suma la
   caída, una sola vez por trabajo (vuelo.js, `modoDelChoque`). Así un repintado, volver
   al loteo o el movimiento reducido muestran directo cómo quedó. */
.vuelo__suelta, .vuelo__suelta-sombra, .vuelo__humo circle { opacity: 0; }
.vuelo__suelta, .vuelo__humo circle { transform-box: fill-box; transform-origin: center; }
.vuelo__suelta-aspa { stroke: var(--zinc-500); stroke-width: 2.6; stroke-linecap: round; fill: none; }
.vuelo__suelta-eje { fill: var(--zinc-600); }
.vuelo__suelta-sombra { fill: rgb(9 9 11 / 0.12); }
.vuelo__humo circle { fill: var(--zinc-400); }
.vuelo[data-estado="choque"] .vuelo__haz { opacity: 0; }
.vuelo[data-estado="choque"] .vuelo__dron { transform: translateY(62px); }
.vuelo[data-estado="choque"] .vuelo__cuerpo { transform: rotate(165deg); }
.vuelo[data-estado="choque"] .vuelo__helice { transform: scaleX(0.8); }
.vuelo[data-estado="choque"] .vuelo__helice--suelta { opacity: 0; }
.vuelo[data-estado="choque"] .vuelo__sombra { transform: scale(1.25, 1.1); fill: rgb(9 9 11 / 0.22); }
.vuelo[data-estado="choque"] .vuelo__suelta,
.vuelo[data-estado="choque"] .vuelo__suelta-sombra { opacity: 1; }
.vuelo[data-estado="choque"] .vuelo__fuselaje { fill: var(--zinc-500); }
.vuelo[data-estado="choque"] .vuelo__suelo { fill: var(--zinc-100); }

/* 0–23 %: las hélices se frenan y el dron se tambalea; 23–63 %: cae; 63 %: pega con
   un brazo y la hélice salta; 63–90 %: rebota y se da vuelta; después, quieto. */
.vuelo[data-choque="anima"] .vuelo__ruta { animation: choque-ruta 0.6s cubic-bezier(0.4, 0, 1, 1) 0.35s backwards; }
.vuelo[data-choque="anima"] .vuelo__dron { animation: choque-dron 1.5s linear; }
.vuelo[data-choque="anima"] .vuelo__cuerpo { animation: choque-cuerpo 1.5s linear; }
.vuelo[data-choque="anima"] .vuelo__sombra { animation: choque-sombra 1.5s linear; }
.vuelo[data-choque="anima"] .vuelo__helice { animation: choque-helice 0.95s ease-out; }
.vuelo[data-choque="anima"] .vuelo__helice--suelta { animation: choque-helice 0.95s ease-out, choque-se-suelta 1.5s linear; }
.vuelo[data-choque="anima"] .vuelo__suelta { animation: choque-suelta 1.5s linear; }
.vuelo[data-choque="anima"] .vuelo__suelta-sombra { animation: choque-suelta-sombra 1.5s linear; }
/* El humo sale al quedar volcado, sube dos veces y se apaga. */
.vuelo[data-choque="anima"] .vuelo__humo circle { animation: choque-humo 1.7s ease-out 1.15s 2 backwards; }
.vuelo[data-choque="anima"] .vuelo__humo circle:nth-child(2) { animation-delay: 1.45s; }
.vuelo[data-choque="anima"] .vuelo__humo circle:nth-child(3) { animation-delay: 1.75s; }

@keyframes choque-ruta { from { transform: translateX(var(--choque-x, 0px)); } to { transform: none; } }
@keyframes choque-dron {
  0% { transform: translateY(0); }
  10% { transform: translateY(-3px); }
  23% { transform: translateY(2px); animation-timing-function: cubic-bezier(0.5, 0, 1, 1); }
  63% { transform: translateY(50px); animation-timing-function: cubic-bezier(0, 0, 0.4, 1); }
  77% { transform: translateY(26px); animation-timing-function: cubic-bezier(0.6, 0, 1, 1); }
  90% { transform: translateY(62px); animation-timing-function: ease-out; }
  95% { transform: translateY(59px); animation-timing-function: ease-in; }
  100% { transform: translateY(62px); }
}
@keyframes choque-cuerpo {
  0% { transform: rotate(0); }
  8% { transform: rotate(-9deg); }
  16% { transform: rotate(8deg); }
  23% { transform: rotate(-5deg); animation-timing-function: ease-in; }
  63% { transform: rotate(32deg); animation-timing-function: ease-out; }
  77% { transform: rotate(110deg); }
  90% { transform: rotate(172deg); animation-timing-function: ease-out; }
  100% { transform: rotate(165deg); }
}
@keyframes choque-sombra {
  0%, 23% { transform: scale(0.9); fill: rgb(9 9 11 / 0.14); }
  63% { transform: scale(1.2, 1.05); fill: rgb(9 9 11 / 0.22); }
  77% { transform: scale(1.05); fill: rgb(9 9 11 / 0.17); }
  90%, 100% { transform: scale(1.25, 1.1); fill: rgb(9 9 11 / 0.22); }
}
/* Las aspas se ven cada vez más lentas: los cambios de ancho se van espaciando. */
@keyframes choque-helice {
  0% { transform: scaleX(1); } 6% { transform: scaleX(0.2); } 13% { transform: scaleX(1); }
  22% { transform: scaleX(0.25); } 33% { transform: scaleX(1); } 47% { transform: scaleX(0.35); }
  65% { transform: scaleX(1); } 100% { transform: scaleX(0.8); }
}
@keyframes choque-se-suelta { 0%, 62% { opacity: 1; } 63%, 100% { opacity: 0; } }
@keyframes choque-suelta {
  0%, 62% { opacity: 0; transform: translate(-34px, -22px) rotate(0); }
  63% { opacity: 1; transform: translate(-34px, -22px) rotate(0); animation-timing-function: ease-out; }
  74% { transform: translate(-16px, -40px) rotate(260deg); animation-timing-function: ease-in; }
  86% { transform: translate(0, 0) rotate(560deg); animation-timing-function: ease-out; }
  92% { transform: translate(3px, -5px) rotate(660deg); animation-timing-function: ease-in; }
  100% { opacity: 1; transform: translate(0, 0) rotate(720deg); }
}
@keyframes choque-suelta-sombra { 0%, 70% { opacity: 0; } 86%, 100% { opacity: 1; } }
@keyframes choque-humo {
  0% { opacity: 0; transform: translate(0, 0) scale(0.4); }
  25% { opacity: 0.6; }
  100% { opacity: 0; transform: translate(-5px, -32px) scale(1.8); }
}

@keyframes vuelo-patrulla { from { transform: translateX(-74px); } to { transform: translateX(74px); } }
@keyframes vuelo-flotar { from { transform: translateY(0); } to { transform: translateY(-5px); } }
@keyframes vuelo-sombra { from { transform: scale(1); opacity: 1; } to { transform: scale(0.82); opacity: 0.7; } }
@keyframes vuelo-helice { from { transform: scaleX(1); } to { transform: scaleX(0.2); } }
@keyframes vuelo-haz { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }

.vuelo__texto { min-width: 0; }
.vuelo__titulo { margin: 0; font: 700 1.0625rem/1.3 var(--sans); color: var(--zinc-900); }
.vuelo__paso { margin: 0.25rem 0 0.75rem; font-size: 0.8125rem; color: var(--zinc-500); overflow-wrap: anywhere; }
.vuelo[data-estado="fallo"] .vuelo__titulo,
.vuelo[data-estado="choque"] .vuelo__titulo { color: var(--rojo-700); }
.vuelo__aviso { margin: -0.375rem 0 0.75rem; font-size: 0.8125rem; color: var(--zinc-700); overflow-wrap: anywhere; }
/* Terminada bien pero sin algunas fotos: en ámbar, para que no se lea como parte del resumen. */
.vuelo[data-estado="listo"] .vuelo__aviso { color: var(--ambar-800); }
.vuelo__progreso { height: 0.375rem; background: var(--zinc-100); border-radius: 999px; overflow: hidden; }
.vuelo__progreso i {
  display: block; height: 100%; background: var(--lote-disponible); border-radius: inherit;
  transform-origin: left; transform: scaleX(0); transition: transform 700ms var(--vuelo-curva);
}
.vuelo[data-estado="fallo"] .vuelo__progreso i,
.vuelo[data-estado="choque"] .vuelo__progreso i { background: var(--rojo-700); }
.vuelo__detalle { margin-top: 0.75rem; }
.vuelo__detalle summary { cursor: pointer; font-size: 0.8125rem; color: var(--zinc-600); width: fit-content; }
.vuelo__detalle summary:hover { color: var(--zinc-900); }
.vuelo__detalle .consola-log { margin-top: 0.5rem; }
/* El registro y Cancelar en una fila; si no caben (celular, el escáner angosto), Cancelar
   baja. Con el registro abierto, Cancelar sigue al lado del resumen. */
.vuelo__pie { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.25rem 0.75rem; margin-top: 0.5rem; }
.vuelo__pie .vuelo__detalle { flex: 1 1 12rem; min-width: 0; margin-top: 0; padding-top: 0.4rem; }
.vuelo__cancelar { flex: none; height: 2rem; padding: 0 0.625rem; font-size: 0.8125rem; }
.vuelo__cancelar[disabled] { background: transparent; color: var(--zinc-400); }

@media (max-width: 40rem) {
  .vuelo { grid-template-columns: 1fr; }
  .vuelo__escena { max-width: 20rem; margin: 0 auto; }
  /* Con el dedo: el botón alto, y el resumen centrado con su texto. */
  .vuelo__cancelar { height: 2.75rem; }
  .vuelo__pie .vuelo__detalle { padding-top: 0.75rem; }
}
@media (prefers-reduced-motion: reduce) {
  .vuelo__ruta, .vuelo__dron, .vuelo__cuerpo, .vuelo__sombra, .vuelo__helice, .vuelo__haz,
  .vuelo__suelta, .vuelo__suelta-sombra, .vuelo__humo circle { animation: none !important; }
  .vuelo__lote, .vuelo__progreso i { transition: none; }
}

/* --- El escáner: digitalizar el plano en Crea tu KMZ --------------------------- */

/* La misma tarjeta que el vuelo, apilada: el panel del KMZ es angosto. `data-paso`
   (1 a 5) dice qué ya se armó sobre la hoja; cada capa se suma a las anteriores. */
.escaner { grid-template-columns: minmax(0, 1fr); padding: 0.875rem 1rem; }
.escaner__escena { max-width: 22rem; margin: 0 auto; color: var(--lote-disponible); }
.escaner__hoja { transform-box: fill-box; transform-origin: center; }
.escaner:not([hidden]) .escaner__hoja { animation: escaner-hoja 600ms var(--vuelo-curva); }
.escaner__papel { fill: #fff; stroke: var(--zinc-300); stroke-width: 1; filter: drop-shadow(0 1px 2px rgb(9 9 11 / 0.08)); }
.escaner__cajetin { fill: none; stroke: var(--zinc-300); stroke-width: 0.8; }
/* El loteo impreso, tal como viene en el PDF. */
.escaner__tinta { fill: none; stroke: var(--zinc-400); stroke-width: 0.8; stroke-dasharray: 3 1.5; transition: opacity 600ms; }
/* Lo que lee el lector: los números, en el azul de "leído del plano" del paso 4. */
.escaner__numero {
  font: 700 9px/1 var(--sans); text-anchor: middle; fill: #1d4ed8;
  opacity: 0; transform: translateY(3px); transform-box: fill-box;
  transition: opacity 400ms, transform 400ms var(--vuelo-curva);
}
.escaner__numero[data-leido="1"] { opacity: 1; transform: none; }
/* Los deslindes se dibujan (pathLength = 1) y los lotes se rellenan, de a uno. */
.escaner__deslinde {
  fill: none; stroke: var(--zinc-900); stroke-width: 1.2; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  transition: stroke-dashoffset 900ms var(--vuelo-curva) calc(var(--i) * 80ms), stroke-width 500ms;
}
.escaner__lote { fill: transparent; transition: fill 500ms calc(var(--i) * 140ms); }
.escaner:is([data-paso="3"], [data-paso="4"], [data-paso="5"]) .escaner__deslinde { stroke-dashoffset: 0; }
.escaner:is([data-paso="4"], [data-paso="5"]) .escaner__lote { fill: rgb(22 163 74 / 0.16); }
.escaner:is([data-paso="4"], [data-paso="5"]) .escaner__lote:nth-child(3n + 2) { fill: rgb(37 99 235 / 0.14); }
.escaner:is([data-paso="4"], [data-paso="5"]) .escaner__lote:nth-child(3n) { fill: rgb(245 158 11 / 0.16); }
/* Enderezando: las líneas quedan nítidas y lo impreso se va al fondo. */
.escaner[data-paso="5"] .escaner__deslinde { stroke-width: 1.6; stroke-linejoin: miter; }
.escaner[data-paso="5"] .escaner__tinta { opacity: 0.25; }

/* La línea de luz barre la hoja mientras se trabaja; más rápido al leer los números. */
.escaner__barrido { opacity: 0; transition: opacity 400ms; }
.escaner__estela { fill: url(#escaner-estela); }
.escaner__linea { fill: currentColor; }
.escaner[data-estado="escaneando"] .escaner__barrido {
  opacity: 1; animation: escaner-barrer 4.2s var(--vuelo-curva) infinite alternate;
}
.escaner[data-estado="escaneando"][data-paso="2"] .escaner__barrido { animation-duration: 2.4s; }
/* Si falla, el escáner se queda donde iba, en rojo, y la hoja se apaga. */
.escaner[data-estado="fallo"] .escaner__barrido { opacity: 1; color: var(--rojo-700); transform: translateY(84px); }
.escaner[data-estado="fallo"] .escaner__papel { fill: var(--zinc-50); }
.escaner[data-estado="fallo"] .escaner__lote { fill: transparent; }
.escaner[data-estado="cancelado"] .escaner__papel { fill: var(--zinc-50); }

/* Solo se mueve, sin partir transparente: si la animación no corre (pestaña oculta,
   sin movimiento), la hoja igual se ve. */
@keyframes escaner-hoja { from { transform: translateY(6px) scale(0.97); } to { transform: none; } }
@keyframes escaner-barrer { from { transform: translateY(8px); } to { transform: translateY(160px); } }

@media (prefers-reduced-motion: reduce) {
  /* Sin movimiento: la hoja con lo que ya se armó, la barra y el texto. */
  .escaner__barrido { display: none; }
  .escaner:not([hidden]) .escaner__hoja { animation: none; }
  .escaner__numero, .escaner__deslinde, .escaner__lote, .escaner__tinta { transition: none; }
}

/* --- Registro del trabajo ----------------------------------------------------- */

.consola-log {
  margin: 0; padding: 0.875rem 1rem; max-height: 16rem; overflow-y: auto;
  background: var(--zinc-950); color: #e4e4e7;
  border-radius: var(--radio-md);
  font: 400 0.75rem/1.6 var(--mono); white-space: pre-wrap; word-break: break-word;
}
.consola-log b { color: #fff; font-weight: 600; }
.consola-log .aviso-linea { color: #fbbf24; }
.consola-log .error-linea { color: #f87171; }

/* --- Inventario ---------------------------------------------------------------- */

/* La publicación, sobre tinta: en qué está, el enlace y los botones. */
.publicar { display: grid; gap: 0.875rem; padding: 1.4rem; border-radius: 1.375rem; background: var(--zinc-900); color: var(--zinc-50); }
.publicar__estado { display: inline-flex; align-items: center; gap: 0.5rem; font: 700 0.75rem/1 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--zinc-400); }
.publicar__estado--vivo::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--estado-disponible); animation: latido 2s ease-out infinite; }
.publicar__url { font-size: 0.9375rem; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.publicar__url:hover { text-decoration: underline; }
/* Con "Ver sitio" y la vista previa no caben en una tarjeta de celular: la fila se
   parte y la vista previa baja a ocupar el ancho, en vez de cortar los textos. */
.publicar__botones { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.publicar__botones .boton { white-space: nowrap; }
.publicar__botones .boton--claro, .publicar__botones .publicar__previa { flex: 1; justify-content: center; }
.publicar > .boton { justify-content: center; }
.publicar .nota { margin: 0; font-size: 0.75rem; line-height: 1.5; color: var(--zinc-400); }
.publicar .boton--texto { justify-self: start; color: var(--zinc-300); }
.publicar .boton--texto:hover { background: rgb(255 255 255 / 0.08); color: #fff; }
/* Alineado con el texto del panel: el relleno del botón lo corría hacia adentro. */
.publicar [data-accion="despublicar"] { margin-left: -1rem; }
/* Solo el equipo: "2 de 3 masters · Cambiar", con el enlace a la ficha de la loteadora. */
.publicar .publicar__cupo a { color: var(--zinc-50); font-weight: 600; }

.plano-detalle__lado { position: sticky; top: 6rem; display: grid; gap: 1rem; }
.inventario { display: grid; gap: 0.75rem; padding: 1.4rem; border: 1px solid var(--zinc-200); border-radius: 1.375rem; background: #fff; }
.inventario__cabeza { display: flex; align-items: center; gap: 0.75rem; }
.inventario__cabeza svg { width: 2.25rem; height: 2.25rem; padding: 0.55rem; border-radius: 0.625rem; background: var(--zinc-100); }
.inventario h2 { margin: 0; font: 700 1rem/1.2 var(--sans); }
.inventario .nota { margin: 0; font-size: 0.8125rem; line-height: 1.5; }
.inventario__acciones { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.inventario__acciones .boton { flex: 1 1 auto; justify-content: center; border-radius: 0.75rem; }
.inventario__cierra { display: grid; gap: 0.5rem; padding-top: 0.75rem; border-top: 1px dashed var(--zinc-200); }
.inventario__cierra .nota { margin: 0; }
.inventario__geo { display: grid; gap: 0.5rem; padding-top: 0.75rem; border-top: 1px dashed var(--zinc-200); }
.inventario__geo .nota { margin: 0; }
.segmentado { display: inline-flex; gap: 0.25rem; margin-bottom: 0.5rem; padding: 0.2rem;
  background: var(--zinc-100); border-radius: var(--radio-md); }
.segmentado button { padding: 0.375rem 0.875rem; border: 0; border-radius: var(--radio-sm);
  background: transparent; color: var(--zinc-600); font: 500 0.8125rem var(--sans); cursor: pointer;
  transition: background 150ms, color 150ms, box-shadow 150ms; }
.segmentado button:hover { color: var(--zinc-900); }
.segmentado button[aria-checked="true"], .segmentado button[aria-selected="true"] { background: #fff; color: var(--zinc-900); box-shadow: var(--sombra); }
.segmentado button:focus-visible { outline: 2px solid var(--marca-700); outline-offset: 1px; }
/* En un diálogo (Subir KMZ) las pestañas ocupan el ancho, partes iguales: en celular
   cada una queda del porte de un dedo y el texto, si no cabe, baja en vez de cortarse. */
.segmentado--ancho { display: flex; width: 100%; margin-bottom: 1rem; }
.segmentado--ancho button { flex: 1 1 0; min-height: 2.5rem; padding: 0.375rem 0.5rem; font-weight: 600; }
.nuevo-cierra-vacio { display: grid; justify-items: start; gap: 0.375rem; }
.nuevo-cierra-vacio .nota { margin: 0; }
.nuevo-cierra { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; cursor: default; }
.nuevo-cierra .archivo__texto { text-align: left; }
.nuevo-cierra__acciones { display: flex; gap: 0.75rem; flex-shrink: 0; }
.nuevo-cierra__acciones .enlace { background: none; border: 0; padding: 0; font: inherit; font-size: 0.8125rem; }
/* --- Configuración ---------------------------------------------------------------- */

#pantalla-configuracion { gap: 1.75rem; }
#pantalla-configuracion h1 { font: 800 2.75rem/1.02 var(--sans); letter-spacing: -0.035em; }
#pantalla-configuracion .guia { font-size: 0.9375rem; }

/* Un índice que acompaña a la izquierda y las secciones en tarjetas a la derecha. */
.config { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 2rem; align-items: start; }
.config__indice { position: sticky; top: 6.5rem; display: grid; gap: 0.25rem; }
.config__indice button {
  position: relative; display: flex; align-items: center; gap: 0.65rem; height: 2.75rem; padding: 0 0.9rem;
  border: 0; border-radius: 0.875rem; background: transparent; color: var(--zinc-600);
  font-weight: 600; text-align: left; transition: background 200ms, color 200ms;
}
.config__indice button:hover { background: var(--zinc-100); color: var(--zinc-900); }
.config__indice button[aria-current] { background: var(--zinc-900); color: #fff; box-shadow: 0 10px 22px -12px rgb(9 9 11 / 0.6); }
.config__indice svg, .seguridad svg {
  width: 1.125rem; height: 1.125rem; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.config__secciones { display: grid; gap: 1.25rem; }
.config__seccion {
  display: grid; gap: 1.25rem; padding: 1.75rem; scroll-margin-top: 6.5rem;
  background: #fff; border: 1px solid var(--zinc-200); border-radius: 1.375rem;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.03);
  animation: asomar 700ms var(--curva-salida) both;
}
.config__seccion:nth-child(2) { animation-delay: 90ms; }
.config__seccion:nth-child(3) { animation-delay: 180ms; }
.config__seccion h2 { display: flex; align-items: center; gap: 0.5rem; margin: 0; font: 700 1.25rem/1.2 var(--sans); letter-spacing: -0.015em; }
.config__seccion .nota { margin: 0.3rem 0 0; font-size: 0.8125rem; }
.config__cuenta {
  display: inline-grid; place-items: center; min-width: 1.6rem; height: 1.6rem; padding: 0 0.45rem;
  border-radius: 999px; background: var(--zinc-100); font-size: 0.8125rem; font-weight: 700; color: var(--zinc-600);
}

/* Fichas chicas: rol, "Tú", Google, pendiente. */
.chip {
  display: inline-flex; align-items: center; gap: 0.35rem; height: 1.6rem; padding: 0 0.6rem;
  border-radius: 999px; background: var(--zinc-100); color: var(--zinc-700);
  font-size: 0.75rem; font-weight: 600; white-space: nowrap;
}
.chip svg { width: 0.85rem; height: 0.85rem; }
.chip--tinta { background: var(--zinc-900); color: #fff; }
.chip--aviso { background: var(--ambar-50); color: var(--ambar-800); box-shadow: inset 0 0 0 1px var(--ambar-200); }
.chip--ok { background: var(--verde-50); color: var(--verde-800); box-shadow: inset 0 0 0 1px var(--verde-100); }
.chip--apagada { background: transparent; color: var(--zinc-500); box-shadow: inset 0 0 0 1px var(--zinc-300); }
.chip--google { background: #fff; box-shadow: inset 0 0 0 1px var(--zinc-200); }

/* Tu cuenta: el avatar grande con un anillo de color que gira despacio, como el de la barra. */
.perfil { display: flex; align-items: center; gap: 1.25rem; }
.perfil__anillo { position: relative; display: grid; place-items: center; flex: none; width: 5rem; height: 5rem; }
.perfil__anillo::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(#15803d, #f59e0b, #3b82f6, #15803d);
  animation: girar-anillo 8s linear infinite;
}
.perfil__avatar {
  position: relative; display: grid; place-items: center; width: 4.5rem; height: 4.5rem;
  border: 3px solid #fff; border-radius: 50%; color: #fff; font: 800 1.5rem/1 var(--sans); letter-spacing: -0.02em;
  background: hsl(var(--tono, 220) 32% 30%);
}
.perfil__quien { display: grid; gap: 0.15rem; min-width: 0; }
.perfil__quien h2 { font-size: 1.5rem; }
.perfil__email { margin: 0; color: var(--zinc-500); overflow-wrap: anywhere; }
.perfil__chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.45rem 0 0; }
.perfil__form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; padding-top: 1.25rem; border-top: 1px solid var(--zinc-100); }
.perfil__form input:disabled { color: var(--zinc-500); cursor: not-allowed; }
.perfil__nota { grid-column: 1 / -1; margin: -0.4rem 0 0 !important; }
.perfil__pie { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
.perfil__pie .boton { height: 2.75rem; padding: 0 1.4rem; border-radius: 0.875rem; font-weight: 600; transition: transform 250ms var(--curva-salida), background 200ms; }
.perfil__pie .boton:not([disabled]):hover { transform: translateY(-1px); }

.seguridad { display: grid; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--zinc-100); }
.seguridad li { display: flex; align-items: center; gap: 0.9rem; padding: 1rem 0; border-bottom: 1px solid var(--zinc-100); }
.seguridad li:last-child { border-bottom: 0; padding-bottom: 0; }
.seguridad svg { width: 2.5rem; height: 2.5rem; padding: 0.65rem; border-radius: 0.75rem; background: var(--zinc-100); }
.seguridad div { display: grid; gap: 0.15rem; flex: 1; min-width: 0; }
.seguridad small { color: var(--zinc-500); font-size: 0.8125rem; }
.seguridad .boton { flex: none; height: 2.5rem; border-radius: 0.75rem; }

/* Equipo: cada persona en una fila, con su avatar de color propio. */
.miembros { display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.miembro {
  display: flex; align-items: center; gap: 0.9rem; padding: 0.75rem 0.9rem;
  border: 1px solid var(--zinc-200); border-radius: 1rem; background: #fff;
  transition: border-color 200ms, transform 300ms var(--curva-salida), box-shadow 300ms var(--curva-salida);
}
.miembro:hover { border-color: var(--zinc-300); transform: translateY(-1px); box-shadow: 0 10px 22px -16px rgb(9 9 11 / 0.35); }
.miembro__avatar {
  display: grid; place-items: center; flex: none; width: 2.5rem; height: 2.5rem; border-radius: 50%;
  background: hsl(var(--tono, 220) 45% 92%); color: hsl(var(--tono, 220) 45% 28%); font-weight: 800; font-size: 0.875rem;
}
.miembro__quien { display: grid; gap: 0.1rem; flex: 1; min-width: 0; }
.miembro__quien strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.miembro__quien small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--zinc-500); font-size: 0.8125rem; }
.miembro__fichas { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.35rem; }
.miembro .boton { flex: none; height: 2.25rem; border-radius: 0.75rem; }
.miembro--apagado { background: var(--zinc-50); }
.miembro--apagado .miembro__avatar { filter: grayscale(1); opacity: 0.6; }
.miembro--apagado .miembro__quien { opacity: 0.6; }
.miembros--entrando .miembro { animation: asomar 600ms var(--curva-salida) both; animation-delay: calc(250ms + var(--orden) * 70ms); }

.invitar { display: grid; gap: 0.75rem; padding: 1.25rem; border-radius: 1.125rem; background: var(--zinc-50); border: 1px dashed var(--zinc-300); }
.invitar__titulo { font-size: 0.9375rem; }
.invitar__campos { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto; gap: 0.75rem; align-items: end; }
.invitar .campo input { height: 2.75rem; padding: 0 0.875rem; border-radius: 0.75rem; background: #fff; font-size: 0.9375rem; }
.invitar .campo input:focus { border-color: var(--zinc-900); box-shadow: 0 0 0 4px rgb(24 24 27 / 0.08); }
.invitar .boton-nuevo { height: 2.75rem; }
.invitar .nota { margin: 0 !important; }
.equipo__direccion strong { font-family: var(--mono); color: var(--zinc-700); overflow-wrap: anywhere; }

.clave-provisional {
  display: grid; gap: 0.75rem; padding: 1.1rem 1.25rem; border-radius: 1rem;
  background: var(--verde-50); border: 1px solid var(--verde-100); color: var(--verde-800);
  animation: asomar 500ms var(--curva-salida) both;
}
.clave-provisional p { margin: 0; }
.clave-provisional__fila { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.clave-provisional code {
  padding: 0.55rem 0.8rem; border-radius: 0.625rem; background: #fff; color: var(--zinc-900);
  font: 600 1rem/1 var(--mono); letter-spacing: 0.04em; user-select: all;
}

/* Conexiones con Claude: una tarjeta como las de Integraciones, con una fila por
   conexión (como un miembro del equipo) y los pasos para conectar numerados. */
.conexiones { gap: 1rem; }
.conexiones__cabecera { display: flex; align-items: flex-start; gap: 0.9rem; }
.conexiones__cabecera svg {
  flex: none; width: 2.5rem; height: 2.5rem; padding: 0.65rem; border-radius: 0.75rem;
  background: var(--zinc-100); fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round;
}
.conexiones__lista { display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.conexion {
  display: flex; align-items: center; gap: 0.9rem; padding: 0.75rem 0.9rem;
  border: 1px solid var(--zinc-200); border-radius: 1rem; background: #fff;
}
.conexion__quien { display: grid; gap: 0.1rem; flex: 1; min-width: 0; }
/* El nombre lo elige la app al registrarse: uno largo y sin espacios no saca la fila del ancho. */
.conexion__quien strong { overflow-wrap: anywhere; }
.conexion__fechas { display: flex; flex-wrap: wrap; column-gap: 0.4rem; color: var(--zinc-500); font-size: 0.8125rem; }
.conexion__fechas span { white-space: nowrap; }
.conexion__fechas span + span::before { content: "·"; margin-right: 0.4rem; }
.conexion .boton { flex: none; height: 2.25rem; border-radius: 0.75rem; }
.conexiones__otra summary { font-size: 0.8125rem; font-weight: 600; color: var(--zinc-600); cursor: pointer; }
.conexiones__otra[open] summary { margin-bottom: 0.75rem; }
.conexiones__pasos { display: grid; gap: 0.6rem; margin: 0; padding-left: 1.25rem; font-size: 0.875rem; color: var(--zinc-700); }
.conexiones__pasos li::marker { font-weight: 700; color: var(--zinc-500); }
.conexiones__direccion { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.4rem; }
.conexiones__direccion code {
  min-width: 0; padding: 0.5rem 0.75rem; border-radius: 0.625rem; background: var(--zinc-100);
  color: var(--zinc-900); font: 600 0.8125rem/1.2 var(--mono); overflow-wrap: anywhere; user-select: all;
}
.conexiones__direccion .boton { height: 2.25rem; border-radius: 0.75rem; }

/* Reservas y contacto. */
.preferencias { display: grid; gap: 1rem; }
.preferencias__campos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 0; padding: 0; border: 0; min-width: 0; }
.preferencias__campos:disabled { opacity: 0.7; }
.preferencias__ancho { grid-column: 1 / -1; }
.preferencias__ancho.nota, .preferencias .nota { margin: 0 !important; }
.preferencias__rotulo { display: block; margin: 0.5rem 0 0.5rem; font: 700 0.6875rem/1 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--zinc-600); }
/* Las horas como un riel de tarjetas: la elegida en tinta, como la píldora de la barra. */
.horas { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.5rem; margin-bottom: 0.6rem; }
.hora {
  position: relative; display: grid; justify-items: center; gap: 0.1rem; padding: 0.7rem 0.25rem;
  border: 1px solid var(--zinc-200); border-radius: 0.875rem; background: var(--zinc-50); cursor: pointer;
  transition: transform 250ms var(--curva-salida), background 200ms, border-color 200ms, color 200ms, box-shadow 250ms;
}
.hora input { position: absolute; opacity: 0; pointer-events: none; }
.hora strong { font: 800 1.375rem/1 var(--sans); letter-spacing: -0.03em; }
.hora small { font-size: 0.6875rem; font-weight: 600; color: var(--zinc-500); }
.hora:hover { border-color: var(--zinc-400); transform: translateY(-2px); }
.hora:has(input:checked) { background: var(--zinc-900); border-color: var(--zinc-900); color: #fff; box-shadow: 0 12px 24px -14px rgb(9 9 11 / 0.6); }
.hora:has(input:checked) small { color: rgb(255 255 255 / 0.7); }
.hora:has(input:focus-visible) { outline: 2px solid var(--zinc-900); outline-offset: 2px; }
.preferencias__campos:disabled .hora { cursor: not-allowed; transform: none; }

/* Actividad: una línea de tiempo por día; el punto de cada evento lleva el color
   de lo que tocó (masters, publicado, reservas, marca, equipo, cuenta). */
.actividad { display: grid; gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
.actividad__dia h3 { margin: 0 0 0.6rem; font: 700 0.75rem/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--zinc-500); }
.actividad__eventos { position: relative; display: grid; margin: 0; padding: 0; list-style: none; }
.actividad__eventos::before { content: ""; position: absolute; top: 0.9rem; bottom: 0.9rem; left: 0.4375rem; width: 2px; border-radius: 1px; background: var(--zinc-100); }
.evento {
  position: relative; display: grid; grid-template-columns: 0.875rem minmax(0, 1fr) auto; align-items: center; gap: 0.9rem;
  padding: 0.55rem 0.6rem 0.55rem 0; border-radius: 0.75rem;
  animation: asomar 500ms var(--curva-salida) both; animation-delay: calc(var(--orden) * 45ms);
}
.evento:hover { background: var(--zinc-50); }
.evento p { margin: 0; overflow-wrap: anywhere; }
.evento time { font-size: 0.75rem; font-variant-numeric: tabular-nums; color: var(--zinc-400); }
.evento__punto {
  position: relative; width: 0.875rem; height: 0.875rem; border-radius: 50%;
  background: var(--color-evento, var(--zinc-400)); box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--zinc-200);
}
.evento--master { --color-evento: var(--zinc-900); }
.evento--publicado { --color-evento: var(--estado-disponible); }
.evento--reserva { --color-evento: var(--estado-reservado); }
.evento--marca { --color-evento: var(--violeta); }
.evento--equipo { --color-evento: var(--estado-vendido); }
.evento--cuenta { --color-evento: var(--zinc-400); }
.evento__frase { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; }
.chip--via { height: 1.35rem; padding: 0 0.5rem; font-size: 0.6875rem; background: var(--zinc-50); color: var(--zinc-600); box-shadow: inset 0 0 0 1px var(--zinc-200); }
.ficha__historial .chip--via { margin-left: 0.35rem; vertical-align: middle; }
.actividad__mas { justify-self: center; border-radius: 999px; padding: 0 1.4rem; }

/* Integraciones: Cierra dentro de su sección, sin tarjeta propia. */
.config__seccion .integracion { padding: 1.25rem; border-radius: 1.125rem; box-shadow: none; }
.integracion { display: grid; gap: 0.875rem; padding: 1.25rem; background: #fff;
  border: 1px solid var(--zinc-200); border-radius: var(--radio-lg); box-shadow: var(--sombra); }
.integracion__cabecera { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.integracion__cabecera .pastilla { white-space: nowrap; flex-shrink: 0; }
.integracion h3 { margin: 0 0 0.25rem; font: 700 1.0625rem/1.2 var(--sans); }
.integracion .nota { margin: 0; }
.integracion__formulario { display: grid; gap: 0.5rem; }
.integracion__formulario .campo input { height: 2.5rem; }
.integracion__acciones { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.integracion__acciones .boton { border-radius: 0.75rem; }
/* La opción va con su nota pegada: el rótulo arriba, el selector y la nota abajo. En
   celular el selector ocupa el ancho y cada opción queda del porte de un dedo. */
.integracion__en-proceso { display: grid; gap: 0.375rem; justify-items: start; }
.integracion__rotulo { font: 600 0.875rem/1.3 var(--sans); color: var(--zinc-900); }
.integracion__segmentado { margin-bottom: 0; }
.integracion__segmentado button[disabled] { cursor: progress; opacity: 0.6; }
@media (max-width: 40rem) {
  .integracion__en-proceso { justify-items: stretch; }
  .integracion__segmentado { display: flex; }
  .integracion__segmentado button { flex: 1 1 0; min-height: 2.75rem; }
}

/* Acceso de Tu Masterplan: un interruptor y no una casilla, porque es un estado que
   queda puesto (como un permiso), no una opción de un formulario que se guarda. */
.acceso { margin-top: 1rem; gap: 0.625rem; }
.acceso[hidden], .acceso .nota[hidden] { display: none; }
.acceso h3 { margin: 0; }
.interruptor { position: relative; display: flex; align-items: flex-start; gap: 0.75rem; cursor: pointer;
  font-size: 0.875rem; line-height: 1.45; color: var(--zinc-900); }
/* El checkbox real queda encima de la pista, invisible: así el foco, el teclado y
   los lectores de pantalla siguen siendo los de un input. Solo cuando hay pista: los
   interruptores de los ajustes del loteo dibujan el input mismo (más abajo) y, sin
   este :has, quedaban transparentes y no se veía si estaban prendidos. */
.interruptor input:has(+ .interruptor__pista) { position: absolute; opacity: 0; width: 2.5rem; height: 1.5rem; margin: 0; cursor: inherit; }
.interruptor__pista { position: relative; flex-shrink: 0; width: 2.5rem; height: 1.5rem; border-radius: 999px;
  background: var(--zinc-300); transition: background 0.18s ease; }
.interruptor__pista::after { content: ""; position: absolute; top: 0.1875rem; left: 0.1875rem;
  width: 1.125rem; height: 1.125rem; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgb(9 9 11 / 0.3); transition: transform 0.18s ease; }
.interruptor input:checked + .interruptor__pista { background: var(--verde-700); }
.interruptor input:checked + .interruptor__pista::after { transform: translateX(1rem); }
.interruptor input:focus-visible + .interruptor__pista { outline: 2px solid var(--marca-700); outline-offset: 2px; }
.interruptor:has(input:disabled) { cursor: not-allowed; }
.interruptor input:disabled + .interruptor__pista { opacity: 0.55; }
@media (prefers-reduced-motion: reduce) {
  .interruptor__pista, .interruptor__pista::after { transition: none; }
}

@media (max-width: 56rem) {
  .config { grid-template-columns: 1fr; gap: 1rem; }
  /* El índice pasa a ser una fila de píldoras que se desliza de lado, pegada arriba. */
  .config__indice {
    top: 5rem; z-index: 5; display: flex; gap: 0.35rem; overflow-x: auto; scrollbar-width: none;
    margin: 0 -1.5rem; padding: 0.5rem 1.5rem; background: rgb(250 250 250 / 0.9); backdrop-filter: blur(12px);
  }
  .config__indice button { flex: none; height: 2.5rem; border-radius: 999px; }
}
@media (max-width: 40rem) {
  #pantalla-configuracion h1 { font-size: 2.25rem; }
  /* El lienzo tiene 1rem de margen en el celular: la fila del índice llega al borde. */
  .config__indice { top: 4rem; margin: 0 -1rem; padding: 0.5rem 1rem; }
  .config__seccion { padding: 1.25rem; border-radius: 1.25rem; }
  .perfil__anillo { width: 4.25rem; height: 4.25rem; }
  .perfil__avatar { width: 3.75rem; height: 3.75rem; font-size: 1.25rem; }
  .perfil__quien h2 { font-size: 1.25rem; }
  .perfil__form, .invitar__campos, .preferencias__campos { grid-template-columns: 1fr; }
  .horas { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .perfil__pie .boton, .invitar .boton-nuevo { width: 100%; }
  .seguridad li { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: 0.5rem 0.9rem; }
  .seguridad .boton { grid-column: 2; justify-self: start; }
  .miembro { flex-wrap: wrap; }
  .miembro__fichas { order: 3; width: 100%; justify-content: flex-start; padding-left: 3.4rem; }
  .miembro .boton { order: 2; }
  /* En el celular la fila se apila: nombre, fechas y el botón a lo ancho. */
  .conexion { display: grid; gap: 0.6rem; }
  .conexion__fechas { display: grid; }
  .conexion__fechas span + span::before { content: none; }
  .conexion .boton { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .config__seccion, .miembros--entrando .miembro, .clave-provisional, .perfil__anillo::before, .evento { animation: none; }
}
.cierra-buscar {
  width: 100%; height: 2.375rem; margin-bottom: 0.5rem; padding: 0 0.75rem 0 2.1rem;
  border: 1px solid var(--zinc-300); border-radius: var(--radio-sm); font-size: 0.875rem; outline: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2371717a' stroke-width='1.6'%3E%3Ccircle cx='9' cy='9' r='5.5'/%3E%3Cpath d='m13.2 13.2 3.3 3.3' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 0.65rem center / 1rem;
  transition: border-color 150ms, box-shadow 150ms;
}
.cierra-buscar:focus { border-color: var(--marca-700); box-shadow: 0 0 0 3px var(--marca-anillo); }
.cierra-cuenta { margin: 0 0 0.25rem; }
.cierra-lista li[hidden] { display: none; }
.cierra-lista li:has(input[type=checkbox]:checked) { border-color: var(--zinc-900); background: var(--zinc-50); }
.cierra-lista { list-style: none; margin: 0 0 0.75rem; padding: 0; display: grid; gap: 0.25rem; max-height: 18rem; overflow-y: auto; }
.cierra-lista li { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0.625rem; border: 1px solid var(--zinc-200); border-radius: var(--radio-sm); }
.cierra-lista label { flex: 1; display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; cursor: pointer; }
.cierra-lista small { color: var(--zinc-500); }
.cierra-lista .cierra-etapa { display: flex; align-items: center; gap: 0.35rem; font-size: 0.75rem; color: var(--zinc-500); }
.cierra-lista .cierra-etapa input { width: 3.25rem; height: 2rem; padding: 0 0.4rem; border: 1px solid var(--zinc-300); border-radius: var(--radio-sm); }

/* --- Control de calce ---------------------------------------------------------- */

.calce { display: grid; gap: 1rem; padding: 1.5rem; border: 1px solid var(--zinc-200); border-radius: 1.375rem; background: #fff; }
.calce h2 { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem; margin: 0; font: 800 1.375rem/1.2 var(--sans); letter-spacing: -0.02em; }
.calce h2 small { font: 400 0.8125rem var(--sans); letter-spacing: 0; color: var(--zinc-500); }
.calce__tiras { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 1rem; }
.tira {
  display: grid; border: 1px solid var(--zinc-200); border-radius: 1rem; overflow: hidden; background: var(--zinc-50); text-decoration: none;
  transition: transform 450ms var(--curva-salida), box-shadow 450ms var(--curva-salida);
}
.tira:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -22px rgb(9 9 11 / 0.45); }
.tira__foto { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--zinc-200); }
.tira__foto img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--curva-salida); }
.tira:hover .tira__foto img { transform: scale(1.08); }
.tira__pie { display: grid; gap: 0.4rem; padding: 0.75rem 0.875rem 0.875rem; }
.tira__pie strong { font-size: 0.875rem; }
.tira__fichas { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.ficha-calce { padding: 0.25rem 0.5rem; border-radius: 0.375rem; background: var(--zinc-100); color: var(--zinc-600); font-size: 0.6875rem; font-weight: 600; }
.ficha-calce--ok { background: var(--verde-50); color: var(--verde-700); }
.ficha-calce--aviso { background: var(--ambar-50); color: var(--ambar-800); }

.tira__enlace { display: grid; color: inherit; text-decoration: none; }
.tira__ajustar { margin: 0 0.875rem 0.875rem; justify-content: center; }

/* --- Ajustar el calce a mano ---------------------------------------------------- */

/* A pantalla completa y oscuro: lo que se mira es la foto, y sobre ella un dibujo blanco. */
.calce-editor {
  width: 100vw; max-width: none; height: 100vh; height: 100dvh; max-height: none; margin: 0; padding: 0;
  border: 0; background: var(--zinc-950); color: #fff; overflow: hidden;
}
.calce-editor[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.calce-editor__barra { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 0.875rem 1rem; }
.calce-editor__barra h2 { margin: 0; font: 700 1.0625rem/1.25 var(--sans); }
.calce-editor__barra p { margin: 0.2rem 0 0; font-size: 0.8125rem; color: var(--zinc-400); }
.calce-editor__foto { position: relative; min-height: 0; background: #000; }
.calce-editor__foto canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
/* El dedo mueve la foto y las esquinas: que el navegador no lo tome como desplazar la página. */
.calce-editor__dibujo { touch-action: none; cursor: grab; }
.calce-editor__dibujo--sobre { cursor: pointer; }
.calce-editor__dibujo--tomando { cursor: grabbing; }
.calce-editor__cargando {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0;
  padding: 0.5rem 0.875rem; border-radius: 999px; background: rgb(24 24 27 / 0.85); font-size: 0.8125rem;
}
.calce-editor__zoom { position: absolute; right: 1rem; bottom: 1rem; display: grid; gap: 0.375rem; }
.calce-editor__zoom .boton { background: rgb(24 24 27 / 0.8); font-size: 1.125rem; }
/* Qué se mueve: arriba a la izquierda, lejos del zoom (abajo a la derecha) y de la barra.
   Oscuro y con borde claro como los botones del zoom, para leerse sobre cualquier foto. */
.calce-editor__modos {
  position: absolute; left: 1rem; top: 1rem; display: inline-flex; gap: 0.25rem; padding: 0.25rem;
  border: 1px solid rgb(255 255 255 / 0.25); border-radius: 0.875rem; background: rgb(24 24 27 / 0.8);
}
.calce-editor__modos button {
  height: 2.25rem; padding: 0 0.875rem; border: 0; border-radius: 0.625rem; background: none;
  color: var(--zinc-300); font: 600 0.8125rem/1 var(--sans); cursor: pointer; white-space: nowrap;
}
.calce-editor__modos button:hover { color: #fff; background: rgb(255 255 255 / 0.08); }
.calce-editor__modos button[aria-pressed="true"] { background: #fff; color: var(--zinc-900); }
.calce-editor__modos button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
/* En el celular, más cerca de la esquina: la foto es chica y cada píxel de ella cuenta. */
@media (max-width: 30rem) {
  .calce-editor__modos { left: 0.5rem; top: 0.5rem; }
  .calce-editor__modos button { padding: 0 0.625rem; }
}
.calce-editor__pie { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1rem; padding: 0.75rem 1rem; }
.calce-editor__estado { margin: 0; font-size: 0.8125rem; color: var(--zinc-300); font-variant-numeric: tabular-nums; }
.calce-editor__estado--aviso { color: #fbbf24; }
.calce-editor__botones { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.calce-editor__botones .boton { height: 2.5rem; padding: 0 0.875rem; }

/* --- Al abrir el master ------------------------------------------------------------ */

/* El select, lo elegido y la casilla van juntos: son un solo dato del loteo. */
.vista-inicial { display: grid; gap: 0.75rem; min-width: 0; }
.vista-inicial .nota { margin: -0.35rem 0 0; }
.vista-inicial__elegida {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.625rem 1rem;
  padding: 0.75rem 0.875rem; border: 1px solid var(--zinc-200); border-radius: 0.75rem; background: var(--zinc-50);
}
.vista-inicial__elegida[hidden], .vista-inicial .casilla-ajuste[hidden] { display: none; }
.vista-inicial__resumen { margin: 0; flex: 1 1 14rem; font-size: 0.875rem; font-weight: 600; color: var(--zinc-900); }
.vista-inicial__resumen--falta { font-weight: 500; color: var(--zinc-500); }
.vista-inicial__aviso {
  margin: 0; padding: 0.625rem 0.75rem; border-radius: 0.625rem;
  background: var(--ambar-50); box-shadow: inset 0 0 0 1px var(--ambar-200); color: var(--ambar-800); font-size: 0.8125rem;
}

/* Oscuro como el editor del calce: lo que se mira es la foto. Grande en escritorio para
   que el encuadre se parezca al de una pantalla real; a pantalla completa en el celular. */
.elegir-vista {
  width: min(78rem, calc(100vw - 2rem)); max-width: none; height: min(52rem, calc(100dvh - 2rem)); max-height: none;
  padding: 0; border: 0; border-radius: var(--radio-lg); background: var(--zinc-950); color: #fff; overflow: hidden;
  box-shadow: var(--sombra-alta);
}
.elegir-vista::backdrop { background: rgb(9 9 11 / 0.6); }
.elegir-vista[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.elegir-vista__barra { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 0.875rem 1rem; }
.elegir-vista__barra h2 { margin: 0; font: 700 1.0625rem/1.25 var(--sans); }
.elegir-vista__barra p { margin: 0.2rem 0 0; font-size: 0.8125rem; color: var(--zinc-400); }
.elegir-vista__marco { display: block; width: 100%; height: 100%; border: 0; background: #000; }
.elegir-vista__pie { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.75rem 1rem; padding: 0.75rem 1rem; }
.elegir-vista__estado { margin: 0 auto 0 0; font-size: 0.8125rem; color: #fbbf24; }
.elegir-vista__botones { display: flex; gap: 0.5rem; }
.elegir-vista__botones .boton { height: 2.5rem; padding: 0 1rem; }
@media (max-width: 40rem) {
  .elegir-vista {
    width: 100vw; height: 100vh; height: 100dvh; margin: 0; border-radius: 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .elegir-vista__botones { flex: 1; }
  .elegir-vista__botones .boton { flex: 1; justify-content: center; height: 2.75rem; }
}

/* --- Láminas del loteo (laminas.js) -------------------------------------------- */

.laminas-loteo__estado:empty { display: none; }
.laminas-vistas { display: grid; gap: 0.625rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--zinc-200); }
.laminas-vistas__cabeza { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0.5rem 1rem; }
.laminas-vistas__cabeza > span { display: grid; flex: 1 1 14rem; font-size: 0.875rem; }
.laminas-vistas__lista { display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.laminas-vistas__lista[hidden] { display: none; }
.laminas-vistas__fila {
  display: grid; grid-template-columns: 7.5rem minmax(0, 1fr) auto; align-items: center; gap: 0.75rem;
  padding: 0.5rem; border-radius: 0.75rem; box-shadow: inset 0 0 0 1px var(--zinc-200);
}
/* 16:9, la proporción de la imagen que dibuja la maqueta. */
.laminas-vistas__miniatura { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 0.5rem; background: var(--zinc-100); }
.laminas-vistas__titulo { margin: 0; min-width: 0; }
.laminas-vistas__titulo input { width: 100%; }
/* El título va en el pie, a la izquierda de los botones; el estado, debajo de todo. */
.laminas-vista .elegir-vista__pie { justify-content: flex-start; }
.laminas-vista__campo { display: flex; align-items: center; gap: 0.5rem; flex: 1 1 16rem; font-size: 0.8125rem; color: var(--zinc-300); }
.laminas-vista__campo input {
  flex: 1; min-width: 0; height: 2.5rem; padding: 0 0.75rem; border: 1px solid var(--zinc-700); border-radius: 0.625rem;
  background: var(--zinc-900); color: #fff; font: inherit; font-size: 0.875rem;
}
.laminas-vista .elegir-vista__estado { order: 3; flex-basis: 100%; margin: 0; }
.laminas-vista .elegir-vista__estado:empty { display: none; }
@media (max-width: 40rem) {
  /* En el celular la miniatura arriba y el título debajo, a lo ancho. */
  .laminas-vistas__fila { grid-template-columns: 1fr auto; }
  .laminas-vistas__miniatura { grid-column: 1 / -1; }
  .laminas-vistas__cabeza .boton { width: 100%; height: 2.75rem; justify-content: center; }
  .laminas-vista__campo { flex-basis: 100%; }
  .laminas-vista__campo input { height: 2.75rem; }
  /* Cancelar a su medida y la acción con el resto, en una línea. */
  .laminas-vista .elegir-vista__botones .boton { white-space: nowrap; padding: 0 0.875rem; }
  .laminas-vista .elegir-vista__botones [data-laminas-cerrar] { flex: none; }
}
/* En los celulares más angostos no cabe en una línea: mejor partido que cortado. */
@media (max-width: 22.5rem) {
  .laminas-vista .elegir-vista__botones .boton { white-space: normal; line-height: 1.15; }
}
#laminas-titulo:focus { outline: none; }
#laminas-titulo:focus-visible { outline: 2px solid var(--zinc-900); outline-offset: 2px; }

/* --- Alta --------------------------------------------------------------------- */

.modal {
  width: min(34rem, calc(100vw - 2rem)); padding: 1.5rem;
  border: 1px solid var(--zinc-200); border-radius: var(--radio-lg);
  box-shadow: var(--sombra-alta); color: inherit;
}
.modal::backdrop { background: rgb(9 9 11 / 0.4); }
.modal h2 { margin: 0 0 0.35rem; font: 700 1.125rem/1.2 var(--sans); }
.modal__cerrar { position: absolute; top: 0.75rem; right: 0.75rem; }
.modal__cerrar button {
  display: grid; place-items: center; width: 2rem; height: 2rem;
  background: transparent; border: 0; border-radius: var(--radio-sm); color: var(--zinc-500);
}
.modal__cerrar button:hover { background: var(--zinc-100); color: var(--zinc-900); }
.modal__pie { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 1.25rem; }
/* Tres botones con el número en el texto no caben en una línea de celular. */
.modal__pie--envuelve { flex-wrap: wrap; }
/* Varios campos seguidos en un modal: sin aire, cada etiqueta se pega al campo de arriba. */
.modal__campos { display: grid; gap: 0.9rem; margin-top: 1rem; }
.ayuda { margin: 0 0 1rem; font-size: 0.8125rem; color: var(--zinc-500); }

.soltadero {
  display: grid; place-items: center; gap: 0.5rem;
  padding: 2rem 1rem; margin-bottom: 1rem;
  background: var(--zinc-50); border: 2px dashed var(--zinc-300); border-radius: var(--radio-md);
  color: var(--zinc-600); font-size: 0.875rem; text-align: center; cursor: pointer;
  transition: background 150ms, border-color 150ms;
}
.soltadero:hover, .soltadero--encima { background: var(--marca-50); border-color: var(--marca-700); color: var(--marca-800); }
/* La zona del vuelo ya no es un <label> sino un botón: el anillo, igual que en .archivo. */
.soltadero:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--marca-anillo); border-color: var(--marca-700); }
.soltadero svg { width: 1.75rem; height: 1.75rem; }

.alternativa { margin-top: 1rem; border-top: 1px solid var(--zinc-200); padding-top: 1rem; }
.alternativa summary { font-size: 0.8125rem; color: var(--zinc-600); cursor: pointer; }
.alternativa .ayuda { margin: 0.6rem 0; }
.fila { display: flex; gap: 0.5rem; }
.fila input { flex: 1; font-family: var(--mono); font-size: 0.8125rem; }

.progreso { height: 0.375rem; margin-top: 1rem; background: var(--zinc-200); border-radius: 999px; overflow: hidden; }
.progreso i { display: block; height: 100%; width: 0; background: var(--marca-700); transition: width 200ms; }

/* --- Avisos --------------------------------------------------------------------- */

.aviso {
  padding: 0.75rem 1rem; border-radius: var(--radio-md);
  background: var(--rojo-50); border: 1px solid var(--rojo-200); color: var(--rojo-700);
  font-size: 0.875rem;
}
.aviso--fijo { max-width: 61rem; margin: 1rem auto -1rem; }
/* Lo que salió bien y conviene decir: el KMZ quedó en el master. */
.aviso--ok { background: var(--verde-50); border-color: var(--verde-100); color: var(--verde-800); }
.vacio {
  display: grid; place-items: center; gap: 0.75rem;
  padding: 4rem 1.5rem; text-align: center;
  background: #fff; border: 1px solid var(--zinc-200); border-radius: var(--radio-lg);
  color: var(--zinc-500);
}
.vacio strong { color: var(--zinc-900); font-size: 1rem; }

/* El padrón de loteadoras: una fila por cada una, con lo que hay que saber de un vistazo. */
.modal--ancho { width: min(40rem, calc(100vw - 2rem)); }

.padron { display: grid; gap: 0.5rem; margin-bottom: 1rem; }

.padron__fila {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--zinc-200); border-radius: var(--radio-md);
}

.padron__fila .ayuda { display: block; margin: 0.15rem 0 0; }

/* Las secciones de Loteadoras y de la ficha: pedidos, todas, loteos, cuentas, lo último. */
.padron__bloque { margin: 1.75rem 0 0.5rem; }
.padron__bloque h2 { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.6rem; font: 700 1.125rem/1.2 var(--sans); letter-spacing: -0.01em; }
.padron__bloque > .ayuda { margin: -0.3rem 0 0.75rem; }
.padron .padron__fila { background: #fff; }
.padron__bloque--pedidos .padron .padron__fila { background: var(--ambar-50); border-color: var(--ambar-200); }

.padron__buscar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.6rem; }
.padron__buscar h2 { margin: 0; }
.padron__buscar input {
  flex: 0 1 20rem; min-width: 0; height: 2.5rem; padding: 0 0.875rem;
  border: 1px solid var(--zinc-200); border-radius: 999px; background: #fff;
  font: 400 0.875rem var(--sans); color: var(--zinc-900);
}
.padron__buscar input:focus { outline: none; border-color: var(--zinc-900); box-shadow: 0 0 0 4px rgb(24 24 27 / 0.08); }

.padron__texto { min-width: 0; }
.padron__nombre { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.padron__enlace { color: var(--zinc-900); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.padron__enlace:hover { text-decoration: underline; }
/* El loteo de una loteadora que no dio acceso: el nombre, sin parecer enlace. */
.padron__enlace--sin:hover { text-decoration: none; }

/* Toda la fila de una loteadora es el enlace a su ficha. */
.padron__fila--enlace { color: inherit; text-decoration: none; transition: border-color 150ms, box-shadow 150ms; }
.padron__fila--enlace:hover { border-color: var(--zinc-400); box-shadow: 0 1px 2px rgb(0 0 0 / 0.04); }
.padron__flecha { color: var(--zinc-400); font-size: 1.25rem; line-height: 1; }

.padron__fila > .boton { flex: none; white-space: nowrap; }
/* Los botones de texto de una cuenta de la ficha (Reenviar bienvenida, Dar clave nueva). */
.padron__botones { display: flex; flex: none; flex-wrap: wrap; justify-content: flex-end; gap: 0 0.25rem; }
.padron__botones .boton { white-space: nowrap; }

/* La dirección de cada loteadora, como una columna más de la fila; en el celular, debajo. */
.padron__fila--enlace .padron__texto { flex: 1 1 auto; }
.padron__direccion {
  display: grid; flex: 0 1 22rem; min-width: 0;
  font: 500 0.8125rem/1.35 var(--mono); color: var(--zinc-700);
}
.padron__host { min-width: 0; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.padron__direccion small { font: 600 0.6875rem/1.2 var(--sans); letter-spacing: 0.04em; text-transform: uppercase; color: var(--zinc-500); }

/* En la ficha: "Dirección: x.tumasterplan.cl" y, al cambiarla, el campo con el dominio pegado. */
.direccion { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; }
.direccion[hidden], .direccion__editor[hidden] { display: none; }
.direccion__texto { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.direccion__valor { font-family: var(--mono); font-weight: 600; }
.direccion__editor { display: grid; gap: 0.5rem; max-width: 34rem; }
.direccion__editor .nota { margin: 0; }
.direccion__campo {
  display: flex; align-items: center; height: 2.5rem; overflow: hidden;
  border: 1px solid var(--zinc-300); border-radius: var(--radio-md); background: #fff;
}
.direccion__campo:focus-within { border-color: var(--marca-700); box-shadow: 0 0 0 3px var(--marca-anillo); }
.direccion__campo input {
  flex: 1; min-width: 0; height: 100%; padding: 0 0.75rem;
  border: 0; outline: 0; background: transparent; font: 500 0.875rem var(--mono);
}
.direccion__sufijo { flex: none; padding-right: 0.75rem; color: var(--zinc-500); font: 0.875rem var(--mono); white-space: nowrap; }
.direccion__estado:empty { display: none; }
.direccion__estado--mal { color: var(--rojo-700); }
.direccion__estado--ok { color: var(--verde-700); }

.padron__extras { margin-top: 1.5rem; }
/* Se escriben nombres y correos, no rutas ni códigos: van en la letra de siempre. */
#pantalla-loteadoras .fila input, #pantalla-loteadora .fila input { font-family: var(--sans); font-size: 0.875rem; }
#clientes-clave, #ficha-clave { margin: 1rem 0 0; }

/* Lo que se lleva eliminar una loteadora: una cosa por línea, para leerlo antes de escribir el nombre. */
.borrado { display: grid; gap: 0.3rem; margin: 0 0 1rem; padding-left: 1.1rem; font-size: 0.875rem; color: var(--zinc-800); }
.borrado__cobro {
  margin: 0 0 1rem; padding: 0.6rem 0.8rem; border-radius: var(--radio-md);
  background: var(--rojo-50); border: 1px solid var(--rojo-200); color: var(--rojo-700); font-size: 0.8125rem;
}
/* En lugar del botón Eliminar: por qué no se puede, a todo el ancho bajo la cabecera. */
.ficha__motivo { margin: 0 0 1rem; font-size: 0.875rem; }

/* La ficha: loteos y cuentas a la izquierda, lo último a la derecha en pantallas anchas. */
.ficha { display: grid; gap: 0.5rem; }
.ficha__cuerpo { display: grid; gap: 0 2rem; }
@media (min-width: 60rem) {
  .ficha__cuerpo { grid-template-columns: minmax(0, 1fr) 18rem; align-items: start; }
  .ficha__lado { position: sticky; top: 6rem; }
}
.ficha__historial { display: grid; gap: 0.55rem; margin: 0; padding: 0; list-style: none; font-size: 0.8125rem; color: var(--zinc-700); }
.ficha__historial li { display: flex; gap: 0.75rem; }
.ficha__cuando { flex: none; width: 3.75rem; color: var(--zinc-500); }
.ficha__veces { color: var(--zinc-500); white-space: nowrap; }
.ficha .guia .chip { vertical-align: middle; }
/* El número de masters: corto, que la nota del cobro se lleve el resto de la fila. */
.fila .ficha__masters { width: 6rem; flex: none; }

@media (max-width: 40rem) {
  /* Dos botones al lado del correo lo aprietan a una columna de letras: que bajen. */
  .padron__fila:has(.padron__botones) { flex-wrap: wrap; row-gap: 0.25rem; }
  .padron__botones { flex: 1 1 100%; justify-content: flex-start; margin-left: -0.75rem; }
  .padron__buscar input { flex-basis: 100%; }
  /* Los botones de la ficha (Suspender, Eliminar, Trabajar en…) no caben en una fila: que bajen. */
  .ficha .pantalla__acciones { flex-shrink: 1; min-width: 0; }
  .padron__fila--enlace { flex-wrap: wrap; row-gap: 0.35rem; }
  .padron__fila--enlace .padron__texto { flex-basis: calc(100% - 2.25rem); }
  .padron__direccion { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.4rem; flex-basis: 100%; order: 3; }
  /* Acá tiene todo el ancho: mejor partirla que cortarla con puntos suspensivos. */
  .padron__host { white-space: normal; overflow-wrap: anywhere; }
  .direccion__pie .boton { flex: 1 1 auto; }
  .modal .modal__pie--envuelve .boton { flex: 1 1 auto; }
  /* 16px: con menos, el iPhone hace zoom al tocar el campo. */
  .direccion__campo input, .direccion__sufijo { font-size: 1rem; }
}

.fila--envuelve { flex-wrap: wrap; }
.fila--envuelve input { flex: 1 1 10rem; }

/* Los pasos del flujo, en una línea. Va en gris y sin caja: tiene que estar
   disponible para quien la necesita y desaparecer para quien ya sabe. */
.guia { color: var(--zinc-500); font-size: 0.875rem; }
.vacio b { color: var(--zinc-700); }

/* --- Crea tu KMZ ------------------------------------------------------------------ */

/* El plano y el mapa lado a lado piden todo el ancho de la ventana. */
body.pantalla-ancha .lienzo { max-width: 110rem; }
body.pantalla-ancha .aviso--fijo { max-width: 107rem; }

.boton--chico { height: 2rem; padding: 0 0.625rem; font-size: 0.8125rem; }
.oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.pasos { display: flex; flex-wrap: wrap; gap: 0.375rem; margin: 0; padding: 0; list-style: none; }
.pasos button {
  display: inline-flex; align-items: center; gap: 0.5rem; height: 2.25rem; padding: 0 0.875rem 0 0.375rem;
  background: #fff; border: 1px solid var(--zinc-200); border-radius: 999px;
  color: var(--zinc-700); font-weight: 500;
  transition: background 150ms, border-color 150ms, color 150ms;
}
.pasos button b {
  display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 999px;
  background: var(--zinc-100); color: var(--zinc-600); font: 600 0.75rem/1 var(--sans);
}
/* El paso abierto no cambia al pasar el mouse: este hover le ganaba a `aria-current`
   y dejaba el texto oscuro sobre fondo oscuro, como un botón apagado. */
.pasos button:hover:not([disabled]):not([aria-current="step"]) { border-color: var(--zinc-400); color: var(--zinc-900); }
.pasos button[aria-current="step"] { background: var(--marca-800); border-color: var(--marca-800); color: #fff; }
.pasos button[aria-current="step"] b { background: #fff; color: var(--marca-800); }
.pasos button.paso--hecho b { background: var(--verde-100); color: var(--verde-800); }
.pasos button[disabled] { color: var(--zinc-400); cursor: not-allowed; background: var(--zinc-50); }
/* En el teléfono los cuatro pasos van en una fila: sin "el plano" ni "y descargar", con
   menos relleno, y cada pastilla se achica antes que envolver a otra línea. */
@media (max-width: 40rem) {
  .pasos { flex-wrap: nowrap; gap: 0.25rem; }
  .pasos li { flex: 1 1 auto; min-width: 0; }
  .pasos button { width: 100%; min-width: 0; justify-content: center; gap: 0.3rem; height: 2.5rem; padding: 0 0.5rem 0 0.25rem; font-size: 0.8125rem; }
  .pasos button b { flex: none; width: 1.375rem; height: 1.375rem; }
  .pasos__resto { display: none; }
  /* La barra es hija de la grilla de la pantalla: sin esto, su ancho mínimo es el de las
     cuatro pastillas y a 320 px empujaba la página hacia el lado. */
  #pantalla-kmz > nav { min-width: 0; }
}
/* A 320 px las cuatro no caben ni con lo de arriba: letra y número más chicos. */
@media (max-width: 23rem) {
  .pasos { gap: 0.2rem; }
  .pasos button { gap: 0.15rem; padding: 0 0.3rem 0 0.15rem; font-size: 0.75rem; }
  .pasos button b { width: 1.125rem; height: 1.125rem; font-size: 0.6875rem; }
}
/* "Revisar los números" desde Ubicar y Revisar: un enlace a su ancho, no a todo el panel. */
.kmz-a-numerar { justify-self: start; padding: 0; text-decoration: underline; text-underline-offset: 2px; }

.kmz-atrasado {
  position: absolute; left: 0.5rem; right: 0.5rem; bottom: 0.5rem; z-index: 4;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 0.75rem;
  padding: 0.5rem 0.5rem 0.5rem 0.875rem; border-radius: var(--radio-md); box-shadow: var(--sombra-alta); font-size: 0.8125rem;
  background: var(--ambar-50); border: 1px solid var(--ambar-200); color: var(--ambar-800);
}

.kmz-cuerpo { display: grid; grid-template-columns: 22rem minmax(0, 1fr); gap: 1rem; align-items: start; }
.kmz-cuerpo--solo { grid-template-columns: minmax(0, 44rem); justify-content: center; }
.kmz-panel {
  display: grid; gap: 0.75rem; align-content: start; padding: 1.25rem;
  background: #fff; border: 1px solid var(--zinc-200); border-radius: var(--radio-lg); box-shadow: var(--sombra);
  /* `--kmz-arriba` es dónde empieza el panel en la página (lo mide kmz.js): así termina sobre
     el borde de abajo y el pie se ve sin desplazar. Sin medir, el alto de antes. */
  max-height: max(20rem, calc(100vh - var(--kmz-arriba, 11rem) - 1rem)); overflow-y: auto;
}
.kmz-cuerpo--solo .kmz-panel { max-height: none; }
.kmz-panel h2 { margin: 0; font: 700 1.125rem/1.25 var(--sans); letter-spacing: -0.01em; }
.kmz-panel h2:focus { outline: none; }
.kmz-panel h3 { margin: 0.5rem 0 0.25rem; font: 600 0.75rem/1.2 var(--sans); letter-spacing: 0.04em; text-transform: uppercase; color: var(--zinc-500); }
.kmz-panel .ayuda, .kmz-panel .nota { margin: 0; }
/* Título de sección con su acción al lado ("Confirmar todos"): el título no cambia de
   aspecto; la fila solo lo centra con el botón y, si no cabe (celular), el botón baja. */
.kmz-titulo-accion { align-items: center; justify-content: space-between; gap: 0.25rem 0.5rem; margin: 0.5rem 0 0.25rem; }
.kmz-titulo-accion h3 { margin: 0; }
.kmz-panel .soltadero { margin: 0; }
/* El pie con "Seguir" queda pegado abajo del panel aunque el panel sea largo: si no, en
   Marcar (instrucciones, lista de lo marcado) quedaba fuera de la vista y no se sabía
   cómo avanzar. Ocupa el ancho del panel y tapa su relleno de abajo, con fondo, para
   que lo que pasa por detrás al desplazar no se lea a través. Al final del panel queda
   en su lugar, así que no tapa nada. */
.kmz-panel__pie {
  position: sticky; bottom: -1.25rem; z-index: 2;
  display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: flex-end;
  margin: 0 -1.25rem -1.25rem; padding: 0.75rem 1.25rem 1.25rem;
  background: #fff; border-top: 1px solid var(--zinc-100); border-radius: 0 0 var(--radio-lg) var(--radio-lg);
}
/* El motivo de un "Seguir" apagado: en su propia línea, bajo el botón. */
.kmz-panel__pie .kmz-por-que { flex-basis: 100%; margin: 0; text-align: right; }
.kmz-actualizando { margin: 0; font-size: 0.8125rem; font-weight: 600; color: var(--zinc-600); }
.kmz-actualizando::before {
  content: ""; display: inline-block; width: 0.75rem; height: 0.75rem; margin-right: 0.4rem; vertical-align: -0.1rem;
  border: 2px solid var(--zinc-300); border-top-color: var(--zinc-700); border-radius: 50%; animation: kmz-girar 0.8s linear infinite;
}
@keyframes kmz-girar { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .kmz-actualizando::before { animation: none; } }
.kmz-instrucciones { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.35rem; color: var(--zinc-700); font-size: 0.8125rem; }
.kmz-nota-fuerte { margin: 0; padding: 0.625rem 0.75rem; border-radius: var(--radio-sm); background: var(--zinc-100); color: var(--zinc-800); font-size: 0.8125rem; }
.kmz-estado { margin: 0; min-height: 1.25rem; font-weight: 600; color: var(--zinc-800); }
.casilla-ajuste { display: flex; align-items: flex-start; gap: 0.625rem; font-size: 0.8125rem; color: var(--zinc-500); cursor: pointer; }
.casilla-ajuste input { margin-top: 0.15rem; width: 1rem; height: 1rem; accent-color: var(--zinc-900); }
.casilla-ajuste b { display: block; color: var(--zinc-900); font-weight: 600; }
.kmz-casilla { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8125rem; cursor: pointer; }
.kmz-foto { display: grid; gap: 0.5rem; padding: 0.75rem; border: 1px dashed var(--zinc-300); border-radius: var(--radio-md); }
.kmz-foto .campo input { width: 7rem; }

.kmz-lista { display: grid; gap: 0.25rem; margin: 0; padding: 0; list-style: none; font-size: 0.8125rem; }
.kmz-lista li { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; min-height: 2rem; padding: 0 0 0 0.625rem; border: 1px solid var(--zinc-200); border-radius: var(--radio-sm); }
.kmz-lista__ok::before { content: "✓"; color: var(--verde-700); }
.kmz-lista__ok { justify-content: flex-start !important; }
.kmz-lista__falta { color: var(--ambar-800); background: var(--ambar-50); }

.hojas { display: grid; grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr)); gap: 0.5rem; }
.hoja {
  display: grid; gap: 0.35rem; padding: 0.375rem; background: #fff; text-align: left;
  border: 1px solid var(--zinc-200); border-radius: var(--radio-md); font-size: 0.75rem; color: var(--zinc-600);
}
.hoja img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: var(--zinc-100); border-radius: var(--radio-sm); }
.hoja:hover { border-color: var(--zinc-400); }
.hoja[aria-pressed="true"] { border-color: var(--marca-800); box-shadow: 0 0 0 2px var(--marca-anillo); color: var(--zinc-900); font-weight: 600; }

#kmz-unir-caja { padding-top: 0.25rem; }
#kmz-unir-caja .boton { width: 100%; }

.union-orden { text-transform: none; letter-spacing: 0; font-weight: 500; }
.union-movil { display: none; }
.union-hojas { display: grid; gap: 0.375rem; margin: 0; padding: 0; list-style: none; }
.union-hoja {
  display: grid; gap: 0.5rem; padding: 0.375rem 0.625rem 0.625rem;
  background: #fff; border: 1px solid var(--zinc-200); border-radius: var(--radio-md);
}
.union-hoja[aria-current="true"] { border-color: var(--violeta); box-shadow: 0 0 0 2px var(--violeta-anillo); }
.union-hoja--fuera { padding-bottom: 0.375rem; background: var(--zinc-50); color: var(--zinc-500); }
.union-hoja__cabeza {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; width: 100%; min-height: 2rem;
  padding: 0; background: none; border: 0; text-align: left; font-weight: 600;
}
.union-hoja[aria-current="true"] .union-hoja__cabeza { color: var(--violeta); }
/* Subir o Bajar sin dónde: se apagan sin el relleno gris de un botón lleno. */
.union-hoja .boton--texto[disabled] { background: transparent; color: var(--zinc-300); }
.union-hoja__resumen { margin-left: auto; font-size: 0.75rem; font-weight: 500; color: var(--zinc-500); font-variant-numeric: tabular-nums; }
.union-hoja__controles { display: grid; gap: 0.5rem; }
.union-hoja--fuera .union-hoja__controles { gap: 0; }
.union-giro { display: grid; grid-template-columns: auto minmax(0, 1fr) 3.5rem; align-items: center; gap: 0.5rem; font-size: 0.8125rem; }
.union-giro input { width: 100%; margin: 0; accent-color: var(--violeta); }
.union-giro output { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.union-calce { margin: 0; font-size: 0.75rem; font-weight: 600; }
.union-calce--ok { color: var(--verde-700); }
.union-calce--no { color: var(--rojo-700); }

.kmz-cifras { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: 0.5rem 0.75rem; margin: 0; }
.kmz-cifras div { display: grid; gap: 0.1rem; }
.kmz-cifras dt { display: flex; align-items: center; gap: 0.35rem; font: 600 0.625rem/1.2 var(--sans); letter-spacing: 0.05em; text-transform: uppercase; color: var(--zinc-500); }
.kmz-cifras dd { margin: 0; font: 600 1rem/1.3 var(--sans); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kmz-punto { display: inline-block; width: 0.625rem; height: 0.625rem; border-radius: 999px; }

.kmz-muestra { padding: 0 0.3rem; border-radius: 0.25rem; font-weight: 600; }
.kmz-muestra--usuario { background: rgb(22 163 74 / 0.12); color: #14532d; }
.kmz-muestra--lector { background: rgb(37 99 235 / 0.12); color: #1d4ed8; }
.kmz-muestra--malo { background: rgb(220 38 38 / 0.12); color: var(--rojo-700); }
.kmz-pastillas { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.pastilla--boton { border: 0; cursor: pointer; }
.pastilla--boton:hover { box-shadow: inset 0 0 0 1px var(--zinc-400); }

.kmz-resto { display: grid; gap: 0.5rem; padding: 0.75rem; border-radius: var(--radio-md); background: var(--ambar-50); border: 1px solid var(--ambar-200); }
.kmz-resto p { margin: 0; }
.kmz-resto__pregunta { font-weight: 600; color: var(--zinc-800); font-size: 0.875rem; }
.kmz-resto--decidido { background: var(--zinc-50); border-color: var(--zinc-200); }
.kmz-cuadricula { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; padding: 0.75rem; border-radius: var(--radio-md); background: var(--verde-50); border: 1px solid var(--verde-100); }
.kmz-cuadricula .nota { flex-basis: 100%; color: var(--verde-800); }
.kmz-ubicacion p { margin: 0; font-weight: 600; }
/* "Ajustar el tamaño con el cuadro" a su ancho, y "Tamaño ajustado con el cuadro · Deshacer
   el ajuste" en una línea: el deshacer es parte de la frase, no un botón aparte. */
.kmz-panel > [data-accion="kmz-ajustar-cuadro"] { justify-self: start; }
.kmz-panel p.kmz-ajustado { display: flex; flex-wrap: wrap; align-items: center; gap: 0 0.25rem; font-weight: 400; color: var(--zinc-600); }
.kmz-ajustado .boton--texto { padding: 0 0.25rem; text-decoration: underline; text-underline-offset: 2px; }
/* En el teléfono se tocan con el dedo: 44 px de alto, aunque sean "chicos" en la vista. */
@media (max-width: 40rem) {
  .kmz-panel [data-accion="kmz-ajustar-cuadro"], .kmz-ajustado .boton--texto,
  #kmz-semaforo-acciones .boton, .kmz-a-numerar { height: 2.75rem; }
}
/* Ubicar con un punto: los tres pasos numerados en el texto (el <ol> no pone números,
   así se leen igual en el lector de pantalla y en la vista). */
.kmz-guia { display: grid; gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
.kmz-guia > li { display: grid; gap: 0.4rem; justify-items: start; padding: 0.75rem; border: 1px solid var(--zinc-200); border-radius: var(--radio-md); }
.kmz-guia > li > strong { font-size: 0.875rem; color: var(--zinc-900); }
.kmz-guia > li[data-estado="hecho"] { border-color: var(--verde-100); background: var(--verde-50); }
.kmz-guia > li[data-estado="hecho"] > strong::after { content: " ✓"; color: var(--verde-700); }
.kmz-guia > li[data-estado="ahora"] { border-color: var(--zinc-400); box-shadow: 0 0 0 2px var(--marca-anillo); }
.kmz-guia .fila { width: 100%; }
.kmz-guia .boton[aria-pressed="true"] { background: var(--marca-800); border-color: var(--marca-800); color: #fff; }
.kmz-guia__hecho { color: var(--verde-800); }
.kmz-giro { display: grid; gap: 0.35rem; width: 100%; }
.kmz-giro label { font-size: 0.8125rem; font-weight: 600; color: var(--zinc-700); }
/* El deslizador va arriba, a todo el ancho (el panel es angosto): entre los botones
   quedaba de unos 90 px y no se podía afinar el décimo de grado. */
.kmz-giro__fila { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; }
.kmz-giro__fila .boton { flex: 1 1 0; padding: 0 0.5rem; font-variant-numeric: tabular-nums; }
.kmz-giro__fila input[type="range"] { order: -1; flex: 1 1 100%; height: 2rem; accent-color: var(--marca-800); }
.kmz-giro output { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--zinc-800); }
/* El giro sobre el mapa: solo en pantalla angosta, donde el del panel queda lejos de los lotes. */
.kmz-giro-mapa {
  position: absolute; top: 0.5rem; right: 0.5rem; z-index: 1000; display: none; align-items: center; gap: 0.25rem;
  padding: 0.25rem; background: rgb(255 255 255 / 0.94); border: 1px solid var(--zinc-200); border-radius: var(--radio-md); box-shadow: var(--sombra);
}
.kmz-giro-mapa .boton { padding: 0 0.45rem; font-variant-numeric: tabular-nums; }
.kmz-giro-mapa output { min-width: 3.25rem; text-align: center; font: 600 0.8125rem var(--sans); font-variant-numeric: tabular-nums; color: var(--zinc-800); }
@media (max-width: 70rem) { .kmz-giro-mapa:not([hidden]) { display: flex; } }
.kmz-escala { display: grid; gap: 0.35rem; padding: 0.75rem; border-radius: var(--radio-md); background: var(--ambar-50); border: 1px solid var(--ambar-200); }
.kmz-escala__campo { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; font-size: 0.875rem; font-weight: 600; color: var(--zinc-800); }
.kmz-escala__campo input { width: 7rem; height: 2rem; padding: 0 0.5rem; border: 1px solid var(--zinc-300); border-radius: var(--radio-sm); font: 600 0.9375rem var(--sans); }
.kmz-escala__pista { margin: 0; font-size: 0.875rem; color: var(--zinc-800); }
.kmz-escala__valor { display: inline-flex; align-items: center; gap: 0.25rem; }
/* El de la línea va en metros, no en 1:N: más angosto. */
#kmz-escala-metros-valor { width: 5.5rem; }
/* La pregunta en su línea y el campo con "Usar" debajo: así no se parte distinto en cada ancho. */
#kmz-escala-marcar label { flex-basis: 100%; }
.kmz-escala__campo input:focus { border-color: var(--marca-700); box-shadow: 0 0 0 3px var(--marca-anillo); outline: none; }
/* El alfiler de la coordenada: una gota naranja con la punta en el lugar exacto. */
.kmz-alfiler { pointer-events: none; }
.kmz-alfiler span {
  position: absolute; left: 3px; top: 0; width: 22px; height: 22px; box-sizing: border-box;
  background: #ea580c; border: 3px solid #fff; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.45);
}
.kmz-alfiler::after {
  content: ''; position: absolute; left: 11px; bottom: -3px; width: 6px; height: 6px; border-radius: 50%;
  background: #ea580c; box-shadow: 0 0 0 2px #fff;
}
/* Ubicar: primero el método. Las tarjetas son botones grandes, una debajo de otra (el panel
   es angosto en escritorio y en el celular), con el título y para qué sirve. */
.kmz-metodos { display: grid; gap: 0.5rem; }
.kmz-metodo {
  display: grid; gap: 0.25rem; width: 100%; min-height: 2.75rem; padding: 0.75rem 0.875rem; text-align: left; cursor: pointer;
  background: #fff; border: 1px solid var(--zinc-300); border-radius: var(--radio-md); font: inherit; color: var(--zinc-800);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.kmz-metodo[hidden] { display: none; }
.kmz-metodo:hover { border-color: var(--marca-700); }
.kmz-metodo:focus-visible { outline: none; border-color: var(--marca-700); box-shadow: 0 0 0 3px var(--marca-anillo); }
.kmz-metodo__titulo { font-size: 0.9375rem; font-weight: 700; color: var(--zinc-900); }
.kmz-metodo__texto { font-size: 0.8125rem; line-height: 1.4; color: var(--zinc-600); }
.kmz-metodo__actual { font-size: 0.75rem; font-weight: 600; color: var(--verde-800); }
.kmz-metodo--actual { border-color: var(--verde-100); background: var(--verde-50); }
.kmz-metodo-elegido { display: flex; flex-wrap: wrap; align-items: center; gap: 0 0.3rem; margin: 0; font-size: 0.8125rem; color: var(--zinc-700); }
.kmz-metodo-elegido strong { color: var(--zinc-900); }
.kmz-metodo-elegido .boton--texto { padding: 0 0.125rem; text-decoration: underline; text-underline-offset: 2px; }
.kmz-metodo-panel { display: grid; gap: 0.75rem; }
.kmz-metodo-panel[hidden] { display: none; }
.kmz-metodo-panel .kmz-escala { justify-items: start; }
.kmz-metodo-panel .kmz-cuadricula { justify-self: stretch; }
.kmz-metodo-panel > .boton { justify-self: start; }
/* Varios puntos: una fila por punto, con su letra en un círculo. La activa lleva el anillo
   de "lo que toca"; la que no calza, en rojo. */
/* Vacía no ocupa alto, pero sigue a la vista: una región viva oculta no se anuncia. */
#kmz-ancla-estado:empty { min-height: 0; margin-bottom: -0.75rem; }
.kmz-puntos__titulo { margin: 0; font-size: 0.875rem; color: var(--zinc-900); }
.kmz-puntos { display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
/* Una fila hecha va en dos líneas: la coordenada arriba, y abajo cuánto se aleja, si calza y
   los botones. En una sola no cabe en el panel (~330 px): la coordenada se montaba encima de
   "Rehacer". */
.kmz-fila-punto {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.125rem 0.625rem;
  padding: 0.5rem 0.625rem; border: 1px solid var(--zinc-200); border-radius: var(--radio-md); font-size: 0.8125rem;
}
.kmz-fila-punto[hidden] { display: none; }
.kmz-fila-punto__letra {
  display: inline-grid; place-items: center; min-width: 1.75rem; height: 1.75rem; padding: 0 0.35rem; box-sizing: border-box;
  border-radius: 999px; background: #2563eb; color: #fff; font: 700 0.8125rem/1 var(--sans);
  /* Los KMZ de antes traen puntos con otros nombres ("Esquina norte"): se corta, el nombre
     entero queda en el título y para el lector de pantalla. */
  max-width: 5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.kmz-fila-punto--hecha .kmz-fila-punto__letra { grid-row: 1 / span 2; }
.kmz-fila-punto__coord { grid-column: 2 / -1; color: var(--zinc-700); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kmz-fila-punto__datos { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.625rem; min-width: 0; font-variant-numeric: tabular-nums; }
.kmz-fila-punto__dist { color: var(--zinc-600); white-space: nowrap; }
.kmz-fila-punto__estado { font-weight: 600; color: var(--verde-800); }
.kmz-fila-punto__acciones { display: flex; gap: 0.25rem; margin-right: -0.375rem; }
.kmz-fila-punto.kmz-atipica { border-color: var(--rojo-200); background: var(--rojo-50); }
.kmz-fila-punto.kmz-atipica .kmz-fila-punto__letra { background: #dc2626; }
.kmz-fila-punto.kmz-atipica .kmz-fila-punto__estado { color: var(--rojo-700); }
.kmz-fila-punto--activa { grid-template-columns: auto 1fr; align-items: start; border-color: var(--zinc-400); box-shadow: 0 0 0 2px var(--marca-anillo); }
.kmz-fila-punto--activa .kmz-fila-punto__letra { background: #ea580c; }
.kmz-fila-punto__cuerpo { display: grid; gap: 0.4rem; justify-items: start; min-width: 0; }
.kmz-fila-punto__etiqueta { font-size: 0.875rem; font-weight: 600; color: var(--zinc-900); line-height: 1.75rem; }
.kmz-fila-punto__paso { margin: 0; color: var(--zinc-700); }
.kmz-fila-punto--activa[data-espera="plano"] .kmz-fila-punto__paso { font-weight: 600; color: var(--zinc-900); }
.kmz-ancla-coordenada { display: flex; gap: 0.5rem; width: 100%; }
.kmz-ancla-coordenada input { flex: 1 1 10rem; min-width: 0; }
.kmz-metodo-panel > [data-accion="kmz-anadir-punto"] { justify-self: start; }
@media (max-width: 40rem) {
  .kmz-metodo-elegido .boton--texto { height: 2.75rem; }
  .kmz-fila-punto .boton--chico, .kmz-metodo-panel > [data-accion="kmz-anadir-punto"] { height: 2.75rem; }
  .kmz-fila-punto--activa .boton--chico { height: 2.75rem; }
}
.kmz-avisos { margin: 0.35rem 0 0; padding-left: 1.1rem; color: var(--ambar-800); font-size: 0.8125rem; }
.kmz-ajuste { display: grid; gap: 0.5rem; margin: 0; padding: 0.75rem; border: 1px solid var(--zinc-200); border-radius: var(--radio-md); }
.kmz-ajuste legend { padding: 0 0.25rem; font-weight: 600; }
.kmz-ajuste .boton[aria-pressed="true"] { background: var(--marca-800); border-color: var(--marca-800); color: #fff; }
.kmz-flechas { display: grid; grid-template-columns: repeat(3, 2.5rem); grid-template-areas: ". n ." "o . e" ". s ."; gap: 0.25rem; }
.kmz-flechas .boton { width: 2.5rem; padding: 0; }
.kmz-flechas [data-accion="kmz-norte"] { grid-area: n; }
.kmz-flechas [data-accion="kmz-oeste"] { grid-area: o; }
.kmz-flechas [data-accion="kmz-este"] { grid-area: e; }
.kmz-flechas [data-accion="kmz-sur"] { grid-area: s; }
.kmz-ajuste .campo select { height: 2rem; border: 1px solid var(--zinc-300); border-radius: var(--radio-sm); padding: 0 0.5rem; background: #fff; }
/* El semáforo de Crear: los tonos 800 sobre su 50 pasan AA (≈7:1); el borde grueso
   distingue verde de ámbar también sin color, junto con el texto. */
.kmz-semaforo { display: grid; gap: 0.5rem; justify-items: start; padding: 0.75rem; border-radius: var(--radio-md); border: 1px solid; border-left-width: 4px; font-size: 0.875rem; }
.kmz-semaforo p { margin: 0; }
.kmz-semaforo[data-tono="verde"] { background: var(--verde-50); border-color: var(--verde-100); border-left-color: var(--verde-700); color: var(--verde-800); }
.kmz-semaforo[data-tono="ambar"] { background: var(--ambar-50); border-color: var(--ambar-200); border-left-color: var(--ambar-800); color: var(--ambar-800); }
.kmz-listo { display: grid; gap: 0.5rem; justify-items: start; padding: 1rem; border-radius: var(--radio-md); background: var(--verde-50); border: 1px solid var(--verde-100); color: var(--verde-800); }
.kmz-listo p { margin: 0; }
/* Al crear (o crear de nuevo) el KMZ, el aviso destella una vez: el texto cambia poco y
   sin esto un segundo clic parece no haber hecho nada. */
.kmz-listo--nuevo { animation: kmz-destello 1.2s ease-out; }
@keyframes kmz-destello {
  from { background: var(--verde-100); border-color: var(--verde-700); box-shadow: 0 0 0 4px var(--verde-100); }
}
@media (prefers-reduced-motion: reduce) { .kmz-listo--nuevo { animation: none; } }
.kmz-reemplazo { margin: 0.5rem 0 1rem; padding-left: 1.1rem; font-family: var(--mono); font-size: 0.8125rem; }

.kmz-escena { display: grid; gap: 0.75rem; height: calc(100vh - 12rem); min-height: 30rem; }
.kmz-escena--doble { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.visor-plano, .kmz-mapa {
  position: relative; min-height: 0; overflow: hidden;
  background: var(--zinc-200); border: 1px solid var(--zinc-300); border-radius: var(--radio-lg);
}
.visor-plano canvas { display: block; touch-action: none; cursor: grab; }
.visor-plano canvas:active { cursor: grabbing; }
.visor-plano canvas:focus-visible { outline: 2px solid var(--marca-700); outline-offset: -3px; }
.visor-plano[data-herramienta="dibujo"] canvas, .visor-plano[data-herramienta="mascara"] canvas,
.visor-plano[data-herramienta="cuadro"] canvas, .visor-plano[data-herramienta="escala"] canvas,
.visor-plano[data-herramienta="numero"] canvas, .visor-plano[data-herramienta="esquinas"] canvas,
.visor-plano[data-modo="numerar"] canvas, .visor-plano[data-modo="ubicar"] canvas { cursor: crosshair; }
.visor-plano__herramientas, .visor-plano__zoom {
  position: absolute; top: 0.5rem; display: flex; gap: 0.25rem; padding: 0.25rem;
  background: rgb(255 255 255 / 0.92); border: 1px solid var(--zinc-200); border-radius: var(--radio-md); box-shadow: var(--sombra);
}
.visor-plano__herramientas { left: 0.5rem; flex-wrap: wrap; max-width: calc(100% - 9rem); }
.visor-plano__zoom { right: 0.5rem; }
.visor-plano__herramientas button, .visor-plano__zoom button {
  min-width: 2rem; height: 2rem; padding: 0 0.5rem; background: transparent; border: 0; border-radius: var(--radio-sm);
  font-size: 0.8125rem; font-weight: 500; color: var(--zinc-700);
}
.visor-plano__herramientas button:hover, .visor-plano__zoom button:hover { background: var(--zinc-100); }
.visor-plano__herramientas button[aria-pressed="true"] { background: var(--marca-800); color: #fff; }
.visor-plano:not([data-modo="marcar"]) .visor-plano__herramientas { display: none; }
/* Unir las hojas: el editor dibuja en su propio canvas, sobre el mismo visor. */
#kmz-union-lienzo { display: none; }
.visor-plano[data-modo="unir"] #kmz-lienzo { display: none; }
.visor-plano[data-modo="unir"] #kmz-union-lienzo { display: block; }
/* "¿En qué hoja está el cuadro?": abajo, como el aviso de atrasado, para no tapar las herramientas. */
.kmz-cuadro-hoja {
  position: absolute; left: 0.5rem; right: 0.5rem; bottom: 0.5rem; z-index: 4;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem;
  padding: 0.5rem 0.5rem 0.5rem 0.875rem; border-radius: var(--radio-md); box-shadow: var(--sombra-alta); font-size: 0.8125rem;
  background: #fff; border: 1px solid var(--zinc-300); color: var(--zinc-800);
}
.kmz-cuadro-hoja p { margin: 0; font-weight: 600; }
.kmz-cuadro-hoja .fila { gap: 0.375rem; }
.kmz-cuadro-hoja [data-accion="kmz-volver-union"] { margin-left: auto; }
/* La columna es minmax(0, 1fr) y el campo parte de ancho 0: así el ancho intrínseco del
   <input> (unos 20 caracteres) no estira la grilla y el campo y el OK quedan dentro. */
.kmz-numero {
  position: absolute; z-index: 5; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.35rem;
  width: 13rem; max-width: calc(100% - 1rem); padding: 0.625rem;
  background: #fff; border: 1px solid var(--zinc-300); border-radius: var(--radio-md); box-shadow: var(--sombra-alta);
  font-size: 0.75rem; font-weight: 600; color: var(--zinc-700);
}
.kmz-numero label { overflow-wrap: anywhere; }
.kmz-numero .fila { min-width: 0; }
.kmz-numero input { flex: 1 1 0; width: 0; min-width: 0; height: 2rem; padding: 0 0.5rem; border: 1px solid var(--zinc-300); border-radius: var(--radio-sm); font: 600 0.9375rem var(--sans); }
.kmz-numero .boton { flex-shrink: 0; }
.kmz-numero [data-accion="kmz-separar"] { justify-self: start; }
.kmz-numero input:focus { border-color: var(--marca-700); box-shadow: 0 0 0 3px var(--marca-anillo); outline: none; }
#kmz-mapa { position: absolute; inset: 0; }
/* Leaflet numera sus capas y botones con z-index de 400 a 1000, y la barra de arriba
   (sticky, z-index 10) y las secciones en celular (5) quedaban debajo del mapa al bajar.
   Con su propio contexto de apilamiento, esos números solo ordenan dentro del mapa.
   .kmz-mapa también, porque el giro sobre el mapa (z-index 1000) es hermano del mapa. */
.leaflet-container, .kmz-mapa { isolation: isolate; }
.kmz-etiqueta { padding: 0 0.35rem; font: 700 0.75rem/1.4 var(--sans); color: #1d4ed8; }
.kmz-etiqueta--mala { color: var(--rojo-700); }
.kmz-etiqueta--activa { color: #c2410c; }
.kmz-corregir { display: grid; gap: 0.5rem; margin-top: 0.75rem; }
/* El vértice que se arrastra: se toca en 32 px, se ve de 16, con borde para verse sobre el satélite. */
.kmz-vertice { cursor: grab; }
.kmz-vertice::after { content: ''; position: absolute; inset: 8px; box-sizing: border-box;
  border: 2px solid #1d4ed8; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgb(0 0 0 / 0.35); }
.kmz-vertice.leaflet-drag-target, .kmz-vertice:active { cursor: grabbing; }
.kmz-vertice.leaflet-drag-target::after, .kmz-vertice:active::after { background: #bfdbfe; }
.kmz-ficha { display: grid; gap: 0.15rem; font: 400 0.8125rem/1.4 var(--sans); }

@media (max-width: 70rem) {
  .kmz-cuerpo { grid-template-columns: minmax(0, 1fr); }
  /* Sin desplazamiento propio: así el pie se pega al borde de abajo de la pantalla mientras
     el panel está a la vista (con `overflow` el panel sería su contenedor y no se pegaría). */
  .kmz-panel { max-height: none; overflow: visible; }
  .kmz-panel__pie { bottom: 0; margin-bottom: -1.25rem; padding-bottom: calc(0.75rem + env(safe-area-inset-bottom)); box-shadow: 0 -6px 12px -10px rgb(0 0 0 / 0.25); }
  .kmz-escena { height: auto; min-height: 0; }
  .kmz-escena > * { height: 70vh; min-height: 22rem; }
  .kmz-escena--doble { grid-template-columns: minmax(0, 1fr); }
  .kmz-escena--doble > * { height: 55vh; }
}

/* --- Teléfono ------------------------------------------------------------------ */

@media (max-width: 40rem) {
  /* En el celular se puede, pero cuesta: lo dice, y solo la hoja elegida muestra sus controles. */
  .union-movil { display: block; }
  .union-hoja:not([aria-current="true"]) .union-hoja__controles { display: none; }
  /* En el teléfono la isla muestra solo los íconos (el nombre queda para lectores
     de pantalla) y el logotipo deja el «tu»: así cabe todo en 320 px. */
  .barra { grid-template-columns: auto minmax(0, 1fr) auto; height: 4rem; padding: 0 1rem; gap: 0.5rem; }
  .logotipo__tu { display: none; }
  .logotipo__nombre { font-size: 1.2rem; }
  .pestanas { justify-self: center; padding: 0.25rem; }
  .pestanas__pildora { top: 0.25rem; height: 2.5rem; }
  .pestanas a { height: 2.5rem; padding: 0 0.6rem; }
  .pestanas__texto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .pestanas .contador { position: absolute; top: -0.35rem; right: -0.2rem; }
  .avatar-anillo { width: 2.5rem; height: 2.5rem; }
  .avatar { width: 2.2rem; height: 2.2rem; }
  .lienzo { padding: 1.25rem 1rem 3rem; }
  .aviso--fijo { margin: 1rem 1rem -0.5rem; }
  .franja-trabajo, body.pantalla-ancha .franja-trabajo { width: auto; margin: 1rem 1rem 0; }
  .pantalla h1 { font-size: 1.5rem; }
  .editor { grid-template-columns: 1fr; }
  .previa { position: static; }
  #pantalla-disenos h1 { font-size: 2.25rem; }
  .letras { gap: 0.4rem; }
  .colores { gap: 0.375rem; }
  .muestra-color { width: 2rem; height: 2rem; }
  .numeros__opcion { padding: 0.75rem 0.5rem; }
  /* Cada grupo de las líneas en una columna, con los botones al ancho. */
  .lineas-grupo__campos { grid-template-columns: 1fr; }
  .estilos-lineas { gap: 0.4rem; }
  #pantalla-kmzs h1 { font-size: 2.25rem; }
  .formulario { padding: 1.25rem; }
  .renglon { grid-template-columns: 1fr; gap: 0.4rem; }
  .renglon__rotulo { padding-top: 0; }
  .heroe { min-height: 24rem; border-radius: 1.25rem; }
  .heroe__abajo { padding: 0 1.1rem 1.1rem; }
  /* Centrado sobre toda la portada, el aviso de "sin construir" queda debajo del nombre
     y los botones, que en el teléfono ocupan media altura: aquí va en su propio renglón. */
  .portada--vacia { position: static; order: 1; flex: 1; padding: 0.5rem 1.4rem 1.5rem; }
  .heroe__abajo { order: 2; }
  .pantalla .heroe h1 { font-size: 2.4rem; }
  .plano-detalle__acciones .boton { flex: 1 1 auto; justify-content: center; }
  .cifras__lista { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cifras__lista div:first-child { grid-column: 1 / -1; }
  .cifras__lista dd { font-size: 1.85rem; }
  /* Siguen siendo tres en fila: se achica el número y el rótulo puede partirse. */
  .cifras__semana { padding: 1.1rem; }
  .semana__cifras { gap: 0.75rem; }
  .semana__cifra dd { font-size: 1.6rem; }
  .semana__cifra dt { letter-spacing: 0.04em; }
  .grupo__campos { grid-template-columns: 1fr; }
  .fotos-color__cuadros { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ajustes__pie { left: 1rem; right: 1rem; transform: translateY(1.5rem); justify-content: space-between; }
  .ajustes--sucio .ajustes__pie { transform: none; }
  .heroe .volver, .heroe .pastilla { white-space: nowrap; }
}
/* Con seis pestañas, en la mayoría de los teléfonos el nombre no cabe al lado de la
   isla: queda el punto de la marca, y el nombre sigue para lectores de pantalla. */
@media (max-width: 28rem) {
  .barra { gap: 0.375rem; padding: 0 0.75rem; }
  .logotipo__nombre { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .logotipo__punto { width: 0.85rem; height: 0.85rem; }
  .pestanas a { padding: 0 0.5rem; }
}

@media (max-width: 60rem) {
  .plano-detalle__cuerpo, .cifras { grid-template-columns: 1fr; }
  .plano-detalle__lado { position: static; }
}
@media (min-width: 40.0625rem) and (max-width: 60rem) {
  .cifras__lista { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .heroe, .portada img, .publicar__estado--vivo::before, .medidor__arco { animation: none !important; }
  .previa__parcela { transition: none; }
  .boton--vidrio, .boton--claro, .tira, .tira__foto img, .ajustes__pie, .ajustes__guardado { transition: none; }
}

/* --- Páginas de cuenta: entrar, registrarse, recuperar la contraseña ------------- */

/* La página va partida: a la izquierda la escena, sobre tinta; a la derecha el
   formulario, sobre blanco. En el celular la escena queda como una franja arriba. */
.cuenta-pagina {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(24rem, 1fr);
  min-height: 100vh; min-height: 100dvh; background: #fff;
}

/* --- La escena ----------------------------------------------------------------- */

.escena {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; align-content: end; padding: 3rem;
  margin: 0.75rem; border-radius: 1.75rem; color: #fff;
  background:
    radial-gradient(ellipse 70% 55% at 55% 38%, rgb(34 197 94 / 0.14), transparent 70%),
    radial-gradient(ellipse 90% 70% at 50% 110%, rgb(59 130 246 / 0.12), transparent 70%),
    var(--zinc-950);
}
/* Un velo de abajo hacia arriba para que el texto se lea sobre el plano. */
.escena::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to top, var(--zinc-950) 18%, rgb(9 9 11 / 0.6) 42%, transparent 70%);
}
/* El suelo se ve en perspectiva, como desde el dron, y deriva despacio. */
.escena__suelo {
  position: absolute; z-index: -2; left: 52%; top: 36%; width: min(40rem, 115%); aspect-ratio: 1;
  transform: translate(-50%, -50%) perspective(1400px) rotateX(54deg) rotateZ(-32deg);
  animation: sobrevuelo 38s ease-in-out infinite alternate;
}
@keyframes sobrevuelo {
  to { transform: translate(-50%, -52%) perspective(1400px) rotateX(50deg) rotateZ(-22deg) scale(1.06); }
}
.escena__plano { display: block; width: 100%; height: 100%; overflow: visible; }
.escena__terreno { fill: rgb(255 255 255 / 0.03); stroke: rgb(255 255 255 / 0.1); }
.lote {
  fill: var(--color-lote); fill-opacity: 0; stroke: rgb(255 255 255 / 0.22); stroke-width: 1;
  animation: pintar 900ms var(--curva-salida) both; animation-delay: calc(500ms + var(--i) * 16ms);
}
.lote--d { --color-lote: var(--estado-disponible); }
.lote--r { --color-lote: var(--estado-reservado); }
.lote--v { --color-lote: var(--estado-vendido); }
@keyframes pintar { from { fill-opacity: 0; stroke-opacity: 0; } to { fill-opacity: 0.42; stroke-opacity: 1; } }
/* La pasada del dron: una banda de luz que cruza el loteo cada tanto. */
.escena__pasada { fill: url(#pasada); animation: pasada 7s ease-in-out infinite 3.2s; }
@keyframes pasada { from { transform: translateX(0); } 60%, to { transform: translateX(1080px); } }
.escena__pin { fill: #fff; }
.escena__onda {
  fill: none; stroke: #fff; stroke-width: 2; transform-box: fill-box; transform-origin: center;
  animation: onda 2.4s ease-out infinite 3s; opacity: 0;
}
@keyframes onda { from { transform: scale(0.3); opacity: 0.9; } to { transform: scale(2.2); opacity: 0; } }

/* La ficha de la parcela marcada, como la del visor, flotando sobre el plano. */
.escena__ficha {
  position: absolute; left: 50%; top: 26%; display: grid; gap: 0.2rem; min-width: 11.5rem;
  padding: 0.85rem 1rem; border-radius: 1rem; color: var(--zinc-900);
  background: rgb(255 255 255 / 0.94); backdrop-filter: blur(10px);
  box-shadow: 0 24px 48px -20px rgb(0 0 0 / 0.6);
  animation: asomar 800ms var(--curva-salida) both 2.6s, flotar 6s ease-in-out infinite 3.4s;
}
.escena__ficha strong { font: 700 0.9375rem/1.2 var(--sans); }
.escena__ficha span { display: flex; align-items: center; gap: 0.4rem; font-size: 0.75rem; color: var(--zinc-600); }
.escena__ficha b { font: 800 1.0625rem/1.2 var(--sans); letter-spacing: -0.01em; }
@keyframes flotar { 50% { transform: translateY(-8px); } }

.escena__texto { position: relative; display: grid; gap: 0.9rem; max-width: 30rem; }
.escena__texto .antetitulo { margin: 0; color: rgb(255 255 255 / 0.55); }
.escena__titulo { margin: 0; font: 800 clamp(2.25rem, 1.2rem + 2.4vw, 3.25rem)/1.02 var(--sans); letter-spacing: -0.04em; }
.escena__bajada { margin: 0; font-size: 1rem; color: rgb(255 255 255 / 0.68); }
.escena__leyenda { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.4rem 0 0; padding: 0; list-style: none; }
.escena__leyenda li {
  display: flex; align-items: center; gap: 0.45rem; padding: 0.4rem 0.75rem; border-radius: 999px;
  background: rgb(255 255 255 / 0.08); border: 1px solid rgb(255 255 255 / 0.1);
  font-size: 0.75rem; font-weight: 600; color: rgb(255 255 255 / 0.85);
}
.escena__texto > * { animation: asomar 800ms var(--curva-salida) both; }
.escena__texto > :nth-child(2) { animation-delay: 120ms; }
.escena__texto > :nth-child(3) { animation-delay: 220ms; }
.escena__texto > :nth-child(4) { animation-delay: 320ms; }

/* --- El formulario ---------------------------------------------------------------- */

.cuenta-lado { display: grid; grid-template-rows: auto 1fr auto; padding: 2.25rem 3rem; }
.cuenta-lado .logotipo { justify-self: start; }
.cuenta-lado__pie { margin: 0; font-size: 0.75rem; color: var(--zinc-400); }
.cuenta-lado__pie a { color: var(--zinc-500); text-underline-offset: 2px; }
/* El sello de Impulse AI va a la derecha, como en sus otras páginas (cierra.cl). En el
   celular, si no cabe al lado, baja a su línea. */
footer.cuenta-lado__pie { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; }
footer.cuenta-lado__pie p { margin: 0; }
.cuenta-lado__empresa { display: flex; align-items: center; gap: 0.5rem; }
.cuenta-lado__empresa a { display: inline-flex; }
.cuenta-lado__empresa img { display: block; height: 18px; width: auto; opacity: 0.7; transition: opacity 150ms; }
.cuenta-lado__empresa a:hover img, .cuenta-lado__empresa a:focus-visible img { opacity: 1; }
.entrada { align-self: center; justify-self: center; width: min(23rem, 100%); padding: 2rem 0; }
.entrada > * { animation: asomar 700ms var(--curva-salida) both; }
.entrada > :nth-child(2) { animation-delay: 80ms; }
.entrada > :nth-child(3) { animation-delay: 160ms; }
.entrada > :nth-child(4) { animation-delay: 240ms; }
.entrada > :nth-child(n+5) { animation-delay: 320ms; }
.entrada h1 { margin: 0 0 0.5rem; font: 800 2rem/1.08 var(--sans); letter-spacing: -0.035em; }
.entrada > p { margin: 0 0 1.75rem; font-size: 0.9375rem; color: var(--zinc-500); }
.entrada form { display: grid; gap: 1rem; }
.entrada .campo { gap: 0.45rem; }
.entrada .campo span { font-size: 0.6875rem; font-weight: 700; color: var(--zinc-600); }
.entrada .campo input {
  height: 3rem; padding: 0 0.95rem; border-color: var(--zinc-200); border-radius: 0.875rem;
  background: var(--zinc-50); font-size: 0.9375rem; font-weight: 500;
  transition: border-color 200ms, background 200ms, box-shadow 200ms;
}
.entrada .campo input:hover { border-color: var(--zinc-300); }
.entrada .campo input:focus { border-color: var(--zinc-900); background: #fff; box-shadow: 0 0 0 4px rgb(24 24 27 / 0.08); }
.entrada .boton {
  position: relative; overflow: hidden; width: 100%; height: 3rem; margin-top: 0.35rem;
  border-radius: 0.875rem; font-size: 0.9375rem; font-weight: 600;
  transition: transform 250ms var(--curva-salida), background 200ms, box-shadow 250ms;
}
.entrada .boton:hover { transform: translateY(-1px); box-shadow: 0 12px 24px -14px rgb(9 9 11 / 0.6); }
.entrada .boton:active { transform: translateY(0); }
/* El botón principal lleva el mismo brillo que Nuevo master: es por donde se entra. */
.entrada form .boton::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.2), transparent);
  transform: translateX(-120%); animation: brillo 3.6s ease-in-out infinite 1.6s;
}
/* El permiso al equipo de Tu Masterplan: texto largo al lado del check, que en
   celular se envuelve debajo de sí mismo y no del cuadro. Toda la fila se toca. */
.casilla-cuenta {
  display: flex; align-items: flex-start; gap: 0.7rem; padding: 0.8rem 0.95rem;
  border: 1px solid var(--zinc-200); border-radius: 0.875rem; background: var(--zinc-50);
  font-size: 0.8125rem; line-height: 1.45; color: var(--zinc-600); cursor: pointer;
  transition: border-color 200ms, background 200ms;
}
.casilla-cuenta:hover { border-color: var(--zinc-300); }
.casilla-cuenta:has(input:checked) { background: #fff; border-color: var(--zinc-300); color: var(--zinc-800); }
.casilla-cuenta input { flex: none; width: 1.125rem; height: 1.125rem; margin: 0.1rem 0 0; accent-color: var(--zinc-900); cursor: pointer; }
.casilla-cuenta input:focus-visible { outline: 2px solid var(--zinc-900); outline-offset: 2px; }
.entrada .aviso { margin: 0 0 1.25rem; border-radius: 0.75rem; }
.entrada .aviso--ok { background: var(--verde-50); border-color: var(--verde-100); color: var(--verde-800); }
.entrada__enlaces { display: grid; gap: 0.6rem; margin-top: 1.75rem; font-size: 0.8125rem; }
.entrada__enlaces a { color: var(--zinc-600); text-decoration: none; transition: color 150ms; }
.entrada__enlaces a:hover { color: var(--zinc-900); text-decoration: underline; text-underline-offset: 3px; }

/* Continuar con Google: botón blanco con la G, como pide su guía de marca. */
.boton--google { background: #fff; border-color: var(--zinc-300); color: var(--zinc-900); }
.boton--google:hover { background: var(--zinc-50); border-color: var(--zinc-400); }
.boton--google svg { width: 1.125rem; height: 1.125rem; }
.separador {
  display: flex; align-items: center; gap: 0.75rem; margin: 1.25rem 0;
  color: var(--zinc-400); font-size: 0.75rem;
}
.separador::before, .separador::after { content: ""; flex: 1; height: 1px; background: var(--zinc-200); }

/* La del master que ya no está: sin escena, la columna sola al centro. */
/* Con las dos clases, para que no la pise la regla del celular de más abajo. */
.cuenta-pagina.cuenta-pagina--sola { grid-template-columns: 1fr; grid-template-rows: 1fr; }
/* Tan ancha como el texto más el margen: el logotipo y el pie quedan alineados con él. */
.cuenta-pagina--sola .cuenta-lado { width: min(29rem, 100%); justify-self: center; }
/* El celular esconde el nombre del logotipo para que quepa la barra de la consola;
   acá no hay barra, y para el comprador el nombre es lo único que dice dónde está. */
.cuenta-pagina--sola .logotipo__tu { display: inline; }
.cuenta-pagina--sola .logotipo__nombre {
  position: static; width: auto; height: auto; overflow: visible; clip-path: none; font-size: 1.5rem;
}
.no-disponible__loteadora { margin-bottom: 0.9rem; line-height: 1.4; }

@media (max-width: 56rem) {
  .cuenta-pagina { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .escena { height: 13rem; padding: 1.5rem; margin: 0.5rem 0.5rem 0; border-radius: 1.5rem; }
  .escena__suelo { top: 55%; width: 34rem; }
  .escena__texto .antetitulo, .escena__bajada, .escena__leyenda, .escena__ficha { display: none; }
  .escena__titulo { font-size: 1.75rem; max-width: 14rem; }
  .cuenta-lado { padding: 1.5rem 1.25rem 1.25rem; }
  .entrada { padding: 1.75rem 0 2rem; }
  .entrada h1 { font-size: 1.75rem; }
}
@media (prefers-reduced-motion: reduce) {
  .escena__suelo, .escena__pasada, .escena__onda, .escena__ficha, .escena__texto > *, .entrada > *,
  .entrada form .boton::after { animation: none; }
  .lote { animation: none; fill-opacity: 0.42; }
}

/* Un campo que solo llenan los robots. Fuera de la vista y de la tabulación. */
.trampa { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.pie-cuenta { margin: 0; font-size: 0.8125rem; color: var(--zinc-500); text-align: center; }

/* --- Esqueletos (js/esqueleto.js) ----------------------------------------------------- */

/* Mientras llega una lista, su forma en gris con un brillo que la cruza. El brillo es
   el de "Nuevo master", más lento: es la misma casa. Sin movimiento, solo el gris. */
.esqueleto {
  position: relative; display: block; overflow: hidden; flex-shrink: 0;
  height: 0.75rem; border-radius: 999px; background: var(--zinc-200);
}
.esqueleto::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.6), transparent);
  transform: translateX(-100%); animation: esqueleto-brillo 1.6s ease-in-out infinite;
}
@keyframes esqueleto-brillo { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .esqueleto::after { animation: none; display: none; } }

.esqueleto--titulo { height: 1.125rem; }
.esqueleto--h1 { height: 2.25rem; border-radius: var(--radio-md); }
.esqueleto--chip { height: 1.5rem; }
.esqueleto--cifra { height: 2rem; border-radius: var(--radio-md); }
.esqueleto--boton { height: 2.25rem; border-radius: 0.75rem; }
.esqueleto--bloque { height: 4.5rem; border-radius: 1rem; }
.esqueleto--avatar { height: 2.5rem; border-radius: 50%; }
.esqueleto--miniatura { height: auto; aspect-ratio: 16 / 10; border-radius: 0; }
.esqueleto--panel { height: 14rem; border-radius: 1.375rem; }

/* Mis 360°: la tarjeta toma las alturas de la rejilla y deja el texto abajo, como la foto. */
.esqueleto-plano {
  display: flex; flex-direction: column; justify-content: flex-end; gap: 0.75rem;
  min-height: 15.5rem; padding: 1.5rem; border-radius: 1.375rem;
  background: var(--zinc-100); border: 1px solid var(--zinc-200);
}
.planos__item--destacada .esqueleto-plano { min-height: 32.25rem; }
.esqueleto-plano .esqueleto { background: var(--zinc-200); }
.esqueleto-plano .esqueleto--titulo { height: 1.75rem; border-radius: var(--radio-md); }

/* Mis KMZ y Mis diseños. */
.esqueleto-tarjeta {
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--zinc-200); border-radius: 1.375rem; background: #fff;
}
.esqueleto-tarjeta__pie { display: grid; gap: 0.6rem; padding: 1.1rem 1.25rem 1.35rem; }

/* Reservas y contactos. */
.esqueleto-fila {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1.5rem;
  padding: 1.25rem 1.5rem; background: #fff; border: 1px solid var(--zinc-200); border-radius: 1.375rem;
}
.esqueleto-fila__texto { display: grid; gap: 0.6rem; min-width: 0; }
.esqueleto-cifra { display: grid; gap: 0.6rem; align-content: start; }
.resumen-planos .esqueleto { background: rgb(255 255 255 / 0.14); }
.resumen-planos .esqueleto::after { background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.12), transparent); }

/* Configuración. */
.esqueleto-miembro { display: flex; align-items: center; gap: 0.85rem; padding: 0.6rem 0.25rem; }
.esqueleto-miembro .esqueleto-fila__texto { flex: 1; }
.esqueleto-actividad { display: grid; gap: 0.75rem; }

/* La pantalla genérica: antetítulo, título, guía y dos paneles. */
.esqueleto-pantalla { gap: 0.9rem; }
.esqueleto-pantalla > .esqueleto--chip { width: 8rem; }
.esqueleto-pantalla > .esqueleto--h1 { width: min(22rem, 70%); }
.esqueleto-pantalla > .esqueleto--linea { width: min(34rem, 90%); }
.esqueleto-pantalla__cuerpo { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.25rem; margin-top: 1rem; }

@media (max-width: 52rem) {
  .planos__item--destacada .esqueleto-plano { min-height: 20rem; }
  .esqueleto-plano { min-height: 16.5rem; }
  .esqueleto-fila { grid-template-columns: auto minmax(0, 1fr); }
  .esqueleto-fila > .esqueleto--boton { display: none; }
}
/* Sobre la portada del dron (tinta), el gris claro se vería como un agujero. */
.heroe .esqueleto { background: rgb(255 255 255 / 0.14); }
.heroe .esqueleto::after { background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.12), transparent); }
.heroe .esqueleto--h1 { height: 3.5rem; }
#perfil-email .esqueleto { margin-top: 0.5rem; }

/* Tu cupo se redujo: un master publicado por fila, con Despublicar a mano del pulgar. */
.cupo-reducido { display: grid; gap: 0.5rem; max-height: min(22rem, 50vh); margin: 0 0 1rem; padding: 0;
  list-style: none; overflow-y: auto; overscroll-behavior: contain; }
.cupo-reducido__master { display: flex; align-items: center; gap: 0.75rem; padding: 0.65rem 0.75rem 0.65rem 0.875rem;
  border: 1px solid var(--zinc-200); border-radius: var(--radio-md); }
.cupo-reducido__texto { display: grid; gap: 0.15rem; flex: 1; min-width: 0; }
.cupo-reducido__texto strong { font-size: 0.9375rem; overflow-wrap: anywhere; }
.cupo-reducido__texto a { justify-self: start; font-size: 0.8125rem; color: var(--zinc-600); }
.cupo-reducido__master .boton { flex: none; min-height: 2.75rem; }

/* --- Fotos de las referencias (fotos_referencias.js) ------------------------- */
.fotos-referencias__lista { display: grid; gap: 0.6rem; }
.foto-referencia {
  display: grid;
  grid-template-columns: minmax(6rem, 9rem) 1fr;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--zinc-200);
  border-radius: 12px;
  background: var(--zinc-50);
}
.foto-referencia__nombre { font: 600 0.8125rem var(--sans); color: var(--zinc-900); overflow-wrap: anywhere; }
.foto-referencia__tira { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.foto-referencia__miniatura { position: relative; margin: 0; width: 72px; height: 54px; }
.foto-referencia__miniatura img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; display: block; background: var(--zinc-200); }
.foto-referencia__quitar {
  position: absolute; top: -6px; right: -6px;
  width: 22px; height: 22px; padding: 0;
  border: 0; border-radius: 50%;
  background: var(--zinc-900); color: #fff;
  font: 600 14px/22px var(--sans); cursor: pointer;
  opacity: 0; transition: opacity 0.15s;
}
.foto-referencia__miniatura:hover .foto-referencia__quitar,
.foto-referencia__quitar:focus-visible { opacity: 1; }
@media (hover: none) { .foto-referencia__quitar { opacity: 1; } }
.foto-referencia__agregar {
  display: grid; place-items: center;
  height: 54px; padding: 0 0.9rem;
  border: 1px dashed var(--zinc-300); border-radius: 8px;
  font: 600 0.75rem var(--sans); color: var(--zinc-600);
  cursor: pointer; white-space: nowrap;
}
.foto-referencia__agregar:hover { border-color: var(--zinc-500); color: var(--zinc-900); }
.foto-referencia__agregar:focus-within { outline: 2px solid var(--zinc-900); outline-offset: 2px; }
.foto-referencia--subiendo { opacity: 0.6; pointer-events: none; }
.foto-referencia--subiendo .foto-referencia__agregar { font-size: 0; }
.foto-referencia--subiendo .foto-referencia__agregar::after { content: 'Subiendo…'; font-size: 0.75rem; }
@media (max-width: 40rem) {
  .foto-referencia { grid-template-columns: 1fr; }
}
/* Ordenar arrastrando (arrastrar_fotos.js). Solo las que traen data-foto se arrastran. */
.foto-referencia__miniatura[data-foto] { cursor: grab; user-select: none; -webkit-user-select: none; }
/* Mantener apretada la foto en el celular es para tomarla, no para el menú de guardar imagen. */
.foto-referencia__miniatura[data-foto] img,
.foto-referencia__miniatura[data-foto] a { -webkit-user-drag: none; -webkit-touch-callout: none; }
.foto-referencia__miniatura--arrastrada { display: none; }
.foto-referencia__miniatura--flotante {
  position: fixed; z-index: 1000; pointer-events: none;
  opacity: 0.7; cursor: grabbing; will-change: transform;
  box-shadow: 0 8px 20px rgb(0 0 0 / 0.25); border-radius: 8px;
}
.foto-referencia__miniatura--flotante .foto-referencia__quitar { display: none; }
.foto-referencia__hueco { flex: none; box-sizing: border-box; border: 1px dashed var(--zinc-300); border-radius: 8px; background: var(--zinc-100); }
.foto-referencia__tira--arrastrando, .foto-referencia__tira--arrastrando * { cursor: grabbing; }

/* --- Detalle del loteo por pestañas -------------------------------------------- */

/* La portada queda más baja: con las pestañas, lo importante está un paso más abajo. */
.plano-detalle .heroe { min-height: 19rem; }

.secciones {
  display: flex; gap: 0.25rem; width: max-content; max-width: 100%; padding: 0.3rem; overflow-x: auto;
  border-radius: 0.875rem; background: var(--zinc-100); scrollbar-width: none;
}
.secciones::-webkit-scrollbar { display: none; }
.secciones button {
  display: inline-flex; align-items: center; gap: 0.5rem; flex: none; height: 2.5rem; padding: 0 1rem;
  border: 0; border-radius: 0.625rem; background: none; color: var(--zinc-600); font-weight: 600; white-space: nowrap;
}
.secciones button:hover { color: var(--zinc-900); }
.secciones button[aria-current="page"] { background: #fff; color: var(--zinc-900); box-shadow: var(--sombra), 0 0 0 1px var(--zinc-200); }
.secciones svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.secciones__cuenta { min-width: 1.25rem; padding: 0 0.4rem; border-radius: 999px; background: var(--ambar-200); color: var(--ambar-800); font-size: 0.6875rem; line-height: 1.25rem; text-align: center; }

.ajustes .panel { display: grid; gap: 1rem; min-width: 0; }
.ajustes .panel .cifras, .ajustes .panel .estadisticas { min-width: 0; }
/* En la columna, el sol va bajo las cifras; las estadísticas van abajo, a todo el ancho. */
.ajustes .cifras { grid-template-columns: minmax(0, 1fr); }
.plano-detalle:not(.plano-detalle--en-resumen) #plano-estadisticas { display: none; }
.ajustes .campo .elegir-diseno span { font: inherit; letter-spacing: 0; text-transform: none; color: inherit; }
.ajustes .campo .elegir-diseno .elegir-diseno__marca { font: 800 0.8125rem/1 var(--sans); color: var(--zinc-900); }
.grupo__titulo small { line-height: 1.45; }
.aviso-panel { margin: 0; padding: 0.75rem 1rem; border: 1px solid var(--ambar-200); border-radius: 0.875rem; background: var(--ambar-50); color: var(--ambar-800); font-size: 0.8125rem; }
.grupo--peligro { border-color: var(--rojo-200); }
.grupo--peligro .aviso { margin: 0; }
.ajustes .campo span i { font-weight: 500; }

/* Diseño: tarjetas con la marca sobre la foto del loteo. */
.elegir-diseno { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: 0.75rem; }
.elegir-diseno__tarjeta {
  position: relative; display: grid; gap: 0.5rem; align-content: start; padding: 0.5rem 0.5rem 0.75rem;
  border: 1px solid var(--zinc-200); border-radius: 0.875rem; background: #fff; cursor: pointer; text-decoration: none; color: inherit;
}
.elegir-diseno__tarjeta:hover { border-color: var(--zinc-400); }
.elegir-diseno__tarjeta:has(input:checked) { border-color: var(--zinc-900); box-shadow: 0 0 0 1px var(--zinc-900); }
.elegir-diseno__tarjeta:has(input:focus-visible) { outline: 2px solid var(--zinc-900); outline-offset: 2px; }
.elegir-diseno__tarjeta input { position: absolute; opacity: 0; pointer-events: none; }
.elegir-diseno__muestra {
  position: relative; display: block; height: 4.5rem; border-radius: 0.6rem;
  background: linear-gradient(160deg, var(--zinc-300), var(--zinc-200)) center / cover;
}
.elegir-diseno__marca {
  position: absolute; left: 0.5rem; bottom: 0.5rem; display: grid; place-items: center; min-width: 1.6rem; height: 1.6rem; padding: 0 0.3rem;
  border-radius: 0.45rem; background: #fff; color: var(--zinc-900); font: 800 0.8125rem/1 var(--sans); box-shadow: 0 2px 6px rgb(0 0 0 / 0.25);
}
.elegir-diseno__marca img { max-height: 1.1rem; max-width: 3rem; object-fit: contain; }
.elegir-diseno__texto { display: grid; gap: 0.1rem; padding: 0 0.25rem; }
.elegir-diseno__tarjeta b { font-size: 0.8125rem; }
.elegir-diseno__tarjeta small { font-size: 0.75rem; color: var(--zinc-500); }
.elegir-diseno__tarjeta--nuevo { place-content: center; min-height: 7.5rem; border-style: dashed; text-align: center; color: var(--zinc-600); }

/* Al abrir el sitio: tres tarjetas con foto. */
.opciones-inicio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.opcion-inicio { position: relative; display: grid; grid-template-rows: auto 1fr; overflow: hidden; border: 1px solid var(--zinc-200); border-radius: 0.875rem; background: #fff; cursor: pointer; }
.opcion-inicio:hover { border-color: var(--zinc-400); }
.opcion-inicio:has(input:checked) { border-color: var(--zinc-900); box-shadow: 0 0 0 1px var(--zinc-900); }
.opcion-inicio:has(input:disabled) { opacity: 0.55; cursor: not-allowed; }
.opcion-inicio:has(input:focus-visible) { outline: 2px solid var(--zinc-900); outline-offset: 2px; }
.opcion-inicio input { position: absolute; top: 0.6rem; right: 0.6rem; z-index: 1; width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--zinc-900); }
.opcion-inicio__img { display: block; height: 5.25rem; background: linear-gradient(160deg, var(--zinc-300), var(--zinc-200)) center / cover; }
.opcion-inicio__img--aerea { background-position: 30% 70%; background-size: 220%; }
.opcion-inicio__img--plano { display: grid; place-items: center; background: var(--zinc-100); }
.opcion-inicio__img--plano svg { width: 70%; height: 80%; fill: none; stroke: var(--zinc-500); stroke-width: 1.4; }
.opcion-inicio__texto { display: grid; gap: 0.15rem; padding: 0.625rem 0.75rem 0.75rem; }
.opcion-inicio b { font-size: 0.8125rem; }
.opcion-inicio small { font-size: 0.75rem; line-height: 1.35; color: var(--zinc-500); }

/* Interruptores en vez de casillas: se lee como prendido / apagado. */
.interruptores { display: grid; }
.interruptor { display: flex; align-items: flex-start; gap: 0.875rem; padding: 0.875rem 0; border-top: 1px solid var(--zinc-100); cursor: pointer; }
.interruptores .interruptor:first-child { border-top: 0; padding-top: 0; }
.interruptores .interruptor:last-child { padding-bottom: 0; }
.vista-inicial .interruptor { padding-bottom: 0; }
.interruptor[hidden] { display: none; }
.interruptor__icono { display: grid; place-items: center; flex: none; width: 2.5rem; height: 2.5rem; border-radius: 0.7rem; background: var(--zinc-100); }
.interruptor__icono svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: var(--zinc-700); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.interruptor__texto { flex: 1; display: grid; gap: 0.1rem; font-size: 0.8125rem; color: var(--zinc-500); }
.interruptor__texto small { font-size: 0.8125rem; line-height: 1.45; }
.interruptor__texto b { color: var(--zinc-900); font-size: 0.875rem; font-weight: 600; }
.interruptor input {
  appearance: none; flex: none; position: relative; width: 2.5rem; height: 1.5rem; margin: 0.15rem 0 0; border-radius: 999px;
  background: var(--zinc-300); cursor: pointer; transition: background 200ms;
}
.interruptor input::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / 0.25); transition: transform 200ms var(--curva-salida);
}
.interruptor input:checked { background: var(--zinc-900); }
.interruptor input:checked::after { transform: translateX(16px); }

/* Vistas 360: una tarjeta por punto, con lo que muestra. */
.calce.grupo { padding: 1.4rem; }
.calce .calce__tiras { grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.calce .tira { display: grid; grid-template-rows: auto 1fr; }
.calce .tira:hover { transform: none; }
.calce .tira__foto { position: relative; }
.tira__rotulo {
  position: absolute; left: 0.6rem; top: 0.6rem; padding: 0.25rem 0.625rem; border-radius: 999px;
  background: rgb(9 9 11 / 0.55); backdrop-filter: blur(6px); color: #fff; font-size: 0.75rem; font-weight: 600;
}
.tira--oculto .tira__foto img, .tira--foto .tira__foto img { filter: saturate(0.4); }
.tira--oculto .tira__foto { background: repeating-linear-gradient(135deg, var(--zinc-100) 0 10px, var(--zinc-200) 10px 20px); }
.calce .tira__pie { align-content: start; gap: 0.625rem; }
.calce .tira__ajustar { margin: 0; }
.segmento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0.2rem; border-radius: 0.625rem; background: var(--zinc-100); }
.segmento label { position: relative; padding: 0.4rem 0.15rem; white-space: nowrap; border-radius: 0.5rem; color: var(--zinc-500); font-size: 0.6875rem; font-weight: 600; text-align: center; cursor: pointer; }
.segmento input { position: absolute; opacity: 0; pointer-events: none; }
.segmento label:has(input:checked) { background: #fff; color: var(--zinc-900); box-shadow: var(--sombra), 0 0 0 1px var(--zinc-200); }
.segmento label:has(input:focus-visible) { outline: 2px solid var(--zinc-900); outline-offset: 1px; }

/* Lugares en el horizonte: una fila por lugar. */
.lugares { display: grid; gap: 0.5rem; }
.lugar { display: flex; align-items: center; gap: 0.75rem; min-height: 3.25rem; padding: 0.5rem 0.5rem 0.5rem 0.75rem; border: 1px solid var(--zinc-200); border-radius: 0.875rem; }
.lugar__pin { display: grid; place-items: center; flex: none; width: 2rem; height: 2rem; border-radius: 0.6rem; background: var(--zinc-100); }
.lugar__pin svg { width: 1rem; height: 1rem; fill: none; stroke: var(--zinc-700); stroke-width: 1.8; }
.lugar__texto { flex: 1; display: grid; min-width: 0; }
.lugar__texto b { font-size: 0.875rem; overflow-wrap: anywhere; }
.lugar__texto small { font-size: 0.75rem; color: var(--zinc-500); }
.lugar--editando input { flex: 1; min-width: 0; height: 2.25rem; padding: 0 0.625rem; border: 1px solid var(--zinc-300); border-radius: 0.5rem; font-size: 0.875rem; }
.lugar__quitar { color: var(--zinc-500); }
.lugares__agregar { height: 2.75rem; border: 1px dashed var(--zinc-300); border-radius: 0.875rem; background: none; color: var(--zinc-600); font-weight: 600; }
.lugares__agregar:hover { border-color: var(--zinc-500); color: var(--zinc-900); }
/* Los caminos que Claude agregó o borró, bajo su interruptor: alineados con el texto del
   interruptor (ícono 2.5rem + hueco 0.875rem), y en celular a todo el ancho. */
.caminos-editados { display: grid; gap: 0.5rem; padding: 0 0 0.875rem 3.375rem; }
.caminos-editados[hidden] { display: none; }
.caminos-editados__titulo { font-size: 0.8125rem; }
.caminos-editados .nota { margin: 0; }
.camino-editado .lugar__pin svg { stroke-linecap: round; stroke-linejoin: round; }
.camino-editado .lugar__quitar { flex: none; }
@media (max-width: 40rem) {
  .caminos-editados { padding-left: 0; }
}
.fotos-referencias { display: grid; gap: 0.6rem; margin-top: 0.5rem; }
.fotos-referencias__titulo { font-size: 0.75rem; font-weight: 700; color: var(--zinc-600); }
.fotos-referencias__titulo i { font-style: normal; font-weight: 500; color: var(--zinc-400); }

/* Ventas: el inventario en dos pasos y Cierra como atajo. */
.inventario.grupo { gap: 0.875rem; }
.inventario__pasos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.inventario__paso { display: grid; gap: 0.4rem; align-content: start; padding: 0.875rem; border: 1px solid var(--zinc-200); border-radius: 0.875rem; }
.inventario__paso[hidden] { display: none; }
.inventario__paso b { font-size: 0.8125rem; }
.inventario__paso small { font-size: 0.75rem; color: var(--zinc-500); }
.inventario__paso .boton { justify-content: center; margin-top: 0.25rem; border-radius: 0.75rem; }
.inventario .inventario__cierra { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 0.5rem 0.75rem; padding: 0.75rem; border: 1px solid var(--zinc-200); border-top: 1px solid var(--zinc-200); border-radius: 0.875rem; }
.inventario__cierra-logo { display: block; flex: none; width: 2.25rem; height: 2.25rem; }
.inventario__cierra .inventario__acciones { grid-column: 1 / -1; }

/* Columna derecha: el sitio, lo que falta aplicar y lo que falta para vender. */
.plano-detalle__lado { display: grid; gap: 0.875rem; position: sticky; top: 6rem; }
.por-aplicar { display: grid; gap: 0.625rem; padding-top: 0.875rem; border-top: 1px solid var(--zinc-700); }
.por-aplicar__titulo { display: flex; justify-content: space-between; align-items: baseline; margin: 0; font-size: 0.8125rem; }
.por-aplicar__titulo small { color: var(--zinc-400); font-size: 0.75rem; }
.por-aplicar__lista { display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.por-aplicar__lista li { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; font-size: 0.8125rem; color: var(--zinc-200); }
.por-aplicar__ficha { flex: none; padding: 0.15rem 0.5rem; border-radius: 999px; background: var(--zinc-800); color: var(--zinc-300); font: 600 0.6875rem/1.4 var(--sans); }
.por-aplicar__ficha--construir { background: #422006; color: #fcd34d; }
.guardado { margin: 0; padding: 0 0.5rem; font-size: 0.75rem; color: var(--zinc-500); min-height: 1.1rem; }
.guardado--listo::before { content: '✓ '; color: var(--verde-700); font-weight: 800; }
.guardado--error { color: var(--rojo-700); }
/* El error de la dirección del link reemplaza la nota bajo el campo. */
.nota--error { color: var(--rojo-700); font-weight: 600; }
.listo { display: grid; gap: 0.25rem; padding: 1.1rem 1.25rem; border: 1px solid var(--zinc-200); border-radius: 1.375rem; background: #fff; }
.listo h2 { margin: 0 0 0.375rem; font: 700 0.9375rem/1.2 var(--sans); }
.listo ul { display: grid; gap: 0.15rem; margin: 0; padding: 0; list-style: none; }
.listo__paso { display: flex; align-items: center; gap: 0.625rem; min-height: 2rem; font-size: 0.8125rem; }
.listo__paso span { flex: 1; }
.listo__paso i {
  display: grid; place-items: center; flex: none; width: 1.25rem; height: 1.25rem; border-radius: 50%;
  border: 1px solid var(--ambar-200); background: var(--ambar-50); color: var(--ambar-800); font: 800 0.6875rem/1 var(--sans);
}
.listo__paso--hecho i { border-color: var(--verde-100); background: var(--verde-50); color: var(--verde-700); }
.listo__paso--hecho span { color: var(--zinc-500); }
.boton--ancho { width: 100%; justify-content: center; }

/* En el celular lo por aplicar queda a la mano, flotando abajo. */
.barra-aplicar { display: none; }
@media (max-width: 64rem) {
  .plano-detalle__lado { position: static; }
}
@media (max-width: 52rem) {
  .plano-detalle .heroe { min-height: 15rem; }
  .secciones { width: auto; margin: 0 -1rem; padding: 0.25rem 1rem; border-radius: 0; background: none; gap: 0.375rem; }
  .secciones button { height: 2.25rem; padding: 0 0.875rem; border: 1px solid var(--zinc-200); border-radius: 999px; background: #fff; }
  .secciones button[aria-current="page"] { background: var(--zinc-900); color: #fff; border-color: var(--zinc-900); box-shadow: none; }
  .secciones svg { display: none; }
  .opciones-inicio { grid-template-columns: minmax(0, 1fr); gap: 0.5rem; }
  .opcion-inicio { grid-template-columns: 5.5rem minmax(0, 1fr); grid-template-rows: none; }
  .opcion-inicio__img { height: auto; min-height: 4.5rem; }
  .inventario__pasos { grid-template-columns: minmax(0, 1fr); }
  .elegir-diseno { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plano-detalle .barra-aplicar:not([hidden]) {
    position: fixed; left: 0.75rem; right: 0.75rem; bottom: calc(0.75rem + env(safe-area-inset-bottom)); z-index: 15;
    display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 0.75rem 0.75rem 1rem; border-radius: 1.125rem;
    background: var(--zinc-900); color: #fff; box-shadow: 0 18px 40px -14px rgb(9 9 11 / 0.6);
  }
  .barra-aplicar span { flex: 1; display: grid; min-width: 0; }
  .barra-aplicar b { font-size: 0.875rem; }
  .barra-aplicar small { font-size: 0.75rem; color: var(--zinc-400); }
  .plano-detalle:has(.barra-aplicar:not([hidden])) { padding-bottom: 5rem; }
}


/* --- Amenities (amenities.js): tarjetas como las de los lugares y un editor en la sección. */
.amenities.grupo { gap: 0.75rem; }
.amenity__icono svg, .amenity-icono svg { fill: none; stroke: var(--zinc-800); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.amenity__icono svg { width: 1.15rem; height: 1.15rem; }
.amenity-editor { display: grid; gap: 1rem; padding: 1rem; border: 1px solid var(--zinc-300); border-radius: 0.875rem; background: var(--zinc-50); }
.amenity-editor__titulo { font-size: 0.9375rem; }
/* Como .campo, pero sin su regla para todo span: adentro hay un mapa y botones con texto. */
.amenity-campo { display: grid; gap: 0.3rem; }
.amenity-campo__rotulo { font: 600 0.625rem/1 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--zinc-500); }
.amenity-iconos { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.25rem, 1fr)); gap: 0.5rem; }
.amenity-icono {
  display: grid; justify-items: center; gap: 0.35rem; padding: 0.7rem 0.4rem 0.6rem;
  border: 1px solid var(--zinc-200); border-radius: 0.75rem; background: #fff;
  font-size: 0.75rem; font-weight: 600; color: var(--zinc-600); line-height: 1.2; text-align: center;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.amenity-icono svg { width: 1.5rem; height: 1.5rem; }
.amenity-icono:hover { border-color: var(--zinc-400); color: var(--zinc-900); }
.amenity-icono[aria-checked="true"] { border-color: var(--zinc-900); color: var(--zinc-900); box-shadow: 0 0 0 1px var(--zinc-900); }
.amenity-icono[aria-checked="true"] svg { stroke: var(--zinc-900); stroke-width: 1.8; }
.amenity-editor__ubicacion { gap: 0.45rem; }
.amenity-mapa { height: 20rem; border-radius: 0.75rem; overflow: hidden; background: var(--zinc-200); cursor: crosshair; }
.amenity-mapa .leaflet-container, .amenity-mapa.leaflet-container { cursor: crosshair; }
.amenity-editor .nota { margin: 0; }
.amenity-editor__nota--error { color: var(--rojo-700); font-weight: 600; }
.amenity-editor__pegar { display: grid; gap: 0.3rem; }
.amenity-editor__pegar i { font-style: normal; font-size: 0.75rem; color: var(--zinc-500); }
.amenity-editor__pegar input {
  height: 2.5rem; padding: 0 0.75rem; border: 1px solid var(--zinc-300); border-radius: 0.625rem; background: #fff;
  font-variant-numeric: tabular-nums;
}
.amenity-editor__pegar input:focus { outline: none; border-color: var(--marca-700); box-shadow: 0 0 0 3px var(--marca-anillo); }
.amenity-editor input[aria-invalid="true"] { border-color: var(--rojo-700); }
.amenity-editor__error { margin: 0; padding: 0.6rem 0.75rem; border: 1px solid var(--rojo-200); border-radius: 0.625rem; background: var(--rojo-50); color: var(--rojo-700); font-size: 0.8125rem; font-weight: 600; }
.amenity-editor__acciones { display: flex; gap: 0.5rem; }
.amenity-campo__rotulo i { font-style: normal; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--zinc-400); }
/* Los lugares del horizonte: el nombre con su botón Buscar al lado. */
.amenity-editor__buscar { display: flex; align-items: end; gap: 0.5rem; }
.amenity-editor__buscar .campo { flex: 1; min-width: 0; }
.amenity-editor__buscar .boton { flex: none; }
.amenity-icono--ninguno svg { stroke: var(--zinc-400); }
/* Uno de antes que el geocodificador no encuentra: hay que ubicarlo. */
.amenity--sin-ubicar small { color: var(--rojo-700); font-weight: 600; }
@media (max-width: 40rem) {
  .amenity-editor { padding: 0.875rem; }
  /* El mapa a todo el ancho de la tarjeta: es donde se toca, y el dedo necesita lugar. */
  .amenity-mapa { height: 18rem; margin-inline: -0.875rem; border-radius: 0; }
  .amenity-iconos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* "Estacionamiento" no cabe entero en un tercio del ancho: letra más chica y, si igual no, se parte. */
  .amenity-icono { padding-inline: 0.25rem; font-size: 0.6875rem; overflow-wrap: anywhere; hyphens: auto; }
  .amenity-editor__acciones .boton { flex: 1; }
}
/* La barra "Por aplicar" flota abajo en el celular (ver .barra-aplicar): al abrir el
   editor, o al saltar a un campo, el navegador lo deja con Guardar y Cancelar encima de
   ella. El margen hace que esos desplazamientos los dejen por sobre la barra. */
@media (max-width: 52rem) {
  .plano-detalle:has(.barra-aplicar:not([hidden])) :is(.amenity-editor, .amenity-editor :is(input, button, label)) {
    scroll-margin-bottom: 6rem;
  }
}

/* --- Fotos y videos de las parcelas (material.js): la lista a la izquierda y lo de la
   elegida a la derecha; en el celular, una debajo de la otra. */
.material.grupo { gap: 0.75rem; }
.material .nota { margin: 0; }
.material__cuerpo { display: grid; grid-template-columns: minmax(11rem, 15rem) minmax(0, 1fr); gap: 1rem; align-items: start; }
.material__cuerpo[hidden] { display: none; }
.material__lista { display: grid; gap: 0.5rem; min-width: 0; }
.material .material__buscar { margin: 0; }
/* Un loteo grande tiene cientos: la lista se recorre por dentro y lo elegido queda a la vista. */
.material__parcelas { display: grid; gap: 0.375rem; max-height: 24rem; overflow-y: auto; overscroll-behavior: contain; padding: 0.125rem; }
.material__parcela { display: flex; align-items: center; gap: 0.625rem; min-height: 2.75rem; padding: 0.375rem 0.625rem; border: 1px solid var(--zinc-200); border-radius: 0.75rem; cursor: pointer; }
.material__parcela:hover { border-color: var(--zinc-400); }
.material__parcela input { flex: none; width: 1rem; height: 1rem; margin: 0; accent-color: var(--zinc-900); }
.material__parcela--elegida { border-color: var(--zinc-900); background: var(--zinc-50); }
.material__parcela .lugar__texto b { font-size: 0.8125rem; }
.material__detalle { display: grid; gap: 0.75rem; min-width: 0; padding: 1rem; border: 1px solid var(--zinc-200); border-radius: 0.875rem; background: var(--zinc-50); }
/* minmax(0, 1fr): sin esto el nombre largo de un PDF (que no corta línea) ensancha la
   columna y la fila del PDF y el link de YouTube se salen del recuadro. */
.material__detalle, .material__elegida, .material__pdfs { grid-template-columns: minmax(0, 1fr); }
.material__elegida { display: grid; gap: 0.75rem; }
.material__elegida[hidden] { display: none; }
.material__cabeza { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; min-height: 2rem; }
.material__titulo { font-size: 0.9375rem; }
.material__miniatura-video::after {
  content: '▶'; position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
  color: #fff; font-size: 0.875rem; text-shadow: 0 1px 4px rgb(0 0 0 / 0.6);
}
.material__miniaturas[hidden], .material__pdfs[hidden] { display: none; }
.material__pdfs { display: grid; gap: 0.375rem; margin: 0; padding: 0; list-style: none; }
.material__pdf { display: flex; align-items: center; gap: 0.5rem; min-height: 2.25rem; padding: 0 0.25rem 0 0.75rem; border: 1px solid var(--zinc-200); border-radius: 0.625rem; background: #fff; }
.material__pdf a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.8125rem; font-weight: 600; color: var(--zinc-900); }
.material__pdf small { font-size: 0.6875rem; font-weight: 700; color: var(--zinc-500); }
.material__acciones, .material__video { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.material__video input {
  flex: 1 1 8rem; min-width: 0; height: 2rem; padding: 0 0.625rem;
  border: 1px solid var(--zinc-300); border-radius: 0.5rem; background: #fff; font-size: 0.8125rem;
}
.material__video input:focus { outline: none; border-color: var(--marca-700); box-shadow: 0 0 0 3px var(--marca-anillo); }
.material__video input[aria-invalid="true"] { border-color: var(--rojo-700); }
.material__video input:disabled { background: var(--zinc-100); }
.material .material__error { margin: 0; }
.material .nota--aviso { font-size: 0.75rem; }
@media (max-width: 40rem) {
  .material__cuerpo { grid-template-columns: minmax(0, 1fr); }
  .material__parcelas { max-height: 16rem; }
  .material__detalle { padding: 0.875rem; }
  .material__acciones .boton { flex: 1; }
}
