/* =====================================================================
 * univ-convert 공용 파싱 UI 스타일시트
 * (성적추출 폴더 index.html 의 인라인 CSS 를 그대로 분리)
 *
 * 각 대학 페이지에서 link 로 로드. 클래스명은 성적추출 원본 그대로 유지
 * (.actions / .act / .gt / .panel / .modal-bg 등) — 성적추출 app.js 의
 * 클래스 참조와 일치해야 동작하기 때문.
 *
 * 안산대 페이지의 ansan- 계열 클래스와는 이름이 달라 충돌 없음.
 * 전역 선택자(html/body 등)는 안산대 style.css 가 뒤에 로드되어 override.
 * ===================================================================== */

:root {
  --c-primary: #006fff;
  --c-primary-d: #0058cc;
  --c-primary-l: #e6f0ff;
  --c-success: #16a34a;
  --c-success-l: #ecfdf5;
  --c-danger: #dc2626;
  --c-danger-l: #fef2f2;
  --c-warning: #f59e0b;
  --c-warning-l: #fffbeb;
  --c-text: #1f2937;
  --c-text-2: #6b7280;
  --c-text-3: #9ca3af;
  --c-border: #e5e7eb;
  --c-border-h: #d1d5db;
  --c-bg: #f5f7fa;
  --c-bg-card: #ffffff;
  --c-bg-alt: #f9fafb;
  --shadow-sm: 0 2px 6px rgba(15,23,42,0.10), 0 1px 2px rgba(15,23,42,0.06);
  --shadow: 0 6px 16px rgba(15,23,42,0.12), 0 2px 4px rgba(15,23,42,0.08);
  --shadow-md: 0 12px 28px rgba(15,23,42,0.16), 0 4px 10px rgba(15,23,42,0.10);
  --shadow-lg: 0 20px 50px rgba(15,23,42,0.20), 0 8px 18px rgba(15,23,42,0.12);
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
}

