/* 个人门户 · 样式表
   深色为主（中性黑 #1a1a1a + 白字 + 灰字 + 橙色点缀），浅色作可选覆盖。
   布局节奏见 design.css（在本文后加载）。 */

:root {
  --bg: #1a1a1a;
  --bg-2: #151515;
  --surface: #202020;
  --text: #ffffff;
  --text-2: #898989;
  --text-3: #6a6a6a;
  --border: #2a2a2a;
  --accent: #e65616;
  --accent-text: #ffffff;
  --hover: #242424;
  --shadow: none;
  --radius: 6px;
}

:root[data-theme="light"] {
  --bg: #f5f6f8;
  --bg-2: #eef0f3;
  --surface: #ffffff;
  --text: #1c2434;
  --text-2: #5c6575;
  --text-3: #8b95a5;
  --border: #e4e7ec;
  --accent: #c2451a;
  --accent-text: #ffffff;
  --hover: #eef4fd;
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
}

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

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  transition: background-color 0.25s ease, color 0.25s ease;
}

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

/* ===== 常驻导航条 ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.5px;
}

.nav-links { display: flex; gap: 4px; flex-wrap: wrap; }

.nav-links a, .nav-links span {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-2);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-links a:hover { background: var(--hover); color: var(--text); }

.nav-links span {
  color: var(--text-2);
  opacity: 0.55;
  cursor: not-allowed;
}

/* ===== 主题切换按钮（导航栏右侧，原为固定右下角悬浮，2026-10-13 并入导航） ===== */
.theme-toggle {
  flex: 0 0 auto;
  margin-left: auto;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }

.theme-toggle .icon-moon { display: none; }

:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme]) .theme-toggle .icon-moon { display: block; }
}

/* ===== 主体布局 ===== */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

/* ===== 时钟 Hero ===== */
.hero { text-align: center; padding: 36px 0 30px; }

.clock-time {
  font-size: 64px;
  font-weight: 200;
  letter-spacing: 2px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.clock-date { font-size: 15px; color: var(--text-2); margin-top: 6px; }

/* ===== 挂件区 ===== */
.widgets {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.cal-title { font-size: 14px; font-weight: 600; }

.cal-nav {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-2);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.cal-nav:hover { background: var(--hover); color: var(--text); }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}

.cal-grid .cal-dow {
  font-size: 12px;
  color: var(--text-2);
  padding: 4px 0;
}

.cal-grid .cal-day {
  font-size: 13px;
  padding: 6px 0;
  border-radius: 8px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.cal-grid .cal-day.other { color: var(--text-2); opacity: 0.45; }

.cal-grid .cal-day.has { position: relative; }
.cal-grid .cal-day.has::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.cal-grid .cal-day.today {
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
}

.cal-grid .cal-day.today.has::after { background: var(--accent-text); }

.weather-card { display: flex; flex-direction: column; }

.weather-city { font-size: 14px; font-weight: 600; margin-bottom: 8px; }

.weather-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-2);
  font-size: 13px;
  text-align: center;
  min-height: 120px;
}

.weather-body .w-temp { font-size: 30px; font-weight: 300; color: var(--text); }

.weather-body .w-desc { font-size: 13px; }

.weather-body svg { color: var(--accent); }

/* ===== 快捷入口 ===== */
.shortcuts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.shortcuts .group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
}

.shortcuts .group h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 10px;
}

.shortcuts .items { display: flex; flex-wrap: wrap; gap: 8px; }

.shortcuts .entry {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 13.5px;
  color: var(--text);
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.shortcuts .entry:hover {
  border-color: var(--accent);
  background: var(--hover);
  transform: translateY(-1px);
}

.shortcuts .entry .note {
  font-size: 11px;
  color: var(--text-2);
  opacity: 0.7;
}

/* ===== 搜索区 ===== */
.search { max-width: 640px; margin: 0 auto 10px; }

.engine-switch {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 12px;
}

.engine-switch button {
  padding: 5px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.engine-switch button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

.search-box {
  display: flex;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 5px 5px 20px;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease;
}

.search-box:focus-within { border-color: var(--accent); }

.search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  min-width: 0;
}

.search-input::placeholder { color: var(--text-2); opacity: 0.8; }

.search-btn {
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 14px;
  padding: 8px 22px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.search-btn:hover { opacity: 0.9; }

/* ===== 页脚 ===== */
.footer {
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-2);
  border-top: 1px solid var(--border);
}

/* 备案号：独占一行并水平居中（页面底部正中），链至工信部备案系统 */
.footer-beian {
  flex: 0 0 100%;
  text-align: center;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-beian:hover,
.footer-beian:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

/* ===== 响应式：移动端 ===== */
@media (max-width: 768px) {
  .clock-time { font-size: 44px; }
  .hero { padding: 24px 0 22px; }
  .widgets { grid-template-columns: 1fr; }
  .shortcuts { grid-template-columns: 1fr; }
  .nav-inner { gap: 14px; height: auto; padding: 10px 16px; flex-wrap: wrap; }
  .footer { justify-content: center; }
}

/* ===== 导航当前页高亮 ===== */
.nav-links a.active {
  background: var(--hover);
  color: var(--accent);
  font-weight: 600;
}

/* ===== 资讯流页 ===== */
.news-container { max-width: 860px; }

.news-head { padding: 20px 0 18px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }

.news-head h1 { font-size: 26px; font-weight: 600; letter-spacing: 0.5px; }

.news-meta { font-size: 13px; color: var(--text-2); margin-top: 6px; }

.news-days { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }

.news-days .day-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  transition: all 0.15s ease;
}

.news-days .day-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--hover);
}

.news-days .day-chip span {
  font-size: 11px;
  opacity: 0.65;
}

.news-day {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  overflow: hidden;
}

.news-day > summary {
  cursor: pointer;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  user-select: none;
  transition: background-color 0.15s ease;
}

.news-day > summary::-webkit-details-marker { display: none; }

.news-day > summary:hover { background: var(--hover); }

.news-day > summary::after {
  content: "▾";
  font-size: 12px;
  color: var(--text-2);
  transition: transform 0.2s ease;
  margin-left: 10px;
}

.news-day[open] > summary::after { transform: rotate(180deg); }

.news-day .day-date { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }

.news-day .day-count {
  font-size: 12px;
  color: var(--text-2);
  background: var(--hover);
  padding: 2px 9px;
  border-radius: 999px;
  margin-left: auto;
  margin-right: 4px;
}

.news-items { list-style: none; border-top: 1px solid var(--border); }

.news-item { padding: 15px 18px; border-bottom: 1px solid var(--border); }
.news-item:last-child { border-bottom: none; }

.news-item-head { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }

.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  letter-spacing: 0.2px;
}

