
.row {
    display: flex;
    flex-direction: row;
}
.row.reversed-order {
    flex-direction: row-reverse;
}

.column {
    display: flex;
    flex-direction: column;
}
.column.reversed-order {
    flex-direction: column-reverse;
}

.row.items-start,
.column.items-start {
    align-items: flex-start;
}
.row.justify-start,
.column.justify-start {
    justify-content: flex-start;
}
.row.content-start,
.column.content-start {
    align-content: flex-start;
}
.row.items-center,
.column.items-center {
    align-items: center;
}
.row.justify-center,
.column.justify-center {
    justify-content: center;
}
.row.content-center,
.column.content-center {
    align-content: center;
}
.row.items-end,
.column.items-end {
    align-items: flex-end;
}
.row.justify-end,
.column.justify-end {
    justify-content: flex-end;
}
.row.content-end,
.column.content-end {
    align-content: flex-end;
}
.row.items-stretch,
.column.items-stretch {
    align-items: stretch;
}
.row.justify-stretch,
.column.justify-stretch {
    justify-content: stretch;
}
.row.content-stretch,
.column.content-stretch {
    align-content: stretch;
}
.row.items-baseline,
.column.items-baseline {
    align-items: baseline;
}
.row.justify-baseline,
.column.justify-baseline {
    justify-content: baseline;
}
.row.content-baseline,
.column.content-baseline {
    align-content: baseline;
}
.row .wrap,
.column .wrap {
    flex-wrap: wrap;
}
.row .reversed-wrap,
.column .reversed-wrap {
    flex-wrap: wrap-reverse;
}
.row .no-wrap,
.column .no-wrap {
    flex-wrap: nowrap;
}

.fill {
    flex-grow: 1;
    flex-shrink: 0;
}

.font-system {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

.font-thin {
    font-weight: 100;
}

.font-extra-light {
    font-weight: 200;
}

.font-light {
    font-weight: 300;
}

.font-regular {
    font-weight: 400;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

.font-extra-bold {
    font-weight: 800;
}

.font-black {
    font-weight: 900;
}

.cursor-pointer {
    cursor: pointer;
}

.not-selectable {
    user-select: none;
}

.selectable {
    user-select: auto;
}



* {
    margin: 0;
    padding: 0;
}

:root {
    --background: #fff;
    --foreground: #000;
    --divider: #dcdcdc;
    --overlay: #000;
}

/*@media (prefers-color-scheme: dark) {
    :root {
        --background: #000;
        --foreground: #fff;
        --divider: #333;
    }
}*/

html,
body {
    height: 100%;
}

body {
    background: var(--background);
    color: var(--foreground);

    overflow: hidden;
    line-height: 1.5;

    -webkit-tap-highlight-color: transparent;
}

button,
input,
textarea,
[contenteditable="true"] {
    box-sizing: border-box;
    padding: 1rem;

    border-radius: 1rem;
    border: 0.0625rem solid var(--divider);

    font-family: inherit;
    font-size: 1rem;

    background: var(--background);
    color: var(--foreground);
}

textarea {
    resize: none;
}

button {
    cursor: pointer;
}

.sheet {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;

    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    visibility: visible;
    transition: opacity 0.5s, visibility 0.5s;

    overflow: hidden;

}

.sheet[aria-hidden="true"] {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.sheet .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0; /*-1*/;
    background: var(--overlay);
    /*opacity: 0.7;
    width: 100vw;
    height: 100vh;
    padding: 1rem;*/

    background-image: url(images/bg-pattern-overlay.png);
    background-size: cover;
    background-position: center;

    overflow: hidden; /* Hide overflowing content */
    -webkit-mask-image: url(images/overlay-long-top.png);
    -webkit-mask-size: 100%;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center top;

    mask-image: url(images/overlay-long-top.png);
    mask-size: 100%;
    mask-repeat: no-repeat;
    mask-position: center top;
}

.sheet .contents {
    display: flex;
    flex-direction: column;
    border-radius: 1rem 1rem 0 0;
    background: var(--background);
    overflow-y: hidden;
    --default-transitions: transform 0.5s, border-radius 0.5s;
    transition: var(--default-transitions);
    transform: translateY(0);
    max-width: 70rem;
    max-height: 100vh;
    height: 30vh;
    width: 100vw;
    box-sizing: border-box;
    position: relative;
    z-index: 1004;
}

.sheet .contents:not(.not-selectable) {
    transition: var(--default-transitions), height 0.5s;
}

.sheet .contents.fullscreen {
    border-radius: 0;
}

.sheet[aria-hidden="true"] .contents {
    transform: translateY(100%);
}

/*.sheet .controls {
    display: flex;
}

.sheet .draggable-area {
    width: 3rem;
    margin: auto;
    padding: 1rem;
    cursor: grab;
    position: relative;
    left: 16px;
}

.sheet .draggable-thumb {
    width: inherit;
    height: 0.25rem;
    background: var(--divider);
    border-radius: 0.125rem;
}

.sheet .close-sheet {
    border: none;
    padding: 0.7rem;
}*/

.sheet .controls {
    display: flex;
    margin-top: -12px;
}

.sheet .draggable-area {
    width: 3rem;
    margin: auto;
    padding: 1rem;
    cursor: grab;

}

.sheet .draggable-thumb {
    width: inherit;
    height: 0.25rem;
    background: var(--divider);
    border-radius: 0.125rem;
    position: relative;
    left: 1.4rem;
    top: 0.2rem;
}

.sheet .close-sheet {
    border: none;
    padding: 0.7rem;
    font-size: 2rem;
}

.sheet .body {
    flex-grow: 1;
    height: 100%;

    display: flex;
    flex-direction: column;

    overflow-y: auto;
    gap: 1rem;

    padding: 1rem;
    box-sizing: border-box;
}

form {
    gap: 1rem;
}



