:root {
  color-scheme: light;
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-2: #eef2f6;
  --line: #e3e9ef;
  --line-strong: #c6d1dc;
  --text: #141d28;
  --muted: #5b6774;
  --muted-2: #8b96a2;
  --teal: #0d6e74;
  --teal-dark: #0a5257;
  --teal-soft: #e4f2f1;
  --teal-softer: #f1f8f7;
  --blue: #2c64b1;
  --violet: #6958a8;
  --amber: #8a5a00;
  --red: #b23838;
  --green: #2e7b49;
  --ink-soft: #1d2c3d;
  --shadow-sm: 0 1px 2px rgba(16, 26, 38, 0.05);
  --shadow-md: 0 8px 24px rgba(16, 26, 38, 0.07);
  --radius: 12px;
  --radius-sm: 8px;
  --control-h: 40px;
  --font: "Pretendard Variable", Pretendard, "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--text);
  font-family: var(--font);
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.app-shell {
  min-height: 100vh;
}

/* ---------- 로딩 / 오류 ---------- */

.boot-panel {
  display: grid;
  min-height: 100vh;
  place-content: center;
  justify-items: center;
  gap: 12px;
  color: var(--muted);
  text-align: center;
}

.boot-panel strong {
  color: var(--text);
  font-size: 18px;
  font-weight: 750;
}

.boot-panel.error strong {
  color: var(--red);
}

.boot-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--line);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: boot-spin 0.8s linear infinite;
}

@keyframes boot-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .boot-spinner {
    animation-duration: 2.4s;
  }
}

/* ---------- 상단바 ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.topbar-inner {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 18px;
  align-items: center;
  width: min(1760px, 100%);
  margin: 0 auto;
  padding: 13px 24px 12px;
}

.brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 13px;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #10828a 0%, #0a5257 58%, #143242 100%);
  box-shadow: 0 4px 12px rgba(10, 82, 87, 0.28);
  color: #fff;
  font-size: 19px;
  font-weight: 800;
}

.brand h1 {
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

/* 상단 주의 배너 */
.notice-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  width: min(1760px, 100%);
  margin: 0 auto;
  padding: 8px 24px;
  border-bottom: 1px solid #f1e2bd;
  background: #fffaee;
  color: var(--amber);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.notice-tag {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 2px 9px;
  border-radius: 999px;
  background: #f4c752;
  color: #5d3c00;
  font-size: 11.5px;
  font-weight: 800;
}

/* ---------- 레이아웃 ---------- */

.main-layout {
  display: grid;
  grid-template-columns: 296px minmax(0, 1fr);
  gap: 18px;
  width: min(1760px, 100%);
  margin: 0 auto;
  padding: 18px 24px 36px;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.content {
  min-width: 0;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.panel-pad {
  padding: 16px;
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}

.section-title h2,
.section-title h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.section-title h2::before,
.section-title h3::before {
  content: "";
  width: 4px;
  height: 15px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--teal), var(--teal-dark));
}

.section-title span {
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 600;
}

/* ---------- 폼 컨트롤 ---------- */

.field-grid {
  display: grid;
  gap: 14px;
}

.field-grid > .field + .field {
  padding-top: 13px;
  border-top: 1px solid var(--surface-2);
}

.field {
  display: grid;
  gap: 6px;
}

.field.two {
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.field label,
.label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.01em;
}

.field-hint {
  color: var(--muted-2);
  font-size: 11.5px;
  line-height: 1.45;
}

.control,
.select {
  width: 100%;
  min-height: var(--control-h);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  outline: none;
  padding: 8px 11px;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.control::placeholder {
  color: var(--muted-2);
}

.control:hover,
.select:hover {
  border-color: #a9b8c6;
}

.control:focus,
.select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13, 110, 116, 0.15);
}

.check-list {
  display: grid;
  max-height: 264px;
  gap: 2px;
  overflow: auto;
  padding-right: 3px;
}

.check-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 30px;
  border-radius: 7px;
  padding: 2px 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.1s ease;
}

.check-item:hover {
  background: var(--teal-softer);
}

.check-item:has(input:checked) {
  background: var(--teal-soft);
  font-weight: 700;
}

.check-item input {
  width: 16px;
  height: 16px;
  accent-color: var(--teal);
  cursor: pointer;
}

