/* ===================================================
   강소혁신진흥협회 Smart Education Platform
   Static Deploy CSS — WinSCP 업로드용
   =================================================== */

:root {
  --brand-50: #eff6ff;
  --brand-100: #dbeafe;
  --brand-500: #2563eb;
  --brand-600: #1d4ed8;
  --brand-700: #1e40af;
  --brand-800: #1e3a8a;
  --brand-900: #172554;
  --accent-300: #6ee7b7;
  --accent-400: #34d399;
  --accent-500: #10b981;
  --accent-600: #059669;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-900: #111827;
  --radius: 16px;
  --shadow: 0 4px 24px rgba(0,0,0,.06);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.1);
  --container: 1280px;
  --header-h: 56px;
}

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

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: var(--gray-900);
  background: #fff;
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; }
ul { list-style: none; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Header ── */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: all .3s;
}
.header:not(.scrolled) {
  background: linear-gradient(to bottom, rgba(23,37,84,.75), transparent);
}
.header:not(.scrolled) .logo-text strong { color: #fff; }
.header:not(.scrolled) .logo-text span { color: rgba(255,255,255,.75); }
.header:not(.scrolled) .nav a { color: rgba(255,255,255,.92); }
.header:not(.scrolled) .nav a:hover { color: #fff; background: rgba(255,255,255,.12); }
.header:not(.scrolled) .btn-login { color: rgba(255,255,255,.92); }
.header:not(.scrolled) .btn-login:hover { color: #fff; }
.header:not(.scrolled) .menu-toggle { color: #fff; }
.header:not(.scrolled) .menu-toggle:hover { background: rgba(255,255,255,.12); }
.header.scrolled {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--gray-100);
}
.header.scrolled .logo-text strong { color: var(--gray-900); }
.header.scrolled .logo-text span { color: var(--gray-400); }
.header.scrolled .nav a { color: var(--gray-600); }
.header.scrolled .nav a:hover { color: var(--brand-600); background: var(--brand-50); }
.header.scrolled .btn-login { color: var(--gray-600); }
.header.scrolled .menu-toggle { color: var(--gray-700); }
.header.scrolled .menu-toggle:hover { background: var(--gray-100); }
.header-user {
  font-size: 13px; font-weight: 600; color: var(--gray-700);
  padding: 0 4px; white-space: nowrap;
}
.header:not(.scrolled) .header-user { color: rgba(255,255,255,.92); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h);
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo-icon {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-600), var(--accent-500));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 15px;
}
.logo-text strong { display: block; font-size: 13px; line-height: 1.2; }
.logo-text span { font-size: 9px; color: var(--gray-400); }

.nav { display: flex; gap: 2px; }
.nav a {
  padding: 5px 9px; font-size: 12px; font-weight: 500;
  color: var(--gray-600); border-radius: 8px; transition: all .2s;
}
.nav a:hover { color: var(--brand-600); background: var(--brand-50); }
.nav a.is-active { color: var(--brand-600); background: var(--brand-50); font-weight: 600; }
.header:not(.scrolled) .nav a.is-active { color: #fff; background: rgba(255,255,255,.18); }

.header-actions { display: flex; align-items: center; gap: 8px; }
.btn-login { padding: 6px 12px; font-size: 12px; font-weight: 500; color: var(--gray-600); }
.btn-signup {
  padding: 6px 12px; font-size: 12px; font-weight: 600;
  color: #fff; background: var(--brand-600); border-radius: 10px;
  transition: background .2s;
}
.btn-signup:hover { background: var(--brand-700); }

.menu-toggle { display: none; padding: 8px; border-radius: 8px; }
.menu-toggle:hover { background: var(--gray-100); }
.mobile-nav {
  display: none; background: #fff; border-top: 1px solid var(--gray-100);
  box-shadow: var(--shadow-lg); padding: 16px 20px;
  position: fixed; top: var(--header-h); left: 0; right: 0; z-index: 99;
  max-height: calc(100vh - var(--header-h)); overflow-y: auto;
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: block; padding: 12px 16px; font-size: 14px; font-weight: 500;
  color: var(--gray-700); border-radius: 12px;
}
.mobile-nav a:hover { background: var(--brand-50); color: var(--brand-600); }
.mobile-nav-btns { display: flex; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--gray-100); }
.mobile-nav-btns a { flex: 1; text-align: center; padding: 10px; border-radius: 12px; font-size: 14px; font-weight: 500; }
.mobile-nav-btns .btn-outline { border: 1px solid var(--gray-200); }
.mobile-nav-btns .btn-fill { background: var(--brand-600); color: #fff; }

/* ── Hero ── */
.hero {
  position: relative;
  min-height: min(90vh, 920px);
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--brand-900), var(--brand-800), var(--brand-700));
}
.hero-bg-img {
  position: absolute; inset: 0; opacity: .22;
  background: url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?w=1920&h=1080&fit=crop') center/cover;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(23,37,84,.85), transparent 45%, rgba(23,37,84,.5));
}
.hero-layout {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: 28px;
  align-items: stretch;
  padding: calc(var(--header-h) + 48px) 0 88px;
  min-height: min(90vh, 920px);
}
.hero-left { min-width: 0; display: flex; flex-direction: column; }
.hero-content { position: relative; z-index: 2; padding: calc(var(--header-h) + 60px) 0 80px; max-width: 720px; }
.hero-search {
  margin-top: auto;
  padding-top: 36px;
  max-width: 100%;
  background: rgba(255,255,255,.97);
  border: 1px solid rgba(255,255,255,.3);
  flex-shrink: 0;
}
.hero-search .search-input-row input { color: var(--gray-900); }
.hero-categories {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  min-height: 0;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(16px);
  border-radius: var(--radius);
  padding: 20px 16px;
  box-shadow: 0 16px 48px rgba(0,0,0,.18);
  border: 1px solid rgba(255,255,255,.6);
}
.hero-cat-title { font-size: 15px; font-weight: 700; color: var(--gray-900); margin-bottom: 4px; flex-shrink: 0; }
.hero-cat-sub { font-size: 12px; color: var(--gray-500); margin-bottom: 14px; flex-shrink: 0; }
.category-grid-side {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(3, auto);
  gap: 10px;
  align-content: space-between;
  min-height: 0;
}
.category-card.compact {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 88px;
  height: auto;
  padding: 14px 10px;
  background: var(--gray-50);
  border-color: var(--gray-100);
  text-align: center;
}
.category-card.compact:hover { background: #fff; }
.category-card.compact .category-icon {
  width: 40px; height: 40px; margin-bottom: 8px;
}
.category-card.compact .category-icon svg { width: 20px; height: 20px; }
.category-card.compact .category-name {
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
  word-break: keep-all;
}
.category-card.compact .category-count {
  margin-top: 4px;
  font-size: 11px;
  color: var(--gray-500);
  line-height: 1.3;
}
.category-card.compact.span-2 { grid-column: span 2; min-height: 72px; }
.hero-tag { color: var(--accent-300); font-weight: 500; font-size: 15px; margin-bottom: 16px; }
.hero-title {
  font-size: clamp(2rem, 5vw, 3.75rem); font-weight: 800;
  color: #fff; line-height: 1.15; letter-spacing: -.02em;
}
.hero-title .accent { color: var(--accent-300); }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.hero-tags span {
  padding: 6px 14px; background: rgba(255,255,255,.1); backdrop-filter: blur(4px);
  color: rgba(255,255,255,.9); font-size: 13px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.2);
}
.hero-btns { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 40px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; font-size: 16px; font-weight: 600;
  border-radius: 14px; transition: all .2s;
}
.btn-white { background: #fff; color: var(--brand-700); box-shadow: 0 8px 32px rgba(0,0,0,.15); }
.btn-white:hover { background: var(--gray-50); transform: translateY(-1px); }
.btn-outline-white { border: 2px solid rgba(255,255,255,.4); color: #fff; }
.btn-outline-white:hover { background: rgba(255,255,255,.1); }
.hero-fade { position: absolute; bottom: 0; left: 0; right: 0; height: 96px; background: linear-gradient(to top, #fff, transparent); }

/* ── Search ── */
.search-section { position: relative; z-index: 20; margin-top: -48px; padding-bottom: 32px; }
.search-box {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-100); padding: 8px 12px;
}
.search-input-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; }
.search-input-row svg { color: var(--gray-400); flex-shrink: 0; }
.search-input-row input {
  flex: 1; border: none; outline: none; font-size: 16px; background: transparent;
}
.btn-search {
  padding: 10px 20px; background: var(--brand-600); color: #fff;
  font-size: 14px; font-weight: 600; border-radius: 12px; flex-shrink: 0;
}
.btn-search:hover { background: var(--brand-700); }
.search-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 8px; }
.search-tabs button {
  padding: 6px 12px; font-size: 12px; font-weight: 500;
  border-radius: 999px; color: var(--gray-500); transition: all .2s;
}
.search-tabs button.active { background: var(--brand-100); color: var(--brand-700); }
.search-tabs button:hover:not(.active) { background: var(--gray-100); }

/* ── Section common ── */
.section { padding: 64px 0; }
.section-gray { background: var(--gray-50); }
.section-header { text-align: center; margin-bottom: 48px; }
.section-header.left { text-align: left; }
.section-title { font-size: clamp(1.5rem, 3vw, 1.875rem); font-weight: 700; letter-spacing: -.02em; }
.section-sub { margin-top: 8px; font-size: 16px; color: var(--gray-500); }
.section-header-row { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 32px; flex-wrap: wrap; gap: 16px; }

/* ── Categories ── */
.category-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.category-card {
  display: flex; flex-direction: column; align-items: center; padding: 24px 16px;
  background: #fff; border: 1px solid var(--gray-100); border-radius: var(--radius);
  transition: all .3s; text-align: center;
}
.category-card:hover { border-color: var(--brand-100); box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.category-icon {
  width: 56px; height: 56px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px; transition: transform .3s;
}
.category-card:hover .category-icon { transform: scale(1.1); }
.category-icon svg { width: 28px; height: 28px; color: #fff; }
.category-name { font-weight: 600; font-size: 14px; }
.category-count { font-size: 12px; color: var(--gray-400); margin-top: 4px; }

/* ── Course Slider ── */
.slider-wrap { position: relative; }
.slider-nav { display: flex; gap: 8px; }
.slider-nav button {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--gray-200); display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.slider-nav button:hover { background: #fff; box-shadow: var(--shadow); }
.course-slider {
  display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 16px; -ms-overflow-style: none; scrollbar-width: none;
}
.course-slider::-webkit-scrollbar { display: none; }

/* ── Course Card ── */
.course-card {
  flex: 0 0 300px; scroll-snap-align: start;
  background: #fff; border: 1px solid var(--gray-100); border-radius: var(--radius);
  overflow: hidden; transition: all .3s;
}
.course-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.course-thumb {
  position: relative; aspect-ratio: 16/10; overflow: hidden;
  background: var(--gray-100);
}
.course-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s; display: block;
}
.course-card:hover .course-thumb img { transform: scale(1.05); }
.course-thumb--package {
  display: flex; align-items: center; justify-content: center;
  background: var(--gray-700);
}
.course-thumb--package .course-thumb-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transition: transform .5s;
}
.course-card:hover .course-thumb--package .course-thumb-bg { transform: scale(1.05); }
.course-thumb--package .course-thumb-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(55,65,81,.82) 0%, rgba(75,85,99,.72) 45%, rgba(31,41,55,.88) 100%);
}
.course-thumb--package .course-thumb-label {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; color: #fff; padding: 20px 16px; width: 100%; height: 100%;
}
.course-thumb--package .course-thumb-codes {
  font-size: clamp(1.35rem, 3.5vw, 1.75rem); font-weight: 800; letter-spacing: .12em;
  line-height: 1.2;
}
.course-thumb--package .course-thumb-line {
  margin-top: 8px; font-size: 13px; font-weight: 600; opacity: .95;
}
.course-thumb--package .course-thumb-desc {
  margin-top: 6px; font-size: 12px; font-weight: 500; color: rgba(255,255,255,.82);
}
.course-thumb--package .badge,
.course-thumb--package .badge-level { z-index: 3; }
.detail-hero-img.detail-hero-img--package {
  position: relative; overflow: hidden; min-height: 280px;
  background: var(--gray-700);
  display: flex; align-items: center; justify-content: center;
}
.detail-hero-img--package .course-thumb-bg,
.detail-hero-img--package .course-thumb-overlay {
  position: absolute; inset: 0;
}
.detail-hero-img--package .course-thumb-bg {
  background-size: cover; background-position: center;
}
.detail-hero-img--package .course-thumb-overlay {
  background: linear-gradient(160deg, rgba(55,65,81,.78) 0%, rgba(75,85,99,.68) 50%, rgba(31,41,55,.85) 100%);
}
.detail-hero-img--package .course-thumb-label {
  position: relative; z-index: 2; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; color: #fff;
  width: 100%; min-height: 280px; padding: 32px 20px;
}
.detail-hero-img--package .course-thumb-codes { font-size: 2rem; font-weight: 800; letter-spacing: .1em; }
.detail-hero-img--package .course-thumb-line { margin-top: 10px; font-size: 16px; font-weight: 600; }
.detail-hero-img--package .course-thumb-desc { margin-top: 8px; font-size: 14px; color: rgba(255,255,255,.85); }
.detail-hero-img--package img { display: none !important; }
.detail-hero-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.badge {
  position: absolute; top: 12px; left: 12px;
  padding: 4px 10px; font-size: 11px; font-weight: 700;
  border-radius: 999px; color: #fff;
}
.badge-new { background: #ef4444; }
.badge-pkg { background: var(--brand-600); }
.badge-level {
  position: absolute; top: 12px; right: 12px;
  padding: 4px 10px; font-size: 11px; font-weight: 500;
  border-radius: 999px; background: rgba(0,0,0,.6); color: #fff;
  backdrop-filter: blur(4px);
}
.course-body { padding: 20px; }
.course-cat { font-size: 12px; font-weight: 500; color: var(--brand-600); margin-bottom: 4px; }
.course-title { font-weight: 700; font-size: 15px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.course-desc { font-size: 13px; color: var(--gray-500); margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.course-meta { display: flex; gap: 16px; margin-top: 16px; font-size: 12px; color: var(--gray-400); }
.course-meta span { display: flex; align-items: center; gap: 4px; }
.course-meta .star { color: #fbbf24; }
.course-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.course-price { font-size: 18px; font-weight: 700; }
.course-link { font-size: 14px; font-weight: 500; color: var(--brand-600); }
.course-card:hover .course-link { text-decoration: underline; }

/* ── Sort buttons ── */
.sort-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.sort-btns button {
  padding: 6px 12px; font-size: 12px; font-weight: 500;
  border-radius: 999px; background: var(--gray-100); color: var(--gray-600);
  transition: all .2s;
}
.sort-btns button.active { background: var(--brand-600); color: #fff; }

/* ── Course Grid ── */
.course-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.course-grid--quad { grid-template-columns: repeat(4, 1fr); }
.course-grid .course-card { flex: none; }

/* ── Reviews ── */
.review-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.review-card {
  padding: 24px; background: #fff; border: 1px solid var(--gray-100);
  border-radius: var(--radius); transition: box-shadow .3s;
}
.review-card:hover { box-shadow: var(--shadow-lg); }
.review-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.review-user { display: flex; align-items: center; gap: 12px; }
.review-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, #60a5fa, #34d399);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 14px;
}
.review-name { font-weight: 600; font-size: 14px; }
.review-date { font-size: 12px; color: var(--gray-400); }
.review-stars { display: flex; gap: 2px; }
.review-stars svg { width: 16px; height: 16px; }
.review-stars .filled { color: #fbbf24; fill: #fbbf24; }
.review-stars .empty { color: var(--gray-200); }
.review-text { font-size: 14px; color: var(--gray-600); line-height: 1.7; }
.review-course { margin-top: 8px; font-size: 12px; font-weight: 500; color: var(--brand-600); }
.review-ai {
  margin-top: 16px; padding: 12px; background: var(--brand-50);
  border: 1px solid var(--brand-100); border-radius: 12px;
}
.review-ai-label { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--brand-700); margin-bottom: 4px; }
.review-more-wrap { margin-top: 32px; text-align: center; }
.review-more-btn { max-width: 320px; margin: 0 auto; }
.detail-review-list { display: flex; flex-direction: column; gap: 20px; }
.detail-review-item {
  padding: 16px 18px; border: 1px solid var(--gray-100); border-radius: 12px; background: #fff;
}
.detail-review-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 10px;
}
.detail-review-head strong { font-size: 14px; }
.detail-review-date { font-size: 12px; color: var(--gray-400); }
.detail-review-stars { display: inline-flex; gap: 2px; }
.detail-review-stars svg { width: 14px; height: 14px; }
.detail-review-stars .filled { color: #fbbf24; fill: #fbbf24; }
.detail-review-stars .empty { color: var(--gray-200); }
.detail-review-text { font-size: 14px; color: var(--gray-600); line-height: 1.7; }
.review-ai p { font-size: 12px; color: var(--brand-600); }

/* ── Process ── */
.process-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px 16px;
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
}
.process-line {
  display: none; position: absolute; top: 40px; left: 6%; right: 6%;
  height: 2px; background: linear-gradient(to right, var(--brand-100), var(--accent-300), var(--brand-100));
}
.process-step {
  flex: 0 0 calc((100% - 6 * 16px) / 7);
  min-width: 96px;
  max-width: 148px;
  text-align: center;
}
.process-icon-wrap {
  position: relative; width: 80px; height: 80px; margin: 0 auto 12px;
  background: #fff; border: 2px solid var(--brand-100); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  transition: all .3s;
}
.process-step:hover .process-icon-wrap { border-color: var(--brand-400); box-shadow: 0 8px 24px rgba(37,99,235,.12); }
.process-icon-wrap svg { width: 32px; height: 32px; color: var(--brand-600); }
.process-num {
  position: absolute; top: -8px; right: -8px;
  width: 24px; height: 24px; background: var(--brand-600); color: #fff;
  font-size: 11px; font-weight: 700; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.process-title { font-weight: 600; font-size: 14px; }
.process-desc { font-size: 12px; color: var(--gray-400); margin-top: 2px; }

/* ── FAQ ── */
.faq-list { max-width: 768px; margin: 0 auto; }
.faq-item {
  background: #fff; border: 1px solid var(--gray-100); border-radius: var(--radius);
  margin-bottom: 12px; overflow: hidden; transition: box-shadow .3s;
}
.faq-item:hover { box-shadow: var(--shadow); }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 20px; text-align: left; font-weight: 600; font-size: 15px;
}
.faq-q svg { flex-shrink: 0; color: var(--gray-400); transition: transform .2s; }
.faq-item.open .faq-q svg { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: all .3s; opacity: 0; }
.faq-item.open .faq-a { max-height: 300px; opacity: 1; }
.faq-a p { padding: 0 20px 20px; font-size: 14px; color: var(--gray-600); line-height: 1.7; }

/* ── AI Chat ── */
.ai-fab {
  position: fixed; bottom: 24px; right: 24px; z-index: 200;
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-600), var(--accent-500));
  color: #fff; box-shadow: 0 8px 32px rgba(29,78,216,.3);
  display: flex; align-items: center; justify-content: center;
  transition: all .3s; animation: float 3s ease-in-out infinite;
}
.ai-fab:hover { transform: scale(1.05); box-shadow: 0 12px 40px rgba(29,78,216,.4); }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-6px)} }

