@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400..700&family=Dela+Gothic+One&family=Geist+Mono:wght@100..900&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

* {
    box-sizing: border-box;
}

html {
    padding: 0;
}
body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background-color: black;
    background-size: cover;
    background-position: center;
    font-family: 'Inter', sans-serif;
    padding: 32px;
    color: white;

    --color-primary: #e96dff;
    --color-primary-t1: #e96dff77;
    --color-primary-hover: #f2a7ff;
    --color-primary-hover-mid: #ed86ff;
    --color-primary-active: #bf4cd3;
    --color-hint: #9042a6;
}
body.commentary {
    background-image: url('/assets/bg0.jpg');
    font-family: 'Geist Mono', monospace;
}
body.forum {
    background-color: #14091c;
    background-image: url('/assets/bg1.png');
    background-size: 50px;
    background-repeat: repeat;
}
body.root {
    background-image: url('/assets/bg2.jpg');
    --color-primary: #ffd279;
    --color-primary-t1: #ffd27977;
    --color-primary-hover: #fff0d2;
    --color-primary-hover-mid: #ffe4af;
    --color-primary-active: #ffb546;
    --color-hint: #6c73cb;
}
body.dark {
    background: #030417;
}
body.light {
    background: #fff;
    color: black;

    --color-primary: #0f8bc0;
    --color-primary-t1: #0f8bc0aa;
    --color-primary-hover: #12b7fd;
    --color-primary-hover-mid: #119bd6;
    --color-primary-active: #096c96;
    --color-hint: #88909e;
}

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

main ul, .mainlike ul {
    line-height: 1.4;
    font-size: 18px;
}

p + ul {
    margin-top: -10px;
    margin-bottom: 24px;
}

.button {
    padding: 4px 16px;
    font-size: 16px;
    font-family: 'Geist Mono', monospace;
    font-weight: 600;
    background: #35184a;
    border: 1px solid var(--color-primary);
    color: var(--color-primary-hover);
    cursor: pointer;
}
.button:hover {
    background: #492365;
    border: 1px solid var(--color-primary-hover);
    color: #fff;
}
.button:active {
    background: #35184a;
    border: 1px solid var(--color-primary);
    color: #fff;
}

body.light .button {
    color: #000c;
    background: #0002;
    border-color: black;
}
body.light .button:hover {
    color: #000;
    background: #0003;
}
body.light .button:active {
    background: #0004;
}

.button.big {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    font-size: 20px;
}

.button.primary {
    background: var(--color-primary);
    color: #000;
}
.button.primary:hover {
    background: var(--color-primary-hover-mid);
}
.button.primary:active {
    background: var(--color-primary-active);
    color: #fff;
}


body.light .button.primary {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}
body.light .button.primary:hover {
    background: var(--color-primary-hover-mid);
}
body.light .button.primary:active {
    background: var(--color-primary-active);
}

.navigation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    font-family: 'Geist Mono', monospace;
    color: #fff;
}
.navigation-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 32px;
    width: 100%;
    height: 100%;
    max-width: 784px;
    margin: 0 auto;         
}

.navigation-logo > img {
    height: 50px;
    translate: 0 5px;
}

.navigation-list {
    display: flex;
    list-style: none;
    gap: 8px;
    padding: 0;
    margin: 0;
}
.navigation-item {
    font-size: 16px;
    text-decoration: none;
    display: flex;
    cursor: pointer;
}
.navigation-item a {
    color: currentColor;
    text-decoration: none;
}
.navigation-item a:hover {
    text-decoration: underline;
    color: var(--color-primary);
}
.navigation-item::after {
    content: '|';
    opacity: 0.5;
    margin-left: 8px;
}
.navigation-item:last-child::after {
    content: none;
}
.navigation-item.icon {
    opacity: 0.6;
}
.navigation-item.icon:hover {
    opacity: 1;
}

.navigation-space {
    height: 70px;
}

body.wide .navigation-inner {
    max-width: 1064px;
}

