/* Hallmark · shape: app screen · genre: editorial · theme: custom · job: book · idea: "Escoge el día y la hora de tu cita y sigue por WhatsApp" · vibe: "cálido, claro y delicado, como el consultorio"
 * paper: oklch(97.4% 0.012 70) · accent: oklch(53% 0.155 38) · display: Plus Jakarta Sans · body: Plus Jakarta Sans · hero: none, app screen · nav: logo only · footer: two short lines · imagery: the brand rings and logo · signature: a month of round days that take the brand coral when chosen
 * axes: warm-paper/one-family-light/coral · posture: tool · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R4 V3 · weakest: V, the layout is the standard calendar-plus-times pattern on purpose: familiarity is what a booking tool is for, and the brand carries the personality */
/* El sello de arriba es el de la primera versión (29/11/2026). Ese mismo día la página se REDISEÑÓ A MANO
   sobre esa base, sin pasar de nuevo por Hallmark, así que dos datos del sello ya no valen: los títulos van
   en Cormorant Garamond (no en Plus Jakarta) y la composición es una sola tarjeta de tres paneles —la cita,
   el calendario, las horas— con una franja de «tu cita» que en el celular es una barra fija. Las reglas que
   las pruebas vigilan siguen iguales: colores solo en tokens, foco visible, AA, movimiento reducido. */

/* Mini-agenda de la Dra. Laura Trujillo. Colores del brandbook (16/02/2021) tal como los usa el sitio
   (site/assets/css/redesign.css). Las tipografías NO son las de marca (Grand Halva y RNS Miles no tienen
   licencia): son las dos libres que el sitio ya había probado como reemplazo. Ver fonts/LICENCIA.md.
   Cuando se compren, se cambian --fuente y --fuente-titulo. */

