*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
button, a, [role="button"] { touch-action: manipulation; }

/* 键盘可见焦点（鼠标点击不显示焦点环，键盘导航时高亮） */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
button:focus-visible, a:focus-visible, [role="button"]:focus-visible { outline-offset: 3px; }

@font-face {
  font-family: 'ZQL';
  src: url('../fonts/zql-v3-subset.woff2') format('woff2');
  font-display: block;
}

:root {
  --accent: #94c8d8;
  --accent-hover: #7ab8cc;
  --accent-soft: rgba(148,200,216,0.1);
  --accent-glow: rgba(148,200,216,0.25);
  --bg: #E0E5EB;
  --glass-bg: rgba(255,255,255,0.45);
  --glass-bg-strong: rgba(255,255,255,0.62);
  --glass-border: rgba(255,255,255,0.5);
  --glass-blur: 20px;
  --glass-highlight: linear-gradient(135deg, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0.08) 40%, rgba(255,255,255,0) 60%);
  --content-bg: transparent;
  --text: #1A1A1A;
  --text-secondary: #6B7280;
  --text-light: #9CA3AF;
  --border: rgba(0,0,0,0.06);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --radius-pill: 50px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
  --shadow-md: 0 6px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
  --spring: cubic-bezier(0.34, 1.1, 0.64, 1);
  --sb-thumb: rgba(0,0,0,0.18);
  --sb-thumb-hover: rgba(0,0,0,0.34);
}

html.dark {
  --bg: #0F1117;
  --glass-bg: rgba(22,25,33,0.6);
  --glass-bg-strong: rgba(22,25,33,0.78);
  --glass-border: rgba(255,255,255,0.06);
  --glass-highlight: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.02) 40%, rgba(255,255,255,0) 60%);
  --content-bg: transparent;
  --text: #E8EAED;
  --text-secondary: #9AA0AC;
  --text-light: #5F6570;
  --border: rgba(255,255,255,0.05);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.15);
  --shadow-md: 0 6px 20px rgba(0,0,0,0.25);
  --sb-thumb: rgba(255,255,255,0.18);
  --sb-thumb-hover: rgba(255,255,255,0.36);
}

a { text-decoration: none; color: inherit; }
a:hover { text-decoration: none; }

html {
  transition: background-color 0.35s ease, color 0.35s ease;
}

