/* ═══════════ 학생 화면 · 휴대폰 · 태블릿 (2026-11-26) ═══════════
   학생 관리 · 학생 상세 · 학생 정보 수정 창 · 상담 예약 창 · 학생 정보 등록(직접 입력 · 파일 업로드 · 업로드 이력 · 내보내기) · 학원 설정.
   compact = 900px 이하(태블릿 세로 · 작은 노트북), phone = 600px 이하(휴대폰).
   데스크톱(900px 초과)은 지금 그대로 — 모든 규칙은 미디어 쿼리 안에만 둔다(누르는 영역만 넓히는 pointer:coarse 규칙 포함).
   id · class · data-속성 · 문구는 바꾸지 않고 배치만 바꾼다. 읽는 순서: m-shell.css(공용: 앱 바 · 서랍 · 입력 창 시트 · 입력 칸 16px ·
   날짜 달력 · 도움말 누르는 영역) → m-students.css(이 파일) → m-counsel.css.
   JS 짝: app-students.js(stuMQ · stuFilterToggle · stuCkAll · drawScores 좁은 칸) · app-io.js(ioSizeVars · ioErrBubble · acOpen) · nsel.js(place) */


/* ══════════ compact: 900px 이하 ══════════
   입력 칸 글자 16px · 빈 칸 '선택' 글자색 · 날짜 달력 · 학교 선택 누르는 크기 · 도움말(?) 누르는 영역 · 입력 창 시트는 m-shell.css(공용)가 맡는다 */
