* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #140806; color: #f2e6dc; font-family: ui-monospace, Menlo, monospace; overflow: hidden; }
main { height: 100vh; display: flex; flex-direction: column; align-items: center; gap: 1vh; padding: 3vh 3vw; } /* TVs often crop the edges (overscan): keep everything inside */
#view { position: relative; width: 100%; flex: 1; min-height: 0; }
#view canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#hud { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1vw; width: 100%; }
.slot { border: 3px solid var(--c); background: #1c0d09; padding: .6vh .8vw; min-height: 11vh; display: flex; gap: .8vw; align-items: center; }
.slot.empty { border-style: dashed; opacity: .75; }
.slot .name { font-size: min(2.6vh, 1.6vw); font-weight: bold; color: var(--c); letter-spacing: .1em; }
.slot .hp { font-size: min(4.2vh, 2.6vw); font-weight: bold; }
.slot .hp small { font-size: min(2.2vh, 1.4vw); opacity: .8; }
.slot .hp.low { color: #ff4040; animation: blink .5s steps(2) infinite; }
.slot .meta { font-size: min(1.8vh, 1.1vw); opacity: .85; overflow-wrap: anywhere; }
.slot > div { min-width: 0; }
.slot svg { width: min(9vh, 6vw); height: min(9vh, 6vw); background: #fff; padding: 2px; flex: none; }
.slot.dead .hp { color: #777; }
@keyframes blink { 50% { opacity: .3; } }
#start { position: fixed; inset: 0; z-index: 10; padding: 5vh 6vw; gap: 1vh; background: rgba(26, 8, 4, .94); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
#start h1 { font-size: min(11vh, 7.5vw); margin: 0; color: #ff7a40; letter-spacing: .2em; text-shadow: 0 0 30px #ff2000; }
#start .tag { max-width: 80vw; font-size: min(2.8vh, 1.8vw); }
#start button:focus { outline: 4px solid #ffd060; outline-offset: 4px; }
#start button { font: inherit; font-size: min(3vh, 2.2vw); padding: 1.5vh 3vw; background: #e04030; color: #fff; border: 0; cursor: pointer; margin: 3vh; }
#start .small { opacity: .6; font-size: min(2.2vh, 1.4vw); max-width: 80vw; }
#banner { position: fixed; left: 0; right: 0; top: 38%; text-align: center; font-size: 7vh; font-weight: bold; color: #fff; text-shadow: 0 0 12px #000, 0 0 4px #000; pointer-events: none; opacity: 0; transition: opacity .3s; }
#banner.on { opacity: 1; }
#banner.robot { color: #ff4030; font-style: italic; letter-spacing: .05em; font-size: 5vh; }
#flash { position: fixed; inset: 0; background: rgb(120, 220, 255); opacity: 0; pointer-events: none; } /* EMP */
#join { position: fixed; left: 0; right: 0; top: 40%; text-align: center; font-size: 6vh; font-weight: bold; color: #ff7a40; text-shadow: 0 0 16px #000, 0 0 4px #000; pointer-events: none; }
#join[hidden] { display: none; }
#lookTag { position: fixed; right: 4vw; top: 3.5vh; font-size: 1.5vh; opacity: .55; text-shadow: 0 0 4px #000; pointer-events: none; }
#room { position: fixed; left: 4vw; top: 3.5vh; font-size: 2.2vh; text-shadow: 0 0 4px #000, 0 0 10px #000; pointer-events: none; z-index: 5; }
#room b { color: #ff9a60; font-size: 3.4vh; letter-spacing: .15em; }
#lookMenu { position: fixed; right: 4vw; top: 8vh; z-index: 8; min-width: 26vw; padding: 2vh 1.5vw; background: rgba(20, 8, 6, .94); border: 2px solid #c9794a; border-radius: 1.2vh; font-size: 2.6vh; box-shadow: 0 0 40px rgba(0,0,0,.6); }
#lookMenu[hidden] { display: none; }
#lookMenu h2 { margin: 0 0 1vh; font-size: 2.2vh; letter-spacing: .2em; color: #ff9a60; }
#lookMenu div { padding: .8vh 1vw; border-radius: .8vh; }
#lookMenu div.at { background: #c9794a; color: #140806; font-weight: bold; }
#lookMenu div.on::after { content: '  ●'; }
#lookMenu small { opacity: .7; font-size: 1.8vh; }
#lookMenu p { margin: 1.2vh 0 0; font-size: 1.6vh; opacity: .6; }
#padHint { position: fixed; left: 0; right: 0; bottom: 18vh; text-align: center; font-size: 2.6vh; color: #ffd060; text-shadow: 0 0 6px #000, 0 0 2px #000; pointer-events: none; }
#padHint[hidden] { display: none; }
