/* Elisa Studios Art — sitio estático.
   Un solo CSS para todas las páginas. Los temas son variables en html[data-theme="..."]:
   para sumar uno, copia un bloque de tema, cámbiale el nombre y agrégalo a THEMES en js/site.js.
   Todo el "cromo" (ventanas, biseles, botones, íconos) está dibujado con CSS: es un homenaje a los
   escritorios de los 90, sin logos, nombres ni imágenes de ningún sistema real. */

/* ─── Temas ─────────────────────────────────────────────────────────────── */

/* (a) Escritorio azul y blanco */
:root,
html[data-theme="azul"] {
  --page-bg: #1f4fd1;
  --page-pattern:
    linear-gradient(45deg, rgba(255,255,255,.07) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.07) 75%),
    linear-gradient(45deg, rgba(255,255,255,.07) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.07) 75%);
  --page-pattern-size: 4px 4px;
  --page-pattern-pos: 0 0, 2px 2px;
  --page-text: #ffffff;

  --chrome: #dce6fb;
  --chrome-text: #0a1a4a;
  --win: #ffffff;
  --win-text: #0a1a4a;
  --muted: #3c4f86;
  --title: linear-gradient(90deg, #0a2494, #2f6df0);
  --title-text: #ffffff;
  --field: #eef3ff;
  --field-text: #0a1a4a;
  --accent: #0b2fb3;
  --accent-text: #ffffff;
  --link: #0b2fb3;
  --rule: #9fb2e4;
  --focus: #ff7a00;

  --bevel-out: inset -1px -1px 0 #0a1a4a, inset 1px 1px 0 #ffffff, inset -2px -2px 0 #7f93c9, inset 2px 2px 0 #f2f6ff;
  --bevel-in: inset 1px 1px 0 #0a1a4a, inset -1px -1px 0 #ffffff, inset 2px 2px 0 #7f93c9, inset -2px -2px 0 #f2f6ff;
  --win-frame: 0 0 0 1px #0a1a4a, inset 0 0 0 2px #dce6fb, 4px 4px 0 rgba(4,14,60,.45);
  --win-pad: 3px;

  --font-body: "DotGothic16", "Trebuchet MS", Verdana, sans-serif;
  --font-head: "Jersey 20", "Trebuchet MS", Verdana, sans-serif;
  --font-ui: "Jersey 20", "Trebuchet MS", Verdana, sans-serif;
  --font-title: "Press Start 2P", "Jersey 20", monospace;
  --fs-ui: 1.25em;
  --head-scale: 1.3;
  --font-game: "Jacquard 24", "UnifrakturMaguntia", "Times New Roman", serif;
  --fs: 16px;
  --fs-title: 11px;
  --lh: 1.5;
  --head-weight: 700;
  --glow: none;
}

/* (b) Escritorio turquesa con ventanas grises */
html[data-theme="turquesa"] {
  --page-bg: #008080;
  --page-pattern: none;
  --page-text: #ffffff;

  --chrome: #c3c3c3;
  --chrome-text: #000000;
  --win: #c3c3c3;
  --win-text: #000000;
  --muted: #3a3a3a;
  --title: #000080;
  --title-text: #ffffff;
  --field: #ffffff;
  --field-text: #000000;
  --accent: #000080;
  --accent-text: #ffffff;
  --link: #000080;
  --rule: #808080;
  --focus: #000000;

  --bevel-out: inset -1px -1px 0 #000000, inset 1px 1px 0 #ffffff, inset -2px -2px 0 #808080, inset 2px 2px 0 #dfdfdf;
  --bevel-in: inset 1px 1px 0 #000000, inset -1px -1px 0 #ffffff, inset 2px 2px 0 #808080, inset -2px -2px 0 #dfdfdf;
  --win-frame: inset -1px -1px 0 #000000, inset 1px 1px 0 #dfdfdf, inset -2px -2px 0 #808080, inset 2px 2px 0 #ffffff;
  --win-pad: 4px;

  --font-body: Tahoma, Verdana, Geneva, "DejaVu Sans", sans-serif;
  --font-head: Tahoma, Verdana, Geneva, "DejaVu Sans", sans-serif;
  --font-ui: Tahoma, Verdana, Geneva, "DejaVu Sans", sans-serif;
  --font-title: Tahoma, Verdana, Geneva, "DejaVu Sans", sans-serif;
  --font-game: "Jacquard 24", "UnifrakturMaguntia", "Times New Roman", serif;
  --fs: 15px;
  --fs-title: 14px;
  --lh: 1.55;
  --head-weight: 700;
  --glow: none;
}

