.ba-map {
  --ba-ink: #364439;
  --ba-rule: #d3d4c5;
  width: 100%;
  min-width: 0;
  color: var(--ba-ink);
  font-family: inherit;
  box-sizing: border-box;
}
.ba-map *, .ba-map *::before, .ba-map *::after { box-sizing: border-box; }
.ba-map-frame {
  width: 100%;
  overflow: hidden;
  background: #f3f2e7;
  isolation: isolate;
  position: relative;
}
.ba-map-full { container: atlas / inline-size; }
.ba-map-full .ba-map-frame {
  aspect-ratio: 1.96;
  max-height: 545px;
  border: 1px solid #c5c9b8;
  border-radius: 8px;
}
.ba-map-frame.ba-pan-frame { overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-color: #7b9180 #e6eee4; }
.ba-pan-frame:focus-visible { outline: 2px solid #3a6150; outline-offset: 2px; }
.ba-pan-hint { color: #536553; font-size: .82rem; margin: .45rem 0; }
.ba-pan-hint[hidden] { display: none; }
.ba-map-frame svg { display: block; width: 100%; height: 100%; position: absolute; inset: 0; }
.ba-map-mini { height: 100%; pointer-events: none; }
.ba-map-mini .ba-map-frame { height: 100%; min-height: 1px; aspect-ratio: 1.85; }
.ba-map svg text { font-family: inherit; }
.ba-map-action { cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.ba-map-action:focus { outline: none; }
.ba-map-area { transition: filter .16s, stroke-width .16s; }
.ba-map-label { fill: #27382c; pointer-events: none; }
.ba-map-count { fill: #344436; font-weight: 500; }
.ba-map-territory:is(:focus-visible,.ba-map-selected) .ba-map-area {
  stroke: #243c2b;
  stroke-width: 4px;
  filter: saturate(1.36) brightness(1.03);
}
.ba-map-boundary-ink.ba-map-premise { stroke-dasharray: 7 4; }
.ba-map-boundary-ink.ba-map-focus { stroke-dasharray: 1 4; }
.ba-map-boundary:focus-visible .ba-map-boundary-ink { stroke: #132c20; stroke-width: 3.4px; }
.ba-map-extra:focus-visible > path { stroke: #1b3a28; stroke-width: 2.4px; }
.ba-feature-chip {
  fill: #244b39; stroke: #fff9da; stroke-width: 1.8px;
  filter: drop-shadow(0 1px 1px #20382b66);
}
.ba-feature-tag:hover .ba-feature-chip,
.ba-feature-tag.ba-active-relation .ba-feature-chip { fill: #14372b; }
.ba-feature-tag:focus-visible .ba-feature-chip { stroke: #a5512e; stroke-width: 3.5px; }
.ba-map-territory.ba-compared .ba-map-area,
.ba-map-extra.ba-compared > path { stroke: #234535; stroke-width: 3.5px; filter: saturate(1.28); }
.ba-map-boundary.ba-active-relation .ba-map-boundary-ink { stroke: #163b2a; stroke-width: 3.5px; }
.ba-strait-water { fill: #f6faf4; stroke: #698c86; stroke-width: 1px; }
.ba-strait:is(:focus-visible, :hover, .ba-active-relation) .ba-strait-water { fill: #d8ebe1; stroke: #254e47; stroke-width: 2px; }
.ba-map-territory.ba-facing .ba-map-area,
.ba-map-extra.ba-facing > path { stroke: #254e47; stroke-width: 3px; filter: saturate(1.25); }
@media (hover: hover) {
  .ba-map-territory:hover .ba-map-area { filter: saturate(1.22) brightness(1.04); }
  .ba-map-boundary:hover .ba-map-boundary-ink { stroke: #173e2c; stroke-width: 3.2px; }
  .ba-map-extra:hover > path { stroke-width: 2.1px; }
}
@media (prefers-reduced-motion: no-preference) {
  .ba-map-full .ba-map-territory { animation: ba-land-in .4s both; animation-delay: var(--ba-delay,0ms); }
  .ba-map-full .ba-map-extra { animation: ba-land-in .34s .28s both; }
  @keyframes ba-land-in { from { opacity: .08; } to { opacity: 1; } }
}
.ba-map-tools { font-family: inherit; font-size: .85rem; margin-top: .6rem; color: #4e5b50; }
.ba-map-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.ba-legend-item { display: inline-flex; align-items: center; gap: .38rem; white-space: nowrap; }
.ba-legend-line { display: inline-block; width: 1.3rem; height: 0; border-top: 2px solid #536052; }
.ba-legend-premise { border-top-style: dashed; }
.ba-legend-focus { border-top: 3px dotted #536052; }
.ba-map-index { margin-top: .3rem; }
.ba-map-index summary {
  color: #4d5b49;
  cursor: pointer;
  width: fit-content;
  min-height: 2.75rem;
  align-content: center;
  font: inherit;
  font-weight: 550;
}
.ba-map-index summary:focus-visible, .ba-index-row:focus-visible {
  outline: 2px solid #354c38;
  outline-offset: 3px;
}
.ba-map-index-list { display: grid; margin: .25rem 0 .5rem; border-top: 1px solid var(--ba-rule); }
.ba-index-row {
  width: 100%;
  min-height: 44px;
  padding: .6rem .15rem;
  border: 0;
  border-bottom: 1px solid var(--ba-rule);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  align-items: baseline;
  gap: .9rem;
  font: inherit;
  color: inherit;
  text-align: start;
  cursor: pointer;
}
.ba-index-row:hover { background: #eceee2; }
.ba-index-tag { color: #354d38; font-weight: 700; white-space: nowrap; }
.ba-index-names { line-height: 1.55; }
@container atlas (max-width: 800px) {
  .ba-map-full .ba-map-frame { aspect-ratio: 1.5; min-height: 356px; max-height: 475px; }
  .ba-map-full .ba-map-straits { aspect-ratio: 1.26; min-height: 395px; max-height: 475px; }
  .ba-map-legend { gap: .4rem .8rem; }
}

.ba-index-tag .ba-legend-line { vertical-align: middle; margin-right: .4rem; }

.ba-map-stage { position: relative; min-width: 0; }
.ba-name-toggle, .ba-map-name-card {
  position: absolute; z-index: 1; inset-inline-start: 8px; inset-block-start: 8px;
  background: #fffdf3; color: #203c30; border: 1px solid #aebaa7; border-radius: 7px;
}
.ba-name-toggle { inset-inline-start: auto; inset-inline-end: 42px; padding: 0 .7rem; min-height: 36px; font: inherit; font-size: .83rem; }
.ba-map-name-card {
  width: min(17.5rem, calc(100% - 16px)); padding: .35rem .7rem .45rem;
  box-shadow: 0 3px 12px #28392726; text-align: start;
}
.ba-map-name-card.ba-name-at-bottom { inset-block-start: auto; inset-block-end: 8px; }
.ba-map-name-card[hidden], .ba-name-toggle[hidden], .ba-map-name-card button[hidden] { display: none; }
.ba-name-head, .ba-name-actions { display: flex; align-items: center; gap: .4rem; }
.ba-name-marker {
  display: grid; place-items: center; width: 1.35rem; height: 1.35rem; border-radius: 50%;
  border: 1px solid #52634e; font-size: .8rem; font-weight: 700;
}
.ba-name-count { font-size: .82rem; color: #52634e; }
.ba-name-close { margin-inline-start: auto; font-size: 1.35rem; }
.ba-name-title { display: block; font-size: 1rem; line-height: 1.45; overflow-wrap: anywhere; }
.ba-name-read { margin-inline-end: auto; color: #244f39; text-decoration: underline; }
.ba-map-name-card button, .ba-name-toggle { cursor: pointer; }
.ba-name-close, .ba-name-step, .ba-name-read { min-width: 44px; min-height: 36px; padding: .1rem .25rem; }
.ba-name-step { font-size: 1.4rem; }
.ba-map-name-card :focus-visible, .ba-name-toggle:focus-visible { outline: 2px solid #354c38; outline-offset: 2px; }
.ba-map-territory.ba-reading-name .ba-map-area { stroke: #21412f; stroke-width: 3px; }
@media (pointer: coarse) {
  .ba-name-toggle, .ba-name-close, .ba-name-step, .ba-name-read { min-height: 44px; }
}

