:root {
  font-family: "Noto Sans SC", system-ui, sans-serif;
  color: #322b25;
  background: #d8d0c3;
  font-synthesis: none;
  --ink: #322b25;
  --muted: #8d8175;
  --cream: #f7f1e7;
  --paper: #fffdf8;
  --orange: #ee744d;
  --orange-dark: #d75c38;
  --green: #768b66;
  --line: rgba(68, 52, 42, .11);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 50% -20%, #f8f1e6, #c8beb0 70%); }
button, input, textarea { font: inherit; }
button { color: inherit; }
.app-shell { width: min(100%, 430px); min-height: 100dvh; margin: 0 auto; background: var(--cream); position: relative; overflow: hidden; box-shadow: 0 0 60px rgba(52, 39, 30, .18); }
#app { min-height: 100dvh; padding-bottom: 104px; overflow: hidden; }
.home-header { padding: max(22px, env(safe-area-inset-top)) 22px 18px; display: flex; align-items: center; justify-content: space-between; }
.eyebrow { margin: 0 0 3px; color: var(--orange-dark); font-size: 11px; letter-spacing: .14em; font-weight: 800; }
h1 { font-family: "DM Sans", "Noto Sans SC", sans-serif; margin: 0; font-size: 27px; letter-spacing: -.04em; }
.avatar, .author-avatar { border-radius: 50%; display: grid; place-items: center; overflow: hidden; flex: 0 0 auto; font-weight: 800; }
.avatar { width: 44px; height: 44px; background: #dbe0cb; border: 3px solid var(--paper); box-shadow: 0 4px 14px rgba(67, 54, 40, .12); font-size: 20px; }
.hero { margin: 0 16px; height: 282px; border-radius: 30px; overflow: hidden; position: relative; background: #77614e; box-shadow: 0 18px 34px rgba(84, 56, 35, .18); isolation: isolate; }
.hero img { width: 100%; height: 100%; object-fit: cover; object-position: 0 40%; transform: scale(1.02); }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(28,20,14,.02) 38%, rgba(28,20,14,.82)); z-index: 1; }
.live-pill { position: absolute; z-index: 2; top: 16px; left: 16px; color: white; background: rgba(36,30,25,.58); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: 7px 11px; font: 700 10px "DM Sans"; letter-spacing: .12em; }
.live-pill::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #ff8061; margin-right: 6px; box-shadow: 0 0 0 3px rgba(255,128,97,.2); }
.hero-copy { position: absolute; z-index: 2; left: 19px; right: 19px; bottom: 18px; color: white; }
.hero-copy p { margin: 0 0 6px; font-size: 12px; opacity: .78; }
.hero-copy h2 { margin: 0; font-size: 25px; line-height: 1.28; letter-spacing: -.03em; }
.station-stats { display: flex; gap: 7px; margin-top: 11px; font-size: 11px; opacity: .88; }
.station-stats span + span::before { content: "•"; margin-right: 7px; }
.section { padding: 27px 18px 0; }
.section-title-row { display: flex; justify-content: space-between; align-items: end; margin-bottom: 14px; }
.section h3 { margin: 0; font-size: 19px; letter-spacing: -.03em; }
.count { color: var(--muted); font-size: 12px; }
.filters { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -18px 17px; padding: 0 18px; }
.filters::-webkit-scrollbar { display: none; }
.filter { border: 0; background: #ebe3d7; color: #796d61; padding: 9px 13px; border-radius: 999px; white-space: nowrap; font-size: 12px; font-weight: 700; }
.filter.active { background: var(--ink); color: white; }
.timeline { position: relative; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 10px; bottom: 12px; width: 1px; background: #d5c8b8; }
.moment { position: relative; padding-left: 32px; margin-bottom: 21px; }
.moment::before { content: ""; position: absolute; left: 6px; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--cream); border: 3px solid var(--orange); z-index: 1; }
.moment-date { color: var(--muted); font: 700 10px "DM Sans", sans-serif; letter-spacing: .08em; margin-bottom: 8px; }
.moment-card { border: 0; text-align: left; padding: 0; width: 100%; background: var(--paper); border-radius: 21px; overflow: hidden; box-shadow: 0 6px 20px rgba(71, 55, 42, .07); cursor: pointer; }
.moment-image { height: 142px; background: #e2d9cc; overflow: hidden; position: relative; }
.moment-image img { width: 100%; height: 100%; object-fit: cover; }
.category-label { position: absolute; top: 11px; left: 11px; padding: 6px 9px; border-radius: 8px; font-size: 10px; font-weight: 800; background: rgba(255,253,248,.9); backdrop-filter: blur(8px); }
.moment-body { padding: 14px 15px 15px; }
.moment-body h4 { margin: 0 0 7px; font-size: 16px; line-height: 1.4; letter-spacing: -.02em; }
.moment-body p { color: #766b60; font-size: 12px; line-height: 1.65; margin: 0 0 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta-row { border-top: 1px solid var(--line); padding-top: 11px; display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: var(--muted); }
.author { display: flex; align-items: center; gap: 7px; color: #65594e; font-weight: 700; }
.author-avatar { width: 24px; height: 24px; background: #f0c5ad; color: #7e402c; font-size: 10px; }
.bottom-nav { position: fixed; z-index: 20; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%, 430px); height: calc(78px + env(safe-area-inset-bottom)); padding: 10px 63px env(safe-area-inset-bottom); display: flex; justify-content: space-between; align-items: start; background: rgba(255,253,248,.92); backdrop-filter: blur(18px); border-top: 1px solid rgba(80,60,45,.09); }
.nav-item { border: 0; background: none; color: #a2988d; min-width: 50px; display: grid; justify-items: center; gap: 4px; font-size: 10px; font-weight: 700; padding: 2px 4px; }
.nav-item svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-item.active { color: var(--orange-dark); }
.record-button { position: absolute; left: 50%; top: -25px; transform: translateX(-50%); width: 58px; height: 58px; border-radius: 50%; border: 5px solid var(--cream); background: var(--orange); color: white; display: grid; place-items: center; box-shadow: 0 8px 20px rgba(214,85,49,.3); }
.record-button svg { width: 25px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); font-size: 13px; }
.family-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
.family-card { border-radius: 22px; padding: 19px; min-height: 148px; background: var(--paper); box-shadow: 0 6px 20px rgba(71,55,42,.06); }
.family-card .avatar { margin-bottom: 18px; }
.family-card h4 { margin: 0 0 4px; }
.family-card p { color: var(--muted); font-size: 11px; margin: 0; }
.page-head { padding: max(24px, env(safe-area-inset-top)) 20px 12px; display:flex; align-items:center; gap: 13px; }
.back { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.75); display:grid; place-items:center; font-size: 20px; }
.page-head h2 { margin: 0; font-size: 22px; }
.detail-photo { height: 330px; margin: 0 16px; border-radius: 29px; overflow:hidden; }
.detail-photo img { width:100%; height:100%; object-fit:cover; }
.detail-content { padding: 24px 22px 40px; }
.detail-content h1 { font-size: 28px; line-height: 1.35; margin: 8px 0 13px; }
.detail-content > p { font-size: 15px; line-height: 1.9; color:#6e6257; }
.detail-facts { display:grid; gap:10px; padding: 17px 0; margin-top:20px; border-block:1px solid var(--line); font-size:13px; }
.detail-facts div { display:flex; justify-content:space-between; }
.detail-facts span { color:var(--muted); }
.sheet-backdrop { position: fixed; z-index: 50; inset: 0; background: rgba(44,36,30,.42); backdrop-filter: blur(3px); display:flex; align-items:flex-end; justify-content:center; }
.sheet { width:min(100%,430px); max-height: 94dvh; overflow:auto; background:var(--cream); border-radius:30px 30px 0 0; padding:12px 20px calc(28px + env(safe-area-inset-bottom)); animation: rise .3s cubic-bezier(.2,.8,.2,1); }
@keyframes rise { from { transform:translateY(100%); } }
.grabber { width:42px; height:5px; border-radius:10px; background:#d1c6b8; margin:0 auto 20px; }
.sheet-heading { display:flex; justify-content:space-between; align-items:center; margin-bottom:19px; }
.sheet-heading h2 { margin:0; font-size:23px; }
.close { border:0; background:#e9e1d6; border-radius:50%; width:34px; height:34px; font-size:18px; }
.field { margin-bottom:17px; }
.field label { display:block; font-size:12px; font-weight:800; margin:0 0 8px; }
.field input, .field textarea { width:100%; border:1px solid var(--line); background:var(--paper); border-radius:15px; padding:13px 14px; outline:none; color:var(--ink); }
.field textarea { min-height:88px; resize:none; line-height:1.6; }
.field input:focus, .field textarea:focus { border-color:var(--orange); box-shadow:0 0 0 3px rgba(238,116,77,.1); }
.form-row { display:grid; grid-template-columns:1fr 1fr; gap:11px; }
.choice-row { display:flex; gap:8px; }
.choice { flex:1; border:1px solid var(--line); background:var(--paper); border-radius:13px; padding:11px 5px; font-size:11px; font-weight:700; }
.choice.selected { background:#38302a; color:#fff; border-color:#38302a; }
.people-grid { display:flex; flex-wrap:wrap; gap:8px; }
.person-chip { border:1px solid var(--line); background:var(--paper); border-radius:999px; padding:8px 11px; font-size:11px; }
.person-chip.selected { color:#9b452e; background:#f9ded0; border-color:#f4c3af; }
.image-input { display:block; border:1px dashed #ccbca9; border-radius:16px; padding:15px; text-align:center; color:var(--muted); font-size:12px; cursor:pointer; }
.image-input input { display:none; }
.image-preview { width:100%; height:130px; object-fit:cover; border-radius:14px; margin-top:9px; display:none; }
.submit { width:100%; border:0; border-radius:16px; padding:15px; background:var(--orange); color:white; font-weight:800; box-shadow:0 8px 18px rgba(214,85,49,.22); }
#toast { position:fixed; z-index:80; left:50%; bottom:100px; transform:translate(-50%,15px); background:#322b25; color:white; padding:11px 17px; border-radius:999px; font-size:12px; opacity:0; pointer-events:none; transition:.25s; white-space:nowrap; }
#toast.show { opacity:1; transform:translate(-50%,0); }
@media (min-width: 600px) { .app-shell { min-height: 900px; margin-block: 24px; border-radius: 38px; } .bottom-nav { bottom:24px; border-radius:0 0 38px 38px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration:.01ms !important; scroll-behavior:auto !important; } }
