/* ============================================================
   轻食记 · 小而美设计系统
   奶油白 + 薄荷绿 + 活力橙 · 大圆角 · 柔和阴影 · 自动深色模式
   ============================================================ */

:root {
  --bg: #F7F6F1;
  --surface: #FFFFFF;
  --surface-2: #F0F2EC;
  --ink: #232722;
  --sub: #8A9188;
  --line: #EAECE5;
  --mint: #10B981;
  --mint-deep: #059669;
  --mint-light: #34D399;
  --mint-bg: #E7F6EE;
  --mint-ink: #067A55;
  --orange: #F97316;
  --orange-bg: #FEF0E6;
  --red: #DC2626;
  --red-bg: #FDEEEE;
  --yellow-bg: #FDF6E3;
  --yellow-ink: #B45309;
  --shadow: 0 2px 12px rgba(31, 63, 47, .07);
  --shadow-lift: 0 8px 28px rgba(31, 63, 47, .13);
  --radius: 20px;
  --grad: linear-gradient(135deg, #34D399 0%, #059669 100%);
  --nav-h: 62px;
  --max-w: 560px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131613;
    --surface: #1C201C;
    --surface-2: #232823;
    --ink: #E7EAE4;
    --sub: #969E94;
    --line: #2B302B;
    --mint: #34D399;
    --mint-deep: #10B981;
    --mint-light: #6EE7B7;
    --mint-bg: #1E2F26;
    --mint-ink: #6EE7B7;
    --orange: #FB923C;
    --orange-bg: #33241A;
    --red: #F87171;
    --red-bg: #351D1D;
    --yellow-bg: #322818;
    --yellow-ink: #FBBF24;
    --shadow: 0 2px 12px rgba(0, 0, 0, .35);
    --shadow-lift: 0 8px 28px rgba(0, 0, 0, .5);
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* hidden 属性优先级最高，防止被显式 display 覆盖 */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'HarmonyOS Sans SC', 'MiSans', 'Microsoft YaHei', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 24px);
  transition: background .3s, color .3s;
}

body.locked { overflow: hidden; }

button { font-family: inherit; border: none; background: none; color: inherit; cursor: pointer; }
img { display: block; }

/* ---------- 顶部 ---------- */

.page-header {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 16px 20px 10px;
  max-width: var(--max-w);
  margin: 0 auto;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  width: 46px; height: 46px; border-radius: 15px;
  background: var(--grad);
  display: grid; place-items: center; font-size: 24px;
  box-shadow: var(--shadow-lift);
}
.brand h1 { font-size: 20px; letter-spacing: 1px; }
.brand-sub { font-size: 12px; color: var(--sub); margin-top: 2px; }

.page-title { font-size: 22px; letter-spacing: 1px; }

/* ---------- 统计条 ---------- */

.stats-strip {
  display: flex; gap: 10px;
  max-width: var(--max-w); margin: 6px auto 4px; padding: 0 20px;
}
.stat-pill {
  flex: 1;
  background: var(--surface);
  border-radius: 16px;
  padding: 10px 0 8px;
  text-align: center;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center; gap: 1px;
}
.stat-num { font-size: 20px; font-weight: 700; color: var(--mint-ink); font-variant-numeric: tabular-nums; }
.stat-label { font-size: 11px; color: var(--sub); }

/* ---------- 页面主体 ---------- */

.page-body {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 10px 16px 30px;
}

