:root {
  --bg: #f4f2ec;
  --card: #ffffff;
  --line: #ddd7ca;
  --text: #1c1c1c;
  --muted: #66604f;
  --brand: #5a4227;
  --brand-2: #8d6b43;
  --soft: #f8f5ef;
  --accent: #efe4d0;
  --shadow: 0 10px 25px rgba(0,0,0,.06);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Noto Sans KR', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.hero {
  background: linear-gradient(135deg, #332417, #6b5034);
  color: #fff;
  padding: 40px 0 34px;
}
.badge {
  display: inline-block; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px; padding: 8px 14px; font-size: 13px; margin-bottom: 14px;
}
h1 { margin: 0; font-size: clamp(30px, 4vw, 46px); }
.subtitle { margin: 8px 0 0; opacity: .92; font-size: 16px; }
.topnav { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.navwrap { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 0; }
.navbtn {
  border: 1px solid var(--line); background: #fff; color: var(--brand); padding: 10px 16px;
  border-radius: 999px; cursor: pointer; font-weight: 700;
}
.navbtn.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.main { padding: 24px 0 36px; }
.panel { display: none; }
.panel.active { display: block; }
.grid { display: grid; gap: 18px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 22px;
  box-shadow: var(--shadow);
}
h2 { margin: 0 0 14px; font-size: 24px; color: var(--brand); }
.subhead { margin: 18px 0 10px; color: var(--brand-2); font-size: 18px; }
.notice, .help, .softbox {
  background: var(--soft); border: 1px solid #eadfce; border-radius: 16px; padding: 14px 16px;
}
.help { color: var(--muted); font-size: 14px; }
.softbox h3 { margin-top: 0; margin-bottom: 10px; color: var(--brand); }
.simple-list { margin: 0; padding-left: 18px; color: var(--muted); }
.list { display: grid; gap: 12px; }
.item, .person-card, .source-item {
  border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; background: #fff;
}
.item strong, .person-card strong { display: block; margin-bottom: 5px; }
.muted { color: var(--muted); }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 18px; }
.stat {
  background: var(--soft); border: 1px solid #eadfce; border-radius: 18px; padding: 16px; text-align: center;
}
.stat .v { font-size: 26px; font-weight: 800; color: var(--brand); }
.tree { display: grid; gap: 12px; margin-top: 14px; }
.node {
  border-left: 4px solid var(--brand); background: #fff; border-radius: 0 16px 16px 0; padding: 12px 14px;
  border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: pointer;
}
.node small { display: inline-block; margin-top: 6px; color: var(--muted); }
.verify { display: inline-block; font-size: 12px; padding: 3px 8px; border-radius: 999px; margin-left: 6px; }
.verify.public { background: #e6f4ea; color: #197333; }
.verify.family { background: #e8f0fe; color: #1a73e8; }
.verify.needs_review { background: #fce8e6; color: #c5221f; }
.position-box { margin-top: 16px; padding: 14px 16px; border-radius: 16px; background: var(--accent); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
label { display: block; font-weight: 700; color: var(--brand); font-size: 14px; }
input, select, textarea {
  width: 100%; margin-top: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px;
  font: inherit; background: #fff;
}
textarea { min-height: 96px; resize: vertical; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
button.primary, button.secondary {
  border-radius: 12px; padding: 11px 16px; cursor: pointer; font: inherit; font-weight: 700;
}
button.primary { background: var(--brand); color: #fff; border: 1px solid var(--brand); }
button.secondary { background: #fff; color: var(--brand); border: 1px solid var(--line); }
.media-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px;
}
.media-card {
  border: 1px solid var(--line); background: #fff; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow);
}
.media-frame {
  background: #111; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.media-frame img, .media-frame video { width: 100%; height: 100%; object-fit: cover; }
.media-body { padding: 14px; }
.media-meta { color: var(--muted); font-size: 13px; margin-top: 6px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; }
th { background: var(--soft); color: var(--brand); }
.receipt-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.receipt-card { border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: #fff; }
.receipt-card img { width: 100%; border-radius: 12px; margin-top: 10px; }
.link-list { display: grid; gap: 12px; }
.source-item a { color: var(--brand); font-weight: 800; text-decoration: none; }
.footer { padding: 20px 0 32px; color: var(--muted); font-size: 14px; }
.mt-12 { margin-top: 12px; }
.mt-18 { margin-top: 18px; }
.block { display: block; }
@media (max-width: 900px) {
  .cols-2, .form-row, .stat-row, .media-grid, .receipt-grid { grid-template-columns: 1fr; }
}


.admin-grid { align-items: start; }
.admin-media-list { display: grid; gap: 14px; }
.admin-item {
  display: grid; grid-template-columns: 220px 1fr; gap: 14px;
  border: 1px solid var(--line); background: #fff; border-radius: 18px; padding: 14px;
}
.admin-preview {
  background: #111; border-radius: 14px; overflow: hidden; aspect-ratio: 4 / 3;
  display: flex; align-items: center; justify-content: center;
}
.admin-preview img, .admin-preview video { width: 100%; height: 100%; object-fit: cover; }
.admin-fields { display: grid; gap: 10px; }
.admin-meta { color: var(--muted); font-size: 13px; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 900px) {
  .admin-item { grid-template-columns: 1fr; }
}
