/* ============================================================
   构图灵感 · Composition Inspiration
   第二版：日期归档 + 日历 + 图库 + 每日独立页
   依据 M3 设计规范 v2.0 落地（m3_design_spec_v2.md）
   ============================================================ */

:root {
  /* ---- 色彩 ---- */
  --bg:        #FAFAF7;
  --bg-elev:   #F2F0EA;
  --ink:       #1A1A1A;
  --ink-2:     #7A7A74;
  --ink-3:     #B0AEA8;
  --line:      #E4E2DA;
  --line-2:    #EFEDE6;
  --hover-bg:  #F4F2EC;
  --accent:    #B23A2C;
  --focus:     #B23A2C;
  --overlay:   rgba(26, 26, 26, 0.94);

  /* ---- 字体（全系统栈，零外部依赖，国内网络不阻塞）---- */
  --font-sans:  -apple-system, BlinkMacSystemFont, "Segoe UI",
                "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
                "Source Han Sans SC", "Noto Sans CJK SC",
                "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", "Songti SC", "STSong",
                "SimSun", serif;
  --font-mono:  "SF Mono", Menlo, Consolas, "Courier New", monospace;

  /* ---- 图片真实比例 ---- */
  --ratio-wide:     1672 / 941;   /* 16:9 横版 */
  --ratio-portrait: 1448 / 1086;  /* 4:3 竖版图 */

  /* ---- 动效 ---- */
  --ease:      cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-draw: cubic-bezier(0.6, 0, 0.2, 1);

  /* ---- 布局 ---- */
  --max-col: 720px;
  --max-img: 1200px;
  --max-gal: 1440px;
  --cell-h:  64px;
  --pad-x:   20px;
  --sec-y:   64px;
  --entry-y: 80px;
}

@media (min-width: 640px) {
  :root { --cell-h: 84px; --pad-x: 32px; --sec-y: 80px; }
}
@media (min-width: 1024px) {
  :root { --cell-h: 110px; --pad-x: 64px; --sec-y: 96px; --entry-y: 120px; }
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
  white-space: nowrap;
}

.container {
  max-width: var(--max-img);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

/* ---------- 入场动画（无 JS 时内容默认可见，JS 启动后启用动画）---------- */
.js .reveal {
  opacity: 0;
  transition:
    opacity 600ms var(--ease),
    transform 600ms var(--ease);
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; }

.reveal--up { transform: translateY(12px); }
.reveal--up.is-in { transform: none; }

.reveal--line { transform: scaleX(0); transform-origin: left; }
.reveal--line.is-in { transform: scaleX(1); }

/* ---------- 顶部导航 ---------- */
.site-nav {
  border-bottom: 1px solid var(--line);
}
.site-nav__inner {
  max-width: var(--max-img);
  margin-inline: auto;
  padding: 0 var(--pad-x);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}
.logo em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  margin-left: 8px;
}
.main-nav {
  display: flex;
  gap: 28px;
}
.main-nav a {
  position: relative;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  text-decoration: none;
  padding: 2px 0;
  transition: color 240ms var(--ease);
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 240ms var(--ease);
}
.main-nav a:hover { color: var(--ink); }
.main-nav a:hover::after { transform: scaleX(1); }
.main-nav a[aria-current="page"] {
  color: var(--ink);
}
.main-nav a[aria-current="page"]::before {
  content: "";
  display: inline-block;
  width: 8px; height: 2px;
  background: var(--accent);
  margin-right: 6px;
  vertical-align: 2px;
}

/* ---------- 首页 Hero ---------- */
.hero {
  max-width: var(--max-col);
  margin-inline: auto;
  padding: 96px var(--pad-x) 72px;
  text-align: center;
}
.hero__kicker {
  margin: 0 0 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--ink-2);
}
.hero__zh {
  margin: 0;
  font-size: 32px;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.4;
}
.hero__en {
  margin: 8px 0 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 22px;
  letter-spacing: 0.02em;
  color: var(--ink-2);
}
.hero__desc {
  margin: 24px 0 0;
  font-size: 14px;
  color: var(--ink-2);
}
.hero__rule {
  border: 0;
  height: 1px;
  background: var(--line);
  width: 64px;
  margin: 40px auto 0;
}