.ai-panel {
  position: fixed; bottom: 96px; right: 24px; z-index: 200;
  width: 360px; max-width: calc(100vw - 48px);
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-100); overflow: hidden;
  display: none; animation: slideUp .3s ease-out;
}
.ai-panel.open { display: block; }
@keyframes slideUp { from{opacity:0;transform:translateY(16px)} to{opacity:1;transform:translateY(0)} }
.ai-header {
  background: linear-gradient(to right, var(--brand-600), var(--accent-500));
  padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; color: #fff;
}
.ai-header-info { display: flex; align-items: center; gap: 8px; }
.ai-header-info strong { font-size: 14px; }
.ai-header-info span { font-size: 12px; opacity: .7; }
.ai-close { padding: 4px; border-radius: 8px; color: #fff; }
.ai-close:hover { background: rgba(255,255,255,.2); }
.ai-msg { display: flex; gap: 8px; margin-bottom: 16px; }
.ai-msg-avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--brand-100);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ai-msg-avatar svg { width: 16px; height: 16px; color: var(--brand-600); }
.ai-msg-bubble {
  background: #fff; border-radius: 16px 16px 16px 4px;
  padding: 12px 16px; font-size: 14px; color: var(--gray-700);
  box-shadow: 0 1px 4px rgba(0,0,0,.04); max-width: 80%; line-height: 1.6;
}
.ai-input-row { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--gray-100); }
.ai-input-row input {
  flex: 1; padding: 10px 16px; background: var(--gray-50); border: none;
  border-radius: 12px; font-size: 14px; outline: none;
}
.ai-input-row input:focus { box-shadow: 0 0 0 2px var(--brand-100); }
.ai-send {
  padding: 10px; background: var(--brand-600); color: #fff; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.ai-send:hover { background: var(--brand-700); }
.ai-send:disabled { opacity: .5; cursor: not-allowed; }

.ai-onboard { padding: 20px; background: var(--gray-50); }
.ai-onboard-title { font-size: 16px; font-weight: 700; color: var(--gray-900); margin-bottom: 6px; }
.ai-onboard-desc { font-size: 13px; color: var(--gray-600); line-height: 1.5; margin-bottom: 16px; }
.ai-field-label { display: block; font-size: 12px; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.ai-field-input {
  width: 100%; padding: 10px 14px; margin-bottom: 12px;
  border: 1px solid var(--gray-200); border-radius: 10px;
  font-size: 14px; background: #fff; outline: none;
}
.ai-field-input:focus { border-color: var(--brand-400); box-shadow: 0 0 0 2px var(--brand-100); }
.ai-onboard-error { min-height: 18px; font-size: 12px; color: #dc2626; margin-bottom: 8px; }
.ai-start-btn {
  width: 100%; padding: 12px 16px; border-radius: 12px;
  background: linear-gradient(to right, var(--brand-600), var(--accent-500));
  color: #fff; font-size: 14px; font-weight: 600;
}
.ai-start-btn:hover { filter: brightness(1.05); }

.ai-chat-wrap { display: flex; flex-direction: column; }
.ai-visitor-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 14px; background: #fff; border-bottom: 1px solid var(--gray-100);
  font-size: 12px; color: var(--gray-600);
}
.ai-visitor-reset {
  font-size: 11px; color: var(--brand-600); white-space: nowrap;
  padding: 4px 8px; border-radius: 8px;
}
.ai-visitor-reset:hover { background: var(--brand-50); }

.ai-messages { height: 220px; padding: 16px; overflow-y: auto; background: var(--gray-50); }
.ai-msg-bubble-user {
  background: var(--brand-600) !important; color: #fff !important;
  border-radius: 16px 16px 4px 16px !important;
}
.ai-msg-bubble-muted { color: var(--gray-500) !important; }

.ai-faq-quick {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 10px 12px; background: #fff;
  border-top: 1px solid var(--gray-100); max-height: 88px; overflow-y: auto;
}
.ai-faq-btn {
  padding: 6px 10px; border-radius: 999px;
  background: var(--brand-50); color: var(--brand-700);
  border: 1px solid var(--brand-100); font-size: 11px; line-height: 1.3;
}
.ai-faq-btn:hover:not(:disabled) { background: var(--brand-100); }
.ai-faq-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── Footer ── */
.footer { background: var(--gray-900); color: #d1d5db; padding: 64px 0 0; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; }
.footer-brand p { font-size: 14px; color: var(--gray-400); margin-top: 16px; line-height: 1.7; }
.footer h4 { color: #fff; font-weight: 600; margin-bottom: 16px; }
.footer ul li { margin-bottom: 8px; }
.footer ul a { font-size: 14px; color: #d1d5db; transition: color .2s; }
.footer ul a:hover { color: #fff; }
.footer-contact li { font-size: 14px; color: var(--gray-400); }
.footer-bottom {
  margin-top: 48px; padding: 24px 0; border-top: 1px solid #1f2937;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--gray-500); flex-wrap: wrap; gap: 16px;
}
.footer-links { display: flex; gap: 16px; }
.footer-links a:hover { color: #d1d5db; }

.text-center { text-align: center; }
.text-link { font-size: 14px; font-weight: 600; color: var(--brand-600); }
.text-link:hover { text-decoration: underline; }
.mt-24 { margin-top: 24px; }
.icon-title { display: flex; align-items: center; gap: 8px; }
.icon-title svg { color: var(--brand-600); }

/* ── Responsive ── */
@media (max-width: 1280px), (orientation: portrait) and (max-width: 1400px) {
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-bottom: 64px;
    align-items: start;
    min-height: auto;
  }
  .hero-left { min-height: auto; }
  .hero-search { margin-top: 32px; padding-top: 0; }
  .hero-categories {
    width: 100%;
    height: auto;
    align-self: auto;
  }
  .category-grid-side {
    flex: none;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: auto;
    align-content: start;
    gap: 12px;
  }
  .category-card.compact {
    min-height: 108px;
  }
  .category-card.compact.span-2 {
    grid-column: span 3;
    min-height: 84px;
  }
}
@media (max-width: 1024px) {
  .nav, .header-actions .btn-login, .header-actions .btn-signup { display: none; }
  .menu-toggle { display: block; }
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .course-grid { grid-template-columns: repeat(2, 1fr); }
  .course-grid--quad { grid-template-columns: repeat(2, 1fr); }
  .process-step { flex: 0 0 calc((100% - 3 * 16px) / 4); max-width: 180px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .category-grid-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .category-card.compact.span-2 {
    grid-column: span 2;
  }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .course-grid { grid-template-columns: 1fr; }
  .review-grid { grid-template-columns: 1fr; }
  .process-step { flex: 0 0 calc((100% - 1 * 16px) / 2); max-width: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-btns .btn { width: 100%; justify-content: center; }
  .section-header-row { flex-direction: column; align-items: flex-start; }
  .slider-nav { display: none; }
}

/* ── Sub Pages ── */
.page-main { padding-top: var(--header-h); min-height: 100vh; }
.page-main .section {
  padding: 40px 0;
}
.page-main .section-title {
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
  margin-bottom: 16px !important;
}
.page-hero {
  background: linear-gradient(135deg, var(--brand-900), var(--brand-700));
  color: #fff;
  padding: 12px 0 10px;
}
.page-hero .container {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
}
.page-hero h1 {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-weight: 800;
  line-height: 1.25;
  margin: 0;
  flex: 0 0 auto;
}
.page-hero p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255,255,255,.78);
  flex: 1 1 220px;
  min-width: 0;
}
.breadcrumb {
  display: flex;
  gap: 4px;
  font-size: 11px;
  color: rgba(255,255,255,.6);
  margin-bottom: 0;
  flex-wrap: wrap;
  width: 100%;
}
.breadcrumb a:hover { color: #fff; }

.detail-grid { display: grid; grid-template-columns: 1fr 360px; gap: 32px; align-items: start; }
.detail-hero-img { border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/9; margin-bottom: 24px; background: var(--gray-100); }
.detail-meta { display: flex; flex-wrap: wrap; gap: 16px; margin: 16px 0 24px; font-size: 14px; color: var(--gray-500); }
.detail-sidebar {
  position: sticky; top: calc(var(--header-h) + 24px);
  background: #fff; border: 1px solid var(--gray-100); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.detail-price { font-size: 28px; font-weight: 800; color: var(--gray-900); }
.detail-btns { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.detail-btns--status {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
}
.detail-status-chip {
  flex: 0 0 auto;
  width: auto;
  padding: 12px 16px !important;
  font-size: 13px !important;
  font-weight: 700;
  white-space: nowrap;
  cursor: default;
  pointer-events: none;
}
.detail-btns--status .btn-primary-full:not(.detail-status-chip),
.detail-btns--status .btn-outline-full {
  flex: 1;
  min-width: 0;
}
.btn-enroll-status {
  background: #fef3c7 !important;
  color: #b45309 !important;
  border: 1px solid #fcd34d;
  cursor: pointer;
}
.btn-enroll-status:hover { background: #fde68a !important; }
.btn-enroll-completed {
  background: #d1fae5 !important;
  color: #047857 !important;
  border: 1px solid #6ee7b7;
}
.btn-enroll-completed:hover { background: #a7f3d0 !important; }
.btn-primary-full {
  display: block; text-align: center; padding: 14px; background: var(--brand-600);
  color: #fff; font-weight: 600; border-radius: 12px;
}
.btn-primary-full:hover { background: var(--brand-700); }
.btn-outline-full {
  display: block; text-align: center; padding: 14px; border: 2px solid var(--gray-200);
  color: var(--gray-700); font-weight: 600; border-radius: 12px;
}
.btn-outline-full:hover { border-color: var(--brand-300); color: var(--brand-600); }

.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--gray-100); margin-bottom: 24px; overflow-x: auto; }
.tab-btn {
  padding: 12px 20px; font-size: 14px; font-weight: 600; color: var(--gray-500);
  border-bottom: 2px solid transparent; margin-bottom: -2px; white-space: nowrap;
}
.tab-btn.active { color: var(--brand-600); border-bottom-color: var(--brand-600); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.course-intro-desc {
  line-height: 1.85;
  color: var(--gray-600);
  font-size: 15px;
  white-space: pre-line;
}
.curriculum-item {
  border: 1px solid var(--gray-100); border-radius: 12px; margin-bottom: 8px; overflow: hidden;
}
.curriculum-q {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; font-weight: 600; font-size: 14px; text-align: left;
}
.curriculum-a { max-height: 0; overflow: hidden; transition: all .3s; }
.curriculum-item.open .curriculum-a { max-height: 200px; }
.curriculum-a p { padding: 0 20px 16px; font-size: 14px; color: var(--gray-600); }

.dashboard-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.stat-card {
  background: #fff; border: 1px solid var(--gray-100); border-radius: var(--radius);
  padding: 16px; text-align: center;
}
.stat-card strong { display: block; font-size: 22px; font-weight: 800; color: var(--brand-600); }
.stat-card span { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.progress-card {
  background: #fff; border: 1px solid var(--gray-100); border-radius: var(--radius);
  padding: 24px; display: flex; align-items: center; gap: 24px; margin-bottom: 16px;
}
.my-learning-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.my-learning-list .progress-card {
  margin-bottom: 0;
}
.my-learning-row-card {
  padding: 14px 18px;
  gap: 14px;
  align-items: center;
}
.my-learning-row-body {
  flex: 1;
  min-width: 0;
}
.my-learning-row-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.my-learning-row-head .my-learning-card-title {
  margin: 0;
}
.my-learning-row-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.progress-ring {
  width: 80px; height: 80px; border-radius: 50%;
  background: conic-gradient(var(--brand-600) var(--pct, 0%), var(--gray-100) 0);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.progress-ring-inner {
  width: 64px; height: 64px; border-radius: 50%; background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; color: var(--brand-600);
}
.my-learning-pending-card {
  border-left: 4px solid #f59e0b;
  align-items: center;
  display: grid;
  grid-template-columns: auto 1fr auto;
}
.my-learning-pending-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fef3c7;
  color: #b45309;
  white-space: nowrap;
}
.my-learning-completed-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: #d1fae5;
  color: #047857;
  margin-bottom: 0;
  white-space: nowrap;
}
.my-learning-active-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  white-space: nowrap;
}
.my-learning-inline-link {
  font-size: 13px;
  white-space: nowrap;
}
.my-learning-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.my-learning-tab {
  padding: 7px 14px;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.my-learning-tab:hover {
  border-color: var(--brand-300);
  color: var(--brand-700);
}
.my-learning-tab.is-active {
  border-color: var(--brand-500);
  background: var(--brand-50);
  color: var(--brand-700);
}
.my-learning-panel[hidden] {
  display: none !important;
}
.my-learning-cancelled-card {
  border-left: 4px solid #94a3b8;
  align-items: flex-start;
}
.my-learning-cancelled-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
}
.my-learning-card-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.my-learning-cancel-btn {
  max-width: none;
  width: auto;
  padding: 8px 14px;
  font-size: 13px;
}
.btn-enroll-cancelled {
  background: #f1f5f9 !important;
  color: #64748b !important;
  border: 1px solid #cbd5e1 !important;
}
.btn-enroll-cancelled:hover {
  background: #e2e8f0 !important;
  color: #475569 !important;
}
.my-learning-empty-note {
  padding: 20px 24px;
  background: #fff;
  border: 1px dashed var(--gray-200);
  border-radius: var(--radius);
  margin-bottom: 16px;
}
#myLearningActiveEmpty[hidden],
#myLearningEmpty[hidden],
#myLearningPendingTitle[hidden] {
  display: none !important;
}

.auth-wrap { min-height: calc(100vh - var(--header-h)); display: flex; align-items: center; justify-content: center; padding: 40px 20px; background: var(--gray-50); }
.auth-card {
  width: 100%; max-width: 420px; background: #fff; border-radius: var(--radius);
  padding: 40px; box-shadow: var(--shadow-lg); border: 1px solid var(--gray-100);
}
.auth-card h1 { font-size: 24px; font-weight: 800; text-align: center; }
.auth-card p.sub { text-align: center; color: var(--gray-500); font-size: 14px; margin: 8px 0 32px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--gray-700); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 12px 16px; border: 1px solid var(--gray-200); border-radius: 12px;
  font-size: 15px; outline: none;
}
.form-group input:focus { border-color: var(--brand-400); box-shadow: 0 0 0 3px var(--brand-100); }

.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.cal-day {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  border-radius: 12px; font-size: 14px; font-weight: 500; cursor: pointer;
  border: 1px solid transparent;
}
.cal-day:hover { background: var(--brand-50); }
.cal-day.available { border-color: var(--brand-200); color: var(--brand-700); font-weight: 600; }
.cal-day.selected { background: var(--brand-600); color: #fff; }

.cert-card {
  background: #fff; border: 1px solid var(--gray-100); border-radius: var(--radius);
  padding: 24px; display: flex; gap: 20px; align-items: center; margin-bottom: 16px;
}
.cert-qr {
  width: 80px; height: 80px; background: var(--gray-100); border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 11px;
  color: var(--gray-400); flex-shrink: 0;
}
.cert-request-panel {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}
.cert-request-msg {
  margin-top: 12px;
  font-size: 14px;
  color: #15803d;
  font-weight: 600;
}
.cert-status {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}
.cert-status-pending { background: #fef3c7; color: #b45309; }
.cert-status-issued { background: #dcfce7; color: #15803d; }
.my-learning-exam-fail { color: #b91c1c; font-weight: 600; }
.my-learning-exam-pass { color: #047857; font-weight: 600; }
.my-learning-exam-retake { font-weight: 700; color: var(--brand-600); }
.my-learning-active-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}
.my-learning-card-link {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
  color: inherit;
  text-decoration: none;
  border-radius: 12px;
  padding: 6px;
  margin: -6px;
  transition: background 0.15s ease;
}
.my-learning-card-link:hover {
  background: var(--brand-50);
}
.my-learning-card-link:hover .my-learning-card-title {
  color: var(--brand-700);
}
.my-learning-card-link:hover .my-learning-continue-link {
  text-decoration: underline;
}
.my-learning-card-main {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}
.my-learning-active-card .progress-ring {
  width: 56px;
  height: 56px;
}
.my-learning-active-card .progress-ring-inner {
  width: 44px;
  height: 44px;
  font-size: 13px;
}
.my-learning-card-info {
  min-width: 0;
}
.my-learning-card-title {
  display: block;
  font-size: 16px;
}
.my-learning-card-meta {
  font-size: 13px;
  color: var(--gray-500);
  margin-top: 2px;
}
.my-learning-continue-link {
  display: inline-flex;
  align-items: center;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-600);
}
.my-learning-exam-panel {
  flex-shrink: 0;
  width: auto;
  max-width: 100%;
  padding: 0;
  border-left: none;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
}
.my-learning-exam-panel-title {
  display: none;
}
.my-learning-exam-rows {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 6px;
}
.my-learning-exam-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--gray-50);
}
.my-learning-exam-label {
  color: var(--gray-600);
  white-space: nowrap;
}
.my-learning-exam-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.my-learning-exam-badge--pass {
  background: #d1fae5;
  color: #047857;
}
.my-learning-exam-badge--fail {
  background: #fee2e2;
  color: #b91c1c;
}
.my-learning-exam-badge--wait {
  background: var(--gray-100);
  color: var(--gray-500);
}
.my-learning-exam-action {
  font-size: 12px;
  font-weight: 700;
  margin-top: 0;
  align-self: center;
  color: var(--brand-600);
  text-decoration: none;
  white-space: nowrap;
}
.my-learning-exam-action:hover {
  text-decoration: underline;
}
@media (max-width: 768px) {
  .my-learning-pending-card {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .my-learning-pending-card .my-learning-row-actions {
    justify-content: flex-start;
  }
  .my-learning-active-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .my-learning-exam-panel {
    justify-content: flex-start;
  }
}

.notice-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--gray-100); gap: 16px;
}
.notice-list a { font-weight: 500; flex: 1; }
.notice-list a:hover { color: var(--brand-600); }
.notice-list span { font-size: 13px; color: var(--gray-400); white-space: nowrap; }

.exam-bar {
  position: fixed; top: var(--header-h); left: 0; right: 0; z-index: 90;
  background: var(--brand-900); color: #fff; padding: 12px 20px;
  display: flex; justify-content: space-between; align-items: center; font-size: 14px;
}
.exam-cbt-body .exam-bar { top: 0; }
.exam-timer { font-weight: 700; font-size: 18px; color: var(--accent-300); }

.exam-cbt-body { background: var(--gray-50); min-height: 100vh; }
.exam-cbt-body.exam-cbt-active { overflow: hidden; user-select: none; }
.exam-cbt-main { padding: 72px 20px 40px; max-width: 800px; margin: 0 auto; }
.exam-cbt-body.exam-cbt-active .exam-cbt-main {
  max-width: none;
  padding: 64px 16px 16px;
  height: 100vh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.exam-panel {
  background: #fff; border-radius: 16px; padding: 32px;
  border: 1px solid var(--gray-100); box-shadow: 0 4px 24px rgba(15,23,42,.04);
}
.exam-panel--sheet {
  padding: 0;
  overflow: hidden;
  flex: 1;
  min-height: 0;
  height: auto;
  display: flex;
  flex-direction: column;
}
.exam-panel[hidden], .exam-modal[hidden] { display: none !important; }
.exam-intro-badge {
  display: inline-block; font-size: 13px; font-weight: 700; color: var(--brand-700);
  background: var(--brand-50); border: 1px solid var(--brand-200);
  padding: 4px 12px; border-radius: 99px; margin-bottom: 12px;
}
.exam-intro-lead { color: var(--gray-600); margin: 8px 0 20px; }
.exam-start-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.exam-rules { margin: 0 0 28px 20px; color: var(--gray-700); line-height: 1.8; }
.exam-rules li { margin-bottom: 6px; }
.exam-start-btn { max-width: 320px; margin: 0 auto; display: block; }

.exam-sheet-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 0;
  height: 100%;
  min-height: 0;
}
.exam-sheet-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--gray-100);
}
.exam-sheet-header {
  padding: 20px 24px 12px;
  border-bottom: 1px solid var(--gray-100);
  background: #fff;
  flex-shrink: 0;
}
.exam-sheet-title { font-size: 20px; font-weight: 800; margin: 0 0 6px; }
.exam-sheet-meta { margin: 0; font-size: 13px; color: var(--gray-500); }
.exam-sheet-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 24px 12px;
  background: var(--gray-50);
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.exam-q-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 16px;
  scroll-margin-top: 88px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.exam-q-card.is-answered { border-color: #86efac; background: #f0fdf4; }
.exam-q-card.is-highlight {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
  border-color: var(--brand-400);
}
.exam-q-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.exam-q-status {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: #fef3c7;
  color: #b45309;
}
.exam-q-card.is-answered .exam-q-status { background: #dcfce7; color: #15803d; }
.exam-q-num { font-size: 13px; color: var(--brand-600); font-weight: 700; }
.exam-q-text { font-size: 16px; font-weight: 600; margin: 0 0 16px; line-height: 1.65; color: var(--gray-800); }
.exam-opts { display: flex; flex-direction: column; gap: 10px; }
.exam-opt {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px;
  border: 1px solid var(--gray-200); border-radius: 10px; cursor: pointer;
  background: #fff; line-height: 1.5; font-size: 14px;
}
.exam-opt input { margin-top: 3px; flex-shrink: 0; }
.exam-opt-selected { border: 2px solid var(--brand-500); background: var(--brand-50); }
.exam-sheet-footer {
  padding: 16px 24px 20px;
  border-top: 1px solid var(--gray-100);
  background: #fff;
  flex-shrink: 0;
}
.exam-submit-sheet-btn { max-width: 360px; margin: 8px auto 0; display: block; }
.exam-submit-sheet-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.exam-submit-hint {
  font-size: 13px;
  color: #b45309;
  text-align: center;
  margin: 0 0 8px;
  font-weight: 600;
}
.exam-footer-note { font-size: 12px; color: var(--gray-500); margin: 0; text-align: center; }

.exam-sheet-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 16px;
  background: #fff;
  min-height: 0;
  overflow-y: auto;
}
.exam-sidebar-timer {
  text-align: center;
  padding: 16px 12px;
  border-radius: 12px;
  background: #1e293b;
  color: #fff;
}
.exam-sidebar-timer-label {
  display: block;
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 6px;
}
.exam-sidebar-timer-value {
  display: block;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fbbf24 !important;
  font-variant-numeric: tabular-nums;
}
.exam-sidebar-progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.exam-sidebar-stat {
  text-align: center;
  padding: 10px 6px;
  border-radius: 10px;
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
}
.exam-sidebar-stat span {
  display: block;
  font-size: 11px;
  color: var(--gray-500);
  margin-bottom: 4px;
}
.exam-sidebar-stat strong { font-size: 20px; font-weight: 800; color: var(--gray-800); }
.exam-sidebar-stat--done strong { color: #15803d; }
.exam-sidebar-stat--todo strong { color: #b45309; }
.exam-sidebar-grid-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.exam-sidebar-grid-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-600);
  margin: 0 0 8px;
}
.exam-sidebar-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  overflow-y: auto;
  max-height: 320px;
}
.exam-nav-btn {
  aspect-ratio: 1;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-600);
  cursor: pointer;
  padding: 0;
}
.exam-nav-btn:hover { border-color: var(--brand-300); color: var(--brand-700); }
.exam-nav-btn.is-done { background: #dcfce7; border-color: #86efac; color: #15803d; }
.exam-nav-btn.is-current {
  box-shadow: 0 0 0 2px var(--brand-500);
  border-color: var(--brand-500);
  color: var(--brand-700);
  font-weight: 800;
}
.exam-sidebar-legend {
  display: flex;
  gap: 14px;
  justify-content: center;
  font-size: 11px;
  color: var(--gray-500);
  margin: 0;
}
.exam-nav-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: #fff;
  border: 1px solid var(--gray-300);
  vertical-align: middle;
  margin-right: 4px;
}
.exam-nav-dot.is-done { background: #dcfce7; border-color: #86efac; }

@media (max-width: 960px) {
  .exam-sheet-layout { grid-template-columns: 1fr; }
  .exam-sheet-main { border-right: none; border-bottom: 1px solid var(--gray-100); }
  .exam-sheet-sidebar { flex-direction: row; flex-wrap: wrap; padding: 12px 16px; gap: 10px; }
  .exam-sidebar-timer { flex: 1 1 140px; padding: 10px; }
  .exam-sidebar-timer-value { font-size: 22px; }
  .exam-sidebar-progress { flex: 2 1 220px; }
  .exam-sidebar-grid-wrap { flex: 1 1 100%; }
  .exam-sidebar-grid { max-height: 120px; grid-template-columns: repeat(10, 1fr); }
  .exam-sidebar-legend { flex: 1 1 100%; }
}

.exam-panel--result {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 40px;
}
.exam-result-card {
  text-align: center;
}
.exam-result-badge {
  display: inline-block;
  font-size: 14px;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.exam-result-badge--pass {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}
.exam-result-badge--fail {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}
.exam-result-title {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 12px;
}
.exam-result-lead {
  font-size: 16px;
  color: var(--gray-600);
  line-height: 1.6;
  margin: 0 0 24px;
}
.exam-result-detail {
  text-align: left;
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 28px;
}
.exam-result-list {
  margin: 0;
  padding-left: 18px;
  color: var(--gray-700);
  line-height: 1.8;
}
.exam-result-sections {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--gray-200);
  font-size: 14px;
  color: var(--gray-600);
}
.exam-result-sections ul {
  margin: 8px 0 0;
  padding-left: 18px;
  line-height: 1.7;
}
.exam-result-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 320px;
  margin: 0 auto;
}
.exam-result-secondary {
  text-align: center;
  text-decoration: none;
  display: block;
  padding: 12px 28px;
}

.exam-modal {
  position: fixed; inset: 0; z-index: 9999; background: rgba(15,23,42,.75);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.exam-modal-box {
  background: #fff; border-radius: 16px; padding: 32px; max-width: 420px; width: 100%; text-align: center;
}
.exam-modal-box h3 { font-size: 20px; margin-bottom: 12px; color: #b45309; }
.exam-modal-box p { color: var(--gray-700); line-height: 1.6; white-space: pre-line; }
.exam-modal-sub { font-size: 13px; color: var(--gray-500); margin: 12px 0 24px; }

@media (max-width: 1024px) {
  .detail-grid { grid-template-columns: 1fr; }
  .detail-sidebar { position: static; }
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .page-hero p {
    flex: 1 1 100%;
  }
}

/* ── Learn Classroom (평생교육원형) ── */
.learn-classroom-body { background: var(--gray-50); min-height: 100vh; }
.learn-classroom-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
}
.learn-classroom-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
}
.learn-classroom-head-left { display: flex; align-items: center; gap: 20px; min-width: 0; }
.learn-back-link {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-500);
  padding: 8px 12px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  background: #fff;
}
.learn-back-link:hover { color: var(--brand-700); border-color: var(--brand-200); }
.learn-classroom-label { font-size: 12px; color: var(--brand-600); font-weight: 600; margin-bottom: 4px; }
.learn-classroom-title { font-size: 22px; font-weight: 800; color: var(--gray-900); line-height: 1.3; }
.learn-classroom-progress-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  min-width: 220px;
}
.learn-classroom-progress-label { font-size: 13px; color: var(--gray-500); font-weight: 600; }
.learn-classroom-progress-bar {
  flex: 1;
  width: 160px;
  height: 8px;
  background: var(--gray-200);
  border-radius: 99px;
  overflow: hidden;
}
.learn-classroom-progress-fill { height: 100%; background: linear-gradient(90deg, var(--brand-600), var(--accent-500)); border-radius: 99px; width: 0; transition: width .3s; }
.learn-classroom-progress-pct { font-size: 18px; font-weight: 800; color: var(--brand-700); min-width: 44px; text-align: right; }

.learn-classroom { padding: 28px 0 48px; }
.learn-continue-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  background: linear-gradient(90deg, var(--brand-600), var(--brand-700));
  color: #fff;
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, .25);
}
.learn-continue-banner[hidden] { display: none !important; }
.learn-continue-text strong { display: block; font-size: 18px; margin-bottom: 4px; }
.learn-continue-text p { font-size: 14px; opacity: .92; margin: 0; }
.learn-continue-btn {
  background: #fff !important;
  color: var(--brand-700) !important;
  border: none !important;
  width: auto !important;
  padding: 12px 24px !important;
  white-space: nowrap;
}
.learn-play-btn-resume { background: var(--accent-500); border-color: var(--accent-500); }
.learn-play-btn-resume:hover { background: var(--accent-600); border-color: var(--accent-600); }
.learn-summary-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.learn-summary-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.learn-summary-card span { display: block; font-size: 13px; color: var(--gray-500); margin-bottom: 6px; }
.learn-summary-card strong { font-size: 22px; font-weight: 800; color: var(--gray-900); }
.learn-summary-card-accent { border-color: var(--brand-200); background: var(--brand-50); }
.learn-summary-card-accent strong { font-size: 18px; color: var(--brand-800); }

