html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

body {
  margin-bottom: 60px;
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.12), transparent 22%),
    radial-gradient(circle at bottom right, rgba(249, 115, 22, 0.08), transparent 24%),
    #f4f7fb;
  color: #132238;
}

.app-navbar {
  margin: 1rem 1rem 0;
  padding: 0.65rem 0.9rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.07);
  backdrop-filter: blur(14px);
}

.app-navbar-admin {
  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, 0.08), transparent 25%),
    radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.1), transparent 28%),
    rgba(255, 255, 255, 0.92);
}

.app-navbar .navbar-brand {
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #0f172a;
}

.app-navbar .nav-link {
  border-radius: 999px;
  padding: 0.45rem 0.8rem !important;
  font-weight: 600;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.app-navbar .nav-link:hover,
.app-navbar .nav-link:focus-visible {
  background: rgba(14, 165, 233, 0.08);
  color: #0f172a !important;
}

.app-main-shell {
  padding-top: 1.15rem;
}

.app-main-shell-admin {
  padding-top: 1.4rem;
}

.app-footer {
  margin-top: 2rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08) !important;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
}

.family-tree-page {
  padding-bottom: 2.5rem;
}

.tree-hero {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 2.1fr) minmax(280px, 1fr);
  padding: 2rem;
  border-radius: 1.75rem;
  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, 0.14), transparent 28%),
    radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 247, 251, 0.92));
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
}

.tree-kicker,
.tree-panel-eyebrow,
.tree-toolbar-label,
.tree-stat-label {
  margin-bottom: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.76rem;
  font-weight: 700;
  color: #0f766e;
}

.tree-stats {
  display: grid;
  gap: 1rem;
}

.tree-stat-card,
.tree-main-panel,
.tree-detail-panel,
.tree-focus-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1.35rem;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.07);
}

.tree-stat-card {
  padding: 1rem 1.1rem;
}

.tree-stat-card strong {
  display: block;
  font-size: 2rem;
  line-height: 1;
  color: #132238;
}

.tree-explorer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1.25rem;
  align-items: start;
}

.tree-main-panel {
  padding: 1.1rem;
}

.tree-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}

.tree-toolbar-block {
  flex: 1 1 320px;
}

.tree-search-wrap {
  position: relative;
}

.tree-search-input {
  width: 100%;
  min-height: 3rem;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(248, 250, 252, 0.92);
  color: #132238;
}

.tree-search-input:focus {
  outline: none;
  border-color: rgba(8, 145, 178, 0.75);
  box-shadow: 0 0 0 0.22rem rgba(34, 211, 238, 0.16);
}

.tree-search-results {
  position: absolute;
  inset: calc(100% + 0.4rem) 0 auto 0;
  z-index: 10;
  display: grid;
  gap: 0.35rem;
  padding: 0.45rem;
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.14);
}

.tree-search-result {
  display: grid;
  gap: 0.15rem;
  width: 100%;
  padding: 0.75rem 0.85rem;
  text-align: left;
  border: 0;
  border-radius: 0.8rem;
  background: transparent;
  color: inherit;
}

.tree-search-result:hover,
.tree-search-result:focus-visible {
  background: rgba(14, 165, 233, 0.08);
  outline: none;
}

.tree-toolbar-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.tree-action-button {
  min-height: 3rem;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.44);
  border-radius: 999px;
  background: #fff;
  color: #132238;
  font-weight: 600;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.tree-action-button:hover:not(:disabled),
.tree-action-button:focus-visible:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(8, 145, 178, 0.54);
  box-shadow: 0 16px 28px rgba(8, 145, 178, 0.12);
  outline: none;
}

.tree-action-button:disabled {
  opacity: 0.45;
  cursor: default;
}

.tree-mobile-sheet-toggle {
  display: none;
}

.tree-breadcrumbs {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 0.95rem;
}

.tree-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.36);
  background: rgba(248, 250, 252, 0.92);
  color: #334155;
  font-size: 0.88rem;
  font-weight: 600;
}

.tree-breadcrumb.is-current {
  border-color: rgba(8, 145, 178, 0.34);
  background: rgba(236, 254, 255, 0.95);
  color: #0f172a;
}

.tree-breadcrumb-button {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
}

.tree-canvas-panel {
  display: grid;
  gap: 0.8rem;
}

