/* ============================================================
   彩票预测统计系统 - Apple 风格浅色主题
   Apple-Style Light Theme — Mobile First
   ============================================================ */

/* ---------- Google 字体 ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ---------- CSS 变量（设计令牌）---------- */
:root {
    /* 主色系 */
    --accent: #007AFF;
    --accent-light: #E8F1FF;
    --accent-hover: #0066DD;

    /* 背景层次 */
    --bg-page: #F2F2F7;
    --bg-card: #FFFFFF;
    --bg-input: #FFFFFF;
    --bg-row-alt: #F9F9FB;

    /* 边框 */
    --border: #E5E5EA;
    --border-focus: #007AFF;

    /* 文字 */
    --text-primary: #1C1C1E;
    --text-secondary: #636366;
    --text-tertiary: #AEAEB2;
    --text-on-accent: #FFFFFF;

    /* 语义色 */
    --red: #FF3B30;
    --green: #34C759;

    /* 导航条 */
    --nav-bg: #FFFFFF;
    --nav-border: #E5E5EA;
    --nav-active-bg: #007AFF;
    --nav-active-text: #FFFFFF;
    --nav-text: #636366;

    /* 圆角 */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;

    /* 阴影 */
    --shadow-xs: 0 1px 3px rgba(0, 0, 0, .06);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, .08);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, .10);

    /* 动画 */
    --ease: cubic-bezier(.25, .46, .45, .94);
    --duration: 0.22s;
}

/* ============================================================
   基础 Reset & Body
   ============================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC',
        'Helvetica Neue', Arial, sans-serif;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-page);
    min-height: 100vh;
    /* 为固定导航留出空间 */
    padding-top: 52px;
    padding-bottom: 16px;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    opacity: .8;
}

/* ============================================================
   顶部导航栏（固定）
   ============================================================ */
.nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    height: 52px;
    padding: 0 12px;
    background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.nav-bar::-webkit-scrollbar {
    display: none;
}

.nav-bar a {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 18px;
    border-radius: var(--radius-xl);
    font-size: 16px;
    font-weight: 500;
    color: var(--nav-text);
    transition: background var(--duration) var(--ease),
        color var(--duration) var(--ease);
    white-space: nowrap;
}

.nav-bar a:hover {
    background: var(--accent-light);
    color: var(--accent);
    opacity: 1;
}

.nav-bar a.active {
    background: var(--nav-active-bg);
    color: var(--nav-active-text);
}

/* ============================================================
   主内容容器
   ============================================================ */
.container {
    max-width: 700px;
    margin: 12px auto;
    padding: 12px;
    background: var(--bg-card);
}

/* ============================================================
   工具切换器（同级页面切换按钮）
   ============================================================ */
.tool-switcher {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 0 8px;
}

.tool-switcher .tool-btn,
.tool-switcher .nav-btn {
    padding: 6px 18px;
    border-radius: var(--radius-xl);
    border: 1.5px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--duration) var(--ease);
    white-space: nowrap;
}

.tool-switcher .tool-btn:hover,
.tool-switcher .nav-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}

.tool-switcher .tool-btn.active,
.tool-switcher .nav-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--text-on-accent);
    box-shadow: 0 2px 8px rgba(0, 122, 255, .28);
}

/* ============================================================
   位置/分类按钮区域
   ============================================================ */
.button-container {
    padding: 4px 0 8px;
}

.position-buttons .button-row,
.position-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
}

/* 位置切换按钮（.button）*/
.button-container .button,
.position-buttons .button {
    padding: 5px 14px;
    border-radius: var(--radius-xl);
    border: 1.5px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--duration) var(--ease);
}

.button-container .button:hover,
.position-buttons .button:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}

.button-container .button.active,
.position-buttons .button.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--text-on-accent);
}

/* ============================================================
   通用按钮基础样式
   ============================================================ */
button {
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 6px 14px;
    margin: 2px;
    min-width: 60px;
    transition: all var(--duration) var(--ease);
    line-height: 1.4;
}

