:root {
  --bg: #fbf6f1;
  --card: #fffdfb;
  --ink: #3e3331;
  --muted: #a08f88;
  --muted-2: #8d7b74;
  --line: #f0e4da;
  --line-strong: #e6d6cb;
  --rose: #b85c5c;
  --rose-deep: #a85555;
  --rose-soft: #f6e3dc;
  --rose-wash: #fdf3ee;
  --viz-bar: #b85c5c;
  --viz-track: #f0e6df;
  --shadow: 0 8px 24px rgba(120, 80, 60, 0.06);
  --shadow-lift: 0 14px 34px rgba(160, 100, 80, 0.13);
  --serif: Georgia, "Times New Roman", "Songti SC", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background:
    radial-gradient(1100px 560px at 88% -8%, #f8e6db 0%, rgba(248, 230, 219, 0) 62%),
    radial-gradient(900px 520px at -8% 4%, #f7ece5 0%, rgba(247, 236, 229, 0) 58%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: #f4e9e2;
  padding: 1px 5px;
  border-radius: 6px;
}

/* ------------------------------ 登录 / 初始化 ------------------------------ */

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 18px;
}

.auth-card {
  width: min(430px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 32px 28px 26px;
  box-shadow: var(--shadow-lift);
}

.auth-heart {
  width: 54px;
  height: 54px;
  border-radius: 17px;
  background: var(--rose-soft);
  color: var(--rose);
  display: grid;
  place-items: center;
  font-size: 25px;
  margin-bottom: 18px;
}

.auth-card h1 {
  margin: 0 0 6px;
  font-size: 23px;
  letter-spacing: 0.02em;
}

.auth-card .muted {
  margin: 0 0 20px;
  font-size: 13px;
  color: var(--muted);
}

.auth-card form {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.auth-card form label {
  font-size: 12.5px;
}

.auth-card .btn {
  width: 100%;
  margin-top: 4px;
}

.auth-note {
  margin: 16px 0 0;
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
}

/* ------------------------------ 骨架 ------------------------------ */

.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 58px;
  padding: 0 18px;
  background: rgba(251, 246, 241, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(231, 216, 206, 0.6);
}

.brand {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.brand-heart {
  color: var(--rose);
  font-size: 13px;
}

.topnav {
  display: none;
  flex: 1;
  gap: 4px;
  margin-left: 18px;
}

.topnav-link {
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted-2);
  transition: background 0.15s, color 0.15s;
}

.topnav-link:hover {
  background: #f7ece5;
}

.topnav-link.active {
  background: var(--rose-soft);
  color: var(--rose-deep);
  font-weight: 600;
}

.top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 33px;
  height: 33px;
  border-radius: 50%;
  background: var(--rose-soft);
  color: var(--rose-deep);
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 600;
}

.content {
  flex: 1;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 18px 16px calc(92px + env(safe-area-inset-bottom));
}

.content.wide {
  max-width: 1120px;
}

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  justify-content: space-around;
  padding: 7px 4px calc(7px + env(safe-area-inset-bottom));
  background: rgba(255, 252, 249, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}

.tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 58px;
  padding: 3px 6px;
  border-radius: 12px;
  font-size: 10.5px;
  color: var(--muted);
  transition: color 0.15s;
}

.tabbar a.active {
  color: var(--rose-deep);
}

.tabbar svg {
  width: 22px;
  height: 22px;
}

@media (min-width: 861px) {
  .topnav {
    display: flex;
  }

  .tabbar {
    display: none;
  }

  .content {
    padding: 30px 24px 64px;
  }
}

/* ------------------------------ 通用 ------------------------------ */

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

.muted {
  color: var(--muted);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 26px 2px 12px;
}

.section-head h3 {
  margin: 0;
  font-size: 15px;
  color: var(--muted-2);
  letter-spacing: 0.02em;
}

.section-head a {
  font-size: 12.5px;
  color: var(--rose-deep);
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 2px 16px;
}

.page-head h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: 0.02em;
}

.page-sub {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--muted);
}

.empty {
  padding: 36px 18px;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
}

.empty-mark {
  font-size: 27px;
  color: #d9b3a9;
  margin-bottom: 8px;
}

/* ------------------------------ 首页 ------------------------------ */

