.editor-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.editor-toolbar h1 {
  font-size: 42px;
}
.editor-toolbar .eyebrow {
  margin-bottom: 12px;
}
.editor-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
  margin: 20px 0;
}
.editor-controls label {
  min-width: 200px;
  margin: 0;
}
.editor-controls .device {
  padding: 9px 14px;
}
.selected-device {
  background: #e2e9d6;
}
.editor-workspace {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.editor-panel {
  padding: 20px;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 5px;
  max-height: calc(100vh - 230px);
  overflow: auto;
}
.editor-panel [hidden] {
  display: none !important;
}
.editor-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin: -4px -4px 20px;
}
.editor-tabs button {
  min-height: 38px;
  padding: 7px 5px;
  font-size: 12px;
  background: #eaede3;
  color: var(--ink);
  border: 1px solid transparent;
}
.editor-tabs button[aria-selected="true"] {
  background: var(--ink);
  color: white;
}
.tool-pane h3 {
  margin-top: 10px;
}
.tool-pane p {
  font-size: 12px;
}
.tool-pane button {
  max-width: 100%;
}
.field-history {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.seo-count {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}
.editor-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  border: 2px dashed #b6c2aa;
  background: #f0f4e9;
  padding: 20px 10px;
  text-align: center;
  border-radius: 8px;
}
.editor-dropzone.dragging {
  border-color: var(--red);
  background: #e2eacb;
}
.editor-dropzone .upload-symbol {
  font-size: 31px;
  line-height: 1;
}
.editor-dropzone strong {
  font-size: 14px;
}
.editor-dropzone span,
.editor-dropzone small {
  font-size: 11px;
  color: var(--muted);
}
.editor-dropzone label {
  margin: 3px 0;
}
#editor-photo-files {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  padding: 0;
  min-height: 1px;
}
.queued-image {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}
.queued-image img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 4px;
}
.queued-image span {
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
#upload-editor-photos {
  width: 100%;
  margin-top: 12px;
  font-size: 12px;
  padding: 12px;
}
#editor-upload-progress {
  width: 100%;
  margin-top: 12px;
  accent-color: var(--red);
}
.media-library {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.media-card {
  background: #f2f3eb;
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
  padding: 6px;
}
.media-thumbnail {
  background: transparent;
  display: block;
  padding: 0;
  width: 100%;
  min-height: 0;
}
.media-thumbnail img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 3px;
  display: block;
}
.media-card strong {
  font-size: 11px;
  line-height: 1.4;
  display: block;
  margin: 6px 0;
  overflow-wrap: anywhere;
}
.media-card small {
  font-size: 9px;
  line-height: 1.3;
  display: block;
  color: var(--muted);
}
.media-move {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
}
.media-move button {
  font-size: 13px;
  padding: 5px 12px;
  min-height: 32px;
}
.selected-photo {
  width: 100%;
  max-height: 180px;
  object-fit: contain;
  background: #e9ecdf;
  margin: 14px 0;
  border-radius: 5px;
}
#media-detail > button {
  margin: 8px 0;
  width: 100%;
}
.section-item {
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 12px 7px;
  background: white;
  margin-bottom: 10px;
}
.section-item label {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  margin: 0;
  font-size: 12px;
}
.section-item input {
  width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
}
.drag-grip {
  color: #829273;
  cursor: grab;
  font-size: 17px;
}
.section-arrows {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.section-arrows button {
  padding: 3px 8px;
  min-height: 25px;
  font-size: 11px;
}
.history-card {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 15px;
  margin: 12px 0;
}
.history-card strong,
.history-card small {
  display: block;
  font-size: 12px;
}
.history-card small {
  color: var(--muted);
  font-size: 10px;
  margin: 6px 0 12px;
}
#tool-record-form {
  margin-top: 20px;
}
.live-photo {
  cursor: pointer;
  outline: 1px dashed #ad302944;
  outline-offset: -3px;
}
.live-photo:hover {
  outline: 3px solid var(--red);
}
.editor-panel input,
.editor-panel textarea {
  font-size: 13px;
}
.editor-panel h3 {
  font-size: 24px;
  margin: 24px 0 10px;
}
.editor-panel p {
  font-size: 12px;
}
.editor-manager {
  display: block;
  padding: 10px 0;
  color: var(--red);
  font-size: 13px;
}
.preview-stage {
  display: flex;
  justify-content: center;
  background: #dfe3da;
  border: 1px solid #cdd3c4;
  padding: 12px;
  min-width: 0;
  overflow: auto;
  border-radius: 5px;
}
#editor-preview {
  display: block;
  border: 0;
  background: white;
  width: 100%;
  max-width: none;
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: top left;
  height: calc(100vh - 265px);
  min-height: 540px;
}
.preview-canvas {
  position: relative;
  height: calc(100vh - 265px);
  min-height: 600px;
  flex-shrink: 0;
}
#editor-status {
  padding: 12px 16px;
  background: #e5ecd9;
  border-radius: 4px;
  font-size: 13px;
}
.editor-error {
  background: #f6dfd6 !important;
  color: #8e2119;
}
.publish-review[hidden] {
  display: none;
}
.publish-review {
  position: fixed;
  inset: 0;
  background: #18221bc9;
  display: grid;
  place-items: center;
  z-index: 30;
  padding: 25px;
}
.publish-review > .card {
  max-width: 520px;
}
.publish-review h2 {
  margin-top: 0;
}
.live-editable {
  cursor: text;
  outline: 1px dashed #ad302966;
  outline-offset: 3px;
}
.live-editable:hover {
  outline: 2px solid var(--red);
  background: #f3d9c755;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
@media (max-width: 1100px) {
  .editor-workspace {
    grid-template-columns: 260px minmax(0, 1fr);
  }
  .editor-toolbar {
    flex-wrap: wrap;
  }
}
@media (max-width: 700px) {
  .editor-workspace {
    grid-template-columns: 1fr;
  }
  .editor-panel {
    max-height: 55svh;
  }
  .editor-controls {
    flex-wrap: wrap;
  }
  .preview-stage {
    padding: 6px;
  }
  #editor-preview {
    min-height: 650px;
  }
  .editor-toolbar h1 {
    font-size: 35px;
  }
  .editor-panel input,
  .editor-panel select,
  .editor-panel textarea {
    font-size: 16px;
  }
  .publish-review {
    padding: 12px;
  }
  .publish-review > .card {
    max-height: 85svh;
    overflow-y: auto;
  }
}
