/* Root variables for clean SaaS color scheme */
:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --primary-light: #eff6ff;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-light: #9ca3af;
    --bg-main: #f9fafb;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --border-radius-sm: 6px;
    --border-radius-md: 10px;
    --border-radius-lg: 16px;
    --font-sans: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.body-family-view.tree-style-tree .tree-node,
.body-family-view.tree-style-tree .tree-connector,
.body-family-view.tree-style-tree .tree-connector.branch-bark,
.body-family-view.tree-style-tree .tree-generated-main-asset,
.body-family-view.tree-style-tree .tree-attached-generated-branch {
    will-change: auto;
    filter: none !important;
}

/* Reset and base styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    padding: 0;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header & Navigation (Polished & Compact) */
header {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 1.5rem;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-sm);
}

.user-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    /* Pushes the control cluster to the right edge of the header. */
    margin-left: auto;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.language-switcher select {
    padding: 0.35rem 1.6rem 0.35rem 0.55rem;
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    background-color: var(--bg-input);
    color: var(--text-primary);
    font: inherit;
    cursor: pointer;
}

.badge {
    background-color: var(--primary-light);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.user-badge {
    background-color: #e0f2fe;
    color: #0369a1;
    padding: 0.35rem 0.85rem;
    text-transform: none;
    white-space: nowrap;
    font-size: 0.78rem;
}

.user-nav .logout-btn {
    width: auto;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.78rem;
}

.env-badge-wrapper {
    margin-bottom: 1.5rem;
    text-align: right;
}

.env-badge {
    background-color: #f3f4f6;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-sm);
    font-family: monospace;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Main Container */
main {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

/* Cards & Layout panels */
.container-box {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    width: 100%;
}

/* Login Screen specific */
.auth-wrapper {
    max-width: 420px;
    margin: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.auth-header {
    text-align: center;
}

.auth-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.password-form-group {
    margin-bottom: 1.5rem;
}

.demo-credentials {
    padding: 0.75rem;
    margin-top: 1rem;
    border: 1px solid #fde68a;
    border-radius: var(--border-radius-sm);
    background-color: #fef3c7;
    color: #92400e;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
}

.form-group {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    background-color: var(--bg-input);
    color: var(--text-primary);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    border-radius: var(--border-radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    width: 100%;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: #f3f4f6;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: #e5e7eb;
    color: var(--text-primary);
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    display: none;
}

.alert-danger {
    background-color: #fef2f2;
    color: var(--danger-color);
    border: 1px solid #fecaca;
}

.alert.is-visible {
    display: block;
}

.app-error {
    width: 100%;
    margin-bottom: 1rem;
}

/* Dashboard screen: Family list grid */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.section-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.family-selection-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

.family-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.family-card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    background-color: var(--bg-card);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    font: inherit;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.family-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.family-card:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
}

.family-grid-empty {
    grid-column: 1 / -1;
    padding: 2rem;
    border: 1px dashed var(--border-color);
    border-radius: var(--border-radius-md);
    color: var(--text-secondary);
    text-align: center;
}

.family-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0;
}

.family-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-light);
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
}

.family-card-stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--primary-color);
    font-weight: 600;
}

.family-card-icon {
    display: inline-block;
    width: 1.3rem;
    height: 1.3rem;
    flex: 0 0 1.3rem;
    background: var(--family-card-asset) center / contain no-repeat;
}

/* Stats Dashboard Panel */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 1.25rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.stat-icon {
    display: block;
    width: 2.15rem;
    height: 2.15rem;
    flex: 0 0 2.15rem;
    margin-bottom: 0.5rem;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.stats-heading-icon {
    display: inline-block;
    width: 1.45rem;
    height: 1.45rem;
    flex: 0 0 1.45rem;
    background: url('assets/botanical/branches/branch-01.svg') center / contain no-repeat;
}

.stat-icon-members {
    background-image: url('assets/botanical/branches/branch-04.svg');
}

.stat-icon-living {
    background-image: url('assets/botanical/leaves/leaf-03.svg');
}

.stat-icon-deceased {
    background-image: url('assets/botanical/moss-lichen/moss-lichen-07.svg');
}

.stat-icon-lifespan {
    background-image: url('assets/botanical/cones/cone-05.svg');
}

.stat-icon-earliest {
    background-image: url('assets/botanical/blooms/bloom-03.svg');
}

.stat-icon-latest {
    background-image: url('assets/botanical/berries/berry-08.svg');
}

.stat-icon-partnerships {
    background-image: url('assets/botanical/vines/vine-04.svg');
}

.stat-icon-parent-child {
    background-image: url('assets/botanical/flowering-vines/flowering-vine-07.svg');
}

.stat-val {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

.stats-heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.125rem;
    font-weight: 700;
}

/* Details grid split */
.details-split {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 900px) {
    .details-split {
        grid-template-columns: 2fr 1fr;
    }
}

.member-list-panel {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    overflow: hidden;
}

.member-list-title {
    padding: 1rem 1.25rem;
    background-color: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    font-weight: 700;
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th, td {
    padding: 0.875rem 1.25rem;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: #f1f5f9;
    font-weight: 600;
    color: var(--text-secondary);
}

tr:hover {
    background-color: #f8fafc;
}

.member-badge-deceased {
    background-color: #fee2e2;
    color: #ef4444;
}

.member-badge-alive {
    background-color: #d1fae5;
    color: #059669;
}

/* Info summary side card */
.info-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 1.25rem;
}

.sidebar-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-list {
    list-style-type: none;
}

.info-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    border-bottom: 1px dashed var(--border-color);
}

.info-list li:last-child {
    border-bottom: none;
}

.info-list li span:first-child {
    color: var(--text-secondary);
}

.info-list li span:last-child {
    font-weight: 600;
}

/* Hide helper */
.hidden {
    display: none !important;
}