.check-item .count {
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.check-item:has(input:checked) .count {
  background: #fff;
  color: var(--teal-dark);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--control-h);
  gap: 7px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  background: var(--teal);
  color: #fff;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
  transition: background-color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.button:hover:not(:disabled) {
  background: var(--teal-dark);
}

.button.secondary {
  border-color: var(--line-strong);
  background: #fff;
  color: var(--text);
}

.button.secondary:hover:not(:disabled) {
  border-color: #a9b8c6;
  background: #f7fafb;
}

a.button {
  text-decoration: none;
}

.home-link span {
  font-size: 15px;
  line-height: 1;
}

/* ---------- 툴바 / 요약 ---------- */

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) minmax(140px, 1fr) minmax(140px, 1fr) minmax(180px, 1fr);
  gap: 10px;
  align-items: end;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.check-list.compact {
  max-height: none;
}

.result-summary {
  display: grid;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: #fafcfd;
}

.stat-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

.stat-strip .stat {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}

.stat-strip .stat b {
  color: var(--teal-dark);
  font-size: 17px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.stat-strip .stat + .stat {
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.stat-strip .stat-note {
  color: var(--muted-2);
  font-size: 12px;
  white-space: nowrap;
}

.stat-strip .stat-total {
  margin-left: auto;
  color: var(--muted-2);
  font-size: 12px;
  white-space: nowrap;
}

/* 적용 필터 칩 */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.af-label {
  margin-right: 2px;
  color: var(--muted-2);
  font-size: 11.5px;
  font-weight: 750;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  border: 1px solid #c3e0de;
  border-radius: 999px;
  padding: 2px 9px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 700;
  transition: background-color 0.1s ease, border-color 0.1s ease;
}

.filter-chip i {
  font-style: normal;
  color: #6ba7a4;
  font-size: 13px;
  line-height: 1;
}

.filter-chip:hover {
  border-color: var(--teal);
  background: #d7ecea;
}

.filter-chip:hover i {
  color: var(--teal-dark);
}

.filter-chip.clear-all {
  border-color: var(--line-strong);
  background: #fff;
  color: var(--muted);
}

.filter-chip.clear-all:hover {
  border-color: var(--red);
  color: var(--red);
  background: #fff;
}

.tab-content {
  min-height: 620px;
}

/* ---------- 결과 테이블 ---------- */

.result-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 392px;
  gap: 14px;
  padding: 14px 16px 16px;
}

.table-shell {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.table-scroll {
  max-height: 720px;
  overflow: auto;
  background: #fff;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 2px solid var(--line-strong);
  background: #f6f9fa;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-align: left;
}

th span {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

th,
td {
  padding: 10px 11px;
  vertical-align: middle;
}

td {
  border-bottom: 1px solid #edf1f4;
  color: var(--text);
  font-size: 13.5px;
}

tr {
  background: #fff;
}

tbody tr:nth-child(even) {
  background: #fbfdfd;
}

tbody tr:hover {
  background: var(--teal-softer);
  cursor: pointer;
}

tbody tr.selected,
tbody tr.selected:hover {
  background: var(--teal-soft);
  box-shadow: inset 3px 0 0 var(--teal);
}

/* 정렬 가능한 헤더 */
th.sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

th.sortable:hover {
  color: var(--teal-dark);
  background: #ecf4f5;
}

th.sortable .sort-mark {
  margin-left: 3px;
  color: var(--teal);
  font-size: 9px;
  font-style: normal;
  opacity: 0;
  transition: opacity 0.1s ease;
}

th.sortable:hover .sort-mark {
  opacity: 0.45;
}

th.sortable.active {
  color: var(--teal-dark);
}

th.sortable.active .sort-mark {
  opacity: 1;
}

tbody tr[data-id]:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: -2px;
}

.button:focus-visible,
.control:focus-visible,
.select:focus-visible,
.filter-chip:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
}

.col-uni {
  width: 16%;
}

.col-major {
  width: 36%;
}

.col-yr {
  width: 8.5%;
  text-align: center;
}

.col-spark {
  width: 12%;
}

th.col-primary {
  width: 31%;
  background: #e9f4f3;
  color: var(--teal-dark);
}

th.col-primary span {
  color: #57908d;
}

td.col-primary {
  background: rgba(13, 110, 116, 0.045);
}

.cell-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.cell-main strong {
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 750;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-main span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 전형명 강조 — 흐린 보조줄에 묻히지 않게 진한 색+볼드 */
.cell-main .jeonhyeong {
  color: var(--blue);
  font-weight: 700;
}

/* 3개년 셀 (24·25·26) */
.yr3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  gap: 4px;
  font-variant-numeric: tabular-nums;
}

.yr3 .y {
  display: grid;
  align-content: center;
  box-sizing: border-box;
  gap: 1px;
  justify-items: center;
  min-height: 42px;
  padding: 2px 0;
  border-left: 1px solid var(--surface-2);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 650;
}

.score3 .y {
  height: 54px;
  min-height: 54px;
}

.yr3 .y:first-child {
  border-left: 0;
}

.yr3 .y i {
  font-style: normal;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 700;
}

.yr3 .y b {
  font: inherit;
}

.yr3 .y em {
  display: inline-block;
  padding: 0 4px;
  border-radius: 3px;
  background: #e6edf8;
  color: var(--blue);
  font-size: 9px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.35;
}

.yr3 .y.now {
  border-radius: 6px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: 13.5px;
  font-weight: 800;
}

.yr3 .y.now i {
  color: #4d8a87;
}

.col-primary .yr3 .y.now {
  background: #d9ecea;
  font-size: 14px;
  box-shadow: inset 0 0 0 1px var(--teal);
}

.col-primary .yr3 .y.scale {
  background: #eef3fb;
  color: var(--blue);
  box-shadow: inset 0 0 0 1px #c7d6ec;
}

.col-primary .yr3 .y.scale.now {
  background: #dfeafa;
  box-shadow: inset 0 0 0 1px #8eb0df;
}

.col-primary .yr3 .y.scale i {
  color: #426b9f;
}

.col-primary .yr3 .y.empty {
  color: var(--muted-2);
  background: transparent;
  box-shadow: none;
}

.cell-year {
  display: inline-block;
  margin-left: 3px;
  padding: 0 4px;
  border-radius: 3px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  vertical-align: 1px;
}

.track-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 800;
}

