.rt-tool .rt-layout {
  align-items: flex-start;
  row-gap: 16px;
}
.rt-settings-panel,
.rt-result-panel {
  min-width: 0;
  height: 100%;
}
.rt-panel-header {
  gap: 12px;
}
.rt-panel-header > span:first-child {
  flex: 1;
  min-width: 0;
}
.rt-panel-header i {
  margin-right: 6px;
}
.rt-result-status {
  flex: 0 1 auto;
  min-width: 0;
  color: var(--text-3);
  font-size: 12.5px;
  font-weight: 500;
  text-align: right;
}
.rt-settings-body,
.rt-result-body {
  gap: 16px;
}
.rt-settings-panel,
.rt-result-panel,
.rt-settings-body,
.rt-result-body {
  background: #fff;
}
.rt-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  margin: 0;
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 600;
}
.rt-field .form-control {
  width: 100%;
  min-width: 0;
  padding-top: 7px;
  padding-bottom: 7px;
}
.rt-field select.form-control {
  max-width: 100%;
}
.rt-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  min-width: 0;
}
.rt-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.rt-options-title {
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 600;
}
.rt-check-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
}
.rt-check {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-size: 13.5px;
  cursor: pointer;
  user-select: none;
}
.rt-check input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--primary);
  cursor: pointer;
}
.rt-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.rt-action-row .btn {
  justify-content: center;
}
.rt-action-row .btn i {
  margin-right: 6px;
}
.rt-action-row .btn-primary {
  min-width: 120px;
}
.rt-message {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 13.5px;
  line-height: 1.45;
}
.rt-result-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.rt-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.rt-toolbar-actions .btn i {
  margin-right: 6px;
}
.rt-output {
  width: 100%;
  min-width: 0;
  min-height: 220px;
  resize: vertical;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre;
  overflow: auto;
}
.rt-output:focus {
  outline: none;
  border-color: var(--primary);
}
.rt-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 30px 16px;
  color: var(--text-3);
  text-align: center;
}
.rt-empty i {
  font-size: 34px;
  line-height: 1;
  color: var(--border);
}
.rt-empty p {
  margin: 0;
  font-size: 13.5px;
}
.rt-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
  color: var(--text-3);
  font-size: 12.5px;
  line-height: 1.45;
}
.rt-note i {
  margin-top: 1px;
  color: var(--primary);
}
:root[data-theme="dark"] .rt-settings-panel,
:root[data-theme="dark"] .rt-result-panel,
:root[data-theme="dark"] .rt-settings-body,
:root[data-theme="dark"] .rt-result-body {
  background: #161b22;
}
:root[data-theme="dark"] .rt-output {
  background: #0d1117;
  border-color: rgba(148, 163, 184, .2);
}
:root[data-theme="dark"] .rt-message {
  border-color: #7f1d1d;
  background: rgba(127, 29, 29, .18);
}
@media (max-width: 640px) {
  .rt-panel-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    row-gap: 6px;
  }
  .rt-result-status {
    min-height: 2.8em;
    text-align: left;
  }
  .rt-field-grid {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 12px;
  }
  .rt-action-row {
    display: grid;
  }
  .rt-action-row .btn {
    width: 100%;
    min-width: 0;
  }
  .rt-toolbar-actions {
    display: grid;
  }
  .rt-toolbar-actions .btn {
    width: 100%;
  }
  .rt-settings-body,
  .rt-result-body {
    padding: 14px;
  }
}
