
.stu-clt-tool,.stu-clt-tool *{box-sizing:border-box}
.stu-clt-tool{max-width:1100px;margin:30px auto;padding:0 16px;color:#182538;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans TC","Microsoft JhengHei",sans-serif}
.stu-clt-card{background:#fff;border:1px solid #e1e8f0;border-radius:26px;overflow:hidden;box-shadow:0 20px 55px rgba(26,48,77,.12)}
.stu-clt-head{padding:28px 32px 23px;background:linear-gradient(135deg,#102d50,#174f7c 58%,#1d6d9c);color:#fff}
.stu-clt-head h1{margin:0 0 9px!important;color:#fff!important;font-size:28px!important;font-weight:800!important;line-height:1.3!important}
.stu-clt-head p{margin:0!important;color:#e7f2fb!important;line-height:1.75!important;font-size:15px!important}
.stu-clt-body{padding:26px 30px 30px}
.stu-clt-section{margin-bottom:18px;padding:18px 20px;background:#f8fafc;border:1px solid #e3eaf1;border-radius:18px}
.stu-clt-section-title{margin-bottom:14px;color:#1b3655;font-size:16px;font-weight:850}
.stu-clt-dist-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:stretch}
.stu-clt-dist-btn{display:flex;align-items:center;justify-content:center;width:100%;min-width:0;min-height:46px;margin:0!important;border:1px solid #dbe4ed;background:#fff;border-radius:12px;padding:11px 14px;cursor:pointer;font-weight:750;color:#536174;font-size:14px;line-height:1.4}
.stu-clt-dist-btn.active{background:#eaf3ff;border-color:#2375c9;color:#155da8;box-shadow:0 0 0 2px rgba(35,117,201,.08)}
.stu-clt-controls{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.stu-clt-control{padding:15px;background:#fff;border:1px solid #e2e9f0;border-radius:14px}
.stu-clt-row{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:11px}
.stu-clt-row:last-child{margin-bottom:0}
.stu-clt-row b{color:#102d50}
.stu-clt-control input[type=number]{width:105px;min-height:40px;padding:7px 10px;border:1px solid #cfd9e5;border-radius:9px;color:#1769c2;font-size:15px;font-weight:750}
.stu-clt-badge{padding:5px 10px;border-radius:9px;background:#e8f2ff;color:#1769c2;font-size:17px;font-weight:850}
.stu-clt-help{font-size:13px;color:#718096;line-height:1.6}
.stu-clt-range{width:100%;height:8px;appearance:none;-webkit-appearance:none;border:0;border-radius:99px;background:#dce4ed;cursor:pointer}
.stu-clt-range::-webkit-slider-thumb{width:24px;height:24px;appearance:none;-webkit-appearance:none;border:6px solid #1769c2;border-radius:50%;background:#fff;box-shadow:0 2px 8px rgba(0,0,0,.2)}
.stu-clt-range::-moz-range-thumb{width:12px;height:12px;border:6px solid #1769c2;border-radius:50%;background:#fff}
.stu-clt-scale{position:relative;height:25px;margin-top:7px;color:#7a8797;font-size:11px}
.stu-clt-scale span{position:absolute;top:0;transform:translateX(-50%);white-space:nowrap}
.stu-clt-scale span:first-child{transform:none}.stu-clt-scale span:last-child{transform:translateX(-100%)}
.stu-clt-rerun{min-width:130px;min-height:41px;border:0;border-radius:10px;background:#1769c2;color:#fff;font-weight:800;cursor:pointer}
.stu-clt-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:18px}
.stu-clt-stat{padding:14px;background:#fff;border:1px solid #e3eaf1;border-radius:14px;text-align:center}
.stu-clt-stat small{display:block;margin-bottom:5px;color:#718096;font-size:12px}.stu-clt-stat strong{color:#174f7c;font-size:20px;font-weight:850}
.stu-clt-charts{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px}
.stu-clt-chartbox{min-width:0;padding:14px;background:#fff;border:1px solid #e4ebf2;border-radius:17px}
.stu-clt-chart-title{margin-bottom:4px;color:#1b3655;font-size:16px;font-weight:850}.stu-clt-chart-sub{min-height:20px;margin-bottom:8px;color:#718096;font-size:12px}
.stu-clt-chartbox canvas{display:block;width:100%!important;height:auto!important;aspect-ratio:900/480;background:#fff}
.stu-clt-compare{margin-top:18px}.stu-clt-table-wrap{overflow-x:auto}.stu-clt-compare table{width:100%;border-collapse:collapse}
.stu-clt-compare th,.stu-clt-compare td{padding:11px 12px;border-bottom:1px solid #e7edf3;text-align:center;font-size:14px}
.stu-clt-compare th{background:#f3f7fb;color:#43546a;font-weight:800}.stu-clt-compare th:first-child,.stu-clt-compare td:first-child{text-align:left}
.stu-clt-note{padding:15px 18px;border-left:4px solid #1769c2;border-radius:0 12px 12px 0;background:#f3f7fc;color:#536174;font-size:14px;line-height:1.75}.stu-clt-note b{color:#1b2b40}
@media(max-width:760px){.stu-clt-tool{margin:15px auto;padding:0 10px}.stu-clt-head,.stu-clt-body{padding:20px}.stu-clt-head h1{font-size:22px!important}.stu-clt-controls,.stu-clt-charts{grid-template-columns:1fr}.stu-clt-stats{grid-template-columns:1fr 1fr}.stu-clt-dist-buttons{grid-template-columns:1fr}}

@media (min-width:521px) and (max-width:760px){.stu-clt-dist-buttons{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media (max-width:520px){.stu-clt-dist-buttons{grid-template-columns:1fr!important}}


/* v1.0.4 — 強制母群分配三按鈕固定同列 */
.stu-clt-tool .stu-clt-section .stu-clt-dist-buttons{
    display:flex !important;
    flex-direction:row !important;
    flex-wrap:nowrap !important;
    align-items:stretch !important;
    justify-content:space-between !important;
    gap:12px !important;
    width:100% !important;
}

.stu-clt-tool .stu-clt-section .stu-clt-dist-buttons > .stu-clt-dist-btn{
    display:flex !important;
    flex:1 1 0 !important;
    width:0 !important;
    max-width:none !important;
    min-width:0 !important;
    min-height:46px !important;
    margin:0 !important;
    padding:11px 12px !important;
    align-items:center !important;
    justify-content:center !important;
    position:static !important;
    float:none !important;
    clear:none !important;
    transform:none !important;
}

/* 手機仍維持同列；文字縮小避免換行 */
@media (max-width:520px){
    .stu-clt-tool .stu-clt-section .stu-clt-dist-buttons{
        display:flex !important;
        flex-direction:row !important;
        grid-template-columns:none !important;
        gap:6px !important;
    }
    .stu-clt-tool .stu-clt-section .stu-clt-dist-buttons > .stu-clt-dist-btn{
        width:0 !important;
        min-width:0 !important;
        padding:9px 4px !important;
        font-size:12px !important;
        white-space:nowrap !important;
    }
}

/* v1.0.5 — 樣本數與重複抽樣次數可直接輸入 */
.stu-clt-value-group{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:8px;
    flex-wrap:wrap;
}
.stu-clt-manual-label{
    display:flex;
    align-items:center;
    gap:6px;
    color:#718096;
    font-size:12px;
    font-weight:700;
    white-space:nowrap;
}
.stu-clt-tool .stu-clt-manual-number{
    width:92px !important;
    min-height:38px !important;
    margin:0 !important;
    padding:6px 9px !important;
    border:1px solid #cfd9e5 !important;
    border-radius:9px !important;
    background:#fff !important;
    color:#1769c2 !important;
    font-size:14px !important;
    font-weight:800 !important;
    line-height:1.2 !important;
    box-shadow:none !important;
}
.stu-clt-tool .stu-clt-manual-number:focus{
    outline:none !important;
    border-color:#1769c2 !important;
    box-shadow:0 0 0 3px rgba(23,105,194,.10) !important;
}
@media(max-width:620px){
    .stu-clt-control .stu-clt-row{
        align-items:flex-start;
        flex-direction:column;
    }
    .stu-clt-value-group{
        width:100%;
        justify-content:space-between;
    }
}

/* v1.0.6 — 完整重複抽樣結果，固定框內捲動 */
.stu-clt-results{margin-top:22px}
.stu-clt-results-help{
    margin:0 0 12px;
    color:#66788a;
    font-size:14px;
    line-height:1.7;
}
.stu-clt-results-scroll{
    height:360px;
    max-height:360px;
    overflow-y:auto;
    overflow-x:hidden;
    border:1px solid #d9e2ec;
    border-radius:12px;
    background:#fff;
    scrollbar-gutter:stable;
    -webkit-overflow-scrolling:touch;
}
.stu-clt-results-table{
    width:100%;
    border-collapse:collapse;
    table-layout:fixed;
    margin:0 !important;
}
.stu-clt-results-table th,
.stu-clt-results-table td{
    padding:10px 14px !important;
    text-align:center !important;
    border-bottom:1px solid #edf1f5 !important;
    font-variant-numeric:tabular-nums;
}
.stu-clt-results-table th{
    position:sticky;
    top:0;
    z-index:2;
    background:#f4f8fc !important;
    color:#24445f;
    font-weight:800;
    box-shadow:0 1px 0 #d9e2ec;
}
.stu-clt-results-table tbody tr:nth-child(even) td{background:#fbfdff}
.stu-clt-results-table tbody tr:hover td{background:#f3f8fd}
.stu-clt-results-table th:first-child,
.stu-clt-results-table td:first-child{width:24%}
@media(max-width:620px){
    .stu-clt-results-scroll{height:320px;max-height:320px}
    .stu-clt-results-table th,.stu-clt-results-table td{padding:9px 6px !important;font-size:12px}
}

/* v1.0.7 — 重複抽樣結果數字字級比照前方統計數值 */
.stu-clt-tool .stu-clt-results-table tbody td{
    font-size:16px !important;
    line-height:1.45 !important;
    font-weight:500 !important;
}
@media(max-width:620px){
    .stu-clt-tool .stu-clt-results-table tbody td{
        font-size:14px !important;
    }
}

/* v1.0.8 — 全工具數值視覺統一
   一般數值以 16px 為基準；只有主標題/區塊標題維持原本層級。 */
.stu-clt-tool input[type="number"],
.stu-clt-tool .stu-clt-manual-number,
.stu-clt-tool .stu-clt-badge,
.stu-clt-tool [data-role="n-badge"],
.stu-clt-tool [data-role="reps-badge"],
.stu-clt-tool .stu-clt-results-table tbody td,
.stu-clt-tool .stu-clt-results-table thead th{
    font-size:16px !important;
    line-height:1.45 !important;
}

/* 統計摘要、比較表等區域中的數字不要特別放大 */
.stu-clt-tool .stu-clt-stat-value,
.stu-clt-tool .stu-clt-value,
.stu-clt-tool .stu-clt-metric-value,
.stu-clt-tool .stu-clt-summary-value{
    font-size:16px !important;
    line-height:1.45 !important;
}

/* 表格表頭保留粗體，但字級與資料一致 */
.stu-clt-tool .stu-clt-results-table thead th{
    font-weight:800 !important;
}
.stu-clt-tool .stu-clt-results-table tbody td{
    font-weight:500 !important;
    font-variant-numeric:tabular-nums;
}

@media(max-width:620px){
    .stu-clt-tool input[type="number"],
    .stu-clt-tool .stu-clt-manual-number,
    .stu-clt-tool .stu-clt-badge,
    .stu-clt-tool [data-role="n-badge"],
    .stu-clt-tool [data-role="reps-badge"],
    .stu-clt-tool .stu-clt-results-table tbody td,
    .stu-clt-tool .stu-clt-results-table thead th,
    .stu-clt-tool .stu-clt-stat-value,
    .stu-clt-tool .stu-clt-value,
    .stu-clt-tool .stu-clt-metric-value,
    .stu-clt-tool .stu-clt-summary-value{
        font-size:14px !important;
    }
}

/* v1.0.9 — 重複抽樣結果表格稍微縮小 */
.stu-clt-tool .stu-clt-results-table tbody td{
    font-size:14px !important;
    line-height:1.35 !important;
    padding-top:8px !important;
    padding-bottom:8px !important;
}
.stu-clt-tool .stu-clt-results-table thead th{
    font-size:15px !important;
}
@media(max-width:620px){
    .stu-clt-tool .stu-clt-results-table tbody td{
        font-size:13px !important;
    }
    .stu-clt-tool .stu-clt-results-table thead th{
        font-size:14px !important;
    }
}
