:root {
  --bg: #fff5f9;
  --bg-deep: #fce7f3;
  --card: rgba(255, 255, 255, 0.82);
  --card-solid: #ffffff;
  --text: #4c0519;
  --text-soft: #831843;
  --muted: #9d174d;
  --muted-light: #be185d;
  --primary: #db2777;
  --primary-light: #f472b6;
  --primary-dark: #be185d;
  --accent: #ec4899;
  --in: #be185d;
  --in-bg: linear-gradient(145deg, #fce7f3 0%, #fbcfe8 100%);
  --out: #9d174d;
  --out-bg: linear-gradient(145deg, #fdf2f8 0%, #f9a8d4 100%);
  --danger: #e11d48;
  --success: #be185d;
  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 8px 32px rgba(190, 24, 93, 0.12);
  --shadow-lg: 0 16px 48px rgba(190, 24, 93, 0.18);
  --border: rgba(244, 114, 182, 0.35);
  --glass-blur: blur(16px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: linear-gradient(165deg, #fff1f2 0%, var(--bg) 35%, #fce7f3 100%);
  color: var(--text);
  min-height: 100dvh;
  padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom);
  position: relative;
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

.bg-glow-a {
  width: 280px;
  height: 280px;
  background: rgba(244, 114, 182, 0.45);
  top: -80px;
  right: -60px;
}

.bg-glow-b {
  width: 220px;
  height: 220px;
  background: rgba(251, 207, 232, 0.7);
  bottom: 10%;
  left: -50px;
}

.app {
  position: relative;
  z-index: 1;
  max-width: 420px;
  margin: 0 auto;
  padding: 16px 0 32px;
}

/* —— 首页目录 —— */
.page-home {
  padding-top: 28px;
  padding-bottom: 0;
}

.home-app {
  padding-top: 8px;
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.home-sheets {
  flex: 1;
  position: relative;
}

.home-sheet {
  display: none;
}

.home-sheet.active {
  display: block;
}

.home-tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  padding: 8px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  gap: 12px;
  background: rgba(255, 251, 253, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 24px rgba(236, 72, 153, 0.08);
}

.home-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted-light);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.home-tab-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.home-tab.active {
  color: var(--primary-dark);
  background: linear-gradient(145deg, #fce7f3, #fdf2f8);
}

.profile-header {
  text-align: center;
  margin-bottom: 24px;
  padding-top: 8px;
}

.profile-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-soft);
}

.profile-sub {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--muted-light);
  line-height: 1.5;
  padding: 0 12px;
}

.profile-card {
  text-align: center;
  padding-top: 20px;
}

.profile-avatar-btn {
  display: block;
  width: 112px;
  height: 112px;
  margin: 0 auto 8px;
  padding: 0;
  border: 3px solid #fbcfe8;
  border-radius: 50%;
  background: linear-gradient(145deg, #fdf2f8, #fce7f3);
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 2.5rem;
  color: var(--primary-light);
  font-weight: 300;
}

.profile-avatar-hint {
  font-size: 0.82rem;
  color: var(--muted-light);
  margin-bottom: 20px;
}

.profile-toast {
  margin-top: 12px;
  min-height: 1.2em;
  font-size: 0.85rem;
  color: #e11d48;
}

.profile-toast.success {
  color: #059669;
  font-weight: 600;
}

.profile-card .label {
  text-align: left;
}

.profile-card .input {
  margin-bottom: 16px;
}

.user-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.user-badge-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #fbcfe8;
}

.user-badge-link {
  color: var(--primary-dark);
  font-weight: 700;
  text-decoration: underline;
}

.home-header {
  text-align: center;
  margin-bottom: 40px;
  padding: 12px 8px 0;
}

.home-quote {
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.65;
  color: var(--text-soft);
  letter-spacing: 0.03em;
  min-height: 2.8em;
}

.user-badge {
  text-align: center;
  font-size: 0.82rem;
  color: var(--primary-dark);
  font-weight: 600;
  margin: -4px auto 12px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  border: 1px solid var(--border);
  max-width: 100%;
}

.user-badge-warn {
  color: #e11d48;
  background: #fff1f2;
  border-color: #fecdd3;
}

.record-author {
  font-weight: 700;
  color: var(--primary-dark);
  font-size: 0.88rem;
  flex-shrink: 0;
}

.menu-list {
  list-style: none;
}

.menu-list-spaced li + li {
  margin-top: 18px;
}

.menu-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 18px;
  background: var(--card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
}

.menu-card:active {
  transform: scale(0.98);
  box-shadow: var(--shadow-lg);
}

.menu-card-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  background: linear-gradient(145deg, #fce7f3, #f9a8d4);
  border-radius: 16px;
  flex-shrink: 0;
}

.menu-card-body {
  flex: 1;
  min-width: 0;
}

.menu-card-title {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-soft);
}

.menu-card-desc {
  display: block;
  font-size: 0.82rem;
  color: var(--muted-light);
  margin-top: 4px;
}

.menu-card-arrow {
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--primary-light);
  flex-shrink: 0;
}

