:root {
  --bg: #f5f1e8;
  --surface: #fffdf8;
  --surface-2: #eee7da;
  --ink: #20231f;
  --muted: #686b63;
  --line: #d9d1c2;
  --accent: #425d4a;
  --accent-2: #c36a4a;
  --danger: #9a4238;
  --shadow: 0 18px 45px rgba(48, 42, 32, .09);
  --radius: 22px;
  font-family: Inter, Pretendard, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: radial-gradient(circle at top left, #fff8e9 0, transparent 35%), var(--bg); min-height: 100vh; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
a { color: inherit; }
.app-shell { min-height: 100vh; padding-bottom: 90px; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; backdrop-filter: blur(18px); background: rgba(245,241,232,.86); border-bottom: 1px solid rgba(217,209,194,.8); }
.brand { font-family: Georgia, "Times New Roman", serif; font-size: 22px; font-weight: 700; letter-spacing: -.5px; }
.brand small { display: block; font-family: inherit; font-size: 10px; font-weight: 400; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.top-actions { display: flex; gap: 8px; align-items: center; }
.container { width: min(1100px, calc(100% - 28px)); margin: 0 auto; }
.hero { padding: 64px 0 36px; display: grid; grid-template-columns: 1.2fr .8fr; gap: 30px; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .15em; font-size: 12px; color: var(--accent); font-weight: 800; }
h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(42px, 8vw, 82px); line-height: .96; letter-spacing: -.05em; margin: 14px 0 20px; font-weight: 600; }
h2 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(26px, 4vw, 42px); letter-spacing: -.03em; margin: 0 0 12px; }
h3 { margin: 0 0 8px; font-size: 18px; }
p { line-height: 1.65; }
.lead { color: var(--muted); font-size: 18px; max-width: 640px; }
.hero-card { min-height: 420px; border-radius: 36px; padding: 28px; background: linear-gradient(145deg, #486454, #283c31); color: #fffaf0; box-shadow: var(--shadow); display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; position: relative; }
.hero-card::after { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); right: -80px; top: -60px; box-shadow: 0 0 0 50px rgba(255,255,255,.04), 0 0 0 100px rgba(255,255,255,.025); }
.hero-card .quote { font-family: Georgia, serif; font-size: 28px; line-height: 1.25; max-width: 340px; position: relative; z-index: 1; }
.btn { border: 0; border-radius: 14px; padding: 11px 16px; background: var(--accent); color: white; font-weight: 800; transition: transform .15s ease, opacity .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn.secondary { color: var(--ink); background: var(--surface-2); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.danger { background: var(--danger); }
.btn.small { padding: 8px 11px; border-radius: 11px; font-size: 13px; }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(500px, 100%); background: rgba(255,253,248,.94); border: 1px solid var(--line); border-radius: 30px; padding: 28px; box-shadow: var(--shadow); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 14px; background: var(--surface-2); margin: 22px 0; }
.auth-tabs button { border: 0; background: transparent; padding: 10px; border-radius: 10px; font-weight: 800; }
.auth-tabs button.active { background: var(--surface); box-shadow: 0 4px 12px rgba(0,0,0,.05); }
.field { display: grid; gap: 7px; margin: 13px 0; }
.field label { font-size: 13px; font-weight: 800; color: var(--muted); }
.input, .textarea, .select { width: 100%; border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 12px 13px; color: var(--ink); outline: none; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(66,93,74,.12); }
.textarea { min-height: 110px; resize: vertical; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: rgba(255,253,248,.94); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: 0 10px 28px rgba(48,42,32,.045); }
.card.soft { background: rgba(238,231,218,.7); box-shadow: none; }
.section { padding: 26px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-head p { color: var(--muted); margin: 4px 0 0; }
.family-picker { min-width: 170px; }
.nav { position: fixed; z-index: 30; bottom: 14px; left: 50%; transform: translateX(-50%); display: grid; grid-template-columns: repeat(5, 1fr); width: min(560px, calc(100% - 24px)); border: 1px solid rgba(217,209,194,.8); background: rgba(255,253,248,.92); backdrop-filter: blur(20px); border-radius: 22px; padding: 7px; box-shadow: 0 14px 45px rgba(48,42,32,.15); }
.nav button { border: 0; background: transparent; border-radius: 15px; padding: 9px 4px; color: var(--muted); font-size: 12px; font-weight: 800; }
.nav button.active { background: var(--ink); color: #fff; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat { padding: 16px; border-radius: 18px; background: var(--surface-2); }
.stat strong { display: block; font-family: Georgia, serif; font-size: 28px; }
.stat span { color: var(--muted); font-size: 12px; }
.post { margin-bottom: 14px; }
.post-head { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.meta { color: var(--muted); font-size: 12px; }
.post-text { white-space: pre-wrap; margin: 13px 0; }
.media-grid { display: grid; gap: 7px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 12px 0; }
.media-grid img { width: 100%; aspect-ratio: 1.2; object-fit: cover; border-radius: 15px; background: var(--surface-2); }
.media-grid img:only-child { grid-column: span 2; aspect-ratio: 16 / 9; }
audio { width: 100%; margin: 7px 0; }
.post-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--line); }
.reaction.active { background: #f1d7cf; color: #7b382c; }
.comments { margin-top: 12px; display: grid; gap: 8px; }
.comment { padding: 9px 11px; background: var(--surface-2); border-radius: 12px; font-size: 14px; }
.inline-form { display: flex; gap: 8px; margin-top: 10px; }
.inline-form input { flex: 1; }
.upload-preview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.upload-preview img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 7px 10px; font-size: 12px; }
.tag.selected { background: var(--ink); color: #fff; }
.person-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.person { padding: 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); }
.person .avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-family: Georgia, serif; font-size: 20px; background: var(--surface-2); margin-bottom: 12px; }
.relation { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line); }
.newspaper { background: #fffaf0; border: 1px solid #d8c7a7; border-radius: 6px; padding: 24px; box-shadow: 0 14px 30px rgba(74,57,33,.08); }
.newspaper .masthead { text-align: center; border-top: 4px double var(--ink); border-bottom: 4px double var(--ink); padding: 12px 0; margin-bottom: 20px; font-family: Georgia, serif; font-size: 32px; }
.news-columns { columns: 2; column-gap: 28px; }
.news-item { break-inside: avoid; margin: 0 0 16px; }
.notice { padding: 13px 15px; border-left: 4px solid var(--accent-2); background: #fff5e9; border-radius: 10px; color: #5d493a; }
.empty { text-align: center; padding: 36px 18px; color: var(--muted); border: 1px dashed var(--line); border-radius: 18px; }
.toast { position: fixed; z-index: 100; left: 50%; top: 18px; transform: translate(-50%, -20px); background: var(--ink); color: #fff; border-radius: 13px; padding: 11px 15px; opacity: 0; pointer-events: none; transition: .2s; max-width: calc(100% - 28px); box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.dialog-backdrop { position: fixed; z-index: 80; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(25,27,24,.45); }
.dialog { width: min(500px, 100%); max-height: 86vh; overflow: auto; background: var(--surface); border-radius: 24px; padding: 22px; box-shadow: var(--shadow); }
.voice-status { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 14px; background: var(--surface-2); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding-top: 35px; }
  .hero-card { min-height: 300px; }
  .grid.two, .grid.three { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .topbar { padding-inline: 13px; }
  .container { width: min(100% - 22px, 1100px); }
  .family-picker { max-width: 145px; min-width: 0; }
  .news-columns { columns: 1; }
}
.simple-mode { font-size: 18px; }
.simple-mode .meta, .simple-mode .tag { font-size: 14px; }
.simple-mode .btn { padding: 14px 18px; }
.simple-mode .nav button { font-size: 14px; padding: 12px 4px; }
