/* ===== Crónica, vídeo y biografía (historia.js) ===== */
.hi-play {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px 2px 6px; border: 2px solid #000; border-radius: 999px;
  background: var(--red); color: #fff; font-size: 12px; font-weight: 800; text-decoration: none; box-shadow: 2px 2px 0 #000;
  transition: translate .2s var(--bounce), box-shadow .2s;
}
.hi-play span { display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: #fff; color: var(--red); font-size: 8px; padding-left: 1px; }
.hi-play:hover { translate: -1px -2px; box-shadow: 3px 4px 0 #000; }
.hi-play:focus-visible, .hi-bio:focus-visible, .hi-bio-link:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.hi-bio-link { border: 2px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px; font: 800 12px/1 var(--f-body); padding: 4px 10px; cursor: pointer; }
.hi-bio-link:hover { background: var(--sun); color: #000; }

/* Botón de historia sobre cartas, registro y tumbas */
.hi-bio {
  position: absolute; z-index: 7; top: 8px; right: 8px; width: 32px; height: 32px; display: grid; place-items: center; padding: 0;
  border: 2px solid #000; border-radius: 50%; background: var(--sun); color: #fff; cursor: pointer; box-shadow: 2px 2px 0 #000;
  transition: scale .25s var(--bounce), rotate .25s var(--bounce);
}
.hi-bio svg { width: 19px; height: 19px; }
.hi-bio:hover { scale: 1.15; rotate: -8deg; }
.catch[data-uid] { position: relative; }
.catch .hi-bio { top: 50%; translate: 0 -50%; right: 6px; width: 28px; height: 28px; }
.catch--sol .hi-bio { right: auto; left: 6px; }
.tomb .hi-bio { top: auto; bottom: 34px; right: -6px; }
.hi-tombplay { position: absolute; z-index: 4; left: 50%; bottom: -44px; translate: -50% 0; white-space: nowrap; opacity: 0; transition: opacity .25s; }
.tomb:hover .hi-tombplay, .tomb:focus-within .hi-tombplay, .tomb.is-open .hi-tombplay { opacity: 1; }
@media (hover: none) { .hi-tombplay { opacity: 1; } }

/* ----- Crónica ----- */
.cr__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 14px; }
.cr__key { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; cursor: pointer; }
.cr__key input { width: 20px; height: 20px; accent-color: var(--red); }
.cr__nav { margin-left: auto; display: flex; gap: 6px; }
.cr__nav button { width: 38px; height: 38px; border: var(--stroke); border-radius: 50%; background: var(--surface); color: var(--text); font: 400 22px/1 var(--f-display); cursor: pointer; box-shadow: 3px 3px 0 var(--line); }
.cr__nav button:hover { background: var(--sun); color: #000; }
.cr__scroll { overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; padding: 6px 4px 16px; border-radius: 16px; outline: none; scrollbar-width: thin; }
.cr__scroll:focus-visible { outline: 3px solid var(--sun); }
.cr__track { position: relative; display: flex; gap: 14px; margin: 0; padding: 0 0 0; list-style: none; width: max-content; }
.cr__track::before { content: ""; position: absolute; left: 0; right: 0; top: 22px; height: 6px; border-radius: 99px; background: var(--track, var(--card)); border: 2px solid var(--line); z-index: 0; }
.cr__ep { position: relative; z-index: 1; width: 236px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 8px; }
.cr__head { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 10px 6px 12px; background: var(--surface); border: var(--stroke); border-radius: 999px; box-shadow: 3px 3px 0 var(--line); }
.cr__head b { font: 400 20px/1 var(--f-display); }
.cr__ep.has-key .cr__head { background: var(--sun); color: #000; }
.cr__ep.is-last .cr__head { background: var(--red); color: #fff; }
.cr__hps { display: flex; gap: 4px; }
.cr__hp { font-size: 12px; font-weight: 800; padding: 1px 6px; border-radius: 999px; border: 2px solid #000; color: #fff; text-shadow: 0 1px 0 #000; }
.cr__hp--sol { background: var(--grad-sol); }
.cr__hp--luna { background: var(--grad-luna); }
.cr__swing { display: flex; flex-wrap: wrap; gap: 4px; }
.cr__lost { font-size: 11px; font-weight: 800; padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--red) 18%, var(--surface)); border: 2px dashed var(--red); }
.cr__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cr__ev { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; background: var(--surface); border: 2px solid var(--line); border-radius: 14px; box-shadow: 3px 3px 0 var(--line); }
.cr__ev--sol { border-left: 7px solid var(--c-sol); }
.cr__ev--luna { border-left: 7px solid var(--c-luna); }
.cr__ev.is-key { border-width: 3px; border-left-width: 9px; background: linear-gradient(160deg, var(--surface) 60%, color-mix(in srgb, var(--sun) 30%, var(--surface))); }
.cr__ev--muerte { background: color-mix(in srgb, #000 8%, var(--surface)); }
.cr__ico { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; border: 2px solid #000; background: var(--card); font-size: 13px; font-weight: 800; }
.cr__ev--muerte .cr__ico { background: #2a2a2a; color: #fff; }
.cr__ev--evolucion .cr__ico { background: var(--sun); color: #000; }
.cr__ev--vida .cr__ico { background: var(--red); color: #fff; }
.cr__ev--medalla .cr__ico { background: #ffd34d; color: #000; }
.cr__ev--pvp .cr__ico { background: var(--teal); color: #000; }
.cr__art { flex: none; width: 54px; height: 54px; object-fit: contain; filter: drop-shadow(2px 2px 0 rgba(0,0,0,.35)); }
.cr__ev--muerte .cr__art { filter: grayscale(1) drop-shadow(2px 2px 0 rgba(0,0,0,.35)); }
.cr__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cr__who { font-size: 11px; font-weight: 800; color: var(--text-mute); text-transform: uppercase; letter-spacing: .04em; }
.cr__txt { font-size: 14px; line-height: 1.3; font-weight: 600; }
.cr__ev.is-key .cr__txt { font-weight: 800; }
.cr__acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; }
.cr__none { font-size: 13px; color: var(--text-mute); padding: 6px 12px; border: 2px dashed var(--dash, var(--line)); border-radius: 12px; }
.js [data-mount="cronica"]:not(.is-in) .cr__ep { opacity: 0; translate: 0 24px; }
[data-mount="cronica"].is-in .cr__ep { animation: cr-in .5s calc(var(--i) * 40ms) var(--bounce) both; }
@keyframes cr-in { from { opacity: 0; translate: 0 24px; } }
@media (max-width: 720px) {
  .cr__ep { width: 76vw; }
  .cr__nav { margin-left: 0; }
}

/* ----- Biografía ----- */
.bio {
  width: min(560px, calc(100% - 24px)); max-height: calc(100dvh - 40px); padding: 22px 22px 18px; overflow: auto;
  border: var(--stroke); border-radius: 24px; background: var(--surface); color: var(--text); box-shadow: 8px 8px 0 #000;
}
.bio::backdrop { background: rgba(10, 12, 30, .55); backdrop-filter: blur(3px); }
.bio__x { position: sticky; top: 0; float: right; margin: -6px -6px 0 0; z-index: 3; }
.bio__x button { width: 38px; height: 38px; border-radius: 50%; border: var(--stroke); background: var(--surface); color: var(--text); font-size: 16px; font-weight: 800; cursor: pointer; box-shadow: 2px 2px 0 #000; }
.bio__x button:hover { background: var(--red); color: #fff; }
.bio__head { display: flex; gap: 16px; align-items: center; }
.bio__pic { flex: none; width: 128px; height: 128px; border-radius: 50%; border: var(--stroke); display: grid; place-items: center; box-shadow: 4px 4px 0 #000; }
.bio--sol .bio__pic { background: var(--grad-sol); }
.bio--luna .bio__pic { background: var(--grad-luna); }
.bio__pic img { width: 120%; max-width: none; filter: drop-shadow(3px 3px 0 rgba(0,0,0,.5)); animation: bio-float 3s ease-in-out infinite; }
.bio--dead .bio__pic { background: linear-gradient(160deg, #b9bfcc, #6d7386); }
.bio--dead .bio__pic img { filter: grayscale(1) drop-shadow(3px 3px 0 rgba(0,0,0,.5)); }
@keyframes bio-float { 50% { translate: 0 -6px; } }
.bio__owner { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.bio--sol .bio__owner { color: var(--name-sol); }
.bio--luna .bio__owner { color: var(--name-luna); }
.bio__name { margin: 2px 0; font: 400 clamp(30px, 6vw, 40px)/1 var(--f-display); }
.bio__sp { margin: 0 0 6px; color: var(--text-soft); font-weight: 600; }
.bio__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bio__nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 18px 0 14px; }
.bio__nums span { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px 4px; border: 2px solid var(--line); border-radius: 14px; background: var(--card); }
.bio__nums b { font: 400 20px/1.1 var(--f-display); }
.bio__nums small { font-size: 11px; color: var(--text-soft); font-weight: 700; }
.bio__chain { display: flex; align-items: center; justify-content: center; gap: 4px; list-style: none; margin: 0 0 8px; padding: 0; }
.bio__chain li { position: relative; display: flex; flex-direction: column; align-items: center; width: 96px; text-align: center; animation: cr-in .5s calc(var(--i) * 120ms + .15s) var(--bounce) both; }
.bio__chain li + li::before { content: "➜"; position: absolute; left: -12px; top: 26px; font-size: 18px; color: var(--text-mute); }
.bio__chain img { width: 64px; height: 64px; object-fit: contain; }
.bio__chain span { font-weight: 800; font-size: 13px; }
.bio__chain small { font-size: 11px; color: var(--text-mute); }
.bio__lv { width: 100%; height: 76px; margin: 4px 0 6px; overflow: visible; }
.bio__lv polyline { fill: none; stroke: var(--red); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.bio--luna .bio__lv polyline { stroke: var(--c-luna); }
.bio--sol .bio__lv polyline { stroke: var(--c-sol); }
.bio__lv circle { fill: var(--surface); stroke: var(--text); stroke-width: 2.5; }
.bio__lv text { font: 800 12px var(--f-body); fill: var(--text); }
.bio__h { margin: 6px 0 8px; font: 400 22px/1 var(--f-display); }
.bio__tl { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 4px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.bio__it { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; animation: cr-in .45s calc(var(--i) * 60ms + .2s) var(--bounce) both; }
.bio__it::before { content: ""; position: absolute; left: -28px; top: 3px; width: 16px; height: 16px; border-radius: 50%; border: 3px solid #000; background: var(--surface); }
.bio__it--captura::before { background: var(--red); }
.bio__it--evolucion::before { background: var(--sun); }
.bio__it--equipo::before { background: var(--teal); }
.bio__it--muerte::before { background: #2a2a2a; }
.bio__it--hoy::before { background: var(--teal); animation: beat 1.6s ease-in-out infinite; }
.bio__ep { font: 400 15px/1 var(--f-display); min-width: 52px; }
.bio__txt { font-weight: 600; font-size: 14px; flex: 1 1 160px; }
.bio__rip { margin: 14px 0 0; padding: 10px 12px; border-radius: 14px; background: #2a2a35; color: #eef; font-weight: 700; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
@media (max-width: 520px) {
  .bio { padding: 18px 14px 14px; }
  .bio__head { flex-direction: column; text-align: center; }
  .bio__chips { justify-content: center; }
  .bio__pic { width: 108px; height: 108px; }
  .bio__nums { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .bio__pic img, .bio__it, .bio__chain li, [data-mount="cronica"].is-in .cr__ep, .bio__it--hoy::before { animation: none !important; }
  .js [data-mount="cronica"]:not(.is-in) .cr__ep { opacity: 1; translate: none; }
}
