/* =====================================================
   Q-P-A-T-H 초개별화 영어 수업 플랫폼 - 메인 스타일
===================================================== */

:root {
  --q-color: #6C63FF;
  --q-light: #EEF0FF;
  --p-color: #22C55E;
  --p-light: #DCFCE7;
  --a-color: #F59E0B;
  --a-light: #FEF3C7;
  --t-color: #EF4444;
  --t-light: #FEE2E2;
  --h-color: #EC4899;
  --h-light: #FCE7F3;
  --seed-color: #F97316;
  --seed-light: #FFF7ED;
  --sprout-color: #22C55E;
  --sprout-light: #F0FDF4;
  --flower-color: #A855F7;
  --flower-light: #FAF5FF;

  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --transition: all 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Noto Sans KR', 'Inter', sans-serif;
  background: #F0F2F8;
  color: var(--gray-800);
  min-height: 100vh;
}

/* ===== HEADER ===== */
#main-header {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
  color: white;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(0,0,0,0.2);
}
.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  flex-wrap: wrap;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 14px;
}
.logo-badge {
  background: linear-gradient(135deg, #818CF8, #C084FC);
  color: white;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 2px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(129,140,248,0.4);
}
.header-title-wrap h1 {
  font-size: 18px;
  font-weight: 700;
  color: white;
  line-height: 1.2;
}
.header-title-wrap p {
  font-size: 11px;
  color: #A5B4FC;
  margin-top: 2px;
  letter-spacing: 0.5px;
}
.header-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.unit-selector-wrap label {
  font-size: 12px;
  color: #A5B4FC;
  display: block;
  margin-bottom: 5px;
}
.unit-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.unit-tab {
  background: rgba(255,255,255,0.1);
  color: #C7D2FE;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Noto Sans KR', sans-serif;
}
.unit-tab:hover { background: rgba(255,255,255,0.18); color: white; }
.unit-tab.active {
  background: #818CF8;
  color: white;
  border-color: #818CF8;
  box-shadow: 0 2px 8px rgba(129,140,248,0.5);
}
.unit-tab.review-tab.active {
  background: linear-gradient(135deg, #F59E0B, #EF4444);
  border-color: #F59E0B;
}
/* 2학기 단원 탭 */
.unit-tab.s2 {
  background: rgba(249,115,22,0.12);
  color: #FDBA74;
  border-color: rgba(249,115,22,0.25);
}
.unit-tab.s2:hover { background: rgba(249,115,22,0.25); color: white; }
.unit-tab.s2.active {
  background: #F97316;
  color: white;
  border-color: #F97316;
  box-shadow: 0 2px 8px rgba(249,115,22,0.5);
}
.unit-tab.review-tab.s2.active {
  background: linear-gradient(135deg, #EA580C, #DC2626);
  border-color: #EA580C;
}
/* 학기 구분선 */
.semester-divider {
  color: rgba(255,255,255,0.2);
  font-size: 18px;
  display: flex;
  align-items: center;
  padding: 0 4px;
}
.semester-label {
  font-size: 11px;
  font-weight: 700;
  color: #A5B4FC;
  white-space: nowrap;
  display: flex;
  align-items: center;
  padding: 0 4px;
}
.semester-label-2 { color: #FDBA74; }
.mode-selector {
  display: flex;
  gap: 4px;
  background: rgba(0,0,0,0.2);
  padding: 4px;
  border-radius: var(--radius-md);
}
.mode-btn {
  background: transparent;
  color: #A5B4FC;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Noto Sans KR', sans-serif;
}
.mode-btn.active {
  background: white;
  color: #312e81;
  box-shadow: var(--shadow-sm);
}

/* ===== CURRENT UNIT BANNER ===== */
.current-unit-banner {
  background: linear-gradient(90deg, #312e81, #4c1d95);
  color: white;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
}
#currentUnitText { color: #E0E7FF; }
.mode-badge {
  background: rgba(255,255,255,0.15);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
}

/* ===== MAIN NAV ===== */
#mainNav {
  background: white;
  border-bottom: 2px solid var(--gray-200);
  padding: 0 24px;
  overflow-x: auto;
}
.nav-group {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 0;
  max-width: 1400px;
  margin: 0 auto;
}
.nav-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-400);
  letter-spacing: 0.5px;
  padding: 0 8px;
  white-space: nowrap;
  border-right: 1px solid var(--gray-200);
  margin-right: 4px;
  padding-right: 12px;
}
.nav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Noto Sans KR', sans-serif;
  white-space: nowrap;
}
.nav-btn:hover { background: var(--gray-100); }
.tab-step {
  width: 26px;
  height: 26px;
  background: var(--gray-200);
  color: var(--gray-600);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
  transition: var(--transition);
}
.tab-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
}
/* ── 기본 활성 (Q탭) ── */
.nav-btn.active .tab-step { background: var(--q-color); color: white; box-shadow: 0 2px 8px rgba(108,99,255,0.4); }
.nav-btn.active .tab-name { color: var(--q-color); }
.nav-btn.active { background: var(--q-light); }

