:root { color-scheme: light; font: 16px/1.6 system-ui, "Microsoft YaHei", sans-serif; color: #142746; background: #eff4fb; }
* { box-sizing: border-box; }
body { margin: 0; }
a { color: #1b53b6; text-decoration: none; }
a:hover { text-decoration: underline; }
.shell { width: min(1240px, calc(100% - 48px)); margin-inline: auto; }
header { background: white; border-bottom: 1px solid #d7e3f3; }
header nav { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { font-weight: 800; color: #142746; }
.button { display: inline-block; width: fit-content; border: 0; background: #1b53b6; color: white; padding: 9px 16px; border-radius: 8px; font: inherit; font-weight: 700; cursor: pointer; }
main { padding: 28px 0 50px; }
.hero { border-radius: 18px; padding: clamp(24px, 5vw, 54px); background: linear-gradient(115deg, #102d65, #215fc8); color: white; }
.eyebrow { font-size: 13px; letter-spacing: .16em; color: #b8d8ff; }
h1 { font-size: clamp(26px, 5vw, 42px); line-height: 1.25; margin: 10px 0; overflow-wrap: anywhere; }
h2 { font-size: 21px; margin: 0; }
.hero p { color: #dfedff; margin-bottom: 0; }
.section-head, .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; }
.row, .empty { border-top: 1px solid #e6edf7; }
.row h3 { margin: 4px 0; overflow-wrap: anywhere; }
.row h3 a { color: #142746; }
.row > div { min-width: 0; }
.count { white-space: nowrap; }
.tag { display: inline-block; padding: 2px 9px; background: #e8f0ff; color: #1b53b6; border-radius: 20px; font-size: 12px; font-weight: 700; }
.empty { text-align: center; padding: 24px; }
.back { display: inline-block; margin-bottom: 12px; }
.content { padding: clamp(16px, 4vw, 32px); margin-bottom: 16px; }
.body { white-space: pre-wrap; overflow-wrap: anywhere; }
.comment { border-bottom: 1px solid #e6edf7; padding: 12px 0 2px; }
form { display: grid; gap: 14px; margin-top: 20px; }
label { display: grid; gap: 4px; font-weight: 650; }
input, select, textarea { width: 100%; padding: 9px 12px; border: 1px solid #b8cae3; border-radius: 7px; font: inherit; color: inherit; background: white; }
textarea { resize: vertical; }
.error { color: #a62828; }

.nav-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.nav-user { font-size: 14px; overflow-wrap: anywhere; }
.logout { display: inline; margin: 0; }
.auth { max-width: 470px; margin: 30px auto; }
.auth .eyebrow { color: #1b53b6; }
.auth .button { width: 100%; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid #225cc7; outline-offset: 2px; }
.hero { background: radial-gradient(ellipse at 84% 0%, #3979dd 0%, transparent 57%), linear-gradient(115deg, #102d65, #215fc8); }
.comment-login { padding: 12px 16px; background: #eff4fb; border-radius: 8px; }

.panel { background: #fff; border: 1px solid #d7e3f3; border-radius: 16px; }
.forum-hero { position: relative; isolation: isolate; overflow: hidden; padding: clamp(28px, 5vw, 64px); }
.forum-hero h1 { font-size: clamp(36px, 5vw, 64px); letter-spacing: .025em; }
.forum-hero p { font-size: clamp(15px, 2vw, 19px); }




.board-grid { margin-top: 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.board-panel { display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 5px 16px #123b780a; }
.board-head { display: flex; align-items: center; gap: 14px; padding: 20px 22px; background: linear-gradient(100deg, #e8f1ff, #f8fbff); }
.board-head h3 { margin: 0; font-size: 22px; }
.board-head h3 a { color: #142746; }
.board-head p { margin: 0; color: #4f6482; font-size: 14px; }
.board-number { display: grid; place-items: center; flex: 0 0 48px; height: 48px; border-radius: 12px; background: #1b53b6; color: white; font-weight: 750; }
.board-posts { flex: 1; padding-inline: 22px; }
.board-post { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 0; }
.board-post + .board-post { border-top: 1px solid #e6edf7; }
.board-post h4 { margin: 0 0 2px; font-size: 16px; overflow-wrap: anywhere; }
.board-post h4 a { color: #142746; }
.reply-count { flex: none; font-size: 12px; padding: 3px 8px; border-radius: 20px; background: #eff4fb; }
.board-empty { padding-bottom: 16px; color: #4f6482; }
.board-foot { border-top: 1px solid #e6edf7; padding: 12px 22px; font-size: 14px; font-weight: 650; }
.board-foot span { margin-left: 6px; }
.board-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 16px; }
.board-tabs a { background: white; border: 1px solid #d7e3f3; border-radius: 8px; padding: 6px 12px; }
.board-tabs a[aria-current="page"] { background: #1b53b6; border-color: #1b53b6; color: white; }
@media (max-width: 700px) {
  .shell { width: calc(100% - 28px); }
  .board-grid { grid-template-columns: minmax(0, 1fr); }

}
.post-thumb { flex: 0 0 80px; display: block; overflow: hidden; border-radius: 8px; background: #e8f0ff; }
.post-thumb img { display: block; width: 100%; height: 60px; object-fit: cover; }
.board-post > div, .image-row > div { flex: 1; min-width: 0; }
.post-image { display: block; max-width: 100%; max-height: 540px; border-radius: 12px; margin-top: 18px; object-fit: contain; }
@media (max-width: 430px) {
  .post-thumb { flex-basis: 60px; }
  .post-thumb img { height: 48px; }
  .board-posts, .image-row { padding-inline: 14px; }
}

.site-header { box-shadow: 0 3px 18px #173b6a09; }
.site-header nav { min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 18px; line-height: 1.3; }
.brand-icon { flex: none; width: 38px; height: 38px; }
.nav-user { max-width: 12em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-secondary { display: inline-block; border: 1px solid #d7e3f3; border-radius: 8px; background: white; padding: 7px 13px; color: #184da8; font: inherit; font-weight: 650; cursor: pointer; }
.nav-secondary:hover { background: #edf4ff; text-decoration: none; }
.nav-publish { padding: 8px 15px; white-space: nowrap; }
.forum-hero {
  display: flex;
  align-items: center;
  min-height: clamp(210px, 24vw, 296px);
  border: 1px solid #3166c5;
  border-radius: 22px;
  background: radial-gradient(ellipse at 88% 42%, #367ce4 0%, transparent 52%), linear-gradient(115deg, #102d65, #164da9);
  box-shadow: 0 12px 30px #153f841e;
}
.forum-hero .eyebrow { display: flex; align-items: center; gap: 8px; letter-spacing: .1em; }
.forum-hero .eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: #a8d2ff; }
.hero-copy { position: relative; z-index: 1; }
.hero-mark { position: absolute; right: 0; top: 50%; width: min(43%, 470px); transform: translateY(-50%); pointer-events: none; }
@media (max-width: 700px) {
  .hero-mark { width: 270px; right: -90px; opacity: .35; }
  .forum-hero { min-height: 200px; }
}
@media (max-width: 440px) {
  .site-header nav { min-height: 62px; padding-block: 6px; gap: 8px; }
  .brand { font-size: 15px; gap: 6px; }
  .brand-icon { width: 30px; height: 30px; }
  .nav-actions { gap: 6px; }
  .nav-user { max-width: 5em; }
  .nav-secondary, .nav-publish { padding: 6px 9px; font-size: 14px; }
}
.post-labels { display: flex; flex-wrap: wrap; gap: 5px; list-style: none; padding: 0; margin: 6px 0 0; }
.post-labels li { border: 1px solid #d7e5fa; background: #f3f7ff; color: #2455a0; border-radius: 6px; padding: 1px 7px; font-size: 12px; }
.tag-picker { min-width: 0; margin: 0; padding: 8px 12px 12px; border: 1px solid #d7e3f3; border-radius: 8px; }
.tag-picker legend { font-weight: 650; }
.tag-options { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-options label { display: flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 6px; background: #eff4fb; font-size: 14px; cursor: pointer; }
.tag-options input { width: auto; margin: 0; accent-color: #1b53b6; }
.custom-tags { margin-top: 12px; }
.editor { display: grid; gap: 6px; }
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 6px; border: 1px solid #d7e3f3; background: #eff4fb; padding: 8px; border-radius: 8px; }
.editor-toolbar button { background: white; border: 1px solid #d7e3f3; border-radius: 6px; padding: 4px 9px; color: #184da8; font: inherit; font-size: 14px; cursor: pointer; }
.markdown-body { overflow-wrap: anywhere; }
.markdown-body img { max-width: 100%; height: auto; }
.markdown-body pre { padding: 12px; border-radius: 8px; background: #eff4fb; overflow: auto; }
.markdown-body blockquote { border-left: 3px solid #b8cae3; margin-left: 0; padding-left: 12px; color: #4f6482; }
.markdown-body table { border-collapse: collapse; display: block; overflow: auto; }
.markdown-body td, .markdown-body th { border: 1px solid #d7e3f3; padding: 6px 10px; }

.rich-editor { min-height: 250px; padding: 12px 16px; border: 1px solid #b8cae3; border-radius: 8px; background: #fff; }
.rich-editor:focus { outline: 2px solid #225cc7; outline-offset: 2px; }
.rich-editor:empty::before { content: attr(data-placeholder); color: #4f6482; pointer-events: none; }
.rich-editor > :first-child, .markdown-body > :first-child { margin-top: 0; }
.rich-editor[aria-invalid="true"] { border-color: #a62828; }
#editor-error { margin: 0; }
.compose-header { margin-bottom: 20px; padding: 24px clamp(20px, 4vw, 38px); border: 1px solid #d4e3fb; border-radius: 16px; background: linear-gradient(110deg, #e5efff, #f8fbff); }
.compose-back { display: inline-block; font-size: 14px; font-weight: 650; }
.compose-header h1 { font-size: clamp(27px, 4vw, 39px); margin: 8px 0 4px; }
.compose-header p { margin: 0; color: #4f6482; }
.compose-form { grid-template-columns: minmax(0, 1fr) minmax(260px, 320px); grid-template-areas: "content settings" "actions actions"; align-items: start; gap: 18px; margin-top: 0; }
.compose-content, .compose-settings { min-width: 0; padding: clamp(16px, 3vw, 26px); }
.compose-content { grid-area: content; display: grid; gap: 20px; }
.compose-content input[name="title"] { font-size: 17px; }
.compose-content .editor { gap: 0; }
.compose-content .editor > strong { margin-bottom: 6px; }
.compose-content .editor-toolbar { border-radius: 10px 10px 0 0; border-bottom: 0; }
.compose-content .rich-editor { border-radius: 0 0 10px 10px; min-height: 340px; }
.compose-content #editor-error:not([hidden]) { margin-top: 6px; }
.compose-settings { grid-area: settings; }
.compose-settings h2 { font-size: 19px; margin-bottom: 12px; }
.compose-settings .tag-picker { margin-top: 16px; }
.compose-cover { margin-top: 18px; padding-top: 15px; border-top: 1px solid #e6edf7; }
.compose-cover label { display: flex; align-items: baseline; justify-content: space-between; }
.compose-cover input { margin-top: 6px; padding: 5px; background: #f7faff; font-size: 13px; }
.compose-cover input::file-selector-button { border: 0; border-radius: 5px; padding: 6px 9px; margin-right: 8px; background: #e5efff; color: #184da8; font: inherit; cursor: pointer; }
.compose-cover p { margin: 6px 0 0; }
.compose-actions { grid-area: actions; display: flex; justify-content: flex-end; gap: 10px; }
.compose-error { padding: 10px 14px; background: #fff3f3; border: 1px solid #f0cdcd; border-radius: 8px; }
@media (max-width: 760px) {
  .compose-form { grid-template-columns: minmax(0, 1fr); grid-template-areas: "content" "settings" "actions"; gap: 14px; }
  .compose-content .rich-editor { min-height: 245px; }
}
.tag-picker legend .muted { margin-left: 4px; font-size: 12px; font-weight: 400; }
.tag-picker-hint { margin: 0 0 8px; color: #4f6482; font-size: 13px; }
.tag-options label { position: relative; padding: 0; background: none; }
.tag-options input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.tag-options span { display: block; padding: 4px 9px; border: 1px solid #d7e3f3; border-radius: 999px; background: #f7faff; color: #355477; }
.tag-options label:hover span { border-color: #8eb4ed; }
.tag-options input:checked + span { border-color: #1b53b6; background: #e7f0ff; color: #164aa4; }
.tag-options input:focus-visible + span { outline: 2px solid #225cc7; outline-offset: 2px; }
.custom-tags > label { margin-bottom: 5px; font-size: 14px; }
.tag-entry { display: flex; gap: 5px; }
.tag-entry input { min-width: 0; padding: 6px 8px; font-size: 14px; }
.tag-add { flex: none; padding: 5px 9px; border: 1px solid #d7e3f3; border-radius: 7px; background: #edf4ff; color: #164aa4; font: inherit; font-size: 14px; cursor: pointer; }
.tag-add:hover { background: #dceaff; }
.custom-tag-list:not([hidden]) { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 0; padding: 0; list-style: none; }
.custom-tag-list li { display: inline-flex; align-items: center; gap: 3px; padding: 2px 5px 2px 8px; border-radius: 7px; background: #e7f0ff; color: #164aa4; font-size: 13px; overflow-wrap: anywhere; }
.custom-tag-list button { background: transparent; border: 0; color: inherit; font: inherit; padding: 1px 4px; cursor: pointer; }
.tag-feedback { display: flex; justify-content: space-between; align-items: baseline; gap: 5px; margin-top: 7px; }
.tag-feedback .muted, .tag-error { font-size: 12px; }
.tag-count { white-space: nowrap; }
.tag-error { margin: 3px 0 0; }
.editor-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.editor-tools:not(:last-child) { padding-right: 6px; border-right: 1px solid #cbdcf1; }
.editor-toolbar button[aria-pressed="true"] { border-color: #82a7e3; background: #deebff; }
.editor-color { display: flex; align-items: center; gap: 4px; padding-left: 3px; color: #184da8; font-size: 13px; font-weight: 600; }
.editor-color select { width: auto; padding: 3px 4px; font-size: 13px; }
.editor-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 7px 0 0; }
.editor-status .muted, #editor-count { font-size: 12px; }
#editor-count { margin-left: auto; white-space: nowrap; }
#editor-expand { border: 0; background: #edf4ff; color: #184da8; border-radius: 6px; padding: 4px 8px; font: inherit; font-size: 13px; cursor: pointer; }
.compose-wide { grid-template-columns: minmax(0, 1fr); grid-template-areas: "content" "settings" "actions"; }
.compose-wide .rich-editor { min-height: max(390px, 48vh); }
.markdown-body hr { border: 0; border-top: 1px solid #d7e3f3; margin: 18px 0; }
.markdown-body h2, .markdown-body h3 { line-height: 1.35; }
.markdown-body p { margin: 0 0 .85em; }
.markdown-body p:last-child { margin-bottom: 0; }
.admin-panel { overflow: hidden; }
.admin-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding: 16px 22px; margin: 0; background: #f7faff; }
.admin-filter select { width: auto; min-width: 130px; }
.admin-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px; border-top: 1px solid #e6edf7; }
.admin-row > div { min-width: 0; overflow-wrap: anywhere; }
.admin-row h2 { font-size: 17px; }
.admin-row p { margin: 3px 0; }
.admin-delete { display: block; margin: 0; flex: none; }
.admin-delete-button { border: 1px solid #f1cccc; border-radius: 7px; padding: 5px 9px; background: #fff7f7; color: #a62828; font: inherit; font-size: 14px; cursor: pointer; }
.admin-delete-button:hover { background: #ffe9e9; }
