:root {
  --gold: #d8a94b;
  --gold-bright: #f6d492;
  --gold-dim: #7d5f28;
  --blood: #8e1b16;
  --blood-bright: #d4362a;
  --bone: #e9e1cd;
  --ash: #a49c8c;
  --ink: #0a0806;
  --ink-2: #14100c;
  --panel: rgba(14, 11, 8, 0.93);
  --line: rgba(216, 169, 75, 0.28);
  /* Sin fuentes remotas: pilas serif del sistema, con el mismo aire clásico. */
  --font-title: 'Palatino Linotype', 'Book Antiqua', Palatino, 'Trajan Pro', Georgia, 'Times New Roman', serif;
  --font-body: Georgia, 'Iowan Old Style', 'Palatino Linotype', 'Times New Roman', serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: #050505; overflow: hidden; }
body {
  font-family: var(--font-body);
  color: var(--bone);
  -webkit-font-smoothing: antialiased;
  user-select: none;
  cursor: default;
}
#app { position: fixed; inset: 0; overflow: hidden; }
canvas#game { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

#vignette {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background:
    radial-gradient(ellipse at center, rgba(0,0,0,0) 45%, rgba(0,0,0,0.55) 100%),
    linear-gradient(to bottom, rgba(0,0,0,0.35), rgba(0,0,0,0) 22%, rgba(0,0,0,0) 78%, rgba(0,0,0,0.5));
}

.hidden { display: none !important; }

/* ── Tipografía decorativa ─────────────────────────────────────────────── */
.title {
  font-family: var(--font-title);
  font-weight: 900;
  letter-spacing: 0.16em;
  font-size: clamp(44px, 7.4vw, 104px);
  line-height: 0.92;
  margin: 6px 0 0;
  color: var(--bone);
  text-shadow: 0 0 26px rgba(216, 169, 75, 0.28), 0 6px 30px rgba(0,0,0,0.9);
}
.kicker {
  font-family: var(--font-title);
  font-weight: 700;
  letter-spacing: 0.34em;
  font-size: clamp(9px, 1.1vw, 12px);
  color: var(--gold);
  text-transform: uppercase;
  margin: 0;
  opacity: 0.92;
}
.subtitle {
  font-family: var(--font-title);
  letter-spacing: 0.5em;
  font-size: clamp(12px, 1.7vw, 20px);
  color: var(--blood-bright);
  margin: 10px 0 0;
  text-shadow: 0 0 18px rgba(212, 54, 42, 0.4);
}
.tagline {
  max-width: 620px;
  margin: 22px auto 0;
  font-size: clamp(15px, 1.35vw, 18px);
  line-height: 1.6;
  color: var(--ash);
  font-style: italic;
}
.tiny {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: rgba(164, 156, 140, 0.55);
  text-transform: uppercase;
  margin: 18px 0 0;
}
.tiny b { color: var(--gold); }

