@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Devanagari:wght@400;500;600;700;800&family=Poppins:wght@400;500;600;700&display=swap');

:root{
  --maroon:#7a1024;
  --maroon-dark:#520a19;
  --gold:#e8b04b;
  --gold-light:#f6d98b;
  --orange:#e8622c;
  --cream:#fff8ec;
  --text:#2a1810;
  --text-soft:#6b5245;
  --card-bg:#ffffff;
  --shadow:0 8px 24px rgba(122,16,36,0.15);
  --radius:18px;
}

*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0;
  font-family:'Noto Sans Devanagari','Poppins',sans-serif;
  background:var(--cream);
  color:var(--text);
  min-height:100vh;
}

img{max-width:100%;display:block;}
a{text-decoration:none;color:inherit;}
button{font-family:inherit;}

/* ---------- Top bar ---------- */
.topbar{
  background:linear-gradient(135deg,var(--maroon) 0%,var(--maroon-dark) 100%);
  color:#fff;
  padding:14px 16px;
  display:flex;
  align-items:center;
  gap:12px;
  position:sticky;
  top:0;
  z-index:50;
  box-shadow:0 2px 10px rgba(0,0,0,0.2);
}
.topbar .back-link{
  font-size:22px;
  width:36px;height:36px;
  display:flex;align-items:center;justify-content:center;
  border-radius:50%;
  background:rgba(255,255,255,0.12);
  flex-shrink:0;
}
.topbar h1{
  font-size:18px;
  margin:0;
  font-weight:700;
  line-height:1.3;
}
.topbar .sub{
  font-size:12px;
  opacity:0.85;
  margin-top:2px;
}

