/* 沿用 C1 中性纸面与细边框；全部规则限定在查看器实例内。 */
.mv-viewer .ed-stage { display: flex; padding: 28px; }
.mv-viewer .ed-canvas-card { width: 100%; padding: 0; min-height: 0; background: #fff; }
.mv-viewer .ed-toolbar { grid-template-columns: minmax(190px, 1fr) auto minmax(180px, 1fr); }
.mv-viewer .ed-toolbar-center { gap: 6px; }
.mv-viewer[data-surface-kind="html"] .ed-file-badge { flex-basis: 38px; }
.mv-viewer .mv-button { min-height: 34px; padding-inline: 11px; }
.mv-viewer [hidden] { display: none !important; }
.mv-statistics { font-variant-numeric: tabular-nums; }
.mv-zoom-value { min-width: 48px; text-align: center; color: #4c555c; font-size: 12px; font-variant-numeric: tabular-nums; }
.mv-viewer[data-surface-kind="media"] .ed-canvas-card { display: flex; background: #e9edee; overflow: hidden; border: 1px solid #d8dfe0; box-shadow: none; }
.mv-image-stage { position: relative; display: grid; place-items: center; width: 100%; height: calc(100dvh - 160px); min-height: 340px; overflow: hidden; touch-action: none; cursor: grab; background-color: #edf0f0; }
.mv-image-stage[data-checkerboard="true"] { background-image: conic-gradient(#e0e5e6 25%, transparent 0 50%, #e0e5e6 0 75%, transparent 0); background-size: 24px 24px; }
.mv-image-stage.mv-dragging { cursor: grabbing; }
.mv-image-object { position: absolute; max-width: none; border: 0; pointer-events: none; user-select: none; transform-origin: center; box-shadow: 0 12px 40px #102f3520; }
.mv-diagnostic { align-self: center; margin: 24px; padding: 20px 24px; border: 1px solid #dcbab2; border-radius: 8px; background: #fff5f1; color: #713c2e; white-space: pre-wrap; overflow-wrap: anywhere; }
.mv-diagnostic p { margin-bottom: 0; }
.mv-media-stage { display: grid; place-items: center; width: 100%; min-height: calc(100dvh - 160px); padding: 48px 28px; background: #eff2f1; }
.mv-player-panel { width: min(100%, 880px); }
.mv-player { display: block; width: 100%; max-height: 57vh; border-radius: 12px; background: #172520; }
audio.mv-player { background: transparent; height: 54px; margin-top: 32px; }
.mv-audio-art { display: grid; place-items: center; width: 160px; height: 160px; margin: 0 auto; background: #dce7df; border: 1px solid #bdcfc2; border-radius: 28px; color: #345e4c; font: 64px Georgia, serif; }
.mv-viewer .mv-audio-title { text-align: center; margin: 24px 0 0; font-size: 20px; }
.mv-media-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.mv-media-card { display: flex; flex-direction: column; gap: 12px; padding: 16px 20px; background: #fff; border: 1px solid #dce2de; border-radius: 8px; font-size: 12px; color: #55645b; }
.mv-media-card output { line-height: 34px; font-size: 18px; color: #263e31; font-variant-numeric: tabular-nums; }
.mv-volume { width: 100%; height: 34px; accent-color: #305d48; }
.mv-select { max-width: 100%; min-height: 34px; padding: 6px 10px; background: #fff; border: 1px solid #cdd5d1; border-radius: 6px; color: #263e31; font: inherit; font-size: 13px; }
.mv-fallback { max-width: 500px; padding: 40px; background: #fff; border: 1px solid #d9e0db; border-radius: 12px; text-align: center; }
.mv-viewer .mv-fallback h2 { margin-top: 20px; font-size: 20px; line-height: 1.5; }
.mv-fallback p { font-size: 14px; }
.mv-media-mark { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #e9efea; color: #345d47; font-size: 30px; }
.mv-fallback .mv-button { margin-top: 12px; }
.mv-viewer[data-surface-kind="archive"] .ed-canvas-card { max-width: 1040px; align-self: flex-start; border: 1px solid #dce1e5; }
.mv-search { width: 220px; min-width: 140px; min-height: 34px; border: 1px solid #cdd5da; border-radius: 6px; padding: 7px 12px; background: #f8fafb; color: #263640; font: inherit; font-size: 13px; }
.mv-archive { width: 100%; }
.mv-archive-heading { padding: 28px 32px 24px; }
.mv-viewer .mv-archive-heading h2 { margin: 0 0 8px; font-size: 23px; font-weight: 600; }
.mv-archive-heading p { margin: 0; font-size: 13px; }
.mv-tree-columns { display: flex; justify-content: space-between; padding: 10px 28px; border-block: 1px solid #e3e7e9; color: #5c666d; background: #f8fafb; font-size: 12px; }
.mv-tree { min-height: 350px; padding: 16px 24px 32px; }
.mv-tree-row { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px; border-radius: 5px; color: #34424c; font-size: 14px; }
summary.mv-tree-row { cursor: pointer; list-style: none; }
summary.mv-tree-row::before { content: '›'; width: 8px; color: #647782; }
.mv-folder[open] > summary::before { content: '⌄'; }
.mv-tree-row:hover { background: #f1f5f6; }
button.mv-tree-row { width: 100%; border: 0; background: transparent; text-align: left; cursor: pointer; }
.mv-archive-preview { margin: 0 8px 8px; padding: 12px; border: 1px solid #e3e7e9; border-radius: 6px; }
.mv-archive-preview h3, .mv-archive-preview p { margin: 0; overflow-wrap: anywhere; font-size: 13px; }
.mv-archive-preview pre { margin: 8px 0 0; max-height: 320px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: 13px/1.6 var(--ed-font-mono, monospace); }
.mv-tree-children { margin-left: 16px; padding-left: 12px; border-left: 1px solid #e3e8eb; }
.mv-file-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.mv-file-size { flex-shrink: 0; color: #67717a; font-size: 12px; font-variant-numeric: tabular-nums; }
.mv-file-symbol { display: grid; place-items: center; width: 24px; height: 24px; background: #ecf2f5; border-radius: 4px; color: #496b80; }
.mv-warning { padding: 16px 24px; border-bottom: 1px solid #e6c785; background: #fff1cf; color: #785013; line-height: 1.7; font-size: 14px; }
.mv-empty { padding: 32px; text-align: center; }
.mv-viewer[data-surface-kind="html"] .ed-stage { padding: 24px; }
.mv-viewer[data-surface-kind="html"] .ed-canvas-card { overflow: hidden; background: #e5e9e8; box-shadow: none; border: 1px solid #cdd5d1; }
.mv-html { min-width: 0; width: 100%; }
.mv-preview-viewport { width: 100%; min-height: calc(100dvh - 150px); overflow: auto; }
.mv-preview-frame { display: block; width: 100%; height: calc(100dvh - 150px); min-height: 600px; margin-inline: auto; border: 0; background: #fff; box-shadow: 0 0 0 1px #cbd4cf; }
.mv-button[aria-pressed="true"] { background: #e5ece7; color: #284c37; border-color: #a5bbac; }
.mv-source { display: grid; grid-template-columns: minmax(160px, 1fr) auto; align-items: center; gap: 12px; padding: 16px; background: #f7f9f8; }
.mv-source-note { color: #5f6e64; font-size: 12px; }
.mv-code { grid-column: 1 / -1; width: 100%; min-height: calc(100dvh - 235px); resize: vertical; padding: 24px; border: 1px solid #d2dbd5; border-radius: 6px; color: #253e30; background: #fff; font: 13px/1.8 var(--ed-font-mono, monospace); tab-size: 2; white-space: pre; overflow: auto; }
@media (max-width: 1200px) {
  .mv-viewer .ed-toolbar { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .mv-viewer .ed-toolbar-center { grid-row: 2; grid-column: 1 / -1; }
  .mv-viewer .ed-toolbar-end { grid-row: 1; grid-column: 2; }
}
@media (max-width: 700px) {
  .mv-viewer .ed-toolbar { grid-template-columns: minmax(0, 1fr); }
  .mv-viewer .ed-toolbar-end { grid-row: 3; grid-column: 1; }
  .mv-viewer .ed-stage, .mv-viewer[data-surface-kind="html"] .ed-stage { padding: 12px; }
  .mv-viewer .mv-button, .mv-viewer .ed-tab, .mv-viewer .mv-select, .mv-viewer .mv-search { min-height: 44px; }
  .mv-viewer .mv-button { min-width: 44px; }
  .mv-viewer .ed-statusbar { flex-wrap: wrap; gap: 4px; }
  .mv-image-stage { min-height: 400px; height: calc(100dvh - 265px); }
  .mv-media-stage { padding: 32px 16px; min-height: 530px; }
  .mv-media-cards { gap: 6px; }
  .mv-media-card { padding: 12px 8px; }
  .mv-fallback { padding: 24px; }
  .mv-search { width: 190px; }
  .mv-archive-heading { padding: 24px 20px; }
  .mv-tree { padding: 12px 8px; }
  .mv-tree-row { gap: 6px; }
  .mv-tree-children { margin-left: 8px; padding-left: 8px; }
  .mv-tree-columns { padding-inline: 16px; }
  .mv-source { grid-template-columns: minmax(0, 1fr); padding: 10px; }
  .mv-code { padding: 12px; min-height: 500px; }
}

/* 普通页面填满正文，不附加编辑器画布边框与设备预览尺寸。 */
.mv-direct-page { height: 100%; min-height: 0; }
.mv-direct-page .ed-workspace, .mv-direct-page .ed-stage, .mv-direct-page .ed-canvas-card,
.mv-direct-page .mv-html, .mv-direct-page .mv-preview-viewport { height: 100%; min-height: 0; }
.mv-viewer.mv-direct-page .ed-stage { padding: 0; }
.mv-viewer.mv-direct-page .ed-canvas-card { border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.mv-direct-page .mv-preview-frame { height: 100%; min-height: 0; box-shadow: none; }
.mv-direct-page .mv-image-stage { height: 100%; min-height: 0; }
.mv-direct-page .mv-image-stage { cursor: auto; touch-action: auto; background: #fff; }

/* 视频产物页面让原生播放器占满可用画布，保持视频比例。 */
.mv-direct-video { height: 100%; min-height: 0; }
.mv-direct-video .ed-workspace, .mv-direct-video .ed-stage, .mv-direct-video .ed-canvas-card { height: 100%; min-height: 0; overflow: hidden; }
.mv-viewer.mv-direct-video .ed-stage { padding: 0; }
.mv-viewer.mv-direct-video .ed-canvas-card { border: 0; border-radius: 0; box-shadow: none; background: #000; }
.mv-direct-video .mv-media-stage { height: 100%; min-height: 0; grid-template-rows: minmax(0, 1fr); padding: 0; background: #000; }
.mv-direct-video .mv-player-panel { display: flex; width: 100%; height: 100%; min-height: 0; max-width: none; padding: 0; border: 0; border-radius: 0; background: #000; box-shadow: none; }
.mv-direct-video .mv-player { display: block; width: 100%; height: 100%; max-height: none; object-fit: contain; border-radius: 0; }

/* 音频产物页面只呈现居中的原生音频控件。 */
.mv-direct-audio { height: 100%; min-height: 0; }
.mv-direct-audio .ed-workspace, .mv-direct-audio .ed-stage, .mv-direct-audio .ed-canvas-card { height: 100%; min-height: 0; }
.mv-viewer.mv-direct-audio .ed-stage { padding: 0; }
.mv-viewer.mv-direct-audio .ed-canvas-card { border: 0; border-radius: 0; box-shadow: none; background: #fff; }
.mv-direct-audio .mv-media-stage { height: 100%; min-height: 0; padding: 24px; background: #fff; }
.mv-direct-audio .mv-player-panel { width: min(100%, 640px); }
.mv-direct-audio audio.mv-player { margin: 0; }

/* 图片身份由产品外框提供，查看器工具保持单行且可横向滚动。 */
.mv-image-viewer .ed-toolbar { grid-template-columns: minmax(0, 1fr); }
.mv-image-viewer .ed-toolbar-center { grid-row: 1; grid-column: 1; justify-content: center; }
@media (max-width: 700px) {
  .mv-image-viewer .ed-toolbar-center { justify-content: flex-start; }
}

/* —— 图片查看器：没有顶部工具栏，图片占满舞台；底部居中的悬浮条负责缩放。滚轮以指针为中心缩放，双击在适应窗口与 100% 之间切换，拖动平移。—— */
.mv-image-viewer { position: relative; height: 100dvh; min-height: 320px; overflow: hidden; background: #ececee; }
.ed-shell.mv-image-viewer .ed-workspace, .ed-shell.mv-image-viewer .ed-stage, .ed-shell.mv-image-viewer .ed-canvas-card { display: flex; flex: 1; width: 100%; max-width: none; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: hidden; }
.mv-image-viewer .mv-image-stage { height: 100%; min-height: 0; background: #ececee; outline: none; }
.mv-image-viewer .mv-image-stage[data-checkerboard="true"] { background-image: none; }
.mv-image-viewer .mv-image-object { box-shadow: 0 0 0 1px #0000000f, 0 2px 6px #0000001a, 0 18px 44px -18px #00000047; background: #fff; }
.mv-image-viewer .mv-image-stage[data-checkerboard="true"] .mv-image-object { background: conic-gradient(#dfe1e5 25%, #fff 0 50%, #dfe1e5 0 75%, #fff 0) 0 0 / 16px 16px; }
.mv-image-bar { position: absolute; left: 50%; bottom: 20px; z-index: 20; display: flex; align-items: center; gap: 2px; padding: 5px 8px; transform: translateX(-50%); border-radius: 14px; background: #1d2029f2; color: #eceef3; box-shadow: 0 2px 6px #0000002e, 0 14px 32px -10px #0000006b; backdrop-filter: blur(10px); white-space: nowrap; }
.mv-image-bar .mv-button { min-height: 30px; min-width: 30px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; color: #eceef3; font: 500 12px/20px var(--ed-font); }
.mv-image-bar .mv-button:hover { background: #ffffff24; color: #fff; }
.mv-image-bar .mv-button[aria-pressed="true"] { background: #ffffff2e; color: #fff; }
.mv-image-bar .mv-button svg { display: block; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mv-image-bar .mv-zoom-value { min-width: 52px; padding: 5px 4px; border-radius: 8px; color: #fff; cursor: pointer; }
.mv-image-bar .mv-zoom-value:hover { background: #ffffff24; }
.mv-image-bar-divider { flex: none; width: 1px; height: 18px; margin: 0 6px; background: #ffffff2b; }
.mv-image-bar .mv-statistics { margin-left: 8px; padding-left: 12px; border-left: 1px solid #ffffff2b; color: #b9bdc9; font: 12px/20px var(--ed-font); font-variant-numeric: tabular-nums; }
.mv-direct-page .mv-image-bar { display: none; }
.mv-direct-page.mv-image-viewer { height: auto; background: #fff; }
.mv-direct-page.mv-image-viewer .mv-image-object { box-shadow: none; }
@media (max-width: 700px) { .mv-image-bar { bottom: 12px; max-width: calc(100% - 16px); overflow-x: auto; } .mv-image-bar .mv-statistics { display: none; } }