.tree-canvas-hint {
  color: #64748b;
  font-size: 0.92rem;
}

.tree-graph-shell {
  position: relative;
  min-height: 68vh;
  overflow: hidden;
  border-radius: 1.25rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background:
    linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    radial-gradient(circle at top, rgba(255, 255, 255, 0.92), rgba(241, 245, 249, 0.92));
  background-size: 34px 34px, 34px 34px, auto;
  cursor: grab;
}

.tree-graph-shell.is-dragging {
  cursor: grabbing;
}

.tree-graph {
  width: 100%;
  height: 100%;
  min-height: 68vh;
  display: block;
}

.tree-link {
  fill: none;
  stroke-linecap: round;
  transition: opacity 0.2s ease, stroke-width 0.2s ease;
}

.tree-link[data-kind="parent"] {
  stroke: rgba(14, 116, 144, 0.72);
  stroke-width: 3.5;
}

.tree-link[data-kind="partner"] {
  stroke: rgba(249, 115, 22, 0.72);
  stroke-width: 4;
  stroke-dasharray: 10 8;
}

.tree-link.is-distant {
  opacity: 0.35;
}

.tree-union-marker {
  fill: #f97316;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 2;
}

.tree-branch-junction {
  fill: #0ea5e9;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 2;
}

.admin-page {
  display: grid;
  gap: 1.5rem;
}

.admin-hero {
  display: grid;
  gap: 1rem;
  padding: 1.7rem 1.9rem;
  border-radius: 1.6rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, 0.12), transparent 26%),
    radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 247, 251, 0.92));
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
}

.admin-hero-compact {
  max-width: 56rem;
  margin: 0 auto;
}

.admin-kicker {
  margin-bottom: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.76rem;
  font-weight: 700;
  color: #0f766e;
}

.admin-grid {
  display: grid;
  gap: 1.25rem;
}

.admin-surface,
.admin-form-card,
.admin-stat-card,
.admin-media-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1.35rem;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.07);
}

.admin-surface {
  padding: 1.2rem;
}

.admin-surface:hover {
  box-shadow: 0 24px 56px rgba(15, 23, 42, 0.09);
}

.admin-panel-header {
  margin-bottom: 1rem;
}

.admin-form-card {
  padding: 1.15rem;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.98));
}

