/* I3.3 presentation only: anatomical anchors remain owned by the existing runtime. */
.ff-map {
  width: 100%;
  max-width: 360px;
  margin: 2px auto 8px;
}

.ff-map-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--vitalyx-space-3, 12px);
  margin: 0 0 var(--vitalyx-space-2, 8px);
  padding: 0 2px;
}

.ff-map-head b,
.ff-zone-title {
  color: var(--brand);
  font-size: var(--vitalyx-type-eyebrow, 11px);
  font-weight: 700;
  letter-spacing: var(--vitalyx-tracking-eyebrow, 0.12em);
  line-height: var(--vitalyx-leading-eyebrow, 1.35);
  text-transform: uppercase;
}

.ff-map-head span {
  color: var(--mut2);
  font-size: var(--vitalyx-type-meta, 11px);
  line-height: var(--vitalyx-leading-meta, 1.45);
}

.ff-map-canvas {
  position: relative;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  aspect-ratio: 3 / 4;
}

.ff-map-photo {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--vitalyx-radius-lg, 16px);
  background: #E1E7E6;
  box-shadow: 0 10px 28px rgba(12,41,50, 0.1);
  object-fit: cover;
}

.ff-map-leaders {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.ff-map-leader {
  stroke: rgba(19,65,79, 0.5);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.ff-map-leader[hidden] {
  display: none;
}

.ff-map-target {
  position: absolute;
  z-index: 4;
  left: var(--x);
  top: var(--y);
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  outline: none;
  background: transparent;
  box-shadow: none;
  color: inherit;
  cursor: pointer;
  place-items: center;
}

.ff-map-target__visual {
  display: grid;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(19,65,79, 0.75);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 5px rgba(12,41,50, 0.2);
  color: var(--brand);
  font-family: var(--vitalyx-font-meta, var(--font));
  font-size: 7.5px;
  font-weight: 750;
  line-height: 1;
  place-items: center;
  transition:
    width 150ms ease,
    height 150ms ease,
    transform 120ms ease,
    background 150ms ease,
    border-color 150ms ease;
}

.ff-map-target__check {
  position: absolute;
  right: 4px;
  bottom: 4px;
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--em2);
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  line-height: 10px;
  text-align: center;
}

.ff-map-target:hover .ff-map-target__visual {
  transform: scale(1.06);
}

.ff-map-target:hover,
.ff-map-target:focus-visible {
  transform: translate(-50%, -50%);
}

.ff-map-target:active .ff-map-target__visual {
  transform: scale(0.94);
}

.ff-map-target:focus-visible {
  z-index: 12 !important;
  outline: 2px solid var(--em);
  outline-offset: -4px;
}

.ff-map-target.sel {
  z-index: 11 !important;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
}

.ff-map-target.sel .ff-map-target__visual {
  width: 22px;
  height: 22px;
  border: 2px solid #fff;
  background: var(--em);
  box-shadow:
    0 0 0 2px rgba(26,92,112, 0.35),
    0 3px 9px rgba(12,41,50, 0.2);
  color: #fff;
}

.ff-map-target.sel .ff-map-target__check {
  display: block;
}

.ff-map-context {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: var(--vitalyx-space-2, 8px);
  margin: var(--vitalyx-space-2, 8px) auto 0;
  padding: var(--vitalyx-space-2, 8px) var(--vitalyx-space-3, 12px);
  border: 1px solid var(--line);
  border-radius: var(--vitalyx-radius-md, 12px);
  background: var(--card);
  color: var(--ink2);
  font-size: var(--vitalyx-type-meta, 11.5px);
  line-height: var(--vitalyx-leading-meta, 1.45);
}

.ff-map-context::before {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--em);
  content: "";
}

.ff-zone-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--vitalyx-space-2, 8px);
  margin-top: var(--vitalyx-space-3, 12px);
}

.ff-zone {
  overflow: clip;
  border: 1px solid var(--line);
  border-radius: var(--vitalyx-radius-md, 12px);
  background: #F8FBFB;
}

.ff-zone[open],
.ff-zone.has-selection {
  border-color: var(--emline);
}

.ff-zone > summary {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: var(--vitalyx-space-3, 12px);
  padding: var(--vitalyx-space-3, 12px);
  cursor: pointer;
  list-style: none;
}

.ff-zone > summary::-webkit-details-marker {
  display: none;
}

.ff-zone > summary::after {
  color: var(--brand);
  content: "+";
  font-size: 18px;
  line-height: 1;
}

.ff-zone[open] > summary::after {
  content: "−";
}

.ff-zone > summary:focus-visible {
  outline: 2px solid var(--em);
  outline-offset: -3px;
}

.ff-zone-count {
  margin-left: auto;
  color: var(--mut);
  font-size: var(--vitalyx-type-meta, 11px);
  line-height: var(--vitalyx-leading-meta, 1.45);
}

.ff-zone-options {
  display: grid;
  gap: 1px;
  margin: 0;
  padding: 0 var(--vitalyx-space-2, 8px) var(--vitalyx-space-2, 8px);
  list-style: none;
}

.ff-zone-choice {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 48px;
  grid-template-columns: 32px minmax(0, 1fr) 20px;
  align-items: center;
  column-gap: var(--vitalyx-space-2, 8px);
  padding: var(--vitalyx-space-2, 8px) var(--vitalyx-space-3, 12px);
  border: 0;
  border-radius: var(--vitalyx-radius-sm, 8px);
  background: #fff;
  color: var(--ink2);
  cursor: pointer;
  font-family: var(--vitalyx-font-body, inherit);
  text-align: left;
}

.ff-zone-choice:hover {
  background: var(--emlight);
}

.ff-zone-choice:active {
  transform: scale(0.99);
}

.ff-zone-choice:focus-visible {
  z-index: 1;
  outline: 2px solid var(--em);
  outline-offset: -2px;
}

.ff-zone-choice .idx {
  grid-row: 1 / span 2;
  display: grid;
  width: 28px;
  height: 28px;
  align-self: center;
  border: 1px solid #A9BEBB;
  border-radius: 50%;
  color: var(--brand);
  font-family: var(--vitalyx-font-meta, var(--font));
  font-size: var(--vitalyx-type-meta, 10px);
  font-weight: 750;
  place-items: center;
}

.ff-zone-choice .name {
  display: block;
  min-width: 0;
  grid-column: 2;
  grid-row: 1;
  font-size: var(--vitalyx-type-option, 14px);
  font-weight: 650;
  line-height: var(--vitalyx-leading-option, 1.35);
}

.ff-zone-choice .desc {
  display: block;
  min-width: 0;
  grid-column: 2;
  grid-row: 2;
  margin-top: 1px;
  color: var(--mut);
  font-size: var(--vitalyx-type-meta, 11.5px);
  line-height: var(--vitalyx-leading-meta, 1.45);
}

.ff-zone-choice::after {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--em2);
  content: "";
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.ff-zone-choice.sel {
  background: var(--emlight);
  box-shadow: inset 3px 0 0 var(--em);
}

.ff-zone-choice.sel .name {
  color: var(--em2);
}

.ff-zone-choice.sel .idx {
  border-color: var(--em);
  background: #fff;
  color: var(--em2);
}

.ff-zone-choice.sel::after {
  content: "✓";
}

@media (min-width: 780px) {
  .ff-map {
    max-width: 368px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ff-map-target__visual,
  .ff-zone-choice {
    transition: none;
  }
}
