:root {
    font-family: monospace;
    touch-action: none;

    --caption-font-family: "SCDF";  
}

html, body {
    overflow: hidden;
	font-weight: bold;

    margin: 0; padding: 0;
    width: 100%; height: 100%;

    font-family: "Courier";
	justify-content: center;
}

#full-container video, #full-container img {
    width: 100%; height: 100%;
    object-fit: cover;

    background-color: black;
}

#safe-container {
    padding: 1rem;

    width: 640px; height: 480px;
}

#background-video {
    z-index: -100;
    left: 0;
    top: 0;
    position: absolute;
    width: 100%;
    height: 100%;
}

#background-video img, #background-video video {
    object-fit: cover;
    width: 100%;
    height: 100%;

    left: 0;
    top: 0;
    position: absolute;
    width: 100%;
    height: 100%;
}

.panel {
    display: flex;
    font-size: 12px;
	border-radius: 5px;
    background: rgba(0, 0, 0, 0.9);
    color: white;

    /* border: 1px solid orange; */
    outline: 1px solid white;

    contain: paint;
}

.log-cell {
    width: 55%; height: 100%;
}
.dream-cell {
    width:55%; height: 100%;
}

.back-cell {
    width: 100%; height: 100%;
}

.portrait-right {
    display: flex;
    flex-direction: row-reverse;
    align-items: flex-start;
    gap: 8px;
}

.portrait-left {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 8px;
}

img {
    display: flex;
}

.text {
    padding: .5rem .7rem;
    padding-bottom: .7rem;
    padding-right: calc(.7rem + 1ch);
}

.dialogue-pages {
    display: grid;
}

.dialogue-page {
    grid-area: 1 / 1 / 2 / 2;
}

.choice {
    display: flex;
    flex-direction: column;

    padding: 0.25rem;
    margin: 0;

    color: white;
    background: black;
}

.choice label {
    position: relative;
}

.choice-label {
    padding: .25rem .5rem;
}

.choice input {
    -moz-appearance: none;
    margin: 0;

    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;

    opacity: 0;
    
    pointer-events: all;
    cursor: pointer;
}

:checked+.choice-label {
    background: white;
    color: black;
}

:disabled+.choice-label {
    text-decoration: line-through;
}

.hidden {
    /* color: transparent; */
    visibility: hidden;
}

.cursor {
    position: absolute;
    color: transparent;
    box-shadow: inset 0px 0px 0 .5px white;

    top: 0;
    left: 0;
    transform: translate(100%, 0);

    animation-name: char-cursor;
    animation-direction: alternate;
    animation-duration: .5s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
}

.char-hidden {
    visibility: hidden;
    position: relative;
}

.panel .char-reveal {
    animation-name: char-reveal;
    animation-direction: alternate;
    animation-duration: .35s;
    position: relative;
}

.info-text {
    padding: .25em;
    text-shadow: 1px 1px 1px #000;
    font-family: var(--caption-font-family);
    text-transform: uppercase;

    filter: drop-shadow(0 0 1px black);
}

.info-text .char-reveal {
    animation-name: caption-char-reveal;
    animation-direction: alternate;
    animation-duration: .5s;
}

.info-text .cursor {
    all: revert;

    position: absolute;
    color: transparent;
    border-bottom: solid white .5px;

    top: 0;
    left: 0;
    transform: translate(100%, 0);
}

.info-text-top {
    position: absolute;
    top: 0; left: 0; right: 0;
    /* text-align: center; */
}

.info-text-bottom {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    /* text-align: center; */
}

.name {
    position: absolute;
    bottom: 0;
    left: 0;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.splash-cell {
    width: 95%; height: 100%;
}
.splash-container {
    width: 100%;
    height: 100%;

    display: flex;

    overflow: hidden;
}

.splash-content {
	font-size: 72px;
    position: absolute;
    left: 36px; right: 0; bottom: 5px;
    overflow: hidden;

    display: flex;
    flex-direction: column;
	text-align: center;
}


.log-container {
    width: 100%;
    height: 100%;

    display: flex;

    overflow: hidden;
}

.log-content {
    position: absolute;
    left: 0; right: 0; bottom: 5px;
    overflow: hidden;

    display: flex;
    flex-direction: column;
    gap: 1em;
}
.dream-container {
    width: 100%;
    height: 100%;

    display: flex;

    overflow: hidden;
}

.dream-content {
    position: absolute;
    left: 0; right: 0; bottom: 5px;
    overflow: hidden;

    display: flex;
    flex-direction: column;
    gap: 1em;
	text-align: center;
}

/* .back-container {
    background:black;
    width: 100%;
    height: 100%;

    display: flex;

    overflow: hidden;
}

.back-content {
    font-weight: normal;
    position: absolute;
    left: 0; right: 0; top: 0; bottom: 0;
    overflow: hidden;

    display: flex;
    flex-direction: column;
    gap: 1em;
} */

.back-content.text {
    padding: 0.5em;
    font-weight: normal;
    background-color: black;
}

.log-wipe {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    margin: 1px;
    border-top: 1px solid currentColor;
    background: black;
}

@keyframes char-reveal {
    0% {
        box-shadow: inset 0px 0px 0 .5px white;
        color: transparent;
    }

    45% {
        color: white;
    }

    100% {
        box-shadow: inset 0px 0px 0 .5px transparent;
        color: white;
    }
}

@keyframes char-cursor {
    0% {}

    100% {
        background: white;
    }
}

@keyframes caption-char-reveal {
    0% {
        color: #FFFFFF00;
        text-shadow: 1px 1px 1px #0000;
    }

    100% {
        color: #FFFFFFFF;
        text-shadow: 1px 1px 1px #000F;
    }
}

@keyframes caption-fadeout {
    0% {
        opacity: 100%;
    }

    100% {
        opacity: 0%;
    }
}

@keyframes grow-in {
    0% {
        transform: scale(0);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes grow-out {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(0);
    }
}

@keyframes fade-in {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 100%;
    }
}

@keyframes fade-out {
    0% {
        opacity: 100%;
    }

    100% {
        opacity: 0;
    }
}

@keyframes dim {
    100% {
        filter: saturate(0);
    }
}

@keyframes dim-out {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(0);
        filter: saturate(0);
    }
}

@keyframes log-wipe {
    0% {
        height: 0;
    }

    100% {
        height: 100%;
    }
}

.flip img {
    transform: scale(100%, -100%);
}

.mirror img {
    transform: scale(-100%, 100%);
}

