
* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #353430;
}

body {
    overscroll-behavior: none;
}

.stage {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    overflow: hidden;
    isolation: isolate;
    touch-action: none;
    background: #353430;
}

.record {
    position: absolute;
    top: 0;
    left: 50%;

    width: 350px;
    height: 510px;
    max-width: calc(100vw - 24px);

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;

    transform: translateX(-50%);
    transition: top 650ms cubic-bezier(.22, .61, .36, 1);

    visibility: hidden;
    pointer-events: none;

    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.record.active {
    visibility: visible;
    pointer-events: auto;
}

.record iframe {
    display: block;
    width: 350px;
    max-width: 100%;
    height: 470px;
    flex: 0 0 470px;
    border: 0;
}

.counter {
    width: 100%;
    height: 30px;
    flex: 0 0 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #fff;
    font: 12px Arial, sans-serif;
    letter-spacing: 2px;
    opacity: .7;
}

.nav {
    position: fixed;
    z-index: 20;
    right: 16px;
    bottom: max(16px, env(safe-area-inset-bottom));

    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav button {
    width: 38px;
    height: 38px;

    border: 1px solid rgba(255,255,255,.35);
    border-radius: 50%;
    background: rgba(53,52,48,.85);
    color: #fff;

    font-size: 18px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.nav button:active {
    background: rgba(255,255,255,.2);
}

@media (max-width: 400px) {
    .record {
        width: calc(100vw - 24px);
    }

    .record iframe {
        width: 100%;
    }
}