button:hover {
    background: var(--bg-row-alt);
    border-color: #C7C7CC;
}

button.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--text-on-accent);
}

/* ============================================================
   复制按钮
   ============================================================ */
.copy-btn {
    background: var(--text-primary);
    border-color: var(--text-primary);
    color: #FFFFFF;
    border-radius: var(--radius-md);
}

.copy-btn:hover {
    background: #3A3A3C;
    border-color: #3A3A3C;
    color: #FFFFFF;
}

/* ============================================================
   筛选按钮（工具页）
   ============================================================ */
.filter-btn {
    background: var(--red);
    border-color: var(--red);
    color: #FFFFFF;
}

.filter-btn:hover {
    background: #D70015;
    border-color: #D70015;
    color: #FFFFFF;
}

.filter-btn2 {
    background: var(--bg-card);
    border-color: var(--border);
    color: var(--text-secondary);
}

.filter-btn2:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}

/* ============================================================
   按钮组 / 按钮网格
   ============================================================ */
.button-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-bottom: 12px;
}

.group-btn {
    border: 1.5px solid var(--border);
    color: var(--text-secondary);
    padding: 5px 12px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    cursor: pointer;
    font-size: 12px;
    transition: all var(--duration) var(--ease);
}

.group-btn:hover,
.group-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--text-on-accent);
}

/* ============================================================
   标题
   ============================================================ */
h2,
h3,
h4 {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 600;
    color: var(--text-primary);
    background: transparent;
    border: none;
    padding: 0;
    margin: 14px 0 8px;
    font-size: 13px;
}

/* 带下划线/分割感 */
h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: .02em;
    text-transform: none;
    border-bottom: 1px solid var(--border);
    padding-bottom: 6px;
    margin: 16px 0 8px;
}

h4 {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: .02em;
    border-bottom: 1px solid var(--border);
    padding-bottom: 5px;
    margin: 12px 0 6px;
}

h2 {
    font-size: 15px;
    font-weight: 700;
}

/* ============================================================
   卡片 / 区块
   ============================================================ */
.stats-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 14px;
    margin-bottom: 16px;
}

.stats-card h2 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 6px;
}

.stats-info {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 6px 0;
}

/* ============================================================
   滚动表格容器
   ============================================================ */
.scrollable-table,
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
    margin-bottom: 14px;
}

/* ============================================================
   表格
   ============================================================ */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    font-size: 12px;
}

th,
td {
    border: 1px solid var(--border);
    padding: 6px 5px;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
}

th {
    background: #F2F2F7;
    font-weight: 600;
    font-size: 11px;
    color: var(--text-secondary);
    letter-spacing: .02em;
    text-transform: none;
    position: sticky;
    top: 0;
    z-index: 1;
}

tr:nth-child(even) td {
    background: var(--bg-row-alt);
}

tr:hover td {
    background: var(--accent-light);
    transition: background .12s;
}

/* table-container：隐藏/显示切换（位置视图） */
.table-container {
    display: none;
}

.table-container.active {
    display: block;
    animation: fadeIn .2s var(--ease);
}

/* ============================================================
   语义单元格颜色
   ============================================================ */

/* 正确（定位命中 / 杀号未出） */

/* 错误（定位未命中 / 杀号出现） */
td.incorrect,
.incorrect {
    color: var(--red) !important;
}

/* 等待开奖 */
td.pending,
.pending-cell {
    color: var(--amber);
    font-weight: 500;
}

/* 连错/错误突出 */
td.error-cell {
    color: var(--red);
}

/* 杀号成功（✓） */

/* 内联高亮（correct-box / wrong-kill-box） */
.correct-box {
    display: inline-block;
    padding: 1px 4px;
    border-radius: 4px;
    background: rgba(52, 199, 89, .15);
    color: var(--green);
}

.wrong-kill-box {
    display: inline-block;
    padding: 1px 4px;
    border-radius: 4px;
    background: rgba(255, 59, 48, .12);
    color: var(--red);
}

/* 完美行（全四位命中） */
tr.perfect-kill td {
    background: rgba(52, 199, 89, .08);
}

