.treehole-app {
  --th-bg: #f8fafb;
  --th-card: rgba(255, 255, 255, 0.86);
  --th-ink: #263238;
  --th-muted: #7a8a8a;
  --th-brand: #5fa8a3;
  --th-soft: #eaf7f5;
  --th-pink: #f3b6c6;
  --th-line: #e6eeee;
  color: var(--th-ink);
  min-height: 100%;
}

.treehole-main {
  width: min(100%, 760px);
  margin: 0 auto;
}

.treehole-header {
  display: grid;
  gap: 14px;
  padding: 20px 0 14px;
}

.treehole-kicker {
  margin: 0 0 4px;
  color: var(--th-brand);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
}

.treehole-header h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
}

.treehole-header p {
  margin: 6px 0 0;
  color: var(--th-muted);
  font-size: 13px;
}

.treehole-actions {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.treehole-actions button,
.treehole-tabs button,
.treehole-filters button,
.treehole-reactions button,
.treehole-echo button,
.treehole-more {
  border: 1px solid var(--th-line);
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  color: var(--th-muted);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 12px;
  white-space: nowrap;
}

.treehole-actions button.active,
.treehole-tabs button.active,
.treehole-filters button.active,
.treehole-reactions button.active,
.treehole-echo button.active {
  border-color: rgba(95,168,163,.3);
  background: var(--th-soft);
  color: var(--th-brand);
}

/* 标题 + 头部通知 */
.treehole-head-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
/* 工具栏：视图 tab + 分类/情绪筛选同一行 */
.treehole-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.treehole-tabs { display: flex; gap: 8px; flex-wrap: wrap; }

/* 「今天你是什么频率」引导卡（主题树洞宣传，置于内容流之前）*/
.treehole-guide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 2px 0 14px;
  padding: 18px 20px;
  border: 1px solid rgba(95, 168, 163, .2);
  border-radius: 22px;
  background:
    radial-gradient(circle at 92% 8%, rgba(243, 182, 198, .34), transparent 42%),
    radial-gradient(circle at 4% 96%, rgba(101, 183, 176, .2), transparent 46%),
    linear-gradient(135deg, #eaf7f5, rgba(255, 255, 255, .92));
  box-shadow: 0 14px 32px rgba(63, 105, 103, .1);
}
.treehole-guide-body { flex: 1 1 280px; min-width: 0; }
.treehole-guide-kicker {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  color: var(--th-brand-deep, #347e79);
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: .12em;
}
.treehole-guide-title { margin: 9px 0 0; font-size: 19px; font-weight: 900; color: var(--th-ink, #27403b); }
.treehole-guide-sub { margin: 4px 0 0; font-size: 13px; color: var(--th-muted, #6c7f7b); line-height: 1.5; }
.treehole-guide-moods { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.treehole-guide-mood {
  padding: 6px 13px;
  border: 1px solid rgba(95, 168, 163, .26);
  border-radius: 999px;
  background: rgba(255, 255, 255, .76);
  color: var(--th-brand-deep, #347e79);
  font: inherit;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .14s ease, background .16s ease, box-shadow .16s ease, color .16s ease;
}
.treehole-guide-mood:hover { transform: translateY(-1px); background: #fff; }
.treehole-guide-mood.active {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, var(--th-brand, #5fa8a3), #8fd9d1);
  box-shadow: 0 8px 18px rgba(52, 126, 121, .28);
}
.treehole-guide-cta {
  flex: 0 0 auto;
  align-self: center;
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 900;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--th-brand, #5fa8a3), #8fd9d1);
  box-shadow: 0 12px 26px rgba(95, 168, 163, .3);
  transition: transform .16s ease, box-shadow .16s ease;
}
.treehole-guide-cta:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(52, 126, 121, .32); }

.treehole-auth-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 2px 0 14px;
  padding: 13px 16px;
  border: 1px solid rgba(52, 126, 121, .16);
  border-radius: 18px;
  background:
    radial-gradient(circle at 94% 12%, rgba(213, 139, 102, .14), transparent 32%),
    linear-gradient(135deg, rgba(232, 245, 242, .78), rgba(255, 253, 246, .9));
  box-shadow: 0 12px 28px rgba(57, 83, 76, .07);
  animation: treehole-web-enter 360ms var(--hz-ease-out, ease-out) 120ms both;
}
.treehole-auth-hint span {
  display: inline-flex;
  margin-bottom: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(251, 228, 215, .82);
  color: var(--th-pink, #D58B66);
  font-size: 11px;
  font-weight: 900;
}
.treehole-auth-hint p {
  margin: 0;
  color: var(--th-muted, #6F7D76);
  font-size: 13px;
  line-height: 1.55;
}
.treehole-auth-hint button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid rgba(52, 126, 121, .16);
  border-radius: 999px;
  color: var(--th-brand-deep, #347E79);
  background: rgba(255, 255, 255, .76);
  font: inherit;
  font-size: 12.5px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.treehole-auth-hint button:hover {
  transform: translateY(-2px);
  background: #fff;
  box-shadow: 0 10px 22px rgba(57, 83, 76, .08);
}
.treehole-auth-hint button:active { transform: scale(.97); }

.treehole-reactions button.danger {
  border-color: rgba(190, 88, 88, .18);
  background: rgba(190, 88, 88, .06);
  color: #b76666;
}

.treehole-actions .primary,
.treehole-submit {
  border: 0;
  background: linear-gradient(135deg, var(--th-brand), #8fd9d1);
  color: white;
  box-shadow: 0 10px 24px rgba(95,168,163,.24);
}

.treehole-prompt {
  cursor: pointer;
  border: 1px solid rgba(95,168,163,.16);
  border-radius: 22px;
  padding: 16px;
  background:
    radial-gradient(circle at 90% 12%, rgba(243,182,198,.35), transparent 34%),
    linear-gradient(180deg, #eaf7f5, rgba(255,255,255,.9));
  box-shadow: 0 12px 28px rgba(63, 105, 103, .08);
}

.treehole-prompt strong,
.treehole-prompt span {
  display: block;
}

.treehole-prompt span {
  margin-top: 4px;
  color: var(--th-muted);
  font-size: 13px;
}

.treehole-filters {
  display: flex;
  gap: 10px;
  margin: 0;
  position: relative;
  z-index: 4;
}

.treehole-filter-select {
  position: relative;
}

.treehole-filter-select summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--th-line);
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(255,255,255,.82);
  color: var(--th-muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.treehole-filter-select summary::-webkit-details-marker {
  display: none;
}

.treehole-filter-select summary span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.treehole-filter-select summary b {
  color: var(--th-brand);
  font-size: 14px;
  transition: transform .16s ease;
}

.treehole-filter-select[open] summary {
  border-color: rgba(95,168,163,.3);
  background: var(--th-soft);
  color: var(--th-brand);
}

.treehole-filter-select[open] summary b {
  transform: rotate(180deg);
}

.treehole-filter-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  display: grid;
  gap: 7px;
  max-height: 248px;
  overflow-y: auto;
  border: 1px solid rgba(95,168,163,.18);
  border-radius: 18px;
  padding: 10px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 18px 44px rgba(46, 78, 77, .16);
}

.treehole-filter-menu button,
.treehole-filter-menu label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 11px 12px;
  background: rgba(255,255,255,.72);
  color: var(--th-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}

.treehole-filter-menu button.active,
.treehole-filter-menu label:has(input:checked) {
  border-color: rgba(95,168,163,.18);
  background: var(--th-soft);
  color: var(--th-brand);
}

.treehole-filter-menu input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.treehole-filter-menu label span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.treehole-filter-menu label span::after {
  content: "";
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(95,168,163,.22);
  color: white;
  font-size: 12px;
  line-height: 1;
  background: rgba(255,255,255,.72);
}

.treehole-filter-menu label:has(input:checked) span::after {
  content: "✓";
  border-color: transparent;
  background: var(--th-brand);
}

.treehole-filter-menu button.active::after {
  content: "✓";
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--th-brand);
  color: white;
  font-size: 12px;
}

.treehole-filter-menu .treehole-filter-clear {
  justify-content: center;
  border-color: rgba(190, 88, 88, .14);
  background: rgba(190, 88, 88, .05);
  color: #b76666;
}

.treehole-message,
.treehole-empty,
.treehole-admin-note {
  margin: 12px 0;
  border: 1px solid var(--th-line);
  border-radius: 18px;
  padding: 14px 16px;
  background: var(--th-card);
  color: var(--th-muted);
  font-size: 13px;
}

.treehole-admin-note {
  border-color: rgba(95,168,163,.2);
  background: rgba(234,247,245,.8);
  color: var(--th-brand);
}

.treehole-list {
  display: grid;
  gap: 12px;
}

.treehole-card {
  border: 1px solid var(--th-line);
  border-radius: 22px;
  padding: 17px 16px;
  background: var(--th-card);
  box-shadow: 0 14px 34px rgba(46, 78, 77, .08);
}

.treehole-card.own {
  border-color: rgba(95,168,163,.25);
}

.treehole-card.muted {
  opacity: .74;
}

.treehole-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--th-muted);
  font-size: 12px;
  font-weight: 800;
}

/* 树洞编号：可被引用（#000042），右侧浅色等宽 */
.treehole-card-head .treehole-no {
  margin-left: auto;
  color: var(--th-brand);
  opacity: 0.72;
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.3px;
}

.treehole-card-head b {
  border-radius: 999px;
  background: var(--th-soft);
  color: var(--th-brand);
  padding: 4px 8px;
  font-size: 11px;
}

.treehole-card p {
  margin: 11px 0 10px;
  font-size: 15px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.treehole-tags,
.treehole-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.treehole-tags span {
  border-radius: 999px;
  background: rgba(243,182,198,.16);
  color: #a86b7b;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
}

.treehole-reactions {
  margin-top: 12px;
}

.treehole-more {
  margin: 14px auto 0;
  display: block;
}

.treehole-modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: end center;
  padding: 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: rgba(18, 31, 35, .34);
  backdrop-filter: blur(8px);
}

.treehole-sheet {
  position: relative;
  width: min(100%, 720px);
  max-height: min(86vh, 780px);
  overflow: auto;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 26px;
  padding: 22px;
  background: rgba(248, 250, 251, .96);
  box-shadow: 0 24px 70px rgba(24, 45, 48, .22);
}

.treehole-mobile .treehole-modal {
  place-items: end center;
  padding: 14px 10px max(14px, env(safe-area-inset-bottom));
}

.treehole-mobile .treehole-sheet {
  width: min(100%, 390px);
  max-height: min(78vh, 620px);
  border-radius: 24px;
  padding: 18px;
}

@supports (height: 100dvh) {
  .treehole-sheet {
    max-height: min(86dvh, calc(100dvh - 32px), 780px);
  }

  .treehole-mobile .treehole-sheet {
    max-height: min(78dvh, calc(100dvh - max(18px, env(safe-area-inset-bottom))));
  }
}

@media (max-width: 420px), (max-height: 760px) {
  .treehole-mobile .treehole-modal {
    padding: 8px max(8px, env(safe-area-inset-left)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-right));
  }

  .treehole-mobile .treehole-sheet {
    max-height: calc(100vh - 16px);
    padding: 16px;
    border-radius: 22px;
  }

  .treehole-mobile .treehole-sheet textarea {
    min-height: 96px;
    max-height: 140px;
  }
}

.treehole-mobile .treehole-sheet h2 {
  font-size: 19px;
  margin-bottom: 12px;
}

.treehole-mobile .treehole-sheet textarea {
  min-height: 118px;
  max-height: 170px;
}

.treehole-mobile .treehole-sheet label {
  margin-top: 10px;
}

.treehole-mobile .treehole-submit {
  margin-top: 14px;
  padding: 13px 16px;
}

.treehole-sheet.small {
  max-width: 420px;
}

.treehole-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: white;
  color: var(--th-muted);
  font-size: 22px;
}

.treehole-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.treehole-notification-btn {
  position: relative;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(52, 126, 121, 0.16);
  border-radius: 999px;
  color: var(--th-brand-deep);
  background: rgba(255, 255, 255, 0.72);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.treehole-notification-btn b {
  position: absolute;
  top: -7px;
  right: -5px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  background: var(--hz-coral-600, #b86f4d);
  font-size: 11px;
  line-height: 16px;
  text-align: center;
}

.treehole-identity-note {
  margin: 10px 0 4px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--th-muted);
  background: rgba(232, 245, 242, 0.58);
  font-size: 12px;
  line-height: 1.55;
}

.treehole-owner-actions {
  justify-content: flex-end;
}

.treehole-notification-list {
  display: grid;
  gap: 10px;
  max-height: min(56vh, 520px);
  overflow: auto;
}

.treehole-notification-item {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(52, 126, 121, 0.13);
  border-radius: 12px;
  color: var(--th-ink);
  background: rgba(255, 255, 255, 0.78);
  text-align: left;
  cursor: pointer;
}

.treehole-notification-item.unread {
  border-color: rgba(79, 169, 162, 0.35);
  background: rgba(232, 245, 242, 0.74);
}

.treehole-notification-item span,
.treehole-notification-item small {
  color: var(--th-muted);
  line-height: 1.5;
}

.treehole-safety-overlay {
  z-index: 10020;
}

.treehole-safety-card {
  border-color: rgba(213, 139, 102, 0.32);
  background:
    radial-gradient(circle at 85% 8%, rgba(213, 139, 102, 0.16), transparent 30%),
    linear-gradient(145deg, #fffdf8, #f3fbf8);
}

.treehole-safety-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(145deg, var(--th-brand), var(--hz-coral-600, #b86f4d));
  font-weight: 900;
}

.treehole-safety-card > p {
  color: var(--th-ink);
  line-height: 1.75;
}

.treehole-safety-resources {
  margin: 8px 0 18px;
  padding: 14px;
  border: 1px solid rgba(213, 139, 102, 0.2);
  border-radius: 12px;
  background: rgba(251, 228, 215, 0.42);
}

.treehole-safety-resources p {
  margin: 6px 0 0;
  color: var(--th-muted);
  line-height: 1.65;
}

.treehole-notification-btn:active,
.treehole-notification-item:active {
  transform: scale(0.98);
}

.treehole-notification-btn:focus-visible,
.treehole-notification-item:focus-visible {
  outline: 3px solid rgba(79, 169, 162, 0.24);
  outline-offset: 2px;
}

.treehole-sheet h2 {
  margin: 0 42px 16px 0;
  font-size: 22px;
}

.treehole-sheet textarea,
.treehole-sheet select,
.treehole-echo-input input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--th-line);
  border-radius: 18px;
  background: white;
  color: var(--th-ink);
  font: inherit;
  outline: none;
}

.treehole-sheet textarea {
  min-height: 160px;
  resize: vertical;
  padding: 14px;
  line-height: 1.7;
}

.treehole-compose-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 2px 2px;
  color: var(--th-muted);
  font-size: 12px;
  line-height: 1.45;
}

.treehole-compose-meta span:last-child {
  text-align: right;
}

.treehole-sheet label {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  color: var(--th-muted);
  font-size: 13px;
  font-weight: 800;
}

.treehole-sheet select {
  padding: 12px;
}

.treehole-submit {
  width: 100%;
  margin-top: 16px;
  border-radius: 18px;
  padding: 14px 16px;
  font: inherit;
  font-weight: 900;
}

.treehole-submit:disabled {
  opacity: .45;
}

.treehole-submit.danger {
  background: linear-gradient(135deg, #c46f6f, #e7a0a0);
  box-shadow: 0 10px 24px rgba(190, 88, 88, .18);
}

.treehole-confirm-copy {
  margin: 0 0 16px;
  color: var(--th-muted);
  font-size: 14px;
  line-height: 1.7;
}

.treehole-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.treehole-cancel {
  border: 1px solid var(--th-line);
  border-radius: 14px;
  background: rgba(255,255,255,.78);
  color: var(--th-muted);
  font: inherit;
  font-weight: 900;
  padding: 12px 14px;
}

.treehole-detail {
  display: grid;
  gap: 12px;
}

.treehole-detail .treehole-card {
  box-shadow: none;
}

.treehole-detail h3 {
  margin: 2px 0;
  font-size: 15px;
}

.treehole-echoes {
  display: grid;
  gap: 10px;
  max-height: 260px;
  overflow: auto;
}

.treehole-echo {
  border: 1px solid var(--th-line);
  border-radius: 18px;
  padding: 12px;
  background: white;
}

.treehole-echo strong {
  color: var(--th-brand);
  font-size: 12px;
}

.treehole-echo p {
  margin: 8px 0;
  line-height: 1.6;
}

.treehole-echo-input {
  position: sticky;
  bottom: -22px;
  display: flex;
  gap: 8px;
  padding-top: 12px;
  background: rgba(248,250,251,.94);
}

.treehole-echo-input input {
  min-height: 44px;
  padding: 0 14px;
}

.treehole-echo-input button {
  border: 0;
  border-radius: 16px;
  padding: 0 16px;
  background: var(--th-brand);
  color: white;
  font-weight: 900;
}

.treehole-web {
  display: grid;
  grid-template-columns: 220px minmax(0, 760px) 260px;
  gap: 24px;
  max-width: 1300px;
  margin: 0 auto;
  padding: 32px 20px 72px;
}

.treehole-web .treehole-main {
  width: 100%;
}

.treehole-web .treehole-header {
  gap: 12px;
  padding: 4px 0 18px;
  animation: treehole-web-enter 440ms var(--hz-ease-out, ease-out) 70ms both;
}

.treehole-web .treehole-kicker {
  margin-bottom: 5px;
  color: var(--th-muted);
  font-size: 11px;
  letter-spacing: .18em;
}

.treehole-web .treehole-header h1 {
  color: var(--hz-ink-strong, #202832);
  font-size: 31px;
  font-weight: 950;
  letter-spacing: -.02em;
  line-height: 1.08;
}

.treehole-web .treehole-head-title > p:last-child {
  max-width: 520px;
  margin-top: 7px;
  color: var(--th-muted);
  font-size: 14px;
  line-height: 1.6;
}

.treehole-web .treehole-head-top { align-items: center; }

.treehole-web .treehole-toolbar {
  margin-top: 4px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(52,126,121,.1);
}
.treehole-web .treehole-tabs { gap: 9px; }
.treehole-web .treehole-tabs button {
  min-height: 42px;
  padding: 0 17px;
  border-color: rgba(52, 126, 121, .14);
  font-size: 12.5px;
}
.treehole-web .treehole-tabs button:hover,
.treehole-web .treehole-empty-action:hover,
.treehole-web .treehole-more:hover {
  transform: translateY(-2px);
  border-color: rgba(52, 126, 121, .28);
  color: var(--th-brand-deep);
  box-shadow: 0 11px 24px rgba(57, 83, 76, .09);
}

.treehole-web .treehole-filters {
  gap: 12px;
  margin: 14px 0 16px;
  animation: treehole-web-enter 440ms var(--hz-ease-out, ease-out) 150ms both;
}

.treehole-web .treehole-filter-select summary {
  min-height: 46px;
  padding-inline: 17px;
}

.treehole-web .treehole-empty {
  min-height: 204px;
  margin: 0;
  padding: 28px 24px;
  align-content: center;
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 0%, rgba(101, 183, 176, .1), transparent 38%),
    radial-gradient(circle at 96% 96%, rgba(213, 139, 102, .07), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, .93), rgba(255, 253, 246, .74));
}

.treehole-web .treehole-empty strong {
  font-size: 17px;
}

.treehole-web .treehole-empty p {
  max-width: 360px;
  font-size: 13px;
}

.treehole-web .treehole-empty-action {
  min-height: 40px;
  padding-inline: 20px;
  background: rgba(255, 255, 255, .84);
}

.treehole-web .treehole-list {
  gap: 16px;
}

.treehole-web .treehole-card {
  padding: 20px 21px;
  border-radius: 22px;
}

.treehole-web .treehole-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 38px rgba(57, 83, 76, .11);
}

.treehole-left-rail,
.treehole-side {
  position: sticky;
  top: 88px;
  align-self: start;
  border: 1px solid var(--th-line);
  border-radius: 20px;
  background: var(--th-card);
  padding: 18px;
  box-shadow:
    0 16px 38px rgba(46, 78, 77, .07),
    inset 0 1px 0 rgba(255, 255, 255, .82);
}

.treehole-left-rail {
  display: grid;
  gap: 12px;
  animation: treehole-web-enter 440ms var(--hz-ease-out, ease-out) both;
}

.treehole-left-rail strong {
  color: var(--th-ink);
  font-size: 17px;
  font-weight: 950;
  letter-spacing: .02em;
}

.treehole-left-rail button {
  min-height: 44px;
  border: 1px solid rgba(52, 126, 121, .12);
  border-radius: 14px;
  padding: 0 13px;
  text-align: left;
  background:
    radial-gradient(circle at 92% 15%, rgba(213, 139, 102, .1), transparent 30%),
    linear-gradient(145deg, rgba(232, 245, 242, .96), rgba(255, 253, 246, .8));
  color: var(--th-brand-deep);
  font: inherit;
  font-weight: 900;
  cursor: default;
}

.treehole-left-rail span,
.treehole-side p {
  color: var(--th-muted);
  font-size: 13px;
  line-height: 1.6;
}

.treehole-side {
  display: grid;
  gap: 0;
  padding: 0;
  overflow: hidden;
  animation: treehole-web-enter 440ms var(--hz-ease-out, ease-out) 210ms both;
}

.treehole-side section {
  border-bottom: 1px solid rgba(52, 126, 121, .12);
  padding: 16px 18px;
}

.treehole-side section:last-child {
  border-bottom: 0;
}

.treehole-side-block b {
  display: block;
  margin-bottom: 5px;
  color: var(--th-ink);
  font-size: 14px;
  font-weight: 950;
}

.treehole-side-block p {
  margin: 0;
}

.treehole-side-topic {
  background:
    radial-gradient(circle at 92% 10%, rgba(213, 139, 102, .12), transparent 32%),
    linear-gradient(145deg, rgba(232, 245, 242, .7), rgba(255, 253, 246, .38));
}

@media (max-width: 1024px) {
  .treehole-web {
    display: flex;
    flex-direction: column;
    padding: 20px 16px 44px;
  }
  .treehole-left-rail { display: none; }
  .treehole-web .treehole-main { order: 1; }   /* 窄屏：主信息流在上 */
  .treehole-side {
    order: 2;                                   /* 运营侧栏移到下方 */
    position: static;
    margin: 18px auto 0;
    width: min(100%, 760px);
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .treehole-side .treehole-promo {
    grid-column: 1 / -1;
  }
  .treehole-side section:nth-child(3) {
    border-right: 0;
  }
  .treehole-side .treehole-side-block {
    border-right: 1px solid rgba(52, 126, 121, .12);
  }
}

@media (max-width: 640px) {
  .treehole-modal {
    padding: 0;
  }
  .treehole-guide { padding: 16px; }
  .treehole-guide-cta { width: 100%; margin-top: 4px; text-align: center; }
  .treehole-sheet {
    max-height: 92vh;
    border-radius: 26px 26px 0 0;
  }
  .treehole-mobile .treehole-modal {
    padding: 10px 10px 82px;
  }
  .treehole-mobile .treehole-sheet {
    max-height: 74vh;
    border-radius: 22px;
    padding: 16px;
  }
  .treehole-mobile .treehole-sheet textarea {
    min-height: 110px;
  }
  .treehole-actions {
    margin-right: -12px;
  }
  .treehole-reactions button {
    font-size: 11px;
    padding: 7px 9px;
  }
  .treehole-side {
    display: grid;
    grid-template-columns: 1fr;
  }
  .treehole-side .treehole-side-block {
    border-right: 0;
  }
}

/* 详情页正文全文展示（不截断、保留换行） */
.treehole-detail .treehole-full { white-space: pre-wrap; cursor: default; }
/* 移动端筛选更紧凑，减少占高 */
@media (max-width: 640px) {
  .treehole-filters {
    gap: 8px;
    margin-top: 10px;
  }
  .treehole-filter-select summary {
    min-height: 38px;
    padding: 0 12px;
  }
  .treehole-filter-menu {
    max-height: 220px;
  }
}

/* 合作推广（侧栏「今日话题」卡下方，宽度随侧栏，尺寸紧凑可调）*/
.treehole-side .treehole-promo {
  padding: 16px 18px 18px;
  background:
    radial-gradient(circle at 88% 10%, rgba(213, 139, 102, .16), transparent 30%),
    linear-gradient(145deg, rgba(255, 250, 244, .9), rgba(251, 228, 215, .3));
}
.treehole-promo-tag {
  display: inline-block;
  font-size: 11px;
  color: var(--hz-coral-600, #B86F4D);
  background: rgba(251, 228, 215, .84);
  padding: 4px 9px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.treehole-promo b { display: block; font-size: 14px; margin-bottom: 4px; }
.treehole-promo p { margin: 0 0 4px; font-size: 12.5px; line-height: 1.5; color: #8a8275; }
.treehole-promo-detail { white-space: pre-line; }
.treehole-promo-img {
  width: 100%;
  height: 164px;
  border: 1px solid rgba(213, 139, 102, .14);
  border-radius: 14px;
  margin-top: 10px;
  display: block;
  object-fit: contain;
  background: rgba(255, 255, 255, .68);
  box-shadow: 0 10px 22px rgba(97, 73, 59, .08);
}
.treehole-promo-qr { margin-top: 10px; }
.treehole-promo-qr img { width: 110px; height: 110px; border-radius: 10px; object-fit: cover; display: block; }
.treehole-promo-qr small { display: block; margin-top: 4px; font-size: 11px; color: #b0a890; }

/* 52Hz treehole product polish: inherit the mobile visual tokens */
.treehole-app {
  --th-bg: var(--hz-cream-1, #FBF7EF);
  --th-card: var(--hz-surface, rgba(255, 255, 255, 0.9));
  --th-ink: var(--hz-ink, #263631);
  --th-muted: var(--hz-muted, #6F7D76);
  --th-brand: var(--hz-teal-500, #4FA9A2);
  --th-brand-deep: var(--hz-teal-700, #347E79);
  --th-soft: var(--hz-teal-100, #E8F5F2);
  --th-pink: var(--hz-coral-500, #D58B66);
  --th-pink-soft: var(--hz-coral-100, #FBE4D7);
  --th-line: var(--hz-line, rgba(52, 126, 121, 0.14));
}

.treehole-mobile {
  min-height: 100%;
  padding: 0 32px 118px;
}

.treehole-mobile .treehole-main {
  width: 100%;
}

.treehole-mobile .treehole-header {
  gap: 0;
  padding: 28px 0 0;
  animation: treehole-section-enter 380ms var(--hz-ease-out, ease-out) both;
}

.treehole-mobile .treehole-kicker {
  margin-bottom: 4px;
  color: var(--th-muted);
  font-size: 11.5px;
  letter-spacing: 0.17em;
}

.treehole-mobile .treehole-header h1 {
  color: var(--hz-ink-strong, #202832);
  font-size: 31px;
  font-weight: 950;
  line-height: 1.04;
}

.treehole-mobile .treehole-header > div:first-child > p:last-child {
  margin-top: 7px;
  color: var(--th-brand-deep);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.48;
}

.treehole-mobile .treehole-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 14px;
  padding: 0 0 2px;
  overflow: visible;
  scrollbar-width: none;
  animation: treehole-section-enter 380ms var(--hz-ease-out, ease-out) 50ms both;
}

.treehole-mobile .treehole-actions::-webkit-scrollbar {
  display: none;
}

.treehole-actions button,
.treehole-filters button,
.treehole-reactions button,
.treehole-echo button,
.treehole-more,
.treehole-empty-action {
  min-height: 36px;
  border-color: rgba(52, 126, 121, 0.14);
  color: var(--th-muted);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 253, 246, 0.7));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 7px 16px rgba(57, 83, 76, 0.04);
  cursor: pointer;
  transition:
    transform var(--hz-motion-fast, 160ms) var(--hz-ease-out, ease-out),
    box-shadow var(--hz-motion-fast, 160ms) ease,
    border-color var(--hz-motion-fast, 160ms) ease,
    color var(--hz-motion-fast, 160ms) ease,
    background var(--hz-motion-fast, 160ms) ease;
}

.treehole-mobile .treehole-actions button {
  width: 100%;
  min-width: 0;
  padding: 0 7px;
  font-size: 11.5px;
  letter-spacing: -0.01em;
}

.treehole-actions button:active,
.treehole-filters button:active,
.treehole-reactions button:active,
.treehole-echo button:active,
.treehole-more:active,
.treehole-empty-action:active,
.treehole-submit:active,
.treehole-close:active {
  transform: scale(0.97);
}

.treehole-actions button:focus-visible,
.treehole-filter-select summary:focus-visible,
.treehole-reactions button:focus-visible,
.treehole-submit:focus-visible,
.treehole-empty-action:focus-visible {
  outline: 3px solid rgba(79, 169, 162, 0.2);
  outline-offset: 2px;
}

.treehole-actions button.active,
.treehole-filters button.active,
.treehole-reactions button.active,
.treehole-echo button.active {
  border-color: rgba(52, 126, 121, 0.22);
  color: var(--th-brand-deep);
  background:
    radial-gradient(circle at 88% 18%, rgba(213, 139, 102, 0.12), transparent 28%),
    linear-gradient(145deg, rgba(232, 245, 242, 0.96), rgba(255, 253, 246, 0.8));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 8px 18px rgba(57, 83, 76, 0.06);
}

.treehole-actions .primary,
.treehole-submit {
  border: 1px solid rgba(255, 255, 255, 0.58);
  color: #fff;
  background: var(--hz-button-bg, linear-gradient(135deg, #4FA9A2, #65B7B0));
  box-shadow: var(--hz-shadow-button, 0 16px 30px rgba(52, 126, 121, 0.2));
}

.treehole-mobile .treehole-prompt {
  margin-top: 16px;
  padding: 15px 16px;
  border-color: rgba(52, 126, 121, 0.14);
  border-radius: var(--hz-radius-card-sm, 24px);
  background:
    radial-gradient(circle at 90% 12%, rgba(213, 139, 102, 0.18), transparent 30%),
    radial-gradient(circle at 10% 88%, rgba(101, 183, 176, 0.14), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(232, 245, 242, 0.66));
  box-shadow: var(--hz-shadow-card-soft, 0 12px 26px rgba(57, 83, 76, 0.08));
  animation: treehole-section-enter 380ms var(--hz-ease-out, ease-out) 100ms both;
  transition:
    transform var(--hz-motion-fast, 160ms) var(--hz-ease-out, ease-out),
    box-shadow var(--hz-motion-fast, 160ms) ease;
}

.treehole-mobile .treehole-prompt:active {
  transform: scale(0.986);
  box-shadow: 0 7px 17px rgba(57, 83, 76, 0.06);
}

.treehole-prompt strong {
  color: var(--hz-ink-strong, #202832);
  font-size: 17px;
  font-weight: 950;
  line-height: 1.25;
}

.treehole-prompt span {
  margin-top: 5px;
  font-weight: 760;
  line-height: 1.5;
}

.treehole-mobile .treehole-filters {
  gap: 10px;
  margin: 22px 0 14px;
  animation: treehole-section-enter 380ms var(--hz-ease-out, ease-out) 150ms both;
}

.treehole-filter-select summary {
  min-height: 44px;
  border-color: rgba(52, 126, 121, 0.14);
  border-radius: var(--hz-radius-pill, 999px);
  color: var(--th-muted);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(255, 253, 246, 0.72));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 8px 18px rgba(57, 83, 76, 0.04);
  transition:
    transform var(--hz-motion-fast, 160ms) var(--hz-ease-out, ease-out),
    border-color var(--hz-motion-fast, 160ms) ease,
    background var(--hz-motion-fast, 160ms) ease;
}

.treehole-filter-select summary:active {
  transform: scale(0.985);
}

.treehole-filter-select summary b {
  color: var(--th-brand-deep);
}

.treehole-filter-select[open] summary {
  border-color: rgba(52, 126, 121, 0.28);
  color: var(--th-brand-deep);
  background:
    linear-gradient(145deg, rgba(232, 245, 242, 0.96), rgba(255, 253, 246, 0.78));
}

.treehole-filter-menu {
  border-color: rgba(52, 126, 121, 0.16);
  border-radius: 20px;
  background:
    radial-gradient(circle at 92% 8%, rgba(213, 139, 102, 0.1), transparent 24%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 253, 246, 0.94));
  box-shadow:
    0 22px 48px rgba(57, 83, 76, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.94);
  transform-origin: top center;
  animation: treehole-menu-enter 180ms var(--hz-ease-out, ease-out) both;
}

.treehole-message {
  position: relative;
  z-index: 8;
  margin: 12px 0;
  border-color: rgba(52, 126, 121, 0.18);
  color: var(--th-brand-deep);
  font-weight: 820;
  background:
    radial-gradient(circle at 94% 18%, rgba(213, 139, 102, 0.12), transparent 28%),
    linear-gradient(145deg, rgba(232, 245, 242, 0.94), rgba(255, 253, 246, 0.88));
  box-shadow: var(--hz-shadow-card-soft, 0 12px 26px rgba(57, 83, 76, 0.08));
  animation: treehole-message-enter 240ms var(--hz-ease-out, ease-out) both;
}

.treehole-empty {
  display: grid;
  justify-items: center;
  min-height: 144px;
  margin: 14px 0;
  padding: 20px 18px;
  border: 1px solid rgba(52, 126, 121, 0.14);
  border-radius: var(--hz-radius-card-sm, 24px);
  color: var(--th-muted);
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(101, 183, 176, 0.12), transparent 36%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(255, 253, 246, 0.7));
  box-shadow: var(--hz-shadow-card-soft, 0 12px 26px rgba(57, 83, 76, 0.08));
  animation: treehole-section-enter 380ms var(--hz-ease-out, ease-out) 190ms both;
}

.treehole-empty-orbit {
  position: relative;
  width: 34px;
  height: 34px;
  margin-bottom: 8px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, var(--th-brand) 0 5px, transparent 6px),
    radial-gradient(circle at 50% 50%, rgba(101, 183, 176, 0.16) 0 16px, transparent 17px);
}

.treehole-empty-orbit::after {
  content: "";
  position: absolute;
  right: 1px;
  top: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--th-pink);
  box-shadow: 0 0 0 5px rgba(213, 139, 102, 0.12);
}

.treehole-empty strong {
  color: var(--th-ink);
  font-size: 16px;
  font-weight: 950;
  line-height: 1.3;
}

.treehole-empty p {
  max-width: 250px;
  margin: 6px 0 14px;
  color: var(--th-muted);
  font-size: 12.5px;
  font-weight: 760;
  line-height: 1.5;
}

.treehole-empty-action {
  min-height: 36px;
  padding: 0 18px;
  border-radius: var(--hz-radius-pill, 999px);
  color: var(--th-brand-deep);
  font: inherit;
  font-size: 13px;
  font-weight: 950;
}

.treehole-loading .treehole-empty-orbit {
  animation: treehole-orbit-pulse 1.4s ease-in-out infinite;
}

.treehole-list {
  gap: 14px;
  animation: treehole-list-refresh 260ms var(--hz-ease-out, ease-out) both;
}

.treehole-card {
  position: relative;
  padding: 18px;
  overflow: hidden;
  border-color: rgba(52, 126, 121, 0.12);
  border-radius: var(--hz-radius-card-sm, 24px);
  background:
    radial-gradient(circle at 94% 10%, rgba(213, 139, 102, 0.08), transparent 24%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(255, 253, 246, 0.76));
  box-shadow: var(--hz-shadow-card-soft, 0 12px 26px rgba(57, 83, 76, 0.08));
  animation: treehole-card-enter 380ms var(--hz-ease-out, ease-out) var(--treehole-card-delay, 0ms) both;
  transition:
    transform var(--hz-motion-fast, 160ms) var(--hz-ease-out, ease-out),
    box-shadow var(--hz-motion-fast, 160ms) ease;
}

.treehole-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--th-brand), rgba(101, 183, 176, 0.1) 55%, rgba(213, 139, 102, 0.36));
  opacity: 0.5;
}

.treehole-card:active {
  transform: scale(0.992);
}

.treehole-card.own {
  border-color: rgba(52, 126, 121, 0.2);
}

.treehole-card-head {
  line-height: 1.45;
}

.treehole-card-head b {
  color: var(--th-brand-deep);
  background: var(--th-soft);
}

.treehole-card p {
  margin: 12px 0 11px;
  color: var(--th-ink);
  font-weight: 650;
}

.treehole-tags span {
  color: var(--hz-coral-600, #B86F4D);
  background: rgba(251, 228, 215, 0.68);
}

.treehole-reactions {
  gap: 7px;
  margin-top: 14px;
}

.treehole-reactions button {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 11px;
}

.treehole-reactions button.active {
  color: var(--th-brand-deep);
}

.treehole-reactions button.danger {
  margin-left: auto;
  border-color: transparent;
  color: rgba(184, 111, 77, 0.74);
  background: transparent;
  box-shadow: none;
}

.treehole-modal {
  background:
    radial-gradient(circle at 24% 18%, rgba(213, 139, 102, 0.15), transparent 26%),
    rgba(32, 40, 50, 0.34);
  animation: treehole-overlay-enter 200ms ease both;
}

.treehole-sheet {
  border-color: rgba(255, 255, 255, 0.82);
  color: var(--th-ink);
  background:
    radial-gradient(circle at 90% 8%, rgba(213, 139, 102, 0.1), transparent 24%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(251, 247, 239, 0.96));
  box-shadow:
    0 28px 80px rgba(32, 40, 50, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.94);
  animation: treehole-sheet-enter 320ms var(--hz-ease-out, ease-out) both;
}

.treehole-sheet textarea,
.treehole-sheet select,
.treehole-echo-input input {
  border-color: rgba(52, 126, 121, 0.16);
  color: var(--th-ink);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 253, 246, 0.82));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.treehole-sheet textarea:focus,
.treehole-sheet select:focus,
.treehole-echo-input input:focus {
  border-color: rgba(52, 126, 121, 0.4);
  box-shadow: 0 0 0 4px rgba(79, 169, 162, 0.11);
}

.treehole-submit {
  transition:
    transform var(--hz-motion-fast, 160ms) var(--hz-ease-out, ease-out),
    opacity var(--hz-motion-fast, 160ms) ease,
    box-shadow var(--hz-motion-fast, 160ms) ease;
}

.treehole-submit.is-loading {
  opacity: 0.82;
  cursor: wait;
}

.treehole-close {
  color: var(--th-ink);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(232, 245, 242, 0.72));
  box-shadow: var(--hz-shadow-card-soft, 0 12px 26px rgba(57, 83, 76, 0.08));
  transition: transform var(--hz-motion-fast, 160ms) var(--hz-ease-out, ease-out);
}

@keyframes treehole-section-enter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes treehole-web-enter {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes treehole-card-enter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes treehole-list-refresh {
  from { opacity: 0.45; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes treehole-menu-enter {
  from { opacity: 0; transform: translateY(-4px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes treehole-message-enter {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes treehole-overlay-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes treehole-sheet-enter {
  from { opacity: 0; transform: translateY(18px) scale(0.992); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes treehole-orbit-pulse {
  0%, 100% { transform: scale(0.94); opacity: 0.7; }
  50% { transform: scale(1.04); opacity: 1; }
}

@media (max-width: 370px) {
  .treehole-mobile {
    padding-inline: 28px;
  }

  .treehole-mobile .treehole-header {
    padding-top: 28px;
  }

  .treehole-mobile .treehole-header h1 {
    font-size: 29px;
  }

  .treehole-mobile .treehole-header > div:first-child > p:last-child {
    font-size: 13px;
  }

  .treehole-mobile .treehole-prompt {
    padding: 15px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .treehole-mobile .treehole-header,
  .treehole-mobile .treehole-actions,
  .treehole-mobile .treehole-prompt,
  .treehole-mobile .treehole-filters,
  .treehole-message,
  .treehole-empty,
  .treehole-list,
  .treehole-card,
  .treehole-filter-menu,
  .treehole-modal,
  .treehole-sheet,
  .treehole-loading .treehole-empty-orbit {
    animation: none;
  }

  .treehole-web .treehole-header,
  .treehole-web .treehole-filters,
  .treehole-web .treehole-left-rail,
  .treehole-web .treehole-side {
    animation: none;
  }

  .treehole-actions button,
  .treehole-filter-select summary,
  .treehole-reactions button,
  .treehole-submit,
  .treehole-empty-action,
  .treehole-card,
  .treehole-prompt,
  .treehole-close {
    transition: none;
  }
}

/* 树洞正文里的 #编号 引用链接 */
.treehole-ref {
  color: var(--th-brand);
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  border-bottom: 1px dashed currentColor;
}
.treehole-ref:hover { opacity: 0.8; }
