.opportunity-map {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fffdf7;
}
.opportunity-visual {
  position: relative;
  isolation: isolate;
  height: clamp(300px, 34vw, 464px);
  overflow: hidden;
  background: #183330;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.opportunity-visual.is-moving, .opportunity-visual.is-moving .opportunity-pin { cursor: grabbing; }
.opportunity-visual canvas, .opportunity-pins { position: absolute; inset: 0; width: 100%; height: 100%; }
.opportunity-pins { pointer-events: none; }
.opportunity-pin {
  position: absolute;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  background: transparent;
  pointer-events: auto;
}
.opportunity-pin span {
  display: grid;
  place-items: center;
  min-width: 21px;
  height: 21px;
  padding-inline: 4px;
  border: 2px solid #152a23;
  border-radius: 22px;
  background: #fff2d9;
  color: #211b15;
  box-shadow: 0 0 0 1px #ffffffb8, 0 3px 10px #0e181b80;
  font-size: .77rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.opportunity-pin span:not(:empty) { min-width: 30px; height: 30px; }
.opportunity-pin:hover, .opportunity-pin:focus-visible, .opportunity-pin[aria-pressed="true"] { z-index: 1; }
.opportunity-pin:hover span, .opportunity-pin:focus-visible span, .opportunity-pin[aria-pressed="true"] span {
  background: #ff9c67;
  box-shadow: 0 0 0 2px #fff4d8, 0 3px 10px #0e181b80;
}
.opportunity-pin:focus-visible { outline-color: #ffd6a7; outline-offset: 0; }
.opportunity-map-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 8px;
  padding: 5px 9px;
  border-bottom: 1px solid #ded2bc;
  background: #fffaf0;
}
.opportunity-map-bar:has(.opportunity-zoom[hidden]) { display: none; }
.opportunity-layer {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding-inline: 4px;
  color: #28211b;
  font: 700 .85rem/1.2 "DM Sans", system-ui, sans-serif;
  cursor: pointer;
}
.opportunity-layer input { width: 18px; height: 18px; margin: 0; accent-color: #23503d; }
.opportunity-zoom {
  display: flex;
  flex: none;
  margin-inline-start: auto;
  overflow: hidden;
  border: 1px solid #e3d3bc;
  border-radius: 10px;
  background: #fff8e9;
}
.opportunity-zoom button, .opportunity-details {
  min-width: 44px;
  min-height: 44px;
  padding: 0 9px;
  border: 0;
  background: transparent;
  color: #28211b;
  font-size: .81rem;
  font-weight: 750;
  white-space: nowrap;
}
.opportunity-zoom button + button { border-inline-start: 1px solid #e3d6c1; }
.opportunity-zoom button:not([data-zoom="fit"]) { font-size: 1.35rem; }
.opportunity-zoom button:hover, .opportunity-details:hover { background: #f6e4d0; }
.opportunity-zoom button:focus-visible { outline-offset: -4px; }
.opportunity-message {
  position: absolute;
  inset: 10px 10px auto;
  width: fit-content;
  max-width: calc(100% - 20px);
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff8e9;
  color: #3d3327;
  font-size: .8rem;
}
.opportunity-controls { display: grid; gap: 7px; padding: 12px 14px; }
.opportunity-key {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  color: #5a4d3d;
  font-size: .76rem;
  font-weight: 700;
}
.opportunity-key i {
  width: clamp(35px, 7vw, 90px);
  flex: none;
  height: 7px;
  border-radius: 7px;
  background: linear-gradient(90deg, #845747, #ba583a, #ed833c, #ffe3a8);
}
.opportunity-picker { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.opportunity-picker select { width: 100%; min-inline-size: 0; min-height: 44px; }
.opportunity-details { border: 1px solid #e3d3bc; border-radius: 8px; background: #f9eddf; }
.opportunity-organizer {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-block-start: 8px;
  padding: 6px 13px;
  border-radius: 8px;
  background: #ffe6d2;
  color: #653314;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.opportunity-caption, .opportunity-summary, .opportunity-touch-hint {
  margin: 0;
  color: #62594d;
  font-size: .75rem;
  line-height: 1.4;
}
.opportunity-summary { color: #365148; font-weight: 700; }
.opportunity-summary:empty { display: none; }
.opportunity-caption a { margin-inline-start: .25em; color: inherit; }
.opportunity-touch-hint { display: none; }
.opportunity-results { min-width: 0; }
.opportunity-group-bar:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 8px;
  margin-bottom: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffaf0;
}
.opportunity-group-bar h3 {
  margin: 0;
  font: 750 .91rem/1.3 "DM Sans", system-ui, sans-serif;
}
.opportunity-sheet {
  position: fixed;
  inset: auto 0 0;
  box-sizing: border-box;
  width: min(100%, 620px);
  max-width: 100%;
  max-height: 86dvh;
  margin: 0 auto;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 20px 20px 0 0;
  background: #fffdf7;
  color: inherit;
}
.opportunity-sheet::backdrop { background: #1a1b17a6; }
body:has(.opportunity-sheet[open]) { overflow: hidden; }
.opportunity-sheet-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: #fffdf7;
}
.opportunity-sheet-header h2 { margin: 0; font: 750 1rem/1.2 "DM Sans", system-ui, sans-serif; }
.opportunity-close {
  min-width: 60px;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid #dfcfb8;
  border-radius: 8px;
  background: #f9eddf;
  color: #28211b;
  font-weight: 750;
  font-size: .84rem;
}
.opportunity-close:hover { background: #f6e4d0; }
.opportunity-sheet-body { display: grid; gap: 11px; padding: 13px 14px max(14px, env(safe-area-inset-bottom)); }
.opportunity-sheet .opportunity-group-bar {
  padding: 0;
  border: 0;
  background: transparent;
}
.opportunity-sheet .opportunity-group-bar h3 { display: none; }
.opportunity-sheet :is(.cards, .results) { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 840px), (pointer: coarse) {
  .opportunity-touch-hint { display: block; }
  .opportunity-map.has-detail-sheet:not([hidden]) ~ .opportunity-results { display: none; }
}
@media (max-width: 460px) {
  .opportunity-visual { height: 310px; }
  .opportunity-controls { padding: 10px; }
}
