:root {
  --paper: #edf5f5;
  --white: #ffffff;
  --ink: #1d3443;
  --muted: #6d838a;
  --line: #d4e2e3;
  --coral: #347fb5;
  --coral-dark: #205e8c;
  --green: #5c907d;
  --yellow: #c99f5b;
  --shadow: 0 18px 45px rgba(34, 78, 91, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif; letter-spacing: 0; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }
.auth-pending { display: none; }
.auth-screen { width: min(100%, 900px); min-height: 100vh; margin: 0 auto; display: grid; grid-template-columns: 1.08fr .92fr; background: #fbfdfb; box-shadow: 0 0 60px rgba(32,70,103,.15); }
.auth-visual { min-height: 100vh; padding: 42px; color: #fff; background: linear-gradient(180deg, rgba(25,73,111,.12), rgba(15,48,76,.84)), url("https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=1100&q=85") center/cover; display: flex; flex-direction: column; justify-content: space-between; }
.auth-logo { display: flex; align-items: center; gap: 8px; font: 500 22px Georgia, "Songti SC", serif; }
.auth-logo svg { width: 20px; color: #f0bd64; }
.auth-quote p { color: #f0bd64; font: 600 9px Arial; letter-spacing: 2px; }
.auth-quote h1 { margin: 12px 0 0; font: 500 38px/1.45 Georgia, "Songti SC", serif; }
.auth-panel { padding: 55px 50px; display: flex; flex-direction: column; justify-content: center; }
.auth-tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); margin-bottom: 38px; }
.auth-tabs button { border: 0; border-bottom: 2px solid transparent; padding: 0 2px 11px; background: transparent; color: var(--muted); cursor: pointer; }
.auth-tabs button.active { color: var(--ink); border-color: var(--coral); }
.auth-form { display: grid; gap: 17px; }
.auth-form h2 { margin: 6px 0; font: 500 28px Georgia, "Songti SC", serif; }
.auth-form > div > p { margin: 0 0 12px; color: var(--muted); font-size: 11px; }
.auth-form label { display: grid; gap: 7px; font-size: 11px; font-weight: 600; }
.auth-form input { width: 100%; border: 1px solid var(--line); background: #f5f8fb; padding: 12px; }
.auth-security { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 9px; margin: 24px 0 0; }
.auth-security svg { width: 13px; color: var(--green); }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(74,141,206,.25); outline-offset: 2px; }

.app-shell { min-height: 100vh; padding-left: 228px; padding-bottom: 92px; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 228px; padding: 34px 24px 24px; background: #e7f1ef; border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 50; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); padding: 0 7px 34px; }
.brand-mark { width: 38px; height: 38px; border-radius: 50%; background: var(--coral); color: #fff; display: grid; place-items: center; }
.brand-mark svg { width: 18px; }
.brand b { font-family: Georgia, "Songti SC", serif; font-size: 24px; font-weight: 600; }
.brand small { display: block; font-size: 8px; color: var(--muted); margin-top: 2px; letter-spacing: 1.5px; }
.nav-list { display: grid; gap: 8px; }
.nav-item { border: 0; background: transparent; width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 6px; cursor: pointer; font-size: 14px; color: #66645f; text-align: left; transition: .2s; }
.nav-item:hover { background: rgba(255,255,255,.6); color: var(--ink); }
.nav-item.active { background: var(--ink); color: #fff; }
.nav-item svg { width: 18px; height: 18px; }
.nav-dot { width: 6px; height: 6px; background: var(--coral); border-radius: 50%; margin-left: auto; }
.count-badge { margin-left: auto; min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 5px; border-radius: 50%; background: var(--coral); color: #fff; font-size: 11px; }
.sidebar-spacer { flex: 1; }
.pair-card { padding: 19px 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; }
.pair-avatars { display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.pair-avatars img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid #edf3f8; }
.pair-avatars img:last-child { margin-left: -5px; }
.pair-link { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: var(--coral); background: #fff; z-index: 1; margin-left: -5px; }
.pair-link svg { width: 12px; fill: currentColor; }
.pair-card strong { font-size: 13px; }
.pair-card p { font-size: 11px; color: var(--muted); margin: 5px 0 8px; }
.text-btn { border: 0; padding: 0; background: transparent; color: var(--coral-dark); font-size: 12px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.text-btn svg { width: 14px; }
.settings-btn { margin-top: 13px; }

.main { min-height: calc(100vh - 92px); }
.topbar { height: 96px; border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 clamp(24px, 4vw, 64px); background: rgba(237,245,245,.93); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 40; }
.view-heading p, .section-toolbar p, .growth-copy > p:first-child, .wish-hero > div > p { margin: 0 0 5px; color: var(--coral); font: 600 9px/1.2 Arial, sans-serif; letter-spacing: 1.8px; }
.view-heading h1 { margin: 0; font: 500 22px/1.2 Georgia, "Songti SC", serif; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.level-pill { height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 4px; display: flex; align-items: center; gap: 8px; font-size: 10px; color: var(--muted); background: rgba(255,255,255,.35); }
.mini-level { color: var(--coral-dark); font-size: 11px; }
.level-bar { width: 48px; height: 3px; background: #d8e2ec; }
.level-bar i { display: block; width: 64%; height: 100%; background: var(--coral); }
.icon-btn { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: transparent; display: grid; place-items: center; cursor: pointer; position: relative; }
.icon-btn svg { width: 17px; }
.notification-dot { position: absolute; right: 7px; top: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--coral); border: 1px solid var(--paper); }
.profile-button { border: 0; background: transparent; display: flex; align-items: center; gap: 8px; padding: 0; cursor: pointer; font-size: 12px; }
.profile-button img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.avatar-initial { width: 34px; height: 34px; border-radius: 50%; background: var(--coral); color: #fff; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; flex: 0 0 auto; }
.avatar-initial.partner { background: var(--green); }
.pair-avatars .avatar-initial { border: 2px solid #edf3f8; }
.account-popover { position: absolute; top: 70px; right: 14px; width: 170px; padding: 14px; background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow); z-index: 90; }
.account-popover strong, .account-popover small { display: block; }
.account-popover strong { font-size: 12px; }
.account-popover small { color: var(--muted); margin-top: 3px; }
.account-popover button { width: 100%; border: 0; border-top: 1px solid var(--line); background: transparent; margin-top: 12px; padding: 10px 0 0; color: var(--coral-dark); display: flex; align-items: center; gap: 7px; cursor: pointer; font-size: 10px; }
.account-popover svg { width: 14px; }
.profile-button svg { width: 14px; color: var(--muted); }
.mobile-menu { display: none; margin-right: 14px; }
.mini-brand-mark { display: none; }

.view { display: none; animation: viewIn .35s ease; }
.view.active { display: block; }
@keyframes viewIn { from { opacity: 0; transform: translateY(5px); } }
.album-layout { min-height: calc(100vh - 188px); display: grid; grid-template-columns: minmax(0, 1fr) 292px; gap: clamp(24px, 3vw, 48px); padding: clamp(26px, 4vw, 54px) clamp(24px, 4vw, 64px) 30px; }
.album-stage-wrap { min-width: 0; }
.album-stage { height: clamp(430px, 58vh, 610px); position: relative; overflow: hidden; background: #cbc8c0; box-shadow: var(--shadow); }
.album-stage > img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .25s ease, transform 1.2s ease; }
.album-stage:hover > img { transform: scale(1.015); }
.album-stage.changing > img { opacity: .15; }
.image-shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(20,20,18,.73)); pointer-events: none; }
.album-caption { position: absolute; left: clamp(26px, 5vw, 68px); right: 100px; bottom: 43px; color: #fff; }
.album-caption span { font-size: 10px; letter-spacing: 1px; opacity: .8; }
.album-caption h2 { max-width: 620px; margin: 10px 0 8px; font: 500 clamp(26px, 3.2vw, 45px)/1.25 Georgia, "Songti SC", serif; letter-spacing: 0; }
.album-caption p { font: italic 14px/1.7 Georgia, "Songti SC", serif; opacity: .8; margin: 0; }
.stage-action { position: absolute; top: 22px; right: 22px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.5); color: #fff; background: rgba(0,0,0,.12); backdrop-filter: blur(6px); display: grid; place-items: center; cursor: pointer; }
.delete-photo-action { right: 70px; }
.delete-photo-action:hover { background: rgba(155,48,48,.72); border-color: rgba(255,255,255,.8); }
.stage-action.active svg { fill: var(--coral); color: var(--coral); }
.stage-action svg { width: 18px; }
.slide-arrow { position: absolute; top: 50%; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.55); color: #fff; background: rgba(0,0,0,.14); backdrop-filter: blur(5px); display: grid; place-items: center; cursor: pointer; transition: .2s; }
.slide-arrow:hover { background: rgba(255,255,255,.9); color: var(--ink); }
.slide-arrow.prev { left: 18px; }
.slide-arrow.next { right: 18px; }
.slide-arrow svg { width: 18px; }
.slide-count { position: absolute; right: 30px; bottom: 27px; display: flex; align-items: center; gap: 8px; color: #fff; font-family: Georgia, serif; }
.slide-count b { font-size: 18px; }
.slide-count span { display: block; width: 25px; height: 1px; background: rgba(255,255,255,.6); }
.slide-count em { font-size: 11px; font-style: normal; opacity: .65; }
.slide-thumbs { display: flex; gap: 9px; padding-top: 12px; overflow: auto; scrollbar-width: none; }
.slide-thumbs::-webkit-scrollbar { display: none; }
.thumb { flex: 0 0 68px; height: 48px; padding: 0; border: 2px solid transparent; opacity: .58; cursor: pointer; background: #ddd; }
.thumb.active { border-color: var(--coral); opacity: 1; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.add-thumb { flex: 0 0 48px; height: 48px; border: 1px dashed #b9b5ac; color: var(--muted); background: transparent; display: grid; place-items: center; cursor: pointer; }
.add-thumb svg { width: 17px; }
.album-side { min-width: 0; }
.side-heading { display: flex; justify-content: space-between; align-items: center; padding: 4px 0 18px; }
.side-heading span { color: var(--coral); font: 600 9px Arial; letter-spacing: 1.5px; }
.side-heading h3 { font: 500 19px Georgia, "Songti SC", serif; margin: 5px 0 0; }
.side-heading > svg { width: 22px; color: var(--coral); }
.upload-zone { width: 100%; height: 160px; border: 1px dashed #beb9ae; background: rgba(255,255,255,.3); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; transition: .2s; }
.upload-zone:hover { background: #fff; border-color: var(--coral); transform: translateY(-2px); }
.upload-icon { width: 38px; height: 38px; background: #dceaf7; color: var(--coral); border-radius: 50%; display: grid; place-items: center; margin-bottom: 4px; }
.upload-icon svg { width: 17px; }
.upload-zone strong { font-size: 13px; }
.upload-zone small { font-size: 10px; color: var(--muted); }
.memory-note { background: #f5e9b9; min-height: 170px; padding: 35px 30px 26px; margin-top: 25px; position: relative; transform: rotate(-1.2deg); box-shadow: 0 10px 20px rgba(100,85,30,.08); }
.memory-note .tape { position: absolute; width: 62px; height: 20px; background: rgba(255,255,255,.55); top: -9px; left: 50%; transform: translateX(-50%) rotate(2deg); }
.memory-note > svg { width: 17px; color: #ad8d3b; }
.memory-note p { font: 500 16px/1.65 Georgia, "Songti SC", serif; margin: 10px 0 14px; }
.memory-note span { font-size: 9px; color: #8b7c52; }
.quick-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 29px; border-top: 1px solid var(--line); padding-top: 18px; }
.quick-stats div { text-align: center; border-right: 1px solid var(--line); }
.quick-stats div:last-child { border: 0; }
.quick-stats strong { display: block; font: 500 18px Georgia, serif; }
.quick-stats span { color: var(--muted); font-size: 9px; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 42px; max-width: 1120px; margin: 0 auto; padding: 48px 42px 55px; }
.section-toolbar { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 28px; }
.section-toolbar h2 { margin: 0; font: 500 27px Georgia, "Songti SC", serif; }
.primary-btn, .secondary-btn { border: 0; min-height: 42px; padding: 0 18px; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; font-size: 13px; font-weight: 600; }
.primary-btn { background: var(--coral); color: #fff; box-shadow: 0 8px 18px rgba(47,111,174,.2); }
.primary-btn:hover { background: var(--coral-dark); }
.primary-btn span { opacity: .75; font-size: 10px; border-left: 1px solid rgba(255,255,255,.4); padding-left: 8px; }
.primary-btn svg, .secondary-btn svg { width: 16px; }
.primary-btn.large { min-height: 48px; padding: 0 24px; }
.secondary-btn { border: 1px solid var(--line); background: var(--white); }
.wide { width: 100%; }
.feed { display: grid; gap: 18px; }
.empty-state { min-height: 180px; border: 1px dashed #cbc6bb; color: var(--muted); display: grid; place-items: center; text-align: center; font-size: 11px; line-height: 1.8; padding: 30px; }
.album-empty { width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding: 42px 25px; color: #fff; background: linear-gradient(180deg, rgba(29,34,30,.12), rgba(29,34,30,.78)), url("https://images.unsplash.com/photo-1507501336603-6e31db2be093?auto=format&fit=crop&w=1200&q=82") center/cover; }
.album-empty h2 { font: 500 30px/1.35 Georgia, "Songti SC", serif; margin: 8px 0; }
.album-empty p { margin: 0; font-size: 11px; opacity: .8; }
.post { background: #fbfdfb; border: 1px solid #dce8e5; padding: 24px; }
.post-head { display: flex; align-items: center; gap: 10px; }
.post-head img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.post-avatar { width: 38px; height: 38px; border-radius: 50%; background: #deebf6; color: var(--coral-dark); display: grid; place-items: center; font-weight: 700; }
.post-avatar img, .avatar-initial img { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: inherit; }
.post-head strong { display: block; font-size: 13px; }
.post-head span { display: block; font-size: 9px; color: var(--muted); margin-top: 3px; }
.mood-tag { margin-left: auto; padding: 5px 9px; background: #e2eef9; color: var(--coral-dark) !important; border-radius: 3px; font-size: 9px !important; }
.post h3 { font: 500 20px Georgia, "Songti SC", serif; margin: 20px 0 9px; }
.post-content { color: #67645f; font-size: 13px; line-height: 1.8; margin: 0; white-space: pre-wrap; }
.post-image { width: 100%; max-height: 310px; object-fit: cover; margin-top: 16px; }
.post-attachments { display: grid; gap: 8px; margin-top: 17px; }
.post-media { display: block; overflow: hidden; background: #e7efef; }
.post-media img { display: block; width: 100%; max-height: 360px; object-fit: cover; }
.post-video { width: 100%; max-height: 380px; background: #152d39; }
.post-file { display: flex; align-items: center; gap: 10px; padding: 12px 13px; border: 1px solid #d7e4e2; background: #f4f9f7; color: var(--ink); text-decoration: none; }
.post-file > svg:first-child { width: 20px; color: var(--coral-dark); flex: 0 0 auto; }
.post-file > svg:last-child { width: 16px; margin-left: auto; color: var(--muted); }
.post-file span { min-width: 0; }
.post-file b, .post-file small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-file b { font-size: 11px; }
.post-file small { color: var(--muted); font-size: 9px; margin-top: 3px; }
.feed-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.feed-empty svg { width: 24px; color: var(--coral); margin-bottom: 5px; }
.feed-empty strong { font-size: 14px; color: var(--ink); }
.feed-empty span { color: var(--muted); font-size: 11px; }
.post-actions { border-top: 1px solid #ede9e1; margin-top: 18px; padding-top: 13px; display: flex; gap: 22px; }
.post-actions button { border: 0; background: transparent; padding: 0; color: var(--muted); font-size: 11px; display: flex; gap: 6px; align-items: center; cursor: pointer; }
.post-actions button:hover, .post-actions button.liked { color: var(--coral); }
.post-actions button.liked svg { fill: currentColor; }
.post-actions svg { width: 15px; }
.comment-box { margin-top: 14px; padding: 12px 14px; background: #eef5f2; font-size: 11px; line-height: 1.6; }
.comment-box b { color: var(--coral-dark); }
.comment-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.comment-line > span { min-width: 0; }
.reply-comment { border: 0; background: transparent; color: var(--coral-dark); padding: 0; display: inline-flex; align-items: center; gap: 3px; cursor: pointer; font-size: 9px; flex: 0 0 auto; }
.reply-comment svg { width: 11px; }
.comment-reply { margin: 9px 0 0 18px; background: #f8fbfa; border-left: 2px solid #c9dddd; }
.comment-form { display: flex; gap: 8px; margin-top: 12px; }
.comment-reply-form { display: flex; gap: 7px; margin-top: 9px; }
.comment-reply-form[hidden] { display: none; }
.comment-reply-form input { flex: 1; min-width: 0; border: 1px solid var(--line); background: #fff; padding: 8px 10px; font-size: 10px; }
.comment-reply-form button { width: 32px; border: 0; background: var(--ink); color: #fff; display: grid; place-items: center; cursor: pointer; }
.comment-reply-form svg { width: 13px; }
.comment-form input { flex: 1; min-width: 0; border: 1px solid var(--line); background: #fff; padding: 9px 11px; font-size: 11px; }
.comment-form button { width: 34px; border: 0; background: var(--ink); color: #fff; display: grid; place-items: center; cursor: pointer; }
.comment-form svg { width: 14px; }
.audience-picker { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; border: 1px solid var(--line); background: #f7fbfa; }
.audience-option { display: inline-flex !important; grid-template-columns: none !important; align-items: center; gap: 6px !important; padding: 7px 9px; border: 1px solid #d4e2e0; background: #fff; font-size: 10px !important; font-weight: 500 !important; cursor: pointer; }
.audience-option input { width: auto !important; margin: 0; padding: 0 !important; }
.form-note { color: var(--muted); font-size: 10px; }
.chat-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); min-height: calc(100vh - 88px); background: #f7fbfb; }
.chat-people { border-right: 1px solid var(--line); padding: 35px 20px; background: rgba(255,255,255,.5); }
.chat-people .section-toolbar { margin-bottom: 18px; }
.chat-people-list { display: grid; gap: 6px; }
.chat-person { width: 100%; border: 0; background: transparent; display: flex; align-items: center; gap: 10px; padding: 10px 8px; text-align: left; color: var(--ink); cursor: pointer; }
.chat-person:hover, .chat-person.active { background: #e7f1f3; }
.chat-person .post-avatar { width: 36px; height: 36px; flex: 0 0 auto; }
.chat-person > span:nth-child(2) { min-width: 0; flex: 1; }
.chat-person-copy { min-width: 0; flex: 1; }
.chat-person b, .chat-person small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-person b { font-size: 12px; }
.chat-person small { color: var(--muted); font-size: 9px; margin-top: 3px; }
.chat-unread { min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--coral); color: #fff; display: grid !important; place-items: center; font-size: 9px !important; line-height: 1; }
.chat-unread[hidden] { display: none !important; }
.chat-person > svg { width: 14px; color: var(--muted); }
.chat-panel { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-width: 0; max-width: 860px; width: 100%; margin: 0 auto; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 25px 34px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.58); }
.chat-head .post-avatar { width: 38px; height: 38px; }
.chat-head strong, .chat-head small { display: block; }
.chat-head strong { font-size: 14px; }
.chat-head small { color: var(--muted); font-size: 10px; margin-top: 4px; }
.chat-head > svg { width: 16px; margin-left: auto; color: var(--green); }
.chat-messages { overflow-y: auto; padding: 28px 34px; display: flex; flex-direction: column; gap: 12px; }
.chat-message { max-width: min(72%, 520px); }
.chat-message p { margin: 0; padding: 11px 14px; font-size: 12px; line-height: 1.7; white-space: pre-wrap; }
.chat-message time { display: block; color: var(--muted); font-size: 8px; margin-top: 5px; }
.chat-message.mine { align-self: flex-end; text-align: right; }
.chat-message.mine p { background: #d9eaf4; color: #234b67; }
.chat-message.theirs { align-self: flex-start; }
.chat-message.theirs p { background: #fff; border: 1px solid #dce8e5; }
.chat-form { display: flex; gap: 10px; padding: 18px 34px 28px; background: rgba(255,255,255,.7); border-top: 1px solid var(--line); }
.chat-form input { flex: 1; min-width: 0; border: 1px solid var(--line); background: #fff; padding: 12px 13px; font-size: 12px; }
.chat-form button { width: 44px; border: 0; background: var(--ink); color: #fff; display: grid; place-items: center; cursor: pointer; }
.chat-form button:disabled { opacity: .45; cursor: default; }
.chat-form svg { width: 16px; }
.right-rail { display: grid; gap: 18px; align-content: start; }
.rail-card { border: 1px solid #dce8e5; background: #fbfdfb; padding: 23px; }
.calendar-head { display: flex; align-items: start; justify-content: space-between; }
.calendar-head span { display: block; color: var(--coral); font: 600 9px Arial; letter-spacing: 1px; }
.calendar-head strong { font: 500 58px/1 Georgia, serif; }
.calendar-head svg { color: var(--coral); width: 22px; }
.calendar-card p { color: var(--muted); font: italic 13px Georgia, serif; line-height: 1.65; margin: 18px 0; }
.topic-card { background: #3f7180; color: white; min-height: 215px; display: flex; flex-direction: column; align-items: flex-start; }
.topic-card .tag { font-size: 9px; padding: 5px 8px; border: 1px solid rgba(255,255,255,.4); }
.topic-card h3 { font: 500 20px/1.55 Georgia, "Songti SC", serif; margin: 23px 0; }
.topic-card .text-btn { color: #fff; margin-top: auto; }
.section-hint { display: block; color: var(--muted); font-size: 11px; margin-top: 7px; }
.compact-select { max-width: 130px; border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 7px 26px 7px 9px; font-size: 11px; }
.moments-guide { background: linear-gradient(145deg, #eaf4f4, #f8fbf8); min-height: 245px; }
.moments-guide > span { color: var(--coral-dark); font: 600 9px Arial; letter-spacing: 1.4px; }
.moments-guide h3 { font: 500 21px/1.5 Georgia, "Songti SC", serif; margin: 19px 0 13px; }
.moments-guide p { color: var(--muted); font-size: 11px; line-height: 1.75; margin: 0; }
.guide-icon { width: 36px; height: 36px; display: grid; place-items: center; background: #d5e8ee; color: var(--coral-dark); margin-bottom: 18px; }
.guide-icon svg { width: 18px; }
.guide-meta { display: flex; align-items: center; gap: 6px; color: var(--coral-dark); font-size: 10px; margin-top: 18px; }
.guide-meta svg { width: 14px; }

.growth-hero { min-height: 310px; padding: 54px clamp(30px, 6vw, 86px); background: #21465b; color: #fff; display: grid; grid-template-columns: 1fr 360px; gap: 65px; align-items: center; }
.growth-copy h2, .wish-hero h2 { font: 500 clamp(31px, 3.5vw, 48px)/1.3 Georgia, "Songti SC", serif; margin: 12px 0 27px; }
.growth-progress-row { display: grid; grid-template-columns: auto minmax(100px, 300px) auto; align-items: center; gap: 15px; }
.big-level { font: italic 18px Georgia, serif; color: #f0bd64; }
.growth-track { height: 5px; background: rgba(255,255,255,.15); }
.growth-track i { display: block; height: 100%; background: #e6b85c; width: 64%; }
.growth-progress-row > span:last-child { font-size: 10px; color: rgba(255,255,255,.6); }
.next-level-copy { font-size: 10px; color: rgba(255,255,255,.5); margin: 10px 0 0; text-align: right; }
.checkin-panel { background: #eef5f2; color: var(--ink); padding: 23px; box-shadow: 10px 10px 0 rgba(255,255,255,.08); }
.checkin-top { display: flex; justify-content: space-between; align-items: center; }
.checkin-top span { display: block; font-size: 10px; color: var(--muted); }
.checkin-top strong { display: block; font: 500 23px Georgia, "Songti SC", serif; margin-top: 3px; }
.flame { width: 39px; height: 39px; border-radius: 50%; background: #dceafa; color: var(--coral) !important; display: grid !important; place-items: center; }
.flame svg { width: 19px; fill: currentColor; }
.week-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 20px 0; }
.day-dot { text-align: center; }
.day-dot span { display: grid; place-items: center; width: 27px; height: 27px; margin: 0 auto 5px; border-radius: 50%; background: #e5e1d8; font-size: 9px; }
.day-dot.done span { color: #fff; background: var(--green); }
.day-dot.today span { border: 1px solid var(--coral); background: transparent; color: var(--coral); }
.day-dot small { font-size: 8px; color: var(--muted); }
.checkin-btn { width: 100%; min-height: 42px; border: 0; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.checkin-btn:disabled { background: var(--green); cursor: default; }
.checkin-btn svg { width: 15px; }
.checkin-btn small { opacity: .5; border-left: 1px solid rgba(255,255,255,.3); padding-left: 8px; }
.growth-body { max-width: 1150px; margin: 0 auto; padding: 45px 42px 60px; display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 40px; }
.section-toolbar.compact { align-items: center; margin-bottom: 19px; }
.section-toolbar.compact h2 { font-size: 22px; }
.cycle-label { font-size: 9px; color: var(--muted); }
.rule-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.rule-grid article { min-width: 0; padding: 17px 14px; border: 1px solid #e3dfd7; background: var(--white); display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; }
.rule-icon { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; }
.rule-icon svg { width: 16px; }
.rule-icon.coral { background: #deebf6; color: var(--coral); }
.rule-icon.green { background: #dfe8e0; color: var(--green); }
.rule-icon.yellow { background: #f4e8c9; color: #b88d35; }
.rule-grid strong { display: block; font-size: 11px; }
.rule-grid p { margin: 4px 0 0; color: var(--muted); font-size: 8px; }
.rule-grid article > b { font: 500 17px Georgia, serif; color: var(--coral); }
.milestone-card { background: #fff; border: 1px solid #e3dfd7; margin-top: 12px; padding: 22px; }
.milestone-title { display: flex; align-items: center; gap: 10px; }
.milestone-title > svg { width: 19px; color: var(--yellow); }
.milestone-title strong { display: block; font-size: 12px; }
.milestone-title span { display: block; font-size: 8px; color: var(--muted); margin-top: 3px; }
.milestone-line { display: flex; align-items: flex-start; margin: 25px 6px 16px; }
.milestone { width: 72px; text-align: center; flex: 0 0 72px; }
.milestone > span { display: grid; place-items: center; width: 32px; height: 32px; margin: 0 auto 7px; border-radius: 50%; border: 1px solid #ccc6bb; font: 600 10px Georgia, serif; background: #fff; }
.milestone.done > span { background: var(--green); border-color: var(--green); color: #fff; }
.milestone span svg { width: 13px; }
.milestone b { display: block; font-size: 9px; }
.milestone small { color: var(--coral); font-size: 8px; }
.milestone-line .line { height: 1px; background: #d8d4cb; flex: 1; margin-top: 16px; }
.milestone-line .line.active { background: var(--green); }
.cycle-note { margin: 0; padding-top: 13px; border-top: 1px dashed #ddd8ce; color: var(--muted); font-size: 9px; display: flex; justify-content: center; align-items: center; gap: 5px; }
.cycle-note svg { width: 12px; }
.timeline-card { border-left: 1px solid var(--line); padding-left: 30px; }
.timeline { display: grid; gap: 2px; }
.timeline-item { position: relative; padding: 0 0 20px 20px; border-left: 1px solid #d4d0c7; }
.timeline-item::before { content: ""; position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--coral); left: -4px; top: 4px; }
.timeline-item span { color: var(--muted); font-size: 8px; }
.timeline-item p { margin: 4px 0 0; font-size: 10px; }
.timeline-item b { color: var(--coral); }

.wish-hero { min-height: 300px; padding: 56px clamp(35px, 8vw, 110px); color: #fff; background: linear-gradient(100deg, rgba(21,48,72,.94), rgba(42,91,128,.76)), url("https://images.unsplash.com/photo-1507501336603-6e31db2be093?auto=format&fit=crop&w=1600&q=85") center 62%/cover; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.wish-hero h2 { margin-bottom: 15px; }
.wish-hero > div > span { font-size: 11px; color: rgba(255,255,255,.65); }
.wish-tabs { max-width: 1080px; margin: 33px auto 20px; padding: 0 36px; display: flex; gap: 25px; border-bottom: 1px solid var(--line); }
.wish-tabs button { border: 0; border-bottom: 2px solid transparent; padding: 0 0 11px; background: transparent; color: var(--muted); font-size: 11px; cursor: pointer; }
.wish-tabs button.active { color: var(--ink); border-color: var(--coral); }
.wish-grid { max-width: 1080px; margin: 0 auto; padding: 0 36px 60px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.wish-card { min-height: 210px; padding: 24px; background: var(--white); border: 1px solid #e4e0d7; display: flex; flex-direction: column; position: relative; }
.wish-card::before { content: ""; position: absolute; width: 5px; height: 44px; top: 0; left: 20px; background: var(--coral); }
.wish-card.partner::before { background: var(--green); }
.wish-card.done { opacity: .7; }
.wish-card.done::before { background: var(--yellow); }
.wish-meta { display: flex; justify-content: space-between; font-size: 9px; color: var(--muted); margin: 12px 0 28px; }
.wish-meta span:last-child { color: var(--coral); }
.wish-card h3 { font: 500 19px/1.6 Georgia, "Songti SC", serif; margin: 0 0 18px; }
.wish-card footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.wish-card footer span { font-size: 9px; color: var(--muted); }
.wish-card footer button { border: 1px solid var(--line); background: transparent; padding: 7px 10px; font-size: 9px; cursor: pointer; }
.wish-card footer button:hover { border-color: var(--coral); color: var(--coral); }

.music-dock { position: fixed; z-index: 70; bottom: 0; left: 228px; right: 0; height: 92px; background: #193c4b; color: #fff; display: flex; align-items: center; padding: 0 clamp(28px, 5vw, 70px); transition: transform .3s ease; }
.music-dock.closed { transform: translateY(100%); }
.vinyl-wrap { width: 68px; height: 68px; display: grid; place-items: center; background: #132635; flex: 0 0 auto; }
.vinyl { width: 53px; height: 53px; border-radius: 50%; background: repeating-radial-gradient(circle, #152a3b 0 3px, #29445b 4px 5px); display: grid; place-items: center; }
.vinyl.playing { animation: spin 5s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.vinyl div { width: 19px; height: 19px; border-radius: 50%; background: var(--coral); border: 3px solid #8bbbe3; }
.track-info { width: 190px; padding-left: 15px; flex: 0 0 auto; }
.track-info span { display: block; color: #8d918c; font: 600 8px Arial; letter-spacing: 1.3px; }
.track-info strong { display: block; margin-top: 5px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-info p { margin: 2px 0 0; color: #898c88; font-size: 9px; }
.music-controls { display: flex; align-items: center; gap: 10px; }
.music-controls button, .music-add, .dock-close { border: 0; background: transparent; color: #fff; display: grid; place-items: center; cursor: pointer; }
.music-controls button svg { width: 17px; }
.music-controls .play-button { width: 38px; height: 38px; border: 1px solid #686b68; border-radius: 50%; }
.play-button svg { fill: currentColor; }
.track-progress { display: grid; grid-template-columns: 32px minmax(80px, 360px) 32px; flex: 1; align-items: center; gap: 7px; margin: 0 27px; color: #878b87; font-size: 8px; }
.track-progress > div { height: 3px; background: #4b4e4b; cursor: pointer; }
.track-progress i { display: block; height: 100%; width: 0; background: var(--coral); }
.music-add { grid-auto-flow: column; gap: 7px; font-size: 10px; }
.music-add svg { width: 16px; }
.dock-close { margin-left: 22px; color: #858985; }
.dock-close svg { width: 17px; }
.music-fab { position: fixed; right: 24px; bottom: 20px; width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--ink); color: #fff; box-shadow: var(--shadow); display: none; place-items: center; z-index: 65; cursor: pointer; }
.music-fab.show { display: grid; }
.music-fab svg { width: 20px; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(24,24,22,.55); backdrop-filter: blur(3px); z-index: 90; opacity: 0; visibility: hidden; transition: .2s; }
.modal-backdrop.show { opacity: 1; visibility: visible; }
.modal { border: 0; width: min(480px, calc(100vw - 32px)); padding: 38px; background: var(--white); box-shadow: 0 25px 80px rgba(0,0,0,.24); color: var(--ink); z-index: 100; }
.modal[open] { animation: modalIn .25s ease; }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.modal::backdrop { background: transparent; }
.modal-close { position: absolute; right: 16px; top: 16px; border: 0; background: transparent; cursor: pointer; }
.modal-close svg { width: 18px; }
.modal-kicker { color: var(--coral); font: 600 9px Arial; letter-spacing: 1.5px; }
.modal h2 { font: 500 27px Georgia, "Songti SC", serif; margin: 8px 0 25px; }
.modal form { display: grid; gap: 17px; }
.modal label { display: grid; gap: 7px; font-size: 11px; font-weight: 600; }
.modal input, .modal textarea, .modal select { width: 100%; border: 1px solid var(--line); background: #f9f7f2; padding: 12px; resize: vertical; color: var(--ink); }
.composer-label { gap: 8px !important; }
.attachment-picker { display: grid; gap: 10px; }
.attachment-trigger { min-height: 42px; border: 1px dashed #b9cfcf; background: #eef7f6; color: var(--coral-dark); display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; font-size: 11px; }
.attachment-trigger:hover { border-color: var(--coral); background: #e4f2f1; }
.attachment-trigger svg { width: 16px; }
.attachment-list { display: flex; flex-wrap: wrap; gap: 7px; }
.attachment-chip { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 6px 8px; background: #f3f6f3; color: var(--ink); font-size: 10px; }
.attachment-chip svg { width: 12px; color: var(--coral-dark); flex: 0 0 auto; }
.attachment-chip small { color: var(--muted); }
.settings-tip { display: flex; align-items: flex-start; gap: 7px; color: var(--muted); font-size: 10px; line-height: 1.6; margin: -3px 0 2px; }
.settings-tip svg { width: 14px; flex: 0 0 auto; margin-top: 1px; color: var(--coral-dark); }
.mood-picker { display: flex; flex-wrap: wrap; gap: 7px; }
.mood-picker button { border: 1px solid var(--line); background: transparent; padding: 7px 11px; font-size: 10px; cursor: pointer; }
.mood-picker button.active { background: var(--green); border-color: var(--green); color: #fff; }
.mood-picker + input { margin-top: 9px; }
.modal-desc { color: var(--muted); font-size: 11px; line-height: 1.7; margin: -12px 0 22px; }
.invite-code { display: flex; align-items: center; padding: 15px; border: 1px dashed #cfc9be; background: #f5f2eb; }
.invite-code > span { font-size: 10px; color: var(--muted); }
.invite-code strong { margin-left: auto; font: 600 15px Georgia, serif; letter-spacing: 1px; }
.invite-code .icon-btn { width: 30px; height: 30px; margin-left: 8px; }
.friend-list { display: grid; gap: 8px; margin-top: 18px; }
.friend-list-label { color: var(--muted); font-size: 9px; letter-spacing: .4px; }
.friend-row { min-width: 0; display: flex; align-items: center; gap: 9px; padding: 8px 9px; border: 1px solid var(--line); background: #f7fbfa; }
.friend-row .post-avatar { width: 30px; height: 30px; flex: 0 0 auto; font-size: 11px; }
.friend-row-name { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 600; }
.friend-row-name small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; }
.remove-friend { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; color: #9a6e71; padding: 6px 3px; cursor: pointer; font-size: 9px; }
.remove-friend:hover { color: #a3434d; }
.remove-friend svg { width: 14px; }
.edit-friend { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; color: var(--coral-dark); padding: 6px 3px; cursor: pointer; font-size: 9px; }
.edit-friend:hover { color: var(--coral); }
.edit-friend svg { width: 14px; }
.friend-list-empty { margin: 18px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.or-divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 9px; margin: 17px 0; }
.or-divider::before, .or-divider::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.toast { position: fixed; z-index: 120; left: 50%; bottom: 115px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: #203449; color: #fff; padding: 11px 17px; border-radius: 4px; display: flex; align-items: center; gap: 8px; font-size: 11px; transition: .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast svg { width: 16px; color: #93b69a; }

@media (max-width: 1050px) {
  .app-shell { padding-left: 82px; }
  .sidebar { width: 82px; padding: 28px 14px 20px; }
  .brand { padding: 0 8px 30px; }
  .brand > span:last-child, .nav-item span, .nav-item .count-badge, .pair-card > strong, .pair-card > p, .pair-card .text-btn, .settings-btn span { display: none; }
  .nav-item { justify-content: center; padding: 13px; }
  .pair-card { padding-inline: 0; }
  .pair-avatars { flex-direction: column; gap: 3px; }
  .pair-avatars img:last-child, .pair-link { margin-left: 0; }
  .pair-link { position: absolute; }
  .music-dock { left: 82px; }
  .album-layout { grid-template-columns: minmax(0, 1fr) 245px; }
  .growth-hero { gap: 35px; grid-template-columns: 1fr 330px; }
}

@media (max-width: 780px) {
  .app-shell { padding-left: 0; padding-bottom: 72px; }
  .sidebar { width: 240px; transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .sidebar .brand > span:last-child, .sidebar .nav-item span, .sidebar .nav-item .count-badge, .sidebar .pair-card > strong, .sidebar .pair-card > p, .sidebar .pair-card .text-btn, .sidebar .settings-btn span { display: block; }
  .sidebar .nav-item { justify-content: flex-start; }
  .sidebar .pair-avatars { flex-direction: row; }
  .sidebar .pair-avatars img:last-child, .sidebar .pair-link { margin-left: -5px; }
  .sidebar .pair-link { position: static; }
  .topbar { height: 76px; padding: 0 16px; }
  .mobile-menu { display: grid; }
  .view-heading p, .level-pill, .profile-button > span:not(.avatar-initial), .profile-button > svg { display: none; }
  .view-heading h1 { font-size: 18px; }
  .top-actions { gap: 8px; }
  .album-layout { min-height: auto; display: block; padding: 16px 16px 34px; }
  .album-stage { height: min(65vh, 540px); }
  .album-caption { left: 24px; right: 55px; bottom: 34px; }
  .album-caption h2 { font-size: 27px; }
  .album-caption p { font-size: 11px; }
  .album-side { padding-top: 30px; }
  .memory-note { min-height: 150px; }
  .content-grid { display: block; padding: 32px 16px; }
  .right-rail { grid-template-columns: 1fr 1fr; margin-top: 24px; }
  .chat-layout { grid-template-columns: 220px minmax(0, 1fr); }
  .chat-head, .chat-messages, .chat-form { padding-left: 22px; padding-right: 22px; }
  .growth-hero { display: block; padding: 38px 20px; }
  .checkin-panel { margin-top: 35px; }
  .growth-body { display: block; padding: 35px 16px 50px; }
  .timeline-card { border-left: 0; border-top: 1px solid var(--line); padding: 30px 0 0; margin-top: 30px; }
  .wish-hero { min-height: 320px; padding: 40px 24px; align-items: flex-start; flex-direction: column; justify-content: center; }
  .wish-grid { grid-template-columns: 1fr 1fr; padding-inline: 16px; }
  .wish-tabs { padding-inline: 16px; overflow: auto; white-space: nowrap; }
  .music-dock { left: 0; height: 72px; padding: 0 15px; }
  .vinyl-wrap { width: 49px; height: 49px; }
  .vinyl { width: 40px; height: 40px; }
  .track-info { width: 130px; }
  .track-progress, .music-controls > button:not(.play-button), .music-add span { display: none; }
  .music-controls { margin-left: auto; }
  .dock-close { margin-left: 10px; }
}

@media (max-width: 520px) {
  .album-stage { height: 58vh; min-height: 430px; }
  .slide-arrow { top: auto; bottom: 118px; width: 36px; height: 36px; }
  .album-caption { right: 25px; }
  .slide-count { display: none; }
  .section-toolbar { align-items: flex-start; gap: 15px; }
  .section-toolbar .primary-btn { padding: 0 12px; }
  .right-rail { grid-template-columns: 1fr; }
  .chat-layout { display: block; min-height: auto; }
  .chat-people { border-right: 0; border-bottom: 1px solid var(--line); padding: 20px 16px; }
  .chat-people-list { display: flex; overflow-x: auto; gap: 5px; }
  .chat-person { min-width: 155px; }
  .chat-panel { min-height: 65vh; }
  .chat-head, .chat-messages, .chat-form { padding-left: 16px; padding-right: 16px; }
  .chat-message { max-width: 86%; }
  .rule-grid { grid-template-columns: 1fr; }
  .growth-progress-row { grid-template-columns: auto 1fr; }
  .growth-progress-row > span:last-child { grid-column: 2; }
  .next-level-copy { text-align: left; }
  .wish-grid { grid-template-columns: 1fr; }
  .modal { padding: 32px 22px; }
}

@media (max-width: 700px) {
  .auth-screen { display: block; width: min(100%, 480px); background: var(--paper); }
  .auth-visual { min-height: 34vh; padding: 28px 24px; }
  .auth-quote h1 { font-size: 29px; }
  .auth-panel { padding: 32px 25px 40px; }
  .auth-tabs { margin-bottom: 27px; }
}

/* Compact mobile shell; desktop keeps the full web layout above. */
@media (max-width: 520px) {
  body { background: #dce4eb; }
  .app-shell { width: min(100%, 480px); min-height: 100vh; margin: 0 auto; padding: 0 0 142px; background: var(--paper); box-shadow: 0 0 50px rgba(35,33,29,.13); overflow: hidden; }
  .sidebar { position: fixed; z-index: 80; inset: auto 0 0 0; width: min(100%, 480px); height: 72px; margin: 0 auto; padding: 0 10px env(safe-area-inset-bottom); background: rgba(255,255,255,.96); border: 0; border-top: 1px solid var(--line); backdrop-filter: blur(16px); display: block; transform: none; box-shadow: none; }
  .sidebar .brand, .sidebar .sidebar-spacer, .sidebar .pair-card, .sidebar .settings-btn { display: none; }
  .sidebar .nav-list { height: 100%; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; }
  .sidebar .nav-item { min-width: 0; height: 100%; padding: 8px 3px 7px; border-radius: 0; background: transparent; color: #99958e; display: flex; flex-direction: column; justify-content: center; gap: 4px; text-align: center; font-size: 10px; }
  .sidebar .nav-item span { display: block; }
  .sidebar .nav-item.active { color: var(--coral); background: transparent; }
  .sidebar .nav-item svg { width: 21px; height: 21px; }
  .sidebar .nav-dot { position: absolute; margin: 0 0 26px 17px; width: 5px; height: 5px; }
  .sidebar .count-badge { display: grid; position: absolute; margin: 0 0 25px 22px; min-width: 16px; height: 16px; font-size: 8px; border: 2px solid var(--white); }

  .main { min-height: 100vh; }
  .topbar { height: 70px; padding: env(safe-area-inset-top) 16px 0; position: sticky; display: flex; }
  .mini-brand-mark { flex: 0 0 30px; width: 30px; height: 30px; margin-right: 10px; border-radius: 50%; background: var(--coral); color: #fff; display: grid; place-items: center; }
  .mini-brand-mark svg { width: 14px; }
  .mobile-menu { display: none; }
  .view-heading p, .level-pill, .profile-button > span:not(.avatar-initial), .profile-button > svg { display: none; }
  .view-heading h1 { font-size: 18px; }
  .top-actions { gap: 7px; }
  .top-actions .icon-btn { width: 34px; height: 34px; }
  .profile-button img { width: 32px; height: 32px; }

  .album-layout { min-height: auto; display: block; padding: 0 0 34px; }
  .album-stage { height: min(68vh, 590px); min-height: 475px; box-shadow: none; }
  .album-caption { left: 24px; right: 27px; bottom: 45px; }
  .album-caption h2 { font-size: clamp(27px, 8vw, 36px); margin-top: 9px; }
  .album-caption p { font-size: 11px; line-height: 1.6; }
  .stage-action { top: 18px; right: 18px; }
  .slide-arrow { width: 36px; height: 36px; top: 42%; bottom: auto; }
  .slide-arrow.prev { left: 14px; }
  .slide-arrow.next { right: 14px; }
  .slide-count { bottom: 19px; right: 22px; }
  .slide-thumbs { padding: 10px 16px 0; }
  .album-side { padding: 26px 16px 0; }
  .upload-zone { height: 128px; }
  .memory-note { min-height: 145px; }

  .content-grid { display: block; padding: 27px 16px 38px; }
  .section-toolbar { align-items: flex-end; gap: 12px; margin-bottom: 20px; }
  .section-toolbar h2 { font-size: 23px; }
  .section-toolbar .primary-btn { padding: 0 12px; }
  .post { padding: 19px 17px; }
  .post h3 { font-size: 18px; }
  .post-image { max-height: 250px; }
  .right-rail { grid-template-columns: 1fr; margin-top: 20px; }

  .growth-hero { display: block; min-height: auto; padding: 38px 20px; }
  .growth-copy h2 { font-size: 34px; }
  .growth-progress-row { grid-template-columns: auto 1fr; }
  .growth-progress-row > span:last-child { grid-column: 2; }
  .next-level-copy { text-align: left; margin-left: 55px; }
  .checkin-panel { margin-top: 33px; padding: 20px 16px; }
  .growth-body { display: block; padding: 31px 16px 45px; }
  .rule-grid { grid-template-columns: 1fr; }
  .rule-grid article { padding: 14px; }
  .timeline-card { border-left: 0; border-top: 1px solid var(--line); padding: 28px 0 0; margin-top: 28px; }

  .wish-hero { min-height: 330px; padding: 39px 24px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
  .wish-hero h2 { font-size: 34px; }
  .wish-tabs { margin-top: 25px; padding-inline: 16px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
  .wish-grid { grid-template-columns: 1fr; padding: 0 16px 40px; }

  .music-dock { left: 50%; right: auto; bottom: 72px; transform: translateX(-50%); width: min(100%, 480px); height: 70px; padding: 0 15px; }
  .music-dock.closed { transform: translate(-50%, 100%); }
  .vinyl-wrap { width: 48px; height: 48px; }
  .vinyl { width: 39px; height: 39px; }
  .vinyl div { width: 14px; height: 14px; }
  .track-info { width: 145px; }
  .track-progress, .music-controls > button:not(.play-button), .music-add span { display: none; }
  .music-controls { margin-left: auto; }
  .dock-close { margin-left: 9px; }
  .music-fab { right: max(16px, calc((100vw - 480px) / 2 + 16px)); bottom: 86px; }
  .toast { bottom: 155px; max-width: calc(100vw - 40px); text-align: center; }
  .modal { max-height: calc(100vh - 40px); overflow-y: auto; }
}

/* Phone chat: keep contacts, conversation and composer inside one usable screen. */
@media (max-width: 520px) {
  #view-chat {
    height: calc(100dvh - 212px);
    min-height: 430px;
    overflow: hidden;
  }

  #view-chat .chat-layout {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  #view-chat .chat-people {
    flex: 0 0 auto;
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(255,255,255,.48);
  }

  #view-chat .chat-people .section-toolbar { display: none; }

  #view-chat .chat-people-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 1px 0 4px;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }

  #view-chat .chat-people-list::-webkit-scrollbar { display: none; }

  #view-chat .chat-person {
    min-width: max-content;
    width: auto;
    padding: 7px 10px 7px 7px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: rgba(255,255,255,.72);
    scroll-snap-align: start;
  }

  #view-chat .chat-person.active {
    border-color: #bad3df;
    background: #dcecf3;
  }

  #view-chat .chat-person .post-avatar { width: 30px; height: 30px; }
  #view-chat .chat-person b { max-width: 82px; font-size: 11px; }
  #view-chat .chat-person small,
  #view-chat .chat-person > svg { display: none; }
  #view-chat .chat-person .chat-unread { display: grid !important; }

  #view-chat .chat-panel {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  #view-chat .chat-head {
    min-height: 58px;
    padding: 9px 14px;
  }

  #view-chat .chat-head .post-avatar { width: 34px; height: 34px; }
  #view-chat .chat-head strong { font-size: 13px; }
  #view-chat .chat-head small { font-size: 9px; }

  #view-chat .chat-messages {
    min-height: 0;
    padding: 14px;
    gap: 9px;
    overscroll-behavior: contain;
  }

  #view-chat .chat-messages .empty-state {
    width: 100%;
    min-height: 100%;
    padding: 18px;
    border-color: #c8d9dc;
  }

  #view-chat .chat-message { max-width: 84%; }
  #view-chat .chat-message p { padding: 9px 12px; font-size: 12px; }

  #view-chat .chat-form {
    min-height: 60px;
    padding: 9px 12px calc(9px + env(safe-area-inset-bottom));
    gap: 8px;
  }

  #view-chat .chat-form input {
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 20px;
  }

  #view-chat .chat-form button {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
  }
}