.hero {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  padding: 26px 24px 24px;
  background: linear-gradient(135deg, #f9e3da 0%, #f7ece2 48%, #f2e9f0 100%);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: var(--shadow-lift);
}

.hero::after {
  content: "♥";
  position: absolute;
  right: -16px;
  bottom: -42px;
  font-size: 158px;
  color: rgba(196, 103, 103, 0.07);
  transform: rotate(-12deg);
  pointer-events: none;
}

.hero-eyebrow {
  font-size: 12.5px;
  letter-spacing: 0.14em;
  color: #8d6f68;
}

.hero-heart {
  color: var(--rose);
  font-size: 10px;
  vertical-align: 1px;
}

.hero-days {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 10px 0 6px;
}

.hero-num {
  font-family: var(--serif);
  font-size: 64px;
  line-height: 1;
  color: #b05a5a;
  font-feature-settings: "tnum";
}

.hero-unit {
  font-size: 13px;
  letter-spacing: 0.12em;
  color: #8d6f68;
}

.hero-caption {
  font-size: 12.5px;
  color: #92776f;
}

.hero-caption a {
  color: var(--rose-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

@media (max-width: 430px) {
  .grid2 {
    grid-template-columns: 1fr;
  }
}

.mini-card {
  display: flex;
  flex-direction: column;
  min-height: 132px;
}

.mini-label {
  font-size: 11px;
  letter-spacing: 0.13em;
  color: var(--muted);
}

.mini-value {
  margin: 8px 0 2px;
  font-family: var(--serif);
  font-size: 31px;
  line-height: 1.1;
  color: #a85555;
  font-feature-settings: "tnum";
}

.mini-value small {
  font-family: var(--sans);
  font-size: 11.5px;
  color: var(--muted);
  margin-left: 4px;
}

.mini-value.muted-value {
  color: #d3bfb6;
}

.mini-title {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-meta {
  margin-top: auto;
  padding-top: 8px;
  font-size: 11.5px;
  color: var(--muted);
}

.whisper-banner {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 18px;
  padding: 15px 18px;
  border-radius: 18px;
  background: var(--rose-wash);
  border: 1px solid #f3dbcf;
  font-size: 13px;
  color: #7d5c52;
}

.banner-icon {
  font-size: 18px;
  color: var(--rose);
}

.banner-go {
  margin-left: auto;
  font-size: 12px;
  color: var(--rose-deep);
  white-space: nowrap;
}

/* ------------------------------ 记录 ------------------------------ */

.timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.entry-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.mood-badge {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 13px;
  background: #fdf0e9;
  display: grid;
  place-items: center;
  font-size: 18px;
}

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

.entry-title {
  margin: 1px 0 3px;
  font-size: 15px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.entry-meta {
  font-size: 12px;
  color: var(--muted);
}

.entry-content {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.75;
  color: #54443f;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.icon-btn {
  flex: none;
  border: 0;
  background: transparent;
  color: #cdbab0;
  font-size: 13px;
  line-height: 1;
  padding: 7px;
  border-radius: 8px;
  cursor: pointer;
}

.icon-btn:hover {
  background: #f7ebe5;
  color: var(--rose);
}

/* ------------------------------ 纪念日 / 倒数 ------------------------------ */

.day-card {
  display: flex;
  align-items: center;
  gap: 18px;
}

.day-card.past {
  opacity: 0.62;
}

.day-num {
  flex: none;
  min-width: 76px;
  text-align: center;
  font-family: var(--serif);
  font-size: 38px;
  line-height: 1;
  color: #b05a5a;
  font-feature-settings: "tnum";
}

.day-num small {
  display: block;
  margin-top: 5px;
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

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

.day-body h3 {
  margin: 0 0 5px;
  font-size: 15.5px;
  overflow-wrap: anywhere;
}

.day-meta {
  font-size: 12px;
  color: var(--muted);
}

.day-note {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--muted-2);
  overflow-wrap: anywhere;
}

.tag {
  display: inline-block;
  margin-left: 7px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #f6ece6;
  color: #8d6f65;
  font-size: 10.5px;
  font-weight: 400;
  vertical-align: 1.5px;
  white-space: nowrap;
}

/* ------------------------------ 悄悄话 ------------------------------ */

.whisper-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 14px;
}

.whisper {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.whisper.locked {
  background: #fffaf7;
  border-style: dashed;
  border-color: #ecd7cb;
}

.whisper-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
}

.seal {
  flex: none;
  width: 27px;
  height: 27px;
  border-radius: 9px;
  background: var(--rose-soft);
  color: var(--rose-deep);
  display: grid;
  place-items: center;
  font-size: 13px;
}

.whisper-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  color: #54443f;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.blur-lines span {
  display: block;
  height: 9px;
  margin: 9px 0;
  border-radius: 6px;
  background: #f0ddd3;
  filter: blur(2.5px);
}

.blur-lines span:nth-child(1) {
  width: 92%;
}

.blur-lines span:nth-child(2) {
  width: 78%;
}

.blur-lines span:nth-child(3) {
  width: 58%;
}

.whisper-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
}

.whisper-foot .hint {
  font-size: 11px;
  color: var(--muted);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tags .tag {
  margin-left: 0;
}

/* ------------------------------ 表单 ------------------------------ */

.form-card {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin-bottom: 16px;
}

.form-card h3 {
  margin: 0;
  font-size: 15px;
}

label,
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted-2);
}

.field-label {
  font-size: 12.5px;
  color: var(--muted-2);
}

input,
textarea,
select {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fffefb;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #b39c92 50%),
    linear-gradient(135deg, #b39c92 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

input::placeholder,
textarea::placeholder {
  color: #c3b2aa;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #dda49c;
  box-shadow: 0 0 0 3px rgba(221, 164, 156, 0.18);
}

textarea {
  resize: vertical;
  min-height: 96px;
}

input[type="checkbox"] {
  width: auto;
  accent-color: var(--rose);
}

input[type="date"] {
  min-height: 44px;
}

.form-row {
  display: grid;
  gap: 12px;
}

@media (min-width: 560px) {
  .form-row.two {
    grid-template-columns: 1fr 1fr;
  }
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 2px;
}

.check-line {
  flex-direction: row;
  align-items: center;
  gap: 9px;
  padding: 11px 2px;
  font-size: 13.5px;
  color: var(--ink);
  cursor: pointer;
}

.check-line input {
  flex: none;
}

.mood-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.mood {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fffefb;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  filter: grayscale(0.6);
  opacity: 0.72;
  transition: 0.15s;
}

.mood:hover {
  opacity: 1;
}

.mood.active {
  border-color: #d98f86;
  background: var(--rose-wash);
  filter: none;
  opacity: 1;
}

.mode-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 480px) {
  .mode-row {
    grid-template-columns: 1fr;
  }
}

.mode-opt {
  flex-direction: row;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: #fffefb;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
}

.mode-opt input[type="radio"] {
  flex: none;
  width: auto;
  margin: 3px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  accent-color: var(--rose);
}

.mode-opt > span {
  flex: 1;
  min-width: 0;
}

.mode-opt b {
  font-weight: 600;
}

.mode-opt small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
}

.mode-opt:has(input:checked) {
  border-color: #d98f86;
  background: var(--rose-wash);
}

.about-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.about-card .muted {
  margin: 0 0 14px;
  font-size: 12.5px;
  line-height: 1.7;
}

/* ------------------------------ 按钮 ------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 10px 19px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn.primary {
  background: #c06666;
  color: #fff;
  box-shadow: 0 6px 16px rgba(192, 102, 102, 0.24);
}

.btn.primary:hover {
  background: #ad5757;
}

.btn.ghost {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: #7d6660;
}

.btn.ghost:hover {
  background: #f9f1eb;
}

.btn.small {
  align-self: flex-start;
  padding: 8px 15px;
  font-size: 12.5px;
}

/* ------------------------------ 提示 ------------------------------ */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(88px + env(safe-area-inset-bottom));
  z-index: 100;
  max-width: calc(100vw - 40px);
  padding: 10px 17px;
  border-radius: 999px;
  background: #3f3331;
  color: #fff;
  font-size: 13px;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity 0.22s, transform 0.22s;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (min-width: 861px) {
  .toast {
    bottom: 40px;
  }
}

/* ------------------------------ 双时区时钟 ------------------------------ */

.clocks {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 14px 18px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(180, 140, 130, 0.2);
}

.clock {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.clock-name {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #8d6f68;
  white-space: nowrap;
}

.clock-time {
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1.15;
  color: #7b5250;
  font-feature-settings: "tnum";
}

.clock-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: #92776f;
}

.clock-dot {
  opacity: 0.5;
}

.clock-sep {
  color: #c99f94;
  font-size: 18px;
  padding-bottom: 24px;
}

.mini-value.text {
  padding: 4px 0;
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
}

/* ------------------------------ 每日时间 ------------------------------ */

.datebar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.date-arrow {
  flex: none;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  background: #f8ece5;
  color: #8d6f68;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
}

.date-arrow:hover {
  background: #f3ddd3;
}

.datebar-main {
  flex: 1;
  min-width: 150px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.datebar-date {
  font-size: 15px;
  font-weight: 600;
}

.datebar .date-input {
  width: 150px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 11px;
  color: var(--muted);
}

.datebar .date-input:focus {
  border: 0;
  box-shadow: none;
}

.daily-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

@media (min-width: 760px) {
  .daily-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.day-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 230px;
}

.day-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.day-panel-name {
  font-size: 15px;
  font-weight: 600;
}

.day-panel-zone {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}

.tz-offset {
  color: #b39c92;
}

.day-empty {
  padding: 26px 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.log-lines {
  display: flex;
  flex-direction: column;
}

.log-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dashed #f2e5dc;
  font-size: 13.5px;
  line-height: 1.55;
}

.log-line:last-child {
  border-bottom: 0;
}

.log-time {
  flex: none;
  min-width: 58px;
  font-family: var(--serif);
  font-size: 13px;
  color: #b0645f;
  letter-spacing: 0.02em;
}

.log-text {
  flex: 1;
  min-width: 0;
  color: #54443f;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.thoughts {
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fdf4ee;
  font-size: 12.5px;
  line-height: 1.6;
  color: #7d5c52;
}

.thoughts-label {
  display: inline-block;
  margin-right: 7px;
  font-weight: 600;
  color: #b0645f;
}

.day-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.day-form textarea {
  min-height: 190px;
  font-size: 13.5px;
  line-height: 1.75;
}

.thoughts-input {
  font-size: 12.5px;
}

/* ------------------------------ 心愿墙 ------------------------------ */

.wish-board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 1fr);
  gap: 14px;
  overflow-x: auto;
  align-items: start;
  padding-bottom: 10px;
}