/* Footer styling */
footer {
    text-align: center;
    padding: 2rem;
    font-size: 0.8rem;
    color: var(--text-light);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.footer-deployment {
    margin-top: 0.5rem;
    color: var(--text-light);
    font-size: 0.75rem;
}

/* Tree Visualization Styles */
.tree-container-box {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    background-color: var(--bg-card);
    margin-bottom: 2rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.tree-controls {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    flex-wrap: wrap;
    min-width: 0;
}

.tree-layout-options {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    padding-left: 0.45rem;
    border-left: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 600;
}

.tree-layout-options label {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

.tree-layout-options select {
    padding: 0.3rem 1.3rem 0.3rem 0.4rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background-color: #ffffff;
    color: var(--text-secondary);
    font: inherit;
    cursor: pointer;
}

.tree-control-btn {
    width: auto;
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
    margin: 0;
}

.tree-reset-icon {
    display: inline-block;
    width: 1.05rem;
    height: 1.05rem;
    flex: 0 0 1.05rem;
    background: url('assets/botanical/leaves/leaf-10.svg') center / contain no-repeat;
    transform: rotate(42deg);
}

.tree-reset-icon::after {
    display: none;
}

.tree-control-btn.active {
    background-color: var(--primary-light);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.tree-style-selector {
    display: inline-flex;
    align-items: stretch;
    gap: 0.2rem;
}

.tree-style-selector .tree-control-btn {
    border-color: transparent;
    border-radius: var(--border-radius-sm);
    box-shadow: none;
}

.header-style-selector {
    padding: 0.2rem;
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    background-color: #f8fafc;
}

.header-style-selector .tree-control-btn {
    padding: 0.3rem 0.7rem;
    border-radius: 9999px;
    font-size: 0.75rem;
}

.tree-search {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 190px;
    flex: 1 1 220px;
}

.tree-search-dock {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    max-width: calc(100% - 5.5rem);
    padding: 0.45rem 0.6rem;
    border: 1px solid rgba(148, 163, 184, 0.75);
    border-radius: var(--border-radius-md);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.tree-search-label,
.tree-zoom-control label {
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
}

.tree-search input {
    width: 100%;
    min-width: 0;
    padding: 0.4rem 0.65rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    background: #ffffff;
    color: var(--text-primary);
    font: inherit;
    font-size: 0.8rem;
}

.tree-search input:focus {
    outline: 2px solid rgba(59, 130, 246, 0.25);
    outline-offset: 1px;
    border-color: var(--primary-color);
}

.tree-zoom-control input {
    accent-color: var(--primary-color);
}

.tree-zoom-control output {
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 700;
}

.tree-zoom-heading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
}

.tree-zoom-rail {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    width: 100%;
    min-height: 0;
    padding: 0.2rem 0;
}

.tree-zoom-mark {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1;
}

.focus-indicator {
    appearance: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-family: inherit;
    color: var(--text-secondary);
    padding: 0.35rem 0.75rem;
    background-color: #f1f5f9;
    border-radius: 9999px;
    border: 1px solid #cbd5e1;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.7);
    text-align: left;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.focus-indicator:hover {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
}

.focus-indicator:focus-visible {
    outline: 2px solid rgba(59, 130, 246, 0.45);
    outline-offset: 2px;
}

.focus-indicator[aria-pressed="true"] {
    border-color: #94a3b8;
    background-color: #e2e8f0;
    box-shadow: inset 0 2px 4px rgba(15, 23, 42, 0.16), inset 0 1px 1px rgba(15, 23, 42, 0.08);
    transform: translateY(1px);
}

.focus-indicator:focus {
    outline: none;
}

.focus-indicator-copy {
    min-width: 0;
}

.focus-indicator-copy strong {
    color: inherit;
}

.current-member-popover {
    position: absolute;
    left: 0;
    bottom: calc(100% + 0.6rem);
    z-index: 30;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    width: min(360px, calc(100vw - 2rem));
    max-height: min(520px, calc(100vh - 2rem));
    overflow: auto;
    padding: 0.8rem;
    border: 1px solid rgba(148, 163, 184, 0.75);
    border-radius: var(--border-radius-md);
    background: rgba(255, 255, 255, 0.97);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.current-member-popover-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-light);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.current-member-heading-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
}

.current-member-close,
.current-member-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
}

.current-member-edit {
    font-size: 0.95rem;
}

.current-member-close:hover,
.current-member-edit:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

.current-member-popover-name {
    white-space: nowrap;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.current-member-former-name {
    color: var(--text-secondary);
    font-size: 0.84em;
    font-weight: 600;
}

.current-member-popover-dates {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.genealogy-date-symbol {
    display: inline-block;
    width: 0.75rem;
    height: 0.75rem;
    margin: 0 0.18rem 0 0.05rem;
    vertical-align: -0.12em;
    background-color: var(--text-secondary);
    -webkit-mask: var(--date-symbol-image) center / contain no-repeat;
    mask: var(--date-symbol-image) center / contain no-repeat;
}

.current-member-details {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    margin-top: 0.35rem;
    padding-top: 0.65rem;
    border-top: 1px solid var(--border-color);
}

.current-member-details section {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.current-member-details section:not(.hidden) ~ section:not(.hidden) {
    padding-top: 0.65rem;
    border-top: 1px solid var(--border-color);
}

.current-member-details h4 {
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.current-member-details ul {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    list-style: none;
}

.current-member-details li {
    display: flex;
    flex-wrap: nowrap;
    align-items: baseline;
    gap: 0.3rem;
    color: var(--text-secondary);
    font-size: 0.72rem;
    line-height: 1.35;
    white-space: nowrap;
}

.current-member-details li strong {
    color: var(--text-primary);
}

.current-member-reference {
    padding: 0;
    border: 0;
    background: transparent;
    color: #4778a8;
    font: inherit;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.current-member-reference:hover,
.current-member-reference:focus-visible {
    color: var(--primary-hover);
    text-decoration: underline;
}

.current-member-relationship-edit {
    flex: 0 0 auto;
    margin-left: auto;
    padding: 0.1rem 0.3rem;
    border: 0;
    border-radius: var(--border-radius-sm);
    background: transparent;
    color: var(--primary-color);
    font: inherit;
    font-size: 0.68rem;
    font-weight: 700;
    cursor: pointer;
}

.current-member-relationship-edit:hover,
.current-member-relationship-edit:focus-visible {
    background: var(--primary-light);
    outline: none;
}

.current-member-reference:focus-visible {
    outline: 2px solid rgba(59, 130, 246, 0.35);
    outline-offset: 2px;
    border-radius: 2px;
}

.current-member-group-heading {
    margin-top: 0.2rem;
    color: var(--text-secondary);
    font-size: 0.76rem;
    font-weight: 700;
}

.current-member-subheading {
    margin-top: 0.15rem;
}

.current-member-children-heading {
    padding-left: 0.65rem;
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.35;
    text-transform: uppercase;
}

.current-member-details .current-member-children-heading {
    color: var(--text-secondary);
}

.current-member-other-children-heading {
    padding-left: 0;
}

.current-member-relationship-row {
    padding-left: 0.65rem;
}

.current-member-child-row {
    padding-left: 0.65rem;
}

.current-member-child-row::before {
    width: 0.3rem;
    height: 0.3rem;
    flex: 0 0 auto;
    align-self: center;
    border-radius: 50%;
    background: #b7c5d6;
    content: '';
}

.current-member-details li span:not(.no-separator)::before {
    content: '·';
    margin-right: 0.3rem;
    color: var(--text-light);
}

.tree-viewport-wrapper {
    position: relative;
    height: 500px;
    background-color: #fafbfc;
    background-image: radial-gradient(#e2e8f0 1px, transparent 1px);
    background-size: 20px 20px;
    overflow: hidden;
    cursor: grab;
    user-select: none;
}

.tree-canvas-zoom {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 56px;
    min-width: 56px;
    height: min(280px, calc(100% - 2rem));
    gap: 0.35rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid rgba(148, 163, 184, 0.75);
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.tree-canvas-zoom input {
    flex: 1;
    min-height: 0;
    width: 1rem;
    height: auto;
    writing-mode: vertical-lr;
    direction: rtl;
}

.tree-canvas-zoom output {
    min-width: 0;
    text-align: center;
}

.tree-viewport-wrapper:active {
    cursor: grabbing;
}

.tree-svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Tree node / cards */
.tree-node {
    cursor: pointer;
    transition: filter 0.15s ease-in-out;
    will-change: transform, opacity;
}

.tree-node:focus,
.tree-node:focus-visible {
    outline: none;
}

.tree-node.fade-out, .tree-connector.fade-out {
    pointer-events: none;
}

.tree-node:hover {
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.15));
}

.tree-node.highlighted {
    filter: drop-shadow(0 3px 5px rgba(37, 99, 235, 0.18));
}

.tree-node-bg {
    fill: #ffffff;
    stroke: #94a3b8;
    stroke-width: 1.5;
    rx: 8px;
    ry: 8px;
    transition: fill 0.2s, stroke 0.2s, stroke-width 0.2s;
}

/* Specific node states */
.tree-node.focal .tree-node-bg {
    stroke: var(--primary-color);
    stroke-width: 3;
    fill: var(--primary-light);
}

.tree-node.shadow {
    transition: filter 0.15s ease-in-out;
}

.tree-node.shadow:hover {
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.15));
}

.tree-node.shadow .tree-node-bg {
    stroke: #cbd5e1;
    fill: #f8fafc;
}

.tree-node.shadow.shadow-highlighted .tree-node-bg {
    stroke: var(--primary-color);
    stroke-width: 2;
    fill: #eef5ff;
}

.tree-node.deceased .tree-node-bg {
    fill: #f1f5f9;
}

/* Node text styling */
.tree-node-text-name {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 700;
    fill: var(--text-primary);
    pointer-events: none;
}

.tree-node-text-dates {
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 500;
    fill: var(--text-secondary);
    pointer-events: none;
}

.tree-node-date-symbol {
    pointer-events: none;
}

.tree-botanical-node {
    display: none;
    pointer-events: none;
}

.tree-generated-asset {
    display: block;
    overflow: visible;
    pointer-events: none;
    shape-rendering: geometricPrecision;
}

/* Tree connectors / lines */
.tree-connector {
    fill: none;
    stroke: #64748b;
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
    transition: stroke 0.2s, stroke-width 0.2s;
}

.tree-connector.shadow {
    stroke: #cbd5e1;
    stroke-width: 1.5;
    stroke-dasharray: 4,4;
}

.tree-connector.shadow.shadow-highlighted {
    stroke: var(--primary-color);
    stroke-width: 2;
    opacity: 0.55;
}

/* Botanical tree presentation */
.body-family-view.tree-style-tree {
    --primary-color: #4f6f43;
    --primary-hover: #3d5b35;
    --primary-light: #e3ead8;
    --text-primary: #322e25;
    --text-secondary: #625b49;
    --text-light: #847b66;
    --bg-main: #e7e4d4;
    --bg-card: #f3f0df;
    --bg-input: #f8f4e7;
    --border-color: #b8af91;
    --tree-bark: #624b32;
    --tree-bark-dark: #3f3426;
    --tree-moss: #536d3f;
    --tree-leaf-light: #81945c;
    --tree-parchment: #eee7ca;
}

.body-family-view,
.body-family-view header,
.body-family-view .tree-viewport-wrapper,
.body-family-view .tree-search-dock,
.body-family-view .tree-canvas-zoom,
.body-family-view .current-member-popover,
.body-family-view .tree-control-btn,
.body-family-view .tree-layout-options select {
    transition: background-color 0.55s ease, border-color 0.55s ease, color 0.55s ease, box-shadow 0.55s ease;
}

.body-family-view.tree-style-tree header {
    background-color: #eeeada;
    border-bottom-color: #9c9377;
    box-shadow: 0 4px 18px rgba(66, 54, 35, 0.16);
}

.body-family-view.tree-style-tree .tree-viewport-wrapper {
    background-color: #e9e5d3;
    background-image:
        radial-gradient(ellipse at 12% 86%, rgba(90, 111, 65, 0.12), transparent 36%),
        radial-gradient(ellipse at 88% 18%, rgba(132, 111, 74, 0.1), transparent 32%),
        repeating-linear-gradient(103deg, rgba(86, 98, 62, 0.018) 0 1px, transparent 1px 26px);
    background-size: auto, auto, 100% 100%;
}

.body-family-view.tree-style-tree .tree-search-dock,
.body-family-view.tree-style-tree .tree-canvas-zoom,
.body-family-view.tree-style-tree .current-member-popover {
    border-color: rgba(116, 104, 73, 0.72);
    background-color: rgba(244, 239, 218, 0.94);
    box-shadow: 0 10px 26px rgba(68, 55, 35, 0.18);
}

.body-family-view.tree-style-tree .tree-style-selector {
    border-color: #9f9679;
    background-color: #d9d5c0;
}

.body-family-view.tree-style-tree .tree-botanical-node {
    display: block;
}

.body-family-view.tree-style-tree .tree-background-art,
.body-family-view.tree-style-tree .tree-ambient-decor {
    pointer-events: none;
}

.body-family-view.tree-style-tree .tree-ambient-decor {
    opacity: 0.82;
}

.body-family-view.tree-style-tree .tree-ambient-branch,
.body-family-view.tree-style-tree .tree-ambient-twig {
    fill: none;
    stroke: #776146;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.body-family-view.tree-style-tree .tree-ambient-branch {
    stroke-width: 2.7;
}

.body-family-view.tree-style-tree .tree-ambient-twig {
    stroke: #8a7655;
    stroke-width: 1.2;
}

.body-family-view.tree-style-tree .tree-ambient-leaf {
    fill: #879b61;
    stroke: #5c7048;
    stroke-width: 0.7;
    stroke-linejoin: round;
}

.body-family-view.tree-style-tree .tree-ambient-leaf-vein {
    fill: none;
    stroke: rgba(65, 83, 47, 0.62);
    stroke-width: 0.55;
    stroke-linecap: round;
}

.body-family-view.tree-style-tree .tree-ambient-sway {
    transform-box: fill-box;
    transform-origin: center bottom;
    animation: tree-ambient-sway 10s ease-in-out var(--tree-sway-delay, 0s) infinite alternate;
}

.body-family-view.tree-style-tree .tree-attached-bramble-group {
    pointer-events: none;
    opacity: 0.94;
}

.body-family-view.tree-style-tree .tree-attached-bramble-bark,
.body-family-view.tree-style-tree .tree-attached-bramble-stem,
.body-family-view.tree-style-tree .tree-attached-bramble-shoot,
.body-family-view.tree-style-tree .tree-attached-bramble-twig,
.body-family-view.tree-style-tree .tree-attached-bramble-thorn {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.body-family-view.tree-style-tree .tree-attached-bramble-bark {
    stroke: #3d2c1d;
    stroke-width: 8;
    opacity: 0.58;
}

.body-family-view.tree-style-tree .tree-attached-bramble-stem {
    stroke: #65472b;
    stroke-width: 4.2;
}

.body-family-view.tree-style-tree .tree-attached-bramble-root {
    fill: #4c3521;
    stroke: #2f2419;
    stroke-width: 1;
}

.body-family-view.tree-style-tree .tree-attached-bramble-shoot {
    stroke: #735334;
    stroke-width: 2.7;
}

.body-family-view.tree-style-tree .tree-attached-bramble-twig {
    stroke: #876743;
    stroke-width: 1.65;
}

.body-family-view.tree-style-tree .tree-attached-bramble-thorn {
    stroke: #5b4932;
    stroke-width: 1.1;
}

.body-family-view.tree-style-tree .tree-attached-bramble-bud {
    fill: #6e824c;
    stroke: #4e603d;
    stroke-width: 0.8;
    transform-box: fill-box;
    transform-origin: center;
    animation: tree-bud-pulse 4.2s ease-in-out var(--tree-bloom-delay, 0s) infinite alternate;
}

.body-family-view.tree-style-tree .tree-attached-bramble-leaf {
    fill: #788d56;
    stroke: #526844;
    stroke-width: 0.65;
    stroke-linejoin: round;
}

.body-family-view.tree-style-tree .tree-attached-bramble-leaf-1 {
    fill: #96a66a;
}

.body-family-view.tree-style-tree .tree-attached-bramble-leaf-2 {
    fill: #617b4a;
}

.body-family-view.tree-style-tree .tree-attached-bramble-leaf-sway {
    transform-box: fill-box;
    transform-origin: center;
    animation: tree-leaf-flutter 4.8s ease-in-out var(--tree-leaf-delay, 0s) infinite alternate;
}

.body-family-view.tree-style-tree .tree-attached-bramble-leaf-vein {
    fill: none;
    stroke: rgba(55, 73, 39, 0.66);
    stroke-width: 0.58;
    stroke-linecap: round;
}

.body-family-view.tree-style-tree .tree-attached-bramble-flower {
    pointer-events: none;
}

.body-family-view.tree-style-tree .tree-attached-bramble-flower-bloom {
    transform-box: fill-box;
    transform-origin: center;
    animation: tree-flower-bloom 5.8s ease-in-out var(--tree-bloom-delay, 0s) infinite alternate;
}

.body-family-view.tree-style-tree .tree-attached-bramble-petal {
    stroke: rgba(91, 67, 42, 0.72);
    stroke-width: 0.65;
}

.body-family-view.tree-style-tree .tree-attached-bramble-flower-0 .tree-attached-bramble-petal {
    fill: #d6a15b;
}

.body-family-view.tree-style-tree .tree-attached-bramble-flower-1 .tree-attached-bramble-petal {
    fill: #c77f76;
}

.body-family-view.tree-style-tree .tree-attached-bramble-flower-2 .tree-attached-bramble-petal {
    fill: #d8c47a;
}

.body-family-view.tree-style-tree .tree-attached-bramble-flower-center {
    fill: #69502c;
    stroke: #45341f;
    stroke-width: 0.7;
}

.body-family-view.tree-style-tree .tree-attached-bramble-sway,
.body-family-view.tree-style-tree .tree-attached-bramble-stem-sway {
    transform-box: view-box;
    animation: tree-attached-bramble-sway var(--tree-sway-duration, 9s) ease-in-out var(--tree-sway-delay, 0s) infinite alternate;
}

.body-family-view.tree-style-tree .tree-branch-glimmer {
    fill: none;
    stroke: #d4c37e;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-dasharray: 0.06 0.94;
    pointer-events: none;
    opacity: 0.82;
    animation: tree-branch-glimmer 6.2s linear var(--tree-glimmer-delay, 0s) infinite;
}

.body-family-view.tree-style-tree .tree-branch-glimmer.shadow {
    stroke: #b1c181;
    stroke-width: 1.15;
    opacity: 0.58;
}

.body-family-view.tree-style-tree .tree-node.botanical:not(.shadow) .tree-node-bg {
    fill: var(--tree-parchment);
    stroke: #79674b;
    stroke-width: 1.5;
    rx: 5px;
    ry: 5px;
    filter: drop-shadow(0 3px 3px rgba(59, 45, 29, 0.17));
}

.body-family-view.tree-style-tree .tree-node.botanical.focal:not(.shadow) .tree-node-bg {
    fill: #f5edcf;
    stroke: var(--tree-moss);
    stroke-width: 2.5;
}

.body-family-view.tree-style-tree .tree-node.botanical.deceased:not(.shadow) .tree-node-bg {
    fill: #dfdac3;
}

.body-family-view.tree-style-tree .tree-portrait-frame {
    fill: #806b49;
    stroke: #493a28;
    stroke-width: 2;
    opacity: 0.95;
    filter: drop-shadow(0 3px 3px rgba(55, 42, 26, 0.2));
}

.body-family-view.tree-style-tree .tree-portrait-well {
    fill: #d8d2b8;
    stroke: #b3aa8b;
    stroke-width: 1;
}

.body-family-view.tree-style-tree .tree-shadow-cameo-wash {
    fill: #d6dec1;
    stroke: none;
    filter: drop-shadow(0 2px 2px rgba(55, 74, 48, 0.14));
}

.body-family-view.tree-style-tree .tree-shadow-silhouette-head,
.body-family-view.tree-style-tree .tree-shadow-silhouette-shoulders {
    fill: rgba(63, 88, 60, 0.5);
    stroke: none;
}

.body-family-view.tree-style-tree .tree-shadow-cameo-branch {
    fill: none;
    stroke: #596b45;
    stroke-width: 2.4;
    stroke-linecap: round;
    filter: drop-shadow(0 1px 0 rgba(244, 239, 211, 0.54));
}

.body-family-view.tree-style-tree .tree-shadow-cameo-wash,
.body-family-view.tree-style-tree .tree-shadow-silhouette-head,
.body-family-view.tree-style-tree .tree-shadow-silhouette-shoulders,
.body-family-view.tree-style-tree .tree-shadow-cameo-branch,
.body-family-view.tree-style-tree .tree-shadow-name {
    transition: fill 0.18s ease, stroke 0.18s ease, opacity 0.18s ease, filter 0.18s ease;
}

.body-family-view.tree-style-tree .tree-node.shadow:is(:hover, :focus-visible, .shadow-highlighted) .tree-shadow-cameo-wash {
    fill: #ebefd3;
}

.body-family-view.tree-style-tree .tree-node.shadow:is(:hover, :focus-visible, .shadow-highlighted) .tree-shadow-silhouette-head,
.body-family-view.tree-style-tree .tree-node.shadow:is(:hover, :focus-visible, .shadow-highlighted) .tree-shadow-silhouette-shoulders {
    fill: rgba(50, 78, 52, 0.66);
}

.body-family-view.tree-style-tree .tree-node.shadow:is(:hover, :focus-visible, .shadow-highlighted) .tree-shadow-cameo-branch {
    stroke: #b19a58;
    stroke-width: 3;
}

.body-family-view.tree-style-tree .tree-shadow-leaf-spray {
    pointer-events: none;
    transform-box: fill-box;
    transform-origin: center bottom;
    animation: tree-shadow-foliage-sway 8.4s ease-in-out var(--tree-sway-delay, 0s) infinite alternate;
}

.body-family-view.tree-style-tree .tree-shadow-leaf {
    fill: #6d8250;
    stroke: #4e633f;
    stroke-width: 0.7;
    opacity: 0.82;
}

.body-family-view.tree-style-tree .tree-shadow-leaf-1 {
    fill: #8b9b62;
}

.body-family-view.tree-style-tree .tree-shadow-leaf-2 {
    fill: #586e46;
}

.body-family-view.tree-style-tree .tree-shadow-leaf-vein {
    fill: none;
    stroke: rgba(58, 76, 43, 0.58);
    stroke-width: 0.55;
    stroke-linecap: round;
}

.body-family-view.tree-style-tree .tree-portrait-image {
    display: block;
    pointer-events: none;
}

.body-family-view.tree-style-tree .tree-portrait-image-failed {
    display: none;
}

.body-family-view.tree-style-tree .tree-vine,
.body-family-view.tree-style-tree .tree-bramble-stem,
.body-family-view.tree-style-tree .tree-bramble-thorns {
    fill: none;
    stroke: var(--tree-moss);
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.body-family-view.tree-style-tree .tree-vine-front {
    stroke: var(--tree-leaf-light);
    stroke-width: 1.6;
}

.body-family-view.tree-style-tree .tree-vine-secondary {
    stroke: #6c7c4d;
    stroke-width: 1.25;
    opacity: 0.8;
}

.body-family-view.tree-style-tree .tree-leaf {
    fill: var(--tree-moss);
    stroke: #415535;
    stroke-width: 0.7;
    stroke-linejoin: round;
}

.body-family-view.tree-style-tree .tree-leaf-1 {
    fill: var(--tree-leaf-light);
}

.body-family-view.tree-style-tree .tree-leaf-2 {
    fill: #657d49;
}

.body-family-view.tree-style-tree .tree-leaf-vein {
    fill: none;
    stroke: rgba(58, 76, 43, 0.62);
    stroke-width: 0.55;
    stroke-linecap: round;
}

.body-family-view.tree-style-tree .tree-leaf-spray {
    transform-box: fill-box;
    transform-origin: center bottom;
    animation: tree-foliage-sway 6.5s ease-in-out var(--tree-sway-delay, 0s) infinite alternate;
}

.body-family-view.tree-style-tree .tree-node-text-name {
    fill: #332b20;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 12px;
}

.body-family-view.tree-style-tree .tree-node-text-dates {
    fill: #665b48;
    font-family: Georgia, 'Times New Roman', serif;
}

.body-family-view.tree-style-tree .tree-node.shadow .tree-node-bg,
.body-family-view.tree-style-tree .tree-node.shadow > .tree-node-text-name,
.body-family-view.tree-style-tree .tree-node.shadow > .tree-node-date-line {
    display: none;
}

.body-family-view.tree-style-tree .tree-bramble-stem,
.body-family-view.tree-style-tree .tree-bramble-thorns {
    stroke: #596847;
    stroke-width: 3.4;
}

.body-family-view.tree-style-tree .tree-bramble-stem-secondary {
    stroke: #78805b;
    stroke-width: 2;
}

.body-family-view.tree-style-tree .tree-bramble-stem-tertiary {
    stroke: #68734f;
    stroke-width: 1.7;
}

.body-family-view.tree-style-tree .tree-bramble-thorns {
    stroke: #62513a;
    stroke-width: 1.5;
}

.body-family-view.tree-style-tree .tree-bramble-bud {
    fill: #7b8d53;
    stroke: #4f603f;
    stroke-width: 0.8;
}

.body-family-view.tree-style-tree .tree-portrait-hit-area {
    pointer-events: all;
    cursor: pointer;
    fill: transparent;
    stroke: transparent;
}

.body-family-view.tree-style-tree .tree-portrait-hit-area:focus {
    fill: rgba(230, 239, 204, 0.12);
    stroke: var(--tree-moss);
    stroke-width: 2;
}

.body-family-view.tree-style-tree .tree-node.botanical:focus-visible .tree-portrait-frame {
    stroke: var(--tree-moss);
    stroke-width: 4;
}

.body-family-view.tree-style-tree .tree-node.shadow:focus-visible .tree-shadow-hit-area {
    fill: rgba(230, 239, 204, 0.08);
    stroke: #d8c879;
    stroke-width: 2;
}

.body-family-view.tree-style-tree .tree-shadow-name {
    fill: #6f6957;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 10px;
    font-style: italic;
}

.body-family-view.tree-style-tree .tree-connector {
    stroke: var(--tree-bark);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.28));
    transition: stroke 0.5s ease, stroke-width 0.5s ease, opacity 0.5s ease;
}

.body-family-view.tree-style-tree .tree-connector.branch-bark {
    stroke: var(--tree-bark-dark);
    stroke-width: 9;
    opacity: 0.56;
    filter: drop-shadow(0 2px 1px rgba(59, 45, 29, 0.22));
}

.body-family-view.tree-style-tree .tree-connector.branch-bark.partner {
    stroke-width: 5.5;
    opacity: 0.48;
}

.body-family-view.tree-style-tree .tree-connector.parent-child {
    stroke-width: 4.4;
}

.body-family-view.tree-style-tree .tree-connector.branch-bark.parent-child {
    stroke-width: 9;
}

.body-family-view.tree-style-tree .tree-connector.partner {
    stroke: #765a37;
    stroke-width: 2.6;
    opacity: 0.88;
}

.body-family-view.tree-style-tree .tree-connector.shadow {
    stroke: #68734f;
    stroke-width: 3;
    stroke-dasharray: 5, 4;
}

.body-family-view.tree-style-tree .tree-connector.branch-bark.shadow {
    stroke: #4e5c40;
    stroke-width: 5.5;
    opacity: 0.7;
}

.body-family-view.tree-style-tree .tree-connector.shadow.shadow-highlighted {
    stroke: var(--tree-moss);
    stroke-width: 3.5;
    opacity: 0.9;
}

.body-family-view.tree-style-tree .tree-connector.branch-growing,
.body-family-view.tree-style-tree.tree-focus-sprouting .tree-connector {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: tree-branch-grow 0.6s cubic-bezier(0.28, 0.74, 0.25, 1) forwards;
}

.body-family-view.tree-style-tree .tree-node.node-blooming .tree-botanical-node,
.body-family-view.tree-style-tree.tree-focus-sprouting .tree-node.botanical:not(.shadow) .tree-botanical-node {
    transform-box: fill-box;
    transform-origin: center bottom;
    animation: tree-node-bloom 0.6s cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.tree-style-transitioning .tree-svg {
    animation: tree-style-reveal 0.6s ease both;
}

@keyframes tree-foliage-sway {
    from { transform: rotate(-3.2deg) translateY(1px); }
    to { transform: rotate(3.2deg) translateY(-1px); }
}

@keyframes tree-ambient-sway {
    from { transform: rotate(-3.4deg) translateY(1px); }
    to { transform: rotate(3.4deg) translateY(-2px); }
}

@keyframes tree-attached-bramble-sway {
    from { transform: rotate(-5.5deg) translateY(2px); }
    to { transform: rotate(5.5deg) translateY(-4px); }
}

@keyframes tree-leaf-flutter {
    from { transform: rotate(-5.5deg) translateY(2px); }
    to { transform: rotate(5.5deg) translateY(-2px); }
}

@keyframes tree-bud-pulse {
    from { transform: scale(0.72); opacity: 0.62; }
    to { transform: scale(1.25); opacity: 1; }
}

@keyframes tree-flower-bloom {
    from { transform: scale(0.72) rotate(-6deg); opacity: 0.58; }
    to { transform: scale(1.08) rotate(6deg); opacity: 1; }
}

@keyframes tree-shadow-foliage-sway {
    from { transform: rotate(-4.2deg) translateY(1px); }
    to { transform: rotate(4.2deg) translateY(-2px); }
}

@keyframes tree-branch-glimmer {
    0% { stroke-dashoffset: 1; opacity: 0.24; }
    18% { opacity: 0.88; }
    72% { opacity: 0.88; }
    100% { stroke-dashoffset: 0; opacity: 0.24; }
}

@keyframes tree-branch-grow {
    to { stroke-dashoffset: 0; }
}

@keyframes tree-node-bloom {
    from { opacity: 0; transform: translateY(8px) scale(0.72); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes tree-style-reveal {
    0% { opacity: 0.62; }
    100% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .body-family-view,
    .body-family-view *,
    .tree-style-transitioning .tree-svg {
        scroll-behavior: auto !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* Role-aware editing controls */
.history-controls,
.family-edit-controls {
        display: flex;
        align-items: center;
        gap: 0.4rem;
    }

    .history-btn,
    .compact-action-btn {
        width: auto;
        padding: 0.45rem 0.75rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    .history-btn {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.1rem;
        height: 2.1rem;
        padding: 0;
        border-radius: 9999px;
    }

    .history-arrow {
        font-size: 1.05rem;
        line-height: 1;
    }

    .history-count {
        position: absolute;
        top: -0.3rem;
        right: -0.3rem;
        min-width: 1rem;
        padding: 0 0.25rem;
        border-radius: 9999px;
        background-color: var(--primary-color);
        color: #ffffff;
        font-size: 0.62rem;
        font-weight: 700;
        line-height: 1rem;
        text-align: center;
    }

    .history-count:empty,
    .history-btn:disabled .history-count {
        display: none;
    }

    .btn:disabled {
        cursor: not-allowed;
        opacity: 0.5;
    }

    .btn-danger {
        width: auto;
        border: 1px solid #dc2626;
        background: #dc2626;
        color: #ffffff;
    }

    .btn-danger:hover {
        background: #b91c1c;
    }

    .section-header-copy {
        min-width: 0;
    }

    .family-card {
        position: relative;
        padding: 0;
        cursor: default;
    }

    .family-card-open {
        width: 100%;
        min-height: 112px;
        padding: 1.5rem;
        border: 0;
        border-radius: inherit;
        background: transparent;
        color: inherit;
        font: inherit;
        text-align: left;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .family-card-open:focus-visible {
        outline: 2px solid var(--primary-color);
        outline-offset: 3px;
    }

    .family-card-delete {
        position: absolute;
        top: 0.45rem;
        right: 0.45rem;
        z-index: 2;
        width: 1.75rem;
        height: 1.75rem;
        border: 1px solid #fecaca;
        border-radius: 9999px;
        background: #fff7f7;
        color: #b91c1c;
        font-size: 1.15rem;
        line-height: 1;
        cursor: pointer;
    }

    .family-card-delete:hover,
    .family-card-delete:focus-visible {
        border-color: #ef4444;
        background: #fee2e2;
        outline: none;
    }

    .editor-dialog {
        width: min(620px, calc(100vw - 2rem));
        max-height: min(760px, calc(100vh - 2rem));
        margin: auto;
        padding: 0;
        border: 0;
        border-radius: var(--border-radius-lg);
        background: var(--bg-card);
        color: var(--text-primary);
        box-shadow: var(--shadow-lg);
        overflow: auto;
    }

    .editor-dialog::backdrop {
        background: rgba(15, 23, 42, 0.5);
        backdrop-filter: blur(2px);
    }

    .editor-dialog form {
        padding: 1.5rem;
    }

    .editor-dialog-heading {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 1rem;
        margin-bottom: 1.25rem;
    }

    .editor-dialog-heading h2 {
        font-size: 1.25rem;
    }

    .editor-dialog-description {
        margin-top: 0.25rem;
        color: var(--text-secondary);
        font-size: 0.82rem;
    }

    .editor-dialog-close {
        flex: 0 0 auto;
        width: 2rem;
        height: 2rem;
        border: 0;
        border-radius: 9999px;
        background: #f1f5f9;
        color: var(--text-secondary);
        font-size: 1.3rem;
        cursor: pointer;
    }

    .editor-form-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0 1rem;
    }

    .member-date-editors {
        margin-bottom: 0.75rem;
    }

    .date-editor {
        min-width: 0;
        margin: 0 0 0.75rem;
        padding: 0.8rem;
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius-md);
    }

    .date-editor legend {
        padding: 0 0.35rem;
        color: var(--text-primary);
        font-size: 0.82rem;
        font-weight: 700;
    }

    .fuzzy-date-fields {
        display: flex;
        gap: 0.45rem;
    }

    .fuzzy-date-field {
        display: flex;
        flex: 1 1 3.4rem;
        flex-direction: column;
        gap: 0.2rem;
        min-width: 0;
        color: var(--text-secondary);
        font-size: 0.72rem;
        font-weight: 600;
    }

    .fuzzy-date-field-year {
        flex: 1.4 1 4.4rem;
    }

    .fuzzy-date-field input {
        padding: 0.4rem 0.5rem;
    }

    .fuzzy-date-uncertain {
        margin-top: 0.5rem;
    }

    .fuzzy-date-range {
        display: grid;
        gap: 0.6rem;
    }

    .fuzzy-date-boundary-label {
        display: block;
        margin-bottom: 0.25rem;
        color: var(--text-secondary);
        font-size: 0.72rem;
        font-weight: 700;
    }

    .date-editor-footer {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 0.5rem;
        margin-top: 0.6rem;
    }

    .date-editor-toggle {
        padding: 0;
        border: 0;
        background: none;
        color: var(--primary-color);
        font: inherit;
        font-size: 0.75rem;
        font-weight: 600;
        white-space: nowrap;
        cursor: pointer;
    }

    .date-editor-toggle:hover,
    .date-editor-toggle:focus-visible {
        text-decoration: underline;
    }

    .date-editor-hint {
        color: var(--text-light);
        font-size: 0.72rem;
        text-align: right;
    }

    .member-initial-relationships {
        margin: 0 0 0.9rem;
        padding: 0.8rem;
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius-md);
    }

    .member-initial-relationships legend {
        padding: 0 0.35rem;
        font-size: 0.82rem;
        font-weight: 700;
    }

    .member-relationship-rows {
        display: grid;
        gap: 0.45rem;
        margin-bottom: 0.6rem;
    }

    .member-relationship-rows:empty {
        margin-bottom: 0;
    }

    .member-relationship-list {
        display: grid;
        gap: 0.4rem;
        margin: 0 0 0.6rem;
        padding: 0;
        list-style: none;
    }

    .member-relationship-list:empty {
        margin-bottom: 0;
    }

    .member-relationship-list li {
        display: flex;
        align-items: baseline;
        gap: 0.5rem;
        color: var(--text-secondary);
        font-size: 0.8rem;
    }

    .member-relationship-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr) auto;
        gap: 0.4rem;
        align-items: center;
    }

    .member-relationship-remove {
        width: 1.75rem;
        height: 1.75rem;
        border: 1px solid #fecaca;
        border-radius: 9999px;
        background: #fff7f7;
        color: #b91c1c;
        font-size: 1.05rem;
        line-height: 1;
        cursor: pointer;
    }

    .member-relationship-remove:hover,
    .member-relationship-remove:focus-visible {
        border-color: #ef4444;
        background: #fee2e2;
        outline: none;
    }

    .relationship-source {
        display: flex;
        align-items: baseline;
        gap: 0.35rem;
        margin-bottom: 1rem;
        color: var(--text-secondary);
        font-size: 0.82rem;
    }

    .relationship-source strong {
        color: var(--text-primary);
    }

    .editor-dialog textarea.form-control {
        resize: vertical;
    }

    .form-help {
        color: var(--text-light);
        font-size: 0.75rem;
    }

    .checkbox-label {
        display: inline-flex;
        align-items: center;
        gap: 0.45rem;
        color: var(--text-secondary);
        font-size: 0.82rem;
    }

    .member-photo-editor {
        display: flex;
        align-items: flex-start;
        gap: 1rem;
        padding-top: 0.25rem;
    }

    .member-photo-editor .form-group {
        flex: 1;
    }

    .member-photo-preview {
        width: 84px;
        height: 104px;
        flex: 0 0 auto;
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius-md);
        background: #f8fafc;
        object-fit: cover;
    }

    .editor-message {
        display: none;
        margin-bottom: 1rem;
        padding: 0.65rem 0.8rem;
        border: 1px solid #a7f3d0;
        border-radius: var(--border-radius-sm);
        background: #ecfdf5;
        color: #047857;
        font-size: 0.82rem;
    }

    .editor-message.is-visible {
        display: block;
    }

    .editor-message.is-error {
        border-color: #fecaca;
        background: #fef2f2;
        color: #b91c1c;
    }

    .editor-dialog-actions {
        display: flex;
        justify-content: flex-end;
        gap: 0.6rem;
    }

    .editor-dialog-actions .btn {
        width: auto;
        padding: 0.6rem 1rem;
    }

    .editor-dialog-actions-split {
        align-items: center;
    }

    .editor-action-spacer {
        flex: 1;
    }

    @media (max-width: 650px) {
        .history-controls {
            gap: 0.2rem;
        }

        .history-btn {
            width: 1.9rem;
            height: 1.9rem;
            padding: 0;
        }

        .section-header {
            flex-direction: column;
            align-items: flex-start;
            gap: 0.75rem;
        }

        .family-selection-actions {
            justify-content: flex-start;
        }

        .compact-action-btn {
            padding: 0.4rem 0.6rem;
        }

        .editor-dialog {
            width: calc(100vw - 1rem);
            max-height: calc(100vh - 1rem);
        }

        .editor-dialog form {
            padding: 1rem;
        }

        .editor-form-grid {
            grid-template-columns: 1fr;
        }

        .member-relationship-row {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .member-photo-editor {
            flex-direction: column;
        }

        .editor-dialog-actions {
            flex-wrap: wrap;
        }

        .editor-dialog-actions .btn {
            flex: 1 1 auto;
        }

        .editor-dialog-actions-split .btn-danger {
            flex-basis: 100%;
        }
    }

/* Full-screen tree-view overrides */
.body-family-view {
    height: 100vh !important;
    overflow: hidden !important;
}

.body-family-view header {
    position: relative;
    z-index: 30;
    transform: none;
    opacity: 1;
    transition: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-card);
    gap: 0.65rem 1rem;
}

.body-family-view main {
    height: auto !important;
    min-height: 0;
}

.header-family-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    margin: 0 1.5rem;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    padding: 0 1.5rem;
}

.header-family-info strong {
    font-size: 1.05rem;
    color: var(--primary-color);
    font-weight: 700;
}

.header-family-info span {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.family-tree-toolbar {
    display: none;
}

.body-family-view .family-tree-toolbar {
    display: flex !important;
    flex: 0 0 auto;
    align-items: flex-start;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--border-color);
    background: #f8fafc;
}

.body-family-view .family-tree-toolbar .tree-controls {
    justify-content: flex-start;
}

/* Hide stats, chronological list, and other widgets in full-screen view */
.body-family-view .stats-grid,
.body-family-view .details-split,
.body-family-view h3,
.body-family-view .env-badge-wrapper,
.body-family-view footer {
    display: none !important;
}

.body-family-view main {
    max-width: none !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    height: 100vh !important;
    overflow: hidden !important;
}

.body-family-view #family-view {
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    margin: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}

.body-family-view .tree-container-box {
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    width: 100% !important;
}

.body-family-view .tree-viewport-wrapper {
    flex: 1 !important;
    height: 100% !important;
    width: 100% !important;
}

.body-family-view .tree-control-btn {
    padding: 0.375rem 0.75rem !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    border-radius: 9999px !important;
    background-color: #ffffff !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
    width: auto !important;
    margin: 0 !important;
}

.body-family-view .tree-control-btn:hover {
    background-color: var(--primary-light) !important;
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.body-family-view .tree-control-btn.active {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
    border-color: var(--primary-color) !important;
}

.body-family-view .language-switcher {
    font-size: 0.7rem;
}

.body-family-view .language-switcher select {
    padding: 0.3rem 1.35rem 0.3rem 0.45rem;
    border-radius: 9999px;
    background-color: #ffffff;
    box-shadow: var(--shadow-sm);
}

.body-family-view .tree-layout-options {
    font-size: 0.7rem;
}

.body-family-view .tree-layout-options select {
    border-radius: 9999px;
    background-color: #ffffff;
    box-shadow: var(--shadow-sm);
}

.body-family-view .tree-canvas-zoom {
    width: 56px !important;
    min-width: 56px !important;
}

.body-family-view .focus-indicator {
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    padding: 0.375rem 0.75rem !important;
    border-radius: 9999px !important;
    background-color: #f1f5f9 !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-secondary) !important;
    white-space: nowrap !important;
}

.body-family-view .focus-indicator[aria-pressed="true"] {
    border-color: #94a3b8 !important;
    background-color: #e2e8f0 !important;
    box-shadow: inset 0 2px 4px rgba(15, 23, 42, 0.16), inset 0 1px 1px rgba(15, 23, 42, 0.08) !important;
    transform: translateY(1px);
}

.body-family-view .tree-search {
    min-width: 220px;
}

.body-family-view .tree-search input {
    min-width: 170px;
}

/* Responsive adjustments for small windows/screens under 650px wide */
@media (max-width: 650px) {
    .body-family-view header {
        padding: 0.5rem 0.75rem !important;
        gap: 0.35rem 0.5rem !important;
        align-items: center !important;
    }
    
    .body-family-view .header-family-info {
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        flex: 1 1 auto !important;
        width: auto !important;
    }
    
    .body-family-view .user-nav {
        gap: 0.5rem !important;
    }

    .body-family-view .language-switcher span {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
    
    .body-family-view .family-tree-toolbar {
        width: 100%;
    }

    .body-family-view .tree-layout-options {
        padding: 0.35rem 0 0;
        border-top: 1px solid var(--border-color);
        border-left: 0;
        justify-content: space-between;
    }

    .body-family-view .tree-layout-options label {
        flex: 1 1 auto;
        justify-content: space-between;
    }

    .body-family-view .tree-controls {
        width: 100% !important;
    }

    .body-family-view .tree-search-dock {
        left: 0.6rem;
        bottom: 0.6rem;
        flex-direction: column;
        align-items: stretch;
        gap: 0.35rem;
        max-width: calc(100% - 4.2rem);
    }

    .body-family-view .tree-search {
        width: 100%;
        min-width: 0;
        flex: 0 1 auto;
    }

    .body-family-view .tree-canvas-zoom {
        top: 0.6rem;
        right: 0.6rem;
        height: min(230px, calc(100% - 1.2rem));
        width: 56px !important;
        min-width: 56px !important;
    }

    .body-family-view .tree-control-btn {
        padding: 0.3rem 0.6rem !important;
        font-size: 0.7rem !important;
        flex-grow: 1 !important;
        text-align: center !important;
        border-radius: 9999px !important;
    }

    .body-family-view .focus-indicator {
        padding: 0.3rem 0.6rem !important;
        font-size: 0.7rem !important;
        width: 100% !important;
        text-align: center !important;
        border-radius: 9999px !important;
    }

}

@media (min-width: 651px) and (max-width: 1000px) {
    .body-family-view .family-tree-toolbar {
        flex-basis: auto;
        width: 100%;
    }

    .body-family-view .tree-controls {
        justify-content: center;
    }
}

/* Tree-mode interface: a quiet field-notebook palette for the controls around the artwork. */
.body-family-view.tree-style-tree {
    --tree-ui-paper: #eee7ca;
    --tree-ui-paper-light: #f7f1da;
    --tree-ui-paper-deep: #d7cba6;
    --tree-ui-line: #a3926c;
    --tree-ui-line-dark: #796747;
    --tree-ui-ink: #423827;
    --tree-ui-moss: #4f6f43;
    --tree-ui-moss-dark: #3d5b35;
}

.body-family-view.tree-style-tree header {
    background-color: var(--tree-ui-paper) !important;
    background-image: repeating-linear-gradient(
        102deg,
        rgba(108, 91, 57, 0.035) 0,
        rgba(108, 91, 57, 0.035) 1px,
        transparent 1px,
        transparent 24px
    ) !important;
    border-bottom: 1px solid var(--tree-ui-line-dark) !important;
    box-shadow: 0 2px 0 rgba(91, 69, 37, 0.16), 0 5px 14px rgba(68, 55, 35, 0.12) !important;
}

.body-family-view.tree-style-tree .header-family-info {
    border-color: rgba(121, 103, 71, 0.48);
}

.body-family-view.tree-style-tree .header-family-info strong {
    color: var(--tree-ui-moss-dark);
    font-family: Georgia, 'Times New Roman', serif;
    letter-spacing: 0.01em;
}

.body-family-view.tree-style-tree .header-back-btn {
    position: relative;
    padding: 0.42rem 0.85rem 0.42rem 1.25rem !important;
    border-radius: 4px 13px 4px 12px !important;
    background-color: var(--tree-ui-paper-light) !important;
    box-shadow: 2px 2px 0 rgba(103, 79, 43, 0.16) !important;
    transform: rotate(-1.4deg);
}

.body-family-view.tree-style-tree .header-back-btn::before {
    position: absolute;
    top: 50%;
    left: 0.55rem;
    width: 0.42rem;
    height: 0.7rem;
    border-radius: 80% 8% 80% 8%;
    background: var(--tree-ui-moss);
    content: '';
    transform: translateY(-50%) rotate(-38deg);
}

.body-family-view.tree-style-tree .language-switcher {
    color: var(--tree-ui-ink);
}

.body-family-view.tree-style-tree .language-switcher select,
.body-family-view.tree-style-tree .tree-layout-options select {
    border: 1px solid var(--tree-ui-line) !important;
    border-radius: 5px !important;
    background-color: var(--tree-ui-paper-light) !important;
    color: var(--tree-ui-ink) !important;
    box-shadow: inset 0 1px 2px rgba(88, 67, 37, 0.12), 0 1px 0 rgba(255, 255, 255, 0.45) !important;
}

.body-family-view.tree-style-tree .family-tree-toolbar {
    background-color: rgba(216, 205, 170, 0.92) !important;
    background-image: repeating-linear-gradient(
        96deg,
        rgba(108, 91, 57, 0.035) 0,
        rgba(108, 91, 57, 0.035) 1px,
        transparent 1px,
        transparent 20px
    ) !important;
    border-bottom-color: var(--tree-ui-line) !important;
}

.body-family-view.tree-style-tree .tree-layout-options {
    border-left-color: var(--tree-ui-line) !important;
    color: var(--tree-ui-ink) !important;
}

.body-family-view.tree-style-tree .tree-layout-label,
.body-family-view.tree-style-tree .tree-layout-options label {
    color: var(--tree-ui-ink);
}

.body-family-view.tree-style-tree .tree-control-btn {
    border: 1px solid var(--tree-ui-line) !important;
    border-radius: 5px !important;
    background-color: var(--tree-ui-paper-light) !important;
    color: var(--tree-ui-ink) !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.52), 0 2px 4px rgba(86, 66, 37, 0.12) !important;
}

.body-family-view.tree-style-tree .tree-control-btn:hover,
.body-family-view.tree-style-tree .tree-control-btn:focus-visible {
    border-color: var(--tree-ui-moss) !important;
    background-color: #e4e9d3 !important;
    color: var(--tree-ui-moss-dark) !important;
    box-shadow: 0 2px 5px rgba(65, 84, 51, 0.2) !important;
}

.body-family-view.tree-style-tree .tree-control-btn.active {
    border-color: var(--tree-ui-moss-dark) !important;
    background-color: var(--tree-ui-moss) !important;
    color: #f6f0d9 !important;
    box-shadow: inset 0 1px 2px rgba(34, 53, 29, 0.26), 0 2px 4px rgba(66, 82, 45, 0.18) !important;
}

.body-family-view.tree-style-tree .tree-style-selector {
    gap: 0.2rem;
    padding: 0 !important;
    border: none !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

.body-family-view.tree-style-tree .tree-style-selector .tree-control-btn {
    border-color: transparent !important;
    border-radius: 5px !important;
    box-shadow: none !important;
}

.body-family-view.tree-style-tree .tree-search-dock,
.body-family-view.tree-style-tree .current-member-popover,
.body-family-view.tree-style-tree .tree-canvas-zoom {
    border-color: var(--tree-ui-line) !important;
    border-radius: 7px !important;
    background-color: rgba(242, 235, 210, 0.97) !important;
    background-image: repeating-linear-gradient(
        100deg,
        rgba(108, 91, 57, 0.028) 0,
        rgba(108, 91, 57, 0.028) 1px,
        transparent 1px,
        transparent 22px
    ) !important;
    box-shadow: 0 3px 0 rgba(103, 79, 43, 0.12), 0 10px 22px rgba(68, 55, 35, 0.2) !important;
}

.body-family-view.tree-style-tree .tree-search-label,
.body-family-view.tree-style-tree .tree-zoom-control label {
    color: var(--tree-ui-ink) !important;
    font-family: Georgia, 'Times New Roman', serif;
    letter-spacing: 0.02em;
}

.body-family-view.tree-style-tree .tree-search input {
    border-color: var(--tree-ui-line) !important;
    border-radius: 4px !important;
    background-color: var(--tree-ui-paper-light) !important;
    color: var(--tree-ui-ink) !important;
    box-shadow: inset 0 1px 2px rgba(88, 67, 37, 0.14) !important;
}

.body-family-view.tree-style-tree .tree-search input:focus {
    outline: 2px solid rgba(79, 111, 67, 0.3);
    border-color: var(--tree-ui-moss) !important;
}

.body-family-view.tree-style-tree .focus-indicator {
    border-color: var(--tree-ui-line) !important;
    border-radius: 5px !important;
    background-color: var(--tree-ui-paper-deep) !important;
    color: var(--tree-ui-ink) !important;
    box-shadow: inset 0 1px 2px rgba(88, 67, 37, 0.12), 0 1px 0 rgba(255, 255, 255, 0.42) !important;
}

.body-family-view.tree-style-tree .focus-indicator:hover,
.body-family-view.tree-style-tree .focus-indicator:focus-visible {
    border-color: var(--tree-ui-moss) !important;
    background-color: #e4e9d3 !important;
    color: var(--tree-ui-moss-dark) !important;
}

.body-family-view.tree-style-tree .focus-indicator[aria-pressed="true"] {
    border-color: var(--tree-ui-line-dark) !important;
    background-color: #d2c49a !important;
    box-shadow: inset 0 2px 4px rgba(82, 62, 34, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.26) !important;
}

.body-family-view.tree-style-tree .tree-canvas-zoom input {
    accent-color: var(--tree-ui-moss);
}

.body-family-view.tree-style-tree .tree-canvas-zoom output,
.body-family-view.tree-style-tree .tree-zoom-control output {
    color: var(--tree-ui-moss-dark) !important;
    font-family: Georgia, 'Times New Roman', serif;
}

.body-family-view.tree-style-tree .current-member-popover-heading,
.body-family-view.tree-style-tree .current-member-details h4,
.body-family-view.tree-style-tree .current-member-group-heading,
.body-family-view.tree-style-tree .current-member-children-heading {
    color: var(--tree-ui-moss-dark) !important;
}

.body-family-view.tree-style-tree .current-member-close,
.body-family-view.tree-style-tree .current-member-edit {
    color: var(--tree-ui-moss-dark);
}

.body-family-view.tree-style-tree .current-member-close:hover,
.body-family-view.tree-style-tree .current-member-edit:hover {
    background-color: #dce5c9;
    color: var(--tree-ui-moss-dark);
}

.body-family-view.tree-style-tree .current-member-details,
.body-family-view.tree-style-tree .current-member-details section:not(.hidden) ~ section:not(.hidden) {
    border-color: rgba(121, 103, 71, 0.38);
}

.body-family-view.tree-style-tree .current-member-reference,
.body-family-view.tree-style-tree .current-member-reference:hover,
.body-family-view.tree-style-tree .current-member-reference:focus-visible {
    color: var(--tree-ui-moss-dark);
}

.body-family-view.tree-style-tree .current-member-reference:focus-visible {
    outline-color: rgba(79, 111, 67, 0.42);
}


.body-family-view.tree-style-tree header,
.body-family-view.tree-style-tree .family-tree-toolbar {
    position: relative;
}

.body-family-view.tree-style-tree .tree-search-dock,
.body-family-view.tree-style-tree .tree-canvas-zoom,
.body-family-view.tree-style-tree .current-member-popover {
    position: absolute;
}

.body-family-view.tree-style-tree header::after {
    position: absolute;
    right: 7%;
    bottom: -4px;
    left: 7%;
    height: 7px;
    border-radius: 50%;
    background: var(--tree-ui-line-dark);
    box-shadow: 0 2px 0 rgba(70, 53, 28, 0.16);
    content: '';
    transform: rotate(-0.4deg);
}

.body-family-view.tree-style-tree .family-tree-toolbar {
    padding: 0.75rem 1.1rem 0.8rem !important;
    border-bottom: 3px solid var(--tree-ui-line-dark) !important;
    background-image: repeating-linear-gradient(
        96deg,
        rgba(108, 91, 57, 0.05) 0,
        rgba(108, 91, 57, 0.05) 1px,
        transparent 1px,
        transparent 20px
    ) !important;
}

.body-family-view.tree-style-tree .family-tree-toolbar::after {
    position: absolute;
    right: 14%;
    bottom: -6px;
    width: 4rem;
    height: 0.75rem;
    border-right: 3px solid var(--tree-ui-line-dark);
    border-bottom: 3px solid var(--tree-ui-line-dark);
    border-radius: 0 0 65% 0;
    content: '';
    transform: rotate(7deg);
}

.body-family-view.tree-style-tree .tree-layout-options {
    position: relative;
    gap: 0.5rem;
    padding: 0.35rem 0 0.35rem 1rem !important;
    border-left: 4px solid var(--tree-bark) !important;
    border-radius: 3px 0 0 3px;
    background: rgba(238, 231, 202, 0.62);
    box-shadow: 2px 0 0 rgba(121, 103, 71, 0.18);
}

.body-family-view.tree-style-tree .tree-layout-options::before {
    position: absolute;
    top: 0.4rem;
    left: -0.6rem;
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 80% 8% 80% 8%;
    background: var(--tree-ui-moss);
    box-shadow: 0 1.2rem 0 var(--tree-leaf-light), 0 2.4rem 0 var(--tree-ui-moss);
    content: '';
    transform: rotate(-42deg);
}

.body-family-view.tree-style-tree .tree-layout-options label {
    padding: 0.22rem 0.35rem 0.22rem 0.5rem;
    border: 1px solid var(--tree-ui-line);
    color: var(--tree-ui-ink) !important;
    background: var(--tree-ui-paper-light);
    box-shadow: 1px 2px 0 rgba(103, 79, 43, 0.12);
}

.body-family-view.tree-style-tree .tree-layout-options label:nth-of-type(1) {
    border-radius: 3px 12px 4px 9px;
    transform: rotate(-1deg);
}

.body-family-view.tree-style-tree .tree-layout-options label:nth-of-type(2) {
    border-radius: 11px 4px 9px 3px;
    transform: rotate(0.8deg);
}

.body-family-view.tree-style-tree .tree-layout-options label:nth-of-type(3) {
    border-radius: 4px 9px 3px 12px;
    transform: rotate(-0.5deg);
}

.body-family-view.tree-style-tree .tree-layout-options select {
    border-radius: 2px 8px 3px 7px !important;
    background-color: var(--tree-ui-paper) !important;
}

.body-family-view.tree-style-tree .tree-style-selector {
    position: relative;
    gap: 0.35rem;
    align-items: center;
    padding-left: 1.1rem !important;
}

.body-family-view.tree-style-tree .tree-style-selector::before {
    position: absolute;
    top: 50%;
    left: 0;
    width: 1rem;
    height: 3px;
    border-radius: 50%;
    background: var(--tree-bark);
    content: '';
    transform: rotate(-13deg);
}

.body-family-view.tree-style-tree .tree-style-selector .tree-control-btn {
    padding: 0.45rem 0.8rem !important;
    border-color: var(--tree-ui-line) !important;
    box-shadow: 1px 2px 0 rgba(103, 79, 43, 0.14) !important;
}

.body-family-view.tree-style-tree .tree-style-selector .tree-control-btn:first-child {
    border-radius: 12px 3px 12px 4px !important;
    transform: rotate(-1.2deg);
}

.body-family-view.tree-style-tree .tree-style-selector .tree-control-btn:last-child {
    border-radius: 4px 12px 3px 12px !important;
    transform: rotate(1.5deg);
}

.body-family-view.tree-style-tree .tree-style-selector .tree-control-btn.active {
    border-color: var(--tree-ui-moss-dark) !important;
    box-shadow: inset 0 1px 2px rgba(34, 53, 29, 0.26), 1px 2px 0 rgba(66, 82, 45, 0.18) !important;
}

.body-family-view.tree-style-tree #shadow-trees-toggle {
    position: relative;
    padding: 0.48rem 0.95rem 0.48rem 1.15rem !important;
    border-radius: 75% 9% 75% 9% !important;
    background-color: var(--tree-ui-paper-deep) !important;
    box-shadow: 1px 3px 0 rgba(103, 79, 43, 0.18) !important;
    transform: rotate(-2deg);
}

.body-family-view.tree-style-tree #shadow-trees-toggle::before {
    position: absolute;
    top: 50%;
    left: 0.45rem;
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 80% 8% 80% 8%;
    background: var(--tree-ui-moss);
    content: '';
    transform: translateY(-50%) rotate(-42deg);
}

.body-family-view.tree-style-tree #shadow-trees-toggle.active {
    background-color: var(--tree-ui-moss) !important;
    color: #f6f0d9 !important;
}

.body-family-view.tree-style-tree #reset-zoom-btn {
    padding: 0.46rem 0.85rem !important;
    border-radius: 50% 4px 50% 4px !important;
    background-color: var(--tree-ui-paper-light) !important;
    box-shadow: 2px 2px 0 rgba(103, 79, 43, 0.16) !important;
    transform: rotate(1.5deg);
}

.body-family-view.tree-style-tree .tree-search-dock {
    padding: 0.7rem 0.8rem 0.75rem !important;
    border-width: 1px 1px 1px 5px !important;
    border-radius: 4px 13px 5px 11px !important;
    background-color: var(--tree-ui-paper) !important;
    box-shadow: 3px 4px 0 rgba(103, 79, 43, 0.13), 0 10px 22px rgba(68, 55, 35, 0.2) !important;
    transform: rotate(-0.7deg);
}

.body-family-view.tree-style-tree .tree-search-dock::before {
    position: absolute;
    top: -0.4rem;
    right: 1.2rem;
    left: 1.2rem;
    height: 0.28rem;
    border-radius: 50%;
    background: var(--tree-bark);
    box-shadow: 0 0.23rem 0 rgba(79, 111, 67, 0.62);
    content: '';
    transform: rotate(1deg);
}

.body-family-view.tree-style-tree .tree-search input {
    border-radius: 3px 11px 4px 9px !important;
}

.body-family-view.tree-style-tree .focus-indicator {
    border-radius: 78% 8% 72% 10% !important;
    background-color: #d2c49a !important;
    box-shadow: 1px 2px 0 rgba(103, 79, 43, 0.15) !important;
    transform: rotate(1.2deg);
}

.body-family-view.tree-style-tree .focus-indicator[aria-pressed="true"] {
    transform: translateY(1px) rotate(1.2deg);
}

.body-family-view.tree-style-tree .tree-canvas-zoom {
    overflow: hidden;
    width: 62px !important;
    min-width: 62px !important;
    padding: 0.6rem 0.8rem !important;
    border-radius: 8px 3px 13px 5px !important;
    background-color: var(--tree-ui-paper-light) !important;
    box-shadow: 2px 4px 0 rgba(103, 79, 43, 0.16), 0 10px 22px rgba(68, 55, 35, 0.16) !important;
    transform: rotate(1deg);
}

.body-family-view.tree-style-tree .tree-canvas-zoom::before {
    position: absolute;
    top: 2.2rem;
    bottom: 2.2rem;
    left: 50%;
    width: 4px;
    border-radius: 50%;
    background: var(--tree-bark);
    box-shadow: -0.45rem 1.6rem 0 -1px var(--tree-bark), 0.45rem 3.3rem 0 -1px var(--tree-bark);
    content: '';
    transform: rotate(5deg);
}

.body-family-view.tree-style-tree .tree-canvas-zoom input {
    position: relative;
    z-index: 1;
    width: 1.4rem;
    appearance: none;
    accent-color: var(--tree-ui-moss);
    background: transparent;
    -webkit-appearance: none;
}

.body-family-view.tree-style-tree .tree-canvas-zoom input::-webkit-slider-runnable-track {
    width: 4px;
    border-radius: 50%;
    background: var(--tree-bark);
}

.body-family-view.tree-style-tree .tree-canvas-zoom input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 1.05rem;
    height: 1.35rem;
    margin-top: -0.4rem;
    border: 2px solid var(--tree-ui-moss-dark);
    border-radius: 80% 8% 80% 8%;
    background: var(--tree-leaf-light);
    box-shadow: 1px 2px 0 rgba(66, 82, 45, 0.22);
    cursor: grab;
    transform: rotate(-35deg);
}

.body-family-view.tree-style-tree .tree-canvas-zoom input::-moz-range-track {
    width: 4px;
    border-radius: 50%;
    background: var(--tree-bark);
}

.body-family-view.tree-style-tree .tree-canvas-zoom input::-moz-range-thumb {
    appearance: none;
    width: 1.05rem;
    height: 1.35rem;
    border: 2px solid var(--tree-ui-moss-dark);
    border-radius: 80% 8% 80% 8%;
    background: var(--tree-leaf-light);
    box-shadow: 1px 2px 0 rgba(66, 82, 45, 0.22);
    cursor: grab;
}

.body-family-view.tree-style-tree .current-member-popover {
    padding: 1rem 1rem 1rem 1.15rem;
    border-width: 1px 1px 1px 6px;
    border-radius: 5px 15px 4px 12px !important;
    background-color: var(--tree-ui-paper-light) !important;
    box-shadow: 4px 5px 0 rgba(103, 79, 43, 0.15), 0 12px 25px rgba(68, 55, 35, 0.2) !important;
    scrollbar-color: var(--tree-ui-line-dark) transparent;
    scrollbar-width: thin;
    transform: rotate(0.8deg);
}

.body-family-view.tree-style-tree .current-member-popover::-webkit-scrollbar {
    width: 0.55rem;
}

.body-family-view.tree-style-tree .current-member-popover::-webkit-scrollbar-track {
    background: rgba(163, 146, 108, 0.14);
}

.body-family-view.tree-style-tree .current-member-popover::-webkit-scrollbar-thumb {
    border: 2px solid var(--tree-ui-paper-light);
    border-radius: 80% 8% 80% 8%;
    background: var(--tree-ui-line-dark);
}

.body-family-view.tree-style-tree .current-member-popover::-webkit-scrollbar-button {
    display: none;
}

.body-family-view.tree-style-tree .current-member-popover::before {
    position: absolute;
    top: 0.7rem;
    bottom: 0.7rem;
    left: 0.65rem;
    width: 2px;
    border-radius: 50%;
    background: rgba(79, 111, 67, 0.58);
    content: '';
}

.body-family-view.tree-style-tree .current-member-popover::after {
    position: absolute;
    top: 0.55rem;
    right: 0.7rem;
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 80% 8% 80% 8%;
    background: var(--tree-ui-moss);
    box-shadow: -0.25rem 0.45rem 0 var(--tree-leaf-light);
    content: '';
    transform: rotate(-35deg);
}

.body-family-view.tree-style-tree .current-member-popover-name {
    white-space: normal;
    overflow-wrap: anywhere;
    font-family: Georgia, 'Times New Roman', serif;
    color: var(--tree-ui-ink);
}

.body-family-view.tree-style-tree .current-member-details {
    border-top-style: dashed;
}

.body-family-view.tree-style-tree .current-member-close,
.body-family-view.tree-style-tree .current-member-edit {
    position: relative;
    z-index: 1;
    border-radius: 50% 3px 50% 3px;
    background-color: rgba(215, 203, 166, 0.55);
}

.body-family-view.tree-style-tree .language-switcher select {
    border-radius: 50% 4px 50% 4px !important;
    background-color: var(--tree-ui-paper-light) !important;
    transform: rotate(-1deg);
}

@media (prefers-reduced-motion: reduce) {
    .body-family-view.tree-style-tree .tree-layout-options label,
    .body-family-view.tree-style-tree .tree-style-selector .tree-control-btn,
    .body-family-view.tree-style-tree #shadow-trees-toggle,
    .body-family-view.tree-style-tree #reset-zoom-btn,
    .body-family-view.tree-style-tree .tree-search-dock,
    .body-family-view.tree-style-tree .focus-indicator,
    .body-family-view.tree-style-tree .tree-canvas-zoom,
    .body-family-view.tree-style-tree .current-member-popover,
    .body-family-view.tree-style-tree .language-switcher select {
        transform: none;
    }
}

@media (max-width: 650px) {
    .body-family-view.tree-style-tree #reset-zoom-btn {
        flex-grow: 0 !important;
        width: auto !important;
        flex-basis: auto !important;
        align-self: flex-start;
    }

    .body-family-view.tree-style-tree .current-member-popover {
        left: 0.15rem;
        width: min(330px, calc(100vw - 3.4rem));
        max-height: min(286px, calc(100vh - 355px));
        padding: 0.8rem 0.8rem 0.8rem 0.95rem;
    }

    .body-family-view.tree-style-tree .current-member-popover-name {
        font-size: 0.88rem;
    }
}
.body-family-view.tree-style-tree .current-member-child-row::before {
    background-color: var(--tree-ui-moss);
}

@media (max-width: 650px) {
    .body-family-view.tree-style-tree .tree-layout-options {
        border-top-color: var(--tree-ui-line) !important;
    }

    .body-family-view.tree-style-tree .tree-control-btn,
    .body-family-view.tree-style-tree .focus-indicator {
        border-radius: 4px !important;
    }
}

:root {
    --botanical-ui-leaf: url('assets/botanical/leaves/leaf-03.svg');
    --botanical-ui-branch: url('assets/botanical/branches/branch-01.svg');
    --botanical-ui-bloom: url('assets/botanical/blooms/bloom-06.svg');
}

.stats-heading-icon,
.stat-icon-members,
.stat-icon-partnerships {
    background-image: var(--botanical-ui-branch);
}

.stat-icon-living,
.stat-icon-earliest,
.stat-icon-latest {
    background-image: var(--botanical-ui-leaf);
}

.stat-icon-deceased,
.stat-icon-lifespan,
.stat-icon-parent-child {
    background-image: var(--botanical-ui-bloom);
}

.demo-credentials-icon,
.sidebar-heading-icon,
.footer-deployment-icon {
    display: inline-block;
    flex: 0 0 auto;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    vertical-align: middle;
}

.demo-credentials-icon {
    width: 1.1rem;
    height: 1.1rem;
    margin-right: 0.25rem;
    background-image: var(--botanical-ui-bloom);
}

.sidebar-heading-icon {
    width: 1.1rem;
    height: 1.1rem;
    background-image: var(--botanical-ui-leaf);
}

.footer-deployment-icon {
    width: 0.95rem;
    height: 0.95rem;
    margin-right: 0.2rem;
    background-image: var(--botanical-ui-leaf);
}

.body-family-view.tree-style-tree header,
.body-family-view.tree-style-tree .family-tree-toolbar,
.body-family-view.tree-style-tree .tree-canvas-zoom,
.body-family-view.tree-style-tree .tree-search-dock,
.body-family-view.tree-style-tree .current-member-popover {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.body-family-view.tree-style-tree header {
    min-height: 3rem;
    background-image: repeating-linear-gradient(
        102deg,
        rgba(108, 91, 57, 0.035) 0,
        rgba(108, 91, 57, 0.035) 1px,
        transparent 1px,
        transparent 24px
    ) !important;
}

.body-family-view.tree-style-tree header::after {
    right: 5%;
    bottom: -2px;
    left: 5%;
    height: 2px;
    background: var(--tree-ui-line-dark);
    box-shadow: none;
    transform: none;
}

.body-family-view.tree-style-tree .header-family-info {
    min-width: 0;
}

.body-family-view.tree-style-tree .header-family-info strong {
    max-width: 100%;
    overflow-wrap: anywhere;
    color: var(--tree-ui-ink);
    letter-spacing: 0;
}

.body-family-view.tree-style-tree .header-back-btn,
.body-family-view.tree-style-tree .language-switcher select {
    transform: none !important;
}

.body-family-view.tree-style-tree .header-back-btn {
    padding: 0.4rem 0.85rem 0.4rem 1.75rem !important;
    border-radius: 8px !important;
    background-color: var(--tree-ui-paper-light) !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55), 0 2px 5px rgba(86, 66, 37, 0.14) !important;
}

.body-family-view.tree-style-tree .header-back-btn::before {
    top: 50%;
    left: 0.55rem;
    width: 0.9rem;
    height: 0.9rem;
    border-radius: 0;
    background: var(--botanical-ui-leaf) center / contain no-repeat;
    transform: translateY(-50%) rotate(-28deg);
}

.body-family-view.tree-style-tree .language-switcher select {
    border-radius: 8px !important;
    background-color: var(--tree-ui-paper-light) !important;
}

.body-family-view.tree-style-tree .family-tree-toolbar {
    padding: 0.55rem 1rem !important;
    border-bottom: 1px solid var(--tree-ui-line) !important;
    background-image: repeating-linear-gradient(
        96deg,
        rgba(108, 91, 57, 0.035) 0,
        rgba(108, 91, 57, 0.035) 1px,
        transparent 1px,
        transparent 22px
    ) !important;
}

.body-family-view.tree-style-tree .family-tree-toolbar::after {
    display: none;
}

.body-family-view.tree-style-tree .tree-controls {
    align-items: center !important;
    gap: 0.5rem !important;
}

.body-family-view.tree-style-tree .tree-layout-options {
    gap: 0.35rem !important;
    padding: 0.3rem 0.45rem 0.3rem 1.25rem !important;
    border: 1px solid var(--tree-ui-line) !important;
    border-left: 3px solid var(--tree-bark) !important;
    border-radius: 8px !important;
    background: rgba(247, 241, 218, 0.58) !important;
    box-shadow: none !important;
}

.body-family-view.tree-style-tree .tree-layout-options::before {
    top: 50%;
    left: -0.7rem;
    width: 1rem;
    height: 1rem;
    border-radius: 0;
    background: var(--botanical-ui-leaf) center / contain no-repeat;
    box-shadow: none;
    transform: translateY(-50%) rotate(-26deg);
}

.body-family-view.tree-style-tree .tree-layout-options label,
.body-family-view.tree-style-tree .tree-layout-options label:nth-of-type(1),
.body-family-view.tree-style-tree .tree-layout-options label:nth-of-type(2),
.body-family-view.tree-style-tree .tree-layout-options label:nth-of-type(3) {
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
}

.body-family-view.tree-style-tree .tree-layout-options select {
    min-height: 1.9rem;
    padding: 0.3rem 1.5rem 0.3rem 0.5rem !important;
    border-radius: 6px !important;
    background-color: var(--tree-ui-paper-light) !important;
}

.body-family-view.tree-style-tree .tree-style-selector {
    gap: 0.15rem !important;
    align-items: center;
    padding: 0.18rem !important;
    border: 1px solid var(--tree-ui-line) !important;
    border-radius: 9px !important;
    background: var(--tree-ui-paper-light) !important;
    box-shadow: inset 0 1px 2px rgba(82, 62, 34, 0.12) !important;
}

.body-family-view.tree-style-tree .tree-style-selector::before {
    display: none;
}

.body-family-view.tree-style-tree .tree-style-selector .tree-control-btn,
.body-family-view.tree-style-tree .tree-style-selector .tree-control-btn:first-child,
.body-family-view.tree-style-tree .tree-style-selector .tree-control-btn:last-child {
    min-height: 1.9rem;
    padding: 0.35rem 0.65rem !important;
    border: 0 !important;
    border-radius: 6px !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
}

.body-family-view.tree-style-tree .tree-style-selector .tree-control-btn[data-tree-style="tree"] {
    gap: 0.3rem;
}

.body-family-view.tree-style-tree .tree-style-selector .tree-control-btn[data-tree-style="tree"]::before {
    width: 0.75rem;
    height: 0.75rem;
    background: var(--botanical-ui-leaf) center / contain no-repeat;
    content: '';
}

.body-family-view.tree-style-tree .tree-style-selector .tree-control-btn.active {
    border: 1px solid var(--tree-ui-moss-dark) !important;
    background: var(--tree-ui-moss) !important;
    color: #f6f0d9 !important;
    box-shadow: 0 1px 2px rgba(34, 53, 29, 0.2) !important;
}

.body-family-view.tree-style-tree #shadow-trees-toggle {
    min-height: 1.9rem;
    padding: 0.35rem 0.75rem 0.35rem 1.8rem !important;
    border-radius: 8px !important;
    background: var(--tree-ui-paper-light) !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55), 0 2px 4px rgba(86, 66, 37, 0.12) !important;
    transform: none !important;
}