@media (max-width:900px){
  /* 날짜 단추(.fpick)도 글자 칸과 같은 16px · 검색 칸 · 학교 칸의 자리표시 글은 읽을 수 있는 회색(4.7:1) */
  #fBody .egrid .fpick,#fBody .rgrid .fpick{font-size:16px}
  #listView .search input::placeholder,#fBody .egrid .nsel-field .ph{color:#69758a}

  /* 누르는 곳 44px 이상(태블릿 · 휴대폰 공통) */
  #listView .stchips button,#listView .sec-head .r>.btn,#listView .sec-head .r>.btn-del,
  #rows .st .btn,#listView .filters .sel,#listView .filters .search input,
  #detailView .dactions .btn,#detailView .dactions .btn-del,#detailView .chart-head .seg button,#detailView .subj-chips .chip,
  #dLogRows .btn,#exportBtn,#ioTabs .tab,#saveBtn,#upKind button,#tplBtn,#upGo,
  #setView .tin,#setView .sel,#setView #acctBtn,
  #fBody .egrid .fin,#fBody .egrid .sel,#fBody .rgrid .fin,#fBody .rgrid .sel,#fBody .rgrid .seg2 button,
  #exKind button,#fBody .exgrid .sel{min-height:44px}
  #listView .sec-head .r>.btn,#listView .sec-head .r>.btn-del,#detailView .dactions .btn,#detailView .dactions .btn-del,
  #exportBtn,#tplBtn{display:inline-flex;align-items:center;justify-content:center}
  #detailView .chart-head .seg button{padding-top:0;padding-bottom:0;min-width:44px}
  /* 작은 글 13px 이상(데스크톱 12~12.5px): 성적 추세 탭(학원 시험 · 학교 내신 · 월간 · 주간 — 학생 상세 · 상담 진행) ·
     직접 입력 [저장] · 업로드 [양식 내려받기](14px) · 직접 입력 표 줄 번호 · 학생 목록 판정 색 범례 */
  .chart-head .seg.ctype button,.chart-head .seg.ctype button.kd{font-size:13px}
  #ioDirect .io-bar #saveBtn,#ioUpMount #tplBtn{font-size:14px}
  #ioTableMount td.idx{font-size:13px}
  #listView .glegend{font-size:13px}
  #dScoreRows .del{width:44px;height:44px;border-radius:10px}
  /* 체크 칸: 44px 누름 영역(label.ckhit · label.ckall — app-students.js 가 900px 이하에서 감싼다) */
  #rows .ckhit,#listView .ckall{display:inline-grid;place-items:center;min-width:44px;min-height:44px;cursor:pointer;vertical-align:middle}
  #listView .ckall .rowck,#rows .rowck{width:18px;height:18px}
  /* 학생 이름(상세 열기) · 예약 '변경 · 삭제': 줄 높이 · 칸 배치는 그대로 두고 누르는 영역만 44px 이상으로(이름은 글 줄 안의 span 이라
     위아래 여백이 줄 높이를 바꾸지 않는다 · 단추는 여백만큼 음수 바깥 여백) — 표(태블릿)와 카드(휴대폰) 모두 */
  #rows .nmlink{padding:14px 8px;margin:0 -8px}
  #rows .lnkb{padding:14px 11px;margin:-14px -11px}
  /* 원생명 자동 검색 목록(태블릿도): 이름은 윗줄, 학생 번호 · 학년 · 학교 · 반은 아랫줄 — 좁은 칸에서 학년이 '초등 …'으로 잘리던 것.
     보조 글 13px · 줄 48px(휴대폰은 아래 phone 규칙 .acpop-m 이 너비 · 글자를 더 맞춘다) */
  .acpop button{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 10px;min-height:48px;padding:8px 10px}
  .acpop button b{flex:1 1 100%;font-size:15px}
  .acpop span{font-size:13px}
  /* 직접 입력 표의 칸 · 성적 조건 줄 · 예약 창 알림톡 줄 · 업로드 중복 확인 줄 */
  #ioTableMount .cell-in,#ioTableMount .cell-sel,#ioTableMount .cell-pick{min-height:44px}
  #ioFilter .iof .sel,#ioFilter .iof .fpick{min-height:44px}
  #fBody .rgrid~.fchk,#fBody .fchk.dupall,#fBody .dupchk .fchk{min-height:44px}

  /* 학생 정보 수정 창: 두 칸(세 칸이면 칸이 좁아 날짜 · 학교 이름이 잘림) */
  #fBody .egrid{grid-template-columns:repeat(2,minmax(0,1fr))}

  /* 넓은 표의 빈 목록 안내: 표 가운데(화면 밖)가 아니라 보이는 왼쪽에 */
  #rows td.empty,#upRows td.empty{text-align:left;padding-left:16px}

  /* 학생 정보 등록 · 직접 입력 표: 가로로 밀어 입력하는 표 그대로 두고, 줄 번호 · 원생명 칸을 왼쪽에 고정한다(몇 번째 학생인지 늘 보이게).
     고정 칸의 left 와 [+ 행 추가] 너비는 app-io.js ioSizeVars 가 잰 값(--io-idx · --io-w).
     오른쪽 그림자 = 옆으로 더 밀 수 있다는 단서(끝까지 밀면 사라짐) */
  #ioTableMount{overscroll-behavior-x:contain;
    background:linear-gradient(90deg,rgba(255,255,255,0),#fff 75%) 100% 0/32px 100% no-repeat local,
      radial-gradient(farthest-side at 100% 50%,rgba(20,30,50,.22),rgba(20,30,50,0)) 100% 0/14px 100% no-repeat scroll,#fff}
  #ioTableMount th.idx,#ioTableMount td.idx{position:sticky;left:0;z-index:3;background:#fff}
  #ioTableMount thead th:nth-child(2),#ioTableMount tbody tr:not(.addrow)>td:nth-child(2){position:sticky;left:var(--io-idx,40px);z-index:3;background:#fff;
    box-shadow:inset -1px 0 0 var(--line),8px 0 8px -8px rgba(20,30,50,.25)}
  #ioAdd{position:sticky;left:0;width:var(--io-w,100%);max-width:100%;min-height:44px}
  #ioTableMount .cell-sel{min-width:84px;padding-left:8px;padding-right:24px}   /* 16px 글자에서 '선택'이 잘리지 않게(성별 · 학년 칸) */

  /* 업로드 이력: 머리글 고정 너비(200 · 160px)를 풀어 표가 칸 안에 들어오게(셋째 칸 '반영 데이터'가 잘리던 것) */
  #upHistCard .uptbl table{min-width:0}
  #upHistCard .uptbl th{width:auto!important}
  #upRows .fext{font-size:12px}

  /* 학생 상세 · 상담 이력 · 성적 데이터 등록 이력: 표 → 카드(휴대폰 한 줄, 태블릿 두 줄) — 넓은 표를 밀지 않아도 단추 · 값이 다 보인다 */
  #detailView .tbl-wrap{overflow:visible;background:none}
  #detailView .tbl-wrap>table{display:block;min-width:0}
  #detailView .tbl-wrap>table>thead{display:none}
  #detailView .tbl-wrap>table>tbody{display:block}
  #dLogRows>tr,#dScoreRows>tr{margin:0 0 10px;padding:12px;border:1px solid var(--line);border-radius:12px;background:#fff}
  #dLogRows>tr:last-child,#dScoreRows>tr:last-child{margin-bottom:0}
  #dLogRows>tr>td,#dScoreRows>tr>td{display:block;padding:0;border:0;white-space:normal;min-width:0}
  #dLogRows>tr:has(>.empty),#dScoreRows>tr:has(>.empty){display:block;padding:0;border:0;background:none}
  #detailView td.empty{padding:28px 8px;text-align:center}
  /* 상담 이력: 일시 · 상태 / 방식 · 대상 · 교사 / CARE-8 / 리포트 / 단추 */
  #dLogRows>tr{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:6px 6px;align-items:center}
  #dLogRows>tr>td:nth-child(1){grid-column:1 / 3;grid-row:1;font-size:15px}
  #dLogRows>tr>td:nth-child(1) .sub{display:inline;margin-left:6px;font-weight:700}
  #dLogRows>tr>td:nth-child(2){grid-column:3;grid-row:1;justify-self:end}
  #dLogRows>tr>td:nth-child(3){grid-column:1;grid-row:2;font-size:13.5px;color:#3d4a60}
  #dLogRows>tr>td:nth-child(3) .sub{display:inline;margin:0;font-size:13.5px}
  #dLogRows>tr>td:nth-child(3) .sub::before{content:" · "}
  #dLogRows>tr>td:nth-child(4){grid-column:2 / -1;grid-row:2;font-size:13.5px;color:#3d4a60}
  #dLogRows>tr>td:nth-child(4):not(:empty)::before{content:"· "}
  #dLogRows>tr>td:nth-child(n+5){grid-column:1 / -1}
  #dLogRows>tr>td:has(>.dash),#dLogRows>tr>td:has(>.pillset>.dash),#dLogRows>tr>td:last-child:empty{display:none}
  #dLogRows>tr>td:nth-child(6)::before{content:"리포트";margin-right:8px;font-size:13px;color:var(--muted)}
  #dLogRows>tr>td:last-child{margin-top:4px}
  #dLogRows .hbtn{justify-content:stretch}
  #dLogRows .hbtn .btn,#dLogRows>tr>td:last-child>.btn{flex:1;width:100%;font-size:14px}
  /* 성적 이력: 시험일 · 과목 · 원점수 / 시험 유형 · 구분 / 입력 일시 · 방법, 삭제(44px)는 오른쪽 위 */
  #dScoreRows>tr{display:flex;flex-wrap:wrap;align-items:center;column-gap:8px;row-gap:0;position:relative;padding-right:62px}
  #dScoreRows>tr::before{content:"";order:4;flex-basis:100%;height:6px}
  #dScoreRows>tr::after{content:"";order:7;flex-basis:100%;height:6px}
  #dScoreRows>tr>td:nth-child(5){order:1;font-size:15px;font-weight:800;color:#22314a}
  #dScoreRows>tr>td:nth-child(4){order:2}
  #dScoreRows>tr>td:nth-child(6){order:3;margin-left:auto;font-size:16px}
  #dScoreRows>tr>td:nth-child(2){order:5}
  #dScoreRows>tr>td:nth-child(3){order:6}
  #dScoreRows>tr>td:nth-child(1){order:8;font-size:13px;font-weight:600;color:var(--muted)}
  #dScoreRows>tr>td:nth-child(7){order:9;flex:1 1 0;min-width:0;font-size:13px;overflow-wrap:anywhere}
  #dScoreRows>tr>td:nth-child(7)::before{content:"· "}
  #dScoreRows>tr>td:nth-child(8){position:absolute;right:8px;top:8px}
}


