.editor-work { max-width: 960px; }
.editor-work > .back-link { display: inline-flex; align-items: center; min-height: 44px; margin: -8px 0 8px; }
.editor-work .page-heading { margin-bottom: 16px; }
.editor-work .editor-panel { padding: clamp(12px, 2.3vw, 24px); border-color: var(--line); background: var(--surface); }
.editor-work .editor-panel h2 { scroll-margin-top: 16px; }
.editor-work .editor-panel h2:focus { outline: none; }
.editor-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}
.editor-steps button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 48px;
  padding: 6px 4px;
  border: 0;
  background: var(--surface);
  color: var(--muted);
  font-size: .9rem;
  font-weight: var(--weight-label);
}
.editor-steps button span { font-variant-numeric: tabular-nums; }
.editor-steps button:hover, .editor-steps [aria-current="step"] { color: var(--accent-ink); }
.editor-steps [aria-current="step"] { box-shadow: inset 0 -2px var(--focus); }
.editor-steps button:focus-visible { outline-offset: -3px; }
.editor-work .studio-placeholder { background: var(--subtle); border-color: var(--control-line); color: var(--muted); }
.editor-work .editor-byline .text-link { min-height: 44px; text-align: left; justify-self: start; }
.editor-work .file-label, .editor-work .chapter-actions .text-link { min-height: 44px; }
.editor-work .chapter-actions .text-link { display: inline-flex; align-items: center; }
.studio-form:has([name="type"][value="free"]:checked) .studio-check { display: none; }
.editor-work .editor-save {
  position: static;
  padding: 12px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: var(--surface);
  box-shadow: none;
}
.editor-work .editor-save .form-error { margin: 0; }
.editor-work .editor-save .button { min-height: 44px; }
.editor-save-status { margin: 0; }
.editor-summary { margin: 0; border-top: 1px solid var(--line); }
.editor-summary div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: .9rem;
}
.editor-summary dt { color: var(--muted); }
.editor-summary dd { margin: 0; overflow-wrap: anywhere; }
.editor-issues { margin: 8px 0 0; padding: 0; list-style: none; }
.editor-issues button { display: flex; align-items: center; min-height: 44px; gap: 4px; color: var(--danger-ink); text-align: left; }
.editor-previews { display: flex; flex-wrap: wrap; gap: 8px; }
.editor-previews .button { min-height: 44px; }
.editor-recovery, .editor-moderation {
  display: grid;
  gap: 8px;
  justify-items: start;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--subtle);
}
.editor-moderation { margin-bottom: 16px; }
.editor-moderation h2 { font-size: 1.14rem; }
.editor-moderation p { color: var(--ink); white-space: pre-line; overflow-wrap: anywhere; }
.editor-live { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.editor-live a { display: inline-flex; align-items: center; min-height: 44px; }
.studio-card-preview { grid-template-columns: clamp(76px, 25%, 105px) minmax(0, 1fr); grid-template-rows: auto; gap: 12px; }
.studio-card-preview .book-detail-cover { grid-row: 1; }
.studio-card-preview h3 { font-size: 1.18rem; line-height: 1.22; overflow-wrap: anywhere; }
.studio-card-preview .book-facts { gap: 4px; }
.studio-card-synopsis { margin-top: 16px; }
.reader.studio-reading-preview { min-height: 0; padding: 12px; }
.studio-reading-preview .chapter-heading h3 { font: 700 1.35rem/1.2 var(--serif); margin-top: 6px; }
.studio-reading-preview .reader-note { margin-top: 16px; }

@media (max-width: 800px), (max-width: 960px) and (max-height: 500px) and (pointer: coarse) {
  .studio-layout:has(.editor-work) {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    padding-bottom: var(--mobile-nav-space);
  }
  .studio-layout:has(.editor-work) > .main-shell { flex: 1; overflow: auto; scrollbar-width: none; }
  .editor-work { padding-bottom: 8px; }
  .studio-layout:has(.editor-work) .studio-content { padding-bottom: 20px; }
}

@media (max-width: 570px) {
  .editor-steps button { flex-direction: column; gap: 1px; font-size: .78rem; }
  .editor-work .book-card-fields { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .editor-work .cover-editor { grid-template-columns: 72px minmax(0, 1fr); align-items: center; }
  .editor-work #studio-cover { grid-row: 1 / span 3; }
  .editor-work .cover-editor :is(.file-label, .local-note, .text-link) { justify-self: start; text-align: left; }
  .editor-work .editor-save .form-actions { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
  .editor-work .editor-save .primary { grid-column: 1 / -1; }
  .editor-work .editor-save .button[value="draft"] { grid-column: 2; }
  .editor-work .editor-save .editor-back-step[hidden] + button { grid-column: 1 / -1; }
  .editor-previews .button { flex: 1 1 135px; padding-inline: 8px; }
  .editor-work .import-book { flex-wrap: wrap; }
}
.author-head .page-heading { margin: 0; }
.work-row .work-actions { gap: 8px; }
.work-actions .text-link { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 4px; }

@media (max-width: 560px) {
  .work-row .work-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; margin-inline: 0; }
  .work-actions .text-link { justify-content: center; }
}