.view { display: none; }
.view.active { display: block; animation: viewIn .28s ease both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- 时光轴 ---------- */

.day-group { margin-bottom: 6px; }
.day-head { display: flex; align-items: center; gap: 8px; margin: 18px 2px 12px; }
.day-chip {
  background: var(--mint-bg); color: var(--mint-ink);
  font-size: 13px; font-weight: 700;
  padding: 5px 14px; border-radius: 99px;
}
.day-count { font-size: 12px; color: var(--sub); }

.rec-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  animation: cardIn .38s ease both;
}
.rec-card:nth-child(1) { animation-delay: .02s; }
.rec-card:nth-child(2) { animation-delay: .06s; }
.rec-card:nth-child(3) { animation-delay: .1s; }
.rec-card:nth-child(4) { animation-delay: .14s; }
.rec-card:nth-child(5) { animation-delay: .18s; }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.rec-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.rec-badge {
  font-size: 12px; font-weight: 600;
  padding: 3px 10px; border-radius: 99px;
  background: var(--surface-2); color: var(--ink);
}
.rec-badge--breakfast { background: var(--yellow-bg); color: var(--yellow-ink); }
.rec-badge--lunch { background: var(--mint-bg); color: var(--mint-ink); }
.rec-badge--dinner { background: #EDF0FA; color: #4F5FB5; }
.rec-badge--snack { background: var(--orange-bg); color: var(--orange); }
@media (prefers-color-scheme: dark) {
  .rec-badge--dinner { background: #232539; color: #A5ACE8; }
}
.rec-time { font-size: 12px; color: var(--sub); font-variant-numeric: tabular-nums; }
.rec-more {
  margin-left: auto; width: 30px; height: 26px;
  border-radius: 8px; color: var(--sub); font-size: 16px; line-height: 1;
}
.rec-more:active { background: var(--surface-2); }

.rec-photos { margin-bottom: 10px; }
.rec-photos img {
  width: 100%; border-radius: 14px; background: var(--surface-2);
  object-fit: cover; max-height: 320px;
}
.rec-photos--multi {
  display: flex; gap: 8px; overflow-x: auto;
  scrollbar-width: none;
}
.rec-photos--multi::-webkit-scrollbar { display: none; }
.rec-photos--multi img {
  width: 168px; height: 168px; flex: 0 0 auto;
  max-height: none;
}
.rec-photos--multi img:first-child:last-child { width: 100%; height: auto; max-height: 320px; aspect-ratio: auto; }

.rec-text { font-size: 15px; line-height: 1.7; margin-bottom: 8px; word-break: break-word; }
.rec-emojis { font-size: 24px; letter-spacing: 5px; margin: 2px 0 8px; }
.rec-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 12px; padding: 3px 10px; border-radius: 99px;
  background: var(--surface-2); color: var(--sub); font-weight: 500;
}
.tag--cal-low { background: var(--mint-bg); color: var(--mint-ink); }
.tag--cal-mid { background: var(--yellow-bg); color: var(--yellow-ink); }
.tag--cal-high { background: var(--red-bg); color: var(--red); }

/* 空状态 */
.empty-state { text-align: center; padding: 70px 20px 40px; animation: cardIn .4s ease both; }
.empty-state--sheet { padding: 40px 20px; }
.empty-emoji { font-size: 56px; margin-bottom: 14px; filter: drop-shadow(0 6px 12px rgba(16, 185, 129, .25)); }
.empty-title { font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.empty-sub { font-size: 13px; color: var(--sub); line-height: 1.6; }

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

.calendar-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px 14px 14px;
  box-shadow: var(--shadow);
}
.calendar-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; padding: 0 4px; }
.cal-month { font-size: 16px; font-weight: 700; letter-spacing: 1px; }
.cal-btn {
  width: 36px; height: 36px; border-radius: 12px;
  background: var(--surface-2); font-size: 20px; color: var(--ink);
  display: grid; place-items: center;
}
.cal-btn:disabled { opacity: .3; }
.cal-btn:active { transform: scale(.92); }

.cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 6px; }
.cal-weekdays span { text-align: center; font-size: 12px; color: var(--sub); padding: 4px 0; }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-day {
  position: relative;
  aspect-ratio: 1; border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 14px; color: var(--ink);
  transition: transform .12s;
}
.cal-day:active { transform: scale(.9); }
.cal-day--blank { pointer-events: none; }
.cal-day--future { color: var(--line); pointer-events: none; }
.cal-day--today { box-shadow: inset 0 0 0 1.5px var(--mint); font-weight: 700; }
.cal-day--has { background: var(--mint-bg); font-weight: 600; }
.cal-num { line-height: 1; }
.cal-dot {
  position: absolute; top: 5px; right: 5px;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--grad); color: #fff;
  font-size: 10px; font-weight: 700;
  border-radius: 99px;
  display: grid; place-items: center;
  box-shadow: 0 2px 6px rgba(5, 150, 105, .4);
}
.cal-tip { text-align: center; font-size: 12px; color: var(--sub); margin-top: 14px; }

/* ---------- 我的 ---------- */

