/* ============================================================================
 * 三角洲ARG档案馆 · 页面级组件
 * 首页 / 筛选栏 / 解密网站 / 更新日志 / 辟谣 / 特别鸣谢 / 搜索层 / 404
 * ========================================================================== */

/* ------------------------------------------------------------------ 页面标题 */

.page-intro { margin-bottom: 8px; }
.page-title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-title-row .page-title { margin-bottom: 0; }
.page-title-action { flex: none; }
.page-title { font-size: 26px; margin-bottom: 8px; }
.page-desc { color: var(--text-secondary); font-size: 15px; max-width: 70ch; }
.page-footnote { margin-top: 22px; color: var(--text-muted); font-size: 13px; }

/* ------------------------------------------------------------------ 首页 Hero */

.hero {
  padding: 34px 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background:
    radial-gradient(120% 140% at 0% 0%, var(--accent-soft) 0%, transparent 55%),
    var(--surface);
  box-shadow: var(--shadow-sm);
  margin-bottom: 34px;
}
.hero-eyebrow { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.hero-title { font-size: 30px; letter-spacing: -0.01em; margin-bottom: 10px; }
.hero-subtitle { color: var(--text-secondary); font-size: 15.5px; max-width: 62ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
@media (min-width: 760px) { .hero { padding: 44px 34px; } .hero-title { font-size: 36px; } }

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

.stats-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.stat-card {
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text); box-shadow: var(--shadow-sm);
  transition: transform var(--transition), border-color var(--transition);
}
.stat-card:hover { transform: translateY(-3px); border-color: var(--accent); color: var(--text); }
.stat-icon { color: var(--accent); }
.stat-number { font-size: 28px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--text-muted); font-size: 13px; }

/* ------------------------------------------------------------------ 快捷入口卡片 */

.feature-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 18px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text); box-shadow: var(--shadow-sm);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.feature-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow); color: var(--text); }
.feature-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 4px;
}
.feature-title { font-size: 16.5px; font-weight: 650; }
.feature-desc { color: var(--text-secondary); font-size: 13.5px; line-height: 1.7; flex: 1 1 auto; }
.feature-more { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); font-size: 13px; font-weight: 600; }

/* ------------------------------------------------------------------ 迷你列表（首页） */

.mini-list { display: flex; flex-direction: column; }
.mini-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 4px; border-bottom: 1px solid var(--border);
}
.mini-item:last-child { border-bottom: 0; }
.mini-item-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 auto; color: var(--text); }
.mini-item-main:hover .mini-item-title { color: var(--accent); }
.mini-item-date { font-family: var(--mono); font-size: 12px; color: var(--text-muted); }
.mini-item-title { font-size: 14.5px; }
.mini-item-chips { flex: none; }

.about-card p { color: var(--text-secondary); }
.about-extra { margin-top: 10px; }
.about-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border);
  color: var(--text-muted); font-size: 12.5px; font-family: var(--mono);
}
.about-meta .icon { color: var(--text-muted); }

/* ------------------------------------------------------------------ 筛选栏 */

.filter-bar {
  display: flex; flex-direction: column; gap: 12px;
  padding: 14px; margin: 18px 0 20px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-sm);
}
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.filter-row--primary { gap: 8px; }
.filter-row--primary .field--search { flex: 1 1 260px; }
.filter-count { color: var(--text-muted); font-size: 12.5px; }
.filter-count::before { content: "·"; margin-right: 6px; opacity: 0.5; }

/* ------------------------------------------------------------------ 解密网站 */

.decrypt-list { display: flex; flex-direction: column; gap: 18px; }
.decrypt-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden;
}
.decrypt-media {
  display: block; width: 100%;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}
.decrypt-media img { display: block; width: 100%; height: auto; }
.decrypt-body { padding: 18px 22px 22px; display: flex; flex-direction: column; gap: 12px; }
.decrypt-body > * { margin: 0; }
.decrypt-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.decrypt-name { font-size: 19px; }
.decrypt-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.decrypt-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.decrypt-desc { color: var(--text-secondary); font-size: 14.5px; }
.decrypt-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding-top: 2px;
}
.decrypt-url {
  font-size: 12.5px; color: var(--text-muted);
  background: var(--surface-2); padding: 4px 9px; border-radius: 6px;
  border: 1px solid var(--border); word-break: break-all;
}
.decrypt-section { padding-top: 14px; border-top: 1px solid var(--border); }
.decrypt-section-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 14.5px; margin-bottom: 9px; color: var(--text-secondary);
}
.decrypt-section-title .icon { color: var(--accent); }

