/* =============================================================================
 * Murmur · 样式
 * 移动端优先，内容区 max-width 700px 居中；深色模式走 prefers-color-scheme。
 * 所有颜色集中在 :root 的 CSS 变量里，方便后续换肤。
 * ========================================================================== */

:root {
  color-scheme: light dark;

  /* 暖中性色：比冷灰更有纸张感，长时间阅读不刺眼 */
  --bg: #f7f6f4;
  --bg-elev: #ffffff;
  --bg-soft: #f0eeeb;
  --text: #1c1917;
  --text-soft: #6b6560;
  --text-faint: #9a938c;
  --border: #e8e4df;
  --accent: #2563eb;
  --accent-soft: #eff4ff;
  --on-accent: #ffffff;
  --pin: #d97706;
  --pin-soft: #fef6e7;
  --danger: #dc2626;

  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 700px;
  --shadow: 0 1px 2px rgba(28, 25, 23, .04), 0 10px 30px -18px rgba(28, 25, 23, .22);
  --shadow-hover: 0 2px 4px rgba(28, 25, 23, .05), 0 18px 40px -20px rgba(28, 25, 23, .3);

  /* 字体栈抽成变量，方便 config.yaml 的 custom.font_family 覆盖 */
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0e0d;
    --bg-elev: #1a1816;
    --bg-soft: #24211e;
    --text: #e8e5e1;
    --text-soft: #a8a19a;
    --text-faint: #7a736c;
    --border: #2e2a26;
    --accent: #7aa2ff;
    --accent-soft: #1a2338;
    --on-accent: #0b1220;
    --pin: #fbbf24;
    --pin-soft: #2a2110;
    --danger: #f87171;

    --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 14px 34px -18px rgba(0, 0, 0, .9);
    --shadow-hover: 0 2px 6px rgba(0, 0, 0, .6), 0 22px 48px -20px rgba(0, 0, 0, 1);
  }
}

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

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

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  /* 兜底：任何子元素意外撑宽都不产生横向滚动 */
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

#app { min-height: 62vh; padding-bottom: 8px; }

/* ------------------------------ 图标 ------------------------------ */

/* Lucide sprite 容器：不占位，但保留 symbol 可被 <use> 引用 */
.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 1em;
  height: 1em;
  vertical-align: -.125em;
}

.icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.brand .icon { width: 18px; height: 18px; }
.btn .icon { width: 16px; height: 16px; }
.empty-icon .icon { width: 40px; height: 40px; }
.state-icon .icon { width: 36px; height: 36px; }

/* ------------------------------ 页头 ------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 65%, transparent);
}

.site-header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding-top: 6px;
  padding-bottom: 6px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  color: var(--text);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.015em;
  text-decoration: none;
  white-space: nowrap;
}

.site-sub {
  margin-left: auto;
  color: var(--text-faint);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --------------------------- 顶部进度条 --------------------------- */

.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 60;
  overflow: hidden;
  pointer-events: none;
}

.progress-bar {
  display: block;
  width: 40%;
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  animation: progress-slide 1.1s ease-in-out infinite;
}

@keyframes progress-slide {
  0%   { transform: translateX(-110%); }
  100% { transform: translateX(260%); }
}

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

/* 两行筛选收进一个浅色面板：有边界、有层次，不再是一排孤零零的胶囊 */
.filter-bar {
  display: flex;
  flex-direction: column;
  margin: 18px 0 18px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-elev);
  box-shadow: var(--shadow);
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 8px 0;
}

.filter-row + .filter-row {
  border-top: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
}

.filter-row-label {
  flex: 0 0 30px;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  line-height: 1;
}

.filter-row .chips {
  flex: 1 1 auto;
  min-width: 0;
  margin-top: 0;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.filter-row .chips::-webkit-scrollbar { display: none; }

/* nowrap 横向滚动时 chip 不允许被压缩 */
.filter-row .chip { flex: 0 0 auto; }

/* 筛选 chip：视觉 30px 的小方块，触控区用伪元素撑到 44px */
.filter-row .chip {
  position: relative;
  min-height: 30px;
  padding: 0 11px;
  border-color: transparent;
  border-radius: 9px;
  /* 极淡的底，让「可点」这件事看得出来，又不抢视线 */
  background: color-mix(in srgb, var(--bg-soft) 62%, transparent);
  color: var(--text-soft);
  font-size: 12.5px;
  font-weight: 500;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease;
}

.filter-row .chip::after {
  content: "";
  position: absolute;
  inset: -7px -1px;
  border-radius: inherit;
}

@media (hover: hover) {
  .filter-row .chip:hover {
    background: var(--bg-soft);
    color: var(--text);
  }
}

.filter-row .chip.is-active {
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.filter-row .chip-count {
  font-size: 10.5px;
  opacity: .6;
}

.filter-row .chip.is-active .chip-count { opacity: .8; }

/* 月份等数字型选项用等宽数字，扫读更整齐 */
.filter-row-month .chip {
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
}

.filter-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  color: var(--text-soft);
  font-size: 13px;
}

.filter-status-text { min-width: 0; }

/* ------------------------------ chips ------------------------------ */

.chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--text-soft);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

