.handy-map-body { overflow: hidden; position: relative; }

.handy-plan {
  position: absolute;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
  container-type: inline-size;
  background: #e8e3c9;
  color: #23352f;
  font: 11px/1.35 Tahoma, Verdana, sans-serif;
}

.plan-viewport {
  position: absolute;
  inset: 0;
  overflow: clip;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.plan-dragging, .plan-dragging .plan-marker { cursor: grabbing; }

.plan-canvas {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  --marker-scale: 1;
}

.plan-drawing { display: block; width: 100%; height: 100%; pointer-events: none; }
.plan-base { fill: #e5e1c5; }
.plan-land { fill: #d7ddba; stroke: #b6c09d; stroke-width: 1.15; }
.plan-park { fill: #b9c9a0; stroke: #a7ba8a; stroke-width: 1.15; }
.plan-built { fill: #e9d8bd; stroke: #d6c6a9; stroke-width: 1.8; }
.plan-industrial { fill: #d4ccc2; stroke: #b0a698; stroke-width: 1.8; }
#bremen-plan-fields path { stroke: #a0af8c; stroke-width: 1; opacity: .58; }
#bremen-plan-industry path { stroke: #b3a896; stroke-width: 1; opacity: .52; }
.plan-field-lines { fill: url(#bremen-plan-fields); stroke: none; }
.plan-industrial-lines { fill: url(#bremen-plan-industry); stroke: none; }
.plan-waterbank, .plan-water { fill: none; stroke-linejoin: round; }
.plan-waterbank { stroke: #8ca9a2; stroke-width: 38; }
.plan-water { stroke: #a1c9c8; stroke-width: 35; }
.plan-port, .plan-lake { fill: #a1c9c8; stroke: #8ca9a2; stroke-width: 1.3; }
.plan-boundary { fill: none; stroke: #668f83; stroke-width: 2; stroke-dasharray: 8 4 2 4; }
.plan-street-outline, .plan-street, .plan-main-outline, .plan-main, .plan-rail-outline, .plan-rail, .plan-runway {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.plan-street-outline { stroke: #c5b7a0; stroke-width: 3.9; }
.plan-street { stroke: #f8f2df; stroke-width: 2.45; }
.plan-main-outline { stroke: #ac9a7a; stroke-width: 8.5; }
.plan-main { stroke: #f4e3a9; stroke-width: 5.65; }
.plan-rail-outline { stroke: #9e9a8b; stroke-width: 3.7; }
.plan-rail { stroke: #f2ecdc; stroke-width: 2.6; stroke-dasharray: 4 5; }
.plan-runway { stroke: #a1a39a; stroke-width: 6; }
.plan-label {
  fill: #4b5148;
  stroke: #f0ead4;
  stroke-width: 2.3px;
  paint-order: stroke;
  stroke-linejoin: round;
  font: 700 17px Tahoma, Verdana, sans-serif;
  text-anchor: middle;
}
.plan-label.park, .plan-label.water { font-style: italic; }
.plan-label.water { fill: #3d6765; stroke: #bddbd4; }
.plan-label.park { fill: #57654b; stroke: #d2dbb9; }
.plan-label.county { fill: #6a7271; font-size: 15px; letter-spacing: 3px; text-transform: uppercase; }
.plan-label.road { fill: #6f5c29; font-size: 15px; }

.plan-marker {
  position: absolute;
  width: 27px;
  height: 27px;
  border: 0;
  padding: 0;
  transform: translate(-50%, -50%) scale(var(--marker-scale));
  background: transparent;
  color: #203d33;
}
.plan-marker:hover, .plan-marker:focus-visible { z-index: 1; }
.plan-marker-dot, .plan-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border: 2px solid #fffaf1;
  border-radius: 50%;
  background: #2d644c;
  box-shadow: 0 0 0 1px #234d3d, 0 1px 2px #26362666;
}
.plan-marker-dot { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.plan-marker[data-status="mentioned"] .plan-marker-dot, .plan-dot[data-status="mentioned"] {
  background: #fff3cc;
  border-color: #9c6037;
  box-shadow: 0 0 0 1px #fff9e4, 0 1px 3px #62492f66;
}
.plan-marker:hover .plan-marker-dot, .plan-marker:focus-visible .plan-marker-dot { box-shadow: 0 0 0 3px #f4bd6c; }
.plan-marker-label {
  position: absolute;
  top: 50%;
  left: calc(50% + 10px);
  transform: translateY(-50%);
  padding: 0 3px;
  border: 1px solid #aeb8a2;
  border-radius: 2px;
  background: #f9f6e8ed;
  box-shadow: 0 1px 2px #2b3c2b26;
  color: #233b30;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
}
.plan-marker[data-direction="west"] .plan-marker-label { left: auto; right: calc(50% + 10px); }
.plan-marker[data-direction="south"] .plan-marker-label { top: calc(50% + 10px); left: 50%; transform: translateX(-50%); }
.plan-marker[data-direction="north"] .plan-marker-label { top: auto; bottom: calc(50% + 10px); left: 50%; transform: translateX(-50%); }
.plan-marker[data-place="haifischbecken"] .plan-marker-label { color: #fffdf4; background: #315846; border-color: #244635; }
.plan-overview .plan-marker-label { display: none; }
.plan-overview .plan-marker[data-place="haifischbecken"] .plan-marker-label,
.plan-overview .plan-marker:hover .plan-marker-label,
.plan-overview .plan-marker:focus-visible .plan-marker-label { display: block; }

@container (max-width: 180px) {
  .plan-marker[data-place="haifischbecken"] .plan-marker-label {
    left: auto;
    right: calc(50% - 5px);
    transform: none;
  }
}

.plan-caption, .plan-scale, .plan-index, .plan-tools button, .plan-panel-header button {
  color: #243d35;
  background: #faf8ea;
  border: 1px solid #9fae9a;
}
.plan-caption, .plan-scale { pointer-events: none; }
.plan-caption {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 2px 6px;
  border-radius: 2px;
  font-weight: 700;
}
.plan-tools {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
}
.plan-tools button, .plan-panel-header button {
  display: grid;
  place-items: center;
  width: 26px;
  height: 23px;
  padding: 0;
}
.plan-tools button + button { border-top: 0; }
.plan-tools button:first-child { border-radius: 3px 3px 0 0; }
.plan-tools button:last-child { border-radius: 0 0 3px 3px; }
.plan-tools button:disabled { color: #818986; cursor: default; }
.plan-tools svg, .plan-panel svg, .plan-index svg { width: 14px; height: 14px; }
.plan-tools button:hover:not(:disabled), .plan-index:hover, .plan-panel-header button:hover { background: #dfebdc; }
.plan-index {
  position: absolute;
  bottom: 6px;
  left: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 23px;
  padding: 1px 5px 1px 3px;
  border-radius: 3px;
  font-weight: 700;
}
.plan-scale {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 1px 4px 3px;
  border-radius: 2px;
  text-align: center;
  font-size: 9px;
}
.plan-scale span {
  display: block;
  max-width: 78px;
  height: 13px;
  border: 1px solid currentColor;
  border-top: 0;
}

.plan-panel {
  position: absolute;
  inset: auto 5px 5px;
  max-height: calc(100% - 10px);
  display: flex;
  flex-direction: column;
  border: 1px solid #8da296;
  border-radius: 4px;
  overflow: hidden;
  color: #24342d;
  background: #f6f7ee;
  box-shadow: 0 2px 10px #233a3c55;
  font: 12px/1.42 Tahoma, Verdana, sans-serif;
}
.plan-panel[hidden] { display: none; }
.plan-panel-header {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: none;
  padding: 4px 5px 4px 9px;
  color: #1d382d;
  border-bottom: 1px solid #a8bbb0;
  background: linear-gradient(#e0eee2, #c9ded1);
}
.plan-panel-header h2 {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1;
  margin: 0;
  font-size: 12px;
  line-height: 1.23;
}
.plan-panel-header button {
  flex: 0 0 23px;
  width: 23px;
  height: 20px;
  border-radius: 2px;
}
.plan-panel-content { min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.plan-place-area { margin: 0; padding: 6px 9px 0; color: #446056; font-size: 10px; }
.plan-place-area:has(+ .plan-place-row) { padding-bottom: 5px; }
.plan-place-description { margin: 0; padding: 4px 9px 8px; }
.plan-place-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 4px 8px;
  border: 0;
  border-top: 1px solid #cad6ca;
  text-align: left;
  background: transparent;
}
.plan-panel-index .plan-place-row:first-child { border-top: 0; }
.plan-place-row:hover, .plan-place-row:focus-visible { background: #e1ece0; }
.plan-place-row small, .plan-place-row strong { display: block; }
.plan-place-row small { color: #53665b; font-size: 10px; }
.plan-place-row svg { margin-left: auto; transform: rotate(180deg); flex: 0 0 14px; }
