/* 宣纸水墨画册视觉系统：温润克制、高可读、零第三方字体请求、支持暗黑禅房模式 */
:root {
  --bg: #f6f1e7;
  --bg-2: #eee7d9;
  --card: #fbf8f2;
  --fg: #231f1a;
  --muted: #625a4e;
  --line: rgba(92, 74, 52, 0.16);
  --line-strong: rgba(92, 74, 52, 0.28);
  --accent: #7a5c38;
  --accent-deep: #5a4225;
  --accent-soft: #efe7d8;
  --vermilion: #9c4a35;
  --vermilion-soft: #f5e6e0;
  --moss: #4d6657;
  --warn: #f4ead4;
  --shadow-sm: 0 2px 10px rgba(45, 34, 22, 0.045);
  --shadow-md: 0 10px 30px rgba(45, 34, 22, 0.08);
  --serif: "Songti TC", "Songti SC", "Noto Serif CJK TC", "Noto Serif CJK SC", "Source Han Serif SC", "Iowan Old Style", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang TC", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", sans-serif;
  --read: 48rem;
  --wide: 64rem;

  /* Gongbi SVG semantic tokens (Light: rice paper) */
  --svg-halo: #f2eadc;
  --svg-halo-ring: rgba(122, 92, 56, 0.22);
  --svg-mat: #e5dac6;
  --svg-robe: #fbf7ef;
  --svg-robe-deep: #efe6d6;
  --svg-skin: #fdfaf4;
  --svg-ink: #3a3229;
  --svg-ink-soft: #7b7062;
  --svg-active-fill: #f6e1cc;
  --svg-active-wash: #f5ead9;
  --svg-active-stroke: #9c4a35;
  --svg-arrow: #9c4a35;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #191714;
    --bg-2: #211e1a;
    --card: #24211c;
    --fg: #eae3d5;
    --muted: #a99f8f;
    --line: rgba(214, 196, 165, 0.16);
    --line-strong: rgba(214, 196, 165, 0.3);
    --accent: #cbb488;
    --accent-deep: #e0cca3;
    --accent-soft: #2e2922;
    --vermilion: #d6856e;
    --vermilion-soft: #362520;
    --moss: #86a391;
    --warn: #332c1d;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.4);

    /* Gongbi SVG semantic tokens (Dark: warm meditation room) */
    --svg-halo: #211e19;
    --svg-halo-ring: rgba(203, 180, 136, 0.22);
    --svg-mat: #2c2721;
    --svg-robe: #28241e;
    --svg-robe-deep: #302b24;
    --svg-skin: #342e27;
    --svg-ink: #dfd5c4;
    --svg-ink-soft: #9e9383;
    --svg-active-fill: #473228;
    --svg-active-wash: #382a23;
    --svg-active-stroke: #df9178;
    --svg-arrow: #df9178;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html {
  font-size: 17px;
  background: var(--bg);
  color: var(--fg);
  overflow-x: clip;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background-color: var(--bg);
  background-image: radial-gradient(rgba(122, 92, 56, 0.035) 1px, transparent 0);
  background-size: 24px 24px;
  color: var(--fg);
  line-height: 1.85;
  font-family: var(--serif);
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { max-width: 100%; height: auto; }
a {
  color: var(--accent);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.16s ease;
}
a:hover { color: var(--vermilion); }

.skip { position: absolute; left: -999px; }
.skip:focus {
  left: 12px; top: 12px; background: var(--card); color: var(--fg);
  padding: 8px 14px; border: 1px solid var(--accent); border-radius: 6px; z-index: 60;
}

/* 语言建议条 */
.lang-hint {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: 0.45rem 18px;
  font-family: var(--sans);
  font-size: 0.86rem;
}
.lang-hint-inner {
  max-width: var(--wide);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  justify-content: space-between;
}
.lang-hint-actions { display: flex; gap: 0.75rem; align-items: center; }

/* 顶栏导航 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 92%, var(--card));
  backdrop-filter: blur(8px);
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.25rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 20px;
  max-width: var(--wide);
  margin: 0 auto;
}
.brand {
  font-size: 1.28rem;
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: 0.14em;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.brand::before {
  content: "";
  width: 0.52rem;
  height: 0.52rem;
  border-radius: 50%;
  background: var(--vermilion);
  opacity: 0.85;
  flex-shrink: 0;
}
.brand:hover { color: var(--accent); }

.primary-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.05rem;
  align-items: center;
  font-family: var(--sans);
  font-size: 0.89rem;
}
.primary-nav a {
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  padding: 0.2rem 0.1rem;
}
.primary-nav a[aria-current],
.primary-nav a:hover {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 5px;
}

.nav-more { position: relative; display: inline-block; }
.nav-more summary {
  list-style: none;
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
  padding: 0.22rem 0.68rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--card);
  font-size: 0.84rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.nav-more summary:hover { border-color: var(--accent); background: var(--accent-soft); }
.nav-more summary::-webkit-details-marker { display: none; }
.nav-drawer {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  z-index: 50;
  width: min(26rem, calc(100vw - 28px));
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 0.9rem 1.05rem;
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 0.85rem;
}
.nav-drawer a {
  white-space: normal;
  padding: 0.24rem 0.35rem;
  border-radius: 6px;
  color: var(--fg);
  font-size: 0.87rem;
}
.nav-drawer a:hover,
.nav-drawer a[aria-current] {
  background: var(--accent-soft);
  color: var(--accent-deep);
  text-decoration: none;
}

/* 主体容器 */
main {
  max-width: var(--read);
  margin: 0 auto;
  padding: 1.6rem 20px 4rem;
}
main.home-main {
  max-width: var(--wide);
  padding-top: 1.8rem;
}
main.home-main p,
main.home-main li { max-width: none; }

.page-head {
  padding-bottom: 1.1rem;
  margin-bottom: 1.4rem;
  border-bottom: 1px solid var(--line);
}
h1 {
  font-size: clamp(1.75rem, 1.3rem + 1.5vw, 2.3rem);
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: 0.03em;
  margin: 0.2rem 0 0.4rem;
}
h2 {
  font-size: clamp(1.22rem, 1.08rem + 0.5vw, 1.45rem);
  margin: 2.5rem 0 0.8rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.45;
}
.home-main h2,
.tool h2,
.stepper h2,
.step-wall-section h2,
.faq h2 {
  border-top: 0;
  padding-top: 0;
}
h3 {
  font-size: 1.06rem;
  margin: 1.5rem 0 0.45rem;
  font-weight: 700;
  color: var(--fg);
}
p, li { max-width: 44rem; }
ul, ol { padding-left: 1.4rem; }
li + li { margin-top: 0.35rem; }

.muted {
  color: var(--muted);
  font-size: 0.91rem;
}
.note {
  border-left: 3px solid var(--vermilion);
  padding: 0.75rem 1.15rem;
  color: var(--fg);
  background: var(--card);
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0 10px 10px 0;
  margin: 1.4rem 0;
  box-shadow: var(--shadow-sm);
}
.badge {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--vermilion);
  background: var(--vermilion-soft);
  border: 1px solid color-mix(in srgb, var(--vermilion) 24%, transparent);
  border-radius: 999px;
  padding: 0.1rem 0.65rem;
  margin-bottom: 0.35rem;
}
.kicker {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.55rem;
}
.banner {
  background: var(--warn);
  margin: 0;
  padding: 0.6rem 16px;
  text-align: center;
  font-size: 0.9rem;
}