/* ---------- 首页：每日推送类型偏好 ---------- */
.pref {
  max-width: var(--max-col);
  margin-inline: auto;
  padding: 8px var(--pad-x) 64px;
  text-align: center;
}
.pref__kicker {
  margin: 0 0 28px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ink-2);
}
.pref__label {
  margin: 26px 0 12px;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--ink-2);
}
.pref__label:first-of-type {
  margin-top: 0;
}
.pref__options {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.pref__opt {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-1);
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 0.06em;
  padding: 8px 20px;
  cursor: pointer;
  transition: border-color 150ms cubic-bezier(0.2, 0.8, 0.2, 1),
              color 150ms cubic-bezier(0.2, 0.8, 0.2, 1),
              background-color 150ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.pref__opt:hover {
  border-color: var(--ink-1);
}
.pref__opt.is-active {
  border-color: var(--accent);
  color: var(--accent);
}
.pref__opt:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}
.pref__now {
  display: inline-block;
  margin-top: 34px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-family: inherit;
  font-size: 14px;
  letter-spacing: 0.04em;
  padding: 12px 28px;
  cursor: pointer;
  transition: background-color 150ms cubic-bezier(0.2, 0.8, 0.2, 1),
              color 150ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.pref__now:hover {
  background: var(--accent);
  color: var(--paper);
}
.pref__now:disabled {
  opacity: 0.5;
  cursor: default;
}
.pref__status {
  margin: 16px 0 0;
  font-size: 12px;
  color: var(--ink-2);
}

/* ---------- 首页：日期归档条目 ---------- */
.archive {
  max-width: var(--max-img);
  margin-inline: auto;
  padding: 0 var(--pad-x);
}
.entry {
  padding: var(--entry-y) 0;
  border-bottom: 1px solid var(--line);
}
.entry:last-of-type { border-bottom: 0; }

.entry__meta {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 24px;
}
.entry__date {
  font-family: var(--font-mono);
  font-size: 18px;
  letter-spacing: 0.04em;
  color: var(--accent);
}
.entry__week {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--ink-2);
}
.entry__rule {
  flex: 1;
  height: 1px;
  background: var(--line);
  align-self: center;
}
.entry__num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--ink-3);
}

.entry__title { margin: 0 0 32px; line-height: 1.3; }
.entry__title-zh {
  display: block;
  font-size: 28px;
  font-weight: 500;
}
.entry__title-en {
  display: block;
  margin-top: 4px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--ink-2);
}

/* 图片图元 */
.img-wrap { overflow: hidden; }
.img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms var(--ease);
}
.img-wrap img:hover { transform: scale(1.012); }

.entry__wide {
  margin: 0;
  aspect-ratio: var(--ratio-wide);
  background: var(--bg-elev);
  cursor: zoom-in;
}

.entry__tip {
  margin: 24px 0 0;
  font-size: 15px;
  color: var(--ink-2);
}
.entry__tip::before { content: "「"; }
.entry__tip::after  { content: "」"; }

.entry__link {
  display: inline-block;
  margin-top: 16px;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: border-color 240ms var(--ease), color 240ms var(--ease);
}
.entry__arrow {
  display: inline-block;
  transition: transform 240ms var(--ease);
}
.entry__link:hover { color: var(--accent); border-color: var(--accent); }
.entry__link:hover .entry__arrow { transform: translateX(4px); }

/* ---------- 页标题（日历 / 图库通用） ---------- */
.page-head {
  max-width: var(--max-col);
  margin-inline: auto;
  padding: 88px var(--pad-x) 56px;
}
.page-head__kicker {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--ink-2);
}
.page-head__zh {
  margin: 0;
  font-size: 40px;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.25;
}
.page-head__en {
  margin: 8px 0 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 22px;
  color: var(--ink-2);
}
.page-head__desc {
  margin: 20px 0 0;
  font-size: 13px;
  color: var(--ink-2);
}

