/* ReinventAR — componentes y pantallas sobre los tokens de Brick v2 (css/tokens.css, css/base.css). */

/* --- botones --------------------------------------------------------------- */
.ra-btn {
  font: var(--t-body-strong); min-height: 48px; padding: var(--space-3) 20px; border-radius: var(--radius-m);
  border: 1px solid transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  transition: background var(--ease), box-shadow var(--ease), transform var(--ease), border-color var(--ease);
}
.ra-btn:active:not([disabled]) { transform: scale(.98); }
.ra-btn-primary { background: var(--brand); color: var(--on-brand); box-shadow: var(--shadow-1); }
.ra-btn-primary:hover { box-shadow: var(--shadow-2); background: color-mix(in srgb, var(--brand) 92%, #000); }
.ra-btn-secondary { background: var(--surface-1); color: var(--ink); border-color: var(--line-strong); }
.ra-btn-secondary:hover { background: var(--surface-3); }
.ra-btn-ghost { background: transparent; color: var(--brand-ink); }
.ra-btn-ghost:hover { background: var(--surface-3); }
.ra-btn-danger { background: transparent; color: var(--error); border-color: var(--error); }
.ra-btn-danger:hover { background: color-mix(in srgb, var(--error) 8%, transparent); }
.ra-btn[disabled] { opacity: .45; cursor: not-allowed; }
.ra-btn[hidden], .actions[hidden] { display: none; }
/* Botón de solo ícono (ej. Llevame en Hoy): 48 × 48, el nombre va en aria-label */
.ra-btn-icon { width: 48px; min-width: 48px; padding: 0; flex: none; }

/* --- botón de grabar ----------------------------------------------------- */
.ra-recwrap { display: inline-flex; flex-direction: column; align-items: center; gap: var(--space-2); }
.ra-rec {
  width: 88px; height: 88px; border-radius: var(--radius-pill); border: 3px solid var(--line-strong); background: var(--surface-1);
  display: grid; place-items: center; cursor: pointer; padding: 0; box-shadow: var(--shadow-2);
  transition: transform var(--ease), box-shadow var(--ease), background var(--ease);
}
.ra-rec:active { transform: scale(.96); }
.ra-rec-glyph { width: 36px; height: 36px; border-radius: var(--radius-pill); background: var(--rec); transition: all var(--ease); }
.ra-rec.is-recording { background: var(--rec); border-color: var(--rec); box-shadow: var(--glow-rec), var(--shadow-2); }
.ra-rec.is-recording .ra-rec-glyph { width: 28px; height: 28px; border-radius: var(--radius-s); background: var(--on-rec); }
.ra-rec.is-paused .ra-rec-glyph { width: 30px; height: 30px; border-radius: 0; background: linear-gradient(90deg, var(--rec) 0 35%, transparent 35% 65%, var(--rec) 65%); }
.ra-rec-label { font: var(--t-micro); letter-spacing: var(--track-micro); color: var(--ink-muted); }
.ra-rec-time { font: var(--t-data); color: var(--ink); }

/* --- pill de estado (colores de estado de Brick; el punto lleva el color, el texto queda legible) --- */
/* Estado: píldora con punto, tinte del estado de fondo y su texto --on-*-soft (≥ 4,5:1 en los dos temas). */
.ra-pill, .ra-status {
  display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 0 10px; border-radius: var(--radius-pill);
  background: var(--surface-3); color: var(--ink); font: var(--t-micro); letter-spacing: var(--track-micro); white-space: nowrap;
}
.ra-pill-dot, .ra-status-dot { width: 8px; height: 8px; border-radius: var(--radius-pill); background: currentColor; flex: none; }
.ra-pill-dot { background: var(--ink-muted); }
.ra-pill-recording { background: var(--error-soft); color: var(--on-error-soft); }
.ra-pill-recording .ra-pill-dot { background: var(--rec); animation: ra-pulse 1.2s ease-in-out infinite; }
.ra-pill-uploading, .ra-pill-queued { background: var(--warning-soft); color: var(--on-warning-soft); }
.ra-pill-uploading .ra-pill-dot, .ra-pill-queued .ra-pill-dot { background: var(--warning); }
.ra-pill-transcribing, .ra-pill-translating, .ra-pill-summarizing { background: var(--info-soft); color: var(--on-info-soft); }
.ra-pill-transcribing .ra-pill-dot, .ra-pill-translating .ra-pill-dot, .ra-pill-summarizing .ra-pill-dot { background: var(--info); animation: ra-pulse 1.6s ease-in-out infinite; }
.ra-pill-ready { background: var(--success-soft); color: var(--on-success-soft); }
.ra-pill-ready .ra-pill-dot { background: currentColor; }
.ra-pill-error { background: var(--error-soft); color: var(--on-error-soft); }
.ra-pill-error .ra-pill-dot { background: currentColor; border-radius: 0; }
.ra-status.is-now { background: var(--brand-soft); color: var(--brand-ink); }
@keyframes ra-pulse { 50% { opacity: .25; } }

/* --- medidor de nivel ---------------------------------------------------- */
.ra-meter { display: flex; flex-direction: column; gap: var(--space-2); min-width: 240px; }
.ra-meter-head { display: flex; justify-content: space-between; gap: var(--space-2); font: var(--t-small); color: var(--ink-muted); }
.ra-meter-head strong { color: var(--ink); font-weight: 600; }
.ra-meter-track { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; height: 14px; }
.ra-seg { border-radius: 2px; background: var(--surface-3); transition: background 80ms linear; }
.ra-seg.is-ok.is-lit { background: var(--success); }
.ra-seg.is-hot { box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--warning) 55%, transparent); }  /* zona marcada aunque esté apagada */
.ra-seg.is-hot.is-lit { background: var(--warning); }
.ra-seg.is-clip { box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--error) 55%, transparent); }
.ra-seg.is-clip.is-lit { background: var(--error); }
.ra-meter-word { font: var(--t-small-strong); padding: 0 var(--space-2); border-radius: var(--radius-pill); }
.ra-meter-word[data-state="ok"] { color: var(--success); }
.ra-meter-word[data-state="hot"] { color: var(--ink); background: color-mix(in srgb, var(--warning) 30%, transparent); }
.ra-meter-word[data-state="clip"] { color: var(--on-error); background: var(--error); }