/* 高亮单元格 */
td.highlight,
td.selected {
    background: var(--accent) !important;
    color: #FFFFFF;
}

/* ============================================================
   分析师标签（DN_tj 首页）
   ============================================================ */
.analyst-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    padding: 8px 0;
}

.analyst-tab {
    padding: 4px 10px;
    border-radius: var(--radius-xl);
    border: 1.5px solid var(--border);
    background: var(--bg-card);
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--duration) var(--ease);
}

.analyst-tab:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}

.analyst-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--text-on-accent);
}

.analyst-tab.is-recommended {
    border-color: var(--green);
    color: var(--green);
}

.analyst-tab.is-recommended.active {
    background: var(--green);
    border-color: var(--green);
    color: var(--text-on-accent);
}

/* Tab 内容显示控制 */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn .18s var(--ease);
}

/* 模块显示控制（DN首页 pos/kill-module）*/
.module {
    display: none;
}

.module.active {
    display: block;
    animation: fadeIn .2s var(--ease);
}

/* ============================================================
   输入区域
   ============================================================ */
.input-container {
    margin-bottom: 16px;
}

.input-group {
    margin-bottom: 12px;
}

.input-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.input-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.input-row.single-line input[type="text"] {
    flex: 1;
    min-width: 72px;
}

input[type="text"],
textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-input);
    transition: border-color var(--duration) var(--ease),
        box-shadow var(--duration) var(--ease);
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
}

input[type="text"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, .15);
}

input[type="text"]:hover,
textarea:hover {
    border-color: #B0B0B8;
}

textarea {
    min-height: 90px;
    padding: 10px 12px;
    line-height: 1.6;
    resize: vertical;
    height: auto;
}

/* ============================================================
   复选框组
   ============================================================ */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin: 10px 0;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    accent-color: var(--accent);
    flex-shrink: 0;
}

/* ============================================================
   折叠区块（工具页）
   ============================================================ */
.collapsible-section {
    margin-bottom: 10px;
}

.collapsible-header {
    width: 100%;
    background: transparent;
    border: none;
    border-left: 3px solid var(--accent);
    border-radius: 0;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    padding: 6px 10px;
    cursor: pointer;
    margin: 0 0 6px 0;
    min-width: unset;
}

.collapsible-header:hover {
    background: var(--accent-light);
}

.collapsible-content {
    display: block;
}

/* ============================================================
   结果展示区
   ============================================================ */
.result {
    margin: 12px 0;
    padding: 12px;
    background: var(--bg-row-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 12px;
}

.result p {
    margin: 6px 0;
    line-height: 1.6;
    text-align: center;
    color: var(--text-secondary);
}

.result-header {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.result-content {
    word-wrap: break-word;
    word-break: break-all;
    line-height: 1.8;
}

.result-content span {
    display: inline-block;
    padding: 2px 6px;
    margin: 2px 1px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 12px;
}

#result {
    padding: 8px;
    line-height: 1.8;
    word-break: break-all;
}

#result span {
    display: inline-block;
    padding: 2px 6px;
    margin: 2px 1px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: 'SF Mono', 'Menlo', monospace;
    font-size: 12px;
}

/* ============================================================
   复制成功提示
   ============================================================ */
.copy-success {
    display: none;
    color: var(--green);
    font-size: 12px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    background: rgba(52, 199, 89, .1);
    margin-left: 8px;
}

/* ============================================================
   时间戳
   ============================================================ */
.timestamp {
    text-align: center;
    color: var(--text-tertiary);
    font-size: 11px;
    margin: 14px 0;
}

/* ============================================================
   分隔线
   ============================================================ */
.divider {
    height: 1px;
    background: var(--border);
    margin: 20px 0;
}

/* ============================================================
   特殊颜色类（保留兼容）
   ============================================================ */
.profit {
    color: var(--green) !important;
}

.loss {
    color: var(--red) !important;
}

.wrong {
    color: var(--red);
    font-weight: 600;
}

