@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600&family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --bg:        #f5f0e8;
  --bg2:       #ede6d6;
  --bg3:       #e4dcc8;
  --bg4:       #f9f6f0;
  --border:    #c8b99a;
  --border2:   #d4c8b0;
  --gold:      #8b6914;
  --gold-lt:   #a07c20;
  --gold-dk:   #6b5010;
  --text:      #2c1f0e;
  --text-mid:  #5c4030;
  --text-dim:  #8c7058;
  --red:       #b03030;
  --green:     #2a6030;
  --radius:    8px;
  --shadow:    0 4px 24px rgba(80,50,10,0.18);
  --shadow-sm: 0 2px 8px rgba(80,50,10,0.10);
}

* { margin:0; padding:0; box-sizing:border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  min-height: 100vh;
}

/* ── Pages ─────────────────────────────────────────────── */
.page { display: none; }
.page.active { display: block; }

/* ── LOGIN ──────────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0e8d0 0%, #e8dcc0 50%, #ddd0b0 100%);
}

.login-card {
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 44px 46px;
  width: 370px;
  box-shadow: var(--shadow);
}

.login-title {
  font-family: 'Cinzel', serif;
  font-size: 21px;
  color: var(--gold);
  letter-spacing: .16em;
  text-align: center;
  margin-bottom: 6px;
}

.login-sub {
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
  font-style: italic;
  margin-bottom: 30px;
  font-family: 'Cormorant Garamond', serif;
}

/* ── TOP NAV ────────────────────────────────────────────── */
#topnav {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  height: 54px;
  background: var(--bg2);
  border-bottom: 2px solid var(--border);
  position: sticky; top: 0; z-index: 50;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  min-width: 0;
}
#topnav::-webkit-scrollbar { display: none; }

.nav-brand {
  font-family: 'Cinzel', serif;
  font-size: 15px;
  color: var(--gold);
  letter-spacing: .12em;
  flex-shrink: 0;
}

.nav-tabs {
  display: flex;
  gap: 2px;
  flex: 1;
}

.nav-tab {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  padding: 6px 18px;
  border-radius: 6px;
  cursor: pointer;
  transition: all .15s;
}
.nav-tab:hover { background: var(--bg3); color: var(--text-mid); }
.nav-tab.active { background: var(--gold); color: #fff; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-user {
  font-size: 12px;
  color: var(--text-dim);
  font-style: italic;
}

/* ── TABS ───────────────────────────────────────────────── */
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── TOOLBAR ────────────────────────────────────────────── */
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border2);
  position: sticky; top: 54px; z-index: 40;
}

.search-box {
  flex: 1;
  max-width: 320px;
  background: var(--bg4);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 13px;
  outline: none;
  transition: border-color .15s;
}
.search-box:focus { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(139,105,20,.12); }

.sort-wrap { display: flex; align-items: center; gap: 4px; }

.count-badge {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-dim);
  background: var(--bg3);
  padding: 4px 12px;
  border-radius: 10px;
  border: 1px solid var(--border2);
  font-weight: 500;
}