/* ── Q탭 스텝 기본색 ── */
.q-step  { background: #E0E7FF; color: var(--q-color); }
.p-step  { background: #DCFCE7; color: var(--p-color); }
.a-step  { background: #FEF3C7; color: #D97706; }
.g-step  { background: #F0FDF4; color: var(--p-color); }
.h-step  { background: #FCE7F3; color: var(--h-color); }
.r-step  { background: #FEF9C3; color: #CA8A04; }

/* ── P탭 활성 ── */
.nav-btn[data-tab="p-teacher"].active .tab-step,
.nav-btn[data-tab="p-student"].active  .tab-step { background: var(--p-color); color:white; box-shadow: 0 2px 8px rgba(34,197,94,0.4); }
.nav-btn[data-tab="p-teacher"].active,
.nav-btn[data-tab="p-student"].active  { background: var(--p-light); }
.nav-btn[data-tab="p-teacher"].active .tab-name,
.nav-btn[data-tab="p-student"].active  .tab-name { color: var(--p-color); }

/* ── 분석/피드백탭 활성 ── */
.nav-btn[data-tab="analysis"].active .tab-step,
.nav-btn[data-tab="feedback"].active .tab-step { background: var(--a-color); color:white; box-shadow: 0 2px 8px rgba(245,158,11,0.4); }
.nav-btn[data-tab="analysis"].active,
.nav-btn[data-tab="feedback"].active { background: var(--a-light); }
.nav-btn[data-tab="analysis"].active .tab-name,
.nav-btn[data-tab="feedback"].active .tab-name { color: var(--a-color); }

/* ── 그룹탭 활성 ── */
.nav-btn[data-tab="group-plan"].active .tab-step,
.nav-btn[data-tab="group-view"].active .tab-step { background: #059669; color:white; }
.nav-btn[data-tab="group-plan"].active,
.nav-btn[data-tab="group-view"].active { background: #ECFDF5; }
.nav-btn[data-tab="group-plan"].active .tab-name,
.nav-btn[data-tab="group-view"].active .tab-name { color: #059669; }

/* ── 패들렛(H)탭 활성 ── */
.nav-btn[data-tab="padlet"].active .tab-step,
.nav-btn[data-tab="padlet-teacher"].active .tab-step { background: var(--h-color); color:white; box-shadow: 0 2px 8px rgba(236,72,153,0.4); }
.nav-btn[data-tab="padlet"].active,
.nav-btn[data-tab="padlet-teacher"].active { background: var(--h-light); }
.nav-btn[data-tab="padlet"].active .tab-name,
.nav-btn[data-tab="padlet-teacher"].active .tab-name { color: var(--h-color); }

/* ── 1학기 총정리탭 활성 ── */
.nav-btn[data-tab="review-teacher"].active .tab-step,
.nav-btn[data-tab="review-student"].active .tab-step { background: linear-gradient(135deg,#F59E0B,#EF4444); color:white; }
.nav-btn[data-tab="review-teacher"].active,
.nav-btn[data-tab="review-student"].active { background: #FEF3C7; }
.nav-btn[data-tab="review-teacher"].active .tab-name,
.nav-btn[data-tab="review-student"].active .tab-name { color: #D97706; }
/* ── 2학기 총정리탭 활성 ── */
.r2-step { background: #FFF7ED; color: #EA580C; }
.nav-btn[data-tab="review2-teacher"].active .tab-step,
.nav-btn[data-tab="review2-student"].active .tab-step { background: linear-gradient(135deg,#EA580C,#DC2626); color:white; }
.nav-btn[data-tab="review2-teacher"].active,
.nav-btn[data-tab="review2-student"].active { background: #FFF7ED; }
.nav-btn[data-tab="review2-teacher"].active .tab-name,
.nav-btn[data-tab="review2-student"].active .tab-name { color: #EA580C; }

/* ===== MAIN CONTENT ===== */
#mainContent {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}
.tab-content { display: block; }
.tab-content.hidden { display: none; }

/* ===== SECTION HEADER ===== */
.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  border-left: 5px solid transparent;
}
.section-header.q-color { border-left-color: var(--q-color); }
.section-header.p-color { border-left-color: var(--p-color); }
.section-header.a-color { border-left-color: var(--a-color); }
.section-header.h-color { border-left-color: var(--h-color); }
.section-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  flex-shrink: 0;
}
.q-color .section-icon { background: var(--q-light); color: var(--q-color); }
.p-color .section-icon { background: var(--p-light); color: var(--p-color); }
.a-color .section-icon { background: var(--a-light); color: var(--a-color); }
.h-color .section-icon { background: var(--h-light); color: var(--h-color); }
.section-header h2 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.section-header p { font-size: 13px; color: var(--gray-500); }
.sub-badge {
  background: var(--gray-100);
  color: var(--gray-500);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: 8px;
}

/* ===== UNIT LABEL BAR ===== */
.unit-label-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: white;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-700);
  box-shadow: var(--shadow-sm);
}
.unit-label-bar i { color: var(--q-color); }
.save-all-btn {
  margin-left: auto;
  background: var(--q-color);
  color: white;
  border: none;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Noto Sans KR', sans-serif;
  display: flex;
  align-items: center;
  gap: 6px;
}
.save-all-btn:hover { opacity: 0.85; transform: translateY(-1px); }

/* ===== STUDENT INFO BAR ===== */
.student-info-bar {
  background: white;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.student-info-form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.student-input {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  font-size: 14px;
  font-family: 'Noto Sans KR', sans-serif;
  outline: none;
  transition: var(--transition);
  flex: 1;
  min-width: 120px;
}
.student-input:focus { border-color: var(--q-color); box-shadow: 0 0 0 3px rgba(108,99,255,0.1); }
.student-input.short { max-width: 80px; flex: none; }
.student-input.long { flex: 2; }
.confirm-btn {
  background: var(--q-color);
  color: white;
  border: none;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Noto Sans KR', sans-serif;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.confirm-btn:hover { background: #5852d6; transform: translateY(-1px); }

/* ===== QUESTION GRID (Q탭 교사) ===== */
.question-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}
.question-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border-top: 4px solid transparent;
}
.question-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.question-card.type-core { border-top-color: var(--q-color); }
.question-card.type-intro { border-top-color: var(--p-color); }
.question-card.type-inquiry { border-top-color: var(--a-color); }
.question-card.type-extend { border-top-color: var(--t-color); }
.question-card.type-reflect { border-top-color: var(--h-color); }
.question-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.q-type-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.badge-core { background: var(--q-light); color: var(--q-color); }
.badge-intro { background: var(--p-light); color: var(--p-color); }
.badge-inquiry { background: var(--a-light); color: #D97706; }
.badge-extend { background: var(--t-light); color: var(--t-color); }
.badge-reflect { background: var(--h-light); color: var(--h-color); }
.question-card textarea {
  width: 100%;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 13px;
  font-family: 'Noto Sans KR', sans-serif;
  resize: vertical;
  min-height: 100px;
  outline: none;
  transition: var(--transition);
  color: var(--gray-700);
  line-height: 1.6;
}
.question-card textarea:focus { border-color: var(--q-color); box-shadow: 0 0 0 3px rgba(108,99,255,0.08); }
.question-sub-inputs { margin-top: 10px; }
.question-sub-inputs input {
  width: 100%;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 12px;
  font-family: 'Noto Sans KR', sans-serif;
  margin-top: 6px;
  outline: none;
  color: var(--gray-600);
}
.question-sub-inputs input:focus { border-color: var(--q-color); }
.question-sub-inputs label { font-size: 11px; color: var(--gray-400); font-weight: 600; margin-top: 8px; display: block; }

/* ===== STUDENT QUESTION LIST ===== */
.student-question-list { display: flex; flex-direction: column; gap: 16px; }
.student-q-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid transparent;
  transition: var(--transition);
}
.student-q-card.type-core { border-left-color: var(--q-color); }
.student-q-card.type-intro { border-left-color: var(--p-color); }
.student-q-card.type-inquiry { border-left-color: var(--a-color); }
.student-q-card.type-extend { border-left-color: var(--t-color); }
.student-q-card.type-reflect { border-left-color: var(--h-color); }
.student-q-card:hover { box-shadow: var(--shadow-md); }
.sq-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.sq-question-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-800);
  line-height: 1.6;
  margin-bottom: 14px;
  padding: 12px 14px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
}
.sq-answer-area { display: flex; flex-direction: column; gap: 8px; }
.sq-answer-area label { font-size: 12px; font-weight: 700; color: var(--gray-500); }
.sq-answer-area textarea {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 13px;
  font-family: 'Noto Sans KR', sans-serif;
  resize: vertical;
  min-height: 80px;
  outline: none;
  transition: var(--transition);
}
.sq-answer-area textarea:focus { border-color: var(--q-color); box-shadow: 0 0 0 3px rgba(108,99,255,0.08); }
.sq-submit-btn {
  align-self: flex-end;
  background: var(--q-color);
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Noto Sans KR', sans-serif;
}
.sq-submit-btn:hover { background: #5852d6; }
.sq-saved-tag {
  font-size: 11px;
  color: var(--p-color);
  background: var(--p-light);
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 600;
}

/* ===== QUESTION BANK (P탭 교사) ===== */
.question-bank { display: flex; flex-direction: column; gap: 10px; }
.qbank-item {
  background: white;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: var(--transition);
}
.qbank-item:hover { box-shadow: var(--shadow-md); }
.qbank-num {
  width: 32px;
  height: 32px;
  background: var(--p-light);
  color: var(--p-color);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}
.qbank-body { flex: 1; }
.qbank-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.qbank-category {
  background: var(--p-light);
  color: var(--p-color);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}
.qbank-type-badge {
  background: var(--gray-100);
  color: var(--gray-600);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
}
.qbank-points {
  background: var(--a-light);
  color: #D97706;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}
.qbank-text { font-size: 14px; color: var(--gray-700); line-height: 1.5; margin-bottom: 6px; }
.qbank-options { font-size: 12px; color: var(--gray-500); }
.qbank-options span { margin-right: 10px; }
.qbank-answer { font-size: 12px; color: var(--p-color); font-weight: 700; margin-top: 4px; }
.qbank-actions { display: flex; gap: 6px; flex-shrink: 0; }
.del-btn {
  background: var(--t-light);
  color: var(--t-color);
  border: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
}
.del-btn:hover { background: var(--t-color); color: white; }

/* ===== DIAGNOSTIC (학생 평가) ===== */
.diagnostic-container {
  background: white;
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.diagnostic-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.diagnostic-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--gray-500);
}
.progress-bar-wrap {
  width: 160px;
  height: 8px;
  background: var(--gray-200);
  border-radius: 4px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--p-color), #86EFAC);
  border-radius: 4px;
  transition: width 0.4s ease;
}
.diag-question-card {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 16px;
  transition: var(--transition);
}
.diag-question-card:hover { border-color: var(--p-color); }
.diag-q-header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.diag-q-num {
  width: 28px; height: 28px;
  background: var(--p-color);
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  flex-shrink: 0;
}
.diag-q-text { font-size: 15px; font-weight: 600; color: var(--gray-800); line-height: 1.6; margin-bottom: 14px; }
.diag-options { display: flex; flex-direction: column; gap: 8px; }
.diag-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
}
.diag-option:hover { border-color: var(--p-color); background: var(--p-light); }
.diag-option.selected { border-color: var(--p-color); background: var(--p-light); font-weight: 600; }
.diag-option input[type="radio"] { accent-color: var(--p-color); }
.diag-short-input {
  width: 100%;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  font-family: 'Noto Sans KR', sans-serif;
  outline: none;
}
.diag-short-input:focus { border-color: var(--p-color); }
.submit-diag-btn {
  display: block;
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--p-color), #16A34A);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Noto Sans KR', sans-serif;
  margin-top: 20px;
}
.submit-diag-btn:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: var(--shadow-md); }

/* ===== ANALYSIS ===== */
.analysis-summary {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.summary-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.summary-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.summary-num { font-size: 28px; font-weight: 800; margin-bottom: 4px; }
.summary-label { font-size: 12px; color: var(--gray-500); font-weight: 500; }
.chart-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.chart-box {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.chart-box h3 { font-size: 14px; font-weight: 700; color: var(--gray-700); margin-bottom: 14px; }
.result-table-wrap {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.result-table-wrap h3 { font-size: 14px; font-weight: 700; color: var(--gray-700); margin-bottom: 14px; }
.result-table { width: 100%; border-collapse: collapse; }
.result-table th {
  background: var(--gray-50);
  padding: 10px 14px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-600);
  border-bottom: 1px solid var(--gray-200);
}
.result-table td {
  padding: 12px 14px;
  font-size: 13px;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-100);
}
.result-table tr:hover td { background: var(--gray-50); }
.crew-tag {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}
.crew-seed { background: var(--seed-light); color: var(--seed-color); }
.crew-sprout { background: var(--sprout-light); color: var(--sprout-color); }
.crew-flower { background: var(--flower-light); color: var(--flower-color); }
.empty-cell { text-align: center; color: var(--gray-400); padding: 30px; font-size: 14px; }

/* ===== FEEDBACK ===== */
.feedback-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}
.feedback-crew-banner {
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.crew-icon { font-size: 40px; }
.crew-info h3 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.crew-info p { font-size: 13px; opacity: 0.85; }
.score-display {
  margin-left: auto;
  text-align: center;
}
.score-big { font-size: 36px; font-weight: 800; }
.score-label { font-size: 11px; opacity: 0.8; }
.weak-area-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.weak-area-tag {
  background: var(--t-light);
  color: var(--t-color);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.strong-area-tag {
  background: var(--p-light);
  color: var(--p-color);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.feedback-chart-wrap { height: 200px; margin-top: 16px; }

/* ===== CREW PLAN GRID ===== */
.crew-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.crew-plan-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  border-top: 5px solid transparent;
  transition: var(--transition);
}
.crew-plan-card:hover { box-shadow: var(--shadow-md); }
.crew-plan-card.seed { border-top-color: var(--seed-color); }
.crew-plan-card.sprout { border-top-color: var(--sprout-color); }
.crew-plan-card.flower { border-top-color: var(--flower-color); }
.crew-header { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.crew-emoji { font-size: 28px; }
.crew-title { font-size: 16px; font-weight: 800; }
.crew-sub { font-size: 11px; color: var(--gray-400); font-weight: 500; margin-top: 1px; }
.crew-plan-section { margin-bottom: 16px; }
.crew-plan-section label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-500);
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  text-transform: uppercase;
}
.crew-plan-section textarea {
  width: 100%;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px;
  font-family: 'Noto Sans KR', sans-serif;
  resize: vertical;
  min-height: 90px;
  outline: none;
  transition: var(--transition);
  line-height: 1.6;
}
.crew-plan-section textarea:focus { border-color: var(--q-color); box-shadow: 0 0 0 3px rgba(108,99,255,0.08); }

/* ===== GROUP VIEW (학생) ===== */
.group-view-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.gv-banner {
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.gv-crew-emoji { font-size: 48px; }
.gv-crew-info h3 { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.gv-crew-info p { font-size: 13px; opacity: 0.8; }
.gv-section { margin-bottom: 24px; }
.gv-section h4 { font-size: 14px; font-weight: 700; color: var(--gray-700); margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.gv-content-box {
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-size: 14px;
  color: var(--gray-700);
  line-height: 1.8;
  white-space: pre-wrap;
}
.checklist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: white;
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  border: 1px solid var(--gray-100);
  transition: var(--transition);
}
.checklist-item:hover { background: var(--gray-50); }
.checklist-item input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--p-color); cursor: pointer; }
.checklist-item label { font-size: 13px; color: var(--gray-700); cursor: pointer; flex: 1; }
.checklist-item input:checked + label { text-decoration: line-through; color: var(--gray-400); }

/* ===== PADLET ===== */
.padlet-write-box {
  background: white;
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}
.padlet-form { margin-bottom: 12px; }
.padlet-content-row { display: flex; gap: 12px; }
.padlet-content-row textarea {
  flex: 2;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 14px;
  font-family: 'Noto Sans KR', sans-serif;
  resize: vertical;
  outline: none;
  transition: var(--transition);
}
.padlet-content-row textarea:focus { border-color: var(--h-color); box-shadow: 0 0 0 3px rgba(236,72,153,0.08); }
.padlet-media-col { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.post-btn {
  background: linear-gradient(135deg, var(--h-color), #DB2777);
  color: white;
  border: none;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Noto Sans KR', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: auto;
}
.post-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.padlet-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.padlet-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.padlet-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.padlet-card-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--h-light), #FDF2F8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}
.padlet-card-img img { width: 100%; height: 100%; object-fit: cover; }
.padlet-card-body { padding: 16px; }
.padlet-card-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.padlet-author {
  font-size: 12px;
  font-weight: 700;
  color: var(--h-color);
  background: var(--h-light);
  padding: 2px 8px;
  border-radius: 20px;
}
.padlet-card-title { font-size: 15px; font-weight: 700; color: var(--gray-800); margin-bottom: 8px; }
.padlet-card-content { font-size: 13px; color: var(--gray-600); line-height: 1.6; margin-bottom: 10px; }
.padlet-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.padlet-tag {
  background: var(--gray-100);
  color: var(--gray-500);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
}
.padlet-card-actions { display: flex; align-items: center; gap: 8px; }
.like-btn {
  background: var(--h-light);
  color: var(--h-color);
  border: none;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 4px;
}
.like-btn:hover { background: var(--h-color); color: white; }
.padlet-time { font-size: 11px; color: var(--gray-400); margin-left: auto; }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-box {
  background: white;
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-200);
}
.modal-header h3 { font-size: 16px; font-weight: 700; }
.modal-close {
  background: var(--gray-100);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 13px;
  color: var(--gray-600);
  transition: var(--transition);
}
.modal-close:hover { background: var(--gray-200); }
.modal-body { padding: 20px 24px; }
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 24px;
  border-top: 1px solid var(--gray-200);
}
.cancel-btn {
  background: var(--gray-100);
  color: var(--gray-600);
  border: none;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Noto Sans KR', sans-serif;
}
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12px; font-weight: 700; color: var(--gray-600); margin-bottom: 6px; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 14px;
  font-family: 'Noto Sans KR', sans-serif;
  outline: none;
  transition: var(--transition);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--q-color);
  box-shadow: 0 0 0 3px rgba(108,99,255,0.1);
}
.form-textarea { resize: vertical; min-height: 80px; }

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--gray-800);
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  z-index: 300;
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.3s ease;
  max-width: 320px;
  box-shadow: var(--shadow-lg);
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: var(--p-color); }
.toast.error { background: var(--t-color); }
.toast.info { background: var(--q-color); }

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--gray-400);
  font-size: 14px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.empty-state i { font-size: 24px; }

/* ===== RESULT SCORE DISPLAY ===== */
.result-score-card {
  background: linear-gradient(135deg, #1e1b4b, #4c1d95);
  color: white;
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  margin-bottom: 20px;
}
.result-score-card h2 { font-size: 18px; margin-bottom: 8px; opacity: 0.9; }
.result-score-big { font-size: 56px; font-weight: 800; margin: 8px 0; }
.result-score-sub { font-size: 14px; opacity: 0.7; }
.result-answers-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 10px; margin-top: 16px; }
.answer-chip {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.answer-chip.correct { background: var(--p-light); color: var(--p-color); }
.answer-chip.wrong { background: var(--t-light); color: var(--t-color); }

/* ===== HIDDEN ===== */
.hidden { display: none !important; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .crew-plan-grid { grid-template-columns: 1fr; }
  .chart-row { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  #mainContent { padding: 12px; }
  .header-inner { padding: 10px 0; }
  .header-title-wrap h1 { font-size: 14px; }
  .padlet-content-row { flex-direction: column; }
  .unit-tabs { gap: 2px; }
  .unit-tab { padding: 5px 8px; font-size: 11px; }
  .question-grid { grid-template-columns: 1fr; }
}

/* ===== REVIEW TAB ===== */
.review-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.review-unit-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition);
  border-left: 4px solid var(--q-color);
}
.review-unit-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.review-unit-card h4 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.review-unit-card p { font-size: 12px; color: var(--gray-500); }
.review-progress-wrap { margin-top: 10px; }
.review-progress-bar { height: 6px; background: var(--gray-100); border-radius: 3px; overflow: hidden; }
.review-progress-fill { height: 100%; background: var(--q-color); border-radius: 3px; }
.review-quiz-section {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

/* ===== 단원 색상별 카드 보더 ===== */
.review-unit-1 { border-top-color: #6C63FF; }
.review-unit-2 { border-top-color: #22C55E; }
.review-unit-3 { border-top-color: #F59E0B; }
.review-unit-4 { border-top-color: #EF4444; }
.review-unit-5 { border-top-color: #EC4899; }
.review-unit-6 { border-top-color: #3B82F6; }

/* ===== SCORE BADGE ===== */
.score-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
}
.score-high { background: var(--p-light); color: var(--p-color); }
.score-mid { background: var(--a-light); color: #D97706; }
.score-low { background: var(--t-light); color: var(--t-color); }

/* ===================================================
   Q탭 - 교사: 학생 답변 조회 패널
=================================================== */
.answers-panel {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-top: 24px;
  overflow: hidden;
  border: 1.5px solid var(--gray-100);
}
.answers-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: linear-gradient(135deg, #EEF0FF, #F5F3FF);
  border-bottom: 1.5px solid var(--gray-200);
  flex-wrap: wrap;
  gap: 10px;
}
.answers-panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-800);
}
.answers-panel-title i { color: var(--q-color); font-size: 16px; }
.answers-count-badge {
  background: var(--q-color);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 20px;
}
.answer-filter-select {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-size: 13px;
  font-family: 'Noto Sans KR', sans-serif;
  outline: none;
  cursor: pointer;
  background: white;
  color: var(--gray-700);
}
.answer-filter-select:focus { border-color: var(--q-color); }

/* 학생별 카드 */
.teacher-student-card {
  border-bottom: 1px solid var(--gray-100);
  padding: 16px 20px;
  transition: var(--transition);
}
.teacher-student-card:last-child { border-bottom: none; }
.teacher-student-card:hover { background: var(--gray-50); }
.teacher-student-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.teacher-student-num {
  background: var(--q-color);
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.teacher-student-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-800);
}
.teacher-ans-count {
  margin-left: auto;
  font-size: 11px;
  color: var(--gray-400);
  font-weight: 600;
}
.teacher-ans-list { display: flex; flex-direction: column; gap: 10px; }
.teacher-ans-block {
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  border-left: 3px solid var(--q-color);
}
.teacher-q-text {
  font-size: 12px;
  color: var(--gray-500);
  margin: 6px 0 4px;
  font-style: italic;
}
.teacher-ans-text {
  font-size: 14px;
  color: var(--gray-700);
  line-height: 1.7;
  white-space: pre-wrap;
}

/* ===================================================
   Q탭 - 학생: 친구 답변 보기
=================================================== */
.peer-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  background: white;
  border: 1.5px solid var(--gray-200);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  user-select: none;
}
.peer-toggle:hover { border-color: var(--q-color); color: var(--q-color); }
.peer-toggle input[type="checkbox"] {
  accent-color: var(--q-color);
  width: 15px;
  height: 15px;
  cursor: pointer;
}
.peer-toggle span { display: flex; align-items: center; gap: 6px; }

/* 친구 답변 섹션 */
.sq-peer-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1.5px dashed var(--gray-200);
}
.peer-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-500);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.peer-section-title i { color: var(--q-color); }
.peer-answer-card {
  background: linear-gradient(135deg, #F5F3FF, #EEF0FF);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 8px;
  border-left: 3px solid var(--q-color);
}
.peer-num-badge {
  display: inline-block;
  background: var(--q-light);
  color: var(--q-color);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  margin-bottom: 6px;
}
.peer-ans-text {
  font-size: 13px;
  color: var(--gray-700);
  line-height: 1.7;
  white-space: pre-wrap;
  margin: 0;
}
.peer-empty {
  font-size: 13px;
  color: var(--gray-400);
  padding: 12px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* ===================================================
   H탭 - 교사: 링크 카드 그리드
=================================================== */
.link-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}
.link-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--h-color);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.link-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.link-card-cat {
  font-size: 11px;
  font-weight: 700;
  color: var(--h-color);
  background: var(--h-light);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  width: fit-content;
}
.link-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-800);
  line-height: 1.4;
}
.link-card-desc {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.6;
}
.link-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.link-open-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--h-color);
  color: white;
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}
.link-open-btn:hover { background: #DB2777; transform: translateY(-1px); }
.link-url-text {
  font-size: 11px;
  color: var(--gray-400);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

/* ===================================================
   H탭 - 학생: 교사 링크 배너
=================================================== */
.student-link-banner {
  background: linear-gradient(135deg, #FDF2F8, #FCE7F3);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 16px;
  border: 1.5px solid #F9A8D4;
  box-shadow: var(--shadow-sm);
}
.slb-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--h-color);
  margin-bottom: 14px;
}
.slb-header i { font-size: 16px; }
.slb-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.slb-link-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  text-decoration: none;
  transition: var(--transition);
  border: 1px solid #F9A8D4;
}
.slb-link-item:hover {
  background: var(--h-light);
  border-color: var(--h-color);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}
.slb-cat {
  font-size: 20px;
  flex-shrink: 0;
  width: 32px;
  text-align: center;
}
.slb-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.slb-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.slb-desc {
  font-size: 12px;
  color: var(--gray-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.slb-icon {
  color: var(--h-color);
  font-size: 13px;
  flex-shrink: 0;
  opacity: 0.6;
}

/* ===================================================
   H탭 - 교사 nav 활성 스타일
=================================================== */
.nav-btn[data-tab="padlet-teacher"].active .tab-step {
  background: var(--h-color);
  color: white;
  box-shadow: 0 2px 8px rgba(236,72,153,0.4);
}
.nav-btn[data-tab="padlet-teacher"].active { background: var(--h-light); }
.nav-btn[data-tab="padlet-teacher"].active .tab-name { color: var(--h-color); }

/* ===================================================
   반응형 보완
=================================================== */
@media (max-width: 640px) {
  .answers-panel-header { flex-direction: column; align-items: flex-start; }
  .link-card-grid { grid-template-columns: 1fr; }
  .slb-link-item { padding: 10px 12px; }
  .peer-toggle span { font-size: 12px; }
}
