.d2s-app {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  background: #ffffff;
  color: #0f172a;
  font-family: var(--font-sans, Inter, sans-serif);
}
.d2s-controls {
  padding: 20px;
  background: #f8fafc;
  border-right: 1px solid #d8e1ec;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.d2s-drop {
  border: 2px dashed #94a3b8;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  background: #ffffff;
  cursor: pointer;
}
.d2s-drop.is-over { border-color: #1d4ed8; background: #eff6ff; }
.d2s-drop strong { display: block; font-size: 14px; margin-bottom: 4px; }
.d2s-drop span { font-size: 12px; color: #475569; }
.d2s-field { display: flex; flex-direction: column; gap: 4px; }
.d2s-field label { font-size: 12px; font-weight: 600; color: #334155; }
.d2s-input, .d2s-select {
  height: 36px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: #0f172a;
  font-size: 13px;
  font-family: var(--font-mono, monospace);
}
.d2s-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.d2s-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.d2s-btn {
  min-height: 42px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.d2s-btn:hover { background: #f1f5f9; }
.d2s-btn.is-primary { background: #1d4ed8; border-color: #1d4ed8; color: #ffffff; }
.d2s-btn.is-primary:hover { background: #1e40af; }
.d2s-btn.is-teal { background: #0f766e; border-color: #0f766e; color: #ffffff; }
.d2s-btn.is-teal:hover { background: #115e59; }
.d2s-preview-pane {
  display: flex;
  flex-direction: column;
  min-height: 460px;
}
.d2s-preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 16px;
  background: #eef2f7;
  border-bottom: 1px solid #d8e1ec;
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  color: #334155;
  flex-wrap: wrap;
}
.d2s-svg-box {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: repeating-conic-gradient(#f1f5f9 0% 25%, #ffffff 0% 50%) 50% / 20px 20px;
  overflow: auto;
}
.d2s-svg-box svg {
  max-width: 100%;
  max-height: 440px;
  width: auto;
  height: auto;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.1);
}
@media (max-width: 820px) {
  .d2s-app { grid-template-columns: 1fr; }
  .d2s-controls { border-right: 0; border-bottom: 1px solid #d8e1ec; }
}