/* ------------------------------------------------------------------------------------------
   Kinvella button system
   ------------------------------------------------------------------------------------------
   Purpose : Single source of truth for primary and secondary site buttons.
   Notes   : Page-specific CSS may position buttons, but color, padding, radius, typography,
             and interactive treatment should stay here so CTA styles do not drift.
   ------------------------------------------------------------------------------------------ */

:root {
  --kv-btn-radius: 999px;
  --kv-btn-min-height: 2.3rem;
  --kv-btn-padding-block: 0.48rem;
  --kv-btn-padding-inline: clamp(0.82rem, 1.35vw, 1rem);
  --kv-btn-gap: 0.42rem;
  --kv-btn-font-size: clamp(0.82rem, 1.62vw, 0.94rem);
  --kv-btn-font-weight: 800;
  --kv-btn-letter-spacing: 0.018em;
  --kv-profile-support-btn-min-height: 1.76rem;
  --kv-profile-support-btn-padding-block: 0.32rem;
  --kv-profile-support-btn-padding-inline: clamp(0.46rem, 0.98vw, 0.6rem);
  --kv-profile-support-btn-font-size: clamp(0.6rem, 1.1vw, 0.69rem);
  --kv-profile-support-btn-max-width: 5.45rem;
  --kv-btn-primary-color: #dcb350;
  --kv-btn-primary-border: rgba(214, 166, 82, 0.42);
  --kv-btn-primary-bg: linear-gradient(135deg, #24180f, #160f0a);
  --kv-btn-primary-shadow: 0 12px 24px rgba(40, 25, 13, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --kv-btn-secondary-color: #1d1309;
  --kv-btn-secondary-border: rgba(29, 19, 9, 0.38);
  --kv-btn-secondary-bg: linear-gradient(180deg, rgba(245, 230, 200, 0.92), rgba(233, 212, 172, 0.92));
  --kv-btn-secondary-shadow: 0 8px 16px rgba(29, 19, 9, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.56), inset 0 -2px 0 rgba(122, 87, 45, 0.08);
}

.btn-primary,
a.btn-primary,
button.btn-primary,
.primary-button,
.btn-secondary,
a.btn-secondary,
button.btn-secondary,
.map-speed-btn,
.person-chip,
.map-action-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--kv-btn-gap);
  width: auto;
  min-width: auto;
  max-width: 100%;
  min-height: var(--kv-btn-min-height);
  padding: var(--kv-btn-padding-block) var(--kv-btn-padding-inline);
  border-radius: var(--kv-btn-radius);
  font-family: var(--font-ui, var(--font-body, Inter, system-ui, sans-serif));
  font-size: var(--kv-btn-font-size);
  font-weight: var(--kv-btn-font-weight);
  letter-spacing: var(--kv-btn-letter-spacing);
  line-height: 1;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  transform: translateZ(0);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease, background-position 220ms ease;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary,
a.btn-primary,
button.btn-primary,
.primary-button,
.map-speed-btn.is-active,
.person-chip.is-active,
.person-chip.is-active-map,
.map-action-btn.is-active {
  isolation: isolate;
  overflow: hidden;
  color: var(--kv-btn-primary-color);
  border: 1px solid var(--kv-btn-primary-border);
  background: var(--kv-btn-primary-bg);
  box-shadow: var(--kv-btn-primary-shadow);
}

.btn-primary::after,
a.btn-primary::after,
button.btn-primary::after,
.primary-button::after {
  content: "";
  position: absolute;
  inset: 2px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.18), transparent);
  opacity: 0.34;
  transform: translateX(-32%);
  pointer-events: none;
}

.btn-secondary,
a.btn-secondary,
button.btn-secondary,
.map-speed-btn,
.person-chip,
.map-action-btn {
  color: var(--kv-btn-secondary-color);
  border: 1px solid var(--kv-btn-secondary-border);
  background: var(--kv-btn-secondary-bg);
  box-shadow: var(--kv-btn-secondary-shadow);
}

.btn-primary.wide,
.btn-secondary.wide,
a.btn-primary.wide,
a.btn-secondary.wide,
button.btn-primary.wide,
button.btn-secondary.wide {
  width: fit-content;
  min-width: clamp(8.8rem, 18vw, 10.6rem);
  max-width: 100%;
  justify-self: center;
  align-self: center;
}

