/* ==========================================================================
   班级电教委员论坛 · 设计系统
   ========================================================================== */

:root {
  --brand-1: #6366f1;
  --brand-2: #06b6d4;
  --brand-3: #8b5cf6;
  --brand-grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
  --brand-soft: rgba(99, 102, 241, .1);

  --ok: #10b981;
  --warn: #f59e0b;
  --danger: #ef4444;
  --info: #0ea5e9;

  --radius-xs: 8px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-full: 999px;

  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", -apple-system,
    BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, "Courier New", monospace;

  --sidebar-w: 254px;
  --header-h: 64px;

  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --shadow-1: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .04);
  --shadow-2: 0 4px 6px -1px rgba(15, 23, 42, .07), 0 2px 4px -2px rgba(15, 23, 42, .05);
  --shadow-3: 0 12px 28px -8px rgba(15, 23, 42, .16), 0 4px 10px -4px rgba(15, 23, 42, .08);
  --shadow-glow: 0 8px 30px -8px rgba(99, 102, 241, .45);
}

/* ---------------------------------- 主题 ---------------------------------- */

html[data-theme="light"] {
  --bg: #f4f6fb;
  --bg-alt: #eaeef7;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f5f9;
  --surface-hover: #f5f7fc;
  --border: #e4e8f0;
  --border-strong: #cfd6e4;
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #8494ab;
  --text-inv: #ffffff;
  --code-bg: #f3f5fa;
  --overlay: rgba(15, 23, 42, .48);
  --sidebar-bg: rgba(255, 255, 255, .82);
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0b1020;
  --bg-alt: #0f1528;
  --surface: #141a2e;
  --surface-2: #1a2138;
  --surface-3: #202a44;
  --surface-hover: #1e2740;
  --border: #262f4a;
  --border-strong: #354065;
  --text: #eef2fb;
  --text-2: #a8b3cc;
  --text-3: #6f7d9c;
  --text-inv: #0b1020;
  --code-bg: #0d1425;
  --overlay: rgba(3, 6, 15, .68);
  --sidebar-bg: rgba(16, 22, 40, .82);
  --brand-soft: rgba(99, 102, 241, .16);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-2: 0 4px 6px -1px rgba(0, 0, 0, .35);
  --shadow-3: 0 14px 32px -10px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

html[data-theme="midnight"] {
  --bg: #05070f;
  --bg-alt: #080b16;
  --surface: #0d1220;
  --surface-2: #121a2c;
  --surface-3: #182238;
  --surface-hover: #16203a;
  --border: #1e2740;
  --border-strong: #2c3856;
  --text: #e6ecfa;
  --text-2: #9aa7c4;
  --text-3: #64718f;
  --text-inv: #05070f;
  --code-bg: #080d1a;
  --overlay: rgba(0, 0, 0, .75);
  --sidebar-bg: rgba(10, 14, 26, .85);
  --brand-soft: rgba(99, 102, 241, .18);
  color-scheme: dark;
}

/* ---------------------------------- 基础 ---------------------------------- */

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 500px at 12% -8%, rgba(99, 102, 241, .14), transparent 60%),
    radial-gradient(800px 460px at 92% 4%, rgba(6, 182, 212, .12), transparent 62%),
    radial-gradient(700px 500px at 50% 108%, rgba(139, 92, 246, .1), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

a { color: var(--brand-1); text-decoration: none; transition: color .16s; }
a:hover { color: var(--brand-2); }

h1, h2, h3, h4, h5 { margin: 0; font-weight: 700; letter-spacing: -.01em; line-height: 1.35; }
p { margin: 0 0 .7em; }
p:last-child { margin-bottom: 0; }

img { max-width: 100%; }
button { font-family: inherit; }
input, textarea, select { font-family: inherit; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); background-clip: content-box; }
::selection { background: rgba(99, 102, 241, .28); }

.muted { color: var(--text-3); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.bold { font-weight: 700; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mono { font-family: var(--mono); }
.grow { flex: 1; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.gradient-text {
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --------------------------------- 启动画面 -------------------------------- */

.boot {
  position: fixed; inset: 0; z-index: 999;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: var(--bg);
}
.boot-logo { animation: bootPulse 1.6s var(--ease) infinite; filter: drop-shadow(0 10px 24px rgba(99, 102, 241, .35)); }
.boot-title { font-size: 20px; font-weight: 800; letter-spacing: .02em; }
.boot-sub { color: var(--text-3); font-size: 13px; }
@keyframes bootPulse { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-7px) scale(1.04); } }

/* ---------------------------------- 布局 ---------------------------------- */

.app { position: relative; z-index: 1; min-height: 100vh; }

.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-w); z-index: 60;
  display: flex; flex-direction: column;
  background: var(--sidebar-bg);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-right: 1px solid var(--border);
  transition: transform .3s var(--ease);
}

