/* Auctico · Visual V4 (UI-0). Especificación: docs/visual-v4/html (desktop) y docs/visual-v4/mobile.
   Solo la cargan las carcasas de templates/v4/. Espacio propio (--v4-*, .v4-*): no comparte
   nombres con static/auctico.css, que sigue sirviendo la interfaz actual y la landing.
   Cortes: ≤480 móvil · 481-1023 tableta (una columna) · ≥1024 escritorio. */

:root {
  --v4-ink: #1D1D1F; --v4-ink2: #3A3A3C; --v4-gray: #6E6E73; --v4-gray2: #86868B;
  --v4-bg: #F5F5F7; --v4-card: #FFFFFF; --v4-line: #E5E5EA; --v4-line2: #F0F0F2; --v4-line3: #F5F5F7;
  --v4-ctl: #D2D2D7; --v4-soft: #F0F0F2; --v4-blue: #0071E3; --v4-link: #0066CC; --v4-link-press: #004C99;
  --v4-blue-soft: #EAF2FD; --v4-sel-bg: #F5F9FF;
  --v4-amber-ink: #8A4B00; --v4-amber-bg: #FFF6EA; --v4-amber-txt: #A15C00; --v4-amber-dot: #B26B00;
  --v4-red: #A8261B; --v4-red-bg: #FDF3F2; --v4-red-line: #F3C9C5;
  --v4-r-card: 16px; --v4-r-ctl: 12px;
  --v4-top-h: 56px;
}

/* ---------- Base ---------- */
/* Reglas base con especificidad cero (:where) para que cualquier componente .v4-* las sobrescriba. */
:where(.v4) *, :where(.v4) *::before, :where(.v4) *::after { box-sizing: border-box; }
html.v4 { -webkit-text-size-adjust: 100%; }
:where(.v4) body { margin: 0; background: var(--v4-bg); color: var(--v4-ink); font: 400 15px/1.45 Inter, -apple-system, system-ui, sans-serif; font-variant-numeric: tabular-nums; }
:where(.v4) a { color: var(--v4-link); text-decoration: none; }
:where(.v4) a:hover { color: var(--v4-link-press); }
:where(.v4) img { display: block; max-width: 100%; }
:where(.v4) :is(button, input, select, textarea) { font: inherit; color: inherit; }
:where(.v4) :focus-visible { outline: 2px solid var(--v4-blue); outline-offset: 2px; }
.v4-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.v4-n { white-space: nowrap; }

/* ---------- Cabecera ---------- */
.v4-top { position: sticky; top: 0; z-index: 30; background: var(--v4-card); border-bottom: 1px solid var(--v4-line); }
.v4-top-in { height: var(--v4-top-h); display: flex; align-items: center; gap: 2px; padding: 0 4px 0 16px; }
.v4-logo { display: flex; align-items: center; gap: 6px; min-height: 44px; color: var(--v4-ink); }
.v4-logo:hover { color: var(--v4-ink); }
.v4-logo b { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
.v4-logo i { font-style: normal; color: var(--v4-blue); font-size: 25px; font-weight: 700; line-height: 0; }
.v4-nav { display: none; }
.v4-search { display: none; }
.v4-sp { flex: 1; }
.v4-ib { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: none; border-radius: var(--v4-r-ctl); color: var(--v4-ink); cursor: pointer; }
.v4-av { width: 32px; height: 32px; border-radius: 50%; background: var(--v4-soft); font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; color: var(--v4-ink); }
.v4-tlink { display: none; align-items: center; gap: 7px; min-height: 44px; font-size: 14px; color: var(--v4-ink); }
.v4-tlink:hover { color: var(--v4-ink); }
.v4-cnt { background: var(--v4-blue-soft); color: var(--v4-blue); font-size: 12px; font-weight: 600; border-radius: 999px; padding: 1px 7px; }
.v4-entrar { display: inline-flex; align-items: center; height: 44px; padding: 0 14px; border-radius: var(--v4-r-ctl); font-size: 15px; font-weight: 600; color: var(--v4-link); }

@media (min-width: 1024px) {
  .v4-top-in { height: 64px; gap: 28px; padding: 0 28px; }
  .v4-logo b { font-size: 24px; }
  .v4-logo i { font-size: 28px; }
  .v4-nav { display: flex; gap: 28px; height: 64px; font-size: 15px; }
  .v4-nav a { display: flex; align-items: center; color: var(--v4-gray); }
  .v4-nav a[aria-current="page"] { color: var(--v4-ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--v4-blue); }
  .v4-search { display: flex; flex: 1; max-width: 440px; align-items: center; gap: 10px; background: var(--v4-bg); border-radius: 10px; padding: 0 14px; height: 44px; }
  .v4-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 14px; }
  .v4-tlink { display: inline-flex; }
  .v4-only-compact { display: none !important; }
  .v4-search { min-width: 0; }
}
/* Escritorio estrecho: la cabecera con sesión no cabía a 1024 (desbordaba ~85 px) */
@media (min-width: 1024px) and (max-width: 1199px) {
  .v4-top-in { gap: 16px; padding: 0 16px; }
  .v4-nav { gap: 18px; }
}

/* ---------- Capas abiertas con :target (sin JS) y mejoradas por ui.js ---------- */
.v4-ov { display: none; position: fixed; inset: 0; z-index: 60; background: rgba(29,29,31,0.32); }
.v4-ov:target, .v4-ov.is-open { display: block; }
.v4-menu { background: var(--v4-card); border-radius: 0 0 var(--v4-r-card) var(--v4-r-card); padding: 0 4px 12px; max-width: 520px; margin-left: auto; }
.v4-menu-h { height: var(--v4-top-h); display: flex; align-items: center; justify-content: space-between; padding-left: 12px; border-bottom: 1px solid var(--v4-line); margin-bottom: 6px; }
.v4-mi { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 12px; border-radius: 10px; color: var(--v4-ink); font-size: 16px; }
.v4-mi:hover { color: var(--v4-ink); background: var(--v4-bg); }
.v4-mi[aria-current="page"] { background: var(--v4-blue-soft); color: var(--v4-blue); font-weight: 600; }
.v4-menu hr { border: 0; border-top: 1px solid var(--v4-line2); margin: 6px 12px; }

/* ---------- Página ---------- */
.v4-main { padding: 16px 16px 32px; }
@media (min-width: 1024px) { .v4-main { max-width: 1360px; margin: 0 auto; padding: 18px 28px 64px; } }
.v4-crumb { font-size: 13px; color: var(--v4-gray); margin-bottom: 12px; }
.v4-crumb a { color: var(--v4-gray); }
.v4-h1 { font-size: 26px; line-height: 1.15; font-weight: 600; letter-spacing: -0.025em; margin: 4px 0 8px; }
@media (min-width: 1024px) { .v4-h1 { font-size: 34px; } }
.v4-lead { font-size: 15px; color: var(--v4-gray); margin: 0 0 16px; }