/* --- card de grabación --------------------------------------------------- */
.ra-card {
  background: var(--surface-1); border-radius: var(--radius-m); padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2);
  box-shadow: var(--edge), var(--shadow-1); width: 100%; border: 0; text-align: left; cursor: pointer; color: inherit;
  transition: box-shadow var(--ease), transform var(--ease);
}
.ra-card:hover { box-shadow: var(--edge), var(--shadow-2); }
.ra-card:active { transform: scale(.995); }
.ra-card-top { display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); }
.ra-kind { font: var(--t-micro); letter-spacing: var(--track-micro); color: var(--ink-muted); }
.ra-kind b { color: var(--brand-ink); font-weight: 600; }
.ra-card-title { font: var(--t-heading); letter-spacing: -0.01em; color: var(--ink); }
.ra-card-meta { font: var(--t-small); color: var(--ink-muted); display: flex; align-items: center; gap: var(--space-1) var(--space-3); flex-wrap: wrap; min-width: 0; }
/* Datos en mono (horas, códigos, contadores). Antes la clase se usaba sin regla y no hacía nada. */
.ra-mono { font-family: var(--font-data); font-variant-numeric: tabular-nums; }
.ra-time { font: var(--t-time); font-variant-numeric: tabular-nums; color: var(--ink); }
/* Ícono + texto en línea (ubicación, alerta, fijado) */
.ra-icotext { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.ra-icotext > span { min-width: 0; }
.ra-icotext[hidden] { display: none; }
/* Aviso dentro de una tarjeta: fila tintada con ícono (antes una tarjeta anidada con emoji) */
.ra-hint { display: flex; align-items: flex-start; gap: var(--space-2); padding: var(--space-2) var(--space-3); border-radius: var(--radius-s); font: var(--t-small); background: var(--surface-3); color: var(--ink); }
.ra-hint .ra-icon { margin-top: 2px; }
.ra-hint.is-warn { background: var(--warning-soft); color: var(--on-warning-soft); }
.ra-hint.is-error { background: var(--error-soft); color: var(--on-error-soft); }
.ra-hint.is-info { background: var(--info-soft); color: var(--on-info-soft); }

/* --- transcripción ------------------------------------------------------- */
/* Castellano grande y sin etiqueta; el inglés original abajo, chico y marcado EN. Minuto en mono, sin pastilla. */
.ra-tb { display: grid; grid-template-columns: 64px 1fr; gap: var(--space-3); padding: var(--space-4) 0; border-top: 1px solid var(--line); }
.ra-transcript > .ra-tb:first-child { border-top: 0; }
.ra-tc { font: var(--t-data); color: var(--ink-muted); padding-top: 3px; font-variant-numeric: tabular-nums; }
.ra-tb-body { display: flex; flex-direction: column; gap: var(--space-2); }
.ra-tb-lang { font: var(--t-micro); letter-spacing: var(--track-micro); margin-right: 6px; color: var(--ink-muted); }
.ra-tb-en { font: var(--t-small); color: var(--ink-muted); }
.ra-tb-es { font: var(--t-body); font-size: 17px; line-height: 26px; color: var(--ink); }

/* --- chips y etiquetas (R3 separa Tag pasivo de FilterChip) -------------- */
/* Píldora de filtro: una sola, de 44 px (button.ra-chip y las de .chipgroup). Activa = tinta llena;
   si tocarla la quita (filtros activos, charla vinculada) lleva ✕; si es una opción que se elige, lleva tilde. */
.ra-chip { font: var(--t-micro); background: var(--surface-3); color: var(--ink); border-radius: var(--radius-s); padding: 3px 8px; white-space: nowrap; }
button.ra-chip, .chipgroup label {
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); background: var(--surface-1);
  min-height: var(--touch); padding: 0 var(--space-4); border-radius: var(--radius-pill); font: var(--t-small); color: var(--ink);
  transition: background var(--ease-chip), border-color var(--ease-chip), box-shadow var(--ease-chip), color var(--ease-chip);
}
button.ra-chip:hover, .chipgroup label:hover { background: var(--surface-3); }
button.ra-chip:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.ra-chip-on, .chipgroup input:checked + label { border-color: var(--ink) !important; background: var(--ink) !important; color: var(--surface-1) !important; font-weight: 600 !important; }
.ra-chip-on:hover, .chipgroup input:checked + label:hover { background: color-mix(in srgb, var(--ink) 88%, var(--surface-1)) !important; }
button.ra-chip.ra-chip-on:not([aria-pressed]) { padding-right: var(--space-3); }
button.ra-chip.ra-chip-on:not([aria-pressed])::after {
  content: ""; width: 16px; height: 16px; flex: none; background: currentColor; opacity: .85;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 6l12 12M18 6 6 18' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 6l12 12M18 6 6 18' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
/* Tilde al elegir una opción: el estado no depende solo del color */
button.ra-chip.ra-chip-on[aria-pressed]::before, .chipgroup input:checked + label::before {
  content: ""; width: 14px; height: 14px; flex: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  animation: ra-check-in 160ms ease-out;
}
@keyframes ra-check-in { from { transform: scale(.4); opacity: 0; } }
.ra-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
/* Tag: dato, no se toca (sin borde ni sombra); el chip-botón tiene borde y estado */
/* Aviso de perfil sin confirmar (web/js/knowledge.js): --warning como fondo, texto oscuro en los dos temas. */
.ra-disclaimer { background: var(--warning-soft); color: var(--on-warning-soft); font: var(--t-small); border-radius: var(--radius-s); padding: var(--space-2) var(--space-3); }
.ra-tag { font: var(--t-micro); background: var(--surface-3); color: var(--ink-muted); border-radius: var(--radius-s); padding: 2px 8px; white-space: nowrap; }
.ra-tag.is-new { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }

/* --- resumen ------------------------------------------------------------- */
.ra-sum { background: var(--surface-1); border-radius: var(--radius-m); padding: var(--space-6) var(--space-4); display: flex; flex-direction: column; gap: var(--space-6); box-shadow: var(--edge), var(--shadow-1); }
.ra-sum h3 { font: var(--t-heading); color: var(--ink); margin: 0 0 var(--space-2); }
.ra-sum p, .ra-sum li { font: var(--t-body); color: var(--ink); }
.ra-sum ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: var(--space-2); }
.ra-tldr { font: var(--t-heading) !important; }
.ra-hl { background: var(--brand-soft); color: var(--ink); border-radius: var(--radius-s); padding: 0 4px; font-weight: 600; }

/* --- layout de la app ---------------------------------------------------- */
.app { max-width: 720px; margin: 0 auto; padding: 0 var(--space-4) calc(var(--space-12) + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { .app { max-width: 960px; } }
/* Modo prueba (web/js/sandbox.js): --warning solo sirve como fondo; el texto va oscuro en los dos temas (≥ 8:1). */
/* Franjas + barra en un solo bloque pegado arriba (antes dos sticky con top:0 que se pisaban). Su alto queda en
   --masthead-h (web/js/app.js) para lo que se pega debajo, como las pestañas del detalle. */
.masthead { position: sticky; top: 0; z-index: 30; padding-top: env(safe-area-inset-top); background: var(--bg); margin: 0 calc(-1 * var(--space-4)); padding-inline: var(--space-4); }
html { scroll-padding-top: var(--masthead-h, 0px); }  /* lo que se lleva a la vista no queda tapado por el masthead */
.sandbox-banner { background: var(--warning); color: #1a1a1a; font: var(--t-small-strong); text-align: center; padding: var(--space-1) var(--space-4); }
.sandbox-banner[hidden] { display: none; }

/* Countdown de lo fijado (web/js/countdown.js): el tono cambia según cuánto falta. Texto oscuro sobre los fondos de color. */
.countdown-banner { display: flex; align-items: center; gap: var(--space-2); padding: 0 0 0 var(--space-4); font: var(--t-small-strong); background: var(--surface-1); color: var(--ink); box-shadow: var(--edge); border-radius: 0 0 var(--radius-m) var(--radius-m); }
.countdown-banner[hidden] { display: none; }
.countdown-banner.is-soon { background: var(--brand-soft); }
.countdown-banner.is-urgent { background: var(--error); color: var(--on-error); }
.countdown-banner.is-event { background: var(--event-soft); color: var(--on-event-soft); }
.countdown-banner.is-live { background: var(--success-soft); color: var(--on-success-soft); }
.countdown-text { flex: 1; padding: 10px 0; color: inherit; text-decoration: none; font-variant-numeric: tabular-nums; }
.countdown-close { display: grid; place-items: center; background: none; border: 0; color: inherit; width: var(--touch); height: var(--touch); flex: none; cursor: pointer; }
.changes-banner { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-4); font: var(--t-small); background: var(--warning-soft); color: var(--on-warning-soft); box-shadow: var(--edge); }
.changes-banner[hidden] { display: none; }
.changes-banner p { flex: 1; margin: 0; }
.ra-check-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.ra-check-list .is-ok strong { color: var(--on-success-soft); }
.ra-check-list .is-fail strong { color: var(--on-error-soft); }
.ra-check-list strong { display: inline-flex; align-items: center; gap: var(--space-1); vertical-align: bottom; }

/* Tablero de LLM del admin (web/js/adminLlm.js): números grandes y barras horizontales simples. */
.ra-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--space-3); }
.ra-stat { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-3); background: var(--surface-1); box-shadow: var(--edge); border-radius: var(--radius-m); }
.ra-stat-value { font: var(--t-title); font-variant-numeric: tabular-nums; }
.ra-bar-row { display: grid; grid-template-columns: minmax(80px, 30%) 1fr auto; align-items: center; gap: var(--space-2); font: var(--t-small); }
.ra-bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ra-bar-track { height: 10px; background: var(--surface-3); border-radius: var(--radius-s); overflow: hidden; }
.ra-bar-fill { display: block; height: 100%; background: var(--brand); border-radius: var(--radius-s); }
.ra-bar-fill.is-warn { background: var(--warning); }
.ra-bar-fill.is-err { background: var(--error); }
.ra-bar-value { font: var(--t-data); font-variant-numeric: tabular-nums; color: var(--ink-muted); text-align: right; }
.ra-countdown { font: var(--t-small-strong); font-variant-numeric: tabular-nums; color: var(--brand-ink); }

/* "Llevame" (web/js/location.js): distancia y tiempo a pie, con el link a Google Maps. */
.ra-go { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); flex-wrap: wrap; }
.ra-go-info { font: var(--t-small); color: var(--ink-muted); }
.ra-go-info:empty, .ra-go-info[hidden] { display: none; }
.ra-go-btn { flex: 0 0 auto; text-decoration: none; }

