/*!
 * 森间 · 界面层样式
 * 只作用于 .sn-* 命名空间与 #app 的进场/退场类，不覆盖原站样式。
 * 加载顺序：style.css → art.css → nature.css
 */

#snroot {
  --sn-ink: #1b2a21;
  --sn-ink-2: #43554a;
  --sn-mut: #7d8b80;
  --sn-line: #e3e7dd;
  --sn-line-2: #eef1e9;
  --sn-green: #2f5d43;
  --sn-green-d: #1e3f2d;
  --sn-lime: #a9c86c;
  --sn-gold: #c07f3a;
  --sn-bg: #ffffff;
  --sn-bg-2: #f6f8f2;
  --sn-dark: #0f1c15;
  --sn-r: 16px;
  --sn-r-sm: 10px;
  --sn-sh: 0 1px 2px rgba(20, 40, 30, .05), 0 8px 24px -12px rgba(20, 40, 30, .18);
  --sn-sh-lg: 0 2px 6px rgba(20, 40, 30, .06), 0 30px 70px -30px rgba(16, 36, 26, .5);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

body.sn-lock { overflow: hidden; }

/* ============================================================
 * 子界面衔接：主内容进/退场
 * ============================================================ */

#app {
  transition: opacity .18s ease, transform .18s ease, filter .18s ease;
  will-change: opacity, transform;
}

#app.sn-leaving {
  opacity: 0;
  transform: translateY(-10px) scale(.996);
  filter: blur(2px);
  pointer-events: none;
}

@keyframes snRise {
  from { opacity: 0; transform: translateY(16px) scale(.995); filter: blur(3px); }
  to { opacity: 1; transform: none; filter: none; }
}

#app.sn-entering > * {
  animation: snRise .52s cubic-bezier(.22, .8, .25, 1) both;
  animation-delay: calc(var(--sn-i, 0) * 36ms);
}

/* 顶部细进度条：切换的连续性提示 */
.sn-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 300;
  pointer-events: none;
  opacity: 0;
}

.sn-progress i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--sn-green), var(--sn-lime) 60%, #e6d9a8);
  box-shadow: 0 0 12px rgba(169, 200, 108, .55);
}

/* 顶部工具区入口 */
.sn-theme-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(232, 237, 218, .34);
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  color: #e9edda;
  font-size: 14px;
  letter-spacing: .06em;
  cursor: pointer;
  transition: background .22s, border-color .22s, transform .18s;
}

.sn-theme-btn:hover { background: rgba(255, 255, 255, .16); border-color: rgba(200, 220, 160, .6); transform: translateY(-1px); }

.sn-theme-btn__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sn-lime);
  box-shadow: 0 0 0 3px rgba(169, 200, 108, .22);
}

/* ============================================================
 * 遮罩与卡片
 * ============================================================ */

.sn-layer {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3vh 2vw;
  background: rgba(12, 24, 17, .45);
  backdrop-filter: blur(14px) saturate(.92);
}

.sn-layer[hidden] { display: none; }
#sn-settings { z-index: 240; }

.sn-modal {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(96vw, 1280px);
  max-height: 92vh;
  background: var(--sn-bg);
  border-radius: 20px;
  box-shadow: var(--sn-sh-lg), 0 0 0 1px rgba(255, 255, 255, .6) inset;
  overflow: hidden;
}

.sn-x {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 36px;
  height: 36px;
  border: 1px solid var(--sn-line);
  border-radius: 50%;
  background: #fff;
  color: var(--sn-ink);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  transition: background .2s, color .2s, transform .25s;
}

.sn-x:hover { background: var(--sn-ink); color: #fff; transform: rotate(90deg); }

/* 通用按钮 */
#snroot button { font-family: inherit; min-height: 0; }

.sn-primary,
.sn-ghost,
.sn-pill,
.sn-seg,
.sn-tool,
.sn-chip,
.sn-seed,
.sn-mic,
.sn-thumb {
  font: inherit;
  cursor: pointer;
  border-radius: 999px;
  transition: background .2s, color .2s, border-color .2s, transform .16s, box-shadow .2s;
}

.sn-primary {
  border: 0;
  padding: 10px 20px;
  background: linear-gradient(180deg, #37694c, var(--sn-green));
  color: #f4f7ee;
  font-size: 14px;
  letter-spacing: .04em;
  box-shadow: 0 8px 18px -10px rgba(30, 63, 45, .9);
}

.sn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 24px -12px rgba(30, 63, 45, .95); }
.sn-primary:disabled { opacity: .5; cursor: default; transform: none; }

.sn-ghost {
  border: 1px solid var(--sn-line);
  background: #fff;
  color: var(--sn-ink-2);
  padding: 9px 16px;
  font-size: 13px;
}

.sn-ghost:hover { border-color: #b9c7ae; background: var(--sn-bg-2); color: var(--sn-green); }

/* ============================================================
 * 主题面板
 * ============================================================ */

.sn-modal--themes { height: min(92vh, 880px); }

.sn-themes__head { padding: 26px 30px 18px; border-bottom: 1px solid var(--sn-line-2); flex: 0 0 auto; }

/* ---------- 森林水平断面：七个站点沿一条水平线排开 ---------- */

.sn-transect {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin: -6px 0 22px;
  padding: 6px 2px 10px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.sn-transect::-webkit-scrollbar { display: none; }

.sn-transect__line {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 30px;
  height: 1px;
  background: linear-gradient(90deg, rgba(47, 93, 67, .18), rgba(47, 93, 67, .38), rgba(47, 93, 67, .18));
}

.sn-station {
  position: relative;
  flex: 1 0 auto;
  min-width: 108px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 0 10px 6px;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  scroll-snap-align: start;
  color: var(--sn-mut);
  transition: color .22s, transform .22s;
}

.sn-station__idx {
  font-size: 9.5px;
  letter-spacing: .16em;
  color: var(--sn-mut);
  transition: color .22s;
}

.sn-station__dot {
  position: relative;
  width: 9px;
  height: 9px;
  margin: 6px 0 9px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1.5px #c8d3bf;
  transition: box-shadow .24s, background .24s, transform .24s;
}

.sn-station__site {
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--sn-mut);
  transition: color .22s;
}

.sn-station b {
  font-size: 15px;
  font-weight: 600;
  color: var(--sn-ink);
  letter-spacing: -.01em;
  transition: color .22s;
}

.sn-station i {
  font-style: normal;
  font-size: 9.5px;
  letter-spacing: .14em;
  color: #a9b4a2;
}

.sn-station:hover { color: var(--sn-green); transform: translateY(-2px); }
.sn-station:hover .sn-station__dot { box-shadow: 0 0 0 1.5px var(--sn-green); }
.sn-station:hover .sn-station__site { color: var(--sn-green); }

.sn-station:focus-visible { outline: none; }
.sn-station:focus-visible .sn-station__dot { box-shadow: 0 0 0 3px rgba(47, 93, 67, .22), 0 0 0 1.5px var(--sn-green); }

.sn-station.is-on .sn-station__idx { color: var(--sn-green); }
.sn-station.is-on .sn-station__dot {
  background: var(--sn-green);
  box-shadow: 0 0 0 1.5px var(--sn-green), 0 0 0 6px rgba(47, 93, 67, .1);
  transform: scale(1.15);
}
.sn-station.is-on .sn-station__site { color: var(--sn-green); }
.sn-station.is-on b { color: var(--sn-green); }

.sn-station.is-done .sn-station__idx::after {
  content: '✓';
  margin-left: 3px;
  color: var(--sn-lime);
  font-size: 9px;
}

.sn-themes__title { display: flex; align-items: baseline; gap: 12px; }

.sn-themes__title h2 {
  margin: 0;
  font-size: clamp(26px, 2.6vw, 36px);
  font-weight: 650;
  letter-spacing: -.01em;
  color: var(--sn-ink);
}

.sn-themes__title span {
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--sn-gold);
}

.sn-themes__lede {
  margin: 10px 0 14px;
  max-width: 74ch;
  font-size: 15px;
  line-height: 1.85;
  color: var(--sn-ink-2);
}

.sn-stats { display: flex; gap: 22px; flex-wrap: wrap; font-size: 12.5px; color: var(--sn-mut); }
.sn-stats b { color: var(--sn-green); font-size: 15px; font-weight: 650; margin-right: 4px; }

.sn-themes__body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 0;
}

.sn-grid {
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(134px, 1fr));
  gap: 14px;
  padding: 22px 30px 26px;
  align-content: start;
  align-items: start;
}

/* 网格卡片：轻浮起 + 加深投影；进入过后留下浅绿状态 */
.sn-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--sn-line), var(--sn-sh);
  transition: transform .34s cubic-bezier(.22, .8, .25, 1), box-shadow .34s cubic-bezier(.22, .8, .25, 1), background .3s;
  animation: snCardIn .5s cubic-bezier(.22, .8, .25, 1) both;
  animation-delay: calc(var(--sn-i, 0) * 24ms);
  outline: none;
}

.sn-card:focus-visible { box-shadow: 0 0 0 2px var(--sn-green), 0 0 0 6px rgba(47, 93, 67, .16); }

@keyframes snCardIn {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.sn-card:hover,
.sn-card:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 0 0 1px #b3c7a2, 0 30px 52px -22px rgba(20, 40, 30, .62), 0 10px 20px -14px rgba(20, 40, 30, .4);
}

.sn-card:active { transform: translateY(-2px) scale(.993); transition-duration: .1s; }

/* 已打开过：浅绿底 */
.sn-card.is-active {
  background: #edf4e4;
  box-shadow: 0 0 0 1.5px #a9c88a, 0 14px 26px -18px rgba(30, 63, 45, .55);
}

.sn-card.is-active .sn-card__body { background: transparent; border-top-color: rgba(140, 170, 118, .35); }
.sn-card.is-active .sn-card__body b { color: #25492f; }
.sn-card.is-active .sn-card__media { box-shadow: inset 0 0 0 1px rgba(140, 170, 118, .35); }

.sn-card.is-active:hover {
  background: #e7f0db;
  box-shadow: 0 0 0 1.5px #96bb76, 0 30px 52px -22px rgba(20, 40, 30, .58);
}

.sn-card__media {
  position: relative;
  display: block;
  height: 176px;
  overflow: hidden;
  border-radius: 14px 14px 0 0;
  background: linear-gradient(160deg, #eef2e7, #e2e9da);
}

.sn-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.001);
  transition: transform 1s cubic-bezier(.16, .84, .24, 1), filter .4s;
}

.sn-card:hover .sn-card__media img { transform: scale(1.12); filter: saturate(1.04) contrast(1.03); }

.sn-card__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(12, 26, 18, .35));
  opacity: 0;
  transition: opacity .3s;
}

.sn-card:hover .sn-card__shade { opacity: 1; }

.sn-card__body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 0 0 auto;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--sn-line-2);
  border-radius: 0 0 14px 14px;
  background: #fff;
}

.sn-card__body b { font-size: 14.5px; font-weight: 600; color: var(--sn-ink); }
.sn-card__body i { font-style: italic; font-size: 10.5px; color: var(--sn-mut); }
.sn-card__body em { font-style: normal; font-size: 10.5px; color: var(--sn-gold); }

/* 右侧任务栏 */
.sn-task {
  border-left: 1px solid var(--sn-line-2);
  padding: 24px 26px;
  background: var(--sn-bg-2);
  overflow: auto;
}

.sn-task h3 {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 650;
  color: var(--sn-green);
  letter-spacing: .02em;
}

.sn-task ol { margin: 0 0 18px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }

.sn-task li label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--sn-ink-2);
  cursor: pointer;
}

.sn-task input[type="checkbox"] {
  appearance: none;
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin-top: 4px;
  border: 1.5px solid #c3ceb8;
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
  position: relative;
  transition: background .2s, border-color .2s;
}

.sn-task input:checked { background: var(--sn-green); border-color: var(--sn-green); }

.sn-task input:checked::after {
  content: '✓';
  position: absolute;
  inset: 0;
  color: #fff;
  font-size: 11px;
  line-height: 15px;
  text-align: center;
}

.sn-task li.is-done span { text-decoration: line-through; color: var(--sn-mut); }

.sn-task--inline {
  border: 1px solid var(--sn-line);
  border-radius: var(--sn-r-sm);
  background: var(--sn-bg-2);
  padding: 16px 18px;
  margin-top: 6px;
}

.sn-task--inline ol { margin-bottom: 0; }
.sn-task--inline li { font-size: 13.5px; line-height: 1.8; color: var(--sn-ink-2); }
.sn-task--inline li span { display: block; }

/* ============================================================
 * 科普卡
 * ============================================================ */

.sn-modal--sheet { height: min(92vh, 860px); }

.sn-sheet__bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px 12px 22px;
  background: var(--sn-dark);
  color: #dfe7d6;
  flex: 0 0 auto;
}

.sn-sheet__code { font-size: 11px; letter-spacing: .22em; color: var(--sn-lime); }
.sn-sheet__theme { font-size: 12.5px; color: #9fb29b; letter-spacing: .04em; }
.sn-sheet__tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.sn-tool {
  border: 1px solid rgba(223, 231, 214, .22);
  background: rgba(255, 255, 255, .06);
  color: #dfe7d6;
  padding: 7px 13px;
  font-size: 12.5px;
}

.sn-tool:hover { background: rgba(255, 255, 255, .16); border-color: rgba(169, 200, 108, .6); }

.sn-x--bar { position: static; background: rgba(255, 255, 255, .08); border-color: rgba(223, 231, 214, .22); color: #dfe7d6; }
.sn-x--bar:hover { background: var(--sn-lime); color: #1a2a1c; }

.sn-sheet__grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
}

/* 左：暗场灯箱 */
.sn-media {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 20px;
  min-height: 0;
  overflow: auto;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(74, 110, 82, .35), transparent 62%),
    linear-gradient(170deg, #16261c, #0c1710);
  color: #cfe0c8;
  perspective: 1400px;
}

.sn-media__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 10.5px;
  letter-spacing: .04em;
  color: #8ea48b;
}

.sn-viewer {
  position: relative;
  flex: 1;
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 14px;
  touch-action: none;
}

.sn-plate {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
  transform: rotateX(var(--sn-rx, 0deg)) rotateY(var(--sn-ry, 0deg));
  transition: transform .5s cubic-bezier(.22, .8, .25, 1);
  will-change: transform;
}

.sn-plate__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 10px;
  transform-origin: var(--sn-ox, 50%) var(--sn-oy, 50%);
  transition: transform .8s cubic-bezier(.16, .84, .24, 1), box-shadow .4s, filter .4s;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 255, 255, .12);
}

.sn-viewer:hover .sn-plate__img { transform: scale(1.08); box-shadow: 0 30px 70px -26px rgba(0, 0, 0, .9), 0 0 0 1px rgba(169, 200, 108, .5); }

.sn-viewer.is-magnify .sn-plate__img {
  transform: scale(2.1) translate(var(--sn-px, 0%), var(--sn-py, 0%));
  transition: transform .3s cubic-bezier(.22, .8, .25, 1);
  cursor: grab;
}

.sn-viewer.is-magnify.is-dragging .sn-plate__img { transition: none; cursor: grabbing; }

.sn-plate__glare {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, .16) 49%, transparent 57%);
  opacity: 0;
  transition: opacity .5s;
  mix-blend-mode: screen;
}

.sn-viewer:hover .sn-plate__glare { opacity: 1; }

.sn-modelbox {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  overflow: hidden;
  background: radial-gradient(ellipse at 45% 25%, #5d7f57, #1b3323);
}

.sn-loading { display: grid; place-items: center; height: 100%; font-size: 13px; color: #cfe0c8; }

.sn-media__caption {
  position: absolute;
  left: 14px;
  bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(8, 18, 12, .62);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .1);
}

.sn-media__caption b { font-size: 14.5px; font-weight: 600; color: #f1f5ea; }
.sn-media__caption i { font-style: italic; font-size: 10.5px; color: #a8bda1; }

.sn-media__bar { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }

.sn-seg,
.sn-pill {
  border: 1px solid rgba(223, 231, 214, .2);
  background: rgba(255, 255, 255, .05);
  color: #c7d7c1;
  padding: 7px 14px;
  font-size: 12.5px;
}

.sn-seg:hover,
.sn-pill:hover { background: rgba(255, 255, 255, .14); border-color: rgba(169, 200, 108, .5); }

.sn-seg.is-on,
.sn-pill.is-on { background: var(--sn-lime); border-color: var(--sn-lime); color: #172a1b; font-weight: 600; }

.sn-bar__div { width: 1px; height: 18px; background: rgba(223, 231, 214, .18); margin: 0 3px; }

.sn-thumbs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.sn-thumb {
  all: unset;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .18);
  transition: transform .22s, box-shadow .22s;
}

.sn-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sn-thumb:hover { transform: translateY(-2px); }
.sn-thumb.is-on { box-shadow: 0 0 0 2px var(--sn-lime); }

.sn-thumbs__n { font-size: 11px; color: #8ea48b; }

.sn-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px 16px;
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, .1);
}

.sn-meta dt { font-size: 10px; letter-spacing: .14em; color: #7f9579; text-transform: uppercase; }
.sn-meta dd { margin: 2px 0 0; font-size: 12.5px; color: #d3e0cc; line-height: 1.6; }

/* 右：内容区 */
.sn-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 20px 24px 16px;
  background: var(--sn-bg);
}

.sn-title h2 {
  margin: 0;
  font-size: clamp(26px, 2.4vw, 34px);
  font-weight: 650;
  letter-spacing: -.015em;
  line-height: 1.2;
  color: var(--sn-ink);
}

.sn-title p { margin: 3px 0 10px; font-style: italic; font-size: 13px; color: var(--sn-mut); }

.sn-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }

.sn-tags span {
  font-size: 11.5px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--sn-bg-2);
  color: var(--sn-ink-2);
  border: 1px solid var(--sn-line);
}

.sn-tags .sn-tags__hot { background: #fdf4e6; border-color: #ecd8b8; color: var(--sn-gold); font-weight: 600; }

.sn-tabs {
  position: relative;
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--sn-line);
  flex: 0 0 auto;
}

.sn-tab {
  border: 0;
  background: none;
  padding: 10px 16px 12px;
  font-size: 14px;
  color: var(--sn-mut);
  cursor: pointer;
  transition: color .2s;
}

.sn-tab:hover { color: var(--sn-ink); }
.sn-tab.is-on { color: var(--sn-green); font-weight: 600; }

.sn-tabs__ink {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--sn-green), var(--sn-lime));
  transition: width .32s cubic-bezier(.22, .8, .25, 1), transform .32s cubic-bezier(.22, .8, .25, 1);
}

