/* BACKROOMS no-clip — estética terminal sucio / Darkwood */
@font-face { font-family: 'Press Start 2P'; src: url('../assets/fonts/PressStart2P-Regular.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'VT323'; src: url('../assets/fonts/VT323-Regular.ttf') format('truetype'); font-display: swap; }
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --amarillo: #d9c66e;
  --amarillo-osc: #8a7a3d;
  --hueso: #efe8d0;
  --gris: #9a9482;
  --rojo: #c94a3a;
  --verde: #6aa86a;
  --panel: #14120d;
  --borde: #3a352a;
  --font-title: 'Press Start 2P', 'Courier New', monospace;
  --font-body: 'VT323', 'Courier New', monospace;
  /* --marco (border-image 9-slice) lo inyecta js/ui/icons.js al cargar */
}
html, body { height: 100%; background: #060504; color: var(--hueso);
  font-family: var(--font-body); overflow: hidden; }
#app { height: 100vh; display: flex; align-items: center; justify-content: center; }

/* iconos pixel-art (js/ui/icons.js) */
.icono { image-rendering: pixelated; vertical-align: -3px; }

/* capa de fundido entre pantallas (cosmética; el cambio real es síncrono) */
#fade { position: fixed; inset: 0; background: #000; opacity: 0;
  pointer-events: none; transition: opacity .28s ease-out; z-index: 60; }

/* marco pixel-art 9-slice para paneles importantes */
.marco { border: 8px solid transparent;
  border-image: var(--marco) 8 fill stretch; background: none; }

