/* ── 변수 ── */
:root {
  --blue:    #2563EB;
  --blue-d:  #1D4ED8;
  --green:   #16A34A;
  --green-l: #DCFCE7;
  --red:     #DC2626;
  --red-l:   #FEE2E2;
  --gray:    #64748B;
  --gray-l:  #F1F5F9;
  --border:  #E2E8F0;
  --text:    #1E293B;
  --text-m:  #475569;
  --white:   #FFFFFF;
  --shadow:  0 1px 3px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.06);
  --radius:  12px;
}

/* ── 기본 ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Noto Sans KR', -apple-system, sans-serif;
  background: #F8FAFC;
  color: var(--text);
  line-height: 1.7;
  font-size: 15px;
}

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px;
}

a { color: inherit; text-decoration: none; }

/* ── 헤더 ── */
header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.brand {
  font-size: 18px;
  font-weight: 700;
  color: var(--blue);
}
nav { display: flex; align-items: center; gap: 4px; }
nav > a { color: var(--text-m); font-size: 13px; font-weight: 500; padding: 6px 11px; border-radius: 7px; transition: all .15s; }
nav > a:hover { background: var(--gray-l); color: var(--text); }
nav > .nav-home { margin-right: 8px; color: var(--text); }

/* 과목 링크 (색상 액센트) */
.nav-subj { position: relative; }
.nav-subj::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 11px; right: 11px;
  height: 2px;
  border-radius: 1px;
  opacity: 0;
  transition: opacity .15s;
}
.nav-subj:hover::after { opacity: 1; }
.nav-em::after  { background: #2563EB; }
.nav-ct::after  { background: #7C3AED; }
.nav-pw::after  { background: #16A34A; }
.nav-mc::after  { background: #EA580C; }
.nav-std::after { background: #0D9488; }
.nav-em:hover  { color: #2563EB !important; background: #EFF6FF !important; }
.nav-ct:hover  { color: #7C3AED !important; background: #F5F3FF !important; }
.nav-pw:hover  { color: #16A34A !important; background: #F0FDF4 !important; }
.nav-mc:hover  { color: #EA580C !important; background: #FFF7ED !important; }
.nav-std:hover { color: #0D9488 !important; background: #F0FDFA !important; }

/* ── main ── */
main { padding: 40px 20px 60px; }

/* ── footer ── */
footer {
  text-align: center;
  padding: 24px;
  color: var(--gray);
  font-size: 13px;
  border-top: 1px solid var(--border);
}

/* ── 버튼 ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .15s;
}
.btn-primary  { background: var(--blue); color: var(--white); }
.btn-primary:hover  { background: var(--blue-d); }
.btn-outline  { border-color: var(--blue); color: var(--blue); background: var(--white); }
.btn-outline:hover  { background: #EFF6FF; }
.btn-success  { background: var(--green); color: var(--white); }
.btn-success:hover  { background: #15803D; }
.btn-ghost    { color: var(--gray); }
.btn-ghost:hover    { color: var(--text); }
.btn-lg { padding: 13px 28px; font-size: 16px; }

/* ── 카드 ── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

/* ── 뱃지 ── */
.q-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
}
.q-badge.topic    { background: #EFF6FF; color: var(--blue); }
.q-badge.subtopic { background: #F0FDF4; color: var(--green); }

/* ══ 홈페이지 ══ */
.hero {
  text-align: center;
  padding: 48px 0 36px;
}
.hero h1   { font-size: 28px; font-weight: 700; margin-bottom: 10px; letter-spacing: -.3px; }
.hero-sub  { color: var(--text-m); font-size: 15px; line-height: 1.7; }

.hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
  font-size: 13px;
  color: var(--gray);
}
.hero-meta .dot { color: var(--border); }
.hero-meta strong { color: var(--blue); font-weight: 700; }

.topics-section, .info-section { margin-bottom: 48px; }
.topics-section h2, .info-section h2 {
  font-size: 20px; font-weight: 700; margin-bottom: 16px;
}
.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.topic-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}
.topic-name  { font-weight: 500; }
.topic-count { font-size: 13px; color: var(--gray); }

/* ══ 퀴즈 페이지 ══ */
.progress-wrap {
  height: 6px;
  background: var(--gray-l);
  border-radius: 3px;
  margin-bottom: 24px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), #60A5FA);
  border-radius: 3px;
  transition: width .4s ease;
}

.quiz-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.q-counter { font-weight: 700; color: var(--gray); font-size: 14px; }

.quiz-card { margin-bottom: 20px; }

.question-text {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.8;
  margin-bottom: 28px;
  color: var(--text);
}
.q-num-label {
  color: var(--blue);
  font-weight: 700;
  margin-right: 6px;
}

/* 보기 버튼 */
.options-form, .options-result { display: flex; flex-direction: column; gap: 10px; }

.option-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 18px;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  cursor: pointer;
  text-align: left;
  color: var(--text);
  transition: all .12s;
}
.option-btn:hover { border-color: var(--blue); background: #EFF6FF; }

.option-btn.correct { border-color: var(--green); background: var(--green-l); color: #14532D; }
.option-btn.wrong   { border-color: var(--red);   background: var(--red-l);   color: #7F1D1D; }
.option-btn.inactive { color: var(--gray); }

.circle-num {
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}
.option-text { flex: 1; }

.badge-result {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(0,0,0,.08);
  flex-shrink: 0;
}

/* 결과 배너 */
.result-banner {
  margin: 20px 0;
  padding: 14px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 16px;
}
.correct-banner { background: var(--green-l); color: #14532D; }
.wrong-banner   { background: var(--red-l);   color: #7F1D1D; }

/* 해설 박스 */
.explanation-box {
  background: #FAFAFA;
  border: 1px solid var(--border);
  border-left: 4px solid var(--blue);
  border-radius: 0 10px 10px 0;
  padding: 18px 20px;
  margin: 16px 0 24px;
}
.explanation-title { font-weight: 700; color: var(--blue); margin-bottom: 10px; }
.explanation-body  { font-size: 14px; line-height: 1.9; color: var(--text-m); }
.explanation-body ul { padding-left: 20px; margin-top: 8px; }
.explanation-body li { margin-bottom: 4px; }

/* 이전/다음 버튼 */
.nav-btns {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

/* 문제 번호 패드 */
.question-pad {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 8px;
}
.pad-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--text-m);
}
.pad-num:hover  { border-color: var(--blue); color: var(--blue); }
.pad-num.current { background: var(--blue); color: var(--white); border-color: var(--blue); }

/* ══ 결과 페이지 ══ */
.rs-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 36px 40px 32px;
  text-align: center;
  max-width: 560px;
  margin: 0 auto 40px;
}

.rs-verdict {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  padding: 5px 18px;
  border-radius: 99px;
  margin-bottom: 20px;
  letter-spacing: .3px;
}
.rs-verdict-pass { background: var(--green-l); color: #14532D; }
.rs-verdict-fail { background: var(--red-l);   color: #7F1D1D; }

.rs-score-wrap { margin-bottom: 4px; }
.rs-pct  { font-size: 64px; font-weight: 800; letter-spacing: -2px; line-height: 1; color: var(--text); }
.rs-unit { font-size: 22px; font-weight: 600; color: var(--gray); margin-left: 2px; }
.rs-fraction { font-size: 14px; color: var(--gray); margin-bottom: 20px; }

/* 진행 바 */
.rs-bar-outer {
  position: relative;
  height: 8px;
  background: var(--gray-l);
  border-radius: 99px;
  margin-bottom: 6px;
  overflow: visible;
}
.rs-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width .8s cubic-bezier(.4,0,.2,1);
}
.rs-bar-pass { background: var(--green); }
.rs-bar-fail { background: var(--red); }
.rs-bar-mark {
  position: absolute;
  top: -4px;
  left: 60%;
  transform: translateX(-50%);
  width: 2px;
  height: 16px;
  background: var(--text-m);
  border-radius: 1px;
}
.rs-bar-hint { font-size: 11px; color: var(--gray); text-align: right; margin-bottom: 24px; }

/* 통계 행 */
.rs-stat-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  margin-bottom: 28px;
  background: var(--gray-l);
  border-radius: 12px;
  padding: 16px 0;
}
.rs-stat { flex: 1; }
.rs-stat-num   { font-size: 26px; font-weight: 700; line-height: 1.2; }
.rs-stat-label { font-size: 12px; color: var(--gray); margin-top: 2px; }
.rs-stat-ok .rs-stat-num { color: var(--green); }
.rs-stat-ng .rs-stat-num { color: var(--red); }
.rs-stat-sep { width: 1px; height: 36px; background: var(--border); }

.rs-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ── 오답/정답 섹션 ── */
.rs-section { margin-bottom: 36px; }
.rs-section-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.rs-count-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 99px;
}
.rs-count-ng { background: var(--red-l);   color: #B91C1C; }
.rs-count-ok { background: var(--green-l); color: #15803D; }

/* 오답 아이템 */
.rs-wrong-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--red);
  border-radius: 0 12px 12px 0;
  padding: 18px 20px;
  margin-bottom: 12px;
}
.rs-item-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.rs-qnum { font-size: 13px; font-weight: 700; color: var(--blue); }
.rs-qtext { font-size: 14px; color: var(--text); margin-bottom: 12px; line-height: 1.6; }

.rs-answer-row {
  display: flex;
  gap: 20px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.rs-my-ans { color: var(--red); }
.rs-ok-ans { color: var(--green); }

.rs-explanation {
  font-size: 13px;
  color: var(--text-m);
  background: #F8FAFC;
  border-radius: 8px;
  padding: 12px 14px;
  line-height: 1.7;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

/* 정답 칩 그리드 */
.rs-correct-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.rs-correct-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--green-l);
  border-radius: 99px;
  font-size: 12px;
}
.rs-chip-num   { font-weight: 700; color: #15803D; }
.rs-chip-topic { color: #166534; }

/* ══ 학습 모드 ══ */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.page-header > div { flex: 1; }
.page-header h1 { font-size: 24px; font-weight: 700; letter-spacing: -.3px; margin-bottom: 4px; }
.page-header p  { color: var(--text-m); font-size: 14px; }
.page-header .btn { flex-shrink: 0; margin-top: 4px; }

.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.filter-btn {
  padding: 7px 16px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--white);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  color: var(--text-m);
}
.filter-btn:hover { border-color: var(--blue); color: var(--blue); }
.filter-btn.active { background: var(--blue); border-color: var(--blue); color: var(--white); }

.study-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}
.study-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.study-question {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.8;
  margin-bottom: 16px;
}
.study-options { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.study-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  border: 1px solid var(--border);
}
.study-correct {
  background: var(--green-l);
  border-color: var(--green);
  font-weight: 600;
  color: #14532D;
}
.correct-star { margin-left: auto; color: var(--green); font-size: 12px; font-weight: 700; }

/* 해설 토글 */
.explanation-toggle {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.explanation-toggle summary {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
  background: #F8FAFC;
  user-select: none;
}
.explanation-toggle summary:hover { background: #EFF6FF; }
.explanation-toggle .explanation-body { padding: 14px; }

/* ══ 이론 페이지 ══ */

/* 탭 - sticky로 스크롤 중에도 탭 전환 가능 */
.theory-tabs {
  position: sticky;
  top: 60px;
  z-index: 50;
  background: #F8FAFC;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 10px 0 12px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.tab-btn {
  padding: 7px 18px;
  border-radius: 99px;
  border: 1.5px solid var(--border);
  background: var(--white);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-m);
  transition: all .15s;
  white-space: nowrap;
}
.tab-btn:hover { border-color: var(--blue); color: var(--blue); background: #EFF6FF; }
.tab-btn.active {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(37,99,235,.25);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* 소개 박스 */
.theory-intro {
  background: linear-gradient(135deg, #EFF6FF 0%, #F0F9FF 100%);
  border: 1px solid #BFDBFE;
  border-left: 4px solid var(--blue);
  border-radius: 0 12px 12px 0;
  padding: 16px 20px;
  margin-bottom: 32px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--text);
}

/* 섹션 제목 */
.section-title {
  font-size: 15px;
  font-weight: 700;
  margin: 36px 0 14px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -.1px;
}

/* 공식 카드 */
.formula-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}
.formula-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.formula-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 10px;
}
.formula-main {
  background: #F0F6FF;
  border-radius: 8px;
  padding: 12px 8px;
  margin-bottom: 12px;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  border: 1px solid #DBEAFE;
}
.formula-desc {
  font-size: 13px;
  color: var(--text-m);
  line-height: 1.85;
  border-top: 1px dashed var(--border);
  padding-top: 10px;
}

/* 다이어그램 */
.diagram-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.diagram-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  overflow: hidden;
}
.diagram-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.diagram-art {
  font-family: 'Courier New', Consolas, monospace;
  font-size: 12px;
  white-space: pre;
  line-height: 1.55;
  color: var(--text);
  background: #F8FAFC;
  border-radius: 6px;
  padding: 10px 12px;
  overflow-x: auto;
}

/* 주의사항 */
.warn-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}
.warn-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-left: 3px solid #F59E0B;
  border-radius: 0 10px 10px 0;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.75;
}
.warn-icon {
  font-size: 15px;
  font-weight: 700;
  color: #D97706;
  flex-shrink: 0;
  margin-top: 2px;
}

/* 암기 팁 */
.tip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}
.tip-card {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.8;
}
.tip-title {
  font-size: 11px;
  font-weight: 700;
  color: #15803D;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 7px;
}

/* 맥스웰 방정식 카드 */
.maxwell-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}
.maxwell-card {
  display: flex;
  gap: 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.maxwell-num {
  font-size: 20px;
  font-weight: 900;
  color: var(--blue);
  flex-shrink: 0;
  width: 28px;
  line-height: 1.2;
  background: #EFF6FF;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}
.maxwell-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 6px;
}
.maxwell-formula { margin-bottom: 8px; }
.maxwell-meaning {
  font-size: 13px;
  color: var(--text-m);
  line-height: 1.75;
}

/* 이론 하단 버튼 */
.theory-footer-nav {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

/* ══ 과목 배너 (퀴즈·결과·학습 상단) ══ */
.subject-banner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 99px;
  margin-bottom: 16px;
  background: #EFF6FF;
  color: var(--blue);
  border: 1px solid #BFDBFE;
}

/* ══ 홈 과목 선택 카드 ══ */
.section-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray);
  letter-spacing: .5px;
  text-transform: uppercase;
  margin: 0 0 14px;
}

.subject-select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 0;
}

.subject-select-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform .15s, box-shadow .15s;
}
.subject-select-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
}

.subject-select-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
}
.em-top  { background: linear-gradient(135deg, #1D4ED8, #2563EB); color: var(--white); }
.ct-top  { background: linear-gradient(135deg, #5B21B6, #7C3AED); color: var(--white); }
.pw-top  { background: linear-gradient(135deg, #15803D, #16A34A); color: var(--white); }
.mc-top  { background: linear-gradient(135deg, #C2410C, #EA580C); color: var(--white); }
.std-top { background: linear-gradient(135deg, #0F766E, #0D9488); color: var(--white); }

.subject-select-icon { font-size: 28px; flex-shrink: 0; }
.subject-select-name { font-size: 17px; font-weight: 700; line-height: 1.3; }
.subject-select-count { font-size: 12px; opacity: .8; margin-top: 2px; }

.subject-topics {
  padding: 12px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}
.topic-pill {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 9px;
  border-radius: 99px;
  background: var(--gray-l);
  color: var(--text-m);
}

.subject-select-actions {
  padding: 12px 16px;
  display: flex;
  gap: 8px;
  border-top: 1px solid var(--border);
}
.subject-select-actions .btn {
  flex: 1;
  justify-content: center;
  padding: 9px 8px;
  font-size: 13px;
}
.subject-select-actions .btn-primary { flex: 1.4; }

/* ── 반응형 ── */
@media (max-width: 600px) {
  .hero h1    { font-size: 22px; }
  .hero-meta  { flex-direction: column; gap: 6px; }
  .hero-meta .dot { display: none; }
  .question-text { font-size: 15px; }
  .nav-btns { flex-direction: column; }
  .page-header { flex-direction: column; align-items: flex-start; }
  nav > .nav-subj { display: none; }
  nav > .nav-subj:nth-child(-n+3) { display: block; }
  .subject-select-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .subject-select-actions { flex-direction: column; }
  .subject-select-actions .btn-primary { flex: unset; }
}
