/* ============================================================
   Sky-Blog · 呼吸时间线 / 留言墙页面样式（record.html + wall.html）
   布局复用 Tailwind/daisyUI 既有类（编译产物已含）；
   本文件只补充图片网格、评论区、便利贴与色板等自定样式；
   颜色走 daisyUI 语义类，35 套配色自动适配。
   ============================================================ */

/* ---------- 呼吸卡片 ---------- */
.sb-mo-card { border-radius: 1rem; }
.sb-mo-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.sb-mo-avatar {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  object-fit: cover;
}
.sb-mo-avatar-initial {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--p));
  background: hsl(var(--p) / 0.1);
}
.sb-mo-author {
  font-size: 0.95rem;
  font-weight: 600;
  color: hsl(var(--bc) / 0.85);
}
.sb-mo-mood { margin-left: 0.25rem; font-size: 0.95rem; }
.sb-mo-date {
  font-size: 0.75rem;
  color: hsl(var(--bc) / 0.5);
  margin-top: 0.125rem;
}
.sb-mo-content {
  font-size: 0.925rem;
  line-height: 1.9;
  color: hsl(var(--bc) / 0.85);
  margin-top: 0.75rem;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------- 图片网格（n1-n4） ---------- */
.sb-mo-imgs {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.75rem;
  border-radius: 0.75rem;
  overflow: hidden;
}
.sb-mo-imgs.n1 { grid-template-columns: 1fr; }
.sb-mo-imgs.n2, .sb-mo-imgs.n4 { grid-template-columns: 1fr 1fr; }
.sb-mo-imgs.n3 { grid-template-columns: 1fr 1fr 1fr; }
.sb-mo-imgs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0.5rem;
}
.sb-mo-imgs.n1 img { max-height: 26rem; }
.sb-mo-imgs.n2 img, .sb-mo-imgs.n3 img, .sb-mo-imgs.n4 img { aspect-ratio: 1; }
@media (max-width: 480px) {
  .sb-mo-imgs.n3 { grid-template-columns: 1fr 1fr; }
  .sb-mo-imgs.n3 img:last-child { grid-column: 1 / -1; }
}

/* ---------- 呼吸评论区（默认收起） ---------- */
.sb-mo-cmts {
  margin-top: 0.75rem;
  border-top: 1px solid hsl(var(--bc) / 0.1);
  padding-top: 0.625rem;
}
.sb-mo-toggle {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.8125rem;
  font-family: inherit;
  color: hsl(var(--bc) / 0.5);
  cursor: pointer;
}
.sb-mo-toggle:hover { color: hsl(var(--p)); }
.sb-mo-cbox { display: none; margin-top: 0.625rem; }
.sb-mo-cbox.open { display: block; }
.sb-mo-c-list { list-style: none; margin: 0 0 0.625rem; padding: 0; }
.sb-mo-c-list li {
  padding: 0.5rem 0;
  border-bottom: 1px dashed hsl(var(--bc) / 0.12);
  font-size: 0.8125rem;
}
.sb-mo-c-list li:last-child { border-bottom: none; }
.sb-mo-c-nick {
  font-weight: 500;
  color: hsl(var(--bc) / 0.7);
  margin-right: 0.5rem;
  text-decoration: none;
}
a.sb-mo-c-nick:hover { color: hsl(var(--p)); }
.sb-mo-c-time { font-size: 0.75rem; color: hsl(var(--bc) / 0.45); }
.sb-mo-c-text {
  margin-top: 0.25rem;
  line-height: 1.7;
  color: hsl(var(--bc) / 0.8);
  white-space: pre-wrap;
  word-break: break-word;
}
.sb-mo-c-empty {
  font-size: 0.8125rem;
  color: hsl(var(--bc) / 0.5);
  padding: 0.25rem 0 0.625rem;
}
.sb-mo-c-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

/* ---------- 留言墙：色板 ---------- */
.sb-wall-colors {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}
.sb-wall-color {
  width: 1.625rem;
  height: 1.625rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.sb-wall-color:hover { transform: scale(1.12); }
.sb-wall-color.active { box-shadow: 0 0 0 2px hsl(var(--p)); }
.sb-wall-color-label {
  font-size: 0.8125rem;
  color: hsl(var(--bc) / 0.5);
  margin-right: 0.25rem;
}
.sb-wall-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.875rem;
}

