@charset "UTF-8";

/* ======================================== *
 * 성적분석 페이지 전용 스타일
 * ======================================== */

/* ── PDF 로딩 오버레이 ── */
.ga-pdf-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.ga-pdf-loader {
  background: #fff;
  border-radius: 1.2rem;
  padding: 3rem 4rem;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  min-width: 26rem;
}
.ga-pdf-loader-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #202020;
  margin-bottom: 1.6rem;
}
.ga-pdf-loader-bar {
  width: 100%;
  height: 0.6rem;
  background: #e5e7eb;
  border-radius: 0.3rem;
  overflow: hidden;
  margin-bottom: 1rem;
}
.ga-pdf-loader-fill {
  height: 100%;
  background: #006fff;
  border-radius: 0.3rem;
  width: 0%;
  transition: width 0.3s ease;
}
.ga-pdf-loader-msg {
  font-size: 1.2rem;
  color: #808080;
}

/* ── 탭 텍스트 전환 (모바일 축약) ── */
.sub-tab-button .tab-short { display: none; }

/* ── 탭 콘텐츠 ── */
.ga-tab-content { display: none; }
.ga-tab-content.active { display: block; }

/* ── 섹션 공통 ── */
.ga-section {
  margin-bottom: 3.2rem;
}
.ga-section-title {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 2rem;
  font-weight: 700;
  color: #202020;
  margin-bottom: 2rem;
  letter-spacing: -0.05rem;
}
.ga-section-title i {
  font-size: 2.2rem;
  color: #006fff;
}