/* ------------------------------------------------------------------ 数据表格 */

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table th, .data-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.data-table th { background: var(--surface-2); color: var(--text-muted); font-weight: 600; white-space: nowrap; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table code { color: var(--accent); }

/* ------------------------------------------------------------------ 复制行 */

.copy-list { display: flex; flex-direction: column; gap: 10px; }
.copy-row {
  padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.copy-row--sample { border-style: dashed; }
.copy-row-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.copy-row-label { font-size: 13.5px; color: var(--text-secondary); }
.copy-row-body { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.copy-row-value {
  flex: 1 1 auto; min-width: 0;
  padding: 8px 11px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font-size: 13.5px; word-break: break-all;
}
.copy-row-note { margin-top: 8px; color: var(--text-muted); font-size: 12.5px; }

/* ------------------------------------------------------------------ 更新日志 */

.changelog { display: flex; flex-direction: column; gap: 0; position: relative; }
.release {
  display: grid; grid-template-columns: 34px 1fr; gap: 14px;
  padding-bottom: 20px; position: relative;
}
.release::before {
  content: ""; position: absolute; left: 16px; top: 30px; bottom: 0;
  width: 2px; background: var(--border);
}
.release:last-child::before { display: none; }
.release-marker {
  width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-muted);
}
.release--latest .release-marker { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.release-body {
  padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-sm);
}
.release--latest .release-body { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.release-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.release-version { font-family: var(--mono); font-size: 16px; font-weight: 700; }
.release-date { font-family: var(--mono); font-size: 12.5px; color: var(--text-muted); margin-left: auto; }
.release-relative { font-size: 12px; color: var(--text-muted); }
.release-changes { display: flex; flex-direction: column; gap: 6px; }
.release-changes li { display: flex; gap: 8px; align-items: flex-start; color: var(--text-secondary); font-size: 14px; }
.release-changes li .icon { color: var(--accent); margin-top: 4px; }
.release-tags { margin-top: 10px; }
@media (max-width: 560px) {
  .release { grid-template-columns: 1fr; }
  .release-marker { display: none; }
  .release::before { display: none; }
  .release-date { margin-left: 0; }
}

.roadmap-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.roadmap-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px; border: 1px dashed var(--border-strong); border-radius: var(--radius);
  background: var(--surface);
}
.roadmap-index { font-family: var(--mono); font-size: 18px; color: var(--accent); opacity: 0.7; }
.roadmap-title { display: block; font-weight: 650; font-size: 14.5px; }
.roadmap-desc { display: block; margin-top: 4px; color: var(--text-secondary); font-size: 13px; }

/* ------------------------------------------------------------------ 辟谣 */

.rumor-list { display: flex; flex-direction: column; gap: 12px; }
.rumor {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden;
}
.rumor[open] { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.rumor-summary {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; cursor: pointer; list-style: none;
}
.rumor-summary::-webkit-details-marker { display: none; }
.verdict {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; white-space: nowrap; flex: none;
}
.verdict--false { background: var(--danger-soft); color: var(--danger); }
.verdict--partial { background: var(--warn-soft); color: var(--warn); }
.verdict--true { background: var(--ok-soft); color: var(--ok); }
.verdict--unknown { background: var(--bg-soft); color: var(--text-muted); }
.rumor-claim { flex: 1 1 auto; font-size: 15px; font-weight: 550; }
.rumor-toggle { color: var(--text-muted); transition: transform var(--transition); flex: none; }
.rumor[open] .rumor-toggle { transform: rotate(180deg); }
.rumor-body {
  padding: 4px 16px 18px; display: flex; flex-direction: column; gap: 14px;
  border-top: 1px solid var(--border);
}
.rumor-block { padding-top: 12px; }
.rumor-block h3 {
  display: flex; align-items: center; gap: 7px;
  font-size: 14px; color: var(--text-secondary); margin-bottom: 7px;
}
.rumor-block h3 .icon { color: var(--accent); }
.rumor-block p { color: var(--text); font-size: 14.5px; line-height: 1.8; }
.source-list { display: flex; flex-direction: column; gap: 5px; }
.source-list li { color: var(--text-secondary); font-size: 13.5px; padding-left: 14px; position: relative; }
.source-list li::before { content: "·"; position: absolute; left: 4px; color: var(--accent); }
.source-list li.source-item--image { padding-left: 0; }
.source-list li.source-item--image::before { display: none; }
.source-image {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface-2);
  color: var(--accent); font-size: 13px; cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.source-image:hover { border-color: var(--accent); background: var(--accent-soft); }
.source-image .icon { color: var(--accent); }

/* 图片气泡（点击「相关图片一 / 二」弹出） */
.image-pop {
  position: fixed; z-index: 200; left: 0; top: 0;
  min-width: 240px; max-width: min(92vw, 720px);
  padding: 10px 10px 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(6px) scale(0.98);
  transition: opacity 160ms ease, transform 160ms ease;
}
.image-pop.open { opacity: 1; transform: none; }
.image-pop img {
  display: block; width: auto; height: auto;
  max-width: min(88vw, 700px); max-height: 66vh;
  border-radius: calc(var(--radius) - 6px);
  background: var(--bg-soft);
}
.image-pop-caption { margin: 8px 2px 0; color: var(--text-muted); font-size: 12.5px; text-align: center; }

.rumor-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding-top: 12px; border-top: 1px solid var(--border);
  color: var(--text-muted); font-size: 12.5px;
}
.rumor-meta time { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); }

/* ------------------------------------------------------------------ 特别鸣谢 */

.oss-list { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.oss-card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 16px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), transform var(--transition);
}
.oss-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.oss-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.oss-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent);
}
.oss-name { font-size: 16px; }
.oss-version { font-family: var(--mono); font-size: 12px; color: var(--text-muted); }
.oss-meta { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px solid var(--border); }
.oss-meta li { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-secondary); }
.oss-meta li .icon { color: var(--text-muted); }
.oss-meta code { font-size: 12px; color: var(--text-muted); }

