/* ═════════════════════════════════════════════════════════
   写日记模块（含 375px 底部导航等宽适配与布局切换辅助类）
   由原 style.css 按顺序拆出（P4.2），规则逐行原样搬移。层叠顺序靠 templates/layout/head.html
   中 01→10 的引用顺序保证，之后才加载 fonts.css 与 css/ui.css；新样式优先写进 css/ui.css。
   ═════════════════════════════════════════════════════════ */
/* ═════════════════════════════════════════════════════════ */
/* 📝 写日记模块专属美学与自适应样式 (Diary Aesthetics)      */
/* ═════════════════════════════════════════════════════════ */

/* 顶部全宽渐变焦点 Banner */
.diary-banner {
  background: var(--theme-banner-gradient);
  box-shadow: var(--theme-banner-shadow, var(--shadow-md));
  color: var(--c-white);
  padding: 22px 24px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  margin-bottom: 8px;
}
.diary-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.diary-banner-title {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.02em;
}
.diary-banner-sub {
  margin: 4px 0 0 0;
  font-size: 0.92rem;
  opacity: 0.92;
  font-weight: 500;
}
.diary-streak-badge {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 子 Tab 切换栏 */
.diary-subtabs-wrap {
  margin-bottom: 16px;
}
.diary-subtabs {
  display: flex;
  background: rgba(148, 163, 184, 0.12);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 6px;
}
.diary-subtabs .subtab-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
}
.diary-subtabs .subtab-btn.active {
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
}

/* 状态药丸标签 */
.diary-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
}
.diary-status-pill.unwritten {
  background: rgba(148, 163, 184, 0.18);
  color: var(--text-muted);
}
.diary-status-pill.draft {
  background: var(--amber-light);
  color: var(--amber-dark);
}
.diary-status-pill.pending {
  background: var(--primary-light);
  color: var(--primary);
}
.diary-status-pill.returned {
  background: var(--rose-light);
  color: var(--rose);
}
.diary-status-pill.approved {
  background: var(--green-light);
  color: var(--green-dark);
}
.diary-status-pill.private {
  background: var(--purple-light);
  color: var(--purple);
}

/* 退回修改警示条 */
.diary-returned-banner {
  background: var(--rose-light);
  border: 1.5px solid var(--rose);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 14px;
}
.returned-banner-header {
  font-weight: 700;
  color: var(--rose);
  font-size: 0.92rem;
  margin-bottom: 4px;
}
.returned-banner-reason {
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.5;
}

/* 今日概览卡片 */
.diary-today-overview-card {
  margin-bottom: 20px;
}
.diary-overview-body {
  padding: 8px 0 16px 0;
}
.diary-overview-meta p {
  margin: 0 0 14px 0;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.6;
}
.diary-hero-btn {
  width: 100%;
  padding: 13px 20px;
  font-size: 1.05rem;
  font-weight: 800;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: none;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.diary-hero-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.diary-hero-btn.primary {
  background: var(--primary);
  color: var(--c-white);
}
.diary-hero-btn.rose {
  background: var(--rose);
  color: var(--c-white);
}
.diary-hero-btn.secondary {
  background: var(--primary-light);
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

/* 近 7 天微足迹 */
.diary-recent-strip-wrap {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}
.diary-recent-strip-title {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 10px;
}
.diary-recent-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}
.diary-day-box {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 4px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 54px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}
.diary-day-box:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.diary-day-box .day-w {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}
.diary-day-box .day-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  margin: 3px 0;
  background: var(--text-muted);
}
.diary-day-box.approved .day-dot { background: var(--green); }
.diary-day-box.pending .day-dot { background: var(--primary); }
.diary-day-box.returned .day-dot { background: var(--rose); }
.diary-day-box.draft .day-dot { background: var(--amber); }
.diary-day-box.private_submitted .day-dot { background: var(--purple); }
.diary-day-box.unwritten .day-dot { background: rgba(148, 163, 184, 0.4); }
.diary-day-box .day-n {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
}

/* ─── 编辑器组件 ─── */
.diary-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.diary-editor-back-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  min-height: 40px;
}
.diary-editor-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
}
.diary-autosave-indicator {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--green);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.diary-autosave-indicator.visible {
  opacity: 1;
}

/* 私密日记切换行 */
.diary-private-toggle-row {
  margin-bottom: 14px;
  background: var(--purple-light);
  border: 1.5px dashed var(--purple);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}
.diary-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.diary-checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--purple);
  cursor: pointer;
}
.diary-checkbox-text {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--purple);
}

