/* Trono de Juegos — estilos pixel art */
:root {
  --bg: #120d1a;
  --bg2: #1b1426;
  --panel: #251b35;
  --panel2: #30243f;
  --panel3: #3c2e4f;
  --line: #4d3c66;
  --ink: #0a0610;
  --text: #f2e9d8;
  --muted: #a99cbc;
  --gold: #e3b341;
  --gold2: #ffd76a;
  --red: #d8434f;
  --green: #62c24c;
  --blue: #4a9ad8;
  --purple: #9a6ad0;
  --hp: #62c24c;
  /* 'Silkscreen' solo se descarga con las cifras 0-9 (las letras caen a Pixelify Sans). Press Start 2P solo es nítida en tamaños grandes: textos pequeños con cifras usan --font */
  --font-title: 'Press Start 2P', 'Courier New', monospace;
  --font: 'Silkscreen', 'Pixelify Sans', 'Trebuchet MS', sans-serif;
  --px: 2px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 17px; line-height: 1.35; }
body { overflow: hidden; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
img, canvas { image-rendering: pixelated; image-rendering: crisp-edges; }
button { font: inherit; color: inherit; }
a { color: var(--gold2); }

#app { position: fixed; inset: 0; display: flex; flex-direction: column; overflow: hidden; }
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden; animation: fadeIn .25s ease-out; }
.scroll { overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
.center { display: flex; align-items: center; justify-content: center; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- marcos pixel ---------- */
.frame {
  background: var(--panel);
  box-shadow: 0 0 0 2px var(--ink), inset 0 0 0 2px var(--line), inset 0 0 0 4px #1a1226, 0 6px 0 0 rgba(0,0,0,.35);
  border-radius: 2px;
  padding: 14px;
}
.frame.gold { box-shadow: 0 0 0 2px var(--ink), inset 0 0 0 2px var(--gold), inset 0 0 0 4px #5a3d10, 0 6px 0 0 rgba(0,0,0,.35); }
.frame.dark { background: var(--bg2); }
.title-font { font-family: var(--font-title); letter-spacing: 0; }
h1, h2, h3 { font-family: var(--font-title); font-weight: normal; margin: 0 0 10px; line-height: 1.4; }
h1 { font-size: 22px; } h2 { font-size: 15px; color: var(--gold2); } h3 { font-size: 11px; color: var(--gold); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 13px; }
.gold-t { color: var(--gold2); }
.red-t { color: #ff6a6a; }
.green-t { color: #8af07a; }

/* ---------- botones ---------- */
.btn {
  font-family: var(--font-title); font-size: 11px; line-height: 1.3;
  background: var(--panel3); color: var(--text); border: 0; cursor: pointer;
  padding: 11px 14px 13px; position: relative; text-align: center;
  box-shadow: 0 0 0 2px var(--ink), inset 0 -4px 0 0 rgba(0,0,0,.35), inset 0 2px 0 0 rgba(255,255,255,.12);
  transition: transform .05s, filter .1s;
}
.btn:hover { filter: brightness(1.15); }
.btn:active, .btn.pressed { transform: translateY(2px); box-shadow: 0 0 0 2px var(--ink), inset 0 2px 0 0 rgba(0,0,0,.35); }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.6); }
.btn.primary { background: #b8862a; color: #fff8e6; text-shadow: 1px 1px 0 #5a3d10; }
.btn.red { background: #a8323c; }
.btn.green { background: #3f8a34; }
.btn.blue { background: #2f6aa8; }
.btn.ghost { background: transparent; box-shadow: 0 0 0 2px var(--line); }
.btn.big { font-size: 14px; padding: 16px 22px 18px; }
.btn.icon { padding: 7px 9px 9px; display: inline-flex; align-items: center; gap: 6px; }
.btn img { width: 24px; height: 24px; }
.btn.sel { background: var(--gold); color: #2a1a05; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; }
.gap-s { gap: 6px; }

/* ---------- título ---------- */
.title-screen { background-size: cover; background-position: center bottom; }
.title-wrap { position: relative; z-index: 2; margin: auto; width: min(560px, 94vw); display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 18px 0; }
.logo { text-align: center; }
.logo .l1 { font-family: var(--font-title); font-size: clamp(22px, 6vw, 40px); color: var(--gold2); text-shadow: 0 3px 0 #7a4d12, 0 6px 0 #2a1605, 3px 3px 0 #2a1605, -2px 0 0 #2a1605, 2px 0 0 #2a1605, 0 -2px 0 #2a1605; letter-spacing: 1px; }
.logo .l2 { font-family: var(--font-title); font-size: clamp(14px, 4vw, 24px); color: #e8eef8; text-shadow: 0 3px 0 #3a4a6a, 2px 2px 0 #0a0610, -2px 0 0 #0a0610, 2px 0 0 #0a0610; margin-top: 8px; }
.logo .sub { font-size: 16px; font-weight: 700; color: #fff3d6; margin-top: 10px; padding: 3px 10px; background: rgba(10, 6, 16, .62); text-shadow: 1px 1px 0 #000, -1px 0 0 #000, 0 -1px 0 #000, 1px -1px 0 #000; }
.menu { display: flex; flex-direction: column; gap: 10px; width: min(340px, 86vw); }
.menu .btn { width: 100%; }
.menu-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: min(340px, 86vw); }
.title-heroes { display: flex; gap: 2px; justify-content: center; margin: 4px 0; }
.title-heroes img { width: 64px; height: 64px; animation: bob 1.6s ease-in-out infinite; }
.title-heroes img:nth-child(2n) { animation-delay: .4s; }
.title-heroes img:nth-child(3n) { animation-delay: .8s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.version { position: absolute; bottom: 8px; right: 10px; font-size: 13px; color: #c8b8e0; text-shadow: 1px 1px 0 #000; z-index: 2; }
.lock-note { font-size: 12px; color: var(--muted); }

/* ---------- cabecera de partida ---------- */
.hud { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--bg2); box-shadow: 0 2px 0 var(--ink), 0 4px 0 var(--line); z-index: 5; flex-wrap: wrap; }
.hud .region { font-family: var(--font); font-weight: 700; font-size: 17px; color: var(--gold2); }
.hud .stat { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.hud .stat img { width: 20px; height: 20px; }
.badges { display: inline-flex; gap: 2px; }
.badges img { width: 22px; height: 22px; }
.badges .empty { width: 22px; height: 22px; display: inline-block; opacity: .25; filter: grayscale(1) brightness(.6); }
.hud .spacer { flex: 1; }
.teambar { display: flex; gap: 6px; padding: 8px 10px; overflow-x: auto; background: #170f22; box-shadow: 0 2px 0 var(--ink); z-index: 4; }
.mini { display: flex; flex-direction: column; align-items: center; width: 62px; flex: 0 0 auto; cursor: pointer; padding: 2px; border-radius: 2px; }
.mini:hover { background: rgba(255,255,255,.06); }
.mini img { width: 48px; height: 48px; }
.mini .lv { font-size: 14px; color: var(--muted); }
.mini.ko img { filter: grayscale(1) brightness(.5); }
.bar { height: 6px; width: 100%; background: #0a0610; box-shadow: 0 0 0 1px #000; position: relative; }
.bar > i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--hp); transition: width .3s; }
.bar.xp > i { background: #6aa8ff; }
.bar.mid > i { background: #e3c341; }
.bar.low > i { background: #e04848; }

/* ---------- mapa ---------- */
.map-area { flex: 1; position: relative; overflow: hidden; display: flex; flex-direction: column; min-height: 0; }
.map-scroll { position: relative; flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; display: flex; justify-content: center; }
.map-canvas { display: block; cursor: pointer; }
/* barra fija bajo el mapa: antes flotaba encima y tapaba los nodos de inicio */
.map-tip { flex: 0 0 auto; min-height: 66px; display: flex; align-items: center; justify-content: center; padding: 6px 10px; background: #170f22; box-shadow: 0 -2px 0 var(--ink), 0 -4px 0 var(--line); z-index: 3; pointer-events: none; text-align: center; overflow: hidden; }
.map-tip .frame { padding: 5px 12px; font-size: 15px; max-width: 100%; }
.region-banner { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 3; pointer-events: none; }

/* ---------- modales ---------- */
#modal-root { position: fixed; inset: 0; pointer-events: none; z-index: 50; }
.modal-back { position: absolute; inset: 0; background: rgba(8,4,14,.72); pointer-events: auto; display: flex; align-items: center; justify-content: center; padding: 12px; animation: fadeIn .15s; }
.modal { width: min(760px, 100%); max-height: calc(100% - 8px); display: flex; flex-direction: column; animation: pop .18s ease-out; }
.modal.narrow { width: min(460px, 100%); }
.modal.wide { width: min(980px, 100%); }
.modal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.modal-head h2 { margin: 0; flex: 1; }
.modal-body { overflow-y: auto; overflow-x: hidden; flex: 1; padding: 2px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 12px; flex-wrap: wrap; }
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
#toast-root { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; pointer-events: none; align-items: center; width: min(420px, 94vw); }
.toast { pointer-events: none; padding: 10px 14px; display: flex; gap: 10px; align-items: center; animation: toastIn .3s ease-out; width: 100%; }
.toast img { width: 32px; height: 32px; }
.toast b { font-family: var(--font-title); font-size: 10px; color: var(--gold2); display: block; margin-bottom: 3px; }
@keyframes toastIn { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ---------- tarjetas ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.card { background: var(--panel2); padding: 12px; box-shadow: 0 0 0 2px var(--ink), inset 0 0 0 2px var(--line); cursor: pointer; display: flex; flex-direction: column; gap: 6px; position: relative; transition: transform .08s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 0 0 2px var(--ink), inset 0 0 0 2px var(--gold); }
.card.sel { box-shadow: 0 0 0 2px var(--ink), inset 0 0 0 3px var(--gold2); background: #3a2c22; }
.card.dis { opacity: .5; cursor: default; }
.card .top { display: flex; gap: 10px; align-items: center; }
.card .spr { width: 64px; height: 64px; flex: 0 0 auto; background: radial-gradient(circle at 50% 70%, rgba(255,255,255,.08), transparent 65%); }
.card .name { font-weight: 700; font-size: 17px; line-height: 1.15; }
.card .meta { font-size: 13px; color: var(--muted); }
.card .desc { font-size: 14px; color: #d8cce8; }
.card .price { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 3px; font-weight: 700; color: var(--gold2); }
.card .price img { width: 18px; height: 18px; }
.rar-comun { color: #d0d0d8; } .rar-raro { color: #6ab8ff; } .rar-epico { color: #d08aff; } .rar-legendario { color: #ffcf5a; }
.typetag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 6px 2px; font-size: 13px; font-weight: 700; color: #160d20; box-shadow: 0 0 0 1px var(--ink); text-shadow: none; }
.typetag img { width: 12px; height: 12px; }
.stats { display: grid; grid-template-columns: 34px 1fr 34px; gap: 2px 6px; align-items: center; font-size: 13px; }
.stats .sbar { height: 5px; background: #0a0610; position: relative; }
.stats .sbar > i { position: absolute; inset: 0 auto 0 0; background: var(--gold); }
.abil { padding: 6px 8px; background: rgba(0,0,0,.22); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; }
.abil b { font-size: 15px; }
.abil .k { font-size: 13px; color: var(--muted); }
.item-ic { width: 40px; height: 40px; flex: 0 0 auto; }

/* ---------- formación ---------- */
.formation { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.formation .lane h3 { text-align: center; }
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.slot { aspect-ratio: 1 / 1.25; background: rgba(0,0,0,.25); box-shadow: inset 0 0 0 2px var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; padding: 4px; position: relative; font-size: 14px; text-align: center; }
.slot img { width: 64px; height: 64px; max-width: 100%; }
.slot.picked { box-shadow: inset 0 0 0 3px var(--gold2); background: rgba(227,179,65,.12); }
.slot.ko img { filter: grayscale(1) brightness(.5); }
.slot .bar { width: 80%; }
.enemy-list { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.enemy-chip { display: flex; flex-direction: column; align-items: center; width: 86px; font-size: 14px; text-align: center; }
.enemy-chip img { width: 56px; height: 56px; }

/* ---------- combate ---------- */
.battle { background: #000; }
.battle-stage { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.battle-stage canvas { display: block; }
.battle-top { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; gap: 8px; align-items: center; z-index: 3; }
.battle-top .round { font-family: var(--font); font-weight: 700; font-size: 16px; background: rgba(10,6,16,.75); padding: 6px 8px; box-shadow: 0 0 0 2px var(--ink); }
.battle-log { padding: 8px 12px; min-height: 44px; background: var(--bg2); box-shadow: 0 -2px 0 var(--ink), 0 -4px 0 var(--line); font-size: 16px; display: flex; align-items: center; gap: 10px; }
.battle-log .txt { flex: 1; }
.speed .btn { padding: 6px 8px 8px; font-size: 10px; }
.shake { animation: shake .25s; }
@keyframes shake { 0%,100% { transform: translate(0,0); } 25% { transform: translate(-3px,1px); } 50% { transform: translate(3px,-1px); } 75% { transform: translate(-2px,0); } }

/* ---------- resultados ---------- */
.xp-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.xp-row img { width: 48px; height: 48px; }
.lvup { font-family: var(--font); font-weight: 700; font-size: 16px; color: #8af07a; animation: blink .6s steps(2) 4; }
@keyframes blink { 50% { opacity: 0; } }
.big-banner { font-family: var(--font-title); font-size: clamp(18px, 5vw, 30px); text-align: center; margin: 6px 0 14px; }
.big-banner.win { color: var(--gold2); text-shadow: 0 3px 0 #7a4d12, 2px 2px 0 #000; }
.big-banner.lose { color: #ff6a6a; text-shadow: 0 3px 0 #5a1010, 2px 2px 0 #000; }
.promo { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 10px 0; }
.promo img { width: 96px; height: 96px; }
.promo .arrow { font-family: var(--font-title); color: var(--gold2); font-size: 22px; }
.glow { animation: glowPulse 1s ease-in-out infinite; }
@keyframes glowPulse { 0%,100% { filter: drop-shadow(0 0 0 #ffe27a); } 50% { filter: drop-shadow(0 0 8px #ffe27a); } }

/* ---------- bestiario / listas ---------- */
.tabs { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.dex { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.dex-cell { background: var(--panel2); box-shadow: 0 0 0 2px var(--ink), inset 0 0 0 2px var(--line); display: flex; flex-direction: column; align-items: center; padding: 6px 4px; cursor: pointer; font-size: 13px; text-align: center; min-height: 104px; }
.dex-cell img { width: 64px; height: 64px; }
.dex-cell.unk { color: var(--muted); }
.ach { display: flex; gap: 12px; align-items: center; padding: 10px; background: var(--panel2); box-shadow: 0 0 0 2px var(--ink); margin-bottom: 8px; }
.ach img { width: 40px; height: 40px; }
.ach.locked { opacity: .5; }
.ach.locked img { filter: grayscale(1); }
.page { width: min(980px, 100%); margin: 0 auto; padding: 14px 12px 40px; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.page-head h1 { margin: 0; font-size: 16px; color: var(--gold2); flex: 1; }
.type-chart { border-collapse: collapse; font-size: 13px; }
.type-chart td, .type-chart th { width: 30px; height: 26px; text-align: center; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.type-chart .s { background: #2d6a2a; color: #cfffc8; font-weight: 700; }
.type-chart .w { background: #6a2a2a; color: #ffc8c8; }
.slider { width: 100%; accent-color: var(--gold); }
.setting { display: grid; grid-template-columns: 140px 1fr 46px; gap: 10px; align-items: center; margin: 10px 0; }
.help p { margin: 6px 0 12px; }
.pill { display: inline-block; padding: 2px 8px; background: rgba(0,0,0,.3); box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; }
.status-dot { display: inline-block; width: 8px; height: 8px; margin-right: 4px; box-shadow: 0 0 0 1px #000; }
.sep { height: 2px; background: var(--line); margin: 12px 0; opacity: .6; }

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  html, body { font-size: 15px; }
  .formation { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .frame { padding: 10px; }
  .hud { gap: 6px; padding: 6px 8px; }
  .hud .region { font-size: 15px; width: 100%; }
  .btn { font-size: 10px; }
  .modal-back { padding: 6px; }
  .setting { grid-template-columns: 100px 1fr 40px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition: none !important; }
}

/* ================= v2 ================= */
.num { font-family: var(--font); font-weight: 700; font-size: 14px; letter-spacing: 0; }
.meta.cls { color: #c8b8e0; font-size: 13px; margin-top: -2px; }
.trait { color: #ffcf8a; font-size: 13px; cursor: help; }
img.spr.big { position: relative; }
/* capa de textos del combate */
.bv-wrap { position: relative; }
.fx-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; font-family: var(--font-title); }
.ft { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; font-size: 1em; line-height: 1;
  text-shadow: 2px 0 0 #0a0610, -2px 0 0 #0a0610, 0 2px 0 #0a0610, 0 -2px 0 #0a0610, 2px 2px 0 #0a0610, -2px -2px 0 #0a0610, 2px -2px 0 #0a0610, -2px 2px 0 #0a0610;
  animation: ftUp 1.1s ease-out forwards; }
.ft.big { font-size: 1.5em; }
.ft.small { font-size: max(10px, 0.625em); }
.ft.name { font-size: max(10px, 0.625em); color: #ffd76a; }
@keyframes ftUp { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.8); } 12% { opacity: 1; transform: translate(-50%, -60%) scale(1.08); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -190%) scale(1); } }
.order-banner { position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%); font-size: 1.6em; color: #ffd76a; white-space: nowrap;
  text-shadow: 3px 3px 0 #2a1605, -2px 0 0 #2a1605, 2px 0 0 #2a1605, 0 -2px 0 #2a1605, 0 2px 0 #2a1605; animation: bannerIn 1.5s ease-out forwards; }
@keyframes bannerIn { 0% { opacity: 0; transform: translate(-50%, -50%) scale(2.2); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -70%) scale(1); } }
.unit-tip { position: absolute; z-index: 4; min-width: 150px; max-width: 240px; padding: 8px 10px; background: rgba(18,12,28,.95); box-shadow: 0 0 0 2px #0a0610, inset 0 0 0 2px var(--line);
  font-family: var(--font); font-size: 14px; line-height: 1.35; pointer-events: none; }
.unit-tip .num { font-size: 14px; }
/* barra del comandante */
.cmd-bar { display: flex; align-items: center; gap: 10px; padding: 6px 10px; background: #160f22; box-shadow: 0 -2px 0 var(--ink); flex-wrap: wrap; }
.cmd-bar .valor { display: flex; align-items: center; gap: 6px; min-width: 170px; }
.valor-lbl { font-family: var(--font-title); font-size: 10px; color: var(--gold2); }
.valor-bar { position: relative; flex: 1; height: 12px; min-width: 90px; background: #0a0610; box-shadow: 0 0 0 2px #000, inset 0 0 0 1px var(--line); }
.valor-bar > i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #b8862a, #ffd76a); transition: width .2s; }
.valor-num { font-size: 14px; color: var(--gold2); min-width: 28px; text-align: right; }
.cmd-bar.full .valor-bar { animation: valorGlow .8s ease-in-out infinite; }
@keyframes valorGlow { 50% { box-shadow: 0 0 0 2px #000, 0 0 10px 2px #ffd76a; } }
.cmd-bar .orders { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.btn.order { font-size: 10px; padding: 6px 8px 8px; }
.btn.order img { width: 18px; height: 18px; }
.cmd-bar.full .btn.order:not(:disabled) { background: #b8862a; color: #fff8e6; animation: orderPulse 1s ease-in-out infinite; }
@keyframes orderPulse { 50% { filter: brightness(1.3); } }
.btn.small-btn { font-size: 10px; padding: 6px 8px 8px; }
/* sendas, gestas y crónica */
.senda { display: flex; gap: 10px; align-items: center; padding: 8px; background: rgba(0,0,0,.22); box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 6px; }
.senda.met { box-shadow: inset 0 0 0 2px #4a8a3a; }
.deeds { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 12px; }
.deed { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; border-bottom: 1px dotted rgba(255,255,255,.08); padding: 2px 0; }
.deed .num { font-size: 15px; color: var(--gold2); }
.chron-entry { padding: 8px 10px; margin-bottom: 6px; background: rgba(0,0,0,.2); box-shadow: inset 3px 0 0 var(--line); font-size: 15px; }
.chron-entry.k-jefe, .chron-entry.k-final { box-shadow: inset 3px 0 0 var(--gold); }
.chron-entry.k-caida { box-shadow: inset 3px 0 0 var(--red); }
.chron-entry.k-ascenso { box-shadow: inset 3px 0 0 #9a6ad0; }
.chron-entry.k-hermandad { box-shadow: inset 3px 0 0 #ffb0c8; }
@media (max-width: 640px) {
  .cmd-bar .valor { min-width: 100%; }
  .cmd-bar .orders { display: grid; grid-template-columns: 1fr 1fr; flex: 1 1 100%; }
  .btn.order { font-size: 8px; justify-content: center; text-align: center; }
  .cmd-bar .small-btn { flex: 1 1 100%; }
}

.bonds-box { margin-top: 10px; padding: 8px 12px; }
.bond-mark { color: #ff8fb0; font-family: var(--font-title); font-size: 10px; }
.bond-mark.l2 { color: #ff4f7a; }
/* cifras dentro de botones (fuente de título): Silkscreen a la altura de las mayúsculas de Press Start 2P */
.dg { font-family: 'Silkscreen', var(--font); font-weight: 700; font-size: 1.45em; line-height: 0; letter-spacing: 0; vertical-align: -0.04em; }
/* v3: habilidad única con nivel, objeto en tarjetas */
.ab-pips { display: inline-flex; gap: 1px; font-size: 14px; line-height: 1; letter-spacing: 0; }
.ab-pips i { font-style: normal; color: #5a4a70; }
.ab-pips i.on { color: #ffd76a; text-shadow: 0 0 4px rgba(255, 200, 80, .5); }
.abil.sig { box-shadow: inset 0 0 0 2px #6a4a9a; background: rgba(90, 60, 140, .14); }
.next-lvl { color: #b8a8d8; margin-top: 4px; }
.card-item { margin-top: 4px; padding: 3px 6px; background: rgba(0,0,0,.25); box-shadow: inset 0 0 0 1px var(--line); color: #e8d8a8; }
.card-item.none { color: var(--muted); font-style: italic; }
.equip-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.equip-row { display: grid; grid-template-columns: 56px 140px 1fr auto; gap: 10px; align-items: center; padding: 6px 8px; background: rgba(0,0,0,.22); box-shadow: inset 0 0 0 1px var(--line); }
.equip-who b { display: block; }
.equip-slot { display: flex; gap: 8px; align-items: center; padding: 6px 8px; background: rgba(255, 215, 106, .06); box-shadow: inset 0 0 0 2px #6a5530; min-height: 44px; }
.equip-slot.empty { background: rgba(0,0,0,.2); box-shadow: inset 0 0 0 2px dashed; box-shadow: inset 0 0 0 1px var(--line); }
.slot-empty { width: 32px; text-align: center; color: var(--muted); }
.mini-spr, .slot { position: relative; }
.item-badge { position: absolute; right: -2px; top: -2px; background: #1a1226; box-shadow: 0 0 0 1px #6a5530; line-height: 0; padding: 1px; }
@media (max-width: 640px) { .equip-row { grid-template-columns: 48px 1fr; } .equip-row .equip-slot { grid-column: 1 / -1; } .equip-row > .col { grid-column: 1 / -1; flex-direction: row; } }
/* dificultad */
.diff-card.sel { box-shadow: 0 0 0 2px var(--ink), inset 0 0 0 3px var(--dc, #ffd76a); }
.diff-tag { font-weight: 700; font-size: 14px; padding: 2px 8px; background: rgba(0,0,0,.35); }
/* previsión de experiencia */
.xp-preview { margin-top: 4px; display: flex; gap: 8px; align-items: center; color: #8af07a; }
.xp-lbl { font-size: 13px; padding: 1px 6px; background: rgba(138, 240, 122, .12); box-shadow: inset 0 0 0 1px #4a8a3a; color: #bff5b5; }
/* resultados: subida de nivel */
.xp-head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: center; margin: 6px 0 4px; font-weight: 700; color: #e8f8e0; }
.xp-kind { font-size: 13px; padding: 2px 8px; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px var(--line); color: #d8d0e8; }
.xp-kind.elite { color: #ffb070; box-shadow: inset 0 0 0 1px #b06a2a; }
.xp-kind.boss { color: #ff7a6a; box-shadow: inset 0 0 0 1px #b03a2a; }
.lv-line { align-items: center; margin-top: 2px; }
.lv-from { font-size: 15px; color: #c8b8e0; }
.lv-arrow { color: #8af07a; font-weight: 700; }
.lv-to { font-size: 22px; color: #8af07a; min-width: 30px; text-shadow: 0 0 6px rgba(138, 240, 122, .45); }
.lv-badge { font-family: var(--font); font-weight: 700; font-size: 16px; color: #1a1026; background: #8af07a; padding: 4px 8px; box-shadow: 0 0 0 2px #0a0610; white-space: nowrap; }
.lv-badge.none { background: transparent; color: var(--muted); box-shadow: none; font-weight: 400; font-size: 13px; }
.lv-badge.done { animation: lvPop .5s ease-out; }
.xp-row.ding { animation: lvDing .45s ease-out; }
.xp-anim { height: 10px; }
@keyframes lvDing { 0% { background: rgba(138, 240, 122, .35); } 100% { background: transparent; } }
@keyframes lvPop { 0% { transform: scale(1.5); } 100% { transform: scale(1); } }
.xp-preview.center { justify-content: center; margin: 8px 0 0; }
