/* ==========================================================================
   我们的小家 — 样式表
   五个主题共用同一套组件类，只切换 :root[data-theme] 上的 CSS 变量。
   加新主题 = 加一个变量块，不需要动任何组件样式。
   ========================================================================== */

:root {
  --radius: 18px;
  --radius-sm: 12px;
  --gap: 18px;
  --sidebar-width: 244px;
  --font: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(.22, .8, .35, 1);
  --shadow-sm: 0 2px 10px rgb(0 0 0 / .05);
  --shadow: 0 10px 34px rgb(0 0 0 / .09);
  --shadow-lg: 0 22px 60px rgb(0 0 0 / .16);
}

/* ---------- 主题 1：奶油粉 ---------- */
:root[data-theme="cream"] {
  --bg: #fff5f7;
  --bg-deco-1: #ffd9e4;
  --bg-deco-2: #e5dcff;
  --surface: #ffffff;
  --surface-2: #fff8fa;
  --text: #4a3540;
  --text-soft: #96788a;
  --text-faint: #c3aab8;
  --border: #ffe2ea;
  --brand: #ff7fa8;
  --brand-2: #c99bff;
  --brand-ink: #ffffff;
  --accent: #ffb3c8;
  --gradient: linear-gradient(135deg, #ff9ebb, #c9a0ff);
  --danger: #f2557a;
  --ok: #47c08a;
}

/* ---------- 主题 2：薄荷青 ---------- */
:root[data-theme="mint"] {
  --bg: #f2fbf8;
  --bg-deco-1: #c8f0e4;
  --bg-deco-2: #cfe6ff;
  --surface: #ffffff;
  --surface-2: #f4fcf9;
  --text: #2f4a44;
  --text-soft: #6d8f87;
  --text-faint: #a8c4bd;
  --border: #d8f0e8;
  --brand: #35b795;
  --brand-2: #4f9ee8;
  --brand-ink: #ffffff;
  --accent: #8fdcc6;
  --gradient: linear-gradient(135deg, #4fd3b0, #66a9f0);
  --danger: #e2586b;
  --ok: #2fae87;
}

/* ---------- 主题 3：午夜星空 ---------- */
:root[data-theme="midnight"] {
  --bg: #12111c;
  --bg-deco-1: #2b2350;
  --bg-deco-2: #123049;
  --surface: #1c1a2b;
  --surface-2: #232134;
  --text: #ece9ff;
  --text-soft: #a49fc9;
  --text-faint: #6f6a96;
  --border: #322e4d;
  --brand: #a78bfa;
  --brand-2: #f472b6;
  --brand-ink: #14121f;
  --accent: #7c6cf0;
  --gradient: linear-gradient(135deg, #a78bfa, #f472b6);
  --danger: #fb7185;
  --ok: #4ade80;
  --shadow: 0 10px 34px rgb(0 0 0 / .45);
  --shadow-lg: 0 22px 60px rgb(0 0 0 / .6);
}

/* ---------- 主题 4：手账纸 ---------- */
:root[data-theme="paper"] {
  --bg: #fbf6e9;
  --bg-deco-1: #f0e6cc;
  --bg-deco-2: #e7dcc0;
  --surface: #fffdf6;
  --surface-2: #faf4e4;
  --text: #4a4131;
  --text-soft: #8a7c62;
  --text-faint: #b8ab93;
  --border: #ebdfc6;
  --brand: #c9915a;
  --brand-2: #8fa878;
  --brand-ink: #fffdf6;
  --accent: #e0b487;
  --gradient: linear-gradient(135deg, #d9a066, #9cb380);
  --danger: #c2604a;
  --ok: #7d9a63;
}

/* ---------- 主题 5：落日橘 ---------- */
:root[data-theme="sunset"] {
  --bg: #fff7f0;
  --bg-deco-1: #ffdcc2;
  --bg-deco-2: #ffc9d4;
  --surface: #ffffff;
  --surface-2: #fff9f4;
  --text: #50342a;
  --text-soft: #9c7261;
  --text-faint: #c9a494;
  --border: #ffe6d3;
  --brand: #ff8a5b;
  --brand-2: #ff5f8f;
  --brand-ink: #ffffff;
  --accent: #ffb27a;
  --gradient: linear-gradient(135deg, #ff9a62, #ff5f8f);
  --danger: #e8493f;
  --ok: #f0a03c;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background .45s var(--ease), color .45s var(--ease);
}

/* Soft ambient blobs behind everything — purely decorative. */
body::before {
  content: "";
  position: fixed;
  inset: -30vh -10vw auto -10vw;
  height: 90vh;
  background:
    radial-gradient(46vw 46vw at 18% 22%, var(--bg-deco-1) 0%, transparent 62%),
    radial-gradient(42vw 42vw at 82% 12%, var(--bg-deco-2) 0%, transparent 60%);
  filter: blur(8px);
  opacity: .85;
  pointer-events: none;
  z-index: 0;
  transition: background .45s var(--ease);
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: .2px; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 6px;
}

/* 作者样式里的 display 会盖掉浏览器默认的 [hidden]{display:none}，
   而下面 .boot/.auth/.app 都设了 display，所以必须显式补回这条，
   否则 hidden 属性完全失效（启动占位会一直盖在页面上）。 */
[hidden] { display: none !important; }

/* ============================ 启动占位 ============================ */
.boot {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-content: center; justify-items: center; gap: 14px;
  background: var(--bg);
}
.boot__heart { font-size: 54px; animation: pulse 1.1s var(--ease) infinite; }
.boot__text { color: var(--text-soft); }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.22); } }

/* ============================ 登录页 ============================ */
.auth {
  position: relative; z-index: 1;
  min-height: 100dvh;
  display: grid; place-items: center;
  padding: 24px 16px;
}
.auth__card {
  width: min(440px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 8px);
  box-shadow: var(--shadow-lg);
  padding: 32px 30px 30px;
  animation: rise .5s var(--ease) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.auth__brand { text-align: center; margin-bottom: 22px; }
.auth__logo { font-size: 40px; display: block; margin-bottom: 6px; }
.auth__title { font-size: 24px; }
.auth__subtitle { color: var(--text-soft); font-size: 13px; margin-top: 5px; }

.tabs {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 4px; padding: 4px; margin-bottom: 20px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.tabs__btn {
  border: 0; background: transparent; cursor: pointer;
  padding: 9px 4px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; color: var(--text-soft);
  transition: all .25s var(--ease);
}
.tabs__btn[aria-selected="true"] {
  background: var(--gradient); color: var(--brand-ink);
  box-shadow: var(--shadow-sm);
}

.form { display: grid; gap: 14px; }
.form__note { font-size: 12.5px; color: var(--text-faint); line-height: 1.6; }
.form__note--top { color: var(--text-soft); }

.field { display: grid; gap: 6px; }
.field__label { font-size: 13px; font-weight: 600; color: var(--text-soft); }
.field__input {
  width: 100%;
  padding: 11px 14px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field__input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent);
}
.field__input--code { letter-spacing: 5px; text-transform: uppercase; font-weight: 700; text-align: center; }
.field__hint { font-size: 12px; color: var(--text-faint); }
textarea.field__input { min-height: 116px; resize: vertical; line-height: 1.72; }

/* ============================ 按钮 ============================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 17px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600; font-size: 14px;
  cursor: pointer;
  transition: transform .16s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), opacity .2s;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn--primary { background: var(--gradient); color: var(--brand-ink); box-shadow: var(--shadow-sm); }
.btn--ghost { background: transparent; border-color: var(--border); }
.btn--danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn--danger:hover:not(:disabled) { background: var(--danger); color: #fff; }
.btn--block { width: 100%; }
.btn--sm { padding: 6px 12px; font-size: 12.5px; border-radius: 9px; }
.btn--icon { padding: 7px 10px; }

/* ============================ 应用骨架 ============================ */
.app {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100dvh;
}

.sidebar {
  display: flex; flex-direction: column;
  gap: 18px;
  padding: 22px 16px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  backdrop-filter: blur(14px);
  border-right: 1px solid var(--border);
  position: sticky; top: 0; height: 100dvh;
}
.sidebar__brand { display: flex; align-items: center; gap: 11px; padding: 0 6px; }
.sidebar__logo { font-size: 26px; }
.sidebar__brandText { display: grid; min-width: 0; }
.sidebar__brandText strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar__brandText small { font-size: 12px; color: var(--brand); font-weight: 600; }

.nav { display: grid; gap: 3px; flex: 1; align-content: start; }
.nav__item {
  display: flex; align-items: center; gap: 11px;
  width: 100%;
  padding: 10px 13px;
  border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--text-soft);
  font-size: 14px; font-weight: 600; text-align: left;
  cursor: pointer;
  transition: all .2s var(--ease);
}
.nav__item:hover { background: var(--surface-2); color: var(--text); }
.nav__item[aria-current="page"] {
  background: var(--gradient); color: var(--brand-ink);
  box-shadow: var(--shadow-sm);
}
.nav__icon { font-size: 16px; }

.sidebar__foot { border-top: 1px solid var(--border); padding-top: 14px; }
.theme-picker { display: grid; gap: 9px; padding: 0 4px; }
.theme-picker__label { font-size: 12px; font-weight: 700; color: var(--text-faint); letter-spacing: .5px; }
.theme-picker__swatches { display: flex; gap: 9px; flex-wrap: wrap; }
.swatch {
  width: 26px; height: 26px; padding: 0;
  border: 2px solid transparent; border-radius: 50%;
  cursor: pointer;
  transition: transform .18s var(--ease), border-color .2s var(--ease);
}
.swatch:hover { transform: scale(1.14); }
.swatch[aria-checked="true"] { border-color: var(--text); transform: scale(1.1); }

.content { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  position: sticky; top: 0; z-index: 20;
}
.topbar__title { font-size: 19px; }
.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.topbar__menu { display: none; background: transparent; border: 0; font-size: 20px; cursor: pointer; }

.badge {
  font-size: 12px; font-weight: 600;
  color: var(--text-soft);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 4px 11px; border-radius: 999px;
}

.view { padding: 24px; display: grid; gap: var(--gap); align-content: start; }

.loading, .empty {
  padding: 52px 20px;
  text-align: center;
  color: var(--text-faint);
  font-size: 14px;
}
.empty__emoji { display: block; font-size: 38px; margin-bottom: 10px; opacity: .8; }
.empty__title { color: var(--text-soft); font-weight: 600; margin-bottom: 4px; }

/* ============================ 卡片 ============================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.card--hover:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card__head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card__title { font-size: 15.5px; }
.card__more { margin-left: auto; font-size: 12.5px; color: var(--brand); font-weight: 600; background: none; border: 0; cursor: pointer; }

.grid { display: grid; gap: var(--gap); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

/* ============================ 首页计时器 ============================ */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--gradient);
  color: var(--brand-ink);
  border-radius: calc(var(--radius) + 8px);
  padding: 38px 32px;
  box-shadow: var(--shadow);
  text-align: center;
}
.hero::after {
  content: "";
  position: absolute; inset: auto -8% -62% -8%; height: 150%;
  background: radial-gradient(closest-side, rgb(255 255 255 / .26), transparent 70%);
  pointer-events: none;
}
.hero__label { font-size: 14px; opacity: .95; font-weight: 600; }
.hero__days { font-size: clamp(52px, 12vw, 92px); font-weight: 800; line-height: 1.02; margin: 6px 0 2px; letter-spacing: -2px; }
.hero__unit { font-size: 20px; font-weight: 700; opacity: .92; }
.hero__since { font-size: 13.5px; opacity: .92; margin-top: 10px; }
.hero__names { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 18px; font-weight: 700; font-size: 15px; }
.hero__heart { font-size: 18px; animation: pulse 1.6s var(--ease) infinite; }