/* Eventos (web/js/events.js) */
.ra-event { background: var(--surface-1); border-radius: var(--radius-m); box-shadow: var(--edge), var(--shadow-1); overflow: hidden; display: flex; flex-direction: column; }
.ra-event-cover { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; background: var(--surface-2, var(--surface-1)); }
.ra-event-body { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); }
.ra-event-hero { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-m); }
.ra-event-row { display: grid; grid-template-columns: 7rem 1fr; gap: var(--space-2); align-items: baseline; }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-2);
  min-height: 60px; padding: var(--space-2) 0; margin-bottom: var(--space-4); border-bottom: 1px solid var(--line); background: var(--bg);
}
.brand { display: inline-flex; align-items: center; gap: var(--space-2, 8px); font: var(--t-title); font-weight: 800; line-height: 1; letter-spacing: -0.03em; color: var(--ink); text-decoration: none; }
.brand img { border-radius: var(--radius-s); flex: none; }
.brand-word span { color: var(--brand-ink); }
/* Botones de ícono (tema, ajustes): 44×44, nombre accesible en aria-label */
.iconbtn {
  width: var(--touch); height: var(--touch); display: grid; place-items: center; border-radius: var(--radius-m); border: 0; background: transparent;
  color: var(--ink-muted); cursor: pointer; text-decoration: none; transition: background var(--ease), color var(--ease), transform var(--ease);
}
.iconbtn:hover { background: var(--surface-3); color: var(--ink); }
.iconbtn:active { transform: scale(.94); }
.iconbtn[aria-current="page"] { color: var(--brand-ink); background: var(--brand-soft); }
.toolbar { display: flex; gap: var(--space-1); align-items: center; }
.ra-icon { display: block; flex: none; }

/* Navegación principal: ícono + nombre. En escritorio va en la barra de arriba; en el celular, barra inferior al alcance del pulgar. */
.navbar { display: flex; gap: var(--space-1); margin-left: auto; }
.navitem {
  display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--touch); padding: 0 var(--space-3); border-radius: var(--radius-m);
  color: var(--ink-muted); text-decoration: none; font: var(--t-small-strong); position: relative;
  transition: background var(--ease), color var(--ease);
}
.navitem:hover { background: var(--surface-3); color: var(--ink); }
.navitem[aria-current="page"] { color: var(--ink); }
.navitem[aria-current="page"] .ra-icon { color: var(--brand-ink); }
.navitem[aria-current="page"]::after {
  content: ""; position: absolute; left: var(--space-3); right: var(--space-3); bottom: 2px; height: 3px; border-radius: 3px; background: var(--brand);
}
.is-guest .navbar, .is-guest .toolbar a { display: none; }

/* Títulos: escala con contraste; las secciones (h2.label / h3.label en el markup) pasan a ser títulos de verdad */
h1.title { font: var(--t-display); letter-spacing: var(--track-tight); margin: 0 0 var(--space-2); overflow-wrap: anywhere; }
h2.label { font: var(--t-title); letter-spacing: -0.01em; text-transform: none; color: var(--ink); }
h3.label { font: var(--t-heading); letter-spacing: -0.005em; text-transform: none; color: var(--ink); }
/* Encabezado de sección con dato o acción a la derecha ("Hoy · martes 1 dic") */
.ra-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-2); flex-wrap: wrap; }
.ra-soon { font: var(--t-small-strong); color: var(--brand-ink); }
summary.label { font: var(--t-small-strong); letter-spacing: 0; text-transform: none; color: var(--ink); cursor: pointer; }
.muted { color: var(--ink-muted); }
.caption { font: var(--t-small); color: var(--ink-muted); }
h2.caption { font: var(--t-small); text-transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.label { font: var(--t-micro); letter-spacing: var(--track-micro); color: var(--ink-muted); }
.stack { display: flex; flex-direction: column; gap: var(--space-3); }
.stack-lg { display: flex; flex-direction: column; gap: var(--space-8); }
.actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.actions .ra-btn { flex: 1 1 auto; }
.actions.is-center { align-items: center; }
.actions.is-between { justify-content: space-between; }
.fieldset-plain { border: 0; padding: 0; margin: 0; }
.fieldset-plain > legend { margin-bottom: var(--space-2); }
.notice.is-plain { text-decoration: none; display: block; }
.empty { padding: var(--space-12) var(--space-4); text-align: center; color: var(--ink-muted); background: var(--surface-1); border-radius: var(--radius-m); box-shadow: var(--edge); }

/* --- formularios ---------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: var(--space-1); }
.field input, .field select, .field textarea {
  min-height: 48px; padding: var(--space-3); background: var(--surface-1); border: 1px solid var(--line-strong); border-radius: var(--radius-m);
  color: var(--ink); width: 100%; transition: border-color var(--ease), box-shadow var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-muted); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink-muted); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
.segmented { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-2); }
.segmented label {
  display: flex; align-items: center; justify-content: center; min-height: 48px; border: 1px solid var(--line-strong); border-radius: var(--radius-m);
  cursor: pointer; font: var(--t-body-strong); background: var(--surface-1); transition: background var(--ease), border-color var(--ease);
}
.segmented label:hover { background: var(--surface-3); }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented input:checked + label { background: var(--brand-soft); border: 2px solid var(--brand); }
.segmented input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 2px; }
.notice { background: var(--surface-1); border-radius: var(--radius-m); padding: var(--space-3) var(--space-4); box-shadow: var(--edge); }
.notice.err { background: var(--error-soft); color: var(--on-error-soft); box-shadow: none; }
.notice.warn { background: var(--warning-soft); color: var(--on-warning-soft); box-shadow: none; }
.notice[hidden] { display: none; }

/* --- grabación ------------------------------------------------------------ */
.recorder { display: flex; flex-direction: column; align-items: center; gap: var(--space-6); padding-top: var(--space-6); }
.counter { font: 500 clamp(48px, 16vw, 72px)/1 var(--font-data); font-variant-numeric: tabular-nums; letter-spacing: -0.03em; color: var(--ink); transition: color var(--ease); }
.counter[data-state="paused"] { color: var(--ink-muted); }
.ra-clock { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); }
.ra-recstatus { display: inline-flex; align-items: center; gap: var(--space-2); font: var(--t-small-strong); color: var(--ink-muted); }
.ra-recstatus::before { content: ""; width: 10px; height: 10px; border-radius: var(--radius-pill); background: var(--line-strong); }
.ra-recstatus[data-state="recording"] { color: var(--rec); }
.ra-recstatus[data-state="recording"]::before { background: var(--rec); animation: ra-blink 1.2s ease-in-out infinite; }
.ra-recstatus[data-state="paused"]::before { background: var(--warning); }
@keyframes ra-blink { 50% { opacity: .25; } }
.recorder .ra-rec-label { display: none; }  /* el estado ya se dice arriba, bajo el contador */
.ra-input { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-4); background: var(--surface-1); border-radius: var(--radius-m); box-shadow: var(--edge); }
.recorder .ra-meter { width: 100%; }
.recorder .actions { width: 100%; }
.upl { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); width: 100%; }
.sala { position: fixed; inset: 0; background: #000; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-4); color: #8a8a8a; }
.sala .counter { color: #8a8a8a; }
.sala .ra-pill { background: #111; color: #a3a3a3; }

/* --- detalle de grabación -------------------------------------------------- */
.tabs { display: flex; border-bottom: 1px solid var(--line); position: sticky; top: var(--masthead-h, 0px); background: var(--bg); z-index: 2; }
.ra-tab {
  flex: 1; min-height: 48px; padding: 0 var(--space-4); background: none; border: 0; border-bottom: 3px solid transparent; cursor: pointer;
  font: var(--t-small-strong); color: var(--ink-muted); transition: color var(--ease), border-color var(--ease);
}
.ra-tab:hover { color: var(--ink); }
.ra-tab[aria-selected="true"] { color: var(--ink); border-color: var(--brand); }
.quote { font-style: italic; }
.toast {
  position: fixed; left: 50%; bottom: calc(var(--space-6) + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--ink); color: var(--bg); padding: var(--space-3) var(--space-4); border-radius: var(--radius-m);
  box-shadow: var(--shadow-3); z-index: 60; max-width: calc(100% - 32px); font: var(--t-small-strong);
  animation: ra-rise var(--ease-sheet);
}
@keyframes ra-rise { from { opacity: 0; transform: translate(-50%, 8px); } }

/* --- itinerario ----------------------------------------------------------- */
.chipgroup { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chipgroup input { position: absolute; opacity: 0; pointer-events: none; }
.chipgroup label { user-select: none; }
.chipgroup label:active { transform: scale(.97); }
.chipgroup input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 2px; }

.ra-minicard {
  background: var(--surface-1); border-radius: var(--radius-m); padding: var(--space-4); display: grid; grid-template-columns: 56px 1fr; gap: var(--space-3);
  box-shadow: var(--edge), var(--shadow-1); transition: box-shadow var(--ease);
}
.ra-minicard:hover { box-shadow: var(--edge), var(--shadow-2); }
.ra-minicard[hidden] { display: none; }
/* riel de tiempo: la hora manda, el día abajo; la línea conecta visualmente con el contenido */
.ra-rail { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding-right: var(--space-3); border-right: 2px solid var(--line); }
.ra-rail-time { font: var(--t-time); font-size: 17px; color: var(--ink); font-variant-numeric: tabular-nums; }
.ra-rail-day { font: var(--t-micro); color: var(--ink-muted); }
.ra-minicard-body { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.ra-minicard-title { font: var(--t-heading); color: var(--ink); }
.ra-minicard-title .ra-link { text-decoration: none; }
.ra-minicard-title .ra-link:hover { text-decoration: underline; }
.ra-minicard-meta { font: var(--t-small); color: var(--ink-muted); }
.ra-abstract { font: var(--t-small); color: var(--ink-muted); }
.ra-abstract.is-folded { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ra-more { align-self: flex-start; background: none; border: 0; padding: var(--space-1) 0; min-height: 32px; cursor: pointer; font: var(--t-small-strong); color: var(--brand-ink); }
.ra-more:hover { text-decoration: underline; }
.ra-abstract-actions { display: flex; gap: var(--space-4); flex-wrap: wrap; }

/* sin overflow:hidden a propósito: Google Maps renderiza el InfoWindow adentro de este mismo contenedor y quedaba recortado */
.mapbox { height: 320px; background: var(--surface-1); border-radius: var(--radius-m); }

.daylist { display: flex; flex-direction: column; gap: var(--space-3); }

/* speakers: nombre, cargo y empresa */
.ra-people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-1); font: var(--t-small); color: var(--ink); }
.ra-link { color: inherit; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; transition: text-decoration-color var(--ease); }
.ra-link:hover, .ra-link:focus-visible { text-decoration-color: currentColor; }
.ra-link > .ra-icon { display: inline-block; vertical-align: -3px; margin-left: var(--space-1); }  /* ↗ de los links que abren otra pestaña */
.caption .ra-link, p > .ra-link { color: var(--brand-ink); }

/* --- explorar --------------------------------------------------------------- */
.ra-facet { display: flex; flex-direction: column; gap: var(--space-1); margin: var(--space-2) 0; }
.ra-facet-item {
  display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-3); align-items: center; min-height: 44px; padding: 0 var(--space-2);
  border-radius: var(--radius-s); cursor: pointer; font: var(--t-small);
}
.ra-facet-item:hover { background: var(--surface-3); }
.ra-facet-item input { width: 20px; height: 20px; accent-color: var(--brand); }
.ra-facet-item .caption { font: var(--t-data); }
.ra-facetgroup { border-bottom: 1px solid var(--line); padding: var(--space-2) 0; }
.ra-facetgroup > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }

/* --- buscar: modos, campo, agrupar ------------------------------------------- */
.ra-segtabs { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-1); padding: var(--space-1); background: var(--surface-3); border-radius: var(--radius-m); }
.ra-segtab {
  min-height: 40px; border: 0; border-radius: var(--radius-s); background: transparent; cursor: pointer;
  font: var(--t-small-strong); color: var(--ink-muted); transition: background var(--ease), color var(--ease);
}
.ra-segtab[aria-selected="true"] { background: var(--surface-1); color: var(--ink); box-shadow: var(--edge), var(--shadow-1); }
.ra-searchbar { display: flex; flex-direction: column; gap: var(--space-2); }
.ra-searchfield {
  display: flex; align-items: center; gap: var(--space-2); min-height: 48px; padding: 0 var(--space-3);
  background: var(--surface-1); border: 1px solid var(--line-strong); border-radius: var(--radius-m); color: var(--ink-muted);
  transition: border-color var(--ease), box-shadow var(--ease);
}
.ra-searchfield:focus-within { border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
.ra-searchfield input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font: var(--t-body); color: var(--ink); min-height: 48px; }
.ra-searchfield input::placeholder { color: var(--ink-muted); }