.admin-form-card-plain {
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.admin-form-grid {
  display: grid;
  gap: 1rem;
}

.admin-input {
  min-height: 3rem;
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(248, 250, 252, 0.92);
  color: #132238;
}

.admin-input:focus {
  border-color: rgba(8, 145, 178, 0.75);
  box-shadow: 0 0 0 0.22rem rgba(34, 211, 238, 0.16);
}

.admin-primary-button,
.admin-success-button,
.admin-secondary-button {
  min-height: 3rem;
  padding: 0.8rem 1.1rem;
  border-radius: 999px;
  font-weight: 600;
}

.admin-primary-button {
  border: 1px solid #0891b2;
  background: linear-gradient(180deg, #0891b2, #0f766e);
  color: #fff;
}

.admin-success-button {
  border: 1px solid #15803d;
  background: linear-gradient(180deg, #22c55e, #15803d);
  color: #fff;
}

.admin-secondary-button {
  border: 1px solid rgba(148, 163, 184, 0.44);
  background: #fff;
  color: #132238;
}

.admin-stat-card {
  padding: 1rem 1.1rem;
}

.admin-media-card {
  display: grid;
  gap: 0.8rem;
  height: 100%;
  padding: 1rem;
}

.admin-media-frame {
  overflow: hidden;
  border-radius: 1rem;
  background: rgba(241, 245, 249, 0.95);
}

.admin-auth-page {
  padding: 1rem 0 2rem;
}

.admin-page .accordion-item,
.admin-page .table-responsive,
.admin-page .border.rounded {
  border-radius: 1rem !important;
}

.admin-page .accordion-item {
  overflow: hidden;
  border-color: rgba(148, 163, 184, 0.32);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.04);
}

.admin-page .accordion-button {
  background: rgba(248, 250, 252, 0.88);
  color: #132238;
  font-weight: 600;
}

.admin-page .accordion-button:not(.collapsed) {
  background: rgba(236, 254, 255, 0.92);
  color: #0f172a;
  box-shadow: none;
}

.admin-page .table {
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgba(248, 250, 252, 0.7);
  --bs-table-hover-bg: rgba(236, 254, 255, 0.8);
}

.admin-page .table thead th {
  color: #475569;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom-color: rgba(148, 163, 184, 0.3);
}

.admin-page .table tbody td {
  border-bottom-color: rgba(148, 163, 184, 0.22);
}

.admin-page .table-responsive {
  padding: 0.25rem 0.35rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(248, 250, 252, 0.72);
}

.admin-page .badge.text-bg-warning {
  background: linear-gradient(180deg, #fbbf24, #f59e0b) !important;
  color: #3b2f0e !important;
}

@media (max-width: 767.98px) {
  .admin-hero,
  .admin-surface {
    padding: 1rem;
  }
}

.tree-node {
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.tree-node-card {
  fill: rgba(255, 255, 255, 0.96);
  stroke: rgba(148, 163, 184, 0.44);
  stroke-width: 1.5;
  rx: 24px;
}

.tree-node-label {
  fill: #132238;
  font-size: 20px;
  font-weight: 700;
  pointer-events: none;
}

.tree-node-subtitle {
  fill: #64748b;
  font-size: 14px;
  pointer-events: none;
}

.tree-node-badge {
  fill: rgba(236, 253, 245, 0.98);
  stroke: rgba(34, 197, 94, 0.35);
  rx: 12px;
}

.tree-node-badge-text {
  fill: #166534;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
}

.tree-node.is-selected .tree-node-card {
  fill: rgba(236, 254, 255, 0.98);
  stroke: rgba(8, 145, 178, 0.88);
  stroke-width: 3.5;
  filter: drop-shadow(0 20px 30px rgba(8, 145, 178, 0.18));
}

.tree-node.is-immediate .tree-node-card {
  stroke: rgba(15, 23, 42, 0.22);
}

.tree-node.is-distant {
  opacity: 0.48;
}

.tree-node:hover .tree-node-card,
.tree-node:focus-visible .tree-node-card {
  stroke: rgba(8, 145, 178, 0.6);
  filter: drop-shadow(0 12px 22px rgba(8, 145, 178, 0.12));
  outline: none;
}

.tree-branch-toggle {
  fill: #132238;
  stroke: rgba(255, 255, 255, 0.88);
  stroke-width: 2;
  cursor: pointer;
}

.tree-branch-toggle-text {
  fill: #fff;
  font-size: 20px;
  font-weight: 700;
  pointer-events: none;
}

.tree-detail-panel {
  position: sticky;
  top: 1rem;
  display: grid;
  gap: 1rem;
  padding: 1.15rem;
  max-height: calc(100vh - 2rem);
  overflow: auto;
}

.tree-detail-header,
.tree-related-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.tree-detail-close {
  display: none;
  border: 0;
  background: transparent;
  color: #64748b;
  font-weight: 600;
}

.tree-focus-card {
  padding: 1rem;
  background: linear-gradient(180deg, rgba(236, 254, 255, 0.94), rgba(255, 255, 255, 0.98));
}

.tree-focus-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(19, 34, 56, 0.08);
  color: #0f172a;
  margin-bottom: 0.9rem;
}

.tree-focus-bio {
  color: #334155;
  line-height: 1.55;
}

.tree-related-group {
  display: grid;
  gap: 0.7rem;
}

.tree-related-title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: #132238;
}

.tree-related-count {
  min-width: 2rem;
  text-align: center;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  color: #475569;
  font-size: 0.82rem;
  font-weight: 700;
}

.tree-related-list {
  display: grid;
  gap: 0.65rem;
}

.tree-album-actions {
  display: grid;
}

.tree-album-button {
  min-height: 3rem;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 1rem;
  background: rgba(248, 250, 252, 0.84);
  color: #132238;
  font-weight: 700;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.tree-album-button:hover,
.tree-album-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(8, 145, 178, 0.42);
  box-shadow: 0 14px 24px rgba(8, 145, 178, 0.12);
  outline: none;
}

.tree-photo-modal[hidden] {
  display: none;
}

.tree-photo-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
}

.tree-photo-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(6px);
}

.tree-photo-modal-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1rem;
  width: min(92vw, 980px);
  max-height: min(88vh, 980px);
  margin: min(6vh, 3rem) auto;
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 1.4rem;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 32px 80px rgba(15, 23, 42, 0.28);
}

