/* 图宝宝 · 站点样式
   设计语言参照「时光图册」：黑顶条 + 白导航条、浅灰底白卡、4px 圆角、
   卡片 2:3 竖版缩略图、模块标题 22px、蓝色 (#274aaa) 作点缀（模块/页头竖条、
   侧栏标题、页脚压条、查看更多、正文链）。零依赖，亮/暗双主题。 */

/* ============ 设计令牌 ============ */
:root {
  --bg: #f7f9fa;
  --bg-elev: #ffffff;
  --bg-soft: #eef1f4;
  --text: #222222;
  --text-soft: #797c80;
  --text-mute: #aaaeb3;
  --line: #e6eaee;
  --brand: #274aaa;
  --brand-dark: #1d3a85;
  --brand-soft: rgba(39, 74, 170, .08);
  --danger: #ff3355;
  --topbar-bg: #000000;
  --topbar-text: #adadad;
  --radius: 4px;
  --radius-sm: 3px;
  --radius-lg: 6px;
  --wrap: 1600px;
  --gutter: 16px;
  --aside: 360px;
  --header-h: 64px;
  --nav-h: 55px;
  --card-gap: 16px;
  --row-gap: 28px;
  --shadow-card: 0 0 2px rgba(98, 124, 153, .10);
  --shadow-pop: 0 2px 10px rgba(98, 124, 153, .16);
  --shadow-sm: 0 2px 8px rgba(98, 124, 153, .14);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --brand-ink: #ffffff;
}

html[data-theme="dark"] {
  --bg: #16181c;
  --bg-elev: #1e2126;
  --bg-soft: #262a30;
  --text: #e8eaed;
  --text-soft: #a2a8b0;
  --text-mute: #767c85;
  --line: #2c3138;
  --brand: #4f74d8;
  --brand-dark: #3f5fb8;
  --brand-soft: rgba(79, 116, 216, .14);
  --topbar-bg: #000000;
  --topbar-text: #9b9b9b;
  --shadow-card: 0 0 2px rgba(0, 0, 0, .6);
  --shadow-pop: 0 2px 10px rgba(0, 0, 0, .55);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .5);
}

/* ============ 基础 ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.7 var(--font);
  transition: background-color .2s ease, color .2s ease;
}
img { max-width: 100%; display: block; border: 0; }
a { color: inherit; }
h1, h2, h3, h4 { line-height: 1.4; font-weight: 600; }
button { font: inherit; }
p { margin: 0 0 10px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--brand); color: var(--brand-ink);
  padding: 9px 16px; border-radius: 0 0 var(--radius) 0; text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ============ 头部：整页一体（2026-10-04 用户要求） ============
   ① 不再有独立导航层，导航已并进顶条；
   ② 顶条不吸顶 —— 它就是页面里普通一段，随页面一起滚走（不再始终浮在顶部）。 */
.site-header { position: static; }
.topbar {
  background: var(--bg-elev); color: var(--text-soft);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 18px; min-height: var(--header-h); }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand-logo { height: 40px; width: auto; display: block; }
.brand-mark {
  width: 34px; height: 34px; border-radius: var(--radius);
  background: var(--brand); color: var(--brand-ink);
  display: grid; place-items: center;
  font-weight: 700; font-size: 17px; letter-spacing: 1px;
}
.brand-text strong { display: block; font-size: 17px; font-weight: 600; letter-spacing: .5px; color: var(--text); }
.brand-text small { display: block; font-size: 12px; line-height: 1.25; color: var(--text-soft); }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; flex: none; }

.search { display: flex; align-items: center; }
.search input {
  height: 34px; width: 210px; padding: 0 13px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-elev); color: var(--text); font-size: 13px;
  transition: width .2s ease, border-color .18s ease;
}
.search input::placeholder { color: var(--text-mute); }
.search input:focus { width: 250px; border-color: var(--brand); outline: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 15px; border: 0;
  border-radius: var(--radius); font-size: 13px; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: background-color .18s ease, color .18s ease, opacity .18s ease;
}
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-outline { background: var(--bg-elev); color: var(--brand); border: 1px solid var(--brand); }
.btn-outline:hover { background: var(--brand-soft); }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--text-soft); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-ghost.is-icon { width: 34px; padding: 0; }
.btn-sm { height: 30px; padding: 0 12px; font-size: 12.5px; }
.btn[disabled] { opacity: .6; cursor: default; }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 4px;
  width: 36px; height: 34px; padding: 0 8px;
  background: transparent; border: 1px solid var(--line);
  border-radius: var(--radius); cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; border-radius: 2px; background: var(--text-soft); }

/* 导航并入顶条（2026-10-04 用户要求：不要单独一层导航条，整页一体）
   桌面：顶条一行内「Logo · 导航 · 右侧操作」；手机：导航收成 ɨ 下拉。 */