html, body {
  height: 100%; overflow: hidden;
  font-family: 'ZQL', -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text); font-size: 15px; line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%221080%22%20height%3D%221080%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20transform%3D%22translate%28150%2C120%29%22%20opacity%3D%220.45%22%20stroke%3D%22%233a4050%22%20stroke-width%3D%221.2%22%20fill%3D%22none%22%3E%3Cellipse%20cx%3D%2230%22%20cy%3D%2220%22%20rx%3D%2220%22%20ry%3D%2214%22%2F%3E%3Cellipse%20cx%3D%2250%22%20cy%3D%2216%22%20rx%3D%2216%22%20ry%3D%2212%22%2F%3E%3Cellipse%20cx%3D%2215%22%20cy%3D%2218%22%20rx%3D%2212%22%20ry%3D%2210%22%2F%3E%3Ccircle%20cx%3D%2224%22%20cy%3D%2218%22%20r%3D%221.5%22%20fill%3D%22%233a4050%22%2F%3E%3Ccircle%20cx%3D%2236%22%20cy%3D%2218%22%20r%3D%221.5%22%20fill%3D%22%233a4050%22%2F%3E%3Cpath%20d%3D%22M27%2023%20Q30%2026%2033%2023%22%20stroke-width%3D%221%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate%28600%2C180%29%22%20opacity%3D%220.4%22%20stroke%3D%22%233a4050%22%20stroke-width%3D%221%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M15%200%20L18%2010%20L28%2010%20L20%2016%20L23%2027%20L15%2020%20L7%2027%20L10%2016%20L2%2010%20L12%2010Z%22%2F%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%221.2%22%20fill%3D%22%233a4050%22%2F%3E%3Ccircle%20cx%3D%2218%22%20cy%3D%2212%22%20r%3D%221.2%22%20fill%3D%22%233a4050%22%2F%3E%3Cpath%20d%3D%22M13%2016%20Q15%2018%2017%2016%22%20stroke-width%3D%220.8%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate%28900%2C390%29%22%20opacity%3D%220.35%22%20stroke%3D%22%233a4050%22%20stroke-width%3D%221.2%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M12%206%20C12%202%206%200%206%205%20C6%2010%2012%2016%2012%2016%20C12%2016%2018%2010%2018%205%20C18%200%2012%202%2012%206Z%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate%28300%2C450%29%22%20opacity%3D%220.45%22%20stroke%3D%22%233a4050%22%20stroke-width%3D%221.2%22%20fill%3D%22none%22%3E%3Cellipse%20cx%3D%2225%22%20cy%3D%2228%22%20rx%3D%2218%22%20ry%3D%2215%22%2F%3E%3Cpath%20d%3D%22M10%2016%20L14%2028%20L6%2028Z%22%2F%3E%3Cpath%20d%3D%22M40%2016%20L36%2028%20L44%2028Z%22%2F%3E%3Ccircle%20cx%3D%2219%22%20cy%3D%2225%22%20r%3D%221.8%22%20fill%3D%22%233a4050%22%2F%3E%3Ccircle%20cx%3D%2231%22%20cy%3D%2225%22%20r%3D%221.8%22%20fill%3D%22%233a4050%22%2F%3E%3Cellipse%20cx%3D%2225%22%20cy%3D%2230%22%20rx%3D%222%22%20ry%3D%221.5%22%2F%3E%3Cpath%20d%3D%22M14%2028%20Q25%2034%2036%2028%22%20stroke-width%3D%220.8%22%2F%3E%3Cline%20x1%3D%225%22%20y1%3D%2226%22%20x2%3D%2214%22%20y2%3D%2227%22%20stroke-width%3D%220.6%22%20opacity%3D%220.5%22%2F%3E%3Cline%20x1%3D%225%22%20y1%3D%2230%22%20x2%3D%2214%22%20y2%3D%2229%22%20stroke-width%3D%220.6%22%20opacity%3D%220.5%22%2F%3E%3Cline%20x1%3D%2236%22%20y1%3D%2227%22%20x2%3D%2245%22%20y2%3D%2226%22%20stroke-width%3D%220.6%22%20opacity%3D%220.5%22%2F%3E%3Cline%20x1%3D%2236%22%20y1%3D%2229%22%20x2%3D%2245%22%20y2%3D%2230%22%20stroke-width%3D%220.6%22%20opacity%3D%220.5%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate%28840%2C750%29%22%20opacity%3D%220.35%22%20stroke%3D%22%233a4050%22%20stroke-width%3D%221%22%20fill%3D%22none%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%228%22%20r%3D%225%22%2F%3E%3Ccircle%20cx%3D%2220%22%20cy%3D%228%22%20r%3D%225%22%2F%3E%3Ccircle%20cx%3D%2216%22%20cy%3D%223%22%20r%3D%225%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2213%22%20r%3D%225%22%2F%3E%3Ccircle%20cx%3D%2222%22%20cy%3D%2213%22%20r%3D%225%22%2F%3E%3Ccircle%20cx%3D%2216%22%20cy%3D%229%22%20r%3D%223%22%20fill%3D%22%233a4050%22%20opacity%3D%220.3%22%2F%3E%3Cline%20x1%3D%2216%22%20y1%3D%2218%22%20x2%3D%2216%22%20y2%3D%2235%22%20stroke-width%3D%221%22%2F%3E%3Cpath%20d%3D%22M16%2025%20Q10%2022%2012%2018%22%20stroke-width%3D%220.8%22%2F%3E%3Cpath%20d%3D%22M16%2028%20Q22%2025%2020%2021%22%20stroke-width%3D%220.8%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate%2860%2C810%29%22%20opacity%3D%220.32%22%20stroke%3D%22%233a4050%22%20stroke-width%3D%221.2%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M20%205%20C10%205%205%2015%2010%2025%20C15%2035%2025%2035%2030%2025%20C20%2028%2012%2020%2020%205Z%22%2F%3E%3Ccircle%20cx%3D%2216%22%20cy%3D%2216%22%20r%3D%221.2%22%20fill%3D%22%233a4050%22%2F%3E%3Ccircle%20cx%3D%2222%22%20cy%3D%2218%22%20r%3D%221.2%22%20fill%3D%22%233a4050%22%2F%3E%3Cpath%20d%3D%22M17%2021%20Q19%2023%2021%2021%22%20stroke-width%3D%220.8%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate%28540%2C840%29%22%20opacity%3D%220.3%22%20stroke%3D%22%233a4050%22%20stroke-width%3D%221%22%20fill%3D%22none%22%3E%3Cellipse%20cx%3D%228%22%20cy%3D%2224%22%20rx%3D%226%22%20ry%3D%224%22%2F%3E%3Cline%20x1%3D%2214%22%20y1%3D%2224%22%20x2%3D%2214%22%20y2%3D%224%22%2F%3E%3Cpath%20d%3D%22M14%204%20Q20%202%2020%208%20Q20%2012%2014%2010%22%2F%3E%3C%2Fg%3E%3Ccircle%20cx%3D%22450%22%20cy%3D%2290%22%20r%3D%222%22%20fill%3D%22%233a4050%22%20opacity%3D%220.2%22%2F%3E%3Ccircle%20cx%3D%22960%22%20cy%3D%22240%22%20r%3D%221.5%22%20fill%3D%22%233a4050%22%20opacity%3D%220.2%22%2F%3E%3Ccircle%20cx%3D%22180%22%20cy%3D%22360%22%20r%3D%222.5%22%20fill%3D%22%233a4050%22%20opacity%3D%220.15%22%2F%3E%3Ccircle%20cx%3D%221020%22%20cy%3D%22960%22%20r%3D%222%22%20fill%3D%22%233a4050%22%20opacity%3D%220.2%22%2F%3E%3Ccircle%20cx%3D%22300%22%20cy%3D%221020%22%20r%3D%221.5%22%20fill%3D%22%233a4050%22%20opacity%3D%220.15%22%2F%3E%3C%2Fsvg%3E");
  background-size: 1080px 1080px;
}
html.dark body {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%22360%22%20height%3D%22360%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20transform%3D%22translate%2850%2C40%29%22%20opacity%3D%220.3%22%20stroke%3D%22%2394a3b8%22%20stroke-width%3D%221.2%22%20fill%3D%22none%22%3E%3Cellipse%20cx%3D%2230%22%20cy%3D%2220%22%20rx%3D%2220%22%20ry%3D%2214%22%2F%3E%3Cellipse%20cx%3D%2250%22%20cy%3D%2216%22%20rx%3D%2216%22%20ry%3D%2212%22%2F%3E%3Cellipse%20cx%3D%2215%22%20cy%3D%2218%22%20rx%3D%2212%22%20ry%3D%2210%22%2F%3E%3Ccircle%20cx%3D%2224%22%20cy%3D%2218%22%20r%3D%221.5%22%20fill%3D%22%2394a3b8%22%2F%3E%3Ccircle%20cx%3D%2236%22%20cy%3D%2218%22%20r%3D%221.5%22%20fill%3D%22%2394a3b8%22%2F%3E%3Cpath%20d%3D%22M27%2023%20Q30%2026%2033%2023%22%20stroke-width%3D%221%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate%28200%2C60%29%22%20opacity%3D%220.28%22%20stroke%3D%22%2394a3b8%22%20stroke-width%3D%221%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M15%200%20L18%2010%20L28%2010%20L20%2016%20L23%2027%20L15%2020%20L7%2027%20L10%2016%20L2%2010%20L12%2010Z%22%2F%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%221.2%22%20fill%3D%22%2394a3b8%22%2F%3E%3Ccircle%20cx%3D%2218%22%20cy%3D%2212%22%20r%3D%221.2%22%20fill%3D%22%2394a3b8%22%2F%3E%3Cpath%20d%3D%22M13%2016%20Q15%2018%2017%2016%22%20stroke-width%3D%220.8%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate%28300%2C130%29%22%20opacity%3D%220.25%22%20stroke%3D%22%2394a3b8%22%20stroke-width%3D%221.2%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M12%206%20C12%202%206%200%206%205%20C6%2010%2012%2016%2012%2016%20C12%2016%2018%2010%2018%205%20C18%200%2012%202%2012%206Z%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate%28100%2C150%29%22%20opacity%3D%220.3%22%20stroke%3D%22%2394a3b8%22%20stroke-width%3D%221.2%22%20fill%3D%22none%22%3E%3Cellipse%20cx%3D%2225%22%20cy%3D%2228%22%20rx%3D%2218%22%20ry%3D%2215%22%2F%3E%3Cpath%20d%3D%22M10%2016%20L14%2028%20L6%2028Z%22%2F%3E%3Cpath%20d%3D%22M40%2016%20L36%2028%20L44%2028Z%22%2F%3E%3Ccircle%20cx%3D%2219%22%20cy%3D%2225%22%20r%3D%221.8%22%20fill%3D%22%2394a3b8%22%2F%3E%3Ccircle%20cx%3D%2231%22%20cy%3D%2225%22%20r%3D%221.8%22%20fill%3D%22%2394a3b8%22%2F%3E%3Cellipse%20cx%3D%2225%22%20cy%3D%2230%22%20rx%3D%222%22%20ry%3D%221.5%22%2F%3E%3Cpath%20d%3D%22M14%2028%20Q25%2034%2036%2028%22%20stroke-width%3D%220.8%22%2F%3E%3Cline%20x1%3D%225%22%20y1%3D%2226%22%20x2%3D%2214%22%20y2%3D%2227%22%20stroke-width%3D%220.6%22%20opacity%3D%220.5%22%2F%3E%3Cline%20x1%3D%225%22%20y1%3D%2230%22%20x2%3D%2214%22%20y2%3D%2229%22%20stroke-width%3D%220.6%22%20opacity%3D%220.5%22%2F%3E%3Cline%20x1%3D%2236%22%20y1%3D%2227%22%20x2%3D%2245%22%20y2%3D%2226%22%20stroke-width%3D%220.6%22%20opacity%3D%220.5%22%2F%3E%3Cline%20x1%3D%2236%22%20y1%3D%2229%22%20x2%3D%2245%22%20y2%3D%2230%22%20stroke-width%3D%220.6%22%20opacity%3D%220.5%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate%28280%2C250%29%22%20opacity%3D%220.25%22%20stroke%3D%22%2394a3b8%22%20stroke-width%3D%221%22%20fill%3D%22none%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%228%22%20r%3D%225%22%2F%3E%3Ccircle%20cx%3D%2220%22%20cy%3D%228%22%20r%3D%225%22%2F%3E%3Ccircle%20cx%3D%2216%22%20cy%3D%223%22%20r%3D%225%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2213%22%20r%3D%225%22%2F%3E%3Ccircle%20cx%3D%2222%22%20cy%3D%2213%22%20r%3D%225%22%2F%3E%3Ccircle%20cx%3D%2216%22%20cy%3D%229%22%20r%3D%223%22%20fill%3D%22%2394a3b8%22%20opacity%3D%220.3%22%2F%3E%3Cline%20x1%3D%2216%22%20y1%3D%2218%22%20x2%3D%2216%22%20y2%3D%2235%22%20stroke-width%3D%221%22%2F%3E%3Cpath%20d%3D%22M16%2025%20Q10%2022%2012%2018%22%20stroke-width%3D%220.8%22%2F%3E%3Cpath%20d%3D%22M16%2028%20Q22%2025%2020%2021%22%20stroke-width%3D%220.8%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate%2820%2C270%29%22%20opacity%3D%220.22%22%20stroke%3D%22%2394a3b8%22%20stroke-width%3D%221.2%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M20%205%20C10%205%205%2015%2010%2025%20C15%2035%2025%2035%2030%2025%20C20%2028%2012%2020%2020%205Z%22%2F%3E%3Ccircle%20cx%3D%2216%22%20cy%3D%2216%22%20r%3D%221.2%22%20fill%3D%22%2394a3b8%22%2F%3E%3Ccircle%20cx%3D%2222%22%20cy%3D%2218%22%20r%3D%221.2%22%20fill%3D%22%2394a3b8%22%2F%3E%3Cpath%20d%3D%22M17%2021%20Q19%2023%2021%2021%22%20stroke-width%3D%220.8%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate%28180%2C280%29%22%20opacity%3D%220.2%22%20stroke%3D%22%2394a3b8%22%20stroke-width%3D%221%22%20fill%3D%22none%22%3E%3Cellipse%20cx%3D%228%22%20cy%3D%2224%22%20rx%3D%226%22%20ry%3D%224%22%2F%3E%3Cline%20x1%3D%2214%22%20y1%3D%2224%22%20x2%3D%2214%22%20y2%3D%224%22%2F%3E%3Cpath%20d%3D%22M14%204%20Q20%202%2020%208%20Q20%2012%2014%2010%22%2F%3E%3C%2Fg%3E%3Ccircle%20cx%3D%22150%22%20cy%3D%2230%22%20r%3D%222%22%20fill%3D%22%2394a3b8%22%20opacity%3D%220.15%22%2F%3E%3Ccircle%20cx%3D%22320%22%20cy%3D%2280%22%20r%3D%221.5%22%20fill%3D%22%2394a3b8%22%20opacity%3D%220.15%22%2F%3E%3Ccircle%20cx%3D%2260%22%20cy%3D%22120%22%20r%3D%222.5%22%20fill%3D%22%2394a3b8%22%20opacity%3D%220.12%22%2F%3E%3Ccircle%20cx%3D%22340%22%20cy%3D%22320%22%20r%3D%222%22%20fill%3D%22%2394a3b8%22%20opacity%3D%220.15%22%2F%3E%3Ccircle%20cx%3D%22100%22%20cy%3D%22340%22%20r%3D%221.5%22%20fill%3D%22%2394a3b8%22%20opacity%3D%220.12%22%2F%3E%3C%2Fsvg%3E");
}
html.dark img {
  filter: brightness(0.88) saturate(0.92);
}

