.map-mode-switch {
  display: flex;
  align-items: center;
  gap: .3rem;
  width: max-content;
  max-width: 100%;
  margin: 0 auto .85rem;
  padding: .2rem;
  border: 1px solid #bdc7b9;
  background: var(--paper);
}
.map-mode-switch a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: .35rem 1.35rem;
  color: var(--ink);
  line-height: 1.25;
  text-decoration: none;
}
.map-mode-switch a[aria-current="true"],
.map-mode-switch a[aria-selected="true"] {background: var(--forest); color: var(--paper)}
.map-mode-switch a:hover {text-decoration: underline}
.zone-map-links {display: flex; flex-wrap: wrap; align-items: center; gap: 0 1.25rem}
#plano-conjunto[hidden], #master-detail[hidden] {display: none}
/* Keep the aerial frame measurable while its layout counterpart is visible. */
#atlas-portada[hidden] {display: block; height: 0; overflow: hidden; visibility: hidden}
.master-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  margin-inline: auto;
  background: var(--paper);
  color: var(--ink);
  scroll-margin-top: 3.9rem;
}
.master-field {
  position: relative;
  isolation: isolate;
  min-width: 0;
  align-self: start;
  height: var(--aerial-frame-height, clamp(370px, 75svh, 900px));
  background: #f6f5ee;
  overflow: hidden;
}
#master-canvas {position: absolute; inset: 0; display: block; width: 100%; height: 100%; touch-action: pan-y}
#master-canvas:focus-visible {outline: 3px solid #98622d; outline-offset: -4px}
#master-canvas[data-zoomed="true"] {cursor: grab}
#master-canvas[data-zoomed="true"]:active {cursor: grabbing}
.master-pin {cursor: pointer; outline: none}
.master-area {fill: #698651; fill-opacity: 0; stroke: #2e573c; stroke-opacity: 0; stroke-width: 2; stroke-dasharray: 5 3; pointer-events: fill; cursor: pointer; transition: fill-opacity .12s, stroke-opacity .12s}
.master-area.is-lit {fill-opacity: .32; stroke-opacity: 1}
.master-pin.is-preview .master-pin-disc {fill: #264b38; stroke: #faf9f0}
.master-pin.is-preview .master-pin-number {fill: #fffdf2}
#master-directory button.is-preview {background: #e4eadc}
@media (prefers-reduced-motion: reduce) {.master-area {transition: none}}
.master-pin-disc {fill: #fffdf2; stroke: #274735; stroke-width: 1.6}
.master-pin-number {fill: #213f2e; font: 650 14px/1 var(--sans); text-anchor: middle; pointer-events: none}
.master-pin-leader {stroke: #3c5547; stroke-width: 1; fill: none; pointer-events: none}
.master-pin-dot {fill: #364e3b; pointer-events: none}
.master-pin:is(.is-selected, :focus-visible, :hover) .master-pin-disc {fill: #264b38; stroke: #faf9f0; stroke-width: 2.5}
.master-pin:is(.is-selected, :focus-visible, :hover) .master-pin-number {fill: #fffdf2}
.master-tools, .master-north, #master-scale {position: absolute; z-index: 1}
.master-tools {
  left: clamp(.5rem, 1.5vw, 1.3rem);
  top: clamp(.5rem, 1.5vw, 1.3rem);
  display: flex;
  border: 1px solid #a4b29d;
  background: #fbfaf1f5;
}
.master-tools button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: #264735;
  border: 0;
  background: transparent;
  font: 400 1.45rem/1 var(--sans);
}
.master-tools button + button {border-left: 1px solid #c4ccb9}
.master-tools button:hover:not(:disabled) {background: #e5ecde}
.master-tools button:disabled {color: #83917f; cursor: default}
.master-tools button:focus-visible {z-index: 1; outline-offset: -3px}
.master-fit svg {width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 1.8}
.master-north {
  display: grid;
  justify-items: center;
  right: clamp(.55rem, 1.5vw, 1.3rem);
  top: clamp(.55rem, 1.5vw, 1.3rem);
  padding: .27rem .42rem;
  background: #faf9efdc;
  color: #294c38;
  font: 650 .85rem/1.05 var(--sans);
  pointer-events: none;
}
.master-north svg {width: 14px; height: 20px}
@media (max-width:600px) {
  .master-north {top:auto;bottom:.6rem}
}
#master-scale {
  display: inline-grid;
  gap: 3px;
  bottom: .6rem;
  left: .75rem;
  padding: .25rem .42rem;
  background: #faf9efed;
  color: #294633;
  font: 550 .8rem/1.1 var(--sans);
  pointer-events: none;
}
#master-scale i {height: 5px; border: solid currentColor; border-width: 0 1px 2px}
.master-info {align-self: center; min-width: 0; padding: clamp(1.45rem,3.3vw,4rem)}
.master-copy h2 {margin: 0 0 .7rem; font: 400 clamp(2.25rem,3.3vw,4.1rem)/1.05 var(--serif); letter-spacing: .005em}
.master-copy p {max-width: 48ch; color: #425647; font-size: 1.04rem; line-height: 1.55}
.master-explore {display: grid; justify-items: start; gap: .38rem; margin-block: 1.35rem}
.master-explore label, .master-key h3 {font: 650 .96rem/1.35 var(--sans)}
#master-directory {display: none}
@media (min-width: 1101px) and (min-aspect-ratio: 1/1) {
  #master-zone {position: absolute; width: 1px !important; height: 1px; min-height: 0 !important; clip-path: inset(50%); overflow: hidden}
  #master-zone:focus-visible {position: static; width: 100% !important; height: auto; min-height: 44px !important; clip-path: none}
  #master-directory {display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); width: 100%; gap: 0 .75rem}
  #master-directory button {display: flex; gap: .45rem; text-align: left; align-items: center; min-height: 44px; padding: .32rem .08rem; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); background: none; line-height: 1.2; font-size: .9375rem}
  #master-directory button span:first-child {flex: none; font-size: .85rem; color: var(--earth); font-variant-numeric: tabular-nums}
  #master-directory button:is(:hover,[aria-pressed="true"]) {background: #e4eadc}
}
#master-zone {max-width: 100%; width: 100%; min-width: 0; min-height: 44px; padding: .45rem .6rem; color: var(--ink); background: #fcfbf4; border: 1px solid #9aa997; border-radius: 2px}
#master-detail, .master-download {display: inline-flex; gap: .7rem; align-items: center; min-height: 44px; font-weight: 600; text-underline-offset: .25em}
.master-key {padding-block-start: 1rem; border-top: 1px solid var(--line)}
.master-key ul {list-style: none; margin: .7rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .5rem .7rem}
.master-key li {display: flex; gap: .52rem; align-items: center; line-height: 1.25; color: #435848; font-size: .925rem}
.master-symbol {width: 21px; flex: 0 0 21px; border-top: 2px solid #3e5949}
.symbol-contour {border-top: 1px solid #a7aa90}
.symbol-layout {height: 9px; border: 1px solid #435341; background: #526b59}
.symbol-disc {height:12px; border:1.5px dashed #905466; background:#eee2df}
#master-directory .master-site-row span:first-child {font-weight:700; color:#284737}
.symbol-local {border-color: #326e64}
.symbol-hiking {border: 0; height: 2px; background: repeating-linear-gradient(to right,#a7612d 0 6px,transparent 6px 9px)}
.symbol-atv {border: 0; height: 2px; background: repeating-linear-gradient(to right,#914c74 0 3px,transparent 3px 5px)}
.symbol-mtb {border: 0; height: 2px; background: repeating-linear-gradient(to right,#365f9e 0 7px,transparent 7px 9px,#365f9e 9px 10px,transparent 10px 12px)}
.master-key :is([data-layout-route],[data-layout-activity]) {color: inherit; display: inline-flex; align-items: center; min-height: 44px; gap: .52rem; text-underline-offset: .2em}
.master-key :is([data-layout-route],[data-layout-activity])[aria-current] {font-weight: 700}
.master-notice {margin: .85rem 0 .15rem; color: #506150; font-size: .875rem; line-height: 1.4}
.master-download span {font-size: .75rem; letter-spacing: .07em}
@media (max-width: 950px), (max-aspect-ratio: 1/1) {
  .master-layout {grid-template-columns: 1fr}
  .master-field {height: var(--aerial-frame-height, clamp(330px, 88vw, 630px))}
  .master-info {padding: 1.35rem var(--gutter) 1.6rem}
  .master-key ul {grid-template-columns: repeat(auto-fit,minmax(9.2rem,1fr))}
}
@media (max-width: 420px) {
  .map-mode-switch a {padding-inline: .95rem}
  .master-key ul {grid-template-columns: repeat(2,minmax(0,1fr))}
}
