/* =========================================================
   奶油暖色设计系统 —— 所有模块共用
   ========================================================= */
:root {
  --bg: #fbf7f1;
  --bg-soft: #f6ede2;
  --card: #ffffff;
  --ink: #3b302a;
  --ink-soft: #5d4f46;
  --muted: #9c8b7e;
  --line: #f0e4d6;
  --accent: #d98363;
  --accent-deep: #c96f4a;
  --accent-soft: #fbe9df;
  --gold: #d9a441;
  --green: #7ba05b;
  --radius: 20px;
  --radius-sm: 13px;
  --shadow: 0 8px 24px rgba(160, 120, 90, .10);
  --shadow-sm: 0 3px 10px rgba(160, 120, 90, .08);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(170deg, #fffdf9 0%, var(--bg) 45%, var(--bg-soft) 100%);
  background-attachment: fixed;
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 560px; margin: 0 auto; padding: 22px 18px 40px; }

/* ---------- 文本 ---------- */
h1 { font-size: 24px; margin: 0; letter-spacing: .3px; font-weight: 700; }
h2 { font-size: 18px; margin: 0 0 12px; font-weight: 650; }
h3 { font-size: 15px; margin: 0 0 10px; font-weight: 650; }
.sub { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.mono-time { font-size: 11.5px; color: #b8a99c; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(240, 228, 214, .8);
}

/* ---------- 按钮 ---------- */
.btn {
  border: none; border-radius: var(--radius-sm); padding: 12px 20px;
  font-size: 15px; font-weight: 650; color: #fff; cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  box-shadow: 0 8px 18px rgba(217, 131, 99, .28);
  transition: transform .12s, opacity .12s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; box-shadow: none; }
.btn.ghost {
  background: #fff; color: var(--ink-soft);
  border: 1.5px solid var(--line); box-shadow: none;
}
.btn.small { padding: 8px 14px; font-size: 13px; border-radius: 10px; }

/* ---------- 输入 ---------- */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
input[type=text], input[type=password], input[type=date], input[type=number], textarea, select {
  width: 100%; padding: 12px 13px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); font-size: 15px; font-family: inherit;
  outline: none; background: #fffdfa; color: var(--ink);
  transition: border-color .15s;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
textarea { min-height: 80px; resize: vertical; }

/* ---------- 列表 ---------- */
.list { display: flex; flex-direction: column; gap: 10px; }
.item {
  background: var(--card); border-radius: 16px; padding: 14px 16px;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(240, 228, 214, .7);
}
.item-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.item-title { font-size: 15px; font-weight: 600; }
.item-body { font-size: 14px; color: var(--ink-soft); line-height: 1.65; margin-top: 6px; white-space: pre-wrap; word-break: break-word; }
.item-foot { margin-top: 8px; display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; }

/* ---------- 空状态 ---------- */
.empty { text-align: center; color: var(--muted); padding: 42px 0; font-size: 14px; }
.empty .big { font-size: 34px; display: block; margin-bottom: 10px; opacity: .8; }

/* ---------- 标签 ---------- */
.tag {
  font-size: 11.5px; padding: 3px 9px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-deep); font-weight: 600;
}
.tag.gray { background: #f2ede7; color: var(--muted); }
.tag.green { background: #eaf2e3; color: var(--green); }

/* ---------- 顶部栏 ---------- */
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 4px 0 18px;
}
.back {
  width: 38px; height: 38px; flex: none; border-radius: 12px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-soft); font-size: 17px; cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.topbar .titles { min-width: 0; }
.topbar h1 { font-size: 21px; }
.topbar .sub { margin-top: 3px; }

/* ---------- 浮动提示 ---------- */
.toast {
  position: fixed; left: 50%; top: 24%; transform: translate(-50%, -50%) scale(.92);
  background: rgba(59, 48, 42, .93); color: #fff; padding: 13px 20px; border-radius: 14px;
  font-size: 14.5px; opacity: 0; pointer-events: none; transition: .22s; z-index: 90;
  max-width: 82vw; text-align: center; line-height: 1.5;
}
.toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* ---------- 入口密码 ---------- */
.gate-mask {
  position: fixed; inset: 0; z-index: 100; display: none;
  align-items: center; justify-content: center; padding: 24px;
  background: linear-gradient(170deg, #fffdf9 0%, var(--bg) 45%, var(--bg-soft) 100%);
}
.gate-mask.show { display: flex; }
.gate-card {
  width: 100%; max-width: 340px; background: #fff; border-radius: 24px;
  padding: 30px 26px; box-shadow: 0 18px 46px rgba(160, 120, 90, .16); text-align: center;
}
.gate-card h2 { margin: 0 0 6px; font-size: 21px; }
.gate-card p { margin: 0 0 20px; font-size: 13px; color: var(--muted); line-height: 1.6; }
.gate-card input { text-align: center; margin-bottom: 12px; }
.gate-card .btn { width: 100%; }
.gate-err { min-height: 18px; margin-top: 10px; font-size: 12.5px; color: #c0563f; }

/* ---------- 首页 ---------- */
.hello { padding: 8px 0 22px; }
.hello .date { font-size: 12.5px; color: var(--muted); letter-spacing: .5px; text-transform: uppercase; }
.hello h1 { margin-top: 6px; font-size: 26px; }
.hello .hint { margin-top: 8px; font-size: 13.5px; color: var(--muted); }

.mod-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px; }
.mod-card {
  position: relative; background: var(--card); border-radius: 22px; padding: 18px 16px 16px;
  box-shadow: var(--shadow); border: 1px solid rgba(240, 228, 214, .8);
  cursor: pointer; transition: transform .14s, box-shadow .14s; overflow: hidden;
  font-family: inherit; text-align: left; color: var(--ink); width: 100%;
}
.mod-card:active { transform: scale(.975); }
.mod-card .icon { font-size: 28px; line-height: 1; }
.mod-card .name { margin-top: 12px; font-size: 16px; font-weight: 650; }
.mod-card .desc { margin-top: 4px; font-size: 11.5px; color: var(--muted); line-height: 1.45; min-height: 32px; }
.mod-card .dot {
  position: absolute; top: 14px; right: 14px; min-width: 20px; height: 20px; border-radius: 10px;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; padding: 0 6px;
}
.mod-card::after {
  content: ''; position: absolute; right: -30px; bottom: -40px; width: 100px; height: 100px;
  border-radius: 50%; background: radial-gradient(circle, rgba(217,131,99,.10), transparent 70%);
}

/* ---------- 模块通用容器 ---------- */
.module { padding-bottom: 30px; }
.module.has-bar { padding-bottom: 104px; }
.section { margin-top: 18px; }

/* ---------- 首页页脚 ---------- */
.home-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 28px; padding: 0 4px; font-size: 12.5px; color: var(--muted);
}
.home-foot a { color: var(--accent-deep); text-decoration: none; font-weight: 600; }
.foot-actions { display: flex; align-items: center; gap: 14px; }
.link-btn {
  border: none; background: none; padding: 0; margin: 0; cursor: pointer;
  font: inherit; font-size: 12.5px; color: var(--muted);
}
.link-btn:active { opacity: .6; }

/* ---------- 标签页 ---------- */
.tabs {
  display: flex; gap: 8px; background: rgba(255, 255, 255, .75);
  padding: 4px; border-radius: 14px; margin-bottom: 16px;
  border: 1px solid rgba(240, 228, 214, .9);
}
.tab {
  flex: 1; text-align: center; padding: 9px 0; border-radius: 11px;
  font-size: 14px; color: var(--muted); cursor: pointer;
  border: none; background: transparent; transition: .18s; font-family: inherit;
}
.tab.active {
  background: #fff; color: var(--ink); font-weight: 650;
  box-shadow: 0 2px 8px rgba(160, 120, 90, .12);
}

/* ---------- 卡片网格（点单等模块通用） ---------- */
.dish-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.dish {
  position: relative; background: var(--card); border-radius: 18px; padding: 14px;
  box-shadow: var(--shadow-sm); cursor: pointer; border: 2px solid transparent;
  transition: transform .12s, border-color .12s, background .12s;
  text-align: left; font-family: inherit; color: var(--ink);
}
.dish:active { transform: scale(.97); }
.dish.on { border-color: var(--accent); background: #fffaf5; }
.dish .emoji { font-size: 28px; line-height: 1; }
.dish .name { margin-top: 8px; font-size: 15px; font-weight: 650; }
.dish .desc { margin-top: 3px; font-size: 11.5px; color: var(--muted); line-height: 1.4; min-height: 32px; }
.dish .qty {
  position: absolute; top: 10px; right: 10px; min-width: 24px; height: 24px; border-radius: 12px;
  background: var(--accent); color: #fff; font-size: 13px; font-weight: 700;
  display: none; align-items: center; justify-content: center; padding: 0 7px;
}
.dish.on .qty { display: flex; }

/* ---------- 底部提交栏 ---------- */
.bar {
  position: fixed; left: 0; right: 0; bottom: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(255, 253, 250, .99), rgba(255, 253, 250, .88));
  backdrop-filter: blur(10px); border-top: 1px solid var(--line); z-index: 20;
}
.bar-inner { width: 100%; max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.bar .count { font-size: 13px; color: var(--muted); flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar .count b { color: var(--accent-deep); font-size: 17px; }
.submit {
  flex: 0 0 auto; white-space: nowrap; border: none; border-radius: 14px; padding: 13px 22px;
  font-size: 15px; font-weight: 700; color: #fff; cursor: pointer; font-family: inherit;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  box-shadow: 0 8px 20px rgba(217, 131, 99, .32);
}
.submit:disabled { opacity: .45; box-shadow: none; }

/* ---------- 面板 ---------- */
.panel {
  background: var(--card); border-radius: 18px; padding: 16px; margin-top: 16px;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(240, 228, 214, .7);
}
.panel h3 { margin: 0 0 10px; font-size: 14px; font-weight: 650; }

/* ---------- 图片上传 ---------- */
.uploader { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.thumb { position: relative; width: 68px; height: 68px; border-radius: 12px; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .del {
  position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(59, 48, 42, .62); color: #fff; border: none; font-size: 12px;
  line-height: 20px; text-align: center; cursor: pointer; padding: 0;
}
.add-img {
  width: 68px; height: 68px; border-radius: 12px; border: 1.5px dashed #e6d5c4;
  background: #fffbf6; color: var(--muted); font-size: 24px; cursor: pointer;
}

/* ---------- 状态徽标 ---------- */
.badge { font-size: 11.5px; padding: 3px 10px; border-radius: 999px; font-weight: 650; }
.badge.pending { background: #fdf0dd; color: #c07a1f; }
.badge.doing   { background: #e8f0fb; color: #2f6fd0; }
.badge.done    { background: #e9f5e5; color: #4d8a2f; }

/* ---------- 订单卡片 ---------- */
.order {
  background: var(--card); border-radius: 16px; padding: 14px 16px; margin-bottom: 12px;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(240, 228, 214, .7);
}
.order-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.order-id { font-size: 12px; color: var(--muted); }
.order-items { margin-top: 8px; font-size: 14px; line-height: 1.7; }
.order-note { margin-top: 6px; font-size: 13px; color: var(--ink-soft); background: #fdf6ee; padding: 8px 10px; border-radius: 10px; }
.order-imgs { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.order-imgs img { width: 56px; height: 56px; object-fit: cover; border-radius: 9px; cursor: pointer; }
.order-time { margin-top: 8px; font-size: 11.5px; color: #b8a99c; }

/* ---------- 弹层 ---------- */
.modal {
  position: fixed; inset: 0; background: rgba(59, 48, 42, .45); display: none;
  align-items: center; justify-content: center; z-index: 60; padding: 24px;
}
.modal.show { display: flex; }
.modal-card {
  background: #fff; border-radius: 20px; padding: 22px; text-align: center;
  max-width: 360px; width: 100%; box-shadow: 0 18px 46px rgba(160, 120, 90, .2);
}
.modal-card img { width: 100%; max-width: 260px; border-radius: 12px; }
.modal-card button { margin-top: 14px; }


/* =========================================================
   心情天气 —— 首页背景跟着她最近一条心情变
   ========================================================= */
#weather { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.wrap { position: relative; z-index: 1; }

/* 晴：右上角暖光 */
body[data-weather="sunny"] #weather::before {
  content: ''; position: absolute; right: -14%; top: -20%; width: 78vw; height: 78vw;
  background: radial-gradient(circle, rgba(255,206,140,.5), rgba(255,206,140,0) 62%);
  animation: sun-breathe 8s ease-in-out infinite;
}
@keyframes sun-breathe {
  0%, 100% { opacity: .7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.07); }
}

/* 多云：两团飘云 */
body[data-weather="cloudy"] { --bg: #f5f3ef; --bg-soft: #eae6e0; }
body[data-weather="cloudy"] #weather::before,
body[data-weather="cloudy"] #weather::after {
  content: ''; position: absolute; border-radius: 50%;
  background: rgba(255,255,255,.8); filter: blur(20px);
}
body[data-weather="cloudy"] #weather::before {
  width: 46vw; height: 22vw; left: -10vw; top: 7vh; animation: cloud-drift 30s ease-in-out infinite;
}
body[data-weather="cloudy"] #weather::after {
  width: 36vw; height: 17vw; right: -8vw; top: 24vh; animation: cloud-drift 40s ease-in-out infinite reverse;
}
@keyframes cloud-drift {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(7vw); }
}

/* 雨：斜雨 + 灰蓝 */
body[data-weather="rainy"] { --bg: #f1f4f8; --bg-soft: #e0e7ef; --ink: #35404c; }
body[data-weather="rainy"] #weather::before,
body[data-weather="storm"] #weather::before {
  content: ''; position: absolute; inset: -30% -20% -10% -20%;
  background-image: repeating-linear-gradient(102deg, rgba(120,155,195,.16) 0 1px, transparent 1px 26px);
  animation: rain-fall .7s linear infinite;
}
@keyframes rain-fall {
  from { transform: translate3d(0, -60px, 0); }
  to { transform: translate3d(-24px, 60px, 0); }
}

/* 雷：更暗 + 偶尔闪 */
body[data-weather="storm"] { --bg: #e8ebf1; --bg-soft: #d8dee7; --ink: #2f3945; }
body[data-weather="storm"] #weather::after {
  content: ''; position: absolute; inset: 0; background: #fff; opacity: 0;
  animation: lightning 11s linear infinite;
}
@keyframes lightning {
  0%, 91%, 100% { opacity: 0; }
  92% { opacity: .5; }
  92.6% { opacity: 0; }
  94% { opacity: .32; }
  94.5% { opacity: 0; }
}

.weather-note {
  display: flex; align-items: center; gap: 7px;
  margin-top: 12px; font-size: 12.5px; color: var(--muted);
  background: rgba(255,255,255,.55); border: 1px solid rgba(255,255,255,.7);
  padding: 7px 11px; border-radius: 12px; width: fit-content; max-width: 100%;
  backdrop-filter: blur(6px);
}
.weather-note .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }

/* =========================================================
   双向奔赴 + 惊喜进度条
   ========================================================= */

/* ---------- 悬浮爱心 ---------- */
.miss-btn {
  position: fixed; left: 16px; bottom: 92px; z-index: 44;
  width: 54px; height: 54px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(140deg, #ffb3c6, #e0728f);
  color: #fff; box-shadow: 0 10px 22px rgba(224, 114, 143, .38);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: transform .14s, box-shadow .14s;
}
.miss-btn:active { transform: scale(.92); }
.miss-btn .heart { font-size: 24px; line-height: 1; transform: translateY(-1px); }
.miss-btn .cnt { font-size: 10px; opacity: .9; margin-top: 1px; height: 11px; }
.miss-btn.beat { animation: miss-beat .6s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes miss-beat {
  0% { transform: scale(1); }
  30% { transform: scale(1.22); }
  60% { transform: scale(.94); }
  100% { transform: scale(1); }
}

/* ---------- 她看到的那条横幅 ---------- */
#missBanner {
  margin: 14px 0 4px; padding: 14px 16px; border-radius: 18px;
  background: linear-gradient(135deg, #fff1f4, #ffe6ec);
  border: 1px solid #ffd3de; box-shadow: 0 8px 20px rgba(224, 114, 143, .12);
  display: flex; align-items: center; gap: 12px;
}
#missBanner .txt { flex: 1; font-size: 14px; color: #8a4a5c; line-height: 1.5; }
#missBanner .txt b { font-weight: 700; }
#missBanner button {
  flex: none; border: none; border-radius: 12px; padding: 9px 14px; cursor: pointer;
  background: linear-gradient(135deg, #ff9db5, #e0728f); color: #fff;
  font-size: 13.5px; font-weight: 650; font-family: inherit;
  box-shadow: 0 6px 14px rgba(224, 114, 143, .3);
}

/* ---------- 惊喜进度条 ---------- */
#surpriseBox { margin: 14px 0 2px; }
.surprise {
  background: linear-gradient(135deg, #fffaf2, #fff4e6);
  border: 1px solid #f3e0c8; border-radius: 18px; padding: 15px 16px 14px;
  box-shadow: 0 8px 20px rgba(191, 145, 95, .12);
}
.surprise .head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.surprise .name { font-size: 14.5px; font-weight: 650; color: #7a5636; }
.surprise .left { font-size: 12px; color: #b08b62; flex: none; }
.surprise .bar {
  margin-top: 11px; height: 10px; border-radius: 6px; background: #f1e3d1; overflow: hidden;
  position: relative;
}
.surprise .bar i {
  display: block; height: 100%; border-radius: 6px;
  background: linear-gradient(90deg, #f0b429, #e98a5c);
  transition: width .6s ease;
  position: relative;
}
.surprise .bar i::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  animation: bar-shine 2.6s linear infinite;
}
@keyframes bar-shine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.surprise .meta { margin-top: 9px; font-size: 12px; color: #a98a67; line-height: 1.6; }
.surprise .meta .clue { color: #b3623f; }
.surprise.revealed .bar i { background: linear-gradient(90deg, #7bc06a, #4ea35a); }
.surprise .note {
  margin-top: 10px; font-size: 13.5px; color: #6b4a2f; line-height: 1.7;
  background: #fff; border-radius: 12px; padding: 10px 12px; border: 1px dashed #ecd6ba;
}

/* ---------- 庆祝全屏 ---------- */
.miss-overlay {
  position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #ffe4ec 0%, #ffd2df 50%, #ffe8f0 100%);
}
.miss-overlay[hidden] { display: none; }
.miss-stage { text-align: center; padding: 24px; }
.hearts { position: relative; height: 90px; }
.hearts .h {
  position: absolute; left: 50%; top: 0; font-size: 46px; color: #e0728f;
  transform: translateX(-50%);
}
.hearts .h1 { animation: heart-in-left 1.1s cubic-bezier(.2, .8, .3, 1) forwards; }
.hearts .h2 { animation: heart-in-right 1.1s cubic-bezier(.2, .8, .3, 1) forwards; }
@keyframes heart-in-left {
  0% { transform: translate(-160px, 30px) scale(.6); opacity: 0; }
  70% { transform: translate(-6px, 0) scale(1.1); opacity: 1; }
  100% { transform: translate(0, 0) scale(1); opacity: 1; }
}
@keyframes heart-in-right {
  0% { transform: translate(160px, 30px) scale(.6); opacity: 0; }
  70% { transform: translate(6px, 0) scale(1.1); opacity: 1; }
  100% { transform: translate(0, 0) scale(1); opacity: 1; }
}
.miss-title {
  margin-top: 18px; font-size: 26px; font-weight: 750; color: #b3435f; letter-spacing: 2px;
  animation: title-pop .5s .25s both cubic-bezier(.2, 1.4, .4, 1);
}
@keyframes title-pop { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.miss-sub { margin-top: 10px; font-size: 13.5px; color: #a56276; animation: title-pop .6s .75s both; }
.miss-close {
  margin-top: 26px; border: none; border-radius: 14px; padding: 11px 26px; cursor: pointer;
  background: #fff; color: #b3435f; font-size: 14px; font-weight: 650; font-family: inherit;
  box-shadow: 0 8px 20px rgba(180, 70, 100, .18);
}

/* ---------- 时光信 ---------- */
.letter-item { cursor: pointer; transition: transform .12s; }
.letter-item:active { transform: scale(.985); }
.letter-item.sealed { background: linear-gradient(135deg, #fffaf3, #fff4e8); border-color: #f3e3cd; }
.letter-item.ready { background: linear-gradient(135deg, #fff, #fff8f2); border-color: #f0dcc6; }

.letter-mask {
  position: fixed; inset: 0; z-index: 110; display: flex; align-items: center; justify-content: center;
  padding: 22px; background: rgba(60, 45, 35, .45); backdrop-filter: blur(3px);
}
.letter-mask[hidden] { display: none; }
.letter-paper {
  width: 100%; max-width: 420px; max-height: 82vh; overflow-y: auto;
  background: linear-gradient(180deg, #fffdf8, #fff8ee);
  border-radius: 18px; padding: 26px 24px 22px; box-shadow: 0 24px 60px rgba(90, 60, 40, .28);
  border: 1px solid #f2e2cf;
  animation: letter-in .32s cubic-bezier(.2, 1.3, .4, 1);
}
@keyframes letter-in { from { transform: translateY(14px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.letter-title { font-size: 21px; font-weight: 750; color: #6b4a2f; }
.letter-meta { margin-top: 6px; font-size: 12px; color: #b08b62; }
.letter-body {
  margin-top: 16px; padding-top: 16px; border-top: 1px dashed #e8d3ba;
  font-size: 15.5px; line-height: 1.9; color: #4a3a2d; white-space: pre-wrap; word-break: break-word;
}
.letter-paper .btn { margin-top: 20px; width: 100%; }

/* ---------- 真实天气 ---------- */
.weather-out {
  display: flex; align-items: center; gap: 6px;
  margin-top: 8px; font-size: 12.5px; color: var(--ink-soft);
}
.weather-out .advice { color: var(--accent-deep); font-weight: 600; }

/* ---------- 去年的今天 ---------- */
#memoryBox { margin: 14px 0 2px; }
.mem-card {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, #fffdf7, #ffeff2);
  border: 1px solid #f6dfe4; border-radius: 18px; padding: 13px 15px;
  box-shadow: 0 8px 20px rgba(190, 120, 130, .12); cursor: pointer;
}
.mem-card:active { transform: scale(.99); }
.mem-card .icon { font-size: 24px; line-height: 1; flex: none; }
.mem-card .body { flex: 1; min-width: 0; }
.mem-card .t1 { font-size: 14px; font-weight: 650; color: #7d4a52; }
.mem-card .t2 { margin-top: 3px; font-size: 12px; color: #a9787f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mem-card .thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: none; }

.mem-mask {
  position: fixed; inset: 0; z-index: 111; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(60, 45, 35, .45); backdrop-filter: blur(2px);
}
.mem-mask[hidden] { display: none; }
.mem-sheet {
  width: 100%; max-width: 520px; max-height: 84vh; overflow-y: auto;
  background: #fffdf9; border-radius: 22px 22px 0 0; padding: 18px 18px 26px;
  animation: sheet-up .28s cubic-bezier(.2, 1.2, .4, 1);
}
@keyframes sheet-up { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
.mem-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.mem-head span { font-size: 16px; font-weight: 700; color: #6b4a2f; }
.mem-close { border: none; background: #f4ece2; color: #8a6b52; width: 28px; height: 28px; border-radius: 50%; font-size: 13px; cursor: pointer; }
.mem-item { padding: 12px 0; border-bottom: 1px dashed #f0e3d2; }
.mem-item:last-child { border-bottom: none; }
.mem-item .y { font-size: 11.5px; color: #b08b62; margin-bottom: 4px; }
.mem-item .tx { font-size: 14px; color: #4a3a2d; line-height: 1.65; white-space: pre-wrap; }
.mem-item .imgs { display: flex; gap: 6px; margin-top: 8px; }
.mem-item .imgs img { width: 64px; height: 64px; object-fit: cover; border-radius: 9px; }

/* hidden 属性在 display:flex 上会被覆盖，补一条 */
#missBanner[hidden], #surpriseBox[hidden], #memoryBox[hidden],
.weather-out[hidden], #weatherNote[hidden], #memMask[hidden], #missOverlay[hidden] { display: none !important; }