.page {
  width: 920px; max-width: 100%; margin: 0 auto;
  height: 100vh; height: 100dvh;
  display: flex; flex-direction: column;
  padding: 20px 0;
}

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.6);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.6);
  border: 1px solid var(--glass-border);
  position: relative;
}
@supports not (backdrop-filter: blur(1px)) {
  .glass { background: var(--glass-bg-strong); }
  .sidebar { background: var(--glass-bg-strong) !important; }
  .mobile-search { background: var(--glass-bg-strong); }
  .hitokoto-banner { background: var(--glass-bg-strong); }
  .post-card-simple { background: var(--glass-bg-strong); }
  .post-card { background: var(--glass-bg-strong); }
  .bottom-bar { background: var(--glass-bg-strong); }
  .pg-card { background: var(--glass-bg-strong); }
}
.glass::before {
  display: none;
}

.shell {
  flex: 1; display: flex; flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
}

.topbar {
  height: var(--topbar-h, 90px); min-height: var(--topbar-h, 90px);
  display: flex; align-items: center;
  padding: 0 24px; gap: 0;
  position: relative; z-index: 5;
}
.topbar-brand {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  flex-shrink: 0;
}
.topbar-center {
  position: absolute; left: 50%; transform: translateX(-50%);
  width: 340px; max-width: calc(100% - 400px);
}
.topbar-center i {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-light); font-size: 13px; pointer-events: none; -webkit-tap-highlight-color: transparent; z-index: 2;
}
.topbar-search {
  width: 100%; height: 38px; border-radius: var(--radius-pill);
  border: 1px solid var(--glass-border); padding: 0 16px 0 38px;
  font-size: 13px; color: var(--text);
  background: rgba(255,255,255,0.45);
  backdrop-filter: blur(10px);
  outline: none; transition: all .25s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.topbar-search::placeholder { color: var(--text-secondary); }
.topbar-search:focus {
  border-color: var(--accent);
  background: rgba(255,255,255,0.75);
  box-shadow: 0 2px 12px var(--accent-glow);
}
html.dark .topbar-search {
  border-color: rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.07);
}
html.dark .topbar-search:focus {
  border-color: var(--accent);
  background: rgba(255,255,255,0.12);
  box-shadow: 0 2px 12px var(--accent-glow);
}
.topbar-brand .brand-icon {
  width: 66px; height: 66px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 28px; font-weight: 700;
  box-shadow: 0 3px 12px var(--accent-glow);
}
.topbar-brand .brand-name { font-size: 20px; font-weight: 700; color: var(--text); letter-spacing: .5px; }
.topbar-brand .brand-logo-img { height: 54px; width: auto; border-radius: var(--radius-sm); object-fit: contain; }

