:root {
  color-scheme: light dark;
  --bg: #f6f1e6;
  --paper: #fcf9f1;
  --ink: #1b1914;
  --muted: #736c5f;
  --line: #ddd4c2;
  --accent: #8c2f39;
  --tape: rgba(201, 150, 43, .35);
  --photo-bg: #ebe4d4;
  --dark: #1b1914;
  --dark-ink: #f8f4ea;
  --burgundy: #8c2f39;
  --navy: #1f3a5f;
  --mustard: #906619;
  --teal: #2f6f6a;
  --sepia: #765a3f;
  --rose: #9b3647;
  --ai-bg: #1f3a5f;
  --serif: Georgia, "Songti SC", "STSong", "Noto Serif SC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --wrap: min(1080px, calc(100% - 36px));
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15140f;
    --paper: #1d1c16;
    --ink: #ece6d8;
    --muted: #9c9587;
    --line: #36332a;
    --accent: #e0747c;
    --tape: rgba(185, 134, 42, .35);
    --photo-bg: #26241d;
    --dark: #0e0d0a;
    --burgundy: #e0747c;
    --navy: #7ea6d8;
    --mustard: #e0b25a;
    --teal: #6fc0b6;
    --sepia: #c9a57f;
    --rose: #f08497;
  }
}

