/* Estudio de novelas v3 · sigue el tema de Telegram (claro u oscuro) con las variables --tg-theme-*.
   Escala: letra 13 / 15 / 17 / 22 (11 solo en pestañas y globos) · botones 48 / 40 / 32 px · radios 12 (tarjeta), 10 (botón), 999 (chip).
   Marco fijo: solo las pestañas (52 px). El botón principal es el nativo de Telegram; #pie-accion es su respaldo. */
:root {
  --fondo: var(--tg-theme-secondary-bg-color, #151e27);
  --tarjeta: var(--tg-theme-section-bg-color, var(--tg-theme-bg-color, #1d2733));
  --texto: var(--tg-theme-text-color, #ffffff);
  --suave: var(--tg-theme-subtitle-text-color, var(--tg-theme-hint-color, #8a96a3));
  --tenue: var(--tg-theme-hint-color, #7d8b99);
  --acento: var(--tg-theme-button-color, #50a8eb);
  --sobre-acento: var(--tg-theme-button-text-color, #ffffff);
  --enlace: var(--tg-theme-link-color, #64b5ef);
  --seccion: var(--tg-theme-section-header-text-color, var(--tg-theme-hint-color, #8a96a3));
  --rojo: var(--tg-theme-destructive-text-color, #ee686f);
  --pie-fondo: var(--tg-theme-bottom-bar-bg-color, var(--tg-theme-secondary-bg-color, #151e27));
  --verde: #3ecf8e;
  --amarillo: #f5b83d;
  --violeta: #b7a6ff;
  /* derivados: velos del color del texto o del acento (valen en claro y en oscuro) */
  --borde: rgba(127, 127, 127, .28);
  --campo: rgba(127, 127, 127, .12);
  --velo: rgba(127, 127, 127, .16);
  --tinte: rgba(80, 168, 235, .16);
  --t1: 13px; --t2: 15px; --t3: 17px; --t4: 22px;
  --r-tarjeta: 12px; --r-boton: 10px;
  --seguro: var(--tg-safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
  --pestanas: 52px;
  --pie: calc(var(--pestanas) + var(--seguro));
  --accion: 0px;                 /* alto del respaldo del botón principal cuando se ve */
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  :root {
    --borde: color-mix(in srgb, var(--texto) 14%, transparent);
    --campo: color-mix(in srgb, var(--texto) 6%, transparent);
    --velo: color-mix(in srgb, var(--texto) 9%, transparent);
    --tinte: color-mix(in srgb, var(--acento) 15%, transparent);
  }
}
/* fuera de Telegram (o sin tema) con el sistema en claro */
@media (prefers-color-scheme: light) {
  :root:not([data-tema]) {
    --fondo: var(--tg-theme-secondary-bg-color, #f0f0f3);
    --tarjeta: var(--tg-theme-section-bg-color, var(--tg-theme-bg-color, #ffffff));
    --texto: var(--tg-theme-text-color, #1c1c1e);
    --suave: var(--tg-theme-subtitle-text-color, #6d7278);
    --tenue: var(--tg-theme-hint-color, #8e8e93);
    --enlace: var(--tg-theme-link-color, #2678b6);
    --seccion: var(--tg-theme-section-header-text-color, #6d7278);
    --rojo: var(--tg-theme-destructive-text-color, #cc2929);
    --pie-fondo: var(--tg-theme-bottom-bar-bg-color, #ffffff);
    --verde: #14804a; --amarillo: #a15c00; --violeta: #6b4fd8;
  }
}
:root[data-tema="light"] { --verde: #14804a; --amarillo: #a15c00; --violeta: #6b4fd8; }
:root[data-tema="light"]:not([data-tg]) {
  --fondo: #f0f0f3; --tarjeta: #ffffff; --texto: #1c1c1e; --suave: #6d7278; --tenue: #8e8e93; --enlace: #2678b6;
  --seccion: #6d7278; --rojo: #cc2929; --pie-fondo: #ffffff;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--fondo); color: var(--texto);
  font: var(--t2)/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", Roboto, system-ui, sans-serif; }
body { min-height: 100vh; overscroll-behavior-y: none; max-width: 480px; margin: 0 auto; }
svg.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; }
svg.ico.lleno { fill: currentColor; stroke: none; }

/* ---------- franja de arriba (va con el contenido): lo pendiente y el latido ---------- */
#franja { display: flex; align-items: center; gap: 8px; min-height: 30px; padding: 6px 16px 0; }
#latido { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--tenue); font-size: 12px;
  font-variant-numeric: tabular-nums; white-space: nowrap; }
#latido i { width: 7px; height: 7px; border-radius: 50%; background: var(--tenue); opacity: .45; transition: background .3s, opacity .3s; }
#latido.vivo i { background: var(--verde); opacity: 1; }
#latido.pulso i { animation: pulso .9s ease-out; }
#latido.caido { color: var(--rojo); }
#latido.caido i { background: var(--rojo); opacity: 1; }
@keyframes pulso { 0% { box-shadow: 0 0 0 0 var(--verde); } 100% { box-shadow: 0 0 0 7px transparent; } }
#pendiente { height: 28px; padding: 0 4px 0 10px; gap: 6px; border-radius: 999px; background: var(--velo); color: var(--amarillo);
  font-size: var(--t1); position: relative; }
#pendiente::after, #atras::after { content: ""; position: absolute; inset: -8px 0; }
#pendiente i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
#pendiente.mal { color: var(--rojo); }
#pendiente svg.ico { width: 16px; height: 16px; }
#atras { height: 28px; padding: 0 8px 0 0; gap: 2px; position: relative; font-size: var(--t2); }

main { padding: 6px 16px calc(var(--pie) + var(--accion) + 20px); }
/* nada se sale a lo ancho: si algo desborda, la página se haría más ancha y las barras fijas quedarían fuera de la pantalla */
html { overflow-x: hidden; }
main { overflow-x: clip; }

body.sin-pestanas { --pie: var(--seguro); }
h2 { font-size: var(--t1); text-transform: uppercase; letter-spacing: .04em; color: var(--seccion); margin: 16px 4px 6px;
  font-weight: 600; display: flex; align-items: baseline; gap: 8px; }
h2:first-child { margin-top: 6px; }
h2 .extra { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--tenue); }
.cabeza { margin: 2px 4px 10px; }
.cabeza b { display: block; font-size: var(--t3); line-height: 1.25; }
.hueso { background: var(--velo); border-radius: var(--r-tarjeta); margin-bottom: 10px; animation: respira 1.2s ease-in-out infinite alternate; }
@keyframes respira { from { opacity: .45; } to { opacity: 1; } }

/* ---------- tarjetas y textos ---------- */
.tarjeta { background: var(--tarjeta); border-radius: var(--r-tarjeta); padding: 12px; margin-bottom: 8px; }
.tarjeta.toca { box-shadow: inset 3px 0 0 var(--amarillo); }
.tarjeta.mal { box-shadow: inset 3px 0 0 var(--rojo); }
.tarjeta.pulsable, .renglon.pulsable { cursor: pointer; }
.tarjeta.pulsable:active, .renglon.pulsable:active { background-image: linear-gradient(var(--velo), var(--velo)); }
.fila { display: flex; align-items: center; gap: 10px; }
.fila > .crece { flex: 1; min-width: 0; }
.suave { color: var(--suave); font-size: var(--t1); overflow-wrap: anywhere; }
.tenue { color: var(--tenue); font-size: var(--t1); }
.chico { font-size: var(--t1); }
.grande { font-size: var(--t4); font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
.cortar { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.ok { color: var(--verde); }
.amarillo { color: var(--amarillo); }
.aviso-rojo { color: var(--rojo); }
.insignia { display: inline-block; line-height: 20px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; height: 20px; font-size: 11px; font-weight: 600; padding: 0 7px;
  border-radius: 999px; background: var(--velo); color: var(--suave); white-space: nowrap; }
.insignia.nueva { color: var(--violeta); }
.insignia.serie { color: var(--enlace); }
.insignia.ok { color: var(--verde); }
.insignia.toca { color: var(--amarillo); }
.insignia.mal { color: var(--rojo); }
/* sobre una foto, la insignia necesita su propio fondo */
.sello .insignia { background: rgba(0, 0, 0, .62); color: #fff; }
.sello .insignia.ok { color: #6ee7a8; }
.sello .insignia.toca { color: #ffd166; }
.sello .insignia.mal { color: #ff9aa2; }
.sello .insignia.nueva { color: #d0c4ff; }
.sello .insignia.serie { color: #9dd2ff; }

/* ---------- lista al estilo de Telegram: renglones con separador fino ---------- */
.lista { background: var(--tarjeta); border-radius: var(--r-tarjeta); margin-bottom: 8px; overflow: hidden; }
.renglon { display: flex; align-items: center; gap: 12px; padding: 10px 12px; position: relative; min-height: 44px; }
.renglon + .renglon::before { content: ""; position: absolute; left: 12px; right: 0; top: 0; height: 1px; background: var(--borde); }
.renglon > .crece { flex: 1; min-width: 0; }
.renglon .flecha { color: var(--tenue); width: 16px; height: 16px; }

/* ---------- botones: una sola escala (48 principal · 40 normal · 32 mini) ---------- */
button, .boton { font: inherit; font-size: var(--t2); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center;
  justify-content: center; gap: 6px; border: 0; border-radius: var(--r-boton); height: 40px; padding: 0 14px; cursor: pointer;
  background: var(--acento); color: var(--sobre-acento); white-space: nowrap; }
button:active { opacity: .78; }
button.ancho, .boton.ancho { width: 100%; height: 48px; }
button.verde { background: var(--verde); color: #fff; }
:root:not([data-tema="light"]) button.verde { color: #04140d; }
button.sec, .boton.sec { background: var(--tinte); color: var(--enlace); }
button.plano { background: transparent; color: var(--enlace); padding: 0 8px; }
button.peligro { background: transparent; color: var(--rojo); }
button.mini, .boton.mini { height: 32px; padding: 0 10px; font-size: var(--t1); position: relative; }
button.mini::after, .chip::after, .segmento button::after { content: ""; position: absolute; inset: -6px 0; }   /* zona táctil de 44 px */
button[disabled] { opacity: .4; cursor: default; }
.botones { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.botones > * { flex: 1 1 auto; }

/* ---------- chips y segmento ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; height: 32px; padding: 0 12px; border-radius: 999px; background: var(--velo); color: var(--texto);
  font-size: var(--t1); font-weight: 600; }
.chip.si { background: var(--acento); color: var(--sobre-acento); }
.chip small { font-weight: 400; opacity: .75; font-size: inherit; }
.segmento { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--velo); border-radius: var(--r-boton);
  padding: 2px; gap: 2px; }
.segmento button { position: relative; background: transparent; color: var(--suave); height: 32px; padding: 0 6px; border-radius: 8px;
  font-size: var(--t1); }
.segmento button.si { background: var(--acento); color: var(--sobre-acento); }
.pregunta { font-weight: 600; margin: 14px 0 8px; font-size: var(--t2); }
.pregunta:first-child { margin-top: 0; }

/* ---------- formularios ---------- */
textarea, input[type=text] { width: 100%; font: inherit; color: var(--texto); background: var(--campo);
  border: 1px solid var(--borde); border-radius: var(--r-boton); padding: 10px 12px; resize: vertical; }
textarea:focus, input:focus { outline: none; border-color: var(--acento); }
textarea::placeholder, input::placeholder { color: var(--tenue); }
input.plano { background: transparent; border: 0; border-bottom: 1px dashed var(--borde); border-radius: 0; padding: 4px 0;
  font-weight: 700; font-size: var(--t3); }
textarea.plano { background: transparent; border: 0; border-bottom: 1px dashed var(--borde); border-radius: 0; padding: 4px 0;
  color: var(--suave); resize: none; }
label.campo { display: block; color: var(--suave); font-size: var(--t1); margin: 10px 0 4px; }
select { font: inherit; color: var(--texto); background: var(--campo); border: 1px solid var(--borde); border-radius: var(--r-boton);
  height: 40px; padding: 0 9px; }

/* ---------- caja de la idea con micrófono ---------- */
.idea { position: relative; }
.idea textarea { min-height: 148px; padding: 12px 12px 58px; font-size: var(--t3); line-height: 1.35; border-radius: var(--r-tarjeta);
  background: var(--tarjeta); border-color: transparent; }
.tarjeta .idea textarea { background: var(--campo); border-color: var(--borde); min-height: 112px; font-size: var(--t2); }
.idea textarea:focus { border-color: var(--acento); }
.idea .mic { position: absolute; right: 8px; bottom: 10px; width: 44px; height: 44px; border-radius: 50%; padding: 0; }
.idea .mic svg.ico { width: 22px; height: 22px; }
.idea .mic.grabando { background: var(--rojo); color: #fff; animation: latido 1.1s infinite; }
.idea .cuenta { position: absolute; left: 12px; right: 62px; bottom: 14px; color: var(--tenue); font-size: var(--t1); line-height: 1.3;
  pointer-events: none; }
.idea textarea.realce { animation: realce 1.6s ease-out; }
@keyframes realce { 0% { border-color: var(--verde); box-shadow: 0 0 0 4px rgba(62, 207, 142, .35); } 100% { box-shadow: none; } }
.idea .cuenta.rojo { color: var(--rojo); font-weight: 600; }
@keyframes latido { 0%, 100% { box-shadow: 0 0 0 0 rgba(238, 104, 111, .55); } 50% { box-shadow: 0 0 0 12px rgba(238, 104, 111, 0); } }
.ejemplos { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 10px -16px 0; padding: 6px 16px; }
.ejemplos::-webkit-scrollbar { display: none; }
.ejemplos .chip { white-space: nowrap; font-weight: 400; color: var(--suave); flex: none; }

/* ---------- trabajando (Claude, caras) ---------- */
.trabajando { display: flex; align-items: center; gap: 12px; }
.girando { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--velo); border-top-color: var(--acento);
  animation: gira .8s linear infinite; flex: none; display: inline-block; }
@keyframes gira { to { transform: rotate(360deg); } }
.girando.enorme { width: 48px; height: 48px; border-width: 4px; }

/* ---------- personajes (slots) ---------- */
.slots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.slot { background: var(--tarjeta); border-radius: var(--r-tarjeta); padding: 8px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.slot.abierto { grid-column: 1 / -1; padding: 12px; }
.slot .cara { position: relative; aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden; background: var(--campo)
  center / cover no-repeat; display: grid; place-items: center; color: var(--tenue); font-size: 34px; font-weight: 700; cursor: pointer; }
.slot .cara.hoja { background-size: 420% auto; background-position: 3% 22%; }
.slot .cara .sello { position: absolute; left: 6px; top: 6px; }
.slot b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot .rol { color: var(--suave); font-size: var(--t1); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 2.8em; }
.slot.mas { border: 1.5px dashed var(--borde); align-items: center; justify-content: center; min-height: 200px; color: var(--enlace);
  cursor: pointer; background: transparent; font-weight: 600; }
.slot.mas .signo { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--tinte); margin-bottom: 4px; }
.slot.mas .signo svg.ico { width: 24px; height: 24px; }
.slot.abierto .cara { width: 42%; max-width: 170px; flex: none; }   /* en la fila de la tarjeta abierta, sin ancho se quedaba en 0 px */
.slot .acciones { display: flex; gap: 6px; flex-wrap: wrap; }
.slot .acciones > * { flex: 1 1 auto; }
.avatares { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.avatares::-webkit-scrollbar { display: none; }
.avatar { flex: none; width: 72px; height: auto; text-align: center; font-size: var(--t1); color: var(--suave); background: transparent;
  padding: 0; display: block; font-weight: 400; white-space: normal; }
.avatar .disco { width: 56px; height: 56px; margin: 0 auto 4px; border-radius: 50%; background: var(--campo) center / cover no-repeat; }
.avatar .disco.hoja { background-size: 420% auto; background-position: 3% 22%; }
.avatar span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot .cara .creando { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 8px; font-size: var(--t1); font-weight: 600; color: var(--suave); text-align: center; padding: 8px; }
.slot .cara.aparece { animation: aparece .9s ease-out; }
@keyframes aparece { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }

/* ---------- estimación y guion ---------- */
.lista-datos { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: var(--t1); }
.lista-datos > span:nth-child(odd) { color: var(--suave); }
.lista-datos > span:nth-child(even) { text-align: right; }
.parte summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--texto);
  font-size: var(--t2); margin: 0; }
.parte summary::-webkit-details-marker { display: none; }
.secuencia { border-left: 2px solid var(--borde); padding: 2px 0 2px 10px; margin: 10px 0; }
.secuencia .cab { color: var(--enlace); font-size: var(--t1); font-weight: 600; }
.frase { margin: 3px 0; }
.frase b { color: var(--violeta); font-weight: 600; }
.checks div { padding: 3px 0; font-size: var(--t1); display: flex; gap: 8px; align-items: baseline; }
.punto { width: 8px; height: 8px; border-radius: 50%; background: var(--tenue); flex: none; display: inline-block; }
.punto.ok { background: var(--verde); }
.punto.toca { background: var(--amarillo); }
.punto.mal { background: var(--rojo); }
.punto.curso { background: var(--acento); }

/* ---------- respaldo del botón principal (cuando Telegram no trae los nativos) ---------- */
#pie-accion { position: fixed; left: 0; right: 0; bottom: var(--pie); z-index: 6; display: flex; gap: 8px; padding: 8px 16px;
  max-width: 480px; margin: 0 auto; background: var(--pie-fondo); border-top: 1px solid var(--borde); }
#pie-accion button { flex: 1 1 0; height: 48px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
#pie-accion .girando { width: 18px; height: 18px; border-color: rgba(255, 255, 255, .35); border-top-color: #fff; }
body.con-accion { --accion: 65px; }
body.sin-pestanas #pie-accion { padding-bottom: calc(8px + var(--seguro)); }

/* ---------- cola ---------- */
.trabajo .mini-portada { width: 42px; height: 56px; border-radius: 6px; flex: none; background: var(--campo) center / cover no-repeat;
  display: grid; place-items: center; color: var(--tenue); }
.trabajo .linea { display: flex; align-items: center; gap: 8px; }
.trabajo .estado { font-size: var(--t1); color: var(--suave); }
.trabajo.toca .estado { color: var(--amarillo); font-weight: 600; }
.trabajo.mal .estado { color: var(--rojo); font-weight: 600; }
.trabajo .linea > .crece { flex: 1; min-width: 0; }
.trabajo .linea + .linea { margin-top: 3px; }
.trabajo .linea .tenue { flex: none; }
.barra { height: 4px; background: var(--velo); border-radius: 2px; overflow: hidden; flex: 1; }
.barra > i { display: block; height: 100%; border-radius: 2px; background: var(--acento); transition: width .8s ease; }
.barra.ok > i { background: var(--verde); }
.barra.toca > i { background: var(--amarillo); }
.barra.mal > i { background: var(--rojo); }
.pct { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- listos ---------- */
.listo { align-items: flex-start; }
.listo .portada { width: 56px; aspect-ratio: 9 / 16; border-radius: 6px; flex: none; background: var(--campo) center / cover no-repeat;
  cursor: pointer; display: grid; place-items: center; color: var(--tenue); }
.listo .datos { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.listo .botones { margin-top: 4px; gap: 6px; }
.listo .botones > * { flex: 0 0 auto; }
.seo-bloque { background: var(--campo); border-radius: var(--r-boton); padding: 8px 10px; margin-top: 8px; }
.seo-bloque .cab { display: flex; align-items: center; justify-content: space-between; color: var(--suave); font-size: var(--t1);
  margin-bottom: 4px; }
.seo-bloque pre { margin: 0; white-space: pre-wrap; font: var(--t1)/1.4 -apple-system, system-ui, sans-serif; color: var(--texto); }

/* ---------- pestañas: 52 px, la activa por color ---------- */
#pestanas { position: fixed; left: 0; right: 0; bottom: 0; z-index: 7; display: grid; grid-template-columns: repeat(4, 1fr);
  max-width: 480px; margin: 0 auto; height: var(--pie); padding-bottom: var(--seguro); background: var(--pie-fondo);
  border-top: 1px solid var(--borde); }
#pestanas button { position: relative; background: transparent; color: var(--tenue); flex-direction: column; gap: 2px;
  height: 51px; padding: 0; border-radius: 0; font-weight: 500; }
#pestanas button svg.ico { width: 22px; height: 22px; }
#pestanas button span { font-size: 11px; line-height: 13px; }
#pestanas button.si { color: var(--acento); }
#pestanas button i { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 16px; height: 16px; border-radius: 8px;
  padding: 0 4px; background: var(--rojo); color: #fff; font: 700 11px/16px system-ui; font-style: normal; }
body.sin-pestanas #pestanas { display: none; }

/* ---------- pedido (tablero) y reproductor ---------- */
.puestos { list-style: none; margin: 0; padding: 0; }
.puestos li { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--borde); align-items: baseline; }
.puestos li:last-child { border: 0; }
.estado-fallo { color: var(--rojo); font-weight: 600; }
.estado-esperando { color: var(--amarillo); font-weight: 600; }
.estado-en_curso { font-weight: 600; }
.estado-pendiente { color: var(--suave); }
.rejilla { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.foto { position: relative; border-radius: 8px; overflow: hidden; background: #000; }
.foto img, .foto video { display: block; width: 100%; height: auto; }
.foto .marca { position: absolute; left: 6px; top: 6px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 11px; padding: 2px 7px; border-radius: 999px; }
.foto.elegida { outline: 3px solid var(--rojo); outline-offset: -3px; }
.foto .chk { position: absolute; right: 6px; top: 6px; background: var(--rojo); color: #fff; border-radius: 999px; padding: 2px 7px; font-size: 11px; font-weight: 600; }
.foto .chk:empty { display: none; }
video.grande { width: 100%; max-height: 62vh; background: #000; border-radius: var(--r-tarjeta); display: block; }
.interruptor { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; }
.interruptor input { width: 22px; height: 22px; accent-color: var(--acento); flex: none; }
pre.log { white-space: pre-wrap; font-size: 11px; background: var(--campo); border-radius: 8px; padding: 8px; margin: 6px 0 0; max-height: 160px; overflow: auto; }
details summary { cursor: pointer; color: var(--suave); font-size: var(--t1); min-height: 24px; }
details.tarjeta > summary { color: var(--texto); font-size: var(--t2); font-weight: 600; }
details[open] > summary { margin-bottom: 8px; }
.vacio { text-align: center; padding: 36px 18px; color: var(--suave); }
.vacio svg.ico { display: block; width: 40px; height: 40px; margin: 0 auto 10px; color: var(--tenue); stroke-width: 1.4; }

/* ---------- aviso flotante ---------- */
#aviso { position: fixed; left: 12px; right: 12px; bottom: calc(var(--pie) + var(--accion) + 10px); z-index: 9; max-width: 456px; margin: 0 auto;
  background: #2b2f36; color: #fff; padding: 10px 14px; border-radius: var(--r-tarjeta); font-size: var(--t1);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .3); }
#aviso.malo { background: #a3262f; }
[hidden] { display: none !important; }

/* ---------- pasos de «Crear» ---------- */
.pasos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 0 0 12px; }
.pasos span, .pasos button { text-align: center; font-size: 11px; font-weight: 600; color: var(--tenue); padding: 6px 0 0; height: 22px;
  border-top: 3px solid var(--velo); border-radius: 0; background: transparent; justify-content: center; position: relative; }
.pasos button { cursor: pointer; }
.pasos button::after { content: ""; position: absolute; inset: -10px 0; }
.pasos .hecho { color: var(--enlace); border-color: var(--tinte); }
.pasos .ahora { color: var(--texto); border-color: var(--acento); }
.exito { text-align: center; padding: 16px 14px; }
.exito svg.ico { width: 32px; height: 32px; color: var(--verde); display: block; margin: 0 auto 6px; }
.tarjeta.ensayo { box-shadow: inset 3px 0 0 var(--amarillo); }
.tarjeta.ensayo b { color: var(--amarillo); font-size: var(--t1); }

/* teclado abierto (móvil): el respaldo y las pestañas no suben encima de lo que escribes */
body.teclado #pie-accion, body.teclado #pestanas { display: none; }
body.teclado main { padding-bottom: 40px; }
body.teclado #aviso { bottom: 12px; }
