/* KinetiCore · estilo común. Sin fuentes ni recursos externos (funciona sin internet y respeta la CSP).
   Tres temas: claro (por defecto), oscuro y alto contraste. Los nombres de las variables viejas se conservan
   (--bg --fg --acc --ok --bad --warn --panel) para que todo lo que ya las usa siga funcionando. */
:root {
  --bg: #f3f6f7; --panel: #ffffff; --fg: #10202b; --muted: #45565f; --line: #d3dde2;
  --acc: #1b7f79; --on-acc: #ffffff; --acc-soft: #e2f3f1; --acc-text: #146059; --on-bad: #ffffff; --on-ok: #ffffff;
  --ok: #1b7f3b; --bad: #c62828; --warn: #b45309; --amber: #f2b705;
  --shadow: 0 1px 2px rgba(16, 32, 43, .06), 0 4px 16px rgba(16, 32, 43, .06);
  --radius: 16px; --focus: #0b5cff; color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0d171d; --panel: #15232b; --fg: #eaf2f5; --muted: #a9bbc5; --line: #2a3d48;
    --acc: #4fd1c5; --on-acc: #04211f; --acc-soft: #12363a; --acc-text: #4fd1c5; --on-bad: #2b0504; --on-ok: #04210f;
    --ok: #5be08a; --bad: #ff7b72; --warn: #ffb45e; --shadow: none; --focus: #8ab4ff; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d171d; --panel: #15232b; --fg: #eaf2f5; --muted: #a9bbc5; --line: #2a3d48;
  --acc: #4fd1c5; --on-acc: #04211f; --acc-soft: #12363a; --acc-text: #4fd1c5; --on-bad: #2b0504; --on-ok: #04210f;
  --ok: #5be08a; --bad: #ff7b72; --warn: #ffb45e; --shadow: none; --focus: #8ab4ff; color-scheme: dark;
}
:root[data-theme="contrast"] {
  --bg: #000; --panel: #111; --fg: #fff; --muted: #fff; --line: #fff;
  --acc: #ffd400; --on-acc: #000; --acc-soft: #222; --acc-text: #ffd400; --on-bad: #000; --on-ok: #000;
  --ok: #3ddc84; --bad: #ff5252; --warn: #ff9d4d; --shadow: none; --focus: #ffd400; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 18px/1.55 system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background: var(--bg); color: var(--fg); }
main { max-width: 980px; margin: 0 auto; padding: 20px 16px 96px; }
h1 { font-size: 1.7rem; line-height: 1.2; margin: 8px 0 6px; letter-spacing: -.01em; }
h1 small { display: block; font-size: .95rem; font-weight: 500; color: var(--muted); margin-top: 4px; letter-spacing: 0; }
h2 { font-size: 1.2rem; line-height: 1.3; margin: 0 0 10px; color: var(--acc-text); }
h3 { font-size: 1.05rem; margin: 0 0 4px; }
a { color: var(--acc-text); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
p { margin: 8px 0; }
small, .note { color: var(--muted); font-size: .92rem; }
.hidden { display: none !important; }
[hidden] { display: none !important; }

/* Tarjetas */
section, article { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 16px 0; box-shadow: var(--shadow); }
article { padding: 14px 16px; border-left-width: 6px; border-left-color: var(--line); }
article.alta { border-left-color: var(--bad); } article.media { border-left-color: var(--warn); } article.baja { border-left-color: var(--ok); }
article.flag { border-color: var(--bad); border-left-color: var(--bad); }
fieldset { border: 1px solid var(--line); border-radius: 12px; margin: 14px 0; padding: 10px 14px 14px; background: transparent; }
legend { font-weight: 700; padding: 0 8px; color: var(--fg); }
details { margin: 10px 0; } summary { cursor: pointer; font-weight: 700; padding: 8px 0; min-height: 44px; display: flex; align-items: center; }
.banner { border: 2px solid var(--acc); background: var(--acc-soft); border-radius: 12px; padding: 12px 16px; font-weight: 600; }

/* Formularios */
label { display: block; margin: 12px 0 4px; font-size: .95rem; font-weight: 600; }
input, select, textarea, button { font: inherit; color: var(--fg); }
input[type=text], input[type=number], input[type=date], input[type=password], input:not([type]), select, textarea {
  width: 100%; padding: 10px 12px; min-height: 48px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg);
}
input[type=number] { width: 8em; }
.row input[type=number] { max-width: 100%; }
textarea { min-height: 80px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
input[type=checkbox], input[type=radio] { width: 26px; height: 26px; min-height: 0; vertical-align: middle; margin: 0 10px 0 0; accent-color: var(--acc); }
label:has(> input[type=checkbox]), label:has(> input[type=radio]) { font-weight: 500; display: flex; align-items: center; gap: 0; padding: 6px 0; min-height: 44px; }
input[type=range] { width: 100%; accent-color: var(--acc); min-height: 36px; }
progress { width: 100%; height: 14px; accent-color: var(--acc); }
output { font-weight: 700; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Botones */
button { padding: 10px 18px; min-height: 48px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--panel); font-weight: 700; cursor: pointer; margin: 4px 4px 4px 0; transition: background .12s, border-color .12s, transform .06s; }
button:hover:not(:disabled) { border-color: var(--acc); }
button:active:not(:disabled) { transform: translateY(1px); }
button.primary { background: var(--acc); color: var(--on-acc); border-color: var(--acc); }
button.primary:hover:not(:disabled) { filter: brightness(1.08); }
button.danger, .stopbtn { border-color: var(--bad); color: var(--bad); }
button:disabled { opacity: .45; cursor: not-allowed; }
button[aria-pressed=true] { background: var(--acc); color: var(--on-acc); border-color: var(--acc); }

/* Disposición */
.row { display: flex; gap: 12px 16px; flex-wrap: wrap; align-items: end; margin: 8px 0; }
.row > * { flex: 1 1 170px; } .row > button, .row > a { flex: 0 0 auto; }
.scale { display: flex; flex-wrap: wrap; gap: 8px; } .scale button { min-width: 48px; padding: 8px 10px; margin: 0; flex: 0 0 auto; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.stat { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; color: var(--muted); font-size: .9rem; }
.stat b { display: block; font-size: 1.7rem; color: var(--fg); line-height: 1.2; }
dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 10px 0; }
dt { color: var(--muted); } dd { margin: 0; font-weight: 700; }
ul.reasons { margin: 6px 0; padding-left: 22px; }

/* Estados */
.err { color: var(--bad); min-height: 1.4em; } .alert { color: var(--bad); font-weight: 700; }
.ok { color: var(--ok); } .warn { color: var(--warn); } .bad { color: var(--bad); }
.badge { display: inline-block; border: 1.5px solid currentColor; border-radius: 999px; padding: 0 10px; font-size: .82rem; font-weight: 700; margin-right: 6px; line-height: 1.7; }
.lvl { font-weight: 800; color: var(--ok); }
.dim, .gate { border-top: 1px solid var(--line); padding: 10px 0; }

/* Tablas y textos preformateados */
table { width: 100%; border-collapse: collapse; margin: 6px 0 12px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: .95rem; }
th { color: var(--muted); font-size: .85rem; font-weight: 700; text-transform: none; }
tbody tr:nth-child(even) { background: color-mix(in srgb, var(--bg) 60%, transparent); }
td.v { font-weight: 800; white-space: nowrap; } td.sup { color: var(--muted); font-style: italic; font-weight: 400; }
table.sub { margin: 2px 0 6px 12px; width: calc(100% - 12px); }
pre { white-space: pre-wrap; background: var(--bg); border: 1px solid var(--line); padding: 12px; border-radius: 12px; font-size: .85rem; max-height: 340px; overflow: auto; }
ol#log, ol.hist { font-size: .9rem; color: var(--muted); max-height: 200px; overflow: auto; padding-left: 22px; }
ol.hist { max-height: none; }
textarea#csv { font: 13px/1.4 ui-monospace, Consolas, monospace; }

/* Cámara y video */
video { display: none; } #cam { display: none; }
canvas { width: 100%; max-width: 640px; border-radius: 14px; background: #222; display: block; margin: 10px 0; border: 1px solid var(--line); }
canvas#view.mirror { transform: scaleX(-1); }
#msg { font-size: 1.8rem; font-weight: 800; text-align: center; padding: 22px 16px; border-radius: var(--radius); border: 2px solid var(--line); background: var(--bg); margin: 12px 0; }
#msg.ok { border-color: var(--ok); color: var(--ok); } #msg.bad { border-color: var(--bad); color: var(--bad); }
#frame.ok { color: var(--ok); } #frame.bad { color: var(--bad); }
#big { font-size: 2.6rem; font-weight: 800; color: var(--acc); font-variant-numeric: tabular-nums; margin: 6px 0; }
#panic { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; min-height: 84px; margin: 0; padding-bottom: calc(10px + env(safe-area-inset-bottom)); font-size: 1.5rem; background: var(--bad); color: var(--on-bad); border: 0; border-radius: 0; }
#panic:hover:not(:disabled) { filter: brightness(1.1); border: 0; }

/* Juego infantil */
#card { text-align: center; }
#pic { font-size: 8rem; line-height: 1.1; } #txt { font-size: 2.1rem; font-weight: 800; margin: 8px 0 16px; }
#done { width: 100%; font-size: 1.9rem; background: var(--ok); color: var(--on-ok); border-color: var(--ok); min-height: 84px; border-radius: 18px; }
#hurt { width: 100%; background: var(--bad); color: var(--on-bad); border-color: var(--bad); margin-top: 12px; min-height: 72px; font-size: 1.5rem; border-radius: 18px; }

/* Cuadros de diálogo (clave, logros) */
dialog { background: var(--panel); color: var(--fg); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; max-width: 94vw; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
dialog::backdrop { background: rgba(8, 18, 24, .6); }
#pin-err { color: var(--bad) !important; }

/* Encabezado y menú común (lo arma nav.js) */
.skip { position: absolute; left: -999px; top: 8px; background: var(--acc); color: var(--on-acc); padding: 10px 16px; border-radius: 10px; z-index: 50; font-weight: 700; }
.skip:focus { left: 8px; }
.topbar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--panel) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 980px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; gap: 10px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--fg); text-decoration: none; font-size: 1.05rem; margin-right: auto; }
.brand .mark { width: 34px; height: 34px; border-radius: 10px; background: var(--acc); color: var(--on-acc); display: grid; place-items: center; font-weight: 800; font-size: 1.1rem; }
.brand span small { display: block; font-size: .7rem; font-weight: 600; color: var(--muted); line-height: 1; }
.topbar button { min-height: 44px; margin: 0; padding: 8px 14px; }
.menu { max-width: 980px; margin: 0 auto; padding: 4px 16px 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px 24px; }
.menu h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 10px 0 4px; }
.menu a { display: block; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--fg); font-weight: 600; min-height: 44px; }
.menu a:hover { background: var(--acc-soft); }
.menu a[aria-current=page] { background: var(--acc); color: var(--on-acc); }

