/* ============================================================
   解 · 视觉系统
   方向：卷宗 / 档案 / 暗房。
   - 底色近黑，带一点点青，像显影液
   - 主色冷青（线索），辅色琥珀（金币/积分），警戒色朱红
   - 等宽字体承担所有"编号、时间、分数"，衬线体负责标题
   ============================================================ */
@font-face { font-family: 'Space Grotesk'; src: url('../assets/fonts/space-grotesk.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'Plex Mono'; src: url('../assets/fonts/plexmono-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Plex Mono'; src: url('../assets/fonts/plexmono-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }

:root {
  --bg: #05070b;
  --bg-2: #080c12;
  --panel: rgba(14, 20, 30, .76);
  --panel-2: rgba(10, 15, 23, .92);
  --panel-solid: #0c1219;
  --line: rgba(120, 180, 200, .16);
  --line-2: rgba(120, 180, 200, .09);
  --line-strong: rgba(120, 200, 220, .34);

  --ink: #e6eef2;
  --ink-2: #a8bac6;
  --ink-3: #6d818f;
  --ink-4: #47575f;

  --cyan: #5fe3d8;
  --cyan-dim: #2e8f89;
  --blue: #4f8cff;
  --amber: #f0b95c;
  --red: #ef6b6b;
  --green: #6ed49a;
  --violet: #a98bf0;

  --r: 4px;
  --r-sm: 3px;
  --sans: 'Space Grotesk', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  --mono: 'Plex Mono', 'PingFang SC', 'Microsoft YaHei', ui-monospace, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --bar-h: 60px;
  --max: 1180px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100svh;
}
::selection { background: rgba(95, 227, 216, .26); color: #fff; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
ul { margin: 0; padding: 0; list-style: none; }
svg { display: block; }
code, kbd { font-family: var(--mono); }
img { max-width: 100%; }

/* ---------- 背景：网格 + 显影光 ---------- */
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(120, 180, 200, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 180, 200, .045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 78%);
}
.bg-glow {
  position: fixed; z-index: 0; pointer-events: none; border-radius: 50%;
  filter: blur(110px); opacity: .42;
}
.bg-glow--a {
  width: 56vw; height: 56vw; left: -18vw; top: -24vw;
  background: radial-gradient(circle, rgba(95, 227, 216, .26), transparent 66%);
}
.bg-glow--b {
  width: 40vw; height: 40vw; right: -14vw; top: 24vh;
  background: radial-gradient(circle, rgba(169, 139, 240, .16), transparent 68%);
}
.bg-vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse 120% 90% at 50% 40%, transparent 40%, rgba(0, 0, 0, .55) 100%);
}
#field { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; opacity: .8; }

/* ---------- 顶栏 ---------- */
.bar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 14px;
  height: var(--bar-h); padding: 0 clamp(14px, 3vw, 28px);
  background: rgba(5, 7, 11, .82);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line-2);
}
.bar__brand { display: flex; align-items: baseline; gap: 8px; flex: none; }
.bar__mark {
  width: 26px; height: 26px; flex: none; display: grid; place-items: center;
  border: 1px solid var(--line-strong); color: var(--cyan);
  border-radius: 2px; position: relative; align-self: center;
}
.bar__mark svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.bar__mark::after {
  content: ''; position: absolute; inset: 3px; border: 1px solid rgba(95, 227, 216, .22);
}
.bar__brand b { font-size: 17px; font-weight: 600; letter-spacing: .08em; }
.bar__brand i {
  font-family: var(--mono); font-style: normal; font-size: 9.5px;
  letter-spacing: .18em; color: var(--ink-4); text-transform: uppercase;
}
.bar__nav { display: flex; gap: 1px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.bar__nav::-webkit-scrollbar { display: none; }
.bar__nav a {
  flex: none; padding: 6px 12px; font-size: 13px; color: var(--ink-3);
  position: relative; transition: color .2s; white-space: nowrap;
}
.bar__nav a:hover { color: var(--ink); }
.bar__nav a.is-on { color: var(--cyan); }
.bar__nav a.is-on::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px;
  height: 1.5px; background: var(--cyan);
}
.bar__right { display: flex; align-items: center; gap: 8px; flex: none; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 15px; border-radius: var(--r-sm); font-size: 13px; font-weight: 500;
  white-space: nowrap; transition: .2s var(--ease); min-height: 36px;
  border: 1px solid transparent;
}
.btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.btn--primary { background: var(--cyan); color: #04100f; }
.btn--primary:hover { background: #8bf0e6; }
.btn--ghost { border-color: var(--line); color: var(--ink-2); }
.btn--ghost:hover { border-color: var(--line-strong); color: var(--ink); }
.btn--solid { background: rgba(120, 180, 200, .1); color: var(--ink); border-color: var(--line); }
.btn--solid:hover { background: rgba(120, 180, 200, .16); }
.btn--amber { background: var(--amber); color: #1a1206; }
.btn--amber:hover { background: #f8ca7d; }
.btn--wide { width: 100%; }
.btn--sm { padding: 5px 10px; min-height: 28px; font-size: 12px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn--danger { border-color: rgba(239, 107, 107, .34); color: var(--red); }
.btn--danger:hover { background: rgba(239, 107, 107, .1); }

/* ---------- 页面骨架 ---------- */
.page {
  position: relative; z-index: 5;
  max-width: var(--max); margin: 0 auto;
  padding: 24px clamp(14px, 3vw, 28px) 90px;
}
.page--wide { max-width: 1320px; }

.headline { margin: 6px 0 22px; }
.headline__kicker {
  display: inline-flex; align-items: center; gap: 7px; margin-bottom: 9px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .2em;
  color: var(--cyan-dim); text-transform: uppercase;
}
.headline__kicker::before {
  content: ''; width: 14px; height: 1px; background: var(--cyan-dim);
}
.headline h1 { font-size: clamp(24px, 3.6vw, 34px); line-height: 1.25; letter-spacing: -.02em; }
.headline p { margin: 9px 0 0; font-size: 13.5px; color: var(--ink-3); max-width: 62ch; line-height: 1.75; }

.section-title {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 12px; font-family: var(--mono); font-size: 10px;
  letter-spacing: .2em; color: var(--ink-4); text-transform: uppercase; font-weight: 400;
}
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--line-2); }

/* ---------- 卡片 ---------- */
.card {
  padding: 18px; border-radius: var(--r);
  background: var(--panel); border: 1px solid var(--line-2);
}
.card--tight { padding: 14px; }
.card--btn { display: block; transition: .22s var(--ease); }
.card--btn:hover { border-color: var(--line-strong); background: rgba(18, 26, 38, .86); transform: translateY(-1px); }

/* ---------- 列表行 ---------- */
.rowlink {
  display: block; padding: 15px 17px; border-radius: var(--r);
  background: var(--panel); border: 1px solid var(--line-2);
  transition: .22s var(--ease); position: relative; overflow: hidden;
}
.rowlink::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--bc, var(--cyan)); opacity: 0; transition: opacity .22s;
}
.rowlink:hover { border-color: var(--line-strong); background: rgba(18, 26, 38, .88); }
.rowlink:hover::before { opacity: 1; }

/* ---------- 标签 ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 7px; border-radius: 2px; font-size: 11px; font-weight: 500;
  font-family: var(--mono); letter-spacing: .02em;
  background: rgba(120, 180, 200, .1); color: var(--ink-3);
  border: 1px solid rgba(120, 180, 200, .14);
}
.tag--board { background: color-mix(in srgb, var(--bc, var(--cyan)) 12%, transparent); color: var(--bc, var(--cyan)); border-color: color-mix(in srgb, var(--bc, var(--cyan)) 26%, transparent); }
.tag--lock { color: var(--amber); border-color: rgba(240, 185, 92, .3); background: rgba(240, 185, 92, .1); }
.tag--ai { color: var(--violet); border-color: rgba(169, 139, 240, .3); background: rgba(169, 139, 240, .1); }
.tag--level { color: var(--blue); border-color: rgba(79, 140, 255, .3); background: rgba(79, 140, 255, .1); }
.tag--pinned { color: var(--amber); border-color: rgba(240, 185, 92, .38); background: rgba(240, 185, 92, .12); }
.tag--featured { color: var(--cyan); border-color: rgba(95, 227, 216, .4); background: rgba(95, 227, 216, .12); }
.tag--op { color: var(--green); border-color: rgba(110, 212, 154, .34); background: rgba(110, 212, 154, .1); }

/* ---------- 头像 ---------- */
.avatar {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 10.5px; font-weight: 600;
  background: hsl(var(--h, 190 55% 52%)); color: #04100f;
  font-family: var(--mono); overflow: hidden;
}
.avatar--img { background: rgba(255, 255, 255, .06); padding: 0; }
.avatar--img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar--lg { width: 40px; height: 40px; font-size: 15px; }
.avatar--xl { width: 78px; height: 78px; font-size: 28px; }
.avatar-link { display: inline-flex; flex: none; }
.uname { color: inherit; transition: color .18s; }
.uname:hover { color: var(--cyan); }

/* ---------- 元信息 ---------- */
.meta {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 10.5px; color: var(--ink-4); letter-spacing: .02em;
}
.meta b { color: var(--ink-2); font-weight: 500; }
.metric { display: inline-flex; align-items: center; gap: 4px; }
.metric svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.metric.is-on { color: var(--cyan); }
.metric.is-on svg { fill: rgba(95, 227, 216, .28); }

/* ---------- 表单 ---------- */
.field { display: block; margin-bottom: 14px; }
.field > span {
  display: block; margin-bottom: 6px; font-family: var(--mono); font-size: 10px;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3);
}
.field > .field__req { color: var(--red); margin-left: 4px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 10px 12px; border-radius: var(--r-sm);
  background: rgba(0, 0, 0, .34); border: 1px solid var(--line-2);
  font-size: 14px; outline: none; transition: border-color .2s, background .2s;
}
.field textarea { line-height: 1.72; resize: vertical; min-height: 120px; font-family: var(--sans); }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: rgba(95, 227, 216, .5); background: rgba(0, 0, 0, .44);
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-4); }
.field__hint { display: block; margin-top: 5px; font-size: 11.5px; color: var(--ink-4); line-height: 1.6; }
.field__hint--warn { color: var(--amber); }
.formerr { min-height: 17px; margin: 0 0 8px; font-size: 12px; color: var(--red); }
.counter { font-family: var(--mono); font-size: 10.5px; color: var(--ink-4); }

.seg { display: flex; gap: 4px; padding: 3px; border-radius: var(--r-sm); background: rgba(255, 255, 255, .04); margin-bottom: 16px; }
.seg button { flex: 1; padding: 7px; border-radius: 2px; font-size: 12.5px; color: var(--ink-3); transition: .2s; }
.seg button.is-on { background: rgba(95, 227, 216, .14); color: var(--cyan); }

