.shb-editor-body {
  overflow-x: hidden;
}

.shb-editor-topbar {
  display: grid;
  gap: 14px;
}

.shb-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border: 1px solid var(--shb-line);
}

.shb-editor-status-list,
.shb-editor-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.shb-editor-status {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--shb-line);
  color: var(--shb-subtle);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.shb-editor-status.is-good {
  color: var(--shb-ink);
  border-color: rgba(255, 255, 255, 0.38);
}

.shb-editor-status.is-accent {
  color: #000;
  background: #fff;
  border-color: #fff;
}

.shb-editor-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--shb-line);
  background: transparent;
  color: var(--shb-ink);
  cursor: pointer;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: opacity var(--shb-fast), border-color var(--shb-fast), background var(--shb-fast), color var(--shb-fast);
}

.shb-editor-action:hover,
.shb-editor-action:focus-visible {
  outline: 0;
  border-color: rgba(255, 255, 255, 0.38);
}

.shb-editor-action.is-primary {
  background: #fff;
  color: #000;
  border-color: #fff;
}

.shb-editor-action.is-ghost {
  color: var(--shb-subtle);
}

.shb-editor-action[disabled] {
  opacity: 0.38;
  cursor: default;
}

.shb-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.shb-edit-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--shb-line);
  background: transparent;
  color: var(--shb-subtle);
  cursor: pointer;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.shb-edit-trigger:hover,
.shb-edit-trigger:focus-visible {
  outline: 0;
  border-color: rgba(255, 255, 255, 0.38);
  color: var(--shb-ink);
}

.shb-section-head {
  align-items: flex-start;
}

.shb-section-head.has-edit {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.shb-editor-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 60;
  width: min(760px, calc(100vw - 36px));
  height: 100vh;
  overflow: auto;
  padding: 32px 30px 34px;
  border-left: 1px solid var(--shb-line);
  background: #050505;
  transform: translateX(100%);
  transition: transform 180ms ease-out;
}

.shb-editor-panel.is-open {
  transform: translateX(0);
}

.shb-editor-panel-close {
  position: fixed;
  right: min(480px, calc(100vw - 64px));
  top: 16px;
  z-index: 61;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--shb-line);
  background: #050505;
  color: var(--shb-ink);
  cursor: pointer;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.shb-editor-scrim {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(0, 0, 0, 0.42);
}

.shb-editor-panel-head {
  display: grid;
  gap: 8px;
  margin-bottom: 24px;
}

.shb-editor-panel-title {
  margin: 0;
  font-size: clamp(34px, 4.6vw, 76px);
  line-height: 0.94;
}

.shb-editor-panel-copy {
  margin: 0;
  color: var(--shb-muted);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.shb-editor-form {
  display: grid;
  gap: 18px;
}

.shb-editor-field {
  display: grid;
  gap: 8px;
}

.shb-editor-field > span,
.shb-editor-fieldset-title {
  color: var(--shb-muted);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.shb-editor-input,
.shb-editor-textarea {
  width: 100%;
  border: 1px solid var(--shb-line);
  border-radius: 0;
  background: transparent;
  color: var(--shb-ink);
  font: inherit;
  outline: none;
}

.shb-editor-input {
  min-height: 42px;
  padding: 0 12px;
}

.shb-editor-textarea {
  min-height: 220px;
  padding: 14px;
  resize: vertical;
  line-height: 1.55;
}

.shb-editor-input:focus,
.shb-editor-textarea:focus {
  border-color: rgba(255, 255, 255, 0.38);
}

.shb-editor-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.shb-editor-fieldset {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--shb-line-soft);
}

.shb-editor-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--shb-subtle);
  font-size: 12px;
}

.shb-editor-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 12px;
}

.shb-editor-error {
  margin: 0;
  color: #ffb0b0;
  font-size: 12px;
}

.shb-editor-success {
  margin: 0;
  color: var(--shb-subtle);
  font-size: 12px;
}

.shb-editor-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.72);
}

.shb-editor-modal[hidden] {
  display: none;
}

.shb-editor-modal-panel {
  width: min(420px, 100%);
  padding: 24px 22px;
  border: 1px solid var(--shb-line);
  background: #050505;
}

.shb-editor-modal-title {
  margin: 0 0 18px;
}

.shb-editor-token-form {
  display: grid;
  gap: 12px;
}

.shb-editor-modal-actions {
  display: flex;
  justify-content: flex-start;
}

.shb-editor-json-note {
  margin: 0;
  color: var(--shb-muted);
  font-size: 11px;
  line-height: 1.5;
}

@media (max-width: 980px) {
  .shb-editor-toolbar {
    padding: 12px 14px;
  }

  .shb-editor-panel-close {
    right: 16px;
    top: 16px;
  }

  .shb-editor-field-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .shb-editor-toolbar-actions,
  .shb-editor-status-list {
    width: 100%;
  }

  .shb-editor-toolbar-actions > * {
    flex: 1 1 calc(50% - 10px);
  }

  .shb-editor-panel {
    width: 100vw;
    padding: 24px 18px 26px;
  }

  .shb-editor-panel-close {
    right: 12px;
  }
}