/* Inicio */
.hero { padding: 8px 0 4px; } .hero p { font-size: 1.05rem; color: var(--muted); max-width: 46em; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; margin: 12px 0 24px; }
a.card { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; text-decoration: none; color: var(--fg); box-shadow: var(--shadow); transition: border-color .12s, transform .12s; }
a.card:hover { border-color: var(--acc); transform: translateY(-2px); }
a.card .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--acc-soft); display: grid; place-items: center; font-size: 1.5rem; margin-bottom: 10px; }
a.card b { display: block; font-size: 1.1rem; margin-bottom: 4px; } a.card span { color: var(--muted); font-size: .95rem; }
h2.grp { margin-top: 26px; color: var(--fg); font-size: 1.05rem; }

@media (max-width: 560px) {
  body { font-size: 17px; } h1 { font-size: 1.45rem; } main { padding: 12px 12px 96px; }
  section, article { padding: 14px; } #pic { font-size: 6.5rem; } .brand span small { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Clave (diálogo) */
.pin-form { min-width: min(90vw, 400px); } .pin-form h2 { margin-top: 0; }
.pin-row { display: flex; gap: 8px; } .pin-row input { flex: 1 1 auto; } .pin-row button { margin: 0; flex: 0 0 auto; }
#pin-strength { min-height: 1.4em; }

/* Demostración */
.demo-banner { background: var(--amber); color: #1c1500; text-align: center; padding: 8px 16px; font-weight: 700; font-size: .92rem; }
.demo-banner a { color: #1c1500; margin-left: 10px; }

/* Pasos de la sesión */
.stepper ol { list-style: none; display: flex; gap: 8px; padding: 0; margin: 12px 0; flex-wrap: wrap; }
.stepper li { flex: 1 1 150px; } .stepper button { width: 100%; margin: 0; display: flex; align-items: center; gap: 10px; justify-content: flex-start; text-align: left; }
.stepper .n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--acc-soft); color: var(--fg); font-weight: 800; flex: 0 0 auto; }
.stepper button[aria-current=step] { border-color: var(--acc); background: var(--acc-soft); } .stepper button[aria-current=step] .n, .stepper button.done .n { background: var(--acc); color: var(--on-acc); }
.stepnav { display: flex; gap: 12px; justify-content: space-between; margin: 8px 0 24px; } .stepnav button { flex: 1 1 0; }

/* Cabecera de página (la arma nav.js) */
.page-head { display: flex; gap: 16px; align-items: flex-start; margin: 4px 0 18px; }
.ph-ico { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 16px; background: var(--acc-soft); border: 1px solid var(--line); display: grid; place-items: center; font-size: 1.9rem; }
.ph-group { margin: 0; color: var(--acc-text); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.page-head h1 { margin: 2px 0 4px; } .page-head h1 small { display: none; }
.ph-lead { margin: 0; color: var(--muted); max-width: 46em; }

/* Pantalla de bloqueo */
.lockcard { text-align: center; max-width: 560px; margin: 24px auto; padding: 28px 22px; }
.lock-ico { font-size: 2.4rem; margin-bottom: 6px; }
.lockcard .row { justify-content: center; } .lockcard p { margin: 10px 0; }
.lockcard input[type=file] { width: 100%; }
.lock-sees { display: inline-block; text-align: left; margin: 0 0 8px; padding-left: 1.2em; color: var(--muted); }
.btn { display: inline-block; padding: 12px 20px; border-radius: 12px; border: 1.5px solid var(--acc); color: var(--acc-text); font-weight: 700; text-decoration: none; min-height: 48px; line-height: 1.5; }
.btn:hover { background: var(--acc-soft); }

/* Barra inferior del celular */
.tabbar { display: none; }
@media (max-width: 700px) {
  body { padding-bottom: 66px; }
  body.pres { padding-bottom: 0; } body.pres .tabbar { display: none; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; background: var(--panel); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a, .tabbar button { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; min-height: 60px; margin: 0; border: 0; border-radius: 0; background: transparent; color: var(--muted); text-decoration: none; font-size: .72rem; padding: 6px 2px; }
  .tabbar span { font-size: 1.35rem; line-height: 1.2; } .tabbar b { font-weight: 700; }
  .tabbar a[aria-current=page] { color: var(--acc); box-shadow: inset 0 3px 0 var(--acc); }
  .topbar .brand span small { display: none; }
  #theme { font-size: .85rem; padding: 6px 10px; }
  .ph-ico { width: 46px; height: 46px; font-size: 1.5rem; } .ph-lead { font-size: .95rem; }
  table.cards, table.cards thead, table.cards tbody, table.cards tr, table.cards td { display: block; width: 100%; }
  table.cards thead { position: absolute; left: -9999px; }
  table.cards tr { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin: 0 0 10px; }
  table.cards td { border: 0; padding: 3px 0; } table.cards td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-weight: 700; font-size: .82rem; }
  table.cards tbody tr:nth-child(even) { background: var(--panel); }
}

/* Filtros por tipo y resumen (registro) */
.kinds { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.kinds button { margin: 0; min-height: 44px; padding: 6px 14px; border-radius: 999px; font-size: .92rem; }
.kinds button small { color: inherit; opacity: .8; margin-left: 4px; }
section > h2:first-child { position: relative; padding-left: 14px; }
section > h2:first-child::before { content: ""; position: absolute; left: 0; top: .2em; bottom: .2em; width: 5px; border-radius: 3px; background: var(--acc); }

/* ===== Inicio llamativo ===== */
.hero2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: center; padding: clamp(22px, 4vw, 44px); border-radius: 24px; color: #eaf6f4; margin: 4px 0 22px;
  background: radial-gradient(1200px 400px at 85% 10%, rgba(79, 209, 197, .28), transparent 60%), linear-gradient(135deg, #0b2a33 0%, #0f4a4f 55%, #1b7f79 100%); box-shadow: 0 18px 50px rgba(11, 42, 51, .35); overflow: hidden; }
.hero2 h1 { font-size: clamp(2rem, 5.2vw, 3.4rem); line-height: 1.05; margin: 6px 0 12px; color: #fff; letter-spacing: -.02em; }
.hero2 p { color: #d3ece8; max-width: 36em; font-size: 1.05rem; }
.kicker2 { color: #7be3d8 !important; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem !important; margin: 0; }
.hero2-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0 8px; }
.hbtn { display: inline-flex; align-items: center; min-height: 52px; padding: 12px 22px; border-radius: 14px; font-weight: 800; text-decoration: none; border: 2px solid rgba(255, 255, 255, .55); color: #fff; }
.hbtn.primary { background: #f2b705; border-color: #f2b705; color: #1c1500; } .hbtn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.hero2-points { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0; margin: 12px 0 0; color: #bfe9e3; font-weight: 600; font-size: .95rem; }
.hero2-points li::before { content: "✓ "; color: #7be3d8; }
.hero2-art { width: 100%; max-width: 320px; justify-self: center; }
.hero2-art .shank { transform-origin: 148px 150px; animation: swing 3.6s ease-in-out infinite alternate; }
.hero2-art .pulse { animation: pulse 1.8s ease-in-out infinite; transform-origin: 148px 150px; } .hero2-art .tag { animation: float 3.6s ease-in-out infinite alternate; }
@keyframes swing { from { transform: rotate(0deg); } to { transform: rotate(-38deg); } }
@keyframes pulse { 50% { transform: scale(1.35); opacity: .7; } } @keyframes float { to { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .hero2-art * { animation: none !important; } }
@media (max-width: 760px) { .hero2 { grid-template-columns: 1fr; } .hero2-art { max-width: 200px; order: -1; } }

.hoy { padding: 20px; } .hoy-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; } .hoy-head h2 { margin: 0; } .hoy-head button { margin: 0; }
.hoy-lock { text-align: center; padding: 8px 0; } .hoy-lock .row { justify-content: center; }
.hoy-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; margin-top: 8px; } @media (max-width: 760px) { .hoy-grid { grid-template-columns: 1fr; } }
.hoy h3 { margin: 14px 0 8px; font-size: 1rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.tareas { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.tarea { display: flex; gap: 12px; align-items: center; justify-content: space-between; background: var(--bg); border: 1px solid var(--line); border-left: 6px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.tarea.alta { border-left-color: var(--bad); } .tarea.media { border-left-color: var(--warn); } .tarea.baja { border-left-color: var(--ok); }
.tarea p { margin: 2px 0 0; } .tarea .btn { flex: 0 0 auto; padding: 8px 14px; min-height: 44px; font-size: .92rem; }
@media (max-width: 560px) { .tarea { flex-direction: column; align-items: stretch; } .tarea .btn { text-align: center; } }
.spark svg { max-width: 260px; } .chips2 { display: flex; flex-wrap: wrap; gap: 8px; }
.chip2 { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--acc-soft); border: 1px solid var(--line); color: var(--fg); text-decoration: none; font-weight: 700; font-size: .92rem; }
.chip2:hover { border-color: var(--acc); }
.tiles4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 10px 0 8px; }
.tile { display: block; text-decoration: none; color: #fff; border-radius: 20px; padding: 20px; min-height: 150px; position: relative; overflow: hidden; box-shadow: 0 10px 26px rgba(16, 32, 43, .18); transition: transform .12s; }
.tile:hover { transform: translateY(-3px); } .tile b { display: block; font-size: 1.25rem; margin-top: 10px; } .tile small { color: rgba(255, 255, 255, .88); font-size: .92rem; }
.tile .ti { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: rgba(255, 255, 255, .22); font-size: 1.8rem; }
.t1 { background: linear-gradient(135deg, #0f766e, #14b8a6); } .t2 { background: linear-gradient(135deg, #b45309, #f59e0b); } .t3 { background: linear-gradient(135deg, #5b21b6, #8b5cf6); } .t4 { background: linear-gradient(135deg, #1e40af, #3b82f6); }

/* ===== Informe ===== */
.chart { max-width: 760px; display: block; } .legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 6px 0 0; font-size: .9rem; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 10px 0 4px; }
.rep-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 16px; }
.cmp { background: var(--bg); border: 1px solid var(--line); border-left: 6px solid var(--acc); border-radius: 12px; padding: 10px 14px; margin: 8px 0; }
@media print {
  .topbar, .tabbar, .rep-actions, .skip, .demo-banner, #hoy-lock, .hero2-cta { display: none !important; }
  body { background: #fff; color: #10202b; padding: 0; font-size: 11pt; } main { padding: 0; max-width: none; }
  section, article { box-shadow: none; break-inside: avoid; border-color: #ccd; }
}

/* ===== Búsqueda rápida ===== */
dialog.palette { width: min(92vw, 560px); padding: 14px; top: 12vh; margin: 0 auto; }
.palette input { font-size: 1.1rem; }
.palette ul { list-style: none; margin: 10px 0 6px; padding: 0; max-height: 50vh; overflow: auto; }
.palette li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; min-height: 44px; }
.palette li small { color: var(--muted); white-space: nowrap; } .palette li[aria-selected=true] { background: var(--acc); color: var(--on-acc); } .palette li[aria-selected=true] small { color: inherit; opacity: .85; }
.palette li.none { cursor: default; color: var(--muted); }
#searchBtn { padding: 6px 12px; font-size: 1.1rem; }

/* ===== Anillo de la serie ===== */
.ring-wrap { display: flex; align-items: center; gap: 18px; margin: 8px 0; }
.ring { --p: 0; width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; align-content: center; flex: 0 0 auto;
  background: radial-gradient(closest-side, var(--panel) 72%, transparent 74% 100%), conic-gradient(var(--acc) calc(var(--p) * 1%), var(--line) 0); transition: background .25s; }
.ring b { font-size: 2.2rem; line-height: 1; font-variant-numeric: tabular-nums; } .ring small { color: var(--muted); }
.ring.full { background: radial-gradient(closest-side, var(--panel) 72%, transparent 74% 100%), conic-gradient(var(--ok) 100%, var(--line) 0); }
.serie { font-size: 1.3rem; font-weight: 800; margin: 0; }

/* ===== Ayuda ===== */
.steps5 { padding-left: 1.3em; } .steps5 li { margin: 10px 0; }
.cols2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.okbox, .nobox { border-radius: 14px; padding: 12px 16px; border: 1px solid var(--line); } .okbox { border-left: 6px solid var(--ok); } .nobox { border-left: 6px solid var(--bad); }
.okbox h3, .nobox h3 { margin: 0 0 6px; }
.atajos { grid-template-columns: max-content 1fr; } kbd { background: var(--bg); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 1px 8px; font-family: inherit; font-weight: 700; font-size: .9em; }
details > p { margin: 0 0 10px; padding-left: 4px; color: var(--muted); } details { border-bottom: 1px solid var(--line); }

/* ===== Avisos con número y siguientes pasos ===== */
.badge-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 6px; border-radius: 999px; background: var(--bad); color: var(--on-bad); font-style: normal; font-weight: 800; font-size: .72rem; line-height: 1; }
.tabbar a { position: relative; } .tabbar a .badge-n { position: absolute; top: 4px; left: 54%; margin: 0; }
.next-steps { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 10px; } .next-steps .row > * { flex: 0 0 auto; }

input[type=file] { min-height: 44px; padding: 8px 10px; width: 100%; }

/* ===== Modo sesión (despejado mientras corre) ===== */
body.en-sesion .topbar, body.en-sesion .tabbar, body.en-sesion .stepper, body.en-sesion .stepnav, body.en-sesion .page-head, body.en-sesion .demo-banner,
body.en-sesion main > section[aria-labelledby="h-log"] { display: none !important; }
body.en-sesion { padding-bottom: 110px; }
body.en-sesion .ring { width: 170px; height: 170px; } body.en-sesion .ring b { font-size: 3.2rem; } body.en-sesion .serie { font-size: 1.8rem; }
body.en-sesion canvas { max-width: 100%; }
#fsBtn { margin-left: auto; }

/* ===== Recorrido de bienvenida ===== */
.tour-hl { outline: 4px solid var(--amber); outline-offset: 6px; border-radius: 14px; position: relative; z-index: 5; transition: outline-color .2s; }
.tour { position: fixed; left: 50%; transform: translateX(-50%); bottom: 82px; width: min(92vw, 460px); z-index: 60; background: var(--panel); color: var(--fg); border: 2px solid var(--amber); border-radius: 16px; padding: 14px 16px; box-shadow: 0 16px 50px rgba(0, 0, 0, .4); }
.tour small { color: var(--muted); } .tour b { display: block; font-size: 1.15rem; margin: 2px 0 4px; } .tour p { margin: 0 0 8px; } .tour .row { justify-content: flex-end; margin: 0; } .tour .row > * { flex: 0 0 auto; }
@media (min-width: 701px) { .tour { bottom: 24px; } }

.camsel { flex: 1 1 260px; } .camsel select { width: 100%; } .camsel .note { display: block; min-height: 1.2em; }

/* ===== Lectura clínica asistida ===== */
.clin { border: 1px solid var(--line); border-left: 6px solid var(--acc); border-radius: var(--radius); padding: 14px 16px; margin: 14px 0; background: var(--panel); }
.clin h3 { margin: 0; } .clin h4 { margin: 16px 0 6px; font-size: 1rem; color: var(--acc-text); }
.clin-tag { margin: 2px 0 8px; color: var(--muted); font-size: .9rem; } .clin-sum { font-weight: 600; }
.clin-find { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.clin-find li { background: var(--bg); border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.clin-find .lv-atencion { border-left-color: var(--bad); } .clin-find .lv-observacion { border-left-color: var(--warn); } .clin-find .lv-info { border-left-color: var(--ok); }
.clin-find .dir-mejora { border-left-color: var(--ok); } .clin-find .dir-empeora { border-left-color: var(--bad); } .clin-find .dir-estable { border-left-color: var(--warn); }
.lv { font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.clin-hyp { background: var(--acc-soft); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 8px 0; } .clin-hyp p { margin: 4px 0; }
.clin-alert { border: 2px solid var(--bad); border-radius: 12px; padding: 10px 14px; margin: 12px 0; } .clin-alert ul { margin: 6px 0 0; }
.clin details { margin: 8px 0; } .clin details ul { margin: 4px 0 10px; padding-left: 1.2em; }

/* ===== Lo que veo ahora ===== */
.vivo { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 10px 0; box-shadow: none; } .vivo h3 { margin: 0 0 8px; font-size: .95rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.vivo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; } .vivo-c { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; }
.vivo-c small { display: block; color: var(--muted); font-size: .78rem; } .vivo-c b { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.vivo-hints { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; } .vivo-hints li { border-left: 5px solid var(--warn); padding: 4px 10px; background: var(--panel); border-radius: 8px; } .vivo-hints li.ok { border-left-color: var(--ok); color: var(--muted); }

/* ===== Guía de colocación de la cámara ===== */
.colocacion { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 4px 14px 12px; margin: 10px 0; }
.colocacion[hidden] { display: none; } .colocacion summary { font-weight: 700; }
.plc { display: grid; grid-template-columns: minmax(150px, 220px) 1fr; gap: 14px; align-items: center; margin: 6px 0; } .plc-art { max-width: 220px; }
.colocacion ul { margin: 4px 0 8px; padding-left: 1.2em; } .colocacion .clin-alert { margin: 6px 0; }
@media (max-width: 560px) { .plc { grid-template-columns: 1fr; } }

/* ===== Sugerencia para hoy ===== */
.sugerencia { background: var(--acc-soft); border: 1px solid var(--line); border-left: 6px solid var(--acc); border-radius: 12px; padding: 10px 14px; margin: 8px 0; } .sugerencia[hidden] { display: none; }
.sugerencia p { margin: 4px 0; } .sugerencia ul { margin: 4px 0 6px; padding-left: 1.2em; } .sugerencia .row { margin: 6px 0; } .sugerencia .row > * { flex: 0 0 auto; }

.resumen-box { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 10px 0; } .resumen-box textarea { width: 100%; font-size: 1rem; } .resumen-box .row > * { flex: 0 0 auto; }
