/* ═══════════════════════════════════════════════════════════════
   REDPAPA — 공개 사이트 디자인 시스템 v3
   /design-website 토큰 · 다크 기본 / .light 클래스 전환
═══════════════════════════════════════════════════════════════ */

/* ── TOKENS ── */
:root {
  --bg:      #09090b;
  --bg2:     #111116;
  --panel:   hsla(0,0%,100%,.038);
  --panel-h: hsla(0,0%,100%,.07);
  --surface: hsla(0,0%,100%,.018);
  --line:    hsla(0,0%,100%,.09);
  --line2:   hsla(0,0%,100%,.16);
  --text:    #fafafa;
  --muted:   #71717a;
  --muted2:  #a1a1aa;
  --accent:  #e11d48;
  --accent2: #fb7185;
  --a-dim:   rgba(225,29,72,.12);
  --a-glow:  rgba(225,29,72,.22);
  --r:       14px;
  --rs:      8px;
  --font:    "Pretendard Variable","Pretendard","Noto Sans KR",-apple-system,system-ui,sans-serif;
}

.light {
  --bg:      #f4f6fb;
  --bg2:     #e8edf5;
  --panel:   hsla(0,0%,100%,.85);
  --panel-h: hsla(0,0%,100%,.97);
  --surface: rgba(15,23,42,.025);
  --line:    rgba(15,23,42,.09);
  --line2:   rgba(15,23,42,.16);
  --text:    #0f172a;
  --muted:   #64748b;
  --muted2:  #475569;
  --accent:  #4f46e5;
  --accent2: #7c3aed;
  --a-dim:   rgba(79,70,229,.10);
  --a-glow:  rgba(79,70,229,.18);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse 80% 40% at 50% 0%, var(--a-glow) 0, transparent 55%),
    radial-gradient(ellipse 40% 28% at 92% 88%, var(--a-glow) 0, transparent 52%);
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
input, select { font: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ── LAYOUT ── */
.container {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════════════════════ */
.site-header {
  position: sticky; top: 0; z-index: 200;
  height: 62px;
  background: hsla(0,0%,4%,.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s;
}
.light .site-header { background: hsla(0,0%,98%,.93); }
.site-header.scrolled { box-shadow: 0 4px 24px rgba(0,0,0,.18); }

.header-inner {
  height: 100%;
  display: flex; align-items: center;
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  position: relative;
}

/* LOGO */
.logo {
  display: flex; align-items: center; gap: 9px;
  font-size: 16px; font-weight: 800;
  letter-spacing: -.025em; white-space: nowrap;
  flex-shrink: 0; color: var(--text);
  z-index: 1;
}
.logo-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 900; color: #fff;
  box-shadow: 0 2px 12px var(--a-glow);
}
.logo-text { color: var(--text); }

/* MAIN NAV — centered */
.main-nav {
  position: absolute; left: 50%; transform: translateX(-50%);
  display: flex; gap: 2px;
  overflow-x: auto;
}
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a {
  padding: 0 16px; height: 38px;
  display: flex; align-items: center;
  font-size: 14px; font-weight: 600;
  color: var(--muted2); border-radius: var(--rs);
  transition: all .15s; white-space: nowrap;
}
.main-nav a:hover { color: var(--text); background: var(--panel-h); }
.main-nav a.active { color: var(--accent); background: var(--a-dim); }

/* HEADER ACTIONS */
.header-actions {
  display: flex; align-items: center; gap: 8px;
  margin-left: auto; z-index: 1;
}

/* Theme toggle */
.theme-toggle {
  width: 38px; height: 38px; border-radius: var(--rs);
  border: 1px solid var(--line); background: var(--panel);
  color: var(--muted2);
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.theme-toggle:hover { background: var(--panel-h); color: var(--text); }
/* 다크모드: 태양 아이콘(→ 라이트로 전환) */
.icon-sun  { display: block; }
.icon-moon { display: none; }
/* 라이트모드: 달 아이콘(→ 다크로 전환) */
.light .icon-sun  { display: none; }
.light .icon-moon { display: block; }

/* Hamburger */
.hamburger {
  display: none;
  width: 38px; height: 38px; border-radius: var(--rs);
  border: 1px solid var(--line); background: var(--panel);
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.hamburger span {
  display: block; width: 18px; height: 2px;
  background: var(--muted2); border-radius: 2px; transition: all .2s;
}

/* ── MOBILE DRAWER ── */
.nav-drawer {
  position: fixed; top: 62px; left: 0; right: 0; bottom: 0;
  background: var(--bg); z-index: 190;
  padding: 20px;
  flex-direction: column; gap: 4px;
  border-top: 1px solid var(--line);
  transform: translateX(-100%);
  transition: transform .25s ease;
  display: flex;
}
.nav-drawer.open { transform: translateX(0); }
.drawer-close {
  align-self: flex-end;
  width: 38px; height: 38px; border-radius: var(--rs);
  border: 1px solid var(--line); background: var(--panel);
  color: var(--muted2); font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.drawer-link {
  display: flex; align-items: center;
  height: 50px; padding: 0 16px;
  font-size: 16px; font-weight: 700; color: var(--muted2);
  border-radius: var(--rs); transition: all .15s;
}
.drawer-link:hover { background: var(--panel-h); color: var(--text); }
.drawer-overlay {
  position: fixed; inset: 0; z-index: 180;
  background: rgba(0,0,0,.5);
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }

/* ═══════════════════════════════════════════════════════════════
   LIVE BAR
═══════════════════════════════════════════════════════════════ */
.live-bar {
  background: var(--bg2);
  border-bottom: 1px solid var(--line);
  padding: 0;
}
.live-bar-inner {
  display: flex; align-items: center; gap: 16px;
  height: 42px; overflow: hidden;
}
.live-label-wrap {
  display: flex; align-items: center; gap: 7px;
  flex-shrink: 0;
}
.live-pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  animation: livePulse 2s ease-in-out infinite;
}
@keyframes livePulse {
  0%,100% { box-shadow: 0 0 0 0 var(--a-glow); opacity: 1; }
  50%      { box-shadow: 0 0 0 5px transparent; opacity: .7; }
}
.live-tag {
  font-size: 12px; font-weight: 800;
  color: var(--accent); letter-spacing: .07em;
  text-transform: uppercase;
}
.live-items-wrap {
  display: flex; align-items: center; gap: 10px;
  flex: 1; overflow: hidden;
  font-size: 13px; color: var(--muted2);
}
.live-item {
  display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap;
}
.live-item strong { color: var(--text); font-weight: 700; }
.live-sep { color: var(--line2); font-size: 16px; flex-shrink: 0; }
.li-type {
  display: inline-flex; align-items: center;
  padding: 1px 7px; border-radius: 4px;
  font-size: 12px; font-weight: 800; flex-shrink: 0;
}
.lt-deadline { background: rgba(225,29,72,.14); color: var(--accent); }
.light .lt-deadline { background: rgba(79,70,229,.12); }
.lt-exam    { background: rgba(59,130,246,.14); color: #60a5fa; }
.lt-result  { background: rgba(16,185,129,.14); color: #34d399; }
.live-all-link {
  margin-left: auto; flex-shrink: 0;
  font-size: 12px; font-weight: 700; color: var(--accent);
  white-space: nowrap; transition: opacity .15s;
}
.live-all-link:hover { opacity: .75; }

/* ═══════════════════════════════════════════════════════════════
   COMMON
═══════════════════════════════════════════════════════════════ */
section { padding: 88px 0; }

/* section-head — centered */
.section-head {
  text-align: center;
  margin-bottom: 48px;
}
.section-head h2 {
  font-size: clamp(30px, 3.8vw, 46px);
  font-weight: 800; line-height: 1.15;
  letter-spacing: -.035em; color: var(--text);
  margin-bottom: 12px;
}
.section-head h2 em {
  font-style: normal;
  color: var(--accent);
}
.section-head p {
  font-size: 16px; color: var(--muted); line-height: 1.7;
}

/* eyebrow */
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 800; letter-spacing: .09em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 14px;
}
.edot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); animation: livePulse 2s ease-in-out infinite;
}

/* glass */
.glass {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.light .glass { background: hsla(0,0%,100%,.9); }

/* tag */
.tag {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 99px;
  font-size: 12px; font-weight: 700;
  background: var(--bg2); color: var(--muted2);
  border: 1px solid var(--line);
}

/* ── BUTTONS ── */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 0 24px; height: 46px;
  background: var(--accent); color: #fff;
  font-size: 14px; font-weight: 700; border-radius: var(--rs);
  box-shadow: 0 4px 16px var(--a-glow);
  transition: all .15s; cursor: pointer; border: none;
}
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 0 24px; height: 46px;
  background: var(--panel); color: var(--text);
  font-size: 14px; font-weight: 700; border-radius: var(--rs);
  border: 1px solid var(--line); transition: all .15s;
}
.btn-ghost:hover { background: var(--panel-h); }

.btn-sm {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 14px; height: 32px;
  background: var(--panel); color: var(--text);
  font-size: 12px; font-weight: 700; border-radius: var(--rs);
  border: 1px solid var(--line); transition: all .15s;
}
.btn-sm:hover { background: var(--panel-h); border-color: var(--accent); color: var(--accent); }

.btn-outline-univ {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 42px;
  background: transparent; color: var(--accent);
  font-size: 14px; font-weight: 700; border-radius: var(--rs);
  border: 1.5px solid var(--accent);
  transition: all .15s; margin-top: auto;
}
.btn-outline-univ:hover { background: var(--a-dim); }

.btn-load-more {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 40px; height: 52px;
  background: var(--accent); color: #fff;
  font-size: 15px; font-weight: 700; border-radius: 10px;
  box-shadow: 0 4px 18px var(--a-glow); transition: all .15s;
  border: none; cursor: pointer;
}
.btn-load-more:hover { filter: brightness(1.08); transform: translateY(-1px); }

/* segmented */
.segmented {
  display: inline-flex; gap: 3px;
  background: var(--bg2); border-radius: var(--rs); padding: 4px;
}
.segmented button {
  padding: 6px 18px; font-size: 13px; font-weight: 700;
  border-radius: 6px; color: var(--muted2); transition: all .15s;
}
.segmented button.active {
  background: var(--accent); color: #fff;
  box-shadow: 0 2px 8px var(--a-glow);
}

/* ═══════════════════════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════════════════════ */
.hero {
  padding: 88px 0 72px;
  position: relative; overflow: hidden;
}
.hero-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 56px; align-items: center; position: relative; z-index: 1;
}
.hero-copy {}
.hero-copy h1 {
  font-size: clamp(34px, 4.5vw, 56px);
  font-weight: 900; line-height: 1.1;
  letter-spacing: -.04em; margin-bottom: 20px;
}
.hero-copy h1 em {
  font-style: normal;
  color: var(--accent);
}
.hero-desc {
  font-size: 17px; color: var(--muted); line-height: 1.75;
  max-width: 480px;
}
.hero-card-wrap {
  display: flex; align-items: center; justify-content: center;
}
.hero-stat-card {
  padding: 22px 22px; width: 100%; max-width: 400px;
  box-shadow: 0 24px 64px rgba(0,0,0,.28);
  animation: heroFloat 5s ease-in-out infinite;
}
.hsc-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.hsc-pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  animation: livePulse 2s infinite;
  flex-shrink: 0;
}
.hsc-tag {
  font-size: 12px; font-weight: 800;
  color: var(--accent); letter-spacing: .08em;
  text-transform: uppercase;
}
.hsc-more-link {
  margin-left: auto;
  font-size: 13px; font-weight: 700;
  color: var(--muted2);
  transition: color .15s;
}
.hsc-more-link:hover { color: var(--accent); }