/* ---------- 日历 ---------- */
.cal-wrap {
  max-width: 960px;
  margin-inline: auto;
  padding: 0 var(--pad-x) var(--sec-y);
}
.cal {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.cal thead th {
  padding: 12px 4px 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--ink-2);
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.cal tbody td {
  height: var(--cell-h);
  padding: 0;
  border-bottom: 1px solid var(--line-2);
  vertical-align: top;
}
.cal tbody tr:last-child td { border-bottom: 0; }
.cal tbody td + td { border-left: 1px solid var(--line-2); }

.cal__cell { position: relative; }

.cal__cell a,
.cal__cell--plain {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 6px;
  height: 100%;
  padding: 12px 10px;
  text-decoration: none;
  transition: background 220ms var(--ease);
}

.cal__date {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-family: var(--font-mono);
  font-size: 16px;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  line-height: 1;
}
.cal__dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
  transition: transform 220ms var(--ease);
}
.cal__theme {
  font-size: 12px;
  line-height: 1.35;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

/* 有图日 */
.cal__cell--has a { cursor: pointer; }
.cal__cell--has .cal__date { color: var(--ink); }
.cal__cell--has a:hover { background: var(--hover-bg); }
.cal__cell--has a:hover .cal__dot { transform: scale(1.5); }

/* 无图日：灰显不可点 */
.cal__cell--plain .cal__date { color: var(--ink-3); }
.cal__cell--empty { background: transparent; }

/* ---------- 图库 ---------- */
.gal-wrap {
  max-width: var(--max-gal);
  margin-inline: auto;
  padding: 0 var(--pad-x) var(--sec-y);
}
.gal-tabs {
  display: flex;
  gap: 28px;
  margin-bottom: 40px;
}
.gal-tabs button {
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  background: none;
  border: 0;
  padding: 4px 0;
  cursor: pointer;
  border-bottom: 1.5px solid transparent;
  transition: color 240ms var(--ease), border-color 240ms var(--ease);
}
.gal-tabs button:hover { color: var(--ink); }
.gal-tabs button.is-active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.gal-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px 24px;
}
.g-item {
  display: block;
  text-decoration: none;
}
.g-item__img {
  display: block;
  background: var(--bg-elev);
  aspect-ratio: var(--ratio-wide);
}
.g-item__img--portrait { aspect-ratio: var(--ratio-portrait); }
.g-item__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
}
.g-item__date {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-2);
}
.g-item__theme {
  font-size: 14px;
  color: var(--ink-2);
  transition: color 240ms var(--ease);
}
.g-item:hover .g-item__theme { color: var(--ink); }

/* ---------- 每日独立页 ---------- */
.back-link {
  display: inline-block;
  margin: 28px var(--pad-x) 0;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 240ms var(--ease);
}
.back-link:hover { color: var(--accent); }

.d-hero {
  max-width: var(--max-img);
  margin-inline: auto;
  padding: 48px var(--pad-x) 0;
}
.d-hero__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.d-hero__date {
  font-family: var(--font-mono);
  font-size: 28px;
  letter-spacing: 0.04em;
  color: var(--accent);
}
.d-hero__week {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--ink-2);
}
.d-hero__rule {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 16px 0 32px;
}
.d-hero__title { margin: 0; line-height: 1.25; }
.d-hero__zh {
  display: block;
  font-size: 40px;
  font-weight: 400;
  letter-spacing: 0.02em;
}
.d-hero__en {
  display: block;
  margin-top: 8px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 28px;
  font-weight: 400;
  color: var(--ink-2);
}

.d-wide {
  max-width: var(--max-img);
  margin: 56px auto 0;
  padding: 0 var(--pad-x);
}
.d-wide figure { margin: 0; cursor: zoom-in; }
.d-wide figure img {
  aspect-ratio: var(--ratio-wide);
  background: var(--bg-elev);
}
.d-wide figcaption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  text-align: right;
}

.d-pair {
  max-width: var(--max-img);
  margin-inline: auto;
  padding: 64px var(--pad-x);
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 64px;
  align-items: start;
}
.d-portrait { margin: 0; }
.d-portrait .img-wrap {
  aspect-ratio: var(--ratio-portrait);
  background: var(--bg-elev);
  cursor: zoom-in;
}

