:root {
  --bg: #050706;
  --panel: rgba(16, 22, 20, 0.72);
  --panel-solid: #111714;
  --panel-soft: rgba(255, 248, 231, 0.06);
  --line: rgba(255, 248, 231, 0.12);
  --line-strong: rgba(240, 212, 139, 0.36);
  --text: #fff8ea;
  --muted: rgba(255, 248, 231, 0.64);
  --faint: rgba(255, 248, 231, 0.42);
  --gold: #f0d48b;
  --gold-2: #d5a64a;
  --teal: #75d7c3;
  --rose: #de8c92;
  --stone: #c8b994;
  --danger: #d86767;
  --success: #75d7a6;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.46);
  --radius: 8px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

#canvas-container {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(180deg, rgba(5, 7, 6, 0.12), rgba(5, 7, 6, 0.8)),
    #050706;
}

#canvas-container canvas {
  display: block;
}

#label-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.glass {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(138%);
  -webkit-backdrop-filter: blur(18px) saturate(138%);
}

.font-display {
  font-family: "Playfair Display", serif;
}

.top-shell {
  position: fixed;
  top: 18px;
  left: 18px;
  right: 18px;
  z-index: 30;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  pointer-events: none;
}

.top-shell > * {
  pointer-events: auto;
}

.brand-panel {
  min-width: 280px;
  max-width: min(540px, 48vw);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: linear-gradient(135deg, var(--gold), #a97520);
  color: #151008;
  font-family: "Playfair Display", serif;
  font-weight: 700;
}

.brand-title {
  margin: 0;
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1.1;
  letter-spacing: 0;
}

.brand-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.brand-actions {
  display: none;
  margin-left: auto;
  align-items: center;
  gap: 8px;
}

.mobile-pill-btn,
.mobile-menu-toggle {
  min-width: 42px;
  min-height: 40px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 248, 231, 0.14);
  background: rgba(255, 248, 231, 0.07);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 900;
}

.mobile-menu-toggle {
  font-size: 1.05rem;
}

.toolbar {
  border-radius: var(--radius);
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: min(980px, calc(100vw - 380px));
}

.toolbar::-webkit-scrollbar {
  height: 6px;
}

.toolbar::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(240, 212, 139, 0.28);
}

.btn,
.icon-btn {
  min-height: 38px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 248, 231, 0.14);
  background: rgba(255, 248, 231, 0.07);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 800;
  white-space: nowrap;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.btn {
  padding: 0 14px;
}

.icon-btn {
  min-width: 38px;
  padding: 0 11px;
}

.btn:hover,
.icon-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 248, 231, 0.12);
  border-color: rgba(240, 212, 139, 0.42);
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), #c1892f);
  border-color: rgba(240, 212, 139, 0.7);
  color: #151008;
}

.btn-danger {
  background: rgba(216, 103, 103, 0.12);
  border-color: rgba(216, 103, 103, 0.42);
  color: #ffb9b9;
}

.search-box,
.tree-select {
  width: 230px;
  height: 38px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 248, 231, 0.14);
  background: rgba(255, 248, 231, 0.07);
  color: var(--text);
  padding: 0 12px;
  outline: none;
  font-size: 0.84rem;
  font-weight: 700;
}

.tree-select {
  width: 250px;
}

.tree-select option {
  background: #111714;
  color: var(--text);
}

.search-box::placeholder {
  color: var(--faint);
}

.search-box:focus,
.tree-select:focus {
  border-color: rgba(240, 212, 139, 0.62);
  box-shadow: 0 0 0 3px rgba(240, 212, 139, 0.12);
}

.stats-panel {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 24;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  pointer-events: none;
}

.stat-chip {
  min-height: 30px;
  border-radius: var(--radius);
  padding: 6px 10px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.legend-panel {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 24;
  border-radius: var(--radius);
  padding: 12px 14px;
  width: 245px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.mobile-tree-list {
  position: fixed;
  inset: 132px 10px 72px;
  z-index: 28;
  display: none;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
}

.mobile-list-header {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
}

.mobile-list-header strong {
  color: var(--text);
  font-size: 0.86rem;
}

.mobile-list-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 248, 231, 0.06);
  color: var(--text);
  font-size: 1.1rem;
}

.mobile-tree-list-body {
  overflow-y: auto;
  padding: 8px;
}

.mobile-generation-label {
  padding: 10px 8px 6px;
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.mobile-tree-row {
  width: 100%;
  min-height: 54px;
  margin-top: 6px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 248, 231, 0.1);
  background: rgba(255, 248, 231, 0.045);
  color: var(--text);
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 9px 8px calc(9px + (var(--depth, 0) * 16px));
  text-align: left;
}