/* (c) Terminal CRT: verde sobre negro con líneas de barrido */
html[data-theme="crt"] {
  --page-bg: #010703;
  --page-pattern: radial-gradient(ellipse at center, rgba(40,255,110,.09), transparent 70%);
  --page-pattern-size: 100% 100%;
  --page-pattern-pos: 0 0;
  --page-text: #5dff8a;

  --chrome: #031208;
  --chrome-text: #5dff8a;
  --win: #020d06;
  --win-text: #5dff8a;
  --muted: #3ed46a;
  --title: #5dff8a;
  --title-text: #011005;
  --field: #000000;
  --field-text: #a9ffc0;
  --accent: #5dff8a;
  --accent-text: #011005;
  --link: #b6ffca;
  --rule: #1f8f43;
  --focus: #ffffff;

  --bevel-out: inset 0 0 0 1px #5dff8a;
  --bevel-in: inset 0 0 0 2px #5dff8a;
  --win-frame: 0 0 0 1px #5dff8a, 0 0 18px rgba(60,255,120,.18);
  --win-pad: 0px;

  --font-body: "VT323", "Courier New", monospace;
  --font-head: "VT323", "Courier New", monospace;
  --font-ui: "VT323", "Courier New", monospace;
  --font-title: "VT323", "Courier New", monospace;
  --font-game: "VT323", "Courier New", monospace;
  --fs: 21px;
  --fs-title: 21px;
  --lh: 1.3;
  --head-weight: 400;
  --glow: 0 0 6px rgba(80,255,130,.55);
}