.btn-primary:hover,
.btn-secondary:hover,
.map-speed-btn:hover,
.person-chip:hover,
.map-action-btn:hover {
  transform: translateY(-1px);
  filter: saturate(1.03);
}

.btn-primary:hover,
a.btn-primary:hover,
button.btn-primary:hover,
.primary-button:hover {
  box-shadow: 0 14px 26px rgba(40, 25, 13, 0.23), inset 0 1px 0 rgba(255, 232, 184, 0.12);
}

.btn-primary:active,
.btn-secondary:active,
.map-speed-btn:active,
.person-chip:active,
.map-action-btn:active {
  transform: translateY(0);
}

.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.map-speed-btn:focus-visible,
.person-chip:focus-visible,
.map-action-btn:focus-visible {
  outline: 2px solid rgba(212, 175, 55, 0.46);
  outline-offset: 3px;
}

.btn-primary > *,
.btn-secondary > *,
.map-speed-btn > *,
.person-chip > *,
.map-action-btn > * {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.btn-primary .button-arrow,
.btn-primary .hero-cta-arrow {
  margin-left: 0.28rem;
  font-size: 0.68em;
  transform: translateY(0.01em);
}

/* ------------------------------------------------------------------------------------------
   Final CTA conflict owner
   ------------------------------------------------------------------------------------------
   Purpose : Landing feature buttons, auth buttons, map CTAs, tree CTAs, and hero CTAs all
             share the same dimensions here. Section CSS can control only placement.
   ------------------------------------------------------------------------------------------ */
body :is(
  a.btn-primary.landing-feature-section__button,
  .landing-feature-section__button.btn-primary,
  a.btn-primary.landing-kinsight-preview__button,
  .landing-kinsight-preview__button.btn-primary,
  a.btn-primary.tree-full-link-bottom,
  .tree-full-link-bottom.btn-primary,
  a.btn-primary.map-full-link,
  .map-full-link.btn-primary,
  button.btn-primary.auth-submit,
  .auth-submit.btn-primary,
  .living-hero__cta-button.btn-primary
),
body :is(
  a.btn-secondary,
  button.btn-secondary,
  .btn-secondary.auth-panel-btn,
  .hero-cta-secondary.btn-secondary,
  .people-tree-link.btn-secondary
) {
  width: fit-content !important;
  min-width: clamp(8.8rem, 18vw, 10.6rem) !important;
  max-width: 100% !important;
  min-height: var(--kv-btn-min-height) !important;
  padding: var(--kv-btn-padding-block) var(--kv-btn-padding-inline) !important;
  border-radius: var(--kv-btn-radius) !important;
  font-size: var(--kv-btn-font-size) !important;
  line-height: 1 !important;
  text-align: center !important;
}

body :is(
  a.btn-primary.landing-feature-section__button,
  .landing-feature-section__button.btn-primary,
  a.btn-primary.landing-kinsight-preview__button,
  .landing-kinsight-preview__button.btn-primary,
  a.btn-primary.tree-full-link-bottom,
  .tree-full-link-bottom.btn-primary,
  a.btn-primary.map-full-link,
  .map-full-link.btn-primary,
  button.btn-primary.auth-submit,
  .auth-submit.btn-primary,
  .living-hero__cta-button.btn-primary
) {
  color: var(--kv-btn-primary-color) !important;
  border: 1px solid var(--kv-btn-primary-border) !important;
  background: var(--kv-btn-primary-bg) !important;
  box-shadow: var(--kv-btn-primary-shadow) !important;
}

body :is(
  a.btn-secondary,
  button.btn-secondary,
  .btn-secondary.auth-panel-btn,
  .hero-cta-secondary.btn-secondary,
  .people-tree-link.btn-secondary
) {
  color: var(--kv-btn-secondary-color) !important;
  border: 1px solid var(--kv-btn-secondary-border) !important;
  background: var(--kv-btn-secondary-bg) !important;
  box-shadow: var(--kv-btn-secondary-shadow) !important;
}

body :is(.auth-submit.btn-primary, .landing-feature-section__button.btn-primary, .landing-kinsight-preview__button.btn-primary)::before {
  content: none !important;
  display: none !important;
}

/* ------------------------------------------------------------------------------------------
   Final button source owner
   ------------------------------------------------------------------------------------------
   Purpose : One physical button system for primary and secondary actions across auth,
             landing feature CTAs, hero CTAs, tree/map controls, profile actions, capsule,
             public KinSight, and admin command-center actions.
   Notes   : Earlier page CSS may position buttons, but these final high-specificity owners
             keep size, padding, radius, colors, typography, and pseudo-decoration from drifting.
   ------------------------------------------------------------------------------------------ */
body :is(
  .btn-primary,
  a.btn-primary,
  button.btn-primary,
  .primary-button,
  .capsule-primary-button,
  .kinsight-primary-btn,
  .profile-action-button--dark,
  .admin-cc-btn--primary,
  .kinvella-hero__button,
  .map-speed-btn.is-active,
  .person-chip.is-active,
  .person-chip.is-active-map,
  .map-action-btn.is-active
),
body.landing-page:not(.authenticated-home) :is(
  .living-hero-shell .living-hero__cta-button.btn-primary,
  .hero-card.hero-card--landing .hero-cta-stack .btn-primary,
  .hero-card.hero-card--landing .hero-primary-button
),
body.landing-page :is(
  a.btn-primary.landing-feature-section__button,
  .landing-feature-section__button.btn-primary,
  .landing-kinsight-preview .landing-kinsight-preview__button,
  .landing-kinsight-preview .landing-kinsight-preview__button--center,
  .landing-kinsight-preview--quick-glance .landing-kinsight-preview__button,
  .landing-kinsight-preview--quick-glance .landing-kinsight-preview__button--center,
  .summary-card__legacy-action .btn-primary,
  .map-card a.map-full-link.btn-primary,
  .map-card .tree-full-link-bottom.map-full-link,
  .tree-full-link-bottom.btn-primary,
  .map-full-link.btn-primary
),
body.auth-page :is(
  button.btn-primary.auth-submit,
  .auth-submit.btn-primary
) {
  position: relative !important;
  isolation: isolate !important;
  overflow: hidden !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: var(--kv-btn-gap) !important;
  width: var(--living-hero-primary-cta-width, var(--living-hero-mobile-cta-width, fit-content)) !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: var(--living-hero-primary-cta-min-height, var(--living-hero-mobile-cta-min-height, var(--kv-btn-min-height))) !important;
  padding: var(--kv-btn-padding-block) var(--kv-btn-padding-inline) !important;
  border: 1px solid var(--kv-btn-primary-border) !important;
  border-radius: var(--kv-btn-radius) !important;
  background: var(--kv-btn-primary-bg) !important;
  background-size: 100% 100% !important;
  background-position: 0 0 !important;
  color: var(--kv-btn-primary-color) !important;
  font-family: var(--font-ui, var(--font-body, Inter, system-ui, sans-serif)) !important;
  font-size: var(--kv-btn-font-size) !important;
  font-weight: var(--kv-btn-font-weight) !important;
  letter-spacing: var(--kv-btn-letter-spacing) !important;
  line-height: 1 !important;
  text-align: center !important;
  text-decoration: none !important;
  text-shadow: none !important;
  white-space: nowrap !important;
  box-shadow: var(--kv-btn-primary-shadow) !important;
  transform: translateZ(0);
  box-sizing: border-box !important;
}

body :is(
  .btn-secondary:not(.tree-builder-action--danger),
  a.btn-secondary:not(.tree-builder-action--danger),
  button.btn-secondary:not(.tree-builder-action--danger),
  .map-speed-btn:not(.is-active),
  .person-chip:not(.is-active):not(.is-active-map),
  .map-action-btn:not(.is-active),
  .profile-action-button--outline,
  .admin-cc-btn--secondary,
  .living-hero__demo-button
) {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: var(--kv-btn-gap) !important;
  width: var(--living-hero-secondary-cta-width, var(--living-hero-mobile-cta-width, fit-content)) !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: var(--living-hero-secondary-cta-min-height, var(--living-hero-mobile-cta-min-height, var(--kv-btn-min-height))) !important;
  padding: var(--kv-btn-padding-block) var(--kv-btn-padding-inline) !important;
  border: 1px solid var(--kv-btn-secondary-border) !important;
  border-radius: var(--kv-btn-radius) !important;
  background: var(--kv-btn-secondary-bg) !important;
  color: var(--kv-btn-secondary-color) !important;
  font-family: var(--font-ui, var(--font-body, Inter, system-ui, sans-serif)) !important;
  font-size: var(--kv-btn-font-size) !important;
  font-weight: var(--kv-btn-font-weight) !important;
  letter-spacing: var(--kv-btn-letter-spacing) !important;
  line-height: 1 !important;
  text-align: center !important;
  text-decoration: none !important;
  text-shadow: none !important;
  white-space: nowrap !important;
  box-shadow: var(--kv-btn-secondary-shadow) !important;
  box-sizing: border-box !important;
}

/* Compact Profile support cards: resolves the generic profile-action button size conflict. */
body .profile-support-grid :is(a.profile-support-button, button.profile-support-button) {
  width: min(88%, var(--kv-profile-support-btn-max-width)) !important;
  min-width: 0 !important;
  min-height: var(--kv-profile-support-btn-min-height) !important;
  padding: var(--kv-profile-support-btn-padding-block) var(--kv-profile-support-btn-padding-inline) !important;
  font-size: var(--kv-profile-support-btn-font-size) !important;
  letter-spacing: 0 !important;
  line-height: 1 !important;
}

body :is(
  .btn-primary.wide,
  a.btn-primary.wide,
  button.btn-primary.wide,
  .btn-secondary.wide,
  a.btn-secondary.wide,
  button.btn-secondary.wide,
  .landing-feature-section__button.btn-primary,
  .landing-kinsight-preview__button,
  .landing-kinsight-preview__button--center,
  .auth-submit.btn-primary,
  .tree-full-link-bottom.btn-primary,
  .map-full-link.btn-primary
) {
  width: fit-content !important;
  min-width: clamp(8.8rem, 18vw, 10.6rem) !important;
  max-width: 100% !important;
}

body.landing-page:not(.authenticated-home) .living-hero-shell .living-hero__cta-button.btn-primary,
body.landing-page:not(.authenticated-home) .hero-card.hero-card--landing .hero-cta-stack .btn-primary,
body.landing-page:not(.authenticated-home) .hero-card.hero-card--landing .hero-primary-button {
  min-width: clamp(8.8rem, 18vw, 10.6rem) !important;
}

body :is(
  .btn-primary,
  a.btn-primary,
  button.btn-primary,
  .primary-button,
  .capsule-primary-button,
  .kinsight-primary-btn,
  .profile-action-button--dark,
  .admin-cc-btn--primary,
  .kinvella-hero__button,
  .map-speed-btn.is-active,
  .person-chip.is-active,
  .person-chip.is-active-map,
  .map-action-btn.is-active
)::after,
body.landing-page:not(.authenticated-home) :is(
  .living-hero-shell .living-hero__cta-button.btn-primary,
  .hero-card.hero-card--landing .hero-cta-stack .btn-primary,
  .hero-card.hero-card--landing .hero-primary-button
)::after,
body.landing-page :is(
  a.btn-primary.landing-feature-section__button,
  .landing-feature-section__button.btn-primary,
  .landing-kinsight-preview .landing-kinsight-preview__button,
  .landing-kinsight-preview .landing-kinsight-preview__button--center,
  .landing-kinsight-preview--quick-glance .landing-kinsight-preview__button,
  .landing-kinsight-preview--quick-glance .landing-kinsight-preview__button--center,
  .summary-card__legacy-action .btn-primary,
  .map-card a.map-full-link.btn-primary,
  .map-card .tree-full-link-bottom.map-full-link,
  .tree-full-link-bottom.btn-primary,
  .map-full-link.btn-primary
)::after,
body.auth-page :is(
  button.btn-primary.auth-submit,
  .auth-submit.btn-primary
)::after {
  content: "" !important;
  position: absolute !important;
  inset: 2px !important;
  z-index: -1 !important;
  display: block !important;
  border-radius: inherit !important;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.18), transparent) !important;
  opacity: 0.34 !important;
  transform: translateX(-32%) !important;
  pointer-events: none !important;
}