/* --- panel de filtros: sube desde abajo en el celular, lateral derecho en la compu --- */
.ra-sheet {
  border: 0; padding: 0; margin: 0; background: var(--surface-1); color: var(--ink); box-shadow: var(--shadow-3);
  display: none; flex-direction: column; max-width: 100%; max-height: 100%;
}
.ra-sheet[open] { display: flex; }
.ra-sheet::backdrop { background: rgb(0 0 0 / .45); }
.ra-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: var(--space-3) var(--space-4) var(--space-2) var(--space-6); border-bottom: 1px solid var(--line); }
.ra-sheet-body { flex: 1; overflow-y: auto; padding: 0 var(--space-6); overscroll-behavior: contain; }
.ra-sheet-foot { padding: var(--space-3) var(--space-6) calc(var(--space-3) + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.ra-sheet-foot .ra-btn-primary { flex: 2 1 auto; }
@media (max-width: 767px) {
  .ra-sheet { inset: auto 0 0 0; width: 100%; height: 85dvh; border-radius: var(--radius-l) var(--radius-l) 0 0; }
  .ra-sheet[open] { animation: ra-sheet-up var(--ease-sheet); }
}
@media (min-width: 768px) {
  .ra-sheet { inset: 0 0 0 auto; width: 420px; height: 100dvh; }
  .ra-sheet[open] { animation: ra-sheet-side var(--ease-sheet); }
}
@keyframes ra-sheet-up { from { transform: translateY(100%); } }
@keyframes ra-sheet-side { from { transform: translateX(100%); } }
details.notice > summary { min-height: 32px; display: flex; align-items: center; }
.ra-ask-turn { border-top: 1px solid var(--line); padding-top: var(--space-4); display: flex; flex-direction: column; }

@media (max-width: 767px) {
  .app { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  /* sin backdrop-filter ni transform en el masthead: la nav fija quedaría atada a él y no a la pantalla */
  .navbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; margin: 0; gap: 0;
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; /* una columna por sección, sin importar cuántas */
    padding: var(--space-1) var(--space-2) calc(var(--space-1) + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line); background: var(--surface-1);  /* sólido: el blur costaba batería y bajaba el contraste */
  }
  .navitem { flex-direction: column; justify-content: center; gap: 4px; min-height: 56px; padding: 0; font: var(--t-micro); }
  .navitem:hover { background: transparent; }
  .navitem[aria-current="page"]::after { top: 0; bottom: auto; left: 30%; right: 30%; }
  .toast { bottom: calc(88px + env(safe-area-inset-bottom)); }  /* por encima de la barra inferior */
}

/* --- Hoy (inicio): ahora / próxima / resto del día --------------------------- */
.ra-today {
  background: var(--surface-1); border-radius: var(--radius-m); padding: var(--space-4);
  display: flex; flex-direction: column; gap: var(--space-2); box-shadow: var(--edge), var(--shadow-1);
}
/* "Ahora": borde de marca de 2 px + estado con punto (antes una barra izquierda de 4 px) */
.ra-today.is-now { box-shadow: 0 0 0 2px var(--brand); }
.ra-today-when { display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); }
.ra-today .ra-card-title .ra-link { text-decoration: none; }
/* El resto del día: lista agrupada con divisores */
.ra-today-later { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; background: var(--surface-1); border-radius: var(--radius-m); box-shadow: var(--edge); }
.ra-today-later li { display: flex; gap: var(--space-3); align-items: center; min-height: 52px; padding: var(--space-2) var(--space-4); font: var(--t-small); border-top: 1px solid var(--line); }
.ra-today-later li:first-child { border-top: 0; }
.ra-today-later .ra-mono { font: var(--t-data); color: var(--ink-muted); flex: none; width: 44px; }
.ra-today-later .ra-link { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.ra-today-empty { display: flex; flex-direction: column; gap: var(--space-3); align-items: flex-start; padding: var(--space-4); background: var(--surface-1); border-radius: var(--radius-m); box-shadow: var(--edge); }

/* --- Inicio: anuncios sin reserva (web/js/anuncios.js) ------------------------
   Fila que se desliza con el dedo (scroll-snap), sin autoplay; la tarjeta ocupa el 82 % para que asome la siguiente. */
.ra-ann-head { align-items: center; }
.ra-ann-ctls { display: flex; gap: var(--space-2); }
.ra-ann-ctl {
  width: 36px; height: 36px; display: grid; place-items: center; padding: 0; cursor: pointer;
  border-radius: var(--radius-pill); border: 1px solid var(--line-strong); background: var(--surface-1); color: var(--ink);
}
.ra-ann-ctl:focus-visible, .ra-ann:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.ra-ann-rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(82%, 340px); gap: var(--space-3);
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scroll-behavior: smooth;
  margin: 0 calc(-1 * var(--space-4)); padding: 2px var(--space-4) var(--space-2); scroll-padding-inline: var(--space-4);
  scrollbar-width: none; list-style: none;
}
.ra-ann-rail::-webkit-scrollbar { display: none; }
.ra-ann-rail > li { scroll-snap-align: start; display: flex; min-width: 0; }
.ra-ann {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-4);
  border-radius: var(--radius-m); background: var(--surface-1); color: var(--ink); box-shadow: var(--edge), var(--shadow-1);
}
.ra-ann-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.ra-ann-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ra-ann .ra-card-title { color: inherit; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ra-ann .ra-card-title .ra-link { text-decoration: none; }
.ra-ann-es { margin: 0; font: var(--t-small); color: var(--ink-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ra-ann .ra-card-meta { flex-wrap: nowrap; }
.ra-ann .ra-card-meta .ra-icotext { overflow: hidden; }
.ra-ann .ra-card-meta .ra-icotext > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ra-ann .ra-card-meta .ra-mono { flex: none; }
.ra-ann-space { flex: 1; }
.ra-ann-acts { display: flex; align-items: center; gap: var(--space-2); }
.ra-ann-acts .ra-btn { min-height: var(--touch); }
.ra-ann-acts .ra-btn-icon { width: var(--touch); min-width: var(--touch); }
.ra-ann-grow { flex: 1 1 auto; }
/* Banner: keynote y mainstage en fondo oscuro con borde de marca */
.ra-ann.is-hero { background: var(--hero); color: var(--on-hero); box-shadow: inset 4px 0 0 var(--brand), var(--shadow-1); }
.ra-ann.is-hero .ra-card-meta, .ra-ann.is-hero .ra-ann-es { color: var(--on-hero-muted); }
.ra-ann.is-hero .ra-soon, .ra-ann.is-hero .ra-time { color: var(--on-hero); }
.ra-ann.is-hero .ra-tag { background: rgb(255 255 255 / .12); color: var(--on-hero); }
.ra-ann.is-hero .ra-tag.is-new { background: var(--brand); color: var(--on-brand); }
.ra-ann.is-hero .ra-btn-secondary { background: transparent; color: var(--on-hero); border-color: rgb(255 255 255 / .35); }
.ra-ann.is-hero .ra-btn-secondary:hover { background: rgb(255 255 255 / .08); }
/* Última tarjeta: «+N · Ver los que quedan hoy» → Buscar con el filtro Anuncios */
.ra-ann.is-more { justify-content: center; align-items: flex-start; text-decoration: none; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.ra-ann-big { font: var(--t-display); letter-spacing: var(--track-tight); }
.ra-ann-cta { display: inline-flex; align-items: center; gap: var(--space-1); min-height: var(--touch); font: var(--t-small-strong); color: var(--brand-ink); }
.ra-ann-counter { font: var(--t-data); color: var(--ink-muted); }
@media (prefers-reduced-motion: reduce) { .ra-ann-rail { scroll-behavior: auto; } }

/* --- toast con acción (Deshacer) -------------------------------------------- */
.toast { display: flex; align-items: center; gap: var(--space-4); }
.toast-action { background: none; border: 0; padding: 0 var(--space-2); min-height: var(--touch); cursor: pointer; font: var(--t-small-strong); color: var(--accent-on-ink); }
.toast-action:focus-visible { outline-color: var(--bg); }

/* --- diálogo ---------------------------------------------------------------- */
.ra-dialog { border: 0; padding: 0; border-radius: var(--radius-m); background: var(--surface-1); color: var(--ink); box-shadow: var(--shadow-3); width: min(420px, calc(100% - 32px)); }
.ra-dialog::backdrop { background: rgb(0 0 0 / .45); }
.ra-dialog[open] { animation: ra-pop var(--ease-sheet); }
.ra-dialog-body { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-6); }
.ra-dialog-title { font: var(--t-title); color: var(--ink); }
.ra-dialog-text { font: var(--t-body); color: var(--ink-muted); }
@keyframes ra-pop { from { opacity: 0; transform: scale(.97); } }

/* --- skeleton ---------------------------------------------------------------- */
.ra-skeleton { display: flex; flex-direction: column; gap: var(--space-3); }
.ra-skel { border-radius: var(--radius-m); background: linear-gradient(90deg, var(--surface-3) 25%, var(--line) 50%, var(--surface-3) 75%); background-size: 200% 100%; animation: ra-shimmer 1.2s linear infinite; }
.ra-skel-title { height: 28px; width: 55%; border-radius: var(--radius-s); }
.ra-skel-card { height: 112px; }
@keyframes ra-shimmer { to { background-position: -200% 0; } }

/* --- fichas: encabezado, horarios, para conversar ----------------------------- */
.ra-entity { display: flex; gap: var(--space-4); align-items: flex-start; }
.ra-avatar {
  flex: none; width: 56px; height: 56px; border-radius: var(--radius-pill); display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-ink); font: var(--t-title); line-height: 1; letter-spacing: -0.02em;
}
:root[data-theme="dark"] .ra-avatar { background: var(--surface-3); }
.ra-prose { font: var(--t-body); max-width: 68ch; }
.ra-slots { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.ra-slot {
  display: grid; grid-template-columns: 56px 1fr auto; gap: var(--space-3); align-items: center;
  padding: var(--space-3) var(--space-4); background: var(--surface-1); border-radius: var(--radius-m); box-shadow: var(--edge);
}
.ra-slot-body { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; font: var(--t-small); min-width: 0; }
.ra-converse { padding: var(--space-4); border-radius: var(--radius-m); background: var(--brand-soft); box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 40%, transparent); }
.ra-converse h2.label { color: var(--ink); }
.ra-converse .caption { color: var(--ink); }
:root[data-theme="dark"] .ra-converse { background: var(--surface-2); }
:root[data-theme="dark"] .ra-converse .caption { color: var(--ink-muted); }
.ra-skel-line { height: 14px; border-radius: var(--radius-s); }
.ra-skel-line:nth-child(2) { width: 80%; } .ra-skel-line:nth-child(3) { width: 95%; } .ra-skel-line:nth-child(4) { width: 60%; } .ra-skel-line:nth-child(5) { width: 90%; }
.ra-skel-today { height: 132px; }

/* --- accesibilidad: saltar al contenido y foco programático -------------------- */
.skip-link {
  position: absolute; left: var(--space-4); top: -100px; z-index: 100; padding: var(--space-3) var(--space-4);
  background: var(--ink); color: var(--bg); border-radius: var(--radius-m); font: var(--t-small-strong); text-decoration: none;
}
.skip-link:focus { top: var(--space-2); }
#view:focus, #view h1:focus { outline: none; }  /* foco puesto por código al cambiar de pantalla: no es una acción del usuario */

/* --- itinerario guiado: entrada, entrevista, armado del día ----------------------------- */
.subtitle { font: var(--t-heading); color: var(--ink); margin: 0; }
.ra-path { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4); border: 1px solid var(--line);
  border-radius: var(--radius-m); background: var(--surface-1); }
.ra-path.is-recommended { border-color: var(--brand); box-shadow: var(--shadow-1); }
.ra-path p { margin: 0; }

.ra-interview textarea, .ra-interview input:not([type=checkbox]) { width: 100%; }
.ra-progress { display: flex; flex-direction: column; gap: var(--space-1); }
.ra-progress-track { height: 6px; border-radius: var(--radius-pill); background: var(--surface-3); overflow: hidden; }
.ra-progress-fill { height: 100%; background: var(--brand); transition: width var(--ease); }
.ra-check { display: flex; align-items: center; gap: var(--space-2); font: var(--t-body); min-height: 44px; }
.ra-priorities { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.ra-priorities li { display: flex; align-items: center; gap: var(--space-2); }
.ra-dots { font: var(--t-data); color: var(--brand); background: none; border: 0; padding: var(--space-2); min-width: 56px; cursor: pointer; }

.ra-option { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-4); border-radius: var(--radius-m);
  border: 1px solid var(--line); border-left: 4px solid var(--line-strong); background: var(--surface-1); }
.ra-option.is-a_tiempo { border-left-color: var(--success); }
.ra-option.is-justo { border-left-color: var(--warning); }
.ra-option.is-salir_antes { border-left-color: color-mix(in srgb, var(--warning) 60%, var(--error)); }
.ra-option.is-se_superpone { border-left-color: var(--error); opacity: .92; }
.ra-option p { margin: 0; }
.ra-option-head { display: flex; align-items: baseline; gap: var(--space-2); flex-wrap: wrap; }
.ra-option-time { font: var(--t-data); color: var(--ink); }
.ra-option-state { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font: var(--t-small-strong); white-space: nowrap; }
.ra-state-dot { width: 10px; height: 10px; border-radius: var(--radius-pill); flex: none; background: var(--line-strong); }
.ra-option-state.is-a_tiempo .ra-state-dot { background: var(--success); }
.ra-option-state.is-justo .ra-state-dot { background: var(--warning); }
.ra-option-state.is-salir_antes .ra-state-dot { background: color-mix(in srgb, var(--warning) 60%, var(--error)); }
.ra-option-state.is-se_superpone .ra-state-dot { background: var(--error); }
.ra-reason { font: var(--t-body); font-style: italic; color: var(--ink); }
.ra-pending-tag { font: var(--t-small-strong); color: var(--brand-ink); }

.ra-chosen-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.ra-chosen { display: grid; grid-template-columns: auto 1fr; gap: var(--space-1) var(--space-3); padding: var(--space-3);
  border-radius: var(--radius-m); background: var(--surface-2); }
.ra-chosen-time { font: var(--t-data); color: var(--ink); }
.ra-chosen-body { display: flex; flex-direction: column; min-width: 0; }
.ra-chosen-actions { grid-column: 1 / -1; display: flex; gap: var(--space-2); flex-wrap: wrap; }

.ra-suggestions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.ra-suggestion { width: 100%; text-align: left; padding: var(--space-3); min-height: 44px; border: 1px solid var(--line);
  border-radius: var(--radius-s); background: var(--surface-1); color: var(--ink); cursor: pointer; }
.ra-suggestion:hover { background: var(--surface-3); }
.ra-followup { font: var(--t-body-strong); color: var(--ink); margin: 0; }

/* --- voz de la entrevista (web/js/interview.js): botón compacto y barra de grabación ------------- */
.ra-voice { display: flex; }
.ra-voice-start {
  display: inline-flex; align-items: center; gap: var(--space-2); min-height: 40px; padding: 0 18px 0 14px; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--surface-2); color: var(--ink);
  font: var(--t-small-strong); transition: background var(--ease), border-color var(--ease);
}
.ra-voice-start .ra-icon { color: var(--rec); }
.ra-voice-start:hover { background: var(--surface-3); border-color: var(--line-strong); }
.ra-voice-start:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.ra-voicebar {
  display: flex; align-items: center; gap: var(--space-3); width: 100%; min-height: 52px; padding: 6px 6px 6px 16px;
  border-radius: var(--radius-pill); background: var(--surface-1); box-shadow: var(--edge); animation: ra-pop var(--ease);
}
.ra-voicebar.is-recording { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rec) 60%, transparent), 0 0 0 4px color-mix(in srgb, var(--rec) 14%, transparent); }
.ra-voice-dot { width: 10px; height: 10px; border-radius: var(--radius-pill); background: var(--rec); flex: none; animation: ra-blink 1.2s ease-in-out infinite; }
.ra-voice-word { font: var(--t-small-strong); color: var(--rec); }
.ra-voicebar.is-busy .ra-voice-word { color: var(--ink-muted); }
.ra-voice-time { font: var(--t-data); font-variant-numeric: tabular-nums; color: var(--ink); }
.ra-voice-level { display: flex; align-items: center; gap: 3px; height: 22px; margin-left: auto; }
.ra-voice-level span { width: 3px; height: 100%; border-radius: 2px; background: var(--rec); transform: scaleY(.18); transition: transform 80ms linear; }
.ra-voice-cancel {
  border: 0; background: none; color: var(--ink-muted); font: var(--t-small); cursor: pointer; padding: 8px; border-radius: var(--radius-s);
}
.ra-voice-cancel:hover { color: var(--ink); }
.ra-voice-stop {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center; cursor: pointer; border: 0; border-radius: var(--radius-pill);
  background: var(--rec); box-shadow: var(--shadow-1); transition: transform var(--ease);
}
.ra-voice-stop:active { transform: scale(.94); }
.ra-voice-stop:focus-visible, .ra-voice-cancel:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.ra-voice-stop-glyph { width: 14px; height: 14px; border-radius: 3px; background: var(--on-rec); }
.ra-voice-spinner {
  width: 16px; height: 16px; flex: none; border-radius: var(--radius-pill); border: 2px solid var(--line-strong); border-top-color: var(--brand);
  animation: ra-spin .8s linear infinite;
}
@keyframes ra-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .ra-voice-dot, .ra-voice-spinner { animation: none; }
  .ra-voice-level span { transition: none; }
}