.source-list-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.source-card {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface);
}
.source-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: var(--info-soft); color: var(--info);
}
.source-name { font-weight: 620; font-size: 14.5px; display: block; }
.source-note { color: var(--text-secondary); font-size: 13px; margin-top: 4px; }
.source-link { display: inline-flex; align-items: center; gap: 5px; margin-top: 7px; font-size: 12.5px; word-break: break-all; }

.people-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.person-card {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 18px 12px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); text-align: center;
  transition: border-color var(--transition), transform var(--transition);
}
.person-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.person-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 50%; overflow: hidden; flex: none;
  background: var(--accent-soft); color: var(--accent);
  font-size: 22px; font-weight: 700;
}
.person-avatar img { width: 100%; height: 100%; object-fit: cover; }
.person-name { font-weight: 620; font-size: 14.5px; line-height: 1.4; }
.person-link {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 2px; padding: 3px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 12.5px; font-weight: 550;
}
.person-link:hover { background: var(--accent); color: var(--accent-contrast); }

/* ------------------------------------------------------------------ 404 */

.notfound { text-align: center; padding: 60px 16px; }
.notfound-code { font-family: var(--mono); font-size: 56px; color: var(--accent); opacity: 0.8; }
.notfound-title { font-size: 24px; margin: 8px 0 10px; }
.notfound-desc { color: var(--text-secondary); max-width: 46ch; margin: 0 auto 22px; }
.notfound .hero-actions { justify-content: center; }

/* ------------------------------------------------------------------ 四叶与小罗 · 动态（图文） */

/* ------------------------------------------------------------------ 后台备份 · 文件浏览 */

/* 「查看备份」与「打开链接」同行，靠右对齐 */
.decrypt-actions .btn--backup { margin-left: auto; }

.backup-app {
  display: grid; gap: 16px; margin-top: 20px;
  grid-template-columns: minmax(220px, 300px) 1fr;
  align-items: start;
}
.backup-back { display: none; }
.backup-hint--side { display: none; }

/* ------------------------------------------------------------------ 手机端（≤760px）单独适配
   电脑端保持左右两栏；手机端改为「目录 → 文件」两步式：一次只显示一栏，
   选中文件后整屏看文件，顶部出现「返回目录」。 */