.badge-github { background: rgba(47, 125, 232, 0.12); color: var(--accent); }
.badge-hn { background: rgba(232, 84, 63, 0.14); color: #d9531e; }
/* 数码方向信息源徽章（2026-10 改版） */
.badge-ithome    { background: rgba(217, 54, 54, 0.12);  color: #d93636; }
.badge-mydrivers { background: rgba(45, 156, 219, 0.14); color: #1f7fb8; }
.badge-gsmarena  { background: rgba(108, 92, 231, 0.14); color: #6c5ce7; }

.news-item-head .cat {
  font-size: 11px;
  color: var(--text-2);
  border: 1px solid var(--border);
  padding: 1px 8px;
  border-radius: 6px;
}

.news-title { font-size: 16.5px; font-weight: 600; line-height: 1.45; margin-bottom: 6px; }

.news-title a { transition: color 0.15s ease; }
.news-title a:hover { color: var(--accent); }

.news-summary { font-size: 14px; color: var(--text-2); line-height: 1.65; }

.news-item-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 9px;
  font-size: 12px;
  color: var(--text-2);
  flex-wrap: wrap;
}

.news-orig-title {
  flex: 1;
  min-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.75;
}

.news-item-foot .meta { font-variant-numeric: tabular-nums; opacity: 0.8; white-space: nowrap; }

.news-item-foot .origin { color: var(--accent); white-space: nowrap; font-weight: 500; }
.news-item-foot .origin:hover { text-decoration: underline; }

.news-empty { text-align: center; color: var(--text-2); padding: 60px 0; font-size: 14px; }

@media (max-width: 768px) {
  .news-head h1 { font-size: 22px; }
  .news-item { padding: 13px 14px; }
  .news-day > summary { padding: 12px 14px; }
  .news-title { font-size: 15.5px; }
  .news-orig-title { display: none; }
}

/* ==================== M3 · 观点陈列 ==================== */

:root { --cat-agent: #b28aff; }
:root[data-theme="light"] { --cat-agent: #7c4ddb; }

.views-container { max-width: 860px; }

.views-head { padding: 10px 0 0; }
.views-head h1 { font-size: 26px; }
.views-intro { color: var(--text-2); font-size: 14px; margin-top: 6px; line-height: 1.7; }

.views-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0 18px;
}

.views-cats { display: flex; gap: 8px; flex-wrap: wrap; }

.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cat-chip:hover { border-color: var(--accent); color: var(--accent); }
.cat-chip.active { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.cat-chip span { font-size: 11px; opacity: 0.7; }
.cat-chip.active span { opacity: 0.85; }

.tpl-open {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}
.tpl-open:hover, .tpl-open.active { border-color: var(--accent); color: var(--accent); }

.tpl-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  margin-bottom: 18px;
}
.tpl-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.tpl-note { font-size: 12.5px; color: var(--text-2); margin-bottom: 10px; line-height: 1.7; }
.tpl-note code { background: var(--hover); padding: 1px 5px; border-radius: 4px; font-size: 0.92em; }
.tpl-body {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-2);
  white-space: pre;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Courier New", monospace;
}
.tpl-copy {
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--accent);
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.tpl-copy:hover { background: var(--hover); }

.views-list { display: flex; flex-direction: column; gap: 14px; }

.view-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
}

.view-top { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }

.view-cat {
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 6px;
  background: rgba(47, 125, 232, 0.12);
  color: var(--accent);
}
.view-cat[data-cat="agent"] { background: rgba(139, 92, 246, 0.15); color: var(--cat-agent); }

.view-date { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }

.view-demo {
  margin-left: auto;
  font-size: 11px;
  color: #d9531e;
  background: rgba(232, 84, 63, 0.12);
  padding: 2px 8px;
  border-radius: 6px;
}

.view-title { font-size: 19px; line-height: 1.45; font-weight: 600; margin-bottom: 8px; }
.view-summary { font-size: 14.5px; color: var(--text-2); line-height: 1.7; }

.view-body-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.32s ease; }
.view-card.open .view-body-wrap { grid-template-rows: 1fr; }
.view-body { overflow: hidden; min-height: 0; font-size: 15px; line-height: 1.75; }
.view-body > *:first-child { margin-top: 14px; }

.view-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 0;
  border: none;
  background: none;
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
}
.view-toggle:hover { text-decoration: underline; }
.view-toggle .arrow { display: inline-block; transition: transform 0.25s ease; }
.view-card.open .view-toggle .arrow { transform: rotate(180deg); }

.view-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.view-tag { font-size: 11.5px; color: var(--text-2); border: 1px solid var(--border); padding: 1px 8px; border-radius: 6px; }

.views-empty { text-align: center; color: var(--text-2); padding: 60px 20px; font-size: 14px; line-height: 1.9; }
.views-empty code { background: var(--hover); padding: 1px 5px; border-radius: 4px; }

/* ==================== M3 · 每日记录 ==================== */

.log-container { max-width: 1000px; }

.log-head { padding: 10px 0 0; }
.log-head h1 { font-size: 26px; }
.log-meta { font-size: 13px; color: var(--text-2); margin: 6px 0 18px; }

.heatmap-card { padding: 16px 18px 11px; margin-bottom: 16px; }
.heatmap-scroll { overflow-x: auto; padding-bottom: 4px; }
.heatmap { display: flex; gap: 6px; min-width: max-content; }

.hm-weekdays {
  display: grid;
  grid-template-rows: repeat(7, 11px);
  gap: 3px;
  width: 14px;
  margin-top: 15px;
  font-size: 10px;
  color: var(--text-2);
  text-align: right;
  line-height: 11px;
}

.hm-body { display: flex; flex-direction: column; }
.hm-months { display: grid; grid-auto-flow: column; height: 15px; font-size: 10.5px; color: var(--text-2); }
.hm-months span { white-space: nowrap; }

.hm-grid { display: grid; grid-template-rows: repeat(7, 11px); grid-auto-flow: column; gap: 3px; }

.hm-cell { width: 11px; height: 11px; border-radius: 2.5px; background: var(--hover); display: block; }
.hm-cell.lv1 { background: var(--accent); }
.hm-cell.empty { background: transparent; }
.hm-cell.has { cursor: pointer; }
.hm-cell.has:hover { outline: 1.5px solid var(--accent); outline-offset: 1px; }

.heatmap-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-2);
}
.heatmap-legend { display: inline-flex; align-items: center; gap: 4px; }

.log-cols { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }

.cal-grid .cal-w { font-size: 11.5px; color: var(--text-2); padding: 2px 0; }
.cal-grid .cal-d {
  display: block;
  width: 100%;
  padding: 6px 0;
  border: none;
  border-radius: 8px;
  background: none;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  text-align: center;
  position: relative;
}
.cal-grid .cal-d.blank { visibility: hidden; }
.cal-grid button.cal-d { cursor: pointer; color: var(--accent); font-weight: 600; }
.cal-grid button.cal-d:hover { background: var(--hover); }
.cal-grid .cal-d.has::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 1px;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}
.cal-grid .cal-d.today { background: var(--accent); color: var(--accent-text); }
.cal-grid .cal-d.today.has::after { background: var(--accent-text); }

.log-cal-hint { font-size: 11.5px; color: var(--text-2); margin-top: 10px; line-height: 1.6; }

.log-list { display: flex; flex-direction: column; gap: 12px; }

.log-entry {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 15px 18px;
  scroll-margin-top: 84px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.log-entry.flash { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 125, 232, 0.18); }

.log-date { display: flex; align-items: baseline; gap: 8px; margin-bottom: 7px; }
.log-date .d { font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.log-date .w { font-size: 11.5px; color: var(--text-2); }

.log-body { font-size: 14.5px; line-height: 1.8; }
.log-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 9px; }
.log-tag { font-size: 11px; color: var(--text-2); border: 1px solid var(--border); padding: 1px 8px; border-radius: 6px; }

.log-empty { text-align: center; color: var(--text-2); padding: 50px 20px; font-size: 14px; line-height: 1.9; }
.log-empty code { background: var(--hover); padding: 1px 5px; border-radius: 4px; font-size: 0.92em; }

/* ==================== Markdown 正文排版（观点全文 / 记录正文共用） ==================== */

