.alert {
    font-family: inherit;
    position: fixed;
    display: flex;
    z-index: 100001;
    overflow: show;
    margin: auto;
    inset: 0;
    text-align: center;
    color: inherit
}

.alert:before {
    content: "";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0009
}

.alert-message {
    align-self: center;
    color: inherit;
    position: relative;
    margin: auto;
    border-radius: 20px;
    padding: 10px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis
}

.alert-message .msg {
    display: flex;
    flex-direction: column;
    text-align: left;
    width: 310px;
    padding: 3px;
    margin: auto;
    overflow: hidden;
    text-overflow: ellipsis
}

.app {
    position: absolute;
    overflow: hidden;
    top: 0;
    left: 0;
    height: calc(100dvh - env(safe-area-inset-bottom));
    width: 100vw;
    bottom: 0;
    display: flex;
    flex-direction: column;
    overscroll-behavior: contain;
    text-align: center;
    color: inherit;
    background-color: inherit;
    user-select: none;
    touch-action: none
}

.header,
.footer {
    flex: 0 0 auto;
    height: 38px;
    line-height: 38px;
    z-index: 2;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: auto hidden;
    display: flex;
    justify-content: space-between;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right)
}

.header {
    padding-top: env(safe-area-inset-top);
    mask: linear-gradient(to bottom, rgba(0, 0, 0, 1) 90%, rgba(0, 0, 0, 0))
}

.footer {
    height: 30px;
    mask: linear-gradient(to top, rgba(0, 0, 0, 1) 90%, rgba(0, 0, 0, 0));
    align-items: center;
    justify-content: flex-end
}

.main {
    flex: 1 1 auto;
    overflow: hidden auto;
    display: flex;
    flex-direction: column;
    align-items: center
}

.btn_theme {
    position: absolute;
    top: env(safe-area-inset-top);
    right: env(safe-area-inset-right);
    z-index: 999;
    width: 50px
}

.btn_fullscreen {
    position: absolute;
    top: env(safe-area-inset-top);
    right: calc(env(safe-area-inset-right) + 30px);
    z-index: 999;
    width: 50px
}

.btn_theme:hover,
.btn_fullscreen:hover {
    filter: brightness(.8)
}

.container {
    flex: 1;
    height: 100%;
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    font-size: 15px
}

.editor {
    flex: 1;
    margin: 5px;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column
}

.editor #zoomable {
    width: 100%;
    height: 99%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center
}

.editor #pannable {
    max-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative
}

.editor #canvas {
    cursor: move
}

.sidebar {
    width: 360px;
    display: flex;
    flex-direction: column;
    margin: 15px;
    overflow-y: auto;
    position: relative
}

.menusections {
    margin-top: 25px
}