/* D-day list */
.hsc-dday-list {
  display: flex; flex-direction: column; gap: 12px;
}
.hsc-dday-item {
  display: flex; align-items: center; gap: 10px;
}
.dday-badge {
  flex-shrink: 0;
  padding: 4px 9px; border-radius: 6px;
  font-size: 12px; font-weight: 800;
  white-space: nowrap;
}
.dd-deadline { background: rgba(225,29,72,.16); color: var(--accent); }
.light .dd-deadline { background: rgba(79,70,229,.14); }
.dd-exam     { background: rgba(59,130,246,.16); color: #60a5fa; }
.light .dd-exam { color: #2563eb; background: rgba(37,99,235,.12); }
.dd-result   { background: rgba(16,185,129,.16); color: #34d399; }
.light .dd-result { color: #059669; background: rgba(5,150,105,.12); }

.dday-info {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.dday-name {
  font-size: 13px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dday-date {
  font-size: 12px; color: var(--muted);
}

.dday-num {
  flex-shrink: 0;
  font-size: 18px; font-weight: 800;
  color: var(--muted2); letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.dd-urgent { color: var(--accent); }
.hero-bg-blob {
  position: absolute; top: -100px; left: 50%; transform: translateX(-50%);
  width: 900px; height: 500px;
  background: radial-gradient(ellipse at center, var(--a-glow) 0, transparent 65%);
  pointer-events: none; z-index: 0;
}
@keyframes heroFloat {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

/* ═══════════════════════════════════════════════════════════════
   KPI STATS
═══════════════════════════════════════════════════════════════ */
.kpi-section { padding: 0 0 88px; }
.kpi-grid {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 16px;
}
.kpi-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r); padding: 26px 22px;
  position: relative; overflow: hidden;
  transition: transform .15s, box-shadow .15s;
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.kpi-card::after {
  content: ''; position: absolute; top: -20px; right: -20px;
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--_kc, var(--accent)); opacity: .13; pointer-events: none;
}
.kpi-red    { --_kc: #e11d48; }
.kpi-blue   { --_kc: #3b82f6; }
.kpi-purple { --_kc: #8b5cf6; }
.kpi-green  { --_kc: #10b981; }
.kpi-label {
  font-size: 13px; font-weight: 700; color: var(--muted);
  letter-spacing: .04em; text-transform: uppercase;
  display: block; margin-bottom: 12px;
}
.kpi-num {
  display: block; font-size: 34px; font-weight: 800;
  letter-spacing: -.04em; line-height: 1; color: var(--text); margin-bottom: 8px;
}
.kpi-num span { font-size: 17px; opacity: .55; font-weight: 600; margin-left: 2px; }
.kpi-sub { font-size: 13px; color: var(--muted); }

/* ═══════════════════════════════════════════════════════════════
   COMPETITION
═══════════════════════════════════════════════════════════════ */
/* page hero (서브페이지) */
.page-hero {
  padding: 56px 0 36px;
  text-align: center;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.page-hero h1 {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 800; letter-spacing: -.035em;
  color: var(--text); margin-bottom: 8px;
}
.page-hero h1 em { font-style: normal; color: var(--accent); }
.page-hero p { font-size: 15px; color: var(--muted); }

/* 랜딩 프리뷰 카드 (메인 페이지) */
.comp-preview-section { padding: 88px 0; }
.comp-preview-card {
  display: grid; grid-template-columns: 1.4fr 1fr;
  gap: 32px; align-items: center;
  padding: 36px;
  transition: transform .2s, border-color .2s, box-shadow .2s;
  cursor: pointer;
}
.comp-preview-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 16px 40px rgba(0,0,0,.18);
}
.cpc-left h3 {
  font-size: 22px; font-weight: 800; color: var(--text);
  margin-top: 14px; margin-bottom: 8px;
}
.cpc-left p {
  font-size: 14px; color: var(--muted); line-height: 1.7;
  margin-bottom: 18px;
}
.cpc-icons { display: flex; gap: 10px; font-size: 26px; }
.cpc-cta {
  display: inline-flex; align-items: center;
  font-size: 14px; font-weight: 800; color: var(--accent);
}
.cpc-right {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 12px;
}
.cpc-stat {
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: 10px; padding: 18px 12px; text-align: center;
}
.cpc-stat strong {
  display: block; font-size: 30px; font-weight: 800;
  color: var(--accent); line-height: 1; margin-bottom: 4px;
  letter-spacing: -.03em;
}
.cpc-stat span { font-size: 12px; color: var(--muted); font-weight: 600; }

/* ── 홈 경쟁률 프리뷰 (new) ── */
.cp-qual {
  display: flex; gap: 0; margin-bottom: 18px;
  border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; width: fit-content;
}
.cp-qual-btn {
  padding: 0 20px; height: 36px;
  font-size: 13px; font-weight: 700;
  background: transparent; color: var(--muted2);
  border: none; cursor: pointer;
  transition: background .15s, color .15s;
}
.cp-qual-btn.active { background: var(--accent); color: #fff; }
.cp-qual-btn:not(.active):hover { background: var(--panel-hover); color: var(--text); }

.cp-widget {
  padding: 0; overflow: hidden;
}

/* KPI bar */
.cp-kpi {
  display: flex; align-items: center; gap: 0;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.cp-kpi-item {
  display: flex; flex-direction: column; gap: 3px; flex: 1; text-align: center;
}
.cp-kpi-item strong {
  font-size: 22px; font-weight: 800; color: var(--accent);
  letter-spacing: -.03em; line-height: 1;
}
.cp-kpi-item span { font-size: 12px; color: var(--muted); font-weight: 600; }
.cp-kpi-sep {
  width: 1px; height: 36px; background: var(--line);
}

/* body */
.cp-body {
  display: grid; grid-template-columns: 1fr auto 1fr;
  gap: 0;
}
.cp-col { padding: 22px 24px; }
.cp-divider {
  width: 1px; background: var(--line); margin: 16px 0;
}
.cp-col-title {
  font-size: 12px; font-weight: 800; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
}
.cp-year {
  font-size: 11px; font-weight: 700; color: var(--accent);
  background: rgba(225,29,72,.10); padding: 2px 7px; border-radius: 99px;
  letter-spacing: 0;
}

/* TOP5 ranking */
.cp-rank { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.cp-rank-item {
  display: flex; align-items: center; gap: 10px;
}
.cp-medal {
  width: 22px; height: 22px; border-radius: 50%;
  font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.cp-medal-g { background: #f59e0b; color: #fff; }
.cp-medal-s { background: #94a3b8; color: #fff; }
.cp-medal-b { background: #a16207; color: #fff; }
.cp-medal-n { background: var(--panel-hover); color: var(--muted2); }
.cp-rank-body { flex: 1; min-width: 0; }
.cp-rank-name {
  font-size: 13px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 4px;
}
.cp-rank-bar-wrap {
  height: 4px; background: var(--line); border-radius: 2px; overflow: hidden;
}
.cp-rank-bar {
  height: 100%; background: var(--accent); border-radius: 2px;
  transition: width .4s ease;
}
.cp-rank-right {
  display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
}
.cp-rank-ratio {
  font-size: 13px; font-weight: 800; color: var(--text); white-space: nowrap;
}

/* changes */
.cp-changes { display: flex; flex-direction: column; gap: 14px; }
.cp-change-group { display: flex; flex-direction: column; gap: 6px; }
.cp-change-label {
  font-size: 11px; font-weight: 800; letter-spacing: .05em;
  margin-bottom: 2px;
}
.up-label { color: #10b981; }
.dn-label { color: #f43f5e; }
.cp-change-row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 8px; border-radius: 8px;
  background: var(--surface);
}
.cp-change-name {
  font-size: 12px; font-weight: 600; color: var(--text);
  flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cp-change-val {
  font-size: 12px; font-weight: 800; white-space: nowrap;
}
.cp-change-ratio {
  font-size: 11px; color: var(--muted); white-space: nowrap;
}
.cp-up { color: #10b981; }
.cp-dn { color: #f43f5e; }
.cp-delta { font-size: 11px; font-weight: 700; }

/* CTA */
.cp-cta {
  display: block; text-align: center;
  padding: 14px 24px;
  border-top: 1px solid var(--line);
  font-size: 13px; font-weight: 700; color: var(--accent);
  transition: background .15s;
}
.cp-cta:hover { background: rgba(225,29,72,.06); }

/* responsive */
@media (max-width: 700px) {
  .cp-body { grid-template-columns: 1fr; }
  .cp-divider { width: 100%; height: 1px; margin: 0; }
  .cp-kpi { flex-wrap: wrap; gap: 12px; }
  .cp-kpi-sep { display: none; }
}

.comp-section {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* 전용 페이지의 comp-section */
.comp-section-page {
  padding: 36px 0 80px;
  background: var(--bg);
  border-top: none;
}

/* topbar: 전형 segment + 탭 */
.comp-topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding: 14px 18px; margin-bottom: 18px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r);
  backdrop-filter: blur(14px);
}
.light .comp-topbar { background: hsla(0,0%,100%,.85); }

/* tabs */
.comp-tabs {
  display: inline-flex; gap: 3px;
  background: var(--bg2); border-radius: var(--rs); padding: 4px;
}
.comp-tabs button {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; font-size: 13px; font-weight: 700;
  border-radius: 6px; color: var(--muted2);
  transition: all .15s;
}
.comp-tabs button span { font-size: 14px; line-height: 1; }
.comp-tabs button:hover { color: var(--text); }
.comp-tabs button.active {
  background: var(--accent); color: #fff;
  box-shadow: 0 2px 8px var(--a-glow);
}

/* tab panel container */
.tab-panel {
  display: flex; flex-direction: column; gap: 14px;
  min-height: 400px;
}

/* per-tab control bar */
.tab-controls {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 18px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r);
}
.tab-control-group {
  display: flex; align-items: center; gap: 8px;
}
.tab-control-group label {
  font-size: 12px; font-weight: 800; color: var(--muted2);
  letter-spacing: .05em; text-transform: uppercase;
}
.tab-control-group select,
.tab-control-group input[type="text"] {
  height: 36px; padding: 0 12px;
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: var(--rs); color: var(--text); font-size: 13px;
}
.tab-control-group input[type="text"] { min-width: 240px; }
.tab-control-group select:focus,
.tab-control-group input:focus {
  outline: 2px solid var(--accent); outline-offset: 1px;
}
.year-range-sep { font-size: 13px; color: var(--muted); font-weight: 700; }

/* result wrapper */
.tab-result { display: flex; flex-direction: column; gap: 14px; }
.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--muted); font-size: 14px;
  background: var(--panel); border: 1px dashed var(--line);
  border-radius: var(--r);
}
.empty-state-icon { font-size: 36px; opacity: .4; margin-bottom: 12px; }

/* stream pills */
.stream-pill {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 99px;
  font-size: 12px; font-weight: 700;
}
.st-인문 { background: rgba(99,102,241,.18); color: #818cf8; }
.st-자연 { background: rgba(16,185,129,.18); color: #34d399; }
.st-예체능 { background: rgba(245,158,11,.18); color: #fbbf24; }
.st-기타 { background: rgba(148,163,184,.18); color: #cbd5e1; }



/* 4-col KPI */
.ckpi-grid-4 {
  display: grid; grid-template-columns: repeat(4,1fr);
  gap: 12px; margin-bottom: 18px;
}
.ckpi-card {
  padding: 18px 20px 16px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r); position: relative; overflow: hidden;
  transition: transform .15s;
}
.ckpi-card:hover { transform: translateY(-2px); }
.ckpi-card::after {
  content: ''; position: absolute; top: -14px; right: -14px;
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--accent); opacity: .10; pointer-events: none;
}
.ckpi-card.ckpi-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-color: transparent;
  box-shadow: 0 4px 16px var(--a-glow);
}
.ckpi-card.ckpi-accent .ckpi-label,
.ckpi-card.ckpi-accent .ckpi-val,
.ckpi-card.ckpi-accent .ckpi-sub { color: #fff !important; }
.ckpi-label {
  font-size: 12px; font-weight: 700; color: var(--muted2);
  letter-spacing: .05em; text-transform: uppercase;
  margin-bottom: 8px; display: block;
}
.ckpi-val {
  font-size: 26px; font-weight: 800;
  letter-spacing: -.03em; line-height: 1;
  color: var(--text); display: block;
}
.ckpi-val small { font-size: 13px; font-weight: 600; opacity: .65; margin-left: 2px; }
.ckpi-sub { margin-top: 7px; font-size: 13px; font-weight: 600; color: var(--muted); display: block; }
.ckpi-up { color: #10b981 !important; }
.ckpi-dn { color: #f43f5e !important; }

/* chart cards */
.chart-card-full {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r); padding: 22px 24px;
  backdrop-filter: blur(14px); margin-bottom: 14px;
}
.light .chart-card-full { background: hsla(0,0%,100%,.9); }
.chart-card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 18px; gap: 8px;
}
.chart-title { font-size: 14px; font-weight: 700; color: var(--text); }
.chart-desc { font-size: 13px; color: var(--muted); margin-top: 3px; }
.chart-body-full { position: relative; height: 240px; }

/* table */
.tbl-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.tbl-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; gap: 10px;
}
.tbl-controls { display: flex; gap: 8px; flex-wrap: wrap; }
.tbl-input {
  height: 34px; padding: 0 12px; width: 220px;
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: var(--rs); color: var(--text); font-size: 13px;
}
.tbl-input::placeholder { color: var(--muted); }
.tbl-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.tbl-select {
  height: 34px; padding: 0 10px;
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: var(--rs); color: var(--text); font-size: 13px;
}
.tbl-wrap { overflow-x: auto; }
.comp-table { width: 100%; border-collapse: collapse; }
.comp-table thead tr { background: hsla(0,0%,100%,.025); }
.light .comp-table thead tr { background: rgba(15,23,42,.04); }
.comp-table th {
  padding: 10px 16px; font-size: 11px; font-weight: 700;
  color: var(--muted); letter-spacing: .05em; text-transform: uppercase;
  text-align: left; white-space: nowrap;
  border-bottom: 1px solid var(--line2);
}
.comp-table td {
  padding: 12px 16px; font-size: 13px; color: var(--text);
  border-bottom: 1px solid var(--line); vertical-align: middle;
}
.comp-table tbody tr:last-child td { border-bottom: none; }
.comp-table tbody tr:hover { background: var(--panel-h); }
.tbl-rank { color: var(--muted); font-weight: 700; font-size: 13px; }
.tbl-name { font-weight: 800; font-size: 14px; }
.tbl-dept { color: var(--muted2); font-size: 13px; }
.tbl-num  { color: var(--muted2); font-weight: 600; text-align: right; }
.tbl-ratio { font-weight: 800; color: var(--accent); font-size: 14px; }
.delta-up { color: #10b981; font-weight: 700; font-size: 13px; }
.delta-dn { color: #f43f5e; font-weight: 700; font-size: 13px; }
.delta-eq { color: var(--muted); font-size: 13px; }
.tbl-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted);
}

/* ═══════════════════════════════════════════════════════════════
   RECRUITMENT (모집요강)
═══════════════════════════════════════════════════════════════ */
.recruit-controls {
  display: flex; gap: 12px; align-items: center;
  margin-bottom: 32px;
}
.search-input {
  flex: 1; height: 48px; padding: 0 18px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--rs); color: var(--text); font-size: 15px;
  transition: border-color .15s;
}
.search-input::placeholder { color: var(--muted); }
.search-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.region-select {
  height: 48px; padding: 0 16px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--rs); color: var(--text); font-size: 15px;
  flex-shrink: 0; min-width: 130px;
  cursor: pointer;
}
.region-select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

/* 4-col univ grid */
.univ-grid {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 18px;
}
.univ-card {
  padding: 18px 20px; display: flex; flex-direction: column;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.light .univ-card { box-shadow: 0 1px 4px rgba(15,23,42,.08); }
.univ-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,.18);
  border-color: var(--accent);
}
.univ-card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 10px; gap: 8px;
}
.univ-name {
  font-size: 18px; font-weight: 800; color: var(--text); line-height: 1.25;
  margin: 0 0 14px;
}
.univ-tier {
  flex-shrink: 0;
  padding: 3px 9px; border-radius: 6px;
  font-size: 11px; font-weight: 800;
}
.tier-sky    { background: rgba(99,102,241,.18); color: #818cf8; }
.tier-top    { background: rgba(245,158,11,.15);  color: #fbbf24; }
.tier-local  { background: rgba(16,185,129,.15);  color: #34d399; }

.univ-elements {
  font-size: 13px; color: var(--muted2); font-weight: 600;
  margin-bottom: 14px; flex: 1;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.univ-tag {
  font-size: 11px; font-weight: 800;
  padding: 2px 8px; border-radius: 99px;
  background: rgba(225,29,72,.12); color: var(--accent);
}

/* 개선된 모집요강 카드 정보 리스트 */
.univ-info-list {
  list-style: none; padding: 0; margin: 0 0 14px;
  display: flex; flex-direction: column; gap: 5px; flex: 1;
}
.univ-info-list li {
  display: flex; gap: 8px; font-size: 12.5px; align-items: baseline;
}
.uil-key {
  flex-shrink: 0; width: 82px;
  color: var(--muted); font-weight: 700; font-size: 11.5px;
}
.uil-val { color: var(--muted2); font-weight: 500; line-height: 1.4; }
.uil-na  { color: var(--muted); font-style: italic; font-size: 11.5px; }

.univ-detail-list {
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 18px; flex: 1;
}
.univ-detail-list li {
  display: grid; grid-template-columns: 70px 1fr; gap: 8px;
  font-size: 13px; align-items: baseline;
}
.univ-detail-list li strong {
  color: var(--muted); font-weight: 700; font-size: 12px; white-space: nowrap;
}
.univ-detail-list li span { color: var(--text); line-height: 1.5; }

/* more wrap */
.univ-more-wrap { text-align: center; margin-top: 36px; }

/* ═══════════════════════════════════════════════════════════════
   ADMISSION METHODS HOME SECTION
═══════════════════════════════════════════════════════════════ */
.methods-section { padding: 88px 0; }
.methods-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
@media (max-width: 700px) { .methods-cards { grid-template-columns: 1fr; } }

.method-card {
  padding: 24px 22px;
  display: flex; flex-direction: column; gap: 10px;
  transition: transform .18s, border-color .18s;
}
.method-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.method-icon { font-size: 28px; line-height: 1; }
.method-card h3 {
  font-size: 17px; font-weight: 800; color: var(--text); letter-spacing: -.02em;
}
.method-card p {
  font-size: 13px; color: var(--muted); line-height: 1.65; flex: 1;
}
.method-tag {
  font-size: 11px; font-weight: 700; color: var(--accent);
  background: rgba(225,29,72,.10); padding: 4px 10px;
  border-radius: 99px; width: fit-content;
}
.methods-cta { text-align: center; }
.btn-methods-more {
  display: inline-flex; align-items: center;
  height: 42px; padding: 0 24px;
  border: 1px solid var(--line); border-radius: 12px;
  font-size: 14px; font-weight: 700; color: var(--accent);
  transition: background .15s, border-color .15s;
}
.btn-methods-more:hover { background: rgba(225,29,72,.06); border-color: var(--accent); }

/* ═══════════════════════════════════════════════════════════════
   PROCESS
═══════════════════════════════════════════════════════════════ */
.process-section {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.timeline {
  max-width: 760px; margin: 0 auto;
  position: relative; padding-left: 60px;
  display: flex; flex-direction: column; gap: 0;
}
.timeline::before {
  content: ''; position: absolute; left: 20px; top: 14px; bottom: 14px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent) 0, var(--a-dim) 100%);
  border-radius: 2px;
}
.tl-item { position: relative; padding-bottom: 28px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-badge {
  position: absolute; left: -50px; top: 0;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #fff;
  box-shadow: 0 0 0 4px var(--a-dim); z-index: 1;
}
.tl-card {
  padding: 22px 24px;
  transition: transform .18s, border-color .18s;
}
.tl-card:hover { transform: translateX(4px); border-color: var(--accent); }
.tl-icon { font-size: 24px; margin-bottom: 10px; }
.tl-card h3 {
  font-size: 18px; font-weight: 800; color: var(--text); margin-bottom: 8px;
}
.tl-card p {
  font-size: 14px; color: var(--muted); line-height: 1.7; margin-bottom: 14px;
}
.tl-list { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.tl-list li {
  font-size: 13px; color: var(--muted2);
  display: flex; align-items: flex-start; gap: 7px;
}
.tl-list li::before { content: '→'; color: var(--accent); font-size: 12px; flex-shrink: 0; margin-top: 1px; }
.tl-period {
  display: inline-block; padding: 3px 11px; border-radius: 99px;
  background: var(--a-dim); color: var(--accent);
  font-size: 12px; font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════
   EXAM
═══════════════════════════════════════════════════════════════ */
.exam-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; }
.exam-card {
  padding: 24px; display: flex; flex-direction: column;
  transition: transform .18s, border-color .18s;
}
.exam-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.exam-icon { font-size: 30px; margin-bottom: 16px; }
.exam-body { flex: 1; display: flex; flex-direction: column; }
.exam-body h3 {
  font-size: 16px; font-weight: 800; color: var(--text); margin-bottom: 8px;
}
.exam-body p {
  font-size: 13px; color: var(--muted); line-height: 1.7; flex: 1; margin-bottom: 16px;
}
.exam-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.exam-arrow { color: var(--accent); font-size: 18px; font-weight: 700; transition: transform .15s; }
.exam-card:hover .exam-arrow { transform: translateX(5px); }

/* ═══════════════════════════════════════════════════════════════
   UNIVERSITY RECOMMENDATION HOME SECTION
═══════════════════════════════════════════════════════════════ */
.recommend-home-section {
  padding: 88px 0;
  background:
    radial-gradient(circle at 14% 22%, rgba(79,70,229,.14), transparent 32%),
    radial-gradient(circle at 86% 70%, rgba(225,29,72,.10), transparent 30%);
}

.recommend-home-card {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  gap: 22px;
  align-items: stretch;
  padding: 28px;
}

.recommend-copy {
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.recommend-copy h3 {
  margin: 14px 0 14px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.16;
  letter-spacing: -.035em;
  color: var(--text);
}

.recommend-copy p {
  max-width: 620px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.recommend-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.recommend-mini {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.rec-mini-card {
  position: relative;
  padding: 20px 20px 20px 74px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.035);
}

.light .rec-mini-card { background: rgba(255,255,255,.72); }

.rec-mini-card span {
  position: absolute;
  left: 20px;
  top: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: var(--a-dim);
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.rec-mini-card strong {
  display: block;
  color: var(--text);
  font-size: 15px;
  font-weight: 850;
  margin-bottom: 5px;
}

.rec-mini-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════
   COMMUNITY
═══════════════════════════════════════════════════════════════ */
.community-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 22px; }
.comm-posts { padding: 24px; }
.comm-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.comm-title { font-size: 15px; font-weight: 800; color: var(--text); }
.comm-more { font-size: 13px; color: var(--accent); font-weight: 700; transition: opacity .15s; }
.comm-more:hover { opacity: .75; }
.post-list { display: flex; flex-direction: column; }
.post-item {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 0; border-bottom: 1px solid var(--line);
}
.post-item:last-child { border-bottom: none; }
.post-badge {
  flex-shrink: 0; padding: 2px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 700;
}
.badge-notice { background: var(--a-dim); color: var(--accent); }
.badge-info   { background: rgba(59,130,246,.14); color: #60a5fa; }
.badge-qna    { background: rgba(16,185,129,.14); color: #34d399; }
.post-title {
  flex: 1; font-size: 14px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color .15s;
}
.post-title:hover { color: var(--accent); }
.post-date { font-size: 13px; color: var(--muted); flex-shrink: 0; }

/* calendar */
.comm-calendar { padding: 24px; }
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-nav button {
  width: 26px; height: 26px; border-radius: var(--rs);
  background: var(--bg2); border: 1px solid var(--line);
  color: var(--muted2); font-size: 15px;
  display: flex; align-items: center; justify-content: center; transition: all .12s;
}
.cal-nav button:hover { background: var(--panel-h); color: var(--text); }
#calMonthLabel { font-size: 13px; font-weight: 700; color: var(--text); }
.calendar-widget { margin: 14px 0 14px; }
.cal-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 2px; }
.cal-day-name {
  text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); padding: 4px 0;
}
.cal-day-name:first-child { color: #f43f5e; }
.cal-day-name:last-child  { color: #60a5fa; }
.cal-cell {
  text-align: center; font-size: 13px; font-weight: 600; color: var(--muted2);
  padding: 5px 2px; border-radius: var(--rs);
  cursor: default; position: relative; transition: background .12s;
}
.cal-cell:hover:not(.cal-empty) { background: var(--panel-h); color: var(--text); }
.cal-today { background: var(--a-dim); color: var(--accent); font-weight: 800; }
.cal-dot {
  position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--accent);
}
.event-red   .cal-dot { background: #f43f5e; }
.event-blue  .cal-dot { background: #60a5fa; }
.event-green .cal-dot { background: #34d399; }
.cal-events { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.cal-event-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: var(--rs);
}
.cev-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.event-red   .cev-dot { background: #f43f5e; box-shadow: 0 0 6px rgba(244,63,94,.4); }
.event-blue  .cev-dot { background: #60a5fa; box-shadow: 0 0 6px rgba(96,165,250,.4); }
.event-green .cev-dot { background: #34d399; box-shadow: 0 0 6px rgba(52,211,153,.4); }
.cal-event-item div { flex: 1; min-width: 0; }
.cal-event-item strong { display: block; font-size: 13px; font-weight: 700; color: var(--text); }
.cal-event-item span { font-size: 13px; color: var(--muted); }
.cev-date { font-size: 13px; font-weight: 700; color: var(--muted2); flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════════
   CTA
═══════════════════════════════════════════════════════════════ */
.cta-section { background: var(--surface); border-top: 1px solid var(--line); }
.cta-card { padding: 52px 44px; text-align: center; }
.cta-copy h2 {
  font-size: clamp(24px, 3vw, 34px); font-weight: 800;
  letter-spacing: -.03em; margin-bottom: 10px;
}
.cta-copy p { font-size: 15px; color: var(--muted); margin-bottom: 28px; }
.cta-form {
  display: flex; gap: 10px; max-width: 500px; margin: 0 auto 12px;
}
.cta-form input[type="email"] {
  flex: 1; height: 48px; padding: 0 18px;
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: var(--rs); color: var(--text); font-size: 14px;
}
.cta-form input[type="email"]::placeholder { color: var(--muted); }
.cta-form input[type="email"]:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.cta-form input.input-error { border-color: #f43f5e; }
.cta-form .btn-primary { flex-shrink: 0; height: 48px; }
.cta-note { font-size: 13px; color: var(--muted); }

/* ═══════════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════════ */
.site-footer { border-top: 1px solid var(--line); padding: 52px 0 28px; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr;
  gap: 52px; margin-bottom: 40px;
}
.footer-brand .logo { margin-bottom: 14px; }
.footer-brand p { font-size: 13px; color: var(--muted); line-height: 1.75; max-width: 240px; margin-bottom: 18px; }
.social-links { display: flex; gap: 8px; }
.social-links a {
  width: 34px; height: 34px; border-radius: var(--rs);
  background: var(--panel); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: var(--muted2); transition: all .15s;
}
.social-links a:hover { background: var(--a-dim); color: var(--accent); border-color: var(--accent); }
.footer-links h4 {
  font-size: 12px; font-weight: 800; color: var(--text);
  letter-spacing: .06em; text-transform: uppercase; margin-bottom: 16px;
}
.footer-links ul { display: flex; flex-direction: column; gap: 10px; }
.footer-links li a {
  font-size: 13px; color: var(--muted); transition: color .15s;
}
.footer-links li a:hover { color: var(--text); }
.footer-bottom {
  padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted);
}

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD PAGE (competition.html)
═══════════════════════════════════════════════════════════════ */
body.page-dashboard {
  --bg: #0a0e1a;
  --bg2: #111827;
  --panel: rgba(22, 31, 48, .72);
  --panel-h: rgba(30, 41, 59, .88);
  --surface: rgba(255,255,255,.045);
  --line: rgba(255,255,255,.085);
  --line2: rgba(255,255,255,.16);
  --text: #f8fafc;
  --muted: #64748b;
  --muted2: #94a3b8;
  --accent: #3b82f6;
  --accent2: #8b5cf6;
  --a-dim: rgba(59,130,246,.14);
  --a-glow: rgba(59,130,246,.26);
  background-color: var(--bg);
  background-image:
    radial-gradient(at 0% 0%, rgba(59,130,246,.12) 0, transparent 42%),
    radial-gradient(at 100% 0%, rgba(139,92,246,.11) 0, transparent 38%),
    radial-gradient(at 100% 100%, rgba(16,185,129,.08) 0, transparent 40%),
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: auto, auto, auto, 42px 42px, 42px 42px;
  background-attachment: fixed;
}
.light body.page-dashboard,
html.light body.page-dashboard {
  --bg: #f8fafc;
  --bg2: rgba(255,255,255,.72);
  --panel: rgba(255,255,255,.74);
  --panel-h: rgba(255,255,255,.9);
  --surface: rgba(15,23,42,.045);
  --line: rgba(15,23,42,.08);
  --line2: rgba(15,23,42,.16);
  --text: #0f172a;
  --muted: #64748b;
  --muted2: #475569;
  --accent: #4f46e5;
  --accent2: #8b5cf6;
  --a-dim: rgba(79,70,229,.10);
  --a-glow: rgba(79,70,229,.16);
  background-image:
    radial-gradient(at 0% 0%, rgba(99,102,241,.08) 0, transparent 44%),
    radial-gradient(at 100% 0%, rgba(244,63,94,.04) 0, transparent 42%),
    radial-gradient(at 100% 100%, rgba(16,185,129,.055) 0, transparent 40%);
}

.page-dashboard .site-header {
  height: 68px;
  background: rgba(10,14,26,.78);
  border-bottom-color: rgba(255,255,255,.08);
}
.light .page-dashboard .site-header { background: rgba(248,250,252,.82); }
.page-dashboard .header-inner {
  width: min(1680px, calc(100% - 32px));
}
.dashboard-titlebar {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-left: 18px;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}
.dashboard-titlebar strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.2;
}
.dashboard-titlebar span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
}
.header-data-chip {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted2);
  background: var(--surface);
  font-size: 13px;
  font-weight: 700;
}

.dash-wrap {
  display: grid;
  grid-template-columns: 304px minmax(0, 1fr);
  gap: 16px;
  max-width: 1680px;
  margin: 0 auto;
  padding: 16px 16px 52px;
  align-items: start;
}

/* ── Sidebar ── */
.dash-sidebar {
  position: sticky; top: 84px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px 16px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 60px rgba(0,0,0,.22);
}
.light .dash-sidebar { background: hsla(0,0%,100%,.88); }
.dash-sidebar::-webkit-scrollbar { width: 6px; }
.dash-sidebar::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 3px; }

.dash-sidebar-close {
  display: none;
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px; border-radius: var(--rs);
  background: var(--panel-h); color: var(--text);
  font-size: 14px;
}

/* reset 버튼 */
.dash-reset-all {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 12px 14px;
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: var(--rs);
  font-size: 13px; font-weight: 800; color: var(--text);
  transition: all .15s;
  margin-bottom: 18px;
}
.dash-reset-all small {
  font-size: 11px; font-weight: 600; color: var(--muted);
  padding: 2px 8px; background: var(--panel);
  border-radius: 99px;
}
.dash-reset-all:hover { background: var(--a-dim); color: var(--accent); border-color: var(--accent); }

/* filter block */
.filter-block {
  padding-bottom: 16px; margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.filter-block:last-child { border-bottom: none; margin-bottom: 0; }
.filter-label {
  font-size: 12px; font-weight: 800; color: var(--muted);
  letter-spacing: .06em; text-transform: uppercase;
  margin-bottom: 10px;
  display: flex; align-items: center; justify-content: space-between;
}
.filter-count {
  font-size: 12px; font-weight: 700;
  color: var(--accent); background: var(--a-dim);
  padding: 2px 8px; border-radius: 99px;
}

/* segment pill */
.seg-pill {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3px; background: var(--bg2);
  border-radius: var(--rs); padding: 3px;
}
.seg-pill button {
  padding: 7px 10px; font-size: 13px; font-weight: 700;
  color: var(--muted2); border-radius: 6px;
  transition: all .15s;
}
.seg-pill button.active {
  background: var(--accent); color: #fff;
  box-shadow: 0 2px 6px var(--a-glow);
}

/* year range */
.year-range-wrap { position: relative; padding: 4px 6px 0; }
.year-range-vals {
  display: flex; justify-content: space-between;
  font-size: 13px; font-weight: 800; color: var(--accent);
  margin-bottom: 6px;
}
.year-range-track {
  position: relative; height: 24px;
}
.year-range-track::before {
  content: ''; position: absolute; left: 0; right: 0; top: 11px;
  height: 4px; background: var(--bg2); border-radius: 2px;
}
.year-range-track input[type="range"] {
  position: absolute; left: 0; right: 0; top: 4px;
  width: 100%; height: 16px;
  background: transparent;
  pointer-events: none;
  -webkit-appearance: none; appearance: none;
}
.year-range-track input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); border: 2px solid #fff;
  cursor: pointer; pointer-events: auto;
  box-shadow: 0 0 0 1px var(--accent);
}
.year-range-track input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); border: 2px solid #fff;
  cursor: pointer; pointer-events: auto;
}
.year-range-ticks {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--muted); margin-top: 4px;
}

/* search input */
.filter-search {
  width: 100%; height: 34px; padding: 0 12px;
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: var(--rs); color: var(--text);
  font-size: 12px;
  margin-bottom: 8px;
}
.filter-search::placeholder { color: var(--muted); }
.filter-search:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }

/* uni tree */
.uni-tree { max-height: 220px; overflow-y: auto; }
.uni-tree::-webkit-scrollbar { width: 4px; }
.uni-tree::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 2px; }
.uni-group { margin-bottom: 4px; }
.uni-group-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 8px; cursor: pointer;
  border-radius: var(--rs);
  font-size: 13px; font-weight: 700; color: var(--text);
  transition: background .12s;
}
.uni-group-head:hover { background: var(--panel-h); }
.uni-group-toggle { font-size: 12px; color: var(--muted); }
.uni-group-list { padding-left: 8px; }
.uni-check {
  display: flex; align-items: center; gap: 7px;
  padding: 5px 8px; border-radius: var(--rs);
  font-size: 13px; cursor: pointer;
  transition: background .12s;
}
.uni-check:hover { background: var(--panel-h); }
.uni-check input { margin: 0; cursor: pointer; accent-color: var(--accent); }
.uni-check.active { background: var(--a-dim); color: var(--accent); font-weight: 700; }

.filter-row-buttons { display: flex; gap: 6px; margin-top: 8px; }
.btn-tiny {
  flex: 1; height: 28px; padding: 0 8px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--rs); color: var(--muted2);
  font-size: 12px; font-weight: 700; cursor: pointer;
  transition: all .12s;
}
.btn-tiny:hover { background: var(--a-dim); color: var(--accent); border-color: var(--accent); }

/* dept popular chips */
.dept-popular {
  display: flex; flex-wrap: wrap; gap: 4px;
  align-items: center; margin-bottom: 8px;
}
.popular-label { font-size: 12px; color: var(--muted); font-weight: 700; margin-right: 2px; }
.dept-chip {
  padding: 3px 9px; font-size: 12px; font-weight: 700;
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: 99px; color: var(--muted2);
  cursor: pointer; transition: all .12s;
}
.dept-chip:hover { background: var(--a-dim); color: var(--accent); border-color: var(--accent); }
.dept-chip.active {
  background: var(--accent); color: #fff;
  border-color: transparent;
}
.dept-selected { display: flex; flex-wrap: wrap; gap: 4px; }
.dept-selected-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 4px 3px 9px; font-size: 12px; font-weight: 700;
  background: var(--accent); color: #fff;
  border-radius: 99px;
}
.dept-selected-chip button {
  width: 16px; height: 16px; border-radius: 50%;
  background: rgba(255,255,255,.25); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; line-height: 1;
}

/* stream check */
.stream-checks { display: flex; gap: 6px; }
.stream-check {
  flex: 1; display: flex; align-items: center; gap: 5px;
  padding: 8px 10px; border-radius: var(--rs);
  font-size: 13px; font-weight: 700; cursor: pointer;
  border: 1px solid var(--line);
  background: var(--bg2);
  transition: all .12s;
}
.stream-check input { margin: 0; accent-color: var(--accent); }
.stream-check:hover { background: var(--panel-h); }
.stream-check.st-인문 { color: #818cf8; }
.stream-check.st-자연 { color: #34d399; }
.stream-check.st-예체능 { color: #fbbf24; }

.check-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--text);
}
.check-row input { margin: 0; accent-color: var(--accent); }

/* ── Main area ── */
.dash-main { min-width: 0; }

.dash-hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 22px;
  margin-bottom: 16px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(59,130,246,.16), rgba(139,92,246,.10) 48%, rgba(16,185,129,.08)),
    var(--panel);
  box-shadow: 0 24px 70px rgba(0,0,0,.22);
  backdrop-filter: blur(18px);
  overflow: hidden;
}
.dash-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  margin-bottom: 14px;
  border: 1px solid rgba(99,102,241,.28);
  border-radius: 999px;
  background: rgba(99,102,241,.13);
  color: #a5b4fc;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
}
.light .dash-eyebrow { color: #4f46e5; background: rgba(99,102,241,.09); }
.dash-hero-panel h1 {
  color: var(--text);
  font-size: clamp(32px, 3.3vw, 54px);
  line-height: 1.05;
  letter-spacing: 0;
  font-weight: 900;
}
.dash-hero-panel h1 span {
  color: #818cf8;
}
.light .dash-hero-panel h1 span { color: #4f46e5; }
.dash-hero-panel p {
  max-width: 760px;
  margin-top: 16px;
  color: var(--muted2);
  font-size: 15px;
  line-height: 1.7;
}
.dash-hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-self: end;
}
.dash-hero-meta div {
  min-height: 104px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.055);
}
.light .dash-hero-meta div { background: rgba(255,255,255,.62); }
.dash-hero-meta strong {
  color: var(--text);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0;
}
.dash-hero-meta span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.dash-summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.dash-summary-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-height: 126px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 18px 44px rgba(0,0,0,.16);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
  backdrop-filter: blur(18px);
}
.dash-summary-card:hover {
  transform: translateY(-2px);
  background: var(--panel-h);
}
.summary-icon {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 22px;
  font-weight: 900;
}
.dash-summary-card strong {
  display: block;
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
  margin-bottom: 6px;
}
.dash-summary-card p {
  color: var(--muted2);
  font-size: 13px;
  line-height: 1.55;
}
.tone-blue { border-color: rgba(59,130,246,.20); }
.tone-blue .summary-icon { color: #60a5fa; background: rgba(59,130,246,.14); }
.tone-green { border-color: rgba(16,185,129,.20); }
.tone-green .summary-icon { color: #34d399; background: rgba(16,185,129,.14); }
.tone-gold { border-color: rgba(245,158,11,.22); }
.tone-gold .summary-icon { color: #fbbf24; background: rgba(245,158,11,.16); }

.dash-context-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px; margin-bottom: 14px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r); backdrop-filter: blur(18px);
  box-shadow: 0 14px 40px rgba(0,0,0,.14);
}
.light .dash-context-bar { background: hsla(0,0%,100%,.88); }
.context-text {
  font-size: 13px; font-weight: 700; color: var(--text);
  letter-spacing: -.01em;
}
.filter-fab-trigger {
  display: none;
  padding: 7px 14px; font-size: 12px; font-weight: 700;
  background: var(--accent); color: #fff; border-radius: var(--rs);
}

/* ── KPI 4 ── */
.kpi-row-4 {
  display: grid; grid-template-columns: repeat(4,1fr);
  gap: 14px; margin-bottom: 16px;
}
.kpi-tile {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r); padding: 20px 18px;
  text-align: left; cursor: pointer;
  transition: all .15s;
  backdrop-filter: blur(18px);
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  min-height: 138px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 16px 42px rgba(0,0,0,.15);
}
.kpi-tile::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 4px;
  background: #3b82f6;
}
.kpi-tile:nth-child(2)::before { background: #10b981; }
.kpi-tile:nth-child(3)::before { background: #f59e0b; }
.kpi-tile:nth-child(4)::before { background: #8b5cf6; }
.light .kpi-tile { background: hsla(0,0%,100%,.88); }
.kpi-tile:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0,0,0,.14);
}
.kpi-tile.active {
  background: linear-gradient(135deg, rgba(59,130,246,.92), rgba(139,92,246,.88));
  border-color: transparent;
  box-shadow: 0 8px 24px var(--a-glow);
}
.kpi-tile.active .kpi-tile-val,
.kpi-tile.active .kpi-tile-label,
.kpi-tile.active .kpi-tile-sub { color: #fff !important; }
.kpi-tile-val {
  font-size: 30px; font-weight: 900;
  color: var(--text); letter-spacing: -.03em; line-height: 1;
  margin-bottom: 6px;
}
.kpi-tile-val small { font-size: 14px; font-weight: 700; opacity: .7; }
.kpi-tile-label {
  font-size: 13px; font-weight: 800; color: var(--muted);
  letter-spacing: 0;
}
.kpi-tile-sub { font-size: 13px; color: var(--muted2); margin-top: 2px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi-spark { width: 92px; height: 28px; margin-top: auto; }

/* ── Widget grid ── */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}
.w-span-3  { grid-column: span 3; }
.w-span-4  { grid-column: span 4; }
.w-span-6  { grid-column: span 6; }
.w-span-8  { grid-column: span 8; }
.w-span-12 { grid-column: span 12; }

.widget {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r);
  display: flex; flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 48px rgba(0,0,0,.16);
}
.light .widget { background: hsla(0,0%,100%,.88); }
.widget-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 10px; padding: 16px 18px 12px;
}
.widget-title {
  font-size: 14px; font-weight: 900; color: var(--text);
  letter-spacing: -.01em;
}
.widget-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.widget-body { flex: 1; padding: 0 18px 16px; min-height: 0; }
.widget-foot {
  padding: 10px 18px;
  border-top: 1px solid var(--line);
  font-size: 12px; color: var(--muted);
  display: flex; align-items: center; justify-content: space-between;
}

/* chart heights — canvas absolute 처리로 무한 확장 방지 */
.chart-h-260, .chart-h-300, .donut-wrap {
  position: relative; overflow: hidden;
}
.chart-h-260 { height: 288px; }
.chart-h-300 { height: 308px; }
.donut-wrap  { height: 224px; padding: 0 18px; }
.chart-h-260 canvas,
.chart-h-300 canvas,
.donut-wrap canvas {
  position: absolute !important;
  left: 0; top: 0;
  width: 100% !important;
  height: 100% !important;
}
.widget { overflow: hidden; }
.kpi-spark { width: 56px; height: 18px; }
canvas.kpi-spark-canvas { width: 92px !important; height: 28px !important; }
canvas.mover-spark { width: 50px !important; height: 18px !important; }
.donut-legend {
  display: flex; flex-direction: column; gap: 5px;
  padding: 8px 18px 14px;
  font-size: 13px;
}
.donut-leg-item {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 6px; border-radius: var(--rs);
  cursor: pointer; transition: background .12s;
}
.donut-leg-item:hover { background: var(--panel-h); }
.donut-leg-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.donut-leg-label { flex: 1; font-weight: 700; color: var(--text); }
.donut-leg-val { color: var(--muted); font-weight: 600; }

/* metric toggle */
.metric-toggle {
  display: flex; gap: 2px; background: var(--bg2);
  border-radius: var(--rs); padding: 3px;
}
.metric-toggle button {
  padding: 4px 10px; font-size: 12px; font-weight: 700;
  color: var(--muted2); border-radius: 5px;
  transition: all .12s;
}
.metric-toggle button.active {
  background: var(--accent); color: #fff;
}

/* movers list */
.movers-list { display: flex; flex-direction: column; gap: 6px; }
.mover-item {
  display: grid; grid-template-columns: auto 1fr auto; gap: 8px;
  padding: 8px 10px;
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: var(--rs);
  cursor: pointer; transition: all .12s;
  align-items: center;
}
.mover-item:hover {
  border-color: var(--accent);
  background: var(--panel-h);
}
.mover-delta {
  font-size: 13px; font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.mover-delta.up { color: #f43f5e; }
.mover-delta.dn { color: #10b981; }
.mover-info { min-width: 0; }
.mover-name {
  font-size: 13px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mover-sub { font-size: 12px; color: var(--muted); }
.mover-spark { width: 50px; height: 18px; }
.mover-empty {
  padding: 30px 10px; text-align: center;
  font-size: 12px; color: var(--muted);
}
.mover-under { color: #ef4444; font-weight: 800; font-size: 12px; }

/* insights list */
.insights-list { display: flex; flex-direction: column; gap: 8px; }
.insight-card {
  display: flex; gap: 10px; padding: 12px 14px;
  background: var(--bg2); border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--rs);
  cursor: pointer; transition: all .12s;
  align-items: flex-start;
}
.insight-card:hover {
  background: var(--panel-h); border-left-color: var(--accent2);
}
.insight-icon { font-size: 18px; flex-shrink: 0; line-height: 1.2; }
.insight-body { flex: 1; min-width: 0; }
.insight-text {
  font-size: 13px; font-weight: 700; color: var(--text);
  line-height: 1.5;
}
.insight-action {
  font-size: 12px; color: var(--accent); font-weight: 700;
  margin-top: 3px;
}

/* dash table */
.dash-table { width: 100%; border-collapse: collapse; }
.dash-table thead tr { background: hsla(0,0%,100%,.025); }
.light .dash-table thead tr { background: rgba(15,23,42,.04); }
.dash-table th {
  padding: 10px 12px; font-size: 12px; font-weight: 800;
  color: var(--muted); letter-spacing: .05em; text-transform: uppercase;
  text-align: left; white-space: nowrap;
  border-bottom: 1px solid var(--line2);
  position: sticky; top: 0; background: var(--panel);
}
.dash-table td {
  padding: 9px 12px; font-size: 13px; color: var(--text);
  border-bottom: 1px solid var(--line); vertical-align: middle;
}
.dash-table tbody tr { cursor: pointer; transition: background .12s; }
.dash-table tbody tr:hover { background: var(--panel-h); }
.dash-table tbody tr.highlighted {
  background: var(--a-dim);
  box-shadow: inset 3px 0 0 var(--accent);
}
.dash-table tbody tr.under-enrolled {
  background: rgba(244, 63, 94, .08);
}
.dash-table tbody tr.under-enrolled:hover { background: rgba(244, 63, 94, .14); }
.table-wrap { overflow-x: auto; max-height: 420px; overflow-y: auto; }
.tbl-rank-cell {
  width: 28px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 5px; font-size: 12px; font-weight: 800;
}
.rank-gold   { background: rgba(245,158,11,.18); color: #f59e0b; }
.rank-silver { background: rgba(148,163,184,.18); color: #94a3b8; }
.rank-bronze { background: rgba(180,83,9,.18); color: #b45309; }
.rank-other  { background: var(--bg2); color: var(--muted); }
.delta-cell { font-weight: 800; font-size: 12px; }
.delta-cell.up { color: #f43f5e; }
.delta-cell.dn { color: #10b981; }
.delta-cell.eq { color: var(--muted); }

.widget-controls { display: flex; gap: 6px; }
.widget-controls .tbl-input { width: 160px; height: 30px; padding: 0 10px; font-size: 13px; }
.widget-controls .tbl-select { height: 30px; padding: 0 8px; font-size: 13px; }

.pager-controls { display: flex; align-items: center; gap: 8px; }
.pager-controls button { width: 28px; height: 28px; }
#tablePageLbl { font-size: 12px; color: var(--muted); font-weight: 700; min-width: 50px; text-align: center; }

/* empty widget state */
.widget-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 30px 20px; text-align: center;
  color: var(--muted); font-size: 13px; gap: 6px;
  height: 100%;
}
.widget-empty .ee-icon { font-size: 28px; opacity: .4; }

.dash-sidebar-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 180;
  background: rgba(0,0,0,.55);
}

/* page-dashboard 전용 푸터 마진 */
.page-dashboard .site-footer { display: none; }

/* ═══════════════════════════════════════════════════════════════
   SCROLL ANIMATION
═══════════════════════════════════════════════════════════════ */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity .65s ease, transform .65s ease;
  transition-delay: var(--delay, 0s);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .univ-grid { grid-template-columns: repeat(3,1fr); }
}

@media (max-width: 1024px) {
  .main-nav { display: none; }
  .hamburger { display: flex; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-card-wrap { justify-content: flex-start; }
  .kpi-grid { grid-template-columns: repeat(2,1fr); }
  .ckpi-grid-4 { grid-template-columns: repeat(2,1fr); }
  .univ-grid { grid-template-columns: repeat(2,1fr); }
  .exam-grid { grid-template-columns: repeat(2,1fr); }
  .recommend-home-card { grid-template-columns: 1fr; }
  .community-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .comp-preview-card { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  section { padding: 60px 0; }
  .hero { padding: 60px 0 50px; }
  .live-items-wrap .live-item:nth-child(n+3),
  .live-sep:nth-child(n+4) { display: none; }
  .ckpi-grid-4 { grid-template-columns: repeat(2,1fr); }
  .univ-grid { grid-template-columns: repeat(2,1fr); }
  .exam-grid { grid-template-columns: repeat(2,1fr); }
  .cta-form { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: repeat(2,1fr); gap: 10px; }
  .ckpi-grid-4 { grid-template-columns: repeat(2,1fr); }
  .univ-grid { grid-template-columns: 1fr; }
  .exam-grid { grid-template-columns: 1fr; }
  .recommend-home-card { padding: 20px; }
  .recommend-actions { flex-direction: column; }
  .recommend-actions .btn-primary,
  .recommend-actions .btn-ghost { width: 100%; }
  .hero-copy h1 { font-size: clamp(28px, 8vw, 36px); }
}

/* ── Dashboard responsive ── */
@media (max-width: 1200px) {
  .w-span-8 { grid-column: span 12; }
  .w-span-4 { grid-column: span 6; }
  .w-span-6 { grid-column: span 6; }
}
@media (max-width: 1024px) {
  .dash-wrap {
    grid-template-columns: 1fr;
    padding: 14px 16px 40px;
  }
  .dash-sidebar {
    position: fixed; top: 60px; left: 0; bottom: 0;
    width: 320px; max-width: 88vw;
    z-index: 190; max-height: none;
    border-radius: 0;
    transform: translateX(-100%);
    transition: transform .25s ease;
  }
  .dash-sidebar.open { transform: translateX(0); }
  .dash-sidebar.open ~ .dash-sidebar-overlay { display: block; }
  .dash-sidebar-close { display: flex; align-items: center; justify-content: center; }
  .filter-fab-trigger { display: inline-flex; align-items: center; gap: 4px; }
  .w-span-3 { grid-column: span 6; }
  .w-span-4, .w-span-6, .w-span-8 { grid-column: span 12; }
  .kpi-row-4 { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 640px) {
  .w-span-3, .w-span-4, .w-span-6, .w-span-8, .w-span-12 { grid-column: span 12; }
  .kpi-row-4 { grid-template-columns: repeat(2,1fr); gap: 8px; }
  .kpi-tile { padding: 16px 12px; }
  .kpi-tile-val { font-size: 22px; }
  .widget-controls { flex-wrap: wrap; }
  .widget-controls .tbl-input { width: 100%; }
}

/* ── admin button ── */
.admin-btn{
  width:38px;height:38px;border-radius:12px;
  border:1px solid var(--line);background:var(--panel);
  color:var(--muted2);display:flex;align-items:center;justify-content:center;
  cursor:pointer;transition:background .15s,color .15s;flex-shrink:0;
}
.admin-btn:hover{background:var(--panel-h);color:var(--text)}
.admin-btn.logged-in{border-color:rgba(16,185,129,.4)!important;color:#10b981!important}

/* ── paid modal ── */
.paid-overlay{
  display:none;position:fixed;inset:0;
  background:rgba(0,0,0,.55);z-index:9000;
  align-items:center;justify-content:center;padding:20px;
}
.paid-overlay.show{display:flex}
.paid-box{
  background:var(--panel);border:1px solid var(--line);
  border-radius:20px;padding:32px 28px;
  max-width:340px;width:100%;text-align:center;
  box-shadow:0 24px 60px rgba(0,0,0,.4);
}
.light .paid-box{background:#fff}
.paid-box-icon{font-size:38px;margin-bottom:12px;line-height:1}
.paid-box-title{font-size:17px;font-weight:800;color:var(--text);margin-bottom:8px}
.paid-box-desc{font-size:13.5px;color:var(--muted2);line-height:1.7;margin-bottom:22px}
.paid-box-btns{display:flex;gap:8px;justify-content:center}
.btn-paid-primary{padding:10px 24px;border-radius:10px;background:var(--accent);color:#fff;font-weight:700;font-size:13.5px;border:none;cursor:pointer;font-family:inherit}
.btn-paid-close{padding:10px 18px;border-radius:10px;background:transparent;color:var(--muted);font-weight:600;font-size:13.5px;border:1px solid var(--line);cursor:pointer;font-family:inherit}

/* ── admin login modal ── */
.admin-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:9100;align-items:center;justify-content:center;padding:20px}
.admin-overlay.show{display:flex}
.admin-box{background:var(--bg);border:1px solid var(--line);border-radius:20px;padding:32px 28px;max-width:360px;width:100%;box-shadow:0 24px 60px rgba(0,0,0,.4)}
.light .admin-box{background:#fff}
.admin-box h3{font-size:17px;font-weight:800;color:var(--text);margin-bottom:6px}
.admin-box p{font-size:13px;color:var(--muted);margin-bottom:20px}
.admin-field{margin-bottom:12px}
.admin-field label{display:block;font-size:11.5px;font-weight:700;color:var(--muted);margin-bottom:5px;letter-spacing:.05em;text-transform:uppercase}
.admin-field input{width:100%;padding:10px 12px;background:var(--surface);border:1px solid var(--line);border-radius:10px;color:var(--text);font-size:14px;outline:none;font-family:inherit;box-sizing:border-box}
.admin-field input:focus{border-color:rgba(99,102,241,.5);outline:none}
.admin-err{font-size:12.5px;color:#e11d48;margin-bottom:12px;display:none;text-align:left}
.admin-err.show{display:block}
.admin-box-btns{display:flex;gap:8px;margin-top:6px}
.btn-admin-login{flex:1;padding:11px;border-radius:10px;background:#4f46e5;color:#fff;font-weight:700;font-size:14px;border:none;cursor:pointer;font-family:inherit}
.btn-admin-cancel{padding:11px 16px;border-radius:10px;background:transparent;color:var(--muted);font-weight:600;font-size:14px;border:1px solid var(--line);cursor:pointer;font-family:inherit}
.admin-badge{display:none;position:sticky;top:62px;z-index:199;background:#10b981;color:#fff;font-size:12px;font-weight:700;padding:5px 16px;text-align:center;letter-spacing:.03em}

/* ── wip toast ── */
#wipToast {
  position: fixed; top: 80px; left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background: #18181b; border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px; padding: 13px 20px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,.36);
  font-size: 14px; font-weight: 600; color: #fafafa;
  z-index: 9999; pointer-events: none;
  opacity: 0; transition: opacity .2s, transform .2s;
  white-space: nowrap;
}
.light #wipToast {
  background: #fff; border-color: #e2e8f0; color: #111827;
  box-shadow: 0 8px 32px rgba(0,0,0,.1);
}
#wipToast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#wipToast .wip-icon { font-size: 18px; line-height: 1; }
#wipToast .wip-name { font-weight: 700; }
#wipToast .wip-sub { color: #71717a; font-size: 12.5px; font-weight: 500; margin-left: 2px; }
.light #wipToast .wip-sub { color: #64748b; }