/* (d) Medieval: piedra oscura y pergamino, la paleta del juego (ocre, hueso, rojo) */
html[data-theme="medieval"] {
  --page-bg: #15110e;
  --page-pattern:
    repeating-linear-gradient(0deg, rgba(0,0,0,.5) 0 2px, transparent 2px 56px),
    repeating-linear-gradient(90deg, rgba(0,0,0,.4) 0 2px, transparent 2px 112px),
    radial-gradient(circle at 20% 30%, rgba(255,230,180,.05), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(255,230,180,.04), transparent 45%);
  --page-pattern-size: auto, auto, 600px 500px, 700px 600px;
  --page-pattern-pos: 0 0;
  --page-text: #e9dfc6;

  --chrome: #2a231d;
  --chrome-text: #eadfc4;
  --win: #e2d3ac;
  --win-text: #24170d;
  --muted: #55402a;
  --title: linear-gradient(180deg, #3a3028, #211b16);
  --title-text: #e9c877;
  --field: #f1e6c6;
  --field-text: #24170d;
  --accent: #8a1717;
  --accent-text: #f6ead0;
  --link: #7a1010;
  --rule: #a58a55;
  --focus: #e0a52e;

  --bevel-out: inset -1px -1px 0 #0b0806, inset 1px 1px 0 #6b5a48, inset -2px -2px 0 #1a1410, inset 2px 2px 0 #4a3d31;
  --bevel-in: inset 1px 1px 0 #0b0806, inset -1px -1px 0 #6b5a48, inset 2px 2px 0 #1a1410, inset -2px -2px 0 #4a3d31;
  --win-frame: 0 0 0 1px #0b0806, 0 0 0 3px #b8862b, 0 0 0 4px #0b0806, 0 10px 24px rgba(0,0,0,.6);
  --win-pad: 0px;

  --font-body: "IM Fell English", Georgia, "Times New Roman", serif;
  --font-head: "Jacquard 24", "UnifrakturMaguntia", Georgia, serif;
  --font-ui: "IM Fell English", Georgia, "Times New Roman", serif;
  --font-title: "Jacquard 24", "UnifrakturMaguntia", Georgia, serif;
  --font-game: "Jacquard 24", "UnifrakturMaguntia", Georgia, serif;
  --fs: 19px;
  --fs-title: 24px;
  --lh: 1.5;
  --head-weight: 400;
  --glow: none;
}

/* (e) Cartel: el amarillo y rojo de la pantalla de título del juego y del logo del estudio */
html[data-theme="cartel"] {
  --page-bg: #ffec00;
  --page-pattern: radial-gradient(rgba(190,0,20,.16) 1px, transparent 1.5px);
  --page-pattern-size: 8px 8px;
  --page-pattern-pos: 0 0;
  --page-text: #4a0009;

  --chrome: #b80018;
  --chrome-text: #fff27a;
  --win: #fff8b8;
  --win-text: #3a0007;
  --muted: #6e1a12;
  --title: #b80018;
  --title-text: #fff27a;
  --field: #ffffff;
  --field-text: #3a0007;
  --accent: #b80018;
  --accent-text: #fff9c9;
  --link: #a00014;
  --rule: #d9a400;
  --focus: #1b1bd6;

  --bevel-out: inset -2px -2px 0 rgba(60,0,8,.55), inset 2px 2px 0 rgba(255,220,120,.5);
  --bevel-in: inset 2px 2px 0 rgba(60,0,8,.55), inset -2px -2px 0 rgba(255,220,120,.5);
  --win-frame: 0 0 0 3px #b80018, 6px 6px 0 #b80018;
  --win-pad: 0px;

  --font-body: "IM Fell English", Georgia, "Times New Roman", serif;
  --font-head: "Jacquard 24", "UnifrakturMaguntia", Georgia, serif;
  --font-ui: "Jersey 20", "Trebuchet MS", Verdana, sans-serif;
  --fs-ui: 1.1em;
  --font-title: "Jacquard 24", "UnifrakturMaguntia", Georgia, serif;
  --font-game: "Jacquard 24", "UnifrakturMaguntia", Georgia, serif;
  --fs: 19px;
  --fs-title: 24px;
  --lh: 1.5;
  --head-weight: 400;
  --glow: none;
}

/* ─── Base ──────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--page-bg);
  background-image: var(--page-pattern);
  background-size: var(--page-pattern-size, auto);
  background-position: var(--page-pattern-pos, 0 0);
  color: var(--win-text);
  font-family: var(--font-body);
  font-size: var(--fs);
  line-height: var(--lh);
  text-shadow: var(--glow);
  overflow-wrap: break-word;
}

/* Idiomas: los dos textos están en la página y se muestra uno. */
html[data-lang="es"] [lang="pt-BR"],
html[data-lang="pt"] [lang="es"] { display: none !important; }

img { max-width: 100%; height: auto; }
.pixel { image-rendering: pixelated; image-rendering: crisp-edges; image-rendering: pixelated; }

a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px dashed var(--focus); outline-offset: 2px; }

h1, h2, h3 { font-family: var(--font-head); font-weight: var(--head-weight); line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: calc(2em * var(--head-scale, 1)); }
h3 { font-size: calc(1.25em * var(--head-scale, 1)); }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
li { margin-bottom: .35em; }
strong { font-weight: 700; }
kbd {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: .9em;
  padding: 0 .4em;
  min-width: 1.6em;
  text-align: center;
  background: var(--chrome);
  color: var(--chrome-text);
  box-shadow: var(--bevel-out);
  white-space: nowrap;
}
.muted { color: var(--muted); }
.small { font-size: .88em; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--accent-text); padding: 8px 12px;
}
.skip:focus { top: 8px; }

