/* ==========================================================================================================
   Academia — «el cuaderno del profesor»
   Papel crema, renglones y cuadrícula azul con el margen rojo, boli azul para la tinta y boli rojo para las faltas,
   gomets de colores para las materias. La base (botones, campos, tarjetas…) es la del kit: aquí van las variables y
   las piezas propias: lista de clase, hoja de horario, recibo de talonario, boletín, notas a mano y el cuaderno de la
   portada.
   ========================================================================================================== */

@font-face { font-family: 'Literata'; src: url('/fuentes/literata.woff2') format('woff2'); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Literata'; src: url('/fuentes/literata-cursiva.woff2') format('woff2'); font-weight: 200 900; font-style: italic; font-display: swap; }
@font-face { font-family: 'Atkinson Next'; src: url('/fuentes/atkinson.woff2') format('woff2'); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Atkinson Mono'; src: url('/fuentes/atkinson-mono.woff2') format('woff2'); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Kalam'; src: url('/fuentes/kalam.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Kalam'; src: url('/fuentes/kalam-negrita.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

/* ── Variables ───────────────────────────────────────────────────────────────────────────────────────────── */
:root {
  --f-texto: 'Atkinson Next', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-titulos: 'Literata', Georgia, 'Times New Roman', serif;
  --f-datos: 'Atkinson Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --f-mano: 'Kalam', 'Segoe Print', 'Bradley Hand', cursive;
  --peso-titulos: 620;
  --tracking-titulos: -0.018em;
  --radio: 9px;
  --radio-l: 14px;

  --fondo: #f6f2e9;
  --superficie: #fffdf8;
  --superficie-2: #f0ebdf;
  --hundido: #e9e2d3;
  --linea: #e3dccd;
  --linea-fuerte: #cbc1ad;
  --texto: #1b2235;
  --texto-2: #4a5266;
  --texto-3: #676d7d;
  --acento: #2247a5;
  --acento-hover: #1a3a8c;
  --acento-suave: #e2e8f7;
  --acento-texto: #1f419b;
  --sobre-acento: #ffffff;
  --ok: #22774a;      --ok-suave: #e1f1e6;
  --atencion: #985600; --atencion-suave: #fbeed6;
  --error: #bf2f1e;   --error-suave: #fbe4df;
  --info: #2a5f9a;    --info-suave: #e3edf8;

  --papel: #fffdf6;
  --boli: #2247a5;
  --boli-rojo: #c8321f;
  --boli-verde: #23794c;
  --renglon-color: rgb(84 132 196 / 0.3);
  --cuadricula: rgb(84 132 196 / 0.14);
  --margen-rojo: rgb(214 66 52 / 0.55);
  --sombra-papel: 0 1px 0 rgb(80 60 20 / 0.05), 0 10px 30px -14px rgb(60 45 15 / 0.28);

  --g-azul: #2f6fd6; --g-rojo: #e0453a; --g-verde: #3d9b54; --g-naranja: #ef8a23; --g-morado: #8456c9;
  --g-amarillo: #f0c02a; --g-turquesa: #1fa39b; --g-rosa: #e2649f; --g-marron: #9a6a42; --g-gris: #8b8f98;
  --tinte: 15%;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-tema='claro']) {
    --fondo: #12151c; --superficie: #191d26; --superficie-2: #20252f; --hundido: #0d1015; --linea: #2a303c; --linea-fuerte: #3f4757;
    --texto: #ebe7dc; --texto-2: #b7b4ab; --texto-3: #8f8d87;
    --acento: #8fa9ff; --acento-hover: #a9bdff; --acento-suave: #1e2846; --acento-texto: #a8bcff; --sobre-acento: #0c1430;
    --ok: #5cc88f; --ok-suave: #15301f; --atencion: #f0b24f; --atencion-suave: #33270f; --error: #ff7f6e; --error-suave: #3b1814; --info: #79b3f0; --info-suave: #142a40;
    --papel: #1a1e27; --boli: #9db4ff; --boli-rojo: #ff7f6e; --boli-verde: #6fd39c;
    --renglon-color: rgb(150 175 230 / 0.17); --cuadricula: rgb(150 175 230 / 0.07); --margen-rojo: rgb(255 118 100 / 0.42);
    --sombra-papel: 0 1px 0 rgb(0 0 0 / 0.3), 0 12px 32px -14px rgb(0 0 0 / 0.7);
    --tinte: 24%;
  }
}
:root[data-tema='oscuro'] {
  --fondo: #12151c; --superficie: #191d26; --superficie-2: #20252f; --hundido: #0d1015; --linea: #2a303c; --linea-fuerte: #3f4757;
  --texto: #ebe7dc; --texto-2: #b7b4ab; --texto-3: #8f8d87;
  --acento: #8fa9ff; --acento-hover: #a9bdff; --acento-suave: #1e2846; --acento-texto: #a8bcff; --sobre-acento: #0c1430;
  --ok: #5cc88f; --ok-suave: #15301f; --atencion: #f0b24f; --atencion-suave: #33270f; --error: #ff7f6e; --error-suave: #3b1814; --info: #79b3f0; --info-suave: #142a40;
  --papel: #1a1e27; --boli: #9db4ff; --boli-rojo: #ff7f6e; --boli-verde: #6fd39c;
  --renglon-color: rgb(150 175 230 / 0.17); --cuadricula: rgb(150 175 230 / 0.07); --margen-rojo: rgb(255 118 100 / 0.42);
  --sombra-papel: 0 1px 0 rgb(0 0 0 / 0.3), 0 12px 32px -14px rgb(0 0 0 / 0.7);
  --tinte: 24%;
}

/* ── Base y estructura ───────────────────────────────────────────────────────────────────────────────────── */
body { font-size: 1.0625rem; }
h1, h2, h3 { font-optical-sizing: auto; }
h1 em, h2 em { font-style: italic; font-weight: 500; }
.mano { font-family: var(--f-mano); font-weight: 400; letter-spacing: 0; }
.tinta-roja { color: var(--boli-rojo); }
.tinta-azul { color: var(--boli); }

.marca { font-family: var(--f-titulos); font-weight: 650; font-size: 1.12rem; }
.marca .marca-sub { font-family: var(--f-mano); font-weight: 400; color: var(--texto-3); font-size: 0.95rem; margin-left: 2px; }
body[data-modo='familia'] .barra [data-cuenta], body[data-modo='familia'] .barra .navegacion { display: none; }
body[data-modo='familia'] .marca img { display: none; }

.cuerpo { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.cuerpo.panel { display: grid; }
.cuerpo.panel > .principal { width: 100%; max-width: 1240px; }
.lateral { background: color-mix(in oklab, var(--fondo) 70%, var(--superficie-2)); }
.lateral .academia-lateral { padding: 2px 10px 14px; margin-bottom: 6px; border-bottom: 1px dashed var(--linea-fuerte); }
.lateral .academia-lateral strong { display: block; font-family: var(--f-titulos); font-size: 1.08rem; line-height: 1.2; letter-spacing: -0.01em; }
.lateral .academia-lateral span { display: block; font-size: var(--t-xs); color: var(--texto-3); margin-top: 3px; }
.lateral .academia-lateral a { display: inline; padding: 0; color: var(--acento-texto); font-size: var(--t-xs); font-weight: 600; }
.lateral a[aria-current='page'] { position: relative; }
.lateral a[aria-current='page']::before { content: ''; position: absolute; left: -12px; top: 7px; bottom: 7px; width: 5px; border-radius: 0 4px 4px 0; background: var(--g, var(--acento)); }
.lateral .pie-lateral { display: grid; gap: 6px; }
.lateral .pie-lateral .boton { justify-content: flex-start; }

/* Pestañas de abajo con el color de su separador */
.pestanas a[aria-current='page'] svg { color: var(--acento); }

/* ── Gomets (pegatinas redondas de colores) ──────────────────────────────────────────────────────────────── */
.gomet {
  --g: var(--g-gris);
  display: inline-block; flex-shrink: 0; width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, rgb(255 255 255 / 0.55) 0 18%, transparent 46%), var(--g);
  box-shadow: 0 1px 1.5px rgb(0 0 0 / 0.22), inset 0 -1px 2px rgb(0 0 0 / 0.12);
  vertical-align: -2px;
}
.gomet.grande { width: 22px; height: 22px; }
.gomet.pequeno { width: 10px; height: 10px; vertical-align: 0; }
[data-c='azul'] { --g: var(--g-azul); } [data-c='rojo'] { --g: var(--g-rojo); } [data-c='verde'] { --g: var(--g-verde); }
[data-c='naranja'] { --g: var(--g-naranja); } [data-c='morado'] { --g: var(--g-morado); } [data-c='amarillo'] { --g: var(--g-amarillo); }
[data-c='turquesa'] { --g: var(--g-turquesa); } [data-c='rosa'] { --g: var(--g-rosa); } [data-c='marron'] { --g: var(--g-marron); } [data-c='gris'] { --g: var(--g-gris); }
.selector-color { display: flex; flex-wrap: wrap; gap: 8px; }
.selector-color label { position: relative; cursor: pointer; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; }
.selector-color input { position: absolute; opacity: 0; pointer-events: none; }
.selector-color .gomet { width: 26px; height: 26px; transition: transform var(--rapido) var(--curva-salto); }
.selector-color input:checked + .gomet { transform: scale(1.18); box-shadow: 0 0 0 3px var(--superficie), 0 0 0 5px var(--g); }
.selector-color input:focus-visible + .gomet { outline: 2px solid var(--acento); outline-offset: 4px; }

/* ── Papel ───────────────────────────────────────────────────────────────────────────────────────────────── */
.papel { background-color: var(--papel); border: 1px solid var(--linea); border-radius: 6px 14px 14px 6px; box-shadow: var(--sombra-papel); position: relative; }
.papel.cuadricula {
  background-image: linear-gradient(var(--cuadricula) 1px, transparent 1px), linear-gradient(90deg, var(--cuadricula) 1px, transparent 1px);
  background-size: 22px 22px; background-position: -1px -1px;
}
.papel.renglones { --renglon: 34px; background-image: linear-gradient(transparent calc(var(--renglon) - 1px), var(--renglon-color) calc(var(--renglon) - 1px)); background-size: 100% var(--renglon); }
.papel.margen::before { content: ''; position: absolute; top: 0; bottom: 0; left: var(--margen, 46px); width: 1.5px; background: var(--margen-rojo); pointer-events: none; }

/* Notas escritas a mano (comentarios del profe, valoración del trimestre) */
.nota-mano {
  --renglon: 30px;
  position: relative; padding: 4px 16px 8px 52px; border-radius: 4px 12px 12px 4px; border: 1px solid var(--linea);
  background-color: var(--papel);
  background-image: linear-gradient(transparent calc(var(--renglon) - 1px), var(--renglon-color) calc(var(--renglon) - 1px));
  background-size: 100% var(--renglon); background-position: 0 4px;
  font-family: var(--f-mano); font-size: 1.14rem; line-height: var(--renglon); color: var(--boli);
}
.nota-mano::before { content: ''; position: absolute; top: 0; bottom: 0; left: 38px; width: 1.5px; background: var(--margen-rojo); }
.nota-mano p { margin: 0; white-space: pre-wrap; }
.nota-mano .firma { display: block; text-align: right; color: var(--texto-2); font-size: 1rem; }
.nota-mano .cuando { position: absolute; left: 6px; top: 8px; width: 28px; text-align: center; font-family: var(--f-datos); font-size: 0.62rem; line-height: 1.15; color: var(--texto-3); }
.nota-mano.privada { color: var(--texto-2); border-style: dashed; }
.notas-mano { display: grid; gap: 12px; }

/* ── Cabecera del día (fecha escrita a mano) ─────────────────────────────────────────────────────────────── */
.dia-cuaderno { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: var(--e-5); }
.dia-cuaderno .fecha-mano { font-family: var(--f-mano); font-size: clamp(1.7rem, 1.2rem + 2vw, 2.4rem); line-height: 1.1; color: var(--boli); margin: 0; font-weight: 400; letter-spacing: 0; }
.dia-cuaderno .fecha-mano::after { content: ''; display: block; height: 3px; width: min(100%, 12ch); margin-top: 2px; background: var(--boli-rojo); border-radius: 3px; transform: rotate(-0.6deg); opacity: 0.85; }
.dia-cuaderno .navegar-dias { display: flex; gap: 6px; align-items: center; }
.ante-mano { font-family: var(--f-mano); color: var(--texto-3); font-size: 1.05rem; }

/* ── Clases del día ──────────────────────────────────────────────────────────────────────────────────────── */
.clases-dia { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.clase-dia {
  --g: var(--g-gris);
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 4px 14px;
  padding: 12px 14px 12px 0; border-radius: 6px 12px 12px 6px; background: var(--superficie); border: 1px solid var(--linea);
  box-shadow: inset 5px 0 0 var(--g); color: inherit; text-decoration: none; transition: transform var(--medio) var(--curva), box-shadow var(--medio);
}
a.clase-dia:hover { transform: translateX(2px); box-shadow: inset 5px 0 0 var(--g), var(--sombra-2); text-decoration: none; }
.clase-dia .hora { text-align: right; font-family: var(--f-datos); font-weight: 650; font-size: 1.02rem; line-height: 1.15; }
.clase-dia .hora small { display: block; font-weight: 400; color: var(--texto-3); font-size: 0.78rem; }
.clase-dia .que strong { display: block; font-weight: 700; line-height: 1.25; }
.clase-dia .que span { display: block; font-size: var(--t-s); color: var(--texto-2); }
.clase-dia .estado-lista { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.clase-dia.cancelada { opacity: 0.72; }
.clase-dia.cancelada .que strong { text-decoration: line-through; text-decoration-color: var(--boli-rojo); text-decoration-thickness: 2px; }
.clase-dia.festiva { background: repeating-linear-gradient(-45deg, var(--superficie), var(--superficie) 8px, var(--superficie-2) 8px, var(--superficie-2) 16px); }
.sello-lista { font-family: var(--f-mano); font-size: 1.05rem; color: var(--boli-verde); white-space: nowrap; }
.sello-lista.pendiente { color: var(--boli-rojo); }
@media (max-width: 520px) {
  .clase-dia { grid-template-columns: 54px minmax(0, 1fr); }
  .clase-dia .estado-lista { grid-column: 2; flex-direction: row; align-items: center; justify-content: flex-start; flex-wrap: wrap; }
}

/* ── La lista de clase (pasar lista) ─────────────────────────────────────────────────────────────────────── */
.hoja-lista { --renglon: 58px; --margen: 50px; padding: 0 0 6px; overflow: hidden; }
.hoja-lista .cabeza-hoja { padding: 16px 18px 12px calc(var(--margen) + 14px); border-bottom: 2px solid var(--renglon-color); }
.hoja-lista .cabeza-hoja h1 { font-size: clamp(1.45rem, 1.1rem + 1.4vw, 2rem); margin: 0; display: flex; align-items: center; gap: 10px; }
.hoja-lista .cabeza-hoja p { margin: 4px 0 0; color: var(--texto-2); font-size: var(--t-s); }
.hoja-lista .leyenda { font-family: var(--f-mano); color: var(--texto-3); font-size: 1rem; padding: 8px 18px 4px calc(var(--margen) + 14px); line-height: 1.35; }
.filas-lista { list-style: none; margin: 0; padding: 0; counter-reset: fila; }
.fila-lista { position: relative; counter-increment: fila; border-bottom: 1px solid var(--renglon-color); }
.fila-lista > button {
  width: 100%; min-height: var(--renglon); display: grid; grid-template-columns: var(--margen) minmax(0, 1fr) 52px; align-items: center;
  padding: 4px 12px 4px 0; border: 0; background: transparent; text-align: left; color: inherit; font: inherit; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.fila-lista > button::before { content: counter(fila); text-align: center; font-family: var(--f-mano); color: var(--texto-3); font-size: 1.05rem; }
.fila-lista > button:hover { background: color-mix(in oklab, var(--acento) 4%, transparent); }
.fila-lista > button:focus-visible { outline: 2px solid var(--acento); outline-offset: -3px; border-radius: 4px; }
.fila-lista .quien { min-width: 0; padding-left: 14px; padding-right: 8px; }
.fila-lista:has(.mas) .quien { padding-right: 48px; }
.fila-lista .quien strong { display: block; font-weight: 650; font-size: 1.06rem; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fila-lista .quien .anota { display: block; font-family: var(--f-mano); font-size: 0.98rem; line-height: 1.25; color: var(--texto-3); min-height: 1.2em; }
.fila-lista[data-estado='falta'] .quien .anota, .fila-lista[data-estado='justificada'] .quien .anota { color: var(--boli-rojo); }
.fila-lista[data-estado='retraso'] .quien .anota { color: var(--atencion); }
.fila-lista[data-estado='falta'] .quien strong { text-decoration: line-through; text-decoration-color: color-mix(in oklab, var(--boli-rojo) 70%, transparent); text-decoration-thickness: 1.5px; }
.fila-lista .avisos-fila { display: inline-flex; gap: 6px; margin-left: 6px; vertical-align: 1px; }
.fila-lista .avisos-fila .etiqueta { font-size: 0.68rem; padding: 0 7px; }
.fila-lista .mas { position: absolute; right: 64px; top: 50%; translate: 0 -50%; }
.casilla-lista { position: relative; justify-self: end; width: 40px; height: 40px; border: 2px solid var(--texto-2); border-radius: 3px; background: var(--papel); }
.casilla-lista svg { position: absolute; inset: -6px; width: calc(100% + 12px); height: calc(100% + 12px); overflow: visible; }
.marca-trazo { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.marca-trazo.azul { stroke: var(--boli); stroke-width: 3; opacity: 0.6; }
.marca-trazo.rojo { stroke: var(--boli-rojo); stroke-width: 3.6; }
.marca-trazo.ambar { stroke: var(--atencion); stroke-width: 3.2; }
.marca-letra { font-family: var(--f-mano); font-weight: 700; font-size: 21px; }
.marca-letra.roja { fill: var(--boli-rojo); }
.marca-letra.ambar { fill: var(--atencion); }
.trazo { stroke-dasharray: 1; stroke-dashoffset: 1; animation: escribir 230ms cubic-bezier(0.55, 0.1, 0.35, 1) forwards; }
.trazo.t2 { animation-delay: 120ms; }
.trazo.quieto, .quieto .trazo { animation: none; stroke-dashoffset: 0; }
.letra-aparece { animation: letra 260ms var(--curva) both; }
.quieto .letra-aparece { animation: none; }
@keyframes escribir { to { stroke-dashoffset: 0; } }
@keyframes letra { from { opacity: 0; clip-path: inset(0 100% 0 0); } to { opacity: 1; clip-path: inset(0 0 0 0); } }
.barra-lista {
  position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 14px; padding: 12px 14px; border-radius: var(--radio-l); background: color-mix(in oklab, var(--superficie) 94%, transparent);
  border: 1px solid var(--linea); box-shadow: var(--sombra-2); backdrop-filter: blur(8px);
}
.con-pestanas .barra-lista { bottom: calc(var(--pestanas-alto) + 8px + env(safe-area-inset-bottom)); }
@media (min-width: 901px) { .con-pestanas .barra-lista { bottom: 12px; } }
.barra-lista .recuento { font-family: var(--f-mano); font-size: 1.12rem; color: var(--texto-2); }
.barra-lista .recuento b { font-family: var(--f-datos); font-weight: 650; color: var(--texto); }
.guardado { font-size: var(--t-xs); color: var(--texto-3); }
.guardado.ok { color: var(--ok); }

/* ── La hoja de horario ──────────────────────────────────────────────────────────────────────────────────── */
.hoja-horario { --hora: 54px; --dias: 6; padding: 10px 12px 14px 0; overflow-x: auto; }
.rejilla-horario { position: relative; display: grid; grid-template-columns: 52px repeat(var(--dias), minmax(108px, 1fr)); min-width: calc(52px + var(--dias) * 112px); }
.rejilla-horario .cab-dia { position: sticky; top: 0; z-index: 2; padding: 6px 6px 8px; text-align: center; font-family: var(--f-titulos); font-weight: 650; font-size: 0.95rem; border-bottom: 2px solid var(--renglon-color); background: var(--papel); }
.rejilla-horario .cab-dia small { display: block; font-family: var(--f-mano); font-weight: 400; color: var(--texto-3); font-size: 0.85rem; }
.rejilla-horario .cab-dia.hoy { color: var(--acento-texto); }
.rejilla-horario .col-horas { position: relative; }
.rejilla-horario .col-horas span { position: absolute; right: 8px; translate: 0 -50%; font-family: var(--f-datos); font-size: 0.72rem; color: var(--texto-3); }
.rejilla-horario .col-dia { position: relative; border-left: 1px solid var(--renglon-color); background-image: linear-gradient(var(--cuadricula) 1px, transparent 1px); background-size: 100% calc(var(--hora) / 2); }
.bloque-clase {
  --g: var(--g-gris);
  position: absolute; left: 3px; right: 3px; overflow: hidden; padding: 4px 7px 4px 9px; border-radius: 3px 8px 8px 3px;
  background: color-mix(in oklab, var(--g) var(--tinte), var(--papel)); border-left: 4px solid var(--g);
  color: var(--texto); text-decoration: none; font-size: 0.8rem; line-height: 1.22;
  box-shadow: 0 1px 0 rgb(0 0 0 / 0.06); transition: transform var(--rapido) var(--curva), box-shadow var(--rapido);
}
.bloque-clase:hover { transform: translateY(-1px); box-shadow: var(--sombra-2); z-index: 3; text-decoration: none; }
.bloque-clase strong { display: block; font-weight: 700; font-size: 0.84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bloque-clase span { display: block; color: var(--texto-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bloque-clase .h { font-family: var(--f-datos); font-size: 0.72rem; color: var(--texto-3); }
.bloque-clase.ajeno { opacity: 0.55; }
.bloque-clase.choca { outline: 2px solid var(--boli-rojo); outline-offset: 1px; }
.circulo-rojo { position: absolute; inset: -9px -7px; pointer-events: none; overflow: visible; z-index: 4; }
.circulo-rojo path { fill: none; stroke: var(--boli-rojo); stroke-width: 2.4; stroke-linecap: round; }
.horario-dias { display: none; }
@media (max-width: 700px) {
  .hoja-horario.con-alternativa { display: none; }
  .horario-dias { display: grid; gap: 14px; }
}
.dia-lista h3 { font-family: var(--f-mano); font-weight: 400; font-size: 1.35rem; color: var(--boli); margin: 0 0 6px; }
.dia-lista .vacio-dia { font-family: var(--f-mano); color: var(--texto-3); }
.choques { display: grid; gap: 8px; }
.choque-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: var(--radio); border: 1.5px dashed var(--boli-rojo); background: var(--error-suave); font-size: var(--t-s); }
.choque-item svg { color: var(--boli-rojo); margin-top: 1px; }
.choque-item b { font-family: var(--f-mano); font-weight: 700; color: var(--boli-rojo); font-size: 1.05rem; }

/* Tramos del formulario de grupo */
.tramos { display: grid; gap: 8px; }
.tramo { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) 40px; gap: 8px; align-items: end; }
.tramo select, .tramo input { width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid var(--linea-fuerte); border-radius: var(--radio); background: var(--superficie); font-size: 16px; }
.dias-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dias-chips label { position: relative; }
.dias-chips input { position: absolute; opacity: 0; pointer-events: none; }
.dias-chips span { display: inline-grid; place-items: center; min-width: 44px; height: 40px; padding: 0 10px; border-radius: 99px; border: 1.5px solid var(--linea-fuerte); font-weight: 650; font-size: var(--t-s); cursor: pointer; background: var(--superficie); }
.dias-chips input:checked + span { background: var(--acento); color: var(--sobre-acento); border-color: var(--acento); }
.dias-chips input:focus-visible + span { box-shadow: var(--foco); }

/* ── Fichas y listas del panel ───────────────────────────────────────────────────────────────────────────── */
.gomets { display: inline-flex; gap: 3px; align-items: center; }
.fila-alumno .gomets { margin-left: auto; }
.cifras-mes { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); }
.cifras-mes .tarjeta { padding: 14px 16px; }
.cifra .valor { font-family: var(--f-datos); }
.cifra .nota-cifra { font-size: var(--t-xs); color: var(--texto-3); }
.ocupacion { display: grid; gap: 10px; }
.ocupacion .fila-ocupacion { display: grid; grid-template-columns: minmax(0, 1fr) 70px; gap: 4px 12px; align-items: center; font-size: var(--t-s); }
.ocupacion .fila-ocupacion .progreso { grid-column: 1 / -1; height: 7px; }
.ocupacion .progreso > span { background: var(--g, var(--acento)); }
.pasos-inicio { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: paso; }
.pasos-inicio li { counter-increment: paso; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--radio-l); background: var(--superficie); border: 1px solid var(--linea); }
.pasos-inicio li::before { content: counter(paso); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 6px; border: 2px solid var(--texto-2); font-family: var(--f-mano); font-size: 1.25rem; }
.pasos-inicio li.hecho::before { content: '✓'; color: var(--boli-verde); border-color: var(--boli-verde); }
.pasos-inicio li.hecho strong { text-decoration: line-through; text-decoration-color: var(--boli-verde); }
.pasos-inicio li p { margin: 2px 0 0; font-size: var(--t-s); color: var(--texto-2); }
@media (max-width: 520px) { .pasos-inicio li { grid-template-columns: 40px minmax(0, 1fr); } .pasos-inicio li > :last-child { grid-column: 2; justify-self: start; } }

.cuadernos { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.tapa {
  --c: #2247a5;
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 190px; padding: 22px 20px 18px 34px;
  border-radius: 6px 14px 14px 6px; color: #fff; text-decoration: none; background: var(--c);
  background-image: radial-gradient(circle at 1px 1px, rgb(255 255 255 / 0.08) 1px, transparent 1.5px); background-size: 6px 6px;
  box-shadow: inset 14px 0 0 rgb(0 0 0 / 0.18), 0 14px 28px -16px rgb(0 0 0 / 0.55); transition: transform var(--medio) var(--curva);
}
.tapa:hover { transform: translateY(-3px) rotate(-0.4deg); text-decoration: none; }
.tapa.verde { --c: #23794c; } .tapa.granate { --c: #8f2a2a; } .tapa.morada { --c: #5b3f9c; } .tapa.negra { --c: #263042; }
.tapa .etiqueta-tapa { align-self: flex-start; max-width: 100%; padding: 8px 12px 6px; border-radius: 4px; background: #fffdf6; color: #1b2235; box-shadow: 0 1px 2px rgb(0 0 0 / 0.25); transform: rotate(-1deg); }
.tapa .etiqueta-tapa strong { display: block; font-family: var(--f-titulos); font-size: 1.2rem; line-height: 1.15; }
.tapa .etiqueta-tapa span { display: block; font-family: var(--f-mano); color: #4a5266; font-size: 0.98rem; }
.tapa .datos-tapa { font-size: var(--t-s); opacity: 0.92; }
.tapa.nueva { --c: transparent; color: var(--texto-2); border: 2px dashed var(--linea-fuerte); box-shadow: none; background-image: none; align-items: center; justify-content: center; text-align: center; padding: 22px; }
.tapa.nueva svg { width: 30px; height: 30px; }

/* ── Recibo de talonario ─────────────────────────────────────────────────────────────────────────────────── */
.talonario { display: grid; grid-template-columns: 170px minmax(0, 1fr); max-width: 820px; margin-inline: auto; background: var(--papel); border: 1px solid var(--linea-fuerte); border-radius: 4px; box-shadow: var(--sombra-papel); color: var(--texto); font-size: 0.98rem; }
.talonario .matriz { padding: 18px 16px; border-right: 2px dashed var(--linea-fuerte); position: relative; font-size: var(--t-s); }
.talonario .matriz::after { content: ''; position: absolute; top: 0; bottom: 0; right: -7px; width: 12px; background: radial-gradient(circle at 6px 8px, var(--fondo) 3.5px, transparent 4px) 0 0 / 12px 16px repeat-y; }
.talonario .matriz dl { margin: 0; display: grid; gap: 8px; }
.talonario .matriz dt { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--texto-3); }
.talonario .matriz dd { margin: 0; font-family: var(--f-mano); font-size: 1.05rem; color: var(--boli); }
.talonario .cuerpo-recibo { padding: 20px 24px 22px; position: relative; }
.talonario .cabeza-recibo { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.talonario .cabeza-recibo h1 { font-size: 1.6rem; margin: 0; letter-spacing: 0.08em; text-transform: uppercase; }
.talonario .cabeza-recibo .num { font-family: var(--f-datos); font-size: 0.95rem; color: var(--texto-2); text-align: right; }
.talonario .renglon-recibo { display: flex; align-items: baseline; gap: 10px; margin: 10px 0; }
.talonario .renglon-recibo .rotulo { white-space: nowrap; color: var(--texto-2); font-size: 0.92rem; }
.talonario .renglon-recibo .escrito { flex: 1; min-width: 0; border-bottom: 1px dotted var(--texto-3); font-family: var(--f-mano); font-size: 1.18rem; color: var(--boli); line-height: 1.35; padding: 0 4px; }
.talonario .lineas-recibo { width: 100%; margin: 8px 0 4px; font-size: 0.9rem; }
.talonario .lineas-recibo td { padding: 3px 0; border-bottom: 1px solid var(--linea); }
.talonario .lineas-recibo td.num { text-align: right; font-family: var(--f-datos); white-space: nowrap; padding-left: 12px; }
.talonario .total-recibo { display: inline-block; margin-top: 10px; padding: 6px 14px; border: 2px solid var(--texto); font-family: var(--f-datos); font-weight: 700; font-size: 1.25rem; }
.talonario .pie-recibo { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-top: 18px; flex-wrap: wrap; }
.talonario .firma-recibo { text-align: center; min-width: 180px; }
.talonario .firma-recibo .firma { font-family: var(--f-mano); font-size: 1.5rem; color: var(--boli); transform: rotate(-3deg); display: inline-block; }
.talonario .firma-recibo small { display: block; border-top: 1px solid var(--texto-3); padding-top: 3px; color: var(--texto-3); }
.sello {
  position: absolute; right: 26px; top: 64px; padding: 4px 14px; border: 3px solid var(--boli-rojo); border-radius: 8px; color: var(--boli-rojo);
  font-family: var(--f-titulos); font-weight: 800; font-size: 1.5rem; letter-spacing: 0.14em; text-transform: uppercase; transform: rotate(-9deg); opacity: 0.85;
  mask-image: radial-gradient(circle at 30% 40%, #000 60%, rgb(0 0 0 / 0.75) 61%, #000 75%);
}
.sello small { display: block; font-family: var(--f-datos); font-size: 0.62rem; letter-spacing: 0.05em; text-align: center; font-weight: 600; }
.sello.pendiente { color: var(--atencion); border-color: var(--atencion); }
@media (max-width: 640px) {
  .talonario { grid-template-columns: minmax(0, 1fr); }
  .talonario .matriz { border-right: 0; border-bottom: 2px dashed var(--linea-fuerte); }
  .talonario .matriz::after { display: none; }
  .talonario .matriz dl { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sello { top: 12px; right: 12px; font-size: 1.1rem; }
}

/* ── Boletín (informe trimestral) ────────────────────────────────────────────────────────────────────────── */
.boletin { max-width: 820px; margin-inline: auto; padding: 28px clamp(18px, 4vw, 40px) 30px; }
.boletin .cabeza-boletin { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-bottom: 3px double var(--texto-2); padding-bottom: 12px; margin-bottom: 18px; }
.boletin .cabeza-boletin h1 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); margin: 0; }
.boletin .cabeza-boletin .quien { font-family: var(--f-mano); font-size: 1.35rem; color: var(--boli); }
.boletin h2 { font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.08em; margin: 22px 0 10px; color: var(--texto-2); font-family: var(--f-texto); font-weight: 700; }
.boletin table { width: 100%; font-size: 0.95rem; }
.boletin td, .boletin th { padding: 6px 8px; border-bottom: 1px solid var(--linea); text-align: left; }
.boletin td.nota { font-family: var(--f-mano); font-size: 1.2rem; color: var(--boli-rojo); text-align: center; }
.casillas-asistencia { display: flex; flex-wrap: wrap; gap: 3px; }
.casillas-asistencia .c { width: 18px; height: 18px; border: 1.5px solid var(--texto-3); border-radius: 2px; position: relative; }
.casillas-asistencia .c svg { position: absolute; inset: -3px; width: 22px; height: 22px; overflow: visible; }
.objetivos-boletin { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.objetivos-boletin li { display: flex; gap: 10px; align-items: baseline; }
.objetivos-boletin li::before { content: ''; flex-shrink: 0; width: 16px; height: 16px; border: 1.5px solid var(--texto-2); border-radius: 2px; translate: 0 3px; }
.objetivos-boletin li.ok::before { content: '✓'; display: grid; place-items: center; color: var(--boli-verde); font-weight: 800; font-size: 0.85rem; line-height: 1; }

/* Tarjeta con el QR para la familia (recortable) */
.recortable { max-width: 420px; margin: 0 auto; padding: 22px 22px 18px; border: 2px dashed var(--texto-3); border-radius: 10px; background: var(--papel); text-align: center; position: relative; }
.recortable .tijeras { position: absolute; top: -13px; left: 18px; background: var(--fondo); padding: 0 6px; color: var(--texto-3); }
.recortable h2 { font-size: 1.35rem; margin: 2px 0 2px; }
.recortable .para { font-family: var(--f-mano); font-size: 1.25rem; color: var(--boli); }
.recortable .qr { margin: 14px auto 10px; }
.recortable .url { font-family: var(--f-datos); font-size: 0.72rem; color: var(--texto-2); word-break: break-all; }
.recortable p { font-size: 0.95rem; margin: 8px 0 0; }

/* ── Portal de la familia ────────────────────────────────────────────────────────────────────────────────── */
.portal { font-size: 1.125rem; display: grid; gap: clamp(18px, 3vw, 28px); }
.portal h2 { font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.6rem); margin-bottom: 12px; }
.portal .saludo h1 { font-size: clamp(1.9rem, 1.4rem + 2.4vw, 2.8rem); margin: 4px 0 6px; }
.portal .saludo p { color: var(--texto-2); margin: 0; font-size: 1.15rem; }
.proxima { display: grid; gap: 14px; padding: clamp(18px, 3vw, 26px); border-radius: var(--radio-xl); background: var(--superficie); border: 1px solid var(--linea); box-shadow: inset 6px 0 0 var(--g, var(--acento)), var(--sombra-1); }
.proxima .cuando { font-family: var(--f-mano); font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.1rem); color: var(--boli); line-height: 1.15; }
.proxima .que { font-size: 1.2rem; font-weight: 700; }
.proxima .donde { color: var(--texto-2); }
.lista-proximas { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lista-proximas li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 12px; padding: 12px 14px; border-radius: var(--radio-l); background: var(--superficie); border: 1px solid var(--linea); box-shadow: inset 4px 0 0 var(--g, var(--linea-fuerte)); }
.lista-proximas li strong { display: block; }
.lista-proximas li span { display: block; color: var(--texto-2); font-size: 1rem; }
.lista-proximas li.no-hay strong { text-decoration: line-through; text-decoration-color: var(--boli-rojo); }
.aviso-academia { padding: 14px 16px 14px 18px; border-radius: 4px 14px 14px 4px; background: var(--atencion-suave); border: 1px solid color-mix(in oklab, var(--atencion) 30%, transparent); box-shadow: inset 4px 0 0 var(--atencion); }
.aviso-academia p { margin: 0; white-space: pre-wrap; }
.aviso-academia small { display: block; margin-top: 6px; color: var(--texto-2); font-size: 0.9rem; }
.chincheta { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff8 0 20%, transparent 45%), var(--g-rojo); box-shadow: 0 2px 2px rgb(0 0 0 / 0.25); margin-right: 8px; vertical-align: 0; }
.resumen-asistencia { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: baseline; margin-bottom: 12px; }
.resumen-asistencia .grande { font-family: var(--f-datos); font-size: 2.2rem; font-weight: 650; letter-spacing: -0.03em; }
.horario-familia { display: grid; gap: 8px; }
.horario-familia .dia-familia { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--linea); }
.horario-familia .dia-familia b { font-family: var(--f-mano); font-weight: 400; font-size: 1.25rem; color: var(--boli); }
.recibos-familia { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.recibos-familia li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 14px; border-radius: var(--radio-l); background: var(--superficie); border: 1px solid var(--linea); }
.recibos-familia li .crece strong { display: block; }
.recibos-familia li .crece span { color: var(--texto-2); font-size: 0.98rem; }
.importe { font-family: var(--f-datos); font-weight: 650; white-space: nowrap; }

/* ── Portada ─────────────────────────────────────────────────────────────────────────────────────────────── */
body[data-modo='publico'] .principal { padding-top: clamp(16px, 3vw, 36px); }
.portada { display: grid; gap: clamp(48px, 8vw, 96px); }
.hero { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (max-width: 960px) { .hero { grid-template-columns: minmax(0, 1fr); } }
.hero h1 { font-size: clamp(2.3rem, 1.5rem + 3.6vw, 4.1rem); line-height: 1.04; letter-spacing: -0.03em; margin-bottom: 18px; }
.hero h1 .subrayado { position: relative; white-space: nowrap; }
.hero h1 .subrayado svg { position: absolute; left: -2%; bottom: -0.12em; width: 104%; height: 0.32em; overflow: visible; }
.hero h1 .subrayado path { fill: none; stroke: var(--boli-rojo); stroke-width: 4; stroke-linecap: round; }
.hero .entradilla { font-size: clamp(1.1rem, 1rem + 0.4vw, 1.28rem); }
.hero .acciones-hero { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hero .apunte { margin-top: 18px; font-family: var(--f-mano); color: var(--texto-3); font-size: 1.08rem; }

/* El cuaderno de la portada: espiral, separadores de colores y la página que se toca */
.cuaderno { position: relative; padding-left: 26px; }
.cuaderno .espiral { position: absolute; left: 0; top: 18px; bottom: 18px; width: 40px; z-index: 3; pointer-events: none;
  background: radial-gradient(ellipse 15px 6px at 20px 50%, transparent 54%, #9aa1ad 58%, #d9dde4 70%, #8c93a0 78%, transparent 82%) 0 0 / 40px 26px repeat-y; }
.cuaderno .hoja-demo { position: relative; min-height: 470px; padding: 18px 18px 18px 40px; border-radius: 4px 16px 16px 4px; overflow: hidden; }
.cuaderno .hoja-demo::after { content: ''; position: absolute; left: 6px; top: 18px; bottom: 18px; width: 14px; background: radial-gradient(circle, var(--fondo) 4.5px, transparent 5px) 0 4px / 14px 26px repeat-y; }
.separadores { position: absolute; right: -14px; top: 30px; display: flex; flex-direction: column; gap: 6px; z-index: 2; }
.separadores button {
  writing-mode: vertical-rl; transform: rotate(180deg); padding: 12px 7px; border: 0; border-radius: 0 8px 8px 0; min-height: 84px; min-width: 32px;
  background: var(--g); color: #fff; font-weight: 700; font-size: 0.78rem; letter-spacing: 0.04em; cursor: pointer;
  box-shadow: -2px 0 0 rgb(0 0 0 / 0.08) inset; transition: translate var(--medio) var(--curva), filter var(--rapido);
  text-shadow: 0 1px 1px rgb(0 0 0 / 0.25);
}
.separadores button[aria-pressed='true'] { translate: 6px 0; filter: saturate(1.15); }
.separadores button:hover { filter: brightness(1.06); }
.separadores button:focus-visible { outline: 2px solid var(--texto); outline-offset: 2px; }
@media (max-width: 640px) {
  .cuaderno { padding-left: 16px; }
  .cuaderno .espiral { width: 28px; background-size: 28px 22px; background-image: radial-gradient(ellipse 11px 5px at 14px 50%, transparent 54%, #9aa1ad 58%, #d9dde4 70%, #8c93a0 78%, transparent 82%); }
  .cuaderno .hoja-demo { padding: 14px 12px 14px 26px; min-height: 0; }
  .cuaderno .hoja-demo::after { left: 2px; background-size: 12px 22px; }
  .separadores { position: static; flex-direction: row; flex-wrap: wrap; margin: 0 0 10px; }
  .separadores button { writing-mode: horizontal-tb; transform: none; min-height: 36px; padding: 6px 12px; border-radius: 8px 8px 0 0; }
  .separadores button[aria-pressed='true'] { translate: 0 3px; }
}
.quien-demo { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.demo-cabeza { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.demo-cabeza h3 { margin: 0; font-size: 1.25rem; }
.demo-cabeza .mano { color: var(--texto-3); font-size: 1rem; }
.demo-lista .fila-lista > button { grid-template-columns: 36px minmax(0, 1fr) 48px; }
.demo-lista { --renglon: 50px; --margen: 36px; }
.demo-lista .casilla-lista { width: 34px; height: 34px; }
.mini-horario { display: grid; grid-template-columns: 38px repeat(5, minmax(0, 1fr)); gap: 0; font-size: 0.72rem; }
.mini-horario .cab { text-align: center; font-family: var(--f-mano); font-size: 0.95rem; color: var(--texto-2); padding-bottom: 4px; border-bottom: 2px solid var(--renglon-color); }
.mini-horario .hora { font-family: var(--f-datos); color: var(--texto-3); font-size: 0.68rem; padding-top: 2px; }
.mini-horario .celda { min-height: 38px; border-left: 1px solid var(--renglon-color); border-bottom: 1px solid var(--cuadricula); padding: 2px; position: relative; }
.mini-horario .b { --g: var(--g-gris); height: 100%; padding: 3px 4px 3px 6px; border-left: 3px solid var(--g); border-radius: 2px 6px 6px 2px; background: color-mix(in oklab, var(--g) var(--tinte), var(--papel)); line-height: 1.15; overflow: hidden; }
.mini-horario .b strong { display: block; font-size: 0.72rem; }
.mini-horario .b span { color: var(--texto-2); font-size: 0.66rem; }
.mini-horario .b.choca { outline: 2px solid var(--boli-rojo); outline-offset: 1px; }
.nota-choque { margin-top: 10px; font-family: var(--f-mano); color: var(--boli-rojo); font-size: 1.05rem; }
.movil-familia { max-width: 330px; margin: 0 auto; padding: 12px; border-radius: 30px; background: #1d2330; box-shadow: 0 20px 40px -20px rgb(0 0 0 / 0.5); }
.movil-familia .pantalla { border-radius: 20px; overflow: hidden; background: var(--fondo); padding: 16px 14px; display: grid; gap: 10px; font-size: 0.92rem; }
.movil-familia .pantalla h4 { font-family: var(--f-titulos); font-size: 1.25rem; margin: 0; }
.movil-familia .pantalla .proxima { padding: 12px; gap: 6px; border-radius: 14px; }
.movil-familia .pantalla .proxima .cuando { font-size: 1.3rem; }
.movil-familia .pantalla .nota-mano { font-size: 1rem; --renglon: 26px; padding-left: 40px; }
.movil-familia .pantalla .nota-mano::before { left: 30px; }
.cobros-demo { list-style: none; margin: 0; padding: 0; }
.cobros-demo li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 10px 2px; border-bottom: 1px solid var(--renglon-color); }
.cobros-demo li .mano { font-size: 1.05rem; }
.cobros-demo .pagado { color: var(--boli-verde); }
.cobros-demo .debe { color: var(--boli-rojo); }

.franja { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
@media (max-width: 860px) { .franja { grid-template-columns: minmax(0, 1fr); } }
.franja h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); }
.franja .prosa p { font-size: 1.08rem; }
.lista-mano { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lista-mano li { display: flex; gap: 10px; align-items: baseline; }
.lista-mano li::before { content: '—'; color: var(--boli-rojo); font-weight: 700; }
.cierre { text-align: center; padding: clamp(28px, 5vw, 48px) 20px; }
.cierre h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); }
.cierre p { color: var(--texto-2); max-width: 52ch; margin-inline: auto; }

/* ── Asistente de inicio ─────────────────────────────────────────────────────────────────────────────────── */
.asistente { max-width: 720px; margin-inline: auto; }
.asistente .hoja-paso { padding: clamp(20px, 4vw, 34px); }
.elegir-tipo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 560px) { .elegir-tipo { grid-template-columns: minmax(0, 1fr); } }
.elegir-tipo label { position: relative; display: grid; gap: 6px; padding: 18px; border-radius: var(--radio-l); border: 2px solid var(--linea-fuerte); background: var(--superficie); cursor: pointer; transition: border-color var(--rapido), box-shadow var(--rapido); }
.elegir-tipo input { position: absolute; opacity: 0; pointer-events: none; }
.elegir-tipo label:has(input:checked) { border-color: var(--acento); box-shadow: 0 0 0 3px color-mix(in oklab, var(--acento) 25%, transparent); }
.elegir-tipo label:has(input:focus-visible) { outline: 2px solid var(--acento); outline-offset: 2px; }
.elegir-tipo strong { font-family: var(--f-titulos); font-size: 1.2rem; }
.elegir-tipo span { color: var(--texto-2); font-size: var(--t-s); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 8px 6px 12px; border-radius: 99px; border: 1px solid var(--linea-fuerte); background: var(--superficie); font-size: var(--t-s); font-weight: 600; }
.chip button { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--superficie-2); color: var(--texto-2); }
.chip button svg { width: 14px; height: 14px; }
.chip.sugerencia { border-style: dashed; color: var(--texto-2); cursor: pointer; padding-right: 12px; }
.chip.sugerencia:hover { background: var(--superficie-2); }

/* ── Varios ──────────────────────────────────────────────────────────────────────────────────────────────── */
.barra-herramientas { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: var(--e-4); }
.barra-herramientas .crece { flex: 1 1 220px; }
.etiqueta.roja { background: var(--error-suave); color: var(--boli-rojo); border-color: transparent; }
.contacto-fila { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.ficha-datos { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 0; font-size: var(--t-s); }
.ficha-datos dt { color: var(--texto-3); font-weight: 600; }
.ficha-datos dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.necesidades { padding: 10px 14px; border-radius: var(--radio); background: var(--atencion-suave); border: 1px solid color-mix(in oklab, var(--atencion) 28%, transparent); font-size: var(--t-s); white-space: pre-wrap; }
.solo-impresion { display: none; }
.boton.oculto { display: none !important; }
.nota-mano .cuando { white-space: pre-line; }
.vista-impresion .no-imprimir { margin-bottom: var(--e-4); }
.texto-largo { white-space: pre-wrap; }
.lista .elemento.apagado { opacity: 0.6; }
.menos { font-size: var(--t-s); color: var(--texto-3); }
dialog.dialogo .cuerpo-dialogo .lista { margin-bottom: 8px; }

@media print {
  body { font-size: 10.5pt; }
  .principal, .cuerpo.panel > .principal { max-width: none; padding: 0 !important; }
  .papel, .talonario, .nota-mano { box-shadow: none !important; }
  .talonario { break-inside: avoid; border-color: #888; }
  .talonario .matriz::after { display: none; }
  .solo-impresion { display: block; }
  .recortable { border-color: #666; }
  .boletin { padding: 0; }
  .sello { opacity: 1; }
  .portal .no-imprimir { display: none !important; }
}