.body-family-view.tree-style-tree #shadow-trees-toggle::before {
    top: 50%;
    left: 0.55rem;
    width: 0.9rem;
    height: 0.9rem;
    border-radius: 0;
    background: var(--botanical-ui-leaf) center / contain no-repeat;
    transform: translateY(-50%) rotate(-28deg);
}

.body-family-view.tree-style-tree #shadow-trees-toggle.active {
    background: var(--tree-ui-moss) !important;
    color: #f6f0d9 !important;
}

.body-family-view.tree-style-tree #reset-zoom-btn {
    min-height: 1.9rem;
    padding: 0.35rem 0.75rem !important;
    border-radius: 8px !important;
    background: var(--tree-ui-paper-light) !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55), 0 2px 4px rgba(86, 66, 37, 0.12) !important;
    transform: none !important;
}

.body-family-view.tree-style-tree .tree-reset-icon {
    width: 0.9rem;
    height: 0.9rem;
    flex-basis: 0.9rem;
    background-image: var(--botanical-ui-leaf);
    transform: none;
}

.body-family-view.tree-style-tree .tree-search-dock {
    padding: 0.55rem 0.65rem !important;
    border: 1px solid var(--tree-ui-line) !important;
    border-left: 3px solid var(--tree-ui-moss) !important;
    border-radius: 10px !important;
    background-color: rgba(247, 241, 218, 0.97) !important;
    background-image: none !important;
    box-shadow: 0 4px 14px rgba(68, 55, 35, 0.16) !important;
    transform: none !important;
}

