/* Game screens: the legacy games' look (lotería mode cards, fichas, HUD,
   options, explanations, results), on the platform's tokens. */

.game {
  --gline: #D3D7E5; --good: #0F8B6C; --bad: #C62839; --card-ink: #1A1A2E; --cempa: #F6A21E;
  --bodyfill: #F3E7D3; --zone: #FFFFFF; --zstroke: #1A1A2E;
  max-width: 820px; margin: 0 auto; padding: 0 16px 48px;
  font-size: 17px; line-height: 1.5;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .game { --gline: #3A3F6E; --good: #35C49B; --bad: #FF6B7A; --bodyfill: #2E3566; --zone: #454C85; --zstroke: #F3EAD8; }
}
/* Dark: lotería cards keep a visible hard shadow (cream, like the buttons) and
   dimmed options stay readable. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .game .lot { box-shadow: 0 0 0 3px var(--card-ink), 6px 6px 0 3px var(--ink); }
  :root:not([data-theme="light"]) .game .mode:active .lot { box-shadow: 0 0 0 3px var(--card-ink), 3px 3px 0 3px var(--ink); }
  :root:not([data-theme="light"]) .game .opt.dim { opacity: .75; color: var(--muted); }
}
:root[data-theme="dark"] .game .lot { box-shadow: 0 0 0 3px var(--card-ink), 6px 6px 0 3px var(--ink); }
:root[data-theme="dark"] .game .mode:active .lot { box-shadow: 0 0 0 3px var(--card-ink), 3px 3px 0 3px var(--ink); }
:root[data-theme="dark"] .game .opt.dim { opacity: .75; color: var(--muted); }
:root[data-theme="dark"] .game { --gline: #3A3F6E; --good: #35C49B; --bad: #FF6B7A; --bodyfill: #2E3566; --zone: #454C85; --zstroke: #F3EAD8; }

.game h2 { font-family: var(--slab); font-weight: 400; font-size: 28px; margin: 8px 0 6px; line-height: 1.1; }
.game .sub { color: var(--muted); margin: 0 0 14px; }
.game .muted { color: var(--muted); }
.game .lead { max-width: 62ch; margin: 0 0 20px; }
.game .kbd, .game .foot { font-size: 13px; color: var(--muted); margin-top: 22px; }
.nocopy { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
/* Fast taps never zoom; every game control gets the same focus ring (DESIGN.md §6) */
.game button, .game a { touch-action: manipulation; }
.game :is(.opt, .gchip, .segbtn, .fac, .mbtn, .vchip, .fh, .tabs button, .back, .linkbtn):focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.stem-focus:focus { outline: none; }

/* Header of the game page */
/* Menu and study views (juego.js watchWidth), Simulacros setup and results: the 1100 px page,
   title beside Rojelio so the mode cards sit above the fold. Rounds keep .game's 820 px. */
.game.page-wide { max-width: 1100px; }
@media (min-width: 920px) {
  .game.page-wide .ghead { display: grid; grid-template-columns: 1.2fr 1fr; column-gap: 36px; align-items: center; }
  .game.page-wide .ghead .roj { margin-top: 0; }
  /* A menu's monitor keeps its 820 px height, so the mode cards stay in reach. */
  .game.page-wide .monitor { max-width: 788px; margin-inline: auto; }
  /* Study cards in a list: the .cols-auto grid, for every game's .sgrid. */
  .game.page-wide .sgrid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; }
  .game.page-wide .ficha dl:not(:has(.tablewrap)) { column-count: 2; column-gap: 32px; }
  .game.page-wide .ficha dl:not(:has(.tablewrap)) dt { break-after: avoid; }
  .game.page-wide .ficha dl:not(:has(.tablewrap)) dd { break-inside: avoid; }
}
.ghead { padding-block: 6px 14px; }
.ghead h1 { font-family: var(--slab); font-weight: 400; font-size: clamp(30px, 7vw, 50px); line-height: 1.02; margin: 0 0 6px; text-shadow: 4px 4px 0 var(--accent); }
.ghead h1 span { display: block; font-size: .5em; color: var(--muted); text-shadow: none; margin-top: 12px; }
.ghead .roj { margin-top: 14px; }