body :is(
  .btn-primary,
  a.btn-primary,
  button.btn-primary,
  .primary-button,
  .capsule-primary-button,
  .kinsight-primary-btn,
  .profile-action-button--dark,
  .admin-cc-btn--primary,
  .kinvella-hero__button,
  .btn-secondary,
  a.btn-secondary,
  button.btn-secondary,
  .profile-action-button--outline,
  .admin-cc-btn--secondary,
  .landing-kinsight-preview__button,
  .landing-kinsight-preview__button--center,
  .living-hero__cta-button,
  .living-hero__demo-button
)::before {
  content: none !important;
  display: none !important;
}

body :is(
  .btn-primary,
  a.btn-primary,
  button.btn-primary,
  .primary-button,
  .capsule-primary-button,
  .kinsight-primary-btn,
  .profile-action-button--dark,
  .admin-cc-btn--primary,
  .kinvella-hero__button,
  .btn-secondary,
  a.btn-secondary,
  button.btn-secondary,
  .profile-action-button--outline,
  .admin-cc-btn--secondary,
  .landing-kinsight-preview__button,
  .landing-kinsight-preview__button--center,
  .living-hero__cta-button,
  .living-hero__demo-button
):hover {
  transform: translateY(-1px) !important;
  filter: saturate(1.03) !important;
}