.sb-head { padding: 18px 18px 12px; flex-shrink: 0; }
.sb-brand { display: flex; align-items: center; gap: 11px; }
.sb-brand .logo {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  background: var(--brand-grad); display: grid; place-items: center;
  box-shadow: var(--shadow-glow);
}
.sb-brand .logo svg { display: block; }
.sb-name { font-size: 15px; font-weight: 800; line-height: 1.2; }
.sb-sub { font-size: 11.5px; color: var(--text-3); }

.sb-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 6px 12px 16px; }
.sb-group { margin-bottom: 4px; }
.sb-group.section { margin-top: 14px; }
.sb-label {
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-3); padding: 8px 10px 6px;
}
.sb-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: var(--radius-sm);
  color: var(--text-2); font-weight: 600; font-size: 13.5px; cursor: pointer;
  transition: background .16s, color .16s, transform .16s;
  border: none; background: transparent; width: 100%; text-align: left; position: relative;
}
.sb-item:hover { background: var(--surface-hover); color: var(--text); }
.sb-item.active { background: var(--brand-soft); color: var(--brand-1); }
.sb-item.active::before {
  content: ""; position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; border-radius: 0 3px 3px 0; background: var(--brand-grad);
}
.sb-item .ico { width: 20px; text-align: center; font-size: 15px; flex-shrink: 0; }
.sb-item .lbl { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-item .cnt {
  font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px;
  background: var(--surface-3); color: var(--text-3);
}
.sb-item.active .cnt { background: rgba(99, 102, 241, .18); color: var(--brand-1); }

.sb-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

.sb-foot { padding: 12px; border-top: 1px solid var(--border); flex-shrink: 0; }
.sb-user {
  display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--radius);
  cursor: pointer; transition: background .16s;
}
.sb-user:hover { background: var(--surface-hover); }
.sb-user .meta { flex: 1; min-width: 0; }
.sb-user .nm { font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-user .rl { font-size: 11px; color: var(--text-3); }

/* ---------------------------------- 主区 ---------------------------------- */

.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex; flex-direction: column;
  transition: margin .3s var(--ease);
}

.topbar {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  display: flex; align-items: center; gap: 12px; padding: 0 20px;
  background: var(--sidebar-bg);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border);
}
.hamburger { display: none; }

.search-box {
  position: relative; flex: 1; max-width: 460px;
}
.search-box input {
  width: 100%; height: 38px; padding: 0 14px 0 38px; border-radius: var(--radius-full);
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font-size: 13.5px; outline: none; transition: border .18s, box-shadow .18s;
}
.search-box input:focus { border-color: var(--brand-1); box-shadow: 0 0 0 3px var(--brand-soft); }
.search-box .si { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 14px; }
.search-box .kbd {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font-size: 11px; color: var(--text-3); border: 1px solid var(--border);
  border-radius: 6px; padding: 1px 6px; background: var(--surface-2);
}

.tb-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.icon-btn {
  width: 38px; height: 38px; border-radius: var(--radius-sm); border: 1px solid transparent;
  background: transparent; color: var(--text-2); cursor: pointer; display: grid; place-items: center;
  font-size: 16px; position: relative; transition: background .16s, color .16s, transform .16s;
}
.icon-btn:hover { background: var(--surface-hover); color: var(--text); }
.icon-btn:active { transform: scale(.94); }
.icon-btn .badge-dot {
  position: absolute; top: 5px; right: 5px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 99px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 800;
  display: grid; place-items: center; border: 2px solid var(--surface); line-height: 1;
}

.page { padding: 22px 24px 60px; max-width: 1400px; width: 100%; margin: 0 auto; flex: 1; }
.page.narrow { max-width: 980px; }