/* 按钮 */
.btn {
  font-family: var(--sans);
  font-size: 0.94rem;
  font-weight: 600;
  background: var(--fg);
  color: var(--bg);
  border: 1px solid var(--fg);
  border-radius: 8px;
  padding: 0.55rem 1.2rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  line-height: 1.35;
  transition: transform 0.14s ease, background 0.16s ease, border-color 0.16s ease;
}
.btn:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: #fffdf8; }
.btn:active { transform: translateY(1px); }
.btn.ghost {
  background: var(--card);
  color: var(--fg);
  border-color: var(--line-strong);
}
.btn.ghost:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--fg);
}
.btn.sm { padding: 0.32rem 0.8rem; font-size: 0.86rem; }
.link-btn {
  font-family: var(--sans);
  background: none;
  border: 0;
  padding: 0;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.85rem;
}
.btn:focus-visible, .chip:focus-visible, .day:focus-visible, .mode-btn:focus-visible,
.sx-btn:focus-visible, .disc-btn:focus-visible, .step-tile:focus-visible, .sc-tab:focus-visible,
.mini-chip:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible,
a:focus-visible, .link-btn:focus-visible, summary:focus-visible {
  outline: 2px solid var(--vermilion);
  outline-offset: 2px;
}

/* ========== 首页画册 Hero 与模块 ========== */
.hero-bookplate {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.15fr);
  gap: 2.2rem;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 2.2rem 2.4rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2.6rem;
}
.hero-copy h1 {
  font-size: clamp(1.9rem, 1.35rem + 2vw, 2.75rem);
  line-height: 1.24;
  margin: 0 0 0.85rem;
  letter-spacing: 0.03em;
}
.hero-lead {
  font-size: 1.06rem;
  line-height: 1.85;
  color: var(--muted);
  margin: 0 0 1.45rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.15rem;
}
.hero-meta {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
}
.hero-art {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-2);
}
.hero-art img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* 首页区块头 */
.home-section {
  margin: 3rem 0;
}
.section-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.2rem;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.15rem;
}
.section-head h2 {
  margin: 0;
  font-size: clamp(1.3rem, 1.12rem + 0.6vw, 1.6rem);
}
.section-head .section-more {
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}

