/* =========================================================
   拾绪 · 心情说说
   像 QQ 空间 / 朋友圈：记录心情，小拾来评论。
   ========================================================= */

body {
  font-family: Inter, 'Noto Sans SC', -apple-system, 'PingFang SC', sans-serif;
}
main#article {
  max-width: 1120px;
  padding-top: clamp(88px, 12vh, 116px);
  padding-bottom: 80px;
}
.read-progress,
.toc { display: none; }

.mo {
  --m: var(--accent);
  max-width: 780px;
  margin: 0 auto;
}

.mood-happy { --m: #d19a3f; }
.mood-sad { --m: #5b7a9d; }
.mood-angry { --m: #c2542d; }
.mood-calm { --m: #6b8f71; }
.mood-excited { --m: #8d5a83; }
.mood-tired { --m: #7c8490; }
.mood-love { --m: #c25d7a; }

:root[data-theme="dark"] .mood-happy { --m: #e0b05c; }
:root[data-theme="dark"] .mood-sad { --m: #7a9fc4; }
:root[data-theme="dark"] .mood-angry { --m: #e8956b; }
:root[data-theme="dark"] .mood-calm { --m: #7fae86; }
:root[data-theme="dark"] .mood-excited { --m: #b07ba8; }
:root[data-theme="dark"] .mood-tired { --m: #9aa3af; }
:root[data-theme="dark"] .mood-love { --m: #d98ca6; }

/* ---------- 头部 ---------- */
.mo-head { text-align: center; }
.mo-eyebrow {
  margin: 0 0 16px;
  color: var(--ink-faint);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .26em;
}
.mo-eyebrow span { margin-right: 8px; color: var(--gold); font-size: 10px; }

.mo-head h1 {
  margin: 0 0 14px;
  color: var(--ink);
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(1.9rem, 4.4vw, 2.85rem);
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: .01em;
  text-wrap: balance;
}
.mo-head h1 em {
  font-style: normal;
  color: var(--accent);
  background-image: linear-gradient(transparent 68%, var(--accent-soft) 68%);
  padding: 0 .08em;
}
.mo-sub {
  max-width: 560px;
  margin: 0 auto;
  color: var(--ink-faint);
  font-size: 13px;
  line-height: 1.9;
}

/* ---------- 解锁条 ---------- */
.mo-lock {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 28px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}
.mo-lock-dot {
  width: 7px; height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--ink-faint);
  opacity: .6;
}
.mo-lock.is-open .mo-lock-dot {
  background: #6b8f71;
  opacity: 1;
  box-shadow: 0 0 0 3px rgba(107, 143, 113, .18);
}
.mo-lock-text { color: var(--ink-soft); font-size: 12px; }
.mo-lock.is-open .mo-lock-text { color: #5d7f63; }
:root[data-theme="dark"] .mo-lock.is-open .mo-lock-text { color: #8fc096; }

.mo-unlock {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.mo-unlock input {
  width: 150px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-soft);
  color: var(--ink);
  font-family: inherit;
  font-size: 12px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.mo-unlock input:focus {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.mo-lock > .mo-btn { margin-left: auto; }
.mo-lock-hint { color: var(--ink-faint); font-size: 10.5px; }

.mo-error {
  margin-top: 10px;
  padding: 9px 13px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  line-height: 1.7;
}

/* ---------- 按钮 ---------- */
.mo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 72%, transparent);
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: all .2s ease;
}
.mo-btn:hover {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}
.mo-btn:disabled { opacity: .55; cursor: wait; transform: none; }
.mo-btn-ghost { border-color: transparent; background: transparent; color: var(--ink-faint); }
.mo-btn-ghost:hover { background: var(--paper-soft); }
.mo-btn-primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  color: #fff;
  font-weight: 600;
  box-shadow: 0 10px 22px -14px var(--accent);
}
.mo-btn-primary:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent));
  border-color: transparent;
}

/* ---------- 心情筛选 ---------- */
.mo-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 22px 0 0;
}
.mo-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 60%, transparent);
  color: var(--ink-soft);
  font-size: 11.5px;
  text-decoration: none;
  transition: all .2s ease;
}
.mo-tab span { color: var(--m); font-size: 12px; }
.mo-tab b {
  min-width: 15px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--paper-soft);
  color: var(--ink-faint);
  font-size: 9.5px;
  font-weight: 600;
  text-align: center;
}
.mo-tab:hover { border-color: color-mix(in srgb, var(--m) 45%, var(--line)); }
.mo-tab.is-active { color: #fff; border-color: var(--accent); background: var(--accent); }
.mo-tab.is-active span { color: #fff; }
.mo-tab.is-active b { background: rgba(255, 255, 255, .2); color: #fff; }

/* ---------- 发布区 ---------- */
.mo-compose {
  margin: 20px 0 24px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}
.mo-compose textarea {
  display: block;
  width: 100%;
  min-height: 84px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-soft);
  color: var(--ink);
  font-family: 'Noto Serif SC', serif;
  font-size: 14.5px;
  line-height: 1.9;
  outline: none;
  resize: vertical;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.mo-compose textarea:focus {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.mo-mood-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.mo-mood {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-soft);
  color: var(--ink-faint);
  font-size: 11.5px;
  cursor: pointer;
  transition: all .2s ease;
}
.mo-mood input {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}
.mo-mood-glyph { color: var(--m); font-size: 12px; }
.mo-mood.is-checked,
.mo-mood:has(input:checked) {
  border-color: color-mix(in srgb, var(--m) 55%, transparent);
  background: color-mix(in srgb, var(--m) 12%, var(--paper));
  color: var(--m);
  font-weight: 600;
}

.mo-compose-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.mo-file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px dashed var(--line);
  border-radius: 999px;
  color: var(--ink-faint);
  font-size: 11.5px;
  cursor: pointer;
  transition: all .2s ease;
}
.mo-file:hover {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: var(--accent-soft);
}
.mo-file-input {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.mo-count {
  margin-left: auto;
  color: var(--ink-faint);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}
.mo-count b { color: var(--ink-soft); font-weight: 600; }

.mo-locked-hint {
  margin: 18px 0 24px;
  padding: 12px 16px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--ink-faint);
  font-size: 12px;
}

/* ---------- 说说卡片 ---------- */
.mo-feed {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.mo-post {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--m);
  border-radius: 4px 20px 20px 4px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  animation: mo-rise .4s ease both;
}
.mo-post-head {
  display: flex;
  align-items: center;
  gap: 11px;
}
.mo-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  color: #fff;
  font-family: 'Noto Serif SC', serif;
  font-size: 16px;
  font-weight: 900;
  box-shadow: var(--shadow-sm);
}
.mo-avatar.me { background: linear-gradient(135deg, var(--accent), var(--gold)); }
.mo-avatar.ai { background: linear-gradient(135deg, #8d5a83, #c25d7a); }
.mo-avatar.ai { width: 30px; height: 30px; font-size: 13px; }

.mo-post-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.mo-author {
  color: var(--ink);
  font-family: 'Noto Serif SC', serif;
  font-size: 13.5px;
  font-weight: 700;
}
.mo-time { color: var(--ink-faint); font-size: 10.5px; }

.mo-mood-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  padding: 4px 10px;
  border: 1px solid color-mix(in srgb, var(--m) 30%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--m) 10%, transparent);
  color: var(--m);
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}
.mo-mood-chip span { font-size: 11px; }

.mo-content {
  margin-top: 12px;
  color: var(--ink-soft);
  font-family: 'Noto Serif SC', serif;
  font-size: 14.5px;
  line-height: 2;
  white-space: pre-wrap;
  word-break: break-word;
  text-wrap: pretty;
}

.mo-images {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 13px;
}
.mo-images img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: zoom-in;
  transition: transform .35s ease;
}
.mo-images img:hover { transform: scale(1.02); }
.mo-images.is-single { grid-template-columns: 1fr; }
.mo-images.is-single img { aspect-ratio: 4 / 3; }

/* ---------- 小拾的回应 ---------- */
.mo-ai {
  margin-top: 16px;
  padding: 13px 15px;
  border-radius: 14px;
  background: var(--paper-soft);
  border: 1px solid var(--line-soft);
}
:root[data-theme="dark"] .mo-ai { background: #12171d; }

.mo-ai-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mo-ai-name {
  color: var(--ink);
  font-family: 'Noto Serif SC', serif;
  font-size: 12.5px;
  font-weight: 700;
}
.mo-ai-name em {
  margin-left: 4px;
  padding: 1px 5px;
  border-radius: 4px;
  background: color-mix(in srgb, #8d5a83 14%, transparent);
  color: #8d5a83;
  font-family: Inter, sans-serif;
  font-size: 8.5px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: .06em;
  vertical-align: 1px;
}
:root[data-theme="dark"] .mo-ai-name em { color: #b07ba8; background: rgba(176, 123, 168, .16); }
.mo-ai-label {
  margin-left: auto;
  color: var(--ink-faint);
  font-size: 10px;
  letter-spacing: .08em;
}

.mo-comments { margin-top: 8px; }
.mo-comment {
  padding: 6px 0;
  border-top: 1px dashed var(--line-soft);
}
.mo-comment:first-child { border-top: 0; padding-top: 0; }
.mo-comment p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.85;
  white-space: pre-wrap;
  word-break: break-word;
}
.mo-comment time {
  display: block;
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 9.5px;
}
.mo-no-comment {
  margin: 0;
  color: var(--ink-faint);
  font-size: 12px;
}

.mo-ai-btn {
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-family: inherit;
  font-size: 11.5px;
  cursor: pointer;
  transition: color .2s ease;
}
.mo-ai-btn:hover { color: var(--gold); }
.mo-ai-btn:disabled { color: var(--ink-faint); cursor: wait; }

/* ---------- 空状态 / 说明 ---------- */
.mo-empty {
  padding: 56px 20px;
  border: 1px dashed var(--line);
  border-radius: 20px;
  text-align: center;
}
.mo-empty-mark { margin: 0 0 10px; color: var(--gold); font-size: 22px; }
.mo-empty h2 {
  margin: 0 0 6px;
  color: var(--ink);
  font-family: 'Noto Serif SC', serif;
  font-size: 17px;
}
.mo-empty p { margin: 0; color: var(--ink-faint); font-size: 12.5px; }

.mo-note {
  margin: 34px 0 0;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  color: var(--ink-faint);
  font-size: 11px;
  line-height: 1.9;
}

/* ---------- 灯箱 ---------- */
.mo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vh 4vw;
  background: rgba(10, 9, 7, .9);
  cursor: zoom-out;
  animation: mo-fade .2s ease both;
}
.mo-lightbox[hidden] { display: none; }
.mo-lightbox img {
  max-width: 94vw;
  max-height: 88vh;
  border-radius: 10px;
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .9);
  cursor: default;
}

body.mo-no-scroll,
html.mo-no-scroll { overflow: hidden; }

@keyframes mo-rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
@keyframes mo-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
  .mo-head h1 { font-size: 1.85rem; }
  .mo-unlock { width: 100%; margin-left: 0; }
  .mo-unlock input { flex: 1; width: auto; }
  .mo-lock > .mo-btn { margin-left: 0; }
  .mo-lock-hint { width: 100%; }
  .mo-post { padding: 16px 15px; }
  .mo-avatar { width: 36px; height: 36px; font-size: 14px; }
  .mo-avatar.ai { width: 28px; height: 28px; font-size: 12px; }
  .mo-content { font-size: 14px; }
  .mo-mood-chip { font-size: 10px; }
  .mo-compose { padding: 15px; }
}

@media (max-width: 420px) {
  .mo-mood { padding: 5px 9px; font-size: 11px; }
  .mo-images { gap: 6px; }
  .mo-count { margin-left: 0; }
}

@media (hover: none) {
  .mo-ai-btn { color: var(--accent); }
}

@media (prefers-reduced-motion: reduce) {
  .mo-post, .mo-lightbox { animation: none; }
  .mo-images img { transition: none; }
}