/* ── Botones ───────────────────────────────────────────────────────────── */
.btn {
  position: relative;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bone);
  background: linear-gradient(180deg, rgba(28, 22, 16, 0.85), rgba(12, 9, 6, 0.92));
  border: 1px solid var(--line);
  padding: 14px 26px;
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s, box-shadow 0.18s, transform 0.12s, background 0.18s;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.btn::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(216, 169, 75, 0.12), transparent);
  opacity: 0; transition: opacity 0.2s;
}
.btn:hover, .btn:focus-visible, .btn.pad-focus {
  color: var(--gold-bright);
  border-color: rgba(246, 212, 146, 0.7);
  box-shadow: 0 0 0 1px rgba(216, 169, 75, 0.18), 0 0 26px rgba(216, 169, 75, 0.18) inset, 0 0 22px rgba(216,169,75,0.12);
  outline: none;
}
.btn:hover::before, .btn:focus-visible::before, .btn.pad-focus::before { opacity: 1; }
.btn:active { transform: translateY(1px) scale(0.995); }
.btn.primary {
  color: #1a1208;
  background: linear-gradient(180deg, #f0cd8b, #c99a43);
  border-color: #f6d492;
  text-shadow: 0 1px 0 rgba(255,255,255,0.35);
}
.btn.primary:hover, .btn.primary:focus-visible, .btn.primary.pad-focus {
  background: linear-gradient(180deg, #ffe6b0, #d9a84b);
  box-shadow: 0 0 30px rgba(216, 169, 75, 0.4);
  color: #120c04;
}
.btn.danger { color: #e0a49a; border-color: rgba(142, 27, 22, 0.55); }
.btn.danger:hover { color: #ffb8ab; border-color: rgba(212, 54, 42, 0.8); box-shadow: 0 0 22px rgba(142, 27, 22, 0.35); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; filter: grayscale(0.6); }
.btn.small { padding: 9px 14px; font-size: 11px; letter-spacing: 0.16em; }

/* ── Pantallas ─────────────────────────────────────────────────────────── */
.screen {
  position: absolute; inset: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center;
  padding: 26px;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(20, 10, 6, 0.4), rgba(3, 3, 4, 0.86) 70%),
    linear-gradient(to bottom, rgba(0,0,0,0.6), rgba(0,0,0,0.3));
  backdrop-filter: blur(3px);
  animation: fadeIn 0.35s ease both;
  overflow: hidden;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

#screen-menu { background: linear-gradient(to bottom, rgba(2,2,3,0.62) 0%, rgba(2,2,3,0.18) 38%, rgba(2,2,3,0.5) 78%, rgba(2,2,3,0.86) 100%); }
#screen-loading { background: #060505; z-index: 40; }

.menu-inner { width: min(900px, 100%); text-align: center; display: flex; flex-direction: column; align-items: center; }
.menu-head { margin-bottom: 26px; text-shadow: 0 2px 24px rgba(0,0,0,0.9); }
.menu-inner { position: relative; z-index: 1; }
.crest {
  font-size: 34px; color: var(--gold); opacity: 0.8; margin-bottom: 4px;
  text-shadow: 0 0 22px rgba(216, 169, 75, 0.5);
}
.menu-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 230px)); gap: 12px; justify-content: center; }
.menu-nav .btn:first-child { grid-column: 1 / -1; }
.menu-foot {
  display: flex; gap: 30px; margin-top: 26px; flex-wrap: wrap; justify-content: center;
  border-top: 1px solid rgba(216, 169, 75, 0.16); border-bottom: 1px solid rgba(216, 169, 75, 0.16);
  padding: 12px 26px;
}
.stat { display: flex; flex-direction: column; gap: 2px; min-width: 74px; }
.stat span { font-family: var(--font-title); font-size: 9px; letter-spacing: 0.2em; color: rgba(164,156,140,0.8); text-transform: uppercase; }
.stat b { font-family: var(--font-title); font-size: 20px; color: var(--gold-bright); font-weight: 700; }

.settings-row {
  display: flex; gap: 18px; margin-top: 22px; flex-wrap: wrap; justify-content: center; align-items: center;
}
.setting { display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ash); font-family: var(--font-title); }
.setting input[type=range] {
  -webkit-appearance: none; appearance: none; width: 92px; height: 3px; background: rgba(216,169,75,0.25); outline: none; cursor: pointer;
}
.setting input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 12px; background: var(--gold); border-radius: 50%; box-shadow: 0 0 10px rgba(216,169,75,0.7);
}
.setting input[type=range]::-moz-range-thumb { width: 12px; height: 12px; background: var(--gold); border: 0; border-radius: 50%; }

/* ── Carga ─────────────────────────────────────────────────────────────── */
.loading-inner { text-align: center; width: min(520px, 90vw); }
.logo-mark { font-size: 42px; color: var(--gold); opacity: 0.75; margin-bottom: 6px; animation: pulse 3s infinite; }
@keyframes pulse { 0%,100% { opacity: 0.45; } 50% { opacity: 0.95; } }
.load-track { height: 3px; background: rgba(216, 169, 75, 0.16); margin: 30px 0 14px; overflow: hidden; }
#load-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--gold-dim), var(--gold-bright)); transition: width 0.3s ease; box-shadow: 0 0 12px rgba(216,169,75,0.8); }
.load-text { font-family: var(--font-title); font-size: 10px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--ash); }