.sn-panels { position: relative; flex: 1; min-height: 0; display: flex; }

.sn-panel {
  display: none;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  min-height: 0;
  overflow: auto;
  padding: 16px 2px 4px;
}

.sn-panel.is-on { display: flex; }

/* 图文讲解 */
.sn-guide { display: flex; flex-direction: column; gap: 16px; }

.sn-block h4 {
  margin: 0 0 5px;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: .16em;
  color: var(--sn-gold);
  text-transform: uppercase;
}

.sn-sent { font-size: 15px; line-height: 1.95; color: var(--sn-ink-2); }

/* 问答 */
.sn-chat {
  flex: 1;
  min-height: 120px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 2px 2px 6px;
}

.sn-chat__empty {
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px dashed #cfd8c6;
  background: var(--sn-bg-2);
}

.sn-chat__empty b { font-size: 14.5px; color: var(--sn-green); }
.sn-chat__empty p { margin: 6px 0 0; font-size: 13px; line-height: 1.8; color: var(--sn-mut); }

.sn-msg { display: flex; flex-direction: column; gap: 6px; max-width: 95%; animation: snMsgIn .3s cubic-bezier(.22, .8, .25, 1) both; }

@keyframes snMsgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.sn-msg--user { align-self: flex-end; align-items: flex-end; }

.sn-msg__b { font-size: 14px; line-height: 1.9; padding: 11px 15px; border-radius: 14px; }

.sn-msg--user .sn-msg__b { background: var(--sn-green); color: #f1f5ea; border-bottom-right-radius: 4px; }

.sn-msg--ai .sn-msg__b {
  background: var(--sn-bg-2);
  border: 1px solid var(--sn-line);
  color: var(--sn-ink);
  border-bottom-left-radius: 4px;
}

.sn-cites { display: flex; gap: 6px; flex-wrap: wrap; }

.sn-cites a,
.sn-cites span {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid #d6e0cb;
  background: #f2f7ec;
  color: var(--sn-green);
  text-decoration: none;
}

.sn-cites a:hover { background: var(--sn-green); color: #fff; border-color: var(--sn-green); }

.sn-follow { display: flex; gap: 10px; flex-wrap: wrap; }

.sn-follow button {
  border: 0;
  background: none;
  padding: 0;
  font-size: 12px;
  color: var(--sn-ink-2);
  text-decoration: underline;
  text-decoration-color: #bfd0ae;
  text-underline-offset: 3px;
  cursor: pointer;
}

.sn-follow button:hover { color: var(--sn-green); }

.sn-seeds { display: flex; gap: 7px; flex-wrap: wrap; }
.sn-seeds.is-dim .sn-seed { opacity: .5; }

.sn-seed {
  border: 1px solid var(--sn-line);
  background: #fff;
  color: var(--sn-ink-2);
  padding: 6px 12px;
  font-size: 12.5px;
}

.sn-seed:hover { background: var(--sn-green); border-color: var(--sn-green); color: #f2f6ea; }

.sn-askbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 8px;
  border: 1px solid var(--sn-line);
  border-radius: 999px;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}

.sn-askbar:focus-within { border-color: var(--sn-green); box-shadow: 0 0 0 3px rgba(47, 93, 67, .1); }

.sn-askbar input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: none;
  padding: 7px 2px;
  font-size: 14px;
  color: var(--sn-ink);
  font-family: inherit;
}

.sn-mic {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid var(--sn-line);
  border-radius: 50%;
  background: #fff;
  color: var(--sn-ink-2);
  font-size: 15px;
}

.sn-mic:hover { background: var(--sn-bg-2); }
.sn-mic.is-on { background: #c0562f; border-color: #c0562f; color: #fff; animation: snPulse 1.2s ease-in-out infinite; }

@keyframes snPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(192, 86, 47, .45); }
  50% { box-shadow: 0 0 0 9px rgba(192, 86, 47, 0); }
}

.sn-dots { display: inline-flex; gap: 4px; align-items: center; height: 18px; }
.sn-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--sn-green); animation: snDots 1s ease-in-out infinite; }
.sn-dots i:nth-child(2) { animation-delay: .15s; }
.sn-dots i:nth-child(3) { animation-delay: .3s; }

@keyframes snDots {
  0%, 100% { opacity: .3; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-3px); }
}

.sn-hint { margin: 0; font-size: 11.5px; line-height: 1.8; color: var(--sn-mut); }

/* 笔记 */
.sn-note__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.sn-note__head h3 { margin: 0; font-size: 15px; font-weight: 650; color: var(--sn-green); }
.sn-note__head span { font-size: 11.5px; color: var(--sn-mut); }

.sn-note__in {
  width: 100%;
  border: 1px solid var(--sn-line);
  border-radius: 12px;
  background: var(--sn-bg-2);
  padding: 11px 14px;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--sn-ink);
  resize: vertical;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.sn-note__in:focus { border-color: var(--sn-green); background: #fff; box-shadow: 0 0 0 3px rgba(47, 93, 67, .1); }

.sn-note__acts { display: flex; gap: 8px; flex-wrap: wrap; }

.sn-note__out {
  flex: 1;
  min-height: 150px;
  margin: 0;
  overflow: auto;
  padding: 16px 18px;
  border: 1px solid var(--sn-line);
  border-radius: 12px;
  background: var(--sn-bg-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, 'Microsoft YaHei', monospace;
  font-size: 12.5px;
  line-height: 1.95;
  color: var(--sn-ink-2);
  white-space: pre-wrap;
  word-break: break-word;
}

.sn-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  margin-top: 4px;
  border-top: 1px solid var(--sn-line-2);
  flex: 0 0 auto;
}

.sn-pager span { font-size: 11px; color: var(--sn-mut); letter-spacing: .06em; }

/* ============================================================
 * 设置
 * ============================================================ */

.sn-modal--settings { width: min(94vw, 620px); padding: 30px 30px 24px; max-height: 88vh; overflow: auto; }

.sn-modal--settings h2 { margin: 0 0 10px; font-size: 22px; font-weight: 650; color: var(--sn-ink); }
.sn-modal--settings .sn-hint { font-size: 12.5px; line-height: 1.9; }

.sn-form { display: flex; flex-direction: column; gap: 12px; margin: 18px 0; }

.sn-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--sn-mut);
}

.sn-form input {
  border: 1px solid var(--sn-line);
  border-radius: 10px;
  background: #fff;
  padding: 11px 13px;
  font-size: 13.5px;
  color: var(--sn-ink);
  font-family: inherit;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.sn-form input:focus { border-color: var(--sn-green); box-shadow: 0 0 0 3px rgba(47, 93, 67, .1); }

.sn-warn {
  margin: 0 0 16px;
  padding: 10px 13px;
  border-radius: 10px;
  background: #fdf4ec;
  border-left: 2px solid #d19152;
  font-size: 11.5px;
  line-height: 1.85;
  color: #8a5a33;
}

/* ============================================================
 * 提示
 * ============================================================ */

.sn-toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translate(-50%, 14px);
  z-index: 320;
  padding: 11px 22px;
  border-radius: 999px;
  background: rgba(16, 32, 22, .94);
  color: #eef3e6;
  font-size: 13px;
  letter-spacing: .02em;
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s, transform .28s;
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 44px -20px rgba(0, 0, 0, .8);
  max-width: 84vw;
}

.sn-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ============================================================
 * 响应式
 * ============================================================ */

/* ============================================================
 * 打磨：节奏、留白、层级与状态
 * ============================================================ */

/* 液态玻璃框内的层位签与计数器做弱处理 */
.home-slide__cap { letter-spacing: .14em; }
.home-media__count { font-size: 10.5px; letter-spacing: .16em; opacity: .85; }

/* 16 帧快捷跳转：编号 01–16 与轮播位置一一对应 */
.forest-home .home-grid { padding-block: clamp(14px, 2.2vh, 42px); }

.forest-home .home-picks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin-top: 2px;
}

.forest-home .home-picks button {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
  min-height: 0;
  padding: 5px 7px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .05);
  color: rgba(238, 243, 230, .78);
  font-size: 10.5px;
  line-height: 1.4;
  text-align: left;
  overflow: hidden;
  transition: background .2s, border-color .2s, color .2s, transform .18s;
}

.forest-home .home-picks button > span {
  flex: 0 0 auto;
  font-size: 9px;
  letter-spacing: .08em;
  color: rgba(198, 209, 172, .6);
  font-variant-numeric: tabular-nums;
  transition: color .2s;
}

.forest-home .home-picks button > b {
  min-width: 0;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.forest-home .home-picks button:hover {
  background: rgba(255, 255, 255, .13);
  border-color: rgba(200, 220, 160, .45);
  color: #f2f6e8;
}

.forest-home .home-picks button:active { transform: scale(.97); }

.forest-home .home-picks button.active {
  background: rgba(169, 200, 108, .92);
  border-color: transparent;
  color: #16240f;
}

.forest-home .home-picks button.active > span { color: rgba(22, 36, 15, .55); }

.forest-home .home-picks button:focus-visible {
  outline: 2px solid rgba(169, 200, 108, .75);
  outline-offset: 1px;
}

@media (max-width: 1180px) {
  .forest-home .home-picks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .forest-home .home-picks { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .forest-home .home-picks { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; }
  .forest-home .home-picks button { justify-content: center; padding: 5px 0; }
  .forest-home .home-picks button > b { display: none; }
}

/* 屏幕偏矮时改排成两行纯编号选择器：编号位置不变，名称走悬停提示与下方标题 */
@media (min-width: 901px) and (max-height: 840px) {
  .forest-home .home-picks { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; }
  .forest-home .home-picks button { justify-content: center; padding: 5px 0; }
  .forest-home .home-picks button > span { font-size: 10px; letter-spacing: .1em; }
  .forest-home .home-picks button > b { display: none; }
}

/* 更矮的笔电屏：同时收窄画面与上下留白 */
@media (min-width: 901px) and (max-height: 780px) {
  .forest-home .home-grid { padding-block: 12px; }
  .home-media__frame { height: clamp(212px, 28svh, 320px); }
  .specimen-caption { margin-top: 8px; }
}

/* 断面站点按下反馈 */
.sn-station:active { transform: translateY(0) scale(.985); transition-duration: .1s; }

/* 网格底部渐隐，提示可继续滚动 */
.sn-grid {
  mask-image: linear-gradient(180deg, #000 calc(100% - 24px), transparent);
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 24px), transparent);
}

/* 科普卡左栏：留白与信息层级 */
.sn-media { padding: 18px 20px 24px; }
.sn-meta { gap: 10px 18px; margin: 2px 0 0; }
.sn-meta dt { font-size: 9.5px; letter-spacing: .16em; }
.sn-meta dd { font-size: 12.5px; line-height: 1.55; }

.sn-audio__note {
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

/* 林间层位条 */
.sn-depth {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-left: 4px;
}

.sn-depth__seg {
  width: 15px;
  height: 3px;
  border-radius: 2px;
  background: rgba(223, 231, 214, .18);
  transition: background .3s, box-shadow .3s;
}

.sn-depth__seg.is-on { background: var(--sn-lime); box-shadow: 0 0 8px rgba(169, 200, 108, .55); }

.sn-depth em {
  margin-left: 7px;
  font-style: normal;
  font-size: 10.5px;
  letter-spacing: .1em;
  color: #9fb29b;
}

/* 标签页按下 */
.sn-tab:active { transform: translateY(1px); }

/* 原站卡片精修：圆角、内边距与文字层级 */
#app .card { border-radius: 14px; overflow: hidden; }
#app .cardbody { padding: 14px 16px 16px; }
#app .cardbody h3 { letter-spacing: -.012em; }
#app .cardmeta { letter-spacing: .12em; }
#app .card .tag { letter-spacing: .04em; }

/* 原站页面纵向节奏 */
#app .intro { margin-bottom: 28px; }
#app .section-title { margin: 46px 0 18px; }
#app .cards { gap: 22px; }
#app .paper p, #app .detailblocks p { max-width: 68ch; }

@media (max-width: 1100px) {
  .sn-themes__body { grid-template-columns: minmax(0, 1fr) 260px; }
  .sn-sheet__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .sn-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .sn-card__media { height: 156px; }
}

@media (max-width: 900px) {
  .sn-layer { padding: 0; align-items: stretch; }
  .sn-modal { width: 100vw; height: 100vh; max-height: none; border-radius: 0; }

  .sn-themes__head { padding: 18px 18px 14px; }
  .sn-themes__body { display: block; overflow: auto; }
  .sn-grid { overflow: visible; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; padding: 16px 18px 22px; }
  .sn-card__media { height: 138px; }
  .sn-task { border-left: 0; border-top: 1px solid var(--sn-line-2); }

  .sn-sheet__grid { display: block; overflow: auto; }
  .sn-media { min-height: 0; max-height: none; }
  .sn-viewer { height: 46vh; min-height: 240px; }
  .sn-body { min-height: 0; }
  .sn-panel { overflow: visible; }
  .sn-sheet__grid { grid-template-columns: 1fr; }
  .sn-body { padding: 16px 18px 14px; }
  .sn-plate { transform: none !important; }
}

@media (max-width: 560px) {
  .sn-sheet__bar { padding: 10px 12px; gap: 8px; flex-wrap: wrap; }
  .sn-sheet__theme { display: none; }
  .sn-tool { padding: 6px 10px; font-size: 11.5px; }
  .sn-sheet__grid { overflow: auto; }
  .sn-tab { padding: 9px 12px 11px; font-size: 13px; }
  .sn-title h2 { font-size: 24px; }
  .sn-pager span { display: none; }
  .sn-theme-btn { padding: 0 10px; font-size: 13px; }
  .sn-note__out { font-size: 12px; }
  .sn-card__media { height: 124px; }
  .sn-card__body { padding: 8px 10px 10px; }
  .sn-card__body b { font-size: 13.5px; }
}

@media (prefers-reduced-motion: reduce) {
  #app { transition: none; }
  #app.sn-leaving { opacity: 1; transform: none; filter: none; }
  #app.sn-entering > * { animation: none; }
  .sn-card { animation: none; }
  .sn-viewer:hover .sn-plate__img { transform: none; }
  .sn-viewer.is-magnify .sn-plate__img { transform: scale(2.1); }
}

/* ============================================================
 * 卡片层位标签
 * ============================================================ */

.sn-card__layer {
  position: absolute;
  left: 8px;
  top: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 9.5px;
  letter-spacing: .1em;
  color: #eef4e6;
  background: rgba(14, 30, 20, .52);
  border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(6px);
  pointer-events: none;
}

.sn-tags__layer { background: #eef4e6; border-color: #cfe0bd; color: #3c6b4a; }

/* ============================================================
 * 叫声按钮
 * ============================================================ */

.sn-audio {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid rgba(223, 231, 214, .32);
  background: rgba(10, 22, 15, .46);
  color: #eaf2e2;
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: background .24s, color .24s, transform .22s, border-color .24s;
  z-index: 4;
}

.sn-audio:hover { background: rgba(169, 200, 108, .92); color: #16240f; border-color: transparent; transform: scale(1.06); }
.sn-audio:active { transform: scale(.95); }
.sn-audio:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(169, 200, 108, .5); }

.sn-audio__icon { font-size: 14px; letter-spacing: .5px; line-height: 1; }

.sn-audio__ring {
  position: absolute;
  inset: -4px;
  width: calc(100% + 8px);
  height: calc(100% + 8px);
  transform: rotate(-90deg);
  opacity: 0;
  pointer-events: none;
}

.sn-audio__ring circle {
  fill: none;
  stroke: #b7d47c;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 113.1;
  stroke-dashoffset: 113.1;
}

.sn-audio.is-on { background: rgba(169, 200, 108, .18); border-color: rgba(183, 212, 124, .8); }
.sn-audio.is-on .sn-audio__ring { opacity: 1; }
.sn-audio.is-on .sn-audio__ring circle { animation: snRingGrow 5s linear forwards; }

@keyframes snRingGrow {
  from { stroke-dashoffset: 113.1; }
  to { stroke-dashoffset: 0; }
}

.sn-audio__tag {
  position: absolute;
  right: 16px;
  bottom: 76px;
  font-size: 10px;
  letter-spacing: .06em;
  color: #cfe0c8;
  background: rgba(10, 22, 15, .5);
  border-radius: 999px;
  padding: 4px 10px;
  backdrop-filter: blur(8px);
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .25s, transform .25s;
}

.sn-viewer:hover .sn-audio__tag { opacity: 1; transform: none; }

.sn-audio__note {
  margin: 0;
  font-size: 10.5px;
  line-height: 1.7;
  color: #7f9579;
}

/* 播放时画面轻微呼吸，给声音一个视觉回应 */
@keyframes snBreathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.012); }
}