body :is(
  .btn-primary,
  a.btn-primary,
  button.btn-primary,
  .primary-button,
  .capsule-primary-button,
  .kinsight-primary-btn,
  .profile-action-button--dark,
  .admin-cc-btn--primary,
  .kinvella-hero__button,
  .btn-secondary,
  a.btn-secondary,
  button.btn-secondary,
  .profile-action-button--outline,
  .admin-cc-btn--secondary,
  .landing-kinsight-preview__button,
  .landing-kinsight-preview__button--center,
  .living-hero__cta-button,
  .living-hero__demo-button
):focus-visible {
  outline: 2px solid rgba(212, 175, 55, 0.46) !important;
  outline-offset: 3px !important;
}


/* ------------------------------------------------------------------------------------------
   Tree person action chooser button owner
   ------------------------------------------------------------------------------------------
   Purpose : Present person actions as compact premium rows with clear descriptions,
             muted palette icons, subtle separators, and a thumb-friendly close button.
   ------------------------------------------------------------------------------------------ */
body .tree-builder-sheet--chooser {
  overflow: visible !important;
}

body .tree-builder-sheet--chooser .tree-builder-choice-mark {
  width: 2.34rem !important;
  height: 2.34rem !important;
  display: grid !important;
  place-items: center !important;
  margin: -0.1rem auto 0.24rem !important;
  border: 1px solid rgba(151, 104, 41, 0.36) !important;
  border-radius: 0.88rem !important;
  color: #FBF4E5 !important;
  background: linear-gradient(180deg, rgba(178, 126, 50, 0.94), rgba(121, 79, 31, 0.95)) !important;
  box-shadow:
    0 0.48rem 0.88rem rgba(75, 43, 18, 0.14),
    inset 0 1px 0 rgba(255, 238, 197, 0.42) !important;
}

