/* ============================================
 * designer.css — 问卷设计器
 * 问卷研究工作室 · 多期追踪问卷工具
 *
 * 视觉：沿用主站品牌色（深靛蓝 + 琥珀橙 + 紫罗兰），
 *       与第三方问卷平台的高饱和蓝刻意区分开。
 *       改配色只改下面 :root 里的变量。
 * 所有类名以 .dz- 前缀，避免与站点样式冲突。
 * ============================================ */

/* ============================================================
 * 问卷研究工作室 · 工具调色板
 *   主色  深靛蓝 #2c3e7a（主站 --primary）  —— 主按钮、选中态、当前页签
 *   强调  琥珀橙 #e67e22（主站 --accent）   —— 编辑、悬停高亮
 *   辅助  紫罗兰 #6c2d82（主站 --purple）   —— 条件题、逻辑跳转等"特殊状态"标记
 *   危险  砖红   #a02c2c（主站 --red）      —— 删除
 * ============================================================ */
:root {
    --st-brand:      #2c3e7a;
    --st-brand-2:    #3a5aad;
    --st-brand-3:    #1a264f;
    --st-brand-bg:   #eef1f8;
    --st-brand-bg-2: #f7f9fc;
    --st-brand-line: #c6cfe4;
    --st-accent:     #e67e22;
    --st-accent-bg:  #fdf2e6;
    --st-special:    #6c2d82;
    --st-special-bg: #f3ebf7;
    --st-danger:     #a02c2c;
    --st-danger-bg:  #fbeaea;
    --st-ink:        #2c3e50;
    --st-ink-2:      #5b6b7c;
    --st-ink-3:      #8b98a5;
    --st-ink-4:      #b6bfc9;
    --st-line:       #dfe5ec;
    --st-line-2:     #ced7e0;
    --st-bg:         #f5f7fa;
    --st-bg-2:       #fafbfc;
    --st-topbar:     #1a264f;
    --st-gold:       #e0a23a;
}

