/* 시간표 교체 관리 v8.0.0 — #st-root 스코핑으로 WordPress 테마 충돌 방지 */
#st-root{--sbg:#fff;--sbg2:#f8f9fa;--sbg3:#f1f3f5;--sbd:#dee2e6;--sbd2:#ced4da;--stx:#1a1a1a;--stx2:#555;--stx3:#888;--sblue:#1971c2;--sbbg:#e7f5ff;--sbbd:#a5d8ff;--sbt:#1864ab;--sgrn:#2b8a3e;--sgbg:#ebfbee;--sgbd:#8ce99a;--sred:#c92a2a;--srbg:#fff5f5;--srbd:#ffa8a8;--samb:#854d0e;--sabg:#fff3bf;--sabd:#ffd43b;
  font-family:-apple-system,BlinkMacSystemFont,'Noto Sans KR',sans-serif;font-size:14px;color:var(--stx)}
#st-root *,#st-root *::before,#st-root *::after{box-sizing:border-box;margin:0;padding:0}

/* 탭 */
#st-root .s-tb{display:flex;gap:4px;border-bottom:2px solid var(--sbd);margin-bottom:1.4rem;flex-wrap:wrap}
#st-root .s-tab{background:none;border:none;padding:.58rem 1.1rem;cursor:pointer;font-size:13px;color:var(--stx2);border-radius:6px 6px 0 0;display:flex;align-items:center;gap:5px;transition:.12s;line-height:1}
#st-root .s-tab:hover{background:var(--sbg2)}
#st-root .s-tab.on{color:var(--sblue);border:2px solid var(--sbd);border-bottom:2px solid var(--sbg);background:var(--sbg);font-weight:600;margin-bottom:-2px}
#st-root .s-tn{font-size:10px;opacity:.4}

/* 레이아웃 */
#st-root .s-sec{max-width:960px;padding-bottom:2rem}
#st-root .s-card{background:var(--sbg2);border:1px solid var(--sbd);border-radius:10px;padding:1.1rem 1.3rem;margin-bottom:1rem}
#st-root h2{font-size:17px;font-weight:600;margin-bottom:.6rem;color:var(--stx)}
#st-root h3{font-size:14px;font-weight:600;margin:.9rem 0 .45rem;color:var(--stx)}
#st-root .s-desc{font-size:13px;color:var(--stx2);line-height:1.7;margin-bottom:.7rem}

/* 버튼 */
#st-root .s-btn{display:inline-flex;align-items:center;gap:.4rem;padding:.56rem 1.2rem;border:1.5px solid var(--sbd2);border-radius:8px;cursor:pointer;font-size:13px;background:var(--sbg);color:var(--stx);transition:.12s;white-space:nowrap;line-height:1}
#st-root .s-btn:hover{background:var(--sbg2)}
#st-root .s-btn.pr{background:var(--sblue);color:#fff;border-color:var(--sblue)}
#st-root .s-btn.pr:hover{background:#1864ab}
#st-root .s-brow{display:flex;gap:.9rem;flex-wrap:wrap;margin-top:1.1rem}

/* 교시 토글 */
#st-root .s-drow{display:flex;align-items:center;gap:1rem;padding:.45rem 0;border-bottom:1px solid var(--sbg3)}
#st-root .s-drow:last-child{border:none}
#st-root .s-dlbl{min-width:52px;font-size:13px;font-weight:600}
#st-root .s-tgg{display:flex;gap:6px}
#st-root .s-tog{padding:.3rem .75rem;border:1.5px solid var(--sbd2);border-radius:7px;cursor:pointer;font-size:12px;background:var(--sbg);color:var(--stx2);transition:.12s}
#st-root .s-tog.on{background:var(--sbbg);color:var(--sbt);border-color:var(--sbbd);font-weight:600}

/* 미리보기 */
#st-root .s-pvw{overflow-x:auto;margin:.6rem 0}
#st-root table.s-pv{border-collapse:collapse;font-size:11px;white-space:nowrap}
#st-root .s-pv th{background:var(--sbg3);padding:.28rem .48rem;border:1px solid var(--sbd);font-weight:600;text-align:center}
#st-root .s-pv td{border:1px solid var(--sbd);padding:.24rem .4rem;text-align:center;min-width:26px}
#st-root .s-pv td.act{background:var(--sbg);font-weight:600}
#st-root .s-pv td.off{background:var(--sbg2);color:#ccc}

/* 폼 */
#st-root .s-fg{display:grid;grid-template-columns:repeat(auto-fill,minmax(165px,1fr));gap:.7rem;margin:.5rem 0}
#st-root .s-fg label{display:flex;flex-direction:column;gap:.25rem;font-size:12px;color:var(--stx2)}
#st-root .s-fg input,#st-root .s-fg select{padding:.4rem .55rem;border:1.5px solid var(--sbd2);border-radius:7px;font-size:13px;background:var(--sbg);color:var(--stx)}