/* 首页 15 式手势快览条 */
.steps-strip {
  display: flex;
  gap: 0.8rem;
  overflow-x: auto;
  padding: 0.25rem 0.1rem 0.9rem;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.strip-card {
  flex: 0 0 9.6rem;
  scroll-snap-align: start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.65rem 0.7rem 0.75rem;
  text-decoration: none;
  color: var(--fg);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}
.strip-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  color: var(--fg);
}
.strip-num {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--vermilion);
}
.strip-art { display: block; width: 100%; }
.strip-art .step-svg { display: block; width: 100%; height: auto; }
.strip-label {
  font-family: var(--sans);
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 首页四大图文核心模块 */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.1rem;
}
.feature-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: var(--fg);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  color: var(--fg);
}
.feature-card-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.feature-card-body {
  padding: 1rem 1.05rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}
.feature-card-body h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.4;
}
.feature-card-body p {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.86rem;
  line-height: 1.65;
  color: var(--muted);
}

/* 喂猫法专题金句横幅 */
.cat-banner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.6rem 2rem;
  box-shadow: var(--shadow-sm);
  margin: 2.6rem 0;
}
.cat-banner-media {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.cat-banner-media img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.cat-banner-quote {
  margin: 0.3rem 0 0.85rem;
  font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.65rem);
  font-weight: 700;
  line-height: 1.48;
  color: var(--fg);
}
.cat-banner-body p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* 内页画册头图 */
.page-plate {
  margin: 0 0 1.8rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.65rem;
  box-shadow: var(--shadow-sm);
}
.page-plate img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 9px;
}
.page-plate figcaption {
  padding: 0.6rem 0.5rem 0.2rem;
  text-align: center;
  font-family: var(--sans);
  font-size: 0.84rem;
  color: var(--muted);
}

/* 通用卡片网格 */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14.5rem, 1fr));
  gap: 0.9rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}
.cards li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.05rem 1.15rem;
  margin: 0;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.16s ease;
}
.cards li:hover { border-color: var(--accent); }
.cards a { font-weight: 700; text-decoration: none; color: var(--fg); }
.cards a:hover { color: var(--accent); text-decoration: underline; }
.loop-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* 古籍双栏对照 */
.parallel-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 1.15rem;
  margin: 1.15rem 0 1.7rem;
}
.parallel-grid .classic,
.parallel-grid .modern {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow-sm);
}
.parallel-grid .classic {
  background: linear-gradient(180deg, var(--card) 0%, color-mix(in srgb, var(--bg-2) 55%, var(--card)) 100%);
}
.parallel-grid h3 {
  margin-top: 0;
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.parallel-grid .classic p {
  letter-spacing: 0.04em;
  line-height: 2;
  font-size: 1.02rem;
}
.boundary {
  font-size: 0.89rem;
  color: var(--muted);
  border-top: 1px dashed var(--line-strong);
  padding-top: 0.65rem;
  margin-top: 0.8rem;
  margin-bottom: 0;
}

/* SVG 图谱卡片 */
.diagram-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem;
  margin: 1.25rem 0 1.8rem;
  box-shadow: var(--shadow-sm);
}
.zen-svg { display: block; width: 100%; height: auto; }
.diagram-card figcaption {
  margin-top: 0.65rem;
  text-align: center;
  font-family: var(--sans);
  font-size: 0.85rem;
}

/* ========== 十五式交互步进器 + 总览墙 ========== */
.tool, .stepper {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.35rem 1.5rem;
  margin: 1.65rem 0;
  box-shadow: var(--shadow-sm);
}
.tool h2, .stepper h2 { margin: 0 0 0.5rem; }

