/* PPT 图形导出 SVG —— 工具页样式 */
.file-name { color: var(--ink-2); font-size: 13px; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 打开文件 ---------- */
.drop { max-width: 720px; margin: 48px auto 0; padding: 0 16px; }
.drop-box {
    display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 48px 24px;
    border: 2px dashed var(--line); border-radius: 16px; background: var(--panel); cursor: pointer; text-align: center;
    transition: border-color .15s, background .15s;
}
.drop-box:hover, .drop-box.over { border-color: var(--accent); background: var(--accent-soft); }
.drop-icon { color: var(--accent); }
.drop-title { font-size: 18px; font-weight: 600; }
.drop-sub { color: var(--ink-2); font-size: 14px; }
.drop-notes { color: var(--ink-2); font-size: 14px; padding-left: 20px; margin-top: 24px; }
.drop-notes li { margin: 6px 0; }

.msg { margin-top: 12px; padding: 10px 14px; border-radius: 8px; font-size: 14px; background: var(--err-bg); color: var(--err-ink); }
.msg.warn { background: var(--warn-bg); color: var(--warn-ink); }
.msg ul { margin: 4px 0 0; padding-left: 18px; }

/* ---------- 工作区：左缩略图 / 中舞台 / 右部件+导出 ---------- */
.work { display: grid; grid-template-columns: 132px minmax(0, 1fr) 340px; gap: 12px; padding: 12px; height: calc(100vh - 53px); min-height: 520px; }
.slides { overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding-right: 2px; }
.thumb { position: relative; border: 2px solid transparent; border-radius: 6px; background: var(--panel); cursor: pointer; padding: 0; display: block; width: 100%; }
.thumb img { display: block; width: 100%; height: auto; border-radius: 4px; background: #fff; }
.thumb.on { border-color: var(--accent); }
.thumb .no { position: absolute; left: 4px; top: 2px; font-size: 11px; color: var(--ink-2); background: var(--panel); padding: 0 4px; border-radius: 4px; }

.center { display: flex; flex-direction: column; min-width: 0; min-height: 0; gap: 8px; }
.toolbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.toolbar .grow { flex: 1; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); cursor: pointer; user-select: none; }
.stage-wrap { flex: 1; min-height: 0; background: var(--stage); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; padding: 16px; overflow: hidden; }
.stage { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; touch-action: none; }
.stage > svg { max-width: 100%; max-height: 100%; width: auto; height: auto; background: #fff; box-shadow: var(--shadow); user-select: none; -webkit-user-select: none; }
.stage .it { cursor: pointer; }
.stage [data-s="bg"] { pointer-events: none; }
.stage.no-master [data-s="master"], .stage.no-master [data-s="layout"] { display: none; }
.stage .ov { pointer-events: none; }
.stage .ov .box { fill: none; stroke: var(--sel); vector-effect: non-scaling-stroke; stroke-width: 2; }
.stage .ov .box.sel { fill: rgba(242, 159, 5, .05); }
.stage .ov .box.hover { stroke: var(--accent); stroke-dasharray: 5 3; }
.stage .ov .marq { fill: rgba(47, 111, 222, .1); stroke: var(--accent); stroke-width: 1; vector-effect: non-scaling-stroke; }
.hint { font-size: 12px; color: var(--ink-3); }

.side { display: flex; flex-direction: column; min-height: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.side-head { display: flex; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--line); font-weight: 600; }
.side-head .count { font-weight: 400; color: var(--ink-2); font-size: 13px; }
.tree { flex: 1; min-height: 120px; overflow-y: auto; padding: 4px 0; font-size: 13px; }
.node { display: flex; align-items: center; gap: 6px; padding: 3px 10px; cursor: pointer; white-space: nowrap; }
.node:hover, .node.hover { background: var(--panel-2); }
.node .tw { width: 14px; text-align: center; color: var(--ink-3); flex: none; }
.node .nm { overflow: hidden; text-overflow: ellipsis; flex: 1; }
.node .kd { font-size: 11px; color: var(--ink-3); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; flex: none; }
.node.dim { opacity: .45; }
.node input { margin: 0; flex: none; }

.export { border-top: 1px solid var(--line); padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.export .row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.export .lbl { color: var(--ink-3); width: 32px; flex: none; }
.export .lbl2 { margin-left: 12px; width: auto; }
.seg { display: inline-flex; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { padding: 3px 9px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink-2); }
.seg input:checked + span { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }
.num { width: 64px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.preview {
    height: 140px; border-radius: 8px; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
    background-color: #fff; background-image: linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%), linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%);
    background-size: 16px 16px; background-position: 0 0, 8px 8px; overflow: hidden; color: #888; font-size: 12px;
}
.preview img { max-width: 100%; max-height: 100%; }
.actions .btn { flex: 1; }
.out-info { color: var(--ink-3); font-size: 12px; min-height: 1em; }

.busy { position: fixed; inset: 0; background: rgba(0, 0, 0, .25); display: flex; align-items: center; justify-content: center; gap: 10px; color: #fff; z-index: 10; }
.spinner { width: 22px; height: 22px; border: 3px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 窄屏：上下排 ---------- */
@media (max-width: 960px) {
    .work { grid-template-columns: minmax(0, 1fr); height: auto; }
    .slides { flex-direction: row; overflow-x: auto; overflow-y: hidden; }
    .thumb { width: 110px; flex: none; }
    .stage-wrap { height: 56vh; padding: 8px; }
    .tree { max-height: 40vh; }
}
@media (max-width: 560px) {
    .topbar .sep, .topbar .here, .file-name { display: none; }
}
@media (max-width: 480px) {
    .drop { margin-top: 24px; }
    .drop-box { padding: 32px 16px; }
    .work { padding: 8px 16px; }
}