/* ══════════ 태블릿: 601~900px — 넓은 표는 그대로 가로로 밀고, 이름 · 상담 단추 칸을 고정 ══════════ */
@media (min-width:601px) and (max-width:900px){
  /* 학생 관리: 이름 칸은 왼쪽, [상담 예약/시작] 칸은 오른쪽에 붙어 있게 — 가운데 칸만 밀린다 */
  #rows tr.row>td:nth-child(3),#listView .ltbl thead th:nth-child(3){position:sticky;left:0;z-index:1;background:#fff;
    box-shadow:inset -1px 0 0 var(--line2),8px 0 8px -8px rgba(20,30,50,.18)}
  #rows tr.row>td:last-child,#listView .ltbl thead th:last-child{position:sticky;right:0;z-index:1;background:#fff;
    box-shadow:inset 1px 0 0 var(--line2),-8px 0 8px -8px rgba(20,30,50,.18)}
  #rows tr.row.out>td:nth-child(3),#rows tr.row.out>td:last-child{background:#eef0f3}
  /* 표 머리의 '전체 선택' 체크: 누름 영역 44px(머리 줄 높이는 그대로) · 글은 화면 읽기에만 */
  #listView .ltbl thead th.ck .ckall{margin:-10px 0}
  #listView .ckall-t{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
  /* 학생 상세: 상담 이력 · 성적 이력 카드는 두 줄로 나란히(아래 900px 이하 카드 규칙) */
  #detailView .tbl-wrap>table>tbody{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;align-items:start}
  #dLogRows>tr,#dScoreRows>tr{margin:0}
  #dLogRows>tr:has(>.empty),#dScoreRows>tr:has(>.empty){grid-column:1 / -1}
  #detailView .sinfo{grid-template-columns:repeat(3,minmax(0,1fr))}
}