/* --- buscar en lo grabado (web/js/grabado.js) --- */
.ra-recsearch { display: flex; flex-direction: column; gap: var(--space-2); }
.ra-recsearch:has(.ra-hit) { padding-bottom: var(--space-4); border-bottom: 1px solid var(--line); }
.ra-hits-status:empty, .ra-hits:empty { display: none; }
/* Momentos: una lista agrupada con divisores (antes tarjetas sueltas) */
.ra-hits { display: flex; flex-direction: column; background: var(--surface-1); border-radius: var(--radius-m); box-shadow: var(--edge); overflow: hidden; }
.ra-hit {
  display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-3) var(--space-4); border-top: 1px solid var(--line);
  color: var(--ink); text-decoration: none; transition: background var(--ease);
}
.ra-hit:first-child { border-top: 0; }
.ra-hit:hover { background: var(--surface-2); }
.ra-hit:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.ra-hit-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.ra-hit-time { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 8px; border-radius: var(--radius-s); background: var(--brand-soft); color: var(--brand-ink); font: var(--t-data); font-weight: 600; }
.ra-hit-title { font: var(--t-small); font-weight: 600; }
.ra-hit-text {
  font: var(--t-small); color: var(--ink-muted); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
/* el bloque al que se saltó desde un resultado */
.ra-tb.is-hit { background: var(--brand-soft); margin: 0 calc(-1 * var(--space-4)); padding-inline: var(--space-4); border-top-color: transparent; }
.ra-tb.is-hit + .ra-tb { border-top-color: transparent; }
.ra-tb.is-hit .ra-tc { color: var(--brand-ink); font-weight: 600; }
/* Citas del chat: pastillas mono. El código de charla en gris; el momento grabado (▶ 01:30) en naranja de marca,
   no en el rojo de error que se usaba antes. */
.ra-cite {
  display: inline-flex; align-items: center; gap: 3px; padding: 0 6px; border-radius: var(--radius-s); vertical-align: 1px;
  font: var(--t-data); font-variant-numeric: tabular-nums; white-space: nowrap;
  background: var(--surface-3); color: var(--ink); text-decoration: none;
}
.ra-cite:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
.ra-cite.ra-moment-ref { background: var(--brand-soft); color: var(--brand-ink); }
/* Preguntar: la pregunta como burbuja, la respuesta como texto sin tarjeta */
.ra-ask-q { align-self: flex-end; max-width: 85%; padding: 10px 14px; border-radius: var(--radius-l) var(--radius-l) var(--radius-s) var(--radius-l); background: var(--surface-3); font: var(--t-body); color: var(--ink); overflow-wrap: anywhere; }
.ra-answer { display: flex; flex-direction: column; gap: var(--space-3); font: var(--t-body); }
.ra-answer ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.ra-group-label { font: var(--t-small-strong); color: var(--ink-muted); }

/* --- barra de la pantalla (detalle): Volver a la izquierda, Compartir y ⋯ a la derecha --- */
.pagebar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); flex: 1; min-width: 0; margin-left: calc(-1 * var(--space-2)); }
.pagebar[hidden] { display: none; }
.has-pagebar .topbar > .brand, .has-pagebar .topbar > .toolbar { display: none; }

