/* 提示在状态栏右侧按内容宽度收拢，保留缩放区；不改变文档区尺寸或引入 JS 测量。 */
.editor-shell {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.document-loading {
  --document-load-end: 270px;
  position: fixed;
  inset: auto var(--document-load-end) 0 auto;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 27px;
  min-width: 0;
  width: max-content;
  max-width: min(640px, calc(100% - var(--document-load-end)));
  max-height: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0 12px;
  border-top: 1px solid #d3d6de;
  background: #f3f4f7;
  color: #414955;
  font-size: 12px;
  line-height: 1.4;
}
.document-loading:focus {
  outline: none;
}
.document-load-status {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.document-load-file {
  display: flex;
  flex: 0 1 auto;
  min-width: 72px;
  max-width: 46%;
  white-space: nowrap;
}
#document-load-title {
  flex-shrink: 0;
  margin: 0;
  font: inherit;
}
#document-load-name,
#document-load-phase {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#document-load-phase {
  flex: 1;
  min-width: 0;
  color: #626b77;
  font-size: 11px;
  margin: 0;
}
#document-load-size {
  flex-shrink: 0;
  color: #737b86;
  font-size: 11px;
}
.document-load-progress {
  flex: 0 0 86px;
  height: 7px;
  overflow: hidden;
  border: 1px solid #aab1ba;
  background: #e9ecf1;
}
.document-load-progress > span {
  display: block;
  width: 45%;
  height: 100%;
  background: #637d9d;
  animation: document-load-slide 1.4s ease-in-out infinite alternate;
}
/* 保留完整辅助说明；常规状态栏不堆叠步骤、插画或长文案。 */
#document-load-hint {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
/* 旧编译页面的静态提示在模块接管前也保持底部轻量样式。 */
dialog.document-loading .document-load-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  width: 100%;
}
dialog.document-loading .document-load-art,
dialog.document-loading .document-load-eyebrow,
dialog.document-loading #document-load-steps {
  display: none;
}
.document-load-actions {
  display: flex;
  flex-shrink: 0;
  gap: 6px;
}
.document-load-actions button {
  min-height: 22px;
  padding: 1px 8px;
  border: 1px solid #bac3cf;
  font-size: 11px;
}
#document-load-retry {
  color: #185abd;
}
.document-loading[data-state="error"] {
  min-height: 35px;
  height: auto;
  padding-block: 4px;
  border-top-color: #d5bc8a;
  background: #fff9ee;
}
.document-loading[data-state="error"] #document-load-phase {
  color: #825323;
  white-space: normal;
  overflow-wrap: anywhere;
  max-height: 5.6em;
  overflow-y: auto;
}
.document-loading[data-state="error"] .document-load-progress,
.document-loading[data-state="error"] #document-load-size {
  display: none;
}
@keyframes document-load-slide {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(225%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .document-load-progress > span {
    animation: none;
    transform: translateX(60%);
  }
}
@media (max-width: 900px) {
  .document-loading {
    --document-load-end: 246px;
    gap: 8px;
    padding-inline: 6px;
    font-size: 11px;
  }
  .document-load-status {
    gap: 8px;
  }
  .document-load-file {
    max-width: 58%;
  }
  .document-load-progress {
    flex-basis: 48px;
  }
  #document-load-size {
    display: none;
  }
}
@media (max-width: 640px) {
  .document-loading {
    --document-load-end: 0px;
  }
  .document-loading[data-state="error"] .document-load-status {
    flex-wrap: wrap;
    gap: 2px 8px;
  }
  .document-loading[data-state="error"] .document-load-file {
    flex-basis: 100%;
    max-width: 100%;
  }
  .document-loading[data-state="error"] #document-load-phase {
    flex-basis: 100%;
  }
}
@media (forced-colors: active) {
  .document-loading,
  .document-load-progress,
  .document-load-actions button {
    border-color: CanvasText;
  }
  .document-loading {
    color: CanvasText;
    background: Canvas;
  }
  .document-load-progress > span {
    background: Highlight;
    forced-color-adjust: none;
  }
}