.md h3, .md h4, .md h5, .md h6 { font-weight: 600; line-height: 1.4; margin: 16px 0 8px; }
.md h3 { font-size: 17px; }
.md h4 { font-size: 16px; }
.md h5 { font-size: 15px; }
.md h6 { font-size: 14px; color: var(--text-2); }
.md p { margin: 10px 0; }
.md ul, .md ol { margin: 10px 0 10px 22px; }
.md li { margin: 4px 0; }
.md blockquote {
  margin: 12px 0;
  padding: 8px 14px;
  border-left: 3px solid var(--accent);
  background: var(--hover);
  color: var(--text-2);
  border-radius: 0 8px 8px 0;
}
.md blockquote p { margin: 0; }
.md code {
  background: var(--hover);
  padding: 1.5px 6px;
  border-radius: 5px;
  font-size: 0.88em;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
.md .md-pre {
  margin: 12px 0;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow-x: auto;
}
.md .md-pre code { background: none; padding: 0; font-size: 12.5px; line-height: 1.65; }
.md hr { border: none; border-top: 1px solid var(--border); margin: 18px 0; }
.md a { color: var(--accent); }
.md a:hover { text-decoration: underline; }
.md img { max-width: 100%; height: auto; border-radius: 8px; }

@media (max-width: 768px) {
  .views-head h1, .log-head h1 { font-size: 22px; }
  .view-card { padding: 15px 16px; }
  .view-title { font-size: 17px; }
  .log-cols { grid-template-columns: 1fr; }
  .heatmap-card { padding: 14px 12px 10px; }
  .log-entry { padding: 13px 15px; }
}

/* ===================== 我的 AI（/ai） ===================== */

/* 必须显式声明：下面 .ai-lock/.ai-app 设了 display，
   类选择器优先级高于浏览器默认的 [hidden]{display:none}，
   不写这条会导致 hidden 失效（锁屏与对话界面同时可见）。 */
.ai-lock[hidden],
.ai-app[hidden],
.ai-side-mask[hidden],
.ai-loading[hidden],
.ai-stop[hidden],
.ai-send[hidden] { display: none !important; }

.ai-container { padding-top: 18px; padding-bottom: 18px; }

.ai-loading {
  text-align: center;
  color: var(--text-2);
  padding: 60px 0;
  font-size: 14px;
}

/* ---------- 门禁锁屏 ---------- */
.ai-lock { display: flex; justify-content: center; padding: 58px 0 70px; }

.ai-lock-card {
  width: 100%;
  max-width: 372px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 34px 30px 26px;
  text-align: center;
}

.ai-lock-mark {
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  border-radius: 15px;
  background: var(--hover);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-lock-card h1 { font-size: 21px; letter-spacing: 0.3px; }
.ai-lock-tip { color: var(--text-2); font-size: 13.5px; margin-top: 6px; }

.ai-lock-form { display: flex; gap: 8px; margin-top: 22px; }

.ai-lock-form input {
  flex: 1;
  min-width: 0;
  padding: 10px 13px;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
}
.ai-lock-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 125, 232, 0.14);
}

.ai-lock-form button {
  padding: 10px 20px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--accent-text);
  background: var(--accent);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s ease;
}
.ai-lock-form button:hover { opacity: 0.9; }
.ai-lock-form button:disabled { opacity: 0.6; cursor: default; }

.ai-lock-err { margin-top: 12px; color: #e5484d; font-size: 13.5px; }
.ai-lock-note { margin-top: 18px; color: var(--text-2); font-size: 12px; }

.shake { animation: ai-shake 0.36s ease; }
@keyframes ai-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  45% { transform: translateX(6px); }
  70% { transform: translateX(-3px); }
}

/* ---------- 对话布局 ---------- */
.ai-app {
  display: grid;
  grid-template-columns: 248px 1fr;
  gap: 14px;
  height: clamp(460px, calc(100vh - 246px), 880px);
}

.ai-side,
.ai-main {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ai-side-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid var(--border);
}
.ai-new {
  flex: 1;
  padding: 9px 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent);
  background: var(--hover);
  border: 1px solid transparent;
  border-radius: 9px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease;
}
.ai-new:hover { background: var(--bg); border-color: var(--border); }
.ai-side-close {
  display: none;
  width: 30px; height: 30px;
  border: none; background: none;
  color: var(--text-2); font-size: 15px;
  border-radius: 8px; cursor: pointer;
}
.ai-side-close:hover { background: var(--hover); }

.ai-sessions { flex: 1; overflow-y: auto; padding: 8px; }
.ai-side-empty { color: var(--text-2); font-size: 13px; padding: 16px 8px; text-align: center; }

.ai-sess {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 10px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 13.5px;
  color: var(--text);
  transition: background 0.12s ease;
}
.ai-sess:hover { background: var(--hover); }
.ai-sess.active { background: var(--hover); font-weight: 600; }
.ai-sess-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ai-sess-tools { display: none; gap: 2px; }
.ai-sess:hover .ai-sess-tools { display: flex; }
.ai-sess-btn {
  width: 22px; height: 22px;
  border: none; background: none;
  color: var(--text-2); font-size: 12px;
  border-radius: 6px; cursor: pointer; padding: 0;
  font-family: inherit;
}
.ai-sess-btn:hover { background: var(--bg); color: var(--text); }
.ai-sess-input {
  flex: 1;
  min-width: 0;
  padding: 3px 6px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--accent);
  border-radius: 6px;
  outline: none;
}

