.editor-page {
  width: min(920px, calc(100% - 40px));
}

.editor-head {
  padding: 10px 0 4px;
}

.editor-head h1 {
  font-size: 36px;
}

.page-intro {
  max-width: 590px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.listing-editor {
  padding: 0;
  overflow: hidden;
}

.form-section {
  padding: 28px;
  border-bottom: 1px solid var(--line);
}

.form-section-head {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  margin-bottom: 22px;
}

.form-section-head > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 5px;
  background: var(--plum);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.form-section-head h2 {
  margin: 0 0 4px;
  font-family: inherit;
  font-size: 18px;
}

.form-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.field label em,
.field-label em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
}

.editor-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 28px;
  background: #f7f8f7;
}

.editor-actions > div:first-child strong,
.editor-actions > div:first-child span {
  display: block;
}

.editor-actions > div:first-child span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.media-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9f6;
}

.media-picker-copy {
  min-width: 0;
}

.field-label {
  display: block;
  color: #414750;
  font-size: 13px;
  font-weight: 750;
}

.media-picker-copy > p {
  margin: 6px 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.media-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.is-hidden {
  display: none !important;
}

.upload-status {
  min-height: 20px;
  margin-top: 10px;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 700;
}

.upload-preview {
  display: grid;
  width: 100%;
  aspect-ratio: 4 / 3;
  place-items: center;
  overflow: hidden;
  border: 1px dashed #aeb8b1;
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
}

.upload-preview span {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
}

.upload-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-preview.has-image {
  border-style: solid;
}

.url-fallback {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.url-fallback summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.url-fallback .field {
  margin-top: 12px;
}

.image-placeholder {
  background: #e8eee9;
}

@media (max-width: 700px) {
  .editor-page {
    width: min(100% - 24px, 920px);
  }

  .editor-head h1 {
    font-size: 34px;
  }

  .form-section {
    padding: 22px 18px;
  }

  .media-picker {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .upload-preview {
    grid-row: 1;
  }

  .editor-actions {
    align-items: stretch;
    flex-direction: column;
    padding: 18px;
  }

  .editor-actions .inline-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .editor-actions .button.primary {
    grid-column: 1 / -1;
    grid-row: 1;
  }
}

@media (max-width: 420px) {
  .editor-actions .inline-actions {
    grid-template-columns: 1fr;
  }

  .editor-actions .button.primary {
    grid-column: auto;
  }
}
