/* Yotsuba Blue–style (4chan /out/ class boards); works at any path depth */
:root {
    --bg: #eedacb;
    --bg-alt: #e6d6ca;
    --border: #d9bfb7;
    --text: #800000;
    --link: #800000;
    --link-hover: #e00;
    --reply-bg: #f0e0d6;
    --header-bg: #ea8;
    --greentext: #789922;
    --quotelink: #d00;
    --subject: #0f0c5d;
    --muted: #706d66;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #1a1d28;
        --bg-alt: #232734;
        --border: #3d455a;
        --text: #d7d9e3;
        --link: #8ab4f8;
        --link-hover: #f88;
        --reply-bg: #2a3145;
        --op-bg: transparent;
        --header-bg: #2a3145;
        --greentext: #8fbc6b;
        --quotelink: #f88;
        --subject: #a8b4ff;
        --muted: #9aa0b4;
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: arial, helvetica, sans-serif;
    font-size: 13px;
    line-height: 1.35;
    color: var(--text);
    background: var(--bg);
}

/* Narrow column like many classic imageboards (~half viewport on desktop) */
.site-shell {
    width: 50vw;
    max-width: 100%;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg);
    box-shadow: 0 0 0 1px var(--border);
}

@media (max-width: 900px) {
    .site-shell {
        width: 100%;
        box-shadow: none;
    }
}

a {
    color: var(--link);
    text-decoration: underline;
}

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

.board-header {
    background: var(--header-bg);
    padding: 8px 12px;
    border-bottom: 2px solid var(--border);
}

.board-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
}

.board-list a {
    font-weight: bold;
    text-decoration: none;
}

.board-list a.active {
    text-decoration: underline;
}

.subtitle {
    margin: 6px 0 0;
    font-size: 11px;
    color: var(--muted);
}

main {
    padding: 12px 16px 40px;
}

.home-nav {
    margin-bottom: 16px;
}

.home-nav .sep {
    margin: 0 6px;
    color: var(--muted);
}

.home-section {
    margin-bottom: 28px;
}

.home-section h2 {
    font-size: 1.15rem;
    margin: 0 0 10px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 4px;
}

.news-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.news-list li {
    margin: 0 0 10px;
    padding: 8px 10px;
    background: var(--reply-bg);
    border: 1px solid var(--border);
}

.news-date {
    font-weight: bold;
    white-space: nowrap;
}

.about-body {
    padding: 10px 12px;
    background: var(--reply-bg);
    border: 1px solid var(--border);
}

.home-lead {
    margin: 0 0 12px;
}

.board-title {
    font-size: 1.6rem;
    margin: 0 0 8px;
}

.nav-links {
    margin-bottom: 8px;
}

.nav-links .sep {
    margin: 0 6px;
    color: var(--muted);
}

.muted {
    color: var(--muted);
}

.sep-hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 12px 0;
}

.board-index {
    list-style: square;
    padding-left: 1.2em;
}

.board-index li {
    margin: 0.4em 0;
}

/* Board index: full post previews per thread (OP + last replies), 4chan-style */
.board-catalog-threads {
    margin: 0;
    padding: 0;
}

.catalog-thread-block {
    margin: 0;
    padding: 0 0 4px;
}

.board-catalog-threads > hr.thread-separator:last-of-type {
    display: none;
}

.thread-separator {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0 0 8px;
    clear: both;
}

.omittedposts {
    color: var(--muted);
    font-size: 13px;
    margin: 6px 0 8px 1.75em;
    padding: 2px 0;
}

.omittedposts a {
    color: var(--link);
}

.subject {
    color: var(--subject);
    font-weight: bold;
    margin-right: 6px;
}

.post-reply-bracket {
    font-weight: normal;
}

.post-reply-bracket a.replylink {
    color: var(--quotelink);
    text-decoration: none;
}

.post-reply-bracket a.replylink:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

.pager {
    margin: 12px 0;
}

.pager a,
.pager strong {
    margin-right: 6px;
}

.thread {
    margin: 0;
    padding: 0;
}

.thread-page-head {
    margin-bottom: 12px;
}

.thread-meta {
    margin: 0;
    font-size: 12px;
}

.postContainer {
    margin: 0 0 0.85em;
    clear: both;
}

.post {
    padding: 6px 8px;
    overflow: hidden;
}

/* OP: open block on board index + full thread */
.post.op {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
    margin-bottom: 6px;
}

.post.op .post-image {
    max-width: min(250px, 100%);
}

/* Replies: boxed inset (full thread + catalog preview) */
.post.reply {
    background: var(--reply-bg);
    border: 1px solid var(--border);
    margin: 4px 0 6px 2em;
    border-left: none;
    padding: 6px 8px;
}

.post.reply .post-image {
    max-width: min(200px, 100%);
}

.postInfo {
    margin-bottom: 4px;
}

.nameBlock .name {
    color: #117743;
    font-weight: bold;
}

@media (prefers-color-scheme: dark) {
    .nameBlock .name {
        color: #81c784;
    }
}

.postertrip {
    color: var(--link);
    margin-left: 4px;
}

.dateTime {
    margin: 0 8px;
    white-space: nowrap;
}

.postNum a {
    margin-left: 4px;
    color: var(--text);
    text-decoration: none;
}

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

.file {
    float: left;
    margin: 0 12px 8px 0;
}

.fileText {
    font-size: 12px;
    margin-bottom: 4px;
}

.post-image {
    height: auto;
    border: 1px solid var(--border);
}

.postBody {
    clear: both;
}

.postBody::after {
    content: "";
    display: table;
    clear: both;
}

.postMessage {
    margin: 0.5em 0 0;
    min-height: 1em;
}

.post-minimized .postBody {
    display: none;
}

.post-minimized .post {
    padding-bottom: 4px;
}

.post-minimized .post.op {
    border-bottom: none;
    margin-bottom: 2px;
    padding-bottom: 4px;
}

.board-banner {
    margin: 8px 0 4px;
    text-align: center;
    line-height: 0;
}

.board-banner-img {
    max-width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: contain;
    border: 1px solid var(--border);
}

.greentext {
    color: var(--greentext);
}

.quotelink {
    color: var(--quotelink);
    text-decoration: none;
    font-weight: bold;
}

.quotelink:hover {
    text-decoration: underline;
    color: var(--link-hover);
}

.post-form {
    margin-top: 16px;
}

.form-table {
    border-collapse: collapse;
}

.form-table th {
    text-align: right;
    vertical-align: top;
    padding: 4px 8px;
    white-space: nowrap;
}

.form-table td {
    padding: 4px 0;
}

.form-table input[type="text"],
.form-table textarea {
    max-width: 100%;
    width: 28em;
}

.form-note {
    font-size: 12px;
    color: var(--muted);
}

.inline {
    margin-left: 8px;
    font-size: 12px;
}

button[type="submit"] {
    margin-top: 8px;
    padding: 4px 12px;
}

.board-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    background: var(--bg-alt);
    color: var(--muted);
    font-size: 11px;
}

.empty {
    padding: 12px;
    background: var(--reply-bg);
    border: 1px dashed var(--border);
}

.locked {
    color: var(--link-hover);
    font-weight: bold;
}