.sn-viewer.is-sounding .sn-plate__img { animation: snBreathe 2.4s ease-in-out infinite; }

/* ============================================================
 * 滚动渐入
 * ============================================================ */

.sn-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .72s cubic-bezier(.22, .8, .25, 1), transform .72s cubic-bezier(.22, .8, .25, 1);
  transition-delay: var(--sn-d, 0ms);
}

.sn-reveal.is-in { opacity: 1; transform: none; }

/* 原站卡片：悬停浮起、点击后留浅绿 */
#app .card {
  transition: transform .34s cubic-bezier(.22, .8, .25, 1), box-shadow .34s cubic-bezier(.22, .8, .25, 1), border-color .3s, background .3s;
}

#app .card:hover,
#app .card:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 34px 56px -26px rgba(20, 40, 30, .55), 0 12px 22px -16px rgba(20, 40, 30, .32);
  border-color: #b3c7a2;
}

#app .card:active { transform: translateY(-2px) scale(.994); transition-duration: .1s; }

#app .card.is-viewed {
  background: #edf4e4;
  border-color: #a9c88a;
  box-shadow: 0 12px 24px -18px rgba(30, 63, 45, .5);
}

#app .card.is-viewed .cardbody { background: #edf4e4; }

/* ============================================================
 * 笔记面板：加大输出框，修掉文字显示不全
 * ============================================================ */

/* 笔记输出：不裁字，随内容长高，由面板整体滚动 */
.sn-note__view {
  flex: 0 0 auto;
  display: block;
  min-height: 0;
}

.sn-note__out {
  width: 100%;
  min-height: 320px;
  max-height: none;
  overflow: visible;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  tab-size: 2;
}

.sn-note__len { margin-left: auto; font-size: 11px; color: var(--sn-mut); letter-spacing: .04em; }

/* ============================================================
 * 首页：液态玻璃展示框（统一圆角）+ 站内影像轮播
 * ============================================================ */

.forest-home .home-specimen {
  border-radius: 26px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 40px 90px -50px rgba(0, 0, 0, .85), inset 0 1px 0 rgba(255, 255, 255, .22);
  backdrop-filter: blur(16px) saturate(1.05);
}

.home-media { display: flex; flex-direction: column; gap: 10px; }

.home-media__frame {
  position: relative;
  height: clamp(238px, 32svh, 426px);
  border-radius: 20px;
  overflow: hidden;
  isolation: isolate;
  background: #0d1b13;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .08),
    inset 0 1px 0 rgba(255, 255, 255, .3),
    0 26px 50px -34px rgba(0, 0, 0, .9);
}

.home-media__slides { position: absolute; inset: 0; }

.home-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.05s cubic-bezier(.22, .8, .25, 1), transform 6s linear;
  will-change: opacity, transform;
}

.home-slide.is-on { opacity: 1; transform: scale(1); z-index: 1; }

.home-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-slide__cap {
  position: absolute;
  left: 14px;
  top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: .12em;
  color: #eaf0e0;
  background: rgba(10, 22, 15, .46);
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(8px);
}

/* 液态玻璃质感层 */
.home-media__glass {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(158deg, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, .04) 26%, rgba(255, 255, 255, 0) 46%, rgba(6, 16, 10, .34) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .14),
    inset 0 22px 44px -26px rgba(255, 255, 255, .45),
    inset 0 -30px 60px -40px rgba(0, 0, 0, .7);
}

.home-media__nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .24);
  background: rgba(10, 22, 15, .42);
  color: #eef3e6;
  font-size: 14px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(-50%) scale(.94);
  transition: opacity .26s, transform .26s, background .22s;
}

.home-media__nav.is-prev { left: 12px; }
.home-media__nav.is-next { right: 12px; }

.home-media__frame:hover .home-media__nav,
.home-media__frame:focus-within .home-media__nav { opacity: 1; transform: translateY(-50%) scale(1); }

.home-media__nav:hover { background: rgba(169, 200, 108, .92); color: #16240f; border-color: transparent; }
.home-media__nav:active { transform: translateY(-50%) scale(.9); }

.home-media__count {
  position: absolute;
  right: 14px;
  bottom: 12px;
  z-index: 3;
  font-size: 11px;
  letter-spacing: .12em;
  color: rgba(238, 243, 230, .8);
  font-variant-numeric: tabular-nums;
}

.home-media__count b { color: #f3f7ec; font-weight: 600; }
.home-media__count i { margin: 0 3px; font-style: normal; opacity: .5; }

/* 轮播导轨已移除：位置改由帧内计数器表达 */
.home-media__frame::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .22), transparent);
  pointer-events: none;
}

.sn-ready .home-model-note { color: rgba(198, 206, 186, .72); }

/* ============================================================
 * 组件状态统一：按下 / 焦点 / 禁用
 * ============================================================ */

#snroot .sn-primary:active,
#snroot .sn-ghost:active,
#snroot .sn-pill:active,
#snroot .sn-seg:active,
#snroot .sn-tool:active,
#snroot .sn-seed:active,
#snroot .sn-mic:active,
#snroot .sn-x:active { transform: scale(.97); }

#snroot .sn-ghost:active { transform: translateY(1px) scale(.99); }

#snroot .sn-primary.is-busy {
  position: relative;
  color: transparent;
  pointer-events: none;
}

#snroot .sn-primary.is-busy::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  animation: snSpin .7s linear infinite;
}

@keyframes snSpin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .sn-reveal { opacity: 1; transform: none; transition: none; }
  .sn-audio.is-on .sn-audio__ring circle { animation: none; stroke-dashoffset: 0; }
  .sn-viewer.is-sounding .sn-plate__img { animation: none; }
  .home-slide { transition: opacity .2s linear; transform: none; }
}

@media (max-width: 800px) {
  header { padding: 8px 16px 0; gap: 10px; }
  header .brand { font-size: 21px; }
  header .brandmark { font-size: 30px; }
  header .brand small { font-size: 8px; letter-spacing: 2px; }
  header .headtools { gap: 8px; }
  header .icon { font-size: 20px; padding: 6px 10px; }
  header nav { height: 46px; gap: 22px; }
  .sn-theme-btn { min-height: 38px; padding: 0 12px; font-size: 13px; }
  .sn-themes__head { padding: 16px 16px 12px; }
  .sn-station { min-width: 96px; padding: 0 8px 6px; }
  .sn-station b { font-size: 14px; }
  .sn-title h2 { font-size: 24px; }
  .sn-depth { display: none; }
}

@media print {
  body > *:not(#snroot) { display: none !important; }
  #snroot .sn-progress,
  #snroot .sn-toast,
  #snroot #sn-themes,
  #snroot #sn-settings,
  #snroot .sn-sheet__bar,
  #snroot .sn-media,
  #snroot .sn-tabs,
  #snroot .sn-note__in,
  #snroot .sn-note__acts,
  #snroot .sn-pager { display: none !important; }
  .sn-layer { position: static; background: none; padding: 0; }
  .sn-modal { box-shadow: none; height: auto; width: auto; }
  .sn-sheet__grid { display: block; }
  .sn-panel { display: none !important; }
  .sn-panel[data-panel="note"] { display: flex !important; }
  .sn-note__out { border: 0; background: none; min-height: 0; padding: 0; }
}

/* ============================================================
 * 互动层：顶栏按钮 / 昼夜 / 昼夜标记 / 叶片 / 萤火虫
 * ============================================================ */

.sn-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(232, 237, 218, .28);
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  color: #e9edda;
  font-size: 13px;
  letter-spacing: .04em;
  cursor: pointer;
  transition: background .22s, border-color .22s, transform .18s, color .22s;
}

.sn-tool-btn:hover { background: rgba(255, 255, 255, .16); border-color: rgba(200, 220, 160, .6); transform: translateY(-1px); }
.sn-tool-btn:active { transform: translateY(0) scale(.97); }
.sn-tool-btn:focus-visible { outline: 2px solid rgba(169, 200, 108, .8); outline-offset: 2px; }
.sn-tool-btn > span:first-child { font-size: 14px; line-height: 1; }

.sn-tool-btn--mode { padding-inline: 12px; }

.sn-tool-btn__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #f2e2a2;
  box-shadow: 0 0 0 3px rgba(242, 226, 162, .2);
  transition: background .3s, box-shadow .3s;
}

.sn-tool-btn--mode.is-night .sn-tool-btn__dot {
  background: #b9d47c;
  box-shadow: 0 0 0 3px rgba(185, 212, 124, .22), 0 0 12px rgba(185, 212, 124, .8);
}

/* 夜间：覆盖层整体转深，原站页面保持可读 */
body.sn-night-x #snroot {
  --sn-bg: #131d16;
  --sn-bg-2: #182319;
  --sn-ink: #e7eee0;
  --sn-ink-2: #bcc9b5;
  --sn-mut: #8b9a86;
  --sn-line: #2b3a31;
  --sn-line-2: #1f2c24;
  --sn-sh: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 26px -14px rgba(0, 0, 0, .7);
  --sn-sh-lg: 0 2px 8px rgba(0, 0, 0, .5), 0 34px 80px -34px rgba(0, 0, 0, .9);
}

