/* ============================================================
   css/edu.css - 디지털·AI 배움터
   원칙: 본문 18px 이상, 버튼 높이 56px 이상, 아이콘 + 글자, 간격 16px 이상
   ============================================================ */
.edu-wrap { font-size: 19px; line-height: 1.7; word-break: keep-all; }
/* display를 지정한 요소(.edu-btns 등)도 hidden이면 반드시 숨김 */
.edu-wrap [hidden] { display: none !important; }
.edu-wrap h2 { font-size: 24px; }

/* ---------- 상단: 제목 + 검색 ---------- */
.edu-top { background: linear-gradient(135deg, #1e40af, #2563eb); color: #fff; border-radius: 16px; padding: 28px 28px 24px; margin-bottom: 24px; }
.edu-top h1 { font-size: 30px; margin: 0 0 6px; }
.edu-top p { margin: 0 0 16px; font-size: 19px; opacity: .95; }
.edu-search { display: flex; gap: 8px; }
.edu-search input {
  flex: 1; min-width: 0; height: 58px; padding: 0 18px; font-size: 20px;
  border: 0; border-radius: 12px; color: #111;
}
.edu-search button {
  height: 58px; min-width: 58px; padding: 0 16px; font-size: 20px; font-weight: bold;
  border: 0; border-radius: 12px; background: #facc15; color: #111; cursor: pointer;
}
.edu-search button.is-listening { background: #ef4444; color: #fff; }

/* ---------- 이어서 보기 ---------- */
.edu-continue { margin-bottom: 24px; }
.edu-continue[hidden] { display: none; }
.edu-continue__link {
  display: block; background: #fff; border: 3px solid #2563eb; border-radius: 16px; padding: 18px 22px;
  text-decoration: none; color: #111; box-shadow: 0 4px 14px rgba(37,99,235,.15);
}
.edu-continue__link:hover { background: #eff6ff; text-decoration: none; }
.edu-continue__label { display: inline-block; background: #2563eb; color: #fff; font-weight: bold; font-size: 17px; padding: 4px 12px; border-radius: 20px; }
.edu-continue__title { display: block; font-size: 22px; margin: 8px 0 2px; }
.edu-continue__sub { display: block; font-size: 17px; color: #555; }
.edu-continue__bar { display: block; height: 10px; background: #e5e7eb; border-radius: 6px; margin-top: 10px; overflow: hidden; }
.edu-continue__bar span { display: block; height: 100%; background: #2563eb; }

/* ---------- 두 입구 (왕초보 / 액티브) ---------- */
.edu-halls { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 28px; }
.edu-hall {
  display: flex; align-items: center; gap: 16px; padding: 22px; border-radius: 16px;
  text-decoration: none; color: #111; border: 3px solid transparent; min-height: 120px;
}
.edu-hall:hover { text-decoration: none; filter: brightness(.98); border-color: currentColor; }
.edu-hall--basic { background: #fef3c7; color: #92400e; }
.edu-hall--active { background: #dbeafe; color: #1e40af; }
.edu-hall__icon { font-size: 48px; line-height: 1; }
.edu-hall strong { display: block; font-size: 24px; color: #111; }
.edu-hall span.edu-hall__desc { display: block; font-size: 17px; color: #444; }

/* ---------- 입문관 탭 ---------- */
.edu-tabs { display: flex; gap: 10px; margin-bottom: 20px; }
.edu-tab {
  flex: 1; text-align: center; padding: 16px 10px; min-height: 58px; font-size: 21px; font-weight: bold;
  border: 3px solid #cbd5e1; border-radius: 14px; color: #333; background: #fff; text-decoration: none;
}
.edu-tab:hover { text-decoration: none; border-color: #2563eb; }
.edu-tab.is-active { background: #2563eb; border-color: #2563eb; color: #fff; }

/* ---------- 그룹 ---------- */
.edu-group { margin-bottom: 30px; }
.edu-group__head { display: flex; align-items: center; gap: 10px; border-bottom: 3px solid #2563eb; padding-bottom: 8px; margin-bottom: 14px; }
.edu-group__head h2 { margin: 0; font-size: 23px; }
.edu-group__head > span:first-child { font-size: 28px; }
.edu-group__head .edu-group__desc { font-size: 17px; color: #555; margin-left: auto; }

/* ---------- 강좌 카드 ---------- */
.edu-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.edu-card {
  display: flex; gap: 16px; align-items: flex-start; padding: 18px; background: #fff;
  border: 2px solid #e2e8f0; border-radius: 14px; text-decoration: none; color: #111; position: relative;
}
.edu-card:hover { border-color: #2563eb; background: #f8fbff; text-decoration: none; }
.edu-card__icon { font-size: 40px; line-height: 1; flex-shrink: 0; width: 56px; text-align: center; }
.edu-card__body { flex: 1; min-width: 0; }
.edu-card__no { display: inline-block; font-size: 15px; font-weight: bold; color: #2563eb; background: #eff6ff; border-radius: 6px; padding: 0 8px; }
.edu-card__title { display: block; font-size: 21px; margin: 4px 0 2px; line-height: 1.4; }
.edu-card__desc { display: block; font-size: 17px; color: #555; line-height: 1.5; }
.edu-card__meta { display: block; font-size: 16px; color: #666; margin-top: 6px; }
.edu-stars { color: #f59e0b; letter-spacing: 1px; }
.edu-badge { display: inline-block; font-size: 14px; font-weight: bold; padding: 1px 8px; border-radius: 10px; margin-left: 6px; vertical-align: 1px; }
.edu-badge--open { background: #dcfce7; color: #166534; }
.edu-badge--prep { background: #f1f5f9; color: #64748b; }
.edu-card__progress { display: none; height: 8px; background: #e5e7eb; border-radius: 6px; margin-top: 10px; overflow: hidden; }
.edu-card__progress.is-on { display: block; }
.edu-card__progress span { display: block; height: 100%; width: 0; background: #22c55e; }
.edu-card.is-complete::after {
  content: '\2714  수료'; position: absolute; top: 12px; right: 12px;
  background: #16a34a; color: #fff; font-size: 14px; font-weight: bold; padding: 2px 10px; border-radius: 12px;
}
.edu-empty { display: none; padding: 24px; text-align: center; font-size: 19px; background: #f8fafc; border-radius: 12px; }

/* ---------- 큰 버튼 ---------- */
.edu-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 58px; padding: 0 24px; font-size: 20px; font-weight: bold;
  border-radius: 14px; border: 3px solid #2563eb; background: #2563eb; color: #fff; text-decoration: none; cursor: pointer;
}
.edu-btn:hover { filter: brightness(1.08); text-decoration: none; color: #fff; }
.edu-btn--line { background: #fff; color: #1e40af; }
.edu-btn--line:hover { color: #1e40af; background: #eff6ff; }
.edu-btn--gray { background: #f1f5f9; border-color: #cbd5e1; color: #333; }
.edu-btn--gray:hover { color: #333; }
.edu-btn.is-on { background: #fde68a; border-color: #f59e0b; color: #92400e; }
.edu-btns { display: flex; flex-wrap: wrap; gap: 16px; margin: 20px 0; }
.edu-btns .edu-btn { flex: 1 1 220px; }

/* ---------- 3문항 진단 ---------- */
.edu-diag { background: #f0fdf4; border: 2px solid #86efac; border-radius: 16px; padding: 22px; margin: 28px 0; }
.edu-diag h2 { margin: 0 0 8px; font-size: 23px; }
.edu-diag__q { font-size: 20px; font-weight: bold; margin: 16px 0 10px; }
.edu-diag__opts { display: flex; flex-wrap: wrap; gap: 12px; }
.edu-diag__opts button {
  flex: 1 1 200px; min-height: 58px; font-size: 19px; font-weight: bold; padding: 8px 14px;
  border: 2px solid #86efac; background: #fff; border-radius: 12px; cursor: pointer;
}
.edu-diag__opts button.is-on { background: #16a34a; border-color: #16a34a; color: #fff; }
.edu-diag__result { margin-top: 18px; font-size: 20px; }
.edu-diag__result[hidden] { display: none; }

/* ---------- 강좌 상세 ---------- */
.edu-course-head { display: flex; gap: 20px; align-items: center; background: #fff; border: 2px solid #e2e8f0; border-radius: 16px; padding: 24px; margin-bottom: 20px; }
.edu-course-head__icon { font-size: 72px; line-height: 1; }
.edu-course-head h1 { font-size: 28px; margin: 4px 0; line-height: 1.35; }
.edu-course-head__meta { font-size: 18px; color: #555; }
.edu-box { background: #fff; border: 2px solid #e2e8f0; border-radius: 16px; padding: 20px 24px; margin-bottom: 20px; }
.edu-box h2 { font-size: 22px; margin: 0 0 12px; }
.edu-box ul { margin: 0; padding-left: 0; list-style: none; }
.edu-target li { padding: 6px 0 6px 34px; position: relative; font-size: 19px; }
.edu-target li::before { content: '\2714'; position: absolute; left: 4px; color: #16a34a; font-weight: bold; }
.edu-prep { background: #fff7ed; border: 2px solid #fdba74; border-radius: 14px; padding: 16px 20px; font-size: 19px; margin-bottom: 20px; }

.edu-part { font-size: 19px; font-weight: bold; color: #1e40af; margin: 18px 0 8px; }
.edu-lessons { counter-reset: none; }
.edu-lessons li { border-bottom: 1px solid #eef2f7; }
.edu-lessons a, .edu-lessons .edu-lesson-row {
  display: flex; align-items: center; gap: 14px; padding: 12px 6px; text-decoration: none; color: #111; font-size: 19px;
}
.edu-lessons a:hover { background: #f8fbff; text-decoration: none; }
.edu-lesson-no {
  flex-shrink: 0; width: 46px; height: 46px; border-radius: 50%; background: #eff6ff; color: #1e40af;
  font-weight: bold; font-size: 16px; display: flex; align-items: center; justify-content: center;
}
.edu-lesson-time { margin-left: auto; font-size: 16px; color: #888; flex-shrink: 0; }
.edu-lessons li.is-done .edu-lesson-no { background: #16a34a; color: #fff; }
.edu-lessons li.is-done .edu-lesson-time::before { content: '\2714 완료 · '; color: #16a34a; font-weight: bold; }
.edu-links a { display: inline-flex; align-items: center; gap: 6px; margin: 4px 12px 4px 0; font-size: 19px; font-weight: bold; }

/* ---------- 학습 플레이어 ---------- */
.edu-fig { margin: 12px 0 16px; text-align: center; }
.edu-fig img {
  display: block; width: 100%; max-width: 720px; height: auto; margin: 0 auto;
  border-radius: 14px; border: 2px solid #e2e8f0; background: #f8fafc;
}
.edu-fig figcaption { margin-top: 8px; font-size: 18px; color: #475569; }
.edu-fig__zoom { display: block; cursor: zoom-in; }
/* 폰: 그림을 화면 폭 가득 + 누르면 크게 보기 안내 */
@media (max-width: 768px) {
  .edu-fig { margin-left: -14px; margin-right: -14px; }
  .edu-fig img { border-radius: 0; border-left: 0; border-right: 0; }
  .edu-fig__zoom::after {
    content: '\1F50D  그림을 누르면 크게 볼 수 있어요';
    display: block; margin-top: 6px; font-size: 16px; font-weight: bold; color: #2563eb;
  }
}
.edu-lessons li.is-prep { opacity: .65; }
.edu-player-head { font-size: 17px; color: #555; margin-bottom: 4px; }
.edu-ask-link { text-align: center; margin: 8px 0 24px; font-size: 18px; }

/* ---------- 실습 놀이터 ---------- */
.edu-practice { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.edu-practice__card {
  display: block; padding: 24px; border-radius: 16px; border: 3px solid #e2e8f0; background: #fff;
  text-decoration: none; color: #111; min-height: 170px; position: relative;
}
.edu-practice__card:hover { border-color: #2563eb; text-decoration: none; }
.edu-practice__card .ico { font-size: 48px; line-height: 1; }
.edu-practice__card strong { display: block; font-size: 23px; margin: 10px 0 4px; }
.edu-practice__card span.d { display: block; font-size: 17px; color: #555; }
.edu-practice__card.is-prep { opacity: .75; }
.edu-practice__card.is-prep::after { content: '준비 중'; position: absolute; top: 14px; right: 14px; background: #f1f5f9; color: #64748b; font-weight: bold; font-size: 15px; padding: 2px 10px; border-radius: 10px; }

/* 퀴즈 */
.edu-quiz { background: #fff; border: 2px solid #e2e8f0; border-radius: 16px; padding: 22px; }
.edu-quiz__count { font-size: 17px; color: #666; }
.edu-sms {
  background: #f1f5f9; border-radius: 18px 18px 18px 4px; padding: 16px 18px; margin: 14px 0 18px;
  font-size: 19px; line-height: 1.7; white-space: pre-line; word-break: break-all;
}
.edu-sms__from { display: block; font-size: 15px; color: #666; margin-bottom: 4px; }
.edu-quiz__opts { display: flex; gap: 16px; }
.edu-quiz__opts button {
  flex: 1; min-height: 64px; font-size: 22px; font-weight: bold; border-radius: 14px; cursor: pointer; border: 3px solid;
}
.edu-quiz__safe { background: #f0fdf4; border-color: #22c55e !important; color: #166534; }
.edu-quiz__risk { background: #fef2f2; border-color: #ef4444 !important; color: #991b1b; }
.edu-quiz__fb { margin-top: 18px; padding: 16px 18px; border-radius: 12px; font-size: 19px; }
.edu-quiz__fb[hidden] { display: none; }
.edu-quiz__fb.ok { background: #f0fdf4; border: 2px solid #86efac; }
.edu-quiz__fb.no { background: #fff7ed; border: 2px solid #fdba74; }
.edu-quiz__fb mark { background: #fde68a; padding: 0 3px; }

/* AI 질문 연습 */
.edu-chat { background: #fff; border: 2px solid #e2e8f0; border-radius: 16px; padding: 18px; }
.edu-chat__log { min-height: 160px; margin-bottom: 14px; }
.edu-chat__msg { max-width: 85%; padding: 12px 16px; border-radius: 16px; margin: 8px 0; font-size: 19px; line-height: 1.6; white-space: pre-line; }
.edu-chat__msg.me { margin-left: auto; background: #2563eb; color: #fff; border-bottom-right-radius: 4px; }
.edu-chat__msg.ai { background: #f1f5f9; border-bottom-left-radius: 4px; }
.edu-chat__msg.warn { background: #fef2f2; border: 2px solid #fca5a5; color: #991b1b; }
.edu-chat__ex { margin-bottom: 14px; }
.edu-chat__exhint { font-size: 16px; color: #475569; margin: 0 0 8px; }
.edu-chat__group { border: 1px solid #e2e8f0; border-radius: 12px; margin-bottom: 8px; background: #fff; }
.edu-chat__group summary {
  list-style: none; cursor: pointer; padding: 12px 44px 12px 14px; font-size: 18px; font-weight: 700; position: relative; min-height: 50px;
}
.edu-chat__group summary::-webkit-details-marker { display: none; }
.edu-chat__group summary::after { content: '\25BC'; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 14px; color: #2563eb; transition: transform .2s; }
.edu-chat__group[open] summary::after { transform: translateY(-50%) rotate(180deg); }
.edu-chat__group > div { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 12px 12px; }
.edu-chat__ex button { min-height: 52px; font-size: 17px; padding: 6px 14px; border: 2px solid #bfdbfe; background: #eff6ff; border-radius: 26px; cursor: pointer; text-align: left; line-height: 1.45; }
.edu-chat__ex button:hover { background: #dbeafe; }
/* 피드백 안의 [연습하기] 버튼, 강좌 링크 */
.edu-chat__try {
  display: block; margin-top: 12px; min-height: 48px; padding: 6px 16px; font-size: 17px; font-weight: 700;
  border: 2px solid #2563eb; background: #fff; color: #1d4ed8; border-radius: 24px; cursor: pointer;
}
.edu-chat__try:hover { background: #eff6ff; }
.edu-chat__link { display: block; margin-top: 10px; font-size: 17px; font-weight: 700; color: #1d4ed8; }

/* ---------- 반응형 ---------- */
@media (max-width: 1020px) {
  .edu-cards, .edu-practice { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .edu-top { padding: 22px 18px; }
  .edu-top h1 { font-size: 26px; }
  .edu-halls { grid-template-columns: 1fr; }
  .edu-group__desc { display: none; }
  .edu-course-head { flex-direction: column; text-align: center; padding: 20px; }
  .edu-course-head__icon { font-size: 60px; }
  .edu-course-head h1 { font-size: 24px; }
  .edu-box { padding: 18px; }
  .edu-lesson-time { display: none; }
  .edu-lessons li.is-done .edu-lesson-no::after { content: ''; }
  .edu-quiz__opts { flex-direction: column; }
}