.section {
    background-color: light-dark(#e0e0e0, #222222);
    border-radius: 15px;
    padding: 10px;
    margin: 2px 0;
    font-size: 14px;
    height: 23px;
    transition: height .3s;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer
}

.section:hover {
    background-color: light-dark(#ededed, #292929)
}

.section b {
    color: gray
}

.section[selected] b {
    color: #ff8c00
}

.section[selected] {
    background-color: light-dark(#d4d4d4, #292929)
}

.section[skipped] {
    opacity: .5
}

.section .section_header {
    display: flex;
    justify-content: space-between;
    cursor: pointer
}

.section_content {
    flex: 1
}

.section_content .section_scroll {
    height: 100%
}

.section .section_skip {
    width: 20px;
    color: #ff8c00;
    cursor: cell
}

.section .done_btn,
.close_btn {
    position: absolute;
    top: 7px;
    right: 25px;
    height: 20px;
    width: 100px;
    padding: 0;
    background: #ff8c00
}

.section .close_btn {
    width: 40px;
    display: none
}

.section .section_skip:hover {
    filter: brightness(1.2)
}

.section .section_label {
    flex: 1;
    text-align: left
}

.section .skip {
    opacity: .2;
    pointer-events: none
}

.cc_container {
    display: flex;
    flex-direction: column
}

.rangelabel {
    width: 100px;
    text-align: left;
    color: gray
}

.reset_btn {
    font-weight: 700
}

.reset_btn[disabled] {
    font-weight: 400
}

.sidebar input[type=range] {
    appearance: none;
    cursor: pointer;
    border: 0;
    height: 4px;
    padding: 0;
    flex: 1;
    background-color: light-dark(#bbbbbb, #303030);

    &#lights_brightness {
        background: linear-gradient(90deg, #242424, #ccc)
    }

    &#lights_exposure {
        background: linear-gradient(90deg, #242424, #ccc)
    }

    &#lights_gamma {
        background: linear-gradient(90deg, #242424, #ccc)
    }

    &#lights_contrast {
        background: linear-gradient(270deg, #242424, #ccc)
    }

    &#lights_shadows {
        background: linear-gradient(270deg, #242424, #ccc)
    }

    &#lights_highlights {
        background: linear-gradient(90deg, #242424, #ccc)
    }

    &#lights_bloom {
        background: linear-gradient(90deg, #242424, #ccc)
    }

    &#colors_temperature {
        background: linear-gradient(90deg, #2c75d3, #ddbc57)
    }

    &#colors_tint {
        background: linear-gradient(to left, #3ae000, #9600e5)
    }

    &#colors_vibrance {
        background: linear-gradient(90deg, #7f7f7f, #827f7c, #818078, #798378, #6f867f, #69878b, #628a98, #48949b, #2d9d93, #27a57e, #43aa60, #74ac3e, #a8a823, #e0792a, #f8396b, #9900cd)
    }

    &#colors_saturation {
        background: linear-gradient(90deg, #7f7f7f, #827f7c, #818078, #798378, #6f867f, #69878b, #628a98, #48949b, #2d9d93, #27a57e, #43aa60, #74ac3e, #a8a823, #e0792a, #f8396b, #9900cd)
    }

    &#colors_sepia {
        background: linear-gradient(90deg, #242424, #ddbc57)
    }

    &#effects_vignette {
        background: linear-gradient(270deg, #242424, #ccc)
    }
}

.sidebar input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: gray
}

.sidebar input[type=range]::-moz-range-thumb {
    background-color: gray
}

.sidebar input[type=number].rangenumb {
    padding: 0;
    text-align: right;
    width: 50px;
    color: gray
}

.sidebar input[type=number]::-webkit-inner-spin-button,
.sidebar input[type=number]::-webkit-outer-spin-button {
    opacity: 0
}

.sidebar input[type=number]:focus::-webkit-inner-spin-button,
.sidebar input[type=number]:focus::-webkit-outer-spin-button,
.sidebar input[type=number]:hover::-webkit-inner-spin-button,
.sidebar input[type=number]:hover::-webkit-outer-spin-button {
    opacity: 1
}

.banner {
    margin: 5px;
    display: flex;
    align-items: center;
    width: 180px;
    justify-content: space-between
}

@media (orientation: portrait) {
    .alert-message .msg {
        max-width: 90vw !important
    }

    .footer {
        height: 1px;
        opacity: 0
    }

    .container {
        flex-direction: column
    }

    .sidebar {
        width: 95%;
        height: 210px;
        margin: 5px auto;
        justify-content: end
    }

    .menusections {
        display: flex;
        flex-direction: row;
        overflow: auto hidden;
        -ms-overflow-style: none;
        scrollbar-width: none;
        align-items: flex-end;
        height: 90px !important
    }

    .section {
        overflow: hidden;
        transition: unset;
        flex-direction: column-reverse;
        margin: 0 2px;
        position: unset
    }

    .section_skip {
        display: none
    }

    .done_btn {
        top: 0 !important;
        right: 5px !important;
        margin: 0
    }

    .close_btn {
        top: 0 !important;
        right: 5px !important;
        margin: 0;
        display: unset !important
    }

    .reset_btn {
        margin-left: 5px
    }

    .section_content {
        position: absolute;
        left: 0;
        bottom: 48px;
        right: 0;
        height: 120px;
        background-color: inherit;
        overflow: auto;
        padding: 30px 10px 10px;
        border-radius: 15px
    }

    #curve_content {
        padding: 10px;
        height: 140px
    }

    .section_content:before {
        content: " .";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        color: transparent;
        background-color: light-dark(#c2c2c2, #242424)
    }

    .section_content hr:first-child {
        display: none
    }

    .section_scroll {
        height: 100%;
        overflow: hidden auto;
        -ms-overflow-style: none;
        scrollbar-width: none
    }

    #curve_content .section_scroll {
        overflow: hidden
    }

    .sidebar input[type=number].rangenumb {
        pointer-events: none
    }

    .cc_container {
        margin-top: 4px
    }
}

#crop {
    position: absolute
}

.cropcorner {
    z-index: 2 !important
}

#croprect {
    border: solid 1px light-dark(black, white);
    background-size: 33.33333% 33.33333%;
    background-image: linear-gradient(to right, grey 1.5px, transparent 1px), linear-gradient(to bottom, grey 1.5px, transparent 1px);
    position: absolute;
    box-shadow: 0 0 0 9999px light-dark(rgba(255, 255, 255, .8), rgba(0, 0, 0, .8));
    cursor: move;
    max-height: 100%;
    max-width: 100%
}

#croprect div {
    position: absolute;
    width: 40px;
    height: 40px;
    border-color: light-dark(black, white);
    border-style: solid
}

#croprect #top_left {
    top: 0;
    left: 0;
    border-width: 3px 0px 0px 3px;
    cursor: nwse-resize
}

#croprect #top_right {
    top: 0;
    right: 0;
    border-width: 3px 3px 0px 0px;
    cursor: nesw-resize
}

#croprect #bottom_right {
    bottom: 0;
    right: 0;
    border-width: 0px 3px 3px 0px;
    cursor: nwse-resize
}

