@font-face {
    font-family: "pretendard";
    src: url("/assets/fonts/pretendard/Pretendard-Regular.otf") format("opentype");
    font-weight: 400;
}

@font-face {
    font-family: "pretendard";
    src: url("/assets/fonts/pretendard/Pretendard-Bold.otf") format("opentype");
    font-weight: 700;
}

@font-face {
    font-family: "helvetica";
    src: url("/assets/fonts/helvetica/HelveticaNeueLTPro-Roman.otf") format("opentype");
    font-weight: 400;
}

@font-face {
    font-family: "helvetica";
    src: url("/assets/fonts/helvetica/HelveticaNeueLTPro-It.otf") format("opentype");
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: "helvetica";
    src: url("/assets/fonts/helvetica/HelveticaNeueLTPro-Md.otf") format("opentype");
    font-weight: 700;
}

@font-face {
    font-family: "helvetica";
    src: url("/assets/fonts/helvetica/HelveticaNeueLTPro-MdIt.otf") format("opentype");
    font-weight: 700;
    font-style: italic;
}

:root {
    --std: calc(16px * 1.5);
}

* {
    margin: 0;
    padding: 0;
    -webkit-box-sizing: border-box;
            box-sizing: border-box;
    line-height: 1;
    list-style-type: none;
    text-decoration: inherit;
    text-transform: inherit;
    font-family: "pretendard", sans-serif;
    font-size: inherit;
    font-weight: inherit;
    word-break: keep-all;
    color: inherit;
}

html {
    font-size: 16px;
}

*, html, body {
    -webkit-text-size-adjust: 100%;
       -moz-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
            text-size-adjust: 100%;
}

body {
    background-color: rgb(250, 250, 250);
}

.helv {
    font-family: "helvetica", sans-serif;
    letter-spacing: 0.0125em;
}

/* app */
#main-header {
    padding: 0 calc(var(--std) * 1.0);
    position: fixed;
    width: 100%;
    height: calc(var(--std) * 3.0);
    bottom: 0;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
    font-size: 1.25rem;
    background-color: rgb(250, 250, 250);
}

#main-header::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: calc(var(--std) * 3.0);
    width: 100%;
    height: calc(var(--std) * 5.0);
    background: rgb(250, 250, 250);
    background: -webkit-gradient(linear, left bottom, left top, from(rgba(250, 250, 250, 1)), to(rgba(250, 250, 250, 0)));
    background: -o-linear-gradient(bottom, rgba(250, 250, 250, 1) 0%, rgba(250, 250, 250, 0) 100%);
    background: linear-gradient(0deg, rgba(250, 250, 250, 1) 0%, rgba(250, 250, 250, 0) 100%);
    z-index: -10;
}

#app.login #main-header {
    background-color: rgb(220, 220, 220);
}

#app.login #main-header::before {
    background: rgb(220, 220, 220);
    background: -webkit-gradient(linear, left bottom, left top, from(rgba(220, 220, 220, 1)), to(rgba(220, 220, 220, 0)));
    background: -o-linear-gradient(bottom, rgba(220, 220, 220, 1) 0%, rgba(220, 220, 220, 0) 100%);
    background: linear-gradient(0deg, rgba(220, 220, 220, 1) 0%, rgba(220, 220, 220, 0) 100%);
}

#app.login #main-header * {
    color: rgb(0, 0, 0);
}

#profile > .item-profile:nth-child(2) {
    display: none;
}

#app.login #profile > .item-profile:nth-child(1) {
    display: none;
}

#app.login #profile > .item-profile:nth-child(2) {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
}

#write > strong {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
}

#write > strong:nth-child(1)::after {
    margin: 0 0.5em;
    content: "";
    width: 1px;
    height: calc(var(--std) * 0.75);
    background-color: rgb(180, 180, 180);
    display: inline-block;
}

#main-header button {
    font-size: 1.25rem;
    height: calc(var(--std) * 1.0);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
}

#buttons {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
}

.item-buttons {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: calc(var(--std) * 0.5);
}

#buttons > .item-buttons:nth-child(2) {
    display: none;
}

#app.login #buttons > .item-buttons:nth-child(1) {
    display: none;
}

#app.login #buttons > .item-buttons:nth-child(2) {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
}

.item-buttons > input {
    font-size: 1.25rem;
    border-bottom: 1px solid rgb(180, 180, 180);
    width: 75px;
    max-width: calc(var(--std) * 5.0);
    text-align: center;
}

input::-webkit-input-placeholder {
    font-size: 1.25rem;
    color: rgb(180, 180, 180, 180, 180, 180, 180, 180, 180);
}

input::-moz-placeholder {
    font-size: 1.25rem;
    color: rgb(180, 180, 180, 180, 180, 180, 180, 180, 180);
}

input:-ms-input-placeholder {
    font-size: 1.25rem;
    color: rgb(180, 180, 180, 180, 180, 180, 180, 180, 180);
}

input::-ms-input-placeholder {
    font-size: 1.25rem;
    color: rgb(180, 180, 180, 180, 180, 180, 180, 180, 180);
}

input::placeholder {
    font-size: 1.25rem;
    color: rgb(180, 180, 180, 180, 180, 180, 180, 180, 180);
}

input:focus {
    background-color: transparent;
}

#main-content {
    margin-bottom: calc(var(--std) * 8.0);
    padding: calc(var(--std) * 1.0);
    width: 100%;
    height: auto;
}

