﻿/* ============================================================
   Desktop mode - Confidential Archive / Urban Legend theme
   ref: qdnmb.site desktop · 机密档案室：旧纸主区 + 墨色档案柜 + 朱红印章
   布局与功能类名不变，仅视觉层调整
   ============================================================ */
body.mode-desktop {
  background: #F2EDE2;
  background-image:
    repeating-linear-gradient(0deg, rgba(90,70,40,.015) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(90deg, rgba(90,70,40,.012) 0 1px, transparent 1px 24px);
  color: #2A2620;
  font: 14px/1.65 "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}
body.mode-desktop a { color: #3A5F8A; }
body.mode-desktop a:hover { color: #2C4C73; text-decoration: underline; }

/* ---------- Left sidebar (档案柜) ---------- */
body.mode-desktop #h-menu {
  position: fixed; left: 0; top: 0; bottom: 0;
  width: 182px;
  background: #1C211D;
  border-right: 1px solid #0F1310;
  overflow-y: auto; overflow-x: hidden;
  z-index: 100;
  box-shadow: 4px 0 16px rgba(40,30,15,.18);
}
body.mode-desktop #h-menu-top { padding-top: 6px; }
body.mode-desktop #h-menu-top-img {
  display: block; width: 48px; height: 48px; margin: 4px auto;
  background: #A63A2B; color: #FFFFFF;
  font-family: Consolas, "Cascadia Mono", Menlo, monospace;
  font-size: 26px; font-weight: bold; line-height: 48px; text-align: center;
  text-decoration: none;
  box-shadow: 0 0 0 1px rgba(245,239,226,.25);
}
body.mode-desktop #h-menu-top-sitename {
  display: block; text-align: center;
  font-size: 16px; font-weight: bold; color: #E4D9C2;
  margin: 6px auto 10px; text-decoration: none;
  letter-spacing: 3px;
}
body.mode-desktop #h-menu-search { text-align: center; margin-bottom: 6px; }
body.mode-desktop #h-menu-search a {
  display: inline-block;
  background: #A63A2B; color: #FFFFFF;
  padding: 3px 14px; font-size: 13px; text-decoration: none;
  font-weight: 600;
}
body.mode-desktop #h-menu-search a:hover { background: #B84532; color: #FFF; text-decoration: none; }
body.mode-desktop #h-menu-content { list-style: none; margin: 0; padding: 0 0 0 10px; font-size: 12.5px; }
body.mode-desktop #h-menu-content li { list-style: none; }
body.mode-desktop .d-nav-parent { margin: 4px 0; }
body.mode-desktop .d-nav-header {
  display: block; color: #8E8574; font-weight: bold; font-size: 11px;
  margin: 8px 0 2px; cursor: default;
  font-family: Consolas, "Cascadia Mono", Menlo, monospace;
  letter-spacing: 2px;
}
body.mode-desktop .d-nav-top { color: #E4D9C2; font-weight: bold; font-size: 13px; text-decoration: none; }
body.mode-desktop .d-nav-top:hover { color: #FFF; text-decoration: none; }
body.mode-desktop .d-nav-sub { list-style: none; margin: 0; padding: 0 0 0 8px; }
body.mode-desktop .d-nav-sub a { display: block; color: #B9B09B; padding: 1px 0; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.mode-desktop .d-nav-sub a:hover { color: #F0E7D4; text-decoration: none; }
body.mode-desktop #h-menu-bottom {
  margin-top: 14px; padding: 10px 0 20px 10px;
  border-top: 1px solid #2E352E; font-size: 12px;
}
body.mode-desktop #h-menu-bottom a { display: block; color: #B9B09B; padding: 2px 0; }
body.mode-desktop #h-menu-bottom a:hover { color: #F0E7D4; }
body.mode-desktop #h-menu-bottom a.d-menu-red { color: #D97A64; font-weight: bold; }

/* ---------- Content area ---------- */
body.mode-desktop #h-content { margin: 0 10px 40px 182px; }
body.mode-desktop .d-container { max-width: 1000px; margin: 0 auto; padding: 10px 18px; }
body.mode-desktop .d-page-title {
  text-align: center; font-weight: bold; color: #2A2620; font-size: 20px; margin: 14px 0 6px;
  letter-spacing: 4px;
  font-family: Consolas, "Cascadia Mono", Menlo, monospace;
}
body.mode-desktop .d-page-title::before { content: "// "; color: #A63A2B; }
body.mode-desktop .d-page-title::after { content: " //"; color: #A63A2B; }

/* ---------- Breadcrumb (返回入口) ---------- */
body.mode-desktop .d-crumb {
  font-family: Consolas, "Cascadia Mono", Menlo, monospace;
  font-size: 12px; color: #9A9181; margin: 6px 0 10px;
  border-bottom: 1px solid #D9CFBA; padding-bottom: 6px;
}
body.mode-desktop .d-crumb a { color: #3A5F8A; text-decoration: none; }
body.mode-desktop .d-crumb a:hover { color: #2C4C73; text-decoration: underline; }
body.mode-desktop .d-crumb .sep { color: #B5AB97; margin: 0 6px; }

/* ---------- Announcement (档案公告 + 印章) ---------- */
body.mode-desktop .d-announcement {
  background: #FAF7EF; border: 1px solid #D4C9B2; border-left: 4px solid #A63A2B;
  padding: 12px 16px; margin: 10px auto; font-size: 13.5px; color: #2A2620; max-width: 860px;
  position: relative; box-shadow: 0 1px 3px rgba(70,55,30,.08);
}
body.mode-desktop .d-announcement .ann-title {
  color: #A63A2B; font-weight: bold; margin-bottom: 4px;
  font-family: Consolas, "Cascadia Mono", Menlo, monospace; font-size: 12px; letter-spacing: 3px;
}
body.mode-desktop .d-announcement::after {
  content: "NOTICE"; position: absolute; top: 8px; right: 12px;
  color: #A63A2B; font-family: Consolas, "Cascadia Mono", Menlo, monospace;
  font-size: 11px; letter-spacing: 2px; font-weight: bold;
  border: 1.5px solid #A63A2B; padding: 2px 7px; border-radius: 3px;
  opacity: .8; transform: rotate(4deg);
}

/* ---------- Thread cards (档案卡) ---------- */
body.mode-desktop .h-threads-item {
  display: block; clear: both;
  background: #FAF7EF;
  border: 1px solid #D4C9B2;
  padding: 8px 12px;
  margin: 10px 0;
  box-shadow: 0 1px 2px rgba(70,55,30,.06);
}
body.mode-desktop .h-threads-item.h-pinned { border-left: 4px solid #A63A2B; background: #FBF6EA; }
body.mode-desktop .h-threads-info { font-size: 12.5px; color: #6F675A; }
body.mode-desktop .h-threads-info > * { margin-left: 5px; }
body.mode-desktop .h-threads-info > *:first-child { margin-left: 0; }
body.mode-desktop .h-threads-info-email { font-weight: bold; color: #3E6B52; }
body.mode-desktop .h-threads-info-createdat { color: #9A9181; font-family: Consolas, "Cascadia Mono", Menlo, monospace; font-size: 11.5px; }
body.mode-desktop .h-threads-info-uid { color: #3A5F8A; font-family: Consolas, "Cascadia Mono", Menlo, monospace; font-size: 11.5px; }
body.mode-desktop .h-threads-info-id { color: #A63A2B; font-family: Consolas, "Cascadia Mono", Menlo, monospace; }
body.mode-desktop .h-threads-info-board a { color: #3A5F8A; }
body.mode-desktop .h-threads-info-reply-btn { font-size: 15px; color: #3A5F8A; font-weight: bold; }
body.mode-desktop .h-threads-info-reply-btn a { color: #3A5F8A; margin: 0 2px; }
body.mode-desktop .h-threads-title { font-weight: bold; color: #2A2620; font-size: 16px; margin: 8px 0 2px; }
body.mode-desktop .h-threads-title a { color: #2A2620; }
body.mode-desktop .h-threads-title a:hover { color: #A63A2B; text-decoration: none; }
body.mode-desktop .h-threads-title.no-title { color: #9A9181; font-weight: normal; }
body.mode-desktop .h-threads-content { font-size: 15px; line-height: 1.75; margin: 8px 40px; word-break: break-word; color: #2A2620; }
body.mode-desktop .h-threads-tips { color: #8A8171; font-size: 12px; margin-top: 6px; }
body.mode-desktop .h-threads-tips .badge-pin { color: #A63A2B; }
body.mode-desktop .h-threads-tips .badge-sage { color: #3E6B52; }
body.mode-desktop .h-threads-tips .badge-lock { color: #8A8171; }
body.mode-desktop .h-threads-tips .chip { color: #3A5F8A; }

/* ---------- Replies ---------- */
body.mode-desktop .h-threads-item-reply {
  background: #F6F1E5;
  border: 1px solid #D9CFBA;
  padding: 8px 12px;
  margin: 8px 0;
  clear: both;
}
body.mode-desktop .h-threads-item-reply .h-threads-content { margin: 6px 30px; }
body.mode-desktop .h-threads-item-reply.highlight { box-shadow: 0 0 0 2px #A63A2B; border-color: #A63A2B; }

/* ---------- Actions ---------- */
body.mode-desktop .p-actions { margin: 8px 0 2px; font-size: 12px; }
body.mode-desktop .p-actions .btn { color: #3A5F8A; font-size: 12px; padding: 2px 6px; }
body.mode-desktop .p-actions .btn:hover { text-decoration: underline; background: none; }
body.mode-desktop .admin-mini { border-top: 1px dashed #CFC5AF; margin-top: 8px; padding-top: 6px; }
body.mode-desktop .admin-mini .btn-link { color: #3A5F8A; font-size: 12px; }
body.mode-desktop .mini-input { border: 1px solid #CFC5AF; padding: 2px 4px; background: #FFFDF7; color: #2A2620; }

/* ---------- Tags row ---------- */
body.mode-desktop .d-tags { margin: 8px 0 4px; font-size: 13px; }
body.mode-desktop .d-tags a { color: #3A5F8A; margin-right: 14px; }
body.mode-desktop .d-tags a.active { color: #A63A2B; font-weight: bold; }

/* ---------- Forum header ---------- */
body.mode-desktop .h-forum-header { margin: 8px 0 2px; font-size: 13px; }
body.mode-desktop .h-forum-header img { padding: 0; }
body.mode-desktop .d-board-name {
  font-size: 20px; font-weight: bold; color: #2A2620; margin-right: 10px;
  font-family: Consolas, "Cascadia Mono", Menlo, monospace; letter-spacing: 2px;
}
body.mode-desktop .d-board-name::before { content: "▓ "; color: #A63A2B; }
body.mode-desktop .d-board-desc { color: #8A8171; }
body.mode-desktop .d-board-new {
  float: right; background: #A63A2B; color: #FFFFFF; padding: 3px 14px; font-size: 13px;
  text-decoration: none; font-weight: 600;
}
body.mode-desktop .d-board-new:hover { background: #B84532; color: #FFF; text-decoration: none; }

/* ---------- Search ---------- */
body.mode-desktop .d-search-form { margin: 12px 0; }
body.mode-desktop .d-search-form input {
  border: 1px solid #C9BEa6; padding: 5px 8px; font-size: 14px; background: #FFFDF7;
  width: 320px; color: #2A2620;
}
body.mode-desktop .d-search-form input:focus { outline: none; border-color: #A63A2B; }
body.mode-desktop .d-search-form button {
  background: #A63A2B; color: #FFFFFF; border: 0; padding: 6px 16px; font-size: 13px;
  cursor: pointer; margin-left: 4px; font-weight: 600;
}
body.mode-desktop .d-search-form button:hover { background: #B84532; }

/* ---------- Post form ---------- */
body.mode-desktop .h-post-form {
  background: #FAF7EF; border: 1px solid #D4C9B2;
  padding: 14px 18px; margin: 12px 0; max-width: 860px;
  box-shadow: 0 1px 3px rgba(70,55,30,.07);
}
body.mode-desktop .h-post-form .form-title { color: #2A2620; font-size: 18px; }
body.mode-desktop .h-post-form .form-row { margin: 8px 0; }
body.mode-desktop .h-post-form label.field-label { color: #6F675A; font-size: 13px; margin-top: 10px; }
body.mode-desktop .h-post-form input[type=text], body.mode-desktop .h-post-form select, body.mode-desktop .h-post-form textarea {
  border: 1px solid #C9BEA6; background: #FFFDF7; color: #2A2620;
  padding: 5px 8px; font-size: 14px; width: 100%; border-radius: 0;
}
body.mode-desktop .h-post-form input[type=text]:focus, body.mode-desktop .h-post-form select:focus, body.mode-desktop .h-post-form textarea:focus {
  outline: none; border-color: #A63A2B;
}
body.mode-desktop .h-post-form textarea { height: 160px; resize: vertical; }
body.mode-desktop .h-post-form .form-actions { margin-top: 12px; }
body.mode-desktop .h-post-form .btn-primary { background: #A63A2B; color: #FFFFFF; padding: 6px 22px; border: 0; font-size: 14px; cursor: pointer; font-weight: 600; }
body.mode-desktop .h-post-form .btn-primary:hover { background: #B84532; color: #FFF; }
body.mode-desktop .h-post-form .btn-ghost { color: #3A5F8A; background: none; border: 0; padding: 5px 10px; cursor: pointer; }
body.mode-desktop .h-post-form .btn-ghost:hover { text-decoration: underline; }
body.mode-desktop .h-post-form .cookie-fields select { width: 300px; }
body.mode-desktop .h-post-form .field-hint { color: #9A9181; font-size: 12px; }
body.mode-desktop .upload-area {
  border: 1px dashed #B9AE94; padding: 8px 10px; margin-top: 10px;
  color: #6F675A; font-size: 13px; background: #F6F1E5;
}
body.mode-desktop .upload-drop { cursor: pointer; }
body.mode-desktop .upload-text { color: #3A5F8A; }

/* ---------- Notice / empty ---------- */
body.mode-desktop .notice {
  background: #FBF3EC; border: 1px solid #D9B8A8; border-left: 3px solid #A63A2B;
  padding: 8px 12px; margin: 10px 0; font-size: 13px; color: #5C3A2E;
}
body.mode-desktop .notice a { color: #3A5F8A; }
body.mode-desktop .empty { color: #9A9181; text-align: center; padding: 30px; font-family: Consolas, "Cascadia Mono", Menlo, monospace; }

/* ---------- Secondary pages ---------- */
body.mode-desktop .card {
  background: #FAF7EF; border: 1px solid #D4C9B2; border-radius: 0;
  padding: 10px 14px; margin: 8px 0;
  box-shadow: 0 1px 2px rgba(70,55,30,.05);
}
body.mode-desktop .page-title { color: #2A2620; }
body.mode-desktop .form-title { color: #2A2620; }
body.mode-desktop .muted { color: #8A8171; }
body.mode-desktop .chips { margin: 8px 0; }
body.mode-desktop .chips .chip { color: #3A5F8A; font-size: 13px; padding: 2px 10px; border: 0; }
body.mode-desktop .chips .chip.active { color: #A63A2B; font-weight: bold; }
body.mode-desktop .profile-post-row { background: #F6F1E5; border: 1px solid #D9CFBA; padding: 8px 12px; margin: 6px 0; }
body.mode-desktop .cookie-manage-row { border-bottom: 1px dashed #CFC5AF; padding: 8px 0; }
body.mode-desktop .btn { color: #3A5F8A; background: none; border: 0; font-size: 13px; padding: 4px 8px; cursor: pointer; }
body.mode-desktop .btn:hover { text-decoration: underline; background: none; }
body.mode-desktop .btn-primary { background: #A63A2B; color: #FFFFFF; font-weight: 600; }
body.mode-desktop .btn-primary:hover { background: #B84532; color: #FFF; text-decoration: none; }
body.mode-desktop .btn-danger { background: #7E2E22; color: #F6E3DE; }
body.mode-desktop .btn-danger:hover { background: #93382A; color: #FFF; text-decoration: none; }
body.mode-desktop .btn-ghost { color: #3A5F8A; }
body.mode-desktop .serial { color: #3A5F8A; font-family: Consolas, "Cascadia Mono", Menlo, monospace; }
body.mode-desktop .time { color: #9A9181; font-family: Consolas, "Cascadia Mono", Menlo, monospace; }

/* ---------- Badges / cookie ---------- */
body.mode-desktop .badge { color: #8A8171; }
body.mode-desktop .badge-admin { color: #A63A2B; font-weight: 700; }
body.mode-desktop .badge-mod { color: #3A5F8A; }
body.mode-desktop .badge-real { color: #3E6B52; }
body.mode-desktop .badge-banned { color: #A63A2B; }
body.mode-desktop .badge-op { color: #A63A2B; font-weight: 600; }
body.mode-desktop .badge-mine { color: #3E6B52; }
body.mode-desktop .cookie { font-family: Consolas, "Cascadia Mono", Menlo, monospace; }
body.mode-desktop .cookie.admin { color: #A63A2B; font-weight: 700; }
body.mode-desktop .cookie.mod { color: #3A5F8A; }
body.mode-desktop .cookie.anon { color: #8A8171; font-weight: 400; }

/* ---------- Pager ---------- */
body.mode-desktop .pager { margin: 12px 0; padding: 10px 0; border-bottom: 0; }
body.mode-desktop .pg-btn {
  color: #3A5F8A; background: #FAF7EF; border: 1px solid #CFC5AF; border-radius: 0;
  padding: 4px 12px; font-size: 12px; margin-right: 4px; text-decoration: none;
  font-family: Consolas, "Cascadia Mono", Menlo, monospace;
}
body.mode-desktop .pg-btn:hover { color: #2C4C73; border-color: #A63A2B; text-decoration: none; }
body.mode-desktop .pg-btn.active { color: #FFFFFF; background: #A63A2B; border-color: #A63A2B; font-weight: 600; }
body.mode-desktop .pg-btn.disabled { color: #B5AB97; background: #F0EADA; }

/* ---------- Images ---------- */
body.mode-desktop .imgs { margin-top: 6px; }
body.mode-desktop .img-link { border: 1px solid #D4C9B2; background: #F6F1E5; }
body.mode-desktop .img-link:hover { border-color: #A63A2B; }
body.mode-desktop .img-link img { max-width: 250px; max-height: 220px; }

/* ---------- Quotes / spoiler ---------- */
body.mode-desktop .qlink { color: #3E6B52; font-weight: bold; font-family: Consolas, "Cascadia Mono", Menlo, monospace; }
body.mode-desktop .qlink:hover { color: #2C5640; }
body.mode-desktop .tlink { color: #3A5F8A; font-weight: bold; }
body.mode-desktop .spoiler { background: #1F1B15; color: #1F1B15; }
body.mode-desktop .spoiler.revealed { background: transparent; color: #2A2620; }

/* ---------- Misc ---------- */
body.mode-desktop .d-error { text-align: center; padding: 60px 20px; }
body.mode-desktop .d-error h1 { color: #A63A2B; }
body.mode-desktop .d-error .btn { margin: 0 6px; }
body.mode-desktop .site-footer {
  border-top: 1px solid #D4C9B2; color: #9A9181; text-align: center; font-size: 12px; padding: 20px;
  font-family: Consolas, "Cascadia Mono", Menlo, monospace;
}
body.mode-desktop .site-footer a { color: #3A5F8A; }
body.mode-desktop .board-chip { color: #3A5F8A; }
body.mode-desktop .stats-bar { background: #F6F1E5; border: 1px solid #D4C9B2; padding: 8px 12px; margin: 8px 0; font-size: 13px; }
body.mode-desktop .stats-bar b { color: #A63A2B; }
body.mode-desktop .admin-nav .btn { color: #3A5F8A; }
body.mode-desktop .cat-title {
  color: #A63A2B; font-size: 12px; letter-spacing: 2px;
  font-family: Consolas, "Cascadia Mono", Menlo, monospace;
}
body.mode-desktop .latest-title { color: #2A2620; }
body.mode-desktop .latest-title:hover { color: #A63A2B; }
body.mode-desktop .fav-actions { font-size: 12px; color: #8A8171; }
body.mode-desktop .crumb { color: #8A8171; font-size: 12px; }
body.mode-desktop .crumb a { color: #3A5F8A; }

/* ---------- Admin tables ---------- */
body.mode-desktop table.list { color: #2A2620; }
body.mode-desktop table.list th {
  color: #3E6B52; font-weight: 600; padding: 8px 10px;
  border-bottom: 1px solid #CFC5AF;
  font-family: Consolas, "Cascadia Mono", Menlo, monospace; font-size: 12px;
}
body.mode-desktop table.list td { padding: 9px 10px; border-bottom: 1px solid #E3DBC8; vertical-align: top; }
body.mode-desktop table.list tr:hover td { background: rgba(166,58,43,.04); }
body.mode-desktop .log-snapshot { background: #F6F1E5; border: 1px solid #D4C9B2; color: #5C5548; }

/* ---------- 账号 / 自定义饼干名 ---------- */
body.mode-desktop .code-row { display: flex; gap: 8px; align-items: center; }
body.mode-desktop .code-row input { flex: 1; min-width: 0; }
body.mode-desktop .cookie-code {
  font-size: 11px; color: #9A9181; margin-left: 4px;
  font-family: Consolas, "Cascadia Mono", Menlo, monospace;
}

/* ---------- 页脚档案行 ---------- */
body.mode-desktop .d-archive-line { color: #B5AB97; font-size: 11px; letter-spacing: 2px; margin-top: 6px; }

/* ---------- Scrollbar ---------- */
body.mode-desktop ::-webkit-scrollbar { width: 10px; height: 10px; }
body.mode-desktop ::-webkit-scrollbar-track { background: #F2EDE2; }
body.mode-desktop ::-webkit-scrollbar-thumb { background: #CFC5AF; border-radius: 5px; }
body.mode-desktop ::-webkit-scrollbar-thumb:hover { background: #B5AB97; }

/* ---------- 引用预览浮层 ---------- */
body.mode-desktop .op-preview { background: #F6F1E5; border-top: 1px dashed #CFC5AF; color: #6F675A; }
/* ---------- 返回按钮 ---------- */
body.mode-desktop .d-crumb a.d-back-btn {
  display: inline-block; background: #A63A2B; color: #FFFFFF;
  padding: 1px 10px; font-size: 12px; font-weight: 600; text-decoration: none;
  font-family: Consolas, "Cascadia Mono", Menlo, monospace; letter-spacing: 1px;
  border: 1px solid #8C2F22;
}
body.mode-desktop .d-crumb a.d-back-btn:hover { background: #B84532; color: #FFF; text-decoration: none; }
