/* Hospital San Intento: capa de diseño del simulador.
   Va la última (después de styles.css, admin.css y labs.css) y solo cambia el aspecto:
   no añade ni quita funciones, y los identificadores que usa app.js siguen igual.
   Viene del esbozo San Intento (dentro.html con dentro-calma.css): mismos colores,
   cabecera con la marca, menú lateral con los nombres del hospital en ordenador y
   nombres funcionales en el móvil, y el Inicio con la jerarquía del «Hoy».
   Se hace por etapas (ADR 0136 y siguientes); cada pantalla repasa sus colores fijos. */

/* ---------- Colores: los mismos nombres de styles.css con los valores de San Intento ---------- */
:root,
:root[data-theme="dark"] {
  --bg: #070c0a;
  --s0: #0a110e;
  --s1: #0c1411;
  --s2: #101a16;
  --s3: #16231e;
  --line: rgba(220, 255, 240, 0.07);
  --line-2: rgba(220, 255, 240, 0.14);
  --ink: #ecfff6;
  --ink-2: #a9c2b7;
  --muted: #6c8378;
  --accent: #1dff9e;
  --accent-rgb: 29, 255, 158;
  --accent-2: #8fffd0;
  --on-accent: #01140a;
  --monitor: #1dff9e;
  --monitor-rgb: 29, 255, 158;
  --present: #1dff9e;
  --glass: rgba(8, 16, 13, 0.78);
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  /* Propios de San Intento */
  --neon: #1dff9e;
  --neon-text: #1dff9e;
  --neon-soft: rgba(29, 255, 158, 0.1);
  --neon-line: rgba(29, 255, 158, 0.35);
  --orange: #ff8a1f;
  --pro: #c9a7ff;
  --hot: #ff5f7a;
  --dock-w: 248px;
  --top-h: 62px;
}
:root[data-theme="dark"] { color-scheme: dark; }

/* Islas oscuras: en el tema claro siguen de noche, como el box y el monitor del esbozo.
   Recuperan aquí los colores oscuros para que su texto se lea. La entrada y el perfil
   también: su escena y su tarjeta de cristal tienen colores fijos pensados para la noche. */
:root[data-theme="light"] :is(.dp, .dp-float, .turn-screen, #screen-auth, #screen-profile) {
  --ink: #ecfff6;
  --ink-2: #a9c2b7;
  --muted: #6c8378;
  --line: rgba(220, 255, 240, 0.07);
  --line-2: rgba(220, 255, 240, 0.14);
  --s1: #0c1411;
  --s2: #101a16;
  --s3: #16231e;
  --bg: #070c0a;
  --accent: #1dff9e;
  --accent-rgb: 29, 255, 158;
  --on-accent: #01140a;
  --neon: #1dff9e;
  --neon-text: #1dff9e;
  --neon-soft: rgba(29, 255, 158, 0.1);
  --neon-line: rgba(29, 255, 158, 0.35);
  --glass: rgba(8, 16, 13, 0.78);
  color: var(--ink);
  color-scheme: dark;
}
:root[data-theme="light"] :is(#screen-auth, #screen-profile) { background: var(--bg); }
:root[data-theme="light"] body { background: radial-gradient(70% 50% at 15% 0%, rgba(0, 183, 101, 0.06), transparent 60%), var(--bg); }

/* Tema claro («claro clínico»): verde profundo sobre blanco. El box, el monitor y las
   tarjetas de cristal del escenario siguen oscuros, como en el esbozo. */
:root[data-theme="light"] {
  --bg: #f4f7f5;
  --s0: #edf2ef;
  --s1: #ffffff;
  --s2: #f6f9f7;
  --s3: #e9efec;
  --line: rgba(4, 30, 18, 0.08);
  --line-2: rgba(4, 30, 18, 0.16);
  --ink: #06140d;
  --ink-2: #33473d;
  --muted: #5d7066;
  --accent: #00b765;
  --accent-rgb: 0, 183, 101;
  --accent-2: #00a35a;
  --on-accent: #ffffff;
  --accent-soft: rgba(0, 183, 101, 0.1);
  --accent-line: rgba(0, 140, 78, 0.35);
  --warm: #b86200;
  --warm-soft: rgba(255, 138, 31, 0.12);
  --info: #1f6fd1;
  --warn: #a86b00;
  --danger: #c8283f;
  --danger-soft: rgba(214, 40, 74, 0.1);
  --glass: rgba(255, 255, 255, 0.82);
  --shadow: 0 30px 70px -30px rgba(10, 40, 25, 0.22);
  --neon: #00b765;
  --neon-text: #007a43;
  --neon-soft: rgba(0, 183, 101, 0.1);
  --neon-line: rgba(0, 140, 78, 0.35);
  --orange: #e06e00;
  --pro: #6f3fd6;
  --hot: #d6284a;
  color-scheme: light;
}
body { background: radial-gradient(70% 50% at 15% 0%, rgba(29, 255, 158, 0.05), transparent 60%), var(--bg); }
:focus-visible { outline: 3px solid var(--neon-text); outline-offset: 2px; }

/* Botones: verde intenso solo para la acción principal, sin resplandor permanente */
.btn.primary { box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12); }
.btn.primary:hover:not(:disabled) { transform: none; filter: brightness(1.06); box-shadow: 0 10px 28px -12px rgba(29, 255, 158, 0.7); }
.btn.xl { border-radius: 14px; }
.grad { background: linear-gradient(90deg, var(--neon), var(--orange)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Cabecera: la marca del hospital ---------- */
.topbar { height: var(--top-h); background: color-mix(in srgb, var(--bg) 82%, transparent); }
.brand { gap: 10px; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--neon); box-shadow: none; }
.brand-mark svg { width: 18px; height: 18px; fill: var(--on-accent); }
.brand-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; }
.brand-text strong { font-family: var(--display); font-size: 15px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); white-space: nowrap; }
.brand-text small { font-family: var(--mono); font-size: 10.5px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.brand-text small b { font-weight: inherit; color: inherit; }

/* ---------- Menú ---------- */
.tab-desc { display: none; }
.tab-label .nv-desk { display: none; }
.tab-btn.on .tab-icon { filter: none; }
.tabbar { background: color-mix(in srgb, var(--bg) 92%, transparent); }

/* Ordenador: menú lateral con el nombre del hospital y una explicación debajo */
@media (min-width: 861px) {
  /* Pegado bajo la cabecera (sticky, no fixed) para que la franja de la cuenta atrás no lo tape */
  .tabbar {
    position: sticky; top: var(--top-h); bottom: auto; float: left; z-index: 30;
    width: var(--dock-w); height: calc(100vh - var(--top-h)); display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 2px;
    padding: 16px 12px; overflow-y: auto; border: 0; border-right: 1px solid var(--line);
    background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .tab-btn {
    position: relative; flex: none; display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 12px; align-items: center;
    justify-items: start; text-align: left; padding: 9px 12px; border-radius: 10px;
    font-family: var(--font); font-size: 15px; font-weight: 600; letter-spacing: 0; color: var(--ink-2);
  }
  .tab-btn .tab-icon { width: 20px; height: 20px; }
  .tab-btn:hover { background: var(--s2); color: var(--ink); }
  .tab-btn.on { background: var(--neon-soft); color: var(--neon-text); }
  .tab-btn.on::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--neon); }
  .tab-label { display: grid; gap: 1px; min-width: 0; }
  .tab-label .nv-desk { display: inline; color: var(--ink); }
  .tab-label .nv-mob { display: none; }
  .tab-btn.on .nv-desk { color: var(--neon-text); }
  .tab-desc { display: block; font-size: 12.5px; font-weight: 400; line-height: 1.3; color: var(--muted); }
  .tab-btn.on .tab-desc { color: var(--ink-2); }
  /* Planes y Cuenta, separados abajo del todo; Admin, al final */
  .tab-btn[data-screen="screen-plans"] { margin-top: auto; }
  .tab-btn.tab-reto, .tab-btn.tab-reto .nv-desk { color: var(--orange); }
  .tab-btn.tab-reto .tab-icon { stroke: var(--orange); }
  .tab-btn .tab-dot { position: absolute; top: 12px; left: 28px; }
  body.with-tabs main { margin-left: var(--dock-w); padding-bottom: 2rem; }
  body.with-tabs .topbar { position: sticky; top: 0; }
}

/* Móvil: barra inferior con los nombres funcionales */
@media (max-width: 860px) {
  .tab-btn.on { color: var(--neon-text); }
  .brand-text small { display: none; }
}

/* ---------- Inicio: el «Hoy» del hospital (etapa 2, ADR 0137) ----------
   Mismo orden que el esbozo: saludo con contadores y el paciente del día en su escenario;
   la cinta de especialidades; la pregunta del adjunto; la guardia y el enlace a la sala. */
#screen-home .home-stage { display: none; }
#screen-home .home-content:not(.home-lower) { display: grid; gap: 28px; max-width: 1180px; padding-top: clamp(20px, 4vh, 40px); }
#screen-home .btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.hh-dot, .daily-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--neon); }
.plan-tag { display: inline-block; font-family: var(--font); font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line-2); white-space: nowrap; }
.plan-tag.free { color: var(--neon-text); border-color: var(--neon-line); background: var(--neon-soft); }
.plan-tag.pro { color: var(--pro); border-color: color-mix(in srgb, var(--pro) 45%, transparent); background: color-mix(in srgb, var(--pro) 10%, transparent); }

/* Saludo y progreso a la izquierda; el paciente del día flotando a la derecha */
.hh { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(20px, 4vw, 56px); align-items: center; }
.hh-copy { display: grid; gap: 18px; justify-items: start; min-width: 0; }
.hh-pill { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--neon-line); background: var(--neon-soft); font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--neon-text); }
.hh-pill .plan-chip { font-family: var(--font); letter-spacing: 0; text-transform: none; font-weight: 600; color: var(--ink-2); }
.hh-pill .plan-chip:empty { display: none; }
#reto-peek { display: none !important; }
.hh-title { margin: 0; font-family: var(--display); font-size: clamp(38px, 4.4vw, 58px); font-weight: 800; letter-spacing: -0.045em; line-height: 1.02; overflow-wrap: anywhere; }
.hh-lead { margin: 0; font-size: 17px; line-height: 1.5; color: var(--ink-2); max-width: 36ch; }
.hh-lead b { color: var(--ink); }
.hh-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hh-actions .btn[hidden] { display: none; }
.hh-proof { display: flex; flex-wrap: wrap; gap: 14px 40px; margin: 14px 0 0; padding: 0; list-style: none; }
.hh-proof li { display: grid; gap: 4px; align-content: start; max-width: 150px; }
.hh-proof li[hidden] { display: none; }
.hh-proof strong { font-family: var(--display); font-size: 36px; font-weight: 800; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--ink); }
.hh-proof span { font-size: 13.5px; line-height: 1.3; color: var(--muted); }
.hh-proof .num-row { display: inline-flex; align-items: center; gap: 6px; }
.hh-proof .flame { width: 24px; height: 24px; fill: var(--s3); stroke: var(--muted); stroke-width: 1.4; stroke-linejoin: round; }
.hh-streak.alive strong { color: var(--orange); }
.hh-streak.alive .flame { fill: var(--orange); stroke: none; }

/* El paciente del día: ilustración sin cara (se recorta la parte de arriba), ficha de cristal
   y tarjetas flotantes. La ficha es siempre oscura, también con el tema claro. */