/* ── 图片加载动画 ── */
.img-shimmer-wrap {
  display: block; position: relative; overflow: hidden;
  border-radius: inherit;
}
.img-shimmer-wrap img {
  display: block; margin: 0;
}
.img-loading {
  position: relative; overflow: hidden;
  background: rgba(0,0,0,0.04);
}
.img-loading::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(110deg, rgba(0,0,0,0.04) 30%, rgba(0,0,0,0.10) 50%, rgba(0,0,0,0.04) 70%);
  background-size: 300% 100%;
  animation: imgSweep 1.4s ease-in-out infinite;
  border-radius: inherit;
  pointer-events: none;
}
@keyframes imgSweep {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
html.dark .img-loading {
  background: rgba(255,255,255,0.04);
}
html.dark .img-loading::before {
  background: linear-gradient(110deg, rgba(255,255,255,0.04) 30%, rgba(255,255,255,0.10) 50%, rgba(255,255,255,0.04) 70%);
  background-size: 300% 100%;
}
.img-loading img {
  opacity: 0;
}
img.loaded {
  opacity: 1;
  transition: opacity .3s ease;
}
.topbar-center .m-brand-icon, .topbar-center .m-brand-name { display: none; }
.topbar-center .m-brand-logo-img { display: none; }
.topbar-spacer { flex: 1; }

.topbar-actions { display: flex; align-items: center; gap: 6px; position: relative; }

/* 站点信息按钮（仅移动端显示；双类选择器压过 .topbar-btn 的 display:flex） */
.topbar-btn.info-btn { display: none; }
.site-info-pop {
  position: absolute; top: calc(100% + 10px); left: 12px;
  min-width: 210px; padding: 12px 16px;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  font-size: 12px; color: var(--text-muted); line-height: 1.7;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  text-align: center; white-space: nowrap;
  opacity: 0; transform: translateY(-6px) scale(0.97);
  transform-origin: top left;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 60;
}
.site-info-pop.active { opacity: 1; transform: none; pointer-events: auto; }
.site-info-pop a { color: var(--text-muted); text-decoration: none; }
.site-info-pop a:active { color: var(--accent); }

.topbar-btn {
  width: 34px; height: 34px; border-radius: 50%; border: none;
  background: transparent; cursor: pointer; display: flex;
  align-items: center; justify-content: center; color: var(--text-secondary);
  transition: all .2s; font-size: 14px; position: relative;
}
.topbar-btn:hover { background: rgba(0,0,0,0.06); color: var(--text); }
html.dark .topbar-btn:hover { background: rgba(255,255,255,0.08); }
#editPostBtn {
  color: var(--text-secondary); text-decoration: none;
  width: 31px; height: 31px;
  border: 2.5px solid var(--border);
}
#editPostBtn:hover {
  background: rgba(0,0,0,0.06); color: var(--text);
}
html.dark #editPostBtn:hover {
  background: rgba(255,255,255,0.08);
}