/* ── TABLE ──────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  padding: 16px 22px 60px;
}

#member-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--bg4);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border2);
}

#member-table thead tr {
  background: var(--bg2);
}

#member-table th {
  text-align: left;
  padding: 11px 14px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold-dk);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

#member-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border2);
  vertical-align: top;
  color: var(--text);
}

#member-table tbody tr:last-child td { border-bottom: none; }
#member-table tbody tr:hover td { background: var(--bg); }
#member-table tr.deceased td { opacity: .6; }

.col-name  { min-width: 150px; }
.col-gen   { width: 52px; text-align: center; }
.col-gender{ width: 76px; }
.col-dob   { width: 98px; }
.col-dod   { width: 98px; }
.col-father{ min-width: 120px; }
.col-gf    { min-width: 120px; }
.col-contact{ min-width: 130px; }
.col-actions{ width: 90px; white-space: nowrap; }

.cell-name { font-weight: 600; color: var(--text); }
.cell-gen {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  color: var(--gold);
  text-align: center;
  display: block;
}
.cell-dod { color: var(--text-dim); font-style: italic; }
.cell-contact { font-size: 11px; color: var(--text-mid); line-height: 1.7; }
.cell-contact a { color: var(--green); text-decoration: none; }
.cell-contact a:hover { text-decoration: underline; }

.gender-badge {
  display: inline-block;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 8px;
  font-weight: 600;
}
.gender-male   { background: #ddeeff; color: #2255aa; border: 1px solid #bbd0ee; }
.gender-female { background: #fde8f5; color: #882266; border: 1px solid #eec0da; }
.gender-other  { background: #eeeedd; color: #666644; border: 1px solid #ccccaa; }

.table-empty {
  text-align: center;
  padding: 48px;
  color: var(--text-dim);
  font-style: italic;
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
}
.table-loading {
  text-align: center;
  padding: 32px;
  color: var(--text-dim);
  font-style: italic;
}

/* ── BUTTONS ────────────────────────────────────────────── */
.btn-primary {
  background: var(--gold);
  color: #fff;
  border: none;
  padding: 9px 22px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all .15s;
  width: 100%;
}
.btn-primary:hover { background: var(--gold-lt); }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--gold-dk);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
}
.btn-ghost:hover { background: var(--bg3); border-color: var(--gold); }

.btn-danger {
  background: var(--red);
  border: none;
  color: white;
  padding: 9px 22px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}
.btn-danger:hover { background: #901818; }

.btn-icon {
  background: var(--bg3);
  border: 1px solid var(--border2);
  color: var(--text-dim);
  width: 30px; height: 30px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.btn-icon:hover { color: var(--gold); border-color: var(--gold); }

.btn-edit, .btn-del {
  background: none;
  border: 1px solid var(--border2);
  color: var(--text-dim);
  padding: 3px 9px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  transition: all .12s;
  margin-right: 2px;
}
.btn-edit:hover { border-color: var(--gold); color: var(--gold-dk); background: rgba(139,105,20,.06); }
.btn-del:hover  { border-color: var(--red); color: var(--red); background: rgba(176,48,48,.06); }

/* ── FORMS ──────────────────────────────────────────────── */
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 5px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--bg4);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 11px;
  border-radius: 6px;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color .15s;
  resize: vertical;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(139,105,20,.10);
}
.field.required label::after { content: ' *'; color: var(--gold); }

.select-sm {
  background: var(--bg4);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 12px;
  outline: none;
}

/* ── AUTOCOMPLETE ───────────────────────────────────────── */
.autocomplete-wrap { position: relative; }
.autocomplete-drop {
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: 6px;
  z-index: 200;
  max-height: 200px;
  overflow-y: auto;
  box-shadow: var(--shadow);
}
.autocomplete-drop.hidden { display: none; }
.ac-item {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border2);
}
.ac-item:last-child { border-bottom: none; }
.ac-item:hover { background: var(--bg); }
.ac-gen  { font-size: 10px; color: var(--text-dim); flex-shrink: 0; }
.ac-main { display: flex; flex-direction: column; gap: 1px; flex: 1; }
.ac-name { font-size: 13px; color: var(--text); font-weight: 500; }
.ac-gf   { font-size: 11px; color: var(--text-dim); font-style: italic; }

/* ── MODAL ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(80,50,10,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(2px);
}
.modal-overlay.hidden { display: none; }

.modal {
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 100%;
  max-width: 920px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}
.modal-sm { max-width: 420px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 26px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--bg2);
  border-radius: 12px 12px 0 0;
}
.modal-header h2 {
  font-family: 'Cinzel', serif;
  font-size: 16px;
  color: var(--gold-dk);
  letter-spacing: .08em;
}
.modal-close {
  background: none; border: none; color: var(--text-dim);
  font-size: 22px; cursor: pointer; line-height: 1; padding: 2px 6px;
  border-radius: 4px; transition: all .12s;
}
.modal-close:hover { background: var(--bg3); color: var(--text); }

.modal-body {
  padding: 22px 26px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 26px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--bg2);
  border-radius: 0 0 12px 12px;
}
.modal-footer .btn-primary { width: auto; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 26px;
}
@media (max-width: 768px) { .form-grid { grid-template-columns: 1fr; } }

.section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-dk);
  margin-bottom: 14px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border2);
}

/* ── MESSAGES ───────────────────────────────────────────── */
.err-msg {
  background: #fde8e8;
  border: 1px solid #e8b0b0;
  color: #8b2020;
  padding: 9px 13px;
  border-radius: 6px;
  font-size: 13px;
  margin-top: 12px;
}
.err-msg.hidden { display: none; }

