@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

:root{
    --font-family: "covik-sans", "Pretendard", "Apple SD Gothic" ,"Arial", sans-serif;
    --btn-font: "covik-sans","Segoe UI Symbol", monospace;
    --font-size: calc(0.8vh + 10px);
    --h1-size: 1.5rem;
    --h2-size: 1.2rem;
    --h3-size: 1.0rem;
    --normal-size: 0.95rem;
    --small-size: 0.85rem;
    --color: black;
    --bgColor: White;
    --color-bk: black;
    --color-b: blue;
    --color-w: white;
    --shade-1: #ddf;
    --shade-2: #bbf;
    --shade-3: #99f;
    --shade-4: #77f;
    --shade-5: #55f;
    --shade-6: #33f;
    --shade-7: #11f;
    --border-2px: 2px;
    --border-1px: 1px;
    --btn-size: 1.1rem;
}
*{
    margin: 0;
    box-sizing:border-box;
    font-family: var(--font-family);
    font-size: var(--font-size);

    scrollbar-width: thin;
    scrollbar-color: var(--color-b) var(--color-w)
}

::-webkit-scrollbar {
    margin-bottom: 10px;
    width: 0.5rem;
}

::-webkit-scrollbar-track {
    margin: 10px 0;
    box-sizing: border-box;
    border:none;
    z-index: 0;
}

::-webkit-scrollbar-thumb {
    background-color: var(--color-b);
}
body{
    width: 100vw;
    height: 100vh;
    container-type: inline-size;
    container-name: body;
}
main{
    width: 100%;
    height: 100%;
    overflow: hidden;
}
#landing{
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.7rem;
}
#landing *{
    flex: 0 0 5rem;
    border: none;
    outline: none;
    font-size: 5rem;
    font-weight: 900;
    line-height: 1;
    user-select: none;
    vertical-align: text-top;
}
#landing p:nth-child(odd){
    position: relative;
    top:-0.5rem;
}
#landing label{
    display: inline-flex;
    border: 10px dashed var(--color-bk);
    border-radius : 1rem;
    padding: 0 20px 10px;
    cursor: pointer;
}
#landing label:hover, #landing label:active{
    color: var(--shade-6);
    border-color: var(--shade-6);
}
#uploadfont{
    display: none;
}
#font-preview{
    width: 100%;
    height: 100%;
    align-items: center;
    overflow: auto;
    flex: 1 1 calc(90vw - 200px);
    font-family: preview, sans-serif;
    flex-direction: column;
    text-align: center;
    justify-content: center;
}
@font-palette-values --custom {
    font-family: preview;
    base-palette: 1;
    override-colors:
        0 #c1cbed,
        1 #ff3a92,
        7 #000000; 
}
#userText{
    padding: 30px;
    width: 100%;
    outline: none;
    word-break: break-word;
    overflow-y: auto;
    font-palette: --custom;
    font-palette: normal;
}
#userText > div{
    font-size: inherit;
    font-family: inherit;
}
[contentEditable]{
    -webkit-user-modify: read-write-plaintext-only;
}
.flex{
    display: flex
}
control-bar{
    display: flex;
    position: relative;
    flex: 1 1 calc(10vw + 200px );
    flex-direction: column;
    outline: var(--border-2px) solid var(--color-b);
    border-right: none;
    border-top-left-radius: 15px;
    border-bottom-left-radius: 15px;
    color: var(--color-b);
    margin: 10px 0;
    padding: 10px;
    gap:8px;
    overflow: auto;
    background: var(--color-w);
    min-width: 300px;
    max-width: 50vw;
    user-select: none;
}
control-bar::before{
    content: '';
    display: flex;
    width: 8px;
    height: calc(100% - 40px);
    position: absolute;
    left: -3px;
    cursor: col-resize;
}
control-bar::after{
    all: unset;
}
tool-box{
    display: flex;
    flex-direction: column;
    border:var(--border-2px) solid var(--color-b);
    border-radius : 5px;
    padding: 7px 10px;
    gap:5px;
}
toolbox-header h1{
    padding-bottom: 10px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    font-size: var(--h1-size);
}
toolbox-header select{
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: transparent;
    background-image: url("data:image/svg+xml,<svg width='25' height='25' xmlns='http://www.w3.org/2000/svg'><path fill='blue' d='m0,8l8,8L16,8H8Z'/></svg>");
    background-position-x: 100%;
    background-repeat: no-repeat;
    width: 100%;
    border: var(--border-2px) solid var(--color-b);
    border-radius: 3px;
    color: var(--color-b);
    height: var(--h1-size);
    font-size: var(--h3-size);
    margin-bottom: 5px;
    padding-left: 5px;
}
toolbox-header select:focus{
    outline:none;
}
toolbox-header select option{
    color: var(--color-b);
    height: 1.5rem;
}
toolbox-header select:disabled{
    background-color: var(--shade-1);
    color: var(--shade-7);
}
.toolBoxName{
    font-size: var(--h2-size);
    padding-bottom: 13px;
}
.rangeHeader{
    justify-content: space-between;
    padding: 3px;
}
.rangeHeader label span{
    font-size: var(--small-size);
    padding-left: 5px;
    vertical-align: top;
}
.rangeContent {
    align-items: center;
    gap: 5px;
}
button{
    appearance: none;
    -moz-appearance: none;
    -webkit-appearance: none;
    outline: none;
    color:var(--color-b);
    background-color: var(--color-w);
    cursor:pointer;
    font-family : var(--btn-font);
}
button:hover{
    color: var(--shade-3);
}
.rangeContent button{
    padding: 3px;
    flex: 1 1 var(--btn-size);
    min-width: var(--btn-size);
    max-width: var(--btn-size);
    height: var(--btn-size);
    border: none;
    background-origin: border-box;
    display: flex;
    align-items: center;
    font-size: var(--small-size);
}
.rangeContent button.playing{
    padding: 1px;
}
.rangeContent button.paused::before{
    content:"▶️";
}
.rangeContent button.playing::before{
    content:"■";
}

