@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400..700&display=swap');

:root {
    --sheet-color: #ffffff;
    --line-color: #cfd8dc;
    --line-step: 1.425em;
    --line-width: calc(var(--line-step) + 0.075em);
}

body {
    font-family: "Caveat";
    font-weight: normal;
    font-style: normal;
    color: #272727;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    scroll-snap-type: y proximity;
    padding: 5em 0;
    gap: 7.5em;
    width: 100%;
    -webkit-user-select: text;
    -moz-user-select: text;
    user-select: text;
    -webkit-touch-callout: none;
}



.page {
    box-sizing: border-box;
    -webkit-box-shadow: 2px 7px 13px -1px rgba(0, 0, 0, 0.54);
    box-shadow: 2px 7px 13px -1px rgba(0, 0, 0, 0.54);
    font-size: 2rem;
    max-width: 700px;
    padding: 20px 40px;
    padding-top: 40px;
    background: repeating-linear-gradient(to bottom,
            var(--sheet-color),

            /* background */
            var(--sheet-color) var(--line-step),
            /* line spacing */
            var(--line-color) var(--line-step),
            /* line color */
            var(--line-color) var(--line-width)
            /* line thickness */
        );
    background-position-y: -0.5em;
    line-height: 1.5em;

    transform-origin: 25% 10%;
    position: relative;
}

.dragdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(20deg, #fff6a8af, #fff06caf);
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 2.3rem;
    color: inherit;
}

.dragdrop,
.dragdrop * {
    user-select: none;
    pointer-events: none;
}

.page>textarea {
    line-height: inherit;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    background: none;
    padding: 0;
    resize: none;
    border: none;
    width: 100%;
}

.page>textarea::placeholder {
    color: #a7a7a7;
}

.page>textarea:focus {
    outline: none;
}

.page>*::selection,
.page>*::-moz-selection {
    background-color: var(--highlight-color);
}

.comment-highlight {
    background-color: var(--highlight-color);
    cursor: pointer;
    user-select: none;
    -moz-user-select: none;
}

.page>p {
    margin: 0;
    white-space: pre-line;
    -webkit-touch-callout: none;
    -webkit-user-select: text;
    -moz-user-select: text;
    user-select: text;
}

.date {
    user-select: none;
    -moz-user-select: none;
}

.popover {
    background-color: #2e2e2e;
    display: flex;
    flex-direction: row;
    position: absolute;
    border-radius: 10px;
    padding: 8px;
    transform: translate(-50%, -100%);
    gap: 10px;
    color: white;
    z-index: 1;
    font-size: 1.6rem;
    align-items: center;
}

.commentbox {
    font-size: 1.5rem;
    padding: 8px 16px;
}

.commentprompt {
    padding: 8px;
}

.commentprompt>input:focus {
    outline: none;
}

.commentprompt>input {
    background: none;
    border: none;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
}

.popover>button {
    background: none;
    border: none;
    width: 35px;
    height: 35px;
    cursor: pointer;
    display: block;
}

.popover>button>img {
    width: 100%;
    height: 100%;
}

.copied {
    font-size: 1.4em;
    pointer-events: none;
}

.corner-icon {
    position: fixed;
    top: 30px;
    left: 30px;
    filter: drop-shadow(6px 7px 0px #555555);
}

.button-row {
    margin-top: 0.85em;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 25px;
}

.button-row>button {
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: block;
    padding: 0;
}

.button-row>button>img {
    width: 100%;
    height: 100%;
}

.color-select {
    display: flex;
    gap: 10px;
}

.color-select>input[type="radio"] {
    width: 2em;
    height: 2rem;
    transform: scale(1);
    transition: 300ms transform;
}

.color-select>input[type="radio"]:checked {
    transform: scale(1.4);
}

.container {
    display: block;
    position: relative;
    font-size: 22px;
    height: 30px;
    width: 30px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.container input {
    position: absolute;
    opacity: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 25px;
    width: 25px;
    border-radius: 50%;
    border: 2px solid black;
    transform: scale(1);
    transition: transform 200ms, background-color 200ms;
    cursor: pointer;
}

.container input:checked~.checkmark {
    display: block;
    transform: scale(1.3);
    border: 2px solid black;
}

.color-select input~.checkmark {
    background-color: var(--sheet-color);
}

.color-select input:checked~.checkmark {
    background-color: var(--line-color)
}

.load-more {
    background-color: #fff8b3;
    border: 2px solid #e6d96e;
    color: inherit;
    border-radius: 10px;
    padding: 8px 16px;
    font-size: 1.4rem;
    cursor: pointer;
    font-family: inherit;
}

.media-gallery {
    width: 100%;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 1fr;
    gap: 40px 40px;
    grid-auto-flow: row;
    margin-top: 40px;
}

.media-gallery:empty {
    margin-top: 0;
}

.media-tile {
    aspect-ratio: 3/2;
    line-height: 0;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.media-tile:hover>.download-button {
    display: initial;
}

.download-button {
    background: #1111118e;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    height: 30px;
    width: 30px;
    position: absolute;
    top: 8px;
    right: 8px;
    display: none;
}

.download-button img {
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.media-tile:has(span) {
    background-color: #e4e4e4;
}

.media-tile>img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-media {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.media-tile:hover .remove-media {
    opacity: 1;
}

.page.login form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.page.login form * {
    width: fit-content;
}

form h1 {
    font-size: 2.4em;
    margin: 0;
    margin-bottom: 40px;
}

.page.login input,
.page.login button {
    background-color: #ffface;
    border: 2px solid #bbb154;
    padding: 5px 10px;
    font-size: 22px;
    font-family: inherit;
    color: inherit;
}

.media-viewer {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    width: 100%;
    height: 100%;
    background-color: #111111;
    opacity: 1;
    transition: opacity 300ms;
}

.media-viewer.closed {
    opacity: 0;
    pointer-events: none;
}

.close-mv {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    cursor: pointer;
}

.media-viewer>img,
.media-viewer>video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}


@media only screen and (max-width: 1010px) {
    .corner-icon {
        display: none;
    }
}

@media only screen and (max-width: 750px) {
    .page {
        font-size: 1.5rem;
        max-width: 90vw;
        background-position-y: -0.1em;
        padding: 20px;
        padding-top: 40px;
    }
}