@charset "UTF-8";

:root {
  color-scheme: light;
  --bg: #faf8f5;
  --paper: #fffefa;
  --ink: #302e2a;
  --muted: #7e7b72;
  --accent: #ae533f;
  --accent-hover: #93432f;
  --peach: #f7e9e1;
  --line: #e9e4dc;
  --sage: #e9eee4;
  --green: #617554;
  --radius: 18px;
  font-family: "Pretendard", "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--ink);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button, input, textarea, select, a { outline-offset: 4px; }
:focus-visible { outline: 3px solid #98774c; }
button { color: inherit; }
button:disabled { cursor: wait; opacity: .62; }
button, a { touch-action: manipulation; }
button svg, a svg { flex-shrink: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { line-height: 1.4; word-break: keep-all; }
h1 { font-size: 2rem; font-weight: 750; letter-spacing: -.055em; }
h2 { font-size: 1.22rem; font-weight: 700; letter-spacing: -.035em; }
h3 { font-size: 1.04rem; }
small { font-size: .8rem; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 20px; top: -100px; z-index: 100; padding: 12px 20px; border-radius: 10px; background: var(--ink); color: white; }
.skip-link:focus { top: 15px; }
.icon { display: inline-block; width: 21px; height: 21px; vertical-align: middle; flex: 0 0 auto; }
.muted { color: var(--muted); line-height: 1.8; font-size: .94rem; }
.help { font-size: .8rem; color: var(--muted); line-height: 1.7; }
.eyebrow { color: var(--accent); font-size: .69rem; letter-spacing: .16em; font-weight: 750; margin-bottom: 10px; }
.tag { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); background: var(--peach); padding: 6px 12px; border-radius: 7px; font-size: .74rem; font-weight: 650; }
.tag .icon { width: 15px; height: 15px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 9px; min-height: 44px; padding: 11px 20px; border: 1px solid transparent; border-radius: 10px; font-size: .88rem; font-weight: 650; line-height: 1.4; transition: background .15s, box-shadow .15s; white-space: nowrap; }
.button.primary { color: #fffdf9; background: var(--accent); box-shadow: 0 3px 7px #7f3f2510; }
.button.primary:hover { background: var(--accent-hover); }
.button.secondary { background: var(--paper); border-color: var(--line); }
.button.secondary:hover { background: #f6f0e9; border-color: #d8c5b4; }
.button.quiet { padding-inline: 10px; background: transparent; color: var(--muted); }
.button.quiet:hover { color: var(--accent); background: #f5eee7; }
.button.compact { min-height: 36px; padding: 8px 12px; font-size: .8rem; }
.button.compact .icon { width: 17px; height: 17px; }
.button.full { width: 100%; }
.button-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.icon-button { display: inline-flex; justify-content: center; align-items: center; background: transparent; border: 0; border-radius: 9px; padding: 9px; min-width: 38px; min-height: 38px; color: var(--muted); }
.icon-button:hover { color: var(--accent); background: var(--peach); }
.field { display: flex; flex-direction: column; gap: 8px; margin: 19px 0; }
.field > span { font-size: .84rem; font-weight: 650; }
input, textarea, select { width: 100%; min-width: 0; border: 1px solid #e2ddd5; border-radius: 9px; padding: 12px 14px; color: var(--ink); background: #fffefa; font-size: .9rem; }
input::placeholder, textarea::placeholder { color: #979288; }
input:focus, textarea:focus, select:focus { border-color: #b88d74; }
textarea { resize: vertical; min-height: 72px; line-height: 1.85; }
select { cursor: pointer; padding-right: 25px; }
.form-error { font-size: .84rem; color: #a23e31; white-space: pre-wrap; line-height: 1.65; }
.form-error:not(:empty) { padding: 10px 0; }
.error { padding: 20px; color: #a23e31; background: #fbede7; border-radius: 10px; margin-block: 12px; }
.success { padding: 16px; color: var(--green); background: var(--sage); border-radius: 10px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.brand { display: inline-flex; align-items: center; gap: 11px; width: fit-content; }
.brand img { border-radius: 14px; }
.brand > span { font-size: 1.75rem; font-weight: 800; letter-spacing: -.05em; line-height: 1.15; }
.brand small { display: block; margin-top: 7px; font-size: .48rem; font-weight: 650; letter-spacing: .19em; color: #989083; }
.avatar { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #efe1d1; color: #826046; font-weight: 700; font-size: .91rem; }
.avatar.tone-1 { background: #eee3e2; color: #8b625d; }
.avatar.tone-2 { background: #e7ebdf; color: #68724e; }
.avatar.tone-3 { background: #e3e8eb; color: #5c727c; }
.avatar.tone-4 { background: #ece4ec; color: #856886; }
.avatar.small { width: 31px; height: 31px; flex-basis: 31px; font-size: .75rem; }
.avatar.large { width: 64px; height: 64px; flex-basis: 64px; font-size: 1.4rem; }
.loading { min-height: 190px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 20px; color: var(--muted); font-size: .9rem; text-align: center; }
.loading-mascot { width: 140px; height: 140px; object-fit: contain; flex-shrink: 0; }
.button-mascot { width: 28px; height: 28px; }
button[aria-busy="true"] { opacity: 1; }
#busy-indicator { position: fixed; right: 28px; bottom: 28px; z-index: 9; display: flex; align-items: center; gap: 14px; width: min(350px, calc(100vw - 40px)); padding: 15px 22px 15px 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: 0 10px 40px #302e2a20; pointer-events: none; }
#busy-indicator .loading-mascot { width: 96px; height: 96px; }
#busy-indicator strong { font-size: .85rem; }
#busy-indicator p { margin-top: 5px; font-size: .76rem; color: var(--muted); }
.boot { min-height: 100vh; display: flex; gap: 16px; flex-direction: column; align-items: center; justify-content: center; padding: 30px; }
#toast { position: fixed; z-index: 10; bottom: 30px; left: 50%; transform: translateX(-50%); color: #fffefa; background: #3f443a; border: 1px solid #5b6053; border-radius: 12px; box-shadow: 0 8px 30px #302e2a20; padding: 14px 24px; max-width: calc(100vw - 40px); font-size: .9rem; text-align: center; }

/* A quiet, spacious desktop sign-in, with artwork drawn in CSS. */
.auth-layout { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-story { position: relative; background: #f1ebe1; padding: 48px 9%; min-height: 840px; overflow: hidden; display: flex; flex-direction: column; }
.story-copy { margin-top: 80px; position: relative; z-index: 1; }
.story-copy .eyebrow { margin-bottom: 21px; letter-spacing: .1em; }
.story-copy h1 { font-size: clamp(2rem, 2.7vw, 3.05rem); line-height: 1.5; font-weight: 700; }
.story-copy > p:last-child { margin-top: 22px; color: #7f796c; font-size: .98rem; line-height: 1.9; }
.story-art { position: relative; width: 360px; height: 310px; margin: 10px auto 0; flex: 1 0 310px; max-height: 340px; }
.art-window { position: absolute; width: 222px; height: 245px; left: 61px; top: 28px; border-radius: 120px 120px 8px 8px; background: #f8f2e6; overflow: hidden; border: 11px solid #fffcf4; outline: 1px solid #ded5c5; box-shadow: 10px 14px 0 #d8cdbd40; transform: rotate(-6deg); }
.art-sun { width: 83px; height: 83px; position: absolute; right: 25px; top: 7px; border-radius: 50%; background: #d9a47d; opacity: .5; }
.art-hill { position: absolute; bottom: -72px; left: -65px; width: 260px; height: 200px; border-radius: 50%; transform: rotate(20deg); background: #b1b8a0; }
.art-hill.second { left: 60px; bottom: -94px; background: #8e9d7c; transform: rotate(-30deg); }
.art-heart { position: absolute; top: 45px; left: 70px; color: #b9765d; }
.art-heart .icon { width: 55px; height: 55px; fill: #d3aa93; stroke-width: 1; }
.art-note { position: absolute; display: flex; align-items: center; gap: 12px; bottom: 8px; left: 32px; background: #fffdf8; padding: 18px 26px; font-size: .85rem; transform: rotate(4deg); border: 1px solid #e9e0d1; box-shadow: 0 6px 20px #87744e09; color: #84715b; }
.art-note .icon { color: #879373; }
.art-stamp { position: absolute; right: 0; top: 165px; width: 100px; height: 100px; border: 1px dashed #b99679; outline: 4px solid #ece2d4; background: #ece2d4; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #a18060; font-size: .72rem; text-align: center; transform: rotate(12deg); }
.story-foot { color: #928777; font-size: .76rem; margin-top: 25px; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 60px 50px; }
.auth-form-wrap { width: 100%; max-width: 390px; }
.auth-form-wrap h2 { margin: 19px 0 10px; font-size: 1.8rem; font-weight: 750; }
.segmented { display: flex; background: #efede8; border-radius: 10px; padding: 4px; margin: 30px 0 24px; }
.segmented button { flex: 1; border: 0; padding: 11px; color: var(--muted); border-radius: 7px; background: transparent; font-weight: 600; font-size: .88rem; }
.segmented button.selected { background: var(--paper); color: var(--accent); box-shadow: 0 1px 5px #4635220a; }
.auth-form-wrap .field { margin: 17px 0; }
.auth-form-wrap .button.full { margin-top: 12px; min-height: 49px; justify-content: space-between; }
.auth-hint { display: flex; align-items: flex-start; gap: 7px; margin-top: 28px; color: #969085; font-size: .75rem; }
.auth-hint .icon { width: 15px; height: 15px; margin-top: 2px; }

/* Desktop shell: persistent navigation, reading column, and family rail. */
.app-layout { min-height: 100vh; display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--line); background: #f5f2ec; padding: 36px 22px 0; display: flex; flex-direction: column; z-index: 2; }
.sidebar .brand { margin-left: 10px; margin-bottom: 48px; }
.sidebar-label { font-size: .67rem; color: #999184; margin: 0 14px 13px; font-weight: 650; letter-spacing: .03em; }
.sidebar nav { display: flex; flex-direction: column; gap: 6px; }
.sidebar nav a { display: flex; align-items: center; gap: 12px; border-radius: 10px; padding: 13px 15px; color: #7d776e; font-weight: 550; font-size: .9rem; }
.sidebar nav a:hover, .sidebar-bottom > a:hover, .sidebar-bottom > button:hover { background: #ece5db; }
.sidebar nav a.active { background: #eddfd3; color: #99513d; font-weight: 750; }
.nav-chevron { margin-left: auto; width: 14px; height: 14px; opacity: 0; }
.active .nav-chevron { opacity: 1; }
.sidebar-note { margin: 35px 13px 30px; border-top: 1px solid #e4ddd2; padding: 25px 0 0; }
.sidebar-note > .icon { color: #ad8c70; width: 22px; }
.sidebar-note p { margin: 10px 0; font-size: .86rem; line-height: 1.8; color: #867865; }
.sidebar-note > span { color: #a2988b; font-size: .69rem; }
.sidebar-bottom { margin-top: auto; }
.sidebar-bottom > a, .sidebar-bottom > button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 15px; border: 0; background: transparent; border-radius: 10px; font-size: .84rem; color: #888174; text-align: left; }
.sidebar-bottom > a.active { background: #eddfd3; color: var(--accent); }
.sidebar-bottom > a .icon, .sidebar-bottom > button .icon { width: 18px; height: 18px; }
.profile { border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: center; margin-top: 20px; padding: 21px 2px 26px; }
.profile > div { min-width: 0; }
.profile strong, .profile small { display: block; overflow: hidden; text-overflow: ellipsis; }
.profile strong { font-size: .84rem; }
.profile small { font-size: .69rem; color: #928b7d; max-width: 120px; }
.online-dot { width: 6px; height: 6px; background: #8c9c72; border-radius: 50%; margin-left: auto; }
.workspace { min-width: 0; }
.topbar { height: 83px; display: flex; align-items: center; justify-content: space-between; padding: 0 46px; border-bottom: 1px solid var(--line); gap: 15px; }
.room-label, .topbar-actions { display: flex; align-items: center; gap: 12px; }
.room-label { color: #81786a; font-size: .85rem; min-width: 0; }
.room-label > span:first-of-type { max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-label > .icon { width: 17px; height: 17px; color: #a18b73; }
.private-badge { font-size: .6rem; border: 1px solid #dcded2; background: #f0f2e9; color: #7c8669; padding: 2px 7px; border-radius: 4px; white-space: nowrap; }
.topbar-actions .button { font-size: .75rem; }
.topbar-actions .button[aria-pressed="true"] { background: var(--peach); color: var(--accent); }
.today-label { color: #948b7e; font-size: .76rem; }
.workspace main { max-width: 1370px; margin: auto; padding: 38px 46px 55px; min-height: calc(100vh - 155px); }
.page-heading { margin-bottom: 29px; display: flex; align-items: center; justify-content: space-between; gap: 25px; }
.page-heading .eyebrow { font-size: .62rem; margin-bottom: 8px; }
.page-heading .muted { margin-top: 11px; font-size: .86rem; }
.page-heading .button { flex-shrink: 0; }
.feed-layout { display: grid; grid-template-columns: minmax(0, 1fr) 275px; gap: 29px; align-items: start; }
.composer-prompt { width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 20px; color: #9b9185; margin-bottom: 31px; }
.composer-prompt:hover { border-color: #cdb6a3; }
.composer-prompt > span:not(.avatar) { flex: 1; font-size: .85rem; }
.composer-prompt > .icon { color: #a98e72; }
.feed-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.feed-toolbar h2 { font-size: 1rem; }
.feed-toolbar h2 span { color: var(--accent); font-size: .82rem; font-weight: 600; margin-left: 7px; }
.feed-filter { display: flex; gap: 10px; margin-bottom: 20px; }
.feed-filter select { width: 125px; padding: 9px; font-size: .76rem; border-color: var(--line); }
.search-field { display: flex; align-items: center; width: 100%; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding-left: 12px; background: var(--paper); color: #a89e91; }
.search-field input { background: transparent; border: 0; padding: 10px 7px; font-size: .77rem; }
.search-field .icon { width: 17px; height: 17px; }
.search-field:focus-within { outline: 2px solid #b88d74; outline-offset: 2px; }
.search-field input:focus { outline: 0; }
.post-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); overflow: hidden; margin-bottom: 23px; }
.post-author { padding: 21px 24px; display: flex; gap: 11px; align-items: center; }
.post-author > div { min-width: 0; }
.post-author strong { font-size: .9rem; overflow-wrap: anywhere; }
.relationship { font-size: .67rem; color: #a18c75; margin-left: 9px; }
.post-author time { display: block; font-size: .7rem; color: #a2998c; margin-top: 2px; }
.family-only { margin-left: auto; font-size: .66rem; color: #a7a092; white-space: nowrap; }
.post-photo { position: relative; display: block; border: 0; padding: 0; width: 100%; height: 340px; background: #efebe3; overflow: hidden; }
.post-photo img { width: 100%; height: 100%; object-fit: contain; display: block; color: #8c8172; font-size: .8rem; }
.post-photo:hover img.loaded { filter: brightness(.98); }
.photo-count { position: absolute; bottom: 13px; right: 14px; background: #302e2a9c; color: white; display: flex; gap: 6px; align-items: center; padding: 4px 9px; border-radius: 6px; font-size: .72rem; }
.photo-count .icon { width: 14px; height: 14px; }
.post-body { padding: 22px 24px 14px; }
.post-caption { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.9; font-size: .92rem; }
.post-caption:empty { display: none; }
.post-body:has(.post-caption:empty) { padding-block: 5px; }
.post-actions { padding: 10px 16px; margin: 0 8px; display: flex; gap: 10px; justify-content: space-between; border-top: 1px solid #f0ebe5; }
.post-actions .button { font-size: .76rem; min-height: 34px; padding: 7px 8px; }
.post-actions .icon { width: 18px; height: 18px; }
.post-actions .ai-link { color: #a17b55; }
.right-rail { position: sticky; top: 28px; }
.family-rail { padding: 26px 21px 0; text-align: center; }
.rail-icon { background: #f6eee2; color: #b19573; width: 51px; height: 51px; border-radius: 17px; display: grid; place-items: center; margin: 0 auto 17px; }
.rail-icon .icon { width: 25px; height: 25px; }
.family-rail .eyebrow { font-size: .62rem; letter-spacing: .04em; }
.family-rail h2 { font-size: 1.08rem; overflow-wrap: anywhere; }
.family-rail .muted { font-size: .73rem; margin-top: 9px; }
.avatar-stack { display: flex; justify-content: center; padding: 23px 0 18px; }
.avatar-stack .avatar { margin-left: -7px; border: 3px solid var(--paper); width: 38px; height: 38px; flex-basis: 38px; font-size: .74rem; }
.avatar-stack .avatar:first-child { margin-left: 0; }
.text-link { font-size: .76rem; font-weight: 650; color: #9a7656; display: inline-flex; gap: 10px; align-items: center; }
.text-link .icon { width: 15px; height: 15px; }
.invite-row { display: flex; align-items: center; border-top: 1px solid var(--line); margin-top: 24px; padding: 13px 0; gap: 8px; }
.invite-row > span { color: #9a9285; font-size: .65rem; }
.invite-row strong { font-size: .79rem; letter-spacing: .07em; margin-left: auto; color: #84755e; }
.invite-row .icon-button { min-height: 25px; min-width: 25px; padding: 5px; }
.invite-row .icon { width: 14px; height: 14px; }
.digest-rail { position: relative; overflow: hidden; margin-top: 21px; background: #edf0e6; padding: 24px; border-radius: var(--radius); }
.digest-rail .tag { background: #dfe6d5; color: #7c896c; font-size: .61rem; padding: 5px 9px; }
.rail-book { position: absolute; width: 61px; height: 61px; color: #bdc6ad; transform: rotate(13deg); right: -10px; top: 36px; stroke-width: 1; }
.digest-rail h3 { color: #66704e; font-size: 1.14rem; margin-top: 22px; line-height: 1.6; }
.digest-rail p { font-size: .73rem; color: #8b937d; margin: 13px 0 22px; line-height: 1.85; }
.digest-rail .text-link { color: #737f5e; font-size: .72rem; }
.rail-caption { font-size: .65rem; color: #a69b89; text-align: center; margin-top: 24px; }
.rail-caption .icon { width: 13px; height: 13px; margin-right: 5px; }
.workspace-footer { max-width: 1370px; margin: auto; padding: 10px 46px 30px; color: #b2a99c; font-size: .68rem; }
.workspace-footer span { padding-right: 14px; margin-right: 14px; border-right: 1px solid var(--line); font-weight: 700; color: #a39480; }
.empty-state { padding: 58px 25px; text-align: center; border-radius: var(--radius); background: var(--paper); border: 1px dashed #e5dbce; }
.empty-icon { display: inline-flex; width: 55px; height: 55px; align-items: center; justify-content: center; color: #b38c6b; background: #f3e9dc; border-radius: 18px; }
.empty-icon .icon { width: 26px; height: 26px; stroke-width: 1.5; }
.empty-icon.sage { background: var(--sage); color: var(--green); }
.empty-state h3 { margin: 20px 0 12px; }
.empty-state > p { max-width: 340px; margin: auto; font-size: .85rem; color: var(--muted); line-height: 1.9; word-break: keep-all; }
.empty-state .button { margin-top: 25px; }

/* Wide dialogs put photos beside the conversation, retaining their aspect ratio. */
.modal-open { overflow: hidden; }
dialog { padding: 28px; border: 1px solid var(--line); border-radius: 22px; width: calc(100% - 48px); max-width: 680px; max-height: calc(100dvh - 56px); color: var(--ink); background: var(--paper); box-shadow: 0 25px 90px #24211930; }
dialog::backdrop { background: #342e2559; backdrop-filter: blur(4px); }
.modal-heading { position: sticky; top: -28px; z-index: 3; background: var(--paper); display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: -8px; padding-top: 8px; padding-bottom: 23px; }
.modal-heading .eyebrow { font-size: .58rem; margin-bottom: 7px; }
.modal-heading h2 { font-size: 1.25rem; }
.modal-heading > .icon-button { align-self: start; }
.post-dialog { max-width: 1120px; }
.post-detail { display: grid; grid-template-columns: 1.05fr 1fr; gap: 29px; align-items: start; }
.post-detail.text-only { grid-template-columns: minmax(0, 1fr); max-width: 730px; margin: auto; }
.detail-gallery { position: sticky; top: 0; min-width: 0; }
#gallery-stage { width: 100%; height: 470px; background: #efebe3; border-radius: 12px; position: relative; overflow: hidden; }
#gallery-stage > img { width: 100%; height: 100%; object-fit: contain; }
.gallery-index { position: absolute; bottom: 13px; right: 14px; padding: 4px 10px; border-radius: 5px; background: #3d382d91; color: white; font-size: .72rem; }
.photo-thumbnails { display: flex; gap: 9px; padding-top: 12px; }
.photo-thumbnails button { width: 65px; height: 65px; border: 2px solid transparent; padding: 2px; border-radius: 8px; background: #efebe3; }
.photo-thumbnails button[aria-pressed="true"] { border-color: var(--accent); }
.photo-thumbnails img { width: 100%; height: 100%; border-radius: 4px; object-fit: cover; }
.detail-conversation { min-width: 0; }
.detail-conversation .post-author { padding: 2px 0 17px; }
.detail-caption { white-space: pre-wrap; line-height: 1.9; overflow-wrap: anywhere; font-size: .95rem; margin: 3px 0 24px; }
.ai-panel { padding: 18px; background: #f6f2e9; border-radius: 12px; border: 1px solid #ebe2d5; margin-bottom: 27px; }
.ai-heading { display: flex; align-items: center; gap: 7px; color: #9b7a4f; margin-bottom: 8px; }
.ai-heading h3 { font-size: .87rem; }
.ai-heading .icon { width: 18px; height: 18px; }
.ai-panel > .button-row { margin-top: 13px; gap: 3px; }
.ai-panel .button.secondary { background: #fffcf5; font-size: .75rem; }
.ai-result { font-size: .86rem; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-result:not(:empty) { padding: 16px 0 5px; }
.inline-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; margin-top: 15px; background: #fffefa; border: 1px solid #e6ded2; border-radius: 8px; padding-right: 3px; }
.inline-form input { border: 0; background: transparent; font-size: .76rem; padding: 10px; }
.inline-form .form-error { grid-column: 1 / -1; padding-inline: 10px; }
.inline-form .form-error:empty { padding: 0; }
.inline-form .send-button { background: #a78761; color: white; min-width: 30px; min-height: 30px; padding: 6px; border-radius: 6px; }
.send-button .icon { width: 17px; height: 17px; }
.fine-print { font-size: .64rem; color: #a09685; margin-top: 9px; line-height: 1.7; }
.question-history:not(:empty) { padding-top: 12px; }
.chat-turn { padding: 11px; background: #fffaf1; border-radius: 8px; margin-top: 9px; }
.chat-turn.user { background: #eae4d7; margin-left: 28px; }
.chat-turn > span { font-size: .62rem; color: #927655; font-weight: 700; }
.chat-turn p { font-size: .78rem; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; margin-top: 5px; }
.comments-section > h3 { font-size: .92rem; margin-bottom: 18px; }
.comments-section > h3 span { color: var(--accent); margin-left: 6px; font-size: .8rem; }
.comment { display: flex; align-items: start; gap: 9px; margin-bottom: 18px; }
.comment > div { min-width: 0; }
.comment strong { font-size: .78rem; }
.comment .relationship { font-size: .62rem; }
.comment p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .84rem; line-height: 1.8; margin-block: 3px; }
.comment small { font-size: .63rem; color: #a59b8b; }
.no-comments { font-size: .78rem; color: #a29683; padding-bottom: 22px; }
.comments-section textarea { font-size: .82rem; }
.comment-submit { display: flex; justify-content: space-between; align-items: center; margin-top: 9px; gap: 8px; }
.composer-user { display: flex; gap: 12px; margin-bottom: 22px; align-items: center; }
.composer-user strong { font-size: .9rem; }
.compose-dialog textarea { border: 0; padding: 0; background: transparent; font-size: .96rem; }
.character-count { text-align: right; color: #aca393; font-size: .7rem; margin: 8px 0 20px; }
.upload-zone { position: relative; display: flex; align-items: center; justify-content: center; flex-direction: column; background: #f7f4ed; border: 1px dashed #d7cab8; border-radius: 12px; padding: 27px 15px; cursor: pointer; text-align: center; }
.upload-zone.dragging, .upload-zone:hover { border-color: #b28663; background: #f3e9dc; }
.upload-zone > .icon { width: 30px; height: 30px; color: #b39978; margin-bottom: 12px; stroke-width: 1.3; }
.upload-zone strong { font-size: .84rem; color: #a08868; }
.upload-zone > span { color: #ab9d88; font-size: .66rem; margin-top: 7px; }
.photo-previews { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 15px; }
.preview { width: calc(20% - 9px); min-width: 85px; position: relative; }
.preview img { width: 100%; aspect-ratio: 1; object-fit: cover; border: 1px solid var(--line); border-radius: 9px; }
.preview > .icon-button { position: absolute; right: -5px; top: -5px; min-width: 24px; min-height: 24px; padding: 4px; color: white; background: #66594ac9; border-radius: 50%; }
.preview .icon { width: 14px; height: 14px; }
.preview > span { display: block; font-size: .64rem; color: #a59b8b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 25px; gap: 12px; }
.composer-footer .help { font-size: .7rem; }
.composer-footer .icon { width: 16px; height: 16px; }
.voice-review { margin-top: 15px; border: 1px solid #e1d8ca; background: #f7f2e8; padding: 17px; border-radius: 12px; }
.voice-review h4 { margin: 8px 0; font-size: .84rem; }
.voice-review .field { margin-top: 12px; }
.voice-review .field > span { font-size: .72rem; }
.voice-draft { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .86rem; margin: 14px 0; }
.voice-review .button-row { margin-top: 16px; }
.recording-status { display: flex; align-items: center; gap: 10px; padding: 15px; border-radius: 10px; background: var(--peach); margin-top: 16px; flex-wrap: wrap; font-size: .76rem; }
.recording-dot { width: 8px; height: 8px; background: #ac513f; border-radius: 50%; animation: pulse 1s ease-in-out infinite alternate; }
@keyframes pulse { to { opacity: .35; } }

/* Family, memories, digest, and account views. */
.onboarding { max-width: 1120px; margin: auto; padding: 35px 45px 80px; }
.onboarding > header { display: flex; align-items: center; justify-content: space-between; }
.onboarding-intro { padding: 55px 0 34px; text-align: center; }
.onboarding-intro .muted { margin-top: 14px; }
.onboarding-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 27px; }
.onboarding-grid .panel { padding: 33px; }
.onboarding-grid h2 { margin-top: 21px; margin-bottom: 8px; }
.join-preview { border-top: 1px solid var(--line); padding-top: 22px; margin-top: 25px; }
.join-preview h3 { margin-bottom: 8px; }
.search-hero { padding: 43px; text-align: center; }
.search-hero h2 { margin-top: 21px; font-size: 1.45rem; }
.search-hero > p { margin-top: 11px; }
.memory-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; max-width: 760px; margin: 30px auto 0; }
.memory-search .form-error { grid-column: 1 / -1; text-align: left; }
.memory-search input { background: #faf8f2; }
.suggestions { margin: 15px auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }
.suggestion { border: 1px solid #e7dfd1; border-radius: 20px; background: transparent; color: #9b8d77; padding: 7px 12px; font-size: .72rem; }
.suggestion:hover { background: var(--peach); color: var(--accent); }
.search-answer { margin-top: 25px; padding: 32px; }
.search-answer .eyebrow .icon { width: 16px; height: 16px; margin-right: 6px; }
.answer-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 2; margin: 23px 0; font-size: .95rem; }
.page-note { display: flex; align-items: center; gap: 10px; justify-content: center; font-size: .75rem; color: #a49782; margin-top: 28px; }
.page-note .icon { width: 16px; height: 16px; }
.digest-layout { display: grid; grid-template-columns: 245px minmax(0, 1fr); gap: 25px; align-items: start; }
.date-panel { padding: 24px 19px; }
.date-panel h2 { display: flex; gap: 10px; align-items: center; font-size: .98rem; }
.date-panel .field { margin-block: 24px; }
.date-panel .field span { font-size: .73rem; color: var(--muted); }
.date-panel input { font-size: .8rem; padding: 10px; }
.date-panel .eyebrow { font-size: .64rem; letter-spacing: .02em; color: #a99a85; }
.date-item { display: flex; width: 100%; align-items: center; gap: 10px; border: 0; background: transparent; padding: 11px; border-radius: 8px; font-size: .79rem; color: #9a8c76; }
.date-item .icon { width: 15px; height: 15px; }
.date-item .icon:last-child { margin-left: auto; }
.date-item:hover { background: #f7f1e7; }
.date-item.selected { background: var(--peach); color: var(--accent); }
.digest-content { padding: 31px; min-height: 360px; }
.digest-content .eyebrow { font-size: .67rem; letter-spacing: .02em; }
.digest-content .empty-state { border: 0; padding-top: 42px; }
.digest-reading { padding: 25px 0; }
.digest-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 2.1; margin: 22px 0 25px; font-size: .98rem; }
.digest-post-heading { border-top: 1px solid var(--line); padding-top: 24px; font-size: .92rem; }
.digest-post { display: flex; gap: 13px; width: 100%; align-items: center; border: 0; background: transparent; border-bottom: 1px solid var(--line); padding: 17px 0; text-align: left; }
.digest-post:hover { background: #faf7ef; }
.digest-post > span:not(.avatar) { flex: 1; min-width: 0; }
.digest-post strong { display: block; font-size: .83rem; margin-bottom: 4px; }
.digest-post > span > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #a2947e; font-size: .78rem; }
.digest-post > .icon { width: 17px; height: 17px; color: #b2a48e; }
.family-layout { display: grid; grid-template-columns: minmax(0, 1fr) 285px; gap: 25px; align-items: start; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding-bottom: 27px; border-bottom: 1px solid var(--line); }
.section-heading .eyebrow { font-size: .59rem; }
.section-heading .tag { font-size: .65rem; white-space: nowrap; }
.member-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; padding-top: 28px; }
.member-card { text-align: center; padding: 20px 10px; border-radius: 13px; background: #f8f5ef; }
.member-card h3 { font-size: .86rem; margin: 14px 0 6px; overflow-wrap: anywhere; }
.member-card p { font-size: .69rem; color: #a0927a; }
.me-badge { margin-left: 5px; background: var(--sage); border-radius: 4px; color: var(--green); padding: 1px 4px; font-size: .6rem; }
.invitation-card { text-align: center; }
.invitation-card h2 { margin: 19px 0 12px; font-size: 1.08rem; }
.invitation-card .muted { font-size: .77rem; }
.invite-code { letter-spacing: .2em; font-size: 1.6rem; font-weight: 700; color: #9f7252; margin: 24px 0; padding: 15px 0; border: 1px dashed #ddcfb9; border-radius: 10px; background: #faf6ed; user-select: all; }
.invitation-card > .help { margin-top: 18px; font-size: .67rem; }
.digest-settings { margin-top: 20px; }
.digest-settings h2 { display: flex; gap: 9px; align-items: center; font-size: .93rem; }
.digest-settings .field > span { font-size: .72rem; color: #a3967e; }
.time-display { display: block; font-size: 2rem; color: #9e8663; padding-block: 15px; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; align-items: start; }
.settings-grid .panel > .muted { margin-top: 13px; font-size: .8rem; }
.settings-profile { display: flex; align-items: center; gap: 17px; margin: 26px 0; }
.settings-profile strong { font-size: 1.1rem; }
.settings-profile .muted { font-size: .8rem; }
.large-text { font-size: 18px; }
.large-text .app-layout { grid-template-columns: 255px minmax(0, 1fr); }
.large-text .feed-layout { grid-template-columns: minmax(0, 1fr) 275px; }
.large-text .workspace main { padding-inline: 30px; }

@media (min-width: 1650px) { .app-layout { grid-template-columns: 260px minmax(0, 1fr); } .sidebar { padding-inline: 30px; } .post-photo { height: 430px; } }
@media (max-width: 1200px) {
  .app-layout { grid-template-columns: 210px minmax(0, 1fr); }
  .sidebar { padding-inline: 14px; }
  .topbar { padding-inline: 30px; }
  .workspace main { padding: 30px; }
  .page-heading { align-items: start; }
  h1 { font-size: 1.75rem; }
  .feed-layout, .large-text .feed-layout { grid-template-columns: minmax(0, 1fr) 230px; gap: 22px; }
  .family-rail { padding-inline: 16px; }
  .family-rail h2 { font-size: .94rem; }
  .invite-row { gap: 4px; }
  .invite-row > span { font-size: .59rem; }
  .invite-row strong { font-size: .69rem; }
  .digest-rail { padding-inline: 19px; }
  .family-layout { grid-template-columns: minmax(0, 1fr) 250px; }
  .member-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-story { padding-inline: 10%; }
  .story-art { transform: scale(.9); transform-origin: left center; }
  .auth-panel { padding-inline: 40px; }
}
@media (max-width: 1000px) {
  .feed-layout, .large-text .feed-layout { grid-template-columns: minmax(0, 1fr); }
  .right-rail { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .digest-rail { margin-top: 0; }
  .rail-caption { display: none; }
  .family-rail { padding-top: 22px; }
  .today-label { display: none; }
  .page-heading .button { padding-inline: 12px; font-size: .78rem; }
  .page-heading .muted { max-width: 360px; }
  .post-dialog { max-width: 850px; }
  .post-detail { gap: 20px; grid-template-columns: .9fr 1fr; }
  #gallery-stage { height: 370px; }
  .family-layout { grid-template-columns: minmax(0, 1fr); }
  .family-layout > aside { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
  .digest-settings { margin-top: 0; }
  .member-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .settings-grid { grid-template-columns: 1fr; }
  .digest-layout { grid-template-columns: 190px minmax(0, 1fr); gap: 18px; }
  .digest-content { padding: 24px; }
  .search-hero { padding: 30px 24px; }
  .memory-search { grid-template-columns: minmax(0, 1fr); }
  .auth-story { padding-inline: 9%; }
  .auth-form-wrap h2 { font-size: 1.5rem; }
  .auth-story .story-copy h1 { font-size: 2rem; }
  .story-art { width: 300px; transform: scale(.85); }
  .large-text .app-layout { grid-template-columns: 215px minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-story { padding: 24px; min-height: 0; }
  .auth-story .brand { margin-bottom: 20px; }
  .story-copy { margin-top: 12px; padding-bottom: 15px; }
  .auth-story .story-copy h1 { font-size: 1.85rem; }
  .story-copy > p:last-child, .story-art, .story-foot { display: none; }
  .auth-panel { padding: 35px 24px 55px; }
  .auth-form-wrap { max-width: 440px; }
  .app-layout, .large-text .app-layout { display: block; }
  .sidebar { position: relative; height: auto; padding: 17px 20px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar .brand { margin: 0 0 18px; }
  .sidebar .brand img { width: 33px; height: 33px; border-radius: 11px; }
  .sidebar .brand > span { font-size: 1.45rem; }
  .sidebar .brand small { display: none; }
  .sidebar-label, .sidebar-note, .nav-chevron, .profile { display: none; }
  .sidebar nav { flex-direction: row; gap: 4px; }
  .sidebar nav a { flex: 1; justify-content: center; padding: 11px 5px; font-size: .73rem; gap: 6px; }
  .sidebar nav .icon { width: 17px; height: 17px; }
  .sidebar-bottom { position: absolute; right: 15px; top: 17px; display: flex; gap: 5px; }
  .sidebar-bottom > a, .sidebar-bottom > button { width: auto; padding: 8px; font-size: .7rem; gap: 5px; }
  .topbar { height: 54px; padding-inline: 21px; }
  .room-label { font-size: .72rem; gap: 7px; }
  .room-label > span:first-of-type { max-width: 170px; }
  .private-badge { display: none; }
  .topbar-actions { gap: 0; }
  .workspace main, .large-text .workspace main { padding: 25px 20px 35px; }
  h1 { font-size: 1.6rem; }
  .page-heading { flex-wrap: wrap; gap: 17px; }
  .page-heading .muted { font-size: .8rem; max-width: none; }
  .page-heading .button { min-height: 39px; }
  .right-rail { display: none; }
  .post-author { padding: 17px; }
  .post-body { padding: 17px; }
  .post-photo { height: 320px; }
  .composer-prompt { padding: 16px; }
  .composer-prompt > span:not(.avatar) { font-size: .78rem; }
  .workspace-footer { padding: 10px 20px 25px; font-size: .61rem; }
  .post-detail { grid-template-columns: minmax(0, 1fr); }
  .detail-gallery { position: static; }
  #gallery-stage { height: 300px; }
  dialog { width: calc(100% - 24px); max-height: calc(100dvh - 24px); padding: 20px; border-radius: 16px; }
  .modal-heading { top: -20px; padding-bottom: 20px; }
  .modal-heading h2 { font-size: 1.12rem; }
  .detail-conversation .post-author { padding-top: 10px; }
  .composer-footer { flex-wrap: wrap; justify-content: end; }
  .composer-footer > .help { display: none; }
  .upload-zone > span { max-width: 220px; }
  .onboarding { padding: 25px 20px 50px; }
  .onboarding-intro { padding-top: 35px; }
  .onboarding-grid { grid-template-columns: 1fr; }
  .onboarding-grid .panel { padding: 25px; }
  .search-hero { padding: 30px 19px; }
  .search-hero h2 { font-size: 1.2rem; }
  .search-hero .muted { font-size: .78rem; }
  .suggestions { gap: 7px; }
  .suggestion { font-size: .68rem; }
  .page-note { align-items: start; font-size: .69rem; }
  .digest-layout { grid-template-columns: minmax(0, 1fr); }
  .date-panel { padding: 20px; }
  .date-panel .field { margin-block: 17px; }
  #digest-dates { max-height: 135px; overflow-y: auto; }
  .date-panel .date-item { display: inline-flex; width: auto; margin-right: 4px; }
  .date-item .icon:last-child { display: none; }
  .digest-content { padding: 25px 20px; }
  .member-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .family-layout > aside { grid-template-columns: minmax(0, 1fr); }
  .panel { padding: 23px; }
  .large-text .sidebar nav a { font-size: .65rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
.family-tree-board { min-width: 0; margin-block: 20px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #faf8f5; }
.tree-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); font-weight: 700; }
.tree-toolbar > div { display: flex; gap: 5px; }
.tree-toolbar button { border: 1px solid var(--line); border-radius: 9px; min-width: 40px; min-height: 40px; padding: 6px 10px; background: var(--paper); font-size: .8rem; }
.family-tree-canvas { display: block; width: 100%; height: 460px; touch-action: none; cursor: grab; }
.family-tree-canvas:active { cursor: grabbing; }
.family-tree-canvas path { fill: none; stroke: #b79e8d; stroke-width: 2; }
.family-tree-canvas .tree-spouse-line { stroke: var(--green); stroke-dasharray: 5 4; }
.tree-node { display: flex; width: 100%; height: 100%; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border: 1.5px solid #cfc8bf; border-radius: 16px; background: var(--paper); color: var(--ink); padding: 7px; }
.tree-node:disabled { opacity: 1; cursor: default; }
.tree-node.male { border-color: #8faeb5; }
.tree-node.female { border-color: #cd9d90; }
.tree-node.selected, .tree-node.mine { border: 3px solid var(--accent); background: #fff0e7; }
.tree-node strong { font-size: 13px; max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-node small { font-size: 10px; color: var(--muted); }
.tree-node-face { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--peach); font-size: 18px; font-weight: 700; }
.tree-add-node { border-style: dashed; background: #f6f4ed; }
.tree-add-node .tree-node-face { background: #ece8dd; }
.tree-legend { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; padding: 12px 14px 0; font-size: .72rem; color: var(--muted); }
.tree-help { padding: 0 14px 12px; }
.tree-selection { border-radius: 10px; padding: 14px; background: var(--peach); font-size: .85rem; }
.onboarding-grid:has(.family-tree-board) { grid-template-columns: minmax(0, 1fr); }
.onboarding-grid:has(.family-tree-board) > section:first-child { display: none; }
@media (max-width: 650px) { .family-tree-canvas { height: 380px; } .tree-toolbar { padding: 10px; } }
