        :root {
            /* 专业配色方案 */
            --primary-color: #1e3a8a;
            --primary-light: #3b82f6;
            --primary-dark: #1e40af;
            --secondary-color: #64748b;
            --success-color: #059669;
            --warning-color: #d97706;
            --danger-color: #dc2626;
            --info-color: #0891b2;
            
            /* 背景和文字 */
            --bg-primary: #f8fafc;
            --bg-secondary: #f1f5f9;
            --bg-card: #ffffff;
            --text-primary: #1e293b;
            --text-secondary: #475569;
            --text-muted: #475569;
            
            /* 边框和阴影 */
            --border-color: #e2e8f0;
            --border-radius: 12px;
            --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
            --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
            --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
            
            /* 渐变 */
            --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, #2563eb 100%);
            --gradient-secondary: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
        }

        * {
            box-sizing: border-box;
        }

	        /* Bootstrap 本地资源未及时加载/Edge 缓存半失效时的关键兜底。
	           之前只兜底了 display，Edge 一旦没有正确应用 bootstrap.min.css，
	           modal 会退化成普通文档流，backdrop 覆盖整页，表现为“页面变灰、按钮错位/点击异常”。 */
	        .modal {
	            position: fixed;
	            top: 0;
	            left: 0;
	            z-index: 1055;
	            display: none;
	            width: 100%;
	            height: 100%;
	            overflow-x: hidden;
	            overflow-y: auto;
	            outline: 0;
	        }

	        .modal.show,
	        .modal[style*="display: block"] {
	            display: block;
	        }

	        .modal-dialog {
	            position: relative;
	            width: auto;
	            margin: 1.75rem auto;
	            pointer-events: none;
	        }

	        .modal-dialog-scrollable {
	            height: calc(100% - 3.5rem);
	        }

	        .modal-dialog-scrollable .modal-content {
	            max-height: 100%;
	            overflow: hidden;
	        }

	        .modal-dialog-scrollable .modal-body {
	            overflow-y: auto;
	        }

	        .modal-xl { max-width: min(1140px, calc(100vw - 2rem)); }

	        @media (max-width: 575.98px) {
	            .modal-dialog,
	            .modal-dialog.modal-xl,
	            .modal-dialog.modal-dialog-scrollable,
	            .modal-dialog.modal-dialog-centered {
	                width: 100vw;
	                max-width: 100vw;
	                min-height: 100vh;
	                margin: 0;
	            }
	        }

	        .modal-content {
	            position: relative;
	            display: flex;
	            flex-direction: column;
	            width: 100%;
	            pointer-events: auto;
	            background-color: #fff;
	            background-clip: padding-box;
	            border: 1px solid rgba(15, 23, 42, 0.12);
	            border-radius: var(--border-radius);
	            outline: 0;
	        }

	        .modal-header,
	        .modal-footer {
	            display: flex;
	            flex-shrink: 0;
	            align-items: center;
	            padding: 1rem;
	        }

	        .modal-header {
	            justify-content: space-between;
	            border-bottom: 1px solid var(--border-color);
	        }

	        .modal-footer {
	            justify-content: flex-end;
	            gap: 0.5rem;
	            border-top: 1px solid var(--border-color);
	        }

	        .modal-body {
	            position: relative;
	            flex: 1 1 auto;
	            padding: 1rem;
	        }

	        .modal-backdrop {
	            position: fixed;
	            inset: 0;
	            z-index: 1050;
	            background: rgba(15, 23, 42, 0.45);
	        }

	        .modal-backdrop:not(.show) {
	            display: none;
	        }

	        body.modal-open {
	            overflow: hidden;
	        }

	        .nav {
	            display: flex;
	            flex-wrap: wrap;
	            padding-left: 0;
	            margin-bottom: 0;
	            list-style: none;
	        }

	        .nav-tabs {
	            border-bottom: 1px solid var(--border-color);
	        }

	        .nav-tabs .nav-link {
	            margin-bottom: -1px;
	            border: 1px solid transparent;
	            border-top-left-radius: 0.5rem;
	            border-top-right-radius: 0.5rem;
	            background: transparent;
	            color: var(--text-secondary);
	        }

	        .nav-tabs .nav-link:hover {
	            border-color: var(--border-color) var(--border-color) transparent;
	        }

	        .nav-tabs .nav-link.active {
	            color: var(--primary-color);
	            background-color: #fff;
	            border-color: var(--border-color) var(--border-color) #fff;
	        }

	        .tab-content > .tab-pane,
	        .offcanvas:not(.show),
	        .collapse:not(.show) {
	            display: none;
	        }

	        .tab-content > .active,
	        .tab-pane.active,
	        .tab-pane.show.active {
	            display: block;
	        }

	        .btn-check {
	            position: absolute !important;
	            width: 1px !important;
	            height: 1px !important;
            padding: 0 !important;
            margin: -1px !important;
            overflow: hidden !important;
            clip: rect(0, 0, 0, 0) !important;
            white-space: nowrap !important;
            border: 0 !important;
            pointer-events: none !important;
        }

        .container-fluid {
            width: 100%;
            padding-right: 1.5rem;
            padding-left: 1.5rem;
            margin-right: auto;
            margin-left: auto;
        }

        .row {
            display: flex;
            flex-wrap: wrap;
            margin-right: -0.75rem;
            margin-left: -0.75rem;
        }

        .row > * {
            width: 100%;
            max-width: 100%;
            padding-right: 0.75rem;
            padding-left: 0.75rem;
        }

        @media (min-width: 768px) {
            .col-md-3 { flex: 0 0 auto; width: 25%; }
            .col-md-4 { flex: 0 0 auto; width: 33.333333%; }
            .col-md-6 { flex: 0 0 auto; width: 50%; }
        }

        @media (min-width: 992px) {
            .col-lg-4 { flex: 0 0 auto; width: 33.333333%; }
            .col-lg-8 { flex: 0 0 auto; width: 66.666667%; }
        }

        .g-2 { row-gap: 0.5rem; }
        .g-3 { row-gap: 1rem; }
        .g-4 { row-gap: 1.5rem; }
        .d-flex { display: flex !important; }
        .flex-wrap { flex-wrap: wrap !important; }
        .align-items-center { align-items: center !important; }
        .justify-content-between { justify-content: space-between !important; }
        .gap-2 { gap: 0.5rem !important; }
        .gap-3 { gap: 1rem !important; }
        .ms-auto { margin-left: auto !important; }
        .me-2 { margin-right: 0.5rem !important; }
        .mt-1 { margin-top: 0.25rem !important; }
        .mt-2 { margin-top: 0.5rem !important; }
        .mt-3 { margin-top: 1rem !important; }
        .mb-0 { margin-bottom: 0 !important; }
        .mb-1 { margin-bottom: 0.25rem !important; }
        .mb-2 { margin-bottom: 0.5rem !important; }
        .mb-3 { margin-bottom: 1rem !important; }
        .small { font-size: 0.875em; }
        .text-muted { color: var(--text-muted) !important; }
        .text-primary { color: var(--primary-color) !important; }
        .text-success { color: var(--success-color) !important; }
        .text-danger { color: var(--danger-color) !important; }

        .btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.35rem;
            /* 2026-10-21 用户反馈：「一键粘贴链接」「清空」「配置题目占比」这些
               按钮太大、标题被挤成竖排一个字一行。
               根因：.btn 是 inline-flex 且默认 nowrap，图标/标题/徽标是三个
               flex item，空间不够时标题被压到 min-content（中文一个字），
               于是出现「配/置/题/目/占/比」这种竖排。
               允许换行后：徽标换到第二行，标题保持完整可读。 */
            flex-wrap: wrap;
            padding: 0.55rem 0.9rem;
            border: 1px solid transparent;
            border-radius: 0.55rem;
            background: #fff;
            color: var(--text-primary);
            font-weight: 600;
            line-height: 1.25;
            cursor: pointer;
            text-decoration: none;
            transition: all 0.16s ease;
        }

        .btn-sm { padding: 0.35rem 0.65rem; font-size: 0.875rem; }
        .btn-primary { background: var(--primary-color); border-color: var(--primary-color); color: #fff; }
        .btn-outline-primary { border-color: var(--primary-color); color: var(--primary-color); }
        .btn-outline-secondary { border-color: var(--secondary-color); color: var(--secondary-color); }
        .btn-outline-success { border-color: var(--success-color); color: var(--success-color); }
        .btn-outline-warning { border-color: var(--warning-color); color: var(--warning-color); }
        .btn-outline-danger { border-color: var(--danger-color); color: var(--danger-color); }
        .btn:disabled { opacity: 0.65; cursor: not-allowed; }

        .form-control,
        .form-select {
            display: block;
            width: 100%;
            padding: 0.65rem 0.8rem;
            border: 1px solid var(--border-color);
            border-radius: 0.55rem;
            background: #fff;
            color: var(--text-primary);
            line-height: 1.35;
        }

        .input-group { display: flex; align-items: stretch; width: 100%; }
        .input-group > .form-control { flex: 1 1 auto; min-width: 0; }
        .badge { display: inline-block; padding: 0.25em 0.55em; border-radius: 999px; font-size: 0.75em; font-weight: 700; }
        .alert { padding: 0.75rem 1rem; border: 1px solid var(--border-color); border-radius: 0.75rem; background: #fff; }
        .progress { display: flex; overflow: hidden; background: var(--border-color); }
        .progress-bar { display: flex; flex-direction: column; justify-content: center; overflow: hidden; color: #fff; text-align: center; white-space: nowrap; }

        body {
            background: var(--bg-primary);
            color: var(--text-primary);
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            line-height: 1.6;
            min-height: 100vh;
        }

        /* 顶部导航栏 */
        .navbar {
            background: var(--bg-card);
            border-bottom: 1px solid var(--border-color);
            box-shadow: var(--shadow-sm);
            padding: 1rem 0;
        }

        .navbar-brand {
            display: flex;
            align-items: center;
            gap: 12px;
            font-weight: 700;
            font-size: 1.5rem;
            color: var(--primary-color);
        }

        .navbar-brand img {
            height: 40px;
            width: auto;
        }

        .nav-stats {
            display: flex;
            gap: 2rem;
            margin-left: auto;
        }

        .nav-actions {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            margin-left: auto;
        }

        /* 顶栏入口收进一个下拉（2026-10-19）。
           原来右上角平铺五六个按钮，占地方又挤；现在只留一个「菜单」入口。
           按钮节点本身没动，只换了容器，所以 renderBar() 的显隐逻辑照旧。 */
        .nav-menu {
            position: relative;
            display: inline-block;
        }
        .nav-menu-btn {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 0.375rem 0.75rem;
            border: 1px solid var(--border-color);
            border-radius: 20px;
            background: var(--bg-card);
            color: var(--text-primary);
            cursor: pointer;
            font-size: 0.8rem;
            white-space: nowrap;
            min-height: auto;
        }
        .nav-menu-btn:hover,
        .nav-menu-btn[aria-expanded="true"] {
            border-color: var(--primary-light);
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }
        .nav-menu-dropdown {
            position: absolute;
            top: calc(100% + 8px);
            right: 0;
            z-index: 1060;
            display: none;
            flex-direction: column;
            gap: 6px;
            min-width: 220px;
            max-width: min(84vw, 300px);
            padding: 10px;
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: var(--border-radius);
            box-shadow: var(--shadow-lg);
        }
        .nav-menu-dropdown.show {
            display: flex;
        }
        .nav-menu-dropdown .btn,
        .nav-menu-dropdown .yan-notes-toggle {
            justify-content: flex-start;
            text-align: left;
            width: 100%;
        }
        /* 游客态的紧凑入口：右上角一个「游客模式 · 登录」。 */
        .nav-guest-mode {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 0.375rem 0.75rem;
            border: 1px solid var(--border-color);
            border-radius: 20px;
            background: var(--bg-card);
            color: var(--text-primary);
            cursor: pointer;
            font-size: 0.8rem;
            white-space: nowrap;
        }
        .nav-guest-mode:hover {
            border-color: var(--primary-light);
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }
        /* 配置区的紧凑列表（2026-10-19）。
           标签固定宽度在左、控件在右；替代原来"标签在上、控件在下 + 嵌套卡片"，
           单问卷时省掉一半高度。 */
        .config-list {
            margin: 0;
            padding: 0;
        }
        .config-list > dt {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 10px 12px 2px;
            font-size: 0.86rem;
            font-weight: 700;
            color: var(--primary-color);
            background: var(--bg-secondary, #f8fafc);
        }
        .config-list > dd {
            margin: 0;
            padding: 0 12px 12px;
            background: var(--bg-secondary, #f8fafc);
        }
        .config-list > dd > * + * {
            margin-top: 6px;
        }
        @media (min-width: 768px) {
            .config-list {
                display: grid;
                grid-template-columns: max-content minmax(0, 1fr);
                align-items: start;
            }
            .config-list > dt {
                padding: 9px 14px 9px 12px;
                white-space: nowrap;
                min-height: 38px;
            }
            .config-list > dd {
                padding: 9px 12px 9px 0;
                min-height: 38px;
                display: flex;
                flex-direction: column;
                justify-content: center;
            }
        }
        /* 报告页编辑模式（2026-10-20）
           表格/图表/章节的删除按钮、标题可编辑态、工具条。 */
        .report-edit-toolbar {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }
        .report-edit-hint {
            font-size: 0.72rem;
            color: var(--text-muted, #64748b);
        }
        .report-edit-control {
            display: inline-flex;
            align-items: center;
            margin-left: 6px;
            padding: 1px 7px;
            font-size: 0.7rem;
            line-height: 1.6;
            color: #b91c1c;
            background: #fef2f2;
            border: 1px solid #fecaca;
            border-radius: 999px;
            cursor: pointer;
        }
        .report-edit-control:hover {
            background: #fee2e2;
        }
        body.report-editing-active h2[contenteditable="true"],
        body.report-editing-active h3[contenteditable="true"] {
            outline: 1px dashed var(--primary-light, #3b82f6);
            outline-offset: 3px;
            border-radius: 3px;
            cursor: text;
        }
        body.report-editing-active h2[data-edited="1"],
        body.report-editing-active h3[data-edited="1"] {
            background: #eff6ff;
        }
        .report-table-block,
        .report-figure {
            position: relative;
        }
        /* 服务器切换器 */
        .server-switcher {
            position: relative;
        }
        .server-switcher-btn {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 0.375rem 0.75rem;
            border: 1px solid var(--border-color);
            border-radius: 20px;
            background: var(--bg-card);
            cursor: pointer;
            font-size: 0.8rem;
            color: var(--text-primary);
            transition: all 0.2s;
            white-space: nowrap;
        }
        .server-switcher-btn:hover {
            border-color: var(--primary-light);
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }
        .server-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            flex-shrink: 0;
        }
        .server-dot.domestic {
            background: #059669;
        }
        .server-dot.overseas {
            background: #3b82f6;
        }
        .server-switcher-dropdown {
            position: absolute;
            top: calc(100% + 8px);
            right: 0;
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: var(--border-radius);
            box-shadow: var(--shadow-lg);
            min-width: 220px;
            z-index: 1060;
            display: none;
            overflow: hidden;
        }
        .server-switcher-dropdown.show {
            display: block;
        }
        .server-switcher-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 0.75rem 1rem;
            cursor: pointer;
            transition: background 0.15s;
            border: none;
            background: none;
            width: 100%;
            text-align: left;
            color: var(--text-primary);
        }
        .server-switcher-item:hover {
            background: var(--bg-secondary);
        }
        .server-switcher-item.active {
            background: rgba(59, 130, 246, 0.08);
        }
        .server-switcher-item .server-name {
            font-size: 0.875rem;
            font-weight: 600;
        }
        .server-switcher-item .server-url {
            font-size: 0.7rem;
            color: var(--text-muted);
        }
        .server-switcher-item .server-check {
            margin-left: auto;
            color: var(--primary-light);
            font-size: 1rem;
        }
        .server-switcher-divider {
            height: 1px;
            background: var(--border-color);
            margin: 0;
        }

        .stat-item {
            text-align: center;
            padding: 0.5rem 1rem;
            background: var(--bg-secondary);
            border-radius: var(--border-radius);
            min-width: 100px;
        }

        .stat-value {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--primary-color);
        }

        .stat-label {
            font-size: 0.75rem;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        /* 主容器 */
        .main-container {
            max-width: 1600px;
            margin: 0 auto;
            padding: 2rem;
        }

        /* 卡片设计 */
        .card {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: var(--border-radius);
            box-shadow: var(--shadow-sm);
            transition: all 0.3s ease;
            overflow: hidden;
        }

        .card:hover {
            box-shadow: var(--shadow-md);
        }

        .card-header {
            background: var(--gradient-primary);
            color: white;
            border-bottom: none;
            padding: 1.25rem 1.5rem;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .card-header i {
            font-size: 1.25rem;
        }

        .card-body {
            padding: 1.5rem;
        }

        /* 表单控件 */
        .form-label {
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 0.5rem;
            font-size: 0.875rem;
        }

        .form-control, .form-select {
            border: 2px solid var(--border-color);
            border-radius: 8px;
            padding: 0.75rem 1rem;
            font-size: 0.9375rem;
            transition: all 0.2s ease;
            background: var(--bg-card);
        }

        .form-control:focus, .form-select:focus {
            border-color: var(--primary-light);
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
            outline: none;
        }

        .form-control::placeholder {
            color: var(--text-muted);
        }

        /* 按钮设计 */
        .btn {
            font-weight: 600;
            padding: 0.75rem 1.5rem;
            border-radius: 8px;
            transition: all 0.2s ease;
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }

        .btn-primary {
            background: var(--gradient-primary);
            border: none;
            color: white;
        }

        .btn-primary:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
        }

        .btn-primary:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }

        .btn-outline-primary {
            border: 2px solid var(--primary-color);
            color: var(--primary-color);
            background: transparent;
        }

        .btn-outline-primary:hover {
            background: var(--primary-color);
            color: white;
        }

        .btn-success {
            background: var(--success-color);
            border: none;
            color: white;
        }

        .btn-danger {
            background: var(--danger-color);
            border: none;
            color: white;
        }

        /* 区域标题 */
        .section-title {
            font-size: 1rem;
            font-weight: 700;
            color: var(--primary-color);
            margin: 1.5rem 0 1rem;
            padding-bottom: 0.75rem;
            border-bottom: 2px solid var(--primary-light);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .section-title i {
            font-size: 1.125rem;
        }

        /* Excel上传区域 */
        .upload-zone {
            border: 2px dashed var(--border-color);
            border-radius: var(--border-radius);
            padding: 2.5rem;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
            background: var(--bg-secondary);
        }

        .upload-zone:hover {
            border-color: var(--primary-light);
            background: rgba(59, 130, 246, 0.05);
        }

        /* ============================================================
           按钮一致性修复（2026-10-19）
           背景：Bootstrap 5 的 .btn-outline-info / .btn-outline-light 在白色卡片上
           是「浅青/白字 on 白底」，几乎看不见；另外后面的 .btn 规则覆盖了 .btn-sm
           的紧凑内边距，导致工具栏（随机分布等）按钮被撑得过高、页面松散。
           这里统一补全语义色与尺寸，且保持与设计令牌一致。
           ============================================================ */

        /* 小按钮必须保持紧凑：.btn-sm 的声明早于 .btn，若不重复会失效 */
        .btn-sm {
            padding: 0.35rem 0.65rem !important;
            font-size: 0.875rem;
            border-radius: 6px;
            min-height: 0;
            line-height: 1.35;
        }

        .btn-group > .btn-sm { padding: 0.35rem 0.6rem !important; }

        /* 浅色/信息类变体：白色面板上必须有足够对比度 */
        .btn-outline-info {
            border: 1px solid var(--info-color);
            color: #0e7490;
            background: #fff;
        }
        .btn-outline-info:hover:not(:disabled) {
            background: #ecfeff;
            color: #155e75;
            border-color: #0e7490;
        }
        .btn-outline-light {
            border: 1px solid var(--border-color);
            color: var(--text-primary);
            background: #fff;
        }
        .btn-outline-light:hover:not(:disabled) {
            background: #f1f5f9;
            color: var(--text-primary);
        }
        .btn-outline-secondary:not(:disabled):hover {
            background: var(--bg-secondary);
            color: var(--text-primary);
        }
        .btn-info,
        .btn-warning {
            border: 1px solid transparent;
            color: #fff;
        }
        .btn-info { background: var(--info-color); border-color: var(--info-color); }
        .btn-warning { background: var(--warning-color); border-color: var(--warning-color); }
        .btn-light {
            background: #f8fafc;
            border: 1px solid var(--border-color);
            color: var(--text-primary);
        }
        .btn-secondary {
            background: var(--secondary-color);
            border-color: var(--secondary-color);
            color: #fff;
        }

        /* 「生成整卷填空答案」这类带说明的操作：说明文字另起一行，不要把工具栏撑成一整块空白 */
        .whole-text-generation-actions {
            flex: 0 1 auto;
            max-width: 520px;
            min-width: 0;
        }
        .whole-text-generation-actions #wholeTextGenerationHelp {
            font-size: 0.78rem;
            line-height: 1.4;
            color: var(--text-muted);
        }

        /* 公告图片：加载失败时不要留下破图占位（历史公告图片可能被清理） */
        .announcement-card-image[data-image-error="1"] { display: none !important; }

        /* 次要/警告描边按钮的对比度同样偏弱：加深文字与描边，避免白底上"发灰看不见" */
        .btn-outline-secondary {
            color: #334155;
            border-color: #cbd5e1;
            background: #fff;
        }
        .btn-outline-secondary:not(:disabled):hover {
            color: #1e293b;
            border-color: #94a3b8;
            background: #f8fafc;
        }
        .btn-outline-warning {
            color: #b45309;
            border-color: #f59e0b;
            background: #fff;
        }

        .upload-zone.dragover {
            border-color: var(--success-color);
            background: rgba(5, 150, 105, 0.05);
        }
        .excel-workflow-panel {
            border: 1px solid #bfdbfe;
            border-radius: 14px;
            background: linear-gradient(135deg, #eff6ff 0%, #ffffff 72%);
            padding: 14px;
            box-shadow: 0 8px 22px rgba(37, 99, 235, 0.08);
        }
        .excel-workflow-steps {
            display: grid;
            grid-template-columns: repeat(5, minmax(0, 1fr));
            gap: 8px;
        }
        .excel-workflow-step {
            border: 1px solid #dbeafe;
            border-radius: 12px;
            background: #fff;
            padding: 10px 8px;
            min-height: 72px;
        }
        .excel-workflow-step .step-index {
            width: 24px;
            height: 24px;
            border-radius: 999px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: 12px;
            margin-right: 4px;
            color: #64748b;
            background: #e2e8f0;
        }
        .excel-workflow-step.is-done {
            border-color: #86efac;
            background: #f0fdf4;
        }
        .excel-workflow-step.is-done .step-index {
            background: #16a34a;
            color: #fff;
        }
        .excel-workflow-step.is-active {
            border-color: #fbbf24;
            background: #fffbeb;
            box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.18);
        }
        .excel-workflow-step.is-active .step-index {
            background: #f59e0b;
            color: #fff;
        }
        .excel-workflow-step.is-pending {
            opacity: 0.72;
        }
        @media (max-width: 992px) {
            .excel-workflow-steps {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
        }
        @media (max-width: 576px) {
            .excel-workflow-steps {
                grid-template-columns: 1fr;
            }
        }
        .option-sort-list {
            border: 1px dashed var(--border-color);
            border-radius: 8px;
            padding: 8px;
            background: #fff;
        }
        .option-sort-item {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 6px 8px;
            margin-bottom: 6px;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            background: #f8fafc;
            cursor: move;
            user-select: none;
        }
        .option-sort-item:last-child { margin-bottom: 0; }
        .option-sort-item.dragging { opacity: .5; }
        .option-rank-badge {
            min-width: 24px;
            text-align: center;
            border-radius: 999px;
            background: var(--primary-color);
            color: #fff;
            font-size: 12px;
            padding: 2px 6px;
        }
        .reg-checklist {
            max-height: 140px;
            overflow-y: auto;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            padding: 6px;
            background: #fff;
        }
        .logic-rule-card {
            border: 1px solid rgba(59, 130, 246, 0.14);
            box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
        }
        .logic-rule-card .card-body {
            padding: 1rem 1.1rem;
        }
        .excel-config-restore-highlight {
            box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.18), 0 0.85rem 1.7rem rgba(13, 110, 253, 0.14);
            border-color: rgba(13, 110, 253, 0.5) !important;
            transition: box-shadow 0.22s ease, border-color 0.22s ease;
        }
        .logic-rule-quickbar {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: space-between;
            gap: 0.75rem;
            margin-bottom: 0.85rem;
            padding: 0.75rem 0.9rem;
            border: 1px solid var(--border-color);
            border-radius: 10px;
            background: linear-gradient(135deg, rgba(59, 130, 246, 0.06), rgba(14, 165, 233, 0.04));
        }
        .logic-rule-quickbar-title {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.9rem;
            font-weight: 600;
            color: var(--primary-color);
        }
        .logic-rule-quickbar small {
            color: var(--text-secondary);
        }
        .logic-value-panel {
            border: 1px solid var(--border-color);
            border-radius: 10px;
            background: #fff;
            padding: 0.75rem;
            min-height: 100%;
        }
        .logic-value-panel-header {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: space-between;
            gap: 0.5rem;
            margin-bottom: 0.6rem;
        }
        .logic-value-panel-title {
            font-size: 0.82rem;
            font-weight: 600;
            color: var(--text-secondary);
        }
        .logic-value-panel-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 0.35rem;
        }
        .logic-chip-grid {
            display: flex;
            flex-wrap: wrap;
            gap: 0.45rem;
        }
        .logic-chip {
            border: 1px solid var(--border-color);
            background: #fff;
            color: var(--text-secondary);
            border-radius: 999px;
            padding: 0.35rem 0.8rem;
            font-size: 0.82rem;
            line-height: 1.2;
            transition: all 0.15s ease;
            cursor: pointer;
            user-select: none;
        }
        .logic-chip:hover {
            border-color: var(--primary-light);
            color: var(--primary-color);
            background: rgba(59, 130, 246, 0.06);
        }
        .logic-chip.active {
            border-color: var(--primary-color);
            background: var(--primary-color);
            color: #fff;
            box-shadow: 0 6px 18px rgba(30, 58, 138, 0.2);
        }
        .logic-chip-empty {
            color: var(--text-muted);
            font-size: 0.82rem;
        }
        .logic-rule-summary {
            display: flex;
            flex-wrap: wrap;
            gap: 0.45rem;
            margin-bottom: 0.8rem;
        }
        .logic-summary-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            padding: 0.3rem 0.65rem;
            border-radius: 999px;
            background: rgba(15, 23, 42, 0.05);
            color: var(--text-secondary);
            font-size: 0.8rem;
        }
        .logic-summary-badge strong {
            color: var(--text-primary);
            font-weight: 600;
        }
        .logic-rule-advanced {
            border-top: 1px dashed var(--border-color);
            margin-top: 0.9rem;
            padding-top: 0.85rem;
        }
        .logic-rule-advanced summary {
            cursor: pointer;
            list-style: none;
            color: var(--primary-color);
            font-weight: 600;
            font-size: 0.88rem;
        }
        .logic-rule-advanced summary::-webkit-details-marker {
            display: none;
        }
        .logic-rule-advanced summary::before {
            content: "\F282";
            font-family: bootstrap-icons;
            margin-right: 0.45rem;
        }
        .logic-rule-advanced[open] summary::before {
            content: "\F286";
        }
        .logic-rule-helptext {
            color: var(--text-muted);
            font-size: 0.78rem;
            margin-top: 0.55rem;
        }
        .btn-ghost-sm {
            border: 1px solid var(--border-color);
            background: #fff;
            color: var(--text-secondary);
            padding: 0.25rem 0.6rem;
            border-radius: 999px;
            font-size: 0.76rem;
            font-weight: 600;
        }
        .btn-ghost-sm:hover {
            border-color: var(--primary-light);
            color: var(--primary-color);
            background: rgba(59, 130, 246, 0.06);
        }

        .upload-icon {
            font-size: 3rem;
            color: var(--primary-light);
            margin-bottom: 1rem;
        }

        /* 比例滑块 */
        .ratio-control {
            background: var(--bg-secondary);
            border-radius: var(--border-radius);
            padding: 1.5rem;
            margin: 1rem 0;
        }

        .ratio-bar {
            height: 24px;
            background: var(--border-color);
            border-radius: 12px;
            overflow: hidden;
            display: flex;
            margin-bottom: 1rem;
        }

        .ratio-segment {
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: 600;
            font-size: 0.75rem;
            transition: width 0.3s ease;
        }

        .ratio-segment.mobile { background: #3b82f6; }
        .ratio-segment.link { background: #10b981; }
        .ratio-segment.wechat { background: #8b5cf6; }

        .ratio-inputs {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 1rem;
        }

        .ratio-input-group {
            text-align: center;
        }

        .ratio-input-group label {
            display: block;
            font-size: 0.75rem;
            color: var(--text-muted);
            margin-bottom: 0.5rem;
        }

        .ratio-input {
            width: 100%;
            padding: 0.5rem;
            border: 2px solid var(--border-color);
            border-radius: 8px;
            text-align: center;
            font-weight: 600;
        }

        /* IP选择器 */
        .ip-selector {
            background: var(--bg-secondary);
            border-radius: var(--border-radius);
            padding: 1.5rem;
        }

        .ip-selector-hint {
            font-size: 0.75rem;
            color: var(--text-muted);
            margin-bottom: 1rem;
            padding: 0.5rem;
            background: rgba(59, 130, 246, 0.1);
            border-radius: 6px;
            text-align: center;
        }

        .server-egress-location {
            border: 1px solid rgba(37, 99, 235, 0.22);
            background: #f8fafc;
            border-radius: 8px;
            padding: 0.85rem 1rem;
        }

        .server-egress-location__value {
            display: flex;
            align-items: center;
            gap: 0.6rem;
            min-width: 0;
            color: #1e3a8a;
            font-weight: 700;
        }

        .server-egress-location__value span {
            min-width: 0;
            overflow-wrap: anywhere;
        }

        @media (max-width: 575.98px) {
            .server-egress-location {
                padding: 0.75rem;
            }
        }

        .selected-count {
            display: inline-block;
            background: var(--primary-color);
            color: white;
            padding: 0.25rem 0.5rem;
            border-radius: 10px;
            font-size: 0.75rem;
            margin-left: 0.5rem;
        }

        .overseas-country-multiselect .overseas-country-panel {
            position: absolute;
            top: calc(100% + 4px);
            left: 0;
            right: 0;
            z-index: 1050;
            border: 1px solid var(--border-color, rgba(0, 0, 0, 0.15));
            background: var(--bg-primary, #fff);
        }

        .overseas-country-list {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
            gap: 0.15rem 0.6rem;
            padding-right: 0.25rem;
        }

        .overseas-country-item {
            display: flex;
            align-items: center;
            gap: 0.35rem;
            font-size: 0.8rem;
            padding: 0.2rem 0.25rem;
            border-radius: 4px;
            cursor: pointer;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .overseas-country-item:hover {
            background: rgba(59, 130, 246, 0.1);
        }

        .overseas-country-item input[type="checkbox"] {
            flex: 0 0 auto;
        }

        .overseas-country-item span {
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .province-tabs {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            margin-bottom: 1rem;
        }

        .province-tab {
            padding: 0.5rem 1rem;
            background: var(--bg-card);
            border: 2px solid var(--border-color);
            border-radius: 20px;
            cursor: pointer;
            font-size: 0.875rem;
            transition: all 0.2s ease;
        }

        .province-tab:hover {
            border-color: var(--primary-light);
            background: rgba(59, 130, 246, 0.05);
        }

        .province-tab.active {
            background: var(--primary-color);
            color: white;
            border-color: var(--primary-color);
        }

        .city-grid {
            display: block;
            max-height: 540px;
            overflow-y: auto;
            padding: 0.25rem 0;
        }

        .region-ratio-toolbar {
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            align-items: flex-start;
            gap: 0.75rem;
            margin-bottom: 1rem;
            padding: 0.875rem 1rem;
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 12px;
        }

        .region-ratio-toolbar .form-check {
            margin-bottom: 0;
        }

        .region-ratio-toolbar .form-check-input:disabled + .form-check-label {
            opacity: 0.7;
        }

        .region-ratio-help {
            flex: 1 1 360px;
            font-size: 0.8125rem;
            color: var(--text-muted);
            line-height: 1.5;
        }

        .question-ip-mapping-panel {
            border: 1px solid rgba(59, 130, 246, 0.12);
            border-radius: 14px;
            background: var(--bg-card);
            overflow: hidden;
        }

        .question-ip-mapping-panel summary {
            list-style: none;
            cursor: pointer;
            padding: 0.95rem 1rem;
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 1rem;
        }

        .question-ip-mapping-panel summary::-webkit-details-marker {
            display: none;
        }

        .question-ip-mapping-panel__toggle {
            flex: 0 0 auto;
            font-size: 0.8125rem;
            color: var(--primary-color);
            font-weight: 600;
            padding-top: 0.1rem;
            white-space: nowrap;
        }

        .question-ip-mapping-panel[open] .question-ip-mapping-panel__toggle--closed {
            display: none;
        }

        .question-ip-mapping-panel:not([open]) .question-ip-mapping-panel__toggle--open {
            display: none;
        }

        .question-ip-mapping-panel__body {
            padding: 0 1rem 1rem;
        }

        .question-ip-mapping-savebar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.75rem;
            padding-top: 0.8rem;
            border-top: 1px solid rgba(59, 130, 246, 0.12);
        }

        .question-ip-mapping-savebar [role="status"] {
            line-height: 1.45;
        }

        @media (max-width: 640px) {
            .question-ip-mapping-savebar {
                align-items: stretch;
                flex-direction: column;
            }
        }

        .city-item {
            padding: 0.5rem;
            text-align: center;
            background: var(--bg-secondary);
            border-radius: 6px;
            cursor: pointer;
            font-size: 0.875rem;
            transition: all 0.2s ease;
        }

        .city-item:hover {
            background: var(--primary-light);
            color: white;
        }

        .city-item.active {
            background: var(--primary-color);
            color: white;
        }

        /* 任务列表 */
        .task-list {
            max-height: 400px;
            overflow-y: auto;
        }

        .task-item {
            background: var(--bg-secondary);
            border-radius: var(--border-radius);
            padding: 1rem;
            margin-bottom: 1rem;
            border-left: 4px solid var(--primary-light);
            cursor: pointer;
            transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
        }

        .task-item:hover {
            transform: translateY(-1px);
            box-shadow: var(--shadow-sm);
        }

        .task-item.is-selected {
            border-left-color: #2563eb !important;
            box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
        }

        .task-item.status-running { border-left-color: var(--info-color); }
        .task-item.status-scheduled { border-left-color: #f59e0b; }
        .task-item.status-paused { border-left-color: #8b5cf6; }
        .task-item.status-completed { border-left-color: var(--success-color); }
        .task-item.status-failed { border-left-color: var(--danger-color); }
        .task-item.status-cancelled { border-left-color: var(--warning-color); }

        .task-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.75rem;
        }

        /* ── Excel 数据预览弹窗：宽表必须横向滚动，不能把列压扁 ──
           问卷导出常见 50+ 列。表格没有最小宽度时，浏览器按内容分配列宽，
           会把每列压到一个字符宽：单元格文字竖排、行高涨到几千像素，
           弹窗里只剩第 1 行看得见，用户会以为「预览只有表头」。
           固定布局 + 最小宽度（由 JS 按列数算）让列宽稳定，单元格
           超长用省略号截断（title 保留全文），行高回到一行，20 行一次看全。 */
        #excelPreviewModal .table-responsive {
            max-height: 70vh;
            overflow: auto;
        }
        #excelPreviewModal table {
            table-layout: fixed;
        }
        #excelPreviewModal th,
        #excelPreviewModal td {
            max-width: 0;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            vertical-align: middle;
        }
        #excelPreviewModal thead th {
            font-weight: 600;
            background: var(--bs-light, #f8f9fa);
        }

        .task-id {
            font-size: 0.75rem;
            color: var(--text-muted);
            font-family: monospace;
        }

        .status-badge {
            padding: 0.25rem 0.75rem;
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: 600;
            text-transform: uppercase;
        }

        .status-badge.pending { background: #fef3c7; color: #92400e; }
        .status-badge.running { background: #dbeafe; color: #1e40af; }
        .status-badge.scheduled { background: #fef3c7; color: #b45309; }
        .status-badge.paused { background: #ede9fe; color: #6d28d9; }
        .status-badge.completed { background: #d1fae5; color: #065f46; }
        .status-badge.failed { background: #fee2e2; color: #991b1b; }
        .status-badge.cancelled { background: #f3e8ff; color: #6b21a8; }

        .task-url {
            font-size: 0.875rem;
            color: var(--text-secondary);
            margin-bottom: 0.5rem;
            word-break: break-all;
        }

        .task-stats {
            display: flex;
            gap: 1rem;
            flex-wrap: wrap;
            font-size: 0.75rem;
            color: var(--text-muted);
        }

        .task-meta {
            margin-top: 0.5rem;
            font-size: 0.75rem;
            color: var(--text-muted);
        }

        .task-notices {
            margin-top: 0.75rem;
            display: flex;
            flex-direction: column;
            gap: 0.45rem;
        }

        .task-notice {
            background: #fff7ed;
            border: 1px solid #fdba74;
            color: #9a3412;
            border-radius: 10px;
            padding: 0.55rem 0.7rem;
            font-size: 0.75rem;
            line-height: 1.55;
        }

        .task-action-panel {
            margin-top: 0.9rem;
            padding: 0.75rem;
            border: 1px solid rgba(148, 163, 184, 0.28);
            border-radius: 16px;
            background: rgba(255, 255, 255, 0.72);
            box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
            display: grid;
            gap: 0.65rem;
        }

        .task-action-panel.is-locked {
            border-color: rgba(248, 113, 113, 0.35);
            background: rgba(254, 242, 242, 0.72);
        }

        .task-action-group {
            display: grid;
            grid-template-columns: 82px minmax(0, 1fr);
            gap: 0.55rem;
            align-items: start;
        }

        .task-action-group-title {
            font-size: 0.72rem;
            font-weight: 700;
            color: var(--text-muted);
            line-height: 1.2;
            padding-top: 0.48rem;
            white-space: nowrap;
        }

        .task-action-row {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 0.45rem;
            min-width: 0;
        }

        .task-action-panel .btn.task-action-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.35rem;
            border-radius: 12px;
            padding: 0.4rem 0.7rem;
            min-height: 34px;
            font-size: 0.82rem;
            font-weight: 700;
            line-height: 1.15;
            white-space: nowrap;
            box-shadow: none;
        }

        .task-action-panel .btn.task-action-btn-primary {
            padding-inline: 0.9rem;
        }

        .task-action-panel .btn.task-action-btn-danger {
            border-color: rgba(239, 68, 68, 0.75);
            color: #dc2626;
            background: #fff;
        }

        .task-action-panel .btn.task-action-btn-danger:hover {
            background: #dc2626;
            border-color: #dc2626;
            color: #fff;
        }

        .task-action-hint {
            display: inline-flex;
            align-items: center;
            gap: 0.32rem;
            min-height: 32px;
            border-radius: 999px;
            background: rgba(241, 245, 249, 0.92);
            color: #64748b;
            padding: 0.35rem 0.65rem;
            font-size: 0.74rem;
            line-height: 1.3;
            max-width: 100%;
        }

        .task-action-hint.warning {
            color: #92400e;
            background: #fffbeb;
            border: 1px solid #fde68a;
        }

        .task-action-hint.danger {
            color: #991b1b;
            background: #fef2f2;
            border: 1px solid #fecaca;
        }

        @media (max-width: 640px) {
            .task-action-group {
                grid-template-columns: 1fr;
                gap: 0.35rem;
            }

            .task-action-group-title {
                padding-top: 0;
            }

            .task-action-panel .btn.task-action-btn {
                flex: 1 1 calc(50% - 0.45rem);
                min-width: 118px;
            }

            .task-action-hint {
                border-radius: 12px;
            }
        }

        .schedule-panel {
            background: var(--bg-secondary);
            border-radius: var(--border-radius);
            padding: 1rem;
            margin-bottom: 1rem;
        }

        .task-settings-shell {
            border: 1px solid rgba(148, 163, 184, 0.28);
            border-radius: 14px;
            padding: 0;
            margin-bottom: 1.25rem;
            overflow: hidden;
            background: #ffffff;
            box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
        }

        .task-settings-toolbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.75rem;
            padding: 0.75rem 1rem 0.7rem;
            background: #f8fafc;
            border-bottom: 1px solid rgba(148, 163, 184, 0.18);
        }

        .task-settings-title {
            display: flex;
            align-items: center;
            gap: 0.7rem;
            font-weight: 850;
            color: #1e3a8a;
            min-width: 0;
        }

        .task-settings-title i {
            width: 30px;
            height: 30px;
            flex: 0 0 30px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 8px;
            color: #2563eb;
            background: #eff6ff;
            border: 1px solid #bfdbfe;
            font-size: 0.9rem;
        }

        .task-settings-summary {
            display: flex;
            flex-wrap: wrap;
            justify-content: flex-end;
            gap: 0.45rem;
        }

        .task-settings-pill,
        .task-config-chip {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            border-radius: 999px;
            padding: 0.34rem 0.65rem;
            background: rgba(239, 246, 255, 0.96);
            color: #1d4ed8;
            border: 1px solid rgba(147, 197, 253, 0.65);
            font-size: 0.74rem;
            font-weight: 750;
            line-height: 1.25;
            white-space: nowrap;
        }

        .task-settings-pill.schedule-on,
        .task-config-chip.schedule-on {
            color: #7c2d12;
            background: #fff7ed;
            border-color: #fed7aa;
        }

        .task-config-chip.ip-chip-local {
            color: #334155;
            background: rgba(241, 245, 249, 0.95);
            border-color: #cbd5e1;
        }

        .task-config-chip.ip-chip-proxy {
            color: #4338ca;
            background: rgba(238, 242, 255, 0.96);
            border-color: #c7d2fe;
        }

        .task-settings-pill.schedule-off {
            color: #475569;
            background: rgba(248, 250, 252, 0.94);
            border-color: #e2e8f0;
        }

        .task-settings-cards {
            padding: 0.85rem 1rem 0.5rem;
        }

        .task-settings-cards .card {
            border-radius: 12px;
            overflow: hidden;
        }

        .task-settings-cards .card-header {
            font-size: 0.88rem;
            border-bottom-width: 1px;
        }

        .task-settings-cards .table {
            margin-bottom: 0;
        }

        .task-settings-cards .table th {
            font-size: 0.74rem;
            font-weight: 750;
            color: #64748b;
            text-transform: uppercase;
            letter-spacing: 0.02em;
            border-bottom-width: 1px;
            padding: 0.4rem 0.5rem;
        }

        .task-settings-cards .table td {
            padding: 0.45rem 0.5rem;
            vertical-align: middle;
            font-size: 0.84rem;
        }

        .task-settings-cards .table td .form-control-sm,
        .task-settings-cards .table td .form-select-sm {
            min-height: 32px;
            font-size: 0.82rem;
        }

        .task-setting-head {
            display: flex;
            align-items: flex-start;
            gap: 0.65rem;
            margin-bottom: 0.78rem;
        }

        .task-setting-icon {
            width: 32px;
            height: 32px;
            flex: 0 0 32px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 11px;
            color: #2563eb;
            background: #eff6ff;
            border: 1px solid #bfdbfe;
            font-size: 0.85rem;
        }

        .task-setting-label {
            font-size: 0.96rem;
            font-weight: 850;
            color: #0f172a;
        }

        .task-setting-help {
            margin-top: 0.12rem;
            color: #64748b;
            font-size: 0.78rem;
            line-height: 1.55;
        }

        .filltime-price-area {
            display: flex;
            flex: 1 1 460px;
            flex-direction: column;
            align-items: stretch;
            gap: 0.42rem;
            max-width: 660px;
            margin-left: auto;
            font-size: 0.78rem;
        }

        .filltime-price-summary {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 0.45rem;
            min-width: 0;
        }

        .filltime-price-current {
            display: flex;
            flex: 1 1 auto;
            align-items: center;
            justify-content: flex-end;
            flex-wrap: wrap;
            gap: 0.32rem;
            min-width: 0;
            padding: 0.42rem 0.62rem;
            border: 1px solid rgba(255, 255, 255, 0.72);
            border-radius: 6px;
            background: rgba(255, 255, 255, 0.94);
            color: #172033;
            font-weight: 800;
            line-height: 1.35;
            box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
        }

        .filltime-price-current-value {
            color: #dc2626;
            font-size: 0.92rem;
            font-weight: 900;
            white-space: nowrap;
        }

        .filltime-price-context {
            color: #1d4ed8;
            font-weight: 850;
        }

        .filltime-price-estimate {
            color: #0f766e;
            font-weight: 900;
            white-space: nowrap;
        }

        .filltime-price-toggle {
            display: inline-flex;
            flex: 0 0 auto;
            align-items: center;
            justify-content: center;
            gap: 0.3rem;
            min-height: 34px;
            padding: 0.38rem 0.58rem;
            border: 1px solid #bfdbfe;
            border-radius: 6px;
            background: #fff;
            color: #1d4ed8;
            font-size: 0.75rem;
            font-weight: 800;
            line-height: 1;
            white-space: nowrap;
        }

        .filltime-price-toggle:hover,
        .filltime-price-toggle:focus-visible {
            border-color: #60a5fa;
            background: #eff6ff;
            color: #1e40af;
        }

        .filltime-price-details {
            overflow: hidden;
            border: 1px solid #bfdbfe;
            border-radius: 6px;
            background: #fff;
            color: #172033;
            box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
        }

        .filltime-price-details[hidden] {
            display: none !important;
        }

        .filltime-price-details-head {
            padding: 0.48rem 0.62rem;
            border-bottom: 1px solid #dbeafe;
            background: #eff6ff;
            color: #1e3a8a;
            font-weight: 800;
        }

        .filltime-price-table {
            width: 100%;
            margin: 0;
            border-collapse: collapse;
        }

        .filltime-price-table th,
        .filltime-price-table td {
            padding: 0.38rem 0.62rem;
            border-bottom: 1px solid #e5e7eb;
            color: #334155;
            text-align: left;
            font-size: 0.75rem;
        }

        .filltime-price-table th:last-child,
        .filltime-price-table td:last-child {
            text-align: right;
        }

        .filltime-price-table tbody tr:last-child td {
            border-bottom: 0;
        }

        .filltime-price-table tbody tr.is-current td {
            background: #fef3c7;
            color: #92400e;
            font-weight: 850;
        }

        .filltime-price-current-mark {
            margin-left: 0.35rem;
            color: #b45309;
            font-size: 0.68rem;
            font-weight: 850;
        }

        .filltime-recommendation-box {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 0.75rem;
            margin-top: 0.65rem;
            padding: 0.7rem 0.8rem;
            border-radius: 14px;
            background: linear-gradient(135deg, rgba(239, 246, 255, 0.92), rgba(248, 250, 252, 0.96));
            border: 1px solid rgba(147, 197, 253, 0.45);
        }

        .filltime-recommendation-box.is-manual {
            background: linear-gradient(135deg, rgba(255, 247, 237, 0.96), rgba(255, 255, 255, 0.96));
            border-color: rgba(251, 191, 36, 0.45);
        }

        .filltime-recommendation-box.is-hidden {
            display: none;
        }

        .filltime-recommendation-text {
            color: #475569;
            font-size: 0.76rem;
            line-height: 1.6;
        }

        .filltime-recommendation-text strong {
            color: #1d4ed8;
        }

        .filltime-recommendation-box.is-manual .filltime-recommendation-text strong {
            color: #b45309;
        }

        .filltime-recommendation-main {
            flex: 1 1 auto;
            min-width: 0;
        }

        .filltime-recommendation-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 0.45rem;
            margin-top: 0.55rem;
        }

        .filltime-recommendation-chip {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            padding: 0.3rem 0.65rem;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.88);
            border: 1px solid rgba(191, 219, 254, 0.95);
            color: #1e3a8a;
            font-size: 0.72rem;
            font-weight: 700;
            line-height: 1.2;
        }

        .filltime-recommendation-box.is-manual .filltime-recommendation-chip {
            color: #9a3412;
            border-color: rgba(251, 191, 36, 0.55);
            background: rgba(255, 255, 255, 0.92);
        }

        .filltime-recommendation-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 0.45rem;
            justify-content: flex-end;
            flex: 0 0 auto;
            align-items: flex-end;
        }

        .filltime-recommendation-actions .btn {
            border-radius: 999px;
            white-space: nowrap;
            font-size: 0.74rem;
            font-weight: 700;
            padding: 0.3rem 0.65rem;
        }

        .filltime-strategy-control {
            min-width: 176px;
        }

        .filltime-strategy-control .form-label {
            margin-bottom: 0.25rem;
            font-size: 0.7rem;
            color: #64748b;
            font-weight: 700;
        }

        .filltime-strategy-control .form-select {
            min-width: 176px;
            border-radius: 999px;
            font-size: 0.76rem;
            font-weight: 700;
            padding-top: 0.36rem;
            padding-bottom: 0.36rem;
            background-color: rgba(255, 255, 255, 0.92);
        }

        @media (max-width: 991.98px) {
            .filltime-price-area {
                flex-basis: 100%;
                width: 100%;
                max-width: none;
                margin-left: 0;
            }

            .filltime-recommendation-box {
                flex-direction: column;
            }

            .filltime-recommendation-actions {
                width: 100%;
                justify-content: space-between;
                align-items: center;
            }
        }

        @media (max-width: 575.98px) {
            .filltime-price-summary {
                align-items: stretch;
                flex-direction: column;
            }

            .filltime-price-current {
                align-items: flex-start;
                justify-content: flex-start;
                flex-wrap: wrap;
            }

            .filltime-price-toggle {
                width: 100%;
            }

            .filltime-recommendation-actions {
                flex-direction: column;
                align-items: stretch;
            }

            .filltime-strategy-control,
            .filltime-strategy-control .form-select,
            .filltime-recommendation-actions .btn {
                width: 100%;
            }
        }

        .task-settings-shell .form-label,
        .task-runtime-settings-modal .form-label {
            font-size: 0.76rem;
            color: #334155;
            font-weight: 750;
            margin-bottom: 0.28rem;
        }

        .task-settings-shell .form-control,
        .task-settings-shell .form-select,
        .task-runtime-settings-modal .form-control,
        .task-runtime-settings-modal .form-select {
            min-height: 36px;
            border-radius: 10px;
            border-color: #dbe4f0;
            background: #fff;
            font-weight: 650;
            font-size: 0.85rem;
        }

        .task-settings-shell .form-control-sm,
        .task-settings-shell .form-select-sm {
            min-height: 32px;
            font-size: 0.82rem;
        }

        .task-settings-shell .input-group-text,
        .task-runtime-settings-modal .input-group-text {
            border-width: 2px 0;
            border-color: #dbe4f0;
            background: #f8fafc;
            color: #64748b;
            font-weight: 850;
        }

        .schedule-toggle-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 1rem;
            padding: 0.8rem 0.85rem;
            border-radius: 15px;
            background: #f8fafc;
            border: 1px solid #e2e8f0;
        }

        .schedule-toggle-row .form-check {
            margin: 0;
            min-height: auto;
        }

        .schedule-toggle-row .form-check-input {
            width: 3rem;
            height: 1.55rem;
        }

        .schedule-quick-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 0.42rem;
            margin-top: 0.55rem;
        }

        .schedule-quick-actions .btn {
            border-radius: 999px;
            font-size: 0.74rem;
            font-weight: 750;
            padding: 0.28rem 0.6rem;
        }

        .schedule-plan-hint {
            min-height: 1.1rem;
        }

        /* ── Schedule Mode Tabs ── */
        .schedule-mode-tabs {
            display: flex;
            gap: 0;
            border-bottom: 2px solid #e2e8f0;
            margin-bottom: 0.85rem;
        }

        .schedule-mode-tab {
            flex: 1 1 0;
            min-width: 0;
            padding: 0.6rem 0.75rem;
            border: none;
            background: transparent;
            color: #64748b;
            font-size: 0.82rem;
            font-weight: 750;
            cursor: pointer;
            border-bottom: 2.5px solid transparent;
            margin-bottom: -2px;
            transition: color 0.18s, border-color 0.18s;
            text-align: center;
            white-space: nowrap;
        }

        .schedule-mode-tab:hover {
            color: #1d4ed8;
        }

        .schedule-mode-tab.active {
            color: #1d4ed8;
            border-bottom-color: #2563eb;
        }

        .schedule-mode-tab i {
            margin-right: 0.3rem;
        }

        .schedule-mode-panel {
            display: none;
        }

        .schedule-mode-panel.active {
            display: block;
        }

        /* ── Period Scheduling Table ── */
        .period-table {
            width: 100%;
            border-collapse: separate;
            border-spacing: 0;
            font-size: 0.82rem;
            margin-top: 0.35rem;
        }

        .period-table th {
            background: #f1f5f9;
            color: #475569;
            font-weight: 750;
            font-size: 0.74rem;
            padding: 0.5rem 0.55rem;
            text-align: center;
            border-bottom: 1px solid #e2e8f0;
            white-space: nowrap;
        }

        .period-table th:first-child {
            border-radius: 10px 0 0 0;
        }

        .period-table th:last-child {
            border-radius: 0 10px 0 0;
        }

        .period-table td {
            padding: 0.4rem 0.35rem;
            text-align: center;
            vertical-align: middle;
            border-bottom: 1px solid #f1f5f9;
        }

        .period-table td .form-control,
        .period-table td .form-select {
            min-height: 36px;
            border-radius: 8px;
            font-size: 0.78rem;
            font-weight: 650;
            padding: 0.25rem 0.45rem;
            text-align: center;
        }

        .period-table td input[type="time"] {
            min-height: 36px;
            border-radius: 8px;
            border: 1px solid #dbe4f0;
            font-size: 0.78rem;
            font-weight: 650;
            padding: 0.2rem 0.35rem;
            text-align: center;
            width: 100%;
            background: #fff;
        }

        .period-table .period-delete-btn {
            border: none;
            background: transparent;
            color: #94a3b8;
            cursor: pointer;
            font-size: 1rem;
            padding: 0.25rem;
            border-radius: 8px;
            transition: color 0.15s, background 0.15s;
        }

        .period-table .period-delete-btn:hover {
            color: #ef4444;
            background: #fef2f2;
        }

        .add-period-btn {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            margin-top: 0.65rem;
            padding: 0.45rem 0.9rem;
            border: 1.5px dashed #93c5fd;
            border-radius: 12px;
            background: rgba(239, 246, 255, 0.6);
            color: #2563eb;
            font-size: 0.8rem;
            font-weight: 750;
            cursor: pointer;
            transition: border-color 0.15s, background 0.15s;
        }

        .add-period-btn:hover {
            border-color: #2563eb;
            background: #eff6ff;
        }

        .period-summary-bar {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 0.6rem;
            margin-top: 0.65rem;
            padding: 0.55rem 0.85rem;
            border-radius: 12px;
            background: #f8fafc;
            border: 1px solid #e2e8f0;
            font-size: 0.78rem;
            color: #475569;
            font-weight: 700;
        }

        .period-summary-bar .period-summary-item {
            display: inline-flex;
            align-items: center;
            gap: 0.3rem;
        }

        .period-summary-bar .period-summary-item i {
            color: #2563eb;
        }

        .period-summary-bar .period-summary-divider {
            width: 1px;
            height: 14px;
            background: #e2e8f0;
        }

        @media (max-width: 768px) {
            .period-table {
                font-size: 0.75rem;
            }
            .period-table th,
            .period-table td {
                padding: 0.35rem 0.25rem;
            }
            .period-table td .form-control,
            .period-table td .form-select,
            .period-table td input[type="time"] {
                font-size: 0.72rem;
                min-height: 32px;
            }
            .schedule-mode-tab {
                font-size: 0.76rem;
                padding: 0.5rem 0.45rem;
            }
        }

        .task-edit-modal-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 1rem;
        }

        .task-runtime-settings-modal .modal-content {
            border: 0;
            border-radius: 22px;
            overflow: hidden;
            box-shadow: 0 24px 72px rgba(15, 23, 42, 0.22);
        }

        .task-runtime-settings-modal .modal-header {
            background:
                radial-gradient(circle at top left, rgba(59, 130, 246, 0.22), transparent 36%),
                linear-gradient(135deg, #f8fafc, #ffffff);
            border-bottom-color: rgba(148, 163, 184, 0.18);
        }

        .task-edit-modal-hero {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 1rem;
            padding: 0.85rem 0.95rem;
            border-radius: 18px;
            background: linear-gradient(135deg, #eff6ff, #faf5ff);
            border: 1px solid rgba(147, 197, 253, 0.62);
            margin-bottom: 1rem;
        }

        .task-edit-modal-card {
            border: 1px solid rgba(148, 163, 184, 0.22);
            border-radius: 18px;
            padding: 0.95rem;
            background: rgba(255, 255, 255, 0.94);
            box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
        }

        .task-edit-modal-card-title {
            display: flex;
            align-items: center;
            gap: 0.45rem;
            font-weight: 850;
            color: #0f172a;
            margin-bottom: 0.8rem;
        }

        .task-config-chips {
            display: flex;
            flex-wrap: wrap;
            gap: 0.4rem;
            margin-top: 0.55rem;
        }

        .task-config-chip {
            background: #f8fafc;
            color: #475569;
            border-color: #e2e8f0;
        }

        @media (max-width: 1200px) {
            .task-settings-cards {
                padding: 0.75rem 0.85rem 0.4rem;
            }
        }

        @media (max-width: 992px) {
            .task-settings-cards {
                padding: 0.65rem 0.75rem 0.3rem;
            }
            .task-edit-modal-grid {
                grid-template-columns: 1fr;
            }
            .task-settings-toolbar,
            .task-edit-modal-hero {
                align-items: flex-start;
                flex-direction: column;
            }
            .task-settings-summary {
                justify-content: flex-start;
            }
        }

        .analysis-simple-table th,
        .analysis-simple-table td {
            vertical-align: top;
            font-size: 0.875rem;
            line-height: 1.7;
        }

        .analysis-simple-table th {
            white-space: nowrap;
        }

        .analysis-simple-cell {
            min-width: 180px;
        }

        .analysis-simple-lines {
            display: flex;
            flex-direction: column;
            gap: 0.2rem;
        }

        .analysis-simple-lines details {
            margin-top: 0.2rem;
        }

        .analysis-simple-lines summary {
            cursor: pointer;
            color: var(--primary-color);
        }

        .progress {
            height: 8px;
            border-radius: 4px;
            background: var(--border-color);
            margin-top: 0.75rem;
        }

        .progress-bar {
            background: var(--gradient-primary);
            border-radius: 4px;
        }

        /* 日志控制台 */
        .log-console {
            background: #1e293b;
            border-radius: var(--border-radius);
            padding: 1rem;
            height: 300px;
            overflow-y: auto;
            font-family: 'Consolas', 'Monaco', monospace;
            font-size: 0.8125rem;
        }

        .log-line {
            padding: 0.25rem 0;
            border-bottom: 1px solid #334155;
        }

        .log-success { color: #4ade80; }
        .log-error { color: #f87171; }
        .log-warning { color: #fbbf24; }
        .log-info { color: #94a3b8; }

        .site-footer {
            max-width: 1600px;
            margin: 0 auto;
            padding: 0 2rem 2rem;
            color: var(--text-secondary);
        }

        .site-footer-inner {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: var(--border-radius);
            box-shadow: var(--shadow-sm);
            padding: 1.25rem 1.5rem;
        }

        .site-footer-notice {
            font-size: 0.875rem;
            line-height: 1.8;
            margin-bottom: 0.85rem;
        }
        .announcement-board {
            margin-top: 1rem;
            border: 1px solid #dbe7ff;
            border-radius: 14px;
            background: linear-gradient(135deg, #f8fbff 0%, #eef4ff 100%);
            box-shadow: var(--shadow-sm);
            overflow: hidden;
        }
        .announcement-board-header {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 0.95rem 1.1rem;
            background: rgba(30, 58, 138, 0.07);
            border-bottom: 1px solid #dbe7ff;
            font-weight: 700;
            color: var(--primary-color);
        }
        .announcement-board-body {
            padding: 1rem 1.1rem 1.1rem;
            display: flex;
            flex-direction: column;
            gap: 0.9rem;
        }
        .announcement-card {
            background: #fff;
            border: 1px solid #e2e8f0;
            border-radius: 12px;
            padding: 0.95rem;
        }
        .announcement-card.is-clickable {
            cursor: pointer;
            transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
        }
        .announcement-card.is-clickable:hover {
            transform: translateY(-1px);
            box-shadow: var(--shadow-md);
            border-color: #bfdbfe;
        }
        .announcement-card-title {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            margin-bottom: 0.45rem;
            font-size: 1rem;
            font-weight: 700;
            color: var(--text-primary);
        }
        .announcement-card-content {
            color: var(--text-secondary);
            white-space: pre-wrap;
            line-height: 1.75;
        }
        .announcement-card-image {
            display: block;
            max-width: 100%;
            max-height: 420px;
            margin-top: 0.85rem;
            border-radius: 10px;
            border: 1px solid #dbe3ef;
            background: #fff;
            padding: 6px;
            cursor: zoom-in;
            object-fit: contain;
        }
        .announcement-card-video {
            width: min(100%, 900px);
            aspect-ratio: 16 / 9;
            margin-top: 0.85rem;
            overflow: hidden;
            border: 1px solid #dbe3ef;
            border-radius: 10px;
            background: #0f172a;
        }
        .announcement-card-video iframe {
            display: block;
            width: 100%;
            height: 100%;
            border: 0;
        }
        .announcement-card-link {
            display: inline-flex;
            align-items: center;
            gap: 0.45rem;
            margin-top: 0.8rem;
            color: var(--primary-dark);
            font-weight: 700;
            text-decoration: none;
        }
        .announcement-board-empty {
            padding: 0.2rem 0;
            color: var(--text-muted);
            font-size: 0.95rem;
        }
        .announcement-modal .modal-content {
            border-radius: 18px;
            overflow: hidden;
            border: 1px solid #dbe7ff;
        }
        .announcement-modal .modal-header {
            background: linear-gradient(135deg, #eef4ff 0%, #f8fbff 100%);
            border-bottom: 1px solid #dbe7ff;
        }
        .announcement-modal .modal-title {
            display: flex;
            align-items: center;
            gap: 0.55rem;
            font-weight: 700;
            color: var(--primary-color);
        }
        .announcement-modal-body {
            display: flex;
            flex-direction: column;
            gap: 0.9rem;
        }
        .announcement-modal-time {
            font-size: 0.875rem;
            color: var(--text-muted);
        }

        .site-footer-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem 1.25rem;
            align-items: center;
            border-top: 1px solid var(--border-color);
            padding-top: 0.85rem;
            font-size: 0.8125rem;
            color: var(--text-muted);
        }

        .site-footer-meta a {
            color: var(--primary-color);
            text-decoration: none;
        }

        .site-footer-meta a:hover {
            text-decoration: underline;
        }

        .mobile-scroll-x {
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: thin;
        }

        #ratioAccordion {
            display: flex;
            flex-direction: column;
            gap: 0.95rem;
        }

        .question-config-mobile-toolbar {
            display: none;
            gap: 0.65rem;
            margin-bottom: 0.85rem;
        }

        .question-config-mobile-toolbar .btn {
            flex: 1 1 0;
        }

        .question-config-card {
            border: 1px solid #dbe5f1;
            border-radius: 20px;
            overflow: hidden;
            background: linear-gradient(180deg, #ffffff, #fbfdff);
            box-shadow: 0 14px 34px rgba(15, 23, 42, 0.05);
            content-visibility: auto;
            contain-intrinsic-size: auto 112px;
        }

        .global-ui-operation-overlay {
            position: fixed;
            inset: 0;
            z-index: 30000;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 1.25rem;
            background: rgba(15, 23, 42, 0.34);
            backdrop-filter: blur(2px);
        }

        .global-ui-operation-overlay.show {
            display: flex;
        }

        .global-ui-operation-card {
            display: flex;
            align-items: center;
            gap: 1rem;
            width: min(460px, calc(100vw - 2rem));
            padding: 1.2rem 1.35rem;
            border: 1px solid rgba(59, 130, 246, 0.2);
            border-radius: 16px;
            background: #fff;
            box-shadow: 0 24px 70px rgba(15, 23, 42, 0.25);
        }

        .global-ui-operation-card .spinner-border {
            flex: 0 0 auto;
            width: 2rem;
            height: 2rem;
        }

        .global-ui-operation-title {
            color: #163263;
            font-size: 1rem;
            font-weight: 800;
        }

        .global-ui-operation-detail {
            margin-top: 0.25rem;
            color: #64748b;
            font-size: 0.84rem;
            line-height: 1.55;
        }

        .question-config-card__toggle {
            padding: 1rem 1.15rem;
            background: linear-gradient(180deg, #ffffff, #f8fbff);
        }

        .question-config-card__toggle:not(.collapsed) {
            background: linear-gradient(180deg, #f7fbff, #eef6ff);
            color: inherit;
            box-shadow: none;
        }

        .question-config-card__toggle:focus {
            box-shadow: none;
            border-color: transparent;
        }

        .question-config-card__header {
            display: flex;
            flex-direction: column;
            gap: 0.55rem;
            width: 100%;
            min-width: 0;
        }

        .question-config-card__header-top {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 0.75rem;
            flex-wrap: wrap;
        }

        .question-config-card__code {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            font-weight: 800;
            color: #17315d;
            font-size: 0.95rem;
            padding: 0.3rem 0.7rem;
            border-radius: 999px;
            background: #eef4ff;
            border: 1px solid #d8e4ff;
        }

        .question-config-card__badges {
            display: flex;
            flex-wrap: wrap;
            gap: 0.45rem;
            justify-content: flex-end;
        }

        .question-config-card__title {
            font-size: 1rem;
            line-height: 1.65;
            font-weight: 700;
            color: #1f2f49;
            white-space: pre-wrap;
            overflow-wrap: anywhere;
            word-break: normal;
        }

        .question-config-card__summary {
            font-size: 0.82rem;
            color: #62748b;
            line-height: 1.6;
        }

        .question-config-card__body {
            padding: 1rem 1.1rem 1.15rem;
            background: #fcfdff;
        }

        .question-config-shell {
            display: flex;
            flex-direction: column;
            gap: 0.9rem;
        }

        /* ===== 原生问卷页面视图 ===== */
        .native-survey-container {
            position: relative;
            background:
                radial-gradient(circle at 12% 0%, rgba(77, 132, 226, 0.11), transparent 30%),
                linear-gradient(180deg, #f7faff 0%, #f3f6fa 100%);
            border: 1px solid #e1e9f4;
            border-radius: 16px;
            padding: clamp(0.8rem, 1.8vw, 1.5rem);
        }

        /* 大型问卷的原生预览也按可视区域增量布局，避免 40~100 道题及其
           配置控件一次性参与 layout/paint，输入占比时不再拖慢整页。 */
        .native-survey-question {
            content-visibility: auto;
            contain-intrinsic-size: auto 360px;
            contain: layout paint style;
        }

        .text-generation-strategy > summary {
            cursor: pointer;
            list-style: none;
        }

        .text-generation-strategy > summary::-webkit-details-marker {
            display: none;
        }

        .native-survey-page {
            background: #fff;
            border: 1px solid rgba(210, 221, 236, 0.92);
            border-radius: 14px;
            box-shadow: 0 16px 40px rgba(31, 61, 105, 0.09), 0 2px 8px rgba(31, 61, 105, 0.05);
            width: 100%;
            max-width: 1080px;
            margin: 0 auto;
            overflow: hidden;
        }

        .native-survey-header {
            position: relative;
            isolation: isolate;
            background: linear-gradient(112deg, #2f6fc7 0%, #3f88df 52%, #63a4ed 100%);
            padding: 1.55rem clamp(1.25rem, 3vw, 2.5rem);
            color: #fff;
            overflow: hidden;
        }

        .native-survey-header::after {
            content: "";
            position: absolute;
            z-index: -1;
            top: -75px;
            right: -35px;
            width: 250px;
            height: 180px;
            border-radius: 50%;
            background: radial-gradient(circle, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0) 72%);
            pointer-events: none;
        }

        .native-survey-header__title {
            font-size: 1.15rem;
            font-weight: 700;
            margin-bottom: 0.35rem;
            line-height: 1.5;
        }

        .native-survey-header__desc {
            font-size: 0.82rem;
            opacity: 0.85;
            line-height: 1.5;
        }

        .native-survey-body {
            padding: 1.65rem clamp(1.15rem, 3vw, 2.65rem) 2.35rem;
        }

        .native-survey-question {
            margin-bottom: 1.75rem;
            padding-bottom: 1.5rem;
            border-bottom: 1px solid #f0f0f0;
            content-visibility: auto;
            contain-intrinsic-size: auto 260px;
        }

        .native-survey-question:last-child {
            border-bottom: none;
            margin-bottom: 0;
        }

.native-survey-question__title {
            font-size: 0.98rem;
            font-weight: 600;
            color: #1f2f46;
            line-height: 1.72;
            margin-bottom: 0.85rem;
            white-space: pre-wrap;
            overflow-wrap: anywhere;
            word-break: normal;
            max-height: none;
            overflow: visible;
        }

        .native-survey-question__title .q-num {
            color: #4a90d9;
            font-weight: 700;
            margin-right: 0.35rem;
        }

        .native-survey-question__title .q-required {
            color: #e74c3c;
            margin-left: 0.2rem;
        }

        .native-survey-options {
            display: flex;
            flex-direction: column;
            gap: 0.55rem;
            padding-left: 0.25rem;
        }

        .native-survey-option {
            display: flex;
            align-items: flex-start;
            gap: 0.6rem;
            font-size: 0.88rem;
            color: #46586f;
            line-height: 1.58;
            cursor: default;
            white-space: pre-wrap;
            overflow-wrap: anywhere;
        }

        .native-survey-option .opt-radio,
        .native-survey-option .opt-checkbox {
            flex-shrink: 0;
            width: 16px;
            height: 16px;
            margin-top: 2px;
            border: 2px solid #c0c0c0;
            background: #fff;
        }

        .native-survey-option .opt-radio {
            border-radius: 50%;
        }

        .native-survey-option .opt-checkbox {
            border-radius: 3px;
        }

        .native-survey-scale {
            display: flex;
            align-items: center;
            gap: 0;
            padding: 0.5rem 0;
            overflow-x: auto;
        }

        .native-survey-scale__label {
            font-size: 0.78rem;
            color: #888;
            white-space: nowrap;
            padding: 0 0.5rem;
            min-width: 50px;
        }

        .native-survey-scale__label--left {
            text-align: right;
        }

        .native-survey-scale__label--right {
            text-align: left;
        }

        .native-survey-scale__items {
            display: flex;
            align-items: center;
            gap: 0;
            flex: 1;
            justify-content: center;
        }

        .native-survey-scale__item {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0.3rem;
            padding: 0 0.75rem;
        }

        .native-survey-scale__item .opt-radio {
            width: 16px;
            height: 16px;
            border: 2px solid #c0c0c0;
            border-radius: 50%;
            background: #fff;
        }

        .native-survey-scale__item-num {
            font-size: 0.72rem;
            color: #999;
        }

        .native-survey-matrix {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.82rem;
        }

        .native-survey-matrix th,
        .native-survey-matrix td {
            border: 1px solid #e8e8e8;
            padding: 0.5rem 0.6rem;
            text-align: center;
        }

        .native-survey-matrix th {
            background: #fafafa;
            font-weight: 600;
            color: #555;
        }

        .native-survey-matrix td:first-child {
            text-align: left;
            color: #555;
            font-weight: 500;
        }

        .native-survey-matrix .opt-radio {
            display: inline-block;
            width: 14px;
            height: 14px;
            border: 2px solid #c0c0c0;
            border-radius: 50%;
            background: #fff;
        }

        .native-survey-textarea {
            width: 100%;
            height: 60px;
            border: 1px solid #d9d9d9;
            border-radius: 4px;
            background: #fafafa;
            padding: 0.5rem;
            font-size: 0.85rem;
            color: #999;
            resize: none;
        }

        .native-survey-footer {
            padding: 1.25rem 2rem;
            border-top: 1px solid #f0f0f0;
            text-align: center;
        }

        .native-survey-footer__btn {
            display: inline-block;
            padding: 0.6rem 3rem;
            background: #4a90d9;
            color: #fff;
            border: none;
            border-radius: 4px;
            font-size: 0.9rem;
            font-weight: 600;
            cursor: default;
            opacity: 0.85;
        }

        .native-survey-config-panel {
            margin-top: 0.85rem;
            border: 1px dashed #d4e3f5;
            border-radius: 8px;
            background: #f8fbff;
            padding: 0.85rem 1rem;
        }

        .native-survey-config-panel__header {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.78rem;
            font-weight: 700;
            color: #4a7ab5;
            margin-bottom: 0.65rem;
            cursor: pointer;
            user-select: none;
        }

        .native-survey-config-panel__header i {
            transition: transform 0.2s;
        }

        .native-survey-config-panel__header.collapsed i {
            transform: rotate(-90deg);
        }

        .native-survey-config-panel__body {
            font-size: 0.85rem;
        }

        .native-survey-config-panel__body.collapsed {
            display: none;
        }

        .native-survey-toggle-bar {
            display: flex;
            align-items: center;
            gap: 0.6rem;
            padding: 0.4rem 0.85rem;
            background: #f0f6ff;
            border: 1px solid #d4e3f5;
            border-radius: 8px;
            font-size: 0.82rem;
            color: #3d6a99;
        }

        .native-survey-toggle-bar .form-check-input:checked {
            background-color: #4a90d9;
            border-color: #4a90d9;
        }

        @media (max-width: 768px) {
            .native-survey-body {
                padding: 1rem 1.15rem 1.5rem;
            }
            .native-survey-header {
                padding: 1.15rem 1.15rem;
            }
            .native-survey-scale__item {
                padding: 0 0.45rem;
            }
        }

        .question-config-overview {
            border-radius: 18px;
            padding: 1rem 1rem 0.9rem;
            background: linear-gradient(135deg, #f4f8ff, #eef7ff);
            border: 1px solid #dbe8fb;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
            margin-bottom: 0.95rem;
        }

        .question-config-overview__eyebrow {
            font-size: 0.74rem;
            font-weight: 800;
            letter-spacing: 0.05em;
            text-transform: uppercase;
            color: #4d6690;
            margin-bottom: 0.45rem;
        }

        .question-config-overview__title {
            font-size: 1rem;
            font-weight: 800;
            line-height: 1.7;
            color: #183153;
            margin-bottom: 0.45rem;
        }

        .question-config-overview__summary {
            font-size: 0.84rem;
            color: #5d718d;
            line-height: 1.65;
        }

        .question-config-overview__metrics {
            display: flex;
            flex-wrap: wrap;
            gap: 0.45rem;
            margin-top: 0.75rem;
        }

        .question-config-overview__metric {
            display: inline-flex;
            align-items: center;
            min-height: 30px;
            padding: 0.3rem 0.7rem;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.92);
            border: 1px solid #d7e5fa;
            color: #284666;
            font-size: 0.78rem;
            font-weight: 700;
        }

        .question-config-hint {
            border-radius: 18px;
            background: #fff;
            border-color: #dce6f4 !important;
        }

        #ratioAccordion .card,
        #ratioAccordion .alert {
            border-radius: 18px;
        }

        #ratioAccordion .card-header {
            border-bottom: 1px solid rgba(148, 163, 184, 0.18);
        }

        #ratioAccordion .table.question-config-stack-table {
            margin-bottom: 0;
        }

        #ratioAccordion .table.question-config-stack-table td,
        #ratioAccordion .table.question-config-stack-table th {
            vertical-align: middle;
        }

        /* 矩阵量表的百分比通常包含小数（如 21.90%）。占比输入还会由
           数字步进器注入“− / 输入框 / +”，因此列宽必须同时容纳步进器和 % 后缀。 */
        #ratioAccordion .matrix-ratio-cell,
        #ratioAccordion .matrix-ratio-header {
            width: 200px;
            min-width: 200px;
        }

        #ratioAccordion .matrix-cell-input {
            min-width: 6rem;
            text-align: center;
        }

        #ratioAccordion .matrix-ratio-input-group,
        #ratioAccordion .matrix-ratio-cell > .input-group {
            width: 12rem;
            min-width: 12rem;
            flex-wrap: nowrap;
        }

        #ratioAccordion .matrix-ratio-input-group > .input-group-text,
        #ratioAccordion .matrix-ratio-cell > .input-group > .input-group-text {
            min-width: 2.5rem;
            justify-content: center;
            flex: 0 0 auto;
        }

        /* 2026-10-22 用户反馈：下拉题 / 地区级联题 / 图片题的「选中概率」输入框
           被数字步进器注入的 − / + 按钮挤扁，值只显示得出 "1." / "3"。
           根因是 Bootstrap 的 .input-group > .form-control 只有 1% 的 flex 基准，
           步进器两个固定宽按钮 + % 后缀会把剩余宽度吃光。
           这里让百分比输入组不换行、% 后缀不参与压缩、输入框保留可读宽度。 */
        .ratio-percent-input-group {
            flex-wrap: nowrap;
        }

        .ratio-percent-input-group > .ratio-num-input {
            min-width: 4.5rem;
        }

        .ratio-percent-input-group > .input-group-text {
            min-width: 2.5rem;
            justify-content: center;
            flex: 0 0 auto;
        }

        .significance-preset-group {
            flex-wrap: nowrap;
        }

        .significance-preset-group .btn {
            min-width: 62px;
            white-space: nowrap;
        }

        .dimension-name-editor {
            width: min(360px, 46vw);
            min-width: 220px;
        }

        .dimension-name-editor .input-group-text {
            color: #23406f;
            background: #eef4ff;
            border-color: #8aa9d8;
            font-weight: 700;
        }

        .dimension-name-editor .form-control {
            color: #123c7a;
            background: #fff;
            border-color: #5f89c7;
            font-weight: 700;
            box-shadow: inset 0 0 0 1px rgba(37, 99, 180, 0.08);
        }

        .dimension-name-editor .form-control:focus {
            border-color: #245fb4;
            box-shadow: 0 0 0 0.18rem rgba(36, 95, 180, 0.14);
        }

        /* 维度配置是长列表，说明只在需要时展开，题项列表交给弹窗主体滚动。 */
        #dimensionTabContent .dimension-help {
            margin: 0.45rem 0 0.7rem;
            border: 1px solid #cfe0f5;
            border-radius: 10px;
            background: #f8fbff;
        }

        #dimensionTabContent .dimension-help > summary {
            display: flex;
            align-items: center;
            gap: 0.45rem;
            padding: 0.5rem 0.7rem;
            color: #24527d;
            font-size: 0.82rem;
            font-weight: 700;
            cursor: pointer;
            list-style: none;
        }

        #dimensionTabContent .dimension-help > summary::-webkit-details-marker {
            display: none;
        }

        #dimensionTabContent .dimension-help > summary::after {
            content: '\f282';
            margin-left: auto;
            font-family: 'bootstrap-icons';
            transition: transform 0.15s ease;
        }

        #dimensionTabContent .dimension-help[open] > summary {
            border-bottom: 1px solid #d8e5f5;
        }

        #dimensionTabContent .dimension-help[open] > summary::after {
            transform: rotate(180deg);
        }

        #dimensionTabContent .dimension-help-body {
            padding: 0.45rem 0.75rem 0.55rem;
            color: #365579;
            font-size: 0.78rem;
            line-height: 1.5;
        }

        #dimensionsContainer {
            max-height: none;
            overflow: visible;
            padding: 0.15rem 0.25rem 0.35rem 0;
        }

        #dimensionsContainer > .dimension-config-card {
            margin-bottom: 0.65rem !important;
            border-radius: 10px;
            box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
        }

        #dimensionsContainer > .dimension-config-card:last-child {
            margin-bottom: 0 !important;
        }

        #dimensionsContainer .dimension-config-card .card-header {
            min-height: 0;
            padding: 0.5rem 0.7rem;
            gap: 0.5rem;
        }

        #dimensionsContainer .dimension-config-card .card-body {
            padding: 0.65rem 0.7rem;
        }

        #dimensionsContainer .dimension-config-card .row {
            margin-bottom: 0.35rem !important;
        }

        #dimensionsContainer .dimension-config-card .form-label {
            margin-bottom: 0.2rem;
        }

        #dimensionsContainer .dimension-config-card .form-control,
        #dimensionsContainer .dimension-config-card .form-select {
            padding-top: 0.4rem;
            padding-bottom: 0.4rem;
        }

        #dimensionsContainer .dimension-config-card .btn-sm,
        #dimensionsContainer .dimension-config-card .btn-group-sm > .btn {
            min-height: 0;
            padding: 0.3rem 0.55rem;
            font-size: 0.8rem;
            line-height: 1.25;
        }

        #dimensionsContainer .dimension-config-card .dimension-name-editor .input-group-text,
        #dimensionsContainer .dimension-config-card .dimension-name-editor .form-control {
            padding-top: 0.35rem;
            padding-bottom: 0.35rem;
            font-size: 0.82rem;
        }

        #dimensionsContainer .dimension-config-card small {
            line-height: 1.25;
        }

        #dimensionsContainer .dimension-config-card .dimension-question-heading {
            margin-top: 0.45rem !important;
            margin-bottom: 0.3rem !important;
        }

        #dimensionsContainer .dimension-config-card .list-group-item {
            padding-top: 0.35rem !important;
            padding-bottom: 0.35rem !important;
        }

        #dimensionsContainer .dimension-config-card .matrix-question-row {
            padding-top: 0.3rem !important;
            padding-bottom: 0.3rem !important;
        }

        /* Question text is authoritative live survey content, not a compact
           cached label.  Keep every line/code visible in dimension cards and
           every selector that reuses questionnaire titles. */
        #dimensionsContainer .dimension-config-card .flex-grow-1,
        #dimItemsContainer .flex-grow-1,
        .dimension-question-text {
            min-width: 0;
        }

        .dimension-question-text,
        #dimItemsContainer .form-check-label {
            white-space: pre-wrap;
            overflow-wrap: anywhere;
            word-break: break-word;
            line-height: 1.55;
        }

        #dimensionItemsModal .modal-dialog {
            width: min(96vw, 1480px);
            max-width: min(96vw, 1480px);
        }

        #dimensionsContainer .dimension-config-card .dimension-empty-hint {
            margin-bottom: 0;
            padding: 0.2rem 0;
        }

        /* 高级配置中的相关性/结构路径表必须保持可读宽度，空间不足时横向滚动，
           禁止浏览器把“方向”和数值区间压缩成单个字符。 */
        .analysis-relation-table-wrap {
            width: 100%;
            max-height: 360px;
            overflow: auto;
            border: 1px solid #dbe6f5;
            border-radius: 12px;
            background: #fff;
        }

        .analysis-relation-table {
            width: 100%;
            min-width: 1120px;
            table-layout: fixed;
            margin-bottom: 0;
        }

        .analysis-relation-table th,
        .analysis-relation-table td {
            padding: 0.55rem 0.45rem;
            vertical-align: middle;
            white-space: nowrap;
        }

        .analysis-relation-table th {
            color: #183253;
            background: #f4f8ff;
            font-weight: 700;
        }

        .analysis-relation-table .relation-dimension-col {
            width: 27%;
        }

        .analysis-relation-table .relation-direction-col {
            width: 108px;
        }

        .analysis-relation-table .relation-range-col {
            width: 220px;
        }

        .analysis-relation-table .relation-significance-col {
            width: 300px;
        }

        .analysis-relation-table .relation-action-col {
            width: 76px;
            text-align: center;
        }

        .analysis-relation-table .form-select,
        .analysis-relation-table .form-control {
            min-height: 36px;
            color: #172b4d;
            border-color: #9bb3d5;
            background-color: #fff;
        }

        .analysis-relation-table .relation-direction-select {
            min-width: 92px;
            padding-right: 1.75rem;
            font-weight: 700;
        }

        .analysis-relation-table .relation-range-input {
            min-width: 198px;
            flex-wrap: nowrap;
        }

        .analysis-relation-table .relation-range-input .form-control {
            min-width: 72px;
            text-align: center;
            font-variant-numeric: tabular-nums;
        }

        .analysis-relation-table .relation-range-input .input-group-text {
            min-width: 34px;
            justify-content: center;
            color: #365579;
            background: #edf3fb;
            border-color: #9bb3d5;
        }

        #advancedTabContent > .mt-3 > .card {
            overflow: visible;
            border: 1px solid #dbe5f1;
            border-left: 3px solid #c9dcf7;
            border-radius: 12px;
            background: rgba(255, 255, 255, 0.98);
            box-shadow: 0 4px 14px rgba(31, 61, 105, 0.045);
            margin-bottom: 0.75rem !important;
            transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
        }

        #advancedTabContent > .mt-3 > .card:hover {
            border-color: #c9d9ed;
            border-left-color: #78a8e8;
            box-shadow: 0 9px 24px rgba(31, 61, 105, 0.085);
            transform: translateY(-1px);
        }

        #advancedTabContent > .mt-3 > .card > .card-header {
            min-height: 48px;
            padding: 0.65rem 0.95rem;
            color: #203653 !important;
            background: linear-gradient(112deg, #fbfdff 0%, #f1f6fd 100%) !important;
            border-bottom: 1px solid #e2e9f2;
            border-radius: 10px 10px 0 0;
            gap: 0.7rem;
        }

        #advancedTabContent > .mt-3 > .card.advanced-config-card-collapsed > .card-header {
            min-height: 40px;
            padding-block: 0.42rem;
            border-bottom: 0;
            border-radius: 9px;
        }

        #advancedTabContent > .mt-3 > .card.advanced-config-card-collapsed > .card-header > div {
            display: none !important;
        }

        #advancedTabContent > .mt-3 > .card > .card-header h6 {
            font-size: 0.92rem;
            font-weight: 700;
            line-height: 1.25;
            color: #203653 !important;
        }

        #advancedTabContent > .mt-3 > .card > .card-header i {
            font-size: 1rem;
            color: #3f78be;
        }

        #advancedTabContent > .mt-3 > .card > .card-header [data-advanced-card-toggle="1"] {
            padding: 0.2rem 0.5rem;
            font-size: 0.76rem;
        }

        #advancedTabContent > .mt-3 > .card > .card-body {
            padding: 1.05rem 1.1rem 1.15rem;
            color: #354861;
            background: #fff;
            border-radius: 0 0 11px 11px;
        }

        #advancedTabContent > .mt-3 > .card > .card-header .btn {
            background-color: rgba(255, 255, 255, 0.88);
            box-shadow: 0 1px 2px rgba(31, 61, 105, 0.05);
        }

        #advancedTabContent > .mt-3 > .d-flex:first-child {
            background:
                radial-gradient(circle at 96% 0%, rgba(81, 137, 218, 0.09), transparent 32%),
                linear-gradient(135deg, #fbfdff 0%, #f5f8fc 100%) !important;
            border-color: #dce5f0 !important;
            box-shadow: 0 5px 16px rgba(31, 61, 105, 0.045);
        }

        .process-model-card {
            border: 1px solid #b9cbea;
            border-radius: 12px;
            background: #fff;
        }

        .process-model-table-wrap {
            overflow-x: auto;
            border: 1px solid #c9d6e8;
            border-radius: 10px;
            background: #fff;
        }

        .process-model-table {
            min-width: 960px;
            margin: 0;
            table-layout: fixed;
        }

        .process-model-table th,
        .process-model-table td {
            padding: 0.55rem;
            vertical-align: middle;
            border-color: #dfe6ef;
        }

        .process-model-table thead th {
            color: #26415f;
            background: #f2f6fb;
            font-size: 0.8rem;
            font-weight: 700;
            white-space: nowrap;
        }

        .process-model-table .process-index-col { width: 58px; text-align: center; }
        .process-model-table .process-type-col { width: 170px; }
        .process-model-table .process-stage-col { width: 170px; }
        .process-model-table .process-action-col { width: 88px; text-align: center; }

        .process-model-table .form-select,
        .process-model-table .form-control {
            min-width: 130px;
            border-width: 1px;
        }

        .process-model-detail-row > td {
            padding: 0 0.55rem 0.55rem;
            background: #fbfcfe;
        }

        .process-model-details > summary {
            display: inline-flex;
            align-items: center;
            gap: 0.3rem;
            width: auto;
            margin-top: 0.45rem;
            color: #315d92;
            cursor: pointer;
            list-style: none;
            font-size: 0.8rem;
            font-weight: 700;
        }

        .process-model-details > summary::-webkit-details-marker { display: none; }

        .process-model-details-panel {
            margin-top: 0.55rem;
            padding: 0.75rem;
            border: 1px solid #d5e0ef;
            border-radius: 8px;
            background: #fff;
        }

        .process-model-grid {
            display: grid;
            grid-template-columns: repeat(12, minmax(0, 1fr));
            gap: 0.75rem;
            align-items: end;
        }

        .process-field { grid-column: span 3; min-width: 0; }
        .process-field-wide { grid-column: span 6; min-width: 0; }
        .process-field-full { grid-column: 1 / -1; min-width: 0; }
        .process-field-compact { grid-column: span 2; min-width: 0; }

        .mediation-node-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
            gap: 0.5rem;
        }

        .mediation-node-select {
            display: flex;
            gap: 0.35rem;
            align-items: center;
        }

        .control-variable-picker {
            position: relative;
        }

        .control-variable-picker > summary {
            list-style: none;
            cursor: pointer;
            border: 1px solid #9bb3d5;
            border-radius: 8px;
            padding: 0.42rem 0.65rem;
            background: #fff;
            min-height: 32px;
        }

        .control-variable-picker > summary::-webkit-details-marker { display: none; }

        .control-variable-menu {
            margin-top: 0.4rem;
            padding: 0.6rem;
            border: 1px solid #b9cbea;
            border-radius: 10px;
            background: #f8fbff;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 0.35rem 0.75rem;
            max-height: 190px;
            overflow: auto;
        }

        @media (max-width: 1200px) {
            .process-field, .process-field-wide { grid-column: span 6; }
            .process-field-compact { grid-column: span 3; }
        }

        @media (max-width: 768px) {
            .process-field, .process-field-wide, .process-field-compact { grid-column: 1 / -1; }
        }

        @media (max-width: 992px) {
            .main-container {
                padding: 0.875rem;
            }

            .navbar {
                padding: 0.75rem 0;
            }

            .nav-actions {
                gap: 0.5rem;
                flex-wrap: wrap;
                justify-content: flex-end;
            }

            .card-header {
                padding: 1rem;
                font-size: 0.95rem;
            }

            .btn-group.w-100 {
                display: grid;
                grid-template-columns: 1fr;
                gap: 0.625rem;
            }

            .btn-group.w-100 > .btn,
            .btn-group.w-100 > label.btn {
                border-radius: 12px !important;
            }

            #ratioConfigContainer,
            #dimensionsContainer,
            #diffAnalysisContainer,
            #regressionConfigContainer,
            #mediationContainer,
            #moderationContainer,
            #correlationsContainer,
            #pathsContainer {
                max-height: none !important;
            }

            .dimension-name-editor {
                width: min(100%, 360px);
                min-width: 0;
            }

            .analysis-relation-table {
                min-width: 1040px;
            }
        }

        /* 响应式设计 */
        @media (max-width: 1200px) {
            .main-container {
                padding: 1rem;
            }

            .site-footer {
                padding: 0 1rem 1rem;
            }
            
            .nav-stats {
                gap: 1rem;
            }
            
            .stat-item {
                min-width: 80px;
                padding: 0.5rem;
            }
        }

        @media (max-width: 768px) {
            body {
                font-size: 15px;
            }

            .navbar-brand {
                font-size: 1.05rem;
                gap: 8px;
            }

            .navbar-brand img {
                height: 34px;
            }

            .container-fluid {
                padding-left: 0.875rem;
                padding-right: 0.875rem;
            }

            .nav-stats {
                display: none;
            }

            .nav-actions {
                width: 100%;
                justify-content: stretch;
                margin-left: 0;
            }

            .nav-actions > .btn {
                flex: 1 1 auto;
                min-height: 42px;
                justify-content: center;
            }

            .ratio-inputs {
                grid-template-columns: 1fr;
            }

            .province-tabs {
                flex-wrap: nowrap;
                overflow-x: auto;
                padding-bottom: 0.25rem;
                -webkit-overflow-scrolling: touch;
            }

            .province-tab {
                flex: 0 0 auto;
                white-space: nowrap;
            }

            .region-ratio-toolbar {
                padding: 0.75rem;
            }

            .city-grid,
            .task-list {
                max-height: none;
            }

            .card-body {
                padding: 0.9rem;
            }

            .section-title {
                font-size: 0.95rem;
                margin: 1.1rem 0 0.75rem;
            }

            .btn {
                min-height: 42px;
                justify-content: center;
            }

            .upload-zone {
                padding: 1.5rem 1rem;
            }

            .upload-icon {
                font-size: 2.25rem;
            }

            .task-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 0.5rem;
            }

            .task-stats {
                gap: 0.5rem 0.875rem;
            }

            .log-console {
                height: 220px;
                font-size: 0.76rem;
            }

            .table-responsive {
                border-radius: 10px;
                -webkit-overflow-scrolling: touch;
            }

            .modal {
                padding: 0 !important;
            }

            .modal-dialog,
            .modal-dialog.modal-xl,
            .modal-dialog.modal-dialog-scrollable,
            .modal-dialog.modal-dialog-centered {
                width: 100vw;
                max-width: 100vw;
                min-height: 100vh;
                margin: 0;
            }

            .modal-content {
                min-height: 100vh;
                border-radius: 0;
                border: 0;
            }

            .modal-header,
            .modal-footer {
                padding: 0.9rem;
            }

            .modal-body {
                padding: 0.9rem;
                overflow-y: auto;
            }

            #configTabs {
                flex-wrap: nowrap;
                overflow-x: auto;
                overflow-y: hidden;
                gap: 0.25rem;
                padding-bottom: 0.25rem;
                white-space: nowrap;
                -webkit-overflow-scrolling: touch;
            }

            #configTabs .nav-item {
                flex: 0 0 auto;
            }

            #configTabs .nav-link {
                white-space: nowrap;
                padding: 0.65rem 0.85rem;
                font-size: 0.9rem;
                border-radius: 12px 12px 0 0;
            }

            #ratioConfigContainer {
                max-height: none !important;
                overflow: visible !important;
            }

            #ratioConfigContainer .row,
            #advancedTabContent .row,
            #dimensionTabContent .row {
                --bs-gutter-x: 0.75rem;
                --bs-gutter-y: 0.75rem;
            }

            #ratioConfigModal .modal-footer,
            #pointsPurchaseModal .modal-footer,
            #matchModal .modal-footer,
            #mappingModal .modal-footer,
            #dimensionItemsModal .modal-footer,
            #attributeQuestionPickerModal .modal-footer {
                position: sticky;
                bottom: 0;
                background: linear-gradient(180deg, rgba(255,255,255,0.2), rgba(255,255,255,0.98) 24%);
                backdrop-filter: blur(10px);
                gap: 0.5rem;
                flex-wrap: wrap;
                z-index: 3;
            }

            #ratioConfigModal .modal-footer .btn,
            #pointsPurchaseModal .modal-footer .btn,
            #matchModal .modal-footer .btn,
            #mappingModal .modal-footer .btn,
            #dimensionItemsModal .modal-footer .btn,
            #attributeQuestionPickerModal .modal-footer .btn {
                flex: 1 1 calc(50% - 0.5rem);
            }

            .question-config-mobile-toolbar {
                display: flex;
            }

            #ratioAccordion {
                gap: 0.85rem;
            }

            .question-config-card {
                border-radius: 18px;
                box-shadow: 0 16px 30px rgba(15, 23, 42, 0.06);
            }

            .question-config-card__toggle {
                padding: 0.95rem 1rem;
            }

            .question-config-card__toggle::after {
                margin-left: auto;
                flex-shrink: 0;
            }

            .question-config-card__header-top {
                flex-direction: column;
                align-items: stretch;
            }

            .question-config-card__badges {
                justify-content: flex-start;
            }

            .question-config-card__title {
                font-size: 0.96rem;
                line-height: 1.72;
            }

            .question-config-card__summary {
                font-size: 0.78rem;
            }

            .question-config-card__body {
                padding: 0.95rem 0.95rem 1rem;
            }

            .question-config-overview {
                padding: 0.92rem 0.92rem 0.88rem;
                border-radius: 16px;
            }

            .question-config-overview__title {
                font-size: 0.95rem;
            }

            .question-config-overview__summary {
                font-size: 0.8rem;
            }

            .question-config-overview__metric {
                font-size: 0.74rem;
                min-height: 28px;
            }

            #ratioAccordion .card,
            #ratioAccordion .alert,
            .question-config-hint {
                border-radius: 16px;
            }

            #ratioAccordion .table.question-config-stack-table {
                border: 0;
                background: transparent;
            }

            #ratioAccordion .table.question-config-stack-table thead {
                display: none;
            }

            #ratioAccordion .table.question-config-stack-table,
            #ratioAccordion .table.question-config-stack-table tbody,
            #ratioAccordion .table.question-config-stack-table tr,
            #ratioAccordion .table.question-config-stack-table td {
                display: block;
                width: 100%;
            }

            #ratioAccordion .table.question-config-stack-table tbody {
                display: flex;
                flex-direction: column;
                gap: 0.72rem;
            }

            #ratioAccordion .table.question-config-stack-table tr {
                border: 1px solid #dbe6f5;
                border-radius: 16px;
                background: #fff;
                padding: 0.8rem 0.85rem;
                box-shadow: 0 8px 20px rgba(148, 163, 184, 0.12);
            }

            #ratioAccordion .table.question-config-stack-table td {
                border: 0 !important;
                padding: 0.38rem 0 !important;
                text-align: left !important;
            }

            #ratioAccordion .table.question-config-stack-table td[data-label]::before {
                content: attr(data-label);
                display: block;
                font-size: 0.72rem;
                font-weight: 800;
                color: #6a7a90;
                letter-spacing: 0.02em;
                margin-bottom: 0.28rem;
            }

            #ratioAccordion .table.question-config-stack-table td .input-group,
            #ratioAccordion .table.question-config-stack-table td .form-control,
            #ratioAccordion .table.question-config-stack-table td .form-select {
                width: 100%;
            }

            /* 移动端表格会堆叠成卡片，取消桌面端的固定占比列宽，避免横向溢出。 */
            #ratioAccordion .matrix-ratio-cell,
            #ratioAccordion .matrix-ratio-header {
                width: 100%;
                min-width: 0;
            }

            #ratioAccordion .matrix-ratio-cell > .input-group,
            #ratioAccordion .matrix-ratio-input-group {
                width: 100%;
                min-width: 0;
            }

            #ratioAccordion .matrix-cell-input {
                min-width: 0;
            }

            #ratioAccordion .btn-group {
                display: grid;
                grid-template-columns: 1fr;
                gap: 0.5rem;
                width: 100%;
            }

            #ratioAccordion .d-flex.justify-content-between {
                flex-direction: column;
                align-items: stretch !important;
                gap: 0.65rem;
            }

            #ratioAccordion .badge.bg-info,
            #ratioAccordion .badge.bg-success,
            #ratioAccordion .badge.bg-warning,
            #ratioAccordion .badge.bg-secondary {
                align-self: flex-start;
            }

            .site-footer-inner {
                padding: 1rem;
            }

            .site-footer-meta {
                align-items: flex-start;
                flex-direction: column;
                gap: 0.35rem;
            }
        }

        /* 手机端工作台：把“配置 → 任务 → 日志”变成可单手完成的独立视图。 */
        .mobile-workspace-nav {
            display: none;
        }

        @media (max-width: 768px) {
            html {
                scroll-padding-top: 76px;
            }

            body:not(.desktop-mode) {
                padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
                overflow-x: hidden;
            }

            body:not(.desktop-mode) .navbar {
                position: sticky;
                top: 0;
                z-index: 1035;
                padding-top: calc(0.58rem + env(safe-area-inset-top, 0px));
                padding-bottom: 0.58rem;
                background: rgba(255, 255, 255, 0.97);
                backdrop-filter: blur(14px);
                -webkit-backdrop-filter: blur(14px);
            }

            body:not(.desktop-mode) .navbar .container-fluid {
                display: grid;
                grid-template-columns: minmax(0, 1fr) auto;
                gap: 0.55rem 0.75rem;
            }

            body:not(.desktop-mode) .navbar-brand {
                min-width: 0;
                margin: 0;
                overflow: hidden;
                white-space: nowrap;
                text-overflow: ellipsis;
            }

            body:not(.desktop-mode) .navbar-brand small,
            body:not(.desktop-mode) #navDownloadLink {
                display: none !important;
            }

            body:not(.desktop-mode) .nav-actions {
                width: auto;
                display: flex;
                flex-wrap: nowrap;
                align-items: center;
                justify-content: flex-end;
                gap: 0.45rem;
            }

            body:not(.desktop-mode) .server-switcher-btn,
            body:not(.desktop-mode) .nav-actions > .btn {
                min-height: 44px;
                padding: 0.55rem 0.7rem;
                font-size: 0.78rem;
                border-radius: 12px;
            }

            body:not(.desktop-mode) .server-switcher-dropdown {
                position: fixed;
                top: calc(66px + env(safe-area-inset-top, 0px));
                left: 12px;
                right: 12px;
                width: auto;
                min-width: 0;
                border-radius: 16px;
                box-shadow: 0 20px 44px rgba(15, 23, 42, 0.22);
            }

            body:not(.desktop-mode) .main-container {
                width: 100%;
                max-width: 100%;
                margin: 0;
                padding: 0.75rem;
            }

            body:not(.desktop-mode) .main-container > .row {
                --bs-gutter-x: 0;
                --bs-gutter-y: 0;
                margin: 0;
            }

            body:not(.desktop-mode) #viewConfigPanel,
            body:not(.desktop-mode) #viewTasksPanel {
                width: 100%;
                max-width: 100%;
                padding: 0;
            }

            body:not(.desktop-mode).mobile-workspace-view-config #viewTasksPanel,
            body:not(.desktop-mode).mobile-workspace-view-tasks #viewConfigPanel,
            body:not(.desktop-mode).mobile-workspace-view-logs #viewConfigPanel {
                display: none !important;
            }

            body:not(.desktop-mode).mobile-workspace-view-config #viewConfigPanel,
            body:not(.desktop-mode).mobile-workspace-view-tasks #viewTasksPanel,
            body:not(.desktop-mode).mobile-workspace-view-logs #viewTasksPanel {
                display: block !important;
            }

            /* 通知公告独立视图（#announcements）：手机端同样单独一页。 */
            body:not(.desktop-mode):not(.mobile-workspace-view-announcements) #viewAnnouncementsPanel {
                display: none;
            }
            body:not(.desktop-mode).mobile-workspace-view-announcements #viewConfigPanel,
            body:not(.desktop-mode).mobile-workspace-view-announcements #viewTasksPanel,
            body:not(.desktop-mode).mobile-workspace-view-announcements #viewReportsPanel {
                display: none !important;
            }
            body:not(.desktop-mode).mobile-workspace-view-announcements #viewAnnouncementsPanel {
                display: block !important;
            }

            body:not(.desktop-mode).mobile-workspace-view-tasks #runtimeLogCard {
                display: none !important;
            }
            body:not(.desktop-mode).mobile-workspace-view-tasks .site-footer { display: none; }

            body:not(.desktop-mode).mobile-workspace-view-logs #taskListCard {
                display: none !important;
            }

            body:not(.desktop-mode).mobile-workspace-view-logs #runtimeLogCard {
                display: block !important;
            }

            .mobile-workspace-nav {
                position: fixed;
                z-index: 1040;
                left: 10px;
                right: 10px;
                bottom: calc(8px + env(safe-area-inset-bottom, 0px));
                display: grid;
                /* 与桌面侧栏同一份视图清单：任务配置 / 数据分析报告 / 任务列表 /
                   通知公告 —— 四个入口，所以是四列。 */
                grid-template-columns: repeat(4, minmax(0, 1fr));
                gap: 5px;
                padding: 6px;
                border: 1px solid rgba(148, 163, 184, 0.34);
                border-radius: 18px;
                background: rgba(255, 255, 255, 0.97);
                backdrop-filter: blur(16px);
                -webkit-backdrop-filter: blur(16px);
                box-shadow: 0 16px 38px rgba(15, 23, 42, 0.22);
            }

            .mobile-workspace-nav.has-runtime-logs {
                /* 运行日志只在手机底栏留位（清单里的 mobile 入口不含它），
                   列数仍与入口数一致。 */
                grid-template-columns: repeat(4, minmax(0, 1fr));
            }

            .mobile-workspace-nav__button {
                position: relative;
                min-width: 0;
                min-height: 52px;
                border: 0;
                border-radius: 13px;
                background: transparent;
                color: #64748b;
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                gap: 2px;
                font-size: 0.72rem;
                font-weight: 800;
                line-height: 1.15;
                touch-action: manipulation;
            }

            .mobile-workspace-nav__button i {
                font-size: 1.18rem;
                line-height: 1;
            }

            .mobile-workspace-nav__button.is-active {
                color: #fff;
                background: linear-gradient(135deg, #1e40af, #3b82f6);
                box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
            }

            .mobile-workspace-nav__badge {
                position: absolute;
                top: 4px;
                right: calc(50% - 22px);
                min-width: 17px;
                height: 17px;
                padding: 0 4px;
                border-radius: 999px;
                background: #ef4444;
                color: #fff;
                border: 2px solid #fff;
                font-size: 0.62rem;
                line-height: 13px;
                text-align: center;
            }

            .mobile-workspace-nav__badge[data-count="0"] {
                display: none;
            }

            .card {
                border-radius: 16px;
            }

            .card-header {
                min-height: 52px;
                padding: 0.85rem 0.9rem;
                flex-wrap: wrap;
                line-height: 1.35;
            }

            .card-header .btn.ms-auto {
                min-width: 44px;
                margin-left: auto !important;
            }

            .card-body {
                padding: 0.82rem;
            }

            .form-control,
            .form-select,
            textarea.form-control,
            .input-group .form-control {
                min-height: 44px;
                font-size: 16px;
            }

            textarea.form-control {
                line-height: 1.55;
            }

            .btn,
            button,
            [role="button"] {
                touch-action: manipulation;
            }

            .section-title {
                scroll-margin-top: 82px;
                padding-bottom: 0.55rem;
                border-bottom-width: 2px;
            }

            #viewConfigPanel .d-flex.justify-content-between,
            #viewConfigPanel .d-flex.align-items-center.justify-content-between {
                flex-wrap: wrap;
                gap: 0.55rem;
            }

            #taskListCard .card-body > .input-group,
            #taskListCard .card-body > .input-group.input-group-sm {
                display: grid;
                grid-template-columns: minmax(0, 1fr) auto;
                gap: 0.45rem;
            }

            #taskListCard .input-group > .form-control,
            #taskListCard .input-group > .btn {
                width: 100%;
                border-radius: 10px !important;
            }

            .task-item {
                padding: 0.9rem;
                margin-bottom: 0.8rem;
                border-radius: 16px;
            }

            .task-id {
                width: 100%;
                overflow-wrap: anywhere;
                line-height: 1.55;
            }

            .task-url {
                max-height: 3.2em;
                overflow: hidden;
                display: -webkit-box;
                -webkit-line-clamp: 2;
                -webkit-box-orient: vertical;
            }

            .task-stats,
            .task-config-chips {
                display: grid;
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 0.45rem;
            }

            .task-config-chip,
            .task-stats > span {
                min-width: 0;
                white-space: normal;
                overflow-wrap: anywhere;
            }

            .task-meta {
                line-height: 1.72;
                overflow-wrap: anywhere;
            }

            .task-action-panel {
                padding: 0.65rem;
                border-radius: 14px;
            }

            .task-action-panel .btn.task-action-btn {
                min-height: 44px;
                flex: 1 1 calc(50% - 0.45rem);
            }

            .log-console {
                height: calc(100dvh - 220px);
                min-height: 360px;
            }

            .modal-dialog,
            .modal-dialog.modal-xl,
            .modal-dialog.modal-dialog-scrollable,
            .modal-dialog.modal-dialog-centered {
                min-height: 100dvh;
                height: 100dvh;
            }

            .modal-content {
                min-height: 100dvh;
                height: 100dvh;
                overflow: hidden;
            }

            .modal-header {
                position: sticky;
                top: 0;
                z-index: 8;
                flex: 0 0 auto;
                padding-top: calc(0.85rem + env(safe-area-inset-top, 0px));
                border-radius: 0;
            }

            .modal-body {
                flex: 1 1 auto;
                min-height: 0;
                overscroll-behavior: contain;
            }

            #configTabs {
                position: sticky;
                top: -0.9rem;
                z-index: 7;
                margin: -0.9rem -0.9rem 0.9rem;
                padding: 0.65rem 0.85rem 0;
                background: rgba(255, 255, 255, 0.98);
                box-shadow: 0 6px 14px rgba(15, 23, 42, 0.05);
                scroll-snap-type: x proximity;
            }

            #configTabs .nav-item {
                scroll-snap-align: start;
            }

            #ratioConfigModal .modal-footer {
                display: grid;
                grid-template-columns: repeat(2, minmax(0, 1fr));
                padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
            }

            #ratioConfigModal .modal-footer .btn {
                width: 100%;
                min-width: 0;
                margin: 0;
            }

            #ratioConfigModal .modal-footer .btn-secondary {
                grid-column: 1 / -1;
                grid-row: 2;
            }

            /* 高级配置中的关系表在手机上改为字段卡片，不再要求横向拖动一千多像素。 */
            .analysis-relation-table-wrap {
                overflow: visible;
                border: 0;
                background: transparent;
            }

            .analysis-relation-table {
                display: block;
                min-width: 0 !important;
                width: 100%;
                border: 0 !important;
                background: transparent;
            }

            .analysis-relation-table thead {
                display: none;
            }

            .analysis-relation-table tbody {
                display: grid;
                gap: 0.8rem;
            }

            .analysis-relation-table tbody tr {
                display: grid;
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 0.65rem;
                width: 100%;
                padding: 0.85rem;
                border: 1px solid #dbe6f5;
                border-radius: 16px;
                background: #fff;
                box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
            }

            .analysis-relation-table tbody td {
                display: block;
                width: auto !important;
                min-width: 0 !important;
                padding: 0 !important;
                border: 0 !important;
                white-space: normal !important;
                overflow: visible !important;
            }

            .analysis-relation-table tbody td:nth-child(1),
            .analysis-relation-table tbody td:nth-child(2),
            .analysis-relation-table tbody td:nth-child(5) {
                grid-column: 1 / -1;
            }

            .analysis-relation-table tbody td::before {
                display: block;
                margin-bottom: 0.3rem;
                color: #64748b;
                font-size: 0.71rem;
                font-weight: 800;
                letter-spacing: 0.02em;
            }

            .analysis-relation-table tbody td:nth-child(1)::before { content: "起点 / 维度 A"; }
            .analysis-relation-table tbody td:nth-child(2)::before { content: "终点 / 维度 B"; }
            .analysis-relation-table tbody td:nth-child(3)::before { content: "方向"; }
            .analysis-relation-table tbody td:nth-child(4)::before { content: "强度范围"; }
            .analysis-relation-table tbody td:nth-child(5)::before { content: "显著性目标"; }
            .analysis-relation-table tbody td:nth-child(6)::before { content: "操作"; }

            .analysis-relation-table .form-control,
            .analysis-relation-table .form-select,
            .analysis-relation-table .relation-range-input {
                width: 100%;
                min-width: 0;
            }

            .analysis-relation-table .relation-range-input .form-control {
                min-width: 0;
            }

            .analysis-relation-table tbody td:nth-child(6) .btn {
                width: 100%;
                min-height: 44px;
            }

            .table-responsive::before {
                content: "表格可左右滑动查看完整内容";
                display: block;
                position: sticky;
                left: 0;
                padding: 0.42rem 0.65rem;
                color: #64748b;
                background: #f8fafc;
                border-bottom: 1px solid #e2e8f0;
                font-size: 0.72rem;
                font-weight: 700;
            }

            .analysis-relation-table-wrap::before,
            #ratioAccordion .table-responsive::before {
                display: none;
            }

            .site-footer {
                padding: 0 0.75rem 0.75rem;
            }
        }

        @media (max-width: 390px) {
            body:not(.desktop-mode) .navbar .container-fluid {
                grid-template-columns: 1fr;
            }

            body:not(.desktop-mode) .nav-actions {
                width: 100%;
                justify-content: stretch;
            }

            body:not(.desktop-mode) .nav-actions > .server-switcher,
            body:not(.desktop-mode) .nav-actions > .btn {
                flex: 1 1 0;
            }

            body:not(.desktop-mode) .server-switcher-btn {
                width: 100%;
                justify-content: center;
            }

            .task-stats,
            .task-config-chips {
                grid-template-columns: 1fr;
            }

            .analysis-relation-table tbody tr {
                grid-template-columns: 1fr;
            }

            .analysis-relation-table tbody td {
                grid-column: 1 / -1 !important;
            }
        }

        body.desktop-mode .mobile-workspace-nav {
            display: none !important;
        }

        /* 工具提示 */
        .tooltip-icon {
            color: var(--text-muted);
            cursor: help;
            margin-left: 4px;
        }

        /* 动画 */
        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }

        .loading {
            animation: pulse 1.5s ease-in-out infinite;
        }

        /* 开关样式 */
        .form-check-input:checked {
            background-color: var(--primary-color);
            border-color: var(--primary-color);
        }

        /* 模态框 */
        .modal-content {
            border: none;
            border-radius: var(--border-radius);
            box-shadow: var(--shadow-lg);
        }

        /* 数据生成配置是长表单，桌面端尽量使用完整视口并只保留一层正文滚动。 */
        @media (min-width: 768px) {
            #ratioConfigModal .modal-dialog {
                width: calc(100vw - 1rem);
                max-width: 1680px;
                height: calc(100vh - 1.5rem);
                height: calc(100dvh - 1.5rem);
                margin: 0.75rem auto;
            }

            #ratioConfigModal .modal-content {
                height: 100%;
                max-height: none;
                overflow: hidden;
            }
        }

        #ratioConfigModal .modal-content {
            border: 1px solid rgba(190, 207, 229, 0.9);
            box-shadow: 0 28px 80px rgba(22, 49, 88, 0.22), 0 5px 18px rgba(22, 49, 88, 0.08);
        }

        #ratioConfigModal .modal-header {
            position: relative;
            isolation: isolate;
            overflow: hidden;
            background: linear-gradient(108deg, #234f9c 0%, #2f6fd1 58%, #4389e5 100%);
        }

        #ratioConfigModal .modal-header::after {
            content: "";
            position: absolute;
            z-index: -1;
            right: 4%;
            top: -70px;
            width: 270px;
            height: 160px;
            border-radius: 50%;
            background: radial-gradient(circle, rgba(255, 255, 255, 0.2), transparent 70%);
            pointer-events: none;
        }

        #ratioConfigModal .modal-body {
            color: #26384f;
            background: linear-gradient(180deg, #fbfdff 0%, #f8fafc 100%);
        }

        #ratioConfigModal .nav-tabs .nav-link {
            color: #52647b;
            font-weight: 650;
        }

        #ratioConfigModal .nav-tabs .nav-link.active {
            color: #235db7;
            background: #fff;
            box-shadow: 0 -2px 10px rgba(52, 105, 183, 0.06);
        }

        #ratioConfigModal .modal-body {
            min-height: 0;
            overflow-y: auto;
            overscroll-behavior: contain;
        }

        @media (max-width: 767.98px) {
            .native-survey-container {
                padding: 0.55rem;
                border-radius: 12px;
            }

            .native-survey-page {
                border-radius: 11px;
            }

            .native-survey-header,
            .native-survey-body {
                padding-left: 1rem;
                padding-right: 1rem;
            }
        }

        #ratioConfigModal #ratioConfigContainer {
            max-height: none !important;
            overflow: visible !important;
        }

        .modal.modal-stack-parent {
            z-index: 1055;
        }

        .modal.modal-stack-top {
            z-index: 1085;
        }

        .modal-backdrop.modal-stack-top-backdrop {
            z-index: 1080;
        }

        .modal-header {
            background: var(--gradient-primary);
            color: white;
            border-radius: var(--border-radius) var(--border-radius) 0 0;
        }

        .modal-title {
            font-weight: 600;
        }

        .btn-close {
            opacity: 0.6;
        }
        .btn-close:hover {
            opacity: 1;
        }

        /* Desktop mode: hide elements not needed in local desktop app */
        body.desktop-mode .desktop-only-hide { display: none !important; }
        body.desktop-mode .server-switcher { display: none !important; }
        body.desktop-mode #navStats { display: none !important; }
        .desktop-only-show { display: none !important; }
        body.desktop-mode .desktop-only-show { display: inline-flex !important; }

        /* Desktop mode: enhanced app-like styling */
        body.desktop-mode .navbar {
            -webkit-app-region: drag;
            user-select: none;
        }
        body.desktop-mode .navbar .btn,
        body.desktop-mode .navbar .nav-actions {
            -webkit-app-region: no-drag;
        }
        /* Desktop mode: ensure modals are clickable (not captured by drag region) */
        body.desktop-mode .modal,
        body.desktop-mode .modal-backdrop,
        body.desktop-mode .modal * {
            -webkit-app-region: no-drag !important;
        }
        .desktop-version-badge {
            display: none;
            font-size: 0.68rem;
            padding: 0.15rem 0.5rem;
            border-radius: 6px;
            background: rgba(99, 102, 241, 0.12);
            color: #6366f1;
            font-weight: 600;
            letter-spacing: 0.02em;
            border: 1px solid rgba(99, 102, 241, 0.2);
        }
        body.desktop-mode .desktop-version-badge { display: inline-block; }

        /* Desktop status bar */
        .desktop-statusbar {
            display: none;
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            height: 28px;
            background: #f8fafc;
            border-top: 1px solid #e2e8f0;
            padding: 0 16px;
            align-items: center;
            justify-content: space-between;
            font-size: 0.72rem;
            color: #64748b;
            z-index: 1040;
        }
        body.desktop-mode .desktop-statusbar { display: flex; }
        body.desktop-mode { padding-bottom: 28px; }
        .desktop-statusbar .status-left,
        .desktop-statusbar .status-right {
            display: flex;
            align-items: center;
            gap: 14px;
        }
        .desktop-statusbar .status-dot {
            width: 7px;
            height: 7px;
            border-radius: 50%;
            display: inline-block;
            margin-right: 4px;
        }
        .desktop-statusbar .status-dot.online { background: #22c55e; }
        .desktop-statusbar .status-dot.offline { background: #ef4444; }
        .desktop-statusbar .status-dot.checking { background: #f59e0b; }

        /* Desktop mode: app-like layout density */
        body.desktop-mode .navbar {
            padding: 0.5rem 0;
        }
        body.desktop-mode .navbar-brand {
            font-size: 1.25rem;
            gap: 8px;
        }
        body.desktop-mode .navbar-brand img {
            height: 32px;
        }
        body.desktop-mode .main-container {
            max-width: 100%;
            padding: 1.25rem 1.5rem;
        }
        body.desktop-mode .card {
            border-radius: 10px;
        }
        body.desktop-mode .card-header {
            padding: 0.75rem 1rem;
        }
        body.desktop-mode .card-body {
            padding: 1rem;
        }

        /* Desktop sidebar navigation */
        .desktop-sidebar {
            display: none;
            position: fixed;
            top: 0; left: 0; bottom: 0;
            width: 200px;
            background: #f8fafc;
            border-right: 1px solid #e2e8f0;
            z-index: 1030;
            flex-direction: column;
            justify-content: space-between;
            padding: 0;
            -webkit-app-region: no-drag;
        }
        body.desktop-mode .desktop-sidebar { display: flex; }
        body.desktop-mode .navbar {
            left: 200px;
            width: calc(100% - 200px);
        }
        body.desktop-mode .main-container {
            margin-left: 200px;
            max-width: calc(100% - 200px);
            padding: 1.25rem 1.5rem;
        }
        body.desktop-mode .desktop-statusbar {
            left: 200px;
            width: calc(100% - 200px);
        }
        .desktop-sidebar-nav {
            padding: 60px 12px 12px;
            display: flex;
            flex-direction: column;
            gap: 4px;
        }
        .sidebar-bottom {
            padding: 12px;
            border-top: 1px solid #e2e8f0;
        }
        .sidebar-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 14px;
            border-radius: 8px;
            font-size: 0.88rem;
            font-weight: 500;
            color: #475569;
            cursor: pointer;
            transition: all 0.15s ease;
            user-select: none;
        }
        .sidebar-item:hover {
            background: #e2e8f0;
            color: #1e293b;
        }
        .sidebar-item.active {
            background: rgba(99, 102, 241, 0.1);
            color: #6366f1;
            font-weight: 600;
        }
        .sidebar-item i {
            font-size: 1.1rem;
            width: 20px;
            text-align: center;
        }

        /* Desktop view switching */
        body.desktop-mode.view-config #viewTasksPanel { display: none; }
        body.desktop-mode.view-config #viewConfigPanel {
            flex: 0 0 100%;
            max-width: 100%;
        }
        body.desktop-mode.view-tasks #viewConfigPanel { display: none; }
        body.desktop-mode.view-tasks #viewTasksPanel {
            flex: 0 0 100%;
            max-width: 100%;
        }
        body.desktop-mode.view-tasks #runtimeLogCard { display: none; }
        body.desktop-mode:not(.view-reports) #viewReportsPanel { display: none; }
        body.desktop-mode.view-reports #viewConfigPanel,
        body.desktop-mode.view-reports #viewTasksPanel { display: none; }
        body:not(.desktop-mode):not(.mobile-workspace-view-reports) #viewReportsPanel { display: none; }
        body:not(.desktop-mode).mobile-workspace-view-reports #viewConfigPanel,
        body:not(.desktop-mode).mobile-workspace-view-reports #viewTasksPanel { display: none!important; }
        body.desktop-mode.view-logs #viewConfigPanel { display: none; }
        body.desktop-mode.view-logs #viewTasksPanel .card.mb-4 { display: none; }
        body.desktop-mode.view-logs #viewTasksPanel {
            flex: 0 0 100%;
            max-width: 100%;
        }
        body.desktop-mode.view-logs #runtimeLogCard {
            display: block !important;
            max-width: 100%;
        }
        /* 通知公告独立视图（#announcements）：公告有自己的面板，
           别的视图一律不显示它（配置页也不再塞公告板）。 */
        body.desktop-mode:not(.view-announcements) #viewAnnouncementsPanel { display: none; }
        body.desktop-mode.view-announcements #viewConfigPanel,
        body.desktop-mode.view-announcements #viewTasksPanel,
        body.desktop-mode.view-announcements #viewReportsPanel { display: none; }
        body.desktop-mode.view-announcements #viewAnnouncementsPanel {
            display: block;
            flex: 0 0 100%;
            max-width: 100%;
        }
        .mobile-input-tools {
            display: flex;
            align-items: center;
            gap: .45rem;
            flex-wrap: wrap;
            margin-top: .5rem;
        }
        .mobile-input-tools .answer-count-badge { margin-left: auto; }
        .quick-number-generator {
            margin-top: .7rem;
            padding: .75rem;
            border: 1px solid #bfdbfe;
            border-radius: .75rem;
            background: #f8fbff;
        }
        .quick-number-grid {
            display: grid;
            grid-template-columns: minmax(140px,1.2fr) repeat(2,minmax(92px,.7fr)) auto auto;
            gap: .55rem;
            align-items: end;
        }
        .quick-number-grid label { font-size: .76rem; color: #475569; margin-bottom: .25rem; }
        .quick-number-grid .form-check { min-height: 38px; display:flex; align-items:center; gap:.35rem; padding-left:0; }
        .quick-number-grid .form-check-input { margin:0; float:none; }
        .url-input-actions { display:flex; gap:.55rem; align-items:stretch; }
        .url-input-actions > input { min-width:0; }

        /* ─── 问卷链接与目标样本量：紧凑化（2026-10-21 用户反馈） ───
           用户原话：「问卷链接填写框，一键粘贴链接，清空…这些组件太大了，
           需要设计处理好，不美观」。
           实测（1440 视口）：链接输入框 751×72、两个按钮 72px 高，
           按钮文字被挤成「一键粘/贴链接」「清/空」两行竖排。
           根因是 .btn 作为 flex item 默认可压缩（flex-shrink:1），
           空间不够时标题被压到 min-content（中文一个字）。
           这里让按钮**不参与压缩、且文字不折行**，宽度让给链接输入框。 */
        .url-input-actions { align-items:center; gap:.5rem; }
        .url-input-actions > input { flex:1 1 auto; }
        .url-input-actions > .btn {
            flex:0 0 auto;
            white-space:nowrap;
        }
        /* 配置面板整体降一档密度：控件高度与字号统一，别再各占各的一大块。 */
        .config-list .form-control,
        .config-list .input-group-text {
            padding: .4rem .6rem;
            font-size: .9rem;
        }
        .config-list .btn {
            padding: .38rem .65rem;
            font-size: .875rem;
        }
        .config-list > dt { padding: 8px 12px 2px; font-size: .82rem; }
        .config-list > dd { padding: 0 12px 10px; }
        @media (min-width: 768px) {
            .config-list > dt { padding: 7px 14px 7px 12px; min-height: 34px; }
            .config-list > dd { padding: 7px 12px 7px 0; min-height: 34px; }
        }
        /* 目标样本数是个数字框，铺满整行既难看又误导（看着像按钮）。 */
        #smartFillTargetSampleCard .input-group { max-width: 260px; }
        #smartFillTargetSampleCard .yan-note { max-width: 620px; }
        /* 多问卷说明条是插在 card-body（p-0）里的，不加内边距会直接压在卡片
           左边框上（用户截图里就是"文字跑到卡片外面"）。 */
        #studyInlineMultiSurvey { padding: 0 12px; }

        /* ─── 解析完成后的三个配置入口：紧凑动作卡片（2026-10-21） ───
           原来用 .btn.btn-lg + min-height:56px + h-100 的实心大按钮：
           1) 三个入口各占 1/3 屏宽、字号 21px，占地方；
           2) 窗口一窄，标题就被 flex 压成竖排「配/置/题/目/占/比」。
           改成轻量动作卡片：图标 + 标题 + 小徽标，单行不折行；
           标题白名单固定（white-space:nowrap），窄屏时整列堆叠而不是压字。 */
        .config-action-row {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 10px;
        }
        .config-action-tile {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 8px;
            width: 100%;
            padding: 7px 11px;
            border: 1px solid var(--border-color, #e2e8f0);
            border-radius: 10px;
            background: #fff;
            color: var(--text-primary, #0f172a);
            font-size: .92rem;
            font-weight: 600;
            line-height: 1.35;
            text-align: left;
            cursor: pointer;
            transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
        }
        .config-action-tile:hover {
            box-shadow: 0 2px 10px rgba(15, 23, 42, .09);
        }
        .config-action-tile__icon { flex:0 0 auto; font-size: 1rem; }
        /* 2026-10-26 用户反馈：「配置题目占比 / 维度设置 / 二阶模型配置」三个入口
           文字不够显眼，用户经常找不到。标题改成红色字体（只改标题，不动徽标
           与图标配色），三个入口统一用红色，hover 时再加深一档。
           取 #c0272d 而不是 --danger-color(#dc2626)：后者在这三个浅色底上
           对比度只有 4.50~4.59，卡在 WCAG AA 边界；#c0272d 是 5.49~5.59。 */
        .config-action-tile__title {
            flex:0 0 auto;
            white-space: nowrap;
            color: #c0272d;
            font-weight: 700;
        }
        .config-action-tile:hover .config-action-tile__title {
            color: #a51d22;
        }
        .config-action-tile__badge {
            margin-left: auto;
            flex:0 0 auto;
            font-size: .68rem;
            padding: .16rem .45rem;
        }
        .config-action-tile--primary { background: #f5f8ff; border-color: #d7e2fb; }
        .config-action-tile--primary .config-action-tile__icon { color: var(--primary-color, #1e3a8a); }
        .config-action-tile--success { background: #f3fbf7; border-color: #cfeee1; }
        .config-action-tile--success .config-action-tile__icon { color: var(--success-color, #059669); }
        .config-action-tile--indigo { background: #f7f6ff; border-color: #e0dcfa; }
        .config-action-tile--indigo .config-action-tile__icon { color: #4338ca; }
        @media (max-width: 767.98px) {
            .config-action-row { grid-template-columns: 1fr; }
        }
        @media (max-width: 767.98px) {
            .mobile-input-tools .btn, .quick-number-grid .btn, .url-input-actions .btn { min-height:44px; }
            .mobile-input-tools .answer-count-badge { width:100%; margin-left:0; padding:.55rem .7rem; text-align:center; }
            .quick-number-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
            .quick-number-grid > :first-child, .quick-number-grid > :last-child { grid-column:1 / -1; }
            .quick-number-grid .btn { width:100%; }
            .quick-number-generator { padding:.65rem; }
            .url-input-actions { flex-direction:column; }
            textarea.ratio-input, textarea.followup-input, textarea.matrix-text-pool-input { min-height:118px; font-size:16px; }
        }
        /* ── 图片放大查看（2026-10-21 用户反馈：「图片不可以放大查看」）── */
        .is-zoomable { cursor: zoom-in; }
        .yan-image-lightbox {
            position: fixed;
            inset: 0;
            z-index: 1090;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 24px;
        }
        .yan-image-lightbox__backdrop {
            position: absolute;
            inset: 0;
            background: rgba(15, 23, 42, .78);
        }
        .yan-image-lightbox__panel {
            position: relative;
            margin: 0;
            max-width: min(92vw, 1100px);
            max-height: 88vh;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 10px;
        }
        .yan-image-lightbox__img {
            max-width: 100%;
            max-height: 78vh;
            object-fit: contain;
            border-radius: 10px;
            background: #fff;
            box-shadow: 0 18px 48px rgba(15, 23, 42, .45);
        }
        .yan-image-lightbox__caption {
            color: #e2e8f0;
            font-size: .84rem;
            text-align: center;
            max-width: 80vw;
        }
        .yan-image-lightbox__close {
            position: absolute;
            top: -14px;
            right: -14px;
            width: 34px;
            height: 34px;
            border: 0;
            border-radius: 50%;
            background: #fff;
            color: #0f172a;
            font-size: 1.25rem;
            line-height: 1;
            cursor: pointer;
            box-shadow: 0 4px 14px rgba(15, 23, 42, .35);
        }
        .yan-image-lightbox__close:hover { background: #e2e8f0; }

        /* ─── 数字输入 −/+ 步进按钮（替代被 Bootstrap 隐藏的原生箭头） ─── */
        .number-stepper-btn {
            flex: 0 0 auto;
            min-width: 24px;
            padding: 0 .3rem;
            font-size: .85rem;
            line-height: 1.4;
            border: 1px solid var(--bs-border-color, #ced4da);
            background: var(--bs-secondary-bg, #f6f7f8);
            color: var(--bs-secondary-color, #495057);
            cursor: pointer;
            user-select: none;
            -webkit-user-select: none;
            border-radius: 0;
        }
        .number-stepper-btn:hover { background: #e9ecef; color: #212529; }
        .number-stepper-btn:active { background: #dee2e6; color: #000; }
        .referral-stat-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
        .referral-stat { min-width:0; padding:12px; border:1px solid #dee2e6; border-radius:8px; background:#f8f9fa; }
        .referral-stat span { display:block; color:#6c757d; font-size:.78rem; }
        .referral-stat strong { display:block; margin-top:4px; font-size:1.08rem; overflow-wrap:anywhere; }
        .referral-link-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; }
        .referral-orders-wrap { max-height:300px; overflow:auto; border:1px solid #dee2e6; border-radius:8px; }
        .referral-orders-wrap table { margin:0; min-width:680px; }
        @media (max-width: 767px) {
            .referral-stat-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
            .referral-link-row { grid-template-columns:1fr; }
        }

        /* Keep manual region entrances and existing controls legible on phones. */
        @media (max-width: 600px) {
            body:not(.desktop-mode) .navbar .container-fluid { grid-template-columns: 1fr !important; }
            body:not(.desktop-mode) .navbar .nav-actions {
                display: grid !important;
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 8px;
                width: 100%;
            }
            body:not(.desktop-mode) .navbar .nav-actions > .btn {
                width: 100%;
                min-width: 0;
                min-height: 42px;
                padding: 8px 4px;
                white-space: nowrap;
                word-break: keep-all;
                font-size: 12px;
            }
        }
    

/* Shared compact fill-answer actions: identical behavior and visual weight in
   the domestic and overseas entrypoints. */
.whole-text-generation-actions {
    display: inline-flex;
    flex: 0 1 auto;
    max-width: 520px;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.native-survey-question__instruction {
    margin: -0.15rem 0 1rem 2.2rem;
    color: #62738a;
    font-size: 0.92rem;
    line-height: 1.65;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.whole-text-generation-button { width: auto !important; min-width: 0; white-space: nowrap; box-shadow: 0 5px 14px rgba(37, 99, 235, .18); }

/* ── 2026-10-20 数据生成配置改造 ─────────────────────────────────── */

/* 用户反馈：「检查配置、检查结果、随机高分/正态/低分分布、原生页面视图这些按钮
   太高了，不美观」。
   根因：这一行是 .d-flex，默认 align-items:stretch —— 6 个按钮会被拉伸到整行
   最高元素（带说明文字的竖向容器）的高度。改成 center + 按钮自身高度自适应。 */
.ratio-config-toolbar {
    align-items: center;
}
.ratio-config-toolbar > .btn {
    flex: 0 0 auto;
    height: auto;
    padding: 0.28rem 0.72rem;
    line-height: 1.45;
}
.ratio-config-toolbar .whole-text-generation-actions {
    align-self: center;
}
.ratio-config-toolbar .native-survey-toggle-bar {
    align-self: center;
}

/* 用户反馈：「归属维度、目标均值、反向计分这三个是不是可以直接放在一行中呢，
   不要占这么多行，因子载荷就不显示了」。
   一行三列，紧跟选项表。 */
/* 随机情景题：情景选择器（2026-10-20）。见数的随机情景题每位受访者只看
   到其中一个情景，各情景的引言、图片/视频素材与题目都不同，所以解析后要让
   用户逐个查看、选定一个用于生成。 */
.scenario-picker {
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    background: linear-gradient(180deg, #f5f9ff, #ffffff 60%);
}
.scenario-picker__head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #1e3a8a;
}
.scenario-picker__head .small { font-weight: 400; }
/* 折叠形态（各情景题目相同、只是素材不同）的说明：让用户知道题目不会变 */
.scenario-picker__note {
    margin: -2px 0 10px;
    font-size: 0.76rem;
    line-height: 1.6;
    color: #475569;
}
.scenario-picker__list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
}
.scenario-card {
    display: block;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}
.scenario-card:hover { border-color: #93c5fd; }
.scenario-card.is-active {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.scenario-card__head {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 5px;
}
.scenario-card__title { font-weight: 700; font-size: 0.86rem; color: #1e293b; }
.scenario-card__count {
    margin-left: auto;
    font-size: 0.72rem;
    color: #2563eb;
    background: #eff6ff;
    border-radius: 999px;
    padding: 1px 8px;
}
.scenario-card__label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 3px;
    overflow-wrap: anywhere;
}
.scenario-card__intro {
    font-size: 0.76rem;
    line-height: 1.6;
    color: #64748b;
    overflow-wrap: anywhere;
}
.scenario-card__media {
    display: flex;
    gap: 6px;
    margin-top: 7px;
    flex-wrap: wrap;
}
.scenario-card__thumb {
    width: 72px;
    height: 54px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #0f172a08;
}

/* 情景/展示材料（引言、图片、视频）内联展示。用户反馈：题目占比配置里
   要能看到完整的问卷内容，包括注释、图片、视频。 */
.native-survey-presentation {
    margin: 0 0 10px 2.2rem;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 3px solid #93c5fd;
    border-radius: 8px;
}
.native-survey-presentation__text {
    font-size: 0.9rem;
    line-height: 1.7;
    color: #334155;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.native-survey-presentation__media {
    display: block;
    max-width: 100%;
    max-height: 260px;
    margin-top: 8px;
    border-radius: 6px;
    background: #0f172a08;
}
@media (max-width: 767.98px) {
    .native-survey-presentation { margin-left: 0; }
}

.q-advanced-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 14px;
    margin: 0 0 10px;
    padding: 8px 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}
.q-advanced-row__item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.q-advanced-row__item--dim {
    flex: 1 1 220px;
}
.q-advanced-row__item--mean {
    flex: 0 1 170px;
}
.q-advanced-row__item--reverse {
    flex: 0 0 auto;
}
.q-advanced-row__label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
    line-height: 1.2;
}
.q-advanced-row__item--reverse .form-check {
    margin: 0;
    min-height: 31px;
    display: flex;
    align-items: center;
    gap: 6px;
}
@media (max-width: 767.98px) {
    .q-advanced-row__item--dim,
    .q-advanced-row__item--mean {
        flex: 1 1 100%;
    }
}

.whole-text-generation-actions #wholeTextGenerationHelp { line-height: 1.35; }
.whole-text-generation-status { font-weight: 600; line-height: 1.35; }
.text-pool-direct-action { display: inline-flex; align-items: flex-start; flex: 0 0 auto; }
#textAnswerBatchButton { white-space: nowrap; }
@media (max-width: 767.98px) {
    .whole-text-generation-actions { flex: 1 1 100%; max-width: 100%; min-width: 0; }
    .whole-text-generation-button, .text-pool-direct-action, #textAnswerBatchButton { width: 100% !important; }
    .text-pool-direct-action { flex-basis: 100%; }
}

/* Purchase and recharge: make the configured bonus visible without inventing a discount. */
#pointsPurchaseModal .modal-content { border: 1px solid #d9e6f5; border-radius: 20px; overflow: hidden; box-shadow: 0 28px 80px rgba(19, 44, 84, .22); }
#pointsPurchaseModal .modal-header { color: #fff; background: linear-gradient(115deg, #1e4597, #3076e9); border: 0; padding: 1rem 1.35rem; }
#pointsPurchaseModal .modal-header .btn-close { filter: brightness(0) invert(1); opacity: .92; }
#pointsPurchaseModal .modal-body { padding: 1.4rem; background: #fbfdff; }
#pointsPurchaseModal .modal-footer { border-top: 1px solid #dfebf7; }
#pointsPurchaseModal .form-label { color: #22354e; font-weight: 650; }
#pointsPurchaseModal .form-control, #pointsPurchaseModal .form-select { border-color: #cbd9ea; border-radius: 10px; min-height: 46px; color: #1b2e49; }
#pointsPurchaseModal .form-control:focus, #pointsPurchaseModal .form-select:focus { border-color: #5b9af4; box-shadow: 0 0 0 3px rgba(58, 132, 237, .12); }
.points-purchase-intro { display: flex; align-items: flex-start; gap: 14px; padding: 18px 20px; margin-bottom: 20px; border: 1px solid #bcd8fa; border-radius: 16px; color: #1e3d65; background: radial-gradient(circle at 96% 0%, rgba(147, 197, 253, .26), transparent 35%), linear-gradient(120deg, #eef7ff, #fff); }
.points-purchase-intro__icon { display: grid; flex: 0 0 42px; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: #1d64d8; background: #dcecff; font-size: 20px; }
.points-purchase-intro strong { display: block; font-size: 1.05rem; color: #173864; }
.points-purchase-intro p { margin-top: 5px; color: #506a88; line-height: 1.55; }
.points-tier-heading, .points-tier-progress__labels, .points-preview__heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px 18px; }
.points-tier-heading { margin-bottom: 12px; }
.points-tier-heading__eyebrow { display: block; color: #4182d9; font-size: .69rem; letter-spacing: .12em; font-weight: 750; }
.points-tier-heading h6 { margin: 2px 0 0; color: #183556; font-size: 1rem; font-weight: 750; }
.points-tier-heading__note, .points-preview__destination { color: #647994; font-size: .82rem; }
.points-tier-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.points-tier-card { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-height: 116px; padding: 13px 15px; border: 1px solid #dbe6f3; border-radius: 14px; color: #526783; background: #fff; }
.points-tier-card.is-reached { border-color: #b5d5fb; background: #f5faff; }
.points-tier-card.is-current { border-color: #42b79a; background: linear-gradient(145deg, #ecfcf6, #fff); box-shadow: 0 7px 18px rgba(14, 150, 111, .1); }
.points-tier-card__badge { color: #607791; font-size: .72rem; font-weight: 700; }
.points-tier-card.is-current .points-tier-card__badge { color: #07836a; }
.points-tier-card__threshold { color: #344c68; font-size: .84rem; }
.points-tier-card strong { margin-top: auto; color: #174b9a; font-size: 1.25rem; letter-spacing: -.02em; }
.points-tier-card.is-current strong { color: #087e68; }
.points-tier-card strong small { font-size: .69em; font-weight: 600; }
.points-tier-progress { margin-top: 12px; padding: 10px 13px; border: 1px solid #deebf7; border-radius: 11px; background: #f7fbff; }
.points-tier-progress__labels { color: #4d6380; font-size: .78rem; font-weight: 600; }
.points-tier-progress__track { height: 6px; overflow: hidden; margin-top: 9px; border-radius: 99px; background: #dceafa; }
.points-tier-progress__track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #4b9ced, #24ae8c); }
.points-tier-empty { padding: 13px 16px; border: 1px dashed #c9d9ed; border-radius: 11px; color: #59718e; background: #f9fcff; }
#pointsPurchasePreview { padding: 18px; border: 1px solid #bed8f5; border-radius: 16px; background: linear-gradient(130deg, #f0f7ff, #fff 62%); box-shadow: 0 7px 20px rgba(32, 92, 168, .06); }
.points-preview__heading { margin-bottom: 12px; color: #1c3d68; font-weight: 750; }
.points-preview__metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.points-preview__metrics > div { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 11px 12px; border: 1px solid #e1eaf5; border-radius: 11px; background: #fff; }
.points-preview__metrics span { color: #61738a; font-size: .77rem; }
.points-preview__metrics strong { margin-top: 3px; overflow-wrap: anywhere; color: #1d3758; font-size: 1.12rem; font-variant-numeric: tabular-nums; }
.points-preview__metrics strong small { font-size: .65em; }
.points-preview__metrics .points-preview__bonus { border-color: #b4e5d3; background: #f0fbf6; }
.points-preview__metrics .points-preview__bonus strong { color: #078568; }
.points-preview__metrics .points-preview__total { border-color: #a9cafa; background: #e9f3ff; }
.points-preview__metrics .points-preview__total strong { color: #1856b7; }
.points-preview__hint { margin-top: 11px; color: #526c89; font-size: .79rem; line-height: 1.55; }
@media (max-width: 760px) {
    #pointsPurchaseModal .modal-body { padding: 1rem; }
    .points-purchase-intro { padding: 14px; }
    .points-preview__metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .points-tier-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Dedicated task and report pages share the existing authenticated workspace. */
.task-list-toolbar,.report-library-tools{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:10px}
.task-list-toolbar input,.report-library-tools input{flex:1 1 280px;min-width:0}
.task-list-toolbar select{flex:0 1 190px;min-width:150px}
.task-list-count{min-height:22px;color:#63758e;font-size:12px;margin-bottom:10px}
.task-item[hidden]{display:none!important}
.report-library-list{display:grid;gap:12px;margin-top:14px}
.report-library-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;align-items:center;border:1px solid #dce6f3;border-radius:14px;padding:17px;background:#fff}
/* 任务卡片/生成批次的「查看报告」定位到某一份时短暂高亮，2.6s 后由 JS 摘掉 */
.report-library-item-active{border-color:#1d4ed8;box-shadow:0 0 0 3px rgba(29,78,216,.16);background:#f5f9ff}
.report-library-item h3{font-size:16px;font-weight:750;color:#183b69;margin:0 0 6px;overflow-wrap:anywhere}
.report-library-item p{font-size:12px;color:#68809d;margin:0;overflow-wrap:anywhere}
.report-library-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.report-library-empty{padding:38px 18px;text-align:center;border:1px dashed #cbd9ec;border-radius:14px;background:#f8fbff;color:#61758e}
.report-history-details{border-top:1px solid #e1e9f4;padding-top:16px}
.report-history-details>summary{cursor:pointer;color:#365c8f;font-weight:650}
.task-query-card{border:1px solid #dce6f3;border-radius:13px;padding:15px;background:#f8fbff}
.task-query-head{display:flex;gap:12px;align-items:flex-start;justify-content:space-between;flex-wrap:wrap}
.task-query-head strong{font-size:15px;color:#1b3b67;overflow-wrap:anywhere}
.task-query-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:12px 0}
.task-query-metrics span{border:1px solid #e0e8f3;border-radius:9px;padding:9px;background:#fff;color:#63748a}
.task-query-metrics b{display:block;margin-top:3px;color:#203d61;font-size:16px}
@media(max-width:768px){
  .mobile-workspace-nav{grid-template-columns:repeat(4,minmax(0,1fr))!important}
  .report-library-item{grid-template-columns:minmax(0,1fr)}
  .report-library-actions{justify-content:flex-start}
  .task-query-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* Contrast contract: Bootstrap subtle headers must never inherit the dark
   gradient intended for white-text major section headers. */
.card-header.bg-primary-subtle {
    background: #eff6ff !important;
    color: #1e3a8a !important;
    border-bottom: 1px solid #dbeafe;
}
.card-header.bg-info-subtle {
    background: #ecfeff !important;
    color: #164e63 !important;
    border-bottom: 1px solid #cffafe;
}
.card-header.bg-light, .card-header.bg-white {
    background: #f8fafc !important;
    color: #1e293b !important;
    border-bottom: 1px solid #e2e8f0;
}
.card-header:is(.bg-primary-subtle, .bg-info-subtle, .bg-light, .bg-white) .text-white,
.card-header:is(.bg-primary-subtle, .bg-info-subtle, .bg-light, .bg-white) .form-check-label {
    color: inherit !important;
}
.card-header:is(.bg-primary-subtle, .bg-info-subtle, .bg-light, .bg-white) .btn-outline-primary {
    color: #1e40af !important;
    background: #ffffff;
    border-color: #93c5fd;
    box-shadow: none;
}
.card-header:is(.bg-primary-subtle, .bg-info-subtle, .bg-light, .bg-white) .btn-outline-primary:hover {
    color: #1e3a8a !important;
    background: #dbeafe;
    border-color: #2563eb;
}
#studyDesignQuickCard .card-header,
#studyWaveSourceQuickPanel .card-header { gap: 12px; }
#studyDesignQuickCard .card-header .fw-semibold,
#studyWaveSourceQuickPanel .card-header .fw-semibold { line-height: 1.5; }
.form-control::placeholder, .form-select::placeholder {
    color: #64748b;
    opacity: 1;
}
.card-header.bg-success-subtle {
    background: #ecfdf5 !important;
    color: #14532d !important;
    border-bottom: 1px solid #bbf7d0;
}
.card-header.bg-warning-subtle {
    background: #fffbeb !important;
    color: #78350f !important;
    border-bottom: 1px solid #fde68a;
}
.card-header[class*="-subtle"] :is(.text-white, .form-check-label) { color: inherit !important; }
.card-header:not([class*="-subtle"]):not(.bg-light):not(.bg-white)
:is(.text-primary, .text-primary-emphasis, .text-info, .text-info-emphasis, .text-success, .text-success-emphasis, .text-muted, .text-secondary):not(.btn):not(.badge) {
    color: #ffffff !important;
}
.card-header:not([class*="-subtle"]):not(.bg-light):not(.bg-white)
:is(.btn-outline-primary, .btn-outline-secondary, .btn-outline-info, .btn-outline-success) {
    color: #1e3a8a !important;
    background: #ffffff;
    border-color: #dbeafe;
}
.card-header:not([class*="-subtle"]):not(.bg-light):not(.bg-white)
:is(.btn-outline-primary, .btn-outline-secondary, .btn-outline-info, .btn-outline-success):hover {
    color: #1e3a8a !important;
    background: #eff6ff;
    border-color: #ffffff;
}
/* High-contrast overrides for the two research setup headings. Keep explicit
   ID specificity so theme/Bootstrap emphasis utilities cannot mask the text. */
#studyDesignQuickCard > .card-header,
#studyWaveSourceQuickPanel > .card-header {
    background: #ffffff !important;
    background-image: none !important;
    color: #111827 !important;
    border-bottom: 2px solid #cbd5e1;
    padding: 14px 18px !important;
}
#studyDesignQuickCard > .card-header > .fw-semibold,
#studyWaveSourceQuickPanel > .card-header > .fw-semibold,
#studyDesignQuickCard > .card-header > .fw-semibold i,
#studyWaveSourceQuickPanel > .card-header > .fw-semibold i,
#studyWaveSourceQuickPanel > .card-header .form-check-label {
    color: #111827 !important;
    background: transparent !important;
    opacity: 1 !important;
    -webkit-text-fill-color: #111827;
}
#studyDesignQuickCard > .card-header > .fw-semibold,
#studyWaveSourceQuickPanel > .card-header > .fw-semibold {
    font-size: 18px;
    font-weight: 750 !important;
    line-height: 1.5;
}
#classicStudyDesignQuickToggle,
#classicStudyDesignQuickToggle:hover {
    color: #ffffff !important;
    background: #1e40af !important;
    border-color: #1e40af !important;
    opacity: 1;
}

/* [hidden] 必须真的隐藏。
   Bootstrap 给 .btn/.d-flex 等类设了 display:inline-block/flex，特异性高于
   UA 样式表的 [hidden]{display:none} —— 于是 el.hidden=true 只改属性、
   视觉上纹丝不动，顶栏"按登录态切换入口"就静默失效了。
   这条用 !important 统一兜住，别指望每个调用点都记得加行内样式。 */
[hidden]{display:none!important}

/* ---- 说明文字默认收起 ------------------------------------------------------
   填一张问卷要填的字段本来就密，表单里再摊开 30 多条灰字只会让人找不到
   真正的输入框。这些说明对第一次配置的人有用，对每天跑任务的人是噪音，
   所以默认收起、按需展开，选择记在 localStorage 里。
   .yan-note 由构建期统一打在 small text-muted / form-text 上；带 d-none 的
   是作者显式隐藏的，保持隐藏，不参与这个开关。

   放在 research-styles.css 而不是 workflow.css：经典版（index.html）只加载
   前者，不加载 workflow.css，放错文件会让收起规则在经典版完全失效。 */
.yan-note{display:none;}
body.yan-show-notes .yan-note{display:block!important;}
body.yan-show-notes .yan-note.yan-note-inline{display:inline-block!important;}
.yan-notes-toggle{border:1px solid var(--yan-border,#d7dde8);background:transparent;
  color:inherit;border-radius:999px;padding:.25rem .7rem;font-size:.78rem;cursor:pointer;
  white-space:nowrap;}
.yan-notes-toggle[aria-pressed="true"]{background:var(--yan-primary,#1f4fd8);border-color:transparent;color:#fff;}
.yan-notes-toggle:focus-visible{outline:2px solid var(--yan-primary,#1f4fd8);outline-offset:2px;}

/* ---- 网页版左侧导航 / 手机端底部导航 ---------------------------------------
   早先 workflow.css 用 body.clear-ready 一律 display:none 关掉了这套导航，
   改成任务配置与任务列表左右并排。标记和 onclick 调用点一直都在，只是
   switchDesktopView/switchMobileWorkspace 从未定义、样式又被强制关闭 ——
   一套被关掉的半成品。这里补齐：≥992px 显示左侧导航并一次只显示一个面板，
   <992px 显示底部导航，同样一次只显示一个面板。 */
/* 必须带上 #desktopSidebar：关闭它的既有规则是
   `body.clear-ready #desktop-sidebar, ... #desktopSidebar`，带 ID，特异性更高，
   早先用类选择器覆盖不掉 —— 侧栏根本不会显示出来。 */
body.yan-nav-desktop #desktopSidebar,
body.yan-nav-desktop .desktop-sidebar{display:flex!important;pointer-events:auto!important;}
body.yan-nav-mobile #desktopSidebar,
body.yan-nav-mobile .desktop-sidebar{display:none!important;}
body.yan-nav-desktop .mobile-workspace-nav,
body.yan-nav-desktop #mobileWorkspaceNav{display:none!important;}
body.yan-nav-mobile .mobile-workspace-nav,
body.yan-nav-mobile #mobileWorkspaceNav{display:flex!important;pointer-events:auto!important;}
/* 一次只显示当前面板：清掉 workflow.css 里"两个都 block"的强制规则 */
body.yan-nav-desktop #viewConfigPanel[hidden],
body.yan-nav-mobile #viewConfigPanel[hidden],
body.yan-nav-desktop #viewTasksPanel[hidden],
body.yan-nav-mobile #viewTasksPanel[hidden]{display:none!important;}
/* 侧栏是 position:fixed，宽 200px —— 主内容必须给它让位，否则会被压在下面、
   左边缘的文字直接被截掉（原来清零 margin-left 就是这个后果）。 */
/* 不复用旧侧栏规则：那些规则分散在若干媒体查询里、且默认 display:none，
   依赖它们会出现「占位但不可见」。这里给一套自洽的固定侧栏。 */
body.yan-nav-desktop #desktopSidebar{
  position:fixed!important;top:0!important;left:0!important;bottom:0!important;
  width:200px!important;z-index:1035!important;background:#fff!important;
  border-right:1px solid var(--yan-border,#e3e7ee)!important;
  flex-direction:column!important;overflow-y:auto!important;padding:.75rem .5rem!important;
}

        /* ── 「调整映射」弹窗：只保留一层滚动容器 ───────────────────────────
           2026-10-26 生产反馈：「调整映射里向下滑动很难滑动」。
           两个原因叠加：
           ① 表格外层是 Bootstrap 的 .table-responsive（overflow-x:auto）。
              只要一个方向不是 visible，另一个方向就会被计算成 auto，
              于是表格容器变成**第二层滚动容器**，鼠标停在表格上往下滚时
              滚轮被它吃掉，表现就是「怎么滚都滚不动」。
           ② 弹窗没有固定高度，.modal-body 不构成独立滚动区，
              整张 52 行的表格撑开弹窗，底部按钮被顶到视口外。
           现在：弹窗高度锁定视口、只有 .modal-body 滚动、表格不再横向滚动、
           表头吸顶（滚动时还能看清哪一列是题目、哪一列是 Excel 列）。 */
        #mappingModal .modal-dialog {
            width: calc(100vw - 1.5rem);
            max-width: 1680px;
            height: calc(100vh - 1.5rem);
            height: calc(100dvh - 1.5rem);
            margin: .75rem auto;
        }

        #mappingModal .modal-content {
            height: 100%;
            max-height: none;
            overflow: hidden;
        }

        #mappingModal .modal-body {
            flex: 1 1 auto;
            min-height: 0;
            overflow-y: auto;
            overscroll-behavior: contain;
        }

        /* 表格三列宽度固定、题干已省略号截断，不需要横向滚动容器 */
        #mappingModal .table-responsive {
            overflow-x: visible;
            overflow-y: visible;
        }

        @media (max-width: 767.98px) {
            /* 窄屏恢复横向滚动（触屏用手指拖，不受滚轮影响） */
            #mappingModal .table-responsive {
                overflow-x: auto;
            }
        }

        #mappingModal thead th {
            position: sticky;
            top: 0;
            z-index: 3;
            background-color: var(--bs-table-bg, #f8f9fa);
        }
body.yan-nav-desktop #desktopSidebar .desktop-sidebar-nav{display:block!important;width:100%!important;}
body.yan-nav-desktop .navbar{left:200px!important;width:calc(100% - 200px)!important;}
body.yan-nav-desktop .desktop-statusbar{left:200px!important;width:calc(100% - 200px)!important;}
body.yan-nav-desktop .main-container{margin-left:200px!important;width:auto!important;
  max-width:none!important;}
body.yan-nav-mobile .main-container{margin-left:0!important;width:100%!important;}
body.yan-nav-mobile{padding-bottom:72px;}

/* 分组与条目必须成套：组标题小而淡、条目又大又松，列表会读成"拆开的一堆"。
   这里连同图标一起显式定死，不依赖旧样式里那套（它在媒体查询里给
   .sidebar-item i 设了 1.1rem，会把图标顶得比文字大一号）。 */
.sidebar-group{margin:0 0 .55rem;}
.sidebar-group:last-child{margin-bottom:0;}
.sidebar-group__title{display:flex;align-items:center;gap:.35rem;margin:0 0 .25rem;
  padding:0 .6rem;font-size:.68rem;font-weight:700;letter-spacing:.06em;
  color:var(--yan-muted,#64748b);}
/* 分组标题现在是一个按钮：整组可折叠，首屏只露 4 行而不是 17 行。
   视觉上仍保持「分组标题」的克制样式，不能让它看起来像一个普通入口。 */
.sidebar-group__toggle{width:100%;border:0;background:transparent;cursor:pointer;
  font:inherit;text-align:left;border-radius:.45rem;}
.sidebar-group__toggle:hover{background:rgba(15,23,42,.04);color:var(--yan-text,#0f172a);}
.sidebar-group__toggle:focus-visible{outline:2px solid var(--yan-primary,#1e3a8a);outline-offset:1px;}
.sidebar-group__label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.sidebar-group__caret{font-size:.62rem;opacity:.55;transition:transform .18s ease;}
.sidebar-group--open > .sidebar-group__toggle{margin-bottom:.25rem;}
.sidebar-group--open > .sidebar-group__toggle .sidebar-group__caret{transform:rotate(180deg);}
.sidebar-group__icon{font-size:.72rem;opacity:.7;}
.sidebar-group__items{display:flex;flex-direction:column;gap:1px;}
/* 账户与设置是全局入口，不属于「任务」分组：固定到侧栏底部，
   上面无论加几个任务入口都待在同一处，用户不用重新找。 */
/* 身份条 + 「账户与设置」作为一个 footer 整体吸底。
   两者必须绑在一起：账户条带 margin-top:auto 的话，空隙会落在账户条**之后**，
   身份条就被顶到侧栏中间、下面空一大块。 */
.sidebar-footer{margin-top:auto;display:flex;flex-direction:column;min-height:0;}
.sidebar-item--account{border-top:1px solid rgba(15,23,42,.08);
  border-radius:0;padding-top:.6rem;}
#desktopSidebar{display:flex;flex-direction:column;min-height:100%;}
#desktopSidebar .desktop-sidebar-nav{flex:0 0 auto;}
.sidebar-group__items[hidden]{display:none;}
.sidebar-item{display:flex;align-items:center;gap:.5rem;width:100%;
  padding:.4rem .55rem;border:0;border-radius:.45rem;background:transparent;
  color:inherit;font:inherit;font-size:.86rem;line-height:1.3;text-align:left;cursor:pointer;}
.sidebar-item i{font-size:.95rem;width:1.05rem;flex:0 0 1.05rem;
  display:inline-flex;align-items:center;justify-content:center;}
.sidebar-item span{flex:1 1 auto;min-width:0;}
.sidebar-item:hover{background:rgba(31,79,216,.07);}
.sidebar-item.is-active,.sidebar-item.active{background:var(--yan-primary,#1f4fd8);
  color:#fff;font-weight:600;}
.sidebar-item:focus-visible{outline:2px solid var(--yan-primary,#1f4fd8);outline-offset:2px;}
.sidebar-item.is-active:focus-visible,.sidebar-item.active:focus-visible{outline-color:#fff;}

/* ── AI Agent 对话视图（#agentChat，2026-10-26 新增）────────────────────
   规则写在**顶层**而不是塞进某个媒体查询：可见性由 body 上的
   desktop-mode / mobile-workspace-view-* 类决定，加不加媒体查询语义一样，
   顶层写反而更容易看清「哪个视图藏哪个面板」这一组对应关系。
   新增视图必须同时补齐两条：
     ① 不是这个视图时，藏起本面板；
     ② 是这个视图时，藏起其它面板。
   只写 ① 会让切过去时旧面板还杵在旁边；只写 ② 会让它在别的视图里露出来。 */
body.desktop-mode:not(.view-agent-chat) #viewAgentChatPanel { display: none; }
body.desktop-mode.view-agent-chat #viewConfigPanel,
body.desktop-mode.view-agent-chat #viewTasksPanel,
body.desktop-mode.view-agent-chat #viewReportsPanel,
body.desktop-mode.view-agent-chat #viewAnnouncementsPanel { display: none; }
body.desktop-mode.view-agent-chat #viewAgentChatPanel {
    display: block;
    flex: 0 0 100%;
    max-width: 100%;
}
body:not(.desktop-mode):not(.mobile-workspace-view-agent-chat) #viewAgentChatPanel { display: none; }
body:not(.desktop-mode).mobile-workspace-view-agent-chat #viewConfigPanel,
body:not(.desktop-mode).mobile-workspace-view-agent-chat #viewTasksPanel,
body:not(.desktop-mode).mobile-workspace-view-agent-chat #viewReportsPanel,
body:not(.desktop-mode).mobile-workspace-view-agent-chat #viewAnnouncementsPanel { display: none!important; }
body:not(.desktop-mode).mobile-workspace-view-agent-chat #viewAgentChatPanel {
    display: block;
    flex: 0 0 100%;
    max-width: 100%;
}
/* 整页式视图同样不显示页脚（页脚在壳层里没跟随侧栏偏移）。 */
body.desktop-mode.view-agent-chat .site-footer { display: none; }

/* 「通知与公告」下方的快捷入口条（2026-10-26）。 */
.yan-quick-entry-bar { display: flex; flex-direction: column; gap: .5rem; }
.yan-quick-entry-bar__label {
    font-size: .72rem;
    letter-spacing: .06em;
    font-weight: 700;
    color: var(--yan-muted,#64748b);
}
.yan-quick-entry-bar__items { display: flex; flex-wrap: wrap; gap: .5rem; }
.yan-quick-entry-bar__items .membership-badge { margin-left: 0; }