.track-tag.subj {
  background: #e4f1f7;
  color: var(--blue);
}

.track-tag.comp {
  background: #efe9fb;
  color: var(--violet);
}

/* ---------- 추세 색 / 배지 ---------- */

.delta {
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.delta.up { color: var(--red); }
.delta.down { color: var(--blue); }
.delta.flat { color: var(--muted-2); }

/* ---------- 상세 패널 ---------- */

.detail-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 12px;
  align-self: start;
  position: sticky;
  top: 84px;
}

.detail-head {
  display: grid;
  gap: 9px;
  margin-bottom: 14px;
}

.detail-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.detail-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.detail-jeonhyeong {
  display: inline-block;
  justify-self: start;
  margin: 0;
  padding: 3px 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--blue);
  background: #eef3fb;
  border: 1px solid #d4e0f2;
  border-radius: 999px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 9px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

/* 대표 수치 히어로 (평균백분위 70%컷 · 경쟁률) */
.cut-hero {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.cut-box {
  display: grid;
  gap: 3px;
  justify-items: start;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 13px;
  background: #fafcfd;
}

.cut-box.primary {
  border-color: #bcdcda;
  background: linear-gradient(155deg, #eef8f7 0%, #dff0ee 100%);
}

.cut-box.primary.scale-box {
  border-color: #c7d6ec;
  background: linear-gradient(155deg, #f0f5fc 0%, #e2ebf8 100%);
}

.cut-label {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 750;
}

.cut-box.primary .cut-label {
  color: var(--teal-dark);
}

.cut-box.primary.scale-box .cut-label {
  color: var(--blue);
}

.cut-box strong {
  color: var(--text);
  font-size: 27px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.cut-box.primary strong {
  color: var(--teal-dark);
}

.cut-box.primary.scale-box strong {
  color: var(--blue);
}

.cut-box .delta {
  font-size: 11.5px;
}

.cut-note {
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 600;
}

/* 3개년 비교 표 (상세) */
.detail-3yr {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.detail-3yr table {
  table-layout: auto;
}

.detail-3yr th {
  position: static;
  padding: 8px 7px;
  border-bottom-width: 1px;
  text-align: center;
  font-size: 11.5px;
}

.detail-3yr td {
  padding: 8px 7px;
  text-align: center;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.detail-3yr tbody th {
  text-align: left;
  color: var(--muted);
  font-weight: 750;
  background: #f9fbfc;
}

.detail-3yr tbody tr:nth-child(even) {
  background: #fff;
}

.detail-3yr .now-row td,
.detail-3yr .now-row th {
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-weight: 800;
}

.related-history {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.related-note {
  margin: 4px 0 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.related-table td.related-name {
  max-width: 160px;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-3yr td.year-jname {
  max-width: 180px;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.muted-cell {
  color: var(--muted-2);
  text-align: center;
}

/* ---------- 페이저 / 빈 상태 ---------- */

.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: #fbfcfd;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.pager-actions {
  display: flex;
  gap: 6px;
}

.pager .button {
  min-height: 32px;
  padding: 5px 12px;
  font-size: 12.5px;
}

.empty {
  display: grid;
  min-height: 280px;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

.empty-inner {
  display: grid;
  gap: 6px;
  justify-items: center;
}

.empty-icon {
  font-size: 30px;
  opacity: 0.55;
}

.empty-inner strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 750;
}

.empty-inner span {
  color: var(--muted-2);
  font-size: 13px;
}

.site-footer {
  display: grid;
  gap: 3px;
  margin-top: 14px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.55;
}

.site-footer strong {
  margin-right: 6px;
  color: var(--muted);
  font-weight: 750;
}

/* ---------- 반응형 ---------- */

@media (min-width: 1041px) {
  .sidebar {
    position: sticky;
    top: 84px;
    align-self: start;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    padding-right: 2px;
  }
}

@media (max-width: 1540px) {
  .result-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .detail-panel {
    position: static;
  }
}

@media (max-width: 1040px) {
  .topbar-inner,
  .main-layout {
    padding-right: 14px;
    padding-left: 14px;
  }

  .notice-bar {
    padding-right: 14px;
    padding-left: 14px;
  }

  .topbar-inner {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .top-actions {
    justify-content: flex-start;
  }

  .main-layout {
    grid-template-columns: 1fr;
  }

  .toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-strip .stat-total {
    margin-left: 0;
  }
}

@media (max-width: 760px) {
  .brand h1 {
    font-size: 17px;
  }

  .sidebar,
  .toolbar {
    grid-template-columns: 1fr;
  }

  .result-layout {
    padding: 10px;
  }

  .table-scroll {
    max-height: 620px;
  }

  th,
  td {
    padding: 8px 7px;
  }

  .col-spark {
    display: none;
  }

  .cut-hero {
    grid-template-columns: 1fr 1fr;
  }

  .cut-box strong {
    font-size: 23px;
  }
}

/* 좁은 화면: 모집·경쟁률 열 숨겨 평균백분위 위주로(전체 지표는 상세 패널에서) */
@media (max-width: 600px) {
  .col-yr:not(.col-primary) {
    display: none;
  }
}

/* ---------- 정시 도구 전용 ---------- */

/* 안내문(미제출 사유 등) */
.note-list {
  margin: 12px 0 0;
  padding: 10px 12px;
  list-style: none;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.note-list li { margin: 0 0 4px; }
.note-list li:last-child { margin: 0; }
.note-list b { color: var(--ink-soft); margin-right: 4px; }

/* 다중트랙(분할/수능+실기 등) 변형 표식 */
.variant-tag {
  display: inline-block;
  margin-left: 4px;
  padding: 0 5px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--amber);
  background: #fff3df;
  border: 1px solid #f0d9b0;
  border-radius: 4px;
  vertical-align: middle;
}

/* 2027 수능 반영방법 패널 */
.changed-tag {
  display: inline-block;
  margin-left: 4px;
  padding: 0 5px;
  font-size: 10.5px;
  font-weight: 800;
  color: #fff;
  background: var(--red);
  border-radius: 4px;
  vertical-align: middle;
}
.changed-toggle { font-weight: 700; }
.changed-toggle span { color: var(--red); }
.method-warn {
  margin: 8px 0 10px;
  padding: 9px 11px;
  background: #fdeeee;
  border: 1px solid #f1c9c9;
  border-radius: var(--radius-sm);
  color: var(--red);
  font-size: 12.5px;
  line-height: 1.5;
}
.method-details { margin: 8px 0; }
.method-details > summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  color: var(--ink-soft);
  padding: 8px 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  list-style: revert;
  transition: background-color 0.1s ease;
}
.method-details > summary:hover {
  background: var(--teal-softer);
}
.method-details[open] > summary { margin-bottom: 8px; }
.method-html {
  font-size: 12px;
  line-height: 1.55;
  color: var(--text);
  overflow-x: auto;
}
.method-html table {
  border-collapse: collapse;
  width: 100%;
  margin: 6px 0;
  font-size: 11.5px;
}
.method-html th,
.method-html td {
  border: 1px solid var(--line-strong);
  padding: 4px 6px;
  text-align: center;
  vertical-align: middle;
  word-break: keep-all;
}
.method-html p { margin: 4px 0; }
.method-src { margin-top: 8px; font-size: 11px; color: var(--muted-2); }

/* 백분위 우선 비교 안내 / 소제목 */
.cmp-note {
  margin: 6px 0 10px;
  padding: 8px 10px;
  background: #eef6f1;
  border: 1px solid #cfe6da;
  border-radius: var(--radius-sm);
  font-size: 12px;
  line-height: 1.5;
  color: var(--green);
}
.cmp-note b { font-weight: 800; }
.cmp-note.warn {
  background: #fdeeee;
  border-color: #f1c9c9;
  color: var(--red);
}
.sub-h {
  margin: 12px 0 4px;
  font-size: 12px;
  font-weight: 750;
  color: var(--muted);
}
.sub-h:first-of-type { margin-top: 4px; }

/* 내 백분위 매칭 — 차이 배지 / 요약 강조 */
.diff-badge {
  margin-top: 3px;
  font-size: 10.5px;
  font-weight: 800;
  text-align: center;
}
.diff-badge.up { color: var(--green); }
.diff-badge.down { color: var(--red); }
.hl-match { color: var(--teal-dark); }
.range-row { display: flex; gap: 6px; }
.range-row .control { flex: 1; min-width: 0; }
.range-row .select { width: 72px; flex: 0 0 auto; }

/* 단일연도 레이아웃: 대표값 강조 */
.col-primary .big-val { font-weight: 800; font-size: 15px; color: var(--teal-dark); }

/* 재구성된 수능 반영방법 — 우리 카드/표/칩 */
.method-panel .m-block { margin: 10px 0 14px; }
.m-block-h {
  display: inline-block;
  margin: 0 0 6px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: var(--teal);
  border-radius: 999px;
}
.ind-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 4px 0 12px;
}
.ind-label { font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.ind-chip {
  padding: 2px 9px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--teal-dark);
  background: var(--teal-soft);
  border: 1px solid #c6e3e1;
  border-radius: 999px;
}
.ind-note { font-size: 10.5px; color: var(--muted-2); margin-left: 2px; }

/* 소수영역(2~3) 반영 경고 — 평균백분위 왜곡 주의 */
.area-tag {
  display: inline-block;
  margin-left: 4px;
  padding: 0 6px;
  font-size: 10.5px;
  font-weight: 800;
  color: #fff;
  background: #c98a1b;
  border-radius: 4px;
  vertical-align: middle;
  white-space: nowrap;
}
.scale-tag,
.year-tag {
  display: inline-block;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 800;
  vertical-align: middle;
  white-space: nowrap;
}
.scale-tag {
  color: var(--blue);
  background: #e6edf8;
  box-shadow: inset 0 0 0 1px #c7d6ec;
}
.year-tag {
  color: var(--muted);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
}
.year-tag.related-year {
  color: var(--blue);
  background: #eef3fb;
  box-shadow: inset 0 0 0 1px #d4e0f2;
}
.area-tag-inline {
  padding: 0 4px;
  font-weight: 800;
  color: var(--amber);
  background: #fff3df;
  border-radius: 3px;
}
.area-note {
  margin: 8px 0 0;
  padding: 9px 11px;
  background: #fff5e6;
  border: 1px solid #f0d9b0;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--amber);
}
.area-note b { font-weight: 800; }

.inline-scale {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 4px;
  background: #e6edf8;
  color: var(--blue);
  font-size: 11.5px;
  font-weight: 850;
  white-space: nowrap;
}