/* ---------- Componentes ---------- */
.v4-card { background: var(--v4-card); border: 1px solid var(--v4-line); border-radius: var(--v4-r-card); }
.v4-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 16px; border: 0; border-radius: var(--v4-r-ctl); background: var(--v4-soft); color: var(--v4-ink); font-size: 15px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.v4-btn:hover { color: var(--v4-ink); }
.v4-btn.v4-pri { background: var(--v4-blue); color: #FFFFFF; font-weight: 600; }
.v4-btn.v4-pri:hover { color: #FFFFFF; filter: brightness(0.95); }
.v4-btn.v4-sec { background: var(--v4-card); border: 1px solid var(--v4-ctl); }
.v4-btn.v4-full { display: flex; width: 100%; }
.v4-aviso { font-size: 13px; line-height: 1.5; border-radius: 10px; padding: 10px 12px; }
.v4-aviso.v4-ambar { color: var(--v4-amber-ink); background: var(--v4-amber-bg); }
.v4-aviso.v4-rojo { color: var(--v4-ink2); background: var(--v4-red-bg); border: 1px solid var(--v4-red-line); }
.v4-aviso.v4-info { color: var(--v4-ink2); background: var(--v4-bg); }
.v4-estado { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; }
.v4-estado b { font-weight: 600; }
.v4-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--v4-blue); flex: none; }
.v4-dot.v4-ring { background: none; border: 2px solid var(--v4-gray); }
.v4-dot.v4-susp { background: var(--v4-amber-dot); }
.v4-dot.v4-gris { background: var(--v4-gray2); }
.v4-estado .v4-susp-t { color: var(--v4-amber-ink); }
.v4-imp { font-weight: 600; white-space: nowrap; }
.v4-publicado { color: var(--v4-gray2); font-size: 14px; }
.v4-chip { display: inline-flex; align-items: center; background: #FFFFFF; color: var(--v4-ink); font-size: 12px; font-weight: 500; padding: 4px 9px; border-radius: 999px; }
.v4-chip.v4-oscuro { background: rgba(29,29,31,0.72); color: #FFFFFF; font-weight: 400; }
.v4-kv > div { padding: 10px 0; border-top: 1px solid var(--v4-line3); }
.v4-kv > div:first-child { border-top: 0; padding-top: 0; }
.v4-kv .v4-k { display: block; font-size: 13px; color: var(--v4-gray); margin-bottom: 2px; }
.v4-kv .v4-v { font-size: 15px; }
.v4-kv .v4-x { font-size: 12px; color: var(--v4-gray2); margin-top: 2px; }
.v4-sec-h h2 { font-size: 17px; font-weight: 600; margin: 0; }
.v4-src { font-size: 12px; color: var(--v4-gray2); margin-top: 2px; }
.v4-src.v4-me { color: var(--v4-blue); }

/* Barra de acciones fija (fichas): sticky al final del documento, respeta safe-area */
.v4-bar { position: sticky; bottom: 0; z-index: 40; display: grid; grid-template-columns: 1.15fr 1fr 1.2fr; gap: 8px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: #FFFFFF; border-top: 1px solid var(--v4-line); }
@media (min-width: 1024px) { .v4-bar { display: none; } }

/* Hoja inferior / pantalla completa (filtros, nueva alerta) */
.v4-sheet { position: absolute; inset: 0; background: var(--v4-card); display: flex; flex-direction: column; }
.v4-sheet-h { flex: none; height: var(--v4-top-h); display: flex; align-items: center; justify-content: space-between; padding: 0 4px 0 16px; border-bottom: 1px solid var(--v4-line); }
.v4-sheet-b { flex: 1; overflow-y: auto; padding: 4px 16px 24px; }
.v4-sheet-f { flex: none; display: flex; gap: 8px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--v4-line); }

/* ---------- Formularios ---------- */
.v4-field { display: block; margin-bottom: 14px; }
.v4-label { display: block; font-size: 13px; color: var(--v4-gray); margin-bottom: 6px; }
.v4-input { display: block; width: 100%; height: 46px; padding: 0 12px; border: 1px solid var(--v4-ctl); border-radius: var(--v4-r-ctl); background: #FFFFFF; font-size: 16px; color: var(--v4-ink); }
.v4-input:focus { border-color: var(--v4-blue); outline: none; box-shadow: 0 0 0 3px var(--v4-blue-soft); }

/* ---------- Carcasa de acceso ---------- */
.v4-auth { max-width: 420px; margin: 0 auto; padding: 24px 16px 40px; }
.v4-auth .v4-h1 { text-align: center; font-size: 26px; }
.v4-auth .v4-lead { text-align: center; }
.v4-auth form.v4-card { padding: 22px; }
.v4-auth .v4-alt { text-align: center; margin-top: 16px; font-size: 14px; color: var(--v4-gray); }
.v4-auth .v4-alt a { font-weight: 600; }
.v4-auth .v4-aviso { margin-bottom: 14px; }
.v4-top.v4-top-auth .v4-top-in { gap: 8px; }
.v4-volver { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; font-size: 14px; font-weight: 500; }

/* ---------- Carcasa pública: texto largo (guías, glosario, legal) ---------- */
.v4-prose-wrap { max-width: 820px; }
.v4-prose-nav { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.v4-prose { padding: 22px; line-height: 1.7; font-size: 15px; }
@media (max-width: 480px) { .v4-prose { padding: 18px 16px; } }
/* El HTML de las guías y los legales sale de app/contenido.py y app/legal.py con nombres de la
   interfaz actual (var(--blue), .pill.pri, .nota, .fac-*). Se les da equivalente V4 solo aquí dentro. */
.v4-prose { --blue: var(--v4-link); --blue-soft: var(--v4-blue-soft); --gray: var(--v4-gray); --line: var(--v4-line); --ink: var(--v4-ink); --ink2: var(--v4-ink2); }
.v4-prose h2 { font-size: 17px; margin: 22px 0 6px; }
.v4-prose h3 { font-size: 15px; margin: 16px 0 4px; }
.v4-prose p { margin: 9px 0; }
.v4-prose ul, .v4-prose ol { padding-left: 20px; margin: 8px 0; }
.v4-prose li { margin: 4px 0; }
.v4-prose table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; display: block; overflow-x: auto; }
.v4-prose th, .v4-prose td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--v4-line); vertical-align: top; }
.v4-prose thead th { background: var(--v4-blue-soft); font-weight: 600; }
@media (max-width: 480px) {   /* con fuentes del sistema, las tablas de 3 columnas no cabían a 375-390 px */
  .v4-prose table { font-size: 13px; }
  .v4-prose th, .v4-prose td { padding: 7px 8px; overflow-wrap: anywhere; }
}
.v4-prose .nota { font-size: 13px; color: var(--v4-gray); margin-top: 16px; border-top: 1px solid var(--v4-line); padding-top: 12px; }
.v4-prose .pill.pri { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: var(--v4-r-ctl); background: var(--v4-blue); color: #FFFFFF; font-weight: 600; font-size: 15px; margin: 4px 0; }
.v4-prose .pill.pri:hover { color: #FFFFFF; filter: brightness(0.95); }
.v4-prose .g-rel ul, .v4-prose .guias-idx { list-style: none; padding: 0; }
.v4-prose .g-silo-desc, .v4-prose .guias-idx .g-res { color: var(--v4-gray); font-size: 13.5px; margin: 3px 0 8px; }
.v4-prose .guias-idx li { margin: 0 0 14px; padding-bottom: 14px; border-bottom: 1px solid var(--v4-line); }
.v4-prose .guias-idx a { font-size: 16px; }
.v4-prose .glosario dt { font-weight: 600; margin-top: 14px; }
.v4-prose .glosario dd { margin: 2px 0 0; color: var(--v4-ink2); }
.v4-prose img { height: auto; }
.v4-prose pre, .v4-prose code { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- Pie ---------- */
.v4-foot { border-top: 1px solid var(--v4-line); margin-top: 28px; padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); font-size: 13px; color: var(--v4-gray); line-height: 2; }
@media (min-width: 1024px) { .v4-foot { max-width: 1360px; margin: 28px auto 0; padding: 16px 28px 32px; } }
.v4-foot a { color: var(--v4-gray); display: inline-block; min-height: 24px; }
.v4-foot a:hover { color: var(--v4-ink); }

/* =====================================================================================
   UI-1 · Listado + filtros + mapa. Fuente: docs/visual-v4/html/1_listado.html (desktop)
   y docs/visual-v4/mobile/1_listado_mobile.html. Cortes: <1024 hoja de filtros y tarjeta
   vertical; ≥1024 barra lateral y tarjeta horizontal; ≥1280 además el mapa al lado.
   ===================================================================================== */
@media (max-width: 1023px) { .v4-solo-desk { display: none !important; } }
@media (min-width: 1024px) { .v4-solo-hoja { display: none !important; } }
.v4-sp { flex: 1; }
.v4-mute { color: var(--v4-gray2); }
.v4-h2s { font-size: 17px; font-weight: 600; margin: 22px 0 10px; }
.v4-muns { display: flex; gap: 8px; flex-wrap: wrap; }
.v4-atrib { font-size: 12px; color: var(--v4-gray); margin: 18px 0 8px; }
.v4-atrib a { color: var(--v4-gray); text-decoration: underline; }
.v4-vacio { padding: 24px; text-align: center; color: var(--v4-ink2); }
.v4-vacio p { margin: 6px 0; }
.v4-link-btn { display: block; width: 100%; margin: 14px 0 0; padding: 0; border: 0; background: none; color: var(--v4-link); font-size: 14px; font-weight: 500; text-align: center; cursor: pointer; min-height: 32px; }
.v4-fnota { font-size: 13px; color: var(--v4-gray); margin: 12px 0 0; text-align: center; }
.v4-foot-link { margin-top: 8px; }
.v4-foot-link .v4-link-btn { font-size: 15px; min-height: 44px; }

/* ---------- Composición ---------- */
.v4-ls-res { min-width: 0; }
.v4-ls-map { display: none; }
@media (min-width: 1024px) {
  .v4-main.v4-ls-main { max-width: none; padding: 22px 22px 40px; }
  .v4-ls { display: flex; gap: 22px; align-items: flex-start; }
  .v4-ls-res { flex: 1 1 0; }
}
/* Barra lateral de filtros plegable (≥1024; por debajo ya es una hoja que se abre y se cierra) */
.v4-ftog[aria-expanded="true"] { background: var(--v4-bg); }
@media (min-width: 1024px) {
  .v4-ls.v4-fcol .v4-filtros { display: none; }
}
/* Vista mapa en escritorio y tableta horizontal (≥1024): listado compacto a la izquierda y mapa
   amplio a la derecha, ambos a la altura de la ventana. La vista lista no lleva mapa. */
@media (min-width: 1024px) {
  .v4-vista-mapa { height: calc(100vh - var(--v4-top-h) - 44px); height: calc(100dvh - var(--v4-top-h) - 44px); min-height: 520px; align-items: stretch; }
  .v4-vista-mapa .v4-filtros { overflow-y: auto; }
  .v4-vista-mapa .v4-ls-res { flex: 0 0 384px; overflow-y: auto; padding: 0 6px 12px 0; scrollbar-gutter: stable; }
  .v4-vista-mapa .v4-ls-map { display: flex; flex-direction: column; gap: 8px; flex: 1 1 0; min-width: 0; }
  .v4-vista-mapa .v4-map-c { flex: 1; min-height: 0; }
  .v4-vista-mapa .v4-map-nota { margin: 0; font-size: 12px; }
  .v4-vista-mapa .v4-h1l { font-size: 22px; }
  .v4-vista-mapa .v4-ls-lead, .v4-vista-mapa .v4-muns, .v4-vista-mapa .v4-h2s, .v4-vista-mapa .v4-orden-l { display: none; }
  .v4-vista-mapa .v4-ls-head { margin-bottom: 10px; }
  .v4-vista-mapa .v4-tools { flex-wrap: wrap; gap: 8px; }
  .v4-vista-mapa .v4-tools .v4-sp { display: none; }
  .v4-vista-mapa .v4-orden { flex: 1; min-width: 0; }
  .v4-vista-mapa .v4-sel-orden { width: 100%; min-width: 0; }
  .v4-vista-mapa .v4-tools .v4-cuenta { order: 5; font-size: 13px; }
  .v4-vista-mapa .v4-btn2 { height: 40px; font-size: 14px; padding: 0 12px; }
  .v4-vista-mapa .v4-seg-lista { order: 6; margin-left: auto; }
  .v4-vista-mapa .v4-seg-lista a { height: 34px; }
  .v4-vista-mapa .v4-list { gap: 8px; }
  .v4-vista-mapa .v4-pager { margin-top: 14px; }
  .v4-vista-mapa .v4-pg { min-width: 38px; height: 38px; font-size: 14px; }
  /* Tarjeta compacta: miniatura | título, lugar, estado | importe y enlace */
  .v4-vista-mapa .v4-lc { display: grid; grid-template-columns: 92px minmax(0, 1fr); grid-template-rows: auto auto; gap: 6px 12px; padding: 10px; cursor: pointer; }
  .v4-vista-mapa .v4-lc-img { grid-row: 1 / 3; width: 92px; height: 92px; flex: none; border-radius: 10px; }
  .v4-vista-mapa .v4-org, .v4-vista-mapa .v4-ltb, .v4-vista-mapa .v4-tp, .v4-vista-mapa .v4-sub, .v4-vista-mapa .v4-avs,
  .v4-vista-mapa .v4-lc-imp .v4-k, .v4-vista-mapa .v4-lc-imp .v4-d, .v4-vista-mapa .v4-lc-imp .v4-dn { display: none; }
  .v4-vista-mapa .v4-nofoto-t { font-size: 11px; }
  .v4-vista-mapa .v4-fav { top: 0; right: 0; width: 36px; height: 36px; }
  .v4-vista-mapa .v4-fav span { width: 26px; height: 26px; }
  .v4-vista-mapa .v4-lc-b { padding: 0; }
  .v4-vista-mapa .v4-lc-b h2 { font-size: 15px; margin: 0 0 2px; }
  .v4-vista-mapa .v4-loc { font-size: 13px; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .v4-vista-mapa .v4-es { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .v4-vista-mapa .v4-lc-f { flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; margin: 0; padding: 0; text-align: left; }
  .v4-vista-mapa .v4-lc-imp { align-items: flex-start; }
  .v4-vista-mapa .v4-lc-imp .v4-a { font-size: 17px; }
  .v4-vista-mapa .v4-lc-imp .v4-a-nd { font-size: 13px; }
  .v4-vista-mapa .v4-cta { width: auto; padding: 7px 12px; font-size: 13px; }
  .v4-vista-mapa .v4-lc:hover { border-color: var(--v4-ctl); }
}
.v4-nomap { font-size: 12px; color: var(--v4-gray); margin-top: 3px; }
/* Vista mapa por debajo de 1024: el mapa sustituye a la lista (móvil: vista independiente) */
@media (max-width: 1023px) {
  .v4-vista-mapa .v4-list, .v4-vista-mapa .v4-pager, .v4-vista-mapa .v4-ls-lead, .v4-vista-mapa .v4-msearch,
  .v4-vista-mapa .v4-ls-head, .v4-vista-mapa .v4-atrib, .v4-vista-mapa .v4-muns, .v4-vista-mapa .v4-h2s,
  .v4-vista-mapa .v4-foot-link, .v4-vista-mapa .v4-orden, .v4-vista-mapa .v4-cuenta { display: none !important; }
  .v4-vista-mapa .v4-map-nota { order: -1; font-size: 12px; }
  .v4-vista-mapa .v4-ls-map { display: flex; flex-direction: column; gap: 8px; }
  .v4-vista-mapa .v4-map-c { height: calc(100vh - 230px); height: calc(100dvh - 230px); min-height: 340px; }
}

/* ---------- Panel de filtros: hoja (<1024) o barra lateral (≥1024) ---------- */
.v4-sheet-h h2 { font-size: 17px; font-weight: 600; margin: 0; }
.v4-fg { border: 0; margin: 0; padding: 16px 0; border-bottom: 1px solid var(--v4-line2); min-width: 0; }
.v4-fg:last-child { border-bottom: 0; }
.v4-fh { display: block; font-size: 15px; font-weight: 600; margin: 0 0 8px; padding: 0; }
.v4-lbl { display: block; font-size: 13px; color: var(--v4-gray); margin: 10px 0 6px; }
legend.v4-fh { float: left; width: 100%; }
legend.v4-fh + * { clear: both; }
.v4-opt { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 0 12px; border-radius: 10px; font-size: 15px; color: var(--v4-ink); cursor: pointer; }
.v4-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.v4-opt span + span { color: var(--v4-gray2); }
.v4-opt:has(input:checked) { background: var(--v4-blue-soft); color: var(--v4-blue); font-weight: 500; }
.v4-opt:has(input:checked) span + span { color: var(--v4-blue); }
.v4-opt:has(input:focus-visible) { outline: 2px solid var(--v4-blue); outline-offset: -2px; }
.v4-sel { display: block; width: 100%; height: 46px; padding: 0 12px; border: 1px solid var(--v4-ctl); border-radius: var(--v4-r-ctl); background: #FFFFFF; font-size: 16px; color: var(--v4-ink); }
.v4-sel:disabled { background: var(--v4-bg); color: var(--v4-gray2); }
.v4-chk { display: flex; align-items: center; gap: 12px; min-height: 44px; font-size: 15px; cursor: pointer; }
.v4-chk input { width: 20px; height: 20px; margin: 0; accent-color: var(--v4-blue); flex: none; }
.v4-chk span:nth-of-type(1) { flex: 1; }
.v4-chk span:last-child { color: var(--v4-gray2); }
.v4-mas > summary { list-style: none; display: flex; align-items: center; gap: 8px; min-height: 44px; color: var(--v4-link); font-weight: 500; font-size: 15px; cursor: pointer; }
.v4-mas > summary::-webkit-details-marker { display: none; }
.v4-fsearch { display: flex; align-items: center; gap: 8px; border: 1px solid var(--v4-ctl); border-radius: 10px; padding: 0 12px; height: 42px; background: #FFFFFF; }
.v4-fsearch input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 14px; }
.v4-sheet-f .v4-btn { height: 48px; }
.v4-sheet-f .v4-pri { flex: 1; }
@media (min-width: 1024px) {
  .v4-filtros { display: block; position: static; inset: auto; z-index: auto; background: none; flex: 0 0 232px; }
  .v4-filtros .v4-sheet { position: static; display: block; background: var(--v4-card); border: 1px solid var(--v4-line); border-radius: var(--v4-r-card); }
  .v4-filtros .v4-sheet-b { overflow: visible; padding: 18px 16px 20px; }
  .v4-fg { padding: 0 0 20px; border: 0; }
  .v4-fh { font-size: 14px; }
  .v4-opt { min-height: 36px; padding: 0 10px; font-size: 14px; border-radius: 9px; }
  .v4-sel { height: 40px; font-size: 14px; border-radius: 10px; }
  .v4-lbl { font-size: 12.5px; margin: 8px 0 4px; }
  .v4-chk { min-height: 30px; font-size: 14px; gap: 9px; }
  .v4-chk input { width: 16px; height: 16px; }
  .v4-mas > summary { font-size: 14px; min-height: 32px; }
  .v4-fpie { padding-bottom: 0; }
  .v4-fpie .v4-btn { min-height: 46px; font-size: 15px; }
}

/* ---------- Cabecera de resultados y herramientas ---------- */
.v4-ls-head { display: flex; align-items: flex-end; gap: 4px 16px; flex-wrap: wrap; }
.v4-h1l { font-size: 26px; line-height: 1.15; font-weight: 600; letter-spacing: -0.025em; margin: 2px 0 0; }
.v4-upd { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--v4-gray); padding-bottom: 4px; }
.v4-upd::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--v4-blue); }
.v4-ls-lead { font-size: 14px; margin: 8px 0 14px; }
.v4-msearch { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; background: var(--v4-card); border: 1px solid var(--v4-ctl); border-radius: var(--v4-r-ctl); }
.v4-msearch input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 16px; }
.v4-tools { display: flex; align-items: center; gap: 8px; margin: 12px 0 10px; }
.v4-btn2 { display: inline-flex; align-items: center; gap: 7px; height: 44px; padding: 0 14px; background: var(--v4-card); border: 1px solid var(--v4-ctl); border-radius: var(--v4-r-ctl); font-size: 15px; font-weight: 500; color: var(--v4-ink); cursor: pointer; white-space: nowrap; }
.v4-btn2:hover { color: var(--v4-ink); }
.v4-orden { position: relative; display: flex; align-items: center; gap: 12px; }
.v4-orden-l { font-size: 14px; color: var(--v4-gray); white-space: nowrap; }
.v4-sel-orden { width: auto; height: 40px; font-size: 14px; font-weight: 500; border-radius: 10px; padding: 0 10px; }
.v4-cuenta { font-size: 13px; color: var(--v4-gray); margin: 0 0 12px; }
.v4-tools .v4-cuenta { margin: 0; font-size: 14px; }
.v4-seg { display: flex; background: var(--v4-card); border: 1px solid var(--v4-line); border-radius: var(--v4-r-ctl); }
.v4-seg a { display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 12px; border: 2px solid transparent; background-clip: padding-box; border-radius: 11px; font-size: 14px; font-weight: 500; color: var(--v4-ink); }
.v4-seg a.on { background: var(--v4-ink); color: #FFFFFF; }
.v4-chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 10px; padding: 0 16px 2px; scrollbar-width: none; }
.v4-fchip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px 0 12px; border-radius: 999px; background: var(--v4-blue-soft); color: var(--v4-blue); font-size: 14px; font-weight: 500; }
@media (max-width: 1023px) {
  /* «Ordenar ⌄» como en la maqueta móvil: el select nativo, transparente, encima del botón */
  .v4-orden-l { position: absolute; inset: 0; z-index: 0; display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px; background: var(--v4-card); border: 1px solid var(--v4-ctl); border-radius: var(--v4-r-ctl); font-size: 0; color: var(--v4-ink); }
  .v4-orden-l::before { content: "Ordenar"; font-size: 15px; font-weight: 500; }
  .v4-orden-l::after { content: "⌄"; font-size: 15px; color: var(--v4-gray2); }
  .v4-orden { width: 112px; height: 44px; }
  .v4-sel-orden { position: relative; z-index: 1; width: 100%; height: 44px; opacity: 0; cursor: pointer; }
  .v4-seg { margin-left: auto; }
}
@media (min-width: 1024px) {
  .v4-h1l { font-size: 30px; }
  .v4-upd { padding-bottom: 6px; }
  .v4-ls-lead { font-size: 15px; margin: 4px 0 18px; }
  .v4-msearch { display: none; }
  .v4-tools { gap: 12px; margin: 0 0 14px; flex-wrap: wrap; }
  .v4-chips { margin: 0 0 12px; padding: 0; flex-wrap: wrap; overflow: visible; }
  .v4-seg-lista a { height: 36px; }
}

/* ---------- Tarjeta (móvil por defecto; ≥1024 horizontal) ---------- */
.v4-list { display: flex; flex-direction: column; gap: 12px; }
.v4-lc { background: var(--v4-card); border: 1px solid var(--v4-line); border-radius: var(--v4-r-card); overflow: hidden; }
.v4-lc.v4-lc-on { border-color: var(--v4-blue); box-shadow: inset 0 0 0 1px var(--v4-blue); background: var(--v4-sel-bg); }
.v4-lc-img { position: relative; }
.v4-cimg { position: relative; display: block; aspect-ratio: 16 / 9; background: #E8E8ED; color: inherit; }
.v4-cimg img { width: 100%; height: 100%; object-fit: cover; }
.v4-cimg.v4-nofoto { display: flex; align-items: center; justify-content: center; background: #ECECEF; color: var(--v4-gray2); font-size: 13px; }
.v4-org { position: absolute; top: 10px; left: 10px; background: #FFFFFF; color: var(--v4-ink); font-size: 12px; font-weight: 500; padding: 4px 9px; border-radius: 999px; }
.v4-ltb { position: absolute; left: 10px; bottom: 10px; background: rgba(29,29,31,0.72); color: #FFFFFF; font-size: 12px; padding: 4px 9px; border-radius: 999px; }
.v4-fav { position: absolute; top: 3px; right: 3px; width: 44px; height: 44px; padding: 0; border: 0; background: none; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--v4-ink); }
.v4-fav span { width: 34px; height: 34px; border-radius: 50%; background: #FFFFFF; display: flex; align-items: center; justify-content: center; }
.v4-fav.on svg path { fill: var(--v4-ink); }
.v4-lc-b { padding: 12px 14px 0; }
.v4-lc-b h2 { font-size: 18px; line-height: 1.25; font-weight: 600; margin: 0 0 3px; }
.v4-lc-b h2 a { color: inherit; }
.v4-loc { font-size: 14px; color: var(--v4-gray); margin-bottom: 8px; overflow-wrap: anywhere; }
.v4-tp { font-size: 14px; margin-bottom: 6px; }
.v4-tp b { font-weight: 600; }
.v4-es { font-size: 14px; }
.v4-es .v4-estado { display: inline; }
.v4-es .v4-dot { display: inline-block; vertical-align: 1px; margin-right: 7px; }
.v4-sub { font-size: 13px; color: var(--v4-gray); margin-top: 4px; padding-left: 15px; }
.v4-avs { font-size: 13px; color: var(--v4-amber-txt); margin-top: 5px; padding-left: 15px; }
.v4-lc-f { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 12px 14px 14px; padding-top: 12px; border-top: 1px solid var(--v4-line2); }
.v4-lc-imp { min-width: 0; }
.v4-lc-imp .v4-k { font-size: 13px; color: var(--v4-gray); }
.v4-lc-imp .v4-a { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; white-space: nowrap; }
.v4-lc-imp .v4-a-nd { font-size: 15px; font-weight: 500; letter-spacing: 0; color: var(--v4-gray); white-space: normal; }
.v4-lc-imp .v4-d { font-size: 13px; color: var(--v4-gray); white-space: nowrap; }
.v4-lc-imp .v4-dn { font-size: 12px; color: var(--v4-gray2); }
.v4-cta { flex: none; display: flex; align-items: center; justify-content: center; height: 44px; padding: 0 16px; border-radius: var(--v4-r-ctl); background: var(--v4-blue); color: #FFFFFF; font-size: 15px; font-weight: 600; white-space: nowrap; }
.v4-cta:hover { color: #FFFFFF; filter: brightness(0.95); }
.v4-cta.v4-cta-mute, .v4-lc-gris .v4-cta { background: #E8E8ED; color: var(--v4-ink); }
.v4-lc-gris .v4-lc-b h2, .v4-lc-gris .v4-lc-imp .v4-a { color: var(--v4-gray); }
@media (min-width: 1024px) {
  .v4-lc { display: flex; gap: 18px; padding: 12px; }
  .v4-lc-img { flex: 0 0 172px; height: 124px; border-radius: 12px; overflow: hidden; }
  .v4-cimg { aspect-ratio: auto; height: 100%; }
  .v4-org { top: 9px; left: 9px; }
  .v4-ltb { left: 9px; bottom: 9px; }
  .v4-fav { top: 2px; right: 2px; width: 40px; height: 40px; }
  .v4-fav span { width: 30px; height: 30px; }
  .v4-lc-b { flex: 1; min-width: 0; padding: 2px 0 0; }
  .v4-lc-f { flex: 0 0 168px; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 10px; margin: 0; padding: 2px 0 0; border: 0; text-align: right; }
  .v4-lc-imp { display: flex; flex-direction: column; align-items: flex-end; }
  .v4-lc-imp .v4-a { font-size: 25px; }
  .v4-cta { width: 100%; height: auto; padding: 10px; font-size: 14px; border-radius: 10px; }
}

/* ---------- Paginación ---------- */
.v4-pager { display: flex; justify-content: center; gap: 6px; margin: 22px 0 8px; flex-wrap: wrap; }
.v4-pg { min-width: 44px; height: 44px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--v4-r-ctl); background: var(--v4-card); border: 1px solid var(--v4-line); color: var(--v4-ink); font-size: 15px; }
.v4-pg:hover { color: var(--v4-ink); border-color: var(--v4-ctl); }
.v4-pg.on { background: var(--v4-ink); border-color: var(--v4-ink); color: #FFFFFF; font-weight: 600; }
.v4-pg.v4-pg-dots { border: 0; background: none; min-width: 24px; }

/* ---------- Mapa ---------- */
.v4-map-c { position: relative; border-radius: var(--v4-r-card); overflow: hidden; border: 1px solid var(--v4-line); background: #EDEDF0; }
.v4-map { position: absolute; inset: 0; z-index: 0; font: inherit; }
.v4-map-nota { font-size: 13px; color: var(--v4-gray); padding: 0 4px; margin: 0; }
.v4-map-vacio { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; color: var(--v4-gray); font-size: 14px; }
.v4-pin { width: 0 !important; height: 0 !important; background: none; border: 0; }
.v4-pl { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); background: #FFFFFF; border: 1px solid var(--v4-ctl); border-radius: 999px; padding: 3px 9px; font: 600 12px/1.3 Inter, system-ui, sans-serif; white-space: nowrap; color: var(--v4-ink); cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,0.08); }
.v4-pl.on { background: var(--v4-blue); border-color: var(--v4-blue); color: #FFFFFF; font-size: 13px; padding: 4px 11px; z-index: 1; }
.v4-pl.v4-pl-gris { color: var(--v4-gray); }
.v4-cl { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); min-width: 34px; height: 34px; padding: 0 8px; display: flex; align-items: center; justify-content: center; border-radius: 999px; background: var(--v4-ink); color: #FFFFFF; border: 2px solid #FFFFFF; font: 600 13px/1 Inter, system-ui, sans-serif; box-shadow: 0 1px 3px rgba(0,0,0,0.2); cursor: pointer; }
.v4-mcard { position: absolute; left: 12px; right: 12px; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 500; display: flex; gap: 12px; padding: 12px; background: #FFFFFF; border: 1px solid var(--v4-line); border-radius: var(--v4-r-card); }
.v4-mcard[hidden] { display: none; }
.v4-mcard img, .v4-mcard .v4-mc-nofoto { width: 92px; height: 92px; object-fit: cover; border-radius: 10px; flex: none; }
.v4-mcard .v4-mc-nofoto { display: flex; align-items: center; justify-content: center; background: #ECECEF; color: var(--v4-gray2); font-size: 11px; text-align: center; padding: 6px; }
.v4-mcard .v4-mc-img { position: relative; flex: none; align-self: flex-start; line-height: 0; }
.v4-mcard .v4-mc-img .v4-ltb { left: 6px; bottom: 6px; font-size: 11px; line-height: 1.3; padding: 3px 7px; }
.v4-mcard .v4-mc-t { flex: 1; min-width: 0; }
.v4-mcard .v4-mc-1 { font-size: 12px; color: var(--v4-gray); }
.v4-mcard .v4-mc-2 { font-size: 15px; font-weight: 600; margin: 2px 0; line-height: 1.25; }
.v4-mcard .v4-mc-3 { font-size: 13px; color: var(--v4-gray); margin-bottom: 6px; }
.v4-mcard .v4-mc-a { display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; }
.v4-mcard .v4-mc-v { font-size: 17px; font-weight: 600; white-space: nowrap; }
.v4-mcard .v4-mc-d { font-size: 14px; font-weight: 600; white-space: nowrap; }
.v4-mcard .v4-mc-k { font-size: 12px; color: var(--v4-gray); }
.v4-mcard .v4-cta { align-self: flex-end; flex: none; width: auto; height: 44px; padding: 0 16px; font-size: 15px; border-radius: var(--v4-r-ctl); }
.v4-mcard .v4-mc-x { position: absolute; top: 2px; right: 2px; width: 36px; height: 36px; border: 0; background: none; color: var(--v4-gray); font-size: 18px; cursor: pointer; }
@media (min-width: 1280px) {
  .v4-mcard { left: 14px; right: 14px; bottom: 34px; gap: 14px; }
  .v4-mcard img, .v4-mcard .v4-mc-nofoto { width: 110px; height: 96px; }
}
.v4 .leaflet-container { font: inherit; background: #EDEDF0; }
.v4 .leaflet-control-attribution { font-size: 11px; }

/* ---------- Facetas de origen ---------- */
.v4-fac-n { font-size: 14px; color: var(--v4-gray); margin: 0 0 14px; }
.v4-fac-n b { font-size: 20px; color: var(--v4-ink); font-weight: 600; }
.v4-prose-lite { max-width: 760px; font-size: 15px; line-height: 1.7; }
.v4-prose-lite h3 { font-size: 15px; margin: 16px 0 6px; }
.v4-prose-lite p { margin: 8px 0; }
.v4-fac-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.v4-list-fac { max-width: 1040px; }
.v4-aprende { padding: 4px 18px 18px; margin: 22px 0; }

/* =====================================================================================
   UI-2 · Ficha estándar de un lote. Fuente: docs/visual-v4/html/3_ficha_derecho_parcial_10.html
   y docs/visual-v4/mobile/3_ficha_contradiccion_mobile.html. Móvil por defecto; ≥1024 en dos columnas.
   ===================================================================================== */
.v4-fic { padding-bottom: 24px; }
.v4-nd, .v4-nd-txt { color: var(--v4-gray2); }
.v4-nd-txt { font-size: 15px; }
.v4-fic-st { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 7px; font-size: 14px; }
.v4-fic-st .v4-m { color: var(--v4-gray); }
.v4-fic-org { font-size: 13px; color: var(--v4-gray); margin-top: 3px; }
.v4-fic-h1 { font-size: 28px; line-height: 1.15; font-weight: 600; letter-spacing: -0.025em; margin: 12px 0 6px; overflow-wrap: anywhere; }
.v4-fic-addr { font-size: 15px; color: var(--v4-gray); overflow-wrap: anywhere; }
.v4-subid { display: block; margin-top: 2px; font-size: 14px; color: var(--v4-gray2); -webkit-user-select: all; user-select: all; }
.v4-fic-aviso { margin-top: 12px; }
.v4-what { margin-top: 16px; padding: 18px 16px 16px; }
.v4-kick { font-size: 13px; color: var(--v4-gray); margin-bottom: 4px; }
.v4-what-t { font-size: 21px; line-height: 1.2; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 4px; }
.v4-what-s { font-size: 14px; color: var(--v4-gray); margin-bottom: 12px; }
.v4-amts3 { border-top: 1px solid var(--v4-line2); }
.v4-amts3 .v4-r { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--v4-line2); }
.v4-amts3 .v4-r span { font-size: 14px; color: var(--v4-gray); }
.v4-amt { font-size: 17px; font-weight: 600; white-space: nowrap; }
.v4-amt.v4-nd { font-size: 14px; font-weight: 400; white-space: normal; text-align: right; }
.v4-what-av { margin-top: 12px; }
.v4-what-acc { display: none; }
.v4-what-2 { display: flex; gap: 8px; margin-top: 8px; }
.v4-what-2 .v4-btn { flex: 1; font-size: 14px; }
.v4-photo { position: relative; margin: 16px 0 0; aspect-ratio: 16 / 9; border-radius: var(--v4-r-card); overflow: hidden; background: #E8E8ED; }
.v4-photo img { width: 100%; height: 100%; object-fit: cover; }
.v4-photo.v4-nofoto { aspect-ratio: auto; display: block; padding: 18px 20px; background: #ECECEF; color: var(--v4-gray); font-size: 14px; text-align: center; }
.v4-photo.v4-nofoto b { display: block; font-weight: 500; color: var(--v4-ink); margin-bottom: 4px; }
.v4-cap { position: absolute; left: 12px; bottom: 12px; background: rgba(29,29,31,0.72); color: #FFFFFF; font-size: 12px; padding: 5px 10px; border-radius: 999px; }
.v4-mapb { position: relative; isolation: isolate; margin-top: 12px; height: 184px; border-radius: var(--v4-r-card); overflow: hidden; background: #EDEDF0; }   /* isolation: Leaflet y sus rótulos no pasan por encima de la cabecera fija */
.v4-mapb-l { position: absolute; inset: 0; z-index: 0; }
.v4-mapb-sin { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: auto; min-height: 96px; padding: 16px 20px; text-align: center; color: var(--v4-gray); font-size: 14px; }
.v4-mapb-sin small { font-size: 12px; color: var(--v4-gray2); }
.v4-blur { filter: blur(9px); }   /* foto de una vigente sin acceso completo: como la tarjeta actual */
.v4-mapb-pedir { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 16px 20px; text-align: center; }
.v4-mapb-pedir small { font-size: 12px; color: var(--v4-gray2); max-width: 30em; }
.v4-mchip { position: absolute; left: 12px; top: 12px; z-index: 500; display: flex; align-items: center; min-height: 32px; background: #FFFFFF; color: var(--v4-ink); font-size: 13px; font-weight: 500; padding: 0 11px; border-radius: 999px; }
.v4-mchip:hover { color: var(--v4-ink); }
.v4-mpin { position: absolute; left: 0; top: 0; width: 16px; height: 16px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--v4-blue); border: 3px solid #FFFFFF; box-shadow: 0 1px 3px rgba(0,0,0,0.25); }

/* Secciones técnicas */
.v4-tech { margin-top: 16px; padding: 0 16px; }
.v4-s { border-top: 1px solid var(--v4-line2); padding: 18px 0; }
.v4-tech > .v4-s:first-child { border-top: 0; }
.v4-s-h { position: relative; margin-bottom: 12px; padding-right: 0; }
.v4-s-h h2 { font-size: 17px; font-weight: 600; margin: 0; }
.v4-s[data-v4-plegable] .v4-s-h { cursor: pointer; min-height: 44px; display: flex; flex-direction: column; justify-content: center; padding-right: 44px; margin-bottom: 0; }
.v4-s.v4-abierta .v4-s-h { margin-bottom: 12px; }
.v4-hint { position: absolute; right: 44px; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--v4-gray); }
.v4-abierta .v4-hint { display: none; }
.v4-s-tg { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; background: none; color: var(--v4-gray2); font-size: 20px; cursor: pointer; }
.v4-s-tg span { display: inline-block; transition: transform .15s; }
.v4-abierta .v4-s-tg span { transform: rotate(90deg); }
.v4-s-b[hidden] { display: none !important; }   /* las rejillas (display: grid) no deben anular hidden */
.v4-s-b .v4-k { font-size: 13px; color: var(--v4-gray); }
.v4-s-b .v4-v { font-size: 15px; overflow-wrap: anywhere; }
.v4-s-b .v4-b { font-weight: 600; }
.v4-s-b .v4-x { font-size: 12px; color: var(--v4-gray2); margin-top: 2px; }
.v4-g4, .v4-g3, .v4-g5 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.v4-g5 .v4-v { font-size: 16px; white-space: nowrap; }
.v4-g5 .v4-v.v4-nd { white-space: normal; font-size: 14px; }
.v4-bien-t { font-size: 18px; font-weight: 600; line-height: 1.25; margin-bottom: 2px; }
.v4-bien-m { font-size: 14px; color: var(--v4-gray); }
.v4-bien-d { font-size: 14px; color: var(--v4-gray2); margin-bottom: 12px; }
.v4-kv2 > div, .v4-kv3 > div { padding: 10px 0; border-top: 1px solid var(--v4-line3); }
.v4-kv2 > div:first-child, .v4-kv3 > div:first-child { border-top: 0; padding-top: 0; }
.v4-lit { line-height: 1.55; }
.v4-doc { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; min-height: 48px; padding: 10px 0; border-top: 1px solid var(--v4-line3); font-size: 15px; }
.v4-doc:first-child { border-top: 0; padding-top: 0; }
.v4-doc a { white-space: nowrap; }
.v4-doc-n { margin-top: 8px; }
.v4-exp { display: flex; flex-direction: column; gap: 12px; font-size: 15px; color: var(--v4-gray); }
.v4-src.v4-me { color: var(--v4-blue); }
.v4-fuentes .v4-s-b { font-size: 13px; color: var(--v4-gray); line-height: 1.6; }
.v4-fuentes .v4-s-b a { color: var(--v4-gray); text-decoration: underline; }
/* Barra móvil: máx. 3 acciones; sticky al final, respeta safe-area (base en UI-0: .v4-bar) */
.v4-bar .v4-btn { min-height: 44px; padding: 0 8px; font-size: 15px; }
.v4-bar .v4-btn.v4-pri { gap: 6px; }

@media (min-width: 1024px) {
  .v4-fic .v4-crumb { margin-bottom: 16px; }
  .v4-fic-top { display: flex; gap: 28px; align-items: flex-start; }
  .v4-fic-izq { flex: 1 1 0; min-width: 0; }
  .v4-fic-st { margin-bottom: 10px; }
  .v4-fic-h1 { font-size: 34px; margin: 0 0 6px; }
  .v4-fic-addr { font-size: 16px; margin-bottom: 18px; }
  .v4-subid { display: inline; margin: 0; font-size: 16px; }
  .v4-fic-media { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .v4-photo, .v4-mapb { margin: 0; height: 300px; aspect-ratio: auto; }
  .v4-photo.v4-nofoto, .v4-mapb-sin { height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
  .v4-what { flex: 0 0 404px; margin-top: 0; padding: 22px 22px 20px; }
  .v4-amts3 { display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--v4-line2); margin-bottom: 8px; }
  .v4-amts3 .v4-r { flex-direction: column-reverse; justify-content: flex-end; gap: 0; padding: 0; border: 0; }
  .v4-amts3 .v4-r span { font-size: 12px; }
  .v4-amt { font-size: 17px; }
  .v4-amt.v4-nd { max-width: 110px; }
  .v4-amt.v4-nd { text-align: left; font-size: 13px; }
  .v4-what-acc { display: block; margin-top: 16px; }
  .v4-tech { margin-top: 24px; padding: 0 28px; }
  .v4-s, .v4-s[data-v4-plegable] { display: flex; gap: 32px; padding: 26px 0; }
  .v4-s-h, .v4-s[data-v4-plegable] .v4-s-h, .v4-s.v4-abierta .v4-s-h { flex: 0 0 210px; margin: 0; padding: 0; min-height: 0; display: block; cursor: default; }
  .v4-s-tg, .v4-hint { display: none; }
  .v4-s-b { flex: 1; min-width: 0; }
  .v4-g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
  .v4-g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 24px; }
  .v4-g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
  .v4-s-b .v4-v { font-size: 15px; }
  .v4-g4 .v4-v { font-size: 16px; }
  .v4-kv2 > div, .v4-kv3 > div { display: flex; gap: 24px; padding: 12px 0; }
  .v4-kv2 > div:first-child, .v4-kv3 > div:first-child { padding-top: 0; }
  .v4-kv2 .v4-k { flex: 0 0 170px; font-size: 15px; }
  .v4-kv3 .v4-k { flex: 0 0 220px; font-size: 15px; }
  .v4-kv2 .v4-v, .v4-kv3 .v4-v { flex: 1; }
  .v4-kv3 > div > .v4-x { flex: none; }
  .v4-exp { flex-direction: row; align-items: center; justify-content: space-between; gap: 20px; }
}

/* =====================================================================================
   Mi zona (Mis expedientes). Reutiliza la tarjeta del listado; añade selección y «Quitar».
   ===================================================================================== */
.v4-mz-head { display: flex; align-items: flex-end; gap: 4px 16px; flex-wrap: wrap; }
.v4-mz-total::before { display: none; }
.v4-mz-lead { font-size: 14px; color: var(--v4-gray); margin: 6px 0 16px; }
.v4-mz-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 12px; padding: 8px 12px; background: var(--v4-card); border: 1px solid var(--v4-line); border-radius: var(--v4-r-ctl); }
.v4-mz-bar[hidden] { display: none; }
.v4-mz-todas { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; font-weight: 500; cursor: pointer; }
.v4-mz-todas input, .v4-mz-sel input { width: 20px; height: 20px; margin: 0; accent-color: var(--v4-blue); cursor: pointer; }
.v4-mz-n { font-size: 14px; color: var(--v4-gray); }
.v4-mz-qsel { color: var(--v4-red); border-color: var(--v4-red-line); }
.v4-mz-qsel:hover { color: var(--v4-red); background: var(--v4-red-bg); }
.v4-mz-qsel:disabled { color: var(--v4-gray2); border-color: var(--v4-line); background: var(--v4-card); cursor: default; }
.v4-mz-msg:empty { display: none; }
.v4-mz-msg { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 12px; padding: 10px 14px; border-radius: var(--v4-r-ctl); background: var(--v4-ink); color: #FFFFFF; font-size: 14px; }
.v4-mz-desh { min-height: 36px; padding: 0 12px; border: 1px solid rgba(255,255,255,0.5); border-radius: 9px; background: none; color: #FFFFFF; font-weight: 600; cursor: pointer; }
.v4-mz-sel { position: absolute; top: 3px; left: 3px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.v4-mz-sel::before { content: ""; position: absolute; width: 32px; height: 32px; border-radius: 9px; background: #FFFFFF; }
.v4-mz-sel input { position: relative; }
.v4-mz .v4-org { top: auto; bottom: 10px; }
.v4-mz-acc { display: flex; gap: 8px; align-items: center; }
.v4-mz-q { height: 44px; color: var(--v4-red); border-color: var(--v4-red-line); }
.v4-mz-q:hover { color: var(--v4-red); background: var(--v4-red-bg); }
.v4-mz-vacio[hidden] { display: none; }
.v4-mz-vacio .v4-btn { display: inline-flex; margin-top: 8px; }
.v4-mz-dlg { max-width: min(440px, calc(100vw - 32px)); padding: 22px; border: 0; border-radius: var(--v4-r-card); box-shadow: 0 12px 40px rgba(0,0,0,0.18); color: var(--v4-ink); }
.v4-mz-dlg::backdrop { background: rgba(29,29,31,0.4); }
.v4-mz-dlg h2 { font-size: 18px; font-weight: 600; margin: 0 0 8px; }
.v4-mz-dlg p { margin: 0 0 18px; color: var(--v4-ink2); font-size: 15px; }
.v4-mz-dlg-b { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.v4-btn.v4-mz-rojo { background: var(--v4-red); border-color: var(--v4-red); }
@media (max-width: 1023px) {
  .v4-mz-acc { flex-direction: column-reverse; align-items: stretch; }
  .v4-mz .v4-lc-f { align-items: flex-end; }
}
@media (min-width: 1024px) {
  .v4-mz-sel { top: 2px; left: 2px; width: 40px; height: 40px; }
  .v4-mz-sel::before { width: 28px; height: 28px; }
  .v4-mz .v4-org { bottom: 9px; }
  .v4-mz .v4-lc-f { flex-basis: 188px; }
  .v4-mz-acc { width: 100%; }
  .v4-mz-acc .v4-cta { flex: 1; }
  .v4-mz-q { height: auto; padding: 9px 12px; font-size: 14px; border-radius: 10px; }
}

/* =====================================================================================
   UI-3 · Ficha multilote. Fuente: docs/visual-v4/html/4_multilote_37_lotes.html y
   docs/visual-v4/mobile/4_multilote_mobile.html. Tabla de lotes con fila desplegable
   (un solo lote abierto); en móvil, filas compactas.
   ===================================================================================== */
.v4-fic-multi .v4-photo .v4-ltb { top: 12px; bottom: auto; left: 12px; }
.v4-mchip.v4-mchip-r { top: auto; bottom: 12px; }

.v4-comp { border-top: 1px solid var(--v4-line2); }
.v4-comp .v4-r { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 15px; border-bottom: 1px solid var(--v4-line2); }
.v4-comp .v4-r b { font-weight: 600; }
.v4-comp .v4-x { font-size: 12px; color: var(--v4-gray2); margin-top: 6px; }
.v4-amts2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 14px 0 6px; }
.v4-amts2 .v4-r { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.v4-amts2 .v4-r b { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.v4-amts2 .v4-r b.v4-nd { font-size: 15px; font-weight: 500; color: var(--v4-gray); }
.v4-amts2 .v4-r span { font-size: 12px; color: var(--v4-gray); }
.v4-what-x { font-size: 12px; color: var(--v4-gray2); margin: 4px 0 0; }
.v4-lt-ir { display: flex; align-items: center; justify-content: center; min-height: 44px; margin-top: 12px; font-weight: 600; }

.v4-lotes { margin-top: 16px; padding: 16px; }
.v4-lotes-h { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 12px; }
.v4-lotes-h h2 { font-size: 19px; font-weight: 600; margin: 0; }
.v4-lt-fil { display: flex; flex-wrap: wrap; gap: 4px; padding: 3px; background: var(--v4-bg); border-radius: 11px; }
.v4-lt-fil button { min-height: 36px; padding: 0 12px; border: 0; border-radius: 9px; background: none; font-size: 14px; color: var(--v4-gray); cursor: pointer; white-space: nowrap; }
.v4-lt-fil button.on { background: var(--v4-card); color: var(--v4-ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,0.08); }
.v4-lt-sel { width: auto; max-width: 100%; height: 40px; font-size: 14px; font-weight: 500; border-radius: 10px; padding: 0 10px; }
.v4-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.v4-lt { border-top: 1px solid var(--v4-line2); scroll-margin-top: calc(var(--v4-top-h) + 16px); }
.v4-lt[hidden] { display: none; }
.v4-lt-r { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto 20px; grid-template-areas: "n t v ch" "n u d ch" "n p p ch"; gap: 2px 10px; align-items: baseline; width: 100%; min-height: 56px; padding: 10px 4px; border: 0; background: none; text-align: left; font: inherit; color: var(--v4-ink); cursor: pointer; }
.v4-lt-r:hover { background: var(--v4-bg); }
.v4-lt-n { grid-area: n; font-weight: 600; }
.v4-lt-t { grid-area: t; font-weight: 600; min-width: 0; }
.v4-lt-u { grid-area: u; font-size: 13px; color: var(--v4-gray); min-width: 0; overflow-wrap: anywhere; }
.v4-lt-v { grid-area: v; font-weight: 600; }
.v4-lt-d { grid-area: d; font-size: 13px; color: var(--v4-gray); }
.v4-lt-p { grid-area: p; font-size: 13px; color: var(--v4-ink2); min-width: 0; overflow-wrap: anywhere; }
.v4-lt-p.v4-nd, .v4-lt .v4-nd { color: var(--v4-gray); }
.v4-lt-v.v4-nd { font-weight: 500; font-size: 13px; }
.v4-lt-ch { grid-area: ch; align-self: center; color: var(--v4-blue); font-size: 18px; transition: transform .15s; text-align: center; }
.v4-lt-r[aria-expanded="true"] .v4-lt-ch { transform: rotate(90deg); }
.v4-lt-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--v4-amber-bg); color: var(--v4-amber-ink); font-size: 12px; font-weight: 500; }
.v4-lt-r-no { cursor: default; grid-template-areas: "n t t ch" "n u u ch"; }
.v4-lt-msg { grid-area: u; font-size: 13px; color: var(--v4-gray); }
.v4-lt-on { border: 1.5px solid var(--v4-blue); border-radius: 12px; background: var(--v4-sel-bg); }
.v4-lt-on + .v4-lt { border-top-color: transparent; }
.v4-lt-det { padding: 4px 12px 14px; }
.v4-lt-det[hidden] { display: none; }
.v4-lt-det .v4-aviso { margin-bottom: 12px; }
.v4-lt-det .v4-k { font-size: 12px; color: var(--v4-gray); }
.v4-lt-det .v4-v { font-size: 14px; overflow-wrap: anywhere; }
.v4-lt-det .v4-b { font-weight: 600; }
.v4-lt-det .v4-lit { margin-top: 6px; color: var(--v4-ink2); line-height: 1.5; }
.v4-lt-det .v4-x { font-size: 12px; color: var(--v4-gray2); }
.v4-lt-cols { display: grid; gap: 14px; }
.v4-lt-kv { display: grid; gap: 0; margin-top: 10px; }
.v4-lt-kv > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--v4-line2); }
.v4-lt-kv > div .v4-k { flex: 0 0 auto; max-width: 45%; }
.v4-lt-kv > div .v4-v { text-align: right; margin: 0; }
.v4-lt-kv .v4-n { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 1023px) {
  .v4-lt-kv > div { flex-direction: column; gap: 2px; }
  .v4-lt-kv > div .v4-k { max-width: none; }
  .v4-lt-kv > div .v4-v { text-align: left; }
}
.v4-lt-acc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.v4-lt-acc .v4-btn { flex: 1 1 auto; font-size: 14px; }
.v4-lt-pie { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px 16px; padding: 12px 4px 0; border-top: 1px solid var(--v4-line); font-size: 14px; }
.v4-lt-pie .v4-x { font-size: 12px; color: var(--v4-gray2); }
.v4-lt-pie .v4-num { white-space: normal; text-align: left; }
.v4-lt-vacio { margin: 12px 4px 0; color: var(--v4-gray); font-size: 14px; }
.v4-lt-vacio[hidden] { display: none; }
.v4-lt-sin { padding: 4px 0; }
.v4-copiado:empty { display: none; }
.v4-copiado { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 70; padding: 10px 16px; border-radius: var(--v4-r-ctl); background: var(--v4-ink); color: #FFFFFF; font-size: 14px; max-width: calc(100vw - 32px); }
/* Móvil y tableta con muchos lotes: la lista va antes que la foto y el mapa */
@media (max-width: 1023px) {
  .v4-main.v4-muchos { display: flex; flex-direction: column; }
  .v4-muchos .v4-fic-top, .v4-muchos .v4-fic-izq { display: contents; }
  .v4-muchos .v4-what { order: 1; }
  .v4-muchos .v4-lotes { order: 2; }
  .v4-muchos .v4-fic-media { order: 3; margin-top: 4px; }
  .v4-muchos .v4-tech { order: 4; }
  .v4-muchos .v4-lt-ir { display: none; }
}
@media (min-width: 1024px) {
  .v4-lotes { margin-top: 24px; padding: 20px 28px 22px; }
  .v4-lotes-h h2 { font-size: 21px; }
  .v4-lt-cab, .v4-lt-r { display: grid; grid-template-columns: 52px minmax(140px, 1.3fr) minmax(140px, 1.2fr) 150px 120px minmax(120px, 1fr) 28px; grid-template-areas: none; gap: 14px; align-items: center; }
  .v4-lt-cab { padding: 0 8px 8px; font-size: 12.5px; color: var(--v4-gray); }
  .v4-lt-r { min-height: 44px; padding: 9px 8px; }
  .v4-lt-n, .v4-lt-t, .v4-lt-u, .v4-lt-v, .v4-lt-d, .v4-lt-p, .v4-lt-ch { grid-area: auto; }
  .v4-lt-t { font-weight: 500; }
  .v4-lt-u, .v4-lt-d, .v4-lt-p { font-size: 14px; }
  .v4-lt-d { color: var(--v4-ink); }
  .v4-lt-p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .v4-lt-r-no { grid-template-columns: 52px minmax(140px, 1.3fr) minmax(0, 4fr) 28px; }
  .v4-lt-r-no .v4-lt-msg { grid-area: auto; }
  .v4-lt-det { padding: 4px 16px 18px 74px; }
  .v4-lt-cols { grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); gap: 28px; }
  .v4-lt-kv:first-child { margin-top: 0; }
  .v4-lt-pie { padding: 12px 8px 0; }
  .v4-lt { scroll-margin-top: 88px; }
  .v4-lt-pie .v4-num { text-align: right; }
  .v4-copiado { bottom: 24px; }
}

/* =====================================================================================
   Calendario de cierres (UI-7). Componentes de UI-1; rejilla del mes y lista por día.
   Móvil: rejilla compacta (número y recuento) y la lista por día como vista principal.
   ===================================================================================== */
.v4-cal-head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; }
.v4-cal-lead { font-size: 14px; color: var(--v4-gray); margin: 6px 0 0; max-width: 760px; }
.v4-cal-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 18px 0 12px; }
.v4-cal-mes { font-size: 20px; font-weight: 600; margin: 0 4px; min-width: 0; }
.v4-cal-hoy { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 500; }
.v4-cal-grid { padding: 8px; }
.v4-cal-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.v4-cal-row + .v4-cal-row { margin-top: 4px; }
.v4-cal-dias > div { padding: 4px 0 6px; text-align: center; font-size: 12px; font-weight: 600; color: var(--v4-gray); }
.v4-cal-dias abbr { text-decoration: none; }
.v4-cal-largo { display: none; }
.v4-cal-c { min-width: 0; min-height: 52px; border-radius: 10px; background: var(--v4-bg); }
.v4-cal-vacia { background: none; }
.v4-cal-n { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; font-size: 14px; color: var(--v4-ink2); border-radius: 10px; }
a.v4-cal-n { color: var(--v4-ink); font-weight: 600; }
a.v4-cal-n:hover { color: var(--v4-ink); background: var(--v4-blue-soft); }
.v4-cal-cnt { min-width: 22px; padding: 0 6px; border-radius: 999px; background: var(--v4-blue); color: #FFFFFF; font-size: 12px; font-weight: 600; line-height: 20px; text-align: center; }
.v4-cal-c-hoy { box-shadow: inset 0 0 0 2px var(--v4-blue); }
.v4-cal-c-pas .v4-cal-n, .v4-cal-c-pas a.v4-cal-n { color: var(--v4-gray2); }
.v4-cal-c-pas .v4-cal-cnt { background: var(--v4-gray2); }
.v4-cal-ls { display: none; }
.v4-cal-agenda { margin-top: 24px; }
.v4-cal-agt { font-size: 19px; font-weight: 600; margin: 0 0 12px; }
.v4-cal-dia { padding: 4px 16px; margin-bottom: 12px; scroll-margin-top: calc(var(--v4-top-h) + 12px); }
.v4-cal-dh { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; padding: 12px 0 10px; border-bottom: 1px solid var(--v4-line2); }
.v4-cal-dh h3 { font-size: 16px; font-weight: 600; margin: 0; }
.v4-cal-tag { display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 999px; background: var(--v4-blue); color: #FFFFFF; font-size: 12px; font-weight: 600; vertical-align: 2px; }
.v4-cal-dn { font-size: 13px; color: var(--v4-gray); }
.v4-cal-dl { margin-left: auto; display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 500; }
.v4-cal-dia-pas .v4-cal-dh h3 { color: var(--v4-gray); }
.v4-cal-sub { list-style: none; margin: 0; padding: 0; }
.v4-cal-it { display: grid; grid-template-columns: 52px minmax(0, 1fr); grid-template-areas: "h b" "h i" ". c"; gap: 6px 12px; padding: 12px 0; border-top: 1px solid var(--v4-line2); }
.v4-cal-it:first-child { border-top: 0; }
.v4-cal-ih { grid-area: h; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; padding-top: 1px; }
.v4-cal-ib { grid-area: b; min-width: 0; }
.v4-cal-it-t { display: block; font-size: 16px; font-weight: 600; color: var(--v4-ink); overflow-wrap: anywhere; }
.v4-cal-it-t:hover { color: var(--v4-link); }
.v4-cal-it-u { font-size: 13px; color: var(--v4-gray); margin-top: 2px; overflow-wrap: anywhere; }
.v4-cal-it-e { font-size: 13px; margin-top: 4px; }
.v4-cal-ii { grid-area: i; display: flex; flex-direction: column; min-width: 0; }
.v4-cal-ii .v4-k { font-size: 12px; color: var(--v4-gray); }
.v4-cal-ii b { font-size: 17px; font-weight: 600; white-space: nowrap; }
.v4-cal-ii .v4-nd { font-size: 14px; color: var(--v4-gray); }
.v4-cal-it .v4-cta { grid-area: c; justify-self: start; height: 44px; font-size: 14px; }
.v4-cal-it.v4-lc-gris .v4-cal-it-t, .v4-cal-it.v4-lc-gris .v4-cal-ii b { color: var(--v4-gray); }
@media (min-width: 768px) {
  .v4-cal-corto { display: none; }
  .v4-cal-largo { display: inline; }
  .v4-cal-c { min-height: 112px; padding: 6px; background: var(--v4-card); border: 1px solid var(--v4-line2); }
  .v4-cal-vacia { border: 0; background: none; }
  .v4-cal-c-pas { background: var(--v4-bg); }
  .v4-cal-n { flex-direction: row; justify-content: space-between; min-height: 32px; padding: 0 4px; font-size: 14px; }
  .v4-cal-ls { display: block; list-style: none; margin: 4px 0 0; padding: 0; }
  .v4-cal-ls li { margin-top: 3px; }
  .v4-cal-ls a { display: block; padding: 3px 6px; border-radius: 6px; background: var(--v4-blue-soft); color: var(--v4-ink); font-size: 12px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .v4-cal-ls a:hover { background: #DCE9FB; color: var(--v4-ink); }
  .v4-cal-c-pas .v4-cal-ls a { background: var(--v4-line2); color: var(--v4-gray); }
  .v4-cal-h { font-weight: 600; font-variant-numeric: tabular-nums; }
  .v4-cal-ls .v4-cal-mas a { background: none; color: var(--v4-link); font-weight: 500; }
  .v4-cal-it { grid-template-columns: 60px minmax(0, 1fr) 190px 132px; grid-template-areas: "h b i c"; align-items: center; gap: 16px; }
  .v4-cal-ii { align-items: flex-end; text-align: right; }
  .v4-cal-it .v4-cta { justify-self: stretch; }
}
@media (min-width: 1024px) {
  .v4-cal-mes { font-size: 22px; }
  .v4-cal-grid { padding: 12px; }
  .v4-cal-row { gap: 6px; }
  .v4-cal-row + .v4-cal-row { margin-top: 6px; }
  .v4-cal-c { min-height: 124px; }
  .v4-cal-dia { padding: 4px 22px; }
}
/* Multilote sin foto del lote 1: sin bloques vacíos (la ausencia se explica en una franja) */
.v4-media-nota { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; padding: 12px 14px; border-radius: var(--v4-r-ctl); background: var(--v4-card); border: 1px solid var(--v4-line); font-size: 13.5px; color: var(--v4-gray); line-height: 1.45; }
.v4-media-nota b { color: var(--v4-ink2); font-weight: 600; }
@media (min-width: 1024px) {
  .v4-fic-media.v4-media-sinfoto { grid-template-columns: minmax(0, 1fr); }
  .v4-media-sinfoto .v4-mapb { height: 260px; }
  .v4-media-sinfoto .v4-media-nota { margin-top: 0; }
  .v4-media-nada .v4-media-nota { flex-direction: row; gap: 24px; }
  .v4-media-nada .v4-media-nota span { flex: 1; }
}
/* Barra fija de acciones (fichas, <1024): lo que recibe el foco o se abre por ancla no queda debajo */
@media (max-width: 1023px) {
  html.v4:has(.v4-bar) { scroll-padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
}
/* Calendario de seguimiento: inicio de pujas (anillo verde) y cierre (punto azul); suspendidas y sin fechas, aparte */
.v4-ev { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.v4-ev-m { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--v4-blue); }
.v4-ev-inicio .v4-ev-m, .v4-cal-ls-inicio .v4-ev-m { background: #FFFFFF; box-shadow: inset 0 0 0 2px #1E8E3E; }
.v4-ev-inicio { color: #1E7A37; }
.v4-ev-cierre { color: var(--v4-blue); }
.v4-ev-suspendida .v4-ev-m { background: var(--v4-amber-dot); }
.v4-ev-suspendida { color: var(--v4-amber-ink); }
.v4-ev-sin_fechas .v4-ev-m { background: none; box-shadow: inset 0 0 0 2px var(--v4-gray2); }
.v4-ev-sin_fechas { color: var(--v4-gray); }
.v4-cal-acc { display: flex; flex-wrap: wrap; gap: 8px; }
.v4-cal-ley { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 0 0 10px; font-size: 13px; }
.v4-cal-ley-s { font-size: 13px; color: var(--v4-ink2); }
.v4-cal-mk { display: inline-flex; gap: 3px; }
.v4-cal-cnt-i { background: #FFFFFF; color: #1E7A37; box-shadow: inset 0 0 0 1.5px #1E8E3E; }
.v4-cal-c-pas .v4-cal-cnt-i { color: var(--v4-gray2); box-shadow: inset 0 0 0 1.5px var(--v4-gray2); background: #FFFFFF; }
.v4-cal-ls a { display: flex; align-items: center; gap: 5px; }
.v4-cal-ls a .v4-ev-m { width: 7px; height: 7px; }
.v4-cal-ls a.v4-cal-ls-inicio { background: #EAF6EE; }
.v4-cal-fuente { font-size: 12.5px; color: var(--v4-gray); margin: 10px 2px 0; }
.v4-cal-sig { display: inline-block; margin-left: 10px; padding: 1px 8px; border-radius: 999px; background: var(--v4-blue-soft); color: var(--v4-blue); font-size: 12px; font-weight: 500; }
.v4-cal-ap { font-size: 13.5px; color: var(--v4-gray); margin: 10px 0 2px; }
.v4-cal-aparte { border-style: dashed; }
@media (min-width: 768px) {
  .v4-cal-it { grid-template-columns: 118px minmax(0, 1fr) 190px 132px; }
  .v4-cal-ls a { display: flex; }
}
.v4-cal-lt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v4-cal-h { flex: none; }
/* Mi zona · avisos de cada subasta guardada y lista de avisos (recordatorios y cambios) */
.v4-mz-c { flex-wrap: wrap; }
.v4-mz-avb { height: 44px; gap: 6px; }
.v4-mz-av { flex: 1 0 100%; margin: 0 14px 14px; padding: 14px 16px; border-radius: var(--v4-r-ctl); background: var(--v4-bg); }
.v4-mz-av[hidden] { display: none; }
.v4-mz-av fieldset { border: 0; margin: 0 0 10px; padding: 0; min-width: 0; }
.v4-mz-av legend { font-size: 14px; font-weight: 600; padding: 0; margin-bottom: 4px; }
.v4-mz-av-n { font-size: 13.5px; color: var(--v4-ink2); margin: 2px 0 6px; }
.v4-mz-av-no { color: var(--v4-amber-ink); background: var(--v4-amber-bg); padding: 8px 10px; border-radius: 9px; }
.v4-mz-av-o { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 3px 0; font-size: 15px; line-height: 1.35; cursor: pointer; }
.v4-mz-av-o input { width: 20px; height: 20px; margin: 0; accent-color: var(--v4-blue); flex: none; }
.v4-mz-av-o:has(input:disabled) { color: var(--v4-gray2); cursor: default; }
.v4-mz-av-x { font-size: 12.5px; color: var(--v4-gray); margin: 6px 0 0; }
.v4-mz-av-st { font-size: 13px; color: var(--v4-ink2); margin: 4px 0 0; min-height: 18px; }
.v4-mz-avisos { margin-top: 20px; padding: 18px 16px; scroll-margin-top: calc(var(--v4-top-h) + 12px); }
.v4-mz-avisos-h { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.v4-mz-avisos-h h2 { font-size: 19px; font-weight: 600; margin: 0; }
.v4-mz-sim { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 14px 0 6px; padding: 12px 14px; border: 1px dashed var(--v4-ctl); border-radius: var(--v4-r-ctl); }
.v4-mz-sim-k { flex-basis: 100%; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: var(--v4-amber-ink); }
.v4-mz-sim label { font-size: 14px; }
.v4-mz-sim input { height: 44px; padding: 0 10px; border: 1px solid var(--v4-ctl); border-radius: 10px; background: #FFFFFF; font-size: 15px; max-width: 100%; }
.v4-mz-sim-x { flex-basis: 100%; font-size: 12.5px; color: var(--v4-gray); }
.v4-mz-sim-r { flex-basis: 100%; margin: 0; font-size: 14px; font-weight: 500; }
.v4-mz-sim-r:empty { display: none; }
.v4-mz-avl { list-style: none; margin: 12px 0 0; padding: 0; }
.v4-mz-avi { display: grid; grid-template-columns: 92px minmax(0, 1fr); grid-template-areas: "t d" ". a"; gap: 4px 12px; padding: 12px 0; border-top: 1px solid var(--v4-line2); }
.v4-mz-avi time { grid-area: t; font-size: 13px; color: var(--v4-gray); font-variant-numeric: tabular-nums; padding-top: 1px; }
.v4-mz-avi div { grid-area: d; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.v4-mz-avi b { font-size: 15px; font-weight: 600; }
.v4-mz-avi span { font-size: 14px; color: var(--v4-ink2); overflow-wrap: anywhere; }
.v4-mz-avi a { grid-area: a; display: inline-flex; align-items: center; min-height: 36px; font-size: 14px; font-weight: 500; }
.v4-mz-avi-recordatorio b { color: var(--v4-blue); }
.v4-mz-avi-cambio_estado b, .v4-mz-avi-cambio_fecha b { color: var(--v4-amber-ink); }
@media (max-width: 1023px) {
  .v4-mz-av { margin: 0 14px 14px; }
}
@media (min-width: 1024px) {
  .v4-mz-av { margin: 4px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
  .v4-mz-av[hidden] { display: none; }
  .v4-mz-av-x, .v4-mz-av-st { grid-column: 1 / -1; }
  .v4-mz .v4-lc-f { flex-basis: 360px; }
  .v4-mz-acc { flex-wrap: nowrap; justify-content: flex-end; }
  .v4-mz-acc .v4-cta { flex: none; padding: 9px 14px; }
  .v4-mz-avb { height: auto; padding: 9px 12px; font-size: 14px; border-radius: 10px; }
  .v4-mz-avisos { padding: 20px 24px; }
  .v4-mz-avi { grid-template-columns: 110px minmax(0, 1fr) auto; grid-template-areas: "t d a"; align-items: start; }
}
