.map-tree {
  max-width: 1020px;
  margin: 28px 0;
  color: #f7f2fa;
}
.map-tree__panel {
  border: 1px solid #765471;
  border-radius: 16px;
  background: #251d2e;
}
.map-tree__heading {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 17px 20px;
  cursor: pointer;
  list-style: none;
}
.map-tree__heading::-webkit-details-marker { display: none; }
.map-tree__symbol {
  display: grid;
  place-items: center;
  flex: 0 0 46px;
  height: 46px;
  border-radius: 11px;
  color: #ff9ccc;
  background: #51314a;
  font-size: 1.6rem;
}
.map-tree__heading-copy { min-width: 0; }
.map-tree__eyebrow {
  display: block;
  margin-bottom: 4px;
  color: #f5a0c8;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.map-tree__heading-copy strong {
  display: block;
  color: #fff;
  font-size: clamp(.95rem, 2vw, 1.2rem);
  line-height: 1.35;
}
.map-tree__heading-copy strong span { color: #e5a0c4; }
.map-tree__chevron {
  margin-left: auto;
  font-size: 1.8rem;
  color: #f5a0c8;
  transition: transform .2s ease;
}
.map-tree__panel[open] .map-tree__chevron { transform: rotate(180deg); }
.map-tree__content {
  border-top: 1px solid #634459;
  padding: 18px 22px 26px;
}
.map-tree__hint {
  margin: 0 0 18px;
  color: #c7b8ca;
  font-size: .86rem;
}
.map-tree__node {
  display: flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  max-width: 100%;
  min-height: 42px;
  padding: 5px 9px 5px 15px;
  border: 1px solid #81617c;
  border-radius: 10px;
  background: #34283e;
}
.map-tree__node a,
.map-tree__node span {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.map-tree__node a:hover,
.map-tree__node a:focus-visible { text-decoration: underline; }
.map-tree__node--root { background: #dc3e8b; border-color: #dc3e8b; }
.map-tree__node--root .map-tree__info { color: #fff; }
.map-tree__node--area { background: #453249; }
.map-tree__node--local { background: #302a3b; }
.map-tree__node.is-current { border-color: #ef8cbb; box-shadow: inset 3px 0 #ef8cbb; }
.map-tree__info,
.map-tree__expand {
  flex: 0 0 32px;
  height: 32px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #eab6d2;
  font: inherit;
  cursor: pointer;
}
.map-tree__info:hover,
.map-tree__expand:hover,
.map-tree__info:focus-visible,
.map-tree__expand:focus-visible { background: #74526b; color: #fff; }
.map-tree__expand { font-size: 1.35rem; line-height: 1; }
.map-tree__expand[aria-expanded="true"] { transform: rotate(180deg); }
.map-tree__branches,
.map-tree__leaves {
  margin: 0 0 0 22px;
  padding: 10px 0 0 26px;
  list-style: none;
  border-left: 2px solid #8c6881;
}
.map-tree__branches > li,
.map-tree__leaves > li {
  position: relative;
  padding: 8px 0;
}
.map-tree__branches > li::before,
.map-tree__leaves > li::before {
  content: "";
  position: absolute;
  top: 29px;
  left: -26px;
  width: 25px;
  border-top: 2px solid #8c6881;
}
.map-tree__leaves { margin-left: 18px; }
.map-tree__leaves[hidden] { display: none; }
.map-tree-preview {
  position: fixed;
  z-index: 2000;
  width: min(290px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid #8c6c85;
  border-radius: 13px;
  background: #201927;
  box-shadow: 0 18px 44px rgba(0,0,0,.38);
  color: #fff;
  pointer-events: none;
}
.map-tree-preview[hidden] { display: none; }
.map-tree-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.map-tree-preview__copy { padding: 13px 15px 15px; }
.map-tree-preview strong { display: block; margin-bottom: 6px; }
.map-tree-preview p { margin: 0; color: #d5c8d9; font-size: .83rem; line-height: 1.45; }
.map-tree-preview__close { display: none; }
@media (max-width: 620px) {
  .map-tree__heading { padding: 13px; gap: 11px; }
  .map-tree__symbol { flex-basis: 38px; height: 38px; }
  .map-tree__content { padding: 15px 13px 20px; }
  .map-tree__branches, .map-tree__leaves { margin-left: 12px; padding-left: 18px; }
  .map-tree__branches > li::before, .map-tree__leaves > li::before { left: -18px; width: 17px; }
  .map-tree-preview { left: 16px !important; right: 16px; top: auto !important; bottom: 16px; width: auto; pointer-events: auto; }
  .map-tree-preview__close { display: block; float: right; border: 0; color: #fff; background: transparent; font-size: 1.15rem; cursor: pointer; }
}
@media (prefers-reduced-motion: reduce) {
  .map-tree__chevron { transition: none; }
}

@media (min-width: 760px) {
  .map-tree__node--root { position: relative; }
  .map-tree__node--root::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    height: 25px;
    border-left: 2px solid #8c6881;
  }
  .map-tree__branches {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    max-width: 100%;
    margin: 0;
    padding: 36px 2px 12px;
    border-left: 0;
    background: linear-gradient(#8c6881,#8c6881) left 19px / 100% 2px no-repeat;
    scrollbar-color: #805b78 transparent;
  }
  .map-tree__branches > li { flex: 0 0 220px; }
  .map-tree__branches > li::before {
    top: -22px;
    left: 50%;
    width: 0;
    height: 31px;
    border-top: 0;
    border-left: 2px solid #8c6881;
  }
  .map-tree__leaves { margin-left: 12px; padding-left: 18px; }
  .map-tree__leaves > li::before { left: -18px; width: 17px; }
}


/* HubGTA 2026 — árvore alinhada à identidade visual dourada */
.map-tree { color: var(--text); }
.map-tree__panel {
  overflow: hidden;
  border-color: var(--border);
  background: linear-gradient(145deg, var(--card) 0%, var(--bg-3) 100%);
  box-shadow: 0 12px 34px rgba(0,0,0,.28), inset 0 1px rgba(255,189,0,.04);
}
.map-tree__heading { transition: background .2s ease; }
.map-tree__heading:hover { background: rgba(255,189,0,.035); }
.map-tree__symbol { color: #111; background: var(--pink); }
.map-tree__eyebrow,
.map-tree__heading-copy strong span,
.map-tree__chevron { color: var(--pink); }
.map-tree__content { border-top-color: var(--border); }
.map-tree__hint { color: var(--muted); }
.map-tree__node {
  border-color: rgba(255,189,0,.22);
  background: var(--card-2);
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.map-tree__node--area { background: var(--card-2); }
.map-tree__node--local { background: var(--card); }
.map-tree__node--root {
  background: var(--pink);
  border-color: var(--pink);
  box-shadow: 0 0 18px rgba(255,189,0,.16);
}
.map-tree__node--root a,
.map-tree__node--root span,
.map-tree__node--root .map-tree__info { color: #111; }
.map-tree__node:hover {
  border-color: rgba(255,189,0,.58);
  box-shadow: 0 6px 18px rgba(0,0,0,.2);
}
.map-tree__node a:hover,
.map-tree__node a:focus-visible { color: var(--pink-2); text-decoration: none; }
.map-tree__node--root a:hover,
.map-tree__node--root a:focus-visible { color: #111; }
.map-tree__node.is-current {
  border-color: var(--pink);
  box-shadow: inset 3px 0 var(--pink), 0 0 16px rgba(255,189,0,.10);
}
.map-tree__info,
.map-tree__expand { color: var(--pink); }
.map-tree__info:hover,
.map-tree__expand:hover,
.map-tree__info:focus-visible,
.map-tree__expand:focus-visible {
  background: rgba(255,189,0,.14);
  color: var(--pink-2);
}
.map-tree__branches,
.map-tree__leaves { border-left-color: rgba(255,189,0,.38); }
.map-tree__branches > li::before,
.map-tree__leaves > li::before { border-top-color: rgba(255,189,0,.38); }
.map-tree-preview {
  border-color: rgba(255,189,0,.34);
  background: var(--card);
  box-shadow: 0 18px 44px rgba(0,0,0,.48), 0 0 24px rgba(255,189,0,.08);
}
.map-tree-preview p { color: var(--muted); }
@media (min-width: 760px) {
  .map-tree__node--root::after,
  .map-tree__branches > li::before { border-left-color: rgba(255,189,0,.38); }
  .map-tree__branches {
    background: linear-gradient(rgba(255,189,0,.38),rgba(255,189,0,.38)) left 19px / 100% 2px no-repeat;
    scrollbar-color: var(--pink) transparent;
  }
}