/* ── TREE CONTAINER ─────────────────────────────────────── */
#tree-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* ── FILTER INPUTS ──────────────────────────────────────── */
.filter-wrap {
  display: flex;
  align-items: center;
  gap: 3px;
  position: relative;
}

.filter-box {
  background: var(--bg4);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  outline: none;
  width: 168px;
  transition: border-color .15s;
}
.filter-box:focus { border-color: var(--gold); }
.filter-box::placeholder { color: var(--text-dim); }

/* Active filter highlight */
.filter-box.active {
  border-color: var(--gold);
  background: rgba(139,105,20,.07);
  font-weight: 500;
}

.btn-clear {
  background: none;
  border: 1px solid var(--border2);
  color: var(--text-dim);
  width: 22px; height: 22px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: all .12s;
  flex-shrink: 0;
}
.btn-clear:hover { border-color: var(--red); color: var(--red); }
.btn-clear.hidden { display: none; }

/* ── SAVE & ADD MORE BUTTON ─────────────────────────────── */
.btn-secondary {
  background: transparent;
  border: 1.5px solid var(--gold);
  color: var(--gold-dk);
  padding: 9px 18px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.btn-secondary:hover {
  background: rgba(139,105,20,.10);
}

/* ── FILTER ACTIVE BADGE ON COUNT ───────────────────────── */
.count-badge.filtered {
  background: rgba(139,105,20,.12);
  border-color: var(--gold);
  color: var(--gold-dk);
  font-weight: 600;
}

/* ══════════════════════════════════════════════════
   TREE VIEW OVERLAYS
══════════════════════════════════════════════════ */

/* ── Tree search bar ─────────────────────────────── */
#tree-search-bar {
  position: absolute;
  top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 120;
  display: flex; align-items: center; gap: 8px;
  background: #fff;
  border-radius: 32px;
  padding: 11px 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,.18), 0 8px 32px rgba(0,0,0,.32);
  min-width: 320px;
}
.srch-icon { flex-shrink: 0; display: block; }
#tree-srch {
  background: none; border: none; outline: none;
  color: #1a1a1a; font-size: 15px;
  font-family: 'Inter', system-ui, sans-serif;
  flex: 1; min-width: 180px;
}
#tree-srch::placeholder { color: #aaa; font-size: 14px; }
/* hide browser's native × in search inputs */
#tree-srch::-webkit-search-cancel-button { display: none; }
.srch-clear-btn {
  background: none; border: none; cursor: pointer;
  color: #bbb; font-size: 20px; line-height: 1;
  padding: 0 2px; flex-shrink: 0;
}
.srch-clear-btn:hover { color: #555; }
.srch-sep { color: #ddd; font-size: 16px; flex-shrink: 0; }
.srch-sep.hidden { display: none; }
.srch-nav {
  background: none; border: none; cursor: pointer;
  color: #555; font-size: 22px; line-height: 1;
  padding: 0 1px; flex-shrink: 0; font-weight: 300;
}
.srch-nav:hover { color: #111; }
.srch-nav.hidden { display: none; }
.srch-count {
  font-size: 12px; color: #666;
  font-family: 'Inter', system-ui, sans-serif;
  white-space: nowrap; font-weight: 500; flex-shrink: 0;
}
.srch-count.hidden { display: none; }

/* ── Breadcrumb trail ────────────────────────────── */
#tree-breadcrumb {
  position: absolute;
  bottom: 14px; left: 50%; transform: translateX(-50%);
  z-index: 120;
  background: rgba(6,14,4,.94);
  border: 1px solid rgba(200,160,48,.24);
  border-radius: 10px;
  padding: 8px 16px 8px 14px;
  display: flex; align-items: center; gap: 10px;
  max-width: 90vw; overflow: hidden;
  box-shadow: 0 4px 18px rgba(0,0,0,.6);
}
#tree-breadcrumb.hidden { display: none; }
#tree-bc-content {
  font-size: 12px; color: #a8c888;
  font-family: 'Cormorant Garamond', Georgia, serif;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#tree-bc-content .bc-root { color: var(--gold); font-weight: 600; }
#tree-bc-content .bc-sep  { color: rgba(200,160,48,.4); margin: 0 4px; }
#tree-bc-content .bc-sel  { color: #E8C060; font-weight: 700; }
#tree-bc-content .bc-name { color: #a8c888; }
#tree-bc-close {
  background: none; border: none; color: rgba(200,160,48,.5);
  font-size: 16px; cursor: pointer; flex-shrink: 0; line-height: 1;
}
#tree-bc-close:hover { color: var(--gold); }

/* ── Branch legend ───────────────────────────────── */
#tree-legend {
  position: absolute;
  bottom: 14px; left: 14px; z-index: 120;
  background: rgba(6,14,4,.90);
  border: 1px solid rgba(200,160,48,.20);
  border-radius: 8px;
  padding: 10px 12px;
  min-width: 130px;
}
.legend-title {
  font-family: 'Cinzel', serif; font-size: 8px;
  letter-spacing: .16em; color: rgba(200,160,48,.5);
  margin-bottom: 8px;
}
.legend-item {
  display: flex; align-items: center; gap: 7px;
  margin-bottom: 5px; cursor: pointer;
  border-radius: 4px; padding: 2px 4px;
  transition: background .15s;
}
.legend-item:hover { background: rgba(200,160,48,.08); }
.legend-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.legend-label {
  font-size: 11px; color: #9ab880;
  font-family: 'Cormorant Garamond', Georgia, serif;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100px;
}
.legend-count {
  font-size: 9px; color: rgba(200,160,48,.45);
  margin-left: auto; font-family: 'Cinzel', serif;
}