.learn-classroom-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  align-items: start;
}
.learn-panel {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
}
.learn-panel-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-100);
  background: var(--gray-50);
}
.learn-panel-head h2 { font-size: 18px; font-weight: 800; color: var(--gray-900); margin-bottom: 6px; }
.learn-panel-head p { font-size: 13px; color: var(--gray-500); }
.learn-intro-panel {
  margin-bottom: 20px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
}
.learn-intro-body {
  padding: 20px 24px 24px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--gray-700);
  max-height: 320px;
  overflow-y: auto;
  white-space: pre-line;
}
.learn-table-wrap { overflow-x: auto; }
.learn-curriculum-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.learn-curriculum-table th {
  padding: 14px 16px;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-600);
  background: #fff;
  border-bottom: 2px solid var(--gray-200);
  white-space: nowrap;
}
.learn-curriculum-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
  vertical-align: middle;
}
.learn-curriculum-table tr:hover td { background: var(--gray-50); }
.learn-table-title { font-weight: 600; color: var(--gray-800); }
.learn-lesson-duration {
  margin-left: 8px;
  font-size: 0.85em;
  font-weight: 500;
  color: var(--gray-500);
  white-space: nowrap;
}
.learn-row-locked .learn-lesson-duration { color: var(--gray-400); }
.learn-table-empty { text-align: center; color: var(--gray-400); padding: 40px 16px !important; }