/* ─── Botones ───────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 36px; padding: 6px 14px;
  border: 0; border-radius: 0;
  background: var(--chrome); color: var(--chrome-text);
  box-shadow: var(--bevel-out);
  font-family: var(--font-ui); font-size: var(--fs-ui, 1em); line-height: 1.1;
  text-decoration: none; text-shadow: none; cursor: pointer;
  -webkit-appearance: none; appearance: none;
}
.btn:hover { filter: brightness(1.06); }
.btn:active, .btn[aria-pressed="true"], .btn[aria-current="page"] { box-shadow: var(--bevel-in); }
.btn:active { transform: translate(1px, 1px); }
.btn-primary {
  background: var(--accent); color: var(--accent-text);
  box-shadow: inset -2px -2px 0 rgba(0,0,0,.45), inset 2px 2px 0 rgba(255,255,255,.4), 0 0 0 1px rgba(0,0,0,.7);
  font-weight: 700;
}
.btn-primary:active { box-shadow: inset 2px 2px 0 rgba(0,0,0,.45), inset -2px -2px 0 rgba(255,255,255,.4), 0 0 0 1px rgba(0,0,0,.7); }
.btn-big { font-size: 1.35em; padding: 14px 26px; min-height: 56px; }
.btn[disabled], .btn.is-disabled { opacity: .6; cursor: default; pointer-events: none; }

/* ─── Barra de tareas (navegación) ──────────────────────────────────────── */

.taskbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: 5px 8px;
  background: var(--chrome); color: var(--chrome-text);
  box-shadow: var(--bevel-out), 0 2px 0 rgba(0,0,0,.35);
  font-family: var(--font-ui);
  text-shadow: none;
}
.taskbar .tray { font-size: var(--fs-ui, 1em); }
.taskbar .tray .btn, .taskbar .tray select { font-size: 1em; }
.taskbar .btn { min-height: 34px; padding: 4px 10px; }
.start { font-weight: 700; }
/* Ícono del botón de inicio: un sol de píxeles propio (cuatro cuadrados y un centro). */
.start-ico {
  width: 16px; height: 16px; flex: none; position: relative;
  background:
    linear-gradient(currentColor, currentColor) 6px 0 / 4px 4px no-repeat,
    linear-gradient(currentColor, currentColor) 6px 12px / 4px 4px no-repeat,
    linear-gradient(currentColor, currentColor) 0 6px / 4px 4px no-repeat,
    linear-gradient(currentColor, currentColor) 12px 6px / 4px 4px no-repeat,
    linear-gradient(var(--accent), var(--accent)) 4px 4px / 8px 8px no-repeat;
}
html[data-theme="cartel"] .start-ico,
html[data-theme="crt"] .start-ico {
  background:
    linear-gradient(currentColor, currentColor) 6px 0 / 4px 4px no-repeat,
    linear-gradient(currentColor, currentColor) 6px 12px / 4px 4px no-repeat,
    linear-gradient(currentColor, currentColor) 0 6px / 4px 4px no-repeat,
    linear-gradient(currentColor, currentColor) 12px 6px / 4px 4px no-repeat,
    linear-gradient(currentColor, currentColor) 4px 4px / 8px 8px no-repeat;
}
.tasks { display: flex; flex-wrap: wrap; gap: 4px; flex: 1 1 auto; min-width: 0; }
.tray {
  display: flex; align-items: center; gap: 6px; margin-left: auto;
  padding: 3px 6px; box-shadow: var(--bevel-in);
}
.tray label { display: flex; align-items: center; gap: 6px; }
.tray select, .field {
  font-family: var(--font-ui); font-size: 1em;
  background: var(--field); color: var(--field-text);
  border: 0; border-radius: 0; box-shadow: var(--bevel-in);
  padding: 5px 8px; min-height: 30px; max-width: 100%;
}
.tray select { max-width: 11.5em; }
.lang { display: flex; }
.lang .btn { min-height: 30px; padding: 2px 8px; min-width: 38px; }
.lang .btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); }
.clock { font-variant-numeric: tabular-nums; padding: 0 4px; white-space: nowrap; }

