/* Interactive field map (src/ui/mapview.js). Stenciled Field Kit: sailcloth sheet, stitched border, one orange accent. */
#ui .mv2 {
  position: absolute;
  inset: 0;
  z-index: 22;
  display: grid;
  place-items: center;
  background: rgba(23, 20, 15, .5);
  pointer-events: auto;
  padding: 8px;
  --mv-h: calc(86vh - 56px);
}
#ui .mv2[hidden] { display: none; }
#ui .mv-sheet {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 12px 12px 10px;
  background: var(--canvas);
  border-radius: 3px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .5), 0 2px 0 rgba(255, 255, 255, .25) inset;
  max-width: 96vw;
}
#ui .mv-sheet::after {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1.5px dashed var(--stitch);
  border-radius: 1px;
  pointer-events: none;
}
#ui .mv-sheet.is-in { animation: mv-settle .28s var(--ease); }
@keyframes mv-settle {
  from { opacity: 0; transform: translateY(14px) rotate(-.6deg) scale(.985); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { #ui .mv-sheet.is-in { animation: none; } }
#ui .mv-frame { position: relative; line-height: 0; }
#ui .mv-canvas {
  display: block;
  width: min(92vw, calc(var(--mv-h) * 1.3333));
  height: auto;
  aspect-ratio: 4 / 3;
  border-radius: 2px;
  cursor: crosshair;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
#ui .mv-close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  min-width: 44px;
  padding: 0 14px;
  background: var(--canvas);
  color: var(--ink);
  border: 1.5px dashed var(--stitch);
  border-radius: 3px;
  font-family: var(--f-label);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}
#ui .mv-close:hover { background: var(--canvas-shade); }
#ui .mv-close:active { background: #CFC4A9; }
#ui .mv-bearing {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 5px 10px;
  background: var(--ink);
  color: var(--canvas);
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
  font-family: var(--f-label);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1;
}
#ui .mv-bearing[hidden] { display: none; }
#ui .mv-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 18px;
  padding: 0 4px;
  font-family: var(--f-label);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink);
}
#ui .mv-item { display: inline-flex; align-items: center; gap: 5px; }
#ui .mv-item .key { min-width: 22px; height: 22px; font-size: 13px; padding: 0 5px; }
#ui .mv-rough { color: var(--ink-soft); }
#ui .mv-pins { color: var(--signal-ink); background: var(--signal); padding: 2px 8px; border-radius: 2px; }
#ui .mv-tch { display: none; }

@media (max-height: 460px) {
  #ui .mv-close { min-height: 44px; }
}
html.is-touch #ui .mv2 {
  --mv-h: calc(var(--vvh, 100dvh) - 70px);
  padding: 4px;
}
html.is-touch #ui .mv-sheet { padding: 8px 8px 6px; gap: 4px; }
html.is-touch #ui .mv-desk { display: none; }
html.is-touch #ui .mv-tch { display: inline; }
html.is-touch #ui .mv-legend { font-size: 13px; flex-wrap: nowrap; gap: 10px; }
html.is-touch #ui .mv-close { top: 6px; right: 6px; }