.home-footer {
  text-align: center;
  margin-top: 40px;
}

.home-footer p {
  font-size: 0.85rem;
  color: var(--muted-light);
}

/* —— 英语打卡页 —— */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 4px 0;
}

.nav-back {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 8px 4px;
}

.nav-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted-light);
}

.nav-spacer {
  width: 48px;
}

.header {
  text-align: center;
  margin-bottom: 20px;
}

.header h1 {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text-soft);
  letter-spacing: 0.02em;
}

.date {
  margin-top: 6px;
  color: var(--muted-light);
  font-size: 0.9rem;
}

.card {
  background: var(--card-solid);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.glass-card {
  background: var(--card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
  margin-top: 14px;
  letter-spacing: 0.04em;
}

.label:first-child {
  margin-top: 0;
}

.input {
  width: 100%;
  font-size: 1rem;
  padding: 14px 16px;
  border: 1.5px solid #fbcfe8;
  border-radius: var(--radius-sm);
  outline: none;
  background: #fffafb;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(244, 114, 182, 0.25);
}

.status-hint {
  margin-top: 14px;
  font-size: 0.88rem;
  color: var(--muted-light);
  min-height: 1.4em;
}

.status-hint.active {
  color: var(--primary-dark);
  font-weight: 500;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

.btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 92px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
  touch-action: manipulation;
  box-shadow: 0 4px 16px rgba(190, 24, 93, 0.1);
}

.btn:active:not(:disabled) {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-in {
  background: var(--in-bg);
  color: var(--in);
  border: 1px solid rgba(244, 114, 182, 0.4);
}

.btn-out {
  background: var(--out-bg);
  color: var(--out);
  border: 1px solid rgba(249, 168, 212, 0.6);
}

.btn-icon {
  font-size: 1.4rem;
}

.toast {
  margin-top: 14px;
  text-align: center;
  font-size: 0.88rem;
  min-height: 1.2em;
  color: var(--danger);
}

.toast.success {
  color: var(--success);
}

.photo-box {
  margin-top: 4px;
}

.photo-btn {
  width: 100%;
  min-height: 130px;
  border: 2px dashed #f9a8d4;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #fffafb 0%, #fdf2f8 100%);
  color: var(--primary-dark);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: border-color 0.2s, background 0.2s;
}

.photo-btn-icon {
  font-size: 1.8rem;
}

.photo-preview {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  margin-top: 12px;
  background: #fdf2f8;
  border: 1px solid var(--border);
}

.hidden {
  display: none !important;
}

.footer-hint {
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted-light);
}

.btn-submit {
  width: 100%;
  margin-top: 16px;
  padding: 15px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(219, 39, 119, 0.35);
}

.btn-submit:active {
  transform: scale(0.98);
}

/* —— 管理页 —— */
.admin-body {
  background: linear-gradient(165deg, #fff1f2 0%, var(--bg) 40%, #fce7f3 100%);
}

.admin-app {
  max-width: 520px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 12px;
}

.filter-row .label {
  width: 100%;
  margin-top: 0;
}

.filter-row .input {
  flex: 1;
  min-width: 140px;
}

.link-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 0.9rem;
  padding: 8px;
  cursor: pointer;
  font-weight: 600;
}

.admin-list {
  list-style: none;
}

.admin-item {
  padding: 16px 0;
  border-bottom: 1px solid #fce7f3;
}

.admin-item:last-child {
  border-bottom: none;
}

.admin-item-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.badge {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
}

.badge-in {
  background: #fce7f3;
  color: var(--in);
}

.badge-out {
  background: #fdf2f8;
  color: var(--out);
}

.record-time {
  font-size: 0.85rem;
  color: var(--muted-light);
}

.record-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 8px;
  word-break: break-word;
}

.empty {
  text-align: center;
  color: var(--muted-light);
  padding: 24px 0;
}

.empty-sub {
  display: block;
  margin-top: 8px;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted);
}

.admin-thumb {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: #fdf2f8;
  cursor: pointer;
  border: 1px solid var(--border);
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(76, 5, 25, 0.94);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 12px;
  right: 16px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

.lightbox-caption {
  position: absolute;
  bottom: 24px;
  left: 16px;
  right: 16px;
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
}

/* —— 相册 —— */
.page-album .album-app {
  padding-bottom: 24px;
}

.nav-action {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(219, 39, 119, 0.35);
}

.sheet-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 14px;
  border: 1px solid var(--border);
}

