@font-face {
  font-family: "Pretendard";
  src: url("./assets/fonts/PretendardVariable.woff2") format("woff2-variations");
  font-weight: 45 920;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #1f272c;
  --ink-soft: #34424a;
  --muted: #66757d;
  --line: rgba(79, 95, 104, 0.18);
  --line-strong: rgba(38, 56, 66, 0.24);
  --panel: rgba(255, 255, 255, 0.86);
  --blue: #2d6f8f;
  --blue-soft: #e9f5fa;
  --gold: #b98a36;
  --green: #4f7f67;
  --shadow: 0 22px 64px rgba(48, 63, 71, 0.11);
  --shadow-soft: 0 12px 30px rgba(48, 63, 71, 0.09);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  margin: 0;
  color: var(--ink);
  background-color: #f7faf9;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.12) 52%, rgba(247, 251, 252, 0.33) 100%),
    url("./assets/home-bg-sodam-ink.png") center top / cover no-repeat fixed;
  font-family: "Pretendard", "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
  line-height: 1.5;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03) 42%, rgba(255, 255, 255, 0.06)),
    radial-gradient(circle at 47% 18%, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0) 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.25) 100%);
  pointer-events: none;
}

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

button,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(92, 111, 121, 0.14);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
}

.site-header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  min-height: 64px;
  width: min(1360px, calc(100% - 56px));
  margin: 0 auto;
  padding: 10px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 15px;
  font-weight: 900;
  color: #24323a;
}

.brand img {
  width: 142px;
  height: auto;
  display: block;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  color: var(--ink-soft);
  font-size: 18px;
  font-weight: 800;
}

.top-nav a,
.login-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border-radius: 6px;
}

.top-nav a:hover,
.login-link:hover {
  background: rgba(233, 245, 250, 0.86);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  font-weight: 900;
}

.manse-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 4px 6px;
  border-radius: 6px;
  transition: opacity 0.15s ease;
}

.manse-link:hover {
  opacity: 0.7;
}

.manse-link img {
  height: 34px;
  width: auto;
  display: block;
}

.login-link {
  color: var(--muted);
}

.academy-home {
  width: min(1360px, calc(100% - 56px));
  margin: 0 auto;
  padding: 20px 0 34px;
  flex: 1 0 auto;
}

.lead-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  align-items: center;
  gap: 24px;
}

/* 히어로는 인물 사진 대신 텍스트로 힘을 준다.
   왼쪽에 주제 문장 "사주명리학은 운명기상학입니다" + 강사, 오른쪽에 소개 문구를
   두 칼럼으로 나눠 세로 길이를 줄인다. 뒤에는 '運 命' 한자를 옅게 깔아 깊이를 준다. */
.lead-copy {
  position: relative;
  display: block;
  padding: 12px 0 8px;
  overflow: hidden;
}

/* 왼쪽은 인용문 블록(아이브로우+헤드라인+서명), 오른쪽은 보조 문구(태그라인+본문).
   좌우로 나눠 세로 길이를 줄이고, 왼쪽 벽에서 살짝 떨어뜨려 들여쓴다. */
.lead-copy-text {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  align-items: center;
  gap: 0 40px;
  margin-left: 40px;
}

.lead-quote-col,
.lead-support-col {
  min-width: 0;
}

/* 배경 한자 워터마크 '運 命' — 텍스트 뒤에 옅게. 장식이라 스크린리더에서 숨긴다. */
.lead-hanja {
  position: absolute;
  z-index: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 230px;
  line-height: 1;
  font-weight: 900;
  color: rgba(45, 111, 143, 0.06);
  pointer-events: none;
  user-select: none;
}

.lead-hanja-1 {
  left: 20%;
}

.lead-hanja-2 {
  left: 60%;
}

.lead-headline {
  margin: 10px 0 0;
  color: #172026;
  font-size: clamp(32px, 3.4vw, 46px);
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -0.01em;
}

/* "운명기상학"만 파란색(기상=하늘·날씨의 결) + 붓으로 그은 밑줄. */
.lead-headline-accent {
  position: relative;
  color: var(--blue);
  white-space: nowrap;
}

.lead-headline-accent::after {
  content: "";
  position: absolute;
  left: -1%;
  right: -1%;
  bottom: 0.02em;
  height: 0.12em;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(45, 111, 143, 0.15), rgba(45, 111, 143, 0.55));
  transform: scaleX(0);
  transform-origin: left center;
  animation: heroUnderline 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.55s forwards;
}

/* 보조 태그라인. 메인 헤드라인과 경쟁하지 않게 톤을 낮추고 금색 막대만 살린다. */
.lead-sub {
  margin: 12px 0 0;
  padding-left: 12px;
  border-left: 3px solid var(--gold);
  color: #45555e;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

/* 헤드라인 인용문의 서명 줄 — "— 강사 현암 김호진". 헤드라인 바로 밑에 붙인다. */
.lead-instructor {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.lead-quote-dash {
  color: #8a97a0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.lead-instructor-label {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: #45555e;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.lead-instructor-name {
  height: 30px;
  width: auto;
  display: block;
}

/* 등장 애니메이션: 왼쪽 인용문 블록 → 오른쪽 보조 문구 순으로 떠오른다. */
.lead-copy-text > * {
  opacity: 0;
  animation: heroRise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.lead-quote-col {
  animation-delay: 0.1s;
}
.lead-support-col {
  animation-delay: 0.28s;
}

@keyframes heroRise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes heroUnderline {
  to {
    transform: scaleX(1);
  }
}

/* 모션 최소화 설정이면 애니메이션 없이 바로 보이게. */
@media (prefers-reduced-motion: reduce) {
  .lead-copy-text > *,
  .lead-headline-accent::after,
  .continue-play::before {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

.lead-cards {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
}

.eyebrow,
.card-label {
  display: block;
  margin: 0;
  color: var(--blue);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
}

.lead-text {
  max-width: 560px;
  margin: 12px 0 0;
  color: #47575f;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.6;
}

.lead-text-highlight {
  color: var(--blue);
}

.lead-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.primary-action,
.secondary-action,
.card-actions a,
.manse-card a,
.quiz-bottom button,
.quiz-bottom a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 6px;
  font-weight: 900;
}

.primary-action {
  background: #21333d;
  color: #fff;
}

.secondary-action,
.card-actions a,
.quiz-bottom a {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.76);
  color: #283942;
}

.summary-card,
.course-area,
.community-area,
.manse-card,
.quiz-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.summary-card {
  min-height: 174px;
  padding: 16px;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

.continue-state {
  padding: 0;
  display: flex;
  flex-direction: column;
}

.continue-watch {
  flex: 0 0 auto;
  width: 100%;
  min-height: 0;
  padding: 0;
  display: block;
  background: #fff;
  backdrop-filter: none;
}

.continue-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  background: #cfd8dc;
}

.continue-thumb img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 이어보기는 얼굴 섬네일 대신 CSS로 그린 잔잔한 먹빛 화면을 쓴다.
   가운데 은은한 빛을 두고 그 위에 재생 버튼이 놓인다. 사진이 없어 화면이 덜 어지럽다. */
.continue-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(115% 85% at 50% 38%, rgba(58, 130, 165, 0.55), rgba(58, 130, 165, 0) 62%),
    radial-gradient(140% 120% at 85% 110%, rgba(185, 138, 54, 0.22), rgba(185, 138, 54, 0) 55%),
    linear-gradient(155deg, #1d2c34 0%, #142027 55%, #0e171c 100%);
}

/* 그래픽 화면 위에 큰 '學' 한자를 아주 옅게 깔아 강의 화면다운 깊이를 준다. */
.continue-scene::after {
  content: "學";
  position: absolute;
  right: 12px;
  bottom: -18px;
  font-size: 120px;
  font-weight: 900;
  line-height: 1;
  color: rgba(255, 255, 255, 0.05);
}

.continue-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to top, rgba(15, 23, 27, 0.9), rgba(15, 23, 27, 0.12) 58%, rgba(15, 23, 27, 0) 78%);
}

.continue-badge {
  position: absolute;
  z-index: 3;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 27, 0.55);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.continue-play {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 0 8px rgba(255, 255, 255, 0.06);
  transition: transform 200ms ease, background 200ms ease, box-shadow 200ms ease;
}

/* 재생 버튼이 잔잔하게 숨쉬는 링. 마우스를 올리면 멈추고 살짝 커진다. */
.continue-play::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.55);
  animation: continuePulse 2.4s ease-out infinite;
}

.continue-play::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 55%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent #fff;
}

.continue-thumb:hover .continue-play,
.continue-thumb:focus-visible .continue-play {
  transform: translate(-50%, -50%) scale(1.08);
  background: rgba(255, 255, 255, 0.26);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45), 0 0 0 10px rgba(255, 255, 255, 0.08);
}

.continue-thumb:hover .continue-play::before,
.continue-thumb:focus-visible .continue-play::before {
  animation: none;
}

@keyframes continuePulse {
  0% {
    opacity: 0.7;
    transform: scale(1);
  }
  70%,
  100% {
    opacity: 0;
    transform: scale(1.55);
  }
}

/* 강의명 위 작은 영문 키커. */
.continue-kicker {
  display: block;
  margin-bottom: 3px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.continue-overlay {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 12px;
  padding: 0 14px;
  color: #fff;
}

.continue-overlay strong {
  display: block;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.25;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}

.continue-overlay-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
}

.continue-overlay-row p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  font-weight: 750;
}

.continue-cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: #21333d;
  font-size: 12px;
  font-weight: 800;
}

.continue-progress-track {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.35);
}

.continue-progress-fill {
  display: block;
  height: 100%;
  background: #fff;
}

.mini-thumb {
  width: 100%;
  height: 92px;
  margin-top: 10px;
  border-radius: 8px;
  overflow: hidden;
}

.mini-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 섬네일 전체가 만세력으로 가는 링크다. 이미지는 투명도를 낮춰 배경처럼 깔고
   그 위에 "이동하기" 버튼을 얹는다. */
