/* 385 论坛样式 · 以后改样式改这个文件，不用动 index.php */
* { box-sizing: border-box; }
  body {
    margin: 0; padding: 0 0 40px;
    font: 15px/1.7 -apple-system, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: #22303f; background: #f2f5f9;
  }
  .wrap { max-width: 1080px; margin: 0 auto; padding: 0 14px; }
  .top { background: linear-gradient(135deg, #2f6df6, #4f9bfd); color: #fff; padding: 10px 0 9px; margin-bottom: 12px; box-shadow: 0 2px 10px rgba(47,109,246,.18); position: sticky; top: 0; z-index: 30; transition: background-color .3s ease, box-shadow .3s ease; }
  .top .bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
  .top h1 { margin: 0; font-size: 17px; letter-spacing: .5px; line-height: 1.3; }
  .top h1, .top p, .top .me { text-shadow: 0 1px 3px rgba(10,30,80,.35); }
  .top p { margin: 2px 0 0; font-size: 12px; opacity: .88; line-height: 1.3; }
  .top.scrolled { background: rgba(45,60,90,.45); background: color-mix(in srgb, var(--ac2) 42%, transparent); -webkit-backdrop-filter: blur(11px) saturate(150%); backdrop-filter: blur(11px) saturate(150%); box-shadow: 0 6px 22px rgba(10,70,58,.20); box-shadow: 0 6px 22px color-mix(in srgb, var(--ac2) 28%, transparent); border-bottom: 1px solid rgba(255,255,255,.28); }
  .topsearch { display: flex; align-items: center; gap: 5px; margin-left: auto; margin-right: 10px; }
  .topsearch input { width: 180px; height: 27px; padding: 0 12px; border: 1px solid rgba(255,255,255,.7); background: #fff; color: #22303f; border-radius: 16px; font-size: 13px; outline: none; }
  .topsearch input::placeholder { color: #93a3b8; opacity: 1; }
  .topsearch input:focus { border-color: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.45); }
  .topsearch button { height: 27px; padding: 0 15px; border-radius: 16px; background: #fff; border: 1px solid rgba(255,255,255,.9); color: #1d5fa8; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; white-space: nowrap; flex: 0 0 auto; box-shadow: 0 1px 4px rgba(10,40,90,.12); }
  .topsearch button:hover { background: #f2f7ff; }
  .topsearch a.clear { color: #fff; font-size: 12.5px; opacity: .85; text-decoration: none; white-space: nowrap; }
  .userbox { font-size: 13px; display: flex; align-items: center; gap: 8px; }
  .userbox form { margin: 0; }
  .userbox button { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35); padding: 4px 12px; border-radius: 4px; }
  .userbox button:hover { background: rgba(255,255,255,.28); }
  .minilogin { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: nowrap; }
  .minilogin input[type=text], .minilogin input[type=password] { width: 104px !important; height: 26px; padding: 0 8px !important; margin: 0; border: 1px solid rgba(255,255,255,.5) !important; background: rgba(255,255,255,.18) !important; color: #fff !important; border-radius: 4px !important; font-size: 12.5px !important; line-height: 24px; }
  .minilogin input[type=text]::placeholder, .minilogin input[type=password]::placeholder { color: #fff; opacity: .78; }
  .minilogin input[type=text]:focus, .minilogin input[type=password]:focus { background: rgba(255,255,255,.3) !important; border-color: #fff !important; }
  .minilogin button { height: 26px; padding: 0 12px; font-size: 12.5px; line-height: 1; }
  .minilogin .reglink { color: #fff; font-size: 12.5px; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.7); padding-bottom: 1px; }
  @media (max-width: 620px) {
    .minilogin { flex-wrap: wrap; justify-content: flex-start; gap: 5px; }
    .minilogin input[type=text], .minilogin input[type=password] { width: 86px !important; }
  }
  .notice { background: #e8f7ec; border: 1px solid #b7e3c3; color: #1d6b35; padding: 9px 12px; border-radius: 6px; margin-bottom: 14px; font-size: 14px; }
  .err { background: #fdecec; border: 1px solid #f3bcbc; color: #a12525; padding: 9px 12px; border-radius: 6px; margin-bottom: 14px; font-size: 14px; }
  details.thread { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; margin-bottom: 12px; overflow: hidden; }
  details.thread[open] { box-shadow: 0 2px 8px rgba(28,57,95,.06); }
  summary { list-style: none; cursor: pointer; padding: 13px 14px; background: #fafcff; border-bottom: 1px solid #eef3f9; }
  summary::-webkit-details-marker { display: none; }
  summary::before { content: '▸'; color: #8aa4c4; margin-right: 8px; display: inline-block; }
  details[open] summary::before { content: '▾'; }
  .tt { font-weight: 600; font-size: 15.5px; color: #17324f; }
  .badge { display: inline-block; font-size: 11.5px; font-weight: 600; color: #fff; background: #f0603c; border-radius: 3px; padding: 1px 6px; margin-right: 6px; vertical-align: 1px; }
  .badge.sticky1 { background: #e8362f; }
  .badge.sticky2 { background: #f59e0b; }
  .badge.sticky3 { background: #64748b; }
  .badge.sticky4 { background: #8b5cf6; }
  .badge.bumpb { background: #3b82f6; }
  .bumpbtn { border: 1px solid #cfe0f7; background: #eef5ff; color: #2563eb; border-radius: 4px;
             padding: 1px 10px; font-size: 12px; font-family: inherit; cursor: pointer; }
  .bumpbtn:hover { background: #dfeafd; }
  .stkbtn { border: 1px solid #e4eaf3; background: #f7f9fc; color: #5a6b80; border-radius: 4px; padding: 1px 9px; font-size: 12px; font-family: inherit; cursor: pointer; margin-left: 4px; }
  .stkbtn.s1.on { background: #e8362f; border-color: #e8362f; color: #fff; }
  .stkbtn.s2.on { background: #f59e0b; border-color: #f59e0b; color: #fff; }
  .stkbtn.s3.on { background: #64748b; border-color: #64748b; color: #fff; }
  .stkbtn.s4.on { background: #8b5cf6; border-color: #8b5cf6; color: #fff; }
  .tmeta { display: block; margin-top: 4px; font-size: 12.5px; color: #7d8fa6; }
  .inline { display: inline; margin: 0; padding: 0; }
  .root { padding: 12px 14px; color: #33465c; border-bottom: 1px dashed #e6edf5; word-break: break-word; }
  .tree { padding: 6px 14px 14px; }
  .modebar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 13px; color: #7d8fa6; }
  .modebar .mbtn { border: 1px solid #d6e1f0; background: #fff; color: #2b4a72; padding: 4px 15px; border-radius: 20px; font-size: 13px; cursor: pointer; font-family: inherit; }
  .modebar .mbtn.on { background: #2f6df6; border-color: #2f6df6; color: #fff; }
  .threaditem { display: block; padding: 10px 4px; border-bottom: 1px solid #eff3f8; text-decoration: none; color: inherit; }
  .threaditem:last-child { border-bottom: 0; }
  .threaditem:hover { background: #f7faff; }
  .threaditem .tt { display: inline-block; }
  .lastrep { margin: 1px 4px 8px 34px; border-left: 2px solid #eef3fb; padding-left: 12px; display: flex; flex-direction: column; gap: 4px; }
  .repitem { display: flex; gap: 8px; align-items: center; text-decoration: none; color: inherit; padding: 3px 0; }
  .lastrep .repitem:nth-child(2) { margin-left: 14px; }
  .lastrep .repitem:nth-child(3) { margin-left: 28px; }
  .lastrep .repitem:nth-child(4) { margin-left: 42px; }
  .lastrep .repitem:nth-child(5) { margin-left: 56px; }
  .repitem:hover .repmeta { color: #2f6df6; }
  .repicon { flex: 0 0 16px; display: inline-flex; align-items: center; color: #2f6df6; }
  .repmeta { font-size: 12.5px; color: #6b7d97; display: flex; align-items: center; gap: 6px; min-width: 0; }
  .reptext { color: #334155; flex: 0 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .reptime { color: #8a97a8; flex: 0 0 auto; white-space: nowrap; }
  .repwho { color: #2f6df6; font-weight: 600; flex: 0 0 auto; white-space: nowrap; }
  .repbrk { flex: 0 0 auto; color: #a9b6c6; }
  .nchk { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: #44618a; cursor: pointer; user-select: none; font-family: inherit; padding: 4px 10px; background: #f3f8ff; border: 1px solid #dbe7f7; border-radius: 8px; line-height: 1; white-space: nowrap; }
  .nchk:hover { border-color: #b9d3f2; }
  .nchk input { width: 14px; height: 14px; accent-color: #2f6df6; cursor: pointer; margin: 0; }
  .nchk .nshort { display: none; }
  .threaditem:last-child { border-bottom: 0; }
  .threaditem:hover { background: #f7faff; }
  .threaditem .tt { display: inline-block; }
  .crumbs { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; font-size: 12.5px; color: #7d8fa6; }
  .crumbs .dots { margin-left: auto; }
  .card.topic { padding: 14px 16px; }
  .topichead { padding-bottom: 10px; border-bottom: 1px solid #eff3f8; margin-bottom: 6px; }
  .topichead .tt { display: block; font-size: 16.5px; }
  .actbar { padding: 10px 0 2px; border-top: 1px dashed #e6edf5; margin-top: 8px; }
  body.mode-flat .treeview { display: none; }
  body.mode-tree .flatview { display: none; }
  .fitem { padding: 9px 0 2px; border-top: 1px dashed #eef3f9; }
  .fitem:first-child { border-top: 0; }
  .rt { color: #4c7bd3; background: #eff4fd; border-radius: 4px; padding: 0 6px; }
  .folded { max-height: 250px; overflow: hidden; position: relative; }
  .foldbtn { display: inline-block; margin-top: 6px; border: 1px solid #d5e3fb; background: #f4f8ff; color: #2f6df6; border-radius: 4px; padding: 2px 10px; font-size: 12px; cursor: pointer; font-family: inherit; }
  .branch { margin-left: 10px; padding-left: 16px; border-left: 1px dotted #ccd8e6; }
  .node { position: relative; padding: 9px 0 2px; }
  .node::before { content: ''; position: absolute; left: -16px; top: 18px; width: 12px; border-top: 1px dotted #ccd8e6; }
  .meta { font-size: 12.5px; color: #7d8fa6; }
  .who { color: #2f6df6; font-weight: 600; }
  .dot { margin: 0 5px; color: #c3cedb; }
  .no { color: #a3b1c2; }
  .link { display: inline; margin-left: 10px; color: #2f6df6; text-decoration: none; border: 1px solid #d5e3fb; background: #f4f8ff; border-radius: 4px; padding: 1px 7px; font-size: 12px; font-family: inherit; cursor: pointer; line-height: 1.8; }
  .link:hover { background: #2f6df6; color: #fff; border-color: #2f6df6; }
  .link.danger { color: #c0392b; border-color: #f4cdc7; background: #fff6f5; }
  .link.danger:hover { background: #e05b45; color: #fff; border-color: #e05b45; }
  .text { color: #2b3d52; margin-top: 2px; word-break: break-word; }
  .text img, .root img { max-width: 100%; height: auto; border-radius: 4px; margin: 6px 0; display: block; }
  .card { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 13px 14px; margin: 14px 0 8px; }
  .card h2 { margin: 0 0 12px; font-size: 15px; color: #17324f; }
  .hint { font-size: 13px; color: #2f6df6; margin: 0 0 10px; }
  input[type=text], input[type=password] { width: 100%; border: 1px solid #d6e0ec; border-radius: 6px; padding: 9px 10px; font-size: 14px; color: #22303f; background: #fbfdff; font-family: inherit; outline: none; }
  input:focus { border-color: #2f6df6; background: #fff; }
  .row { display: flex; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
  .row > div { flex: 1 1 160px; }
  .lab { display: block; font-size: 12.5px; color: #7d8fa6; margin-bottom: 4px; }
  button { background: #2f6df6; color: #fff; border: 0; border-radius: 6px; padding: 9px 20px; font-size: 14px; cursor: pointer; font-family: inherit; }
  button:hover { background: #1f5ae0; }
  .regrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
  .regcard { padding: 12px 14px; }
  .reghead { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 10px; }
  .reghead h2 { margin: 0; font-size: 15px; }
  .reghint { font-size: 12.5px; color: #7d8fa6; }
  .regrow .regf { flex: 1 1 160px; min-width: 0; }
  .regcap { font-size: 13.5px; white-space: nowrap; }
  .regcapin { flex: 0 0 90px; width: 90px; }
  .regrow button { flex: 0 0 auto; }
  .submit { margin-top: 12px; }
  .toolbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px; background: #f7f9fd; border: 1px solid #d6e0ec; border-bottom: 0; border-radius: 6px 6px 0 0; }
  .tb { background: #fff; border: 1px solid #d6e0ec; color: #445c78; border-radius: 4px; padding: 3px 8px; font-size: 13px; cursor: pointer; font-family: inherit; }
  .tb:hover { border-color: #2f6df6; color: #2f6df6; }
  .tb.b { font-weight: 700; }
  .tb.i { font-style: italic; }
  .tb.u { text-decoration: underline; }
  .swatch { width: 20px; height: 20px; border-radius: 50%; border: 1px solid #ccd8e6; cursor: pointer; padding: 0; }
  .swatch:hover { transform: scale(1.12); }
  .editor { min-height: 150px; max-height: 420px; overflow: auto; border: 1px solid #d6e0ec; border-radius: 0 0 6px 6px; padding: 10px; background: #fff; outline: none; font-size: 15px; line-height: 1.7; }
  .editor:focus { border-color: #2f6df6; }
  .editor:empty::before { content: attr(data-ph); color: #a8b6c8; }
  .editor img { max-width: 100%; height: auto; border-radius: 4px; margin: 6px 0; display: block; }
  .f-song { font-family: SimSun, 宋体, serif; }
  .f-hei { font-family: SimHei, 黑体, sans-serif; }
  .f-kai { font-family: KaiTi, 楷体, serif; }
  .f-yahei { font-family: "Microsoft YaHei", 微软雅黑, sans-serif; }
  .editor ul, .editor ol, .text ul, .text ol, .root ul, .root ol { margin: 6px 0; padding-left: 24px; }
  .editor li, .text li, .root li { margin: 2px 0; }
  .editor blockquote, .text blockquote, .root blockquote { margin: 8px 0; padding: 6px 12px; border-left: 3px solid #cfe0f7; background: #f6f9fe; color: #4a5d75; border-radius: 0 4px 4px 0; }
  .avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-weight: 600; overflow: hidden; flex: none; object-fit: cover; vertical-align: middle; }
  img.avatar { object-fit: cover; background: #eef2f8; }
  .avatar.avsp { display: inline-block; background-repeat: no-repeat; background-color: #eef2f8; }
  .me { display: inline-flex; align-items: center; gap: 6px; }
  .threaditem { display: flex; gap: 10px; align-items: center; }
  .tbody { min-width: 0; flex: 1; }
  .topichead { display: flex; gap: 12px; align-items: flex-start; }
  .theadtext { min-width: 0; }
  .node .meta, .fitem .meta { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
  .adminbox { margin-top: 14px; }
  .adminbox summary { cursor: pointer; font-weight: 600; font-size: 14px; color: #17324f; list-style: none; }
  .adminbox summary::-webkit-details-marker { display: none; }
  .adminbox summary::before { content: '▸ '; color: #8aa4c4; }
  .adminbox details[open] summary::before { content: '▾ '; }
  .urow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid #eff3f8; }
  .urow:last-child { border-bottom: 0; }
  .umeta { font-size: 12px; color: #8a99ab; margin-top: 2px; }
  .utag { font-size: 11px; color: #7b8a9c; background: #f0f4fa; border-radius: 4px; padding: 1px 6px; margin-left: 4px; }
  .srow { margin-bottom: 12px; }
  .srow .lab { display: block; margin-bottom: 5px; }
  .brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
  .brand h1 { margin: 0; }
  .sitelogo { height: 38px; max-width: 200px; object-fit: contain; border-radius: 6px; background: rgba(255,255,255,.14); }
  .lockbox h2 { margin: 0 0 8px; font-size: 16.5px; }
  .lockbox p { margin: 0 0 12px; color: #6b7d94; font-size: 13.5px; }
  .lockform { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
  .lockform input[type=password] { max-width: 220px; }
  .vipcard h2 { margin: 0 0 10px; font-size: 16.5px; }
  .list.plain { border-top: 1px solid #eff3f8; }
  .badge.vipbadge { background: #fff4e5; color: #b46500; border-color: #ffd9a8; }
  .badge.goldbadge { background: linear-gradient(135deg,#ffe9a8,#f5c542); color: #7a4d00; border: 1px solid #e8b62c; box-shadow: 0 1px 2px rgba(180,130,0,.18); }
  .goldbtn { color: #b4820a !important; }
  .badge.logbadge { background: #eef3ff; color: #2f6df6; border-color: #d5e3ff; }

  /* 主题列表分页条 */
  .pager { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 2px 2px; }
  .pager .pg { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 30px; padding: 0 9px; border: 1px solid #e3e9f2; border-radius: 6px; background: #fff; color: #43556d; font-size: 13px; text-decoration: none; line-height: 1; }
  .pager .pg:hover { border-color: #2f6df6; color: #2f6df6; background: #f4f8ff; }
  .pager .pg.cur { background: #2f6df6; border-color: #2f6df6; color: #fff; font-weight: 600; }
  .pager .pg.off { color: #b7c2d0; background: #f7f9fc; border-color: #edf1f7; }
  .pager .pginfo { margin-left: auto; font-size: 12px; color: #8a99ab; }

  .foot { text-align: center; font-size: 12px; color: #9aa9bb; margin-top: 24px; }

  /* ===== 手机适配 ===== */
  @media (max-width: 640px) {
    body { font-size: 14.5px; }
    /* 手机顶栏：标题 + 账号一行 + 搜索一行，共三行 */
    .top.scrolled { background: rgba(45,60,90,.5); background: color-mix(in srgb, var(--ac2) 58%, transparent); }
    .top { padding: 6px 0 6px; margin-bottom: 8px; }
    /* 网格布局：第一行 标题+搜索，第二行 登录，绝不出现第三行 */
    .top .bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand search" "user user"; align-items: center; gap: 6px; }
    .brand { grid-area: brand; min-width: 0; }
    .brand h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .topsearch { grid-area: search; width: auto; margin: 0; }
    .userbox { grid-area: user; width: 100%; }
    .top h1, .brand h1 { font-size: 13.5px; line-height: 1.25; letter-spacing: 0; }
    .top p { display: none; }
    .sitelogo { height: 20px; max-width: 70px; }
    .brand { flex: 0 1 auto; min-width: 0; gap: 5px; }
    /* 第一行：标题 + 短搜索框；第二行：登录 */
    .topsearch input { width: 88px !important; min-width: 56px; }
    .topsearch button { padding: 0 8px; }
    .minilogin { width: 100%; flex-wrap: nowrap; gap: 5px; }
    .minilogin input[type=text], .minilogin input[type=password] { width: auto !important; flex: 1 1 0; min-width: 0; height: 26px; padding: 0 7px !important; font-size: 12px !important; border-radius: 5px !important; }
    .minilogin input[type=text]::placeholder, .minilogin input[type=password]::placeholder { color: #fff; opacity: .95; }
    .minilogin button { height: 26px; padding: 0 10px; flex: 0 0 auto; font-size: 12px; border-radius: 5px; }
    .minilogin .reglink { flex: 0 0 auto; white-space: nowrap; font-size: 12px; padding-bottom: 0; }
    .topsearch { order: 3; width: 100%; margin: 0; }
    .topsearch input { flex: 1 1 auto; width: auto; min-width: 0; height: 26px; font-size: 12.5px; }
    .topsearch button { height: 26px; padding: 0 12px; font-size: 12.5px; }
    .wrap { padding: 0 10px; }
    .modebar { flex-wrap: wrap; margin-bottom: 10px; }
    .mbtn { padding: 5px 14px; font-size: 12.5px; }
    .crumbs { flex-wrap: wrap; gap: 8px; }
    .pager .pg { min-width: 30px; height: 32px; font-size: 13px; }
    .pager .pginfo { width: auto; margin: 2px 0 0; font-size: 11.5px; }
    .nchk { padding: 3px 8px; font-size: 11.5px; order: -1; }
    .nchk .nfull { display: none; }
    .nchk .nshort { display: inline; }
    .card { padding: 10px 12px; }
    .lastrep .repitem:nth-child(2) { margin-left: 5px; }
    .lastrep .repitem:nth-child(3) { margin-left: 10px; }
    .lastrep .repitem:nth-child(4) { margin-left: 15px; }
    .lastrep .repitem:nth-child(5) { margin-left: 20px; }
    .threaditem { gap: 8px; padding: 9px 2px; }
    .threaditem .tt { font-size: 14.5px; line-height: 1.5; }
    .tmeta { font-size: 11.5px; line-height: 1.55; }
    .topichead { gap: 9px; }
    .topichead .tt { font-size: 15.5px; }
    .branch { margin-left: 2px; padding-left: 11px; }
    .node::before { left: -11px; width: 8px; top: 16px; }
    .node { padding: 8px 0 2px; }
    .meta { font-size: 12px; }
    .link { font-size: 11.5px; padding: 2px 7px; margin-left: 6px; }
    .actbar .link { margin-left: 0; margin-right: 6px; }
    .toolbar { gap: 5px; padding: 6px; }
    .tb { padding: 5px 8px; font-size: 12.5px; min-height: 32px; }
    .swatch { width: 26px; height: 26px; }
    .editor { min-height: 200px; max-height: none; font-size: 16px; }
    .root, .text { font-size: 14.5px; word-break: break-word; }
    .urow { gap: 8px; }
    .adminbox summary { font-size: 13.5px; }
  }

  @media (max-width: 480px) {
    .userbox { justify-content: space-between; }
    .brand h1 { font-size: 13px; }
    .topsearch input { width: 80px !important; min-width: 50px; height: 26px; }
    .topsearch button { height: 26px; padding: 0 8px; }
  }

  /* ===== 主题高亮：只给文字上色，不动底板 ===== */
  .threaditem.hlitem, .topichead.hlitem { background: transparent; box-shadow: none; }
  .hlitem .tt, .hltt { color: var(--hl) !important; font-weight: 700; }
  .hlitem .tt { font-size: 1.04em; }
  /* 夜间模式下把高亮色调亮 + 加一点微光，避免深色底色上发闷 */
  [data-mode="dark"] .hlitem .tt, [data-mode="dark"] .hltt {
    color: color-mix(in srgb, var(--hl) 72%, #ffffff) !important;
    text-shadow: 0 0 10px color-mix(in srgb, var(--hl) 30%, transparent);
  }
  .hlwrap { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }
  .hllabel { font-size: 12px; color: #7d8fa6; }
  .hlbtn { width: 17px; height: 17px; border-radius: 50%; border: 2px solid transparent; padding: 0; cursor: pointer; box-shadow: 0 1px 3px rgba(20,40,80,.18); }
  .hlbtn:hover { border-color: #22303f; }
  [data-mode="dark"] .hlbtn:hover { border-color: #e7eef7; }

  /* ===== 外观设置：主题色 / 日夜 ===== */
  :root { --ac: #2f6df6; --ac2: #1f5ae0; }
  .top { background: linear-gradient(135deg, var(--ac), var(--ac2)); }
  button { background: var(--ac); }
  button:hover { background: var(--ac2); }
  input:focus { border-color: var(--ac); }
  .link { color: var(--ac); border-color: color-mix(in srgb, var(--ac) 28%, #fff); background: color-mix(in srgb, var(--ac) 7%, #fff); }
  .link:hover { background: var(--ac); border-color: var(--ac); color: #fff; }
  /* 返回主题列表：电脑端给得大方一点，手机端维持原样 */
  @media (min-width: 641px) {
    .backlink { font-size: 13.5px; padding: 5px 16px; line-height: 1.5; margin-left: 0; }
  }
  /* ===== 帖内视频/播放器 ===== */
  .embed { position: relative; width: 100%; max-width: 720px; aspect-ratio: 16 / 9; margin: 12px 0; background: #000; border-radius: 8px; overflow: hidden; }
  .embed iframe, .embed video { width: 100%; height: 100%; border: 0; display: block; object-fit: contain; background: #000; }
  .webembed { width: 100%; margin: 14px 0; border-radius: 10px; overflow: hidden; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
  .webembed iframe { width: 100%; height: 1500px; border: 0; display: block; transition: height .15s; }
  @media (max-width: 760px) { .webembed iframe { height: 1200px; } }
  /* ===== 详情页分享卡片 ===== */
  .sharebtn { font-size: 12px; padding: 2px 10px; border: 1px solid color-mix(in srgb, var(--ac) 28%, #fff); background: color-mix(in srgb, var(--ac) 7%, #fff); color: var(--ac); border-radius: 4px; margin-left: 8px; vertical-align: middle; cursor: pointer; font-family: inherit; }
  .sharebtn:hover { background: var(--ac); border-color: var(--ac); color: #fff; }
  .sharebox { display: flex; gap: 14px; align-items: center; margin: 10px 0 4px; padding: 12px; background: color-mix(in srgb, var(--ac) 5%, #fff); border: 1px solid color-mix(in srgb, var(--ac) 14%, #fff); border-radius: 8px; }
  .sharebox[hidden] { display: none !important; }
  .sharebox canvas { width: 140px; height: 140px; background: #fff; border-radius: 6px; }
  .shareinfo { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
  .shareurl { color: var(--ac); word-break: break-all; font-size: 13px; }
  [data-mode="dark"] .sharebox { background: #1d2734; border-color: #2f4260; }
  @media (max-width: 640px) {
    .sharebox canvas { width: 110px; height: 110px; }
  }
  .foldbtn { color: var(--ac); border-color: color-mix(in srgb, var(--ac) 28%, #fff); background: color-mix(in srgb, var(--ac) 7%, #fff); }
  .foldbtn:hover, .foldbtn:active { background: var(--ac); border-color: var(--ac); color: #fff; }
  .rt { color: var(--ac); background: color-mix(in srgb, var(--ac) 8%, #fff); }
  .modebar .mbtn.on { background: var(--ac); border-color: var(--ac); }

  .appearance { position: fixed; right: 18px; bottom: 18px; z-index: 60; }
  .apbtn { width: 42px; height: 42px; border-radius: 50%; border: 0; padding: 0; background: var(--ac); color: #fff; box-shadow: 0 5px 16px rgba(18,38,72,.3); cursor: pointer; display: flex; align-items: center; justify-content: center; }
  .apbtn:hover { background: var(--ac2); }
  .apbtn svg { width: 20px; height: 20px; }
  .appanel { position: absolute; right: 0; bottom: 54px; width: 236px; background: #fff; color: #22303f; border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: 0 14px 36px rgba(18,38,72,.2); padding: 13px 15px 15px; }
  .appanel[hidden] { display: none; }
  .apsec { font-size: 12.5px; color: #7d8fa6; margin: 0 0 8px; }
  .apsec + .apmodes { margin-bottom: 13px; }
  .apmodes { display: flex; gap: 7px; }
  .apmode { flex: 1; background: #f5f8fc; color: #4b5f78; border: 1px solid #e2e8f0; border-radius: 8px; padding: 7px 0 5px; font-size: 12.5px; line-height: 1.2; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; font-family: inherit; }
  .apmode:hover { background: #eef3fa; color: #33465c; }
  .apmode.on { background: var(--ac); border-color: var(--ac); color: #fff; }
  .apmode i { font-style: normal; font-size: 15px; }
  .apcolors { display: flex; flex-wrap: wrap; gap: 9px; }
  .apcolor { width: 25px; height: 25px; border-radius: 50%; border: 2px solid transparent; padding: 0; cursor: pointer; box-shadow: 0 1px 3px rgba(20,40,80,.14); }
  .apcolor.on { border-color: #22303f; }
  .apopen { position: absolute; right: 5px; bottom: 5px; width: 7px; height: 7px; border-radius: 50%; background: #fff; opacity: 0; }

  /* 夜间 */
  [data-mode="dark"] body { background: #14171c; color: #d6dee8; }
  [data-mode="dark"] details.thread { background: #1b2027; border-color: #2b3340; }
  [data-mode="dark"] summary { background: #1f252d; border-bottom-color: #2b3340; }
  [data-mode="dark"] .tt { color: #e7eef7; }
  [data-mode="dark"] .tmeta { color: #93a2b5; }
  [data-mode="dark"] .root { color: #c4cfdd; border-bottom-color: #2b3340; }
  [data-mode="dark"] .card { background: #1b2027; border-color: #2b3340; }
  [data-mode="dark"] .editor { background: #1b2027; color: #dbe4ef; border-color: #2f3a47; }
  [data-mode="dark"] .toolbar { background: #1f252d; border-color: #2f3a47; }
  [data-mode="dark"] .tb { background: #232b35; color: #b9c6d6; border-color: #33404f; }
  [data-mode="dark"] input[type=text], [data-mode="dark"] input[type=password], [data-mode="dark"] textarea { background: #1b2027; color: #e2e9f3; border-color: #2f3a47; }
  [data-mode="dark"] input:focus { background: #202731; color: #fff; }
  [data-mode="dark"] .modebar .mbtn { background: #1b2027; color: #c6d2e0; border-color: #33404f; }
  [data-mode="dark"] .threaditem:hover { background: #202730; }
  [data-mode="dark"] .nchk { color: #b8cae0; background: #1b2430; border-color: #2f3d4e; }
  [data-mode="dark"] .utag { background: #232b35; color: #9aabbd; }
  [data-mode="dark"] .link { background: #1d2734; border-color: #2f4260; color: var(--ac); }
  [data-mode="dark"] .link:hover { background: var(--ac); border-color: var(--ac); color: #fff; }
  [data-mode="dark"] .foldbtn { background: #1d2734; border-color: #2f4260; color: var(--ac); }
  [data-mode="dark"] .rt { background: #1d2734; color: var(--ac); }
  [data-mode="dark"] .notice { background: #14261a; border-color: #255c33; color: #8fdca6; }
  [data-mode="dark"] .err { background: #2a1616; border-color: #5e2a2a; color: #f3a8a8; }
  [data-mode="dark"] .editor blockquote, [data-mode="dark"] .text blockquote, [data-mode="dark"] .root blockquote { background: #1f252d; border-left-color: #33404f; color: #a9b7c7; }
  [data-mode="dark"] .appanel { background: #1b2027; border-color: #2b3340; color: #dbe4ef; }
  [data-mode="dark"] .apsec { color: #93a2b5; }
  [data-mode="dark"] .apmode { background: #232b35; border-color: #2f3a47; color: #c6d2e0; }
  [data-mode="dark"] .apmode:hover { background: #2a333e; color: #e7eef7; }
  [data-mode="dark"] .apmode.on { background: var(--ac); border-color: var(--ac); color: #fff; }
  [data-mode="dark"] .apcolor.on { border-color: #e7eef7; }
  @media (max-width: 620px) {
    .appearance { right: 12px; bottom: 12px; }
    .appanel { width: 214px; }
  }

  /* 夜间补充：标题 / 输入框 / 分隔线 / 分页 / 浏览器自动填充 */
  [data-mode="dark"] .card h2, [data-mode="dark"] .adminbox summary, [data-mode="dark"] .lockbox h2, [data-mode="dark"] .vipcard h2 { color: #e7eef7; }
  [data-mode="dark"] .lockbox p { color: #9aabbd; }
  [data-mode="dark"] .hint { color: color-mix(in srgb, var(--ac) 70%, #fff); }
  [data-mode="dark"] .lab, [data-mode="dark"] .tmeta, [data-mode="dark"] .umeta { color: #93a2b5; }
  [data-mode="dark"] .threaditem, [data-mode="dark"] .topichead, [data-mode="dark"] .urow, [data-mode="dark"] .list.plain { border-bottom-color: #2b3340; border-top-color: #2b3340; }
  [data-mode="dark"] .pager .pg { background: #1b2027; border-color: #2f3a47; color: #c6d2e0; }
  [data-mode="dark"] .pager .pg:hover { border-color: var(--ac); color: var(--ac); background: #1d2734; }
  [data-mode="dark"] .pager .pg.cur { background: var(--ac); border-color: var(--ac); color: #fff; }
  [data-mode="dark"] .pager .pg.off { background: #191f26; color: #6b7887; border-color: #262f3a; }
  [data-mode="dark"] .pager .pginfo, [data-mode="dark"] .foot { color: #8f9dad; }
  [data-mode="dark"] .badge.logbadge { background: #1d2734; color: var(--ac); border-color: #2f4260; }
  [data-mode="dark"] input[type=text], [data-mode="dark"] input[type=password], [data-mode="dark"] input[type=email], [data-mode="dark"] textarea, [data-mode="dark"] select {
    background: #1b2027 !important; color: #e2e9f3 !important; border-color: #2f3a47 !important;
  }
  [data-mode="dark"] input::placeholder, [data-mode="dark"] textarea::placeholder { color: #7d8a99; }
  [data-mode="dark"] input:-webkit-autofill, [data-mode="dark"] input:-webkit-autofill:hover,
  [data-mode="dark"] input:-webkit-autofill:focus, [data-mode="dark"] textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #1b2027 inset; -webkit-text-fill-color: #e2e9f3; caret-color: #e2e9f3;
  }

  /* 头像库网格 */
  .avgrid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 8px; margin: 14px 0; }
  .avpick { margin: 0; }
  .avpick button { width: 100%; padding: 0; border: 2px solid transparent; border-radius: 10px; background: none; cursor: pointer; line-height: 0; }
  .avpick button:hover { border-color: #2f6df6; }
  .avpick.on button { border-color: #2f6df6; box-shadow: 0 0 0 2px rgba(47,109,246,.25); }
  .avpick img { width: 100%; height: auto; border-radius: 10px; display: block; }
  @media (max-width: 640px) { .avgrid { grid-template-columns: repeat(5, 1fr); } }

  /* 音乐播放器 */
  .musicbox { position: fixed; right: 18px; bottom: 72px; z-index: 60; }
  .mbtn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--ac); color: #fff; font-size: 20px; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
  .mpanel { position: absolute; right: 0; bottom: 54px; width: 330px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: 0 10px 30px rgba(15,35,60,.22); overflow: hidden; }
  .mhead { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; font-weight: 600; font-size: 14px; color: #17324f; }
  .mtabs { display: flex; gap: 6px; flex-wrap: wrap; }
  .mtab { border: 1px solid #e2e8f0; background: #f5f8fc; color: #5b6675; border-radius: 8px; padding: 5px 10px; font-size: 12.5px; cursor: pointer; }
  .mtab.on { background: var(--ac); border-color: var(--ac); color: #fff; }
  .mclose { border: 0; background: none; font-size: 18px; cursor: pointer; color: #7d8fa6; }
  .mstatus { padding: 6px 12px 0; font-size: 12px; color: #7d8fa6; min-height: 18px; }
  .mctrl { display: flex; gap: 12px; justify-content: center; align-items: center; padding: 8px 12px 2px; }
  .mcbtn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid #e2e8f0; background: #f5f8fc; color: #17324f; cursor: pointer; font-size: 15px; line-height: 1; }
  .mcbtn.big { width: 46px; height: 46px; background: var(--ac); color: #fff; border-color: var(--ac); font-size: 18px; }
  .mlist { max-height: 280px; overflow-y: auto; padding: 6px 8px 10px; }
  .mrow { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px; cursor: pointer; font-size: 13px; }
  .mrow:hover { background: #f1f5fb; }
  .mrow.cur { background: #e8f0fe; color: var(--ac); }
  .mrow.no { color: #b3bdca; cursor: default; }
  .mrow .mi { width: 20px; text-align: center; color: #9aa7b8; flex: none; }
  .mrow .mt { flex: 1; min-width: 0; }
  .mrow .mt b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mrow .mt span { display: block; font-size: 11.5px; color: #8a97a8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  [data-mode="dark"] .mpanel { background: #1b2027; border-color: #2b3340; }
  [data-mode="dark"] .mhead { color: #e7eef7; }
  [data-mode="dark"] .mrow:hover { background: #262d37; }
  [data-mode="dark"] .mrow.cur { background: #243246; }
  @media (max-width: 640px) { .musicbox { right: 12px; bottom: 70px; } .mpanel { width: min(320px, 80vw); } }