@media (min-width: 1000px) {
  .wish-board {
    grid-auto-columns: 1fr;
    overflow: visible;
  }
}

.wish-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 140px;
  padding: 12px;
  background: rgba(255, 253, 251, 0.72);
  border: 1px solid var(--line);
  border-radius: 20px;
}

.wish-column-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 4px 6px;
}

.wish-column-head h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

.wish-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c9b8ae;
}

.wish-todo .wish-dot {
  background: #d9a441;
}

.wish-doing .wish-dot {
  background: #5aa469;
}

.wish-done .wish-dot {
  background: #4f7fc4;
}

.wish-cancelled .wish-dot {
  background: #b9a9a2;
}

.wish-count {
  padding: 0 7px;
  border-radius: 999px;
  background: #f6ece6;
  font-size: 11px;
  color: var(--muted);
}

.wish-add {
  margin-left: auto;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #b39c92;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.wish-add:hover {
  background: #f7ebe5;
  color: var(--rose);
}

.wish-cards {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.wish-empty {
  padding: 18px 0;
  text-align: center;
  font-size: 12px;
  color: #c3b2aa;
}

.wish-card {
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(120, 80, 60, 0.04);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.wish-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(120, 80, 60, 0.09);
}

.wish-card.wish-muted {
  opacity: 0.6;
}

.wish-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cat-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  white-space: nowrap;
}

.cat-life {
  background: #fdf0cd;
  color: #8a6b1f;
}

.cat-study {
  background: #e2f3e6;
  color: #3d7a50;
}

.cat-hobby {
  background: #efe7fb;
  color: #6b51a3;
}

.cat-other {
  background: #e8eff8;
  color: #4c6b8a;
}

.wish-owner {
  font-size: 10.5px;
  color: var(--muted);
}

.wish-card h4 {
  margin: 9px 0 4px;
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.wish-note {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted-2);
}

.wish-done {
  margin-top: 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: #4f7fc4;
}

.wish-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.wish-bar {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: #f0e6df;
  overflow: hidden;
}

.wish-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #4f8fd4;
  transition: width 0.2s;
}

.wish-done + .wish-progress .wish-bar span {
  background: #5aa469;
}

.wish-pct {
  min-width: 32px;
  text-align: right;
  font-size: 10.5px;
  color: var(--muted);
}

/* ------------------------------ 时间轴 ------------------------------ */

.tl-year {
  margin-bottom: 26px;
}

.tl-year-badge {
  display: inline-block;
  margin: 0 0 14px 2px;
  padding: 2px 14px;
  border-radius: 999px;
  background: #f7e6de;
  font-family: var(--serif);
  font-size: 21px;
  color: #a85555;
}

.tl-track {
  position: relative;
  padding: 2px 0 6px;
}

.tl-track::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 4px;
  bottom: 0;
  width: 2px;
  background: #ead7cc;
}

.tl-item {
  position: relative;
  padding-left: 42px;
  margin-bottom: 18px;
}

.tl-dot {
  position: absolute;
  left: 9px;
  top: 24px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #c06666;
  border: 2px solid #fffdfb;
  box-shadow: 0 0 0 2px #ecd3c8;
}

.tl-card {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  border: 1.5px solid #d9c3b6;
  border-radius: 6px 18px 18px 18px;
  padding: 14px 16px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(120, 80, 60, 0.07);
  transition: transform 0.15s, box-shadow 0.15s;
}

.tl-item:nth-child(odd) .tl-card {
  transform: rotate(-0.5deg);
}

.tl-item:nth-child(even) .tl-card {
  transform: rotate(0.45deg);
}

.tl-card:hover {
  transform: translateY(-2px) rotate(0deg) !important;
  box-shadow: 0 12px 24px rgba(120, 80, 60, 0.12);
}

.tl-card:focus-visible {
  outline: 2px solid #b85c5c;
  outline-offset: 3px;
}

.tl-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.tl-emoji {
  font-size: 18px;
  line-height: 1;
}

.tl-date {
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: #8a6f68;
}

.tl-card h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.tl-card p {
  margin: 0 0 8px;
  font-size: 12.5px;
  line-height: 1.65;
  color: #6f5a53;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.tl-meta {
  font-size: 11px;
  color: #9b8178;
}

.note-pink {
  background: #ffe6ed;
  border-color: #e7b8c8;
}

.note-blue {
  background: #e0effd;
  border-color: #b5d3ef;
}

.note-mint {
  background: #e0f4e9;
  border-color: #b6ddc8;
}

.note-yellow {
  background: #fdf3d3;
  border-color: #e7d49a;
}

.note-lavender {
  background: #ece4fb;
  border-color: #cdbdf0;
}

.note-peach {
  background: #ffe9dd;
  border-color: #efc6b1;
}

@media (min-width: 820px) {
  .tl-track::before {
    left: 50%;
    transform: translateX(-1px);
  }

  .tl-item {
    width: 50%;
    padding-left: 0;
    margin-bottom: 26px;
  }

  .tl-item:nth-child(odd) {
    padding-right: 36px;
  }

  .tl-item:nth-child(even) {
    margin-left: 50%;
    padding-left: 36px;
  }

  .tl-item:nth-child(odd) .tl-dot {
    left: auto;
    right: -7px;
  }

  .tl-item:nth-child(even) .tl-dot {
    left: -7px;
  }
}

/* ------------------------------ 更多 ------------------------------ */

.more-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 640px) {
  .more-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.more-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
}

.more-icon {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #f8e9e1;
  color: #a85555;
  display: grid;
  place-items: center;
}

.more-icon svg {
  width: 20px;
  height: 20px;
}

.more-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.more-body b {
  font-size: 14px;
}

.more-body small {
  font-size: 11.5px;
  color: var(--muted);
}

.more-arrow {
  color: #c3a99f;
}

/* ------------------------------ 弹窗 ------------------------------ */

body.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(62, 51, 49, 0.36);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: fadeIn 0.15s ease;
}

@media (min-width: 640px) {
  .modal-backdrop {
    align-items: center;
    padding: 24px;
  }
}

.modal {
  width: 100%;
  max-width: 540px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 22px 20px calc(20px + env(safe-area-inset-bottom));
  border-radius: 24px 24px 0 0;
  background: #fffdfb;
  box-shadow: 0 -10px 40px rgba(80, 50, 40, 0.18);
  animation: sheetUp 0.22s ease;
}