/* --------------------------------- 通用组件 -------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}
.card-pad { padding: 18px; }
.card-head {
  display: flex; align-items: center; gap: 10px; padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.card-head h3 { font-size: 15px; }
.card-body { padding: 16px 18px; }
.card-hover { transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s; }
.card-hover:hover { transform: translateY(-2px); box-shadow: var(--shadow-3); border-color: var(--border-strong); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 16px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 13.5px; font-weight: 650; cursor: pointer;
  transition: background .16s, border-color .16s, transform .12s, box-shadow .16s, color .16s;
  white-space: nowrap; user-select: none;
}
.btn:hover { background: var(--surface-hover); border-color: var(--border-strong); }
.btn:active { transform: scale(.975); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary {
  background: var(--brand-grad); border-color: transparent; color: #fff;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover { filter: brightness(1.08); background: var(--brand-grad); border-color: transparent; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-hover); color: var(--text); }
.btn-danger { background: var(--danger); border-color: transparent; color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-ok { background: var(--ok); border-color: transparent; color: #fff; }
.btn-sm { height: 31px; padding: 0 11px; font-size: 12.5px; border-radius: var(--radius-xs); }
.btn-lg { height: 46px; padding: 0 24px; font-size: 15px; border-radius: var(--radius); }
.btn-block { width: 100%; }
.btn-icon { padding: 0; width: 38px; }
.btn-icon.btn-sm { width: 31px; }

.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px;
  border-radius: var(--radius-full); background: var(--surface-3); color: var(--text-2);
  font-size: 12px; font-weight: 650; border: 1px solid transparent; white-space: nowrap;
}
.chip.clickable { cursor: pointer; transition: background .16s, color .16s; }
.chip.clickable:hover { background: var(--brand-soft); color: var(--brand-1); }
.chip.active { background: var(--brand-soft); color: var(--brand-1); border-color: rgba(99, 102, 241, .3); }
.chip.ok { background: rgba(16, 185, 129, .12); color: var(--ok); }
.chip.warn { background: rgba(245, 158, 11, .14); color: var(--warn); }
.chip.danger { background: rgba(239, 68, 68, .12); color: var(--danger); }
.chip.info { background: rgba(14, 165, 233, .12); color: var(--info); }
.chip.brand { background: var(--brand-soft); color: var(--brand-1); }
.chip.glass { background: rgba(255, 255, 255, .16); color: #fff; backdrop-filter: blur(6px); }

.tag {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 650;
  color: var(--brand-1); background: var(--brand-soft); padding: 1px 8px; border-radius: 6px;
}
.tag::before { content: "#"; opacity: .6; }

.avatar {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center; font-weight: 800; color: #fff;
  font-size: 16px; overflow: hidden; position: relative; user-select: none;
  box-shadow: var(--shadow-1);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.xs { width: 26px; height: 26px; border-radius: 8px; font-size: 12px; }
.avatar.sm { width: 32px; height: 32px; border-radius: 10px; font-size: 13px; }
.avatar.lg { width: 56px; height: 56px; border-radius: 16px; font-size: 22px; }
.avatar.xl { width: 84px; height: 84px; border-radius: 22px; font-size: 34px; }
.avatar .online-ring {
  position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--ok); border: 2px solid var(--surface);
}
.avatar.lg .online-ring, .avatar.xl .online-ring { width: 15px; height: 15px; border-width: 3px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--text-2); margin-bottom: 6px; }
.field .hint { font-size: 11.5px; color: var(--text-3); margin-top: 5px; }
.input, .textarea, .select {
  width: 100%; padding: 9px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  font-size: 13.5px; outline: none; transition: border .18s, box-shadow .18s, background .18s;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--brand-1); box-shadow: 0 0 0 3px var(--brand-soft); background: var(--surface); }
.textarea { resize: vertical; min-height: 90px; line-height: 1.7; }
.select { cursor: pointer; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%); background-position: calc(100% - 17px) 17px, calc(100% - 12px) 17px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.select option { background: var(--surface); color: var(--text); }
.input-group { display: flex; gap: 8px; }
.input-icon { position: relative; }
.input-icon .ii { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 14px; pointer-events: none; }
.input-icon .input { padding-left: 36px; }

.switch { position: relative; width: 42px; height: 24px; flex-shrink: 0; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track {
  position: absolute; inset: 0; background: var(--border-strong); border-radius: 99px; transition: background .2s;
}
.switch .track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  background: #fff; border-radius: 50%; transition: transform .22s var(--ease); box-shadow: var(--shadow-1);
}
.switch input:checked + .track { background: var(--brand-1); }
.switch input:checked + .track::after { transform: translateX(18px); }

.empty {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 52px 20px; text-align: center; color: var(--text-3);
}
.empty .e-ico { font-size: 42px; opacity: .5; }
.empty .e-title { font-size: 15px; font-weight: 700; color: var(--text-2); }

.spinner {
  width: 20px; height: 20px; border: 2.5px solid var(--border-strong);
  border-top-color: var(--brand-1); border-radius: 50%; animation: spin .7s linear infinite;
}
.spinner.lg { width: 34px; height: 34px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
  background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-hover) 50%, var(--surface-3) 75%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius-xs);
}
@keyframes shimmer { to { background-position: -200% 0; } }

.divider { height: 1px; background: var(--border); margin: 14px 0; }
.divider.vert { width: 1px; height: 18px; margin: 0; background: var(--border); }

.progress { height: 7px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 99px; background: var(--brand-grad); transition: width .5s var(--ease); }

.tooltip { position: relative; }
.tooltip::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 7px); left: 50%; transform: translateX(-50%) translateY(4px);
  background: var(--text); color: var(--bg); font-size: 11.5px; font-weight: 600; padding: 4px 9px; border-radius: 7px;
  white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .16s, transform .16s; z-index: 80;
}
.tooltip:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------------------------------- 表格 ---------------------------------- */

