/* v5.59.1: bounded, always available course editor actions. */
[data-screen="edit"] { padding-bottom: calc(var(--editor-actions-height, 126px) + 28px); }
.editor-actions-hint { max-width: 250px; font-size: 14px; line-height: 1.5; }
#course-editor-actions { position: fixed; inset: auto 0 0; z-index: 90; padding: 12px 24px calc(12px + env(safe-area-inset-bottom, 0px)); background: #fff; border-top: 1px solid #dfe2e8; box-shadow: 0 -5px 22px #292c3512; }
.course-editor-actions__inner { max-width: 1160px; margin: 0 auto; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px 24px; }
.course-editor-actions__status { min-width: 0; }
#course-editor-actions #editor-save-state { display: block; color: #34373e; font-size: 14px; font-weight: 700; line-height: 1.4; }
#course-editor-actions #editor-save-state[data-status="error"] { color: #b50025; }
#course-editor-actions #editor-save-state[data-status="saved"] { color: #187443; }
#course-editor-actions #editor-save-state[data-status="dirty"] { color: #785900; }
#editor-save-help { display: block; margin-top: 3px; color: #737c8c; font-size: 12px; line-height: 1.4; }
.course-editor-actions__buttons { display: flex; align-items: stretch; gap: 10px; }
#course-editor-actions .button { min-height: 46px; height: auto; margin: 0; white-space: normal; text-align: center; line-height: 1.25; }
#course-editor-actions .button:disabled { opacity: .55; cursor: not-allowed; }
#course-draft-preview { padding: 0; width: min(960px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); border: 1px solid #dfe2e8; border-radius: 20px; color: #34373e; background: #fff; }
#course-draft-preview::backdrop { background: #161b2a99; }
.course-draft-preview__head { position: sticky; top: 0; z-index: 1; display: flex; gap: 20px; justify-content: space-between; align-items: center; padding: 20px 28px; background: #fff; border-bottom: 1px solid #e3e5eb; }
.course-draft-preview__head p { margin: 4px 0 0; color: #737c8c; font-size: 13px; line-height: 1.5; }
.course-draft-preview__head strong { font-size: 18px; }
.course-draft-preview__head .button { flex-shrink: 0; min-height: 44px; }
.course-draft-preview__body { padding: 28px; }
.course-draft-preview__body h1 { margin: 0 0 14px; font-size: clamp(26px, 4vw, 42px); line-height: 1.15; overflow-wrap: anywhere; }
.course-draft-preview__intro { margin: 0 0 24px; color: #737c8c; font-size: 18px; line-height: 1.6; overflow-wrap: anywhere; }
.course-draft-preview__image { margin: 0 0 24px; }
.course-draft-preview__image img { display: block; width: 100%; height: auto; max-height: 420px; object-fit: contain; border-radius: 14px; }
.course-draft-preview__description { font-size: 17px; line-height: 1.65; overflow-wrap: anywhere; }
.course-draft-preview__description > :first-child { margin-top: 0; }
.course-draft-preview__description img { max-width: 100%; height: auto; }
.course-draft-preview__outline { padding-top: 24px; margin-top: 24px; border-top: 1px solid #e3e5eb; }
.course-draft-preview__outline h2 { margin: 0 0 16px; font-size: 22px; }
.course-draft-preview__outline li { margin: 9px 0; line-height: 1.5; overflow-wrap: anywhere; }
.course-draft-preview__outline .button { margin-top: 20px; white-space: normal; height: auto; min-height: 46px; }
.course-draft-preview__saved-help { margin: 10px 0 0; font-size: 13px; line-height: 1.5; color: #737c8c; }
@media(max-width: 960px) {
  .course-editor-actions__inner { grid-template-columns: 1fr; gap: 8px; }
  .course-editor-actions__buttons { display: grid; grid-template-columns: auto 1fr 1fr; }
}
@media(max-width: 600px) {
  #course-editor-actions { padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); }
  #course-editor-actions .button { min-height: 48px; padding: 10px 8px; font-size: 13px; }
  .course-editor-actions__buttons { gap: 6px; grid-template-columns: .85fr 1.1fr 1.35fr; }
  #editor-save-help { font-size: 11px; }
  #course-editor-actions #editor-save-state { font-size: 12px; }
  #course-draft-preview { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 14px; }
  .course-draft-preview__head { padding: 14px; gap: 10px; align-items: flex-start; }
  .course-draft-preview__head .button { font-size: 12px; padding: 10px; max-width: 112px; }
  .course-draft-preview__body { padding: 20px 16px; }
  .course-draft-preview__intro { font-size: 16px; }
}
