/* core.css — tata letak halaman game: kanvas penuh layar, joystick HP, mode HP tegak diputar, bilah sinematik. */
html, body { overflow: hidden; overscroll-behavior: none; touch-action: none; }
#app { position: fixed; inset: 0; }
#stage, #stage canvas { position: absolute; inset: 0; display: block; }
#stage canvas { width: 100% !important; height: 100% !important; outline: none; }

/* HP tegak saat bermain → seluruh #app diputar 90° supaya terasa lanskap */
body.rotated #app { width: 100vh; height: 100vw; inset: auto; top: 0; left: 100vw; transform-origin: 0 0; transform: rotate(90deg); }

/* joystick kiri (hanya perangkat sentuh) */
.joy { position: absolute; left: 22px; bottom: 22px; width: 150px; height: 150px; z-index: 40; display: grid; place-items: center; touch-action: none; }
.joy-ring { width: 120px; height: 120px; border-radius: 50%; background: rgba(23,20,39,.38); border: 1.5px solid rgba(243,240,255,.28); display: grid; place-items: center; backdrop-filter: blur(4px); }
.joy-knob { width: 54px; height: 54px; border-radius: 50%; background: rgba(243,240,255,.92); box-shadow: 0 6px 16px rgba(0,0,0,.3); transition: transform .06s linear; }
body:not(.playing) .joy { display: none; }

/* bilah sinematik saat cutscene */
#cutscene { position: absolute; inset: 0; pointer-events: none; z-index: 60; }
#cutscene .bar { position: absolute; left: 0; right: 0; height: 0; background: #0d0b18; transition: height .7s var(--ease); }
#cutscene .top { top: 0; } #cutscene .bottom { bottom: 0; display: grid; place-items: center; }
#cutscene .bottom span { color: rgba(243,240,255,.55); font-size: 12px; font-weight: 700; letter-spacing: .04em; opacity: 0; transition: opacity .6s .8s; }
#cutscene.on .bar { height: 9vh; }
#cutscene.on .bottom span { opacity: 1; }
body.cinematic .hud-root, body.cinematic .joy { opacity: 0 !important; pointer-events: none !important; }

/* pengganti UI selama modul HUD belum siap */
.fallback-toast { position: fixed; left: 50%; top: 18px; transform: translateX(-50%); z-index: 80; padding: 10px 16px; border-radius: 999px; background: var(--night); color: var(--night-ink); font-weight: 700; font-size: 14px; opacity: 0; transition: opacity .3s; pointer-events: none; }
#fallback-prompt { position: absolute; left: 50%; bottom: 90px; transform: translateX(-50%); color: #fff; font-weight: 800; text-shadow: 0 2px 6px rgba(0,0,0,.6); z-index: 50; pointer-events: none; }