/* ── Adoption key ───────────────────────────────── */
#tree-adoption-key {
  position: absolute;
  top: 54px; left: 14px; z-index: 120;
  background: rgba(6,14,4,.90);
  border: 1px solid rgba(200,160,48,.18);
  border-radius: 7px;
  padding: 6px 10px;
  display: flex; flex-direction: column; gap: 4px;
}
.ak-item {
  display: flex; align-items: center; gap: 6px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 10px; color: rgba(200,180,120,.70);
  white-space: nowrap;
}
.ak-item svg { flex-shrink: 0; }

/* ── Print Poster button ─────────────────────────── */
#tree-print-btn {
  position: absolute;
  top: 14px; right: 14px; z-index: 120;
  background: rgba(6,14,4,.92);
  border: 1px solid rgba(200,160,48,.28);
  border-radius: 8px;
  padding: 7px 14px;
  color: rgba(200,160,48,.70);
  font-family: 'Cinzel', serif;
  font-size: 11px; letter-spacing: .08em;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0,0,0,.55);
  transition: color .18s, border-color .18s, background .18s;
  white-space: nowrap;
}
#tree-print-btn:hover {
  color: var(--gold);
  border-color: rgba(200,160,48,.55);
  background: rgba(10,20,6,.96);
}

/* ── Language toggle ─────────────────────────────── */
#tree-lang-toggle {
  position: absolute;
  top: 54px; right: 14px; z-index: 120;
  display: flex;
  background: rgba(6,14,4,.92);
  border: 1px solid rgba(200,160,48,.28);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0,0,0,.55);
}
.lang-btn {
  background: none; border: none;
  padding: 6px 13px;
  color: rgba(200,160,48,.55);
  font-family: 'Cinzel', serif;
  font-size: 11px; letter-spacing: .06em;
  cursor: pointer;
  transition: color .15s, background .15s;
}
.lang-btn:first-child { border-right: 1px solid rgba(200,160,48,.18); }
.lang-btn.active {
  background: rgba(200,160,48,.14);
  color: var(--gold);
}
.lang-btn:hover:not(.active) { color: rgba(200,160,48,.80); }