.sliderRange{
    width:98%;
}
.sliderLabel{
    font-size: var(--normal-size);
    font-family: "covik-sans-mono";
    width: 4rem;
    height: 1.4rem;
    text-align:right;
}
.animationPlayer{
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}
.animationPlayer button{
    flex: 1 1 50%;
    height: var(--h1-size);
    border-radius: 3px;
    border: var(--border-2px) solid var(--color-b);
    display: flex;
    gap:7px;
    align-items: center;
    justify-content: center;
}
.animationPlayer button.paused:first-child::before{
    content:"▶️ ";
    font-size: var(--small-size);
}
.animationPlayer button.playing:first-child::before{
    content:"■ ";
    font-size: var(--small-size);
}
.animationPlayer button:last-child::before{
    content: "↻";
    font-size: larger;
    font-weight: bold;
    position: relative;
    bottom: 0.07rem;
}
feature-block, color-block{
    height: 1.2rem;
    display: flex;
    margin-bottom: 5px;
    gap: 10px;
    
}
feature-block *:nth-child(1){
    flex: 1 0 5%;
    cursor:pointer;
}
feature-block *:nth-child(2){
    flex: 1 1 80%;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    cursor:pointer;
    height: 25px;
}
feature-block *:nth-child(3){
    flex: 1 0 10%;
}
feature-block input[type=checkbox]{
    border : var(--border-2px) solid var(--color-b);
}
color-block{
    align-items: center;
}
color-block *:nth-child(1){
    flex: 1 1 50%;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}
color-block *:nth-child(2){
    flex: 1 0 40%;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    cursor:pointer;
    font-feature-settings: "tnum";
}
color-block *:nth-child(3){
    margin-left: 5px;
    flex: 1 0 10%;
}

@container body (max-width: 768px) {
    *::-webkit-scrollbar-track {
        /* border-bottom-right-radius: 0.5em; */
        border-bottom: none;
    }
    main{
        flex-direction: column-reverse;
    }
    #font-preview{
        flex: 60vh;
    }
    control-bar{
        min-width : unset;
        max-width : unset;
        flex: 40vh;
        border-top: none;
        border-top-left-radius:0;
        margin: 0 10px;
        border-bottom-left-radius: 15px;
        border-bottom-right-radius: 15px;
        min-height: 400px;
        max-height: 60vh;
    }
    control-bar::before{
        all : unset;
    }
    control-bar::after{
        content: '';
        display: flex;
        width: calc(100% - 40px);
        height : 8px;
        left:0;
        bottom: -3px;
        position: absolute;
        cursor: row-resize;
    }
    
}

