/* v1.1.3 | UI consistency for the WordPress genealogy.
 * Avatars are rounded squares everywhere except the circular SVG portraits
 * in the Bubble diagram. Only real SEARCH widgets and long content separators
 * are adjusted: do not change card borders, input borders or connector lines. */
:root { --gpc5-avatar-corner: 13px; --gpc5-search-corner: 11px; }

/* Directory, list, root/person selector and person/profile sheets. */
.gpc5-tree .gpc5-canvas.gpc5-list-mode .gpc5-list-avatar,
.gpc5-tree .gpc5-canvas.gpc5-list-mode .gpc5-list-avatar img,
.gpc5-tree .gpc5-root-current-avatar,
.gpc5-tree .gpc5-root-current-avatar img,
.gpc5-tree .gpc5-root-option-avatar,
.gpc5-tree .gpc5-root-option-avatar img,
.gpc5-tree .gpc5-detail-avatar,
.gpc5-tree .gpc5-detail-avatar img,
.gpc5-profile-overlay .gpc5-profile-photo,
.gpc5-profile-overlay .gpc5-profile-photo img,
.gpc5-profile-overlay .gpc5-profile-photo .gpc5-avatar-live-preview,
.gpc5-profile-overlay .gpc5-profile-person-item .gpc5-profile-photo,
.gpc5-profile-overlay .gpc5-profile-person-item .gpc5-profile-photo img,
.gpc5-tree .gpc5-own-avatar-preview,
.gpc5-tree .gpc5-create-avatar-preview,
.gpc5-tree .gpc5-own-avatar-preview img,
.gpc5-tree .gpc5-create-avatar-preview img,
.gpc5-content .gpc5-member-card img,
.gpc5-content .gpc5-member-placeholder,
.gpc5-content .gpc5-directory-card img,
.gpc5-content .gpc5-directory-card .gpc5-member-placeholder,
.gpc5-ss-person .gpc5-ss-avatar,
.gpc5-ss-person .gpc5-ss-avatar img,
.gpc5-chat-dock .gpc5-chat-contact-avatar,
.gpc5-chat-dock .gpc5-chat-contact-avatar img,
.gpc5-chat-dock .gpc5-chat-current-avatar,
.gpc5-chat-dock .gpc5-chat-current-avatar img {
  border-radius:var(--gpc5-avatar-corner)!important;
}
/* Do NOT target .gpc5-bubble-member or SVG circle clip paths: Bubble stays round. */
.gpc5-tree .gpc5-canvas.gpc5-list-mode .gpc5-list-avatar img,
.gpc5-tree .gpc5-root-option-avatar img,
.gpc5-profile-overlay .gpc5-profile-photo img,
.gpc5-ss-person .gpc5-ss-avatar img,
.gpc5-chat-dock .gpc5-chat-contact-avatar img,
.gpc5-chat-dock .gpc5-chat-current-avatar img {object-fit:cover!important;}

/* Every search surface is a rounded rectangle rather than a capsule.
   The input INSIDE an outlined label keeps its transparent borderless style. */
.gpc5-tree .gpc5-toolbar input.gpc5-search,
.gpc5-tree .gpc5-root-search,
.gpc5-tree .gpc5-list-search-label,
.gpc5-content .gpc5-directory-search,
.gpc5-content.gpc5-news .gpc5-news-search-label,
.gpc5-community .gpc5-mem-search,
.gpc5-chat-dock .gpc5-chat-search-label input,
.gpc5-ss-search,
.g5h-reference-layout .g5h-search,
.g5o-origin-shell .g5o-contents-search,
.gpc5-kinship-standalone input[type="search"],
.gpc5-graves input[type="search"],
.gpc5-content input[type="search"]:not(.gpc5-news-search):not(.gpc5-kinship-search),
.gpc5-my-requests input[type="search"] {
  border-radius:var(--gpc5-search-corner)!important;
}
.gpc5-ss-search input[type="search"],
.gpc5-content .gpc5-news-search-label input[type="search"],
.gpc5-tree .gpc5-list-search-label input[type="search"],
.gpc5-content .gpc5-directory-search input[type="search"],
.gpc5-community .gpc5-mem-search input[type="search"] {
  border:0!important;background:transparent!important;box-shadow:none!important;
}

