.wb-map-stage {
  position: relative;
  isolation: isolate;
  margin-bottom: 24px;
  border: 1px solid #927d56;
  border-radius: 10px;
  background: #38799d;
  overflow: hidden;
}
.wb-map-art { width: 100%; height: auto; display: block; }
.wb-map-place {
  position: absolute;
  left: var(--wb-map-x);
  top: var(--wb-map-y);
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border: 1px solid #fff4d4;
  border-radius: 20px;
  color: #fff8e8;
  background: #102c29;
  font: 650 13px/1.25 "Segoe UI", sans-serif;
  white-space: nowrap;
  box-shadow: 0 2px 8px #0f272b66;
  cursor: pointer;
}
.wb-map-place::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #f3bc5e;
}
.wb-map-place:hover, .wb-map-place:focus-visible {
  color: #102c29;
  background: #ffe5a4;
  z-index: 1;
}
.wb-map-place:focus-visible { outline: 3px solid #102c29; outline-offset: 2px; }
.wb-region-dialog {
  width: min(940px, 96vw);
  max-height: 92vh;
  border: 1px solid var(--wb-map-line, #d9d2bd);
  border-radius: 12px;
  padding: 0;
  color: var(--wb-map-ink, #192923);
  background: var(--wb-map-paper, #fffcf4);
  overflow: auto;
}
.wb-region-dialog::backdrop { background: #091c20b8; }
.wb-region-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--wb-map-line, #d9d2bd);
}
.wb-region-header h2 { font-size: clamp(25px, 4vw, 37px); line-height: 1.1; }
.wb-region-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.wb-map-close, .wb-family-option {
  padding: 7px 12px;
  border: 1px solid var(--wb-map-line, #d9d2bd);
  border-radius: 6px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: 600 14px/1.35 "Segoe UI", sans-serif;
}
.wb-family-options { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 20px 0; }
.wb-family-option[aria-pressed="true"] { color: #102c29; background: #e1efb6; border-color: #a5ba76; }
.wb-map-household { padding: 16px 20px 20px; }
.wb-map-household h3 { margin: 0 0 14px; font-size: 24px; }
.wb-family-units { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 168px), 1fr)); gap: 16px; }
.wb-family-unit { min-width: 0; padding-top: 8px; border-top: 2px solid var(--wb-map-line, #d9d2bd); }
.wb-family-unit h4 { margin: 0 0 8px; font-size: 14px; }
.wb-family-members { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.wb-family-member { min-width: 0; font-size: 13px; line-height: 1.3; }
.wb-member-role { display: block; opacity: 0.8; }
.wb-casting { display: block; font-size: 11px; margin-top: 2px; color: var(--wb-map-review, #566343); }
.wb-sheet-link { margin-top: 5px; padding: 3px 8px; font-size: 11px; }
.wb-gallery-option { border-color: #a6ba80; background: #edf2dc; color: #304126; }
.wb-family-kin { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 7px; }
.wb-family-kin h4 { width: 100%; margin: 0; }
.wb-map-household .wb-resident-grid { grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)); gap: 12px; }
.wb-map-household > h4 { margin: 12px 0 7px; }
.wb-family-member img, .wb-portrait-placeholder { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: center top; display: block; border-radius: 6px; margin-bottom: 5px; background: #e8ddc6; }
.wb-portrait-placeholder { display: grid; place-items: center; color: #102c29; font-size: 24px; }
.wb-family-note { margin: 18px 0 0; max-width: 76ch; }
@media (min-width: 840px) {
  .wb-family-members:has(li:nth-child(3)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .wb-map-place { left: var(--wb-map-mobile-x); top: var(--wb-map-mobile-y); }
}
@media (max-width: 640px) {
  .wb-map-place { min-height: 26px; padding: 3px 6px; font-size: 10px; gap: 3px; }
  .wb-map-place::before { width: 4px; height: 4px; }
  .wb-family-units { grid-template-columns: 1fr 1fr; gap: 12px; }
  .wb-region-header, .wb-map-household { padding-inline: 13px; }
  .wb-family-options { padding-inline: 13px; }
}
@media (max-width: 370px) {
  .wb-map-place { font-size: 9px; padding-inline: 4px; }
  .wb-map-place::before { display: none; }
}
.wb-farm-roster {margin: 0 0 6px; border-bottom: 1px solid #d7d7c9; padding: 10px 20px;}
.wb-farm-roster summary {font-weight: 700; cursor: pointer;}
.wb-farm-roster ul {display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,220px),1fr)); gap: 8px 15px; list-style: none; padding: 0; margin: 9px 0 2px;}
.wb-farm-roster li {font-size: .85rem; line-height: 1.42;}
.wb-farm-roster li strong {display: block;}
@media (max-width: 600px) {.wb-farm-roster {padding-inline: 13px;}}