.learn-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.learn-status-done { background: #dcfce7; color: #166534; }
.learn-status-active { background: #dbeafe; color: #1d4ed8; }
.learn-status-wait { background: var(--gray-100); color: var(--gray-500); }
.learn-status-meta {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 500;
  color: #15803d;
}
.learn-table-status { min-width: 220px; vertical-align: top; }
.learn-step-progress {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--brand-700);
  font-weight: 600;
  line-height: 1.5;
}
.learn-step-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 4px;
}
.learn-step-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--gray-500);
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--gray-50);
}
.learn-step-item strong {
  font-size: 11px;
  color: var(--brand-700);
  font-weight: 700;
  white-space: nowrap;
}
.learn-step-item--done {
  color: var(--gray-400);
  background: #f8fafc;
}
.learn-step-item--done span::before {
  content: "✓ ";
  color: #16a34a;
}
.learn-step-item--current {
  background: #eff6ff;
  color: var(--brand-800);
  font-weight: 700;
  border: 1px solid #bfdbfe;
}

.learn-play-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--brand-600);
  background: var(--brand-600);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.learn-play-btn:hover { background: var(--brand-700); border-color: var(--brand-700); }
.learn-play-btn:disabled { background: var(--gray-200); border-color: var(--gray-200); color: var(--gray-500); cursor: not-allowed; }
.learn-row-locked td { background: var(--gray-50); color: var(--gray-400); }
.learn-row-locked .learn-table-title { color: var(--gray-400); }