@media (max-width: 720px) {
  .tasks { order: 3; flex-basis: 100%; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
  .tasks .btn { flex: none; }
  .clock { display: none; }
  .tray-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .start span.start-long { display: none; }
  .start { flex: none; }
  .tray { flex: 1 1 0; min-width: 0; justify-content: flex-end; }
  .tray label { flex: 1 1 0; min-width: 0; }
  .tray select { width: 100%; min-width: 0; max-width: none; }
  .lang { flex: none; }
}
@media (min-width: 721px) { .start span.start-short { display: none; } }

/* ─── Escritorio y ventanas ─────────────────────────────────────────────── */

.desktop {
  max-width: 1100px; margin: 0 auto;
  padding: 20px 12px 28px;
  display: grid; gap: 22px;
}
.window {
  background: var(--win); color: var(--win-text);
  box-shadow: var(--win-frame);
  padding: var(--win-pad);
  min-width: 0;
}
.titlebar {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 6px 5px 10px; min-height: 30px;
  background: var(--title); color: var(--title-text);
  text-shadow: none;
}
.titlebar .title {
  flex: 1 1 auto; min-width: 0; margin: 0;
  font-family: var(--font-title); font-size: var(--fs-title); font-weight: var(--head-weight);
  line-height: 1.3; letter-spacing: .02em;
}
/* Botones de la barra de título: decorativos, dibujados con CSS. */
.tb-btns { display: flex; gap: 3px; flex: none; }
.tb-btns i {
  width: 18px; height: 16px; display: block; position: relative;
  background: var(--chrome); box-shadow: var(--bevel-out);
}
.tb-btns i::before { content: ""; position: absolute; background: var(--chrome-text); }
.tb-btns i:nth-child(1)::before { left: 5px; right: 6px; bottom: 4px; height: 2px; }
.tb-btns i:nth-child(2)::before { left: 4px; right: 5px; top: 3px; bottom: 4px; background: none; box-shadow: inset 0 2px 0 var(--chrome-text), inset 0 0 0 1px var(--chrome-text); }
.tb-btns i:nth-child(3)::before { left: 5px; top: 7px; width: 8px; height: 2px; transform: rotate(45deg); }
.tb-btns i:nth-child(3)::after { content: ""; position: absolute; background: var(--chrome-text); left: 5px; top: 7px; width: 8px; height: 2px; transform: rotate(-45deg); }
html[data-theme="medieval"] .tb-btns,
html[data-theme="cartel"] .tb-btns { display: none; }
html[data-theme="crt"] .titlebar .title::before { content: "> "; }
html[data-theme="medieval"] .titlebar { border-bottom: 2px solid #b8862b; justify-content: center; text-align: center; padding: 8px 10px; }

.win-body { padding: 18px; }
.win-body > :last-child { margin-bottom: 0; }
@media (max-width: 480px) { .win-body { padding: 14px 12px; } .desktop { padding: 14px 8px 22px; gap: 16px; } }

.sunken { background: var(--field); color: var(--field-text); box-shadow: var(--bevel-in); padding: 12px; }
hr, .rule { border: 0; border-top: 2px solid var(--rule); margin: 1.2em 0; }

.cols { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); align-items: start; }

/* ─── Inicio del estudio ────────────────────────────────────────────────── */

.intro { display: grid; gap: 20px; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; }
@media (max-width: 760px) { .intro { grid-template-columns: 1fr; } }
.logo-frame { margin: 0; background: #ffec00; box-shadow: var(--bevel-in); padding: 4px; line-height: 0; }
.logo-frame img { width: 100%; display: block; }
.intro h1 { font-size: clamp(1.7em, 5vw, 2.5em); }
.lede { font-size: 1.12em; }

.game-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.game-card { margin: 0; display: flex; flex-direction: column; background: var(--field); color: var(--field-text); box-shadow: var(--bevel-out); padding: 8px; }
.game-card .cover { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; display: block; box-shadow: var(--bevel-in); background: #000; }
.game-card .cover-empty {
  aspect-ratio: 4 / 3; display: grid; place-items: center; box-shadow: var(--bevel-in);
  background: repeating-linear-gradient(45deg, transparent 0 8px, rgba(127,127,127,.22) 8px 16px);
  font-family: var(--font-head); font-size: 3em; color: var(--muted);
}
.game-card h3 { margin: 12px 4px 4px; font-size: 1.4em; }
.game-card p { margin: 0 4px 12px; flex: 1 1 auto; }
.game-card .btn { align-self: flex-start; margin: 0 4px 4px; }
.badge {
  display: inline-block; font-family: var(--font-ui); font-size: .8em; padding: 1px 8px; margin: 0 4px;
  background: var(--accent); color: var(--accent-text); text-shadow: none; align-self: flex-start;
}
.game-card.soon { opacity: .92; }
.game-card.soon .badge { background: transparent; color: inherit; box-shadow: inset 0 0 0 1px currentColor; }

/* ─── Selector de estilo ────────────────────────────────────────────────── */

.theme-picker { border: 0; margin: 0; padding: 0; min-width: 0; }
.theme-picker legend { padding: 0; margin-bottom: 10px; }
.swatches { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
.swatch { position: relative; display: block; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.swatch-box { display: block; padding: 6px; background: var(--chrome); color: var(--chrome-text); box-shadow: var(--bevel-out); text-shadow: none; font-family: var(--font-ui); }
.swatch input:checked + .swatch-box { box-shadow: var(--bevel-in); outline: 3px solid var(--accent); outline-offset: 1px; }
.swatch input:focus-visible + .swatch-box { outline: 2px dashed var(--focus); outline-offset: 3px; }
.swatch-art { display: block; height: 62px; background: var(--s-bg); padding: 9px 12px 0; overflow: hidden; }
.swatch-art b { display: block; height: 10px; background: var(--s-title); box-shadow: 0 0 0 1px var(--s-edge); }
.swatch-art i { display: block; height: 60px; background: var(--s-win); box-shadow: 0 0 0 1px var(--s-edge); position: relative; }
.swatch-art i::after { content: ""; position: absolute; left: 8px; right: 30%; top: 9px; height: 3px; background: var(--s-ink); box-shadow: 0 8px 0 var(--s-ink), 0 16px 0 var(--s-ink); opacity: .8; }
.swatch-name { display: block; margin-top: 6px; font-size: .95em; line-height: 1.2; }
.swatch[data-t="auto"] .swatch-art { --s-bg: linear-gradient(135deg, #1f4fd1 0 50%, #15110e 50% 100%); --s-title: #888; --s-win: #eee; --s-edge: #000; --s-ink: #555; }
.swatch[data-t="azul"] .swatch-art { --s-bg: #1f4fd1; --s-title: #0a2494; --s-win: #fff; --s-edge: #0a1a4a; --s-ink: #0a1a4a; }
.swatch[data-t="turquesa"] .swatch-art { --s-bg: #008080; --s-title: #000080; --s-win: #c3c3c3; --s-edge: #000; --s-ink: #000; }
.swatch[data-t="crt"] .swatch-art { --s-bg: #010703; --s-title: #5dff8a; --s-win: #020d06; --s-edge: #5dff8a; --s-ink: #5dff8a; }
.swatch[data-t="medieval"] .swatch-art { --s-bg: #15110e; --s-title: #2a231d; --s-win: #e2d3ac; --s-edge: #b8862b; --s-ink: #7a1010; }
.swatch[data-t="cartel"] .swatch-art { --s-bg: #ffec00; --s-title: #b80018; --s-win: #fff8b8; --s-edge: #b80018; --s-ink: #b80018; }

/* ─── Página del juego ──────────────────────────────────────────────────── */

.hero-stage { position: relative; display: grid; place-items: center; min-height: min(72vh, 560px); overflow: hidden; background: #0b0908; isolation: isolate; }
.hero-stage > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; z-index: -2; }
.hero-stage::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at 50% 45%, rgba(8,6,5,.6) 0%, rgba(8,6,5,.74) 60%, rgba(8,6,5,.9) 100%); }
.hero-copy { text-align: center; padding: 34px 16px; color: #efe6cf; text-shadow: 0 2px 0 #000; max-width: 760px; }
.hero-copy .kicker { font-family: var(--font-ui); letter-spacing: .12em; text-transform: uppercase; font-size: .85em; color: #e2b54a; margin-bottom: .6em; }
.game-logo { font-family: var(--font-game); font-weight: 400; font-size: clamp(3.1rem, 13vw, 7rem); line-height: .95; margin: 0 0 .15em; color: #f3ead2; text-shadow: 3px 3px 0 #7d1010, 0 0 24px rgba(0,0,0,.8); }
.hero-copy .tagline { font-size: 1.2em; margin: 0 auto 1.3em; max-width: 34em; }
.hero-copy .small { color: #d9cfb6; margin: 1.1em 0 0; }
.btn-play { background: #a01414; color: #fff3d6; }
html[data-theme="crt"] .hero-copy, html[data-theme="crt"] .game-logo { color: #5dff8a; text-shadow: 0 0 8px rgba(80,255,130,.6); }
html[data-theme="crt"] .hero-copy .kicker, html[data-theme="crt"] .hero-copy .small { color: #b6ffca; }
html[data-theme="crt"] .btn-play { background: #5dff8a; color: #011005; }
html[data-theme="crt"] .hero-stage > img { filter: grayscale(1) brightness(.8); }

.story { max-width: 44em; margin: 0 auto; }
html[data-theme="medieval"] .story p:first-of-type::first-letter,
html[data-theme="cartel"] .story p:first-of-type::first-letter { font-size: 3.3em; float: left; line-height: .82; padding: .06em .08em 0 0; color: var(--link); }
html[data-theme="medieval"] strong, html[data-theme="cartel"] strong { color: var(--link); }
html[data-theme="medieval"] .hero-copy strong, html[data-theme="cartel"] .hero-copy strong { color: inherit; }
.pull { font-family: var(--font-head); font-size: 1.5em; line-height: 1.2; text-align: center; margin: 1.1em auto; max-width: 22em; color: var(--link); }

.checks { list-style: none; padding: 0; }
.checks li { position: relative; padding-left: 1.6em; }
.checks li::before { content: ""; position: absolute; left: .15em; top: .5em; width: .6em; height: .6em; background: var(--accent); transform: rotate(45deg); }
.checks.later li::before { background: transparent; box-shadow: inset 0 0 0 2px var(--accent); }
.note { box-shadow: var(--bevel-in); background: var(--field); color: var(--field-text); padding: 12px 14px; margin-top: 1.2em; }
.note p { margin: 0; }

.heroes { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 980px) { .heroes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .heroes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.hero-card { margin: 0; background: var(--field); color: var(--field-text); box-shadow: var(--bevel-out); padding: 8px; text-align: center; display: flex; flex-direction: column; }
.hero-card img { width: 100%; aspect-ratio: 139 / 232; display: block; box-shadow: var(--bevel-in); background: #000; }
.hero-card h3 { margin: 10px 0 0; font-size: 1.45em; }
.hero-card .role { font-family: var(--font-ui); font-size: .85em; margin: 2px 0 6px; color: var(--muted); }
html .hero-card .role { color: color-mix(in srgb, var(--field-text) 78%, var(--field)); }
.hero-card .quote { font-size: .9em; font-style: italic; margin: 0; line-height: 1.35; }
html[data-theme="crt"] .hero-card .quote { font-style: normal; }

.gallery { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
@media (max-width: 520px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }
.gallery li { margin: 0; }
.shot { display: block; width: 100%; padding: 4px; border: 0; background: var(--chrome); box-shadow: var(--bevel-out); cursor: zoom-in; line-height: 0; }
.shot img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: #000; }
.shot:hover { filter: brightness(1.12); }

.lightbox { border: 0; padding: 0; margin: auto; background: transparent; color: #f1ead8; max-width: min(96vw, 1100px); max-height: 96vh; width: 100%; overflow: visible; text-shadow: none; }
.lightbox::backdrop { background: rgba(0,0,0,.9); }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.lightbox img { max-width: 100%; max-height: calc(96vh - 120px); width: auto; height: auto; display: block; background: #000; box-shadow: 0 0 0 2px #f1ead8; }
.lightbox figcaption { font-family: var(--font-body); text-align: center; padding: 0 8px; }
.lb-bar { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 8px; font-family: var(--font-ui); }
.lb-bar { flex-wrap: wrap; }
.lb-count { min-width: 4.5em; text-align: center; }
@media (max-width: 560px) { .lb-word { display: none; } .lb-bar .btn { min-width: 48px; min-height: 44px; } }

.keys { width: 100%; border-collapse: collapse; }
.keys th, .keys td { text-align: left; vertical-align: top; padding: 6px 8px 6px 0; border-bottom: 1px solid var(--rule); font-weight: 400; }
.keys th { width: 46%; }
.keys tr:last-child th, .keys tr:last-child td { border-bottom: 0; }

/* Pix */
.pix { display: grid; gap: 22px; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); align-items: start; }
@media (max-width: 700px) { .pix { grid-template-columns: 1fr; } .pix-qr { margin: 0 auto; } }
.pix-qr { width: 100%; max-width: 260px; background: #fff; padding: 0; box-shadow: var(--bevel-in), 0 0 0 4px #fff; line-height: 0; }
.pix-qr svg { width: 100%; height: auto; display: block; }
.pix-amount { font-family: var(--font-head); font-size: 2em; line-height: 1; margin: 0 0 .4em; }
.pix-code { width: 100%; resize: none; font-family: ui-monospace, "Courier New", monospace; font-size: 13px; line-height: 1.35; word-break: break-all; text-shadow: none; display: block; }
.pix-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0 14px; }
.pix-status { min-height: 1.5em; font-weight: 700; }

/* ─── Pie ───────────────────────────────────────────────────────────────── */

.statusbar {
  max-width: 1100px; margin: 0 auto 24px; padding: 0 12px; text-shadow: none;
}
.statusbar-in {
  display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; justify-content: space-between;
  background: var(--chrome); color: var(--chrome-text); box-shadow: var(--bevel-out); padding: 10px 14px;
  font-family: var(--font-ui); font-size: .92em;
}
.statusbar a { color: inherit; }
.statusbar p { margin: 0; }

/* ─── Detalles por tema ─────────────────────────────────────────────────── */

html[data-theme="crt"] body::after {
  content: ""; position: fixed; inset: 0; z-index: 200; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,.28) 0 1px, transparent 1px 3px);
}
html[data-theme="crt"] .btn, html[data-theme="crt"] .tray select, html[data-theme="crt"] .field { text-shadow: none; }
html[data-theme="crt"] a { text-decoration-style: dotted; }
html[data-theme="crt"] .window { background-image: none; }
html[data-theme="crt"] .lang .btn[aria-pressed="true"], html[data-theme="crt"] .btn-primary { background: #5dff8a; color: #011005; }
html[data-theme="crt"] .logo-frame { background: #ffec00; }

html[data-theme="medieval"] .window {
  background-image:
    radial-gradient(ellipse at 15% 10%, rgba(255,255,255,.22), transparent 55%),
    radial-gradient(ellipse at 90% 95%, rgba(110,70,20,.22), transparent 55%);
}
html[data-theme="medieval"] .btn { letter-spacing: .02em; }
html[data-theme="medieval"] .game-card, html[data-theme="medieval"] .hero-card { box-shadow: 0 0 0 1px #6b5330, 0 0 0 3px #f1e6c6, 0 0 0 4px #6b5330; margin: 4px; }
html[data-theme="medieval"] .swatch-box { background: #2a231d; }

html[data-theme="cartel"] .window { background-image: none; }
html[data-theme="cartel"] .titlebar { justify-content: center; text-align: center; padding: 8px 10px; }
html[data-theme="cartel"] .tray select { box-shadow: inset 0 0 0 2px rgba(60,0,8,.6); }
html[data-theme="cartel"] .lang .btn[aria-pressed="true"] { background: #fff27a; color: #7a0010; }
html[data-theme="cartel"] .game-card, html[data-theme="cartel"] .hero-card, html[data-theme="cartel"] .shot { box-shadow: 0 0 0 2px #b80018; background: #fff; }
html[data-theme="cartel"] kbd { background: #fff; color: #7a0010; box-shadow: inset 0 0 0 2px #b80018; }
html[data-theme="cartel"] .swatch-box { background: #fff; color: #5a000c; box-shadow: 0 0 0 2px #b80018; }
html[data-theme="cartel"] .tb-btns { display: none; }
html[data-theme="crt"] strong { font-weight: 400; color: var(--link); }
html[data-theme="crt"] .hero-copy strong { color: inherit; }
@media (max-width: 560px) { .game-card .cover-empty { aspect-ratio: 16 / 6; } }

/* Nosotros: el equipo, con el retrato de los créditos del juego. */
.member { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; margin: 0; }
.member img { width: min(100%, 200px); height: auto; border: 2px solid currentColor; background: #000; }
.member figcaption { flex: 1 1 240px; }
.member h3 { margin-top: 0; }