@font-face {
  font-family: "Cormorant Garamond";
  src: url("/agenda/fonts/cormorant-garamond-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("/agenda/fonts/cormorant-garamond-italic-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/agenda/fonts/plus-jakarta-sans-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Paleta oficial */
  --coral: #EC6F50;          /* Pantone 1635C, el color insignia: aros, iconos y toques */
  --coral-ink: #B8431F;      /* el mismo coral un punto más hondo para TEXTO y botones: 5,4:1 sobre blanco cálido
                                (el --coral-deep del sitio, #C9512F, queda en 4,1:1 y no llega a AA) */
  --amber: #F4B05C;
  --amber-ink: #C4761A;      /* el ámbar más hondo: el punto de «quedan pocas horas» (3:1 sobre el tinte) */
  --amber-soft: #F9CF95;
  --mint: #B0CFC1;
  --mint-deep: #5F8E78;
  --nude: #E9CCBE;
  --blush: #FEF2F0;
  --paper: #FBF5EF;          /* el blanco cálido de fondo del sitio */
  --card: #FFFDFB;           /* la tarjeta: blanco con un punto de calidez */
  --hueco: #F8EFE7;          /* fichas de las horas, fondo del selector y de las flechas del mes */
  --tinte: #FCEAE4;          /* día con horarios: coral al 12 % sobre la tarjeta (coral-ink encima: 4,7:1) */
  --tinte-hondo: #F9DCD3;    /* solo bajo iconos, al pasar el cursor: con texto coral no llega a AA */
  --franja: #FCF6F0;         /* la franja de «tu cita», al pie de la tarjeta */
  --on-accent: #FFFDFB;      /* texto sobre el coral hondo */
  --ink: #4A3B35;            /* texto cálido, nunca negro frío */
  --ink-soft: #6F5F59;       /* secundario: 5,6:1 sobre el papel */
  --ink-faint: #A99C96;      /* días sin horarios y datos por escoger: no se pueden usar, no piden contraste */
  --line: rgba(74, 59, 53, .12);

  /* Luz y sombras (aquí, con los demás colores: fuera de este bloque no hay ni un rgb) */
  --resplandor: radial-gradient(54rem 34rem at 92% -8%, rgba(249, 207, 149, .36), transparent 62%),
                radial-gradient(40rem 28rem at -6% 106%, rgba(236, 111, 80, .07), transparent 60%);
  --sombra-tarjeta: 0 34px 60px -34px rgba(74, 59, 53, .26), 0 2px 6px rgba(74, 59, 53, .04);
  --sombra-barra: 0 -14px 30px -16px rgba(74, 59, 53, .28);
  --sombra-segmento: 0 1px 3px rgba(74, 59, 53, .14), 0 0 0 1px rgba(74, 59, 53, .12);
  --sombra-boton: 0 12px 22px -10px rgba(184, 67, 31, .55);
  --aro: 0 0 0 3px var(--card), 0 0 0 4.5px var(--coral);   /* el halo de los círculos de la marca */

  /* Tipografía: serif fina para los títulos (el eco del logo), sans para todo lo que se usa */
  --fuente: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fuente-titulo: "Cormorant Garamond", "Times New Roman", serif;
  --t-rotulo: .6875rem;      /* rótulos en mayúsculas espaciadas, como «DERMATÓLOGA» en el logo */
  --t-nota: .8125rem;
  --t-ui: .9375rem;
  --t0: 1rem;
  --t-titulo-3: 1.6rem;
  --t-titulo-2: 1.9rem;
  --t-titulo-1: 2.45rem;

  /* Espacio, forma y capas */
  --sp-1: .25rem;
  --sp-2: .5rem;
  --sp-3: .75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2.25rem;
  --ancho: 68rem;            /* la tarjeta en escritorio */
  --ancho-columna: 34rem;    /* y cuando los paneles van uno bajo el otro */
  --pad-x: clamp(.75rem, 3vw, 2rem);
  --pad-panel: 1.15rem;
  --r-tarjeta: 22px;
  --r-ficha: 12px;
  --r-pastilla: 999px;

  /* Movimiento: solo estado, nada de decoración */
  --dur-micro: 140ms;
  --dur-corta: 200ms;
  --curva: cubic-bezier(.2, .7, .3, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--fuente);
  font-size: var(--t0);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* Calidez de fondo: un resplandor, sin bordes que choquen con el texto */
body::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--resplandor);
  pointer-events: none;
}
h1, h2, h3, p, dl, dd, ul { margin: 0; }
ul { padding: 0; list-style: none; }
h1, h2 { text-wrap: balance; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none; }
::selection { background: var(--coral); color: var(--on-accent); }

:focus-visible { outline: 2px solid var(--coral-ink); outline-offset: 3px; }

.saltar {
  position: absolute; left: var(--sp-4); top: -4rem; z-index: 20;
  background: var(--card); color: var(--coral-ink); padding: var(--sp-3) var(--sp-4);
  border-radius: var(--sp-2); text-decoration: none;
}
.saltar:focus { top: var(--sp-4); }
.solo-lector { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.kicker {
  font-family: var(--fuente); font-size: var(--t-rotulo); font-weight: 600; line-height: 1.4;
  letter-spacing: .17em; text-transform: uppercase; color: var(--coral-ink);
}
.kicker--suave { color: var(--ink-soft); }
.nota { color: var(--ink-soft); font-size: var(--t-nota); line-height: 1.45; }
.nota:empty { display: none; }
.nota--error { color: var(--coral-ink); font-weight: 600; }
.enlace-boton {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--coral-ink); text-decoration: underline; text-underline-offset: 3px; font-weight: 600;
}
.enlace-boton:hover { text-decoration-thickness: 2px; }

/* ---------- Estructura ---------- */
.lienzo { max-width: calc(var(--ancho-columna) + 2 * var(--pad-x)); margin-inline: auto; padding-inline: var(--pad-x); }
/* El logo y, en escritorio, el sol de la marca asomando detrás de la esquina de la tarjeta */
.cabecera { position: relative; display: flex; align-items: center; height: 5.9rem; padding-inline: var(--pad-panel); overflow: clip; }
.logo { height: 4.4rem; width: auto; }                  /* el logo principal no baja de 70 px de alto (brandbook) */
@media (min-width: 40rem) { .logo { height: 3.5rem; } } /* el horizontal, de 56 px en adelante */
.sol { display: none; }

/* La tarjeta: un solo objeto. En el celular los paneles van uno bajo el otro. */
.agenda {
  position: relative;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-tarjeta);
  box-shadow: var(--sombra-tarjeta);
}
.panel { display: flex; flex-direction: column; min-width: 0; padding: 1.35rem var(--pad-panel) 1.3rem; }
.panel + .panel, .reserva { border-top: 1px solid var(--line); }