#croprect #bottom_left {
    bottom: 0;
    left: 0;
    border-width: 0px 0px 3px 3px;
    cursor: nesw-resize
}

#croprect #top {
    top: 0;
    right: calc(50% - 20px);
    border-width: 3px 0px 0px 0px;
    cursor: ns-resize
}

#croprect #bottom {
    bottom: 0;
    right: calc(50% - 20px);
    border-width: 0px 0px 3px 0px;
    cursor: ns-resize
}

#croprect #left {
    top: calc(50% - 20px);
    left: 0;
    border-width: 0px 0px 0px 3px;
    cursor: ew-resize
}

#croprect #right {
    top: calc(50% - 20px);
    right: 0;
    border-width: 0px 3px 0px 0px;
    cursor: ew-resize
}

#splitview_container {
    position: absolute;
    display: flex
}

#splitview_container #splitview {
    width: 100%;
    height: 100%;
    pointer-events: none
}

#splitview_container #splitview_bar {
    position: absolute;
    width: 5px;
    height: 100%;
    background-color: #607d8b8c;
    pointer-events: none
}

#cccolors {
    margin: 10px auto auto
}

.clrspace {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid
}

.clrspace.selected {
    border: 3px solid
}

button:focus.clrspace.selected {
    border-color: inherit
}

html {
    overscroll-behavior: none;
    overflow: hidden
}

body {
    margin: 0;
    user-select: none;
    -webkit-user-select: none;
    height: 100vh
}

a {
    text-decoration: none;
    padding: 1px;
    color: inherit;
    cursor: pointer
}

a:visited {
    color: inherit
}

a[disabled] {
    color: gray
}

button,
.btn {
    outline: none;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: border-color .25s;
    height: 40px;
    margin: 5px;
    width: 150px;
    opacity: .8
}

button[selected] {
    border-color: #ff8c0080;
    opacity: 1
}

button:focus {
    opacity: 1
}

a:hover,
button:hover,
.btn:hover {
    outline: none;
    border-color: #ff8c0099
}

input,
select {
    appearance: none;
    outline: none;
    border-style: solid;
    border-radius: 7px;
    border-width: 1px;
    border-color: transparent;
    padding: 5px;
    background: transparent;
    opacity: .8
}

input:hover,
select:hover {
    border-color: #ff8c0099;
    opacity: 1
}

input:focus {
    border-color: #ff8c00b3 !important;
    opacity: 1
}

select {
    background-image: url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%208%207'%3e%3cpath%20d='M3.646%205.354l-3-3%20.708-.708L4%204.293l2.646-2.647.708.708-3%203L4%205.707l-.354-.353z'%20fill='%23a1a2aa'%20stroke='none'/%3e%3c/svg%3e");
    background-size: 8px;
    background-repeat: no-repeat;
    background-position: calc(100% - .35em) center;
    cursor: pointer
}

.hidden {
    display: none !important
}

.noscrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
    overflow-y: scroll
}

.noscrollbar::-webkit-scrollbar {
    display: none
}

.alert-message {
    color: light-dark(rgba(0, 0, 0, .87), rgba(255, 255, 255, .87));
    background-color: light-dark(#e0e0e0, #191919)
}

:root {
    font-family: -apple-system, system-ui;
    font-size: 1.2em;
    line-height: 1.5;
    font-weight: 400;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
    --sat: env(safe-area-inset-top);
    --sar: env(safe-area-inset-right);
    --sal: env(safe-area-inset-left);
    --sab: env(safe-area-inset-bottom);
    color-scheme: light dark
}

#root,
body {
    color: light-dark(#213547, rgba(255, 255, 255, .87));
    background-color: light-dark(#ffffff, #191919)
}

button,
.btn {
    background-color: light-dark(#b6b5b5, #353535);
    color: #fff
}

button:disabled,
.btn:disabled {
    color: light-dark(rgba(16, 16, 16, .3), rgba(255, 255, 255, .3));
    fill: gray !important
}

input,
select {
    background-color: light-dark(#edecec, #303030)
}

input[type=range] {
    background-color: light-dark(#bbbbbb, #303030)
}

hr {
    border: 1px solid;
    border-color: light-dark(#f0f0f0, #2e2e2e)
}

header {
    background: light-dark(linear-gradient(#fff, #fff0), linear-gradient(#000, #0000))
}

footer {
    background: light-dark(linear-gradient(#fff0, #fff), linear-gradient(#0000, #000))
}

.dark {
    color-scheme: dark
}

.light {
    color-scheme: light
}

.hydra {
    background-color: #ffff00bf;
    border: thin dotted red !important
}

#shadowroot {
    display: none
}

#newroot {
    border: solid red thin;
    display: none
}

#derror {
    background-color: #f08080;
    white-space: break-spaces;
    position: fixed;
    inset: 0;
    margin: 5px;
    padding: 10px;
    z-index: 99999
}