/* 进入设计器时隐藏站点自己的顶栏，让设计器铺满屏幕 */
body.dz-mode .topbar { display: none; }
body.dz-mode .app-wrap { padding: 0; max-width: none; margin: 0; min-height: 100vh; }
body.dz-mode { background: #f5f7fa; }

.dz {
    font-family: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Microsoft YaHei", "微软雅黑", sans-serif;
    font-size: 13px;
    color: var(--st-ink);
    padding-bottom: 60px;
    min-height: 100vh;
    box-sizing: border-box;
}
.dz *, .dz *::before, .dz *::after { box-sizing: border-box; }

/* ==================== 顶部深色工具条 ==================== */
.dz-bar {
    position: sticky;
    top: 0;
    z-index: 200;
    height: 42px;
    background: var(--st-topbar);
    box-shadow: 0 1px 0 0 #b6bfc9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0 0 6px;
    color: #fff;
    user-select: none;
}
.dz-bar-left { display: flex; align-items: center; height: 100%; }
.dz-bar-right { display: flex; align-items: center; height: 100%; }

.dz-bar-menu {
    width: 40px; height: 100%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: #ccc; font-size: 18px;
    background: none; border: none;
}
.dz-bar-menu:hover { color: #fff; }

.dz-bar-item {
    height: 42px; line-height: 42px;
    padding: 0 12px;
    font-size: 13px;
    color: #eef1f5;
    cursor: pointer;
    display: flex; align-items: center; gap: 5px;
    white-space: nowrap;
}
.dz-bar-item:hover { color: #fff; background: #3d3d3d; }
.dz-bar-item .dz-ico { font-size: 15px; color: #c9d2db; }
.dz-bar-item:hover .dz-ico { color: #fff; }
.dz-bar-sep { width: 1px; height: 18px; background: #4d4d4d; margin: 0 4px; }

.dz-bar-check {
    display: flex; align-items: center; gap: 6px;
    height: 42px; padding: 0 12px;
    font-size: 13px; color: #eef1f5; cursor: pointer; white-space: nowrap;
}
.dz-bar-check input { width: 14px; height: 14px; accent-color: var(--st-brand); cursor: pointer; }
.dz-bar-check:hover { color: #fff; }

.dz-btn {
    height: 42px;
    min-width: 96px;
    padding: 0 16px;
    border: none;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    font-family: inherit;
}
.dz-btn-preview { background: #fff; color: var(--st-brand); }
.dz-btn-preview:hover { background: #eef1f8; }
.dz-btn-done { background: var(--st-brand); color: #fff; }
.dz-btn-done:hover { background: #1a264f; }

/* ==================== 主体三栏 ==================== */
.dz-stage {
    /* 三栏：题型 230 + 画布 902 + 题库 280，中间两道 15px 间距 */
    max-width: 1472px;
    margin: 0 auto;
    padding: 10px 0 0;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

/* ---------- 左侧题型面板 ---------- */
.dz-left {
    width: 230px;
    flex: 0 0 230px;
    background: #fff;
    box-shadow: 0 0 4px 0 #dfdfdf;
    border-radius: 3px;
    padding: 10px 0 24px;
    position: sticky;
    top: 52px;
    max-height: calc(100vh - 62px);
    min-height: calc(100vh - 82px);
    overflow-y: auto;
    overflow-x: hidden;
}
.dz-left::-webkit-scrollbar { width: 6px; }
.dz-left::-webkit-scrollbar-thumb { background: #ced7e0; border-radius: 3px; }

.dz-tabs {
    background: #e8ecf1;
    margin: 0 10px 6px;
    padding: 3px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
}
.dz-tab {
    flex: 1;
    border-radius: 2px;
    text-align: center;
    line-height: 25px;
    color: grey;
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
}
.dz-tab:hover { color: var(--st-ink); }
.dz-tab.active {
    background: #fff;
    box-shadow: 0 0 4px 0 rgba(0, 0, 0, .2);
    color: var(--st-ink);
    font-weight: 700;
}

.dz-pane { padding: 0 6px; }
.dz-pane[hidden] { display: none; }

.dz-group { padding: 2px 0; }
.dz-group-head {
    min-height: 30px;
    line-height: 30px;
    font-size: 14px;
    font-weight: 600;
    color: #000;
    cursor: pointer;
    user-select: none;
    display: flex; align-items: center;
}
.dz-group-head .dz-caret { font-size: 11px; margin: 0 5px 0 2px; color: #5b6b7c; transition: transform .15s; }
.dz-group.collapsed .dz-caret { transform: rotate(-90deg); }
.dz-group.collapsed .dz-group-list { display: none; }
.dz-group-list { padding: 0; margin: 0; list-style: none; display: flex; flex-wrap: wrap; }
.dz-group-list li { width: 50%; }

.dz-type-item {
    display: flex; align-items: center; gap: 5px;
    height: 28px;
    padding: 0 4px;
    border-radius: 13px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dz-type-item:hover { background: var(--st-brand); color: #fff; }
.dz-type-item .dz-ti {
    font-size: 15px; color: var(--st-brand); width: 18px; text-align: center; flex: 0 0 18px;
    font-style: normal;
}
.dz-type-item:hover .dz-ti { color: #fff; }

/* 题型图标：纯 CSS 画的小符号（不依赖外部图标字体） */
.dz-ti { display: inline-flex; align-items: center; justify-content: center; }
.dz-ti svg { width: 15px; height: 15px; display: block; }


/* 题型图标：圆角色片底衬 —— 让图标成为"有重量"的色块，而不是一根根细线 */
.dz-type-item .dz-ti {
    width: 22px;
    flex: 0 0 22px;
    height: 22px;
    border-radius: 7px;
    background: var(--st-brand-bg);
    color: var(--st-brand);
    transition: background .12s, color .12s;
}
.dz-type-item .dz-ti svg { width: 14px; height: 14px; }
.dz-type-item:hover .dz-ti { background: rgba(255, 255, 255, .22); color: #fff; }

/* ---------- 题库面板 ---------- */
.dz-lib-block { margin-bottom: 14px; }
.dz-lib-title { font-size: 13px; font-weight: 600; color: #000; margin: 10px 0 6px 4px; }
.dz-lib-item {
    display: flex; align-items: center; justify-content: space-between; gap: 6px;
    padding: 8px 8px;
    margin: 0 2px 6px;
    border: 1px solid #f0f3f7;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
    color: var(--st-ink);
}
.dz-lib-item:hover { background: #f3faff; border-color: #c6cfe4; }
.dz-lib-item small { color: var(--st-ink-3); font-size: 11px; }
.dz-lib-add { color: var(--st-brand); font-size: 12px; flex: 0 0 auto; }

.dz-group-note {
    margin: 6px 4px 2px;
    padding: 6px 8px;
    font-size: 12px;
    line-height: 1.7;
    color: var(--st-ink-3);
    background: #fafbfc;
    border-radius: 3px;
}

/* ---------- 大纲面板 ---------- */
/* 顶部批量操作条：全选 / 已选计数 / 删除所选 */
.dz-ol-bar {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 4px 8px 8px;
    margin-bottom: 2px;
    border-bottom: 1px solid #eef1f5;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 3;
}
.dz-ol-bar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.dz-ol-all {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--st-ink-2);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}
.dz-ol-all input { width: 14px; height: 14px; accent-color: var(--st-brand); cursor: pointer; }
.dz-ol-count { font-size: 12px; color: var(--st-ink-3); white-space: nowrap; }
.dz-ol-batch {
    display: block;
    text-align: center;
    font-size: 12px;
    line-height: 18px;
    padding: 5px 10px;
    border: 1px solid var(--st-danger);
    color: var(--st-danger);
    border-radius: 2px;
    cursor: pointer;
    white-space: nowrap;
    transition: all .12s;
}
.dz-ol-batch:hover { background: var(--st-danger); color: #fff; }
.dz-ol-batch.disabled { border-color: #dfe5ec; color: #b6bfc9; cursor: not-allowed; }
.dz-ol-batch.disabled:hover { background: none; color: #b6bfc9; }

.dz-ol-item .dz-ol-cb {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    accent-color: var(--st-brand);
    cursor: pointer;
}
.dz-ol-item.checked { background: #eef7ff; }
.dz-ol-item.checked .dz-ol-txt { color: var(--st-brand); }
.dz-ol-item {
    display: flex; align-items: center; gap: 6px;
    padding: 7px 8px;
    font-size: 13px;
    color: var(--st-ink);
    cursor: pointer;
    border-bottom: 1px solid #f0f3f7;
}
.dz-ol-item:hover { background: #f3faff; }
.dz-ol-item.active { background: #eef1f8; color: var(--st-brand); }
.dz-ol-num { color: var(--st-ink-3); flex: 0 0 auto; }
.dz-ol-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-ol-item .dz-ol-del { margin-left: auto; color: #b6bfc9; font-size: 12px; }
.dz-ol-item .dz-ol-del:hover { color: var(--st-danger); }

/* ==================== 中间画布 ==================== */
.dz-canvas-wrap { flex: 1 1 auto; min-width: 0; }
.dz-canvas {
    width: 100%;
    background: #fff;
    border-radius: 2px;
    box-shadow: 0 2px 5px 0 var(--st-line-2);
    padding-bottom: 40px;
    min-height: 420px;
}

/* 问卷头部 */
.dz-head { padding: 10px 0 0; border-bottom: 1px solid #eef1f5; }
.dz-title-wrap { padding: 20px 60px 0; }
.dz-title {
    width: 100%;
    border: 1px solid transparent;
    background: none;
    color: var(--st-brand);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    font-family: inherit;
    resize: none;
    overflow: hidden;
    outline: none;
    padding: 4px 6px;
    border-radius: 3px;
}
.dz-title:hover { border-color: #e8ecf7; }
.dz-title:focus { border-color: #c6cfe4; background: #f7f9fc; }
.dz-title::placeholder { color: #b8c3dd; }

.dz-desc-wrap { padding: 4px 60px 0; }
.dz-desc {
    width: 100%;
    min-height: 26px;
    border: 1px solid transparent;
    border-radius: 3px;
    padding: 8px 6px;
    font-size: 15px;
    line-height: 24px;
    color: var(--st-ink);
    font-family: inherit;
    resize: none;
    overflow: hidden;
    outline: none;
    background: none;
}
.dz-desc:hover { border-color: #eef1f5; }
.dz-desc:focus { border-color: #c6cfe4; background: #f7f9fc; }
.dz-desc:empty::before { content: attr(data-placeholder); color: #b6bfc9; }

/* .dz-head-tools / .dz-head-link / .dz-head-divider 已随
   「问卷封面设置 | 效果示例」一起移除（用户要求，效果示例与顶栏「预览」重复） */

/* 题目区 */
.dz-qlist { padding: 0; }

.dz-q {
    position: relative;
    background: #fff;
    border: 1px solid transparent;
    border-top-color: #dfe5ec;
    outline: none;
    transition: background .12s;
    box-sizing: border-box;
}
.dz-q:last-child { border-bottom-color: #dfe5ec; }
.dz-q:hover { border: 1px dashed #ccc; }
.dz-q.dz-q-active { border: 1px dashed #c6cfe4; background: #f7f9fc; }
.dz-q.dz-dragging { opacity: .45; background: #fafbfc; }
.dz-q.dz-drop-target { border-top: 2px solid var(--st-brand) !important; }
.dz-q.dz-q-hidden .dz-q-title-row,
.dz-q.dz-q-hidden .dz-stemimg,
.dz-q.dz-q-hidden .dz-q-body { opacity: .4; }

.dz-q-handle {
    visibility: hidden;
    position: absolute;
    left: 50%;
    top: 0;
    margin-left: -15px;
    padding: 4px 10px;
    font-size: 15px;
    color: #b6bfc9;
    cursor: move;
    z-index: 3;
}
.dz-q:hover .dz-q-handle { visibility: visible; }
.dz-q-handle:hover { color: var(--st-brand); }

.dz-q-inner { padding: 40px 60px 15px; position: relative; font-size: 14px; }
.dz-q.dz-q-page .dz-q-inner { padding: 28px 60px 10px; }
.dz-q.dz-q-open .dz-q-inner { padding-bottom: 12px; }

/* 题目标题 */
.dz-q-title-row { display: flex; align-items: flex-start; position: relative; font-size: 17px; }
.dz-q-req {
    position: absolute; right: 100%; top: 3px; margin-right: 4px;
    color: #c0392b; font-weight: 700;
}
.dz-q-req.off { visibility: hidden; }
.dz-q-num { white-space: nowrap; color: var(--st-ink); margin-right: 4px; line-height: 1.52; }
.dz-q-num.off { display: none; }

/* 题目状态标签：常驻在标题右侧，一眼扫出整份问卷的设置。
   ★ 只在设计器里渲染，受测者作答页没有这些元素。
   ★ 这些标签原来挤在悬停操作条里，会和右边的操作按钮抢位置、把菜单弄乱；
     现在统一上移到标题行，操作条只留操作。 */
.dz-flag {
    flex: 0 0 auto;
    align-self: flex-start;
    margin-left: 6px;
    margin-top: 4px;
    padding: 1px 7px;
    border-radius: 9px;
    font-size: 12px;
    line-height: 1.6;
    white-space: nowrap;
    user-select: none;
    cursor: help;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* 影响分数方向的：最醒目 */
.dz-flag-reverse {
    color: #fff;
    background: #d9363e;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(217, 54, 62, .3);
}
.dz-flag-noscore {
    color: #8a6d3b;
    background: #fdf2e6;
    border: 1px solid #f0d9b8;
}
/* 归属哪个分数：弱一档的蓝，不与红标抢注意力 */
.dz-flag-dim {
    color: var(--st-brand);
    background: var(--st-brand-bg);
    border: 1px solid var(--st-brand-line);
}
/* 逻辑状态：细边框 + 白底，最轻 */
.dz-flag-jump {
    color: var(--st-brand);
    background: #fff;
    border: 1px solid var(--st-brand-line);
}
.dz-flag-cond {
    color: #e67e22;
    background: #fff;
    border: 1px solid #f0d0ae;
}
.dz-flag-hidden {
    color: var(--st-ink-3);
    background: #fff;
    border: 1px solid var(--st-line-2);
}
.dz-q-title {
    flex: 1 1 auto;
    min-height: 26px;
    border: 1px solid transparent;
    border-radius: 3px;
    padding: 0 4px;
    font-size: 17px;
    line-height: 1.52;
    color: var(--st-ink);
    outline: none;
    cursor: text;
    word-break: break-word;
    white-space: pre-wrap;
}
.dz-q-title:hover { border-color: #eef1f5; }
.dz-q-title:focus { border-color: #ccc; background: #fff; }
.dz-q-title:empty::before { content: attr(data-placeholder); color: #b6bfc9; }

.dz-q-desc {
    margin: 4px 0 0 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--st-ink-3);
    border: 1px solid transparent;
    border-radius: 3px;
    padding: 2px 4px;
    outline: none;
    min-height: 20px;
    white-space: pre-wrap;
}
.dz-q-desc:hover { border-color: #eef1f5; }
.dz-q-desc:focus { border-color: #ccc; background: #fff; }
.dz-q-desc:empty::before { content: attr(data-placeholder); color: #c9d2db; }

/* 题干区预览 */
.dz-q-body { margin-top: 8px; padding-left: 0; }

.dz-optgroup { display: flex; flex-wrap: wrap; }
.dz-optgroup.col2 .dz-opt { width: 50%; }
.dz-optgroup.col3 .dz-opt { width: 33.33%; }
.dz-opt {
    display: flex; align-items: flex-start;
    min-height: 38px;
    padding: 10px 10px 8px 0;
    font-size: 15px;
    color: var(--st-ink-2);
    width: 100%;
}
.dz-opt-mark {
    flex: 0 0 auto;
    width: 18px; height: 18px;
    margin: 1px 14px 0 12px;
    border: 1px solid #a3aeb9;
    background: #fff;
    box-shadow: 0 1px 0 0 rgba(0, 0, 0, .08);
    position: relative;
}
.dz-opt-mark.radio { border-radius: 50%; }
.dz-opt-mark.check { border-radius: 3px; }
.dz-opt-mark.radio.on { border: 5px solid var(--st-brand); }
.dz-opt-mark.check.on { background: var(--st-brand); border-color: var(--st-brand); }
.dz-opt-mark.check.on::after {
    content: ''; position: absolute; left: 5px; top: 1px;
    width: 4px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.dz-opt-label { flex: 0 1 auto; min-width: 24px; max-width: calc(100% - 60px); outline: none; border: 1px solid transparent; border-radius: 3px; padding: 0 3px; line-height: 1.5; word-break: break-word; }
.dz-opt-label:hover { border-color: #eef1f5; }
.dz-opt-label:focus { border-color: #ccc; background: #fff; }
.dz-opt-tools { visibility: hidden; display: flex; gap: 8px; margin-left: 6px; flex: 0 0 auto; padding-top: 2px; }
.dz-opt:hover .dz-opt-tools { visibility: visible; }
.dz-opt-tools i { cursor: pointer; color: #b6bfc9; font-style: normal; font-size: 13px; }
.dz-opt-tools i:hover { color: var(--st-brand); }
.dz-opt-tools i.del:hover { color: var(--st-danger); }

.dz-add-opt {
    display: inline-flex; align-items: center; gap: 5px;
    margin: 6px 12px 4px;
    color: var(--st-brand);
    font-size: 13px;
    cursor: pointer;
}
.dz-add-opt:hover { text-decoration: underline; }

/* 其他题型预览 */
.dz-prev-input {
    width: 320px; height: 36px; line-height: 36px;
    border: 1px solid #ced7e0; border-radius: 2px;
    padding: 0 10px; color: #b6bfc9; font-size: 14px; background: #fff;
    margin-left: 12px;
}
.dz-prev-area { width: 100%; max-width: 560px; height: 76px; border: 1px solid #ced7e0; border-radius: 2px; padding: 8px 10px; color: #b6bfc9; font-size: 14px; margin-left: 12px; resize: none; }
.dz-prev-select { width: 260px; height: 36px; border: 1px solid #ced7e0; border-radius: 2px; padding: 0 8px; color: #5b6b7c; font-size: 14px; background: #fff; margin-left: 12px; }

.dz-scale-row { display: flex; align-items: flex-start; gap: 6px; padding: 6px 0 2px; margin-left: 4px; flex-wrap: wrap; }
.dz-scale-legend { font-size: 13px; color: var(--st-ink-3); line-height: 26px; }
.dz-scale-legend.left { margin-right: 8px; }
.dz-scale-legend.right { margin-left: 8px; }
.dz-scale-dots { display: flex; align-items: flex-start; gap: 26px; padding: 0 12px; flex-wrap: wrap; }
.dz-scale-dot { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.dz-scale-dot span {
    width: 26px; height: 26px; border-radius: 50%;
    border: 1px solid #ced7e0; background: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; color: var(--st-ink-2);
}
.dz-scale-anchor { font-size: 11px; color: #a3aeb9; max-width: 64px; text-align: center; line-height: 1.3; }

.dz-matrix-wrap { width: 100%; overflow-x: auto; }
.dz-matrix { min-width: 360px; width: 100%; border-collapse: collapse; margin-top: 4px; }
.dz-matrix th, .dz-matrix td { border: 1px solid #e4e9f0; padding: 8px 10px; font-size: 13px; }
.dz-matrix th { background: #f4f4f4; font-weight: 600; color: var(--st-ink-2); text-align: center; }
.dz-matrix td.rowhead { background: #fafbfd; font-weight: 600; color: var(--st-ink-2); }
.dz-matrix td { text-align: center; color: var(--st-ink-3); }

.dz-stars { display: flex; gap: 6px; align-items: center; margin-left: 12px; }
.dz-stars i { font-style: normal; font-size: 26px; color: #ced7e0; }
.dz-stars i.on { color: #ffb400; }

.dz-gapfill { margin-left: 12px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--st-ink-2); }
.dz-gapfill .blank { display: inline-block; min-width: 90px; border-bottom: 1px solid #b6bfc9; padding: 0 6px; color: #b6bfc9; }

.dz-page-sep { display: flex; align-items: center; padding: 16px 0; }
.dz-page-sep span { font-size: 14px; color: var(--st-ink-3); }
.dz-page-sep em { font-style: normal; flex: 1; border-top: 1px dashed #dfe5ec; margin-left: 12px; }

.dz-paragraph-prev { font-size: 14px; line-height: 1.7; color: var(--st-ink-2); white-space: pre-wrap; }

/* 悬停操作条 */
.dz-q-opbar {
    visibility: hidden;
    line-height: 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 6px;
    min-height: 26px;
}
.dz-q:hover .dz-q-opbar, .dz-q-open .dz-q-opbar { visibility: visible; }
.dz-q-opbar-left { display: flex; align-items: center; gap: 16px; font-size: 12px; }
.dz-opbar-link { color: var(--st-brand); cursor: pointer; }
.dz-opbar-link:hover { text-decoration: underline; }
.dz-tip-insert { color: var(--st-ink-3); font-size: 12px; }

.dz-stuff { display: flex; align-items: center; margin: 0; padding: 0; list-style: none; }
.dz-stuff li {
    font-size: 12px;
    border: 1px solid #b1b1b1;
    border-radius: 2px;
    background: #fff;
    margin: 0 3px;
    position: relative;
}
.dz-stuff li:hover { border-color: var(--st-brand-2); }
.dz-stuff li > a {
    display: flex; align-items: center; gap: 2px;
    height: 24px; line-height: 24px;
    padding: 0 6px;
    color: var(--st-ink-2);
    text-decoration: none;
    cursor: pointer;
}
.dz-stuff li > a:hover { color: var(--st-brand-2); }
.dz-stuff li.li_edit > a { color: var(--st-accent); }
.dz-stuff li.li_edit:hover { border-color: var(--st-accent); }
.dz-stuff li.li_del:hover { border-color: var(--st-danger); }
.dz-stuff li.li_del:hover > a { color: var(--st-danger); }
.dz-stuff .dz-pl {/* 便捷悬浮菜单占位 */}
.dz-stuff li .dz-ico { font-size: 14px; }

/* .dz-tail / .dz-tail-btn（画布底部的"拖动左侧题型…添加一道题"）已按用户要求移除 */

/* 空状态 */
.dz-empty { padding: 60px 20px; text-align: center; color: #b6bfc9; font-size: 14px; }

/* ==================== 右侧悬浮栏 ==================== */
/* 模板模式横幅：明确告诉用户"这里存的是模板，不会创建问卷" */
.dz-tplbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 7px 16px;
    background: #2c3e7a;
    color: #fff;
    font-size: 13px;
}
.dz-tplbar b { color: #ffd98a; }
.dz-tplbar-hint { flex: 1 1 auto; color: rgba(255, 255, 255, .78); font-size: 12px; }
.dz-tplbar-close {
    flex: 0 0 auto;
    padding: 3px 12px;
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 12px;
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
}
.dz-tplbar-close:hover { background: rgba(255, 255, 255, .16); }

/* ---------- 右侧题库卡片栏 ----------
   题库从左侧页签独立出来放这里，以后超管会成体系地往这里放整套问卷模板。 */
.dz-right {
    width: 280px;
    flex: 0 0 280px;
    background: #fff;
    box-shadow: 0 0 4px 0 #dfdfdf;
    border-radius: 3px;
    position: sticky;
    top: 52px;
    max-height: calc(100vh - 62px);
    min-height: calc(100vh - 82px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 20px;
}
.dz-right::-webkit-scrollbar { width: 6px; }
.dz-right::-webkit-scrollbar-thumb { background: #ced7e0; border-radius: 3px; }
.dz-right-head {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--st-ink);
    background: var(--st-bg);
    border-bottom: 1px solid #e8ecf1;
    border-radius: 3px 3px 0 0;
    position: sticky;
    top: 0;
    z-index: 2;
}
.dz-right-pane { padding: 10px 12px 0; }

/* 题库检索框：模板多了以后靠它找 */
.dz-lib-count {
    font-style: normal;
    font-weight: 400;
    margin-left: 6px;
    font-size: 12px;
    color: var(--st-ink-3);
}
.dz-lib-search-wrap { position: relative; margin: 0 2px 8px; }
.dz-lib-search {
    width: 100%;
    height: 30px;
    padding: 0 26px 0 10px;
    border: 1px solid var(--st-line);
    border-radius: 15px;
    font-size: 13px;
    color: var(--st-ink);
    font-family: inherit;
    background: var(--st-bg-2);
    outline: none;
}
.dz-lib-search:focus { border-color: var(--st-brand); background: #fff; }
.dz-lib-search::-webkit-search-cancel-button { display: none; }
.dz-lib-search-clear {
    position: absolute;
    right: 8px; top: 50%;
    transform: translateY(-50%);
    width: 16px; height: 16px; line-height: 16px;
    text-align: center;
    border-radius: 50%;
    background: var(--st-line-2);
    color: #fff;
    font-size: 10px;
    cursor: pointer;
}
.dz-lib-search-clear:hover { background: var(--st-ink-3); }
.dz-lib-item mark { background: #fff3bf; color: inherit; padding: 0 1px; border-radius: 2px; }

/* ---------- 模板预览弹层 ---------- */
.dz-pv-head {
    padding: 2px 2px 12px;
    border-bottom: 1px solid var(--st-line);
    margin-bottom: 12px;
}
.dz-pv-name { font-size: 16px; font-weight: 600; color: var(--st-ink); }
.dz-pv-desc { font-size: 13px; color: var(--st-ink-2); margin-top: 4px; }
.dz-pv-stat { font-size: 12px; color: var(--st-ink-3); margin-top: 6px; }
.dz-pv-stat b { color: var(--st-brand); }

.dz-pv-list { max-height: 54vh; overflow-y: auto; padding-right: 4px; }
.dz-pv-list::-webkit-scrollbar { width: 6px; }
.dz-pv-list::-webkit-scrollbar-thumb { background: var(--st-line-2); border-radius: 3px; }

.dz-pv-item {
    padding: 10px 12px;
    border: 1px solid var(--st-line);
    border-radius: 4px;
    margin-bottom: 8px;
    background: #fff;
}
.dz-pv-item.par { background: var(--st-bg-2); border-style: dashed; }
.dz-pv-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 14px;
    color: var(--st-ink);
    line-height: 1.5;
}
.dz-pv-title b { font-weight: 600; }
.dz-pv-type {
    flex: 0 0 auto;
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 9px;
    background: var(--st-brand-bg, #eef2fb);
    color: var(--st-brand);
}
.dz-pv-flag {
    flex: 0 0 auto;
    font-style: normal;
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 9px;
    background: var(--st-bg);
    color: var(--st-ink-3);
}
.dz-pv-flag.rev { background: #fdecec; color: var(--st-danger); }
.dz-pv-meta { font-size: 12px; color: var(--st-ink-3); margin-top: 5px; }
.dz-pv-opts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.dz-pv-opts span {
    font-size: 12px;
    padding: 2px 9px;
    border: 1px solid var(--st-line);
    border-radius: 3px;
    color: var(--st-ink-2);
    background: var(--st-bg-2);
}
.dz-pv-sep {
    text-align: center;
    font-size: 12px;
    color: var(--st-ink-4);
    margin: 12px 0;
    letter-spacing: 1px;
}

/* ---------- 回到顶部（右下方浮动按钮）---------- */
.dz-totop {
    position: fixed;
    right: 26px;
    bottom: 30px;
    width: 42px;
    height: 42px;
    border: 1px solid var(--st-line-2);
    border-radius: 50%;
    background: #fff;
    color: var(--st-ink-2);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(44, 62, 122, .16);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .18s, transform .18s, visibility .18s, color .12s, border-color .12s;
    z-index: 260;
}
.dz-totop.show { opacity: 1; visibility: visible; transform: none; }
.dz-totop:hover { color: var(--st-brand); border-color: var(--st-brand-line); background: var(--st-brand-bg); }

/* ==================== 题目设置面板 ==================== */
.dz-q-panel {
    border-top: 1px dashed #dfe5ec;
    background: #fafbfc;
    padding: 14px 60px 18px;
    font-size: 13px;
}
.dz-panel-tabs { display: flex; gap: 18px; border-bottom: 1px solid #e8ecf1; margin-bottom: 12px; }
.dz-panel-tab {
    padding: 6px 2px 8px;
    cursor: pointer;
    color: var(--st-ink-3);
    border-bottom: 2px solid transparent;
    font-size: 13px;
}
.dz-panel-tab:hover { color: var(--st-brand); }
.dz-panel-tab.active { color: var(--st-brand); border-bottom-color: var(--st-brand); font-weight: 600; }
.dz-panel-body { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.dz-field { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.dz-field > label { color: var(--st-ink-2); flex: 0 0 auto; min-width: 62px; }
.dz-field-block { display: block; width: 100%; }
.dz-field-block > label { display: block; margin-bottom: 6px; color: var(--st-ink-2); }
.dz-input, .dz-select, .dz-textarea {
    border: 1px solid #ced7e0;
    border-radius: 2px;
    padding: 5px 8px;
    font-size: 13px;
    font-family: inherit;
    color: var(--st-ink);
    outline: none;
    background: #fff;
}
.dz-input:focus, .dz-select:focus, .dz-textarea:focus { border-color: var(--st-brand); }
.dz-input { width: 200px; }
.dz-textarea { width: 100%; min-height: 84px; resize: vertical; line-height: 1.7; }
.dz-select { min-width: 130px; }
.dz-check { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; color: var(--st-ink-2); }
.dz-check input { accent-color: var(--st-brand); width: 14px; height: 14px; }

/* 开关组：每一行整行都是 <label>，点文字也能切换
   （避免出现「字段名点了没反应」的死文字） */
.dz-field.dz-switches {
    flex-wrap: wrap;
    gap: 8px 18px;
}
.dz-field > label.dz-switch { min-width: 0; }
.dz-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--st-ink-2);
    cursor: pointer;
    user-select: none;
    line-height: 1.5;
}
.dz-switch input { width: 14px; height: 14px; accent-color: var(--st-brand); cursor: pointer; flex: 0 0 auto; }
.dz-switch:hover { color: var(--st-brand); }
.dz-hint { color: var(--st-ink-3); font-size: 12px; line-height: 1.7; }
.dz-btn-mini {
    border: 1px solid #ced7e0; background: #fff; color: var(--st-ink-2);
    border-radius: 2px; padding: 4px 10px; font-size: 12px; cursor: pointer; font-family: inherit;
}
.dz-btn-mini:hover { border-color: var(--st-brand); color: var(--st-brand); }
.dz-btn-mini.danger:hover { border-color: var(--st-danger); color: var(--st-danger); }
.dz-btn-mini.primary { background: var(--st-brand); border-color: var(--st-brand); color: #fff; }
.dz-btn-mini.primary:hover { background: #1a264f; color: #fff; }

.dz-jump-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.dz-jump-row .dz-select { min-width: 150px; }

.dz-optradio { display: inline-flex; border: 1px solid #ced7e0; border-radius: 2px; overflow: hidden; }
.dz-optradio span { padding: 4px 12px; cursor: pointer; font-size: 12px; color: var(--st-ink-2); background: #fff; }
.dz-optradio span + span { border-left: 1px solid #ced7e0; }
.dz-optradio span.active { background: var(--st-brand); color: #fff; }

/* ==================== 弹层 / 抽屉 ==================== */
.dz-mask {
    position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 400;
    display: flex; align-items: center; justify-content: center;
}
.dz-modal {
    background: #fff; border-radius: 3px; width: 520px; max-width: 92vw;
    max-height: 86vh; display: flex; flex-direction: column;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .2);
}
.dz-modal.wide { width: 720px; }
.dz-modal-head {
    height: 46px; display: flex; align-items: center; justify-content: space-between;
    padding: 0 18px; border-bottom: 1px solid #eef1f5; font-size: 15px; font-weight: 600;
}
.dz-modal-close { cursor: pointer; color: #b6bfc9; font-size: 18px; line-height: 1; }
.dz-modal-close:hover { color: var(--st-danger); }
.dz-modal-body { padding: 18px; overflow-y: auto; flex: 1 1 auto; }
.dz-modal-foot { padding: 12px 18px; border-top: 1px solid #eef1f5; display: flex; justify-content: flex-end; gap: 10px; }

.dz-recycle-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 4px; border-bottom: 1px solid #f0f3f7; font-size: 13px; color: var(--st-ink-2);
}
.dz-recycle-item .dz-recycle-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: 12px; }

.dz-toast {
    position: fixed; left: 50%; top: 60px; transform: translateX(-50%);
    background: rgba(0, 0, 0, .8); color: #fff; padding: 8px 18px; border-radius: 3px;
    font-size: 13px; z-index: 900; pointer-events: none;
}

/* 菜单下拉 */
.dz-menu-pop {
    /* ★ 必须是 fixed：顶栏是 sticky 的，滚动时要跟顶栏一起走；
       用 absolute 会留在文档原位、越滚越远（位置由 JS 用 getBoundingClientRect 直接给） */
    position: fixed; z-index: 300; background: #fff; border-radius: 3px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .18); padding: 6px 0; min-width: 168px;
}
.dz-menu-pop div {
    padding: 8px 16px; font-size: 13px; color: var(--st-ink); cursor: pointer; white-space: nowrap;
}
.dz-menu-pop div:hover { background: #f3faff; color: var(--st-brand); }
.dz-menu-pop .dz-menu-sep { height: 1px; background: #eef1f5; padding: 0; margin: 4px 0; cursor: default; }
.dz-menu-pop .dz-menu-sep:hover { background: #eef1f5; }
/* 只读信息行（例如「当前版本 v30」） */
.dz-menu-pop .dz-menu-info {
    padding: 8px 16px;
    font-size: 12px;
    color: var(--st-ink-3);
    cursor: default;
    background: #fafbfc;
}
.dz-menu-pop .dz-menu-info:hover { background: #fafbfc; color: var(--st-ink-3); }

/* ==================== 问卷分数计算（画布最下方） ==================== */
.dz-score {
    margin: 0;
    border-top: 1px solid #dfe5ec;
    background: #fafbfc;
    padding: 22px 60px 26px;
}
.dz-score-head { margin-bottom: 14px; }
.dz-score-title { display: block; font-size: 15px; font-weight: 600; color: var(--st-ink); margin-bottom: 4px; }
.dz-score-sub { display: block; font-size: 12px; line-height: 1.8; color: var(--st-ink-3); }
.dz-score-sub b { color: var(--st-brand); font-weight: 600; }

.dz-score-empty {
    padding: 14px 16px;
    background: #fff;
    border: 1px dashed #ced7e0;
    border-radius: 3px;
    font-size: 13px;
    line-height: 1.8;
    color: var(--st-ink-3);
}
.dz-score-empty .dz-btn-mini { margin-top: 8px; }

.dz-score-node {
    background: #fff;
    border: 1px solid #e8ecf1;
    border-radius: 3px;
    margin-bottom: 10px;
    overflow: hidden;
}
.dz-score-node.lv2 {
    margin: 0 0 8px 0;
    border-color: #eef3f8;
    background: #fcfdff;
}
.dz-score-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    flex-wrap: wrap;
}
.dz-score-node.lv2 .dz-score-row { padding: 8px 12px; }
.dz-score-children {
    padding: 0 12px 4px 34px;
    border-left: 2px solid #eef1f8;
    margin-left: 20px;
}

.dz-score-tag {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 8px;
    border-radius: 2px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: var(--st-brand);
}
.dz-score-tag.lv2 { background: #8ea4d6; }

.dz-score-name {
    width: 240px;
    height: 30px;
    padding: 0 8px;
    font-size: 14px;
}
.dz-score-node.lv2 .dz-score-name { height: 28px; font-size: 13px; width: 220px; }

.dz-score-pick {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 10px;
    border: 1px solid #ced7e0;
    border-radius: 2px;
    background: #fff;
    cursor: pointer;
    font-size: 12px;
    color: var(--st-ink-2);
    transition: all .12s;
}
.dz-score-pick:hover { border-color: var(--st-brand); color: var(--st-brand); }
.dz-score-pick b { font-weight: 500; color: var(--st-brand); }
.dz-score-pick em { font-style: normal; color: var(--st-ink-3); }
.dz-score-pick:hover em { color: var(--st-brand); }

.dz-score-max { font-size: 12px; color: var(--st-ink-3); }
.dz-score-del {
    margin-left: auto;
    color: #b6bfc9;
    font-size: 14px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 2px;
}
.dz-score-del:hover { color: var(--st-danger); background: #fbeaea; }

.dz-score-foot {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.dz-score-stat { font-size: 12px; color: var(--st-ink-3); }

/* 题目选择弹层 */
.dz-pick-tools { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.dz-pick-count { font-size: 12px; color: var(--st-ink-3); }
.dz-pick-list {
    max-height: 380px;
    overflow-y: auto;
    border: 1px solid #eef1f5;
    border-radius: 3px;
}
.dz-pick-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid #f7f9fb;
    font-size: 13px;
    color: var(--st-ink);
    cursor: pointer;
}
.dz-pick-row:last-child { border-bottom: none; }
.dz-pick-row:hover { background: #f7fcff; }
.dz-pick-row.disabled { opacity: .5; cursor: not-allowed; }
.dz-pick-row input { accent-color: var(--st-brand); width: 14px; height: 14px; cursor: pointer; }
.dz-pick-no { color: var(--st-ink-3); flex: 0 0 auto; min-width: 22px; }
.dz-pick-title { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-pick-type, .dz-pick-max { flex: 0 0 auto; font-size: 12px; color: var(--st-ink-3); }
.dz-pick-note { flex: 0 0 auto; font-size: 12px; color: var(--st-accent); }

/* 计算公式总览 */
.dz-formula-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--st-ink);
    margin-bottom: 10px;
    padding-left: 8px;
    border-left: 3px solid var(--st-brand);
}
.dz-formula-node {
    border: 1px solid #e8ecf1;
    border-radius: 3px;
    padding: 10px 12px;
    margin-bottom: 8px;
}
.dz-formula-node.lv2 { margin: 8px 0 0 26px; background: #fcfdff; border-color: #eef3f8; }
.dz-formula-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.dz-formula-max { font-size: 12px; color: var(--st-ink-3); }
.dz-formula-qs { margin-top: 6px; font-size: 12px; line-height: 1.8; color: var(--st-ink-3); word-break: break-word; }

/* ==================== 题干配图（实验图片材料） ==================== */

/* 画布里的题干配图（属于标题栏，居中，位于题目说明之上） */
.dz-stemimg {
    margin: 10px auto;
    text-align: center;
}
.dz-stemimg img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
    border-radius: 2px;
    background: #fafbfc;
    border: 1px solid #eef1f5;
}

/* 设置面板里的题干配图控件 */
.dz-stemimg-empty {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 12px;
    background: #fff;
    border: 1px dashed #ced7e0;
    border-radius: 3px;
}
.dz-stemimg-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 8px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 3px;
}
.dz-stemimg-thumb {
    width: 120px;
    height: 90px;
    object-fit: contain;
    background: #fafbfc;
    border: 1px solid #eee;
    border-radius: 2px;
    flex: 0 0 auto;
}
.dz-stemimg-ctl { flex: 1 1 auto; min-width: 0; }
.dz-stemimg-btns { display: flex; gap: 8px; margin-bottom: 10px; }
.dz-stemimg-ctl .dz-field { margin-bottom: 0; }

/* ==================== 图片评分题（一组图逐张评分） ==================== */
/* 画布预览：每张图竖向排列，图大、居中；图下按维度逐排刻度 */
.dz-imgblock { position: relative; }
.dz-imggrid { display: block; }
.dz-imgitem {
    position: relative;
    max-width: 460px;
    margin: 0 auto 14px;
    border: 1px solid var(--st-line);
    border-radius: 4px;
    padding: 12px 12px 14px;
    background: #fff;
}
.dz-imgitem:last-child { margin-bottom: 0; }
.dz-imgitem img {
    display: block;
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    background: var(--st-bg-2);
    border-radius: 3px;
}
.dz-imgitem-name {
    margin: 8px 0 2px;
    font-size: 12px;
    color: var(--st-ink-2);
    text-align: center;
}
.dz-dimrow {
    padding-top: 8px;
    margin-top: 6px;
    border-top: 1px dashed var(--st-line);
}
.dz-dimrow:first-of-type { border-top: none; }
.dz-dimname {
    font-size: 12px;
    color: var(--st-ink);
    font-weight: 600;
    text-align: center;
    margin-bottom: 6px;
}
.dz-imgitem-no {
    position: absolute;
    left: 18px; top: 18px;
    min-width: 18px; height: 18px; line-height: 18px;
    text-align: center;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    border-radius: 9px;
    font-size: 11px;
}
.dz-imgitem-del {
    position: absolute;
    right: 18px; top: 18px;
    width: 18px; height: 18px; line-height: 18px;
    text-align: center;
    background: rgba(0, 0, 0, .45);
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    cursor: pointer;
    visibility: hidden;
}
.dz-imgitem:hover .dz-imgitem-del { visibility: visible; }
.dz-imgitem-del:hover { background: var(--st-danger); }
.dz-imgdots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.dz-imgdot {
    width: 22px; height: 22px; border-radius: 50%;
    border: 1px solid var(--st-line-2); background: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; color: var(--st-ink-2);
}
.dz-imgstars { display: flex; gap: 3px; justify-content: center; font-size: 17px; color: #d8dfe7; }
.dz-imglegend {
    display: flex; justify-content: space-between;
    margin-top: 3px; font-size: 11px; color: var(--st-ink-3);
}
.dz-imgempty {
    padding: 14px 16px;
    background: #fff;
    border: 1px dashed var(--st-line-2);
    border-radius: 3px;
    font-size: 13px;
    line-height: 1.8;
    color: var(--st-ink-3);
}
.dz-imgblock .dz-btn-mini { margin-top: 10px; }

/* 设置面板：评分维度卡片 */
.dz-dimcard {
    border: 1px solid var(--st-line);
    border-radius: 3px;
    padding: 8px 10px 10px;
    background: #fff;
    margin-bottom: 8px;
}
.dz-dimcard-head { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.dz-dimcard-no { flex: 0 0 auto; font-size: 12px; color: var(--st-ink-3); }
.dz-dimcard-head .dz-input { flex: 1 1 auto; width: auto; }
.dz-dimcard-ends { display: flex; gap: 8px; }
.dz-dimcard-ends .dz-input { flex: 1 1 auto; width: auto; }

/* 图片评分题（设置面板里的图片列表） */
.dz-imgrow {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid #f0f3f7;
}
.dz-imgrow img {
    width: 46px; height: 46px;
    object-fit: contain;
    background: #fafbfc;
    border: 1px solid #eee;
    border-radius: 2px;
    flex: 0 0 auto;
}
.dz-imgrow-no { flex: 0 0 auto; min-width: 16px; color: var(--st-ink-3); font-size: 12px; }
.dz-imgrow .dz-input { flex: 1 1 auto; width: auto; }
.dz-imgadd-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }

/* ==================== 选项分值（逐选项计分，仿问卷星） ==================== */
.dz-scorerows { margin-top: 4px; }
.dz-scorerow {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px 6px 6px;
    border: 1px solid var(--st-line);
    border-radius: 2px;
    background: #fff;
    margin-bottom: 8px;
}
.dz-scorerow:hover { border-color: #a9b6d6; }
.dz-scorerow-handle {
    flex: 0 0 auto;
    color: #c2cbd5;
    cursor: grab;
    font-size: 13px;
    letter-spacing: -1px;
    user-select: none;
    padding: 0 2px;
}
.dz-scorerow-handle:hover { color: var(--st-brand); }
.dz-scorerow-handle:active { cursor: grabbing; }
.dz-scorerow-mark {
    flex: 0 0 auto;
    width: 14px; height: 14px;
    border: 1px solid #bcc5cf;
    background: #fff;
}
.dz-scorerow-mark.radio { border-radius: 50%; }
.dz-scorerow-mark.check { border-radius: 2px; }
.dz-scorerow-text {
    flex: 1 1 auto;
    min-width: 0;
    height: 30px;
    padding: 0 8px;
    border: 1px solid transparent;
    border-radius: 2px;
    background: transparent;
    font-size: 13px;
    color: var(--st-ink);
    font-family: inherit;
}
.dz-scorerow-text:hover { border-color: var(--st-line); background: #fafbfc; }
.dz-scorerow-text:focus { outline: none; border-color: var(--st-brand); background: #fff; }
.dz-scorerow-score {
    flex: 0 0 auto;
    width: 64px;
    height: 30px;
    padding: 0 8px;
    border: 1px solid var(--st-line);
    border-radius: 2px;
    font-size: 13px;
    text-align: center;
    color: var(--st-ink);
    font-family: inherit;
}
.dz-scorerow-score:focus { outline: none; border-color: var(--st-brand); }
.dz-scorerow-score::-webkit-outer-spin-button,
.dz-scorerow-score::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.dz-scorerow-score { -moz-appearance: textfield; }
.dz-scorerow-unit { flex: 0 0 auto; color: var(--st-ink-3); font-size: 12px; }
.dz-scorerow-btn {
    flex: 0 0 auto;
    color: #b6bfc9;
    cursor: pointer;
    font-size: 13px;
    padding: 2px 5px;
    border-radius: 2px;
    line-height: 1;
}
.dz-scorerow-btn:hover { color: var(--st-brand); background: #eef1f8; }
.dz-scorerow-btn.danger:hover { color: var(--st-danger); background: #fbeaea; }
.dz-scorerow-dragging { opacity: .45; }
.dz-scorerow-over { border-color: var(--st-brand); box-shadow: 0 0 0 2px rgba(0, 149, 255, .12); }
.dz-scorerow-add {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid var(--st-line);
    border-radius: 2px;
    background: #fff;
    color: var(--st-ink-2);
    font-size: 13px;
    cursor: pointer;
}
.dz-scorerow-add:hover { border-color: var(--st-brand); color: var(--st-brand); }

/* ==================== 分数解释编辑 ==================== */
.dz-score-interp {
    flex: 0 0 auto;
    font-size: 12px;
    color: var(--st-brand);
    border: 1px solid var(--st-brand-line);
    background: #fff;
    border-radius: 10px;
    padding: 1px 9px;
    cursor: pointer;
    white-space: nowrap;
}
.dz-score-interp:hover { background: var(--st-brand-bg); }
.dz-score-interp.on {
    color: #fff;
    background: var(--st-brand);
    border-color: var(--st-brand);
}

.dz-interp-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.dz-interp-num { width: 84px; flex: 0 0 84px; text-align: center; }
.dz-interp-dash { color: var(--st-ink-3); flex: 0 0 auto; }
.dz-interp-text { flex: 1 1 auto; width: auto; min-width: 0; }
.dz-interp-list { min-height: 30px; }
.dz-interp-warn {
    margin-top: 8px;
    padding: 8px 12px;
    font-size: 12px;
    line-height: 1.8;
    color: #8a6d3b;
    background: #fdf2e6;
    border: 1px solid #f0d9b8;
    border-radius: 3px;
}

/* ==================== 响应式 ==================== */
@media (max-width: 1500px) {
    /* 三栏挤不下时先把右侧题库拦住（它不参与编辑，收起代价最小） */
    .dz-right { display: none; }
}
@media (max-width: 1260px) {
    .dz-stage { max-width: 100%; padding: 10px 8px 0; gap: 10px; }
}
@media (max-width: 900px) {
    .dz-stage { flex-direction: column; align-items: stretch; }
    .dz-left { position: static; width: 100%; flex: none; max-height: none; min-height: 0; }
    .dz-right { display: block; position: static; width: 100%; flex: none; max-height: none; min-height: 0; }
    .dz-canvas-wrap { width: 100%; min-width: 0; }
    .dz-group-list li { width: 33.33%; }
    .dz-title-wrap, .dz-desc-wrap { padding-left: 18px; padding-right: 18px; }
    .dz-q-inner { padding: 22px 18px 12px; }
    .dz-q-panel { padding: 12px 18px 16px; }
    .dz-score { padding: 16px 18px 20px; }
    .dz-score-name, .dz-score-node.lv2 .dz-score-name { width: 100%; }
    .dz-score-children { padding-left: 12px; margin-left: 0; }
    .dz-score-del { margin-left: 0; }
    .dz-bar-item.dz-hide-sm { display: none; }
    .dz-optgroup.col2 .dz-opt, .dz-optgroup.col3 .dz-opt { width: 100%; }
    .dz-prev-input, .dz-prev-area, .dz-prev-select { width: 100%; max-width: 100%; margin-left: 0; }
    .dz-scale-dots { gap: 14px; padding: 0 4px; }
    .dz-q-req { position: static; margin-right: 2px; }
    .dz-q-opbar { flex-wrap: wrap; flex-direction: column; align-items: flex-start; gap: 6px; }
    .dz-stuff { flex-wrap: wrap; row-gap: 5px; }
    .dz-page-sep { margin: 0 18px !important; }
}
@media (max-width: 640px) {
    /* 手机端只保留「菜单 / 预览 / 完成编辑」，其余入口收进 ☰ 菜单 */
    .dz-bar-item, .dz-bar-check { display: none; }
    .dz-bar-menu { width: 34px; }
    .dz-btn { min-width: 76px; padding: 0 10px; font-size: 13px; }
    .dz-group-list li { width: 50%; }
}