/* ---------- Panel 1 · la cita ---------- */
h1 {
  margin-top: .55rem;
  font-family: var(--fuente-titulo); font-weight: 500; font-size: 2.15rem; line-height: 1.02; letter-spacing: -.012em;
  overflow-wrap: break-word; min-width: 0;
}
h1 em { font-style: italic; color: var(--coral-ink); }
.datos { margin-top: var(--sp-4); display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; }
.datos li { display: flex; align-items: center; gap: .45rem; font-size: .875rem; }
.datos svg { flex: none; color: var(--coral); }
.datos .dato-doctor { display: none; }   /* en el celular el logo, justo encima, ya lo dice */

.modalidad { margin-top: 1.1rem; padding-top: 1.05rem; border-top: 1px solid var(--line); }
.segmentos { margin-top: .7rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-1); padding: var(--sp-1); background: var(--hueco); border-radius: 14px; }
.segmento {
  appearance: none; display: flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: 2.75rem; padding: .35rem .5rem; border: 0; border-radius: 10px; cursor: pointer;
  background: transparent; color: var(--ink-soft); font-size: var(--t-ui); font-weight: 500; line-height: 1.25;
  transition: background-color var(--dur-micro) var(--curva), color var(--dur-micro) var(--curva), box-shadow var(--dur-micro) var(--curva);
}
.segmento svg { flex: none; }
.segmento:hover { color: var(--ink); }
.segmento[aria-checked="true"] { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: var(--sombra-segmento); }
.segmento[aria-checked="true"] svg { color: var(--coral); }
/* El valor solo va dentro de cada opción cuando no es el mismo en las dos */
.segmento-texto { display: grid; justify-items: start; }
.segmento-precio { font-size: var(--t-nota); font-weight: 500; color: var(--coral-ink); font-variant-numeric: tabular-nums; }
.segmento-precio:empty { display: none; }
.mod-detalle { margin-top: .8rem; display: flex; gap: .55rem; font-size: var(--t-nota); line-height: 1.5; color: var(--ink-soft); }
.mod-detalle svg { flex: none; margin-top: .15rem; color: var(--coral); }
/* Qué pasa al terminar. En el celular solo sale cuando es un aviso (el enlace venció o ya se usó): gana una
   fila de calendario en la primera pantalla, y lo de siempre ya lo dicen la barra y el pie. */
.nota-flujo { display: none; margin-top: var(--sp-4); gap: .55rem; font-size: var(--t-nota); line-height: 1.5; color: var(--ink-soft); }
.nota-flujo svg { flex: none; margin-top: .15rem; color: var(--mint-deep); }
.nota-flujo--aviso { display: flex; color: var(--ink); }
.nota-flujo--aviso svg { color: var(--coral-ink); }

/* ---------- Panel 2 · el calendario ---------- */
.mes-nav { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); margin-bottom: .9rem; }
.mes-titulo { font-family: var(--fuente-titulo); font-weight: 600; font-size: 1.75rem; line-height: 1; letter-spacing: -.005em; min-width: 0; }
.mes-nombre, .mes-anio { display: inline-block; }   /* si no caben juntos (320 px), el año baja entero bajo el mes */
.mes-anio { margin-left: .2rem; font-family: var(--fuente); font-weight: 500; font-size: var(--t-nota); letter-spacing: .08em; color: var(--ink-soft); }
.mes-botones { flex: none; display: flex; gap: .4rem; }
.mes-boton {
  appearance: none; width: 2.75rem; height: 2.75rem; border: 0; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: var(--hueco); color: var(--coral-ink);
  transition: background-color var(--dur-micro) var(--curva), transform var(--dur-micro) var(--curva);
}
.mes-boton:hover:not(:disabled) { background: var(--tinte-hondo); }
.mes-boton:active:not(:disabled) { transform: scale(.94); }
/* Deshabilitado por tres canales, no solo color: sin fondo, tinta apagada y cursor de «no se puede». */
.mes-boton:disabled { background: transparent; color: var(--ink-faint); cursor: not-allowed; }