@media (min-width: 640px) {
  .modal {
    padding: 24px;
    border-radius: 24px;
  }
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-form h3 {
  margin: 0 0 4px;
  font-size: 17px;
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.modal-spacer {
  flex: 1;
}

@keyframes sheetUp {
  from {
    transform: translateY(18px);
    opacity: 0.6;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

input[type="range"] {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  accent-color: #c06666;
}

input[type="range"]:focus {
  box-shadow: none;
}

.color-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.color-swatch {
  position: relative;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0 !important;
  border-radius: 10px;
  background: transparent !important;
  cursor: pointer;
}

.color-swatch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.color-swatch span {
  display: block;
  width: 100%;
  height: 100%;
  border: 1.5px solid rgba(90, 70, 60, 0.25);
  border-radius: 10px;
}

.color-swatch.note-pink span {
  background: #ffe6ed;
}

.color-swatch.note-blue span {
  background: #e0effd;
}

.color-swatch.note-mint span {
  background: #e0f4e9;
}

.color-swatch.note-yellow span {
  background: #fdf3d3;
}

.color-swatch.note-lavender span {
  background: #ece4fb;
}

.color-swatch.note-peach span {
  background: #ffe9dd;
}

.color-swatch input:checked + span {
  outline: 2px solid #b85c5c;
  outline-offset: 2px;
}

.form-hint {
  margin-top: -4px;
  font-size: 11.5px;
  color: var(--muted);
}

.btn.danger {
  background: #fbe9e7;
  color: #b3403a;
}

.btn.danger:hover {
  background: #f7d7d3;
}

/* ------------------------------ 月度目标 ------------------------------ */

.month-goals {
  margin-bottom: 14px;
}

.month-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.month-head h3 {
  margin: 0;
  font-size: 15px;
}

.month-sub {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--muted);
}

.goal-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 640px) {
  .goal-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.goal-person {
  padding: 12px 14px;
  border: 1px solid #f1e5db;
  border-radius: 14px;
  background: #fdf8f4;
}

.goal-name {
  margin-bottom: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #8a6f68;
}

.goal-block + .goal-block {
  margin-top: 10px;
}

.goal-label {
  display: block;
  margin-bottom: 3px;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: #b39c92;
}

.goal-person p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.65;
  color: #54443f;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.goal-empty {
  color: #c3b2aa;
}

/* ------------------------------ 照片 ------------------------------ */

.wish-cover {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.wish-cover-inner {
  position: relative;
  max-width: 100%;
}

.wish-photo {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 260px;
  border-radius: 10px;
  background: #f6ece6;
  cursor: zoom-in;
}

.tl-photo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.tl-photo-inner {
  position: relative;
  max-width: 100%;
}

.tl-photo {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 320px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.35);
  cursor: zoom-in;
}

.photo-count {
  position: absolute;
  right: 7px;
  bottom: 7px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(62, 51, 49, 0.72);
  color: #fff;
  font-size: 10.5px;
}

.record-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.record-photos img {
  display: block;
  width: auto;
  height: 110px;
  max-width: 100%;
  object-fit: contain;
  border-radius: 8px;
  background: #f6ece6;
  cursor: zoom-in;
}

.photo-box {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.photo-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.photo-item {
  position: relative;
  height: 88px;
  max-width: 100%;
  overflow: hidden;
  border-radius: 10px;
  background: #f6ece6;
}

.photo-item img {
  display: block;
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  cursor: zoom-in;
}

.photo-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(62, 51, 49, 0.72);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}

.photo-remove:hover {
  background: rgba(62, 51, 49, 0.9);
}

.photo-empty {
  width: 100%;
  padding: 14px;
  border: 1px dashed #e6d6cb;
  border-radius: 10px;
  text-align: center;
  font-size: 12px;
  color: #c3b2aa;
}

.photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.photo-btn {
  position: relative;
  overflow: hidden;
}

.photo-btn input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.photo-hint {
  font-size: 10.5px;
  color: var(--muted);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(20, 15, 13, 0.9);
  cursor: zoom-out;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* ------------------------------ 搜索 ------------------------------ */

.icon-link {
  width: 33px;
  height: 33px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--muted-2);
}

.icon-link:hover {
  background: #f6ece6;
  color: var(--rose);
}

.icon-link svg {
  width: 19px;
  height: 19px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  margin-bottom: 18px;
}

.search-icon {
  display: flex;
  color: var(--muted);
}

.search-icon svg {
  width: 19px;
  height: 19px;
}

.search-box input[type="search"] {
  flex: 1;
  min-width: 0;
  padding: 4px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 15px;
}

.search-box input[type="search"]:focus {
  box-shadow: none;
}

.search-clear {
  flex: none;
  padding: 4px 10px;
  border: 0;
  border-radius: 999px;
  background: #f6ece6;
  color: var(--muted-2);
  font-size: 11.5px;
  cursor: pointer;
}

.search-clear:hover {
  background: #f1e0d6;
}

.search-group {
  margin-bottom: 18px;
}

.search-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 2px 8px;
}

.search-group-head h3 {
  margin: 0;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--muted-2);
}

.search-group-head span {
  padding: 0 7px;
  border-radius: 999px;
  background: #f6ece6;
  font-size: 11px;
  color: var(--muted);
}

.search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.search-item-main {
  display: block;
  flex: 1;
  min-width: 0;
}

.search-item h4 {
  margin: 0 0 3px;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.search-item p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 4px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted-2);
  overflow-wrap: anywhere;
}

.search-item-meta {
  font-size: 11px;
  color: var(--muted);
}

.search-arrow {
  flex: none;
  color: #c3a99f;
}

mark {
  padding: 0 1px;
  border-radius: 3px;
  background: #f8d7c9;
  color: inherit;
}

.search-hit {
  animation: searchPulse 2s ease;
}

@keyframes searchPulse {
  0%,
  100% {
    box-shadow: var(--shadow);
  }
  20% {
    box-shadow: 0 0 0 4px rgba(192, 102, 102, 0.32);
  }
}

/* ------------------------------ 回收站 ------------------------------ */

.trash-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

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

.trash-top {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}

.trash-type {
  padding: 1px 8px;
  border-radius: 999px;
  background: #f6ece6;
  color: #8d6f65;
}

.trash-title {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.trash-note {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 4px 0 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted-2);
}

.trash-meta {
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
}

.trash-actions {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.trash-danger {
  color: #b3403a;
}

.trash-danger:hover {
  background: #fbe9e7;
}

@media (max-width: 560px) {
  .trash-item {
    flex-direction: column;
  }

  .trash-actions {
    flex-direction: row;
  }
}

/* ------------------------------ 日历 ------------------------------ */

.calendar {
  padding: 16px;
}

.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.calendar-title {
  font-family: var(--serif);
  font-size: 20px;
  color: #7b5250;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 6px;
}

.calendar-weekdays span {
  text-align: center;
  font-size: 10.5px;
  color: var(--muted);
}

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

.cal-day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 3px;
  min-width: 0;
  aspect-ratio: 1;
  padding: 6px 2px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #fffdfb;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.cal-day:hover {
  background: #f9f0ea;
}