.body-family-view.tree-style-tree .tree-search-dock::before {
    top: -0.42rem;
    right: 1rem;
    left: auto;
    width: 1.9rem;
    height: 0.7rem;
    border-radius: 0;
    background: var(--botanical-ui-leaf) center / contain no-repeat;
    box-shadow: none;
    transform: rotate(22deg);
}

.body-family-view.tree-style-tree .tree-search input {
    min-height: 2.1rem;
    border-radius: 7px !important;
    background-color: var(--tree-ui-paper-light) !important;
}

.body-family-view.tree-style-tree .focus-indicator,
.body-family-view.tree-style-tree .focus-indicator[aria-pressed="true"] {
    min-height: 2.1rem;
    padding: 0.35rem 0.7rem !important;
    border: 1px solid var(--tree-ui-line) !important;
    border-radius: 8px !important;
    background: var(--tree-ui-paper-deep) !important;
    box-shadow: inset 0 1px 2px rgba(82, 62, 34, 0.12), 0 1px 0 rgba(255, 255, 255, 0.42) !important;
    transform: none !important;
}

.body-family-view.tree-style-tree .focus-indicator-copy {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.body-family-view.tree-style-tree .tree-canvas-zoom {
    display: flex !important;
    width: 72px !important;
    min-width: 72px !important;
    padding: 0.65rem 0.5rem 0.7rem !important;
    border: 1px solid var(--tree-ui-line) !important;
    border-radius: 10px !important;
    background-color: rgba(247, 241, 218, 0.97) !important;
    background-image: none !important;
    box-shadow: 0 4px 14px rgba(68, 55, 35, 0.16) !important;
    transform: none !important;
    contain: paint;
}

.body-family-view.tree-style-tree .tree-canvas-zoom::before {
    top: 0.45rem;
    right: 0.35rem;
    bottom: auto;
    left: auto;
    width: 1rem;
    height: 1rem;
    border-radius: 0;
    background: var(--botanical-ui-leaf) center / contain no-repeat;
    box-shadow: none;
    content: '';
    opacity: 0.42;
    transform: rotate(22deg);
}

.body-family-view.tree-style-tree .tree-zoom-heading {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding-top: 0.2rem;
}

.body-family-view.tree-style-tree .tree-zoom-heading label {
    color: var(--tree-ui-ink) !important;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 0.72rem;
    font-weight: 700;
}

.body-family-view.tree-style-tree .tree-zoom-heading output {
    min-width: 0;
    color: var(--tree-ui-moss-dark) !important;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 0.7rem;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.body-family-view.tree-style-tree .tree-zoom-rail {
    display: grid;
    flex: 1;
    grid-template-rows: auto minmax(0, 1fr) auto;
    align-items: center;
    justify-items: center;
    width: 100%;
    min-height: 0;
    gap: 0.3rem;
    padding: 0.35rem 0 0.15rem;
}

.body-family-view.tree-style-tree .tree-zoom-mark {
    display: grid;
    place-items: center;
    width: 1.25rem;
    height: 1.25rem;
    border: 1px solid var(--tree-ui-line-dark);
    border-radius: 50%;
    background: var(--tree-ui-paper-light);
    color: var(--tree-ui-moss-dark);
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1;
}

.body-family-view.tree-style-tree .tree-canvas-zoom input {
    position: relative;
    z-index: 1;
    display: block;
    grid-row: 2;
    width: 2rem;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    appearance: none;
    -webkit-appearance: none;
    writing-mode: vertical-lr;
    direction: rtl;
    background: transparent;
}

.body-family-view.tree-style-tree .tree-canvas-zoom input::-webkit-slider-runnable-track {
    width: 5px;
    height: 100%;
    border: 1px solid var(--tree-ui-line-dark);
    border-radius: 999px;
    background: linear-gradient(to bottom, var(--tree-ui-moss), var(--tree-ui-paper-deep));
}

.body-family-view.tree-style-tree .tree-canvas-zoom input::-webkit-slider-thumb {
    box-sizing: border-box;
    width: 1.15rem;
    height: 1.15rem;
    margin: 0;
    margin-left: calc(2.5px - 0.575rem);
    border: 2px solid var(--tree-ui-paper-light);
    border-radius: 50%;
    background: var(--tree-ui-moss);
    box-shadow: 0 0 0 1px var(--tree-ui-moss-dark), 0 2px 4px rgba(66, 82, 45, 0.25);
    cursor: grab;
    -webkit-appearance: none;
}

.body-family-view.tree-style-tree .tree-canvas-zoom input::-moz-range-track {
    width: 5px;
    height: 100%;
    border: 1px solid var(--tree-ui-line-dark);
    border-radius: 999px;
    background: linear-gradient(to bottom, var(--tree-ui-moss), var(--tree-ui-paper-deep));
}

.body-family-view.tree-style-tree .tree-canvas-zoom input::-moz-range-progress {
    border-radius: 999px;
    background: var(--tree-ui-moss);
}

.body-family-view.tree-style-tree .tree-canvas-zoom input::-moz-range-thumb {
    box-sizing: border-box;
    width: 1.15rem;
    height: 1.15rem;
    border: 2px solid var(--tree-ui-paper-light);
    border-radius: 50%;
    background: var(--tree-ui-moss);
    box-shadow: 0 0 0 1px var(--tree-ui-moss-dark), 0 2px 4px rgba(66, 82, 45, 0.25);
    cursor: grab;
}

.body-family-view.tree-style-tree .tree-canvas-zoom input:focus-visible {
    outline: 2px solid rgba(79, 111, 67, 0.45);
    outline-offset: 3px;
}

.body-family-view.tree-style-tree .current-member-popover {
    padding: 0.9rem 0.95rem 0.95rem 1rem;
    border: 1px solid var(--tree-ui-line) !important;
    border-left: 3px solid var(--tree-ui-moss) !important;
    border-radius: 10px !important;
    background-color: rgba(247, 241, 218, 0.98) !important;
    background-image: none !important;
    box-shadow: 0 5px 16px rgba(68, 55, 35, 0.18) !important;
    transform: none !important;
    contain: paint;
}

.body-family-view.tree-style-tree .current-member-popover::before {
    top: 0.7rem;
    bottom: 0.7rem;
    left: 0.55rem;
    width: 1px;
    background: var(--tree-ui-line);
}

.body-family-view.tree-style-tree .current-member-popover::after {
    top: 0.45rem;
    right: 0.55rem;
    width: 1rem;
    height: 1rem;
    border-radius: 0;
    background: var(--botanical-ui-bloom) center / contain no-repeat;
    box-shadow: none;
    transform: rotate(8deg);
}

.body-family-view.tree-style-tree .current-member-close,
.body-family-view.tree-style-tree .current-member-edit {
    border-radius: 6px;
    background: rgba(215, 203, 166, 0.55);
}

.body-family-view.tree-style-tree .current-member-popover-name {
    max-width: calc(100% - 1.5rem);
    overflow-wrap: anywhere;
}

@media (max-width: 650px) {
    .body-family-view.tree-style-tree .header-family-info strong {
        font-size: 0.92rem;
        line-height: 1.2;
    }

    .body-family-view.tree-style-tree .tree-controls {
        gap: 0.45rem !important;
    }

    .body-family-view.tree-style-tree .tree-layout-options {
        gap: 0.35rem !important;
        padding: 0.45rem 0.4rem 0.45rem 1.15rem !important;
    }

    .body-family-view.tree-style-tree .tree-layout-options label {
        flex: 1 1 calc(50% - 0.35rem) !important;
        justify-content: space-between;
    }

    .body-family-view.tree-style-tree .tree-layout-options select {
        min-width: 0;
    }

    .body-family-view.tree-style-tree .tree-style-selector .tree-control-btn {
        flex-grow: 0 !important;
    }

    .body-family-view.tree-style-tree #shadow-trees-toggle {
        flex: 1 1 0 !important;
        min-width: 0;
    }

    .body-family-view.tree-style-tree #reset-zoom-btn {
        display: inline-flex;
        flex: 0 0 2.25rem !important;
        width: 2.25rem !important;
        min-width: 2.25rem !important;
        padding-right: 0.35rem !important;
        padding-left: 0.35rem !important;
        justify-content: center;
    }

    .body-family-view.tree-style-tree .tree-reset-label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .body-family-view.tree-style-tree .tree-canvas-zoom {
        top: 0.55rem;
        right: 0.55rem;
        bottom: calc(140px + 1rem);
        width: 68px !important;
        min-width: 68px !important;
    }

    .body-family-view.tree-style-tree .tree-search-dock {
        left: 0.6rem;
        bottom: 0.6rem;
        max-width: calc(100% - 4.2rem);
    }

    .body-family-view.tree-style-tree .current-member-popover {
        left: 0.6rem;
        width: min(284px, calc(100vw - 6.6rem));
        max-height: min(300px, calc(100vh - 19rem));
    }
}

