@font-face { font-family: "PressStart2P"; src: url(../assets/fonts/PressStart2P-Regular.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "UArial"; src: url(../assets/fonts/Arial.ttf) format("truetype"); font-display: swap; }
html, body { margin: 0; height: 100%; background: #1b120b; overflow: hidden; touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
body { display: grid; place-items: center; }
#stage { position: relative; margin: 0 auto; height: 100%; overflow: hidden; background: #404040; }
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#ui { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.u { position: absolute; box-sizing: border-box; pointer-events: none; }
.u.hit { pointer-events: auto; }
.ucanvas { position: absolute; }
.ubg { position: absolute; inset: 0; box-sizing: border-box; background-repeat: no-repeat; }
.utx { position: absolute; inset: 0; display: flex; white-space: pre-wrap; overflow: visible; font-family: "UArial", Arial, sans-serif; pointer-events: none; }
.btn { cursor: pointer; touch-action: none; }
.btn:active > .ubg { filter: brightness(0.78); }
.btn.disabled > .ubg { opacity: 0.5; filter: brightness(0.78); }
.btn.disabled { cursor: default; }
.uin { position: absolute; inset: 0; width: 100%; height: 100%; box-sizing: border-box; background: transparent; border: 0; outline: 0; color: #fff;
  font: 26px "PressStart2P", monospace; text-transform: uppercase; padding: 0 4px; }
video.tutorial { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; pointer-events: none; }
[data-n="PanelRanking"] [data-n="Viewport"] { overflow-x: hidden; overflow-y: auto; touch-action: pan-y; overscroll-behavior: contain; scrollbar-width: thin; }
.ranklist { position: relative; padding: 20px 40px; font: 40px "PressStart2P", monospace; color: #fff; text-shadow: -4px 4px 0 #000; }
.rrow { display: flex; align-items: center; gap: 20px; padding: 22px 0; border-bottom: 6px solid rgba(255,207,0,.6); }
.rrow .rk { flex: 0 0 128px; color: #ffcf00; } .rrow .rn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .rrow .rs { flex-shrink: 0; text-align: right; }
.rrow.empty { display: block; font-size: 36px; line-height: 1.6; border: 0; }
.rank-retry { display: block; margin-top: 28px; padding: 18px 24px; border: 3px solid #1b120b; background: #ffcf00; color: #1b120b; font: bold 32px "UArial", Arial, sans-serif; cursor: pointer; pointer-events: auto; touch-action: manipulation; }
[data-n="New Game Panel"], [data-n="New Score Save"] { z-index: 1; }
#loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px;
  background: #2b1d10 url(../assets/ui/logo1.jpg) center/cover; color: #fff; font: 14px "PressStart2P", monospace; z-index: 10; }
#loading .title { background: rgba(0,0,0,.6); padding: 10px 14px; }
#loading .bar { width: 60%; height: 14px; border: 2px solid #fff; background: rgba(0,0,0,.6); }
#loading .bar i { display: block; height: 100%; width: 0; background: #4caf50; }
#loading .msg { background: rgba(0,0,0,.6); padding: 6px 10px; font-size: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.game-links { position: absolute; left: 12px; bottom: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 15px; z-index: 2; padding: 4px 8px; background: rgba(27,18,11,.85); border-radius: 3px; font: 12px "UArial", Arial, sans-serif; }
.game-links a { color: #ffdc5b; text-decoration: none; }
.game-links a:focus-visible { outline: 2px solid #ffdc5b; outline-offset: 3px; }
