* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

:root {
    font-size: 1px;
}

body {
    margin: 0px;
    padding: 0px;
    width: 100vw;
    height: 100%;
    overflow: hidden;
}

.root {
    position: absolute;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
}

#main {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#editorui.hide,
#modify.hide {
    display: flex !important;
    visibility: hidden;
    pointer-events: none;
}

.preload {
    opacity: 0;
    pointer-events: none;
    position: fixed;
    top: -1px;
    left: -1px;
    width: 0px;
    height: 0px;
}

#viewercontainer {
    position: relative;
    width: 100%;
    height: calc(100% - 355rem);
}

#switcher {
    position: relative;
    width: 100%;
    height: 355rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
}

#switcher .buttons {
    width: 100%;
    height: 132rem;
}

#variants {
    position: relative;
    width: fit-content;
    max-width: 100%;

    padding: 3rem 0rem 26rem 0rem;
    gap: 13rem;
}

#variants .spacer {
    width: 58rem;
    flex-shrink: 0;
}

.color-option {
    width: 58rem;
    height: 58rem;
    padding: 3rem;
    border-radius: 58rem;
    box-shadow: 0rem 0rem 3rem #aaaaaa;

    cursor: pointer;
    pointer-events: initial;

    flex: 0 0 58rem;
}

.color-option>div {
    aspect-ratio: 1;
    border-radius: inherit;
    font-size: 0rem;
    padding: 3rem;

    background-color: #ffffff;
    outline: 3rem solid transparent;
    transition: outline 0.2s;
}

.color-option.active>div {
    outline: 3rem solid #000000;
}

.color-option>div>div {
    aspect-ratio: 1;
    border-radius: inherit;
}

.scroll-x {
    overflow-x: scroll;
    scrollbar-width: thin;
    scrollbar-gutter: stable;
    scrollbar-color: #eeeeee transparent;
}

.scroll-y {
    overflow-y: scroll;
    scrollbar-width: thin;
    scrollbar-gutter: stable;
    scrollbar-color: #eeeeee transparent;
    max-height: 100%;
}

.hide {
    display: none !important;
}

.row {
    display: flex;
    flex-direction: row;
    width: 100%;
}

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

.align-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.space-between {
    justify-content: space-between;
}

.button {
    width: 100%;
    max-width: 450rem;
    margin: 0rem 26.5rem;
    height: 66rem;
    border-radius: 66rem;
    padding: 0rem 33rem;

    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10rem;

    background-color: #ff2060;
    color: #ffffff;
    font-family: 'Proxima Soft';
    font-size: 22rem;
    font-weight: 700;
    text-wrap: nowrap;
    text-align: center;

    cursor: pointer;
    pointer-events: initial;
}

.button .locale {
    overflow: hidden;
    text-overflow: ellipsis;
}

.button.small {
    margin: 0rem 50.5rem;
}

.button.minimal {
    width: fit-content;
    background-color: transparent;
    color: #000000;
    text-decoration: underline;
}

.button.slim {
    height: fit-content;
}

.w-100 {
    width: 100%;
}

.h-100 {
    height: 100%;
}

#cancel {
    position: absolute;
    top: 35rem;
    right: 32rem;
    z-index: 50;

    cursor: pointer;
    pointer-events: initial;
}

body {
    font-family: 'Proxima Soft';
    font-size: 22rem;
    line-height: 22rem;
    font-weight: 400;
}

h1 {
    font-family: 'MrAlex Bold';
    font-size: 32rem;
    line-height: 50rem;
    margin: 0;
}

h2 {
    font-family: 'Proxima Soft';
    font-size: 24rem;
    font-weight: 300;
    line-height: 50rem;
    margin: 0;
}

h1+h2 {
    flex: 1 0 auto;
    margin-left: 8rem;
}

h1+h2:not(:empty)::before {
    content: "-";
    margin-right: 8rem;
}

p {
    margin: 0;
    line-height: 150%;
}

a {
    outline: none;
}

strong {
    font-weight: 700;
}

dialog {
    outline: none;
    border: none;
    width: calc(100vw - 52rem);
    max-width: 600rem;
    max-height: calc(100vh - 52rem);
    padding: 0;
}

dialog::backdrop {
    background-color: rgba(0, 0, 0, 0.25);
}

dialog>div {
    margin: 40rem 30rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 20rem;
}

dialog .cancel {
    cursor: pointer;
    pointer-events: initial;
}

dialog .header {
    height: 50rem;
    align-items: center;
    justify-content: space-between;
}

#editorui {
    position: absolute;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: #ffffff;

    z-index: 20;
}

.editortools {
    flex: 0 0 432rem;
    height: 432rem;
    padding: 30rem 17.5rem;
}

.save {
    flex: 0 0 125rem;
}

.tabs {
    display: flex;
    flex-direction: column;
    gap: 8rem;
    flex: 0 0 86rem;
    width: 86rem;
    padding-right: 20rem;
    border-right: 1rem solid black;
}

.tab {
    width: 66rem;
    height: 100%;
    background-color: #eeeeee;
    transition: background-color 0.2s ease;

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

    cursor: pointer;
    pointer-events: initial;
}