body.light .navigation {
    color: #000;
}
body.light .navigation-logo > img {
    filter: invert(1);
}
body.light .navigation-item.icon > img {
    filter: invert(1);
}
body.light .navigation-item a:hover {
    color: #0f8bc0ff;
}

body.top {
    justify-content: flex-start;
}

main, .mainlike {
    width: 100%;
    max-width: 720px;
    overflow: hidden;
}
body.wide main, body.wide .mainlike {
    max-width: 1000px;
    overflow: visible;
}
body.noclip main, body.noclip .mainlike {
    overflow: visible;
}

body.forum main, body.forum .mainlike {
    background: #240f33;
    border: 3px solid var(--color-primary);
    box-sizing: content-box;
    padding: 24px 32px;
    width: calc(100% - 6px);
}

.mainlike {
    margin-top: 24px;
}

body.forum .mainlike {
    border: 3px solid #e96dff56;
}


.modal {
    color-scheme: dark;
    background: #240f33;
    color: white;
    max-width: 720px;
    border: 1px solid var(--color-primary-t1);

    padding: 12px 32px;
    animation: 
        dialog-pushin 0.3s cubic-bezier(0, 0.927, 0.34, 1),
        dialog-appear 0.2s ease;
}
body.light .modal {
    color-scheme: light;
    background: #fff;
    color: black;
    border-color: black;
}
.modal::backdrop {
    background: rgba(0, 0, 0, 0.5);
    animation: dialog-appear 0.3s ease;
}

.modal h3 {
    font-size: 32px;
    font-family: 'Dela Gothic One', sans-serif;
    font-weight: normal;
    margin: 0;
}

.modal-settings-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
    margin-top: 12px;
}

.modal-settings-section h4, .modal-settings-section p {
    margin: 0;
}

.modal-settings-section h4 {
    font-size: 20px;
    font-weight: 900;
}

.modal-settings-section select {
    width: 100%;
    height: 36px;
    font-size: 16px;
    padding: 0 10px;
    border: 1px solid var(--color-primary-t1);
    background: #0002;
    cursor: pointer;
}
.modal-settings-section select:hover {
    border-color: var(--color-primary);
}

.modal-settings-section input[type="checkbox"] {
    width: 20px;
    height: 20px;
}

.modal-settings-checkbox {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

p.modal-settings-desc {
    width: calc(100% - 40px);
    flex-shrink: 0;
    margin-left: 35px;
    color: var(--color-hint);
    font-size: 14px;
}

@keyframes dialog-pushin {
    0% {
        scale: 0.85;
    }
    100% {
        scale: 1;
    }
}
@keyframes dialog-appear {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}


.heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 3px solid currentColor;
    padding-bottom: 6px;
    margin-bottom: 48px;
}

.heading h1, .heading h2 {
    border-bottom: none;
    margin: 0;
}

.heading-icon {
    margin: 16px 0;
    margin-right: 8px;
}

body.forum h1 {
    margin-top: 0;
}


.row {
    display: flex;
    flex-direction: row;
    gap: 24px;
}
.row .col.fs {
    width: 100%;
}

.btnrow {
    display: flex;
    flex-direction: row;
    gap: 8px;
}

.webcomic-poster {
    width: 250px;
    border: 1px solid var(--color-primary);
}

p.big {
    line-height: 1.5;
    font-size: 18px;
    margin-bottom: 24px;
}

.heading-info {
    font-family: 'Geist Mono', monospace;
}

h1 {
    font-size: 40px;
    font-family: 'Dela Gothic One', sans-serif;
    font-weight: normal;
    border-bottom: 3px solid currentColor;
    padding-bottom: 12px;
    margin-bottom: 20px;
}

h2 {
    font-size: 28px;
    font-weight: 900;
    border-bottom: 3px solid currentColor;
    padding-bottom: 12px;
    margin-bottom: 20px; 
}

main > p , .mainlike > p {
    font-size: 18px;
    line-height: 1.5;
}

main .img, .mainlike .img {
    width: 100%;
    margin-bottom: 6px;
    margin-top: 6px;
    border-radius: 4px;
}

footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    max-width: 720px;
    margin-top: 50px;
    font-family: 'Geist Mono', monospace;
    margin-bottom: 100px;
}
body.wide footer {
    max-width: 1000px;
}

