/* 수업용 웹 엑셀: 왼쪽 메모장 탭 아래의 '엑셀' 탭 → 화면 가득 */
.sheet-open{left:0;top:calc(30% + 104px);border-left:0;border-radius:0 10px 10px 0}
body.sheet-on{overflow:hidden}
.sx{position:fixed;inset:0;z-index:15;display:none;flex-direction:column;gap:6px;background:#f3f5f8;padding:10px 14px;line-height:1.4}
.sx.on{display:flex}
.sx button{font:inherit;cursor:pointer}
.sx-head{display:flex;align-items:center;gap:12px;font-size:18px}
.sx-status{font-size:13px;color:#6a7385;margin-right:auto}
.sx-head button,.sx-tools button{font-size:15px;font-weight:700;padding:7px 14px;border:1px solid #d5dae3;border-radius:8px;background:#fff;color:#333;white-space:nowrap}
.sx-head button{background:#1f2430;border-color:#1f2430;color:#fff}
.sx-tools{display:flex;flex-wrap:wrap;gap:6px}
.sx-tools button:hover{background:#eef2f7}
.sx-bar{display:flex;gap:6px;align-items:stretch;font-size:var(--sx-fs,15px)}
.sx-name{min-width:64px;display:flex;align-items:center;justify-content:center;background:#fff;border:1px solid #cfd4dc;border-radius:6px;font-weight:700}
.sx-fx{flex:1;min-width:0;font:inherit;padding:5px 10px;border:1px solid #cfd4dc;border-radius:6px;outline:none}
.sx-fx:focus{border-color:#1763c6}

.sx-grid{position:relative;flex:1;min-height:0;overflow:auto;background:#fff;border:1px solid #cfd4dc;font-size:var(--sx-fs,15px);scroll-padding:calc(var(--sx-fs,15px) * 2.2) 0 0 52px}
.sx .sx-grid table{border-collapse:separate;border-spacing:0;table-layout:fixed;width:max-content;font-size:inherit;line-height:1.4;user-select:none}
.sx .sx-grid th,.sx .sx-grid tr td{border:0;border-right:1px solid #dde2ea;border-bottom:1px solid #dde2ea;padding:3px 6px;height:calc(var(--sx-fs,15px) * 2);vertical-align:middle;background:#fff;font-weight:400}
.sx .sx-grid td{width:calc(var(--sx-fs,15px) * 7.5);min-width:calc(var(--sx-fs,15px) * 7.5);max-width:calc(var(--sx-fs,15px) * 7.5);overflow:hidden;white-space:pre;text-overflow:ellipsis;cursor:cell}
.sx .sx-grid th{position:sticky;background:#eef2f7;text-align:center;color:#4a5365;cursor:pointer;z-index:2}
.sx .sx-grid thead th{top:0}
.sx .sx-grid tbody th{left:0;min-width:52px;z-index:1}
.sx .sx-grid th.sx-corner{left:0;z-index:3}
.sx .sx-grid th.sx-hi{background:#cfe0fa;color:#14529a;font-weight:700}
.sx .sx-grid tr td.sx-num{text-align:right}
.sx .sx-grid tr td.sx-mid{text-align:center}
.sx .sx-grid tr td.sx-err{text-align:center;color:#c8102e}
.sx .sx-grid tr td.sx-sel{background:#e3eefd}
.sx .sx-grid tr td.sx-cur{background:#fff;box-shadow:inset 0 0 0 2px #1763c6}
/* 선택한 칸 위의 입력칸: 평소에는 투명 */
.sx-in{position:absolute;margin:0;font:inherit;padding:2px 5px;border:2px solid #1763c6;background:#fff;color:#1f2430;outline:none;opacity:0;pointer-events:none}
.sx-in.on{opacity:1;pointer-events:auto;box-shadow:0 4px 14px rgba(20,30,50,.18)}

.sx-tabs{display:flex;gap:4px;overflow-x:auto;font-size:15px;padding-bottom:2px;flex:none}
.sx-tab{display:flex;align-items:center;background:#e6e9ef;border:1px solid #cfd4dc;border-radius:0 0 8px 8px;white-space:nowrap}
.sx-tab.on{background:#fff;border-bottom:3px solid #1763c6;font-weight:700}
.sx-tabs button{border:0;background:none;padding:7px 14px;color:#1f2430;white-space:nowrap}
.sx-tabs .sx-del{padding:7px 10px;color:#c8102e}
.sx-tabs .sx-add{border:1px dashed #b9c0cc;border-radius:8px}
.sx-rename{font:inherit;width:140px;margin:3px;padding:3px 6px;border:1px solid #1763c6;border-radius:4px}

@media (max-width:820px){
  .sx{padding:6px}
  .sx-head button,.sx-tools button{font-size:13px;padding:6px 9px}
  .sx-status{display:none}
  .sx-head strong{margin-right:auto}
}
@media print{.sheet-open,.sx{display:none!important}}