.step-stage-grid {
  display: grid;
  grid-template-columns: minmax(0, 17rem) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: center;
  margin-top: 1.1rem;
}
.step-stage-visual {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-slide { width: 100%; max-width: 15.5rem; }
.step-slide .step-svg { display: block; width: 100%; height: auto; }
.step-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}
.step-counter { font-family: var(--sans); font-variant-numeric: tabular-nums; font-weight: 600; }
.step-panel {
  min-height: 5.5rem;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 10px;
  padding: 0.85rem 1.05rem;
  margin: 0.35rem 0 0.85rem;
}
.step-main-text {
  margin: 0 0 0.45rem;
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--fg);
}
.step-pith { margin: 0; font-size: 0.88rem; }
.step-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.5rem 0 0; }
.chip {
  font-family: var(--sans);
  font-size: 0.86rem;
  font-weight: 600;
  min-width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--fg);
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease;
}
.chip:hover { border-color: var(--accent); background: var(--accent-soft); }
.chip[aria-pressed="true"] {
  background: var(--vermilion);
  border-color: var(--vermilion);
  color: #fffdf8;
}

.demo {
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--line-strong);
}
.track {
  position: relative;
  height: 2.8rem;
  border-bottom: 2px solid var(--line-strong);
  margin: 0.6rem 0 0.6rem;
}
.dot {
  position: absolute;
  bottom: -9px;
  left: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--vermilion);
  animation: sweep 8s ease-in-out infinite;
}
.track.paused .dot { animation-play-state: paused; }
.end { position: absolute; top: 0; font-family: var(--sans); font-size: 0.82rem; color: var(--muted); }
.end-l { left: 0; }
.end-r { right: 0; }
.demo-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  justify-content: space-between;
}
.demo-bar p { margin: 0; flex: 1 1 18rem; }
@keyframes sweep { 0%, 12% { left: 0; } 44%, 56% { left: calc(100% - 16px); } 88%, 100% { left: 0; } }

/* 15 格高清图文总览墙 */
.step-wall-section { margin: 2.2rem 0; }
.step-wall {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}
.step-tile {
  font: inherit;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.75rem 0.85rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  color: var(--fg);
  transition: border-color 0.16s ease, transform 0.14s ease, box-shadow 0.16s ease;
}
.step-tile:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.step-tile[aria-pressed="true"] {
  border-color: var(--vermilion);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--vermilion) 25%, transparent);
}
.step-tile-num {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--vermilion);
  letter-spacing: 0.06em;
}
.step-tile-art { display: block; width: 100%; }
.step-tile-art .step-svg { display: block; width: 100%; height: auto; }
.step-tile-text {
  font-family: var(--sans);
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--fg);
}

/* ========== 练习台与迷你手势对照 ========== */
.row { display: flex; flex-wrap: wrap; gap: 0.75rem 1.2rem; align-items: center; margin: 0.75rem 0; }
.toggle-row { display: flex; align-items: center; gap: 0.5rem; font-family: var(--sans); font-size: 0.91rem; cursor: pointer; }
.toggle-row input { width: 1.05rem; height: 1.05rem; accent-color: var(--vermilion); }

.mode-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.7rem 0 0.85rem; }
.mode-btn {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.38rem 0.95rem;
  cursor: pointer;
}
.mode-btn[aria-pressed="true"] {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.principle-box {
  background: var(--bg);
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin: 0.75rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  align-items: center;
  justify-content: space-between;
}
.principle-box p { margin: 0; font-size: 0.98rem; }

.quick-steps {
  margin: 0.85rem 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.6rem 0.95rem;
  background: var(--bg);
}
.quick-steps summary {
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
}
.mini-stepper {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  margin-top: 0.8rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}
.mini-step-art {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.4rem;
}
.mini-step-caption { margin: 0 0 0.55rem; font-size: 0.92rem; font-weight: 600; }
.mini-step-nav { display: flex; gap: 0.45rem; margin-bottom: 0.55rem; }
.mini-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.mini-chip {
  font-family: var(--sans);
  font-size: 0.76rem;
  min-width: 1.85rem;
  height: 1.85rem;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--fg);
  cursor: pointer;
}
.mini-chip[aria-pressed="true"] {
  background: var(--vermilion);
  border-color: var(--vermilion);
  color: #fffdf8;
}