/* 可交互 chip：触控目标 44px */
button.chip,
a.chip {
  min-height: 44px;
  padding: 0 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease;
}

@media (hover: hover) {
  button.chip:hover,
  a.chip:hover {
    background: color-mix(in srgb, var(--accent) 10%, var(--bg-soft));
    color: var(--accent);
  }
}

.chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}

.chip-count {
  color: inherit;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  opacity: .72;
}

.chip.is-active .chip-count { opacity: .85; }

/* 展示用 label chip：JS 只下发 --label-color，浅底与彩字由 color-mix 派生，
   深色模式自动跟着背景变量走，不需要 JS 再算对比色 */
.chip-label {
  border-color: transparent;
  border-radius: 8px;
  font-weight: 600;
}

span.chip-label {
  min-height: 23px;
  padding: 1px 9px;
  font-size: 11.5px;
  letter-spacing: .01em;
  cursor: default;
}

/* 详情页标签可点击：视觉保持小巧，用伪元素把点击区向外撑到 44px */
a.chip-label {
  position: relative;
  min-height: 28px;
  padding: 2px 11px;
  font-size: 12px;
  transition: filter .16s ease;
}

a.chip-label::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: inherit;
}

@media (hover: hover) {
  a.chip-label:hover { filter: brightness(.96) saturate(1.1); }
}

.chip-label.is-colored {
  background: color-mix(in srgb, var(--label-color) 13%, var(--bg-elev));
  color: color-mix(in srgb, var(--label-color) 66%, var(--text));
  border-color: color-mix(in srgb, var(--label-color) 26%, transparent);
}

/* ------------------------------ 按钮 ------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .16s ease, color .16s ease, filter .16s ease, background-color .16s ease;
}

@media (hover: hover) {
  .btn:hover {
    border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
    color: var(--accent);
  }
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

@media (hover: hover) {
  .btn.primary:hover { color: var(--on-accent); filter: brightness(1.07); }
}

.link-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--accent);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ------------------------------ 列表 ------------------------------ */

.list-view { padding-top: 2px; }

.memo-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 16px 0 48px;
}

/* ------------------------------ 卡片 ------------------------------ */

.card {
  position: relative;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

@media (hover: hover) {
  .card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: color-mix(in srgb, var(--accent) 26%, var(--border));
  }

  .card:hover .card-title { color: var(--accent); }
}

/* 置顶：淡琥珀底 + 左侧色条，比单纯一条边更明确 */
.card.is-pinned {
  border-color: color-mix(in srgb, var(--pin) 32%, var(--border));
  background: linear-gradient(180deg, var(--pin-soft) 0, var(--bg-elev) 100%);
}

.card.is-pinned::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--pin);
}

.card-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.card-title {
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -.01em;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color .16s ease;
}

.card-title:focus-visible { outline-offset: 4px; }

/* 整张卡片可点（stretched link），作者链接单独抬高层级 */
.card-title::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.pin-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  color: var(--pin);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
}

.pin-badge .icon { width: 13px; height: 13px; }

/* 列表页置顶角标：固定在卡片右上角，比标题旁的小图标更显眼 */
.pin-flag {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--pin) 14%, transparent);
  color: var(--pin);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
  white-space: nowrap;
  pointer-events: none; /* 不挡住整卡的 stretched link 点击 */
}

.pin-flag .icon { width: 12px; height: 12px; }

/* 给右上角标留出空间，避免长标题压到它下面 */
.card.is-pinned .card-head { padding-right: 76px; }

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-top: 8px;
  color: var(--text-faint);
  font-size: 12.5px;
}

.card-meta a,
.detail-meta a { position: relative; z-index: 1; }

.meta-sep { color: var(--text-faint); opacity: .6; }