.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th {
  text-align: left; padding: 11px 14px; font-size: 12px; font-weight: 700; color: var(--text-3);
  background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap;
}
table.tbl th:first-child { border-top-left-radius: var(--radius); }
table.tbl th:last-child { border-top-right-radius: var(--radius); }
table.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.tbl tbody tr { transition: background .14s; }
table.tbl tbody tr:hover { background: var(--surface-hover); }
table.tbl tbody tr:last-child td { border-bottom: none; }

/* ---------------------------------- 主题帖 -------------------------------- */

.thread-item {
  display: flex; gap: 14px; padding: 15px 18px; border-bottom: 1px solid var(--border);
  transition: background .16s; position: relative; cursor: pointer;
}
.thread-item:last-child { border-bottom: none; }
.thread-item:hover { background: var(--surface-hover); }
.thread-item.pinned { background: linear-gradient(90deg, var(--brand-soft), transparent 45%); }
.thread-main { flex: 1; min-width: 0; }
.thread-title {
  font-size: 15px; font-weight: 700; color: var(--text); display: flex; align-items: center;
  gap: 7px; flex-wrap: wrap; margin-bottom: 4px; line-height: 1.45;
}
.thread-item:hover .thread-title { color: var(--brand-1); }
.thread-excerpt { font-size: 12.5px; color: var(--text-3); margin: 3px 0 7px; }
.thread-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); }
.thread-stats { display: flex; flex-direction: column; gap: 4px; align-items: center; justify-content: center; flex-shrink: 0; min-width: 56px; }
.thread-stats .n { font-size: 16px; font-weight: 800; line-height: 1; }
.thread-stats .l { font-size: 10.5px; color: var(--text-3); }
.thread-stats.box { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 7px 10px; }

.rate-badge { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; }

/* --------------------------------- 富文本 --------------------------------- */

.prose { font-size: 14.5px; line-height: 1.8; color: var(--text); word-break: break-word; }
.prose > *:first-child { margin-top: 0; }
.prose h1, .prose h2, .prose h3, .prose h4 { margin: 1.1em 0 .5em; }
.prose h1 { font-size: 22px; } .prose h2 { font-size: 18px; } .prose h3 { font-size: 16px; }
.prose ul, .prose ol { margin: .5em 0 .9em; padding-left: 1.5em; }
.prose li { margin: .25em 0; }
.prose blockquote {
  margin: .8em 0; padding: 10px 15px; border-left: 3px solid var(--brand-1);
  background: var(--surface-2); border-radius: 0 var(--radius-xs) var(--radius-xs) 0; color: var(--text-2);
}
.prose code {
  font-family: var(--mono); font-size: 12.5px; background: var(--code-bg);
  padding: 2px 6px; border-radius: 6px; border: 1px solid var(--border); color: var(--brand-1);
}
.prose pre {
  background: var(--code-bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 13px 15px; overflow-x: auto; margin: .8em 0;
}
.prose pre code { background: none; border: none; padding: 0; color: var(--text); font-size: 12.5px; line-height: 1.65; }
.prose img { border-radius: var(--radius-sm); border: 1px solid var(--border); margin: .5em 0; max-height: 460px; object-fit: contain; }
.prose a { text-decoration: underline; text-decoration-color: rgba(99, 102, 241, .4); }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 1.2em 0; }
.prose table { width: 100%; border-collapse: collapse; margin: .8em 0; font-size: 13px; }
.prose th, .prose td { border: 1px solid var(--border); padding: 7px 11px; }
.prose th { background: var(--surface-2); }
.prose del, .prose s { color: var(--text-3); }

/* --------------------------------- 帖楼层 --------------------------------- */