.dp-visual { position: relative; padding: 10px 0 18px; min-width: 0; }
.dp { position: relative; overflow: hidden; aspect-ratio: 4 / 5; max-width: 420px; margin-inline: auto; border-radius: 28px; border: 1px solid var(--neon-line); background: #0b1216; box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.85), 0 0 60px -20px rgba(29, 255, 158, 0.35); transition: transform 0.3s var(--ease); }
.dp.done { border-color: var(--neon); }
.dp-img { position: absolute; left: 0; top: -30%; width: 100%; height: 130%; object-fit: cover; object-position: 50% 0; }
.dp-img[hidden] { display: none; }
.dp::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(0deg, rgba(4, 9, 7, 0.9) 0%, transparent 55%); }
.cine-box { position: absolute; z-index: 2; font-family: var(--mono); font-size: 15px; font-weight: 600; letter-spacing: 0.06em; color: #9effd0; background: rgba(2, 8, 6, 0.6); padding: 3px 8px; border-radius: 6px; }
.cine-box[hidden] { display: none; }
.dp-box { top: 14px; right: 14px; }
.dp-tag { position: absolute; z-index: 2; left: 5%; right: 5%; bottom: 5%; display: grid; gap: 8px; justify-items: start; padding: 16px 18px; border-radius: 20px; border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(8, 16, 13, 0.72); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: #ecfff6; }
.dp-k { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase; color: #1dff9e; }
.dp-k .hh-dot { background: #1dff9e; }
.dp-title { margin: 0; font-family: var(--display); font-size: clamp(20px, 2vw, 24px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.15; color: #fff; overflow-wrap: anywhere; }
.dp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0; font-size: 13px; color: #a9c2b7; }
.dp-meta:empty { display: none; }
.dp-meta > span:not(.plan-tag) + span:not(.plan-tag)::before { content: "·"; margin-right: 10px; }
.dp-tag .plan-tag.free { color: #1dff9e; border-color: rgba(29, 255, 158, 0.35); background: rgba(29, 255, 158, 0.1); }
.dp-tag .btn.primary { background: #1dff9e; border-color: #1dff9e; color: #01140a; }
.dp-tag > .btn[hidden], .dp-done[hidden] { display: none; }
.dp-done { display: grid; gap: 8px; justify-items: start; }
.dp-done .btn.ghost { color: #ecfff6; border-color: rgba(255, 255, 255, 0.25); }
.dp-ok { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 700; color: #1dff9e; }
.dp-ok svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.dp-float { position: absolute; z-index: 3; border-radius: 16px; padding: 12px 14px; border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(10, 18, 15, 0.86); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.8); color: #ecfff6; }
.dp-monitor { top: 30%; right: max(-4%, calc(50% - 300px)); width: 200px; font-family: var(--mono); }
.dp-mon-row { display: grid; grid-template-columns: auto 1fr auto 1fr; align-items: baseline; gap: 4px 8px; font-size: 11px; color: #6c8378; }
.dp-mon-row b { font-size: 19px; font-weight: 600; white-space: nowrap; }
.dp-mon-row .hr { color: #1dff9e; }
.dp-mon-row .spo2 { color: #5cc8ff; }
.dp-monitor svg { display: block; width: 100%; height: 34px; margin: 4px 0 2px; }
.dp-monitor polyline { fill: none; stroke: #1dff9e; stroke-width: 2; stroke-linejoin: round; }
.dp-monitor small { font-size: 10.5px; color: #6c8378; }
@media (prefers-reduced-motion: no-preference) {
  .dp-monitor { animation: dp-float 6s -2s ease-in-out infinite; }
  .dp-monitor polyline { stroke-dasharray: 420; stroke-dashoffset: 420; animation: dp-trace 2.6s linear infinite; }
  .idcard.dp-id { animation: dp-float 6.5s -4s ease-in-out infinite; }
}
@keyframes dp-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes dp-trace { to { stroke-dashoffset: -420; } }

/* Acreditación: flota sobre el escenario, pequeña y sin tapar la ficha del paciente */
.idcard.dp-id { position: absolute; z-index: 4; top: 5%; left: max(-10%, calc(50% - 320px)); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: center; width: 236px; padding: 10px 12px 10px 10px; overflow: hidden; border-radius: 16px; border: 1px solid var(--line-2); background: linear-gradient(135deg, color-mix(in srgb, var(--s2) 94%, transparent), color-mix(in srgb, var(--s1) 92%, transparent) 60%); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 20px 44px -16px rgba(0, 0, 0, 0.75); color: var(--ink); transition: border-color 0.2s; }
.idcard.dp-id::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, var(--neon), var(--orange)); }
.idcard.dp-id:hover, .idcard.dp-id:has(.bc-link:focus-visible) { border-color: var(--neon-line); }
.idcard .bc-photo { position: relative; width: 46px; height: 46px; margin-left: 2px; }
.idcard .bc-avatar { width: 46px; height: 46px; border-radius: 12px; overflow: hidden; background: #0f1b23; border: 1.5px solid var(--neon-line); line-height: 0; }
.idcard .bc-avatar svg, .idcard .bc-avatar img { width: 100%; height: 100%; display: block; }
.idcard .bc-edit { position: absolute; z-index: 2; right: -6px; bottom: -6px; display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 1.5px solid var(--s1); background: var(--neon); color: var(--on-accent); cursor: pointer; }
.idcard .bc-edit svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.idcard .bc-main { display: grid; gap: 1px; min-width: 0; }
.idcard .bc-name { margin: 0; font-family: var(--display); font-size: 15px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
/* Toda la tarjeta abre «Tu carrera»: el botón del nombre la cubre entera; el lápiz queda por encima */
.idcard .bc-link { display: block; max-width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.idcard .bc-link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.idcard .bc-link:focus-visible { outline: none; }
.idcard:hover .bc-link { color: var(--neon-text); }
.idcard .bc-link .unset { color: var(--muted); }
.idcard .bc-study { margin: 0; font-size: 12px; color: var(--muted); }
.idcard .bc-rank { display: grid; gap: 4px; margin-top: 4px; padding-top: 5px; border-top: 1px dashed var(--line-2); }
.idcard .bc-rank-row { margin: 0; font-size: 12.5px; }
.idcard .bc-rank-row b { color: var(--neon-text); font-weight: 700; }
.idcard .bc-bar { height: 5px; border-radius: 999px; background: var(--s3); overflow: hidden; }
.idcard .bc-bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--neon), var(--orange)); transition: width 0.8s var(--ease); }
.idcard .bc-xp { margin: 0; font-size: 11.5px; line-height: 1.35; color: var(--muted); }
.idcard .level-ring { display: none; }
/* La ficha flota sobre la foto del paciente del día y no debe bajar hasta su texto: con un
   rango largo («Adjunto/a de Endocrinología y Nutrición») crecía y tapaba el título. Rango y
   experiencia en una línea; el texto entero, al pasar el ratón (title). */
.idcard .bc-rank-row, .idcard .bc-xp { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Atendido, la tarjeta crecía hasta el monitor: la dificultad y la duración sobran. */
.dp.done .dp-meta { display: none; }

/* Cinta de especialidades, entre el saludo y la pregunta del adjunto */
#screen-home .hh-marquee { margin: 0; padding: 16px 0; background: transparent; border-block: 1px solid var(--line-2); }
#screen-home .hh-marquee-track span { font-size: clamp(16px, 2vw, 21px); font-weight: 600; color: var(--muted); }
#screen-home .reto-hero { margin: 0; }

/* Modo guardia: la pantalla del turno y el botón de llamar */
.guard-panel { position: relative; overflow: hidden; isolation: isolate; display: grid; gap: 18px; padding: clamp(20px, 3.6vw, 36px); border-radius: 28px; border: 1px solid var(--neon-line); background: radial-gradient(70% 120% at 0% 0%, rgba(29, 255, 158, 0.12), transparent 60%), radial-gradient(60% 120% at 100% 100%, rgba(255, 138, 31, 0.1), transparent 60%), var(--s1); box-shadow: var(--shadow); }
.m-kicker { display: flex; align-items: center; gap: 8px; margin: 0; font-family: var(--mono); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--neon-text); }
.m-kicker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--neon); }
.gp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(18px, 3vw, 32px); align-items: stretch; }
.gp-left { display: grid; gap: 18px; align-content: center; justify-items: start; min-width: 0; }
.gp-title { margin: 0; font-family: var(--display); font-size: clamp(36px, 5vw, 64px); font-weight: 800; letter-spacing: -0.05em; line-height: 0.95; }
.turn-screen { position: relative; overflow: hidden; width: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px 18px; padding: clamp(18px, 3vw, 30px); border-radius: 24px; background: #020403; border: 1px solid #12241c; font-family: var(--mono); color: #1dff9e; }
.turn-screen::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.3) 0 2px, transparent 2px 4px); pointer-events: none; }
.ts-col { display: grid; gap: 2px; min-width: 0; }
.ts-num, .ts-arrow { color: #1dff9e; }
.ts-k { font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase; color: #5b7d6c; }
.ts-num, .ts-box { font-size: clamp(34px, 3.6vw, 64px); font-weight: 600; line-height: 1; letter-spacing: 0.02em; white-space: nowrap; }
.ts-box { color: #ff8a1f; }
.ts-arrow { font-size: clamp(28px, 4vw, 44px); }
.ts-wait { grid-column: 1 / -1; font-size: 12.5px; letter-spacing: 0.12em; text-transform: uppercase; color: #a9c2b7; border-top: 1px dashed #1c3329; padding-top: 12px; }
.ts-wait b { color: #1dff9e; }
.call-btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; width: 100%; padding: 22px 28px; border-radius: 20px; border: 0; cursor: pointer; font-family: var(--display); font-weight: 800; font-size: clamp(20px, 2.6vw, 28px); letter-spacing: -0.01em; background: var(--neon); color: var(--on-accent); box-shadow: 0 6px 0 #0a7a4b; transition: transform 0.12s, box-shadow 0.12s; }
.call-btn .punch-led { width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.call-btn:active { transform: translateY(6px); box-shadow: 0 0 0 #0a7a4b; }
.call-btn.locked { background: var(--s3); color: var(--ink-2); box-shadow: 0 6px 0 var(--line-2); }
.gd-note { margin: 0; color: var(--ink-2); }
.gp-right { display: grid; min-height: 100%; }
.gp-empty { display: grid; place-items: center; align-content: center; gap: 10px; padding: 28px; text-align: center; border-radius: 26px; border: 2px dashed var(--line-2); background: repeating-linear-gradient(135deg, transparent 0 14px, rgba(255, 255, 255, 0.02) 14px 28px); color: var(--muted); }
.gp-empty svg { width: 64px; height: 64px; fill: none; stroke: var(--neon-text); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; opacity: 0.7; }
.gp-empty b { font-family: var(--display); font-size: 26px; color: var(--ink); }
.gp-empty span { max-width: 300px; }

/* Enlace a la sala de espera */
.next-zone { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 18px 22px; border-radius: 22px; border: 1px solid var(--line-2); background: none; color: var(--ink-2); font: inherit; font-size: 16px; text-align: left; cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.next-zone b { color: var(--ink); }
.next-zone > span:nth-child(2) { flex: 1; }
.next-zone > svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--neon-text); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.next-zone:hover { border-color: var(--neon-line); background: var(--neon-soft); }
.nz-faces { display: flex; flex-shrink: 0; }
.nz-faces img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: 50% 30%; border: 2px solid var(--s1); margin-left: -12px; background: #0a0f12; }
.nz-faces img:first-child { margin-left: 0; }

/* Lo de abajo del Inicio anterior que el esbozo no tiene: oculto, no borrado. La sala de
   espera sustituye a la banda del catálogo; Analíticas está en el menú (Laboratorio). */
#home-to-labs, #home-to-cases, #screen-home .home-section-head, #screen-home .dash-cards { display: none !important; }
#screen-home .home-lower { padding-top: 0; }

@media (max-width: 980px) {
  .hh { grid-template-columns: 1fr; }
  .dp-visual { max-width: 520px; width: 100%; margin-inline: auto; }
  .idcard.dp-id { left: max(8px, calc(50% - 250px)); }
  .gp-grid { grid-template-columns: 1fr; }
  .gp-empty { display: none; }
}
@media (max-width: 640px) {
  #screen-home .home-content:not(.home-lower) { gap: 22px; }
  .hh-proof { gap: 14px 24px; }
  .hh-proof strong { font-size: 30px; }
  .hh-proof li { max-width: 100px; }
  .hh-actions .btn { flex: 1 1 100%; justify-content: center; }
  .idcard.dp-id { top: 18px; left: 18px; width: 214px; }
  .dp-monitor { display: none; }
  .guard-panel { padding: 16px; gap: 12px; }
  .gp-title { font-size: 30px; }
  .turn-screen { padding: 14px; }
  .ts-num, .ts-box { font-size: 34px; }
  .ts-arrow { font-size: 22px; }
  .call-btn { padding: 16px 18px; font-size: 19px; }
  .next-zone { padding: 14px 16px; font-size: 15px; }
  .nz-faces img { width: 36px; height: 36px; }
}

/* ---------- Pregunta del adjunto (el reto del día, ADR 0107) ---------- */
.reto-hero {
  --reto-a: var(--orange);
  border-radius: 28px; border: 1px solid rgba(255, 138, 31, 0.4);
  background: radial-gradient(120% 140% at 0% 0%, rgba(255, 138, 31, 0.14), transparent 55%), radial-gradient(90% 120% at 100% 100%, rgba(29, 255, 158, 0.1), transparent 60%), var(--s1);
  box-shadow: 0 30px 70px -44px rgba(255, 138, 31, 0.8);
}
.reto-hero.done { border-color: var(--neon-line); box-shadow: 0 24px 60px -44px rgba(29, 255, 158, 0.7); }
.reto-hero-kicker { font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--reto-a); }
.reto-hero .daily-dot { background: var(--reto-a); box-shadow: 0 0 10px var(--reto-a); }
.reto-hero.done .reto-hero-kicker { color: var(--neon-text); }
.reto-hero.done .daily-dot { background: var(--neon); box-shadow: 0 0 10px var(--neon); }
.reto-hero-title { font-size: clamp(28px, 3.6vw, 42px); font-weight: 800; line-height: 1.06; letter-spacing: -0.035em; }
.reto-hero-setting { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.reto-chip { border-radius: 999px; font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); background: var(--s2); border: 1px solid var(--line-2); }
.reto-chip.mech { color: var(--neon-text); border-color: var(--neon-line); background: var(--neon-soft); font-family: var(--display); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; font-size: 11.5px; }
.reto-chip.xp { color: var(--orange); border-color: rgba(255, 138, 31, 0.4); background: rgba(255, 138, 31, 0.1); }
.reto-hero.done .reto-chip.xp { color: var(--neon-text); border-color: var(--neon-line); background: var(--neon-soft); }
.reto-hero-actions .btn.primary { background: var(--orange); border-color: var(--orange); color: #1d0c00; box-shadow: 0 14px 34px -14px rgba(255, 138, 31, 0.9); }
.reto-hero.done .reto-hero-actions .btn.primary { background: var(--neon); border-color: var(--neon); color: var(--on-accent); box-shadow: none; }
.reto-hero-side { border-radius: 22px; background: var(--s2); border: 1px solid var(--line-2); }
.reto-streak.alive strong { color: var(--orange); }
.reto-streak.alive .flame { fill: var(--orange); stroke: #ffb35c; filter: drop-shadow(0 0 10px rgba(255, 138, 31, 0.8)); }
.reto-week li.done .reto-day-dot { background: var(--neon); border-color: var(--neon); }
.reto-week li.today .reto-day-dot { border: 2px dashed var(--orange); background: rgba(255, 138, 31, 0.1); }
.reto-week li.today .reto-day-letter { color: var(--orange); font-weight: 600; }
.reto-hero-clock b { font-family: var(--mono); color: var(--ink); }
.reto-hero:not(.done) .reto-streak.alive ~ .reto-hero-clock b { color: var(--orange); }
.tab-btn .tab-dot { background: var(--orange); }

@media (prefers-reduced-motion: reduce) {
  .btn.primary:hover:not(:disabled) { filter: none; }
}

/* ---------- Cabecera: racha, plan, buzón, tema y cuenta (etapa 1) ---------- */
.topbar { gap: 8px; }
.topbar .topbar-center { flex: 1; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 999px; border: 1px solid var(--line-2); font: 600 13.5px/1 var(--font); color: var(--ink); background: none; white-space: nowrap; }
.chip[hidden] { display: none; }
.streak-chip svg { width: 16px; height: 16px; fill: var(--muted); }
.streak-chip.alive svg { fill: var(--orange); }
.streak-chip b { font-family: var(--mono); }
.plan-box { cursor: pointer; color: var(--neon-text); border-color: var(--neon-line); background: var(--neon-soft); gap: 8px; }
.plan-up { padding-left: 8px; border-left: 1px solid var(--neon-line); font-size: 11.5px; font-weight: 700; color: var(--pro); }
.plan-up[hidden] { display: none; }
.plan-box:hover .plan-up, .plan-box:focus-visible .plan-up { text-decoration: underline; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* Buzón y chat del equipo como botones de icono, con su contador */
.topbar .mailbox-btn { position: relative; width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 12px; }
.topbar .mailbox-btn > span { display: none; }
.topbar .mailbox-btn .mailbox-count { position: absolute; top: -6px; right: -6px; margin: 0; background: var(--hot); color: #fff; }
/* Opinión y problemas pasan a «Ayúdanos a mejorar»; dentro del caso siguen en la cabecera (ADR 0050) */
body.with-tabs #opinion-open, body.with-tabs #report-open { display: none; }
body.with-tabs .topbar .notice { display: none; }
.theme-toggle { width: 40px; height: 40px; display: grid; place-items: center; flex: none; border-radius: 12px; border: 1px solid var(--line-2); background: none; color: var(--ink); cursor: pointer; }
.theme-toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .i-moon, :root[data-theme="light"] .theme-toggle .i-sun { display: none; }
:root[data-theme="light"] .theme-toggle .i-moon { display: block; }
.theme-toggle:hover, .acct-btn:hover, .acct-btn[aria-expanded="true"] { border-color: var(--neon-line); }
.acct-btn { display: inline-flex; align-items: center; gap: 2px; height: 40px; padding: 0 6px 0 4px; flex: none; border-radius: 999px; border: 1px solid var(--line-2); background: none; color: var(--ink); cursor: pointer; }
.acct-btn[hidden] { display: none; }
.acct-av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--s3); font-family: var(--display); font-weight: 700; font-size: 14px; }
.acct-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.more-menu:not([hidden]) {
  position: absolute; top: calc(100% + 6px); right: 16px; z-index: 60; display: grid; gap: 2px;
  width: min(300px, calc(100vw - 24px)); padding: 8px; border-radius: 16px; border: 1px solid var(--line-2);
  background: var(--s1); box-shadow: var(--shadow);
}
.more-menu button { display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 12px; align-items: center; padding: 10px 12px; border: 0; border-radius: 12px; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.more-menu button:hover, .more-menu button:focus-visible { background: var(--s2); }
.more-menu svg { grid-row: span 2; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.more-menu span { font-weight: 600; font-size: 15px; }
.more-menu small { font-size: 12.5px; color: var(--muted); }
.mm-who { display: grid; gap: 2px; margin: 0 0 4px; padding: 6px 12px 10px; border-bottom: 1px solid var(--line); }
.mm-who small { font-size: 12.5px; color: var(--muted); }
@media (max-width: 560px) {
  .hide-xs, .plan-box { display: none !important; }
  .topbar .topbar-center { display: none; }
  /* Todo en una línea también a 375 px (antes el botón de la cuenta bajaba a otra línea) */
  .topbar { flex-wrap: nowrap; gap: 6px; padding-inline: 12px; }
  .topbar .brand { min-width: 0; flex: 0 1 auto; margin-right: auto; }
  .topbar .mailbox-btn, .theme-toggle { width: 36px; height: 36px; flex: none; }
  .acct-btn { height: 36px; }
  .acct-av { width: 28px; height: 28px; }
  /* Dentro de un caso la cabecera lleva además el aviso «Paciente sintético · educativo»,
     que debe verse siempre: baja a una segunda línea y el logo ya no se aplasta encima del
     correo. */
  .topbar .brand { flex: none; }
  body:not(.with-tabs) .topbar:has(.notice) { flex-wrap: wrap; height: auto; }
}

/* Planes y Cuenta salen del menú: están en el menú de la cuenta */
.tab-btn[data-screen="screen-plans"], .tab-btn[data-screen="screen-account"] { display: none !important; }
@media (min-width: 861px) {
  .tab-btn.tab-admin { margin-top: auto; }
}

/* ---------- Inicio: fuera lo que no está en el esbozo (oculto, no borrado) ---------- */
#home-founder, #screen-home .soon-band, #beta-thanks { display: none !important; }

/* ---------- Ayúdanos a mejorar ---------- */
.zone-wrap { max-width: 1060px; margin: 0 auto; padding: 30px clamp(16px, 4vw, 48px) 60px; }
.zone-head { margin-bottom: 22px; }
.zone-title { font-family: var(--display); font-size: clamp(28px, 4vw, 42px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.05; margin: 0; }
.zone-sub { font-size: 16px; margin-top: 10px; color: var(--ink-2); }
.neon { color: var(--neon-text); }
.help-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.help-card { text-align: left; display: grid; gap: 6px; padding: 24px; border-radius: 24px; border: 1px solid var(--line-2); background: var(--s1); color: var(--ink); font: inherit; cursor: pointer; transition: transform 0.25s var(--ease), border-color 0.25s; }
.help-card:hover { transform: translateY(-4px); border-color: var(--neon-line); }
.help-card b { font-family: var(--display); font-size: clamp(22px, 2.4vw, 28px); letter-spacing: -0.03em; }
.help-card small { color: var(--ink-2); font-size: 15px; }
.help-ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--neon-soft); color: var(--neon-text); margin-bottom: 8px; }
.help-ic.hot { background: color-mix(in srgb, var(--hot) 14%, transparent); color: var(--hot); }
.help-ic svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#screen-help .ideas-band { margin: 0; }
@media (max-width: 640px) { .help-grid { grid-template-columns: 1fr; } }

/* ---------- Cabecera de cada zona: planta y nombre (etapa 3, ADR 0138) ---------- */
.zone-head .eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-family: var(--mono); font-size: 12.5px; font-weight: 400; letter-spacing: 0.2em; text-transform: uppercase; color: var(--neon-text); }
.zone-head .eyebrow::before { content: ""; width: 26px; height: 1px; flex: none; background: var(--neon); }
.floor-tag { flex: none; font-weight: 700; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--neon-line); letter-spacing: 0.06em; }

/* ---------- Sala de espera ---------- */
#screen-cases .zone-wrap { max-width: 1180px; }
#screen-cases .sound-tip[hidden], #screen-cases .old-filters[hidden] { display: none; }
.sala-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.sala-specs { margin-top: 10px; }
.sala-specs .pill { font-size: 13px; padding: 6px 12px; }
.sala-filters .pill { display: inline-flex; align-items: center; gap: 0; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; font-family: var(--font); font-size: 13.5px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--ink-2); cursor: pointer; }
.sala-filters .pill[hidden] { display: none; }
.sala-filters .pill:hover { border-color: var(--neon-line); color: var(--ink); }
.sala-filters .pill.on { background: var(--neon); color: var(--on-accent); border-color: transparent; font-weight: 600; }
.sala-filters .pill b { font-family: var(--mono); margin-left: 6px; opacity: 0.7; }
.sala-empty { margin: 16px 0 0; }
.plist { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.pcard { position: relative; display: grid; gap: 8px; align-content: start; padding: 0 22px 22px; border-radius: 24px; overflow: hidden; border: 1px solid var(--line-2); background: var(--s1); color: var(--ink); cursor: pointer; transition: transform 0.3s var(--ease), border-color 0.3s; }
.pcard:hover, .pcard:focus-visible { transform: translateY(-4px); border-color: var(--neon-line); }
.pcard.urgent { border-color: color-mix(in srgb, var(--hot) 55%, transparent); }
.pcard.today { border-color: var(--neon-line); }
/* Sin cara: la ilustración se corta por arriba, solo se ve el cuerpo */
.p-art { position: relative; margin: 0 -22px 6px; aspect-ratio: 16 / 8; overflow: hidden; background: #0a0f12; }
.p-art img { position: absolute; left: 0; top: 0; width: 100%; height: auto; translate: 0 -22%; filter: saturate(0.9) brightness(0.92); transition: transform 0.8s var(--ease), filter 0.5s; }
.p-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--s1) 0%, transparent 60%); pointer-events: none; }
.pcard:hover .p-art img { transform: scale(1.05); filter: none; }
.pcard.locked .p-art img { filter: saturate(0.5) brightness(0.75); }
.p-lock { position: absolute; right: 10px; top: 10px; z-index: 2; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #2a1a00; background: linear-gradient(180deg, #ffd27a, #d9a32c); }
.p-lock svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.p-num { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.pcard h3 { display: block; margin: 0; font-family: var(--display); font-size: 23px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; text-transform: none; color: var(--ink); overflow-wrap: anywhere; }
.pcard h3::before, .box-sheet .sh-body h2::before { content: "«"; color: var(--neon-text); }
.pcard h3::after, .box-sheet .sh-body h2::after { content: "»"; color: var(--neon-text); }
.p-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.pill-s { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); }
.pill-s.hot { color: var(--hot); border-color: color-mix(in srgb, var(--hot) 45%, transparent); background: color-mix(in srgb, var(--hot) 10%, transparent); }
.pill-s.live { color: var(--neon-text); border-color: var(--neon-line); background: var(--neon-soft); }
.pill-s.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.best { font-size: 13.5px; color: var(--ink-2); }
.best.none { color: var(--muted); }
.best.live { color: var(--neon-text); font-weight: 600; }

/* ---------- Puerta del box ---------- */
.box-sheet, .gate { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgba(1, 4, 3, 0.78); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); overflow-y: auto; }
.gate { z-index: 95; }
.box-sheet[hidden], .gate[hidden] { display: none; }
.box-sheet-card { width: min(100%, 620px); overflow: hidden; border-radius: 28px; border: 1px solid var(--line-2); background: var(--s1); box-shadow: var(--shadow); color: var(--ink); }
.sh-art { position: relative; height: 170px; overflow: hidden; background: #0a0f12; }
.sh-art img { position: absolute; left: 0; top: 0; width: 100%; height: auto; translate: 0 -22%; }
.sh-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--s1) 0%, transparent 70%); }
.sh-art .cine-box { top: 14px; left: 16px; }
.sh-art .cine-box:empty { display: none; }
.sh-x { position: absolute; z-index: 2; top: 12px; right: 12px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, 0.55); color: #fff; cursor: pointer; }
.sh-x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.sh-body { display: grid; gap: 12px; padding: 4px clamp(18px, 3.4vw, 30px) clamp(18px, 3.4vw, 26px); }
.sh-body h2 { margin: 0; font-family: var(--display); font-size: clamp(26px, 4vw, 36px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.05; overflow-wrap: anywhere; }
.sh-record { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 12px 14px; border-radius: 14px; background: var(--s2); border: 1px solid var(--line-2); font-size: 14px; color: var(--ink-2); }
.sh-record[hidden] { display: none; }
.sh-record b { color: var(--ink); }
.sh-record.live { flex-wrap: nowrap; border-color: var(--neon-line); background: var(--neon-soft); }
.sh-link { margin-left: auto; border: 0; background: none; padding: 0; color: var(--neon-text); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.sh-link[hidden] { display: none; }
.sh-pulse { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--neon); }
.choices { display: grid; gap: 10px; }
.choice { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; border: 1px solid var(--line-2); background: var(--s2); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: transform 0.15s var(--ease), border-color 0.2s; }
.choice:hover { transform: translateY(-2px); border-color: var(--neon-line); }
.choice.main { background: var(--neon); color: var(--on-accent); border-color: transparent; }
.choice.main .ch-sub { color: inherit; opacity: 0.8; }
.choice.hot { border-color: color-mix(in srgb, var(--orange) 55%, transparent); }
.choice.main.hot { background: var(--orange); color: #1a0b00; }
.ch-ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 24px; background: var(--s3); overflow: hidden; }
.choice.main .ch-ico { background: rgba(0, 0, 0, 0.14); }
.ch-ico img { width: 100%; height: 100%; object-fit: cover; }
.ch-t { display: grid; gap: 2px; min-width: 0; }
.ch-t b { font-family: var(--display); font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.ch-sub { font-size: 13.5px; color: var(--ink-2); line-height: 1.35; }
.ch-tag { flex: none; padding: 4px 9px; border-radius: 999px; font-family: var(--mono); font-size: 11px; font-weight: 600; border: 1px solid var(--line-2); color: var(--muted); }
.ch-tag.pro { color: var(--pro); border-color: color-mix(in srgb, var(--pro) 50%, transparent); }
.choice.locked .ch-ico img { filter: grayscale(1) brightness(0.7); }
.choice.off { cursor: default; opacity: 0.55; }
.choice.off:hover { transform: none; border-color: var(--line-2); }
.sh-foot { margin: 0; font-size: 13px; color: var(--muted); text-align: center; }

/* ---------- Lector de tarjetas (control de acceso) ---------- */
.gate-card { width: min(100%, 460px); display: grid; gap: 14px; padding: clamp(22px, 4vw, 32px); border-radius: 28px; border: 1px solid var(--line-2); background: var(--s1); box-shadow: var(--shadow); color: var(--ink); }
.gate-card h2 { margin: 0; font-family: var(--display); font-size: clamp(22px, 3vw, 28px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.gate-p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.m-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.m-foot .btn[hidden] { display: none; }
.reader { position: relative; height: 170px; border-radius: 20px; background: linear-gradient(170deg, #1a2420, #0b110e 70%); border: 1px solid #22332c; overflow: hidden; }
.reader-slot { position: absolute; left: 24px; right: 24px; top: 44px; height: 8px; border-radius: 4px; background: #000; box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.9); }
.reader-led { position: absolute; right: 24px; top: 16px; width: 12px; height: 12px; border-radius: 50%; background: #3a4a43; }
.gate.denied .reader-led { background: #ffb020; box-shadow: 0 0 10px rgba(255, 176, 32, 0.6); }
.reader-screen { position: absolute; left: 24px; top: 12px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em; color: #1dff9e; }
.gate.denied .reader-screen { color: #ff5f7a; }
.badge-card { position: absolute; left: 50%; top: 66px; width: 200px; height: 120px; margin-left: -100px; padding: 14px 16px; border-radius: 12px; background: #fbfaf5; color: #15201b; display: grid; align-content: end; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); transform: translateY(26px) rotate(3deg); }
.bc-stripe { position: absolute; left: 0; right: 0; top: 18px; height: 16px; background: #15201b; }
.badge-card b { font-family: var(--display); font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge-card small { font-family: var(--mono); font-size: 11px; color: #6d7c75; }
@media (prefers-reduced-motion: no-preference) {
  .gate.swipe .badge-card { animation: badge-swipe 1.6s var(--ease) forwards; }
}
@keyframes badge-swipe {
  0% { transform: translateY(120px) rotate(-4deg); }
  45%, 60% { transform: translateY(-14px) rotate(0); }
  100% { transform: translateY(26px) rotate(3deg); }
}

@media (max-width: 640px) {
  .sala-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
  .sala-filters::-webkit-scrollbar { display: none; }
  .sala-filters .pill { flex: none; white-space: nowrap; }
  .plist { grid-template-columns: 1fr; gap: 14px; }
  .pcard { padding: 0 16px 16px; }
  .p-art { margin: 0 -16px 2px; aspect-ratio: 16 / 9; }
  .pcard h3 { font-size: 20px; }
  .choice { grid-template-columns: 44px minmax(0, 1fr); }
  .ch-ico { width: 44px; height: 44px; }
  .ch-tag { grid-column: 2; justify-self: start; }
  .sh-art { height: 130px; }
}

/* ---------- Menú (etapa 4, ADR 0139): Hoy, Sala de espera, Ascensor, Cafetería y Mi ficha ----------
   La pregunta del adjunto y el Laboratorio son plantas del Ascensor: sus pestañas siguen en la
   página (career.js usa el punto del reto) pero no se ven. En el móvil quedan cinco: Inicio,
   Pacientes, Simuladores, Comunidad y Mi progreso. */
.tab-btn.tab-reto, .tab-btn[data-screen="screen-labs"] { display: none !important; }
.dock-help { display: none; }
@media (min-width: 861px) {
  .dock-help { display: block; margin-top: auto; padding: 8px 12px; border: 0; background: none; font: inherit; font-size: 13px; color: var(--muted); text-align: left; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
  .dock-help:hover { color: var(--ink); }
  .tab-btn.tab-admin { margin-top: 4px; }
}

/* ---------- Ascensor ---------- */
#screen-lift .zone-wrap { max-width: 1180px; }
.lift-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); gap: 20px; align-items: stretch; }
.lift { display: grid; gap: 12px; align-content: start; padding: 20px; border-radius: 30px; background: linear-gradient(170deg, #1a2420, #0b110e 70%); border: 1px solid #22332c; box-shadow: var(--shadow); }
.lift-display { position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 16px; background: #020403; border: 1px solid #12241c; font-family: var(--mono); color: #ff8a1f; }
.lift-display::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.3) 0 2px, transparent 2px 4px); pointer-events: none; }
.lift-display #lift-floor { font-size: 44px; font-weight: 600; line-height: 1; }
.ld-arrow { font-size: 18px; }
.ld-name { margin-left: auto; font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; color: #ffb36b; }
.floor-btn { display: grid; grid-template-columns: 56px 52px minmax(0, 1fr); align-items: center; gap: 14px; width: 100%; padding: 12px 16px 12px 12px; border-radius: 16px; text-decoration: none; text-align: left; font: inherit; color: #ecfff6; background: linear-gradient(180deg, #1c2823, #121a17); border: 1px solid #2a3b34; box-shadow: 0 3px 0 #050807; cursor: pointer; transition: transform 0.12s, box-shadow 0.12s, border-color 0.2s; }
.floor-btn:hover, .floor-btn.sel { border-color: var(--c, #3a4a43); }
.floor-btn:active { transform: translateY(3px); box-shadow: 0 0 0 #050807; }
.fb-n { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-size: 17px; font-weight: 700; border: 2px solid var(--c, #3a4a43); color: var(--c, #6c8378); box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.35); transition: background 0.2s, color 0.2s; }
.floor-btn:not(.works):hover .fb-n, .floor-btn.sel:not(.works) .fb-n { background: var(--c); color: #04110b; }
.floor-btn img { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; background: #0a0f12; }
.fb-t { display: grid; gap: 1px; min-width: 0; }
.fb-t b { font-family: var(--display); font-size: 19px; }
.fb-t small { color: #a9c2b7; font-size: 13px; }
/* En obras o de baja: en gris, sin enlace */
.floor-btn.works { opacity: 0.6; cursor: default; box-shadow: none; }
.floor-btn.works:active { transform: none; }
.floor-btn.works img { filter: grayscale(1); }
.floor-btn.baja .fb-t small { color: #ff8094; font-weight: 600; }
.fb-obras { justify-self: start; display: inline-flex; align-items: center; margin-top: 4px; padding: 2px 8px 2px 22px; border-radius: 6px; font-style: normal; font-size: 11px; font-weight: 700; color: #1a1200; background: linear-gradient(90deg, transparent 16px, #ffc53d 16px), repeating-linear-gradient(135deg, #ffc53d 0 5px, #1a1200 5px 8px); }
.fb-beta { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; vertical-align: 2px; color: #04110b; background: var(--c, #7cc8ff); }
.lift-portrait { position: relative; margin: 0; overflow: hidden; border-radius: 30px; background: #0a0f12; border: 1px solid var(--line-2); min-height: 420px; box-shadow: var(--shadow); }
.lift-portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.lift-portrait::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(2, 6, 4, 0.92)); }
.lift-portrait figcaption { position: absolute; left: 24px; bottom: 22px; z-index: 1; color: #ecfff6; }
.lift-portrait small { display: block; font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: #1dff9e; }
.lift-portrait b { font-family: var(--display); font-size: clamp(30px, 3.2vw, 44px); letter-spacing: -0.04em; }
.lift-portrait.works img, .lift-portrait.baja img { filter: grayscale(1) brightness(0.7); }
.lift-portrait.baja::before { content: "DE BAJA"; position: absolute; z-index: 2; top: 28px; right: -46px; width: 200px; padding: 8px 0; text-align: center; transform: rotate(35deg); font-family: var(--mono); font-weight: 700; letter-spacing: 0.24em; background: var(--hot); color: #fff; }
@media (max-width: 980px) {
  .lift-wrap { grid-template-columns: 1fr; }
  .lift-portrait { min-height: 0; aspect-ratio: 4 / 3; order: -1; }
  .lift-portrait img { object-position: 50% 12%; }
}
@media (max-width: 640px) {
  .lift { padding: 14px; border-radius: 24px; }
  .floor-btn { grid-template-columns: 42px 40px minmax(0, 1fr); gap: 10px; padding: 10px; }
  .fb-n { width: 42px; height: 42px; font-size: 14px; }
  .floor-btn img { width: 40px; height: 40px; }
  .fb-t b { font-size: 17px; }
  .lift-portrait { aspect-ratio: auto; height: 150px; border-radius: 22px; }
  .lift-portrait img { object-position: 50% 8%; }
  .lift-portrait figcaption { left: 16px; bottom: 12px; }
  .lift-portrait b { font-size: 24px; }
}

/* Punto de «la pregunta de hoy está sin hacer» en la planta P1 */
.floor-btn { position: relative; }
.fb-dot { position: absolute; top: 10px; right: 12px; left: auto; width: 10px; height: 10px; background: var(--orange); }

/* ---------- Planta: las preguntas del adjunto (etapa 5, ADR 0142) ---------- */
#screen-floor .zone-wrap { max-width: 1180px; }
.pl-hero { --ink: #ffffff; --ink-2: rgba(255, 255, 255, 0.8); --muted: rgba(255, 255, 255, 0.58); --s2: rgba(255, 255, 255, 0.06); --line: rgba(255, 255, 255, 0.12); --line-2: rgba(255, 255, 255, 0.18); --neon-text: #1dff9e; --neon-line: rgba(29, 255, 158, 0.4); position: relative; overflow: hidden; isolation: isolate; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: end; margin-bottom: 24px; padding: clamp(24px, 4vw, 44px) clamp(24px, 4vw, 48px) 0; border-radius: 32px; background: #090e14; color: var(--ink); box-shadow: var(--shadow); }
.pl-hero img { width: 100%; max-height: 440px; object-fit: contain; object-position: bottom; display: block; }
.pl-copy { align-self: center; display: grid; gap: 16px; padding-bottom: clamp(24px, 4vw, 44px); min-width: 0; }
.pl-copy .zone-title { font-size: clamp(38px, 5.6vw, 72px); line-height: 0.95; color: #fff; }
.pl-copy .zone-sub { margin: 0; max-width: 520px; color: var(--ink-2); }
.pl-plan { display: inline-flex; align-items: center; gap: 8px; justify-self: start; margin: 0; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 13.5px; color: var(--ink-2); }
.pl-plan[hidden] { display: none; }
.pl-plan svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pl-stats { display: flex; flex-wrap: wrap; gap: 12px; margin: 4px 0 0; }
.pl-stats div { min-width: 130px; padding: 12px 16px; border-radius: 16px; background: var(--s2); border: 1px solid var(--line); }
.pl-stats dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.pl-stats dd { margin: 4px 0 0; font-family: var(--display); font-size: 34px; font-weight: 800; line-height: 1; }
.pl-stats div:nth-child(1) dd { color: var(--neon-text); }
.rq-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 14px; }
.rq { display: grid; grid-template-columns: 72px minmax(0, 1fr) 112px 160px; align-items: center; gap: 22px; padding: 16px 20px; border-radius: 22px; border: 1px solid var(--line-2); background: var(--s1); transition: transform 0.2s var(--ease), border-color 0.2s; }
.rq:hover { transform: translateY(-2px); border-color: var(--neon-line); }
.rq-date { display: grid; justify-items: center; padding: 10px 0; border-radius: 16px; background: var(--s2); font-family: var(--mono); font-size: 11px; text-transform: uppercase; color: var(--muted); }
.rq-date b { font-family: var(--display); font-size: 28px; line-height: 1; color: var(--ink); text-transform: none; }
.rq-today .rq-date b { font-size: 20px; color: var(--neon-text); }
.rq-body { display: grid; gap: 6px; min-width: 0; }
.rq-body small { font-family: var(--mono); font-size: 11.5px; color: var(--neon-text); }
.rq-body b { font-size: 19px; line-height: 1.25; overflow-wrap: anywhere; }
.rq-st { justify-self: center; font-family: var(--mono); font-size: 11.5px; font-weight: 600; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.rq-done .rq-st { color: var(--neon-text); border-color: var(--neon-line); background: var(--neon-soft); }
.rq-today { border-color: var(--neon-line); }
.rq-today .rq-st { color: var(--on-accent); background: var(--neon); border-color: transparent; }
.rq-go { justify-self: stretch; padding: 12px 16px; border-radius: 14px; border: 0; background: var(--neon); color: var(--on-accent); font: inherit; font-weight: 800; cursor: pointer; white-space: nowrap; }
.rq-go em { font-style: normal; font-family: var(--mono); font-size: 11px; font-weight: 600; opacity: 0.75; margin-left: 4px; }
.rq-done .rq-go { background: var(--s3); color: var(--ink); }
.rq-locked .rq-go { background: var(--s3); color: var(--ink-2); }
.rq-locked .rq-go em { color: var(--pro); opacity: 1; }
@media (max-width: 860px) {
  .pl-hero { grid-template-columns: 150px minmax(0, 1fr); }
  .rq { grid-template-columns: 64px minmax(0, 1fr) 130px; }
  .rq-st { display: none; }
}
@media (max-width: 640px) {
  .pl-hero { grid-template-columns: 1fr; padding: 24px 20px 0; }
  .pl-hero img { position: absolute; right: 6px; bottom: 0; width: auto; height: 190px; max-height: none; z-index: 0; }
  .pl-copy { position: relative; z-index: 1; padding-bottom: 24px; }
  .pl-stats, .pl-plan { margin-right: 76px; }
  .pl-stats { flex-wrap: nowrap; }
  .pl-stats div { min-width: 0; flex: 1; }
  .rq { grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px 14px; padding: 14px; }
  .rq-date { grid-row: 1 / span 2; align-self: start; }
  .rq-body { grid-column: 2 / -1; }
  .rq-st { display: inline-block; grid-column: 2; grid-row: 2; justify-self: start; }
  .rq-go { grid-column: 3; grid-row: 2; padding: 10px 14px; }
}

/* ---------- Cafetería (etapa 6, ADR 0143): pestañas Amigos / Grupos / Clasificación ---------- */
#screen-board { max-width: 1180px; margin: 0 auto; padding: 30px clamp(16px, 4vw, 48px) 60px; }
.cf-head { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 16px; margin-bottom: 16px; }
.cf-head .eyebrow { margin: 0 0 8px; font-family: var(--mono); font-size: 12.5px; font-weight: 400; letter-spacing: 0.2em; text-transform: uppercase; color: var(--neon-text); }
.cf-head .zone-sub { margin: 6px 0 0; }
.cf-cups { width: 150px; height: auto; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.cf-cups .cc-wire { stroke: var(--line-2); stroke-width: 2; }
.cf-cups .cc-lamp { fill: #c9771f; stroke: none; }
.cf-cups .cc-light { fill: rgba(255, 157, 61, 0.16); stroke: none; }
.cf-cups .cc-board { fill: #10261d; stroke: #8a5a33; stroke-width: 4; }
.cf-cups .cc-chalk { stroke: rgba(255, 255, 255, 0.75); stroke-width: 2.4; stroke-dasharray: 3 4; }
.cf-cups .cc-chalk-dot { fill: none; stroke: #1dff9e; stroke-width: 2.4; }
.cf-cups .cc-cup { stroke: var(--ink-2); stroke-width: 2.4; fill: var(--s1); }
.cf-cups .cc-2 { stroke: #c9771f; }
.cf-cups .cc-steam { stroke: var(--neon-text); stroke-width: 2; opacity: 0.7; }
.cf-cups .cc-bar { stroke: var(--line-2); stroke-width: 3; }
.cf-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; margin-bottom: 18px; border-radius: 16px; background: var(--s2); border: 1px solid var(--line); }
.cf-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 8px 12px; border: 0; border-radius: 12px; background: none; color: var(--ink-2); font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; }
.cf-tabs button:hover { color: var(--ink); background: var(--s1); }
.cf-tabs button[aria-selected="true"] { background: var(--s1); color: var(--neon-text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
.cf-tabs svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.cf-panel { display: grid; gap: 16px; }
.cf-panel[hidden] { display: none; }
.cf-row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 16px; align-items: start; }
.cf-card { display: grid; gap: 12px; align-content: start; padding: clamp(16px, 2.4vw, 22px); border-radius: 22px; border: 1px solid var(--line-2); background: var(--s1); color: var(--ink); }
.cf-h { margin: 0; font-family: var(--display); font-size: 18px; font-weight: 800; letter-spacing: -0.01em; text-transform: none; color: var(--ink); }
.cf-k { margin: 0; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.cf-hint { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.cf-hint[hidden] { display: none; }
.cf-count { font-weight: 600; color: var(--muted); }
.cf-list-head { display: grid; gap: 2px; }
.cf-mycode { background: radial-gradient(90% 120% at 100% 0%, var(--neon-soft), transparent 70%), var(--s1); border-color: var(--neon-line); }
.cf-code { margin: 0; font-family: var(--mono); font-size: clamp(30px, 4.4vw, 40px); font-weight: 700; letter-spacing: 0.22em; user-select: all; }
.cf-mycode .btn { justify-self: start; display: inline-flex; align-items: center; gap: 8px; }
.cf-mycode .btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cf-form { display: grid; gap: 8px; }
.cf-form > label { font-weight: 700; font-size: 14.5px; color: var(--ink); }
.cf-form > label small { font-weight: 500; color: var(--muted); margin-left: 4px; }
.cf-inline { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.cf-form input:not([type=radio]):not([type=checkbox]), .cf-form textarea, .cf-form select { width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg); color: var(--ink); font: inherit; font-size: 16px; }
.cf-form input:focus, .cf-form textarea:focus, .cf-form select:focus { outline: none; border-color: var(--neon-line); box-shadow: 0 0 0 3px var(--neon-soft); }
.cf-form .btn, .cf-preview .btn { min-height: 46px; white-space: nowrap; }
.cf-msg:empty { display: none; }
.cf-msg { margin: 0; padding: 10px 12px; border-radius: 12px; font-size: 14px; line-height: 1.5; background: var(--s2); color: var(--ink-2); }
.cf-preview:not([hidden]) { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; border: 1px dashed var(--neon-line); background: var(--s2); }
.cf-preview[hidden] { display: none; }
.cf-av { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; overflow: hidden; background: var(--s3); flex: none; line-height: 0; }
.cf-av svg { width: 100%; height: 100%; }
.cf-preview .cf-av { width: 64px; height: 64px; }
.cf-who { display: grid; gap: 1px; min-width: 0; }
.cf-who b { font-size: 16px; overflow-wrap: anywhere; }
.cf-who small { font-size: 13px; color: var(--muted); }
.cf-people { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cf-person { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--s2); }
.cf-person .cf-av, .cf-person .mono { width: 44px; height: 44px; }
/* La racha como fueguito y número */
.cf-streak { display: inline-flex; align-items: center; gap: 4px; font-family: var(--display); font-size: 18px; font-weight: 800; color: var(--muted); }
.cf-flame { width: 20px; height: 20px; fill: var(--s3); stroke: var(--muted); stroke-width: 1.4; stroke-linejoin: round; }
.cf-streak.alive { color: var(--orange); }
.cf-streak.alive .cf-flame { fill: var(--orange); stroke: none; }
.cf-empty { margin: 0; padding: 16px; border-radius: 16px; border: 1px dashed var(--line-2); font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.cf-empty[hidden] { display: none; }
/* Grupos y clasificación: las vistas de siempre, sin su botón de volver (ya hay pestañas) */
#league-groups > [data-league-back] { display: none; }
#league-groups .league-head, #league-main .league-head .display { display: none; }
#screen-board .league-card { border-radius: 22px; border: 1px solid var(--line-2); background: var(--s1); }

/* La mesa del fondo: tarjeta en la cafetería y su pantalla */
.club-card { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: center; gap: 20px; margin-top: 24px; padding: clamp(22px, 4vw, 40px); border-radius: 32px; border: 1px solid rgba(201, 162, 255, 0.45); background: radial-gradient(70% 120% at 100% 50%, rgba(140, 80, 255, 0.25), transparent 60%), radial-gradient(60% 100% at 0% 100%, rgba(255, 197, 61, 0.12), transparent 60%), #0d0a14; color: #f3eefc; box-shadow: var(--shadow); }
.club-body { display: grid; gap: 12px; justify-items: start; }
.club-k, .fo-k { margin: 0; font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: #c9a2ff; }
.club-card h2 { margin: 0; font-family: var(--display); font-size: clamp(32px, 5vw, 56px); font-weight: 800; letter-spacing: -0.05em; line-height: 0.95; color: #f3eefc; }
.club-card p { margin: 0; color: #c8bedb; max-width: 520px; }
.club-perks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.club-perks li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; border: 1px solid rgba(201, 162, 255, 0.35); font-size: 14px; }
.club-perks svg, .club-door svg { width: 18px; height: 18px; fill: none; stroke: #ffc53d; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.club-card .btn.primary, #screen-table .btn.primary { background: linear-gradient(90deg, #ffc53d, #c9a2ff); border-color: transparent; color: #1a0f2e; }
.club-art { display: grid; place-items: center; min-height: 200px; }
.club-door { width: 160px; height: 220px; border-radius: 80px 80px 10px 10px; display: grid; place-items: center; align-content: center; gap: 12px; border: 2px solid rgba(255, 197, 61, 0.6); background: linear-gradient(180deg, rgba(140, 80, 255, 0.35), rgba(20, 10, 40, 0.9)); }
.club-door svg { width: 44px; height: 44px; }
.club-door span { font-family: var(--mono); font-size: 12px; letter-spacing: 0.3em; color: #ffc53d; }
.club-card:not(.locked) .club-door svg { display: none; }
.club-card:not(.locked) .club-door span { color: #c9a2ff; }
/* Zona Pro del Inicio anterior (ADR 0080): la sustituye la mesa del fondo; oculta, no borrada */
#club-panel { display: none !important; }
/* Ya no se promete ver lo nuevo antes (ADR 0148): el bloque «Antes que nadie» se oculta, no se borra. */
.club-early { display: none !important; }

#screen-table .zone-wrap { max-width: 1180px; }
.fo-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; padding: 0; border: 0; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.fo-back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fo-back:hover { color: var(--ink); }
.fo-hero { margin-bottom: 20px; padding: clamp(22px, 4vw, 40px); border-radius: 32px; border: 1px solid rgba(201, 162, 255, 0.45); background: radial-gradient(70% 120% at 100% 0%, rgba(140, 80, 255, 0.3), transparent 60%), radial-gradient(60% 100% at 0% 100%, rgba(255, 197, 61, 0.12), transparent 60%), #0d0a14; color: #f3eefc; }
.fo-hero h1 { margin: 10px 0 0; font-family: var(--display); font-size: clamp(36px, 6vw, 64px); font-weight: 800; letter-spacing: -0.05em; line-height: 0.95; color: #f3eefc; }
.fo-sub { margin: 12px 0 0; max-width: 520px; color: #c8bedb; font-size: 16px; }
.fo-tabs button[aria-selected="true"] { background: linear-gradient(90deg, #ffc53d, #c9a2ff); color: #1a0f2e; }
.fo-panel[hidden] { display: none; }
#fo-chat .btn { justify-self: start; }
.fo-note { margin: 0; font-size: 13px; color: var(--muted); }
#fo-caso:not([hidden]) { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(18px, 3vw, 32px); }
.fo-check { display: flex; align-items: flex-start; gap: 10px; margin: 8px 0 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.fo-check input { margin-top: 3px; width: 18px; height: 18px; accent-color: #9a6cff; flex: none; }
.fo-mine { display: grid; gap: 12px; align-content: start; }
.fo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.fo-list li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-items: start; padding: 14px; border-radius: 18px; border: 1px solid var(--line); background: var(--s2); }
.fo-list p { margin: 0; font-size: 14.5px; color: var(--ink); line-height: 1.4; overflow-wrap: anywhere; }
.fo-list p small { display: block; margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.fo-st { padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; border: 1px solid var(--line-2); color: var(--ink-2); }
.fo-st.ok { color: var(--neon-text); border-color: var(--neon-line); background: var(--neon-soft); }
.fo-st.wait { color: #c98a00; border-color: rgba(255, 197, 61, 0.5); background: rgba(255, 197, 61, 0.12); }
.fo-soon li { grid-template-columns: 58px minmax(0, 1fr); align-items: center; gap: 14px; }
.fo-date { display: grid; place-items: center; align-content: center; width: 58px; height: 58px; border-radius: 16px; background: #0d0a14; color: #c9a2ff; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; line-height: 1.1; }
.fo-date b { font-family: var(--display); font-size: 22px; color: #ffc53d; letter-spacing: 0; }
.fo-date.fo-test { font-size: 10px; color: #ffc53d; border: 1px dashed rgba(255, 197, 61, 0.6); }
.fo-soon p b { display: block; font-size: 16px; color: var(--ink); }
.fo-soon p { color: var(--ink-2); }

@media (max-width: 860px) {
  .cf-row2, #fo-caso:not([hidden]) { grid-template-columns: 1fr; }
  .club-card { grid-template-columns: 1fr; }
  .club-art { display: none; }
}
@media (max-width: 640px) {
  #screen-board { padding: 20px 16px 40px; }
  .cf-head { grid-template-columns: 1fr; }
  .cf-cups { position: absolute; right: 0; top: 0; width: 84px; opacity: 0.85; }
  .cf-head-copy { padding-right: 80px; }
  .cf-tabs button { flex-direction: column; gap: 2px; min-height: 52px; font-size: 13.5px; padding: 6px 4px; }
  .cf-inline { grid-template-columns: 1fr; }
  .cf-preview:not([hidden]) { grid-template-columns: auto minmax(0, 1fr); }
  .cf-preview .btn { grid-column: 1 / -1; }
}
#screen-board > .club-card { width: 100%; max-width: none; justify-self: stretch; }
/* Móvil con el botón del chat del equipo (Contratado y Fundador): la marca se queda en la cruz */
@media (max-width: 560px) {
  .topbar:has(#club-open:not([hidden])) .brand-text { display: none; }
}

/* ---------- Fichar al entrar (ADR 0144) ---------- */
#screen-clockin:not([hidden]) { position: relative; overflow: hidden; min-height: calc(100vh - var(--top-h)); display: grid; place-items: center; padding: 40px 16px; background: radial-gradient(60% 50% at 50% 0%, var(--neon-soft), transparent 70%), linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 44px 44px, linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 44px 44px, var(--bg); }
.gd-inner { position: relative; z-index: 1; width: min(100%, 760px); display: grid; gap: 20px; justify-items: center; text-align: center; }
.sign { display: inline-flex; align-items: center; gap: 12px; margin: 0; padding: 8px 14px 8px 12px; border: 1px solid var(--neon-line); border-radius: 999px; background: var(--neon-soft); font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.18em; }
.sign-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--neon); }
.sign-text { color: var(--neon-text); font-weight: 600; }
.sign-open { color: var(--muted); letter-spacing: 0.06em; border-left: 1px solid var(--line-2); padding-left: 12px; }
.gd-title { margin: 0; font-family: var(--display); font-size: clamp(36px, 6.4vw, 70px); font-weight: 800; letter-spacing: -0.05em; line-height: 0.98; overflow-wrap: anywhere; }
.clockin { width: 100%; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px 22px; align-items: center; justify-items: center; }
.pc-machine { position: relative; width: 100%; display: grid; gap: 6px; justify-items: center; padding: 22px 20px 40px; border-radius: 26px; background: linear-gradient(170deg, #1a2420, #0b110e 70%); border: 1px solid #22332c; box-shadow: var(--shadow); font-family: var(--mono); }
.pc-k { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: #5b7d6c; }
.pc-time { font-size: clamp(56px, 9vw, 100px); font-weight: 600; line-height: 1; color: #1dff9e; letter-spacing: 0.02em; }
.pc-date { font-size: 13px; color: #a9c2b7; }
.pc-date::first-letter { text-transform: uppercase; }
.pc-screen { margin-top: 6px; padding: 6px 12px; border-radius: 8px; background: #020403; font-size: 12px; letter-spacing: 0.18em; color: #1dff9e; }
.clockin.ok .pc-screen { color: #020403; background: #1dff9e; }
.pc-slot { position: absolute; left: 22%; right: 22%; bottom: 16px; height: 8px; border-radius: 4px; background: #000; box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.9); }
.pc-card { position: relative; width: min(100%, 260px); aspect-ratio: 1.58; display: grid; grid-template-columns: auto minmax(0, 1fr); align-content: center; gap: 12px; padding: 16px 18px; border-radius: 16px; background: #fbfaf5; color: #15201b; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45); transform: rotate(-4deg); transition: transform 0.25s var(--ease); text-align: left; }
.pc-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 14px; border-radius: 16px 16px 0 0; background: #1dff9e; }
.pc-photo { width: 58px; height: 70px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: #15201b; line-height: 0; }
.pc-photo svg { width: 100%; height: 100%; }
.pc-id { display: grid; gap: 2px; align-content: center; min-width: 0; }
.pc-id b { font-family: var(--display); font-size: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-id small { font-family: var(--mono); font-size: 11px; color: #6d7c75; }
.pc-id .pc-plan { justify-self: start; margin-top: 4px; padding: 2px 8px; border-radius: 999px; background: #15201b; color: #1dff9e; }
.pc-id .pc-plan:empty { display: none; }
.pc-bars { position: absolute; left: 18px; right: 18px; bottom: 12px; height: 12px; background: repeating-linear-gradient(90deg, #15201b 0 2px, transparent 2px 5px, #15201b 5px 6px, transparent 6px 9px); opacity: 0.7; }
.clockin:hover .pc-card { transform: rotate(-2deg) translateY(-4px); }
@media (prefers-reduced-motion: no-preference) {
  .clockin.punched .pc-card { animation: pc-swipe 1.3s var(--ease) forwards; }
}
@keyframes pc-swipe {
  0% { transform: rotate(-4deg); }
  40%, 70% { transform: translateX(-30%) translateY(-10px) rotate(0); }
  100% { transform: translateX(0) translateY(0) rotate(-4deg); }
}
.clockin .call-btn, .clockin .gd-note { grid-column: 1 / -1; }
.clockin .call-btn { width: min(100%, 460px); }
.clockin .gd-note b { color: var(--orange); }
.rc-skip { border: 0; background: none; color: var(--muted); font: inherit; font-size: 13.5px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.rc-skip:hover { color: var(--ink); }
@media (max-width: 640px) {
  .clockin { grid-template-columns: 1fr; gap: 12px; }
  .pc-machine { padding: 14px 16px 30px; }
  .pc-time { font-size: 54px; }
  .pc-card { width: 220px; }
  .pc-photo { width: 46px; height: 56px; }
  .sign { font-size: 11px; letter-spacing: 0.12em; }
  .sign-open { display: none; }
}
/* En la pantalla de fichar no hay caso abierto: opinión y problemas siguen en «Ayúdanos a mejorar» */
body:has(#screen-clockin:not([hidden])) .topbar :is(#opinion-open, #report-open, .notice) { display: none; }

/* ---------- Mi ficha (etapa 7, ADR 0145) ---------- */
#screen-progress .zone-wrap { max-width: 1060px; }
.fx-badge { position: relative; isolation: isolate; overflow: hidden; border-radius: 28px; border: 1px solid var(--line-2); background: radial-gradient(90% 120% at 100% 0%, rgba(255, 138, 31, 0.1), transparent 55%), radial-gradient(80% 120% at 0% 100%, var(--neon-soft), transparent 60%), linear-gradient(160deg, var(--s2), var(--s1) 55%); box-shadow: 0 40px 80px -46px rgba(0, 0, 0, 0.8); color: var(--ink); }
.fx-top { position: relative; display: flex; align-items: center; gap: 8px; margin: 0; padding: 30px 26px 12px; border-bottom: 1px dashed var(--line-2); font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.fx-top::before { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 6px; background: linear-gradient(90deg, var(--neon), #7dffc8 45%, var(--orange)); }
.fx-top-r { margin-left: auto; letter-spacing: 0.08em; }
.bc-cross { display: grid; place-items: center; width: 15px; height: 15px; border-radius: 4px; background: var(--neon); color: var(--on-accent); font-family: var(--display); font-size: 13px; font-weight: 800; line-height: 1; }
.fx-body { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 26px; align-items: center; padding: 24px 26px 6px; }
.fx-photo { position: relative; }
.fx-avatar { width: 146px; height: 174px; border-radius: 22px; overflow: hidden; background: linear-gradient(180deg, #13303a, #0b1a1f); border: 3px solid var(--neon); box-shadow: 0 0 0 6px var(--neon-soft); line-height: 0; display: grid; place-items: end center; }
.fx-avatar svg { width: 146px; height: 146px; display: block; }
.fx-lvl { position: absolute; right: -12px; bottom: -12px; display: grid; place-items: center; min-width: 46px; height: 46px; padding: 0 8px; border-radius: 15px; background: var(--orange); color: #1a0b00; border: 3px solid var(--s1); font-family: var(--display); font-size: 22px; font-weight: 800; }
.fx-who { display: grid; gap: 12px; min-width: 0; }
.fx-name { margin: 0; font-family: var(--display); font-size: clamp(30px, 5vw, 46px); font-weight: 800; letter-spacing: -0.035em; line-height: 1; overflow-wrap: anywhere; }
.fx-facts { display: grid; gap: 10px; margin: 0; }
.fx-facts div { display: grid; gap: 2px; }
.fx-facts div[hidden] { display: none; }
.fx-facts dt { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.fx-facts dd { margin: 0; font-size: 16.5px; color: var(--ink-2); }
.fx-facts dd b { color: var(--neon-text); font-weight: 700; }
.fx-step { font-family: var(--mono); font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.fx-streak { display: grid; justify-items: center; text-align: center; padding: 0 6px; color: var(--muted); }
.fx-streak svg { width: 30px; height: 30px; fill: var(--s3); }
.fx-streak b { font-family: var(--display); font-size: clamp(48px, 6vw, 72px); font-weight: 800; line-height: 0.95; letter-spacing: -0.05em; }
.fx-streak.alive svg { fill: var(--orange); }
.fx-streak.alive b { color: var(--orange); }
.fx-streak span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }
.fx-xp { display: grid; gap: 8px; padding: 18px 26px 4px; }
.fx-bar { height: 12px; border-radius: 999px; background: var(--s3); overflow: hidden; }
.fx-bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--neon), #7dffc8); transition: width 0.8s var(--ease); }
.fx-xp-t { margin: 0; font-size: 14.5px; color: var(--muted); line-height: 1.4; }
.fx-foot { display: flex; align-items: center; gap: 10px; padding: 10px 20px 14px; }
.fx-link { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; background: none; color: var(--ink-2); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.fx-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fx-link:hover { color: var(--neon-text); border-color: var(--neon-line); background: var(--neon-soft); }
.fx-barcode { flex: 1; height: 26px; max-width: 220px; margin-left: auto; opacity: 0.35; background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 4px, var(--ink) 4px 5px, transparent 5px 9px); }
.fx-plan { padding: 6px 4px; border: 0; background: none; font: inherit; font-size: 12.5px; color: var(--muted); white-space: nowrap; cursor: pointer; }
.fx-plan b { margin-left: 4px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); font-weight: 600; }
.fx-plan b:empty { display: none; }
.fx-road { padding: 26px 2px 0; }
.fx-road-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.fx-h { margin: 0; font-family: var(--display); font-size: clamp(22px, 3.4vw, 28px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.15; color: var(--ink); text-transform: none; }
.fx-h-s { font-size: 20px; margin-bottom: 14px; }
.fx-road-head .fx-h-s { margin: 0; }
.fx-k { margin: 0 0 6px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--muted); }
.fx-p { margin: 8px 0 0; font-size: 16px; line-height: 1.55; color: var(--ink-2); max-width: 60ch; }
.road { min-width: 0; max-width: 100%; list-style: none; margin: 8px 0 0; padding: 18px 6px 6px; display: flex; overflow-x: auto; scrollbar-width: thin; }
.road li { position: relative; flex: 0 0 150px; display: grid; gap: 4px; justify-items: center; align-content: start; text-align: center; padding: 0 8px 8px; font-size: 13.5px; color: var(--muted); }
.road li::before { content: ""; position: absolute; top: 9px; left: 0; right: 0; height: 4px; background: var(--s3); }
.road li:first-child::before { left: 50%; }
.road li:last-child::before { right: 50%; }
.road li.done::before { background: var(--neon); }
.road li.now::before { background: linear-gradient(90deg, var(--neon) 50%, var(--s3) 50%); }
.rd-dot { position: relative; z-index: 1; width: 22px; height: 22px; border-radius: 50%; background: var(--s2); border: 3px solid var(--s3); }
.road li.done .rd-dot { background: var(--neon); border-color: var(--neon); }
.road li.now .rd-dot { width: 30px; height: 30px; margin-top: -4px; background: var(--orange); border-color: #ffd1a6; }
.road li b { font-weight: 600; line-height: 1.25; }
.road li.done b, .road li.now b { color: var(--ink); }
#fx-tabs { margin: 26px 0 8px; grid-template-columns: 1fr 1fr; }
.fx-tab-n { min-width: 24px; padding: 1px 7px; border-radius: 999px; background: #ffc53d; color: #2a1c00; font-size: 12px; font-weight: 800; }
.fx-tab-n:empty { display: none; }
.fx-panel { padding-top: 10px; }
.fx-panel[hidden] { display: none; }
.fx-sec { padding: 26px 2px; border-bottom: 1px solid var(--line); }
.fx-sec:last-child { border-bottom: 0; }
.fx-resume { display: flex; align-items: center; gap: 12px; width: 100%; margin: 8px 0 18px; padding: 12px 16px; border-radius: 16px; border: 1px solid var(--neon-line); background: var(--neon-soft); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.fx-resume[hidden] { display: none; }
.fx-resume > span:nth-child(2) { flex: 1; min-width: 0; display: grid; gap: 1px; }
.fx-resume small { font-size: 13.5px; color: var(--ink-2); }
.fx-resume > svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--neon-text); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.fx-resume-dot { width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--neon); }
.next-step { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(16px, 3vw, 28px); align-items: center; padding: clamp(20px, 3.4vw, 34px); margin-bottom: 20px; border-radius: 30px; border: 1px solid var(--neon-line); background: radial-gradient(90% 140% at 100% 0%, var(--neon-soft), transparent 60%), var(--s1); }
.next-step[hidden] { display: none; }
.ns-face { width: clamp(84px, 11vw, 140px); aspect-ratio: 1; border-radius: 50%; object-fit: cover; border: 3px solid var(--neon); }
.ns-body { display: grid; gap: 10px; justify-items: start; min-width: 0; }
.ns-body .fx-p { margin: 0; }
.fx-monitor { --ink: #ecfff6; --ink-2: #b5cdc2; --muted: #7f998d; margin-bottom: 8px; padding: clamp(18px, 3vw, 28px); border-radius: 26px; border: 1px solid #1c3329; background: radial-gradient(80% 90% at 100% 0%, rgba(29, 255, 158, 0.12), transparent 60%), #050b09; color: var(--ink); }
.fx-chart { display: flex; align-items: flex-end; gap: 6px; height: 120px; margin-top: 16px; padding: 8px; border-radius: 14px; background: repeating-linear-gradient(0deg, rgba(220, 255, 240, 0.06) 0 1px, transparent 1px 40px); }
.fx-chart:empty { display: none; }
.fx-col { flex: 1; max-width: 46px; height: 100%; display: flex; align-items: flex-end; }
.fx-col i { display: block; width: 100%; border-radius: 6px 6px 2px 2px; background: #1dff9e; }
.fx-col.h2 i { background: rgba(29, 255, 158, 0.5); }
.fx-col.h1 i { background: #ff8a1f; }
.fx-col.h0 i { background: #3a4a43; }
.fx-explain { margin: 10px 0 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.fx-explain:empty { display: none; }
.fx-more { border-bottom: 1px solid var(--line); }
.fx-more summary { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 14px 2px; cursor: pointer; }
.fx-more summary > span { flex: 1; display: grid; gap: 2px; }
.fx-more summary b { font-size: 16.5px; }
.fx-more summary small { font-size: 13.5px; color: var(--muted); }
.missions { list-style: none; padding: 0 2px 18px; margin: 0; display: grid; gap: 14px; }
.missions li { display: grid; gap: 6px; }
.ms-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.ms-top b { font-weight: 600; }
.ms-bar { height: 10px; border-radius: 999px; background: var(--s3); overflow: hidden; }
.ms-bar span { display: block; height: 100%; border-radius: inherit; background: var(--neon); }
.missions small { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.ms-done .ms-top b { text-decoration: line-through; color: var(--muted); }
.ms-done small { color: var(--neon-text); font-weight: 600; }
.fx-trophy { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; align-items: center; padding: 14px 2px 22px; border-bottom: 1px solid var(--line); }
.fx-ring { --p: 0%; display: grid; place-items: center; width: 108px; height: 108px; border-radius: 50%; background: radial-gradient(closest-side, var(--bg) 76%, transparent 77% 100%), conic-gradient(#ffc53d var(--p), var(--s3) 0); font-family: var(--display); font-size: 22px; font-weight: 800; color: #ffc53d; }
.md-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.md { --m1: #3a4a43; --m2: #1c2722; position: relative; display: grid; gap: 6px; justify-items: center; align-content: start; text-align: center; padding: 18px 12px 14px; border-radius: 20px; border: 1px solid var(--line); background: var(--s1); font-size: 13px; color: var(--muted); }
.md.t-bronce { --c1: #f2b27a; --c2: #a8622c; }
.md.t-plata { --c1: #f4f8fb; --c2: #8d9aa6; }
.md.t-oro { --c1: #ffe08a; --c2: #d99a00; }
.md.t-leyenda { --c1: #e2c6ff; --c2: #7b3fe4; }
.md.t-caso { --c1: #8affd0; --c2: #0a9a5e; }
.md-ico { position: relative; width: 62px; height: 62px; margin-top: 6px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, var(--m1), var(--m2) 75%); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.06); filter: grayscale(1); opacity: 0.6; }
.md-ico svg { width: 30px; height: 30px; fill: none; stroke: var(--ink-2); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.md.got { color: var(--ink-2); border-color: color-mix(in srgb, var(--c2) 55%, transparent); background: radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--c2) 16%, transparent), transparent 70%), var(--s1); }
.md.got .md-ico { --m1: var(--c1); --m2: var(--c2); filter: none; opacity: 1; }
.md.got .md-ico svg { stroke: rgba(20, 12, 0, 0.82); stroke-width: 1.9; }
.md b { font-weight: 700; line-height: 1.2; color: var(--ink-2); }
.md.got b { color: var(--ink); }
.md-how { font-size: 12px; line-height: 1.35; }
.md-tier { margin-top: 2px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; }
.md.got .md-tier { color: var(--c2); }
.md-bar { width: 100%; height: 6px; border-radius: 999px; background: var(--s3); overflow: hidden; margin-top: 4px; }
.md-bar i { display: block; height: 100%; border-radius: inherit; background: var(--c2); }
.md small { font-family: var(--mono); font-size: 11px; color: var(--ink-2); }
.md-empty { grid-column: 1 / -1; padding: 4px 2px; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
#fx-fams { margin-bottom: 14px; }
#fx-history .section-title { margin-top: 18px; }
@media (max-width: 700px) {
  .fx-body { grid-template-columns: auto minmax(0, 1fr); }
  .fx-streak { grid-column: 1 / -1; grid-auto-flow: column; justify-content: start; align-items: center; gap: 8px; padding: 4px 0 0; }
  .fx-streak b { font-size: 34px; }
  .fx-streak svg { width: 22px; height: 22px; }
}
@media (max-width: 600px) {
  .fx-top { padding: 26px 16px 10px; font-size: 10.5px; }
  .fx-top-r { display: none; }
  .fx-body { gap: 16px 18px; padding: 18px 16px 2px; }
  .fx-avatar { width: 96px; height: 116px; border-radius: 16px; }
  .fx-avatar svg { width: 96px; height: 96px; }
  .fx-lvl { min-width: 36px; height: 36px; font-size: 17px; border-radius: 12px; right: -9px; bottom: -9px; }
  .fx-xp { padding: 14px 16px 2px; }
  .fx-foot { padding: 8px 12px 12px; flex-wrap: wrap; }
  .fx-barcode { display: none; }
  .fx-plan { margin-left: auto; }
  .next-step { grid-template-columns: 1fr; justify-items: start; }
  .ns-face { width: 72px; }
  .fx-trophy { gap: 16px; }
  .fx-ring { width: 84px; height: 84px; font-size: 18px; }
  .md-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  #fx-history .table-wrap { overflow-x: auto; }
}

/* ---------- Cuenta y configuración (etapa 8, ADR 0146) ---------- */
#screen-account .zone-wrap { max-width: 1060px; }
.set-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.set-card { display: grid; gap: 12px; align-content: start; justify-items: start; padding: clamp(18px, 2.6vw, 24px); border-radius: 22px; border: 1px solid var(--line-2); background: var(--s1); color: var(--ink); }
.set-card p { margin: 0; }
.set-wide { grid-column: 1 / -1; }
.set-k { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.set-k2 { margin-top: 10px !important; }
.set-k.danger { color: var(--hot); }
.set-h { margin: 0; font-family: var(--display); font-size: 24px; font-weight: 800; }
.plan-set { border-color: var(--neon-line); background: radial-gradient(90% 120% at 100% 0%, var(--neon-soft), transparent 70%), var(--s1); }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 10px 0; border-top: 1px solid var(--line); }
.set-row:first-of-type { border-top: 0; }
.set-row > span { display: grid; gap: 2px; }
.set-row small { font-size: 13px; color: var(--muted); }
.set-seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--s2); border: 1px solid var(--line); }
.set-seg button { min-height: 36px; padding: 6px 12px; border: 0; border-radius: 9px; background: none; color: var(--ink-2); font: inherit; font-weight: 600; cursor: pointer; }
.set-seg button[aria-pressed="true"] { background: var(--neon); color: var(--on-accent); }
.switch { position: relative; display: inline-block; flex: none; width: 48px; height: 28px; }
.switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--s3); border: 1px solid var(--line-2); transition: background 0.2s; pointer-events: none; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink-2); transition: transform 0.2s var(--ease); }
.switch input:checked + i { background: var(--neon); border-color: var(--neon); }
.switch input:checked + i::after { transform: translateX(20px); background: var(--on-accent); }
.switch input:focus-visible + i { outline: 3px solid var(--neon-line); outline-offset: 2px; }
#screen-account .account-avatar { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; }
#screen-account .danger-zone { display: grid; gap: 10px; width: 100%; }
#screen-account .result-actions { margin-top: 20px; }
#screen-account #delegate-block, #screen-account #dash-intent { margin-top: 16px; }
@media (max-width: 760px) { .set-grid { grid-template-columns: 1fr; } #screen-account .inline-form { flex-wrap: wrap; } }

/* ---------- Planes: Prácticas, Contratado y Fundador (ADR 0146) ---------- */
#screen-plans .plans-hero .eyebrow { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.2em; color: var(--neon-text); }
#screen-plans .plan-card { border-radius: 24px; border: 1px solid var(--line-2); background: var(--s1); }
#screen-plans .plan-card.pro { border-color: color-mix(in srgb, var(--pro) 55%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--pro) 9%, transparent), transparent 55%), var(--s1); }
#screen-plans .plan-card.founder { border-color: color-mix(in srgb, #e7b65a 50%, transparent); background: linear-gradient(180deg, color-mix(in srgb, #e7b65a 8%, transparent), transparent 55%), var(--s1); }
#screen-plans .plan-name { font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--neon-text); }
#screen-plans .plan-card.pro .plan-name { color: var(--pro); }
#screen-plans .plan-card.founder .plan-name { color: #e7b65a; }
:root[data-theme="light"] #screen-plans .plan-card.founder .plan-name { color: #9a6a12; }
#screen-plans .plan-card.pro .plan-badge { background: var(--pro); color: #fff; }
/* La etiqueta iba en la esquina y «Solo hasta el 8 de noviembre» pisaba el nombre del plan:
   va encima del nombre, en su propia línea. */
#screen-plans .plan-card .plan-badge { position: static; align-self: flex-start; max-width: 100%; margin: 0 0 10px; white-space: normal; }
#screen-plans .plan-compare .pro { color: var(--pro); }

/* ---------- Buzón (ADR 0052 tal cual): el aspecto de la lista del esbozo ---------- */
.mailbox-card .mailbox-item { padding: 14px 16px; border-radius: 18px; border: 1px solid var(--line-2); background: var(--s2); }
.mailbox-card .mailbox-item.unread { border-color: var(--neon-line); background: var(--neon-soft); }
.mailbox-card .mailbox-new { background: var(--hot); color: #fff; }

/* Tema claro (ADR 0149): el rótulo de las ventanas (p. ej. «Nuevo paciente · Clásico» al
   llegar al box) en verde oscuro, que el verde neón no se lee sobre blanco. */
:root[data-theme="light"] #overlay-kicker { color: var(--neon-text); }

/* Dentro del simulador (caso, resultado, analítica) la cabecera solo deja «Comunicar un
   problema» (ADR 0152). «Dar tu opinión», el buzón y el chat del club se ocultan, no se
   borran: siguen en la página y «Ayúdanos a mejorar» abre la opinión con su botón. */
body:not(.with-tabs) :is(#opinion-open, #mailbox-open, #club-open) { display: none !important; }

/* Guardia: quién entra al box antes de atenderlo (ADR 0155), como en el esbozo. */
#guard-arrival[hidden], #guard-empty[hidden], #guard-call[hidden], #guard-note[hidden] { display: none; }
#guard-arrival {
  width: 100%; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); text-align: left; overflow: hidden;
  border-radius: 26px; border: 1px solid var(--neon-line); background: var(--s1); box-shadow: var(--shadow);
  animation: guard-arrive 0.6s var(--ease) both;
}
@keyframes guard-arrive { from { opacity: 0; transform: translateY(24px) scale(0.97); } }
#guard-arrival .p-art { margin: 0; aspect-ratio: auto; min-height: 240px; }
#guard-arrival .p-art img { inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 0%; translate: 0; }
#guard-arrival .p-art::after { background: linear-gradient(270deg, var(--s1) 2%, transparent 45%); }
#guard-arrival .cine-box { top: 14px; left: 16px; right: auto; }
#guard-arrival .arr-body { padding: clamp(18px, 2.6vw, 28px); display: grid; gap: 12px; align-content: center; min-width: 0; }
#guard-arrival h2 { margin: 0; font-family: var(--display); font-size: clamp(22px, 2.6vw, 32px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.05; text-transform: none; color: var(--ink); }
#guard-arrival h2::before { content: "«"; color: var(--neon-text); }
#guard-arrival h2::after { content: "»"; color: var(--neon-text); }
#guard-arrival .arr-triage { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.ts-num.flip { animation: guard-flip 0.45s var(--ease); }
@keyframes guard-flip { from { opacity: 0; transform: rotateX(90deg); } }
@media (max-width: 860px) {
  #guard-arrival { grid-template-columns: 1fr; }
  #guard-arrival .p-art { min-height: 0; aspect-ratio: 16 / 9; }
  #guard-arrival .p-art::after { background: linear-gradient(0deg, var(--s1) 2%, transparent 55%); }
}
@media (prefers-reduced-motion: reduce) { #guard-arrival, .ts-num.flip { animation: none; } }

/* Ordenador (ADR 0156): Hoy más compacto, para que el saludo, el paciente del día y la pregunta
   del adjunto quepan sin tanto desplazamiento. Solo cambian tamaños; el móvil no cambia. */
@media (min-width: 861px) {
  .hh { gap: clamp(20px, 3vw, 40px); }
  .hh-copy { gap: 14px; }
  .hh-title { font-size: clamp(32px, 3.3vw, 46px); }
  .hh-lead { font-size: 16px; }
  .hh-proof { margin-top: 6px; }
  .hh-proof strong { font-size: 30px; }
  .dp-visual { padding: 4px 0 8px; }
  .dp { max-width: 330px; }
  /* El monitor solo se monta 26 px sobre el borde de la tarjeta (330 px): el texto del paciente
     del día empieza 34 px hacia dentro, así que no lo tapa por largo que sea el título. */
  .dp-monitor { top: 22%; right: auto; left: calc(50% + 139px); width: 150px; }
  .idcard.dp-id { top: 2%; left: max(-12%, calc(50% - 290px)); }
  .reto-hero-title { font-size: clamp(24px, 2.6vw, 34px); }
  #screen-home .reto-hero { margin-top: 8px; }
}

/* La sala en el ordenador (ADR 0156): cabe en la pantalla aunque arriba esté la franja de la
   oferta (ADR 0170), y en la sala urgente la foto no crece más que la pantalla (los botones quedaban abajo). */
:root { --banner-h: 0px; }
body:has(.offer-strip:not([hidden])) { --banner-h: 43px; }
@media (min-width: 1000px) {
  #screen-case:not(.in-room) { height: calc(100dvh - var(--top-h) - var(--banner-h)); min-height: 520px; }
  #screen-case.in-room .stage { width: min(100%, calc((100dvh - var(--top-h) - var(--banner-h) - 200px) * 4 / 3)); margin-inline: auto; }
}
/* Entre 861 y 1199 px la columna es estrecha y el monitor decorativo tapaba el título del
   paciente del día: ahí se oculta (no se borra). */
@media (min-width: 861px) and (max-width: 1199px) { .dp-monitor { display: none; } }

/* Ascensor (ADR 0158): Farmacia (Paca Racetamol) y Curas (Jesús Tura) se quitan de la botonera
   por decisión de Alba. Se ocultan, no se borran: siguen en la página para cuando existan. */
#floor-p3, #floor-p5 { display: none !important; }

/* Planes (ADR 0159): cuando se cierra la oferta de Fundador, su tarjeta, su columna de la
   comparación y su pregunta se ocultan (no se borran). Quien ya es Fundador la sigue viendo. */
#screen-plans.founder-off #plan-founder-card,
#screen-plans.founder-off #faq-founder,
#screen-plans.founder-off #faq-founder-renew,
#screen-plans.founder-off .founder-only,
#screen-plans.founder-off .plan-compare tr > :nth-child(4) { display: none; }

/* Enlaces del buzón (solo a retodx.com, ver mailbox.js). */
.mailbox-body .mailbox-link { color: var(--neon-text); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