body .tree-builder-sheet--chooser .tree-builder-choice-mark svg {
  width: 1.32rem !important;
  height: 1.32rem !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  stroke-width: 1.9 !important;
}

body .tree-builder-sheet--chooser .tree-builder-head {
  margin-bottom: 0.44rem !important;
}

body .tree-builder-sheet--chooser .tree-builder-head::after {
  content: "" !important;
  display: block !important;
  width: min(74%, 15.5rem) !important;
  height: 1px !important;
  margin: 0.54rem auto 0 !important;
  background: linear-gradient(90deg, transparent, rgba(162, 113, 51, 0.30), transparent) !important;
}

body .tree-builder-sheet--chooser .tree-builder-choice-actions {
  --tree-choice-action-width: min(100%, 20.7rem);
  display: grid !important;
  width: var(--tree-choice-action-width) !important;
  max-width: 20.7rem !important;
  justify-items: stretch !important;
  gap: 0.34rem !important;
  margin: 0.42rem auto 0 !important;
  padding: 0 !important;
}

body .tree-builder-sheet--chooser .tree-builder-choice-actions :is(
  .tree-builder-choice-action,
  .tree-builder-choice-action.wide,
  button.tree-builder-choice-action.btn-primary.wide,
  button.tree-builder-choice-action.btn-secondary.wide
) {
  position: relative !important;
  display: grid !important;
  grid-template-columns: 2.36rem minmax(0, 1fr) auto !important;
  align-items: center !important;
  justify-content: stretch !important;
  gap: 0.56rem !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-height: 3.06rem !important;
  padding: 0.42rem 0.68rem !important;
  overflow: visible !important;
  border: 1px solid rgba(154, 111, 59, 0.22) !important;
  border-radius: 0.74rem !important;
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.96), rgba(247, 236, 218, 0.88)) !important;
  color: #24150B !important;
  box-shadow:
    0 0.44rem 0.86rem rgba(55, 33, 16, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.72) !important;
  text-align: left !important;
  text-decoration: none !important;
  transform: none !important;
  transition: transform 145ms ease, border-color 145ms ease, background 145ms ease, box-shadow 145ms ease !important;
}