.post {
  display: flex; gap: 14px; padding: 18px; border-bottom: 1px solid var(--border); position: relative;
  transition: background .2s;
}
.post:last-child { border-bottom: none; }
.post.highlight { animation: flashHighlight 2.4s var(--ease); }
@keyframes flashHighlight { 0%, 40% { background: var(--brand-soft); } 100% { background: transparent; } }
.post.accepted { background: linear-gradient(180deg, rgba(16, 185, 129, .07), transparent 60%); }
.post-side { width: 52px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.post-body { flex: 1; min-width: 0; }
.post-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.post-author { font-weight: 700; font-size: 13.5px; }
.post-floor { margin-left: auto; font-size: 11.5px; color: var(--text-3); font-family: var(--mono); }
.post-actions { display: flex; align-items: center; gap: 4px; margin-top: 10px; flex-wrap: wrap; }
.post-action {
  border: none; background: transparent; color: var(--text-3); font-size: 12.5px; font-weight: 600;
  padding: 4px 9px; border-radius: 7px; cursor: pointer; transition: background .16s, color .16s;
  display: inline-flex; align-items: center; gap: 4px;
}
.post-action:hover { background: var(--surface-hover); color: var(--text); }
.post-action.on { color: var(--brand-1); background: var(--brand-soft); }
.reaction-bar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.reaction-pill {
  display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px;
  border-radius: var(--radius-full); border: 1px solid var(--border); background: var(--surface-2);
  cursor: pointer; font-size: 12.5px; font-weight: 650; color: var(--text-2);
  transition: transform .14s var(--ease), border-color .16s, background .16s, color .16s;
}
.reaction-pill:hover { transform: translateY(-1.5px); border-color: var(--brand-1); }
.reaction-pill.on { background: var(--brand-soft); border-color: rgba(99, 102, 241, .45); color: var(--brand-1); }

/* ---------------------------------- 编辑器 -------------------------------- */

.editor { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.editor-toolbar {
  display: flex; align-items: center; gap: 2px; padding: 7px 8px; border-bottom: 1px solid var(--border);
  background: var(--surface); flex-wrap: wrap;
}
.editor-toolbar .sep { width: 1px; height: 20px; background: var(--border); margin: 0 5px; }
.tb-btn {
  min-width: 30px; height: 30px; padding: 0 7px; border: none; background: transparent; border-radius: 7px;
  color: var(--text-2); cursor: pointer; font-size: 13px; font-weight: 700; transition: background .15s, color .15s;
  display: inline-flex; align-items: center; justify-content: center;
}
.tb-btn:hover { background: var(--surface-hover); color: var(--text); }
.editor-area {
  min-height: 170px; max-height: 520px; overflow-y: auto; padding: 14px 16px; outline: none;
  font-size: 14.5px; line-height: 1.8; background: var(--surface);
}
.editor-area:empty::before { content: attr(data-ph); color: var(--text-3); pointer-events: none; }
.editor-foot {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border-top: 1px solid var(--border); background: var(--surface); flex-wrap: wrap;
}
.editor-preview { padding: 14px 16px; background: var(--surface); min-height: 170px; }

/* ---------------------------------- 模态框 -------------------------------- */

.modal-mask {
  position: fixed; inset: 0; z-index: 200; background: var(--overlay);
  display: grid; place-items: center; padding: 20px;
  animation: fadeIn .18s var(--ease); backdrop-filter: blur(3px);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-3); width: 100%; max-width: 540px; max-height: 88vh;
  display: flex; flex-direction: column; animation: modalIn .26s var(--ease);
  overflow: hidden;
}
.modal.wide { max-width: 820px; }
.modal.narrow { max-width: 420px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
.modal-head {
  display: flex; align-items: center; gap: 10px; padding: 17px 20px; border-bottom: 1px solid var(--border);
}
.modal-head h3 { font-size: 16px; flex: 1; }
.modal-body { padding: 18px 20px; overflow-y: auto; flex: 1; }
.modal-foot {
  display: flex; align-items: center; gap: 10px; padding: 14px 20px;
  border-top: 1px solid var(--border); background: var(--surface-2);
}
.modal-foot .grow { flex: 1; }

/* ---------------------------------- 下拉菜单 ------------------------------ */

.menu {
  position: absolute; z-index: 150; min-width: 190px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-3); animation: menuIn .16s var(--ease);
}
@keyframes menuIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.menu-item {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 11px; border: none;
  background: transparent; color: var(--text-2); border-radius: var(--radius-xs); cursor: pointer;
  font-size: 13.5px; font-weight: 600; text-align: left; transition: background .14s, color .14s;
}
.menu-item:hover { background: var(--surface-hover); color: var(--text); }
.menu-item.danger { color: var(--danger); }
.menu-item.danger:hover { background: rgba(239, 68, 68, .1); }
.menu-sep { height: 1px; background: var(--border); margin: 5px 0; }
.menu-head { padding: 9px 11px 5px; font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; }

/* ---------------------------------- 提示条 -------------------------------- */

.toasts {
  position: fixed; right: 20px; bottom: 20px; z-index: 400; display: flex; flex-direction: column;
  gap: 10px; align-items: flex-end; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px; min-width: 220px; max-width: 400px;
  padding: 12px 15px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow-3); font-size: 13.5px; font-weight: 600;
  animation: toastIn .28s var(--ease); pointer-events: auto;
}
.toast.out { animation: toastOut .24s var(--ease) forwards; }
.toast.ok { border-left: 3px solid var(--ok); }
.toast.err { border-left: 3px solid var(--danger); }
.toast.warn { border-left: 3px solid var(--warn); }
.toast.info { border-left: 3px solid var(--info); }
.toast .t-ico { font-size: 16px; flex-shrink: 0; }
@keyframes toastIn { from { opacity: 0; transform: translateX(28px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(28px) scale(.96); } }

/* ---------------------------------- 统计卡 -------------------------------- */

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.stat {
  padding: 15px 16px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--border); position: relative; overflow: hidden;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.stat::after {
  content: ""; position: absolute; right: -18px; top: -18px; width: 74px; height: 74px;
  border-radius: 50%; background: var(--brand-soft); opacity: .7;
}
.stat .s-ico { font-size: 19px; margin-bottom: 6px; position: relative; z-index: 1; }
.stat .s-val { font-size: 25px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; position: relative; z-index: 1; }
.stat .s-lbl { font-size: 12px; color: var(--text-3); position: relative; z-index: 1; }
.stat .s-trend { font-size: 11.5px; font-weight: 700; position: relative; z-index: 1; }

/* ---------------------------------- 布局栅格 ------------------------------ */

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1fr) 310px; align-items: start; }
.grid-admin { grid-template-columns: 200px minmax(0, 1fr); align-items: start; }