.error {
    color: var(--red);
    font-weight: 600;
}

.lottery {
    font-weight: 600;
    color: var(--text-primary);
}

.period {
    font-weight: 600;
}

.label-cell {
    background: var(--bg-row-alt) !important;
    font-weight: 600;
    width: 56px;
    color: var(--text-secondary);
}

/* ============================================================
   选号工具特殊类
   ============================================================ */
#selectedNumbers {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
}

#combinationCount {
    font-weight: 700;
    font-size: 13px;
    color: var(--accent);
}

.digit-cell {
    cursor: pointer;
    transition: background .15s;
}

.digit-cell:hover {
    background: var(--accent-light) !important;
}

.digit-cell.selected {
    background: var(--accent) !important;
    color: #FFFFFF !important;
}

.selected-digits {
    margin-top: 12px;
    padding: 12px;
    background: var(--bg-row-alt);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    text-align: center;
    font-size: 13px;
}

td.selected {
    background: var(--accent) !important;
    color: #FFFFFF;
}

/* ============================================================
   页面切换按钮（兼容旧类名）
   ============================================================ */
.switch-btn {
    display: inline-block;
    margin: 4px 6px;
    padding: 6px 18px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-xl);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    background: var(--bg-card);
    transition: all var(--duration) var(--ease);
}

.switch-btn:hover,
.switch-btn.current {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--text-on-accent);
}

.page-switch {
    text-align: center;
    padding: 8px 0;
}

/* 导航标签（nav-tab / nav-tabs）*/
.nav-tabs {
    text-align: center;
    padding: 8px 0;
}

.nav-tab {
    display: inline-block;
    margin: 4px;
    padding: 5px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-xl);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-secondary);
    background: var(--bg-card);
    transition: all var(--duration) var(--ease);
}

.nav-tab:hover,
.nav-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--text-on-accent);
}

/* 位置内容（旧类名兼容） */
.position-content {
    display: none;
}

.position-content.active {
    display: block;
    animation: fadeIn .2s;
}

/* ============================================================
   分析师表格（旧类）
   ============================================================ */
.analyst-table {
    display: none;
}

.analyst-table.active {
    display: table;
}

/* ============================================================
   BQ 版权区
   ============================================================ */
.BQ {
    color: var(--text-tertiary);
    text-align: center;
    padding-top: 16px;
    font-size: 11px;
}

.BQ a {
    color: var(--accent);
}

/* ============================================================
   预测表（.prediction-table）
   ============================================================ */
.prediction-table th,
.prediction-table td {
    text-align: center;
    white-space: nowrap;
}

.centered-table th,
.centered-table td {
    text-align: center;
}

/* ============================================================
   统计区（stats-section）
   ============================================================ */
.stats-section {
    margin-top: 20px;
    text-align: center;
}

/* ============================================================
   结果展示 result2（更新页）
   ============================================================ */
.result2 {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    padding: 14px;
    margin-top: 10px;
}

.result2 pre {
    white-space: pre-wrap;
    word-break: break-all;
    font-size: 12px;
    line-height: 1.7;
    color: var(--text-secondary);
    font-family: 'SF Mono', 'Menlo', monospace;
    margin: 0;
}

/* ============================================================
   输入区ID样式
   ============================================================ */
#result2 {
    color: var(--text-secondary);
    font-family: 'SF Mono', 'Menlo', monospace;
    font-size: 12px;
}

/* ============================================================
   工具3特定
   ============================================================ */
#tool3 .input-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
    max-width: 100%;
    align-items: center;
}

#tool3 button {
    width: 200px;
    margin-top: 12px;
}

/* ============================================================
   分析加载状态
   ============================================================ */
#loadingStatus {
    text-align: center;
    margin: 6px 0;
    color: var(--red);
    font-size: 12px;
}

#analysisResults {
    text-align: center;
    font-weight: 700;
    font-size: 1.5em;
    margin-bottom: 12px;
    color: var(--red);
}

/* ============================================================
   全选 / 清除按钮（工具页）
   ============================================================ */