/* ══════════ phone: 600px 이하 ══════════ */
@media (max-width:600px){
  #listView>.card,#detailView .card,#inputView .card,#setView .card{padding:16px 14px}
  #detailView .grid2{gap:12px}

  /* ── 학생 관리 · 머리: 상태 칩 한 줄 → 단추 한 줄(고른 학생이 없으면 [선택 학생 삭제]는 숨김) → 판정 색 범례 ── */
  #listView .sec-head{flex-direction:column;align-items:stretch;gap:10px;margin-bottom:10px!important}
  #listView .stchips{flex-wrap:wrap}
  #listView .stchips button{padding:0 14px}
  #listView .sec-head .r{display:flex;flex-wrap:wrap;gap:8px;margin:0;width:100%}
  #listView .sec-head .r>.btn,#listView .sec-head .r>.btn-del{flex:1 1 0;min-width:0;white-space:normal;word-break:keep-all;text-align:center;line-height:1.3;padding:6px 10px;font-size:14px}
  #listView #delSel{order:-1;flex:1 1 100%}
  #listView #delSel:disabled{display:none}
  #listView .glegend{order:9;flex:1 1 100%;width:100%;margin:0;gap:4px 12px;font-size:13px}

  /* ── 필터: 검색 칸 + [필터] 단추만 보이고, 누르면 학교급 · 학교 · 학년 · 반(2칸) · 정렬이 펼쳐진다(app-students.js stuFilterToggle) ── */
  .filters.fcoll{display:flex;flex-wrap:wrap;column-gap:8px;row-gap:0}
  .filters.fcoll::after{content:"";order:1;flex-basis:100%;height:0}   /* 검색 칸 · [필터] 단추 다음에서 줄을 바꾼다 */
  .filters.fcoll>.search{flex:1 1 0;min-width:0}
  .filters.fcoll>.search input{width:100%;min-height:44px}
  .filters.fcoll>.ftoggle{display:inline-flex;align-items:center;justify-content:center;gap:6px;flex:none;min-height:44px;padding:0 14px;font-size:14px}
  .ftoggle svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
  .ftoggle .fcnt:not(:empty){display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 6px;border-radius:10px;background:var(--brand);color:#fff;font-size:12px;font-weight:800}
  .ftoggle[aria-expanded="true"]{background:var(--brand-soft);border-color:#b9cbe6;color:var(--brand)}
  .filters.fcoll:not(.fopen)>.sel,.filters.fcoll:not(.fopen)>.sort-wrap{display:none}
  .filters.fcoll>.sel{order:2;flex:1 1 calc(50% - 4px);min-width:0;min-height:44px;margin-top:8px}
  .filters.fcoll>.sort-wrap{order:2;flex:1 1 100%;margin-top:8px;font-size:14px}
  .filters.fcoll>.sort-wrap .sel{flex:1;min-width:0;min-height:44px}

  /* ── 학생 관리 · 목록: 표 → 카드. 첫 줄 이름 · 배지, 둘째 줄 학생 번호 · 학교급 · 학교 · 학년 · 반, CARE-8, 최근 상담 · 예약, 상담 단추(전체 폭) ── */
  #listView .tbl-wrap{overflow:visible;margin-top:10px;background:none}
  #listView .ltbl{display:block;min-width:0;width:100%}
  #listView .ltbl thead{display:block}
  #listView .ltbl thead tr{display:flex;align-items:center}
  #listView .ltbl thead th{display:none}
  #listView .ltbl thead th.ck{display:block;width:auto;padding:0 0 6px;border:0}
  #listView .ckall{display:inline-flex;align-items:center;gap:10px;min-height:44px;padding:0 14px 0 15px;font-size:14px;font-weight:700;color:#3d4a60;cursor:pointer;border-radius:10px}
  #listView .ckall .rowck,#rows .rowck{width:20px;height:20px}
  #listView .ltbl:not(:has(#rows tr.row)) thead{display:none}   /* 고를 학생이 없으면 '전체 선택'도 숨김 */
  #listView .ltbl tbody{display:block}
  #rows tr.row{display:flex;flex-wrap:wrap;align-items:center;row-gap:3px;position:relative;margin:0 0 10px;padding:12px 12px 12px 50px;
    border:1px solid var(--line);border-radius:12px;background:#fff}
  #rows tr.row:last-child{margin-bottom:0}
  #rows tr.row>td{display:block;padding:0;border:0;white-space:normal;background:transparent;min-width:0}
  #rows tr.row>td.ck{position:absolute;left:3px;top:6px;width:44px}
  #rows .ckhit{display:grid;place-items:center;width:44px;height:44px;cursor:pointer}
  #rows tr.row>td:nth-child(3){order:1;flex:1 1 100%;padding-top:4px}
  #rows .nm{font-size:16px;line-height:1.5}
  #rows .why{max-width:none}
  #rows tr.row>td:nth-child(2),#rows tr.row>td:nth-child(4),#rows tr.row>td:nth-child(5),#rows tr.row>td:nth-child(6),#rows tr.row>td:nth-child(7){
    order:2;flex:none;max-width:100%;font-size:13px;font-weight:600;color:var(--muted);overflow-wrap:anywhere}
  #rows tr.row>td:nth-child(4)::before,#rows tr.row>td:nth-child(5)::before,#rows tr.row>td:nth-child(6)::before,#rows tr.row>td:nth-child(7)::before{content:"·";margin:0 5px;color:#8b96a6}
  #rows tr.row>td:nth-child(6)::after{content:"학년"}
  #rows tr.row>td:nth-child(n+4):nth-child(-n+7):empty{display:none}
  /* 아래 세 줄(CARE-8 · 최근 상담 · 상담 단추)은 체크 칸 아래까지 카드 전체 폭 */
  #rows tr.row>td.tags{order:3;flex:1 1 100%;max-width:none;margin:10px 0 0 -38px}
  #rows .c8grid{grid-template-columns:repeat(auto-fill,minmax(72px,1fr));width:100%;gap:4px}
  #rows .c8c{text-align:center;overflow:hidden;text-overflow:ellipsis;padding:3px 4px}
  #rows tr.row>td.rsc{order:4;flex:1 1 100%;margin:10px 0 0 -38px}
  #rows .rs1,#rows .rs2{white-space:normal}
  #rows .lnkb{font-size:13.5px}   /* 변경 · 삭제: 누르는 영역 44px 는 위 900px 이하 규칙 */
  #rows tr.row>td:last-child{order:5;flex:1 1 100%;margin:10px 0 0 -38px}
  #rows .st{justify-content:stretch}
  #rows .st .btn{flex:1;min-height:44px;font-size:14px}
  #rows tr.row.out{background:#f1f3f6;border-color:#e1e5eb}
  #rows tr.row.out>td{background:transparent;color:#5f6b7d}
  #rows tr.row.out .nmlink{color:#4c5870}
  #rows tr:not(.row){display:block}
  #rows td.empty{display:block;padding:36px 8px;white-space:normal;text-align:center}

  /* ── 학생 관리 › 삭제한 학생 창: 표 → 카드(이름 · 번호 / 학교급 · 학교 · 학년 / 삭제일 · D-n, [복구]는 오른쪽) ── */
  .tbl-wrap:has(>.strash){overflow:visible;background:none}
  .strash{display:block;min-width:0}
  .strash thead{display:none}
  .strash tbody{display:block}
  .strash #trRows>tr{display:flex;flex-wrap:wrap;align-items:baseline;row-gap:4px;position:relative;padding:12px 96px 12px 2px;border-bottom:1px solid var(--line2)}
  .strash #trRows>tr:last-child{border-bottom:0}
  .strash #trRows>tr>td{display:block;padding:0;border:0;white-space:normal;font-size:13.5px;color:#4c5870}
  .strash #trRows>tr::before{content:"";order:3;flex-basis:100%;height:0}
  .strash #trRows>tr::after{content:"";order:7;flex-basis:100%;height:0}
  .strash #trRows>tr>td:nth-child(2){order:1;font-size:15px;color:#16223a}
  .strash #trRows>tr>td:nth-child(1){order:2;margin-left:8px;font-size:13px;color:var(--muted)}
  .strash #trRows>tr>td:nth-child(3){order:4}
  .strash #trRows>tr>td:nth-child(4){order:5}
  .strash #trRows>tr>td:nth-child(5){order:6}
  .strash #trRows>tr>td:nth-child(4)::before,.strash #trRows>tr>td:nth-child(5)::before{content:"·";margin:0 5px;color:#8b96a6}
  .strash #trRows>tr>td:nth-child(5)::after{content:"학년"}
  .strash #trRows>tr>td:nth-child(n+3):nth-child(-n+5):empty{display:none}
  .strash #trRows>tr>td:nth-child(6){order:8;font-size:13px;color:var(--muted)}
  .strash #trRows>tr>td:nth-child(6)::before{content:"삭제 "}
  .strash #trRows>tr>td:nth-child(7){order:9;margin-left:8px;font-size:13px}
  .strash #trRows>tr>td:nth-child(8){position:absolute;right:0;top:50%;transform:translateY(-50%)}
  .strash #trRows [data-rs]{min-height:44px;min-width:76px;font-size:14px}
  .strash #trRows>tr:has(>.empty){display:block;padding:0;border:0}
  .strash td.empty{display:block;padding:32px 8px;white-space:normal;text-align:center}

  /* ── 학생 상세 · 머리: 단추 세 개는 한 줄 전체 폭 · 기본 정보는 두 칸(다섯 칸이면 글자 단위로 끊겼다) ── */
  #detailView .dhead{gap:12px}
  #detailView .dhead .ava.lg{width:52px;height:52px}
  #detailView .dhead>div:nth-child(2){flex:1 1 0;min-width:0}
  #detailView .dhead h2{font-size:19px;line-height:1.45}
  #detailView .dmeta{word-break:keep-all;overflow-wrap:anywhere}
  #detailView .dactions{margin-left:0;width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  #detailView .dactions .btn,#detailView .dactions .btn-del{width:100%;padding:4px 6px;white-space:normal;text-align:center;line-height:1.3;font-size:14px;
    word-break:keep-all;overflow-wrap:anywhere}   /* '상담 예약/시작'이 '시 · 작'으로 낱자 사이에서 갈리지 않게(낱말 · '/' 뒤에서만 줄바꿈) */
  #detailView .sinfo{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px;padding:14px}
  #detailView .sinfo b{word-break:keep-all;overflow-wrap:anywhere}

  /* ── 학생 상세 · 성적 추세: 탭 · 과목 칩은 줄을 바꿔도 44px(그래프는 drawScores 가 칸 너비 그대로 그림) ── */
  #detailView .chart-head{row-gap:8px}
  #detailView .chart-head .seg button{padding:0 12px}
  #detailView .chart-head .r{margin-left:auto}

  /* ── 학생 상세 · CARE-8: 요소 값을 이름 아래 줄에 전체 글로(한 줄 말줄임이라 터치로는 전체 값을 볼 수 없었다) ── */
  #dCare .c8row{grid-template-columns:auto minmax(0,1fr) auto;row-gap:4px;padding:10px 2px}
  #dCare .c8row .v{grid-column:2 / -1;grid-row:2;white-space:normal;overflow:visible;text-overflow:clip;line-height:1.5}

  /* ── 학생 정보 수정 창: 한 칸 · 칸 높이 44px ── */
  #fBody .egrid{grid-template-columns:minmax(0,1fr);gap:12px}
  #fBody .egrid .flab{margin-bottom:6px}
  #fBody .egrid .nsel-field{min-height:44px}

  /* 상담 예약 · 시작 창 · 시험 정보 창(.rgrid 한 칸 · 날짜/시간 두 칸)은 m-shell.css 공용 규칙 */
  /* 업로드 중복 확인 창 · 원생명 확인 창: 고르는 줄 48px */
  #fBody .duplist label{min-height:48px;flex-wrap:wrap}
  /* 데이터 내보내기 창 */
  #exKind{display:flex;width:100%}
  #exKind button{flex:1;padding:0 8px}

  /* ── 학생 정보 등록 ── */
  #inputView>.card:first-child .sec-head{gap:10px}
  #inputView>.card:first-child .sec-head .r{margin-left:auto}
  #ioKinds button{padding:14px}
  #ioTabs .tab{padding:10px 14px}
  #ioTabs .tab.active{padding:10px 16px;font-size:15px}
  #ioDirect .io-bar #saveBtn{padding:0 22px;font-size:14px}
  /* 성적 조건 줄: 두 칸 · 라벨과 [적용]은 전체 폭 */
  #ioFilter .iof{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:12px}
  #ioFilter .iof .lb{grid-column:1 / -1;display:flex;align-items:center;margin:0}
  #ioFilter .iof .sel,#ioFilter .iof .fpick{width:100%!important;min-height:44px}
  #ioFilter #sfApply,#ioFilter #bfApply{grid-column:1 / -1;min-height:44px;font-size:14px}
  /* 직접 입력 표의 칸 · 원생명 자동 검색 — 성적 표의 원생명 칸(200px)은 고정 칸이라 좁혀서 옆 칸이 보일 자리를 남긴다 */
  #ioTableMount table.io-score thead th:nth-child(2){width:150px!important}
  #ioTableMount .cellwrap{flex-direction:column;align-items:stretch}
  #ioTableMount .acsel{position:static;align-self:flex-start;margin:0 0 4px 8px;font-size:12px}
  .acpop.acpop-m{max-height:min(320px,50vh);padding:6px}
  .acpop.acpop-m button{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 10px;min-height:48px;padding:8px 10px}
  .acpop.acpop-m button b{flex:1 1 100%;font-size:15px}
  .acpop.acpop-m span{font-size:13px}
  /* 파일 업로드: 안내 · [양식 내려받기] · 파일 고르기 · [업로드]를 세로로 */
  #ioUpMount .upwrap>.io-bar{flex-direction:column;align-items:stretch;gap:10px}
  #ioUpMount .upwrap>.io-bar .grow,#ioUpMount .upfoot .grow{display:none}
  #ioUpMount .drop2.upd{padding:22px 14px}
  #ioUpMount .iohd,#ioUpMount .drop2{word-break:keep-all;overflow-wrap:anywhere}   /* '그 · 대로', '1,000행까 · 지'처럼 낱말 가운데서 갈리지 않게 */
  #ioUpMount #upGo{flex:1 1 100%;min-height:48px;font-size:15px}
  /* 업로드 이력: 표 → 목록(파일 이름 / 일시 · 종류 · 반영 데이터) */
  #upHistCard .sec-head .r{margin-left:0;width:100%}
  #upHistCard #upKind{width:100%}
  #upHistCard #upKind button{flex:1;padding:0 6px}
  #upHistCard .uptbl{overflow:visible;background:none}
  #upHistCard .uptbl>table{display:block}
  #upHistCard .uptbl>table>thead{display:none}
  #upHistCard .uptbl>table>tbody{display:block}
  #upRows>tr{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;padding:12px 0;border-bottom:1px solid var(--line2)}
  #upRows>tr:last-child{border-bottom:0}
  #upRows>tr>td{display:block;padding:0;border:0;white-space:normal;min-width:0}
  #upRows>tr>td:nth-child(2){order:1;flex:1 1 100%;font-size:14px;overflow-wrap:anywhere}
  #upRows>tr>td:nth-child(1){order:2;font-size:13px;font-weight:600;color:var(--muted)}
  #upRows>tr>td:nth-child(3){order:3;display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px}
  #upRows>tr>td:nth-child(3) .sub{margin:0}
  #upRows>tr:has(>.empty){display:block}
  #upRows td.empty{text-align:center;padding:28px 8px}

  /* ── 학원 설정: 입력 칸 전체 폭 · [저장]은 화면 아래에 붙어 있게(맨 아래까지 내리지 않아도 저장) ── */
  #setView .setrow{gap:8px;padding:14px 0}
  #setView .setrow .tin:not(.num),#setView .setrow .sel{width:100%;max-width:none}
  #setView .setrow .num{width:56px;padding:6px 4px}
  #setView #acctBtn{width:100%}
  #setView .kkbar{width:100%;max-width:260px}
  /* 주의 · 위기 기준: 배지는 위 줄, '최근 [N]개 시험에서 [M]점 이상 하락'은 아래 줄(숫자 칸과 글이 떨어지지 않게) */
  #setView .ctl.crit>div{flex-wrap:wrap;column-gap:5px;row-gap:6px;white-space:nowrap}
  #setView .ctl.crit>div>.stb{order:-2}
  #setView .ctl.crit>div::before{content:"";order:-1;flex-basis:100%;height:0}
  #setView .savebar{position:sticky;bottom:0;z-index:5;margin:16px calc(-1 * var(--m-gr,16px)) 0 calc(-1 * var(--m-gl,16px));
    padding:12px var(--m-gr,16px) calc(12px + env(safe-area-inset-bottom,0px)) var(--m-gl,16px);
    background:rgba(255,255,255,.97);border-top:1px solid var(--line);box-shadow:0 -6px 16px rgba(20,30,50,.06)}
  #setView #setSave{width:100%;min-height:48px}
  /* 알림(예: 저장했습니다)은 아래에 붙은 [저장] 막대 위에 — 막대를 덮지 않게(m-shell.css 의 휴대폰 알림 위치 20px 대신) */
  body:has(#setView.show) #toast{bottom:calc(88px + env(safe-area-inset-bottom,0px))}

  /* ── 학교 선택(노션식): 화면 아래에 붙는 시트(nsel.js place 가 키보드 위로 붙인다). 항목 · ⋯ · 색 단추 크기는 m-shell.css 공용 규칙 ── */
  .nsel-pop.nsel-sheet{left:0!important;right:0!important;width:auto!important;top:auto!important;border-radius:16px 16px 0 0;border-bottom:0;
    padding:10px 12px calc(10px + env(safe-area-inset-bottom));box-shadow:0 -12px 40px rgba(20,30,50,.24)}
  .nsel-sheet .nsel-in input{min-height:44px}
  .nsel-sheet .nsel-it{padding:4px 8px}
  .nsel-sheet .nsel-clear{padding:0 12px}
  .nsel-sheet .nsel-rename{font-size:16px}
}