.mobile-tree-row.is-active {
  border-color: rgba(240, 212, 139, 0.64);
  background: rgba(240, 212, 139, 0.12);
}

.mobile-tree-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(240, 212, 139, 0.15);
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 900;
}

.mobile-tree-name,
.mobile-tree-meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-tree-name {
  font-size: 0.86rem;
  font-weight: 900;
}

.mobile-tree-meta {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
}

.mobile-tree-count {
  color: var(--faint);
  font-size: 0.7rem;
  font-weight: 900;
}

.legend-title {
  color: var(--text);
  font-family: "Playfair Display", serif;
  font-size: 0.95rem;
  margin-bottom: 9px;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 7px;
}

.line-swatch {
  width: 34px;
  height: 2px;
  border-radius: 10px;
  flex: 0 0 auto;
}

.line-swatch.parent {
  background: var(--gold);
  box-shadow: 0 0 12px rgba(240, 212, 139, 0.45);
}

.line-swatch.spouse {
  background: repeating-linear-gradient(90deg, var(--teal) 0 6px, transparent 6px 10px);
  box-shadow: 0 0 12px rgba(117, 215, 195, 0.42);
}

.person-card {
  width: 142px;
  pointer-events: auto;
  user-select: none;
  transform: translate(-50%, -112%);
  border-radius: var(--radius);
  border: 1px solid rgba(240, 212, 139, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 248, 231, 0.055), rgba(255, 248, 231, 0.015)),
    rgba(14, 19, 17, 0.78);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 248, 231, 0.08);
  backdrop-filter: blur(12px) saturate(130%);
  -webkit-backdrop-filter: blur(12px) saturate(130%);
  padding: 9px 8px 10px;
  text-align: center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.person-card.is-spouse {
  border-color: rgba(117, 215, 195, 0.24);
}

.person-card.is-hover,
.person-card:hover,
.person-card.is-active {
  background: rgba(22, 29, 26, 0.92);
  border-color: rgba(240, 212, 139, 0.74);
  box-shadow: 0 0 30px rgba(240, 212, 139, 0.26), 0 18px 44px rgba(0, 0, 0, 0.48);
}

.person-card.is-spouse.is-hover,
.person-card.is-spouse:hover,
.person-card.is-spouse.is-active {
  border-color: rgba(117, 215, 195, 0.72);
  box-shadow: 0 0 30px rgba(117, 215, 195, 0.26), 0 18px 44px rgba(0, 0, 0, 0.48);
}

.person-card.is-dimmed {
  opacity: 0.28;
}

.avatar-ring {
  width: 58px;
  height: 58px;
  margin: 0 auto;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, var(--gold), #8d6524);
  box-shadow: 0 0 18px rgba(240, 212, 139, 0.4);
  position: relative;
  display: grid;
  place-items: center;
}

.person-card.is-spouse .avatar-ring {
  background: linear-gradient(135deg, var(--teal), #2f8071);
  box-shadow: 0 0 18px rgba(117, 215, 195, 0.36);
}

.avatar-ring img {
  position: absolute;
  z-index: 2;
  inset: 2px;
  display: block;
  width: calc(100% - 4px);
  height: calc(100% - 4px);
  border-radius: 50%;
  object-fit: cover;
  background: #1b211f;
}

.avatar-fallback {
  position: absolute;
  z-index: 1;
  inset: 2px;
  display: grid;
  border-radius: 50%;
  place-items: center;
  background: rgba(17, 23, 20, 0.95);
  color: var(--gold);
  font-size: 0.84rem;
  font-weight: 900;
}

.person-name {
  margin-top: 7px;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.18;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.person-meta {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 40;
  width: 390px;
  max-width: 92vw;
  height: 100%;
  border-left: 1px solid var(--line);
  transform: translateX(100%);
  transition: transform 0.42s cubic-bezier(0.22, 0.9, 0.3, 1);
  overflow-y: auto;
  background: rgba(13, 18, 16, 0.96);
  box-shadow: -28px 0 68px rgba(0, 0, 0, 0.48);
}

.sheet-grip {
  display: none;
}

.sidebar.open {
  transform: translateX(0);
}

.sidebar::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-thumb {
  border-radius: 20px;
  background: rgba(240, 212, 139, 0.26);
}

.sidebar-hero {
  position: relative;
  height: 230px;
  overflow: hidden;
  background: #111714;
}

.sidebar-hero img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sidebar-photo-fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 35%, rgba(240, 212, 139, 0.2), transparent 34%),
    linear-gradient(135deg, #121916, #050706);
  color: var(--gold);
  font-family: "Playfair Display", serif;
  font-size: 3rem;
  font-weight: 700;
}

.sidebar-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 7, 6, 0.02) 30%, rgba(13, 18, 16, 0.96) 100%);
}