body .tree-builder-sheet--chooser .tree-builder-choice-actions .tree-builder-choice-action:not(:first-of-type)::before {
  content: "" !important;
  position: absolute !important;
  left: 12% !important;
  right: 12% !important;
  top: -0.18rem !important;
  height: 1px !important;
  border: 0 !important;
  background: linear-gradient(90deg, transparent, rgba(153, 108, 52, 0.18), transparent) !important;
  pointer-events: none !important;
}

body .tree-builder-sheet--chooser .tree-builder-choice-actions .tree-builder-choice-action:hover,
body .tree-builder-sheet--chooser .tree-builder-choice-actions .tree-builder-choice-action:focus-visible {
  transform: translateY(-1px) !important;
  border-color: rgba(155, 108, 42, 0.36) !important;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.99), rgba(245, 230, 201, 0.94)) !important;
  box-shadow:
    0 0.62rem 1.02rem rgba(55, 33, 16, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.82) !important;
}

body .tree-builder-sheet--chooser .tree-builder-choice-action__icon {
  width: 2.12rem !important;
  height: 2.12rem !important;
  min-width: 2.12rem !important;
  display: inline-grid !important;
  place-items: center !important;
  border: 1px solid rgba(151, 104, 41, 0.24) !important;
  border-radius: 999px !important;
  color: #7A5422 !important;
  background:
    radial-gradient(circle at 34% 27%, rgba(255, 255, 252, 0.98), rgba(246, 230, 194, 0.86) 58%, rgba(194, 145, 61, 0.18)) !important;
  box-shadow:
    0 0.22rem 0.46rem rgba(69, 40, 17, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.72) !important;
}

body .tree-builder-sheet--chooser .tree-builder-choice-action__icon svg {
  width: 1.18rem !important;
  height: 1.18rem !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  stroke-width: 2.18 !important;
}

body .tree-builder-sheet--chooser .tree-builder-choice-action__content {
  display: grid !important;
  gap: 0.12rem !important;
  min-width: 0 !important;
  text-align: left !important;
}