.section-title {
  display: flex; align-items: center; gap: 9px; margin-bottom: 13px;
  font-size: 16px; font-weight: 800;
}
.section-title .bar { width: 4px; height: 17px; border-radius: 3px; background: var(--brand-grad); }
.section-title .more { margin-left: auto; font-size: 12.5px; font-weight: 650; }

/* ---------------------------------- 图表 ---------------------------------- */

.spark { display: flex; align-items: flex-end; gap: 4px; height: 62px; }
.spark .bar {
  flex: 1; border-radius: 4px 4px 2px 2px; background: var(--brand-grad); opacity: .85;
  min-height: 3px; transition: opacity .16s, transform .16s; position: relative;
}
.spark .bar:hover { opacity: 1; transform: scaleY(1.04); }
.spark .bar .tip {
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--text); color: var(--bg); font-size: 11px; font-weight: 700; padding: 3px 7px;
  border-radius: 6px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .16s; z-index: 5;
}
.spark .bar:hover .tip { opacity: 1; }

.heat { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; }
.heat .cell { aspect-ratio: 1; border-radius: 4px; background: var(--surface-3); transition: transform .14s; position: relative; }
.heat .cell:hover { transform: scale(1.25); }

.donut { position: relative; display: grid; place-items: center; }
.donut .d-center { position: absolute; text-align: center; }
.donut .d-center .v { font-size: 21px; font-weight: 800; line-height: 1; }
.donut .d-center .l { font-size: 11px; color: var(--text-3); }

/* ---------------------------------- 时间线 -------------------------------- */

.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl-item { position: relative; padding: 0 0 15px; }
.tl-item::before {
  content: ""; position: absolute; left: -19px; top: 5px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--brand-1); box-shadow: 0 0 0 3px var(--brand-soft);
}
.tl-item.ok::before { background: var(--ok); box-shadow: 0 0 0 3px rgba(16, 185, 129, .16); }
.tl-item.warn::before { background: var(--warn); box-shadow: 0 0 0 3px rgba(245, 158, 11, .16); }
.tl-item.danger::before { background: var(--danger); box-shadow: 0 0 0 3px rgba(239, 68, 68, .16); }
.tl-time { font-size: 11.5px; color: var(--text-3); }

/* ---------------------------------- 看板 ---------------------------------- */

.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(255px, 1fr); gap: 13px; overflow-x: auto; padding-bottom: 8px; }
.kanban-col { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; min-height: 120px; }
.kanban-col-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 13px; font-weight: 750; }
.kanban-col-head .n { margin-left: auto; font-size: 11.5px; color: var(--text-3); }
.kcard {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 11px 12px; margin-bottom: 9px; cursor: pointer; transition: transform .16s var(--ease), box-shadow .16s, border-color .16s;
}
.kcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--border-strong); }
.kcard .kt { font-size: 13.5px; font-weight: 700; margin-bottom: 6px; line-height: 1.45; }

