@font-face {
    font-family: "Hiragino Kaku Gothic Pro";
    src: url("../../assets/fonts/HiraginoKakuGo_Pro_latin.woff2") format("woff2");
    font-weight: 400;
}

@font-face {
    font-family: "Hiragino Kaku Gothic Pro";
    src: url("../../assets/fonts/HiraginoKakuGo_Pro_Bold_latin.woff2") format("woff2");
    font-weight: 600;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@keyframes fadeIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

body {
    font-family: var(--font-family);
    color: var(--sm-text, var(--text-color));
    background: var(--sm-bg, var(--bg-color));
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 100vh;
    text-align: center;
    overflow-wrap: break-word;
}

img,
svg,
video,
canvas,
iframe {
    max-width: 100%;
}

code {
    font-family: var(--mono-font);
    overflow-wrap: anywhere;
}

a:link {
    color: var(--link-color);
    transition: color 0.10s;
}

a:visited {
    color: var(--link-color);
}

a:hover {
    color: var(--link-hover-color);
}

main {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 1.25rem 4rem;
}

.main-content {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.5s ease-out;
}

.main-content>* {
    min-width: 0;
    width: 100%;
    max-width: 800px;
}

/*footnotes, captions, asides*/
.text-small {
    font-size: var(--text-sm);
    line-height: 1.5;
    color: var(--muted-color);
}

/*small lines turning into an error message*/
.text-small.is-error {
    color: var(--danger-color);
}

/*Shared control base*/
button,
.btn,
.button,
input,
textarea,
select,
input[type="file"]::file-selector-button,
input[type="file"]::-webkit-file-upload-button {
    padding: 0.25rem 0.5rem;
    border-radius: 0;
    background: var(--surface-color);
    font-family: var(--font-family);
    font-size: var(--text-md);
    transition: color 0.1s, border-color 0.1s, background-color 0.1s;
}

/*Buttons*/
button,
.btn,
.button,
input[type="file"]::file-selector-button,
input[type="file"]::-webkit-file-upload-button {
    border: 1px solid var(--link-color);
    color: var(--link-color);
    cursor: pointer;
}

button:hover,
.btn:hover,
.button:hover,
input[type="file"]::file-selector-button:hover,
input[type="file"]::-webkit-file-upload-button:hover {
    color: var(--text-color);
    border-color: var(--text-color);
}

button:active,
.btn:active,
.button:active,
input[type="file"]::file-selector-button:active,
input[type="file"]::-webkit-file-upload-button:active {
    color: #fff;
    border-color: var(--text-color);
    background: var(--link-color);
}

/*Inputs*/
input,
textarea,
select {
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

input::placeholder,
textarea::placeholder {
    color: var(--muted-color);
}

textarea {
    resize: vertical;
    min-height: 4rem;
}

/*Shared focus & disabled*/
button:focus-visible,
.btn:focus-visible,
.button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
input[type="file"]::file-selector-button:focus-visible,
input[type="file"]::-webkit-file-upload-button:focus-visible {
    outline: none;
    border-color: var(--link-color);
    box-shadow: 0 0 0 3px var(--highlight-color);
}

button:disabled,
.btn:disabled,
.button:disabled,
.button.disabled,
input:disabled,
textarea:disabled,
select:disabled,
input[type="file"]::file-selector-button:disabled,
input[type="file"]::-webkit-file-upload-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

input[type="file"]::file-selector-button,
input[type="file"]::-webkit-file-upload-button {
    margin-right: 0.5rem;
}

@media (max-width: 600px) {
    main {
        gap: 2rem;
        padding: 1.5rem 1rem 3rem;
    }

    .post-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        table-layout: fixed;
    }

    .post-content th,
    .post-content td {
        overflow-wrap: break-word;
        word-break: break-word;
    }

    .post-content th:first-child,
    .post-content td:first-child {
        width: 30%;
    }

    .post-content th:nth-child(2),
    .post-content td:nth-child(2) {
        width: 22%;
        white-space: nowrap;
    }

    .post-content th:last-child,
    .post-content td:last-child {
        width: 48%;
    }
}
