* {
    margin: 0;
    padding: 0;
    box-sizing: border-box
}

html,
body {
    height: 100%;
    background: #000;
    color: #e6ecff;
    font-family: 'Exo 2', system-ui, sans-serif;
    overflow: hidden
}

canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    cursor: grab;
    touch-action: none
}

canvas:active {
    cursor: grabbing
}

.hidden {
    opacity: 0;
    pointer-events: none
}

button {
    font-family: Orbitron, sans-serif;
    cursor: pointer
}

#intro {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: radial-gradient(circle, #0006, #000c);
    transition: opacity 1.5s;
    z-index: 5;
    text-align: center;
    padding: 1rem
}

#intro h1 {
    font-family: Orbitron, sans-serif;
    font-size: clamp(1.4rem, 6.2vw, 5rem);
    letter-spacing: .12em;
    white-space: nowrap;
    background: linear-gradient(90deg, #ffd9a0, #fff, #9ec5ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent
}

#intro p {
    opacity: .75;
    letter-spacing: .18em;
    font-size: .9rem
}

#start {
    margin-top: 1.5rem;
    padding: 1rem 2.5rem;
    background: transparent;
    color: #fff;
    border: 1px solid #ffd9a0;
    border-radius: 40px;
    letter-spacing: .2em;
    transition: .4s
}

#start:hover {
    background: #ffd9a0;
    color: #000;
    box-shadow: 0 0 40px #ffd9a0
}

#hud {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: calc(1rem + env(safe-area-inset-top, 0px)) 1.5rem 1rem;
    font-family: Orbitron, sans-serif;
    font-size: .75rem;
    letter-spacing: .12em;
    transition: opacity 1s;
    z-index: 2;
    pointer-events: none
}

.logo {
    color: #ffd9a0
}

#nav {
    position: fixed;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: .35rem;
    max-height: 70vh;
    overflow-y: auto;
    transition: opacity 1s;
    z-index: 2;
    scrollbar-width: none
}

#nav button {
    background: #ffffff0d;
    border: 1px solid #ffffff22;
    color: #cfd8ff;
    padding: .5rem .9rem;
    border-radius: 8px;
    text-align: left;
    font-size: .66rem;
    letter-spacing: .1em;
    backdrop-filter: blur(8px);
    transition: .3s
}

#nav button:hover,
#nav button.on {
    border-color: #ffd9a0;
    color: #fff;
    transform: translateX(5px)
}

#nav .dv {
    border-color: #9ec5ff88;
    color: #9ec5ff
}

#info {
    position: fixed;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: min(320px, 80vw);
    padding: 1.5rem;
    background: #0a1028d9;
    border: 1px solid #9ec5ff44;
    border-radius: 16px;
    backdrop-filter: blur(14px);
    transition: opacity .6s, transform .6s;
    z-index: 3
}

#info.hidden {
    transform: translate(40px, -50%)
}

#it {
    font-family: Orbitron, sans-serif;
    color: #ffd9a0;
    margin-bottom: .7rem;
    font-size: 1.05rem
}

#idesc {
    line-height: 1.55;
    opacity: .88;
    font-weight: 300;
    font-size: .92rem
}

#is {
    margin-top: .9rem;
    display: grid;
    gap: .3rem;
    font-size: .8rem
}

#is div {
    display: flex;
    justify-content: space-between;
    gap: .8rem;
    border-bottom: 1px solid #ffffff18;
    padding: .25rem 0
}

#x {
    position: absolute;
    top: .4rem;
    right: .9rem;
    background: none;
    border: 0;
    color: #fff;
    font-size: 1.5rem
}

#meter {
    position: fixed;
    left: 50%;
    bottom: calc(4.6rem + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    width: min(520px, 70vw);
    height: 2px;
    background: #ffffff33;
    z-index: 2;
    transition: opacity 1s
}

#mk {
    position: absolute;
    top: -5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ffd9a0;
    box-shadow: 0 0 14px #ffd9a0;
    margin-left: -6px
}

#meter span {
    position: absolute;
    top: 12px;
    font-size: .58rem;
    letter-spacing: .1em;
    opacity: .55;
    transform: translateX(-50%);
    white-space: nowrap;
    font-family: Orbitron, sans-serif
}

#help {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(.8rem + env(safe-area-inset-bottom, 0px));
    width: max-content;
    max-width: calc(100% - 30rem);
    text-align: center;
    font-size: .72rem;
    opacity: .6;
    transition: opacity 1s;
    z-index: 2;
    pointer-events: none
}

#help.hidden {
    opacity: 0
}

#ctl {
    position: fixed;
    right: 1rem;
    bottom: calc(.8rem + env(safe-area-inset-bottom, 0px));
    z-index: 3;
    display: flex;
    gap: .4rem;
    transition: opacity 1s
}

#ctl button {
    background: #ffffff0d;
    border: 1px solid #ffffff22;
    color: #cfd8ff;
    padding: .4rem .7rem;
    border-radius: 8px;
    font-size: .6rem;
    letter-spacing: .1em;
    backdrop-filter: blur(8px)
}

#ctl button:hover {
    border-color: #ffd9a0;
    color: #fff
}

@media(max-width:700px) {
    #nav {
        top: auto;
        bottom: 5.2rem;
        left: 0;
        right: 0;
        transform: none;
        flex-direction: row;
        max-height: none;
        overflow-x: auto;
        padding: 0 1rem
    }

    #info {
        top: auto;
        bottom: 8.5rem;
        transform: none;
        right: .8rem;
        left: .8rem;
        width: auto
    }

    #info.hidden {
        transform: translateY(30px)
    }

    #meter {
        bottom: 3.6rem
    }

    #hud {
        font-size: .62rem
    }

    #help {
        display: none
    }

    #tb {
        display: none
    }
}