/* ── Paneles ───────────────────────────────────────────────────────────── */
.panel {
  position: relative;
  width: min(520px, 94vw);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 30px 90px rgba(0,0,0,0.8), inset 0 0 60px rgba(0,0,0,0.5);
  padding: 34px 36px 28px;
  text-align: center;
  clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
}
.panel::before {
  content: ''; position: absolute; inset: 7px; border: 1px solid rgba(216, 169, 75, 0.1); pointer-events: none;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
}
.panel-title {
  font-family: var(--font-title); font-weight: 900; letter-spacing: 0.2em;
  font-size: clamp(26px, 3.4vw, 40px); margin: 8px 0 10px; color: var(--bone);
  text-shadow: 0 0 24px rgba(216, 169, 75, 0.2);
}
.panel-sub { color: var(--ash); font-style: italic; margin: 0 0 18px; font-size: 15px; }
.pause-panel .menu-nav { grid-template-columns: 1fr; gap: 9px; margin-top: 6px; }
.pause-panel .btn { padding: 12px 22px; }

.wide-panel { width: min(980px, 96vw); height: min(760px, 92vh); display: flex; flex-direction: column; text-align: left; padding: 30px 34px 20px; }
.wide-panel .panel-title { text-align: left; }
.wide-panel .kicker, .wide-panel .panel-sub { text-align: left; }
.panel-scroll { flex: 1; overflow-y: auto; padding-right: 8px; margin-top: 8px; }
.panel-scroll::-webkit-scrollbar { width: 6px; }
.panel-scroll::-webkit-scrollbar-thumb { background: rgba(216,169,75,0.28); }
.panel-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 14px; border-top: 1px solid rgba(216,169,75,0.14); margin-top: 10px; font-family: var(--font-title); font-size: 11px; letter-spacing: 0.14em; color: var(--ash); text-transform: uppercase; flex-wrap: wrap; }
.close-btn {
  position: absolute; top: 14px; right: 16px; width: 34px; height: 34px;
  background: transparent; border: 1px solid var(--line); color: var(--ash);
  font-size: 14px; cursor: pointer; transition: 0.18s;
}
.close-btn:hover, .close-btn.pad-focus { color: var(--gold-bright); border-color: var(--gold); }

