.sptc { max-width: 760px; }

.sptc-controls { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 14px; }
.sptc-field { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 700; color: #27331f; }
.sptc-field-note { font-weight: 400; color: #5b6b56; }
.sptc-field select, .sptc-field input {
  padding: 9px 11px; font-size: 14.5px; border: 1px solid #d9e0d4; border-radius: 6px; width: 100%; box-sizing: border-box;
  background: #fff; color: #27331f;
}
.sptc-field select:focus, .sptc-field input:focus { outline: 2px solid #19616a; outline-offset: 1px; }

.sptc-toggle-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.sptc-toggle { display: flex; gap: 6px; }
.sptc-toggle-btn {
  padding: 8px 14px; font-size: 13px; font-weight: 700; border: 1px solid #d9e0d4; border-radius: 6px;
  background: #fff; cursor: pointer; color: #27331f;
}
.sptc-toggle-active { background: #19616a; border-color: #19616a; color: #fff; }

.sptc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.sptc-stat {
  display: flex; flex-direction: column; gap: 4px; padding: 12px; background: #f3f4f8;
  border: 1px solid #d9e0d4; border-radius: 8px;
}
.sptc-stat-label { font-size: 11.5px; font-weight: 700; color: #5b6b56; }
.sptc-stat-value { font-size: 19px; font-weight: 700; color: #19616a; }

.sptc-verdict {
  margin: 0 0 22px; padding: 10px 12px; font-size: 13.5px; font-weight: 700; color: #19616a;
  background: #f3f4f8; border: 1px solid #d9e0d4; border-radius: 6px;
}
.sptc-verdict.sptc-warn { color: #c0392b; }

.sptc-map-section { margin-bottom: 22px; }
.sptc-map-title { margin: 0 0 4px; font-size: 15px; font-weight: 700; color: #27331f; }
.sptc-map-hint { margin: 0 0 12px; font-size: 12.5px; color: #5b6b56; }
.sptc-map-row { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-start; }
#sptc-canvas { border: 1px solid #d9e0d4; border-radius: 6px; background: #27331f; max-width: 100%; }

.sptc-map-side { display: flex; flex-direction: column; gap: 12px; min-width: 180px; }
.sptc-legend { display: flex; flex-direction: column; gap: 6px; }
.sptc-legend-item { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #27331f; }
.sptc-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 3px; border: 1px solid #d9e0d4; }
.sptc-swatch-safe { background: #f6d365; }
.sptc-swatch-unsafe { background: #27331f; }
.sptc-swatch-source { background: #19616a; }
.sptc-coverage { margin: 0; font-size: 14.5px; font-weight: 700; color: #19616a; }

.sptc-table-wrap { margin-bottom: 22px; }
.sptc-table-title { margin: 0 0 10px; font-size: 15px; font-weight: 700; color: #27331f; }
.sptc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sptc-table th, .sptc-table td { text-align: left; padding: 9px 10px; border: 1px solid #d9e0d4; }
.sptc-table th { background: #f3f4f8; color: #27331f; font-weight: 700; }
.sptc-table td { color: #27331f; }
.sptc-table tbody tr:nth-child(even) td { background: #f3f4f8; }
.sptc-table tr.sptc-row-warn td { color: #c0392b; }
.sptc-table tr.sptc-row-active td { background: #e8f2f1; font-weight: 700; }

.sptc-note { margin-top: 16px; font-size: 13px; color: #5b6b56; }

@media (max-width: 640px) {
  .sptc-controls { grid-template-columns: 1fr; }
  .sptc-stats { grid-template-columns: repeat(2, 1fr); }
  .sptc-map-row { flex-direction: column; }
}