/* ── 深色模式切换按钮 ── */
#themeToggle {
  width: 31px; height: 31px;
  border: 2.5px solid var(--border);
}
.scroll-progress-btn {
  position: relative; display: flex; align-items: center; justify-content: center;
}
.scroll-progress-ring {
  width: 34px; height: 34px; transform: rotate(-90deg);
  position: absolute; top: 0; left: 0;
}
.scroll-progress-bg {
  fill: none; stroke: var(--border); stroke-width: 2.5;
}
.scroll-progress-bar {
  fill: none; stroke: var(--accent); stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 87.96;
  stroke-dashoffset: 87.96;
  transition: stroke-dashoffset 0.15s ease;
}
.scroll-progress-text {
  font-size: 9px; font-weight: 700; color: var(--text-secondary);
  position: relative; z-index: 1; line-height: 1;
}


.main-body { flex: 1; display: flex; overflow: hidden; }

.sidebar {
  width: var(--sidebar-w, 230px); min-width: var(--sidebar-w, 230px);
  display: flex; flex-direction: column;
  overflow-y: auto; overflow-x: hidden;
  padding-top: 4px;
  position: relative; z-index: 2;
}
.sidebar { scrollbar-width: thin; scrollbar-color: var(--sb-thumb) transparent; }
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--sb-thumb); border-radius: 2px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: var(--sb-thumb-hover); }