.body-family-view.tree-style-tree .tree-generated-main-asset {
    opacity: 0.88;
    filter: drop-shadow(0 2px 1px rgba(62, 48, 29, 0.12));
}

.body-family-view.tree-style-tree .tree-generated-shadow-asset {
    opacity: 0.58;
    filter: saturate(0.72) sepia(0.08);
}

.body-family-view.tree-style-tree .tree-attached-generated-branch {
    opacity: 0.72;
    filter: saturate(0.88);
}

.body-family-view.tree-style-tree .tree-attached-generated-moss {
    opacity: 0.78;
    filter: saturate(0.92) brightness(0.94);
}

.body-family-view.tree-style-tree .tree-attached-generated-leaf {
    opacity: 0.96;
}

.body-family-view.tree-style-tree .tree-attached-generated-leaf-1 {
    opacity: 0.82;
    filter: saturate(0.82) brightness(1.08);
}

.body-family-view.tree-style-tree .tree-attached-generated-leaf-2 {
    opacity: 0.9;
    filter: saturate(0.92) brightness(0.9);
}

.body-family-view.tree-style-tree .tree-attached-generated-bloom {
    opacity: 0.92;
    filter: drop-shadow(0 1px 1px rgba(76, 49, 29, 0.14));
}

.body-family-view.tree-style-tree .header-back-btn::before {
    width: 0.82rem;
    height: 0.98rem;
    border-radius: 0;
    background: url('assets/botanical/leaves/leaf-03.svg') center / contain no-repeat;
    box-shadow: none;
}