[data-tone="burgundy"], [data-kind="日记"] { --tone: var(--burgundy); }
[data-tone="navy"], [data-kind="长文"] { --tone: var(--navy); }
[data-tone="mustard"], [data-kind="思考"] { --tone: var(--mustard); }
[data-tone="teal"], [data-kind="旧文"] { --tone: var(--teal); }
[data-tone="sepia"], [data-kind="旧日记"] { --tone: var(--sepia); }
[data-tone="rose"], [data-kind="笔记"] { --tone: var(--rose); }

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--bg); font: 16px/1.75 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
::selection { color: var(--ink); background: color-mix(in srgb, var(--accent) 20%, var(--bg)); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.wrap { width: var(--wrap); margin: 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 8px; left: 16px; z-index: 30; padding: 8px 14px; color: var(--bg); background: var(--ink); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

/* 桌面侧边导航与手机底部导航共享相同目的地。 */
body { padding-left: 200px; }
html { scroll-padding-bottom: 24px; }
.site-nav { position: fixed; z-index: 20; inset: 0 auto 0 0; width: 200px; display: flex; flex-direction: column; padding: 44px 24px 28px; background: var(--bg); border-right: 1px solid var(--line); overflow-y: auto; }
.site-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin: 0 8px 36px; padding: 0; }
.site-brand strong { font: 600 34px/1.2 var(--serif); }
.site-brand small { color: var(--muted); font: 11px/1 var(--mono); letter-spacing: .13em; }
.main-nav { display: flex; flex-direction: column; gap: 8px; }
.main-nav a { display: flex; align-items: center; gap: 14px; min-height: 46px; padding: 10px 12px; color: var(--muted); border-radius: 3px; font: 500 14px/1.4 var(--sans); }
.main-nav svg { width: 20px; height: 20px; flex: 0 0 auto; }
.main-nav a[aria-current] { color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--bg)); font-weight: 600; }
.main-nav a:active { background: color-mix(in srgb, var(--accent) 14%, var(--bg)); }
.site-nav-note { margin: auto 8px 0; padding-top: 36px; color: var(--muted); font: 12px/1.9 var(--sans); }
.mobile-heading { display: none; }
@media (hover: hover) and (pointer: fine) {
  .main-nav a:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 5%, var(--bg)); }
}
@media (min-width: 961px) and (max-width: 1100px) {
  .hero, .about-grid { grid-template-columns: 1fr; }
  .now { max-width: 460px; }
}
@media (max-width: 960px) {
  body { padding-left: 0; padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  html { scroll-padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
  .site-nav { inset: auto 0 0; width: auto; display: block; padding: 0 8px env(safe-area-inset-bottom, 0px); border-right: 0; border-top: 1px solid var(--line); background: var(--paper); overflow: visible; }
  .site-brand, .site-nav-note { display: none; }
  .main-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; }
  .main-nav a { min-height: 66px; flex-direction: column; justify-content: center; gap: 5px; padding: 8px 0; font-size: 11px; border-radius: 0; }
  .main-nav svg { width: 22px; height: 22px; }
  .main-nav a[aria-current] { background: transparent; }
  .main-nav a[aria-current] svg { stroke-width: 2; }
  .main-nav .desktop-nav-item { display: none; }
  .mobile-heading { display: flex; align-items: center; justify-content: space-between; min-height: 54px; padding-top: env(safe-area-inset-top, 0px); border-bottom: 1px solid var(--line); }
  .mobile-heading a { display: inline-flex; align-items: center; min-height: 44px; font: 600 18px/1 var(--serif); }
  .mobile-heading span { color: var(--muted); font: 11px/1.4 var(--mono); letter-spacing: .08em; }
  .section { scroll-margin-top: 24px; }
}

/* 首屏 */
.hero { display: grid; grid-template-columns: 1fr 330px; gap: clamp(28px, 6vw, 64px); align-items: start; padding: clamp(32px, 5vw, 64px) 0 20px; }
.eyebrow { margin: 0; color: var(--accent); font: 700 11px/1.2 var(--mono); letter-spacing: .16em; text-transform: uppercase; }
.hero h1 { margin: 16px 0 20px; font: 600 clamp(72px, 10vw, 112px)/.95 var(--serif); }
.hero h1 span { display: block; margin-top: 16px; color: var(--muted); font: 400 clamp(15px, 2vw, 18px)/1 var(--mono); letter-spacing: .06em; }
.tagline { max-width: 560px; margin: 0; font-size: clamp(17px, 2.2vw, 20px); line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; font-size: 14px; }
.hero-actions a { display: inline-flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 44px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 3px; }
.hero-actions a:first-child { color: var(--paper); background: var(--accent); border-color: var(--accent); }
.hero-actions a:hover { border-color: var(--accent); }
.hero-actions a:active { opacity: .8; }
.links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 18px 0 0; padding: 0; list-style: none; font-size: 14px; }
.links a, .links span { color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.links a:hover { color: var(--accent); border-color: var(--accent); }

/* 现在：贴在页面上的纸条 */
.now { position: relative; margin-top: 12px; padding: 30px 26px 24px; background: var(--paper); border: 1px solid var(--ink); box-shadow: 7px 7px 0 color-mix(in srgb, var(--ink) 14%, transparent); transform: rotate(1.2deg); }
.now::before { content: ""; position: absolute; top: -12px; left: 50%; width: 92px; height: 24px; background: var(--tape); transform: translateX(-50%) rotate(-3deg); }
.now h2 { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 12px; font: 700 12px/1 var(--mono); letter-spacing: .14em; }
.now h2 time { color: var(--muted); font-weight: 400; letter-spacing: .04em; }
.now ul { margin: 0; padding: 0; list-style: none; }
.now li { position: relative; padding: 9px 0 9px 18px; border-top: 1px dashed var(--line); font-size: 14.5px; line-height: 1.6; }
.now li::before { content: ""; position: absolute; left: 2px; top: 18px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* 分节 */
.section { padding: clamp(36px, 5vw, 56px) 0 0; scroll-margin-top: 76px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.section-head h2 { margin: 0; font: 800 clamp(24px, 3.4vw, 32px)/1.1 var(--serif); letter-spacing: -.02em; }
.section-head h2 small { margin-left: 10px; color: var(--muted); font: 600 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; vertical-align: middle; }
.section-head a { color: var(--muted); font-size: 14px; white-space: nowrap; }
.section-head a:hover { color: var(--accent); }

/* 关于 */
.about-grid { display: grid; grid-template-columns: 1fr 1.35fr; gap: 18px; }
.motto { position: relative; margin: 0; padding: clamp(24px, 4vw, 38px); color: var(--dark-ink); background: var(--dark); border-radius: 2px; overflow: hidden; }
.motto::before { content: "“"; position: absolute; right: 18px; top: -30px; color: var(--burgundy); font: 900 180px/1 var(--serif); opacity: .55; }
.motto p { position: relative; margin: 0 0 22px; font: 700 clamp(21px, 2.8vw, 27px)/1.6 var(--serif); }
.motto footer { color: #b3ab9b; font: 12px/1.5 var(--mono); letter-spacing: .04em; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.facts:has(> .fact:nth-child(3):last-child) { grid-template-columns: 1fr; }
.facts:has(> .fact:nth-child(3):last-child) .fact { display: grid; grid-template-columns: 70px 1fr; align-items: baseline; gap: 4px 14px; border-top-width: 1px; }
.facts:has(> .fact:nth-child(3):last-child) .fact strong { margin-top: 0; font-size: 20px; }
.facts:has(> .fact:nth-child(3):last-child) .fact small { grid-column: 2; margin-top: 0; }
.fact { position: relative; padding: 16px 16px 18px; background: var(--paper); border: 1px solid var(--line); }
.fact span { display: block; color: var(--tone); font: 700 10px/1 var(--mono); letter-spacing: .16em; }
.fact strong { display: block; margin-top: 10px; font: 700 17px/1.4 var(--serif); }
.fact small { display: block; margin-top: 6px; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.pillar { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 16px 18px; background: color-mix(in srgb, var(--tone) 9%, var(--paper)); border: 1px solid color-mix(in srgb, var(--tone) 35%, var(--line)); }
.pillar-word { color: var(--tone); font: 900 24px/1 var(--serif); }
.pillar small { color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.pillar b { font: 800 22px/1 var(--serif); white-space: nowrap; }
.pillar b em { margin-left: 2px; color: var(--muted); font: 500 11px/1 var(--sans); font-style: normal; }
a.pillar:hover { border-color: var(--tone); }

/* 日记印样 */
.contact-sheet { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 16px; }
.diary-card { display: block; min-width: 0; }
.frame { position: relative; display: block; overflow: hidden; color: var(--dark-ink); background: #000; aspect-ratio: 4 / 3; border: 8px solid var(--dark); border-top: 3px solid var(--tone, transparent); }
.frame img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease, opacity .3s ease; opacity: .92; }
.frame:hover img { transform: scale(1.03); opacity: 1; }
.card-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 8px; margin: 10px 0 6px; color: var(--muted); font: 11px/1.4 var(--mono); }
.card-meta b { font-weight: 600; }
.card-title { display: -webkit-box; min-height: 3em; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; color: var(--ink); font: 600 19px/1.5 var(--serif); text-wrap: pretty; }
.diary-card:hover .card-title { color: var(--tone, var(--accent)); }
.frame.text-only { display: flex; flex-direction: column; justify-content: space-between; padding: 16px; background: color-mix(in srgb, var(--tone, #333) 22%, #1e1d17); }
.frame.text-only p, .frame.text-only strong { margin: 0 0 10px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.frame.text-only p { font: 500 15px/1.6 var(--serif); }
.frame.text-only strong { font: 800 19px/1.45 var(--serif); }
.frame:hover { filter: brightness(1.08); }
.empty-note { padding: 28px; color: var(--muted); border: 1px dashed var(--line); font-size: 14px; }

/* 热力图 */
.heatmap { margin: 14px 0 0; }
.heat-grid { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 1fr); gap: 3px; overflow-x: auto; padding-bottom: 4px; }
.heat-grid i, .heat-legend i { display: block; width: 11px; height: 11px; border-radius: 2px; background: color-mix(in srgb, var(--ink) 8%, transparent); }
.heat-grid .l1, .heat-legend .l1 { background: color-mix(in srgb, var(--burgundy) 38%, transparent); }
.heat-grid .l2, .heat-legend .l2 { background: color-mix(in srgb, var(--burgundy) 68%, transparent); }
.heat-grid .l3, .heat-legend .l3 { background: var(--burgundy); }
.heatmap figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 8px; color: var(--muted); font-size: 12.5px; }
.heatmap figcaption b { color: var(--ink); }
.heat-legend { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; }

/* 时间线 */
.timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.timeline::before { content: ""; position: absolute; left: 118px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline li { position: relative; display: grid; grid-template-columns: 104px 1fr; gap: 36px; padding: 14px 0; }
.timeline li::before { content: ""; position: absolute; left: 112px; top: 22px; width: 14px; height: 14px; border-radius: 50%; background: var(--tone); box-shadow: 0 0 0 4px var(--bg); }
.timeline .when { padding-top: 3px; color: var(--tone); font: 700 13px/1.4 var(--mono); text-align: right; }
.timeline strong { display: block; font: 700 19px/1.4 var(--serif); }
.timeline p { margin: 4px 0 0; max-width: 720px; color: var(--muted); font-size: 15px; line-height: 1.75; }
.evidence { display: inline-block; margin-top: 6px; color: var(--tone); font-size: 13px; border-bottom: 1px solid currentColor; }
.ledger-note { margin: 12px 0 0; color: var(--muted); font-size: 12.5px; }

/* 讲台 */
.stage-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.stage-card { display: flex; flex-direction: column; min-width: 0; background: var(--paper); border: 1px solid var(--line); }
.stage-visual { display: block; height: 240px; overflow: hidden; background: color-mix(in srgb, var(--line) 25%, var(--paper)); border-bottom: 1px solid var(--line); }
.stage-visual img { display: block; width: 100%; height: 100%; object-fit: contain; transition: transform .2s; }
.stage-photo img { object-fit: cover; object-position: bottom; }
.stage-visual:hover img { transform: scale(1.025); }
.stage-copy { display: flex; flex-direction: column; gap: 10px; padding: 20px; flex: 1; }
.stage-when { color: var(--tone); font: 700 11px/1.6 var(--mono); }
.stage-card h3 { margin: 0; font: 700 21px/1.4 var(--serif); }
.stage-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.75; }
.stage-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding-top: 10px; }
.stage-actions a { display: inline-flex; align-items: center; min-height: 44px; color: var(--tone); font-size: 12.5px; }
.stage-actions a:last-child { color: var(--muted); }
@media (max-width: 1100px) and (min-width: 721px) { .stage-grid { grid-template-columns: 1fr; } .stage-card { flex-direction: row; } .stage-visual { width: 38%; flex-shrink: 0; height: 260px; border-bottom: 0; border-right: 1px solid var(--line); } }
@media (max-width: 720px) { .stage-grid { grid-template-columns: 1fr; gap: 24px; } .stage-visual { height: 260px; } }

/* 项目 */
.ai-card { display: grid; grid-template-columns: 1fr auto; gap: 26px; align-items: end; margin-bottom: 18px; padding: clamp(24px, 4vw, 36px); color: var(--dark-ink); background: var(--ai-bg); border-radius: 2px; }
.ai-card .domain { display: block; margin-bottom: 18px; color: #f0c56b; font: 700 12px/1 var(--mono); letter-spacing: .12em; }
.ai-card strong { display: block; margin-bottom: 8px; font: 700 clamp(22px, 3.6vw, 32px)/1.15 var(--serif); }
.ai-card p { max-width: 620px; margin: 0; color: #c9d3e0; font-size: 14px; line-height: 1.7; }
.ai-card .arrow { font-size: 28px; }
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.project-card { overflow: hidden; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 60%, transparent); }
.project-card img { display: block; width: 100%; height: 150px; object-fit: contain; background: var(--photo-bg); border-bottom: 1px solid var(--line); }
.project-copy { display: block; padding: 18px 20px 22px; }
.project-card .repo { color: var(--muted); font: 10px/1.3 var(--mono); letter-spacing: .03em; }
.project-card strong { display: block; margin: 14px 0 6px; font-size: 17px; line-height: 1.35; }
.project-card small { display: block; color: var(--muted); font-size: 13px; line-height: 1.55; }
.project-card:hover strong { color: var(--accent); }

/* 联系 */
.channels { display: grid; grid-template-columns: repeat(6, 1fr); border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
.channel { display: block; padding: 18px 16px 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.channel span { display: block; color: var(--muted); font: 700 10px/1 var(--mono); letter-spacing: .14em; }
.channel strong { display: block; margin-top: 10px; font-size: 15px; word-break: break-all; }
.channel small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
a.channel:hover strong { color: var(--accent); }

.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: clamp(48px, 8vw, 80px); padding: 22px 0 36px; color: var(--muted); border-top: 1px solid var(--line); font-size: 12px; }
.footer a:hover { color: var(--ink); }
.footer nav { display: flex; gap: 16px; }

/* 类型标签与筛选 */
.kind { display: inline-block; margin-right: 8px; padding: 1px 7px; color: var(--tone); border: 1px solid color-mix(in srgb, var(--tone) 55%, transparent); border-radius: 999px; font: 600 11px/1.6 var(--sans); vertical-align: 2px; }
.kind-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 18px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 12.5px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filters button { min-height: 44px; padding: 8px 12px; color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 999px; font: 500 13px/1.2 var(--sans); cursor: pointer; }
.filters button span { margin-left: 6px; color: var(--muted); font: 11px/1 var(--mono); }
.filters button:hover { border-color: var(--tone, var(--ink)); }
.filters button[aria-pressed="true"] { color: var(--bg); background: var(--tone, var(--ink)); border-color: var(--tone, var(--ink)); }
.filters button[aria-pressed="true"] span { color: inherit; opacity: .8; }

/* 日记列表 */
.page-head { padding: clamp(30px, 5vw, 56px) 0 18px; }
.page-head h1 { margin: 12px 0 10px; font: 600 clamp(34px, 5vw, 52px)/1.2 var(--serif); }
.page-head > p { margin: 0 0 8px; color: var(--muted); }
.page-head a { color: var(--accent); }
.archive-details { margin-top: 10px; color: var(--muted); font-size: 13px; }
.archive-details summary { width: fit-content; min-height: 36px; padding: 6px 0; cursor: pointer; }
.archive-details[open] { padding-bottom: 12px; }
.archive-controls { position: sticky; top: 0; z-index: 5; display: flex; flex-direction: column; gap: 12px; padding: 14px 0; background: var(--bg); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.archive-searchrow { display: grid; grid-template-columns: minmax(0, 560px) 140px; align-items: start; gap: 12px; }
.archive-search { display: flex; align-items: center; max-width: 560px; min-height: 44px; background: var(--paper); border: 1px solid var(--line); border-radius: 3px; }
.archive-search:focus-within { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 2px; }
.archive-search input { flex: 1; min-width: 0; padding: 10px 14px; color: var(--ink); background: transparent; border: 0; border-radius: 3px; font: 16px/1.5 var(--sans); outline: 0; }
.archive-search input::placeholder { color: var(--muted); }
.archive-search button { min-height: 44px; padding: 8px 12px; color: var(--accent); background: transparent; border: 0; font: 13px/1.5 var(--sans); cursor: pointer; }
.archive-filterbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.type-filter select { min-height: 44px; max-width: 160px; padding: 8px 28px 8px 10px; color: var(--muted); background: var(--bg); border: 1px solid var(--line); border-radius: 3px; font: 13px/1.5 var(--sans); cursor: pointer; }
.search-result { margin: 18px 0 0; color: var(--muted); font-size: 14px; }
.no-results { padding: 48px 0; }
.no-results h2 { margin: 0 0 10px; font: 600 22px/1.5 var(--sans); }
.no-results p { color: var(--muted); }
.no-results button { min-height: 44px; padding: 8px 16px; color: var(--paper); background: var(--accent); border: 0; border-radius: 3px; font: 14px/1.5 var(--sans); cursor: pointer; }
.month { margin: 28px 0 0; color: var(--accent); font: 600 12px/1 var(--mono); letter-spacing: .12em; scroll-margin-top: 220px; }
.entry-row { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--line); align-items: start; }
.entry-row.has-photo { grid-template-columns: 52px minmax(0, 1fr) 140px; }
.row-copy { min-width: 0; }
.row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.entry-row .day { font: 600 32px/1 var(--serif); }
.entry-row .day small { display: block; margin-top: 8px; color: var(--muted); font: 11px/1 var(--mono); letter-spacing: .08em; }
.entry-row h2 { margin: 5px 0 0; font: 600 19px/1.55 var(--sans); text-wrap: pretty; }
.entry-row p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin: 8px 0 0; color: var(--muted); font-size: 14.5px; line-height: 1.7; }
.entry-row .place { color: var(--muted); font: 11px/1.5 var(--sans); }
.entry-row:hover h2 { color: var(--tone, var(--accent)); }
.thumbs { position: relative; display: block; }
.thumbs img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--photo-bg); }
.thumbs.one img { aspect-ratio: 4 / 3; }
.thumb-count { position: absolute; right: 4px; bottom: 4px; padding: 1px 5px; color: var(--dark-ink); background: rgba(27,25,20,.8); border-radius: 2px; font: 11px/1.5 var(--sans); }

/* 单篇 */
.entry { width: min(680px, calc(100% - 40px)); margin: 0 auto; padding: clamp(24px, 4vw, 44px) 0 0; }
.entry-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; color: var(--muted); font-size: 13px; }
.entry-tools a { display: inline-flex; align-items: center; min-height: 44px; }
.entry-tools a:hover { color: var(--accent); }
.entry-meta { color: var(--muted); font: 12px/1.4 var(--mono); letter-spacing: .08em; }
.entry-meta b { color: var(--tone, var(--accent)); }
.entry-format { margin-right: 10px; }
.entry h1 { margin: 14px 0 28px; font: 600 clamp(27px, 3.5vw, 36px)/1.45 var(--serif); text-wrap: balance; }
.entry-body { font-size: 18px; line-height: 1.9; overflow-wrap: anywhere; }
.entry-body p { margin: 0 0 1.2em; }
.entry-body h2, .entry-body h3 { margin: 1.8em 0 .6em; font-family: var(--serif); line-height: 1.3; }
.entry-body blockquote { margin: 1.4em 0; padding: 18px 20px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); }
.entry-body blockquote p:last-child { margin-bottom: 0; }
.reading-note { margin: 0 0 24px; padding: 16px 20px; color: var(--ink); background: color-mix(in srgb, var(--burgundy) 6%, var(--paper)); border: 1px solid var(--line); }
.reading-note b { color: var(--burgundy); font: 700 12px/1.5 var(--sans); letter-spacing: .08em; }
.entry-body .reading-note p { margin: 6px 0 0; font-size: 15px; line-height: 1.85; }
.entry-body a { color: var(--accent); border-bottom: 1px solid currentColor; }
.entry-body code { padding: 1px 5px; font: .88em var(--mono); background: var(--photo-bg); border-radius: 3px; }
.photos { display: grid; gap: 6px; margin: 1.6em 0; }
.photos-1 { grid-template-columns: 1fr; }
.photos-2, .photos-4 { grid-template-columns: 1fr 1fr; }
.photos-3 { grid-template-columns: repeat(3, 1fr); }
.photos figure { margin: 0; }
.photos img { display: block; width: 100%; background: var(--photo-bg); }
.photos:not(.photos-1) img { aspect-ratio: 1; object-fit: cover; }
.photos figcaption { margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.tags { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 26px 0 0; color: var(--tone, var(--muted)); font-size: 13px; }
.source-link { margin: 14px 0 0; color: var(--muted); font-size: 12.5px; }
.source-link a { color: var(--muted); border-bottom: 1px solid var(--line); }
.entry-end { margin: 32px 0 0; font-size: 14px; }
.entry-end a { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); }
.carousel { display: flex; gap: 8px; margin: 0 0 1.6em; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.carousel figure { position: relative; flex: 0 0 min(100%, 520px); margin: 0; scroll-snap-align: start; }
.carousel img { display: block; width: 100%; max-height: 78vh; object-fit: contain; background: var(--photo-bg); }
.carousel figcaption { position: absolute; right: 10px; top: 10px; padding: 2px 8px; color: #fff; background: rgba(0,0,0,.45); border-radius: 999px; font: 11px/1.6 var(--mono); }
.carousel:has(figure:only-child) figure { flex-basis: 100%; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; }
.pager a { color: var(--muted); }
.pager a:hover { color: var(--accent); }
.pager a span { display: block; color: var(--muted); font: 10px/1.6 var(--mono); letter-spacing: .14em; }
.pager .next { text-align: right; }
.pager a span { letter-spacing: .01em; font-size: 11px; }
.frame img, .thumbs img, .photos img, .carousel img { height: auto; }
.frame img, .thumbs img { aspect-ratio: 4 / 3; }
.heatmap { margin: 32px 0 0; padding: 22px; background: var(--paper); border: 1px solid var(--line); }
.heat-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.heat-head h3 { margin: 0; font: 600 18px/1.5 var(--sans); }
.heat-head p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.heat-month select, .archive-position select { min-height: 44px; max-width: 100%; padding: 8px 26px 8px 10px; color: var(--ink); border: 1px solid var(--line); border-radius: 3px; background: var(--paper); font: 13px/1.5 var(--sans); }
.heat-annual { margin: 18px 0; }
.heat-month-labels { display: grid; grid-template-columns: repeat(53, minmax(0, 1fr)); gap: 3px; margin: 0 0 7px; font: 11px/1 var(--sans); color: var(--muted); }
.heat-month-labels span { white-space: nowrap; }
.heat-grid { grid-auto-columns: minmax(0, 1fr); overflow: visible; width: 100%; gap: 3px; }
.heat-grid i, .heat-grid a { display: block; width: auto; height: auto; aspect-ratio: 1; border-radius: 2px; }
.heat-grid a:hover, .heat-grid a:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.heat-calendar { max-width: 480px; margin-top: 14px; }
.heat-calendar summary { min-height: 44px; cursor: pointer; color: var(--ink); font-size: 13px; }
.heat-calendar summary span { display: inline-block; margin-left: 8px; color: var(--muted); font-size: 12px; }
.heat-weekdays, .heat-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.heat-weekdays { margin-bottom: 7px; color: var(--muted); text-align: center; font-size: 12px; }
.heat-days a, .heat-days span { display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 44px; border-radius: 3px; font: 13px/1.3 var(--mono); }
.heat-days a { color: var(--ink); border: 1px solid transparent; }
.heat-days small { margin-top: 3px; font: 10px/1 var(--sans); }
.heat-days span { color: var(--muted); }
.heat-days a:hover, .heat-days a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.heat-days .l0 { background: color-mix(in srgb, var(--muted) 5%, var(--paper)); }
.heat-days .l1 { background: color-mix(in srgb, var(--teal) 17%, var(--paper)); }
.heat-days .l2 { background: color-mix(in srgb, var(--teal) 32%, var(--paper)); }
.heat-days .l3 { background: var(--teal); color: var(--paper); }
.heat-note { margin: 14px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.archive-position { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.archive-position b { font: 600 13px/1.5 var(--sans); }
.archive-position label { margin-left: auto; }
.archive-position button { min-height: 44px; padding: 4px 8px; background: none; color: var(--accent); border: 0; font: 12px/1.5 var(--sans); cursor: pointer; }
@media (max-width: 720px) {
  .heatmap { padding: 16px; }
  .heat-annual { display: none; }
  .heat-head h3 { font-size: 16px; }
  .heat-head p { font-size: 12px; }
  .heat-calendar { max-width: none; }
  .heat-calendar summary { font-size: 12px; }
  .heat-calendar summary span { margin-left: 3px; font-size: 11px; }
  .heat-month select { max-width: 145px; font-size: 12px; }
  .heat-days a, .heat-days span { min-height: 44px; }
  .archive-position { flex-wrap: wrap; }
  .archive-position b { font-size: 12px; }
  .archive-position select { max-width: 158px; font-size: 12px; }
}
.draft-flag { display: inline-block; margin-left: 8px; padding: 1px 6px; color: #fff; background: var(--accent); font: 700 10px/1.6 var(--mono); letter-spacing: .1em; vertical-align: middle; }

@media (max-width: 900px) {
  .hero, .about-grid { grid-template-columns: 1fr; }
  .now { width: calc(100% - 8px); max-width: 460px; transform: rotate(.6deg); }
  .channels { grid-template-columns: repeat(3, 1fr); }
  .pillars { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .facts, .project-grid { grid-template-columns: 1fr 1fr; }
  .contact-sheet { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
  .frame { border-width: 5px; border-top-width: 3px; }
  .card-title { min-height: 4.5em; font-size: 17px; }
  .card-meta { margin-top: 8px; font-size: 10px; }
  .reading-note { padding: 13px 15px; }
  .frame.text-only { padding: 12px; }
  .frame.text-only p { font-size: 13px; -webkit-line-clamp: 3; }
  .frame.text-only strong { font-size: 15px; -webkit-line-clamp: 3; }
  .ai-card { grid-template-columns: 1fr; }
  .ai-card .arrow { display: none; }
  .timeline::before { left: 7px; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; padding-left: 30px; }
  .timeline li::before { left: 1px; top: 18px; }
  .timeline .when { text-align: left; }
}

@media (max-width: 480px) {
  .hero { gap: 28px; }
  .hero h1 { font-size: 80px; }
  .project-grid { grid-template-columns: 1fr; }
  .channels { grid-template-columns: 1fr 1fr; }
  .photos-3 { grid-template-columns: 1fr 1fr; }
  .page-head { padding-bottom: 12px; }
  .page-head > p { font-size: 14px; }
  .archive-controls { gap: 8px; padding: 10px 0; }
  .archive-search { max-width: none; }
  .archive-searchrow { grid-template-columns: minmax(0, 1fr) 112px; gap: 8px; }
  .archive-filterbar { gap: 8px; }
  .filters { gap: 5px; }
  .filters button { padding: 8px 9px; font-size: 12px; }
  .filters button span { margin-left: 4px; font-size: 10px; }
  .type-filter { width: 100%; }
  .type-filter select { width: 100%; max-width: none; min-height: 44px; padding: 8px 22px 8px 8px; font-size: 12px; }
  .entry-row { grid-template-columns: 34px minmax(0, 1fr); gap: 10px; padding: 18px 0; }
  .entry-row.has-photo { grid-template-columns: 34px minmax(0, 1fr) 76px; }
  .entry-row .day { font-size: 25px; }
  .entry-row h2 { font-size: 16px; }
  .entry-row p { font-size: 13px; }
  .entry-row .kind { font-size: 10px; }
  .entry-body { font-size: 17px; }
  .entry-tools { margin-bottom: 12px; }
}

@media (hover: hover) and (pointer: fine) {
  .frame img { transition: transform .22s ease-out, opacity .22s ease-out; }
  .diary-card:hover .frame img { transform: scale(1.03); opacity: 1; }
}

@media (hover: none) {
  .frame img { transition: none; }
  .frame:hover img { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .frame img { transition: none; }
}

.video-note{margin:0 0 26px;padding:14px 16px;background:var(--paper);font-size:14px;line-height:1.8;border:1px solid var(--line);color:var(--muted)}
.video-note a{color:var(--burgundy);white-space:normal}

/* 地点把生活照片连成可浏览的足迹；底图与缩略图均同站加载。 */
.about-links { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 20px; font-size: 14px; }
.about-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); }
.footprints { padding-bottom: 24px; }
.footprint-explorer { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; gap: 28px; }
.foot-map-wrap { position: sticky; top: 24px; min-width: 0; }
.footprint-map { position: relative; height: 420px; overflow: hidden; background: color-mix(in srgb, var(--teal) 6%, var(--paper)); border: 1px solid var(--line); touch-action: pan-y; cursor: grab; }
.footprint-map:active { cursor: grabbing; }
.map-world { position: absolute; top: 0; left: 0; width: 100%; aspect-ratio: 2; transform-origin: 0 0; pointer-events: none; color: color-mix(in srgb, var(--sepia) 22%, var(--paper)); }
.map-world svg { display: block; width: 100%; height: auto; }
.map-world path { stroke: var(--paper); stroke-width: .5; vector-effect: non-scaling-stroke; }
.map-markers { position: absolute; inset: 0; pointer-events: none; }
.map-pin { position: absolute; width: 56px; height: 56px; padding: 3px; border: 1px solid var(--line); border-radius: 3px; background: var(--paper); transform: translate(-50%, -60%); cursor: pointer; pointer-events: auto; }
.map-pin img { display: block; width: 48px; height: 48px; object-fit: cover; border-radius: 1px; }
.map-pin span { position: absolute; top: -7px; right: -7px; min-width: 22px; padding: 3px 5px; background: var(--burgundy); color: var(--paper); border-radius: 20px; font: 600 11px/1.25 var(--sans); }
.map-pin small { position: absolute; top: calc(100% + 5px); left: 50%; transform: translateX(-50%); max-width: 130px; padding: 2px 6px; white-space: nowrap; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 3px; font: 12px/1.5 var(--sans); }
.map-pin[aria-pressed="true"] { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 1px; z-index: 2; }
.map-pin:active { border-color: var(--accent); }
.map-tools { position: absolute; top: 12px; right: 12px; display: flex; flex-direction: column; gap: 6px; }
.map-tools button { min-width: 44px; min-height: 44px; padding: 6px; border: 1px solid var(--line); border-radius: 3px; color: var(--ink); background: var(--paper); font: 13px/1.5 var(--sans); cursor: pointer; }
.map-tools [data-map-zoom] { font-size: 22px; }
.map-tools button:disabled { opacity: .45; cursor: default; }
.map-tools button:active { border-color: var(--accent); color: var(--accent); }
.map-note { position: absolute; bottom: 12px; left: 14px; padding: 3px 6px; background: var(--paper); color: var(--muted); font-size: 11px; pointer-events: none; }
.map-privacy { margin: 12px 0; color: var(--muted); font-size: 12px; }
.foot-place-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.foot-place-filters button { min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); background: var(--bg); font: 13px/1.5 var(--sans); cursor: pointer; }
.foot-place-filters button[aria-pressed="true"] { color: var(--paper); background: var(--accent); border-color: var(--accent); }
.map-credit { margin: 12px 0 0; color: var(--muted); font-size: 10px; }
.map-credit a { text-decoration: underline; text-underline-offset: 3px; }
.foot-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--ink); }
.foot-panel-head h2 { margin: 0; font: 600 23px/1.5 var(--serif); }
.foot-panel-head span { color: var(--muted); font-size: 12px; }
.foot-records { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
.foot-records[data-single="true"] { grid-template-columns: 1fr; }
.footprint-record { min-width: 0; }
.footprint-record > img { display: block; width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; border: 4px solid var(--ink); border-top: 2px solid var(--burgundy); }
.footprint-record > span { display: block; margin-top: 10px; color: var(--muted); font: 10px/1.6 var(--mono); }
.footprint-record h3 { margin: 5px 0; font: 600 17px/1.5 var(--serif); }
.footprint-record small { color: var(--muted); font-size: 11px; }
@media (hover: hover) and (pointer: fine) {
  .footprint-record:hover h3 { color: var(--accent); }
  .foot-place-filters button:hover { border-color: var(--accent); }
}
@media (max-width: 1100px) {
  .footprint-explorer { grid-template-columns: 1fr; }
  .foot-map-wrap { position: static; }
  .foot-records { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .footprint-map { height: 320px; }
  .footprint-explorer { gap: 28px; }
  .foot-records { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-place-filters button { padding: 7px 10px; font-size: 12px; }
}

.section { scroll-margin-top: 0; }