/* Long editorial separators only. Four-point star stays exactly 24x24px;
   the horizontal rules grow independently. Existing Cội nguồn/Ngày giỗ
   separators in origin.css/community.css remain untouched and keep their star. */
.g5h-archive .g5h-group-title,
.gpc5-profile-overlay .gpc5-profile-contact .gpc5-profile-section-heading,
.gpc5-life-heading,
.gpc5-full-create .gpc5-create-section {
  position:relative;
  border-bottom:0!important;
  padding-bottom:38px!important;
}
.g5h-archive .g5h-group-title::after,
.gpc5-profile-overlay .gpc5-profile-contact .gpc5-profile-section-heading::after,
.gpc5-life-heading::after,
.gpc5-full-create .gpc5-create-section::after {
  content:"";
  position:absolute;
  inset-inline:0;
  bottom:0;
  height:24px;
  pointer-events:none;
  background-image:url("ornamental-star.svg"),linear-gradient(#caa45e,#caa45e),linear-gradient(#caa45e,#caa45e);
  background-repeat:no-repeat;
  background-position:center center,left center,right center;
  background-size:24px 24px,calc(50% - 24px) 1px,calc(50% - 24px) 1px;
}
/* Reusable for additional long editorial dividers, never short field rules. */
.gpc5-ui-line-star-line {
  display:block;
  box-sizing:border-box;
  width:100%;min-height:24px;
  background-image:url("ornamental-star.svg"),linear-gradient(#caa45e,#caa45e),linear-gradient(#caa45e,#caa45e);
  background-repeat:no-repeat;
  background-position:center center,left center,right center;
  background-size:24px 24px,calc(50% - 24px) 1px,calc(50% - 24px) 1px;
}
@media(max-width:600px){
 .g5h-archive .g5h-group-title,.gpc5-life-heading,.gpc5-full-create .gpc5-create-section{padding-bottom:32px!important}
}


/* v1.1.4 — the four controls/separators explicitly marked in the screenshots.
   Keep the existing Bubble avatar exception and all diagram connecting lines. */
.g5o-origin-shell .g5o-hero-actions :is(.g5o-hero-primary,.g5o-hero-secondary),
.gpc5-community .gpc5-community-tabs a,
.gpc5-tree .gpc5-view-tabs,
.gpc5-tree.gpc5-theme-refined .gpc5-view-tabs,
.gpc5-tree .gpc5-view-tabs .gpc5-view-tab {
  border-radius:11px!important;
}
/* No extra border is added to active tabs: colors and selection states stay intact. */
.g5o-origin-shell .g5a-diagram-note {
  border-top:0!important;
  position:relative;
  padding-top:42px!important;
}
@media(max-width:620px){
 .g5o-origin-shell .g5a-diagram-note{padding-top:38px!important}
}


/* v1.1.5 — Nine screenshot locations: editorial chips and labels that are
 * not buttons must also adopt the 11px rounded-rectangle shape. */
:root { --gpc5-chip-corner: 4px; }
/* 01. News category indicator, including homepage news shortcode. */
.gpc5-content .gpc5-category-tag,
.htc5-home-plugin-news .gpc5-category-tag,
.htc5-news-content .gpc5-category-tag { border-radius:var(--gpc5-chip-corner)!important; }
/* 02. Reader/stage chapter counter, which was an unscoped pill. */
.g5o-stage-chapter-tag { border-radius:var(--gpc5-chip-corner)!important; }
/* 03. Source/evidence and location chips inside a chapter. */
.g5o-chapter-evidence,
.g5o-chapter-location-pill { border-radius:var(--gpc5-chip-corner)!important; }
/* 04. Generation headings in List mode. Keep the generation dividers. */
.gpc5-tree .gpc5-canvas.gpc5-list-mode .gpc5-generation-pill { border-radius:var(--gpc5-chip-corner)!important; }
/* 05. Zoom control group: only the frame and +/- action buttons change.
 * The slider thumb stays circular for clarity and accessibility. */
.gpc5-tree .gpc5-zoom-group { border-radius:var(--gpc5-chip-corner)!important; }
.gpc5-tree .gpc5-zoom-group :is(.gpc5-zoom-in,.gpc5-zoom-out) {
  border-radius:6px!important;
}
/* 06. Kinship badges are SVG rects: rx is also fixed in tree.js.
 * The CSS serves as a fallback for browsers supporting SVG geometry props. */
.gpc5-tree .gpc5-kinship-hover-tag rect { rx:6px; ry:6px; }
/* 07. Directory generation labels, not clickable buttons. */
.gpc5-content.gpc5-directory .gpc5-directory-gen { border-radius:var(--gpc5-chip-corner)!important; }
/* A mobile chapter location must remain a chip, not an unstyled plain line. */
@media(max-width:620px){
  .g5o-chapter-meta-top .g5o-chapter-location-pill {
    padding:4px 9px!important;
    border-radius:var(--gpc5-chip-corner)!important;
    background:#edf3e5!important;
  }
}


/* v1.1.6 — size-aware rounded rectangles.
   11px on a 19–24px chip is capsule-like. Do not scale radii by width,
   and do not affect Bubble avatars, connector circles or slider handles. */
:root{
  --gpc5-corner-xs:4px;       /* 18–28px high labels, tags */
  --gpc5-corner-sm:6px;       /* 29–38px high icon buttons */
  --gpc5-corner-md:8px;       /* tabs, 38–44px high controls */
  --gpc5-corner-lg:10px;      /* large button/toolbar frames */
  --gpc5-action-radius:9px;  /* standard 42–52px high actions */
  --gpc5-chip-corner:4px;
}
/* Small text badges must retain visible straight edges. */
.gpc5-tree .gpc5-canvas.gpc5-list-mode .gpc5-list-chips em,
.gpc5-tree .gpc5-canvas.gpc5-list-mode .gpc5-list-chips .is-deceased,
.gpc5-profile-overlay .gpc5-profile-pill,
.gpc5-content .gpc5-category-tag,
.gpc5-content.gpc5-directory .gpc5-directory-gen,
.gpc5-content .gpc5-news-card .gpc5-category-tag,
.gpc5-community .gpc5-pill,
.gpc5-community .gpc5-mem-gen,
.gpc5-inbox .gpc5-inbox-count,
.gpc5-inbox .gpc5-inbox-state,
.g5o-origin-shell .g5o-stage-chapter-tag,
.g5o-origin-shell .g5o-chapter-location-pill,
.g5o-origin-shell .g5o-chapter-evidence,
.gpc5-stats-public .gpc5-stat-chip{
  border-radius:var(--gpc5-corner-xs)!important;
}
/* Generation heading is taller than a chip. */
.gpc5-tree .gpc5-canvas.gpc5-list-mode .gpc5-generation-pill{
  border-radius:7px!important;
}
/* Small, square icon and compact avatar containers. The Bubble portrait is
   specifically excluded: do not target any .gpc5-bubble-* selectors. */
.gpc5-tree .gpc5-zoom-group :is(.gpc5-zoom-in,.gpc5-zoom-out),
.gpc5-tree .gpc5-toolbar :is(.gpc5-zoom-in,.gpc5-zoom-out),
.g5o-origin-shell .g5o-stage-nav-btns button,
.gpc5-chat-dock .gpc5-chat-emoji,
.gpc5-chat-dock .gpc5-chat-emoji-toggle,
.gpc5-chat-dock .gpc5-chat-minimize {
  border-radius:var(--gpc5-corner-sm)!important;
}
.gpc5-ss-person .gpc5-ss-avatar,
.gpc5-ss-person .gpc5-ss-avatar img,
.gpc5-tree .gpc5-root-option-avatar,
.gpc5-tree .gpc5-root-option-avatar img,
.gpc5-chat-dock .gpc5-chat-contact-avatar,
.gpc5-chat-dock .gpc5-chat-contact-avatar img,
.gpc5-chat-dock .gpc5-chat-current-avatar,
.gpc5-chat-dock .gpc5-chat-current-avatar img{
  border-radius:var(--gpc5-corner-sm)!important;
}
/* Medium controls are no longer uniformly 11px. */
.gpc5-tree .gpc5-view-tab,
.gpc5-tree .gpc5-view-tabs .gpc5-view-tab,
.gpc5-community .gpc5-community-tabs a,
.gpc5-content .gpc5-news-tabs button,
.gpc5-tree .gpc5-toolbar button,
.gpc5-tree .gpc5-mobile-fit,
.gpc5-inbox .gpc5-inbox-tabs a,
.gpc5-inbox .gpc5-inbox-pagination a,
.gpc5-inbox .gpc5-inbox-reply{
  border-radius:var(--gpc5-corner-md)!important;
}
/* Outer groups have enough height for a larger (but not pill) radius. */
.gpc5-tree .gpc5-view-tabs,
.gpc5-tree.gpc5-theme-refined .gpc5-view-tabs,
.gpc5-tree .gpc5-zoom-group,
.g5o-origin-shell .g5o-hero-actions :is(.g5o-hero-primary,.g5o-hero-secondary){
  border-radius:var(--gpc5-corner-lg)!important;
}
/* SVG relationship labels: geometry rx is also fixed in tree.js. */
.gpc5-tree .gpc5-kinship-hover-tag rect{rx:4px;ry:4px}


/* v1.1.7 — remaining screenshot-marked capsules, classified by *control height*.
 * Avoid universal rounding: decorative circles, chat emoji and Bubble portraits
 * deliberately remain untouched. Keep status colors and interactive states. */
:root{--gpc5-badge-corner:4px;--gpc5-compact-action-corner:6px;--gpc5-medium-action-corner:8px}
/* Contact inbox: 20–25px status counters and 30–35px tabs/buttons. */
.gpc5-inbox :is(.gpc5-inbox-count,.gpc5-inbox-state){border-radius:var(--gpc5-badge-corner)!important}
.gpc5-inbox .gpc5-inbox-tabs a,
.gpc5-inbox .gpc5-inbox-actions button,
.gpc5-inbox .gpc5-inbox-actions summary.gpc5-inbox-delete-toggle,
.gpc5-inbox .gpc5-inbox-reply,
.gpc5-inbox .gpc5-inbox-pagination a {border-radius:var(--gpc5-compact-action-corner)!important}
/* User's own genealogical requests and administration status chips. */
.gpc5-my-requests .gpc5-request-status,
.gpc5-origin-status-badge,
.gpc5-stats-public .gpc5-stats-percent {border-radius:var(--gpc5-badge-corner)!important}
/* Profile actions previously had 999px!important in front.css. */
.gpc5-profile-overlay .gpc5-profile-top-actions button.gpc5-profile-action,
.gpc5-profile-overlay .gpc5-profile-top-actions a.gpc5-profile-action,
.gpc5-profile-overlay .gpc5-profile-top-actions .gpc5-profile-action.gpc5-profile-chat,
.gpc5-profile-overlay .gpc5-profile-top-actions .gpc5-profile-action.gpc5-profile-edit-button {
  border-radius:var(--gpc5-medium-action-corner)!important;
}

/* v1.1.8 — final scoped overrides for the two screenshot-marked surfaces.
   Avoid broad :is(button) selectors and preserve diagram geometry. */
.gpc5-tree .gpc5-root-trigger,
.gpc5-tree .gpc5-controls-row .gpc5-root-trigger,
.gpc5-tree .gpc5-add-person,
.gpc5-tree .gpc5-controls-row>.gpc5-add-person{border-radius:8px!important}
.gpc5-community .gpc5-community-tabs>a[data-gpc5-tab],
.gpc5-community .gpc5-community-tabs>a[data-gpc5-tab].is-active,
.gpc5-community .gpc5-community-tabs>a[data-gpc5-tab][aria-current="page"]{border-radius:6px!important}
