/* ── COLOR TOKENS (black & white) ── */
:root {
  --primary:        #111111;
  --primary-dark:   #000000;
  --primary-light:  #888888;
  --accent:         #333333;
  --accent-dark:    #1a1a1a;
  --sage:           #666666;
  --cream:          #f5f5f5;
  --cream-dark:     #e8e8e8;

  --bg:             #ffffff;
  --bg-soft:        #f7f7f7;
  --bg-muted:       #f0f0f0;
  --surface:        #ffffff;

  --text-primary:   #111111;
  --text-secondary: #555555;
  --text-muted:     #888888;
  --text-hint:      #aaaaaa;

  --border:         #e5e5e5;
  --border-strong:  #cccccc;

  --dark-bg:        #111111;
  --dark-surface:   rgba(255,255,255,0.07);
  --dark-border:    rgba(255,255,255,0.12);

  --success:        #333333;
  --success-bg:     #f0f0f0;
  --error:          #111111;
  --error-bg:       #f5f5f5;
  --warning:        #666666;
  --warning-bg:     #f5f5f5;

  /* 강의·상품 딱지 전용 (사이트는 흑백, 딱지만 컬러) */
  --badge-new:              #468186;
  --badge-best:             #d4991a;
  --badge-free:             #91A776;
  --badge-live:             #ED6B5A;
  --price-free:             #E53935;
  --badge-offline:          #5c6bc0;
  --badge-disc:             #ED6B5A;
  --badge-disc-bg:          #fce8e8;
  --badge-live-upcoming-bg: #FFEBEE;
  --badge-live-upcoming-text: #E53935;
  --badge-live-active-bg:   #FFEBEE;
  --badge-live-active-text: #E53935;

  /* 전역 텍스트 배율 (150%) — html·font-size px 와 함께 사용 */
  --text-scale:     1.2;
}