/* ---------- Hero / Home ---------- */
.hero{
  position:relative;
  background:linear-gradient(160deg,var(--maroon) 0%, var(--maroon-dark) 55%, #33060f 100%);
  color:#fff;
  padding:38px 20px 90px;
  text-align:center;
  overflow:hidden;
}
.hero::before,.hero::after{
  content:"";
  position:absolute;
  border-radius:50%;
  background:radial-gradient(circle,var(--gold) 0%, transparent 70%);
  opacity:0.35;
}
.hero::before{width:220px;height:220px;top:-80px;left:-60px;}
.hero::after{width:260px;height:260px;bottom:-120px;right:-80px;}

.hero-mock{
  width:112px;height:112px;
  margin:0 auto 16px;
  border-radius:50%;
  background:linear-gradient(135deg,var(--gold) 0%,var(--orange) 100%);
  display:flex;align-items:center;justify-content:center;
  font-size:52px;
  border:4px solid var(--gold-light);
  box-shadow:0 6px 18px rgba(0,0,0,0.35);
  position:relative;
  z-index:2;
  overflow:hidden;
}
.hero-mock img{
  width:100%;height:100%;
  object-fit:cover;
}
.hero h1{
  font-size:26px;
  margin:0 0 6px;
  font-weight:800;
  position:relative;z-index:2;
  text-shadow:0 2px 6px rgba(0,0,0,0.3);
}
.hero p{
  margin:0;
  font-size:14px;
  opacity:0.9;
  position:relative;z-index:2;
}
.hero .placeholder-note{
  margin-top:14px;
  display:inline-block;
  font-size:11px;
  background:rgba(255,255,255,0.14);
  padding:6px 12px;
  border-radius:20px;
  position:relative;z-index:2;
}

/* ---------- Dashboard grid ---------- */
.dashboard{
  max-width:520px;
  margin:-55px auto 0;
  padding:0 16px 40px;
  position:relative;
  z-index:5;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}
.dash-btn{
  background:var(--card-bg);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:22px 12px 18px;
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  gap:10px;
  border:1px solid rgba(122,16,36,0.06);
  transition:transform .15s ease, box-shadow .15s ease;
  cursor:pointer;
}
.dash-btn:active{transform:scale(0.96);}
.dash-btn .icon-wrap{
  width:58px;height:58px;
  border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  font-size:28px;
  background:linear-gradient(135deg,var(--gold-light),var(--gold));
  color:var(--maroon-dark);
  box-shadow:inset 0 0 0 3px rgba(255,255,255,0.5);
}
.dash-btn.c2 .icon-wrap{background:linear-gradient(135deg,#ffd9b8,var(--orange));color:#fff;}
.dash-btn.c3 .icon-wrap{background:linear-gradient(135deg,#f3c6c6,#c0293f);color:#fff;}
.dash-btn.c4 .icon-wrap{background:linear-gradient(135deg,#c9e4d8,#3f8f6b);color:#fff;}
.dash-btn.c5 .icon-wrap{background:linear-gradient(135deg,#dcd3f0,#6a4c9c);color:#fff;}
.dash-btn.c6 .icon-wrap{background:linear-gradient(135deg,#e3f1cf,#5b8c2a);color:#fff;}
.dash-btn.soon{opacity:0.55;}
.dash-btn .label{
  font-weight:700;
  font-size:14.5px;
  color:var(--maroon-dark);
  line-height:1.35;
}
.dash-btn .tag{
  font-size:10px;
  color:var(--text-soft);
  background:#f1e6d4;
  padding:2px 8px;
  border-radius:10px;
}

.footer-note{
  text-align:center;
  font-size:11.5px;
  color:var(--text-soft);
  padding:0 24px 8px;
}

.footer-credit{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:0 24px 28px;
}
.footer-credit .credit-label{
  font-size:10px;
  font-weight:600;
  letter-spacing:0.06em;
  text-transform:uppercase;
  color:var(--text-soft);
}
.footer-credit .credit{
  display:inline-flex;
  align-items:center;
  padding:4px 9px;
  border-radius:8px;
  background:#fff;
  border:1px solid rgba(122,16,36,0.12);
  box-shadow:var(--shadow);
  transition:transform 0.15s ease;
}
.footer-credit .credit:hover{ transform:translateY(-1px); }
.footer-credit .credit:active{ transform:translateY(0); }
.footer-credit .credit-logo{ display:block; height:16px; width:auto; }

/* ---------- Generic page container ---------- */
.page{
  max-width:640px;
  margin:0 auto;
  padding:16px;
}

/* ---------- Members page ---------- */
.search-wrap{
  position:sticky;
  top:66px;
  background:var(--cream);
  padding:10px 0 12px;
  z-index:40;
}
.search-box{
  display:flex;
  align-items:center;
  background:#fff;
  border-radius:30px;
  box-shadow:var(--shadow);
  padding:10px 16px;
  gap:8px;
}
.search-box input{
  border:none;
  outline:none;
  flex:1;
  font-size:15px;
  font-family:inherit;
  background:transparent;
  color:var(--text);
}
.search-box .sicon{font-size:17px;color:var(--maroon);}
.result-count{
  font-size:12px;
  color:var(--text-soft);
  padding:4px 6px 0;
}

.member-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:10px;
}
.member-card{
  background:#fff;
  border-radius:14px;
  box-shadow:0 3px 10px rgba(122,16,36,0.08);
  padding:12px 14px;
  display:flex;
  align-items:flex-start;
  gap:12px;
}
.member-card .sr{
  width:30px;height:30px;
  border-radius:50%;
  background:var(--maroon);
  color:#fff;
  font-size:12px;
  font-weight:700;
  display:flex;align-items:center;justify-content:center;
  flex-shrink:0;
}
.member-info{flex:1;min-width:0;}
.member-info .mname{
  font-weight:700;
  font-size:14.5px;
  color:var(--maroon-dark);
  user-select:none;
  -webkit-user-select:none;
}
.member-info .mvillage{
  font-size:12px;
  color:var(--text-soft);
  margin-top:2px;
  user-select:none;
  -webkit-user-select:none;
}
.member-info .mmobile{
  font-size:12.5px;
  color:var(--text-soft);
  margin-top:3px;
  letter-spacing:0.3px;
  user-select:none;
  -webkit-user-select:none;
  -webkit-touch-callout:none;
}
.contact-actions{
  display:flex;
  gap:8px;
  flex-shrink:0;
}
.contact-actions a{
  width:38px;height:38px;
  border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  font-size:17px;
  color:#fff;
  box-shadow:0 2px 6px rgba(0,0,0,0.18);
}
.contact-actions .call-btn{background:#2f8f4e;}
.contact-actions .wa-btn{background:#25D366;}
/* keeps the alternate row's lone call button under the call button above it */
.contact-actions .spacer{width:38px;height:38px;}

/* One row per number (WhatsApp, then optional alternate), buttons beside it */
.num-row{display:flex;align-items:center;gap:8px;margin-top:8px;}
.num-row + .num-row{padding-top:8px;border-top:1px dashed #eadfd0;}
.num-text{flex:1;min-width:0;}
.num-label{
  font-size:10.5px;font-weight:600;color:var(--text-soft);
  display:flex;align-items:center;gap:4px;
  user-select:none;-webkit-user-select:none;
}
.num-label .dot{width:6px;height:6px;border-radius:50%;background:#25D366;}
.num-label.alt .dot{background:#2f8f4e;}
.num-row .mmobile{
  margin-top:1px;
  font-family:'Poppins',sans-serif;font-size:13.5px;font-weight:600;color:var(--text);
}
.no-results{
  text-align:center;
  padding:40px 10px;
  color:var(--text-soft);
  font-size:14px;
}

/* ---------- History page ---------- */
.history-list{display:flex;flex-direction:column;gap:10px;}
.history-item{
  background:#fff;
  border-radius:14px;
  box-shadow:0 3px 10px rgba(122,16,36,0.08);
  padding:12px 14px;
  display:flex;
  align-items:center;
  gap:12px;
}
.history-item .hsr{
  width:30px;height:30px;
  border-radius:50%;
  background:var(--maroon);
  color:#fff;
  font-size:12px;
  font-weight:700;
  display:flex;align-items:center;justify-content:center;
  flex-shrink:0;
}
.history-item .hinfo{flex:1;min-width:0;font-size:13px;color:var(--text);}
.history-item .hname{font-weight:700;color:var(--maroon-dark);}
.history-item .hvillage{font-size:11.5px;color:var(--text-soft);margin-top:2px;}
.history-item .hyear{
  font-weight:700;
  font-size:15px;
  color:var(--maroon);
  flex-shrink:0;
  min-width:44px;
  text-align:right;
}

/* ---------- Gallery ---------- */
.collage{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:6px;
  margin-top:10px;
}
.collage .cell{
  aspect-ratio:1/1;
  border-radius:10px;
  overflow:hidden;
  cursor:pointer;
  position:relative;
}
.collage .cell img{width:100%;height:100%;object-fit:cover;transition:transform .2s;}
.collage .cell:active img{transform:scale(0.94);}
.collage .cell-year{
  position:absolute;left:6px;bottom:6px;
  background:rgba(107,15,26,0.88);color:#fff;
  font-size:12px;font-weight:700;padding:2px 8px;border-radius:10px;
}
#collage{display:block;}
#collage .group-grid{display:grid;}
.photo-group{margin-top:18px;}
.group-head{
  display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px;
  border-bottom:2px solid #c9a24b;padding-bottom:4px;
}
.group-title{font-weight:700;font-size:16px;color:#6b0f1a;}
.group-village{font-weight:400;color:#7a5a50;font-size:14px;}
.group-years{display:flex;gap:4px;flex-wrap:wrap;}
.year-chip{background:#6b0f1a;color:#fff;font-size:12px;font-weight:700;padding:2px 9px;border-radius:10px;}

.modal-overlay{
  position:fixed;inset:0;
  background:rgba(20,5,8,0.9);
  display:none;
  /* Column, so the caption sits UNDER the photo. As a row it was a flex sibling
     of the image, left with whatever width the photo did not take — which on a
     phone is almost none, so the caption broke to one word per line and ran off
     the edge. The close and nav buttons are absolutely positioned, so the
     direction does not affect them. */
  flex-direction:column;
  align-items:center;justify-content:center;
  z-index:100;
  padding:20px;
}
.modal-overlay.open{display:flex;}
.modal-overlay img{
  max-width:100%;
  /* Leaves room below for the caption now that the two are stacked; at 80vh a
     two-line caption could be pushed off a short screen. */
  max-height:76vh;
  border-radius:10px;
  box-shadow:0 10px 40px rgba(0,0,0,0.5);
}
.modal-close{
  position:absolute;
  top:18px;right:18px;
  width:40px;height:40px;
  border-radius:50%;
  background:rgba(255,255,255,0.15);
  color:#fff;
  font-size:22px;
  display:flex;align-items:center;justify-content:center;
  border:none;
}
.modal-nav{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:44px;height:44px;
  border-radius:50%;
  background:rgba(255,255,255,0.15);
  color:#fff;
  font-size:22px;
  border:none;
  display:flex;align-items:center;justify-content:center;
}
.modal-nav.prev{left:14px;}
.modal-nav.next{right:14px;}

.modal-caption{
  color:#fff;
  text-align:center;
  font-size:13px;
  line-height:1.5;
  margin-top:12px;
  max-width:min(90vw, 640px);
  /* Clear of the nav arrows, which sit 14px from each edge and are 44px wide. */
  padding:0 60px;
  /* Never squeezed by a tall photo — the caption is the shorter of the two. */
  flex-shrink:0;
}

/* Disable long-press callout / drag-copy on protected text globally within member cards */
.protected{
  -webkit-user-select:none;
  user-select:none;
  -webkit-touch-callout:none;
}

/* ---------- Loading / floating action button ---------- */
.loading-note{
  text-align:center;
  color:var(--text-soft);
  font-size:13px;
  padding:24px 0;
}
.fab{
  position:fixed;
  right:20px;
  bottom:24px;
  width:56px;height:56px;
  border-radius:50%;
  background:linear-gradient(135deg,var(--orange),var(--maroon));
  color:#fff;
  font-size:24px;
  border:none;
  box-shadow:0 6px 18px rgba(122,16,36,0.4);
  display:flex;align-items:center;justify-content:center;
  z-index:60;
}
.fab:active{transform:scale(0.94);}

/* ---------- Submission forms (add member / upload photo) ---------- */
.form-overlay{align-items:flex-end;}
.form-sheet{
  background:var(--cream);
  width:100%;
  max-width:480px;
  border-radius:22px 22px 0 0;
  padding:22px 20px 28px;
  position:relative;
  max-height:88vh;
  overflow-y:auto;
}
@media (min-width:600px){
  .form-overlay{align-items:center;}
  .form-sheet{border-radius:22px;}
}
.form-sheet h2{
  margin:0 0 6px;
  font-size:19px;
  color:var(--maroon-dark);
}
.form-hint{
  font-size:12px;
  color:var(--text-soft);
  margin:0 0 16px;
}
.form-sheet .modal-close{
  position:absolute;
  top:14px;right:14px;
  width:32px;height:32px;
  background:rgba(122,16,36,0.1);
  color:var(--maroon-dark);
  font-size:16px;
}
#addMemberForm label,
#uploadForm label{
  display:block;
  font-size:12.5px;
  font-weight:600;
  color:var(--maroon-dark);
  margin-bottom:14px;
}
#addMemberForm input,
#uploadForm input{
  display:block;
  width:100%;
  margin-top:6px;
  padding:11px 13px;
  border-radius:10px;
  border:1px solid #e2d3c0;
  font-size:14px;
  font-family:inherit;
  background:#fff;
  color:var(--text);
}
#addMemberForm input:focus,
#uploadForm input:focus{
  outline:2px solid var(--gold);
  border-color:var(--gold);
}
.form-msg{
  min-height:18px;
  font-size:12.5px;
  margin-bottom:10px;
}
.form-msg.error{color:#c0293f;font-weight:600;}
.form-msg.success{color:#2f8f4e;font-weight:600;}
.form-submit{
  width:100%;
  padding:13px;
  border:none;
  border-radius:12px;
  background:linear-gradient(135deg,var(--maroon),var(--maroon-dark));
  color:#fff;
  font-weight:700;
  font-size:15px;
  font-family:inherit;
}
.form-submit:disabled{opacity:0.6;}

/* ---------- Info nav (देव बसविण्याबद्दल माहिती hub) ---------- */
.info-nav{display:flex;flex-direction:column;gap:12px;margin-top:6px;}
.info-nav-item{
  display:flex;
  align-items:center;
  gap:14px;
  background:var(--card-bg);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:16px 18px;
  border:1px solid rgba(122,16,36,0.06);
}
.info-nav-item .inum{
  width:40px;height:40px;flex-shrink:0;
  border-radius:50%;
  background:linear-gradient(135deg,var(--gold-light),var(--gold));
  color:var(--maroon-dark);
  display:flex;align-items:center;justify-content:center;
  font-weight:800;font-size:16px;
}
.info-nav-item .itext{flex:1;min-width:0;}
.info-nav-item .ititle{font-weight:700;font-size:16px;color:var(--maroon-dark);}
.info-nav-item .isub{font-size:11.5px;color:var(--text-soft);margin-top:2px;}
.info-nav-item .iarrow{margin-left:auto;color:var(--maroon);font-size:20px;flex-shrink:0;}

/* ---------- Content / article pages ---------- */
.content-card{
  background:var(--card-bg);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:20px 18px;
  border:1px solid rgba(122,16,36,0.06);
  margin-bottom:16px;
}
.content-card h2{
  font-size:16px;
  color:var(--maroon-dark);
  margin:0 0 10px;
  padding-bottom:8px;
  border-bottom:2px solid var(--gold-light);
}
.content-card h2:not(:first-child){margin-top:22px;}
.content-card p{font-size:14.5px;line-height:1.75;color:var(--text);margin:0 0 12px;}
.content-card ol,.content-card ul{padding-left:20px;margin:0 0 12px;}
.content-card li{font-size:14.5px;line-height:1.7;color:var(--text);margin-bottom:8px;}
.content-photo{margin-top:4px;margin-bottom:16px;}
.content-photo img{border-radius:14px;box-shadow:var(--shadow);width:100%;object-fit:cover;}
.content-photo .caption{text-align:center;font-size:12px;color:var(--text-soft);margin-top:8px;}

@media (min-width:600px){
  .dashboard{grid-template-columns:1fr 1fr;max-width:560px;}
}

/* ---------- Upcoming event (आगामी कार्यक्रम) ---------- */
.new-badge{
  position:absolute;top:16px;right:-36px;width:130px;text-align:center;
  transform:rotate(45deg);
  background:linear-gradient(135deg,#ff3b3b,#c0102a);
  color:#fff;font-family:'Poppins',sans-serif;font-weight:700;font-size:10.5px;letter-spacing:1px;
  padding:4px 0;box-shadow:0 2px 6px rgba(0,0,0,0.25);
  animation:newPulse 1.6s ease-in-out infinite;
}
@keyframes newPulse{0%,100%{filter:brightness(1)}50%{filter:brightness(1.25)}}
.dash-btn.event-tile{
  grid-column:1 / -1;
  position:relative;overflow:hidden;
  flex-direction:row;text-align:left;gap:16px;padding:18px 18px;
  background:linear-gradient(135deg,#fff8e6,#ffeec4);
  border:2px solid var(--gold);
}
.dash-btn.event-tile .icon-wrap{flex-shrink:0;background:linear-gradient(135deg,#ffb8b8,#c0102a);color:#fff;}
.dash-btn.event-tile .label{font-size:16px;}
.dash-btn.event-tile .ename{font-weight:700;font-size:14px;color:var(--orange);margin-top:2px;}
.dash-btn.event-tile .eplace{font-size:12px;color:var(--text-soft);margin-top:2px;}
.event-card{position:relative;overflow:hidden;border:2px solid var(--gold);}
.event-card .event-title{font-size:21px;font-weight:800;color:var(--maroon-dark);padding-right:40px;}
.event-card .event-sub{font-family:'Poppins',sans-serif;font-size:12px;color:var(--text-soft);margin-bottom:18px;}
.event-card .venue{line-height:1.8;}
.event-card .venue-en{font-size:12.5px;line-height:1.6;color:var(--text-soft);margin-top:-4px;}
.map-btn{
  display:block;text-align:center;margin-top:6px;
  background:linear-gradient(135deg,var(--maroon),var(--maroon-dark));
  color:#fff;font-weight:700;font-size:15px;padding:13px;border-radius:12px;
  box-shadow:var(--shadow);
}
.call-row{
  display:flex;align-items:center;gap:14px;margin:4px 0 12px;
  padding:12px 14px;border-radius:12px;background:#eaf7ef;border:1px solid #bfe3cc;
}
.call-circle{
  width:46px;height:46px;flex-shrink:0;border-radius:50%;
  background:linear-gradient(135deg,#34c46a,#1f8f4a);
  display:flex;align-items:center;justify-content:center;box-shadow:0 3px 8px rgba(31,143,74,0.35);
}
.call-text{display:flex;flex-direction:column;}
.call-label{font-size:12px;color:var(--text-soft);}
.call-num{font-family:'Poppins',sans-serif;font-weight:600;font-size:18px;color:#1f6f3c;letter-spacing:.5px;}
.date-list{display:flex;flex-direction:column;gap:10px;margin-bottom:6px;}
.date-row{display:flex;align-items:center;gap:14px;padding:10px 12px;border-radius:12px;background:#fff8ec;border:1px solid var(--gold-light);}
.date-box{
  width:52px;flex-shrink:0;border-radius:10px;overflow:hidden;text-align:center;
  background:#fff;border:1px solid var(--gold);display:flex;flex-direction:column;
}
.date-box .dd{font-weight:800;font-size:20px;color:var(--maroon-dark);line-height:1.5;}
.date-box .mm{background:var(--maroon);color:#fff;font-size:11px;font-weight:600;padding:1px 0 2px;}
.date-text{flex:1;min-width:0;}
.date-text .dname{font-weight:700;font-size:15.5px;color:var(--maroon-dark);}
.date-text .dsub{font-size:12px;color:var(--text-soft);margin-top:2px;}
.date-row .iarrow{color:var(--maroon);font-size:18px;flex-shrink:0;}
.dash-btn.event-tile .icon-wrap.cal-icon{
  flex-direction:column;border-radius:12px;overflow:hidden;padding:0;
  background:#fff;border:2px solid #c0102a;box-shadow:0 3px 8px rgba(192,16,42,0.25);
}
.cal-icon .dd{flex:1;display:flex;align-items:center;font-weight:800;font-size:22px;color:var(--maroon-dark);line-height:1;}
.cal-icon .mm{width:100%;background:#c0102a;color:#fff;font-size:10.5px;font-weight:700;padding:1px 0 3px;text-align:center;}

/* ---------- Family tree (कुटुंब वृक्ष) ---------- */
/* Classic CSS org chart: each <li> draws the horizontal sibling bar (::before
   / ::after) and each nested <ul> drops the vertical line from its parent. */
.ft-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;padding:8px 0 16px;}
.ft-tree{display:inline-block;min-width:100%;text-align:center;}
.ft-tree ul{display:flex;justify-content:center;padding:18px 0 0;margin:0;position:relative;}
.ft-tree > ul{padding-top:0;}
.ft-tree li{list-style:none;position:relative;padding:18px 5px 0;display:flex;flex-direction:column;align-items:center;}
.ft-tree li::before,.ft-tree li::after{
  content:'';position:absolute;top:0;right:50%;width:50%;height:18px;border-top:2px solid var(--gold);
}
.ft-tree li::after{right:auto;left:50%;border-left:2px solid var(--gold);}
.ft-tree li:only-child::before,.ft-tree li:only-child::after{display:none;}
.ft-tree li:only-child{padding-top:0;}
.ft-tree li:first-child::before,.ft-tree li:last-child::after{border:0 none;}
.ft-tree li:last-child::before{border-right:2px solid var(--gold);border-radius:0 6px 0 0;}
.ft-tree li:first-child::after{border-radius:6px 0 0 0;}
.ft-tree ul ul::before{content:'';position:absolute;top:0;left:50%;height:18px;border-left:2px solid var(--gold);}
.ft-tree > ul > li{padding-top:0;}
.ft-tree > ul > li::before,.ft-tree > ul > li::after{display:none;}
.ft-node{
  position:relative;
  background:#fff;border:1.5px solid #ecd9b8;border-radius:12px;padding:8px 12px;
  min-width:110px;max-width:180px;box-shadow:0 3px 10px rgba(122,16,36,0.10);
}
.ft-seq{
  position:absolute;top:-9px;left:-9px;
  width:20px;height:20px;border-radius:50%;
  background:#7b3fa0;color:#fff;border:2px solid #fff;
  font-size:11px;font-weight:700;line-height:16px;text-align:center;
  box-shadow:0 2px 5px rgba(0,0,0,0.2);
}
.ft-root{background:linear-gradient(135deg,var(--maroon),var(--maroon-dark));border-color:var(--maroon-dark);color:#fff;}
.ft-tag{font-size:10px;font-weight:700;color:var(--gold-light);letter-spacing:0.5px;margin-bottom:2px;}
.ft-name{font-weight:700;font-size:13.5px;color:var(--maroon-dark);line-height:1.3;}
.ft-root .ft-name{color:#fff;}
.ft-sr{display:inline-block;min-width:20px;padding:0 6px;border-radius:10px;background:#1565c0;color:#fff;font-size:11px;font-weight:700;line-height:18px;text-align:center;text-decoration:none;vertical-align:middle;}
.ft-sr:hover{background:#0d47a1;}
.ft-wa{display:inline-block;padding:0 6px;border-radius:10px;background:#25d366;color:#fff;font-size:10.5px;font-weight:700;line-height:18px;vertical-align:middle;letter-spacing:.3px;}
.member-card.linked{box-shadow:0 0 0 3px #1565c0;animation:newPulse 1.2s ease-in-out 3;}
.ft-spouse{font-size:12px;color:var(--text-soft);margin-top:3px;padding-top:3px;border-top:1px dashed #eadfd0;}
.ft-root .ft-spouse{color:var(--gold-light);border-color:rgba(255,255,255,0.25);}
.ft-tools{display:flex;justify-content:center;gap:4px;margin-top:6px;}
.ft-tools button{border:none;background:var(--cream);border-radius:8px;width:30px;height:28px;font-size:13px;cursor:pointer;}
.ft-root .ft-tools button{background:rgba(255,255,255,0.18);}

.tree-btn{
  width:38px;height:38px;border-radius:50%;flex-shrink:0;
  display:flex;align-items:center;justify-content:center;
  background:linear-gradient(135deg,var(--gold-light),var(--gold));font-size:18px;
  box-shadow:0 2px 6px rgba(0,0,0,0.15);
}
.tree-cta{
  display:flex;align-items:center;justify-content:center;gap:8px;margin-top:8px;
  padding:10px;border-radius:12px;background:#fff;color:var(--maroon-dark);
  font-weight:700;font-size:13.5px;box-shadow:0 2px 8px rgba(122,16,36,0.08);
}
.ft-card{background:#fff;border-radius:16px;box-shadow:var(--shadow);padding:20px 18px;}
.ft-card h2{margin:0 0 6px;font-size:18px;color:var(--maroon-dark);}
.ft-form label{display:block;font-size:12.5px;font-weight:600;color:var(--maroon-dark);margin-bottom:12px;}
.ft-form input{
  display:block;width:100%;margin-top:6px;padding:11px 13px;border-radius:10px;
  border:1px solid #e2d3c0;font-size:14px;font-family:inherit;background:#fff;color:var(--text);
}
.ft-form input:focus{outline:2px solid var(--gold);border-color:var(--gold);}
.ft-status{display:inline-block;padding:3px 10px;border-radius:20px;font-size:12px;font-weight:700;}
.ft-status.draft{background:#eee;color:#555;}
.ft-status.pending{background:#fff1cc;color:#8a5a00;}
.ft-status.approved{background:#dcf3e3;color:#1f6b3a;}
.ft-bar{display:flex;gap:8px;margin-top:12px;}
.ft-bar .form-submit{flex:1;}
.ft-bar .ghost{background:#fff;color:var(--maroon-dark);border:1.5px solid var(--maroon);}
.ft-meta{font-size:12.5px;color:var(--text-soft);margin:6px 0 0;}

.ft-dead{display:inline-block;font-size:10px;font-weight:700;padding:0 6px;border-radius:8px;background:#5b5b5b;color:#fff;vertical-align:middle;}
.ft-form .ft-check{display:flex;align-items:center;gap:8px;font-weight:500;}
.ft-form .ft-check input{width:auto;margin:0;}