/* --- menú ⋯ (web/js/menu.js) --- */
.ra-menuwrap { position: relative; }
.ra-menu {
  position: absolute; right: 0; top: calc(100% + var(--space-1)); z-index: 40; min-width: 200px; padding: var(--space-1);
  display: flex; flex-direction: column; background: var(--surface-1); border-radius: var(--radius-m); box-shadow: var(--edge), var(--shadow-3);
}
.ra-menu[hidden] { display: none; }
.ra-menu-item {
  display: flex; align-items: center; gap: var(--space-3); min-height: var(--touch); padding: 0 var(--space-3); border: 0; background: none;
  border-radius: var(--radius-s); font: var(--t-body); color: var(--ink); text-align: left; cursor: pointer;
}
.ra-menu-item:hover { background: var(--surface-3); }
.ra-menu-item:focus-visible { background: var(--surface-3); outline: 2px solid var(--focus); outline-offset: -2px; }
.ra-menu-item.is-danger { color: var(--error); }

/* --- detalle de grabación: encabezado, fila de estado y link a la ficha --- */
.ra-detail { display: flex; flex-direction: column; gap: var(--space-4); }
.ra-detail-head { display: flex; flex-direction: column; gap: var(--space-2); }
/* El título de una charla en 24/30 (no 28): en 390 px ocupa 2-3 líneas, no 4. */
.ra-detail-head h1.title { margin: 0; font: var(--t-display); font-size: 24px; line-height: 30px; }
.ra-detail-meta { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-1) var(--space-2); font: var(--t-small); color: var(--ink-muted); }
.ra-detail-meta .ra-mono { font: var(--t-data); }
.ra-talklink { align-self: flex-start; min-height: var(--touch); padding: 0; gap: var(--space-1); font: var(--t-small-strong); text-decoration: none; }
.ra-talklink:hover { background: none; text-decoration: underline; }
/* "Desde la búsqueda «…»": se llegó desde un buscador; la ✕ saca la marca del momento */
.ra-from {
  display: flex; align-items: center; gap: var(--space-2); min-height: var(--touch); margin: var(--space-3) 0 var(--space-2);
  padding: 0 var(--space-1) 0 var(--space-3); border-radius: var(--radius-m); background: var(--info-soft); color: var(--on-info-soft); font: var(--t-small);
}
.ra-from-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ra-from-close { flex: none; width: var(--touch); height: var(--touch); display: grid; place-items: center; border: 0; background: none; color: inherit; border-radius: var(--radius-s); cursor: pointer; }
.ra-from-close:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }

