/* ============================================================
   树洞主题样式 —— 覆盖在 style.css 之后加载
   基调：纸感、留白多、字比页面重要
   ============================================================ */

/* ---------- 树洞页变量 ---------- */
:root {
  --hole-paper:  #0e1218;
  --hole-card:   #141a23;
  --hole-line:   #222b3a;
  --hole-text:   #dfe6ef;
  --hole-dim:    #8d9aad;
  --hole-faint:  #5c6779;
  --hole-quote:  #6f8fb3;
}

[data-theme="light"] {
  --hole-paper:  #faf9f6;
  --hole-card:   #ffffff;
  --hole-line:   #e6e3dc;
  --hole-text:   #23282f;
  --hole-dim:    #6b7280;
  --hole-faint:  #9aa1ac;
  --hole-quote:  #5a7fa8;
}

/* ---------- 顶部：树洞标题区 ---------- */
.hole-hero {
  padding: 40px 0 30px;
  border-bottom: 1px solid var(--hole-line);
  margin-bottom: 8px;
}

.hole-hero h1 {
  font-size: clamp(26px, 4.2vw, 34px);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.3;
  margin-bottom: 10px;
}

.hole-hero .hole-sub {
  color: var(--hole-dim);
  font-size: 14.5px;
  line-height: 1.8;
}

.hole-count {
  display: inline-block;
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--hole-faint);
  font-variant-numeric: tabular-nums;
}

/* ---------- 条目列表 ---------- */
.entries {
  list-style: none;
  padding: 0;
  margin: 0;
}

.entry {
  padding: 30px 0 28px;
  border-bottom: 1px solid var(--hole-line);
  position: relative;
}

.entry:last-child { border-bottom: none; }

.entry-date {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--hole-faint);
  letter-spacing: .02em;
  margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
}

.entry-date .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--hole-faint);
  opacity: .7;
}

.entry-mood {
  font-size: 11.5px;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--hole-line);
  color: var(--hole-dim);
  background: var(--hole-card);
  white-space: nowrap;
}

.entry-text {
  font-size: 16.5px;
  line-height: 1.95;
  color: var(--hole-text);
  letter-spacing: .01em;
  white-space: pre-wrap;
  word-break: break-word;
}

.entry-text p + p { margin-top: 1.1em; }

/* 引用 / 摘句 */
.entry-quote {
  border-left: 2px solid var(--hole-quote);
  padding: 2px 0 2px 16px;
  margin: 14px 0;
  color: var(--hole-quote);
  font-style: italic;
  font-size: 15.5px;
  line-height: 1.85;
}

/* 结尾的落款签名 */
.entry-sign {
  display: block;
  margin-top: 14px;
  font-size: 13px;
  color: var(--hole-faint);
  text-align: right;
  font-style: italic;
}

/* 悬停时轻微提亮，暗示可点 */
.entry.is-link { cursor: pointer; transition: background .18s; }
.entry.is-link:hover { background: color-mix(in srgb, var(--hole-card) 55%, transparent); }

/* 存档页：整条可点进独立页 */
.entry-link {
  display: block;
  color: inherit;
  text-decoration: none;
  padding: 6px 10px;
  margin: -6px -10px;
  border-radius: var(--radius-sm);
  transition: background .18s, transform .18s;
}
.entry-link:hover {
  opacity: 1;
  background: color-mix(in srgb, var(--hole-card) 70%, transparent);
}
.entry-link:hover .entry-text { color: var(--accent); }
.entry-text { transition: color .18s; }

/* 独立条目页：小导航 */
.article-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin-top: 6px;
}
.article-foot .btn { font-size: 13.5px; padding: 7px 15px; }

/* ---------- 分隔装饰 ---------- */
.hole-divider {
  text-align: center;
  color: var(--hole-faint);
  letter-spacing: .6em;
  font-size: 12px;
  margin: 34px 0;
  opacity: .55;
}

/* ---------- 空状态 ---------- */
.hole-empty {
  text-align: center;
  padding: 70px 0;
  color: var(--hole-faint);
  font-size: 14.5px;
  line-height: 2;
}

/* ---------- 写给自己的话（页脚上方） ---------- */
.hole-footnote {
  margin: 46px 0 10px;
  padding: 22px 24px;
  border: 1px dashed var(--hole-line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--hole-card) 60%, transparent);
  color: var(--hole-dim);
  font-size: 13.5px;
  line-height: 1.85;
  text-align: center;
}

.hole-footnote strong { color: var(--hole-text); font-weight: 600; }

/* ---------- 移动端 ---------- */
@media (max-width: 720px) {
  .hole-hero { padding: 24px 0 22px; }
  .entry { padding: 24px 0 22px; }
  .entry-text { font-size: 16px; line-height: 1.9; }
  .entry-quote { font-size: 15px; padding-left: 13px; }
  .hole-footnote { padding: 18px 16px; font-size: 13px; }
}

/* ---------- 打印 ---------- */
@media print {
  .hole-footnote, .hole-divider { display: none; }
  .entry { border-color: #ddd; }
  .entry-text { color: #000; }
}

/* ---------- 树洞氛围：极简噪点纹理 ---------- */
body.hole {
  background-image:
    radial-gradient(circle at 18% 8%, color-mix(in srgb, var(--accent) 6%, transparent), transparent 42%),
    radial-gradient(circle at 82% 62%, color-mix(in srgb, var(--accent-2) 5%, transparent), transparent 45%);
  background-attachment: fixed;
}
