/* N1.5.3 ventana Estadísticas: disposición de las capturas reales image (13) + image (8). */
.hud-overlay.statistics-overlay {padding:8px 14px 14px;align-items:center;}
.hud-dialog.statistics-dialog {width:min(1500px,calc(100vw - 20px));height:min(96vh,990px);max-height:calc(100vh - 14px);border-radius:10px;}
.statistics-dialog .hud-dialog-header {padding:9px 17px 12px;flex:0 0 auto;}
.statistics-dialog .hud-dialog-header h2 {font:700 clamp(24px,2.4vw,34px) Georgia,serif;text-transform:uppercase;color:var(--hud-gold);}
.statistics-dialog .hud-dialog-content {flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;padding:11px 14px 20px;scrollbar-color:var(--hud-gold-muted) var(--hud-black);scrollbar-width:thin;}
.statistics-frame {min-width:0;color:var(--hud-gold);}
.statistics-profile {display:grid;grid-template-columns:90px minmax(0,1fr) minmax(155px,210px);align-items:center;gap:12px;padding:11px 13px;border:1px solid var(--hud-gold-muted);border-radius:9px;min-height:122px;background:var(--hud-black-soft);}
.statistics-avatar {display:grid;place-items:center;border:1px solid var(--hud-gold-muted);border-radius:12px;height:100px;overflow:hidden;}
.statistics-avatar img {height:96px;max-width:100%;object-fit:contain;}
.statistics-character-identity small {font:700 10px Georgia,serif;letter-spacing:.07em;color:var(--hud-gold-muted);}
.statistics-character-identity h3 {font:700 clamp(21px,2vw,30px) Georgia,serif;color:var(--hud-gold);margin:2px 0;overflow-wrap:anywhere;}
.statistics-character-identity p {font:12px Georgia,serif;margin:5px 0;}
.statistics-progress {display:flex;flex-direction:column;gap:8px;text-align:center;padding:12px 8px;border:1px solid var(--hud-gold-muted);border-radius:8px;}
.statistics-progress strong {font:700 21px Georgia,serif;color:var(--hud-gold);}
.statistics-progress small {font:11px Georgia,serif;}
.statistics-subheading {display:flex;gap:12px;align-items:baseline;flex-wrap:wrap;padding:14px 2px 10px;border-bottom:1px solid var(--hud-gold-muted);}
.statistics-subheading h3,.statistics-main-header h3 {font:700 19px Georgia,serif;color:var(--hud-gold);margin:0;}
.statistics-subheading p {font:11px Georgia,serif;margin:0;}
.statistics-main-section {border:1px solid var(--hud-gold-muted);padding:13px;margin-top:10px;border-radius:6px;background:var(--hud-black-soft);}
.statistics-main-header {display:flex;align-items:center;justify-content:space-between;gap:8px;padding-bottom:11px;}
.statistics-points-badge {font:700 12px Georgia,serif;border:1px solid var(--hud-gold-muted);padding:6px 12px;border-radius:18px;}
.statistics-main-grid {display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px;}
.statistics-main-card {display:flex;align-items:center;gap:8px;padding:10px 7px;border:1px solid var(--hud-gold-muted);border-radius:7px;background:var(--hud-black);min-width:0;min-height:84px;}
.characteristic-icon {object-fit:contain;display:block;flex-shrink:0;}
.statistics-main-icon {width:clamp(37px,3.8vw,54px);height:clamp(37px,3.8vw,54px);}
.statistics-main-label {display:flex;flex:1;min-width:0;flex-direction:column;gap:5px;}
.statistics-main-label strong {font:800 clamp(12px,1.0vw,16px)/1.2 Georgia,serif;overflow-wrap:anywhere;color:var(--hud-gold);}
.statistics-main-label small {font:9px Georgia,serif;color:var(--hud-gold-muted);}
.statistics-main-value {font:800 17px Georgia,serif;color:var(--hud-gold);}
.statistics-points-button {padding:6px 9px;font:700 12px Georgia,serif;border:1px solid var(--hud-gold-muted);color:var(--hud-gold-muted);}
.statistics-points-button:disabled {opacity:.5;}
.statistics-detail-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:10px;}
.statistics-value-row {display:flex;align-items:center;gap:12px;padding:6px 12px;min-height:70px;border:1px solid var(--hud-gold-muted);border-radius:5px;background:var(--hud-black-soft);min-width:0;}
.statistics-value-icon {height:clamp(40px,3.4vw,54px);width:clamp(40px,3.4vw,54px);}
.statistics-value-name {flex:1;min-width:0;font:800 clamp(13px,1.08vw,17px)/1.15 Georgia,serif;overflow-wrap:anywhere;color:var(--hud-gold);}
.statistics-unavailable {font:800 19px Georgia,serif;color:var(--hud-gold);}
.statistics-footer {font:12px/1.5 Georgia,serif;color:var(--hud-gold-muted);margin:14px 0 0;}
@media(max-width:1250px){.statistics-main-grid{grid-template-columns:repeat(3,minmax(0,1fr));}.statistics-main-card{min-height:74px;}}
@media(max-width:860px){.statistics-main-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.statistics-detail-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.statistics-profile{grid-template-columns:76px minmax(0,1fr);}.statistics-progress{grid-column:1/-1;}}
@media(max-width:530px){.statistics-main-grid,.statistics-detail-grid{grid-template-columns:1fr;}.statistics-dialog .hud-dialog-content{padding:7px;}.statistics-profile{gap:8px;padding:7px;}.statistics-main-section{padding:7px;}}