.stat { display: grid; gap: 4px; text-align: center; }
.stat__value { font-size: 30px; font-weight: 800; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat__label { font-size: 12.5px; color: var(--text-soft); font-weight: 600; }

.countdown { display: flex; align-items: center; gap: 13px; padding: 12px 4px; }
.countdown + .countdown { border-top: 1px dashed var(--border); }
.countdown__icon { font-size: 24px; }
.countdown__meta { flex: 1; min-width: 0; }
.countdown__name { font-weight: 700; font-size: 14px; }
.countdown__date { font-size: 12px; color: var(--text-faint); }
.countdown__days { font-weight: 800; color: var(--brand); white-space: nowrap; }
.countdown__days small { font-size: 11px; font-weight: 600; opacity: .8; }
.countdown--today .countdown__days { color: var(--danger); }

/* ============================ 日记 ============================ */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.toolbar__spacer { margin-left: auto; }
.select, .input {
  padding: 9px 12px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
}
.input--search { min-width: 200px; }

.diary {
  display: grid; gap: 12px;
  grid-template-columns: 74px 1fr;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.diary:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.diary__date { text-align: center; }
.diary__day { font-size: 27px; font-weight: 800; line-height: 1; }
.diary__month { font-size: 11.5px; color: var(--text-faint); font-weight: 600; margin-top: 3px; }
.diary__face { font-size: 24px; margin-top: 7px; }
.diary__main { min-width: 0; }
.diary__top { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 6px; }
.diary__title { font-size: 16px; }
.diary__body { color: var(--text-soft); font-size: 14px; line-height: 1.76; white-space: pre-wrap; word-break: break-word; }
.diary__body--clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.diary__foot { display: flex; align-items: center; gap: 9px; margin-top: 11px; font-size: 12.5px; color: var(--text-faint); }
.diary__actions { margin-left: auto; display: flex; gap: 6px; }
.diary__thumbs { display: flex; gap: 7px; margin-top: 11px; flex-wrap: wrap; }
.diary__thumb { width: 76px; height: 76px; object-fit: cover; border-radius: 10px; cursor: zoom-in; border: 1px solid var(--border); }

.pill {
  font-size: 11.5px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px;
  background: var(--surface-2); color: var(--text-soft);
  border: 1px solid var(--border);
}
.pill--slot { background: var(--gradient); color: var(--brand-ink); border-color: transparent; }
.pill--mood { background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); border-color: transparent; }

/* ============================ 相册 ============================ */
.masonry { columns: 4 190px; column-gap: var(--gap); }
.masonry__item {
  break-inside: avoid;
  margin-bottom: var(--gap);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.masonry__item:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.masonry__img { display: block; width: 100%; cursor: zoom-in; }
.masonry__meta { padding: 11px 13px; display: grid; gap: 5px; }
.masonry__caption { font-size: 13.5px; }
.masonry__sub { font-size: 11.5px; color: var(--text-faint); display: flex; align-items: center; gap: 7px; }

.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 30px 20px;
  text-align: center;
  color: var(--text-soft);
  cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.dropzone:hover, .dropzone--over { border-color: var(--brand); background: var(--surface-2); }
.dropzone__icon { font-size: 34px; display: block; margin-bottom: 8px; }

.progress { height: 7px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin-top: 12px; }
.progress__bar { height: 100%; width: 0; background: var(--gradient); transition: width .25s var(--ease); }

/* ============================ 心愿 ============================ */
.wish {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 17px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.wish--done { opacity: .62; }
.wish--done .wish__title { text-decoration: line-through; color: var(--text-faint); }
.wish__check {
  width: 25px; height: 25px; flex: none;
  border: 2px solid var(--border); border-radius: 50%;
  background: transparent; cursor: pointer;
  display: grid; place-items: center; font-size: 13px; color: transparent;
  transition: all .2s var(--ease);
}
.wish__check:hover { border-color: var(--brand); }
.wish--done .wish__check { background: var(--gradient); border-color: transparent; color: var(--brand-ink); }
.wish__meta { flex: 1; min-width: 0; }
.wish__title { font-weight: 600; font-size: 14.5px; }
.wish__note { font-size: 12.5px; color: var(--text-faint); margin-top: 3px; }

/* ============================ 留言 ============================ */
.bubble {
  max-width: 620px;
  padding: 13px 17px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  position: relative;
}
.bubble--mine { background: color-mix(in srgb, var(--brand) 11%, var(--surface)); border-color: transparent; }
.bubble__body { font-size: 14.5px; line-height: 1.72; word-break: break-word; white-space: pre-wrap; }
.bubble__foot { display: flex; align-items: center; gap: 9px; margin-top: 9px; font-size: 12px; color: var(--text-faint); }
.bubble__del { margin-left: auto; background: none; border: 0; color: var(--text-faint); cursor: pointer; font-size: 12px; }
.bubble__del:hover { color: var(--danger); }
.bubble-row { display: flex; }
.bubble-row--mine { justify-content: flex-end; }

/* ============================ 统计 ============================ */
.bar-row { display: grid; grid-template-columns: 84px 1fr 42px; align-items: center; gap: 11px; margin-bottom: 9px; font-size: 13px; }
.bar {
  /* 标记里 .bar 和 .bar__fill 都是 <span>：默认 display:inline 时，
     子元素上按百分比写的 width 没有可解析的参照，整条会被压成 0 宽。
     这里必须显式给成块级盒子，进度条才画得出来。 */
  display: block;
  height: 9px; background: var(--surface-2); border-radius: 999px; overflow: hidden;
}
.bar__fill {
  display: block; height: 100%;
  background: var(--gradient); border-radius: 999px;
  transition: width .6s var(--ease);
}

.heatmap { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 1fr); gap: 4px; overflow-x: auto; padding-bottom: 6px; }
.heatmap__cell { width: 13px; height: 13px; border-radius: 3.5px; background: var(--surface-2); border: 1px solid var(--border); }
.heatmap__legend { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-faint); margin-top: 10px; }

/* ============================ 弹层 ============================ */
.dialog {
  border: 0; padding: 0;
  background: var(--surface);
  color: var(--text);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow-lg);
  width: min(560px, calc(100vw - 32px));
}
.dialog::backdrop { background: rgb(20 12 18 / .46); backdrop-filter: blur(4px); }
.dialog__form { display: grid; }
.dialog__head { display: flex; align-items: center; gap: 10px; padding: 19px 22px 13px; }
.dialog__title { font-size: 17px; flex: 1; }
.dialog__close { background: none; border: 0; font-size: 16px; cursor: pointer; color: var(--text-faint); padding: 4px 8px; border-radius: 8px; }
.dialog__close:hover { color: var(--text); background: var(--surface-2); }
.dialog__body { padding: 0 22px 6px; display: grid; gap: 14px; max-height: 66vh; overflow-y: auto; }
.dialog__foot { display: flex; gap: 10px; justify-content: flex-end; padding: 17px 22px 20px; }

