/* ゾーニング設定パネル */
.zoning-settings-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 10000;
  justify-content: center;
  align-items: center;
}
.zoning-settings-overlay.active {
  display: flex;
}

.zoning-settings-panel {
  background: #fff;
  width: 820px;
  max-width: 95vw;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.zoning-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}
.zoning-settings-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #141415;
}
.zoning-settings-close {
  background: none; border: none;
  font-size: 22px; cursor: pointer;
  color: #6b7280;
  line-height: 1;
}

/* タブ */
.zoning-tabs {
  display: flex;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
  padding: 0 24px;
}
.zoning-tab {
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.zoning-tab.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
}

/* コンテンツ */
.zoning-settings-body {
  overflow-y: auto;
  padding: 24px;
  flex: 1;
}
.zoning-tab-content {
  display: none;
}
.zoning-tab-content.active {
  display: block;
}

/* セクション */
.zs-section {
  margin-bottom: 24px;
}
.zs-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #141415;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.zs-section-desc {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 12px;
}

/* テーブル共通 */
.zs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.zs-table th, .zs-table td {
  border: 1px solid #e5e7eb;
  padding: 6px 10px;
  text-align: center;
}
.zs-table th {
  background: #f3f4f6;
  font-weight: 600;
  color: #374151;
  font-size: 12px;
}
.zs-table input[type="number"] {
  width: 60px;
  padding: 4px 6px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  text-align: center;
  font-size: 13px;
}

/* しきい値行 */
.zs-threshold-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
  color: #374151;
}
.zs-threshold-row input[type="number"] {
  width: 70px;
  padding: 4px 8px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  text-align: center;
  font-size: 13px;
}

/* マトリックス */
.zs-matrix-wrapper {
  overflow-x: auto;
}
.zs-matrix {
  border-collapse: collapse;
  font-size: 12px;
}
.zs-matrix th, .zs-matrix td {
  border: 1px solid #d1d5db;
  padding: 3px;
  text-align: center;
  min-width: 42px;
}
.zs-matrix th {
  background: #f3f4f6;
  font-weight: 600;
  font-size: 11px;
}
.zs-matrix input[type="number"] {
  width: 42px;
  padding: 3px 2px;
  border: none;
  border-radius: 0;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  background: transparent;
  color: #1e293b;
}
.zs-matrix input[type="number"]:focus {
  outline: 2px solid #2563eb;
  border-radius: 2px;
}
.zs-matrix td {
  padding: 0;
}

/* フッター */
.zoning-settings-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 24px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}
.zs-btn {
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
}
.zs-btn-primary {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}
.zs-btn-primary:hover {
  background: #1d4ed8;
}
.zs-btn:hover {
  background: #f3f4f6;
}
.zs-btn-primary:hover {
  background: #1d4ed8;
}

/* 四象限プレビュー */
.zs-quadrant-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  width: 280px;
  height: 200px;
  margin: 16px auto;
  border: 2px solid #374151;
}
.zs-quadrant {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
}
.zs-q-red    { background: #ef4444; }
.zs-q-blue   { background: #3b82f6; }
.zs-q-yellow { background: #eab308; color: #374151; }
.zs-q-green  { background: #22c55e; }
.zs-quadrant .zs-q-pct {
  font-size: 18px;
  font-weight: 800;
}
