:root {
    --bbs-blue: #2c5f8f;
    --bbs-blue-dark: #214c75;
    --bbs-link: #205b91;
    --bbs-link-hover: #b23b2a;
    --bbs-bg: #e9eef3;
    --bbs-panel: #ffffff;
    --bbs-soft: #f4f7fa;
    --bbs-author: #eef4f8;
    --bbs-border: #c9d5df;
    --bbs-border-strong: #aebdcc;
    --bbs-text: #222b33;
    --bbs-muted: #667583;
    --bbs-focus: #d67a21;
}

@view-transition { navigation: auto; }

::view-transition-old(root) { animation: bbs-page-out 150ms ease-in both; }
::view-transition-new(root) { animation: bbs-page-in 220ms ease-out both; }

@keyframes bbs-page-out {
    to { opacity: 0; transform: translateY(-4px); }
}

@keyframes bbs-page-in {
    from { opacity: 0; transform: translateY(7px); }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    min-width: 0;
    margin: 0;
    background: var(--bbs-bg);
    color: var(--bbs-text);
    font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

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

:focus-visible {
    outline: 3px solid var(--bbs-focus);
    outline-offset: 3px;
}

.bbs-wrap {
    width: min(100% - 32px, 1080px);
    margin-inline: auto;
}

.bbs-skip-link {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 100;
    padding: 0.65rem 0.9rem;
    background: #111;
    color: #fff;
    text-decoration: none;
    transform: translateY(-150%);
    transition: transform 160ms ease-out;
}

.bbs-skip-link:focus { transform: translateY(0); }

.bbs-topbar {
    border-bottom: 1px solid #173e61;
    background: linear-gradient(#356e9f, var(--bbs-blue-dark));
    box-shadow: 0 1px 3px rgba(21, 46, 68, 0.24);
    color: #fff;
}

.bbs-topbar__inner {
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.bbs-brand,
.bbs-nav,
.bbs-nav a {
    display: inline-flex;
    align-items: center;
}

.bbs-brand {
    min-height: 44px;
    gap: 0.65rem;
    color: #fff;
    font-size: 1.08rem;
    font-weight: 700;
    text-decoration: none;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.22);
}

.bbs-brand:hover { color: #fff; }

.bbs-brand__mark {
    display: grid;
    width: 31px;
    height: 31px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.12);
    place-items: center;
    font-size: 0.73rem;
    letter-spacing: -0.04em;
}

.bbs-nav { gap: 0.2rem; }

.bbs-nav a {
    min-height: 44px;
    padding: 0 0.8rem;
    color: #eaf4fc;
    font-size: 0.86rem;
    text-decoration: none;
}

.bbs-nav a:hover,
.bbs-nav a[aria-current="page"] { background: rgba(0, 0, 0, 0.14); color: #fff; }

.bbs-breadcrumb {
    display: flex;
    min-height: 46px;
    align-items: center;
    gap: 0.55rem;
    color: var(--bbs-muted);
    font-size: 0.82rem;
}

.bbs-breadcrumb a { text-decoration: none; }

.bbs-board-head {
    display: flex;
    min-height: 155px;
    padding: 1.5rem 1.75rem;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    border: 1px solid var(--bbs-border-strong);
    border-bottom: 3px solid var(--bbs-blue);
    background: linear-gradient(110deg, #fff 0%, #f5f9fc 62%, #e7f0f7 100%);
}

.bbs-board-head__label {
    margin: 0 0 0.25rem;
    color: var(--bbs-blue);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.bbs-board-head h1 {
    margin: 0;
    color: #193c5b;
    font-family: Georgia, "Songti SC", serif;
    font-size: clamp(2rem, 5vw, 3.35rem);
    font-weight: 700;
    line-height: 1.1;
}

.bbs-board-head p:last-child { margin: 0.45rem 0 0; color: var(--bbs-muted); }

.bbs-board-stats {
    display: grid;
    min-width: 255px;
    margin: 0;
    grid-template-columns: repeat(3, 1fr);
    border: 1px solid var(--bbs-border);
    background: rgba(255, 255, 255, 0.76);
}

.bbs-board-stats div { padding: 0.75rem; text-align: center; }
.bbs-board-stats div + div { border-left: 1px solid var(--bbs-border); }
.bbs-board-stats dt { color: var(--bbs-muted); font-size: 0.72rem; }
.bbs-board-stats dd { margin: 0.1rem 0 0; color: #294a66; font-size: 0.95rem; font-weight: 700; }

.bbs-categories {
    display: flex;
    min-height: 48px;
    margin-top: 12px;
    padding: 0 0.75rem;
    align-items: center;
    gap: 0.2rem;
    border: 1px solid var(--bbs-border);
    background: var(--bbs-panel);
}

.bbs-categories a,
.bbs-categories > span {
    display: inline-flex;
    min-height: 44px;
    padding: 0 0.85rem;
    align-items: center;
    gap: 0.4rem;
    color: #425464;
    font-size: 0.84rem;
    text-decoration: none;
}

.bbs-categories a:hover,
.bbs-categories a.is-active { color: var(--bbs-blue); font-weight: 700; }
.bbs-categories a.is-active { border-bottom: 3px solid var(--bbs-blue); }
.bbs-categories span span,
.bbs-categories b,
.bbs-categories a span { color: #84919c; font-size: 0.74rem; font-weight: 400; }

.bbs-topic-list {
    margin-top: 12px;
    border: 1px solid var(--bbs-border-strong);
    background: var(--bbs-panel);
}

.bbs-topic-list__header {
    display: flex;
    min-height: 48px;
    padding: 0 1rem;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--bbs-border-strong);
    background: linear-gradient(#f9fbfd, #e8eff5);
}

.bbs-topic-list__header h2 { margin: 0; color: #2c4b66; font-size: 1rem; }
.bbs-topic-list__header span { color: var(--bbs-muted); font-size: 0.76rem; }

.bbs-topic-columns,
.bbs-topic {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 90px 90px 120px;
}

.bbs-topic-columns {
    min-height: 34px;
    padding-left: 52px;
    align-items: center;
    border-bottom: 1px solid var(--bbs-border);
    background: var(--bbs-soft);
    color: #71808d;
    font-size: 0.72rem;
}

.bbs-topic {
    position: relative;
    min-height: 92px;
    padding-left: 52px;
    align-items: center;
    color: inherit;
    text-decoration: none;
    transition: background-color 160ms ease-out;
}

.bbs-topic:hover { background: #f6faff; color: inherit; }

.bbs-topic__status {
    position: absolute;
    left: 15px;
    display: grid;
    width: 26px;
    height: 32px;
    place-items: center;
    color: var(--bbs-blue);
    font-size: 1.2rem;
}

.bbs-topic__main { min-width: 0; padding: 0.9rem 1rem 0.9rem 0; }
.bbs-topic__main strong { display: block; color: var(--bbs-link); font-size: 1rem; }
.bbs-topic:hover .bbs-topic__main strong { color: var(--bbs-link-hover); text-decoration: underline; }
.bbs-topic__main small {
    display: -webkit-box;
    margin-top: 0.35rem;
    overflow: hidden;
    color: var(--bbs-muted);
    font-size: 0.78rem;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.bbs-topic__category,
.bbs-topic__author,
.bbs-topic__date { color: #5c6d7b; font-size: 0.78rem; }
.bbs-topic__category { color: var(--bbs-blue); }
.bbs-topic__date { font-variant-numeric: tabular-nums; }
.dream-transition-20241019 { view-transition-name: dream-2024-10-19; }

.bbs-notice {
    display: grid;
    margin: 12px 0 48px;
    padding: 0.85rem 1rem;
    grid-template-columns: 85px 1fr;
    gap: 0.5rem;
    border: 1px solid var(--bbs-border);
    background: #f7f9fb;
    color: var(--bbs-muted);
    font-size: 0.8rem;
}

.bbs-notice strong { color: #445665; }
.bbs-notice p { margin: 0; }

.bbs-thread { border: 1px solid var(--bbs-border-strong); background: var(--bbs-panel); }

.bbs-thread__title {
    padding: 1.2rem 1.4rem;
    border-bottom: 1px solid var(--bbs-border-strong);
    background: linear-gradient(#fbfcfd, #edf3f7);
}

.bbs-thread__title h1 { margin: 0.55rem 0 0.25rem; color: #233d54; font-size: clamp(1.5rem, 4vw, 2.1rem); line-height: 1.3; }
.bbs-thread__title p { margin: 0; color: var(--bbs-muted); font-size: 0.76rem; }

.bbs-tag {
    display: inline-flex;
    min-height: 25px;
    padding: 0 0.55rem;
    align-items: center;
    border: 1px solid #8fb1cb;
    background: #e7f2fa;
    color: #245c89;
    font-size: 0.72rem;
}

.bbs-tag + .bbs-tag { margin-left: 0.35rem; }
.bbs-tag--muted { border-color: #c9c2b6; background: #f2eee8; color: #655e54; }

.bbs-post { display: grid; grid-template-columns: 170px minmax(0, 1fr); }

.bbs-post__author {
    display: flex;
    min-height: 520px;
    padding: 1.25rem 1rem;
    align-items: center;
    flex-direction: column;
    border-right: 1px solid var(--bbs-border);
    background: var(--bbs-author);
    text-align: center;
}

.bbs-post__author strong { color: var(--bbs-blue); font-size: 0.95rem; }
.bbs-post__author img {
    width: 92px;
    height: 92px;
    margin: 0.75rem 0;
    border: 4px solid #fff;
    box-shadow: 0 0 0 1px var(--bbs-border-strong);
    object-fit: cover;
    object-position: 44% center;
}

.bbs-post__author span { padding: 0.1rem 0.55rem; background: #d9e7f1; color: #315d80; font-size: 0.72rem; }
.bbs-post__author small { margin-top: 0.45rem; color: var(--bbs-muted); font-size: 0.72rem; }

.bbs-post__content { min-width: 0; padding: 0 1.8rem 2.5rem; font-size: 1rem; line-height: 1.95; }

.bbs-post__meta {
    display: flex;
    min-height: 46px;
    margin-bottom: 1.6rem;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px dashed var(--bbs-border);
    color: var(--bbs-muted);
    font-size: 0.74rem;
}

.bbs-post__content blockquote {
    margin: 0 0 2rem;
    padding: 1rem 1.15rem;
    border: 1px solid #c9d9e6;
    border-left: 4px solid var(--bbs-blue);
    background: #f3f8fc;
    color: #3b4b58;
    font-size: 0.95rem;
    font-weight: 600;
}

.bbs-post__content p { max-width: 72ch; margin: 0 0 1.8rem; }

.bbs-post__signature {
    margin-top: 2.8rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--bbs-border);
    color: #83909a;
    font-size: 0.78rem;
}

.bbs-thread-actions {
    display: flex;
    min-height: 58px;
    margin: 12px 0 48px;
    padding: 0 0.8rem;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--bbs-border);
    background: var(--bbs-panel);
}

.bbs-thread-actions a {
    display: inline-flex;
    min-height: 44px;
    padding: 0 0.6rem;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    text-decoration: none;
}

.bbs-footer {
    border-top: 1px solid var(--bbs-border-strong);
    background: #dfe7ed;
    color: #667582;
    font-size: 0.75rem;
}

.bbs-footer .bbs-wrap {
    display: flex;
    min-height: 70px;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.bbs-topbar,
main,
.bbs-footer { transition: opacity 150ms ease-in, transform 150ms ease-in; }

.dream-is-leaving .bbs-topbar,
.dream-is-leaving main,
.dream-is-leaving .bbs-footer { opacity: 0; transform: translateY(-4px); }

@media (max-width: 767.98px) {
    .bbs-wrap { width: min(100% - 20px, 1080px); }
    .bbs-topbar__inner { min-height: 54px; }
    .bbs-brand { font-size: 0.95rem; }
    .bbs-nav a { padding: 0 0.5rem; font-size: 0.76rem; }
    .bbs-nav a:first-child { display: none; }
    .bbs-board-head { min-height: 0; padding: 1.2rem; align-items: stretch; flex-direction: column; gap: 1.1rem; }
    .bbs-board-head h1 { font-size: 2.25rem; }
    .bbs-board-stats { min-width: 0; width: 100%; }
    .bbs-categories { overflow-x: auto; padding-inline: 0.3rem; white-space: nowrap; }
    .bbs-topic-columns { display: none; }
    .bbs-topic {
        min-height: 118px;
        padding: 0.9rem 0.8rem 0.9rem 44px;
        grid-template-columns: 1fr auto;
        grid-template-areas: "main main" "category date";
        gap: 0.5rem;
    }
    .bbs-topic__status { left: 11px; top: 17px; }
    .bbs-topic__main { grid-area: main; padding: 0; }
    .bbs-topic__category { grid-area: category; }
    .bbs-topic__date { grid-area: date; text-align: right; }
    .bbs-topic__author { display: none; }
    .bbs-notice { grid-template-columns: 1fr; }
    .bbs-post { grid-template-columns: 1fr; }
    .bbs-post__author {
        min-height: 0;
        padding: 0.8rem 1rem;
        align-items: center;
        flex-direction: row;
        gap: 0.65rem;
        border-right: 0;
        border-bottom: 1px solid var(--bbs-border);
        text-align: left;
    }
    .bbs-post__author img { order: -1; width: 48px; height: 48px; margin: 0; border-width: 2px; }
    .bbs-post__author span { margin-left: auto; }
    .bbs-post__author small { display: none; }
    .bbs-post__content { padding: 0 1rem 2rem; font-size: 1rem; line-height: 1.9; }
    .bbs-thread__title { padding: 1rem; }
    .bbs-thread-actions { margin-bottom: 28px; }
    .bbs-footer .bbs-wrap { min-height: 62px; align-items: flex-start; flex-direction: column; justify-content: center; gap: 0.1rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: 0.01ms !important; }
    ::view-transition-old(root),
    ::view-transition-new(root) { animation-duration: 0.01ms; }
}