.nav-group { padding: 2px 14px; }
.nav-group-title {
  font-size: 13px; color: var(--text-secondary); padding: 12px 18px 5px;
  font-weight: 600; letter-spacing: .3px;
  display: flex; align-items: center; justify-content: space-between;
}

/* ── 侧边栏区块折叠按钮 ── */
.section-toggle-btn {
  width: 20px; height: 20px;
  border: none; background: transparent;
  color: var(--text-light); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; font-size: 10px;
  transition: all .2s, transform .3s var(--spring);
  padding: 0;
}
.section-toggle-btn:hover {
  background: rgba(0,0,0,0.06);
  color: var(--text);
}
html.dark .section-toggle-btn:hover {
  background: rgba(255,255,255,0.08);
}
.section-toggle-btn i {
  transition: transform .25s ease;
}
.section-toggle-btn.collapsed i {
  transform: rotate(180deg);
}
.section-list {
  max-height: 800px;
  overflow: hidden;
  transition: max-height .35s ease, opacity .25s ease;
  opacity: 1;
}
.section-list.collapsed {
  max-height: 0;
  opacity: 0;
}

/* ── 侧边栏标签云 ── */
.sidebar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 18px 10px;
}
.sidebar-tag {
  display: inline-block;
  padding: 3px 10px;
  font-size: 12px;
  color: var(--text-secondary);
  background: rgba(0,0,0,0.03);
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: all .15s;
  border: 1px solid transparent;
}
html.dark .sidebar-tag {
  background: rgba(255,255,255,0.04);
}
.sidebar-tag:hover {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent-glow);
}
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 18px;
  cursor: pointer; position: relative; color: var(--text-secondary); font-size: 13px;
  transition: color .2s, background .2s; border-radius: var(--radius-sm); margin: 1px 0;
  text-decoration: none;
  overflow: hidden;
}
.nav-item:hover {
  background: rgba(0,0,0,0.04); color: var(--text);
}
.nav-item:hover i { color: var(--accent); }
html.dark .nav-item:hover {
  background: rgba(255,255,255,0.05);
}
.nav-item.active {
  color: var(--accent); font-weight: 600;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
}
.nav-item.active i { color: var(--accent); }
.nav-item i {
  width: 17px; text-align: center; font-size: 14px;
  transition: color .2s;
}
.nav-count {
  margin-left: auto; font-size: 11px; color: var(--text-light);
  background: rgba(0,0,0,0.04); padding: 1px 7px;
  border-radius: var(--radius-sm); font-weight: 500;
}
html.dark .nav-count { background: rgba(255,255,255,0.06); }