.learn-player-notice {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--gray-600);
  font-weight: 500;
}
.learn-player-notice-warn { color: #b45309; }
.learn-player-notice-ok { color: #047857; }
.learn-player-body {
  margin: 0;
  height: 100vh;
  max-height: 100vh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #f3f4f6;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

/* ── Learn Popup Player ── */
.learn-player-header {
  flex-shrink: 0;
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.learn-player-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
  max-width: 100%;
}
.learn-preview-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(90deg, #fff7ed 0%, #fef3c7 100%);
  color: #92400e;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  border-bottom: 1px solid #fde68a;
}
.learn-preview-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
  animation: learn-preview-pulse 1.4s ease-in-out infinite;
}
@keyframes learn-preview-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}
.learn-preview-banner strong { font-size: 15px; color: #b45309; font-weight: 800; }
.learn-player-info {
  min-width: 0;
  flex: 1;
}
.learn-player-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-600);
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  padding: 3px 8px;
  border-radius: 99px;
  margin-bottom: 8px;
}
.learn-player-course {
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.learn-player-course[hidden] { display: none !important; }
.learn-player-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.learn-player-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.learn-player-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid var(--gray-200);
  background: #fff;
  color: var(--gray-700);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.learn-player-btn-icon {
  font-size: 16px;
  line-height: 1;
  font-weight: 700;
  opacity: 0.7;
}
.learn-player-btn:hover:not(:disabled) {
  background: var(--gray-50);
  border-color: var(--gray-300);
}
.learn-player-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}
.learn-player-btn-ghost {
  background: #fff;
}
.learn-player-btn-primary {
  background: linear-gradient(180deg, var(--brand-600) 0%, var(--brand-700) 100%);
  border-color: var(--brand-700);
  color: #fff;
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.28);
}
.learn-player-btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, var(--brand-500) 0%, var(--brand-600) 100%);
  border-color: var(--brand-600);
}
.learn-player-btn-close {
  background: var(--gray-100);
  border-color: var(--gray-200);
  color: var(--gray-600);
}
.learn-player-btn-close:hover:not(:disabled) {
  background: var(--gray-200);
  color: var(--gray-800);
}
.learn-player-btn--blink {
  animation: learn-next-blink 1.1s ease-in-out infinite;
  border-color: #2563eb !important;
  color: #1d4ed8 !important;
  background: #eff6ff !important;
}
.learn-player-btn-primary.learn-player-btn--blink {
  color: #fff !important;
  background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%) !important;
  border-color: #1d4ed8 !important;
  box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.55);
}
@keyframes learn-next-blink {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.55);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(37, 99, 235, 0);
    transform: scale(1.04);
  }
}
.learn-player-status {
  display: none;
}
.learn-player-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 8px 12px 12px;
  gap: 8px;
}
.learn-player-stage {
  flex: 1;
  position: relative;
  min-height: 0;
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #eef2f7;
  border: 1px solid var(--gray-200);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
}
.learn-player-dock {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--gray-200);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}
.learn-player-dock-inner {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
.learn-player-dock--modal {
  min-height: 88px;
  padding: 12px 14px;
  background: linear-gradient(90deg, #eff6ff 0%, #f8fafc 100%);
  border-color: #bfdbfe;
}
.learn-player-dock--modal.learn-player-dock--warn {
  background: linear-gradient(90deg, #fef2f2 0%, #fff 100%);
  border-color: #fecaca;
}
.learn-player-dock-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 22px;
  font-weight: 800;
}
.learn-player-dock--warn .learn-player-dock-icon {
  background: #fee2e2;
  color: #b91c1c;
}
.learn-player-dock-text {
  min-width: 0;
}
.learn-player-dock-text strong {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 2px;
}
.learn-player-dock-text span {
  display: block;
  font-size: 13px;
  line-height: 1.45;
  color: var(--gray-600);
}
.learn-player-dock-btn {
  flex-shrink: 0;
  min-width: 88px;
  padding: 10px 18px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
}
.learn-player-dock-btn:hover {
  filter: brightness(1.05);
}
.learn-player-dock .learn-player-notice {
  margin: 0;
}
.learn-player-dock--review {
  flex-wrap: wrap;
  gap: 10px 16px;
}
.learn-player-dock-review {
  flex: 1 1 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}
.learn-player-dock-review[hidden] { display: none !important; }
.learn-player-dock-review-badge {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: #059669;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.learn-player-dock-review p {
  margin: 0;
  font-size: 13px;
  color: #065f46;
  line-height: 1.5;
}
.learn-player-dock-btn--review {
  background: #059669;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.28);
}
.learn-player-dock-btn--review:hover {
  filter: brightness(1.06);
}
.learn-player-body--review .learn-player-header {
  border-bottom-color: #a7f3d0;
}
.learn-review-panel {
  margin-top: 28px;
  padding: 24px;
  border-radius: 16px;
  background: linear-gradient(180deg, #f0fdf4 0%, #fff 100%);
  border: 1px solid #bbf7d0;
}
.learn-review-panel[hidden] { display: none !important; }
.learn-review-panel-head h2 {
  margin: 0 0 6px;
  font-size: 20px;
  color: #065f46;
}
.learn-review-panel-head p {
  margin: 0 0 16px;
  font-size: 14px;
  color: #047857;
  line-height: 1.6;
}
.learn-review-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.learn-review-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #d1fae5;
}
.learn-review-item-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.learn-review-item-info strong {
  font-size: 15px;
  color: var(--gray-800);
}
.learn-review-item-info span {
  font-size: 12px;
  color: #059669;
  font-weight: 600;
}
.learn-review-btn {
  flex-shrink: 0;
  padding: 10px 18px;
  border: 0;
  border-radius: 10px;
  background: #059669;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.22);
}
.learn-review-btn:hover {
  filter: brightness(1.05);
}
.learn-play-done-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #dcfce7;
  color: #166534;
  font-size: 13px;
  font-weight: 700;
}
.learn-player-stage .learn-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #eef2f7;
}
.learn-player-stage .learn-frame[hidden] { display: none !important; }
.learn-player-stage video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: #111;
  object-fit: contain;
}
.learn-player-stage video[hidden] { display: none !important; }
.learn-player-stage .learn-video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  background: linear-gradient(180deg, #fff 0%, #f9fafb 100%);
}
.learn-player-stage .learn-video-placeholder[hidden] { display: none !important; }
.learn-video-placeholder-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  color: var(--gray-400);
}
.learn-player-stage .learn-video-placeholder p {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-600);
}

