:root {
  /* 背景色 */
  --bg-page: #fffaf7;
  --bg-card: #ffffff;
  --bg-subtle: #f5f5f5;
  --bg-input: #fff9f9;
  
  /* 文字色 */
  --text-primary: #2d2d2d;
  --text-secondary: #5a5a5a;
  --text-tertiary: #8c8c8c;
  --text-on-primary: #ffffff;
  
  /* 品牌色 */
  --brand-primary: #ff9aa2;
  --brand-accent: #ffb347;
  --brand-gradient: linear-gradient(120deg, #ff9a9e 0%, #ffc3a0 100%);
  
  /* 马卡龙色 */
  --macaron-pink: #ffb7b2;
  --macaron-green: #b5ead7;
  --macaron-orange: #ffdac1;
  
  /* 圆角系统 */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 500px;
  
  /* 间距系统 */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 12px;
  --spacing-lg: 16px;
  --spacing-xl: 24px;
  
  /* 阴影系统 */
  --shadow-xs: 0 1px 4px rgba(255, 154, 162, 0.1);
  --shadow-sm: 0 2px 8px rgba(255, 154, 162, 0.15);
  --shadow-md: 0 4px 12px rgba(255, 154, 162, 0.2);
  --shadow-lg: 0 8px 20px rgba(255, 154, 162, 0.25);
  --shadow: 0 8px 24px rgba(255, 154, 162, 0.18);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea {
  font: inherit;
}
button {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: transparent;
}
body {
  margin: 0;
  background: #f4f4f4;
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.phone-stage {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 18px;
  background: radial-gradient(1200px 500px at 50% -80px, #ffffff 0%, #f2f3f7 55%, #eceef3 100%);
}

.phone-frame {
  width: min(430px, 100vw);
  height: min(844px, 100dvh);
  border-radius: 40px;
  border: 1px solid #d8dde6;
  box-shadow: 0 20px 50px rgba(17, 24, 39, 0.18), 0 2px 6px rgba(17, 24, 39, 0.08);
  background: #fffaf7;
  position: relative;
  overflow: hidden;
}
.phone-frame::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.status-bar {
  height: 34px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #3a3a3a;
  font-size: 12px;
  position: relative;
  z-index: 3;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 250, 247, 0.75) 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}
.status-time {
  font-weight: 700;
  min-width: 42px;
}
.status-right {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 64px;
  justify-content: flex-end;
}
.dynamic-island {
  position: absolute;
  left: 50%;
  top: 7px;
  transform: translateX(-50%);
  width: 92px;
  height: 18px;
  border-radius: 999px;
  background: rgba(120, 120, 120, 0.14);
  box-shadow: inset 0 0 0 1px rgba(120, 120, 120, 0.18);
}
.battery {
  width: 22px;
  height: 10px;
  border: 1.5px solid #3a3a3a;
  border-radius: 3px;
  position: relative;
  display: inline-block;
  padding: 1px;
}
.battery::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 2.5px;
  width: 2px;
  height: 4px;
  background: #3a3a3a;
  border-radius: 0 2px 2px 0;
}
.battery-fill {
  display: block;
  width: 75%;
  height: 100%;
  background: #3a3a3a;
  border-radius: 1px;
}

.mobile-shell {
  width: 100%;
  height: calc(100% - 34px);
  background: var(--bg-page);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.screen {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}
.screen > section:last-child {
  margin-bottom: 0;
}

.tabbar {
  position: relative;
  width: 100%;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: #fff;
  border-top: 1px solid #f0f0f0;
  z-index: 20;
}
.tab {
  border: 0;
  background: transparent;
  height: 58px;
  color: #9e9e9e;
  font-size: 13px;
}
.tab.active { color: #ff9aa2; font-weight: 600; }

.card {
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.h1 { font-size: 28px; font-weight: 800; margin: 0; }
.h2 { font-size: 20px; font-weight: 700; margin: 0; }
.h3 { font-size: 16px; font-weight: 700; margin: 0; }
.body { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }
.caption { font-size: 12px; color: var(--text-tertiary); }

.btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 14px;
}
.btn-primary { background: var(--brand-gradient); color: #fff; font-weight: 700; }
.btn-secondary { background: #f4f4f4; color: var(--text-secondary); }
.btn-danger { background: #ffe3e3; color: #c33; }

.row { display: flex; align-items: center; }
.between { justify-content: space-between; }
.center { justify-content: center; }
.wrap { flex-wrap: wrap; }
.gap8 { gap: 8px; }
.gap12 { gap: 12px; }
.hidden { display: none !important; }

.header-section {
  height: 190px;
  padding: 56px 10px 0;
  position: relative;
  overflow: hidden;
}
.header-section::before {
  content: "";
  position: absolute;
  right: -70px;
  top: -80px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 183, 178, 0.65) 0%, rgba(255, 183, 178, 0) 72%);
}
.header-section::after {
  content: "";
  position: absolute;
  left: -60px;
  top: 30px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(181, 234, 215, 0.65) 0%, rgba(181, 234, 215, 0) 72%);
}
.greeting { font-size: 30px; font-weight: 900; position: relative; z-index: 1; }

.input-card {
  margin-top: -12px;
  border: 3px solid #fff;
  border-radius: 22px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(255, 154, 162, 0.26);
}
.mood-input {
  width: 100%;
  min-height: 230px;
  border: 0;
  outline: none;
  resize: none;
  font-size: 17px;
  color: var(--text-primary);
  background: transparent;
}
.card-footer {
  border-top: 2px dashed #eddfea;
  padding-top: 10px;
}
.chip {
  border-radius: 999px;
  font-size: 12px;
  padding: 5px 12px;
  font-weight: 700;
  border: 0;
}
.chip-pink { background: #fff0f5; color: #d97890; }
.chip-yellow { background: #fff2cc; color: #8d7000; }

.ai-mask, .modal-mask, .sheet-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.36);
  z-index: 40;
}
.modal-mask, .ai-mask {
  display: grid;
  place-items: center;
  padding: 14px;
}
.modal-card {
  width: 100%;
  background: #fff;
  border-radius: 20px;
  padding: 16px;
}
.modal-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.sheet-mask { display: flex; align-items: flex-end; }
.sheet-panel {
  width: 100%;
  background: #f7f7f7;
  padding: 8px 10px 14px;
}
.sheet-btn {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  margin-top: 6px;
  font-size: 16px;
}
.sheet-btn.danger { color: #d9534f; }

.search {
  height: 42px;
  border-radius: 999px;
  border: 0;
  outline: none;
  padding: 0 14px;
  font-size: 14px;
  background: #fff;
  flex: 1;
}
.round-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: linear-gradient(135deg, #ffb7b2 0%, #ffa8a1 100%);
  color: #fff;
}

.history-item {
  border-radius: 16px;
  background: #fff;
  padding: 12px;
  margin-bottom: 10px;
  box-shadow: 0 8px 22px rgba(255, 183, 178, 0.18);
}
.tag {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  background: #fff0f0;
  color: #ff9aa2;
}
.meta { font-size: 12px; color: var(--text-tertiary); }

.dim-tabs {
  display: flex;
  background: #fff;
  border-radius: 999px;
  padding: 3px;
}
.dim-tab {
  border: 0;
  background: transparent;
  flex: 1;
  height: 36px;
  border-radius: 999px;
}
.dim-tab.active {
  background: #ff9aa2;
  color: #fff;
  font-weight: 700;
}
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.stat-card {
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow);
}
.stat-num {
  font-size: 28px;
  font-weight: 800;
  margin-top: 6px;
  color: #ff9aa2;
}

.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.calendar-cell {
  background: #fff;
  border-radius: 10px;
  min-height: 44px;
  padding: 6px;
  border: 1px solid #f0f0f0;
  font-size: 12px;
}
.calendar-cell.has { background: #fff6f5; }
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff9aa2;
  margin-top: 4px;
}

.badges-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.badge-card {
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  text-align: center;
  min-height: 150px;
  box-shadow: var(--shadow);
}
.badge-card.locked { opacity: 0.55; filter: grayscale(0.4); }

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.metric {
  border-radius: 14px;
  padding: 12px;
  color: #fff;
  min-height: 86px;
}
.metric b { font-size: 24px; }
.pink { background: linear-gradient(135deg, #ffb7b2 0%, #ffa8a1 100%); }
.blue { background: linear-gradient(135deg, #a8d5ff 0%, #91c7ff 100%); }
.green { background: linear-gradient(135deg, #b8e6d5 0%, #a1dfc7 100%); }
.purple { background: linear-gradient(135deg, #d4b8ff 0%, #c5a3ff 100%); }

.menu-item {
  height: 50px;
  display: flex;
  align-items: center;
  border-top: 1px solid #f4f4f4;
  font-size: 15px;
  width: 100%;
  text-align: left;
  padding: 0;
  background: transparent;
}
.menu-item:first-child { border-top: 0; }
.menu-icon { width: 28px; margin-right: 8px; text-align: center; }
.menu-text { flex: 1; }
.menu-item span:last-child {
  color: var(--text-tertiary);
}

.profile-page {
  padding-top: 16px;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 28px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background: linear-gradient(135deg, #ffb7b2 0%, #ff9aa2 100%);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

.import-step {
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--shadow);
  margin-bottom: 10px;
}

/* --- Visual Alignment Round 2 --- */
.screen {
  background: var(--bg-page);
  padding: 0 16px 8px;
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.tab-icon {
  font-size: 15px;
  line-height: 1;
  opacity: 0.9;
}

.record-page .header-section {
  height: 210px;
  padding: 74px 10px 0;
}
.record-page .greeting {
  font-size: 32px;
  letter-spacing: -0.6px;
  text-shadow: 2px 2px 0 #fff;
}
.sub-greeting {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.66);
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  position: relative;
  z-index: 1;
}
.record-page .input-card {
  margin: -26px 6px 0;
  min-height: 360px;
  border-radius: 24px;
  border: 3px solid #fff;
  box-shadow: 0 14px 34px rgba(255, 154, 162, 0.28);
}
.record-page .mood-input {
  min-height: 250px;
  font-size: 17px;
  line-height: 1.65;
}

.history-page {
  padding-top: 16px;
}
.search-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.search-bar-main {
  flex: 1;
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.05);
  padding: 0 12px;
  height: 44px;
}
.search-icon {
  margin-right: 6px;
  opacity: 0.65;
}
.history-page .search {
  background: transparent;
  height: 100%;
  padding: 0;
}
.history-toolbar-card {
  padding: 10px;
}
.history-item {
  border-radius: 15px;
  border: 2px solid #fff;
  box-shadow: 0 10px 24px rgba(255, 183, 178, 0.17);
}
.history-item .h3 {
  font-size: 15px;
}
.history-item .body {
  font-size: 14px;
}

.history-page .search-bar-container {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 6px;
  margin-bottom: 12px;
}

.history-page .search-bar {
  flex: 1;
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 999px;
  height: 42px;
  padding: 0 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.02);
}

.history-page .search-bar .search-icon {
  margin-right: 8px;
  opacity: 0.6;
}

.history-page .search-bar .search-input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: var(--text-primary);
  height: 100%;
}

.history-page .search-bar .search-input::placeholder {
  color: #999;
}

.history-clear-btn {
  border: 0;
  background: transparent;
  font-size: 14px;
  color: var(--text-tertiary);
  padding: 4px;
  cursor: pointer;
}

.history-circle-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: linear-gradient(135deg, #ffb7b2 0%, #ffa8a1 100%);
  color: #fff;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(255, 183, 178, 0.3);
  cursor: pointer;
  flex-shrink: 0;
}

.history-circle-btn.batch-manage-btn {
  margin-right: 6px;
}

.history-circle-btn.action-menu-btn {
  font-size: 22px;
  font-weight: bold;
  letter-spacing: -2px;
}

.batch-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: linear-gradient(135deg, #fff9f0 0%, #fff5f5 100%);
  border-radius: 14px;
  margin: 0 6px 12px;
  box-shadow: 0 4px 12px rgba(255, 183, 178, 0.15);
}

.batch-toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.select-all-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 0;
  padding: 4px 0;
  cursor: pointer;
}

.checkbox-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #ddd;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #fff;
  transition: all 0.2s ease;
}

.checkbox-icon.checked {
  background: linear-gradient(135deg, #ffb7b2 0%, #ff9aa2 100%);
  border-color: #ffb7b2;
}

.select-all-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.selected-count {
  font-size: 13px;
  color: var(--text-secondary);
}

.batch-cancel-btn {
  padding: 8px 16px;
  background: #fff;
  color: var(--text-primary);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.filter-tag-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 6px 12px;
}

.filter-tag {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, #fff0e5 0%, #ffe5d9 100%);
  color: #d35400;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(211, 84, 0, 0.1);
}

.filter-tag-close {
  border: 0;
  background: transparent;
  margin-left: 6px;
  font-size: 12px;
  opacity: 0.7;
  cursor: pointer;
  color: inherit;
}

.history-list {
  padding: 0 6px;
}

.history-item {
  display: flex;
  margin-bottom: 14px;
  position: relative;
  align-items: flex-start;
}

.history-item.batch-mode {
  padding-left: 0;
}

.checkbox-wrapper {
  padding: 10px 0;
  margin-right: 10px;
  flex-shrink: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.checkbox {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #ddd;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #fff;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.checkbox.checked {
  background: linear-gradient(135deg, #ffb7b2 0%, #ff9aa2 100%);
  border-color: #ffb7b2;
  transform: scale(1.1);
}

.content-main {
  flex: 1;
  background: #fff;
  padding: 16px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(255, 183, 178, 0.15);
  transition: all 0.2s ease;
  border: 2px solid #fff;
  cursor: pointer;
}

.content-main.batch-mode-card {
  margin-left: 0;
  border: 2px solid transparent;
}

.content-main.batch-mode-card.selected {
  border-color: #ffb7b2;
  background: linear-gradient(135deg, #fff9f9 0%, #fff0f0 100%);
  box-shadow: 0 10px 30px rgba(255, 183, 178, 0.35);
  transform: scale(1.01);
}

.date-tag {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 6px;
}

.history-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mood-tag {
  font-size: 12px;
  padding: 4px 10px;
  background: #fff0f0;
  color: #ffb7b2;
  border-radius: 999px;
  font-weight: 600;
}

.text-truncate-1 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
}

.history-highlight {
  background: linear-gradient(120deg, #ffe5b4 0%, #ffdab9 100%);
  color: #d35400;
  font-weight: 700;
  padding: 1px 3px;
  border-radius: 2px;
}

.footer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px dashed #f5f5f5;
  padding-top: 10px;
  margin-top: 10px;
}

.type-icon {
  font-size: 12px;
  color: var(--text-tertiary);
}

.arrow-icon {
  color: #ffb7b2;
  font-size: 14px;
  font-weight: 800;
  opacity: 0.6;
}

.history-empty {
  text-align: center;
  padding: 40px 20px;
}

.history-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.history-empty-btn {
  margin-top: 16px;
}

.loading-state {
  text-align: center;
  padding: 20px 0;
  color: var(--text-tertiary);
}

.batch-action-bar {
  position: absolute;
  bottom: 58px;
  left: 0;
  right: 0;
  background: #fff;
  padding: 10px 16px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
}

.batch-action-info {
  flex-shrink: 0;
}

.batch-action-count {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 600;
}

.batch-action-buttons {
  display: flex;
  gap: 8px;
}

.batch-ai-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  height: 36px;
  background: linear-gradient(135deg, #b5ead7 0%, #95d1cc 100%);
  color: #fff;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  border: 0;
  box-shadow: 0 4px 16px rgba(181, 234, 215, 0.35);
  cursor: pointer;
}

.batch-ai-btn[disabled] {
  background: linear-gradient(135deg, #e0e0e0 0%, #d0d0d0 100%);
  color: #b0b0b0;
  box-shadow: none;
}

.batch-delete-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  height: 36px;
  background: linear-gradient(135deg, #ff9aa2 0%, #ffb7b2 100%);
  color: #fff;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  border: 0;
  box-shadow: 0 4px 16px rgba(255, 154, 158, 0.35);
  cursor: pointer;
}

.batch-delete-btn[disabled] {
  background: linear-gradient(135deg, #e0e0e0 0%, #d0d0d0 100%);
  color: #b0b0b0;
  box-shadow: none;
}

.emotion-picker-mask {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
}

.emotion-picker-content {
  width: 100%;
  max-height: 70vh;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 16px;
}

.picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.picker-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}

.picker-close {
  font-size: 18px;
  color: var(--text-tertiary);
  padding: 4px;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.emotion-tags-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-height: 50vh;
  overflow-y: auto;
}

.emotion-tag-item {
  padding: 8px 16px;
  background: linear-gradient(135deg, #fff0f0 0%, #ffe5e5 100%);
  color: #ffb7b2;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid #ffb7b2;
  cursor: pointer;
  transition: all 0.2s ease;
}

.emotion-tag-item:active {
  transform: scale(0.95);
  background: #ffb7b2;
  color: #fff;
}

.history-menu-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-menu-item {
  width: 100%;
  padding: 12px 16px;
  background: #f8f8f8;
  border: 0;
  border-radius: 10px;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
}

.history-menu-item:hover {
  background: #f0f0f0;
}

.stats-page {
  padding-top: 14px;
}
.dimension-tabs {
  padding: 8px 10px;
}
.dim-tabs {
  background: #fff7f6;
  border-radius: 999px;
  padding: 4px;
}
.dim-tab {
  height: 32px;
  font-size: 13px;
  color: #7f7f7f;
}
.dim-tab.active {
  background: #ff9aa2;
  color: #fff;
  box-shadow: 0 4px 10px rgba(255, 154, 162, 0.3);
}
.time-nav .caption {
  min-width: 64px;
  text-align: center;
}
.nav-btn {
  width: 34px;
  height: 30px;
  padding: 0;
  border-radius: 20px;
}
.stats-grid .stat-card:first-child {
  background: linear-gradient(135deg, #fff9f9 0%, #fff0f0 100%);
}
.stats-grid .stat-card:last-child {
  background: linear-gradient(135deg, #f4fbf9 0%, #e6faf3 100%);
}
.stat-num {
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.8);
}
.calendar-cell {
  min-height: 50px;
  border-radius: 12px;
}

.stats-ai-summary {
  margin: 10px 0 14px;
  background: linear-gradient(135deg, #fff9f0 0%, #fff5f5 100%);
  border: 1px solid rgba(255, 179, 71, 0.25);
  border-radius: 14px;
  padding: 12px;
}
.stats-ai-letter {
  margin-top: 10px;
  border-left: 3px solid #ffb347;
  background: rgba(255, 255, 255, 0.76);
  border-radius: 8px;
  padding: 8px 10px;
}
.stats-ai-generate {
  width: 100%;
  margin: 10px 0 14px;
  height: 44px;
  border-radius: 999px;
  border: 0;
  background: #fff7f2;
  color: #e88892;
  font-weight: 600;
}
.timeline-item {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}
.timeline-time {
  width: 44px;
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-secondary);
  text-align: right;
  padding-top: 6px;
}
.timeline-card {
  flex: 1;
  background: #fff;
  border-radius: 12px;
  border-left: 4px solid #ddd;
  padding: 10px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
}
.capsule-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: 52%;
}
.capsule {
  display: inline-flex;
  border: 1px solid;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 600;
}
.stats-title-cut {
  max-width: 48%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stats-content-cut {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin-top: 4px;
}
.dist-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dist-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dist-label {
  width: 58px;
  text-align: right;
  font-size: 13px;
  color: var(--text-secondary);
}
.dist-bar-bg {
  flex: 1;
  height: 12px;
  background: #f2f2f2;
  border-radius: 999px;
  overflow: hidden;
}
.dist-bar-fill {
  height: 100%;
  border-radius: inherit;
}
.dist-value {
  width: 40px;
  font-size: 12px;
  color: var(--text-tertiary);
}
.stats-day-list {
  margin-top: 8px;
}
.day-row {
  border-radius: 10px;
  overflow: hidden;
  margin-top: 8px;
  background: #fff;
}
.day-row-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: #fff8f8;
  border: 0;
  text-align: left;
}
.day-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.day-title {
  flex: 1;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.day-time {
  font-size: 11px;
  color: var(--text-tertiary);
}
.day-arrow {
  font-size: 11px;
  color: var(--text-tertiary);
  transition: transform .2s ease;
}
.day-arrow.open {
  transform: rotate(180deg);
}
.day-row-body {
  padding: 10px;
  border-top: 1px dashed #f0e9e9;
  background: #fff;
}

/* ===== Record Page 1:1 Restore from Mini Program ===== */
.record-page {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-page);
}
.record-page .header-section {
  height: 210px;
  flex-shrink: 0;
  padding: 60px 25px 0;
  position: relative;
  overflow: hidden;
  background: var(--bg-page);
}
.record-page .header-section::before {
  content: "";
  position: absolute;
  top: -75px;
  right: -50px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 183, 178, 0.6) 0%, rgba(255, 255, 255, 0) 70%);
  filter: blur(20px);
}
.record-page .header-section::after {
  content: "";
  position: absolute;
  top: 40px;
  left: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(181, 234, 215, 0.6) 0%, rgba(255, 255, 255, 0) 70%);
  filter: blur(20px);
}
.greeting-group {
  position: relative;
  z-index: 2;
}
.record-page .greeting {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -1px;
  text-shadow: 2px 2px 0 #fff;
  color: var(--text-primary);
}
.decoration-circle {
  position: absolute;
  right: 30px;
  bottom: 50px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 218, 193, 0.4);
  filter: blur(10px);
}

.record-page .input-card {
  height: 300px;
  margin: -30px 24px 24px;
  padding: 24px;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 15px 30px -5px rgba(255, 154, 162, 0.3);
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 10;
  border: 3px solid #fff;
}
.record-page .mood-input {
  width: 100%;
  flex: 1;
  font-size: 17px;
  line-height: 1.6;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: var(--text-primary);
}
.record-page .mood-input::placeholder {
  color: #afafaf;
  font-weight: 400;
}
.record-page .card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 2px dashed #c7ceea;
  flex-shrink: 0;
}
.polish-btn {
  font-size: 13px;
  color: #e88892;
  background: #fff0f5;
  border: 0;
  border-radius: 15px;
  padding: 4px 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
}
.polish-btn.loading {
  opacity: 0.7;
}
.word-count {
  font-size: 12px;
  background: #fff2cc;
  color: #8d7000;
  border-radius: 999px;
  padding: 3px 10px;
  font-weight: 700;
}

.action-area {
  flex-shrink: 0;
  padding: 0 25px;
  z-index: 11;
}
.submit-btn {
  width: 100%;
  height: 55px;
  font-size: 18px;
  letter-spacing: 2px;
  background: linear-gradient(120deg, #ff9a9e 0%, #ffc3a0 100%);
  border-radius: 28px;
  border: 0;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 5px 15px rgba(255, 154, 158, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s ease;
}
.submit-btn:active {
  transform: scale(0.98);
  box-shadow: 0 3px 8px rgba(255, 154, 158, 0.3);
}
.submit-btn[disabled] {
  background: #f0f0f0;
  color: #c5c5c5;
  box-shadow: none;
  cursor: not-allowed;
}
.btn-content, .btn-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.btn-icon {
  font-size: 18px;
  margin-right: 4px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.loading-dots {
  display: flex;
  gap: 4px;
  margin-right: 8px;
}
.loading-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: dotPulse 1.4s ease-in-out infinite;
}
.loading-dots .dot:nth-child(1) { animation-delay: 0s; }
.loading-dots .dot:nth-child(2) { animation-delay: 0.2s; }
.loading-dots .dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotPulse {
  0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
  40% { transform: scale(1.2); opacity: 1; }
}

.success-anim-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
@keyframes planeFlyAway {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(100px, -200px) rotate(45deg) scale(0.3);
    opacity: 0;
  }
}
@keyframes heartFloat {
  0% {
    transform: translateY(0) scale(0);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) scale(1.5);
    opacity: 0;
  }
}
.paper-plane {
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: 40px;
  animation: planeFlyAway 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}
.love-heart {
  position: absolute;
  top: 60%;
  left: 50%;
  font-size: 30px;
  animation: heartFloat 1.5s ease-out forwards;
  animation-delay: 0.3s;
}

.ai-modal-mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}
.ai-modal-card {
  width: 300px;
  background: #fff;
  border-radius: 24px;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
  position: relative;
  overflow: hidden;
  animation: bounceIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ai-modal-card::before {
  content: '';
  position: absolute;
  top: -50px;
  left: 0;
  width: 100%;
  height: 100px;
  background: linear-gradient(180deg, rgba(255, 240, 240, 0.8) 0%, rgba(255, 255, 255, 0) 100%);
  z-index: 0;
}
.ai-icon {
  font-size: 48px;
  margin-bottom: 12px;
  animation: float 3s ease-in-out infinite;
  position: relative;
  z-index: 1;
}
.ai-modal-card .h2 {
  text-align: center;
  font-size: 18px;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}
.tags-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  margin: 8px 0 12px;
  position: relative;
  z-index: 1;
}
.tag.primary {
  background: #fff0f0;
  color: #ff9aa2;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
}
.ai-comment-box {
  background: #fff9f0;
  padding: 16px;
  border-radius: 16px;
  width: 100%;
  text-align: center;
  position: relative;
  margin-top: 12px;
  border: none;
  z-index: 1;
}
.ai-comment-box::after {
  content: '"';
  position: absolute;
  top: -10px;
  left: 20px;
  font-size: 50px;
  color: #ffd1a9;
  opacity: 0.4;
  font-family: serif;
  line-height: 1;
}
.polish-content-box {
  background: #fff9f0;
  padding: 16px;
  border-radius: 12px;
  width: 100%;
  text-align: left;
  margin: 10px 0 20px;
  max-height: 200px;
  overflow-y: auto;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
}
.modal-actions {
  display: flex;
  gap: 15px;
  width: 100%;
}
.modal-actions .btn-secondary {
  flex: 1;
  height: 45px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  color: var(--text-secondary);
  font-size: 16px;
  font-weight: 600;
  border: none;
}
.modal-actions .btn-primary {
  flex: 1;
  height: 45px;
  font-size: 16px;
}
.ai-confirm-btn {
  margin-top: 16px;
  width: 100%;
  height: 45px;
  border-radius: 22px;
  background: linear-gradient(120deg, #ff9a9e 0%, #ffc3a0 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  border: 0;
  box-shadow: 0 5px 15px rgba(255, 154, 158, 0.3);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(50px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes bounceIn {
  0% { opacity: 0; transform: scale(0.8); }
  60% { opacity: 1; transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.mini-toast {
  position: absolute;
  left: 50%;
  top: 22px;
  transform: translateX(-50%);
  z-index: 1005;
  background: rgba(45, 45, 45, 0.88);
  color: #fff;
  font-size: 13px;
  border-radius: 999px;
  padding: 7px 14px;
}

.mobile-shell {
  min-height: 0;
}

.screen {
  min-height: 0;
  padding: 0 16px calc(18px + env(safe-area-inset-bottom, 0px));
  overscroll-behavior: contain;
}

.tabbar {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.stats-page {
  padding-top: 14px;
  padding-bottom: 12px;
}

/* 维度切换 Tabs */
.dimension-tabs {
  display: flex;
  background: var(--bg-card);
  border-radius: var(--radius-pill);
  padding: 4px;
  box-shadow: var(--shadow-sm);
  margin: 0 0 14px 0;
}

.dim-tabs {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.dim-tab {
  height: 38px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  transition: all 0.3s ease;
  color: var(--text-secondary);
}

.dim-tab.active {
  background: var(--brand-primary);
  color: var(--text-on-primary);
  box-shadow: var(--shadow-sm);
}

/* 时间导航栏 */
.time-navigator {
  background: transparent;
  padding: 0 10px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-btn {
  font-size: 16px;
  color: var(--text-secondary);
  padding: 5px 15px;
  min-width: 40px;
  text-align: center;
  border: none;
  background: transparent;
  cursor: pointer;
}

.nav-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 130px;
  text-align: center;
}

/* 统计卡片组 */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.stat-card {
  background: var(--bg-card);
  padding: 15px 10px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.8);
  position: relative;
  overflow: hidden;
  min-height: 106px;
}

/* 装饰背景圆 */
.stat-card::before {
  content: '';
  position: absolute;
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  top: -20px;
  right: -20px;
}

/* 不同的卡片给点不同的背景色 */
.stats-grid .stat-card:nth-child(1) {
  background: linear-gradient(135deg, #fff9f9 0%, #fff0f0 100%);
}

.stats-grid .stat-card:nth-child(2) {
  background: linear-gradient(135deg, #f4fbf9 0%, #e6faf3 100%);
}

.stat-value {
  font-size: 30px;
  font-weight: 800;
  color: var(--brand-primary);
  line-height: 1.15;
  margin-bottom: var(--spacing-sm);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.05);
}

.stat-value.highlight {
  color: var(--brand-accent);
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.7);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

/* 通用图表容器 */
.chart-section {
  background: var(--bg-card);
  padding: 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
  border: 1px solid rgba(0, 0, 0, 0.01);
}

.section-header {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}

/* 周视图情绪分布 */
.distribution-chart {
  padding: 5px 0;
}

.dist-row {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.dist-label {
  font-size: 13px;
  color: var(--text-primary);
  width: 40px;
  text-align: right;
  margin-right: 10px;
}

.dist-bar-bg {
  flex: 1;
  height: 10px;
  background: var(--bg-subtle);
  border-radius: 5px;
  overflow: hidden;
  margin-right: 10px;
}

.dist-bar-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.6s ease-out;
}

.dist-value {
  font-size: 12px;
  color: var(--text-secondary);
  width: 30px;
}

/* 日视图时间轴 */
.day-timeline {
  padding: 10px 0;
  position: relative;
}

/* 贯穿的时间轴线 */
.day-timeline::before {
  content: '';
  position: absolute;
  top: 15px;
  bottom: 15px;
  left: 25px; /* 对应 time-column 的中心 */
  width: 1px;
  background: var(--bg-subtle);
  z-index: 0;
}

.timeline-item {
  display: flex;
  margin-bottom: 15px;
  position: relative;
  z-index: 1;
}

.time-column {
  width: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-right: 10px;
  flex-shrink: 0;
}

.time-text {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 5px;
  background: var(--bg-page); /* 遮挡线条 */
  padding: 2px 0;
  z-index: 2;
}

.timeline-line {
  display: none;
}

.tags-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
  max-width: 50%;
}

/* 胶囊标签样式 */
.tag-capsule {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  margin-left: 3px;
}

/* 时间轴内容列 */
.timeline-item .content-column {
  flex: 1;
  padding: 12px;
  border-left: 4px solid;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

/* AI Summary Card */
.ai-summary-card {
  background: linear-gradient(135deg, #fff9f0 0%, #fff5f5 100%);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 2px solid rgba(255, 179, 71, 0.2);
  box-shadow: var(--shadow-sm);
  margin-bottom: 15px;
}

.ai-summary-header {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.ai-summary-header .ai-icon {
  font-size: 22px;
  margin-right: 6px;
}

.ai-summary-card .body {
  line-height: 1.8;
  color: var(--text-primary);
  letter-spacing: 0.25px;
}

.ai-letter-box {
  background: rgba(255, 255, 255, 0.7);
  padding: 16px;
  border-radius: var(--radius-md);
  border-left: 6px solid var(--brand-accent);
  margin-top: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.ai-letter-box .body {
  line-height: 1.9;
  color: var(--text-primary);
  letter-spacing: 0.25px;
  display: block;
  margin-top: 6px;
}

.ai-summary-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
  color: var(--brand-primary);
  cursor: pointer;
  margin-bottom: 15px;
}

.ai-summary-placeholder:active {
  opacity: 0.7;
}

/* 月历样式 */
.calendar-section {
  padding-bottom: 15px;
}

.calendar-weeks {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 10px;
  text-align: center;
}

.week-day {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  row-gap: 12px;
}

.calendar-cell {
  height: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  cursor: pointer;
}

.calendar-cell.empty {
  background: transparent;
}

.calendar-cell.selected {
  background: var(--bg-subtle);
  transform: scale(0.95);
}

.date-num {
  font-size: 13px;
  color: var(--text-primary);
  z-index: 2;
  font-weight: 500;
}

.mood-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.day-summary {
  margin-top: 15px;
  animation: fadeIn 0.3s ease;
}

.summary-divider {
  height: 1px;
  background: var(--bg-subtle);
  margin-bottom: 10px;
}

.summary-content {
  display: flex;
  align-items: flex-start;
  padding: 10px;
  background: var(--bg-page);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.summary-mood-tag {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  margin-right: 10px;
  flex-shrink: 0;
}

.summary-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* 文本截断辅助类 */
.text-truncate-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 列表项交互样式 */
.clickable {
  transition: background-color 0.2s ease;
  border-radius: var(--radius-sm);
}

.clickable:active {
  background: var(--bg-subtle);
}

.clickable.expanded {
  background: var(--bg-subtle);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.arrow-icon.rotate {
  transform: rotate(180deg);
}

/* 详情面板样式 */
.record-detail-panel {
  background: var(--bg-page); /* 稍微深一点的背景，区分层级 */
  padding: 12px 15px;
  border-bottom-left-radius: var(--radius-sm);
  border-bottom-right-radius: var(--radius-sm);
  animation: slideDown 0.3s ease-out;
  border-top: 1px dashed var(--bg-subtle);
}

.detail-content {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
}

.ai-comment-bubble {
  background: #fffbe6;
  padding: var(--spacing-sm);
  border-radius: var(--radius-sm);
  border: 2px dashed var(--brand-accent);
  position: relative;
  margin-top: 8px;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 周视图样式 */
.week-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.week-day {
  border-radius: 14px;
  padding: 10px 6px;
  text-align: center;
  background: #f9f3f2;
  border: 1px solid transparent;
}

.week-day.has-data {
  background: linear-gradient(180deg, #fff8f7 0%, #fff1ef 100%);
  border-color: rgba(255, 154, 162, 0.24);
}

.week-day-label {
  font-size: 11px;
  color: var(--text-tertiary);
}

.week-day-count {
  margin-top: 6px;
  font-size: 18px;
  font-weight: 800;
  color: #e88892;
}

.week-day-score {
  margin-top: 4px;
  font-size: 10px;
  color: var(--text-secondary);
}

/* AI 评论迷你样式 */
.ai-comment-mini {
  font-size: 13px;
  color: #d35400;
  background: #fffbe6;
  padding: var(--spacing-sm) 8px;
  border-radius: var(--radius-xs);
  line-height: 1.5;
}

/* 记录项包裹器 */
.record-item-wrapper {
  margin-bottom: 8px;
}

.timeline-item {
  gap: 12px;
  margin-bottom: 14px;
}

.timeline-time {
  width: 52px;
  padding-top: 8px;
}

.timeline-card {
  padding: 12px;
  border-radius: 14px;
}

.capsule-wrap {
  max-width: 46%;
}

.stats-title-cut {
  max-width: 52%;
}

.calendar {
  gap: 8px;
}

.calendar-cell {
  min-height: 62px;
  padding: 8px;
  border-radius: 14px;
}

.badges-page {
  padding-top: 14px;
}

.badges-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 16px;
  margin-bottom: 16px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  position: relative;
  overflow: hidden;
}

.badges-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: linear-gradient(120deg, #ff9a9e 0%, #ffc3a0 100%);
}

.badges-header-main {
  flex: 1;
  min-width: 0;
}

.badges-subtitle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.badges-progress {
  width: 74px;
  height: 8px;
  border-radius: 999px;
  background: #f0f0f0;
  overflow: hidden;
  flex-shrink: 0;
}

.badges-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: #b5ead7;
  transition: width .35s ease;
}

.badges-header-icon {
  font-size: 40px;
  opacity: 0.85;
  transform: rotate(14deg);
  margin-left: 12px;
}

.badges-gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 0 4px 8px;
}

.badge-card-wrapper {
  width: calc(50% - 6px);
  margin-bottom: 14px;
  padding: 0;
  background: transparent;
  text-align: left;
}

.badge-card-inner {
  min-height: 164px;
  border-radius: 20px;
  padding: 18px 14px 16px;
  background: #fff;
  border: 2px solid #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.badge-card-wrapper.earned .badge-card-inner {
  background: linear-gradient(180deg, #fff 0%, #fff8f8 100%);
  border-color: rgba(255, 154, 162, 0.7);
  box-shadow: 0 14px 26px rgba(255, 154, 162, 0.16);
}

.badge-card-wrapper.earned:active .badge-card-inner {
  transform: scale(0.97);
}

.badge-card-wrapper.locked .badge-card-inner {
  background: #f9f9f9;
  border-color: #ececec;
  box-shadow: none;
}

.badge-icon-container {
  width: 76px;
  height: 76px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.badge-card-wrapper.earned .badge-icon-container {
  background: #fff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
}

.badge-card-wrapper.locked .badge-icon-container {
  background: #f1f1f1;
}

.badge-icon {
  font-size: 38px;
  line-height: 1;
  position: relative;
  z-index: 2;
}

.badge-card-wrapper.locked .badge-icon {
  filter: grayscale(1);
  opacity: 0.55;
}

.badge-shine {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.82) 0%, rgba(255,255,255,0) 70%);
  animation: badgePulse 3s infinite;
}

.badge-info {
  text-align: center;
}

.badge-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
}

.badge-card-wrapper.locked .badge-name {
  color: var(--text-tertiary);
}

.badge-desc-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  min-height: 24px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f5f5f5;
  color: var(--text-tertiary);
  font-size: 12px;
}

.badge-card-wrapper.earned .badge-desc-mini {
  background: #fff0f5;
  color: #d97890;
}

@keyframes badgePulse {
  0% { transform: scale(0.82); opacity: 0.45; }
  50% { transform: scale(1.15); opacity: 0; }
  100% { transform: scale(0.82); opacity: 0; }
}

@media (max-width: 600px) {
  .phone-stage {
    padding: 0;
    background: transparent;
  }
  .phone-frame {
    width: 100vw;
    height: 100dvh;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .phone-frame::before,
  .dynamic-island {
    display: none;
  }
}
