body {
    margin: 0;
    min-height: 100vh;
    background: #fff;
    color: #222;
    font-family: 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}
@media screen {
    body[data-fs="s"] .res .body { font-size: 14px; }
    body[data-fs="l"] .res .body { font-size: 18px; }
    body[data-lh="1"] .textview { line-height: 1.55; }
    body[data-lh="3"] .textview { line-height: 2.15; }
}
.textview {
    max-width: 672px;
    margin: 0 auto;
    padding: 40px 20px 80px;
    line-height: 1.8;
    word-break: break-word;
}
.thread-head {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid #e0e0e0;
}
.thread-head h1 {
    margin: 0 0 8px;
    font-size: 22px;
    line-height: 1.4;
}
.thread-head .meta {
    margin: 0 0 8px;
    color: #888;
    font-size: 14px;
}
.thread-head .meta span + span::before {
    content: '\00b7';
    margin: 0 6px;
}
.thread-head .links {
    margin: 0;
    font-size: 14px;
}
.thread-head .links a {
    margin-right: 16px;
    color: #3d6cc0;
    text-decoration: none;
}
.thread-head .links button {
    margin-right: 16px;
    padding: 0;
    border: 0;
    background: none;
    color: #3d6cc0;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
}
.read-set[hidden] {
    display: none;
}
.read-set {
    margin-top: 10px;
    padding: 12px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}
.read-set .row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.read-set .row + .row {
    margin-top: 8px;
}
.read-set .label {
    min-width: 67px;
    color: #888;
}
.read-set button {
    padding: 3px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    color: #555;
    font-size: 13px;
    cursor: pointer;
}
.read-set button.on {
    border-color: #7a9243;
    background: #7a9243;
    color: #fff;
}
.notice {
    padding: 48px 0;
    color: #888;
    text-align: center;
}
.res {
    margin-bottom: 28px;
}
.res .info {
    margin-bottom: 4px;
    font-size: 13px;
    color: #888;
}
.res .info .num {
    font-weight: 700;
    color: #555;
}
.res .info .nick {
    margin: 0 6px;
    color: #555;
}
.res .body {
    margin: 0;
    font-size: 16px;
}
.res .img-wrap {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 0 0 4px;
}
.res .img-item button {
    align-self: flex-start;
    font-size: 14px;
    color: #3d6cc0;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}
.res .img-item .thread-img {
    display: none;
    margin: 5px 0 0;
}
.res .img-item.open .thread-img {
    display: block;
}
.res .img-item .thread-img img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}
body[data-theme="dark"] {
    color: #ddd;
    background: #121212;
}
body[data-theme="dark"] .thread-head {
    border-bottom-color: #333;
}
body[data-theme="dark"] .thread-head h1 {
    color: #eee;
}
body[data-theme="dark"] .thread-head .meta,
body[data-theme="dark"] .notice,
body[data-theme="dark"] .res .info {
    color: #999;
}
body[data-theme="dark"] .res .info .num,
body[data-theme="dark"] .res .info .nick {
    color: #bbb;
}
body[data-theme="dark"] .thread-head .links a,
body[data-theme="dark"] .thread-head .links button,
body[data-theme="dark"] .res .img {
    color: #8ab4f8;
}
body[data-bg="black"] .thread-head .links a,
body[data-bg="black"] .thread-head .links button,
body[data-bg="black"] .res .img-item button {
    color: #8ab4f8;
}
body[data-theme="dark"] .read-set {
    border-color: #333;
}
body[data-theme="dark"] .read-set .label {
    color: #999;
}
body[data-theme="dark"] .read-set button {
    background: #1e1e1e;
    border-color: #444;
    color: #bbb;
}
body[data-theme="dark"] .read-set button.on {
    border-color: #3a4a26;
    background: #3a4a26;
    color: #cfe0b0;
}
body[data-bg="black"] {
    background: #000;
    color: #c9c9c9;
}
body[data-bg="black"] .thread-head {
    border-bottom-color: #2a2a2a;
}
body[data-bg="black"] .thread-head h1 {
    color: #ddd;
}
body[data-bg="black"] .thread-head .meta,
body[data-bg="black"] .res .info {
    color: #8a8a8a;
}
body[data-bg="black"] .res .info .num,
body[data-bg="black"] .res .info .nick {
    color: #aaa;
}
body[data-bg="black"] .read-set {
    border-color: #2a2a2a;
}
body[data-bg="black"] .read-set button {
    background: #111;
    border-color: #3a3a3a;
    color: #aaa;
}
body[data-bg="black"] .read-set button.on {
    background: #333;
    border-color: #666;
    color: #fff;
}
@media print {
    @page {
        margin: 20mm 16mm;
    }
    body,
    body[data-theme="dark"],
    body[data-bg="black"] {
        background: #fff;
        color: #000;
    }
    .thread-head .links,
    .read-set {
        display: none;
    }
    .textview {
        max-width: none;
        padding: 0;
        line-height: 1.7;
        font-family: 'Noto Serif KR', 'Nanum Myeongjo', 'Batang', serif;
        font-size: 11pt;
    }
    .thread-head {
        border-bottom-color: #000;
    }
    .thread-head h1,
    .res .info .num,
    .res .info .nick {
        color: #000;
    }
    .thread-head .meta,
    .res .info {
        color: #555;
    }
    .res {
        break-inside: avoid;
    }
    .res .body {
        font-size: 11pt;
    }
    a,
    a[href]::after {
        color: inherit;
        content: none;
        text-decoration: none;
    }
}
