/* Only the meters that matter to the current action share the playfield. */
#app {
  --hud-left: max(14px, env(safe-area-inset-left));
  --hud-right: max(14px, env(safe-area-inset-right));
  --hud-top: max(14px, env(safe-area-inset-top));
}
#app #status {
  top: var(--hud-top); left: var(--hud-left); width: clamp(138px, 13vw, 173px);
  padding: 5px 10px; transform: none; border: 1px solid #dfc79b42; border-radius: 12px;
  background: #211e19b8; box-shadow: 0 1px 5px #1c180e38; backdrop-filter: blur(3px);
}
#app #status::after, #status .identity, #app #resources, #app #progress {display: none}
#status .barRow {grid-template-columns: 2em minmax(0,1fr) auto; gap: 6px; margin: 3px 0; font-size: 10px; line-height: 1.15}
#status .barTrack {height: 5px; border: 0; background: #fff1d32e; border-radius: 6px}
#status .barValue {color: #fbecd5; font-variant-numeric: tabular-nums}
#status .barFill.hp {background: linear-gradient(90deg, #c97462, #f8b49a)}
#status:not(.show-stamina) .staminaRow, #status:not(.show-energy) .energyRow,
#app #seedShield:not(.show-shield) {display: none}
#app #seedShield {left: var(--hud-left); top: calc(var(--hud-top) + 35px); transform: none; border: 0; border-radius: 9px; background: #252119b8}
#app:has(#status:is(.show-stamina,.show-energy)) #seedShield {top: calc(var(--hud-top) + 50px)}
#app:has(#status.show-stamina.show-energy) #seedShield {top: calc(var(--hud-top) + 63px)}
#gamePause, .film-coda .coda-pause {
  width: 44px; height: 44px; padding: 0; display: grid; place-items: center; border-radius: 50%;
  border: 0; color: #fff0cf; cursor: pointer; touch-action: manipulation;
  background: radial-gradient(circle closest-side, #29251edb 0 75%, #d2b88a88 77% 80%, transparent 83%);
}
#gamePause {position: absolute; z-index: 8; right: var(--hud-right); top: calc(var(--hud-top) - 7px)}
#gamePause[hidden], #app:has(#screen:not(.hidden)) :is(#gamePause,#questHUD,#bossHud,#status,#seedShield,#weaponBadge) {display: none}
#gamePause span {width: 10px; height: 13px; border-inline: 3px solid currentColor; border-radius: 1px}
#gamePause:focus-visible {outline: 2px solid #fae3b2; outline-offset: -2px}
#app #weaponBadge {left: auto; right: calc(var(--hud-right) + 48px); top: var(--hud-top); bottom: auto; min-height: 31px; border-radius: 16px; padding: 2px 9px 2px 4px; transform: none}
#app #weaponBadge img {height: 24px; width: 24px}
#weaponBadge strong, #weaponBadge small {font-size: 10px; line-height: 1.2}
#app #questHUD {top: var(--hud-top); max-width: 35vw; white-space: normal; border: 0; border-radius: 12px; background: #27271ec9; font-size: 12px; padding: 5px 12px}
#app #toast {top: calc(var(--hud-top) + 45px); max-width: min(80%, 540px); width: max-content; padding: 6px 12px; font-size: 12px; border-radius: 12px}
#app:has(#relayHUD:not([hidden])) #questHUD,
.uses-touch-controls #app:has(.trail-guide:not([hidden])) #questHUD {visibility: hidden}
#app #bossHud {width: min(430px,54vw); bottom: max(15px,env(safe-area-inset-bottom))}
#app #bossHud .bossTrack {height: 6px}
.film-coda .coda-head {justify-content: flex-end; top: max(7px,env(safe-area-inset-top)); right: max(14px,env(safe-area-inset-right))}
.film-coda .coda-head>span, .film-coda .coda-kicker, .film-coda .coda-copy p:empty {display: none}
.film-coda .coda-copy h2 {font-size: clamp(20px,2.1vw,32px); margin: 0 0 5px}
@media(max-width:620px) {
  #app #questHUD {left: auto; right: var(--hud-right); top: calc(var(--hud-top) + 45px); transform: none; max-width: 53vw}
  #app #bossHud {bottom: max(92px,calc(env(safe-area-inset-bottom) + 78px)); width: min(275px,68vw)}
}
