:root {
  --paper: #f8f3e8;
  --paper-edge: #e8dfc8;
  --paper-shadow: #d4c9ad;
  --ink: #2a2018;
  --ink-light: #6b5d4a;
  --ink-faint: #a0927c;
  --accent: #7a5c1e;
  --accent-warm: #b8922e;
  --accent-glow: rgba(184, 146, 46, 0.12);
  --red-soft: #a63d2f;
  --cover: #2c2218;
  --cover-light: #4a3c2a;
  --spine: #1e180f;
  --gold: #c4a44a;
  --gold-dim: #8a7432;
  --gold-light: #e8dbbc;
  --font-serif: 'Gowun Batang', 'Batang', '바탕', 'Georgia', serif;
  --font-sans: 'Noto Sans KR', 'Malgun Gothic', '맑은 고딕', 'Apple SD Gothic Neo', sans-serif;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: clamp(18px, 1.25vw, 24px);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  background: #8a7e6e;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.04'/%3E%3C/svg%3E"), radial-gradient(ellipse at 40% 30%, #9e9282 0%, #7a7060 60%, #605848 100%);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  color: var(--ink);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 2.5vw;
}

.book-scene {
  width: 100%;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.book-shell {
  position: relative;
  display: flex;
  width: 100%;
  max-height: calc(100vh - 5vw);
  min-height: 0;
  background: var(--cover);
  border-radius: 4px 10px 10px 4px;
  padding: 6px 6px 6px 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.25), 0 16px 48px rgba(0, 0, 0, 0.35);
}

@media (min-width: 1201px) {
  .book-aspect {
    aspect-ratio: 1.6 / 1;
    max-width: calc((100vh - 5vw) * 1.6) !important;
    flex: none !important;
  }
}

.book-spine {
  width: 22px;
  min-width: 22px;
  background: linear-gradient(90deg, var(--spine), var(--cover-light) 40%, var(--cover) 70%, var(--cover-light));
  border-radius: 4px 0 0 4px;
  box-shadow: inset -2px 0 6px rgba(0, 0, 0, 0.4);
  position: relative;
}

.book-spine::after {
  content: '';
  position: absolute;
  top: 8%;
  bottom: 8%;
  left: 50%;
  width: 1px;
  background: var(--gold-dim);
  opacity: 0.4;
}

.book-pages {
  flex: 1;
  display: flex;
  background: var(--paper);
  border-radius: 0 6px 6px 0;
  overflow: hidden;
  position: relative;
  box-shadow: inset 2px 0 8px rgba(0, 0, 0, 0.06);
  min-height: 0;
}

.book-pages::before {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 8px;
  right: 4px;
  height: 3px;
  background: linear-gradient(90deg, var(--paper-edge), var(--paper-shadow), var(--paper-edge));
  border-radius: 0 0 2px 2px;
  z-index: -1;
}

.book-pages::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 12px;
  right: 8px;
  height: 2px;
  background: var(--paper-shadow);
  border-radius: 0 0 2px 2px;
  z-index: -2;
  opacity: 0.7;
}

.book-gutter {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 50px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(30, 24, 15, 0.04) 15%, rgba(30, 24, 15, 0.09) 35%, rgba(30, 24, 15, 0.16) 50%, rgba(30, 24, 15, 0.09) 65%, rgba(30, 24, 15, 0.04) 85%, transparent);
  z-index: 2;
  pointer-events: none;
}

.book-gutter::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: rgba(30, 24, 15, 0.1);
}

.book-edge-right {
  position: absolute;
  top: 4px;
  bottom: 4px;
  right: -3px;
  width: 3px;
  background: repeating-linear-gradient(180deg, var(--paper) 0px, var(--paper) 1px, var(--paper-edge) 1px, var(--paper-edge) 2px);
  border-radius: 0 2px 2px 0;
  z-index: -1;
}

.page {
  flex: 1;
  padding: 44px 52px 0;
  overflow-y: auto;
  position: relative;
  scrollbar-width: none;
  z-index: 5;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.page::-webkit-scrollbar {
  display: none;
}

.page-left {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.01), transparent 3%, transparent 96%, rgba(0, 0, 0, 0.015));
}

.page-right {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.015), transparent 4%, transparent);
}