/* 小节标题 */
.diary-section-subtitle {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.diary-subtitle-hint {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
}
/* 心情 */
.diary-mood-wrap {
  margin-bottom: 14px;
}
.diary-mood-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.diary-mood-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 56px;
  min-height: 56px;
  padding: 6px 8px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}
.diary-mood-btn .diary-mood-emoji {
  font-size: 1.6rem;
  line-height: 1;
}
.diary-mood-btn .diary-mood-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}
.diary-mood-btn.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: scale(1.08);
}
.diary-mood-btn.selected .diary-mood-label {
  color: var(--primary);
}

/* 话题卡 */
.diary-topic-card {
  background: var(--c-amber-50);
  border: 2px dashed var(--c-amber-300);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 14px;
}
.diary-topic-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.diary-topic-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--c-amber-700);
  letter-spacing: 0.05em;
}
.diary-topic-dice {
  border: 1.5px solid var(--c-amber-300);
  background: var(--card-bg);
  color: var(--c-amber-700);
  font-weight: 800;
  font-size: 0.88rem;
  border-radius: var(--radius-full);
  padding: 6px 14px;
  min-height: 36px;
  cursor: pointer;
}
.diary-topic-dice.is-rolling {
  animation: diaryDiceRoll 0.45s ease;
}
@keyframes diaryDiceRoll {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(-12deg) scale(1.12); }
  100% { transform: rotate(0deg) scale(1); }
}
.diary-topic-name {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text);
}
.diary-topic-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 2px 0 10px;
  line-height: 1.5;
}
.diary-starters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.diary-starter-chip {
  border: 1.5px solid var(--primary);
  background: var(--card-bg);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.92rem;
  border-radius: var(--radius-full);
  padding: 8px 14px;
  min-height: 40px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.diary-starter-chip:hover {
  background: var(--primary-light);
}
.diary-starters-hint {
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* 标题与正文输入区 */
.diary-field-wrap {
  margin-bottom: 14px;
}
.diary-title-input {
  width: 100%;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  background: var(--card-bg);
  box-sizing: border-box;
}
.diary-title-input:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.diary-content-wrap {
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.diary-content-wrap:focus-within {
  border-color: var(--primary);
}
.diary-content-textarea {
  width: 100%;
  border: none;
  background: transparent;
  padding: 16px;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  resize: vertical;
  min-height: 220px;
  box-sizing: border-box;
  font-family: inherit;
}
.diary-content-textarea:focus {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}
.diary-content-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.diary-textarea-footer {
  padding: 8px 16px 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg);
}
.diary-word-count-info {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}
.diary-word-count-bar-track {
  flex: 1;
  height: 8px;
  background: rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.diary-word-count-bar-fill {
  height: 100%;
  background: var(--amber);
  border-radius: var(--radius-full);
  transition: width 0.25s ease, background-color 0.25s ease;
}
.diary-word-count-bar-fill.reached {
  background: var(--green);
}
.diary-word-count-bar-fill.reached-long {
  background: linear-gradient(90deg, var(--green), var(--c-amber-400));
}
.diary-word-count-bar-track {
  position: relative;
  overflow: visible;
}
.diary-bar-mark {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.85rem;
  line-height: 1;
  pointer-events: none;
}
.diary-bar-mark.is-goal { left: 50%; }
.diary-bar-mark.is-long { left: calc(100% - 6px); }

/* 星星进度提示 */
.diary-star-meter {
  margin: -6px 0 6px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--amber-light);
  color: var(--amber-dark);
  font-size: 0.9rem;
  font-weight: 700;
}
.diary-star-meter.is-max {
  background: var(--green-light);
  color: var(--c-green-800);
}
.diary-voice-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

/* 概览卡：继续写 / 补写昨天 */
.diary-overview-extra-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.diary-more-btn,
.diary-backfill-btn {
  border: 1.5px dashed var(--primary);
  background: var(--card-bg);
  color: var(--primary);
  font-weight: 800;
  font-size: 0.9rem;
  border-radius: var(--radius-full);
  padding: 8px 16px;
  min-height: 40px;
  cursor: pointer;
}
.diary-backfill-btn {
  border-color: var(--c-amber-400);
  color: var(--c-amber-700);
}

/* 近 7 天 / 月历：有心情时显示表情 */
.diary-day-box .day-mood,
.calendar-cell .cell-mood {
  font-size: 1.1rem;
  line-height: 1;
}

/* 进阶要求达成网格 */
.diary-checks-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.diary-check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}
.diary-check-item.checked {
  color: var(--green-dark);
  background: var(--green-light);
}

/* 图片缩略图网格 */
.diary-thumbnails-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 8px;
}
.diary-thumb-card {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.diary-thumb-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}
.thumb-delete-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.65);
  color: var(--c-white);
  border: none;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.diary-thumb-add-btn {
  aspect-ratio: 1;
  border: 2px dashed var(--border);
  background: var(--bg);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 70px;
}
.diary-thumb-add-btn span:first-child {
  font-size: 1.5rem;
  line-height: 1;
}
.diary-thumb-add-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* 底部 Sticky 操作条 */
.diary-sticky-bottom-bar {
  position: sticky;
  bottom: 60px;
  background: var(--card-bg);
  border-top: 1.5px solid var(--border);
  padding: 12px 16px;
  margin: 20px -16px -16px -16px;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
  z-index: 100;
}
.diary-threshold-hint-bar {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.diary-actions-row {
  display: flex;
  gap: 12px;
}
.diary-action-btn {
  flex: 1;
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 800;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}
.diary-action-btn.secondary {
  background: var(--bg);
  color: var(--text);
  border: 1.5px solid var(--border);
}
.diary-action-btn.primary {
  background: var(--primary);
  color: var(--c-white);
}
.diary-action-btn.disabled, .diary-action-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* ─── 历史视图 ─── */
.diary-history-view-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.history-view-tab {
  flex: 1;
  padding: 9px 14px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  min-height: 44px;
}
.history-view-tab.active {
  background: var(--card-bg);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.diary-month-picker-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 6px 12px;
  background: var(--card-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
.month-nav-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  min-height: 40px;
}
.month-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.current-month-label {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
}

/* 日历网格 */
.diary-calendar-card {
  padding: 16px;
  margin-bottom: 20px;
}
.diary-calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.diary-calendar-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.calendar-cell {
  aspect-ratio: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 44px;
}
.calendar-cell.empty {
  background: transparent;
  border-color: transparent;
  cursor: default;
}
.calendar-cell.future {
  opacity: 0.35;
  cursor: not-allowed;
}
.calendar-cell.today {
  border: 2px solid var(--primary);
  font-weight: 800;
}
.cell-num {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
}
.cell-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  margin-top: 3px;
  background: transparent;
}
.calendar-cell.approved .cell-dot { background: var(--green); }
.calendar-cell.pending .cell-dot { background: var(--primary); }
.calendar-cell.returned .cell-dot { background: var(--rose); }
.calendar-cell.draft .cell-dot { background: var(--amber); }
.calendar-cell.private .cell-dot { background: var(--purple); }
.calendar-cell.unwritten .cell-dot { background: rgba(148, 163, 184, 0.4); }

.diary-calendar-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}
.legend-item .dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
}
.legend-item .dot.approved { background: var(--green); }
.legend-item .dot.pending { background: var(--primary); }
.legend-item .dot.returned { background: var(--rose); }
.legend-item .dot.draft { background: var(--amber); }
.legend-item .dot.private { background: var(--purple); }
.legend-item .dot.unwritten { background: rgba(148, 163, 184, 0.4); }

