/* 教學工具元件樣式集中管理 */
#teaching-toolbar{isolation:isolate;}
#teaching-toolbar .tool-btn,#tool-selfhua{white-space:nowrap;}
body.teaching-screen-locked #teaching-layer{touch-action:none;}
.teaching-fly-source::after{pointer-events:none;}


/* fix45：飛星功能內的大限／流年／宮職與精簡流運切換 */
.teaching-flystar-flow-controls{display:flex;align-items:center;gap:4px;flex-wrap:wrap;min-width:0}
.teaching-fly-mode-btn,.teaching-fly-step-btn{height:26px;border:1px solid #68605C;border-radius:4px;background:#766E6A;color:#fff;font-size:11px;font-weight:700;line-height:1;transition:background .15s ease,border-color .15s ease}
.teaching-fly-mode-btn{padding:0 9px}
.teaching-fly-mode-btn.active{background:#5C7D6A;border-color:#4F6D5C;box-shadow:inset 0 0 0 1px rgba(255,255,255,.16)}
.teaching-fly-step-group{display:inline-flex;align-items:center;height:26px;border:1px solid #68605C;border-radius:5px;overflow:hidden;background:#F7F3EF;color:#5C5551}
.teaching-fly-step-btn{width:24px;padding:0;border:0;border-radius:0;background:#766E6A}
.teaching-fly-step-btn:disabled{opacity:.38;cursor:not-allowed}
.teaching-fly-step-value{display:inline-flex;align-items:center;justify-content:center;min-width:38px;padding:0 5px;font-size:11px;font-weight:800;white-space:nowrap}
@media(max-width:459px){.teaching-flystar-flow-controls{flex-basis:100%;gap:3px}.teaching-fly-mode-btn{padding:0 7px}.teaching-fly-step-value{min-width:34px;padding:0 4px}}

/* fix45 飛星整合：上方四化鎖定、跨層來源標示 */
.sihua-layer-choice.teaching-fly-locked{opacity:.48;cursor:not-allowed}
button.teaching-fly-locked{opacity:.48;cursor:not-allowed}
#teaching-toolbar .teaching-fly-source{outline:2px solid rgba(95,83,101,.55);outline-offset:-2px}

/* 實測 12：飛星流運控制已移到外層工具列。
   不再一直佔位，只在「飛星」短線模式或教學飛星啟用時出現。
   本規則必須放在 .teaching-flystar-flow-controls{display:flex} 之後才會生效。 */
.teaching-flystar-flow-controls{display:none}
body.self-flystar-active .teaching-flystar-flow-controls,
body.teaching-mode .teaching-flystar-flow-controls{display:flex}