.me-hero {
  background: var(--grad);
  border-radius: 24px;
  padding: 28px 20px 22px;
  text-align: center; color: #fff;
  box-shadow: var(--shadow-lift);
  margin-bottom: 16px;
}
.me-logo { font-size: 44px; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .18)); }
.me-hero h2 { font-size: 20px; letter-spacing: 3px; margin-top: 8px; }
.me-slogan { font-size: 12px; opacity: .85; margin-top: 4px; letter-spacing: 2px; }
.me-stats {
  display: flex; justify-content: center; gap: 8px; margin-top: 18px;
}
.me-stats > div {
  flex: 1; max-width: 110px;
  background: rgba(255, 255, 255, .16);
  border-radius: 14px; padding: 8px 0;
  display: flex; flex-direction: column; gap: 2px;
}
.me-stats b { font-size: 18px; font-variant-numeric: tabular-nums; }
.me-stats span { font-size: 11px; opacity: .85; }

.me-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  overflow: hidden;
}
.me-item {
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  padding: 15px 16px;
  text-align: left;
}
.me-item + .me-item { border-top: 1px solid var(--line); }
.me-item:active { background: var(--surface-2); }
.me-item > span:first-child { font-size: 22px; }
.me-item b { display: block; font-size: 15px; }
.me-item small { display: block; font-size: 12px; color: var(--sub); margin-top: 2px; }
.me-item .me-arrow { margin-left: auto; color: var(--line); font-size: 20px; }
.me-item--hl b { color: var(--mint-ink); }
.me-item--danger b { color: var(--red); }
.me-about { font-size: 12px; color: var(--sub); line-height: 1.8; padding: 4px 6px 10px; }

/* ---------- 底部导航 + FAB ---------- */

#bottomNav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--max-w);
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  z-index: 40;
}
.nav-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; color: var(--sub);
  transition: color .2s, transform .15s;
}
.nav-item .nav-icon { font-size: 21px; filter: grayscale(1) opacity(.55); transition: filter .2s; }
.nav-item.active { color: var(--mint-ink); font-weight: 600; }
.nav-item.active .nav-icon { filter: none; transform: scale(1.08); }
.nav-item:active { transform: scale(.92); }

#fab {
  position: fixed;
  right: calc(50% - var(--max-w) / 2 + 20px);
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 18px);
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--grad);
  color: #fff; font-size: 30px; font-weight: 300;
  display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(5, 150, 105, .45);
  z-index: 41;
  transition: transform .18s, box-shadow .18s;
}
#fab:active { transform: scale(.9) rotate(90deg); }
@media (max-width: 600px) { #fab { right: 20px; } }

/* ---------- Sheet 弹层 ---------- */

.sheet-mask {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(16, 20, 16, .45);
  opacity: 0; transition: opacity .3s;
}
.sheet-mask.show { opacity: 1; }

.sheet {
  position: fixed; bottom: 0; left: 50%;
  width: 100%; max-width: var(--max-w);
  transform: translate(-50%, 105%);
  transition: transform .32s cubic-bezier(.32, .72, .33, 1);
  background: var(--surface);
  border-radius: 26px 26px 0 0;
  z-index: 95;
  max-height: 92vh;
  display: flex; flex-direction: column;
}
.sheet.open { transform: translate(-50%, 0); }
.sheet--tall { height: 86vh; }
.sheet--mini { max-height: 42vh; }

.sheet-handle {
  width: 40px; height: 4.5px; border-radius: 99px;
  background: var(--line);
  margin: 10px auto 4px; flex: 0 0 auto;
}
.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 20px 10px; flex: 0 0 auto;
}
.sheet-head h2 { font-size: 17px; letter-spacing: 1px; }
.icon-btn {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface-2); color: var(--sub);
  display: grid; place-items: center; font-size: 13px;
}
.icon-btn:active { transform: scale(.9); }

.sheet-body {
  overflow-y: auto;
  padding: 4px 20px calc(20px + env(safe-area-inset-bottom));
  -webkit-overflow-scrolling: touch;
}
.sheet--mini .sheet-body { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }

/* ---------- 记录表单 ---------- */

.field-label {
  font-size: 13px; font-weight: 700; color: var(--sub);
  margin: 18px 0 8px; letter-spacing: 1px;
}

