html,
body {
  margin: 0;
  height: 100%;
  font-family: Arial, sans-serif;
  background: #f1f5f9;
  color: #0f172a;
}

.app-shell {
  position: relative;
  height: 100vh;
}

.map-shell {
  height: 100vh;
  width: 100%;
}

.toolbar {
  position: absolute;
  top: 12px;
  left: 50px;
  right: 344px;
  z-index: 1200;
  padding: 10px 12px;
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
  font-size: 13px;
}

.paint-ruler {
  position: absolute;
  top: 82px;
  left: 12px;
  width: 58px;
  z-index: 1190;
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
  padding: 8px 0;
}

.paint-ruler.is-hidden {
  display: none;
}

.paint-ruler-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.toolbar strong {
  font-size: 15px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  font-size: 12px;
  background: #f1f5f9;
}

.menu-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.menu-group button,
.menu-group select,
.menu-group input {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  padding: 6px 10px;
  font-size: 13px;
}

.menu-group input[type='file'] {
  padding: 3px;
}

.menu-status {
  display: none;
}

.menu-group label {
  white-space: nowrap;
}

.material-symbols-outlined {
  font-size: 18px;
  line-height: 1;
  color: #334155;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  cursor: pointer;
  padding: 0;
}

.icon-btn:hover {
  background: #f8fafc;
}

.icon-btn.is-active {
  background: #ecfdf5;
  border-color: #34d399;
}

.icon-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.point-input-popover {
  position: absolute;
  z-index: 1250;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
}

.point-input-popover[hidden] {
  display: none;
}

#pointInput {
  width: 190px;
  max-width: 32vw;
}

.annotation-pin-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.annotation-pin-icon .material-symbols-outlined {
  font-size: 22px;
  color: #dc2626;
  text-shadow: 0 1px 3px rgba(15, 23, 42, 0.35);
}

.annotation-popup {
  display: flex;
  align-items: center;
  gap: 8px;
}

.annotation-popup-label {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.annotation-popup-extra {
  display: block;
  max-width: 200px;
  color: #475569;
  font-size: 12px;
  line-height: 1.25;
}

.annotation-delete-btn {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
}

.annotation-delete-btn .material-symbols-outlined {
  color: #b91c1c;
}

.h3-notation-box {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.h3-popup {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 230px;
}

.h3-popup-row {
  line-height: 1.35;
}

.h3-notation-input {
  flex: 1 1 auto;
  min-width: 180px;
  max-width: 230px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
}

.h3-notation-save {
  width: 30px;
  height: 30px;
}

.h3-notation-status {
  min-height: 14px;
  margin-top: 4px;
  font-size: 11px;
  color: #0f766e;
}

.enrich-notice-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(2, 6, 23, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.enrich-notice-modal-overlay[hidden] {
  display: none;
}

.enrich-notice-modal-card {
  width: min(460px, calc(100vw - 40px));
  border: 1px solid #dbe4ef;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.24);
  padding: 16px;
}

.enrich-notice-modal-title {
  margin: 0;
  font-size: 18px;
  color: #0f172a;
}

.enrich-notice-modal-message {
  margin: 10px 0 0;
  color: #334155;
  line-height: 1.45;
}

.enrich-notice-modal-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}

.enrich-notice-modal-ok {
  min-width: 64px;
  width: auto;
  padding: 0 12px;
}

#locationSearchInput {
  width: 200px;
  max-width: 34vw;
}

.dashboard {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1100;
  width: 320px;
  max-height: calc(100% - 24px);
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid #d4d4d8;
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.14);
  overflow: hidden;
  transition: width 0.2s ease;
  display: flex;
  flex-direction: column;
}

.dashboard.collapsed {
  width: 44px;
}

.dashboard-head {
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.dashboard-body {
  padding: 10px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  font-size: 14px;
  line-height: 1.45;
}

.dashboard-analyzing {
  color: #64748b;
  font-style: italic;
  font-size: 13px;
}

.dashboard.collapsed .dashboard-body,
.dashboard.collapsed .dashboard-head h3 {
  display: none;
}

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

.dashboard-city-item {
  width: 100%;
  text-align: left;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #f8fbff;
  padding: 8px;
  cursor: pointer;
}

.dashboard-city-item:hover {
  background: #eff6ff;
}

.dashboard-current-item {
  margin-bottom: 8px;
  background: #f8fafc;
}

.dashboard-tree {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dashboard-country-group {
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.dashboard-country-group > summary {
  list-style: none;
  cursor: pointer;
  padding: 8px 10px;
  font-weight: 600;
  color: #1e3a5f;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
}

.dashboard-country-group > summary::-webkit-details-marker {
  display: none;
}

.dashboard-country-count {
  font-weight: 400;
  color: #64748b;
}

.dashboard-country-group .dashboard-city-list {
  padding: 8px;
}

.dashboard-city-name {
  display: block;
  font-weight: 600;
  color: #1e3a5f;
}

.dashboard-city-meta {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #64748b;
}

@media (max-width: 1200px) {
  .toolbar {
    right: 12px;
  }

  .dashboard {
    top: auto;
    bottom: 12px;
    width: 300px;
  }
}

@media (max-width: 760px) {
  .toolbar {
    left: 12px;
  }

  #locationSearchInput {
    width: 160px;
    max-width: 46vw;
  }
}
