/* Base */
#viewport-map-app {
  display: flex;
  width: 100%;
  height: 90vh;
  gap: 12px;
  box-sizing: border-box;
}

#viewport-map-app * { box-sizing: border-box; }

#viewport-map-view { flex: 2; min-height: 0; }
#viewport-map-sidebar { flex: 1; min-height: 0; overflow: auto; }

.vma-map-view { min-height: 0; }
.vma-sidebar {
  padding: 12px;
  overflow: auto;
  background: #fff;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.vma-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px;
}

.vma-info {
  font-size: 11px;
  color: #6b7280;
  margin-bottom: 6px;
}

.vma-note {
  color: #6b7280;
  font-size: 13px;
  margin: 0;
}

.vma-note-loading { font-style: italic; }

.vma-back-wrap { margin-bottom: 6px; }

.vma-back-btn {
  border: none;
  background: transparent;
  color: #2563eb;
  cursor: pointer;
  padding: 0;
  font-size: 13px;
}

.vma-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vma-card {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 8px;
  cursor: pointer;
  background: #fff;
  transition: background-color 0.15s, border-color 0.15s;
}

.vma-card.is-active { background: #dbeafe; }

.vma-card-title { font-weight: 500; }

.vma-card-signature {
  font-size: 12px;
  color: #555;
}

.vma-card-image {
  width: 100%;
  margin-top: 6px;
  border-radius: 4px;
  border: 1px solid #e5e7eb;
}

.vma-card-link {
  display: inline-block;
  margin-top: 4px;
  font-size: 12px;
  color: #2563eb;
  text-decoration: underline;
}

.vma-card-hint {
  font-size: 12px;
  color: #2563eb;
  margin-top: 4px;
}

.vma-error {
  margin: 0;
  color: #b91c1c;
  font-size: 14px;
}

@media (max-width: 768px) {
  #viewport-map-app {
    flex-direction: column;
    gap: 8px;
    height: 100vh;
  }

  #viewport-map-view {
    flex: 0 0 65%;
    height: 65%;
    width: 100%;
  }

  #viewport-map-sidebar {
    flex: 0 0 35%;
    height: 35%;
    width: 100%;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    border-top: 1px solid rgba(0,0,0,0.08);
  }
}
