/* Visual system. Existing styles retain component layout and functional states. */
:root {
  --color-background:#FAF8F4;
  --color-surface:#FFFFFF;
  --color-subtle:#F3EFE8;
  --color-text:#39342F;
  --color-secondary:#8A8178;
  --color-brand:#B78B73;
  --color-rose:#D9B8AD;
  --color-liked:#FAEEEA;
  --color-border:#EDE8E0;
  --color-special:#A66B62;
  --color-readable-muted:#726A62;
  --color-action:#795940;
  --color-action-hover:#60442F;
  --color-danger:#984F46;
  --bg:var(--color-background); --paper:var(--color-surface);
  --ink:var(--color-text); --muted:var(--color-readable-muted);
  --wine:var(--color-action); --wine-deep:var(--color-action-hover); --line:var(--color-border);
  --sans:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  --serif:Georgia,"Times New Roman",serif;
  --space-1:4px; --space-2:8px; --space-3:12px; --space-4:16px;
  --space-6:24px; --space-8:32px; --space-12:48px; --space-16:64px;
  --radius-sm:12px; --radius:16px; --radius-lg:20px;
  --shadow-soft:0 6px 24px #39342F05;
  --ease:cubic-bezier(.2,.65,.3,1);
}
body { background:var(--bg); font:14px/1.75 var(--sans); color:var(--ink); }
h1,h2,h3 { font-family:var(--sans); letter-spacing:-.025em; font-weight:550; text-wrap:pretty; }
h1 { font-size:32px; } h2 { font-size:22px; } h3 { font-size:17px; }
a,button,summary { touch-action:manipulation; }
button,a,input,textarea,select,summary { outline-offset:4px; }
button:focus-visible,a:focus-visible,summary:focus-visible,input:focus,textarea:focus,select:focus { outline:2px solid var(--color-action); }
input,textarea,select { border-color:#CFC6BB; background:var(--paper); border-radius:var(--radius-sm); color:var(--ink); }
input::placeholder,textarea::placeholder { color:var(--color-secondary); }
button { transition:background .18s var(--ease),transform .18s var(--ease); }
button:active,.button:active { transform:translateY(1px); }
::selection { background:#E8D6C8; color:var(--ink); }
.eyebrow { font:500 10px/1.5 var(--sans); letter-spacing:.18em; color:var(--muted); }
.eyebrow.light { color:var(--muted); }
.page { padding-top:32px; padding-bottom:48px; }
.topbar { min-height:88px; height:auto; padding:20px 0; display:grid; grid-template-columns:1fr auto 1fr; border-color:var(--line); }
.brand { font:550 19px/1.45 var(--sans); letter-spacing:.03em; }
.brand-mark { width:38px; height:38px; filter:none; }
.brand small { font:500 8px/1.5 var(--sans); letter-spacing:.15em; }
.top-links { display:flex; gap:28px; font-size:13px; }
.top-links a { position:relative; }
.top-links a[aria-current=page] { color:var(--ink); }
.top-links a[aria-current=page]::after { content:''; height:2px; background:var(--color-brand); position:absolute; bottom:0; left:0; right:0; }
.account { justify-self:end; gap:16px; }
.account-avatar,.avatar { background:var(--color-subtle); color:var(--color-action); }
.private-badge { grid-column:3; justify-self:end; color:var(--muted); }
.footer { color:var(--muted); letter-spacing:0; font-size:12px; }
.footer-brand { font:550 15px var(--sans); letter-spacing:0; color:var(--ink); }
.footer-signature { margin-left:auto; font:italic 13px var(--serif); }
.storage-nav { display:flex; gap:16px; flex-wrap:wrap; align-items:center; margin:48px 0 0; padding:20px 0 0; border-top:1px solid var(--line); text-align:left; color:var(--muted); font-size:12px; }
.storage-nav>span { color:var(--color-secondary); margin-right:auto; }
.storage-nav a { display:inline-flex; align-items:center; min-height:44px; }
.button { border-radius:var(--radius-sm); min-height:44px; font-size:13px; padding:10px 18px; box-shadow:none; }
.button.primary { background:var(--color-action); color:white; box-shadow:none; }
.button.primary:hover { background:var(--color-action-hover); box-shadow:none; }
.button.secondary,.button.hero-button { color:var(--color-action); background:var(--color-subtle); border-color:var(--line); box-shadow:none; }
.button.secondary:hover,.button.hero-button:hover { background:#EAE2D7; box-shadow:none; }
.button.subtle { color:var(--muted); border-color:var(--line); }
.text-button { font-size:12px; min-height:44px; }
.delete-button { color:var(--color-danger); }
.quiet-link { display:inline-flex; align-items:center; gap:8px; min-height:44px; font-size:12px; color:var(--muted); }
.quiet-link:hover { color:var(--ink); }
.tag,.album-tag { background:var(--color-subtle); color:var(--color-action); border-radius:8px; }
.notice,.trash-info { background:var(--color-subtle); border-color:var(--line); border-radius:var(--radius-sm); color:var(--ink); font-size:13px; flex-wrap:wrap; }
.notice a { text-decoration:underline; text-underline-offset:3px; color:var(--color-action); }
.form-error { background:#F8EEEA; color:var(--color-danger); border-color:#E4C9BF; border-radius:var(--radius-sm); font-size:13px; }
.home-heading { display:flex; align-items:center; justify-content:space-between; gap:24px; margin:8px 0 28px; }
.couple-identity { display:flex; align-items:center; gap:16px; min-width:0; }
.couple-avatars { display:flex; padding-right:4px; flex-shrink:0; }
.couple-avatars span { display:grid; place-items:center; width:48px; height:48px; border-radius:50%; background:#EAE1D4; color:var(--color-action); border:3px solid var(--bg); font:20px var(--serif); }
.couple-avatars span+span { margin-left:-12px; background:#EBDDD7; }
.home-heading h1 { font-size:26px; margin:0; overflow-wrap:anywhere; }
.home-heading h1 small { display:inline-block; font:13px var(--sans); color:var(--muted); margin-left:12px; }
.home-heading .eyebrow { margin-bottom:4px; }
.name-amp { font:italic 24px var(--serif); color:var(--color-brand); padding:0 4px; }
.together-card { background:var(--color-subtle); border:0; border-radius:var(--radius-lg); padding:36px 40px; margin:0; box-shadow:none; gap:32px; }
.together-card::after { display:none; }
.together-story h2 { font:500 34px/1.5 var(--sans); margin:12px 0; color:var(--ink); letter-spacing:-.035em; }
.together-story p { color:var(--muted); font-size:12px; }
.together-count { text-align:right; color:var(--muted); }
.together-count>span { font-size:12px; letter-spacing:.1em; }
.together-count>div { font-size:14px; }
.together-count strong { font:64px/1.1 var(--serif); color:var(--ink); padding:0 6px; }
.together-count small { color:var(--muted); font-size:12px; }
.home-overview { margin:24px 0; }
.home-overview>summary { display:none; }
.overview-grid { display:grid; grid-template-columns:minmax(0,1fr) 270px; gap:24px; }
.recent-photos { padding:24px; background:var(--paper); border:1px solid var(--line); border-radius:var(--radius-lg); min-width:0; }
.section-topline { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:16px; }
.section-topline .eyebrow { margin:0; }
.section-topline a { font-size:12px; color:var(--muted); display:flex; gap:6px; align-items:center; min-height:28px; }
.photo-contact-sheet { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.contact-photo { min-width:0; }
.contact-photo img { width:100%; aspect-ratio:3/2; object-fit:cover; border-radius:var(--radius-sm); background:var(--color-subtle); }
.contact-photo>span { display:block; margin-top:8px; color:var(--muted); font:12px var(--serif); }
.photo-empty { min-height:140px; background:var(--color-subtle); border-radius:var(--radius-sm); padding:24px; display:grid; align-content:center; gap:12px; color:var(--muted); }
.photo-empty a { font-size:12px; color:var(--color-action); }
.anniversary-note { padding:24px; border:1px solid var(--line); border-radius:var(--radius-lg); background:#F4EDE7; }
.anniversary-date { font:26px var(--serif); color:var(--color-special); margin-bottom:12px; }
.anniversary-date strong { font-size:46px; font-weight:400; }
.anniversary-note h2 { font-size:16px; margin-bottom:6px; }
.anniversary-note p { font-size:12px; color:var(--muted); margin-bottom:12px; }
.anniversary-note>a { display:inline-flex; gap:6px; align-items:center; min-height:32px; font-size:12px; color:var(--color-action); }
.intro-line { color:var(--muted); padding:4px 2px 20px; }
.intro-line>span { font-size:12px; }
.space-summary strong { color:var(--muted); }
.space-summary meter::-webkit-meter-optimum-value { background:var(--color-brand); }
.composer { border-radius:var(--radius); box-shadow:none; margin-bottom:36px; border-color:var(--line); }
.composer summary { padding:18px 24px; }
.compose-plus { background:var(--color-subtle); border-radius:var(--radius-sm); }
.composer summary strong { font-size:14px; font-weight:500; }
.composer summary small { font-size:12px; }
.compose-label { font-size:12px; }
.compose-form { padding:24px; }
.title-input { font:500 20px var(--sans); }
.compose-form textarea { background:var(--color-background); font-size:15px; }
.moment-options,.story-moment { background:var(--color-subtle); color:var(--muted); border-radius:var(--radius-sm); }
.moment-options p { font-size:12px; }
.album-field { max-width:100%; }
.selected-files li { background:var(--color-subtle); color:var(--ink); border-radius:8px; }
.upload-help,.draft-tools { font-size:12px; }
.library-heading h2 { font-size:26px; letter-spacing:-.025em; }
.library-heading .eyebrow { font-size:10px; letter-spacing:.16em; }
.collection-dot { color:var(--color-brand); }
.collection-count { font-style:normal; color:var(--ink); }
.collection-count small { font-size:12px; }
.month-jump-form select { background:var(--paper); color:var(--ink); border-color:#CFC6BB; border-radius:var(--radius-sm); }
.filter-details summary { color:var(--muted); }
.collection-filters { border-radius:var(--radius-sm); background:var(--color-subtle); }
.collection-filters input,.collection-filters select { background:var(--paper); color:var(--ink); border-color:#CFC6BB; }
.tab { color:var(--muted); border-radius:var(--radius-sm); font-size:13px; min-height:44px; }
.tab.active { background:var(--color-action); color:white; box-shadow:none; }
.tab:not(.active):hover { background:var(--color-subtle); }
.search { background:var(--paper); border-radius:var(--radius-sm); border-color:var(--line); }
.search input { font-size:13px; }
.search button { color:var(--muted); }
.section-caption { color:var(--muted); font-size:12px; }
.card { background:var(--paper); border-color:var(--line); border-radius:var(--radius); box-shadow:none; transition:transform .2s var(--ease),box-shadow .2s var(--ease); }
.card:hover { transform:translateY(-2px); box-shadow:var(--shadow-soft); }
.text-card { background:var(--paper); }
.card-photos { background:var(--color-subtle); border-radius:var(--radius-sm); margin:10px 10px 0; }
.card-content { padding:20px; }
.card h3 { font-size:18px; font-weight:550; letter-spacing:-.015em; }
.card-meta,.card-meta time { color:var(--muted); font-size:11px; }
.post-excerpt { color:var(--muted); font-size:13px; line-height:1.8; }
.card-bottom { border-color:var(--line); }
.detail-link { font-size:12px; min-height:44px; }
.photo-badge { background:#39342FCC; backdrop-filter:none; }
.photo-more { background:#39342FCC; }
.note-marker { color:var(--muted); padding:24px 20px 0; }
.note-quote { display:none; }
.note-marker>span:not(.note-quote) { font-size:9px; letter-spacing:.15em; }
.file-row { background:var(--color-subtle); border-color:var(--line); border-radius:var(--radius-sm); }
.file-symbol { background:#E7DFD3; color:var(--color-action); }
.file-name { font-size:13px; }
.file-name small { font-size:11px; }
.file-download { color:var(--muted); }
.empty-state { background:var(--paper); border-color:var(--line); border-radius:var(--radius-lg); }
.empty-envelope { transform:none; box-shadow:none; border-color:var(--line); background:var(--color-subtle); border-radius:var(--radius); }
.empty-envelope .icon { color:var(--color-action); }
.empty-state p { font-size:13px; }
.pagination { font-size:13px; }
.memory-strip { border-color:var(--line); padding:24px 0 0; margin:24px 0; }
.memory-strip h2 { font-size:20px; }
.memory-card { background:var(--paper); border-color:var(--line); border-radius:var(--radius); }
.memory-card strong { font-size:14px; font-weight:500; }
.memory-card span { color:var(--muted); }
.reading-page { max-width:880px; }
.detail-panel { padding:40px; border-color:var(--line); border-radius:var(--radius-lg); box-shadow:none; overflow-wrap:anywhere; }
.detail-panel>h1 { margin-bottom:12px; }
.detail-panel>h2 { margin:36px 0 16px; padding-top:24px; border-top:1px solid var(--line); }
.detail-panel>.stack { max-width:560px; margin:20px 0 32px; }
.detail-panel>p { color:var(--muted); }
.detail-panel>p a { color:var(--color-action); text-decoration:underline; text-underline-offset:3px; }
.back-link { font-size:13px; min-height:44px; color:var(--muted); }
.story-heading { border-color:var(--line); padding-bottom:24px; }
.story-heading h1 { font-size:34px; margin:16px 0 20px; }
.story-mark { display:none; }
.story-heading>.eyebrow { font-size:10px; }
.story-heading .card-meta time { font-size:12px; }
.story-moment { font-size:13px; }
.full-text { color:var(--ink); font-size:16px; line-height:2; }
.record-location { font-size:12px; color:var(--muted); }
.location-label { color:var(--muted); font-size:11px; }
.record-location small { font-size:11px; }
.detail-photos img { border-radius:var(--radius-sm); background:var(--color-subtle); }
.detail-photos figcaption { font-size:12px; }
.story-end { color:var(--color-brand); }
.story-end .icon { display:none; }
.conversation,.media-editor,.history-panel,.revision,.comment { border-color:var(--line); }
.conversation h2 { font-size:22px; }
.conversation h3 { margin-top:32px; }
.comment-form .button { justify-self:start; }
.comment p { margin:12px 0 0; font-size:14px; }
.comment time { font-size:12px; color:var(--muted); margin-left:8px; }
.history-panel summary { min-height:44px; }
.media-editor[open] summary { margin-bottom:24px; }
.photo-order-list li { border-color:var(--line); }
.storage-grid { gap:16px; }
.storage-grid>div { background:var(--color-subtle); border-radius:var(--radius); }
.storage-grid strong { font:28px var(--serif); }
.storage-trash { border-color:var(--line); }
.storage-trash small { color:var(--muted); }
.inbox-item { border-color:var(--line); }
.inbox-item.unread { border-left:3px solid var(--color-brand); background:var(--color-background); padding-right:16px; }
.inbox-item>a { font-size:18px; color:var(--ink); }
.inbox-item p,.inbox-item small { color:var(--muted); }
.unread-badge { background:var(--color-action); }
.recovery-code { background:var(--color-subtle); border:1px dashed #CFC6BB; }
.camera-dialog { border-color:var(--line); border-radius:var(--radius-lg); box-shadow:0 24px 80px #39342F30; }
.camera-dialog::backdrop { background:#39342F99; backdrop-filter:none; }
.camera-close { background:var(--color-subtle); color:var(--ink); }
.camera-select-label select { border-color:#CFC6BB; background:var(--paper); }
.camera-status { font-size:13px; }
.photo-viewer { background:#282522; }
.viewer-toolbar button,.viewer-controls button { background:#423B34; border-color:#746A60; border-radius:var(--radius-sm); min-height:44px; }
.camera-dialog[open] { animation:surface-in .2s var(--ease); }
.page { width:calc(100% - 80px); margin-left:auto; margin-right:auto; }
.page:not(.home-page):not(.space-page):not(.auth-page) { max-width:960px; }
.page.reading-page { max-width:880px; }
.auth-page { max-width:1080px; padding:0; margin:40px auto 64px; border-color:var(--line); border-radius:var(--radius-lg); box-shadow:var(--shadow-soft); grid-template-columns:1fr 1fr; }
.welcome-panel { background:#EEE7DC; color:var(--ink); min-height:620px; padding:40px; }
.welcome-panel h1 { font:500 36px/1.5 var(--sans); letter-spacing:-.035em; margin:16px 0; }
.welcome-panel h1 span { color:var(--color-action); }
.welcome-panel p { color:var(--muted); font-size:13px; }
.welcome-copy .eyebrow { color:var(--muted); font-size:10px; }
.welcome-art { width:100%; height:auto; right:0; bottom:44px; }
.welcome-art img { width:100%; height:auto; object-fit:contain; }
.art-caption { position:static; display:block; padding-right:30px; font:italic 14px var(--serif); color:var(--muted); transform:none; }
.welcome-bottom { color:var(--muted); font-size:8px; letter-spacing:.1em; }
.auth-card { background:var(--paper); padding:40px; }
.auth-card h1,.auth-card h2 { font:550 28px/1.5 var(--sans); letter-spacing:-.025em; }
.auth-card>.eyebrow { font-size:10px; }
.auth-card>p { font-size:13px; color:var(--muted); }
.auth-card>p a { color:var(--color-action); }
.auth-note { font-size:12px!important; }
.stack { gap:20px; }
.stack label { font-size:13px; color:var(--ink); gap:8px; }
.stack input { font-size:15px; background:var(--paper); }
.stack textarea { font-size:15px; }
.standalone { max-width:520px; margin:12px auto 32px; border-color:var(--line); border-radius:var(--radius-lg); padding:36px; box-shadow:none; }
.settings-emblem { background:var(--color-subtle); color:var(--color-action); }
body[data-page=purge] .button.primary { background:var(--color-danger); }
.space-heading { margin:12px 0 32px; }
.space-heading h1 { font-size:42px; line-height:1.45; margin:12px 0 16px; }
.space-heading p { color:var(--muted); font-size:14px; }
.space-intro-grid { display:grid; grid-template-columns:1.2fr 1fr; gap:24px; }
.space-people { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); background:var(--paper); border:1px solid var(--line); border-radius:var(--radius-lg); overflow:hidden; }
.person-card { text-align:center; padding:28px 20px; min-width:0; }
.person-card+ .person-card { border-left:1px solid var(--line); }
.person-avatar { display:grid; place-items:center; width:64px; height:64px; margin:0 auto 16px; border-radius:50%; background:#EAE1D4; color:var(--color-action); font:26px var(--serif); }
.person-card:nth-child(2) .person-avatar { background:#EBDDD7; }
.person-card h2 { font-size:21px; margin:0 0 4px; overflow-wrap:anywhere; }
.person-card p { color:var(--muted); font-size:12px; margin:0 0 12px; }
.person-card>a { display:flex; justify-content:center; align-items:center; gap:6px; min-height:44px; font-size:12px; color:var(--color-action); }
.person-card .person-settings { color:var(--muted); font-size:11px; }
.space-origin { background:var(--color-subtle); padding:32px; border-radius:var(--radius-lg); }
.space-origin>time { display:block; font:36px var(--serif); color:var(--color-action); margin:16px 0; }
.space-origin h2 { font-size:20px; }
.space-origin p { font-size:13px; color:var(--muted); }
.space-origin p strong { font:24px var(--serif); color:var(--ink); padding:0 4px; }
.space-numbers { display:flex; gap:24px; border-top:1px solid #DFD6CA; padding-top:16px; font-size:12px; color:var(--muted); }
.space-numbers strong { font:24px var(--serif); color:var(--ink); margin-right:6px; }
.space-section { margin:48px 0; }
.space-section-heading { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:20px; }
.space-section-heading h2 { margin:0; font-size:24px; }
.space-section-heading .eyebrow { margin-bottom:8px; }
.album-shelf { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.album-shelf>a { display:flex; align-items:center; gap:16px; border:1px solid var(--line); border-radius:var(--radius); background:var(--paper); padding:18px; min-width:0; transition:transform .2s var(--ease); }
.album-shelf>a:hover { transform:translateY(-2px); }
.album-spine { display:grid; place-items:center; width:34px; height:48px; border-radius:4px 8px 8px 4px; background:var(--color-subtle); border-left:3px solid var(--color-brand); color:var(--color-action); font:16px var(--serif); flex-shrink:0; }
.album-shelf>a>span:nth-child(2) { min-width:0; flex:1; }
.album-shelf strong { display:block; font-weight:500; overflow-wrap:anywhere; }
.album-shelf small { display:block; font-size:11px; color:var(--muted); margin-top:6px; }
.album-shelf .icon { color:var(--color-secondary); width:15px; }
.space-empty { grid-column:1/-1; background:var(--color-subtle); border-radius:var(--radius); padding:24px; }
.space-empty h3 { margin-bottom:8px; }
.space-empty p { color:var(--muted); font-size:13px; margin-bottom:8px; }
.space-plans { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.space-plan { display:flex; flex-direction:column; padding:24px; background:var(--paper); border:1px solid var(--line); border-radius:var(--radius-lg); min-width:0; }
.space-plan h2 { font-size:22px; margin:4px 0 8px; }
.space-plan>p { font-size:13px; }
.plan-records { margin:8px 0 24px; }
.plan-records>a { display:flex; align-items:start; gap:10px; border-top:1px solid var(--line); padding:14px 0; }
.plan-records>a>span { font:14px var(--serif); color:var(--color-brand); padding-top:3px; }
.plan-records>a>div { flex:1; min-width:0; }
.plan-records strong { display:block; font-weight:500; font-size:14px; overflow-wrap:anywhere; }
.plan-records p { color:var(--muted); font-size:12px; margin:6px 0 0; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.plan-records .icon { width:14px; margin-top:5px; color:var(--color-secondary); }
.plan-empty { font-size:13px; color:var(--muted); padding:20px 0; border-top:1px solid var(--line); }
.plan-actions { margin-top:auto; display:flex; flex-wrap:wrap; gap:8px 16px; align-items:center; }
.place-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.place-list>a { display:flex; align-items:center; gap:16px; padding:20px; background:var(--paper); border:1px solid var(--line); border-radius:var(--radius); }
.place-number { font:28px var(--serif); color:var(--color-brand); }
.place-list>a>span:nth-child(2) { flex:1; min-width:0; }
.place-list strong { font-size:14px; font-weight:500; overflow-wrap:anywhere; }
.place-list small { display:block; margin-top:8px; color:var(--muted); font-size:12px; }
.place-list .icon { width:15px; color:var(--color-secondary); }
.space-anniversary { display:flex; align-items:center; justify-content:space-between; gap:24px; padding:32px; border-radius:var(--radius-lg); background:#F4EDE7; }
.space-anniversary h2 { font-size:24px; margin-bottom:12px; }
.space-anniversary p { color:var(--muted); margin:0; }
.media-ready { animation:photo-in .22s var(--ease); }
.media-unavailable { min-height:70px; background:var(--color-subtle); color:var(--muted); }
.image-fallback { display:block; color:var(--muted); font-size:12px; padding:8px; }
@keyframes surface-in { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }
@keyframes photo-in { from { opacity:.5; } to { opacity:1; } }
@media (prefers-reduced-motion:no-preference) { .page { animation:surface-in .2s var(--ease); } }
@media(max-width:1050px) {
  .page { width:calc(100% - 48px); }
  .space-intro-grid { grid-template-columns:1fr 1fr; gap:16px; }
  .space-plans { grid-template-columns:1fr; }
  .album-shelf { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .space-anniversary { flex-direction:column; align-items:flex-start; }
  .welcome-panel { padding:32px; }
  .welcome-panel h1 { font-size:30px; }
  .auth-card { padding:32px; }
  .topbar { grid-template-columns:1fr auto; gap:8px 20px; }
  .top-links { grid-column:1 / -1; grid-row:2; justify-content:center; gap:32px; }
  .account { grid-column:2; grid-row:1; }
  .private-badge { grid-column:2; }
  .overview-grid { grid-template-columns:minmax(0,1fr) 230px; gap:16px; }
  .together-story h2 { font-size:28px; }
}
@media(max-width:600px) {
  .topbar { margin:0 20px; padding:12px 0 0; min-height:0; gap:4px 8px; }
  .brand { font-size:17px; gap:8px; }
  .brand-mark { width:32px; height:32px; }
  .brand small { font-size:7px; letter-spacing:.1em; }
  .account { gap:10px; }
  .account-name>span:last-child { display:none; }
  .top-links { justify-content:space-between; gap:8px; font-size:12px; }
  .top-links a { min-height:46px; }
  .top-links .icon { width:14px; height:14px; }
  .private-badge { font-size:10px; }
  .page { width:calc(100% - 32px); margin:0 auto; padding:20px 0 32px; }
  .auth-page { display:block; padding:0; margin:24px auto 40px; }
  .welcome-panel { min-height:0; padding:24px; }
  .welcome-panel h1 { font-size:25px; margin:12px 0; }
  .welcome-copy .eyebrow { font-size:9px; margin:0; }
  .welcome-panel p { font-size:12px; margin:0; }
  .welcome-art,.welcome-bottom { display:none; }
  .auth-card { padding:28px 24px; }
  .auth-card h1,.auth-card h2 { font-size:24px; }
  .auth-card>p { font-size:13px; }
  .auth-note { font-size:11px!important; }
  .stack input,.stack textarea { font-size:16px; }
  .standalone { padding:28px 20px; margin:0 auto 24px; }
  .space-heading { margin:4px 0 24px; }
  .space-heading h1 { font-size:28px; }
  .space-heading p { font-size:13px; }
  .space-intro-grid { grid-template-columns:1fr; }
  .person-card { padding:24px 12px; }
  .person-avatar { width:52px; height:52px; font-size:22px; }
  .space-origin { padding:24px; }
  .space-origin>time { font-size:32px; }
  .space-section { margin:32px 0; }
  .space-section-heading { align-items:flex-start; flex-direction:column; gap:8px; }
  .space-section-heading h2 { font-size:22px; }
  .space-section-heading .eyebrow { font-size:9px; }
  .album-shelf { grid-template-columns:1fr; gap:8px; }
  .album-shelf>a { padding:14px; }
  .space-plan { padding:20px; }
  .place-list { grid-template-columns:1fr; }
  .space-anniversary { padding:24px; gap:16px; }
  .space-anniversary h2 { font-size:22px; }
  .notice { font-size:12px; padding:12px; gap:6px 10px; margin-bottom:16px; }
  .home-heading { margin:0 0 16px; gap:8px; }
  .couple-identity { gap:8px; }
  .couple-avatars span { width:34px; height:34px; font-size:15px; border-width:2px; }
  .couple-avatars span+span { margin-left:-10px; }
  .home-heading h1 { font-size:19px; }
  .home-heading h1 small { display:none; }
  .home-heading .eyebrow { font-size:8px; letter-spacing:.1em; }
  .home-heading>.quiet-link { display:none; }
  .name-amp { font-size:18px; padding:0; }
  .together-card { padding:16px; gap:2px 8px; border-radius:var(--radius); }
  .together-story h2,.together-story .eyebrow,.together-count small { display:none; }
  .together-story p { font-size:0; }
  .together-story time { font-size:11px; }
  .together-count { text-align:left; }
  .together-count strong { font-size:34px; color:var(--ink); }
  .together-count>span { font-size:11px; letter-spacing:0; }
  .mobile-compose:not([hidden]) { background:var(--paper); border-color:var(--line); font-size:12px; padding:10px; }
  .home-overview { margin:8px 0 12px; }
  .home-overview>summary { display:flex; align-items:center; gap:8px; min-height:44px; color:var(--muted); font-size:12px; cursor:pointer; list-style:none; }
  .home-overview>summary::-webkit-details-marker { display:none; }
  .home-overview>summary small { font-size:10px; color:var(--muted); }
  .home-overview>summary .icon { margin-left:auto; width:14px; height:14px; }
  .home-overview[open]>summary .icon { transform:rotate(45deg); }
  .overview-grid { grid-template-columns:1fr; gap:12px; margin-bottom:16px; }
  .recent-photos,.anniversary-note { padding:16px; border-radius:var(--radius); }
  .photo-contact-sheet { gap:8px; }
  .contact-photo img { aspect-ratio:4/3; border-radius:8px; }
  .contact-photo>span { font-size:10px; }
  .anniversary-note { display:grid; grid-template-columns:80px 1fr; gap:4px 12px; }
  .anniversary-note .eyebrow { grid-column:1/-1; margin:0 0 6px; }
  .anniversary-date { grid-row:2 / 5; margin:0; align-self:center; font-size:18px; }
  .anniversary-date strong { font-size:32px; }
  .anniversary-note h2,.anniversary-note p { margin:0; }
  .anniversary-note>a { font-size:11px; }
  .composer { margin:0 0 24px; }
  .home-page .composer:not([open]):not(:target) { display:none; }
  .composer summary { padding:10px 12px; }
  .composer summary strong { font-size:12px; }
  .composer summary small { display:none; }
  .compose-label { font-size:0; gap:0; }
  .compose-form { padding:16px; }
  .compose-form input,.compose-form textarea,.stack input,.collection-filters select { font-size:16px; }
  .compose-form input[type=checkbox] { width:18px; }
  .moment-options { padding:12px; }
  .moment-options p { font-size:12px; }
  .library-heading { margin-bottom:12px; }
  .library-heading h2 { font-size:22px; }
  .collection-count { font-size:24px; }
  .collection-count small { font-size:11px; }
  .month-jump-form label { font-size:12px; }
  .tab { font-size:11px; padding:8px 7px; gap:4px; border-radius:9px; }
  .search input { font-size:16px; }
  .search input::placeholder { font-size:12px; }
  .section-caption { font-size:10px; }
  .section-caption>span:last-child { font-size:10px; }
  #library .card { border-radius:var(--radius); padding:14px 14px 0; }
  #library .card h3 { font-size:15px; font-weight:550; }
  #library .card-meta time { font-size:11px; }
  #library .post-excerpt { color:var(--muted); font-size:12px; }
  #library .photo-badge { background:#39342FBB; }
  #library .card-bottom .detail-link,#library .card-bottom .text-button { font-size:12px; }
  #memory-home .memory-strip { padding-top:12px; margin:0 0 16px; }
  #memory-home .memory-strip h2 { font-size:13px; }
  .detail-panel { padding:24px 18px; border-radius:var(--radius); }
  .detail-panel>h1 { font-size:26px; }
  .detail-panel>h2 { font-size:20px; margin-top:28px; }
  .reading-page { width:auto; margin:0 16px; }
  .story-heading h1 { font-size:27px; }
  .story-heading .card-meta { gap:8px; }
  .full-text { font-size:15px; line-height:1.95; }
  .story-moment { padding:14px; }
  .detail-photos figcaption { font-size:11px; }
  .history-panel { font-size:13px; }
  .storage-trash { gap:12px; }
  .storage-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .storage-grid>div { padding:16px 12px; gap:8px; font-size:12px; }
  .storage-grid strong { font-size:23px; }
  .storage-nav { margin-top:32px; gap:8px 16px; font-size:11px; }
  .storage-nav>span { flex-basis:100%; }
  .footer { margin:0 20px; font-size:11px; gap:8px 12px; }
  .footer-signature { flex-basis:100%; margin:0; font-size:12px; }
  .footer .icp-record { font-size:10px; }
  .camera-dialog { padding:18px; }
  .camera-stage { min-height:160px; }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; }
}

/* Focused writing and reading: detail is available on demand. */
.compose-form .title-input { margin-bottom:12px; padding-bottom:12px; font-size:18px; }
.compose-form textarea { min-height:112px; }
.compose-form .upload-actions { margin-top:12px; }
.compose-form .selected-files:empty { display:none; }
.compose-switches { display:flex; flex-wrap:wrap; gap:4px 24px; margin:8px 0 0; }
.compose-switches label { display:flex; align-items:center; gap:8px; min-height:44px; font-size:12px; color:var(--muted); cursor:pointer; }
.compose-switches input[type=checkbox] { width:17px; height:17px; padding:0; accent-color:var(--color-action); }
#location-status { font-size:12px; margin:0 0 8px; }
#location-status:empty { display:none; }
.compose-options { border-top:1px solid var(--line); }
.compose-options>summary { display:flex; gap:12px; align-items:center; min-height:44px; padding:8px 0; font-size:12px; color:var(--muted); list-style:revert; border:0!important; }
.compose-options>summary::after { content:'+'; margin-left:auto; font-size:18px; }
.compose-options[open]>summary::after { content:'−'; }
#compose-context { max-width:65%; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; color:var(--color-action); font-size:11px; }
.compose-option-fields { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.compose-option-fields .album-field { min-width:0; margin:8px 0 12px; font-size:12px; }
.compose-option-fields input { margin-top:6px; }
.compose-option-fields small,.setting-note { font-size:11px; color:var(--muted); line-height:1.7; }
.setting-note { margin:4px 0 8px; }
.compose-form .draft-tools { display:flex; flex-wrap:wrap; align-items:center; gap:20px; padding:4px 0 12px; }
.compose-form .draft-tools>a { display:inline-flex; min-height:44px; align-items:center; font-size:12px; }
.compose-footer { display:flex; align-items:center; justify-content:space-between; gap:16px; padding-top:12px; border-top:1px solid var(--line); }
.compose-footer #draft-status { font-size:11px; line-height:1.6; margin:0; min-width:0; flex:1; }
.compose-footer .publish { flex-shrink:0; margin:0; width:auto; }
.focused-record { padding:32px; }
.focused-record .story-heading { margin-bottom:20px; padding:0; border:0; }
.focused-record .story-heading h1 { font-size:30px; margin:0 0 12px; }
.focused-record .card-meta { flex-wrap:wrap; gap:8px; }
.focused-record .card-meta time { font-size:12px; }
.focused-record .album-tag { padding:3px 9px; font-size:11px; }
.focused-record .story-place { color:var(--muted); font-size:12px; margin:10px 0 0; overflow-wrap:anywhere; }
.focused-record>.full-text { margin:0 0 20px; font-size:15px; line-height:1.9; }
.record-photos { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.record-photos figure { min-width:0; }
.record-photos figure:first-child { grid-column:1/-1; }
.record-photos figure:first-child img { width:100%; max-height:480px; object-fit:contain; }
.record-photos figure:not(:first-child) img { width:100%; height:auto; aspect-ratio:4/3; object-fit:cover; }
.record-photos img { border-radius:10px; }
.photo-toolbar { display:flex; align-items:flex-start; gap:16px; justify-content:space-between; padding:8px 0 12px; color:var(--muted); font-size:12px; }
.photo-toolbar>span { padding-top:12px; flex-shrink:0; }
.photo-downloads { min-width:0; max-width:65%; text-align:right; }
.photo-downloads>summary { display:flex; align-items:center; justify-content:flex-end; min-height:44px; cursor:pointer; gap:6px; color:var(--color-action); list-style:none; }
.photo-downloads>summary::-webkit-details-marker { display:none; }
.photo-downloads .icon { width:14px; }
.photo-downloads ul { margin:0; padding:0; list-style:none; text-align:left; }
.photo-downloads li a { display:block; min-height:44px; padding:8px; overflow-wrap:anywhere; border-top:1px solid var(--line); }
.photo-downloads small { display:block; color:var(--muted); }
.record-info { border-top:1px solid var(--line); padding:4px 0; color:var(--muted); font-size:12px; }
.record-info>summary,.record-management>summary,.comment-compose>summary { cursor:pointer; min-height:44px; padding:11px 0; font-size:13px; }
.record-info>p { margin:4px 0; }
.record-info .record-location { margin:8px 0 16px; }
.compact-conversation { margin:0; padding:8px 0 16px; border-top:1px solid var(--line); }
.conversation-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.compact-conversation h2 { margin:0; font-size:16px; }
.compact-conversation h2 span { font:15px var(--serif); color:var(--muted); margin-left:6px; }
.compact-conversation .comment { padding:12px 0; }
.compact-conversation .comment time { font-size:11px; }
.compact-conversation .comment .full-text { font-size:14px; line-height:1.8; }
.compact-conversation .comment-form { margin:4px 0 0; gap:12px; }
.compact-conversation textarea { min-height:86px; }
.compact-conversation .comment-form [role=status]:empty { display:none; }
.record-management { border-top:1px solid var(--line); }
.record-management>summary { color:var(--muted); }
.record-management>.edit-panel,.record-management>.media-editor,.record-management>.history-panel { margin:0; padding:4px 0; border-top:1px solid var(--line); }
.record-management>.edit-panel>summary,.record-management>.media-editor>summary { padding:11px 0; min-height:44px; list-style:revert; cursor:pointer; font-size:13px; }
.record-management .stack { margin:12px 0 20px; }
.record-management .media-editor h3 { font-size:16px; margin-top:24px; }
.record-management .media-editor p { font-size:12px; }
.record-management .history-panel { font-size:13px; }
.record-delete { padding:8px 0 0; border-top:1px solid var(--line); }
@media(max-width:600px) {
  .compose-option-fields { grid-template-columns:1fr; gap:0; }
  .compose-switches { gap:0 16px; }
  .compose-switches label { font-size:12px; }
  .compose-footer { gap:12px; }
  .compose-footer .publish { min-width:116px; width:auto; font-size:12px; }
  .compose-footer #draft-status { font-size:10px; }
  .focused-record { padding:22px 16px; }
  .focused-record .story-heading h1 { font-size:25px; }
  .focused-record .story-heading { margin-bottom:16px; }
  .focused-record>.full-text { margin-bottom:16px; font-size:14px; }
  .record-photos { gap:6px; }
  .record-photos figure:first-child img { max-height:360px; }
  .photo-toolbar { font-size:11px; gap:8px; padding-bottom:8px; }
  .photo-downloads { max-width:60%; }
  .compact-conversation { padding-bottom:8px; }
  .compact-conversation h2 { font-size:15px; }
}

/* Stable application sections. Keep this bar outside animated page containers. */
.has-bottom-nav { --bottom-nav-height:72px; padding-bottom:calc(var(--bottom-nav-height) + 16px + env(safe-area-inset-bottom,0px)); }
.has-bottom-nav .topbar { grid-template-columns:1fr auto; }
.has-bottom-nav .topbar .account { grid-column:2; grid-row:1; }
.bottom-nav { position:fixed; inset:auto 0 0; z-index:40; background:var(--paper); border-top:1px solid var(--line); padding:0 env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px); }
.bottom-nav-inner { max-width:600px; height:var(--bottom-nav-height); margin:0 auto; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); align-items:center; gap:8px; padding:6px 12px; }
.bottom-nav a { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; min-height:58px; border-radius:12px; color:var(--muted); text-decoration:none; font-size:12px; line-height:1.5; transition:background .18s var(--ease),color .18s var(--ease); }
.bottom-nav .icon { width:23px; height:23px; }
.bottom-nav a[aria-current] { background:var(--color-subtle); color:var(--color-action); font-weight:600; }
.bottom-nav a:active { background:var(--color-subtle); }
.bottom-nav a:focus-visible { outline-offset:-3px; }
@media(hover:hover) { .bottom-nav a:hover { color:var(--color-action); background:var(--color-background); } }
.has-bottom-nav :is(input,textarea,button,summary) { scroll-margin-bottom:100px; }
.settings-page { max-width:680px; }
.settings-heading { margin-bottom:24px; }
.settings-heading h1 { margin:6px 0 0; }
.settings-profile { display:flex; align-items:center; gap:16px; margin-bottom:32px; }
.settings-avatar { width:56px; height:56px; border-radius:50%; background:var(--color-subtle); color:var(--color-action); display:grid; place-items:center; font:24px var(--serif); }
.settings-profile strong { display:block; font-size:20px; overflow-wrap:anywhere; }
.settings-profile small { display:block; color:var(--muted); font-size:12px; }
.settings-group { margin:24px 0; }
.settings-group h2 { font-size:12px; font-weight:500; color:var(--muted); margin:0 0 10px 4px; letter-spacing:.04em; }
.settings-list { background:var(--paper); border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; }
.settings-list a { display:flex; align-items:center; gap:14px; min-height:64px; padding:16px 20px; text-decoration:none; color:var(--ink); }
.settings-list a+a { border-top:1px solid var(--line); }
.settings-list a>span { flex:1; }
.settings-list a>.icon { color:var(--color-action); flex-shrink:0; }
.settings-list a>.icon:last-child { width:16px; color:var(--muted); }
.settings-list a small { display:block; color:var(--color-danger); font-size:12px; }
.settings-list a:focus-visible { outline-offset:-4px; }
@media(hover:hover) { .settings-list a:hover { background:var(--color-subtle); } }
.settings-logout { margin-top:32px; }
.settings-logout .button { width:100%; min-height:48px; }
@media(max-width:600px) {
  .has-bottom-nav .topbar { padding:12px 0; }
  .desktop-compose { display:none!important; }
  .settings-heading { margin-bottom:20px; }
  .settings-heading h1 { font-size:26px; }
  .settings-profile { margin-bottom:24px; }
  .settings-list a { min-height:60px; padding:14px 16px; }
}
@media(prefers-reduced-motion:reduce) { .bottom-nav a { transition:none; } }

/* Video stays quiet until played; narrow cards use the existing compact cover. */
.record-video { margin:20px 0; min-width:0; }
.record-video video { display:block; width:100%; max-height:65vh; min-height:160px; aspect-ratio:16 / 9; object-fit:contain; border-radius:var(--radius-sm); background:#27231F; }
.record-video figcaption { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:8px 0; font-size:12px; }
.record-video figcaption>span { min-width:0; overflow-wrap:anywhere; }
.record-video figcaption small { color:var(--muted); display:block; }
.record-video figcaption a { display:inline-flex; align-items:center; gap:6px; min-height:44px; flex-shrink:0; color:var(--color-action); }
.video-status { font-size:12px; margin:0 0 8px; }
.video-status:empty { display:none; }
.video-cover img { object-fit:cover; }
@media(max-width:600px) {
  .compose-form .upload-actions { display:flex; flex-wrap:wrap; gap:8px; }
  .compose-form .upload-actions>.button { min-height:44px; padding:10px; }
  .record-video video { max-height:55vh; }
  .record-video figcaption { font-size:11px; }
}

/* A single, consent-based glance at the distance between two recent positions. */
.distance-entry { display:flex; align-items:center; gap:16px; margin:24px 0 40px; padding:22px 24px; background:var(--paper); border:1px solid var(--line); border-radius:var(--radius); }
.distance-entry>span:nth-child(2) { flex:1; min-width:0; }
.distance-entry strong,.distance-entry small { display:block; }
.distance-entry strong { font-size:17px; font-weight:550; }
.distance-entry small { font-size:12px; color:var(--muted); margin-top:4px; }
.distance-entry-icon { display:grid; place-items:center; width:44px; height:44px; border-radius:50%; background:var(--color-subtle); color:var(--color-action); }
.distance-page { max-width:760px; }
.distance-panel { padding:40px; background:var(--paper); border:1px solid var(--line); border-radius:var(--radius-lg); }
.distance-panel header { text-align:center; }
.distance-panel h1 { margin:8px 0; font-size:28px; }
.distance-panel header p { font-size:13px; margin:0; }
.distance-reading { text-align:center; padding:36px 0 24px; }
.distance-reading strong { display:block; color:var(--color-action); font-size:clamp(25px,5vw,42px); font-weight:500; line-height:1.5; overflow-wrap:anywhere; }
.distance-reading p { color:var(--muted); font-size:12px; margin:8px 0 0; }
.distance-people { display:grid; grid-template-columns:1fr 1fr; gap:16px; padding:20px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.distance-people>div { display:flex; align-items:center; flex-direction:column; min-width:0; text-align:center; gap:4px; }
.distance-avatar { display:grid; place-items:center; width:44px; height:44px; border-radius:50%; background:var(--color-subtle); color:var(--color-action); font:22px var(--serif); margin-bottom:4px; }
.distance-people strong { font-size:14px; font-weight:550; overflow-wrap:anywhere; }
.distance-person-state,.distance-people time { color:var(--muted); font-size:11px; }
.distance-consent { padding:16px; margin:24px 0 0; border-radius:var(--radius-sm); background:var(--color-subtle); color:var(--ink); font-size:12px; }
#distance-status { font-size:12px; margin:16px 0 8px; }
#distance-status:empty { display:none; }
.distance-actions { display:flex; justify-content:center; flex-wrap:wrap; align-items:center; gap:8px 20px; margin-top:24px; }
.distance-actions button { min-height:44px; }
.distance-footnote { text-align:center; font-size:11px; color:var(--muted); margin:24px 0 0; }
@media(max-width:600px) {
  .distance-entry { margin:20px 0 28px; padding:18px 16px; gap:12px; }
  .distance-entry strong { font-size:16px; }
  .distance-panel { padding:24px 18px; }
  .distance-panel h1 { font-size:24px; }
  .distance-reading { padding:28px 0 20px; }
  .distance-people { gap:8px; }
}

.upload-tools { margin:8px 0 12px; padding:10px 12px; border:1px solid var(--line); border-radius:12px; }
.upload-tools>p { font-size:12px; margin:0; }
.upload-tools details>summary { min-height:44px; display:flex; align-items:center; font-size:12px; cursor:pointer; color:var(--color-action); }
.upload-tools .muted,.upload-leave-note { font-size:12px; line-height:1.65; }
.upload-tools .muted:empty { display:none; }
.upload-leave-note { color:var(--color-action); padding:10px 12px; background:var(--color-subtle); border-radius:10px; }
.video-saved { font-size:12px; color:var(--color-action); margin:0 0 4px; }
.video-cover-status { font-size:11px; margin:0 0 4px; }
.video-cover-status:empty { display:none; }
.video-cover-badge { position:absolute; top:6px; left:6px; right:6px; padding:4px; border-radius:4px; background:#39342Fe8; color:white; line-height:1.4; }
.catalog-all { display:flex; gap:8px; align-items:center; justify-content:flex-end; min-height:44px; font-size:12px; color:var(--color-action); }
.catalog-page header h1 { font-size:26px; margin-bottom:8px; }
.catalog-address { overflow-wrap:anywhere; }
.catalog-search { display:flex; align-items:center; gap:8px; margin:20px 0; }
.catalog-search input { flex:1; min-width:0; }
.catalog-search a { min-height:44px; display:flex; align-items:center; flex-shrink:0; }
.catalog-list { display:grid; gap:10px; }
.catalog-list>a { display:flex; align-items:center; gap:16px; padding:16px; border:1px solid var(--line); border-radius:12px; background:var(--paper); }
.catalog-list>a>span { flex:1; min-width:0; }
.catalog-list strong { display:block; font-size:15px; overflow-wrap:anywhere; }
.catalog-list small { display:block; font-size:12px; margin-top:6px; color:var(--muted); overflow-wrap:anywhere; }
.distance-people time { max-width:100%; line-height:1.6; }