.tree-photo-modal-close {
  min-height: 2.85rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  font-weight: 700;
}

.tree-photo-modal-close {
  justify-self: end;
  border: 1px solid rgba(148, 163, 184, 0.44);
  background: #fff;
  color: #132238;
}

.tree-photo-modal-media {
  overflow: hidden;
  border-radius: 1.1rem;
  background: linear-gradient(180deg, rgba(226, 232, 240, 0.9), rgba(241, 245, 249, 0.9));
}

.tree-photo-modal-media img {
  display: block;
  width: 100%;
  max-height: 65vh;
  object-fit: contain;
  background: rgba(241, 245, 249, 0.92);
}

.tree-photo-modal-caption {
  padding: 0.9rem 1rem 0;
  color: #132238;
  font-size: 1rem;
  line-height: 1.55;
  font-weight: 500;
}

.tree-photo-modal-strip {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.tree-photo-thumb {
  flex: 0 0 96px;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 0.9rem;
  background: rgba(241, 245, 249, 0.92);
}

.tree-photo-thumb img {
  display: block;
  width: 100%;
  height: 76px;
  object-fit: cover;
}

.tree-photo-thumb.is-active {
  border-color: #0891b2;
  box-shadow: 0 12px 24px rgba(8, 145, 178, 0.16);
}

.tree-photo-modal-meta {
  display: flex;
  justify-content: flex-start;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.tree-related-link {
  display: grid;
  gap: 0.15rem;
  width: 100%;
  padding: 0.85rem 0.95rem;
  text-align: left;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 1rem;
  background: rgba(248, 250, 252, 0.8);
  color: inherit;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.tree-related-link:hover,
.tree-related-link:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(8, 145, 178, 0.42);
  box-shadow: 0 14px 24px rgba(8, 145, 178, 0.12);
  outline: none;
}

.tree-empty-state {
  padding: 0.85rem 0.95rem;
  border-radius: 1rem;
  background: rgba(248, 250, 252, 0.8);
  color: #64748b;
}

@media (max-width: 1199.98px) {
  .tree-explorer {
    grid-template-columns: 1fr;
  }

  .tree-detail-panel {
    position: static;
    max-height: none;
  }
}

@media (max-width: 991.98px) {
  .tree-hero {
    grid-template-columns: 1fr;
  }

  .tree-mobile-sheet-toggle,
  .tree-detail-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .tree-detail-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    max-height: 76vh;
    border-radius: 1.5rem 1.5rem 0 0;
    transform: translateY(calc(100% - 3.8rem));
    transition: transform 0.24s ease;
    box-shadow: 0 -20px 50px rgba(15, 23, 42, 0.18);
  }

  .tree-detail-panel::before {
    content: "";
    width: 56px;
    height: 5px;
    margin: 0 auto 0.6rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.55);
  }

  .tree-detail-panel.is-open {
    transform: translateY(0);
  }

  .tree-graph-shell,
  .tree-graph {
    min-height: 58vh;
  }
}

@media (max-width: 767.98px) {
  .tree-hero,
  .tree-main-panel {
    padding: 1.2rem;
  }

  .tree-toolbar-actions {
    width: 100%;
  }

  .tree-action-button {
    flex: 1 1 140px;
    justify-content: center;
  }

  .tree-photo-modal-dialog {
    width: min(94vw, 980px);
    margin: 2.5vh auto;
    padding: 0.8rem;
  }

  .tree-photo-modal-media img {
    max-height: 56vh;
  }
}

html {
  --tree-ink: #223127;
  --tree-ink-soft: #5d6f61;
  --tree-moss: #567348;
  --tree-moss-deep: #3c5339;
  --tree-leaf: #799662;
  --tree-bark: #77533b;
  --tree-bark-soft: #aa7b55;
  --tree-card: rgba(255, 251, 245, 0.94);
}

body {
  background:
    radial-gradient(circle at top left, rgba(121, 150, 98, 0.18), transparent 24%),
    radial-gradient(circle at top right, rgba(170, 123, 85, 0.12), transparent 24%),
    radial-gradient(circle at bottom right, rgba(86, 115, 72, 0.14), transparent 28%),
    linear-gradient(180deg, #faf6ee, #edf2e7 72%, #e8efe1);
  color: var(--tree-ink);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.28), transparent 34%),
    repeating-linear-gradient(
      90deg,
      rgba(86, 115, 72, 0.02) 0,
      rgba(86, 115, 72, 0.02) 1px,
      transparent 1px,
      transparent 30px
    );
}

