/* ---------- niveles: pestañas Inventario / Estadísticas / Habilidades dentro del panel #inv (módulo NIVEL) ---------- */
/* el título queda para lectores de pantalla; lo que se ve son las pestañas */
#inv.conTabs .invHead h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nivTabs { display: flex; gap: 4px; flex-wrap: wrap; }
.nivTabs button { background: transparent; border: 0; border-bottom: 3px solid transparent; border-radius: 0; min-height: 0; padding: 4px 12px 8px; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; color: #8A7272; display: inline-flex; align-items: center; gap: 8px; }
.nivTabs button:first-child { padding-left: 0; }
.nivTabs button:hover { background: transparent; color: #E0B2B2; }
.nivTabs button.on { color: #F2ECEC; border-bottom-color: #C8402D; }
#inv .nivTabs .nivDot { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px; box-sizing: border-box; border-radius: 10px; background: #FFD98A; color: #111111; font-size: 12px; font-weight: 800; letter-spacing: 0; }
#inv.tabEst .invBody, #inv.tabHab .invBody, #inv.tabEst #invHelp, #inv.tabHab #invHelp, #inv.tabEst #invMsg, #inv.tabHab #invMsg { display: none; }
.nivPane { display: flex; flex-direction: column; gap: 16px; }

/* arriba: nivel, experiencia y puntos */
.nivTop { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px 20px; background: #111111; border: 1px solid #2E2525; border-radius: 12px; padding: 14px 18px; }
.nivLvl { display: flex; flex-direction: column; }
.nivLvl b { font-size: 22px; color: #FFD98A; }
.nivLvl span { font-size: 13px; color: #E0B2B2; }
.nivXp { height: 12px; background: #2A2020; border-radius: 6px; overflow: hidden; }
.nivXp i { display: block; height: 100%; background: #E0B2B2; }
.nivPts { display: flex; flex-direction: column; align-items: flex-end; font-size: 14px; color: #8A7272; font-weight: 700; }
.nivPts span.on { color: #FFD98A; }
.nivCols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.card .nivMsg { min-height: 20px; margin: auto 0 0; font-size: 14px; color: #FF8D71; }

/* estadísticas: atributos */
.nivAttrs { display: grid; gap: 8px; }
.nivAttr { display: grid; grid-template-columns: 10px 1fr 48px; align-items: center; gap: 14px; background: #211919; border: 2px solid #2E2525; border-radius: 12px; padding: 10px 10px 10px 14px; cursor: pointer; }
.nivAttr:hover { background: #2A2020; }
.nivAttr.sel { border-color: #FFD98A; background: #2A2020; }
.nivAttr .sw { width: 10px; height: 36px; border-radius: 3px; }
.nivAttr h3 { margin: 0; font-size: 18px; display: flex; justify-content: space-between; gap: 12px; }
.nivAttr h3 b { color: #FFD98A; }
.card .nivAttr p { margin: 2px 0 0; font-size: 13px; color: #E0B2B2; line-height: 1.35; }
.nivPlus { width: 48px; height: 48px; min-height: 0; padding: 0; font-size: 26px; line-height: 1; border-radius: 10px; }
.nivSum { background: #111111; border: 1px solid #2E2525; border-radius: 12px; padding: 14px 16px; }
.nivSum h2, .nivRama h2 { margin: 0 0 10px; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #E0B2B2; }

/* habilidades: tres ramas con tres escalones unidos por una línea */
.nivTree { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.nivRama { display: flex; flex-direction: column; align-items: center; background: #111111; border: 1px solid #2E2525; border-radius: 12px; padding: 14px 10px 18px; }
.nivRama h2 { color: var(--c); margin-bottom: 0; }
.nivSimbolo { width: 40px; height: 40px; margin-bottom: 6px; }
.card .nivRama .sub { font-size: 12px; color: #8A7272; margin: 0 0 12px; }
.nivNodo { position: relative; width: 72px; height: 72px; min-height: 0; padding: 0; margin-top: 26px; border-radius: 14px; background: #211919; border: 2px solid #2E2525; display: flex; align-items: center; justify-content: center; }
.nivNodo:first-of-type { margin-top: 0; }
.nivNodo + .nivNodo::before { content: ''; position: absolute; left: 50%; top: -28px; width: 4px; height: 24px; margin-left: -2px; background: #2E2525; }
.nivNodo.on + .nivNodo.on::before { background: var(--c); }
.nivNodo:hover { background: #2A2020; border-color: #3A3030; }
.nivNodo.on { border-color: var(--c); }
.nivNodo.act { border-radius: 50%; }
.nivNodo.sel, .nivNodo.sel:hover { border-color: #FFD98A; background: #2A2020; box-shadow: 0 0 0 3px rgba(255,217,138,.18); }
.nivNodo.lock svg { opacity: .5; }
.nivNodo svg { width: 42px; height: 42px; pointer-events: none; }
.nivNodo .rk { position: absolute; right: -6px; bottom: -8px; font-size: 12px; font-weight: 800; background: #161111; border: 1px solid #2E2525; border-radius: 8px; padding: 1px 6px; color: #F2ECEC; pointer-events: none; }
.nivNodo.on .rk { color: #FFD98A; }
.nivDet { background: #111111; border: 1px solid #2E2525; border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 8px; min-height: 250px; box-sizing: border-box; }
.nivDet h3 { margin: 0; font-size: 20px; }
.card .nivDet .meta { font-size: 13px; color: #8A7272; margin: 0 0 4px; }
.card .nivDet p { font-size: 15px; color: #F2ECEC; }
.nivDet .lab { display: inline-block; min-width: 72px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #E0B2B2; }
.card .nivDet .req { font-size: 14px; color: #FF8D71; }
.card .nivDet .req.ok { color: #FFD98A; }
.nivGo { margin-top: auto; min-height: 44px; padding: 10px 16px; background: #2A2020; border-color: #3A3030; }
.nivGo.primary { background: #9C2315; border-color: #9C2315; }

/* 2 jugadores: el panel es más chico (escalado) igual que el inventario */
@media (max-width: 760px) { .nivCols { grid-template-columns: 1fr; } .nivTop { grid-template-columns: 1fr; } .nivPts { align-items: flex-start; } .nivTree { gap: 8px; } .nivNodo { width: 60px; height: 60px; } }
