:root {
    box-sizing: border-box;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    --bg: #0e2a14;
    --fg: #f2fff2;
    --accent: #7cff6b
}

@media (prefers-color-scheme:dark) {
    :root:not([data-theme="light"]) {
        --bg: #0e2a14;
        --fg: #f2fff2
    }
}

:root[data-theme="dark"] {
    --bg: #0e2a14;
    --fg: #f2fff2
}

html {
    scroll-padding-top: env(safe-area-inset-top, 0px)
}

html,
body {
    height: 100%;
    margin: 0
}

body {
    background: var(--bg);
    color: var(--fg);
    font-family: system-ui, -apple-system, Segoe UI, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden
}

#frame {
    position: relative;
    overflow: hidden;
    flex: none
}

#stage {
    position: absolute;
    left: 0;
    top: 0;
    width: 1080px;
    height: 1920px;
    transform-origin: 0 0
}

canvas,
#hud {
    position: absolute;
    left: 0;
    top: 0;
    width: 1080px;
    height: 1920px;
    display: block
}

canvas {
    touch-action: none
}

#hud {
    pointer-events: none
}

#arc {
    stroke: #ff0000;
    fill: none;
    stroke-linecap: round
}

#lbl {
    fill: #ff0000;
    text-anchor: middle
}

#num {
    fill: #ff0000
}

#slbl {
    fill: #ffffff;
    text-anchor: middle
}

#score {
    fill: #ffffff
}

#lbl,
#slbl {
    font-family: "poppins", system-ui, sans-serif;
    font-weight: 400
}

#rst {
    position: absolute;
    left: 935.6px;
    top: 1796.6px;
    width: 88.81px;
    height: 88.81px;
    cursor: pointer;
    -webkit-user-drag: none;
    user-select: none;
    touch-action: manipulation
}

#ov {
    position: absolute;
    left: 0;
    top: 0;
    width: 1080px;
    height: 1920px
}

#ov svg {
    width: 100%;
    height: 100%;
    display: block
}

#scoreLayer {
    position: absolute;
    left: 0;
    top: 0;
    width: 1080px;
    height: 1920px;
    pointer-events: none
}

#ov[hidden] {
    display: none
}

#atv {
    position: absolute;
    left: 0;
    top: 0;
    width: 1080px;
    height: 1920px;
    object-fit: fill;
    display: block;
    background: #000
}

#atbtn {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none
}

#atv[hidden],
#atbtn[hidden] {
    display: none
}

#cd {
    position: absolute;
    left: 0;
    top: 0;
    width: 1080px;
    height: 1920px;
    pointer-events: none
}

#cd[hidden] {
    display: none
}

#stage.title #hud,
#stage.title #scoreLayer,
#stage.title #rst,
#stage.countdown #hud,
#stage.countdown #scoreLayer,
#stage.countdown #rst {
    display: none
}

/* Temporary input log (DEBUG_INPUT in config.js). */
#dbg {
    position: absolute;
    left: 0;
    top: 0;
    width: 1080px;
    box-sizing: border-box;
    padding: 8px 12px;
    font: 22px/1.25 ui-monospace, Menlo, Consolas, monospace;
    color: #fff;
    background: rgba(0, 0, 0, .65);
    white-space: pre;
    overflow: hidden;
    pointer-events: none
}