/* 我的门派页整体比全站再小一档；移动端由 mobile_font.css 覆盖为 14px */
html { font-size: 15px; }
.hengshan-app { max-width: 1180px; }
.sim-nav { margin-top: 0.75rem; font-size: 0.9rem; color: var(--text-muted); }
.sim-nav a { color: var(--text-secondary); text-decoration: none; transition: color 0.15s; }
.sim-nav a:hover, .sim-nav a.active { color: var(--purple-bright); }
.nav-sep { margin: 0 0.4rem; color: var(--border-color); }
.hengshan-main { display: grid; width: 100%; min-width: 0; gap: 1rem; }
.hengshan-main > section { width: 100%; min-width: 0; box-sizing: border-box; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.85rem; }
.panel-header h2 { margin: 0.12rem 0 0; font-family: var(--font-serif); font-size: 1.08rem; color: var(--text-primary); }
.hengshan-kicker { font-size: 0.68rem; letter-spacing: 0.12em; color: var(--purple-bright); }
.hengshan-message { margin: 0.7rem 0 0; color: var(--text-muted); font-size: 0.84rem; }
.hengshan-message.is-error { color: #ff9d9d; }
.hengshan-note-red { color: #ff6b6b; font-weight: 600; }
.hengshan-note-green { color: #1a7a3d; font-weight: 600; }
.student-state-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.45rem; }
.student-state-grid > div { padding: 0.45rem 0.55rem; border: 1px solid var(--border-color); border-radius: 6px; background: var(--bg-primary); min-width: 0; }
.student-state-grid span { display: block; margin-bottom: 0.15rem; color: var(--text-muted); font-size: 0.68rem; }
.student-state-grid strong { display: block; overflow-wrap: anywhere; color: var(--text-primary); font-size: 0.84rem; }
.student-talents { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.45rem; margin-top: 0.55rem; }
.student-talent { display: flex; align-items: center; gap: 0.4rem; min-width: 0; padding: 0.4rem 0.5rem; border: 1px solid var(--border-accent); border-radius: 6px; background: linear-gradient(135deg, rgba(176, 122, 42, 0.15), rgba(28, 31, 40, 0.7)); }
.student-talent span { flex: 0 0 auto; color: var(--text-muted); font-size: 0.7rem; }
.student-talent strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-primary); font-size: 0.8rem; }
.evidence-badge { flex: 0 0 auto; padding: 0.22rem 0.5rem; border: 1px solid #8f7340; border-radius: 999px; color: #e6bd65; font-size: 0.7rem; }
.evidence-badge.is-verified { border-color: #477a62; color: #72d2a3; }
.hengshan-warning { margin: 0 0 0.8rem; padding: 0.7rem 0.8rem; border-left: 3px solid #b78737; background: rgba(183, 135, 55, 0.09); color: var(--text-secondary); font-size: 0.82rem; line-height: 1.6; }
.unlock-result { margin-bottom: 0.8rem; padding: 0.75rem; border: 1px solid var(--border-color); border-radius: 6px; color: var(--text-secondary); line-height: 1.65; }
.unlock-result strong { color: var(--text-primary); }
/* 手动升级推演：选择弟子 + 当前状态都收进同一面板 */
.student-state-legacy { display: none !important; }
.manual-select-row { display: flex; align-items: end; gap: 0.6rem; margin-bottom: 0.2rem; }
.manual-select-row .config-group { min-width: 0; }
.manual-select-row .btn { flex: 0 0 auto; }
/* 存档弟子：原生 select 只保留值，界面用可搜索的分组下拉 */
.student-select-native { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.student-picker { position: relative; display: flex; align-items: center; width: 100%; min-width: 0; }
.student-picker-input { flex: 1 1 auto; min-width: 0; height: 2.25rem; box-sizing: border-box; padding: 0 2rem 0 0.6rem; border: 1px solid var(--border-color); border-radius: 4px; background: var(--bg-primary); color: var(--text-primary); font-size: 0.68rem; line-height: 1; }
.student-picker-input::placeholder { color: var(--text-muted); opacity: 0.75; }
.student-picker-input:disabled { opacity: 0.65; cursor: not-allowed; }
.student-picker-toggle { position: absolute; top: 0; right: 0; width: 1.9rem; height: 2.25rem; border: 0; background: none; color: var(--text-muted); font-size: 0.7rem; cursor: pointer; }
.student-picker-toggle:disabled { opacity: 0.5; cursor: not-allowed; }
.student-picker-menu { position: absolute; z-index: 40; top: calc(100% + 0.2rem); left: 0; right: 0; max-height: 18rem; overflow: auto; padding: 0.25rem; border: 1px solid var(--border-color); border-radius: 6px; background: var(--bg-card); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); font-size: 0.68rem; }
.student-picker-menu[hidden] { display: none !important; }
.student-picker-group + .student-picker-group { margin-top: 0.25rem; padding-top: 0.25rem; border-top: 1px dashed var(--border-color); }
.student-picker-grouphead, .student-picker-subhead { display: flex; align-items: center; justify-content: space-between; gap: 0.4rem; width: 100%; box-sizing: border-box; padding: 0.3rem 0.4rem; border: 0; border-radius: 4px; background: transparent; color: var(--text-muted); font-size: 0.68rem; text-align: left; }
.student-picker-groupbody { padding-left: 0.3rem; }
.student-picker-subgroup { margin: 0.15rem 0; }
.student-picker-subitems { padding-left: 0.55rem; }
.student-picker-option { display: block; width: 100%; box-sizing: border-box; padding: 0.25rem 0.4rem; border: 0; border-radius: 4px; background: transparent; color: var(--text-secondary); font-size: 0.68rem; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.student-picker-option:hover { background: rgba(176, 122, 42, 0.16); color: var(--text-primary); }
.student-picker-option.is-selected { background: rgba(176, 122, 42, 0.24); color: var(--purple-deep); }
.student-picker-count { color: var(--purple-bright); }
.student-picker-empty { padding: 0.5rem; color: var(--text-muted); font-size: 0.68rem; }
.refresh-subpanel { margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px dashed var(--border-color); }
.refresh-subpanel[hidden] { display: none !important; }
.refresh-subpanel-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.5rem; }
.refresh-subpanel-head h3 { margin: 0.12rem 0 0; color: var(--text-primary); font-family: var(--font-serif); font-size: 0.96rem; }
/* 当前状态框 + 明日说明横排 */
.current-state-box { padding: 0.6rem 0.75rem; font-size: 0.82rem; }
.current-state-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.6rem; }
.current-state-head strong { font-family: var(--font-serif); font-size: 0.95rem; }
.current-state-date { color: var(--text-muted); font-size: 0.72rem; }
.current-state-level { color: var(--purple-bright); font-size: 0.78rem; }
.current-state-stats { display: flex; flex-wrap: wrap; gap: 0.9rem; margin: 0.25rem 0 0.35rem; color: var(--text-muted); font-size: 0.76rem; }
.current-state-talents { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.current-talent { padding: 0.16rem 0.42rem; border: 1px solid var(--border-color); border-radius: 999px; color: var(--text-secondary); font-size: 0.74rem; }
.current-talent em { margin-right: 0.35rem; color: var(--text-muted); font-style: normal; }
.current-state-empty { color: var(--text-muted); font-size: 0.78rem; }
.manual-upgrade-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.55rem; width: 100%; }
.manual-upgrade-row .unlock-result { box-sizing: border-box; width: 100%; min-width: 0; margin-bottom: 0; font-size: 0.82rem; line-height: 1.55; }
.manual-upgrade-row .btn { width: 100%; box-sizing: border-box; }
.day-advance-config { display: grid; grid-template-columns: minmax(0, 1fr) 92px; align-items: end; gap: 0.55rem; }
.day-advance-config input { width: 100%; }
.day-advance-config .config-group:last-child { flex: 0 0 92px; max-width: 92px; }
.day-advance-config #dayAdvanceLevel { width: 100%; max-width: 92px; }
.refresh-config-row input { width: 100%; background: var(--bg-primary); border: 1px solid var(--border-color); color: var(--text-primary); border-radius: 4px; padding: 0.45rem 0.6rem; }
/* 商店控制区铺满屏幕：锚点日期/批次两列，历史切换按钮 + 推演按钮一行 */
.roster-mode-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; margin-top: 0.2rem; }
.roster-mode-btn { width: 100%; min-width: 0; box-sizing: border-box; padding: 0.72rem 0.8rem; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-primary); color: var(--text-secondary); font-family: var(--font-serif); font-size: 0.92rem; cursor: pointer; transition: all 0.15s; }
.roster-mode-btn:hover { border-color: var(--purple-bright); color: var(--text-primary); }
.roster-mode-btn.is-active { border-color: var(--purple-bright); background: rgba(176, 122, 42, 0.22); color: var(--purple-deep); box-shadow: inset 0 0 0 1px rgba(176, 122, 42, 0.32); }
#shopForecastBody[hidden] { display: none !important; }
.shop-chain-controls { display: grid; align-items: end; gap: 0.55rem; width: 100%; max-width: 100%; box-sizing: border-box; margin-top: 0.6rem; }
.shop-chain-anchor-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shop-chain-forecast-row { grid-template-columns: auto minmax(0, 1fr); align-items: center; }
.shop-chain-controls label { display: block; margin-bottom: 0.25rem; color: var(--text-muted); font-size: 0.74rem; line-height: 1.2; }
.shop-control-field { min-width: 0; }
.shop-chain-controls input, .shop-chain-controls select, .shop-chain-controls .btn { width: 100%; height: 2.25rem; min-width: 0; max-width: 100%; box-sizing: border-box; margin: 0; padding: 0 0.6rem; border-radius: 4px; font-size: 0.85rem; line-height: 1; }
.shop-chain-controls input::placeholder { color: var(--text-muted); opacity: 0.75; }
.shop-chain-controls input, .shop-chain-controls select { background: var(--bg-primary); border: 1px solid var(--border-color); color: var(--text-primary); }
.shop-chain-controls .btn { display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }
.shop-chain-controls .shop-past-toggle { width: auto; height: 2.25rem; padding: 0 0.5rem; white-space: nowrap; color: var(--text-muted); font-size: 0.7rem; font-weight: 500; }
.shop-chain-controls .shop-past-toggle[aria-pressed="true"] { border-color: var(--purple-bright); background: rgba(192, 132, 252, 0.16); color: var(--purple-bright); }
.shop-chain-controls .shop-past-toggle[aria-pressed="true"]:hover { background: rgba(192, 132, 252, 0.26); }
#btnShopChainPreview { font-size: 0.72rem; padding: 0 0.35rem; }
.refresh-table-wrap { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; margin-top: 0.85rem; overflow-x: auto; border: 1px solid var(--border-color); border-radius: 6px; }
.refresh-table, .refresh-history-table { width: 100%; min-width: 560px; table-layout: fixed; border-collapse: collapse; font-size: 0.7rem; }
.refresh-table th, .refresh-table td, .refresh-history-table th, .refresh-history-table td { padding: 0.22rem 0.3rem; border-bottom: 1px solid var(--border-color); text-align: center; vertical-align: middle; font-size: 0.7rem; word-break: break-all; }
.refresh-table th, .refresh-history-table th { color: var(--text-muted); background: var(--bg-primary); font-weight: 500; text-align: center; }
.refresh-table td, .refresh-history-table td { color: var(--text-secondary); text-align: center; }
.refresh-table tbody tr:last-child td, .refresh-history-table tbody tr:last-child td { border-bottom: 0; }
.refresh-table td:first-child, .refresh-table td:last-child, .refresh-history-table td:first-child { white-space: nowrap; }
.refresh-table .refresh-apply-step { padding: 0.12rem 0.3rem; border-radius: 4px; font-size: 0.62rem; line-height: 1.2; white-space: nowrap; }
/* 推演刷新序列表：短文案 + 固定窄列 + 不换行（不影响商店候选表） */
.refresh-table:not(.shop-chain-table) { min-width: 0; }
.refresh-table:not(.shop-chain-table) th, .refresh-table:not(.shop-chain-table) td {
  padding: 0.18rem 0.22rem; font-size: 0.64rem; line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; word-break: normal;
}
.refresh-table:not(.shop-chain-table) th:nth-child(1), .refresh-table:not(.shop-chain-table) td:nth-child(1) { width: 38px; }
.refresh-table:not(.shop-chain-table) th:nth-child(2), .refresh-table:not(.shop-chain-table) td:nth-child(2) { width: 84px; }
.refresh-table:not(.shop-chain-table) th:nth-child(4), .refresh-table:not(.shop-chain-table) td:nth-child(4) { width: 56px; }
.refresh-table:not(.shop-chain-table) .refresh-apply-step { padding: 0.1rem 0.2rem; font-size: 0.6rem; }
/* 商店候选表：日期只放在分组行，行内不再重复；批次用 #1 / #2 */
.shop-table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-top: 0.55rem; color: var(--text-muted); font-size: 0.7rem; }
.shop-chain-table-wrap { max-width: 660px; }
.shop-chain-table { width: 100%; min-width: 0; max-width: 660px; table-layout: fixed; font-size: 0.7rem; }
.shop-chain-table th, .shop-chain-table td { padding: 0.22rem 0.28rem; vertical-align: middle; overflow-wrap: anywhere; }
.shop-chain-table th:nth-child(1), .shop-chain-table td:nth-child(1) { width: 28px; text-align: center; }
.shop-chain-table th:nth-child(2), .shop-chain-table td:nth-child(2) { width: 44px; }
.shop-chain-table th:nth-child(3), .shop-chain-table td:nth-child(3) { width: 108px; }
.shop-chain-table th:nth-child(4), .shop-chain-table td:nth-child(4) { width: 48px; }
.shop-chain-table td:last-child { white-space: normal; word-break: break-all; }
.shop-chain-table input[type="checkbox"] { width: 14px; height: 14px; margin: 0; accent-color: var(--purple-bright); cursor: pointer; }
.shop-sort-btn { padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.shop-sort-arrow { color: var(--purple-bright); margin-left: 0.15rem; }
.shop-num { color: var(--purple-bright); font-weight: 600; }
.shop-level { color: var(--text-muted); font-size: 0.62rem; white-space: nowrap; }
/* 日期分组行 */
.shop-date-group td { padding: 0 !important; background: rgba(176, 122, 42, 0.08); border-bottom: 1px solid var(--border-color); }
.shop-date-toggle { display: flex; align-items: center; gap: 0.45rem; width: 100%; padding: 0.3rem 0.4rem; border: 0; background: transparent; color: var(--text-primary); font-size: 0.72rem; text-align: left; cursor: pointer; }
.shop-date-toggle:hover { background: rgba(176, 122, 42, 0.1); }
.shop-date-chevron { display: inline-block; width: 0.8rem; color: var(--purple-bright); }
.shop-date-name { color: var(--text-muted); font-size: 0.66rem; }
.shop-date-count { margin-left: auto; color: var(--text-muted); font-size: 0.64rem; }
.shop-date-group.is-collapsed-group td { background: rgba(176, 122, 42, 0.04); }
/* 颜色：存档时刻=金色，今天=绿色，勾选=紫色；折叠行直接隐藏 */
.shop-student-row.is-collapsed { display: none; }
.shop-student-row.is-today { background: rgba(72, 170, 130, 0.07); }
.shop-student-row.is-today td:first-child { box-shadow: inset 3px 0 0 #4aaa82; }
.shop-student-row.is-save-moment { background: rgba(230, 189, 101, 0.12); }
.shop-student-row.is-save-moment td:first-child { box-shadow: inset 3px 0 0 #e6bd65; }
.shop-student-row.is-selected { background: rgba(176, 122, 42, 0.2); }
.shop-student-row.is-selected td:first-child { box-shadow: inset 3px 0 0 var(--purple-bright); }
.shop-save-mark { display: inline-block; margin-left: 0.25rem; padding: 0.04rem 0.26rem; border: 1px solid #8f7340; border-radius: 999px; color: #e6bd65; font-size: 0.6rem; vertical-align: middle; white-space: nowrap; }
/* 刷新控制：位置与次数 2:1 一排，推演按钮单独一排 */
.refresh-control-row { display: grid; grid-template-columns: 2fr 1fr; align-items: end; gap: 0.55rem; width: 100%; }
.refresh-control-row .config-group { min-width: 0; }
.refresh-control-row .refresh-action-group { grid-column: 1 / -1; }
.refresh-action-group .btn { width: 100%; box-sizing: border-box; white-space: nowrap; }
/* 本次会话记录：# 与中间两列收窄，把长度留给「应用后组合」，单行完整显示 */
.refresh-history-wrap { max-width: none; }
.refresh-table.refresh-history-table { min-width: 520px; width: 100%; table-layout: fixed; font-size: 0.64rem; }
.refresh-history-table th:nth-child(1), .refresh-history-table td:nth-child(1) { width: 24px; text-align: center; padding-left: 0.1rem; padding-right: 0.1rem; }
.refresh-history-table th:nth-child(2), .refresh-history-table td:nth-child(2) { width: 64px; }
.refresh-history-table th:nth-child(3), .refresh-history-table td:nth-child(3) { width: 60px; }
.refresh-history-table th:nth-child(4), .refresh-history-table td:nth-child(4) { width: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; word-break: normal; }
.refresh-history-header { display: flex; align-items: baseline; gap: 0.6rem; margin-top: 0.9rem; }
.refresh-history-header h3 { margin: 0; color: var(--text-primary); font-family: var(--font-serif); font-size: 0.9rem; }
.refresh-history-header span { color: var(--text-muted); font-size: 0.72rem; }
.day-advance-box { margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px dashed var(--border-color); }
.day-advance-box h3 { margin: 0 0 0.35rem; color: var(--text-primary); font-family: var(--font-serif); font-size: 0.96rem; }
.day-advance-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; width: 100%; margin-top: 0.6rem; }
.day-advance-actions .btn { width: 100%; box-sizing: border-box; }
.day-result { margin-top: 0.7rem; padding: 0.75rem; border: 1px solid var(--border-accent); border-radius: 6px; background: rgba(176, 122, 42, 0.08); color: var(--text-secondary); font-size: 0.84rem; line-height: 1.7; }
.day-result p { margin: 0 0 0.3rem; }
.day-result p:last-child { margin-bottom: 0; }
.day-result strong { color: var(--text-primary); }
.day-result em { color: var(--text-muted); font-size: 0.78rem; }
.day-result .is-error { color: #ff9d9d; }
@media (max-width: 760px) {
    .student-state-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.3rem; }
    .student-state-grid > div { padding: 0.35rem 0.3rem; }
    .student-talents { grid-template-columns: 1fr; gap: 0.35rem; }
    .manual-select-row { flex-wrap: wrap; }
    .manual-select-row .btn { width: 100%; }
    .student-picker-input, .student-picker-toggle { height: 2.1rem; }
    .panel-header { align-items: flex-start; flex-wrap: wrap; }
    .refresh-config-row { grid-template-columns: 1fr; }
    .day-advance-config { grid-template-columns: minmax(0, 1fr) 92px; }
    .shop-chain-controls { width: 100%; gap: 0.45rem; margin-top: 0.5rem; }
    .shop-chain-controls label { font-size: 0.66rem; }
    .shop-chain-controls input, .shop-chain-controls select, .shop-chain-controls .btn { height: 2.1rem; padding: 0 0.4rem; font-size: 0.78rem; }
    .shop-chain-anchor-row { gap: 0.35rem; }
    .shop-chain-anchor-row .shop-control-field { min-width: 0; overflow: hidden; }
    .shop-chain-controls input[type="date"] { -webkit-appearance: none; appearance: none; min-width: 0; padding: 0 0.2rem; font-size: 0.72rem; }
    .shop-chain-controls select { min-width: 0; padding: 0 0.2rem; font-size: 0.72rem; }
    .as-lock-row { gap: 0.18rem; }
    .as-lock { padding: 0.2rem 0.35rem; font-size: 0.66rem; }
}

/* ===== 弟子自动模拟 ===== */
.auto-sim-panel .hengshan-ledger-note { line-height: 1.6; }
.as-wash-group { padding: 0.65rem 0.7rem; border: 1px solid var(--border-color); border-radius: 6px; background: var(--bg-primary); }
.as-hint { display: block; margin-top: 0.3rem; color: var(--text-muted); font-size: 0.66rem; }
.as-count { display: inline-block; margin-left: 0.4rem; padding: 0 0.4rem; border-radius: 999px; background: rgba(176, 122, 42, 0.18); color: var(--purple-bright); font-size: 0.66rem; }
.as-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; min-height: 0; align-content: flex-start; }
.as-chip-empty { color: var(--text-muted); font-size: 0.66rem; padding-top: 0.1rem; }
.as-chip { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.18rem 0.4rem; border-radius: 999px; font-size: 0.66rem; }
.as-chip button { border: 0; background: none; color: inherit; font-size: 0.8rem; line-height: 1; cursor: pointer; padding: 0; opacity: 0.75; }
.as-chip button:hover { opacity: 1; }
.as-chip .as-lock-icon { flex: 0 0 auto; width: 0.72rem; height: 0.72rem; }
.as-chip-must { background: rgba(176, 122, 42, 0.22); border: 1px solid rgba(176, 122, 42, 0.55); color: var(--purple-deep); }
.as-chip-pick { background: rgba(72, 170, 130, 0.16); border: 1px solid rgba(72, 170, 130, 0.5); color: #1d7a52; }
.as-chip-lock { background: rgba(86, 152, 214, 0.16); border: 1px solid rgba(86, 152, 214, 0.55); color: #a9d2f5; }
.as-chip-lock-applied { background: rgba(230, 189, 101, 0.16); border: 1px solid rgba(230, 189, 101, 0.6); color: #e6bd65; }
.as-selected-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin: 0 0 0.5rem; }
.as-selected-summary[hidden] { display: none !important; }
.as-selected-label { color: var(--text-muted); font-size: 0.66rem; }
.as-selected-entry { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; }
.as-selected-chip { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.16rem 0.4rem; border: 1px solid rgba(176, 122, 42, 0.45); border-radius: 999px; background: rgba(176, 122, 42, 0.14); color: var(--purple-deep); font-size: 0.68rem; }
.as-remove-student { border: 0; background: none; color: inherit; font-size: 0.78rem; line-height: 1; cursor: pointer; padding: 0; opacity: 0.7; }
.as-remove-student:hover { opacity: 1; color: #ff9d9d; }
.as-mode-bar { display: flex; flex-direction: column; gap: 0.35rem; margin: 0 0 0.5rem; }
.as-mode-item { min-width: 0; display: flex; align-items: center; gap: 0.4rem; }
.as-mode-controls { flex: 0 0 33.333%; width: 33.333%; min-width: 0; display: flex; align-items: center; }
.as-mode-controls .as-filter { flex: 1 1 0; width: 100%; min-width: 0; box-sizing: border-box; }
.as-mode-controls .as-filter.is-active { border-color: var(--purple-bright); }
.as-mode-controls .as-filter::placeholder { text-align: center; color: var(--text-muted); opacity: 0.75; }
.as-mode-controls .as-filter::-webkit-input-placeholder { text-align: center; }
.as-mode-controls .as-filter::-moz-placeholder { text-align: center; }
.as-mode-controls .as-filter:-ms-input-placeholder { text-align: center; }
.as-mode-item .as-chips { flex: 1; min-width: 0; min-height: 0; }
/* 弟子点选：风格与天赋格一致，选中高亮 */
.as-disciple-picker { margin: 0.8rem 0 0.5rem; padding: 0.6rem 0.7rem; border: 1px solid var(--border-color); border-radius: 6px; background: var(--bg-primary); }
.as-picker-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; color: var(--text-muted); font-size: 0.78rem; }
.as-picker-head > span:first-child { flex: 1 1 100%; }
.as-disciple-filter { flex: 1 1 100%; width: 100%; min-width: 0; box-sizing: border-box; }
.as-picker-status { flex: 1 1 100%; color: var(--text-muted); font-size: 0.74rem; }
.as-picker-status.is-error { color: #ff9d9d; }
.as-disciple-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.45rem; margin-top: 0.5rem; align-items: center; }
.as-disciple-actions .btn, .as-disciple-actions .as-level-input { width: 100%; min-width: 0; box-sizing: border-box; }
.as-disciple-actions .btn { white-space: nowrap; }
.as-level-input { width: 82px; background: var(--bg-primary); border: 1px solid var(--border-color); color: var(--text-primary); border-radius: 4px; padding: 0.45rem 0.5rem; }
/* 规则说明用颜色区分「锁定 / 首选 / 备选」三种概念 */
.as-lock-hint { margin: 0 0 0.5rem; line-height: 1.7; }
.tag-lock { color: #7a6a58; font-weight: 600; }
.tag-must { color: var(--purple-deep); font-weight: 600; }
.tag-pick { color: #3f7a63; font-weight: 600; }
.as-disciple-groups { display: grid; gap: 0.45rem; margin-top: 0.5rem; }
.as-disciple-group { border: 1px solid var(--border-color); border-radius: 6px; background: transparent; overflow: hidden; }
.as-disciple-group[hidden], .as-disciple-grid[hidden] { display: none !important; }
.as-group-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem; padding: 0.35rem 0.5rem; background: var(--bg-primary); }
.as-group-toggle { display: inline-flex; align-items: center; gap: 0.35rem; border: 0; background: none; color: var(--text-primary); font-family: var(--font-serif); font-size: 0.82rem; cursor: pointer; padding: 0; }
.as-group-caret { color: var(--purple-bright); font-size: 0.75rem; }
.as-group-actions { display: inline-flex; gap: 0.35rem; }
.as-group-actions button { padding: 0.12rem 0.45rem; border: 1px solid var(--border-color); border-radius: 999px; background: transparent; color: var(--text-muted); font-size: 0.68rem; cursor: pointer; }
.as-group-actions button:hover { border-color: var(--purple-bright); color: var(--purple-bright); }
.as-disciple-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.45rem; padding: 0.55rem 0.6rem 0.65rem; max-height: 320px; overflow-y: auto; }
.as-disciple { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 0.2rem; padding: 0.5rem 0.4rem; border: 1px solid var(--border-color); border-radius: 6px; background: transparent; color: var(--text-secondary); cursor: pointer; transition: all 0.12s; }
.as-disciple:hover { border-color: var(--purple-bright); color: var(--text-primary); }
.as-disciple-title { display: flex; align-items: baseline; justify-content: center; gap: 0.3rem; min-width: 0; width: 100%; }
.as-disciple-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.85rem; }
.as-disciple-meta { flex: 0 0 auto; color: var(--text-muted); font-size: 0.72rem; }
.as-disciple-talents { display: flex; flex-wrap: nowrap; gap: 0.2rem; min-width: 0; width: 100%; }
.as-disciple-talent { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-muted); font-size: 0.6rem; line-height: 1.3; }
.as-disciple.is-selected { border-color: var(--purple-bright); background: rgba(176, 122, 42, 0.22); color: var(--purple-deep); }
.as-disciple.is-selected .as-disciple-meta { color: #8b7358; }
.as-disciple.is-shop-selected { border-color: #e6bd65; background: rgba(230, 189, 101, 0.12); color: #e6bd65; }
.as-disciple.is-shop-selected .as-disciple-meta { color: #c8ad78; }
.as-disciple.is-upgraded:not(.is-selected) { border-color: #4aaa82; background: rgba(72, 170, 130, 0.1); }
.as-disciple-empty { grid-column: 1 / -1; margin: 0.2rem 0; color: var(--text-muted); font-size: 0.76rem; }
.as-disciple-cell { min-width: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.as-disciple-cell .as-disciple { width: 100%; box-sizing: border-box; }
.as-lock-row { display: flex; flex-direction: column; gap: 0.2rem; }
.as-lock { display: flex; align-items: center; justify-content: center; gap: 0.32rem; width: 100%; min-width: 0; box-sizing: border-box; padding: 0.22rem 0.38rem; border: 1px solid rgba(176, 122, 42, 0.28); border-radius: 4px; background: rgba(255, 252, 245, 0.35); color: var(--text-secondary); font-size: 0.66rem; line-height: 1.2; cursor: pointer; text-align: center; transition: all 0.15s; }
.as-lock:hover { border-color: rgba(176, 122, 42, 0.55); color: var(--purple-deep); background: rgba(176, 122, 42, 0.06); }
.as-lock.is-on { border-color: rgba(176, 122, 42, 0.62); background: rgba(176, 122, 42, 0.14); color: var(--purple-deep); }
.as-lock.is-applied { border-color: rgba(230, 189, 101, 0.7); background: rgba(230, 189, 101, 0.16); color: #b8862f; }
.as-lock.is-applied .as-lock-icon { opacity: 1; }
.as-lock-icon { flex: 0 0 auto; width: 0.78rem; height: 0.78rem; opacity: 0.72; }
.as-lock.is-on .as-lock-icon { opacity: 1; }
.as-lock-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.as-talent-picker { margin: 0.2rem 0 0.4rem; }
.as-talent-picker > summary { cursor: pointer; color: var(--text-muted); font-size: 0.72rem; padding: 0.2rem 0; user-select: none; }
.as-talent-picker[open] > summary { margin-bottom: 0.3rem; }
.as-check.is-disabled { opacity: 0.45; cursor: not-allowed; }
.as-grid[hidden] { display: none !important; }
.as-mode-controls .as-filter { min-height: 1.35rem; font-size: 0.66rem; line-height: 1.2; padding: 0.18rem 0.4rem; }
.as-tool-row { display: flex; flex-wrap: wrap; gap: 0.55rem; align-items: center; margin: 0.7rem 0 0.4rem; }
.as-filter { width: 100%; box-sizing: border-box; min-width: 0; background: var(--bg-primary); border: 1px solid var(--border-color); color: var(--text-primary); border-radius: 4px; padding: 0.45rem 0.6rem; }
.as-scope { flex: 0 1 auto; background: var(--bg-primary); border: 1px solid var(--border-color); color: var(--text-secondary); border-radius: 4px; padding: 0.45rem 0.6rem; }
.as-grid { display: grid; gap: 0.55rem; margin-top: 0.45rem; }
details.as-cat { border: 1px solid var(--border-color); border-radius: 6px; background: var(--bg-primary); padding: 0.4rem 0.55rem; }
details.as-cat summary { cursor: pointer; color: var(--text-primary); font-family: var(--font-serif); font-size: 0.72rem; line-height: 1.4; user-select: none; }
.as-cat-count { margin-left: 0.4rem; color: var(--text-muted); font-size: 0.62rem; }
.as-talent-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.25rem; margin-top: 0.4rem; }
.as-talent { min-width: 0; text-align: center; padding: 0.16rem 0.18rem; border: 1px solid var(--border-color); border-radius: 5px; background: transparent; color: var(--text-secondary); font-size: 0.64rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; transition: all 0.12s; }
.as-talent:hover { border-color: var(--purple-bright); color: var(--text-primary); }
.as-talent.is-in-must { border-color: var(--purple-bright); background: rgba(176, 122, 42, 0.22); color: var(--purple-deep); }
.as-talent.is-in-pick { border-color: #4aaa82; background: rgba(72, 170, 130, 0.12); color: #1d7a52; }
.as-talent.is-search-focus { outline: 2px solid var(--purple-bright); outline-offset: 1px; box-shadow: 0 0 0 3px rgba(176, 122, 42, 0.16); }
.as-progress { margin-top: 0.8rem; color: var(--text-muted); font-size: 0.84rem; }
.as-progress-bar { height: 0.4rem; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.as-progress-bar span { display: block; width: 0; height: 100%; border-radius: 999px; background: var(--purple-bright); transition: width 0.15s; }
.as-progress-bar.is-busy span { width: 35% !important; animation: as-progress-slide 0.9s ease-in-out infinite; }
@keyframes as-progress-slide { from { transform: translateX(-110%); } to { transform: translateX(300%); } }
.as-progress-text { margin: 0.25rem 0 0; font-size: 0.72rem; }
.as-progress-num { display: inline-block; min-width: 1.5em; padding: 0 0.2rem; border-radius: 3px; background: rgba(176, 122, 42, 0.16); color: var(--purple-bright); font-variant-numeric: tabular-nums; font-weight: 600; text-align: center; }
.as-progress-name { color: var(--purple-bright); font-style: normal; font-weight: 600; }
.as-progress-slash { margin: 0 0.12rem; color: var(--text-muted); opacity: 0.7; }
.as-progress .is-error { color: #ff9d9d; }
.as-results { display: grid; gap: 0.7rem; margin-top: 0.7rem; }
.as-card { border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-primary); padding: 0.8rem 0.95rem; }
.as-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.7rem; }
.as-card-name { color: var(--text-primary); font-family: var(--font-serif); font-size: 1rem; }
.as-card-jump { margin-left: auto; padding: 0.24rem 0.5rem; border: 1px solid var(--purple-bright); border-radius: 999px; background: rgba(176, 122, 42, 0.1); color: var(--purple-bright); font-size: 0.7rem; white-space: nowrap; cursor: pointer; }
.as-card-jump:hover { background: rgba(176, 122, 42, 0.22); }
.as-apply-event { margin-left: 0.45rem; padding: 0.12rem 0.45rem; border: 1px solid var(--purple-bright); border-radius: 999px; background: rgba(176, 122, 42, 0.1); color: var(--purple-bright); font-size: 0.68rem; white-space: nowrap; cursor: pointer; }
.as-apply-event:hover { background: rgba(176, 122, 42, 0.22); }
.as-apply-event.is-applied { display: inline-flex; align-items: center; gap: 0.25rem; border-color: rgba(176, 122, 42, 0.62); background: rgba(176, 122, 42, 0.14); color: var(--purple-deep); cursor: default; opacity: 1; }
.as-apply-event.is-applied .as-lock-icon { width: 0.78rem; height: 0.78rem; opacity: 1; }
@keyframes as-soft-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }
.as-apply-event:not(.is-applied) { animation: as-soft-blink 2s ease-in-out infinite; }
.as-badge { padding: 0.2rem 0.55rem; border-radius: 999px; font-size: 0.74rem; }
.as-ok { border: 1px solid #477a62; color: #72d2a3; background: rgba(71, 122, 98, 0.12); }
.as-fail { border: 1px solid #7a4747; color: #ff9d9d; background: rgba(122, 71, 71, 0.12); }
.as-card-sub { margin: 0.5rem 0 0.35rem; color: var(--text-muted); font-size: 0.78rem; line-height: 1.6; }
.as-card-lock { margin: 0 0 0.4rem; color: var(--purple-bright); font-size: 0.74rem; }
.as-plan-list { margin: 0.35rem 0 0.4rem; padding-left: 1.2rem; color: var(--text-secondary); font-size: 0.85rem; line-height: 1.9; }
.as-plan-list li::marker { color: var(--purple-bright); }
.as-hit { color: #e6bd65; font-style: normal; margin-left: 0.3rem; }
.as-clear { color: #8fb8e0; font-style: normal; margin-left: 0.3rem; }
.as-seq { color: var(--text-muted); font-style: normal; margin-left: 0.3rem; }
.as-seq-cost { margin-left: 0.28rem; padding: 0 0.25rem; border-radius: 3px; background: rgba(176, 122, 42, 0.14); color: var(--purple-deep); font-size: 0.9em; white-space: nowrap; }
.as-card-end { margin: 0.25rem 0 0; color: var(--text-secondary); font-size: 0.84rem; }
.as-final-lock { display: inline-block; padding: 0 0.3rem; border: 1px solid rgba(86, 152, 214, 0.55); border-radius: 3px; background: rgba(86, 152, 214, 0.16); color: #a9d2f5; }
.as-card-fail { margin: 0.35rem 0 0; color: #ff9d9d; font-size: 0.85rem; }
.as-validate.is-error { color: #ff9d9d; }

/* ===== 页签导航 ===== */
.hengshan-tabs { display: flex; flex-wrap: wrap; gap: 0.45rem; width: 100%; }
.hengshan-tabs button { flex: 0 0 auto; padding: 0.52rem 1.15rem; border: 1px solid var(--border-color); border-bottom: 0; border-radius: 8px 8px 0 0; background: var(--bg-primary); color: var(--text-secondary); font-family: var(--font-serif); font-size: 0.9rem; cursor: pointer; transition: color 0.15s, border-color 0.15s, background 0.15s; }
.hengshan-tabs button:hover { color: var(--text-primary); }
.hengshan-tabs button.is-active { border-color: var(--purple-bright); color: var(--purple-deep); background: rgba(176, 122, 42, 0.16); box-shadow: inset 0 2px 0 var(--purple-bright); }
.hengshan-view { display: grid; gap: 1rem; width: 100%; min-width: 0; }
.hengshan-view[hidden] { display: none !important; }
.hengshan-view > section { width: 100%; min-width: 0; box-sizing: border-box; }

/* ===== 扫描选项 ===== */
.as-option-row { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; margin: 0.7rem 0 0.3rem; }
.as-check { display: inline-flex; align-items: center; gap: 0.4rem; margin: 0.15rem 0 0.2rem; color: var(--text-secondary); font-size: 0.82rem; cursor: pointer; user-select: none; }
.as-check input { width: 15px; height: 15px; accent-color: var(--purple-bright); cursor: pointer; margin: 0; }
.as-check:hover { color: var(--text-primary); }
.as-swap-name { padding: 0 0.15rem; border-radius: 3px; background: rgba(230, 189, 101, 0.16); color: #e6bd65; font-weight: 600; }
.as-swap-note { color: var(--text-muted); font-size: 0.58rem; white-space: nowrap; }
.as-wash-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; min-width: 0; margin: 0; padding: 0.45rem 0.55rem; border: 1px solid var(--border-color); border-radius: 6px; background: var(--bg-primary); }
.as-wash-row label { margin: 0; color: var(--text-muted); font-size: 0.68rem; white-space: nowrap; }
.as-wash-row input[type="number"] {
    width: 34px; height: 1rem; min-width: 0; box-sizing: border-box;
    background: var(--bg-primary); border: 1px solid var(--border-color); color: var(--text-primary);
    border-radius: 4px; padding: 0; font-size: 0.68rem; line-height: 1; text-align: center;
    appearance: textfield; -moz-appearance: textfield; -webkit-appearance: textfield;
}
.as-wash-row input[type="number"]::-webkit-inner-spin-button,
.as-wash-row input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.as-wash-row .as-hint { margin-top: 0; }
.as-run-config-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.55rem; align-items: stretch; margin-top: 0.7rem; }
.as-run-config-row #btnAutoSimRun { display: block; width: 100%; box-sizing: border-box; margin: 0; white-space: nowrap; }
.as-run-config-row .as-scope { width: 100%; box-sizing: border-box; min-width: 0; font-size: 0.66rem; padding: 0.45rem 0.5rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== 自动推演结果（仅展示命中） ===== */
.as-result-head { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.7rem; }
.as-result-count { font-family: var(--font-serif); font-size: 0.94rem; color: var(--text-primary); }
.as-result-count strong { color: #72d2a3; }
.as-special-note { flex: 0 0 auto; margin-left: 0.35rem; }
.as-special-note > summary { cursor: pointer; color: var(--purple-deep); font-size: 0.82rem; font-weight: 600; user-select: none; animation: as-soft-blink 2.4s ease-in-out infinite; }
.as-special-note[open] > summary { animation: none; }
.as-special-note-body {
    position: absolute; z-index: 30; top: calc(100% + 0.4rem); left: 0; right: auto;
    width: min(34rem, 100%); box-sizing: border-box;
    padding: 0.6rem 0.75rem; border: 1px solid var(--border-accent); border-radius: 6px;
    background: var(--bg-card); box-shadow: 0 8px 24px rgba(59, 47, 35, 0.18);
}
.as-note-line { margin: 0.35rem 0 0; font-size: 0.75rem; line-height: 1.7; }
.as-note-line:first-child { margin-top: 0; }
.as-note-timeout { color: #255ba6; }
.as-note-apply { color: #256b43; }
.as-note-apply-mark { color: #9c6410; font-weight: 700; }
.as-note-scenario { color: #7145a0; }
@media (prefers-reduced-motion: reduce) {
    .as-apply-event:not(.is-applied), .as-special-note > summary { animation: none; }
}
.hs-num { color: var(--purple-bright); font-weight: 600; }
.hengshan-note-red .hs-num, .hengshan-note-green .hs-num, .as-result-count .hs-num { color: inherit; }
.as-result-empty { margin: 0.35rem 0 0; padding: 0.9rem 1rem; border: 1px dashed var(--border-color); border-radius: 8px; color: var(--text-muted); font-size: 0.85rem; line-height: 1.7; }

@media (max-width: 640px) {
    .hengshan-tabs button { flex: 1 1 0; text-align: center; padding: 0.5rem 0.4rem; font-size: 0.82rem; }
    .as-card { padding: 0.65rem 0.7rem; }
    .as-card-name { font-size: 0.94rem; }
    .as-card-sub, .as-card-end, .as-card-lock { font-size: 0.74rem; line-height: 1.55; }
    .as-plan-list { padding-left: 1rem; font-size: 0.78rem; line-height: 1.7; }
    .as-hit, .as-seq { margin-left: 0.2rem; }
    .as-apply-event { margin-left: 0.3rem; padding: 0.08rem 0.35rem; font-size: 0.64rem; }
    .as-result-empty { padding: 0.75rem; font-size: 0.8rem; }
}