.semana, .rejilla { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.semana span { padding-block: .45rem .55rem; text-align: center; font-size: var(--t-rotulo); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }

.dia {
  appearance: none; position: relative; display: grid; place-items: center;
  min-height: 2.75rem;       /* 44 px de zona táctil aunque el círculo sea menor */
  height: 3.05rem; padding: 0; border: 0; background: transparent;
  color: var(--ink-faint); cursor: default; font-variant-numeric: tabular-nums;
}
.dia-num {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  width: min(2.6rem, 100% - 2px); aspect-ratio: 1; border-radius: 50%;   /* nunca más ancho que su celda: a 320 px miden 37 */
  font-size: var(--t-ui); font-weight: 500; line-height: 1;
  transition: background-color var(--dur-micro) var(--curva), color var(--dur-micro) var(--curva), box-shadow var(--dur-micro) var(--curva), transform var(--dur-micro) var(--curva);
}
/* El día de otro mes dice de cuál es: «30 nov» en la primera fila de diciembre */
.dia-mes { margin-right: -.1em; font-size: .5rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; line-height: 1; }
.dia--libre { cursor: pointer; color: var(--coral-ink); }
.dia--libre .dia-num { background: var(--tinte); font-weight: 600; }
.dia--libre:hover .dia-num { box-shadow: inset 0 0 0 1.5px var(--coral); }
.dia--libre:active .dia-num { transform: scale(.94); }
.dia--pocas .dia-num::after { content: ""; position: absolute; bottom: .4rem; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--amber-ink); }
.dia--hoy .dia-num { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.dia[aria-pressed="true"] .dia-num { background: var(--coral-ink); color: var(--on-accent); box-shadow: var(--aro); }
.dia[aria-pressed="true"] .dia-num::after { background: var(--on-accent); }

/* Estado de carga: la rejilla con la forma de lo que viene */
.rejilla[aria-busy="true"] .dia-num { background: var(--tinte); color: transparent; animation: respira 1.4s var(--curva) infinite; }
@keyframes respira { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }

.estado { margin-top: var(--sp-4); text-align: center; color: var(--ink-soft); font-size: var(--t-nota); line-height: 1.5; }
.estado:empty { display: none; }
.cal-pie { margin-top: auto; padding-top: .9rem; display: flex; justify-content: space-between; gap: var(--sp-4); font-size: .75rem; color: var(--ink-soft); }
.cal-zona { margin-left: auto; }
.leyenda { display: inline-flex; align-items: center; gap: .45rem; }
.leyenda i { width: 5px; height: 5px; border-radius: 50%; background: var(--amber-ink); }

/* ---------- Panel 3 · las horas ---------- */
.panel-horas { scroll-margin-top: var(--sp-3); }
.horas-titulo { margin-top: .45rem; font-family: var(--fuente-titulo); font-weight: 600; font-size: var(--t-titulo-3); line-height: 1.1; font-variant-numeric: lining-nums; }
.horas-titulo::first-letter { text-transform: uppercase; }
.horas-pista { font-size: .875rem; color: var(--ink-soft); }
.atajo {
  appearance: none; align-self: flex-start; display: inline-flex; align-items: center; gap: var(--sp-2);
  min-height: 2.75rem; margin-top: .9rem; padding: var(--sp-2) .95rem; border: 0; border-radius: var(--r-ficha); cursor: pointer;
  background: var(--tinte); color: var(--coral-ink); font-size: var(--t-nota); font-weight: 600;
  transition: box-shadow var(--dur-micro) var(--curva);
}
.atajo:hover { box-shadow: inset 0 0 0 1.5px var(--coral); }
.atajo-rotulo { font-weight: 400; color: var(--ink-soft); }
/* Sin día escogido: los aros de la marca, la invitación y el atajo al primer día libre */
.panel-horas--vacio { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--sp-4); align-items: center; }
.panel-horas--vacio .horas-aros { grid-row: 1 / span 2; width: 3.5rem; height: 3.5rem; }
.panel-horas--vacio .horas-titulo { margin-top: 0; align-self: end; font-size: 1.4rem; }
.panel-horas--vacio .horas-pista { align-self: start; }
.panel-horas--vacio .atajo, .panel-horas--vacio .horas { grid-column: 1 / -1; justify-self: start; }

