.zb-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 360px;
  max-width: 90vw;
  background: #fff;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.15);
  overflow-y: auto;
  z-index: 10;
  font: 14px/1.4 system-ui, -apple-system, sans-serif;
  color: #222;
}

.zb-header {
  position: sticky;
  top: 0;
  background: #fff;
  padding: 14px 16px;
  border-bottom: 1px solid #e2e2e2;
  z-index: 1;
}

.zb-title {
  margin: 0 28px 2px 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
}

.zb-sub {
  color: #888;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.zb-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: #777;
  cursor: pointer;
  border-radius: 4px;
}
.zb-close:hover {
  background: #f0f0f0;
  color: #222;
}

.zb-body {
  padding: 12px 16px 24px;
}

.zb-geom {
  margin-bottom: 10px;
  color: #555;
  font-size: 13px;
}

.zb-empty {
  color: #666;
}

.zb-attrs {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.zb-attrs td {
  padding: 4px 8px;
  vertical-align: top;
  border-bottom: 1px solid #efefef;
}
.zb-attrs tr:nth-child(even) {
  background: #f6f6f6;
}
.zb-attrs .zb-k {
  color: #555;
  font-weight: 600;
  white-space: nowrap;
}
.zb-attrs .zb-v {
  word-break: break-word;
  overflow-wrap: anywhere;
}

.zb-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}
.zb-menu-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 8px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
}
.zb-menu-row:hover {
  background: #eef;
}
.zb-menu-label {
  font-weight: 600;
}
.zb-menu-id {
  color: #999;
  font-size: 12px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.zb-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 15px/1.4 system-ui, -apple-system, sans-serif;
  color: #444;
}
.zb-overlay-box {
  text-align: center;
  max-width: 80vw;
  padding: 0 16px;
}
.zb-overlay-msg {
  font-size: 16px;
}
.zb-spinner {
  width: 34px;
  height: 34px;
  margin: 0 auto 14px;
  border: 3px solid #e0e0e0;
  border-top-color: #ff2d2d;
  border-radius: 50%;
  animation: zb-spin 0.8s linear infinite;
}
@keyframes zb-spin {
  to { transform: rotate(360deg); }
}
.zb-overlay-btn {
  margin-top: 16px;
  padding: 8px 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #f7f7f7;
  font: inherit;
  color: #333;
  cursor: pointer;
}
.zb-overlay-btn:hover {
  background: #ececec;
}

.zb-share {
  margin-top: 10px;
  padding: 5px 11px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background: #f7f7f7;
  font: inherit;
  font-size: 12px;
  color: #333;
  cursor: pointer;
}
.zb-share:hover {
  background: #ececec;
}

/* Mobile: every panel (feature + select menu) becomes a bottom sheet — fixed
   50vh, scrolls. The base .zb-panel overflow-y:auto handles vertical overflow. */
@media (max-width: 640px) {
  .zb-panel {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    height: 50vh;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.18);
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
  }
}
