:root {
  --bg: #0f1020;
  --card: #1a1b33;
  --card2: #23244a;
  --accent: #6c5ce7;
  --accent2: #00cec9;
  --text: #f1f1fb;
  --muted: #a9a9c9;
  --good: #00b894;
  --warn: #fdcb6e;
  --bad: #ff7675;
  --radius: 16px;
  --bg-glow: #2a2b66;   /* body 상단 글로우 색 (테마별로 바뀜) */
}

/* 라이트 모드: data-theme="light"일 때 변수만 덮어쓴다 */
:root[data-theme="light"] {
  --bg: #eef0f8;
  --card: #ffffff;
  --card2: #eef0fa;
  --accent: #5b4bd6;
  --accent2: #0a9c96;
  --text: #1c1d2e;
  --muted: #5a5a74;
  --bg-glow: #d6d9f6;
}

/* 라이트 전용 배경: 밝고 산뜻한 스튜디오 톤 (다크와 완전히 다른 분위기) */
:root[data-theme="light"] body {
  background:
    radial-gradient(900px 500px at 12% -8%, #dfe2fb 0%, transparent 55%),
    radial-gradient(700px 500px at 100% 0%, #d6f3ef 0%, transparent 50%),
    linear-gradient(180deg, #f4f5fc 0%, #eceefb 100%);
}
/* 라이트 전용 카드: 흰 배경 + 부드러운 그림자 + 연한 테두리 (레이어감 유지) */
:root[data-theme="light"] .card {
  border: 1px solid #e2e4f2;
  box-shadow: 0 6px 20px rgba(60, 60, 120, 0.08);
}
:root[data-theme="light"] .feature-card {
  box-shadow: 0 10px 28px rgba(91, 75, 214, 0.14);
}
:root[data-theme="light"] .dash-card {
  box-shadow: 0 6px 18px rgba(60, 60, 120, 0.1);
}
/* 라이트에서 다크 전용 그라데이션 카드 배경을 밝은 톤으로 교체 */
:root[data-theme="light"] .dash-card.c0 { background: linear-gradient(145deg, #e6f7f3, #ffffff); }
:root[data-theme="light"] .dash-card.c1 { background: linear-gradient(145deg, #e7ecfb, #ffffff); }
:root[data-theme="light"] .dash-card.c2 { background: linear-gradient(145deg, #efe8fb, #ffffff); }
:root[data-theme="light"] .dash-card h2,
:root[data-theme="light"] .dash-card p,
:root[data-theme="light"] .logout-btn { border-color: #d0d3e8; color: var(--muted); }
:root[data-theme="light"] .logout-btn:hover { color: var(--accent); border-color: var(--accent); }

* { box-sizing: border-box; }

/* ===== 스크롤바 숨김 (스크롤 기능은 유지, 바만 안 보이게) ===== */
html { overflow-x: hidden; scrollbar-width: none; -ms-overflow-style: none; }
body { overflow-x: hidden; }
::-webkit-scrollbar { width: 0; height: 0; background: transparent; }

body {
  margin: 0;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  background: radial-gradient(1200px 600px at 10% -10%, var(--bg-glow) 0%, transparent 60%),
              var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 16px 64px;
}

/* 입력 아래 보조 링크 (예: AI 탐색기로 찾기) */
.inline-link {
  display: inline-block;
  margin: 8px 0 4px;
  font-size: 13px;
  color: var(--accent2);
  text-decoration: none;
}
.inline-link:hover { color: var(--accent); text-decoration: underline; }

/* 상단 바 */
.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 2px 18px;
}
.topbar .logo {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.logo-home {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--accent2);
}
.topbar .logo:hover .logo-home { color: var(--accent); }

/* 상단 '← 이전' 버튼 */
.nav-back {
  display: inline-flex; align-items: center; gap: 4px;
  margin-left: 14px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--card); color: var(--muted);
  border: 1px solid #ffffff1a; cursor: pointer;
  font-family: inherit; font-size: 13px; line-height: 1;
  transition: color .15s, border-color .15s, background .15s;
}
.nav-back:hover { color: var(--text); border-color: var(--accent); }
.nav-back svg { display: block; }
:root[data-theme="light"] .nav-back { border-color: #e2e4f2; background: #fff; }
.topbar .logo span { color: var(--accent2); }
.topbar .tag {
  font-size: 12px;
  color: var(--muted);
  margin-right: auto;   /* 로고 옆에 붙고, 이후 요소(이전·⚙️)는 오른쪽으로 */
}

/* 사용자 박스 / 로그아웃 */
.user-box { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.user-name { font-size: 13px; color: var(--muted); }
.logout-btn {
  background: transparent;
  border: 1px solid #ffffff2a;
  color: var(--muted);
  font-size: 12px;
  font-family: inherit;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.logout-btn:hover { color: var(--text); border-color: var(--accent); }

/* 진행 단계 표시 */
.steps {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.steps .step {
  flex: 1;
  min-width: 56px;
  text-align: center;
  font-size: 11px;
  padding: 8px 4px;
  border-radius: 10px;
  background: var(--card);
  color: var(--muted);
  border: 1px solid transparent;
}
.steps .step.active {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}
.steps .step.done {
  background: var(--card2);
  color: var(--accent2);
  border-color: var(--accent2);
}

/* 카드 */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid #ffffff12;
}
.card h2 {
  margin: 0 0 6px;
  font-size: 18px;
}
/* 제목 앞 SVG 아이콘 */
.card h2 { display: flex; align-items: center; gap: 8px; }
.h2-ic { display: inline-flex; color: var(--accent2); flex-shrink: 0; }
.h2-ic svg { display: block; }
.card .sub {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 16px;
}

/* 입력 */
label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
input[type=text], input[type=password], textarea, select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #ffffff22;
  background: #0e0f22;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
}
textarea { min-height: 160px; resize: vertical; line-height: 1.6; }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
}

/* 버튼 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  margin-top: 18px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.ghost {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--text);
}

/* 칩/태그 */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip {
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--card2);
  border: 1px solid #ffffff18;
}
.chip.good { border-color: var(--good); color: var(--good); }
.chip.bad { border-color: var(--bad); color: var(--bad); }

/* 예시 생기부 불러오기 행 */
.sample-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 6px 0 8px; }
.sample-label { font-size: 12px; color: var(--muted); }
.sample-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sample-chip { cursor: pointer; font-size: 12px; }
.sample-chip:hover { border-color: var(--accent); color: var(--accent); }

/* 메인 히어로 이용 흐름 안내 */
.flow-guide { display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.flow-step {
  font-size: 13px; font-weight: 600; color: var(--text);
  background: var(--card2); border: 1px solid #ffffff1a;
  padding: 7px 13px; border-radius: 999px;
}
.flow-arrow { color: var(--accent2); font-weight: 700; }
:root[data-theme="light"] .flow-step { border-color: #e2e4f2; }

/* 데이터 출처/기준 안내 (신뢰도) */
.data-source {
  font-size: 12px; color: var(--muted); line-height: 1.6;
  background: var(--card2); border: 1px solid #ffffff12;
  border-radius: 12px; padding: 12px 14px; margin: 4px 0 14px;
}
.data-source strong { color: var(--text); }
:root[data-theme="light"] .data-source { border-color: #e2e4f2; }

/* 오답노트 재연습 */
.practice-btn { margin-top: 10px; font-size: 13px; }
.practice-card { max-width: 480px; text-align: left; }
.practice-q { font-weight: 700; font-size: 15px; margin: 6px 0 12px; line-height: 1.5; }
.practice-card textarea { width: 100%; min-height: 110px; margin: 8px 0; }
.pr-model { background: var(--card2); border: 1px solid #ffffff14; border-radius: 10px; padding: 12px; margin: 8px 0; }
.pr-model p { margin: 6px 0 0; line-height: 1.6; }
:root[data-theme="light"] .pr-model { border-color: #e2e4f2; }

/* 면접 답변 툴바 (타이머) */
.answer-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.answer-tools { display: flex; align-items: center; gap: 10px; }
.timer-toggle { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.timer-display { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent2); font-size: 14px; }
.timer-display.urgent { color: #e74c3c; }

/* 역량 리스트 */
ul.clean { list-style: none; padding: 0; margin: 10px 0; }
ul.clean li {
  padding: 10px 14px;
  background: var(--card2);
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.5;
}

/* 색깔 구분 박스 (탐색 결과) */
ul.boxes { list-style: none; padding: 0; margin: 10px 0; }
ul.boxes li {
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.55;
  border-left: 4px solid;
}
ul.boxes.info li { background: #16305a; border-color: #4aa3ff; }   /* 파랑 - 역량 */
ul.boxes.warn li { background: #4a3a12; border-color: var(--warn); } /* 노랑 - 검증포인트 */
.kw-box {
  background: #123a2e;
  border-left: 4px solid var(--good);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.kw-box .chip { background: #0e3327; border-color: var(--good); color: #7fe9c4; }

/* 일치율 게이지 */
.gauge {
  position: relative;
  height: 14px;
  border-radius: 999px;
  background: #0e0f22;
  overflow: hidden;
  margin: 10px 0;
}
.gauge > span {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  border-radius: 999px;
  transition: width .8s ease;
}
.big-num { font-size: 40px; font-weight: 800; }

/* 비밀번호 보기 토글 */
.pw-wrap { position: relative; }
.pw-wrap input { width: 100%; padding-right: 48px; }
.pw-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 6px 8px;
  line-height: 0;
  display: flex;
  align-items: center;
}
.pw-toggle:hover { color: var(--accent2); }

/* 메인 대시보드 */
.hero { text-align: center; margin: 24px 0 24px; }

/* 두드러진 피처 카드 (대학 정보) */
.feature-card {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: var(--text);
  border-radius: 20px;
  padding: 22px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #6c5ce7, #00cec9);
  border: 1px solid #ffffff2e;
  box-shadow: 0 8px 30px #6c5ce73e;
  transition: transform .15s ease;
}
.feature-card:hover { transform: translateY(-3px); }
.feature-icon { color: #ffffff; flex-shrink: 0; }
.feature-text { flex: 1; }
.feature-card .feature-text h2 { color: #ffffff; }
.feature-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #0f1020;
  background: var(--accent2);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.feature-text h2 { font-size: 19px; margin: 0 0 6px; }
.feature-text p { color: #f0f4ff; font-size: 13px; line-height: 1.55; margin: 0; }
.feature-go { font-size: 28px; color: #ffffff; flex-shrink: 0; }
.hero h1 { font-size: 26px; margin: 0 0 8px; letter-spacing: -0.5px; }
.hero .sub { color: var(--muted); font-size: 14px; margin: 0; }

.dash { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }
.dash-card {
  display: block;
  text-decoration: none;
  color: var(--text);
  border-radius: 20px;
  padding: 26px 22px;
  border: 1px solid #ffffff18;
  background: var(--card);
  transition: transform .15s ease, border-color .15s ease;
}
.dash-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.dash-card.c1 { background: linear-gradient(145deg, #1e2a52, #1a1b33); }
.dash-card.c2 { background: linear-gradient(145deg, #2a1e52, #1a1b33); }
.dash-card.c0 { background: linear-gradient(145deg, #0f3d3a, #1a1b33); }
.dash-card.c0 .dash-icon { color: #6ee7d6; }
.dash-icon { font-size: 40px; margin-bottom: 12px; }
.dash-card.c1 .dash-icon { color: #7fb4ff; }
.dash-card.c2 .dash-icon { color: #c4a0ff; }
.dash-icon svg { display: block; }

/* 인라인 SVG 아이콘 공통 */
.ic { display: inline-block; vertical-align: -0.18em; }
.major-ic { color: var(--accent2); display: inline-flex; vertical-align: middle; }
#r-title { display: flex; align-items: center; gap: 8px; }
.dash-card h2 { font-size: 20px; margin: 0 0 10px; line-height: 1.35; }
.dash-card p { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0 0 16px; }
.dash-go { font-weight: 700; color: var(--accent2); font-size: 15px; }

@media (min-width: 620px) {
  .dash { flex-direction: row; }
  .dash-card { flex: 1; }
}

/* 커리큘럼 로드맵 */
.stage { padding: 0; overflow: hidden; }
.stage-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--card2);
  border: none;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}
.stage-head .arrow { color: var(--accent2); font-size: 14px; }
.stage-body { padding: 16px 20px 20px; }
.chip.course { background: #16305a; border-color: #4aa3ff; color: #bcd8ff; }
.tipbox {
  margin-top: 14px;
  background: #4a3a12;
  border-left: 4px solid var(--warn);
  border-radius: 10px;
  padding: 14px;
}
.tipbox .tip-label { font-size: 13px; font-weight: 700; color: var(--warn); margin-bottom: 6px; }
.tipbox p { margin: 0; font-size: 14px; line-height: 1.6; }

/* 대학 정보 - 두드러진 히어로 & 지표 */
.hero-univ {
  background: linear-gradient(145deg, #0f3d3a, #23244a);
  border: 1px solid #2bb6a855;
}
.hero-univ #r-title { font-size: 20px; }
.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}
.metric {
  background: #0e0f22aa;
  border: 1px solid #ffffff14;
  border-radius: 14px;
  padding: 14px 10px;
  text-align: center;
}
.metric .m-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent2);
  line-height: 1.2;
  word-break: keep-all;
}
.metric .m-label { font-size: 12px; color: var(--text); margin-top: 6px; font-weight: 600; }
.metric .m-note { font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.4; }

/* 정보 아카이브 표 */
.info-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13px; }
.info-table th, .info-table td {
  text-align: left;
  padding: 10px 10px;
  border-bottom: 1px solid #ffffff14;
  vertical-align: top;
  line-height: 1.5;
}
.info-table th { color: var(--accent2); font-weight: 700; font-size: 12px; }
.info-table td:first-child { font-weight: 600; white-space: nowrap; }

/* 연구실 카드 */
.lab-item {
  background: var(--card2);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
}
.lab-name { font-weight: 700; font-size: 14px; }
.lab-desc { font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.lab-career { font-size: 12px; color: var(--accent2); margin-top: 6px; }

/* FAQ */
.faq-item {
  border-bottom: 1px solid #ffffff14;
  padding: 12px 0;
}
.faq-item:last-child { border-bottom: none; }
.faq-q { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.faq-a { font-size: 13px; color: var(--muted); line-height: 1.6; }

/* 로드맵 추가 요소 */
.stage-skill {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}
.mini-label { font-size: 12px; color: var(--muted); margin: 14px 0 8px; font-weight: 600; }
.ivbox {
  margin-top: 14px;
  background: #2a1e52;
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 14px;
}
.ivbox .tip-label { font-size: 13px; font-weight: 700; color: var(--accent2); margin-bottom: 6px; }
.ivbox p { margin: 0; font-size: 14px; line-height: 1.6; }

/* 내 면접 기록 */
.hist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  transition: border-color .15s ease;
}
.hist-item[style*="pointer"]:hover { border-color: var(--accent); }
.hist-item.incomplete { opacity: 0.7; }
.hist-main { flex: 1; }
.hist-major { font-size: 15px; font-weight: 700; }
.hist-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.hist-score { text-align: center; min-width: 56px; }
.hist-score .hs-num { font-size: 26px; font-weight: 800; color: var(--accent2); line-height: 1; }
.hist-score .hs-lbl { font-size: 11px; color: var(--muted); }
.hist-score .hs-pending { font-size: 12px; color: var(--warn); }
.hist-del {
  background: transparent;
  border: 1px solid #ffffff1f;
  color: var(--muted);
  font-size: 15px;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  flex-shrink: 0;
}
.hist-del:hover { border-color: var(--bad); }

/* 뒤로 가기 링크 */
.backlink {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  padding: 4px 0;
  margin-bottom: 10px;
}
.backlink:hover { color: var(--text); }

/* 카테고리 탭 */
.tabs {
  display: flex;
  gap: 6px;
  margin: 4px 0 6px;
}
.tabs .tab {
  flex: 1;
  padding: 10px 6px;
  border-radius: 10px;
  border: 1px solid #ffffff22;
  background: #0e0f22;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.tabs .tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* 학과 카드 그리드 (홈) */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 8px; }
.grid .pick {
  padding: 14px;
  border-radius: 12px;
  background: var(--card2);
  border: 1px solid #ffffff14;
  cursor: pointer;
  font-size: 14px;
  text-align: center;
}
.grid .pick:hover { border-color: var(--accent); }

/* 면접 채팅 */
.chat { display: flex; flex-direction: column; gap: 12px; margin: 10px 0; }
.bubble {
  max-width: 85%;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
}
.bubble.q { align-self: flex-start; background: var(--card2); border-top-left-radius: 4px; }
.bubble.a { align-self: flex-end; background: var(--accent); color: #fff; border-top-right-radius: 4px; }
.bubble.f { align-self: flex-start; background: #3a2a4a; border: 1px solid var(--warn); border-top-left-radius: 4px; }
.qnum { font-size: 12px; color: var(--muted); margin-bottom: 4px; }

/* 점수 리포트 */
.score-row { display: flex; align-items: center; gap: 10px; margin: 12px 0; }
.score-row .name { width: 110px; font-size: 13px; color: var(--muted); }
.score-row .bar { flex: 1; height: 10px; background: #0e0f22; border-radius: 999px; overflow: hidden; }
.score-row .bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent2), var(--accent)); }
.score-row .val { width: 42px; text-align: right; font-weight: 700; }

.note {
  background: var(--card2);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  border-left: 4px solid var(--warn);
}
.note .q { font-weight: 700; margin-bottom: 6px; }
.note .label { font-size: 12px; color: var(--accent2); margin-top: 10px; }
.note p { margin: 4px 0; font-size: 14px; line-height: 1.55; }

.msg { font-size: 13px; color: var(--bad); margin-top: 8px; min-height: 18px; }
.center { text-align: center; }
.muted { color: var(--muted); font-size: 13px; }
.spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid #ffffff55; border-top-color: #fff;
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }


/* 비밀번호 변경 모달 */
.modal-bg {
  position: fixed; inset: 0; background: rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 20px;
}
.modal-card {
  background: #1a1b33; border: 1px solid #ffffff1a; border-radius: 16px;
  padding: 22px; width: 100%; max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.modal-card label { display: block; margin: 12px 0 5px; font-size: 13px; color: #b9b9d6; }
.modal-card input {
  width: 100%; padding: 11px 13px; border-radius: 10px;
  border: 1px solid #ffffff22; background: #0f1026; color: #fff; font-size: 15px;
}
.modal-card input:focus { outline: none; border-color: var(--accent); }

/* 커스텀 확인 모달 (confirm 대체) */
.confirm-card { max-width: 420px; text-align: center; }
.confirm-title { font-size: 19px; margin: 2px 0 10px; }
.confirm-msg { color: var(--muted); font-size: 15px; line-height: 1.6; margin: 0 0 20px; }
.confirm-actions { display: flex; gap: 10px; }
.confirm-actions .btn { flex: 1; margin-top: 0; }
.confirm-actions .btn.ghost {
  background: transparent; border: 1px solid #ffffff2a; color: var(--text);
}
.confirm-actions .btn.ghost:hover { border-color: var(--accent); }
:root[data-theme="light"] .confirm-actions .btn.ghost { border-color: #d0d3e8; }


/* 계정 삭제 위험 구역 */
.danger-zone {
  margin-top: 18px; padding-top: 16px;
  border-top: 1px solid #ff767533;
}
.danger-zone input {
  width: 100%; padding: 11px 13px; border-radius: 10px;
  border: 1px solid #ff767555; background: #0f1026; color: #fff; font-size: 15px;
}
.danger-zone input:focus { outline: none; border-color: #ff7675; }
.btn.danger {
  background: #e74c3c; color: #fff; border: none; width: 100%;
}
.btn.danger:hover { background: #c0392b; }


/* 추천 학과 '더보기' 칩 */
.chip.chip-more {
  background: transparent; border: 1px dashed var(--accent);
  color: var(--accent); font-weight: 600;
}
.chip.chip-more:hover { background: #6c5ce71a; }


/* 면접이 중요한 학과 추천 리스트 */
.rec-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.rec-item {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 10px 12px; border-radius: 12px; background: #0f1026;
  border: 1px solid #ffffff14; transition: border-color .15s, transform .1s;
}
.rec-item:hover { border-color: var(--accent); transform: translateX(2px); }
.rec-rank {
  flex: 0 0 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.rec-ic { flex: 0 0 auto; color: var(--accent2); display: flex; }
.rec-body { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.rec-body b { font-size: 14px; }
.rec-body small { color: #9a9ab8; font-size: 12px; }
.rec-weight {
  flex: 0 0 auto; font-size: 12px; font-weight: 700; color: var(--accent2);
  background: #00cec91a; padding: 4px 9px; border-radius: 999px; white-space: nowrap;
}


/* 오답노트: 내 답변 ↔ 모범답안 좌우 비교 */
.compare { display: flex; flex-direction: column; gap: 10px; margin: 10px 0; }
.cmp-col { padding: 12px; border-radius: 12px; }
.cmp-mine { background: #2a1e2e; border: 1px solid #ff767533; }
.cmp-model { background: #0f2e2b; border: 1px solid #00b89433; }
.cmp-head { font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.cmp-mine .cmp-head { color: #ff9f9f; }
.cmp-model .cmp-head { color: #6ee7d6; }
.cmp-col p { margin: 0; line-height: 1.6; font-size: 14px; }
@media (min-width: 640px) {
  .compare { flex-direction: row; }
  .cmp-col { flex: 1; }
}


/* 나의 성장 리포트 */
.growth-summary { display: flex; justify-content: space-around; gap: 10px; flex-wrap: wrap; }
.gs-item { text-align: center; min-width: 70px; }
.gs-num { font-size: 26px; font-weight: 800; color: var(--accent); }
.gs-label { font-size: 12px; color: #9a9ab8; margin-top: 2px; }
.cg-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.cg-label { flex: 0 0 90px; font-size: 13px; }
.cg-bars { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.cg-bar { position: relative; background: #ffffff14; border-radius: 6px; height: 16px; }
.cg-fill { display: block; height: 100%; border-radius: 6px; }
.cg-fill.first { background: #7a7a9a; }
.cg-fill.last { background: linear-gradient(90deg, var(--accent), var(--accent2)); }
.cg-bar small { position: absolute; right: 6px; top: 1px; font-size: 10px; color: #fff; }
.cg-delta { flex: 0 0 44px; text-align: right; font-weight: 700; font-size: 14px; }


/* ===== 라이트 모드 보정: 하드코딩된 어두운 배경을 밝게 덮어쓴다 ===== */
:root[data-theme="light"] input[type=text],
:root[data-theme="light"] input[type=password],
:root[data-theme="light"] textarea,
:root[data-theme="light"] select,
:root[data-theme="light"] .modal-card input,
:root[data-theme="light"] .danger-zone input,
:root[data-theme="light"] .score-row .bar,
:root[data-theme="light"] .rec-item {
  background: #f3f4fb;
  color: var(--text);
}
:root[data-theme="light"] .modal-card { background: #ffffff; }
:root[data-theme="light"] .bubble.q { background: #e9eaf5; color: var(--text); }
:root[data-theme="light"] .bubble.f { background: #f3ecfb; color: var(--text); }
:root[data-theme="light"] .cg-bar,
:root[data-theme="light"] .cmp-mine { background: #f3eef0; }
:root[data-theme="light"] .cmp-model { background: #e9f6f2; }
:root[data-theme="light"] .cmp-col p,
:root[data-theme="light"] .faq-a,
:root[data-theme="light"] .note p { color: var(--text); }
:root[data-theme="light"] .topbar .logo { color: var(--text); }

/* ===== 입시 전형 가이드(/univ·/major) 라이트 모드 색 보정 ===== */
/* 히어로: 어두운 청록 그라데이션 → 밝은 민트·라벤더 톤 */
:root[data-theme="light"] .hero-univ {
  background: linear-gradient(145deg, #e3f6f1, #eef0fb);
  border: 1px solid #b9e6dd;
}
/* 지표 카드 */
:root[data-theme="light"] .metric {
  background: #f5f6fc;
  border: 1px solid #e2e4f2;
}
/* 전형 표 구분선 */
:root[data-theme="light"] .info-table th,
:root[data-theme="light"] .info-table td {
  border-bottom: 1px solid #e2e4f2;
}
/* 연구실 카드 */
:root[data-theme="light"] .lab-item { background: #f3f4fb; }
/* FAQ 구분선 */
:root[data-theme="light"] .faq-item { border-bottom: 1px solid #e2e4f2; }
/* 서류 팁 박스: 어두운 갈색 → 밝은 크림 */
:root[data-theme="light"] .tipbox {
  background: #fdf6e3;
  border-left: 4px solid var(--warn);
}
/* 면접 팁(연구 트렌드) 박스 */
:root[data-theme="light"] .ivbox { background: #e9f6f2; }
/* FAQ 질문 등 텍스트 가독성 */
:root[data-theme="light"] .faq-q,
:root[data-theme="light"] .lab-name { color: var(--text); }


/* ===== 모바일 전용 하단 탭바 ===== */
#mobile-tabbar { display: none; }   /* 기본(데스크톱)에서는 숨김 */

@media (max-width: 620px) {
  /* 하단 탭바 표시 */
  #mobile-tabbar {
    display: flex;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
    background: var(--card);
    border-top: 1px solid #ffffff14;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px rgba(0,0,0,0.25);
  }
  :root[data-theme="light"] #mobile-tabbar {
    border-top: 1px solid #e2e4f2;
    box-shadow: 0 -4px 20px rgba(60,60,120,0.1);
  }
  .mtab {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    gap: 3px; text-decoration: none; color: var(--muted);
    font-size: 11px; padding: 4px 0; border-radius: 10px;
  }
  .mtab-ic { display: flex; }
  .mtab.active { color: var(--accent); font-weight: 700; }
  .mtab.active .mtab-ic { color: var(--accent); }

  /* 탭바에 가리지 않도록 본문 하단 여백 확보 */
  body.has-tabbar .wrap { padding-bottom: 86px; }

  /* 폰에서는 상단 버튼 나열(user-box)을 통째로 숨기고 ⚙️ 메뉴로 대체 */
  .user-box { display: none; }
  .topbar { justify-content: space-between; align-items: center; }

  /* 폰 전용: 적정 터치 타깃 (과하지 않게) */
  .btn { padding: 12px 16px; font-size: 15px; }
  .dash-card, .feature-card { padding: 16px; }
  .wrap { padding-left: 14px; padding-right: 14px; }
  .topbar .logo { font-size: 19px; }
  /* 입력창 폰트 16px 이상 → iOS 자동 확대 방지 (유지) */
  input[type=text], input[type=password], textarea, select { font-size: 16px; }

  /* ===== 모바일 네이티브 느낌 재설계 =====
     원칙(NN/g): 큰 그림자 대신 얇은 테두리로 구분, 패딩 절제로
     콘텐츠 영역 최대화, 타이포 스케일 축소, 데스크톱 강제 줄바꿈 해제 */

  /* 히어로: 폰 폭에 맞춰 자연스럽게 (강제 <br> 무시) */
  .hero { margin: 14px 0 18px; text-align: left; }
  .hero h1 { font-size: 21px; line-height: 1.35; }
  .hero h1 br { display: none; }                 /* 데스크톱 줄바꿈 해제 */
  .hero .sub { font-size: 13px; line-height: 1.5; }

  /* 카드 공통: 무거운 그림자 제거 → 얇은 테두리 (네이티브 톤) */
  .card, .dash-card, .feature-card {
    box-shadow: none;
    border: 1px solid #ffffff14;
    border-radius: 14px;
  }
  :root[data-theme="light"] .card,
  :root[data-theme="light"] .dash-card,
  :root[data-theme="light"] .feature-card { border-color: #e6e8f3; }

  /* 피처 카드: 아이콘·텍스트 간격 좁히고 화살표 단정하게 */
  .feature-card { gap: 12px; }
  .feature-icon svg { width: 30px; height: 30px; }
  .feature-card .feature-text h2 { font-size: 17px; }
  .feature-text p { font-size: 12.5px; line-height: 1.5; }
  .feature-go { font-size: 18px; }

  /* 대시보드 카드: 아이콘 작게, 제목 강제 줄바꿈 해제, 여백 절제 */
  .dash { gap: 10px; margin-bottom: 18px; }
  .dash-card { padding: 16px 16px; }
  .dash-icon { font-size: 28px; margin-bottom: 8px; }
  .dash-icon svg { width: 28px; height: 28px; }
  .dash-card h2 { font-size: 16px; line-height: 1.3; }
  .dash-card h2 br { display: none; }
  .dash-card p { font-size: 12.5px; line-height: 1.5; margin-top: 4px; }
  .dash-go { font-size: 13px; }

  /* 일반 카드/섹션 제목 절제 */
  .card { padding: 16px; }
  .card h2 { font-size: 16px !important; }
  .sub { font-size: 13px; }

  /* 폰 상단바: 로고(왼쪽) · [이전+⚙️](오른쪽) 로 정돈 */
  .topbar { gap: 8px; }
  .topbar .logo { margin-right: auto; }           /* 로고를 왼쪽으로 밀착 */
  /* '← 이전' 버튼은 폰에서 아이콘만 (공간 절약) */
  .nav-back { margin-left: 0; padding: 0; width: 40px; height: 40px;
              justify-content: center; border-radius: 11px; }
  .nav-back span { display: none; }               /* '이전' 글자 숨김 */
  .nav-back svg { width: 18px; height: 18px; }

  /* 면접 말풍선: 좁은 폰에서 넓게 + 패딩 절제 */
  .bubble { max-width: 88%; padding: 11px 13px; font-size: 14px; }

  /* 면접 여정 단계: 좁아도 안 깨지게 축소 */
  .steps { gap: 4px; margin-bottom: 14px; }
  .steps .step { font-size: 10.5px; padding: 6px 4px; }

  /* 핵심 지표: 3열 유지하되 폰에 맞게 축소 */
  .metrics { gap: 8px; margin-top: 12px; }
  .metric { padding: 12px 6px; border-radius: 12px; }
  .metric .m-value { font-size: 17px; }
  .metric .m-label { font-size: 11px; }

  /* 정보 표: 폰에서 글자·여백 줄여 넘침 방지 */
  .info-table { font-size: 12px; }
  .info-table th, .info-table td { padding: 8px 7px; }

  /* 칩: 살짝 작게 */
  .chip { font-size: 12px; padding: 5px 10px; }
  .chips { gap: 6px; }

  /* 추천 리스트 항목 */
  .rec-item { padding: 10px 11px; }

  /* 모달: 폰 여백 절제 + 그림자 완화 */
  .modal-card { padding: 18px; border-radius: 14px; box-shadow: 0 12px 36px rgba(0,0,0,.45); }
  .confirm-card { max-width: 100%; }

  /* 입시 가이드 상단 히어로 박스 여백 절제 */
  .hero-univ { padding: 16px; }

  /* 섹션 간 여백 전반 축소 */
  .card { margin-bottom: 12px; }
}


/* ===== 상단 ⚙️ 설정 메뉴 (데스크톱 포함 전 기기 공통) ===== */
/* 데스크톱: user-box 버튼 나열 대신 ⚙️ 하나로 통일 (폰처럼) */
.user-box { display: none; }         /* 데스크톱에서도 버튼 나열 숨김 */
#m-menu-btn {
  display: inline-flex; align-items: center; justify-content: center;
  margin-left: auto;                 /* 상단 오른쪽 끝으로 */
  width: 46px; height: 46px; border-radius: 13px;
  background: var(--card); color: var(--text);
  border: 1px solid #ffffff1a; cursor: pointer;
}
#m-menu-btn svg { width: 26px; height: 26px; }
#m-menu-btn:hover { border-color: var(--accent); color: var(--accent); }
:root[data-theme="light"] #m-menu-btn { border-color: #e2e4f2; background: #fff; }
#m-menu-sheet {
  display: flex; flex-direction: column;
  position: fixed; top: 68px; right: 24px; z-index: 300;
  min-width: 300px; padding: 12px;
  background: var(--card); border: 1px solid #ffffff1a;
  border-radius: 18px; box-shadow: 0 20px 48px rgba(0,0,0,0.45);
  opacity: 0; transform: translateY(-8px) scale(0.98);
  pointer-events: none; transition: opacity .15s, transform .15s;
}
:root[data-theme="light"] #m-menu-sheet {
  background: #fff; border-color: #e2e4f2; box-shadow: 0 20px 48px rgba(60,60,120,0.18);
}
#m-menu-sheet.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.m-menu-item {
  text-align: left; background: transparent; border: none;
  color: var(--text); font-size: 16px; padding: 16px 16px;
  border-radius: 10px; cursor: pointer; font-family: inherit;
}
.m-menu-item:hover { background: var(--card2); }
.m-menu-item.danger { color: #ff7675; }
/* 로그인 화면: ⚙️ 메뉴가 없으므로 테마 토글 버튼을 오른쪽 끝으로 */
.topbar > #theme-toggle {
  margin-left: auto;
  padding: 10px 18px;
  font-size: 14px;
  border-radius: 999px;
  border: 1px solid #ffffff2a;
  background: var(--card);
  color: var(--text);
}
.topbar > #theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
:root[data-theme="light"] .topbar > #theme-toggle { border-color: #e2e4f2; background: #fff; }

@media (max-width: 620px) {
  #m-menu-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 11px;
    background: var(--card); color: var(--text);
    border: 1px solid #ffffff1a; cursor: pointer;
  }
  #m-menu-btn svg { width: 22px; height: 22px; }
  :root[data-theme="light"] #m-menu-btn { border-color: #e2e4f2; }

  #m-menu-sheet {
    display: flex; flex-direction: column;
    position: fixed; top: 56px; right: 14px; z-index: 300;
    min-width: 210px; padding: 8px;
    background: var(--card); border: 1px solid #ffffff1a;
    border-radius: 16px; box-shadow: 0 16px 40px rgba(0,0,0,0.4);
    opacity: 0; transform: translateY(-8px) scale(0.98);
    pointer-events: none; transition: opacity .15s, transform .15s;
  }
  :root[data-theme="light"] #m-menu-sheet {
    border-color: #e2e4f2; box-shadow: 0 16px 40px rgba(60,60,120,0.18);
  }
  #m-menu-sheet.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

  .m-menu-item {
    text-align: left; background: transparent; border: none;
    color: var(--text); font-size: 14px; padding: 12px 13px;
    border-radius: 10px; cursor: pointer;
  }
  .m-menu-item:hover, .m-menu-item:active { background: var(--card2); }
  .m-menu-item.danger { color: #ff7675; }
}


/* ===== 태블릿(패드) 전용 레이아웃 (621px ~ 1024px) ===== */
@media (min-width: 621px) and (max-width: 1024px) {
  /* 좁은 폰 폭을 벗어나 패드 공간을 활용 */
  .wrap { max-width: 920px; padding: 26px 28px 72px; }

  /* 대시보드 카드: 2~3열로 여유있게 */
  .dash { flex-direction: row; flex-wrap: wrap; gap: 18px; }
  .dash-card { flex: 1 1 calc(50% - 9px); }   /* 2열 */

  /* 피처 카드 더 크게 */
  .feature-card { padding: 28px; }
  .feature-text h2 { font-size: 22px; }

  /* 핵심 지표/표 가독성 */
  .metrics { gap: 14px; }
  .card { padding: 24px; }

  /* 면접 채팅 말풍선 폭 넓힘 */
  .bubble { max-width: 75%; }

  /* 오답노트 비교는 항상 좌우 2단 (패드는 넓음) */
  .compare { flex-direction: row; }
  .cmp-col { flex: 1; }

  /* 패드 상단바: 버튼 나열(user-box) 대신 ⚙️ 메뉴로 깔끔하게.
     하단 탭바는 패드에선 쓰지 않는다(상단 ⚙️로 충분). */
  #mobile-tabbar { display: none !important; }
  body.has-tabbar .wrap { padding-bottom: 72px; }
  .user-box { display: none; }               /* 데스크톱 버튼 나열 숨김 */
  .topbar { justify-content: space-between; align-items: center; }

  /* ⚙️ 메뉴 버튼 표시 (폰과 동일한 모양) */
  #m-menu-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 12px;
    background: var(--card); color: var(--text);
    border: 1px solid #ffffff1a; cursor: pointer;
  }
  #m-menu-sheet {
    display: flex; flex-direction: column;
    position: fixed; top: 64px; right: 28px; z-index: 300;
    min-width: 240px; padding: 8px;
    background: var(--card); border: 1px solid #ffffff1a;
    border-radius: 16px; box-shadow: 0 16px 40px rgba(0,0,0,0.4);
    opacity: 0; transform: translateY(-8px) scale(0.98);
    pointer-events: none; transition: opacity .15s, transform .15s;
  }
  #m-menu-sheet.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
  .m-menu-item {
    text-align: left; background: transparent; border: none;
    color: var(--text); font-size: 15px; padding: 13px 14px;
    border-radius: 10px; cursor: pointer;
  }
  .m-menu-item:hover { background: var(--card2); }
  .m-menu-item.danger { color: #ff7675; }
}
:root[data-theme="light"] #m-menu-btn { border-color: #e2e4f2; }

/* ===== 와이드 데스크톱 (≥1200px): 넓은 화면 활용 ===== */
@media (min-width: 1200px) {
  /* 넓은 화면: 1200px 균형 폭 + 전문적 좌우 여백(2rem) */
  .wrap { max-width: 1200px; padding-left: 2rem; padding-right: 2rem; }
  /* 대시보드 카드 3열로 */
  .dash { flex-direction: row; gap: 20px; }
  .dash-card { flex: 1; }
  /* 읽기 중심 화면(면접·리포트·오답노트·생기부·성장)은 가독성 폭으로 제한
     — 타이포그래피 기준: 한 줄이 너무 길면 읽기 피로. 넓은 화면에서도 ~900px */
  body.reading .wrap { max-width: 900px; }
}


/* ============================================================
   접근성 & 인터랙션 완성도
   ============================================================ */

/* 부드러운 페이지 내 스크롤 (앵커 이동 등) */
html { scroll-behavior: smooth; }

/* 키보드 포커스 링: 마우스엔 안 보이고 Tab 이동 시만 또렷하게 (a11y) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent2);
  outline-offset: 2px;
  border-radius: 6px;
}
/* 마우스 클릭 시 생기는 기본 아웃라인은 제거(포커스링만 유지) */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) { outline: none; }

/* 비활성 버튼 공통 상태 (일관된 피드백) */
button:disabled,
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 인터랙티브 요소에 부드러운 전환 기본값 */
a, button, .btn, .chip, .dash-card, .feature-card, .card {
  transition: background-color .15s ease, border-color .15s ease,
              color .15s ease, transform .15s ease, box-shadow .15s ease;
}

/* 모션에 민감한 사용자는 애니메이션·전환을 최소화 (a11y 표준) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