.page-num {
  margin-top: auto;
  padding: 16px 0 20px;
  font-family: var(--font-serif);
  font-size: 0.72rem;
  color: var(--ink-faint);
  pointer-events: none;
  flex-shrink: 0;
}

.page-left .page-num {
  text-align: left;
}

.page-right .page-num {
  text-align: right;
}

.page-header-line {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ink-faint), transparent);
  opacity: 0.2;
  margin-bottom: 16px;
}

.running-header {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  color: var(--ink-faint);
  letter-spacing: 0.12em;
  margin-bottom: 4px;
  text-align: right;
}

.nav-btn {
  position: absolute;
  bottom: 38px;
  width: 28px;
  height: 28px;
  border: none;
  background: #a89278;
  color: #fff;
  font-size: 0.78rem;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.nav-btn:hover {
  background: #bea68c;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.nav-btn:disabled {
  opacity: 0;
  pointer-events: none;
}

.nav-btn {
  display: none !important; /* 플로팅 버튼 완전 제거 (app.js 하단 인라인 버튼으로 대체) */
}

.nav-prev {
  left: 16px;
}

.nav-next {
  right: 16px;
}

/* ── 데스크톱: 플로팅 버튼 제거 ── */
@media (min-width: 1201px) {
  .book-scene {
    gap: 0;
  }
}

.page h1 {
  font-size: 1.55rem;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
  line-height: 1.4;
}

.page h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: 16px;
  margin-bottom: 24px;
  color: var(--accent);
  position: relative;
  padding-bottom: 8px;
}

.page h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 28px;
  height: 2px;
  background: var(--accent-warm);
  border-radius: 1px;
}

.page p {
  font-size: 0.92rem;
  line-height: 2.2;
  margin-bottom: 28px;
  text-align: justify;
  word-break: keep-all;
}

.page .subtitle {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  color: var(--ink-faint);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.hl {
  background: linear-gradient(180deg, transparent 58%, rgba(196, 164, 74, 0.22) 58%);
  padding: 0 2px;
}

.quote-box {
  border-left: 2px solid var(--accent-warm);
  padding: 12px 18px;
  margin: 14px 0 18px;
  background: var(--accent-glow);
  font-style: italic;
  font-size: 0.88rem;
  line-height: 1.85;
  border-radius: 0 4px 4px 0;
}

.step-list {
  margin: 10px 0 18px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step-list li {
  counter-increment: step;
  font-size: 0.86rem;
  line-height: 1.85;
  margin-bottom: 6px;
  padding-left: 26px;
  position: relative;
}

.step-list li::before {
  content: counter(step) ".";
  position: absolute;
  left: 0;
  font-weight: 700;
  color: var(--accent);
}

.funnel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  margin: 18px 0;
}

.funnel-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.funnel-circle {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 2px 6px rgba(122, 92, 30, 0.3);
}

.funnel-label {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  color: var(--ink-light);
  text-align: center;
  max-width: 64px;
  line-height: 1.3;
}

.funnel-arrow {
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin: 0 1px;
  padding-bottom: 18px;
}

.purpose-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 14px 0;
  font-size: 0.76rem;
  font-family: var(--font-sans);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.purpose-table th {
  background: var(--cover);
  color: var(--paper);
  padding: 8px 10px;
  font-weight: 500;
  text-align: center;
  font-size: 0.72rem;
}

.purpose-table td {
  padding: 7px 10px;
  border-bottom: 1px solid rgba(44, 36, 22, 0.06);
  line-height: 1.55;
  vertical-align: top;
  background: #fff;
}

.purpose-table tr:last-child td {
  border-bottom: none;
}

.purpose-table td:first-child {
  font-weight: 500;
  color: var(--ink-light);
  width: 38%;
  background: #eee8d8;
}

.answer-area {
  margin: 16px 0 8px;
  position: relative;
  z-index: 15;
}

.answer-area-inner {
  background: #fff;
  border-radius: 8px;
  padding: 18px 18px 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(44, 36, 22, 0.06);
  position: relative;
  z-index: 15;
}

.answer-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 10px;
}

.answer-label-icon {
  width: 18px;
  height: 18px;
  background: var(--accent-warm);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.65rem;
  flex-shrink: 0;
}