@media (max-width: 760px) {
  .backup-app { grid-template-columns: 1fr; gap: 12px; }
  .backup-app.is-viewing .backup-side { display: none; }
  .backup-app:not(.is-viewing) .backup-view { display: none; }

  .backup-side-head { padding: 13px 14px; }
  .backup-meta { padding: 9px 14px 0; }
  .backup-hint--side { display: block; padding: 4px 14px 0; text-align: left; }
  .backup-tree { max-height: none; overflow: visible; padding: 10px 10px 14px; }
  .bt-folder > details > summary { padding: 12px 10px; font-size: 14.5px; }
  .bt-children { margin-left: 10px; padding-left: 12px; }
  .bt-file { padding: 12px 10px; font-size: 14px; }
  .bt-count { font-size: 11.5px; padding: 2px 8px; }

  .backup-view { min-height: 0; }
  .backup-view-head { flex-wrap: wrap; gap: 8px; padding: 10px 12px; font-size: 12px; }
  .backup-back {
    display: inline-flex; align-items: center; gap: 6px;
    margin-right: 2px; padding: 7px 12px;
    border: 1px solid var(--border); border-radius: 999px;
    background: var(--surface); color: var(--accent);
    font-family: var(--font); font-size: 13px; cursor: pointer;
  }
  .backup-back .icon { color: var(--accent); }
  .backup-view-body { padding: 12px; }
  .backup-text { min-height: 58vh; font-size: 13.5px; }
  .backup-image-frame { min-height: 52vh; }
  .backup-placeholder { padding: 28px 12px; }
}

.backup-side {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.backup-side-head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
  font-weight: 620; font-size: 14px;
}
.backup-side-head .icon { color: var(--accent); }
.backup-meta { padding: 8px 14px 0; color: var(--text-muted); font-size: 12px; }
.backup-tree { padding: 8px 8px 12px; max-height: 60vh; overflow: auto; }
.bt-folder > details > summary {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 8px; border-radius: var(--radius-sm);
  cursor: pointer; list-style: none; font-size: 13.5px; font-weight: 600;
}
.bt-folder > details > summary::-webkit-details-marker { display: none; }
.bt-folder > details > summary:hover { background: var(--bg-soft); }
.bt-folder > details > summary .icon { color: var(--warn); }
.bt-count {
  margin-left: auto; font-family: var(--mono); font-size: 11px;
  color: var(--text-muted); background: var(--bg-soft);
  padding: 1px 7px; border-radius: 999px;
}
.bt-children { padding-left: 14px; border-left: 1px dashed var(--border); margin: 2px 0 6px 12px; }
.bt-file {
  display: flex; align-items: center; gap: 7px; width: 100%;
  padding: 6px 8px; border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--text-secondary);
  font-size: 13px; text-align: left; cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.bt-file:hover { background: var(--bg-soft); color: var(--text); }
.bt-file.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.bt-file .icon { flex: none; }
.bt-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bt-note { margin-left: auto; color: var(--text-muted); display: inline-flex; }

.backup-view {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-sm);
  min-height: 340px; display: flex; flex-direction: column; overflow: hidden;
}
.backup-view-head {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 14px; border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  font-family: var(--mono); font-size: 12.5px; color: var(--text-secondary);
  word-break: break-all;
}
.backup-view-head .icon { color: var(--accent); flex: none; }
.backup-view-body { flex: 1 1 auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.backup-placeholder {
  flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; color: var(--text-muted); text-align: center; padding: 40px 16px;
}
.backup-placeholder .icon { opacity: 0.5; }
.backup-text {
  flex: 1 1 auto; min-height: 200px; margin: 0; padding: 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--text);
  font-family: var(--mono); font-size: 13px; line-height: 1.7;
  white-space: pre-wrap; word-break: break-word; overflow: auto;
}
.backup-text:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.backup-image-frame {
  flex: 1 1 auto; min-height: 240px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  border: 1px dashed var(--border-strong); border-radius: var(--radius);
  background: repeating-conic-gradient(var(--surface-2) 0% 25%, var(--surface) 0% 50%) 50% / 24px 24px;
  color: var(--text-muted);
}
.backup-hint { color: var(--text-muted); font-size: 12.5px; text-align: center; }
.backup-note {
  display: flex; align-items: center; gap: 6px; margin: 0;
  padding: 9px 12px; border-radius: var(--radius-sm);
  background: var(--info-soft); color: var(--text-secondary); font-size: 12.5px;
}
.backup-note .icon { color: var(--info); flex: none; }

/* ------------------------------------------------------------------ 四叶与小罗 · 动态流 */