.cal-day.cal-empty {
  background: transparent;
  cursor: default;
  border-color: transparent;
}

.cal-day.today {
  border-color: #e2b3a8;
}

.cal-day.selected {
  background: var(--rose-wash);
  border-color: #d98f86;
}

.cal-num {
  font-size: 12.5px;
  line-height: 1;
}

.cal-day.today .cal-num {
  color: var(--rose-deep);
  font-weight: 600;
}

.cal-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 6px;
}

.cal-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #d9c3b6;
}

.cal-dot-record {
  background: #c97474;
}

.cal-dot-daily {
  background: #5b8fc9;
}

.cal-dot-timeline {
  background: #8a6fc4;
}

.cal-dot-anniversary {
  background: #d9a441;
}

.cal-dot-countdown {
  background: #5aa469;
}

.calendar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
}

.cal-type {
  flex: none;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  background: #f6ece6;
  color: #8d6f65;
}

.cal-type-record {
  background: #fbe3e1;
  color: #a85555;
}

.cal-type-daily {
  background: #e4eefb;
  color: #4c6b8a;
}

.cal-type-timeline {
  background: #ece4fb;
  color: #6b51a3;
}

.cal-type-anniversary {
  background: #fdf0cd;
  color: #8a6b1f;
}

.cal-type-countdown {
  background: #e2f3e6;
  color: #3d7a50;
}

.cal-item-title {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  overflow-wrap: anywhere;
}

.cal-item-meta {
  max-width: 35%;
  overflow: hidden;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  text-overflow: ellipsis;
}

@media (max-width: 480px) {
  .cal-day {
    padding: 4px 1px;
    border-radius: 8px;
  }

  .cal-item-meta {
    display: none;
  }
}

/* ------------------------------ 时间统计 ------------------------------ */

.stats-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.segmented {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: #f7ece5;
}

.seg-btn {
  padding: 5px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted-2);
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.seg-btn.active {
  background: #fffdfb;
  color: var(--rose-deep);
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(120, 80, 60, 0.08);
}

.segmented.small .seg-btn {
  padding: 4px 9px;
  font-size: 11px;
}

.stats-nav {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 260px;
}

.stats-nav .date-arrow {
  width: 32px;
  height: 32px;
  font-size: 18px;
}

.stats-period-label {
  font-size: 13px;
  color: var(--muted-2);
  white-space: nowrap;
}

.stats-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  background: linear-gradient(135deg, #f9e3da 0%, #f7ece2 60%, #f5efe6 100%);
  border-color: rgba(255, 255, 255, 0.6);
}

.stats-eyebrow {
  font-size: 11px;
  letter-spacing: 0.13em;
  color: #8d6f68;
}

.stats-hero-value {
  font-family: var(--sans);
  font-feature-settings: "tnum";
  font-size: 46px;
  font-weight: 650;
  line-height: 1.1;
  color: #a85555;
}

.stats-hero-value span {
  margin-left: 6px;
  font-size: 12px;
  font-weight: 400;
  color: #8d6f68;
}

.stats-hero-sub {
  margin-top: 4px;
  font-size: 11.5px;
  color: #92776f;
}

.stats-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(90px, 1fr));
  gap: 8px;
  min-width: 200px;
}

.stats-kpi {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.45);
}

.stats-kpi span {
  display: block;
  font-size: 10px;
  color: #92776f;
}

.stats-kpi b {
  display: block;
  margin-top: 3px;
  font-size: 16px;
  font-weight: 600;
  color: #7b5250;
}

.stats-people {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.stats-person {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  font-size: 12.5px;
  color: var(--muted-2);
}

.stats-person b {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.stats-person.active {
  border-color: #d98f86;
  background: var(--rose-wash);
}

.stats-card {
  margin-top: 14px;
}

.stats-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.stats-card-head h3 {
  margin: 0;
  font-size: 14px;
  color: var(--muted-2);
}

.stats-card-head > span {
  font-size: 11px;
  color: var(--muted);
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.category-row {
  display: grid;
  grid-template-columns: minmax(56px, 110px) 1fr 52px;
  align-items: center;
  gap: 10px;
}

.category-name {
  overflow: hidden;
  font-size: 12.5px;
  color: var(--ink);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.category-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--viz-track);
}

.category-track span {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: 999px;
  background: var(--viz-bar);
}

.category-value {
  text-align: right;
  font-size: 11.5px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}

.stats-hint {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--muted);
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  min-height: 172px;
  padding-top: 8px;
}

.bar-col {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.bar-track {
  display: flex;
  align-items: flex-end;
  height: 150px;
  border-bottom: 1px solid var(--line-strong);
}

.bar-fill {
  width: 100%;
  max-width: 26px;
  min-height: 0;
  margin: 0 auto;
  border-radius: 4px 4px 2px 2px;
  background: var(--viz-bar);
  transition: height 0.2s;
}

.bar-fill:hover {
  filter: brightness(1.08);
}

.bar-label {
  height: 13px;
  overflow: hidden;
  text-align: center;
  font-size: 9.5px;
  line-height: 1.3;
  color: var(--muted);
  white-space: nowrap;
}

.stats-axis-note {
  margin-top: 6px;
  text-align: right;
  font-size: 10.5px;
  color: var(--muted);
}

.stats-table-wrap {
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.stats-table th,
.stats-table td {
  padding: 7px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}

.stats-table thead th {
  position: sticky;
  top: 0;
  background: var(--card);
  color: var(--muted);
  font-weight: 500;
}

.stats-table tfoot td {
  font-weight: 600;
  color: var(--ink);
  border-bottom: 0;
}

.stats-empty {
  padding: 26px 10px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}

.chart-tooltip {
  position: fixed;
  z-index: 95;
  padding: 5px 9px;
  border-radius: 6px;
  background: #3f3331;
  color: #fff;
  font-size: 11.5px;
  white-space: nowrap;
  pointer-events: none;
  transform: translate(-50%, -100%);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
}

.tag-insert {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.tag-insert-label {
  margin-right: 2px;
  font-size: 10.5px;
  color: var(--muted);
}

.tag-chip {
  padding: 3px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fffefb;
  color: var(--muted-2);
  font-size: 11.5px;
  cursor: pointer;
}

.tag-chip:hover {
  border-color: #d98f86;
  background: var(--rose-wash);
  color: var(--rose-deep);
}

@media (max-width: 640px) {
  .stats-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .segmented {
    align-self: flex-start;
  }

  .stats-nav {
    justify-content: space-between;
    min-width: 0;
  }

  .stats-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .stats-kpis {
    min-width: 0;
  }

  .stats-people {
    grid-template-columns: 1fr;
  }

  .category-row {
    grid-template-columns: 64px 1fr 48px;
  }
}

/* ------------------------------ 点赞 / 评论 ------------------------------ */

.reaction-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
}

.reaction-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffdfb;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1;
  cursor: pointer;
}

.reaction-btn:hover {
  border-color: #e2b3a8;
  color: var(--rose-deep);
}

.reaction-btn.liked {
  border-color: #e2b3a8;
  background: var(--rose-wash);
  color: var(--rose-deep);
}

.reaction-heart {
  font-size: 13px;
  color: #c9b5ab;
}

.reaction-btn.liked .reaction-heart {
  color: var(--rose);
}

.reaction-bubble {
  font-size: 12px;
  filter: grayscale(0.4);
}

.reaction-count {
  font-size: 10.5px;
}

.comments-modal {
  gap: 10px;
}

.comments-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.comments-kicker {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.comments-head h3 {
  margin: 2px 0 0;
  font-size: 16px;
}

.comments-preview {
  max-height: 80px;
  overflow: auto;
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fdf6f1;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--muted-2);
  white-space: pre-wrap;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 240px;
  overflow-y: auto;
}

.comment-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
}

.comment-item:last-child {
  border-bottom: 0;
}

.comment-avatar {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--rose-soft);
  color: var(--rose-deep);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
}

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

