.json-editor-dialog {
  width: min(980px, calc(100vw - 24px));
  max-width: none;
  max-height: min(92vh, 940px);
  padding: 0;
  border: 0;
  border-radius: 16px;
  color: #23354b;
  background: #fff;
  box-shadow: 0 28px 90px #10223d57;
}

.json-editor-dialog::backdrop { background: #0d1c31a6; }

.json-editor-shell {
  display: flex;
  flex-direction: column;
  height: min(86vh, 830px);
  min-height: 360px;
}

.json-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid #e6ebf0;
}

.json-editor-header h2 { margin: 0; font-size: 21px; letter-spacing: -.03em; }

.json-editor-close {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #6a788c;
  font-size: 28px;
  line-height: 1;
}

.json-editor-close:hover { background: #ebeff5; color: #1f3b61; }

.json-editor-status {
  padding: 11px 24px;
  border-bottom: 1px solid #e6ebf0;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.json-editor-status-valid { background: #e9f8f2; color: #12654d; }
.json-editor-status-invalid { background: #fff2e8; color: #a73b12; }

.json-editor-help {
  margin: 0;
  padding: 10px 24px;
  color: #74839a;
  font-size: 12px;
  line-height: 1.5;
}

.json-editor-workspace {
  display: flex;
  flex: 1;
  min-height: 0;
  margin: 0 24px 18px;
  overflow: hidden;
  border: 1px solid #cfd7e3;
  border-radius: 8px;
  background: #fff;
}

.json-editor-workspace:focus-within {
  border-color: #3c82e5;
  box-shadow: 0 0 0 3px #3c82e51e;
}

.json-editor-gutter,
.json-editor-input {
  margin: 0;
  padding: 14px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  font-weight: 400;
  line-height: 20px;
  tab-size: 2;
}

.json-editor-gutter {
  min-width: 50px;
  overflow: hidden;
  text-align: right;
  color: #9aa8b8;
  background: #f7f9fc;
  border-right: 1px solid #e6ebf0;
  user-select: none;
}

.json-editor-input {
  flex: 1;
  width: 100%;
  min-width: 0;
  resize: none;
  border: 0;
  border-radius: 0;
  outline: 0;
  color: #23344a;
  white-space: pre;
}

.json-editor-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid #e6ebf0;
}

.json-editor-footer-actions { display: flex; gap: 9px; }

.json-editor-button {
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.json-editor-button:disabled { cursor: not-allowed; opacity: .46; }
.json-editor-button-secondary { background: #fff; color: #3c4b62; border-color: #cdd6e1; }
.json-editor-button-secondary:hover:not(:disabled) { background: #f8fafc; }
.json-editor-button-primary { background: #1662d3; color: #fff; }
.json-editor-button-primary:hover:not(:disabled) { background: #0d52bb; }

@media (max-width: 600px) {
  .json-editor-shell { height: min(90vh, 830px); }
  .json-editor-header { padding: 12px 15px; }
  .json-editor-header h2 { font-size: 18px; }
  .json-editor-status { padding: 10px 15px; }
  .json-editor-help { padding: 9px 15px; }
  .json-editor-workspace { margin: 0 15px 12px; }
  .json-editor-footer { padding: 12px 15px; flex-wrap: wrap; }
  .json-editor-footer-actions { margin-left: auto; }
  .json-editor-button { padding: 8px 10px; }
}