/* ---------- 弹窗 ---------- */
.modal {
  position: fixed; inset: 0; z-index: 140; display: grid; place-items: center;
  padding: 16px; opacity: 0; visibility: hidden;
  transition: opacity .22s, visibility .22s;
}
.modal.is-on { opacity: 1; visibility: visible; }
.modal__scrim {
  position: absolute; inset: 0; background: rgba(2, 4, 7, .78);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
}
.modal__panel {
  position: relative; width: min(430px, 100%); max-height: calc(100svh - 32px);
  overflow-y: auto; padding: 24px; border-radius: var(--r);
  background: linear-gradient(170deg, rgba(17, 24, 34, .99), rgba(9, 13, 19, .995));
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 30px 80px -30px #000;
  transform: translateY(8px); transition: transform .26s var(--ease);
}
.modal.is-on .modal__panel { transform: none; }
.modal__panel--wide { width: min(640px, 100%); }
.modal__x {
  position: absolute; right: 12px; top: 12px; width: 28px; height: 28px;
  display: grid; place-items: center; color: var(--ink-3); font-size: 12px;
  border-radius: 50%; transition: .2s;
}
.modal__x:hover { background: rgba(255, 255, 255, .07); color: var(--ink); }
.modal__panel h2 { font-size: 19px; margin: 0 0 6px; }
.modal__sub { margin: 0 0 18px; font-size: 12.5px; color: var(--ink-3); line-height: 1.7; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 220;
  transform: translate(-50%, 14px); opacity: 0; pointer-events: none;
  padding: 10px 18px; border-radius: var(--r-sm);
  background: rgba(12, 18, 26, .98); border: 1px solid var(--line);
  font-size: 12.5px; box-shadow: 0 16px 40px -16px #000;
  transition: .28s var(--ease); max-width: 88vw; text-align: center;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast.is-bad { border-color: rgba(239, 107, 107, .4); color: #ffc4c4; }

/* ---------- 演示模式提示 ---------- */
.demo-note {
  position: relative; z-index: 50;
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  padding: 8px clamp(14px, 3vw, 28px);
  background: rgba(240, 185, 92, .09);
  border-bottom: 1px solid rgba(240, 185, 92, .22);
  font-size: 11.5px; color: #f0cd93; line-height: 1.6;
}
.demo-note b { font-weight: 600; }
.demo-note span { flex: 1; min-width: 200px; }
.demo-note button { color: #f0cd93; opacity: .65; padding: 2px 5px; }
.demo-note button:hover { opacity: 1; }

/* 呼吸点 */
.pulse {
  width: 5px; height: 5px; border-radius: 50%; background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(95, 227, 216, .55);
  animation: pulseRing 2.6s infinite;
}
@keyframes pulseRing {
  0% { box-shadow: 0 0 0 0 rgba(95, 227, 216, .5); }
  70% { box-shadow: 0 0 0 7px rgba(95, 227, 216, 0); }
  100% { box-shadow: 0 0 0 0 rgba(95, 227, 216, 0); }
}

/* ---------- 提示条 ---------- */
.notice {
  display: flex; align-items: flex-start; gap: 9px; flex-wrap: wrap;
  padding: 10px 13px; border-radius: var(--r-sm); margin-bottom: 12px;
  font-size: 12.5px; line-height: 1.7;
}
.notice--warn { background: rgba(240, 185, 92, .09); border: 1px solid rgba(240, 185, 92, .26); color: #f3cd94; }
.notice--bad { background: rgba(239, 107, 107, .09); border: 1px solid rgba(239, 107, 107, .3); color: #ffb8b8; }
.notice--info { background: rgba(95, 227, 216, .07); border: 1px solid rgba(95, 227, 216, .22); color: #9ee8e0; }
.notice__grow { flex: 1; min-width: 180px; }

/* ---------- 空状态 / 骨架 ---------- */
.empty { padding: 54px 20px; text-align: center; color: var(--ink-3); font-size: 13.5px; }
.empty p { margin: 0 0 14px; }
.skeleton { display: flex; flex-direction: column; gap: 9px; }
.skeleton i {
  display: block; height: 104px; border-radius: var(--r);
  background: linear-gradient(100deg, rgba(255, 255, 255, .03) 30%, rgba(255, 255, 255, .07) 50%, rgba(255, 255, 255, .03) 70%);
  background-size: 250% 100%; animation: shimmer 1.3s linear infinite;
}
@keyframes shimmer { to { background-position: -150% 0; } }

/* ---------- 徽章 / 数字 ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 100px; font-size: 11px;
  font-family: var(--mono); border: 1px solid var(--line);
  color: var(--ink-3);
}
.coin { color: var(--amber); }
.point { color: var(--blue); }
.mono { font-family: var(--mono); }
.num { font-variant-numeric: tabular-nums; font-family: var(--mono); }

/* 等级徽记 */
.lv {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .06em;
  padding: 1px 6px; border-radius: 2px;
}
.lv--1 { color: var(--ink-3); background: rgba(120, 180, 200, .09); }
.lv--2 { color: var(--blue); background: rgba(79, 140, 255, .12); }
.lv--3 { color: var(--violet); background: rgba(169, 139, 240, .14); }

/* ---------- 移动端底栏 ---------- */
.tabbar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
  padding: 5px 4px calc(5px + env(safe-area-inset-bottom));
  background: rgba(6, 10, 15, .95);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  grid-template-columns: repeat(5, 1fr);
}
.tabbar a, .tabbar button {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 0; color: var(--ink-4); font-size: 9.5px; transition: color .2s;
}
.tabbar svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.tabbar a.is-on, .tabbar button.is-on { color: var(--cyan); }
.tabbar__cta {
  justify-self: center; align-self: center; width: 44px; height: 44px;
  border-radius: 50% !important; background: var(--cyan); color: #04100f !important;
  box-shadow: 0 8px 24px -8px rgba(95, 227, 216, .8);
}
.tabbar__cta svg { width: 21px; height: 21px; stroke-width: 2.3; }

/* ============================================================
   首页 / 列表
   ============================================================ */
.hero {
  display: grid; grid-template-columns: 1fr 292px; gap: 26px;
  align-items: start; margin-bottom: 24px;
}
.hero__copy h1 { font-size: clamp(26px, 4.4vw, 42px); line-height: 1.2; letter-spacing: -.025em; }
.hero__copy h1 em {
  font-style: normal; color: var(--cyan);
  position: relative; white-space: nowrap;
}
.hero__copy h1 em::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: .06em; height: .12em;
  background: rgba(95, 227, 216, .22);
}
.hero__copy p { margin: 13px 0 0; font-size: 14px; line-height: 1.8; color: var(--ink-3); max-width: 54ch; }
.hero__stats { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 20px; }
.hero__stat span {
  display: block; font-family: var(--mono); font-size: 9.5px; letter-spacing: .16em;
  color: var(--ink-4); text-transform: uppercase;
}
.hero__stat b { display: block; font-size: 22px; font-weight: 600; font-family: var(--mono); letter-spacing: -.02em; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 274px; gap: 22px; align-items: start; }
.layout__side { display: flex; flex-direction: column; gap: 10px; position: sticky; top: calc(var(--bar-h) + 14px); }

.bar-tools {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 12px; flex-wrap: wrap;
}
.sort { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--line-2); border-radius: var(--r-sm); }
.sort button { padding: 5px 12px; font-size: 12px; color: var(--ink-3); border-radius: 2px; transition: .2s; }
.sort button.is-on { background: rgba(95, 227, 216, .12); color: var(--cyan); }

.searchbox { position: relative; display: flex; align-items: center; }
.searchbox svg {
  position: absolute; left: 10px; width: 14px; height: 14px;
  fill: none; stroke: var(--ink-4); stroke-width: 1.6; pointer-events: none;
}
.searchbox input {
  width: 190px; padding: 7px 11px 7px 30px; border-radius: var(--r-sm);
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line-2);
  font-size: 12.5px; outline: none; transition: .22s;
}
.searchbox input:focus { border-color: var(--line-strong); background: rgba(255, 255, 255, .06); width: 220px; }

.feed { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.feed-item { display: block; position: relative; }
.feed-item__head { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; flex-wrap: wrap; }
.feed-item h2 {
  font-size: 16px; font-weight: 600; line-height: 1.5; margin: 0 0 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.feed-item:hover h2 { color: var(--cyan); }
.feed-item__excerpt {
  margin: 0 0 10px; font-size: 13px; line-height: 1.7; color: var(--ink-3);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.feed-item__foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.feed-item__author { display: inline-flex; align-items: center; gap: 6px; }
.feed-item__tags { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }

.loadmore {
  align-self: center; margin-top: 10px; padding: 9px 20px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  color: var(--ink-2); font-size: 12.5px; transition: .2s;
}
.loadmore:hover { border-color: var(--line-strong); color: var(--ink); }

/* 侧栏小卡 */
.sidecard { padding: 15px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line-2); }
.sidecard h3 {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--ink-4); margin: 0 0 11px; font-weight: 400;
}
.sidecard__row { display: flex; align-items: center; gap: 9px; padding: 6px 0; font-size: 12.5px; color: var(--ink-2); }
.sidecard__row .k { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidecard__row .v { font-family: var(--mono); font-size: 11px; color: var(--ink-4); }
.sidecard__row:hover .k { color: var(--cyan); }

/* 每日一谜（首页左上） */
.puzzlebox {
  position: relative; padding: 18px; border-radius: var(--r);
  background: linear-gradient(150deg, rgba(20, 30, 42, .94), rgba(9, 13, 19, .96));
  border: 1px solid var(--line);
  overflow: hidden;
}
.puzzlebox::before {
  content: '?'; position: absolute; right: 8px; bottom: -22px;
  font-family: var(--mono); font-size: 96px; color: rgba(95, 227, 216, .05);
  line-height: 1; pointer-events: none;
}
.puzzlebox__kicker {
  display: flex; align-items: center; gap: 7px; margin-bottom: 9px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .18em;
  color: var(--cyan-dim); text-transform: uppercase;
}
.puzzlebox__q { font-size: 13.5px; line-height: 1.75; color: var(--ink); margin: 0 0 12px; }
.puzzlebox__hint { font-size: 11.5px; color: var(--ink-4); margin: 0 0 12px; }
.puzzlebox__form { display: flex; gap: 6px; }
.puzzlebox__form input {
  flex: 1; min-width: 0; padding: 8px 10px; border-radius: var(--r-sm);
  background: rgba(0, 0, 0, .4); border: 1px solid var(--line-2);
  font-size: 12.5px; outline: none;
}
.puzzlebox__form input:focus { border-color: var(--line-strong); }
.puzzlebox__done { font-size: 12px; color: var(--ink-3); }

/* ============================================================
   帖子详情
   ============================================================ */
.article {
  padding: 24px; border-radius: var(--r);
  background: var(--panel); border: 1px solid var(--line-2);
}
.article__top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 12px; }
.article h1 { font-size: clamp(21px, 3.2vw, 29px); line-height: 1.38; margin: 0 0 12px; }
.article__meta {
  display: flex; align-items: center; gap: 11px; flex-wrap: wrap;
  font-size: 12px; color: var(--ink-4);
  padding-bottom: 15px; border-bottom: 1px solid var(--line-2); margin-bottom: 18px;
}
.article__meta .avatar { width: 26px; height: 26px; }
.article__body { font-size: 15px; line-height: 1.9; color: var(--ink-2); word-break: break-word; }
.article__body p { margin: 0 0 14px; }
.article__body pre {
  margin: 0 0 14px; padding: 12px 14px; border-radius: var(--r-sm);
  background: rgba(0, 0, 0, .42); border: 1px solid var(--line-2);
  border-left: 2px solid var(--cyan-dim); overflow-x: auto;
  font-size: 12.5px; line-height: 1.7;
}
.article__body code { font-size: .92em; padding: 1px 5px; border-radius: 2px; background: rgba(95, 227, 216, .09); color: var(--cyan); }
.article__body pre code { background: none; padding: 0; color: inherit; }
.article__body blockquote {
  margin: 0 0 14px; padding: 9px 14px;
  border-left: 2px solid rgba(120, 180, 200, .32);
  background: rgba(255, 255, 255, .022);
  color: var(--ink-3); font-size: 14px; line-height: 1.8;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.article__body blockquote + blockquote { margin-top: -10px; }
.article__body strong { color: var(--ink); font-weight: 600; }
.article__body em { font-style: italic; }
.article__body u { text-decoration-color: rgba(95, 227, 216, .5); text-underline-offset: 3px; }
.article__body a { color: var(--cyan); border-bottom: 1px solid rgba(95, 227, 216, .32); }
.article__body a:hover { border-bottom-color: var(--cyan); }
.article__body .rt-font-serif { font-family: 'Songti SC', 'Noto Serif CJK SC', 'SimSun', serif; }
.article__body .rt-font-mono { font-family: var(--mono); }
.article__body .rt-video { margin: 2px 0 16px; }
.article__actions {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line-2);
}
.likebtn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 15px;
  border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 12.5px;
  color: var(--ink-2); transition: .2s;
}
.likebtn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.likebtn.is-on { border-color: rgba(95, 227, 216, .5); color: var(--cyan); background: rgba(95, 227, 216, .09); }
.likebtn.is-on svg { fill: rgba(95, 227, 216, .3); }

/* 门禁遮罩 */
.locked {
  position: relative; padding: 34px 22px; text-align: center;
  border-radius: var(--r-sm); margin: 6px 0 4px;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .022) 0 10px, transparent 10px 20px);
  border: 1px dashed var(--line);
}
.locked__icon { font-size: 26px; color: var(--amber); margin-bottom: 10px; }
.locked h3 { font-size: 15px; margin: 0 0 7px; }
.locked p { margin: 0 auto 14px; font-size: 12.5px; color: var(--ink-3); max-width: 44ch; line-height: 1.75; }

/* 附件 */
.attach { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 18px; }
.attach img { border-radius: var(--r-sm); border: 1px solid var(--line-2); display: block; max-height: 520px; object-fit: contain; }
.attach__video { position: relative; padding-bottom: 56.25%; height: 0; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--line-2); }
.attach__video iframe, .attach__video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.attach__link {
  display: flex; align-items: center; gap: 9px; padding: 10px 13px;
  border-radius: var(--r-sm); border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, .03); font-size: 12.5px; color: var(--ink-2);
  transition: .2s; word-break: break-all;
}
.attach__link:hover { border-color: var(--line-strong); color: var(--cyan); }
.attach__link span { flex: none; font-family: var(--mono); font-size: 9.5px; color: var(--ink-4); }
.attach--locked { opacity: .8; }