/* 액션 카드 그리드 (성적입력 4종 액션) */
.actions {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.act {
  background: var(--c-bg-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r);
  padding: 16px;
  cursor: pointer;
  transition: all 0.18s;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
}
.act:hover {
  border-color: var(--c-primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.act-icn {
  flex: 0 0 40px; height: 40px;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.act-1 .act-icn { background: #e6f0ff; color: #006fff; }
.act-2 .act-icn { background: var(--c-success-l); color: var(--c-success); }
.act-3 .act-icn { background: #fff4e5; color: #f59e0b; }
.act-4 .act-icn { background: #fce7e7; color: var(--c-danger); }
.act-5 .act-icn { background: #f3f4f6; color: #6b7280; }
.uc-guide-dropdown { position: relative; width: 100%; }
.uc-guide-menu {
  display: none; position: absolute; top: 100%; right: 0; margin-top: 4px;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1); z-index: 200; min-width: 200px; overflow: hidden;
}
.uc-guide-dropdown.open .uc-guide-menu { display: block; }
.uc-guide-menu button {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 10px 14px; background: none; border: none;
  font-size: 13px; color: #303030; cursor: pointer; text-align: left; white-space: nowrap;
}
.uc-guide-menu button:hover { background: #f0f6ff; color: #006fff; }
.uc-guide-menu button + button { border-top: 1px solid #f0f0f0; }
.act-body { flex: 1; min-width: 0; }
.act-tit { font-size: 13.5px; font-weight: 600; margin: 0 0 3px; color: var(--c-text); }
.act-desc { font-size: 11.5px; color: var(--c-text-2); line-height: 1.5; margin: 0; }
.act-badge {
  position: absolute; top: -8px; right: 12px;
  background: #dc2626; color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 10px;
  line-height: 1.4; letter-spacing: 0.5px;
}

/* 버튼 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  border: 1px solid var(--c-border-h);
  background: #fff;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 500;
  transition: all 0.15s;
  text-decoration: none;
  color: var(--c-text);
  line-height: 1;
  white-space: nowrap;
  font-family: inherit;
}
.btn:hover { background: var(--c-bg-alt); border-color: var(--c-text-2); }
.btn i { font-size: 14px; }
.btn-primary { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.btn-primary:hover { background: var(--c-primary-d); border-color: var(--c-primary-d); }
.btn-danger { background: #fff; color: var(--c-danger); border-color: #fecaca; }
.btn-danger:hover { background: var(--c-danger-l); border-color: var(--c-danger); }
.btn-sm { padding: 5px 10px; font-size: 11.5px; }

/* 학년 탭 (1·2·3·전체) */
.gt-short { display: none; }
.gt-full { display: inline; }
.grade-tabs {
  display: flex;
  background: var(--c-bg-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r) var(--r) 0 0;
  padding: 6px 6px 0;
  border-bottom: none;
  gap: 2px;
  box-shadow: var(--shadow-sm);
}
.gt {
  padding: 10px 18px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  color: var(--c-text-2);
  font-weight: 500;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s;
  font-family: inherit;
}
.gt:hover { color: var(--c-text); background: var(--c-bg-alt); }
.gt.active {
  color: var(--c-primary);
  border-bottom-color: var(--c-primary);
  font-weight: 600;
}

/* 패널 (학년별 입력 영역) */
.panel {
  display: none;
  background: var(--c-bg-card);
  border: 1px solid var(--c-border);
  border-top: none;
  border-radius: 0 0 var(--r) var(--r);
  padding: 12px;
  box-shadow: var(--shadow);
}
.panel.active { display: block; }
.panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--c-border);
}
.panel-head h3 { font-size: 15px; margin: 0; font-weight: 700; color: var(--c-text); }
.panel-head .grow { flex: 1; }
.sem-tabs {
  display: inline-flex;
  background: var(--c-bg-alt);
  padding: 3px;
  border-radius: var(--r-sm);
  gap: 2px;
}
.st {
  padding: 5px 14px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  color: var(--c-text-2);
  border-radius: 4px;
  font-weight: 500;
  transition: all 0.15s;
  font-family: inherit;
}
.st:hover { color: var(--c-text); }
.st.active { background: #fff; color: var(--c-primary); box-shadow: var(--shadow-sm); font-weight: 600; }

/* 입력 테이블 */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--c-border); border-radius: var(--r-sm); }
table.gtbl { width: 100%; min-width: 1280px; border-collapse: collapse; font-size: 12px; table-layout: fixed; }
table.gtbl th {
  background: #f8fafc;
  padding: 7px 4px;
  border-bottom: 1px solid var(--c-border);
  text-align: center;
  font-weight: 600;
  font-size: 11px;
  color: var(--c-text-2);
  white-space: nowrap;
  letter-spacing: -0.02em;
}
table.gtbl th:not(:last-child) { border-right: 1px solid var(--c-border); }
table.gtbl td {
  padding: 1px 3px;
  border-bottom: 1px solid var(--c-border);
  text-align: center;
}
table.gtbl td:not(:last-child) { border-right: 1px solid var(--c-border); }
table.gtbl tr:last-child td { border-bottom: none; }
table.gtbl tr:hover td { background: #f5f9ff; }
table.gtbl input, table.gtbl select {
  width: 100%; padding: 5px 3px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 12px;
  text-align: center;
  border-radius: 4px;
  font-family: inherit;
  color: var(--c-text);
  min-width: 0;
}
/* 교과 등 긴 옵션 글자가 select 기본 화살표(꺽쇠)에 닿지 않도록 오른쪽 여백 확보 */
table.gtbl select { padding-right: 18px; }
table.gtbl input:focus, table.gtbl select:focus {
  background: #fff;
  border-color: var(--c-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0,111,255,0.12);
  position: relative; z-index: 2;
}
table.gtbl input.subject { text-align: left; min-width: 90px; }

/* 과목 미리입력 드롭다운(직접입력 + 선택) — 메인 grade-input.css와 동일 구성 */
.subj-wrap { position: relative; }
.subj-wrap input.subject { padding-right: 20px; }
.subj-arrow {
  position: absolute; right: 3px; top: 50%; transform: translateY(-50%);
  border: none; background: none; cursor: pointer; color: #999;
  font-size: 11px; line-height: 1; padding: 2px; z-index: 3;
}
.subj-dropdown {
  display: none; position: fixed; z-index: 9999; background: #fff;
  border: 1px solid var(--c-primary, #006fff); border-radius: 6px;
  max-height: 220px; overflow-y: auto; box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.subj-dropdown.open { display: block; }
.subj-opt {
  padding: 6px 10px; font-size: 12px; cursor: pointer; text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.subj-opt:hover, .subj-opt.highlight { background: #e8f1ff; color: #006fff; }
table.gtbl th.col-del, table.gtbl td.col-del, table.gtbl col.col-del { width: 26px; padding: 1px 0; }
table.gtbl col.col-type { width: 122px; }
table.gtbl col.col-cat { width: 150px; }
table.gtbl col.col-subj { width: 180px; min-width: 140px; }
table.gtbl col.col-num { width: 72px; }
table.gtbl col.col-num-wide { width: 78px; }
table.gtbl col.col-ach { width: 66px; }
.col-del { width: 26px; }
.btn-del-row {
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid transparent;
  color: var(--c-text-3); border-radius: 4px;
  cursor: pointer; font-size: 13px;
  transition: all 0.15s;
}
.btn-del-row:hover { background: var(--c-danger-l); color: var(--c-danger); border-color: #fecaca; }

.empty {
  padding: 32px; text-align: center; color: var(--c-text-3);
  font-size: 13px;
}
.empty i { font-size: 32px; display: block; margin-bottom: 8px; opacity: 0.4; }

/* 전체 보기 (1·2학기 가로 결합) */
.all-block { margin-bottom: 24px; }
.all-block-h {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--c-text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.all-block-h::before {
  content: "";
  display: inline-block;
  width: 3px; height: 14px;
  background: var(--c-primary);
  border-radius: 2px;
}
.ro-wrap { overflow-x: auto; border: 1px solid var(--c-border); border-radius: var(--r-sm); box-shadow: var(--shadow-sm); }
table.ro-tbl { width: 100%; border-collapse: collapse; font-size: 11.5px; }
table.ro-tbl th, table.ro-tbl td {
  padding: 5px 6px;
  border-bottom: 1px solid var(--c-border);
  border-right: 1px solid var(--c-border);
  text-align: center;
  white-space: nowrap;
}
table.ro-tbl th { font-weight: 600; font-size: 11px; letter-spacing: -0.01em; color: var(--c-text); }
table.ro-tbl tr:last-child td { border-bottom: none; }
table.ro-tbl th:last-child, table.ro-tbl td:last-child { border-right: none; }
.ro-info { background: #f1f5f9; color: var(--c-text); border-bottom-color: #cbd5e1 !important; }
.ro-num { background: #f8fafc; color: var(--c-text-3); font-weight: 500; width: 32px; }
.ro-info-cell { background: #fff; }
.ro-left { text-align: left !important; }
.ro-s1-head { background: #dbeafe; color: #1e40af; font-size: 12px; padding: 6px; }
.ro-s1 { background: #eff6ff; color: #1e3a8a; }
.ro-s1-c { background: #f5faff; }
.ro-s2-head { background: #dcfce7; color: #166534; font-size: 12px; padding: 6px; }
.ro-s2 { background: #f0fdf4; color: #14532d; }
.ro-s2-c { background: #f7fdf9; }
table.ro-tbl tbody tr:nth-child(even) .ro-num { background: #f1f5f9; }
table.ro-tbl tbody tr:nth-child(even) .ro-info-cell { background: #fafbfc; }
table.ro-tbl tbody tr:nth-child(even) .ro-s1-c { background: #ecf4ff; }
table.ro-tbl tbody tr:nth-child(even) .ro-s2-c { background: #effbf3; }
table.ro-tbl tbody tr:hover .ro-num,
table.ro-tbl tbody tr:hover .ro-info-cell,
table.ro-tbl tbody tr:hover .ro-s1-c,
table.ro-tbl tbody tr:hover .ro-s2-c { background: #fffce8; }

/* 상태바 (성공·오류·정보 메시지) */
.status-bar {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  font-size: 12.5px;
  display: none;
  align-items: center;
  gap: 8px;
  border: 1px solid;
}
.status-bar.show { display: flex; box-shadow: var(--shadow); }
.status-bar.ok { background: var(--c-success-l); color: var(--c-success); border-color: #a7f3d0; }
.status-bar.err { background: var(--c-danger-l); color: var(--c-danger); border-color: #fecaca; }
.status-bar.info { background: var(--c-primary-l); color: var(--c-primary); border-color: #bfdbfe; }

/* 주요성적분석 탭 버튼 */
.gt-analysis { background: transparent !important; color: #006fff !important; border: none !important; }
.gt-analysis.active { background: #006fff !important; color: #fff !important; border-radius: 6px !important; }

/* 성적분석 카드 */
.an-empty { text-align: center; padding: 40px 20px; color: var(--c-text-3); }
.an-empty i { font-size: 36px; display: block; margin-bottom: 10px; }
.an-empty p { font-size: 15px; font-weight: 600; color: var(--c-text-2); margin: 0 0 6px; }
.an-empty .sub { font-size: 12px; color: var(--c-text-3); }

.an-section { margin-bottom: 20px; }
.an-sec-h {
  font-size: 15px; font-weight: 700; color: var(--c-text); margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}
.an-sec-h i { color: #006fff; font-size: 18px; }
.an-sec-h .sub { font-size: 12px; color: var(--c-text-3); font-weight: 400; margin-left: 6px; }

.an-grid-y { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.an-grid-s { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }

.an-cell {
  background: #fff; border: 1px solid var(--c-border); border-radius: var(--r-sm);
  padding: 12px; text-align: center; position: relative; overflow: hidden;
}
.an-cell::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--c-border);
}
.an-cell.bar-1::before { background: #2563eb; }
.an-cell.bar-2::before { background: #0891b2; }
.an-cell.bar-3::before { background: #16a34a; }
.an-cell.bar-4::before { background: #ca8a04; }
.an-cell.bar-5::before { background: #ea580c; }
.an-cell.bar-6::before { background: #dc2626; }
.an-cell.bar-7::before { background: #9ca3af; }

.an-cell .lbl { font-size: 13px; color: var(--c-text-2); margin-bottom: 4px; }
.an-cell .val { font-size: 24px; font-weight: 800; }
.an-cell .val.empty { font-size: 13px; color: var(--c-text-3); font-weight: 400; }
.an-cell .meta { font-size: 12px; color: var(--c-text-3); margin-top: 2px; }

.g-1 { color: #2563eb; } .g-2 { color: #0891b2; } .g-3 { color: #16a34a; }
.g-4 { color: #ca8a04; } .g-5 { color: #ea580c; } .g-6 { color: #dc2626; }
.g-7 { color: #9ca3af; }

/* 전문대 4패턴 */
.an-jeon-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.an-jeon-card {
  background: #fff; border: 1px solid var(--c-border); border-radius: var(--r);
  padding: 14px; box-shadow: var(--shadow-sm);
}
.an-jeon-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.an-jeon-name { font-size: 14px; font-weight: 700; color: var(--c-text); }
.an-jeon-badge { font-size: 12px; background: #e0f2fe; color: #0369a1; padding: 2px 8px; border-radius: 10px; font-weight: 600; }
.an-jeon-desc { font-size: 13px; color: var(--c-text-2); line-height: 1.5; margin-bottom: 10px; }
.an-jeon-grade-box {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--c-bg); border-radius: var(--r-sm); padding: 10px 14px;
}
.an-jeon-glbl { font-size: 13px; font-weight: 600; color: var(--c-text); }
.an-jeon-meta { font-size: 12px; color: var(--c-text-3); margin-top: 2px; }
.an-jeon-gval { font-size: 26px; font-weight: 800; }
.an-jeon-gval.empty { font-size: 13px; color: var(--c-text-3); font-weight: 400; }

.fill-notice {
  display: flex; gap: 8px; align-items: flex-start; margin-top: 12px;
  padding: 10px 14px; background: #fffbeb; border: 1px solid #fde68a;
  border-radius: var(--r-sm); font-size: 12px; color: #92400e; line-height: 1.6;
}
.fill-notice i { color: #f59e0b; font-size: 14px; flex-shrink: 0; margin-top: 1px; }

/* 업로드 결과 확인 안내 박스 */
.upload-notice {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-left: 3px solid #dc2626;
  border-radius: var(--r-sm);
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #dc2626;
  line-height: 1.65;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  text-align: justify;
  word-break: keep-all;
  box-shadow: var(--shadow-sm);
}

/* 모달 (PDF 비밀번호 / 로딩) */
.modal-bg {
  display: none; position: fixed; inset: 0;
  background: rgba(15,23,42,0.55);
  backdrop-filter: blur(2px);
  z-index: 1000;
  align-items: center; justify-content: center;
  animation: fadeIn 0.18s;
}
.modal-bg.show { display: flex; }
.modal-box {
  background: #fff;
  border-radius: var(--r-lg);
  padding: 22px;
  min-width: 340px; max-width: 92vw;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
  animation: zoomIn 0.18s;
}
.modal-box h3 { margin: 0 0 6px; font-size: 16px; font-weight: 700; color: var(--c-text); }
.modal-box .desc { font-size: 12.5px; color: var(--c-text-2); margin: 0 0 14px; line-height: 1.5; }
.modal-box input.text {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--c-border-h);
  border-radius: var(--r-sm);
  font-size: 13px;
  font-family: inherit;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.modal-box input.text:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(0,111,255,0.12); }
.modal-box .err {
  color: var(--c-danger); font-size: 12px;
  margin-top: 6px; min-height: 16px;
}
.modal-box .btns {
  display: flex; gap: 8px; justify-content: flex-end;
  margin-top: 14px;
}
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--c-primary-l);
  border-top-color: var(--c-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes zoomIn { from { transform: scale(0.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* univ-convert 큰 탭 (성적입력 / 점수산출) — 충돌 방지 위해 uconv- prefix */
.uconv-main-tabs {
  display: flex;
  gap: 10px;
  margin: 14px auto 22px;
  position: relative;
  width: 60%;
  max-width: 600px;
}
.uconv-mt {
  flex: 1;
  height: 50px;
  padding: 0 24px;
  border: 1px solid #ebebeb;
  background: #fff;
  border-radius: 100px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #202020;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  transition: all 0.15s;
  box-shadow: var(--shadow-sm);
  font-family: inherit;
}
.uconv-mt:hover { border-color: #c0c0c0; }
.uconv-mt.active {
  background: #1e3a5f;
  color: #fff;
  border-color: #1e3a5f;
  z-index: 2;
  box-shadow: var(--shadow);
}
.uconv-mt.active::after {
  content: "";
  position: absolute;
  left: 50%; bottom: -7px;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-top: 7px solid #1e3a5f;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
}
.uconv-mt i { font-size: 16px; }
.uconv-main-panel { display: none; }
.uconv-main-panel.active { display: block; }

/* [점수산출] 강조 버튼 */
.uconv-calc-cta {
  display: flex;
  justify-content: center;
  margin-top: 22px;
  margin-bottom: 8px;
}
.uconv-btn-calc {
  padding: 14px 36px;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  background: linear-gradient(135deg, #0891b2, #1e3a5f);
  color: #fff;
  box-shadow: var(--shadow);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  transition: all 0.18s;
}
.uconv-btn-calc:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.uconv-btn-calc i { font-size: 18px; }

/* 빈 상태 안내 바운스 */
@keyframes emptyBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* 모바일 */
@media (max-width: 960px) {
  .actions { grid-template-columns: repeat(3, 1fr); }
  .an-grid-y { grid-template-columns: repeat(2, 1fr); }
  .an-grid-s { grid-template-columns: repeat(3, 1fr); }
  .an-jeon-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .actions { grid-template-columns: 1fr 1fr; gap: 8px; }
  .act { padding: 10px; }
  .act-icn { flex: 0 0 32px; height: 32px; font-size: 16px; }
  .act-tit { font-size: 12px; }
  .act-desc { font-size: 10px; }
  .act-badge { position: static; font-size: 8px; padding: 1px 5px; margin-left: auto; align-self: flex-start; flex-shrink: 0; }
  .gt { padding: 7px 0; font-size: 11px; flex: 1; text-align: center; }
  .gt i { font-size: 12px; }
  .gt-analysis { font-size: 11px !important; }
  .grade-tabs { gap: 3px; flex-wrap: nowrap; }
  .grade-tabs .gt { white-space: nowrap; flex-shrink: 0; }
  .gt-full { display: none; }
  .gt-short { display: inline; }
  .panel-head { flex-direction: column; align-items: center; gap: 6px; margin-bottom: 10px; padding-bottom: 8px; }
  .panel-head h3 { font-size: 13px; }
  .sem-tabs { width: 100%; display: flex; }
  .sem-tabs .st { flex: 1; text-align: center; font-size: 11px; padding: 6px 0; }
  .panel { padding: 4px 2px; }
  .panel-head { margin-left: 4px; margin-right: 4px; }
  .grade-tabs { padding: 3px 2px 0; }
  .grade-tabs { margin-top: 12px; }
  .tbl-wrap { border-radius: 0; margin: 0; border-left: none; border-right: none; }
  .uc-bottom-btns { padding: 8px 4px !important; }
  .ro-wrap { margin: 0; }
  .all-block { padding: 0 2px; }
  .all-block-h { padding-left: 4px; font-size: 13px; }

  /* 성적 테이블 컴팩트 */
  table.gtbl { min-width: 900px; font-size: 11px; }
  table.gtbl th { padding: 5px 2px; font-size: 10px; }
  table.gtbl td { padding: 1px 1px; }
  table.gtbl input, table.gtbl select { padding: 3px 1px; font-size: 11px; }
  table.gtbl select { padding-right: 14px; }  /* 모바일에서도 긴 교과명이 화살표에 안 닿도록 */
  table.gtbl col.col-type { width: 80px; }
  table.gtbl col.col-cat { width: 100px; }
  table.gtbl col.col-subj { width: 120px; min-width: 100px; }
  table.gtbl col.col-num { width: 52px; }
  table.gtbl col.col-num-wide { width: 58px; }
  table.gtbl col.col-ach { width: 48px; }
  table.gtbl col.col-del { width: 22px; }
  .btn-del-row { width: 18px; height: 18px; font-size: 11px; }

  /* 전체보기 테이블 컴팩트 */
  .ro-tbl { font-size: 10px; min-width: 800px; }
  .ro-tbl th { padding: 4px 2px; font-size: 9px; }
  .ro-tbl td { padding: 3px 2px; }
  .an-grid-y { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .an-grid-s { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .an-cell .val { font-size: 20px; }
  .an-cell .lbl { font-size: 11px; }
  .an-cell .meta { font-size: 10px; }
  .an-sec-h { font-size: 13px; }
  .an-sec-h .sub { font-size: 10px; }
  .an-jeon-grid { grid-template-columns: 1fr; }
  .ro-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .ro-tbl { font-size: 11px; min-width: 900px; }
  .uc-guide-menu { min-width: 180px; right: 0; left: auto; }
  .upload-notice { font-size: 11px; }
}
@media (max-width: 480px) {
  .actions { grid-template-columns: 1fr; gap: 6px; }
  .act { padding: 10px 12px; }
  .gt { padding: 7px 8px; font-size: 11px; }
  .panel { padding: 3px 1px; }
  .grade-tabs { padding: 2px 1px 0; }
  .uc-bottom-btns { padding: 6px 2px !important; }
  .an-grid-y { grid-template-columns: 1fr 1fr; gap: 5px; }
  .an-grid-s { grid-template-columns: repeat(2, 1fr); gap: 5px; }
  .an-cell { padding: 8px; }
  .an-cell .val { font-size: 18px; }
}

/* 드롭 영역 + 하단 버튼 영역 모바일 */
@media (max-width: 768px) {
  #ucDropZone { padding: 8px 4px 6px !important; margin: 0 !important; border-radius: 6px !important; }
  #ucDropZone > p:first-child { font-size: 13px !important; }
  #ucDropZone > p:first-child span { display: block; margin-top: 4px; }
}
@media (max-width: 480px) {
  #ucDropZone { border-width: 1.5px !important; }
  .uc-empty-guide { padding: 30px 14px !important; }
  .uc-empty-guide div[style*="font-size:19px"] { font-size: 16px !important; }
  .uc-empty-guide div[style*="font-size:15px"] { font-size: 13px !important; }
  .uc-empty-guide div[style*="font-size:32px"] i { font-size: 26px !important; }
  .uc-bottom-btns { flex-direction: column !important; gap: 8px !important; }
  .uc-bottom-btns button { width: 100% !important; text-align: center; }
  .uc-bottom-btns .uc-excel-wrap { width: 100% !important; display: block !important; }
  .uc-bottom-btns div[style*="flex:1"] { display: none; }
}

/* 모달 모바일 반응형 */
.uc-notice-modal { max-width: 460px; padding: 24px; }
.uc-loading-modal { text-align: center; padding: 28px 24px; min-width: 280px; }
.uc-error-modal { max-width: 440px; text-align: center; padding: 24px; }

@media (max-width: 720px) {
  .modal-bg { padding: 12px; }
  .modal-box { min-width: auto; max-width: none; width: calc(100% - 24px); margin: 0 auto; }
  .uc-notice-modal { padding: 16px 14px; }
  .uc-notice-modal h3 { font-size: 14px !important; margin-bottom: 10px !important; }
  .uc-notice-modal h3 i { font-size: 17px !important; }
  .uc-notice-modal > div:nth-child(2) { font-size: 12px !important; line-height: 1.65 !important; margin-bottom: 10px !important; }
  .uc-notice-modal > div:nth-child(3) { font-size: 10px !important; padding: 7px 9px !important; margin-bottom: 12px !important; }
  .uc-notice-modal > div:last-child { gap: 6px !important; }
  .uc-notice-modal > div:last-child button { padding: 8px 18px !important; font-size: 12px !important; }
  .uc-loading-modal { padding: 20px 16px; min-width: auto; }
  .uc-loading-modal .spinner { width: 30px; height: 30px; margin-bottom: 10px; }
  .uc-loading-modal #loadMsg { font-size: 12px; }
  .uc-error-modal { padding: 18px 14px; }
  .uc-error-modal h3 { font-size: 14px !important; margin-bottom: 12px !important; }
  .uc-error-modal p { font-size: 12px !important; }
  .uc-error-modal div[style*="background"] { font-size: 11px !important; padding: 10px !important; }
  .uc-error-modal button { padding: 8px 24px !important; font-size: 12px !important; }
  .modal-box h3 { font-size: 14px; }
  .modal-box .desc { font-size: 11px; }
  .modal-box input.text { font-size: 14px; padding: 8px 10px; }
  .modal-box .btns button { font-size: 12px; padding: 8px 16px; }
}

/* 모바일 가로 스크롤 오버레이 */
.uc-scroll-overlay { display: none; }
@media (max-width: 720px) {
  .uc-scroll-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(30,58,95,0.55);
    display: flex; align-items: center; justify-content: center;
    z-index: 10; border-radius: 6px; cursor: pointer;
  }
  .uc-scroll-overlay-inner {
    text-align: center; color: #fff; padding: 16px;
  }
}