.screen { position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; background: radial-gradient(ellipse at center, #0c0a06 0%, #050403 80%); z-index: 20; }

/* ---------- título ---------- */
.title-box { text-align: center; max-width: 640px; padding: 32px; }
.title-box h1 { font-family: var(--font-title); font-size: 38px; letter-spacing: 8px;
  color: var(--amarillo); line-height: 1.3;
  text-shadow: 0 0 24px rgba(217,198,110,.35), 4px 4px 0 #000; margin-bottom: 10px; }
.glitch { animation: flicker 4s infinite; }
@keyframes flicker {
  0%,93%,100% { opacity: 1; } 94% { opacity: .6; } 95% { opacity: 1; }
  96% { opacity: .3; } 97% { opacity: 1; }
}
.subtitle { color: var(--gris); letter-spacing: 3px; margin-bottom: 28px; font-size: 17px; }
.intro-text { color: var(--hueso); line-height: 1.6; margin-bottom: 24px; font-size: 19px; }
.seed-row { margin-bottom: 18px; color: var(--gris); font-size: 16px; }
.seed-row input { background: #0a0906; border: 1px solid var(--borde); color: var(--amarillo);
  font-family: inherit; font-size: 16px; padding: 6px 10px; width: 180px; }
.hint { margin-top: 26px; color: #6a6455; font-size: 15px; line-height: 1.7; }

.btn-big { display: inline-block; background: var(--amarillo-osc); color: #0a0906;
  border: 2px solid var(--amarillo); font-family: var(--font-title);
  font-size: 13px; letter-spacing: 2px; padding: 15px 30px; cursor: pointer;
  box-shadow: 0 0 18px rgba(217,198,110,.15); transition: all .15s; }
.btn-big:hover { background: var(--amarillo); box-shadow: 0 0 28px rgba(217,198,110,.4); }
.btn-big:active { transform: translateY(2px); box-shadow: 0 0 10px rgba(217,198,110,.2); }
.btn-small { display: inline-block; background: transparent; color: var(--gris);
  border: 1px solid var(--borde); font-family: inherit; font-size: 16px;
  padding: 7px 16px; cursor: pointer; margin-top: 12px; transition: all .12s; }
.btn-small:hover { color: var(--hueso); border-color: var(--gris); }
.btn-small:active { transform: translateY(1px); }

/* ---------- tarjeta de nivel ---------- */
.level-card { max-width: 680px; width: 92%; padding: 34px 38px; position: relative;
  border: 8px solid transparent; border-image: var(--marco) 8 fill stretch;
  box-shadow: 0 0 60px rgba(0,0,0,.9); }
.level-card.card-in { animation: card-in .35s ease-out; }
@keyframes card-in { from { opacity: 0; transform: translateY(16px); } }
.card-danger { position: absolute; top: -4px; left: -4px; right: -4px; height: 5px; }
.level-card h2 { font-family: var(--font-title); color: var(--amarillo);
  font-size: 17px; line-height: 1.5; margin-bottom: 8px; }
.card-class { color: var(--gris); font-size: 16px; letter-spacing: 1px; margin-bottom: 18px; }
.card-desc { line-height: 1.55; font-size: 19px; margin-bottom: 16px; }
.card-quote { border-left: 3px solid var(--amarillo-osc); padding-left: 14px;
  color: #b8ad8a; font-style: italic; font-size: 17px; margin-bottom: 18px; }
.card-rules { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.card-rules span { background: #201c12; border: 1px solid var(--borde);
  padding: 4px 10px; font-size: 15px; color: #cfc49a; display: inline-flex;
  align-items: center; gap: 5px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; }
.card-foot a { color: #7a90a8; font-size: 15px; }

/* ---------- juego ---------- */
#screen-game { position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; background: #030302; }
#game-wrap { position: relative; }
#game-canvas { display: block; background: #000; border: 1px solid #22201a;
  box-shadow: 0 0 80px rgba(0,0,0,1); image-rendering: pixelated; }
#gl-canvas { position: absolute; top: 0; left: 0; border: 1px solid #22201a; }
#game-wrap.modo3d #game-canvas { position: relative; background: transparent; box-shadow: none; }
#vol-slider-title { -webkit-appearance: none; appearance: none; width: 90px; height: 4px;
  background: #3a352a; outline: none; cursor: pointer; vertical-align: middle; }
#vol-slider-title::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 12px; height: 12px;
  background: var(--amarillo); border: 1px solid #0a0906; cursor: pointer; }
/* v16: botón-pergamino del registro completo + moodles de estado (arriba) */
#btn-log { position: absolute; top: 10px; left: 10px; width: 28px; height: 28px;
  background: rgba(10,9,6,.72); border: 1px solid var(--borde); cursor: pointer;
  display: flex; align-items: center; justify-content: center; z-index: 12; }
#btn-log:hover { border-color: var(--amarillo-osc); box-shadow: 0 0 8px rgba(217,198,110,.25); }
#log-panel { position: absolute; top: 44px; left: 10px; width: 360px; max-height: 68%;
  overflow: auto; background: rgba(12,11,7,.95); border: 1px solid var(--borde);
  padding: 12px 16px; z-index: 13; }
#log-panel h3 { color: var(--amarillo); font-size: 16px; margin-bottom: 8px; }
#log-full p { font-size: 14px; line-height: 1.45; color: #cfc8b0; margin-bottom: 1px; }
#log-full p.danger { color: #e88a7a; } #log-full p.good { color: #a8d8a0; }
#log-full p.event { color: #d8c88a; font-style: italic; }
#moodles { position: absolute; top: 10px; right: 10px; display: flex;
  flex-direction: column; gap: 6px; align-items: flex-end; pointer-events: auto; }
.moodle { width: 34px; height: 34px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; background: rgba(10,9,6,.75);
  border: 2px solid; box-shadow: 0 0 6px rgba(0,0,0,.6); }
.moodle-1 { border-color: #d9a531; }
.moodle-2 { border-color: #e0742c; }
.moodle-3 { border-color: #d94a35; animation: moodle-pulse 1.1s infinite; }
.moodle-sint { border-color: var(--amarillo); box-shadow: 0 0 10px rgba(217,198,110,.35); }
@keyframes moodle-pulse { 50% { transform: scale(1.14); box-shadow: 0 0 12px rgba(217,74,53,.55); } }

/* ---------- Instintos (v18) ---------- */
#instinto-modal { position: absolute; inset: 0; background: rgba(0,0,0,.72);
  display: flex; align-items: center; justify-content: center; z-index: 19; }
#instinto-box { max-width: 620px; }
#instinto-cards { display: flex; gap: 12px; margin: 16px 0 10px; }
.inst-card { flex: 1; background: #0f0e0a; border: 1px solid var(--borde);
  border-top: 3px solid var(--amarillo-osc); padding: 14px 12px; cursor: pointer;
  text-align: center; transition: all .12s; }
.inst-card:hover { border-color: var(--amarillo); background: #17140c;
  box-shadow: 0 0 16px rgba(217,198,110,.25); transform: translateY(-2px); }
.inst-card h4 { color: var(--amarillo); font-size: 15px; margin: 8px 0 6px; }
.inst-card p { font-size: 13.5px; line-height: 1.4; color: #cfc8b0; }
/* v15: HUD limpio — solo manos + mochila (todo lo demás es contextual) */
#hud-manos { position: absolute; right: 14px; bottom: 14px; display: flex;
  gap: 8px; align-items: center; }
.mano-slot { width: 48px; height: 48px; background: rgba(10,9,6,.72);
  border: 1px solid var(--borde); border-bottom-width: 3px; position: relative;
  cursor: pointer; color: #55503f; font-size: 18px; overflow: hidden; }
.mano-slot:hover { border-color: var(--amarillo-osc); }
.mano-slot.activa { border-color: var(--amarillo); box-shadow: 0 0 10px rgba(217,198,110,.35); }
/* v16: mano pixel-art de fondo (espejada según el lado) + objeto encima */
.mano-img { position: absolute; bottom: 1px; left: 50%; margin-left: -15px; opacity: .95; }
.mano-slot.vacia .mano-img { opacity: .3; }
.mano-item { position: absolute; top: 3px; left: 50%; margin-left: -11px;
  filter: drop-shadow(1px 1px 0 rgba(0,0,0,.8)); }
/* v19: atajo de teclado en pequeñito en la esquina de cada mano */
.k-mano { position: absolute; top: 1px; right: 3px; font-size: 11px;
  color: #6a6455; z-index: 1; text-shadow: 1px 1px 0 #000; }
#btn-mochila { width: 52px; height: 52px; background: rgba(16,14,9,.8);
  border: 1px solid var(--amarillo-osc); cursor: pointer; display: flex;
  align-items: center; justify-content: center; margin-left: 6px; }
#btn-mochila:hover { box-shadow: 0 0 12px rgba(217,198,110,.3); }
#backpack-panel { position: absolute; inset: 0; background: rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center; z-index: 15; }
/* v17: mochila inmersiva — bolsillos de tela cosida y manos a los lados */
#backpack-box { max-width: 560px; }
#backpack-box h3 { display: flex; align-items: center; gap: 8px; }
#backpack-layout { display: flex; align-items: center; justify-content: center;
  gap: 18px; margin: 16px 0 10px;
  background: radial-gradient(ellipse at 50% 30%, #241c12, #14100a 75%);
  border: 2px solid #3d2f1c; border-radius: 6px; padding: 16px 14px;
  outline: 1px dashed #5a4a2e; outline-offset: -7px; }
.bp-mano-col { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.bp-label { font-size: 12px; color: #8a8470; text-align: center; line-height: 1.25; }
.bp-mano { width: 62px; height: 62px; }
#backpack-slots { display: grid; grid-template-columns: repeat(3, 62px); gap: 10px; }
.inv-slot { width: 62px; height: 62px;
  background: radial-gradient(circle at 50% 35%, #221a10, #120e08 80%);
  border: 2px solid #3d2f1c; border-radius: 4px;
  box-shadow: inset 0 3px 8px rgba(0,0,0,.75); display: flex; flex-direction: column;
  align-items: center; justify-content: center; font-size: 10px; cursor: pointer;
  color: var(--hueso); position: relative; }
.inv-slot:hover { border-color: var(--amarillo-osc); }
.inv-slot .k { position: absolute; top: 1px; left: 4px; color: #6a6455; font-size: 12px; }
.inv-slot .nombre { font-size: 10.5px; color: #b8ad8a; max-width: 58px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
#bp-hint { font-size: 13.5px; line-height: 1.45; }
/* v20: equipamiento vestible + efectos activos */
#bp-equipo { display: flex; align-items: center; gap: 8px; margin: 4px 0 8px;
  padding: 8px 10px; background: #0d0b07; border: 1px solid var(--borde); flex-wrap: wrap; }
.bp-eq-label { color: var(--gris); font-size: 13px; letter-spacing: 1px; }
.eq-slot { width: 44px; height: 44px; background: radial-gradient(circle at 50% 40%, #1d1710, #100c07 85%);
  border: 2px solid #3d2f1c; border-radius: 4px; display: flex; align-items: center;
  justify-content: center; cursor: pointer; position: relative;
  box-shadow: inset 0 2px 6px rgba(0,0,0,.7); }
.eq-slot:hover { border-color: var(--amarillo-osc); }
.eq-slot.puesto { border-color: var(--amarillo-osc); }
.eq-ph { color: #55503f; font-size: 11px; }
#bp-efectos { display: flex; flex-wrap: wrap; gap: 5px; margin-left: auto; max-width: 55%;
  justify-content: flex-end; }
.fx { display: inline-flex; align-items: center; gap: 4px; background: #14200f;
  border: 1px solid #3a5a2e; color: #a8d8a0; font-size: 12px; padding: 2px 8px;
  border-radius: 9px; cursor: default; }
.fx.fx-mal { background: #200f0f; border-color: #5a2e2e; color: #e8a09a; }

/* v20: tooltips instantáneos (moodles a la izquierda, chips hacia arriba) */
.tip-left, .tip-up { position: relative; }
.tip-left:hover::after, .tip-up:hover::after {
  content: attr(data-tip); position: absolute; z-index: 45; pointer-events: none;
  background: #14120d; border: 1px solid var(--amarillo-osc); color: var(--hueso);
  padding: 7px 10px; font-size: 13px; line-height: 1.4; width: max-content;
  max-width: 250px; box-shadow: 0 0 14px rgba(0,0,0,.85); white-space: normal; }
.tip-left:hover::after { right: calc(100% + 10px); top: 50%; transform: translateY(-50%); }
.tip-up:hover::after { bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); }
#ctrl-list { margin-top: 14px; color: var(--gris); font-size: 15px; line-height: 1.7;
  border-top: 1px solid var(--borde); padding-top: 10px; }
#ctrl-list b { color: var(--hueso); letter-spacing: 1px; }
#item-modal { position: absolute; inset: 0; background: rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center; z-index: 17; }
#item-icon { font-size: 22px; }
.item-effect { color: var(--amarillo); font-size: 13px; }
#sound-menu { position: absolute; inset: 0; background: rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center; z-index: 18; }
.sound-row { display: flex; align-items: center; gap: 12px; margin: 12px 0; font-size: 13px; }
.sound-row label { width: 130px; color: var(--hueso); }
.sound-row input[type=range] { flex: 1; -webkit-appearance: none; appearance: none; height: 4px;
  background: #3a352a; outline: none; cursor: pointer; }
.sound-row input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none;
  width: 13px; height: 13px; background: var(--amarillo); border: 1px solid #0a0906; cursor: pointer; }
/* v20: el checkbox del dado se veía como un slider vacío — ahora es un checkbox */
.chk-row input[type=checkbox] { width: 15px; height: 15px; accent-color: var(--amarillo);
  cursor: pointer; vertical-align: middle; margin-right: 6px; }
/* v20.2: fila de debug (teleport a niveles) */
#debug-nivel { flex: 1; background: #0a0906; border: 1px solid var(--borde);
  color: var(--amarillo); font-family: inherit; font-size: 14px; padding: 5px 8px;
  cursor: pointer; min-width: 0; }
#debug-row { border-top: 1px dashed var(--borde); padding-top: 10px; }
.sound-row span { width: 36px; text-align: right; color: var(--gris); font-size: 12px; }
.chk-row { flex: 1; color: var(--gris); font-size: 13px; cursor: pointer; }
.chk-row input { accent-color: var(--amarillo); cursor: pointer; vertical-align: middle; }

#minimap { position: absolute; top: 40px; right: 12px; background: rgba(6,5,3,.82);
  border: 1px solid var(--borde); cursor: pointer; image-rendering: pixelated; }
#minimap:hover { border-color: var(--amarillo-osc); }
#minimap-big { position: absolute; inset: 0; background: rgba(0,0,0,.75);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 16; cursor: pointer; }
#minimap-big canvas { background: rgba(6,5,3,.95); border: 1px solid var(--amarillo-osc);
  image-rendering: pixelated; max-width: 84vmin; max-height: 84vmin; }
#minimap-big p { color: var(--gris); font-size: 12px; margin-top: 10px; }

/* v16: registro contextual arriba a la izquierda — pequeño y efímero */
#game-log { position: absolute; left: 44px; top: 10px; width: 340px; max-height: 84px;
  overflow: hidden; font-size: 13px; line-height: 1.35; color: #cfc8b0;
  text-shadow: 1px 1px 2px #000; pointer-events: none; display: flex;
  flex-direction: column; align-items: flex-start; }
#game-log p { background: rgba(8,7,4,.5); padding: 1px 8px; margin-bottom: 2px;
  transition: opacity 1s ease-out; }
#game-log p.log-out { opacity: 0; }
#game-log p.danger { color: #e88a7a; } #game-log p.good { color: #a8d8a0; }
#game-log p.event { color: #d8c88a; font-style: italic; }

/* ---------- dado ---------- */
#dice-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center; z-index: 15; }
#dice-box { text-align: center; }
#dice-face { width: 96px; height: 96px; margin: 0 auto 14px;
  border: 8px solid transparent; border-image: var(--marco) 8 fill stretch;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-title); font-size: 30px; color: var(--amarillo);
  box-shadow: 0 0 40px rgba(217,198,110,.3); }
#dice-face.rolling { animation: shake .1s infinite; }
@keyframes shake { 0%{transform:rotate(-4deg)} 50%{transform:rotate(4deg)} 100%{transform:rotate(-2deg)} }
#dice-text { color: var(--hueso); font-size: 17px; text-shadow: 1px 1px 2px #000; }

/* ---------- modal salida ---------- */
#exit-modal, #choice-modal { position: absolute; inset: 0; background: rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center; z-index: 14; }
.modal-box { border: 8px solid transparent; border-image: var(--marco) 8 fill stretch;
  max-width: 480px; width: 90%; padding: 24px 28px; }
.modal-box h3 { color: var(--amarillo); font-size: 20px; margin-bottom: 12px; }
.modal-box p { font-size: 17px; line-height: 1.5; margin-bottom: 10px; }
.modal-box .warn { color: #e8a05a; font-size: 15px; }
.modal-btns { display: flex; gap: 10px; row-gap: 8px; align-items: center; margin-top: 14px;
  flex-wrap: wrap; } /* v20: USAR/EMPUÑAR/Arrojar/Tirar/Cerrar caben en dos filas */
#item-modal .btn-big { font-size: 11px !important; padding: 9px 16px !important; }
#item-modal .btn-small { margin-top: 0; padding: 7px 12px; font-size: 15px; }

/* ---------- diario ---------- */
#journal-panel { position: absolute; top: 40px; right: 12px; width: 250px; max-height: 70%;
  overflow: auto; background: rgba(12,11,7,.94); border: 1px solid var(--borde);
  padding: 16px; z-index: 13; }
#journal-panel h3 { color: var(--amarillo); font-size: 17px; margin-bottom: 10px; }
#journal-panel ol { padding-left: 20px; font-size: 15px; line-height: 1.6; color: #cfc8b0; }

/* ---------- perfiles ---------- */
#profile-box { background: rgba(20,18,13,.65); border: 1px solid var(--borde);
  padding: 14px 18px; margin-bottom: 20px; }
.profile-title { color: var(--gris); font-size: 13px; letter-spacing: 3px; margin-bottom: 10px; }
.profile-row { display: flex; gap: 8px; justify-content: center; align-items: center;
  flex-wrap: wrap; margin-bottom: 8px; }
.profile-row .btn-small { margin-top: 0; }
#profile-select, #profile-name { background: #0a0906; border: 1px solid var(--borde);
  color: var(--amarillo); font-family: inherit; padding: 6px 10px; font-size: 16px; }
#profile-select { min-width: 140px; }
#profile-name { width: 140px; }
#profile-records { color: #8a8470; font-size: 15px; margin: 4px 0 8px; }

/* ---------- códice ---------- */
#codex-panel { position: fixed; inset: 0; background: rgba(3,3,2,.88);
  display: flex; align-items: center; justify-content: center; z-index: 30; }
.codex-box { width: min(720px, 94vw); max-height: 88vh; overflow: auto;
  border: 8px solid transparent; border-image: var(--marco) 8 fill stretch;
  padding: 24px 30px; }
.codex-box h2 { color: var(--amarillo); font-size: 22px; margin-bottom: 6px; }
.codex-records { color: var(--gris); font-size: 16px; margin-bottom: 18px; }
.codex-box h3 { color: var(--gris); font-size: 16px; letter-spacing: 1px; margin: 18px 0 8px; }
#codex-history { padding-left: 34px; font-size: 14px; line-height: 1.65; color: #cfc8b0; }

/* v19: códice compacto — secciones y niveles como DESPLEGABLES */
details.cdx { border: 1px solid var(--borde); background: #0d0c08; margin-bottom: 8px; }
details.cdx > summary { cursor: pointer; padding: 9px 14px; color: var(--amarillo);
  font-size: 16px; letter-spacing: 1px; list-style: none;
  display: flex; align-items: center; gap: 8px; user-select: none; }
details.cdx > summary::-webkit-details-marker { display: none; }
details.cdx > summary::before { content: '▸'; color: var(--amarillo-osc);
  transition: transform .15s; font-size: 14px; }
details.cdx[open] > summary::before { transform: rotate(90deg); }
details.cdx > summary:hover { background: #14120c; }
.cdx-n { margin-left: auto; color: var(--gris); font-size: 14px; letter-spacing: 0; }
details.cdx > div, details.cdx > ol { padding: 6px 14px 12px; }
.cdx-nivel { border: 1px solid var(--borde); border-left: 4px solid #888;
  margin-bottom: 4px; background: #0f0e0a; }
.cdx-nivel > summary { list-style: none; cursor: pointer; padding: 6px 10px;
  font-size: 15px; color: var(--hueso); display: flex; gap: 7px; align-items: center;
  user-select: none; }
.cdx-nivel > summary::-webkit-details-marker { display: none; }
.cdx-nivel > summary:hover { background: #16130d; }
.cdx-nivel .meta-min { margin-left: auto; color: #8a8470; font-size: 13px; white-space: nowrap; }
.cdx-nivel .cuerpo { padding: 4px 12px 10px; }
.cdx-nivel .meta { color: #8a8470; font-size: 13.5px; margin-bottom: 6px; }
.cdx-nivel .desc { color: #cfc8b0; font-size: 14.5px; line-height: 1.45; }
.cdx-nivel .stats { color: var(--amarillo); font-size: 14px; margin-top: 6px; }
.cdx-nivel a { color: #7a90a8; font-size: 13.5px; }
.cdx-nivel ul { padding-left: 18px; color: #cfc8b0; font-size: 14px; line-height: 1.5; }

/* colección de coleccionables (v15) */
.col-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.col-cuenta { width: 100%; color: var(--amarillo); font-size: 14px; margin-bottom: 2px; }
.col-card { width: 78px; padding: 6px 3px 5px; background: #0f0e0a; text-align: center;
  border: 1px solid var(--borde); font-size: 11.5px; line-height: 1.2; color: #cfc8b0;
  position: relative; }
.col-wiki { position: absolute; top: 1px; right: 2px; opacity: .55; line-height: 0; }
.col-wiki:hover { opacity: 1; }
.col-card img { image-rendering: pixelated; display: block; margin: 0 auto 4px; }
.col-card.col-locked { color: #5a5546; }
.col-nivel { border: 1px solid var(--borde); background: #0f0e0a; padding: 10px 14px;
  margin-bottom: 8px; font-size: 15px; }
.col-nivel ul { padding-left: 20px; color: #cfc8b0; line-height: 1.55; }
.col-nivel .col-locked, li.col-locked { color: #5a5546; font-style: italic; }

/* ---------- fin ---------- */
.end-box { max-width: 620px; width: 92%;
  border: 8px solid transparent; border-image: var(--marco) 8 fill stretch;
  padding: 34px 38px; max-height: 90vh; overflow: auto; }
.end-box h1 { font-family: var(--font-title); font-size: 22px; line-height: 1.5; margin-bottom: 12px; }
.end-box h1.muerte { color: var(--rojo); text-shadow: 0 0 24px rgba(201,74,58,.4); }
.end-box h1.victoria { color: var(--verde); text-shadow: 0 0 24px rgba(106,168,106,.4); }
#end-cause { color: var(--hueso); font-size: 18px; line-height: 1.5; margin-bottom: 18px; }
#end-stats { display: flex; gap: 22px; margin-bottom: 22px; color: var(--gris); font-size: 15px; }
#end-stats b { color: var(--amarillo); display: block; font-family: var(--font-title); font-size: 14px; padding-bottom: 4px; }
.end-box h3 { color: var(--gris); font-size: 16px; margin-bottom: 8px; letter-spacing: 1px; }
#end-journal { padding-left: 22px; font-size: 16px; line-height: 1.7; color: #cfc8b0; margin-bottom: 26px; }