/* 列表视图卡片 */
.diary-list-card {
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.diary-list-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* 详情弹窗 */
.diary-detail-modal-card {
  max-width: 680px;
  width: 92%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}
.diary-detail-modal-body {
  overflow-y: auto;
  padding: 16px;
}
.diary-detail-content-box {
  background: var(--bg);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}
.diary-detail-text {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
  white-space: pre-wrap;
}
.diary-detail-images-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.diary-detail-images-row img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: pointer;
}
.diary-private-card-notice {
  text-align: center;
  padding: 30px 16px;
  background: var(--purple-light);
  border-radius: var(--radius-md);
  color: var(--purple);
  margin-bottom: 16px;
}
.diary-private-card-notice h3 {
  margin: 10px 0 6px 0;
  font-size: 1.2rem;
  font-weight: 800;
}
.diary-private-card-notice p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* 家长评价操作面板 */
.diary-parent-review-panel {
  background: var(--card-bg);
  border: 2px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 14px;
}
.review-dimensions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 14px;
  margin-bottom: 12px;
}
.review-dimension-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}
.star-rating {
  display: flex;
  gap: 4px;
}
.star-rating .star-btn {
  font-size: 1.25rem;
  color: rgba(148, 163, 184, 0.4);
  cursor: pointer;
  transition: transform 0.1s ease;
  line-height: 1;
}
.star-rating .star-btn.active {
  color: var(--amber);
}
.star-rating .star-btn:hover {
  transform: scale(1.15);
}