.manse-preview {
  position: relative;
  display: block;
  width: 100%;
  margin-top: 10px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.manse-preview img {
  width: 100%;
  height: auto;
  display: block;
  opacity: 0.4;
  transition: opacity 200ms ease;
}

/* 반투명 유리 알약. 뒤의 만세력 화면이 살짝 비쳐서 "이 화면으로 간다"는 게 읽히고,
   섬네일 위에 얹은 흰 버튼이라 이어보기 카드 CTA와도 결이 맞는다. */
.manse-go {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 18px rgba(33, 51, 61, 0.18);
  color: #21333d;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
  transition: background 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}

.manse-go::after {
  content: "→";
  font-size: 13px;
  line-height: 1;
  transition: transform 200ms ease;
}

.manse-preview:hover .manse-go,
.manse-preview:focus-visible .manse-go {
  background: #fff;
  box-shadow: 0 10px 26px rgba(33, 51, 61, 0.28);
  transform: translateY(-2px);
}

.manse-preview:hover .manse-go::after,
.manse-preview:focus-visible .manse-go::after {
  transform: translateX(3px);
}

.manse-preview:hover img {
  opacity: 0.55;
}

@media (prefers-reduced-motion: reduce) {
  .manse-preview img,
  .manse-go,
  .manse-go::after {
    transition: none;
  }

  .manse-preview:hover .manse-go {
    transform: none;
  }

  .manse-preview:hover .manse-go::after {
    transform: none;
  }
}

/* 카드 머리: 왼쪽에 소담만세력 로고("필수 도구" 라벨 대체), 오른쪽에 한 줄 설명 */
.manse-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.manse-logo-mark {
  flex: none;
  height: 26px;
  width: auto;
  display: block;
}

/* 유튜브 로고는 가로로 길어서(약 5:1) 만세력 로고보다 조금 낮게 잡아야
   옆의 설명 문구가 한 줄에 들어간다. */
.youtube-logo-mark {
  flex: none;
  height: 22px;
  width: auto;
  display: block;
}

.manse-state .manse-head p,
.youtube-state .manse-head p {
  min-width: 0;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.45;
}

.summary-card strong {
  display: block;
  margin-top: 8px;
  font-size: 21px;
  line-height: 1.25;
}

.summary-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.card-actions a {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

.tier-coin {
  flex: none;
  width: 56px;
  height: auto;
  display: block;
}

.level-meter {
  height: 8px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6eef2;
}

#tierMeter {
  background: rgba(230, 238, 242, 0.55);
}

.level-meter span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #2d6f8f, #85b9cb);
}

.level-state small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
}

.level-state {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.profile-chip-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.streak-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(185, 138, 54, 0.12);
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.streak-chip strong {
  display: inline;
  margin-top: 0;
  font-size: inherit;
  line-height: inherit;
  font-weight: 900;
}

.dev-profile-panel {
  margin-top: 24px;
  padding: 14px 18px;
  border: 1px dashed rgba(161, 71, 63, 0.45);
  border-radius: 10px;
  background: rgba(161, 71, 63, 0.06);
}

.dev-profile-title {
  margin: 0 0 10px;
  color: #a1473f;
  font-size: 13px;
  font-weight: 900;
}

.dev-profile-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dev-profile-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dev-profile-label {
  min-width: 150px;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}

.dev-profile-row button,
.dev-profile-reset {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(161, 71, 63, 0.35);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.85);
  color: #a1473f;
  font-size: 12px;
  font-weight: 800;
}

.dev-profile-row button:hover,
.dev-profile-reset:hover {
  background: #a1473f;
  color: #fff;
}

.dev-profile-reset {
  margin-top: 12px;
}

.profile-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.profile-identity-info {
  flex: 1;
  min-width: 0;
}

strong.profile-nickname {
  display: block;
  margin-top: 0;
  color: var(--ink);
  font-size: 19px;
  font-weight: 900;
  line-height: 1.25;
}

.tier-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

/* 카드 머리: 왼쪽 Profile 라벨 + 오른쪽 "내 강의보기" 버튼 */
.profile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* 카드 전체를 마이페이지 링크로 덮는다. "내 강의보기"는 링크 안에 링크를 넣을 수
   없어서 겹쳐 깔지 않고, z-index로 이 오버레이 위에 올려 각자 다른 곳으로 보낸다. */
.profile-card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 8px;
}

.profile-my-courses-link {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 8px;
  background: #21333d;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 18px;
  margin-top: 14px;
}

.course-column {
  min-width: 0;
  /* 커뮤니티가 남는 높이를 가져가 오른쪽 카드 줄과 아래 끝이 맞는다.
     글 수가 바뀌어도 카드 높이가 늘었다 줄었다 하지 않는다. */
  display: flex;
  flex-direction: column;
}

.course-area {
  min-height: 340px;
  padding: 18px;
  border-radius: 8px;
}

.community-area {
  padding: 18px;
  border-radius: 8px;
  margin-top: 18px;
  flex: 1;
}


.detail-side-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.section-head,
.quiz-head,
.quiz-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-head h2 {
  margin: 4px 0 0;
  font-size: 22px;
  line-height: 1.2;
}

/* 라벨(COURSES)과 제목을 세로로 쌓지 않고 한 줄에 나란히 두는 머리글 */
.section-head-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.section-head-title h2 {
  margin: 0;
}

.section-head a {
  color: var(--blue);
  font-size: 14px;
  font-weight: 900;
}

.course-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.course-card {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(79, 95, 104, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  overflow: hidden;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.course-card .course-art {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  border-radius: 8px 8px 0 0;
}

/* 등급 배지는 섬네일 위에 얹는다. 카드 아래 글상자를 제목·설명 두 줄로 줄이려고
   옮긴 것이라, 다시 글상자로 내리면 세 줄로 돌아간다. */
.course-card .course-art span {
  position: absolute;
  top: 8px;
  left: 8px;
  box-shadow: 0 2px 8px rgba(33, 51, 61, 0.18);
}

.course-card:hover {
  border-color: rgba(45, 111, 143, 0.24);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.course-art,
.tool-art {
  overflow: hidden;
  border: 1px solid rgba(79, 95, 104, 0.12);
  border-radius: 7px;
  background: rgba(245, 250, 251, 0.72);
}

.course-art img,
.tool-art img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* 섬네일 아래 글상자.
   글상자에 색을 깔면 섬네일과 색이 싸우고, 카드 4장이 하늘색 배경 위에서 뭉개진다.
   그래서 글상자는 거의 흰색으로 비워 두고, 색은 섬네일 바로 아래 3px 액센트 선
   하나에만 준다. 색은 강의마다 다르고(--course-accent) 배지 색과 짝을 이룬다. */
.course-content {
  min-width: 0;
  flex: 1;
  padding: 13px 12px 14px;
  background: rgba(255, 255, 255, 0.94);
  border-top: 3px solid var(--course-accent, var(--blue));
}

.free-course {
  --course-accent: #4f7f67;
}

/* 입문·실전은 둘 다 "라이브 아카이브"라 한 가족으로 묶는다. 같은 노란 계열. */
.intro-course,
.practice-course {
  --course-accent: #b08a2a;
}

/* 대표 강의는 파란색. 아카이브 두 개와 확실히 갈라진다. */
.featured-course {
  --course-accent: #2d6f8f;
}

.course-card span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.course-card strong {
  display: block;
  font-size: 18px;
  line-height: 1.3;
}

/* 두 줄뿐이라 제목이 확실히 먼저 읽히도록 설명은 한 단계 낮춘다. */
.course-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.course-card .price {
  margin-top: 8px;
  color: #21333d;
  font-size: 16px;
  font-weight: 900;
}

/* 배지 색은 위 --course-accent와 짝을 이룬다. 배지와 액센트 선이 같은 색이라
   카드마다 색 하나로 읽힌다. */
/* 배지 글씨는 12px로 작아서 옅은 바탕 위에서 대비가 4.5:1은 넘어야 읽힌다.
   기존 --green(4.21)은 살짝 모자랐다. */
.free-course span {
  background: #eef7f1;
  color: #47755d;
}

/* 아카이브 두 개는 같은 노란 배지. 대표 강의는 별도 규칙 없이
   기본값(파란 배지, .course-card span)을 그대로 쓴다. */
.intro-course span,
.practice-course span {
  background: #fdf6e4;
  color: #8e6b1a;
}

/* ===== 커뮤니티 = 소담광장 아카데미 게시판 =====
   배너형 카드 3장이 아니라 진짜 게시판 목록으로 보여준다.
   말머리 탭으로 게시판을 고르고, 한 줄에 [말머리] 제목 ... 작성자·날짜 순으로 읽힌다. */

.board-more {
  flex: none;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}

.board {
  margin-top: 14px;
}

.board-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 1px solid var(--line);
}

.board-tab {
  padding: 9px 13px 10px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  /* 선택된 탭의 아래 선이 탭 줄의 경계선을 덮어써 이어붙은 것처럼 보이게 한다. */
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
}

.board-tab:hover {
  color: var(--ink-soft);
}

.board-tab.is-active {
  color: var(--ink);
  border-bottom-color: var(--blue);
}

.board-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.board-row + .board-row {
  border-top: 1px solid rgba(79, 95, 104, 0.12);
}

.board-row a {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 9px 4px;
  border-radius: 6px;
}

.board-row a:hover {
  background: rgba(255, 255, 255, 0.55);
}

.board-tag {
  justify-self: start;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(45, 111, 143, 0.1);
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

/* 게시판마다 색을 달리해 목록에서 한눈에 갈린다. 채도는 낮게 — 홈 전체가 옅은 톤이다. */
.board-tag[data-board="quiz"] {
  background: rgba(180, 95, 109, 0.11);
  color: #a2545f;
}

.board-tag[data-board="qna"] {
  background: rgba(79, 127, 103, 0.12);
  color: var(--green);
}

.board-tag[data-board="homework"] {
  background: rgba(185, 138, 54, 0.13);
  color: #97701f;
}

.board-title {
  min-width: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  /* 제목이 길어도 한 줄로 끊는다. 줄 높이가 들쭉날쭉하면 목록으로 안 읽힌다. */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-row a:hover .board-title {
  color: var(--blue);
}

.board-pin {
  margin-right: 5px;
  font-size: 12px;
}

.board-meta {
  flex: none;
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
}

.board-empty {
  margin: 0;
  padding: 22px 4px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.board-empty a {
  color: var(--blue);
  font-weight: 900;
  white-space: nowrap;
}

.side-area {
  display: grid;
  gap: 14px;
}

.manse-card {
  display: grid;
  grid-template-columns: 112px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 8px;
}

.tool-art {
  height: 92px;
}

.manse-card strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
}

.manse-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 760;
}

.manse-card a {
  min-width: 68px;
  background: #21333d;
  color: #fff;
}

.quiz-card {
  padding: 14px;
  border-radius: 8px;
}

.quiz-head strong {
  display: block;
  margin-top: 3px;
  font-size: 20px;
}

.quiz-rule {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.quiz-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 10px;
}

.quiz-tabs button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.quiz-tabs button.active {
  border-color: rgba(45, 111, 143, 0.38);
  background: #21333d;
  color: #fff;
}

.quiz-tabs button.done {
  color: var(--green);
}

/* 오늘의 3문항을 다 풀었을 때만 나오는 안내. 초기화 시점은 날짜 기준이라
   자정이 지나면 app.js가 저장된 풀이 기록을 버리고 새 문항을 뽑는다. */
.quiz-complete {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 6px;
  background: #eef7f1;
  color: #315f48;
  font-size: 13px;
  font-weight: 780;
  line-height: 1.5;
}

.quiz-complete strong {
  display: block;
  margin: 0 0 2px;
  font-size: 13px;
  font-weight: 900;
}

.quiz-body {
  min-height: 172px;
  margin-top: 10px;
}

.quiz-meta {
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}

.quiz-body h3 {
  margin: 6px 0 0;
  font-size: 18px;
  line-height: 1.38;
}

.quiz-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 10px;
}

.quiz-options button {
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.82);
  color: #2b3940;
  font-size: 14px;
  font-weight: 900;
}

.quiz-options button.correct {
  border-color: rgba(79, 127, 103, 0.5);
  background: #eef7f1;
  color: #315f48;
}

.quiz-options button.wrong {
  border-color: rgba(177, 86, 79, 0.38);
  background: #fff0ee;
  color: #93443d;
}

.quiz-feedback {
  min-height: 34px;
  margin: 9px 0 0;
  color: #51606a;
  font-size: 13px;
  font-weight: 780;
}

.quiz-bottom {
  margin-top: 8px;
}

.quiz-bottom button {
  border: 0;
  background: #21333d;
  color: #fff;
}

.quiz-bottom a {
  font-size: 14px;
}

.unlock-note {
  margin: 9px 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

/* 강의 목록 페이지 - 가로형 카드 */
.page-head {
  padding: 8px 0 4px;
}

.page-head h1 {
  margin: 8px 0 0;
  font-size: 32px;
  line-height: 1.25;
  color: #182126;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.breadcrumb a {
  color: var(--blue);
}

.course-row-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 18px;
}

/* 전체 강의 페이지 리드 문구 */
.page-lead {
  max-width: 640px;
  margin: 12px 0 0;
  color: #45555e;
  font-size: 16px;
  font-weight: 720;
  line-height: 1.65;
}

.page-lead strong {
  color: var(--blue);
  font-weight: 850;
}

/* ===== 강의 학습 로드맵 =====
   무료로 시작 → 핵심 강의 → 라이브 아카이브(선택)의 3단계를 번호·화살표로 보여준다. */
.course-roadmap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 22px;
}