/* ── HUD ───────────────────────────────────────────────────────────────── */
#hud { position: absolute; inset: 0; z-index: 5; pointer-events: none; font-family: var(--font-title); }
.hud-top { position: absolute; top: 18px; left: 22px; right: 22px; display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.hud-block { display: flex; flex-direction: column; gap: 2px; }
.hud-label { font-size: 9px; letter-spacing: 0.26em; color: var(--gold); opacity: 0.85; }
.hud-value { font-size: 34px; font-weight: 900; line-height: 1; color: var(--bone); text-shadow: 0 2px 12px #000; }
.hud-sub { font-size: 10px; letter-spacing: 0.16em; color: var(--ash); text-transform: uppercase; margin-top: 2px; }
.hud-center { flex: 1; max-width: 460px; text-align: center; }
.xp-wrap { margin-top: 2px; }
.xp-top { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 11px; letter-spacing: 0.14em; color: var(--bone); }
.xp-num { color: var(--ash); font-size: 10px; }
.bar { position: relative; height: 8px; background: rgba(0,0,0,0.6); border: 1px solid rgba(216,169,75,0.22); overflow: hidden; }
.bar .fill { height: 100%; width: 0%; transition: width 0.2s ease; }
.xp-bar { margin-top: 4px; height: 5px; }
.xp-bar .fill { background: linear-gradient(90deg, #4a6fa8, #9fd8ff); box-shadow: 0 0 10px rgba(120,190,255,0.7); }
.bell-status {
  margin-top: 10px; font-size: 10px; letter-spacing: 0.2em; color: var(--gold-bright);
  text-transform: uppercase; text-shadow: 0 0 12px rgba(255,179,71,0.55);
  animation: bellPulse 2.4s ease-in-out infinite;
}
.bell-status.assault { color: #ff8f7a; animation: none; text-shadow: 0 0 12px rgba(212,54,42,0.5); }
@keyframes bellPulse { 0%,100% { opacity: 0.55; } 50% { opacity: 1; } }
.res-block { align-items: flex-end; gap: 6px; }
.res { display: flex; align-items: center; gap: 7px; font-size: 15px; letter-spacing: 0.08em; color: var(--bone); }
.res .coin { color: var(--gold-bright); font-size: 13px; }
.res .ess { color: #b483ff; font-size: 13px; }
.res-name { font-size: 8px; letter-spacing: 0.2em; color: var(--ash); }

.hud-bottom { position: absolute; left: 22px; right: 22px; bottom: 20px; display: flex; justify-content: space-between; align-items: flex-end; gap: 26px; }
.vitals { width: min(360px, 42vw); }
.hp-bar { height: 18px; }
.hp-bar .fill { background: linear-gradient(180deg, #c72f24, #6d0f0c); box-shadow: inset 0 0 10px rgba(255,120,90,0.35); }
.hp-bar .shield-fill { position: absolute; top: 0; left: 0; background: linear-gradient(180deg, rgba(120,190,255,0.85), rgba(40,90,150,0.85)); width: 0%; box-shadow: 0 0 12px rgba(120,190,255,0.6); transition: width 0.2s; }
.bar-text { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 8px; font-size: 11px; letter-spacing: 0.12em; text-shadow: 0 1px 3px #000; }
.shield-text { color: #bfe4ff; font-size: 10px; }
.vitals-labels { display: flex; justify-content: space-between; font-size: 8px; letter-spacing: 0.24em; color: var(--ash); margin-top: 4px; text-transform: uppercase; }
.special { margin-top: 12px; display: flex; gap: 10px; align-items: center; opacity: 0.95; }
.special-key {
  width: 26px; height: 26px; border: 1px solid var(--gold-dim); display: grid; place-items: center;
  font-size: 12px; color: var(--gold-bright); background: rgba(0,0,0,0.45);
}
.special-body { flex: 1; }
.special-name { font-size: 8px; letter-spacing: 0.2em; color: var(--ash); }
.special-cd { height: 3px; background: rgba(0,0,0,0.6); margin-top: 4px; }
#special-fill { height: 100%; width: 100%; background: linear-gradient(90deg, #d8a94b, #ffd88a); box-shadow: 0 0 8px rgba(216,169,75,0.6); }
.special.ready .special-name { color: var(--gold-bright); }

.weapon-panel { width: min(360px, 42vw); text-align: right; }
.weapon-slots { display: flex; gap: 4px; justify-content: flex-end; margin-bottom: 8px; }
.slot {
  width: 30px; height: 22px; border: 1px solid rgba(216,169,75,0.18); display: grid; place-items: center;
  font-size: 9px; color: rgba(164,156,140,0.6); background: rgba(0,0,0,0.4);
}
.slot.active { color: #1a1208; background: var(--gold); border-color: var(--gold-bright); box-shadow: 0 0 14px rgba(216,169,75,0.4); }
.slot.locked { opacity: 0.28; }
.weapon-main { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.weapon-info { display: flex; flex-direction: column; text-align: left; }
#weapon-name { font-size: 16px; letter-spacing: 0.08em; color: var(--bone); text-shadow: 0 2px 10px #000; }
#weapon-class { font-size: 8px; letter-spacing: 0.2em; color: var(--gold); text-transform: uppercase; margin-top: 2px; }
.ammo { font-size: 30px; font-weight: 900; line-height: 1; color: var(--bone); text-shadow: 0 2px 14px #000; }
.ammo-sep { color: var(--gold-dim); margin: 0 3px; font-size: 20px; }
#ammo-reserve { font-size: 15px; color: var(--ash); }
.reload-track { height: 2px; background: rgba(216,169,75,0.14); margin-top: 8px; }
#reload-fill { height: 100%; width: 0%; background: var(--gold); }

.crosshair { position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; transform: translate(-50%, -50%); opacity: 0.9; }
.ch-dot { position: absolute; left: 50%; top: 50%; width: 2px; height: 2px; background: #fff; transform: translate(-50%,-50%); border-radius: 50%; opacity: 0.75; }
.ch-arm { position: absolute; background: rgba(255,255,255,0.75); box-shadow: 0 0 4px rgba(0,0,0,0.9); }
.a1 { width: 1px; height: 7px; left: 50%; top: 0; transform: translateX(-50%); }
.a2 { width: 1px; height: 7px; left: 50%; bottom: 0; transform: translateX(-50%); }
.a3 { height: 1px; width: 7px; top: 50%; left: 0; transform: translateY(-50%); }
.a4 { height: 1px; width: 7px; top: 50%; right: 0; transform: translateY(-50%); }
.hitmarker { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; transform: translate(-50%,-50%) rotate(45deg); opacity: 0; }
.hitmarker.show { animation: hit 0.22s ease-out; }
.hitmarker span { position: absolute; background: #ffd27a; }
.hitmarker span:nth-child(1) { width: 2px; height: 7px; left: 0; top: 0; }
.hitmarker span:nth-child(2) { width: 2px; height: 7px; right: 0; top: 0; }
.hitmarker span:nth-child(3) { width: 2px; height: 7px; left: 0; bottom: 0; }
.hitmarker span:nth-child(4) { width: 2px; height: 7px; right: 0; bottom: 0; }
.hitmarker.kill span { background: #ff5a3c; }
@keyframes hit { 0% { opacity: 1; transform: translate(-50%,-50%) rotate(45deg) scale(1.25); } 100% { opacity: 0; transform: translate(-50%,-50%) rotate(45deg) scale(1); } }

.prompt {
  position: absolute; left: 50%; bottom: 150px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px;
  background: rgba(8,6,4,0.82); border: 1px solid rgba(216,169,75,0.35);
  padding: 9px 18px; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--bone);
  box-shadow: 0 0 30px rgba(0,0,0,0.7);
}
.prompt .key {
  display: grid; place-items: center; width: 22px; height: 22px;
  border: 1px solid var(--gold); color: var(--gold-bright); font-size: 11px;
}
.toasts { position: absolute; left: 50%; bottom: 205px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; align-items: center; }
.toast-item {
  font-family: var(--font-title); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  background: rgba(10,8,6,0.8); border-left: 2px solid var(--gold); padding: 7px 14px; color: var(--bone);
  animation: toastIn 0.25s ease, toastOut 0.4s ease 2.1s forwards;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-6px); } }

.announce { position: absolute; left: 0; right: 0; top: 26%; text-align: center; pointer-events: none; animation: annIn 0.5s ease; }
.ann-kicker { font-size: 11px; letter-spacing: 0.5em; color: var(--gold); }
.ann-title { font-family: var(--font-title); font-weight: 900; font-size: clamp(48px, 9vw, 110px); line-height: 1; color: var(--bone); text-shadow: 0 0 40px rgba(216,169,75,0.35); }
.ann-sub { font-family: var(--font-title); font-size: 12px; letter-spacing: 0.32em; color: var(--blood-bright); text-transform: uppercase; margin-top: 6px; }
@keyframes annIn { from { opacity: 0; transform: scale(1.08); } }

.banner {
  position: absolute; left: 50%; top: 22%; transform: translateX(-50%); text-align: center;
  background: linear-gradient(90deg, transparent, rgba(10,8,6,0.88), transparent);
  padding: 16px 60px; border-top: 1px solid rgba(216,169,75,0.35); border-bottom: 1px solid rgba(216,169,75,0.35);
  animation: annIn 0.5s ease;
}
.ban-title { font-family: var(--font-title); font-size: 22px; letter-spacing: 0.2em; color: var(--gold-bright); font-weight: 900; }
.ban-sub { font-size: 12px; letter-spacing: 0.14em; color: var(--ash); text-transform: uppercase; margin-top: 4px; }

.dmg-flash { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at center, rgba(142,27,22,0) 45%, rgba(160,20,15,0.6) 100%); transition: opacity 0.25s; }

/* ── Subida de nivel ───────────────────────────────────────────────────── */
.levelup-inner { width: min(1100px, 96vw); text-align: center; }
.levelup-sub { color: var(--ash); font-style: italic; margin: 4px 0 26px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.card {
  --rarity: #b9b3a5;
  position: relative; cursor: pointer; text-align: left;
  appearance: none; -webkit-appearance: none; font-family: var(--font-body); color: var(--bone);
  border-radius: 0;
  background: linear-gradient(180deg, rgba(24,19,14,0.96), rgba(9,7,5,0.98));
  border: 1px solid color-mix(in srgb, var(--rarity) 45%, transparent);
  padding: 22px 20px 18px; min-height: 210px;
  display: flex; flex-direction: column; gap: 8px;
  transition: transform 0.18s, box-shadow 0.2s, border-color 0.2s;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  animation: cardIn 0.35s ease both;
}
.card:nth-child(2) { animation-delay: 0.06s; }
.card:nth-child(3) { animation-delay: 0.12s; }
@keyframes cardIn { from { opacity: 0; transform: translateY(16px); } }
.card:hover, .card:focus-visible, .card.pad-focus {
  transform: translateY(-5px);
  border-color: var(--rarity);
  box-shadow: 0 18px 50px rgba(0,0,0,0.7), 0 0 34px color-mix(in srgb, var(--rarity) 28%, transparent);
  outline: none;
}
.card-rarity { font-family: var(--font-title); font-size: 9px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--rarity); }
.card-icon { font-size: 30px; line-height: 1; color: var(--rarity); filter: drop-shadow(0 0 10px color-mix(in srgb, var(--rarity) 45%, transparent)); }
.card-name { font-family: var(--font-title); font-size: 19px; font-weight: 700; letter-spacing: 0.04em; color: var(--bone); }
.card-desc { font-size: 14px; line-height: 1.5; color: var(--ash); flex: 1; }
.card-key { font-family: var(--font-title); font-size: 9px; letter-spacing: 0.2em; color: rgba(164,156,140,0.65); }
.card-glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--rarity) 14%, transparent), transparent 70%); }

/* ── Fin de partida ────────────────────────────────────────────────────── */
.dead-title { color: #d94a3a; text-shadow: 0 0 30px rgba(180, 30, 20, 0.5); }
.win-title { color: var(--gold-bright); text-shadow: 0 0 34px rgba(216,169,75,0.5); }
.end-sub { color: var(--ash); font-style: italic; margin: 0 0 20px; }
.summary { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 0 0 22px; text-align: left; }
.summary .s-row { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid rgba(216,169,75,0.12); padding: 7px 2px; font-size: 13px; }
.summary .s-row span { color: var(--ash); letter-spacing: 0.06em; }
.summary .s-row b { color: var(--gold-bright); font-family: var(--font-title); font-size: 14px; }

/* ── Arsenal / Fortaleza ───────────────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(295px, 1fr)); gap: 12px; }
.item {
  border: 1px solid rgba(216,169,75,0.16); background: linear-gradient(180deg, rgba(22,17,12,0.9), rgba(10,8,6,0.92));
  padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; position: relative;
}
.item.locked { opacity: 0.62; }
.item-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.item-name { font-family: var(--font-title); font-size: 15px; letter-spacing: 0.05em; color: var(--bone); }
.item-tag { font-family: var(--font-title); font-size: 8px; letter-spacing: 0.18em; color: var(--gold); text-transform: uppercase; }
.item-desc { font-size: 13px; color: var(--ash); line-height: 1.45; flex: 1; }
.stats-line { display: flex; flex-wrap: wrap; gap: 5px 14px; font-size: 10px; letter-spacing: 0.08em; color: rgba(233,225,205,0.7); font-family: var(--font-title); }
.stats-line b { color: var(--gold-bright); }
.item-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 2px; }
.cost { font-family: var(--font-title); font-size: 11px; letter-spacing: 0.1em; color: var(--gold-bright); }
.cost .no { color: #c66; }
.level-pips { display: flex; gap: 3px; }
.pip { width: 13px; height: 5px; background: rgba(216,169,75,0.18); }
.pip.on { background: var(--gold); box-shadow: 0 0 8px rgba(216,169,75,0.55); }
.building-icon { font-size: 22px; color: var(--gold); }

.controls-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 28px; }
.ctrl-row { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid rgba(216,169,75,0.1); padding: 8px 0; font-size: 14px; }
.ctrl-row span { color: var(--ash); }
.ctrl-row b { font-family: var(--font-title); font-size: 11px; letter-spacing: 0.14em; color: var(--gold-bright); }
.credits-list { columns: 2; column-gap: 34px; font-size: 13px; color: var(--ash); line-height: 1.55; }
.credits-list li { break-inside: avoid; margin-bottom: 8px; }
.credits-list b { color: var(--bone); }
.note { font-size: 13px; color: var(--ash); line-height: 1.6; margin: 0 0 14px; }
.note b { color: var(--gold-bright); }
.section-title { font-family: var(--font-title); font-size: 10px; letter-spacing: 0.28em; color: var(--gold); text-transform: uppercase; margin: 18px 0 8px; }

@media (max-width: 860px) {
  .cards { grid-template-columns: 1fr; }
  .card { min-height: 0; }
  .hud-bottom { flex-direction: column; align-items: stretch; gap: 12px; }
  .vitals, .weapon-panel { width: 100%; }
  .weapon-panel { text-align: left; }
  .weapon-main { flex-direction: row-reverse; }
  .weapon-info { text-align: right; }
  .weapon-slots { justify-content: flex-start; }
  .controls-grid { grid-template-columns: 1fr; }
  .credits-list { columns: 1; }
  .menu-nav { grid-template-columns: 1fr; }
  .hud-center { display: none; }
}