.author {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-soft);
  text-decoration: none;
}

@media (hover: hover) {
  .author:hover .author-login { color: var(--accent); text-decoration: underline; }
}

.avatar {
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  object-fit: cover;
}

.avatar-sm { width: 20px; height: 20px; }
.avatar-md { width: 26px; height: 26px; }
.avatar.is-broken { visibility: hidden; }

.card-excerpt {
  margin: 11px 0 0;
  color: var(--text-soft);
  font-size: 14.5px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.state-badge {
  padding: 0 8px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--text-soft);
  font-size: 11.5px;
  line-height: 20px;
}

/* ------------------------------ 空状态 ------------------------------ */

.empty {
  padding: 64px 16px 72px;
  text-align: center;
  color: var(--text-soft);
}

.empty-icon { color: var(--text-faint); line-height: 1; }

.empty-text { margin: 16px 0 22px; font-size: 15px; }

/* ------------------------------ 详情 ------------------------------ */

.memo-detail { padding: 6px 0 56px; }

/* 详情页顶部工具条：返回列表在左，GitHub 链接在右，同一行、同一套按钮样式 */
.detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0 20px;
}

/* 工具条按钮：次要按钮的统一形态（返回列表 / 在 GitHub 查看共用） */
.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-elev);
  color: var(--text-soft);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: border-color .16s ease, color .16s ease, transform .16s ease;
}

@media (hover: hover) {
  .tool-btn:hover {
    border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
    color: var(--accent);
  }

  /* 返回列表向左移 2px，有个「往回走」的方向暗示；右侧的外链按钮不动 */
  .back-link:hover { transform: translateX(-2px); }
}

/* 详情正文的卡片容器：让内容有边界，而不是散在背景上 */
.detail-card {
  padding: 30px 32px 34px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--bg-elev);
  box-shadow: var(--shadow);
}

.detail-head { margin-bottom: 4px; }

.memo-title {
  margin: 2px 0 12px;
  font-size: 26px;
  font-weight: 750;
  line-height: 1.34;
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
}

.detail-meta { margin-top: 0; font-size: 13px; }

.filter-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin: 16px 0 0;
  padding: 8px 12px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  color: var(--text-soft);
  font-size: 13px;
}

/* --------------------------- 正文排版 --------------------------- */

.memo-body {
  margin-top: 24px;
  font-size: 16px;
  line-height: 1.85;
  overflow-wrap: anywhere;
  color: var(--text);
}

.memo-body > *:first-child { margin-top: 0; }
.memo-body > *:last-child { margin-bottom: 0; }

.memo-body h1,
.memo-body h2,
.memo-body h3,
.memo-body h4,
.memo-body h5,
.memo-body h6 {
  margin: 1.6em 0 .6em;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: -.01em;
}

.memo-body h1 { font-size: 1.4em; }
.memo-body h2 { font-size: 1.26em; }
.memo-body h3 { font-size: 1.12em; }
.memo-body h4,
.memo-body h5,
.memo-body h6 { font-size: 1em; }

.memo-body p { margin: .9em 0; }

.memo-body ul,
.memo-body ol { margin: .9em 0; padding-left: 1.4em; }

.memo-body li { margin: .35em 0; }

.memo-body li > input[type="checkbox"] { margin-right: 6px; }

.memo-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.memo-body img {
  display: block;
  max-width: 100%;
  max-height: 62vh;
  height: auto;
  margin: 18px auto;
  border-radius: 14px;
  border: 1px solid var(--border);
  object-fit: contain;
}

.memo-body img.zoomable { cursor: zoom-in; }

.memo-body blockquote {
  margin: 16px 0;
  padding: 2px 0 2px 16px;
  border-left: 3px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  color: var(--text-soft);
}

.memo-body code {
  padding: .15em .4em;
  border-radius: 6px;
  background: var(--bg-soft);
  font-family: var(--font-mono);
  font-size: .88em;
}

.memo-body pre {
  margin: 16px 0;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.6;
}

.memo-body pre code {
  padding: 0;
  background: none;
  font-size: inherit;
}