.answer-textarea {
  width: 100%;
  min-height: 100px;
  border: none;
  border-bottom: 1px solid rgba(44, 36, 22, 0.1);
  padding: 0;
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 2.2rem;
  color: var(--ink);
  background: transparent;
  resize: none;
  outline: none;
  transition: border-color 0.2s;
  background-image: repeating-linear-gradient(transparent, transparent calc(2.2rem - 1px), rgba(44, 36, 22, 0.12) calc(2.2rem - 1px), rgba(44, 36, 22, 0.12) 2.2rem);
  background-size: 100% 2.2rem;
  background-position: 0 0;
  background-attachment: local;
}

.answer-textarea:focus {
  border-bottom-color: var(--accent-warm);
}

.answer-textarea::placeholder {
  color: #c4b8a0;
  font-style: italic;
}

.submit-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.submit-btn {
  padding: 11px 18px;
  border: none;
  border-radius: 20px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 2px 8px rgba(122, 92, 30, 0.2);
}

.submit-btn:hover {
  background: var(--cover);
  transform: translateY(-1px);
}

.chat-panel {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: transparent;
}

.chat-header {
  padding: 12px 0 10px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  font-family: var(--font-sans);
  border-bottom: 2px solid var(--paper-edge);
}

.chat-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
}

.turn-bar {
  padding: 8px 18px;
  background: #f0ebe0;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  color: var(--ink-light);
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.turn-dots {
  display: flex;
  gap: 4px;
}

.turn-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.1);
  transition: background 0.3s;
}

.turn-dot.filled {
  background: var(--accent-warm);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 14px;
  font-family: var(--font-sans);
  font-size: 0.83rem;
  line-height: 1.65;
  word-break: keep-all;
  animation: bubbleIn 0.25s ease-out;
}

@keyframes bubbleIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-bubble.user {
  align-self: flex-end;
  background: var(--cover);
  color: var(--paper);
  border-bottom-right-radius: 4px;
}

.chat-bubble.ai {
  align-self: flex-start;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.chat-bubble.typing {
  align-self: flex-start;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-bottom-left-radius: 4px;
  padding: 12px 18px;
}

.typing-dots span {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: var(--ink-faint);
  border-radius: 50%;
  margin: 0 2px;
  animation: dot-bounce 1.2s infinite;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes dot-bounce {

  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.3;
  }

  30% {
    transform: translateY(-5px);
    opacity: 1;
  }
}

.chat-actions {
  padding: 10px 18px;
  display: flex;
  gap: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  background: #f0ebe0;
}

.chat-action-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.chat-action-btn.primary {
  background: var(--accent);
  color: #fff;
}

.chat-action-btn.primary:hover {
  background: var(--cover);
}

.chat-action-btn.secondary {
  background: #fff;
  color: var(--ink-light);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.chat-action-btn.secondary:hover {
  background: var(--paper);
}

.chat-input-area {
  padding: 10px 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  display: flex;
  gap: 8px;
  background: transparent;
}

.chat-input-area input {
  flex: 1;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 20px;
  padding: 9px 16px;
  font-family: var(--font-sans);
  font-size: 0.83rem;
  outline: none;
  background: rgba(255, 255, 255, 0.5);
}

.chat-input-area input:focus {
  border-color: var(--accent-warm);
}

.chat-send {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(122, 92, 30, 0.25);
}

.chat-send:hover {
  background: var(--cover);
}

.chat-send:disabled {
  opacity: 0.3;
  cursor: default;
}

.summary-content {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  line-height: 1.75;
  color: var(--ink);
}

.summary-content .s-label {
  font-size: 0.68rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 6px;
  letter-spacing: 0.05em;
}

.summary-content .s-block {
  background: #fff;
  border-radius: 6px;
  padding: 14px;
  margin: 10px 0;
  border: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 0.8rem;
  line-height: 1.7;
}

.dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border: none;
  border-radius: 20px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  cursor: pointer;
  margin-top: 16px;
  box-shadow: 0 2px 8px rgba(122, 92, 30, 0.2);
}

.dl-btn:hover {
  background: var(--cover);
}

.book-footer {
  margin-top: 10px;
  font-family: var(--font-sans);
  font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.3);
  text-align: center;
  letter-spacing: 0.06em;
}