.selectAll,
.clearAll {
    min-width: 56px;
    padding: 4px 10px;
    font-size: 12px;
    border: 1.5px solid var(--accent);
    border-radius: var(--radius-md);
    color: var(--accent);
    background: var(--bg-card);
    margin: 0 3px;
}

.selectAll:hover,
.clearAll:hover {
    background: var(--accent);
    color: var(--text-on-accent);
}

/* ============================================================
   动画
   ============================================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   移动端适配（≤ 600px）
   ============================================================ */
@media screen and (max-width: 600px) {
    body {
        padding-top: 48px;
        padding-bottom: 12px;
    }

    .nav-bar {
        height: 48px;
        padding: 0 6px;
        justify-content: flex-start;
    }

    .nav-bar a {
        padding: 4px 11px;
        font-size: 14px;
    }

    .container {
        padding: 8px;
        margin: 8px auto;
    }

    .tool-switcher {
        gap: 5px;
        padding: 8px 0 6px;
    }

    .tool-switcher .tool-btn,
    .tool-switcher .nav-btn {
        padding: 5px 12px;
        font-size: 12px;
    }

    .position-buttons .button,
    .button-container .button {
        padding: 4px 10px;
        font-size: 11px;
    }

    button {
        padding: 5px 10px;
        font-size: 12px;
        min-width: 48px;
    }

    h3 {
        font-size: 12px;
        margin: 12px 0 6px;
    }

    h4 {
        font-size: 11px;
        margin: 10px 0 5px;
    }

    h2 {
        font-size: 13px;
    }

    th,
    td {
        padding: 4px 3px;
        font-size: 11px;
    }

    th {
        font-size: 10px;
    }

    input[type="text"],
    textarea {
        font-size: 14px;
        /* iOS 防止缩放 */
        padding: 7px 10px;
    }

    textarea {
        min-height: 72px;
    }

    .input-row.single-line {
        flex-wrap: wrap;
        gap: 4px;
    }

    .input-row.single-line input[type="text"] {
        flex: 1 1 calc(50% - 4px);
        min-width: calc(50% - 4px);
    }

    .checkbox-group {
        gap: 8px 12px;
    }

    .checkbox-group label {
        font-size: 12px;
    }

    .analyst-tab {
        padding: 3px 8px;
        font-size: 10px;
    }

    .collapsible-header {
        font-size: 11px;
        padding: 5px 8px;
    }

    .result-content span {
        padding: 1px 4px;
        font-size: 11px;
        margin: 1px;
    }

    .result-header {
        font-size: 12px;
    }

    #tool3 .input-container {
        gap: 8px;
    }

    #tool3 button {
        width: 100%;
        max-width: 200px;
    }

    .copy-success {
        font-size: 11px;
        padding: 2px 6px;
    }
}

/* ============================================================
   超小屏幕（≤ 360px）微调
   ============================================================ */
@media screen and (max-width: 360px) {
    .nav-bar a {
        padding: 4px 7px;
        font-size: 11px;
    }

    th,
    td {
        padding: 3px 2px;
        font-size: 10px;
    }
}

/* ============================================================
   DN_tj 页面专用辅助类
   ============================================================ */

/* 推荐表：分析师注释（连错X期）*/
.analyst-note {
    font-size: 10px;
    font-weight: 400;
    color: var(--text-tertiary);
    margin-top: 1px;
}

/* 推荐表：推荐数据大字 */
.rec-data {
    font-size: 15px;
    font-weight: 700;
    color: var(--accent);
}

/* 共识统计：主体数字 */
.consensus-val {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

/* 共识统计：推荐人数 */
.consensus-count {
    font-size: 10px;
    color: var(--text-tertiary);
    margin-top: 2px;
}

/* 最优分析师：胜率标注 */
.analyst-win-rate {
    font-size: 10px;
    font-weight: 400;
    color: var(--text-tertiary);
}

/* 最优分析师：预测数据 */
.analyst-pred {
    font-size: 10px;
    font-weight: 600;
    margin-top: 2px;
}