.site-nav { display: flex; align-items: center; gap: 2px; min-width: 0; flex: 1 1 auto; }
.site-nav a {
  padding: 7px 13px; border-radius: var(--radius);
  font-size: 14.5px; color: var(--text); text-decoration: none;
  transition: color .18s ease, background-color .18s ease;
}
.site-nav a:hover { color: var(--brand); background: var(--brand-soft); }
.site-nav a.active { color: var(--brand); background: var(--brand-soft); font-weight: 600; }
.site-nav .nav-more { color: var(--text-soft); }

/* ---------- 分类下拉 ---------- */
.nav-dd { position: relative; }
.nav-dd-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 7px 13px; border: 0; border-radius: var(--radius); background: transparent;
  font: inherit; font-size: 14.5px; color: var(--text); cursor: pointer;
  transition: color .18s ease, background-color .18s ease;
}
.nav-dd-btn:hover { color: var(--brand); background: var(--brand-soft); }
.dd-caret { font-size: 10px; line-height: 1; transition: transform .2s ease; }
.nav-dd.is-open .dd-caret { transform: rotate(180deg); }
.nav-dd-panel {
  position: absolute; left: 0; top: calc(100% + 8px); z-index: 60;
  display: none; grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 2px 10px; min-width: 480px; max-height: 62vh; overflow-y: auto;
  padding: 12px; background: var(--bg-elev);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(22, 38, 60, .14);
}
.nav-dd.is-open .nav-dd-panel { display: grid; }
.nav-dd-panel a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 10px; border-radius: var(--radius);
  font-size: 14px; color: var(--text); text-decoration: none; white-space: nowrap;
}
.nav-dd-panel a:hover { color: var(--brand); background: var(--brand-soft); }
.nav-dd-panel a em { font-style: normal; font-size: 12px; color: var(--text-soft); }
.nav-dd-panel .dd-all {
  grid-column: 1 / -1; justify-content: center; margin-top: 6px;
  border-top: 1px solid var(--line); border-radius: 0; padding-top: 10px;
  color: var(--brand); font-weight: 600;
}

/* 用户信息在 header-actions 里（与时光图册一致），不再自己 margin-left:auto */
.user-bar { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-soft); }
.user-bar a { color: var(--text); text-decoration: none; }
.user-bar a:hover { color: var(--brand); }
.user-bar .pt { color: #d9820a; font-weight: 700; }
.user-bar .vip-tag {
  background: linear-gradient(90deg, #ffb86c, #ff7a7a); color: #2b1a00;
  padding: 1px 7px; border-radius: 8px; font-size: 11.5px; font-weight: 700;
}

/* ============ chip / tag ============ */
.chip {
  display: inline-block; padding: 2px 8px; border-radius: var(--radius-sm);
  font-size: 12px; line-height: 1.7;
  background: var(--brand-soft); color: var(--brand);
  text-decoration: none;
}
.tag {
  display: inline-block; padding: 2px 8px; border-radius: var(--radius-sm);
  font-size: 12px; color: var(--text-soft); background: var(--bg-soft);
  text-decoration: none; transition: background-color .18s ease, color .18s ease;
}
.tag:hover { background: var(--brand-soft); color: var(--brand); }

/* ============ 模块 ============ */
.module { margin-top: var(--row-gap); }
.module-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: var(--card-gap);
}
/* ⚠️ min-width:0 必需：否则长栏目标题在 flex 行里把右侧「查看更多」挤出去 */
.modules-title-box { min-width: 0; }
.module-title {
  margin: 0; font-size: 22px; font-weight: 600; line-height: 1.3;
  overflow: visible;
}
/* 主标题可点击：外观与纯文字一致，悬停才给提示色 */
a.mod-name { color: inherit; text-decoration: none; transition: color .18s ease; }
a.mod-name:hover { color: var(--brand); }
.module-title .mod-sep { margin: 0 6px; color: var(--brand); font-weight: 400; }
.module-title .mod-desc { font-size: 13px; font-weight: 400; color: var(--text-mute); }
.more { font-size: 13px; color: var(--brand); text-decoration: none; white-space: nowrap; flex: none; }
.more:hover { color: var(--brand-dark); }

/* ============ 卡片 ============ */
.card-grid, .card-grid-arch, .card-grid-big, .card-grid6 {
  display: grid; gap: var(--card-gap); grid-template-columns: repeat(4, minmax(0, 1fr));
}
.card-grid6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg-elev); border-radius: var(--radius);
  box-shadow: var(--shadow-card); transition: box-shadow .2s ease;
}
.card:hover { box-shadow: var(--shadow-pop); }
.card-thumb {
  position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-soft);
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-thumb img { transform: scale(1.04); }
.card-grid-arch .card-thumb { aspect-ratio: 2 / 3; }
.card-grid-big .card-thumb { aspect-ratio: 5 / 3; }
.card-grid6 .card-thumb { aspect-ratio: 2 / 3; }