/* ── 요약 카드 ── */
.ga-overview {
  display: grid;
  grid-template-columns: 1fr auto 1fr 1fr 1fr;
  gap: 1.6rem;
  margin-bottom: 1.6rem;
}
.ga-card-sep {
  display: flex;
  align-items: center;
  font-size: 4rem;
  font-weight: 900;
  color: #666;
}
.ga-overview-bordered {
  border: 2px solid #e0e0e0;
  border-radius: 1.4rem;
  padding: 1.6rem;
  background: #fafbfc;
}
.ga-overview-main5 {
  border-color: #bbf7d0;
  background: #f8fdf9;
}
.ga-stat-card {
  background: #fff;
  border: 1px solid #ebebeb;
  border-radius: 1.2rem;
  padding: 2rem 1.6rem;
  text-align: center;
  transition: border-color .2s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.08);
}
.ga-stat-card:hover { border-color: #006fff; }
.ga-stat-card.ga-card-main5 { background: #f0fdf4; border-color: #bbf7d0; }
.ga-stat-card.ga-card-main5:hover { border-color: #059669; }
.ga-stat-card.ga-stat-card-avg { border-color: #e74c3c; }
.ga-stat-card.ga-stat-card-avg:hover { border-color: #c0392b; }
.ga-stat-card.ga-stat-card-avg.ga-card-main5 { border-color: #e74c3c; }
.ga-stat-card.ga-stat-card-avg.ga-card-main5:hover { border-color: #c0392b; }
.ga-stat-label {
  font-size: 1.3rem;
  color: #808080;
  font-weight: 500;
  margin-bottom: 0.8rem;
}
.ga-stat-value {
  font-size: 2.8rem;
  font-weight: 800;
  color: #202020;
}
.ga-stat-value.accent { color: #006fff; }
.ga-stat-value.accent-main5 { color: #059669; }
.ga-stat-sub {
  font-size: 1.2rem;
  color: #808080;
  margin-top: 0.4rem;
}

@media (max-width: 768px) {
  .ga-overview {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
  .ga-card-sep { display: none; }
}

/* ── 표1: 성적 일람표 ── */
.ga-grade-table-wrap {
  overflow-x: auto;
  border: 1px solid #dadada;
  border-radius: 0.8rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.08);
}
.ga-grade-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.3rem;
  min-width: 108rem;
  white-space: nowrap;
}
.ga-grade-table thead th {
  background: #f8f9fb;
  padding: 1rem 0.8rem;
  font-weight: 700;
  font-size: 1.2rem;
  color: #505050;
  border-bottom: 2px solid #202020;
  border-right: 1px solid #dadada;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 1;
}
.ga-grade-table thead th:last-child { border-right: none; }
.ga-grade-table thead tr:first-child th.ga-th-sem1 {
  background: #f0f6ff;
  color: #006fff;
}
.ga-grade-table thead tr:first-child th.ga-th-sem2 {
  background: #f0fdf4;
  color: #16a34a;
}
.ga-grade-table thead tr:nth-child(2) th.s1 {
  background: #f0f6ff;
  color: #1e40af;
}
.ga-grade-table thead tr:nth-child(2) th.s2 {
  background: #f0fdf4;
  color: #166534;
}
.ga-grade-table tbody td {
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid #ebebeb;
  border-right: 1px solid #ebebeb;
  text-align: center;
  vertical-align: middle;
}
.ga-grade-table tbody td:last-child { border-right: none; }
.ga-grade-table tbody td.left { text-align: left; }
.ga-grade-table tbody tr:hover td { background: #f5f7fa; }
/* 학년별 배경색 */
.ga-grade-table tbody tr.grade-y1 td.grade-year-cell { background: #eff6ff; color: #1e40af; font-weight: 700; }
.ga-grade-table tbody tr.grade-y2 td.grade-year-cell { background: #f0fdf4; color: #166534; font-weight: 700; }
.ga-grade-table tbody tr.grade-y3 td.grade-year-cell { background: #fef9ee; color: #92400e; font-weight: 700; }
/* 학년 구분 두꺼운 라인 */
.ga-grade-table tbody tr.grade-divider td { border-top: 2.5px solid #b0b0b0; }
.ga-grade-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 0.4rem;
  font-size: 1.1rem;
  font-weight: 700;
}
.ga-grade-badge.rank { background: #e8f1ff; color: #1e40af; }
.ga-grade-badge.achieve-a { background: #dcfce7; color: #166534; }
.ga-grade-badge.achieve-b { background: #dbeafe; color: #1e40af; }
.ga-grade-badge.achieve-c { background: #fef9c3; color: #854d0e; }
.ga-grade-badge.achieve-d { background: #fed7aa; color: #9a3412; }
.ga-grade-badge.achieve-e { background: #fecaca; color: #991b1b; }
.ga-z-pos { color: #16a34a; font-weight: 600; }
.ga-z-neg { color: #ef4444; font-weight: 600; }

/* ── 표2: 조합별 등급 비교 ── */
.ga-combo-table-wrap {
  overflow-x: auto;
  border: 1px solid #dadada;
  border-radius: 0.8rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.08);
}
.ga-combo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.3rem;
  min-width: 70rem;
  white-space: nowrap;
}
.ga-combo-table thead th {
  background: #f8f9fb;
  padding: 1rem 0.8rem;
  font-weight: 700;
  font-size: 1.2rem;
  color: #505050;
  border-bottom: 2px solid #202020;
  border-right: 1px solid #dadada;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 1;
}
.ga-combo-table thead th:last-child { border-right: none; }
.ga-combo-table thead th.ga-th-year {
  background: #f0f6ff;
  color: #006fff;
}
.ga-combo-table tbody td {
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid #ebebeb;
  border-right: 1px solid #ebebeb;
  text-align: center;
  vertical-align: middle;
}
.ga-combo-table tbody td:last-child { border-right: none; }
.ga-combo-table tbody td.ga-full-cell:last-child { border-right: none; }
.ga-combo-table thead th.ga-th-full:last-child { border-right: none; }
.ga-combo-table tbody td.left {
  text-align: center;
  font-weight: 400;
  color: #202020;
}
.ga-combo-table tbody tr:hover td { background: #f5f7fa; }
.ga-combo-table tbody tr.ga-combo-divider td {
  border-top: 2px solid #dadada;
}
.ga-section-sub {
  font-size: 1.4rem;
  font-weight: 700;
  color: #505050;
  margin-bottom: 0.8rem;
  padding-left: 0.2rem;
  scroll-margin-top: 14rem;
}
.ga-combo-table tbody tr.ga-combo-total-row td {
  background: #f8f9fb;
  font-weight: 700;
  border-top: 2px solid #b0b0b0;
}
.ga-combo-table tbody tr.ga-combo-total-row td.ga-full-cell { border-right: 2px solid #dadada; }
.ga-combo-table tbody tr.ga-combo-total-row td.ga-full-cell:last-child { border-right: none; }
.ga-combo-grade-cell { font-weight: 400; }
.ga-combo-grade-cell.ga-full-cell { background: #fafbfd; border-right: 2px solid #dadada; }
.ga-best-mark { color: #ef4444; font-size: 0.5rem; vertical-align: super; margin-right: 0.1rem; }
.ga-combo-table thead th.ga-th-full { background: #eef2f7; border-right: 2px solid #dadada; line-height: 1.4; }
.ga-combo-table thead th.ga-th-avg { background: #e8f1ff; color: #1e40af; font-size: 1.3rem; border-right: 2px solid #b0b0b0; }
.ga-combo-grade-cell.ga-avg-cell { background: #f0f6ff; font-weight: 800; border-right: 2px solid #b0b0b0; }
/* ── 반영비율 테이블 ── */
.ga-ratio-table { min-width: auto; }
.ga-ratio-table thead th { padding: 1rem 1.2rem; }
.ga-ratio-table tbody td { padding: 0.8rem 1.2rem; }
.ga-section-sub-desc { font-weight: 400; font-size: 1.2rem; color: #888; margin-left: 0.5rem; }
.ga-table-note-row { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0.8rem; margin-top: 0.4rem; font-size: 1.1rem; color: #888; }
.ga-table-note-left { color: #e74c3c; }
.ga-table-note-right { color: #888; }
/* ── 반영비율 선택 UI ── */
.ga-ratio-selector {
  margin: 1rem 0 1.2rem;
  padding: 1rem 1.4rem;
  background: #f8f9fb;
  border: 1px solid #ebebeb;
  border-radius: 0.8rem;
}
.ga-ratio-selector-label {
  font-size: 1.25rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.6rem;
  display: block;
}
.ga-ratio-selector-hint {
  font-weight: 400;
  font-size: 1.1rem;
  color: #94a3b8;
}
.ga-ratio-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  margin-top: 0.6rem;
}
.ga-ratio-check-item {
  font-size: 1.2rem;
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}
.ga-ratio-check-item input[type="checkbox"] {
  accent-color: #334155;
  width: 1.4rem;
  height: 1.4rem;
  cursor: pointer;
}
/* ── 진로선택 옵션 ── */
.ga-combo-options {
  display: flex;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
}
.ga-combo-opt-left, .ga-combo-opt-right {
  flex: 1;
  padding: 1.2rem 1.6rem;
  background: #f8f9fb;
  border: 1px solid #ebebeb;
  border-radius: 0.8rem;
}
.ga-predict-desc {
  font-size: 1.2rem;
  color: #909090;
  margin-top: 0.6rem;
}
.ga-predict-tag {
  font-size: 1.2rem;
  font-weight: 600;
  color: #dc2626;
  margin-left: 0.6rem;
  display: inline;
  word-break: keep-all;
}
.ga-jinro-option {
  margin-bottom: 1.5rem;
  padding: 1.2rem 1.6rem;
  background: #f8f9fb;
  border: 1px solid #ebebeb;
  border-radius: 0.8rem;
}
.ga-jinro-row {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.ga-jinro-desc {
  font-size: 1.2rem;
  color: #909090;
  margin-top: 0.6rem;
}
.ga-jinro-toggle {
  font-size: 1.3rem;
  font-weight: 600;
  color: #202020;
  cursor: pointer;
  white-space: nowrap;
}
.ga-jinro-toggle input {
  margin-right: 0.5rem;
  vertical-align: middle;
}
.ga-jinro-inputs {
  display: none;
  align-items: center;
  gap: 1.2rem;
}
.ga-jinro-inputs.show {
  display: flex;
}
.ga-jinro-label {
  font-size: 1.2rem;
  color: #808080;
  white-space: nowrap;
}
.ga-jinro-field {
  font-size: 1.3rem;
  font-weight: 600;
  color: #505050;
  white-space: nowrap;
}
.ga-jinro-field input {
  width: 4rem;
  padding: 0.4rem 0.5rem;
  border: 1px solid #dadada;
  border-radius: 0.4rem;
  font-size: 1.3rem;
  text-align: center;
  font-weight: 600;
}
/* ── 변동값 표시 ── */
.ga-val-up { color: #ef4444; font-weight: 700; }
.ga-val-down { color: #16a34a; font-weight: 700; }
.ga-base-ref { color: #a0a0a0; font-size: 1.1rem; font-weight: 400; margin-left: 0.4rem; }
.ga-table-note {
  font-size: 1.2rem;
  color: #808080;
  margin-top: 1rem;
  padding-left: 0.2rem;
}
.ga-table-note i {
  margin-right: 0.3rem;
  vertical-align: middle;
}
.ga-combo-section {
  background: #f8f9fb;
  border: 1px solid #e0e0e0;
  border-radius: 1.2rem;
  padding: 2rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.08);
}
.ga-combo-section .ga-combo-table-wrap {
  box-shadow: none;
  border-color: #dadada;
  background: #fff;
}
.ga-combo-section .ga-jinro-option {
  background: #fff;
}
.ga-combo-section .ga-combo-opt-left,
.ga-combo-section .ga-combo-opt-right {
  background: #fff;
}

/* ── 교과조합 차트 ── */
.ga-chart-section {
  margin-top: 1rem;
  overflow-x: auto;
}
.ga-chart-ratio-selector {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  font-size: 1.3rem;
  color: #505050;
  margin-bottom: 1.2rem;
}
.ga-chart-ratio-selector span {
  font-weight: 600;
  color: #202020;
}
.ga-chart-ratio-selector label {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.ga-combo-chart {
  display: flex;
  gap: 0;
  align-items: stretch;
  background: #fff;
  border: 1px solid #ebebeb;
  border-radius: 0.8rem;
  padding: 2rem 1.6rem 1rem;
  min-height: 28rem;
  min-width: 60rem;
}
.ga-chart-y {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-right: 0.8rem;
  font-size: 1.2rem;
  color: #909090;
  min-width: 2rem;
  text-align: right;
}
.ga-chart-bars {
  flex: 1;
  display: flex;
  gap: 0;
  align-items: flex-end;
  border-left: 1px solid #dadada;
  border-bottom: 1px solid #dadada;
  position: relative;
}
.ga-chart-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}
.ga-chart-bar-value {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  white-space: nowrap;
}
.ga-chart-bar-bg {
  width: 60%;
  max-width: 5rem;
  height: 22rem;
  display: flex;
  align-items: flex-end;
}
.ga-chart-bar {
  width: 100%;
  border-radius: 0.4rem 0.4rem 0 0;
  transition: height 0.3s;
  position: relative;
  overflow: visible;
}
.ga-chart-bar-inner {
  position: absolute;
  top: 15%;
  left: 0;
  right: 0;
  font-size: 1rem;
  color: #202020;
  font-weight: 400;
  text-align: center;
  line-height: 1.4;
}
.ga-chart-bar-label {
  display: none;
}

@media (max-width: 640px) {
  .ga-combo-chart {
    padding: 1.2rem 0.8rem 0.8rem;
    min-height: 20rem;
  }
  .ga-chart-bar-bg {
    height: 16rem;
  }
  .ga-chart-bar-label {
    font-size: 1rem;
  }
  .ga-chart-bar-value {
    font-size: 1.1rem;
  }
  .ga-chart-bar-inner {
    font-size: 0.85rem;
  }
  .ga-chart-ratio-selector {
    font-size: 1.2rem;
    gap: 0.8rem;
  }
}

.ga-diag-box {
  margin-top: 2rem;
  padding: 2.4rem;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 1rem;
}
.ga-diag-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #202020;
  margin-bottom: 1.6rem;
  padding-bottom: 1.2rem;
  border-bottom: 2px solid #e0e0e0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.ga-diag-title i { color: #006fff; font-size: 1.8rem; }
.ga-diag-item {
  margin-bottom: 1.6rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid #ebebeb;
}
.ga-diag-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.ga-diag-label {
  font-size: 1.35rem;
  font-weight: 700;
  color: #006fff;
  margin-bottom: 0.5rem;
}
.ga-diag-content {
  font-size: 1.35rem;
  color: #505050;
  line-height: 1.9;
}

/* ── 패턴 카드 그리드 (4x4) ── */
.ga-pattern-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.6rem;
}
@media (max-width: 1400px) { .ga-pattern-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1024px) { .ga-pattern-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .ga-pattern-grid { grid-template-columns: 1fr; } }
.ga-pattern-card {
  background: #fff;
  border: 1px solid #ebebeb;
  border-radius: 1.2rem;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.ga-pattern-card:hover {
  border-color: #006fff;
  box-shadow: 0 0.4rem 1.2rem rgba(0, 111, 255, 0.1);
}
.ga-pattern-card.open { border-color: #006fff; box-shadow: 0 0.4rem 1.2rem rgba(0, 111, 255, 0.15); }

/* 카드 헤더 */
.ga-pc-header {
  display: flex;
  flex-direction: column;
  padding: 2rem;
  gap: 1.6rem;
  flex: 1;
}
.ga-pc-info { flex: 1; min-width: 0; }
.ga-pc-title-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}
.ga-pc-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  background: #006fff;
  color: #fff;
  border-radius: 50%;
  font-size: 1.1rem;
  font-weight: 700;
  flex-shrink: 0;
}
.ga-pc-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #202020;
  letter-spacing: -0.03rem;
}
.ga-pc-desc {
  font-size: 1.25rem;
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 1.2rem;
  word-break: keep-all;
}
.ga-pc-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.ga-pc-tag {
  display: inline-block;
  padding: 0.2rem 0.8rem;
  background: #f0f1f5;
  border-radius: 0.4rem;
  font-size: 1.1rem;
  color: #505050;
  font-weight: 500;
}
.ga-pc-tag.blue { background: #e8f1ff; color: #1e40af; }
.ga-pc-tag.purple { background: #f3e8ff; color: #6b21a8; }
.ga-pc-tag.green { background: #ecfdf5; color: #065f46; }
.ga-pc-tag.orange { background: #fff7ed; color: #9a3412; }

/* 산출등급 뱃지 — 카드 하단 */
.ga-pc-grade {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 0 0;
  border-top: 1px solid #f0f1f5;
  gap: 0.8rem;
}
.ga-pc-grade-label { font-size: 1.2rem; color: #808080; font-weight: 500; }
.ga-pc-grade-value { font-size: 2.6rem; font-weight: 800; line-height: 1; }
.ga-pc-grade-value.g1 { color: #16a34a; }
.ga-pc-grade-value.g2 { color: #16a34a; }
.ga-pc-grade-value.g3 { color: #006fff; }
.ga-pc-grade-value.g4 { color: #f59e0b; }
.ga-pc-grade-value.g5 { color: #f59e0b; }
.ga-pc-grade-value.g6 { color: #ef4444; }
.ga-pc-grade-value.g7 { color: #ef4444; }
.ga-pc-grade-value.g8 { color: #991b1b; }
.ga-pc-grade-value.g9 { color: #991b1b; }
.ga-pc-grade-value.empty { font-size: 1.3rem; color: #b0b0b0; font-weight: 600; }

/* ── 상세 패널 (클릭한 카드 행 아래 펼침) ── */
.ga-detail-panel {
  display: none;
  grid-column: 1 / -1;
  background: #fff;
  border: 2px solid #006fff;
  border-radius: 1.2rem;
  padding: 2.4rem;
  position: relative;
}
.ga-panel-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #dadada;
  border-radius: 50%;
  background: #fff;
  color: #505050;
  font-size: 1.8rem;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.ga-panel-close:hover {
  background: #f0f0f0;
  color: #202020;
}

/* 학년별 가로 컬럼 */
.ga-detail-columns {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}
.ga-detail-columns.col1 { grid-template-columns: 1fr; max-width: 40rem; }
.ga-detail-columns.col2 { grid-template-columns: repeat(2, 1fr); }
.ga-detail-columns.col3 { grid-template-columns: repeat(3, 1fr); }
.ga-detail-col { min-width: 0; }


/* ── 공식 시각화 ── */
.ga-formula-section { padding-top: 1.6rem; }
.ga-year-block { margin-bottom: 1.6rem; }
.ga-year-block-label {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: #202020;
  margin-bottom: 1rem;
}
.ga-year-avg {
  font-size: 1.3rem;
  font-weight: 500;
  color: #006fff;
}
.ga-ratio-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.8rem;
  background: #006fff;
  color: #fff;
  border-radius: 2rem;
  font-size: 1.1rem;
  font-weight: 700;
}

/* 과목 테이블 */
.ga-calc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}
.ga-calc-table th {
  padding: 0.8rem;
  background: #f8f9fb;
  font-weight: 600;
  font-size: 1.2rem;
  color: #505050;
  border-bottom: 2px solid #202020;
  border-right: 1px solid #ebebeb;
  text-align: center;
}
.ga-calc-table th:last-child { border-right: none; }
.ga-calc-table td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid #ebebeb;
  border-right: 1px solid #ebebeb;
  text-align: center;
}
.ga-calc-table td:last-child { border-right: none; }
.ga-calc-table td.mult { font-weight: 700; color: #006fff; }
.ga-calc-table tfoot td {
  font-weight: 700;
  border-top: 2px solid #202020;
  border-bottom: none;
}
.ga-tfoot-label {
  font-size: 1.05rem;
  font-weight: 500;
  color: #6b7280;
  margin-top: 0.2rem;
}

/* 학기 구분행 */
.ga-sem-divider td {
  background: #f0f4f8;
  font-size: 1.15rem;
  font-weight: 700;
  color: #505050;
  padding: 0.5rem 0.8rem;
  border-bottom: 1px solid #dadada;
  border-right: none !important;
}

/* 학년 소계 */
.ga-year-subtotal {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 1.2rem;
  background: #f8f9fb;
  border-radius: 0.8rem;
  margin-bottom: 1.6rem;
  flex-wrap: wrap;
}
.ga-year-subtotal-label { font-size: 1.3rem; font-weight: 600; color: #505050; }
.ga-formula-expr {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.3rem;
  color: #505050;
}
.ga-formula-num { font-weight: 700; color: #006fff; font-size: 1.4rem; }
.ga-formula-op { font-weight: 400; color: #808080; }

/* 최종 공식 카드 */
.ga-final-formula {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.6rem;
  padding: 1.6rem;
  background: #f0f6ff;
  border-radius: 1.2rem;
}
.ga-formula-center {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.ga-formula-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 1rem 1.6rem;
  background: #fffbeb;
  border: 1px solid #f0d98c;
  border-radius: 0.8rem;
  min-width: 8rem;
  height: 7rem;
}
.ga-formula-card-grade { font-size: 1.1rem; font-weight: 600; color: #808080; }
.ga-formula-card-avg { font-size: 1.8rem; font-weight: 800; color: #202020; }
.ga-formula-card-ratio { font-size: 1.1rem; color: #006fff; font-weight: 600; }
.ga-formula-big-op { font-size: 2rem; font-weight: 300; color: #808080; }
.ga-formula-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 1.2rem 2rem;
  background: #006fff;
  border-radius: 1rem;
  min-width: 9rem;
  height: 7rem;
}
.ga-formula-result-label { font-size: 1.1rem; color: rgba(255,255,255,0.8); font-weight: 500; }
.ga-formula-result-value { font-size: 2.4rem; font-weight: 800; color: #fff; }

/* 부가정보 카드 */
.ga-formula-arrow {
  font-size: 2.4rem;
  font-weight: 700;
  color: #b0b0b0;
}
.ga-info-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.6rem;
  background: #fff;
  border: 2px dotted #ff8c00;
  border-radius: 1rem;
  min-width: 8rem;
  height: 7rem;
  flex-shrink: 0;
}
.ga-info-card.better { border-color: #dc2626; background: #fff5f5; }
.ga-info-card.worse { border-color: #006fff; background: #f0f6ff; }
.ga-info-card.same { border-color: #9ca3af; background: #f9fafb; }
.ga-info-card-label {
  font-size: 1.1rem;
  color: #6b7280;
  font-weight: 500;
  margin-bottom: 0.3rem;
}
.ga-info-card-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: #202020;
}
.ga-info-card.better .ga-info-card-value { color: #dc2626; }
.ga-info-card.worse .ga-info-card-value { color: #006fff; }
.ga-info-card.same .ga-info-card-value { color: #6b7280; }

/* 진로선택 뱃지 */
.ga-jinro-badge {
  display: inline-block;
  padding: 0.1rem 0.6rem;
  background: #f3e8ff;
  color: #6b21a8;
  border-radius: 0.3rem;
  font-size: 1.1rem;
  font-weight: 600;
  margin-left: 0.4rem;
}
.ga-jinro-conv { font-size: 1.1rem; color: #808080; margin-left: 0.3rem; }

/* ── 맞춤 계산기 (탭3 준비중) ── */
.ga-coming-soon {
  text-align: center;
  padding: 6rem 2rem;
  color: #808080;
}
.ga-coming-soon i {
  font-size: 4rem;
  color: #dadada;
  display: block;
  margin-bottom: 1.2rem;
}
.ga-coming-soon .tit {
  font-size: 1.6rem;
  font-weight: 700;
  color: #505050;
  margin-bottom: 0.6rem;
}
.ga-coming-soon .desc {
  font-size: 1.3rem;
  line-height: 1.6;
}

/* ── PDF 다운로드 바/버튼 (수시입결 통일) ── */
.pdf-download-bar { display: flex; justify-content: flex-end; margin-top: 1.6rem; margin-bottom: 1.2rem; }
.pdf-download-btn { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.7rem 1.6rem; background-color: #dc2626; color: #fff; font-size: 1.3rem; font-weight: 600; border: none; border-radius: 0.6rem; cursor: pointer; transition: all 0.2s ease; letter-spacing: -0.02rem; box-shadow: 0 1px 3px rgba(220,38,38,0.3); }
.pdf-download-btn:hover { background-color: #b91c1c; box-shadow: 0 2px 6px rgba(220,38,38,0.4); }
.pdf-download-btn:disabled { opacity: 0.6; cursor: not-allowed; box-shadow: none; }
.pdf-download-btn i { font-size: 1.5rem; }
@media screen and (max-width:768px) {
  .pdf-download-btn { font-size: 1.2rem; padding: 0.6rem 1.2rem; }
  .pdf-download-btn i { font-size: 1.3rem; }
}

/* ═══════════════════════════════════════
   탭3: 맞춤 계산기
   ═══════════════════════════════════════ */

/* ── 설정 패널 ── */
.ga-custom-settings {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  margin-bottom: 2rem;
}
.ga-custom-group {
  background: #fff;
  border: 1px solid #c0c0c0;
  border-radius: 1.2rem;
  padding: 1.6rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  overflow-x: auto;
}
.ga-custom-group-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #202020;
  margin-bottom: 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.ga-custom-group-title i {
  font-size: 1.6rem;
  color: #006fff;
}

/* 교과 토글 버튼 */
.ga-custom-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.ga-custom-cat-btn {
  padding: 0.5rem 1rem;
  border: 1px solid #dadada;
  border-radius: 0.6rem;
  background: #fff;
  color: #808080;
  font-size: 1.2rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.ga-custom-cat-btn.active {
  background: #006fff;
  border-color: #006fff;
  color: #fff;
  font-weight: 600;
}
.ga-custom-cat-btn.active.excluded {
  background: #93c5fd;
  border-color: #ef4444;
  text-decoration: line-through;
  opacity: 0.7;
}
.ga-custom-cat-btn:hover:not(.active) {
  border-color: #006fff;
  color: #006fff;
}

/* 프리셋 버튼 행 */
.ga-custom-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding-top: 1rem;
  border-top: 1px solid #f0f0f0;
}
.ga-custom-preset-btn {
  padding: 0.4rem 1rem;
  border: 1px solid #dadada;
  border-radius: 2rem;
  background: #fafafa;
  color: #505050;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.15s;
}
.ga-custom-preset-btn:hover {
  background: #006fff;
  border-color: #006fff;
  color: #fff;
}
.ga-custom-preset-btn.active {
  background: #006fff;
  border-color: #006fff;
  color: #fff;
  font-weight: 600;
}

/* 학년비율 */
.ga-custom-ratio-row {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.ga-custom-ratio-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.ga-custom-ratio-label {
  font-size: 1.3rem;
  font-weight: 600;
  color: #505050;
  white-space: nowrap;
}
.ga-custom-ratio-input {
  width: 5rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid #dadada;
  border-radius: 0.6rem;
  font-size: 1.4rem;
  text-align: center;
  outline: none;
  transition: border-color 0.15s;
}
.ga-custom-ratio-input:focus {
  border-color: #006fff;
}
.ga-custom-ratio-sum {
  font-size: 1.2rem;
  color: #808080;
  margin-top: 0.4rem;
}
.ga-custom-ratio-sum.warn {
  color: #dc2626;
  font-weight: 600;
}

/* 교과별 요약 */
.ga-custom-cat-stats {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid #f0f0f0;
}
.ga-custom-cat-stats-header {
  font-size: 1.2rem;
  color: #808080;
  font-weight: 600;
  margin-bottom: 0.8rem;
}
.ga-custom-cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.ga-custom-cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.8rem;
  background: #f8fafc;
  border: 1px solid #ebebeb;
  border-radius: 2rem;
  font-size: 1.15rem;
}
.ga-custom-cat-chip-name {
  color: #505050;
  font-weight: 500;
}
.ga-custom-cat-chip-grade {
  font-weight: 700;
}

/* 서브 라벨 */
.ga-custom-sub-label {
  font-size: 1.2rem;
  font-weight: 700;
  color: #808080;
  margin-bottom: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.02rem;
}

/* 학기 선택 그리드 */
.ga-custom-sem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
}
.ga-custom-sem-btn {
  padding: 0.5rem 0;
  border: 1px solid #dadada;
  border-radius: 0.5rem;
  background: #fff;
  color: #808080;
  font-size: 1.2rem;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}
.ga-custom-sem-btn.active {
  background: #006fff;
  border-color: #006fff;
  color: #fff;
  font-weight: 600;
}
.ga-custom-sem-btn:hover:not(.active) {
  border-color: #006fff;
  color: #006fff;
}

/* 우수 N개 모드 */
.ga-custom-best-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.ga-custom-best-select {
  flex: 1;
  padding: 0.5rem 0.6rem;
  border: 1px solid #dadada;
  border-radius: 0.5rem;
  font-size: 1.25rem;
  outline: none;
  background: #fff;
}
.ga-custom-best-select:focus { border-color: #006fff; }
.ga-custom-best-n {
  width: 4rem;
  padding: 0.5rem 0.4rem;
  border: 1px solid #dadada;
  border-radius: 0.5rem;
  font-size: 1.25rem;
  text-align: center;
  outline: none;
}
.ga-custom-best-n:focus { border-color: #006fff; }
.ga-custom-best-n:disabled { background: #f0f0f0; color: #b0b0b0; }
.ga-custom-best-unit {
  font-size: 1.2rem;
  color: #505050;
  min-width: 2.5rem;
}

/* 토글 스위치 */
.ga-custom-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 0;
}
.ga-custom-toggle-row + .ga-custom-toggle-row {
  border-top: 1px solid #f0f0f0;
}
.ga-custom-toggle-label {
  font-size: 1.3rem;
  font-weight: 500;
  color: #505050;
}
.ga-custom-toggle-desc {
  font-size: 1.15rem;
  color: #808080;
  margin-top: 0.2rem;
}
.ga-custom-toggle {
  position: relative;
  width: 4.4rem;
  height: 2.4rem;
  flex-shrink: 0;
  cursor: pointer;
}
.ga-custom-toggle input {
  display: none;
}
.ga-custom-toggle-track {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #dadada;
  border-radius: 1.2rem;
  transition: background 0.2s;
}
.ga-custom-toggle input:checked + .ga-custom-toggle-track {
  background: #006fff;
}
.ga-custom-toggle-thumb {
  position: absolute;
  top: 0.2rem;
  left: 0.2rem;
  width: 2rem;
  height: 2rem;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.ga-custom-toggle input:checked ~ .ga-custom-toggle-thumb {
  transform: translateX(2rem);
}

/* 진로 변환 매핑 */
.ga-custom-jinro-map {
  display: flex;
  gap: 1.2rem;
  margin-top: 1rem;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 0.8rem;
}
.ga-custom-jinro-map.disabled {
  opacity: 0.4;
  pointer-events: none;
}
.ga-custom-jinro-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.3rem;
  color: #505050;
}
.ga-custom-jinro-item span {
  font-weight: 600;
}
.ga-custom-jinro-select {
  padding: 0.4rem 0.6rem;
  border: 1px solid #dadada;
  border-radius: 0.4rem;
  font-size: 1.3rem;
  outline: none;
}
.ga-custom-jinro-select:focus {
  border-color: #006fff;
}

/* 소인수 기준 입력 */
.ga-custom-small-input {
  width: 5rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid #dadada;
  border-radius: 0.4rem;
  font-size: 1.3rem;
  text-align: center;
  margin-left: 0.6rem;
  outline: none;
}
.ga-custom-small-input:focus {
  border-color: #006fff;
}
.ga-custom-small-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.6rem;
  font-size: 1.2rem;
  color: #808080;
}
.ga-custom-small-wrap.disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ── 상단 레이아웃: 좌(타이틀) + 우(요약테이블) ── */
.ga-custom-group-nb {
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}
.ga-custom-top-right {
  flex-shrink: 0;
}

/* ── 요약 테이블 ── */
.ga-custom-summary-panel {
  background: #f0faf7;
  border-color: #b2dfd0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.ga-custom-summary-panel .ga-custom-group-title {
  color: #1a7a5a;
}
.ga-custom-summary-panel .ga-custom-group-title i {
  color: #1a7a5a;
}
.ga-custom-summary-tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.3rem;
}
.ga-custom-summary-tbl th,
.ga-custom-summary-tbl td {
  border: 1px solid #dadada;
  padding: 0.8rem 1.2rem;
  text-align: center;
  white-space: nowrap;
}
.ga-custom-summary-tbl thead th {
  background: #f0f2f5;
  color: #202020;
  font-weight: 700;
  font-size: 1.2rem;
  border-bottom: 2px solid #c0c0c0;
}
.ga-custom-summary-tbl thead th .ga-summary-pct {
  display: block;
  font-size: 1.1rem;
  font-weight: 500;
  color: #808080;
  margin-top: 0.1rem;
}
.ga-custom-summary-tbl .ga-summary-rl {
  background: #f8f9fb;
  font-weight: 600;
  font-size: 1.2rem;
  color: #505050;
}
.ga-custom-summary-tbl .ga-summary-v {
  font-weight: 700;
  font-size: 1.4rem;
  color: #202020;
  background: #fff;
}
.ga-custom-summary-tbl .ga-summary-vs {
  font-weight: 600;
  font-size: 1.4rem;
  color: #808080;
  background: #fafbfc;
}
.ga-custom-summary-tbl .ga-summary-accent {
  font-weight: 800;
  font-size: 1.5rem;
  color: #006fff;
  background: #f0f6ff;
}
.ga-custom-summary-tbl .ga-summary-accent-s {
  font-weight: 700;
  font-size: 1.5rem;
  color: #4d9fff;
  background: #f5f9ff;
}
.ga-custom-summary-tbl .ga-summary-off {
  opacity: 0.25;
}
.ga-summary-note {
  margin-top: 0.6rem;
  font-size: 1.1rem;
  color: #909090;
}
.ga-summary-demo-wrap {
  position: relative;
}
.ga-summary-demo-wrap .ga-custom-summary-tbl {
  opacity: 0.35;
  pointer-events: none;
  user-select: none;
}
.ga-summary-demo-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  padding-bottom: 0;
}
.ga-summary-demo-msg {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.92);
  padding: 1.2rem 2rem;
  border-radius: 1rem;
  box-shadow: 0 2px 12px rgba(0,111,255,0.08);
  border: 1.5px solid rgba(0,111,255,0.4);
}
.ga-summary-demo-msg i {
  font-size: 2.4rem;
  color: #006fff;
}
.ga-summary-demo-msg span {
  font-size: 1.35rem;
  color: #333;
  font-weight: 500;
}

/* ── 출력 패널 ── */
.ga-custom-output-panel {
  background: #f8fafc;
  border: 2px solid #c4daff;
  border-radius: 1.2rem;
  display: flex;
  flex-direction: column;
  max-height: 80vh;
  box-shadow: 0 2px 12px rgba(0,111,255,0.08);
}

/* ── 결과 바 ── */
.ga-custom-result {
  flex-shrink: 0;
  background: #f0f6ff;
  border-bottom: 1px solid #c4daff;
  border-radius: 1.2rem 1.2rem 0 0;
  padding: 1.6rem 2.4rem;
  display: flex;
  align-items: center;
  gap: 2.4rem;
}
.ga-custom-result-main {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.ga-custom-result-label {
  font-size: 1.4rem;
  font-weight: 600;
  color: #505050;
}
.ga-custom-result-grade {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1;
}
.ga-custom-result-info {
  display: flex;
  gap: 2rem;
  font-size: 1.3rem;
  color: #505050;
}
.ga-custom-result-info strong {
  color: #006fff;
  font-weight: 700;
}
.ga-custom-result-years {
  display: flex;
  gap: 1.2rem;
  margin-left: auto;
  font-size: 1.25rem;
  color: #808080;
}
.ga-custom-result-years span {
  white-space: nowrap;
}

/* ── 과목 테이블 ── */
#customSubjectTable {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}
.ga-custom-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #dadada;
  border-radius: 0.8rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.08);
}
.ga-custom-year-block {
  margin-bottom: 2rem;
  padding: 0 2rem;
}
.ga-custom-year-block:first-child {
  padding-top: 2rem;
}
.ga-custom-year-block:last-child {
  padding-bottom: 2rem;
  margin-bottom: 0;
}
.ga-custom-year-label {
  font-size: 1.5rem;
  font-weight: 700;
  color: #202020;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.ga-custom-year-avg {
  font-size: 1.3rem;
  font-weight: 500;
  color: #006fff;
}
.ga-custom-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #dadada;
  border-radius: 0.8rem;
  overflow: hidden;
  font-size: 1.3rem;
  margin-bottom: 0.4rem;
  background: #fff;
}
.ga-custom-table th {
  background: #f8fafc;
  padding: 0.8rem 0.6rem;
  font-weight: 600;
  color: #505050;
  border-bottom: 1px solid #ebebeb;
  border-right: 1px solid #ebebeb;
  text-align: center;
}
.ga-custom-table th:last-child { border-right: none; }
.ga-custom-table td {
  padding: 0.7rem 0.6rem;
  border-bottom: 1px solid #f0f0f0;
  border-right: 1px solid #ebebeb;
  text-align: center;
  color: #505050;
}
.ga-custom-table td:last-child { border-right: none; }
.ga-custom-table tr:last-child td { border-bottom: none; }
.ga-custom-table { min-width: 108rem; }
.ga-custom-td-subject { text-align: left !important; white-space: nowrap; }
.ga-custom-td-score { white-space: nowrap; font-size: 1.2rem; }
.ga-custom-td-dist { white-space: nowrap; font-size: 1.2rem; }

/* 학기 헤더 색상 */
.ga-custom-th-sem1 { background: #e8f0fe !important; color: #006fff; }
.ga-custom-th-sem2 { background: #fef3e0 !important; color: #e65100; }
.ga-custom-table th.s1 { background: #f0f5ff !important; }
.ga-custom-table th.s2 { background: #fff8f0 !important; }

/* 선택된 셀 하이라이트 */
.ga-custom-td-active { background: #f0f8ff !important; }

.ga-custom-table .ga-sem-divider td {
  background: #f0f4f8;
  font-size: 1.15rem;
  font-weight: 700;
  color: #505050;
  border-right: none !important;
  text-align: left;
  padding-left: 1rem;
}

/* 체크 아이콘 */
.ga-custom-check {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  transition: all 0.15s;
  border: 1.5px solid #dadada;
  color: #dadada;
  background: #fff;
}
.ga-custom-check.auto {
  border-color: #006fff;
  background: #e8f0fe;
  color: #006fff;
}
.ga-custom-check.manual {
  border-color: #16a34a;
  background: #f0fdf4;
  color: #16a34a;
}
.ga-custom-check:hover {
  border-color: #006fff;
  color: #006fff;
}

/* 미선택 행 */
.ga-custom-row.inactive td {
  opacity: 0.35;
}
.ga-custom-row.inactive td:first-child {
  opacity: 1;
}

/* 진로 비활성 */
.ga-custom-row.jinro-disabled td {
  opacity: 0.25;
}
.ga-custom-row.jinro-disabled td:first-child {
  opacity: 0.5;
}

/* 진로 뱃지 */
.ga-custom-jinro-badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  background: #fff3e0;
  color: #e65100;
  border-radius: 0.3rem;
  font-size: 1.1rem;
  font-weight: 600;
  margin-left: 0.4rem;
}

/* 수동 리셋 버튼 */
.ga-custom-reset-wrap {
  padding: 1rem 2rem 0;
  text-align: right;
}
.ga-custom-reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.2rem;
  border: 1px solid #dadada;
  border-radius: 0.6rem;
  background: #fff;
  color: #808080;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.15s;
}
.ga-custom-reset-btn:hover {
  border-color: #dc2626;
  color: #dc2626;
}

/* 과목표 tfoot */
.ga-custom-table tfoot td {
  background: #f8fafc;
  font-weight: 600;
  border-top: 1px solid #ebebeb;
}

/* ── 반응형 ── */
@media (max-width: 1024px) {
  .ga-overview {
    grid-template-columns: repeat(2, 1fr);
  }
  .ga-pattern-grid {
    grid-template-columns: 1fr;
  }
  .ga-detail-columns.col3,
  .ga-detail-columns.col2 {
    grid-template-columns: 1fr;
  }
  .ga-detail-panel {
    padding: 1.6rem;
  }
  .ga-custom-top {
    flex-direction: column;
  }
  .ga-custom-top-right {
    width: 100%;
    overflow-x: auto;
  }
  .ga-custom-result {
    flex-wrap: wrap;
    padding: 1.2rem 1.6rem;
    gap: 1.2rem;
  }
  .ga-custom-result-info {
    gap: 1.2rem;
  }
  .ga-custom-result-years {
    margin-left: 0;
    width: 100%;
    flex-wrap: wrap;
  }
  .ga-custom-year-block {
    padding: 0 1.2rem;
  }
  .ga-custom-year-block:first-child { padding-top: 1.2rem; }
  .ga-custom-reset-wrap { padding: 1rem 1.2rem 0; }
  .ga-final-formula {
    flex-direction: column;
    gap: 0.8rem;
    padding: 1.2rem;
  }
  .ga-formula-card {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    padding: 0.8rem 1.2rem;
  }
}

@media (max-width: 640px) {
  .ga-combo-options {
    flex-direction: column;
    gap: 0.8rem;
  }
  .ga-overview {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .ga-stat-card {
    padding: 1.6rem 1.2rem;
  }
  .ga-stat-value {
    font-size: 2.2rem;
  }
  .ga-section-title {
    font-size: 1.7rem;
  }
  .ga-pc-header {
    padding: 1.2rem 1.6rem;
    flex-wrap: wrap;
  }
  .ga-formula-card-avg { font-size: 1.6rem; }
  .ga-formula-big-op { font-size: 1.6rem; }
  .ga-formula-result {
    width: 100%;
    flex-direction: row;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 1.6rem;
  }
  .ga-formula-result-value { font-size: 2rem; }
  .ga-custom-settings {
    gap: 1rem;
  }
  .ga-custom-group {
    padding: 1.4rem;
  }
  .ga-custom-group-title {
    font-size: 1.3rem;
  }
  .ga-custom-ratio-row {
    flex-wrap: wrap;
  }
  .ga-custom-ratio-input {
    width: 4.5rem;
  }
  .ga-custom-jinro-map {
    flex-wrap: wrap;
    gap: 0.8rem;
  }
  .ga-jinro-row {
    gap: 1rem;
    flex-wrap: wrap;
  }
  .ga-custom-result {
    padding: 1rem 1.2rem;
    gap: 0.8rem;
  }
  .ga-custom-result-grade {
    font-size: 2.4rem;
  }
  .ga-custom-result-info {
    gap: 0.8rem;
    font-size: 1.2rem;
    flex-wrap: wrap;
  }
  .ga-custom-result-years {
    gap: 0.8rem;
    font-size: 1.15rem;
  }
  .ga-custom-table {
    font-size: 1.2rem;
    min-width: 80rem;
  }
  .ga-grade-table {
    font-size: 1.2rem;
    min-width: 88rem;
  }
  .ga-combo-table {
    font-size: 1.2rem;
    min-width: 56rem;
  }
  .ga-custom-sem-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .ga-custom-output-panel {
    max-height: none;
  }
  .ga-custom-save-btn {
    padding: 0.5rem 1.2rem;
    font-size: 1.2rem;
  }
  .ga-custom-year-block {
    padding: 0 1rem;
  }
  .ga-custom-year-block:first-child { padding-top: 1rem; }
  .ga-custom-reset-wrap { padding: 0.8rem 1rem 0; }
  .sub-tab-menu {
    gap: 0.6rem;
  }
  .sub-tab-menu .sub-tab-button {
    height: auto;
    min-height: 4.4rem;
    padding: 0.6rem 1rem;
  }
  .sub-tab-menu .sub-tab-button .tab-full {
    display: none;
  }
  .sub-tab-menu .sub-tab-button .tab-short {
    display: inline;
    font-size: 1.3rem;
  }
  .ga-summary-demo-msg {
    padding: 1rem 1.4rem;
  }
  .ga-summary-demo-msg i {
    font-size: 2rem;
  }
  .ga-summary-demo-msg span {
    font-size: 1.2rem;
  }
}

/* ══════════════════════════════════════
   나의 산출식 (커스텀 저장 카드)
   ══════════════════════════════════════ */
.ga-custom-saved-section {
  margin-bottom: 0;
}
.ga-custom-saved-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #202020;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.ga-custom-saved-title i {
  color: #006fff;
  font-size: 1.8rem;
}
.ga-custom-card {
  border: 1px solid #059669 !important;
  position: relative;
}
.ga-custom-card .ga-pc-header {
  border-left: 3px solid #059669;
}
.ga-custom-card .ga-pc-info {
  padding-right: 4rem;
}
.ga-custom-btn-group {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.ga-custom-edit-btn {
  background: #f8f8f8;
  border: 1px solid #d0d0d0;
  border-radius: 0.4rem;
  color: #006fff;
  cursor: pointer;
  font-size: 1.15rem;
  font-weight: 600;
  padding: 0.3rem 0.8rem;
  transition: all 0.15s;
  line-height: 1.4;
}
.ga-custom-edit-btn:hover {
  color: #fff;
  border-color: #006fff;
  background: #006fff;
}
.ga-custom-delete-btn {
  background: #f8f8f8;
  border: 1px solid #d0d0d0;
  border-radius: 0.4rem;
  color: #ef4444;
  cursor: pointer;
  font-size: 1.15rem;
  font-weight: 600;
  padding: 0.3rem 0.8rem;
  transition: all 0.15s;
  line-height: 1.4;
}
.ga-custom-delete-btn:hover {
  color: #fff;
  border-color: #dc2626;
  background: #dc2626;
}
.ga-custom-divider {
  border: none;
  border-top: 1px solid #ebebeb;
  margin: 2rem 0;
}

/* 저장 버튼 (결과 바 내) */
.ga-custom-save-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.6rem;
  border: 1px solid #006fff;
  background: #fff;
  color: #006fff;
  font-size: 1.3rem;
  font-weight: 600;
  border-radius: 0.6rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  margin-left: auto;
  flex-shrink: 0;
}
.ga-custom-save-btn:hover {
  background: #006fff;
  color: #fff;
}

/* 상세 패널 설정 정보 */
.ga-detail-settings {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 2rem;
  padding: 1.2rem 0;
  font-size: 1.3rem;
  color: #505050;
}
.ga-detail-setting-item strong {
  color: #202020;
}

/* ── 맞춤 계산기 2열 그리드 (반영교과 + Z점수) ── */
.ga-custom-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.6rem;
}
.ga-custom-grid2 > .ga-custom-group {
  margin-bottom: 0;
}
@media (max-width: 640px) {
  .ga-custom-grid2 {
    grid-template-columns: 1fr;
  }
}

/* Z점수 패널 */
.ga-zscore-desc {
  font-size: 1.25rem;
  color: #505050;
  line-height: 1.8;
  margin-bottom: 1.2rem;
}
.ga-zscore-formula {
  background: #f0f4ff;
  border: 1px solid #d0deff;
  border-radius: 0.8rem;
  padding: 0.8rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  font-size: 1.3rem;
  font-weight: 600;
  color: #1a56db;
  margin-bottom: 1.2rem;
}
.ga-zscore-formula-ex {
  font-size: 1.15rem;
  font-weight: 400;
  color: #505050;
}
.ga-zscore-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.15rem;
  margin-bottom: 1.2rem;
}
.ga-zscore-table th {
  background: #f8f9fa;
  padding: 0.4rem 0.6rem;
  border: 1px solid #e5e7eb;
  font-weight: 600;
  color: #374151;
  text-align: center;
}
.ga-zscore-table td {
  padding: 0.3rem 0.6rem;
  border: 1px solid #e5e7eb;
  text-align: center;
  color: #505050;
}
.ga-zscore-preview {
  background: #f8f9fa;
  border-radius: 0.8rem;
  padding: 1rem 1.4rem;
  font-size: 1.25rem;
  color: #505050;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ga-zscore-preview-grade {
  font-weight: 700;
  font-size: 1.4rem;
}
.ga-zscore-arrow {
  color: #006fff;
  font-weight: 700;
  margin: 0 0.6rem;
}

/* ── Z등급 차이 컬럼 ── */
.ga-th-zscore {
  background: #f0f4ff !important;
  color: #3b6fd4 !important;
  font-size: 1.1rem;
  white-space: nowrap;
}
.ga-zscore-diff {
  text-align: center;
  font-weight: 700;
  font-size: 1.2rem;
  white-space: nowrap;
}
.ga-zscore-up {
  color: #dc2626;
}
.ga-zscore-down {
  color: #059669;
}
.ga-zscore-same {
  color: #9ca3af;
}

/* ── 맞춤 계산기 3열 그리드 ── */
.ga-custom-grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}
.ga-custom-grid3 > .ga-custom-group {
  margin-bottom: 0;
}
@media (max-width: 960px) {
  .ga-custom-grid3 {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 640px) {
  .ga-custom-grid3 {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 400px) {
  .ga-overview {
    grid-template-columns: repeat(2, 1fr);
  }
  .ga-custom-result-main {
    gap: 0.4rem;
  }
  .ga-custom-result-grade {
    font-size: 2rem;
  }
  .ga-custom-table {
    min-width: 68rem;
  }
  .ga-grade-table {
    min-width: 76rem;
  }
  .ga-combo-table {
    min-width: 48rem;
  }
  .sub-tab-menu .sub-tab-button .tab-short {
    font-size: 1.2rem;
  }
}

/* ── Feature D: 제외 과목 유형 칩 ── */
.ga-custom-excl-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.ga-custom-excl-btn {
  padding: 0.4rem 1rem;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #505050;
  font-size: 1.2rem;
  font-weight: 500;
  border-radius: 2rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.ga-custom-excl-btn:hover {
  border-color: #ef4444;
  color: #ef4444;
}
.ga-custom-excl-btn.active {
  background: #fef2f2;
  border-color: #ef4444;
  color: #dc2626;
  font-weight: 600;
  text-decoration: line-through;
}

/* ── Feature A: 교과별 가중치 ── */
.ga-custom-catweight-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-top: 0.6rem;
  align-items: center;
}
.ga-custom-catweight-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 1.2rem;
  color: #505050;
}
.ga-custom-catweight-input {
  width: 4.5rem;
  padding: 0.3rem 0.4rem;
  border: 1px solid #d1d5db;
  border-radius: 0.4rem;
  font-size: 1.2rem;
  text-align: center;
  font-family: inherit;
  transition: border-color 0.2s;
}
.ga-custom-catweight-input:focus {
  border-color: #006fff;
  outline: none;
}
.ga-custom-catweight-grid.disabled {
  opacity: 0.45;
  pointer-events: none;
}
.ga-custom-catweight-input:disabled {
  background: #f3f4f6;
  color: #9ca3af;
}

/* ── Feature C: 학년별/학기별 모드 토글 ── */
.ga-custom-ratio-mode {
  display: flex;
  gap: 0;
  margin-bottom: 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.6rem;
  overflow: hidden;
  width: fit-content;
}
.ga-custom-ratio-mode-btn {
  padding: 0.5rem 1.4rem;
  border: none;
  background: #fff;
  color: #505050;
  font-size: 1.2rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.ga-custom-ratio-mode-btn.active {
  background: #006fff;
  color: #fff;
  font-weight: 600;
}
.ga-custom-ratio-mode-btn:not(.active):hover {
  background: #f3f4f6;
}
.ga-custom-sem-ratio-grid {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.ga-custom-sem-ratio-row {
  display: grid;
  grid-template-columns: 3.5rem 1fr 1fr 1fr;
  gap: 0.5rem;
  align-items: center;
}
.ga-custom-sem-ratio-label {
  font-size: 1.2rem;
  font-weight: 600;
  color: #505050;
}
.ga-custom-sem-ratio-head {
  font-size: 1.1rem;
  font-weight: 600;
  color: #808080;
  text-align: center;
}
.ga-custom-sem-ratio-input {
  width: 100%;
  padding: 0.4rem;
  border: 1px solid #d1d5db;
  border-radius: 0.4rem;
  font-size: 1.2rem;
  text-align: center;
  font-family: inherit;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.ga-custom-sem-ratio-input:focus {
  border-color: #006fff;
  outline: none;
}
.ga-custom-sem-ratio-input.off,
.ga-custom-sem-ratio-input:disabled {
  background: #f3f4f6;
  color: #9ca3af;
  border-color: #e5e7eb;
}
.ga-custom-ratio-item.off {
  opacity: 0.45;
}
.ga-custom-ratio-item.off .ga-custom-ratio-input:disabled {
  background: #f3f4f6;
  color: #9ca3af;
}

/* ── 빈 학년 채우기 안내 문구 ── */
.ga-open-custom-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.4rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid #e5e7eb;
}
.ga-open-custom-wrap .ga-panel-close {
  position: static;
}
.ga-open-custom-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.4rem;
  border: none;
  border-radius: 0.5rem;
  background: #ef4444;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.ga-open-custom-btn:hover {
  background: #dc2626;
}
.ga-open-custom-btn i {
  font-size: 1.4rem;
}
.ga-pc-fill-notice {
  font-size: 1.15rem;
  color: #e67700;
  line-height: 1.5;
  margin-top: 0.6rem;
  padding: 0.4rem 0.8rem;
  background: #fff8e1;
  border-radius: 0.4rem;
}
.ga-fill-notice {
  font-size: 1.2rem;
  color: #e67700;
  line-height: 1.4;
  padding: 0.5rem 1rem;
  background: #fff8e1;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.ga-fill-notice i {
  font-size: 1.4rem;
  flex-shrink: 0;
}