#posts {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
        flex-wrap: wrap;
    gap: calc(var(--std) * 2.0) calc(var(--std) * 1.0);
}

.post {
    width: calc((100% - var(--std) * 3.0) / 4);
}

.post .heading {
    border-top: 1px solid rgb(180, 180, 180);
    margin-bottom: calc(var(--std) * 1.0);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
    height: calc(var(--std) * 1.75);
}

.post p {
    line-height: 1.5;
    color: rgb(50, 50, 50);
}

.post img {
    max-width: 100%;
}

/* modal */
#cont-editor {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(220, 220, 220, 0.9);
    z-index: 999;
    display: none;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
}

#cont-editor.active {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
}

.modal {
    position: relative;
    width: 100%;
    height: auto;
    max-width: 540px;
    height: auto;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    overflow: hidden;
    -webkit-box-shadow: 0px 0px 16px rgba(100, 100, 100, 0.1);
            box-shadow: 0px 0px 16px rgba(100, 100, 100, 0.1);
}

#close-editor {
    position: absolute;
    right: 0;
    width: calc(var(--std) * 1.75);
    height: calc(var(--std) * 1.75);
    background-color: rgb(0, 0, 0);
    color: rgb(255, 255, 255);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
}

#editor {
    width: 100%;
    height: calc((calc(var(--vh, 1vh) * 100)) - var(--std) * (1.75 * 2.0) - var(--std) * 6.0);
}

.ql-toolbar.ql-snow, .ql-container.ql-snow {
    width: 100%;
    border: none !important;
}

.ql-toolbar.ql-snow {
    background-color: rgb(240, 240, 240);
    height: calc(var(--std) * 1.75);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
}

.ql-container.ql-snow {
    background-color: rgb(255, 255, 255);
}

.ql-snow .ql-tooltip {
    left: 15px !important;
}

.ql-editor * {
    font-size: 1rem;
    line-height: 1.5;
}

#form {
    width: 100%;
    max-width: 540px;
}

#publish {
    width: 100%;
    height: calc(var(--std) * 1.75);
    background-color: rgb(0, 0, 0);
    color: rgb(255, 255, 255);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
}

/* login */

/* common */
button, input {
    all: unset;
    background-color: transparent;
    border: none;
    border-radius: 0px;
    font-size: 1rem;
}

p a {
    border-bottom: 1px solid rgb(180, 180, 180);
}

a:hover, button:hover {
    cursor: pointer;
    opacity: 0.5;
}

strong {
    font-weight: 700;
    color: rgb(0, 0, 0);
}

em {
    font-style: italic;
}

u {
    text-decoration: underline;
}

pre {
    white-space: pre-wrap;
    word-break: break-word;
}

.ql-snow .ql-tooltip {
    border: 1px solid rgb(220, 220, 220) !important;
    box-shadow: none !important;
}

.ql-snow .ql-tooltip input[type=text] {
    border: 1px solid rgb(220, 220, 220) !important;
    font-size: 0.8rem !important;
}

.ql-snow .ql-tooltip input[type=text]::placeholder {
    opacity: 0;
}

.ql-snow .ql-tooltip[data-mode=link]::before {
    content: "링크" !important;
    font-size: 0.8rem;
    margin-right: 12px;
}

.ql-snow .ql-tooltip.ql-editing a.ql-action::after {
    content: "연결" !important;
    font-size: 0.8rem;
    margin-left: 12px;
}

/* responsive */
@media screen and (max-width: 1400px) {
    .post {
        width: calc((100% - var(--std) * 2.0) / 3);
    }
}

@media screen and (max-width: 1000px) {
    .post {
        width: calc((100% - var(--std) * 1.0) / 2);
    }
}

@media screen and (max-width: 700px) {
    .post {
        width: 100%;
    }
}

@media screen and (max-width: 540px) {
    :root {
        --std: calc(16px * 1.25);
    }

    html {
        font-size: 15px;
    }

    #editor {
        height: calc(var(--vh, 1vh) * 100);
    }

    input::-webkit-input-placeholder{
        font-size: 1rem;
    }

    input::-moz-placeholder{
        font-size: 1rem;
    }

    input:-ms-input-placeholder{
        font-size: 1rem;
    }

    input::-ms-input-placeholder{
        font-size: 1rem;
    }

    #main-header,
    #main-header button,
    .item-buttons > input,
    input::placeholder{
        font-size: 1rem;
    }

    .item-buttons {
        gap: calc(var(--std) * 0.375);
    }

    .item-buttons > input {
        width: 50px;
    }
}

/* grid */
#cont-grid {
    display: none;
}

#cont-grid.active {
    display: block;
}

#cont-grid, .grid {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
}

.grid:nth-child(1) {
    top: calc(var(--std) * 1.0);
    left: 0;
    width: 100%;
    height: 1px;
    background-color: rgb(255, 0, 255);
}

.grid:nth-child(2) {
    top: 0;
    right: calc(var(--std) * 1.0);
    width: 1px;
    height: 100%;
    background-color: rgb(255, 0, 255);
}

.grid:nth-child(3) {
    bottom: calc(var(--std) * 1.0);
    left: 0;
    width: 100%;
    height: 1px;
    background-color: rgb(255, 0, 255);
}

.grid:nth-child(4) {
    top: 0;
    left: calc(var(--std) * 1.0);
    width: 1px;
    height: 100%;
    background-color: rgb(255, 0, 255);
}