.d-tips { max-width: 44ch; }
.d-tips__label {
  margin: 0 0 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--ink-2);
}
.d-tips__lead {
  margin: 0 0 24px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.7;
}
.d-tips__list {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  counter-reset: tips;
}
.d-tips__list li {
  position: relative;
  padding-left: 40px;
  margin-bottom: 14px;
  font-size: 15px;
  line-height: 1.7;
}
.d-tips__list li::before {
  counter-increment: tips;
  content: counter(tips, decimal-leading-zero) ".";
  position: absolute;
  left: 0; top: 1px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.d-tips__hint {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.7;
}
.d-tips__en {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  letter-spacing: 0.01em;
  color: var(--ink-2);
  line-height: 1.5;
}

/* 上一篇 / 下一篇 */
.d-pager {
  max-width: var(--max-img);
  margin-inline: auto;
  padding: 0 var(--pad-x) 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  border-top: 1px solid var(--line);
}
.d-pager--single { grid-template-columns: 1fr; }
.d-pager--single .d-pager__next { align-items: flex-start; text-align: left; }
.d-pager__prev,
.d-pager__next {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 28px 0 32px;
  text-decoration: none;
  transition: color 240ms var(--ease);
}
.d-pager__prev { align-items: flex-start; }
.d-pager__next { align-items: flex-end; text-align: right; }
.d-pager__dir {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}
.d-pager__date {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.d-pager__arrow { transition: transform 240ms var(--ease); }
.d-pager__prev:hover .d-pager__arrow { transform: translateX(-4px); }
.d-pager__next:hover .d-pager__arrow { transform: translateX(4px); }
.d-pager__theme { font-size: 14px; color: var(--ink); }
.d-pager a:hover .d-pager__theme { color: var(--accent); }

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 64px;
}
.site-footer__inner {
  max-width: var(--max-img);
  margin-inline: auto;
  padding: 32px var(--pad-x) 56px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
}
.site-footer p {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-2);
}
.site-footer__links a {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  text-decoration: none;
  margin-left: 20px;
  transition: color 240ms var(--ease);
}
.site-footer__links a:hover { color: var(--accent); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--overlay);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 220ms var(--ease),
    visibility 0s linear 220ms;
}
.lightbox.is-open {
  opacity: 1;
  visibility: visible;
  transition:
    opacity 220ms var(--ease),
    visibility 0s;
}
.lightbox__inner {
  position: relative;
  margin: 0;
  max-width: 90vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: scale(0.985);
  opacity: 0;
  transition:
    transform 320ms var(--ease),
    opacity 320ms var(--ease);
}
.lightbox.is-open .lightbox__inner {
  transform: scale(1);
  opacity: 1;
}
.lightbox__img {
  max-width: 90vw;
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  background: transparent;
  opacity: 0;
  transition: opacity 200ms var(--ease);
}
.lightbox__cap {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
}
.lightbox__close,
.lightbox__nav {
  position: absolute;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: color 220ms var(--ease);
}
.lightbox__close {
  top: 20px; right: 20px;
  width: 36px; height: 36px;
  font-size: 24px;
  line-height: 1;
}
.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 40px; height: 64px;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox__nav--prev { left: 8px; }
.lightbox__nav--next { right: 8px; }
.lightbox__close:hover,
.lightbox__nav:hover { color: #fff; }
.lightbox__count {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.45);
}
.lightbox__nav.is-hidden { display: none; }

body.lb-locked { overflow: hidden; }

/* ---------- 响应式 ---------- */
@media (max-width: 1023px) {
  .d-pair { grid-template-columns: 1fr; gap: 40px; }
  .d-portrait { max-width: 70%; }
}

@media (max-width: 767px) {
  body { font-size: 14px; }

  .site-nav__inner { height: 56px; }
  .logo em { display: none; }
  .main-nav { gap: 20px; }

  .hero { padding: 64px var(--pad-x) 48px; }
  .hero__zh { font-size: 24px; }
  .hero__en { font-size: 18px; }
  .hero__desc { font-size: 13px; }

  .page-head { padding: 64px var(--pad-x) 40px; }
  .page-head__zh { font-size: 32px; }
  .page-head__en { font-size: 18px; }

  .entry__date { font-size: 16px; }
  .entry__title-zh { font-size: 22px; }
  .entry__title-en { font-size: 18px; }

  .cal tbody td { height: var(--cell-h); }
  .cal__cell a,
  .cal__cell--plain { padding: 8px 6px; gap: 4px; }
  .cal__date { font-size: 14px; }
  .cal__theme { font-size: 11px; }
  .cal thead th { font-size: 10px; padding: 10px 2px 12px; }

  .gal-tabs { gap: 20px; margin-bottom: 32px; }

  .d-hero__date { font-size: 22px; }
  .d-hero__zh { font-size: 30px; }
  .d-hero__en { font-size: 22px; }
  .d-pair { padding: 48px var(--pad-x); }
  .d-portrait { max-width: 75%; margin-inline: auto; }

  .d-pager { grid-template-columns: 1fr; gap: 0; }
  .d-pager__next { align-items: flex-start; text-align: left; border-top: 1px solid var(--line-2); }

  .site-footer__inner { flex-direction: column; gap: 12px; }
  .site-footer__links a { margin-left: 0; margin-right: 20px; }
}

@media (max-width: 479px) {
  .container,
  .site-nav__inner,
  .hero,
  .archive,
  .page-head,
  .cal-wrap,
  .gal-wrap,
  .d-hero,
  .d-wide,
  .d-pair,
  .d-pager,
  .site-footer__inner { padding-left: 16px; padding-right: 16px; }

  .main-nav { gap: 16px; }
  .main-nav a { font-size: 13px; }

  .gal-grid { gap: 32px 16px; }
}

/* ---------- 减少动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .img-wrap img:hover { transform: none; }
}