/* --- inicio: acción en el encabezado de la sección y grabaciones compactas --- */
.ra-sec-action { min-height: var(--touch); padding: 0 var(--space-2); margin-right: calc(-1 * var(--space-2)); gap: var(--space-1); font: var(--t-small-strong); text-decoration: none; }
.ra-reccard { display: grid; grid-template-columns: 1fr auto; align-items: start; gap: var(--space-1) var(--space-3); padding: var(--space-3) var(--space-4); }
.ra-reccard .ra-card-title { font: var(--t-body-strong); }
.ra-reccard .ra-card-meta { grid-column: 1 / -1; flex-wrap: nowrap; gap: 6px; }
.ra-reccard .ra-mono { flex: none; font: var(--t-data); }
.ra-reccard .ra-ellipsis:not(:empty) + .ra-mono::before { content: "· "; }
.ra-optional:empty { display: none; }
.ra-ellipsis { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Hoy: "Grabar" ocupa la fila y "Llevame" queda al lado como botón de solo ícono */
.ra-today-actions { display: flex; align-items: center; gap: var(--space-2); }
.ra-today-actions > .ra-btn:not(.ra-btn-icon) { flex: 1 1 auto; }

/* --- buscar › filtrar: Filtros dentro del campo, sugerencia, píldoras y conteo --- */
/* Buscar: título, modos y contenido más juntos que el resto de las pantallas (16 px, como el mock) */
.ra-search-page { display: flex; flex-direction: column; gap: var(--space-4); }
.ra-search-page h1.title { margin: 0; }
.ra-explore { display: flex; flex-direction: column; gap: var(--space-4); }
.ra-searchfield:has(.ra-infield-btn) { padding-right: 1px; }
.ra-infield-btn {
  position: relative; flex: none; width: var(--touch); height: var(--touch); display: grid; place-items: center; border: 0;
  border-radius: var(--radius-s); background: var(--surface-3); color: var(--ink); cursor: pointer;
}
.ra-infield-btn:hover { background: var(--line); }
.ra-infield-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.ra-badge {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--radius-pill);
  background: var(--brand); color: var(--on-brand); font: var(--t-micro); font-size: 11px; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums;
}
.ra-suggest {
  display: flex; align-items: center; gap: var(--space-2); width: 100%; min-height: var(--touch); padding: 0 var(--space-3); border: 0;
  border-radius: var(--radius-m); background: var(--surface-3); color: var(--ink); font: var(--t-small); text-align: left; cursor: pointer;
}
.ra-suggest[hidden] { display: none; }
.ra-suggest:hover { background: var(--line); }
.ra-suggest:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.ra-suggest b { font-weight: 600; overflow-wrap: anywhere; }
.ra-pillrow { display: flex; gap: var(--space-2); overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--space-4)); padding: var(--space-1) var(--space-4); }
.ra-pillrow::-webkit-scrollbar { display: none; }
.ra-pillrow > * { flex: none; }
/* "Agrupar ▾": select nativo con forma de píldora; punteado mientras no agrupa */
.ra-pillselect-wrap { position: relative; display: inline-flex; color: var(--ink-muted); }
.ra-pillselect-wrap:has(.is-on) { color: var(--surface-1); }
.ra-pillselect-wrap::after {
  content: ""; position: absolute; right: 14px; top: 50%; width: 16px; height: 16px; margin-top: -8px; background: currentColor; pointer-events: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ra-pillselect {
  appearance: none; -webkit-appearance: none; min-height: var(--touch); padding: 0 38px 0 var(--space-4); cursor: pointer;
  border: 1px dashed var(--line-strong); border-radius: var(--radius-pill); background: var(--surface-1); color: inherit; font: var(--t-small);
  field-sizing: content;  /* tan ancha como la opción elegida, no como la más larga */
}
.ra-pillselect.is-on { border: 1px solid var(--ink); background: var(--ink); font-weight: 600; }
.ra-pillselect:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.ra-pillselect option { color: var(--ink); background: var(--surface-1); }
.ra-count { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-height: var(--touch); }
.ra-count strong { color: var(--ink); font-weight: 600; }
.ra-count .ra-btn-ghost { flex: none; min-height: var(--touch); padding: 0 var(--space-2); font: var(--t-small-strong); }

/* --- buscar › preguntar: conversación y campo fijo abajo, sobre la barra de navegación --- */
/* --nav-h: alto de la barra inferior (solo en el celular); --kb: lo que tapa el teclado (web/js/ask.js);
   --composer-h: alto real del campo, para dejar ese lugar libre al final de la pantalla. */
:root { --nav-h: 0px; }
.ra-ask { display: flex; flex-direction: column; gap: var(--space-6); }
.ra-turns { display: flex; flex-direction: column; gap: var(--space-8); }
.ra-turns:empty { display: none; }
.ra-composer {
  position: fixed; left: 0; right: 0; bottom: max(var(--kb, 0px), var(--nav-h)); z-index: 15;
  padding: var(--space-2) var(--space-4); background: var(--bg); border-top: 1px solid var(--line);
}
.ra-composer-box {
  display: flex; align-items: flex-end; gap: var(--space-2); max-width: 688px; margin: 0 auto; padding: var(--space-1) var(--space-1) var(--space-1) var(--space-3);
  background: var(--surface-1); border: 1px solid var(--line-strong); border-radius: var(--radius-l); transition: border-color var(--ease), box-shadow var(--ease);
}
.ra-composer-box:focus-within { border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
.ra-composer textarea {
  flex: 1; min-width: 0; min-height: var(--touch); max-height: 140px; padding: 10px 0; border: 0; background: none; outline: none; resize: none;
  font: var(--t-body); color: var(--ink);
}
.ra-composer textarea::placeholder { color: var(--ink-muted); }
.ra-send {
  flex: none; width: var(--touch); height: var(--touch); display: grid; place-items: center; border: 0; border-radius: var(--radius-m);
  background: var(--brand); color: var(--on-brand); cursor: pointer; transition: transform var(--ease);
}
.ra-send:active:not([disabled]) { transform: scale(.94); }
.ra-send[disabled] { opacity: .45; cursor: not-allowed; }
.ra-send:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.app:has(.ra-composer) { padding-bottom: calc(var(--nav-h) + var(--composer-h, 64px) + var(--space-6)); }
body:has(.ra-composer) .toast { bottom: calc(var(--nav-h) + var(--composer-h, 64px) + var(--space-3)); }
@media (max-width: 767px) {
  :root { --nav-h: calc(65px + env(safe-area-inset-bottom)); }  /* 4 + 56 + 4 de la barra + su borde */
}
@media (min-width: 768px) {
  .ra-composer { padding-bottom: calc(var(--space-2) + env(safe-area-inset-bottom)); }
}
@media (min-width: 900px) {
  .ra-composer-box { max-width: 928px; }
}

/* --- «Tu re:Invent en números» (web/js/numeros.js y charts.js) ------------------------------------------ */
.ra-back { align-self: flex-start; min-height: var(--touch); padding: 0 var(--space-2); margin-left: calc(-1 * var(--space-2)); gap: var(--space-1); font: var(--t-small-strong); text-decoration: none; }
.ra-center { justify-content: center; margin-top: var(--space-4); }
.ra-num-card { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4); background: var(--surface-1); border-radius: var(--radius-m); box-shadow: var(--edge), var(--shadow-1); }
.ra-num-card .ra-sec-action { align-self: flex-start; margin: calc(-1 * var(--space-2)) 0; }
/* KPIs */
.ra-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.ra-kpi { display: flex; flex-direction: column; gap: 2px; padding: var(--space-3); background: var(--surface-1); border-radius: var(--radius-m); box-shadow: var(--edge); min-width: 0; }
.ra-kpi.is-wide { grid-column: 1 / -1; }
.ra-kpi-label { font: var(--t-micro); color: var(--ink-muted); }
.ra-kpi-value { font: var(--t-display); letter-spacing: var(--track-tight); font-variant-numeric: tabular-nums; color: var(--ink); }
.ra-kpi-value small { font: var(--t-small-strong); color: var(--ink-muted); margin-left: 2px; }
.ra-kpi-note { font: var(--t-small); color: var(--ink-muted); }
.ra-kpi.is-err .ra-kpi-value { color: var(--error); }
/* barras: las de Admin › LLM (.ra-bar-row), en lista; con link llevan a Buscar */
.ra-bars { display: flex; flex-direction: column; gap: var(--space-2); }
.ra-bars .ra-bar-row { grid-template-columns: minmax(96px, 38%) 1fr auto; }
.ra-bars.is-wide .ra-bar-row { grid-template-columns: minmax(128px, 46%) 1fr auto; }
.ra-bar-link { color: inherit; text-decoration: none; min-height: 28px; border-radius: var(--radius-s); }
.ra-bar-link:hover .ra-bar-label { text-decoration: underline; text-underline-offset: 3px; }
.ra-bar-link:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.ra-bar-fill.is-muted { background: var(--line-strong); }
.ra-bar-row.is-gap .ra-bar-label, .ra-bar-row.is-gap .ra-bar-value { color: var(--error); font-weight: 600; }
.ra-weight { font: var(--t-data); color: var(--brand-ink); margin-left: var(--space-1); }
/* columnas: charlas por día */
.ra-cols { display: grid; gap: var(--space-2); align-items: end; }
.ra-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: var(--space-1); color: inherit; text-decoration: none; border-radius: var(--radius-s); padding-top: var(--space-1); }
.ra-col:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.ra-col-num { font: var(--t-data); color: var(--ink); font-variant-numeric: tabular-nums; }
.ra-col-stick { width: 100%; max-width: 40px; background: color-mix(in srgb, var(--brand) 30%, var(--surface-3)); border-radius: 3px 3px 0 0; transition: background var(--ease); }
.ra-col:hover .ra-col-stick { background: color-mix(in srgb, var(--brand) 55%, var(--surface-3)); }
.ra-col-day { font: var(--t-micro); color: var(--ink-muted); }
.ra-col.is-today .ra-col-day { color: var(--brand-ink); }
.ra-col-mine { font: var(--t-data); color: var(--brand-ink); }
/* leyendas */
.ra-legend { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-3); font: var(--t-small); color: var(--ink-muted); }
.ra-legend-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.ra-legend-swatch.is-talk { background: var(--brand); }
.ra-legend-swatch.is-key { background: var(--ink); }
.ra-legend-swatch.is-event { background: var(--info); }
.ra-legend-swatch.is-clash { background: var(--error); }
.ra-legend-swatch.is-late { box-shadow: 0 0 0 2px var(--warning); }
.ra-legend-swatch.is-catalog { background: color-mix(in srgb, var(--brand) 30%, var(--surface-3)); }
.ra-legend-swatch.is-mine-text { display: none; }
.ra-legend-swatch.is-mine-cell { box-shadow: inset 0 0 0 2px var(--ink); }
.ra-legend > span:has(.is-mine-text) { color: var(--brand-ink); }
.ra-ramp { display: inline-flex; align-items: center; gap: var(--space-1); }
.ra-ramp-sw { width: 14px; height: 14px; border-radius: 3px; }
/* heatmap día × hora */
.ra-heat { --heat-label: 36px; display: grid; gap: 3px; }
.ra-heat-col { font: var(--t-data); color: var(--ink-muted); text-align: center; }
.ra-heat-row { font: var(--t-micro); color: var(--ink-muted); align-self: center; }
.ra-heat-cell { aspect-ratio: 1; border-radius: 3px; background: var(--surface-3); position: relative; display: block; }
.ra-heat-cell.is-mine::after { content: ""; position: absolute; inset: 0; border-radius: 3px; box-shadow: inset 0 0 0 2px var(--ink); }
a.ra-heat-cell:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
/* franja de la semana (8 a 22 h) */
.ra-tl { display: flex; flex-direction: column; gap: var(--space-2); }
.ra-tl-row { display: grid; grid-template-columns: 36px 1fr; gap: var(--space-2); align-items: center; }
.ra-tl-ticks { position: relative; height: 18px; }
.ra-tl-ticks span { position: absolute; transform: translateX(-50%); font: var(--t-data); color: var(--ink-muted); }
.ra-tl-day { font: var(--t-micro); color: var(--ink-muted); }
.ra-tl-lane {
  position: relative; height: 40px; border-radius: var(--radius-s); box-shadow: var(--edge);
  background: repeating-linear-gradient(90deg, var(--surface-3) 0 1px, transparent 1px calc(100% / 14)) var(--surface-1);
}
.ra-tl-blk { position: absolute; height: 16px; min-width: 3px; border-radius: 3px; background: var(--brand); }
.ra-tl-blk.is-solo { top: 12px; }
.ra-tl-blk.l0 { top: 4px; }
.ra-tl-blk.l1 { top: 20px; }
.ra-tl-blk.is-key { background: var(--ink); }
.ra-tl-blk.is-event { background: var(--info); }
.ra-tl-blk.is-clash { background: var(--error); }
.ra-tl-blk.is-late { box-shadow: 0 0 0 2px var(--warning); }
.ra-tl-walk { position: absolute; top: 19px; height: 0; border-top: 2px dotted var(--ink-muted); }
/* barra apilada: nivel */
.ra-stack100 { display: flex; height: 28px; gap: 2px; border-radius: var(--radius-s); overflow: hidden; }
.ra-stack100 span { display: grid; place-items: center; min-width: 28px; font: var(--t-data); color: var(--ink); }

/* «Está llena / hay mucha cola» en los horarios de la ficha (web/js/knowledge.js) */
.ra-lleno { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2);
  padding-top: var(--space-3); border-top: 1px solid var(--surface-3); }
.ra-lleno:empty { display: none; }
.ra-lleno-avisar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.ra-lleno-avisar > .caption { flex-basis: 100%; }
.ra-voto { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3);
  margin-top: var(--space-6); padding-top: var(--space-4); border-top: 1px solid var(--surface-3); }
.ra-voto > .caption:first-child { flex-basis: 100%; }
.ra-voto-botones { display: flex; gap: var(--space-2); }
.ra-lleno-dato { align-self: flex-start; font: var(--t-micro); font-weight: 600; background: var(--warning-soft); color: var(--on-warning-soft); border-radius: var(--radius-s); padding: 2px 8px; }