@media(max-width:1200px) {
  html {
    font-size: clamp(15px, 2.2vw, 20px);
  }

  body {
    justify-content: flex-start;
    padding: 3vw;
  }

  .book-scene {
    padding: 0;
    width: 100%;
  }

  .book-shell {
    max-width: 100%;
    height: calc(100dvh - 6vw);
    border-radius: 8px;
    padding: 6px 6px 6px 0;
    flex-direction: row;
  }

  .book-spine {
    width: 14px;
    min-width: 14px;
    flex: 0 0 14px;
    border-radius: 6px 0 0 6px;
    background: linear-gradient(90deg, var(--spine), var(--cover-light) 40%, var(--cover) 70%, var(--cover-light));
    box-shadow: inset -2px 0 6px rgba(0, 0, 0, 0.4);
  }

  .book-spine::after {
    display: none;
  }

  .book-pages {
    flex: 1;
    flex-direction: row;
    border-radius: 0 0 6px 6px;
    min-height: 0;
  }

  .book-gutter {
    display: none;
  }

  .book-edge-right,
  .book-pages::before,
  .book-pages::after {
    display: none;
  }

  .page {
    padding: 32px 28px 0;
    flex: 1;
    min-height: 0;
  }

  .page p {
    font-size: clamp(0.95rem, 3vw, 1.35rem);
    line-height: 2.2;
    margin-bottom: 2rem;
  }

  .page h1 {
    font-size: clamp(1.3rem, 4vw, 2rem);
  }

  .page h2 {
    font-size: clamp(1.1rem, 3.5vw, 1.7rem);
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .page-right.single-hidden {
    display: none !important;
  }

  .nav-btn {
    display: none !important;
  }

  .page-left .page-num,
  .page-right .page-num {
    text-align: center;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-bottom: 30px;
  }

  .funnel-circle {
    transform: scale(0.85);
  }

  .funnel-label {
    font-size: clamp(0.5rem, 1.8vw, 0.75rem);
    max-width: 48px;
  }

  /* 반응형 글자 크기 — 개별 요소 (태블릿 대응 max 상향) */
  .sentence-card-text {
    font-size: clamp(0.85rem, 3vw, 1.2rem);
    line-height: 1.9;
  }

  .sentence-card-number {
    width: clamp(20px, 3.5vw, 30px);
    height: clamp(20px, 3.5vw, 30px);
    font-size: clamp(0.55rem, 2vw, 0.8rem);
  }

  .analogy-card-text {
    font-size: clamp(0.82rem, 2.8vw, 1.15rem);
    line-height: 2;
  }

  .analogy-card-title {
    font-size: clamp(0.68rem, 2.4vw, 0.95rem);
  }

  .detail-panel-body p {
    font-size: clamp(0.85rem, 3vw, 1.2rem);
    line-height: 2;
  }

  .detail-panel-header {
    font-size: clamp(0.65rem, 2.2vw, 0.9rem);
  }

  .answer-label {
    font-size: clamp(0.7rem, 2.5vw, 1rem);
  }

  .answer-textarea {
    font-size: clamp(0.9rem, 3vw, 1.25rem);
  }

  .submit-btn {
    font-size: clamp(0.75rem, 2.5vw, 1rem);
    padding: 12px 22px;
  }

  .card-detail-btn {
    font-size: clamp(0.72rem, 2.5vw, 1rem);
    padding: 12px 28px;
  }

  .detail-next-btn {
    font-size: clamp(0.75rem, 2.5vw, 1rem);
  }

  .running-header {
    font-size: clamp(0.55rem, 1.8vw, 0.8rem);
  }

  .card-progress-label {
    font-size: clamp(0.58rem, 1.8vw, 0.8rem);
  }

  .chat-bubble {
    font-size: clamp(0.8rem, 2.8vw, 1.15rem);
    line-height: 1.7;
  }

  .chat-input-area input {
    font-size: clamp(0.8rem, 2.8vw, 1.15rem);
  }

  .chat-action-btn {
    font-size: clamp(0.75rem, 2.5vw, 1rem);
  }

  .summary-content {
    font-size: clamp(0.8rem, 2.8vw, 1.15rem);
  }

  .summary-content .s-block {
    font-size: clamp(0.78rem, 2.6vw, 1.1rem);
  }

  .quote-box {
    font-size: clamp(0.84rem, 2.8vw, 1.15rem);
  }

  .step-list li {
    font-size: clamp(0.82rem, 2.8vw, 1.15rem);
  }
}

/* ── Phase 0: 카드 학습 단계 ── */

.sentence-cards-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sentence-card {
  background: #fff;
  border: 1px solid rgba(44, 36, 22, 0.08);
  border-radius: 10px;
  padding: 18px 20px;
  position: relative;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.02);
  animation: cardReveal 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  opacity: 0;
  transform: translateY(12px);
}

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