/* 评论 */
.comments {
  margin-top: 14px; padding: 20px 24px; border-radius: var(--r);
  background: var(--panel); border: 1px solid var(--line-2);
}
.comments__head { display: flex; align-items: baseline; gap: 9px; margin-bottom: 6px; }
.comments__head h2 { font-size: 14.5px; margin: 0; }
.comments__count { font-family: var(--mono); font-size: 11px; color: var(--ink-4); }
.cmt { display: flex; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.cmt:last-child { border-bottom: 0; }
.cmt > .avatar { width: 28px; height: 28px; font-size: 11px; margin-top: 2px; }
.cmt__body { min-width: 0; flex: 1; }
.cmt__head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 3px; }
.cmt__head b { font-size: 12.5px; font-weight: 600; }
.cmt__head time { font-family: var(--mono); font-size: 9.5px; color: var(--ink-4); }
.cmt__text { font-size: 13.5px; line-height: 1.78; color: var(--ink-2); word-break: break-word; }
.cmt__text blockquote {
  margin: 0 0 6px; padding: 6px 11px;
  border-left: 2px solid rgba(120, 180, 200, .3);
  background: rgba(255, 255, 255, .022);
  color: var(--ink-3); font-size: 12.5px; border-radius: 0 2px 2px 0;
}
.cmt__acts { display: flex; gap: 12px; margin-top: 6px; }
.cmt__acts button { font-size: 11px; color: var(--ink-4); transition: color .18s; }
.cmt__acts button:hover { color: var(--cyan); }
.cmt__acts button.is-bad:hover { color: var(--red); }
.cmt__kids { margin-top: 10px; padding-left: 12px; border-left: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 10px; }
.cmt__kid { display: flex; gap: 8px; }
.cmt__kid > .avatar { width: 22px; height: 22px; font-size: 9px; }
.cmt--ai .cmt__head b { color: var(--violet); }
.cmt--pinned {
  background: rgba(240, 185, 92, .045);
  border-radius: var(--r-sm);
  padding-left: 11px; padding-right: 11px;
  border-left: 2px solid rgba(240, 185, 92, .5);
}
.cmt--pinned.cmt { border-bottom-color: rgba(240, 185, 92, .18); }
.cmt__empty { padding: 24px 0; text-align: center; color: var(--ink-4); font-size: 12.5px; }

.commentbox { margin-top: 16px; }
.commentbox textarea {
  width: 100%; min-height: 84px; padding: 11px 13px; border-radius: var(--r-sm);
  background: rgba(0, 0, 0, .3); border: 1px solid var(--line-2);
  font-size: 13.5px; line-height: 1.72; resize: vertical; outline: none;
}
.commentbox textarea:focus { border-color: rgba(95, 227, 216, .45); }
.commentbox__foot { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.commentbox__hint { font-size: 11.5px; color: var(--ink-4); }
.commentbox__hint a { color: var(--cyan); }
.commentbox__replying {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px; margin-bottom: 6px;
  border-radius: var(--r-sm); background: rgba(95, 227, 216, .08);
  border: 1px solid rgba(95, 227, 216, .2); font-size: 11.5px; color: var(--cyan);
}
.commentbox__replying button { margin-left: auto; color: var(--ink-3); }

/* ============================================================
   个人主页 / 个人中心
   ============================================================ */
.profile {
  display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap;
  padding: 22px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line-2);
}
.profile__main { flex: 1 1 260px; min-width: 0; }
.profile__name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.profile__name h1 { font-size: clamp(20px, 2.8vw, 26px); }
.profile__sig { margin: 7px 0 0; font-size: 13px; line-height: 1.7; color: var(--ink-2); }
.profile__sig--empty { color: var(--ink-4); font-style: italic; }
.profile__bio { margin: 5px 0 0; font-size: 12.5px; line-height: 1.7; color: var(--ink-3); white-space: pre-wrap; }
.profile__stats {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 16px; margin-top: 13px;
  font-family: var(--mono); font-size: 10.5px; color: var(--ink-4);
}
.profile__stats b { color: var(--ink); font-size: 14.5px; font-weight: 600; margin-right: 4px; }
.profile__acts { display: flex; gap: 7px; flex-wrap: wrap; margin-left: auto; }

.wallet { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.wallet__cell {
  padding: 12px 13px; border-radius: var(--r-sm);
  background: rgba(255, 255, 255, .03); border: 1px solid var(--line-2);
}
.wallet__cell span {
  display: block; font-family: var(--mono); font-size: 9px; letter-spacing: .16em;
  color: var(--ink-4); text-transform: uppercase; margin-bottom: 3px;
}
.wallet__cell b { font-family: var(--mono); font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.wallet__cell--coin b { color: var(--amber); }
.wallet__cell--point b { color: var(--blue); }
.wallet__cell--lv b { color: var(--violet); font-size: 15px; }

.checkin {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 16px; border-radius: var(--r-sm);
  background: linear-gradient(120deg, rgba(240, 185, 92, .08), rgba(240, 185, 92, .02));
  border: 1px solid rgba(240, 185, 92, .22);
}
.checkin__txt { flex: 1; min-width: 170px; }
.checkin__txt b { display: block; font-size: 13.5px; }
.checkin__txt span { font-size: 11.5px; color: var(--ink-3); }
.checkin__dots { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }
.checkin__dot {
  width: 16px; height: 16px; border-radius: 2px; display: grid; place-items: center;
  font-family: var(--mono); font-size: 8px; color: var(--ink-4);
  background: rgba(255, 255, 255, .05); border: 1px solid var(--line-2);
}
.checkin__dot.is-on { background: rgba(240, 185, 92, .18); border-color: rgba(240, 185, 92, .4); color: var(--amber); }

/* 成就墙 · 立体闪光勋章 */
.badges { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.badge {
  display: flex; flex-direction: column; gap: 4px; padding: 12px;
  border-radius: var(--r-sm); border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, .02); opacity: .55;
}
.badge.is-got {
  opacity: 1; border-color: rgba(95, 227, 216, .24);
  background: linear-gradient(155deg, rgba(95, 227, 216, .075), rgba(0, 0, 0, .16));
}
.badge__top { display: flex; align-items: center; gap: 9px; margin-bottom: 2px; }
.badge__name { display: flex; flex-direction: column; min-width: 0; }
.badge__name b { font-size: 12.5px; font-weight: 600; color: var(--ink-3); line-height: 1.3; }
.badge__name i { font-style: normal; font-size: 9px; color: var(--ink-4); letter-spacing: .08em; }
.badge.is-got .badge__name b { color: var(--ink); }
.badge__desc { font-size: 10.5px; line-height: 1.6; color: var(--ink-4); }
.badge__prog { padding-top: 2px; font-size: 9.5px; color: var(--ink-4); }
.badge.is-got .badge__prog { color: var(--cyan-dim); }
.badge__acts { display: flex; gap: 5px; margin-top: 6px; }
.badge__act {
  flex: 1; padding: 4px 0; font-size: 10.5px; color: var(--ink-3); cursor: pointer;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line-2); border-radius: 6px;
}
.badge__act:hover { border-color: rgba(95, 227, 216, .4); color: var(--ink); }
.badge__act.is-on {
  color: var(--cyan); border-color: rgba(95, 227, 216, .5);
  background: rgba(95, 227, 216, .1);
}
.badge-tip { margin: 0 0 10px; font-size: 11px; line-height: 1.7; color: var(--ink-4); }

/* 立体勋章本体：金属渐变 + 内高光 + 外发光 + 扫光 */
.medal {
  position: relative; flex: none; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 32% 26%,
    hsl(var(--bh) 92% 74%) 0%, hsl(var(--bh) 82% 54%) 42%, hsl(var(--bh) 86% 34%) 76%, hsl(var(--bh) 90% 22%) 100%);
  border: 1px solid hsl(var(--bh) 70% 78% / .55);
  box-shadow:
    inset 0 2px 3px hsl(var(--bh) 95% 86% / .85),
    inset 0 -3px 5px hsl(var(--bh) 90% 16% / .9),
    0 3px 7px rgba(0, 0, 0, .5),
    0 0 16px -5px hsl(var(--bh) 95% 62% / .8);
  overflow: hidden;
}
.medal::before {
  content: ''; position: absolute; inset: 3px; border-radius: 50%;
  border: 1px solid hsl(var(--bh) 90% 85% / .35);
  box-shadow: inset 0 1px 2px hsl(var(--bh) 90% 20% / .6);
}
.medal__mark {
  position: relative; z-index: 2; font-family: var(--mono); font-weight: 700; font-size: 12px;
  color: hsl(var(--bh) 100% 92%);
  text-shadow: 0 1px 1px hsl(var(--bh) 90% 18% / .9), 0 0 6px hsl(var(--bh) 95% 80% / .55);
}
.medal__glare {
  position: absolute; inset: -40%; z-index: 1;
  background: linear-gradient(115deg, transparent 34%, rgba(255, 255, 255, .75) 47%, rgba(255, 255, 255, .18) 52%, transparent 62%);
  animation: medal-glint 3.6s ease-in-out infinite;
}
@keyframes medal-glint {
  0%, 55% { transform: translateX(-70%) rotate(8deg); }
  75%, 100% { transform: translateX(70%) rotate(8deg); }
}
.medal--lock {
  filter: grayscale(1) brightness(.72);
  box-shadow: inset 0 2px 3px rgba(255, 255, 255, .12), inset 0 -3px 5px rgba(0, 0, 0, .7), 0 2px 5px rgba(0, 0, 0, .4);
}
.medal--lock::before { border-style: dashed; border-color: rgba(255, 255, 255, .16); }
.medal--lock .medal__glare { animation: none; opacity: .12; }

/* 图片勋章（收藏馆定制款：正反面 + 点击 3D 翻转） */
.medal--img {
  background: none; border: none; overflow: visible;
  box-shadow: none;
}
.medal--img::before { content: none; }
.medal--img .medal__face { box-shadow: 0 6px 18px rgba(0, 0, 0, .6); }
.medal--img.medal--lock .medal__face { filter: grayscale(1) brightness(.6); }

.medal--flip {
  background: none; border: none; overflow: visible; box-shadow: none;
  width: 76px; height: 76px; perspective: 520px; cursor: pointer;
}
.medal--flip::before { content: none; }
.medal__3d {
  position: absolute; inset: 0; transform-style: preserve-3d;
  transition: transform .6s cubic-bezier(.4, 0, .2, 1);
}
.medal--flip.is-flipped .medal__3d { transform: rotateY(180deg); }
.medal__face {
  position: absolute; inset: 0;
  backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 50%;
  background-size: 145%; background-position: center; background-repeat: no-repeat;
  box-shadow:
    0 10px 26px rgba(0, 0, 0, .65),
    inset 0 2px 4px rgba(255, 255, 255, .15),
    inset 0 -2px 4px rgba(0, 0, 0, .3);
}
.medal__face--lg { background-size: 180%; }
.medal__face--back { transform: rotateY(180deg); }
.medal--flip.medal--lock { cursor: default; }
.medal--flip.medal--sm { width: 34px; height: 34px; perspective: 300px; }
.medal--flip.medal--sm .medal__face { box-shadow: 0 3px 8px rgba(0, 0, 0, .55), inset 0 1px 2px rgba(255, 255, 255, .15); }
.medal--flip.medal--lock .medal__face {
  filter: grayscale(1) brightness(.55);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .5);
}
.badges--modal .medal--flip { width: 84px; height: 84px; }

/* 昵称旁佩戴的小徽章 */
.wbadge {
  display: inline-grid; place-items: center; flex: none;
  width: 68px; height: 68px; border-radius: 50%;
  font-family: var(--mono); font-weight: 700; font-size: 30px; line-height: 1;
  vertical-align: -18px; cursor: help;
  background: radial-gradient(circle at 32% 26%,
    hsl(var(--bh) 92% 76%) 0%, hsl(var(--bh) 82% 55%) 45%, hsl(var(--bh) 88% 30%) 100%);
  border: 1px solid hsl(var(--bh) 75% 82% / .6);
  box-shadow:
    inset 0 1px 1px hsl(var(--bh) 95% 88% / .9),
    inset 0 -1px 2px hsl(var(--bh) 90% 16% / .9),
    0 1px 3px rgba(0, 0, 0, .45),
    0 0 8px -2px hsl(var(--bh) 95% 65% / .75);
  color: hsl(var(--bh) 100% 94%);
  text-shadow: 0 1px 1px hsl(var(--bh) 90% 18% / .9);
  overflow: hidden; position: relative;
}
.wbadge::after {
  content: ''; position: absolute; inset: -30%;
  background: linear-gradient(115deg, transparent 36%, rgba(255, 255, 255, .8) 50%, transparent 60%);
  animation: medal-glint 4.2s ease-in-out infinite;
}
/* chip 本身就是 <img> 的图片款：去掉渐变底，加描边光圈 + 光晕让它从深色背景里跳出来 */
.wbadge--img {
  background: none; border: none; box-shadow: none; overflow: visible;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .6)) drop-shadow(0 0 13px hsl(var(--bh) 95% 65% / .85));
}
.wbadge--img::after { content: none; }
/* 顶栏高度固定，chip 再大会顶穿 bar */
.bar .wbadge { width: 34px; height: 34px; font-size: 15px; vertical-align: -9px; }
.bar .wbadge--img { filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .6)) drop-shadow(0 0 7px hsl(var(--bh) 95% 65% / .85)); }
/* 信息流行与评论行是窄横排，68px 会把指标挤到换行 */
.feed-item__foot .wbadge, .cmt__head .wbadge { width: 44px; height: 44px; font-size: 19px; vertical-align: -12px; }
.feed-item__foot .wbadge--img, .cmt__head .wbadge--img { filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .6)) drop-shadow(0 0 9px hsl(var(--bh) 95% 65% / .85)); }