/* 宽表格靠外层容器横向滚动，table 本身保持表格布局 */
.table-wrap {
  margin: 16px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.memo-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.memo-body th,
.memo-body td {
  padding: 7px 11px;
  border: 1px solid var(--border);
  text-align: left;
}

.memo-body th { background: var(--bg-soft); font-weight: 650; }

.memo-body hr {
  margin: 26px 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.render-error { color: var(--danger); }

/* ---------------------------- 上下条翻页 ---------------------------- */

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 22px 0 0;
}

.pager-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 44px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

@media (hover: hover) {
  a.pager-link:hover {
    border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
    transform: translateY(-1px);
    box-shadow: var(--shadow-hover);
  }
}

.pager-next { text-align: right; }

.pager-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-faint);
  font-size: 11.5px;
  font-weight: 600;
}

.pager-label .icon { width: 13px; height: 13px; }

/* 「下一条」的箭头放到文字右边 */
.pager-next .pager-label { flex-direction: row-reverse; }

.pager-title {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pager-link.is-disabled { opacity: .5; box-shadow: none; }

.pager-note {
  margin: 22px 0 0;
  color: var(--text-faint);
  font-size: 13px;
}

/* ---------------------------- 错误 / 状态 ---------------------------- */

.state-box {
  padding: 64px 16px 72px;
  text-align: center;
}

.state-icon { color: var(--danger); line-height: 1; }

.state-title {
  margin: 16px 0 6px;
  font-size: 18px;
  font-weight: 700;
}

.state-text {
  margin: 0 auto 24px;
  max-width: 34em;
  color: var(--text-soft);
  font-size: 14px;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

/* ------------------------------ 骨架屏 ------------------------------ */

.sk {
  border-radius: 8px;
  background: var(--bg-soft);
  background-image: linear-gradient(
    90deg,
    var(--bg-soft) 25%,
    color-mix(in srgb, var(--border) 65%, var(--bg-soft)) 37%,
    var(--bg-soft) 63%
  );
  background-size: 400% 100%;
  animation: sk-shimmer 1.4s ease-in-out infinite;
}

@keyframes sk-shimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

.sk-title { width: 62%; height: 19px; }
.sk-meta { width: 38%; height: 12px; margin-top: 13px; }
.sk-line { width: 100%; height: 12px; margin-top: 11px; }
.sk-line.short { width: 68%; }
.sk-h1 { width: 74%; height: 28px; margin-top: 10px; }
.sk-back { width: 92px; height: 14px; margin-bottom: 20px; }
.sk-block { width: 100%; height: 96px; margin-top: 24px; }
.sk-chip { width: 84px; height: 30px; border-radius: 9px; }

.card-skeleton { pointer-events: none; }

/* ------------------------------ lightbox ------------------------------ */

dialog.lightbox {
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
  cursor: zoom-out;
}

/* 只在 open 时改成 grid：直接写 display 会盖掉 UA 的 dialog:not([open]){display:none} */
dialog.lightbox[open] {
  display: grid;
  place-items: center;
}

dialog.lightbox::backdrop {
  background: rgba(8, 10, 14, .86);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

dialog.lightbox img {
  display: block;
  max-width: 95vw;
  max-height: 95vh;
  object-fit: contain;
  border-radius: 10px;
  cursor: zoom-out;
}

/* ------------------------------ 页脚 ------------------------------ */

.site-footer {
  margin-top: 24px;
  padding: 22px 0 36px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 12.5px;
  text-align: center;
}

.noscript {
  padding: 24px 0;
  color: var(--text-soft);
  text-align: center;
}

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

@media (max-width: 640px) {
  .card { padding: 18px 16px; border-radius: 16px; }
  .card-title { font-size: 17px; }
  .detail-card { padding: 22px 18px 26px; border-radius: 18px; }
  .memo-title { font-size: 22px; }
  .memo-body { font-size: 15.5px; }
  .memo-list { gap: 12px; }
}

@media (max-width: 480px) {
  .pager { grid-template-columns: 1fr; }
  .pager-next { text-align: left; }
  /* 窄屏保留标签文字（「全部」在标签行和月份行含义不同），只收紧尺寸 */
  .filter-bar { padding: 4px 12px; border-radius: 14px; }
  .filter-row { gap: 10px; padding: 7px 0; }
  .filter-row-label { flex-basis: 26px; font-size: 10.5px; letter-spacing: .1em; }
  .detail-toolbar { margin-bottom: 16px; gap: 8px; }
  .tool-btn { padding: 0 12px; font-size: 13px; }
  .site-sub { font-size: 11.5px; }
}

@media (min-width: 701px) {
  .wrap { padding-left: 24px; padding-right: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .sk { animation: none; }
  .progress-bar { animation-duration: 2.4s; }
  * { transition-duration: .01ms !important; }
  .card:hover { transform: none; }
}