.sheet-tab {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--muted-light);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.sheet-tab.active {
  background: #fff;
  color: var(--primary-dark);
  box-shadow: 0 2px 8px rgba(190, 24, 93, 0.12);
}

.sheet-panel {
  display: none;
}

.sheet-panel.active {
  display: block;
}

.volume-list {
  list-style: none;
}

.volume-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  margin-bottom: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.volume-card:active {
  transform: scale(0.99);
}

.volume-cover {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  overflow: hidden;
  background: #fdf2f8;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.volume-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.volume-placeholder {
  font-size: 1.5rem;
}

.volume-info {
  flex: 1;
  min-width: 0;
}

.volume-name {
  display: block;
  font-weight: 700;
  color: var(--text-soft);
}

.volume-count {
  display: block;
  font-size: 0.82rem;
  color: var(--muted-light);
  margin-top: 2px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.grid-item {
  margin: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  cursor: pointer;
}

.grid-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.grid-item figcaption {
  padding: 8px;
  font-size: 0.72rem;
}

.grid-vol {
  display: block;
  font-weight: 600;
  color: var(--text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.grid-time {
  color: var(--muted-light);
}

.sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: linear-gradient(165deg, #fff1f2 0%, var(--bg) 40%, #fce7f3 100%);
  overflow-y: auto;
  padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom);
}

.sheet-panel-inner {
  max-width: 420px;
  margin: 0 auto;
  padding: 8px 0 32px;
}

.sheet-detail-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.sheet-detail-header h2 {
  flex: 1;
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-soft);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(76, 5, 25, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  width: 100%;
  max-width: 420px;
  max-height: 90dvh;
  overflow-y: auto;
  background: #fff;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 20px;
  border: 1px solid var(--border);
}

.modal-title {
  font-size: 1.15rem;
  color: var(--text-soft);
}

.modal-hint {
  font-size: 0.85rem;
  color: var(--muted-light);
  margin: 6px 0 12px;
}

.volume-pick-list {
  list-style: none;
  max-height: 160px;
  overflow-y: auto;
  margin-bottom: 8px;
}

.volume-pick {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  margin-bottom: 6px;
  border: 1.5px solid #fbcfe8;
  border-radius: 12px;
  background: #fffafb;
  font-size: 0.95rem;
  cursor: pointer;
  color: var(--text);
}

.volume-pick.selected {
  border-color: var(--primary);
  background: #fdf2f8;
  color: var(--primary-dark);
  font-weight: 600;
}

.pick-empty {
  padding: 12px 0;
  font-size: 0.85rem;
}

.selected-volume {
  margin: 12px 0;
  font-size: 0.88rem;
  color: var(--muted-light);
}

.selected-volume.active {
  color: var(--primary-dark);
  font-weight: 600;
}

.inline-row {
  display: flex;
  gap: 8px;
}

.inline-row .input {
  flex: 1;
}

.btn-mini {
  flex-shrink: 0;
  padding: 0 16px;
  border: none;
  border-radius: 12px;
  background: var(--primary-light);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.photo-btn-sm {
  min-height: 88px;
}

.pick-count {
  margin-top: 10px;
  font-size: 0.88rem;
  color: var(--primary-dark);
  font-weight: 600;
  text-align: center;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 12px;
  max-height: 200px;
  overflow-y: auto;
}

.preview-thumb {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.btn-ghost {
  flex: 1;
  padding: 14px;
  border: 1.5px solid #fbcfe8;
  border-radius: 12px;
  background: #fff;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
}

.btn-submit-inline {
  flex: 1;
  margin-top: 0;
}

.btn-checkin-single {
  width: 100%;
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
}

.btn-checkin-single .btn-icon {
  font-size: 1.2rem;
}

.menu-directory {
  margin-bottom: 24px;
}

/* —— 比大小 —— */
.compare-card {
  text-align: center;
  padding: 28px 20px;
}

.compare-rule {
  font-size: 1rem;
  color: var(--text-soft);
  font-weight: 600;
}

.compare-rule-sub {
  font-size: 0.85rem;
  color: var(--muted-light);
  margin-top: 6px;
}

.compare-number-wrap {
  margin: 28px 0 16px;
}

.compare-number {
  display: inline-block;
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--primary-dark), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: transform 0.35s ease;
}

.compare-number.revealed {
  animation: pop-in 0.45s ease;
}

@keyframes pop-in {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  70% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.compare-hint {
  min-height: 1.4em;
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.records-card {
  margin-top: 8px;
}

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

.list-header h2 {
  font-size: 1.05rem;
  color: var(--text-soft);
}

.checkin-records {
  list-style: none;
  max-height: none;
}

.checkin-record-item {
  padding: 14px 0;
  border-bottom: 1px solid #fce7f3;
}

.checkin-record-item:last-child {
  border-bottom: none;
}

.checkin-record-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.checkin-record-head .record-time {
  flex: 1;
}

.btn-delete {
  flex-shrink: 0;
  padding: 4px 12px;
  border: 1px solid #fecdd3;
  border-radius: 999px;
  background: #fff1f2;
  color: #e11d48;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-delete:active {
  opacity: 0.75;
}

.btn-delete:disabled {
  opacity: 0.45;
}

.checkin-record-img {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: #fdf2f8;
  border: 1px solid var(--border);
  cursor: pointer;
}

/* —— 心里话 —— */
.heart-compose {
  margin-bottom: 16px;
}

.heart-textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.55;
  font-family: inherit;
}

.char-count {
  text-align: right;
  font-size: 0.78rem;
  color: var(--muted-light);
  margin-top: 4px;
}

.heart-list-card {
  padding-bottom: 12px;
}

.heart-list {
  list-style: none;
}

.heart-item {
  padding: 14px 0;
  border-bottom: 1px solid #fce7f3;
}

.heart-item:last-child {
  border-bottom: none;
}

.heart-item-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.heart-author {
  font-weight: 700;
  color: var(--primary-dark);
  font-size: 0.9rem;
}

.heart-item-head .record-time {
  flex: 1;
  font-size: 0.78rem;
}

.heart-content {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-soft);
  white-space: pre-wrap;
  word-break: break-word;
  padding: 12px 14px;
  background: linear-gradient(145deg, #fdf2f8, #fffafb);
  border-radius: var(--radius-sm);
  border: 1px solid #fbcfe8;
}

.heart-comments {
  list-style: none;
  margin-top: 12px;
  padding-left: 12px;
  border-left: 2px solid #fbcfe8;
}

.heart-comment {
  padding: 10px 0;
}

.heart-comment:not(:last-child) {
  border-bottom: 1px dashed #fce7f3;
}

.heart-comment-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.heart-comment-head .record-time {
  flex: 1;
  font-size: 0.72rem;
}

.heart-comment-text {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-soft);
  white-space: pre-wrap;
  word-break: break-word;
}

.btn-delete-sm {
  padding: 2px 8px;
  font-size: 0.68rem;
}

.heart-reply-box {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.heart-reply-input {
  min-height: 64px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
}

.btn-send-reply {
  align-self: flex-end;
  padding: 8px 16px;
  font-size: 0.85rem;
}

.heart-item-head .btn-reply {
  padding: 4px 8px;
  font-size: 0.82rem;
}

/* —— 记账 —— */
.page-ledger .ledger-month-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.btn-month {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fffafb;
  color: var(--primary-dark);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.input-month {
  flex: 1;
  text-align: center;
  font-weight: 600;
  min-height: 40px;
}

.ledger-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.ledger-sum-item {
  padding: 14px 10px;
  border-radius: var(--radius);
  text-align: center;
  background: linear-gradient(145deg, #fffafb, #fdf2f8);
  border: 1px solid #fbcfe8;
}

.ledger-sum-label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.ledger-sum-value {
  font-size: 1.05rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.ledger-sum-expense .ledger-sum-value {
  color: #db2777;
}

.ledger-sum-income .ledger-sum-value {
  color: #059669;
}

.ledger-sum-balance .ledger-sum-value {
  color: var(--primary-dark);
}

.ledger-sum-balance .ledger-sum-value.negative {
  color: #be185d;
}

.ledger-compose {
  margin-bottom: 16px;
}

.ledger-kind-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.ledger-kind-tab {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-soft);
  font-weight: 600;
  cursor: pointer;
}

.ledger-kind-tab.active[data-kind="expense"],
.ledger-kind-tab.active:first-child {
  background: linear-gradient(135deg, #fce7f3, #fbcfe8);
  color: #9d174d;
  border-color: #f9a8d4;
}

.ledger-kind-tab.active[data-kind="income"] {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #047857;
  border-color: #6ee7b7;
}

.ledger-amount-input {
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.02em;
}

.ledger-list-card {
  padding-bottom: 12px;
}

.ledger-list {
  list-style: none;
}

.ledger-item {
  padding: 14px 0;
  border-bottom: 1px solid #fce7f3;
}

.ledger-item:last-child {
  border-bottom: none;
}

.ledger-item-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.ledger-cat {
  font-weight: 700;
  color: var(--primary-dark);
  font-size: 0.95rem;
}

.ledger-amount {
  font-size: 1.1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.ledger-amount.expense {
  color: #db2777;
}

.ledger-amount.income {
  color: #059669;
}

.ledger-item-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
}

.ledger-item-sub .record-time {
  flex: 1;
}

.ledger-note {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--text-soft);
  padding: 8px 10px;
  background: #fdf2f8;
  border-radius: var(--radius-sm);
}