/* 메시지 */
#st-root .s-msg{padding:.62rem 1rem;border-radius:8px;font-size:13px;margin:.55rem 0;display:none}
#st-root .s-msg.ok{background:var(--sgbg);color:var(--sgrn)}
#st-root .s-msg.er{background:var(--srbg);color:var(--sred)}
#st-root .s-msg.ld{background:var(--sbbg);color:var(--sbt)}

/* 드롭존 */
#st-root .s-drop{border:2px dashed var(--sbd2);border-radius:10px;padding:2rem 1rem;text-align:center;cursor:pointer;margin:.6rem 0;transition:.15s}
#st-root .s-drop:hover,#st-root .s-drop.ov{border-color:var(--sblue);background:var(--sbbg)}

/* 다운로드 박스 */
#st-root .s-dlbox{display:flex;align-items:center;justify-content:space-between;gap:1rem;border:1px solid var(--sbd);border-radius:10px;padding:.95rem 1.2rem;background:var(--sbg2);flex-wrap:wrap;margin:.65rem 0}

/* 통계·뱃지 */
#st-root .s-stats{display:flex;gap:.45rem;flex-wrap:wrap;margin:.55rem 0}
#st-root .s-stat{background:var(--sbg2);border-radius:7px;padding:.35rem .75rem;font-size:12px;font-weight:600}
#st-root .s-stat.ok{background:var(--sgbg);color:var(--sgrn)}
#st-root .s-stat.wn{background:var(--sabg);color:var(--samb)}
#st-root .s-badge{font-size:11px;padding:2px 8px;border-radius:99px;border:1px solid var(--sbd);background:var(--sbg2);color:var(--stx2);display:inline-block}
#st-root .s-badge.info{background:var(--sbbg);color:var(--sbt);border-color:var(--sbbd)}
#st-root .s-badge.ok{background:var(--sgbg);color:var(--sgrn);border-color:var(--sgbd)}
#st-root .s-badge.wn{background:var(--sabg);color:var(--samb);border-color:var(--sabd)}
#st-root .s-badge.er{background:var(--srbg);color:var(--sred);border-color:var(--srbd)}

/* 안내 */
#st-root .s-ibox{background:var(--sbbg);border:1px solid var(--sbbd);border-radius:9px;padding:.8rem 1.1rem;font-size:13px;color:var(--sbt);margin:.65rem 0}
#st-root .s-ibox ol{margin:.35rem 0 0 1.2rem;line-height:2.1}
#st-root code{background:var(--sbg);border:1px solid var(--sbbd);border-radius:4px;padding:0 3px;font-size:11px;color:var(--sbt)}

/* 전체 시간표 */
#st-root .s-fwrap{overflow-y:auto;max-height:72vh;border:1px solid var(--sbd);border-radius:8px;margin:.65rem 0;width:100%}
#st-root table.s-ftt{border-collapse:collapse;font-size:10px;table-layout:fixed;width:100%}
#st-root .s-ftt .cn{background:var(--sbg3);width:72px;min-width:56px;padding:.3rem .35rem;border:1px solid var(--sbd);font-weight:600;text-align:center;position:sticky;left:0;top:0;z-index:5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#st-root .s-ftt .ph{background:var(--sbg3);padding:.28rem .1rem;border:1px solid var(--sbd);font-weight:600;text-align:center;white-space:nowrap;position:sticky;top:0;z-index:2;line-height:1.3;font-size:9.5px;overflow:hidden}
#st-root .s-ftt .tn2{background:var(--sbg2);padding:.28rem .3rem;border:1px solid var(--sbd);font-weight:600;text-align:center;white-space:nowrap;font-size:10px;position:sticky;left:0;z-index:3;cursor:pointer;overflow:hidden;text-overflow:ellipsis}
#st-root .s-ftt .tn2:hover{background:var(--sbbg)}
#st-root .s-ftt .tn2.excl{background:var(--sabg);color:var(--samb);text-decoration:line-through}
#st-root .s-ftt .tn2.me{background:var(--sbbg);color:var(--sbt)}
#st-root .s-ftt td{border:1px solid var(--sbd);padding:.2rem .1rem;text-align:center;vertical-align:middle;cursor:default;font-size:9.5px;overflow:hidden;line-height:1.3}
#st-root .s-ftt td.emp{color:#ccc}
#st-root .s-ftt td.ood{background:var(--sbg2);color:#e0e0e0}
#st-root .s-ftt td.nc{background:#f5f5f5;color:#bbb}
#st-root .s-ftt td.sp{background:#eef6ff}
#st-root .s-ftt td.cf{background:var(--sabg)}
#st-root .s-ftt td.myc{cursor:pointer}
#st-root .s-ftt td.myc:not(.nc):not(.ood):not(.emp):hover{outline:2px solid var(--sblue);outline-offset:-2px;background:var(--sbbg)}
#st-root .s-ftt td.sel-out{background:#d3f9d8;outline:2px solid var(--sgrn);outline-offset:-2px;cursor:pointer}
#st-root .s-ftt td.blk{background:var(--srbg);outline:2px solid var(--sred);outline-offset:-2px;cursor:pointer}
#st-root .s-ftt td.free-me{cursor:pointer;background:#fffde7}
#st-root .s-ftt td.free-me:hover{outline:2px solid var(--samb);outline-offset:-2px}
#st-root .s-cs{display:block;font-weight:600;font-size:9.5px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:1.2}
#st-root .s-cc{display:block;font-size:8.5px;color:var(--stx3);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:1.2}