.sidebar-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 248, 231, 0.14);
  background: rgba(5, 7, 6, 0.62);
  color: var(--text);
  font-size: 1.15rem;
}

.sidebar-body {
  position: relative;
  padding: 0 24px 28px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(240, 212, 139, 0.32);
  background: rgba(240, 212, 139, 0.13);
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  margin-top: -12px;
}

.tag.spouse {
  border-color: rgba(117, 215, 195, 0.34);
  background: rgba(117, 215, 195, 0.12);
  color: var(--teal);
}

.sidebar-name {
  margin: 12px 0 0;
  color: var(--text);
  font-size: 1.75rem;
  line-height: 1.08;
  letter-spacing: 0;
}

.sidebar-years {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.detail-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.section-label {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 9px;
}

.bio {
  margin: 0;
  color: rgba(255, 248, 231, 0.76);
  font-size: 0.88rem;
  line-height: 1.7;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.detail-cell {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel-soft);
  padding: 10px;
}

.detail-cell span {
  display: block;
  color: var(--faint);
  font-size: 0.7rem;
  font-weight: 900;
  margin-bottom: 4px;
}

.detail-cell strong {
  color: var(--text);
  font-size: 0.9rem;
}

.related-list {
  display: grid;
  gap: 8px;
}

.related-chip {
  min-height: 42px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 248, 231, 0.055);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  text-align: left;
}

.related-chip:hover {
  border-color: var(--line-strong);
  background: rgba(240, 212, 139, 0.1);
}

.related-chip img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}

.related-chip span {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.related-chip span::first-line {
  color: var(--text);
}

.sidebar-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 7, 6, 0.72);
  backdrop-filter: blur(10px);
}

.modal-overlay.show {
  display: flex;
}

.modal {
  width: 560px;
  max-width: 96vw;
  max-height: 92vh;
  overflow-y: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #111714;
  box-shadow: var(--shadow);
}

.modal-header,
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
}

.modal-header {
  border-bottom: 1px solid var(--line);
}

.modal-footer {
  border-top: 1px solid var(--line);
}

.modal-title {
  margin: 0;
  color: var(--text);
  font-size: 1.1rem;
  letter-spacing: 0;
}

.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 248, 231, 0.06);
  color: var(--text);
  font-size: 1.08rem;
}

.mobile-step-count,
.mobile-step-btn {
  display: none;
}

.modal-body {
  padding: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.form-control {
  width: 100%;
  min-height: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 248, 231, 0.07);
  color: var(--text);
  padding: 9px 11px;
  outline: none;
}

.form-control option {
  background: #111714;
  color: var(--text);
}

.form-control:focus {
  border-color: rgba(240, 212, 139, 0.62);
  box-shadow: 0 0 0 3px rgba(240, 212, 139, 0.12);
}

textarea.form-control {
  resize: vertical;
}

.form-control[type="file"] {
  padding: 8px;
  cursor: pointer;
}

pre {
  font-family: "Inter", monospace;
  color: var(--text);
}

.toast-wrap {
  position: fixed;
  right: 18px;
  top: 94px;
  z-index: 90;
  display: grid;
  gap: 8px;
}

.toast {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(16, 22, 20, 0.94);
  color: var(--text);
  box-shadow: var(--shadow);
  padding: 10px 12px;
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 800;
}

.toast.success {
  border-color: rgba(117, 215, 166, 0.38);
}

.toast.error {
  border-color: rgba(216, 103, 103, 0.42);
}

#loading-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--bg);
  color: var(--muted);
  transition: opacity 0.5s ease;
}

.spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(240, 212, 139, 0.18);
  border-top-color: var(--gold);
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 920px) {
  .top-shell {
    flex-direction: column;
    align-items: stretch;
  }

  .brand-panel,
  .toolbar {
    max-width: none;
    width: 100%;
  }

  .toolbar {
    justify-content: flex-start;
    max-height: 34vh;
    overflow: auto;
    align-content: flex-start;
  }

  .search-box,
  .tree-select {
    width: min(100%, 320px);
  }

  .legend-panel {
    display: none;
  }
}