/* ------------------------------------------------------------------ 四叶与小罗 · 动态（图文 / 视频） */

/* ------------------------------------------------------------------ 四叶与小罗 · 动态（图文 / 视频） */

.posts-grid {
  display: grid; gap: 16px; margin-top: 18px;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
}
.post-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  color: var(--text); box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.post-card:hover {
  transform: translateY(-3px); color: var(--text);
  box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}
.post-card-media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-soft); border-bottom: 1px solid var(--border); }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; }
/* 纯文本动态：图片位显示一段正文 */
.post-card-textmedia {
  width: 100%; height: 100%; padding: 16px 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px;
  text-align: center; color: var(--text-secondary); font-size: 13px; line-height: 1.75;
  background: linear-gradient(160deg, var(--surface-2), var(--bg-soft));
}
.post-card-textmedia > span {
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card-textmedia .icon { color: var(--accent); opacity: 0.75; }

.post-card-placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  color: var(--text-muted); font-size: 12.5px;
  background: repeating-conic-gradient(var(--surface-2) 0% 25%, var(--surface) 0% 50%) 50% / 24px 24px;
}
.post-card-video {
  position: absolute; left: 10px; bottom: 10px;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px;
  background: rgba(9, 18, 33, 0.62); color: #fff; font-size: 12px;
  backdrop-filter: blur(4px);
}
.post-card-body { display: flex; flex-direction: column; gap: 7px; padding: 14px; flex: 1 1 auto; }
.post-card-meta { display: flex; align-items: center; gap: 8px; }
.post-card-date,
.post-card-time { font-family: var(--mono); font-size: 12px; color: var(--text-muted); }
.post-card-time { opacity: 0.8; }
.post-card-title {
  font-size: 16.5px; font-weight: 650; min-height: 1.4em;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card-text {
  color: var(--text-secondary); font-size: 13.5px; line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  min-height: calc(1.7em * 3);      /* 预留三行，短文也不塌陷 → 卡片等高 */
}
.post-card-more { margin-top: auto; padding-top: 6px; display: inline-flex; align-items: center; gap: 5px; color: var(--accent); font-size: 13px; font-weight: 600; }

.post-detail { display: flex; flex-direction: column; gap: 16px; margin-top: 6px; }
.post-head { display: flex; flex-direction: column; gap: 9px; }
.post-head-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-family: var(--mono); font-size: 12.5px; color: var(--text-muted); }
.post-relative { font-family: var(--font); font-size: 12px; }
.post-time { font-family: var(--mono); font-size: 12.5px; color: var(--text-muted); }
.post-title { font-size: 26px; }
.post-title--plain { font-family: var(--mono); font-size: 22px; font-weight: 600; }
.post-body { display: flex; flex-direction: column; gap: 10px; color: var(--text-secondary); font-size: 15.5px; line-height: 1.9; }

.post-video {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: #000;
}
.post-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* 多图动态：横向滑动看图器（原生 scroll-snap，手机上直接左右滑） */
.post-gallery { display: flex; flex-direction: column; gap: 10px; }
.post-gallery-track {
  display: flex; gap: 10px;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding-bottom: 4px;
}
.post-gallery-item {
  flex: 0 0 100%; margin: 0; scroll-snap-align: center;
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: var(--surface-2);
}
.post-gallery-item img {
  display: block; width: 100%; max-height: 72vh;
  object-fit: contain; margin: 0 auto;
}
.post-gallery-bar { display: flex; align-items: center; justify-content: center; gap: 14px; }
.post-gallery-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  cursor: pointer; transition: border-color var(--transition), color var(--transition), opacity var(--transition);
}
.post-gallery-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.post-gallery-btn:disabled { opacity: 0.4; cursor: default; }
.post-gallery-count { font-family: var(--mono); font-size: 12.5px; color: var(--text-muted); min-width: 62px; text-align: center; }

.post-figures { display: flex; flex-direction: column; gap: 12px; }
.post-figure { margin: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.post-figure img { display: block; width: 100%; height: auto; }
.post-figure figcaption { padding: 9px 12px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-muted); text-align: center; }
.post-figure-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 260px; color: var(--text-muted); font-size: 13px;
  background: repeating-conic-gradient(var(--surface-2) 0% 25%, var(--surface) 0% 50%) 50% / 24px 24px;
}

