/* 랜딩 — 오늘의 문법 강의 (landing-vocab/problem 톤 맞춤) + 전체 강의 목차 페이지 공용 */

.landing-grammar-section {
  background: #ffffff;
  border: 1px solid #ddeaf8;
  border-radius: 20px;
  padding: 24px 18px;
  margin-bottom: 28px;
  box-shadow: 0 4px 20px rgba(74, 144, 226, 0.08);
}

.landing-grammar-section-title {
  font-family: 'Noto Serif KR', serif;
  font-size: 18px;
  color: var(--navy);
  text-align: center;
  margin-bottom: 6px;
}

.landing-grammar-desc {
  text-align: center;
  font-size: 12px;
  color: var(--gray);
  margin-bottom: 18px;
}

.landing-grammar-loading {
  text-align: center;
  font-size: 13px;
  color: var(--gray);
  padding: 28px 12px;
}

.grammar-today-card {
  background: #f5f9ff;
  border: 1px solid #ddeaf8;
  border-radius: 16px;
  padding: 18px 16px;
}

.grammar-today-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: var(--navy);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 8px;
}

.grammar-today-title {
  font-family: 'Noto Serif KR', serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}

.grammar-today-summary {
  font-size: 13px;
  color: #4a6a94;
  line-height: 1.6;
  margin-bottom: 12px;
}

.grammar-today-example {
  background: #ffffff;
  border: 1px solid #e5eefb;
  border-radius: 10px;
  padding: 10px 12px;
}

.grammar-today-example-en {
  font-size: 13px;
  color: var(--navy);
  margin-bottom: 3px;
}

.grammar-today-example-ko {
  font-size: 12px;
  color: var(--gray);
}

.landing-grammar-more {
  display: block;
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
}

.landing-grammar-more:hover {
  text-decoration: underline;
}

/* ── 전체 강의 목차 페이지 (grammar-lectures.html) ── */
.grammar-toc-intro {
  text-align: center;
  font-size: 13px;
  color: var(--gray);
  margin-bottom: 24px;
}

.grammar-grade-group {
  margin-bottom: 22px;
}

.grammar-grade-heading {
  font-family: 'Noto Serif KR', serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
  padding-left: 2px;
}

/* ── 게임 스테이지 지도 ── */
.grammar-stage-progress {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  margin-top: 10px;
}

.grammar-stage-world {
  position: relative;
}

.stage-path {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 8px 0;
}

.stage-path::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: repeating-linear-gradient(
    to bottom, rgba(37, 99, 235, 0.25) 0 8px, transparent 8px 16px
  );
  transform: translateX(-50%);
  z-index: 0;
}

.stage-node {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 62%;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}

.stage-node-left { align-self: flex-start; flex-direction: row; }
.stage-node-right { align-self: flex-end; flex-direction: row-reverse; text-align: right; }

.stage-node-circle {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid rgba(37, 99, 235, 0.35);
  color: var(--navy);
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.15);
  transition: transform 0.15s, border-color 0.15s;
}

.stage-node:hover .stage-node-circle {
  transform: scale(1.08);
  border-color: var(--blue);
}

.stage-node.is-done .stage-node-circle {
  background: rgba(37, 99, 235, 0.12);
  border-color: var(--blue);
}

.stage-node-title {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  background: #ffffff;
  border: 1px solid #ddeaf8;
  border-radius: 10px;
  padding: 8px 12px;
}

/* ── 스테이지 상세 패널 (공용, 지도 아래 고정 표시) ── */
.grammar-stage-detail {
  position: relative;
  background: #ffffff;
  border: 1px solid #ddeaf8;
  border-radius: 20px;
  padding: 24px 20px;
  margin-bottom: 28px;
  box-shadow: 0 4px 20px rgba(74, 144, 226, 0.08);
}

.grammar-stage-detail-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: #f5f9ff;
  color: var(--gray);
  font-size: 14px;
  cursor: pointer;
}

.grammar-stage-detail-close:hover {
  background: #e5eefb;
  color: var(--navy);
}

.grammar-stage-detail-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: var(--navy);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 8px;
}

.grammar-stage-detail-title {
  font-family: 'Noto Serif KR', serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
  padding-right: 30px;
}

.grammar-stage-detail-nav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #eef4fc;
}