/* ── Mini-map ────────────────────────────────────── */
#tree-mmap {
  position: absolute;
  bottom: 14px; right: 14px; z-index: 120;
  background: rgba(6,14,4,.88);
  border: 1px solid rgba(200,160,48,.18);
  border-radius: 6px; overflow: hidden;
  cursor: pointer;
}
#tree-mmap:hover { border-color: rgba(200,160,48,.4); }
.mmap-vp {
  fill: none; stroke: #C8A030; stroke-width: 1.5; opacity: .65;
  pointer-events: none;
}

/* ── Side panel ──────────────────────────────────── */
#tree-panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 280px; z-index: 130;
  background: rgba(5,12,4,.97);
  border-left: 1px solid rgba(200,160,48,.16);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.25,.8,.25,1);
}
#tree-panel.open { transform: translateX(0); }
#tree-panel-header {
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(200,160,48,.12);
  flex-shrink: 0; position: relative;
}
#tree-panel-name {
  font-family: 'Cinzel', serif; font-size: 15px;
  color: #E8C060; line-height: 1.3;
  margin-bottom: 3px; padding-right: 24px;
}
#tree-panel-meta {
  font-size: 11px; color: #3a5828; font-style: italic;
}
#tree-panel-close {
  position: absolute; top: 13px; right: 12px;
  background: none; border: none; color: rgba(200,160,48,.5);
  font-size: 20px; cursor: pointer; line-height: 1;
}
#tree-panel-close:hover { color: var(--gold); }
#tree-panel-body {
  flex: 1; overflow-y: auto; padding: 12px 14px;
}
#tree-panel-body::-webkit-scrollbar { width: 3px; }
#tree-panel-body::-webkit-scrollbar-thumb { background: rgba(200,160,48,.2); border-radius: 2px; }
.tp-section { margin-bottom: 16px; }
.tp-section-title {
  font-family: 'Cinzel', serif; font-size: 8px;
  letter-spacing: .14em; text-transform: uppercase;
  color: rgba(200,160,48,.5); margin-bottom: 8px;
  padding-bottom: 4px; border-bottom: 1px solid rgba(200,160,48,.10);
}
.tp-row {
  display: flex; gap: 8px; margin-bottom: 5px;
  font-size: 12px; line-height: 1.5;
}
.tp-key { color: #3a5828; min-width: 80px; flex-shrink: 0; }
.tp-val { color: #c8c090; }
.tp-member {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 8px; border-radius: 5px;
  cursor: pointer; margin-bottom: 3px;
  transition: background .12s;
}
.tp-member:hover { background: rgba(200,160,48,.08); }
.tp-member-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.tp-member-name { font-size: 12px; color: #b8c890; }
.tp-member-gen  { font-size: 10px; color: #3a5828; margin-left: auto; }

/* ── Tree container must be relative for absolute children ── */
#tab-tree {
  position: relative;
  height: calc(100vh - 54px);
  overflow: hidden;
}

/* ── Generic hidden utility ─────────────────────────────── */
.hidden { display: none; }

/* ── Hover tooltip ───────────────────────────────────────── */
#tip {
  position: fixed;
  pointer-events: none;
  z-index: 250;
  display: none;
  background: rgba(6,14,4,.95);
  border: 1px solid rgba(200,160,48,.22);
  border-radius: 8px;
  padding: 10px 14px;
  min-width: 180px;
  max-width: 260px;
  box-shadow: 0 4px 18px rgba(0,0,0,.7);
}
#tip.show { display: block; }
#tpn {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  color: #E8C060;
  margin-bottom: 6px;
  font-weight: 600;
}
#tpi { font-size: 11px; color: #9ab880; line-height: 1.7; }
#tpg { font-size: 10px; color: rgba(200,160,48,.5); margin-top: 5px; font-family: 'Cinzel', serif; }