@media (max-width: 640px) {
  body.mobile-list-mode #label-layer {
    opacity: 0.34;
  }

  .top-shell {
    top: 10px;
    left: 10px;
    right: 10px;
    gap: 8px;
  }

  .brand-panel {
    min-width: 0;
    padding: 10px 12px;
  }

  .brand-actions {
    display: flex;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .brand-title {
    font-size: 1rem;
  }

  .brand-subtitle {
    display: none;
  }

  .toolbar {
    flex-wrap: wrap;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    padding: 8px;
    pointer-events: none;
    transform: translateY(-6px);
    transition: max-height 0.28s ease, opacity 0.2s ease, transform 0.2s ease;
    -webkit-overflow-scrolling: touch;
  }

  body.mobile-controls-open .toolbar {
    max-height: 46vh;
    opacity: 1;
    overflow-y: auto;
    pointer-events: auto;
    transform: translateY(0);
  }

  .search-box,
  .tree-select {
    flex: 1 1 100%;
    width: 100%;
    min-height: 44px;
  }

  .btn,
  .icon-btn {
    flex: 1 1 calc(50% - 8px);
    width: auto;
    min-width: 0;
    min-height: 44px;
    padding: 0 12px;
  }

  .mobile-tree-list {
    display: none;
  }

  body.mobile-list-mode .mobile-tree-list {
    display: flex;
  }

  .person-card {
    width: 92px;
    padding: 6px 6px 7px;
    transform: translate(-50%, -148%);
    background:
      linear-gradient(180deg, rgba(255, 248, 231, 0.05), rgba(255, 248, 231, 0.01)),
      rgba(14, 19, 17, 0.54);
    border-color: rgba(240, 212, 139, 0.32);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 248, 231, 0.07);
    backdrop-filter: blur(6px) saturate(120%);
    -webkit-backdrop-filter: blur(6px) saturate(120%);
  }

  .avatar-ring {
    width: 38px;
    height: 38px;
  }

  .person-name {
    margin-top: 5px;
    font-size: 0.64rem;
    line-height: 1.1;
  }

  .person-meta {
    display: none;
  }

  .person-card.is-hover,
  .person-card:hover,
  .person-card.is-active {
    background: rgba(22, 29, 26, 0.68);
  }

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

  .stats-panel {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .stat-chip {
    font-size: 0.68rem;
    padding: 5px 8px;
  }

  .sidebar {
    width: 100vw;
    max-width: 100vw;
    top: auto;
    bottom: 0;
    height: min(78vh, 700px);
    border-left: 0;
    border-top: 1px solid var(--line);
    border-radius: 12px 12px 0 0;
    transform: translateY(105%);
    background: rgba(13, 18, 16, 0.9);
    backdrop-filter: blur(16px) saturate(128%);
    -webkit-backdrop-filter: blur(16px) saturate(128%);
  }

  .sidebar.open {
    transform: translateY(0);
  }

  .sidebar.open.sheet-collapsed {
    transform: translateY(calc(100% - 92px));
    overflow: hidden;
  }

  .sheet-grip {
    display: block;
    position: sticky;
    top: 0;
    z-index: 4;
    width: 56px;
    height: 24px;
    margin: 0 auto -8px;
    border: 0;
    background: transparent;
  }

  .sheet-grip::before {
    content: "";
    display: block;
    width: 44px;
    height: 4px;
    margin: 10px auto;
    border-radius: 999px;
    background: rgba(255, 248, 231, 0.36);
  }

  .sidebar-hero {
    height: 128px;
  }

  .sidebar-body {
    padding: 0 18px 24px;
  }

  .sidebar-name {
    font-size: 1.46rem;
  }

  .modal-overlay {
    align-items: flex-end;
    padding: 10px;
  }

  .modal {
    width: 100%;
    max-width: none;
    max-height: 88vh;
    border-radius: 12px 12px 0 0;
  }

  .modal-header,
  .modal-footer,
  .modal-body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .modal-footer {
    flex-wrap: wrap;
  }

  .form-control {
    min-height: 44px;
    font-size: 1rem;
  }

  #personModal .form-group[data-person-step] {
    display: none;
  }

  #personModal[data-step="1"] .form-group[data-person-step="1"],
  #personModal[data-step="2"] .form-group[data-person-step="2"],
  #personModal[data-step="3"] .form-group[data-person-step="3"] {
    display: block;
  }

  #personModal .form-row {
    display: block;
  }

  #personModal .mobile-step-count,
  #personModal .mobile-step-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-step-count {
    flex: 1 1 100%;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 900;
  }

  #personModal .modal-footer .btn {
    flex: 1 1 calc(50% - 8px);
  }

  #personModal[data-step="1"] #personPrevStep,
  #personModal:not([data-step="3"]) #personSaveButton,
  #personModal[data-step="3"] #personNextStep {
    display: none;
  }
}
