@import url('https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@100..900&family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap');

body {
    background-color: rgb(16, 15, 15);
    min-height: 100dvh;
    width: 100dvw;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    overflow-x: hidden;
}

body * {
    padding: 10px;
    padding-left: 20px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Roboto Slab", serif;
    font-optical-sizing: auto;
    font-weight: 500;
    font-style: normal;
}

* {
    font-family: "Space Mono", monospace;
    font-weight: 400;
    font-style: normal;

    margin: 0;
    padding: 0;

    color: rgb(206, 205, 195);
}

.thought {
    color: rgb(135, 133, 128);
    font-style: italic;
}

footer {
    padding: 0;
    display: flex;
    flex-direction: column;
    width: 100dvw;
    background-color: rgb(28, 27, 26);
}

footer * {
    padding-left: 40px;
}

footer *:first-child {
    padding-top: 20px;
}

footer *:last-child {
    padding-bottom: 30px;
}

a, .accent {
    color: rgb(135, 154, 57);
}

a:visited {
    color: rgb(102, 128, 11)
}

.char-card-link, header a {
    display: block;
    text-decoration: none;
}

.char-card {
    background-color: rgb(28, 27, 26);

    display: flex;
    flex-wrap: wrap;
    /* row-gap when stacked, column-gap when side by side */
    gap: 10px 24px;
    padding: 10px;
}

.char-card img {
    height: 300px;
    max-width: 100%;
    padding: 0;
    /* don't let the text squeeze it out of shape on a narrow screen */
    flex-shrink: 0;
}

/* below ~220px of room the text drops under the picture instead of
   being crushed into a two-words-per-line column */
.char-card-text {
    flex: 1 1 220px;
    min-width: 0;
    padding: 0;
}

.char-card-text > * {
    padding-left: 0;
}

header a {
    padding-left: 0;
}

#title-slug {
    position: relative;
    bottom: -10px;
    opacity: 0;
    transition: bottom .2s ease-in, opacity .3s ease-in;
}

.title-animate {
    bottom: 0 !important;
    opacity: 1 !important;
}

.bigass-404 {
    font-size: 369px;
    font-family: "Roboto Slab", serif;
    color: rgb(28, 27, 26);
    position: absolute;
    top: 20px;
    left: -110px;
    z-index: -1;
}
/* ---- character hero ---- */

.hero {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 10px 20px 0;
    flex-wrap: wrap;
}

.hero-pic {
    flex: 0 0 auto;
    width: 260px;
    max-width: 100%;
    padding: 0;
    background-color: rgb(28, 27, 26);
}

.hero-pic .pic-frame {
    padding: 10px;
}

.hero-pic .pic-links {
    padding: 0 10px 10px;
}

.hero-text {
    flex: 1 1 320px;
    padding: 0;
}

.hero-text > * {
    padding-left: 0;
}

.back-link {
    display: block;
    padding-bottom: 20px;
}

/* ---- scrollbar ---- */

html {
    scrollbar-color: rgb(74, 80, 44) rgb(22, 21, 20);
    scrollbar-width: thin;
}

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background-color: rgb(22, 21, 20);
}

::-webkit-scrollbar-thumb {
    background-color: rgb(74, 80, 44);
    border: 3px solid rgb(22, 21, 20);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: rgb(135, 154, 57);
}

::-webkit-scrollbar-corner {
    background-color: rgb(22, 21, 20);
}

/* ---- picture grid ---- */

.pic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    padding: 20px;
    padding-top: 10px;
}

.pic {
    background-color: rgb(28, 27, 26);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pic-frame {
    position: relative;
    display: block;
    padding: 0;
    line-height: 0;
}

.pic-open {
    display: block;
    padding: 0;
    line-height: 0;
    cursor: zoom-in;
}

.pic-frame img {
    width: 100%;
    height: auto;
    padding: 0;
    display: block;
}

.pic-links {
    padding: 0;
    display: flex;
    gap: 16px;
    font-size: 14px;
}

.pic-links a {
    padding: 0;
}

/* ---- nsfw cover, css-only: first click kills the cover, then
   clicks fall through to the link underneath ---- */

.reveal-toggle {
    position: absolute;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
    opacity: 0;
    pointer-events: none;
}

.reveal-toggle ~ .pic-open img {
    filter: blur(24px) brightness(.55);
    transition: filter .3s ease-out;
}

.reveal-toggle:checked ~ .pic-open img {
    filter: none;
}

.nsfw-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.4;
    font-size: 14px;
    cursor: pointer;
}

.reveal-toggle:checked ~ .nsfw-cover {
    display: none;
}

/* ---- fullscreen viewer ---- */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 10;
    padding: 0;
    background-color: rgb(16, 15, 15);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    opacity: 0;
    transition: opacity .2s ease-out;
}

.lightbox.open {
    display: flex;
}

.lightbox.shown {
    opacity: 1;
}

/* while it fades back out it must stop eating clicks meant for the grid */
.lightbox:not(.shown) {
    pointer-events: none;
}

.lightbox img {
    max-width: 100%;
    max-height: 100dvh;
    padding: 0;
    object-fit: contain;
    cursor: zoom-out;
    transition: transform .2s ease-out;

    /* stop the native image-drag and text selection fighting the swipe */
    user-select: none;
    -webkit-user-drag: none;

    /* single-finger drags come to us, two-finger pinch stays with the browser */
    touch-action: pinch-zoom;
}

.hint-touch {
    display: none;
}

/* phones and other no-hover pointers get the swipe wording */
@media (hover: none) {
    .hint-mouse {
        display: none;
    }

    .hint-touch {
        display: inline;
    }
}

.lightbox-hint {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px;
    background-image: linear-gradient(to top, rgba(16, 15, 15, .9), transparent);
    text-align: center;
    font-size: 13px;
    color: rgb(135, 133, 128);
    pointer-events: none;
}

.no-scroll {
    overflow: hidden;
}

hr.dashed {
  border-top: 1px dashed;
  border-bottom: none;
  height: 0px;
  margin-top: .5em;
}

.additional-deets {
    padding: 0;
}

/* ---- diary ---- */

.diary {
    padding: 20px;
}

.diary h2 {
    padding-left: 0;
    padding-bottom: 10px;
}

.author-note {
    padding: 12px 14px !important;
    margin-bottom: 28px;
    border: 1px dashed rgb(135, 154, 57);
    border-left: 3px solid rgb(135, 154, 57);
    background-color: rgb(24, 25, 20);
    color: rgb(178, 180, 156);
    font-style: italic;
    font-size: 14px;
    max-width: 72ch;
    line-height: 1.6;
}

.diary-entry {
    padding: 0;
    margin-bottom: 28px;
}

.diary-date {
    padding: 0;
    color: rgb(135, 154, 57);
    font-size: 15px;
    margin-bottom: 6px;
}

.diary-entry p {
    padding: 0;
    max-width: 70ch;
    line-height: 1.6;
}

form {
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 10px;
}

form button, form textarea {
    padding: 10px;
    background-color: rgb(39, 40, 35);
    border: 1px solid rgb(135, 154, 57);
}

form button {
    cursor: pointer;
}