.app-navbar {
  border-color: rgba(86, 115, 72, 0.14);
  background: linear-gradient(180deg, rgba(255, 251, 245, 0.95), rgba(244, 238, 227, 0.92));
  box-shadow: 0 18px 40px rgba(44, 61, 40, 0.1);
}

.app-navbar-admin {
  background:
    radial-gradient(circle at top left, rgba(121, 150, 98, 0.14), transparent 25%),
    radial-gradient(circle at bottom right, rgba(170, 123, 85, 0.12), transparent 28%),
    rgba(252, 247, 239, 0.94);
}

.app-navbar .navbar-brand {
  color: var(--tree-moss-deep);
}

.app-navbar .nav-link:hover,
.app-navbar .nav-link:focus-visible {
  background: rgba(121, 150, 98, 0.12);
  color: var(--tree-moss-deep) !important;
}

.app-footer {
  border-top-color: rgba(86, 115, 72, 0.12) !important;
  background: rgba(250, 246, 238, 0.78);
}

.site-shell-section,
.site-panel,
.site-callout {
  border: 1px solid rgba(86, 115, 72, 0.14);
  border-radius: 1.6rem;
  background: var(--tree-card);
  box-shadow: 0 22px 52px rgba(44, 61, 40, 0.08);
}

.site-shell-section {
  padding: 2rem;
  background:
    radial-gradient(circle at top left, rgba(121, 150, 98, 0.16), transparent 30%),
    radial-gradient(circle at bottom right, rgba(170, 123, 85, 0.11), transparent 28%),
    linear-gradient(180deg, rgba(255, 251, 245, 0.96), rgba(244, 239, 230, 0.94));
}

.site-kicker {
  margin-bottom: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--tree-moss);
}

.site-shell-title {
  color: var(--tree-ink);
}

.site-shell-lead {
  color: var(--tree-ink-soft);
  max-width: 44rem;
}

.site-shell-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.site-primary-button,
.site-secondary-button {
  min-height: 3rem;
  padding: 0.82rem 1.2rem;
  border-radius: 999px;
  font-weight: 700;
}

.site-primary-button {
  border: 1px solid var(--tree-moss-deep);
  background: linear-gradient(180deg, var(--tree-leaf), var(--tree-moss-deep));
  color: #fff;
}

.site-primary-button:hover,
.site-primary-button:focus-visible {
  color: #fff;
}

.site-secondary-button {
  border: 1px solid rgba(119, 83, 59, 0.28);
  background: rgba(255, 249, 241, 0.94);
  color: var(--tree-bark);
}

.site-secondary-button:hover,
.site-secondary-button:focus-visible {
  color: var(--tree-bark);
}

.site-panel,
.site-callout {
  padding: 1.45rem;
}