.card-body { display: flex; flex-direction: column; gap: 4px; flex: 1; padding: 12px 13px 13px; }
.card-title { margin: 0; font-size: 15px; font-weight: 500; line-height: 1.45; }
.card-title a { color: inherit; text-decoration: none; }
.card-title a:hover { color: var(--brand); }
.card-excerpt {
  margin: 0; font-size: 12px; line-height: 1.6; color: var(--text-soft);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta {
  display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: auto;
  padding-top: 6px; font-size: 12px; color: var(--text-mute);
}
.card-meta .meta-author { color: var(--text-mute); }
.card-meta .meta-date { margin-left: auto; }
.card-grid-arch .card-body { padding: 10px 11px 11px; gap: 4px; }
.card-grid-arch .card-title {
  font-size: 14px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-grid-arch .card-meta { font-size: 11.5px; padding-top: 5px; }
.card-grid-arch .card-excerpt { display: none; }
.card-grid6 .card-body { padding: 11px 12px 12px; gap: 5px; }
.card-grid6 .card-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-grid6 .card-meta { padding-top: 5px; }

/* ============ 主体 + 侧栏 ============ */
.layout-with-aside {
  display: grid; gap: var(--card-gap); align-items: start;
  grid-template-columns: minmax(0, 1fr) var(--aside);
  margin-top: var(--row-gap);
}
.layout-with-aside > .row-main > .module:first-child { margin-top: 0; }
.sidebar {
  display: flex; flex-direction: column; gap: var(--card-gap);
  position: sticky; top: 14px;
}
.panel { background: var(--bg-elev); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 16px; }
.panel-title {
  position: relative; margin: 0 0 12px; padding-left: 11px;
  font-size: 16px; font-weight: 600; color: var(--text);
}
.panel-title::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 15px; border-radius: 2px; background: var(--brand);
}
.hot-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.hot-list li a { display: flex; gap: 10px; text-decoration: none; align-items: center; }
.hot-list img {
  width: 64px; height: 48px; flex: none; border-radius: var(--radius-sm);
  object-fit: cover; background: var(--bg-soft);
}
.hot-list strong {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 13.5px; font-weight: 500; line-height: 1.45;
}
.hot-list a:hover strong { color: var(--brand); }
.hot-list em { display: block; margin-top: 2px; font-style: normal; font-size: 12px; color: var(--text-mute); }
.hot-list .rk {
  flex: none; width: 18px; text-align: center; font-size: 13px; font-weight: 700; color: var(--text-mute);
}
.hot-list li:nth-child(-n+3) .rk { color: var(--brand); }

.stat-list { list-style: none; margin: 0; padding: 0; font-size: 13.5px; }
.stat-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 0; border-bottom: 1px solid var(--line);
}
.stat-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.stat-list a { text-decoration: none; color: var(--text); }
.stat-list a:hover { color: var(--brand); }
.stat-list span { color: var(--text-mute); }
/* 侧栏「全部机构」行整行可点（2026-09-26）：标记/文字一字不动，
   只在行上加一层透明覆盖，把点击区扩到整行（含右侧 › 与上下内边距）。 */
.sidebar .stat-list li:last-child { position: relative; }
.sidebar .stat-list li:last-child > a::after { content: ""; position: absolute; inset: 0; }
.stat-cloud { display: flex; flex-wrap: wrap; gap: 7px; }
.cat-box { background: var(--bg-elev); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 18px 20px; }
.stat-list.is-cols { columns: 3; column-gap: 32px; }
.stat-list.is-cols li { break-inside: avoid; }

/* ============ 分页 ============ */
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 26px; }
.page-link {
  min-width: 34px; height: 34px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--text-soft); font-size: 13px; text-decoration: none; transition: .18s ease;
}
.page-link:hover { border-color: var(--brand); color: var(--brand); }
.page-link.is-current { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 600; }
.page-link.is-disabled { opacity: .45; cursor: default; }

/* ============ 面包屑 / 页头 ============ */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 18px 0 0; font-size: 13px; color: var(--text-mute); }
.breadcrumb a { color: var(--text-soft); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb > :last-child { color: var(--text); }
.page-head { margin: 12px 0 20px; }
.page-head h1 { position: relative; margin: 0; padding-left: 13px; font-size: 24px; font-weight: 600; }
.page-head h1::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 4px; height: 20px; border-radius: 2px; background: var(--brand);
}
.page-head h1 em { font-style: normal; font-size: 13px; font-weight: 400; color: var(--text-mute); margin-left: 8px; }
.page-head p { margin: 8px 0 0; font-size: 13.5px; color: var(--text-mute); }
.org-chips {
  display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 0; padding-top: 11px;
  border-top: 1px solid var(--line);
}
.org-chip {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 12.5px; color: var(--text-soft); background: var(--bg-soft);
  text-decoration: none; transition: background-color .18s ease, color .18s ease;
}
.org-chip:hover { background: var(--brand-soft); color: var(--brand); }

