/* LTC365_GIAPHA_INDEX_V14: Luôn đặt trong khối Jinja content; không ảnh hưởng quyền xóa. */
#tc-family-tree .gp-v14-unlinked{
  border-top:1px solid #e6ce9c!important;
  margin-top:24px!important;
  padding-top:20px!important;
}
#tc-family-tree .gpv14-index-intro{
  border:1.5px solid #e5bd72!important;
  border-radius:19px!important;
  background:linear-gradient(115deg,#fff8e8,#fff0cd)!important;
  box-shadow:0 5px 12px rgba(120,62,28,.09)!important;
  padding:16px 12px!important;
  display:grid!important;
  gap:6px!important;
  text-align:center!important;
  margin-bottom:20px!important;
}
#tc-family-tree .gpv14-index-intro>strong{
  color:#86273e!important;font-size:clamp(17px,4.7vw,22px)!important;
  font-weight:900!important;line-height:1.3!important;
}
#tc-family-tree .gpv14-index-intro>small{
  color:#705342!important;font-size:clamp(12px,3.3vw,14px)!important;
  line-height:1.45!important;font-weight:600!important;
}
#tc-family-tree .gp-v14-unlinked>.gpv14-generation-group,
#tc-family-tree .gp-v14-unlinked>.gp-generation-wrapper.gpv14-generation-group{
  border:1.5px solid #ebd5a4!important;
  background:linear-gradient(160deg,#fffdf8 0%,#fff5df 100%)!important;
  padding:13px 12px 17px!important;
  border-radius:21px!important;
  box-shadow:0 6px 17px rgba(121,70,29,.10)!important;
  margin:0 0 18px!important;
}
#tc-family-tree .gp-v14-unlinked .gpv14-generation-group>.gpv14-generation-heading,
#tc-family-tree details.gp-generation-collapse>.gpv14-generation-heading{
  display:flex!important;justify-content:space-between!important;align-items:center!important;
  gap:9px!important;
  box-sizing:border-box!important;
  margin:0 0 13px!important;
  padding:11px 13px!important;
  width:100%!important;max-width:none!important;
  min-height:53px!important;
  border-radius:14px!important;
  border:1.5px solid #d4a356!important;
  background:linear-gradient(105deg,#812137,#a12b46 58%,#7a1e33)!important;
  color:#fff0cc!important;
  box-shadow:0 3px 10px rgba(117,36,60,.19)!important;
  font-weight:850!important;
  font-size:clamp(14px,4.2vw,19px)!important;
  text-align:left!important;
  line-height:1.2!important;
  text-shadow:none!important;
  cursor:default!important;
}
#tc-family-tree details.gp-generation-collapse>.gpv14-generation-heading{
  cursor:pointer!important;
}
#tc-family-tree .gpv14-generation-label{flex:1!important;color:#fff0cc!important}
#tc-family-tree .gpv14-generation-count{
  flex:none!important;
  border:1px solid rgba(255,226,165,.7)!important;
  background:rgba(255,251,236,.14)!important;
  padding:5px 7px!important;
  border-radius:10px!important;
  font-size:clamp(11px,3.1vw,13px)!important;
  color:#ffe3a5!important;
  white-space:nowrap!important;
  font-weight:750!important;
}
#tc-family-tree .gp-v14-row.gpv14-generation-list,
#tc-family-tree details.gp-generation-collapse>.gp-v14-row.gpv14-generation-list{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:10px!important;
  margin:0!important;
  width:100%!important;
}
#tc-family-tree .gpv14-generation-list>button.gpv14-generation-person,
#tc-family-tree .gp-v14-unlinked .gpv14-generation-list>button.gpv14-generation-person,
#tc-family-tree details.gp-generation-collapse .gp-v14-row>button.gpv14-generation-person{
  min-width:0!important;max-width:100%!important;width:100%!important;
  min-height:86px!important;
  padding:12px 6px!important;
  border:1.5px solid #d6b573!important;
  border-radius:15px!important;
  background:linear-gradient(180deg,#fffdf7 0%,#f9e8bf 100%)!important;
  color:#842438!important;
  box-shadow:0 3px 9px rgba(127,86,40,.12)!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:6px!important;
  overflow-wrap:anywhere!important;
  white-space:normal!important;
  text-align:center!important;
  font:inherit!important;
  cursor:pointer!important;
}
#tc-family-tree .gpv14-generation-list>button.gpv14-generation-person:nth-child(3n+2){
  background:linear-gradient(180deg,#fffdf8,#fdf0d6)!important;
}
#tc-family-tree .gpv14-generation-list>button.gpv14-generation-person:nth-child(3n){
  background:linear-gradient(180deg,#fff9f7,#f9e9da)!important;
}
#tc-family-tree .gpv14-generation-name{
  color:#85213b!important;
  font-size:clamp(13px,3.7vw,17px)!important;
  font-weight:900!important;
  line-height:1.22!important;
}
#tc-family-tree .gpv14-generation-birth{
  display:block!important;
  color:#725847!important;
  font-size:clamp(10px,2.8vw,12px)!important;
  font-weight:600!important;
  line-height:1.2!important;
  overflow-wrap:anywhere!important;
}
#tc-family-tree .gpv14-generation-person:focus-visible,
#tc-family-tree .gpv14-generation-person:active{
  outline:2px solid #b13754!important;
  outline-offset:2px!important;
}
#tc-family-tree .gpv14-data-warning{
  border-radius:13px!important;
  padding:10px 12px!important;
  border:1px solid #e1be81!important;
  background:#fffaec!important;
  color:#775332!important;
  margin:14px 0 0!important;
  font-size:13px!important;
  line-height:1.5!important;
}
#tc-family-tree .gpv14-data-warning summary{
  color:#8d253b!important;font-weight:800!important;cursor:pointer!important;
}
#tc-family-tree .gpv14-data-warning p{margin:8px 0 0!important;}
@media(max-width:390px){
 #tc-family-tree .gp-v14-unlinked>.gpv14-generation-group{padding:10px 8px 13px!important;border-radius:16px!important}
 #tc-family-tree .gp-v14-row.gpv14-generation-list{gap:7px!important}
 #tc-family-tree .gpv14-generation-list>button.gpv14-generation-person{min-height:75px!important;padding:8px 4px!important;border-radius:12px!important}
 #tc-family-tree .gpv14-generation-heading{padding:10px!important}
}
@media(prefers-reduced-motion:no-preference){
 #tc-family-tree .gpv14-generation-list>button.gpv14-generation-person{transition:transform .15s ease, box-shadow .15s ease!important;}
 #tc-family-tree .gpv14-generation-list>button.gpv14-generation-person:active{transform:translateY(1px)!important;}
}
