.tree-toggle-mobile { display: none; }
#map-report-links button.tree-toggle,
.tree-toggle-mobile {
  min-height: 44px;
  border: 1px solid #1d513b;
  background: #246348;
  color: #fffdf5;
  cursor: pointer;
}
#map-report-links button.tree-toggle { grid-template-columns: 22px minmax(0,1fr); }
#map-report-links button.tree-toggle:hover,
#map-report-links button.tree-toggle[aria-pressed="true"],
.tree-toggle-mobile:hover, .tree-toggle-mobile[aria-pressed="true"] { background: #143e2e; }
.tree-toggle[aria-pressed="true"] b { text-decoration: underline; text-underline-offset: 3px; }
.tree-layer { position: fixed; inset: 0; z-index: 7; overflow: hidden; pointer-events: none; }
.tree-pin {
  position: absolute; top: 0; left: 0; width: 46px; height: 46px; border: 2px solid #fffdf5;
  border-radius: 50% 50% 50% 18%; background: #1d573f; color: #fffdf5; box-shadow: 0 3px 9px #20251d60;
  pointer-events: auto; cursor: pointer; font: 800 12px/1 var(--atlas-sans, sans-serif);
}
.tree-pin svg { width: 30px; height: 30px; fill: currentColor; stroke: currentColor; stroke-width: 1.1; }
.tree-pin::after { content: ''; position: absolute; z-index: -1; top: 100%; left: 50%; width: var(--tree-leader-width, 0px); height: 1px; background: #6b623d; transform: rotate(var(--tree-leader-angle, 0rad)); transform-origin: left; pointer-events: none; }
.tree-pin span {
  position: absolute; top: -3px; right: -4px; min-width: 18px; height: 18px; display: grid;
  place-items: center; border-radius: 50%; color: #193629; background: #fdfbf3; border: 1px solid currentColor;
}
.tree-pin.tree-unconfirmed { color: #6e4109; background: #fff3d6; border: 2px dashed #805016; }
.tree-pin.tree-announced { color: #164630; background: #eaf3e9; border-color: #256446; }
.tree-pin.tree-event { color: #fff8e9; background: #8b3731; border-radius: 12px 12px 12px 5px; }
.tree-pin.tree-event svg { width: 27px; height: 27px; fill: none; stroke-width: 1.8; stroke-linecap: round; }
.tree-pin[aria-pressed="true"], .tree-pin:focus-visible { z-index: 2; outline: 3px solid #283e88; outline-offset: 2px; }
.tree-panel {
  position: fixed; z-index: 35; top: calc(var(--atlas-header, 58px) + 18px); left: calc(var(--sidebar, 296px) + 42px);
  width: 286px; max-height: min(540px, 72dvh); overflow: auto; overscroll-behavior: contain;
  padding: 12px; border: 1px solid #baa98d; border-radius: 7px; background: #fbf9f3; color: #242821;
  box-shadow: 0 8px 30px #29231836; font: 500 13px/1.4 var(--atlas-sans, sans-serif);
}
.tree-panel.tree-anchored {
  top: clamp(calc(var(--atlas-header, 58px) + 16px), calc(var(--tree-anchor-y, 240px) - 130px), calc(100dvh - min(540px, 72dvh) - 16px));
  left: clamp(calc(var(--sidebar, 296px) + 42px), calc(var(--tree-anchor-x, 560px) + 28px), calc(100vw - 354px));
}
.tree-heading { position: relative; padding: 2px 40px 7px 0; }
.tree-heading h2 { margin: 8px 0 2px; font: 600 24px/1.05 Georgia,serif; }
.tree-heading h2:focus { outline: none; }
.tree-close, .tree-back { border: 0; background: transparent; color: #1c523a; cursor: pointer; font: inherit; font-weight: 750; }
.tree-close { position: absolute; top: 0; right: 0; width: 44px; height: 44px; font-size: 24px; }
.tree-back { min-height: 36px; padding: 0 2px; }
.tree-list { list-style: none; display: grid; gap: 5px; margin: 2px 0 12px; padding: 0; }
.tree-list-item {
  display: grid; gap: 2px; width: 100%; min-height: 48px; padding: 7px 9px; border: 1px solid #d8cebc;
  border-radius: 5px; background: #fffdf7; color: inherit; text-align: left; cursor: pointer; font: inherit;
}
.tree-list-item:hover { border-color: #246348; background: #f1f6ed; }
.tree-status { justify-self: start; display: inline-block; padding: 1px 6px; border-radius: 4px; background: #e0f0df; color: #184c35; font-weight: 750; font-size: 11px; }
.tree-status.tree-unconfirmed { background: #fff0cb; color: #69400e; }
.tree-status.tree-announced { background: #e5ebf7; color: #253e7c; }
.tree-status.tree-event { background: #f6e8e1; color: #78312b; }
.tree-panel p { margin: 6px 0; }
.tree-address, .tree-delivery { font-weight: 700; }
.tree-note, .tree-sources { font-size: 12px; color: #55574b; }
.tree-sources { display: flex; column-gap: 8px; flex-wrap: wrap; }
.tree-sources a { color: #194e38; text-decoration: underline; }
.tree-action {
  min-height: 44px; padding: 6px 12px; border: 1px solid #256446; border-radius: 5px;
  background: #246348; color: #fffdf5; font: 750 13px/1.2 var(--atlas-sans,sans-serif); cursor: pointer;
}
.tree-action:disabled { opacity: .58; cursor: default; }
.tree-form { display: grid; gap: 8px; }
.tree-form label { display: grid; gap: 3px; font-weight: 650; }
.tree-form input, .tree-form textarea { box-sizing: border-box; width: 100%; min-height: 44px; padding: 6px; border: 1px solid #988d7a; border-radius: 4px; background: #fffdf7; color: #242821; font: inherit; font-size: 16px; }
.tree-message:empty { display: none; }
.tree-panel :is(button, a, input, textarea):focus-visible, .tree-toggle-mobile:focus-visible { outline: 3px solid #294294; outline-offset: 2px; }
.tree-flight {
  position: absolute; left: 0; top: calc(var(--atlas-header, 58px) + 172px); width: clamp(88px, 11vw, 150px);
  filter: drop-shadow(0 3px 3px #342b244b); animation: tree-fly 7s linear both; pointer-events: none;
}
@keyframes tree-fly {
  0% { transform: translate(-160px, 30px) rotate(-8deg); }
  25% { transform: translate(19vw, -8px) rotate(-6deg); }
  50% { transform: translate(49vw, -28px) rotate(-2deg); }
  75% { transform: translate(77vw, -19px) rotate(3deg); }
  100% { transform: translate(108vw, 15px) rotate(6deg); }
}
.tree-list-toggle {
  position: fixed; z-index: 22; left: calc(var(--sidebar, 296px) + 42px);
  top: calc(var(--atlas-header, 58px) + 18px); min-height: 44px; padding: 0 10px;
  border: 1px solid #70927c; border-radius: 5px; background: #fbf9f3; color: #194e38;
  box-shadow: 0 2px 9px #22212722; font: 750 12px/1 var(--atlas-sans,sans-serif);
}
.tree-list-toggle[aria-expanded="true"] { background: #e0f0df; }
.tree-list-toggle:focus-visible { outline: 3px solid #294294; outline-offset: 2px; }
.tree-panel:not(.tree-anchored) { top: calc(var(--atlas-header, 58px) + 70px); }
.tree-nearby-title { margin: 14px 0 7px; padding-top: 10px; border-top: 1px solid #d8cebc; font: 600 17px/1.2 Georgia,serif; }
.tree-mode.newsroom-open :is(.tree-panel, .tree-layer, .tree-list-toggle), .newsroom-open .tree-toggle-mobile { display: none; }
.tree-mode :is(.map-card-layer, .cluster-preview, #mzb-onboarding, #sponsor-map-pin, #sponsor-map-card, #sponsor-slot, #map-advertise-shortcut, #places-map-hint) { display: none !important; }
@media (max-width: 700px), (max-width: 900px) and (max-height: 500px) {
  .tree-toggle-mobile {
    display: inline-flex; align-items: center; gap: 6px; position: fixed; z-index: 21;
    top: calc(var(--atlas-header, 52px) + 61px); left: 10px; padding: 0 9px;
    border-radius: 5px; box-shadow: 0 2px 9px #22212730; font: 700 12px/1 var(--atlas-sans,sans-serif);
  }
  .tree-toggle-mobile svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }
  .tree-list-toggle { top: calc(var(--atlas-header, 52px) + 61px); left: 145px; }
  body[data-mobile-drawer="full"] :is(.tree-toggle-mobile, .tree-panel, .tree-list-toggle) { display: none; }
  .tree-panel, .tree-panel.tree-anchored, .tree-panel:not(.tree-anchored) {
    left: 10px; top: calc(var(--atlas-header, 52px) + 110px); width: min(265px, calc(100vw - 78px));
    max-height: min(47dvh, calc(100dvh - var(--atlas-header, 52px) - 120px));
  }
  .tree-flight { top: calc(var(--atlas-header, 52px) + 95px); }
}
@media (prefers-reduced-motion: reduce) { .tree-flight { display: none; animation: none; } }