/* N1.7.2 D2 · Ficha compacta y legible, sin alterar datos PV/EXP del SERVER. */
.statistics-progress{box-sizing:border-box;min-width:0;padding:10px 10px 12px;gap:8px;overflow:hidden}
/* La vida conserva su contenido; se corrige exclusivamente la fuente/legibilidad. */
.statistics-progress>strong{font:800 clamp(18px,1.5vw,22px)/1.12 system-ui,'Segoe UI',Arial,sans-serif;letter-spacing:.015em;color:#F1F3F6;font-variant-numeric:tabular-nums}
.statistics-progress-metrics{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;max-width:100%;min-width:0}
.statistics-progress-metric{display:inline-flex;align-items:center;justify-content:center;gap:4px;min-width:0;white-space:nowrap;vertical-align:middle}
.statistics-progress-metric strong{font:800 14px/1 system-ui,'Segoe UI',Arial,sans-serif;color:#F1F3F6;font-variant-numeric:tabular-nums}
.statistics-level-label{font:800 10px/1 system-ui,'Segoe UI',Arial,sans-serif;color:#D4DAE2;letter-spacing:.015em}
.statistics-progress-icon{display:block;flex:0 0 18px;width:18px;height:18px;max-width:18px;max-height:18px;object-fit:contain;object-position:center}
/* EXP plateado se alinea como texto, nunca se reutiliza Sabiduría ni se escala como sprite. */
.statistics-exp-symbol{display:inline-block;flex:0 0 auto;font:900 16px/1 system-ui,'Segoe UI',Arial,sans-serif;letter-spacing:-.035em;background:linear-gradient(180deg,#FFFFFF 0%,#E3E8EF 34%,#8793A2 60%,#D4DAE2 100%);-webkit-background-clip:text;background-clip:text;color:transparent;filter:drop-shadow(0 1px 0 #141920)}
@media(max-width:860px){.statistics-progress{grid-column:1/-1;justify-self:center;width:min(100%,330px)}}
@media(max-width:530px){.statistics-progress-metrics{gap:8px}.statistics-progress-metric strong{font-size:14px}}

/* N1.7.3 D2 · icono de NIVEL primero y legible, EXP sin aumento de tamaño. */
.statistics-progress-metrics{column-gap:12px;row-gap:7px;align-content:center}
.statistics-level-metric{gap:5px}
.statistics-level-metric .statistics-progress-icon{width:27px;height:27px;max-width:27px;max-height:27px;flex:0 0 27px;object-fit:contain}
.statistics-level-label{font-weight:900;font-size:11px}
.statistics-progress-metric .statistics-level-value{font-weight:900}
.statistics-exp-metric{gap:5px}
.statistics-exp-symbol{font-size:16px} /* tamaño anterior, sin agrandarlo */
@media(max-width:530px){.statistics-progress-metrics{column-gap:9px}.statistics-level-metric .statistics-progress-icon{width:25px;height:25px;max-width:25px;max-height:25px;flex-basis:25px}}

/* LAB04 FASE 1: Estadísticas compactas con el marco ORIGINAL del juego. */
#hud-root .caelytte-workspace .statistics-dialog {
 width:min(390px,31vw);max-width:calc(100vw - 24px);
}
#hud-root .caelytte-workspace .statistics-dialog .hud-dialog-header h2 {
 font-size:clamp(16px,1.35vw,20px);
}
#hud-root .caelytte-workspace .statistics-dialog .hud-dialog-content {
 box-sizing:border-box;padding:7px 9px;overflow-y:auto;overflow-x:hidden;min-height:0;
}
#hud-root .caelytte-workspace .statistics-frame {min-width:0;}
#hud-root .caelytte-workspace .statistics-profile {
 display:grid;grid-template-columns:50px minmax(0,1fr);gap:6px;
 padding:7px;min-height:0;align-items:center;
}
#hud-root .caelytte-workspace .statistics-avatar {height:55px;min-width:0;}
#hud-root .caelytte-workspace .statistics-avatar img {height:52px;max-width:100%;}
#hud-root .caelytte-workspace .statistics-character-identity h3 {font-size:16px;margin:0;}
#hud-root .caelytte-workspace .statistics-character-identity p {display:none;}
#hud-root .caelytte-workspace .statistics-progress {
 grid-column:1/-1;padding:5px;gap:2px;width:100%;
}
#hud-root .caelytte-workspace .statistics-progress>strong {font-size:13px;}
#hud-root .caelytte-workspace .statistics-progress-metric strong {font-size:12px;}
#hud-root .caelytte-workspace .statistics-subheading {display:none;}
#hud-root .caelytte-workspace .statistics-main-section {padding:6px;margin-top:7px;}
#hud-root .caelytte-workspace .statistics-main-header {padding-bottom:5px;flex-wrap:wrap;}
#hud-root .caelytte-workspace .statistics-main-header h3 {font-size:14px;}
#hud-root .caelytte-workspace .statistics-points-badge {padding:3px 6px;font-size:10px;}
#hud-root .caelytte-workspace .statistics-main-grid {grid-template-columns:1fr;gap:3px;}
#hud-root .caelytte-workspace .statistics-main-card {
 min-height:0;padding:3px 6px;gap:6px;display:flex;align-items:center;
}
#hud-root .caelytte-workspace .statistics-main-icon {width:22px;height:22px;}
#hud-root .caelytte-workspace .statistics-main-label {flex:1;}
#hud-root .caelytte-workspace .statistics-main-label strong {font-size:11px;}
#hud-root .caelytte-workspace .statistics-main-value {font-size:12px;min-width:29px;text-align:right;}
#hud-root .caelytte-workspace .statistics-points-button {min-height:23px;padding:2px 7px;}
#hud-root .caelytte-workspace .statistics-compact-group {
 margin-top:7px;border:1px solid var(--hud-gold-muted);border-radius:6px;
 padding:5px;background:var(--hud-black-soft);
}
#hud-root .caelytte-workspace .statistics-compact-group h3 {
 color:var(--hud-gold);font:700 13px Georgia,serif;margin:0 0 4px;
}
#hud-root .caelytte-workspace .statistics-detail-grid {
 display:grid;grid-template-columns:1fr;gap:2px;margin:0;
}
#hud-root .caelytte-workspace .statistics-value-row {
 min-height:0;padding:3px 5px;gap:6px;
}
#hud-root .caelytte-workspace .statistics-value-icon {width:21px;height:21px;}
#hud-root .caelytte-workspace .statistics-value-name {font-size:11px;}
#hud-root .caelytte-workspace .statistics-unavailable {font-size:12px;white-space:nowrap;}
#hud-root .caelytte-workspace .statistics-footer {font-size:10px;margin:7px 0 0;}
@media(max-width:850px){
 #hud-root .caelytte-workspace .statistics-dialog {width:100%;max-width:none;}
}