/* Toast */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  padding: 12px 24px; border-radius: 8px; font-size: 21.6px; font-weight: 500;
  opacity: 0; transition: all 0.3s; z-index: 9999; pointer-events: none; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-info    { background: #111; color: #fff; }
.toast-success { background: #111; color: #fff; }
.toast-error   { background: #333; color: #fff; }

/* Loading spinner */
.spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid #eee; border-top-color: #111;
  animation: spin 0.7s linear infinite; margin: 48px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 강의 썸네일 — 16:9 (카드·상세·마이페이지 공통) */
.course-thumb,
.ccard-thumb,
.fcard-thumb,
.buy-thumb,
.mc-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.course-thumb > img,
.ccard-thumb > img,
.fcard-thumb > img,
.buy-thumb > img,
.mc-thumb > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Empty state */
.empty-state {
  text-align: center; padding: 60px 20px; color: #aaa;
}
.empty-state .ti { font-size: 62.4px; display: block; margin-bottom: 12px; }
.empty-state p { font-size: 24px; }

/* Google 가입 유형 선택 모달 */
.google-member-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.google-member-modal.is-open { display: flex; }
.google-member-dialog {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 16px;
  padding: 24px 22px 22px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}
.google-member-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: none;
  background: none;
  font-size: 28px;
  line-height: 1;
  color: #aaa;
  cursor: pointer;
}
.google-member-close:hover { color: #666; }
.google-member-title { font-size: 22px; font-weight: 800; color: #111; margin-bottom: 6px; }
.google-member-sub { font-size: 14px; color: #666; margin-bottom: 16px; line-height: 1.5; }
.google-member-sub .hint { color: #aaa; }
.google-member-type-row { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.google-member-type-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.google-member-type-card input { position: absolute; opacity: 0; pointer-events: none; }
.google-member-type-card:has(input:checked) { border-color: var(--text-primary); background: var(--bg-soft); }
.google-member-type-title { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.google-member-type-desc { font-size: 13px; color: var(--text-muted); line-height: 1.45; }
.google-member-continue { width: 100%; margin-top: 4px; }

/* ── 라이브 강의 버튼 (live-reminder.js에서 이관) ── */

/* 카운트다운 */
.live-countdown {
  font-size: 13px; font-weight: 700; color: #111;
  background: #f5f5f5; border-radius: 8px; padding: 8px 10px;
  margin: 8px 0; text-align: center; font-variant-numeric: tabular-nums;
}
.live-countdown.is-live { color: #111; background: #eee; }
.live-countdown.is-ended { color: #888; background: #f5f5f5; }

/* Google Meet 버튼 */
.btn-meet {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 10px 12px; border-radius: 8px; font-size: 14px;
  font-weight: 700; text-decoration: none; border: none; cursor: pointer;
  transition: .15s; box-sizing: border-box;
}
.btn-meet--active { background: #1a73e8; color: #fff; }
.btn-meet--active:hover { background: #1557b0; }
.btn-meet--waiting { background: #e8f0fe; color: #1a73e8; border: 1px solid #c5d9f7; cursor: default; }
.btn-meet--enrolled { background: #f5f5f5; color: #111; border: 1px solid #e8e8e8; cursor: default; font-weight: 700; }
.btn-meet--material-active { background: #111; color: #fff; border: none; }
.btn-meet--material-active:hover { background: #333; }
.btn-meet--material-waiting { background: #f5f5f5; color: #888; border: 1px solid #e8e8e8; cursor: default; font-weight: 600; }
.btn-meet--material { margin: 8px 0; }
.btn-meet__icon { display: inline-flex; align-items: center; flex-shrink: 0; line-height: 0; }
.btn-meet .meet-google-icon { display: block; width: 18px; height: 18px; }

/* 알림 모달 */
.live-remind-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; padding: 20px;
}
.live-remind-modal {
  background: #fff; border-radius: 16px; max-width: 420px; width: 100%;
  padding: 28px 24px; box-shadow: 0 20px 60px rgba(0,0,0,.2);
  animation: liveRemindIn .25s ease;
}
@keyframes liveRemindIn {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: none; }
}
.live-remind-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: #f0f0f0; color: #111; font-size: 12px; font-weight: 800;
  padding: 4px 10px; border-radius: 20px; margin-bottom: 12px;
}
.live-remind-title { font-size: 20px; font-weight: 900; line-height: 1.35; margin-bottom: 8px; }
.live-remind-schedule { font-size: 14px; color: #888; margin-bottom: 16px; }
.live-remind-countdown { font-size: 28px; font-weight: 900; color: #111; text-align: center; margin: 16px 0; font-variant-numeric: tabular-nums; }
.live-remind-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.live-remind-dismiss { background: none; border: none; color: #aaa; font-size: 13px; cursor: pointer; padding: 8px; margin-top: 4px; }
.live-remind-dismiss:hover { color: #666; }

/* 추가 액션 버튼 (다시보기, 강의자료) */
.my-course-card--live { cursor: default; }
.my-course-card--live:hover { transform: none; }
.live-extra-actions { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.btn-live-extra {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 10px 12px; border-radius: 8px; font-size: 14px;
  font-weight: 700; text-decoration: none; border: none; cursor: pointer;
  box-sizing: border-box; transition: .15s;
}
.btn-live-extra--replay { background: #fff; color: #111; border: 1px solid #e8e8e8; gap: 8px; }
.btn-live-extra--replay:hover { background: #fafafa; border-color: #ddd; }
.btn-live-extra--replay .replay-youtube-icon { flex-shrink: 0; display: block; width: 22px; height: 22px; }
.btn-live-extra--replay.btn-live-extra--locked { background: #fff; color: #666; border: 1px solid #eee; cursor: default; }
.btn-live-extra--replay.btn-live-extra--locked .replay-youtube-icon { opacity: 0.45; }
.btn-live-extra--material { background: #f5f5f5; color: #111; border: 1px solid #ddd; }
.btn-live-extra--material:hover { background: #eee; }
.btn-live-extra--locked { background: #f5f5f5; color: #999; border: 1px solid #e8e8e8; cursor: default; font-weight: 600; }
/* 기본: 한 줄 (mypage 등 compact 컨텍스트) */
.btn-live-extra--replay-pending { flex-direction: row; gap: 6px; line-height: 1.3; }
.btn-live-extra__sub { font-size: 11px; font-weight: 500; color: #888; }

/* ── 모바일 공통 컴포넌트 ── */
@media (max-width: 600px) {
  /* Toast — 화면 폭에 맞게 줄바꿈 허용 */
  .toast {
    left: 16px;
    right: 16px;
    bottom: 20px;
    transform: translateY(20px);
    max-width: none;
    width: auto;
    white-space: normal;
    text-align: center;
    font-size: 15px;
    padding: 12px 18px;
  }
  .toast.show { transform: translateY(0); }

  /* 모달 — 좁은 화면 여백 축소 */
  .google-member-modal,
  .live-remind-overlay { padding: 12px; }
  .google-member-dialog { padding: 20px 16px 16px; }
  .google-member-title { font-size: 19px; }
  .live-remind-modal { padding: 22px 18px; }

  /* Empty state 축소 */
  .empty-state { padding: 40px 16px; }
  .empty-state .ti { font-size: 48px; }
  .empty-state p { font-size: 16px; }
}

/* ── 기대평·후기 혜택 안내 ── */
.reward-notice {
  margin: 12px 0 10px;
  padding: 12px 14px;
  background: #f8f9fc;
  border: 1px solid #e8ecf4;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.65;
  color: #555;
}
.reward-notice--compact { margin-top: 10px; }
.reward-notice-title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  color: #333;
  display: flex;
  align-items: center;
  gap: 5px;
}
.reward-notice-title .ti { font-size: 15px; color: #6366f1; }
.reward-notice-list {
  margin: 0;
  padding-left: 18px;
}
.reward-notice-list li { margin-bottom: 4px; }
.reward-notice-list li:last-child { margin-bottom: 0; }
.reward-notice-edit,
.reward-notice-more {
  margin: 8px 0 0;
  font-size: 11px;
  color: #777;
}
.reward-notice a { color: #4f46e5; text-decoration: underline; }
.reward-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 10px 0 12px;
  font-size: 12px;
  line-height: 1.55;
  color: #444;
  cursor: pointer;
}
.reward-consent input {
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: #6366f1;
}
.reward-consent a { color: #4f46e5; }