.roadmap-step {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  margin: 0;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: #33434c;
  font-size: 14px;
  font-weight: 850;
}

.step-badge.featured {
  border-color: rgba(185, 138, 54, 0.5);
  background: #fff8ec;
  color: #8a6410;
}

.step-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.step-badge.featured .step-no {
  background: var(--gold);
}

.step-optional {
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef1f2;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

/* 단계 사이 화살표 */
.step-arrow {
  margin: 2px 0;
  padding-left: 14px;
  color: rgba(79, 95, 104, 0.5);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

/* 핵심 강의 카드 강조 — 로드맵에서 시선이 여기 멈추게 */
.roadmap-step .course-row-card.featured {
  box-shadow: 0 18px 48px rgba(160, 120, 40, 0.16);
}

/* 3단계: 아카이브 두 개를 좌우로 */
.roadmap-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

/* 3단계 아카이브는 '보조'라 마스터보다 작게. 작은 가로형 미니 카드로 낮춘다. */
.roadmap-pair .course-row-card.compact {
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  align-items: center;
}

.roadmap-pair .course-row-card.compact h3 {
  margin-top: 5px;
  font-size: 17px;
}

.roadmap-pair .course-row-card.compact .row-desc {
  margin-top: 6px;
  font-size: 13px;
}

.roadmap-pair .course-row-card.compact .course-row-bottom {
  padding-top: 12px;
}

.roadmap-pair .course-row-card.compact .row-price {
  font-size: 18px;
}

.roadmap-pair .course-row-card.compact .row-cta {
  min-height: 38px;
  padding: 0 14px;
  font-size: 13px;
}

.roadmap-note {
  margin: 4px 0 0;
  padding: 12px 16px;
  border-radius: 10px;
  background: #fff6e6;
  color: #8a6410;
  font-size: 14px;
  font-weight: 760;
  line-height: 1.55;
}

.roadmap-note strong {
  font-weight: 900;
}

/* 로드맵 카드의 섬네일은 링크(a)라도 기존 course-art 비율을 그대로 유지 */
.course-row-card > a.course-art {
  display: block;
}

.course-row-card {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  align-items: start;
  gap: 22px;
  padding: 18px;
  border: 1px solid rgba(79, 95, 104, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.course-row-card.featured {
  border-color: rgba(185, 138, 54, 0.42);
  background: rgba(255, 251, 242, 0.88);
}

.course-row-card .course-art {
  aspect-ratio: 16 / 9;
}

.course-row-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.course-row-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.instructor {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.course-row-card h3 {
  margin: 8px 0 0;
  font-size: 22px;
  line-height: 1.3;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  min-height: 28px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.chip.muted {
  background: #eef1f2;
  color: var(--muted);
}

.row-desc {
  margin: 10px 0 0;
  color: #40505a;
  font-size: 14px;
  font-weight: 750;
}

.row-highlight {
  display: inline-block;
  width: fit-content;
  margin-top: 10px;
  padding: 7px 12px;
  border-radius: 8px;
  background: #fff6e6;
  color: #8a6410;
  font-size: 13px;
  font-weight: 800;
}

.course-row-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
}

.row-price {
  font-size: 21px;
  font-weight: 900;
  color: #21333d;
}

.row-price.free {
  color: var(--green);
}

/* 정가(취소선) — 할인 판매 중일 때만 판매가 앞에 붙는다. */
.row-list-price {
  margin-right: 8px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
  text-decoration: line-through;
}

.row-cta {
  min-height: 44px;
  padding: 0 20px;
  border-radius: 8px;
  background: #21333d;
  color: #fff;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
}

.course-row-card.featured .row-cta {
  background: #906923;
}

/* 강의 상세 페이지 */
.course-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 26px;
  align-items: stretch;
  margin-top: 10px;
}

.course-detail-hero .course-art {
  min-height: 280px;
  border-radius: 10px;
}

.detail-buy-panel {
  padding: 22px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-self: start;
  position: sticky;
  top: 16px;
}

.detail-eyebrow {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.detail-title {
  margin: 4px 0 0;
  font-size: 26px;
  line-height: 1.3;
}

.detail-instructor-line {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

/* 구매 패널 안의 한 줄 강의 요약. 혜택 목록과 가격 사이에서 톤을 잡는다. */
.detail-lead {
  margin: 2px 0 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: #40505a;
  font-size: 14px;
  font-weight: 760;
  line-height: 1.6;
}

.detail-buy-panel .row-price {
  font-size: 26px;
}

.buy-button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  background: #21333d;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.benefit-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.benefit-list li {
  padding-left: 20px;
  position: relative;
  color: #34424a;
  font-size: 13px;
  font-weight: 780;
}

.benefit-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--blue);
  font-weight: 900;
}

.detail-section {
  margin-top: 32px;
}

.detail-section h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.badge-section-note {
  margin: -8px 0 16px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}

.badge-card {
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.badge-card.locked .badge-icon-wrap img {
  filter: grayscale(1);
  opacity: 0.35;
}

.badge-card.locked strong,
.badge-card.locked .badge-desc {
  color: var(--muted);
}

.badge-icon-wrap {
  position: relative;
  width: 84px;
  margin: 0 auto 12px;
}

.badge-icon-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

.badge-count {
  position: absolute;
  top: -4px;
  right: -10px;
  min-width: 24px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--gold);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.badge-card strong {
  display: block;
  font-size: 15px;
}

.badge-card .badge-desc {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.badge-card .badge-meta {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  color: var(--muted);
  font-weight: 750;
}

.badge-card.earned .badge-meta {
  color: var(--green);
}

/* 섹션 소제목(예: "10개 챕터 · 총 176강") */
.detail-section-sub {
  margin: -8px 0 16px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 780;
}

/* "이런 분께 추천" 체크 리스트 */
.recommend-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.recommend-list li {
  position: relative;
  padding: 14px 16px 14px 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: #34424a;
  font-size: 15px;
  font-weight: 760;
}

.recommend-list li::before {
  content: "✓";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.recommend-list strong {
  color: #21333d;
}

/* 강의 소개 본문 */
.intro-copy p {
  margin: 0 0 14px;
  color: #3c4a52;
  font-size: 16px;
  font-weight: 640;
  line-height: 1.75;
}

.intro-copy p:last-child {
  margin-bottom: 0;
}

.intro-copy strong {
  color: #21333d;
  font-weight: 820;
}

/* 강사 소개 카드 */
.instructor-card {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 26px;
  align-items: center;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(233, 245, 250, 0.5), var(--panel) 60%);
  box-shadow: var(--shadow-soft);
}

.instructor-portrait {
  align-self: stretch;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.instructor-portrait img {
  width: 100%;
  max-width: 200px;
  height: auto;
  display: block;
}

.instructor-name {
  display: block;
  font-size: 20px;
  color: #1c2830;
}

.instructor-role {
  margin: 4px 0 12px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 850;
}

.instructor-bio p:last-child {
  margin: 0;
  color: #45535b;
  font-size: 15px;
  font-weight: 680;
  line-height: 1.7;
}

/* 커리큘럼 카드 그리드 */
.curriculum-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.curriculum-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.curriculum-card:hover {
  border-color: rgba(45, 111, 143, 0.28);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.cc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.cc-no {
  font-size: 22px;
  font-weight: 900;
  color: var(--blue);
  letter-spacing: 0.02em;
}

.cc-count {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
}

.cc-title {
  display: block;
  font-size: 17px;
  color: #1f2b33;
}

.cc-desc {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 680;
  line-height: 1.6;
}

/* ===== 무료강의 페이지 "다음 단계" funnel 안내 =====
   무료 시청자를 사주퀴즈(붙잡기) → 유료 강의(수익)로 이어주는 두 카드. */
.next-step-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.next-step-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.next-step-card:hover {
  border-color: rgba(45, 111, 143, 0.28);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.next-step-card.featured {
  border-color: rgba(185, 138, 54, 0.42);
  background: #fffaf0;
}

.next-step-icon {
  flex: none;
  font-size: 26px;
  line-height: 1.2;
}

.next-step-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.next-step-body strong {
  font-size: 17px;
  color: #1f2b33;
}

.next-step-desc {
  color: var(--muted);
  font-size: 14px;
  font-weight: 680;
  line-height: 1.6;
}

.next-step-cta {
  margin-top: 4px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 850;
}

.next-step-card.featured .next-step-cta {
  color: #906923;
}

/* 커리큘럼이 아직 안 나온 강의(입문·실전 아카이브)용 안내 카드. */
.curriculum-pending {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: var(--panel);
  color: #45535b;
  font-size: 15px;
  font-weight: 720;
  line-height: 1.6;
}

.curriculum-pending::before {
  content: "📝";
  flex: none;
  font-size: 24px;
}

.curriculum-table {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--panel);
}

.curriculum-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 780;
}

.curriculum-row:last-child {
  border-bottom: 0;
}

.curriculum-row .ch-no {
  color: var(--blue);
  font-weight: 900;
}

.curriculum-row .ch-count {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.upgrade-box {
  margin-top: 32px;
  padding: 18px 20px;
  border-radius: 10px;
  border: 1px solid rgba(185, 138, 54, 0.32);
  background: rgba(255, 251, 242, 0.86);
}

.upgrade-box h2 {
  margin: 0 0 6px;
  font-size: 18px;
  color: #8a6410;
}

.upgrade-box p {
  margin: 0;
  color: #6b5225;
  font-size: 14px;
  font-weight: 760;
}

.bottom-cta {
  margin-top: 34px;
  padding: 22px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* 사전예약/문의 페이지 */
.enroll-panel {
  max-width: 560px;
  margin: 10px auto 0;
  padding: 24px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.enroll-panel p.lead {
  margin: 8px 0 20px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.enroll-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.enroll-field label {
  font-size: 13px;
  font-weight: 800;
  color: #34424a;
}

.enroll-field input,
.enroll-field select,
.enroll-field textarea {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
}

.enroll-field textarea {
  min-height: 88px;
  padding: 10px 12px;
  resize: vertical;
}

.enroll-submit {
  width: 100%;
  min-height: 46px;
  margin-top: 6px;
  border: 0;
  border-radius: 8px;
  background: #21333d;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}

.enroll-success {
  display: none;
  padding: 20px;
  border-radius: 8px;
  background: #eef7f1;
  color: #315f48;
  font-size: 14px;
  font-weight: 780;
  text-align: center;
}

.enroll-success.show {
  display: block;
}

.enroll-panel.submitted form {
  display: none;
}

/* ===== 수강 신청(결제) 화면 ===== */
.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: 24px;
  margin-top: 18px;
  align-items: start;
}

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.checkout-block {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.checkout-block h2 {
  margin: 0 0 12px;
  font-size: 17px;
}

.checkout-select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  font-size: 15px;
  font-weight: 780;
  color: #21333d;
}

.checkout-upgrade {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 13px 14px;
  border: 1px solid rgba(185, 138, 54, 0.4);
  border-radius: 8px;
  background: #fffaf0;
  color: #6b5225;
  font-size: 14px;
  font-weight: 780;
  cursor: pointer;
}

.checkout-upgrade b {
  color: #8a6410;
}

/* ── 환불·청약철회 규정 페이지 ── */
.policy-wrap {
  max-width: 860px;
  margin: 0 auto 60px;
  padding: 28px 30px 34px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.policy-summary {
  padding: 20px 22px 18px;
  margin-bottom: 30px;
  border: 1px solid rgba(45, 111, 143, 0.24);
  border-radius: 10px;
  background: var(--blue-soft);
}

.policy-summary h2 {
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 850;
  color: var(--blue);
}

.policy-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.policy-table th,
.policy-table td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(45, 111, 143, 0.18);
  text-align: left;
  vertical-align: middle;
}

.policy-table thead th {
  font-size: 12.5px;
  font-weight: 850;
  color: var(--blue);
}

.policy-table tbody tr:last-child td {
  border-bottom: 0;
}

.policy-table td {
  color: #3d4d56;
  font-weight: 720;
}

.policy-good {
  color: var(--green);
}

.policy-bad {
  color: #a8342b;
}

.policy-note {
  margin: 14px 0 0;
  padding-top: 13px;
  border-top: 1px dashed rgba(45, 111, 143, 0.3);
  color: #3d4d56;
  font-size: 13.5px;
  font-weight: 720;
  line-height: 1.6;
}

.policy-h2 {
  margin: 30px 0 10px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 17px;
  font-weight: 850;
  letter-spacing: -0.2px;
}

.policy-wrap > .policy-h2:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.policy-wrap p {
  margin: 0 0 10px;
  color: #46565f;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.72;
}

.policy-ol {
  margin: 0 0 10px;
  padding-left: 20px;
  color: #46565f;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.72;
}

.policy-ol li {
  margin-bottom: 8px;
}

.policy-ol b,
.policy-wrap p b {
  color: #21333d;
  font-weight: 850;
}

.policy-formula {
  margin: 10px 0 4px;
  padding: 13px 16px;
  border-radius: 8px;
  background: #f2f6f8;
  color: #21333d;
  font-size: 14.5px;
  font-weight: 850;
  text-align: center;
}

.policy-example {
  margin: 16px 0 4px;
  padding: 16px 18px;
  border: 1px solid rgba(79, 127, 103, 0.28);
  border-radius: 9px;
  background: #f0f7f3;
}

.policy-example > b {
  display: block;
  margin-bottom: 8px;
  color: #2b5a45;
  font-size: 13.5px;
  font-weight: 850;
}

.policy-example p {
  margin: 0 0 6px;
  font-size: 13.5px;
  color: #46565f;
}

.policy-example-calc {
  margin: 8px 0 0 !important;
  font-size: 15px !important;
  color: #2b5a45 !important;
  font-weight: 800 !important;
}

.policy-caution {
  margin-top: 8px;
  color: var(--muted) !important;
  font-size: 13px !important;
}

.policy-addendum {
  margin-top: 34px;
  padding: 18px 20px;
  border-radius: 9px;
  background: #f4f6f8;
}

.policy-addendum > b {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 850;
}

.policy-addendum p {
  margin: 0 0 6px;
  font-size: 13.5px;
}

.policy-back {
  margin-top: 30px !important;
  text-align: center;
}

.policy-back a {
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 760px) {
  .policy-wrap {
    padding: 22px 18px 26px;
  }

  .policy-table th,
  .policy-table td {
    padding: 9px 8px;
    font-size: 13px;
  }
}

/* 강의 상세 구매 패널의 '무료 강의로 미리 보기' 안내.
   전자상거래법이 요구하는 '시험 사용 기회 제공'을 실제로 안내하는 역할도 한다. */
.buy-try-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.55;
  text-align: center;
}

.buy-try-note a {
  color: var(--green);
  font-weight: 850;
}

/* ── 청약철회 고지 (전자상거래법 제17조 6항 요건) ──
   눈에 잘 띄어야 법적 효력이 있으므로 일부러 배경·테두리를 준다. */
.withdraw-block {
  border: 1px solid rgba(169, 116, 26, 0.34);
  background: #fdf8ee;
}

.withdraw-title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 850;
  color: #7a5c17;
}

.withdraw-list {
  margin: 0;
  padding-left: 18px;
  color: #4a5b64;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.65;
}

.withdraw-list li {
  margin-bottom: 7px;
}

.withdraw-list li:last-child {
  margin-bottom: 0;
}

.withdraw-list b {
  color: #21333d;
  font-weight: 850;
}

.withdraw-key {
  padding: 9px 12px;
  margin-left: -6px;
  border-radius: 7px;
  background: rgba(169, 116, 26, 0.1);
  list-style-position: inside;
}

.withdraw-sub {
  display: block;
  margin-top: 4px;
  color: #6b7a83;
  font-size: 12.5px;
  font-weight: 700;
}

.withdraw-try {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding: 13px 15px;
  border: 1px solid rgba(79, 127, 103, 0.28);
  border-radius: 8px;
  background: #f0f7f3;
}

.withdraw-try-text {
  flex: 1;
  min-width: 220px;
  font-size: 13.5px;
  line-height: 1.55;
}

.withdraw-try-text b {
  display: block;
  color: #2b5a45;
  font-weight: 850;
}

.withdraw-try-text span {
  color: #557063;
  font-weight: 700;
  font-size: 12.5px;
}

.withdraw-try-link {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 15px;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-size: 13.5px;
  font-weight: 850;
  text-decoration: none;
}

.withdraw-try-link:hover {
  background: #3f6a55;
}

/* 아카이브 함께 담기 — 체크박스 2개(입문/실전) 묶음 */
.checkout-addon-title {
  margin: 16px 0 0;
  font-size: 13px;
  font-weight: 850;
  color: #6b5225;
}

.checkout-addon-title span {
  font-weight: 750;
  color: #8a6410;
}

#addonRow .checkout-upgrade {
  margin-top: 8px;
}

.checkout-agree {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 0 4px;
  color: #34424a;
  font-size: 14px;
  font-weight: 760;
  cursor: pointer;
}

.checkout-upgrade input,
.checkout-agree input {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 1px;
  accent-color: var(--blue);
}

.checkout-note {
  margin: 0;
  padding: 13px 15px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: #2c5266;
  font-size: 13px;
  font-weight: 720;
  line-height: 1.55;
}

/* 쿠폰 입력 */
.coupon-row {
  display: flex;
  gap: 8px;
}

.coupon-input {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  font-weight: 700;
}

.coupon-apply {
  flex: none;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #21333d;
  color: #fff;
  font-size: 14px;
  font-weight: 850;
}

.coupon-message {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 780;
}

.coupon-message.is-ok {
  color: var(--green);
}

.coupon-message.is-error {
  color: #c0564e;
}

/* 약관 동의 */
.agree-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.agree-all {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  font-weight: 900;
  color: #1f2b33;
  cursor: pointer;
}

.agree-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.agree-item {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #45535b;
  font-size: 14px;
  font-weight: 720;
  cursor: pointer;
}

.agree-all input,
.agree-item input {
  width: 18px;
  height: 18px;
  flex: none;
  accent-color: var(--blue);
}

.agree-item span {
  flex: 1;
  min-width: 0;
}

.agree-link {
  flex: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-decoration: underline;
}

/* 주문 요약 금액 상세 */
.order-amount {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.order-amount-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 760;
  color: #40505a;
}

.order-discount-row span:last-child {
  color: #c0564e;
  font-weight: 850;
}

/* 정가는 '얼마를 아끼는지'의 기준일 뿐이라 흐리게 두고, 취소선으로 옛 가격임을 알린다. */
#orderList {
  color: var(--muted);
  font-weight: 760;
}

/* 할인율은 금액보다 먼저 눈에 들어와야 한다 — 42%가 이 상품의 핵심이다. */
#orderPackageRate {
  margin-right: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(192, 86, 78, 0.1);
  font-size: 12px;
  font-weight: 900;
}

.order-legal {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 640;
  line-height: 1.55;
}

.order-legal a {
  color: var(--blue);
  font-weight: 800;
}

/* 오른쪽 주문 요약 (스크롤 따라옴) */
.order-summary {
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.order-summary h2 {
  margin: 0 0 4px;
  font-size: 15px;
  color: var(--muted);
}

.order-thumb {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 16 / 9;
}

.order-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.order-badge {
  align-self: flex-start;
  margin: 4px 0 0;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.order-name {
  font-size: 19px;
  line-height: 1.3;
  color: #1c2830;
}

.order-instructor {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.order-benefits {
  margin: 6px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.order-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.order-total span {
  font-size: 14px;
  font-weight: 800;
  color: #40505a;
}

.order-total b {
  font-size: 24px;
  font-weight: 900;
  color: #21333d;
}

.order-summary .buy-button {
  margin-top: 6px;
}

.order-secure {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

/* ===== 결제 성공·실패 결과 페이지 ===== */
.payment-result {
  max-width: 520px;
  margin: 30px auto 0;
}

.payment-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 34px 26px 30px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.payment-state h1 {
  margin: 18px 0 0;
  font-size: 24px;
}

.payment-sub {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 740;
  line-height: 1.6;
}

.payment-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  font-size: 32px;
  font-weight: 900;
  color: #fff;
}

.payment-icon.success {
  background: var(--green);
}

.payment-icon.error {
  background: #c0564e;
}

.payment-spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 4px solid var(--line);
  border-top-color: var(--blue);
  animation: paymentSpin 0.8s linear infinite;
}

@keyframes paymentSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .payment-spinner {
    animation-duration: 2.4s;
  }
}

.payment-receipt {
  width: 100%;
  margin: 22px 0 0;
  padding: 16px 18px;
  border-radius: 12px;
  background: rgba(240, 244, 246, 0.7);
}

.payment-receipt div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 7px 0;
}

.payment-receipt dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.payment-receipt dd {
  margin: 0;
  color: #21333d;
  font-size: 14px;
  font-weight: 820;
  text-align: right;
  word-break: break-all;
}

.payment-receipt dd.mono {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.payment-hint {
  margin: 18px 0 0;
  padding: 12px 15px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: #2c5266;
  font-size: 13px;
  font-weight: 720;
  line-height: 1.55;
}

.payment-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.payment-actions .buy-button {
  padding: 0 26px;
}

.payment-secondary {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

/* MY 페이지 - 내 강의 */
.enrolled-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 14px;
}

.enrolled-card {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.enrolled-card .course-art {
  min-height: 100px;
}

.enrolled-progress {
  margin-top: 10px;
}

.enrolled-progress .level-meter {
  margin-top: 6px;
}

.enrolled-progress-label {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.enrolled-bottom {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 12px;
}

.more-courses-link {
  display: inline-block;
  margin-top: 16px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 900;
}

.side-link-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.side-link-card a {
  color: var(--blue);
  font-size: 14px;
  font-weight: 900;
}

/* 강의 수강(재생) 페이지 */
.player-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  margin-top: 14px;
  align-items: start;
}

.video-frame {
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  background: center / cover no-repeat;
  position: relative;
  overflow: hidden;
}

.video-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(14, 26, 32, 0.32);
}

.video-frame .play-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #21333d;
  font-size: 14px;
  font-weight: 900;
}

.player-info {
  margin-top: 16px;
}

.player-info h1 {
  margin: 0;
  font-size: 22px;
}

.player-info .chip-row {
  margin-top: 8px;
}

.player-progress {
  margin-top: 14px;
}

.chapter-sidebar {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  max-height: 560px;
  overflow-y: auto;
}

.chapter-sidebar .curriculum-row {
  cursor: pointer;
}

.chapter-sidebar .curriculum-row.active {
  background: var(--blue-soft);
}

/* 수강권/결제내역 페이지 */
.table-scroll {
  overflow-x: auto;
  margin-top: 14px;
}

.order-table {
  min-width: 620px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--panel);
}

.order-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px 120px 110px;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 780;
}

.order-row:last-child {
  border-bottom: 0;
}

.order-row.head {
  background: #f3f6f7;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.order-status {
  display: inline-flex;
  padding: 0 10px;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  background: #eef7f1;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  width: fit-content;
}

/* 퀴즈 더보기 페이지 */
.quiz-page-head p.row-desc {
  margin-top: 6px;
  font-size: 18px;
}

.quiz-page-head .eyebrow {
  font-size: 15px;
  letter-spacing: 0.04em;
}

.quiz-page-head h1 {
  margin: 0;
  font-size: 40px;
}

.quiz-head-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 10px;
}

.quiz-head-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.quiz-head-controls .quiz-mode-toggle {
  margin-bottom: 0;
}

.quiz-head-row .quiz-filter-bar {
  margin: 0;
}

@keyframes qmFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes qmCheckPop {
  0% { transform: translateY(-50%) scale(0); opacity: 0; }
  60% { transform: translateY(-50%) scale(1.3); opacity: 1; }
  100% { transform: translateY(-50%) scale(1); opacity: 1; }
}

@keyframes qmShake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(3px); }
  30%, 50%, 70% { transform: translateX(-5px); }
  40%, 60% { transform: translateX(5px); }
}

@keyframes qmGlowCorrect {
  0% { box-shadow: 0 0 0 0 rgba(79, 127, 103, 0.45); }
  100% { box-shadow: 0 0 0 18px rgba(79, 127, 103, 0); }
}

@keyframes qmGlowWrong {
  0% { box-shadow: 0 0 0 0 rgba(177, 86, 79, 0.4); }
  100% { box-shadow: 0 0 0 18px rgba(177, 86, 79, 0); }
}

@keyframes qmScorePulse {
  0% { transform: scale(1); }
  45% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

.quiz-side-col {
  align-self: start;
}

.quiz-scoreboard {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.quiz-scoreboard.pulse {
  animation: qmScorePulse 380ms ease;
}

.score-item {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.score-label {
  display: block;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.score-item strong {
  display: block;
  margin-top: 4px;
  font-size: 26px;
  color: #21333d;
}

.quiz-filter-bar {
  display: flex;
  gap: 10px;
  margin: 20px 0 18px;
  flex-wrap: wrap;
}

.quiz-dropdown {
  position: relative;
}

.quiz-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  transition: border-color 140ms ease;
}

.quiz-dropdown.open .quiz-dropdown-toggle {
  border-color: rgba(45, 111, 143, 0.45);
}

.quiz-dropdown-label {
  color: var(--muted);
  font-weight: 800;
}

.quiz-dropdown-value {
  font-weight: 900;
  color: var(--ink);
}

.quiz-dropdown-arrow {
  color: var(--muted);
  font-size: 14px;
}

.quiz-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  min-width: 240px;
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
}

.quiz-dropdown-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-size: 14px;
  font-weight: 800;
  text-align: left;
  color: inherit;
}

.quiz-dropdown-menu button:hover:not(:disabled) {
  background: var(--blue-soft);
}

.quiz-dropdown-menu button.active {
  background: #21333d;
  color: #fff !important;
}

.quiz-dropdown-menu button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.quiz-dropdown-menu button[data-tier="입문"] { color: #3f6b56; }
.quiz-dropdown-menu button[data-tier="초급"] { color: #1f6363; }
.quiz-dropdown-menu button[data-tier="중급"] { color: var(--blue); }
.quiz-dropdown-menu button[data-tier="고급"] { color: #906923; }
.quiz-dropdown-menu button[data-tier="심화"] { color: #8a3a34; }

.quiz-dropdown-menu button[data-tier="입문"].active { background: #4f7f67; }
.quiz-dropdown-menu button[data-tier="초급"].active { background: #2b8a8a; }
.quiz-dropdown-menu button[data-tier="중급"].active { background: #2d6f8f; }
.quiz-dropdown-menu button[data-tier="고급"].active { background: #b98a36; }
.quiz-dropdown-menu button[data-tier="심화"].active { background: #a1473f; }

.quiz-order-toggle,
.quiz-mode-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.quiz-mode-toggle {
  margin-bottom: 14px;
}

.quiz-order-toggle button,
.quiz-mode-toggle button {
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  transition: background 140ms ease, color 140ms ease;
}

.quiz-order-toggle button.active,
.quiz-mode-toggle button.active {
  background: #21333d;
  color: #fff;
}

.quiz-mode-toggle button[data-mode="ranking"].active {
  background: #a1473f;
}

.combo-counter {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff0e6;
  color: #b9581f;
  font-size: 14px;
  font-weight: 900;
}

@keyframes qmComboPop {
  0% { transform: translate(-50%, -50%) scale(0.6); opacity: 0; }
  50% { transform: translate(-50%, -50%) scale(1.08); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.combo-popup {
  position: fixed;
  top: 38%;
  left: 50%;
  z-index: 100;
  padding: 14px 30px;
  border-radius: 999px;
  font-size: 24px;
  font-weight: 950;
  color: #fff;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.6);
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
}

.combo-popup.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  animation: qmComboPop 320ms ease;
}

.combo-popup.tier-3 { background: rgba(45, 111, 143, 0.94); }
.combo-popup.tier-5 { background: rgba(185, 138, 54, 0.94); }
.combo-popup.tier-10 { background: rgba(161, 71, 63, 0.94); }

.ranking-reward-toast {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 110;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
  transform: translateX(-50%);
}

.ranking-reward-toast .toast-item {
  padding: 12px 20px;
  border-radius: 999px;
  background: rgba(185, 138, 54, 0.96);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 260ms ease, transform 260ms ease;
}

.ranking-reward-toast .toast-item.show {
  opacity: 1;
  transform: translateY(0);
}

.profile-exp-badge {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 14px;
  font-weight: 900;
  color: #4f7f67;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 260ms ease, transform 260ms ease;
}

.profile-exp-badge.show {
  opacity: 1;
  transform: translateY(-8px);
}

.ta-setup {
  margin: 0;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  text-align: center;
}

.ta-setup-title {
  margin: 0 0 18px;
  font-size: 19px;
  font-weight: 900;
  color: var(--ink);
}

.ta-duration-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.ta-duration-toggle button {
  min-height: 52px;
  min-width: 92px;
  border: 0;
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
  font-size: 16px;
  font-weight: 800;
  transition: background 140ms ease, color 140ms ease;
}

.ta-duration-toggle button.active {
  background: #a1473f;
  color: #fff;
}

.ta-best-record {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.ta-start-btn {
  margin-top: 20px;
  min-height: 56px;
  padding: 0 40px;
  border: 0;
  border-radius: 8px;
  background: #a1473f;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  transition: background 160ms ease, opacity 160ms ease;
}

.ta-start-btn:disabled {
  background: #d3dade;
  color: #8a969c;
  cursor: not-allowed;
}

.ta-timer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: #f7e7e6;
  color: #8a3a34;
  font-size: 14px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.ta-timer::before {
  content: "⏱";
}

.ta-timer.urgent {
  background: #a1473f;
  color: #fff;
  animation: qmScorePulse 900ms ease infinite;
}

.ta-result-card {
  margin: 0;
  padding: 32px 36px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  text-align: center;
  animation: qmFadeIn 280ms ease;
}

.ta-result-title {
  margin: 0 0 20px;
  font-size: 20px;
  font-weight: 900;
  color: var(--ink);
}

.ta-result-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.ta-result-stat {
  padding: 16px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
}

.ta-result-stat strong {
  display: block;
  font-size: 26px;
  color: #21333d;
}

.ta-result-stat span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.ta-result-best {
  margin: 20px 0 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--gold);
}

.ta-result-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.ta-result-actions button {
  flex: 1;
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 900;
}

.ta-retry-btn {
  background: #a1473f;
  color: #fff;
}

.ta-change-btn {
  border: 1px solid var(--line) !important;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
}

.quiz-empty {
  margin: 0;
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  font-weight: 760;
}

.quiz-main-card {
  margin: 0;
  padding: 32px 36px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.quiz-main-card.enter {
  animation: qmFadeIn 280ms ease;
}

.quiz-main-card.is-correct {
  animation: qmGlowCorrect 700ms ease;
}

.quiz-main-card.is-wrong {
  animation: qmGlowWrong 700ms ease;
}

.quiz-main-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.tier-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
  background: var(--blue-soft);
  color: var(--blue);
}

.tier-badge[data-tier="입문"] { background: #eaf4ef; color: #3f6b56; }
.tier-badge[data-tier="초급"] { background: #e6f3f3; color: #1f6363; }
.tier-badge[data-tier="중급"] { background: var(--blue-soft); color: var(--blue); }
.tier-badge[data-tier="고급"] { background: #fff0d0; color: #906923; }
.tier-badge[data-tier="심화"] { background: #f7e7e6; color: #8a3a34; }

.quiz-main-category {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.quiz-main-counter {
  margin-left: auto;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.quiz-progress-track {
  height: 6px;
  margin-top: 16px;
  border-radius: 999px;
  background: #e6eef2;
  overflow: hidden;
}

.quiz-progress-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #2d6f8f, #85b9cb);
  transition: width 300ms ease;
}

.quiz-main-question {
  margin: 20px 0 0;
  font-size: 26px;
  line-height: 1.45;
  color: #182126;
}

.quiz-main-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 24px;
}

.quiz-main-options button {
  min-height: 52px;
  padding: 10px 20px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: #2b3940;
  font-size: 18px;
  font-weight: 800;
  text-align: center;
  position: relative;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.quiz-main-options button.selected {
  border-color: var(--blue);
  background: var(--blue-soft);
  transform: translateY(-1px);
}

.quiz-main-options button.correct {
  border-color: rgba(79, 127, 103, 0.6);
  background: #eef7f1;
  color: #315f48;
}

.quiz-main-options button.correct::after {
  content: "✓";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  font-weight: 900;
  animation: qmCheckPop 320ms ease forwards;
  animation-delay: 60ms;
}

.quiz-main-options button.wrong {
  border-color: rgba(177, 86, 79, 0.5);
  background: #fff0ee;
  color: #93443d;
  animation: qmShake 380ms ease;
}

.quiz-answer-form {
  margin-top: 22px;
}

.quiz-answer-form input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  transition: border-color 160ms ease;
}

.quiz-answer-form input:focus {
  border-color: var(--blue);
  outline: none;
}

/* 사주퀴즈 페이지 전용 해설 박스(페이드인). 홈 화면 카드의 .quiz-feedback까지
   덮어써서 해설이 opacity:0으로 안 보이던 문제가 있어 이 카드 안으로 한정한다. */
.quiz-main-card .quiz-feedback {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 8px;
  background: #f5f8f8;
  font-size: 14px;
  line-height: 1.65;
  font-weight: 750;
  color: #40505a;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 260ms ease, transform 260ms ease;
}

.quiz-main-card .quiz-feedback.show {
  opacity: 1;
  transform: translateY(0);
}

.quiz-main-bottom {
  margin-top: 24px;
}

.submit-answer-btn,
.next-question-btn {
  width: 100%;
  min-height: 56px;
  padding: 0 32px;
  border: 0;
  border-radius: 8px;
  font-size: 17px;
  font-weight: 900;
  transition: background 160ms ease, opacity 160ms ease;
}

.submit-answer-btn {
  background: #21333d;
  color: #fff;
}

.submit-answer-btn:disabled {
  background: #d3dade;
  color: #8a969c;
  cursor: not-allowed;
}

.next-question-btn {
  background: var(--blue);
  color: #fff;
}

.admin-mode-toggle {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  box-shadow: var(--shadow-soft);
  white-space: nowrap;
}

.admin-mode-toggle.active {
  border-color: var(--gold);
  background: var(--gold);
  color: #fff;
}

.review-filter-toggle button {
  min-height: 42px;
  padding: 0 14px;
}

.admin-progress {
  margin: 0 0 14px;
  color: #906923;
  font-size: 14px;
  font-weight: 800;
}

.admin-panel {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px dashed rgba(185, 138, 54, 0.55);
  border-radius: 10px;
  background: rgba(185, 138, 54, 0.08);
}

.admin-panel-label {
  color: #906923;
  font-size: 14px;
  font-weight: 900;
}

.admin-diff-buttons {
  display: inline-flex;
  border: 1px solid rgba(185, 138, 54, 0.4);
  border-radius: 8px;
  overflow: hidden;
}

.admin-diff-buttons button {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  background: rgba(255, 255, 255, 0.85);
  color: #906923;
  font-size: 14px;
  font-weight: 800;
}

.admin-diff-buttons button.active {
  background: #b98a36;
  color: #fff;
}

.admin-reviewed-badge {
  font-size: 14px;
  font-weight: 900;
  color: #a1473f;
}

.admin-reviewed-badge.done {
  color: #4f7f67;
}

.admin-delete-btn {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(161, 71, 63, 0.45);
  border-radius: 8px;
  background: rgba(161, 71, 63, 0.08);
  color: #a1473f;
  font-size: 13px;
  font-weight: 800;
}

.admin-delete-btn:hover {
  background: #a1473f;
  color: #fff;
}

.admin-question-id {
  margin-left: auto;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.ranking-mini-card {
  display: block;
}

.wrong-notes-mini-card strong {
  display: block;
  margin-top: 6px;
  font-size: 24px;
  color: #21333d;
}

.wrong-notes-mini-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.wrong-notes-mini-card a {
  display: block;
  margin-top: 12px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.ranking-mini-tabs {
  display: flex;
  gap: 4px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.ranking-mini-tabs button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.ranking-mini-tabs button.active {
  background: #21333d;
  color: #fff;
  border-color: #21333d;
}

.ranking-mini-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ranking-mini-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.6);
}

.ranking-mini-row.is-me {
  background: var(--blue-soft);
}

.ranking-mini-rank {
  min-width: 18px;
  font-size: 13px;
  font-weight: 900;
  color: var(--muted);
  text-align: center;
}

.ranking-mini-name {
  flex: 1;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-mini-score {
  font-size: 13px;
  font-weight: 800;
  color: #21333d;
  white-space: nowrap;
}

.ranking-mini-ellipsis {
  text-align: center;
  color: var(--muted);
  font-weight: 900;
  padding: 2px 0;
}

.ranking-mini-note {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.ranking-mini-more {
  display: block;
  margin-top: 12px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.ranking-my-detail {
  margin: 14px 0 0;
  padding: 14px 18px;
  border: 1px solid rgba(45, 111, 143, 0.3);
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 15px;
  font-weight: 800;
}

.ranking-tab-bar {
  display: inline-flex;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 18px;
}

.ranking-tab-bar button {
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
  transition: background 140ms ease, color 140ms ease;
}

.ranking-tab-bar button.active {
  background: #21333d;
  color: #fff;
}

.ranking-disclaimer {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.ranking-board {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  overflow: hidden;
}

.wn-empty-note {
  margin: 14px 0 0;
  padding: 20px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.category-report {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.category-report-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 52px auto;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.category-report-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}

.category-report-track {
  height: 8px;
  border-radius: 999px;
  background: #e6eef2;
  overflow: hidden;
}

.category-report-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #2d6f8f, #85b9cb);
  transition: width 300ms ease;
}

.category-report-pct {
  font-size: 15px;
  font-weight: 900;
  color: #21333d;
  text-align: right;
}

.category-report-n {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.wn-list {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wn-card {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  transition: opacity 400ms ease;
}

.wn-card.resolved {
  opacity: 0.4;
}

.wn-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.wn-card-category {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.wn-card-wrong-count {
  margin-left: auto;
  color: #a1473f;
  font-size: 13px;
  font-weight: 800;
}

.wn-card-question {
  margin: 12px 0 0;
  font-size: 18px;
  line-height: 1.5;
}

.wn-card-options {
  margin-top: 16px;
}

.wn-card-feedback {
  margin-top: 14px;
}

.ranking-empty-note {
  margin: 0;
  padding: 20px 24px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  border-bottom: 1px solid var(--line);
}

.ranking-row {
  display: grid;
  grid-template-columns: 48px 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
}

.ranking-row:last-child {
  border-bottom: 0;
}

.ranking-row.is-me {
  background: var(--blue-soft);
}

.ranking-rank {
  font-size: 18px;
  font-weight: 900;
  color: var(--muted);
  text-align: center;
}

.ranking-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
}

.ranking-score {
  font-size: 16px;
  font-weight: 900;
  color: #21333d;
  white-space: nowrap;
}

.ranking-sub {
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

/* ===== 오행 파스텔 카드 배경 =====
   홈 5카드에 오행 색 수묵 물번짐 배경을 깔아준다.
   COURSES=水 하늘 / Profile=木 연두 / 퀴즈=火 연분홍 / 커뮤니티·만세력·유튜브=金 연회색.
   배경은 색이 사방 테두리를 액자처럼 감싸는 구도라서 cover(잘라내기)를 쓰면 테두리가 잘린다.
   그래서 100% 100%로 늘려서 채운다 — 무늬 없는 물번짐이라 늘어나도 티가 안 난다.
   카드마다 PC/태블릿/모바일 세 가지 비율을 따로 만들어 두고 분기점에서 갈아끼운다. */

.course-area,
.level-state,
.quiz-card,
.community-area,
.manse-state,
.youtube-state {
  /* 오행 배경 이미지 위에 흰색을 옅게 덧씌워 채도를 낮춘다.
     너무 알록달록하면 아래 --bg-wash 알파값을 키우면 전 카드가 한 번에 더 연해진다. */
  --bg-wash: rgba(255, 255, 255, 0.42);
  background-image: linear-gradient(var(--bg-wash), var(--bg-wash)), var(--card-bg);
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
}

.course-area {
  --card-bg: url("./assets/card-backgrounds/courses-pc.webp");
}

.level-state {
  --card-bg: url("./assets/card-backgrounds/profile-pc.webp");
}

.quiz-card {
  --card-bg: url("./assets/card-backgrounds/quiz-pc.webp");
}

/* 커뮤니티·만세력·유튜브는 금(金) 연회색 배경을 함께 쓴다.
   셋 다 소담 쪽으로 넘어가는 영역이라 같은 색으로 묶어 읽힌다. */
.community-area,
.manse-state,
.youtube-state {
  --card-bg: url("./assets/card-backgrounds/manse-pc.webp");
}

@media (max-width: 1160px) {
  .course-area {
    --card-bg: url("./assets/card-backgrounds/courses-tablet.webp");
  }

  .level-state {
    --card-bg: url("./assets/card-backgrounds/profile-tablet.webp");
  }

  .quiz-card {
    --card-bg: url("./assets/card-backgrounds/quiz-tablet.webp");
  }

  .community-area,
  .manse-state,
  .youtube-state {
    --card-bg: url("./assets/card-backgrounds/manse-tablet.webp");
  }
}

@media (max-width: 760px) {
  .course-area {
    --card-bg: url("./assets/card-backgrounds/courses-mobile.webp");
  }

  .level-state {
    --card-bg: url("./assets/card-backgrounds/profile-mobile.webp");
  }

  .quiz-card {
    --card-bg: url("./assets/card-backgrounds/quiz-mobile.webp");
  }

  .community-area,
  .manse-state,
  .youtube-state {
    --card-bg: url("./assets/card-backgrounds/manse-mobile.webp");
  }
}

@media (max-width: 1160px) {
  .site-header-inner {
    grid-template-columns: 1fr auto;
  }

  .top-nav {
    display: none;
  }

  /* 좁아지면 히어로 카피 들여쓰기를 줄여 카드와 겹치지 않게 한다. */
  .lead-copy-text {
    margin-left: 32px;
  }

  .home-grid {
    grid-template-columns: 1fr;
  }

  .course-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .side-area {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  }

  .course-detail-hero {
    grid-template-columns: 1fr;
  }

  .player-layout {
    grid-template-columns: 1fr;
  }

  .chapter-sidebar {
    max-height: none;
  }
}

@media (max-width: 760px) {
  body {
    background-attachment: scroll;
    background-position: center top;
  }

  /* 강의 상세: 모바일에선 구매 패널 sticky 해제(아래 섹션 스크롤을 방해) + 강사 카드 세로 스택. */
  .detail-buy-panel {
    position: static;
  }

  .instructor-card {
    grid-template-columns: 1fr;
    gap: 16px;
    text-align: center;
  }

  .instructor-portrait img {
    max-width: 150px;
    margin: 0 auto;
  }

  .instructor-role {
    margin-bottom: 8px;
  }

  .site-header-inner {
    min-height: 64px;
    width: calc(100% - 32px);
    padding: 10px 0;
    gap: 12px;
  }

  .brand img {
    width: 122px;
  }

  .brand span,
  .login-link {
    display: none;
  }

  .manse-link {
    min-height: 36px;
    padding: 2px 4px;
  }

  .manse-link img {
    height: 28px;
  }

  .academy-home {
    width: min(100% - 28px, 560px);
    padding: 18px 0 28px;
  }

  .lead-panel {
    grid-template-columns: 1fr;
  }

  .lead-copy {
    padding: 6px 0 4px;
    text-align: center;
  }

  /* 모바일에선 두 칼럼을 세로로 쌓고, 들여쓰기를 풀어 가운데 정렬한다. */
  .lead-copy-text {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-left: 0;
    align-items: center;
    text-align: center;
  }

  /* 모바일에선 배경 한자를 더 옅게, 좌우로 벌려 가운데 텍스트를 안 가리게. */
  .lead-hanja {
    font-size: 150px;
    color: rgba(45, 111, 143, 0.045);
  }
  .lead-hanja-1 {
    left: -4%;
    top: 30%;
  }
  .lead-hanja-2 {
    left: auto;
    right: -4%;
    top: 68%;
  }

  .lead-sub {
    border-left: none;
    padding-left: 0;
    border-top: 3px solid var(--gold);
    padding-top: 12px;
    display: inline-block;
  }

  .lead-instructor {
    justify-content: center;
  }

  .lead-text {
    margin-left: auto;
    margin-right: auto;
    font-size: 16px;
  }

  .side-area,
  .course-list {
    grid-template-columns: 1fr;
  }

  .summary-card,
  .course-area,
  .manse-card,
  .quiz-card {
    box-shadow: 0 14px 42px rgba(48, 63, 71, 0.1);
  }

  /* 모바일에서는 한 줄에 [말머리] 제목 / 작성자·날짜 두 단으로 접는다.
     세 칸을 그대로 두면 제목이 남는 폭이 없어 죄다 말줄임으로 잘린다. */
  .board-row a {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 4px 10px;
    padding: 11px 4px;
  }

  /* 탭 5개가 폭에 안 들어가 두 줄로 접힌다. 접히면 지저분하니 한 줄로 두고 옆으로 민다. */
  .board-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .board-tabs::-webkit-scrollbar {
    display: none;
  }

  .board-tab {
    flex: none;
    padding-left: 11px;
    padding-right: 11px;
  }

  /* 폭이 좁아 한 줄로는 제목 절반이 말줄임으로 잘린다.
     작성자·날짜가 어차피 아랫줄로 내려가므로 제목도 두 줄까지 허용한다. */
  .board-title {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .board-meta {
    grid-column: 2;
    font-size: 12px;
  }

  .manse-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .manse-card a {
    grid-column: 2;
    justify-self: start;
    min-height: 36px;
  }

  .tool-art {
    height: 78px;
  }

  .quiz-options {
    grid-template-columns: 1fr;
  }

  .mini-thumb {
    height: 84px;
  }

  .course-row-card {
    grid-template-columns: 1fr;
  }

  /* 로드맵 3단계 아카이브 쌍도 모바일에선 세로로 */
  .roadmap-pair {
    grid-template-columns: 1fr;
  }

  /* 무료강의 "다음 단계" 두 카드도 모바일에선 세로로 */
  .next-step-grid {
    grid-template-columns: 1fr;
  }

  /* 결제 화면: 주문 요약을 아래로 내리고 sticky 해제 */
  .checkout-layout {
    grid-template-columns: 1fr;
  }

  .order-summary {
    position: static;
  }

  .payment-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .payment-actions .buy-button {
    justify-content: center;
  }

  .course-row-bottom {
    flex-direction: column;
    align-items: stretch;
  }

  .row-cta {
    justify-content: center;
  }

  .course-detail-hero .course-art {
    min-height: 200px;
  }

  .curriculum-row {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .curriculum-row .ch-count {
    grid-column: 2;
  }

  .bottom-cta {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .enroll-panel {
    padding: 18px;
  }

  .enrolled-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .enrolled-card .course-art {
    min-height: 76px;
  }

  .quiz-main-card {
    padding: 20px;
    margin-top: 16px;
  }

  .quiz-main-question {
    font-size: 21px;
  }

  .quiz-main-options {
    grid-template-columns: 1fr;
  }

  .quiz-main-options button {
    min-height: 54px;
    font-size: 15px;
  }

  .quiz-main-counter {
    margin-left: 0;
    width: 100%;
  }

  .quiz-main-bottom {
    justify-content: stretch;
  }

  .submit-answer-btn,
  .next-question-btn {
    width: 100%;
  }

  .quiz-scoreboard {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .score-item {
    flex: 1;
    min-width: 100px;
  }

  .ta-setup,
  .ta-result-card {
    padding: 24px 18px;
  }

  .ta-duration-toggle button {
    min-width: 72px;
    min-height: 48px;
    font-size: 14px;
  }

  .ta-result-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .ta-result-actions {
    flex-direction: column;
  }

  .ranking-tab-bar {
    width: 100%;
  }

  .ranking-tab-bar button {
    flex: 1;
    padding: 0 8px;
    font-size: 13px;
  }

  .ranking-row {
    grid-template-columns: 32px 1fr;
    row-gap: 4px;
  }

  .ranking-score,
  .ranking-sub {
    grid-column: 2;
    justify-self: start;
  }

  .category-report-row {
    grid-template-columns: minmax(0, 1fr) 44px;
    grid-template-areas:
      "name pct"
      "track track"
      "n n";
    row-gap: 6px;
  }

  .category-report-name { grid-area: name; }
  .category-report-pct { grid-area: pct; }
  .category-report-track { grid-area: track; }
  .category-report-n { grid-area: n; text-align: right; }
}

/* ===== 강의 재생 화면 ===== */

.video-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #10171b;
}
.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* 구매자 이메일 워터마크. 영상 위를 떠다니지만 조작은 방해하지 않는다. */
.video-mark {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  color: rgba(255, 255, 255, 0.34);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.2px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
  transition: top 1.4s ease, left 1.4s ease;
}

.video-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
  color: #cfdde4;
}
.video-empty .big { font-size: 34px; opacity: 0.85; }
.video-empty p { margin: 0; font-size: 14px; font-weight: 700; }

.video-gate {
  margin-top: 12px;
  width: min(360px, 100%);
}
.video-gate label {
  display: block;
  font-size: 12.5px;
  font-weight: 750;
  margin-bottom: 7px;
  color: #e4eef3;
}
.gate-row { display: flex; gap: 7px; }
.gate-row input {
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 13.5px;
  font-family: inherit;
}
.gate-row input::placeholder { color: rgba(255, 255, 255, 0.45); }
.gate-row button {
  padding: 9px 16px;
  border-radius: 8px;
  border: 0;
  background: var(--accent, #2f7d8c);
  color: #fff;
  font-weight: 800;
  font-size: 13.5px;
  font-family: inherit;
  cursor: pointer;
}
.gate-note {
  margin: 8px 0 0;
  font-size: 11.5px;
  font-weight: 650;
  color: rgba(255, 255, 255, 0.5);
}

/* 커리큘럼 — 챕터를 눌러 펼치면 차시가 나온다 */
.chapter-sidebar .curriculum-row {
  width: 100%;
  background: none;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
}
.chapter-block .lesson-list { display: none; }
.chapter-block.open .lesson-list { display: block; }

.lesson-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 16px 9px 22px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fbfdfe;
  text-align: left;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2, #41525c);
  cursor: pointer;
}
.lesson-row:hover { background: #f2f8fa; }
.lesson-row.now {
  background: #e9f5fa;
  color: var(--ink, #1c2b33);
  font-weight: 850;
}
.lesson-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid #cfdde4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #fff;
}
.lesson-dot.seen { background: #2c7a52; border-color: #2c7a52; }
.lesson-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.player-nav { display: flex; gap: 9px; margin-top: 16px; }
.btn-lesson {
  padding: 9px 15px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 780;
  color: var(--ink-2, #41525c);
  cursor: pointer;
}
.btn-lesson:hover:not(:disabled) { background: #f2f8fa; }
.btn-lesson:disabled { opacity: 0.4; cursor: default; }

@media (max-width: 860px) {
  .player-layout { grid-template-columns: minmax(0, 1fr); }
  .chapter-sidebar { max-height: 420px; }
}

/* 여러 강의를 함께 사면 PRO 기간이 늘어난다 — 그 이득이 눈에 띄게 */
.order-benefits .benefit-strong {
  font-weight: 850;
  color: var(--good, #2c7a52);
}

/* 결제 완료 후 '그래서 이제 어떻게 되나'를 알려주는 블록 */
.payment-next {
  margin: 18px 0 4px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7fbfc;
  display: grid;
  gap: 11px;
  text-align: left;
}
.payment-next-row { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; }
.payment-next-icon { font-size: 15px; line-height: 1.5; }
.payment-next-row b { display: block; font-size: 13.5px; font-weight: 820; margin-bottom: 2px; }
.payment-next-row span { font-size: 12.5px; font-weight: 650; color: var(--ink-2, #41525c); line-height: 1.65; }

/* ===== 무료 강의 — 유튜브 재생목록 ===== */

.watch-lead {
  margin: 0 0 14px;
  font-size: 14.5px;
  font-weight: 650;
  color: var(--ink-2, #41525c);
  line-height: 1.7;
}
.yt-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #10171b;
  border: 1px solid var(--line);
}
.yt-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.watch-more {
  margin: 12px 0 0;
  font-size: 13.5px;
  font-weight: 650;
  color: var(--muted, #8598a3);
}
.watch-more a { color: var(--accent, #2f7d8c); font-weight: 780; }

/* 결제에서 이메일은 수강권의 유일한 열쇠라 필수임을 눈에 띄게 한다 */
.field-required {
  margin-left: 5px;
  font-size: 11px;
  font-weight: 800;
  color: #b3363b;
  vertical-align: 1px;
}
.field-help {
  margin: 6px 0 0;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted, #8598a3);
}

/* 헤더 로그인 상태 */
.login-link.is-member { color: var(--ink, #1c2b33); font-weight: 900; }
.logout-link {
  margin-left: 2px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted, #8598a3);
  align-self: center;
}
.logout-link:hover { color: var(--ink-2, #41525c); }
@media (max-width: 860px) { .logout-link { display: none; } }

/* ===== 회원가입 ===== */
.signup-layout { max-width: 520px; margin: 0 auto; }
.signup-card {
  background: var(--panel, #fff);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px 28px;
  box-shadow: var(--shadow-soft);
}
.signup-note { margin-bottom: 20px; }
.su-steps {
  display: flex; gap: 7px; align-items: center;
  font-size: 12.5px; font-weight: 700; color: var(--muted, #8598a3);
  margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.su-steps b { color: var(--accent, #2f7d8c); font-weight: 900; }
.su-steps span { opacity: 0.45; }
.su-msg {
  margin: 0 0 14px; padding: 10px 13px; border-radius: 9px;
  font-size: 13px; font-weight: 700;
  background: var(--good-soft, #e9f6ef); color: var(--good, #2c7a52);
}
.su-msg.is-error { background: #fdeef0; color: #b3363b; }
.su-done { text-align: center; padding: 14px 0 6px; }
.su-done-icon { font-size: 40px; margin-bottom: 10px; }
.su-done h2 { margin: 0 0 8px; font-size: 19px; }
.su-done p { margin: 0 0 20px; font-size: 14px; color: var(--ink-2, #41525c); line-height: 1.7; }
.signup-link {
  margin-left: 2px; padding: 0 8px;
  font-size: 12.5px; font-weight: 800;
  color: var(--accent, #2f7d8c); align-self: center;
}
@media (max-width: 860px) { .signup-link { display: none; } }