body.sn-night-x .sn-modal { box-shadow: var(--sn-sh-lg), 0 0 0 1px rgba(255, 255, 255, .06) inset; }
body.sn-night-x .sn-card { background: #18231a; }
body.sn-night-x .sn-card__body { background: #18231a; border-top-color: #24322a; }
body.sn-night-x .sn-card.is-active { background: #1c2a1c; box-shadow: 0 0 0 1.5px #6f9a5c, 0 14px 26px -18px rgba(0, 0, 0, .8); }
body.sn-night-x .sn-card.is-active .sn-card__body { background: transparent; }
body.sn-night-x .sn-task { background: #141f17; }
body.sn-night-x .sn-note__in,
body.sn-night-x .sn-note__out,
body.sn-night-x .sn-form input,
body.sn-night-x .sn-askbar,
body.sn-night-x .sn-seed { background: #16211a; color: var(--sn-ink); }
body.sn-night-x .sn-ghost { background: #16211a; color: var(--sn-ink-2); }

/* 昼夜属性标记（图鉴卡片） */
.sn-time-tag {
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 2;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 9.5px;
  letter-spacing: .1em;
  color: #eef4e6;
  background: rgba(16, 32, 22, .55);
  border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(6px);
  pointer-events: none;
}

#app .card { position: relative; }

/* 夜晚：日行物种压暗，夜行物种点亮 */
#app .card.is-dim { opacity: .52; filter: saturate(.75); transition: opacity .4s, filter .4s; }
#app .card.is-dim:hover { opacity: .9; filter: none; }
#app .card.is-lit { box-shadow: 0 0 0 1px #86ac63, 0 16px 34px -20px rgba(120, 170, 90, .7); }
#app .card.is-lit .sn-time-tag { background: rgba(140, 190, 96, .9); color: #14240f; border-color: transparent; }

/* 前景枝叶：只压四周边缘、强模糊 + 柔化蒙版，读作失焦前景而不是污渍 */
.forest-leaves { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }

.forest-leaves i {
  position: absolute;
  display: block;
  background: url('assets/forest-canopy.jpg') center / cover no-repeat;
  filter: blur(11px) saturate(.86) brightness(.62);
  mix-blend-mode: soft-light;
  opacity: .5;
  transform-origin: 50% 0;
  will-change: transform;
  animation: snLeafSway 17s ease-in-out infinite;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.forest-leaves i:nth-child(1) {
  top: -16%; left: -12%; width: 54%; height: 40%;
  background-position: 18% 6%;
  -webkit-mask-image: radial-gradient(104% 92% at 18% 0%, #000 0%, rgba(0, 0, 0, .55) 46%, transparent 74%);
  mask-image: radial-gradient(104% 92% at 18% 0%, #000 0%, rgba(0, 0, 0, .55) 46%, transparent 74%);
}

.forest-leaves i:nth-child(2) {
  top: -18%; right: -14%; width: 48%; height: 36%;
  background-position: 84% 8%;
  animation-duration: 20s;
  animation-delay: -5s;
  opacity: .42;
  -webkit-mask-image: radial-gradient(100% 92% at 84% 0%, #000 0%, rgba(0, 0, 0, .5) 44%, transparent 72%);
  mask-image: radial-gradient(100% 92% at 84% 0%, #000 0%, rgba(0, 0, 0, .5) 44%, transparent 72%);
}

.forest-leaves i:nth-child(3) {
  bottom: -20%; left: -14%; width: 50%; height: 42%;
  background-position: 12% 94%;
  transform-origin: 50% 100%;
  animation-duration: 23s;
  animation-delay: -9s;
  opacity: .38;
  -webkit-mask-image: radial-gradient(104% 96% at 12% 100%, #000 0%, rgba(0, 0, 0, .45) 44%, transparent 72%);
  mask-image: radial-gradient(104% 96% at 12% 100%, #000 0%, rgba(0, 0, 0, .45) 44%, transparent 72%);
}

.forest-leaves i:nth-child(4) {
  bottom: -22%; right: -16%; width: 44%; height: 38%;
  background-position: 88% 96%;
  transform-origin: 50% 100%;
  animation-duration: 19s;
  animation-delay: -13s;
  opacity: .34;
  -webkit-mask-image: radial-gradient(102% 96% at 88% 100%, #000 0%, rgba(0, 0, 0, .42) 42%, transparent 70%);
  mask-image: radial-gradient(102% 96% at 88% 100%, #000 0%, rgba(0, 0, 0, .42) 42%, transparent 70%);
}

@keyframes snLeafSway {
  0%, 100% { transform: rotate(-.32deg) translate3d(0, 0, 0) scale(1.04); }
  38% { transform: rotate(.42deg) translate3d(6px, 4px, 0) scale(1.052); }
  72% { transform: rotate(-.14deg) translate3d(-4px, 7px, 0) scale(1.044); }
}

.forest-home.evening .forest-leaves i { filter: blur(12px) saturate(.7) brightness(.4); }

.forest-fireflies {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: screen;
}

/* ============================================================
 * 拍照识别
 * ============================================================ */

.sn-modal--vision {
  width: min(96vw, 1080px);
  max-height: 92vh;
  padding: 0;
}

.sn-vision__head { padding: 28px 30px 16px; border-bottom: 1px solid var(--sn-line-2); }
.sn-vision__eyebrow { font-size: 10px; letter-spacing: .3em; color: var(--sn-gold); }
.sn-vision__head h2 { margin: 8px 0 6px; font-size: clamp(22px, 2.2vw, 30px); font-weight: 650; letter-spacing: -.015em; color: var(--sn-ink); }
.sn-vision__head p { margin: 0; max-width: 68ch; font-size: 14px; line-height: 1.8; color: var(--sn-ink-2); }

.sn-vision__body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); }

.sn-vision__left { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow: auto; }

.sn-drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 230px;
  padding: 20px;
  border-radius: 16px;
  border: 1.5px dashed #c3cfb6;
  background: var(--sn-bg-2);
  text-align: center;
  cursor: pointer;
  overflow: hidden;
  transition: border-color .2s, background .2s;
}

.sn-drop:hover { border-color: #9dbb7d; background: #f2f6ec; }
.sn-drop.is-over { border-color: var(--sn-green); background: #eef4e6; }
body.sn-night-x .sn-drop:hover { background: #1a261c; }

.sn-drop__icon { font-size: 26px; color: #9cb289; }
.sn-drop b { font-size: 15px; color: var(--sn-ink); }
.sn-drop__hint { font-size: 11.5px; color: var(--sn-mut); }

.sn-drop__preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sn-drop.has-image { border-style: solid; border-color: #b9cda6; }
.sn-drop.has-image .sn-drop__icon,
.sn-drop.has-image b,
.sn-drop.has-image .sn-drop__hint { display: none; }

.sn-vision__acts { display: flex; gap: 8px; flex-wrap: wrap; }

.sn-hint--dim { color: var(--sn-mut); opacity: .85; }

.sn-vision__right {
  min-height: 0;
  overflow: auto;
  padding: 22px 24px 26px;
  border-left: 1px solid var(--sn-line-2);
  background: var(--sn-bg-2);
}

.sn-vision__empty,
.sn-vision__fail {
  height: 100%;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  color: var(--sn-mut);
}

.sn-vision__empty span,
.sn-vision__fail-icon { font-size: 30px; color: #b8c6ac; }
.sn-vision__empty b,
.sn-vision__fail b { font-size: 15px; color: var(--sn-ink); }
.sn-vision__empty p,
.sn-vision__fail p { margin: 0; max-width: 40ch; font-size: 13px; line-height: 1.8; }

.sn-vision__card { display: flex; gap: 16px; align-items: flex-start; }
.sn-vision__card.is-low { border-left: 2px solid #d9b26a; padding-left: 12px; }

.sn-vision__shot { position: relative; flex: 0 0 132px; border-radius: 12px; overflow: hidden; box-shadow: var(--sn-sh); }
.sn-vision__shot img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 4 / 5; }

.sn-vision__meta { min-width: 0; flex: 1; }
.sn-vision__conf { font-size: 11px; letter-spacing: .1em; color: var(--sn-gold); }
.sn-vision__meta h3 { margin: 4px 0 2px; font-size: 24px; font-weight: 650; letter-spacing: -.015em; color: var(--sn-ink); }
.sn-vision__meta i { font-style: italic; font-size: 12.5px; color: var(--sn-mut); }
.sn-vision__meta p { margin: 10px 0 12px; font-size: 13.5px; line-height: 1.85; color: var(--sn-ink-2); }
.sn-vision__tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.sn-vision__tags span { font-size: 11px; padding: 3px 9px; border-radius: 999px; background: var(--sn-bg); border: 1px solid var(--sn-line); color: var(--sn-ink-2); }
.sn-vision__tags .is-new { background: #eef4e6; border-color: #bcd6a4; color: #3d6b47; font-weight: 600; }
.sn-vision__meta .sn-vision__acts { margin-bottom: 10px; }

.sn-vision__alts { margin-top: 18px; display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.sn-vision__alts > span { font-size: 11px; letter-spacing: .08em; color: var(--sn-mut); }

/* ============================================================
 * 徽章
 * ============================================================ */

.sn-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 16px; }

.sn-badge {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 10px 14px;
  border-radius: 16px;
  border: 1px solid var(--sn-line);
  background: var(--sn-bg);
  transition: transform .3s cubic-bezier(.22, .8, .25, 1), box-shadow .3s, border-color .3s;
}

.sn-badge:hover { transform: translateY(-4px); box-shadow: var(--sn-sh); }

.sn-badge__svg { width: 64px; height: 64px; overflow: visible; }
.sn-badge__ring { fill: none; stroke: #dde3d4; stroke-width: 1.4; transition: stroke .4s; }
.sn-badge__ink { fill: none; stroke: #c3ccb9; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: stroke .4s; }
.sn-badge figcaption { font-size: 12.5px; font-weight: 600; color: var(--sn-mut); letter-spacing: .04em; }
.sn-badge > span { font-size: 10px; color: #aab4a2; letter-spacing: .1em; }

.sn-badge.is-lit { border-color: #c3d8a8; background: linear-gradient(180deg, #f7fbf2, #eef4e6); }
body.sn-night-x .sn-badge.is-lit { background: linear-gradient(180deg, #1b2a1c, #16211a); border-color: #4e6f45; }
.sn-badge.is-lit .sn-badge__ring { stroke: #9ec27a; stroke-width: 1.8; }
.sn-badge.is-lit .sn-badge__ink { stroke: var(--sn-green); }
body.sn-night-x .sn-badge.is-lit .sn-badge__ink { stroke: #bfe09a; }
.sn-badge.is-lit figcaption { color: var(--sn-ink); }
.sn-badge.is-lit > span { color: var(--sn-green); }
.sn-badge.is-lit .sn-badge__svg { filter: drop-shadow(0 3px 8px rgba(120, 170, 90, .35)); }
.sn-badge.is-locked { opacity: .82; }

/* ============================================================
 * 观察小屋
 * ============================================================ */

.sn-hut-host { width: 100%; }

.sn-hut { display: flex; flex-direction: column; gap: 34px; padding: 6px 0 30px; }

.sn-hut__head {
  display: flex;
  gap: 28px;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--sn-line-2);
}

.sn-hut__eyebrow { font-size: 10.5px; letter-spacing: .28em; color: var(--sn-gold); }
.sn-hut__head h1 { margin: 10px 0 8px; font-size: clamp(26px, 3vw, 40px); font-weight: 650; letter-spacing: -.02em; line-height: 1.2; color: var(--sn-ink, #1b2a21); }
.sn-hut__head p { margin: 0; max-width: 54ch; font-size: 14.5px; line-height: 1.85; color: var(--sn-ink-2, #43554a); }

.sn-hut__stats { display: flex; gap: 26px; flex-wrap: wrap; }
.sn-hut__stats div { display: flex; flex-direction: column; gap: 2px; }
.sn-hut__stats b { font-size: 26px; font-weight: 650; letter-spacing: -.01em; color: var(--sn-green, #2f5d43); font-variant-numeric: tabular-nums; }
.sn-hut__stats span { font-size: 11px; letter-spacing: .1em; color: #8b9a86; }

.sn-hut__section { display: flex; flex-direction: column; gap: 16px; }

.sn-hut__label { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.sn-hut__label h2 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: .02em; color: var(--sn-ink, #1b2a21); }
.sn-hut__label span { font-size: 11.5px; color: #8b9a86; letter-spacing: .06em; }

.sn-tasks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }

.sn-tasks li {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #e3e7dd;
  background: #fff;
  transition: border-color .3s, background .3s;
}

.sn-tasks li.is-done { border-color: #c3d8a8; background: #f5faf0; }
body.sn-night-x .sn-tasks li { background: #18231a; border-color: #24322a; }
body.sn-night-x .sn-tasks li.is-done { background: #1b2a1c; border-color: #4e6f45; }

.sn-tasks__row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.sn-tasks__row b { font-size: 14px; color: #1b2a21; }
body.sn-night-x .sn-tasks__row b { color: #e7eee0; }
.sn-tasks__row span { font-size: 11px; color: #8b9a86; font-variant-numeric: tabular-nums; }
.sn-tasks li p { margin: 5px 0 10px; font-size: 12.5px; line-height: 1.7; color: #6f7d72; }

.sn-tasks__bar { height: 4px; border-radius: 3px; background: #e8ece2; overflow: hidden; }
body.sn-night-x .sn-tasks__bar { background: #24322a; }
.sn-tasks__bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #7fae5c, #b8d492); transition: width .6s cubic-bezier(.22, .8, .25, 1); }
.sn-tasks li.is-done .sn-tasks__bar i { background: linear-gradient(90deg, #4f8a54, #8fc46e); }

.sn-hut__wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; }

.sn-hut__pin {
  all: unset;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 0 0 1px #e3e7dd;
  transition: transform .28s cubic-bezier(.22, .8, .25, 1), box-shadow .28s;
}

.sn-hut__pin img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.sn-hut__pin span { padding: 0 8px 8px; font-size: 11.5px; color: #43554a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sn-hut__pin:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px #b3c7a2, 0 20px 34px -22px rgba(20, 40, 30, .6); }
.sn-hut__pin:focus-visible { outline: 2px solid var(--sn-green); outline-offset: 2px; }

.sn-hut__empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 28px;
  border-radius: 16px;
  border: 1px dashed #cfd8c6;
  background: #f6f8f2;
}
.sn-hut__empty span { font-size: 22px; color: #a9bb9c; }
.sn-hut__empty b { font-size: 15px; color: #1b2a21; }
.sn-hut__empty p { margin: 0 0 6px; font-size: 13px; line-height: 1.8; color: #6f7d72; }

.sn-hut__section--foot {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-top: 22px;
  border-top: 1px solid #e3e7dd;
}
.sn-hut__section--foot h2 { margin: 0 0 6px; font-size: 17px; font-weight: 650; color: #1b2a21; }
.sn-hut__section--foot p { margin: 0; font-size: 13px; color: #6f7d72; max-width: 46ch; line-height: 1.8; }
.sn-hut__acts { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.sn-hut__acts a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px; border-radius: 999px; text-decoration: none; font-size: 13.5px; }
.sn-hut__acts .sn-primary { color: #f4f7ee; }
.sn-hut__acts .sn-ghost { border: 1px solid #d8dfcf; background: #fff; color: #43554a; }

/* 任务达成的小提示 */
.sn-badge-pop {
  position: fixed;
  right: 24px;
  bottom: 26px;
  z-index: 330;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 12px;
  border-radius: 999px;
  background: rgba(22, 42, 28, .95);
  color: #eef5e4;
  font-size: 13px;
  box-shadow: 0 20px 44px -20px rgba(0, 0, 0, .8);
  opacity: 0;
  transform: translateY(14px) scale(.96);
  transition: opacity .3s, transform .3s;
  pointer-events: none;
  backdrop-filter: blur(10px);
}
.sn-badge-pop.is-on { opacity: 1; transform: none; }
.sn-badge-pop__mark {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(180deg, #bfe09a, #8fc46e);
  color: #16240f;
  font-size: 12px;
  font-weight: 700;
}

/* ============================================================
 * 响应式
 * ============================================================ */

@media (max-width: 1180px) {
  .sn-tool-btn span:last-child { display: none; }
  .sn-tool-btn { padding-inline: 11px; }
  .sn-vision__body { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .sn-modal--vision { width: 100vw; height: 100vh; max-height: none; border-radius: 0; }
  .sn-vision__body { display: block; overflow: auto; }
  .sn-vision__right { border-left: 0; border-top: 1px solid var(--sn-line-2); }
  .sn-hut__head { flex-direction: column; align-items: flex-start; gap: 18px; }
  .sn-hut__stats { gap: 18px; }
  .sn-badges { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; }
}

@media (max-width: 560px) {
  .sn-vision__head { padding: 20px 18px 12px; }
  .sn-vision__left,
  .sn-vision__right { padding: 16px 18px 20px; }
  .sn-drop { min-height: 190px; }
  .sn-vision__card { flex-direction: column; }
  .sn-vision__shot { flex-basis: auto; width: 100%; }
  .sn-vision__shot img { aspect-ratio: 16 / 10; }
  .sn-badge-pop { right: 12px; left: 12px; bottom: 16px; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .forest-leaves i { animation: none; }
  .forest-fireflies { display: none; }
  .sn-badge:hover,
  .sn-hut__pin:hover { transform: none; }
}

/* 夜间：关闭按钮与小屋标题的可读性修正 */
body.sn-night-x #snroot .sn-x {
  background: #1e2a22;
  border-color: #33463a;
  color: #e7eee0;
}
body.sn-night-x #snroot .sn-x:hover { background: #2b3d31; color: #fff; }
body.sn-night-x .sn-hut__head { border-bottom-color: #2b3a31; }
body.sn-night-x .sn-hut__head h1 { color: #eef4e7; }
body.sn-night-x .sn-hut__head p { color: #a9b8a3; }
body.sn-night-x .sn-hut__stats b { color: #bfe09a; }
body.sn-night-x .sn-hut__section--foot { border-top-color: #2b3a31; }
body.sn-night-x .sn-hut__section--foot h2 { color: #eef4e7; }
body.sn-night-x .sn-hut__section--foot p { color: #a9b8a3; }
body.sn-night-x .sn-hut__pin { background: #18231a; box-shadow: 0 0 0 1px #2b3a31; }
body.sn-night-x .sn-hut__pin span { color: #c4d1bc; }
body.sn-night-x .sn-hut__empty { background: #16211a; border-color: #2b3a31; }
body.sn-night-x .sn-hut__empty b { color: #eef4e7; }
body.sn-night-x .sn-hut__acts .sn-ghost { background: #16211a; border-color: #2b3a31; color: #c4d1bc; }
/* 夜间：观察小屋整体改用暗面板，保证浅色文字可读 */
body.sn-night-x .sn-hut-host {
  background: linear-gradient(180deg, #101c15 0%, #0d1710 100%);
  border-radius: 22px;
  padding: clamp(20px, 3vw, 42px);
  box-shadow: inset 0 0 0 1px #1d2b23;
}

body.sn-night-x .sn-hut__label h2 { color: #eef4e7; }
body.sn-night-x .sn-hut__label span { color: #8b9a86; }
body.sn-night-x .sn-hut__stats span { color: #8b9a86; }
body.sn-night-x .sn-tasks li p { color: #9dab97; }
body.sn-night-x .sn-hut__empty p { color: #9dab97; }
body.sn-night-x .sn-hut__pin img { background: #16211a; }
body.sn-night-x .sn-badge.is-locked .sn-badge__ring { stroke: #2b3a31; }
body.sn-night-x .sn-badge.is-locked .sn-badge__ink { stroke: #3c4c40; }
body.sn-night-x .sn-badge.is-locked figcaption { color: #7f8f7b; }
body.sn-night-x .sn-badge.is-locked > span { color: #6c7b69; }body.sn-night-x .sn-badge.is-lit > span { color: #bfe09a; }
body.sn-night-x .sn-badge.is-lit figcaption { color: #eef4e7; }
/* 观察小屋位于 #app 内，需要把调色变量一并作用到 #app，否则 var(--sn-*) 取不到值 */
#app {
  --sn-ink: #1b2a21;
  --sn-ink-2: #43554a;
  --sn-mut: #7d8b80;
  --sn-line: #e3e7dd;
  --sn-line-2: #eef1e9;
  --sn-green: #2f5d43;
  --sn-lime: #a9c86c;
  --sn-gold: #c07f3a;
  --sn-bg: #ffffff;
  --sn-bg-2: #f6f8f2;
}

body.sn-night-x #app {
  --sn-ink: #e7eee0;
  --sn-ink-2: #bcc9b5;
  --sn-mut: #8b9a86;
  --sn-line: #2b3a31;
  --sn-line-2: #1f2c24;
  --sn-green: #9ec27a;
  --sn-gold: #d8b06a;
  --sn-bg: #131d16;
  --sn-bg-2: #182319;
}
/* ============================================================
 * 昼夜生态：太阳 / 月亮切换、环境音、图鉴时段筛选
 * ============================================================ */

.sn-moon-btn {
  position: relative;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid rgba(232, 237, 218, .28);
  background: rgba(255, 255, 255, .06);
  color: #e9edda;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .25s, border-color .25s, transform .22s, color .25s, box-shadow .3s;
}

.sn-moon-btn:hover { background: rgba(255, 255, 255, .16); border-color: rgba(200, 220, 160, .6); transform: translateY(-1px); }
.sn-moon-btn:active { transform: translateY(0) scale(.95); }
.sn-moon-btn:focus-visible { outline: 2px solid rgba(169, 200, 108, .8); outline-offset: 2px; }

.sn-moon-btn__icon {
  position: absolute;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  transition: opacity .35s ease, transform .55s cubic-bezier(.22, .8, .25, 1);
}

.sn-moon-btn__icon--sun { opacity: 1; transform: rotate(0) scale(1); }
.sn-moon-btn__icon--moon { opacity: 0; transform: rotate(-45deg) scale(.65); }

.sn-moon-btn.is-night {
  color: #e2f2bf;
  border-color: rgba(185, 212, 124, .55);
  background: rgba(185, 212, 124, .16);
  box-shadow: 0 0 18px -6px rgba(185, 212, 124, .8);
}

.sn-moon-btn.is-night .sn-moon-btn__icon--sun { opacity: 0; transform: rotate(70deg) scale(.65); }
.sn-moon-btn.is-night .sn-moon-btn__icon--moon { opacity: 1; transform: rotate(0) scale(1); }

/* 环境音按钮 */
.sn-tool-btn--icon { width: 42px; padding: 0; justify-content: center; }
.sn-ambient__svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.sn-ambient__wave { transition: opacity .25s; }
.sn-ambient__slash { opacity: 0; transition: opacity .25s; }
#sn-ambient.is-off .sn-ambient__wave { opacity: 0; }
#sn-ambient.is-off .sn-ambient__slash { opacity: 1; }
#sn-ambient.is-off { color: #9aa694; }

/* 图鉴时段筛选条 */
.sn-filterbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 18px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid #e3e7dd;
  background: rgba(255, 255, 255, .62);
  backdrop-filter: blur(6px);
}

.sn-filterbar__label { font-size: 11px; letter-spacing: .14em; color: #7d8b80; }

.sn-filterbar button {
  border: 1px solid #dce0d5;
  background: #fff;
  color: #43554a;
  font-size: 12.5px;
  padding: 5px 13px;
  min-height: 30px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s, transform .18s;
}

.sn-filterbar button:hover { border-color: #b9c7ae; background: #f6f8f2; }
.sn-filterbar button:active { transform: scale(.97); }
.sn-filterbar button.is-on { background: #2f5d43; border-color: #2f5d43; color: #f4f7ee; }
.sn-filterbar__count { margin-left: auto; font-size: 11.5px; color: #8b9886; letter-spacing: .04em; }

#app .card.sn-filtered-out { display: none !important; }

body.sn-night-x .sn-filterbar { background: rgba(20, 32, 24, .72); border-color: #24322a; }
body.sn-night-x .sn-filterbar__label { color: #8b9a86; }
body.sn-night-x .sn-filterbar button { background: #16211a; border-color: #24322a; color: #c4d1bc; }
body.sn-night-x .sn-filterbar button:hover { background: #1c2a20; border-color: #3a5342; }
body.sn-night-x .sn-filterbar button.is-on { background: #9ec27a; border-color: #9ec27a; color: #12210f; }
body.sn-night-x .sn-filterbar__count { color: #8b9a86; }

/* ============================================================
 * 夜间主题：深墨绿 + 低饱和暗紫，萤火微光
 * ============================================================ */

body.sn-night-x {
  --green: #9ec27a;
  --paper: #0b1510;
  --accent: #16241c;
  --ink: #e6ecdf;
  --muted: #8b9a86;
  background-color: #0a1310;
  background-image:
    radial-gradient(ellipse 70% 50% at 12% 0%, rgba(62, 54, 96, .34), transparent 62%),
    radial-gradient(ellipse 60% 46% at 88% 8%, rgba(38, 44, 82, .26), transparent 60%),
    radial-gradient(ellipse 80% 60% at 50% 108%, rgba(22, 52, 38, .55), transparent 64%),
    linear-gradient(180deg, #0a1310 0%, #0c1513 46%, #0b1310 100%);
  color: var(--ink);
}

/* 夜色里缓慢呼吸的萤火微光 */
body.sn-night-x #app { position: relative; }

body.sn-night-x #app::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-repeat: no-repeat;
  background-image:
    radial-gradient(circle at 8% 18%, rgba(206, 255, 158, .5) 0, rgba(180, 240, 120, .12) 2px, transparent 6px),
    radial-gradient(circle at 22% 62%, rgba(206, 255, 158, .34) 0, rgba(180, 240, 120, .1) 2px, transparent 7px),
    radial-gradient(circle at 37% 34%, rgba(206, 255, 158, .42) 0, rgba(180, 240, 120, .1) 2px, transparent 6px),
    radial-gradient(circle at 54% 76%, rgba(206, 255, 158, .3) 0, rgba(180, 240, 120, .08) 2px, transparent 8px),
    radial-gradient(circle at 68% 22%, rgba(206, 255, 158, .38) 0, rgba(180, 240, 120, .1) 2px, transparent 6px),
    radial-gradient(circle at 82% 58%, rgba(206, 255, 158, .46) 0, rgba(180, 240, 120, .12) 2px, transparent 7px),
    radial-gradient(circle at 93% 30%, rgba(206, 255, 158, .3) 0, rgba(180, 240, 120, .08) 2px, transparent 6px),
    radial-gradient(circle at 15% 88%, rgba(206, 255, 158, .34) 0, rgba(180, 240, 120, .1) 2px, transparent 6px),
    radial-gradient(circle at 46% 12%, rgba(206, 255, 158, .26) 0, transparent 5px),
    radial-gradient(circle at 74% 88%, rgba(206, 255, 158, .3) 0, transparent 6px);
  animation: snFireGlow 9s ease-in-out infinite alternate;
}

@keyframes snFireGlow {
  0% { opacity: .38; transform: translateY(0) scale(1); }
  50% { opacity: .78; transform: translateY(-6px) scale(1.02); }
  100% { opacity: .5; transform: translateY(3px) scale(1.01); }
}

body.sn-night-x #app > * { position: relative; z-index: 1; }

/* 顶部条 */
body.sn-night-x header { background: linear-gradient(100deg, #07110c, #0d1c15 62%, #081410); border-bottom-color: #1e2f25; box-shadow: 0 8px 30px #00000045; }
body.sn-night-x header nav a { color: #a9bda8; }
body.sn-night-x header nav a.active { color: #e8f4c9; }
body.sn-night-x header nav a.active:after { background: #9ec27a; }
body.sn-night-x .brand, body.sn-night-x .brand small { color: #eef4e7; }

/* 封面与板块标题 */
body.sn-night-x .intro {
  background: linear-gradient(90deg, #071009f2 0%, #0c1a13d9 42%, #10241a40), url('assets/forest-canopy.jpg') center 43% / cover;
  box-shadow: 0 12px 36px #00000055;
}
body.sn-night-x .intro h1 { color: #f0f6e6; }
body.sn-night-x .intro p, body.sn-night-x .intro .season { color: #a9bda8; }
body.sn-night-x .section-title h2 { color: #dfe9d3; }
body.sn-night-x .eyebrow { color: #9aad8e; }

/* 图鉴卡片 */
body.sn-night-x #app .card { background: #111d16; border-color: #23322a; box-shadow: 0 6px 22px #00000040; }
body.sn-night-x #app .card .cardbody { background: linear-gradient(#111d16, #0e1a14); }
body.sn-night-x #app .card .cardbody h3 { color: #e8efe0; }
body.sn-night-x #app .card .cardbody p { color: #9aab95; }
body.sn-night-x #app .card .latin { color: #8fa188; }
body.sn-night-x #app .card .cardmeta { color: #8b9a86; }
body.sn-night-x #app .card .tag { background: #1c2c22; color: #a9c98a; border: 1px solid #2b3d31; }
body.sn-night-x #app .card:hover { border-color: #4c6d4d; box-shadow: 0 30px 52px -22px #000000cc, 0 0 0 1px #3d5940; }
body.sn-night-x #app .card img { filter: brightness(.82) saturate(.92); transition: filter .4s; }
body.sn-night-x #app .card:hover img,
body.sn-night-x #app .card.is-lit img { filter: brightness(.96) saturate(1); }

/* 搜索、筛选、说明 */
body.sn-night-x .search { background: #12201a; border-color: #24322a; }
body.sn-night-x .search input { color: #e6ecdf; }
body.sn-night-x .search input::placeholder { color: #7f8f7b; }
body.sn-night-x .chips select,
body.sn-night-x .chips button { background: #12201a; border-color: #24322a; color: #c4d1bc; }
body.sn-night-x .chips button.active { background: #9ec27a; border-color: #9ec27a; color: #12210f; }
body.sn-night-x .creditline { color: #7f8f7b; }
body.sn-night-x .empty { color: #9aab95; }

/* 详情页与纸张块 */
body.sn-night-x .detailhero h1 { color: #eef4e7; }
body.sn-night-x .detailhero p, body.sn-night-x .detailblocks p, body.sn-night-x .paper p { color: #b9c8b2; }
body.sn-night-x .paper { background: linear-gradient(135deg, #121f18, #0f1a15); border: 1px solid #22322a; }
body.sn-night-x .paper h3 { color: #dfe9d3; }
body.sn-night-x .facts b { color: #dce8d2; }
body.sn-night-x .facts small { color: #8b9a86; }
body.sn-night-x .callout { background: #14231b; border-color: #24332b; }
body.sn-night-x .callout h2 { color: #dfe9d3; }
body.sn-night-x .link, body.sn-night-x .detailhero a.link { color: #a9c98a; }
body.sn-night-x main { background: transparent; }
body.sn-night-x footer { background: transparent; color: #7f8f7b; border-top: 1px solid #1c2a22; }
body.sn-night-x dialog#modal { background: #101c15; color: #e6ecdf; }
body.sn-night-x #toast { background: #16261c; color: #e6ecdf; border-color: #2b3d31; }

/* 白天：保持浅绿森系，只补一点阳光感 */
body:not(.sn-night) #app .card { box-shadow: 0 4px 18px #213f1f0d; }

@media (prefers-reduced-motion: reduce) {
  body.sn-night-x #app::before { animation: none; opacity: .5; }
  .sn-moon-btn__icon { transition: none; }
}

@media (max-width: 1180px) {
  .sn-moon-btn,
  .sn-tool-btn--icon { width: 38px; height: 38px; min-height: 38px; }
}

@media (max-width: 560px) {
  .sn-filterbar { gap: 6px; padding: 8px 10px; }
  .sn-filterbar button { padding: 5px 10px; font-size: 12px; }
  .sn-filterbar__count { width: 100%; margin-left: 0; }
  .sn-moon-btn,
  .sn-tool-btn--icon { width: 34px; height: 34px; min-height: 34px; }
  .sn-moon-btn__icon { width: 17px; height: 17px; }
}

/* ============================================================
 * 手记 + 观察小屋合并板块
 * ============================================================ */

.sn-hut-host--journal {
  margin: 44px 0 18px;
  padding-top: 32px;
  border-top: 1px solid #e3e7dd;
}

body.sn-night-x .sn-hut-host--journal { border-top-color: #25332b; }

.sn-hut-sep {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 40px 0 6px;
}

.sn-hut-sep span {
  font-size: 11px;
  letter-spacing: .26em;
  color: #9aa88f;
  white-space: nowrap;
}

.sn-hut-sep i { flex: 1; height: 1px; background: linear-gradient(90deg, #d8e0cf, transparent); }

body.sn-night-x .sn-hut-sep span { color: #7f8f7b; }
body.sn-night-x .sn-hut-sep i { background: linear-gradient(90deg, #2b3a31, transparent); }

.sn-hut--compact { gap: 22px; padding-bottom: 8px; }
.sn-hut--compact .sn-hut__section { gap: 12px; }

.sn-hut__label--top { align-items: center; }
.sn-hut__label--top h2 { font-size: 20px; }
.sn-hut__label--top h2 small {
  margin-left: 8px;
  font-size: 10px;
  letter-spacing: .22em;
  font-weight: 500;
  color: #9aa88f;
}

.sn-hut__stats--inline {
  gap: 30px;
  padding: 14px 18px;
  border-radius: 14px;
  background: #f6f8f2;
  border: 1px solid #e8ece1;
}

body.sn-night-x .sn-hut__stats--inline { background: #121f18; border-color: #22322a; }

/* 识别新增的物种卡片 */
#app .card.sn-card-new { position: relative; }
#app .card.sn-card-new::after {
  content: '识别新增';
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 9.5px;
  letter-spacing: .08em;
  color: #14240f;
  background: linear-gradient(180deg, #d7efb8, #b6dc90);
  box-shadow: 0 2px 6px #2f5d4326;
}

.sn-newflag {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 9.5px;
  letter-spacing: .1em;
  color: #14240f;
  background: linear-gradient(180deg, #d7efb8, #b6dc90);
}

.sn-vision__card--new .sn-vision__shot { flex-basis: 148px; }

@media (max-width: 900px) {
  .sn-hut__stats--inline { gap: 20px; padding: 12px 14px; }
}

@media (max-width: 560px) {
  .sn-hut-host--journal { margin-top: 30px; padding-top: 22px; }
  .sn-hut__stats--inline { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 18px; }
  .sn-hut__label--top { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* 「识图探索」已并入「拍照识别」：隐藏原入口，只留一个识别按钮 */
header .headtools > #identify { display: none !important; }
/* 轮播图：完整展示，不再裁切。
   图片按 contain 缩放（整张可见），四周用同图虚化的浅色衬底填满，避免出现黑边 */
.home-slide img {
  position: relative;
  z-index: 1;
  object-fit: contain;
  object-position: center;
  width: 100%;
  height: 100%;
}

.home-slide::before {
  content: '';
  position: absolute;
  inset: -8%;
  background-image: var(--src);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(20px) saturate(.9) brightness(.42);
  transform: scale(1.12);
  opacity: .95;
  z-index: 0;
}

/* 缩放幅度收小，保证动态过程中也不会把画面顶出边框 */
.home-slide {
  overflow: hidden;
  transform: scale(1.012);
  background: #0d1b13;
}

.home-slide.is-on { transform: scale(1); }

@media (prefers-reduced-motion: reduce) {
  .home-slide { transform: none; }
  .home-slide.is-on { transform: none; }
}

/* 相框宽度跟随照片比例（由 home.js 写入 --frame-w），避免竖图被压成窄条 */
.home-media__frame {
  width: var(--frame-w, 100%);
  max-width: 100%;
  margin-inline: auto;
  transition: width .62s cubic-bezier(.22, .8, .25, 1);
}

/* 相框收窄时，左上角标签与右下角计数需要跟着内缩，避免压在图片外 */
.home-media__frame .home-slide__cap { max-width: calc(100% - 24px); }

@media (prefers-reduced-motion: reduce) {
  .home-media__frame { transition: none; }
}
.home-slide__cap { z-index: 3; }
.home-slide img { z-index: 1; }
/* ============================================================
 * 轮播：统一 4:3 画框，整图完整、不裁切、不留白、不做缩放
 * ============================================================ */
.home-media__frame {
  --frame-h: clamp(238px, 32svh, 426px);
  width: min(100%, calc(var(--frame-h) * 1.33333));
  height: auto;
  aspect-ratio: 4 / 3;
  margin-inline: auto;
  transition: none;
}

.home-media__slides { position: absolute; inset: 0; }

.home-slide,
.home-slide.is-on {
  transform: none;
  transition: opacity .85s cubic-bezier(.22, .8, .25, 1);
}

/* 不再需要同图虚化衬底 */
.home-slide::before { display: none; }

.home-slide img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.home-slide__cap { z-index: 3; }

/* 矮屏时同样保持 4:3 */
@media (min-width: 901px) and (max-height: 780px) {
  .home-media__frame { --frame-h: clamp(212px, 28svh, 320px); height: auto; }
}
/* ============================================================
 * 夜间模式（柔化版）
 * 只在白天基调上压暗一档：底色略深、图片略降饱和，不做整站反色。
 * 首页封面沿用自身的暮色处理，其余板块保持可读的浅色。
 * ============================================================ */

body.sn-night {
  --green: #55764a;
  --paper: #e3e7db;
  --accent: #edf0e5;
  --ink: #1e2b22;
  --muted: #6c7a69;
  background-color: #e3e7db;
  background-image:
    radial-gradient(ellipse 70% 50% at 10% 0%, rgba(88, 104, 134, .10), transparent 62%),
    radial-gradient(ellipse 80% 60% at 50% 108%, rgba(62, 90, 68, .12), transparent 64%),
    linear-gradient(180deg, #e6eade 0%, #e0e5d7 100%);
  color: var(--ink);
}

/* 极轻的夜间微光，只在内容层后面若隐若现 */
body.sn-night #app { position: relative; }

body.sn-night #app::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-repeat: no-repeat;
  opacity: .3;
  background-image:
    radial-gradient(circle at 12% 22%, rgba(180, 210, 150, .5) 0, transparent 5px),
    radial-gradient(circle at 38% 68%, rgba(180, 210, 150, .4) 0, transparent 6px),
    radial-gradient(circle at 66% 26%, rgba(180, 210, 150, .45) 0, transparent 5px),
    radial-gradient(circle at 86% 60%, rgba(180, 210, 150, .38) 0, transparent 6px),
    radial-gradient(circle at 22% 88%, rgba(180, 210, 150, .32) 0, transparent 5px);
  animation: snNightSoft 16s ease-in-out infinite alternate;
}

@keyframes snNightSoft {
  0% { opacity: .22; }
  100% { opacity: .42; }
}

body.sn-night #app > * { position: relative; z-index: 1; }

/* 顶栏比白天略深一点点 */
body.sn-night header {
  background: linear-gradient(100deg, #17362a, #1c3f31 62%, #16302a);
  border-bottom-color: #22402f;
}

/* 卡片、纸块：保持浅色，只轻微压暗 */
body.sn-night #app .card {
  background: #f7f9f1;
  border-color: #dce2d3;
  box-shadow: 0 6px 20px rgba(26, 46, 34, .07);
}

body.sn-night #app .card .cardbody { background: linear-gradient(#f7f9f1, #f1f4ea); }
body.sn-night #app .card img { filter: brightness(.95) saturate(.96); }
body.sn-night #app .card:hover img { filter: brightness(1) saturate(1); }

body.sn-night .paper,
body.sn-night .callout { background: #f6f8f0; border-color: #dfe5d6; }
body.sn-night .paper p,
body.sn-night .detailblocks p { color: #4b5a50; }

body.sn-night .search { background: #fbfcf7; border-color: #dce2d3; }
body.sn-night .chips select,
body.sn-night .chips button { background: #fbfcf7; border-color: #dce2d3; color: #43554a; }

body.sn-night .creditline,
body.sn-night .notice { color: #7d8b80; }

body.sn-night #toast { background: #1e2b22; color: #eef4e7; }

body.sn-night dialog#modal { background: #f8faf3; color: #1b2a21; }

@media (prefers-reduced-motion: reduce) {
  body.sn-night #app::before { animation: none; opacity: .3; }
}

/* ============================================================
 * 轮播：相框按图片自身比例收放（--frame-w 由 home.js 写入）
 * 框高固定，宽度 = 框高 × 图片宽高比，图片刚好填满
 * ============================================================ */
.home-media__frame {
  --frame-h: clamp(238px, 32svh, 426px);
  width: var(--frame-w, 100%);
  max-width: 100%;
  height: var(--frame-h);
  aspect-ratio: auto;
  margin-inline: auto;
  transition: width .5s cubic-bezier(.22, .8, .25, 1), height .3s ease;
}

.home-slide img { object-fit: contain; }

@media (min-width: 901px) and (max-height: 780px) {
  .home-media__frame { --frame-h: clamp(212px, 28svh, 320px); }
}

@media (prefers-reduced-motion: reduce) {
  .home-media__frame { transition: none; }
}
/* 手记页导出按钮组：与「导出记录」并排靠右 */
.sn-exportgroup {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex: 0 0 auto;
}

.sn-exportgroup .minibutton { white-space: nowrap; }

.sn-export-docx {
  border-color: #bcd0a8 !important;
  color: #2f5d43 !important;
  font-weight: 600;
}

.sn-export-docx:hover { background: #eef4e6 !important; }
.sn-export-docx:disabled { opacity: .6; cursor: default; }

@media (max-width: 560px) {
  .sn-exportgroup { gap: 6px; }
  .sn-exportgroup .minibutton { padding-inline: 10px; font-size: 12px; }
}
/* ============================================================
 * 品质打磨：焦点可见性 / 触控尺寸 / 移动端密度 / 细节一致
 * ============================================================ */

/* 1. 键盘焦点：全站统一可见（鼠标点击不出现） */
:where(a, button, [role="button"], input, select, textarea, summary):focus-visible {
  outline: 2px solid #7fae5c !important;
  outline-offset: 3px !important;
  border-radius: 6px;
}

header :where(a, button):focus-visible,
.forest-home :where(a, button):focus-visible {
  outline-color: #d6e8a8 !important;
}

.sn-modal :where(a, button):focus-visible,
.sn-sheet :where(a, button):focus-visible {
  outline-color: #55764a !important;
}

/* 2. 触控设备：把小控件撑到可点尺寸 */
@media (hover: none), (pointer: coarse) {
  .home-picks button { min-height: 40px; }
  .home-media__nav { width: 44px; height: 44px; }
  .home-media__nav span { font-size: 16px; }
  .home-brief [data-time],
  header .sn-tool-btn,
  header .sn-moon-btn { min-height: 40px; }
  header .sn-moon-btn,
  header .sn-tool-btn--icon { min-width: 40px; }
  .sn-seed,
  .sn-ghost,
  .sn-primary { min-height: 40px; }
  .sn-filterbar button { min-height: 36px; }
}

/* 3. 移动端：16 帧改为 4 列，保证每个编号都有足够点击面积 */
@media (max-width: 560px) {
  .forest-home .home-picks { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
  .forest-home .home-picks button { min-height: 38px; justify-content: center; padding: 5px 0; }
  .forest-home .home-picks button > span { font-size: 11px; }
}

/* 4. 细节：极小字号抬到可读下限 */
@media (max-width: 560px) {
  .sn-time-tag,
  .sn-vision__tags span,
  .sn-badge > span { font-size: 10.5px; }
  .home-picks button > b { font-size: 11px; }
}

/* 5. 主按钮的磁吸微交互（仅精确指针 + 允许动效） */
.home-primary,
.home-secondary {
  will-change: transform;
  transition: transform .28s cubic-bezier(.22, .8, .25, 1), background .25s, border-color .25s, color .25s, box-shadow .28s;
}

@media (prefers-reduced-motion: reduce) {
  .home-primary,
  .home-secondary { transition: none; }
}

/* 6. 图片淡入，避免加载时的硬切 */
#app img,
.home-slide img {
  transition: opacity .45s ease;
}

/* ============================================================
 * 触控尺寸兜底：不依赖 pointer 媒体查询，按视口宽度保证可点面积
 * ============================================================ */
@media (max-width: 900px) {
  header .sn-tool-btn,
  header .sn-moon-btn { min-width: 40px; min-height: 40px; }

  .home-media__nav { width: 44px; height: 44px; }
  .home-media__nav span { font-size: 16px; }

  [data-time] { min-height: 40px; padding-block: 8px; }

  .home-bottom a,
  .home-bottom button { min-height: 40px; display: inline-flex; align-items: center; }

  #plus, #minus, #reset { min-width: 40px; min-height: 40px; }
  #partstrip button { min-height: 40px; padding-inline: 12px; }

  .sn-seed, .sn-ghost, .sn-primary, .sn-filterbar button { min-height: 40px; }
}

/* 桌面也把 16 帧的点击高度抬到 30，便于瞄准 */
@media (min-width: 901px) {
  .home-picks button { min-height: 30px; }
}
/* 关键可点尺寸：用更高优先级覆盖既有规则 */
.forest-home .home-picks button { min-height: 30px !important; }
.day-switch [data-time],
.forest-home [data-time] { min-height: 40px !important; }
@media (max-width: 560px) {
  .forest-home .home-picks button { min-height: 38px !important; }
}
.home-media__nav { min-width: 44px; min-height: 44px; }
.home-bottom a { min-height: 40px; }
/* ============================================================
 * 移动端头部：导航改为可横向滚动，避免被截断
 * ============================================================ */
@media (max-width: 900px) {
  header nav {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 18px), transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 18px), transparent 100%);
  }
  header nav::-webkit-scrollbar { display: none; }
  header nav a { flex: 0 0 auto; scroll-snap-align: center; }

  /* 搜索框：结果数不再挤压占位文字 */
  .search { gap: 10px; }
  .search input { min-width: 0; font-size: 13px; }
  #count, .search > span { flex: 0 0 auto; font-size: 12px; white-space: nowrap; }
}
/* 移动端图注字号抬到 11px，保证可读 */
@media (max-width: 560px) {
  .home-slide__cap { font-size: 11px; }
  .home-slide__cap span { padding-inline: 7px; }
}
/* ============================================================
 * 萤火虫：降到玻璃卡之下，且整体亮度调低
 * ============================================================ */
.forest-fireflies {
  z-index: 0;
  opacity: .8;
  transition: opacity 1.2s ease;
}

/* 内容层抬到萤火虫之上，让萤火虫从卡片后面穿过 */
.forest-home .home-grid,
.forest-home .home-bottom {
  position: relative;
  z-index: 2;
}

/* 夜间：植物卡片保持原样，只有昆虫参与昼夜明暗 */
body.sn-night #app .card img { filter: none; }
body.sn-night #app .card.is-insect img { filter: brightness(.95) saturate(.96); }
body.sn-night #app .card.is-insect:hover img { filter: none; }
body.sn-night #app .card.is-plant { opacity: 1 !important; filter: none !important; }
/* ============================================================
 * 拍照识别：摄像头实时预览
 * ============================================================ */
.sn-drop { position: relative; }

.sn-drop__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  background: #0e1a14;
  z-index: 1;
}

.sn-drop.is-camera { border-style: solid; border-color: #9dbb7d; }
.sn-drop.is-camera .sn-drop__icon,
.sn-drop.is-camera > b,
.sn-drop.is-camera .sn-drop__hint { display: none; }
.sn-drop.is-camera .sn-drop__preview { display: none !important; }

.sn-cam__bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 12px;
  background: linear-gradient(0deg, rgba(10, 22, 16, .88), rgba(10, 22, 16, 0));
}

.sn-cam__bar[hidden] { display: none; }
.sn-cam__hint { font-size: 11.5px; color: #cfe0c2; letter-spacing: .04em; margin-right: auto; }
.sn-cam__bar .sn-primary,
.sn-cam__bar .sn-ghost { min-height: 36px; }

/* 摄像头实时预览的小红点，提示正在取景 */
.sn-drop.is-camera::after {
  content: '● 实时取景';
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  letter-spacing: .08em;
  color: #ffd9d2;
  background: rgba(20, 34, 26, .72);
  border: 1px solid rgba(255, 255, 255, .18);
  animation: snRecBlink 1.8s ease-in-out infinite;
}

@keyframes snRecBlink {
  0%, 100% { opacity: .95; }
  50% { opacity: .5; }
}

@media (prefers-reduced-motion: reduce) {
  .sn-drop.is-camera::after { animation: none; }
}
/* ============================================================
 * 顶栏重点入口：AI 问答 / 拍照识别
 * ============================================================ */
.sn-tool-btn--hero {
  border-color: rgba(196, 222, 150, .55);
  background: linear-gradient(180deg, rgba(196, 222, 150, .20), rgba(196, 222, 150, .08));
  color: #eef6dc;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 6px 18px -12px rgba(0, 0, 0, .8);
}

.sn-tool-btn--hero:hover {
  background: linear-gradient(180deg, rgba(205, 232, 160, .32), rgba(196, 222, 150, .14));
  border-color: rgba(214, 236, 172, .85);
  transform: translateY(-1px);
}

.sn-tool-btn--hero > span:first-child {
  font-size: 13px;
  color: #d9f0a8;
}

/* 这两个入口在任何宽度都保留文字 */
@media (max-width: 1180px) {
  .sn-tool-btn--hero > span:last-child { display: inline !important; }
  .sn-tool-btn--hero { padding-inline: 12px; }
}

@media (max-width: 560px) {
  .sn-tool-btn--hero { padding-inline: 10px; font-size: 12.5px; }
  .sn-tool-btn--hero > span:first-child { display: none; }
}

/* ============================================================
 * 登录页：左右分屏
 * ============================================================ */
body.sn-login-open { overflow: hidden; }

.sn-login {
  position: fixed;
  inset: 0;
  z-index: 340;
  display: grid;
  place-items: stretch;
  background: var(--paper, #f2f2e9);
  opacity: 0;
  transition: opacity .28s ease;
}

.sn-login.is-in { opacity: 1; }

.sn-login__grid {
  display: grid;
  grid-template-columns: 1.06fr .94fr;
  height: 100%;
  min-height: 0;
}

/* 左：品牌叙事 */
.sn-login__brand {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: clamp(28px, 5vw, 72px);
  color: #eef4e6;
}

.sn-login__photo {
  position: absolute;
  inset: 0;
  background: url('assets/forest-canopy.jpg') center 40% / cover no-repeat;
  transform: scale(1.04);
  animation: snLoginDrift 26s ease-in-out infinite alternate;
}

.sn-login__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(8, 22, 16, .93) 0%, rgba(12, 32, 24, .82) 46%, rgba(14, 38, 27, .62) 100%),
    radial-gradient(ellipse 70% 50% at 80% 0%, rgba(178, 205, 120, .16), transparent 60%);
}

@keyframes snLoginDrift {
  0% { transform: scale(1.04) translate3d(0, 0, 0); }
  100% { transform: scale(1.10) translate3d(-1.2%, -1.4%, 0); }
}

.sn-login__brandInner { position: relative; z-index: 1; max-width: 42ch; }

.sn-login__logo { display: flex; align-items: center; gap: 12px; margin-bottom: clamp(28px, 6vh, 64px); }
.sn-login__logo b { display: block; font-size: 19px; letter-spacing: .16em; }
.sn-login__logo em { display: block; font-size: 9.5px; letter-spacing: .34em; color: #a9bd9c; font-style: normal; }

.sn-login__mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(160deg, #d8e8b4, #a8c878);
  color: #16240f;
  font-size: 19px;
  font-weight: 700;
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .9);
}

.sn-login__head {
  font-size: clamp(28px, 3.1vw, 46px);
  line-height: 1.28;
  letter-spacing: -.015em;
  margin: 0 0 18px;
  font-weight: 650;
  color: #f3f8ea;
}

.sn-login__lead {
  margin: 0 0 clamp(26px, 5vh, 44px);
  font-size: 14.5px;
  line-height: 1.9;
  color: #b9cbaa;
  max-width: 38ch;
}

/* 两个重点功能 */
.sn-login__feats { list-style: none; margin: 0 0 28px; padding: 0; display: flex; flex-direction: column; gap: 10px; }

.sn-login__feat {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(214, 236, 172, .22);
  background: rgba(255, 255, 255, .06);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: background .24s, border-color .24s, transform .24s;
}

.sn-login__feat:hover {
  background: rgba(214, 236, 172, .14);
  border-color: rgba(214, 236, 172, .5);
  transform: translateY(-2px);
}

.sn-login__ficon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid rgba(214, 236, 172, .5);
  color: #e2f2bf;
  font-size: 14px;
}

.sn-login__ftext { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sn-login__ftext b { font-size: 14px; letter-spacing: .04em; color: #f1f7e8; }
.sn-login__ftext em { font-style: normal; font-size: 12px; line-height: 1.6; color: #a9bd9c; }

.sn-login__fgo { margin-left: auto; color: #cfe4a6; font-size: 14px; opacity: .7; transition: transform .24s, opacity .24s; }
.sn-login__feat:hover .sn-login__fgo { transform: translate(2px, -2px); opacity: 1; }

.sn-login__foot { margin: 0; font-size: 11px; letter-spacing: .22em; color: #91a687; }

/* 右：无卡片表单 */
.sn-login__form {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 5vw, 72px);
  background: linear-gradient(180deg, #f6f7f0 0%, #eef1e6 100%);
}

.sn-login__formInner { width: min(100%, 396px); }

.sn-login__eyebrow { font-size: 10.5px; letter-spacing: .28em; color: #9aa88f; }

.sn-login__form h2 {
  margin: 12px 0 8px;
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 650;
  letter-spacing: -.01em;
  color: #1b2a21;
}

.sn-login__sub { margin: 0 0 30px; font-size: 13px; line-height: 1.8; color: #6f7d72; }

.sn-login__x {
  position: absolute;
  top: 22px;
  right: 24px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid #dde3d4;
  background: #fff;
  color: #43554a;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .2s;
}

.sn-login__x:hover { background: #f2f5ea; border-color: #c3cfb6; transform: rotate(90deg); }

/* 无卡片：仅下划线输入 */
.sn-field { display: block; margin-bottom: 26px; }
.sn-field > span { display: block; font-size: 11.5px; letter-spacing: .14em; color: #7d8b80; margin-bottom: 8px; }
.sn-field > span em { font-style: normal; color: #9aa88f; letter-spacing: 0; }

.sn-field input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #cfd8c6;
  border-radius: 0;
  background: transparent;
  padding: 10px 2px 12px;
  font-size: 16px;
  color: #1b2a21;
  transition: border-color .22s, box-shadow .22s;
}

.sn-field input::placeholder { color: #a9b4a1; }
.sn-field input:focus {
  outline: none;
  border-bottom-color: #55764a;
  box-shadow: 0 1px 0 0 #55764a;
}

.sn-field input.is-shake { animation: snShake .32s ease; }

@keyframes snShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  60% { transform: translateX(4px); }
}

.sn-login__submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  margin-top: 8px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #2f5d43, #234a35);
  color: #f2f8ea;
  font-size: 15px;
  letter-spacing: .06em;
  cursor: pointer;
  transition: transform .2s, box-shadow .24s, background .2s;
  box-shadow: 0 16px 30px -18px rgba(20, 50, 32, .9);
}

.sn-login__submit:hover { transform: translateY(-1px); box-shadow: 0 20px 36px -18px rgba(20, 50, 32, .95); }
.sn-login__submit i { font-style: normal; transition: transform .24s; }
.sn-login__submit:hover i { transform: translateX(4px); }

.sn-login__alt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.sn-login__ghost,
.sn-login__back {
  background: none;
  border: 0;
  padding: 6px 0;
  font-size: 12.5px;
  color: #55764a;
  text-decoration: none;
  cursor: pointer;
  border-bottom: 1px solid transparent;
  transition: border-color .2s, color .2s;
}

.sn-login__ghost:hover,
.sn-login__back:hover { border-bottom-color: #9dbb7d; }

.sn-login__privacy { margin: 26px 0 0; font-size: 11px; line-height: 1.7; color: #9aa88f; }

.sn-login__mobileBrand { display: none; }
.sn-login__feats--mobile { display: none; }

/* 手机端：折叠品牌区 */
@media (max-width: 900px) {
  .sn-login__grid { grid-template-columns: 1fr; }
  .sn-login__brand { display: none; }

  .sn-login__form {
    align-items: flex-start;
    justify-content: flex-start;
    padding: 0 22px 40px;
    background: #f6f7f0;
    overflow-y: auto;
  }

  .sn-login__mobileBrand {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    width: calc(100% + 44px);
    margin: 0 -22px 26px;
    padding: 16px 22px;
    background: rgba(246, 247, 240, .92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #e3e7dd;
  }

  .sn-login__mobileBrand b { font-size: 14px; letter-spacing: .12em; color: #1b2a21; }
  .sn-login__mobileBrand .sn-login__mark { width: 32px; height: 32px; font-size: 15px; border-radius: 10px; }

  .sn-login__formInner { width: 100%; max-width: 460px; margin: 0 auto; }
  .sn-login__x { display: none; }

  .sn-login__feats--mobile { display: flex; margin: 30px 0 0; gap: 8px; }
  .sn-login__feats--mobile .sn-login__feat {
    border-color: #dde5d2;
    background: #fff;
    color: #1b2a21;
  }
  .sn-login__feats--mobile .sn-login__feat:hover { background: #f2f6ea; border-color: #c3d5ae; }
  .sn-login__feats--mobile .sn-login__ftext b { color: #1b2a21; }
  .sn-login__feats--mobile .sn-login__ftext em { color: #6f7d72; }
  .sn-login__feats--mobile .sn-login__ficon { border-color: #c3d5ae; color: #55764a; }
  .sn-login__feats--mobile .sn-login__fgo { display: none; }
}

/* ============================================================
 * AI 问答面板
 * ============================================================ */
.sn-modal--ai {
  width: min(94vw, 720px);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  padding: 0;
}

.sn-ai__head { padding: 26px 28px 14px; border-bottom: 1px solid var(--sn-line-2); }
.sn-ai__head h2 { margin: 8px 0 6px; font-size: clamp(22px, 2.2vw, 30px); font-weight: 650; letter-spacing: -.015em; color: var(--sn-ink); }
.sn-ai__head p { margin: 0; font-size: 13.5px; line-height: 1.8; color: var(--sn-ink-2); }

.sn-ai__log {
  flex: 1;
  min-height: 180px;
  overflow-y: auto;
  padding: 20px 28px 8px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sn-ai__intro p { margin: 0 0 10px; font-size: 12.5px; color: var(--sn-mut); }
.sn-ai__chips { display: flex; flex-wrap: wrap; gap: 8px; }

.sn-ai__q {
  align-self: flex-end;
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 14px 14px 4px 14px;
  background: #eef4e4;
  border: 1px solid #dbe6cc;
  font-size: 13.5px;
  line-height: 1.7;
  color: #24361f;
}

.sn-ai__a {
  max-width: 92%;
  padding: 12px 15px;
  border-radius: 14px 14px 14px 4px;
  background: var(--sn-bg-2);
  border: 1px solid var(--sn-line);
}

.sn-ai__a p { margin: 0 0 8px; font-size: 13.5px; line-height: 1.85; color: var(--sn-ink); white-space: pre-wrap; }
.sn-ai__a p:last-child { margin-bottom: 0; }

.sn-ai__cites { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 2px; }

.sn-ai__cite {
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #cfe0bb;
  background: #f4f8ec;
  color: #3f6b46;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, border-color .2s;
}

.sn-ai__cite:hover { background: #e9f2dc; border-color: #b6d09a; }

.sn-ai__meta { display: block; margin-top: 8px; font-size: 10.5px; letter-spacing: .08em; color: var(--sn-mut); }

.sn-ai__dots { display: inline-flex; gap: 4px; }
.sn-ai__dots i {
  width: 5px; height: 5px; border-radius: 50%;
  background: #9dbb7d;
  animation: snDot 1.1s ease-in-out infinite;
}
.sn-ai__dots i:nth-child(2) { animation-delay: .15s; }
.sn-ai__dots i:nth-child(3) { animation-delay: .3s; }

@keyframes snDot {
  0%, 100% { opacity: .25; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-3px); }
}

.sn-ai__composer {
  display: flex;
  gap: 10px;
  padding: 14px 28px 6px;
  border-top: 1px solid var(--sn-line-2);
}

.sn-ai__composer input {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--sn-line);
  background: var(--sn-bg);
  color: var(--sn-ink);
  font-size: 14px;
}

.sn-ai__composer input:focus { outline: none; border-color: #9dbb7d; box-shadow: 0 0 0 3px rgba(157, 187, 125, .18); }
.sn-ai__composer .sn-primary { min-height: 46px; }

.sn-modal--ai > .sn-hint { margin: 0; padding: 0 28px 18px; }

@media (max-width: 560px) {
  .sn-modal--ai { width: 100vw; height: 100vh; max-height: none; border-radius: 0; }
  .sn-ai__head { padding: 20px 18px 12px; }
  .sn-ai__log { padding: 16px 18px 6px; }
  .sn-ai__composer { padding: 12px 18px 6px; }
  .sn-modal--ai > .sn-hint { padding: 0 18px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .sn-login__photo { animation: none; }
  .sn-ai__dots i { animation: none; opacity: .6; }
}

/* 登录层铺满视口（父级 .sn-layer 是居中网格，需显式拉伸） */
.sn-login {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  justify-self: stretch;
  align-self: stretch;
  display: block;
}

.sn-login .sn-login__grid {
  width: 100%;
  height: 100%;
  min-height: 100%;
}

@media (max-width: 900px) {
  .sn-login .sn-login__grid { grid-template-columns: 1fr; }
}
.sn-logout { border-color: #e2d6d0 !important; color: #8a6b60 !important; }
.sn-logout:hover { background: #faf1ee !important; }
/* ============================================================
 * 登录页 · 移动端强制块级布局（避免 flex/grid 继承导致的偏移）
 * ============================================================ */
@media (max-width: 900px) {
  .sn-login .sn-login__grid,
  .sn-login__grid {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
  }

  .sn-login__brand { display: none !important; }

  .sn-login__form {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 100% !important;
    padding: 0 22px 40px !important;
    overflow-y: auto;
    background: #f6f7f0 !important;
  }

  .sn-login__formInner {
    display: block !important;
    width: 100% !important;
    max-width: 460px !important;
    margin: 0 auto !important;
  }

  .sn-login__mobileBrand {
    display: flex !important;
    width: auto !important;
    margin: 0 -22px 24px !important;
    position: sticky;
    top: 0;
    z-index: 3;
  }

  .sn-login__feats--mobile { display: flex !important; }
  .sn-login__x { display: none !important; }
}
/* 登录表单：错误提示与副标题微调 */
.sn-login__err {
  margin: -8px 0 14px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid #e6c9c1;
  background: #fdf1ee;
  color: #a4472f;
  font-size: 12.5px;
  line-height: 1.6;
}

.sn-login__err[hidden] { display: none; }

.sn-login__hintline {
  font-size: 12px;
  letter-spacing: .06em;
  color: #9aa88f;
}
/* ============================================================
 * AI 问答面板：工具链与推理轨迹
 * ============================================================ */
.sn-ai__composer .sn-ai__icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--sn-line);
  background: var(--sn-bg);
  color: #55764a;
  font-size: 15px;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .2s;
}

.sn-ai__composer .sn-ai__icon:hover { background: #f2f6ea; border-color: #b9cf9f; transform: translateY(-1px); }
.sn-ai__composer .sn-ai__icon.is-live { background: #eef4e2; border-color: #9dbb7d; animation: snDot 1.2s ease-in-out infinite; }

.sn-ai__attached {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 28px 0;
}

.sn-ai__attached[hidden] { display: none; }
.sn-ai__attached img { width: 46px; height: 46px; object-fit: cover; border-radius: 10px; border: 1px solid var(--sn-line); }
.sn-ai__attached span { font-size: 12px; color: var(--sn-mut); }
.sn-ai__detach {
  margin-left: auto;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid var(--sn-line);
  background: var(--sn-bg);
  color: var(--sn-mut);
  cursor: pointer;
}

.sn-ai__qtag {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #dfecc9;
  color: #3d5c2f;
  font-size: 10px;
  letter-spacing: .06em;
}

.sn-ai__guard {
  margin: 0 0 8px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #fdf1ee;
  border: 1px solid #e6c9c1;
  color: #a4472f;
  font-size: 12.5px;
}

.sn-ai__identified {
  margin: 0 0 8px;
  font-size: 12.5px;
  color: #3f6b46;
}

.sn-ai__stepline { display: block; margin-top: 6px; font-size: 11.5px; color: var(--sn-mut); }

.sn-ai__foot {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--sn-line);
}

.sn-ai__tracetoggle {
  margin-left: auto;
  border: 1px solid var(--sn-line);
  background: var(--sn-bg);
  color: #55764a;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}

.sn-ai__tracetoggle:hover { background: #f2f6ea; border-color: #b9cf9f; }

.sn-ai__trace { margin-top: 8px; }
.sn-ai__trace[hidden] { display: none; }
.sn-ai__trace ol { margin: 0; padding-left: 18px; }
.sn-ai__trace li { font-size: 11.5px; line-height: 1.9; color: var(--sn-ink-2); }
.sn-ai__trace li b { color: #3f6b46; font-weight: 600; }

@media (max-width: 560px) {
  .sn-ai__attached { padding: 8px 18px 0; }
  .sn-ai__composer .sn-ai__icon { width: 40px; height: 40px; }
}
/* ============================================================
 * 手记与观察小站：错落排布（瀑布流）
 * 用多列流让高度不同的板块自然错开，像贴满标本的墙
 * ============================================================ */

.sn-hut__mason {
  column-count: 2;
  column-gap: 20px;
  margin-top: 4px;
}

.sn-hut__mason > .sn-hut__section {
  display: block;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  margin: 0 0 20px;
}

/* 第三块（打卡墙）在宽屏上单独占一列底部，形成高低差 */
.sn-hut__mason > .sn-hut__section:nth-child(3) {
  margin-bottom: 4px;
}

@media (min-width: 1440px) {
  .sn-hut__mason { column-count: 3; }
}

@media (max-width: 900px) {
  .sn-hut__mason { column-count: 1; column-gap: 0; }
}

/* 列内的紧凑化：标签与内容贴合 */
.sn-hut__mason .sn-hut__label { margin-bottom: 12px; }
.sn-hut__mason .sn-badges { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 10px; }
.sn-hut__mason .sn-tasks { grid-template-columns: 1fr; gap: 10px; }

/* 打卡墙：自身也是瀑布流，图片高度错落 */
.sn-hut__wall {
  columns: 2;
  column-gap: 10px;
}

.sn-hut__wall .sn-hut__pin {
  display: block;
  width: 100%;
  break-inside: avoid;
  margin-bottom: 10px;
  text-align: left;
}

.sn-hut__wall .sn-hut__pin img { aspect-ratio: 1 / 1; }

/* 每 5 枚换一次比例，制造小红书式的错落节奏 */
.sn-hut__pin[data-h="1"] img { aspect-ratio: 3 / 4; }
.sn-hut__pin[data-h="2"] img { aspect-ratio: 4 / 5; }
.sn-hut__pin[data-h="3"] img { aspect-ratio: 5 / 6; }
.sn-hut__pin[data-h="4"] img { aspect-ratio: 1 / 1.15; }

.sn-hut__pin {
  transition: transform .3s cubic-bezier(.22, .8, .25, 1), box-shadow .3s;
}

.sn-hut__pin:hover {
  transform: translateY(-4px) rotate(-.6deg);
  box-shadow: 0 18px 30px -18px rgba(20, 40, 30, .55), 0 0 0 1px #b3c7a2;
}

.sn-hut__pin:nth-child(3n):hover { transform: translateY(-4px) rotate(.7deg); }

@media (prefers-reduced-motion: reduce) {
  .sn-hut__pin:hover { transform: none; }
}

@media (max-width: 560px) {
  .sn-hut__wall { columns: 2; column-gap: 8px; }
  .sn-hut__wall .sn-hut__pin { margin-bottom: 8px; }
}

/* ============================================================
 * 图鉴卡片：悬停浮起 + 阴影加深（覆盖后写的静态阴影规则）
 * ============================================================ */
html body #app .card {
  transition: transform .36s cubic-bezier(.22, .8, .25, 1), box-shadow .36s cubic-bezier(.22, .8, .25, 1), border-color .3s, background .3s;
  will-change: auto;
}

html body #app .card:hover,
html body #app .card:focus-visible {
  transform: translateY(-8px) scale(1.012);
  box-shadow:
    0 38px 60px -28px rgba(18, 38, 28, .55),
    0 16px 28px -18px rgba(18, 38, 28, .34),
    0 0 0 1px rgba(179, 199, 162, .8);
  border-color: #aec59c;
  z-index: 2;
}

html body #app .card:hover { will-change: transform, box-shadow; }

html body #app .card:active {
  transform: translateY(-3px) scale(1.004);
  transition-duration: .12s;
  box-shadow: 0 16px 30px -20px rgba(18, 38, 28, .45);
}

/* 夜间同样加深，只是基调更冷 */
body.sn-night html body #app .card:hover,
html body body.sn-night #app .card:hover {
  box-shadow:
    0 38px 60px -28px rgba(0, 0, 0, .6),
    0 16px 28px -18px rgba(0, 0, 0, .38),
    0 0 0 1px rgba(140, 170, 120, .55);
  border-color: #8fae7a;
}

@media (prefers-reduced-motion: reduce) {
  html body #app .card,
  html body #app .card:hover,
  html body #app .card:active { transform: none; }
}

/* 三块之间做竖直错位：不同列不同起点，读起来才不呆板 */
@media (min-width: 901px) {
  .sn-hut__mason > .sn-hut__section:nth-child(1) { margin-top: 0; }
  .sn-hut__mason > .sn-hut__section:nth-child(2) { margin-top: 44px; }
  .sn-hut__mason > .sn-hut__section:nth-child(3) { margin-top: 18px; }
}

@media (min-width: 1440px) {
  .sn-hut__mason > .sn-hut__section:nth-child(2) { margin-top: 52px; }
  .sn-hut__mason > .sn-hut__section:nth-child(3) { margin-top: 22px; }
}
/* 修正：打卡墙要真正变成块级多列瀑布流（原先是 grid，会把行高拉齐） */
.sn-hut__wall {
  display: block !important;
  columns: 2 !important;
  column-gap: 10px;
}

.sn-hut__wall .sn-hut__pin {
  height: auto !important;
  margin-bottom: 10px;
}

/* 板块错位改用 padding（多列布局会忽略列首 margin-top） */
@media (min-width: 901px) {
  .sn-hut__mason > .sn-hut__section:nth-child(2) { padding-top: 44px; margin-top: 0; }
  .sn-hut__mason > .sn-hut__section:nth-child(3) { padding-top: 18px; margin-top: 0; }
}

@media (min-width: 1440px) {
  .sn-hut__mason > .sn-hut__section:nth-child(2) { padding-top: 56px; }
  .sn-hut__mason > .sn-hut__section:nth-child(3) { padding-top: 24px; }
}
/* 最终版：两栏网格排布（徽章 + 任务在左，打卡墙占右侧并对齐下移） */
@media (min-width: 901px) {
  .sn-hut__mason {
    column-count: initial !important;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
    column-gap: 28px;
    row-gap: 26px;
    align-items: start;
  }

  .sn-hut__mason > .sn-hut__section { margin: 0 !important; padding-top: 0 !important; break-inside: auto; }

  .sn-hut__mason > .sn-hut__section:nth-child(1) { grid-column: 1; grid-row: 1; }
  .sn-hut__mason > .sn-hut__section:nth-child(2) { grid-column: 1; grid-row: 2; }
  .sn-hut__mason > .sn-hut__section:nth-child(3) {
    grid-column: 2;
    grid-row: 1 / span 2;
    padding-top: 34px !important;
  }

  /* 徽章区在左栏内保持四列 */
  .sn-hut__mason .sn-badges { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1400px) {
  .sn-hut__mason > .sn-hut__section:nth-child(3) { padding-top: 46px !important; }
  .sn-hut__mason .sn-badges { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .sn-hut__mason { display: block; column-count: 1 !important; }
  .sn-hut__mason > .sn-hut__section { margin-bottom: 22px !important; }
}
/* 打卡图元限高，保持错落但不至于过大 */
.sn-hut__wall .sn-hut__pin img { max-height: 208px; }
.sn-hut__pin[data-h="0"] img { max-height: 196px; }
.sn-hut__pin[data-h="1"] img { max-height: 240px; }
.sn-hut__pin[data-h="2"] img { max-height: 214px; }
.sn-hut__pin[data-h="3"] img { max-height: 228px; }
.sn-hut__pin[data-h="4"] img { max-height: 202px; }

@media (min-width: 1400px) {
  .sn-hut__wall { columns: 3 !important; }
}

@media (max-width: 560px) {
  .sn-hut__wall { columns: 2 !important; }
  .sn-hut__wall .sn-hut__pin img { max-height: 168px; }
}
/* ============================================================
 * 手记页：三块并列（观察记录 / 取景相册 / 观察小屋）
 * ============================================================ */

.sn-journal__cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 30px;
  align-items: start;
  margin: 12px 0 22px;
}

.sn-journal__col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* 列内标题不再吃满整页，跟着列宽走 */
.sn-journal__col .section-title {
  margin: 0;
  padding: 0 0 10px;
  border-bottom: 1px solid #e3e7dd;
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.sn-journal__col .section-title h2 { font-size: 19px; letter-spacing: .01em; }
.sn-journal__col .section-title small { font-size: 11px; letter-spacing: .12em; color: #9aa88f; }

.sn-journal__col .section-title .minibutton,
.sn-journal__col .sn-exportgroup { margin-left: auto; }

.sn-journal__col .sn-exportgroup { flex-wrap: wrap; gap: 6px; }
.sn-journal__col .sn-exportgroup .minibutton { font-size: 11.5px; padding: 6px 10px; }

/* 取景相册在列内改成两列小图 */
.sn-journal__col--shots .cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.sn-journal__col--shots .cards .card,
.sn-journal__col--shots .cards .paper { min-width: 0; }

/* 观察记录列表收窄后行距略紧 */
.sn-journal__col--notes .notelist .note { padding: 12px 14px; }
.sn-journal__col--notes .notelist .note h3 { font-size: 15px; }

/* 小屋列：内部的栅格在这里改为单列堆叠 */
.sn-journal__col--hut .sn-hut-host--journal,
.sn-journal__col--hut #sn-hut {
  margin: 0;
  padding-top: 0;
  border-top: 0;
}

.sn-journal__col--hut .sn-hut__mason {
  display: block !important;
  column-count: initial !important;
}

.sn-journal__col--hut .sn-hut__mason > .sn-hut__section {
  margin: 0 0 20px !important;
  padding-top: 0 !important;
  display: block;
}

.sn-journal__col--hut .sn-hut__wall { columns: 2 !important; }
.sn-journal__col--hut .sn-hut__mason .sn-badges { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.sn-journal__col--hut .sn-hut__stats--inline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  padding: 12px 14px;
}

.sn-journal__col--hut .sn-hut__label--top { flex-direction: column; align-items: flex-start; gap: 4px; }

/* 两列过渡 */
@media (max-width: 1240px) {
  .sn-journal__cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .sn-journal__col--hut { grid-column: 1 / -1; }
  .sn-journal__col--hut .sn-hut__mason { display: grid !important; grid-template-columns: 1fr 1fr; gap: 24px; }
  .sn-journal__col--hut .sn-hut__wall { columns: 3 !important; }
}

/* 手机：回到单列堆叠 */
@media (max-width: 900px) {
  .sn-journal__cols { display: block; }
  .sn-journal__col { margin-bottom: 26px; }
  .sn-journal__col--hut .sn-hut__mason { display: block !important; }
  .sn-journal__col--hut .sn-hut__wall { columns: 2 !important; }
  .sn-journal__col .section-title { border-bottom: 0; }
}

/* ============================================================
 * 手记与观察小站：主栏 + 侧栏（最终排版）
 * 左：观察记录 / 取景相册（纵向列表，给足宽度）
 * 右：观察小屋（统计 / 徽章 / 任务 / 打卡，粘性侧栏）
 * ============================================================ */

.sn-journal__cols {
  display: grid;
  grid-template-columns: minmax(0, 1.58fr) minmax(320px, .92fr);
  gap: 44px;
  align-items: start;
  margin: 10px 0 24px;
}

.sn-journal__main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 34px;
}

.sn-journal__block { min-width: 0; }

/* 侧栏吸附，滚动时统计与徽章一直在旁边 */
.sn-journal__side {
  min-width: 0;
  position: sticky;
  top: 104px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* 侧栏内的标题降一级，避免和主栏抢视线 */
.sn-journal__side .section-title { margin: 0; }

/* 主栏里的列表保持原有呼吸感，标题与内容之间更紧 */
.sn-journal__block .section-title {
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e3e7dd;
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.sn-journal__block .section-title h2 { font-size: 21px; }
.sn-journal__block .section-title small { font-size: 11px; letter-spacing: .12em; color: #9aa88f; }
.sn-journal__block .section-title .minibutton,
.sn-journal__block .sn-exportgroup { margin-left: auto; }
.sn-journal__block .sn-exportgroup { flex-wrap: wrap; gap: 6px; }
.sn-journal__block .sn-exportgroup .minibutton { font-size: 12px; padding: 6px 11px; }

/* 取景相册在主栏内三列小图 */
.sn-journal__block--shots .cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
}

/* 侧栏里的小屋：内部改为单列，卡片更紧凑 */
.sn-journal__side .sn-hut-host--journal,
.sn-journal__side #sn-hut {
  margin: 0;
  padding-top: 0;
  border-top: 0;
}

.sn-journal__side .sn-hut__mason {
  display: block !important;
  column-count: initial !important;
}

.sn-journal__side .sn-hut__mason > .sn-hut__section {
  margin: 0 0 22px !important;
  padding-top: 0 !important;
}

.sn-journal__side .sn-hut__wall { columns: 2 !important; }
.sn-journal__side .sn-hut__mason .sn-badges { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }

.sn-journal__side .sn-hut__stats--inline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  padding: 14px 16px;
}

.sn-journal__side .sn-hut__label--top { flex-direction: column; align-items: flex-start; gap: 4px; }
.sn-journal__side .sn-hut__section--foot { padding-top: 16px; }
.sn-journal__side .sn-hut__section--foot h2 { font-size: 15px; }

/* 平板：侧栏落到主栏下面 */
@media (max-width: 1180px) {
  .sn-journal__cols { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .sn-journal__side { position: static; }
  .sn-journal__side .sn-hut__mason { display: grid !important; grid-template-columns: 1fr 1fr; gap: 26px; }
  .sn-journal__side .sn-hut__wall { columns: 3 !important; }
  .sn-journal__side .sn-hut__mason .sn-badges { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
}

@media (max-width: 900px) {
  .sn-journal__main { gap: 26px; }
  .sn-journal__side .sn-hut__mason { display: block !important; }
  .sn-journal__side .sn-hut__wall { columns: 2 !important; }
  .sn-journal__block .section-title { border-bottom: 0; margin-bottom: 12px; }
}

/* ============================================================
 * 徽章线稿：统一描边与端点，避免与旧图混排时粗细不一
 * ============================================================ */
.sn-badge__ink path {
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

/* ============================================================
 * 手记页纵向排列下的版面优化
 * ============================================================ */

/* 观察记录：宽屏改双列，避免单张卡片拉满一行只剩大片留白 */
@media (min-width: 1200px) {
  #app .notelist {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
  }
  #app .notelist .note { margin: 0; }
}

/* 卡片内文本控制在舒适行宽，短评不会被拉成一整行 */
#app .notelist .note p {
  max-width: 52ch;
  line-height: 1.85;
}

#app .notelist .note h3 { font-size: 16px; }
#app .notelist .note small { font-size: 11.5px; letter-spacing: .04em; }

/* 取景相册：宽屏三列 */
@media (min-width: 1200px) {
  #app .cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
  }
}

/* 空状态不要占满整屏高度 */
#app .empty {
  min-height: 132px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
}

/* 观察小屋：与上方板块之间的分隔更克制 */
.sn-hut-sep { margin: 44px 0 10px; }
.sn-hut-host--journal { margin: 0 0 18px; padding-top: 26px; }
/* 小屋统计条：满宽时四等分，读起来是一条仪表带 */
.sn-hut__stats--inline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 16px 22px;
  border-radius: 16px;
  background: #f6f8f2;
  border: 1px solid #e8ece1;
}

.sn-hut__stats--inline div { display: flex; flex-direction: column; gap: 2px; }
.sn-hut__stats--inline b { font-size: 26px; font-weight: 650; color: #2f5d43; font-variant-numeric: tabular-nums; line-height: 1.1; }
.sn-hut__stats--inline span { font-size: 11px; letter-spacing: .08em; color: #8b9a86; }

@media (max-width: 560px) {
  .sn-hut__stats--inline { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 14px 16px; }
}
/* ============================================================
 * 移动端修正：标题不被按钮挤压 / 顶栏重点按钮不折行
 * ============================================================ */
@media (max-width: 560px) {
  /* 小节标题：标题独占一行，按钮换到下一行 */
  #app .section-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  #app .section-title h2 {
    font-size: 20px;
    line-height: 1.3;
    white-space: normal;
  }

  #app .section-title small { font-size: 10.5px; }

  .sn-exportgroup {
    margin-left: 0;
    flex-wrap: wrap;
    gap: 6px;
  }

  .sn-exportgroup .minibutton { padding: 7px 11px; font-size: 12px; }

  /* 顶栏：重点按钮保留文字但不折行，工具区可横向滚动 */
  header .headtools {
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  header .headtools::-webkit-scrollbar { display: none; }

  header .headtools > * { flex: 0 0 auto; }

  .sn-tool-btn--hero { padding-inline: 9px; font-size: 12px; gap: 5px; }
  .sn-tool-btn--hero > span:last-child { white-space: nowrap; }
}
/* ============================================================
 * 观察小屋：自然任务改为紧凑小卡（不再过大）
 * ============================================================ */

.sn-tasks {
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: 10px;
}

.sn-tasks li {
  padding: 10px 12px 11px;
  border-radius: 11px;
  transition: border-color .24s, background .24s, transform .24s;
}

.sn-tasks li:hover {
  border-color: #c3d5ae;
  transform: translateY(-1px);
}

.sn-tasks__row { gap: 8px; }
.sn-tasks__row b { font-size: 12.5px; letter-spacing: .01em; }
.sn-tasks__row span { font-size: 10px; }

.sn-tasks li p {
  margin: 3px 0 8px;
  font-size: 11px;
  line-height: 1.55;
  color: #7d8b80;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.sn-tasks__bar { height: 3px; border-radius: 2px; }

/* 宽屏时任务卡排成 3 列，占位更小、更整齐 */
@media (min-width: 1200px) {
  .sn-tasks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .sn-tasks { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
  .sn-tasks li { padding: 9px 11px 10px; }
  .sn-tasks__row b { font-size: 12px; }
  .sn-tasks li p { font-size: 10.5px; }
}

/* ============================================================
 * 退出登录：做成醒目的次要按钮，一眼能找到
 * ============================================================ */
.sn-logout {
  background: #fdeeeb !important;
  border: 1px solid #dfa390 !important;
  color: #a4472f !important;
  font-weight: 600 !important;
  padding: 6px 12px !important;
  letter-spacing: .02em;
}

.sn-logout:hover {
  background: #f9dcd4 !important;
  border-color: #c97a63 !important;
  color: #8f3a25 !important;
}

.sn-logout::before {
  content: '⏻';
  margin-right: 5px;
  font-size: 11px;
  opacity: .85;
}

.sn-logout:focus-visible {
  outline: 2px solid #c97a63 !important;
  outline-offset: 2px;
}

@media (max-width: 560px) {
  .sn-logout { width: 100%; justify-content: center; }
}

/* 覆盖小屋栅格里「任务单列」的旧规则，改成多列小卡 */
.sn-hut__mason .sn-tasks {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

@media (max-width: 1200px) {
  .sn-hut__mason .sn-tasks { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

@media (max-width: 700px) {
  .sn-hut__mason .sn-tasks { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px !important; }
}

@media (max-width: 420px) {
  .sn-hut__mason .sn-tasks { grid-template-columns: minmax(0, 1fr) !important; }
}

.sn-hut__mason .sn-tasks li { padding: 9px 11px 10px !important; }
/* ============================================================
 * 图鉴卡片：缩小一档（昆虫图鉴 / 植物图鉴）
 * 说明：.cards 同时被手记页的「取景相册」使用，
 *      用 :has(.notelist) 把手记页排除在外，两者各自设定列数。
 * ============================================================ */

/* 图鉴网格：更密的栅格 */
#app .cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(206px, 1fr));
  gap: 16px;
  align-items: start;
}

/* 手记页的取景相册不受上面影响，宽屏保持三列 */
@media (min-width: 1200px) {
  #app:has(.notelist) .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }
}

@media (min-width: 1600px) {
  #app:not(:has(.notelist)) .cards { grid-template-columns: repeat(auto-fill, minmax(218px, 1fr)); }
}

/* 卡片内部按新尺寸等比缩小 */
#app .cards .card {
  border-radius: 12px;
}

#app .cards .card img {
  height: 148px;
}

#app .cards .card .cardbody { padding: 11px 13px 13px; }

#app .cards .card .cardmeta > span:first-child {
  font-size: 9px;
  letter-spacing: .16em;
}

#app .cards .card .cardmeta .tag {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 5px;
}

#app .cards .card h3 {
  font-size: 16.5px;
  line-height: 1.35;
  margin: 5px 0 2px;
}

#app .cards .card .latin {
  font-size: 11px;
  margin-bottom: 4px;
}

#app .cards .card p {
  font-size: 11.5px;
  line-height: 1.5;
}

#app .cards .card .sn-time-tag {
  font-size: 9px;
  padding: 1px 6px;
  top: 8px;
  right: 8px;
}

/* 手记页的取景相册保持原有尺寸，不跟着缩 */
#app:has(.notelist) .cards .card img { height: auto; aspect-ratio: 4 / 3; }
#app:has(.notelist) .cards .card h3 { font-size: 17px; }
#app:has(.notelist) .cards .card p { font-size: 12px; }

/* 中屏再降一档，保证一屏能看全一行 */
@media (max-width: 900px) {
  #app .cards { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 12px; }
  #app .cards .card img { height: 118px; }
  #app .cards .card h3 { font-size: 15px; }
  #app .cards .card .latin { font-size: 10px; }
  #app .cards .card p { font-size: 10.5px; }
}

@media (max-width: 560px) {
  #app .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  #app .cards .card img { height: 104px; }
  #app .cards .card .cardbody { padding: 9px 11px 11px; }
  #app .cards .card h3 { font-size: 14px; }
  #app .cards .card p { font-size: 10px; }
}

/* ============================================================
 * 扫码分享面板
 * ============================================================ */

.sn-modal--share {
  width: min(760px, calc(100vw - 48px));
  padding: 30px 34px 26px;
}

.sn-share__head { margin-bottom: 20px; }

.sn-share__head h2 {
  margin: 8px 0 8px;
  font-size: 26px;
  letter-spacing: -.01em;
  color: var(--sn-ink);
}

.sn-share__head p {
  margin: 0;
  font-size: 13px;
  line-height: 1.75;
  color: var(--sn-mut);
  max-width: 46ch;
}

.sn-share__body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.sn-share__code {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--sn-line);
  box-shadow: 0 10px 26px -18px rgba(20, 40, 30, .4);
}

.sn-share__code canvas {
  display: block;
  border-radius: 4px;
}

.sn-share__cap {
  margin: 0;
  font-size: 10.5px;
  letter-spacing: .08em;
  color: var(--sn-mut);
  font-variant-numeric: tabular-nums;
}

.sn-share__side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.sn-share__field { display: flex; flex-direction: column; gap: 7px; }

.sn-share__field > span {
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--sn-mut);
}

.sn-share__field input {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--sn-line);
  border-radius: 10px;
  background: #fff;
  font-size: 13.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--sn-ink);
  transition: border-color .2s, box-shadow .2s;
}

.sn-share__field input:focus {
  outline: none;
  border-color: #9dbb7d;
  box-shadow: 0 0 0 3px rgba(157, 187, 125, .18);
}

.sn-share__row { display: flex; gap: 10px; align-items: center; }
.sn-share__row .sn-primary { padding: 10px 20px; font-size: 13px; }
.sn-share__row .sn-primary:disabled { opacity: .45; cursor: not-allowed; }

.sn-share__tips {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.sn-share__tips li {
  position: relative;
  padding-left: 16px;
  font-size: 12px;
  line-height: 1.65;
  color: #6f7d72;
}

.sn-share__tips li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #a9bd94;
}

#sn-share-note {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--sn-line);
  font-size: 12px;
  line-height: 1.7;
  color: #6f7d72;
}

@media (max-width: 760px) {
  .sn-modal--share { padding: 24px 22px 22px; }
  .sn-share__body { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .sn-share__code { align-self: center; }
  .sn-share__head h2 { font-size: 22px; }
  .sn-share__row { flex-wrap: wrap; }
  .sn-share__row .sn-primary { flex: 1 1 100%; }
}

/* 顶栏「分享」按钮：图标 + 文字，和 AI 问答同组 */
#sn-share-btn { gap: 6px; }

/* 分享面板：警示条 + 放大模式 */
.sn-share__warn {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 11px;
  border: 1px solid #e6c3b4;
  background: #fdf0ea;
  color: #9a4327;
  font-size: 12.5px;
  line-height: 1.8;
}

.sn-share__warn[hidden] { display: none; }
.sn-share__warn b { display: block; margin-bottom: 3px; font-size: 13px; }
.sn-share__warn code {
  padding: 1px 5px;
  border-radius: 4px;
  background: #fff;
  border: 1px solid #e8d3c9;
  font-size: 11.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.sn-share__zoom {
  border: 1px solid var(--sn-line);
  background: var(--sn-bg);
  color: #55764a;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 11px;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}

.sn-share__zoom:hover { background: #f2f6ea; border-color: #b9cf9f; }

/* 放大模式：整块浮到最上层，二维码尽量大 */
.sn-layer.is-zoom .sn-modal--share {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  max-height: none;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  background: #fff;
  z-index: 5;
}

.sn-layer.is-zoom .sn-share__head,
.sn-layer.is-zoom .sn-share__side,
.sn-layer.is-zoom .sn-share__warn,
.sn-layer.is-zoom #sn-share-note,
.sn-layer.is-zoom .sn-share__zoom { display: none; }

.sn-layer.is-zoom .sn-share__body {
  display: flex;
  align-items: center;
  justify-content: center;
}

.sn-layer.is-zoom .sn-share__code {
  border: 0;
  box-shadow: none;
  padding: 0;
  background: #fff;
}

.sn-layer.is-zoom .sn-share__code canvas {
  width: auto !important;
  height: auto !important;
  max-width: min(74vw, 74vh);
  max-height: min(74vw, 74vh);
  image-rendering: pixelated;
}

.sn-layer.is-zoom .sn-share__cap { font-size: 12px; color: #7d8b80; }

/* localhost 时二维码加遮罩，防止误扫打不开的地址 */
.sn-share__code { position: relative; }

.sn-share__code.is-invalid canvas { opacity: .28; filter: grayscale(1); }

.sn-share__code.is-invalid::after {
  content: '本机地址 · 手机打不开';
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%) rotate(-8deg);
  padding: 8px 16px;
  border-radius: 8px;
  background: rgba(196, 82, 50, .94);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  white-space: nowrap;
  box-shadow: 0 8px 22px -10px rgba(140, 40, 20, .8);
}