/* ============ 详情页 ============ */
.post { background: var(--bg-elev); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 28px; }
.post-head h1 { margin: 0 0 12px; font-size: 26px; font-weight: 600; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 13px; color: var(--text-mute); }
.post-meta .chip { transition: background-color .18s ease, color .18s ease; }
.post-meta .chip:hover { background: var(--brand); color: #fff; }
.post-gallery {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px; margin: 20px 0;
}
.post-gallery img {
  width: 100%; aspect-ratio: 2 / 3; object-fit: cover; cursor: zoom-in;
  display: block; background: var(--bg-soft); border-radius: var(--radius-sm);
}
.post-note { margin: 0 0 20px; font-size: 12.5px; color: var(--text-mute); }

.post-body { font-size: 15px; line-height: 1.9; color: var(--text-soft); word-break: break-word; }
.post-body p { margin: 0 0 14px; }
.post-body p:last-child { margin-bottom: 0; }
.post-body a { color: var(--brand); }

/* 网盘付费模块 */
.pan-box { background: var(--bg-soft); border-radius: var(--radius); padding: 16px; margin-top: 20px; }
.pan-tip { margin: 0 0 12px; font-size: 14px; line-height: 1.75; color: var(--text); }
.pan-state { font-size: 13.5px; margin: 0 0 10px; }
.pan-state .ok { color: #1a9d4b; font-weight: 600; }
.pan-state .warn { color: #d08b00; font-weight: 600; }
.pan-points { color: var(--brand); font-weight: 700; }
.pan-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; align-items: center; }
.pan-rows { display: flex; flex-direction: column; gap: 10px; margin: 0 0 12px; }
.pan-row { padding: 11px 13px; border-radius: var(--radius); background: var(--bg-elev); border-left: 3px solid var(--brand); }
.pan-row-head { display: flex; align-items: center; gap: 8px; margin: 0 0 5px; }
.pan-row-name { font-size: 14.5px; font-weight: 600; color: var(--text); }
.pan-row-meta { font-size: 13.5px; color: var(--text); margin: 0 0 8px; word-break: break-all; }
.pan-row-btns { display: flex; flex-wrap: wrap; gap: 8px; }
/* 提取码 / 解压密码：可点击复制的小胶囊（照搬时光图册）
   ⚠️ button 自带 UA 样式，必须显式清 border/background/font，否则比 <b> 高一截、带灰底 */
.pan-code {
  display: inline-block; padding: 2px 9px; margin: 0 1px;
  border: 1px dashed var(--brand); border-radius: 999px;
  background: var(--brand-soft); color: var(--brand);
  font: inherit; font-size: 13px; font-weight: 700; line-height: 1.5;
  cursor: pointer; vertical-align: baseline;
  transition: background-color .18s ease, color .18s ease;
}
.pan-code:hover { background: var(--brand); color: var(--brand-ink); }
.pan-code:active { opacity: .8; }
.pan-ok { margin: 0 0 12px; padding: 11px 13px; border-radius: var(--radius); background: var(--bg-elev); border-left: 3px solid var(--brand); }
.pan-ok p { margin: 0; font-size: 14px; word-break: break-all; }
.pan-msg { margin: 10px 0 0; font-size: 13.5px; min-height: 18px; }
.pan-msg.err { color: #d9534f; }
.pan-msg.ok { color: #1a9d4b; }

.post-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 20px; }
.post-nav {
  display: flex; justify-content: space-between; gap: 12px;
  margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13.5px;
}
.post-nav a { color: var(--text-soft); text-decoration: none; }
.post-nav a:hover { color: var(--brand); }
.post-nav .spacer { flex: 1; }

/* ============ 登录 / 注册 ============ */
.auth {
  max-width: 420px; margin: 40px auto; padding: 28px;
  background: var(--bg-elev); border-radius: var(--radius); box-shadow: var(--shadow-card);
}
.auth h1 { margin: 0 0 18px; font-size: 21px; }
.auth form { display: flex; flex-direction: column; gap: 14px; }
.auth label, .payform label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-soft); }
.auth input, .payform input, .payform select, .admin-form input, .admin-form select, .admin-form textarea {
  height: 38px; padding: 0 12px; font-size: 14px; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  outline: none; transition: border-color .18s ease;
}
.admin-form textarea { height: auto; padding: 10px 12px; line-height: 1.6; font-family: inherit; }
.auth input:focus, .payform input:focus, .payform select:focus, .admin-form input:focus, .admin-form textarea:focus { border-color: var(--brand); }
.auth .btn { height: 40px; }
.auth .tip { margin: 16px 0 0; font-size: 13px; color: var(--text-mute); }
.auth .tip a { color: var(--brand); }

/* ============ 会员中心 ============ */
.uinfo { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--card-gap); margin-bottom: var(--row-gap); }
.uinfo > div {
  background: var(--bg-elev); border-radius: var(--radius); box-shadow: var(--shadow-card);
  padding: 14px 16px; display: flex; flex-direction: column; gap: 4px;
}
.uinfo span { font-size: 12.5px; color: var(--text-mute); }
.uinfo b { font-size: 17px; font-weight: 600; }
.payform { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; }
.payform label { min-width: 200px; }
.list { background: var(--bg-elev); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 6px 16px; }
.list .row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
  padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13.5px;
}
.list .row:last-child { border-bottom: 0; }
.list .row > a { color: var(--text); text-decoration: none; }
.list .row > a:hover { color: var(--brand); }
.list .row > :nth-child(2) { color: var(--text-soft); }
.list .row > :last-child { margin-left: auto; color: var(--text-mute); }
.plus { color: #1a9d4b; }
.minus { color: #d9534f; }
.empty { margin: 0; padding: 14px 0; font-size: 13.5px; color: var(--text-mute); text-align: center; }

/* ============ 正文页 ============ */
.prose {
  background: var(--bg-elev); border-radius: var(--radius);
  box-shadow: var(--shadow-card); padding: 28px;
  font-size: 15px; line-height: 1.85;
}
.prose h2 { font-size: 18px; margin: 24px 0 10px; }
.prose h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 14px; color: var(--text-soft); }
.prose ul, .prose ol { margin: 0 0 14px; padding-left: 20px; color: var(--text-soft); }
.prose a { color: var(--brand); }

/* ============ 提示条 ============ */
.flash {
  margin: 14px 0 0; padding: 11px 14px; border-radius: var(--radius);
  font-size: 13.5px; background: var(--bg-elev); border-left: 3px solid var(--brand);
}
.flash.err { border-left-color: var(--danger); }
.msg { font-size: 13.5px; margin: 10px 0 0; min-height: 18px; }
.msg.err { color: #d9534f; }
.msg.ok { color: #1a9d4b; }

/* ============ 页脚 ============ */
.site-footer {
  margin-top: 48px; padding: 28px 0 22px;
  background: var(--bg-elev); border-top: 2px solid var(--brand);
}
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.footer-brand strong { font-size: 15px; }
.footer-brand p { margin: 4px 0 0; font-size: 12.5px; color: var(--text-mute); }
.footer-links { display: flex; flex-wrap: wrap; gap: 15px; margin-left: auto; }
.footer-links a { font-size: 13px; color: var(--text-soft); text-decoration: none; }
.footer-links a:hover { color: var(--brand); }
.copyright { width: 100%; margin: 2px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-mute); }

/* 回顶部 */
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--bg-elev); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  color: var(--text-soft); cursor: pointer; font-size: 15px;
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: .2s ease;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { color: var(--brand); border-color: var(--brand); }

/* ============ 灯箱 ============ */
html.lightbox-open { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .92); padding: 0 56px;
  touch-action: none; /* 触摸交给灯箱处理（滑动切图） */
}
.lightbox[hidden] { display: none; }
.lightbox-img { max-width: 100%; max-height: 100vh; width: auto; height: auto; object-fit: contain; border-radius: var(--radius-sm); }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute; z-index: 1; cursor: pointer;
  background: rgba(255, 255, 255, .12); color: #fff; border: 0;
  font-size: 22px; line-height: 1; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-close { top: 14px; right: 14px; width: 40px; height: 40px; font-size: 20px; }