.preview { position: fixed; inset: 0; z-index: 90; background: rgb(10 6 9 / .9); display: grid; place-items: center; padding: 30px; cursor: zoom-out; }
.preview img { max-width: 100%; max-height: 100%; border-radius: 10px; }

/* ============================ 提示 ============================ */
.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: grid; gap: 9px; }
.toast {
  padding: 12px 17px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  font-size: 13.5px; font-weight: 600;
  animation: slideIn .3s var(--ease) both;
  max-width: 320px;
}
.toast--error { border-left-color: var(--danger); color: var(--danger); }
.toast--ok { border-left-color: var(--ok); }
@keyframes slideIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }

/* ============================ 响应式 ============================ */
@media (max-width: 880px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 60;
    width: 262px;
    transform: translateX(-100%);
    transition: transform .3s var(--ease);
    box-shadow: var(--shadow-lg);
  }
  .sidebar--open { transform: none; }
  .topbar__menu { display: block; }
  .view { padding: 16px; }
  .hero { padding: 30px 20px; }
  .masonry { columns: 2 140px; }
  .diary { grid-template-columns: 1fr; }
  .diary__date { display: flex; align-items: center; gap: 9px; text-align: left; }
  .diary__face, .diary__month { margin: 0; }
  .toast-stack { left: 16px; right: 16px; bottom: 16px; }
  .toast { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