.comment-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}

.comment-meta b {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.comment-body p {
  margin: 3px 0 0;
  font-size: 12.5px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.comments-empty {
  padding: 18px 0;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

.comment-input {
  font-size: 12px;
}

.comment-input textarea {
  min-height: 70px;
}

/* ------------------------------ 想你 ------------------------------ */

.hero-poke {
  margin-top: 14px;
}

.poke-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border: 1px solid rgba(180, 90, 90, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  color: var(--rose-deep);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.poke-btn span {
  color: var(--rose);
}

.poke-btn:hover {
  background: #fff;
}

.poke-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  padding: 13px 16px;
  border: 1px solid #f3d8ce;
  border-radius: 16px;
  background: #fdf0eb;
}

.poke-banner-main {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #7d5c52;
}

.poke-heart {
  color: var(--rose);
}

.poke-time {
  font-size: 11px;
  color: var(--muted);
}

.poke-banner-actions {
  display: flex;
  gap: 8px;
}

/* ------------------------------ 每日一问 ------------------------------ */

.home-question {
  display: block;
  margin-top: 14px;
  padding: 16px 18px;
}

.home-question h3 {
  margin: 6px 0;
  font-size: 15px;
  line-height: 1.5;
}

.home-question-meta {
  font-size: 11.5px;
  color: var(--muted);
}

.home-question:hover {
  border-color: #e2b3a8;
}

.daily-question {
  padding: 20px;
}

.dq-kicker {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.daily-question h3 {
  margin: 8px 0 16px;
  font-size: 18px;
  line-height: 1.5;
}

.dq-answer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.dq-answer {
  padding: 12px 14px;
  border: 1px solid #f3e7dd;
  border-radius: 14px;
  background: #fdf7f2;
}

.dq-answer-name {
  margin-bottom: 5px;
  font-size: 11px;
  font-weight: 600;
  color: #8a6f68;
}

.dq-answer p {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: #54443f;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.dq-empty {
  color: #c3b2aa;
}

.dq-history {
  padding: 16px;
}

.dq-history-date {
  font-size: 11px;
  color: var(--muted);
}

.dq-history h4 {
  margin: 5px 0 9px;
  font-size: 14px;
  line-height: 1.5;
}

.dq-history-answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.dq-history-answers span {
  font-size: 11px;
  color: var(--muted);
}

.dq-history-answers p {
  margin: 3px 0 0;
  font-size: 12.5px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.answer-question {
  padding: 12px 14px;
  border-radius: 12px;
  background: #fdf4ee;
  font-size: 13px;
  line-height: 1.6;
  color: #7d5c52;
}

@media (max-width: 560px) {
  .dq-answer-grid,
  .dq-history-answers {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------ 时间轴年轨 ------------------------------ */

.page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.year-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
}

.year-nav-label {
  min-width: 80px;
  text-align: center;
  font-family: var(--serif);
  font-size: 18px;
  color: #7b5250;
}

.year-nav .date-arrow {
  width: 32px;
  height: 32px;
  font-size: 18px;
}

.year-card {
  padding: 0;
  overflow: hidden;
}

.year-scroll {
  overflow-x: auto;
}

.year-track {
  min-width: 1040px;
  padding: 16px 34px 20px;
}

.year-quarters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 4px;
}

.year-quarters span {
  text-align: center;
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.year-months {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  margin-bottom: 8px;
}

.year-months span {
  text-align: center;
  font-size: 10.5px;
  color: var(--muted-2);
}

.year-points {
  position: relative;
  margin-bottom: 4px;
}

.year-point {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 150px;
  padding: 8px 10px;
  transform: translateX(-50%);
  border: 1.5px solid rgba(90, 70, 60, 0.3);
  border-radius: 4px 12px 12px 12px;
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(120, 80, 60, 0.08);
  transition: transform 0.15s, box-shadow 0.15s;
}

.year-point:hover {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 8px 18px rgba(120, 80, 60, 0.14);
}

.year-point-date {
  font-size: 9.5px;
  letter-spacing: 0.04em;
  color: #8a6f68;
}

.year-point-title {
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.year-point-loc {
  overflow: hidden;
  font-size: 9.5px;
  color: #8a6f68;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.year-axis {
  position: relative;
  height: 2px;
  margin: 14px 0 16px;
  background: var(--line-strong);
}

.year-tick {
  position: absolute;
  top: -4px;
  width: 1px;
  height: 10px;
  background: #e5d5ca;
}

.year-marker {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  border: 2px solid #fffdfb;
  border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 0 0 1px #e2b3a8;
  transform: translate(-50%, -50%);
}

.year-bands {
  position: relative;
}

.year-band {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  overflow: hidden;
  border: 1.5px solid rgba(90, 70, 60, 0.22);
  border-radius: 999px;
  font: inherit;
  font-size: 10.5px;
  color: #54443f;
  white-space: nowrap;
  cursor: pointer;
}

.year-band-title {
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
}

.year-band-loc {
  overflow: hidden;
  opacity: 0.7;
  text-overflow: ellipsis;
}

.year-band-date {
  margin-left: auto;
  opacity: 0.65;
  font-size: 9.5px;
}

.on-this-day {
  padding: 16px;
  margin-bottom: 14px;
}

.on-this-day-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.on-this-day-head h3 {
  margin: 0;
  font-size: 14px;
  color: var(--muted-2);
}

.on-this-day-head span {
  font-size: 11px;
  color: var(--muted);
}

.on-this-day-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.on-this-day-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdfb;
  font: inherit;
  cursor: pointer;
}

.on-this-day-item:hover {
  border-color: #e2b3a8;
  background: var(--rose-wash);
}

.on-this-day-year {
  padding: 1px 6px;
  border-radius: 999px;
  background: #f6ece6;
  font-size: 10px;
  color: var(--muted);
}

.on-this-day-title {
  font-size: 12.5px;
  color: var(--ink);
}

@media (max-width: 700px) {
  .page-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .year-track {
    padding: 14px 24px 18px;
  }
}

/* ------------------------------ 离线提示 ------------------------------ */

.offline-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 16px;
  border-bottom: 1px solid #f3d8ce;
  background: #fdf0eb;
  font-size: 12px;
  color: #7d5c52;
}

.offline-retry {
  padding: 3px 10px;
  border: 0;
  border-radius: 999px;
  background: #f3d8ce;
  color: #7d5c52;
  font-size: 11px;
  cursor: pointer;
}

.offline-retry:hover {
  background: #eccbbf;
}

/* ------------------------------ 深色模式 ------------------------------ */

:root[data-theme="dark"] {
  --bg: #171412;
  --card: #211d1a;
  --ink: #f2eae4;
  --muted: #b7a69e;
  --muted-2: #cdbbb2;
  --line: #332b26;
  --line-strong: #443a33;
  --rose: #d98a8a;
  --rose-deep: #e3a19a;
  --rose-soft: #3a2726;
  --rose-wash: #2b201e;
  --viz-bar: #c96b6b;
  --viz-track: #3a312b;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  --shadow-lift: 0 14px 34px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

:root[data-theme="dark"] body {
  background:
    radial-gradient(1100px 560px at 88% -8%, #2b211d 0%, rgba(43, 33, 29, 0) 62%),
    radial-gradient(900px 520px at -8% 4%, #241f1c 0%, rgba(36, 31, 28, 0) 58%),
    var(--bg);
}

:root[data-theme="dark"] .topbar {
  background: rgba(23, 20, 18, 0.86);
  border-bottom-color: rgba(68, 58, 51, 0.6);
}

:root[data-theme="dark"] .tabbar {
  background: rgba(27, 23, 20, 0.94);
  border-top-color: var(--line);
}

:root[data-theme="dark"] .topnav-link:hover,
:root[data-theme="dark"] .icon-link:hover {
  background: #2a2420;
}

:root[data-theme="dark"] .hero {
  background: linear-gradient(135deg, #33231f 0%, #2b2420 48%, #282227 100%);
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-lift);
}

:root[data-theme="dark"] .hero::after {
  color: rgba(217, 138, 138, 0.08);
}

:root[data-theme="dark"] .hero-eyebrow,
:root[data-theme="dark"] .hero-unit,
:root[data-theme="dark"] .hero-caption,
:root[data-theme="dark"] .clock-name,
:root[data-theme="dark"] .clock-meta,
:root[data-theme="dark"] .clock-zone {
  color: #c9a9a0;
}

:root[data-theme="dark"] .hero-num,
:root[data-theme="dark"] .clock-time,
:root[data-theme="dark"] .mini-value,
:root[data-theme="dark"] .day-num,
:root[data-theme="dark"] .tl-year-badge,
:root[data-theme="dark"] .year-nav-label {
  color: var(--rose-deep);
}

:root[data-theme="dark"] .clocks {
  border-top-color: rgba(217, 138, 138, 0.16);
}

:root[data-theme="dark"] .clock-sep {
  color: #8a6a63;
}

:root[data-theme="dark"] .mini-value.muted-value {
  color: #6f5f57;
}

:root[data-theme="dark"] .btn.ghost {
  border-color: var(--line-strong);
  color: var(--muted-2);
}

:root[data-theme="dark"] .btn.ghost:hover {
  background: #2a2420;
}

:root[data-theme="dark"] .btn.danger {
  background: #3a2322;
  color: #f0a09a;
}

:root[data-theme="dark"] .btn.danger:hover {
  background: #472a28;
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] select {
  background: #1c1816;
  border-color: var(--line-strong);
  color: var(--ink);
}

:root[data-theme="dark"] input::placeholder,
:root[data-theme="dark"] textarea::placeholder {
  color: #7a6a62;
}

:root[data-theme="dark"] .date-arrow {
  background: #2a2420;
  color: var(--muted-2);
}

:root[data-theme="dark"] .date-arrow:hover {
  background: #332a25;
}

:root[data-theme="dark"] .segmented {
  background: #2a2420;
}

:root[data-theme="dark"] .seg-btn.active {
  background: #3a302a;
  color: var(--rose-deep);
  box-shadow: none;
}

:root[data-theme="dark"] .search-clear,
:root[data-theme="dark"] .search-group-head span {
  background: #2a2420;
  color: var(--muted-2);
}

:root[data-theme="dark"] .search-clear:hover {
  background: #332a25;
}

:root[data-theme="dark"] mark {
  background: #5a3a35;
  color: #f2eae4;
}

:root[data-theme="dark"] .mode-opt {
  background: #1c1816;
  border-color: var(--line-strong);
}

:root[data-theme="dark"] .mode-opt:has(input:checked) {
  background: var(--rose-wash);
  border-color: #8a5a55;
}

:root[data-theme="dark"] .mood {
  background: #1c1816;
  border-color: var(--line-strong);
}

:root[data-theme="dark"] .mood.active {
  background: var(--rose-wash);
  border-color: #8a5a55;
}

:root[data-theme="dark"] .tag,
:root[data-theme="dark"] code {
  background: #332a25;
  color: #c9a9a0;
}

:root[data-theme="dark"] .entry-content,
:root[data-theme="dark"] .log-text,
:root[data-theme="dark"] .goal-person p,
:root[data-theme="dark"] .dq-answer p,
:root[data-theme="dark"] .answer-question,
:root[data-theme="dark"] .comments-preview,
:root[data-theme="dark"] .comment-body p,
:root[data-theme="dark"] .trash-note {
  color: #d7c8c0;
}

:root[data-theme="dark"] .mood-badge {
  background: #2e2421;
}

:root[data-theme="dark"] .entry-meta,
:root[data-theme="dark"] .day-meta,
:root[data-theme="dark"] .day-note,
:root[data-theme="dark"] .day-panel-zone {
  color: var(--muted);
}

:root[data-theme="dark"] .whisper.locked {
  background: #241f1c;
  border-color: #4a3a32;
}

:root[data-theme="dark"] .blur-lines span {
  background: #3a2f2a;
}

:root[data-theme="dark"] .whisper-banner {
  background: var(--rose-wash);
  border-color: #4a342e;
}

:root[data-theme="dark"] .wish-column {
  background: rgba(33, 29, 26, 0.72);
}

:root[data-theme="dark"] .wish-card {
  background: #1c1816;
  border-color: var(--line);
}

:root[data-theme="dark"] .wish-bar {
  background: #3a312b;
}

:root[data-theme="dark"] .cat-life {
  background: #3a3320;
  color: #e5c97a;
}

:root[data-theme="dark"] .cat-study {
  background: #22332b;
  color: #9fd0ae;
}

:root[data-theme="dark"] .cat-hobby {
  background: #2f293d;
  color: #c3b1ef;
}

:root[data-theme="dark"] .cat-other {
  background: #243041;
  color: #a9c4e3;
}

:root[data-theme="dark"] .note-pink {
  background: #3a2629;
  border-color: #5a3b40;
}

:root[data-theme="dark"] .note-blue {
  background: #24303d;
  border-color: #3b536b;
}

:root[data-theme="dark"] .note-mint {
  background: #22332b;
  border-color: #3a5a49;
}

:root[data-theme="dark"] .note-yellow {
  background: #3a3320;
  border-color: #5c4f2b;
}

:root[data-theme="dark"] .note-lavender {
  background: #2f293d;
  border-color: #4a4066;
}

:root[data-theme="dark"] .note-peach {
  background: #3a2b24;
  border-color: #5c4234;
}

:root[data-theme="dark"] .tl-track::before {
  background: #3a302a;
}

:root[data-theme="dark"] .tl-dot {
  border-color: var(--card);
  box-shadow: 0 0 0 2px #5a3a35;
}

:root[data-theme="dark"] .tl-card p,
:root[data-theme="dark"] .tl-meta,
:root[data-theme="dark"] .tl-date,
:root[data-theme="dark"] .tl-year-badge {
  color: #d7c8c0;
}

:root[data-theme="dark"] .year-point,
:root[data-theme="dark"] .year-band {
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--ink);
}

:root[data-theme="dark"] .year-point-date,
:root[data-theme="dark"] .year-point-loc,
:root[data-theme="dark"] .year-band-loc,
:root[data-theme="dark"] .year-band-date,
:root[data-theme="dark"] .year-months span,
:root[data-theme="dark"] .year-quarters span {
  color: #c9a9a0;
}

:root[data-theme="dark"] .year-axis {
  background: var(--line-strong);
}

:root[data-theme="dark"] .year-tick {
  background: #3a302a;
}

:root[data-theme="dark"] .year-marker {
  border-color: var(--card);
  box-shadow: 0 0 0 1px #8a5a55;
}

:root[data-theme="dark"] .on-this-day-item {
  background: #1c1816;
  border-color: var(--line);
}

:root[data-theme="dark"] .on-this-day-item:hover {
  background: var(--rose-wash);
  border-color: #8a5a55;
}

:root[data-theme="dark"] .on-this-day-year {
  background: #332a25;
  color: var(--muted);
}

:root[data-theme="dark"] .cal-day {
  background: #1c1816;
}

:root[data-theme="dark"] .cal-day:hover {
  background: #2a2420;
}

:root[data-theme="dark"] .cal-day.today {
  border-color: #8a5a55;
}

:root[data-theme="dark"] .cal-day.selected {
  background: var(--rose-wash);
  border-color: #8a5a55;
}

:root[data-theme="dark"] .cal-type {
  background: #332a25;
  color: var(--muted-2);
}

:root[data-theme="dark"] .cal-type-record {
  background: #3a2629;
  color: #e3a19a;
}

:root[data-theme="dark"] .cal-type-daily {
  background: #24303d;
  color: #a9c4e3;
}

:root[data-theme="dark"] .cal-type-timeline {
  background: #2f293d;
  color: #c3b1ef;
}

:root[data-theme="dark"] .cal-type-anniversary {
  background: #3a3320;
  color: #e5c97a;
}

:root[data-theme="dark"] .cal-type-countdown {
  background: #22332b;
  color: #9fd0ae;
}

:root[data-theme="dark"] .stats-hero {
  background: linear-gradient(135deg, #33231f 0%, #2b2420 60%, #292322 100%);
  border-color: rgba(255, 255, 255, 0.06);
}

:root[data-theme="dark"] .stats-eyebrow,
:root[data-theme="dark"] .stats-hero-sub,
:root[data-theme="dark"] .stats-kpi span {
  color: #c9a9a0;
}

:root[data-theme="dark"] .stats-hero-value {
  color: var(--rose-deep);
}

:root[data-theme="dark"] .stats-kpi {
  background: rgba(255, 255, 255, 0.06);
}

:root[data-theme="dark"] .stats-kpi b {
  color: #e8d7cf;
}

:root[data-theme="dark"] .stats-person.active {
  background: var(--rose-wash);
}

:root[data-theme="dark"] .stats-table th,
:root[data-theme="dark"] .stats-table td {
  border-bottom-color: var(--line);
}

:root[data-theme="dark"] .stats-table thead th {
  background: var(--card);
}

:root[data-theme="dark"] .goal-person {
  background: #241f1c;
  border-color: #3a302a;
}

:root[data-theme="dark"] .goal-name,
:root[data-theme="dark"] .goal-label {
  color: #c9a9a0;
}

:root[data-theme="dark"] .thoughts,
:root[data-theme="dark"] .comments-preview {
  background: #2a2420;
}

:root[data-theme="dark"] .log-line {
  border-bottom-color: var(--line);
}

:root[data-theme="dark"] .poke-banner {
  background: #2e2320;
  border-color: #4a342e;
}

:root[data-theme="dark"] .poke-banner-main {
  color: #e0c8bf;
}

:root[data-theme="dark"] .poke-btn {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(217, 138, 138, 0.3);
}

:root[data-theme="dark"] .poke-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

:root[data-theme="dark"] .home-question:hover {
  border-color: #8a5a55;
}

:root[data-theme="dark"] .dq-answer {
  background: #241f1c;
  border-color: #3a302a;
}

:root[data-theme="dark"] .dq-answer-name {
  color: #c9a9a0;
}

:root[data-theme="dark"] .dq-empty {
  color: #8a766c;
}

:root[data-theme="dark"] .answer-question {
  background: #2a2420;
}

:root[data-theme="dark"] .comment-avatar {
  background: var(--rose-soft);
}

:root[data-theme="dark"] .reaction-btn {
  background: #1c1816;
  border-color: var(--line);
}

:root[data-theme="dark"] .reaction-btn:hover,
:root[data-theme="dark"] .reaction-btn.liked {
  background: var(--rose-wash);
  border-color: #8a5a55;
}

:root[data-theme="dark"] .reaction-heart {
  color: #8a766c;
}

:root[data-theme="dark"] .trash-type {
  background: #332a25;
  color: var(--muted-2);
}

:root[data-theme="dark"] .trash-danger {
  color: #e08a84;
}

:root[data-theme="dark"] .trash-danger:hover {
  background: #3a2624;
}

:root[data-theme="dark"] .more-icon {
  background: var(--rose-soft);
}

:root[data-theme="dark"] .photo-item,
:root[data-theme="dark"] .record-photos img,
:root[data-theme="dark"] .wish-photo {
  background: #2a2420;
}

:root[data-theme="dark"] .photo-empty {
  border-color: #443a33;
}

:root[data-theme="dark"] .modal {
  background: var(--card);
}

:root[data-theme="dark"] .modal-backdrop {
  background: rgba(0, 0, 0, 0.65);
}

:root[data-theme="dark"] .toast {
  background: #f2eae4;
  color: #1c1816;
}

:root[data-theme="dark"] .empty-mark {
  color: #8a6a63;
}

:root[data-theme="dark"] .offline-banner {
  background: #2e2320;
  border-bottom-color: #4a342e;
  color: #e0c8bf;
}

:root[data-theme="dark"] .offline-retry {
  background: #4a342e;
  color: #f2eae4;
}

:root[data-theme="dark"] .offline-retry:hover {
  background: #5a4038;
}
