.mom-front {
  float: left;
  width: 100%;
  padding: 38px 20px;
  background: var(--mom-panel-bg, #fff);
  box-sizing: border-box;
}

.mom-front * {
  box-sizing: border-box;
}

.mom-front__inner {
  width: 100%;
  max-width: var(--mom-width, 1200px);
  margin: 0 auto;
}

.mom-front__intro {
  margin-bottom: 22px;
}

.mom-front__outro {
  margin-top: 22px;
}

.mom-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  width: 100%;
  margin-bottom: 20px;
}

.mom-tab {
  min-height: 46px;
  padding: 9px 16px;
  border: 0;
  border-radius: 7px;
  background: var(--mom-tab-bg, #856259);
  color: var(--mom-tab-text, #fff);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.mom-tab:hover,
.mom-tab.is-active {
  background: var(--mom-tab-active-bg, #5d433c);
  color: var(--mom-tab-active-text, #fff);
}

.mom-group-filter {
  margin: 0 0 22px;
  padding: 0;
  border: 0;
}

.mom-group-filter legend {
  margin-bottom: 10px;
  font-weight: 750;
}

.mom-group-filter__items {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.mom-group-filter label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 7px 12px 7px 8px;
  border: 1px solid #d8d8d8;
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  user-select: none;
}

.mom-group-filter input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.mom-filter-check {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border: 2px solid var(--group-color, #856259);
  border-radius: 50%;
  background: #fff;
}

.mom-group-filter input:checked + .mom-filter-check {
  background: var(--group-color, #856259);
}

.mom-group-filter input:checked + .mom-filter-check::after {
  content: "✓";
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.mom-group-filter input:focus-visible + .mom-filter-check {
  outline: 3px solid rgba(19, 121, 178, .28);
  outline-offset: 2px;
}

.mom-view[hidden] {
  display: none;
}

.mom-reference-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-weight: 650;
  cursor: pointer;
}

.mom-map-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  margin: 16px 0 22px;
}

.mom-reference-toggle input {
  width: 19px;
  height: 19px;
  accent-color: #1379b2;
}

.mom-overlay-control {
  display: grid;
  grid-template-columns: auto minmax(180px, 420px) auto;
  gap: 12px;
  align-items: center;
  justify-content: start;
  width: min(100%, 560px);
  margin: 0;
  font-weight: 650;
}

.mom-overlay-control input[type="range"] {
  width: 100%;
  accent-color: var(--mom-tab-active-bg, #5d433c);
}

.mom-zoom-control {
  display: grid;
  grid-template-columns: auto minmax(180px, 360px) auto 48px;
  gap: 10px;
  align-items: center;
  width: min(100%, 560px);
  margin: -8px 0 22px;
  font-weight: 650;
}

.mom-zoom-control input[type="range"] {
  width: 100%;
  accent-color: var(--mom-tab-active-bg, #5d433c);
}

.mom-zoom-control output {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.mom-map-layout {
  position: relative;
  width: 100%;
}

.mom-map-canvas {
  position: relative;
  width: 100%;
  aspect-ratio: 2400 / 3345;
  overflow: hidden;
  border-radius: 14px;
  background: var(--mom-map-bg, #f4f7f8);
  touch-action: manipulation;
}

.mom-map-canvas.is-zoomed {
  cursor: grab;
  touch-action: none;
}

.mom-map-canvas.is-panning {
  cursor: grabbing;
}

.mom-map-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-origin: center center;
  will-change: transform;
}

.mom-map-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.mom-map-reference {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  visibility: visible;
  opacity: 1;
  pointer-events: none;
}

.mom-map-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  user-select: none;
  will-change: opacity;
}

.mom-map-overlay[hidden] {
  display: none;
}

.mom-pin {
  position: absolute;
  z-index: 4;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .28));
  transform: translate(-50%, -88%);
  transition: transform .16s ease, filter .16s ease;
}

.mom-pin .mom-marker-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.mom-pin .mom-marker-fill {
  fill: var(--pin-color, #856259);
}

.mom-pin .mom-marker-outline {
  fill: #fff;
}

.mom-pin:hover,
.mom-pin:focus-visible,
.mom-pin.is-active {
  z-index: 5;
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, .4));
  transform: translate(-50%, -88%) scale(1.22);
  outline: none;
}

.mom-pin[hidden] {
  display: none;
}

.mom-region-dot {
  position: absolute;
  z-index: 3;
  display: grid;
  width: clamp(20px, 2.5vw, 28px);
  height: clamp(20px, 2.5vw, 28px);
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #528db9;
  color: #fff;
  font-size: clamp(11px, 1.4vw, 15px);
  font-weight: 850;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .28);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.mom-map-detail {
  z-index: 8;
  width: min(360px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  overflow: auto;
  padding: 20px;
  border: 1px solid #dadada;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(34, 47, 57, .09);
}

.mom-map-detail[hidden] {
  display: none;
}

.mom-map-detail--top-left,
.mom-map-detail--top-right,
.mom-map-detail--center,
.mom-map-detail--bottom-left,
.mom-map-detail--bottom-right {
  position: absolute;
}

.mom-map-detail--top-left { top: 16px; left: 16px; }
.mom-map-detail--top-right { top: 16px; right: 16px; }
.mom-map-detail--center { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.mom-map-detail--bottom-left { bottom: 16px; left: 16px; }
.mom-map-detail--bottom-right { right: 16px; bottom: 16px; }

.mom-map-detail--below {
  position: relative;
  width: 100%;
  max-height: none;
  margin-top: 12px;
  padding: 14px 18px;
  border-radius: 8px;
}

.mom-map-detail--below .mom-member-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
}

.mom-map-detail--below .mom-member-detail__logo {
  max-height: 70px;
  margin: 0;
}

.mom-map-detail--below .mom-member-detail h3,
.mom-map-detail--below .mom-member-detail p,
.mom-map-detail--below .mom-detail-links {
  margin: 0;
}

.mom-map-detail--below .mom-detail-long {
  flex-basis: 100%;
}

.mom-detail-drag,
.mom-detail-close {
  position: absolute;
  top: 8px;
  z-index: 2;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  font: inherit;
  font-size: 20px;
  font-weight: 800;
}

.mom-detail-drag {
  left: 8px;
  background: #528db9;
  cursor: grab;
  touch-action: none;
}

.mom-detail-drag:active { cursor: grabbing; }

.mom-detail-close {
  right: 8px;
  background: var(--mom-detail-close-bg, #5d433c);
  cursor: pointer;
}

.mom-map-detail[data-detail-mode="overlay"] [data-map-detail-content] {
  padding-top: 28px;
}

.mom-map-detail h3 {
  margin: 0 0 5px;
  color: #1379b2;
}

.mom-member-detail__logo {
  display: block;
  width: auto;
  max-width: min(100%, 200px);
  height: auto;
  max-height: 120px;
  margin: 0 0 16px;
  object-fit: contain;
  object-position: left center;
}

.mom-map-detail p {
  margin: 0 0 12px;
}

.mom-detail-name {
  font-weight: 750;
}

.mom-detail-long {
  margin-top: 12px;
}

.mom-detail-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.mom-detail-links a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 7px 12px;
  border-radius: var(--mom-detail-button-radius, 6px);
  background: var(--mom-detail-button-bg, #1379b2);
  color: var(--mom-detail-button-text, #fff);
  font-weight: 700;
  text-decoration: none;
  transition: background-color .18s ease, color .18s ease;
}

.mom-detail-links a:hover,
.mom-detail-links a:focus-visible {
  background: var(--mom-detail-button-hover-bg, #0f628f);
  color: var(--mom-detail-button-hover-text, #fff);
}

.mom-region-legend {
  margin-top: 18px;
}

.mom-region-legend__items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.mom-region-legend__item {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 36px;
  padding: 5px 8px;
  border-radius: 5px;
  background: var(--mom-region-bg, #856259);
  color: var(--mom-region-text, #fff);
}

.mom-region-legend__number {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #528db9;
  color: #fff;
  font-weight: 850;
}

.mom-region-legend__item p {
  margin: 0;
  color: inherit;
  font-size: 13px;
  line-height: 1.25;
}

.mom-region-legend__item p span {
  margin: 0 3px;
  opacity: .7;
}

.mom-place-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.mom-place-layer.is-visible {
  visibility: visible;
  opacity: 1;
}

.mom-place-label {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transform: translate(-50%, -100%);
}

.mom-place-label__text {
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .88);
  color: #16384a;
  font-size: clamp(8px, 1.2vw, 12px);
  font-weight: 750;
  line-height: 1.1;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}

.mom-place-label__dot {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .24);
}

.mom-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.mom-public-table {
  width: 100%;
  border-collapse: collapse;
}

.mom-public-table th,
.mom-public-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #dedede;
  text-align: left;
  vertical-align: middle;
}

.mom-public-table th {
  background: var(--mom-table-header-bg, #5d433c);
  color: #fff;
}

.mom-public-table th button {
  position: relative;
  width: 100%;
  padding: 0 20px 0 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 750;
  text-align: left;
  cursor: pointer;
}

.mom-public-table th button::after {
  content: "↕";
  position: absolute;
  right: 0;
  opacity: .65;
}

.mom-public-table th button[data-direction="asc"]::after {
  content: "↑";
}

.mom-public-table th button[data-direction="desc"]::after {
  content: "↓";
}

.mom-public-table tr[hidden] {
  display: none;
}

.mom-icon-link {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #1379b2;
  color: #fff;
}

.mom-icon-link svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

@media (max-width: 760px) {
  .mom-front {
    padding: 28px 14px;
  }

  .mom-tabs {
    position: sticky;
    top: 0;
    z-index: 10;
  }

  .mom-group-filter__items {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mom-group-filter label {
    width: 100%;
  }

  .mom-map-layout {
    width: 100%;
  }

  .mom-map-canvas {
    width: min(100%, 540px);
    margin: 0 auto;
    border-radius: 10px;
  }

  .mom-region-legend__item {
    grid-template-columns: 26px minmax(0, 1fr);
  }

  .mom-region-legend__items { grid-template-columns: 1fr; }

  .mom-public-table,
  .mom-public-table tbody,
  .mom-public-table tr,
  .mom-public-table td {
    display: block;
    width: 100%;
  }

  .mom-public-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .mom-public-table tr {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 5px 10px;
    margin-bottom: 12px;
    padding: 14px;
    border: 1px solid #dedede;
    border-radius: 10px;
  }

  .mom-public-table td {
    padding: 0;
    border: 0;
  }

  .mom-public-table td:nth-child(1),
  .mom-public-table td:nth-child(2),
  .mom-public-table td:nth-child(3) {
    grid-column: 1;
  }

  .mom-public-table td:nth-child(4) {
    grid-column: 2;
    grid-row: 1 / span 3;
  }

  .mom-public-table td:nth-child(5) {
    grid-column: 3;
    grid-row: 1 / span 3;
  }
}

@media (max-width: 440px) {
  .mom-overlay-control {
    grid-template-columns: auto minmax(90px, 1fr) auto;
    gap: 7px;
    font-size: 12px;
  }

  .mom-zoom-control {
    grid-template-columns: auto minmax(80px, 1fr) auto;
    gap: 7px;
    font-size: 12px;
  }

  .mom-zoom-control output {
    grid-column: 1 / -1;
    text-align: left;
  }

  .mom-group-filter__items {
    grid-template-columns: 1fr;
  }

  .mom-place-label__text {
    font-size: 7px;
  }
}