footer p {
    margin: 0;
    font-size: 14px;
    font-style: italic;
    color: #fff5;
}
body.light footer p {
    color: #0009;
}

footer a {
    color: var(--color-primary-t1);
}
footer a:hover {
    color: var(--color-primary);
}

body.light footer a {
    color: #0f8bc0aa;
}
body.light footer a:hover {
    color: #0f8bc0;
}

footer.notlast {
    margin-bottom: 0;
}

.pageComments {
    width: 100%;
    max-width: 720px;
    margin-top: 50px;
    margin-bottom: 50px;
    overflow: auto;
    border-radius: 8px;
    min-height: 100px;
}
body.wide .pageComments {
    max-width: 1000px;
}

.jumplink {
    font-family: 'Geist Mono', monospace;
    font-size: 24px;
    color: var(--color-primary);
    display: block;
    margin-top: 24px;
    position: relative;
}
.jumplink:hover {
    color: var(--color-primary-hover);
}

.jumplink-icon {
    position: absolute;
    left: 44px;
    top: 10px;
}

body.light .jumplink {
    color: #0f8bc0;
}
body.light .jumplink:hover {
    color: #12b7fd;
}


.paper {
    width: 720px;
    background-image: url('/assets/paper_f.png');
    background-size: cover;
    background-position: top;
    background-repeat: no-repeat;
    padding: 55px 32px 55px 70px;

    mask-image: url('/assets/paper_mask_bot.png');
    mask-size: 100% 500px;
    mask-position: bottom left;
    mask-repeat: repeat-x;

    font-family: 'Caveat', cursive;
    color: #181548;
    text-shadow: 0 0 3px #25154859;
    font-size: 30px;
    line-height: 25.5px;

    margin-top: 24px;
    margin-bottom: 24px;
}
.paper.tb {
    mask-image: url('/assets/paper_mask_both.png');
    mask-size: 100% calc(100% - 10px);
}
.paper.b {
    mask-image: url('/assets/paper_mask_top.png');
    mask-position: top left;
    background-position: bottom;
    padding: 50px 32px 46px 70px;
}
.paper.r1 {
    rotate: -1deg;
}
.paper.r2 {
    rotate: 1deg;
}
.paper.r3 {
    rotate: -2deg;
}
.paper.r4 {
    rotate: 2deg;
}

.paper > .skew1 {
    transform: skewX(1deg) skewY(-0.5deg) scaleY(0.98);
}

.paper big {
    display: inline-block;
    font-size: 40px;
    margin-top: -100%;
}


.archive-frame {
    width: 1000px;
    height: 650px;
    background-image: url('/assets/ttwww_frame.png');
    image-rendering: crisp-edges;
    background-repeat: no-repeat;
    position: relative;
    padding: 7px;
    padding-top: 64px;
    border-radius: 8px;
    box-shadow: 0 4px 8px #32445270;
}
.archive-iframe {
    width: 100%;
    height: 100%;
}
.archive-topbar {
    position: absolute;
    top: 34px;
    left: 6px;
    right: 6px;
    height: 25px;
}
.archive-topbar p {
    margin: 0;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}
.archive-topbar p > span {
    color: #555;
}
.archive-address {
    position: absolute;
    left: 125px;
    top: 3px;
    width: 653px;
}
.archive-datetime {
    position: absolute;
    left: 794px;
    top: 2px;
    width: 200px;
}

.titlebar {
    display: flex;
    gap: 16px;
    width: 100%;
    max-width: 1280px;
}

.titlebar > p {
    flex-shrink: 0;
}

.titlebar .sep {
    width: 100%;
}


.map-item {
    margin-top: 48px;
}
.map-item h3 {
    color: #f4ccff;
    font-weight: 900;
    padding-bottom: 8px;
    border-bottom: 2px solid #723683;
    margin-bottom: 0;
}
.map-link {
    color: var(--color-primary);
    font-size: 20px;
    padding: 0 10px;
}
.map-link:hover {
    color: var(--color-primary-hover);
}
.map-link:first-of-type {
    padding-left: 0;
}
.map-subtext, .subtext  {
    font-size: 14px;
    color: var(--color-hint);
}
.map-subtext  {
    margin-bottom: 16px;
}

