:root {
  --bg: #F4EFE7;
  --panel: #FFFDF9;
  --ink: #2F2A25;
  --muted: #7A6F66;
  --line: #E7DED2;
  --accent: #5C7D57;
  --accent-soft: #E6EEDF;
  --warm: #D9824A;
}
* { box-sizing: border-box; min-width: 0; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 -apple-system, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.app { display: grid; grid-template-columns: minmax(0, 1fr) 400px; height: 100vh; height: 100dvh; }

/* 3D 展台 */
.stage { position: relative; overflow: hidden; background: #F3E7D6; }
.stage canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.stage-top { position: absolute; left: 28px; top: 22px; pointer-events: none; }
.stage h1 {
  margin: 0;
  font: 600 32px/1.1 "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", serif;
  color: #2F2A25;
  text-shadow: 0 1px 12px rgba(255, 250, 240, 0.6);
}
.stage-top p { margin: 6px 0 0; color: #5D534B; font-size: 14px; }
.app.memorial .stage h1 { color: #FFF8EE; text-shadow: 0 1px 14px rgba(60, 40, 70, 0.35); }
.app.memorial .stage-top p { color: #F4E9F2; }
.hint { position: absolute; left: 0; right: 0; bottom: 14px; margin: 0; text-align: center; color: rgba(47, 42, 37, 0.55); font-size: 13px; pointer-events: none; }
.app.memorial .hint { color: rgba(255, 248, 238, 0.75); }
.loading { position: absolute; inset: 0; display: grid; place-items: center; background: #F3E7D6; color: var(--muted); font-size: 14px; transition: opacity 0.5s; }
.loading[hidden] { display: none; }

/* 面板 */
.panel { background: var(--panel); border-left: 1px solid var(--line); overflow-y: auto; padding: 24px 22px 0; position: relative; }
.panel-head { margin-bottom: 6px; }
.brand { margin: 0; font-size: 13px; color: var(--muted); letter-spacing: 0.04em; }
.panel-head h2 { margin: 2px 0 0; font: 600 22px/1.3 "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", serif; }

.block { padding: 16px 0; border-bottom: 1px solid var(--line); }
.block h3 { margin: 0 0 10px; font-size: 15px; font-weight: 600; }
.lbl { display: block; font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.sub { margin: 14px 0 8px; font-size: 13px; color: var(--muted); }
.desc { margin: 10px 0 0; font-size: 13px; color: var(--muted); }

.text {
  width: 100%; min-height: 44px; padding: 10px 14px; font: inherit; font-size: 16px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink);
}
textarea.text { resize: vertical; line-height: 1.6; }
.text:focus { border-color: var(--accent); outline: none; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; margin-top: 10px; background: #F2ECE3; border-radius: 12px; }
.block h3 + .seg { margin-top: 0; }
.seg button { height: 38px; border: 0; border-radius: 9px; background: transparent; font-size: 15px; color: var(--muted); }
.seg button.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(60, 40, 20, 0.12); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 38px; padding: 6px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; font-size: 14px;
}
.chip:hover { border-color: #D3C6B6; }
.chip.on { border-color: var(--accent); background: var(--accent-soft); color: #2F4A2C; font-weight: 600; }
.chips.small .chip { min-height: 34px; padding: 4px 11px; font-size: 13px; }
.dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.12); flex: none; }
.dot + .dot { margin-left: -10px; }

.swatches { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; }
.sw { aspect-ratio: 1; width: 100%; max-width: 36px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.14); padding: 0; }
.sw.on { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--accent); }

.more { margin-top: 12px; }
.more summary { cursor: pointer; font-size: 14px; color: var(--accent); min-height: 32px; display: flex; align-items: center; }

.check { display: flex; align-items: center; gap: 8px; margin: 12px 0 8px; font-size: 14px; color: var(--muted); }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

.slider { display: grid; grid-template-columns: 72px 1fr; align-items: center; gap: 12px; min-height: 36px; }
.slider label { font-size: 14px; color: var(--muted); }
.slider input { width: 100%; accent-color: var(--accent); }

.saved { display: grid; gap: 8px; }
.saved .empty { margin: 0; font-size: 13px; color: var(--muted); }
.card { display: grid; grid-template-columns: 1fr auto; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.card.on { border-color: var(--accent); }
.card .open { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 0; background: transparent; text-align: left; }
.card .open b { font-weight: 600; }
.card .open small { display: block; color: var(--muted); font-size: 12px; }
.card .del { width: 40px; height: 40px; border: 0; background: transparent; color: var(--muted); font-size: 18px; }

.actions {
  position: sticky; bottom: 0; display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px;
  padding: 14px 0 18px; background: linear-gradient(rgba(255, 253, 249, 0), var(--panel) 28%);
}
.actions button { height: 46px; border-radius: 12px; font-size: 15px; }
.ghost { border: 1px solid var(--line); background: #fff; }
.primary { border: 0; background: var(--accent); color: #fff; font-weight: 600; }
.primary:hover { background: #4E6C4A; }

.toast {
  position: fixed; left: 50%; bottom: 84px; z-index: 50; transform: translate(-50%, 12px);
  padding: 10px 18px; border-radius: 999px; background: #2F2A25; color: #FFF8EE; font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 账号 */
.acct { display: flex; justify-content: flex-end; align-items: center; gap: 10px; min-height: 28px; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.acct .note { font-size: 12px; }
.link { border: 0; background: none; padding: 4px 0; color: var(--accent); font-size: inherit; text-decoration: underline; text-underline-offset: 3px; }
.linkbtn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 12px; text-decoration: none; color: var(--ink); font-size: 15px; cursor: pointer; }
.memlink { margin-top: 12px; padding: 14px; border-radius: 12px; background: #F6F0F4; }
.memlink p { margin: 0 0 10px; font-size: 13px; color: #5E5262; }
.memlink .primary { width: 100%; height: 44px; border-radius: 12px; }
.memlink p:last-child { margin: 0; }
.dot.big { width: 22px; height: 22px; }
.card .del.sure { width: auto; padding: 0 10px; font-size: 13px; color: #B4472F; }

/* 纪念空间 */
.acts { position: absolute; left: 0; right: 0; bottom: 18px; display: flex; justify-content: center; gap: 10px; padding: 0 14px; flex-wrap: wrap; }
.acts[hidden] { display: none; }
.acts button {
  min-height: 46px; padding: 0 18px; border-radius: 999px; border: 1px solid rgba(255, 248, 238, 0.55);
  background: rgba(52, 40, 58, 0.55); color: #FFF8EE; font-size: 15px; backdrop-filter: blur(6px);
}
.acts button:hover { background: rgba(52, 40, 58, 0.72); }
.acts button:disabled { opacity: 0.6; }
.acts b { margin-left: 8px; font-weight: 600; color: #FFD9A0; font-variant-numeric: tabular-nums; }
.panel.mem .brand { text-decoration: none; display: inline-block; padding: 4px 0; }
.panel.mem .brand:hover { color: var(--accent); }
.panel.mem { display: flex; flex-direction: column; }
.panel.mem[hidden] { display: none; }
.panel.mem .actions { margin-top: auto; }
.words { margin: 0; white-space: pre-wrap; font: 400 16px/1.9 "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", serif; color: #3A332D; overflow-wrap: anywhere; }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photos .ph { position: relative; aspect-ratio: 1; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: #EEE7DC; }
.photos .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photos .rm { position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 16px; }
.photos.edit:empty { display: none; }
.filebtn { margin: 8px 0 4px; border: 1px solid var(--line); background: #fff; }
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.feed li { padding: 10px 0; border-bottom: 1px dashed var(--line); overflow-wrap: anywhere; }
.feed li:last-child { border-bottom: 0; }
.feed .who { margin: 0; font-size: 13px; color: var(--muted); }
.feed .who b { color: var(--ink); font-weight: 600; }
.feed li.message .say { margin: 6px 0 0; white-space: pre-wrap; font-size: 15px; line-height: 1.7; }
.feed li.group { padding: 8px 0 8px 14px; position: relative; }
.feed li.group::before { content: ""; position: absolute; left: 2px; top: 15px; width: 6px; height: 6px; border-radius: 50%; background: #E8B9A8; }
.feed li.group .who b { font-weight: 500; }
.feed li.message .who b { font-size: 14px; }
.feed .del { font-size: 12px; color: var(--muted); margin-top: 2px; }
.desc.small { font-size: 12px; }

/* 导航 */
.navlink { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; }
.navlink:hover { color: var(--accent); border-bottom-color: currentColor; }
.memhouse { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: #F4EEE4; }
.memhouse p { margin: 0 0 8px; font-size: 14px; color: #4E443B; }
.memhouse .linkbtn { min-height: 38px; font-size: 14px; border: 1px solid var(--line); background: #fff; }

/* 公共纪念园 */
.glabels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.glabel { position: absolute; left: 0; top: 0; white-space: nowrap; will-change: transform; }
.glabel.slope {
  padding: 5px 12px 5px 10px; border-radius: 999px; font: 600 15px/1.2 "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", serif;
  color: #FFF8EE; background: rgba(46, 36, 54, 0.5); border-left: 4px solid var(--c); backdrop-filter: blur(4px);
}
.glabel.home {
  padding: 2px 8px; border-radius: 6px; font-size: 12px; color: #3A2E26; background: rgba(255, 248, 234, 0.9);
  box-shadow: 0 1px 4px rgba(40, 25, 15, 0.2);
}
.glabel.home.on { background: #FFD58C; font-weight: 600; font-size: 13px; }
.glabel.home.empty { color: #6A5E66; background: rgba(240, 232, 240, 0.9); }
.gcard {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); width: min(380px, calc(100% - 28px));
  padding: 16px 18px; border-radius: 16px; background: rgba(255, 252, 246, 0.96); box-shadow: 0 10px 34px rgba(40, 25, 45, 0.28);
}
.gcard .addr { margin: 0; font-size: 13px; color: var(--muted); }
.gcard h3 { margin: 4px 0 4px; font: 600 22px/1.3 "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", serif; }
.gcard .meta { margin: 0; font-size: 14px; color: #5D534B; }
.gcard .btns { display: flex; gap: 10px; margin-top: 14px; }
.gcard .btns button { min-height: 44px; padding: 0 18px; border-radius: 12px; font-size: 15px; }
.gcard .btns .primary { flex: 1; }
.app.view-garden .hint { bottom: 14px; color: rgba(255, 248, 238, 0.85); }
.app.view-garden .stage { background: #A893B4; }
.app.view-garden:has(.gcard:not([hidden])) .hint { display: none; }
.panel.garden .pick { margin: 10px -10px 0; padding: 14px 12px; border: 0; border-radius: 14px; background: #FFF3DC; }
.panel.garden .pick .primary { width: 100%; min-height: 44px; border-radius: 12px; margin-top: 10px; }
.glist { display: grid; gap: 6px; margin-top: 10px; }
.grow { display: grid; text-align: left; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.grow:hover { border-color: #D3C6B6; }
.grow b { font-weight: 600; }
.grow small { color: var(--muted); font-size: 12px; }
.slopes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.slope { display: grid; grid-template-columns: 22px 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; text-align: left; padding: 9px 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.slope:hover { border-color: #D3C6B6; }
.slope .sw2 { grid-row: span 2; width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.1); }
.slope b { font-weight: 600; font-size: 14px; }
.slope small { color: var(--muted); font-size: 12px; }

/* 对话框 */
.dlg { width: min(420px, calc(100vw - 32px)); padding: 22px; border: 0; border-radius: 18px; background: var(--panel); color: var(--ink); box-shadow: 0 20px 60px rgba(40, 25, 15, 0.3); }
.dlg.wide { width: min(520px, calc(100vw - 32px)); }
.dlg::backdrop { background: rgba(40, 30, 40, 0.45); }
.dlg h3 { margin: 0 0 8px; font: 600 20px/1.3 "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", serif; }
.dlg .lbl { margin: 14px 0 6px; font-size: 14px; }
.dlg .desc { margin: 0 0 4px; }
.dlg .seg { margin-top: 0; }
.dlg .seg button { font-size: 14px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.dlg-actions button { min-height: 44px; padding: 0 20px; border-radius: 12px; font-size: 15px; }
.err { min-height: 20px; margin: 10px 0 0; font-size: 13px; color: #B4472F; }
.switch { margin: 12px 0 0; text-align: center; font-size: 14px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dlg.photo { width: auto; max-width: calc(100vw - 24px); padding: 12px; }
.dlg.photo img { display: block; max-width: 100%; max-height: 76vh; border-radius: 10px; }

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; height: auto; }
  .stage { height: 50vh; height: 50svh; position: sticky; top: 0; z-index: 2; }
  .stage-top { left: 18px; top: 14px; }
  .stage h1 { font-size: 24px; }
  .panel { border-left: 0; border-top: 1px solid var(--line); overflow: visible; padding: 16px 18px 0; }
  .app.view-mem .stage { height: 62vh; height: 62svh; }
  .app.view-garden .stage { height: 64vh; height: 64svh; }
  .gcard { bottom: 10px; padding: 12px 14px; }
  .gcard h3 { font-size: 19px; }
  .glabel.slope { font-size: 13px; padding: 4px 10px 4px 8px; }
  .app.view-mem .stage-top p { font-size: 13px; }
  .acts { bottom: 12px; gap: 8px; }
  .acts button { padding: 0 14px; font-size: 14px; }
  .panel.mem { min-height: 38svh; }
  .two { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .toast, .loading { transition: none; }
}

/* 恢复码 */
.rcode { margin: 14px 0 6px; padding: 14px; border-radius: 12px; background: #F4EEE4; text-align: center; font: 600 22px/1.2 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 2px; color: #3A332D; user-select: all; }
.text.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 1px; text-transform: uppercase; }
.switch { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* 举报 */
.feed .rep { font-size: 12px; color: #B5AA9C; margin-top: 2px; }
.feed .keep { font-size: 12px; color: var(--accent, #5B7F55); margin: 2px 0 0 14px; }
.feed li.flagged .say { opacity: 0.55; }
.feed .flag { margin: 6px 0 2px; font-size: 12px; color: #A0674F; }
.report-page { margin: 14px 0 0; }
.report-page .link { font-size: 12px; color: #B5AA9C; }
.reasons { display: grid; gap: 8px; margin: 12px 0 4px; }
.reasons label { display: flex; gap: 8px; align-items: center; font-size: 15px; }

/* 纪念园卡片里挑房子的样子 */
.gcard .styles { margin-top: 12px; }
.gcard .styles .lbl { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.gcard .styles .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.gcard .styles .chip { min-height: 36px; padding: 0 12px; font-size: 14px; }
.gcard .btns .ghost[hidden] { display: none; }

/* 它的声音 */
.sound-btn { display: inline-flex; align-items: center; gap: 8px; margin: 10px 0 2px; min-height: 40px; padding: 0 16px 0 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font-size: 14px; cursor: pointer; }
.sound-btn .ico { width: 0; height: 0; border-left: 9px solid #9C7B63; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.sound-btn.playing .ico { width: 10px; height: 10px; border: 0; background: #9C7B63; border-radius: 2px; animation: soundPulse 1s ease-in-out infinite; }
@keyframes soundPulse { 50% { opacity: 0.45; } }
.sound-edit .row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.sound-edit .row .filebtn { margin: 0; }
.sound-edit audio { width: 100%; margin: 4px 0; }

/* 它的一生 */
.life h3 { margin-bottom: 4px; }
.moments { list-style: none; margin: 8px 0 0; padding: 0 0 0 18px; position: relative; }
.moments::before { content: ""; position: absolute; left: 4px; top: 8px; bottom: 8px; width: 1px; background: #E3D6C4; }
.moment { position: relative; padding: 4px 0 18px; }
.moment::before { content: ""; position: absolute; left: -18px; top: 9px; width: 9px; height: 9px; border-radius: 50%; background: #E8C9A8; box-shadow: 0 0 0 3px var(--panel); }
.moment .when { margin: 0; font-size: 12px; color: var(--muted); letter-spacing: 0.5px; }
.moment h4 { margin: 2px 0 4px; font: 600 17px/1.4 "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", serif; color: #3A332D; }
.moment .say { margin: 0; white-space: pre-wrap; font: 400 15px/1.85 "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", serif; color: #4A413A; overflow-wrap: anywhere; }
.photos.strip { margin-top: 10px; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.photos .ph { cursor: zoom-in; }
.moment .editmom { margin-top: 6px; font-size: 12px; color: var(--muted); }
.addmom { width: 100%; min-height: 44px; border-style: dashed; margin-top: 2px; }
.block h3 + .photos { margin-top: 8px; }

/* 编辑里的照片：缩略图 + 一句说明 */
.photos.edit, .momphotos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ph-edit .ph { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #EEE7DC; cursor: default; }
.ph-edit .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-edit .cap { margin-top: 4px; width: 100%; min-height: 34px; padding: 4px 8px; font-size: 12px; }
.momphotos[hidden] { display: none; }
.dateparts { display: flex; align-items: center; gap: 6px; }
.dateparts .text { width: 72px; text-align: center; }
.dateparts .text:first-child { width: 86px; }
.dateparts span { color: var(--muted); font-size: 14px; }
.chips.sugg { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px; }
.chips.sugg .chip { min-height: 32px; padding: 0 10px; font-size: 13px; }
.chips.sugg[hidden] { display: none; }
.dlg-actions .spacer { flex: 1; }
.link.danger { color: #A0674F; }

/* 大图翻页 */
.dlg.photo .viewer { position: relative; display: flex; align-items: center; justify-content: center; }
.dlg.photo .nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 64px; border: 0; border-radius: 12px; background: rgba(0, 0, 0, 0.35); color: #fff; font-size: 30px; cursor: pointer; }
.dlg.photo .nav.prev { left: 6px; } .dlg.photo .nav.next { right: 6px; }
.dlg.photo .nav[hidden] { display: none; }
.dlg.photo .cap { margin: 10px 4px 0; font: 400 15px/1.6 "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", serif; color: #4A413A; text-align: center; }
.dlg.photo .count { margin-right: auto; align-self: center; font-size: 13px; color: var(--muted); }

/* 纪念日、记住它 */
.anniv { margin: 8px 0 2px; padding: 8px 12px; border-radius: 10px; background: #FBEBD6; color: #8A5A3A; font: 400 15px/1.6 "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", serif; }
.follow-row { display: flex; align-items: center; gap: 10px; margin: 10px 0 0; }
.follow-row[hidden] { display: none; }
.follow-btn { min-height: 36px; padding: 0 14px; border-radius: 999px; font-size: 14px; }
.follow-btn.on { background: var(--accent-soft); border-color: var(--accent); color: #2F4A2C; }

/* 写给它的信 */
.letter-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 12px; }
.letter { padding: 14px 16px; border-radius: 12px; background: #FBF6EE; border: 1px solid #EFE4D4; }
.letter .when { margin: 0 0 6px; font-size: 12px; color: var(--muted); }
.letter .say { margin: 0; white-space: pre-wrap; font: 400 15px/1.9 "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", serif; color: #4A413A; overflow-wrap: anywhere; }
.letter.folded .say { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.letter .more, .letter .editlet { font-size: 12px; color: var(--muted); margin: 6px 12px 0 0; }
.letter-text { font: 400 16px/1.9 "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", serif; }

/* 消息铃铛 */
.bell { position: absolute; top: 18px; right: 18px; z-index: 6; width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.82); color: #6B5A4C; box-shadow: 0 4px 14px rgba(40, 25, 15, 0.15); cursor: pointer; }
.bell[hidden] { display: none; }
.bell .badge { position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #C8785A; color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.bell .badge[hidden] { display: none; }
.notes { list-style: none; margin: 10px 0 0; padding: 0; max-height: 60vh; overflow: auto; }
.note a { display: flex; justify-content: space-between; gap: 12px; padding: 12px 2px; border-bottom: 1px dashed var(--line); color: var(--ink); text-decoration: none; font-size: 14px; line-height: 1.6; }
.note .when { flex: none; font-size: 12px; color: var(--muted); }
.note.new .txt::before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 6px 2px 0; border-radius: 50%; background: #C8785A; }
.note.k-anniv a { color: #8A5A3A; }
.follow-card { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; text-decoration: none; color: var(--ink); }
.follow-card small { color: var(--muted); }

/* 共同守护 */
.joinbox { margin: 10px 0 4px; padding: 12px 14px; border-radius: 12px; background: #EEF3E8; }
.joinbox p { margin: 0 0 10px; font-size: 14px; line-height: 1.7; color: #3E4F38; }
.joinbox .primary { min-height: 40px; padding: 0 18px; border-radius: 10px; }
.guardline { margin: 6px 0 0; }
.guardline .link { margin-left: 8px; font-size: 12px; }
.moment .by { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.family { list-style: none; margin: 4px 0 8px; padding: 0; }
.family li { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.family .link { font-size: 12px; color: var(--muted); }
#edFamily { margin: 6px 0 4px; }

/* 纪念卡片 */
.cardbtn { display: inline-flex; margin: 10px 0 0 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; font-size: 14px; }
.cardwrap { display: grid; place-items: center; margin: 8px 0 4px; padding: 12px; border-radius: 14px; background: #F1E9DD; }
.cardwrap img { display: block; height: min(52vh, 520px); aspect-ratio: 9 / 16; border-radius: 10px; box-shadow: 0 8px 24px rgba(60, 40, 25, 0.18); background: #EFE3D4; }
#cardNext { margin: 6px 0 0; font-size: 13px; }

/* 铃铛在右上角时，标题别跟它挤在一起 */
.app:has(.bell:not([hidden])) .stage-top { right: 70px; }

/* 放灯夜、同路人 */
.lanternnight { margin: 0 0 4px; padding: 14px 16px; border-radius: 14px; background: linear-gradient(135deg, #4B3F6B, #8C6A86); color: #FFF4E6; }
.lanternnight h3 { color: #FFD9A8; margin: 0 0 6px; }
.lanternnight .desc { color: #F4E6F0; margin: 0; }
.nextnight { color: #9A7B62; }
#gPeersPick { margin: 6px 0 4px; }
#gPeersPick[hidden] { display: none; }

/* 从照片里取颜色 */
.pickbtn { margin-top: 10px; min-height: 40px; padding: 0 14px; border-radius: 10px; font-size: 14px; }
#pickTargets { margin: 10px 0 2px; }
#pickTargets .dot { width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15); }
.pickwrap { position: relative; display: grid; place-items: center; min-height: 160px; margin-top: 8px; border-radius: 12px; background: #F1E9DD; overflow: hidden; }
.pickwrap canvas { display: block; max-width: 100%; height: auto; cursor: crosshair; touch-action: none; }
.pickwrap .loupe { position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 4px 10px rgba(0, 0, 0, 0.25); pointer-events: none; }
.pickwrap .desc { padding: 20px; text-align: center; }

/* 下载全部回忆 */
.keep .ghost { min-height: 42px; padding: 0 16px; border-radius: 12px; margin-top: 6px; }

/* 小院（还在身边的宠物）：纪念才用得上的东西都收起来 */
body.yard .mem-only { display: none !important; }
.sound-edit .row button.ghost { min-height: 44px; padding: 0 18px; border-radius: 12px; font-size: 15px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; }