.post-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 2px 0 0; }
.post-url {
  font-size: 12.5px; color: var(--text-muted);
  background: var(--surface-2); padding: 4px 9px; border-radius: 6px;
  border: 1px solid var(--border); word-break: break-all;
}
@media (max-width: 600px) { .post-title { font-size: 22px; } .post-body { font-size: 15px; } }

/* ------------------------------------------------------------------ 手机端适配（≤620px）
   四叶与小罗的动态、解密网站的站点卡：大图竖排 → 横向紧凑行 / 收紧内边距。 */
@media (max-width: 620px) {
  /* 四叶与小罗 · 动态列表 */
  .posts-grid { grid-template-columns: 1fr; gap: 12px; margin-top: 14px; }
  .post-card { flex-direction: row; align-items: stretch; }
  .post-card:hover { transform: none; }
  .post-card-media {
    width: 108px; flex: none; aspect-ratio: 1 / 1;
    border-bottom: 0; border-right: 1px solid var(--border);
  }
  .post-card-placeholder span { display: none; }         /* 窄图位只留图标，不放文字 */
  .post-card-textmedia { padding: 8px; gap: 5px; font-size: 11px; line-height: 1.6; }
  .post-card-textmedia > span { -webkit-line-clamp: 3; }
  .post-card-textmedia .icon { width: 15px; height: 15px; }
  .post-card-video { left: 6px; bottom: 6px; padding: 2px 7px; font-size: 11px; }
  .post-card-body { padding: 11px 13px; gap: 5px; }
  .post-card-meta { gap: 6px; }
  .post-card-date, .post-card-time { font-size: 11.5px; }
  .post-card-title { font-size: 15px; }
  .post-card-title { font-size: 15px; min-height: 1.4em; }
  .post-card-text { font-size: 13px; -webkit-line-clamp: 2; min-height: calc(1.7em * 2); }
  .post-card-more { padding-top: 2px; font-size: 12.5px; }

  /* 动态详情 */
  .post-detail { gap: 14px; }
  .post-title { font-size: 21px; }
  .post-title--plain { font-size: 18px; }
  .post-body { font-size: 15px; line-height: 1.85; }
  .post-figure-empty { min-height: 200px; }
  .post-gallery-track { gap: 8px; }
  .post-gallery-item img { max-height: 60vh; }
  .post-gallery-btn { width: 32px; height: 32px; }
  /* 动态详情同理：按钮一行，原文地址条另起一行 */
  .post-actions { flex-wrap: wrap; gap: 8px; }
  .post-actions .btn { flex: none; }
  .post-actions .post-url { flex: 1 0 100%; font-size: 11.5px; }

  /* 解密网站 · 站点卡 */
  .page-title { font-size: 22px; }
  .decrypt-list { gap: 14px; }
  .decrypt-body { padding: 14px 16px 16px; gap: 10px; }
  .decrypt-title-row { gap: 8px; }
  .decrypt-name { font-size: 17px; }
  .decrypt-chips { gap: 5px; }
  .decrypt-desc { font-size: 13.5px; }
  /* 「打开链接」与「查看备份」必须同处一行：按钮不压缩，网址条排到下一行 */
  .decrypt-actions { flex-wrap: wrap; gap: 8px; }
  .decrypt-actions .btn { flex: none; }
  .decrypt-actions .btn--backup { order: 2; }
  .decrypt-actions .decrypt-url { order: 3; flex: 1 0 100%; }
  .decrypt-actions .btn { min-height: 36px; padding: 0 13px; font-size: 13.5px; }
  .decrypt-url { font-size: 11.5px; }
  .decrypt-section-title { font-size: 13.5px; }
  .data-table { font-size: 12.5px; }
  .data-table th, .data-table td { padding: 8px 10px; }
  .copy-row { padding: 10px 12px; }
  .copy-row-value { font-size: 12.5px; }
  .page-footnote { font-size: 12px; }
}

/* ------------------------------------------------------------------ 后台备份 · 文档正文
   小节标题 / 段落 / 列表 / 表格，配色与站点统一（强调色表头 + 斑马纹 + 首列加重）。 */

.backup-doc { display: flex; flex-direction: column; gap: 14px; }
.backup-doc[hidden], .backup-slot[hidden], .backup-notes[hidden], .backup-placeholder[hidden] { display: none !important; }
.backup-slot { display: flex; flex-direction: column; gap: 10px; }
.backup-notes { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }

