:root {
    --g1: #2a8a45;
    --g2: #0d4220
}
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    user-select: none
}
html,
body {
    height: 100%;
    margin: 0;
    overflow: hidden;
    background: #3a0a14;
    font-family: 'Lilita One', 'Trebuchet MS', sans-serif;
    color: #fff
}
#app {
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px);
    background: radial-gradient(ellipse 9px 16px at 50% 40%, #ffffff14 0 60%, transparent 64%) 0 0/44px 52px, radial-gradient(circle at 20% 30%, #ffffff0d 0 2px, transparent 3px) 0 0/34px 34px, radial-gradient(ellipse at 50% 40%, var(--g1), var(--g2) 78%)
}
#app::before,
#app::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2.4%;
    background: linear-gradient(90deg, #4a0b16, #7d1426);
    z-index: 1;
    pointer-events: none
}

#app::before {
    left: 0;
    box-shadow: 4px 0 8px #0006
}

#app::after {
    right: 0;
    transform: scaleX(-1);
    box-shadow: 4px 0 8px #0006
}

#hud {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: auto 1fr minmax(200px, 1.2fr) 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 16px 4% 6px
}

.ib {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 3px solid #cfe6ff;
    background: linear-gradient(#3b86f0, #1b52c4);
    color: #fff;
    font: inherit;
    font-size: 24px;
    display: grid;
    place-items: center;
    box-shadow: 0 4px 0 #0e2f7a, 0 8px 12px #0005;
    cursor: pointer
}

.ib:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #0e2f7a
}

#tools {
    display: flex;
    gap: 8px
}