/* Hotfix — asignación múltiple y reinicio seguro de características. */
#hud-root .statistics-reset-button{border:1px solid #7c879b;border-radius:6px;background:#202b37;color:#e5d6b2;font:bold 19px system-ui;cursor:pointer;padding:0 9px;height:28px}
#hud-root .statistics-reset-button:hover{background:#35445a}
#hud-root .statistics-confirm-shield{position:fixed;inset:0;z-index:999999;background:#0009;display:grid;place-items:center}
#hud-root .statistics-confirm-dialog{width:min(330px,calc(100vw - 32px));display:grid;gap:12px;padding:18px;border:1px solid #a58b5b;border-radius:10px;background:#18212b;color:#f4e9cd;box-shadow:0 10px 30px #000b}
#hud-root .statistics-confirm-dialog h3{margin:0;font:700 18px Georgia,serif}
#hud-root .statistics-confirm-input{width:100%;box-sizing:border-box;color:#fff;background:#101820;padding:9px;border:1px solid #9b8a6f;border-radius:5px;font-size:18px}
#hud-root .statistics-confirm-actions{display:flex;justify-content:flex-end;gap:10px}
#hud-root .statistics-confirm-actions button{border:1px solid #99876e;background:#263340;color:#fff;padding:7px 12px;border-radius:5px;cursor:pointer}