.lightbox-prev, .lightbox-next { top: 50%; margin-top: -24px; width: 48px; height: 48px; }
.lightbox-prev { left: 8px; }
.lightbox-next { right: 8px; }
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(255, 255, 255, .26); }
.lightbox-count {
  position: absolute; bottom: 16px; left: 0; right: 0;
  text-align: center; color: rgba(255, 255, 255, .78); font-size: 13px;
}

/* ============ 后台 ============ */
.admin-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.admin-nav a {
  padding: 7px 13px; border-radius: var(--radius); font-size: 14px;
  color: var(--text); text-decoration: none;
}
.admin-nav a:hover, .admin-nav a.active { color: var(--brand); background: var(--brand-soft); }

/* ============ 后台专用（作用域 .page-admin，不影响前台） ============ */
.page-admin { padding-bottom: 40px; }

/* 次级按钮：原本 .btn-line 无定义 → 裸浏览器样式 */
.btn-line {
  display: inline-flex; align-items: center; justify-content: center;
  height: 34px; padding: 0 14px; font: inherit; font-size: 13.5px;
  color: var(--text); background: var(--bg-elev);
  border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer;
  white-space: nowrap; transition: color .18s ease, border-color .18s ease, background-color .18s ease;
}
.btn-line:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }

/* 后台表单：卡片 + 竖排字段（原先 .buy 无 label 布局 → 字段挤行） */
.page-admin .buy, .page-admin .admin-card {
  background: var(--bg-elev); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card); padding: 18px 20px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px; align-items: start;
}
.page-admin .buy > label, .page-admin .admin-form > label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 13px; color: var(--text-soft); min-width: 0;
}
.page-admin .buy > label.is-wide, .page-admin .buy > .field-wide { grid-column: 1 / -1; }
.page-admin .buy input, .page-admin .buy select, .page-admin .buy textarea {
  height: 38px; padding: 0 12px; width: 100%; font: inherit; font-size: 14px; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); outline: none;
  transition: border-color .18s ease;
}
.page-admin .buy textarea { height: auto; padding: 10px 12px; line-height: 1.6; resize: vertical; }
.page-admin .buy input:focus, .page-admin .buy select:focus, .page-admin .buy textarea:focus { border-color: var(--brand); }
.page-admin .buy > button { grid-column: 1 / -1; justify-self: start; }