.grammar-stage-nav-btn {
  flex: 1;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #ddeaf8;
  background: #f5f9ff;
  color: var(--navy);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.grammar-stage-nav-btn:hover:not(:disabled) {
  border-color: var(--blue);
  background: rgba(37, 99, 235, 0.08);
}

.grammar-stage-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

@media (max-width: 480px) {
  .stage-node { width: 78%; }
  .stage-node-title { font-size: 12.5px; }
}

/* ── 확인 문제 (스테이지 클리어 퀴즈) ── */
.grammar-quiz {
  background: #f5f9ff;
  border: 1px solid #ddeaf8;
  border-radius: 14px;
  padding: 16px 14px;
  margin: 16px 0;
}

.grammar-quiz-heading {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.grammar-quiz-question {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.6;
  margin-bottom: 12px;
}

.grammar-quiz-choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.grammar-quiz-choice {
  text-align: left;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #ddeaf8;
  background: #ffffff;
  color: var(--navy);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}

.grammar-quiz-choice:hover:not(:disabled) {
  border-color: var(--blue);
  background: rgba(37, 99, 235, 0.06);
}

.grammar-quiz-choice:disabled {
  cursor: not-allowed;
}

.grammar-quiz-choice.is-correct {
  border-color: #16a34a;
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
  font-weight: 700;
}

.grammar-quiz-choice.is-wrong {
  border-color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
  color: #b91c1c;
  opacity: 0.7;
}

.grammar-quiz-feedback {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.6;
  min-height: 1.4em;
}

.grammar-quiz-feedback.is-correct {
  color: #15803d;
  font-weight: 700;
}

.grammar-quiz-feedback.is-wrong {
  color: #b91c1c;
}

.grammar-quiz-cleared {
  font-size: 13px;
  font-weight: 600;
  color: #15803d;
  background: rgba(22, 163, 74, 0.1);
  border: 1px solid rgba(22, 163, 74, 0.3);
  border-radius: 10px;
  padding: 10px 12px;
}

.grammar-quiz-nav-hint {
  text-align: center;
  font-size: 11.5px;
  color: var(--gray);
  margin-top: 8px;
}

/* ── 보너스 미니게임: 단어 슈팅 ── */
.stage-node-bonus {
  align-self: center !important;
  flex-direction: column !important;
  text-align: center !important;
  gap: 4px !important;
  width: auto !important;
}

.stage-node-circle-bonus {
  background: linear-gradient(135deg, #fde68a, #fbbf24) !important;
  border-color: #f59e0b !important;
  font-size: 18px;
  animation: bonusPulse 1.6s ease-in-out infinite;
}

@keyframes bonusPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.stage-node-bonus .stage-node-title {
  background: none;
  border: none;
  padding: 0;
  font-size: 11.5px;
  color: #b45309;
}

.wordshoot-hud {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  margin: 14px 0 6px;
}

.wordshoot-prompt {
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
}

.wordshoot-arena {
  position: relative;
  height: 280px;
  background: linear-gradient(180deg, #eef6ff, #ffffff);
  border: 1px solid #ddeaf8;
  border-radius: 16px;
  overflow: hidden;
}

.wordshoot-bubble {
  position: absolute;
  padding: 10px 16px;
  border-radius: 999px;
  border: 2px solid var(--blue);
  background: #ffffff;
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  animation-name: bubbleFloat;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.15);
}

.wordshoot-bubble:hover {
  transform: scale(1.06);
}

.wordshoot-bubble:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.wordshoot-bubble.is-shake {
  animation: bubbleShake 0.3s ease;
  border-color: #dc2626;
  background: rgba(220, 38, 38, 0.1);
}

@keyframes bubbleFloat {
  from { margin-top: -6px; }
  to { margin-top: 6px; }
}

@keyframes bubbleShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.wordshoot-result {
  text-align: center;
  padding: 20px 0;
}

.wordshoot-result-score {
  font-size: 40px;
  font-weight: 800;
  color: var(--blue);
}

.wordshoot-result-best {
  font-size: 13px;
  color: var(--gray);
  margin-top: 6px;
}

.grammar-lecture-summary {
  font-size: 13px;
  color: #4a6a94;
  margin: 12px 0;
  line-height: 1.6;
}

.grammar-lecture-body p {
  font-size: 13px;
  color: #2c4a72;
  line-height: 1.75;
  margin-bottom: 10px;
}

.grammar-lecture-examples {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}

.grammar-lecture-example {
  background: #f5f9ff;
  border: 1px solid #e5eefb;
  border-radius: 10px;
  padding: 10px 12px;
}

.grammar-lecture-example-en {
  font-size: 13px;
  color: var(--navy);
  margin-bottom: 3px;
}

.grammar-lecture-example-ko {
  font-size: 12px;
  color: var(--gray);
}

.grammar-lecture-keypoint {
  background: rgba(37, 99, 235, 0.08);
  border-left: 3px solid var(--blue);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
}