/* ══ 제약 조건 UI ══ */
#st-root .s-cbox{background:var(--sbg2);border:1px solid var(--sbd);border-radius:10px;padding:1rem 1.2rem;margin:.7rem 0}
#st-root .s-csec{margin-bottom:1.1rem;padding-bottom:1.1rem;border-bottom:1px solid var(--sbd)}
#st-root .s-csec:last-child{margin-bottom:0;padding-bottom:0;border:none}
#st-root .s-ctitle{display:flex;align-items:center;gap:.5rem;font-size:14px;font-weight:600;margin-bottom:.6rem;color:var(--stx)}
#st-root .s-cperson{display:inline-block;font-size:11px;font-weight:600;padding:2px 9px;border-radius:99px}
#st-root .s-cperson.sub{background:var(--sabg);color:var(--samb);border:1px solid var(--sabd)}
#st-root .s-cperson.me{background:var(--sbbg);color:var(--sbt);border:1px solid var(--sbbd)}
#st-root .s-crow{display:flex;align-items:center;gap:.7rem;margin-bottom:.6rem;flex-wrap:wrap}
#st-root .s-cnum{display:inline-flex;align-items:center}
#st-root .s-cinput{width:52px;padding:.32rem .4rem;border:1.5px solid var(--sbd2);border-radius:7px;font-size:14px;font-weight:600;text-align:center;background:var(--sbg);color:var(--stx)}
#st-root .s-cinput:focus{outline:none;border-color:var(--sblue);box-shadow:0 0 0 2px var(--sbbg)}
#st-root .s-clabel{font-size:13px;color:var(--stx);line-height:1.5}
#st-root .s-cunit{font-size:13px;color:var(--stx2)}
#st-root .s-cnote{font-size:12px;color:var(--stx3)}
#st-root .s-ccheck{display:flex;align-items:center;gap:.4rem;font-size:13px;cursor:pointer;user-select:none}
#st-root .s-ccheck input[type=checkbox]{width:15px;height:15px;cursor:pointer;accent-color:var(--sblue)}
#st-root .s-csubrow{padding-left:1.6rem;margin-bottom:.6rem;display:flex;align-items:center;gap:.7rem;flex-wrap:wrap;transition:opacity .15s}

/* 결과 */
#st-root .s-rwrap{overflow-x:auto;margin:.65rem 0}
#st-root table.s-res{border-collapse:collapse;font-size:13px;width:100%;min-width:700px}
#st-root .s-res th,#st-root .s-res td{border:1px solid var(--sbd);padding:.48rem .7rem;text-align:left;vertical-align:top}
#st-root .s-res th{background:var(--sbg2);font-weight:600;white-space:nowrap}
#st-root .s-res tr:hover td{background:var(--sbg2)}
#st-root .s-ssel{padding:.33rem .48rem;border:1.5px solid var(--sbd2);border-radius:6px;font-size:12px;background:var(--sbg);max-width:120px}
#st-root .s-vbox{border-radius:9px;padding:.85rem 1.1rem;margin:.8rem 0}
#st-root .s-vbox.ok{background:var(--sgbg);border:1px solid var(--sgbd)}
#st-root .s-vbox.er{background:var(--srbg);border:1px solid var(--srbd)}
#st-root .s-vrow{display:flex;align-items:flex-start;gap:.7rem;margin-bottom:.42rem;font-size:13px}

/* 이슈 */
#st-root table.s-it{width:100%;border-collapse:collapse;font-size:12px;margin-top:.5rem}
#st-root .s-it th,#st-root .s-it td{border:1px solid var(--sbd);padding:.32rem .55rem;text-align:left}
#st-root .s-it th{background:var(--sbg2);font-weight:600}

@media print{
  #st-root .s-tb,#st-root .s-brow,#st-root .s-cbox,#st-root .s-drop,#st-root .s-ibox,
  #st-root .s-btn,#st-root .s-tog,input[type=file],input[type=range]{display:none!important}
  #st-root .s-res{font-size:11px}
  #st-root .s-vbox,#st-root .s-badge,#st-root .s-fwrap{display:none!important}
  #st-root #s-journal{font-size:12px;border:1px solid #000}
  #st-root #s-journal th,#st-root #s-journal td{border:1px solid #000;padding:.3rem .5rem}
}