/* Buttons inside games */
.game .btn { min-height: 48px; }
.game .btn.alt { background: var(--rosa); color: #fff; }
.game .btn.ghost { background: transparent; color: var(--text); border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.game .kb { opacity: .65; font-size: 13px; font-weight: 400; }
.game .row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; align-items: center; }
.linkbtn { background: none; border: 0; padding: 6px 0; font: inherit; font-size: 14px; font-weight: 700; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 44px; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.back { background: none; border: 2px solid var(--gline); border-radius: 999px; padding: 6px 14px; font: inherit; font-weight: 700; color: var(--text); cursor: pointer; min-height: 44px; }

/* Lotería card */
.lot { --c: var(--rosa); background: var(--paper); color: var(--card-ink); border: 7px solid var(--c); border-radius: 12px; box-shadow: 0 0 0 3px var(--card-ink), 6px 6px 0 3px var(--card-ink); position: relative; text-align: center; display: flex; flex-direction: column; }
.lot .num { position: absolute; top: 6px; left: 10px; font-family: var(--slab); font-size: 22px; }
.lot .ico { font-size: 54px; line-height: 1; margin: 26px 0 8px; }
.lot .ttl { font-family: var(--slab); font-size: 21px; background: var(--c); color: #fff; margin-top: auto; padding: 6px 8px 7px; line-height: 1.15; }
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: start; }
@media (max-width: 680px) { .modes { grid-template-columns: 1fr; } }
.mode { border: 0; padding: 0; text-align: center; background: none; font: inherit; color: inherit; cursor: pointer; }
.mode .lot { min-height: 250px; transition: transform .15s, box-shadow .15s; }
@media (hover: hover) { .mode:hover .lot { transform: translate(-2px, -2px) rotate(-1deg); } }
/* Pressed: the card sinks into its shadow, like the buttons (DESIGN.md §4) */
.mode:active .lot { transform: translate(3px, 3px); box-shadow: 0 0 0 3px var(--card-ink), 3px 3px 0 3px var(--card-ink); }
@media (max-width: 680px) {
  .mode .lot { min-height: 0; }
  .mode .lot .ico { font-size: 40px; margin: 16px 0 6px; }
  .mode .desc { padding-bottom: 10px; }
}
.mode:focus-visible { outline: 3px solid var(--cempa); outline-offset: 6px; border-radius: 12px; }
/* The player's play style (onboarding): a rubber stamp on the mode's card */
.pickstamp {
  position: absolute; top: 8px; right: 10px; z-index: 1;
  font-family: var(--slab); font-size: 14px; line-height: 1.2; color: var(--jade); background: var(--paper);
  border: 3px solid currentColor; border-radius: 8px; padding: 2px 9px; transform: rotate(4deg); pointer-events: none;
}
.mode .desc { font-size: 15px; padding: 0 12px 12px; color: #40455E; }
.mode .best { font-size: 13px; font-weight: 700; padding: 0 0 10px; color: var(--panda); }
.modewrap { display: flex; flex-direction: column; gap: 10px; }
.modewrap .btn { width: 100%; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 16px; }
.gchip { --c: var(--rosa); border: 2px solid var(--c); background: var(--surface); color: var(--text); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; min-height: 44px; }
.gchip[aria-pressed="true"] { background: var(--c); color: #fff; }

/* Ficha and tables */
.ficha { --c: var(--rosa); background: var(--surface); border: 2px solid var(--gline); border-top: 10px solid var(--c); border-radius: 12px; padding: 18px 18px 8px; }
.ficha h3 { font-family: var(--slab); font-weight: 400; font-size: 30px; margin: 0; line-height: 1.05; }
.ficha .tag { color: var(--muted); margin: 2px 0 14px; background: none; border: 0; box-shadow: none; padding: 0; border-radius: 0; font-weight: 700; display: block; }
.ficha dl { margin: 0; }
.ficha dt { font-weight: 700; color: var(--c); margin-top: 12px; }
:root[data-theme="dark"] .ficha dt { color: var(--text); }
.ficha dd { margin: 2px 0 0; }
.trap { background: var(--paper); color: var(--card-ink); border-left: 6px solid var(--cempa); border-radius: 8px; padding: 10px 14px; margin: 16px 0 10px; }
.trap b { font-family: var(--slab); font-weight: 400; }
.trap ul { margin: 6px 0 0; padding-left: 18px; }
.tablewrap { overflow-x: auto; background: var(--surface); border: 2px solid var(--gline); border-radius: 12px; }
.tablewrap table { border-collapse: collapse; min-width: 760px; font-size: 14.5px; }
.tablewrap.narrow table { min-width: 0; width: 100%; }
.tablewrap th, .tablewrap td { text-align: left; vertical-align: top; padding: 9px 10px; border-bottom: 1px solid var(--gline); }
.tablewrap th { background: var(--ink); color: var(--bg); font-weight: 700; }
.tablewrap td:first-child { font-weight: 700; white-space: nowrap; border-left: 6px solid var(--c, transparent); }

/* Population selector, ENARM seals, adult/child columns (Diarrea aguda) */
.seg { background: var(--surface); border: 2px solid var(--ink); border-radius: 14px; box-shadow: 4px 4px 0 var(--ink); padding: 10px 12px 12px; margin: 0 0 22px; }
.seg-l { display: block; font-family: var(--slab); font-size: 15px; margin-bottom: 8px; }
.seg-b { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.segbtn { --c: var(--ink); min-height: 48px; border: 2px solid var(--c); background: var(--surface); color: var(--text); border-radius: 10px; font: inherit; font-weight: 700; font-size: 16px; padding: 6px 8px; cursor: pointer; }
.segbtn[aria-pressed="true"] { background: var(--c); color: #fff; box-shadow: 3px 3px 0 var(--ink); }
@media (max-width: 380px) { .segbtn { font-size: 14px; padding: 6px 4px; } }
.lot .pb { position: absolute; top: 8px; right: 8px; font-size: 12px; font-weight: 700; background: var(--card-ink); color: #fff; border-radius: 999px; padding: 2px 8px; }
.ficha .fpop { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.yr { display: inline-block; font-size: 12px; font-weight: 700; color: var(--card-ink); background: var(--cempa); border: 2px solid var(--card-ink); border-radius: 6px; padding: 0 6px; transform: rotate(-2deg); margin-left: 4px; white-space: nowrap; }
.tablewrap td.ca { border-left: 3px solid #C62839; }
.tablewrap td.cn { border-left: 3px solid #0F8B6C; }

/* Rich study cards: lists and small tables inside a ficha (Síndromes coronarios agudos) */
.ficha dd ul, .ficha dd ol { margin: 4px 0 0; padding-left: 20px; }
.ficha dd .tablewrap { margin: 6px 0 10px; }
.tablewrap table.sm { min-width: 0; width: 100%; }
.tablewrap td.k { font-weight: 700; white-space: nowrap; border-left: 6px solid var(--c, var(--gline)); }
.tablewrap.kk td.m { font-family: var(--slab); color: var(--rosa); white-space: nowrap; }
.ficha dd .tablewrap td:first-child { white-space: normal; }
.ficha dd .tablewrap td.k { white-space: nowrap; }
.ci { columns: 2; column-gap: 22px; }
@media (max-width: 640px) { .ci { columns: 1; } }
.cmp-title { font-family: var(--slab); font-weight: 400; font-size: 22px; margin: 18px 0 6px; }

/* Rhythm traces and topic chips (ACLS) */
/* El Megacódigo: the code monitor (legacy look) */
.codemon { background: #0B1220; color: #D8FFE9; border: 3px solid var(--ink); border-radius: 14px; box-shadow: 5px 5px 0 var(--ink); padding: 10px 12px 12px; margin-bottom: 16px; }
.codemon .mon-top { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 13px; font-weight: 700; letter-spacing: .3px; color: #8FB8A5; }
.codemon .mon-rh { font-family: var(--slab); font-size: 18px; color: #35F29A; margin: 2px 0 6px; min-height: 26px; }
.codemon .mon-rh.hidden { color: #F6A21E; }
.codemon .screen { position: relative; height: 96px; overflow: hidden; border-radius: 8px; background-color: #0E1729;
  background-image: linear-gradient(rgba(53,242,154,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(53,242,154,.08) 1px, transparent 1px); background-size: 14px 14px; }
.codemon .screen { color: #35F29A; --lw: 2.4; --glow: 1; }
.codemon .screen .sweep { inset: 3px 0; }
.codemon .screen.cpr { color: #F6A21E; }
.codemon .readouts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.codemon .ro { background: #131F38; border-radius: 8px; padding: 6px 8px; }
.codemon .ro small { display: block; font-size: 11.5px; color: #8FB8A5; font-weight: 700; }
.codemon .ro b { font-family: var(--slab); font-weight: 400; font-size: 20px; color: #fff; }
.codemon .ro.warn b { color: #FF6B7A; }
.codemon .ro.good b { color: #35F29A; }
.codemon .log { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.codemon .log span { font-size: 12.5px; background: #1D2A48; color: #D8FFE9; border-radius: 999px; padding: 2px 9px; }
.lot .new { position: absolute; top: 8px; right: 8px; background: var(--rosa); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .5px; border-radius: 999px; padding: 2px 8px; border: 2px solid var(--ink); }
.tchip { display: inline-block; font-size: 13px; font-weight: 700; color: #fff; background: var(--c, #555); border-radius: 999px; padding: 2px 10px; }
.stage .lot .prompt { font-family: var(--slab); font-size: 19px; line-height: 1.2; padding: 0 12px 12px; }
.flash { margin-top: 12px; font-weight: 700; min-height: 26px; }
.flash.ok { color: var(--good); }
.flash.no { color: var(--bad); }
/* SCA's Código Infarto (door clock) and La Calculadora TIMI (variables) */
.clock { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; background: #0B1A1E; color: #CFF7E6; border: 3px solid var(--ink); border-radius: 12px; box-shadow: 5px 5px 0 var(--ink); padding: 10px 14px; margin-bottom: 14px; }
.clock .cb { flex: 1 1 120px; }
.clock .cl { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: #7FD9B7; }
.clock .cv { font-family: var(--slab); font-size: 28px; line-height: 1.05; color: #3BF0A8; font-variant-numeric: tabular-nums; }
.clock .cv.late { color: #FF8A8A; }
.hit { background: color-mix(in srgb, var(--jade) 14%, var(--surface)); border: 2px solid var(--jade); border-radius: 10px; padding: 8px 12px; margin: 0 0 12px; font-weight: 700; }
.hit.late { background: color-mix(in srgb, var(--bad) 12%, var(--surface)); border-color: var(--bad); }
.fgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (max-width: 520px) { .fgrid { grid-template-columns: 1fr; } }
.fac { display: flex; gap: 10px; align-items: center; text-align: left; background: var(--surface); color: var(--text); border: 2px solid var(--gline); border-radius: 10px; padding: 9px 12px; min-height: 50px; font: inherit; font-size: 15.5px; cursor: pointer; }
.fac .L { font-family: var(--slab); font-size: 18px; min-width: 34px; color: var(--jade); }
.fac[aria-pressed="true"] { border-color: var(--ink); background: color-mix(in srgb, var(--jade) 16%, var(--surface)); box-shadow: 3px 3px 0 var(--ink); }
.fac.ok { border-color: var(--good); }
.fac.miss { border-color: var(--bad); border-style: dashed; }
.fac.extra { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, var(--surface)); }
.fac[disabled] { cursor: default; }
/* Diarrea's Sala de Hidratación */
.pdots { display: flex; gap: 6px; margin-top: 12px; }
.pdots i { flex: 1; height: 8px; border-radius: 99px; background: var(--gline); }
.pdots i.dn { background: var(--c); opacity: .55; }
.pdots i.cur { background: var(--c); }
.pre { background: var(--paper); color: var(--card-ink); border: 2px dashed var(--card-ink); border-radius: 10px; padding: 8px 12px; margin: 0 0 12px; font-weight: 700; }
.pstat { margin-top: 10px; font-weight: 700; border-radius: 8px; padding: 8px 12px; }
.pstat.ok { background: color-mix(in srgb, var(--good) 16%, var(--surface)); }
.pstat.warn { background: color-mix(in srgb, var(--cempa) 22%, var(--surface)); }
.pstat.lost { background: color-mix(in srgb, var(--bad) 16%, var(--surface)); }
/* El Carro Rojo (match boards) and La Cadena (sequences) */
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.match .col h4 { margin: 0 0 6px; font-family: var(--slab); font-weight: 400; font-size: 16px; color: var(--muted); }
.mbtn { display: block; width: 100%; text-align: left; margin-bottom: 8px; background: var(--surface); color: var(--text); border: 2px solid var(--gline); border-left: 7px solid var(--c, #999); border-radius: 10px; padding: 10px 11px; font: inherit; font-size: 15px; min-height: 52px; line-height: 1.3; cursor: pointer; }
.mbtn.sel { border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink); background: var(--paper); color: var(--card-ink); }
.mbtn.done { opacity: .45; border-style: dashed; cursor: default; }
.mbtn.bad { border-color: var(--bad); animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.slots { display: grid; gap: 8px; margin-bottom: 14px; }
.slot { display: flex; gap: 10px; align-items: center; border: 2px dashed var(--gline); border-radius: 10px; padding: 10px 12px; min-height: 48px; color: var(--muted); }
.slot.fill { border: 2px solid var(--c, var(--jade)); background: var(--surface); color: var(--text); font-weight: 700; }
.slot .n { flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.slot.fill .n { background: var(--c, var(--jade)); color: #fff; }
.pool { display: grid; gap: 8px; }
.qq { font-weight: 700; margin-top: 6px; }
@media (prefers-reduced-motion: reduce) { .mbtn.bad { animation: none; } }

/* HUD and timer */
.hud { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-weight: 700; margin-bottom: 12px; }
.pill { background: var(--surface); border: 2px solid var(--gline); border-radius: 999px; padding: 4px 12px; }
.lives { font-size: 20px; letter-spacing: 2px; }
.lives .gone { opacity: .2; filter: grayscale(1); }
.timer { height: 14px; background: var(--surface); border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; margin-bottom: 14px; }
.timer i { display: block; height: 100%; background: var(--jade); transition: width .1s linear, background-color .3s; }
@media (max-width: 480px) {
  .hud { gap: 6px; }
  .pill { padding: 3px 9px; font-size: 14px; }
}
.timer.low i { background: var(--bad); }
.prog { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; color: var(--muted); font-weight: 700; margin-bottom: 12px; }
.prog .bar { flex: 1; min-width: 60px; height: 12px; border: 2px solid var(--ink); border-radius: 999px; background: var(--surface); overflow: hidden; }
.prog .bar i { display: block; height: 100%; background: var(--jade); }

/* Play */
.stage { display: grid; grid-template-columns: 230px 1fr; gap: 24px; align-items: start; }
@media (max-width: 680px) { .stage { grid-template-columns: 1fr; } .stage .lot { max-width: 260px; margin: 0 auto; width: 100%; } }
.stage .lot { min-height: 280px; }
.stage .lot .ico { font-size: 72px; margin-top: 34px; }
@media (max-width: 680px) {
  .stage .lot { min-height: 0; max-width: 200px; }
  .stage .lot .ico { font-size: 48px; margin-top: 20px; }
}
.clue { font-size: 18px; margin: 0 0 14px; }
.opts { display: grid; gap: 10px; }
/* Two big buttons side by side (Cáncer de mama's La Balanza). */
.opts.two { grid-template-columns: 1fr 1fr; }
.case .qtext.big { font-size: 22px; }
/* A table row's coloured first cell (BI-RADS categories). */
.tablewrap td.cat { background: var(--c); color: #fff; font-weight: 700; text-align: center; }
.pill.mult { border-color: var(--cempa); }
.opt { display: flex; gap: 12px; align-items: flex-start; text-align: left; background: var(--surface); color: var(--text); border: 2px solid var(--gline); border-radius: 10px; padding: 11px 14px; font: inherit; font-size: 16.5px; cursor: pointer; min-height: 48px;
  transition: background-color .15s, border-color .15s, opacity .15s; }
@media (hover: hover) { .opt:hover:not([disabled]) { border-color: var(--ink); } }
.opt .k { flex: 0 0 26px; height: 26px; border-radius: 6px; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.opt.ok { border-color: var(--good); background: color-mix(in srgb, var(--good) 14%, var(--surface)); }
.opt.ok .k { background: var(--good); color: #fff; }
.opt.no { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, var(--surface)); }
.opt.no .k { background: var(--bad); color: #fff; }
.opt.dim { opacity: .6; }
.opt[disabled] { cursor: default; }
.dec { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.opt.big { flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 16px 10px; border-width: 3px; }
.opt.big .lbl { font-family: var(--slab); font-size: 21px; line-height: 1.1; }
.opt.big .tk { font-size: 12px; color: var(--muted); }
.case { background: var(--surface); border: 2px solid var(--ink); border-radius: 12px; padding: 16px 18px; box-shadow: 5px 5px 0 var(--ink); margin-bottom: 16px; }
.case .meta { font-size: 14px; color: var(--muted); font-weight: 700; margin: 0; }
.case p { margin: 6px 0 0; font-size: 18px; }
.case .qtext { margin: 0; font-size: 19px; font-weight: 700; line-height: 1.4; }
.vtag { --c: #ccc; display: inline-block; background: var(--c); color: #152722; border: 2px solid #1A1A2E; border-radius: 8px; padding: 3px 12px; font-weight: 700; font-size: 15px; }
.explain { margin-top: 16px; background: var(--surface); border: 2px solid var(--gline); border-radius: 12px; padding: 14px 16px; animation: pop-in .18s ease-out; }
@keyframes pop-in { from { opacity: 0; transform: translateY(6px); } }
.explain .verdict { font-family: var(--slab); font-size: 22px; }
.explain .verdict.ok { color: var(--good); }
.explain .verdict.no { color: var(--bad); }
.explain p { margin: 6px 0 0; }
.dz { font-size: 14px; font-weight: 700; color: var(--muted); margin-top: 8px; }
.report { margin-top: 6px; }
.report-form { display: grid; gap: 8px; margin-top: 8px; }
.report-form .report-hint { margin: -4px 0 0; font-size: 13px; }
.report-form .inp { width: 100%; font: inherit; font-size: 15px; padding: 8px 10px; border: 2px solid var(--ink); border-radius: 8px; background: #fff; color: #1A1A2E; }

/* Línea del tiempo */
.age { font-family: var(--slab); font-weight: 400; font-size: clamp(34px, 8vw, 46px); margin: 4px 0 2px; line-height: 1.05; }
.vchips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 18px; }
.vchip { --c: #ccc; background: var(--surface); color: var(--text); border: 2px solid var(--gline); border-left: 9px solid var(--c); border-radius: 10px; padding: 9px 12px; font: inherit; font-size: 15px; font-weight: 700; text-align: left; min-width: 140px; min-height: 44px; cursor: pointer; }
.vchip.on, .vchip.good { background: var(--c); color: #152722; border-color: #1A1A2E; }
.vchip.on { box-shadow: 3px 3px 0 var(--ink); }
.vchip.optn { background: var(--surface); border-style: dashed; border-color: var(--c); }
.vchip.bad { background: color-mix(in srgb, var(--bad) 14%, var(--surface)); border-color: var(--bad); box-shadow: none; }
.vchip.bad .mk { color: var(--bad); }
.vchip.dim { opacity: .35; }
.vchip:disabled { cursor: default; }

/* Vía y sitio */
.figwrap { display: flex; justify-content: center; }
.fig { width: 100%; max-width: 270px; }
.fig .bp { fill: var(--bodyfill); stroke: var(--zstroke); stroke-width: 1.5; }
.fig .z { fill: var(--zone); stroke: var(--zstroke); stroke-width: 1.5; }
.fig.live .z { cursor: pointer; }
.fig.live .z:hover { fill: var(--cempa); }
.fig .z.good { fill: var(--good); stroke: var(--ink); stroke-width: 2.5; }
.fig .z.bad { fill: var(--bad); }
.fig text { font-size: 12px; fill: var(--muted); font-family: var(--sans); }
.fig .z:focus-visible { outline: none; stroke: var(--cempa); stroke-width: 4; }

/* Contraindicaciones */
.tabs { display: inline-flex; border: 2px solid var(--ink); border-radius: 999px; padding: 3px; margin-bottom: 18px; background: var(--surface); }
.tabs button { border: 0; background: none; color: var(--text); border-radius: 999px; padding: 6px 16px; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; min-height: 44px; }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.refs { display: grid; gap: 12px; }
.ref { --c: #ccc; background: var(--surface); border: 2px solid var(--gline); border-top: 9px solid var(--c); border-radius: 12px; padding: 12px 14px; }
.ref h3 { font-family: var(--slab); font-weight: 400; font-size: 20px; margin: 0 0 8px; }
.sino { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; font-size: 15px; }
@media (max-width: 560px) { .sino { grid-template-columns: 1fr; } }
.sino b { display: block; font-size: 13px; }
.sino .si { border-left: 4px solid var(--bad); padding-left: 10px; }
.sino .si b { color: var(--bad); }
.sino .no { border-left: 4px solid var(--good); padding-left: 10px; }
.sino .no b { color: var(--good); }

/* Fichas */
.tchips { display: flex; flex-wrap: wrap; gap: 5px; }
.tc { --c: #ccc; background: var(--c); color: #152722; border-radius: 6px; padding: 2px 8px; font-weight: 700; font-size: 13.5px; }
.tc.dash { background: none; color: var(--text); border: 2px dashed var(--c); font-weight: 400; }
.note { font-size: 14px; color: var(--muted); max-width: 72ch; }
.acc { display: grid; gap: 8px; }
.fi { --c: #ccc; background: var(--surface); border: 2px solid var(--gline); border-left: 9px solid var(--c); border-radius: 10px; }
.fi.open { border-color: var(--ink); border-left-color: var(--c); box-shadow: 4px 4px 0 var(--ink); }
.fh { width: 100%; display: flex; align-items: center; gap: 12px; background: none; border: 0; color: var(--text); padding: 12px 14px; text-align: left; min-height: 48px; font: inherit; cursor: pointer; }
.fn { flex: 1; font-weight: 700; font-size: 16px; }
.fv { font-size: 13.5px; color: var(--muted); text-align: right; }
.fb { padding: 0 14px 14px; }
.fb dl { margin: 0; font-size: 15px; }
.fb dl div { display: flex; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--gline); padding: 6px 0; }
.fb dt { color: var(--muted); font-weight: 700; min-width: 140px; font-size: 14px; }
.fb dd { margin: 0; flex: 1; min-width: 200px; }

/* Results */
.results { text-align: left; }
.big { font-family: var(--slab); font-size: 64px; line-height: 1; margin: 6px 0; }
.rank { font-family: var(--slab); font-size: 26px; color: var(--rosa); }
.stampbox { display: inline-block; font-family: var(--slab); font-size: 18px; color: var(--jade); border: 3px solid currentColor; border-radius: 8px; padding: 3px 12px; transform: rotate(-3deg); margin-top: 6px; }
.stampbox.out { color: var(--bad); }
.rec { display: inline-block; background: var(--cempa); color: #1A1A2E; font-weight: 700; border: 2px solid #1A1A2E; border-radius: 999px; padding: 4px 14px; box-shadow: 3px 3px 0 var(--ink); }
.rv, .game .rv { font-family: var(--slab); font-weight: 400; font-size: 24px; margin: 28px 0 8px; }
.miss { background: var(--surface); border: 2px solid var(--gline); border-left: 6px solid var(--bad); border-radius: 10px; padding: 10px 14px; margin-top: 10px; }
.miss .q { font-weight: 700; }
.miss .a { color: var(--good); font-weight: 700; margin-top: 4px; }
.miss .e { margin-top: 4px; font-size: 15.5px; color: var(--muted); }

/* Visible watermark: the player's email, tiled, barely visible */
.wm { position: fixed; inset: 0; pointer-events: none; z-index: 50; opacity: .06; background-repeat: repeat; }

/* Serial cases (kit view, /js/serial-case.js): vignette card, highlighted
   findings with their brief, the Radiografía inside each option, one feedback
   card (verdict, dato clave, trap and citation rows that open on tap) and a bar
   fixed to the bottom of the screen. Paper cards stay cream with dark ink in
   both themes. */
.vwrap, .sc-tipwrap { position: relative; }
.vcase { position: relative; background: var(--paper); color: var(--card-ink); border: 3px solid var(--card-ink); border-radius: 16px;
  box-shadow: 6px 6px 0 var(--cempa); padding: 20px 18px 16px; margin-bottom: 18px; overflow: hidden; animation: pop-in .18s ease-out; }
.vcase::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px;
  background: linear-gradient(90deg, var(--s1) 0 33.3%, var(--s2) 33.3% 66.6%, var(--s3) 66.6%); }
.vcase .meta { margin: 0 0 8px; font-size: 14px; font-weight: 700; color: #5A5470; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.vtagc { background: var(--cempa); color: var(--card-ink); border: 2px solid var(--card-ink); border-radius: 999px; padding: 1px 10px; font-family: var(--slab); font-weight: 400; font-size: 14px; }
.vtext { margin: 0; font-size: 18px; line-height: 1.55; }
.sc-stem { margin: 0 0 14px; }
.sc-stem .qtext { margin: 0; font-size: 19px; font-weight: 700; line-height: 1.45; }
.hl { display: inline; font: inherit; color: inherit; line-height: inherit; padding: 0 2px; margin: 0; border: 0; border-bottom: 2px solid var(--card-ink); border-radius: 3px;
  background: color-mix(in srgb, var(--cempa) 45%, transparent); cursor: help; text-align: left; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.vcase .hl { color: var(--card-ink); }
.hl[aria-expanded="true"] { background: var(--cempa); }
.hl:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.hl-tip { position: absolute; z-index: 5; background: var(--paper); color: var(--card-ink); border: 2px solid var(--card-ink); border-radius: 10px; box-shadow: 4px 4px 0 var(--card-ink);
  padding: 8px 12px; font-size: 15px; font-weight: 400; line-height: 1.4; }
.hl-tip[hidden] { display: none; }

.sc-hlnote p { margin: 0; font-size: 14px; font-weight: 700; color: #5A5470; }

/* Options carry their Radiografía: open on the pick and the right answer, one tap away on the others. */
.sc-orow { display: grid; }
.sc-opts .opt .ob { flex: 1; min-width: 0; display: grid; gap: 6px; }
.sc-opts .opt.dim:not([disabled]) { cursor: pointer; }
.sc-opts .opt.dim.open { opacity: 1; border-color: var(--ink); }
.rx-tag { flex: 0 0 auto; align-self: center; font-size: 12px; font-weight: 700; letter-spacing: .04em; border: 2px solid currentColor; border-radius: 6px; padding: 1px 6px; color: var(--muted); }
.opt.open .rx-tag { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.rx { display: grid; gap: 2px; border-top: 2px dashed color-mix(in srgb, var(--text) 25%, transparent); padding-top: 6px; font-size: 15px; line-height: 1.45; animation: sc-in .18s ease-out; }
.rx[hidden] { display: none; }
.rx-h { font-size: 12.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
.opt.ok .rx-h { color: var(--good); }
.opt.no .rx-h, .rx-trap { color: var(--bad); }

/* One feedback card; its hard shadow carries the verdict. */
.explain.sc-fb { background: var(--paper); color: var(--card-ink); border: 3px solid var(--card-ink); border-radius: 14px; padding: 14px 16px 4px;
  box-shadow: 5px 5px 0 var(--bad); animation: sc-in .18s ease-out; margin-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
.explain.sc-fb.ok { box-shadow: 5px 5px 0 var(--good); }
/* The card stays cream in both themes, so whatever sits inside it (the topic line,
   the report form, a game's extras) takes the card's ink; the fixed bar keeps the page's. */
.game { --page-ink: var(--ink); --page-text: var(--text); --page-muted: var(--muted); --page-surface: var(--surface); }
.explain.sc-fb { --ink: var(--card-ink); --text: var(--card-ink); --muted: #5A5470; --surface: var(--paper); }
.sc-fb .sc-bar { --ink: var(--page-ink); --text: var(--page-text); --muted: var(--page-muted); --surface: var(--page-surface); }
@keyframes sc-in { from { opacity: 0; } }
.sc-vrow { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sc-fb .verdict.ok { color: #0F8B6C; }
.sc-fb .verdict.no { color: #C62839; }
.sc-right { font-weight: 700; font-size: 15.5px; }
.sc-clue { margin: 10px 0 12px; }
.sc-clue b { font-family: var(--slab); font-weight: 400; font-size: 15px; }
.sc-fb .sc-clue .sc-cl { margin: 2px 0 0; font-weight: 700; font-size: 17px; }
.sc-fb .sc-clue .sc-exp { margin: 4px 0 0; }
.sc-hlnote { font-size: 15px; margin: 0 0 12px; }
.sc-hlnote ul { margin: 6px 0 0; padding-left: 18px; }
.sc-fb .dz { margin: 0 0 12px; }
.sc-disc { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 48px; padding: 8px 0; background: none; border: 0;
  border-top: 2px dashed color-mix(in srgb, var(--card-ink) 30%, transparent); text-align: left; cursor: pointer; color: var(--card-ink); font: inherit; font-size: 15.5px; }
.sc-disc:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sc-dh { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; flex: 1; }
.sc-dt { font-family: var(--slab); font-weight: 400; }
.sc-sh { font-weight: 700; font-size: 14.5px; min-width: 0; flex: 1; }
.sc-more-l { margin-left: auto; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; font-weight: 700; white-space: nowrap;
  color: var(--card-ink); background: var(--paper); border: 2px solid var(--card-ink); border-radius: 999px; padding: 2px 10px; box-shadow: 2px 2px 0 var(--card-ink); }
.sc-disc:active .sc-more-l { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--card-ink); }
@media (hover: hover) { .sc-disc:hover .sc-more-l { background: color-mix(in srgb, var(--cempa) 30%, var(--paper)); } }
.sc-chev { font-size: 12px; transition: transform .15s; }
.sc-disc[aria-expanded="true"] .sc-chev { transform: rotate(180deg); }
.sc-fell { font-size: 14px; margin: 0; padding: 1px 8px; }
.sc-conf { border-top: 2px dashed color-mix(in srgb, var(--card-ink) 30%, transparent); padding: 10px 0 4px; font-size: 15px; }
.sc-conf p { margin: 0 0 6px; }
.sc-conf .sc-dt { font-size: 15.5px; }
.sc-conf .sc-cnote { font-size: 14px; opacity: .85; }
.sc-body { padding: 0 0 12px; font-size: 15.5px; animation: sc-in .18s ease-out; }
.sc-body[hidden] { display: none; }
.sc-body p { margin: 0; }
.sc-body blockquote { margin: 0; border-left: 4px solid var(--azul); padding: 2px 0 2px 10px; font-style: italic; color: #5A5470; }
.sc-body details { margin-top: 8px; }
.sc-body summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.sc-body summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sc-more { margin-top: 8px; display: grid; gap: 2px; }
.sc-msh { font-weight: 700; font-size: 14px; }
.sc-doi { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; color: var(--azul); }
.sc-doi:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sc-fb .report { margin: 0 0 12px; }
.sc-fb .report-form .inp { scroll-margin-bottom: 110px; }

/* «Siguiente» and the report flag, fixed to the bottom of the screen while the feedback shows. */
.sc-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--bg);
  border-top: 2px solid color-mix(in srgb, var(--ink) 18%, transparent); padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }
.sc-bar-in { max-width: 788px; margin: 0 auto; display: flex; gap: 10px; align-items: center; }
.sc-bar .btn { flex: 1; min-height: 52px; }
.sc-bar .icon-btn.sc-flag { width: 52px; height: 52px; flex: 0 0 auto; min-width: 52px; padding: 0 12px; font-size: 1.15rem; font-weight: 700; }
.sc-bar .icon-btn.sc-flag[disabled] { background: var(--cempa); transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); cursor: default; }
@media (max-width: 480px) { .sc-bar .btn .kb { display: none; } }
.sc-miss .mcase { margin: 0 0 6px; font-size: 15px; color: var(--muted); }
.report-l { display: grid; gap: 4px; font-size: 14px; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .vcase, .rx, .sc-body, .explain.sc-fb { animation: none; } .sc-chev { transition: none; } }

/* Toxíndromes y antídotos: question tag, vital-sign arrows, the eye panel and the
   syndrome fichas. Arrows carry the meaning; color only repeats it. */
.qtag { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: var(--c, var(--ink)); border: 2px solid var(--ink); border-radius: 999px; padding: 2px 12px; margin-bottom: 10px; }
.vstrip { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.vt { font-weight: 700; font-size: 15px; border: 2px solid currentColor; border-radius: 8px; padding: 3px 10px; background: var(--surface); font-variant-numeric: tabular-nums; }
.vt.up { color: var(--bad); }
.vt.down { color: var(--azul); }
.eyebox { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--paper); color: var(--card-ink); border: 2px solid var(--ink); border-radius: 12px; box-shadow: 4px 4px 0 var(--ink); padding: 10px 16px; margin: 0 0 14px; width: fit-content; max-width: 100%; }
.eyebox .pl { font-family: var(--slab); font-size: 18px; min-width: 7ch; }
.case.tox .qtext { margin-top: 10px; }
.tox-ficha .agents { color: var(--muted); margin: 2px 0 12px; }
.tox-ficha ul { margin: 6px 0 12px; padding-left: 20px; }
.tox-ficha .prow { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 6px 0 10px; }
.tox-ficha .plbl { font-weight: 700; color: var(--c); }
.tox-ficha .tx { display: inline-block; font-weight: 700; background: color-mix(in srgb, var(--jade) 14%, var(--surface)); border: 2px solid var(--jade); border-radius: 8px; padding: 4px 12px; }
.tox-ficha .mn { margin: 12px 0 0; font-style: italic; }

/* Anemias: La Ventanilla's lab ticket (a paper card; header and shadow in the mode's
   color --c, the deciding result marked) and El Árbol de Coombs' branch trail and
   result slip. */
.ticket { --c: var(--ink); background: var(--paper); color: var(--card-ink); border: 2px solid var(--card-ink); border-radius: 8px; margin: 0 0 16px; box-shadow: 5px 5px 0 var(--c); overflow: hidden; padding-bottom: 12px; }
.ticket .th { background: var(--c); color: #fff; padding: 8px 14px; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-weight: 700; font-size: 14px; }
.ticket .th b { font-family: var(--slab); font-weight: 400; font-size: 17px; }
.ticket .pt { padding: 10px 14px 4px; font-size: 16px; }
.ticket .pt small { color: #5A5F78; display: block; font-size: 13px; }
.ticket table { width: 100%; border-collapse: collapse; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 15px; margin: 4px 0 0; }
.ticket td { border-bottom: 1px dashed #B9B2A0; padding: 6px 14px; }
.ticket td.v { font-weight: 700; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ticket tr.hi td { background: color-mix(in srgb, var(--cempa) 26%, transparent); }
.ticket tr.hi td.v::after { content: " ◀"; color: var(--panda); }
.ticket .q { padding: 10px 14px 0; margin: 0; font-weight: 700; font-size: 17px; }
.trail { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 14px; font-size: 14px; font-weight: 700; }
.trail .node { background: var(--surface); border: 2px solid var(--c, var(--ink)); border-radius: 8px; padding: 3px 9px; }
.trail .node.bad { border-style: dashed; }
.trail .arr { color: var(--muted); }
.result { background: var(--paper); color: var(--card-ink); border: 2px dashed var(--card-ink); border-radius: 10px; padding: 8px 12px; margin: 0 0 14px; font-weight: 700; }

/* Hipertensión en el embarazo: Cifras que Matan's order sheet (a paper card with a
   blank that fills with the right figure), La Guardia de Toco's bed monitor strip
   and course of events, and Ordénalo's graded slots. */
.sheet { background: var(--paper); color: var(--card-ink); border: 2px solid var(--card-ink); border-radius: 10px; box-shadow: 5px 5px 0 var(--cempa); padding: 0 0 6px; margin: 0 0 16px; overflow: hidden; }
.sheet .hd { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 14px; border-bottom: 2px dashed #B9B2A0; font-family: var(--slab); font-size: 16px; }
.sheet .qtext { padding: 10px 14px; margin: 0; }
.blank { display: inline-block; min-width: 4ch; padding: 0 8px; margin: 0 2px; border-bottom: 3px solid var(--card-ink); text-align: center; font-weight: 700; }
.blank.fill { background: color-mix(in srgb, var(--jade) 18%, transparent); border-bottom-color: var(--jade); }
.bedmon { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #0B1A1E; color: #CFF7E6; border: 3px solid var(--ink); border-radius: 12px; box-shadow: 4px 4px 0 var(--ink); padding: 8px 12px; margin: 0 0 14px; }
.bedmon .bed { font-weight: 700; font-size: 14px; letter-spacing: .03em; }
.bedmon .ecgline { flex: 1 1 60px; min-width: 60px; height: 22px; background: no-repeat center / 100% 100% url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 26' preserveAspectRatio='none'%3E%3Cpath d='M0 14h22l4-8 5 16 5-20 4 12h28l4-8 5 16 5-20 4 12h30' fill='none' stroke='%2335F29A' stroke-width='2'/%3E%3C/svg%3E"); }
.course { display: block; font-weight: 700; color: var(--good); }
.course.bad { color: var(--bad); }
.slot.ok { border-style: solid; }
.slot.no { border-style: dashed; }
.solution { margin: 6px 0 0; padding-left: 22px; }

/* Apendicitis aguda: the topic strip on the home screen, the Alvarado table's
   score bands, Alvarado en vivo's criteria grid and meter, El Reloj del
   apéndice's phase clock and the Quirófano doors (legacy look; the clock is
   .phclock so it doesn't meet Código Infarto's .clock). */
.spec { display: grid; grid-template-columns: repeat(6, 1fr); border: 3px solid var(--ink); border-radius: 12px; overflow: hidden; margin: 0 0 24px; box-shadow: 5px 5px 0 var(--ink); }
.spec div { background: var(--c); color: var(--ct, #fff); padding: 8px 6px 9px; font-weight: 700; font-size: 13.5px; line-height: 1.2; text-align: center; }
@media (max-width: 640px) { .spec { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 380px) { .spec { grid-template-columns: 1fr 1fr; } }
.tablewrap th.c { border-top: 6px solid var(--c); }
.tablewrap td.pts { font-family: var(--slab); font-size: 18px; text-align: center; }
.bands { display: grid; gap: 8px; margin-top: 10px; }
.band { display: grid; grid-template-columns: 92px 1fr; border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; background: var(--surface); box-shadow: 3px 3px 0 var(--ink); }
.band .bn { background: var(--c); color: var(--ct, #fff); font-family: var(--slab); display: grid; place-items: center; font-size: 17px; padding: 6px; text-align: center; line-height: 1.1; }
.band .bn small { display: block; font-family: var(--sans); font-size: 11px; }
.band .bd { padding: 7px 11px; font-size: 15.5px; }
.mant { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 520px) { .mant { grid-template-columns: 1fr; } }
.mi { display: flex; align-items: center; gap: 10px; text-align: left; background: var(--surface); color: var(--text); border: 2px solid var(--gline); border-radius: 10px; padding: 10px 12px; min-height: 52px; font: inherit; font-size: 16px; width: 100%; cursor: pointer; }
.mi .lt { flex: 0 0 34px; height: 34px; border-radius: 8px; border: 2px solid var(--ink); display: grid; place-items: center; font-family: var(--slab); font-size: 18px; background: var(--paper); color: var(--card-ink); }
.mi .pp { margin-left: auto; font-weight: 700; font-size: 13px; color: var(--muted); white-space: nowrap; }
.mi[aria-pressed="true"] { border-color: var(--ink); background: color-mix(in srgb, var(--cempa) 22%, var(--surface)); }
.mi[aria-pressed="true"] .lt { background: var(--cempa); }
.mi.ok { border-color: var(--good); }
.mi.no { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, var(--surface)); }
.mi .mk { font-weight: 700; margin-left: 6px; }
.mi.ok .mk { color: var(--good); }
.mi.no .mk { color: var(--bad); }
.mi[disabled] { cursor: default; }
.meter { display: flex; gap: 4px; margin: 14px 0 4px; }
.meter i { flex: 1; height: 18px; border: 2px solid var(--ink); border-radius: 4px; background: var(--surface); }
.meter i.on { background: var(--c); }
.meterlab { display: grid; grid-template-columns: 4fr 2fr 2fr 2fr; text-align: center; font-size: 12.5px; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.phclock { margin: 4px 0 16px; }
.phclock .bar { display: grid; grid-template-columns: 12fr 12fr 12fr 16fr; border: 3px solid var(--ink); border-radius: 10px; overflow: hidden; position: relative; box-shadow: 4px 4px 0 var(--ink); }
.phseg { background: var(--c); color: #fff; padding: 8px 4px; text-align: center; font-weight: 700; font-size: 13.5px; line-height: 1.15; min-height: 54px; display: grid; place-items: center; transition: opacity .2s; }
.phseg small { display: block; font-weight: 400; font-size: 11.5px; }
.phseg.dim { opacity: .28; }
.phseg.hi { outline: 4px solid var(--cempa); outline-offset: -4px; }
.phclock .pin { position: absolute; top: -2px; bottom: -2px; width: 4px; background: var(--ink); box-shadow: 0 0 0 2px #fff; }
.phclock .ticks { display: grid; grid-template-columns: 12fr 12fr 12fr 16fr; font-size: 12px; color: var(--muted); font-weight: 700; margin-top: 6px; }
.phclock .ticks span:last-child { text-align: right; }
@media (max-width: 420px) { .phseg { font-size: 12px; } .phseg small { display: none; } }
.doors { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 4px 0 16px; }
.door { --c: var(--jade); display: flex; flex-direction: column; align-items: center; gap: 4px; background: var(--paper); color: var(--card-ink); border: 3px solid var(--card-ink); border-top: 12px solid var(--c); border-radius: 14px 14px 8px 8px; padding: 14px 8px; min-height: 130px; box-shadow: 4px 4px 0 var(--ink); text-align: center; position: relative; font: inherit; cursor: pointer; }
.door:hover:not([disabled]) { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.door .di { font-size: 36px; line-height: 1.1; }
.door .dn { font-family: var(--slab); font-size: 20px; line-height: 1.1; }
.door .ds { font-size: 13.5px; color: #40455E; line-height: 1.25; }
.door .dk { position: absolute; top: 6px; left: 8px; font-weight: 700; font-size: 13px; background: var(--card-ink); color: var(--paper); border-radius: 5px; padding: 0 6px; }
.door.ok { outline: 4px solid var(--good); outline-offset: 2px; }
.door.no { outline: 4px solid var(--bad); outline-offset: 2px; }
.door[disabled] { cursor: default; }
@media (prefers-reduced-motion: reduce) { .phseg { transition: none; } .door:hover:not([disabled]) { transform: none; } }

/* Patología de vías biliares: the study grid, topic chips, the Lotería card's
   clue, option colour strips, La Ruta del Lito's map of the bile ducts and
   step verdicts, and El Semáforo's light and patient sheet (legacy look). */
.dchip { display: inline-block; background: var(--c); color: #fff; border-radius: 999px; padding: 1px 10px; font-size: 13.5px; font-weight: 700; }
.sgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 14px; }
@media (max-width: 560px) { .sgrid { grid-template-columns: 1fr; } }
.scard { --c: var(--rosa); display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; background: var(--paper); color: var(--card-ink); border: 3px solid var(--card-ink); border-left: 12px solid var(--c); border-radius: 12px; padding: 12px 14px; box-shadow: 4px 4px 0 var(--ink); font: inherit; cursor: pointer; }
.scard:hover { transform: translate(-2px, -2px); }
.scard .si { font-size: 28px; line-height: 1; }
.scard .sn { font-family: var(--slab); font-size: 21px; line-height: 1.1; }
.scard .st { font-size: 14.5px; color: #40455E; }
.lot .hint { font-size: 16px; padding: 0 14px 14px; color: var(--card-ink); font-weight: 700; }
.opt .sw { flex: 0 0 12px; align-self: stretch; border-radius: 4px; background: var(--c); }
.cmpnote { background: var(--surface); border: 2px dashed var(--gline); border-radius: 10px; padding: 10px 14px; margin-top: 14px; font-size: 15.5px; }
.ruta { display: grid; grid-template-columns: minmax(0, 320px) 1fr; gap: 22px; align-items: start; }
@media (max-width: 700px) { .ruta { grid-template-columns: 1fr; } }
.mapbox { background: var(--paper); border: 3px solid var(--card-ink); border-radius: 14px; box-shadow: 5px 5px 0 var(--ink); padding: 6px; }
.tmap { max-width: 360px; margin: 16px auto 0; }
.bmap { width: 100%; height: auto; display: block; }
.bmap .ml { font: 700 14px var(--sans); fill: #1A1A2E; }
.bmap .ml.light { fill: #FFF7E4; font-size: 15px; }
.bmap .mz { stroke: transparent; }
.bmap .mz[role="button"] { cursor: pointer; stroke: rgba(246, 162, 30, .18); }
.bmap .mz[role="button"]:hover, .bmap .mz[role="button"]:focus { stroke: rgba(246, 162, 30, .55); outline: none; }
.bmap .mz.right { stroke: rgba(15, 139, 108, .45); }
.bmap .mz.wrong { stroke: rgba(198, 40, 57, .45); }
.bmap .stone circle:first-child { fill: #3B2A1E; stroke: #FFF7E4; stroke-width: 2.5; }
.clues { margin: 6px 0 0; padding-left: 20px; font-size: 17px; }
.clues li { margin: 2px 0; }
.sitebtns { display: grid; gap: 10px; }
.stepv { margin: 4px 0 6px; padding: 8px 12px; border-radius: 8px; font-weight: 700; background: var(--surface); border: 2px solid var(--gline); }
.stepv.ok { border-color: var(--good); color: var(--good); }
.stepv.no { border-color: var(--bad); color: var(--bad); }
.semwrap { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: start; margin-bottom: 6px; }
.light { background: #1A1A2E; border-radius: 14px; padding: 10px 8px; display: grid; gap: 10px; justify-items: center; border: 3px solid #1A1A2E; box-shadow: 4px 4px 0 var(--ink); }
.light span { width: 40px; height: 40px; border-radius: 50%; background: color-mix(in srgb, var(--c) 28%, #1A1A2E); border: 2px solid #000; }
.light span.on { background: var(--c); box-shadow: 0 0 18px var(--c); }
.semsheet { background: var(--paper); color: var(--card-ink); border: 3px solid var(--card-ink); border-radius: 12px; padding: 10px 14px; box-shadow: 4px 4px 0 var(--ink); }
.semsheet .meta { font-weight: 700; font-size: 14.5px; color: #40455E; margin-bottom: 6px; }
.vrow { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed #D9CFBC; padding: 4px 0; font-size: 15.5px; }
.vrow:last-child { border-bottom: 0; }
.vrow b { text-align: right; }
@media (prefers-reduced-motion: reduce) { .scard:hover { transform: none; } }

/* Verdict stamp (motion.js stampPick): a rotated rubber stamp slammed onto the
   picked option, then the option's 2 px jolt, as on the gafete. Right and wrong
   also differ in the option's key, colour and Rojelio's pose (DESIGN.md §2). */
.opt.stamped { position: relative; }
.vstamp {
  position: absolute; top: 50%; right: 12px; z-index: 1; pointer-events: none;
  font-family: var(--slab); font-size: 15px; line-height: 1.1; letter-spacing: .5px;
  color: var(--good); background: var(--surface); border: 3px solid currentColor; border-radius: 8px;
  padding: 2px 8px; transform: translateY(-50%) rotate(-8deg); opacity: .92;
  animation: vstamp .26s cubic-bezier(.3, 1.5, .5, 1) both;
}
.vstamp.no { color: var(--bad); }
.opt.stamped .ot, .opt.stamped .ob, .opt.stamped .lbl { padding-right: 104px; }
.opt.big.stamped .vstamp { top: 8px; right: 8px; transform: rotate(-8deg); animation-name: vstamp-big; }
.opt.big.stamped .lbl { padding-right: 0; }
.opt.jolt { animation: gf-jolt .16s linear; }
@keyframes vstamp {
  0% { transform: translateY(-50%) scale(1.4) rotate(-14deg); opacity: 0; }
  60% { transform: translateY(-50%) scale(.96) rotate(-7deg); opacity: 1; }
  100% { transform: translateY(-50%) rotate(-8deg); opacity: .92; }
}
@keyframes vstamp-big {
  0% { transform: scale(1.4) rotate(-14deg); opacity: 0; }
  60% { transform: scale(.96) rotate(-7deg); opacity: 1; }
  100% { transform: rotate(-8deg); opacity: .92; }
}
@keyframes gf-jolt { 25% { translate: 2px 0; } 50% { translate: -2px 1px; } 75% { translate: 1px -1px; } }
@media (max-width: 480px) {
  .vstamp { font-size: 13px; padding: 1px 6px; right: 8px; }
  .opt.stamped .ot, .opt.stamped .ob { padding-right: 84px; }
}

/* Streak pill (motion.js watchStreak): the number bounces up; at 3, 5, 8 and 12,
   when Rojelio's streak lines fire, the pill flares once. */
.pill.tick { animation: streak-tick .32s cubic-bezier(.3, 1.6, .5, 1); display: inline-block; }
.pill.flare { animation: streak-flare .5s cubic-bezier(.3, 1.4, .5, 1); display: inline-block; }
@keyframes streak-tick { 40% { transform: translateY(-5px) scale(1.12); } }
@keyframes streak-flare {
  0% { box-shadow: 0 0 0 0 var(--cempa); }
  35% { transform: scale(1.22) rotate(-4deg); background: var(--cempa); color: #1A1A2E; box-shadow: 3px 3px 0 var(--ink); }
  100% { transform: none; }
}

/* Loading the game's menu (juego.js): blank lotería cards, cream with the
   stripe, that take their titles as list_games arrives. */
.lot.skel { --c: var(--paper); min-height: 250px; overflow: hidden; }
.lot.skel::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 8px;
  background: linear-gradient(90deg, var(--cemp) 0 33.33%, var(--jade) 33.33% 66.66%, var(--azul) 66.66%); }
.lot.skel .ttl { color: var(--card-ink); min-height: 1.15em; }
.lot.skel .bar { display: block; height: 12px; border-radius: 6px; background: var(--card-ink); opacity: .1; margin: 8px auto 0; width: 70%; }
.lot.skel .bar + .bar { width: 50%; }
.lot.skel .ico { height: 54px; }
@media (prefers-reduced-motion: no-preference) {
  .lot.skel { animation: skel-breathe 1.4s ease-in-out infinite; }
  .lot.skel .ttl.in { animation: gf-land .26s cubic-bezier(.3, 1.4, .5, 1) both; }
}
@keyframes skel-breathe { 50% { transform: translateY(-2px); } }
@keyframes gf-land {
  0% { transform: scale(1.25) rotate(3deg); opacity: 0; }
  60% { transform: scale(.98) rotate(-1deg); opacity: 1; }
  100% { transform: none; }
}
@media (max-width: 680px) { .lot.skel { min-height: 150px; } .lot.skel .ico { height: 40px; } }

/* Case feedback marker (juego.js markCases): a mode whose questions carry the
   serial-case feedback says so on its card, as a rubber stamp: «✓ Con retro» and
   the tagline «Anatomía de un caso ENARM» (JR, 10 Oct 2026). On one line with a
   dot when the card has room (the full-width cards on phones); otherwise the
   tagline goes to a small second line (the three-column cards on desktop). */
.mode .lot { container-type: inline-size; }
.rxmark {
  align-self: center; margin: 0 8px 10px; max-width: calc(100% - 16px); font-family: var(--sans); line-height: 1.2;
  color: var(--card-ink); background: var(--paper); border: 2px solid var(--card-ink); border-radius: 8px;
  padding: 4px 8px 4px 6px; box-shadow: 2px 2px 0 var(--card-ink); transform: rotate(-2deg);
  display: inline-grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 6px; row-gap: 1px; text-align: left;
}
.rxmark .rxw { display: contents; }
.rxmark .rxk { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: var(--jade); color: #fff; font-size: 13px; font-weight: 700; line-height: 1; }
.rxmark .rxl { font-family: var(--slab); font-weight: 400; font-size: 15px; white-space: nowrap; justify-self: start; }
.rxmark .rxdot { display: none; }
.rxmark .rxt { grid-column: 1 / -1; font-size: 13px; font-weight: 700; color: #40455E; white-space: nowrap; }
/* The narrowest cards (three columns just above 680 px): «Con retro» alone; the tagline is in the title. */
@container (max-width: 199px) { .rxmark .rxt { display: none; } }
@container (min-width: 330px) {
  .rxmark { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
  .rxmark .rxdot { display: inline; white-space: pre; font-weight: 700; margin-left: -6px; margin-right: -6px; }
}

/* ---- UI audit 10 Oct 2026 (docs/ui-audit-2026-10-10.md) ---------------------
   #2 Ink outlines: controls and cards in play carry 2–3 px ink borders and hard
   shadows (DESIGN.md §4; §7 forbids grey hairlines). Coloured side borders keep
   their colour. Pressing sinks a control into its shadow. */
.back, .pill, .opt, .fac, .mi, .mbtn, .vchip, .stepv, .miss, .ref, .fi { border-color: var(--ink); }
.ficha { border-top-color: var(--c); }
.miss { border-left-color: var(--bad); }
.vchip, .fi { border-left-color: var(--c); }
.mbtn { border-left-color: var(--c, #999); }
.ref { border-top-color: var(--c); }
.back { background: var(--surface); box-shadow: 3px 3px 0 var(--ink); transition: transform .1s, box-shadow .1s; }
.back:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.pill { box-shadow: 2px 2px 0 var(--ink); }
.opt, .fac, .mi, .mbtn { box-shadow: 3px 3px 0 var(--ink); transition: background-color .15s, border-color .15s, opacity .15s, transform .1s, box-shadow .1s; }
.opt:active:not([disabled]), .fac:active:not([disabled]), .mi:active:not([disabled]), .mbtn:active:not([disabled]) { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.opt.dim { box-shadow: none; }
.miss, .ref, .fi { box-shadow: 3px 3px 0 var(--ink); }
.gchip { box-shadow: 2px 2px 0 var(--ink); transition: transform .1s, box-shadow .1s; }
.gchip[aria-pressed="true"] { transform: translate(2px, 2px); box-shadow: none; color: var(--ct, #fff); }

/* #2 Paper cards stay cream in both themes, with dark ink inside (DESIGN.md §2):
   the fichas, the tables and the plain feedback box, like the case feedback card.
   Their tokens switch to the light ones inside, so everything in them stays readable. */
.ficha, .tablewrap, .explain:not(.sc-fb) {
  --ink: var(--card-ink); --text: var(--card-ink); --muted: #5A5470; --surface: var(--paper); --bg: var(--paper);
  --gline: #D3D7E5; --good: #0F8B6C; --bad: #C62839;
  background: var(--paper); color: var(--card-ink);
}
.ficha { border: 3px solid var(--card-ink); border-top: 10px solid var(--c); box-shadow: 5px 5px 0 var(--cempa); }
.tablewrap { border: 2px solid var(--card-ink); box-shadow: 4px 4px 0 var(--cempa); }
.ficha .tablewrap { box-shadow: none; }
.explain:not(.sc-fb) { border: 3px solid var(--card-ink); box-shadow: 5px 5px 0 var(--cempa); }
.explain:not(.sc-fb):has(> .verdict.ok) { box-shadow: 5px 5px 0 var(--page-good, #0F8B6C); }
.explain:not(.sc-fb):has(> .verdict.no) { box-shadow: 5px 5px 0 var(--page-bad, #C62839); }
:root[data-theme="dark"] .ficha dt { color: var(--c); }
.game { --page-good: var(--good); --page-bad: var(--bad); }

/* #7 Dark-theme contrast. Lotería cards keep a cream outline, so a dark card
   (#1A1A2E) still shows its edge and band; chips do the same, with their colour
   as an inner ring. Titles and pressed chips take --ct, the readable ink for
   their colour, set by juego.js (readable()): white, or card ink on light bands
   such as cempasúchil. */
.lot .ttl { color: var(--ct, #fff); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .game .lot { box-shadow: 0 0 0 3px var(--ink), 6px 6px 0 3px var(--ink); }
  :root:not([data-theme="light"]) .game .mode:active .lot { box-shadow: 0 0 0 3px var(--ink), 3px 3px 0 3px var(--ink); }
  :root:not([data-theme="light"]) .game .gchip { border-color: var(--ink); box-shadow: inset 0 0 0 2px var(--c), 2px 2px 0 var(--ink); }
  :root:not([data-theme="light"]) .game .gchip[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--ink); }
  :root:not([data-theme="light"]) .vt.down { color: color-mix(in srgb, var(--azul) 55%, #fff); }
  :root:not([data-theme="light"]) .fac .L { color: var(--good); }
}
:root[data-theme="dark"] .game .lot { box-shadow: 0 0 0 3px var(--ink), 6px 6px 0 3px var(--ink); }
:root[data-theme="dark"] .game .mode:active .lot { box-shadow: 0 0 0 3px var(--ink), 3px 3px 0 3px var(--ink); }
:root[data-theme="dark"] .game .gchip { border-color: var(--ink); box-shadow: inset 0 0 0 2px var(--c), 2px 2px 0 var(--ink); }
:root[data-theme="dark"] .game .gchip[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--ink); }
:root[data-theme="dark"] .vt.down { color: color-mix(in srgb, var(--azul) 55%, #fff); }
:root[data-theme="dark"] .fac .L { color: var(--good); }

/* #9 / SLOW: a tap waiting for the engine (motion.js busy()): the tapped button
   sinks and the other options stop taking taps until the reply. */
.opt.sent, .btn.sent, .fac.sent, .mi.sent, .mbtn.sent { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); border-color: var(--ink); }
.mode.sent .lot { transform: translate(3px, 3px); }
.opts.busy { cursor: progress; }
.opts.busy .opt:not(.sent) { pointer-events: none; }
.lot .new { font-size: 13px; }
.mode .best { color: color-mix(in srgb, var(--panda) 85%, #000); }
.segbtn[aria-pressed="true"] { color: var(--ct, #fff); }

/* HAS en adultos: the drug table is wide, and the treatment ladder climbs in
   three paper steps (legacy has-en-adultos.html; one column on phones). */
table.wide { min-width: 760px; }
.ladder { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.rung { background: var(--paper); color: var(--card-ink); border: 3px solid var(--card-ink); border-radius: 10px; padding: 10px 12px; box-shadow: 4px 4px 0 var(--card-ink); }
.rung:nth-child(2) { margin-top: 10px; }
.rung:nth-child(3) { margin-top: 20px; }
.rung b { font-family: var(--slab); font-weight: 400; display: block; color: #C27A00; }
.rung span { font-size: 15px; }
@media (max-width: 640px) {
  .ladder { grid-template-columns: 1fr; }
  .rung:nth-child(n) { margin-top: 0; }
}

/* HAS en adultos, El Baumanómetro: the reading on a BP monitor (legacy has-en-adultos.html);
   office and home side by side for the pair readings. The screen stays its LCD green in both themes. */
.bp { background: #2B3550; border: 3px solid #1A1A2E; border-radius: 22px; padding: 10px 12px 12px; box-shadow: 6px 6px 0 #1A1A2E; color: #E9ECF4; }
.bp.home { background: #0F6B55; }
.bp-where { font-weight: 700; font-size: 14px; text-align: center; margin: 0 0 6px; color: #E9ECF4; }
.bp-screen { background: #C9D9B2; color: #1C2A17; border-radius: 10px; padding: 8px 14px 6px; box-shadow: inset 0 3px 0 rgba(0, 0, 0, .18); position: relative; }
.bp-row { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.bp-l { font-weight: 700; font-size: 13px; letter-spacing: .5px; opacity: .75; }
.bp-v { font-family: var(--slab); font-size: 56px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.bp-unit { text-align: right; font-size: 12px; font-weight: 700; opacity: .7; }
.bp-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 460px; margin: 4px auto 14px; }
.bp-pair.one { grid-template-columns: 1fr; max-width: 240px; }
.clue.center { text-align: center; }
.opts.two { grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) {
  .bp-v { font-size: 44px; }
  .bp-pair { gap: 10px; }
}
/* Numeric answer (kit piece, /js/numeric.js): the number typed into a paper card
   with its unit beside it and «Responder»; after the answer, the right figure and
   the player's. */
.num { background: var(--paper); color: var(--card-ink); border: 2px solid var(--card-ink); border-radius: 12px; box-shadow: 4px 4px 0 var(--cempa); padding: 12px 14px; margin: 0 0 6px; }
.num-l { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.num-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.num-in { flex: 1 1 120px; min-width: 0; max-width: 220px; min-height: 48px; font-family: var(--slab); font-size: 24px; font-variant-numeric: tabular-nums;
  padding: 6px 12px; border: 3px solid var(--card-ink); border-radius: 10px; background: #fff; color: var(--card-ink); }
.num-in:focus-visible { outline: 3px solid var(--azul); outline-offset: 2px; }
.num-in[aria-invalid="true"] { border-color: #C62839; }
.num-in:disabled { opacity: .7; }
.num-u { font-weight: 700; font-size: 17px; }
.num .btn { margin-left: auto; }
.num-hint { margin: 8px 0 0; font-weight: 700; font-size: 15px; color: #C62839; }
.num-res { border-left: 6px solid var(--good); padding: 2px 0 2px 12px; margin: 6px 0 0; font-variant-numeric: tabular-nums; }
.num-res.no { border-left-color: var(--bad); }
.num-res p { margin: 2px 0; }
.num-res b { font-family: var(--slab); font-weight: 400; font-size: 19px; }

/* Diabetes en el embarazo (legacy look): El Glucómetro's lab slip (rows marked
   ✓ / ⚠ after the answer) and traffic-light options; La Jeringa's step dots, the
   breakfast and dinner syringes and the patient's numbers. */
.slip { margin: 12px 0 4px; background: var(--paper); color: var(--card-ink); border: 2px solid var(--card-ink); border-radius: 10px; overflow: hidden; box-shadow: 3px 3px 0 var(--ink); font-variant-numeric: tabular-nums; }
.slip .sh { display: flex; justify-content: space-between; gap: 8px; background: var(--card-ink); color: var(--paper); font-weight: 700; font-size: 13px; padding: 6px 12px; letter-spacing: .3px; text-transform: uppercase; }
.slip .lr { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 12px; border-top: 1px dashed #B9B2A0; font-size: 16px; }
.slip .sh + .lr { border-top: 0; }
.slip .ln { min-width: 0; }
.slip .lv { font-family: var(--slab); font-size: 22px; text-align: right; }
.slip .lv small { font-family: var(--sans); font-size: 13px; color: #5A5F78; }
.slip .lv i { font-style: normal; font-family: var(--sans); font-size: 15px; margin-left: 6px; }
.slip .lr.bad .lv { color: #C62839; }
.slip .lr.ok .lv { color: #0B6E55; }
.case .qq { margin-top: 12px; }
.case .who { font-size: 16px; margin: 4px 0 8px; }
.opt.tl.tl-g .k { background: var(--jade); color: #fff; }
.opt.tl.tl-y .k { background: var(--cempa); color: var(--card-ink); }
.opt.tl.tl-r .k { background: #C62839; color: #fff; }
.opt.tl.ok .k { background: var(--good); color: #fff; }
.opt.tl.no .k { background: var(--bad); color: #fff; }
.steps { display: inline-flex; gap: 5px; align-items: center; margin-left: auto; }
.steps i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink); background: var(--surface); display: block; }
.steps i.cur { background: var(--cempa); }
.steps i.ok { background: var(--good); }
.steps i.no { background: var(--bad); }
.syrs { display: grid; grid-template-columns: auto auto 1fr; gap: 18px; align-items: end; background: var(--surface); border: 2px solid var(--gline); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
@media (max-width: 520px) { .syrs { grid-template-columns: 1fr 1fr; gap: 12px; } .jinfo { grid-column: 1 / -1; } }
.syr { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 108px; }
.syt { font-weight: 700; font-size: 14px; }
.barrel { position: relative; width: 46px; height: 156px; border: 3px solid var(--ink); border-bottom-width: 4px; border-radius: 6px 6px 4px 4px; background: color-mix(in srgb, var(--surface) 70%, var(--azul) 12%); overflow: hidden; }
.barrel .fill { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; }
.barrel .fill i { display: block; width: 100%; transition: height .45s ease; }
.barrel .ticks { position: absolute; inset: 0; background: repeating-linear-gradient(to top, transparent 0 14px, rgba(26, 26, 46, .35) 14px 15px); pointer-events: none; }
.syrs .nph { background: repeating-linear-gradient(45deg, #E9E3D2 0 5px, #CFC6AE 5px 10px); }
.syrs .rap { background: var(--cempa); }
.needle { width: 4px; height: 18px; background: var(--ink); border-radius: 0 0 2px 2px; }
.syl { font-size: 13px; text-align: center; line-height: 1.25; min-height: 34px; }
.syl b { font-family: var(--slab); font-weight: 400; font-size: 16px; }
.syl span { font-family: var(--slab); font-size: 18px; color: var(--muted); }
.jinfo { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-self: stretch; align-content: center; }
.jinfo > div { background: var(--paper); color: var(--card-ink); border: 2px solid var(--card-ink); border-radius: 8px; padding: 6px 10px; }
.jinfo small { display: block; font-size: 12px; color: #5A5F78; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }
.jinfo b { font-family: var(--slab); font-weight: 400; font-size: 19px; font-variant-numeric: tabular-nums; }
.jinfo .leg { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; }
.jinfo .leg i { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--card-ink); border-radius: 3px; margin-left: 6px; }
@media (prefers-reduced-motion: reduce) { .barrel .fill i { transition: none; } }

/* Progressive reveal (reveal.js; Sangrado 2.º/3.er's Pista por pista): the legacy clue card. */
/* Cream card in both themes: the page tokens point at the card's ink inside it (as .sc-fb). */
/* .game div.rv: the card, not the older .rv results heading (h2/h3) whose rule above would set its font. */
.rv, .game div.rv { font-family: inherit; font-weight: inherit; font-size: inherit; --ink: var(--card-ink); --text: var(--card-ink); --muted: #5A5470; --surface: var(--paper); background: var(--paper); color: var(--card-ink); border: 6px solid var(--rosa); border-radius: 12px;
  box-shadow: 0 0 0 3px var(--card-ink), 6px 6px 0 3px var(--card-ink); padding: 14px 14px 16px; margin: 6px 0 22px; }
.rv-h { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; font-weight: 700; font-size: 15px; }
.rv-h b { font-family: var(--slab); font-weight: 400; font-size: 22px; }
.rv ol { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.rv li { display: flex; gap: 10px; align-items: flex-start; font-size: 17px; font-weight: 700; background: #fff; border: 2px solid var(--card-ink); border-radius: 8px; padding: 8px 10px; }
.rv-k { flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--rosa); color: #fff; display: grid; place-items: center; font-family: var(--slab); font-size: 14px; }
.rv li.rv-hid { color: #5A5470; font-weight: 400; border-style: dashed; background: transparent; }
.rv li.rv-hid .rv-k { background: #77778F; }
.rv li.rv-late { opacity: .72; }
.rv li.rv-in { animation: rv-in .3s ease-out; }
.rv .rv-more { margin-top: 12px; color: var(--card-ink); border-color: var(--card-ink); width: 100%; }
.rv .rv-more[hidden] { display: none; }
@keyframes rv-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .rv li.rv-in { animation: none; } }

/* Algorithm walk (kit piece, /js/branch.js; legacy HAS «El Algoritmo»): the patient's
   chart in its topic colour, one dot per decision, the decisions taken, the scene and
   the question; after a pick, the consequence line in its own box. */
.bw-chart { background: var(--paper); color: var(--card-ink); border: 3px solid var(--card-ink); border-radius: 12px; box-shadow: 6px 6px 0 var(--c); padding: 14px 16px; margin-bottom: 16px; }
.bw-chart .meta { color: #555B75; }
.bw-h { display: flex; gap: 12px; align-items: center; }
.bw-i { font-size: 34px; width: 52px; height: 52px; display: grid; place-items: center; background: #fff; border: 3px solid var(--c); border-radius: 50%; flex: 0 0 52px; }
.bw-t { font-family: var(--slab); font-size: 20px; line-height: 1.15; }
.bw-t.bw-v { font-family: inherit; font-size: 17px; line-height: 1.4; }
.bw-path { display: flex; gap: 6px; margin: 12px 0 4px; }
.bw-step { flex: 1; height: 8px; border-radius: 99px; background: #D3D7E5; }
.bw-step.ok { background: #0F8B6C; }
.bw-step.no { background: #C62839; }
.bw-step.now { background: var(--c); }
.bw-hist { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; font-size: 15px; }
.bw-hist li { border-left: 4px solid #0F8B6C; padding: 2px 0 2px 10px; display: grid; gap: 2px; }
.bw-hist li.no { border-left-color: #C62839; }
.bw-hs { color: #555B75; }
.bw-s { margin: 12px 0 0; font-size: 18px; }
.bw-q { margin: 8px 0 0; font-size: 18px; font-weight: 700; }
.bw-cons { margin-top: 8px; background: color-mix(in srgb, var(--bad) 10%, var(--surface)); border-radius: 8px; padding: 8px 12px; }
.bw-cons.ok { background: color-mix(in srgb, var(--good) 10%, var(--surface)); }

/* Control prenatal (legacy look): Leopold's mnemonics, the tables' titles, the agenda's five
   visits, the calculator / semáforo card, the prescription pad and the «chuleta». */
.cp-mnem { border: 3px dashed var(--c); border-radius: 12px; padding: 10px 14px 8px; margin: 16px 0 0; text-align: center; }
.cp-mnem > b { display: block; font-family: var(--slab); font-weight: 400; font-size: 17px; }
.cp-mnem p { margin: 6px 0; font-size: 18px; font-style: italic; }
.cp-mnem p b { color: var(--c); }
.cp-mnem .cp-mkey { font-size: 14px; font-style: normal; color: var(--muted); }
.tt { font-family: var(--slab); font-weight: 400; font-size: 21px; margin: 18px 0 4px; }
.tsub { color: var(--muted); font-size: 14.5px; margin: 0 0 8px; }
.tablewrap table.wide { min-width: 640px; }
.cp-ag { text-align: center; }
.cp-slots { display: grid; grid-template-columns: 1fr; gap: 7px; margin-bottom: 14px; }
.cp-slot { --c: var(--jade); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; text-align: left; background: var(--surface); color: var(--text); border: 3px solid var(--c); border-radius: 10px; padding: 6px; min-height: 54px; font: inherit; cursor: pointer; }
.cp-slot .sh { flex: 0 0 118px; background: var(--c); color: #fff; border-radius: 6px; padding: 4px 2px 5px; text-align: center; }
.cp-slot .sn { display: block; font-family: var(--slab); font-size: 20px; line-height: 1; }
.cp-slot .sw { display: block; font-weight: 700; font-size: 13px; margin-top: 2px; }
.cp-slot .pl { flex: 1; display: flex; flex-wrap: wrap; gap: 4px; }
.cp-slot .pl span { font-size: 12px; line-height: 1.25; border-left: 4px solid var(--c); background: color-mix(in srgb, var(--c) 12%, var(--surface)); border-radius: 3px; padding: 2px 5px; }
.cp-slot:hover:not([disabled]) { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.cp-slot.ok { box-shadow: 0 0 0 3px var(--good); }
.cp-slot.no { box-shadow: 0 0 0 3px var(--bad); opacity: .75; }
.cp-calc .meta { display: inline-block; background: var(--c, var(--jade)); color: #fff; font-weight: 700; font-size: 13px; border-radius: 6px; padding: 2px 9px; }
.cp-given { font-family: var(--slab); font-size: clamp(22px, 6vw, 32px); line-height: 1.15; margin: 8px 0 4px; }
.cp-padh { display: flex; gap: 12px; align-items: flex-start; border-bottom: 2px dashed color-mix(in srgb, var(--text) 35%, transparent); padding-bottom: 10px; }
.cp-padh p { margin: 2px 0 0; }
.cp-padh b { font-family: var(--slab); font-weight: 400; font-size: 22px; line-height: 1.1; }
.cp-rxk { font-family: var(--slab); font-size: 40px; line-height: 1; color: #0B7285; }
.cp-lines { list-style: none; margin: 6px 0 8px; padding: 0; }
.cp-lines li { display: flex; gap: 10px; flex-wrap: wrap; padding: 8px 6px; border-bottom: 1px dotted color-mix(in srgb, var(--text) 30%, transparent); }
.cp-lines li:last-child { border-bottom: 0; }
.cp-lines .fl { font-weight: 700; min-width: 128px; }
.cp-lines .fv { flex: 1; min-width: 0; }
.cp-lines li.cur { background: color-mix(in srgb, #F6A21E 30%, transparent); border-radius: 6px; }
.cp-lines li.ok .fv { color: var(--good); font-weight: 700; }
.cp-lines li.no .fv s { color: var(--bad); }
.chuleta { background: var(--surface); border: 2px solid var(--gline); border-radius: 12px; padding: 10px 14px; margin: 14px 0; }
.chuleta summary { cursor: pointer; font-weight: 700; padding: 6px 0; min-height: 44px; display: flex; align-items: center; }

/* Infecciones vaginales (legacy look): options that are the four infections carry
   their colour on the left edge (Lotería de flujos, the microscope's first step);
   Al microscopio's bench (a paper card: the eyepiece field with the stain under it
   after the answer, the slide's pH strip with the 4.5 mark, the discharge or the
   urine lab ticket). The strip is six flat colour pads, not a gradient (§7). */
.opt.iv-dz, .opt.iv-dz.ok, .opt.iv-dz.no { border-left: 8px solid var(--c); }
.opt.iv-dz { font-weight: 700; align-items: center; }
.iv-bench { display: grid; grid-template-columns: minmax(0, 230px) 1fr; gap: 18px; align-items: start; background: var(--paper); color: var(--card-ink);
  border: 3px solid var(--card-ink); border-radius: 14px; box-shadow: 6px 6px 0 var(--azul); padding: 16px; margin-bottom: 16px; }
.iv-bench.nofield { grid-template-columns: 1fr; }
@media (max-width: 560px) { .iv-bench { grid-template-columns: 1fr; justify-items: center; } .iv-bench .iv-lab { width: 100%; } }
.iv-scope { width: 100%; max-width: 230px; margin: 0; }
.iv-field { width: 100%; height: auto; display: block; }
.iv-cap { text-align: center; font-size: 13.5px; font-weight: 700; color: #5A5F78; margin-top: 4px; min-height: 1.3em; }
.iv-slide { font-family: var(--slab); font-size: 20px; line-height: 1.15; margin: 0 0 8px; }
.iv-lab dl { margin: 0; }
.iv-lab dt { font-weight: 700; font-size: 13.5px; color: #5A5F78; margin-top: 10px; }
.iv-lab dd { margin: 2px 0 0; font-size: 17px; }
.iv-ph { margin-top: 4px; max-width: 420px; }
.iv-bar { position: relative; height: 18px; display: flex; border: 2px solid var(--card-ink); border-radius: 999px; }
.iv-bar i { flex: 1; display: block; }
.iv-bar i:first-child { border-radius: 999px 0 0 999px; }
.iv-bar i:nth-child(6) { border-radius: 0 999px 999px 0; }
.iv-mk { position: absolute; top: -7px; bottom: -7px; width: 5px; margin-left: -2.5px; background: var(--card-ink); border-radius: 2px; }
.iv-cut { position: absolute; top: 100%; margin-top: 3px; transform: translateX(-50%); font-size: 12px; font-weight: 700; color: #5A5F78; }
.iv-val { font-family: var(--slab); font-size: 22px; margin-top: 18px; font-variant-numeric: tabular-nums; }
.iv-ticket { border: 2px dashed var(--card-ink); border-radius: 10px; padding: 4px 12px 10px; background: #fff; }
.iv-cmp th { border-bottom: 3px solid var(--card-ink); }
.iv-rec { font-weight: 700; }
/* Infecciones vaginales: the pH band above the comparison table (legacy home screen). */
.iv-phband { display: grid; grid-template-columns: repeat(3, 1fr); border: 3px solid var(--ink); border-radius: 10px; overflow: hidden; box-shadow: 4px 4px 0 var(--ink); margin: 6px 0 4px; }
.iv-phband > div { background: var(--c); color: #fff; padding: 8px 10px 9px; font-weight: 700; font-size: 14px; line-height: 1.25; }
.iv-phband small { display: block; font-weight: 400; font-size: 12.5px; opacity: .92; }
.iv-phnote { font-size: 13px; color: var(--muted); margin: 4px 0 10px; }
@media (max-width: 480px) { .iv-phband > div { font-size: 12.5px; padding: 7px 6px 8px; } .iv-phband small { font-size: 11.5px; } }

/* Crecimiento y desarrollo: Sellando la Cartilla (the legacy cartilla: the jade spine
   with the eight visits, the page with milestone chips coloured by area, the rubber
   stamp), ¿Normal o Neuro?'s fuse and two big buttons, and the milestones table's
   key milestones (★). The cartilla stays cream in both themes, with its ink inside. */
.cyd .cart { --ink: var(--card-ink); --text: var(--card-ink); --muted: #4A4F66; --surface: var(--paper); --good: #0F8B6C; --bad: #C62839;
  display: grid; grid-template-columns: 150px 1fr; background: var(--paper); color: var(--card-ink); border: 3px solid var(--card-ink);
  border-radius: 14px; box-shadow: 6px 6px 0 var(--card-ink); overflow: hidden; margin-bottom: 16px; }
.cyd .cart .spine { background: var(--jade); color: #fff; padding: 12px 10px; display: flex; flex-direction: column; gap: 6px; }
.cyd .cart .spine h4 { font-family: var(--slab); font-weight: 400; font-size: 15px; margin: 0 0 4px; line-height: 1.15; }
.cyd .vis { display: flex; justify-content: space-between; align-items: center; gap: 6px; border: 2px solid transparent; border-radius: 8px;
  padding: 5px 8px; font-weight: 700; font-size: 14px; background: color-mix(in srgb, #fff 14%, transparent); }
.cyd .vis.fut { font-weight: 400; opacity: .85; }
.cyd .vis.cur { background: #fff; color: #0B6E55; border-color: var(--card-ink); }
.cyd .vis .st { font-size: 12px; border: 2px solid currentColor; border-radius: 50%; width: 22px; height: 22px; display: grid; place-items: center; transform: rotate(-12deg); flex: 0 0 22px; }
.cyd .vis.ok .st { color: #fff; background: var(--rosa); border-color: #fff; }
.cyd .vis.obs .st { color: #fff; background: #8A4A1C; border-color: #fff; }
.cyd .cart .page { padding: 16px 18px 18px; position: relative; min-width: 0; }
.cyd .cart .page .meta { font-size: 14px; font-weight: 700; color: var(--muted); margin: 0; }
.cyd .cart .phead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; }
.cyd .cart .phead > div { flex: 0 1 auto; min-width: 0; }
.cyd .cart .page h2.age { font-size: 34px; margin: 2px 0 4px; }
.cyd .cart .page .sub { margin-bottom: 10px; }
.cyd .legend { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.cyd .legend span::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--c); margin-right: 5px; vertical-align: -1px; border: 1px solid var(--card-ink); }
.cyd .stamps { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.cyd .sp { --c: #999; --tx: #fff; position: relative; text-align: left; background: #fff; color: var(--card-ink); border: 2px dashed var(--c); border-left: 8px solid var(--c);
  border-radius: 8px; padding: 9px 30px 9px 36px; font: inherit; font-weight: 700; font-size: 15px; min-height: 52px; line-height: 1.25; cursor: pointer;
  transition: background-color .15s, opacity .15s, transform .1s; }
.cyd .sp:active:not([disabled]) { transform: translate(1px, 1px); }
.cyd .sp .n { position: absolute; left: 8px; top: 9px; font-size: 12px; width: 20px; height: 20px; border-radius: 50%; background: var(--card-ink); color: #fff; display: grid; place-items: center; }
.cyd .sp .ar { display: block; font-size: 12px; font-weight: 700; opacity: .75; }
.cyd .sp[aria-pressed="true"], .cyd .sp.hit { border-style: solid; background: var(--c); color: var(--tx); }
.cyd .sp.hit { box-shadow: inset 0 0 0 3px #fff; }
.cyd .sp.hit::after { content: "✓"; position: absolute; right: 8px; top: 6px; font-size: 18px; }
.cyd .sp.gap { padding-right: 44px; border-style: dashed; border-color: var(--bad); background: #fff; color: var(--card-ink); }
.cyd .sp.gap::after { content: "faltó"; position: absolute; right: 6px; top: 5px; font-size: 12px; color: var(--bad); }
.cyd .sp.extra { background: #F7D5DA; color: var(--card-ink); border-style: solid; border-color: var(--bad); text-decoration: line-through; }
.cyd .sp.dim { opacity: .45; }
.cyd .sp.key .ar::after { content: " · ★ hito clave"; }
.cyd .sp[disabled] { cursor: default; }
.cyd .rubber { flex: 0 0 auto; margin: 14px 6px 16px auto; font-family: var(--slab); font-size: 22px; color: var(--rosa); border: 4px double var(--rosa); border-radius: 10px;
  padding: 4px 12px; transform: rotate(-7deg); pointer-events: none; background: color-mix(in srgb, var(--paper) 75%, transparent); animation: cyd-thunk .35s cubic-bezier(.2, 1.6, .4, 1); }
.cyd .rubber.obs { color: #8A4A1C; border-color: #8A4A1C; }
@keyframes cyd-thunk { from { opacity: 0; transform: rotate(-7deg) scale(1.4); } }
.cyd .cart .explain { background: #fff; color: var(--card-ink); border-color: #D8CFB8; }
@media (max-width: 680px) {
  .cyd .cart { grid-template-columns: 1fr; }
  .cyd .cart .spine { flex-direction: row; overflow-x: auto; padding: 8px; }
  .cyd .cart .spine h4 { display: none; }
  .cyd .vis { flex: 0 0 auto; }
  .cyd .rubber { font-size: 17px; }
  .cyd .cart .page h2.age { font-size: 28px; }
  .cyd .stamps { grid-template-columns: 1fr; }
}
.cyd .timer.fuse { height: 10px; }
.cyd .case .dlg { font-size: 15px; color: var(--muted); margin-top: 8px; }
.cyd .cyd-neuro .opt { font-family: var(--slab); font-size: 19px; line-height: 1.15; align-items: center; justify-content: center; text-align: center; min-height: 72px; }
.cyd .cyd-neuro .opt .k { font-family: var(--sans); flex: 0 0 auto; width: 26px; height: 26px; }
.cyd .opts.cyd-neuro { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cyd .cyd-neuro .opt span:last-child { min-width: 0; overflow-wrap: anywhere; hyphens: auto; }
@media (max-width: 480px) { .cyd .cyd-neuro .opt { flex-direction: column; gap: 6px; font-size: 17px; padding: 10px 8px; } }
.cyd .cyd-table .star { color: var(--rosa); font-weight: 700; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cyd .cyd-table .star { color: var(--cemp); } }
:root[data-theme="dark"] .cyd .cyd-table .star { color: var(--cemp); }
@media (prefers-reduced-motion: reduce) { .cyd .rubber { animation: none; } .cyd .sp { transition: none; } }

/* Cardiopatías congénitas (legacy look): the sheet grid, the radiograph sign on the
   Lotería card (and beside a Guardia card), and El Árbol's defect card with its
   three-step path that fills in (ok / bad) as the steps are answered. */
.cc-grid { margin-bottom: 8px; }
.cc-grid .scard .st { font-weight: 700; font-size: 13.5px; }
.cc-ico { display: inline-grid; place-items: center; }
.cc-ico svg { width: 96px; height: 96px; display: block; }
.stage .lot.cc-lot .ico { display: grid; place-items: center; }
@media (max-width: 680px) { .cc-ico svg { width: 64px; height: 64px; } }
.cc-ico.sm { float: right; margin: 0 0 6px 12px; background: var(--paper); border: 2px solid var(--card-ink); border-radius: 8px; padding: 4px; }
.cc-ico.sm svg { width: 56px; height: 56px; }
.cc-withico::after { content: ''; display: block; clear: both; }
.cc-ask { font-size: 14px; font-weight: 700; color: var(--muted); margin: 0 0 4px; }
.cc-clue { font-family: var(--slab); font-weight: 400; font-size: 22px; line-height: 1.25; }
.cc-tree { border-left: 12px solid var(--jade); }
.cc-chip { display: inline-block; background: var(--jade); color: #fff; border: 2px solid var(--ink); border-radius: 999px; padding: 2px 10px; font-weight: 700; font-size: 13px; }
.game .cc-dname { font-size: clamp(22px, 4.6vw, 28px); margin: 8px 0 0; }
.cc-path { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
@media (max-width: 520px) { .cc-path { grid-template-columns: 1fr; } }
.cc-step { border: 2px solid var(--ink); border-radius: 10px; padding: 7px 9px; background: var(--surface); min-height: 60px; }
@media (max-width: 520px) { .cc-step { min-height: 0; } }
.cc-step small { display: block; font-weight: 700; color: var(--muted); font-size: 13px; }
.cc-step b { font-size: 16px; }
.cc-step.on { border-color: var(--cempa); box-shadow: 0 0 0 3px var(--cempa) inset; }
.cc-step.ok { border-color: var(--good); background: color-mix(in srgb, var(--good) 14%, var(--surface)); }
.cc-step.bad { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, var(--surface)); }
/* Sangrado del primer trimestre: the topic pills on the menu, the patient card's findings
   (Guardia por etapas) and the change-between-readings row (La Curva). */
.sg-topics { display: flex; flex-wrap: wrap; gap: 6px; margin: -8px 0 22px; }
.sg-topics span { --c: var(--rosa); border: 2px solid var(--c); color: var(--text); background: var(--surface); border-radius: 999px; padding: 3px 10px; font-size: 14px; font-weight: 700; }
.sg-topics i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: 6px; }
.sg-info { border-left: 5px solid var(--rosa); padding: 4px 0 4px 12px; margin-top: 10px; font-size: 17px; }
.sg-info.old { opacity: .8; }
.cv-changes .label { font-weight: 700; color: var(--muted); font-size: 14px; margin: 14px 0 2px; }
.sc-fb .cv-changes .label { color: #5A5470; }
/* Sangrado del 2.º y 3.er trimestre, Código Rojo: the three-step strip, the volume and the
   vital signs added to the patient card after step 1 (legacy .steps / .info / .vit). */
.cr23-steps { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }
.cr23-steps span { border: 2px solid var(--muted); border-radius: 999px; padding: 3px 11px; font-weight: 700; font-size: 14px; color: var(--muted); }
.cr23-steps span.on { border-color: #9B2C2C; background: #9B2C2C; color: #fff; }
.cr23-steps span.dn { border-color: var(--good); color: var(--good); }
.cr23-info { border-left: 5px solid #9B2C2C; padding: 4px 0 4px 12px; margin-top: 10px; font-size: 17px; }
.cr23-vit { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.cr23-vit span { background: #FFF7E4; color: #1A1A2E; border: 2px solid #1A1A2E; border-radius: 6px; padding: 1px 9px; font-size: 16px; }
.cr23-vtx { font-size: 16px; margin: 6px 0 0; }

/* A small dialog over the page (game-kit ask(): the simulacro guard, «¿Calificarlo ya?»). */
.dlg { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgba(26, 26, 46, .62); }
.dlg-card { max-width: 440px; width: 100%; background: var(--paper); color: #1A1A2E; border: 3px solid #1A1A2E; border-radius: 16px; box-shadow: 6px 6px 0 var(--cempa, #F6A21E); padding: 20px 18px 18px;
  --ink: #1A1A2E; --text: #1A1A2E; --muted: #5A5470; --surface: var(--paper); }
.dlg-t { font-family: var(--slab); font-weight: 400; font-size: 24px; margin: 0 0 8px; }
.dlg-p { margin: 0; font-size: 17px; line-height: 1.45; }
.dlg-p + .dlg-p { margin-top: 10px; }
.dlg-card .row { margin-top: 16px; }
.dlg-card .btn { flex: 1 1 160px; }

/* ITS y úlceras genitales (legacy look): the GPC card's leaves (where each branch of the
   tree ends, in the disease's colour), the «Ojo con el tratamiento» note on a ficha, and
   Arma la receta's pad (control prenatal's pad, with the disease's colour on Rp/ and a
   fixed drug line when the recipe names it). The duel reuses the kit's two doors. */
.its-leaves { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.its-leaves li { border-left: 6px solid var(--c); background: color-mix(in srgb, var(--c) 12%, var(--paper)); color: var(--card-ink); border-radius: 4px; padding: 4px 10px; }
.its-note { border: 2px dashed var(--c); border-radius: 8px; padding: 10px 14px; margin: 16px 0 0; }
.its-note b { font-family: var(--slab); font-weight: 400; }
.its-note p { margin: 4px 0 0; }
.its-pad .cp-rxk { color: var(--c); font-size: 30px; }
.cp-lines li.fixed .fv { font-weight: 700; }

/* Apgar y Silverman (.ays): the acordeón's covered cells, mnemonic and bands; the cases' grading
   grid; the mnemonic slots. */
.ays .tabhead { justify-content: space-between; align-items: center; margin: 14px 0 8px; }
.ays .ays-table table { min-width: 620px; }
.ays .ays-table td .mn { display: inline-block; min-width: 34px; font-family: var(--slab); font-weight: 400; color: var(--c); }
.ays .ays-table tr.subrow td { font-size: 14px; }
.ays .ays-table .subl { font-weight: 400; color: var(--muted); font-size: 13.5px; white-space: normal; }
.ays .cov { font: inherit; text-align: left; width: 100%; min-height: 44px; background: var(--paper); color: var(--card-ink); border: 2px dashed var(--gline); border-radius: 8px; padding: 6px 8px; cursor: pointer; }
.ays .cov .a { display: none; }
.ays .cov[aria-expanded="true"] { border-style: solid; border-color: var(--jade); }
.ays .cov[aria-expanded="true"] .q { display: none; }
.ays .cov[aria-expanded="true"] .a { display: inline; }
.ays .cov .q { font-family: var(--slab); color: var(--jade); }
.ays .mnemo { border: 2px solid var(--gline); border-radius: 12px; padding: 12px 14px; margin: 16px 0 0; }
.ays .syl { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.ays .syl span { font-family: var(--slab); font-size: 24px; background: var(--c); color: #fff; border: 2px solid var(--ink); border-radius: 8px; padding: 2px 10px; box-shadow: 3px 3px 0 var(--ink); }
.ays .mnemo ul { margin: 0; padding-left: 20px; }
.ays .scale { margin: 16px 0 0; }
.ays .bands { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; margin: 8px 0 4px; }
.ays .band { background: var(--c); color: var(--card-ink); border: 2px solid var(--ink); border-radius: 8px; padding: 8px 6px; text-align: center; font-weight: 700; font-size: 14px; display: flex; flex-direction: column; gap: 2px; }
.ays .band .r { font-family: var(--slab); font-weight: 400; font-size: 20px; font-variant-numeric: tabular-nums; }
.ays .qtag { display: inline-block; background: var(--cempa); color: var(--card-ink); border-radius: 6px; padding: 1px 8px; font-weight: 700; }
.ays .grid { display: grid; gap: 8px; margin: 0 0 14px; }
.ays .grow { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--surface); border: 2px solid var(--gline); border-radius: 10px; padding: 8px 10px; }
.ays .grow .nm { font-weight: 700; }
.ays .pts { display: flex; gap: 6px; flex: 0 0 auto; }
.ays .pt { font: inherit; font-family: var(--slab); font-size: 20px; width: 48px; height: 48px; border: 2px solid var(--ink); border-radius: 10px; background: var(--paper); color: var(--card-ink); cursor: pointer; font-variant-numeric: tabular-nums; }
.ays .pt[aria-pressed="true"] { background: var(--ink); color: var(--bg); box-shadow: 3px 3px 0 var(--cempa); }
.ays .pt.ok { background: var(--good); color: #fff; border-color: var(--good); }
.ays .pt.no { background: var(--bad); color: #fff; border-color: var(--bad); text-decoration: line-through; }
.ays .pt.dim { opacity: .45; }
.ays .pt:disabled { cursor: default; }
.ays .msl { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 0 0 14px; }
.ays .ms { border: 2px dashed var(--gline); border-radius: 10px; padding: 8px 4px; min-height: 76px; text-align: center; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.ays .ms.nx { border-color: var(--cempa); border-style: solid; }
.ays .ms.fill { border: 2px solid var(--jade); background: var(--surface); }
.ays .ms .sy { font-family: var(--slab); font-size: 22px; }
.ays .ms .fl { font-size: 13px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.ays .clock { font-variant-numeric: tabular-nums; }
@media (max-width: 480px) {
  .ays .grow { flex-direction: column; align-items: stretch; }
  .ays .pts { justify-content: space-between; }
  .ays .pt { flex: 1; }
  .ays .bands { grid-auto-flow: row; grid-auto-columns: auto; }
}
/* Escala de Glasgow (legacy escala-de-glasgow.html): the E-V-M readout with its total, the
   number rows and the severity row of Casos, the scale tables with «Ocultar descripciones»,
   the severity bar, and Relámpago's big-number options. */
.gcs { --g-leve: #0F8B6C; --g-mod: #C98A00; --g-grave: #C62839; }
:root[data-theme="dark"] .gcs { --g-leve: #35C49B; --g-mod: #E8B33A; --g-grave: #FF6B7A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gcs { --g-leve: #35C49B; --g-mod: #E8B33A; --g-grave: #FF6B7A; } }
.gcs-check { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 15px; margin: 0 0 14px; min-height: 44px; }
.gcs-check input { width: 20px; height: 20px; accent-color: var(--azul); }
.gcs-comp { font-family: var(--slab); font-weight: 400; font-size: 22px; margin: 16px 0 6px; }
.gcs-comp small { font-family: var(--sans); font-size: 14px; color: var(--muted); }
.gcs-table { width: 100%; border-collapse: collapse; }
.gcs-table td { padding: 8px 6px; border-top: 1px solid var(--gline); vertical-align: top; }
.gcs-table td.pt { width: 44px; font-family: var(--slab); font-size: 24px; color: var(--azul); line-height: 1; }
.gcs-desc.cov { font: inherit; text-align: left; border: 0; border-radius: 6px; background: var(--gline); color: transparent; padding: 2px 8px; min-height: 32px; cursor: pointer; position: relative; }
.gcs-desc.cov .q { position: absolute; left: 8px; color: var(--muted); }
.gcs-desc.cov[aria-expanded="true"] { background: transparent; color: inherit; padding-left: 0; }
.gcs-desc.cov[aria-expanded="true"] .q { display: none; }
.gcs-sevbar { display: grid; grid-template-columns: 8fr 4fr 3fr; border-radius: 10px; overflow: hidden; margin: 12px 0 6px; font-weight: 700; color: #fff; text-align: center; }
.gcs-sevbar > div { padding: 10px 4px; }
.gcs-sevbar small { display: block; font-weight: 400; }
.gcs-sevbar .s-grave, .gcs-sev.s-grave { --c: var(--g-grave); } .gcs-sevbar .s-mod, .gcs-sev.s-mod { --c: var(--g-mod); } .gcs-sevbar .s-leve, .gcs-sev.s-leve { --c: var(--g-leve); }
.gcs-sevbar > div { background: var(--c); }
.gcs-readout { display: flex; align-items: stretch; gap: 6px; margin: 12px 0 10px; }
.gcs-slot { flex: 1; border: 2px solid var(--gline); border-radius: 12px; padding: 6px 4px; text-align: center; background: var(--surface); min-width: 0; }
.gcs-slot .l { display: block; font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gcs-slot .n { display: block; font-family: var(--slab); font-size: 30px; line-height: 1.1; }
.gcs-slot.filled { border-color: var(--azul); }
.gcs-slot.right { border-color: var(--good); }
.gcs-slot.wrong { border-color: var(--bad); }
.gcs-slot.total { flex: 1.3; background: var(--ink); color: var(--bg); border-color: var(--ink); }
.gcs-slot.total .l { color: var(--bg); opacity: .75; }
.gcs-readout .eq { align-self: center; font-family: var(--slab); font-size: 26px; color: var(--muted); }
@media (prefers-reduced-motion: no-preference) { .gcs-slot .n.pop { animation: gcs-pop .35s ease-out; } }
@keyframes gcs-pop { from { transform: scale(.6); } to { transform: scale(1); } }
.gcs-row { margin: 10px 0; }
.gcs-rt { font-weight: 700; margin-bottom: 6px; }
.gcs-rt small { font-weight: 400; color: var(--muted); }
.gcs-nums, .gcs-sevs { display: flex; gap: 6px; }
.gcs-num { flex: 1 1 0; min-width: 0; min-height: 56px; font-family: var(--slab); font-size: 28px; border: 2px solid var(--gline); border-radius: 10px; background: var(--surface); color: var(--text); cursor: pointer; }
.gcs-num[aria-pressed="true"] { border-color: var(--azul); box-shadow: inset 0 0 0 2px var(--azul); }
.gcs-num.ok { border-color: var(--good); box-shadow: inset 0 0 0 2px var(--good); }
.gcs-num.no { border-color: var(--bad); text-decoration: line-through; }
.gcs-num.dim { opacity: .45; }
.gcs-sev { flex: 1 1 0; min-height: 48px; font: inherit; font-weight: 700; border: 2px solid var(--c); border-radius: 10px; background: var(--surface); color: var(--text); cursor: pointer; }
.gcs-sev[aria-pressed="true"] { background: var(--c); color: #fff; }
.gcs-break ul { margin: 4px 0 8px; padding-left: 18px; }
.gcs-main { font-family: var(--slab); font-size: 28px; line-height: 1.15; margin: 4px 0 0; }
.opts.gcs-big { grid-template-columns: 1fr 1fr; }
.opts.gcs-big .opt { justify-content: center; font-family: var(--slab); font-size: 28px; min-height: 72px; }
.opts.gcs-three { grid-template-columns: repeat(3, 1fr); }
.gcs-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; text-align: center; }
.gcs-stats b { display: block; font-family: var(--slab); font-weight: 400; font-size: 26px; }
.gcs-stats span { font-size: 13px; color: var(--muted); }

/* Cirrosis hepática: the Hoja de Child-Pugh (points fill in as the engine reveals
   them) and the Arma el Cuadro board. */
.cph table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.cph td { border-bottom: 1px dashed #C9BFA6; padding: 7px 10px; vertical-align: middle; }
.cph td.pt { width: 64px; text-align: center; font-family: var(--slab); font-size: 18px; }
.cph tr.cur td { background: #FFE08A; }
.cph tr.cur td:first-child { box-shadow: inset 6px 0 0 var(--rosa); }
.cph tr.tot td { border-bottom: 0; font-weight: 700; background: #F4E7C5; }
.cph .q { color: #8A8067; }
.cph .p1 { color: #0F8B6C; } .cph .p2 { color: #B26A00; } .cph .p3 { color: #C62839; }
.cph .yours { font-size: 12px; color: #C62839; font-family: inherit; display: block; line-height: 1; }
.clsbadge { display: inline-block; color: #fff; border-radius: 999px; padding: 0 10px; font-family: var(--slab); font-size: 15px; }
.cbuild td.cur { background: #FFE08A; color: #1A1A2E; font-weight: 700; }
.cbuild td.okc { background: rgba(15, 139, 108, 0.16); }
.cbuild td.noc { background: rgba(198, 40, 57, 0.16); }
.cbuild td.blank { color: var(--muted); text-align: center; }

/* Glaucoma (legacy glaucoma.html): the tonometer of Crisis de PIO, drawn from the engine's
   meter (state.meter), and the two bins of ¿Abierto o cerrado?. */
.gla-gauge { --zc: var(--jade); background: var(--paper); color: var(--card-ink); border: 3px solid var(--card-ink); border-radius: 14px; box-shadow: 6px 6px 0 var(--zc); padding: 12px 16px 28px; margin-bottom: 16px; transition: box-shadow .3s; }
.gla-gauge.z-hto { --zc: var(--cempa); } .gla-gauge.z-alta { --zc: var(--panda); } .gla-gauge.z-max { --zc: var(--bad); }
.gla-read { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.gla-num { font-family: var(--slab); font-size: clamp(46px, 12vw, 64px); line-height: 1; color: var(--zc); -webkit-text-stroke: 1.5px var(--card-ink); font-variant-numeric: tabular-nums; }
.gla-unit { font-weight: 700; }
.gla-zone { margin-left: auto; font-family: var(--slab); font-size: 18px; background: var(--zc); color: #fff; border: 2px solid var(--card-ink); border-radius: 999px; padding: 2px 12px; }
.gla-gauge.z-hto .gla-zone { color: var(--card-ink); }
.gla-bar { position: relative; height: 18px; margin-top: 10px; background: #D9D6CC; border: 2px solid var(--card-ink); border-radius: 999px; }
.gla-bar i { position: absolute; top: 0; bottom: 0; }
.gla-bar .zn { background: var(--jade); } .gla-bar .zh { background: var(--cempa); } .gla-bar .za { background: var(--panda); }
.gla-bar .zm { background: var(--bad); border-radius: 0 999px 999px 0; }
.gla-needle { position: absolute; top: -9px; width: 6px; height: 32px; margin-left: -3px; background: var(--card-ink); border-radius: 3px; transition: left .45s cubic-bezier(.3, 1.6, .5, 1); }
.gla-ticks { position: relative; height: 0; font-size: 13px; font-weight: 700; }
.gla-ticks span { position: absolute; top: 4px; transform: translateX(-50%); }
.gla-gauge.rise .gla-num { animation: gla-jolt .45s ease-out; }
@keyframes gla-jolt { 0% { transform: none } 25% { transform: translateY(-6px) scale(1.12) } 55% { transform: translateX(-3px) } 80% { transform: translateX(3px) } 100% { transform: none } }
.gla-card { background: var(--paper); color: var(--card-ink); border: 7px solid var(--cempa); border-radius: 12px; box-shadow: 0 0 0 3px var(--card-ink), 6px 6px 0 3px var(--card-ink); padding: 18px 18px 22px; text-align: center; margin: 6px 0 20px; }
.gla-card .lab { font-size: 14px; font-weight: 700; color: #555B75; }
.gla-card p { font-family: var(--slab); font-size: clamp(22px, 6vw, 30px); line-height: 1.15; margin: 8px 0 0; }
.gla-card.good { border-color: var(--good); } .gla-card.bad { border-color: var(--bad); }
.gla-bins { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gla-bin { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 64px; border: 3px solid var(--card-ink); border-radius: 12px; font: 700 17px var(--sans); box-shadow: 4px 4px 0 var(--card-ink); background: var(--c, #16275C); color: var(--ct, #fff); padding: 10px; cursor: pointer; }
.gla-bin .k { background: #fff; color: var(--card-ink); border-radius: 6px; padding: 0 7px; }
.gla-bin:active:not([disabled]) { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--card-ink); }
.gla-bin[disabled] { opacity: .45; cursor: default; }
.gla-bin.right { opacity: 1; outline: 4px solid var(--cempa); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .gla-needle, .gla-gauge { transition: none; } .gla-gauge.rise .gla-num { animation: none; } }

/* Reanimación neonatal (.rn; legacy look): Aprender's flowchart (decision boxes round and amber,
   action boxes red, routine boxes green, side branches dashed) beside the open box; Armar's
   «Tu algoritmo» chain; Simular's neonatal monitor (time of life, FC, SpO2, respiration and tone)
   and the case chooser. */
.rn .rn-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 18px; align-items: start; }
.rn .rn-grid.play { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
@media (max-width: 760px) { .rn .rn-grid, .rn .rn-grid.play { grid-template-columns: minmax(0, 1fr); } }
.rn .rn-panel { border: 2px solid var(--gline); border-radius: 12px; padding: 14px; background: var(--surface); }
.rn .rn-detail .ficha { margin-top: 0; }
@media (min-width: 761px) { .rn .rn-detail { position: sticky; top: 12px; } }
.rn .rn-flow, .rn .rn-col { display: flex; flex-direction: column; align-items: center; width: 100%; }
.rn .rn-arrow { width: 2px; height: 14px; background: var(--gline); position: relative; margin-bottom: 4px; }
.rn .rn-arrow::after { content: ''; position: absolute; bottom: -4px; left: -4px; border: 5px solid transparent; border-top-color: var(--muted); }
.rn .rn-node { font: inherit; width: 100%; max-width: 360px; border: 2px solid var(--gline); background: var(--surface); color: var(--text); padding: 9px 12px; border-radius: 8px; text-align: center; font-size: 15px; cursor: pointer; }
.rn .rn-node b { display: block; }
.rn .rn-node.dec { border-color: #C98A12; background: color-mix(in srgb, #C98A12 12%, var(--surface)); border-radius: 28px; }
.rn .rn-node.act { border-color: #B8322A; background: color-mix(in srgb, #B8322A 10%, var(--surface)); }
.rn .rn-node.ok { border-color: #2E7D4F; background: color-mix(in srgb, #2E7D4F 12%, var(--surface)); }
.rn .rn-node.tbl { border-color: #1C7FA6; background: color-mix(in srgb, #1C7FA6 10%, var(--surface)); }
.rn .rn-node.side { border-style: dashed; font-size: 14px; max-width: 300px; }
.rn .rn-node.sel { box-shadow: 0 0 0 3px var(--ink); }
.rn .rn-side { display: flex; align-items: center; gap: 6px; width: 100%; max-width: 360px; margin-top: 6px; justify-content: center; }
.rn .rn-yn { font-weight: 800; font-size: 13px; color: var(--muted); white-space: nowrap; }
.rn .rn-time { font-weight: 700; color: #1C7FA6; font-size: 14px; margin: 0 0 2px; text-transform: uppercase; letter-spacing: .4px; }
.rn .rn-branch { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.rn .rn-branch span { border-radius: 999px; padding: 3px 11px; font-size: 14px; font-weight: 700; border: 2px solid; }
.rn .rn-branch .rn-y { border-color: #2E7D4F; color: #2E7D4F; }
.rn .rn-branch .rn-n { border-color: #B8322A; color: #B8322A; }
.rn .rn-sat td:last-child { font-family: var(--slab); font-size: 19px; text-align: right; }
.rn .rn-bar { height: 8px; border-radius: 99px; background: var(--gline); overflow: hidden; margin: 0 0 12px; }
.rn .rn-bar i { display: block; height: 100%; background: var(--c, #C98A12); }
.rn .rn-q { font-size: 19px; font-weight: 700; }
.rn .rn-ch { font-weight: 800; margin: 0 0 8px; }
.rn .rn-chain { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.rn .rn-chain .rn-node { max-width: none; text-align: left; font-size: 14px; cursor: default; }
.rn .rn-chain .rn-node.miss { border-style: dashed; }
.rn .rn-mon { background: #0F2A2F; color: #E6F2EF; border: 3px solid var(--ink); border-radius: 14px; box-shadow: 5px 5px 0 var(--ink); padding: 14px 16px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
@media (max-width: 560px) { .rn .rn-mon { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rn .rn-mon .rn-vit span { display: block; font-size: 12px; color: #8FB3AC; font-weight: 700; }
.rn .rn-mon .rn-vit strong { font-family: var(--slab); font-weight: 400; font-size: 30px; line-height: 1.1; }
.rn .rn-mon .rn-vit.hr strong { color: #6EE7A0; }
.rn .rn-mon .rn-vit.hr.low strong { color: #FF7A6B; }
.rn .rn-mon .rn-vit.sp strong { color: #7FD3F0; }
.rn .rn-mon .rn-vit.clock strong { color: #FFD27A; }
.rn .rn-mon .rn-vit small { font-size: 13px; color: #B7CFCA; display: block; margin-top: 2px; }
.rn .rn-story { font-size: 18px; }
.rn .rn-cases { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.rn .rn-case { font: inherit; text-align: left; display: flex; gap: 10px; align-items: center; border: 2px solid var(--c, var(--gline)); background: var(--surface); color: var(--text); border-radius: 12px; padding: 14px; cursor: pointer; min-height: 56px; }
.rn .rn-case b { font-family: var(--slab); font-weight: 400; font-size: 19px; }
.rn .rn-case.all { border-style: dashed; }
.rn .rn-case .k { flex: none; }

/* VIH en adultos (legacy vih-en-adultos.html): the CD4 ladder on the home, the viral-load
   meter of Supresión viral (engine meter, state.meter: 1 = indetectable … 6 logs), the
   Termómetro CD4 tube and the stage track of Ruta del paciente. */
.va-ladder { display: grid; gap: 4px; margin: 0 0 16px; }
.va-rung { display: flex; gap: 10px; align-items: center; background: var(--paper); color: var(--card-ink); border: 2px solid var(--card-ink); border-radius: 10px; padding: 6px 12px; margin-left: calc(var(--k) * 10px); box-shadow: 3px 3px 0 var(--card-ink); font-size: 14px; }
.va-rung b { font-family: var(--slab); min-width: 74px; color: var(--panda); }
.va-vl { background: var(--paper); color: var(--card-ink); border: 3px solid var(--card-ink); border-radius: 14px; box-shadow: 6px 6px 0 #2667C9; padding: 12px 16px; margin-bottom: 16px; }
.va-vl-bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; align-items: end; height: 46px; }
.va-vl-bars i { display: block; background: #D9D6CC; border: 2px solid var(--card-ink); border-radius: 6px; height: 30%; }
.va-vl-bars i:nth-child(2) { height: 44%; } .va-vl-bars i:nth-child(3) { height: 58%; } .va-vl-bars i:nth-child(4) { height: 72%; } .va-vl-bars i:nth-child(5) { height: 86%; } .va-vl-bars i:nth-child(6) { height: 100%; }
.va-vl-bars i.on { background: var(--panda); }
.va-vl-read { margin-top: 8px; font-family: var(--slab); font-size: 20px; }
.va-vl.rise .va-vl-read { animation: gla-jolt .45s ease-out; }
.va-patient { display: flex; gap: 14px; align-items: flex-start; }
.va-thermo { display: flex; gap: 10px; align-items: flex-end; flex: none; }
.va-tube { position: relative; width: 22px; height: 110px; background: #fff; border: 3px solid var(--card-ink); border-radius: 12px 12px 14px 14px; overflow: hidden; }
.va-tube i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--panda); }
.va-num { font-family: var(--slab); font-size: 34px; line-height: 1; }
.va-zone { display: inline-block; margin-top: 4px; background: var(--panda); color: #fff; border: 2px solid var(--card-ink); border-radius: 999px; padding: 0 10px; font-weight: 700; }
.va-stages { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.va-stage { border: 2px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 700; opacity: .55; }
.va-stage.past { opacity: .8; }
.va-stage.on { opacity: 1; background: #7B3FB0; color: #fff; }
@media (prefers-reduced-motion: reduce) { .va-vl.rise .va-vl-read { animation: none; } }

/* EPOC (legacy epoc.html): the reloj switch on the home, El Clasificador's step track and
   ABCD grid, Turno de Urgencias' course log, La Escalera's rising rungs and La Lotería's card. */
.ep-reloj { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.ep .timer.fuse { height: 10px; }
.ep-steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.ep-step { border: 2px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 700; opacity: .55; }
.ep-step.past { opacity: .8; }
.ep-step.on { opacity: 1; background: #2667C9; border-color: #2667C9; color: #fff; }
.ep-grid .opt > .k { display: none; }
.ep-grid .opt { justify-content: center; font-family: var(--slab); font-size: 26px; min-height: 64px; }
.ep-log { margin: 0 0 12px; padding: 10px 14px 10px 34px; background: var(--surface); border: 2px dashed var(--line); border-radius: 12px; font-size: 15px; }
.ep-log li { margin: 2px 0; }
.ep-log li.ok::marker { color: var(--jade); }
.ep-log li.no::marker { color: var(--bad); }
.ep-ladder .slot { margin-left: calc(var(--k) * 8px); }
.ep-card { position: relative; text-align: center; background: var(--paper); color: var(--card-ink); border: 3px solid var(--card-ink); border-radius: 14px; box-shadow: 6px 6px 0 var(--c, #F6A21E); padding: 14px 16px 16px; margin: 0 auto 16px; max-width: 420px; }
.ep-card-n { position: absolute; top: 6px; left: 10px; font-family: var(--slab); font-size: 15px; }
.ep-card-ico { font-size: 44px; line-height: 1.1; }
.ep-card-t { font-family: var(--slab); font-size: 24px; margin: 4px 0 6px; }
.ep-card-h { margin: 0; font-size: 19px; font-weight: 700; }
@media (max-width: 420px) { .ep-ladder .slot { margin-left: calc(var(--k) * 4px); } .ep-card-t { font-size: 21px; } }
/* Asma: clock toggle, patient chart, ladder, cart labels, lotería card */
.seg-b.as-two { grid-template-columns: repeat(2, 1fr); }
.as-who { margin: 0 0 8px; }
.as-who span { color: var(--muted); font-size: 14px; }
.as-data { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 4px 12px; margin: 0; font-size: 15px; }
.as-data dt { font-weight: 700; }
.as-data dd { margin: 0; overflow-wrap: anywhere; }
.as-data .as-hit { background: var(--cempa); color: var(--card-ink); border-radius: 4px; padding: 0 4px; }
.as-ladder { display: grid; gap: 4px; margin: 0 0 14px; }
.as-rung { display: flex; gap: 10px; align-items: center; background: var(--paper); color: var(--card-ink); border: 2px solid var(--card-ink); border-radius: 10px; padding: 5px 12px; box-shadow: 3px 3px 0 var(--card-ink); font-size: 14px; opacity: .7; }
.as-rung:nth-child(1) { margin-left: 0; } .as-rung:nth-child(2) { margin-left: 10px; } .as-rung:nth-child(3) { margin-left: 20px; } .as-rung:nth-child(4) { margin-left: 30px; } .as-rung:nth-child(5) { margin-left: 40px; }
.as-rung b { font-family: var(--slab); font-weight: 400; min-width: 64px; color: #C27A00; }
.as-rung.past { opacity: .85; }
.as-rung.on { opacity: 1; background: #F6A21E; outline: 3px solid var(--card-ink); }
.as-rung.on b { color: var(--card-ink); }
.as-lab { font-weight: 800; margin: 12px 0 6px; }
.as-card { display: flex; gap: 14px; align-items: center; }
.as-card-ico { font-size: 44px; line-height: 1; flex: 0 0 auto; }
.as-card-t { font-family: var(--slab); font-size: 20px; margin: 0 0 4px; }
.as-card .clue { font-size: 21px; font-weight: 800; margin: 0; }
@media (max-width: 420px) { .as-data { grid-template-columns: 1fr; gap: 0 0; } .as-data dd { margin-bottom: 6px; } .as-rung:nth-child(n) { margin-left: 0; } }

/* Tamiz neonatal: the Relámpago tile with its «Sin reloj» button, the Laboratorio's result slip
   and cutoff ruler (after the answer), and the intern's note (El Interno del Cunero). */
.tn .mwrap { display: flex; flex-direction: column; gap: 6px; }
.tn .mwrap .mode { flex: 1; }
.tn .srbtn { align-self: stretch; }
.tn-slip .lr .ln { font-size: 15px; }
.tn-ruler { overflow: hidden; margin: 10px 0 14px; padding: 26px 12px 8px; background: var(--surface); border: 2px solid var(--line); border-radius: 12px; }
.tn-bar { position: relative; height: 10px; border-radius: 999px; background: linear-gradient(90deg, var(--jade), #F6A21E, var(--bad)); }
.tn-cut { position: absolute; top: -6px; width: 2px; height: 22px; background: var(--ink); transform: translateX(-1px); }
.tn-cutl { position: absolute; top: -24px; transform: translateX(-50%); font-size: 12px; font-weight: 700; white-space: nowrap; }
.tn-mk { position: absolute; top: 10px; transform: translateX(-50%); font-size: 14px; color: var(--ink); line-height: 1; text-align: center; }
.tn-mk em { display: block; font-style: normal; font-family: var(--slab); font-size: 15px; }
.tn-ends { display: flex; justify-content: space-between; margin-top: 26px; font-size: 12px; color: var(--muted); }
.tn-note .opt { background: var(--paper); color: var(--card-ink); border-style: dashed; font-family: var(--sans); }
@media (max-width: 420px) { .tn-cutl { font-size: 11px; } }
/* Otitis: Receta o Espera's sheet and El Otoscopio's lens (legacy .rx, .scopewrap) */
.ot-rx { background: var(--paper); color: var(--card-ink); border: 3px solid var(--card-ink); border-top: 10px solid #2B59C3; border-radius: 14px; box-shadow: 6px 6px 0 var(--ink); padding: 14px 16px 10px; margin: 0 0 14px; }
.ot-rxh { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .4px; }
.ot-rxn { font-family: var(--slab); font-size: 26px; color: #2B59C3; text-transform: none; line-height: 1; }
.ot-rxf { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; margin: 10px 0 4px; }
.ot-rxf div { border-bottom: 2px dashed #CDBFA5; padding: 3px 0 5px; min-width: 0; }
.ot-rxf dt { font-size: 12.5px; color: #585C72; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }
.ot-rxf dd { margin: 0; font-size: 16.5px; overflow-wrap: anywhere; }
.ot-rxf .ot-si { color: #C62839; font-weight: 800; }
.ot-trail { margin: 10px 0 2px; padding-left: 22px; font-size: 15px; color: #40455E; }
.ot-trail li { margin: 2px 0; }
.ot-evt { background: var(--surface); border: 2px solid var(--ink); border-left: 8px solid var(--cempa); border-radius: 10px; padding: 10px 14px; font-weight: 700; margin: 0 0 12px; }
.ot-two .opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ot-scopewrap { display: grid; grid-template-columns: 230px 1fr; gap: 18px; align-items: center; margin: 0 0 14px; }
.ot-lens { width: 230px; max-width: 100%; margin: 0 auto; border-radius: 50%; background: #1A1A2E; padding: 8px; box-shadow: 0 0 0 4px var(--cempa), 6px 6px 0 4px var(--ink); }
.ot-scope { display: block; width: 100%; height: auto; }
.ot-scopetxt { background: var(--surface); border: 2px solid var(--ink); border-radius: 12px; padding: 12px 16px; box-shadow: 5px 5px 0 var(--ink); }
.ot-ctx { margin: 0 0 8px; font-size: 17.5px; }
.ot-see { margin: 0; padding: 8px 10px; background: var(--paper); color: var(--card-ink); border-left: 6px solid #C8502A; border-radius: 8px; }
@media (max-width: 640px) { .ot-scopewrap { grid-template-columns: 1fr; } .ot-rxf { grid-template-columns: 1fr; } .ot-lens { width: 200px; } }
/* Ictericia neonatal: El Bilirrubinómetro's cunero slip and consensus ruler, El Kramerómetro's baby (legacy look). */
.bslip { --c: #2B59C3; background: var(--paper); color: var(--card-ink); border: 3px solid var(--card-ink); border-top: 10px solid var(--c); border-radius: 14px; box-shadow: 4px 4px 0 var(--ink); padding: 12px 16px 10px; margin: 12px 0 14px; }
.bslip .sh { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .4px; }
.bslip .dz { text-transform: none; letter-spacing: 0; color: var(--c); background: #fff; border: 2px solid var(--card-ink); border-radius: 99px; padding: 0 10px; }
.bslip .ctx { margin: 8px 0 6px; font-size: 17px; }
.bslip .res { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; border-top: 2px dashed #B9AE98; padding-top: 8px; }
.bslip .rt { font-weight: 700; }
.bslip .rv { font-family: var(--slab); font-size: clamp(30px, 8vw, 40px); line-height: 1; font-variant-numeric: tabular-nums; }
.bslip .rv small { font-family: var(--sans); font-size: 16px; font-weight: 700; }
.bili-cons .ruler { margin: 14px 0 4px; padding: 34px 6px 0; }
.bili-cons .bar { position: relative; height: 16px; border-radius: 99px; border: 2px solid var(--card-ink); background: linear-gradient(90deg, #0F8B6C, #F6A21E, #C62839); }
.bili-cons .cut { position: absolute; top: -8px; bottom: -8px; width: 3px; margin-left: -1.5px; background: var(--card-ink); }
.bili-cons .mk { position: absolute; top: -34px; transform: translateX(-50%); display: flex; flex-direction: column-reverse; align-items: center; font-size: 16px; line-height: 1; }
.bili-cons .mk em { display: block; font-style: normal; font-family: var(--slab); font-size: 13px; font-weight: 400; }
.bili-cons .ends { display: flex; justify-content: space-between; font-size: 12px; opacity: .8; margin-top: 8px; }
.bili-cons .cgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 4px; }
@media (min-width: 640px) { .bili-cons .cgrid { grid-template-columns: repeat(4, 1fr); } }
.bili-cons .cc { border: 2px solid #B9AE98; border-radius: 10px; padding: 6px 8px; font-size: 14px; line-height: 1.25; }
.bili-cons .cc b { display: block; font-family: var(--slab); font-weight: 400; font-size: 17px; }
.bili-cons .cc.on { border-color: var(--card-ink); background: #F6A21E; color: #1A1A2E; box-shadow: 3px 3px 0 var(--card-ink); }
.kgrid { display: grid; grid-template-columns: 1fr; gap: 14px; align-items: start; }
@media (min-width: 640px) { .kgrid { grid-template-columns: minmax(180px, 250px) 1fr; } }
.kfig { background: var(--paper); border: 3px solid var(--card-ink); border-radius: 14px; box-shadow: 4px 4px 0 var(--ink); padding: 10px; max-width: 230px; width: 100%; margin: 0 auto; box-sizing: border-box; }
.baby { width: 100%; height: auto; display: block; }
.baby .kz { fill: #F6D5BD; stroke: #1A1A2E; stroke-width: 2; transition: fill .15s; }
.baby .kz.yel { fill: #F4C430; }
.baby .kz.good { fill: #7FD6B6; stroke: #0F8B6C; stroke-width: 3.5; }
.baby .kz.bad { fill: #F7A5AE; stroke: #C62839; stroke-width: 3.5; }
.baby .kz.tap { cursor: pointer; }
.baby .kz.tap:hover, .baby .kz.tap:focus { fill: #FBE08A; outline: none; }
.baby .kz.tap:focus-visible { stroke: #F6A21E; stroke-width: 4; }
.baby .kn circle { fill: #1A1A2E; }
.baby .kn text { fill: #FFF7E4; font: 700 12px var(--sans); }
.baby .kn, .baby .navel, .baby .kline { pointer-events: none; }
.baby .navel { fill: #1A1A2E; }
.baby .kline { stroke: #1A1A2E; stroke-width: 1.5; stroke-dasharray: 4 3; opacity: .55; }
/* Infecciones STORCH: the STORCH letters, Sin reloj buttons, Cara a Cara (duel picker, pace, VS header), transmission chips */
.st-letters { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; }
.st-letters span { font-family: var(--slab); font-size: 26px; width: 44px; height: 44px; display: grid; place-items: center; color: #fff; background: var(--c); border: 3px solid var(--line); border-radius: 8px; box-shadow: 3px 3px 0 var(--line); }
.mwrap { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.srbtn { width: 100%; min-height: 48px; }
.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin: 6px 0 10px; }
.preset { background: var(--paper); color: var(--line); border: 3px solid var(--line); border-radius: 12px; box-shadow: 4px 4px 0 var(--line); padding: 10px 12px; text-align: left; min-height: 64px; cursor: pointer; }
.preset[aria-pressed="true"] { outline: 4px solid var(--rosa); outline-offset: 2px; transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--line); }
.pp { font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.preset small { display: block; color: #555B75; font-size: 13.5px; margin-top: 2px; }
.pace { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 6px 0 4px; }
.pace button { text-align: left; background: var(--surface); color: inherit; border: 3px solid var(--line); border-radius: 12px; padding: 12px 14px; min-height: 64px; cursor: pointer; }
.pace button[aria-pressed="true"] { border-color: var(--rosa); box-shadow: 4px 4px 0 var(--rosa); }
.pace b { display: block; font-size: 16px; }
.pace span { display: block; font-size: 14px; margin-top: 2px; }
@media (max-width: 560px) { .pace { grid-template-columns: 1fr; } }
.vs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; margin: 0 0 14px; }
.vsc { --c: var(--rosa); background: var(--paper); color: var(--line); border: 5px solid var(--c); border-radius: 12px; box-shadow: 4px 4px 0 var(--line); text-align: center; padding: 8px 6px 0; overflow: hidden; }
.vsc .e { font-size: 34px; line-height: 1.1; }
.vsc .nm { font-family: var(--slab); font-size: 16px; background: var(--c); color: #fff; margin: 6px -6px 0; padding: 5px 4px 6px; line-height: 1.15; }
.vsx { font-family: var(--slab); font-size: 24px; color: var(--rosa); }
.st-chips { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.st-chip { display: inline-flex; align-items: center; gap: 6px; }
.st-chip::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--c); border: 2px solid var(--line); }

/* Faringoamigdalitis: El Centorímetro's and ¿Quirófano o a casa?'s sheets, steps and episodes (legacy .rx, .steps, .epi) */
.fa-rx { background: var(--paper); color: var(--card-ink); border: 3px solid var(--card-ink); border-top: 10px solid #2B59C3; border-radius: 14px; box-shadow: 6px 6px 0 var(--ink); padding: 14px 16px 10px; margin: 0 0 14px; }
.fa-rx.fa-qx { border-top-color: #F6A21E; }
.fa-rxh { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .4px; }
.fa-rxn { font-family: var(--slab); font-size: 26px; color: #2B59C3; text-transform: none; line-height: 1; text-align: right; }
.fa-qx .fa-rxn { color: #B26A00; }
.fa-rxq { margin: 8px 0 2px; font-size: 17px; font-weight: 700; }
.fa-rxf { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; margin: 10px 0 4px; }
.fa-rxf div { border-bottom: 2px dashed #CDBFA5; padding: 3px 0 5px; min-width: 0; }
.fa-rxf dt { font-size: 12.5px; color: #585C72; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }
.fa-rxf dd { margin: 0; font-size: 16.5px; overflow-wrap: anywhere; }
.fa-rxf .fa-si { color: #C62839; font-weight: 800; }
.fa-epi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0 6px; }
.fa-epi div { background: #fff; border: 3px solid var(--card-ink); border-radius: 10px; text-align: center; padding: 8px 4px; box-shadow: 3px 3px 0 var(--card-ink); }
.fa-epi b { display: block; font-family: var(--slab); font-weight: 400; font-size: 34px; line-height: 1.05; color: #C8502A; }
.fa-epi span { font-size: 13px; font-weight: 700; color: #40455E; }
.fa-trail { margin: 10px 0 2px; padding-left: 22px; font-size: 15px; color: #40455E; }
.fa-trail li { margin: 2px 0; }
.fa-steps { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; font-weight: 700; font-size: 14px; }
.fa-steps span { border: 2px solid var(--line); border-radius: 999px; padding: 3px 12px; background: var(--surface); color: var(--muted); }
.fa-steps span.fa-on { border-color: #2B59C3; background: #2B59C3; color: #fff; }
.fa-steps span.fa-dn { border-color: var(--good); color: var(--good); }
.fa-two .opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .fa-rxf { grid-template-columns: 1fr; } .fa-two .opts { grid-template-columns: 1fr; } }
/* Vía aérea pediátrica (va-): Repaso flip card, Referencia lists, entity buttons in ¿Quién es quién?. */
.va-flash { --c: var(--rosa); display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 560px; min-height: 180px; margin: 0 auto 8px; padding: 22px 20px; background: var(--surface); color: var(--text); border: 2px solid var(--gline); border-left: 10px solid var(--c); border-radius: 14px; font: inherit; text-align: left; cursor: pointer; justify-content: center; }
.va-flash.on { border-color: var(--c); }
.va-q { font-family: var(--slab); font-size: 22px; line-height: 1.2; }
.va-a { font-size: 16px; line-height: 1.45; border-top: 2px dashed var(--gline); padding-top: 12px; overflow-wrap: anywhere; }
.va-hint { text-align: center; }
.va-list h4 { color: var(--c); margin: 14px 0 4px; }
.va-list ul { margin: 10px 0 12px; padding-left: 20px; }
.va-list li { margin: 4px 0; overflow-wrap: anywhere; }
.va-ents .opt { border-left: 8px solid var(--c, var(--line)); }
/* Sangrado de tubo digestivo: the endoscope, the Forrest stair, ¿Arriba o abajo del Treitz? (legacy .scopebox, .stair, .tzo) */
.std-scope { background: #0E0D16; border-radius: 20px; padding: 9px; box-shadow: 0 0 0 3px var(--card-ink); position: relative; }
.std-scope svg { display: block; width: 100%; height: auto; }
.std-osd { position: absolute; right: 12px; bottom: 9px; font-size: 11px; color: #7CE3C1; font-weight: 700; letter-spacing: .5px; }
.std-scope .jet { stroke-dasharray: 6 5; animation: std-jet .5s linear infinite; }
.std-scope .drop { animation: std-drop 1.4s ease-in infinite; }
.std-scope .d2 { animation-delay: .6s; }
@keyframes std-jet { to { stroke-dashoffset: -11; } }
@keyframes std-drop { 0% { transform: translateY(-6px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(8px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .std-scope .jet, .std-scope .drop { animation: none; } }
.mode.std-wide { grid-column: 1 / -1; }
.mode.std-wide .lot { flex-direction: row; align-items: center; text-align: left; min-height: 0; }
.mode.std-wide .std-scope { flex: 0 0 190px; margin: 14px; }
.std-wtx { padding: 14px 18px 14px 4px; display: flex; flex-direction: column; gap: 6px; }
.std-wtx h3 { font-family: var(--slab); font-weight: 400; font-size: 24px; margin: 0; color: var(--card-ink); }
.std-wtx .desc { padding: 0; }
.std-tag { align-self: flex-start; background: var(--c); color: #fff; font-weight: 700; font-size: 13px; border-radius: 999px; padding: 3px 10px; }
@media (max-width: 560px) { .mode.std-wide .lot { flex-direction: column; text-align: center; } .mode.std-wide .std-scope { flex-basis: auto; width: 190px; margin: 22px auto 0; } .std-wtx { padding: 0 14px 14px; } .std-tag { align-self: center; } }
.std-qvis { display: flex; gap: 14px; justify-content: center; margin: 10px 0 8px; flex-wrap: wrap; }
.std-qvis .std-scope { width: min(230px, 70vw); }
.std-duo .std-scope { width: min(190px, 40vw); }
.std-qvis figure { margin: 0; text-align: center; }
.std-qvis figcaption { font-family: var(--slab); font-size: 15px; margin-top: 6px; }
.std-two .opts { grid-template-columns: 1fr 1fr; }
.std-fview { display: grid; grid-template-columns: 240px 1fr; gap: 20px; align-items: start; margin-bottom: 8px; }
.std-fdet { --c: var(--rosa); background: var(--surface); border: 2px solid var(--ink); border-radius: 12px; box-shadow: 5px 5px 0 var(--c); padding: 14px 16px; min-width: 0; }
.std-fk { font-family: var(--slab); font-size: 40px; line-height: 1; color: var(--c); }
.std-fh { font-family: var(--slab); font-size: 21px; line-height: 1.1; margin: 4px 0 8px; }
.std-fdet dl { margin: 0; } .std-fdet dt { font-weight: 700; font-size: 14px; color: var(--muted); margin-top: 8px; } .std-fdet dd { margin: 0; }
.std-meter { height: 12px; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; background: var(--bg); margin-top: 4px; }
.std-meter i { display: block; height: 100%; background: var(--c); }
@media (max-width: 600px) { .std-fview { grid-template-columns: 1fr; } .std-fview .std-scope { max-width: 240px; width: 100%; margin: 0 auto; box-sizing: border-box; } }
.std-stair { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin: 26px 0 8px; align-items: end; }
.std-stp { background: none; border: 0; padding: 0; display: flex; flex-direction: column; align-items: stretch; text-align: center; min-height: 44px; font: inherit; color: var(--text); cursor: pointer; min-width: 0; }
.std-bar { height: 150px; display: flex; align-items: flex-end; border-bottom: 3px solid var(--ink); }
.std-bar i { display: block; width: 100%; height: calc(var(--h) * 1.6% + 8%); background: var(--c); border: 2px solid var(--ink); border-bottom: 0; border-radius: 8px 8px 0 0; position: relative; }
.std-bar em { position: absolute; top: -22px; left: 0; right: 0; font-style: normal; font-weight: 700; font-size: 13px; color: var(--text); white-space: nowrap; }
.std-lbl { font-family: var(--slab); font-size: 19px; margin-top: 4px; }
.std-hh { font-size: 12px; line-height: 1.2; color: var(--muted); overflow-wrap: anywhere; }
.std-stp[aria-pressed="true"] .std-lbl { background: var(--ink); color: var(--bg); border-radius: 6px; }
.std-stp[aria-pressed="true"] .std-bar i { box-shadow: 0 0 0 3px var(--cempa); }
@media (max-width: 480px) { .std-bar em { font-size: 11px; } .std-hh { font-size: 10.5px; } .std-lbl { font-size: 16px; } }
.std-mini { flex: 0 0 44px; width: 44px; } .std-mini .std-scope { padding: 3px; border-radius: 10px; box-shadow: none; }
.slot .std-mini + span, .opt .std-mini + span { align-self: center; }
.pool.std-pics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pool.std-pics .opt { align-items: center; }
@media (max-width: 420px) { .pool.std-pics { grid-template-columns: 1fr; } }
.std-tzcard { background: var(--paper); color: var(--card-ink); border: 7px solid var(--ink); border-radius: 12px; box-shadow: 6px 6px 0 var(--ink); text-align: center; padding: 24px 16px; margin-bottom: 16px; }
.std-tzq { font-family: var(--slab); font-size: clamp(21px, 5vw, 29px); line-height: 1.15; overflow-wrap: anywhere; }
.std-tzh { font-size: 14px; color: #555B75; font-weight: 700; margin-bottom: 8px; }
.std-tzopts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
@media (max-width: 520px) { .std-tzopts { grid-template-columns: 1fr; } }
.std-tzo { --c: var(--rosa); background: var(--c); color: #fff; border: 3px solid var(--ink); border-radius: 12px; padding: 12px 10px; font: inherit; font-weight: 700; font-size: 16px; min-height: 64px; box-shadow: 4px 4px 0 var(--ink); display: flex; gap: 10px; align-items: center; justify-content: center; cursor: pointer; }
.std-tzo .k { background: rgba(0, 0, 0, .25); color: #fff; border-radius: 6px; width: 24px; height: 24px; display: grid; place-items: center; font-size: 13px; flex: 0 0 24px; }
.std-tzo[disabled] { opacity: .45; cursor: default; }
.std-tzo.hit { opacity: 1; outline: 4px solid var(--good, #0F8B6C); outline-offset: 2px; }
.std-tzo.miss { opacity: 1; outline: 4px solid var(--bad); outline-offset: 2px; }

/* Quemaduras: the layers chart and the resuscitation sheet (legacy styles, Taller de Parkland). */
.lc{ margin:16px 0 4px; background:var(--paper); color:var(--card-ink); border:2px solid var(--ink); border-radius:12px; padding:12px; box-shadow:4px 4px 0 var(--ink); }
.lc figcaption{ font-family:var(--slab); font-size:19px; margin-bottom:8px; }
.lc-scroll{ overflow-x:auto; -webkit-overflow-scrolling:touch; }
.lc-grid{ display:grid; grid-template-columns:minmax(104px,1.5fr) repeat(5,minmax(44px,1fr)); min-width:330px; border:2px solid #1A1A2E; border-radius:8px; overflow:hidden; }
.lc-h{ text-align:center; padding:6px 2px; background:#FFF9EE; border-bottom:2px solid #1A1A2E; line-height:1.1; }
.lc-h b{ display:block; font-size:14px; color:var(--g,#1A1A2E); }
.lc-h small,.lc-lab small{ display:block; font-size:11px; color:#585C72; }
.lc-h.lc-lab{ font-weight:700; font-size:13px; text-align:left; padding-left:8px; display:flex; align-items:center; }
.lc-lab{ padding:4px 8px; font-size:13px; line-height:1.15; display:flex; flex-direction:column; justify-content:center; border-right:2px solid #1A1A2E; color:#1A1A2E; }
.lc-lab small{ color:#3E3848; }
.lc-lab b{ hyphens:auto; -webkit-hyphens:auto; }
.lc-c{ position:relative; }
.lc-bar{ position:absolute; top:0; left:22%; right:22%; background:var(--g); }
.lc-bar.lc-end{ border-radius:0 0 8px 8px; }
.lc-bar.lc-x{ background:repeating-linear-gradient(135deg,var(--g) 0 5px,transparent 5px 9px); border-left:2px dashed var(--g); border-right:2px dashed var(--g); }
.lc-note{ font-size:14px; margin:10px 0 0; }
.pk-sheet{ background:var(--paper); color:var(--card-ink); border:3px solid var(--card-ink); border-radius:12px; overflow:hidden; margin:0 0 12px; }
.pk-sheet h4{ margin:0; padding:7px 12px; background:#1A1A2E; color:#FFF7E4; font-family:var(--slab); font-weight:400; font-size:16px; letter-spacing:.02em; }
.pk-row{ display:grid; grid-template-columns:minmax(118px,.9fr) 1.3fr; border-top:1.5px dashed #C9BFA9; }
.pk-row > span{ padding:7px 12px; }
.pk-row > span:first-child{ font-weight:700; font-size:14px; color:#3E3848; }
.pk-row > span:last-child{ font-family:var(--slab); font-size:17px; }
.pk-row.on{ background:#FFE3A6; } .pk-row.on > span:last-child{ color:#C8502A; }
.pk-row.off > span:last-child{ color:#C62839; }
.pk-hint{ background:var(--surface); border:2px dashed var(--cempa); border-radius:10px; padding:8px 12px; margin:0 0 10px; }
.pk-diag{ font-weight:700; }
@media (max-width:420px){ .pk-row{ grid-template-columns:112px 1fr; } .pk-row > span{ padding:6px 9px; } .pk-row > span:last-child{ font-size:15px; } }
.chart{ background:var(--paper); color:var(--card-ink); border:3px solid var(--card-ink); border-radius:14px; box-shadow:5px 5px 0 var(--ink); padding:14px 16px; margin-bottom:14px; }
.chart .tags{ display:flex; gap:6px; flex-wrap:wrap; margin-bottom:6px; }
.chart .tg{ font-size:13px; font-weight:700; border:2px solid var(--card-ink); border-radius:99px; padding:2px 10px; background:#fff; }
.chart .tg.hot{ background:#C8502A; color:#fff; } .chart .tg.cool{ background:#0F8B6C; color:#fff; }
.chart p{ margin:4px 0 0; font-size:17px; }
/* Cáncer de piel (legacy cancer-de-piel.html): the pathology sheet with its traffic light and
   the risk options (Semáforo Basocelular), the scan card, the letter toggles and the six moles
   (Escáner ABCDE). The skin drawing itself is .molefig in medviz.css. */
.pi-hoja{ background:var(--paper); color:var(--card-ink); border:3px solid var(--card-ink); border-top:10px solid #2B59C3; border-radius:14px; box-shadow:6px 6px 0 var(--ink); padding:14px 16px 10px; margin-bottom:14px; }
.pi-hojah{ display:flex; justify-content:space-between; align-items:center; gap:8px; font-weight:700; font-size:14px; text-transform:uppercase; letter-spacing:.4px; }
.pi-hojaf{ display:grid; grid-template-columns:1fr 1fr; gap:6px 16px; margin:10px 0 4px; }
@media (max-width:520px){ .pi-hojaf{ grid-template-columns:1fr; } }
.pi-hojaf div{ border-bottom:2px dashed #CDBFA5; padding:3px 0 5px; }
.pi-hojaf dt{ font-size:13px; color:#585C72; font-weight:700; text-transform:uppercase; letter-spacing:.3px; }
.pi-hojaf dd{ margin:0; font-size:16.5px; }
.pi-hojaf .si{ color:#C62839; font-weight:700; }
.pi-trail{ margin:10px 0 2px; padding-left:22px; font-size:15px; color:#40455E; }
.pi-trail li{ margin:2px 0; }
.pi-sema{ display:flex; gap:5px; background:#1A1A2E; padding:5px 7px; border-radius:99px; }
.pi-sema i{ width:16px; height:16px; border-radius:50%; background:var(--rc); opacity:.22; display:block; transition:opacity .2s; }
.pi-sema i.on{ opacity:1; outline:2px solid #FFF9EE; outline-offset:1px; }
.opts.pi-three{ grid-template-columns:repeat(3,1fr); }
@media (max-width:520px){ .opts.pi-three{ grid-template-columns:1fr; } }
.opt.pi-risk{ border-width:3px; border-color:var(--rc); font-weight:700; align-items:center; }
.opt.pi-risk .k{ background:var(--rc); color:#fff; }
.opt.pi-risk.ok{ border-color:var(--good); }
.opt.pi-risk.no{ border-color:var(--bad); }
.pi-scan{ display:grid; grid-template-columns:minmax(0,300px) 1fr; gap:18px; align-items:start; margin-bottom:14px; }
@media (max-width:640px){ .pi-scan{ grid-template-columns:1fr; } }
.pi-scantxt{ background:var(--surface); border:2px solid var(--ink); border-radius:12px; padding:12px 16px; box-shadow:5px 5px 0 var(--ink); }
.pi-scantxt .ctx{ margin:0 0 8px; font-size:17.5px; }
.pi-scantxt .see{ margin:0 0 8px; padding:8px 10px; background:var(--paper); color:var(--card-ink); border-left:6px solid #6A2C91; border-radius:8px; }
.pi-scantxt .see.alarm{ border-left-color:#C62839; }
.pi-scantxt .got{ margin:0; font-size:15px; color:var(--muted); }
.pi-lets{ display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-bottom:12px; }
@media (max-width:560px){ .pi-lets{ grid-template-columns:repeat(2,1fr); } }
.pi-let{ position:relative; display:flex; flex-direction:column; align-items:center; gap:2px; background:var(--paper); color:var(--card-ink); border:3px solid var(--card-ink); border-radius:12px; padding:10px 6px 8px; min-height:84px; box-shadow:4px 4px 0 var(--ink); font:inherit; cursor:pointer; transition:transform .1s, box-shadow .1s; }
.pi-let .lk{ font-family:var(--slab); font-size:30px; line-height:1; color:#6A2C91; }
.pi-let .ln{ font-size:14px; font-weight:700; text-align:center; line-height:1.15; }
.pi-let .kk{ position:absolute; top:4px; left:7px; font-size:13px; color:#585C72; font-weight:700; }
.pi-let .mk{ font-size:13px; font-weight:700; }
.pi-let[aria-pressed="true"]{ background:#6A2C91; color:#fff; transform:translate(2px,2px); box-shadow:2px 2px 0 var(--ink); }
.pi-let[aria-pressed="true"] .lk,.pi-let[aria-pressed="true"] .kk{ color:#fff; }
.pi-let[disabled]{ cursor:default; }
.pi-let.ok{ outline:4px solid var(--good); outline-offset:2px; }
.pi-let.no{ outline:4px solid var(--bad); outline-offset:2px; }
.opts.pi-six{ grid-template-columns:repeat(3,1fr); }
.opts.pi-six .opt{ font-family:var(--slab); font-size:22px; justify-content:center; align-items:center; min-height:64px; }
.pi-abx{ margin:8px 0 0; padding-left:0; list-style:none; }
.pi-abx li{ padding:4px 8px; border-radius:6px; margin:3px 0; }
.pi-abx li.hitl{ background:color-mix(in srgb, var(--good) 12%, transparent); }
.pi-abx li.missl{ background:color-mix(in srgb, var(--bad) 14%, transparent); }
@media (prefers-reduced-motion: reduce){ .pi-let, .pi-sema i{ transition:none; } }
/* Ojo rojo, párpados y catarata (legacy ojo-rojo-parpados-y-catarata.html): the Snellen «E», the
   Lotería stage, the Duelo's two twins and the slit lamp's beam over the reveal card. */
.ojo-snellen { font-family: var(--slab); font-size: clamp(46px, 12vw, 78px); line-height: 1; letter-spacing: .12em; margin: 0 0 6px; }
.ojo-stage { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; }
.ojo-stage .lot { min-height: 270px; position: relative; display: flex; flex-direction: column; }
.ojo-stage .lot .num { background: none; border: 0; box-shadow: none; padding: 0; color: inherit; }
.ojo-clue { font-family: var(--slab); font-size: 21px; line-height: 1.2; padding: 36px 14px 16px; margin: auto 0; text-align: center; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .ojo-stage { grid-template-columns: 1fr; gap: 18px; }
  .ojo-stage .lot { min-height: 0; max-width: 300px; width: 100%; margin: 0 auto; }
  .ojo-clue { padding: 34px 12px 14px; font-size: 19px; }
}
.ojo-flash { min-height: 28px; font-weight: 700; margin-top: 10px; }
.ojo-flash.ok { color: var(--good); } .ojo-flash.no { color: var(--bad); }
.ojo-duel-clue { text-align: center; font-family: var(--slab); font-size: clamp(22px, 5vw, 30px); line-height: 1.15; background: var(--paper); color: var(--card-ink); border: 3px solid var(--card-ink); border-radius: 14px; padding: 22px 16px; box-shadow: 6px 6px 0 var(--cempa); margin-bottom: 14px; overflow-wrap: anywhere; }
.ojo-duel-clue.good { border-color: var(--good); } .ojo-duel-clue.bad { border-color: var(--bad); }
.ojo-vs { text-align: center; font-family: var(--slab); color: var(--muted); margin: 0 0 8px; }
.ojo-duel { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ojo-twin { --c: var(--rosa); position: relative; background: var(--paper); color: var(--card-ink); border: 6px solid var(--c); border-radius: 12px; box-shadow: 0 0 0 3px var(--card-ink), 5px 5px 0 3px var(--card-ink); padding: 30px 10px 18px; font-family: var(--slab); font-size: clamp(17px, 4.4vw, 22px); line-height: 1.15; overflow-wrap: anywhere; }
.ojo-twin .k { position: absolute; top: 6px; left: 10px; font-size: 18px; }
.ojo-twin.ok { background: color-mix(in srgb, var(--good) 22%, #fff); }
.ojo-twin.no { background: color-mix(in srgb, var(--bad) 18%, #fff); }
.ojo-twin[disabled] { cursor: default; }
.ojo-slit { --ink: #F1EFE8; position: relative; background: #14142A; color: #F1EFE8; border: 3px solid var(--card-ink); border-radius: 14px; box-shadow: 6px 6px 0 var(--rosa); overflow: hidden; margin-bottom: 14px; }
.ojo-slit::before { content: ""; position: absolute; top: -20%; bottom: -20%; left: var(--beam, 12%); width: 54px; background: linear-gradient(90deg, transparent, rgba(246, 162, 30, .22), rgba(255, 248, 220, .42), rgba(246, 162, 30, .22), transparent); transform: skewX(-12deg); pointer-events: none; transition: left .35s ease; }
.ojo-slit .rv, .game .ojo-slit div.rv { position: relative; background: transparent; color: #F1EFE8; border: 0; box-shadow: none; margin: 0; }
.ojo-slit .rv li { background: transparent; color: #F1EFE8; border-color: rgba(241, 239, 232, .28); }
.ojo-slit .rv li.rv-hid { color: rgba(241, 239, 232, .62); }
.ojo-slit .rv .rv-more { color: #F1EFE8; border-color: #F1EFE8; }
@media (prefers-reduced-motion: reduce) { .ojo-slit::before { transition: none; } }
/* Picaduras y mordeduras (legacy look): the topic pills on the menu, the facts of a ficha, El Frasquero's patient card and
   tray of vials, and ¿Sí o Nel?'s card and two big buttons (legacy .bicho, .fact, .pt, .tray, .vials, .ctrl, .sn, .yn). */
.pm-bichos { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.pm-bicho { --c: var(--rosa); display: inline-flex; align-items: center; gap: 6px; background: var(--c); color: #fff; font-weight: 700; border: 2px solid var(--ink); border-radius: 999px; padding: 4px 12px 4px 8px; font-size: 15px; box-shadow: 2px 2px 0 var(--ink); text-shadow: 0 1px 0 rgba(0, 0, 0, .35); }
.pm-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 6px; }
@media (max-width: 560px) { .pm-facts { grid-template-columns: 1fr; } }
.pm-fact { border: 2px solid var(--c); border-radius: 10px; padding: 6px 10px; font-size: 14.5px; overflow-wrap: anywhere; }
.pm-fact b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--c); }
:root[data-theme="dark"] .pm-fact b { color: var(--text); }
.pm-lvl { display: inline-block; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--panda-text, var(--panda)); margin-bottom: 6px; }
.pm-pt { --c: var(--jade); background: var(--paper); color: var(--card-ink); border: 4px solid var(--c); border-radius: 12px; box-shadow: 0 0 0 2px var(--card-ink), 5px 5px 0 2px var(--card-ink); padding: 14px 16px; margin: 0 2px 18px; }
.pm-pt .who { display: flex; gap: 12px; align-items: center; }
.pm-pt .big-ico { font-size: 46px; line-height: 1; flex: 0 0 auto; }
.pm-pt .who b { font-family: var(--slab); font-weight: 400; font-size: 20px; display: block; line-height: 1.15; }
.pm-pt .who small { color: #40455E; font-weight: 700; display: block; }
.pm-pt ul { margin: 10px 0 0; padding-left: 20px; }
.pm-pt .grade { display: inline-block; margin-top: 10px; background: var(--c); color: #fff; font-weight: 700; border-radius: 999px; padding: 2px 12px; font-size: 15px; text-shadow: 0 1px 0 rgba(0, 0, 0, .35); }
.pm-pt .grade.hid { background: #1A1A2E; }
.pm-ask { font-weight: 700; margin: 0 0 12px; }
.pm-tray { background: var(--surface); border: 2px solid var(--ink); border-radius: 14px; padding: 14px; box-shadow: 5px 5px 0 var(--ink); margin-bottom: 14px; }
.pm-tray .count { display: flex; align-items: baseline; gap: 10px; justify-content: center; font-family: var(--slab); }
.pm-tray .count .n { font-size: 64px; line-height: 1; font-variant-numeric: tabular-nums; }
.pm-tray .count .u { font-size: 20px; color: var(--muted); }
.pm-tray .vials { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; min-height: 52px; margin: 10px 0 12px; padding: 8px; border: 2px dashed var(--gline); border-radius: 10px; }
.pm-tray .vials .v { width: 18px; height: 40px; }
.pm-tray .vials .v svg { width: 100%; height: 100%; display: block; }
.pm-tray .vials .v.in { animation: pm-vin .25s ease-out; }
.pm-tray .vials .empty { color: var(--muted); font-size: 14px; align-self: center; }
@keyframes pm-vin { from { transform: translateY(-14px) scale(.8); opacity: 0; } to { transform: none; opacity: 1; } }
.pm-tray .ctrl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pm-tray .ctrl button { min-height: 52px; border: 2px solid var(--ink); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; font-weight: 700; font-size: 18px; box-shadow: 3px 3px 0 var(--ink); cursor: pointer; }
.pm-tray .ctrl button:active:not([disabled]) { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.pm-tray .ctrl button[disabled] { opacity: .5; cursor: default; }
.pm-tray .apply { width: 100%; margin-top: 12px; }
@media (prefers-reduced-motion: reduce) { .pm-tray .vials .v.in { animation: none; } }
.pm-sn { --c: #1A1A2E; background: var(--paper); color: var(--card-ink); border: 7px solid var(--c); border-radius: 14px; box-shadow: 0 0 0 3px var(--card-ink), 6px 6px 0 3px var(--card-ink); padding: 22px 18px 18px; text-align: center; margin: 0 3px 18px; position: relative; }
.pm-sn .num { position: absolute; top: 6px; left: 10px; font-family: var(--slab); font-size: 20px; }
.pm-sn .ic { font-size: 44px; line-height: 1; }
.pm-sn p { font-size: 20px; font-weight: 700; margin: 10px 0 0; overflow-wrap: anywhere; }
.pm-sn .sit { font-size: 14px; color: #40455E; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin-top: 6px; }
.pm-yn { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.pm-yn button { min-height: 64px; border: 3px solid var(--ink); border-radius: 12px; font-family: var(--slab); font-size: 24px; box-shadow: 4px 4px 0 var(--ink); cursor: pointer; color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, .35); }
.pm-yn .si { background: var(--jade); }
.pm-yn .nel { background: #C62839; }
.pm-yn button[disabled] { opacity: .5; cursor: default; }
.pm-yn button.pickd { opacity: 1; outline: 4px solid var(--cempa); outline-offset: 2px; }
.pm-conf { border-left: 4px solid var(--cempa); padding-left: 8px; }
/* Fracturas y trauma: the nerve map (two drawings with numbered hotspots). */
.frx-map { display: grid; grid-template-columns: 3fr 2fr; gap: 12px; margin: 0 auto 14px; max-width: 520px; }
.frx-fig { margin: 0; background: var(--paper); color: var(--card-ink); border: 3px solid var(--ink); border-radius: 14px; padding: 8px; }
.frx-box { position: relative; }
.frx-box svg { display: block; width: 100%; height: auto; }
.frx-fig figcaption { text-align: center; font-weight: 700; font-size: 14px; margin-top: 4px; }
.frx-hs { position: absolute; transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 50%; background: #E4007C; color: #fff; border: 3px solid #1A1A2E;
  font-weight: 700; font-size: 18px; box-shadow: 2px 2px 0 #1A1A2E; cursor: pointer; padding: 0; }
.frx-hs.seen { background: #0F8B6C; }
.frx-hs.sel { background: #F6A21E; color: #1A1A2E; outline: 4px solid #F6A21E; outline-offset: 2px; }
.frx-hs.ok { background: #0F8B6C; outline: 4px solid #0F8B6C; outline-offset: 2px; }
.frx-hs.no { background: #C62839; }
.frx-hs[disabled] { cursor: default; opacity: .9; }
.frx-hs[disabled]:not(.ok):not(.no) { background: #8A8FA8; }
.frx-info { background: var(--paper); color: var(--card-ink); border: 3px solid var(--ink); border-left: 10px solid #2B59C3; border-radius: 12px; padding: 12px 16px; min-height: 96px; }
.frx-info .nt { font-family: var(--slab); font-size: 21px; }
.frx-info .nn { font-weight: 700; color: #2B59C3; font-size: 18px; margin-top: 2px; }
.frx-info p { margin: 6px 0 0; }
@media (max-width: 480px) { .frx-hs { width: 34px; height: 34px; font-size: 15px; } }

/* ---- XP v2 (xp-ui.js): the per-answer tick, the results block, the rank-up. ---- */
.xp-tick {
  display: inline-block; margin-left: -6px; padding: 0 6px; font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums;
  color: var(--line); background: var(--cemp); border: 2px solid var(--line); border-radius: 999px;
}
@media (prefers-reduced-motion: no-preference) { .xp-tick { animation: xp-tick 1.4s ease-out both; } }
@keyframes xp-tick { 0% { transform: translateY(6px) scale(.8); opacity: 0; } 15% { transform: none; opacity: 1; } 75% { opacity: 1; } 100% { transform: translateY(-10px); opacity: 0; } }

.xp-res {
  display: grid; gap: 8px; max-width: 420px; margin: 14px auto 0; padding: 12px 14px; text-align: left;
  background: var(--paper); color: var(--line); border: 3px solid var(--line); border-radius: 14px; box-shadow: 4px 4px 0 var(--jade);
}
.xp-res .xpbar .xb-num { color: #5A5470; }
.xr-total {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px; min-height: 44px; padding: 0;
  font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-align: left;
}
.xr-total b { font-family: var(--slab); font-weight: 400; font-size: 1.7rem; color: var(--jade); font-variant-numeric: tabular-nums; }
.xr-why { font-weight: 700; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.xr-total:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.xr-parts { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; margin: 0; font-size: 15px; }
.xr-parts dt { font-weight: 400; }
.xr-parts dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }

.xp-rankup {
  position: fixed; inset: 0; z-index: 95; overflow-y: auto; display: grid; place-items: center; padding: 20px 16px;
  background: var(--bg); background-image: radial-gradient(var(--dot) 1.2px, transparent 1.4px); background-size: 18px 18px;
}
.xr-in { position: relative; display: grid; justify-items: center; gap: 10px; width: 100%; max-width: 420px; text-align: center; }
.xr-k { margin: 0; font-family: var(--slab); font-size: 1rem; color: var(--text); letter-spacing: .04em; }
.xr-title { margin: 0; font-family: var(--slab); font-weight: 400; font-size: clamp(1.9rem, 8vw, 2.6rem); line-height: 1.05; color: var(--rosa); text-shadow: 3px 3px 0 var(--line); overflow-wrap: anywhere; }
.xr-sub { margin: 0; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.xr-card { width: 100%; }
.xr-card .gafete { margin-top: 30px; }
.xr-roj { width: 100%; text-align: left; }
.xr-roj .pd { width: 88px; flex-basis: 88px; cursor: default; }
.xr-hint { margin: 0; font-weight: 700; color: var(--muted); }
.xp-rankup .row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.xp-rankup .row .btn { min-height: 48px; }
.xr-burst { position: fixed; left: 50%; top: 34%; width: 0; height: 0; pointer-events: none; }
.xr-burst i { position: absolute; left: -6px; top: -6px; width: 12px; height: 12px; background: var(--c); border: 2px solid var(--line); opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .xp-rankup:not(.still) .xr-burst i { animation: xr-burst 1.1s steps(8, end) .15s both; }
  .xp-rankup:not(.still) .xr-title { animation: gf-slam .35s cubic-bezier(.3, 1.5, .5, 1) .25s both; }
  .xp-rankup:not(.still) .gafete { animation: gf-rise .5s cubic-bezier(.2, .9, .3, 1.15) .45s both; }
  .xp-rankup:not(.still) .gafete .gf-stamp { animation: gf-slam .3s cubic-bezier(.3, 1.5, .5, 1) 1s both; }
  .xp-rankup:not(.still) .xr-roj { animation: gf-land .3s cubic-bezier(.3, 1.4, .5, 1) 1.2s both; }
}
@keyframes xr-burst {
  0% { opacity: 1; transform: rotate(var(--a)) translateY(0); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: rotate(var(--a)) translateY(calc(-1 * var(--d))); }
}

/* ---- Boss round (XP v2, game-kit.js bossMode; docs/mockups/xp-v2/Jefe.dc.html) ---- */
.boss { --boss: var(--rosa); display: flex; flex-direction: column; gap: 16px; }
.boss .top { margin-bottom: 0; }
.boss-prog { text-decoration: none; display: inline-flex; align-items: center; }
.boss-head { display: flex; gap: 14px; align-items: center; }
.boss-head .medal, .boss-results .medal { flex-shrink: 0; image-rendering: pixelated; }
.boss-head-t { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.boss-area { font-size: 13px; font-weight: 700; letter-spacing: 1px; color: color-mix(in srgb, var(--boss) 70%, var(--ink)); }
.game h2.boss-game { font-family: var(--slab); font-weight: 400; font-size: clamp(22px, 5.6vw, 30px); line-height: 1.1; margin: 0; }
.boss-req { padding: 14px 16px; color: var(--card-ink, #1A1A2E); }
.boss-req h2 { font-size: 20px; margin: 4px 0; }
.boss-req p { margin: 0 0 8px; }
.boss-note { margin: 0; font-weight: 700; color: var(--bad); }
.boss-card { background: #1A1A2E; color: #FFF9EE; border: 2px solid var(--ink); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 12px; box-shadow: 5px 5px 0 var(--boss); }
.boss-who { display: flex; gap: 12px; align-items: center; }
.boss-frame { width: 112px; height: 112px; flex-shrink: 0; background: #2A2A44; border: 2px dashed #A8957F; border-radius: 6px; display: grid; place-items: center; overflow: hidden; }
.boss-img { width: 112px; height: 112px; image-rendering: pixelated; display: block; }
.boss-who-t { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.boss-tag { font-family: var(--slab); font-size: 13px; letter-spacing: 1px; color: color-mix(in srgb, var(--boss) 55%, #FFFFFF); }
.boss-name { font-family: var(--slab); font-size: 21px; line-height: 1.1; overflow-wrap: anywhere; }
.boss-title { font-size: 14px; color: #D9C9AE; }
.boss-quote { margin: 0; font-size: 15px; line-height: 1.45; background: #2A2A44; border-radius: 6px; padding: 10px; font-style: italic; }
.boss-rules { margin: 0; padding-left: 20px; font-size: 15px; line-height: 1.55; color: #EFE6D6; }
.boss-go { min-height: 52px; background: var(--boss); color: #FFFFFF; border-color: #FFF9EE; box-shadow: 4px 4px 0 #FFF9EE; font-family: var(--slab); font-size: 20px; }
.boss-go:active { box-shadow: 1px 1px 0 #FFF9EE; }
.boss-foot { margin: 0; font-size: 14px; color: var(--muted); text-align: center; }
.boss-pill { border-color: var(--boss, var(--rosa)); font-weight: 700; }
.boss-caso { margin: 0 0 10px; font-size: 16px; line-height: 1.45; }
.opt.picked { border-color: var(--cemp); background: color-mix(in srgb, var(--cemp) 22%, var(--surface)); }
.boss-results { display: flex; flex-direction: column; align-items: center; text-align: center; }
.boss-results .row { justify-content: center; }
.boss-retry { margin: 4px 0 0; font-weight: 700; }
@media (max-width: 420px) {
  .boss-head .medal { width: 96px; height: 108px; }
  .boss-frame, .boss-img { width: 96px; height: 96px; }
}

/* The offer after a round (ofertas-ronda): a Pro Mensual lotería card under the score, Gratis only. */
.round-offer { margin: 18px auto 6px; max-width: 460px; display: flex; flex-direction: column; gap: 10px; text-align: center; }
.round-offer .lot { text-align: left; }
.round-offer .ro-body { padding: 14px 16px 12px; }
.round-offer .ro-h { margin: 0; font-family: var(--slab); font-weight: 400; font-size: 1.3rem; line-height: 1.2; color: var(--card-ink); }
.round-offer .ro-h b { font-weight: 400; font-variant-numeric: tabular-nums; }
.round-offer .ro-h s { font-family: var(--sans); font-size: 1rem; color: #5A5470; }
.round-offer .ro-code {
  display: inline-block; margin: 10px 0 0; padding: 4px 12px; border: 3px solid var(--jade); border-radius: 10px;
  background: var(--paper); color: var(--card-ink); font-weight: 700; box-shadow: 3px 3px 0 var(--card-ink);
  font-variant-numeric: tabular-nums;
}
.round-offer .ro-feats { margin: 10px 0 0; font-weight: 700; color: var(--card-ink); }
.round-offer .ro-roj { margin: 8px 0 0; font-style: italic; color: #5A5470; }
.round-offer .ro-own { margin: 10px 0 0; padding-left: 20px; color: var(--card-ink); font-size: .95rem; }
.round-offer .ro-own li + li { margin-top: 3px; }
.round-offer .ttl { margin: 0; text-align: center; }
.round-offer .ro-pick { width: 100%; }
.round-offer .ro-status { margin: 0; font-size: .95rem; }
.round-offer .ro-links { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; }
.round-offer .ro-links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; color: var(--text); }
.round-offer .ro-links a:focus-visible { outline: 3px solid var(--focus, var(--cemp)); outline-offset: 2px; }