/* ---------------------------------- 日历 ---------------------------------- */

.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; }
.cal-head { text-align: center; font-size: 12px; font-weight: 700; color: var(--text-3); padding-bottom: 5px; }
.cal-day {
  min-height: 92px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 7px; background: var(--surface); transition: border-color .16s, background .16s; cursor: pointer;
}
.cal-day:hover { border-color: var(--brand-1); background: var(--surface-hover); }
.cal-day.today { border-color: var(--brand-1); box-shadow: 0 0 0 2px var(--brand-soft); }
.cal-day.other { opacity: .42; }
.cal-day .d-num { font-size: 12.5px; font-weight: 750; margin-bottom: 4px; display: flex; align-items: center; gap: 5px; }
.cal-ev {
  font-size: 11px; font-weight: 650; padding: 2px 6px; border-radius: 5px; margin-bottom: 3px;
  background: var(--brand-soft); color: var(--brand-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------------------------------- 认证页 -------------------------------- */

.auth {
  min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; position: relative; z-index: 1;
}
.auth-hero {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center;
  padding: 56px 60px; background: var(--brand-grad); color: #fff;
}
.auth-hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(520px 320px at 82% 12%, rgba(255, 255, 255, .26), transparent 62%),
    radial-gradient(420px 300px at 8% 92%, rgba(255, 255, 255, .18), transparent 60%);
}
.auth-hero > * { position: relative; z-index: 1; }
.auth-hero h1 { font-size: 40px; line-height: 1.18; margin-bottom: 16px; letter-spacing: -.02em; }
.auth-hero p { font-size: 15.5px; opacity: .93; max-width: 470px; }
.auth-feats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; margin-top: 30px; max-width: 470px; }
.auth-feat {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius);
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22);
  font-size: 13px; font-weight: 650; backdrop-filter: blur(8px);
}
.auth-feat .af-ico { font-size: 19px; }
.auth-panel { display: grid; place-items: center; padding: 40px 32px; background: var(--bg); }
.auth-card { width: 100%; max-width: 400px; }
.auth-tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface-3); border-radius: var(--radius); margin-bottom: 24px; }
.auth-tab {
  flex: 1; height: 36px; border: none; border-radius: var(--radius-xs); background: transparent;
  color: var(--text-2); font-size: 13.5px; font-weight: 700; cursor: pointer; transition: background .18s, color .18s;
}
.auth-tab.active { background: var(--surface); color: var(--brand-1); box-shadow: var(--shadow-1); }

/* ---------------------------------- 其他 ---------------------------------- */

.hero-banner {
  position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: 26px 28px;
  background: var(--brand-grad); color: #fff; box-shadow: var(--shadow-glow); margin-bottom: 18px;
}
.hero-banner::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(420px 260px at 88% 0%, rgba(255, 255, 255, .28), transparent 60%);
}
.hero-banner > * { position: relative; z-index: 1; }
.hero-banner h1 { font-size: 25px; margin-bottom: 7px; }
.hero-banner p { opacity: .92; font-size: 13.5px; max-width: 640px; }
.hero-stats { display: flex; gap: 22px; margin-top: 18px; flex-wrap: wrap; }
.hero-stat .v { font-size: 21px; font-weight: 800; line-height: 1.1; }
.hero-stat .l { font-size: 11.5px; opacity: .85; }

.list-row {
  display: flex; align-items: center; gap: 11px; padding: 10px 4px; border-bottom: 1px solid var(--border);
  transition: background .14s;
}
.list-row:last-child { border-bottom: none; }
.list-row:hover { background: var(--surface-hover); }
.clickable { cursor: pointer; }

