#frontend { z-index: 50; touch-action: none; background: rgb(0, 0, 0); place-items: center; display: grid; position: fixed; inset: 0px; }
#frontend.hidden { display: none; }
#frontend canvas { width: min(100vw, 133.333dvh); height: min(100dvh, 75vw); image-rendering: pixelated; }
html.portrait #frontend canvas { image-rendering: auto; }
#frontend .frontend-safe { padding: env(safe-area-inset-top,0px) 0 env(safe-area-inset-bottom,0px); visibility: hidden; pointer-events: none; position: fixed; inset: 0px; }
#frontend.over-run { background: rgba(0, 0, 0, 0.45); }
#frontend.over-run.ending { background: rgba(0, 0, 0, 0.78); }
.frontend-open:not(.frontend-over-run) #hud, .frontend-open:not(.frontend-over-run) #ctrlpnl, .no-run #hud, .no-run #ctrlpnl { visibility: hidden; }
#act-card { width: 800px; height: 600px; transform: translateX(-50%) scale(var(--ui-scale,1)); transform-origin: 50% 100%; pointer-events: none; background: radial-gradient(300px 90px at 50% 200px, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0)); flex-direction: column; align-items: center; gap: 6px; padding-top: 132px; animation: 5s ease-in-out 0s 1 normal forwards running act-card; display: flex; position: fixed; bottom: 0px; left: 50%; }
html:not(.portrait) #act-card { translate: 0 calc(-.5 * var(--ui-tall,0px) * var(--ui-scale,1)); }
#act-card.hidden { display: none; }
.frontend-open #act-card { visibility: hidden; }
html.portrait #act-card { top: calc(env(safe-area-inset-top,0px) + 16%); width: max-content; height: auto; transform: translateX(-50%) scale(var(--act-scale,1)); transform-origin: 50% 0px; background: radial-gradient(closest-side, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0)); padding: 28px 40px; bottom: auto; }
#act-card canvas { image-rendering: pixelated; display: block; }
#act-card .act-zone { margin-top: 4px; }
#act-card .act-tier { margin-bottom: 4px; }
#act-card .act-zone + .act-affix, #act-card .act-name + .act-affix { margin-top: 10px; }
@keyframes act-card { 
  0% { opacity: 0; }
  20%, 72% { opacity: 1; }
  100% { opacity: 0; }
}
.frontend-backdrop #frontend { z-index: 0; pointer-events: none; }
.frontend-backdrop.d2ui.no-run #character { background: 0px 0px; }
.frontend-backdrop :is(#character, #tooltip, #hoverbox) { z-index: 1; }
#update-status { z-index: 60; pointer-events: none; line-height: 0; position: fixed; }
#update-status.banded { background: rgba(0, 0, 0, 0.8); padding: 4px 8px; }
#update-status.hidden { display: none; }
#update-status.restart { pointer-events: auto; cursor: pointer; }
#update-status canvas { image-rendering: pixelated; display: block; }