.body-family-view.tree-style-tree .tree-layout-options::before {
    top: 0.28rem;
    left: -0.72rem;
    width: 1rem;
    height: 2.7rem;
    border-radius: 0;
    background: url('assets/botanical/branches/branch-06.svg') center / contain no-repeat;
    box-shadow: none;
    transform: rotate(-8deg);
}

.body-family-view.tree-style-tree .tree-style-selector::before {
    width: 1.2rem;
    height: 1.25rem;
    border-radius: 0;
    background: url('assets/botanical/twigs/twig-08.svg') center / contain no-repeat;
    transform: rotate(-10deg);
}

.body-family-view.tree-style-tree #shadow-trees-toggle::before {
    width: 0.78rem;
    height: 0.88rem;
    border-radius: 0;
    background: url('assets/botanical/leaves/leaf-08.svg') center / contain no-repeat;
}

.body-family-view.tree-style-tree .tree-search-dock::before {
    top: -0.52rem;
    right: 1.3rem;
    left: auto;
    width: 3.4rem;
    height: 0.72rem;
    border-radius: 0;
    background: url('assets/botanical/twigs/twig-03.svg') center / contain no-repeat;
    box-shadow: none;
    transform: rotate(8deg);
}

.body-family-view.tree-style-tree .current-member-popover::after {
    top: 0.45rem;
    right: 0.65rem;
    width: 1rem;
    height: 1.05rem;
    border-radius: 0;
    background: url('assets/botanical/blooms/bloom-06.svg') center / contain no-repeat;
    box-shadow: none;
    transform: rotate(8deg);
}

@media (max-width: 650px) {
    .body-family-view.tree-style-tree #reset-zoom-btn {
        display: inline-flex;
        flex: 0 0 2.25rem !important;
        width: 2.25rem !important;
        min-width: 2.25rem !important;
        padding-right: 0.35rem !important;
        padding-left: 0.35rem !important;
        justify-content: center;
    }

    .body-family-view.tree-style-tree .tree-reset-label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
}

/* Final tree-mode art direction: moss canopy, bark structure, and botanical portrait frames. */
.body-family-view.tree-style-tree {
    --tree-ui-paper: #edf0dc;
    --tree-ui-paper-light: #f7f4df;
    --tree-ui-paper-deep: #d4d9b6;
    --tree-ui-line: #89936d;
    --tree-ui-line-dark: #536247;
    --tree-ui-ink: #263327;
    --tree-ui-moss: #45643e;
    --tree-ui-moss-dark: #294831;
    --tree-bark: #76583b;
    --tree-bark-dark: #493725;
    --tree-moss: #4e7148;
    --tree-leaf-light: #91a763;
    --tree-parchment: #f0ebcf;
    background: #dce4d3;
}

.body-family-view.tree-style-tree header {
    min-height: 3.35rem;
    background-color: #294831 !important;
    background-image:
        linear-gradient(90deg, rgba(19, 42, 27, 0.92), rgba(50, 77, 48, 0.94)),
        url('assets/botanical/branches/branch-04.svg') !important;
    background-position: center, right 1.2rem center !important;
    background-repeat: no-repeat !important;
    background-size: cover, 9rem 5rem !important;
    border-bottom-color: #172c1d !important;
    box-shadow: 0 2px 0 rgba(255, 255, 255, 0.12), 0 5px 16px rgba(23, 44, 29, 0.24) !important;
}

.body-family-view.tree-style-tree header::after {
    right: 0;
    bottom: -3px;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #344d31, #80915d 46%, #405c38);
    opacity: 0.9;
}

.body-family-view.tree-style-tree .header-family-info {
    border-color: rgba(234, 239, 208, 0.26);
}

.body-family-view.tree-style-tree .header-family-info strong {
    color: #f3efd6;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.12rem;
    letter-spacing: 0;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

.body-family-view.tree-style-tree .language-switcher {
    color: #e8edcf;
}

.body-family-view.tree-style-tree .header-back-btn,
.body-family-view.tree-style-tree .language-switcher select {
    border-color: rgba(232, 237, 207, 0.38) !important;
    background-color: rgba(246, 242, 218, 0.94) !important;
    color: #263327 !important;
}

.body-family-view.tree-style-tree .family-tree-toolbar {
    padding: 0.6rem 1rem 0.65rem !important;
    background-color: #cbd3af !important;
    background-image:
        linear-gradient(90deg, rgba(226, 231, 198, 0.95), rgba(190, 204, 164, 0.92)),
        url('assets/botanical/vines/vine-04.svg') !important;
    background-position: center, right 1.5rem bottom -1.4rem !important;
    background-repeat: no-repeat !important;
    background-size: cover, 11rem 8rem !important;
    border-bottom-color: #667451 !important;
    box-shadow: 0 3px 9px rgba(44, 64, 39, 0.16);
}

.body-family-view.tree-style-tree .tree-controls {
    width: 100%;
    justify-content: center !important;
    gap: 0.55rem !important;
}

.body-family-view.tree-style-tree .tree-layout-options {
    border-color: #7b8764 !important;
    border-left-color: #4c6944 !important;
    background: rgba(246, 245, 221, 0.88) !important;
}

.body-family-view.tree-style-tree .tree-layout-options select,
.body-family-view.tree-style-tree .tree-style-selector,
.body-family-view.tree-style-tree .tree-control-btn {
    border-color: #87916e !important;
    background-color: rgba(249, 247, 225, 0.96) !important;
    color: #29362a !important;
}

.body-family-view.tree-style-tree .tree-control-btn:hover,
.body-family-view.tree-style-tree .tree-control-btn:focus-visible {
    border-color: #3f613d !important;
    background-color: #e5ebd0 !important;
    color: #24442d !important;
    box-shadow: 0 0 0 2px rgba(69, 100, 62, 0.18) !important;
}

.body-family-view.tree-style-tree .tree-control-btn.active,
.body-family-view.tree-style-tree .tree-style-selector .tree-control-btn.active,
.body-family-view.tree-style-tree #shadow-trees-toggle.active {
    border-color: #25442c !important;
    background: #45643e !important;
    color: #f7f3d9 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 2px 4px rgba(36, 63, 41, 0.2) !important;
}

.body-family-view.tree-style-tree .tree-viewport-wrapper {
    isolation: isolate;
    background-color: #dce4d3 !important;
    background-image:
        linear-gradient(180deg, rgba(244, 244, 218, 0.42), rgba(204, 219, 192, 0.2) 42%, rgba(133, 155, 112, 0.22)),
        url('assets/botanical/ferns/fern-09.svg'),
        repeating-linear-gradient(104deg, rgba(54, 81, 51, 0.025) 0 1px, transparent 1px 27px) !important;
    background-position:
        center,
        left -3rem bottom -4.5rem,
        center !important;
    background-repeat: no-repeat !important;
    background-size:
        cover,
        clamp(15rem, 27vw, 28rem),
        auto !important;
}

.body-family-view.tree-style-tree .tree-wildlife {
    overflow: visible;
    pointer-events: none;
}

.body-family-view.tree-style-classic .tree-wildlife {
    display: none;
}