select, input[type="number"], textarea {
  font-family: var(--sans);
  font-size: 0.93rem;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0.38rem 0.6rem;
}
input[type="number"] { width: 4.5rem; }
textarea { width: 100%; min-height: 5rem; resize: vertical; line-height: 1.65; }

.clock {
  font-size: clamp(3rem, 2.4rem + 2vw, 3.8rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  text-align: center;
  margin: 0.45rem 0;
  font-weight: 600;
}
.cue { display: flex; align-items: center; justify-content: center; gap: 0.8rem; min-height: 2.8rem; font-size: 1.25rem; }
.ring { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--vermilion); opacity: 0.25; transition: transform 0.8s ease, opacity 0.8s ease; }
.cue.on .ring { opacity: 1; }
.cue.on.move .ring { transform: scale(1.7); }
.cue:not(.on) { visibility: hidden; }

.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.45rem; margin: 0.85rem 0; max-width: 24rem; }
.day {
  font-family: var(--sans);
  aspect-ratio: 1;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--fg);
  cursor: pointer;
  position: relative;
}
.day[aria-pressed="true"] { background: var(--accent); color: #fffdf8; border-color: var(--accent); }
.day[aria-pressed="true"]::after { content: "\2713"; position: absolute; right: 4px; top: 1px; font-size: 0.7rem; }

/* ========== 四行炼心卡（水彩配图版） ========== */
.sx-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 1rem 0;
}
.sx-btn {
  font: inherit;
  text-align: left;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.55rem;
  cursor: pointer;
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  transition: border-color 0.16s ease, background 0.16s ease;
}
.sx-btn:hover { border-color: var(--accent); }
.sx-thumb {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.sx-thumb img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.sx-btn-copy strong { display: block; font-size: 0.98rem; margin-bottom: 0.15rem; }
.sx-btn-copy span { display: block; font-family: var(--sans); font-size: 0.81rem; color: var(--muted); line-height: 1.45; }
.sx-btn[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--vermilion);
  box-shadow: 0 0 0 1px var(--vermilion);
}

.sx-panel {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.15rem;
  margin-top: 1rem;
  display: grid;
  grid-template-columns: minmax(0, 15.5rem) minmax(0, 1fr);
  gap: 1.35rem;
  align-items: start;
}
.sx-plate {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--card);
}
.sx-plate img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.sx-panel h3 { margin: 0 0 0.65rem; color: var(--vermilion); font-size: 1.15rem; }
.sx-block { margin: 0.8rem 0; }
.sx-block h4 { margin: 0 0 0.2rem; font-family: var(--sans); font-size: 0.84rem; letter-spacing: 0.04em; color: var(--accent); }
.sx-block p { margin: 0; font-size: 0.95rem; }

/* ========== 食禅六步交互卡片 ========== */
.sc-switch {
  background: var(--accent-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem 1rem;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--fg);
  margin: 0.8rem 0 1rem;
}
.sc-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 1rem;
}
.sc-tab {
  font: inherit;
  text-align: left;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--fg);
}
.sc-tab-num {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--vermilion);
}
.sc-tab-title { font-family: var(--sans); font-size: 0.86rem; font-weight: 600; }
.sc-tab[aria-pressed="true"] {
  background: var(--vermilion);
  border-color: var(--vermilion);
  color: #fffdf8;
}
.sc-tab[aria-pressed="true"] .sc-tab-num { color: #fffdf8; opacity: 0.85; }
.sc-stage {
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 1.15rem 1.25rem;
  margin-bottom: 1.2rem;
}
.sc-stage h3 { margin: 0.2rem 0 0.35rem; font-size: 1.22rem; }
.sc-cue {
  margin: 0 0 0.6rem;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
}
.sc-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}
.sc-overview-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.sc-overview-card:hover { border-color: var(--accent); }
.sc-overview-card.is-active { border-color: var(--vermilion); }
.sc-overview-card h3 { margin: 0.15rem 0 0.25rem; font-size: 1rem; }
.sc-overview-card p { margin: 0.25rem 0 0; font-size: 0.89rem; }

/* 笔记与分判自检 */
.note-form { display: grid; gap: 0.7rem; margin: 0.85rem 0; }
.note-list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0.7rem; }
.note-item { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 0.8rem 1rem; }
.note-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 0.8rem; align-items: center; margin-bottom: 0.35rem; }
.note-item p { margin: 0; white-space: pre-wrap; }