body .tree-builder-sheet--chooser .tree-builder-choice-action__content strong {
  display: block !important;
  color: inherit !important;
  font-family: var(--font-display, "Cormorant Garamond", Georgia, serif) !important;
  font-size: clamp(1.02rem, 2.9vw, 1.14rem) !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body .tree-builder-sheet--chooser .tree-builder-choice-action__content small,
body .tree-builder-sheet--chooser .tree-builder-choice-action small {
  display: block !important;
  color: rgba(66, 43, 24, 0.72) !important;
  font-family: var(--font-body, Inter, sans-serif) !important;
  font-size: clamp(0.66rem, 2.1vw, 0.74rem) !important;
  font-weight: 650 !important;
  line-height: 1.12 !important;
  white-space: nowrap !important;
}

body .tree-builder-sheet--chooser .tree-builder-choice-action__chevron {
  display: inline-grid !important;
  place-items: center !important;
  width: 1rem !important;
  min-width: 1rem !important;
  color: rgba(126, 84, 35, 0.9) !important;
  font-size: 1.35rem !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  transform: translateY(-0.02rem) !important;
}

body .tree-builder-sheet--chooser .tree-builder-choice-action--primary,
body .tree-builder-sheet--chooser #treeBuilderOpenAddBtn {
  border-color: rgba(174, 124, 47, 0.36) !important;
  background:
    radial-gradient(circle at 20% 0%, rgba(219, 181, 102, 0.16), transparent 46%),
    linear-gradient(180deg, rgba(255, 251, 240, 0.98), rgba(242, 224, 189, 0.95)) !important;
  color: #42260E !important;
}

body .tree-builder-sheet--chooser .tree-builder-choice-action--primary .tree-builder-choice-action__icon,
body .tree-builder-sheet--chooser #treeBuilderOpenAddBtn .tree-builder-choice-action__icon {
  border-color: rgba(168, 117, 39, 0.34) !important;
  color: #8A611F !important;
  background:
    radial-gradient(circle at 35% 27%, rgba(255, 254, 244, 0.99), rgba(241, 219, 168, 0.94) 56%, rgba(193, 143, 55, 0.28)) !important;
}

body .tree-builder-sheet--chooser .tree-builder-action--danger,
body .tree-builder-sheet--chooser button.tree-builder-action--danger.btn-secondary.wide {
  border-color: rgba(132, 54, 43, 0.28) !important;
  background:
    linear-gradient(180deg, rgba(255, 249, 244, 0.98), rgba(249, 226, 219, 0.86)) !important;
  color: #8A3029 !important;
  box-shadow:
    0 0.44rem 0.86rem rgba(92, 34, 26, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.74) !important;
}

body .tree-builder-sheet--chooser .tree-builder-action--danger .tree-builder-choice-action__content small {
  color: rgba(114, 45, 38, 0.76) !important;
}

body .tree-builder-sheet--chooser .tree-builder-action--danger .tree-builder-choice-action__icon,
body .tree-builder-sheet--chooser #treeBuilderOpenDeleteBtn .tree-builder-choice-action__icon {
  border-color: rgba(137, 53, 44, 0.24) !important;
  color: #A13C32 !important;
  background:
    radial-gradient(circle at 34% 26%, rgba(255, 253, 250, 1), rgba(246, 222, 216, 0.94) 58%, rgba(176, 74, 62, 0.16)) !important;
}

body .tree-builder-sheet--chooser .tree-builder-action--danger .tree-builder-choice-action__chevron {
  color: rgba(136, 47, 38, 0.9) !important;
}

body .tree-builder-sheet--chooser .tree-builder-action--danger:disabled {
  opacity: 0.82 !important;
  cursor: not-allowed !important;
  filter: saturate(0.88) brightness(0.99) !important;
  border-color: rgba(132, 54, 43, 0.18) !important;
  background: linear-gradient(180deg, rgba(255, 249, 244, 0.86), rgba(243, 228, 220, 0.74)) !important;
  color: rgba(116, 57, 48, 0.78) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.58) !important;
}

body .tree-builder-sheet--chooser .tree-builder-action--danger:disabled .tree-builder-choice-action__icon {
  opacity: 0.82 !important;
  color: rgba(139, 59, 51, 0.84) !important;
}

body .tree-builder-sheet--chooser .tree-builder-choice-actions .tree-builder-lock-note {
  width: 100% !important;
  margin: 0.28rem auto 0 !important;
  padding: 0.56rem 0.72rem !important;
  border: 1px solid rgba(150, 109, 55, 0.16) !important;
  border-radius: 0.72rem !important;
  background: rgba(255, 249, 238, 0.78) !important;
  color: rgba(93, 62, 36, 0.82) !important;
  font-size: 0.72rem !important;
  line-height: 1.22 !important;
  text-align: center !important;
}