.sentence-card-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 700;
  margin-right: 10px;
  flex-shrink: 0;
  vertical-align: middle;
}

.sentence-card-text {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  line-height: 1.85;
  color: var(--ink);
  display: inline;
}

.sentence-card-text strong {
  color: var(--accent);
}

.sentence-card.active {
  border-color: rgba(184, 146, 46, 0.25);
  box-shadow: 0 2px 8px rgba(184, 146, 46, 0.1), 0 4px 16px rgba(0, 0, 0, 0.04);
}

.sentence-card.completed {
  opacity: 0.7;
  border-color: rgba(44, 36, 22, 0.06);
}

/* 자세히 알아보기 버튼 */
.card-action-row {
  display: flex;
  justify-content: center;
  margin-top: 18px;
  animation: cardReveal 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
  opacity: 0;
}

.card-detail-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  border: 1px solid rgba(184, 146, 46, 0.2);
  border-radius: 24px;
  background: var(--accent-glow);
  color: var(--accent);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 1px 4px rgba(122, 92, 30, 0.08);
}

.card-detail-btn:hover {
  background: rgba(184, 146, 46, 0.18);
  box-shadow: 0 2px 8px rgba(122, 92, 30, 0.15);
  transform: translateY(-1px);
}

.card-detail-btn .btn-icon {
  font-size: 0.85rem;
  line-height: 1;
}

/* 오른쪽 상세 설명 패널 */
.detail-panel {
  animation: detailFadeIn 0.4s ease-out forwards;
  opacity: 0;
}

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

.detail-panel-header {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.06em;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.detail-panel-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.55rem;
  font-weight: 700;
}

.detail-panel-body {
  background: #fff;
  border-radius: 10px;
  padding: 22px 20px;
  border: 1px solid rgba(44, 36, 22, 0.06);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
  margin-top: 12px;
}

.detail-panel-body p {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  line-height: 1.95;
  color: var(--ink);
  margin-bottom: 0;
  text-align: justify;
  word-break: keep-all;
}

.detail-next-row {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.detail-next-btn {
  padding: 11px 28px;
  border: none;
  border-radius: 24px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 2px 8px rgba(122, 92, 30, 0.2);
}

.detail-next-btn:hover {
  background: var(--cover);
  transform: translateY(-1px);
}

/* 비유 카드 */
.analogy-card {
  background: linear-gradient(135deg, var(--cover) 0%, var(--cover-light) 100%);
  border-radius: 12px;
  padding: 24px 22px;
  color: var(--paper);
  position: relative;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  animation: cardReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  opacity: 0;
  overflow: hidden;
  margin-bottom: 30px;
}

.analogy-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(196, 164, 74, 0.15), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.analogy-card-title {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.analogy-card-title .analogy-icon {
  font-size: 0.9rem;
}

.analogy-card-text {
  font-family: var(--font-serif);
  font-size: 0.86rem;
  line-height: 1.95;
  color: rgba(248, 243, 232, 0.92);
}

/* 진행 상태 인디케이터 */
.card-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 20px;
}

.card-progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(44, 36, 22, 0.1);
  transition: all 0.3s ease;
}

.card-progress-dot.done {
  background: var(--accent-warm);
}

.card-progress-dot.current {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(184, 146, 46, 0.15);
  transform: scale(1.2);
}

.card-progress-label {
  font-family: var(--font-sans);
  font-size: 0.62rem;
  color: var(--ink-faint);
  margin-left: 6px;
}

.hidden {
  display: none !important;
}

/* ── Phase 2 (시험 모드) 특화 스타일 ── */
.exam-choice:hover {
  background: var(--gold-light, #e8dbbc) !important;
}