/* ============ 基础 ============ */
:root {
  --bg: #0b0e14;
  --bg-2: #11151f;
  --bg-3: #161b27;
  --line: #232a3a;
  --text: #e6e9f2;
  --muted: #8b93a7;
  --accent: #6ea8fe;
  --accent-2: #8b7bff;
  --ok: #4ade80;
  --warn: #fbbf24;
  --danger: #f87171;
  --gold: #f0c674;
  --radius: 14px;
  --shadow: 0 12px 40px rgba(0, 0, 0, .45);
  --nav-h: 56px;          /* 顶栏高度；手机上会由 app.js 的 syncNavH() 按实际高度改写 */
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: radial-gradient(1200px 800px at 80% -10%, #1b2440 0%, transparent 60%),
              radial-gradient(900px 700px at -10% 110%, #241b3a 0%, transparent 55%),
              var(--bg);
  color: var(--text);
  font: 15px/1.6 "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.row { display: flex; align-items: center; }
.row.gap { gap: 8px; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: .2px; }
a { color: var(--accent); text-decoration: none; }

/* ============ 按钮 / 输入 ============ */
.btn {
  appearance: none; border: 1px solid var(--line); background: var(--bg-3);
  color: var(--text); padding: 10px 16px; border-radius: 10px; cursor: pointer;
  font-size: 14px; transition: .15s ease; font-family: inherit;
}
.btn:hover { border-color: #33405a; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent; color: #0a0d14; font-weight: 700;
}
.btn.ghost { background: transparent; }
.btn.small { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.btn.danger { color: var(--danger); border-color: #4a2530; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

.input, textarea, input {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line);
  color: var(--text); border-radius: 10px; padding: 10px 12px;
  font: inherit; outline: none; transition: .15s;
}
.input.small, input.small { padding: 7px 10px; font-size: 13px; }
input:focus, textarea:focus, .input:focus { border-color: #3a4a6b; box-shadow: 0 0 0 3px rgba(110,168,254,.12); }
textarea { resize: vertical; }

/* 复选框 / 单选框：不要被上面的通用 input 规则撑大 */
input[type="checkbox"], input[type="radio"] {
  width: 17px; height: 17px; min-width: 17px; padding: 0; margin: 0;
  accent-color: var(--accent); flex: 0 0 auto; display: inline-block;
  vertical-align: middle; border-radius: 4px; box-shadow: none; background: transparent;
}
input[type="checkbox"]:focus, input[type="radio"]:focus { box-shadow: none; border: 0; }
.switch { align-items: center; gap: 9px; cursor: pointer; }
.switch input { margin: 0; }

.icon-btn {
  background: transparent; border: 0; color: var(--muted); cursor: pointer;
  font-size: 17px; padding: 4px 8px; border-radius: 8px;
}
.icon-btn:hover { background: var(--bg-3); color: var(--text); }

/* ============ 登录 ============ */
.auth-wrap { min-height: 100%; display: grid; place-items: center; padding: 24px; }
.auth-card {
  width: min(440px, 100%); background: color-mix(in srgb, var(--bg-2) 88%, transparent);
  border: 1px solid var(--line); border-radius: 20px; padding: 30px 28px;
  box-shadow: var(--shadow); backdrop-filter: blur(10px);
}
.brand { font-size: 24px; display: flex; align-items: baseline; gap: 10px; }
.brand-sub { font-size: 13px; color: var(--muted); font-weight: 400; }
.tabs { display: flex; gap: 6px; margin: 22px 0 18px; background: var(--bg-3); padding: 4px; border-radius: 12px; }
.tab {
  flex: 1; background: transparent; border: 0; color: var(--muted);
  padding: 9px; border-radius: 9px; cursor: pointer; font: inherit;
}
.tab.active { background: var(--bg); color: var(--text); box-shadow: 0 1px 0 rgba(255,255,255,.04) inset; }
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 7px; font-size: 13px; color: var(--muted); }
.hint { min-height: 18px; font-size: 13px; color: var(--warn); margin: 0; }
.hint.err { color: var(--danger); }
.hint.ok { color: var(--ok); }

/* ============ 主界面 ============ */
.app { display: grid; grid-template-columns: 288px 1fr; height: calc(100vh - var(--nav-h)); overflow: hidden; margin-top: var(--nav-h); }
@supports (height: 100dvh) { .app { height: calc(100dvh - var(--nav-h)); } }
.sidebar {
  display: flex; flex-direction: column; border-right: 1px solid var(--line);
  background: rgba(12, 16, 24, .72); backdrop-filter: blur(8px); min-width: 0;
}
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 10px; }
.logo { font-weight: 800; letter-spacing: .5px; background: linear-gradient(120deg, #9db8ff, #c3a6ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.side-tabs { display: flex; gap: 6px; padding: 0 16px 10px; }
.mini-tab {
  flex: 1; background: transparent; border: 1px solid transparent; color: var(--muted);
  padding: 6px 10px; border-radius: 9px; cursor: pointer; font: inherit; font-size: 13px;
}
.mini-tab.active { background: var(--bg-3); color: var(--text); border-color: var(--line); }
.side-pane { flex: 1; overflow-y: auto; padding: 0 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.list { display: flex; flex-direction: column; gap: 6px; }
.list-title { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin: 10px 4px 2px; }

.item {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 11px;
  border: 1px solid transparent; cursor: pointer; transition: .12s; min-width: 0;
}
.item:hover { background: var(--bg-3); border-color: var(--line); }
.item.active { background: linear-gradient(90deg, rgba(110,168,254,.16), transparent); border-color: #2b3857; }
.item-main { min-width: 0; flex: 1; }
.item-name { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge {
  font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--bg-3);
  border: 1px solid var(--line); color: var(--muted); white-space: nowrap;
}
.badge.owner { color: var(--gold); border-color: #4a3f22; }
.badge.admin { color: var(--accent); border-color: #26405f; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #3b4256; flex: none; }
.dot.online { background: var(--ok); box-shadow: 0 0 8px rgba(74,222,128,.7); }
.side-foot { padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; }

.main { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.empty { margin: auto; text-align: center; padding: 40px; max-width: 520px; }
.empty h2 { font-size: 20px; margin-bottom: 8px; }

/* ============ 房间 ============ */
.room { display: flex; flex-direction: column; height: 100vh; min-height: 0; }
.room-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 22px; border-bottom: 1px solid var(--line);
  background: rgba(12,16,24,.6); backdrop-filter: blur(6px);
}
.room-title-wrap { min-width: 0; }
.room-head h2 { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-head .muted { font-size: 12px; }
.room-actions { display: flex; gap: 6px; flex: none; }

.messages { flex: 1; overflow-y: auto; padding: 22px 22px 8px; display: flex; flex-direction: column; gap: 14px; scroll-behavior: smooth; }

/* 普通消息 */
.msg { display: flex; gap: 10px; max-width: 860px; }
.msg .avatar {
  width: 32px; height: 32px; border-radius: 10px; flex: none;
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
  background: linear-gradient(135deg, #2b3857, #3a2b57); color: #cfd8f5;
}
.msg .bubble-wrap { min-width: 0; }
.msg .who { font-size: 12px; color: var(--muted); margin-bottom: 3px; display: flex; gap: 8px; align-items: center; }
.msg .bubble {
  background: var(--bg-3); border: 1px solid var(--line); padding: 9px 13px;
  border-radius: 4px 13px 13px 13px; white-space: pre-wrap; word-break: break-word;
}
.msg.mine { flex-direction: row-reverse; }
.msg.mine .bubble { background: linear-gradient(135deg, rgba(110,168,254,.22), rgba(139,123,255,.18)); border-color: #2f4370; border-radius: 13px 4px 13px 13px; }
.msg.mine .who { justify-content: flex-end; }

/* 系统信息：四种语气，样式明显不同 */
.sys { align-self: center; max-width: 720px; width: 100%; text-align: center; }
.sys .sys-inner {
  display: inline-block; padding: 7px 16px; border-radius: 999px; font-size: 13px;
  border: 1px dashed var(--line); color: var(--muted); background: rgba(255,255,255,.02);
}
.sys.narration .sys-inner {
  border: 0; background: transparent; font-style: italic; letter-spacing: .5px;
  color: #a9b3cc; font-size: 14px; border-radius: 0; padding: 4px 8px;
}
.sys.alert .sys-inner { border: 1px solid #4a2530; background: rgba(248,113,113,.08); color: #ffb4b4; }
.sys.event { text-align: center; }
.sys.event .sys-inner {
  display: block; border: 0; background: linear-gradient(90deg, transparent, rgba(240,198,116,.10), transparent);
  color: var(--gold); font-size: 13px; letter-spacing: 2px; padding: 10px 16px; border-radius: 8px;
  position: relative;
}
.sys.event .sys-inner::before, .sys.event .sys-inner::after {
  content: "◆"; color: rgba(240,198,116,.5); margin: 0 10px; font-size: 9px; vertical-align: middle;
}

/* 需要确认的按钮 */
.card {
  max-width: 720px; width: 100%; background: linear-gradient(180deg, rgba(139,123,255,.10), rgba(110,168,254,.05));
  border: 1px solid #2f3d63; border-radius: 14px; padding: 14px 16px;
}
.card .card-label { font-size: 11px; letter-spacing: 1.5px; color: var(--accent); text-transform: uppercase; }
.card .card-q { font-size: 15px; margin: 6px 0 12px; white-space: pre-wrap; }
.prompt-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.prompt-actions .btn.yes { background: rgba(74,222,128,.14); border-color: #2f5a41; color: #9df3bb; }
.prompt-actions .btn.no { background: rgba(248,113,113,.12); border-color: #53282f; color: #ffb0b0; }
.prompt-actions .btn.chosen { outline: 2px solid var(--accent); }
.answers { margin-top: 10px; font-size: 12px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.answers b { color: var(--text); font-weight: 600; }

/* ============ 确认卡 / 选项卡（两种样式明确区分） ============ */
.card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; flex-wrap: wrap; }
.card-by { font-size: 12px; color: var(--muted); }
.badge {
  font-size: 11px; letter-spacing: .5px; padding: 2px 9px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); white-space: nowrap;
}
.badge.green { color: #9df3bb; border-color: #2f5a41; background: rgba(74,222,128,.12); }
.badge.blue { color: #bcd6ff; border-color: #33456b; background: rgba(110,168,254,.12); }
.badge.gold { color: #ffd479; border-color: #5a4a22; background: rgba(240,198,116,.12); }

.card-prompt { border-left: 3px solid #16b98a; }
.card-choice { border-left: 3px solid #6ea8fe; }
.card.locked { background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01)); }
.card-hint { font-size: 12px; color: #b9a06a; margin-top: 8px; display: block; }
.card-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

/* 确认按钮：实心大按钮，计数做成小药丸 */
.prompt-actions { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.prompt-actions .btn { display: inline-flex; align-items: center; gap: 9px; padding: 10px 18px; font-size: 14.5px; }
.prompt-actions .btn .cnt {
  font-size: 11.5px; opacity: .8; padding: 1px 7px; border-radius: 999px; background: rgba(255,255,255,.09);
}
.prompt-actions .btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.prompt-actions .btn[disabled].chosen { opacity: 1; outline: 2px solid var(--accent); }
.prompt-actions .btn.yes.chosen { background: rgba(74,222,128,.28); border-color: #3d7a55; }
.prompt-actions .btn.no.chosen { background: rgba(248,113,113,.24); border-color: #6e333a; }

/* 选项卡内：勾选框与文字严格同行居中 */
.opt { align-items: center; }
.opt .chk { margin-right: 2px; position: relative; z-index: 1; }
.opt .opt-label { display: flex; align-items: center; min-height: 18px; line-height: 1.35; }
.opt.locked { cursor: default; }
.opt.locked:hover { border-color: var(--line); }
.opt.picked .chk { accent-color: #8b7bff; }

/* 选项 */
.opt-list { display: grid; gap: 8px; margin-top: 4px; }
.opt {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 10px;
  padding: 10px 13px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--bg-3); cursor: pointer; transition: .15s;
}
.opt:hover { border-color: #3a4a6b; }
.opt.picked { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(110,168,254,.15); }
.opt .bar { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, rgba(110,168,254,.22), rgba(139,123,255,.10)); width: 0; transition: width .4s ease; }
.opt .opt-label { position: relative; flex: 1; font-size: 14px; }
.opt .opt-count { position: relative; font-size: 12px; color: var(--muted); }
.voters { font-size: 12px; color: var(--muted); margin-top: 8px; }

/* 发送区 */
.composer { border-top: 1px solid var(--line); padding: 10px 18px 14px; background: rgba(12,16,24,.7); backdrop-filter: blur(8px); }
.owner-bar { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.chip {
  background: var(--bg-3); border: 1px solid var(--line); color: var(--muted);
  padding: 6px 12px; border-radius: 999px; cursor: pointer; font: inherit; font-size: 12.5px;
}
.chip:hover { color: var(--text); border-color: #3a4a6b; }
.send-row { display: flex; gap: 10px; align-items: flex-end; }
.send-row textarea { max-height: 168px; min-height: 44px; }

/* ============ 弹窗 ============ */
.modal-root { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(4, 6, 10, .66); backdrop-filter: blur(3px); }
.modal {
  position: relative; width: min(520px, 100%); max-height: 86vh; overflow-y: auto;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 18px;
  padding: 22px; box-shadow: var(--shadow);
}
.modal h3 { font-size: 17px; margin-bottom: 14px; }
.modal .form { gap: 12px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.member-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.member-row:last-child { border-bottom: 0; }
.member-row .m-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-row .m-actions { display: flex; gap: 6px; }
.switch { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.switch input { width: auto; }

/* ============ 提示 ============ */
.toast-wrap { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: var(--bg-3); border: 1px solid var(--line); color: var(--text);
  padding: 9px 16px; border-radius: 999px; font-size: 13px; box-shadow: var(--shadow);
  animation: toastIn .18s ease both;
}
.toast.err { border-color: #53282f; color: #ffb0b0; background: #241419; }
.toast.ok { border-color: #2f5a41; color: #9df3bb; background: #12211a; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-6px); } }

/* ============ 滚动条 / 响应式 ============ */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #232a3a; border-radius: 8px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #33405a; background-clip: content-box; }

/* ============ 移动端抽屉侧栏 ============ */
.menu-btn { display: none; font-size: 19px; }
.mobile-only { display: none; }
.scrim {
  position: fixed; inset: 0; background: rgba(4,6,10,.62); backdrop-filter: blur(2px);
  z-index: 39; opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.app.side-open .scrim { opacity: 1; pointer-events: auto; }

.send-row .btn { flex: 0 0 auto; white-space: nowrap; }
.send-row textarea { min-height: 44px; }

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: 86%; max-width: 330px; z-index: 40;
    transform: translateX(-102%); transition: transform .22s ease; overflow-y: auto;
  }
  .app.side-open .sidebar { transform: none; box-shadow: var(--shadow); }
  .menu-btn { display: inline-flex; }
  .mobile-only { display: inline-flex; }
  .messages { padding: 16px 14px 6px; }
  .room-head { padding: 10px 12px; gap: 8px; }
  .composer { padding: 8px 12px 12px; }
  .card { padding: 12px 13px; border-radius: 12px; }
  .prompt-actions .btn { flex: 1 1 44%; justify-content: center; }
  .opt { padding: 11px 12px; }
  .empty { padding: 24px 18px; }
  .empty h2 { font-size: 18px; }
  /* 发送按钮不要被挤成竖排 */
  .send-row { align-items: flex-end; }
  .send-row .btn { flex: 0 0 auto; white-space: nowrap; padding: 12px 18px; }
  .send-row textarea { min-height: 48px; }
  /* 手机输入框 ≥16px，避免 iOS 聚焦自动放大 */
  .input, textarea, input { font-size: 16px; }
}

/* ================= 顶部导航 ================= */
.topnav {
  position: fixed; inset: 0 0 auto 0; height: 56px; z-index: 40;
  display: flex; align-items: center; gap: 22px; padding: 0 20px;
  background: rgba(9,9,14,.92); backdrop-filter: blur(14px);
  border-bottom: 1px solid #1e1e2a;
}
.tn-logo { font-weight: 700; letter-spacing: .5px; color: #e8e8f0; text-decoration: none; cursor: pointer; }
.tn-items { display: flex; gap: 4px; flex: 1; }
.tn-item {
  background: none; border: 0; color: var(--muted); font: inherit; font-size: 14px;
  padding: 8px 14px; border-radius: 10px; cursor: pointer;
}
.tn-item:hover { color: #dcdce8; background: rgba(255,255,255,.04); }
.tn-item.active { color: #fff; background: rgba(122,92,240,.18); box-shadow: inset 0 0 0 1px rgba(140,110,255,.35); }
.tn-right { display: flex; align-items: center; gap: 10px; }
.tn-user { color: var(--muted); font-size: 13px; }

/* ================= 论坛版块页 ================= */
.forum-scroll { grid-column: 1 / -1; height: 100%; overflow-y: auto; }
.fwrap { max-width: 1180px; margin: 0 auto; padding: 22px 20px 60px; }
.fcrumb { color: var(--muted); font-size: 13px; margin-bottom: 14px; display: flex; gap: 8px; align-items: center; }
.fcrumb a { color: #a99bff; cursor: pointer; text-decoration: none; }
.fcrumb a:hover { text-decoration: underline; }

.fhero {
  display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(122,92,240,.14), rgba(20,20,30,.6));
  border: 1px solid #24243a; border-radius: 16px; padding: 20px 22px; margin-bottom: 18px;
}
.fhero h1 { margin: 0 0 6px; font-size: 22px; letter-spacing: .5px; }
.fhero p { margin: 0; font-size: 13px; }

/* hero 随机配图（v1.7.3）：图片铺在底层，内容用 z-index 抬起来 */
.fhero.has-bg { position: relative; overflow: hidden; isolation: isolate; }
.fhero.has-bg::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background-image: var(--hero-img); background-size: cover; background-position: center;
  opacity: .38; filter: saturate(.95);
}
.fhero.has-bg::after {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(135deg, rgba(11,14,20,.74), rgba(11,14,20,.34));
}
.fhero.has-bg > * { position: relative; z-index: 1; }
[data-theme="light"] .fhero.has-bg::before { opacity: .34; }
[data-theme="light"] .fhero.has-bg::after { background: linear-gradient(135deg, rgba(255,255,255,.8), rgba(255,255,255,.38)); }
.fstats { display: flex; gap: 22px; }
.fstats div { text-align: center; }
.fstats b { display: block; font-size: 20px; color: #fff; }
.fstats span { font-size: 12px; color: var(--muted); }

.fmain { display: grid; grid-template-columns: 1fr 286px; gap: 18px; align-items: start; }
.fsec-title { margin: 0 0 10px; font-size: 14px; color: var(--muted); font-weight: 500; letter-spacing: 1px; }

.fgroup { border: 1px solid #20202e; border-radius: 14px; overflow: hidden; margin-bottom: 16px; background: rgba(15,15,22,.6); }
.fgroup-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: rgba(255,255,255,.02); border-bottom: 1px solid #20202e; }
.fgroup-icon { font-size: 20px; width: 30px; text-align: center; }
.fgroup-name { font-weight: 600; font-size: 15px; }
.fgroup-desc { font-size: 12px; color: var(--muted); margin-top: 2px; }
.fgroup-stat { margin-left: auto; font-size: 12px; color: var(--muted); }

.frow {
  display: grid; grid-template-columns: 1fr 130px 60px 110px; gap: 10px; align-items: center;
  padding: 12px 16px; border-top: 1px solid #1a1a26; cursor: pointer;
}
.frow:first-of-type { border-top: 0; }
.frow:hover { background: rgba(122,92,240,.08); }
.frow-title { font-size: 14px; color: #e6e6f0; display: flex; align-items: center; gap: 8px; }
.frow-author, .frow-stat, .frow-last { font-size: 12px; color: var(--muted); }
.frow-stat { text-align: center; }
.frow-last { text-align: right; color: #8b8ba5; }
.frow-empty { padding: 16px; color: var(--muted); font-size: 13px; }

.fright { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 0; }
.fside { border: 1px solid #20202e; border-radius: 14px; padding: 14px 16px; background: rgba(15,15,22,.6); }
.fside h4 { margin: 0 0 10px; font-size: 13px; color: var(--muted); font-weight: 500; letter-spacing: 1px; }
.fonline { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.fonline .dot { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 8px #4ade80; }
.small { font-size: 12px; line-height: 1.7; }
.ffoot { margin-top: 28px; text-align: center; color: #4a4a5e; font-size: 12px; }

.fposts { display: flex; flex-direction: column; gap: 12px; }
.fpost { display: grid; grid-template-columns: 120px 1fr; gap: 14px; border: 1px solid #20202e; border-radius: 14px; padding: 14px; background: rgba(15,15,22,.6); }
.fpost-side { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.fpost-name { font-size: 13px; }
.fpost-main { min-width: 0; }
.fpost-text { margin-top: 6px; font-size: 14px; line-height: 1.8; color: #dcdce8; white-space: pre-wrap; }

/* 确认卡：等待名单 / 公布结果 */
.pending { margin-top: 8px; font-size: 12px; color: #b9a06a; }
.card-prompt.all-done { box-shadow: 0 0 0 1px rgba(120,220,160,.35), 0 10px 30px rgba(60,200,140,.08); }
.btn.gold { background: rgba(240,198,116,.16); border: 1px solid #6a5526; color: #ffd479; }
.btn.gold:hover { background: rgba(240,198,116,.26); }

@media (max-width: 860px) {
  .topnav { padding: 0 12px; gap: 10px; overflow-x: auto; }
  .tn-user { display: none; }
  .fmain { grid-template-columns: 1fr; }
  .fright { position: static; }
  .frow { grid-template-columns: 1fr 60px; row-gap: 4px; }
  .frow-author, .frow-last { display: none; }
  .fpost { grid-template-columns: 1fr; }
  .fpost-side { flex-direction: row; justify-content: flex-start; gap: 8px; }
  .fstats { gap: 14px; }
}

/* 顶部导航已含标题与退出，侧边栏头部隐藏避免重复 */
.side-head { display: none; }

/* ===== 论坛：主题详情 / 引用 / 发帖 ===== */
.badge.tiny { font-size: 11px; padding: 1px 7px; border-radius: 20px; margin-top: 2px; }
.btn.tiny { padding: 3px 9px; font-size: 12px; border-radius: 8px; }

.fpost-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fquote {
  margin: 8px 0 2px; padding: 8px 12px; border-left: 3px solid #4a3f7a;
  background: rgba(122,92,240,.10); border-radius: 0 8px 8px 0;
  font-size: 13px; color: #b9b9d0; display: flex; gap: 8px; flex-wrap: wrap;
}
.fquote-who { color: #a99bff; }
.fquote-text { opacity: .85; }

.freply {
  margin-top: 18px; border: 1px solid #20202e; border-radius: 14px;
  padding: 14px; background: rgba(15,15,22,.6);
  display: flex; flex-direction: column; gap: 10px;
}
.freply-head { display: flex; align-items: center; gap: 10px; font-size: 14px; flex-wrap: wrap; }
.freply textarea, .finput {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line);
  color: var(--text); border-radius: 10px; padding: 10px 12px; font-size: 14px;
  font-family: inherit; line-height: 1.7; resize: vertical;
}
.freply textarea:focus, .finput:focus { outline: none; border-color: #4a3f7a; }
.freply-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }

.quote-chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px;
  color: #bcd6ff; background: rgba(110,168,254,.12); border: 1px solid #33456b;
  border-radius: 20px; padding: 2px 10px;
}
.chip-x { background: none; border: 0; color: #bcd6ff; cursor: pointer; font-size: 14px; padding: 0 2px; }
.chip-x:hover { color: #fff; }

.fpager { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.fpager .btn { min-width: 34px; }

@media (max-width: 640px) {
  .fpost { grid-template-columns: 1fr; }
  .fpost-side { flex-direction: row; justify-content: flex-start; gap: 8px; text-align: left; }
  .fpost-side .avatar { width: 28px; height: 28px; font-size: 13px; }
}

.fcrumb { flex-wrap: wrap; }
.fcrumb a, .fcrumb span { white-space: nowrap; }

/* ================= v1.4 顶栏 / 等级 / 头像 / 个人中心 / 搜索 / 提醒 ================= */
.tn-search, .tn-bell { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.10);
  color: var(--text, #e8e8ee); width: 34px; height: 30px; border-radius: 9px; cursor: pointer; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center; margin-right: 6px; position: relative; }
.tn-search:hover, .tn-bell:hover { background: rgba(255,255,255,.12); }
.bell-badge { position: absolute; top: -5px; right: -5px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 9px; background: #ef5350; color: #fff; font-size: 10px; line-height: 16px; text-align: center; }
.tn-me { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; padding: 3px 8px;
  border-radius: 9px; border: 1px solid rgba(255,255,255,.10); text-decoration: none; color: inherit; }
.tn-me:hover { background: rgba(255,255,255,.08); }
.tn-avatar { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center;
  justify-content: center; background: rgba(255,255,255,.10); font-size: 13px; }
.tn-points { font-size: 11px; color: #f0c674; }

.avatar.va { background: rgba(255,255,255,.10); font-size: 18px; }
.avatar.va.sm { width: 18px; height: 18px; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; margin-right: 4px; }
.avatar.va.big { width: 64px; height: 64px; font-size: 30px; }
.avatar.va[data-profile] { cursor: pointer; }

.lvl { display: inline-block; font-size: 10px; padding: 1px 6px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14); color: #cfd2e0; margin: 2px 0; white-space: nowrap; }
.lvl-1 { color: #aab; }
.lvl-2 { color: #8fd6a8; border-color: rgba(143,214,168,.35); }
.lvl-3 { color: #7fc4ef; border-color: rgba(127,196,239,.35); }
.lvl-4 { color: #b79cf0; border-color: rgba(183,156,240,.35); }
.lvl-5 { color: #f0c674; border-color: rgba(240,198,116,.35); }
.lvl-6 { color: #ff8f6b; border-color: rgba(255,143,107,.45); background: rgba(255,143,107,.10); }

.fpost-actions { margin-left: auto; display: inline-flex; gap: 6px; }
.btn.danger { background: rgba(239,83,80,.14); border-color: rgba(239,83,80,.35); color: #ff8f8b; }
.btn.danger:hover { background: rgba(239,83,80,.24); }
.edited-mark { color: #8f93a3; }
.fpost.is-deleted .fpost-text { color: #6f7385; font-style: italic; }
.pediting textarea { width: 100%; margin: 8px 0; }

.fsearch { display: flex; gap: 8px; margin: 0 0 14px; }
.fsearch .finput { flex: 1; }
.frow-snip { grid-column: 1 / -1; font-size: 12px; color: #8f93a3; margin-top: 4px; }
.mrow.unread { background: rgba(120,140,255,.06); }
.dot-new { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #ef5350; margin-left: 4px; }

.pcard { background: var(--card, rgba(255,255,255,.04)); border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px; padding: 18px 20px; margin-bottom: 16px; }
.pcard-top { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.pcard-id { flex: 1; min-width: 180px; }
.pcard-id h2 { margin: 0 0 6px; font-size: 20px; }
.pbar { height: 6px; border-radius: 4px; background: rgba(255,255,255,.10); overflow: hidden; margin: 8px 0 4px; max-width: 320px; }
.pbar i { display: block; height: 100%; background: linear-gradient(90deg, #7c9cff, #b79cf0); }
.pcard-stats { display: flex; gap: 22px; }
.pcard-stats div { text-align: center; }
.pcard-stats b { display: block; font-size: 15px; }
.pcard-stats span { font-size: 11px; color: #8f93a3; }
.pedit { margin-top: 16px; display: grid; gap: 6px; }
.pavatar-pick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.pavatar-pick .pv { width: 34px; height: 34px; border-radius: 10px; font-size: 17px; cursor: pointer;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.10); }
.pavatar-pick .pv.on { border-color: #7c9cff; background: rgba(124,156,255,.20); }
.plog { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.plog li { display: flex; gap: 8px; align-items: baseline; }
.plog .up { color: #8fd6a8; font-weight: 600; min-width: 34px; }
.plog .down { color: #ff8f8b; font-weight: 600; min-width: 34px; }
.fright { min-width: 240px; }
@media (max-width: 820px) {
  .tn-user, .tn-points { display: none; }
  .fright { min-width: 0; }
  .pcard-stats { gap: 14px; }
}

/* 提醒列表行：重排为两行 */
.mrow { grid-template-columns: 1fr auto; row-gap: 6px; }
.mrow .frow-title { grid-column: 1 / -1; }
.mrow .frow-author { grid-column: 1 / 2; color: #9ea2b3; font-size: 12px; }
.mrow .frow-last { grid-column: 2 / 3; text-align: right; }

/* 窄屏顶栏 & 输入框自动填充修正 */
@media (max-width: 600px) {
  .topnav { padding: 0 8px; gap: 6px; }
  .tn-logo { font-size: 15px; white-space: nowrap; }
  .tn-items { gap: 2px; overflow-x: auto; min-width: 0; }
  .tn-item { padding: 6px 8px; font-size: 13px; white-space: nowrap; }
  .tn-search, .tn-bell { width: 30px; height: 28px; font-size: 13px; }
  .tn-me { padding: 2px 6px; }
  .pcard-top { gap: 12px; }
  .pcard-stats { width: 100%; justify-content: space-between; }
  .pavatar-pick .pv { width: 30px; height: 30px; font-size: 15px; }
}
.finput:-webkit-autofill, .finput:-webkit-autofill:hover, .finput:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px rgba(20,22,34,.98) inset;
  -webkit-text-fill-color: #e8e8ee;
  transition: background-color 9999s ease-out;
}

/* ---- 上传头像 / 用户 ID / 帖子图片 ---- */
.avatar-img { display:inline-flex; align-items:center; justify-content:center; border-radius:50%; overflow:hidden; background:#1b1e2b; flex:0 0 auto; }
.avatar-img img { width:100%; height:100%; object-fit:cover; display:block; }
.avatar-img.va.big { border-radius:14px; }
.pid { display:inline-block; margin-left:8px; font-size:12px; font-weight:500; color:#9ea2b3;
  border:1px solid rgba(255,255,255,.14); border-radius:6px; padding:1px 6px; vertical-align:middle; }
.pupload { display:flex; align-items:center; gap:8px; margin:6px 0 2px; }
.pfriend { margin-top:10px; display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.m-av { flex:0 0 auto; cursor:pointer; }
.member-row .m-name[data-profile] { cursor:pointer; }
.pimg { display:block; margin:8px 0; }
.pimg img { max-width:100%; max-height:520px; border-radius:10px; border:1px solid rgba(255,255,255,.08); display:block; }
.fpost-text .at { color:#a9b4ff; font-weight:600; }
.badge.ok { background:rgba(80,200,120,.16); color:#7de3a6; border:1px solid rgba(80,200,120,.3); }
.item .avatar, .item .avatar-img { margin-right:2px; }

/* ==========================================================================
   主题：夜晚（默认）/ 白天
   --------------------------------------------------------------------------
   深色是原始设计，上面所有规则一律不动；这里只做两件事：
   1) 用 [data-theme="light"] 覆盖颜色 token；
   2) 逐条覆盖那些写死深色字面量的规则（顺序在后，优先级相同即胜出）。
   data-theme 由 index.php 的内联脚本在 CSS 之前写好，切换由 app.js 负责。
   ========================================================================== */
:root { color-scheme: dark; }
html { background: var(--bg); }

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f2f5fb;
  --bg-2: #ffffff;
  --bg-3: #eaeef7;
  --line: #dbe1ed;
  --text: #1b2233;
  --muted: #5f6b85;
  --accent: #3b6fe0;
  --accent-2: #6f5be6;
  --ok: #15803d;
  --warn: #b45309;
  --danger: #d92d20;
  --gold: #a16207;
  --shadow: 0 12px 40px rgba(23, 37, 66, .12);
}

[data-theme="light"] body {
  background: radial-gradient(1200px 800px at 80% -10%, #e2eafb 0%, transparent 60%),
              radial-gradient(900px 700px at -10% 110%, #ece4fb 0%, transparent 55%),
              var(--bg);
}

/* 按钮 / 输入 */
[data-theme="light"] .btn.primary { color: #fff; }
[data-theme="light"] .btn:hover { border-color: #b9c4da; }
[data-theme="light"] input:focus,
[data-theme="light"] textarea:focus,
[data-theme="light"] .input:focus { border-color: #93a9d4; }
[data-theme="light"] .tab.active { box-shadow: 0 1px 0 rgba(24, 36, 66, .05) inset; }

/* 主界面 */
[data-theme="light"] .sidebar { background: rgba(255, 255, 255, .78); }
[data-theme="light"] .logo { background: linear-gradient(120deg, #3b6fe0, #7a5ee0); -webkit-background-clip: text; background-clip: text; }
[data-theme="light"] .item.active {
  background: linear-gradient(90deg, rgba(59, 111, 224, .10), transparent);
  border-color: #b9cbf0;
}
[data-theme="light"] .badge.owner { border-color: rgba(161, 98, 7, .35); }
[data-theme="light"] .badge.admin { border-color: rgba(59, 111, 224, .35); }
[data-theme="light"] .dot { background: #c3cbdc; }
[data-theme="light"] .dot.online { box-shadow: 0 0 8px rgba(21, 128, 61, .45); }

/* 房间 */
[data-theme="light"] .room-head { background: rgba(255, 255, 255, .82); }
[data-theme="light"] .msg .avatar {
  background: linear-gradient(135deg, #dbe4fb, #e6dafa);
  color: #3b4a75;
}
[data-theme="light"] .msg.mine .bubble { border-color: #b9cbf0; }
[data-theme="light"] .sys .sys-inner { background: rgba(24, 36, 66, .03); }
[data-theme="light"] .sys.narration .sys-inner { color: #52618a; }
[data-theme="light"] .sys.alert .sys-inner {
  border-color: #f0c2bd; background: rgba(217, 45, 32, .07); color: #b42318;
}
[data-theme="light"] .sys.event .sys-inner {
  background: linear-gradient(90deg, transparent, rgba(161, 98, 7, .10), transparent);
}

/* 确认卡 / 选项卡 */
[data-theme="light"] .card {
  background: linear-gradient(180deg, rgba(111, 91, 230, .07), rgba(59, 111, 224, .05));
  border-color: #c9d6ee;
}
[data-theme="light"] .card-prompt { border-left-color: #0f9d74; }
[data-theme="light"] .card-choice { border-left-color: #3b6fe0; }
[data-theme="light"] .card.locked { background: linear-gradient(180deg, rgba(24, 36, 66, .04), rgba(24, 36, 66, .015)); }
[data-theme="light"] .card-hint { color: #8a6d1f; }
[data-theme="light"] .pending { color: #8a6d1f; }
[data-theme="light"] .prompt-actions .btn .cnt { background: rgba(24, 36, 66, .08); }
[data-theme="light"] .prompt-actions .btn.yes { background: rgba(21, 128, 61, .10); border-color: #b2dcc2; color: #15803d; }
[data-theme="light"] .prompt-actions .btn.no { background: rgba(217, 45, 32, .08); border-color: #f2c7c2; color: #b42318; }
[data-theme="light"] .prompt-actions .btn.yes.chosen { background: rgba(21, 128, 61, .18); border-color: #7cc39a; }
[data-theme="light"] .prompt-actions .btn.no.chosen { background: rgba(217, 45, 32, .16); border-color: #e0a29b; }
[data-theme="light"] .card-prompt.all-done { box-shadow: 0 0 0 1px rgba(21, 128, 61, .30), 0 10px 30px rgba(21, 128, 61, .08); }
[data-theme="light"] .badge.green { color: #15803d; border-color: #b2dcc2; background: rgba(21, 128, 61, .10); }
[data-theme="light"] .badge.blue { color: #1d4ed8; border-color: #b9cbf0; background: rgba(59, 111, 224, .10); }
[data-theme="light"] .badge.gold { color: #8a6d1f; border-color: #e3cfa0; background: rgba(161, 98, 7, .10); }
[data-theme="light"] .opt:hover { border-color: #9db0d2; }
[data-theme="light"] .btn.gold { background: rgba(240, 198, 116, .24); border-color: #d9b25e; color: #7a5a10; }
[data-theme="light"] .btn.gold:hover { background: rgba(240, 198, 116, .34); }
[data-theme="light"] .btn.danger { background: rgba(217, 45, 32, .08); border-color: rgba(217, 45, 32, .28); color: #b42318; }
[data-theme="light"] .btn.danger:hover { background: rgba(217, 45, 32, .14); }

/* 发送区 / 弹窗 / 提示 */
[data-theme="light"] .composer { background: rgba(255, 255, 255, .86); }
[data-theme="light"] .chip:hover { border-color: #9db0d2; }
[data-theme="light"] .modal-backdrop { background: rgba(20, 28, 48, .34); }
[data-theme="light"] .toast.err { border-color: #f2c7c2; color: #b42318; background: #fff4f2; }
[data-theme="light"] .toast.ok { border-color: #b2dcc2; color: #15803d; background: #f2fbf5; }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: #cdd5e4; background-clip: content-box; }
[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: #b0bccf; background-clip: content-box; }
[data-theme="light"] .scrim { background: rgba(20, 28, 48, .34); }

/* 顶栏 */
[data-theme="light"] .topnav { background: rgba(255, 255, 255, .88); border-bottom-color: #e4e8f1; }
[data-theme="light"] .tn-logo { color: #17203a; }
[data-theme="light"] .tn-item:hover { color: #1b2233; background: rgba(24, 36, 66, .05); }
[data-theme="light"] .tn-item.active { color: #1d4ed8; background: rgba(59, 111, 224, .12); box-shadow: inset 0 0 0 1px rgba(59, 111, 224, .25); }
[data-theme="light"] .tn-search,
[data-theme="light"] .tn-bell { background: rgba(24, 36, 66, .05); border-color: rgba(24, 36, 66, .10); }
[data-theme="light"] .tn-search:hover,
[data-theme="light"] .tn-bell:hover { background: rgba(24, 36, 66, .09); }
[data-theme="light"] .tn-me { border-color: rgba(24, 36, 66, .10); }
[data-theme="light"] .tn-me:hover { background: rgba(24, 36, 66, .05); }
[data-theme="light"] .tn-avatar { background: rgba(24, 36, 66, .08); }
[data-theme="light"] .tn-points { color: #a16207; }

/* 论坛首页 / 版块 */
[data-theme="light"] .fcrumb a { color: #5b46d6; }
[data-theme="light"] .fhero {
  background: linear-gradient(135deg, rgba(111, 91, 230, .10), rgba(255, 255, 255, .92));
  border-color: #e0e6f2;
}
[data-theme="light"] .fstats b { color: #0f172a; }
[data-theme="light"] .fgroup,
[data-theme="light"] .fside,
[data-theme="light"] .fpost,
[data-theme="light"] .freply { border-color: #e3e7f1; background: rgba(255, 255, 255, .86); }
[data-theme="light"] .fgroup-head { background: rgba(24, 36, 66, .03); border-bottom-color: #e3e7f1; }
[data-theme="light"] .frow { border-top-color: #edf0f7; }
[data-theme="light"] .frow:hover { background: rgba(59, 111, 224, .05); }
[data-theme="light"] .frow-title { color: #1b2233; }
[data-theme="light"] .frow-last { color: #6b7490; }
[data-theme="light"] .ffoot { color: #8792a8; }
[data-theme="light"] .fonline .dot { background: #15803d; box-shadow: 0 0 8px rgba(21, 128, 61, .45); }
[data-theme="light"] .fpost-text { color: #26304a; }
[data-theme="light"] .fpost-text .at { color: #3b4fd8; }
[data-theme="light"] .fquote { border-left-color: #b6a8f0; background: rgba(111, 91, 230, .07); color: #4a5878; }
[data-theme="light"] .fquote-who { color: #5b46d6; }
[data-theme="light"] .freply textarea:focus,
[data-theme="light"] .finput:focus { border-color: #7a63e8; }
[data-theme="light"] .quote-chip { color: #1d4ed8; background: rgba(59, 111, 224, .10); border-color: #b9cbf0; }
[data-theme="light"] .chip-x { color: #1d4ed8; }
[data-theme="light"] .chip-x:hover { color: #0f172a; }
[data-theme="light"] .frow-snip { color: #6b7490; }
[data-theme="light"] .edited-mark { color: #6b7490; }
[data-theme="light"] .fpost.is-deleted .fpost-text { color: #98a2b3; }
[data-theme="light"] .mrow .frow-author { color: #5f6b85; }

/* 个人中心 / 头像 / 等级 */
[data-theme="light"] .avatar.va { background: rgba(24, 36, 66, .08); }
[data-theme="light"] .avatar-img { background: #dbe1ed; }
[data-theme="light"] .lvl { border-color: rgba(24, 36, 66, .14); color: #4a5878; }
[data-theme="light"] .lvl-1 { color: #8792a8; }
[data-theme="light"] .lvl-2 { color: #15803d; border-color: rgba(21, 128, 61, .35); }
[data-theme="light"] .lvl-3 { color: #0369a1; border-color: rgba(3, 105, 161, .30); }
[data-theme="light"] .lvl-4 { color: #6d28d9; border-color: rgba(109, 40, 217, .30); }
[data-theme="light"] .lvl-5 { color: #a16207; border-color: rgba(161, 98, 7, .35); }
[data-theme="light"] .lvl-6 { color: #c2410c; border-color: rgba(194, 65, 12, .35); background: rgba(194, 65, 12, .10); }
[data-theme="light"] .pcard { background: #fff; border-color: #e3e7f1; }
[data-theme="light"] .pbar { background: rgba(24, 36, 66, .08); }
[data-theme="light"] .pcard-stats span { color: #6b7490; }
[data-theme="light"] .pavatar-pick .pv { background: rgba(24, 36, 66, .05); border-color: rgba(24, 36, 66, .10); }
[data-theme="light"] .pavatar-pick .pv.on { border-color: #3b6fe0; background: rgba(59, 111, 224, .14); }
[data-theme="light"] .plog .up { color: #15803d; }
[data-theme="light"] .plog .down { color: #b42318; }
[data-theme="light"] .pid { color: #5f6b85; border-color: rgba(24, 36, 66, .14); }
[data-theme="light"] .pimg img { border-color: rgba(24, 36, 66, .08); }
[data-theme="light"] .badge.ok { background: rgba(21, 128, 61, .10); color: #15803d; border-color: rgba(21, 128, 61, .28); }
[data-theme="light"] .finput:-webkit-autofill,
[data-theme="light"] .finput:-webkit-autofill:hover,
[data-theme="light"] .finput:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #fff inset;
  -webkit-text-fill-color: #1b2233;
}

/* ============ 行内控件宽度（v1.5.5）：按钮不收缩不换行，输入框独占剩余宽度 ============ */
.row.gap > .btn { flex: 0 0 auto; white-space: nowrap; }
.row.gap > .input, .row.gap > input { flex: 1 1 auto; min-width: 0; }

/* ============ 启动骨架 / 主题切换按钮（v1.5.4） ============ */
.boot-card { display: flex; flex-direction: column; align-items: center; gap: 14px; color: var(--muted); font-size: 13px; }
.boot-card p { margin: 0; }
.boot-ring {
  width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--accent);
  animation: bootSpin .8s linear infinite;
}
@keyframes bootSpin { to { transform: rotate(360deg); } }

.auth-card { position: relative; }
.auth-theme { position: absolute; top: 14px; right: 12px; font-size: 16px; line-height: 1; }
.tn-theme .theme-ico { font-size: 14px; line-height: 1; }

/* ================= 文章（v1.6.1） ================= */
.awrap { max-width: 1180px; }
.ahero { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.ahero h1 { margin: 0 0 6px; font-size: 30px; letter-spacing: .5px; }
.ahero p { margin: 0; max-width: 620px; }
.ahero-act { flex: 0 0 auto; padding-bottom: 4px; }

.art-search { margin-bottom: 12px; }
.art-tabs { display: flex; gap: 8px; margin: 0 0 14px; }
.art-tab {
  appearance: none; cursor: pointer; font: inherit; font-size: 13px;
  padding: 6px 14px; border-radius: 999px;
  color: var(--muted); background: var(--tint-1, rgba(255, 255, 255, .04));
  border: 1px solid var(--line); transition: .16s;
}
.art-tab:hover { color: var(--text); border-color: var(--hover-line, #33405a); }
.art-tab.on { color: #fff; background: var(--accent); border-color: var(--accent); }

.art-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.art-card {
  display: flex; gap: 16px; padding: 14px; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-2); transition: .16s;
}
.art-card:hover { border-color: var(--hover-line, #33405a); transform: translateY(-1px); }
.art-cover {
  flex: 0 0 168px; width: 168px; height: 112px; border-radius: 10px; overflow: hidden;
  background: var(--tint-2, rgba(255, 255, 255, .06));
  display: flex; align-items: center; justify-content: center;
}
.art-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art-cover-none span { font-size: 30px; opacity: .5; }
.art-card-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.art-card-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
.art-card-title { margin: 0 0 6px; font-size: 18px; line-height: 1.4; color: var(--text); }
.art-card-sum {
  margin: 0 0 10px; color: var(--muted); font-size: 13px; line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.art-card-foot { margin-top: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.art-author { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.art-author b { font-weight: 600; font-size: 13px; }
.art-stats { display: inline-flex; gap: 10px; margin-left: auto; }
.art-stat { font-size: 12px; color: var(--muted); white-space: nowrap; }

.art-tag {
  appearance: none; cursor: pointer; font: inherit; font-size: 12px;
  padding: 2px 9px; border-radius: 999px;
  color: var(--accent, #6ea8fe); background: var(--soft-accent-bg, rgba(110, 168, 254, .14));
  border: 1px solid var(--soft-accent-line, #2b3857);
}
.art-tag:hover { filter: brightness(1.15); }
.art-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.art-hot { display: flex; gap: 8px; align-items: flex-start; padding: 7px 0; cursor: pointer; border-top: 1px solid var(--row-line, #1a1a26); }
.art-hot:first-child { border-top: 0; }
.art-hot-i { flex: 0 0 auto; width: 18px; color: var(--gold, #f0c674); font-size: 12px; font-weight: 700; }
.art-hot-t { font-size: 13px; line-height: 1.5; color: var(--text-3, #dcdce8); }
.art-hot:hover .art-hot-t { color: var(--accent); }
.art-home .fgroup-head, .art-home .frow { cursor: pointer; }

.art-detail {
  padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2);
}
.art-h1 { margin: 0 0 12px; font-size: 28px; line-height: 1.35; }
.art-dhead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--row-line, #1a1a26); }
.art-author-txt { display: flex; flex-direction: column; gap: 2px; }
.art-dhead-act { display: inline-flex; gap: 6px; margin-left: auto; }
.art-dcover { margin: 16px 0 4px; border-radius: 10px; overflow: hidden; }
.art-dcover img { width: 100%; max-height: 380px; object-fit: cover; display: block; }
.art-content { font-size: 15px; line-height: 1.85; color: var(--text-3, #dcdce8); }
.art-content p { margin: 0 0 14px; }
.art-content img { max-width: 100%; border-radius: 8px; display: block; margin: 10px 0; }
.art-content .art-h { margin: 22px 0 10px; color: var(--text, #e6e9f2); line-height: 1.4; font-weight: 700; }
.art-content h2.art-h { font-size: 20px; }
.art-content h3.art-h { font-size: 17px; }
.art-content h4.art-h, .art-content h5.art-h { font-size: 15px; }
.art-content .art-ul { margin: 0 0 14px; padding-left: 22px; }
.art-content .art-ul li { margin: 4px 0; }
.art-content .art-quote {
  margin: 0 0 14px; padding: 10px 14px; border-left: 3px solid var(--quote-line, #4a3f7a);
  background: var(--quote-bg, rgba(122, 92, 240, .10)); border-radius: 0 8px 8px 0; color: var(--muted-2, #b9b9d0);
}
.art-content code {
  padding: 1px 6px; border-radius: 5px; font-size: 13px;
  background: var(--tint-2, rgba(255, 255, 255, .06)); border: 1px solid var(--line, #232a3a);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.art-content strong { color: var(--text, #e6e9f2); }
.art-lock {
  margin: 18px 0; padding: 26px; text-align: center;
  border: 1px dashed var(--line); border-radius: var(--radius);
  background: var(--tint-1, rgba(255, 255, 255, .04));
}
.art-lock-ico { font-size: 34px; margin-bottom: 8px; }
.art-lock h3 { margin: 0 0 8px; font-size: 17px; }

.art-atts { margin-top: 20px; }
.art-att {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin-bottom: 8px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--tint-1, rgba(255, 255, 255, .04));
}
.art-att-ico { flex: 0 0 auto; font-size: 20px; }
.art-att-main { flex: 1 1 auto; min-width: 0; }
.art-att-name { font-size: 14px; color: var(--text); word-break: break-all; }
.art-att-meta { font-size: 12px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 3px; }

.art-actions {
  display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px;
  padding-top: 16px; border-top: 1px solid var(--row-line, #1a1a26);
}
.art-vote {
  appearance: none; cursor: pointer; font: inherit; font-size: 14px;
  padding: 8px 18px; border-radius: 999px; color: var(--text-3, #dcdce8);
  background: var(--tint-2, rgba(255, 255, 255, .06));
  border: 1px solid var(--line); transition: .16s;
}
.art-vote:hover { border-color: var(--hover-line, #33405a); }
.art-vote.on { color: #fff; background: var(--accent); border-color: var(--accent); }
.art-vote.fav.on { color: #241a00; background: var(--gold, #f0c674); border-color: var(--gold, #f0c674); }
.art-vote b { font-weight: 700; }

.art-comments { margin-top: 22px; }
.art-cform { margin: 10px 0 16px; }
.art-cform textarea {
  width: 100%; box-sizing: border-box; min-height: 76px; resize: vertical;
  padding: 10px 12px; border-radius: 10px; font: inherit; font-size: 14px;
  color: var(--text); background: var(--bg-3); border: 1px solid var(--line);
}
.art-cform textarea:focus { outline: none; border-color: var(--focus-line, #3a4a6b); }
.art-cform-act { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.art-comment {
  display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--row-line, #1a1a26);
}
.art-comment:first-child { border-top: 0; }
.art-c-av { flex: 0 0 auto; }
.art-c-main { flex: 1 1 auto; min-width: 0; }
.art-c-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.art-c-head b { font-size: 13px; cursor: pointer; }
.art-c-head .score { color: var(--gold, #f0c674); }
.art-c-text { font-size: 14px; line-height: 1.7; color: var(--text-3, #dcdce8); word-break: break-word; }
.art-c-acts { display: flex; gap: 8px; margin-top: 8px; }
.art-cvote {
  appearance: none; cursor: pointer; font: inherit; font-size: 12px;
  padding: 3px 10px; border-radius: 999px; color: var(--muted);
  background: transparent; border: 1px solid var(--line);
}
.art-cvote:hover { color: var(--text); }
.art-cvote.on { color: #fff; background: var(--accent); border-color: var(--accent); }
.art-cvote.del { color: var(--danger); border-color: var(--danger-line, rgba(239, 83, 80, .35)); }

.art-editor {
  padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2);
}
.art-field { display: block; margin-bottom: 16px; font-size: 13px; color: var(--muted); }
.art-field > .finput, .art-field > .art-textarea { margin-top: 6px; }
.art-textarea {
  width: 100%; box-sizing: border-box; min-height: 320px; resize: vertical;
  padding: 12px 14px; border-radius: 10px; font: inherit; font-size: 14px; line-height: 1.7;
  color: var(--text); background: var(--bg-3); border: 1px solid var(--line);
}
.art-textarea:focus { outline: none; border-color: var(--focus-line, #3a4a6b); }
.art-field-row { display: flex; gap: 14px; flex-wrap: wrap; }
.art-field-row > .art-field { flex: 1 1 220px; }
.art-cover-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.art-cover-thumb { width: 120px; height: 80px; object-fit: cover; border-radius: 8px; display: block; border: 1px solid var(--line); }
.art-att-list { margin-top: 8px; }
.art-att-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 10px; margin-bottom: 8px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--tint-1, rgba(255, 255, 255, .04));
}
.art-att-row .art-att-name { flex: 1 1 200px; min-width: 0; font-size: 13px; }
.art-att-opt { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.finput.tiny { width: 92px; padding: 5px 8px; font-size: 12px; }
.art-att-add { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.art-editor-act { display: flex; justify-content: flex-end; gap: 10px; padding-top: 8px; border-top: 1px solid var(--row-line, #1a1a26); }
.art-mine-act { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* ---- v2.6.3 文字格式工具条 + 草稿 ---- */
.mdbar {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  margin: 8px 0 6px; padding: 5px 6px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg-3);
}
.mdbar .md-tip { margin-left: auto; padding-right: 4px; font-size: 11px; color: var(--muted); opacity: .8; }
.mdbtn {
  min-width: 32px; height: 28px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-size: 13px; color: var(--text-2, #cfd3e0); cursor: pointer;
  background: transparent; border: 1px solid transparent; border-radius: 6px; transition: all .12s;
}
.mdbtn:hover { background: var(--tint-2, rgba(255, 255, 255, .08)); color: var(--text); border-color: var(--line); }
.mdbtn:active { transform: translateY(1px); }
.mdbtn b { font-weight: 800; }
.mdbtn i { font-style: italic; }
.mdbtn s { text-decoration: line-through; }
.mdbtn code { font-family: var(--mono, ui-monospace, monospace); font-size: 12px; }

.art-draftbar {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0; padding: 10px 14px;
  border: 1px dashed var(--gold-line, rgba(255, 198, 107, .45)); border-radius: 10px;
  background: var(--gold-tint, rgba(255, 198, 107, .07)); font-size: 13px;
}
.art-draftbar b { color: var(--gold, #ffc66b); }
.ctable tr.is-draft td { opacity: .82; }
.ctable tr.is-draft .ct-title { font-style: italic; }

/* 浅色主题下的文章样式微调 */
:root[data-theme="light"] .art-tab { background: rgba(24, 36, 66, .05); }
:root[data-theme="light"] .art-tab.on,
:root[data-theme="light"] .art-vote.on,
:root[data-theme="light"] .art-cvote.on { color: #fff; }
:root[data-theme="light"] .art-tabs .art-tab.on {
  color: #1d4ed8; background: rgba(59, 111, 224, .14); border-color: rgba(59, 111, 224, .34);
}
:root[data-theme="light"] .art-vote.on { background: rgba(59, 111, 224, .14); border-color: rgba(59, 111, 224, .34); color: #1d4ed8; }
:root[data-theme="light"] .art-vote.fav.on { color: #8a5a00; background: rgba(240, 198, 116, .18); border-color: rgba(200, 150, 40, .38); }
:root[data-theme="light"] .art-vote.fav.on { color: #2a1f04; }
:root[data-theme="light"] .art-card { background: #fff; }
:root[data-theme="light"] .art-card-title { color: #1b2233; }
:root[data-theme="light"] .art-content,
:root[data-theme="light"] .art-c-text { color: #2b3345; }
:root[data-theme="light"] .art-tag { background: rgba(59, 111, 224, .10); border-color: #c3d3f2; color: #2f57b8; }
:root[data-theme="light"] .art-att,
:root[data-theme="light"] .art-att-row { background: #f7f9fd; }
:root[data-theme="light"] .art-lock { background: #f7f9fd; }
:root[data-theme="light"] .art-vote { background: rgba(24, 36, 66, .05); color: #2b3345; }
:root[data-theme="light"] .art-cvote { background: #fff; color: #5f6b85; }
:root[data-theme="light"] .art-content .art-h { color: #141b2b; }
:root[data-theme="light"] .art-content .art-quote { background: #f1effc; border-left-color: #b6a8f0; color: #464f66; }
:root[data-theme="light"] .art-content code { background: #eef2fa; border-color: #dbe1ed; color: #1f3a6b; }
:root[data-theme="light"] .art-content strong { color: #141b2b; }

/* ================= 图标 / 通知中心 / 私信 / 个人中心侧栏（v1.7） ================= */
.ic { width: 1em; height: 1em; flex: none; display: inline-block; vertical-align: -0.16em; }
.btn .ic, .art-tab .ic, .tn-item .ic { margin-right: 4px; }
.theme-ico .ic, .bell-ico .ic { width: 17px; height: 17px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  padding: 5px; border: 0; border-radius: 8px; background: none;
  color: var(--muted); cursor: pointer;
}
.icon-btn:hover { color: var(--text); background: rgba(255, 255, 255, .07); }
.icon-btn .ic { width: 17px; height: 17px; }
.art-cover-none .ic { width: 32px; height: 32px; opacity: .55; }
.art-lock-ico .ic { width: 40px; height: 40px; opacity: .8; }
.dm-btn { margin-left: auto; }
.dm-btn .ic { width: 16px; height: 16px; }

/* 通知中心 */
.noti-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 4px 0 12px; }
.noti-pages { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.noti-list .noti-row {
  display: grid; grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 3px 10px; padding: 12px 14px; border-top: 1px solid var(--line); cursor: pointer;
}
.noti-list .noti-row:first-child { border-top: 0; }
.noti-list .noti-row:hover { background: rgba(122, 92, 240, .08); }
.noti-list .noti-row .noti-ico { grid-row: 1 / span 2; color: var(--muted); padding-top: 2px; }
.noti-list .noti-row .noti-ico .ic { width: 17px; height: 17px; }
.noti-list .noti-row .frow-title { grid-column: 2; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.noti-list .noti-row .frow-author { grid-column: 2; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.noti-list .noti-row .frow-last { grid-column: 3; grid-row: 1; font-size: 12px; color: var(--muted); }
.noti-list .noti-row.unread .frow-title { font-weight: 600; }

/* 私信 */
.dm-wrap { display: flex; flex-direction: column; gap: 10px; width: 100%; min-width: 0; }
.dm-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dm-head .modal-title { margin: 0; }
.dm-body {
  display: flex; flex-direction: column; gap: 8px;
  max-height: min(56vh, 440px); overflow-y: auto; overflow-x: hidden; padding: 4px 2px;
}
.dm-row { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.dm-row.mine { align-items: flex-end; }
.dm-bubble {
  max-width: 80%; padding: 8px 12px; border-radius: 12px;
  background: var(--bg-3); border: 1px solid var(--line);
  font-size: 13.5px; line-height: 1.65; word-break: break-word;
}
.dm-row.mine .dm-bubble { background: rgba(110, 168, 254, .16); border-color: rgba(110, 168, 254, .34); }
.dm-time { font-size: 11px; color: var(--muted); }
.dm-form { display: flex; gap: 8px; align-items: center; }
.dm-form .finput { flex: 1 1 auto; min-width: 0; }
.dm-form .btn { flex: 0 0 auto; }

/* 个人中心左栏 */
.pf-layout { display: grid; grid-template-columns: 218px minmax(0, 1fr); gap: 16px; align-items: start; }
.pf-side {
  display: flex; flex-direction: column; gap: 3px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 12px; position: sticky; top: 72px;
}
.pf-side-top { display: flex; gap: 10px; align-items: center; padding: 2px 4px 12px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.pf-side-meta { min-width: 0; }
.pf-side-name { font-weight: 600; font-size: 14px; margin-bottom: 3px; word-break: break-all; }
.pf-side-meta .lvl { margin-bottom: 3px; }
.pf-side-item {
  display: flex; align-items: center; gap: 8px; padding: 9px 10px;
  border: 1px solid transparent; border-radius: 10px; background: none;
  color: var(--muted); font-size: 13.5px; text-align: left; cursor: pointer;
}
.pf-side-item:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.pf-side-item.on { color: var(--text); background: rgba(255, 255, 255, .07); border-color: var(--line); }
.pf-side-item .ic { width: 16px; height: 16px; }
.pf-main { min-width: 0; }
@media (max-width: 860px) {
  .pf-layout { grid-template-columns: minmax(0, 1fr); }
  .pf-side { position: static; flex-direction: row; flex-wrap: wrap; }
  .pf-side-top { flex: 1 1 100%; border-bottom: 0; padding-bottom: 4px; margin-bottom: 4px; }
}

:root[data-theme="light"] .icon-btn:hover { background: rgba(24, 36, 66, .07); }
:root[data-theme="light"] .noti-list .noti-row:hover { background: rgba(59, 111, 224, .07); }
:root[data-theme="light"] .dm-bubble { background: #f1f4fa; border-color: #dde3ef; }
:root[data-theme="light"] .dm-row.mine .dm-bubble { background: rgba(59, 111, 224, .12); border-color: rgba(59, 111, 224, .26); }
:root[data-theme="light"] .pf-side { background: #fff; }
:root[data-theme="light"] .pf-side-item:hover { background: rgba(24, 36, 66, .05); }
:root[data-theme="light"] .pf-side-item.on { background: rgba(59, 111, 224, .10); }

/* ================= 时间排版 + 评论区（v1.7.6） ================= */
.when { color: var(--muted); font-size: 12px; white-space: nowrap; }

/* 文章卡片：时间落到查看数 / 点赞的下方 */
.art-card-foot { align-items: flex-start; row-gap: 2px; }
.art-card-foot .art-stats { margin-left: auto; }
.art-card-foot .art-when { flex: 0 0 100%; order: 9; margin-top: -2px; }

/* 文章详情：统计在上、时间在下 */
.art-dhead { align-items: flex-start; }
.art-dhead-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; margin-left: auto; }
.art-dhead-right .art-stats { margin-left: 0; }
.art-when-line { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* 楼层：时间放在右下角 */
.fpost-meta { justify-content: flex-end; }
.fpost-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.fpost-foot .when { font-size: 12px; }

/* 评论区（参考 B 站：时间 · 赞 · 踩 · 删除） */
.art-c-acts { display: flex; align-items: center; gap: 14px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.art-c-when { color: var(--muted); font-size: 12px; }
.art-cvote {
  appearance: none; cursor: pointer; font: inherit; font-size: 12px; line-height: 1;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 6px; border: 0; border-radius: 6px;
  color: var(--muted); background: transparent;
}
.art-cvote .ic { width: 14px; height: 14px; }
.art-cvote b { font-weight: 500; }
.art-cvote:hover { color: var(--text); background: rgba(127, 127, 127, .12); }
.art-cvote.on, .art-cvote.on:hover { color: var(--accent); background: transparent; }
.art-cvote.del { color: var(--danger); }
:root[data-theme="light"] .art-cvote { background: transparent; }
:root[data-theme="light"] .art-cvote:hover { background: rgba(24, 36, 66, .08); }
:root[data-theme="light"] .art-cvote.on, :root[data-theme="light"] .art-cvote.on:hover { color: #1d4ed8; background: transparent; }
/* ================= v1.9 等级 12 级 / 称号 / 任务 / 商城 / 悬停卡片 / 色子 ================= */
/* 12 级配色：由冷到暖再到金 */
.lvl-7 { color: #c9a0f0; border-color: rgba(201,160,240,.38); }
.lvl-8 { color: #9fd8ff; border-color: rgba(159,216,255,.40); background: rgba(159,216,255,.08); }
.lvl-9 { color: #ffd479; border-color: rgba(255,212,121,.45); background: rgba(255,212,121,.10); }
.lvl-10 { color: #ffb86b; border-color: rgba(255,184,107,.5); background: rgba(255,184,107,.12); }
.lvl-11 { color: #ff9d8a; border-color: rgba(255,157,138,.5); background: rgba(255,157,138,.12); }
.lvl-12 { color: #ffe066; border-color: rgba(255,224,102,.55); background: rgba(255,224,102,.14); font-weight: 600; }

/* 等级 + 称号（称号在等级下面一行） */
.lvlwrap { display: inline-flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 5px; vertical-align: middle; }
.title-chip {
  display: inline-block; font-size: 10px; line-height: 1.4; padding: 1px 7px; border-radius: 999px;
  color: #ffe9b0; border: 1px solid rgba(240,198,116,.42); background: rgba(240,198,116,.12);
  white-space: nowrap; max-width: 11em; overflow: hidden; text-overflow: ellipsis;
}
:root[data-theme="light"] .title-chip { color: #8a5b00; background: rgba(240,198,116,.24); border-color: rgba(161,98,7,.3); }

/* 顶栏：B 站式搜索框 / 发布按钮 / 用户悬停卡片 */
.tn-right { display: flex; align-items: center; gap: 8px; }
.tn-searchbox {
  display: flex; align-items: center; gap: 0; height: 32px; padding: 0 4px 0 12px;
  border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  transition: .15s; min-width: 190px; width: 212px;
}
.tn-searchbox:focus-within { background: rgba(255,255,255,.10); border-color: rgba(110,168,254,.55); width: 264px; }
.tn-search-input {
  width: 100%; border: 0; background: transparent; color: inherit; font: inherit; font-size: 13px;
  padding: 0; outline: none; height: 28px;
}
.tn-search-go {
  appearance: none; border: 0; cursor: pointer; flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; color: var(--muted); background: transparent;
}
.tn-search-go:hover { color: var(--text); background: rgba(255,255,255,.10); }
.tn-publish {
  display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 13px 0 10px;
  border-radius: 999px; border: 0; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600;
  color: #0a0d14; background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.tn-publish:hover { filter: brightness(1.06); }
.tn-publish .ic { width: 15px; height: 15px; }
:root[data-theme="light"] .tn-searchbox { background: rgba(24,36,66,.05); border-color: rgba(24,36,66,.12); }
:root[data-theme="light"] .tn-search-go:hover { background: rgba(24,36,66,.08); }

.tn-card {
  position: absolute; top: 52px; right: 14px; width: 268px; z-index: 60;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); padding: 16px;
}
.tnc-head { display: flex; gap: 10px; align-items: center; }
.tnc-avatar .avatar-img, .tnc-avatar img { border-radius: 50%; }
.tnc-id { min-width: 0; }
.tnc-id b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tnc-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.tnc-bar { height: 5px; border-radius: 999px; background: rgba(127,127,127,.2); overflow: hidden; margin: 12px 0 6px; }
.tnc-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.tnc-exp { font-size: 11px; color: var(--muted); }
.tnc-stats { display: flex; gap: 16px; margin: 12px 0 4px; font-size: 12px; color: var(--muted); }
.tnc-stats b { color: var(--text); font-size: 14px; margin-right: 3px; }
.tnc-acts { display: flex; gap: 6px; margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.tnc-act {
  flex: 1; appearance: none; cursor: pointer; font: inherit; font-size: 12px; padding: 7px 4px;
  border-radius: 9px; border: 1px solid var(--line); background: var(--bg-3); color: var(--text);
}
.tnc-act:hover { border-color: #33405a; }
.tnc-act.danger { color: var(--danger); }
.tn-card.hidden { display: none; }

/* 发布下拉 */
.pub-menu {
  position: absolute; top: 52px; right: 16px; z-index: 60; width: 236px; padding: 8px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
}
.pub-menu.hidden { display: none; }
.pub-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; cursor: pointer;
  appearance: none; font: inherit; padding: 10px; border-radius: 10px; border: 0; background: transparent; color: var(--text);
}
.pub-item:hover { background: rgba(127,127,127,.12); }
.pub-ico { width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(110,168,254,.14); color: var(--accent); flex: 0 0 auto; }
.pub-txt b { display: block; font-size: 13px; }
.pub-txt i { display: block; font-style: normal; font-size: 11px; color: var(--muted); }

/* 版块选择列表 */
.pick-board { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow: auto; margin: 12px 0; }
.pick-row {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; cursor: pointer;
  appearance: none; font: inherit; padding: 9px 10px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg-3); color: var(--text);
}
.pick-row:hover { border-color: #3a4a6b; }
.pick-row.on { border-color: var(--accent); background: rgba(110,168,254,.12); }
.pick-ico { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.pick-txt { min-width: 0; }
.pick-txt b { display: block; font-size: 13px; }
.pick-txt i { display: block; font-style: normal; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-num { margin-left: auto; font-size: 11px; color: var(--muted); }

/* 个人中心：称号 / 任务 / 商城 / 管理 */
.title-wall { display: flex; flex-direction: column; gap: 8px; }
.title-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg-2); }
.title-row.on { border-color: rgba(240,198,116,.5); background: rgba(240,198,116,.08); }
.title-main { min-width: 0; flex: 1; }
.title-name b { font-size: 14px; }
.title-row p { margin: 2px 0 0; }
.title-row .btn { flex: 0 0 auto; }

.task-list { display: flex; flex-direction: column; gap: 8px; }
.task-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg-2); }
.task-row.done { opacity: .72; }
.task-main { min-width: 0; flex: 1; }
.task-name { font-size: 13px; font-weight: 600; }
.task-row p { margin: 2px 0 0; }
.task-bar { height: 4px; border-radius: 999px; background: rgba(127,127,127,.2); overflow: hidden; margin-top: 6px; }
.task-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.task-right { flex: 0 0 auto; }
.task-fold { margin-top: 10px; border: 1px dashed var(--line); border-radius: 12px; padding: 8px 10px; }
.task-fold summary { cursor: pointer; font-size: 12px; color: var(--muted); }
.task-fold .task-row { margin-top: 8px; background: transparent; }

.shop-list { display: flex; flex-direction: column; gap: 8px; }
.shop-item { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg-2); }
.shop-ico { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center;
  justify-content: center; background: rgba(240,198,116,.14); color: var(--gold); flex: 0 0 auto; }
.shop-main { min-width: 0; flex: 1; }
.shop-name { font-size: 13px; font-weight: 600; }
.shop-item p { margin: 2px 0 0; }
.shop-use { margin-top: 16px; }
.shop-use-row { display: flex; gap: 8px; align-items: center; margin: 8px 0; flex-wrap: wrap; }
.shop-use-row .finput { flex: 1 1 180px; }
.adm-sec { margin-bottom: 16px; }
.adm-users { max-height: 40vh; overflow: auto; display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }

/* 评论区：浅灰长分隔线（参考 B 站） */
.art-cdiv { height: 1px; background: rgba(127,127,127,.22); margin: 26px 0 18px; }
:root[data-theme="light"] .art-cdiv { background: rgba(24,36,66,.12); }

/* 骰子 */
.send-tools { display: inline-flex; align-items: center; gap: 6px; }
.dice-btn { flex: 0 0 auto; }
.dice-menu {
  position: absolute; bottom: 74px; right: 16px; z-index: 40; display: flex; flex-direction: column; gap: 4px;
  padding: 8px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
}
.dice-menu.hidden { display: none; }
.dice-item { display: flex; align-items: center; gap: 8px; cursor: pointer; appearance: none; font: inherit;
  border: 0; background: transparent; color: var(--text); padding: 7px 10px; border-radius: 9px; white-space: nowrap; }
.dice-item:hover { background: rgba(127,127,127,.12); }
.dice-item b { font-size: 13px; }
.dice-item i { font-style: normal; font-size: 11px; color: var(--muted); }
.msg.dice .bubble.dice-bubble { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dice-label { font-size: 11px; color: var(--muted); }
.dice-face {
  min-width: 30px; height: 30px; padding: 0 6px; border-radius: 8px; display: inline-flex; align-items: center;
  justify-content: center; font-weight: 700; font-size: 14px; background: rgba(110,168,254,.16);
  border: 1px solid rgba(110,168,254,.4); color: var(--text);
}
.dice-total { font-size: 11px; color: var(--muted); }

/* 登录页背景图（图片由 index.php 内联） */
#view-auth { background-size: cover; background-position: center; min-height: 100dvh; background-color: #0b0e14; }

/* ================= 手机版顶栏（v1.9.8） ================= */
/* 桌面：logo | 四个导航 | 搜索 铃铛 发布 头像 */
/* 手机：第一行 logo + 搜索 + 铃铛 + 发布(+) + 头像，第二行导航横滑 */
@media (max-width: 760px) {
  .topnav {
    height: auto; min-height: 52px; flex-wrap: wrap; align-items: center;
    column-gap: 6px; row-gap: 4px; padding: 7px 12px 5px; overflow: visible;
  }
  .tn-logo { order: 1; font-size: 15px; white-space: nowrap; }
  .tn-right { display: contents; }
  .tn-searchbox {
    order: 2; flex: 1 1 40px; width: auto; min-width: 0; height: 32px;
    padding: 0 2px 0 10px;
  }
  .tn-searchbox:focus-within { width: auto; }
  .tn-search-input { font-size: 14px; min-width: 0; }
  .tn-bell { order: 3; margin-left: 0; }
  .tn-publish { order: 4; width: 32px; padding: 0; justify-content: center; gap: 0; }
  .tn-publish span { display: none; }
  .tn-me { order: 5; padding: 3px 3px; gap: 0; }
  .tn-user, .tn-points { display: none; }
  .tn-items {
    order: 6; flex: 1 0 100%; margin-top: 1px; gap: 2px;
    overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
    -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
  }
  .tn-items::-webkit-scrollbar { display: none; }
  .tn-item { padding: 6px 10px; font-size: 13px; white-space: nowrap; flex: 0 0 auto; }
  .tn-card { position: fixed; top: calc(var(--nav-h) + 6px); left: 10px; right: 10px; width: auto; }
}

/* 极窄屏：搜索框再收一点，导航项更紧 */
@media (max-width: 380px) {
  .tn-item { padding: 6px 8px; font-size: 12.5px; }
  .tn-logo { font-size: 14px; }
}

/* 手机版其他纵向留白修正 */
@media (max-width: 760px) {
  body { overflow-x: hidden; }
  .fwrap { padding: 14px 12px 48px; }
  .art-wrap { padding: 14px 12px 48px; }
}

/* ================= v2.0：通知悬停卡片 ================= */
.bell-card {
  position: absolute; top: 54px; right: 64px; z-index: 60; width: 340px;
  background: var(--panel-solid, #131a26); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 18px 44px rgba(0,0,0,.38); overflow: hidden;
}
.bell-card.hidden { display: none; }
.bc-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px; border-bottom: 1px solid var(--line);
}
.bc-list { max-height: 320px; overflow-y: auto; }
.bc-item {
  display: grid; grid-template-columns: 8px 1fr auto; gap: 8px; align-items: center;
  width: 100%; text-align: left; padding: 10px 14px; border: 0; background: none;
  color: var(--text); cursor: pointer; border-bottom: 1px solid rgba(127,127,127,.08);
}
.bc-item:hover { background: rgba(110,168,254,.1); }
.bc-dot { width: 6px; height: 6px; border-radius: 50%; background: transparent; }
.bc-item.unread .bc-dot { background: var(--accent, #6ea8fe); }
.bc-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bc-main b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-main i { font-size: 12px; color: var(--muted); font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-time { font-size: 11px; color: var(--muted); white-space: nowrap; }
.bc-foot { padding: 8px 12px; text-align: center; border-top: 1px solid var(--line); }
@media (max-width: 760px) {
  .bell-card { position: fixed; top: calc(var(--nav-h) + 6px); left: 10px; right: 10px; width: auto; }
}

/* ================= v2.0：个人中心新增块 ================= */
.pf-flag {
  display: inline-block; margin-right: 6px; padding: 1px 6px; border-radius: 6px;
  font-size: 11px; background: rgba(255,183,77,.16); color: #ffb74d; vertical-align: 1px;
}
.pf-flag.new { background: rgba(110,168,254,.16); color: #6ea8fe; }
.pf-arts { margin-top: 14px; }
.pf-arts .fgroup { margin-top: 6px; }

.ptotal {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 12px 14px; margin: 8px 0 10px; border: 1px solid var(--line); border-radius: 12px;
  background: rgba(127,127,127,.05);
}
.ptotal > div { display: flex; flex-direction: column; gap: 2px; }
.ptotal b { font-size: 18px; }
.ptotal span { font-size: 11px; color: var(--muted); }
.ptotal .btn { margin-left: auto; }
.pfilters { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.pfilter-row { display: flex; gap: 6px; flex-wrap: wrap; }
.pfilter-row .chip {
  border: 1px solid var(--line); background: none; color: var(--muted);
  border-radius: 999px; padding: 3px 10px; font-size: 12px; cursor: pointer;
}
.pfilter-row .chip.on { border-color: var(--accent, #6ea8fe); color: var(--text); background: rgba(110,168,254,.14); }

.rule-group { margin: 12px 0 4px; }
.rule-group h4 { font-size: 13.5px; margin: 0 0 6px; }
.rule-list { margin: 0; padding-left: 18px; }
.rule-list li { font-size: 13px; color: var(--text); line-height: 1.85; }
.rule-list li b { font-weight: 600; }

/* ---------- 活动（v2.1） ---------- */
.act-badge {
  border-color: rgba(255, 196, 96, .55);
  color: #ffc460;
  background: rgba(255, 196, 96, .12);
  font-weight: 600;
}
.art-act-line { margin: -4px 0 10px; }
.nt-act { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin: 8px 0 4px; }
.nt-act select { flex: 0 1 320px; }
.act-form { display: flex; flex-direction: column; gap: 10px; }
.act-form .art-field { display: flex; flex-direction: column; gap: 6px; }
.act-form .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }


/* ===== 论坛版块体系 v2.2 ===== */
.bact { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.bside .fside-card { border: 1px solid #20202e; border-radius: 14px; padding: 14px 16px; background: rgba(15,15,22,.6); }
.bside .fside-card h4 { margin: 0 0 10px; font-size: 13px; color: var(--muted); font-weight: 500; letter-spacing: 1px; }
.bside-announce { font-size: 13px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.bside-mods { display: flex; flex-direction: column; gap: 8px; }
.bside-user { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.bside-user i { font-style: normal; font-size: 11px; color: var(--muted); }
.bside-av { width: 22px; height: 22px; border-radius: 50%; background: rgba(120,120,200,.25); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.bside-stat { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; border-bottom: 1px dashed rgba(127,127,127,.16); }
.bside-stat:last-of-type { border-bottom: 0; }
.fside-link { display: block; font-size: 13px; color: var(--brand); cursor: pointer; padding: 2px 4px; }
.blvl { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 999px; border: 1px solid rgba(120,140,255,.5); color: var(--brand); background: rgba(110,130,255,.12); vertical-align: middle; }
.blvl.sm { margin-left: 8px; }
.btable { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; max-height: 340px; overflow: auto; }
.btrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; padding: 6px 8px; border: 1px solid rgba(127,127,127,.14); border-radius: 10px; }
.btname { font-weight: 600; cursor: pointer; }
.btbtns { margin-left: auto; display: flex; gap: 6px; }
.bnote { flex: 1 1 220px; min-width: 120px; }
.bsec { margin: 18px 0 6px; font-size: 13px; color: var(--muted); font-weight: 500; }
.blvl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.blvl-cell { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.bmembers { display: flex; flex-wrap: wrap; gap: 8px; }
.btag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 8px; border-radius: 999px; border: 1px solid rgba(127,127,127,.2); }
.btag i { font-style: normal; color: var(--muted); }
.btag .x { border: 0; background: transparent; color: var(--danger, #ff6b6b); cursor: pointer; font-size: 14px; line-height: 1; }
.badd { display: flex; gap: 8px; margin-top: 8px; }
.badd .finput { flex: 1 1 auto; }
.btn.danger { color: #ff7a7a; border-color: rgba(255,120,120,.35); }
/* ===== 评论回复与置顶 v2.3 ===== */
.art-comment.is-pinned { border-left: 3px solid var(--brand); background: rgba(110,130,255,.06); border-radius: 0 10px 10px 0; padding-left: 10px; }
.art-creplies { margin: 4px 0 8px 44px; border-left: 2px solid rgba(127,127,127,.18); padding-left: 12px; }
.art-comment.is-reply { padding: 6px 0; }
.art-comment.is-reply .art-c-head b { font-size: 13px; }
.art-cpin-badge { font-size: 11px; color: var(--brand); border: 1px solid rgba(120,140,255,.5); border-radius: 999px; padding: 0 6px; }
.art-creply-slot:empty { display: none; }
.art-crform { margin-top: 6px; display: flex; flex-direction: column; gap: 6px; }
.art-crform textarea { width: 100%; border: 1px solid rgba(127,127,127,.25); border-radius: 10px; background: transparent; color: inherit; padding: 8px 10px; font-size: 13px; resize: vertical; }
.art-crform-act { display: flex; justify-content: flex-end; gap: 8px; }
/* ===== v2.4 举报与审核 ===== */
.rp-list { display: flex; flex-direction: column; gap: 10px; }
.rp-row { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between;
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--bg-3); }
.rp-main { flex: 1; min-width: 0; }
.rp-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; font-size: 14px; }
.rp-excerpt { white-space: pre-wrap; word-break: break-word; font-size: 13px;
  background: rgba(127,127,127,.10); border-radius: 8px; padding: 8px 10px; margin: 6px 0; }
.rp-reason { margin-bottom: 4px; }
.rp-meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.rp-acts { display: flex; gap: 6px; flex: none; }
.pf-sub { margin: 18px 0 8px; font-size: 14px; }
.pf-link { color: var(--accent); font-size: 13px; }
.badge.danger { border-color: rgba(240,120,120,.5); color: #f08c8c; }

/* ================= v2.5：白天模式补丁（版块侧栏 / 热门列表 / 通知卡 / 管理表格） ================= */
[data-theme="light"] .fside,
[data-theme="light"] .bside .fside-card {
  border-color: #e3e7f1; background: rgba(255, 255, 255, .88);
}
[data-theme="light"] .art-hot { border-top-color: #edf0f7; }
[data-theme="light"] .art-hot-t { color: #2c3a55; }
[data-theme="light"] .art-hot:hover .art-hot-t { color: #2b4fd0; }
[data-theme="light"] .art-hot-i { color: #b45309; }
[data-theme="light"] .bell-card {
  background: #ffffff; border-color: #e3e7f1; box-shadow: 0 18px 44px rgba(23, 37, 66, .16);
}
[data-theme="light"] .bc-item:hover { background: rgba(59, 111, 224, .07); }
[data-theme="light"] .bc-main b { color: #1b2233; }
[data-theme="light"] .bside-stat { border-bottom-color: rgba(24, 36, 66, .10); }
[data-theme="light"] .bside-av { background: rgba(59, 111, 224, .14); color: #2b4fd0; }
[data-theme="light"] .bact .btn.ghost { border-color: #d7deee; background: #fff; }
[data-theme="light"] .bact .btn.ghost:hover { border-color: #a9bbdf; }
[data-theme="light"] .home-search { background: #fff; border-color: #dbe1ed; }
[data-theme="light"] .home-search input { color: #1b2233; }
[data-theme="light"] .home-search input::placeholder { color: #8a94ab; }
[data-theme="light"] .sec-head-title { color: #1b2233; }
[data-theme="light"] .ctable { border-color: #e3e7f1; background: #fff; }
[data-theme="light"] .ctable th { background: rgba(24, 36, 66, .035); color: #5f6b85; }
[data-theme="light"] .ctable td { border-top-color: #edf0f7; }
[data-theme="light"] .ctable tr:hover td { background: rgba(59, 111, 224, .04); }
[data-theme="light"] .vis-row { border-color: #e3e7f1; background: #fff; }
[data-theme="light"] .tapp-row { border-color: #e3e7f1; background: #fff; }

/* v2.5 新增结构 */
.sec-head { display: flex; align-items: center; gap: 12px; margin: 4px 0 12px; }
.sec-head-title { font-size: 17px; font-weight: 600; letter-spacing: .5px; }
.sec-head .home-search { margin-left: auto; }
.home-search {
  display: flex; align-items: center; gap: 6px; width: 300px; max-width: 52vw;
  border: 1px solid #20202e; border-radius: 999px; padding: 4px 6px 4px 14px;
  background: rgba(15, 15, 22, .6);
}
.home-search input {
  flex: 1; min-width: 0; border: 0; background: none; color: var(--text);
  font-size: 13px; outline: none;
}
.home-search input::placeholder { color: var(--muted); }
.home-search .btn { flex: none; padding: 5px 14px; border-radius: 999px; font-size: 13px; }
.ctable { width: 100%; border-collapse: collapse; border: 1px solid #20202e; border-radius: 12px; overflow: hidden; font-size: 13px; }
.ctable th { text-align: left; font-weight: 500; color: var(--muted); background: rgba(255,255,255,.03); padding: 9px 10px; font-size: 12px; white-space: nowrap; }
.ctable td { padding: 9px 10px; border-top: 1px solid var(--row-line, #1a1a26); vertical-align: middle; }
.ctable .ct-num { text-align: right; font-variant-numeric: tabular-nums; }
.ctable .ct-acts { display: flex; gap: 4px; justify-content: flex-end; }
.ctable .ct-title { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vis-row { display: flex; align-items: center; gap: 10px; justify-content: space-between;
  border: 1px solid #20202e; border-radius: 12px; padding: 11px 14px; margin-bottom: 8px; font-size: 13px; }
.vis-row small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: #2a2a3a; transition: .18s; pointer-events: none; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .18s; }
.switch input:checked + i { background: var(--accent, #6ea8fe); }
.switch input:checked + i::after { transform: translateX(18px); }
[data-theme="light"] .switch i { background: #cfd6e6; }
[data-theme="light"] .switch input:checked + i { background: #3b6fe0; }
.tapp-row { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between;
  border: 1px solid #20202e; border-radius: 12px; padding: 11px 14px; margin-bottom: 8px; font-size: 13px; }
.tapp-main { min-width: 0; }
.tapp-main b { font-weight: 600; }
.tapp-main p { margin: 4px 0 0; color: var(--muted); font-size: 12px; white-space: pre-wrap; word-break: break-word; }
.tapp-acts { display: flex; gap: 6px; flex: none; }
.apply-form { display: flex; flex-direction: column; gap: 8px; }
.pf-shy { padding: 18px 4px; color: var(--muted); font-size: 14px; line-height: 1.8; }

/* ===== v2.6：忘记密码 / 重置密码 ===== */
.auth-alt { margin: 10px 0 0; text-align: center; }
.linkbtn {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--accent, #4ea1ff); font-size: 13px; line-height: 1.6;
  text-decoration: none;
}
.linkbtn:hover { text-decoration: underline; }
#form-forgot .muted.small { margin: 0 0 12px; line-height: 1.6; }
#reset-sub { margin: 0 0 14px; line-height: 1.6; }
#view-reset .auth-card { max-width: 380px; }


/* ========== v2.6.2：正文插图（图注 / 圆角 / 点击放大） ========== */
.art-mdbar { display: flex; align-items: center; gap: 8px; margin: 8px 0 2px; flex-wrap: wrap; }
.art-fig { margin: 18px 0; text-align: center; }
.art-fig img {
  max-width: 100%; max-height: 70vh; width: auto; margin: 0 auto;
  border-radius: 10px; display: block; cursor: zoom-in;
  border: 1px solid var(--row-line, #1a1a26);
}
.art-fig figcaption {
  margin-top: 8px; font-size: 12.5px; line-height: 1.6; color: var(--muted);
  text-align: center; word-break: break-word;
}
.art-content img.art-inl {
  max-width: 100%; border-radius: 8px; display: inline-block; vertical-align: bottom;
  margin: 4px 2px; cursor: zoom-in;
}
:root[data-theme="light"] .art-fig img { border-color: #e3e9f4; }
:root[data-theme="light"] .art-fig figcaption { color: #6b7690; }

.img-big {
  position: fixed; inset: 0; z-index: 9999; display: none;
  align-items: center; justify-content: center; padding: 3vh 3vw;
  background: rgba(6, 8, 14, .88); cursor: zoom-out;
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.img-big.on { display: flex; }
.img-big img {
  max-width: 94vw; max-height: 92vh; border-radius: 10px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .55);
}

/* ================= v2.8 影集 / 表情 ================= */
.awrap { max-width: 1080px; }
.al-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 6px 0 10px; }
.al-h1 { font-size: 22px; line-height: 1.35; }
.al-h2 { font-size: 19px; }
.al-tabs { display: flex; gap: 6px; padding: 4px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); width: fit-content; }
.al-tab {
  appearance: none; border: 1px solid transparent; background: transparent; color: var(--muted);
  padding: 7px 16px; border-radius: 8px; font: inherit; font-size: 13px; cursor: pointer; transition: .15s;
}
.al-tab:hover { color: var(--text); }
.al-tab.on { background: var(--bg-3); color: var(--text); border-color: var(--line); }

.al-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(266px, 1fr)); gap: 14px; }
.al-card {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--bg-2); transition: .18s ease; cursor: pointer;
}
.al-card:hover { border-color: #33405a; transform: translateY(-2px); box-shadow: var(--shadow); }
.al-thumb { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-3); }
.al-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.al-card:hover .al-img { transform: scale(1.03); }
.al-step {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(255,255,255,.16);
  background: rgba(8, 11, 18, .62); color: #fff; font-size: 16px; line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; transition: .15s;
}
.al-thumb:hover .al-step { opacity: 1; }
.al-step.prev { left: 8px; }
.al-step.next { right: 8px; }
.al-dots { position: absolute; left: 0; right: 0; bottom: 8px; display: flex; justify-content: center; gap: 4px; z-index: 2; }
.al-dots i { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.45); transition: .15s; }
.al-dots i.on { background: #fff; width: 12px; border-radius: 3px; }
.al-count {
  position: absolute; right: 8px; top: 8px; z-index: 2; display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px; border-radius: 999px; background: rgba(8, 11, 18, .62);
  color: #e6e9f2; font-size: 11px;
}
.al-body { padding: 11px 13px 12px; }
.al-title { font-size: 15px; margin-bottom: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.al-ex {
  margin: 0 0 9px; font-size: 12.5px; color: var(--muted); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.al-foot { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.al-foot-lg { gap: 12px; }
.al-author { display: inline-flex; align-items: center; gap: 5px; color: var(--text); cursor: pointer; }
.al-author b { font-weight: 600; }
.al-stat { display: inline-flex; align-items: center; gap: 3px; }
.al-pager { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 18px 0 4px; }
.al-empty {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 54px 16px;
  color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius);
}

/* 详情 */
.al-detail { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); padding: 18px 20px 20px; }
.al-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.al-detail-act { display: flex; gap: 6px; flex-shrink: 0; }
.al-text { margin: 4px 0 16px; }
.al-fulls { display: flex; flex-direction: column; gap: 12px; }
.al-full { margin: 0; position: relative; border-radius: 12px; overflow: hidden; background: var(--bg-3); }
.al-full img { width: 100%; display: block; cursor: zoom-in; }
.al-full figcaption {
  position: absolute; left: 10px; top: 10px; padding: 2px 9px; border-radius: 999px;
  background: rgba(8, 11, 18, .66); color: var(--gold); font-size: 11px;
}

/* 编辑器 */
.al-editor {
  display: flex; flex-direction: column; gap: 10px; padding: 16px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2);
}
.al-editor-md { margin: -2px 0 -4px; }
.al-textarea { min-height: 160px; resize: vertical; }
.al-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.al-thumb-edit { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-3); }
.al-thumb-edit.is-cover { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.al-thumb-edit img { width: 100%; height: 100%; object-fit: cover; display: block; }
.al-thumb-act { position: absolute; right: 4px; top: 4px; display: flex; gap: 3px; opacity: 0; transition: .15s; }
.al-thumb-edit:hover .al-thumb-act { opacity: 1; }
.al-thumb-btn {
  width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--line); cursor: pointer;
  background: rgba(8, 11, 18, .7); color: #e6e9f2; display: flex; align-items: center; justify-content: center;
}
.al-thumb-btn.on { color: var(--gold); border-color: var(--gold); }
.al-editor-act { display: flex; align-items: center; gap: 8px; }
.al-editor-act .spacer { flex: 1; }

/* 站内选图 */
.modal-desc { margin: -6px 0 12px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.imgpick-alb { margin-bottom: 14px; }
.imgpick-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; font-size: 13px; }
.imgpick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); gap: 6px; }
.imgpick-cell {
  padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  background: var(--bg-3); cursor: pointer; aspect-ratio: 1; transition: .15s;
}
.imgpick-cell:hover { border-color: var(--accent); transform: translateY(-1px); }
.imgpick-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 表情：正文内联 */
.emj { display: inline-block; width: 32px; height: 32px; object-fit: contain; vertical-align: -8px; margin: 0 2px; }

/* 表情面板 */
.mdbar { position: relative; }
.emj-panel {
  position: absolute; left: 0; top: 100%; z-index: 20; margin-top: 4px;
  display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; max-width: 330px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); box-shadow: var(--shadow);
}
.emj-pick {
  width: 34px; height: 34px; padding: 2px; border-radius: 8px; cursor: pointer;
  border: 1px solid transparent; background: var(--bg-3); transition: .12s;
}
.emj-pick:hover { border-color: var(--accent); transform: translateY(-1px); }
.emj-pick img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* 商城表情区 */
.shop-emj { margin-bottom: 16px; }
.emj-shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.emj-shop {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 9px 6px 10px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); text-align: center;
}
.emj-shop.owned { opacity: .78; }
.emj-shop img { width: 54px; height: 54px; object-fit: contain; }
.emj-shop-name { font-size: 12px; color: var(--muted); }
.emj-shop .btn { width: 100%; }
.shop-bundle {
  display: flex; align-items: center; gap: 12px; margin: 10px 0 4px; padding: 12px;
  border: 1px solid var(--gold); border-radius: 12px;
  background: linear-gradient(135deg, rgba(240, 198, 116, .12), transparent 60%), var(--bg-2);
}
.shop-bundle .bundle-imgs { display: flex; gap: 2px; flex-shrink: 0; }
.shop-bundle .bundle-imgs img { width: 30px; height: 30px; object-fit: contain; }
.shop-bundle .bundle-main { flex: 1; min-width: 0; }
.shop-bundle .bundle-name { font-weight: 650; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* 浅色主题微调 */
:root[data-theme="light"] .al-step,
:root[data-theme="light"] .al-count,
:root[data-theme="light"] .al-full figcaption { background: rgba(255, 255, 255, .82); color: #2a3247; }
:root[data-theme="light"] .al-dots i { background: rgba(40, 50, 70, .35); }
:root[data-theme="light"] .al-dots i.on { background: #2a3247; }
:root[data-theme="light"] .al-thumb-btn { background: rgba(255, 255, 255, .86); color: #2a3247; }

.lvl-note { color: var(--muted); opacity: .82; }

/* v2.8：表情面板定位壳 */
.mdbwrap { position: relative; display: block; }
.art-mdbar .mdbwrap, .al-editor-md .mdbwrap { display: inline-block; }
/* v2.8.3：格式工具条分隔线 + 评论/回复表情栏 */
.mdsep { width: 1px; height: 18px; margin: 0 3px; background: var(--line); opacity: .75; flex: 0 0 auto; }
.emj-strip {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  padding: 5px 6px; margin: 0 0 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-3);
}
.emj-strip .emj-pick { width: 34px; height: 34px; }
.emj-strip .emj-pick img { width: 100%; height: 100%; object-fit: contain; display: block; }
.emj-strip .mdbtn { min-width: 0; padding: 0 10px; }
.art-crform .emj-strip { margin-top: 2px; }

/* ============ v2.8.4 管理面板：二级菜单分类（左侧导航 + 右侧内容） ============ */
.adm-shell { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; align-items: start; }
.adm-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: calc(var(--nav-h) + 12px); padding-right: 10px; border-right: 1px solid var(--line); }
.adm-nav-item {
  appearance: none; text-align: left; width: 100%; padding: 9px 11px; border-radius: 10px;
  border: 1px solid transparent; background: transparent; color: var(--muted);
  font: inherit; font-size: 13px; line-height: 1.35; cursor: pointer; transition: .15s ease;
}
.adm-nav-item:hover { background: rgba(110, 168, 254, .08); color: var(--text); }
.adm-nav-item.on { background: rgba(110, 168, 254, .14); border-color: rgba(110, 168, 254, .35); color: var(--text); font-weight: 600; }
.adm-body { min-width: 0; }
.adm-body > .adm-sec:last-child { margin-bottom: 0; }
@media (max-width: 760px) {
  .adm-shell { grid-template-columns: 1fr; gap: 10px; }
  .adm-nav { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; position: static; padding-bottom: 2px; }
  .adm-nav-item { width: auto; white-space: nowrap; }
}

/* ================= v2.9：商城二级菜单 / 道具 / 个人影集 / 表情 ×1.5 ================= */

/* 正文表情：在 v2.8.5 的 32px 基础上放大 50% → 48px */
.emj { width: 48px; height: 48px; vertical-align: -12px; margin: 0 3px; }
.emj-strip .emj-pick { width: 40px; height: 40px; }

/* 商城二级菜单 */
.sh-tabs { display: flex; gap: 6px; margin: 10px 0 12px; }
.sh-tab { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 13px; cursor: pointer; }
.sh-tab:hover { border-color: var(--accent); color: var(--accent); }
.sh-tab.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* 表情包分区 */
.emj-pack-sec { margin: 14px 0 4px; }
.emj-pack-title { margin: 0 0 8px; font-size: 14px; display: flex; align-items: baseline; gap: 8px; }
.bundle-mini { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 10px;
  border: 1px dashed var(--accent); border-radius: 12px; background: color-mix(in srgb, var(--accent) 7%, transparent); }
.bundle-imgs { display: flex; }
.bundle-imgs img { width: 30px; height: 30px; object-fit: contain; margin-left: -8px; }
.bundle-imgs img:first-child { margin-left: 0; }
.bundle-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }

/* 道具 */
.prop-list { display: flex; flex-direction: column; gap: 8px; }
.prop-row { display: flex; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.prop-row.dim { opacity: .62; }
.prop-ico { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.prop-main { flex: 1; min-width: 0; }
.prop-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-weight: 600; }

/* 个人主页的影集 */
.pf-album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pf-album { border-radius: 12px; overflow: hidden; background: var(--card); border: 1px solid var(--line); cursor: pointer; }
.pf-album:hover { border-color: var(--accent); }
.pf-album-img { position: relative; aspect-ratio: 4 / 3; background: color-mix(in srgb, var(--text) 8%, transparent); }
.pf-album-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-album-name { padding: 8px 10px 2px; font-size: 13px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-album-meta { padding: 0 10px 10px; font-size: 11px; color: var(--muted); }

/* 私信里的表情栏 */
.dm-form .dm-tools { margin-bottom: 6px; }

/* 表情分类标签 */
.emj-packs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.emj-pack { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; font-size: 12px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; }
.emj-pack i { font-style: normal; color: var(--muted); font-size: 11px; }
.emj-pack.on { border-color: var(--accent); color: var(--accent); }
/* v2.9：白天模式下「在线」状态更明显（原来 #4ade80 在白底上几乎看不见） */
.dot.online { width: 8px; height: 8px; }
[data-theme="light"] .dot.online { background: #15803d; box-shadow: 0 0 0 2px rgba(21,128,61,.18), 0 0 6px rgba(21,128,61,.55); }
[data-theme="light"] .fonline .dot { width: 8px; height: 8px; background: #15803d; box-shadow: 0 0 0 2px rgba(21,128,61,.18), 0 0 6px rgba(21,128,61,.5); }
.fonline { font-weight: 600; }
[data-theme="light"] .fonline { color: #166534; }