.site-panel-list {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-panel-list li {
  padding: 0.82rem 0.95rem;
  border-radius: 1rem;
  background: rgba(237, 243, 230, 0.8);
  color: var(--tree-ink);
}

.tree-hero,
.admin-hero {
  border-color: rgba(86, 115, 72, 0.14);
  background:
    radial-gradient(circle at top left, rgba(121, 150, 98, 0.17), transparent 28%),
    radial-gradient(circle at bottom right, rgba(170, 123, 85, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(255, 251, 245, 0.96), rgba(241, 236, 226, 0.94));
  box-shadow: 0 24px 60px rgba(44, 61, 40, 0.1);
}

.tree-kicker,
.tree-panel-eyebrow,
.tree-toolbar-label,
.tree-stat-label,
.admin-kicker {
  color: var(--tree-moss);
}

.tree-stat-card,
.tree-main-panel,
.tree-detail-panel,
.tree-focus-card,
.admin-surface,
.admin-form-card,
.admin-stat-card,
.admin-media-card {
  border-color: rgba(86, 115, 72, 0.14);
  background: var(--tree-card);
  box-shadow: 0 20px 50px rgba(44, 61, 40, 0.08);
}

.tree-search-input,
.admin-input,
.tree-related-link,
.tree-album-button,
.tree-empty-state {
  border-color: rgba(121, 150, 98, 0.28);
  background: rgba(247, 243, 235, 0.92);
  color: var(--tree-ink);
}

.tree-search-input:focus,
.admin-input:focus {
  border-color: rgba(86, 115, 72, 0.76);
  box-shadow: 0 0 0 0.22rem rgba(121, 150, 98, 0.16);
}

.tree-action-button,
.admin-secondary-button {
  border-color: rgba(119, 83, 59, 0.22);
  background: rgba(255, 251, 245, 0.98);
  color: var(--tree-ink);
}

.tree-action-button:hover:not(:disabled),
.tree-action-button:focus-visible:not(:disabled),
.tree-related-link:hover,
.tree-related-link:focus-visible,
.tree-album-button:hover,
.tree-album-button:focus-visible,
.admin-secondary-button:hover,
.admin-secondary-button:focus-visible {
  border-color: rgba(86, 115, 72, 0.44);
  box-shadow: 0 14px 26px rgba(86, 115, 72, 0.14);
}

.tree-breadcrumb {
  border-color: rgba(121, 150, 98, 0.22);
  background: rgba(247, 242, 234, 0.92);
  color: var(--tree-ink-soft);
}

.tree-breadcrumb.is-current {
  border-color: rgba(86, 115, 72, 0.32);
  background: rgba(234, 242, 227, 0.96);
  color: var(--tree-moss-deep);
}

.tree-graph-shell {
  border-color: rgba(121, 150, 98, 0.2);
  background:
    linear-gradient(rgba(121, 150, 98, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(121, 150, 98, 0.08) 1px, transparent 1px),
    radial-gradient(circle at top, rgba(255, 251, 245, 0.96), rgba(236, 242, 229, 0.94));
}

.tree-link[data-kind="parent"] {
  stroke: rgba(86, 115, 72, 0.82);
}

.tree-link[data-kind="partner"] {
  stroke: rgba(119, 83, 59, 0.8);
}

.tree-union-marker {
  fill: var(--tree-bark-soft);
}

.tree-branch-junction {
  fill: var(--tree-leaf);
}

.tree-node-card {
  fill: rgba(255, 251, 245, 0.97);
  stroke: rgba(121, 150, 98, 0.34);
}

.tree-node-label,
.tree-related-title,
.tree-stat-card strong {
  color: var(--tree-ink);
  fill: var(--tree-ink);
}

.tree-node-subtitle,
.tree-canvas-hint,
.tree-focus-bio,
.tree-related-count,
.tree-detail-close {
  color: var(--tree-ink-soft);
  fill: var(--tree-ink-soft);
}

.tree-node-badge {
  fill: rgba(234, 242, 227, 0.98);
  stroke: rgba(121, 150, 98, 0.34);
}

.tree-node-badge-text {
  fill: var(--tree-moss-deep);
}

.tree-node.is-selected .tree-node-card {
  fill: rgba(242, 247, 236, 0.98);
  stroke: rgba(86, 115, 72, 0.9);
  filter: drop-shadow(0 20px 30px rgba(86, 115, 72, 0.2));
}

.tree-node:hover .tree-node-card,
.tree-node:focus-visible .tree-node-card {
  stroke: rgba(86, 115, 72, 0.58);
  filter: drop-shadow(0 12px 22px rgba(86, 115, 72, 0.12));
}

.tree-branch-toggle {
  fill: var(--tree-moss-deep);
}

.tree-focus-card {
  background: linear-gradient(180deg, rgba(237, 244, 230, 0.95), rgba(255, 251, 245, 0.98));
}

.tree-focus-chip {
  background: rgba(86, 115, 72, 0.1);
  color: var(--tree-moss-deep);
}

.tree-photo-modal-backdrop {
  background: rgba(34, 49, 39, 0.66);
}

.tree-photo-modal-dialog {
  border-color: rgba(121, 150, 98, 0.22);
  background: rgba(255, 251, 246, 0.98);
  box-shadow: 0 32px 80px rgba(34, 49, 39, 0.28);
}

.tree-photo-thumb.is-active {
  border-color: var(--tree-moss);
  box-shadow: 0 12px 24px rgba(86, 115, 72, 0.16);
}