body .tree-builder-sheet--chooser .tree-builder-choice-footer {
  display: grid !important;
  justify-items: center !important;
  width: min(100%, 20.7rem) !important;
  margin: 0.58rem auto 0 !important;
  gap: 0.5rem !important;
}

body .tree-builder-sheet--chooser .tree-builder-choice-footer::before {
  content: "" !important;
  display: block !important;
  width: min(84%, 16rem) !important;
  height: 1px !important;
  background: linear-gradient(90deg, transparent, rgba(155, 108, 49, 0.26), transparent) !important;
}

body .tree-builder-sheet--chooser .tree-builder-choice-close-button {
  width: 100% !important;
  min-height: 2.48rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0.54rem 1rem !important;
  border: 1px solid rgba(137, 98, 51, 0.24) !important;
  border-radius: 0.72rem !important;
  background: linear-gradient(180deg, rgba(255, 252, 245, 0.96), rgba(241, 226, 202, 0.88)) !important;
  color: #24150B !important;
  box-shadow:
    0 0.34rem 0.72rem rgba(58, 36, 19, 0.08),
    inset 0 1px 0 rgba(255,255,255,0.7) !important;
  cursor: pointer !important;
  font-family: var(--font-display, "Cormorant Garamond", Georgia, serif) !important;
  font-size: clamp(1rem, 2.7vw, 1.12rem) !important;
  font-weight: 750 !important;
  line-height: 1 !important;
  text-align: center !important;
  transition: transform 145ms ease, border-color 145ms ease, background 145ms ease !important;
}

body .tree-builder-sheet--chooser .tree-builder-choice-close-button:hover,
body .tree-builder-sheet--chooser .tree-builder-choice-close-button:focus-visible {
  transform: translateY(-1px) !important;
  border-color: rgba(155, 108, 42, 0.34) !important;
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.99), rgba(245, 230, 201, 0.92)) !important;
}

@media (max-width: 420px) {
  body .tree-builder-sheet--chooser .tree-builder-choice-actions,
  body .tree-builder-sheet--chooser .tree-builder-choice-footer {
    width: min(100%, 19.2rem) !important;
    max-width: 19.2rem !important;
  }

  body .tree-builder-sheet--chooser .tree-builder-choice-actions :is(
    .tree-builder-choice-action,
    .tree-builder-choice-action.wide,
    button.tree-builder-choice-action.btn-primary.wide,
    button.tree-builder-choice-action.btn-secondary.wide
  ) {
    grid-template-columns: 2.08rem minmax(0, 1fr) auto !important;
    min-height: 2.84rem !important;
    gap: 0.46rem !important;
    padding: 0.38rem 0.54rem !important;
  }

  body .tree-builder-sheet--chooser .tree-builder-choice-action__icon {
    width: 1.92rem !important;
    height: 1.92rem !important;
    min-width: 1.92rem !important;
  }

  body .tree-builder-sheet--chooser .tree-builder-choice-action__icon svg {
    width: 1.05rem !important;
    height: 1.05rem !important;
  }

  body .tree-builder-sheet--chooser .tree-builder-choice-action__content strong {
    font-size: clamp(0.92rem, 4.25vw, 1.04rem) !important;
  }

  body .tree-builder-sheet--chooser .tree-builder-choice-action__content small,
  body .tree-builder-sheet--chooser .tree-builder-choice-action small {
    font-size: clamp(0.6rem, 2.9vw, 0.68rem) !important;
  }
}


@media (max-width: 430px) {
  body .profile-support-grid :is(a.profile-support-button, button.profile-support-button) {
    width: min(86%, 5.15rem) !important;
    min-height: 1.68rem !important;
    padding-inline: 0.42rem !important;
    font-size: 0.58rem !important;
  }
}

/* Sigil tray buttons must fill their two grid cells; the global CTA owner uses fit-content. */
.sigil-stage-tray__actions > :is(button.btn-primary, button.btn-secondary) {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  justify-self: stretch !important;
  align-self: center !important;
}

/* Buttons.css loads last, so it must also preserve the tray's JS hidden state. */
.sigil-stage-tray__actions > [hidden],
.sigil-stage-tray__actions > .is-hidden {
  display: none !important;
}