/* ---------- 留言墙：便利贴 ---------- */
.sb-wall-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13.75rem, 1fr));
  gap: 0.875rem;
}
.sb-wall-note {
  border-radius: 0.75rem;
  padding: 0.875rem 1rem 0.75rem;
  min-height: 8.125rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.09);
  transition: transform 0.15s ease;
}
.sb-wall-note:nth-child(odd) { transform: rotate(-0.6deg); }
.sb-wall-note:nth-child(even) { transform: rotate(0.5deg); }
.sb-wall-note:hover { transform: rotate(0) translateY(-3px); }
.sb-wall-note-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
}
.sb-wall-note-name {
  font-weight: 700;
  font-size: 0.875rem;
  color: #333;
}
.sb-wall-note-home {
  font-size: 0.75rem;
  color: #556;
  word-break: break-all;
  margin-left: 0.375rem;
  text-decoration: none;
}
.sb-wall-note-home:hover { text-decoration: underline; }
.sb-wall-note-star { font-size: 0.75rem; color: #b8860b; margin-left: 0.375rem; }
.sb-wall-note-content {
  font-size: 0.8125rem;
  line-height: 1.8;
  color: #333;
  margin-top: 0.5rem;
  white-space: pre-wrap;
  word-break: break-word;
  flex: 1;
}
.sb-wall-note-time {
  font-size: 0.71875rem;
  color: #667;
  margin-top: 0.625rem;
}

/* ---------- 留言墙：分类 ---------- */
.sb-wall-cat-select {
  cursor: pointer;
}
.sb-wall-cat-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.25rem 0 1.125rem;
}
.sb-wall-cat-tab {
  padding: 0.3125rem 0.875rem;
  font-size: 0.8125rem;
  line-height: 1.6;
  border-radius: 999px;
  background: hsl(var(--b1));
  border: 1px solid hsl(var(--bc) / 0.12);
  color: hsl(var(--bc) / 0.55);
  text-decoration: none;
  transition: all 0.15s ease;
}
.sb-wall-cat-tab:hover {
  border-color: hsl(var(--p));
  color: hsl(var(--p));
}
.sb-wall-cat-tab.active {
  background: hsl(var(--p));
  border-color: hsl(var(--p));
  color: hsl(var(--pc));
}
.sb-wall-note-cat {
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.125rem;
  padding: 0 0.5rem;
  margin-left: 0.375rem;
  border-radius: 0.5625rem;
  background: rgba(0, 0, 0, 0.16);
  color: #333;
}

/* ============================================================
   侧边栏模块统一栈（sp-sb-stack）：开关 sb.* + 排序 sb_ord.*
   间距与原 aside 的 space-y-6 保持一致（1.5rem）。
   ============================================================ */
.sp-sb-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* 核心 widget 条目（呼吸 / 留言簿，.sp-sw-item/.sp-sw-t/.sp-sw-m） */
.sp-sb-stack .sp-sw-item {
  display: block;
  padding: 0.5rem 0.625rem;
  margin: 0 -0.125rem;
  border-radius: 0.75rem;
  transition: background-color 0.2s ease;
}
.sp-sb-stack .sp-sw-item + .sp-sw-item {
  margin-top: 0.125rem;
}
.sp-sb-stack a.sp-sw-item:hover {
  background: hsl(var(--bc) / 0.06);
}
.sp-sb-stack .sp-sw-t {
  display: block;
  font-size: 0.8125rem;
  line-height: 1.5;
  font-weight: 500;
  color: hsl(var(--bc) / 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
}
.sp-sb-stack a.sp-sw-item:hover .sp-sw-t {
  color: hsl(var(--p));
}
.sp-sb-stack .sp-sw-m {
  display: block;
  margin-top: 0.125rem;
  font-size: 0.6875rem;
  line-height: 1.4;
  color: hsl(var(--bc) / 0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