/* 设置分组：等宽两列文本域拉满 */
.page-admin .buy > label.is-text { grid-column: 1 / -1; }

/* 概览统计：4 列硬编码 → 自适应（6 个块不再 4+2 参差） */
.page-admin .uinfo { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

/* 后台列表行：左侧主信息 + 右侧控件，不再随意换行 */
.page-admin .list { padding: 6px 18px; }
.page-admin .list .row { gap: 10px 12px; padding: 12px 0; }
.page-admin .list .row > * { min-width: 0; }

/* 行内多控件表单（用户/分类）：占满整行，字段并排 */
.page-admin .list .row > form.row-form {
  flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center;
  gap: 10px 14px; color: var(--text);
}
.page-admin .list .row > form.row-form > label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-soft);
}
.page-admin .list .row > form.row-form > label input {
  width: 92px; height: 32px; padding: 0 8px; font-size: 13px;
  color: var(--text); background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); outline: none;
}
.page-admin .list .row > form.row-form > label input:focus { border-color: var(--brand); }
.page-admin .list .row > form.row-form > label input[type=date] { width: 148px; }
.page-admin .list .row > form.row-form > label input[name=newpass] { width: 130px; }
.page-admin .list .row > form.row-form > button { margin-left: auto; }

/* 后台搜索条 */
.page-admin .payform { margin: 0 0 16px; }

/* 后台页头 */
.page-admin .ph { margin: 20px 0 16px; }

/* 移动端：后台表单单列 */
@media (max-width: 760px) {
  .page-admin .buy, .page-admin .admin-card { grid-template-columns: 1fr; }
  .page-admin .list .row > form.row-form { gap: 8px; }
  .page-admin .list .row > form.row-form > button { margin-left: 0; }
}
.admin-card { background: var(--bg-elev); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 18px; margin-top: var(--card-gap); }
.admin-form { display: flex; flex-direction: column; gap: 12px; max-width: 100%; }
table.admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.admin-table th, table.admin-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.admin-table th { color: var(--text-mute); font-weight: 500; font-size: 12.5px; }
table.admin-table tr:last-child td { border-bottom: 0; }
table.admin-table a { color: var(--brand); text-decoration: none; }