.quick-phrases-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.quick-phrase-chip {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 4px 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}
.quick-phrase-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.parent-review-textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text);
  box-sizing: border-box;
  resize: vertical;
  min-height: 60px;
  margin-bottom: 12px;
  font-family: inherit;
}
.parent-review-textarea:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.parent-review-actions-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.diary-action-text-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  padding: 6px 10px;
}
.diary-action-text-btn:hover {
  color: var(--rose);
}

/* 提交庆祝层动效 */
.diary-celebration-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.25s ease;
}
.diary-celebration-box {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  max-width: 380px;
  width: 86%;
  box-shadow: var(--shadow-lg);
  animation: popIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes popIn {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.celebration-trophy {
  font-size: 3.5rem;
  margin-bottom: 8px;
  animation: bounce 0.6s ease infinite alternate;
}
@keyframes bounce {
  from { transform: translateY(0); }
  to { transform: translateY(-8px); }
}
.celebration-title {
  margin: 0 0 8px 0;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
}
.celebration-points-badge {
  display: inline-block;
  background: var(--amber-light);
  color: var(--amber-dark);
  font-size: 1.6rem;
  font-weight: 900;
  padding: 6px 20px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
  border: 2px solid var(--amber);
}
.celebration-msg {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 0 20px 0;
  line-height: 1.5;
}
.celebration-btn {
  width: 100%;
  padding: 12px 20px;
  background: var(--primary);
  color: var(--c-white);
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  min-height: 46px;
}

/* 移动端 375px 5 项导航完美等宽换行适配 */
@media (max-width: 480px) {
  .bottom-nav {
    padding: 4px 2px;
  }
  .nav-item {
    flex: 1 1 0;
    min-width: 0;
    padding: 3px 2px;
    font-size: 11px;
    gap: 1px;
    text-align: center;
  }
  .nav-item .icon {
    font-size: 1.2rem;
  }
  .nav-item span:not(.icon) {
    display: block;
    line-height: 1.1;
    word-break: break-all;
  }
  .review-dimensions-grid {
    grid-template-columns: 1fr;
  }
}

/* 布局切换辅助类：保留原有 flex/grid 属性，隐藏时生效 */
.is-hidden {
  display: none !important;
}

/* ─── 爸爸妈妈的回应（v6.83） ─── */
.diary-reply-banner {
  margin-bottom: 12px;
}
.diary-reply-banner-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--c-rose-200);
  border-radius: var(--radius-md);
  background: var(--c-rose-50);
  color: var(--text);
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.diary-reply-banner-sticker {
  font-size: 2.2rem;
  line-height: 1;
  animation: diaryStickerPop 0.6s ease 0.2s both;
}
.diary-reply-banner-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.diary-reply-banner-title {
  font-weight: 800;
  color: var(--c-rose-700);
}
.diary-reply-banner-text {
  font-size: 0.95rem;
  color: var(--text);
}
.diary-reply-banner-more {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.diary-reply-banner-go {
  flex-shrink: 0;
  font-weight: 800;
  color: var(--c-rose-600);
  white-space: nowrap;
}

.diary-reply-card {
  margin-top: 12px;
}
.diary-reply-sub {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 6px;
}
.diary-reply-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 10px 0;
}
.diary-reply-bubble {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--c-rose-50);
  border: 1.5px solid var(--c-rose-200);
}
.diary-reply-sticker {
  font-size: 2rem;
  line-height: 1;
}
.diary-reply-bubble.is-new .diary-reply-sticker {
  animation: diaryStickerPop 0.6s ease both;
}
@keyframes diaryStickerPop {
  0% { transform: scale(0.3); opacity: 0; }
  60% { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.diary-reply-main {
  flex: 1 1 auto;
  min-width: 0;
}
.diary-reply-text {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
  word-break: break-word;
}
.diary-reply-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.diary-reply-withdraw {
  border: none;
  background: none;
  color: var(--text-muted);
  text-decoration: underline;
  font: inherit;
  cursor: pointer;
  margin-left: 6px;
  padding: 0;
}
.diary-reply-stickers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 8px;
}
.diary-reply-sticker-btn {
  width: 48px;
  height: 48px;
  font-size: 1.6rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.diary-reply-sticker-btn.selected {
  border-color: var(--c-rose-300);
  background: var(--c-rose-50);
  transform: scale(1.1);
}
.diary-reply-phrases {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.diary-reply-compose {
  display: flex;
  gap: 8px;
}
.diary-reply-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 1rem;
  background: var(--card-bg);
  color: var(--text);
}
.diary-reply-input:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}
.diary-reply-send {
  flex-shrink: 0;
}