.body-family-view.tree-style-tree .tree-wildlife-critter {
    opacity: 0;
    transform-box: view-box;
    transform-origin: 0 0;
    will-change: transform, opacity;
    animation: tree-wildlife-crawl var(--tree-critter-duration, 16s) linear
        var(--tree-critter-delay, 0s) infinite;
}

.body-family-view.tree-style-tree .tree-wildlife-beetle {
    animation-name: tree-wildlife-beetle-crawl;
}

.body-family-view.tree-style-tree .tree-wildlife-ladybug {
    animation-name: tree-wildlife-ladybug-crawl;
}

.body-family-view.tree-style-tree .tree-wildlife-snail {
    animation-name: tree-wildlife-snail-glide;
}

.body-family-view.tree-style-tree .tree-wildlife-mouse {
    animation-name: tree-wildlife-mouse-scurry;
}

.body-family-view.tree-style-tree .tree-wildlife-image,
.body-family-view.tree-style-tree .tree-wildlife-flyer-image {
    overflow: visible;
    pointer-events: none;
    filter: drop-shadow(0 1.5px 1px rgba(42, 49, 35, 0.3));
}

.body-family-view.tree-style-tree .tree-wildlife-articulated [data-motion-part] path {
    transform-box: view-box;
    transform-origin: var(--tree-motion-origin, center);
}

.body-family-view.tree-style-tree .tree-wildlife-beetle [data-motion-part="legs"] path:nth-child(odd) {
    animation: tree-wildlife-beetle-leg-a var(--tree-critter-duration) linear
        var(--tree-critter-delay) infinite;
}

.body-family-view.tree-style-tree .tree-wildlife-beetle [data-motion-part="legs"] path:nth-child(even) {
    animation: tree-wildlife-beetle-leg-b var(--tree-critter-duration) linear
        var(--tree-critter-delay) infinite;
}

.body-family-view.tree-style-tree .tree-wildlife-ladybug [data-motion-part="legs"] path:nth-child(odd) {
    animation: tree-wildlife-ladybug-leg-a var(--tree-critter-duration) linear
        var(--tree-critter-delay) infinite;
}

.body-family-view.tree-style-tree .tree-wildlife-ladybug [data-motion-part="legs"] path:nth-child(even) {
    animation: tree-wildlife-ladybug-leg-b var(--tree-critter-duration) linear
        var(--tree-critter-delay) infinite;
}

.body-family-view.tree-style-tree .tree-wildlife-beetle [data-motion-part="antennae"] path,
.body-family-view.tree-style-tree .tree-wildlife-ladybug [data-motion-part="antennae"] path {
    animation: tree-wildlife-antenna-probe 1.9s ease-in-out infinite alternate;
}

.body-family-view.tree-style-tree .tree-wildlife-beetle [data-motion-part="antennae"] path:nth-child(even),
.body-family-view.tree-style-tree .tree-wildlife-ladybug [data-motion-part="antennae"] path:nth-child(even) {
    animation-direction: alternate-reverse;
}

.body-family-view.tree-style-tree .tree-wildlife-snail .tree-wildlife-image {
    filter: drop-shadow(0 1.5px 1px rgba(55, 47, 35, 0.32)) saturate(1.08);
}

.body-family-view.tree-style-tree .tree-wildlife-snail-segment {
    transform-box: fill-box;
    transform-origin: center;
    animation: tree-wildlife-snail-wave 2.8s ease-in-out
        var(--tree-segment-delay, 0s) infinite;
}

.body-family-view.tree-style-tree .tree-wildlife-snail [data-motion-part="antennae"] path:first-child {
    animation: tree-wildlife-snail-feeler-a 3.4s ease-in-out -0.8s infinite alternate;
}

.body-family-view.tree-style-tree .tree-wildlife-snail [data-motion-part="antennae"] path:last-child {
    animation: tree-wildlife-snail-feeler-b 3.9s ease-in-out -2.1s infinite alternate;
}

.body-family-view.tree-style-tree .tree-wildlife-mouse .tree-wildlife-image {
    filter: drop-shadow(0 2px 1px rgba(55, 47, 35, 0.28));
}

.body-family-view.tree-style-tree .tree-wildlife-mouse [data-motion-part="legs"] path:nth-child(odd) {
    animation: tree-wildlife-mouse-leg-a var(--tree-critter-duration) linear
        var(--tree-critter-delay) infinite;
}

.body-family-view.tree-style-tree .tree-wildlife-mouse [data-motion-part="legs"] path:nth-child(even) {
    animation: tree-wildlife-mouse-leg-b var(--tree-critter-duration) linear
        var(--tree-critter-delay) infinite;
}

.body-family-view.tree-style-tree .tree-wildlife-mouse [data-motion-part="tail"] path {
    animation: tree-wildlife-mouse-tail var(--tree-critter-duration) ease-in-out
        var(--tree-critter-delay) infinite;
}

.body-family-view.tree-style-tree .tree-wildlife-mouse [data-motion-part="ears"] path:first-child {
    animation: tree-wildlife-mouse-ear var(--tree-critter-duration) ease-in-out
        var(--tree-critter-delay) infinite;
}

.body-family-view.tree-style-tree .tree-wildlife-flyer {
    opacity: 0;
    transform-box: view-box;
    transform-origin: 0 0;
    will-change: transform, opacity;
    animation: tree-wildlife-flight var(--tree-flyer-duration, 11.5s) linear
        var(--tree-flyer-delay, 0s) infinite;
}

.body-family-view.tree-style-tree .tree-wildlife-flyer-reverse {
    animation-direction: reverse;
}

.body-family-view.tree-style-tree .tree-wildlife-flyer-image [data-motion-part="wings"] path:first-child {
    animation: tree-wildlife-wing-left var(--tree-flyer-flutter-duration, 1.35s) linear
        -0.2s infinite;
}

.body-family-view.tree-style-tree .tree-wildlife-flyer-image [data-motion-part="wings"] path:last-child {
    animation: tree-wildlife-wing-right var(--tree-flyer-flutter-duration, 1.35s) linear
        -0.2s infinite;
}

@keyframes tree-wildlife-crawl {
    0% {
        opacity: 0;
        transform: translate(var(--tree-critter-x-0), var(--tree-critter-y-0))
            rotate(var(--tree-critter-r-0));
    }
    7% { opacity: 0.94; }
    25% {
        transform: translate(var(--tree-critter-x-1), var(--tree-critter-y-1))
            rotate(var(--tree-critter-r-1));
    }
    50% {
        transform: translate(var(--tree-critter-x-2), var(--tree-critter-y-2))
            rotate(var(--tree-critter-r-2));
    }
    75% {
        transform: translate(var(--tree-critter-x-3), var(--tree-critter-y-3))
            rotate(var(--tree-critter-r-3));
    }
    93% { opacity: 0.94; }
    100% {
        opacity: 0;
        transform: translate(var(--tree-critter-x-4), var(--tree-critter-y-4))
            rotate(var(--tree-critter-r-4));
    }
}

@keyframes tree-wildlife-beetle-crawl {
    0% {
        opacity: 0;
        transform: translate(var(--tree-critter-x-0), var(--tree-critter-y-0))
            rotate(var(--tree-critter-r-0));
    }
    6% { opacity: 0.94; }
    18%, 29% {
        transform: translate(var(--tree-critter-x-1), var(--tree-critter-y-1))
            rotate(var(--tree-critter-r-1));
    }
    43%, 52% {
        transform: translate(var(--tree-critter-x-2), var(--tree-critter-y-2))
            rotate(var(--tree-critter-r-2));
    }
    70%, 79% {
        transform: translate(var(--tree-critter-x-3), var(--tree-critter-y-3))
            rotate(var(--tree-critter-r-3));
    }
    94% { opacity: 0.94; }
    100% {
        opacity: 0;
        transform: translate(var(--tree-critter-x-4), var(--tree-critter-y-4))
            rotate(var(--tree-critter-r-4));
    }
}

@keyframes tree-wildlife-ladybug-crawl {
    0% {
        opacity: 0;
        transform: translate(var(--tree-critter-x-0), var(--tree-critter-y-0))
            rotate(var(--tree-critter-r-0));
    }
    7% { opacity: 0.94; }
    23%, 30% {
        transform: translate(var(--tree-critter-x-1), var(--tree-critter-y-1))
            rotate(var(--tree-critter-r-1));
    }
    48%, 57% {
        transform: translate(var(--tree-critter-x-2), var(--tree-critter-y-2))
            rotate(var(--tree-critter-r-2));
    }
    76%, 83% {
        transform: translate(var(--tree-critter-x-3), var(--tree-critter-y-3))
            rotate(var(--tree-critter-r-3));
    }
    94% { opacity: 0.94; }
    100% {
        opacity: 0;
        transform: translate(var(--tree-critter-x-4), var(--tree-critter-y-4))
            rotate(var(--tree-critter-r-4));
    }
}

@keyframes tree-wildlife-snail-glide {
    0% {
        opacity: 0;
        transform: translate(var(--tree-critter-x-0), var(--tree-critter-y-0))
            rotate(var(--tree-critter-r-0));
    }
    5% { opacity: 0.92; }
    25% {
        transform: translate(var(--tree-critter-x-1), var(--tree-critter-y-1))
            rotate(var(--tree-critter-r-1));
    }
    50% {
        transform: translate(var(--tree-critter-x-2), var(--tree-critter-y-2))
            rotate(var(--tree-critter-r-2));
    }
    75% {
        transform: translate(var(--tree-critter-x-3), var(--tree-critter-y-3))
            rotate(var(--tree-critter-r-3));
    }
    95% { opacity: 0.92; }
    100% {
        opacity: 0;
        transform: translate(var(--tree-critter-x-4), var(--tree-critter-y-4))
            rotate(var(--tree-critter-r-4));
    }
}

@keyframes tree-wildlife-mouse-scurry {
    0% {
        opacity: 0;
        transform: translate(var(--tree-critter-x-0), var(--tree-critter-y-0))
            rotate(var(--tree-critter-r-0));
    }
    5% { opacity: 0.95; }
    13%, 31% {
        transform: translate(var(--tree-critter-x-1), var(--tree-critter-y-1))
            rotate(var(--tree-critter-r-1));
    }
    39%, 46% {
        transform: translate(var(--tree-critter-x-2), var(--tree-critter-y-2))
            rotate(var(--tree-critter-r-2));
    }
    55%, 78% {
        transform: translate(var(--tree-critter-x-3), var(--tree-critter-y-3))
            rotate(var(--tree-critter-r-3));
    }
    92% { opacity: 0.95; }
    100% {
        opacity: 0;
        transform: translate(var(--tree-critter-x-4), var(--tree-critter-y-4))
            rotate(var(--tree-critter-r-4));
    }
}

@keyframes tree-wildlife-flight {
    0% {
        opacity: 0;
        transform: translate(-76px, 18px) rotate(-15deg);
    }
    8% { opacity: 0.9; }
    18% { transform: translate(-48px, -8px) rotate(-2deg); }
    29% { transform: translate(-38px, -42px) rotate(-13deg); }
    38% { transform: translate(-12px, -48px) rotate(9deg); }
    44% { transform: translate(-7px, -44px) rotate(-6deg); }
    50% { transform: translate(-2px, -47px) rotate(7deg); }
    62% { transform: translate(20px, -22px) rotate(15deg); }
    73% { transform: translate(42px, -40px) rotate(-8deg); }
    82% { transform: translate(54px, -14px) rotate(16deg); }
    92% {
        opacity: 0.9;
        transform: translate(48px, 7px) rotate(21deg);
    }
    100% {
        opacity: 0;
        transform: translate(78px, -4px) rotate(5deg);
    }
}

@keyframes tree-wildlife-beetle-leg-a {
    0%, 18%, 29%, 43%, 52%, 70%, 79%, 100% { transform: rotate(0); }
    4%, 33%, 57%, 84% { transform: rotate(-7deg); }
    8%, 37%, 62%, 89% { transform: rotate(7deg); }
    12%, 40%, 66%, 94% { transform: rotate(-7deg); }
    16%, 42%, 69%, 97% { transform: rotate(6deg); }
}

@keyframes tree-wildlife-beetle-leg-b {
    0%, 18%, 29%, 43%, 52%, 70%, 79%, 100% { transform: rotate(0); }
    4%, 33%, 57%, 84% { transform: rotate(7deg); }
    8%, 37%, 62%, 89% { transform: rotate(-7deg); }
    12%, 40%, 66%, 94% { transform: rotate(7deg); }
    16%, 42%, 69%, 97% { transform: rotate(-6deg); }
}

@keyframes tree-wildlife-ladybug-leg-a {
    0%, 23%, 30%, 48%, 57%, 76%, 83%, 100% { transform: rotate(0); }
    5%, 35%, 62%, 88% { transform: rotate(-6deg); }
    10%, 40%, 67%, 93% { transform: rotate(6deg); }
    15%, 45%, 72%, 97% { transform: rotate(-6deg); }
    20%, 47%, 75% { transform: rotate(5deg); }
}

@keyframes tree-wildlife-ladybug-leg-b {
    0%, 23%, 30%, 48%, 57%, 76%, 83%, 100% { transform: rotate(0); }
    5%, 35%, 62%, 88% { transform: rotate(6deg); }
    10%, 40%, 67%, 93% { transform: rotate(-6deg); }
    15%, 45%, 72%, 97% { transform: rotate(6deg); }
    20%, 47%, 75% { transform: rotate(-5deg); }
}

@keyframes tree-wildlife-antenna-probe {
    from { transform: rotate(-2.5deg); }
    to { transform: rotate(3.5deg); }
}

@keyframes tree-wildlife-snail-wave {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-0.55px, -0.8px); }
}

@keyframes tree-wildlife-snail-feeler-a {
    from { transform: rotate(-2deg); }
    to { transform: rotate(3deg); }
}

@keyframes tree-wildlife-snail-feeler-b {
    from { transform: rotate(2.5deg); }
    to { transform: rotate(-3deg); }
}

@keyframes tree-wildlife-mouse-leg-a {
    0%, 13%, 31%, 39%, 46%, 55%, 78%, 100% { transform: rotate(0); }
    3%, 33%, 48%, 83% { transform: rotate(-9deg); }
    6%, 36%, 51%, 88% { transform: rotate(9deg); }
    9%, 38%, 54%, 94% { transform: rotate(-7deg); }
}

@keyframes tree-wildlife-mouse-leg-b {
    0%, 13%, 31%, 39%, 46%, 55%, 78%, 100% { transform: rotate(0); }
    3%, 33%, 48%, 83% { transform: rotate(9deg); }
    6%, 36%, 51%, 88% { transform: rotate(-9deg); }
    9%, 38%, 54%, 94% { transform: rotate(7deg); }
}

@keyframes tree-wildlife-mouse-tail {
    0%, 13%, 31%, 55%, 78%, 100% { transform: rotate(0); }
    19%, 62%, 84% { transform: rotate(-4.5deg); }
    25%, 70%, 91% { transform: rotate(3deg); }
}

@keyframes tree-wildlife-mouse-ear {
    0%, 16%, 24%, 31%, 58%, 67%, 78%, 100% { transform: rotate(0); }
    19%, 61% { transform: rotate(-3deg); }
    21%, 64% { transform: rotate(2deg); }
}

@keyframes tree-wildlife-wing-left {
    0% { transform: rotate(-4deg); }
    12% { transform: rotate(10deg); }
    23% { transform: rotate(-3deg); }
    35% { transform: rotate(9deg); }
    52%, 69% { transform: rotate(2deg); }
    78% { transform: rotate(-5deg); }
    90% { transform: rotate(10deg); }
    100% { transform: rotate(0); }
}

@keyframes tree-wildlife-wing-right {
    0% { transform: rotate(4deg); }
    12% { transform: rotate(-10deg); }
    23% { transform: rotate(3deg); }
    35% { transform: rotate(-9deg); }
    52%, 69% { transform: rotate(-2deg); }
    78% { transform: rotate(5deg); }
    90% { transform: rotate(-10deg); }
    100% { transform: rotate(0); }
}

.body-family-view.tree-style-tree .tree-viewport-wrapper::after {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(43, 70, 45, 0.08), transparent 16%, transparent 84%, rgba(43, 70, 45, 0.08));
    content: '';
}

.body-family-view.tree-style-tree .tree-svg {
    position: relative;
    z-index: 1;
}

.body-family-view.tree-style-tree .tree-search-dock,
.body-family-view.tree-style-tree .current-member-popover,
.body-family-view.tree-style-tree .tree-canvas-zoom {
    z-index: 3;
    border-color: rgba(74, 94, 60, 0.76) !important;
    background-color: rgba(244, 244, 219, 0.94) !important;
    box-shadow: 0 2px 0 rgba(255, 255, 255, 0.38), 0 8px 22px rgba(39, 61, 40, 0.18) !important;
}