.doc-title {
  margin: 0; padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-soft);
  font-size: 19px; line-height: 1.5; color: var(--text);
}

.doc-heading {
  display: flex; align-items: center; gap: 9px;
  margin: 10px 0 0; font-size: 15.5px; color: var(--text);
}
.doc-heading::before {
  content: ""; flex: none; width: 4px; height: 15px;
  border-radius: 2px; background: var(--accent);
}

.doc-paragraph {
  margin: 0; color: var(--text-secondary);
  font-size: 14.5px; line-height: 2.05;
  text-align: justify;
}

/* 多行段落（日记这类保留作者换行的正文）：行内紧排，段落之间才有间距 */
.doc-lines { display: flex; flex-direction: column; color: var(--text-secondary); font-size: 14.5px; line-height: 2.05; }
.doc-lines p { margin: 0; }

/* 备份里的实拍图 / 扫描件 */
.backup-figure { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.backup-figure img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface-2);
}
.backup-figure figcaption {
  font-size: 12.5px; color: var(--text-muted); text-align: center;
  font-family: var(--mono);
}

/* 等宽代码块（读数 / 公式一类的文本） */
.doc-code {
  margin: 0; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface-2); color: var(--text);
  font-family: var(--mono); font-size: 13px; line-height: 1.95;
  white-space: pre-wrap; word-break: break-word;
}

/* 引用块 */
.doc-quote {
  margin: 0; padding: 11px 14px;
  border-left: 3px solid color-mix(in srgb, var(--accent) 55%, transparent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--surface-2); color: var(--text-secondary);
  font-size: 14.5px; line-height: 1.95;
}

/* 元信息块（私密文件代号 / 雇员编号 / 岗位） */
.doc-meta {
  display: flex; flex-direction: column; gap: 5px;
  padding: 11px 14px; border: 1px dashed var(--border);
  border-radius: var(--radius); background: var(--surface-2);
  color: var(--text-secondary); font-size: 13.5px; line-height: 1.7;
}
.doc-meta p { margin: 0; }
.doc-meta .doc-meta-tag {
  color: var(--accent); font-weight: 650; font-family: var(--mono);
  letter-spacing: 0.02em;
}

.doc-list { display: flex; flex-direction: column; gap: 9px; }
.doc-list li {
  position: relative; padding-left: 19px;
  color: var(--text-secondary); font-size: 14.5px; line-height: 1.9;
}
.doc-list li::before {
  content: ""; position: absolute; left: 5px; top: 0.72em;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
}

/* 文档内表格：整体包一层圆角边框，表头用强调色浅底 */
.doc-table {
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden auto; background: var(--surface);
}
.doc-table .data-table { border-collapse: separate; border-spacing: 0; }
.doc-table .data-table th {
  background: var(--accent-soft); color: var(--accent);
  font-weight: 650; letter-spacing: 0.01em;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
}
.doc-table .data-table td {
  color: var(--text-secondary); line-height: 1.75;
  border-bottom: 1px solid var(--border);
}
.doc-table .data-table tbody tr:nth-child(even) { background: var(--surface-2); }
.doc-table .data-table tbody tr:last-child td { border-bottom: 0; }
.doc-table .data-table td:first-child { color: var(--text); font-weight: 600; }
.doc-table .data-table th:first-child,
.doc-table .data-table td:first-child { width: 30%; min-width: 96px; }

/* 手机端：字号与间距略收，首列不再强制一行 */
@media (max-width: 620px) {
  .backup-doc { gap: 12px; }
  .doc-title { font-size: 16.5px; padding-bottom: 10px; }
  .doc-heading { font-size: 14.5px; margin-top: 8px; }
  .doc-heading::before { height: 14px; }
  .doc-paragraph { font-size: 14px; line-height: 1.95; }
  .doc-lines { font-size: 14px; line-height: 2; }
  .doc-meta { padding: 10px 12px; font-size: 13px; }
  .doc-code { padding: 10px 12px; font-size: 12px; line-height: 1.9; }
  .doc-quote { padding: 10px 12px; font-size: 14px; }
  .doc-list li { font-size: 13.5px; padding-left: 17px; }
  .doc-table .data-table { font-size: 12.5px; }
  .doc-table .data-table th, .doc-table .data-table td { padding: 8px 10px; }
  .doc-table .data-table th:first-child,
  .doc-table .data-table td:first-child { width: 36%; min-width: 72px; }
}