.rank-badge {
  width: 25px; height: 25px; border-radius: 8px; display: grid; place-items: center;
  font-size: 12px; font-weight: 800; background: var(--surface-3); color: var(--text-2); flex-shrink: 0;
}
.rank-badge.r1 { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #fff; }
.rank-badge.r2 { background: linear-gradient(135deg, #cbd5e1, #94a3b8); color: #fff; }
.rank-badge.r3 { background: linear-gradient(135deg, #fdba74, #ea580c); color: #fff; }

.notice-bar {
  display: flex; align-items: center; gap: 10px; padding: 11px 15px; border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(245, 158, 11, .13), transparent);
  border: 1px solid rgba(245, 158, 11, .3); font-size: 13px; margin-bottom: 16px;
}

.eq-card { position: relative; overflow: hidden; }
.eq-card .health-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--surface-3); }
.eq-card .health-bar > i { display: block; height: 100%; transition: width .5s var(--ease); }

.file-drop {
  border: 2px dashed var(--border-strong); border-radius: var(--radius); padding: 22px;
  text-align: center; color: var(--text-3); cursor: pointer; transition: border-color .18s, background .18s;
  font-size: 13px;
}
.file-drop:hover, .file-drop.over { border-color: var(--brand-1); background: var(--brand-soft); color: var(--brand-1); }
.file-item {
  display: flex; align-items: center; gap: 9px; padding: 8px 11px; border-radius: var(--radius-xs);
  background: var(--surface-2); border: 1px solid var(--border); margin-top: 7px; font-size: 12.5px;
}

.msg-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 0; height: calc(100vh - var(--header-h) - 44px); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.msg-list { border-right: 1px solid var(--border); overflow-y: auto; background: var(--surface-2); }
.msg-conv { display: flex; gap: 10px; padding: 12px 13px; cursor: pointer; border-bottom: 1px solid var(--border); transition: background .15s; }
.msg-conv:hover { background: var(--surface-hover); }
.msg-conv.active { background: var(--brand-soft); }
.msg-pane { display: flex; flex-direction: column; min-width: 0; }
.msg-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.msg-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.bubble-row { display: flex; gap: 9px; align-items: flex-end; }
.bubble-row.me { flex-direction: row-reverse; }
.bubble {
  max-width: min(560px, 72%); padding: 10px 14px; border-radius: 16px; font-size: 13.5px; line-height: 1.65;
  background: var(--surface-2); border: 1px solid var(--border); word-break: break-word; position: relative;
}
.bubble-row.me .bubble { background: var(--brand-grad); color: #fff; border-color: transparent; border-bottom-right-radius: 5px; }
.bubble-row:not(.me) .bubble { border-bottom-left-radius: 5px; }
.bubble .b-time { font-size: 10.5px; opacity: .68; margin-top: 5px; text-align: right; }
.msg-input { padding: 12px 15px; border-top: 1px solid var(--border); display: flex; gap: 9px; align-items: flex-end; background: var(--surface-2); }
.msg-input textarea { flex: 1; min-height: 42px; max-height: 130px; resize: none; }

.notif-item { display: flex; gap: 12px; padding: 13px 15px; border-bottom: 1px solid var(--border); transition: background .15s; }
.notif-item:hover { background: var(--surface-hover); }
.notif-item.unread { background: linear-gradient(90deg, var(--brand-soft), transparent 55%); }
.notif-ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-size: 16px; background: var(--surface-3); flex-shrink: 0; }

.code-inline { font-family: var(--mono); font-size: 12px; background: var(--code-bg); padding: 1px 6px; border-radius: 5px; border: 1px solid var(--border); }

.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 18px 0; }
.page-btn {
  min-width: 34px; height: 34px; padding: 0 9px; border-radius: var(--radius-xs); border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2); font-size: 13px; font-weight: 650; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.page-btn:hover:not(:disabled) { background: var(--surface-hover); border-color: var(--brand-1); color: var(--brand-1); }
.page-btn.active { background: var(--brand-grad); color: #fff; border-color: transparent; }
.page-btn:disabled { opacity: .42; cursor: not-allowed; }

.qr-box { padding: 14px; background: #fff; border-radius: var(--radius); display: inline-block; }

/* --------------------------------- 响应式 --------------------------------- */

.mask-backdrop {
  position: fixed; inset: 0; z-index: 55; background: var(--overlay);
  animation: fadeIn .18s var(--ease); backdrop-filter: blur(2px);
}

@media (max-width: 1180px) {
  .grid-main { grid-template-columns: minmax(0, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  :root { --sidebar-w: 260px; }
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-3); }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .hamburger { display: grid; }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .auth { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .msg-layout { grid-template-columns: 1fr; }
  .msg-list { display: none; }
  .page { padding: 16px 14px 70px; }
  .search-box { max-width: none; }
  .search-box .kbd { display: none; }
  .grid-admin { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 620px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toasts { left: 14px; right: 14px; bottom: 14px; align-items: stretch; }
  .toast { max-width: none; }
  .thread-stats { display: none; }
  .post-side { width: 40px; }
  .hero-stats { gap: 15px; }
  .modal { max-height: 92vh; }
  .kanban { grid-auto-columns: minmax(230px, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

@media print {
  .sidebar, .topbar, .toasts { display: none !important; }
  .main { margin-left: 0; }
}
