body.spectating .bottom-hud,body.spectating .key-help,body.spectating #shop-button,body.spectating #shop-prompt,body.spectating #shift-lock,body.spectating #camera-toggle,body.spectating #target-label,body.spectating #mining{display:none!important}
body.spectating #touch-home,body.spectating #touch-build,body.spectating #touch-attack,body.spectating #touch-interact,body.spectating #touch-lock{display:none!important}
#touch-down{display:none!important}
body.spectating #touch-down{display:flex!important;right:0;bottom:82px}
/* Large, unmistakable results while leaving the arena and freecam accessible. */
#result.spectator-panel{--outcome:#ffd75e;position:fixed;left:50%;top:23%;bottom:auto;transform:translateX(-50%);width:min(540px,calc(100vw - 32px));max-height:calc(100dvh - 110px);overflow-y:auto;padding:24px 28px;border:2px solid var(--outcome);border-top:7px solid var(--outcome);border-radius:0;background:#101d30f5;box-shadow:0 10px 60px #08142399;z-index:12;text-align:center;pointer-events:auto}
#result[data-outcome="loss"]{--outcome:#ff7878}#result[data-outcome="draw"]{--outcome:#bdd8eb}
#result.spectator-panel h2{font-size:clamp(48px,7vw,76px);line-height:1;margin:12px 0 8px;color:var(--outcome);text-shadow:3px 4px 0 #050d19;letter-spacing:2px}
#result.spectator-panel .eyebrow{font-size:16px;letter-spacing:1.5px;color:var(--outcome)}
#result.spectator-panel p{font-size:17px;line-height:1.2;margin:8px 0;color:#e0e9ee}
#result.spectator-panel #result-message{font-size:21px;color:#fff}#result.spectator-panel #result-stats{margin:16px 0 8px;padding-top:14px;border-top:1px solid #7893ab66}
.spectator-buttons{display:flex;justify-content:center;gap:10px;margin-top:18px}.spectator-buttons button{min-height:46px;min-width:120px;margin:0;padding:10px 18px;border-radius:0;border:1px solid #a4bbc9;font-size:20px;font-weight:800}
#result .primary{background:var(--outcome);color:#101d30;border-color:var(--outcome)}#result.spectator-panel #freecam-hint{font-size:14px;color:#b4c7d8;user-select:none}
@media(orientation:landscape) and (max-height:550px){#result.spectator-panel{top:65px;width:54vw;max-height:calc(100dvh - 76px);padding:10px 16px;border-top-width:4px}#result.spectator-panel h2{font-size:44px;margin:5px 0}#result.spectator-panel .eyebrow{font-size:13px}#result.spectator-panel p{font-size:14px;margin:5px 0}#result.spectator-panel #result-message{font-size:17px}#result.spectator-panel #result-stats{margin:7px 0 5px;padding-top:7px}#result.spectator-panel #freecam-hint{font-size:12px}.spectator-buttons{margin-top:8px}.spectator-buttons button{min-height:40px;font-size:18px;padding:6px 14px}}
@media(orientation:portrait){#result.spectator-panel{top:18%;padding:18px 14px}#result.spectator-panel h2{font-size:56px}body.spectating.touch-controls #joystick{bottom:36px}body.spectating.touch-controls .touch-actions{bottom:30px}}

/* Temporary deaths use a centered countdown, never the match-results card. */
#respawn{width:min(90vw,540px);pointer-events:none;z-index:20;text-align:center;text-shadow:0 3px 0 #142234,0 4px 18px #142234}
#respawn h2{font-size:clamp(20px,3vw,32px);font-weight:900;letter-spacing:2px;line-height:1.2;margin:0 0 6px}
#respawn-count{display:block;font-size:clamp(100px,20vmin,160px);font-weight:900;font-variant-numeric:tabular-nums;line-height:1;color:#eefe7c;-webkit-text-stroke:2px #142234}
#respawn-note{font-size:clamp(14px,2vw,18px);font-weight:700;line-height:1.35;margin:12px 0 0}
@media(max-height:450px){#respawn h2{font-size:20px;margin-bottom:2px}#respawn-count{font-size:88px}#respawn-note{margin-top:6px;font-size:14px}}

#bed-alert{position:fixed;z-index:45;left:50%;top:30%;transform:translate(-50%,-50%);width:92vw;text-align:center;font-family:BedwarsPixel,monospace;font-size:clamp(40px,8vw,110px);font-weight:900;line-height:1;color:#ff645e;text-shadow:3px 3px 0 #200808,0 3px 14px #000;pointer-events:none;user-select:none}
#bed-alert[hidden]{display:none}
@media(max-height:450px){#bed-alert{top:32%;font-size:clamp(36px,8vw,70px)}}