/* ══════════ 터치 태블릿(가로, 900px 초과): 데스크톱 배치 그대로 두고 학생 목록 표에 '옆으로 밀 수 있음' 그림자 ·
   누르는 곳 44px · 작은 글 13px 만 좁은 화면과 같게(마우스 데스크톱은 그대로 — 단추 · 입력 칸 공용 44px 는 m-shell.css) ══════════ */
@media (min-width:901px) and (pointer:coarse){
  #listView .tbl-wrap,#detailView .tbl-wrap{
    background:linear-gradient(90deg,rgba(255,255,255,0),#fff 75%) 100% 0/32px 100% no-repeat local,
      radial-gradient(farthest-side at 100% 50%,rgba(20,30,50,.2),rgba(20,30,50,0)) 100% 0/14px 100% no-repeat scroll,#fff}
  /* 학생 이름(상세 열기) · 예약 '변경 · 삭제': 줄 높이 · 칸 배치는 그대로 두고 누르는 영역만 44px 이상(900px 이하와 같은 방식) */
  #rows .nmlink{padding:14px 8px;margin:0 -8px}
  #rows .lnkb{padding:14px 11px;margin:-14px -11px}
  /* 체크 칸: 44px 누름 영역(label.ckhit · label.ckall — app-students.js stuCkW 가 터치 기기에서도 감싼다) · '전체 선택' 글은 화면 읽기에만 */
  #rows .ckhit,#listView .ckall{display:inline-grid;place-items:center;min-width:44px;min-height:44px;cursor:pointer;vertical-align:middle}
  #listView .ckall .rowck,#rows .rowck{width:18px;height:18px}
  #listView .ltbl thead th.ck .ckall{margin:-10px 0}
  #listView .ckall-t{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
  /* 성적 추세 탭 · 과목 칩(학생 상세 · 상담 진행): 44px · 탭 글자 13px */
  .chart-head .seg button{min-width:44px;padding-top:0;padding-bottom:0}
  .chart-head .seg.ctype button,.chart-head .seg.ctype button.kd{font-size:13px}
  #dScoreRows .del{width:44px;height:44px;border-radius:10px}
  /* 학생 정보 등록: [저장] · [양식 내려받기] 14px · 직접 입력 표의 칸 · 조건 줄 · [+ 행 추가] 44px · 줄 번호 13px */
  #ioDirect .io-bar #saveBtn,#ioUpMount #tplBtn{font-size:14px}
  #ioTableMount .cell-in,#ioTableMount .cell-sel,#ioTableMount .cell-pick{min-height:44px}
  #ioTableMount td.idx{font-size:13px}
  #ioFilter .iof .sel,#ioFilter .iof .fpick{min-height:44px}
  #ioAdd{min-height:44px}
  #fBody .rgrid~.fchk,#fBody .fchk.dupall,#fBody .dupchk .fchk{min-height:44px}
  .nsel-field{min-height:44px}   /* 학교 선택 칸(app-extra.css 38px) */
  /* 원생명 자동 검색 목록: 줄 44px · 보조 글 13px · 학생 목록 판정 색 범례 13px */
  .acpop button{min-height:44px}
  .acpop span{font-size:13px}
  #listView .glegend{font-size:13px}
}

/* ══════════ 터치 기기: 칸 오류 말풍선(도움말(?) 누르는 영역 44px 는 m-shell.css 공용 규칙) ══════════ */
@media (hover:none),(pointer:coarse){
  /* 직접 입력 표의 칸 오류 말풍선(app-io.js ioErrBubble): 화면 너비 안에서 줄을 바꾸고, 아래 칸을 누르는 것을 막지 않는다 */
  #cellBubble{white-space:normal;max-width:calc(100vw - 16px);pointer-events:none;font-size:13px;line-height:1.45}
  #cellBubble::before,#cellBubble::after{left:var(--bx,16px)}
  /* 빨간 원생명 칸을 눌러 자동 검색 목록이 열리면 오류 설명은 말풍선 대신 목록 맨 위 줄에(app-io.js acOpen — 말풍선이 첫 후보를 덮던 것) */
  #acPop .acerr{display:flex;align-items:flex-start;gap:7px;margin:0 0 4px;padding:9px 10px;border-radius:8px;background:var(--risk-bg);
    border:1px solid var(--risk-line);color:var(--risk);font-size:13.5px;font-weight:700;line-height:1.45;cursor:default}
  #acPop .acerr svg{flex:none;width:15px;height:15px;margin-top:2px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
  #acPop .acerr div{min-width:0;overflow-wrap:anywhere}
}