input[type=range] {
    height: var(--h2-size);
    -webkit-appearance: none;
    width: 100%;
    background-color: transparent;
  }
  input[type=range]:focus {
    outline: none;
  }
  input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: var(--border-2px);
    cursor: pointer;
    animate: 0.2s;
    background: var(--color-b);
    border: 0px solid var(--color-b);
  }
  input[type=range]::-webkit-slider-thumb {
    border: var(--border-2px) solid var(--color-b);
    height: var(--btn-size);
    width: var(--btn-size);
    border-radius: 35px;
    background: var(--color-w);
    cursor: pointer;
    -webkit-appearance: none;
    margin-top: calc(var(--btn-size)/-2);
  }
  input[type=range]:focus::-webkit-slider-runnable-track {
    background: var(--color-b);
  }
  input[type=range]::-moz-range-track {
    width: 100%;
    height: var(--border-2px);
    cursor: pointer;
    animate: 0.2s;
    background: var(--color-b);
    border-radius: 0px;
    border: 0px solid var(--color-b);
  }
  input[type=range]::-moz-range-thumb {
    border: var(--border-2px) solid var(--color-b);
    height: var(--btn-size);
    width: var(--btn-size);
    border-radius: 35px;
    background: var(--color-w);
    cursor: pointer;
  }
  input[type=range]::-ms-track {
    width: 100%;
    height: var(--border-2px);
    cursor: pointer;
    animate: 0.2s;
    background: transparent;
    border-color: transparent;
    color: transparent;
  }
  input[type=range]::-ms-fill-lower {
    background: var(--color-b);
    border: 0px solid var(--color-b);
    border-radius: 0px;
  }
  input[type=range]::-ms-fill-upper {
    background: var(--color-b);
    border: 0px solid var(--color-b);
    border-radius: 0px;
  }
  input[type=range]::-ms-thumb {
    margin-top: var(--border-2px);
    border: var(--border-2px) solid var(--color-b);
    height: var(--btn-size);
    width: var(--btn-size);
    border-radius: 35px;
    background: var(--color-w);
    cursor: pointer;
  }
  input[type=range]:focus::-ms-fill-lower {
    background: var(--color-b);
  }
  input[type=range]:focus::-ms-fill-upper {
    background: var(--color-b);
}

input[type=text]{
    border: none;
    border-radius: 0.7rem;
    outline: none;
    padding: 0 8px;
    color: var(--color-b);
    background-color: transparent;
}
 
input[type=text]:focus{
    background-color: var(--shade-1);
}
input[type="color"] {
    box-sizing: content-box;
    appearance: none;
    -moz-appearance: none;
    -webkit-appearance: none;
    background: none;
    border: 0;
    cursor: pointer;
    height: var(--btn-size);
    padding: 0;
    max-width: var(--btn-size);
  }

  ::-webkit-color-swatch-wrapper {
    padding: 0;
  }
  
  ::-webkit-color-swatch{
    border: var(--border-2px) solid var(--color-b);
    border-radius: calc(var(--btn-size)/2);
  }
  
  ::-moz-color-swatch,
  ::-moz-focus-inner{
    border: var(--border-2px) solid var(--color-b);
  }
  
  ::-moz-focus-inner{
    padding: 0;
}
input[type="checkbox"]{
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    outline: var(--color-b) 1px solid;
    border-radius: 50%;
    height: var(--btn-size);
    min-width: var(--btn-size);
    max-width: var(--btn-size);
}
input[type="checkbox"]:checked{
    background-color: var(--color-b);
}
input[type="file"]{
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
@media not all and (min-resolution: .001dpcm)
{ @supports(-webkit-appearance:none) and (stroke-color: transparent){
    control-bar{
        outline:none;
        border: var(--border-2px) solid var(--color-b);
        border-right:none;
    }
    input[type="checkbox"]{
        outline:none;
        border: var(--border-2px) solid var(--color-b);
    }
    
}}