/* ============ 姜安妮的专属空间 · 薄荷奶油风主题 ============ */
:root {
  --accent: #3db99f;
  --accent-soft: #e4f6f0;
  --danger: #ff5f6d;
  --danger-soft: #fdeff0;
  --grad-mint: linear-gradient(135deg, #9fe0cf 0%, #3db99f 100%);
  --bg: #eef9f5;
  --card: #ffffff;
  --text: #222222;
  --text-2: #666666;
  --text-3: #999999;
  --line: #f0f0f0;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 6px 20px rgba(61, 185, 159, 0.14);
  --chip-bg: #ffffff;
  --nav-bg: rgba(255, 255, 255, 0.92);
  --radius: 16px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

html[data-theme="dark"] {
  --accent: #6fd8c0;
  --accent-soft: #213f38;
  --danger: #ff7b85;
  --danger-soft: #3a2428;
  --bg: #121212;
  --card: #1f1f1f;
  --text: #f0f0f0;
  --text-2: #aaaaaa;
  --text-3: #777777;
  --line: #2e2e2e;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 6px 20px rgba(111, 216, 192, 0.16);
  --chip-bg: #2a2a2a;
  --nav-bg: rgba(28, 28, 28, 0.92);
}

html[data-theme="dark"] body {
  background-image: radial-gradient(130% 85% at 50% 32%, #14312a 0%, #0e1a17 48%, #0a0d0c 100%);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--bg);
  background-image: radial-gradient(130% 85% at 50% 32%, #d9f3ea 0%, #ecfaf5 48%, #fdfffe 100%);
  background-attachment: fixed;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  transition: background .3s, color .3s;
  overscroll-behavior-y: contain;
}

#app {
  max-width: 540px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: calc(24px + var(--safe-b));
}

h1, h2, h3 { font-weight: 700; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: 14px; }
img { display: block; }

/* ============ 顶部栏 ============ */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  padding: 10px 14px 0;
  transition: background .3s;
}

.header-top { display: flex; align-items: center; justify-content: space-between; }

.greeting { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--grad-mint);
  display: grid; place-items: center; font-size: 22px;
  box-shadow: 0 4px 10px rgba(61, 185, 159, .3);
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.greeting-text h1 { font-size: 17px; }
.greeting-text p { font-size: 12px; color: var(--text-2); }

.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--chip-bg); box-shadow: var(--shadow);
  font-size: 16px; display: grid; place-items: center;
  transition: transform .2s;
}
.icon-btn:active { transform: scale(.9); }
.install-btn {
  background: var(--grad-mint); color: #fff;
  padding: 7px 12px; border-radius: 999px; font-size: 12px; font-weight: 600;
  box-shadow: 0 4px 10px rgba(61, 185, 159, .3);
}

.section-nav {
  display: flex; gap: 8px;
  overflow-x: auto; padding: 10px 0 12px;
  scrollbar-width: none;
}
.section-nav::-webkit-scrollbar { display: none; }
.nav-chip {
  flex: 0 0 auto;
  padding: 7px 14px; border-radius: 999px;
  background: var(--chip-bg); color: var(--text-2);
  font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow);
  transition: all .25s;
}
.nav-chip.active {
  background: var(--accent); color: #fff;
  box-shadow: 0 4px 12px rgba(61, 185, 159, .35);
  transform: scale(1.04);
}

