/* DANTRO · Centro de decisiones. Sistema de diseño (ver .interface-design/system.md).
   Color principal: azul río (azul marino). Neutros fríos, superficies blancas con relieve suave, un solo acento.
   El menú lateral y la barra superior móvil van en azul marino en ambos temas. */
@layer reset, tokens, base, components, layout, pages, motion;

/* ---------- Fuentes autoalojadas (SIL OFL, ver fonts/LICENSE.txt): Poppins para la interfaz e IBM Plex Mono para etiquetas y datos ---------- */
@font-face { font-family: "Poppins"; src: url("fonts/poppins-400-latin.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("fonts/poppins-500-latin.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("fonts/poppins-600-latin.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("fonts/poppins-700-latin.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("fonts/poppins-800-latin.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/plexmono-400-latin.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/plexmono-500-latin.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/plexmono-600-latin.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body, h1, h2, h3, h4, p, ul, ol, dl, dd, figure, fieldset { margin: 0; }
  ul, ol { padding: 0; }
  button, input, select, textarea { font: inherit; color: inherit; }
  button { background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  a { color: inherit; -webkit-tap-highlight-color: transparent; }
  img, svg { display: block; max-width: 100%; }
  [hidden] { display: none !important; }
}

@layer tokens {
  :root {
    color-scheme: light dark;

    /* Superficies: garúa (fondo) < muro (tarjeta) ; losa = elevado ; yeso = hueco donde se escribe */
    --garua: light-dark(#E4EAED, #0A1519);
    --muro: light-dark(#FFFFFF, #12232A);
    --losa: light-dark(#FFFFFF, #19303A);
    --yeso: light-dark(#EDF1F3, #091217);

    /* Texto */
    --tinta: light-dark(#14232B, #E6F0F2);
    --pizarra: light-dark(#3D4F59, #B7C8CE);
    --cemento: light-dark(#566872, #8FA5AD);
    --niebla: light-dark(#7F909A, #657B84);

    /* Filetes: de la costura más tenue al borde de control (>= 3:1) */
    --filete-1: light-dark(rgb(20 40 50 / .08), rgb(160 200 210 / .10));
    --filete-2: light-dark(rgb(20 40 50 / .15), rgb(160 200 210 / .18));
    --filete-3: light-dark(rgb(20 35 43 / .55), rgb(160 200 210 / .5));

    /* Color principal: azul río */
    --rio: light-dark(#0C4A57, #F4B34E);
    --rio-hover: light-dark(#115F70, #FFC56E);
    --sobre-rio: light-dark(#FFFFFF, #1B1204);
    --enlace: light-dark(#06606A, #67D7CE);
    --rio-suave: light-dark(rgb(8 107 118 / .10), rgb(103 215 206 / .13));
    --progreso: light-dark(#0E8A93, #5CCFC6);

    /* Series de los gráficos (alternativas A a E): también llevan letra, el color nunca es la única señal */
    --serie-1: light-dark(#0E7C86, #5CCFC6);
    --serie-2: light-dark(#A86300, #F4B34E);
    --serie-3: light-dark(#25264B, #A9B0F5);
    --serie-4: light-dark(#C2461F, #FF9A7A);
    --serie-5: light-dark(#5E7A1F, #B8D96B);
    --sobre-serie: light-dark(#FFFFFF, #08141A);

    /* Navegación y tarjeta de avance: azul marino fijo en ambos temas */
    --rail: light-dark(#0C4A57, #08333D);
    --rail-ink: #E8F0FB;
    --rail-ink-2: #9FB3CE;
    --rail-linea: rgb(255 255 255 / .12);
    --hero-1: light-dark(#0F5A68, #11505E);
    --hero-2: light-dark(#0A4350, #0B3C48);

    /* Estados */
    --jardinera: light-dark(#166534, #4ADE80);
    --jardinera-suave: light-dark(rgb(22 101 52 / .10), rgb(74 222 128 / .14));
    --bolardo: light-dark(#92400E, #FBBF24);
    --bolardo-suave: light-dark(#FEF3C7, rgb(251 191 36 / .14));
    --alarma: light-dark(#B42318, #F87171);
    --alarma-suave: light-dark(rgb(180 35 24 / .08), rgb(248 113 113 / .14));
    --led: #FFB547;
    --ambar: #F4B34E;
    --ciruela: light-dark(#25264B, #1B1C3E);
    --grafico: light-dark(#0C5360, #5CCFC6);
    --led-fondo: #1F2045; /* dígitos del indicador de piso, sobre fondo negro fijo */

    --acento: light-dark(#E8A33D, #F4B34E);
    --sobre-acento: #2A1A00;

    --primario: var(--rio);
    --sobre-primario: var(--sobre-rio);

    --sombra: light-dark(rgb(18 45 55 / .22), rgb(0 0 0 / .6));
    --relieve: 0 1px 2px light-dark(rgb(18 45 55 / .06), rgb(0 0 0 / .35)), 0 10px 24px -16px light-dark(rgb(18 45 55 / .22), rgb(0 0 0 / .55));
    --sombra-flota: 0 20px 44px -14px var(--sombra), 0 2px 6px -2px var(--sombra);

    --font-ui: "Poppins", "Segoe UI", system-ui, -apple-system, sans-serif;
    --font-display: "Poppins", "Segoe UI", system-ui, sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, Consolas, "Liberation Mono", monospace;
    
    /* Radios: controles 10 · tarjetas 14 · hojas 20 · insignias en píldora */
    --r-control: 8px;
    --r-panel: 12px;
    --r-sheet: 16px;
    --r-pill: 999px;

    /* Espaciado en base 4 */
    --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;

    --rail-w: 256px;
    --topbar-h: 56px;
    --tabbar-h: 64px;
    --content-w: 1040px;
    --gutter: 16px;

    --z-sticky: 10;
    --z-bar: 20;
    --z-toast: 60;

    --ease-out: cubic-bezier(.23, 1, .32, 1);
    --ease-drawer: cubic-bezier(.32, .72, 0, 1);
  }
  :root[data-theme="light"] { color-scheme: light; }
  :root[data-theme="dark"] { color-scheme: dark; }
  @media (min-width: 640px) { :root { --gutter: 24px; } }

  /* Navegadores sin light-dark(): se queda el tema claro. */
  @supports not (color: light-dark(#000, #fff)) {
    :root {
      --garua: #EEF2F7; --muro: #FFFFFF; --losa: #FFFFFF; --yeso: #F2F5FA;
      --tinta: #0E1C2F; --pizarra: #3F4E63; --cemento: #566780; --niebla: #7C8CA3;
      --filete-1: rgb(15 35 65 / .08); --filete-2: rgb(15 35 65 / .15); --filete-3: rgb(15 35 65 / .50);
      --rio: #0F3A6E; --rio-hover: #164B8C; --enlace: #1D5BA8; --rio-suave: rgb(29 91 168 / .09); --progreso: #2B6CB8;
      --rail: #0A2342; --hero-1: #0F3A6E; --hero-2: #0A2A52;
      --jardinera: #166534; --jardinera-suave: rgb(22 101 52 / .10); --bolardo: #92400E; --bolardo-suave: #FEF3C7;
      --alarma: #B42318; --alarma-suave: rgb(180 35 24 / .08);
      --serie-1: #1D5BA8; --serie-2: #B45309; --serie-3: #0F766E; --serie-4: #7C3AED; --serie-5: #BE185D; --sobre-serie: #FFFFFF;
      --sombra: rgb(15 35 65 / .18);
    }
  }
}

@layer base {
  html { scroll-behavior: smooth; }
  body {
    min-height: 100dvh;
    background: var(--garua);
    color: var(--tinta);
    font: 400 15px/1.55 var(--font-ui);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-wrap: break-word;
  }
  h1, h2, h3 { font-weight: 700; letter-spacing: -.015em; line-height: 1.2; text-wrap: balance; }
  p { text-wrap: pretty; }
  strong { font-weight: 650; }
  ::selection { background: var(--rio-suave); }
  :focus-visible { outline: 2px solid var(--enlace); outline-offset: 2px; }
  :focus:not(:focus-visible) { outline: none; }
  .ico { flex: none; display: inline-block; vertical-align: middle; }
  .sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
  .muted { color: var(--cemento); }
  .small { font-size: 13px; }
  .sub { color: var(--pizarra); font-size: 15px; line-height: 1.6; max-width: 62ch; }
  .eyebrow { font-size: 13px; font-weight: 600; color: var(--cemento); margin-bottom: 4px; }
  .lede { font-size: 17px; line-height: 1.55; color: var(--pizarra); max-width: 64ch; }
  .section { display: flex; align-items: center; gap: var(--sp-2); font-size: 18px; font-weight: 700; margin-bottom: var(--sp-3); }
  .section .ico { color: var(--enlace); }
  .section:not(:first-child) { margin-top: var(--sp-6); }
  .note + .threads { margin-top: var(--sp-4); }
  .section--sm { font-size: 16px; margin: var(--sp-5) 0 var(--sp-3); }
  .footnote { font-size: 12px; line-height: 1.6; color: var(--cemento); margin-top: var(--sp-2); }
  .platform { font-size: 12px; color: var(--cemento); }
  .platform strong { font-weight: 800; letter-spacing: .14em; color: var(--pizarra); }
  .skip-link { position: absolute; left: 12px; top: -64px; z-index: 100; padding: 10px 14px; border-radius: var(--r-control); background: var(--rio); color: var(--sobre-rio); font-weight: 600; text-decoration: none; }
  .skip-link:focus { top: 12px; }
}

@layer components {
  /* ---------- Marca ---------- */
  .mark__tile { fill: #0A2342; }
  .mark__front { fill: #3F7FD6; }
  .mark__side { fill: #2A5AA3; }
  .mark__slab { fill: #FFFFFF; }
  .mark { border-radius: 25%; box-shadow: 0 0 0 1px rgb(255 255 255 / .16); }
  .lockup { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; }
  .lockup__text { display: grid; min-width: 0; }
  .lockup__text strong { font-size: 16px; line-height: 1.2; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .lockup__text span { font-size: 12px; margin-top: 2px; }
  .lockup--light { color: #fff; }
  .lockup--light .lockup__text span { color: rgb(255 255 255 / .75); }

  /* ---------- Botones ---------- */
  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 0 18px; border: 1px solid var(--filete-3); border-radius: var(--r-control);
    background: var(--muro); color: var(--tinta); font-weight: 650; font-size: 15px; line-height: 1; text-decoration: none; white-space: nowrap;
    transition: background-color 140ms, border-color 140ms, transform 140ms var(--ease-out), opacity 140ms;
  }
  .btn:active:not(:disabled) { transform: scale(.98); }
  .btn--primary { background: var(--rio); border-color: var(--rio); color: var(--sobre-rio); }
  .btn--light { background: #fff; border-color: #fff; color: #0A2342; }
  .btn--quiet { background: transparent; border-color: transparent; color: var(--pizarra); }
  .btn--block { width: 100%; }
  .btn--sm { min-height: 40px; padding: 0 14px; font-size: 14px; }
  .btn:disabled { opacity: .5; cursor: not-allowed; }
  @media (hover: hover) and (pointer: fine) {
    .btn:hover:not(:disabled) { border-color: var(--enlace); }
    .btn--primary:hover:not(:disabled) { background: var(--rio-hover); border-color: var(--rio-hover); }
    .btn--light:hover:not(:disabled) { background: #E8F0FB; border-color: #E8F0FB; }
    .btn--quiet:hover:not(:disabled) { background: var(--filete-1); border-color: transparent; color: var(--tinta); }
  }
  .btn[data-busy="true"] { position: relative; color: transparent; cursor: progress; opacity: 1; }
  .btn[data-busy="true"] .ico { opacity: 0; }
  .btn[data-busy="true"]::after {
    content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid var(--sobre-rio); border-right-color: transparent; animation: spin .7s linear infinite;
  }
  .btn:not(.btn--primary)[data-busy="true"]::after { border-color: var(--tinta); border-right-color: transparent; }
  .linkbtn { display: inline-flex; align-items: center; min-height: 40px; padding: 0 4px; color: var(--enlace); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }
  .iconbtn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-panel); color: var(--pizarra); flex: none; transition: background-color 140ms, color 140ms; }
  .iconbtn:active { transform: scale(.96); }
  @media (hover: hover) and (pointer: fine) { .iconbtn:hover { background: var(--filete-1); color: var(--tinta); } }
  .avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--rio-suave); color: var(--enlace); font-weight: 700; font-size: 15px; flex: none; }
  .avatar--lg { width: 56px; height: 56px; font-size: 22px; }

  /* ---------- Campos ---------- */
  .field { display: grid; align-content: start; gap: var(--sp-2); font-size: 14px; }
  .field__label { font-weight: 650; font-size: 14px; color: var(--tinta); }
  .field__hint { font-size: 13px; line-height: 1.45; color: var(--cemento); }
  .field__input {
    width: 100%; min-height: 48px; padding: 12px 14px; font-size: 16px; line-height: 1.4;
    border: 1px solid var(--filete-3); border-radius: var(--r-control); background: var(--muro); color: var(--tinta);
    transition: border-color 140ms, box-shadow 140ms;
  }
  .field__input { min-width: 0; max-width: 100%; box-sizing: border-box; }
  /* iOS Safari dibuja los campos de fecha y hora con su propio ancho y centrados: se igualan a los demás campos. */
  .field__input[type="date"], .field__input[type="time"] { -webkit-appearance: none; appearance: none; display: block; text-align: left; line-height: 1.4; }
  .field__input[type="date"]::-webkit-date-and-time-value, .field__input[type="time"]::-webkit-date-and-time-value { text-align: left; margin: 0; min-height: 1.4em; }
  .field__input::placeholder { color: var(--cemento); opacity: 1; }
  .field__input:focus { outline: none; border-color: var(--enlace); box-shadow: 0 0 0 3px color-mix(in srgb, var(--enlace) 25%, transparent); }
  .field__input--mono { font-family: var(--font-mono); font-size: 15px; }
  textarea.field__input { min-height: 112px; resize: vertical; line-height: 1.5; }
  select.field__input {
    appearance: none; padding-right: 40px; cursor: pointer; text-overflow: ellipsis;
    background-image: linear-gradient(45deg, transparent 50%, var(--cemento) 50%), linear-gradient(135deg, var(--cemento) 50%, transparent 50%);
    background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat;
  }
  .field__control { position: relative; }
  .field__control .field__input { padding-right: 52px; }
  /* Edge dibuja su propio ojo en los campos de contraseña; la interfaz ya trae el suyo. */
  .field__control input[type="password"]::-ms-reveal { display: none; }
  .field__toggle { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r-control); color: var(--cemento); }
  .field__toggle .ico:last-child { display: none; }
  .field__toggle[aria-pressed="true"] .ico:first-child { display: none; }
  .field__toggle[aria-pressed="true"] .ico:last-child { display: block; }
  .form-error { display: flex; align-items: flex-start; gap: var(--sp-2); padding: 10px 12px; border-radius: var(--r-control); background: var(--alarma-suave); color: var(--alarma); font-size: 14px; font-weight: 550; line-height: 1.45; }
  .form-error .ico { margin-top: 1px; }
  .counter { font-size: 12px; color: var(--cemento); font-variant-numeric: tabular-nums; }
  .checkline { display: flex; align-items: flex-start; gap: var(--sp-3); font-size: 14px; line-height: 1.5; cursor: pointer; }
  .checkline input {
    appearance: none; flex: none; width: 22px; height: 22px; margin: 1px 0 0; display: grid; place-items: center; cursor: pointer;
    border: 1.5px solid var(--filete-3); border-radius: var(--r-control); background: var(--muro); transition: background-color 140ms, border-color 140ms;
  }
  .checkline input:checked { background: var(--rio); border-color: var(--rio); }
  .checkline input:checked::after { content: ""; width: 6px; height: 11px; border: solid var(--sobre-rio); border-width: 0 2.5px 2.5px 0; transform: translate(0, -1px) rotate(45deg); }
  .checkline input:focus-visible { outline: 2px solid var(--enlace); outline-offset: 2px; }

  /* ---------- Insignias, notas y estados vacíos ---------- */
  .badge { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: var(--r-pill); background: var(--yeso); color: var(--pizarra); font-size: 12px; font-weight: 650; line-height: 1; white-space: nowrap; }
  .badge--ok { background: var(--jardinera-suave); color: var(--jardinera); }
  .badge--warn { background: var(--bolardo-suave); color: var(--bolardo); }
  .badge--muted { background: var(--yeso); color: var(--cemento); }
  .badge--cat { background: var(--rio-suave); color: var(--enlace); }
  .note { display: flex; align-items: flex-start; gap: var(--sp-3); padding: 14px 16px; border-radius: var(--r-panel); background: var(--muro); box-shadow: inset 0 0 0 1px var(--filete-1); color: var(--pizarra); font-size: 14px; line-height: 1.55; }
  .note strong { color: var(--tinta); }
  .note > div > strong { display: block; }
  .note p + p { margin-top: 4px; }
  .note .ico { margin-top: 1px; color: var(--cemento); }
  .note--info { background: var(--rio-suave); box-shadow: none; }
  .note--info .ico { color: var(--enlace); }
  .note--warning { background: var(--bolardo-suave); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bolardo) 24%, transparent); }
  .note--warning .ico { color: var(--bolardo); }
  .note--fold { display: block; padding: 0; }
  .note--fold summary { display: flex; align-items: center; gap: var(--sp-3); min-height: 52px; padding: 10px 16px; cursor: pointer; list-style: none; }
  .note--fold summary::-webkit-details-marker { display: none; }
  .note__title { display: grid; flex: 1; min-width: 0; line-height: 1.35; }
  .note__title span { font-size: 13px; }
  .note__caret { color: var(--cemento); transition: transform 180ms var(--ease-out); }
  .note--fold[open] .note__caret { transform: rotate(180deg); }
  .note--fold > p { padding: 0 16px 14px 48px; }
  .empty { display: grid; justify-items: center; text-align: center; gap: var(--sp-2); padding: var(--sp-7) var(--sp-4); border: 1px dashed var(--filete-3); border-radius: var(--r-panel); background: var(--muro); }
  .empty__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--rio-suave); color: var(--enlace); margin-bottom: var(--sp-2); }
  .empty__title { font-size: 19px; }
  .empty__text { color: var(--pizarra); max-width: 44ch; margin-bottom: var(--sp-3); }
  .panel { padding: var(--sp-5); background: var(--muro); border-radius: var(--r-panel); box-shadow: var(--relieve), inset 0 0 0 1px var(--filete-1); }
  .panel .sub { margin-bottom: var(--sp-4); }

  /* ---------- Hojas (diálogos) ---------- */
  .sheet {
    width: min(520px, calc(100vw - 32px)); max-height: min(90dvh, 760px); padding: 0; overflow: auto; overscroll-behavior: contain;
    border: 1px solid var(--filete-2); border-radius: var(--r-sheet); background: var(--losa); color: var(--tinta); box-shadow: var(--sombra-flota);
  }
  /* Los diálogos anchos solo existen en pantallas grandes: en celular todos son una hoja inferior a todo el ancho. */
  @media (min-width: 641px) {
    .sheet[data-kind="ballot-editor"] { width: min(680px, calc(100vw - 32px)); }
    .sheet[data-kind="reserve"] { width: min(520px, calc(100vw - 32px)); }
  }
  .rvgrid, .rvgrid__col { display: grid; gap: var(--sp-4); align-content: start; }
  .rvslot { display: contents; }
  @media (min-width: 900px) {
    .sheet[data-kind="reserve"] { width: min(860px, calc(100vw - 64px)); }
    .rvgrid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-5); }
    .sheet[data-kind="reserve"] { max-height: min(96dvh, 860px); }
    .sheet__panel--tight { gap: var(--sp-3); padding: var(--sp-4) var(--sp-5); }
    .sheet__panel--tight .rules { gap: 4px; }
    .sheet__panel--tight .rules li { font-size: 13.5px; line-height: 1.4; }
    .sheet__panel--tight .sheet__actions--row { grid-auto-flow: column; grid-auto-columns: 1fr; }
  }
  .sheet::backdrop { background: rgb(5 14 28 / .6); backdrop-filter: blur(3px); }
  .sheet__panel { display: grid; gap: var(--sp-4); padding: var(--sp-5); }
  .sheet__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
  .sheet__head .iconbtn { margin: -8px -8px -8px 0; }
  .sheet__title { font-size: 21px; }
  .sheet__lead { color: var(--pizarra); }
  .sheet__summary { display: grid; gap: 2px; padding: var(--sp-4); border-radius: var(--r-panel); background: var(--yeso); }
  .sheet__summary strong { font-size: 16px; line-height: 1.35; margin-bottom: var(--sp-2); }
  .sheet__account { display: flex; align-items: center; gap: var(--sp-4); }
  .sheet__account > div { display: grid; min-width: 0; }
  .sheet__email { overflow-wrap: anywhere; }
  .sheet__meta { font-size: 13px; color: var(--cemento); }
  .sheet__actions { display: grid; gap: var(--sp-2); }
  .sheet__actions--row { grid-auto-flow: column; grid-auto-columns: 1fr; }
  @media (max-width: 640px) {
    .sheet { width: 100%; max-width: none; margin: auto 0 0; border-bottom: 0; border-radius: var(--r-sheet) var(--r-sheet) 0 0; max-height: 92dvh; }
    .sheet__panel { padding-bottom: calc(var(--sp-5) + env(safe-area-inset-bottom)); }
    .sheet__actions--row { grid-auto-flow: row; }
    .sheet__actions--row .btn:last-child { order: -1; }
  }

  /* ---------- Avisos ---------- */
  .toasts { position: fixed; z-index: var(--z-toast); inset: calc(env(safe-area-inset-top) + 12px) 12px auto 12px; display: grid; justify-items: center; gap: var(--sp-2); pointer-events: none; }
  .toast {
    pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; max-width: min(460px, 100%); padding: 12px 8px 12px 14px;
    border-radius: var(--r-panel); background: light-dark(#0A2342, #E8EEF7); color: light-dark(#F4F8FD, #0A1220); box-shadow: var(--sombra-flota);
    animation: toast-in 240ms var(--ease-out);
    transition: opacity 140ms ease-out, transform 140ms ease-out;
  }
  .toast .ico { margin-top: 1px; }
  .toast--success .ico { color: light-dark(#86EFAC, #166534); }
  .toast--error .ico { color: light-dark(#FCA5A5, #B42318); }
  .toast--info .ico { color: light-dark(#A9C7F0, #1D5BA8); }
  .toast__text { flex: 1; font-size: 14px; line-height: 1.5; padding-top: 1px; }
  .toast__close { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r-panel); opacity: .72; flex: none; }
  .toast__close:hover { opacity: 1; }
  .toast.is-leaving { opacity: 0; transform: translateY(-6px); }
  @media (min-width: 960px) {
    .toasts { inset: auto 24px 24px auto; justify-items: end; }
    .toast { animation-name: toast-in-up; }
    .toast.is-leaving { transform: translateY(6px); }
  }

  /* ---------- Esqueletos ---------- */
  .skeleton { display: grid; gap: var(--sp-3); }
  .skel { border-radius: var(--r-panel); background: var(--filete-1); animation: pulse 1.5s ease-in-out infinite; }
  .skel--eyebrow { width: 140px; height: 12px; }
  .skel--title { width: min(60%, 360px); height: 34px; }
  .skel--text { width: min(40%, 240px); height: 16px; margin-bottom: var(--sp-3); }
  .skel--panel { height: 120px; border-radius: var(--r-panel); }
}

@layer layout {
  /* ---------- Estructura: menú lateral claro con la sección activa en azul río, encabezado dentro del contenido y barra inferior con icono y nombre ---------- */
  .shell { min-height: 100dvh; }
  .offline { display: none; align-items: center; justify-content: center; gap: var(--sp-2); padding: 8px var(--gutter); background: var(--bolardo-suave); color: var(--bolardo); font-size: 13px; font-weight: 600; }
  .is-offline .offline { display: flex; }
  .side { display: none; }

  /* Barra superior del celular */
  .top { position: sticky; top: 0; z-index: var(--z-bar); display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: calc(10px + env(safe-area-inset-top)) var(--sp-3) 10px var(--gutter); background: var(--muro); color: var(--tinta); box-shadow: 0 1px 0 var(--filete-2); }
  .top__brand { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; color: var(--tinta); text-decoration: none; }
  .top__name strong { font-family: var(--font-display); font-size: 18px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
  .top__tools { display: flex; align-items: center; gap: 2px; }
  .top .iconbtn { color: var(--pizarra); }
  .top .avatar { background: var(--rio); color: var(--sobre-rio); }
  .view { width: 100%; max-width: calc(var(--content-w) + 2 * var(--gutter)); margin: 0 auto; padding: var(--sp-5) var(--gutter) calc(var(--tabbar-h) + env(safe-area-inset-bottom) + var(--sp-6)); outline: none; min-width: 0; }

  /* Barra inferior del celular: siempre icono y nombre */
  .dock { position: fixed; inset: auto 0 0 0; z-index: var(--z-bar); display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 2px 4px calc(2px + env(safe-area-inset-bottom)); background: var(--muro); box-shadow: 0 -1px 0 var(--filete-2), 0 -10px 24px -18px rgb(18 45 55 / .35); }
  .dock__item { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; min-height: 56px; padding: 6px 2px 4px; color: var(--cemento); font-size: 11px; font-weight: 500; line-height: 1.1; text-decoration: none; }
  .dock__label { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .dock__item[aria-current="page"] { color: var(--enlace); font-weight: 600; }
  .dock__item[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 22%; right: 22%; height: 3px; border-radius: 0 0 3px 3px; background: var(--rio); }
  .dock__count { position: absolute; top: 4px; left: calc(50% + 6px); display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-pill); background: #E5484D; color: #fff; font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; }
  .dock__item:focus-visible { outline: 2px solid var(--enlace); outline-offset: -2px; }
  .shell[data-route="propuesta"] .dock { display: none; }
  .shell[data-route="propuesta"] .view { padding-bottom: var(--sp-5); }

  @media (min-width: 960px) {
    .shell { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); }
    .offline { grid-column: 1 / -1; }
    .top, .dock { display: none; }
    .side { display: block; background: var(--muro); box-shadow: inset -1px 0 0 var(--filete-2); }
    .side__in { position: sticky; top: 0; display: flex; flex-direction: column; height: 100dvh; }
    .view { max-width: 1320px; margin: 0; padding: var(--sp-6) clamp(24px, 3vw, 44px) 56px; }
    .shell[data-route="propuesta"] .view { padding-bottom: 56px; }
  }

  /* Menú lateral: marca, secciones agrupadas y la cuenta abajo */
  .side__brand { display: flex; align-items: center; gap: 10px; padding: 22px 20px 18px; color: var(--tinta); text-decoration: none; }
  .side__name { display: grid; line-height: 1.15; text-align: left; }
  .side__name strong { font-family: var(--font-display); font-size: 18px; font-weight: 700; letter-spacing: -.02em; color: var(--rio); }
  .side__name small { font-size: 12px; color: var(--cemento); }
  .side__nav { flex: 1; min-height: 0; display: grid; align-content: start; gap: 18px; padding: 8px 14px 12px; overflow-y: auto; scrollbar-width: none; }
  .side__nav::-webkit-scrollbar { display: none; }
  .sidegroup { display: grid; gap: 2px; }
  .sidegroup__name { padding: 0 12px 6px; font-size: 12px; font-weight: 600; color: var(--cemento); }
  .sidelink { position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--pizarra); font-size: 14.5px; font-weight: 500; text-decoration: none; transition: background-color 120ms, color 120ms; }
  .sidelink__icon { display: grid; place-items: center; width: 24px; height: 24px; flex: none; }
  .sidelink__label { flex: 1; }
  .sidelink[aria-current="page"] { background: var(--rio-suave); color: var(--enlace); font-weight: 600; }
  @media (hover: hover) and (pointer: fine) { .sidelink:not([aria-current="page"]):hover { background: var(--yeso); color: var(--tinta); } }
  .sidelink:focus-visible { outline: 2px solid var(--enlace); outline-offset: -2px; }
  .sidelink__count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: var(--r-pill); background: #E5484D; color: #fff; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
  .side__user { display: flex; align-items: center; gap: 4px; margin: 0 10px 12px; padding: 10px; border-radius: 12px; background: var(--yeso); }
  .side__me { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; padding: 2px; border-radius: 8px; color: var(--tinta); text-align: left; }
  .side__avatar { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--rio); font-size: 14px; font-weight: 700; color: var(--sobre-rio); }
  .side__who { display: grid; min-width: 0; line-height: 1.3; }
  .side__who strong { overflow: hidden; font-size: 13.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
  .side__who small { overflow: hidden; font-size: 12px; color: var(--cemento); text-overflow: ellipsis; white-space: nowrap; }
  .side__user .iconbtn { color: var(--cemento); }
  @media (hover: hover) and (pointer: fine) { .side__user .iconbtn:hover { background: var(--muro); color: var(--tinta); } }
  .avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--rio-suave); color: var(--enlace); font-weight: 700; font-size: 15px; flex: none; }
  .avatar--lg { width: 56px; height: 56px; font-size: 22px; }
}

@layer pages {
  /* ---------- Encabezados ---------- */
  .pagehead { margin-bottom: var(--sp-4); }
  .pagehead__title { font-size: clamp(24px, 4vw, 32px); line-height: 1.15; margin-bottom: 6px; }
  .crumb { display: inline-flex; align-items: center; gap: var(--sp-2); min-height: 44px; margin: calc(var(--sp-2) * -1) 0 var(--sp-1); color: var(--enlace); font-weight: 650; text-decoration: none; }
  @media (hover: hover) and (pointer: fine) { .crumb:hover { text-decoration: underline; text-underline-offset: 3px; } }
  .local-demo { margin-bottom: var(--sp-4); }

  /* ---------- Acceso ---------- */
  .login-wrap { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); }
  .login-hero { position: relative; min-height: 100dvh; overflow: hidden; isolation: isolate; background: #0A2342; color: #fff; }
  .login-hero__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 52% 36%; }
  .login-hero__scrim { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(7 22 44 / .66) 0%, rgb(7 22 44 / .12) 30%, rgb(7 22 44 / .38) 56%, rgb(7 22 44 / .92) 100%); }
  .login-hero__inner { display: flex; flex-direction: column; justify-content: space-between; gap: var(--sp-6); min-height: 100dvh; padding: var(--sp-6) var(--sp-7) var(--sp-7); }
  .login-hero__copy h1 { max-width: 16ch; font-size: clamp(32px, 3.4vw, 46px); line-height: 1.08; letter-spacing: -.025em; font-weight: 800; color: #fff; }
  .login-hero__copy p { max-width: 42ch; margin: var(--sp-4) 0 var(--sp-5); font-size: 17px; line-height: 1.55; color: rgb(255 255 255 / .9); }
  .trust { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
  .trust li { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 550; color: #fff; }
  .trust__icon { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: var(--r-panel); background: rgb(255 255 255 / .16); backdrop-filter: blur(4px); }
  .login-box { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-5); min-height: 100dvh; padding: var(--sp-7) var(--sp-5); background: var(--garua); }
  .login-card { width: min(100%, 440px); padding: var(--sp-6); background: var(--muro); border-radius: var(--r-panel); box-shadow: var(--relieve), inset 0 0 0 1px var(--filete-1); }
  .login-inner { display: grid; gap: var(--sp-4); }
  .login-inner h2 { font-size: 28px; letter-spacing: -.02em; }
  .login-inner .stack { display: grid; gap: var(--sp-2); margin-top: var(--sp-2); }
  .auth-switch-row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 2px 6px; color: var(--pizarra); font-size: 14px; }
  .auth-state .small { margin-top: var(--sp-4); }
  .auth-forgot { display: flex; justify-content: flex-end; margin-top: calc(var(--sp-2) * -1); }
  .hatswitch { display: grid; gap: var(--sp-2); margin: 0 10px 10px; }
  .hatswitch__label { margin: 0; color: var(--pizarra); font-size: 12.5px; font-weight: 600; }
  .hatswitch .seg { width: 100%; }
  .hatswitch .seg__btn { flex: 1 1 0; padding: 0 10px; font-size: 13px; }
  .side .hatswitch .seg { flex-direction: column; }
  .sheet__panel .hatswitch { margin: var(--sp-3) 0 0; }
  .steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); margin: 0 0 var(--sp-2); padding: 0; list-style: none; }
  .steps__item { display: flex; align-items: flex-start; gap: 6px; padding-top: 10px; border-top: 3px solid var(--filete-2); font-size: 12px; line-height: 1.3; color: var(--cemento); }
  .steps__item.is-done, .steps__item.is-current { border-top-color: var(--rio); }
  .steps__item.is-current { color: var(--tinta); font-weight: 650; }
  .steps__dot { display: inline-grid; place-items: center; width: 18px; height: 18px; flex: none; border-radius: 50%; background: var(--yeso); font-size: 11px; font-weight: 700; }
  .is-done .steps__dot { background: var(--rio-suave); color: var(--enlace); }
  .is-current .steps__dot { background: var(--rio); color: var(--sobre-rio); }
  @media (max-width: 899px) {
    .login-wrap { grid-template-columns: minmax(0, 1fr); }
    .login-hero, .login-hero__inner { min-height: 0; }
    .login-hero { height: 280px; }
    .login-hero__scrim { background: linear-gradient(180deg, rgb(7 22 44 / .78) 0%, rgb(7 22 44 / .25) 34%, rgb(7 22 44 / .45) 60%, rgb(7 22 44 / .92) 100%); }
    .login-hero__inner { height: 100%; padding: var(--sp-5) var(--sp-5) var(--sp-6); gap: var(--sp-3); }
    .login-hero__copy h1 { font-size: 25px; max-width: 18ch; }
    .login-hero__copy p, .trust { display: none; }
    .login-box { justify-content: flex-start; min-height: 0; margin-top: -22px; padding: var(--sp-5) var(--sp-4) var(--sp-6); border-radius: var(--r-sheet) var(--r-sheet) 0 0; position: relative; }
    .login-card { padding: var(--sp-5); }
  }

  /* ---------- Carga inicial ---------- */
  .boot { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: var(--sp-4); }
  .boot__text { font-size: 14px; font-weight: 600; color: var(--cemento); }
  .mark--animated { box-shadow: none; }

  /* ---------- Avance ---------- */
  .overview {
    position: relative; isolation: isolate; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-4) var(--sp-5);
    margin-bottom: var(--sp-4); padding: var(--sp-5); color: #fff; border-radius: var(--r-panel);
    background: linear-gradient(135deg, var(--hero-1), var(--hero-2)); box-shadow: var(--relieve);
  }
  .overview::before {
    content: ""; position: absolute; inset: 0 0 0 auto; z-index: -1; width: 48%; opacity: .22;
    background: url("assets/edificio-640.webp") 60% 38% / cover no-repeat;
    -webkit-mask-image: linear-gradient(to left, #000 0%, transparent 90%); mask-image: linear-gradient(to left, #000 0%, transparent 90%);
  }
  .overview__main { display: grid; gap: var(--sp-3); flex: 1 1 340px; min-width: 0; }
  .response-progress { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
  .overview__num { font-size: clamp(40px, 7vw, 56px); line-height: 1; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
  .overview__of { font-size: 15px; font-weight: 600; color: rgb(255 255 255 / .85); }
  .progress { display: flex; gap: 4px; max-width: 460px; }
  .progress__seg { position: relative; flex: 1 1 0; height: 8px; min-width: 3px; border-radius: 4px; background: rgb(255 255 255 / .22); overflow: hidden; }
  .progress__seg.is-done { background: #8DBBF7; }
  .overview__next { display: grid; gap: 2px; max-width: 52ch; font-size: 15px; font-weight: 650; line-height: 1.4; }
  .overview__next span { font-size: 13px; font-weight: 600; color: rgb(255 255 255 / .72); }
  .overview__done { display: flex; align-items: flex-start; gap: 10px; font-weight: 600; max-width: 34ch; }
  .overview__done .ico { margin-top: 1px; color: #8DE0A8; }
  @media (max-width: 639px) {
    .overview { padding: var(--sp-4); gap: var(--sp-3); }
    .overview__actions { flex: 1 1 100%; }
    .overview__actions .btn { width: 100%; }
    .overview::before { width: 70%; opacity: .14; }
  }

  /* ---------- Filtros ---------- */
  .filters { display: grid; gap: var(--sp-3); margin-bottom: var(--sp-4); }
  .filters__group { display: grid; gap: var(--sp-2); min-width: 0; }
  .filters__label { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .filters__summary { font-size: 13px; color: var(--cemento); }
  .seg { display: flex; width: fit-content; max-width: 100%; gap: 2px; padding: 4px; overflow-x: auto; scrollbar-width: none; background: var(--filete-1); border-radius: var(--r-panel); }
  .seg::-webkit-scrollbar, .chips::-webkit-scrollbar { display: none; }
  .seg__btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2); min-height: 40px; padding: 0 14px; border-radius: var(--r-panel); color: var(--pizarra); font-weight: 650; font-size: 14px; white-space: nowrap; transition: background-color 140ms, color 140ms; }
  .seg__btn[aria-pressed="true"] { background: var(--muro); color: var(--tinta); box-shadow: 0 1px 3px var(--sombra); }
  .seg__count { min-width: 20px; padding: 2px 6px; border-radius: var(--r-pill); background: var(--filete-1); font-size: 12px; font-weight: 700; color: var(--pizarra); font-variant-numeric: tabular-nums; }
  .seg__btn[aria-pressed="true"] .seg__count { background: var(--rio); color: var(--sobre-rio); }
  .chips { display: flex; gap: var(--sp-2); overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); }
  .chip { flex: none; min-height: 40px; padding: 0 14px; border-radius: var(--r-pill); background: var(--muro); box-shadow: inset 0 0 0 1px var(--filete-2); color: var(--pizarra); font-weight: 650; font-size: 14px; white-space: nowrap; transition: background-color 140ms, color 140ms; }
  .chip[aria-pressed="true"] { background: var(--rio); color: var(--sobre-rio); box-shadow: none; }
  @media (hover: hover) and (pointer: fine) {
    .chip[aria-pressed="false"]:hover { background: var(--rio-suave); color: var(--enlace); }
    .seg__btn[aria-pressed="false"]:hover { color: var(--tinta); }
  }
  @media (max-width: 639px) {
    .seg { width: 100%; }
    .seg__btn { flex: 1 1 0; padding: 0 6px; gap: 4px; font-size: 13px; }
    .seg__count { min-width: 18px; padding: 1px 5px; }
    /* En teléfono lo primero es la acción: se omite el subtítulo para que la primera pregunta asome sin desplazarse. */
    .pagehead .sub { display: none; }
    .pagehead { margin-bottom: var(--sp-3); }
    .filters { gap: var(--sp-2); margin-bottom: var(--sp-3); }
  }
  /* Teléfono en horizontal: poca altura, así que barras más bajas y sin subtítulos. */
  @media (max-height: 480px) and (orientation: landscape) {
    :root { --tabbar-h: 52px; --topbar-h: 48px; }
    .tab { grid-auto-flow: column; gap: 8px; min-height: 52px; }
    .pagehead .sub { display: none; }
    .overview { padding: var(--sp-3) var(--sp-4); }
    .overview__num { font-size: 36px; }
  }
  @media (min-width: 720px) { .chips { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; } }

  /* ---------- Tarjetas de preguntas ---------- */
  .qgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: var(--sp-4); }
  .qcard { position: relative; display: flex; flex-direction: column; gap: var(--sp-3); padding: var(--sp-4) var(--sp-4) var(--sp-4); background: var(--muro); border-radius: var(--r-panel); box-shadow: var(--relieve), inset 0 0 0 1px var(--filete-1); transition: box-shadow 160ms; }
  @media (hover: hover) and (pointer: fine) { .qcard:hover { box-shadow: 0 10px 28px -14px var(--sombra), inset 0 0 0 1px var(--filete-3); } }
  .qcard:has(.qcard__link:focus-visible) { outline: 2px solid var(--enlace); outline-offset: 2px; }
  .qcard__link { color: inherit; text-decoration: none; }
  .qcard__link:focus-visible { outline: none; }
  .qcard__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
  .qcard__head { display: flex; align-items: center; gap: var(--sp-3); }
  .qcard__icon { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: var(--r-panel); background: var(--rio-suave); color: var(--enlace); }
  .qcard__meta { display: grid; flex: 1; min-width: 0; line-height: 1.3; }
  .qcard__cat { font-size: 14px; font-weight: 650; }
  .qcard__num { font-size: 12px; color: var(--cemento); }
  .qcard__sim { font-size: 12px; font-weight: 650; color: var(--cemento); }
  .qcard__title { font-size: 18px; line-height: 1.3; letter-spacing: -.01em; }
  .qcard__desc { color: var(--pizarra); font-size: 14px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .qcard__answer { display: flex; align-items: flex-start; gap: var(--sp-2); padding: 10px 12px; border-radius: var(--r-panel); background: var(--jardinera-suave); color: var(--jardinera); font-size: 13px; line-height: 1.4; }
  .qcard__answer .ico { margin-top: 1px; }
  .qcard__answer span { display: grid; min-width: 0; color: var(--tinta); font-weight: 600; }
  .qcard__answer strong { font-size: 12px; font-weight: 650; color: var(--jardinera); }
  .qcard__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding-top: var(--sp-3); border-top: 1px solid var(--filete-1); }
  .qcard__chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--cemento); }
  .qcard__cta { display: inline-flex; align-items: center; gap: 6px; flex: none; font-size: 14px; font-weight: 700; color: var(--enlace); }

  /* ---------- Detalle de una propuesta ---------- */
  .ballot { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-5); }
  .ballot__badges { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-3); }
  .ballot__num { font-size: 13px; font-weight: 600; color: var(--cemento); }
  .ballot__title { font-size: clamp(24px, 4vw, 34px); line-height: 1.15; letter-spacing: -.02em; margin-bottom: var(--sp-2); }
  .ballot__head .note { margin-top: var(--sp-3); }
  .options { display: grid; gap: var(--sp-3); min-width: 0; padding: 0; border: 0; }
  .choice {
    position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--sp-3); padding: var(--sp-4); cursor: pointer;
    background: var(--muro); border-radius: var(--r-panel); box-shadow: var(--relieve), inset 0 0 0 1.5px var(--filete-2); transition: box-shadow 140ms, background-color 140ms;
  }
  .choice__input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: inherit; }
  .choice__mark { display: grid; place-items: center; width: 24px; height: 24px; margin-top: 3px; border: 1.5px solid var(--filete-3); border-radius: 50%; color: transparent; transition: background-color 140ms, border-color 140ms, color 140ms; }
  .choice__body { display: grid; gap: var(--sp-3); min-width: 0; }
  .choice__head { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 6px var(--sp-3); }
  .choice__letter { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: var(--r-panel); background: var(--yeso); font-size: 14px; font-weight: 800; color: var(--pizarra); transition: background-color 140ms, color 140ms; }
  .choice__label { flex: 1 1 200px; font-size: 17px; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; padding-top: 2px; }
  .choice__desc, .reason__text { font-size: 14px; line-height: 1.6; color: var(--pizarra); white-space: pre-line; }
  .choice:has(.choice__input:checked) { background: color-mix(in srgb, var(--rio) 5%, var(--muro)); box-shadow: var(--relieve), inset 0 0 0 2px var(--rio); }
  .choice:has(.choice__input:checked) .choice__mark { background: var(--rio); border-color: var(--rio); color: var(--sobre-rio); }
  .choice:has(.choice__input:checked) .choice__letter { background: var(--rio); color: var(--sobre-rio); }
  .choice:has(.choice__input:focus-visible) { outline: 2px solid var(--enlace); outline-offset: 2px; }
  .choice:has(.choice__input:disabled) { cursor: default; }
  .choice:has(.choice__input:disabled:not(:checked)) { opacity: .72; }
  @media (hover: hover) and (pointer: fine) { .choice:has(.choice__input:not(:disabled):not(:checked)):hover { box-shadow: var(--relieve), inset 0 0 0 1.5px var(--filete-3); } }

  /* Puntos con icono: horarios, tarifas y reglas como lista, no como párrafo */
  .points { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
  .point { display: flex; align-items: flex-start; gap: 10px; }
  .point__icon { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: var(--r-panel); background: var(--rio-suave); color: var(--enlace); }
  .point__body { display: flex; flex: 1; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px var(--sp-4); min-width: 0; padding-top: 4px; font-size: 14px; line-height: 1.5; }
  .point__label { font-weight: 650; color: var(--tinta); }
  /* Filas "área | horarios": dos columnas alineadas a la izquierda; en pantallas angostas, una bajo otra. */
  .point__body--kv { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; gap: 2px var(--sp-4); }
  .point__values { display: grid; gap: 2px; min-width: 0; }
  .point__value { font-weight: 600; color: var(--pizarra); font-variant-numeric: tabular-nums; }
  @media (max-width: 559px) { .point__body--kv { grid-template-columns: minmax(0, 1fr); } }
  .point__text { flex: 1 1 100%; color: var(--pizarra); }
  .reason { display: grid; gap: 10px; padding: var(--sp-3) var(--sp-4); border-radius: var(--r-panel); background: var(--yeso); }
  .reason__title { display: flex; align-items: center; gap: var(--sp-2); font-size: 13px; font-weight: 700; color: var(--pizarra); }
  .reason .point__icon { width: 22px; height: 22px; background: transparent; color: var(--cemento); }
  .reason .point__body { padding-top: 1px; }
  .reason--pros .reason__title, .reason--pros .point__icon { color: var(--jardinera); }
  .reason--cons .reason__title, .reason--cons .point__icon { color: var(--bolardo); }
  .consult__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-top: var(--sp-3); }
  .decision { padding: var(--sp-5); background: var(--muro); border-radius: var(--r-panel); box-shadow: var(--relieve), inset 0 0 0 1px var(--filete-1); display: grid; gap: var(--sp-3); }
  .decision__title { display: flex; align-items: center; gap: var(--sp-2); font-size: 19px; }
  .decision__pick { display: grid; gap: 2px; min-height: 44px; align-content: center; }
  .decision__pick strong { font-size: 16px; line-height: 1.35; }
  .decision__k { font-size: 12px; font-weight: 600; color: var(--cemento); }
  .decision__empty { color: var(--pizarra); font-size: 14px; }
  .decision__fine { font-size: 13px; line-height: 1.5; color: var(--cemento); }
  .decision--done { background: var(--jardinera-suave); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--jardinera) 28%, transparent); }
  .decision--done .decision__title { color: var(--jardinera); }
  .decision--done .decision__k, .decision--done .decision__fine { color: var(--pizarra); }
  @media (min-width: 960px) {
    .ballot { grid-template-columns: minmax(0, 1fr) 340px; grid-template-areas: "head head" "options decision" "consult decision"; column-gap: var(--sp-6); align-items: start; }
    .ballot__head { grid-area: head; }
    .ballot__options { grid-area: options; }
    .ballot > .docs { grid-area: docs; }
    .ballot:has(> .docs) { grid-template-areas: "head head" "docs decision" "options decision" "consult decision"; }
    .ballot__consult { grid-area: consult; }
    .ballot__decision { grid-area: decision; position: sticky; top: var(--sp-6); }
  }
  @media (max-width: 959px) {
    .ballot__decision:has(.decision--open) { position: sticky; bottom: 0; z-index: var(--z-sticky); margin: 0 calc(var(--gutter) * -1); }
    .decision--open { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--gutter) calc(var(--sp-3) + env(safe-area-inset-bottom)); border-radius: 0; background: var(--muro); box-shadow: 0 -1px 0 var(--filete-2), 0 -10px 24px -12px var(--sombra); }
    .decision--open .decision__title, .decision--open .decision__fine, .decision--open .decision__k { display: none; }
    .decision--open .decision__pick { min-height: 0; }
    .decision--open .decision__pick strong { font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .decision--open .btn--block { width: auto; padding: 0 16px; }
  }

  /* ---------- Consultas ---------- */
  .group { margin-bottom: var(--sp-6); }
  .group__title { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-3); font-size: 17px; }
  .group__count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 8px; border-radius: var(--r-pill); background: var(--rio-suave); color: var(--enlace); font-size: 12px; font-weight: 700; }
  .threads { display: grid; gap: var(--sp-3); }
  .thread { display: grid; gap: var(--sp-3); padding: var(--sp-4); background: var(--muro); border-radius: var(--r-panel); box-shadow: var(--relieve), inset 0 0 0 1px var(--filete-1); }
  .thread__head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--sp-2) var(--sp-3); }
  .thread__title { flex: 1 1 220px; font-size: 16px; line-height: 1.3; }
  .thread__title a { display: inline-block; padding-block: 8px; text-decoration: none; }
  @media (hover: hover) and (pointer: fine) { .thread__title a:hover { text-decoration: underline; text-underline-offset: 3px; } }
  .thread__msg { padding: 12px 14px; border-radius: var(--r-panel); background: var(--yeso); white-space: pre-wrap; overflow-wrap: anywhere; }
  .thread__reply { padding: 12px 14px; border-radius: var(--r-panel); background: var(--rio-suave); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--enlace) 20%, transparent); }
  .thread__reply strong { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--enlace); }
  .thread__reply p { margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
  .thread__actions { display: flex; justify-content: flex-end; }
  .thread__actions--row { flex-wrap: wrap; gap: var(--sp-2); }
  .decision__fine .ico { display: inline-block; vertical-align: -3px; margin-right: 6px; }

  /* ---------- Junta Directiva ---------- */
  .stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px; margin-bottom: var(--sp-5); overflow: hidden; background: var(--filete-2); border-radius: var(--r-panel); box-shadow: var(--relieve); }
  .stat { display: flex; flex-direction: column-reverse; gap: 4px; padding: 18px 20px; background: var(--muro); }
  @media (max-width: 639px) {
    .stats { grid-template-columns: 1fr 1fr; }
    .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
  }
  .stat__num { font-size: 36px; line-height: 1; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
  .stat__label { font-size: 13px; font-weight: 550; color: var(--cemento); }
  .tabs { display: flex; gap: 4px; margin-bottom: var(--sp-5); overflow-x: auto; scrollbar-width: none; box-shadow: inset 0 -1px 0 var(--filete-2); }
  .tabs__btn { position: relative; display: inline-flex; align-items: center; gap: var(--sp-2); min-height: 46px; padding: 0 14px; color: var(--cemento); font-weight: 650; white-space: nowrap; }
  .tabs__btn[aria-selected="true"] { color: var(--enlace); }
  .tabs__btn[aria-selected="true"]::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--enlace); }
  .tabs__count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill); background: var(--rio-suave); font-size: 12px; font-weight: 700; color: var(--enlace); }
  .tabpanel:focus { outline: none; }
  /* Departamentos: tabla con buscador (67 filas no caben como tarjetas) */
  .units-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3); margin: var(--sp-4) 0 var(--sp-3); }
  .units-search { flex: 1 1 280px; max-width: 440px; }
  .units-count { font-size: 13px; font-weight: 600; color: var(--cemento); font-variant-numeric: tabular-nums; }
  .tablewrap { max-height: 460px; margin-bottom: var(--sp-5); overflow: auto; overscroll-behavior: contain; background: var(--muro); border-radius: var(--r-panel); box-shadow: var(--relieve), inset 0 0 0 1px var(--filete-1); }
  .units-table { width: 100%; min-width: 600px; border-collapse: separate; border-spacing: 0; font-size: 14px; }
  .units-table thead th { position: sticky; top: 0; z-index: 2; padding: 10px 12px; background: var(--yeso); box-shadow: inset 0 -1px 0 var(--filete-2); text-align: center; font-size: 12px; font-weight: 650; line-height: 1.3; color: var(--pizarra); }
  .units-table thead th:first-child { left: 0; z-index: 3; text-align: left; }
  .units-table td { padding: 10px 12px; text-align: center; font-weight: 650; font-variant-numeric: tabular-nums; box-shadow: inset 0 -1px 0 var(--filete-1); }
  .units-table td.is-zero { font-weight: 500; color: var(--cemento); }
  .units-table__unit { position: sticky; left: 0; z-index: 1; display: grid; padding: 8px 12px; background: var(--muro); box-shadow: inset 0 -1px 0 var(--filete-1), 1px 0 0 var(--filete-1); text-align: left; font-weight: 400; }
  .units-table__dept { font-weight: 700; }
  .units-table__owner { font-size: 12px; color: var(--cemento); }
  .units-table__empty { padding: var(--sp-5) var(--sp-4); text-align: center; color: var(--cemento); }
  .tablewrap:focus-visible { outline: 2px solid var(--enlace); outline-offset: 2px; }
  .thread__who { display: flex; align-items: center; gap: var(--sp-2); font-size: 13px; font-weight: 600; color: var(--pizarra); }
  .thread__who .ico { color: var(--enlace); }
  .panel--form { display: grid; gap: var(--sp-4); }
  .panel--form .section { margin: 0; }
  .form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: start; gap: var(--sp-4); }
  .panel__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: var(--sp-2); }
  .note + .panel__actions { margin-top: var(--sp-3); }

  /* ---------- Junta: resumen de avance ---------- */
  .kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: var(--sp-3); margin: var(--sp-4) 0 var(--sp-5); }
  .kpi { display: grid; align-content: start; gap: var(--sp-2); padding: var(--sp-4); background: var(--muro); border-radius: var(--r-panel); box-shadow: var(--relieve), inset 0 0 0 1px var(--filete-1); }
  @media (max-width: 559px) {
    .kpis { grid-template-columns: 1fr 1fr; gap: var(--sp-2); }
    .kpi { padding: var(--sp-3); }
    .kpis .kpi__num { font-size: 26px; }
  }
  .kpi__label { display: flex; align-items: flex-start; gap: var(--sp-2); font-size: 13px; font-weight: 600; line-height: 1.3; color: var(--cemento); }
  .kpi__label .ico { flex: none; margin-top: 1px; color: var(--enlace); }
  .kpi__dd { display: grid; margin: 0; }
  .kpi__num { font-size: 30px; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
  .kpi__note { font-size: 12.5px; color: var(--cemento); }
  .qstats { display: grid; gap: var(--sp-3); margin-bottom: var(--sp-5); }
  @media (min-width: 900px) { .qstats { grid-template-columns: 1fr 1fr; } }
  .qstat { display: grid; align-content: start; gap: var(--sp-3); padding: var(--sp-4); background: var(--muro); border-radius: var(--r-panel); box-shadow: var(--relieve), inset 0 0 0 1px var(--filete-1); }
  .qstat__head { display: flex; align-items: flex-start; gap: var(--sp-3); }
  .qstat__icon { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: var(--r-panel); background: var(--rio-suave); color: var(--enlace); }
  .qstat__title { display: grid; flex: 1; min-width: 0; gap: 2px; }
  .qstat__title h3 { font-size: 15px; line-height: 1.35; }
  .qstat__num { font-size: 12px; font-weight: 600; color: var(--cemento); }
  .qstat__figure { display: grid; flex: none; justify-items: end; line-height: 1.2; }
  .qstat__figure strong { font-size: 22px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
  .qstat__figure span { font-size: 12px; color: var(--cemento); font-variant-numeric: tabular-nums; }
  .qstat__lead { font-size: 13.5px; font-weight: 600; color: var(--pizarra); }
  .qstat__flags { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
  .qstat__flag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-pill); background: var(--yeso); font-size: 12px; font-weight: 600; color: var(--pizarra); }
  .bar { width: 100%; height: 10px; overflow: hidden; border-radius: var(--r-control); }
  .bar__track { fill: var(--yeso); }
  .bar__fill { fill: var(--progreso); }
  .bar__seg { stroke: var(--muro); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
  .bar__seg--0, .legend__key--0 { fill: var(--serie-1); background: var(--serie-1); }
  .bar__seg--1, .legend__key--1 { fill: var(--serie-2); background: var(--serie-2); }
  .bar__seg--2, .legend__key--2 { fill: var(--serie-3); background: var(--serie-3); }
  .bar__seg--3, .legend__key--3 { fill: var(--serie-4); background: var(--serie-4); }
  .bar__seg--4, .legend__key--4 { fill: var(--serie-5); background: var(--serie-5); }
  .legend { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
  .legend__item { display: flex; align-items: flex-start; gap: var(--sp-2); font-size: 13px; line-height: 1.4; }
  .legend__key { display: inline-grid; place-items: center; width: 20px; height: 20px; flex: none; border-radius: var(--r-control); color: var(--sobre-serie); font-size: 11px; font-weight: 800; }
  .legend__label { flex: 1; min-width: 0; color: var(--pizarra); }
  .legend__num { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; }
  .floors { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: var(--sp-2); margin: 0; padding: 0; list-style: none; }
  .floortile { display: grid; gap: 2px; padding: 12px 12px 10px; border-radius: var(--r-panel); background: var(--yeso); box-shadow: inset 0 0 0 1px var(--filete-1); }
  .floortile__floor { font-size: 12px; font-weight: 650; color: var(--cemento); }
  .floortile__pct { font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
  .floortile__bar { width: 100%; height: 6px; margin: 4px 0 2px; overflow: hidden; border-radius: 3px; }
  .floortile__count { font-size: 11.5px; color: var(--cemento); font-variant-numeric: tabular-nums; }
  .floortile--low .bar__fill { fill: var(--ambar); }
  .floortile--mid .bar__fill { fill: var(--enlace); }
  .floortile--high .bar__fill { fill: var(--jardinera); }
  @media (max-width: 480px) { .floors { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
  .chart__caption { margin-top: var(--sp-3); font-size: 12.5px; color: var(--cemento); }

  /* ---------- Documentos de apoyo ---------- */
  .docs { display: grid; gap: var(--sp-3); margin-bottom: var(--sp-5); }
  .docs .section { margin: 0; }
  .doclist { display: grid; gap: var(--sp-2); margin: 0; padding: 0; list-style: none; }
  .doc { display: flex; align-items: center; gap: var(--sp-3); padding: 10px 12px; background: var(--muro); border-radius: var(--r-panel); box-shadow: inset 0 0 0 1px var(--filete-1); }
  .doc__icon { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: var(--r-panel); background: var(--rio-suave); color: var(--enlace); }
  .doc__text { display: grid; flex: 1; min-width: 0; }
  .doc__name { font-weight: 650; font-size: 14.5px; overflow-wrap: anywhere; }
  .doc__meta { font-size: 12.5px; color: var(--cemento); }
  .editor__docs { display: grid; gap: var(--sp-3); }
  .editor__docs .section { margin: 0; }
  .docadd { display: grid; gap: var(--sp-2); justify-items: start; }
  .docadd .field { width: 100%; }

  /* ---------- Actas ---------- */
  .chip__count { margin-left: 6px; font-size: 12px; font-weight: 700; opacity: .8; font-variant-numeric: tabular-nums; }
  .actas { display: grid; gap: var(--sp-2); margin: var(--sp-4) 0 0; padding: 0; list-style: none; }
  .acta { display: flex; gap: var(--sp-3); padding: 12px 14px; background: var(--muro); border-radius: var(--r-panel); box-shadow: inset 0 0 0 1px var(--filete-1); }
  .acta__icon { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: var(--r-panel); background: var(--rio-suave); color: var(--enlace); }
  .acta__body { display: grid; gap: 2px; min-width: 0; }
  .acta__text { font-size: 14.5px; line-height: 1.45; font-weight: 600; }
  .acta__reason { font-size: 13.5px; color: var(--pizarra); overflow-wrap: anywhere; }
  .acta__meta { font-size: 12.5px; color: var(--cemento); }

  /* ---------- Reglas de la Junta (quórum y mayoría) ---------- */
  .rules { display: flex; align-items: flex-start; gap: var(--sp-2); font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--pizarra); }
  .rules .ico { flex: none; margin-top: 1px; color: var(--enlace); }
  .rules--none { font-weight: 500; color: var(--cemento); }
  .rulechecks { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
  .rulecheck { display: flex; align-items: flex-start; gap: var(--sp-2); font-size: 13px; line-height: 1.4; color: var(--pizarra); }
  .rulecheck .ico { flex: none; margin-top: 1px; color: var(--bolardo); }
  .rulecheck.is-met .ico { color: var(--jardinera); }
  .rulesform { display: grid; gap: var(--sp-3); margin: 0; padding: var(--sp-4); border: 0; border-radius: var(--r-panel); background: var(--yeso); box-shadow: inset 0 0 0 1px var(--filete-1); min-width: 0; }
  .rulesform legend { padding: 0; }

  /* ---------- Padrón ---------- */
  .kpis--compact { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-top: var(--sp-3); }
  .padron-table { min-width: 620px; }
  /* En celular el padrón es una lista de tarjetas: la tabla de tres columnas dejaba las acciones fuera de la pantalla. */
  @media (max-width: 720px) {
    .tablewrap--cards { max-height: none; overflow: visible; background: transparent; box-shadow: none; border-radius: 0; }
    .tablewrap--cards .padron-table { min-width: 0; display: block; }
    .tablewrap--cards .padron-table thead { display: none; }
    .tablewrap--cards .padron-table tbody { display: grid; gap: var(--sp-3); }
    .tablewrap--cards .padron-table tr { display: grid; gap: var(--sp-2); padding: var(--sp-4); border-radius: var(--r-panel); background: var(--muro); box-shadow: var(--relieve), inset 0 0 0 1px var(--filete-1); }
    .tablewrap--cards .padron-table th, .tablewrap--cards .padron-table td { display: block; position: static; padding: 0; background: transparent; box-shadow: none; text-align: left; }
    .tablewrap--cards .padron-table th { display: grid; gap: 2px; }
    .tablewrap--cards .padron-table .units-table__empty { padding: var(--sp-4); text-align: center; }
    .tablewrap--cards .padron__actions .btn { flex: 1 1 140px; min-height: 44px; justify-content: center; }
  }
  .padron__state { white-space: nowrap; }
  .padron__state .badge { vertical-align: middle; }
  .padron__note { margin-left: var(--sp-2); font-size: 12px; font-weight: 600; color: var(--cemento); }
  .padron__actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
  .units-table td:last-child { text-align: left; font-weight: 400; }
  .codebox { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-4); border-radius: var(--r-panel); background: var(--yeso); box-shadow: inset 0 0 0 1px var(--filete-2); }
  .codebox__value { font: 700 15px/1.4 var(--font-mono); letter-spacing: .02em; overflow-wrap: anywhere; user-select: all; }

  /* ---------- Votaciones: plazo, secciones y cierre ---------- */
  .timing { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13.5px; font-weight: 600; color: var(--pizarra); }
  .timing .ico { flex: none; color: var(--enlace); }
  .timing__left { font-weight: 700; color: var(--tinta); font-variant-numeric: tabular-nums; }
  .timing__date { font-weight: 500; color: var(--cemento); }
  .timing--urgent .ico, .timing--urgent .timing__left { color: var(--bolardo); }
  .timing--closed .ico, .timing--closed .timing__left { color: var(--cemento); }
  .election { display: grid; gap: var(--sp-3); margin-bottom: var(--sp-6); }
  .election__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-3); }
  .election__text { display: grid; gap: 2px; min-width: 0; }
  .election__title { font-size: 20px; line-height: 1.3; letter-spacing: -.01em; }
  .election__desc { font-size: 14px; color: var(--pizarra); }
  .election__progress { font-size: 13px; font-weight: 600; color: var(--cemento); }
  .closed-elections { margin-top: var(--sp-5); }
  .closed-elections > summary { display: flex; align-items: center; gap: var(--sp-2); min-height: 48px; cursor: pointer; list-style: none; font-weight: 700; color: var(--pizarra); }
  .closed-elections > summary::-webkit-details-marker { display: none; }
  .closed-elections[open] > summary .note__caret { transform: rotate(180deg); }
  .closed-elections .election { margin-top: var(--sp-4); }
  .ballot__election { font-size: 13px; font-weight: 650; color: var(--enlace); }
  .elcards { display: grid; gap: var(--sp-3); margin-top: var(--sp-4); }
  .elcard { display: grid; gap: var(--sp-3); padding: var(--sp-4); background: var(--muro); border-radius: var(--r-panel); box-shadow: var(--relieve), inset 0 0 0 1px var(--filete-1); }
  .elcard__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-3); }
  .elcard__text { display: grid; gap: 2px; min-width: 0; }
  .elcard__title { font-size: 17px; line-height: 1.3; }
  .elcard__desc { font-size: 14px; color: var(--pizarra); }
  .elcard__meta { font-size: 13px; color: var(--cemento); }
  .elcard__actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); padding-top: var(--sp-3); border-top: 1px solid var(--filete-1); }
  .elqs { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
  .elq { display: flex; align-items: center; gap: var(--sp-3); padding: 8px 10px; border-radius: var(--r-panel); background: var(--yeso); }
  .elq__num { display: grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: var(--r-control); background: var(--rio-suave); color: var(--enlace); font-size: 12px; font-weight: 800; }
  .elq__title { display: grid; flex: 1; min-width: 0; font-size: 14px; font-weight: 600; line-height: 1.35; }
  .elq__meta { font-size: 12.5px; font-weight: 500; color: var(--cemento); }
  .egroup { display: grid; gap: var(--sp-3); margin-bottom: var(--sp-5); }
  .egroup__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--sp-3); }
  .egroup__text { display: grid; gap: var(--sp-2); min-width: 0; }
  .egroup__title { font-size: 17px; }
  .egroup__badges { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
  .egroup__share { font-size: 13px; font-weight: 700; color: var(--pizarra); }
  .btn--danger { color: var(--alarma); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--alarma) 55%, transparent); }
  .btn--danger:hover { background: var(--alarma-suave); }

  /* ---------- Junta: preguntas de la simulación ---------- */
  .section-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-3); }
  .section-row .section { margin: 0; }
  .manages { display: grid; gap: var(--sp-2); margin-top: var(--sp-4); }
  .manage { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); background: var(--muro); border-radius: var(--r-panel); box-shadow: var(--relieve), inset 0 0 0 1px var(--filete-1); }
  .manage__body { display: grid; flex: 1; min-width: 0; gap: 2px; }
  .manage__title { font-size: 15px; line-height: 1.35; }
  .manage__meta { font-size: 13px; color: var(--cemento); }
  @media (max-width: 559px) { .manage { flex-wrap: wrap; } .manage .btn { margin-left: calc(36px + var(--sp-3)); } }
  .editor__options { display: grid; gap: var(--sp-3); }
  .editor__options .section { margin: 0; }
  .editor__option { display: grid; gap: var(--sp-3); margin: 0; padding: var(--sp-4); border: 0; border-radius: var(--r-panel); background: var(--yeso); box-shadow: inset 0 0 0 1px var(--filete-1); min-width: 0; }
  .editor__legend { display: flex; align-items: center; gap: var(--sp-2); padding: 0; font-weight: 700; }
  .editor__remove { justify-self: start; }
  .review-guide { display: grid; gap: var(--sp-3); margin-bottom: var(--sp-3); }
  .review-guide .section { margin: 0; }
  .qcard__updated { display: flex; align-items: flex-start; gap: var(--sp-2); padding: 8px 12px; border-radius: var(--r-panel); background: var(--rio-suave); color: var(--enlace); font-size: 13px; font-weight: 600; line-height: 1.4; }
  .qcard__updated .ico { margin-top: 1px; }
  .records { display: grid; gap: var(--sp-2); margin: 0; padding: 0; list-style: none; }
  .record { display: flex; gap: var(--sp-3); padding: 12px 14px; background: var(--muro); border-radius: var(--r-panel); box-shadow: inset 0 0 0 1px var(--filete-1); }
  .record__icon { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: var(--r-panel); background: var(--rio-suave); color: var(--enlace); }
  .record__body { min-width: 0; }
  .record__title { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 14px; }
  .record__title span { color: var(--cemento); }
  .record__note { margin-top: 2px; font-size: 14px; color: var(--pizarra); overflow-wrap: anywhere; }

  /* ---------- Error de arranque local (startup-diagnostics.js) ---------- */
  .startup-error { max-width: 680px; margin: 10vh auto; padding: 28px; border-radius: var(--r-panel); background: var(--muro); color: var(--tinta); box-shadow: var(--sombra-flota), inset 0 0 0 1px var(--alarma); }
  .startup-error h1 { font-size: 24px; margin-bottom: 10px; }
  .startup-error p { font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }

  /* ---------- Ambientes: aforo en vivo, reservas, normas ---------- */
  .section--gap { margin-top: var(--sp-6); }
  .grid2 > .field { min-width: 0; }
  /* En celular los pares de campos se apilan: los campos de fecha de iOS no respetan el ancho de media columna. */
  @media (max-width: 480px) { .rvgrid .grid2:has(input[type="date"]) { grid-template-columns: minmax(0, 1fr); } }
  .grid2 .field__input { min-width: 0; max-width: 100%; }
  .grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
  .grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-3); }
  @media (max-width: 560px) { .grid3 { grid-template-columns: 1fr; } }
  .badge--full { background: var(--alarma-suave); color: var(--alarma); }
  .btn--light-outline { background: transparent; }
  .iconbtn--sm { width: 36px; height: 36px; border-radius: var(--r-panel); }
  .form-error--soft { background: var(--bolardo-suave); color: var(--bolardo); }
  .check { display: flex; align-items: flex-start; gap: var(--sp-3); font-size: 14px; line-height: 1.5; cursor: pointer; }
  .check input {
    appearance: none; flex: none; width: 22px; height: 22px; margin: 1px 0 0; display: grid; place-items: center; cursor: pointer;
    border: 1.5px solid var(--filete-3); border-radius: var(--r-control); background: var(--muro); transition: background-color 140ms, border-color 140ms;
  }
  .check input:checked { background: var(--rio); border-color: var(--rio); }
  .check input:checked::after { content: ""; width: 6px; height: 11px; border: solid var(--sobre-rio); border-width: 0 2.5px 2.5px 0; transform: translate(0, -1px) rotate(45deg); }
  .check input:focus-visible { outline: 2px solid var(--enlace); outline-offset: 2px; }
  .check span { display: grid; gap: 2px; }
  .check small { color: var(--cemento); font-size: 13px; }

  .usagegrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--sp-4); }
  .usage { display: grid; gap: var(--sp-2); align-content: start; }
  .usage h3 { font-size: 17px; }
  .usage__sum { font-size: 14px; }
  .usage__hours { width: 100%; height: 56px; fill: var(--enlace); background: var(--yeso); border-radius: var(--r-panel); }
  .usage__ticks { display: flex; justify-content: space-between; font-size: 11px; color: var(--cemento); font-variant-numeric: tabular-nums; }
  .usage__top { display: grid; gap: 2px; margin-top: var(--sp-2); padding: 0; list-style: none; }
  .usage__top li { display: flex; justify-content: space-between; gap: var(--sp-3); padding: 6px 0; border-top: 1px solid var(--filete-1); font-size: 14px; }
  .usage__top strong { font-variant-numeric: tabular-nums; }
  .livebar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 0 0 var(--sp-5); overflow: hidden; border-radius: var(--r-panel); background: var(--filete-2); box-shadow: var(--relieve); }
  .livebar__item { display: grid; align-content: space-between; gap: 6px; padding: var(--sp-4); background: var(--muro); }
  .livebar dt { font-size: 12px; font-weight: 600; color: var(--cemento); line-height: 1.3; }
  .livebar dd { margin: 0; font-size: 28px; font-weight: 750; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
  .livebar small { font-size: 14px; font-weight: 600; color: var(--cemento); }
  @media (max-width: 560px) { .livebar dd { font-size: 22px; } .livebar__item { padding: var(--sp-3); } }

  .places { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: var(--sp-4); margin-bottom: var(--sp-2); }
  .place { display: grid; align-content: start; gap: var(--sp-3); padding: var(--sp-4); background: var(--muro); border-radius: var(--r-panel); box-shadow: var(--relieve), inset 0 0 0 1px var(--filete-1); }
  .place--lleno { box-shadow: var(--relieve), inset 0 0 0 1.5px color-mix(in srgb, var(--alarma) 45%, transparent); }
  .place--parcial { box-shadow: var(--relieve), inset 0 0 0 1.5px color-mix(in srgb, var(--bolardo) 40%, transparent); }
  .place--vacio { box-shadow: var(--relieve), inset 0 0 0 1.5px color-mix(in srgb, var(--jardinera) 38%, transparent); }
  .place__head { display: flex; align-items: center; gap: var(--sp-3); }
  .place__icon { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: var(--r-panel); background: var(--rio-suave); color: var(--enlace); }
  .place__title { flex: 1; min-width: 0; }
  .place__title h3, .norm__title { font-size: 17px; }
  .place__sub { font-size: 13px; color: var(--cemento); }
  .place__count { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px var(--sp-3); font-size: 14px; }
  .place__count span { color: var(--cemento); font-size: 13px; }
  .place__phrase { margin-top: -4px; font-size: 14px; color: var(--pizarra); }
  .place__meta { display: flex; align-items: flex-start; gap: var(--sp-2); font-size: 14px; color: var(--pizarra); }
  .place__meta .ico { margin-top: 2px; color: var(--cemento); }
  .place__meta--hl { padding: 8px 10px; border-radius: var(--r-panel); background: var(--rio-suave); color: var(--tinta); }
  .place__meta--hl .ico { color: var(--enlace); }
  .place__hint { display: flex; align-items: center; gap: var(--sp-2); padding: 10px 12px; border-radius: var(--r-control); background: var(--yeso); color: var(--pizarra); font-size: 14px; }
  .place__badges { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
  .place__actions { display: flex; }
  .place__enter { display: flex; align-items: flex-end; gap: var(--sp-3); }
  .place__people { flex: 0 0 120px; }
  .place__people .field__input { min-height: 40px; padding-block: 8px; }
  .place__mine { display: grid; gap: var(--sp-2); padding: 12px; border-radius: var(--r-panel); background: var(--jardinera-suave); color: var(--tinta); }
  .place__mine p { display: flex; align-items: flex-start; gap: var(--sp-2); font-size: 14px; }
  .place__mine .ico { color: var(--jardinera); margin-top: 2px; }
  .place__mine .btn { justify-self: start; }

  .meter { width: 100%; height: 12px; }
  .meter__cell { fill: var(--filete-2); }
  .meter--ok .meter__cell.is-on { fill: var(--jardinera); }
  .meter--warn .meter__cell.is-on { fill: var(--bolardo); }
  .meter--full .meter__cell.is-on { fill: var(--alarma); }

  .fold { border-radius: var(--r-panel); }
  .fold__summary { display: flex; align-items: center; gap: var(--sp-2); min-height: 40px; padding: 0 10px; border-radius: var(--r-panel); background: var(--yeso); color: var(--pizarra); font-size: 14px; font-weight: 650; cursor: pointer; list-style: none; }
  .fold__summary::-webkit-details-marker { display: none; }
  .fold__summary > span:first-of-type { flex: 1; }
  .fold__count { display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill); background: var(--rio-suave); color: var(--enlace); font-size: 12px; font-weight: 700; }
  .fold__caret { transition: transform 180ms var(--ease-out); color: var(--cemento); }
  .fold[open] > .fold__summary .fold__caret { transform: rotate(180deg); }
  .fold--plain .fold__summary { background: transparent; padding-left: 0; font-weight: 600; color: var(--pizarra); }
  .fold__summary:focus-visible { outline: 2px solid var(--enlace); outline-offset: 2px; }
  .rules { display: grid; gap: 8px; margin: 10px 0 2px; padding: 0 4px; list-style: none; }
  .rules li { display: flex; align-items: flex-start; gap: var(--sp-2); font-size: 14px; line-height: 1.5; color: var(--pizarra); }
  .rules .ico { margin-top: 4px; color: var(--jardinera); }
  .rules--no .ico { color: var(--alarma); }
  .hours { display: grid; gap: 4px; margin: 6px 0 0; padding: 0 4px; font-size: 14px; }
  .hours div { display: flex; justify-content: space-between; gap: var(--sp-3); }
  .hours dt { color: var(--cemento); font-weight: 600; }
  .hours dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--pizarra); }

  .resvlist { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-3); }
  .resv { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: var(--sp-3); padding: var(--sp-4); background: var(--muro); border-radius: var(--r-panel); box-shadow: var(--relieve), inset 0 0 0 1px var(--filete-1); }
  .resv__date { display: grid; place-items: center; width: 54px; padding: 8px 0; border-radius: var(--r-panel); background: var(--rio-suave); color: var(--enlace); text-align: center; line-height: 1.1; }
  .resv__date strong { font-size: 22px; font-weight: 750; }
  .resv__date span { color: var(--tinta); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
  .resv__title { font-size: 16px; }
  .resv__annex { font-size: 12px; font-weight: 700; color: var(--enlace); }
  .resv__when { font-size: 14px; color: var(--pizarra); }
  .resv__who, .resv__note { display: flex; align-items: flex-start; gap: 6px; margin-top: 4px; font-size: 13px; color: var(--cemento); }
  .resv__note--junta { color: var(--pizarra); }
  .resv__code { margin-top: 2px; font-size: 12.5px; color: var(--cemento); }
  .resv__code strong { font-family: var(--font-mono); font-size: 13px; letter-spacing: .06em; color: var(--tinta); }
  .resv__note--warn { padding: 8px 10px; border-radius: var(--r-panel); background: var(--bolardo-suave); color: var(--bolardo); }
  .resv__note--ok { color: var(--jardinera); }
  .resv__files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
  .fchip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: var(--r-pill); background: var(--yeso); color: var(--cemento); font-size: 12.5px; font-weight: 600; }
  .fchip.is-on { background: var(--jardinera-suave); color: var(--jardinera); }

  /* Bicicletas: los espacios del sorteo del mes, la lista de espera y el registro de cocheras */
  .spots { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: var(--sp-2); margin: var(--sp-3) 0 0; padding: 0; list-style: none; }
  .spot { display: grid; gap: 2px; min-width: 0; padding: var(--sp-3); border-radius: var(--r-panel); background: var(--muro); box-shadow: inset 0 0 0 1px var(--filete-2); }
  .spot.is-taken { background: var(--jardinera-suave); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--jardinera) 28%, transparent); }
  .spot.is-free { background: transparent; box-shadow: none; border: 1.5px dashed var(--filete-2); }
  .spot__no { font-size: 20px; font-weight: 750; line-height: 1; font-variant-numeric: tabular-nums; color: var(--tinta); }
  .spot__who { font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
  .spot.is-free .spot__who { font-weight: 500; color: var(--cemento); }
  .spot__reg { font-family: var(--font-mono); font-size: 11.5px; color: var(--cemento); overflow-wrap: anywhere; }
  .waitlist, .parklist { display: grid; gap: 1px; margin: 0 0 var(--sp-4); padding: 0; list-style: none; overflow: hidden; border-radius: var(--r-panel); background: var(--filete-2); }
  .waitlist li { display: flex; align-items: center; gap: var(--sp-3); padding: 10px var(--sp-4); background: var(--muro); font-size: 14px; }
  .waitlist__n { display: inline-grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 50%; background: var(--yeso); font-size: 12px; font-weight: 700; }
  .waitlist__reg { margin-left: auto; font-family: var(--font-mono); font-size: 12.5px; color: var(--cemento); }
  .waitlist--plain li { flex-wrap: wrap; justify-content: space-between; }
  .parkrow { display: flex; align-items: center; gap: var(--sp-3); min-height: 48px; padding: 6px var(--sp-4); background: var(--muro); }
  .parkrow__no { min-width: 56px; font-family: var(--font-mono); font-size: 14px; }
  .parkrow__who { flex: 1; min-width: 0; font-size: 14px; overflow-wrap: anywhere; }
  .parkrow__who--free { color: var(--cemento); }
  .parkbox { font-family: var(--font-mono); font-size: 14px; }
  .form-error--list { margin: 0; padding-left: var(--sp-5); }
  .howto { display: grid; gap: var(--sp-3); margin: 0; padding: 0; list-style: none; }
  .howto li { display: flex; align-items: flex-start; gap: var(--sp-3); font-size: 15px; line-height: 1.45; }
  .howto__n { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--rio); color: #fff; font-size: 14px; font-weight: 750; }
  .staffitem[hidden] { display: none; }
  .staffsearch { margin-bottom: var(--sp-4); }
  .staffinfo { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--sp-2) var(--sp-4); margin: 0; padding: var(--sp-3) var(--sp-4); border-radius: var(--r-panel); background: var(--yeso); }
  .staffinfo dt { font-size: 12px; font-weight: 650; color: var(--cemento); }
  .staffinfo dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
  .staffinfo .mono { font-family: var(--font-mono); letter-spacing: .04em; }
  .staffdocs { display: grid; gap: var(--sp-2); }
  .docrow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); padding: var(--sp-3); border-radius: var(--r-panel); background: var(--muro); box-shadow: inset 0 0 0 1px var(--filete-2); }
  .docrow__label { flex: 1 1 150px; font-weight: 650; font-size: 14px; }
  .docrow__file, .docrow__missing { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; overflow-wrap: anywhere; }
  .docrow__file { color: var(--jardinera); }
  .docrow__missing { color: var(--bolardo); }
  .filebtn { position: relative; cursor: pointer; }
  .filebtn.is-busy { opacity: .6; pointer-events: none; }
  .filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
  .paybox { display: grid; gap: var(--sp-3); margin: 0; padding: var(--sp-4); border: 0; border-radius: var(--r-panel); background: var(--yeso); box-shadow: inset 0 0 0 1px var(--filete-1); min-width: 0; }
  .paybox legend { padding: 0; font-weight: 700; font-size: 14px; }
  .resv__side { display: grid; justify-items: end; gap: var(--sp-2); }
  .resvdecide { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-3); padding-bottom: var(--sp-4); border-bottom: 1px solid var(--filete-1); }
  .resvdecide .resv { box-shadow: inset 0 0 0 1px var(--filete-2); }
  @media (max-width: 560px) {
    .resv { grid-template-columns: auto minmax(0, 1fr); }
    .resv__side { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: var(--sp-2) var(--sp-3); }
  }

  .timeline { display: grid; gap: 6px; padding: 12px; border-radius: var(--r-panel); background: var(--yeso); }
  .timeline__svg { width: 100%; height: 18px; }
  .timeline__track { fill: var(--muro); stroke: var(--filete-2); stroke-width: .4; vector-effect: non-scaling-stroke; }
  .timeline__busy { fill: var(--bolardo); }
  .timeline__busy.is-mine { fill: var(--enlace); }
  .timeline__ticks { display: flex; justify-content: space-between; font-size: 11px; color: var(--cemento); font-variant-numeric: tabular-nums; }
  .timeline__text { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--pizarra); }
  .rulesbox .rules { margin-top: 8px; }

  .norms { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--sp-4); }
  .norm { display: grid; align-content: start; gap: var(--sp-3); padding: var(--sp-4); background: var(--muro); border-radius: var(--r-panel); box-shadow: var(--relieve), inset 0 0 0 1px var(--filete-1); }
  .norm__head { display: flex; align-items: center; gap: var(--sp-3); }
  .norm__intro { font-size: 14px; color: var(--pizarra); }
  .norm__list { display: grid; gap: 8px; margin: 0; padding-left: 22px; font-size: 14px; line-height: 1.5; color: var(--pizarra); }
  .norm__list li::marker { color: var(--enlace); font-weight: 700; }

  /* ---------- Emergencias ---------- */
  .calltiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: var(--sp-3); }
  .calltile { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px var(--sp-3); padding: var(--sp-4); border-radius: var(--r-panel); background: var(--muro); color: var(--tinta); text-decoration: none; box-shadow: var(--relieve), inset 0 0 0 1.5px color-mix(in srgb, var(--alarma) 40%, transparent); transition: transform 140ms var(--ease-out), box-shadow 140ms; }
  .calltile:active { transform: scale(.985); }
  .calltile__icon { grid-row: span 2; display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--r-panel); background: var(--alarma-suave); color: var(--alarma); }
  .calltile--ascensores .calltile__icon { background: var(--bolardo-suave); color: var(--bolardo); }
  .calltile--ascensores { box-shadow: var(--relieve), inset 0 0 0 1.5px color-mix(in srgb, var(--bolardo) 40%, transparent); }
  .calltile__text { display: grid; min-width: 0; }
  .calltile__text strong { font-size: 15px; line-height: 1.25; }
  .calltile__text small { font-size: 13px; color: var(--cemento); }
  .calltile__num { grid-column: 2; font-size: 22px; font-weight: 750; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
  .calltile__flag { position: absolute; top: 10px; right: 10px; padding: 2px 8px; border-radius: var(--r-pill); background: var(--bolardo-suave); color: var(--bolardo); font-size: 11px; font-weight: 700; }
  .calltile__empty { grid-column: 2; font-size: 14px; font-weight: 600; color: var(--pizarra); }
  .calltile--missing { box-shadow: inset 0 0 0 1.5px var(--filete-3); background: var(--yeso); }
  .calltile--missing .calltile__icon { background: var(--muro); color: var(--cemento); }
  @media (hover: hover) and (pointer: fine) { .calltile:hover { box-shadow: var(--sombra-flota), inset 0 0 0 1.5px var(--alarma); transform: translateY(-2px); } }

  .guidegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--sp-3); }
  .guidebtn { display: flex; align-items: center; gap: var(--sp-3); width: 100%; padding: var(--sp-3) var(--sp-4); text-align: left; border-radius: var(--r-panel); background: var(--muro); box-shadow: var(--relieve), inset 0 0 0 1px var(--filete-2); transition: transform 140ms var(--ease-out), box-shadow 140ms; }
  .guidebtn:active { transform: scale(.985); }
  .guidebtn[aria-pressed="true"] { box-shadow: var(--relieve), inset 0 0 0 2px var(--enlace); }
  .guidebtn__icon { display: grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: var(--r-panel); background: var(--rio-suave); color: var(--enlace); }
  .guidebtn--alert .guidebtn__icon { background: var(--alarma-suave); color: var(--alarma); }
  .guidebtn--warning .guidebtn__icon { background: var(--bolardo-suave); color: var(--bolardo); }
  .guidebtn__text { display: grid; flex: 1; min-width: 0; gap: 2px; }
  .guidebtn__text strong { font-size: 15px; line-height: 1.25; }
  .guidebtn__text small { font-size: 13px; line-height: 1.4; color: var(--cemento); }
  .guidebtn__go { color: var(--cemento); }
  @media (hover: hover) and (pointer: fine) { .guidebtn:hover { transform: translateY(-2px); box-shadow: var(--sombra-flota), inset 0 0 0 1px var(--enlace); } }

  .guide { display: grid; gap: var(--sp-4); margin-top: var(--sp-4); padding: var(--sp-5); border-radius: var(--r-panel); background: var(--muro); box-shadow: var(--relieve), inset 0 0 0 1px var(--filete-2), inset 4px 0 0 var(--enlace); scroll-margin-top: var(--sp-4); }
  .guide--alert { box-shadow: var(--relieve), inset 0 0 0 1px var(--filete-2), inset 4px 0 0 var(--alarma); }
  .guide--warning { box-shadow: var(--relieve), inset 0 0 0 1px var(--filete-2), inset 4px 0 0 var(--bolardo); }
  .guide__head { display: flex; align-items: flex-start; gap: var(--sp-3); }
  .guide__icon { display: grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: var(--r-panel); background: var(--rio-suave); color: var(--enlace); }
  .guide--alert .guide__icon { background: var(--alarma-suave); color: var(--alarma); }
  .guide--warning .guide__icon { background: var(--bolardo-suave); color: var(--bolardo); }
  .guide__headtext { flex: 1; min-width: 0; }
  .guide__headtext h3 { font-size: 20px; }
  .guide__headtext p { margin-top: 2px; color: var(--pizarra); font-size: 14px; }
  .guide__headtext h3:focus { outline: none; }
  .guide__label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--cemento); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
  .guide__count { margin-left: auto; text-transform: none; letter-spacing: 0; font-variant-numeric: tabular-nums; color: var(--pizarra); }
  .guide__calls { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
  .guide__callbtn { height: auto; min-height: 52px; padding: 8px 18px; white-space: normal; text-align: left; }
  .guide__callbtn strong { font-size: 17px; font-variant-numeric: tabular-nums; }
  .stepbar { width: 100%; height: 10px; }
  .stepbar__seg { fill: var(--filete-2); transition: fill 200ms; }
  .stepbar__seg.is-on { fill: var(--jardinera); }
  .gsteps { display: grid; gap: var(--sp-2); margin: 0; padding: 0; list-style: none; }
  .step__label { display: flex; align-items: flex-start; gap: var(--sp-3); padding: 12px; border-radius: var(--r-panel); background: var(--yeso); cursor: pointer; transition: background-color 160ms; }
  .step__label input { position: absolute; opacity: 0; width: 1px; height: 1px; }
  .step__n { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--muro); box-shadow: inset 0 0 0 1.5px var(--filete-3); font-size: 13px; font-weight: 700; color: var(--pizarra); transition: background-color 160ms, color 160ms; }
  .step__text { flex: 1; padding-top: 3px; font-size: 15px; line-height: 1.5; }
  .step.is-done .step__label { background: var(--jardinera-suave); }
  .step.is-done .step__n { background: var(--jardinera); color: var(--sobre-serie); box-shadow: none; }
  .step.is-done .step__text { color: var(--pizarra); text-decoration: line-through; text-decoration-color: var(--cemento); }
  .step__label:has(input:focus-visible) { outline: 2px solid var(--enlace); outline-offset: 2px; }
  .chiplist { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: 0; padding: 0; list-style: none; }
  .chiplist li { padding: 6px 12px; border-radius: var(--r-pill); background: var(--rio-suave); color: var(--tinta); font-size: 13px; font-weight: 600; line-height: 1.35; }
  .guide__avoid .rules { margin-top: 6px; }
  .guide__after { display: flex; align-items: flex-start; gap: var(--sp-2); font-size: 14px; color: var(--pizarra); }
  .guide__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2); }
  .guide__source { font-size: 12px; color: var(--cemento); }

  .contactgroup { margin-top: var(--sp-5); }
  .contactgroup__name { margin-bottom: var(--sp-3); font-size: 14px; font-weight: 700; color: var(--cemento); text-transform: uppercase; letter-spacing: .05em; }
  .contacts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--sp-3); }
  .contact { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--sp-3); padding: var(--sp-4); background: var(--muro); border-radius: var(--r-panel); box-shadow: inset 0 0 0 1px var(--filete-2); }
  .contact__icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-panel); background: var(--rio-suave); color: var(--enlace); }
  .contact__name { font-size: 15px; }
  .contact__role, .contact__notes { font-size: 13px; color: var(--cemento); }
  .contact__phones { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--sp-2); margin-top: 6px; }
  .phone { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: var(--r-pill); background: var(--rio-suave); color: var(--enlace); font-weight: 700; font-size: 14px; text-decoration: none; font-variant-numeric: tabular-nums; }
  .contact__mail { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; min-height: 40px; color: var(--enlace); font-size: 13px; overflow-wrap: anywhere; }
  .contact__badges { grid-column: 2; display: flex; flex-wrap: wrap; gap: var(--sp-2); }
  .contact__none { margin-top: var(--sp-4); }

  /* ---------- Junta: contenido ---------- */
  .rows { display: grid; gap: var(--sp-2); margin-top: var(--sp-4); }
  .row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); background: var(--muro); border-radius: var(--r-panel); box-shadow: inset 0 0 0 1px var(--filete-2); }
  .row--off { opacity: .7; }
  .row__title { font-size: 15px; }
  .row__sub { font-size: 13px; color: var(--cemento); }
  .row__side { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--sp-2); }
  .rowactions { display: flex; align-items: center; gap: 2px; }
  @media (max-width: 640px) {
    .row { grid-template-columns: auto minmax(0, 1fr); }
    .row__side { grid-column: 1 / -1; justify-content: flex-start; }
  }
  .hoursform, .annexform { display: grid; gap: var(--sp-2); margin: 0; padding: 0; border: 0; min-width: 0; }
  .hoursform__row { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: var(--sp-2); }
  .hoursform__day { font-size: 14px; font-weight: 600; }
  .hoursform .field__input { min-height: 42px; padding-block: 8px; }
  .check--box { align-self: end; }

  /* ---------- Ambientes en vivo: filas compactas ---------- */
  .livelist { display: grid; gap: var(--sp-3); }
  .live { display: grid; grid-template-columns: minmax(200px, 1.1fr) minmax(220px, 1.3fr) auto minmax(210px, auto); align-items: center; gap: var(--sp-3) var(--sp-4); padding: var(--sp-3) var(--sp-4); background: var(--muro); border-radius: var(--r-panel); box-shadow: var(--relieve), inset 4px 0 0 var(--filete-3); }
  .live--vacio { box-shadow: var(--relieve), inset 4px 0 0 var(--jardinera); }
  .live--parcial { box-shadow: var(--relieve), inset 4px 0 0 var(--bolardo); }
  .live--lleno { box-shadow: var(--relieve), inset 4px 0 0 var(--alarma); }
  .live__who { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; }
  .live__gauge { display: grid; gap: 6px; min-width: 0; }
  .live__count { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px var(--sp-3); font-size: 14px; }
  .live__count span { color: var(--cemento); font-size: 13px; }
  .live__state { justify-self: start; }
  .live__action { min-width: 0; }
  .live__action .place__hint { padding: 8px 12px; }
  .live__action .place__mine { padding: 8px 12px; }
  .live__more { grid-column: 1 / -1; }
  .live__more .fold__summary { min-height: 44px; font-size: 13px; }
  .live__detail { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--sp-4); padding: 6px 4px 4px; }
  .live__detail .hours, .live__detail .rules { margin: 0; }
  .fold__summary--meta { background: transparent; padding-left: 0; font-weight: 600; }
  @media (max-width: 900px) {
    .live { grid-template-columns: minmax(0, 1fr) auto; }
    .live__gauge { grid-column: 1 / -1; grid-row: 2; }
    .live__action { grid-column: 1 / -1; }
    .live__state { grid-row: 1; grid-column: 2; }
  }
  .bookables { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--sp-3); }
  .bookable { display: grid; align-content: start; gap: var(--sp-3); padding: var(--sp-4); background: var(--muro); border-radius: var(--r-panel); box-shadow: var(--relieve), inset 0 0 0 1px var(--filete-1); }
  .bookable .live__who { justify-content: space-between; flex-wrap: wrap; }
  .bookable .live__who .place__title { flex: 1 1 160px; }
  .bookable__actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); }

  /* ---------- Calendario de reservas ---------- */
  .dot { display: inline-block; width: 10px; height: 10px; flex: none; border-radius: 50%; }
  .dot--0 { background: var(--serie-1); } .dot--1 { background: var(--serie-2); } .dot--2 { background: var(--serie-3); } .dot--3 { background: var(--serie-4); } .dot--4 { background: var(--serie-5); }
  .chip .dot { margin-right: 6px; }
  .chip { display: inline-flex; align-items: center; }
  .cal__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-3); }
  .cal__nav { display: flex; align-items: center; gap: var(--sp-1); }
  .cal__title { min-width: 170px; text-align: center; font-size: 20px; }
  .cal__filters { margin-bottom: var(--sp-4); }
  .cal { background: var(--muro); border-radius: var(--r-panel); box-shadow: var(--relieve), inset 0 0 0 1px var(--filete-1); overflow: hidden; }
  .cal__dow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--yeso); font-size: 12px; font-weight: 700; color: var(--cemento); text-transform: uppercase; letter-spacing: .05em; }
  .cal__dow span { padding: 8px 8px; text-align: left; }
  .cal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .cal__day { display: grid; align-content: start; gap: 4px; min-height: 104px; min-width: 0; padding: 6px; text-align: left; background: var(--muro); box-shadow: inset -1px -1px 0 var(--filete-1); transition: background-color 120ms; }
  .cal__day.is-out { background: var(--yeso); color: var(--cemento); }
  .cal__day.is-past .cal__chips { opacity: .6; }
  .cal__day[aria-pressed="true"] { background: var(--rio-suave); box-shadow: inset 0 0 0 2px var(--enlace); }
  .cal__num { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: 13px; font-weight: 700; }
  .cal__day.is-today .cal__num { background: var(--rio); color: var(--sobre-rio); }
  .cal__chips { display: grid; gap: 3px; min-width: 0; }
  .cal__chip { display: block; overflow: hidden; padding: 2px 6px; border-radius: var(--r-control); border-left: 3px solid var(--chip, var(--serie-1)); background: color-mix(in srgb, var(--chip, var(--serie-1)) 16%, var(--muro)); color: var(--tinta); font-size: 11.5px; font-weight: 600; line-height: 1.35; white-space: nowrap; text-overflow: ellipsis; }
  .cal__chip--0 { --chip: var(--serie-1); } .cal__chip--1 { --chip: var(--serie-2); } .cal__chip--2 { --chip: var(--serie-3); } .cal__chip--3 { --chip: var(--serie-4); } .cal__chip--4 { --chip: var(--serie-5); }
  .cal__chip.is-pending { background: transparent; border: 1px dashed var(--chip); border-left-width: 3px; }
  .cal__more { font-size: 11.5px; font-weight: 700; color: var(--enlace); }
  @media (hover: hover) and (pointer: fine) { .cal__day:hover:not([aria-pressed="true"]) { background: var(--yeso); } }
  .cal__day:focus-visible { outline: 2px solid var(--enlace); outline-offset: -2px; z-index: 1; }
  .cal__note { display: flex; align-items: center; gap: 6px; margin: var(--sp-3) 0 var(--sp-5); font-size: 13px; color: var(--cemento); }
  @media (max-width: 720px) {
    .cal__day { min-height: 58px; padding: 4px; justify-items: center; }
    .cal__chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; }
    .cal__chip { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: var(--chip); font-size: 0; }
    .cal__chip.is-pending { background: transparent; border: 1.5px solid var(--chip); }
    .cal__more { font-size: 0; }
    .cal__dow span { padding: 6px 2px; text-align: center; font-size: 11px; letter-spacing: 0; }
    .cal__title { min-width: 0; font-size: 18px; }
  }
  .cal__hint { display: none; align-items: center; gap: 8px; margin: 0 0 var(--sp-3); padding: 12px 14px; border-radius: var(--r-panel); background: var(--rio-suave); color: var(--tinta); font-size: 14px; font-weight: 600; }
  @media (max-width: 720px) { .cal__hint { display: flex; } .cal > .dayplan, .cal__hint ~ .dayplan { display: none; } }
  .daysheet .dayplan { padding: 0; background: transparent; box-shadow: none; }
  .daylist { display: grid; gap: var(--sp-2); margin: 0; padding: 0; list-style: none; }
  .dayitem { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--sp-3); padding: 14px 16px; border-radius: var(--r-panel); box-shadow: inset 0 0 0 1px var(--filete-2); background: var(--muro); }
  .dayitem--free { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--jardinera) 45%, transparent); }
  .dayitem--busy { background: var(--alarma-suave); box-shadow: none; }
  .dayitem--mine { background: var(--jardinera-suave); box-shadow: none; }
  .dayitem--pending { background: var(--bolardo-suave); box-shadow: none; }
  .dayitem--past, .dayitem--closed { background: var(--yeso); box-shadow: none; }
  .dayitem > .dot { align-self: start; margin-top: 7px; }
  .dayitem--busy .dayitem__tag { color: var(--alarma); }
  .dayitem__main { display: grid; gap: 2px; min-width: 0; }
  .dayitem__main strong { font-size: 16px; }
  .dayitem__who { font-size: 14px; font-weight: 650; }
  .dayitem--free .dayitem__who { color: var(--jardinera); }
  .dayitem--busy .dayitem__who { color: var(--alarma); }
  .dayitem__main small { font-size: 12.5px; color: var(--cemento); }
  .dayplan__foot { display: flex; align-items: flex-start; gap: 8px; margin: var(--sp-3) 0 0; font-size: 12.5px; line-height: 1.45; color: var(--cemento); }
  .dayplan__foot .ico { margin-top: 2px; flex: none; }
  .daystate { display: flex; align-items: flex-start; gap: 8px; padding: 12px 14px; border-radius: var(--r-panel); font-size: 14px; }
  .daystate--free { background: var(--jardinera-suave); color: var(--jardinera); }
  .daystate--busy { background: var(--alarma-suave); color: var(--alarma); }
  .costbox { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2) var(--sp-3); padding: 14px 16px; border-radius: var(--r-panel); background: var(--yeso); }
  .costbox div { display: grid; gap: 2px; }
  .costbox span { font-size: 12.5px; font-weight: 650; color: var(--cemento); }
  .costbox strong { font-family: var(--font-display); font-size: 26px; letter-spacing: -.03em; }
  .rulesbox--fold { display: block; padding: 0; }
  .rulesbox--fold summary { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 14px; cursor: pointer; list-style: none; }
  .rulesbox--fold summary::-webkit-details-marker { display: none; }
  .rulesbox--fold summary > span { display: grid; flex: 1; gap: 2px; }
  .rulesbox--fold summary small { font-size: 12.5px; color: var(--pizarra); }
  .rulesbox--fold .rules { margin: 0; padding: 0 14px 14px; }
  .rulesbox__caret { transition: transform 160ms var(--ease-out); }
  .rulesbox--fold[open] .rulesbox__caret { transform: rotate(180deg); }
  .rulesbox--fold summary:focus-visible { outline: 2px solid var(--enlace); outline-offset: -2px; border-radius: var(--r-panel); }
  .costbox--row { padding: 10px 14px; }
  .costbox--row strong { font-size: 22px; }
  .costbox p { grid-column: 1 / -1; font-size: 12.5px; line-height: 1.45; color: var(--cemento); }
  .dayplan { display: grid; gap: var(--sp-3); padding: var(--sp-4); background: var(--muro); border-radius: var(--r-panel); box-shadow: var(--relieve), inset 0 0 0 1px var(--filete-1); scroll-margin-top: var(--sp-4); }
  .dayplan__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3); }
  .dayplan__head h3 { font-size: 20px; }
  .dayplan__avail { display: flex; align-items: flex-start; gap: 6px; font-size: 14px; color: var(--jardinera); }
  .dayplan__avail .ico { margin-top: 3px; }
  .dayplan__avail--none { color: var(--pizarra); }
  .picker { display: grid; gap: var(--sp-2); margin: 0; padding: 0; list-style: none; }
  .picker__item { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-panel); background: var(--yeso); }
  .picker__item.is-off { opacity: 1; background: transparent; box-shadow: inset 0 0 0 1px var(--filete-2); }
  .picker__body { display: grid; gap: 2px; min-width: 0; }
  .picker__free { font-size: 14px; color: var(--jardinera); font-weight: 600; }
  .picker__item.is-off .picker__free { color: var(--pizarra); font-weight: 500; }
  .dayrow { display: grid; gap: 6px; padding-top: var(--sp-3); border-top: 1px solid var(--filete-1); }
  .dayrow__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
  .dayrow__btn { margin-left: auto; }
  .daybar { width: 100%; height: 14px; }
  .daybar__track { fill: var(--yeso); stroke: var(--filete-2); stroke-width: .4; vector-effect: non-scaling-stroke; }
  .daybar__track.is-closed { fill: var(--filete-1); }
  .daybar__busy { fill: var(--serie-1); }
  .daybar__busy--0 { fill: var(--serie-1); } .daybar__busy--1 { fill: var(--serie-2); } .daybar__busy--2 { fill: var(--serie-3); } .daybar__busy--3 { fill: var(--serie-4); } .daybar__busy--4 { fill: var(--serie-5); }
  .daybar__busy.is-pending { fill-opacity: .35; stroke: currentColor; stroke-dasharray: 2 1.5; stroke-width: 1; vector-effect: non-scaling-stroke; }
  .daybar__ticks { display: flex; justify-content: space-between; font-size: 11px; color: var(--cemento); font-variant-numeric: tabular-nums; }
  .dayrow__list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 14px; color: var(--pizarra); }
  .dayrow__list li { display: flex; align-items: flex-start; gap: 6px; }
  .dayrow__list .ico { margin-top: 3px; color: var(--cemento); }
  .dayrow__free { display: flex; align-items: flex-start; gap: 6px; font-size: 14px; color: var(--jardinera); }
  .dayrow__free .ico { margin-top: 3px; }
  .dayrow__free--none { color: var(--pizarra); }
  .dayrow__free--note { color: var(--enlace); font-size: 13px; }

  /* ---------- Portada: tarjetas de color, listas con barra y gráfico ---------- */
  .home { display: grid; gap: var(--sp-5); }
  .greet { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-4); }
  /* En celular el nombre del edificio ya está en la barra superior: se omite para que la fecha no se parta en dos líneas. */
  @media (max-width: 520px) { .greet__condo { display: none; } }
  .greet__date { font-size: 14px; font-weight: 600; color: var(--cemento); }
  .greet__title { font-size: clamp(32px, 4.6vw, 54px); line-height: 1.02; font-weight: 700; letter-spacing: -.045em; text-wrap: balance; }
  .floor { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; align-items: center; column-gap: 8px; flex: none; padding: 10px 16px 8px; border-radius: var(--r-panel); background: var(--ciruela); box-shadow: 0 18px 30px -18px rgb(20 20 60 / .6), inset 0 0 0 1px rgb(255 255 255 / .1); }
  .floor__arrow { grid-column: 1; grid-row: 1; color: var(--led); }
  .floor__num { grid-column: 2; grid-row: 1 / span 2; font-family: var(--font-display); font-size: 52px; line-height: .9; font-weight: 800; letter-spacing: -.05em; color: var(--led); font-variant-numeric: tabular-nums; text-shadow: 0 0 20px color-mix(in srgb, var(--led) 45%, transparent); }
  .floor__label { grid-column: 1; grid-row: 2; font-size: 12px; font-weight: 700; color: #C9CCEE; }

  .scs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-4); }
  .sc { display: grid; align-content: space-between; gap: var(--sp-3); min-height: 156px; padding: var(--sp-5); border-radius: var(--r-panel); text-align: left; text-decoration: none; color: #fff; box-shadow: 0 22px 36px -24px rgb(10 40 50 / .55); transition: transform 200ms var(--ease-out), box-shadow 200ms; }
  .sc--teal { background: linear-gradient(150deg, #0F6171, #0A4552); }
  .sc--amber { background: linear-gradient(150deg, #F7BE60, #F0A63A); color: #2A1A00; }
  .sc--navy { background: linear-gradient(150deg, #2E3060, #1F2045); }
  .sc--red { background: linear-gradient(150deg, #D9442F, #AD281A); }
  .sc__top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
  .sc__label { font-size: 14px; font-weight: 650; }
  .sc__icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgb(255 255 255 / .2); }
  .sc--amber .sc__icon { background: rgb(42 26 0 / .12); }
  .sc__value { font-family: var(--font-display); font-size: clamp(44px, 4vw, 58px); line-height: 1; font-weight: 700; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
  .sc__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
  .sc__note { font-size: 13px; font-weight: 550; }
  .sc__go { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: rgb(255 255 255 / .2); transition: transform 200ms var(--ease-out); }
  .sc--amber .sc__go { background: rgb(42 26 0 / .12); }
  @media (hover: hover) and (pointer: fine) { .sc:hover { transform: translateY(-4px); box-shadow: 0 30px 44px -24px rgb(10 40 50 / .6); } .sc:hover .sc__go { transform: translate(2px, -2px); } }
  .sc:focus-visible { outline: 3px solid var(--ambar); outline-offset: 3px; }

  .grid2c { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--sp-4); align-items: start; }
  .grid2c--wide { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
  .stack { display: grid; gap: var(--sp-4); min-width: 0; }
  .card { min-width: 0; padding: var(--sp-5); border-radius: var(--r-panel); background: var(--muro); box-shadow: var(--relieve); }
  .card__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-4); }
  .card__title { font-size: 20px; font-weight: 650; letter-spacing: -.03em; }
  .card__link { display: inline-flex; align-items: center; min-height: 36px; color: var(--enlace); font-size: 13px; font-weight: 700; text-decoration: none; }
  .card__link:hover { text-decoration: underline; text-underline-offset: 3px; }
  .card__sub { margin: -8px 0 var(--sp-3); font-size: 13px; color: var(--cemento); }
  .card__empty { color: var(--pizarra); font-size: 14px; }
  .card__emptyrow { display: flex; align-items: flex-start; gap: var(--sp-3); padding: var(--sp-4); border-radius: var(--r-panel); background: var(--yeso); color: var(--pizarra); font-size: 14px; line-height: 1.5; }
  .card__emptyrow .ico { margin-top: 1px; color: var(--enlace); }

  .rows-i { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
  .row-i { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--sp-3); padding: 12px 14px; border-radius: var(--r-panel); box-shadow: inset 0 0 0 1px var(--filete-2); }
  .row-i__day { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--rio-suave); color: var(--enlace); }
  .row-i__day strong { font-family: var(--font-display); font-size: 20px; font-weight: 700; }
  .row-i__body { display: grid; gap: 1px; min-width: 0; }
  .row-i__body strong { font-size: 14.5px; line-height: 1.3; }
  .row-i__body small { font-size: 12.5px; color: var(--cemento); }
  .tag { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: var(--r-panel); background: var(--yeso); color: var(--pizarra); font-size: 12px; font-weight: 700; white-space: nowrap; box-shadow: inset 0 0 0 1px var(--filete-2); }
  .tag--warn { background: var(--bolardo-suave); color: var(--bolardo); box-shadow: none; }

  .meters { display: grid; gap: var(--sp-4); margin: 0; padding: 0; list-style: none; }
  .meter-row { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--sp-3); }
  .chipicon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-panel); }
  .chipicon--peach { background: light-dark(#FDE8DD, #3A2418); color: light-dark(#A34A1A, #FFB48A); }
  .chipicon--mint { background: light-dark(#DDF3E6, #14352A); color: light-dark(#1B7048, #7DE0AE); }
  .chipicon--sky { background: light-dark(#DCEBFA, #15303F); color: light-dark(#235C99, #8CC4F5); }
  .chipicon--lilac { background: light-dark(#E7E4F8, #25244A); color: light-dark(#4B43A0, #BDB8F7); }
  .chipicon--sand { background: light-dark(#F7ECD2, #3A3014); color: light-dark(#7C5A0E, #F2D27A); }
  .meter-row__body { display: grid; gap: 5px; min-width: 0; }
  .meter-row__line { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-2); font-size: 14.5px; }
  .meter-row__pct { font-family: var(--font-display); font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
  .meter-row__note { font-size: 12.5px; color: var(--cemento); }
  .track { width: 100%; height: 8px; }
  .track__bg { fill: var(--filete-2); }
  .track__fill--vacio { fill: var(--jardinera); }
  .track__fill--parcial { fill: var(--ambar); }
  .track__fill--lleno { fill: var(--alarma); }

  .line { width: 100%; height: auto; }
  .line__grid { stroke: var(--filete-2); stroke-dasharray: 3 5; }
  .line__y, .line__x { fill: var(--cemento); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
  .line__stop1 { stop-color: var(--grafico); stop-opacity: .4; }
  .line__stop2 { stop-color: var(--grafico); stop-opacity: .02; }
  .line__path { fill: none; stroke: var(--grafico); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
  .line__dot { fill: var(--muro); stroke: var(--grafico); stroke-width: 2; }
  .line__dot.is-on { fill: var(--ambar); stroke: var(--muro); stroke-width: 2.5; }
  .line__tip rect { fill: var(--ciruela); }
  .line__tip text { fill: #fff; font-size: 12px; font-weight: 700; }
  /* El dibujo mide 600 unidades y en celular se reduce a la mitad: los textos se agrandan para seguir leyéndose (≈11 px). */
  @media (max-width: 640px) {
    .line__y, .line__x { font-size: 22px; }
    .line__tip text { font-size: 17px; }
    .line__path { stroke-width: 5; }
  }

  @media (max-width: 1100px) { .scs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 959px) { .grid2c, .grid2c--wide { grid-template-columns: minmax(0, 1fr); } }
  @media (max-width: 640px) {
    .home { gap: var(--sp-4); }
    .greet { align-items: flex-start; }
    .floor { padding: 8px 12px 6px; }
    .floor__num { font-size: 40px; }
    .scs { gap: var(--sp-3); }
    .sc { min-height: 140px; padding: var(--sp-4); border-radius: var(--r-panel); }
    .card { padding: var(--sp-4); border-radius: var(--r-panel); }
  }

  /* ---------- Tipografía, controles y acceso ---------- */
  h1, h2 { font-family: var(--font-display); font-weight: 650; letter-spacing: -.03em; }
  .pagehead__title { font-size: clamp(32px, 4.8vw, 52px); line-height: 1.02; letter-spacing: -.045em; font-weight: 700; margin-bottom: 8px; }
  .pagehead { margin-bottom: var(--sp-5); }
  .pagehead .eyebrow { color: var(--enlace); font-weight: 700; }
  .section { font-weight: 650; font-size: 22px; }
  .sheet__title, .empty__title, .election__title, .cal__title { font-weight: 650; }
  .btn { border-radius: var(--r-pill); }
  .tabs { gap: 4px; padding: 4px; width: fit-content; max-width: 100%; flex-wrap: wrap; border-radius: var(--r-panel); background: var(--muro); box-shadow: var(--relieve); overflow: visible; }
  @media (max-width: 640px) { .tabs { flex-wrap: nowrap; overflow-x: auto; border-radius: var(--r-pill); gap: 0; } .tabs__btn { padding: 0 9px !important; font-size: 13.5px; } }
  .tabs__btn { min-height: 40px; padding: 0 16px; border-radius: var(--r-pill); color: var(--pizarra); }
  .tabs__btn[aria-selected="true"] { background: var(--rio); color: var(--sobre-rio); }
  .tabs__btn[aria-selected="true"]::after { display: none; }
  .tabs__count { background: var(--rio-suave); color: var(--enlace); }
  .tabs__btn[aria-selected="true"] .tabs__count { background: rgb(255 255 255 / .22); color: inherit; }
  .chip[aria-pressed="true"] { background: var(--rio); color: var(--sobre-rio); box-shadow: none; }

  .login-wrap { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center end; min-height: 100dvh; padding: var(--sp-5); background: #06262E; }
  .login-hero { position: fixed; inset: 0; z-index: -1; height: auto; min-height: 0; }
  .login-hero__img { object-position: 50% 30%; }
  .login-hero__scrim { background: linear-gradient(90deg, rgb(4 34 42 / .93) 0%, rgb(8 62 74 / .62) 52%, rgb(8 62 74 / .18) 100%); }
  .login-hero__inner { min-height: 100dvh; max-width: 780px; padding: var(--sp-6) var(--sp-7); height: auto; }
  .login-hero__copy h1 { max-width: 11ch; font-size: clamp(44px, 5.6vw, 84px); line-height: .98; font-weight: 700; letter-spacing: -.045em; }
  .login-box { position: relative; z-index: 1; width: min(100%, 470px); min-height: 0; margin-right: clamp(0px, 5vw, 96px); padding: 0; background: transparent; }
  .login-card { padding: var(--sp-7) var(--sp-6); border-radius: var(--r-panel); box-shadow: 0 44px 90px -34px rgb(0 0 0 / .75); }
  .login-inner h2 { font-size: 36px; }
  .login-box .platform { color: rgb(255 255 255 / .85); }
  .login-box .platform strong { color: #fff; }
  @media (max-width: 899px) {
    .login-wrap { place-items: center; padding: var(--sp-4); }
    .login-hero__inner { padding: var(--sp-5); }
    .login-hero__copy { display: none; }
    .login-hero__scrim { background: linear-gradient(180deg, rgb(4 34 42 / .82) 0%, rgb(8 62 74 / .55) 100%); }
    .login-box { margin-right: 0; }
    .login-card { padding: var(--sp-6) var(--sp-5); }
  }
}

@layer pages {
  /* ---------- Reservas para todo público (decisión del 9 nov 2026): letra grande, un botón por pantalla, nada que perderse ---------- */
  .btn--lg { min-height: 56px; padding: 0 24px; border-radius: var(--r-panel); font-size: 17px; }
  .field__input--lg { min-height: 56px; font-size: 17px; }
  .check--lg { align-items: center; padding: var(--sp-4); border-radius: var(--r-control); background: var(--muro); box-shadow: inset 0 0 0 1.5px var(--filete-2); }
  .check--lg input { width: 28px; height: 28px; margin: 0; border-radius: var(--r-panel); }
  .check--lg strong { font-size: 16px; }
  .chips--lg { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
  .chips--lg .chip { min-height: 52px; padding: 0 22px; font-size: 16px; }
  .contact__body, .row__body, .resv__body, .attrow__text, .tile__text, .wchoice__text, .vouch__text, .helpcall__text { min-width: 0; }
  /* Guía de emergencia: el teléfono nunca se parte en líneas; el botón baja el número debajo del nombre si no cabe. */
  .guide__callbtn { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; justify-items: start; gap: 0 var(--sp-3); padding: 10px 20px; border-radius: var(--r-panel); text-align: left; }
  .guide__callbtn .ico { grid-row: span 2; }
  .guide__callbtn span { font-size: 14px; font-weight: 600; line-height: 1.25; }
  .guide__callbtn strong { white-space: nowrap; font-size: 20px; line-height: 1.2; }
  @media (max-width: 560px) { .guide__calls .guide__callbtn { width: 100%; } }

  /* Asistente */
  .wiz { display: grid; gap: var(--sp-5); width: 100%; max-width: 640px; }
  .wiz__head { display: grid; gap: var(--sp-3); }
  .wiz__top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
  .wiz__back { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; margin-left: -8px; padding: 0 14px 0 8px; border-radius: var(--r-control); color: var(--enlace); font-size: 16px; font-weight: 650; text-decoration: none; }
  .wiz__step { font-size: 14px; font-weight: 650; color: var(--cemento); }
  .wiz__dots { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; margin: 0; padding: 0; list-style: none; }
  .wiz__dots li { height: 6px; border-radius: 3px; background: var(--filete-2); }
  .wiz__dots li.is-done { background: var(--progreso); }
  .wiz__dots li.is-now { background: var(--rio); }
  .wiz__title { font-size: clamp(26px, 6vw, 36px); line-height: 1.1; font-weight: 700; letter-spacing: -.03em; text-wrap: balance; }
  .wiz__title:focus { outline: none; }
  .wiz__hint { font-size: 17px; line-height: 1.45; color: var(--pizarra); }
  .wiz__body { display: grid; gap: var(--sp-5); min-width: 0; }
  .wiz__block { display: grid; gap: var(--sp-3); min-width: 0; }
  .wiz__q { font-size: 18px; font-weight: 700; }
  .wiz__sum { display: flex; align-items: center; gap: var(--sp-2); padding: 12px 14px; border-radius: var(--r-control); background: var(--rio-suave); color: var(--tinta); font-size: 15px; }
  .wiz__sum .ico { flex: none; color: var(--enlace); }
  .wiz__picked { display: flex; align-items: center; gap: var(--sp-2); padding: 14px 16px; border-radius: var(--r-control); background: var(--jardinera-suave); color: var(--jardinera); font-size: 16px; font-weight: 600; }
  .wiz__picked .ico { flex: none; }
  .wiz__foot { display: grid; gap: var(--sp-3); margin-top: var(--sp-2); }
  .wiz__error { display: flex; align-items: flex-start; gap: var(--sp-2); margin: 0; padding: 14px 16px; border-radius: var(--r-control); background: var(--alarma-suave); color: var(--alarma); font-size: 16px; font-weight: 600; line-height: 1.4; }
  .wiz__error:empty { display: none; }
  .wiz__error .ico { flex: none; margin-top: 1px; }
  .wiz__blocked { padding-top: var(--sp-4); }
  .wiz .chips { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
  .wiz .chip { min-height: 48px; padding: 0 18px; font-size: 16px; }
  .wiz .field__hint { font-size: 14px; }

  /* Paso 1: ambientes grandes para tocar */
  .wchoices { display: grid; gap: var(--sp-3); }
  .wchoice { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--sp-4); width: 100%; padding: var(--sp-4); text-align: left; border-radius: var(--r-panel); background: var(--muro); box-shadow: var(--relieve), inset 0 0 0 1.5px var(--filete-2); transition: transform 140ms var(--ease-out), box-shadow 140ms; }
  .wchoice:active { transform: scale(.985); }
  .wchoice[aria-pressed="true"] { box-shadow: var(--relieve), inset 0 0 0 2.5px var(--rio); }
  .wchoice__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: var(--r-panel); background: var(--rio-suave); color: var(--enlace); }
  .wchoice__text { display: grid; gap: 2px; }
  .wchoice__text strong { font-size: 19px; line-height: 1.2; }
  .wchoice__text small { font-size: 14px; line-height: 1.35; color: var(--pizarra); }
  .wchoice__go { color: var(--cemento); }
  @media (hover: hover) and (pointer: fine) { .wchoice:hover { transform: translateY(-2px); box-shadow: var(--sombra-flota), inset 0 0 0 1.5px var(--enlace); } }

  /* Paso 2: calendario del asistente, solo los días libres se pueden tocar */
  .wcal__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
  .wcal__title { flex: 1; text-align: center; font-size: 19px; font-weight: 700; }
  .wcal__title::first-letter { text-transform: uppercase; }
  .wcal { padding: var(--sp-2); border-radius: var(--r-panel); background: var(--muro); box-shadow: var(--relieve), inset 0 0 0 1px var(--filete-2); }
  .wcal__dow, .wcal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
  .wcal__dow span { padding-bottom: 6px; text-align: center; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--cemento); }
  .wcal__blank { min-height: 54px; }
  .wcal__day { position: relative; display: grid; place-items: center; align-content: center; gap: 1px; min-height: 54px; padding: 2px; border-radius: var(--r-panel); background: var(--yeso); color: var(--cemento); }
  .wcal__day:disabled { cursor: not-allowed; background-image: repeating-linear-gradient(135deg, transparent 0 5px, var(--filete-1) 5px 7px); }
  .wcal__num { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
  .wcal__tag { max-width: 100%; overflow: hidden; font-size: 11px; font-weight: 700; line-height: 1; letter-spacing: -.01em; white-space: nowrap; }
  .wcal__day--free { background: var(--jardinera-suave); color: var(--jardinera); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--jardinera) 40%, transparent); cursor: pointer; }
  .wcal__day--mine, .wcal__day--pending { color: var(--enlace); }
  .wcal__day.is-today::after { content: ""; position: absolute; bottom: 5px; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
  .wcal__day[aria-pressed="true"] { background: var(--rio); color: var(--sobre-rio); box-shadow: none; }
  .wcal__legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 14px; color: var(--pizarra); }
  .wcal__key { width: 18px; height: 18px; border-radius: var(--r-control); }
  .wcal__key--free { background: var(--jardinera-suave); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--jardinera) 40%, transparent); }
  .wcal__key--busy { background: var(--yeso) repeating-linear-gradient(135deg, transparent 0 4px, var(--filete-2) 4px 6px); }
  .wcal__key--busy { margin-left: 8px; }
  @media (hover: hover) and (pointer: fine) { .wcal__day--free:hover:not([aria-pressed="true"]) { background: color-mix(in srgb, var(--jardinera) 18%, var(--muro)); } }

  /* Paso 3: cantidad de personas */
  .stepper { display: inline-flex; align-items: center; gap: var(--sp-4); }
  .stepper__btn { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--muro); box-shadow: inset 0 0 0 1.5px var(--filete-3); color: var(--tinta); transition: transform 140ms var(--ease-out), background-color 140ms; }
  .stepper__btn:active { transform: scale(.94); background: var(--rio-suave); }
  .stepper__num { min-width: 64px; text-align: center; font-size: 38px; font-weight: 750; line-height: 1; font-variant-numeric: tabular-nums; }

  /* Paso 4: la cuenta, con botón de copiar, y la foto del voucher */
  .pay { display: grid; gap: var(--sp-3); }
  .pay__total { display: grid; gap: 2px; padding: var(--sp-4) var(--sp-5); border-radius: var(--r-panel); background: linear-gradient(150deg, var(--hero-1), var(--hero-2)); color: #fff; }
  .pay__total small { font-size: 14px; font-weight: 600; color: rgb(255 255 255 / .82); }
  .pay__total strong { font-family: var(--font-display); font-size: 44px; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
  .pay__card { display: grid; gap: var(--sp-2); padding: var(--sp-4); border-radius: var(--r-panel); background: var(--muro); box-shadow: var(--relieve), inset 0 0 0 1px var(--filete-2); }
  .pay__holder { display: flex; align-items: center; gap: var(--sp-2); font-size: 16px; }
  .pay__holder .ico { flex: none; color: var(--enlace); }
  .pay__row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-3); border-radius: var(--r-panel); background: var(--yeso); }
  .pay__row > div { display: grid; min-width: 0; gap: 2px; }
  .pay__row small { font-size: 12.5px; font-weight: 650; color: var(--cemento); }
  .pay__num { font-family: var(--font-mono); font-size: clamp(14px, 4vw, 18px); letter-spacing: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
  .pay__row .btn { flex: none; min-height: 48px; }
  .vouch { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3); border-radius: var(--r-control); background: var(--jardinera-suave); }
  .vouch__img, .vouch__file { flex: none; width: 72px; height: 72px; border-radius: var(--r-panel); }
  .vouch__img { object-fit: cover; }
  .vouch__file { display: grid; place-items: center; background: var(--muro); color: var(--enlace); }
  .vouch__text { display: grid; gap: 2px; }
  .vouch__text strong { font-size: 15px; overflow-wrap: anywhere; }
  .vouch__text small { font-size: 13px; color: var(--pizarra); }

  /* Paso 5: resumen y pantalla final */
  .wizsum { display: grid; gap: 1px; margin: 0; overflow: hidden; border-radius: var(--r-panel); background: var(--filete-2); box-shadow: var(--relieve); }
  .wizsum > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: var(--sp-3); padding: 14px var(--sp-4); background: var(--muro); }
  .wizsum dt { font-size: 13px; font-weight: 650; color: var(--cemento); }
  .wizsum dd { margin: 0; font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
  @media (max-width: 420px) { .wizsum > div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }
  .howto--lg { gap: var(--sp-4); }
  .howto--lg li { font-size: 17px; }
  .howto--lg .howto__n { width: 36px; height: 36px; font-size: 17px; }
  .wiz__done { display: grid; gap: var(--sp-5); width: 100%; max-width: 640px; }
  .wiz__donemark { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: var(--jardinera-suave); color: var(--jardinera); }

  /* Marcar asistencia: lo primero que ve el vecino */
  .att { display: grid; gap: var(--sp-4); padding: var(--sp-5); border-radius: var(--r-panel); background: var(--muro); box-shadow: var(--relieve), inset 0 0 0 1px var(--filete-2); }
  .att__head { display: grid; gap: 4px; }
  .att__title { display: flex; align-items: center; gap: var(--sp-2); font-size: 22px; letter-spacing: -.02em; }
  .att__title .ico { flex: none; color: var(--enlace); }
  .att__sub { font-size: 15px; line-height: 1.45; color: var(--pizarra); }
  .attlist { display: grid; gap: var(--sp-3); }
  .attrow { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--sp-3); padding: var(--sp-4); border-radius: var(--r-panel); background: var(--yeso); }
  .attrow__text { display: grid; justify-items: start; gap: 4px; }
  .attrow__text h3 { font-size: 18px; }
  .attrow__text p { font-size: 14px; color: var(--cemento); }
  .attrow__action { grid-column: 1 / -1; }
  .attrow__action .place__enter { display: grid; grid-template-columns: 110px minmax(0, 1fr); align-items: end; gap: var(--sp-3); }
  .attrow__action .place__people { flex: none; }
  .attrow__action .place__people .field__input { min-height: 56px; padding-block: 12px; font-size: 17px; }
  .attrow__action .btn { width: 100%; min-height: 56px; font-size: 17px; border-radius: var(--r-panel); }
  .attrow__action .place__mine { padding: var(--sp-4); }
  .attrow__action .place__mine p { font-size: 15px; }
  .attrow__action .place__hint { font-size: 15px; }

  /* Portada del vecino: botones grandes con una idea cada uno */
  .home--resident { gap: var(--sp-5); }
  .greet__text { display: grid; gap: 4px; min-width: 0; }
  .tiles { display: grid; gap: var(--sp-3); }
  .tilegrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
  .tile { position: relative; display: grid; align-content: start; gap: var(--sp-3); min-height: 140px; padding: var(--sp-4); border-radius: var(--r-panel); background: var(--muro); color: var(--tinta); text-decoration: none; box-shadow: var(--relieve), inset 0 0 0 1px var(--filete-2); transition: transform 140ms var(--ease-out), box-shadow 140ms; }
  .tile:active { transform: scale(.985); }
  .tile__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: var(--r-panel); background: var(--rio-suave); color: var(--enlace); }
  .tile__text { display: grid; align-content: start; gap: 2px; }
  .tile__text strong { font-size: 17px; line-height: 1.2; }
  .tile__text small { font-size: 14px; line-height: 1.35; color: var(--pizarra); }
  .tile__count { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0 8px; border-radius: var(--r-pill); background: var(--rio); color: var(--sobre-rio); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
  .tile--primary { grid-column: 1 / -1; grid-template-columns: auto minmax(0, 1fr); align-items: center; min-height: 0; padding: var(--sp-5); background: linear-gradient(150deg, var(--hero-1), var(--hero-2)); color: #fff; box-shadow: 0 22px 36px -24px rgb(10 40 50 / .55); }
  .tile--primary .tile__icon { background: rgb(255 255 255 / .16); color: #fff; }
  .tile--primary .tile__text strong { font-size: 20px; }
  .tile--primary .tile__text small { color: rgb(255 255 255 / .88); }
  @media (min-width: 720px) { .tilegrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
  @media (hover: hover) and (pointer: fine) { .tile:hover { transform: translateY(-2px); box-shadow: var(--sombra-flota), inset 0 0 0 1px var(--enlace); } }
  .ambientes__cta { margin-bottom: var(--sp-5); }

  /* Ayuda del vecino: solo los teléfonos de Recepción y Administración */
  .helpcalls { display: grid; gap: var(--sp-3); max-width: 560px; }
  .helpcall { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--sp-4); padding: var(--sp-5); border-radius: var(--r-panel); background: var(--muro); color: var(--tinta); text-decoration: none; box-shadow: var(--relieve), inset 0 0 0 1.5px color-mix(in srgb, var(--enlace) 40%, transparent); transition: transform 140ms var(--ease-out); }
  .helpcall:active { transform: scale(.985); }
  .helpcall > .ico { color: var(--enlace); }
  .helpcall__text { display: grid; gap: 2px; }
  .helpcall__text small { font-size: 14px; font-weight: 600; color: var(--cemento); }
  .helpcall__text strong { font-size: 30px; line-height: 1.1; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
  .helpcall__go { display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px; border-radius: var(--r-control); background: var(--rio); color: var(--sobre-rio); font-size: 16px; font-weight: 700; }
  @media (max-width: 420px) { .helpcall { grid-template-columns: auto minmax(0, 1fr); } .helpcall__go { grid-column: 1 / -1; justify-content: center; } }

  /* Administración: pago declarado y estado del propietario al aprobar */
  .paycheck { display: grid; gap: var(--sp-3); padding: var(--sp-4); border-radius: var(--r-panel); background: var(--rio-suave); }
  .paycheck__title { display: flex; align-items: center; gap: var(--sp-2); font-size: 15px; font-weight: 700; }
  .paycheck__title .ico { flex: none; color: var(--enlace); }
  .paycheck .staffinfo { background: var(--muro); }
  .yesno { display: grid; gap: var(--sp-2); }
  .yesno__q { font-size: 14px; font-weight: 650; }
  .yesno__opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
  .yesno__opt { position: relative; display: grid; place-items: center; min-height: 48px; border-radius: var(--r-control); background: var(--muro); box-shadow: inset 0 0 0 1.5px var(--filete-3); font-weight: 700; cursor: pointer; transition: background-color 140ms, color 140ms; }
  .yesno__opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
  .yesno__opt:has(input:checked) { background: var(--rio); color: var(--sobre-rio); box-shadow: none; }
  .yesno__opt:has(input:focus-visible) { outline: 2px solid var(--enlace); outline-offset: 2px; }
}

@layer pages {
  /* ---------- Reglas de diseño del 9 nov 2026 ----------
     1) Un botón lleva texto o icono, nunca los dos.
     2) El color es para la acción principal; los estados (en revisión, aprobada, ocupado…) se marcan con un puntito junto al texto.
     3) Los textos no se pegan a los bordes: botones con aire a los lados y fichas con más relleno. */
  .btn { padding: 0 22px; }
  .btn--sm { min-height: 44px; padding: 0 18px; }
  .btn--lg { padding: 0 28px; }
  .chip { padding: 0 16px; }
  @media (max-width: 640px) { .tabs__btn { padding: 0 14px !important; font-size: 14px; } }

  /* Estados: texto y un puntito de color (nada de fondos de colores) */
  .badge, .badge--ok, .badge--warn, .badge--full, .badge--muted, .badge--cat { gap: 7px; height: auto; padding: 0; background: none; color: var(--pizarra); font-size: 13px; font-weight: 600; white-space: nowrap; }
  .badge::before { content: ""; width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--dot, var(--niebla)); }
  .badge--ok { --dot: var(--jardinera); }
  .badge--warn { --dot: var(--ambar); }
  .badge--full { --dot: var(--alarma); }
  .badge--cat { --dot: var(--enlace); }
  .badge .ico, .resv__note .ico, .resv__who .ico, .att__title .ico, .guide__label .ico, .place__mine .ico, .place__hint .ico, .helpcall > .ico, .wiz__sum .ico, .wiz__picked .ico, .wiz__error .ico { display: none; }
  .resv__note--warn, .resv__note--ok, .resv__note--junta { padding: 0; background: none; color: var(--cemento); }

  /* Avisos del asistente: planos, sin color de fondo */
  .wiz__notice { margin: 0; padding: 14px 16px; border-radius: var(--r-control); background: var(--muro); box-shadow: inset 0 0 0 1px var(--filete-2); font-size: 15px; line-height: 1.5; color: var(--pizarra); }
  .wiz__sum, .wiz__picked { background: var(--muro); box-shadow: inset 0 0 0 1px var(--filete-2); color: var(--tinta); }
  .wiz__error { padding: 0 2px; background: none; color: var(--alarma); }
  .pay__total { background: var(--muro); color: var(--tinta); box-shadow: var(--relieve), inset 0 0 0 1px var(--filete-2); }
  .pay__total small { color: var(--cemento); }
  .place__mine { background: var(--muro); box-shadow: inset 0 0 0 1px var(--filete-2); }
  .vouch { background: var(--yeso); }

  /* Paso 1: ambiente con su precio a la derecha */
  .wchoice { grid-template-columns: minmax(0, 1fr) auto; gap: 16px; padding: 18px 20px; }
  .wchoice__price { display: grid; justify-items: end; gap: 2px; }
  .wchoice__price strong { font-size: 20px; font-variant-numeric: tabular-nums; }
  .wchoice__price small { font-size: 12px; color: var(--cemento); }

  /* Paso 2: calendario como el de Google: números limpios, el día de hoy en un anillo, el elegido relleno y los ocupados con una etiqueta recortada */
  .wcal { padding: 10px; }
  .wcal__grid { gap: 4px; }
  .wcal__day { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; min-height: 62px; padding: 6px 2px 4px; border-radius: var(--r-panel); background: transparent; box-shadow: none; color: var(--tinta); }
  .wcal__day:disabled { background-image: none; cursor: default; color: var(--niebla); }
  .wcal__day--free { background: transparent; box-shadow: none; color: var(--tinta); }
  .wcal__num { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-size: 15px; font-weight: 600; }
  .wcal__day--busy .wcal__num, .wcal__day--partial .wcal__num, .wcal__day--closed .wcal__num { color: var(--cemento); }
  .wcal__tag { align-self: stretch; box-sizing: border-box; min-width: 0; margin: 0 1px; padding: 2px 3px; overflow: hidden; border-radius: 4px; background: var(--yeso); color: var(--pizarra); font-size: 11px; font-weight: 600; line-height: 1.25; letter-spacing: 0; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
  .wcal__day.is-today::after { content: none; }
  .wcal__day.is-today .wcal__num { box-shadow: inset 0 0 0 2px var(--rio); }
  .wcal__day[aria-pressed="true"] { background: var(--rio-suave); box-shadow: inset 0 0 0 2px var(--rio); color: var(--tinta); }
  .wcal__day[aria-pressed="true"] .wcal__num { background: var(--rio); color: var(--sobre-rio); box-shadow: none; }
  @media (hover: hover) and (pointer: fine) { .wcal__day--free:hover:not([aria-pressed="true"]) { background: var(--yeso); } }

  /* Portada: botones grandes de solo texto */
  .tile { align-content: space-between; min-height: 112px; padding: 20px; }
  .tile__text strong { font-size: 18px; }
  .tile--primary { grid-template-columns: minmax(0, 1fr); min-height: 0; background: var(--rio); color: var(--sobre-rio); box-shadow: var(--relieve); }
  .tile--primary .tile__text small { color: inherit; opacity: .85; }
  .attrow { grid-template-columns: minmax(0, 1fr); }

  /* Ayuda del vecino y llamadas: el nombre y un botón con el número, sin iconos */
  .helpcall { grid-template-columns: minmax(0, 1fr) auto; padding: 20px 24px; box-shadow: var(--relieve), inset 0 0 0 1px var(--filete-2); }
  .calltiles { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .calltile, .calltile--ascensores, .calltile--missing { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 14px; padding: 18px; background: var(--muro); box-shadow: var(--relieve), inset 0 0 0 1px var(--filete-2); }
  .calltile--missing { background: var(--yeso); box-shadow: none; }
  .calltile:hover, .calltile:active { transform: none; box-shadow: var(--relieve), inset 0 0 0 1px var(--filete-2); }
  .calltile__text { display: grid; justify-items: start; gap: 4px; }
  .calltile__text strong { font-size: 16px; }
  .calltile .btn { width: 100%; font-size: 20px; font-variant-numeric: tabular-nums; }
  .calltile__empty { grid-column: auto; font-size: 14px; color: var(--pizarra); }
  .guide__calls { display: grid; gap: 16px; }
  .callrow { display: grid; gap: 8px; }
  .callrow__name { font-size: 15px; font-weight: 600; line-height: 1.3; }
  .callrow .btn { justify-content: center; font-size: 22px; font-variant-numeric: tabular-nums; }
  .phone { padding: 0 14px; }

  /* Tarjeta de una solicitud (Administración y Junta): cabecera, lista de datos y la decisión al final */
  .reqlist { display: grid; gap: 16px; }
  .reqcard { display: grid; gap: 16px; min-width: 0; padding: 20px; border-radius: var(--r-panel); background: var(--muro); box-shadow: var(--relieve), inset 0 0 0 1px var(--filete-2); }
  .reqcard__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
  .reqcard__id { min-width: 0; }
  .reqcard__title { font-size: 20px; line-height: 1.2; }
  .reqcard__title small { font-size: 13px; font-weight: 600; color: var(--cemento); }
  .reqcard__when { margin-top: 4px; font-size: 15px; line-height: 1.4; color: var(--pizarra); }
  .kv { display: grid; margin: 0; }
  .kv__row { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: start; gap: 4px 16px; padding: 12px 0; border-top: 1px solid var(--filete-1); }
  .kv__row dt { padding-top: 2px; font-size: 13px; font-weight: 600; color: var(--cemento); }
  .kv__row dd { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 0; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
  .kv__text { flex: 1 1 150px; min-width: 0; }
  .kv__row dd strong { white-space: nowrap; }
  .kv__muted { color: var(--cemento); }
  .kv .mono { font-family: var(--font-mono); letter-spacing: .04em; }
  @media (max-width: 480px) { .kv__row { grid-template-columns: minmax(0, 1fr); } }
  .reqcard__check { display: grid; gap: 16px; min-width: 0; margin: 0; padding: 16px; border: 0; border-radius: var(--r-panel); background: var(--yeso); }
  .reqcard__check legend { padding: 0; font-size: 14px; font-weight: 700; }
  .reqcard__actions { display: grid; gap: 12px; }
  .reqcard__more summary { padding: 8px 0; font-size: 14px; font-weight: 600; color: var(--enlace); cursor: pointer; list-style: none; }
  .reqcard__more summary::-webkit-details-marker { display: none; }
  .reqcard__more[open] summary { color: var(--tinta); }
}

@layer pages {
  /* ============ Estilo Del Río (9 nov 2026) ============
     Poppins para la interfaz (IBM Plex Mono solo en códigos y números de operación), esquinas suaves, menú claro, color azul río para lo principal y ámbar como detalle.
     Los estados se marcan con un puntito; las tarjetas son blancas con una sombra suave. */
  h1, h2, h3 { letter-spacing: -.02em; }
  .eyebrow { font-size: 12.5px; font-weight: 600; letter-spacing: .01em; color: var(--enlace); }
  .mono, .pay__num, .resv__code strong, .kv .mono { font-family: var(--font-mono); letter-spacing: 0; }
  .kv__row dt, .wizsum dt, .livebar dt { font-size: 12.5px; font-weight: 500; color: var(--cemento); }

  /* Encabezado de página dentro del contenido: etiqueta, título grande y una línea de apoyo */
  .pagehead { margin-bottom: var(--sp-5); }
  .pagehead__title { margin-bottom: 4px; font-size: clamp(26px, 3.4vw, 32px); font-weight: 700; line-height: 1.15; }
  .pagehead .sub { font-size: 14.5px; line-height: 1.5; color: var(--cemento); }

  /* Botones y campos */
  .btn { border-radius: var(--r-control); font-weight: 600; }
  .field__input { border-radius: var(--r-control); }
  .iconbtn { border-radius: var(--r-control); }

  /* Pestañas segmentadas: una pista gris y la activa en blanco */
  .tabs { width: fit-content; max-width: 100%; gap: 4px; padding: 4px; border-radius: 12px; background: var(--yeso); box-shadow: none; }
  .tabs__btn { min-height: 40px; padding: 0 16px; border-radius: 9px; color: var(--pizarra); font-weight: 600; }
  .tabs__btn[aria-selected="true"] { background: var(--muro); color: var(--enlace); box-shadow: 0 1px 2px rgb(18 45 55 / .14); }
  .tabs__btn[aria-selected="true"]::after { display: none; }
  .tabs__btn[aria-selected="true"] .tabs__count { background: var(--rio-suave); color: var(--enlace); }

  /* Portada de la Junta: cifras sobre tarjetas blancas con una línea de color arriba */
  .sc, .sc--teal, .sc--amber, .sc--navy, .sc--red { min-height: 132px; padding: var(--sp-4) var(--sp-5); background: var(--muro); color: var(--tinta); box-shadow: var(--relieve), inset 0 3px 0 var(--rio); }
  .sc--amber { box-shadow: var(--relieve), inset 0 3px 0 var(--ambar); }
  .sc--navy { box-shadow: var(--relieve), inset 0 3px 0 var(--progreso); }
  .sc--red { box-shadow: var(--relieve), inset 0 3px 0 var(--alarma); }
  .sc__label { font-size: 14px; font-weight: 500; color: var(--cemento); }
  .sc__icon, .sc--amber .sc__icon { background: var(--rio-suave); color: var(--enlace); }
  .sc__value { font-size: clamp(36px, 3.4vw, 46px); font-weight: 700; letter-spacing: -.03em; }
  .sc__note { font-weight: 500; color: var(--cemento); }
  .sc__go, .sc--amber .sc__go { background: var(--yeso); color: var(--enlace); }
  .sc--red .sc__value { color: var(--alarma); }

  /* Portada del vecino: bienvenida, asistencia y accesos */
  .greet__title { font-size: clamp(26px, 4vw, 38px); font-weight: 700; letter-spacing: -.03em; }
  .tile { min-height: 104px; padding: 18px; }
  .tile--primary { background: var(--rio); color: var(--sobre-rio); box-shadow: var(--relieve); }

  /* Marcar asistencia: cada ambiente es una tarjeta con el nombre y el estado a la izquierda y la entrada a la derecha; si la tarjeta es angosta, la entrada baja
     a su propia línea y ocupa todo el ancho (así el texto nunca se encima). De 1 a 3 tarjetas por fila según el ancho. */
  .att { padding: var(--sp-4); }
  .attlist { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: var(--sp-3); }
  .attrow { display: flex; flex-wrap: wrap; align-items: center; align-content: flex-start; gap: var(--sp-2) var(--sp-3); padding: 14px 16px; background: var(--muro); box-shadow: inset 0 0 0 1px var(--filete-2); }
  .attrow__text { flex: 1 1 150px; min-width: 0; gap: 2px; }
  .attrow__text h3 { font-size: 16px; }
  .attrow__text .badge { white-space: normal; }
  .attrow__action { flex: 1 1 230px; min-width: 0; grid-column: auto; justify-self: auto; }
  .attrow__action .place__enter { display: flex; align-items: center; gap: 8px; width: 100%; }
  .attrow__action .place__people { flex: none; width: 66px; }
  .attrow__action .place__people .field__input { min-height: 46px; padding: 8px 10px; font-size: 16px; }
  .attrow__action .btn { flex: 1 1 auto; width: auto; min-height: 46px; padding: 0 18px; font-size: 15px; border-radius: var(--r-control); }
  .attrow__action .place__hint { max-width: none; padding: 0; background: none; font-size: 13px; line-height: 1.3; text-align: right; }
  .attrow:has(.place__mine) .attrow__action { flex-basis: 100%; }

  /* Avisos: blancos con una barra de color a la izquierda, no fondos de colores */
  .note, .note--info, .note--warning { background: var(--muro); box-shadow: inset 0 0 0 1px var(--filete-2), inset 3px 0 0 var(--filete-3); }
  .note--info { box-shadow: inset 0 0 0 1px var(--filete-2), inset 3px 0 0 var(--progreso); }
  .note--warning { box-shadow: inset 0 0 0 1px var(--filete-2), inset 3px 0 0 var(--ambar); }
  .note--info .ico, .note--warning .ico { color: var(--cemento); }
  .note--warning strong { color: var(--tinta); }

  /* Mis reservas en el celular: el estado arriba, «Descargar formulario» ancho completo y las otras acciones debajo */
  @media (max-width: 560px) {
    .resv__side { display: grid; grid-template-columns: 1fr 1fr; justify-items: stretch; gap: 8px; }
    .resv__side > .badge { grid-column: 1 / -1; justify-self: start; }
    .resv__side > .btn { width: 100%; padding: 0 12px; }
    .resv__side > [data-action^="reservation-download:"], .resv__side > .btn--quiet { grid-column: 1 / -1; }
  }

  /* Escritorio: las solicitudes en dos columnas, las respuestas Sí y No de un ancho razonable y el botón de reservar sin estirarse */
  .yesno__opts { max-width: 360px; }
  @media (min-width: 1100px) { .reqlist { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
  @media (min-width: 720px) { .ambientes__cta { display: inline-flex; width: auto; min-width: 280px; } }
}

@layer motion {
  @keyframes spin { to { transform: rotate(360deg); } }
  @keyframes pulse { 50% { opacity: .45; } }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
  @keyframes ring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--alarma) 35%, transparent); } 100% { box-shadow: 0 0 0 12px transparent; } }
  .calltile__icon { animation: ring 2.4s ease-out infinite; }
  .calltile--ascensores .calltile__icon, .calltile--missing .calltile__icon { animation: none; }
  .guide { animation: rise 260ms var(--ease-out) both; }
  @keyframes lift { 0%, 100% { opacity: .35; transform: translateY(3px); } 50% { opacity: 1; transform: translateY(-3px); } }
  .floor__arrow { animation: lift 2.2s ease-in-out infinite; }
  .greet, .sc, .card { animation: rise 420ms var(--ease-out) both; }
  .sc:nth-child(2) { animation-delay: 50ms; } .sc:nth-child(3) { animation-delay: 100ms; } .sc:nth-child(4) { animation-delay: 150ms; } .grid2c .card { animation-delay: 200ms; }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
  @keyframes toast-in { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: none; } }
  @keyframes toast-in-up { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
  @keyframes sheet-in { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
  @keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
  @keyframes sheet-out { to { opacity: 0; transform: translateY(6px) scale(.98); } }
  @keyframes sheet-down { to { transform: translateY(100%); } }
  @keyframes seg-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  @keyframes slab-pulse { 0%, 100% { opacity: .2; } 40% { opacity: 1; } }

  .sheet[open] { animation: sheet-in 220ms var(--ease-out); }
  .sheet[open]::backdrop { animation: fade 200ms ease-out; }
  .sheet[data-closing] { animation: sheet-out 140ms ease-out forwards; }
  @media (max-width: 640px) {
    .sheet[open] { animation: sheet-up 300ms var(--ease-drawer); }
    .sheet[data-closing] { animation: sheet-down 180ms ease-out forwards; }
  }

  /* La entrada solo se reproduce al cambiar de pantalla (main.js marca #app[data-enter]); los repintados no la repiten. */
  #app[data-enter="1"] .view > *, #app[data-enter="1"] .login-card { animation: rise 380ms var(--ease-out) both; }
  #app[data-enter="1"] .view > :nth-child(2) { animation-delay: 40ms; }
  #app[data-enter="1"] .view > :nth-child(3) { animation-delay: 80ms; }
  #app[data-enter="1"] .view > :nth-child(4) { animation-delay: 120ms; }
  #app[data-enter="1"] .view > :nth-child(n+5) { animation-delay: 160ms; }
  #app[data-enter="1"] .qgrid > .qcard { animation: rise 380ms var(--ease-out) both; }
  #app[data-enter="1"] .qgrid > .qcard:nth-child(1) { animation-delay: 140ms; }
  #app[data-enter="1"] .qgrid > .qcard:nth-child(2) { animation-delay: 180ms; }
  #app[data-enter="1"] .qgrid > .qcard:nth-child(3) { animation-delay: 220ms; }
  #app[data-enter="1"] .qgrid > .qcard:nth-child(4) { animation-delay: 260ms; }
  #app[data-enter="1"] .qgrid > .qcard:nth-child(n+5) { animation-delay: 300ms; }
  .progress__seg.is-new::after { content: ""; position: absolute; inset: 0; background: #8DBBF7; transform-origin: left; animation: seg-fill 700ms var(--ease-out) 300ms both; }
  .progress__seg.is-new { background: rgb(255 255 255 / .22); }
  .mark--animated .mark__slab { animation: slab-pulse 1.4s ease-in-out infinite; }
  .mark--animated .mark__slab:nth-child(9) { animation-delay: 0ms; }
  .mark--animated .mark__slab:nth-child(8) { animation-delay: 90ms; }
  .mark--animated .mark__slab:nth-child(7) { animation-delay: 180ms; }
  .mark--animated .mark__slab:nth-child(6) { animation-delay: 270ms; }
  .mark--animated .mark__slab:nth-child(5) { animation-delay: 360ms; }
  .mark--animated .mark__slab:nth-child(4) { animation-delay: 450ms; }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .mark--animated .mark__slab { opacity: 1; }
  }
  @media (prefers-reduced-transparency: reduce) {
    .decision--open { backdrop-filter: none; background: var(--losa); }
  }
}