.horas-grupo { margin-top: 1.25rem; }
.horas-grupo h3 { display: flex; align-items: center; gap: .7rem; margin-bottom: .6rem; font-size: var(--t-rotulo); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.horas-grupo h3::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.horas-lista, .horas-esqueleto { display: grid; grid-template-columns: repeat(auto-fill, minmax(4.9rem, 1fr)); gap: .45rem; }
.hora {
  appearance: none; display: flex; align-items: baseline; justify-content: center; gap: .22rem;
  min-height: 2.75rem; padding: .65rem .2rem; border: 0; border-radius: var(--r-ficha); cursor: pointer;
  white-space: nowrap;       /* «10:30 a. m.» nunca se parte en dos líneas */
  background: var(--hueco); color: var(--ink); font-variant-numeric: tabular-nums;
  transition: background-color var(--dur-micro) var(--curva), color var(--dur-micro) var(--curva), transform var(--dur-micro) var(--curva);
}
.hora b { font-weight: 600; font-size: var(--t-ui); }
.hora small { font-size: var(--t-rotulo); font-weight: 500; color: var(--ink-soft); }
.hora:hover { background: var(--tinte); }
.hora:active { transform: scale(.96); }
.hora[aria-pressed="true"] { background: var(--coral-ink); color: var(--on-accent); }
.hora[aria-pressed="true"] small { color: var(--on-accent); }
.horas-vacio { margin-top: var(--sp-4); color: var(--ink-soft); font-size: var(--t-ui); line-height: 1.55; }
.horas-esqueleto { margin-top: 1.25rem; }
.horas-esqueleto span { min-height: 2.75rem; border-radius: var(--r-ficha); background: var(--hueco); animation: respira 1.4s var(--curva) infinite; }
/* Las horas entran subiendo un poco. Nunca desde invisibles: si la animación no llega a correr, se leen igual. */
.horas-entra { animation: entra 240ms var(--curva); }
@keyframes entra { from { opacity: .4; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Agendar aquí (con la llave de la conversación) ---------- */
.reserva { display: grid; gap: var(--sp-4); padding: 1.3rem var(--pad-panel); scroll-margin-top: var(--sp-3); }
.reserva-quien { margin-top: .4rem; color: var(--ink-soft); font-size: var(--t-nota); line-height: 1.5; }
.reserva-quien strong { color: var(--ink); font-weight: 600; }
.reserva-campos { display: grid; gap: var(--sp-3); align-content: start; min-width: 0; }
.campo { display: grid; gap: var(--sp-2); align-content: start; min-width: 0; }   /* sin estirarse: dos campos lado a lado miden lo mismo */
.campo label { font-size: var(--t-nota); font-weight: 600; color: var(--ink); }
.campo-ayuda { font-size: var(--t-nota); color: var(--ink-soft); line-height: 1.45; }
.campo-input {
  width: 100%; min-height: 2.75rem; padding: var(--sp-2) var(--sp-3);
  font: inherit; font-size: var(--t0); color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-ficha);
  transition: border-color var(--dur-micro) var(--curva), background-color var(--dur-micro) var(--curva);
}
.campo-input:hover { border-color: var(--nude); }
.campo-input:focus-visible { outline: 2px solid var(--coral-ink); outline-offset: 2px; border-color: var(--coral); background: var(--card); }
.campo-input[aria-invalid="true"] { border-color: var(--coral-ink); background: var(--blush); }
textarea.campo-input { resize: vertical; min-height: 5.5rem; line-height: 1.5; margin-top: var(--sp-2); }
.campo-opcional { min-width: 0; }
.campo-opcional summary {
  display: flex; align-items: center; min-height: 2.75rem; cursor: pointer;
  color: var(--coral-ink); font-size: var(--t-nota); font-weight: 600; text-decoration: underline; text-underline-offset: 3px;
}
.campo-opcional summary:focus-visible { outline: 2px solid var(--coral-ink); outline-offset: 2px; border-radius: 6px; }

/* ---------- La franja · tu cita, como un tiquete que se va llenando ---------- */
/* En el celular es una barra fija de dos líneas y un botón: la tarjeta de antes tapaba el 42 % de la pantalla. */
.franja {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  max-width: var(--ancho-columna); margin-inline: auto;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0 .9rem;
  padding: .8rem var(--sp-4) calc(.8rem + env(safe-area-inset-bottom));
  background: var(--card); border: 1px solid var(--line); border-bottom: 0; border-radius: 20px 20px 0 0;
  box-shadow: var(--sombra-barra);
}
.franja .nota--error { grid-column: 1 / -1; margin-bottom: var(--sp-2); }
.tiquete { display: none; min-width: 0; }
.tiquete dt { margin-bottom: .2rem; font-size: .625rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }
.tiquete dd { font-size: var(--t-ui); font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: break-word; }
.tiquete dd::first-letter { text-transform: uppercase; }
.tiquete dd.sin { font-weight: 400; color: var(--ink-faint); }
.franja-corta { min-width: 0; }
/* El día y la hora van en dos trozos que no se parten por dentro: si no caben en una línea (320 px), la hora baja entera. */
.franja-corta strong { display: flex; flex-wrap: wrap; column-gap: .3em; font-size: var(--t-ui); font-weight: 600; line-height: 1.3; }
.franja-corta strong span { display: inline; font: inherit; color: inherit; line-height: inherit; white-space: nowrap; overflow: visible; }
.franja-corta strong.sin { font-weight: 500; color: var(--ink-soft); }
.franja-corta span { display: block; font-size: .75rem; line-height: 1.4; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.franja-accion { display: grid; justify-items: end; min-width: 0; }
/* En la barra del celular la ayuda no cabe: la dicen las dos líneas de la izquierda (y el lector de pantalla la sigue leyendo). */
.franja-notas { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 3rem; padding: .7rem 1.15rem;
  background: var(--coral-ink); color: var(--on-accent);
  border: 1.5px solid var(--coral-ink); border-radius: var(--r-pastilla);
  font-family: var(--fuente); font-weight: 600; font-size: var(--t-ui); text-decoration: none; text-align: center; cursor: pointer;
  transition: transform var(--dur-corta) var(--curva), box-shadow var(--dur-corta) var(--curva), background-color var(--dur-corta) var(--curva), color var(--dur-corta) var(--curva), border-color var(--dur-corta) var(--curva);
}
.boton svg { flex: none; }
.boton:hover { transform: translateY(-1px); box-shadow: var(--sombra-boton); }
.boton:active { transform: translateY(0); }
/* «Todavía no»: un contorno gris, no el coral lavado (que parecía un botón dañado). */
.boton[aria-disabled="true"] { background: transparent; border-color: var(--line); color: var(--ink-faint); box-shadow: none; transform: none; cursor: not-allowed; }
a.boton[aria-disabled="true"] { pointer-events: none; }
.boton-largo { display: none; }

/* Con campos que escribir, la franja no se queda pegada abajo: el teclado del celular la taparía.
   Va al final de la tarjeta, con el tiquete completo y el botón a todo lo ancho. */
.franja--reserva {
  position: static; max-width: none; grid-template-columns: minmax(0, 1fr); gap: var(--sp-4);
  padding: 1.3rem var(--pad-panel); border: 0; border-top: 1px solid var(--line);
  border-radius: 0 0 calc(var(--r-tarjeta) - 1px) calc(var(--r-tarjeta) - 1px);
  background: var(--franja); box-shadow: none;
}
.franja--reserva .tiquete { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); }
.franja--reserva .franja-corta { display: none; }
.franja--reserva .franja-accion { justify-items: stretch; }
.franja--reserva .franja-notas { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; white-space: normal; display: grid; gap: var(--sp-1); text-align: center; }
.franja--reserva .nota--alterna .enlace-boton { display: inline-flex; align-items: center; min-height: 2.75rem; }

/* ---------- Cita agendada ---------- */
.confirmada {
  max-width: var(--ancho-columna); margin-inline: auto; padding: var(--sp-6) var(--sp-5);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-tarjeta); box-shadow: var(--sombra-tarjeta);
  text-align: center;
}
.confirmada-icono { display: block; margin: 0 auto var(--sp-3); color: var(--mint-deep); }
.confirmada-titulo { font-family: var(--fuente-titulo); font-weight: 600; font-size: var(--t-titulo-2); line-height: 1.08; margin-bottom: var(--sp-5); }
.confirmada-titulo:focus-visible { outline: 2px solid var(--coral-ink); outline-offset: 4px; border-radius: 6px; }
.confirmada-datos { display: grid; gap: var(--sp-3); margin-bottom: var(--sp-5); padding: var(--sp-4) var(--sp-5); text-align: left; background: var(--franja); border-radius: 14px; }
.confirmada-datos > div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-4); }
.confirmada-datos dt { flex: none; font-size: .625rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }
.confirmada-datos dd { min-width: 0; text-align: right; font-size: var(--t-ui); font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: break-word; }
.confirmada-datos dd::first-letter { text-transform: uppercase; }
.confirmada-codigo { margin-bottom: var(--sp-2); font-size: var(--t0); color: var(--ink-soft); }
.confirmada-codigo strong { margin-left: .35rem; color: var(--coral-ink); font-weight: 700; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.confirmada .nota { margin-bottom: var(--sp-5); }
.confirmada .boton { display: flex; max-width: 22rem; margin-inline: auto; }
.pagina--confirmada .agenda { display: none; }

/* ---------- Pie ---------- */
/* El espacio de abajo es el de la barra fija: que nunca tape la última línea. */
.pie { padding: 1.4rem var(--pad-panel) 7rem; color: var(--ink-soft); font-size: .75rem; line-height: 1.6; }
.pie p + p { margin-top: var(--sp-1); }
.pie a { color: var(--coral-ink); text-underline-offset: 3px; }
/* Sin barra fija (agendando con la llave, o con la cita ya agendada) ese espacio sobra. */
.lienzo:has(.franja--reserva) .pie, .lienzo:has(.pagina--confirmada) .pie { padding-bottom: 2.2rem; }
.sin-js { max-width: var(--ancho-columna); margin: 0 auto; padding: var(--sp-5) var(--pad-x); color: var(--ink-soft); }

/* ---------- Escritorio: los tres paneles lado a lado y la franja como pie de la tarjeta ---------- */
/* (El mismo corte que `enColumna` en agenda.js.) */
@media (min-width: 66rem) {
  :root { --pad-panel: 1.75rem; }
  .lienzo { max-width: calc(var(--ancho) + 2 * var(--pad-x)); }
  .cabecera { height: 6.5rem; }
  .sol {
    display: block; position: absolute; right: 3rem; top: 1.15rem; width: 19rem; aspect-ratio: 1;
    background: url("/agenda/anillos.png") center / contain no-repeat; opacity: .85; pointer-events: none;
  }
  .agenda { display: grid; grid-template-columns: clamp(17.5rem, 28vw, 20.5rem) minmax(0, 1fr) clamp(17rem, 27vw, 19.5rem); }
  .panel { padding: 1.9rem var(--pad-panel) 1.6rem; }
  .panel + .panel { border-top: 0; border-left: 1px solid var(--line); }

  h1 { margin-top: .7rem; font-size: var(--t-titulo-1); }
  .datos { margin-top: 1.35rem; display: grid; gap: .55rem; }
  .datos li { gap: .7rem; font-size: var(--t-ui); }
  .datos .dato-doctor { display: flex; }
  .modalidad { margin-top: 1.6rem; padding-top: 1.35rem; }
  .nota-flujo { display: flex; margin-top: auto; padding-top: var(--sp-5); }

  .mes-titulo { font-size: var(--t-titulo-2); }
  .mes-boton { width: 2.5rem; height: 2.5rem; }
  .dia { height: 3.55rem; }
  .dia-num { width: min(2.75rem, 100% - 2px); }

  .panel-horas--vacio { display: flex; align-items: center; justify-content: center; text-align: center; }
  .panel-horas--vacio .horas-aros { width: 5.25rem; height: 5.25rem; margin-bottom: var(--sp-5); }
  .panel-horas--vacio .horas-titulo { align-self: center; font-size: var(--t-titulo-3); }
  .panel-horas--vacio .horas-pista { align-self: center; margin-top: .35rem; }
  .panel-horas--vacio .atajo { align-self: center; margin-top: 1.1rem; }
  .panel-horas--vacio .horas { align-self: stretch; text-align: left; }
  .horas-lista, .horas-esqueleto { gap: .4rem; }

  .reserva { grid-column: 1 / -1; grid-template-columns: clamp(17.5rem, 28vw, 20.5rem) minmax(0, 1fr); gap: 0; padding: 0; }
  .reserva-quien-caja { padding: 1.4rem var(--pad-panel); }
  .reserva-campos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3) var(--sp-4); padding: 1.4rem var(--pad-panel); border-left: 1px solid var(--line); }
  .campo-opcional { grid-column: 1 / -1; }

  .franja, .franja--reserva {
    grid-column: 1 / -1; position: static; max-width: none; margin: 0;
    grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0 var(--sp-5);
    padding: 1rem 1.15rem .85rem var(--pad-panel);
    border: 0; border-top: 1px solid var(--line); border-radius: 0 0 calc(var(--r-tarjeta) - 1px) calc(var(--r-tarjeta) - 1px);
    background: var(--franja); box-shadow: none;
  }
  .tiquete, .franja--reserva .tiquete { display: flex; align-items: flex-start; gap: 2.4rem; }
  .tiquete dd { white-space: nowrap; }
  .franja-corta { display: none; }
  .franja-accion, .franja--reserva .franja-accion { justify-items: end; }
  /* La ayuda va en su propia fila, a todo lo ancho y en una línea: así la franja no cambia de alto según lo que diga. */
  .franja-notas, .franja--reserva .franja-notas {
    grid-column: 1 / -1; position: static; width: auto; height: auto; margin: var(--sp-2) 0 0; overflow: visible; clip: auto; white-space: normal;
    display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: baseline; gap: 0 1.25rem; padding-right: .4rem; text-align: right;
  }
  .franja--reserva .nota--alterna .enlace-boton { min-height: 0; }
  .boton { padding-inline: var(--sp-5); }
  .boton-largo { display: inline; }
  .boton-corto { display: none; }

  .pie { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sp-1) var(--sp-5); padding-bottom: 2.2rem; }
  .pie p + p { margin-top: 0; }
}

/* `hidden` manda sobre los display de arriba (va al final y con más peso, sin !important) */
.segmento[hidden], .mod-detalle[hidden], .kicker[hidden], .leyenda[hidden], .horas-aros[hidden], .horas-pista[hidden],
.panel-horas--vacio .atajo[hidden], .atajo[hidden], .reserva[hidden], .campo[hidden], .boton[hidden], .confirmada .boton[hidden],
.nota--alterna[hidden], .confirmada[hidden] { display: none; }

/* ---------- Quien prefiere menos movimiento ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