/* ============ 通用 ============ */
.content { padding: 6px 14px 0; }
.section { margin-top: 18px; scroll-margin-top: 118px; animation: fadeUp .45s ease both; }
.section:nth-child(2) { animation-delay: .02s; }
.section:nth-child(3) { animation-delay: .06s; }
.section:nth-child(4) { animation-delay: .1s; }
.section:nth-child(5) { animation-delay: .14s; }
.section:nth-child(6) { animation-delay: .18s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pop {
  0% { transform: scale(.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  30% { transform: scale(1.18); }
}

.section-title {
  font-size: 17px; margin-bottom: 10px;
  display: flex; align-items: center; justify-content: space-between;
}
.title-action { font-size: 12px; color: var(--accent); font-weight: 600; }

.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px;
  transition: background .3s;
}

.btn-primary {
  background: var(--grad-mint); color: #fff;
  padding: 10px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 600;
  box-shadow: 0 4px 12px rgba(61, 185, 159, .28);
  transition: transform .15s, box-shadow .15s;
}
.btn-primary:active { transform: scale(.96); box-shadow: 0 2px 6px rgba(61,185,159,.25); }
.btn-primary.full { width: 100%; margin-top: 12px; }
.btn-primary.flex-btn { flex: 0 0 auto; }
.btn-primary.btn-small { padding: 7px 14px; font-size: 13px; }

.btn-ghost {
  background: var(--accent-soft); color: var(--accent);
  padding: 9px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
  transition: transform .15s;
}
.btn-ghost:active { transform: scale(.95); }

input[type="text"], input[type="search"], input[type="number"],
input[type="datetime-local"], input[type="date"], textarea, select {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 10px 12px; background: var(--card); color: var(--text);
  outline: none; transition: border-color .2s;
}
input:focus, textarea:focus { border-color: var(--accent); }
textarea { resize: none; }
.muted { color: var(--text-3); text-align: center; padding: 18px 0; }
.small { font-size: 11px; line-height: 1.6; margin-top: 10px; }

/* ============ 天气卡 ============ */
.weather-card {
  border-radius: 20px; padding: 18px 16px 14px;
  color: #fff; position: relative; overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  transition: background .4s;
}
.weather-card::after {
  content: ""; position: absolute; right: -30px; top: -30px;
  width: 150px; height: 150px; border-radius: 50%;
  background: rgba(255,255,255,.12);
}
.w-sunny  { background: linear-gradient(135deg, #ffb75e 0%, #ff7e5f 100%); }
.w-cloudy { background: linear-gradient(135deg, #8ec5fc 0%, #6a9ed8 100%); }
.w-over   { background: linear-gradient(135deg, #8e9eab 0%, #6d7a82 100%); }
.w-rain   { background: linear-gradient(135deg, #667eea 0%, #4a5fc1 100%); }
.w-snow   { background: linear-gradient(135deg, #a1c4fd 0%, #7aa3e0 100%); }
.w-fog    { background: linear-gradient(135deg, #b8c6db 0%, #8d99a8 100%); }
.w-night  { background: linear-gradient(135deg, #4b4e7a 0%, #2c2e55 100%); }
.w-loading{ background: linear-gradient(135deg, #b2ecda 0%, #e0f8f0 100%); }

.weather-top { display: flex; justify-content: space-between; align-items: flex-start; position: relative; z-index: 1; }
.weather-main { display: flex; align-items: center; gap: 10px; }
.weather-icon { font-size: 46px; animation: pop .5s ease; }
.weather-temp { font-size: 42px; font-weight: 300; line-height: 1.1; }
.weather-desc { font-size: 13px; opacity: .92; }
.weather-meta { text-align: right; }
.city-btn { color: #fff; font-size: 13px; font-weight: 600; opacity: .95; }
.weather-meta p { font-size: 12px; opacity: .85; }
.weather-upd { opacity: .7 !important; font-size: 11px !important; }

.weather-chips { display: flex; gap: 7px; flex-wrap: wrap; margin: 12px 0 10px; position: relative; z-index: 1; }
.w-chip {
  background: rgba(255,255,255,.22); backdrop-filter: blur(6px);
  padding: 4px 10px; border-radius: 999px; font-size: 12px;
}

.weather-forecast {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  position: relative; z-index: 1; margin-bottom: 10px;
}
.fc-day {
  background: rgba(255,255,255,.18); border-radius: 14px;
  padding: 8px 4px; text-align: center;
}
.fc-day .fc-name { font-size: 11px; opacity: .9; }
.fc-day .fc-icon { font-size: 20px; margin: 2px 0; }
.fc-day .fc-temp { font-size: 11px; font-weight: 600; }

.weather-tips {
  background: rgba(255,255,255,.92); color: #444;
  border-radius: 14px; padding: 10px 12px;
  position: relative; z-index: 1;
}
.tip-tag { color: var(--accent); font-size: 12px; font-weight: 700; }
.weather-tips p { font-size: 13px; margin-top: 3px; }
.tip-extra { color: #777; font-size: 12px !important; }
.weather-cache {
  position: relative; z-index: 1; margin-top: 8px;
  font-size: 11px; opacity: .85; text-align: center;
}

/* ============ 每日一句 ============ */
.quote-card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px 20px 16px;
  position: relative; overflow: hidden;
  transition: background .3s, box-shadow .3s;
}
.quote-card:active { box-shadow: var(--shadow-hover); }
.quote-bg {
  position: absolute; right: 10px; top: -18px;
  font-size: 110px; color: var(--accent-soft);
  font-family: Georgia, serif; line-height: 1; pointer-events: none;
}
.quote-text {
  font-size: 19px; font-weight: 600; line-height: 1.7;
  position: relative; z-index: 1;
}
.quote-from { color: var(--text-3); font-size: 13px; margin-top: 12px; text-align: right; }
.quote-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.q-btn {
  flex: 1; min-width: 72px;
  background: var(--accent-soft); color: var(--accent);
  padding: 8px 6px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  transition: transform .15s;
}
.q-btn:active { transform: scale(.94); }
.q-btn.faved { background: var(--accent); color: #fff; }

/* ============ 生理期 ============ */
.period-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  margin-bottom: 14px;
}
.ps-item {
  background: linear-gradient(135deg, #eafaf4, #d9f3ea);
  border-radius: 14px; padding: 10px 4px; text-align: center;
}
html[data-theme="dark"] .ps-item { background: var(--accent-soft); }
.ps-item .ps-num { font-size: 19px; font-weight: 700; color: var(--accent); }
.ps-item .ps-label { font-size: 10px; color: var(--text-2); margin-top: 2px; }

.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-month { font-size: 16px; font-weight: 700; }
.cal-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  font-size: 18px; font-weight: 700;
}
.cal-weekdays, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.cal-weekdays span { font-size: 11px; color: var(--text-3); padding: 4px 0; }
.cal-cell {
  position: relative;
  aspect-ratio: 1;
  display: grid; place-items: center;
  font-size: 13px; margin: 2px; border-radius: 50%;
  transition: transform .15s;
}
.cal-cell:active { transform: scale(.9); }
.cal-cell.dim { color: var(--text-3); opacity: .45; }
.cal-cell.period { background: var(--accent); color: #fff; font-weight: 700; box-shadow: 0 3px 8px rgba(61,185,159,.35); }
.cal-cell.predict { background: var(--accent-soft); color: var(--accent); font-weight: 600; border: 1.5px dashed var(--accent); }
.cal-cell.fertile { background: #e8f7ef; color: #2a9d63; }
html[data-theme="dark"] .cal-cell.fertile { background: #1e3a2e; color: #6fd6a4; }
.cal-cell.ovu { background: #c8f0dd; color: #137a4a; font-weight: 700; }
html[data-theme="dark"] .cal-cell.ovu { background: #2a6a4b; color: #c8f7e0; }
.cal-cell.predict.fertile { border-color: #2a9d63; color: #2a9d63; }
.cal-cell.today::after {
  content: ""; position: absolute; bottom: 4px; left: 50%;
  transform: translateX(-50%);
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
}
.cal-cell.period.today::after, .cal-cell.predict.today::after { background: #fff; }

.cal-legend {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin: 10px 0 4px; font-size: 11px; color: var(--text-2);
}
.cal-legend span { display: flex; align-items: center; gap: 4px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot-period { background: var(--accent); }
.dot-predict { background: var(--accent-soft); border: 1px dashed var(--accent); }
.dot-ovu { background: #2a9d63; }
.dot-fertile { background: #9edcc0; }
.dot-today { background: #fff; border: 2px solid var(--accent); width: 8px; height: 8px; }

.period-hint { font-size: 11px; color: var(--text-3); text-align: center; margin: 6px 0 10px; }
.period-actions { display: flex; gap: 8px; }
.period-actions .btn-primary { flex: 1; }

/* ============ 倒计时 ============ */
.countdown-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.cd-card {
  border-radius: var(--radius); padding: 16px;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
  animation: pop .3s ease;
}
.cd-card.style-sweet { background: var(--grad-mint); color: #fff; }
.cd-card.style-minimal { background: var(--card); color: var(--text); border: 1.5px solid var(--line); }
.cd-card.style-neon {
  background: linear-gradient(135deg, #240b44 0%, #3d1466 60%, #5b1d8f 100%);
  color: #d9c7ff;
}
.cd-head { display: flex; align-items: center; justify-content: space-between; }
.cd-name { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.cd-date { font-size: 11px; opacity: .75; margin-top: 2px; }
.cd-del { font-size: 14px; opacity: .7; padding: 4px; }
.cd-nums { display: flex; gap: 6px; margin-top: 12px; }
.cd-num-box { flex: 1; text-align: center; }
.cd-num {
  display: block; font-size: 22px; font-weight: 700;
  background: rgba(255,255,255,.2); border-radius: 10px;
  padding: 6px 0; font-variant-numeric: tabular-nums;
}
.style-minimal .cd-num { background: var(--accent-soft); color: var(--accent); }
.style-neon .cd-num {
  background: rgba(185, 130, 255, .16);
  color: #c79bff; text-shadow: 0 0 12px rgba(199,155,255,.7);
  border: 1px solid rgba(199,155,255,.35);
}
.cd-unit { display: block; font-size: 10px; opacity: .8; margin-top: 4px; }
.cd-status { font-size: 12px; margin-top: 10px; opacity: .9; }
.cd-status.passed { opacity: .8; }

/* 添加倒计时表单 */
.form-label { font-size: 12px; color: var(--text-2); margin: 12px 0 8px; font-weight: 600; }
.form-label:first-child { margin-top: 0; }
.emoji-row, .style-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.emoji-row::-webkit-scrollbar, .style-row::-webkit-scrollbar { display: none; }
.emoji-opt {
  flex: 0 0 auto;
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--bg); font-size: 20px;
  display: grid; place-items: center;
  border: 2px solid transparent; transition: all .2s;
}
.emoji-opt.selected { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.08); }
.style-opt {
  flex: 0 0 auto; padding: 7px 14px; border-radius: 999px;
  background: var(--bg); color: var(--text-2);
  font-size: 12px; font-weight: 600; border: 2px solid transparent;
}
.style-opt.selected { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.form-row { display: flex; gap: 8px; margin-top: 10px; }
.form-select { flex: 1; }

/* ============ 留言板 ============ */
.mood-row { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.mood-row::-webkit-scrollbar { display: none; }
.mood-opt {
  flex: 0 0 auto;
  padding: 5px 11px; border-radius: 999px;
  background: var(--bg); font-size: 12px; color: var(--text-2);
  border: 1.5px solid transparent; transition: all .2s;
}
.mood-opt.selected { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }

.board-input-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
#boardCount { font-size: 11px; color: var(--text-3); }

.board-status {
  font-size: 11px; color: var(--text-3);
  margin: -2px 2px 8px;
  display: flex; align-items: center; gap: 5px;
}
.board-status.cloud { color: #2a9d63; font-weight: 600; }
.board-status.err { color: var(--danger); }
.btn-ghost.full { width: 100%; text-align: center; }

/* 云端设置：provider 选项卡 */
.prov-tabs { display: flex; gap: 8px; margin: 4px 0 12px; }
.prov-tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 10px 8px; border-radius: 12px;
  border: 1.5px solid var(--border); background: var(--bg);
  color: var(--text-2); font-size: 12px; line-height: 1.4;
  transition: all .2s;
}
.prov-tab b { font-size: 13px; color: var(--text); }
.prov-tab span { font-size: 11px; color: var(--text-3); }
.prov-tab.active { border-color: var(--accent); background: var(--accent-soft); }
.prov-tab.active b { color: var(--accent); }

.board-list { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.msg-card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 12px 14px;
  animation: fadeUp .3s ease;
}
.msg-head { display: flex; align-items: center; gap: 8px; }
.msg-mood { font-size: 15px; }
.msg-mood-tag {
  font-size: 11px; color: var(--accent); background: var(--accent-soft);
  padding: 2px 8px; border-radius: 999px; font-weight: 600;
}
.msg-author { font-size: 12px; font-weight: 600; }
.msg-time { font-size: 11px; color: var(--text-3); margin-left: auto; }
.msg-text { margin: 8px 0; font-size: 14px; word-break: break-word; }
.msg-actions { display: flex; gap: 16px; }
.msg-act { font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 4px; }
.msg-act.liked { color: var(--accent); font-weight: 600; }
.msg-act.liked .heart { animation: heartbeat .4s ease; }
.msg-replies { margin-top: 10px; padding-left: 10px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.reply-item { font-size: 13px; }
.reply-item .r-author { color: var(--accent); font-weight: 600; }
.reply-item .r-time { color: var(--text-3); font-size: 10px; margin-left: 6px; }
.reply-form { display: flex; gap: 6px; margin-top: 8px; }
.reply-form input { padding: 7px 10px; font-size: 12px; }
.reply-form button { padding: 0 12px; font-size: 12px; }

.load-more-wrap { text-align: center; margin-top: 12px; }
.load-more {
  background: var(--card); color: var(--accent);
  padding: 9px 22px; border-radius: 999px; font-size: 13px;
  box-shadow: var(--shadow); font-weight: 600;
}

/* ============ 相册 ============ */
.album-filter { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.album-filter::-webkit-scrollbar { display: none; }
.album-chip {
  flex: 0 0 auto; padding: 6px 13px; border-radius: 999px;
  background: var(--card); color: var(--text-2);
  font-size: 12px; box-shadow: var(--shadow);
}
.album-chip.selected { background: var(--accent); color: #fff; font-weight: 600; }

.album-grid { column-count: 2; column-gap: 10px; }
.album-item, .album-upload {
  width: 100%; break-inside: avoid;
  border-radius: var(--radius); overflow: hidden;
  margin-bottom: 10px; display: block;
  box-shadow: var(--shadow);
  background: var(--card);
  transition: transform .2s, box-shadow .2s;
}
.album-item:active { transform: scale(.97); }
.album-item img { width: 100%; height: auto; }
.album-item .ph-cap {
  padding: 7px 10px; font-size: 12px; color: var(--text);
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
}
.album-item .ph-cap .ph-tags { color: var(--accent); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.album-upload {
  aspect-ratio: 3/4;
  border: 2px dashed var(--accent);
  color: var(--accent);
  display: grid !important; place-content: center; justify-items: center; gap: 6px;
  background: var(--accent-soft);
  font-size: 13px; font-weight: 600;
}
.album-upload .plus { font-size: 38px; line-height: 1; }
.album-hint { text-align: center; font-size: 11px; color: var(--text-3); margin-top: 10px; }

/* ============ 灯箱 ============ */
.lightbox[hidden] { display: none; }
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.96);
  display: flex; flex-direction: column;
  animation: fadeUp .25s ease;
}
.lb-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
}
.lb-icon {
  color: #fff; background: rgba(255,255,255,.14);
  width: 38px; height: 38px; border-radius: 50%;
  font-size: 15px; display: grid; place-items: center;
}
.lb-zoom { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 12px; }
.lb-img-wrap {
  flex: 1; overflow: hidden; display: grid; place-items: center;
  min-height: 0;
}
#lbImg {
  max-width: 100%; max-height: 100%;
  transition: transform .25s ease;
  transform-origin: center;
  user-select: none; -webkit-user-drag: none;
}
.lb-caption-box { padding: 10px 14px calc(14px + var(--safe-b)); background: rgba(20,20,20,.9); }
.lb-caption-box input {
  background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.15);
  color: #fff; margin-bottom: 8px;
}
.lb-caption-box input::placeholder { color: rgba(255,255,255,.45); }
.lb-foot { display: flex; align-items: center; justify-content: space-between; }
.lb-album-tag { color: #8fe0cb; font-size: 11px; }

/* ============ 底部 ============ */
.app-footer { text-align: center; color: var(--text-3); font-size: 11px; padding: 22px 0 8px; }

/* ============ Modal / Sheet ============ */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.modal[hidden] { display: none; }
.modal-mask { position: absolute; inset: 0; background: rgba(0,0,0,.45); animation: fadeIn .2s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-body.sheet {
  position: relative; width: 100%; max-width: 540px;
  background: var(--card);
  border-radius: 22px 22px 0 0;
  padding: 8px 18px calc(20px + var(--safe-b));
  max-height: 78vh; overflow-y: auto;
  animation: slideUp .28s cubic-bezier(.22,.9,.32,1);
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet-handle { width: 38px; height: 4px; border-radius: 2px; background: var(--line); margin: 6px auto 12px; }
.modal-body h3 { font-size: 16px; margin-bottom: 12px; text-align: center; }

.search-row { display: flex; gap: 8px; }
.city-results { margin-top: 12px; display: flex; flex-direction: column; }
.city-item {
  padding: 12px 6px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 8px; text-align: left;
  font-size: 14px;
}
.city-item:last-child { border-bottom: none; }
.city-item .ci-sub { font-size: 11px; color: var(--text-3); }

.tabs { display: flex; background: var(--bg); border-radius: 999px; padding: 3px; margin-bottom: 12px; }
.tab { flex: 1; padding: 8px; border-radius: 999px; font-size: 13px; color: var(--text-2); font-weight: 600; }
.tab.active { background: var(--card); color: var(--accent); box-shadow: var(--shadow); }

.quote-lib-item {
  background: var(--bg); border-radius: 14px; padding: 12px 14px;
  margin-bottom: 10px; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px;
}
.quote-lib-item .qli-text { font-size: 14px; font-weight: 600; }
.quote-lib-item .qli-meta { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.quote-lib-item .qli-actions { display: flex; flex-direction: column; gap: 6px; flex: 0 0 auto; }
.qli-btn { font-size: 11px; color: var(--accent); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }

.setting-row { display: block; font-size: 13px; color: var(--text-2); margin-top: 14px; }
.setting-row input { margin-top: 8px; width: 100%; }
.backup-row { display: flex; gap: 8px; margin-top: 14px; }
.backup-row .btn-ghost { flex: 1; text-align: center; }

/* ============ Toast ============ */
.toast {
  position: fixed; left: 50%; bottom: 12%;
  transform: translateX(-50%);
  background: rgba(30,30,30,.92); color: #fff;
  padding: 10px 20px; border-radius: 999px;
  font-size: 13px; z-index: 300;
  animation: toastIn .3s ease;
  max-width: 80%; text-align: center;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ============ 响应式 ============ */
@media (min-width: 541px) {
  body { padding: 0 12px; }
  #app { background: transparent; }
}
@media (max-width: 340px) {
  .weather-temp { font-size: 36px; }
  .cd-num { font-size: 18px; }
  .q-btn { min-width: 64px; font-size: 11px; }
}

/* ============ v7：倒计时云同步状态 ============ */
.cd-sync { color: var(--text-3); }
.cd-sync[data-state="syncing"] { color: #e6892e; animation: cdPulse 1.2s ease infinite; }
.cd-sync[data-state="ok"] { color: #1faf6e; }
.cd-sync[data-state="err"] { color: var(--danger); }
.cd-sync[data-state="local"] { color: var(--text-3); }
@keyframes cdPulse { 50% { opacity: .45; } }

/* ============ v7：留言删除按钮（右下角图标） ============ */
.msg-card { position: relative; }
.msg-del {
  position: absolute; right: 14px; bottom: 12px;
  width: 30px; height: 30px; border-radius: 50%;
  border: none; cursor: pointer;
  background: var(--danger-soft); color: var(--danger);
  font-size: 13px; display: grid; place-items: center;
  transition: transform .15s ease, background .15s ease;
}
.msg-del:active { transform: scale(.88); }

/* ============ v7：删除确认弹层 ============ */
.del-warn {
  font-size: 13px; color: var(--text-2); line-height: 1.7;
  background: var(--danger-soft); border-radius: 12px;
  padding: 12px 14px; margin: 14px 0 18px;
}
.del-actions { display: flex; gap: 10px; }
.del-actions .btn-ghost { flex: 1; text-align: center; }
.btn-danger {
  flex: 1; padding: 12px 0; border: none; border-radius: 14px;
  background: var(--danger); color: #fff; font-size: 14px; font-weight: 600;
  cursor: pointer;
}
.btn-danger:active { transform: scale(.96); }

/* ============ v7：相册云同步/上传进度 ============ */
.album-sync {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 12px; color: var(--text-2);
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 14px; margin-bottom: 10px;
}
.progress-track {
  height: 6px; border-radius: 3px; background: var(--accent-soft);
  overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: 3px;
  background: var(--grad-mint);
  transition: width .2s ease;
}
.album-item.just-added { animation: popIn .5s ease; }
@keyframes popIn {
  0% { transform: scale(.85); opacity: .3; }
  60% { transform: scale(1.04); }
  100% { transform: scale(1); opacity: 1; }
}

/* ============ v7：相册移动端单列 ============ */
@media (max-width: 600px) {
  .album-grid { column-count: 1; }
}