.nav-divider { height: 1px; background: rgba(0,0,0,0.06); margin: 8px 18px; }
html.dark .nav-divider { background: rgba(255,255,255,0.06); }


.sidebar-footer { display: none; }

/* 移动端底部悬浮导航栏（仅 ≤920px 显示，样式见 article.css） */
.mobile-tabbar { display: none; }

/* ══════════════════════════════════════
   灯箱（增强版：工具栏 / 缩放 / 说明 / 缩略图）
   ══════════════════════════════════════ */
.lightbox {
  display: none; position: fixed; inset: 0; z-index: 999;
  background: rgba(10,12,18,0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  flex-direction: column; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity .22s ease;
  touch-action: none;
}
.lightbox.active { display: flex; opacity: 1; }
body.lb-open { overflow: hidden; }

/* 顶部工具栏 */
.lightbox-toolbar {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  z-index: 12; display: flex; align-items: center; gap: 4px;
  padding: 5px 6px 5px 10px;
  border-radius: var(--radius-pill);
  background: rgba(28,30,40,0.72);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  box-shadow: 0 8px 28px rgba(0,0,0,0.4);
}
.lightbox-tool {
  width: 34px; height: 34px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; background: transparent; color: rgba(255,255,255,0.82);
  border-radius: 50%; cursor: pointer; font-size: 14px;
  text-decoration: none;
  transition: background .18s, color .18s, transform .2s;
}
.lightbox-tool:hover { background: rgba(255,255,255,0.16); color: #fff; }
.lightbox-tool:active { transform: scale(.9); }
.lightbox-tool.is-active { color: var(--accent); }
.lightbox-zoom-val {
  min-width: 44px; text-align: center;
  font-size: 11.5px; font-variant-numeric: tabular-nums;
  color: rgba(255,255,255,0.6); user-select: none;
}
.lightbox-close { margin-left: 4px; }
.lightbox-close:hover { background: rgba(240,90,90,0.85); color: #fff; }

/* 舞台与图片 */
.lightbox-stage {
  position: relative; flex: 1 1 auto;
  display: flex; align-items: center; justify-content: center;
  width: 100%; max-height: 100%;
  overflow: hidden; padding: 58px 64px 96px;
}
.lightbox-stage img {
  max-width: min(92vw, 1600px); max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius-xs);
  box-shadow: 0 12px 50px rgba(0,0,0,0.55);
  user-select: none; -webkit-user-drag: none;
  transform-origin: center center;
  will-change: transform;
  transition: opacity .25s ease, transform .26s cubic-bezier(.2,.8,.3,1);
  cursor: zoom-in;
}
.lightbox.zoomed .lightbox-stage img { cursor: grab; }
.lightbox.dragging .lightbox-stage img { cursor: grabbing; transition: opacity .2s; }
.lightbox.pinching .lightbox-stage img { transition: opacity .2s; }
.lightbox-stage img.lb-loading { opacity: 0; }
.lightbox.no-anim .lightbox-stage img { transition: opacity .2s; }

/* 加载指示 */
.lightbox-spinner {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  color: rgba(255,255,255,0.7); font-size: 26px;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.lightbox.is-loading .lightbox-spinner { opacity: 1; }

/* 左右切换 */
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border: none;
  background: rgba(28,30,40,0.7); color: #fff;
  border-radius: 50%; cursor: pointer; font-size: 17px;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, transform .2s; z-index: 11;
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.lightbox-nav:hover { background: rgba(60,64,80,0.9); transform: translateY(-50%) scale(1.06); }
.lightbox-nav:active { transform: translateY(-50%) scale(.94); }
.lightbox-prev { left: 18px; }
.lightbox-next { right: 18px; }

/* 底部：说明 / 计数 / 缩略图 / 提示 */
.lightbox-bottom {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 11;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 10px 16px 16px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.5));
  pointer-events: none;
}
.lightbox-bottom > * { pointer-events: auto; }
.lightbox-caption {
  max-width: min(80vw, 720px); text-align: center;
  color: rgba(255,255,255,0.86); font-size: 13px; line-height: 1.5;
  text-shadow: 0 1px 6px rgba(0,0,0,0.6);
}
.lightbox-caption:empty { display: none; }
.lightbox-counter {
  color: rgba(255,255,255,0.72); font-size: 12px;
  font-variant-numeric: tabular-nums;
  background: rgba(0,0,0,0.42); padding: 3px 13px; border-radius: var(--radius-pill);
  border: 1px solid rgba(255,255,255,0.1);
}
.lightbox-counter:empty { display: none; }
.lightbox-thumbs {
  display: flex; align-items: center; gap: 7px;
  max-width: min(92vw, 860px); overflow-x: auto;
  padding: 4px; scrollbar-width: none;
}
.lightbox-thumbs::-webkit-scrollbar { display: none; }
.lightbox-thumbs:empty { display: none; }
.lightbox-thumb {
  width: 48px; height: 48px; flex-shrink: 0;
  border-radius: 8px; overflow: hidden; cursor: pointer;
  border: 2px solid transparent; opacity: .55;
  background: rgba(255,255,255,0.08);
  transition: opacity .2s, border-color .2s, transform .2s;
}
.lightbox-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lightbox-thumb:hover { opacity: .9; transform: translateY(-2px); }
.lightbox-thumb.active { opacity: 1; border-color: var(--accent); }
.lightbox-hint {
  font-size: 11px; color: rgba(255,255,255,0.4);
  display: inline-flex; align-items: center; gap: 6px;
}
.lightbox-hint i { font-size: 11px; }

@media (max-width: 640px) {
  .lightbox-stage { padding: 54px 10px 120px; }
  .lightbox-stage img { max-width: 96vw; border-radius: 6px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .lightbox-nav { width: 40px; height: 40px; background: rgba(28,30,40,0.6); }
  .lightbox-toolbar { top: 10px; padding: 4px; gap: 2px; }
  .lightbox-tool { width: 32px; height: 32px; font-size: 13px; }
  .lightbox-zoom-val { min-width: 38px; font-size: 11px; }
  .lightbox-hint { display: none; }
  .lightbox-thumb { width: 42px; height: 42px; }
}

@media print {
  .lightbox { display: none !important; }
}

.mobile-search { display: none; }
.content-area {
  flex: 1; position: relative; display: flex; flex-direction: column;
  overflow: hidden; z-index: 2;
}
.content-inner {
  flex: 1; display: flex; flex-direction: column;
  background: transparent;
  border-left: 1px solid var(--glass-border);
  overflow: hidden;
}
.content-scroll {
  flex: 1; overflow-y: scroll; padding: 6px 24px 40px;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
  position: relative; z-index: 1;
  --sb-show: 0;
}
/* 滚动时 + 悬停在滚动条区域时显示 */
.content-scroll.sb-active,
.content-scroll:hover {
  scrollbar-color: var(--sb-thumb) transparent;
}
.content-scroll::-webkit-scrollbar { width: 6px; }
.content-scroll::-webkit-scrollbar-track { background: transparent; }
.content-scroll::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 3px;
  transition: background .3s;
}
.content-scroll.sb-active::-webkit-scrollbar-thumb,
.content-scroll:hover::-webkit-scrollbar-thumb {
  background: var(--sb-thumb);
}
.content-scroll.sb-active::-webkit-scrollbar-thumb:hover,
.content-scroll:hover::-webkit-scrollbar-thumb:hover {
  background: var(--sb-thumb-hover);
}


.fade-top, .fade-bottom {
  position: absolute; left: 0; right: 0; height: 48px;
  pointer-events: none; -webkit-tap-highlight-color: transparent; z-index: 5; transition: opacity .3s;
}
.fade-top { top: 0; background: linear-gradient(to bottom, var(--bg), transparent); opacity: 0; }
.fade-bottom { bottom: 0; background: linear-gradient(to top, var(--bg), transparent); opacity: 1; }
.fade-top.visible, .fade-bottom.visible { opacity: 1; }

.content-tabs {
  display: flex; gap: 6px; margin-bottom: 16px; padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.content-tab {
  font-size: 13px; color: var(--text-secondary); cursor: pointer;
  padding: 6px 14px; border-radius: var(--radius-pill); position: relative;
  transition: color .2s, background .2s;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
}
.content-tab:hover {
  color: var(--text); background: rgba(0,0,0,0.08);
}
.content-tab.active {
  color: #fff; font-weight: 600;
  background: var(--accent);
  box-shadow: 0 2px 8px var(--accent-glow);
}
.content-tab.active:hover {
  background: var(--accent-hover);
  box-shadow: 0 3px 12px var(--accent-glow);
}

.hitokoto-banner {
  border-radius: var(--radius);
  padding: 14px 18px; display: flex; align-items: center;
  margin-bottom: 16px; cursor: pointer; transition: all .2s;
  animation: cardFadeIn 0.4s ease both;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  position: relative;
}
.hitokoto-banner::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: var(--glass-highlight); pointer-events: none; -webkit-tap-highlight-color: transparent;
}
.hitokoto-banner:hover { background: var(--glass-bg-strong); }
.hitokoto-text {
  font-size: 14px; color: var(--text-secondary); line-height: 1.7;
  position: relative; z-index: 2; font-style: italic;
}