.body-family-view.tree-style-tree .tree-search-dock {
    left: 1.1rem;
    bottom: 1.1rem;
    padding: 0.52rem 0.62rem !important;
    border-left-width: 4px !important;
}

.body-family-view.tree-style-tree .tree-search input {
    border-color: #919b76 !important;
    background: rgba(251, 249, 228, 0.96) !important;
}

.body-family-view.tree-style-tree .focus-indicator,
.body-family-view.tree-style-tree .focus-indicator[aria-pressed='true'] {
    border-color: #87916e !important;
    background: #dce2c1 !important;
    color: #2f412f !important;
}

.body-family-view.tree-style-tree .tree-canvas-zoom {
    top: 1.1rem;
    right: 1.1rem;
    bottom: auto !important;
    width: 62px !important;
    min-width: 62px !important;
    height: min(290px, calc(100% - 2.2rem));
    padding: 0.55rem 0.45rem 0.65rem !important;
}

.body-family-view.tree-style-tree .tree-zoom-mark {
    width: 1.35rem;
    height: 1.35rem;
    border-color: #637151;
    background: #f4f2d9;
}

.body-family-view.tree-style-tree .current-member-popover {
    width: min(340px, calc(100vw - 2rem));
    max-height: min(470px, calc(100vh - 10rem));
    border-left-width: 4px !important;
    background-color: rgba(249, 247, 224, 0.98) !important;
}

.body-family-view.tree-style-tree .current-member-popover-name,
.body-family-view.tree-style-tree .current-member-reference {
    color: #2c4b32;
}

.body-family-view.tree-style-tree .tree-connector.branch-bark {
    stroke: #3f3022;
    stroke-width: 7.4;
    opacity: 0.62;
}

.body-family-view.tree-style-tree .tree-connector {
    stroke: #75583a;
    stroke-width: 3.2;
}

.body-family-view.tree-style-tree .tree-connector.parent-child {
    stroke-width: 3.7;
}

.body-family-view.tree-style-tree .tree-connector.branch-bark.parent-child {
    stroke-width: 7.8;
}

.body-family-view.tree-style-tree .tree-connector.partner {
    stroke: #80613e;
    stroke-width: 2.35;
}

.body-family-view.tree-style-tree .tree-connector.branch-bark.partner {
    stroke-width: 4.8;
}

.body-family-view.tree-style-tree .tree-connector.shadow {
    stroke: #637953;
    stroke-width: 2.4;
    stroke-dasharray: 4 5;
}

.body-family-view.tree-style-tree .tree-connector.branch-bark.shadow {
    stroke: #43553c;
    stroke-width: 4.5;
    opacity: 0.52;
}

.body-family-view.tree-style-tree .tree-branch-glimmer {
    stroke: #d8cb89;
    stroke-width: 1.1;
    opacity: 0.42;
    animation-duration: 9s;
}

.body-family-view.tree-style-tree .tree-node.botanical:not(.shadow) .tree-node-bg {
    fill: rgba(244, 239, 207, 0.98);
    stroke: #685a3f;
    stroke-width: 1.35;
    rx: 9px;
    ry: 9px;
}

.body-family-view.tree-style-tree .tree-node.botanical.focal:not(.shadow) .tree-node-bg {
    fill: #f5efc9;
    stroke: #3d633e;
    stroke-width: 2.4;
}

.body-family-view.tree-style-tree .tree-node.botanical:not(.shadow) .tree-portrait-frame {
    fill: #74573b;
    stroke: #34291e;
    stroke-width: 2.2;
}

.body-family-view.tree-style-tree .tree-node.botanical:not(.shadow) .tree-portrait-well {
    fill: #d6dec2;
    stroke: #a4ad87;
    stroke-width: 1.1;
}

.body-family-view.tree-style-tree .tree-node.botanical.deceased:not(.shadow) .tree-portrait-well {
    fill: #c9cbb8;
}

.body-family-view.tree-style-tree .tree-node.botanical.focal:not(.shadow) .tree-portrait-frame {
    stroke: #355b38;
    stroke-width: 3.2;
}

.body-family-view.tree-style-tree .tree-node-text-name {
    fill: #2d3127;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0;
}

.body-family-view.tree-style-tree .tree-node-text-dates {
    fill: #59604c;
    font-family: 'Palatino Linotype', Georgia, serif;
    font-size: 9.2px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
}

.body-family-view.tree-style-tree .tree-portrait-placeholder {
    opacity: 0.32;
}

.body-family-view.tree-style-tree .tree-portrait-placeholder-stem {
    fill: none;
    stroke: #557052;
    stroke-width: 1.7;
    stroke-linecap: round;
}

.body-family-view.tree-style-tree .tree-portrait-placeholder-leaf {
    fill: #78906c;
    stroke: #4a664a;
    stroke-width: 0.8;
}

.body-family-view.tree-style-tree .tree-frame-blossom-petal {
    fill: #d9b86d;
    stroke: #765f35;
    stroke-width: 0.55;
}

.body-family-view.tree-style-tree .tree-frame-blossom-1 .tree-frame-blossom-petal {
    fill: #d49b91;
}

.body-family-view.tree-style-tree .tree-frame-blossom-center {
    fill: #614a2f;
}

.body-family-view.tree-style-tree .tree-leaf-spray,
.body-family-view.tree-style-tree .tree-shadow-leaf-spray,
.body-family-view.tree-style-tree .tree-attached-bramble-sway {
    will-change: transform;
}

.body-family-view.tree-style-tree .tree-leaf-spray {
    animation-duration: 9.5s;
}

.body-family-view.tree-style-tree .tree-shadow-leaf-spray {
    animation-duration: 11s;
}

.body-family-view.tree-style-tree .tree-attached-bramble-leaf-wrap {
    transform-box: fill-box;
    transform-origin: center;
}

.body-family-view.tree-style-tree .tree-attached-bramble-group {
    opacity: 0.84;
}

.body-family-view.tree-style-tree .tree-svg.tree-motion-dense .tree-leaf-spray,
.body-family-view.tree-style-tree .tree-svg.tree-motion-dense .tree-shadow-leaf-spray,
.body-family-view.tree-style-tree .tree-svg.tree-motion-dense .tree-attached-bramble-flower-bloom {
    animation: none;
    will-change: auto;
}

.body-family-view.tree-style-tree .tree-attached-generated-branch {
    opacity: 0.46;
}

.body-family-view.tree-style-tree .tree-attached-generated-moss {
    opacity: 0.58;
}

.body-family-view.tree-style-tree .tree-node.botanical:not(.shadow) .tree-portrait-frame,
.body-family-view.tree-style-tree .tree-node.botanical:not(.shadow) .tree-portrait-well,
.body-family-view.tree-style-tree .tree-node.botanical:not(.shadow) .tree-portrait-hit-area,
.body-family-view.tree-style-tree .tree-node.botanical:not(.shadow) .tree-node-bg,
.body-family-view.tree-style-tree .tree-node.botanical:not(.shadow) .tree-node-text-name,
.body-family-view.tree-style-tree .tree-node.botanical:not(.shadow) .tree-node-text-dates,
.body-family-view.tree-style-tree .tree-node.botanical:not(.shadow) .tree-leaf,
.body-family-view.tree-style-tree .tree-node.botanical:not(.shadow) .tree-vine,
.body-family-view.tree-style-tree .tree-node.botanical:not(.shadow) .tree-frame-blossom-petal,
.body-family-view.tree-style-tree .tree-node.botanical:not(.shadow) .tree-generated-main-asset {
    transition: fill 0.18s ease, stroke 0.18s ease, stroke-width 0.18s ease,
        opacity 0.18s ease, filter 0.18s ease;
}

.body-family-view.tree-style-tree .tree-node.botanical:not(.shadow):is(:hover, .highlighted, :focus-visible) {
    filter: drop-shadow(0 6px 7px rgba(48, 67, 39, 0.3)) !important;
}

.body-family-view.tree-style-tree .tree-node.botanical:not(.shadow):is(:hover, .highlighted, :focus-visible) .tree-portrait-frame {
    fill: #896b43;
    stroke: #ead27a;
    stroke-width: 4.2;
}

.body-family-view.tree-style-tree .tree-node.botanical:not(.shadow):is(:hover, .highlighted, :focus-visible) .tree-portrait-well {
    fill: #edf1d7;
    stroke: #708a5a;
    stroke-width: 1.8;
}

.body-family-view.tree-style-tree .tree-node.botanical:not(.shadow):is(:hover, .highlighted, :focus-visible) .tree-portrait-hit-area {
    fill: rgba(255, 246, 190, 0.14);
    stroke: #f3e2a0;
    stroke-width: 2.4;
}

.body-family-view.tree-style-tree .tree-node.botanical:not(.shadow):is(:hover, .highlighted, :focus-visible) .tree-node-bg {
    fill: #fff3c7;
    stroke: #c59f42;
    stroke-width: 2.7;
    filter: drop-shadow(0 4px 4px rgba(58, 49, 28, 0.24));
}

.body-family-view.tree-style-tree .tree-node.botanical:not(.shadow):is(:hover, .highlighted, :focus-visible) .tree-node-text-name {
    fill: #21472d;
    font-weight: 800;
}

.body-family-view.tree-style-tree .tree-node.botanical:not(.shadow):is(:hover, .highlighted, :focus-visible) .tree-node-text-dates {
    fill: #3d533c;
    font-weight: 700;
}

.body-family-view.tree-style-tree .tree-node.botanical:not(.shadow):is(:hover, .highlighted, :focus-visible) .tree-leaf {
    fill: #9ebc70;
    stroke: #365d3c;
}

.body-family-view.tree-style-tree .tree-node.botanical:not(.shadow):is(:hover, .highlighted, :focus-visible) .tree-vine {
    stroke: #648652;
}

.body-family-view.tree-style-tree .tree-node.botanical:not(.shadow):is(:hover, .highlighted, :focus-visible) .tree-frame-blossom-petal {
    fill: #f0c16c;
    stroke: #765326;
}

.body-family-view.tree-style-tree .tree-node.botanical:not(.shadow):is(:hover, .highlighted, :focus-visible) .tree-generated-main-asset {
    opacity: 1;
}

.body-family-view.tree-style-tree .tree-node.botanical:not(.shadow):is(:hover, .highlighted, :focus-visible) .tree-portrait-placeholder {
    opacity: 0.52;
}

.body-family-view.tree-style-tree .tree-connector.partner {
    stroke: #66855a;
    stroke-width: 1.9;
    opacity: 0.9;
}

.body-family-view.tree-style-tree .tree-connector.branch-bark.partner {
    stroke: #36533a;
    stroke-width: 3.5;
    opacity: 0.54;
}

.body-family-view.tree-style-tree .tree-connector.lineage-arm {
    stroke: #8b6b45;
    stroke-width: 3.15;
}

.body-family-view.tree-style-tree .tree-connector.branch-bark.lineage-arm {
    stroke: #453323;
    stroke-width: 6.8;
    opacity: 0.68;
}

.body-family-view.tree-style-tree .tree-connector.lineage-trunk {
    stroke: #795735;
    stroke-width: 4.25;
}

.body-family-view.tree-style-tree .tree-connector.branch-bark.lineage-trunk {
    stroke: #38291d;
    stroke-width: 9.4;
    opacity: 0.72;
}

.body-family-view.tree-style-tree .tree-lineage-junction {
    pointer-events: none;
}

.body-family-view.tree-style-tree .tree-lineage-knot {
    fill: #5c432b;
    stroke: #30241a;
    stroke-width: 1.7;
}

.body-family-view.tree-style-tree .tree-lineage-knot-ring {
    fill: #87955f;
    stroke: #d8cf99;
    stroke-width: 1.1;
}

.body-family-view.tree-style-tree .tree-lineage-junction-leaf {
    fill: #718c5d;
    stroke: #3e5a3c;
    stroke-width: 0.85;
    stroke-linejoin: round;
}

.body-family-view.tree-style-tree .tree-lineage-junction-leaf-1 {
    fill: #91a46b;
}

.body-family-view.tree-style-tree .tree-lineage-junction.parent-pair .tree-lineage-knot {
    filter: drop-shadow(0 1px 1px rgba(40, 31, 21, 0.24));
}

.body-family-view.tree-style-tree .tree-branch-glimmer.lineage-trunk {
    stroke: #d7bd70;
    stroke-width: 1.25;
    opacity: 0.54;
}

.body-family-view.tree-style-tree .tree-branch-glimmer.partner,
.body-family-view.tree-style-tree .tree-branch-glimmer.lineage-arm {
    display: none;
}

.body-family-view.tree-style-tree .tree-connector.relationship-highlighted {
    opacity: 1;
}

.body-family-view.tree-style-tree .tree-connector.partner.relationship-highlighted {
    stroke: #91ad73;
    stroke-width: 2.7;
}

.body-family-view.tree-style-tree .tree-connector.branch-bark.partner.relationship-highlighted {
    stroke: #284b31;
    stroke-width: 4.6;
    opacity: 0.78;
}

.body-family-view.tree-style-tree .tree-connector.lineage-arm.relationship-highlighted,
.body-family-view.tree-style-tree .tree-connector.lineage-trunk.relationship-highlighted {
    stroke: #b18448;
}

.body-family-view.tree-style-tree .tree-connector.branch-bark.lineage-arm.relationship-highlighted,
.body-family-view.tree-style-tree .tree-connector.branch-bark.lineage-trunk.relationship-highlighted {
    stroke: #2f2319;
    opacity: 0.9;
}

.body-family-view.tree-style-tree .tree-lineage-junction.relationship-highlighted .tree-lineage-knot {
    fill: #74522f;
    stroke: #231a13;
}

.body-family-view.tree-style-tree .tree-lineage-junction.relationship-highlighted .tree-lineage-knot-ring {
    fill: #e0c56f;
    stroke: #fff0b7;
}

.body-family-view.tree-style-tree .tree-lineage-junction.relationship-highlighted .tree-lineage-junction-leaf {
    fill: #9ebd75;
}

@media (max-width: 900px) {
    .body-family-view.tree-style-tree .family-tree-toolbar {
        background-size: cover, 8rem 6rem !important;
    }

    .body-family-view.tree-style-tree .tree-controls {
        justify-content: flex-start !important;
    }
}

@media (max-width: 650px) {
    .body-family-view.tree-style-tree header {
        min-height: 3rem;
        background-size: cover, 6rem 4rem !important;
    }

    .body-family-view.tree-style-tree .header-family-info strong {
        font-size: 0.9rem;
    }

    .body-family-view.tree-style-tree .family-tree-toolbar {
        max-height: 10.5rem;
        overflow-y: auto;
        padding: 0.55rem 0.65rem 0.6rem !important;
    }

    .body-family-view.tree-style-tree .tree-layout-options {
        flex: 1 0 100%;
        padding-left: 1rem !important;
    }

    .body-family-view.tree-style-tree .tree-canvas-zoom {
        top: 0.65rem;
        right: 0.65rem;
        width: 54px !important;
        min-width: 54px !important;
        height: min(220px, calc(100% - 8.5rem));
    }

    .body-family-view.tree-style-tree .tree-search-dock {
        right: 4.35rem;
        left: 0.65rem;
        bottom: 0.65rem;
        max-width: none;
    }

    .body-family-view.tree-style-tree .current-member-popover {
        left: 0;
        width: min(310px, calc(100vw - 5.2rem));
        max-height: min(300px, calc(100vh - 18rem));
    }

    .body-family-view.tree-style-tree .tree-viewport-wrapper {
        background-position:
            center,
            left -5rem bottom -3rem,
            center !important;
        background-size: cover, 15rem, auto !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .body-family-view.tree-style-tree .tree-wildlife-critter {
        animation: none !important;
        opacity: 0.82;
        transform: translate(var(--tree-critter-x-2), var(--tree-critter-y-2))
            rotate(var(--tree-critter-r-2));
        will-change: auto;
    }

    .body-family-view.tree-style-tree .tree-wildlife-flyer {
        animation: none !important;
        opacity: 0.72;
        transform: translate(24px, -28px) rotate(5deg);
        will-change: auto;
    }

    .body-family-view.tree-style-tree .tree-wildlife-flyer-image {
        animation: none !important;
        will-change: auto;
    }

    .body-family-view.tree-style-tree .tree-wildlife-critter .tree-wildlife-image {
        animation: none !important;
        will-change: auto;
    }

    .body-family-view.tree-style-tree .tree-wildlife [data-motion-part],
    .body-family-view.tree-style-tree .tree-wildlife [data-motion-part] *,
    .body-family-view.tree-style-tree .tree-wildlife-snail-segment {
        animation: none !important;
    }
}