/* ============ 后台兼容（老类名） ============ */
.ph { position: relative; margin: 18px 0 14px; padding-left: 13px; font-size: 22px; font-weight: 600; }
.ph::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 4px; height: 20px; border-radius: 2px; background: var(--brand); }
.ph em { font-style: normal; font-size: 13px; font-weight: 400; color: var(--text-mute); margin-left: 8px; }
.sec { position: relative; margin: 26px 0 12px; padding-left: 11px; font-size: 17px; font-weight: 600; }
.sec::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 3px; height: 15px; border-radius: 2px; background: var(--brand); }
.flash.ok { border-left-color: #1a9d4b; }
.buy { background: var(--bg-elev); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 16px; }

/* ============ 响应式 ============ */
@media (min-width: 1280px) { .wrap { padding: 0; } }

@media (max-width: 1120px) {
  .layout-with-aside { grid-template-columns: minmax(0, 1fr) 320px; }
  :root { --aside: 320px; }
  .card-grid6 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .card-grid-big { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .uinfo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-list.is-cols { columns: 2; }
}

@media (max-width: 1000px) {
  .layout-with-aside { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .card-grid, .card-grid-arch, .card-grid6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  /* 导航从顶条内抽出，成为顶条下方的一项全宽下拉 */
  .site-nav {
    order: 99; flex: 1 1 100%;
    flex-direction: column; align-items: stretch; width: 100%;
    max-height: 0; overflow: hidden; gap: 0; transition: max-height .28s ease;
  }
  .site-nav.is-open { max-height: 80vh; overflow-y: auto; padding-bottom: 10px; }
  .site-nav a { padding: 10px 8px; border-radius: 0; border-bottom: 1px solid var(--line); }
  .nav-dd { width: 100%; }
  .nav-dd-btn { width: 100%; justify-content: space-between; padding: 10px 8px; border-radius: 0; border-bottom: 1px solid var(--line); }
  .nav-dd-panel {
    position: static; display: none; min-width: 0; max-height: none; overflow: visible;
    grid-template-columns: 1fr; padding: 4px 0 0 10px; border: 0; box-shadow: none; background: transparent;
  }
  .nav-dd.is-open .nav-dd-panel { display: grid; }
  .topbar-inner { flex-wrap: wrap; padding: 10px 0; gap: 12px; row-gap: 0; }
  /* 2026-09-24 照「时光图册」style.css 同一段补（两站顶栏同源、同一个毛病）：
     ① 基类 .header-actions 是 flex:none（第 93 行）= **不许收缩** —— 顶栏内容一变宽
        就只能整块溢出，把 #themeToggle 推出屏幕（实测 375px 下右边缘 408 > 375）。
     ② 光加省略号没用，必须**先允许收缩**再截断，两步都做。
     用户已定口径：顶栏只显示用户名。⚠️ 绝不要加 flex-wrap —— 换行会把顶栏撑高（用户明确不要）。 */
  .header-actions { flex: 0 1 auto; min-width: 0; }
  .user-bar { min-width: 0; }
  .user-bar a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .search input { width: 132px; }
  .search input:focus { width: 158px; }
  .topbar .btn-primary { display: none; }
  .module-title { font-size: 18px; }
  .module-title .mod-desc, .module-title .mod-sep { display: none; }
  .card-grid, .card-grid-arch, .card-grid-big, .card-grid6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .wrap { padding: 0 14px; }
  .module { margin-top: 26px; }
  .module-title { font-size: 17px; }
  .card-grid, .card-grid-arch, .card-grid-big, .card-grid6 { gap: 12px; }
  .card-body { padding: 9px 10px 11px; }
  .post, .prose { padding: 18px; }
  .post-head h1 { font-size: 21px; }
  .post-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .uinfo { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .footer-links { margin-left: 0; }
  .lightbox { padding: 0 8px; }
  .lightbox-prev, .lightbox-next { width: 40px; height: 40px; margin-top: -20px; }
  .lightbox-prev { left: 2px; }
  .lightbox-next { right: 2px; }
}

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

/* ============ 会员 / 充值（会员中心） ============ */
.panel .tip { margin: 0 0 12px; font-size: 12.5px; line-height: 1.65; color: var(--text-mute); }
.panel .tip b { color: var(--brand); font-weight: 600; }
.vip-tiers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.vip-tier { margin: 0; }
.tier-card {
  width: 100%; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 14px 8px; cursor: pointer; font: inherit; text-align: center;
  background: var(--bg-elev); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .15s, box-shadow .15s;
}
.tier-card:hover { border-color: var(--brand); box-shadow: var(--shadow-card); }
.tier-card .d { font-size: 14px; font-weight: 600; }
.tier-card .p { font-size: 21px; font-weight: 700; color: var(--brand); line-height: 1.22; }
.tier-card .s { font-size: 12px; color: var(--text-mute); }
.rtiers { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.rtier {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 9px 6px; cursor: pointer; font: inherit;
  background: var(--bg-soft); color: var(--text);
  border: 1px solid transparent; border-radius: var(--radius);
  transition: border-color .15s, background .15s;
}
.rtier:hover { border-color: var(--brand); }
.rtier.on { border-color: var(--brand); background: var(--brand-soft); }
.rtier .y { font-size: 13.5px; font-weight: 600; }
.rtier .pt { font-size: 11.5px; color: var(--text-mute); }
#rechargeForm label { display: block; margin: 0 0 12px; font-size: 13px; color: var(--text-soft); }
#rechargeForm input[type=number] {
  width: 100%; height: 38px; margin-top: 5px; padding: 0 12px; font-size: 14px;
  background: var(--bg-elev); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius);
}
#rechargeForm .btn { width: 100%; }
.pay-result {
  margin-bottom: var(--card-gap); padding: 13px 16px; font-size: 14px;
  background: var(--bg-elev); border-radius: var(--radius); box-shadow: var(--shadow-card);
}
.pay-result.ok { color: #1a9d4b; }
.pay-result.err { color: var(--danger); }

/* ============ 会员中心（/user）—— 结构照「时光图册」/u/ 抄 ============ */
/* 单列窄栏 + panel 堆叠；类名沿用参照站的 .kv / .tiers / .tier，全部收在 .uc 作用域内，
   避免与前台的 .card-* / .rtier 等规则互相牵连。 */
.uc { max-width: 900px; margin: 22px auto; padding: 0 16px; }
.uc h1 {
  position: relative; margin: 0 0 16px; padding-left: 13px;
  font-size: 22px; font-weight: 600;
}
.uc h1::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; border-radius: 2px; background: var(--brand);
}
.uc .kv { display: flex; gap: 22px; flex-wrap: wrap; margin: 0 0 6px; font-size: 14px; }
.uc .kv b { color: var(--brand); }
.uc .uc-note { margin: 12px 0 0; font-size: 13.5px; color: var(--text-soft); }
.uc .uc-note b { color: var(--text); }
.uc .panel + .panel { margin-top: 14px; }
.uc .panel-title { font-size: 16px; }
.uc .tiers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.uc .tiers.tiers-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.uc .tier-form { margin: 0; }
.uc .tier {
  display: block; width: 100%; height: auto; padding: 14px; cursor: pointer;
  font: inherit; text-align: center; color: var(--text);
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.uc .tier:hover { border-color: var(--brand); }
.uc .tier.on { border-color: var(--brand); background: var(--brand-soft); }
.uc .tier .d { display: block; font-size: 15px; font-weight: 600; }
.uc .tier .p { display: block; margin: 6px 0 2px; font-size: 18px; font-weight: 700; color: var(--brand); }
.uc .tier .s { display: block; font-size: 12px; line-height: 1.55; color: var(--text-soft); }
.uc .rrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.uc .rrow > span { font-size: 13.5px; }
.uc .rrow input[type=number] {
  width: 150px; height: 38px; padding: 0 12px; font-size: 14px;
  color: var(--text); background: var(--bg-elev);
  border: 1px solid var(--line); border-radius: var(--radius); outline: none;
}
.uc .uc-h4 { margin: 18px 0 8px; font-size: 14px; font-weight: 600; }
.uc .panel-title + .uc-h4 { margin-top: 4px; }
.uc .uc-empty { margin: 0; font-size: 13px; color: var(--text-soft); }
.uc table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.uc th, .uc td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--line); }
.uc th { font-weight: 600; color: var(--text-soft); background: var(--bg-soft); }
.uc td a { color: var(--brand); text-decoration: none; }
.uc td a:hover { text-decoration: underline; }
.uc .uc-foot { margin: 14px 0 0; font-size: 13px; }
.uc .uc-foot a { color: var(--text-soft); }
.uc .uc-foot .btn-primary { color: #fff; }
@media (max-width: 760px) {
  .uc .tiers { grid-template-columns: 1fr 1fr; }
  .uc .tiers.tiers-2 { grid-template-columns: 1fr; }
}

/* 文章页底部友情链接横幅（图片 2000×425，见 static/img/friend-tuhai88-2000.webp）。
   独占正文卡末尾一行，铺满主列宽度；图自带底色 → 亮/暗主题都不用改。 */
.post-friend {
  display: block; margin: 20px 0 0; border-radius: var(--radius);
  overflow: hidden; transition: opacity .18s ease;
}
.post-friend:hover { opacity: .88; }
.post-friend img { display: block; width: 100%; height: auto; }

/* 首页公告弹窗（每日一次） */
.notice-pop { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.notice-pop[hidden] { display: none; }
.notice-mask { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); }
.notice-card { position: relative; width: min(92vw, 420px); background: var(--bg-elev); color: var(--text); border-radius: var(--radius-lg); box-shadow: 0 10px 40px rgba(0, 0, 0, .28); padding: 24px 22px 20px; text-align: center; }
.notice-close { position: absolute; top: 6px; right: 10px; border: 0; background: transparent; color: var(--text-mute); font-size: 18px; line-height: 1; cursor: pointer; }
.notice-close:hover { color: var(--text); }
.notice-title { margin: 0 0 12px; font-size: 17px; font-weight: 700; }
.notice-body { font-size: 14px; line-height: 1.95; color: var(--text-soft); margin-bottom: 18px; }
.notice-body p { margin: 0; }
.notice-btn { min-width: 140px; }

/* 仅供屏幕阅读器/SEO 的隐藏标题（视觉上不占位、不可见） */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