.log-entry {
    font-family: 'Geist Mono', monospace;
    font-style: italic;
    line-height: 1.6;
}
.log-entry a {
    font-weight: 600;
}
.log-entry .subtext {
    display: inline-block;
    margin-left: 16px;
}

.log-entry .ic {
    font-family: 'Dela Gothic One', sans-serif;
    font-style: normal;
    display: inline-block;
    width: 25px;
}
.log-entry .ic.plus {
    color: #5bff0f;
}
.log-entry .ic.minus {
    color: #ff0f33;
}
.log-entry .ic.edit {
    color: #ffe30f;
}

.music-player {
    background: #0d0621;
    border: 3px solid #8b71ff;
    border-radius: 8px;
    padding: 8px 16px;
    color-scheme: dark;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 480px;
    margin-bottom: 32px;
}
.music-player h4 {
    margin: 0;
    color: #8b71ff;
    font-family: 'Geist Mono', monospace;
    font-weight: 500;
}
.music-player audio {
    width: 100%;
    height: 32px;
    mix-blend-mode: screen;
}


.webcomic-list-item {
    display: flex;
    flex-direction: column;
    background: #020021;
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px;
    border: 3px solid var(--color-primary);
    margin: 42px 0;
}

.webcomic-list-item.mindfell {
    --color-primary: #e96dff;
    --color-primary-t1: #e96dff77;
    --color-primary-hover: #f2a7ff;
    --color-primary-hover-mid: #ed86ff;
    --color-primary-active: #bf4cd3;
    --color-hint: #9042a6;
}

.webcomic-list-item .item-banner {
    width: 100%;
    height: 150px;
    object-fit: cover;
}
.webcomic-list-item .item-info {
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.webcomic-list-item .item-info h4 {
    margin: 0;
    font-size: 32px;
    font-family: 'Dela Gothic One', sans-serif;
    font-weight: normal;
}
.webcomic-list-item .item-info p {
    margin: 0;
    line-height: 1.5;
}

@media screen and (max-width: 410px) {

    .navigation-item {
        font-size: 15px !important;
    }
    
}

@media screen and (max-width: 580px) {

    .navigation-inner {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }

    .navigation-logo {
        width: 100%;
        display: flex;
        justify-content: center;
        margin-top: 10px;
    }

    .navigation, .navigation-space {
        height: 100px;
    }
    
}

@media screen and (max-width: 600px) {

    .heading {
        flex-direction: column;
        align-items: flex-start;
    }

    .navigation-item {
        font-size: 20px;
    }
    
}

@media screen and (max-width: 640px) {

    footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .row {
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }
    
}

@media screen and (max-width: 800px) {

    .paper {
        --inner-page-width: calc(100vw - 64px);
        --inner-page-diff: calc(720px - 100vw + 64px);
        scale: calc(var(--inner-page-width) / 720px);
        margin-top: calc(var(--inner-page-diff) * -0.25 + 24px);
        margin-bottom: calc(var(--inner-page-diff) * -0.25 + 24px);
        transform-origin: left center;
    }

    .paper.firefox {
        scale: var(--paper-scale);
    }
    
}

@media screen and (max-width: 900px) {

    .archive-frame {
        width: 100%;
        height: auto;
        aspect-ratio: 36/67.5;
        background-image: url('/assets/ttwww_frame_mobile.png');
        background-size: 100%;
        padding: 1.9%;
        padding-top: 17.8%;
        padding-bottom: 9%;
    }

    .archive-topbar {
        top: 5%;
        bottom: 1%;
        height: unset;
        pointer-events: none;
    }

    .archive-topbar p {
        font-size: 3.6vw;
    }

    .archive-address {
        left: 8%;
        top: 0.4%;
        width: 91%;
    }

    .archive-datetime {
        left: 2%;
        top: unset;
        bottom: 0.3%;
        width: 91%;
    }
    
}