.pl {
    position: relative;
    display: flex;
    height: 56px;
    padding: 0 14px 0 66px;
    border-radius: 6px;
    background: linear-gradient(#c8164a, #8e0f33);
    box-shadow: 0 4px 0 #5c0a22, 0 8px 14px #0006;
    transition: filter .3s;
    align-items: center;   
}

#pl0{ margin-top: 3%;}
#pl1{margin-top: 3%;}

.p2 {
    background: linear-gradient(#2a64ea, #1440aa);
    box-shadow: 0 4px 0 #0c2a70, 0 8px 14px #0006;
    padding: 0 66px 0 14px
}

.in {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0
}

.nm {
    font-size: 16px;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    text-shadow: 0 2px 0 #0005
}

.sc {
    background: #0007;
    border-radius: 6px;
    min-width: 70%;
    text-align: center;
    font-size: 22px;
    line-height: 1.1;
    margin-top: 3px
}

.av {
    position: absolute;
    left: -8px;
    top: -10px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: radial-gradient(#fff, #cfe9ff);
    border: 5px solid #f06aa8;
    display: grid;
    place-items: center;
    font-size: 38px;
    box-shadow: 0 3px 8px #0008
}

.p2 .av {
    left: auto;
    right: -8px;
    border-color: #7fc4ff
}

.pl.on {
    filter: brightness(1.18)
}

.pl.on .av {
    box-shadow: 0 0 0 4px #ffe36b, 0 0 24px 8px #ffd54acc;
    animation: pulse 1s infinite
}

#banner {
    text-align: center;
    padding: 10px 12px;
    font-size: clamp(15px, 2.4vw, 26px);
    border: 3px solid #d99a4a;
    border-radius: 6px;
    background: linear-gradient(#a8621f, #6b3510);
    text-shadow: 0 2px 0 #3a1a06;
    box-shadow: 0 4px 0 #3a1a06, 0 8px 14px #0006;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.pop {
    animation: pop .45s
}

#wrap {
    position: relative;
    flex: 1;
    min-height: 0;
    z-index: 2
}

#cv {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    touch-action: manipulation
}

.fl {
    position: absolute;
    bottom: 2px;
    width: 64px;
    z-index: 3;
    pointer-events: none;
    filter: drop-shadow(0 3px 3px #0006)
}

.ov {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: #071a0cb3;
    backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s
}

.ov.show {
    opacity: 1;
    pointer-events: auto
}

.card {
    width: min(440px, 100%);
    max-height: 100%;
    overflow: auto;
    text-align: center;
    padding: 22px 20px 20px;
    border-radius: 18px;
    border: 5px solid #f0b050;
    background: linear-gradient(#2f9a4e, #17622f);
    box-shadow: 0 0 0 5px #7a3f12, 0 20px 40px #000a;
    transform: scale(.85);
    transition: transform .35s cubic-bezier(.3, 1.5, .5, 1)
}

.ov.show .card {
    transform: scale(1)
}

.logo {
    font-size: clamp(46px, 13vw, 84px);
    line-height: 1;
    margin: 0 0 6px;
    background: linear-gradient(#fff6b8, #ffc93c 55%, #f08a1c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-stroke: 2px #6a2d08;
    filter: drop-shadow(0 5px 0 #6a2d08)
}

h2 {
    margin: 0 0 10px;
    font-size: 32px;
    font-weight: 400;
    color: #ffe08a;
    text-shadow: 0 3px 0 #3a1a06
}

.btn {
    display: block;
    width: 100%;
    margin: 10px 0 0;
    padding: 12px;
    font: inherit;
    font-size: 22px;
    color: #fff;
    text-shadow: 0 2px 0 #0006;
    border: 3px solid #fff8;
    border-radius: 14px;
    background: linear-gradient(#ffb347, #e2701b);
    box-shadow: 0 5px 0 #8a3c08, 0 10px 14px #0005;
    cursor: pointer
}

.btn.b {
    background: linear-gradient(#4a96ff, #1b52c4);
    box-shadow: 0 5px 0 #0e2f7a, 0 10px 14px #0005
}

.btn.g {
    background: linear-gradient(#5fd070, #22963a);
    box-shadow: 0 5px 0 #0f5a20, 0 10px 14px #0005
}

.btn:active {
    transform: translateY(4px);
    box-shadow: 0 1px 0 #0003
}

.chips {
    display: flex;
    gap: 8px;
    margin: 12px 0 2px
}

.chip {
    flex: 1;
    padding: 8px 4px;
    font: inherit;
    font-size: 17px;
    color: #fff;
    border-radius: 10px;
    border: 3px solid #ffffff55;
    background: #0000004d;
    cursor: pointer
}

.chip.on {
    background: linear-gradient(#ffd45a, #f0961c);
    border-color: #fff;
    color: #4a2306;
    text-shadow: none
}

.stat {
    margin-top: 12px;
    font-size: 16px;
    color: #cdeccf
}

ol {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
    counter-reset: s
}

li {
    counter-increment: s;
    position: relative;
    padding: 8px 8px 8px 46px;
    margin: 6px 0;
    background: #0000003d;
    border-radius: 10px;
    font-family: 'Trebuchet MS', sans-serif;
    font-size: 15px;
    line-height: 1.35
}

li::before {
    content: counter(s);
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font: 20px 'Lilita One', sans-serif;
    background: radial-gradient(circle at 35% 30%, #bfe6ff, #2a7cf0 60%, #0a2f8c);
    box-shadow: 0 2px 3px #0008
}

#stars {
    font-size: 46px;
    letter-spacing: 6px;
    margin: 4px 0
}

#stars span {
    display: inline-block;
    opacity: 0;
    transform: scale(0)
}

#stars.go span {
    animation: pop .6s forwards
}

#pre {
    position: absolute;
    inset: 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    background: radial-gradient(ellipse at 50% 40%, var(--g1), var(--g2) 78%);
    transition: opacity .5s
}

#pre.hide {
    opacity: 0;
    pointer-events: none
}

.bar {
    width: min(300px, 70vw);
    height: 22px;
    border-radius: 12px;
    background: #0006;
    border: 3px solid #f0b050;
    overflow: hidden
}

.bar i {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(#8fd8ff, #2a7cf0);
    transition: width .12s
}

.dots {
    display: flex;
    gap: 12px;
    height: 44px;
    align-items: flex-end
}

.dots b {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #bfe6ff, #2a7cf0 55%, #0a2f8c);
    box-shadow: 0 3px 4px #0008;
    animation: hop .8s infinite
}

.dots b:nth-child(2) {
    animation-delay: .15s
}

.dots b:nth-child(3) {
    animation-delay: .3s
}

.dots b:nth-child(4) {
    animation-delay: .45s
}

@keyframes hop {
    50% {
        transform: translateY(-26px)
    }
}

@keyframes pop {
    0% {
        transform: scale(.5)
    }

    60% {
        transform: scale(1.18)
    }

    100% {
        transform: scale(1);
        opacity: 1
    }
}

@keyframes pulse {
    50% {
        box-shadow: 0 0 0 4px #ffe36b, 0 0 34px 14px #ffd54acc
    }
}

@media(max-width:720px) {
    #hud {
        grid-template-columns: auto 1fr 1fr auto;
        gap: 12px 10px;
        padding: 10px 12px 4px
    }

    #banner {
        grid-column: 2/4;
        grid-row: 1
    }

    #hud>.ib {
        grid-row: 1
    }

    #tools {
        grid-row: 1;
        grid-column: 4
    }

    #pl0 {
        grid-column: 1/3;
        grid-row: 2;
        margin-left: 8px
    }

    #pl1 {
        grid-column: 3/5;
        grid-row: 2;
        margin-right: 8px
    }

    .ib {
        width: 42px;
        height: 42px;
        font-size: 20px
    }

    .nm {
        font-size: 14px
    }

    .fl {
        display: none
    }
}

@media(prefers-reduced-motion:reduce) {
    * {
        animation-duration: .01s !important
    }
}