.ai-side-foot {
  border-top: 1px solid var(--border);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ai-side-model {
  font-size: 11.5px;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ai-logout {
  flex: none;
  padding: 5px 10px;
  font-size: 12px;
  color: var(--text-2);
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
}
.ai-logout:hover { background: var(--hover); color: var(--text); }

.ai-main-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  min-height: 50px;
}
.ai-side-open {
  display: none;
  width: 32px; height: 32px;
  border: 1px solid var(--border);
  background: none;
  color: var(--text-2);
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.ai-title {
  font-size: 14.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- 消息区 ---------- */
.ai-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 18px 18px 8px;
  scroll-behavior: smooth;
}

.ai-welcome { text-align: center; padding: 46px 16px 20px; }
.ai-welcome-title { font-size: 20px; margin-bottom: 8px; }
.ai-welcome-tip { color: var(--text-2); font-size: 13.5px; max-width: 430px; margin: 0 auto; }
.ai-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 22px; }
.ai-chip {
  padding: 8px 14px;
  font-size: 13px;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}
.ai-chip:hover { color: var(--accent); border-color: var(--accent); background: var(--hover); }

.ai-row { display: flex; margin-bottom: 16px; }
.ai-row.user { justify-content: flex-end; }
.ai-row.bot { flex-direction: column; align-items: flex-start; }

.ai-bubble {
  max-width: 78%;
  padding: 11px 15px;
  border-radius: 14px;
  font-size: 14.5px;
  line-height: 1.7;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.ai-row.user .ai-bubble {
  background: var(--accent);
  color: var(--accent-text);
  border-bottom-right-radius: 5px;
  white-space: pre-wrap;
  max-width: 74%;
}
.ai-row.bot .ai-bubble {
  background: var(--bg);
  border: 1px solid var(--border);
  border-bottom-left-radius: 5px;
  max-width: 92%;
}
.ai-bubble.md > *:first-child { margin-top: 0; }
.ai-bubble.md > *:last-child { margin-bottom: 0; }
.ai-bubble.md p { margin: 6px 0; }
.ai-bubble.md .md-pre { background: var(--surface); }

.ai-row-tools { margin: -10px 0 16px 2px; }
.ai-copy {
  font-size: 11.5px;
  color: var(--text-2);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  font-family: inherit;
  opacity: 0.75;
}
.ai-copy:hover { background: var(--hover); color: var(--text); opacity: 1; }

.ai-thinking { display: inline-flex; gap: 4px; align-items: center; height: 20px; }
.ai-thinking i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-2);
  animation: ai-blink 1.2s infinite ease-in-out;
}
.ai-thinking i:nth-child(2) { animation-delay: 0.18s; }
.ai-thinking i:nth-child(3) { animation-delay: 0.36s; }
@keyframes ai-blink {
  0%, 80%, 100% { opacity: 0.26; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

.ai-caret {
  display: inline-block;
  width: 7px;
  height: 15px;
  margin-left: 2px;
  vertical-align: -2px;
  background: var(--accent);
  border-radius: 1.5px;
  animation: ai-caret 1s step-end infinite;
}
@keyframes ai-caret { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.ai-err { color: #e5484d; }

/* ---------- 输入区 ---------- */
.ai-composer { padding: 10px 16px 14px; border-top: 1px solid var(--border); }
.ai-composer-box {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 8px 8px 8px 13px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ai-composer-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 125, 232, 0.13);
}
.ai-composer textarea {
  flex: 1;
  min-width: 0;
  border: none;
  background: none;
  outline: none;
  resize: none;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text);
  font-family: inherit;
  max-height: 200px;
  padding: 4px 0;
}
.ai-composer-actions { display: flex; gap: 6px; flex: none; }
.ai-send, .ai-stop {
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 9px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.ai-send { color: var(--accent-text); background: var(--accent); }
.ai-send:hover { opacity: 0.9; }
.ai-stop { color: var(--text-2); background: var(--surface); border: 1px solid var(--border); }
.ai-stop:hover { color: var(--text); }
.ai-composer-note { text-align: center; color: var(--text-2); font-size: 11.5px; margin-top: 7px; }

.ai-side-mask {
  position: fixed;
  inset: 0;
  background: rgba(12, 18, 28, 0.42);
  z-index: 20;
}

/* ---------- 移动端 ---------- */
@media (max-width: 860px) {
  .ai-app { grid-template-columns: 1fr; height: clamp(440px, calc(100vh - 210px), 780px); }
  .ai-side {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 264px;
    z-index: 21;
    border-radius: 0 var(--radius) var(--radius) 0;
    transform: translateX(-102%);
    transition: transform 0.22s ease;
  }
  .ai-app.side-open .ai-side { transform: translateX(0); }
  .ai-side-close { display: flex; align-items: center; justify-content: center; }
  .ai-side-open { display: flex; }
  .ai-bubble { max-width: 88%; }
  .ai-row.user .ai-bubble { max-width: 84%; }
  .ai-msgs { padding: 14px 13px 6px; }
  .ai-composer { padding: 9px 12px 12px; }
  .ai-lock { padding: 34px 0 50px; }
}

/* ============================================================
   流光小筑 · 改版样式
   首页重构（顶部条 / 作品卡片 / 滚动资讯 / A股 / 工具影音）
   + 子页：作品 / 相册 / 股市 / 工具 / 影音
   ============================================================ */

:root { --up: #ff5a4d; --down: #2fbf7a; }
:root[data-theme="light"] { --up: #d8392f; --down: #129a5c; }

/* ---------- 导航条目间距 ----------
   注意：这里不能加 overflow / nowrap —— .nav-more-panel 是 .nav-links 内的
   绝对定位下拉，一旦 .nav-links 变成滚动容器（overflow-x: auto），
   下拉面板会被整个裁掉（2026-10-14 修过这个 bug）。 */
.nav-inner { gap: 18px; }
.nav-links { gap: 2px; }
.nav-links a, .nav-links span {
  white-space: nowrap;
  padding: 5px 10px;
  font-size: 13.5px;
}

/* ---------- 顶部信息条：小屋标识 + 天气 + 日期 ---------- */
.topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 18px 0 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.topline-left { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.house-tag { font-size: 15px; font-weight: 600; color: var(--accent); letter-spacing: 0.5px; }
.house-motto { font-size: 12.5px; color: var(--text-2); }
.topline-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-2);
}
.mini-weather { display: inline-flex; align-items: center; gap: 6px; }
.mini-weather svg { color: var(--accent); flex: none; }
.mini-weather .mw-city { opacity: 0.72; }
.today-line { font-variant-numeric: tabular-nums; }

/* ---------- 搜索（紧凑） ---------- */
.search-slim { max-width: 560px; margin: 0 auto 24px; }

/* ---------- 区块通用 ---------- */
.block { margin-bottom: 28px; }
.block-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.block-head h2 { font-size: 16px; font-weight: 600; letter-spacing: 0.3px; }
.block-head .block-meta { font-size: 12px; color: var(--text-2); }
.block-head .more { margin-left: auto; font-size: 13px; color: var(--accent); white-space: nowrap; }
.block-head .more:hover { text-decoration: underline; }
.block-empty { font-size: 13px; color: var(--text-2); padding: 14px 0; }

/* ---------- 作品展示：卡片 ---------- */
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.work-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.16s ease, border-color 0.16s ease;
}
.work-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.work-thumb {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #dfe8f6, #eef2f7);
  overflow: hidden;
}
:root[data-theme="dark"] .work-thumb { background: linear-gradient(135deg, #1d2839, #222c3d); }
@media all {
  :root:not([data-theme]) .work-thumb { background: linear-gradient(135deg, #232323, #1e1e1e); }
}
.work-cover { width: 100%; height: 100%; object-fit: cover; display: block; }
.work-cover.broken { display: none; }
.thumb-fallback {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-2);
  font-size: 12.5px;
  letter-spacing: 0.5px;
}
.thumb-fallback::before {
  content: "";
  width: 26px;
  height: 20px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  opacity: 0.5;
}
.thumb-fallback small { font-size: 11px; opacity: 0.72; }
.work-cover.broken + .thumb-fallback { display: flex; }
.work-cat {
  position: absolute;
  left: 8px;
  top: 8px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(9, 14, 22, 0.62);
  color: #fff;
}
.work-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; }
.work-title { font-size: 14px; font-weight: 500; }
.work-note { font-size: 12px; color: var(--text-2); }

/* 首页专用：单层紧凑卡 —— 标题直接叠在图上（图 + 文同一层），
   卡片高度只剩缩略图，约为标准卡的 50%；一行 4 个作品。
   /works 页不加 compact，保持 4:3 大卡 + 独立文字区。 */
.work-grid.compact { grid-template-columns: repeat(4, 1fr); gap: 12px; }
.work-grid.compact .work-card { position: relative; }
.work-grid.compact .work-thumb { aspect-ratio: 16 / 10; }
.work-grid.compact .work-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: block;
  padding: 18px 10px 7px;
  background: linear-gradient(180deg, rgba(9, 14, 22, 0) 0%, rgba(9, 14, 22, 0.78) 100%);
}
.work-grid.compact .work-title {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.work-grid.compact .work-note { display: none; }
.work-grid.compact .work-cat { left: 6px; top: 6px; padding: 1px 7px; font-size: 10.5px; }
.work-grid.compact .thumb-fallback { font-size: 11.5px; padding-bottom: 28px; }
.work-grid.compact .thumb-fallback::before { width: 20px; height: 15px; }

.sub-entry { display: inline-block; margin-top: 12px; font-size: 12.5px; color: var(--text-2); }
.sub-entry:hover { color: var(--accent); }

/* ---------- 数码资讯：纵向无缝滚动 ---------- */
.ticker {
  position: relative;
  height: 224px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30px, #000 calc(100% - 34px), transparent);
  mask-image: linear-gradient(180deg, transparent, #000 30px, #000 calc(100% - 34px), transparent);
}
.ticker:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@keyframes ticker-scroll {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}
.ticker.rolling .ticker-list {
  animation-name: ticker-scroll;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
.ticker-list { list-style: none; }
.ticker-item { border-bottom: 1px dashed var(--border); }
.ticker-item a { display: block; padding: 9px 14px; }
.ticker-item a:hover { background: var(--hover); }
.tk-src {
  display: inline-block;
  font-size: 11px;
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 5px;
  margin-right: 8px;
  vertical-align: 1px;
}
.tk-title { font-size: 13.5px; }
.tk-sum {
  display: block;
  font-size: 12px;
  color: var(--text-2);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (prefers-reduced-motion: reduce) {
  .ticker.rolling .ticker-list { animation: none; }
  .ticker { overflow-y: auto; }
}

/* ---------- A 股（旧卡片样式已由 .stat-* 统一替代，2026-10-13 清理） ---------- */
.disclaimer { margin-top: 10px; font-size: 11.5px; color: var(--text-2); opacity: 0.85; }

/* ---------- 行情：统一数据框（首页与股市页共用同一套规格） ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.stat-grid.cols6 { grid-template-columns: repeat(6, 1fr); }
.stat-card {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 11px 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.sc-name {
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sc-val { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sc-chg { font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat-card.up .sc-val, .stat-card.up .sc-chg { color: var(--up); }
.stat-card.down .sc-val, .stat-card.down .sc-chg { color: var(--down); }
.stat-card.flat .sc-val { color: var(--text); }
.stat-card.flat .sc-chg { color: var(--text-2); }

/* ---------- 期货 ---------- */
.fut-hero { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.fut-card {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "name chg" "point chg";
  align-items: center;
  column-gap: 10px;
  padding: 9px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.fut-name { grid-area: name; font-size: 12.5px; color: var(--text-2); }
.fut-point { grid-area: point; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.fut-chg { grid-area: chg; font-size: 12.5px; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.fut-unit { font-size: 11px; font-weight: 400; color: var(--text-2); margin-left: 3px; }
.fut-card.up .fut-point, .fut-card.up .fut-chg { color: var(--up); }
.fut-card.down .fut-point, .fut-card.down .fut-chg { color: var(--down); }
.fut-card.flat .fut-point { color: var(--text); }
.fut-card.flat .fut-chg { color: var(--text-2); }

.fut-group { margin-bottom: 14px; }
.fut-group:last-child { margin-bottom: 0; }
.fut-group-title { font-size: 12px; color: var(--text-2); letter-spacing: 0.5px; margin-bottom: 7px; }
.fut-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.fut-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 12.5px;
}
.fi-name { color: var(--text-2); white-space: nowrap; }
.fi-val { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.fi-pct { min-width: 56px; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fut-item.up .fi-val, .fut-item.up .fi-pct { color: var(--up); }
.fut-item.down .fi-val, .fut-item.down .fi-pct { color: var(--down); }
.fut-item.flat .fi-val { color: var(--text); }
.fut-item.flat .fi-pct { color: var(--text-2); }

/* ---------- 加密货币 ---------- */
.crypto-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.crypto-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 11px 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.cc-head { display: flex; align-items: baseline; gap: 6px; }
.cc-sym { font-size: 13px; font-weight: 600; letter-spacing: 0.4px; }
.cc-name { font-size: 11.5px; color: var(--text-2); }
.cc-price { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cc-chg { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.cc-sub { font-size: 11px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.crypto-card.up .cc-price, .crypto-card.up .cc-chg { color: var(--up); }
.crypto-card.down .cc-price, .crypto-card.down .cc-chg { color: var(--down); }
.crypto-card.flat .cc-price { color: var(--text); }
.crypto-card.flat .cc-chg { color: var(--text-2); }

/* ---------- 个股 / 板块 榜 ---------- */
.two-col-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 22px; }
.row-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 7px 2px;
  border-bottom: 1px dashed var(--border);
  font-size: 13px;
}
.row-item:hover { color: var(--accent); }
.ri-name { white-space: nowrap; }
.ri-code { font-size: 11.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.ri-val { margin-left: auto; font-variant-numeric: tabular-nums; }
.ri-pct { min-width: 64px; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ri-sub { font-size: 11.5px; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-item.up .ri-pct, .row-item.up .ri-val { color: var(--up); }
.row-item.down .ri-pct, .row-item.down .ri-val { color: var(--down); }
.row-item.flat .ri-pct { color: var(--text-2); }

/* ---------- 工具台 / 影音库 入口 ---------- */
.block-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 12px; }
.panel {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.16s ease, border-color 0.16s ease;
}
.panel:hover { transform: translateY(-3px); border-color: var(--accent); }
.panel-title { font-size: 15px; font-weight: 500; }
.panel-desc { font-size: 12.5px; color: var(--text-2); }

/* ---------- 子页通用页头 ---------- */
.page-head { padding: 22px 0 4px; }
.page-head h1 { font-size: 20px; font-weight: 600; }
.page-head p { font-size: 13px; color: var(--text-2); margin-top: 5px; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 18px; }
.chip {
  padding: 5px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-2);
  background: var(--surface);
  cursor: pointer;
  font-family: inherit;
}
.chip.active { color: var(--accent-text); background: var(--accent); border-color: var(--accent); }

/* ---------- 相册图库 ---------- */
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.gal-grid a { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: var(--surface); }
.gal-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  transition: transform 0.22s ease;
}
.gal-grid a:hover img { transform: scale(1.05); }
.gal-album-title { font-size: 15px; font-weight: 600; margin: 24px 0 10px; }

/* ---------- 灯箱 ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(8, 12, 20, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lightbox[hidden] { display: none !important; }
.lightbox img { max-width: min(1100px, 94vw); max-height: 88vh; border-radius: 8px; }
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(0, 0, 0, 0.42);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}
.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 64px;
  border: 0;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  border-radius: 8px;
}
.lb-prev { left: 14px; }
.lb-next { right: 14px; }
.lb-caption {
  position: absolute;
  bottom: 18px;
  left: 0;
  right: 0;
  text-align: center;
  color: #fff;
  font-size: 13px;
  opacity: 0.9;
  padding: 0 20px;
}

/* ---------- 工具台 ---------- */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.tool-card {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.tool-card h3 { font-size: 14px; font-weight: 500; margin-bottom: 10px; }
.tool-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tool-row input, .tool-row select {
  flex: 1;
  min-width: 88px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
}
.tool-out { margin-top: 10px; font-size: 13px; word-break: break-all; color: var(--text); }
.tool-out canvas { max-width: 100%; display: block; margin-top: 8px; border-radius: 8px; background: #fff; }
.btn {
  padding: 7px 13px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn-primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.btn-primary:hover { color: var(--accent-text); opacity: 0.9; }

/* ---------- 影音库 ---------- */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.media-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 0.16s ease, border-color 0.16s ease;
}
.media-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.media-thumb {
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #e2e9f4, #eff3f8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  font-size: 12px;
  overflow: hidden;
}
:root[data-theme="dark"] .media-thumb { background: linear-gradient(135deg, #1c2637, #232d3f); }
@media all {
  :root:not([data-theme]) .media-thumb { background: linear-gradient(135deg, #232323, #1e1e1e); }
}
.media-thumb img { width: 100%; height: 100%; object-fit: cover; }
.media-body { padding: 10px 12px; }
.media-title { font-size: 14px; font-weight: 500; }
.media-note { font-size: 12px; color: var(--text-2); }

/* ---------- 改版响应式 ---------- */
@media (max-width: 860px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .work-grid.compact { grid-template-columns: repeat(2, 1fr); }
  .block-pair { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .stat-grid.cols6 { grid-template-columns: repeat(3, 1fr); }
  .fut-grid { grid-template-columns: repeat(2, 1fr); }
  .fut-hero { grid-template-columns: 1fr; }
  .crypto-row { grid-template-columns: repeat(2, 1fr); }
  .two-col-list { grid-template-columns: 1fr; }
  .topline { padding: 14px 0 12px; gap: 10px; }
  .gal-grid { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); }
}
@media (max-width: 520px) {
  .work-grid { gap: 10px; }
  .work-grid.compact { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-grid.cols6 { grid-template-columns: repeat(2, 1fr); }
  .stat-card { padding: 9px 11px; }
  .sc-val { font-size: 16px; }
  .fut-grid { grid-template-columns: 1fr; }
  .crypto-row { gap: 10px; }
  .nav-links a, .nav-links span { padding: 5px 8px; font-size: 13px; }
  .house-motto { font-size: 12px; }
  .ticker { height: 200px; }
}

/* ============================================================
   2026-10-13 晚 · A/C 组优化新增
   ============================================================ */

/* ---------- 导航「更多」下拉 ---------- */
.nav-more { position: relative; display: inline-block; }
.nav-more-btn {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 5px 12px; border: 0; border-radius: 8px;
  background: none; font: inherit; font-size: 14px; color: var(--text-2);
  cursor: pointer; white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.nav-more-btn:hover { background: var(--hover); color: var(--text); }
.nav-more-btn.active { background: var(--hover); color: var(--accent); }
.nav-more-btn small { font-size: 10px; opacity: 0.7; }
.nav-more-panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 70;
  min-width: 132px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.nav-more-panel[hidden] { display: none; }
.nav-more-panel a, .nav-more-panel span { display: block; padding: 7px 12px; }

/* ---------- 搜索弱化：小圆钮 + 弹出面板（首页） ---------- */
.search-mini { position: relative; display: flex; justify-content: center; margin: 0 auto 18px; }
.search-fab {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.search-fab:hover,
.search-fab[aria-expanded="true"] { color: var(--accent); border-color: var(--accent); }
.search-pop {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  width: min(560px, calc(100vw - 40px)); z-index: 55;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px;
}
.search-pop[hidden] { display: none; }
.search-pop .engine-switch { margin-bottom: 10px; }
.search-pop .search-box { max-width: none; }

/* ---------- 灯箱计数（3 / 20） ---------- */
.lb-count {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  font-size: 13px; color: rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.35); padding: 3px 12px; border-radius: 999px;
  font-variant-numeric: tabular-nums; pointer-events: none;
}

/* ---------- 页脚「关于本站」 ---------- */
.footer-link { color: var(--text-2); transition: color 0.15s ease; }
.footer-link:hover { color: var(--accent); }

/* ---------- 资讯 ticker：桌面悬停暂停；移动端静态列表 ---------- */
@media (hover: hover) {
  .ticker.rolling:hover .ticker-list { animation-play-state: paused; }
}
@media (max-width: 860px) {
  .ticker {
    height: auto; max-height: 300px; overflow-y: auto;
    -webkit-mask-image: none; mask-image: none;
  }
  .ticker.rolling .ticker-list { animation: none; }
}

/* ---------- 导航条：links 吃满剩余宽度，主题按钮不被挤压 ---------- */
.nav-inner { gap: 16px; }
.nav-links { flex: 1 1 auto; min-width: 0; }

/* ---------- 关于页 ---------- */
.about-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px;
}
.about-card h2 { font-size: 16px; margin: 0 0 10px; }
.about-card p { margin: 0 0 8px; font-size: 13.5px; color: var(--text-2); line-height: 1.7; }
.about-contact { list-style: none; margin: 0; padding: 0; }
.about-contact li {
  display: flex; gap: 14px; padding: 7px 0;
  border-bottom: 1px dashed var(--border); font-size: 13.5px;
}
.about-contact li:last-child { border-bottom: 0; }
.ac-label { flex: 0 0 56px; color: var(--text-2); }
.ac-value { color: var(--text); font-weight: 500; }
.ac-empty { color: var(--text-2); opacity: 0.6; font-weight: 400; }
.about-note { margin: 10px 0 0; font-size: 12px; color: var(--text-2); opacity: 0.8; }

/* ---------- 工具台：计算器（2026-10-14） ---------- */
.calc-screen {
  background: var(--hover); border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; margin-bottom: 10px; text-align: right;
  font-family: ui-monospace, Consolas, monospace;
}
.calc-expr { display: block; min-height: 16px; font-size: 12.5px; color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calc-out { display: block; min-height: 24px; font-size: 20px; font-weight: 600;
  font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calc-pad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.calc-key {
  padding: 9px 0; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text); font: inherit; font-size: 14.5px;
  cursor: pointer; transition: background-color 0.12s ease;
  font-variant-numeric: tabular-nums;
}
.calc-key:hover { background: var(--hover); }
.calc-key.op { color: var(--accent); }
.calc-key.fn { color: var(--text-2); font-size: 13px; }
.calc-key.eq { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.calc-key.eq:hover { filter: brightness(1.08); }

/* ---------- 工具台：下载区 ---------- */
.dl-sec h2 { font-size: 16px; margin: 0 0 12px; }
.dl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.dl-empty {
  grid-column: 1 / -1;
  padding: 26px 16px; text-align: center;
  border: 1px dashed var(--border); border-radius: var(--radius);
  color: var(--text-2); font-size: 13.5px;
}
@media (max-width: 860px) {
  .dl-grid { grid-template-columns: repeat(2, 1fr); }
  .calc-pad { grid-template-columns: repeat(4, 1fr); }
}


/* ============================================================
   2026-10-14 下午 · 首页改版：搜索横条 / 作品折叠卡 / 资讯条目
   ============================================================ */

/* ---------- 搜索：还原一横条（矮，含引擎切换） ---------- */
.search-bar { max-width: 640px; margin: 0 auto 22px; }
.search-bar .search-box.bar { align-items: center; padding: 4px 5px 4px 8px; }
.search-bar .engine-switch { margin: 0 2px 0 0; gap: 2px; justify-content: flex-start; }
.search-bar .engine-switch button {
  padding: 4px 10px; font-size: 12.5px;
  border: 0; background: none; color: var(--text-2);
}
.search-bar .engine-switch button.active { background: var(--hover); color: var(--accent); }
.search-bar .search-input { font-size: 14px; }
.search-bar .search-btn { padding: 7px 20px; font-size: 13.5px; }
@media (max-width: 520px) {
  .search-bar .engine-switch button { padding: 4px 8px; font-size: 12px; }
  .search-bar .search-btn { padding: 7px 14px; }
}

/* ---------- 作品：竖向折叠卡（一屏一张，滚轮翻页） ---------- */
.work-deck {
  position: relative;
  height: 400px;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  border-radius: var(--radius);
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.work-deck::-webkit-scrollbar { display: none; }
.work-deck:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.work-slide {
  position: relative; display: block;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  transform-origin: center center;
  will-change: transform, opacity;
}
.ws-media { position: absolute; inset: 0; display: block; }
.ws-media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.4s ease;
}
.ws-media img.broken { display: none; }
.ws-fallback {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--text-2); font-size: 15px;
  background: linear-gradient(135deg, var(--hover), var(--surface));
}
.ws-fallback small { font-size: 11px; opacity: 0.7; }
.ws-shade {
  position: absolute; inset: 0; display: block;
  background: linear-gradient(180deg, rgba(9, 14, 22, 0.04) 35%, rgba(9, 14, 22, 0.74) 100%);
}
.ws-info {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column; gap: 6px;
  padding: 44px 20px 16px;
}
.ws-cat {
  align-self: flex-start;
  font-size: 11.5px; color: #fff;
  background: rgba(47, 125, 232, 0.88);
  padding: 2px 10px; border-radius: 999px;
}
.ws-title {
  color: #fff; font-size: 17px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (hover: hover) {
  .work-slide:hover .ws-media img { transform: scale(1.03); }
}
.deck-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.deck-dots i {
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--border);
  transition: width 0.2s ease, background-color 0.2s ease;
}
.deck-dots i.on { width: 18px; background: var(--accent); }

/* ---------- 数码资讯：条目式列表 ---------- */
.news-list {
  list-style: none; margin: 0; padding: 0;
  max-height: 400px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.news-list::-webkit-scrollbar { width: 5px; }
.news-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }
.news-item + .news-item { border-top: 1px dashed var(--border); }
.news-item a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  transition: background-color 0.12s ease;
}
.news-item a:hover { background: var(--hover); }
.ni-src {
  flex: 0 0 auto; min-width: 56px; text-align: center;
  font-size: 11.5px; color: var(--accent);
  background: var(--hover);
  padding: 2px 8px; border-radius: 6px;
}
.ni-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ni-title {
  font-size: 13.5px; font-weight: 500; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ni-sum {
  font-size: 12px; color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ni-go { flex: 0 0 auto; color: var(--text-2); opacity: 0.5; font-size: 15px; }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .work-deck { height: 320px; }
  .news-list { max-height: 340px; }
}
@media (max-width: 520px) {
  .work-deck { height: 250px; }
  .ws-title { font-size: 15px; }
  .news-list { max-height: 300px; }
  .news-item a { gap: 8px; padding: 9px 8px; }
  .ni-sum { display: none; }
}

/* ============================================================
   2026-10-14 傍晚 · 作品 / 资讯模块卡片底框（悬浮感）
   ============================================================ */
.block-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow:
    0 1px 2px rgba(16, 24, 40, 0.05),
    0 6px 18px rgba(16, 24, 40, 0.07),
    0 16px 40px rgba(16, 24, 40, 0.05);
  padding: 18px 20px 20px;
  margin-bottom: 26px;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
@media (hover: hover) {
  .block-card:hover {
    transform: translateY(-2px);
    box-shadow:
      0 2px 4px rgba(16, 24, 40, 0.06),
      0 10px 26px rgba(16, 24, 40, 0.09),
      0 24px 56px rgba(16, 24, 40, 0.07);
  }
}
.block-card .block-head { margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
/* 卡片内的翻页 Deck：细边框收边，高度略减给底框留白 */
.block-card .work-deck { height: 380px; border: 1px solid var(--border); }
.block-card .news-list { max-height: 360px; }
.block-card .sub-entry { margin-top: 14px; }
.block-card .disclaimer { margin: 12px 2px 0; }
@media (max-width: 860px) {
  .block-card { padding: 15px 14px 16px; }
  .block-card .work-deck { height: 310px; }
}
@media (max-width: 520px) {
  .block-card { padding: 13px 11px 14px; border-radius: 14px; }
  .block-card .work-deck { height: 235px; }
  .block-card .news-list { max-height: 300px; }
}

/* ============================================================
   2026-10-14 晚 · 作品 / 资讯两卡片改为左右两栏
   ============================================================ */
.duo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
  margin-bottom: 26px;
}
.duo-grid .block-card { margin-bottom: 0; min-width: 0; }
/* 半幅宽度下压缩纵向：折叠卡与资讯列表高度对齐（deck 380 + dots 26 ≈ list 406） */
.duo-grid .work-deck { height: 380px; }
.duo-grid .news-list { max-height: 410px; }
@media (max-width: 860px) {
  .duo-grid { grid-template-columns: 1fr; gap: 0; }
  .duo-grid .block-card { margin-bottom: 26px; }
  .duo-grid .work-deck { height: 310px; }
  .duo-grid .news-list { max-height: 340px; }
}

/* ============================================================
   2026-10-14 晚 2 · 两卡等高 + 整体收小
   ============================================================ */
.duo-grid { align-items: stretch; }
@media (min-width: 861px) {
  /* 整栏定高（原 ~513px 收 20% ≈ 410px），两卡 stretch 等高；
     左列 deck 弹性吃满、右列资讯列表弹性吃满 → 内部各自滚动，底边齐平 */
  .duo-grid { grid-template-rows: 410px; }
  .duo-grid .block-card { display: flex; flex-direction: column; padding: 14px 16px 15px; }
  .duo-grid .block-head { flex: 0 0 auto; }
  .duo-grid .work-deck { flex: 1 1 auto; height: auto; min-height: 0; }
  .duo-grid .news-list { flex: 1 1 auto; max-height: none; min-height: 0; }
  .duo-grid .deck-dots, .duo-grid .sub-entry { flex: 0 0 auto; }
}

/* ============================================================
   2026-10-18 · 布局优化：作品栏 2/3、工具入口四联、笔记页
   ============================================================ */

/* ---------- 作品栏加宽到 2/3，资讯压到 1/3 ---------- */
@media (min-width: 861px) {
  .duo-grid { grid-template-columns: 2fr 1fr; }
}

/* ---------- 资讯：补时间 ---------- */
.ni-time {
  flex: 0 0 auto;
  font-size: 11.5px;
  color: var(--text-2);
  opacity: 0.72;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
@media (max-width: 1100px) { .ni-time { display: none; } }

/* ---------- 底部工具入口：四联图标卡 ---------- */
.block-pair { grid-template-columns: repeat(4, 1fr); gap: 12px; }
.panel { gap: 2px; padding: 15px 16px; }
.panel-ico {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px;
  background: var(--hover);
  color: var(--accent);
  margin-bottom: 7px;
  transition: background-color 0.16s ease, transform 0.16s ease;
}
.panel:hover .panel-ico { background: var(--accent); color: var(--accent-text); transform: translateY(-1px); }
.panel-title { font-size: 14.5px; }
.panel-desc { font-size: 12px; }
@media (max-width: 860px) {
  .block-pair { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .panel { padding: 13px 13px; }
  .panel-ico { width: 28px; height: 28px; }
  .panel-title { font-size: 13.5px; }
  .panel-desc { font-size: 11.5px; }
}

/* ---------- 装修笔记：列表 ---------- */
.note-list { display: grid; gap: 12px; margin-bottom: 8px; }
.note-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 6px 18px rgba(16, 24, 40, 0.05);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
@media (hover: hover) {
  .note-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 2px 4px rgba(16, 24, 40, 0.05), 0 12px 28px rgba(16, 24, 40, 0.09);
  }
}
.nc-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nc-tag {
  font-size: 11.5px; color: var(--accent);
  background: var(--hover);
  padding: 2px 9px; border-radius: 6px;
}
.nc-date, .nc-min { font-size: 11.5px; color: var(--text-2); opacity: 0.8; }
.nc-title { font-size: 16.5px; font-weight: 600; letter-spacing: 0.2px; }
.nc-sum { font-size: 13px; color: var(--text-2); line-height: 1.7; }
.nc-go { font-size: 12.5px; color: var(--accent); margin-top: 2px; }

/* ---------- 装修笔记：正文 ---------- */
.note-article { max-width: 760px; margin: 0 auto; }
.na-back { display: inline-block; font-size: 13px; color: var(--accent); margin-bottom: 16px; }
.na-back:hover { text-decoration: underline; }
.na-head { padding-bottom: 14px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.na-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.na-head h1 { font-size: 23px; font-weight: 650; line-height: 1.45; letter-spacing: 0.2px; }
.na-sum { margin-top: 10px; font-size: 14px; color: var(--text-2); line-height: 1.75; }
.na-body p { font-size: 15px; line-height: 1.9; margin: 14px 0; }
.na-body h3 { font-size: 16.5px; font-weight: 600; margin: 28px 0 6px; letter-spacing: 0.2px; }
.na-body h3::before {
  content: ""; display: inline-block;
  width: 3px; height: 15px; margin-right: 9px; border-radius: 2px;
  background: var(--accent); vertical-align: -2px;
}
.na-body ul { margin: 12px 0 18px; padding-left: 20px; }
.na-body li { font-size: 14.5px; line-height: 1.85; color: var(--text); margin: 5px 0; }
@media (max-width: 520px) {
  .na-head h1 { font-size: 19.5px; }
  .na-body p { font-size: 14.5px; line-height: 1.85; }
  .note-card { padding: 14px 14px; }
}

/* ---------- 资讯条目：窄栏纵向版式（1/3 宽度下可读） ---------- */
.news-item a { align-items: flex-start; gap: 8px; padding: 10px 11px; }
.ni-main { gap: 3px; }
.ni-title {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}
.ni-sum {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-2);
}
.ni-meta {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--text-2); opacity: 0.85;
  margin-top: 1px;
}
.ni-meta .ni-src {
  min-width: 0; background: none; padding: 0;
  font-size: 11px; text-align: left; color: var(--accent);
}
.ni-meta .ni-sep { opacity: 0.5; }
.ni-meta .ni-time { display: inline; }
@media (max-width: 1100px) { .ni-meta .ni-time { display: inline; } }
.ni-go { font-size: 14px; align-self: center; }

/* ---------- 修复：作品卡占位层不该盖住已加载的图 ----------
   占位与 img 同在 .ws-media 内，绝对定位会永远压在 img 之上。
   改为：默认不显示；仅「无封面图」或「图加载失败(.broken)」时出现。 */
.ws-fallback { display: none; }
.ws-media > .ws-fallback:first-child { display: flex; }
.ws-media img.broken + .ws-fallback { display: flex; }

/* hidden 属性对 display:grid 的元素不生效（作者样式覆盖 UA 的 [hidden]），需显式声明 */
.note-list[hidden] { display: none; }

/* ============================================================
   2026-10-18 · 工具台：分组标题 + 装修估算四件
   ============================================================ */
.tool-group-title {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  margin: 0 0 10px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.04em; color: var(--text-2);
}
#tool-grid > .tool-group-title:not(:first-child) { margin-top: 26px; }
.tool-group-note { font-size: 12px; font-weight: 400; letter-spacing: 0; opacity: 0.72; }

/* 卡片内的单位后缀（㎡ / m 长 / 片） */
.tc-unit { flex: 0 0 auto; font-size: 12.5px; color: var(--text-2); white-space: nowrap; }

/* 结果行：左标签右数值，虚线分隔，数字等宽 */
.tc-line {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 5px 0; border-bottom: 1px dashed var(--border);
  font-size: 13px;
}
.tc-line:last-of-type { border-bottom: 0; }
.tc-line > span:first-child { color: var(--text-2); flex: 0 0 auto; }
.tc-line > span:last-child {
  text-align: right; color: var(--text);
  font-variant-numeric: tabular-nums; font-weight: 500;
}
.tc-line strong { font-weight: 600; color: var(--accent); }
.tc-line.tc-hero { border-bottom: 1px solid var(--border); padding-bottom: 8px; margin-bottom: 2px; }
.tc-line.tc-hero > span:first-child { color: var(--text); font-weight: 600; }
.tc-line.tc-hero > span:last-child { font-size: 16px; font-weight: 700; color: var(--accent); }

.tc-note {
  margin: 9px 0 0; padding-top: 8px; border-top: 1px solid var(--border);
  font-size: 11.5px; line-height: 1.65; color: var(--text-2); opacity: 0.85;
}

@media (max-width: 860px) {
  .tc-line { font-size: 12.5px; }
  .tc-line.tc-hero > span:last-child { font-size: 15px; }
}

/* ============================================================
   2026-10-18 · 资讯页：分类 tab
   （按钮复用观点页的 .cat-chip 胶囊样式，这里只补容器与禁用态）
   ============================================================ */
.news-cats {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 0 0 6px;
}
.news-cats .cat-chip { font-size: 12.5px; padding: 4px 12px; }
.news-cats .cat-chip .cat-n { font-variant-numeric: tabular-nums; }
.news-cats .cat-chip:disabled {
  opacity: 0.38; cursor: not-allowed;
  border-color: var(--border); background: var(--surface); color: var(--text-2);
}
.news-cats .cat-chip:disabled:hover { border-color: var(--border); color: var(--text-2); }

/* hidden 对 display:flex/grid 元素无效，显式兜一层 */
.news-item[hidden] { display: none; }
details.news-day[hidden] { display: none; }
@media (max-width: 480px) {
  .news-cats { gap: 6px; }
  .news-cats .cat-chip { font-size: 12px; padding: 4px 9px; gap: 4px; }
}

/* 工具台分组排布（2026-10-18）：
   1) 卡片不拉伸 —— 否则「单位换算」「今天」这种内容少的卡会被计算器撑出一大片空白
   2) 装修组固定 2×2，避免 3+1 落单 */
#tool-grid > .tool-grid { align-items: start; }
.tool-grid.cols2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) {
  .tool-grid.cols2 { grid-template-columns: 1fr; }
}
/* 装修组行内等高，避免底边错位（常用组仍不拉伸） */
#tool-grid > .tool-grid.cols2 { align-items: stretch; }

/* 笔记正文行内加粗（**text**）——用强调色，长文里一眼能抓住要点 */
.na-body strong { font-weight: 600; color: var(--accent); }

/* ---------- 工具台：下载卡片（2026-10-18 上架首批离线工具） ---------- */
.dl-grid { grid-template-columns: repeat(2, 1fr); }
.dl-card {
  display: flex; flex-direction: column; gap: 3px;
  padding: 16px 17px 15px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
@media (hover: hover) {
  .dl-card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
    box-shadow: 0 6px 18px rgba(16, 24, 40, .09);
  }
}
.dl-ico {
  width: 34px; height: 34px; margin-bottom: 9px;
  display: grid; place-items: center;
  border-radius: 10px; background: var(--hover); color: var(--accent);
}
.dl-name { font-size: 14px; font-weight: 600; color: var(--text); }
.dl-desc { font-size: 12.5px; line-height: 1.6; color: var(--text-2); }
.dl-meta { margin-top: 9px; font-size: 11.5px; color: var(--text-2); opacity: .78; }
@media (max-width: 860px) { .dl-grid { grid-template-columns: 1fr; } }

/* ---------- 影音库：无海报时的「片单」版式（2026-10-18） ---------- */
.mt-ph {
  font-size: 32px; font-weight: 600; letter-spacing: 2px;
  color: var(--accent); opacity: .5;
}
.media-grid.no-poster { grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); }
.media-grid.no-poster .media-thumb { aspect-ratio: 4 / 3; }
.media-grid.no-poster .media-note {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; margin-top: 4px; line-height: 1.55;
}
.media-grid.no-poster .media-body { padding: 11px 13px 13px; }

/* 片单模式再收一档：首字块用 16:9，卡片整体矮下来，一屏能看全 */
.media-grid.no-poster .media-thumb { aspect-ratio: 16 / 9; }
.media-grid.no-poster .mt-ph { font-size: 26px; }

/* 片单模式收尾：4 列 2 行正齐，首字块压成装饰色带 */
.media-grid.no-poster { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.media-grid.no-poster .media-thumb { aspect-ratio: 3 / 1; }
.media-grid.no-poster .mt-ph { font-size: 22px; letter-spacing: 1px; opacity: .42; }

/* ---------- 顶部条：地点 + 时间（2026-10-18 下线天气） ---------- */
.mini-place {
  display: inline-flex; align-items: center; gap: 6px;
  font-variant-numeric: tabular-nums;
}
.mini-place svg { color: var(--accent); flex: none; opacity: .85; }
.mini-place .mp-city { opacity: .75; }
.mini-place .mp-time { font-weight: 500; letter-spacing: .3px; color: var(--text); }
@media (max-width: 860px) {
  .mini-place .mp-city { opacity: .68; }
}

/* ============================================================
   2026-10-18 · /news 只保留当天后解除 400px 限制
   （原先限高是为了压住多天历史，现在一天 20 来条应正常铺开，
     否则整页只剩一个 400px 小滚动框，看着像加载失败）
   只作用于资讯页，不改首页 duo-grid 里的窄栏滚动
   ============================================================ */
.news-container .news-list {
  max-height: none;
  overflow-y: visible;
  padding-right: 0;
}
.news-container .news-list::-webkit-scrollbar { width: 0; }

/* ---------- 首页案例折叠卡：补充说明行与全景角标（2026-10-19） ---------- */
.ws-lead {
  color: rgba(255, 255, 255, .84);
  font-size: 12.5px; line-height: 1.5;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .45);
}
.ws-pano {
  position: absolute; right: 12px; top: 12px;
  padding: 2px 9px;
  font-size: 11px; color: #fff;
  background: rgba(12, 18, 28, .55);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
@media (max-width: 860px) {
  .ws-lead { font-size: 11.5px; }
}
