/* Phase 1 administrator usability enhancements. */
.hero-art[data-fit="contain"] { object-fit: contain; background: var(--display-subtle); }
.hero-art[data-position="left"] { object-position: left center; }
.hero-art[data-position="right"] { object-position: right center; }
.hero-art[data-position="top"] { object-position: center top; }
.hero-art[data-position="bottom"] { object-position: center bottom; }
.hero-art[data-position="center"] { object-position: center center; }
.block-grip { cursor: grab; color: var(--display-muted); font-size: 20px; line-height: 1; user-select: none; }
.block.dragging { opacity: .5; border-style: dashed; }
.preview-device-bar { display: flex; gap: 8px; justify-content: center; margin: 0 0 16px; }
.home-preview-frame { width: 100%; margin: 0 auto; padding: 12px; border: 1px solid var(--display-border); border-radius: 12px; background: var(--bg); transition: width .2s ease; overflow: auto; }
.home-preview-frame[data-preview-size="tablet"] { width: min(768px,100%); }
.home-preview-frame[data-preview-size="mobile"] { width: min(390px,100%); }
.home-preview-page { container-type: inline-size; min-width: 0; }
.home-preview-page .home-sections { margin-top: 0; }
@container (max-width: 620px) {
  .home-preview-page .home-block { grid-column: 1/-1; }
  .home-preview-page .hero { grid-template-columns: 1fr; min-height: 0; }
  .home-preview-page .hero-art { position: static; width: 100%; height: 220px; }
  .home-preview-page .hero-copy { padding: 28px 24px; }
  .home-preview-page .cards,.home-preview-page .gallery-grid { grid-template-columns: 1fr; }
}
@media(max-width:600px) { .block-head { align-items: flex-start; } .block-head .actions { width: 100%; } }
.rich-toolbar { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; margin-top: 8px; border: 1px solid var(--display-border); border-bottom: 0; border-radius: 10px 10px 0 0; background: var(--display-subtle); }
.rich-toolbar button,.rich-toolbar select { min-height: 38px; width: auto; padding: 7px 10px; border: 1px solid var(--display-border); border-radius: 7px; background: var(--display-surface); color: var(--display-text); font-size: var(--display-small); }
.rich-toolbar button:hover { border-color: var(--display-link); color: var(--display-link); }
.rich-editor { min-height: 420px; padding: 24px; border: 1px solid var(--display-border); border-radius: 0 0 10px 10px; background: var(--display-surface); color: var(--display-text); font-size: var(--display-reading); line-height: 1.8; overflow-wrap: anywhere; }
.rich-editor:empty::before { content: attr(data-placeholder); color: var(--display-muted); }
.rich-editor h2,.prose h2 { font-size: calc(28px * var(--display-scale)); margin: 1.6em 0 .7em; }
.rich-editor h3,.prose h3 { font-size: calc(22px * var(--display-scale)); margin: 1.4em 0 .6em; }
.rich-editor table,.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; }
.rich-editor th,.rich-editor td,.prose th,.prose td { border: 1px solid var(--display-border); padding: 10px 12px; vertical-align: top; }
.rich-editor figure,.prose figure { margin: 1.8em auto; max-width: 100%; }
.rich-editor figure img,.prose figure img,.prose img[data-media] { display: block; max-width: 100%; height: auto; margin-inline: auto; border-radius: 10px; }
.rich-editor img[data-size="small"],.prose img[data-size="small"] { width: min(320px,100%); }
.rich-editor img[data-size="medium"],.prose img[data-size="medium"] { width: min(640px,100%); }
.rich-editor figcaption,.prose figcaption { margin-top: 8px; text-align: center; color: var(--display-muted); font-size: var(--display-small); }
.rich-editor blockquote,.prose blockquote { padding: 12px 18px; border-left: 4px solid var(--display-link); background: var(--display-subtle); }
@media(max-width:600px) { .rich-editor { min-height: 320px; padding: 18px 14px; } .rich-toolbar { position: static; } }
.image-editor-stage { display: grid; place-items: center; min-height: 260px; padding: 14px; border-radius: 10px; background: #111; overflow: auto; }
.image-editor-stage canvas { display: block; max-width: 100%; max-height: 58vh; width: auto; height: auto; }
.image-editor-controls { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px 20px; margin: 20px 0; }
.image-editor-controls label { min-width: 0; }
.image-editor-controls input[type="range"] { width: 100%; min-height: 34px; }
.image-editor-controls output { display: inline-block; min-width: 48px; color: var(--display-muted); font-size: var(--display-small); }
.image-editor-feedback { min-height: 24px; color: var(--display-link); }
.image-editor-feedback.error { color: var(--display-error); }
@media(max-width:600px) { .image-editor-controls { grid-template-columns: 1fr; } .image-editor-stage { min-height: 180px; } }