.disc-group { margin: 1.1rem 0; }
.disc-group h3 { font-size: 1rem; color: var(--accent); margin: 0 0 0.5rem; }
.disc-options { display: grid; gap: 0.5rem; }
.disc-btn {
  font: inherit;
  font-size: 0.94rem;
  text-align: left;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem 0.9rem;
  cursor: pointer;
  line-height: 1.55;
}
.disc-btn[aria-pressed="true"] { border-color: var(--vermilion); background: var(--vermilion-soft); font-weight: 600; }
.disc-results { margin-top: 1.1rem; display: grid; gap: 0.75rem; }
.disc-card { background: var(--bg); border-left: 3px solid var(--vermilion); border-radius: 0 10px 10px 0; padding: 0.8rem 1rem; }
.disc-card p { margin: 0.28rem 0; }

/* FAQ、表格与页脚 */
.faq { margin-top: 2.4rem; }
details.qa {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem 1.05rem;
  margin: 0.65rem 0;
  background: var(--card);
}
details.qa summary { cursor: pointer; font-weight: 700; }
details.qa p:last-child { margin-bottom: 0.3rem; }
.src {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.83rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  margin-top: 2.2rem;
}
.steps-list { padding-left: 1.4rem; }
.steps-list li { margin: 0.38rem 0; }
.tiers dt { font-weight: 700; margin-top: 0.6rem; }
.tiers dd { margin: 0 0 0.25rem 0; color: var(--muted); }

table {
  border-collapse: collapse;
  width: 100%;
  font-family: var(--sans);
  font-size: 0.9rem;
  margin: 1.2rem 0;
  background: var(--card);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
}
th, td {
  border-bottom: 1px solid var(--line);
  padding: 0.6rem 0.75rem;
  text-align: left;
  vertical-align: top;
}
th { background: var(--bg-2); font-weight: 700; }

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.85rem;
  margin-top: 3rem;
}
.footer-inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1.6rem 20px 3.6rem;
}
.footer-inner p { max-width: 50rem; margin: 0 0 0.8rem; }
.footer-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  align-items: center;
  justify-content: space-between;
}
.langs { display: flex; flex-wrap: wrap; gap: 0.35rem 1.1rem; }
.langs a { color: var(--muted); text-decoration: none; }
.langs a[aria-current] { color: var(--fg); font-weight: 700; text-decoration: underline; }

.consent-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  max-width: 44rem;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  box-shadow: var(--shadow-md);
}
.consent-banner p { margin: 0 0 0.7rem; font-family: var(--sans); font-size: 0.88rem; }
body.consent-open { padding-bottom: 8rem; }

/* 响应式断点（严防 390px 移动端水平溢出） */
@media (prefers-reduced-motion: reduce) {
  .dot { animation: none; left: calc(50% - 8px); }
  .ring { transition: none; }
}
@media (max-width: 960px) {
  .hero-bookplate { grid-template-columns: 1fr; padding: 1.6rem; gap: 1.4rem; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .loop-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cat-banner { grid-template-columns: 1fr; padding: 1.35rem; gap: 1.2rem; }
}
@media (max-width: 760px) {
  .parallel-grid { grid-template-columns: 1fr; }
  .step-stage-grid { grid-template-columns: 1fr; }
  .step-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sx-grid { grid-template-columns: 1fr; }
  .sx-panel { grid-template-columns: 1fr; }
  .sc-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sc-overview { grid-template-columns: 1fr; }
  .mini-stepper { grid-template-columns: 1fr; }
  .nav-drawer { grid-template-columns: 1fr; right: 0; left: auto; width: min(16rem, calc(100vw - 28px)); }
}
@media (max-width: 600px) {
  table { display: block; overflow-x: auto; }
  .feature-grid { grid-template-columns: 1fr; }
  .loop-cards { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  html { font-size: 16px; }
  .header-inner { padding: 0.75rem 14px; gap: 0.45rem 0.8rem; }
  main { padding: 1.2rem 14px 3.2rem; }
  .primary-nav { gap: 0.25rem 0.7rem; font-size: 0.84rem; }
  .tool, .stepper { padding: 1.05rem 1rem; }
  .hero-bookplate { padding: 1.2rem 1rem; }
  .cat-banner { padding: 1.1rem 1rem; }
  .clock { font-size: 2.8rem; }
  .sx-btn { grid-template-columns: 4.4rem minmax(0, 1fr); }
}