/* 主页展示位条 */
.showcase {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
  padding: 10px 12px; border-radius: var(--r-sm);
  border: 1px dashed rgba(95, 227, 216, .28); background: rgba(95, 227, 216, .035);
}
.showcase__k { font-size: 10.5px; letter-spacing: .08em; color: var(--cyan-dim); }
.showcase__item { display: inline-flex; align-items: center; gap: 7px; cursor: help; }
.showcase__item b { font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.badge-more {
  margin-left: auto; padding: 3px 10px; font-size: 11px; cursor: pointer;
  color: var(--cyan-dim); background: none; border: 1px solid var(--line-2); border-radius: 999px;
}
.badge-more:hover { color: var(--cyan); border-color: rgba(95, 227, 216, .45); }
.badges--modal { max-height: 56vh; overflow: auto; margin-top: 12px; padding-right: 2px; }

.badge-stats {
  display: flex; gap: 18px; flex-wrap: wrap;
  margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-2);
}
.badge-stats span { font-size: 10.5px; color: var(--ink-4); }
.badge-stats b { margin-right: 4px; font-family: var(--mono); font-size: 15px; font-weight: 600; color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  .medal__glare, .wbadge::after { animation: none; }
  .medal__3d { transition: none; }
}

/* 获得勋章庆祝弹层 */
.bpop { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; cursor: pointer; }
.bpop__scrim { position: absolute; inset: 0; background: rgba(2, 8, 12, .78); backdrop-filter: blur(4px); animation: bpop-fade .25s ease both; }
.bpop__card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 34px 44px 30px; border-radius: 18px; text-align: center; overflow: hidden;
  background: radial-gradient(120% 130% at 50% 0%, rgba(95, 227, 216, .13), rgba(10, 18, 24, .96) 55%);
  border: 1px solid rgba(95, 227, 216, .35);
  box-shadow: 0 24px 70px -20px rgba(0, 0, 0, .8), 0 0 50px -18px rgba(95, 227, 216, .5);
  animation: bpop-in .65s cubic-bezier(.2, 1.5, .4, 1) both;
}
.bpop__card .medal {
  width: 92px; height: 92px; margin-bottom: 10px; z-index: 2;
  animation: bpop-medal .7s cubic-bezier(.2, 1.6, .4, 1) .12s both, bpop-glow 1.5s ease-in-out .8s infinite alternate;
}
.bpop__card .medal .medal__mark { font-size: 32px; }
.bpop__rays {
  position: absolute; top: 24px; left: 50%; width: 300px; height: 300px; z-index: 1;
  transform: translateX(-50%);
  background: repeating-conic-gradient(from 0deg, rgba(255, 235, 170, .16) 0deg 7deg, transparent 7deg 19deg);
  border-radius: 50%;
  -webkit-mask-image: radial-gradient(circle, rgba(0,0,0,1) 18%, transparent 66%);
  mask-image: radial-gradient(circle, rgba(0,0,0,1) 18%, transparent 66%);
  animation: bpop-spin 7s linear infinite;
}
.bpop__confetti { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.bpop__confetti i {
  position: absolute; left: 50%; top: 34%;
  width: 7px; height: 11px; border-radius: 2px;
  background: hsl(var(--ch) 90% 62%);
  animation: bpop-burst 1.15s cubic-bezier(.15, .6, .4, 1) var(--cd) both;
}
.bpop__k { margin: 0; font-size: 11px; letter-spacing: .18em; color: var(--amber); }
.bpop__card h3 { margin: 2px 0 4px; font-size: 22px; font-weight: 700; color: var(--ink); }
.bpop__d { margin: 0; font-size: 12px; color: var(--ink-3); max-width: 260px; line-height: 1.7; }
.bpop--out .bpop__card { animation: bpop-out .3s ease both; }
.bpop--out .bpop__scrim { animation: bpop-fade .3s ease reverse both; }

@keyframes bpop-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes bpop-in {
  0% { transform: scale(.4) rotate(-10deg); opacity: 0; }
  62% { transform: scale(1.1) rotate(2deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
@keyframes bpop-out { to { transform: scale(.85); opacity: 0; } }
@keyframes bpop-medal {
  0% { transform: scale(0) rotate(-220deg); }
  100% { transform: scale(1) rotate(0); }
}
@keyframes bpop-glow {
  from { filter: brightness(1); }
  to { filter: brightness(1.28); }
}
@keyframes bpop-spin { to { transform: translateX(-50%) rotate(360deg); } }
@keyframes bpop-burst {
  0% { transform: translate(-50%, -50%) scale(.4) rotate(0); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1) rotate(var(--rot)); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .bpop__rays, .bpop__confetti i { animation-duration: .01s; animation-iteration-count: 1; }
  .bpop__card, .bpop__card .medal { animation-duration: .01s; }
}

@media (max-width: 720px) {
  .badges { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .badge { padding: 10px; }
  .badge__desc { font-size: 10px; }
}

.levelcard {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 13px 15px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, .025); margin-bottom: 8px;
}
.levelcard__main { flex: 1; min-width: 160px; }
.levelcard__main b { display: block; font-size: 13px; }
.levelcard__main span { font-size: 11.5px; color: var(--ink-4); }
.levelcard.is-owned { border-color: rgba(95, 227, 216, .26); background: rgba(95, 227, 216, .05); }

.upost {
  display: block; padding: 13px 15px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, .022);
  transition: .2s var(--ease);
}
.upost:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, .04); }
.upost h3 { font-size: 14px; font-weight: 600; margin: 0 0 5px; }
.upost p { margin: 0 0 8px; font-size: 12.5px; color: var(--ink-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.upost__meta { display: flex; gap: 12px; flex-wrap: wrap; font-family: var(--mono); font-size: 9.5px; color: var(--ink-4); }

/* 通用模态列表 */
.ulist { display: flex; flex-direction: column; gap: 2px; max-height: 54vh; overflow-y: auto; }
.ulist__row { display: flex; align-items: center; gap: 10px; padding: 8px 9px; border-radius: var(--r-sm); transition: background .18s; }
.ulist__row:hover { background: rgba(255, 255, 255, .045); }
.ulist__row div { min-width: 0; }
.ulist__row b { display: block; font-size: 13px; font-weight: 500; }
.ulist__row span { display: block; font-size: 11px; color: var(--ink-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============================================================
   竞猜区
   ============================================================ */
.quiz-hero {
  position: relative; padding: 26px; border-radius: var(--r); overflow: hidden;
  background:
    radial-gradient(ellipse 70% 100% at 90% 0%, rgba(169, 139, 240, .14), transparent 70%),
    linear-gradient(160deg, rgba(20, 26, 40, .96), rgba(8, 11, 17, .98));
  border: 1px solid rgba(169, 139, 240, .24);
  margin-bottom: 18px;
}
.quiz-hero__top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.quiz-hero__date { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; color: var(--violet); }
.quiz-hero h1 { font-size: clamp(22px, 3.4vw, 32px); line-height: 1.3; margin: 0 0 10px; }
.quiz-hero p { margin: 0; font-size: 13.5px; line-height: 1.8; color: var(--ink-3); max-width: 66ch; }

.phase {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 100px; font-family: var(--mono);
  font-size: 10px; letter-spacing: .1em; border: 1px solid;
}
.phase--open { color: var(--green); border-color: rgba(110, 212, 154, .3); background: rgba(110, 212, 154, .09); }
.phase--locked { color: var(--amber); border-color: rgba(240, 185, 92, .3); background: rgba(240, 185, 92, .09); }
.phase--announced { color: var(--blue); border-color: rgba(79, 140, 255, .3); background: rgba(79, 140, 255, .09); }
.phase--revealed { color: var(--violet); border-color: rgba(169, 139, 240, .3); background: rgba(169, 139, 240, .1); }

.countdown { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 16px; }
.countdown__cell span {
  display: block; font-family: var(--mono); font-size: 9px; letter-spacing: .16em;
  color: var(--ink-4); text-transform: uppercase;
}
.countdown__cell b { font-family: var(--mono); font-size: 17px; font-weight: 500; letter-spacing: -.01em; }

/* 投票模块 */
.votebox {
  padding: 18px; border-radius: var(--r); margin-bottom: 16px;
  background: rgba(169, 139, 240, .05);
  border: 1px solid rgba(169, 139, 240, .22);
}
.votebox__head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 12px; }
.votebox__head h2 { font-size: 14px; margin: 0; }
.votebox__list { display: flex; flex-direction: column; gap: 5px; }
.voteslot {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 9px 11px; border-radius: var(--r-sm); border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, .025); transition: .2s; position: relative; overflow: hidden;
}
.voteslot:hover { border-color: rgba(169, 139, 240, .4); background: rgba(169, 139, 240, .08); }
.voteslot__bar {
  position: absolute; left: 0; top: 0; bottom: 0; width: var(--w, 0%);
  background: rgba(169, 139, 240, .1); transition: width .5s var(--ease);
}
.voteslot__idx {
  position: relative; width: 20px; height: 20px; flex: none; display: grid; place-items: center;
  border-radius: 50%; font-family: var(--mono); font-size: 10px;
  background: rgba(169, 139, 240, .16); color: var(--violet);
}
.voteslot__name { position: relative; flex: 1; min-width: 0; font-size: 13px; }
.voteslot__cnt { position: relative; font-family: var(--mono); font-size: 10.5px; color: var(--ink-4); }
.voteslot.is-mine { border-color: rgba(169, 139, 240, .5); }
.voteslot.is-mine .voteslot__idx { background: var(--violet); color: #0a0614; }
.voteslot.is-real { border-color: rgba(110, 212, 154, .5); }
.voteslot.is-real .voteslot__idx { background: var(--green); color: #04120a; }

/* 回帖卡 */
.answers { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.answer {
  display: flex; gap: 12px; padding: 15px 16px; border-radius: var(--r);
  background: var(--panel); border: 1px solid var(--line-2);
  position: relative;
}
.answer__idx {
  position: absolute; right: 12px; top: 10px;
  font-family: var(--mono); font-size: 9.5px; color: var(--ink-4); letter-spacing: .1em;
}
.answer > .avatar { width: 34px; height: 34px; font-size: 13px; }
.answer__body { flex: 1; min-width: 0; }
.answer__head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 5px; }
.answer__head b { font-size: 13px; }
.answer__trait { font-size: 10.5px; color: var(--ink-4); font-family: var(--mono); }
.answer__text { font-size: 13.5px; line-height: 1.82; color: var(--ink-2); white-space: pre-wrap; word-break: break-word; }
.answer--real { border-color: rgba(110, 212, 154, .45); background: rgba(110, 212, 154, .05); }
.answer--pending { opacity: .6; }

/* 结果横幅 */
.result {
  padding: 18px 20px; border-radius: var(--r); margin-bottom: 16px;
  border: 1px solid; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.result--none { background: rgba(240, 185, 92, .07); border-color: rgba(240, 185, 92, .28); }
.result--real { background: rgba(110, 212, 154, .07); border-color: rgba(110, 212, 154, .3); }
.result__icon { font-size: 22px; }
.result__body { flex: 1; min-width: 200px; }
.result__body b { display: block; font-size: 14px; margin-bottom: 2px; }
.result__body span { font-size: 12px; color: var(--ink-3); }

/* 真人回复面板 */
.realpanel {
  padding: 16px 18px; border-radius: var(--r); margin-bottom: 16px;
  background: linear-gradient(120deg, rgba(110, 212, 154, .09), rgba(110, 212, 154, .02));
  border: 1px solid rgba(110, 212, 154, .3);
}
.realpanel h3 { font-size: 13.5px; margin: 0 0 5px; color: var(--green); }
.realpanel p { margin: 0 0 11px; font-size: 12px; color: var(--ink-3); line-height: 1.7; }

/* ============================================================
   互动区
   ============================================================ */
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 12px; }
.game {
  position: relative; padding: 18px; border-radius: var(--r);
  background: var(--panel); border: 1px solid var(--line-2);
  transition: .22s var(--ease); overflow: hidden; display: flex; flex-direction: column;
}
.game:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.game__top { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 10px; }
.game__sigil {
  width: 40px; height: 40px; flex: none; border-radius: var(--r-sm);
  display: grid; place-items: center; font-family: var(--mono); font-size: 15px;
  background: color-mix(in srgb, var(--bc, var(--cyan)) 14%, transparent);
  color: var(--bc, var(--cyan));
  border: 1px solid color-mix(in srgb, var(--bc, var(--cyan)) 28%, transparent);
}
.game__title { flex: 1; min-width: 0; }
.game__title h3 { font-size: 15px; margin: 0; }
.game__title span { font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; color: var(--ink-4); }
.game__desc { font-size: 12.5px; line-height: 1.7; color: var(--ink-3); margin: 0 0 8px; flex: 1; }
.game__meta { font-family: var(--mono); font-size: 9.5px; color: var(--ink-4); margin: -4px 0 10px; letter-spacing: .02em; }
.game__foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.game__guide { font-family: var(--mono); font-size: 10px; color: var(--cyan-dim); padding: 2px 4px; border-radius: 2px; transition: .18s; }
.game__guide:hover { color: var(--cyan); background: rgba(95, 227, 216, .08); }
.game__best { font-family: var(--mono); font-size: 10.5px; color: var(--ink-4); }
.game--locked { opacity: .9; }
.game--locked .game__sigil { filter: grayscale(.5); }

/* 攻略区 */
.guide-group { margin-top: 22px; }
.guide-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 16px; border-radius: var(--r-sm) var(--r-sm) 0 0;
  background: rgba(255, 255, 255, .026); border: 1px solid var(--line-2); border-bottom: 0;
}
.guide-head__sigil { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 2px; font-family: var(--mono); font-size: 13px; background: color-mix(in srgb, var(--bc, var(--cyan)) 16%, transparent); color: var(--bc, var(--cyan)); border: 1px solid color-mix(in srgb, var(--bc, var(--cyan)) 28%, transparent); }
.guide-head__body { flex: 1; min-width: 0; }
.guide-head__body b { display: block; font-size: 14px; }
.guide-head__body span { font-family: var(--mono); font-size: 9.5px; color: var(--ink-4); }
.guide-note { padding: 11px 16px; font-size: 11.5px; line-height: 1.7; color: var(--ink-4); background: rgba(95, 227, 216, .04); border-left: 1px solid var(--line-2); border-right: 1px solid var(--line-2); }
.guidelist { border: 1px solid var(--line-2); border-top: 0; border-radius: 0 0 var(--r-sm) var(--r-sm); overflow: hidden; }
.guide {
  padding: 14px 16px; border-top: 1px solid var(--line-2); background: rgba(255, 255, 255, .022);
}
.guide:first-child { border-top: 0; }
.guide h3 { font-size: 13.5px; margin: 0 0 7px; color: var(--ink); }
.guide__body { font-size: 13px; line-height: 1.85; color: var(--ink-2); white-space: pre-wrap; word-break: break-word; }
.guide__body b { color: var(--ink); font-weight: 600; }
.guide__author { margin-top: 6px; font-family: var(--mono); font-size: 9.5px; color: var(--ink-4); }
.guide__play {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 10px;
  font-size: 12px; color: var(--cyan);
}
.guide__play:hover { color: #8bf0e6; }

/* 游戏运行容器 */
.gamewrap {
  padding: 20px; border-radius: var(--r); background: var(--panel);
  border: 1px solid var(--line-2); margin-bottom: 14px;
}
.gamewrap__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.gamewrap__head h2 { font-size: 17px; margin: 0; flex: 1; min-width: 140px; }
.gamewrap__hud {
  display: flex; gap: 18px; flex-wrap: wrap; padding: 10px 0 14px;
  border-bottom: 1px solid var(--line-2); margin-bottom: 14px;
}
.gamewrap__hud div span {
  display: block; font-family: var(--mono); font-size: 9px; letter-spacing: .16em;
  color: var(--ink-4); text-transform: uppercase;
}
.gamewrap__hud div b { font-family: var(--mono); font-size: 16px; font-weight: 500; }
.gamecanvas { display: grid; place-items: center; padding: 10px 0; }
.gamecanvas canvas { border-radius: var(--r-sm); border: 1px solid var(--line); display: block; max-width: 100%; }
.gameover {
  text-align: center; padding: 22px;
}
.gameover b { display: block; font-size: 19px; margin-bottom: 4px; }
.gameover span { font-size: 12.5px; color: var(--ink-3); }

/* 点灯 */
.lightsgrid { display: grid; gap: 6px; }
.lightsgrid button {
  width: 74px; height: 74px; border-radius: var(--r-sm);
  background: rgba(255, 255, 255, .05); border: 1px solid var(--line);
  transition: .18s;
}
.lightsgrid button.on {
  background: rgba(95, 227, 216, .5); border-color: var(--cyan);
  box-shadow: 0 0 22px -4px rgba(95, 227, 216, .7) inset;
}
.lightsgrid button:hover { border-color: var(--cyan-dim); }

/* 信号 */
.signalpad { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.signalpad button {
  width: 110px; height: 110px; border-radius: var(--r-sm);
  border: 1px solid var(--line); transition: .14s;
  opacity: .42;
}
.signalpad button.lit { opacity: 1; box-shadow: 0 0 40px -6px currentColor; }

/* 找不同 */
.patterngrid { display: grid; gap: 3px; }
.patterngrid button { border-radius: 2px; border: 0; transition: transform .12s; }
.patterngrid button:hover { transform: scale(1.06); }

/* 开锁 */
.dial { position: relative; width: 240px; height: 240px; margin: 0 auto; }
.dial__ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: conic-gradient(from -90deg, rgba(95, 227, 216, .1), transparent 40%, rgba(240, 185, 92, .1) 100%);
}
.dial__tick { position: absolute; left: 50%; top: 6px; width: 1px; height: 9px; background: var(--ink-4); transform-origin: 50% 114px; }
.dial__needle {
  position: absolute; left: 50%; top: 50%; width: 2px; height: 108px;
  background: var(--amber); transform-origin: 50% 0; transition: transform .9s cubic-bezier(.2, .9, .2, 1);
}
.dial__hub {
  position: absolute; left: 50%; top: 50%; width: 14px; height: 14px;
  margin: -7px 0 0 -7px; border-radius: 50%; background: var(--amber);
}

/* 破译 */
.decodeboard { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.decoderow { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 13px; }
.decoderow .digits { letter-spacing: .4em; color: var(--ink); }
.decoderow .hint { margin-left: auto; font-size: 11px; color: var(--ink-4); }
.decodeinput { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.decodeinput input {
  width: 120px; padding: 9px 12px; border-radius: var(--r-sm);
  background: rgba(0, 0, 0, .4); border: 1px solid var(--line-2);
  font-family: var(--mono); font-size: 17px; letter-spacing: .32em; text-align: center; outline: none;
}
.decodeinput input:focus { border-color: var(--line-strong); }

.leaderboard { display: flex; flex-direction: column; gap: 2px; }
.lbrow {
  display: flex; align-items: center; gap: 9px; padding: 7px 9px;
  border-radius: var(--r-sm); font-size: 12.5px;
}
.lbrow:nth-child(1) { background: rgba(240, 185, 92, .08); }
.lbrow__rank { width: 20px; font-family: var(--mono); font-size: 10.5px; color: var(--ink-4); }
.lbrow:nth-child(1) .lbrow__rank { color: var(--amber); }
.lbrow__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lbrow__score { font-family: var(--mono); font-size: 12px; }

/* ============================================================
   AI 社区
   ============================================================ */
.ai-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em;
  padding: 2px 8px; border-radius: 100px;
  color: var(--violet); background: rgba(169, 139, 240, .1);
  border: 1px solid rgba(169, 139, 240, .28);
}
.ai-note {
  padding: 12px 15px; border-radius: var(--r-sm); margin-bottom: 16px;
  background: rgba(169, 139, 240, .06); border: 1px solid rgba(169, 139, 240, .2);
  font-size: 12.5px; color: #c7b6f5; line-height: 1.7;
}

.ai-feed { display: flex; flex-direction: column; gap: 10px; }
.aipost {
  padding: 18px 20px; border-radius: var(--r);
  background: linear-gradient(160deg, rgba(18, 24, 36, .9), rgba(10, 13, 20, .94));
  border: 1px solid var(--line-2); transition: .22s; display: block;
}
.aipost:hover { border-color: rgba(169, 139, 240, .34); }
.aipost h2 { font-size: 16.5px; line-height: 1.55; margin: 8px 0 8px; }
.aipost__body {
  font-size: 13.5px; line-height: 1.85; color: var(--ink-3);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  white-space: pre-wrap;
}
.aipost__foot { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }

/* AI 帖的作者行：头像 + 名字 + 等级 + AI 徽记 + 时间 */
.aipost__who { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.aipost__whobody { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.aipost__whobody b { font-size: 13px; font-weight: 600; }
.aipost__who .avatar { width: 26px; height: 26px; font-size: 11px; }
.aipost__time { margin-left: auto; font-size: 9.5px; color: var(--ink-4); }

/* 帖子下面挂两条最新回复，让卡片看起来"有人接话" */
.aipost__replies {
  margin-top: 11px; padding-left: 11px;
  border-left: 1px solid var(--line-2);
  display: flex; flex-direction: column; gap: 5px;
}
.aipost__reply { display: flex; align-items: baseline; gap: 6px; font-size: 12px; }
.aipost__reply .avatar { width: 16px; height: 16px; font-size: 8px; align-self: center; }
.aipost__reply .who { color: var(--ink-3); flex: none; }
.aipost__reply .txt {
  color: var(--ink-4); min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}

/* ============================================================
   闲聊区
   ============================================================ */
.chat-wrap { max-width: 780px; margin: 0 auto; }
.chatlist { display: flex; flex-direction: column; gap: 8px; }
.chatitem {
  display: flex; gap: 12px; padding: 16px 18px; border-radius: var(--r);
  background: var(--panel); border: 1px solid var(--line-2); transition: .2s;
}
.chatitem:hover { border-color: var(--line-strong); }
.chatitem__main { flex: 1; min-width: 0; }
.chatitem h2 { font-size: 15.5px; margin: 0 0 6px; line-height: 1.5; }
.chatitem:hover h2 { color: var(--cyan); }
.chatitem p { margin: 0 0 9px; font-size: 13px; line-height: 1.72; color: var(--ink-3); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 980px) {
  .layout, .hero { grid-template-columns: 1fr; }
  .layout__side { display: none; }
  .hero__copy h1 { font-size: clamp(24px, 6vw, 34px); }
}
@media (max-width: 720px) {
  :root { --bar-h: 54px; }
  body { padding-bottom: 64px; }
  .bar { gap: 8px; padding: 0 11px; }
  .bar__brand i { display: none; }
  .bar__nav { display: none; }
  .bar__right { margin-left: auto; }
  .tabbar { display: grid; }
  .page { padding: 16px 12px 24px; }
  .headline h1 { font-size: 21px; }
  .headline p { font-size: 12.5px; }
  .modal { padding: 0; align-items: flex-end; }
  .modal__panel {
    width: 100%; max-height: 92svh; border-radius: 14px 14px 0 0;
    padding: 20px 16px calc(18px + env(safe-area-inset-bottom)); transform: translateY(14px);
  }
  .modal.is-on .modal__panel { transform: none; }
  .field input, .field textarea, .field select { font-size: 16px; } /* 防 iOS 缩放 */
  .commentbox textarea, .decodeinput input, .puzzlebox__form input { font-size: 16px; }
  .toast { bottom: 78px; }
  .article { padding: 17px 15px; }
  .article h1 { font-size: 20px; }
  .article__body { font-size: 14.5px; }
  .comments { padding: 15px 13px; }
  .feed-item h2 { font-size: 15px; }
  .feed-item__tags { margin-left: 0; width: 100%; }
  .profile { padding: 16px; gap: 13px; }
  .avatar--xl { width: 62px; height: 62px; font-size: 24px; }
  /* 手机端勋章跟着收一档，避免比头像还大、把指标挤到换行 */
  .wbadge { width: 40px; height: 40px; font-size: 17px; vertical-align: -11px; }
  .wbadge--img { filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .6)) drop-shadow(0 0 8px hsl(var(--bh) 95% 65% / .85)); }
  .feed-item__foot .wbadge, .cmt__head .wbadge { width: 34px; height: 34px; font-size: 15px; vertical-align: -9px; }
  .profile__acts { margin-left: 0; width: 100%; }
  .profile__acts .btn { flex: 1; }
  .wallet { gap: 6px; }
  .wallet__cell { padding: 10px; }
  .wallet__cell b { font-size: 17px; }
  .games { grid-template-columns: 1fr; }
  .quiz-hero { padding: 18px 15px; }
  .lightsgrid button { width: 62px; height: 62px; }
  .signalpad button { width: 88px; height: 88px; }
  .dial { width: 210px; height: 210px; }
  .dial__tick { transform-origin: 50% 99px; }
  .dial__needle { height: 94px; }
  .gamewrap { padding: 14px 12px; }
  .searchbox { display: none; }
  .chatitem { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
@media (hover: none) {
  .rowlink:hover, .game:hover { transform: none; }
  .btn { min-height: 40px; }
}

/* ============================================================
   站内案件
   ============================================================ */
.caseback {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px;
  padding: 4px 2px; background: none; border: 0; cursor: pointer;
  font-size: 12.5px; color: var(--ink-3); transition: color .18s;
}
.caseback:hover { color: var(--cyan); }
.caseback svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.casewrap .gamewrap__head { margin-bottom: 10px; }
.casetag {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .16em;
  color: var(--cyan-dim); text-transform: uppercase; margin: 0 0 6px;
}
.caseintro { font-size: 13.5px; line-height: 1.9; color: var(--ink-2); margin: 0 0 16px; }

.casefile {
  display: grid; grid-template-columns: 216px 1fr;
  border: 1px solid var(--line-2); border-radius: var(--r-sm); overflow: hidden;
}
.casefile__list {
  display: flex; flex-direction: column;
  background: rgba(255, 255, 255, .022); border-right: 1px solid var(--line-2);
}
.casefile__label {
  font-family: var(--mono); font-size: 9px; letter-spacing: .18em;
  color: var(--ink-4); text-transform: uppercase;
  margin: 0; padding: 12px 13px 8px;
}
.casedoc {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 8px;
  padding: 10px 13px; text-align: left; background: none; border: 0; border-top: 1px solid var(--line);
  color: var(--ink-2); cursor: pointer; transition: background .16s, border-color .16s;
}
.casedoc:hover { background: rgba(95, 227, 216, .05); }
.casedoc__kind {
  grid-column: 1 / -1; font-family: var(--mono); font-size: 8.5px;
  letter-spacing: .14em; color: var(--ink-4); text-transform: uppercase;
}
.casedoc b { font-size: 12.5px; font-weight: 500; }
.casedoc__mark { font-family: var(--mono); font-size: 8.5px; color: var(--ink-4); align-self: center; }
.casedoc.is-read .casedoc__mark { color: var(--green); }
.casedoc.is-active { background: rgba(95, 227, 216, .08); box-shadow: inset 2px 0 0 var(--cyan); }
.casedoc.is-active b { color: var(--cyan); }
.casedoc.is-active .casedoc__mark { color: var(--cyan-dim); }

.casefile__reader { padding: 16px 18px; min-height: 210px; background: rgba(0, 0, 0, .18); }
.casefile__kind {
  font-family: var(--mono); font-size: 9px; letter-spacing: .16em;
  color: var(--ink-4); text-transform: uppercase; margin: 0 0 10px;
}
.casebody {
  font-size: 13px; line-height: 1.95; color: var(--ink-2);
  white-space: pre-wrap; word-break: break-word;
}
.empty-note { font-size: 12.5px; color: var(--ink-4); }

.casehints { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.casehintlist { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.casehint {
  padding: 10px 13px; border-radius: var(--r-sm);
  background: rgba(240, 185, 92, .05); border: 1px solid rgba(240, 185, 92, .18);
}
.casehint span {
  font-family: var(--mono); font-size: 8.5px; letter-spacing: .14em;
  color: var(--amber); text-transform: uppercase;
}
.casehint p { margin: 4px 0 0; font-size: 12.5px; line-height: 1.75; color: var(--ink-2); }

.caseanswer {
  margin-top: 16px; padding: 16px 18px; border-radius: var(--r-sm);
  background: rgba(95, 227, 216, .035); border: 1px solid var(--line-2);
}
.caselabel { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 8px; }
.caseinput {
  width: 100%; max-width: 280px; padding: 10px 12px;
  background: rgba(0, 0, 0, .42); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  font-family: var(--mono); font-size: 17px; letter-spacing: .18em;
  color: var(--ink); outline: none; transition: border-color .18s;
}
.caseinput:focus { border-color: var(--cyan-dim); }
.casenote { font-size: 11px; color: var(--ink-4); margin: 8px 0 0; line-height: 1.7; }
.casemsg { font-size: 12px; color: #e07a7a; margin: 10px 0 0; }
.caseanswer .btn { margin-top: 12px; }

.caseopts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }
.caseopt {
  display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 11px 13px; border-radius: var(--r-sm); cursor: pointer;
  background: rgba(255, 255, 255, .025); border: 1px solid var(--line-2);
  color: var(--ink-2); font-size: 13px; transition: .16s;
}
.caseopt span {
  width: 22px; height: 22px; flex: none; display: grid; place-items: center;
  border-radius: 2px; border: 1px solid var(--line-strong);
  font-family: var(--mono); font-size: 10.5px; color: var(--ink-3);
}
.caseopt:hover { border-color: var(--line-strong); }
.caseopt.is-on { border-color: var(--cyan-dim); background: rgba(95, 227, 216, .09); color: var(--ink); }
.caseopt.is-on span { border-color: var(--cyan); color: var(--cyan); }

.casesolved b { display: block; font-size: 15px; margin-bottom: 8px; }
.casesolved__solution { font-size: 13px; line-height: 1.9; color: var(--ink-2); margin: 0 0 12px; white-space: pre-wrap; }
.casesolved__stats { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-4); margin-bottom: 14px; }
.casesolved__stats b { display: inline; font-family: var(--mono); font-size: 12.5px; color: var(--amber); margin: 0; }

@media (max-width: 720px) {
  .casefile { grid-template-columns: 1fr; }
  .casefile__list {
    flex-direction: row; overflow-x: auto; border-right: 0;
    border-bottom: 1px solid var(--line-2); scrollbar-width: none;
  }
  .casefile__list::-webkit-scrollbar { display: none; }
  .casefile__label { display: none; }
  .casedoc { flex: none; min-width: 132px; border-top: 0; border-left: 1px solid var(--line); }
  .casedoc.is-active { box-shadow: inset 0 -2px 0 var(--cyan); }
  .casefile__reader { padding: 14px; min-height: 0; }
  .casebody { font-size: 13px; line-height: 1.85; }
  .caseintro { font-size: 13px; }
  .caseanswer { padding: 14px; }
  .caseinput { max-width: none; font-size: 16px; }
  .caseopts { grid-template-columns: 1fr; }
  .caseopt { min-height: 46px; }
  .casetag { font-size: 9px; }
}

/* ============================================================
   BGM 播放器
   ============================================================ */
.bgm {
  position: fixed; right: 26px; bottom: 24px; z-index: 110;
  --tone: hsl(196 60% 62%);
}
.bgm__fab {
  position: relative; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; margin-left: auto;
  background: rgba(10, 15, 23, .92);
  border: 1px solid var(--line);
  color: var(--ink-3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .04);
  backdrop-filter: blur(12px);
  transition: color .2s, border-color .2s, transform .2s var(--ease), box-shadow .2s;
}
.bgm__fab:hover { transform: translateY(-2px); color: var(--ink); border-color: var(--line-strong); }
.bgm__fab:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.bgm.is-on .bgm__fab {
  color: var(--tone);
  border-color: color-mix(in srgb, var(--tone) 42%, transparent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5), 0 0 18px -6px var(--tone);
}
.bgm__icon {
  width: 20px; height: 20px; fill: none; stroke: currentColor;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  transition: opacity .2s;
}
.bgm__eq {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  gap: 2px; opacity: 0; transition: opacity .2s;
}
.bgm__eq i {
  width: 2px; height: 11px; border-radius: 1px; background: currentColor;
  animation: bgmEq 1.15s ease-in-out infinite; animation-play-state: paused;
}
.bgm__eq i:nth-child(2) { height: 16px; animation-delay: -.38s; }
.bgm__eq i:nth-child(3) { height: 8px; animation-delay: -.72s; }
.bgm.is-playing .bgm__icon { opacity: 0; }
.bgm.is-playing .bgm__eq { opacity: 1; }
.bgm.is-playing .bgm__eq i { animation-play-state: running; }
@keyframes bgmEq {
  0%, 100% { transform: scaleY(.32); }
  50% { transform: scaleY(1); }
}

.bgm__panel {
  position: absolute; right: 0; bottom: 58px; width: 324px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(16, 23, 34, .985), rgba(9, 13, 20, .985));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 26px 64px rgba(0, 0, 0, .64), inset 0 1px 0 rgba(255, 255, 255, .05);
  backdrop-filter: blur(18px);
  opacity: 0; visibility: hidden; transform: translateY(9px) scale(.985);
  transform-origin: bottom right;
  transition: opacity .2s, transform .24s var(--ease), visibility .24s;
}
.bgm.is-open .bgm__panel { opacity: 1; visibility: visible; transform: none; }
.bgm__panel::before {
  content: ''; position: absolute; left: 16px; right: 16px; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--tone), transparent);
  opacity: .5;
}
.bgm__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bgm__title b { display: block; font-size: 14px; letter-spacing: .02em; }
.bgm__title span {
  display: block; margin-top: 2px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .16em; color: var(--ink-4);
}
.bgm__switch {
  position: relative; flex: none; width: 44px; height: 24px; padding: 0;
  border-radius: 999px; background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line); transition: background .2s, border-color .2s;
}
.bgm__switch:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.bgm__switch i {
  position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
  border-radius: 50%; background: var(--ink-4);
  transition: transform .22s var(--ease), background .2s;
}
.bgm__switch[aria-checked="true"] {
  background: color-mix(in srgb, var(--tone) 24%, transparent);
  border-color: color-mix(in srgb, var(--tone) 46%, transparent);
}
.bgm__switch[aria-checked="true"] i { transform: translateX(20px); background: var(--tone); }
.bgm__status {
  margin: 10px 0 13px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em;
  color: var(--ink-4); transition: color .2s;
}
.bgm.is-on .bgm__status { color: var(--tone); }

.bgm__tracks { display: flex; flex-direction: column; gap: 4px; }
.bgm__track {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; border-radius: 5px; text-align: left;
  border: 1px solid transparent; transition: background .16s, border-color .16s;
}
.bgm__track:hover { background: rgba(255, 255, 255, .035); }
.bgm__track:focus-visible { outline: 1px solid var(--line-strong); outline-offset: 1px; }
.bgm__dot {
  flex: none; width: 7px; height: 7px; border-radius: 50%;
  background: var(--tone); opacity: .32;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tone) 9%, transparent);
  transition: opacity .2s, box-shadow .2s;
}
.bgm__track.is-on { background: rgba(255, 255, 255, .045); border-color: rgba(255, 255, 255, .055); }
.bgm__track.is-on .bgm__dot { opacity: 1; box-shadow: 0 0 10px var(--tone); }
.bgm__meta { flex: 1; min-width: 0; }
.bgm__meta b { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink-2); transition: color .2s; }
.bgm__meta i { display: block; margin-top: 1px; font-style: normal; font-size: 10.5px; color: var(--ink-4); }
.bgm__track.is-on .bgm__meta b { color: var(--ink); }
.bgm__track em {
  flex: none; font-family: var(--mono); font-style: normal;
  font-size: 8.5px; letter-spacing: .12em; color: var(--ink-4);
}
.bgm__vol {
  display: flex; align-items: center; gap: 9px;
  margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line-2);
}
.bgm__vol span { flex: none; font-size: 10.5px; color: var(--ink-4); }
.bgm__vol input {
  flex: 1; min-width: 0; height: 16px; margin: 0;
  accent-color: var(--tone); cursor: pointer;
}
.bgm__vol b {
  flex: none; width: 22px; text-align: right;
  font-family: var(--mono); font-size: 10.5px; font-weight: 400; color: var(--ink-3);
}
.bgm__hint { margin: 10px 0 0; font-size: 10px; line-height: 1.7; color: var(--ink-4); }

@media (max-width: 720px) {
  .bgm { right: 14px; bottom: calc(80px + env(safe-area-inset-bottom)); }
  .bgm__fab { width: 42px; height: 42px; }
  .bgm__panel {
    width: min(324px, calc(100vw - 28px)); bottom: 52px; padding: 14px;
    max-height: min(430px, calc(100svh - 190px)); overflow-y: auto;
  }
  .bgm__track { padding: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .bgm *, .bgm *::before { transition-duration: .01ms; }
  .bgm__eq i { animation: none; }
}

/* ============================================================
   消息 / 未读提醒
   ============================================================ */
.bar__msg {
  position: relative; flex: none; width: 34px; height: 34px;
  display: grid; place-items: center; border-radius: var(--r-sm);
  border: 1px solid var(--line); color: var(--ink-3);
  transition: color .2s, border-color .2s, background .2s;
}
.bar__msg svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.bar__msg:hover { color: var(--cyan); border-color: var(--line-strong); background: rgba(95, 227, 216, .06); }
.bar__msg.has-unread { color: var(--cyan); border-color: rgba(95, 227, 216, .34); }
.bar__msg i {
  position: absolute; top: -5px; right: -5px; min-width: 16px; height: 16px;
  padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff;
  font-family: var(--mono); font-style: normal; font-size: 9px; line-height: 16px;
  text-align: center; box-shadow: 0 0 0 2px var(--bg);
}

.msgtools {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 0 0 14px;
}
.msgs { display: flex; flex-direction: column; gap: 8px; }
.msgcard {
  display: flex; gap: 11px; padding: 15px 16px;
  border-radius: var(--r); background: var(--panel); border: 1px solid var(--line-2);
  transition: border-color .18s, background .18s, transform .18s var(--ease);
}
.msgcard:hover { border-color: var(--line-strong); background: rgba(18, 26, 38, .88); transform: translateY(-1px); }
.msgcard__dot {
  flex: none; width: 7px; height: 7px; margin-top: 7px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: transparent;
}
.msgcard.is-unread {
  border-color: rgba(95, 227, 216, .24);
  background: linear-gradient(150deg, rgba(22, 40, 48, .9), rgba(10, 15, 23, .94));
}
.msgcard.is-unread .msgcard__dot {
  border-color: var(--cyan); background: var(--cyan);
  box-shadow: 0 0 8px rgba(95, 227, 216, .55);
}
.msgcard__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.msgcard__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.msgcard__head b { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.msgcard.is-unread .msgcard__head b { color: var(--ink); }
.msgcard__head .mono { flex: none; font-size: 10px; color: var(--ink-4); }
.msgcard__body { font-size: 12.5px; line-height: 1.8; color: var(--ink-3); word-break: break-word; }
.msgcard__go { margin-top: 1px; font-size: 11px; color: var(--cyan-dim); }
.msgcard:hover .msgcard__go { color: var(--cyan); }

/* 每日一谜：四选一 */
.puzzlebox__form { display: flex; flex-direction: column; gap: 7px; }
.puzzleopts { display: flex; flex-direction: column; gap: 6px; }
.puzzleopt {
  display: flex; align-items: flex-start; gap: 8px; width: 100%;
  padding: 9px 10px; border-radius: var(--r-sm); text-align: left;
  background: rgba(0, 0, 0, .28); border: 1px solid var(--line-2);
  font-size: 12.5px; line-height: 1.6; color: var(--ink-2);
  transition: border-color .16s, background .16s, color .16s;
}
.puzzleopt:hover { border-color: var(--line-strong); color: var(--ink); }
.puzzleopt.is-on { border-color: rgba(95, 227, 216, .5); background: rgba(95, 227, 216, .09); color: var(--ink); }
.puzzleopt__k {
  flex: none; width: 18px; height: 18px; margin-top: 1px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 2px;
  font-family: var(--mono); font-size: 9.5px; color: var(--ink-4);
}
.puzzleopt.is-on .puzzleopt__k { border-color: var(--cyan); color: var(--cyan); }
.puzzleopt.is-right { border-color: rgba(110, 212, 154, .5); background: rgba(110, 212, 154, .08); color: var(--green); }
.puzzleopt.is-wrong { border-color: rgba(239, 107, 107, .45); background: rgba(239, 107, 107, .07); color: var(--red); }
.puzzlebox__done { margin: 0; font-size: 12px; line-height: 1.8; color: var(--ink-3); }
.puzzlebox__done b { color: var(--ink); font-weight: 500; }
.puzzlebox__done .ans { color: var(--green); }

/* 谜题 2.0：首屏主卡 */
.puzzlebox { box-shadow: 0 32px 72px -56px rgba(95, 227, 216, .6); }
.puzzlebox__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.puzzlebox__head .puzzlebox__kicker { margin: 0; }
.puzzlebox__timer {
  flex: none; padding: 3px 8px; border: 1px solid var(--line-2); border-radius: 2px;
  background: rgba(0, 0, 0, .26); font-size: 10.5px; letter-spacing: .08em; color: var(--ink-3);
}
.puzzlebox__meta {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  margin: 0 0 12px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .05em;
  color: var(--ink-4);
}
.puzzlebox__meta #puzzleRank { color: var(--cyan-dim); }
.puzzlebox__q { font-size: 15px; line-height: 1.85; margin: 0 0 14px; }
.puzzlebox__note { margin: 10px 0 0; font-size: 11px; line-height: 1.7; color: var(--ink-4); }
.puzzlebox__note::before { content: '○ '; color: var(--amber); }
.puzzlebox__result { display: inline-block; margin-right: 7px; font-size: 13px; font-weight: 600; color: var(--green); }
.puzzlebox__result.is-bad { color: var(--red); }
.puzzlebox__stats { font-size: 12px; line-height: 1.8; color: var(--ink-3); }
.puzzlebox__stats b { color: var(--ink); font-weight: 500; }
.puzzlebox__acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 9px; }

/* 提示 */
.puzzlehints { margin: 0 0 13px; }
.puzzlehints__row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.puzzlehints__label { font-size: 11px; color: var(--ink-4); margin-right: 1px; }
.hintbtn {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px;
  border: 1px dashed rgba(240, 185, 92, .3); border-radius: var(--r-sm);
  background: rgba(240, 185, 92, .045); font-size: 11px; color: #e9ca92;
  transition: border-color .16s, background .16s, color .16s;
}
.hintbtn b { font-weight: 500; }
.hintbtn span { font-family: var(--mono); font-size: 9.5px; color: var(--amber); opacity: .8; }
.hintbtn:hover:not(:disabled) { border-color: rgba(240, 185, 92, .55); background: rgba(240, 185, 92, .09); color: #f5d9a5; }
.hintbtn:disabled { cursor: default; opacity: .55; }
.hintbtn.is-owned { border-style: solid; border-color: rgba(110, 212, 154, .28); background: rgba(110, 212, 154, .06); color: var(--green); }
.hintbtn.is-owned span { color: var(--green); }
.hinttext {
  margin-top: 8px; padding: 9px 11px; border-left: 2px solid rgba(240, 185, 92, .42);
  background: rgba(240, 185, 92, .05); border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.hinttext span { font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; color: var(--amber); }
.hinttext p { margin: 4px 0 0; font-size: 12.5px; line-height: 1.78; color: var(--ink-2); }

/* 首解榜 */
.puzzleboard { margin-top: 15px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.puzzleboard__head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin-bottom: 6px; font-size: 11.5px; color: var(--ink-3);
}
.puzzleboard__head .mono { font-size: 9.5px; color: var(--ink-4); }
.puzzleboard__list { display: flex; flex-direction: column; gap: 1px; margin: 0; padding: 0; list-style: none; }
.puzzleboard__row { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 12px; }
.puzzleboard__row .avatar { width: 20px; height: 20px; font-size: 10px; }
.puzzleboard__rank { flex: none; width: 15px; text-align: center; font-family: var(--mono); font-size: 10px; color: var(--ink-4); }
.puzzleboard__rank.is-first { color: var(--amber); }
.puzzleboard__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.puzzleboard__name:hover { color: var(--cyan); }
.puzzleboard__time { flex: none; margin-left: auto; font-size: 10px; color: var(--ink-4); }
.puzzleboard__empty { padding: 5px 0; font-size: 11.5px; color: var(--ink-4); }

/* 剧透折叠 */
.spoiler {
  margin-top: 10px; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: rgba(0, 0, 0, .22);
}
.spoiler summary { padding: 8px 11px; font-size: 11.5px; color: var(--ink-3); cursor: pointer; list-style: none; }
.spoiler summary::-webkit-details-marker { display: none; }
.spoiler summary::before { content: '▸'; display: inline-block; margin-right: 6px; color: var(--ink-4); transition: transform .18s; }
.spoiler[open] summary::before { transform: rotate(90deg); }
.spoiler p { margin: 0; padding: 0 11px 10px; font-size: 12.5px; line-height: 1.8; color: var(--ink-3); }

@media (max-width: 720px) {
  .bar__msg { width: 32px; height: 32px; }
  .msgcard { padding: 13px 13px; }
  .puzzlebox { padding: 15px; }
  .puzzlebox__q { font-size: 14.5px; }
  .puzzlehints__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .puzzlehints__label { grid-column: 1 / -1; }
  .hintbtn { flex-direction: column; align-items: flex-start; gap: 2px; padding: 7px 8px; }
  .puzzleboard__row { font-size: 11.5px; }
  .puzzlebox__meta { font-size: 9px; }
}

/* ============================================================
   消息中心 · 私信
   ============================================================ */
.pm-tabs {
  display: inline-flex; gap: 2px; padding: 3px; margin: 0 0 16px;
  border-radius: var(--r-sm); background: rgba(255, 255, 255, .035);
  border: 1px solid var(--line-2);
}
.pm-tabs button {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 18px; border-radius: 2px;
  font-size: 12.5px; color: var(--ink-3);
  transition: background .18s, color .18s;
}
.pm-tabs button:hover { color: var(--ink-2); }
.pm-tabs button.is-on { background: rgba(95, 227, 216, .13); color: var(--cyan); }
.pm-tabs i {
  font-style: normal; font-family: var(--mono); font-size: 9px; line-height: 1;
  padding: 3px 5px; border-radius: 8px; background: var(--red); color: #fff;
}

.pm-toolbar {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  margin: 0 0 12px;
}
.pm-hint { font-size: 11.5px; color: var(--ink-4); line-height: 1.7; }
.pm-toolbar .pm-hint { margin-left: auto; }

.pm-wrap {
  display: grid; grid-template-columns: 286px minmax(0, 1fr);
  height: clamp(360px, calc(100svh - 360px), 700px);
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--panel); overflow: hidden;
}

/* ---------- 会话列表 ---------- */
.pm-list {
  display: flex; flex-direction: column; gap: 2px;
  overflow-y: auto; padding: 7px;
  border-right: 1px solid var(--line-2);
  background: rgba(4, 7, 11, .35);
}
.pm-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 9px; border-radius: var(--r-sm); text-align: left;
  border: 1px solid transparent;
  transition: background .16s, border-color .16s;
}
.pm-item:hover { background: rgba(255, 255, 255, .035); }
.pm-item.is-on {
  background: rgba(95, 227, 216, .075);
  border-color: rgba(95, 227, 216, .22);
}
.pm-item__ava { flex: none; display: flex; }
.pm-item__ava .avatar { width: 38px; height: 38px; font-size: 14px; }
.pm-item__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pm-item__top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.pm-item__top b {
  font-size: 13px; font-weight: 500; color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pm-item.is-on .pm-item__top b { color: var(--ink); }
.pm-item__top span { flex: none; font-family: var(--mono); font-size: 9px; color: var(--ink-4); }
.pm-item__preview {
  font-size: 11.5px; color: var(--ink-4); line-height: 1.6;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pm-item__badge {
  flex: none; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--red); color: #fff; font-family: var(--mono);
  font-style: normal; font-size: 9px; line-height: 16px; text-align: center;
}
.pm-item .tag { flex: none; font-size: 9px; padding: 1px 5px; }
.pm-listempty {
  margin: auto; padding: 30px 18px; text-align: center;
  display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.pm-listempty p { margin: 0; font-size: 12.5px; color: var(--ink-3); }

/* ---------- 聊天窗口 ---------- */
.pm-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.pm-head {
  flex: none; display: flex; align-items: center; gap: 10px;
  padding: 12px 15px; border-bottom: 1px solid var(--line-2);
  background: rgba(8, 12, 18, .5);
}
.pm-head .avatar { width: 36px; height: 36px; font-size: 14px; flex: none; }
.pm-head__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pm-head__name { font-size: 13.5px; color: var(--ink); display: flex; align-items: center; gap: 7px; }
.pm-head__name:hover { color: var(--cyan); }
.pm-head__meta { font-size: 10.5px; color: var(--ink-4); }
.pm-back { display: none; flex: none; padding: 4px 7px; font-size: 16px; color: var(--ink-3); }
.pm-back:hover { color: var(--cyan); }

.pm-scroll {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 18px 18px 10px;
  display: flex; flex-direction: column; gap: 2px;
}
.pm-older {
  align-self: center; margin: 0 auto 14px; padding: 5px 14px;
  font-size: 11px; color: var(--ink-3);
  border: 1px solid var(--line-2); border-radius: 20px;
  background: rgba(255, 255, 255, .02);
}
.pm-older:hover { color: var(--cyan); border-color: var(--line-strong); }
.pm-older:disabled { opacity: .5; }
.pm-empty, .pm-empty-chat {
  margin: auto; padding: 30px 20px; text-align: center;
  display: flex; flex-direction: column; gap: 7px; align-items: center;
}
.pm-empty { flex: 1; justify-content: center; }
.pm-empty__mark { font-size: 30px; color: var(--ink-4); opacity: .7; }
.pm-empty p, .pm-empty-chat p { margin: 0; font-size: 12.5px; color: var(--ink-3); }
.pm-empty .pm-hint, .pm-empty-chat .pm-hint { max-width: 340px; }
.pm-loading { padding: 22px; }

/* ---------- 气泡 ---------- */
.pm-row {
  display: flex; align-items: flex-end; gap: 8px;
  padding: 4px 0; max-width: 100%;
}
.pm-row .avatar { width: 29px; height: 29px; font-size: 11px; flex: none; margin-bottom: 17px; }
.pm-row.is-mine { flex-direction: row-reverse; }
.pm-msg { display: flex; flex-direction: column; gap: 4px; max-width: min(74%, 560px); align-items: flex-start; }
.pm-row.is-mine .pm-msg { align-items: flex-end; }
.pm-bubble {
  padding: 8px 12px; border-radius: 10px 10px 10px 3px;
  background: rgba(255, 255, 255, .055);
  border: 1px solid var(--line-2);
  font-size: 13px; line-height: 1.72; color: var(--ink-2);
  white-space: pre-wrap; word-break: break-word;
}
.pm-row.is-mine .pm-bubble {
  border-radius: 10px 10px 3px 10px;
  background: linear-gradient(145deg, rgba(43, 132, 126, .5), rgba(30, 92, 90, .38));
  border-color: rgba(95, 227, 216, .24);
  color: #dff7f4;
}
.pm-bubble--image { padding: 3px; overflow: hidden; background: rgba(0, 0, 0, .3); }
.pm-img {
  display: block; max-width: 100%; max-height: 300px;
  border-radius: 7px; cursor: zoom-in; object-fit: contain;
}
.pm-time { font-family: var(--mono); font-size: 9px; color: var(--ink-4); padding: 0 3px; }

.pm-sys {
  align-self: center; margin: 9px auto; padding: 5px 12px;
  border-radius: 20px; background: rgba(255, 255, 255, .028);
  font-size: 10.5px; color: var(--ink-4); text-align: center;
  max-width: 86%; line-height: 1.7;
}
.pm-sys a { color: var(--cyan-dim); }
.pm-sys a:hover { color: var(--cyan); }

.pm-invite {
  align-self: flex-start; margin: 8px 0; width: min(360px, 88%);
  padding: 14px 15px; border-radius: var(--r);
  background: linear-gradient(150deg, rgba(22, 40, 48, .92), rgba(10, 15, 23, .94));
  border: 1px solid rgba(95, 227, 216, .26);
}
.pm-invite__k {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--cyan); margin-bottom: 7px;
}
.pm-invite p { margin: 0 0 9px; font-size: 12.5px; line-height: 1.8; color: var(--ink-2); }
.pm-invite__meta { font-family: var(--mono); font-size: 10px; color: var(--ink-4); margin-bottom: 10px; }

/* ---------- 权限 / 输入 ---------- */
.pm-perm { flex: none; padding: 0 14px; }
.pm-perm:not(:empty) { padding-top: 10px; }
.pm-perm .notice {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 12px; font-size: 11.5px; line-height: 1.7;
}
.pm-perm .notice__grow { min-width: 0; }

.pm-compose {
  position: relative; flex: none; padding: 10px 14px 14px;
  border-top: 1px solid var(--line-2);
}
.pm-tools {
  display: flex; align-items: center; gap: 6px; margin-bottom: 7px;
}
.pm-tool {
  padding: 3px 9px; border-radius: 20px;
  border: 1px solid var(--line-2); font-size: 11px; color: var(--ink-3);
  transition: color .16s, border-color .16s, background .16s;
}
.pm-tool:hover { color: var(--cyan); border-color: var(--line-strong); background: rgba(95, 227, 216, .05); }
.pm-tool:disabled { opacity: .4; cursor: not-allowed; }
.pm-counter { margin-left: auto; font-family: var(--mono); font-size: 9px; color: var(--ink-4); }

.pm-inputrow { display: flex; align-items: flex-end; gap: 8px; }
.pm-inputrow textarea {
  flex: 1; min-height: 58px; max-height: 140px; resize: none;
  padding: 9px 11px; border-radius: var(--r-sm);
  background: rgba(0, 0, 0, .32); border: 1px solid var(--line-2);
  font-size: 13px; line-height: 1.7; color: var(--ink);
  outline: none; transition: border-color .18s;
}
.pm-inputrow textarea:focus { border-color: rgba(95, 227, 216, .4); }
.pm-inputrow textarea:disabled { opacity: .55; cursor: not-allowed; }
.pm-inputrow .btn { flex: none; padding: 9px 20px; }
.pm-inputrow .btn:disabled { opacity: .45; cursor: not-allowed; }

.pm-emoji {
  position: absolute; left: 14px; bottom: calc(100% - 4px); z-index: 5;
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px;
  width: min(330px, calc(100% - 28px)); padding: 9px;
  border-radius: var(--r); background: var(--panel-solid);
  border: 1px solid var(--line); box-shadow: 0 18px 44px rgba(0, 0, 0, .55);
}
.pm-emoji button {
  height: 33px; border-radius: var(--r-sm); font-size: 19px; line-height: 1;
  transition: background .14s, transform .14s;
}
.pm-emoji button:hover { background: rgba(95, 227, 216, .12); transform: scale(1.12); }

/* ---------- 图片预览 / 新建私信 ---------- */
.pm-previewer {
  position: fixed; inset: 0; z-index: 140;
  display: grid; place-items: center; padding: 24px;
  background: rgba(2, 4, 7, .88);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.pm-previewer img {
  max-width: min(860px, 92vw); max-height: 88svh;
  border-radius: var(--r); box-shadow: 0 24px 80px rgba(0, 0, 0, .7);
}
.pm-previewer__x {
  position: absolute; top: 16px; right: 18px; width: 38px; height: 38px;
  border-radius: 50%; border: 1px solid var(--line); color: var(--ink-2);
  background: rgba(10, 15, 23, .8); font-size: 15px;
}
.pm-previewer__x:hover { color: var(--cyan); border-color: var(--line-strong); }

.pm-suggest { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.pm-suggest__k {
  width: 100%; font-family: var(--mono); font-size: 9.5px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-4);
}
.pm-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 10px 4px 5px; border-radius: 20px;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, .025);
  font-size: 11.5px; color: var(--ink-3);
  transition: border-color .16s, color .16s, background .16s;
}
.pm-chip:hover { color: var(--cyan); border-color: var(--line-strong); background: rgba(95, 227, 216, .05); }
.pm-chip .avatar { width: 22px; height: 22px; font-size: 9px; }

@media (max-width: 820px) {
  .pm-wrap { grid-template-columns: 1fr; height: clamp(260px, calc(100svh - 390px), 680px); }
  .pm-list { border-right: 0; }
  .pm-wrap.is-thread .pm-list { display: none; }
  .pm-wrap:not(.is-thread) .pm-pane { display: none; }
  .pm-back { display: inline-block; }
  .pm-head { padding: 10px 12px; }
  .pm-scroll { padding: 14px 12px 8px; }
  .pm-msg { max-width: 82%; }
  .pm-compose { padding: 8px 10px calc(10px + env(safe-area-inset-bottom)); }
  .pm-inputrow { padding-right: 52px; }
  .pm-emoji { left: 10px; width: calc(100% - 20px); }
  .pm-toolbar .pm-hint { display: none; }
  .pm-invite { width: 92%; }
  .pm-item .tag { display: none; }
}

/* 正文格式栏 / 右键菜单 / 预览 */
.rt-bar {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-bottom: 8px; padding: 7px 8px;
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: rgba(255, 255, 255, .025);
}
.rt-btn {
  min-width: 28px; height: 27px; padding: 0 8px;
  border: 1px solid transparent; border-radius: 2px;
  color: var(--ink-3); font-size: 12px; line-height: 1;
  transition: color .15s, border-color .15s, background .15s;
}
.rt-btn:hover { color: var(--cyan); border-color: var(--line); background: rgba(95, 227, 216, .06); }
.rt-btn b, .rt-btn i, .rt-btn u { font-size: 12.5px; }
.rt-btn--wide { font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; }
.rt-btn.is-on { color: var(--cyan); border-color: rgba(95, 227, 216, .4); background: rgba(95, 227, 216, .09); }
.rt-bar__sep { width: 1px; height: 16px; background: var(--line-2); margin: 0 2px; }
.rt-bar__label { font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; color: var(--ink-4); white-space: nowrap; }
.rt-colors { display: flex; gap: 4px; }
.rt-sw {
  width: 17px; height: 17px; padding: 0; border-radius: 50%;
  background: var(--sw); border: 1px solid rgba(255, 255, 255, .18);
  transition: transform .15s, box-shadow .15s;
}
.rt-sw:hover { transform: scale(1.2); box-shadow: 0 0 0 2px rgba(95, 227, 216, .25); }
.rt-select { display: inline-flex; align-items: center; gap: 4px; flex: none; white-space: nowrap; font-family: var(--mono); font-size: 9.5px; color: var(--ink-4); }
.rt-select select {
  height: 24px; padding: 0 4px;
  border: 1px solid var(--line-2); border-radius: 2px;
  background: var(--panel-solid); color: var(--ink-2); font-size: 11px;
}
.rt-preview {
  margin-top: 10px; padding: 14px 16px; min-height: 72px;
  border: 1px dashed var(--line); border-radius: var(--r-sm);
  background: rgba(0, 0, 0, .16);
}
.rt-preview .rt-preview__empty { margin: 0; color: var(--ink-4); font-size: 12px; }
.rtmenu {
  position: fixed; z-index: 130; min-width: 208px; padding: 6px;
  background: var(--panel-2); border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); box-shadow: 0 18px 44px rgba(0, 0, 0, .55);
  backdrop-filter: blur(14px); font-size: 12.5px;
}
.rtmenu__title {
  margin: 2px 6px 5px; font-family: var(--mono); font-size: 9.5px;
  letter-spacing: .14em; color: var(--ink-4); text-transform: uppercase;
}
.rtmenu__item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; padding: 7px 8px; border-radius: 2px;
  color: var(--ink-2); text-align: left; font-size: 12.5px;
}
.rtmenu__item:hover { background: rgba(95, 227, 216, .09); color: var(--cyan); }
.rtmenu__item kbd { font-size: 9px; color: var(--ink-4); }
.rtmenu__swatches { display: flex; align-items: center; gap: 5px; padding: 7px 8px; flex-wrap: wrap; }
.rtmenu__label { margin-right: 4px; font-family: var(--mono); font-size: 9px; letter-spacing: .1em; color: var(--ink-4); }
.rtmenu__sw {
  width: 18px; height: 18px; padding: 0; border-radius: 50%;
  background: var(--sw); border: 1px solid rgba(255, 255, 255, .18);
}
.rtmenu__sw:hover { transform: scale(1.15); }
.rtmenu__row { display: flex; align-items: center; gap: 4px; padding: 6px 8px; flex-wrap: wrap; }
.rtmenu__row button {
  padding: 3px 7px; border: 1px solid var(--line-2); border-radius: 2px;
  font-size: 11px; color: var(--ink-2);
}
.rtmenu__row button:hover { border-color: var(--line); color: var(--cyan); }

@media (max-width: 720px) {
  .rt-bar { gap: 4px; padding: 6px; }
  .rt-bar__label, .rt-select > span { display: none; }
  .rt-btn--wide { font-size: 9.5px; padding: 0 6px; }
  .rtmenu { min-width: 188px; }
  .compose-actions { padding-right: 56px; }
}

@media (hover: none) {
  .rtmenu { min-width: 200px; }
  .rtmenu__item { padding: 11px 10px; }
  .rtmenu__item kbd { display: none; }
  .rtmenu__swatches { gap: 8px; }
  .rtmenu__sw { width: 24px; height: 24px; }
  .rtmenu__row button { padding: 8px 12px; }
}

/* 淡化滚动条，和整体调性一致 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(120, 180, 200, .16); border-radius: 5px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: rgba(120, 180, 200, .28); }
