/* N1.4.1: geometría N1.4 preservada; superficies negras y elementos dorados. */
#game-shell { position: fixed; inset: 0; background: #000000; overflow: hidden; }
#game { width: 100%; height: 100%; }
#game canvas { display: block; width:100%; height:100%; background:#000000; }
.hud-root { --hud-gold-light: var(--hud-gold); position: absolute; inset: 0; pointer-events: none; overflow: hidden; isolation: isolate; }
.hud-root button, .hud-root input, .hud-root details, .hud-root .hud-chat-messages, .hud-root .hud-overlay { pointer-events: auto; }
.hud-top-row { position: absolute; top: clamp(9px, 2.3vh, 27px); left: clamp(10px, 1.35vw, 25px); right: clamp(10px, 1.35vw, 25px); display: grid; grid-template-columns: minmax(245px, 324px) minmax(180px, 1fr) minmax(155px, 194px); align-items: start; column-gap: 16px; }
.hud-identity { display: flex; padding: 9px; height: 108px; align-items: center; gap: 10px; }
.hud-portrait { flex: 0 0 78px; width: 78px; height: 84px; display: grid; place-content: center; text-align: center; border-radius: 50%; border: 2px solid var(--hud-gold); background: radial-gradient(circle, var(--hud-black-soft), var(--hud-black)); }
.hud-portrait-symbol { font: 32px Georgia, serif; color: var(--hud-gold-light); line-height: 1; }
.hud-portrait small { font-size: 6px; letter-spacing: .08em; color: var(--hud-gold); }
.hud-identity-body { flex: 1; min-width: 0; }
.hud-identity-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.hud-identity-title strong { color: var(--hud-gold-light); font: 700 clamp(14px, 1.3vw, 21px) Georgia, serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hud-muted { color: var(--hud-muted); }
.hud-level { font-size: 9px; white-space: nowrap; }
.hud-reserved-meter { height: 19px; margin: 8px 0 7px; background: var(--hud-black-soft); border-radius: 5px; border: 1px solid var(--hud-gold-muted); text-align: center; white-space: nowrap; overflow: hidden; }
.hud-reserved-meter span { font-size: 9px; color: var(--hud-gold); line-height: 16px; }
.hud-experience { border-top: 1px solid var(--hud-gold-muted); font-size: 9px; padding-top: 5px; color: var(--hud-gold); }
.hud-location { justify-self: center; width: 100%; text-align: center; padding-top: 6px; text-shadow: 0 2px 7px black; }
.hud-location h1 { font: 700 clamp(22px, 2.4vw, 34px) Georgia, serif; color: var(--hud-gold-light); line-height: 1.2; margin: 5px 0 4px; }
.hud-location #hud-zone-meta { font-size: 11px; color: var(--hud-gold); }
.hud-currency { justify-self: end; display: flex; align-items: center; padding: 10px; min-height: 74px; width: 100%; gap: 8px; }
.hud-currency .eyebrow { font-size: 8px; letter-spacing: .1em; }
.hud-currency strong { display:block; padding-top:4px; font-size:clamp(17px,1.7vw,23px); line-height:1.14; font-weight:800; color:#ffe08a; text-shadow:0 0 8px rgba(250,176,39,.35),0 1px 1px #241000; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.hud-currency>div:last-child {flex:1;min-width:0;}
.hud-currency .eyebrow{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.hud-coin { border: 2px solid var(--hud-gold); border-radius: 50%; width: 49px; height: 49px; display: grid; place-items: center; flex: 0 0 auto; color: var(--hud-gold-light); background: radial-gradient(circle, var(--hud-black-soft), var(--hud-black)); font-size: 31px; }
.hud-tools { position: absolute; right: clamp(10px, 1.5vw, 25px); top: 18%; display: grid; justify-items: center; gap: 2px; width: 55px; padding: 5px; }
.hud-tools button { width: 42px; height: 34px; font-size: 20px; padding: 0; color: var(--hud-gold-light); border: 0; background: transparent; }
.hud-tools button[aria-pressed="true"] { background: var(--hud-black-soft); outline: 1px solid var(--hud-gold-light); outline-offset: -1px; }
.hud-tools-zoom { font-size: 10px; text-align: center; color: var(--hud-gold); }
.hud-chat { position: absolute; left: clamp(10px, 1.1vw, 18px); bottom: 20px; width: clamp(274px, 24vw, 365px); height: clamp(160px, 24vh, 220px); overflow: hidden; display: flex; flex-direction: column; border-radius: 11px; }
.hud-chat-title { min-height: 30px; padding: 7px 11px; display: flex; align-items: center; justify-content: space-between; }
.hud-chat-title strong { font-size: 11px; letter-spacing: .2em; color: var(--hud-gold-light); }
.hud-chat-title span { color: var(--hud-gold); font-size: 9px; }
.hud-chat-channels { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--hud-gold-muted); min-height: 26px; }
.hud-chat-channels button { border-radius: 0; border: 0; border-right: 1px solid var(--hud-gold-muted); font-size: 9px; font-weight: 700; padding: 3px; color: var(--hud-gold); }
.hud-chat-channels button.selected { border-bottom: 2px solid var(--hud-gold-light); background: var(--hud-black-soft); color: var(--hud-gold-light); }
.hud-chat-channels button:disabled { color: var(--hud-gold-muted); opacity: 1; }
.hud-chat-messages { flex: 1; overflow-y: auto; overflow-wrap: anywhere; min-height: 24px; padding: 8px 10px; background: rgba(0, 0, 0, .86); font-size: 11px; line-height: 1.45; scrollbar-color: var(--hud-gold-muted) var(--hud-black-soft); }
.hud-chat-messages p { margin: 0 0 5px; }
.hud-chat-form { display: flex; min-height: 35px; border-top: 1px solid var(--hud-gold-muted); }
.hud-chat-form input { border: none; border-radius: 0; background: var(--hud-black); flex: 1; min-width: 0; font-size: 11px; padding: 5px 9px; }
.hud-chat-form button { border-radius: 0; border: 0; border-left: 1px solid var(--hud-gold-muted); color: var(--hud-gold-light); width: 37px; }
.hud-dock { position: absolute; left: 50%; transform: translateX(-50%); bottom: 20px; display: grid; grid-template-columns: repeat(6, minmax(76px, 98px)); padding: 5px; gap: 2px; max-width: calc(100% - 28px); border-radius: 38px; }
.hud-dock-button { display: flex; flex-direction: column; align-items: center; justify-content: end; min-width: 0; height: 96px; padding: 5px 3px 7px; gap: 2px; background: var(--hud-black-soft); border-color: var(--hud-gold-muted); border-radius: 12px; }
.hud-dock-button img { width: min(72px, 100%); height: 64px; object-fit: contain; object-position: center; }
.hud-dock-button span { text-align: center; font: bold 11px Georgia, serif; line-height: 1.1; color: var(--hud-gold-light); }
.hud-dock-button small { font-size: 7px; letter-spacing: .02em; color: var(--hud-gold); }
.hud-status, .hud-connection { position: absolute; left: 50%; transform: translateX(-50%); text-align: center; background: rgba(0, 0, 0, .92); border: 1px solid var(--hud-gold-muted); padding: 5px 13px; border-radius: 22px; max-width: min(48vw, 580px); overflow-wrap: anywhere; color: var(--hud-gold-light); font-size: 10px; margin: 0; }
.hud-status { bottom: 142px; }
.hud-connection { top: 116px; font-size: 10px; color: var(--hud-gold-light); }
.hud-system-controls { position: absolute; right: 12px; bottom: 12px; display: grid; justify-items: end; gap: 6px; }
.hud-system-controls > button { font-size: 10px; padding: 6px 8px; }
.hud-qa-panel { font-size: 10px; color: var(--hud-gold); width: 142px; text-align: right; }
.hud-qa-panel summary { background: rgba(0, 0, 0, .95); cursor: pointer; border: 1px solid var(--hud-gold-muted); border-radius: 5px; padding: 5px; }
.hud-qa-buttons { position: absolute; right: 0; bottom: 32px; max-height: min(50vh, 300px); width: 235px; overflow: auto; padding: 7px; display: grid; gap: 4px; background: rgba(0, 0, 0, .96); border: 1px solid var(--hud-gold-muted); }
.hud-qa-buttons button { font-size: 10px; padding: 5px; }
.hud-overlay { position: absolute; inset: 0; display: grid; place-items: center; background: transparent; pointer-events: none; z-index: 10; padding: 20px; padding-bottom: clamp(130px, 17vh, 185px); }
.hud-overlay.is-modal { background: rgba(0, 0, 0, .33); pointer-events: auto; }
.hud-dialog { pointer-events: auto; width: min(500px, 96%); max-height: min(78vh, 620px); display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.hud-dialog-header { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--hud-gold-muted); gap: 12px; }
.hud-dialog-header h2 { font: bold 22px Georgia, serif; color: var(--hud-gold-light); margin: 0; }
.hud-dialog-header button { font-size: 18px; }
.hud-dialog-content { padding: 22px 18px; overflow-y: auto; color: var(--hud-gold); line-height: 1.5; }
.hud-dialog-content strong { color: var(--hud-gold-light); }
.hud-dialog-footer { display: flex; justify-content: flex-end; border-top: 1px solid var(--hud-gold-muted); padding: 9px 15px; }
@media (max-width: 1370px) {
 .hud-top-row { grid-template-columns: minmax(215px, 275px) minmax(165px, 1fr) minmax(145px, 175px); }
 .hud-identity { height: 95px; }
 .hud-portrait { flex-basis: 65px; width: 65px; height: 70px; }
 .hud-dock { grid-template-columns: repeat(6, minmax(68px, 86px)); left: 57%; }
 .hud-dock-button { height: 85px; }
 .hud-dock-button img { width: min(64px, 100%); height: 57px; }
 .hud-chat { height: 180px; }
 .hud-status { bottom: 127px; }
}
@media (max-width: 980px) {
 .hud-top-row { top: 8px; grid-template-columns: minmax(182px, 220px) minmax(116px,1fr) minmax(112px, 150px); gap: 7px; }
 .hud-location h1 { font-size: 19px; }
 .hud-currency { padding: 5px; min-height: 61px; }
 .hud-coin { width: 30px; height: 30px; font-size: 18px; }
 .hud-chat { bottom: 10px; height: 145px; width: min(310px, 37vw); }
 .hud-dock { bottom: 10px; left: auto; right: 9px; transform: none; grid-template-columns: repeat(6, minmax(50px, 1fr)); width: min(57vw, 470px); }
 .hud-dock-button { height: 78px; }
 .hud-dock-button img { width: min(51px, 100%); height: 45px; }
 .hud-dock-button span { font-size: 9px; }
 .hud-dock-button small { font-size: 6px; }
 .hud-status { bottom: 103px; }
 .hud-system-controls { bottom: 103px; }
}
@media (max-width: 650px) {
 .hud-identity { height: 70px; padding: 4px; }
 .hud-portrait { display: none; }
 .hud-top-row { grid-template-columns: 1fr 1fr; }
 .hud-location { position: absolute; top: 75px; left: 0; right: 0; }
 .hud-currency { min-height: 56px; }
 .hud-connection { top: 127px; }
 .hud-tools { top: 27%; }
 .hud-chat { bottom: 100px; width: calc(100% - 20px); height: 120px; }
 .hud-dock { width: calc(100% - 18px); bottom: 8px; right: 9px; }
 .hud-system-controls { bottom: 242px; }
 .hud-status { display: none; }
}

/* Shared window layer: hidden overlays must never intercept map/GUI pointer events. */
.hud-overlay[hidden] { display:none !important; pointer-events:none; }

/* N1.4 Espinas oficial, original PNG con alpha; solo presentación. */
.hud-coin {overflow:hidden;border:0;background:transparent;}
.hud-coin img {display:block;width:100%;height:100%;object-fit:contain;}

/* N1.5 · Seis botones con huellas iguales e iconos visualmente grandes; texto vía hover. */
#hud-root .hud-dock{grid-template-columns:repeat(6,minmax(66px,84px));gap:5px;align-items:center;border-radius:20px}
#hud-root .hud-dock-button{position:relative;display:grid;place-items:center;width:100%;height:83px;padding:4px;min-width:0;min-height:0;overflow:visible;justify-content:center;align-items:center}
#hud-root .hud-dock-button img{display:block;width:92%;height:92%;object-fit:contain;object-position:center;margin:0;flex:none;max-width:100%;max-height:100%;background:transparent;border:0}
#hud-root .hud-dock-button>span,#hud-root .hud-dock-button>small{display:none!important}
#hud-root .hud-dock-button:hover::after,#hud-root .hud-dock-button:focus-visible::after{content:attr(data-tooltip);position:absolute;bottom:calc(100% + 8px);left:50%;transform:translateX(-50%);white-space:nowrap;background:var(--hud-black-soft);border:1px solid var(--hud-gold-muted);color:var(--hud-gold-light);padding:6px 10px;border-radius:6px;pointer-events:none;box-shadow:0 5px 16px rgba(0,0,0,.5);font:700 12px system-ui,sans-serif;z-index:40}
@media(max-width:980px){#hud-root .hud-dock{grid-template-columns:repeat(6,minmax(46px,1fr));gap:2px}#hud-root .hud-dock-button{height:72px}}
@media(max-width:650px){#hud-root .hud-dock-button{height:61px}#hud-root .hud-dock-button:hover::after,#hud-root .hud-dock-button:focus-visible::after{bottom:calc(100% + 4px)}}

/* N3.7: fill the existing silver HUD squares without changing button geometry. */
#hud-root .hud-dock-button{overflow:hidden}
#hud-root .hud-dock-button>img{width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;object-position:center}