.learn-side-panels { display: flex; flex-direction: column; gap: 16px; }
.learn-side-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 20px;
}
.learn-side-card h3 { font-size: 15px; font-weight: 800; color: var(--gray-900); margin-bottom: 12px; }
.learn-guide-list { list-style: none; }
.learn-guide-list li {
  position: relative;
  padding-left: 14px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--gray-600);
  margin-bottom: 8px;
}
.learn-guide-list li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--brand-500);
  font-weight: 700;
}
.learn-exam-btn { text-align: center; justify-content: center; }
.learn-exam-row td { background: #fffbeb; border-top: 2px solid #fcd34d; }
.learn-exam-row:hover td { background: #fef3c7; }
.learn-exam-sub {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--gray-500);
  margin-top: 4px;
}
.learn-play-btn-exam {
  background: var(--brand-600);
  color: #fff;
  border-color: var(--brand-600);
}
.learn-play-btn-exam:hover { background: var(--brand-700); }
.detail-exam-block {
  margin-top: 24px;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #fcd34d;
  background: linear-gradient(180deg, #fffbeb 0%, #fff 100%);
}
.detail-exam-inner h4 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.detail-exam-inner p { font-size: 14px; color: var(--gray-600); margin-bottom: 16px; line-height: 1.5; }
.detail-exam-inner .btn-primary-full:disabled { opacity: 0.55; cursor: not-allowed; }


/* legacy learn styles (compat) */
.learn-body { background: var(--gray-50); }
.learn-header .header-inner { gap: 16px; }
.learn-progress-bar { flex: 1; max-width: 320px; height: 6px; background: var(--gray-200); border-radius: 99px; overflow: hidden; }
.learn-progress-fill { height: 100%; background: var(--brand-600); border-radius: 99px; }
.learn-pct { font-size: 13px; font-weight: 700; color: var(--brand-700); }
.learn-layout { display: grid; grid-template-columns: 280px 1fr; min-height: calc(100vh - var(--header-h)); padding-top: var(--header-h); }
.learn-sidebar { background: #fff; border-right: 1px solid var(--gray-100); padding: 24px; overflow-y: auto; }
.learn-list { list-style: none; }
.learn-main { padding: 24px; background: var(--gray-50); }
.learn-video { background: #111827; border-radius: var(--radius); aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; overflow: hidden; position: relative; }
.learn-frame { width: 100%; height: 100%; border: 0; display: block; background: #000; }
.learn-video-placeholder { text-align: center; color: rgba(255,255,255,.7); }
.learn-notes { background: #fff; border-radius: var(--radius); padding: 20px; border: 1px solid var(--gray-100); }

/* ── Admin Page ── */
.admin-body { display: flex; min-height: 100vh; background: var(--gray-50); }
.admin-sidebar { width: 240px; background: var(--brand-900); color: #fff; padding: 24px 0; flex-shrink: 0; }
.admin-brand { display: flex; align-items: center; gap: 10px; padding: 0 20px 24px; border-bottom: 1px solid rgba(255,255,255,.1); margin-bottom: 16px; }
.admin-nav { display: flex; flex-direction: column; }
.admin-nav a { padding: 12px 20px; font-size: 14px; color: rgba(255,255,255,.7); transition: all .2s; }
.admin-nav a:hover, .admin-nav a.active { background: rgba(255,255,255,.1); color: #fff; }
.admin-main { flex: 1; padding: 32px; overflow-x: auto; }
.admin-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; flex-wrap: wrap; gap: 12px; }
.admin-top h1 { font-size: 24px; font-weight: 800; }
.admin-badge { font-size: 12px; background: var(--brand-100); color: var(--brand-700); padding: 6px 12px; border-radius: 99px; font-weight: 600; }
.admin-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.admin-panel { background: #fff; border: 1px solid var(--gray-100); border-radius: var(--radius); padding: 24px; }
.admin-panel h2 { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.admin-erp-panel { border-color: var(--brand-200); background: linear-gradient(180deg, var(--brand-50) 0%, #fff 120px); }
.admin-erp-desc { font-size: 15px; line-height: 1.75; color: var(--gray-600); margin-bottom: 12px; }
.admin-erp-url { font-size: 13px; color: var(--gray-400); word-break: break-all; margin-bottom: 20px; }
.admin-erp-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td { padding: 10px 8px; text-align: left; border-bottom: 1px solid var(--gray-100); }
.admin-table th { font-weight: 600; color: var(--gray-500); font-size: 12px; }
.tag { font-size: 11px; padding: 3px 8px; border-radius: 6px; font-weight: 600; }
.tag-wait { background: #fef3c7; color: #92400e; }
.tag-ok { background: #d1fae5; color: #065f46; }
.admin-list { list-style: none; }
.admin-list li { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--gray-100); font-size: 14px; }
.admin-list span { color: var(--gray-500); font-size: 13px; }
.roadmap { display: flex; gap: 12px; flex-wrap: wrap; }
.roadmap-item { flex: 1; min-width: 140px; padding: 16px; border-radius: 12px; background: var(--gray-50); border: 1px solid var(--gray-100); font-size: 13px; color: var(--gray-600); }
.roadmap-item span { display: block; font-weight: 700; font-size: 12px; color: var(--brand-600); margin-bottom: 4px; }
.roadmap-item.done { border-color: var(--accent-200); background: var(--accent-50); }
.roadmap-item.current { border-color: var(--brand-300); background: var(--brand-50); box-shadow: 0 0 0 2px var(--brand-100); }

@media (max-width: 1024px) {
  .learn-classroom-grid { grid-template-columns: 1fr; }
  .learn-summary-row { grid-template-columns: repeat(2, 1fr); }
  .learn-classroom-header-inner { flex-direction: column; align-items: stretch; }
  .learn-classroom-progress-wrap { min-width: 0; }
  .learn-classroom-title { font-size: 18px; }
  .learn-player-header-inner {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 14px;
  }
  .learn-player-actions { justify-content: stretch; }
  .learn-player-actions .learn-player-btn { flex: 1 1 auto; min-width: 0; }
  .learn-player-stage { margin: 8px; border-radius: 10px; }
  .learn-player-status { padding: 8px 14px; }
  .learn-layout { grid-template-columns: 1fr; }
  .learn-sidebar { border-right: none; border-bottom: 1px solid var(--gray-100); max-height: 240px; }
  .admin-body { flex-direction: column; }
  .admin-sidebar { width: 100%; }
  .admin-grid-2 { grid-template-columns: 1fr; }
}

/* ── 수강신청 (enroll.html) ── */
.enroll-hero { padding-bottom: 10px; }
.enroll-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 28px;
  align-items: start;
}
.enroll-summary-card {
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  position: sticky;
  top: calc(var(--header-h) + 24px);
}
.enroll-summary-label { font-size: 12px; color: var(--gray-500); margin-bottom: 8px; }
.enroll-summary-card h2 { font-size: 18px; font-weight: 800; line-height: 1.4; margin-bottom: 16px; }
.enroll-summary-meta { margin-bottom: 16px; }
.enroll-summary-meta li {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 14px; padding: 8px 0; border-bottom: 1px solid var(--gray-100);
}
.enroll-summary-meta li span { color: var(--gray-500); }
.enroll-summary-note { font-size: 12px; color: var(--gray-500); line-height: 1.6; }
.enroll-form-card {
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.enroll-form-card h2 { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.enroll-form-desc { font-size: 14px; color: var(--gray-500); margin-bottom: 24px; }
.enroll-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.enroll-grid-span2 { grid-column: span 2; }
.enroll-field-hint { margin-top: 6px; font-size: 0.85rem; color: var(--text-muted, #64748b); }
.enroll-section-title { font-size: 16px; font-weight: 700; margin: 28px 0 12px; }
.enroll-pay-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.enroll-pay-option { cursor: pointer; }
.enroll-pay-option input { position: absolute; opacity: 0; pointer-events: none; }
.enroll-pay-option-inner {
  display: block;
  border: 2px solid var(--gray-200);
  border-radius: 12px;
  padding: 16px;
  transition: border-color .2s, background .2s;
}
.enroll-pay-option input:checked + .enroll-pay-option-inner {
  border-color: var(--brand-600);
  background: var(--brand-50);
}
.enroll-pay-option-inner strong { display: block; font-size: 15px; margin-bottom: 4px; }
.enroll-pay-option-inner small { color: var(--gray-500); font-size: 12px; }
.enroll-pay-panel {
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 16px;
}
.enroll-pay-panel h4 { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.enroll-bank-box { margin-top: 4px; }
.enroll-bank-line { font-size: 15px; font-weight: 700; color: var(--brand-800); line-height: 1.6; }
.enroll-card-notice {
  font-size: 14px;
  color: var(--gray-700);
  line-height: 1.7;
  padding: 12px 14px;
  background: #fff;
  border-radius: 10px;
  border: 1px dashed var(--brand-200);
}
.enroll-muted { font-size: 13px; color: var(--gray-500); line-height: 1.6; }
.enroll-alert {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 16px;
}
.enroll-alert--error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.enroll-submit { width: 100%; border: none; cursor: pointer; margin-top: 8px; }
.enroll-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.enroll-cancel { display: block; text-align: center; margin-top: 10px; }
.req { color: #dc2626; }
.enroll-success-card { max-width: 520px; }
.enroll-success-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent-500); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700; margin: 0 auto 16px;
}
.enroll-success-receipt {
  background: var(--gray-50);
  border-radius: 12px;
  padding: 16px;
  margin: 20px 0;
  text-align: left;
}
.enroll-success-receipt p {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 14px; padding: 6px 0;
}
.enroll-success-receipt span { color: var(--gray-500); }
.enroll-success-panel {
  text-align: left;
  background: var(--gray-50);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}
.enroll-success-panel h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.enroll-alimtalk-note { color: var(--accent-600); font-weight: 600; }

.enroll-status-head { margin-bottom: 20px; }
.enroll-status-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.enroll-status-badge--wait { background: #fef3c7; color: #b45309; }
.enroll-status-badge--check { background: #dbeafe; color: #1d4ed8; }
.enroll-status-badge--ok { background: #dcfce7; color: #15803d; }
.enroll-status-meta {
  background: var(--gray-50);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.enroll-status-meta p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  margin-bottom: 8px;
}
.enroll-status-meta p:last-child { margin-bottom: 0; }
.enroll-status-meta span { color: var(--gray-500); }
.enroll-status-meta strong { font-weight: 700; text-align: right; }
.enroll-status-note {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.6;
  margin: 12px 0 16px;
}

@media (max-width: 900px) {
  .enroll-layout { grid-template-columns: 1fr; }
  .enroll-summary-card { position: static; }
  .enroll-grid { grid-template-columns: 1fr; }
  .enroll-grid-span2 { grid-column: span 1; }
  .enroll-pay-options { grid-template-columns: 1fr; }
}
