.sdt { max-width: 820px; }
.sdt-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.sdt-tab {
  padding: 8px 12px; font-size: 13px; font-weight: 700; border: 1px solid #d9e0d4; border-radius: 6px;
  background: #fff; cursor: pointer; color: #27331f;
}
.sdt-tab-active { background: #19616a; border-color: #19616a; color: #fff; }
.sdt-panel { display: flex; flex-direction: column; gap: 12px; }
.sdt-panel label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: #27331f; }
.sdt-panel input, .sdt-panel select, .sdt-panel textarea {
  padding: 9px 11px; font-size: 14.5px; border: 1px solid #d9e0d4; border-radius: 6px; font-family: inherit;
}
.sdt-panel textarea { font-family: ui-monospace, monospace; font-size: 13.5px; resize: vertical; }
.sdt-panel input:focus, .sdt-panel select:focus, .sdt-panel textarea:focus { outline: 2px solid #19616a; outline-offset: 1px; }
.sdt-panel input[type="file"] { background: #fff; cursor: pointer; }
.sdt-panel input[type="range"] { padding: 0; }

.sdt-hint { font-size: 12.5px; color: #5b6b56; margin: 4px 0 0; }
.sdt-note { margin-top: 16px; font-size: 13px; color: #5b6b56; }

.sdt-error {
  padding: 10px 12px; background: #fdecea; border: 1px solid #e0a29a; border-radius: 6px;
  color: #7a2e22; font-size: 13.5px; font-weight: 700;
}
.sdt-warn {
  padding: 10px 12px; background: #fff6e0; border: 1px solid #e6cf8a; border-radius: 6px;
  color: #6b5307; font-size: 13.5px; font-weight: 700;
}

.sdt-summary {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 4px 0;
}
.sdt-stat {
  padding: 10px 12px; background: #f3f4f8; border: 1px solid #d9e0d4; border-radius: 6px;
  display: flex; flex-direction: column; gap: 4px;
}
.sdt-stat span { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: #5b6b56; }
.sdt-stat strong { font-size: 15px; color: #19616a; word-break: break-word; }

.sdt-section-title { font-size: 14px; font-weight: 700; color: #27331f; margin: 6px 0 -4px; }

.sdt-layer-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; }
.sdt-layer-controls label { flex: 1 1 160px; }

.sdt-grid-wrap {
  overflow: auto; max-height: 520px; border: 1px solid #d9e0d4; border-radius: 6px; background: #fff;
}
.sdt-grid { border-collapse: collapse; font-size: 11px; }
.sdt-grid th, .sdt-grid td {
  border: 1px solid #d9e0d4; text-align: center; padding: 0; min-width: 34px; height: 28px;
}
.sdt-grid thead th {
  position: sticky; top: 0; background: #f3f4f8; color: #5b6b56; font-size: 10.5px; font-weight: 700; z-index: 1;
}
.sdt-grid tbody th {
  position: sticky; left: 0; background: #f3f4f8; color: #5b6b56; font-size: 10.5px; font-weight: 700;
}
.sdt-grid-corner { background: #f3f4f8; z-index: 2; }
.sdt-cell {
  font-family: ui-monospace, monospace; font-size: 9.5px; font-weight: 700; color: #19616a;
  background: #eef3ec; cursor: default; white-space: nowrap; overflow: hidden;
}
.sdt-cell-air { color: #b7bfae; background: #fff; }

.sdt-legend-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sdt-legend-list li {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; background: #f3f4f8;
  border: 1px solid #d9e0d4; border-radius: 6px; font-size: 13px;
}
.sdt-legend-abbr {
  font-family: ui-monospace, monospace; font-weight: 700; color: #19616a; background: #fff;
  border: 1px solid #d9e0d4; border-radius: 4px; padding: 2px 6px; min-width: 34px; text-align: center; font-size: 11px;
}
.sdt-legend-name { flex: 1; color: #27331f; word-break: break-all; }
.sdt-legend-count { color: #5b6b56; font-size: 12px; font-weight: 700; }

.sdt-out { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.sdt-cmd {
  padding: 10px 12px; background: #f3f4f8; border: 1px solid #d9e0d4; border-radius: 6px;
  overflow-x: auto;
}
.sdt-cmd code { font-family: ui-monospace, monospace; font-size: 13.5px; color: #19616a; font-weight: 700; white-space: pre-wrap; word-break: break-word; }

.sdt-convert-notes { list-style: disc; margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.sdt-convert-notes li { font-size: 12.5px; color: #5b6b56; }

@media (max-width: 480px) {
  .sdt-summary { grid-template-columns: 1fr; }
  .sdt-layer-controls { flex-direction: column; align-items: stretch; }
}