.photo-row { display: flex; gap: 10px; align-items: stretch; }
.photo-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.ph-thumb { position: relative; width: 86px; height: 86px; }
.ph-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 14px; background: var(--surface-2);
}
.ph-del {
  position: absolute; top: -6px; right: -6px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--ink); color: var(--bg);
  font-size: 11px; display: grid; place-items: center;
  box-shadow: var(--shadow);
}
.photo-add {
  display: flex; gap: 8px; align-items: center;
  opacity: 1; transition: opacity .25s;
}
.photo-add--full { opacity: .35; pointer-events: none; }
.photo-add-btn {
  width: 86px; height: 86px;
  border: 1.5px dashed var(--mint);
  border-radius: 14px;
  color: var(--mint-ink); font-size: 13px; font-weight: 600;
  display: flex; flex-direction: column; gap: 4px; align-items: center; justify-content: center;
  background: var(--mint-bg);
}
.photo-add-btn:active { transform: scale(.95); }

/* 表情 */
.emoji-chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; margin-bottom: 8px; }
.emoji-chips-hint { font-size: 12px; color: var(--line); align-self: center; }
.emoji-chip {
  font-size: 20px; padding: 3px 9px;
  background: var(--mint-bg); border-radius: 12px;
  animation: chipIn .2s ease both;
}
@keyframes chipIn { from { transform: scale(.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.emoji-quick {
  display: flex; gap: 4px; overflow-x: auto;
  padding: 6px; background: var(--surface-2);
  border-radius: 14px;
  scrollbar-width: none;
}
.emoji-quick::-webkit-scrollbar { display: none; }
.eq {
  flex: 0 0 auto; width: 42px; height: 42px;
  font-size: 22px; border-radius: 11px;
  transition: transform .12s, background .2s;
}
.eq.on { background: var(--surface); box-shadow: var(--shadow); transform: scale(1.05); }
.eq-more { color: var(--sub); font-size: 16px; font-weight: 700; letter-spacing: 2px; }

/* 文本域 */
textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1.5px solid transparent;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 15px; font-family: inherit; line-height: 1.6;
  color: var(--ink);
  resize: none;
  transition: border-color .2s;
}
textarea:focus { outline: none; border-color: var(--mint); }
textarea::placeholder { color: var(--sub); opacity: .7; }

/* 分段选择 */
.seg {
  display: flex; gap: 4px;
  background: var(--surface-2);
  border-radius: 14px; padding: 4px;
}
.seg button {
  flex: 1; padding: 9px 2px;
  border-radius: 11px;
  font-size: 13px; font-weight: 500; color: var(--sub);
  transition: all .18s;
}
.seg button.on {
  background: var(--surface); color: var(--mint-ink); font-weight: 700;
  box-shadow: var(--shadow);
}
@media (prefers-color-scheme: dark) {
  .seg button.on { background: #2B3A2F; }
}

/* 饱腹感 */
.satiety { display: flex; gap: 6px; }
.satiety button {
  flex: 1; padding: 10px 2px 8px;
  border-radius: 14px;
  background: var(--surface-2);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: all .18s;
}
.sat-face { font-size: 24px; filter: grayscale(1) opacity(.6); transition: filter .2s; }
.satiety button span:last-child { font-size: 10.5px; color: var(--sub); }
.satiety button.on { background: var(--mint-bg); box-shadow: inset 0 0 0 1.5px var(--mint); }
.satiety button.on .sat-face { filter: none; transform: scale(1.15); }

/* 保存按钮 */
.save-btn {
  width: 100%; margin-top: 22px;
  padding: 15px 0;
  background: var(--grad);
  color: #fff; font-size: 16px; font-weight: 700; letter-spacing: 2px;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(5, 150, 105, .35);
  transition: transform .15s, opacity .2s;
}
.save-btn:active { transform: scale(.97); }
.save-btn:disabled { opacity: .6; }

/* ---------- 表情完整面板 ---------- */

.emoji-panel .sheet-mask { position: absolute; }
.emoji-panel { position: fixed; inset: 0; z-index: 110; display: none; }
.emoji-panel:not([hidden]) { display: block; }
.emoji-panel-sheet {
  position: absolute; bottom: 0; left: 50%;
  transform: translate(-50%, 105%);
  transition: transform .3s cubic-bezier(.32, .72, .33, 1);
  max-height: 62vh; height: auto;
}
.emoji-panel.open .emoji-panel-sheet { transform: translate(-50%, 0); }

.emoji-tabs {
  display: flex; gap: 8px;
  padding: 6px 20px 10px;
  overflow-x: auto; scrollbar-width: none;
}
.emoji-tabs::-webkit-scrollbar { display: none; }
.emoji-tab {
  flex: 0 0 auto; padding: 6px 16px;
  border-radius: 99px; font-size: 13px; color: var(--sub);
  background: var(--surface-2);
}
.emoji-tab.on { background: var(--mint-bg); color: var(--mint-ink); font-weight: 700; }

.emoji-grid {
  display: grid; grid-template-columns: repeat(8, 1fr);
  gap: 2px; padding: 0 14px 8px;
  overflow-y: auto; max-height: 40vh;
}
.emoji-cell { font-size: 24px; padding: 7px 0; border-radius: 10px; }
.emoji-cell:active { background: var(--surface-2); transform: scale(1.2); }

.emoji-done {
  margin: 6px 20px calc(16px + env(safe-area-inset-bottom));
  padding: 12px 0; width: calc(100% - 40px);
  background: var(--grad); color: #fff;
  border-radius: 14px; font-size: 15px; font-weight: 600;
}

/* ---------- 操作面板 ---------- */

.action-list { display: flex; flex-direction: column; }
.action-item {
  padding: 16px; font-size: 15px; text-align: center;
  border-radius: 14px;
}
.action-item:active { background: var(--surface-2); }
.action-item + .action-item { margin-top: 2px; }
.action-danger { color: var(--red); font-weight: 600; }
.action-cancel { color: var(--sub); margin-top: 6px; }

/* ---------- 对话框 ---------- */

.dialog {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(.9);
  width: calc(100% - 64px); max-width: 340px;
  background: var(--surface);
  border-radius: 22px; padding: 24px 22px 18px;
  z-index: 100;
  opacity: 0; transition: all .25s cubic-bezier(.32, .72, .33, 1);
}
.dialog.open { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.dialog h3 { font-size: 17px; margin-bottom: 8px; text-align: center; }
.dialog p { font-size: 13.5px; color: var(--sub); line-height: 1.7; text-align: center; }
.dialog-btns { display: flex; gap: 10px; margin-top: 18px; }
.dialog-btn {
  flex: 1; padding: 11px 0;
  border-radius: 13px; font-size: 14.5px; font-weight: 600;
  background: var(--surface-2); color: var(--ink);
}
.dialog-btn--danger { background: var(--red); color: #fff; box-shadow: 0 4px 14px rgba(220, 38, 38, .3); }
.dialog-btn:active { transform: scale(.96); }

/* ---------- 图片查看器 ---------- */

.photo-viewer {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(10, 12, 10, .93);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .25s;
}
.photo-viewer.open { opacity: 1; }
.viewer-close {
  position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 16px;
  background: rgba(255, 255, 255, .14); color: #fff;
  z-index: 2;
}
.viewer-stage { width: 100%; height: 100%; display: grid; place-items: center; }
.viewer-stage img {
  max-width: 100%; max-height: calc(100vh - 90px);
  object-fit: contain;
  border-radius: 6px;
}
.viewer-count {
  position: absolute; bottom: calc(20px + env(safe-area-inset-bottom)); left: 50%;
  transform: translateX(-50%);
  color: #fff; font-size: 13px; letter-spacing: 2px;
  background: rgba(255, 255, 255, .14);
  padding: 5px 16px; border-radius: 99px;
}

/* ---------- Toast / Loading ---------- */

.toast {
  position: fixed;
  top: calc(18px + env(safe-area-inset-top));
  left: 50%; transform: translate(-50%, -16px);
  background: rgba(30, 34, 30, .92);
  color: #fff; font-size: 14px;
  padding: 10px 22px; border-radius: 99px;
  z-index: 140;
  opacity: 0; transition: all .3s cubic-bezier(.32, .72, .33, 1);
  box-shadow: var(--shadow-lift);
  max-width: 86vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.loading {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(16, 20, 16, .35);
  backdrop-filter: blur(4px);
  display: grid; place-items: center;
}
.loading-card {
  background: var(--surface);
  border-radius: 20px; padding: 24px 34px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  box-shadow: var(--shadow-lift);
}
.loading-card p { font-size: 13px; color: var(--sub); }
.spinner {
  width: 30px; height: 30px;
  border: 3px solid var(--mint-bg);
  border-top-color: var(--mint);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 桌面端微调 */
@media (min-width: 620px) {
  body { background: linear-gradient(180deg, #EFF3EC 0%, var(--bg) 30%); }
}
