/* 沿用原主题：纸白与玫瑰粉，只改变信息层级和浏览方式。 */
.layout-ready .app-header, .layout-ready .petal-field { display:none; }
.layout-ready .grain { opacity:.2; pointer-events:none; }
.layout-ready #mainContent { position:absolute; }
.layout-ready #appView { height:100dvh; height:var(--app-height,100dvh); overflow:hidden; }
.space-shell { --rail:104px; --list:340px; height:100%; display:grid; grid-template-columns:var(--rail) var(--list) minmax(0,1fr); overflow:hidden; }
.space-shell[hidden], .space-shell [hidden] { display:none!important; }
.space-nav { display:flex; flex-direction:column; align-items:stretch; gap:14px; padding:30px 12px; background:var(--cream-deep); border-right:1px solid var(--line); z-index:20; }
.space-nav-brand { display:flex; flex-direction:column; align-items:center; gap:14px; padding:0 0 32px; color:var(--wine); font-family:var(--serif); font-size:13px; line-height:1.8; text-align:center; }
.space-nav-brand .brand-mark { width:32px; height:32px; }
.space-nav-item { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:7px; min-height:72px; border:0; border-radius:14px; background:transparent; color:var(--muted); font:inherit; font-size:13px; cursor:pointer; }
.space-nav-item svg { width:25px; height:25px; }
.space-nav-item[aria-current="page"] { background:var(--rose-light); color:var(--wine); font-weight:700; }
.space-middle,.space-detail { min-width:0; min-height:0; display:flex; flex-direction:column; }
.space-middle { background:var(--cream); border-right:1px solid var(--line); }
.space-middle-head,.space-detail-head { height:82px; min-height:82px; display:flex; align-items:center; gap:15px; padding:18px 24px; border-bottom:1px solid var(--line); background:var(--paper); }
.space-middle-head { justify-content:space-between; background:var(--cream); }
.space-middle-head h1 { margin:0; color:var(--wine); font:600 24px/1.4 var(--serif); }
.space-middle-head svg { height:20px; width:20px; }
.space-detail { position:relative; background:var(--paper); }
.space-detail-head h2 { margin:0; color:var(--wine); font:500 17px/1.5 var(--serif); overflow-wrap:anywhere; }
.space-back { display:inline-flex; flex-shrink:0; align-items:center; gap:2px; padding:9px 0; background:none; border:0; color:var(--wine); font:inherit; font-size:14px; cursor:pointer; }
.space-back svg { width:20px; height:20px; }
.space-middle-body { overflow-y:auto; overscroll-behavior:contain; padding:20px 16px 32px; flex:1; min-height:0; scrollbar-width:thin; }
.space-views { flex:1; min-height:0; position:relative; }
.space-pane { height:100%; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; }
.space-intro { padding:0 8px; color:var(--muted); font-size:13px; line-height:1.8; margin:0 0 22px; }
.space-group { background:var(--paper); border-radius:14px; margin-bottom:22px; overflow:hidden; }
.space-group-label { margin:22px 10px 9px; color:var(--muted); font-size:12px; font-weight:400; }
.space-row { width:100%; display:flex; align-items:center; text-align:left; gap:13px; padding:18px 14px; background:transparent; border:0; border-bottom:1px solid var(--line); color:var(--ink); font:inherit; cursor:pointer; }
.space-group .space-row:last-child { border-bottom:0; }
.space-row-icon { width:36px; height:36px; flex-shrink:0; display:grid; place-items:center; color:var(--wine); border-radius:10px; background:var(--rose-pale); }
.space-row-icon svg { width:21px; height:21px; }
.space-row-text { flex:1; min-width:0; }
.space-row-text strong { display:block; font-size:15px; font-weight:500; line-height:1.6; overflow-wrap:anywhere; }
.space-row-text small { display:block; margin-top:3px; color:var(--muted); font-size:12px; line-height:1.6; overflow-wrap:anywhere; }
.space-row-arrow { color:var(--muted); font:23px/1 var(--sans); flex-shrink:0; }
.space-row:hover,.space-row.is-current,.record-index-row[aria-pressed="true"] { background:var(--rose-pale); }
.record-index-row[aria-pressed="true"] { box-shadow:inset 3px 0 var(--rose); }
.my-profile { display:flex; align-items:center; gap:15px; width:100%; padding:16px 6px 28px; border:0; text-align:left; background:none; color:var(--ink); cursor:pointer; }
.my-profile>span:not(.avatar):not(.space-row-arrow) { flex:1; min-width:0; }
.my-profile strong { display:block; font:600 24px/1.5 var(--serif); overflow-wrap:anywhere; }
.my-profile small { display:block; font-size:12px; color:var(--muted); margin-top:4px; overflow-wrap:anywhere; }
.my-profile .profile-edit-hint { color:var(--wine); }
.mine-footer { font-size:12px; color:var(--muted); text-align:center; margin:36px 0 12px; }
.space-shell .hero { min-height:0; height:auto; padding:0; overflow:hidden; background:none; }
.space-shell .hero-inner { padding:42px 28px 32px; max-width:680px; margin:auto; }
.space-shell .hero-orbit,.space-shell .hero .eyebrow,.space-shell .scroll-cue { display:none; }
.home-space-name { margin:0 0 28px; text-align:center; font:500 16px/1.7 var(--serif); color:var(--muted); }
.space-shell .hero-people { margin:0 0 24px; gap:25px; }
.space-shell .avatar--hero { width:72px; height:72px; }
.space-shell .hero-person__name { font-size:14px; max-width:120px; }
.space-shell .hero-and { font-size:17px; color:var(--rose); }
.space-shell .hero-quote { font:500 clamp(22px,2.4vw,32px)/1.7 var(--serif); letter-spacing:.03em; margin:0 auto 22px; }
.space-shell .hero-quote span { display:inline; }
.space-shell .hero-quote span+span::before { content:' '; }
.space-shell .hero-meta { display:flex; flex-direction:column; gap:10px; margin:0; }
.space-shell .day-pill { padding:6px 14px; font-size:12px; border:0; background:var(--rose-pale); }
.space-shell .day-pill strong { font-size:15px; }
.space-shell .hero-since { font-size:11px; }
.space-shell #heroEditBtn { font-size:12px; }
.home-recent { max-width:680px; padding:0 28px 36px; margin:auto; }
.recent-heading { font:500 13px/1.7 var(--sans); color:var(--muted); margin:20px 8px 4px; }
.home-recent .space-row { border-color:var(--line); }
.home-quick { display:flex; gap:10px; flex-wrap:wrap; padding:26px 8px 0; }
.space-shell .section { padding:28px; background:transparent; min-height:0; }
.space-shell .section-inner { width:100%; max-width:760px; margin:0 auto; }
.space-shell .section-head { margin-bottom:26px; opacity:1; transform:none; }
.space-shell .section-head h2 { font:500 24px/1.5 var(--serif); margin:0; }
.space-shell .section-head .kicker { display:none; }
.space-shell .section-lead { font-size:13px; margin:8px 0 0; line-height:1.9; }
.space-shell .reveal { opacity:1; transform:none; transition:none; }
.space-shell .diary-list { gap:16px; }
.space-shell .diary-toggle { padding:22px 20px; }
.space-shell .diary-cover-label .entry-title { font:500 20px/1.6 var(--serif); }
.space-shell .diary-cover-label .entry-date { font-size:11px; }
.space-shell .diary-sheet { padding:24px 20px; }
.space-shell .diary-cover-button { margin-right:15px; font-size:11px; }
.space-shell .entry-body,.space-shell .memory-desc { font-size:15px; line-height:2; max-width:70ch; }
.space-shell .album-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.space-shell .photo-card { margin:0; transform:none; }
.space-shell .anniversary-grid { grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:16px; }
.space-shell .settings-grid { grid-template-columns:1fr; gap:18px; }
.space-shell .settings-card { padding:22px; }
.space-shell .settings-note { margin-top:24px; padding:20px; }
.space-shell .settings-note p { font-size:13px; line-height:1.9; }
.space-shell #account,.space-shell #device { max-width:720px; margin:0 auto; }
.secondary-title { font:500 24px/1.5 var(--serif); color:var(--wine); margin:0 0 24px; }
.space-shell #account .space-group { display:flex; flex-direction:column; margin-top:25px; border:1px solid var(--line); }
.space-shell #account button { padding:20px; text-align:left; border-bottom:1px solid var(--line); }
.space-shell #signOutBtn { color:var(--wine); }
.space-shell #settingsAccount { font-size:13px; color:var(--muted); overflow-wrap:anywhere; }
.space-shell #deviceUnlockStatus { font-size:14px; line-height:1.9; margin-bottom:24px; }
.space-shell #deviceUnlockBtn { padding:14px 20px; background:var(--rose-light); border-radius:12px; color:var(--wine); }
.record-tabs { display:flex; padding:4px; background:var(--rose-pale); border-radius:12px; gap:4px; margin-bottom:20px; }
.record-tab { flex:1; border:0; color:var(--muted); font:inherit; font-size:14px; padding:11px 8px; border-radius:9px; cursor:pointer; background:none; }
.record-tab[aria-selected="true"] { background:var(--paper); color:var(--wine); font-weight:600; box-shadow:0 2px 5px rgba(107,47,57,.06); }
.desktop-add { width:100%; margin-bottom:20px; }
.space-shell .btn--primary,.layout-ready .modal .btn--primary { background:var(--rose); color:var(--wine-deep); border-color:var(--rose); box-shadow:0 5px 16px rgba(107,47,57,.08); }
.space-shell .btn--primary:hover,.layout-ready .modal .btn--primary:hover { background:var(--rose-light); }
.space-shell[data-tab="together"]:not(.has-secondary) .space-views::after,.space-shell[data-tab="mine"]:not(.has-secondary) .space-views::after { content:'从左侧选一项，慢慢写下我们的以后。'; position:absolute; inset:0; display:grid; place-items:center; padding:40px; color:var(--muted); font:400 18px/2 var(--serif); text-align:center; background:radial-gradient(ellipse at center,var(--rose-pale),transparent 65%); pointer-events:none; }
.layout-ready .modal { padding:0 0 0 444px; }
.layout-ready .modal[open] { place-items:stretch; }
.layout-ready .modal-panel { width:100%; height:100%; max-height:none; border-radius:0; box-shadow:-18px 0 60px rgba(91,48,54,.12); }
.layout-ready .modal-head { flex-direction:row-reverse; align-items:center; justify-content:flex-end; padding:20px 25px; min-height:82px; }
.layout-ready .modal-head .kicker { display:none; }
.layout-ready .modal-head h2 { font-size:18px; }
.layout-ready #editorCloseBtn { display:flex; align-items:center; width:auto; gap:1px; height:40px; font-size:13px; color:var(--wine); }
.layout-ready #editorCloseBtn svg { width:20px; height:20px; }
.layout-ready .modal-body { flex:1; }
.layout-ready .modal-actions { padding-bottom:max(20px,env(safe-area-inset-bottom)); }
.layout-ready .modal-body input,.layout-ready .modal-body textarea,.layout-ready .modal-body select { font-size:16px; }
.space-shell button:focus-visible { outline:2px solid var(--wine); outline-offset:3px; }
@media(min-width:1000px) and (max-width:1199px){
  .space-shell { --rail:88px; --list:300px; }
  .layout-ready .modal { padding-left:388px; }
  .space-shell .section { padding:24px; }
}
@media(max-width:999px){
  .space-shell { display:flex; flex-direction:column; padding-bottom:calc(68px + env(safe-area-inset-bottom,0px)); }
  .space-nav { position:fixed; bottom:0; left:0; right:0; flex-direction:row; gap:0; padding:4px 12px calc(4px + env(safe-area-inset-bottom,0px)); height:calc(68px + env(safe-area-inset-bottom,0px)); border:0; border-top:1px solid var(--line); background:var(--paper); }
  .space-nav-brand { display:none; }
  .space-nav-item { flex:1; min-height:0; height:59px; padding:7px; gap:4px; border-radius:12px; font-size:11px; }
  .space-nav-item svg { height:23px; width:23px; }
  .space-nav-item[aria-current="page"] { background:none; color:var(--wine); }
  .space-nav-item[aria-current="page"] svg { background:var(--rose-light); border-radius:9px; box-shadow:0 0 0 5px var(--rose-light); }
  .space-middle { flex:1; border:0; min-height:0; }
  .space-middle-head,.space-detail-head { height:60px; min-height:60px; padding:12px 20px; }
  .space-middle-head h1 { font-size:21px; }
  .space-middle-body { padding:20px 16px; }
  .space-detail { flex:1; min-height:0; }
  .space-shell[data-tab="home"] .space-middle,.space-shell[data-tab="records"] .space-middle { flex:none; }
  .space-shell[data-tab="home"] .space-middle-body,.space-shell[data-tab="records"] .space-middle-body { display:none; }
  .space-shell[data-tab="home"] .space-detail-head,.space-shell[data-tab="records"] .space-detail-head { display:none; }
  .space-shell[data-tab="together"]:not(.has-secondary) .space-detail,.space-shell[data-tab="mine"]:not(.has-secondary) .space-detail { display:none; }
  .space-shell.has-secondary { padding-bottom:0; }
  .space-shell.has-secondary .space-middle,.space-shell.has-secondary .space-nav { display:none; }
  .space-shell .hero-inner { padding:26px 24px 23px; }
  .home-space-name { font-size:13px; margin-bottom:21px; }
  .space-shell .hero-people { gap:25px; margin-bottom:22px; }
  .space-shell .hero-quote { font-size:23px; line-height:1.75; }
  .space-shell .avatar--hero { width:62px; height:62px; }
  .space-shell .hero-person__name { font-size:13px; }
  .space-shell .hero-since { display:none; }
  .space-shell #heroEditBtn { font-size:11px; }
  .home-recent { padding:0 18px 24px; }
  .home-recent .space-row { padding:14px 8px; }
  .recent-heading { margin-top:20px; }
  .home-quick { padding-top:22px; }
  .space-shell .section { padding:22px 18px 32px; }
  .space-shell .section-head { gap:12px; margin-bottom:20px; }
  .space-shell .section-head h2 { font-size:22px; }
  .space-shell .section-lead { font-size:12px; }
  .space-shell .section-head--row { flex-direction:row; align-items:flex-start; }
  .space-shell .section-head .btn { flex-shrink:0; padding:10px 13px; font-size:12px; }
  .space-shell .record-tabs { position:sticky; top:0; z-index:3; margin:0; border-radius:0; padding:10px 18px; background:var(--paper); border-bottom:1px solid var(--line); }
  .space-shell .record-tab { background:none; border-radius:0; padding:10px 5px; }
  .space-shell .record-tab[aria-selected="true"] { box-shadow:inset 0 -2px var(--rose); color:var(--wine); }
  .space-shell .diary-toggle { padding:20px 16px; }
  .space-shell .diary-cover-label .entry-title { font-size:19px; }
  .space-shell .diary-cover-button { margin-right:10px; padding:8px 6px; }
  .space-shell .diary-sheet { padding:20px 16px; }
  .space-shell .entry-foot,.space-shell .memory-top,.space-shell .photo-meta { flex-wrap:wrap; gap:12px; }
  .space-shell .album-grid { grid-template-columns:1fr 1fr; gap:12px; }
  .space-shell .photo-caption { font-size:13px; padding:10px; }
  .space-shell .photo-meta { padding:0 10px 12px; font-size:10px; }
  .space-shell .photo-actions { flex-wrap:wrap; }
  .space-shell .timeline { padding-left:16px; }
  .space-shell .memory-card { padding:20px 16px; }
  .space-shell .memory-title { font-size:19px; }
  .space-shell .surprise-wrap { grid-template-columns:1fr; }
  .my-profile { padding:16px 8px 28px; gap:18px; }
  .my-profile strong { font-size:27px; }
  .space-group { border-radius:13px; margin-bottom:20px; }
  .space-row { padding:19px 15px; }
  .space-row-text strong { font-size:16px; }
  .space-intro { font-size:13px; margin-bottom:20px; }
  .layout-ready .modal { padding:0; height:100dvh; height:var(--app-height,100dvh); }
  .layout-ready .modal-head { min-height:60px; padding:12px 18px; gap:12px; }
  .layout-ready .modal-panel { max-width:none; border:0; }
  .layout-ready .modal-body { padding:22px 20px; }
  .layout-ready .modal-actions { padding:14px 20px max(16px,env(safe-area-inset-bottom,0px)); }
  .space-pane { padding-bottom:env(safe-area-inset-bottom,0px); }
}
@media(prefers-reduced-motion:reduce){.space-shell * { scroll-behavior:auto!important; animation:none!important; transition:none!important; }}