.tab.active {
    background-color: #fbfbfb;
}

.tab-content {
    position: relative;
    width: 100%;
    padding-left: 20rem;
}

.tab-content>div {
    display: flex;
    flex-direction: column;
    gap: 20rem;
    height: 100%;
}

#help {
    cursor: pointer;
    pointer-events: initial;
}

#technique-content {
    display: flex;
    flex-direction: column;
    gap: 20rem;
    height: 100%;
}

.options {
    flex-wrap: wrap;
    row-gap: 5rem;
    gap: 15rem;
}

.option {
    height: 50rem;
    border-radius: 50rem;
    padding: 0rem 25rem;
    border: 2rem solid black;
    font-size: 22rem;
    font-weight: 700;
    color: #000000;
    background-color: transparent;

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

    cursor: pointer;
    pointer-events: initial;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.option.active {
    color: #ffffff;
    background-color: #000000;
}

#technique-fits {
    font-style: italic;
}

#text-content {
    display: flex;
    flex-direction: column;
    gap: 20rem;
    height: 100%;
}

#text-input {
    width: 100%;
    height: 50rem;
    padding: 13rem 16rem;
    outline: none;
    border: 1rem solid #000000;
    font-family: 'Proxima Soft';
    font-weight: 400;
    font-size: 22rem;
    line-height: 22rem;
    scrollbar-width: thin;
    scrollbar-gutter: stable;
    scrollbar-color: #eeeeee transparent;
    resize: none;
}

#text-input::placeholder {
    font-style: italic;
}

label[for="upload"] {
    width: 100%;
    height: 50rem;
    margin: 0rem 17rem;
    border-radius: 50rem;
    border: 2rem solid #000000;

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

    font-family: 'Proxima Soft';
    font-weight: 700;
    font-size: 22rem;
    line-height: 50rem;

    cursor: pointer;
    pointer-events: initial;
}

#icons {
    display: grid;
    grid-template-columns: repeat(auto-fit, 75rem);
    gap: 8.5rem;
    row-gap: 14rem;
    justify-items: center;
}

.icon {
    width: 75rem;
    aspect-ratio: 1;
    border-radius: 75rem;
    border: 2rem solid #000000;

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

    cursor: pointer;
    pointer-events: initial;
}

.icon svg {
    width: 50rem;
    height: 50rem;
}

#menus {
    flex-wrap: wrap;
    gap: 32rem;
    height: 100%;
}

#menus:not(:has(>:not(.hide))) {
    display: none;
}

#menus>div {
    width: 110rem;
    height: 72rem;
    flex: 0 0 110rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    pointer-events: initial;
}

#menus>div svg {
    flex: 1 1 auto;
}

#menus>div span {
    flex: 0 0 22rem;
}

#swatches {
    display: grid;
    grid-template-columns: repeat(auto-fit, 75rem);
    row-gap: 17rem;
    justify-items: center;
}

.font-option,
.align-option,
.positioning-option {
    aspect-ratio: 1;
    flex: 0 1 75rem;
    border-radius: 75rem;

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

    background-color: transparent;
    transition: background-color 0.2s ease;
}

.font-option:hover,
.align-option:hover,
.positioning-option:hover {
    background-color: #fbfbfb;
}

.font-option:active,
.font-option.active,
.align-option:active,
.align-option.active,
.positioning-option:active {
    background-color: #eeeeee;
}

.font-option span {
    line-height: 50rem;
    pointer-events: none;
}

#technique-none {
    text-wrap: wrap;
    cursor: default;
    text-decoration: none;
    font-style: italic;
    font-size: 17rem;
}

/* Editor */
#editorcontainer {
    position: relative;
    width: 100%;
    height: 100%;
    flex: 1 1 auto;
    overflow: hidden;
    padding: 40rem;
}

#editorcontainer .preview {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: #f2f2f2;
    background-repeat: no-repeat;
}

#editorcanvas {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#editorcanvas .canvas-container {
    border: 2px dashed #DCDCDC;
    box-sizing: content-box;
}

/* Textures */
#previewcontainer {
    position: absolute;
    width: auto;
    height: auto;
    left: 0;
    top: 0;
    display: none;
    pointer-events: none;
}

#texturecontainer {
    position: absolute;
    width: auto;
    height: auto;
    left: 0;
    top: 0;
    display: none;
    pointer-events: none;
}

#printcontainer {
    position: absolute;
    width: auto;
    height: auto;
    left: 0;
    top: 0;
    display: none;
    pointer-events: none;
}

/* Controls hint */
.controls {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    margin: 0rem;
    padding: 0rem;
    pointer-events: none;
    z-index: 10;
}

.controls .circle {
    position: relative;
    width: 80rem;
    height: 80rem;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 120rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: black;
    font-family: 'Proxima Soft';
    font-size: 14rem;
    font-weight: bold;
    padding: 12rem 0rem;
    box-sizing: border-box;

    opacity: 1;
    transition: opacity ease-out 0.3s;
}

.controls .circle.hide {
    opacity: 0;
}

.controls .animation {
    width: 48rem;
}