/* Estilos de los sistemas roguelite: inventario, Guarida, santuarios, progreso y barras de scroll. */

/* ---------- barras de scroll con la identidad (sin la barra gris de Windows) ---------- */
* { scrollbar-width: thin; scrollbar-color: rgba(244,114,182,.55) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, rgba(244,114,182,.7), rgba(34,211,238,.7)); border-radius: 8px; }
::-webkit-scrollbar-corner { background: transparent; }
.stats-overlay .panel { overflow: hidden; max-height: 98vh; }
.stats-wrap table.stats tbody { display: grid; grid-template-columns: 1fr 1fr; column-gap: 10px; }
.stats-wrap table.stats tr { display: flex; justify-content: space-between; gap: 6px; border-bottom: 1px solid rgba(38,45,61,.6); }
.stats-wrap { grid-template-columns: 380px minmax(0, 1fr) !important; }
@media (max-width: 900px) { .stats-wrap { grid-template-columns: 1fr !important; } }

/* ---------- santuario (cartas) ---------- */
.shard-fx.good b { color: #86efac; }
.shard-fx.bad b { color: #fca5a5; }

/* ---------- inventario ---------- */
.inventory { width: min(1180px, 100%); }
.inv-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; }
@media (max-width: 900px) { .inv-grid { grid-template-columns: 1fr; } }
.relic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 8px; }
.relic-card { background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(0,0,0,.2)); border: 1.5px solid color-mix(in srgb, var(--c) 60%, transparent); border-radius: 3px 12px 3px 12px; padding: 7px 9px; cursor: pointer; font-size: 12px; transition: transform .1s, box-shadow .1s; }
.relic-card:hover { transform: translateY(-2px); box-shadow: 0 0 16px -6px var(--c); }
.relic-card.sel { box-shadow: 0 0 0 2px var(--c), 0 0 20px -4px var(--c); }
.relic-card.picked { outline: 2px dashed #fde047; outline-offset: 2px; }
.relic-card ul { margin: 4px 0 0; padding-left: 16px; }
.relic-top { display: flex; gap: 8px; align-items: center; }
.relic-icon { width: 34px; height: 34px; flex: none; }
.relic-rar { font-size: 9px; letter-spacing: 1.5px; font-weight: 900; }
.relic-tags { display: flex; gap: 6px; font-size: 10px; font-weight: 700; }
.inv-actions { justify-content: flex-start; align-items: center; }
.res-legend { display: flex; gap: 10px; margin-bottom: 6px; color: #94a3b8; text-transform: capitalize; }
.res-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.res-row { display: flex; gap: 10px; align-items: flex-start; padding: 6px 8px; margin-bottom: 6px; border-left: 3px solid rgba(100,116,139,.4); background: rgba(2,6,16,.35); border-radius: 0 10px 10px 0; }
.res-row.on { border-left-color: var(--c); background: linear-gradient(90deg, color-mix(in srgb, var(--c) 14%, transparent), rgba(2,6,16,.35)); }
.res-icon { width: 30px; height: 30px; flex: none; }
.res-main { flex: 1; min-width: 0; }
.res-head { display: flex; justify-content: space-between; font-size: 12px; }
.res-head b { color: var(--c); }
.res-bar { position: relative; display: flex; gap: 2px; height: 8px; background: #111827; border-radius: 4px; margin: 4px 0; overflow: hidden; }
.res-bar i { display: block; height: 100%; border-radius: 4px; }
.res-bar em { position: absolute; top: 0; bottom: 0; width: 2px; background: rgba(255,255,255,.55); }
.res-fx { font-size: 11px; line-height: 1.35; }
.res-fx .ok { color: #e2e8f0; }
.res-fx .no { color: #64748b; }

/* ---------- guarida ---------- */
.lair { width: min(1180px, 100%); }
.lair-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.lair-head h2 { margin: 0; }
.lair-acc { display: flex; align-items: center; gap: 8px; min-width: 260px; }
.lair-bar { position: relative; display: inline-block; flex: 1; min-width: 120px; height: 12px; background: #0f172a; border: 1px solid #1e293b; border-radius: 6px; overflow: hidden; vertical-align: middle; }
.lair-bar i { display: block; height: 100%; }
.lair-bar span { position: absolute; inset: 0; font-size: 9px; font-weight: 800; text-align: center; line-height: 11px; color: #f8fafc; text-shadow: 0 1px 2px #000; }
.mat-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.mat-chip { font-size: 12px; padding: 3px 9px; border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); border-radius: 999px; background: rgba(2,6,16,.5); }
.mat-chip i { display: inline-block; width: 8px; height: 8px; background: var(--c); transform: rotate(45deg); margin-right: 6px; }
.lair-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.lair-card { background: rgba(2,6,16,.45); border: 1.5px solid color-mix(in srgb, var(--c) 45%, transparent); border-radius: 4px 16px 4px 16px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.lair-card.sel { box-shadow: 0 0 0 2px var(--c), 0 0 24px -8px var(--c); }
.lair-card.off { opacity: .45; filter: grayscale(.7); }
.lair-card-head { display: flex; gap: 10px; align-items: center; }
.lair-card .row-btns { margin-top: auto; justify-content: space-between; align-items: center; }
.lvl-list { margin: 0; padding-left: 16px; font-size: 11px; color: #64748b; }
.lvl-list li.ok { color: #a7f3d0; }
.lvl-list li.next { color: #fde68a; }
.pips { display: inline-flex; gap: 3px; vertical-align: middle; }
.pips i { width: 12px; height: 5px; background: #1f2937; border-radius: 2px; display: inline-block; }
.pips i.on { background: linear-gradient(90deg, var(--neon-a), var(--neon-b)); }
.cost { font-size: 11px; color: #fde68a; }
.cost.no { color: #f87171; }
.reward-track { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.reward { font-size: 11px; padding: 6px 8px; border: 1px dashed #334155; border-radius: 8px; color: #64748b; display: flex; flex-direction: column; }
.reward.got { border-style: solid; border-color: #4ade80; color: #d1fae5; }
.forge { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; }
@media (max-width: 900px) { .forge { grid-template-columns: 1fr; } }
.tal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.tal-card { border: 1.5px solid color-mix(in srgb, var(--c) 55%, transparent); border-radius: 3px 12px 3px 12px; padding: 7px 9px; background: rgba(2,6,16,.45); cursor: pointer; font-size: 12px; }
.tal-card.sel { box-shadow: 0 0 0 2px var(--c); }
.tal-card.eq { background: linear-gradient(180deg, color-mix(in srgb, var(--c) 12%, transparent), rgba(2,6,16,.45)); }
.tal-head { display: flex; gap: 8px; align-items: center; }
.tal-aff { margin: 4px 0 0; padding-left: 16px; color: #cbd5e1; }
.forge-craft .chips { margin: 6px 0; }
.pact-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 8px; }
.pact { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 8px 10px; border: 1px solid rgba(239,68,68,.35); border-radius: 4px 14px 4px 14px; background: rgba(69,10,10,.18); }
.pact .muted { grid-column: 1; }
.pact-ctl { grid-column: 2; grid-row: 1 / span 2; display: flex; align-items: center; gap: 6px; }
.pact .pips i.on { background: linear-gradient(90deg, #ef4444, #f97316); }
.btn.danger { color: #fca5a5; }

/* ---------- menú: progreso ---------- */
.menu-prog { margin-top: 10px; padding: 8px 10px; border: 1px solid rgba(244,114,182,.3); border-radius: 4px 14px 4px 14px; background: rgba(2,6,16,.4); display: flex; flex-direction: column; gap: 5px; }
.mp-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.mp-row b { min-width: 150px; }
.lair-btn { border-color: var(--neon-a) !important; color: #fbcfe8; }

/* ---------- fin de partida ---------- */
.meta-rewards { margin: 10px 0; padding: 10px 12px; border: 1px solid rgba(34,211,238,.3); border-radius: 4px 16px 4px 16px; background: rgba(8,47,73,.18); }
.chip-stat.done { background: rgba(22,101,52,.3); }

/* menú: 4 botones (Guarida, Mejoras, Historial, Códice) sin desbordar */
.menu-actions { flex-wrap: wrap; }
.menu-actions .btn.ghost { flex: 1 1 auto; }

/* ---------- pool de arsenal y pasivas ---------- */
.pool { margin-top: 6px; }
.pool h4 { margin: 8px 0 4px; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: #94a3b8; }
.pool-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; font-size: 11px; color: #cbd5e1; }
.pool-legend { color: #64748b; }
.pool-legend .lg { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin: 0 3px 0 8px; vertical-align: -1px; }
.lg.owned { background: #fbbf24; }
.lg.possible { background: #22d3ee; }
.lg.blocked { background: #334155; }
.pool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px; }
.pool.compact .pool-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 3px; }
.pool-tile { position: relative; display: flex; align-items: center; gap: 6px; padding: 3px 6px 3px 3px; border: 1px solid rgba(100,116,139,.35); border-radius: 3px 9px 3px 9px; background: rgba(2,6,16,.45); font-size: 11px; min-width: 0; }
.pool-tile.owned { border-color: #fbbf24; background: linear-gradient(90deg, rgba(251,191,36,.16), rgba(2,6,16,.45)); box-shadow: 0 0 10px -5px #fbbf24; }
.pool-tile.owned.sig { border-color: var(--c); }
.pool-tile.possible { border-color: rgba(34,211,238,.45); }
.pool-tile.blocked { opacity: .38; filter: grayscale(.85); }
.pool-icon { width: 24px; height: 24px; flex: none; }
.pool.compact .pool-icon { width: 20px; height: 20px; }
.pool-name { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.1; }
.pool-name b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
.pool-name small { color: #64748b; font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pool.compact .pool-name small { display: none; }
.pool-el { position: absolute; left: 2px; top: 2px; width: 6px; height: 6px; border-radius: 50%; }
.pool-p { position: relative; font-size: 10px; font-weight: 900; color: #a5f3fc; min-width: 34px; text-align: right; }
.pool-p::after { content: ''; position: absolute; left: 0; right: 0; bottom: -3px; height: 2px; background: linear-gradient(90deg, #22d3ee var(--w), rgba(34,211,238,.12) var(--w)); }
.pool-p.off { color: #fbbf24; }
.pool-p.off::after { display: none; }
.pool-syn { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 6px; font-size: 12px; }
@media (max-width: 900px) { .pool-syn { grid-template-columns: 1fr; } }
.pool-syn ul { margin: 0; padding-left: 16px; }
.pool-syn li { margin: 2px 0; }
.pool-syn li small { color: #94a3b8; }
.syn-ready span { color: #fbbf24; font-weight: 800; }
.syn-building span { color: #86efac; }
.syn-half span { color: #94a3b8; }
.pool-btn.on { border-color: #22d3ee !important; color: #a5f3fc; }
.panel.choices .pool { border-top: 1px solid rgba(34,211,238,.25); padding-top: 8px; }
