/* Learn Korean with Hayoung — course access gate (shared)
 * 코스/단원 접근 권한이 확인되기 전에는 페이지 내용을 감추고,
 * 로그인 안내 또는 "배정되지 않은 레슨" 안내를 같은 톤으로 보여 줍니다. */

/* 페이지 CSS 의 display 규칙이 hidden 속성을 덮지 않도록 */
[hidden] {
  display: none !important;
}

body[data-guard-course]:not(.lab-ready) > .container,
body[data-guard-course].lab-gated > .container {
  visibility: hidden;
}

body[data-guard-course="home"]:not(.lab-ready) #courseSection,
body[data-guard-course="home"]:not(.lab-ready) #authNotice {
  visibility: hidden;
}

.lab-gate {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: #ffffff;
  color: #111827;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  overflow: auto;
  font-family: 'Noto Sans KR', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  text-align: left;
}

.lab-gate-card {
  width: 100%;
  max-width: 540px;
  border-top: 1px solid #111827;
  padding-top: 24px;
}

.lab-gate-kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #1d4ed8;
  margin-bottom: 12px;
}

.lab-gate h2:focus {
  outline: none;
}

.lab-gate h2:focus-visible {
  outline: none;
}

.lab-gate h2 {
  font-family: 'Noto Serif KR', 'Noto Sans KR', serif;
  font-size: clamp(22px, 3.4vw, 28px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

.lab-gate p {
  font-size: 15px;
  line-height: 1.7;
  color: #4b5563;
  margin: 0 0 8px;
}

.lab-gate p strong {
  color: #111827;
  font-weight: 600;
}

.lab-gate-path {
  display: inline-block;
  margin-top: 4px;
  font-size: 12px;
  color: #6b7280;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: #f3f4f6;
  padding: 2px 6px;
}

.lab-gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.lab-gate-btn,
.lab-gate-link {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  padding: 11px 18px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lab-gate-btn {
  border: 1px solid #111827;
  background: #111827;
  color: #ffffff;
}

.lab-gate-btn:hover {
  background: #000000;
}

.lab-gate-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.lab-gate-link {
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #111827;
}

.lab-gate-link:hover {
  border-color: #111827;
}

.lab-gate-msg {
  margin-top: 14px;
  font-size: 13px;
  color: #b91c1c;
  min-height: 18px;
}

.lab-gate-foot {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid #e5e7eb;
  font-size: 12px;
  color: #6b7280;
}

.lab-notice {
  border: 1px solid #e5e7eb;
  border-left: 3px solid #1d4ed8;
  padding: 14px 16px;
  margin: 18px 0 22px;
  font-size: 13px;
  line-height: 1.6;
  color: #4b5563;
}

.lab-notice strong {
  color: #111827;
}

.lab-gate-skip {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 9001;
}

@media (max-width: 520px) {
  .lab-gate {
    padding: 24px 18px;
  }
  .lab-gate-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .lab-gate-btn,
  .lab-gate-link {
    justify-content: center;
  }
}
