/* ============================================================
   오픽치료사 디자인 토큰 — opic-therapy-app 프리미엄 에디토리얼 문법
   ============================================================ */


:root {
  /* color — 딥 네이비 SaaS 톤 (Primary #0B4171 · 회청 배경 · 연한 보더) */
  --ink: #0F172A;
  --ink-2: #334155;
  --ink-soft: #475569;
  --ink-faint: #94A3B8;
  --paper: #F8FAFC;
  --paper-raised: #ffffff;
  --tint: #F1F5F9;          /* 중성 틴트 — 장식 배경 전용 */
  --line: #E2E8F0;
  --line-soft: #F1F5F9;
  --accent: #1663A8;        /* 신호 그린: CTA · 진행 · 활성 전용 */
  --accent-deep: #0B4171;
  --accent-wash: #EFF5FB;   /* 신호 배경 전용 */
  --gold: #B45309;          /* AL 뱃지 */
  --gold-wash: #FEF3C7;
  --hero-ink: #082F4F;      /* 딥 그린 — 브랜드 모먼트, 히어로 한 곳 */
  --hero-text: #F8FAFC;
  --hero-muted: #A9C6E3;

  /* type */
  --font: "Pretendard Variable", Pretendard, -apple-system, sans-serif;

  /* radius / shadow — 14–16 밴드, 그림자는 속삭이듯 */
  --r-sm: 12px;
  --r-md: 14px;
  --r-lg: 16px;
  --r-xl: 24px;
  --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-lift: 0 2px 4px rgba(15, 23, 42, 0.05), 0 12px 32px rgba(15, 23, 42, 0.08);
  --shadow-hero: 0 24px 64px rgba(8, 47, 79, 0.30);

  /* layout — 8pt 그리드 */
  --maxw: 1080px;
  --pad-x: 24px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum";
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad-x); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 249, 246, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: baseline; gap: 8px; }
.brand-ko { font-weight: 800; font-size: 17px; letter-spacing: -0.02em; }
.brand-en { font-size: 10px; font-weight: 600; letter-spacing: 0.18em; color: var(--ink-faint); }
.nav { display: flex; gap: 4px; align-items: center; }
.nav a {
  font-size: 14px; font-weight: 600; color: var(--ink-soft);
  padding: 8px 12px; border-radius: 8px; transition: background 0.15s, color 0.15s;
}
.nav a:hover { background: var(--line-soft); color: var(--ink); }
.nav .nav-cta {
  background: var(--ink); color: #fff; border-radius: 999px; padding: 8px 16px;
}
.nav .nav-cta:hover { background: var(--ink-2); color: #fff; }
@media (max-width: 760px) {
  .brand-en { display: none; }
  .site-header .wrap { gap: 10px; }
  .nav {
    flex: 1; min-width: 0; justify-content: flex-start;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; margin-left: 4px;
    mask-image: linear-gradient(to right, transparent, #000 12px, #000 calc(100% - 16px), transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 12px, #000 calc(100% - 16px), transparent);
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex: none; white-space: nowrap; padding: 9px 11px; }
}

/* ---------- hero (다크 히어로 카드) ---------- */
.hero-outer { padding: 28px var(--pad-x) 0; max-width: calc(var(--maxw) + 48px); margin: 0 auto; }
.hero {
  background: var(--hero-ink);
  color: var(--hero-text);
  border-radius: var(--r-lg);
  padding: 76px 64px 64px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-hero);
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(600px 300px at 85% -10%, rgba(14, 124, 91, 0.28), transparent 70%),
    radial-gradient(400px 240px at -5% 110%, rgba(168, 123, 35, 0.12), transparent 70%);
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.16em;
  color: var(--hero-muted); text-transform: uppercase;
  margin-bottom: 22px;
}
.hero-eyebrow::before {
  content: ""; width: 24px; height: 1px; background: var(--accent);
}
.hero h1 {
  font-size: clamp(34px, 5.4vw, 56px);
  font-weight: 800; letter-spacing: -0.035em; line-height: 1.16;
  max-width: 15em;
}
.hero h1 .u {
  color: #fff;
  background-image: linear-gradient(transparent 68%, rgba(14, 124, 91, 0.55) 68%);
}
.hero p.lede {
  margin-top: 24px; font-size: 18px; color: var(--hero-muted);
  max-width: 34em; line-height: 1.75;
}
.hero-actions { margin-top: 36px; display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 700; letter-spacing: -0.01em;
  padding: 13px 24px; border-radius: 999px; border: 1px solid transparent;
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 2px 12px rgba(14, 124, 91, 0.28); }
.btn:active { transform: scale(0.97); }
.btn { transition: transform 0.12s ease, box-shadow 0.15s, background 0.15s, border-color 0.15s; }
.btn-primary:hover { background: var(--accent-deep); }
.btn-ghost { border-color: rgba(255, 255, 255, 0.25); color: var(--hero-text); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.55); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--ink-2); }
.btn-outline { border-color: var(--line); color: var(--ink); background: var(--paper-raised); }
.btn-outline:hover { border-color: var(--ink-faint); }
.hero-proof {
  margin-top: 48px; padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex; gap: 40px; flex-wrap: wrap;
}
.proof-item .n { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.proof-item .l { font-size: 12.5px; color: var(--hero-muted); margin-top: 2px; }
@media (max-width: 760px) {
  .hero { padding: 52px 28px 40px; }
  .hero-proof { gap: 24px; }
}

/* ---------- sections ---------- */
.section { padding: 96px 0 8px; }
.section-head { margin-bottom: 40px; }
.eyebrow {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.16em;
  color: var(--ink-faint); text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.section-head h2 {
  font-size: clamp(24px, 3.4vw, 32px); font-weight: 800; letter-spacing: -0.03em;
}
.section-head p { margin-top: 8px; color: var(--ink-soft); max-width: 40em; }

/* ---------- 처방 카드 (콘텐츠 토픽 카드) ---------- */
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px 28px 24px;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s, border-color 0.18s;
  display: block;
}
a.card:hover { transform: translateY(-2px); border-color: var(--ink-faint);   box-shadow: var(--shadow-lift);
}
.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.card h3 { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.card p { font-size: 14px; color: var(--ink-soft); margin-top: 6px; line-height: 1.65; }

.pill {
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  padding: 4px 10px; border-radius: 999px;
}
.pill-free { background: var(--ink); color: var(--paper); }
.pill-sub { background: var(--line-soft); color: var(--ink-faint); }
.pill-ih { background: var(--tint); color: var(--ink-soft); }
.pill-al { background: var(--gold-wash); color: var(--gold); }

/* ---------- 본문 (MDX) ---------- */
.article { max-width: 720px; margin: 0 auto; padding: 56px var(--pad-x) 80px; }
.article-head { margin-bottom: 36px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.article-head h1 { font-size: clamp(28px, 4vw, 38px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.25; }
.article-head .meta { margin-top: 14px; display: flex; gap: 8px; align-items: center; }
.prose h2 {
  font-size: 22px; font-weight: 800; letter-spacing: -0.025em;
  margin: 44px 0 14px; padding-top: 8px;
}
.prose h3 { font-size: 17px; font-weight: 700; margin: 30px 0 10px; }
.prose p { margin: 14px 0; color: var(--ink-2); }
.prose ul, .prose ol { margin: 14px 0 14px 22px; color: var(--ink-2); }
.prose li { margin: 6px 0; }
.prose strong { font-weight: 700; color: var(--ink); }
.prose blockquote {
  margin: 20px 0; padding: 16px 20px;
  background: var(--paper-raised); border-left: 3px solid var(--accent);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  color: var(--ink-2); font-size: 15px;
}
.prose code {
  background: var(--line-soft); padding: 2px 7px; border-radius: 6px;
  font-size: 0.9em; font-family: inherit; font-weight: 600;
}
.prose hr { border: none; border-top: 1px solid var(--line); margin: 36px 0; }

/* ---------- Premium 게이팅 ---------- */
.premium-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--gold); background: var(--gold-wash);
  padding: 5px 12px; border-radius: 999px; margin: 26px 0 4px;
}
.premium-locked { position: relative; margin: 26px 0; }
.premium-locked .premium-content {
  filter: blur(7px); user-select: none; pointer-events: none;
  opacity: 0.55; max-height: 340px; overflow: hidden;
}
.premium-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; text-align: center;
  background: linear-gradient(180deg, transparent 0%, var(--paper) 78%);
  border-radius: var(--r-md); padding: 24px;
}
.premium-overlay .t { font-weight: 800; font-size: 17px; letter-spacing: -0.02em; }
.premium-overlay .d { font-size: 14px; color: var(--ink-soft); max-width: 26em; }

/* ---------- 후기 ---------- */
.review-card { display: flex; flex-direction: column; gap: 14px; }
.review-card .quote { font-size: 15px; line-height: 1.75; color: var(--ink-2); }
.review-card .who { font-size: 13px; color: var(--ink-faint); font-weight: 600; }
.review-card .who b { color: var(--accent-deep); font-weight: 700; }

/* ---------- 유튜브 ---------- */
.video-frame {
  aspect-ratio: 16 / 9; width: 100%;
  border: 1px solid var(--line); border-radius: var(--r-md);
  overflow: hidden; background: var(--ink);
}
.video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- 앱 배너 ---------- */
@media (max-width: 760px) { }

/* ---------- 가격 ---------- */

/* ---------- footer ---------- */
.site-footer {
  margin-top: 96px; border-top: 1px solid var(--line);
  padding: 36px 0 48px; color: var(--ink-faint); font-size: 13.5px;
}
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a:hover { color: var(--ink); }

/* focus */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px;
}

/* ---------- 훈련 (챌린지/트레이너) ---------- */
.trainer { max-width: 720px; margin: 0 auto; padding: 40px var(--pad-x) 80px; }
.trainer-head { margin-bottom: 24px; }
.trainer-head h1 { font-size: clamp(24px, 4vw, 32px); font-weight: 800; letter-spacing: -0.03em; }
.trainer-head p { margin-top: 8px; color: var(--ink-soft); font-size: 15px; }

.day-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 8px; margin: 20px 0 28px; }
@media (max-width: 620px) { .day-grid { grid-template-columns: repeat(6, 1fr); } }
.day-cell {
  aspect-ratio: 1; border: 1px solid var(--line); border-radius: 10px;
  background: var(--paper-raised); font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.12s, border-color 0.12s; position: relative;
}
.day-cell:hover { transform: translateY(-2px); border-color: var(--ink-faint); }
.day-cell.done { background: var(--accent-wash); border-color: var(--accent); color: var(--accent-deep); }
.day-cell.done::after { content: "✓"; position: absolute; top: 3px; right: 6px; font-size: 10px; }
.day-cell.today { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-wash); }

.progress-bar { height: 6px; background: var(--line-soft); border-radius: 99px; overflow: hidden; margin: 14px 0 6px; }
.progress-bar > div { height: 100%; background: var(--accent); border-radius: 99px; transition: width 0.3s; }
.progress-label { font-size: 13px; color: var(--ink-faint); font-weight: 600; font-feature-settings: "tnum"; }

.flashcard {
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-card); min-height: 300px; padding: 44px 36px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; cursor: pointer; user-select: none; position: relative;
}
.flashcard .fc-tag { position: absolute; top: 16px; left: 20px; font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.08em; color: var(--ink-faint); text-transform: uppercase; }
.flashcard .fc-num { position: absolute; top: 16px; right: 20px; font-size: 12px; font-weight: 700; color: var(--ink-faint); }
.flashcard .fc-main { font-size: clamp(19px, 3vw, 24px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.55; }
.flashcard .fc-sub { margin-top: 14px; font-size: 15px; color: var(--ink-soft); line-height: 1.7; }
.flashcard .fc-hint { position: absolute; bottom: 16px; font-size: 12.5px; color: var(--ink-faint); }
.flashcard.revealed { border-color: var(--accent); }
.flashcard .fc-en { color: var(--accent-deep); }

.trainer-controls { display: flex; gap: 10px; margin-top: 18px; justify-content: center; flex-wrap: wrap; }
.btn-again { background: var(--gold-wash); color: var(--gold); border: 1px solid transparent; }
.btn-again:hover { border-color: var(--gold); }
.btn-good { background: var(--accent); color: #fff; }
.btn-good:hover { background: var(--accent-deep); }
.btn-sm { padding: 10px 18px; font-size: 14px; border-radius: 999px; font-weight: 700; }

.trainer-done {
  text-align: center; padding: 60px 20px;
  background: var(--paper-raised); border: 1px solid var(--accent); border-radius: var(--r-lg);
}
.trainer-done .big { font-size: 40px; }
.trainer-done h2 { font-size: 24px; font-weight: 800; margin-top: 10px; letter-spacing: -0.02em; }
.trainer-done p { color: var(--ink-soft); margin-top: 8px; }

/* 읽기 모드 */
.reader-select { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
@media (max-width: 620px) { .reader-select { grid-template-columns: 1fr; } }
.reader-select select, .writer-input {
  font-family: inherit; font-size: 15px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper-raised);
  color: var(--ink); width: 100%;
}
.reader-sent {
  font-size: clamp(20px, 3.4vw, 27px); font-weight: 700; line-height: 1.6;
  letter-spacing: -0.015em; text-align: center; min-height: 130px;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.reader-meta { text-align: center; font-size: 13px; color: var(--ink-faint); font-weight: 600; }
.rate-group { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.rate-group button { border: 0; background: var(--paper-raised); padding: 8px 14px; font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.rate-group button.on { background: var(--ink); color: #fff; }

/* 작문 */
.writer-input { min-height: 90px; resize: vertical; line-height: 1.7; }
.writer-pattern {
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 22px; margin: 14px 0; box-shadow: var(--shadow-card);
}
.writer-pattern h3 { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.writer-pattern .wko { color: var(--ink-soft); font-size: 14px; margin-top: 4px; }
.writer-sample { margin-top: 12px; }
.writer-sample summary { cursor: pointer; font-size: 13.5px; font-weight: 700; color: var(--accent-deep); }
.writer-sample blockquote { margin-top: 10px; }
.saved-tag { font-size: 12px; color: var(--accent-deep); font-weight: 700; margin-left: 8px; }

/* ---------- 스크립트 해설 ---------- */
.script-notes {
  margin: 18px 0 6px; border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--paper-raised); overflow: hidden;
}
.script-notes summary {
  cursor: pointer; padding: 13px 18px; font-size: 14px; font-weight: 700;
  color: var(--accent-deep); list-style: none; display: flex; align-items: center; gap: 8px;
}
.script-notes summary::before { content: "▸"; transition: transform 0.15s; font-size: 12px; }
.script-notes[open] summary::before { transform: rotate(90deg); }
.script-notes summary::-webkit-details-marker { display: none; }
.script-notes .notes-body { padding: 4px 20px 18px; border-top: 1px solid var(--line-soft); }
.notes-label {
  font-size: 11.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-faint); margin: 16px 0 8px;
}
.notes-trans p { font-size: 14.5px; color: var(--ink-2); margin: 8px 0; line-height: 1.75; }
.notes-expr { list-style: none; margin: 0; }
.notes-expr li { font-size: 14px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); color: var(--ink-2); }
.notes-expr li:last-child { border-bottom: 0; }
.notes-expr b { color: var(--accent-deep); font-weight: 700; }
.notes-strategy {
  font-size: 14px; color: var(--ink-2); background: var(--tint);
  border-radius: var(--r-sm); padding: 12px 14px; line-height: 1.7;
}

/* 플래시카드 힌트박스 */
.fc-hintbox {
  margin-top: 14px; padding: 12px 16px; border-radius: var(--r-sm);
  background: var(--gold-wash); color: var(--gold); font-size: 14px; line-height: 1.7;
  border: 1px dashed rgba(168, 123, 35, 0.35); text-align: left;
}
.fc-hintbox .fc-masked { font-family: ui-monospace, Menlo, monospace; letter-spacing: 0.04em; font-size: 14.5px; }

/* ---------- 게이미피케이션 ---------- */
.gm-dash { margin-bottom: 36px; }
.gm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 760px) { .gm-grid { grid-template-columns: 1fr; } }
.gm-box {
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 18px 20px;
}
.gm-center { text-align: center; }
.gm-label { font-size: 11.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 8px; }
.gm-big { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.gm-unit { font-size: 15px; font-weight: 600; color: var(--ink-faint); margin-left: 4px; }
.gm-rank { display: flex; align-items: center; gap: 8px; font-size: 24px; }
.gm-rank-i { color: var(--accent); font-size: 18px; }
.gm-stat { font-size: 13px; margin-top: 8px; font-weight: 500; }
.gm-ok { color: var(--accent-deep); }
.gm-mute { color: var(--ink-faint); }
.gm-mini { font-size: 12.5px; color: var(--ink-faint); margin-top: 8px; }
.gm-ring { width: 92px; height: 92px; margin: 4px auto 2px; display: block; }
.gm-ring-num { font-size: 24px; font-weight: 700; fill: var(--ink); font-family: inherit; }
.gm-tpbar { height: 7px; border-radius: 99px; background: var(--line-soft); overflow: hidden; margin-top: 12px; }
.gm-tpbar > div { height: 100%; background: var(--accent); border-radius: 99px; transition: width 0.4s; }
.gm-badges { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.gm-bd {
  padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--paper-raised); font-size: 12.5px; font-weight: 600;
  color: var(--ink-faint); opacity: 0.5; cursor: default;
}
.gm-bd.got { opacity: 1; color: var(--accent-deep); border-color: var(--accent); background: var(--accent-wash); }

/* 토스트 */
.gm-toasts { position: fixed; right: 18px; bottom: 18px; z-index: 999; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.gm-toast {
  background: var(--ink); color: #fff; font-size: 13px; font-weight: 700;
  padding: 9px 15px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  opacity: 0; transform: translateY(8px); transition: all 0.3s; max-width: 260px; line-height: 1.5;
}
.gm-toast.on { opacity: 1; transform: translateY(0); }
.gm-toast span { font-weight: 500; font-size: 12px; opacity: 0.85; }
.gm-toast.gm-streak { background: var(--accent-deep); }
.gm-toast.gm-rank { background: linear-gradient(135deg, #0F2A44, #1663A8); font-size: 14px; }
.gm-toast.gm-badge { background: var(--gold); }

/* ---------- 로그인 / 동의 ---------- */
.auth-login {
  font-family: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer;
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--paper-raised); color: var(--ink);
}
.auth-login:hover { border-color: var(--accent); color: var(--accent-deep); }
.auth-wrap { position: relative; display: inline-block; }
.auth-chip {
  font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 13px 5px 6px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--paper-raised); color: var(--ink);
}
.auth-chip img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.auth-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 160px; z-index: 90;
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: 0 12px 32px rgba(0,0,0,0.12); padding: 8px; text-align: left;
}
.auth-menu-name { font-size: 12.5px; color: var(--ink-faint); font-weight: 700; padding: 6px 10px; border-bottom: 1px solid var(--line-soft); margin-bottom: 4px; }
.auth-menu button {
  font-family: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; width: 100%;
  text-align: left; padding: 8px 10px; border: 0; background: none; border-radius: 8px; color: var(--ink);
}
.auth-menu button:hover { background: var(--accent-wash); color: var(--accent-deep); }

.auth-overlay {
  position: fixed; inset: 0; z-index: 200; background: rgba(20, 24, 29, 0.45);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.auth-modal {
  background: var(--paper-raised); border-radius: 20px; padding: 30px 30px 24px;
  width: 100%; max-width: 420px; box-shadow: 0 24px 64px rgba(0,0,0,0.25); position: relative;
}
.auth-modal-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 0.16em; color: var(--accent-deep); margin-bottom: 8px; }
.auth-modal h3 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 6px; }
.auth-modal-sub { font-size: 14px; color: var(--ink-2); margin: 0 0 18px; line-height: 1.6; }
.consent-row {
  display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--ink-2);
  padding: 7px 2px; cursor: pointer;
}
.consent-row input { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; }
.consent-row a { margin-left: auto; font-size: 12.5px; color: var(--ink-faint); text-decoration: underline; }
.consent-all { font-size: 15px; color: var(--ink); }
.consent-divider { height: 1px; background: var(--line-soft); margin: 4px 0 6px; }
.btn-kakao {
  font-family: inherit; font-size: 15px; font-weight: 800; cursor: pointer; width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 16px; padding: 14px; border: 0; border-radius: 12px;
  background: #FEE500; color: #191919; transition: opacity 0.15s;
}
.btn-kakao:disabled { opacity: 0.4; cursor: not-allowed; }
.auth-close {
  font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; width: 100%;
  margin-top: 8px; padding: 10px; border: 0; background: none; color: var(--ink-faint);
}
.auth-fine { font-size: 11.5px; color: var(--ink-faint); line-height: 1.6; margin: 10px 0 0; }

/* ---------- 푸터 법적 표기 / 법적 문서 ---------- */
.footer-legal {
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-soft);
  font-size: 11.5px; color: var(--ink-faint); display: flex; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; line-height: 1.7;
}
.footer-legal a { color: var(--ink-faint); }
.footer-legal a strong { font-weight: 800; }
.legal-doc h2 { font-size: 17px; margin-top: 34px; }
.legal-doc p { font-size: 14px; line-height: 1.85; }
.legal-doc table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 14px 0; display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
.legal-doc table tbody { display: table; width: 100%; min-width: 480px; }
.legal-doc th, .legal-doc td { border: 1px solid var(--line); padding: 9px 11px; text-align: left; line-height: 1.6; }
.legal-doc th { background: var(--paper); font-weight: 700; }
.legal-contact { margin-top: 32px; padding: 16px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); font-size: 13.5px; }
/* ---------- 문장 조립 ---------- */
.builder-setup {
  max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px;
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 26px 28px;
}
.builder-field { display: flex; flex-direction: column; gap: 8px; }
.builder-field > label { font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); }
.builder-field .trainer-select { width: 100%; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; align-self: flex-start; }
.seg button {
  font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  padding: 9px 18px; border: 0; background: var(--paper-raised); color: var(--ink-2);
  border-right: 1px solid var(--line);
}
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--accent-deep); color: #fff; }
.builder-diff-desc { font-size: 12.5px; color: var(--ink-faint); }
.builder-nodata { text-align: center; font-size: 13px; color: var(--gold); margin-top: 16px; }

.builder-stage { max-width: 600px; margin: 0 auto; }

/* 상단 네비 바 */
.builder-nav { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.builder-back {
  font-family: inherit; font-size: 24px; line-height: 1; font-weight: 400; cursor: pointer;
  width: 40px; height: 40px; flex: none; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 12px; background: var(--paper-raised); color: var(--ink-2);
  padding-bottom: 3px;
}
.builder-back:hover { border-color: var(--accent); color: var(--accent-deep); }
.builder-nav .trainer-progress { flex: 1; margin: 0; }
.builder-counter { font-size: 13px; font-weight: 700; color: var(--ink-faint); min-width: 44px; text-align: right; }
.builder-subline { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; padding: 0 2px; }
.builder-subline > span:first-child { font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em; color: var(--ink-faint); }
.builder-tp {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700;
  color: var(--accent-deep); background: var(--tint); padding: 4px 11px; border-radius: 99px;
}

/* 프롬프트 카드 */
.builder-prompt-card {
  text-align: center; background: var(--paper-raised); border: 1px solid var(--line);
  border-radius: 16px; padding: 24px 22px; margin-bottom: 18px;
}
.builder-prompt-label { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 11px; }
.builder-prompt { min-height: 30px; }
.builder-ko { font-size: 20px; font-weight: 700; color: var(--ink); line-height: 1.55; }
.builder-ko-audio { color: var(--ink-faint); font-weight: 600; }
.builder-ko-sub { display: block; font-size: 15px; font-weight: 500; color: var(--ink-faint); margin-top: 6px; }
.builder-audio-btn {
  font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer; margin-top: 14px;
  height: 34px; padding: 0 14px; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink-2);
}
.builder-audio-btn:hover { border-color: var(--accent); color: var(--accent-deep); }

/* 정답 영역 + 커서 */
.builder-answer {
  min-height: 76px; background: var(--paper); border: 1px solid var(--line);
  border-radius: 12px; padding: 15px 17px; display: flex; flex-wrap: wrap; gap: 8px;
  align-items: center; align-content: flex-start; transition: box-shadow 0.3s, border-color 0.3s;
}
.builder-ok { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-wash); }
.builder-word {
  font-size: 16px; font-weight: 600; color: var(--accent-deep); background: var(--accent-wash);
  border-radius: 8px; padding: 6px 11px; line-height: 1.4;
}
.builder-cursor {
  width: 2px; height: 24px; background: var(--accent); border-radius: 2px;
  animation: bd-blink 1s step-start infinite;
}
@keyframes bd-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* 칩 */
.builder-chips { display: flex; flex-wrap: wrap; gap: 9px; margin: 18px 0 8px; justify-content: center; }
.chip {
  font-family: inherit; font-size: 16px; font-weight: 600; cursor: pointer;
  min-height: 46px; padding: 11px 16px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--paper-raised); color: var(--ink); box-shadow: 0 2px 0 var(--line);
  transition: transform 0.1s; touch-action: manipulation;
}
.chip:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-deep); }
.chip:active:not(:disabled) { transform: translateY(2px); box-shadow: none; }
.chip.used { opacity: 0.18; cursor: default; box-shadow: none; }
.chip.shake { animation: chipshake 0.35s; border-color: #c0392b; color: #c0392b; }
@keyframes chipshake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-5px)} 75%{transform:translateX(5px)} }

/* 하단 툴바 */
.builder-toolbar {
  display: flex; gap: 8px; justify-content: center; align-items: center;
  border-top: 1px solid var(--line-soft); padding-top: 16px; margin-top: 4px;
}
.builder-tool {
  font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
  height: 38px; padding: 0 15px; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--paper-raised); color: var(--ink-2);
}
.builder-tool:hover { border-color: var(--accent); color: var(--accent-deep); }
.builder-tool-quit { color: #c0392b; margin-left: auto; }
.builder-tool-quit:hover { border-color: #c0392b; color: #c0392b; background: #fdf0ee; }

@media (max-width: 560px) {
  .builder-ko { font-size: 18px; }
  .chip { font-size: 15px; padding: 10px 14px; }
  .builder-toolbar { flex-wrap: wrap; }
  .builder-tool-quit { margin-left: 0; }
}

/* ---------- 자료실 레벨 탭 ---------- */
.lvl-tabs { display: flex; gap: 10px; margin: 4px 0 28px; flex-wrap: wrap; }
.lvl-tabs button {
  font-family: inherit; cursor: pointer; text-align: left; flex: 1; min-width: 200px;
  display: flex; flex-direction: column; gap: 3px; padding: 15px 20px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper-raised);
  transition: border-color 0.15s, background 0.15s;
}
.lvl-tabs button:hover { border-color: var(--accent); }
.lvl-tabs button.on { border-color: var(--accent); background: var(--accent-wash); border-width: 1.5px; }
.lvl-tab-name { font-size: 17px; font-weight: 800; color: var(--ink); letter-spacing: 0.01em; }
.lvl-tabs button.on .lvl-tab-name { color: var(--accent-deep); }
.lvl-tab-desc { font-size: 13px; color: var(--ink-faint); font-weight: 500; }

.lvl-note { font-size: 13px; color: var(--ink-faint); margin-top: 20px; text-align: center; }
.lvl-note a { color: var(--accent-deep); font-weight: 600; }
.card-more { margin-top: 12px; font-size: 13px; color: var(--ink-faint); font-weight: 600; }

/* 준비 중 카드 */

/* ---------- 학습 시작 온보딩 ---------- */
.start-grid { margin-top: 8px; }
.start-card {
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 26px 28px; display: flex; flex-direction: column;
}
.start-card-feat { border-color: var(--accent); border-width: 1.5px; }
.start-badge {
  align-self: flex-start; font-size: 12px; font-weight: 800; letter-spacing: 0.04em;
  padding: 5px 12px; border-radius: 999px; margin-bottom: 14px;
}
.start-badge-basic { background: var(--gold-wash); color: var(--gold); }
.start-badge-core { background: var(--tint); color: var(--ink-soft); }
.start-card h3 { font-size: 20px; font-weight: 800; margin: 0 0 8px; letter-spacing: -0.01em; }
.start-card > p { font-size: 14px; line-height: 1.7; color: var(--ink-2); margin: 0 0 16px; }
.start-list { list-style: none; padding: 0; margin: 0 0 22px; display: flex; flex-direction: column; gap: 9px; }
.start-list li { font-size: 13.5px; color: var(--ink-2); padding-left: 22px; position: relative; line-height: 1.5; }
.start-list li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 800; }
.start-list strong { color: var(--ink); font-weight: 700; }
.start-btn { margin-top: auto; text-align: center; }
.start-foot { text-align: center; margin-top: 28px; }
.start-foot p { font-size: 13.5px; color: var(--ink-faint); }
.start-foot a { color: var(--accent-deep); font-weight: 600; }

/* ---------- 기초 문법 (Day 페이지) ---------- */
.gr-page { max-width: 640px; margin: 0 auto; padding: 0 20px 60px; }

/* 히어로 */
.gr-hero {
  background: #082F4F; border-radius: 18px; padding: 26px 26px 24px;
  margin: 24px 0 30px;
}
.gr-hero-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 0.12em; color: #5DCAA5; margin-bottom: 12px; }
.gr-hero-title { font-size: 26px; font-weight: 800; color: #fff; margin: 0 0 5px; letter-spacing: -0.01em; }
.gr-hero-sub { font-size: 15px; color: #9FE1CB; font-weight: 500; }
.gr-hero-pills { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 16px; }
.gr-hero-pills span {
  font-size: 11.5px; font-weight: 600; color: #E1F5EE;
  background: rgba(255,255,255,0.14); padding: 5px 12px; border-radius: 999px;
}

/* 섹션 */
.gr-sec { margin-bottom: 34px; }
.gr-sechead {
  display: flex; align-items: center; gap: 9px;
  font-size: 12.5px; font-weight: 800; letter-spacing: 0.04em; color: var(--accent-deep);
  margin-bottom: 14px;
}
.gr-secicon {
  width: 28px; height: 28px; flex: none; border-radius: 9px; background: var(--tint);
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.gr-sechead-warn { color: #A32D2D; }
.gr-sechead-warn .gr-secicon { background: #FCEBEB; }

.gr-intro { font-size: 14.5px; line-height: 1.8; color: var(--ink-2); margin: 0; }
.gr-intro strong { color: var(--ink); font-weight: 700; }

/* 규칙 카드 */
.gr-rules { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.gr-rule { display: flex; align-items: baseline; gap: 12px; padding: 12px 15px; font-size: 13.5px; }
.gr-rule + .gr-rule { border-top: 1px solid var(--line-soft); }
.gr-rule-a { flex: none; width: 92px; font-weight: 700; color: var(--ink); }
.gr-rule-b { flex: none; width: 52px; color: var(--accent-deep); font-weight: 600; font-size: 12.5px; }
.gr-rule-c { flex: 1; color: var(--ink-2); line-height: 1.5; }
.gr-rule-c b { color: var(--accent-deep); font-weight: 700; }
.gr-tip {
  font-size: 13.5px; line-height: 1.7; color: var(--gold);
  background: var(--gold-wash); border-radius: 10px; padding: 12px 15px; margin-top: 12px;
}
.gr-tip b { font-weight: 700; }

/* 예문 카드 */
.gr-exs { display: flex; flex-direction: column; gap: 9px; }
.gr-ex {
  display: flex; align-items: flex-start; gap: 11px;
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 15px;
}
.gr-tag {
  flex: none; font-size: 11px; font-weight: 700; color: var(--ink-soft);
  background: var(--tint); padding: 4px 10px; border-radius: 999px; margin-top: 2px;
  min-width: 46px; text-align: center;
}
.gr-ex-body { flex: 1; min-width: 0; }
.gr-ex-en { font-size: 15.5px; font-weight: 600; color: var(--ink); line-height: 1.5; }
.gr-ex-en b { color: var(--accent-deep); }
.gr-ex-ko { font-size: 12.5px; color: var(--ink-faint); margin-top: 3px; }
.gr-tts {
  flex: none; cursor: pointer; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink-2);
  display: flex; align-items: center; justify-content: center; transition: all 0.15s;
}
.gr-tts:hover { border-color: var(--accent); color: var(--accent-deep); }
.gr-tts.playing { background: var(--accent); color: #fff; border-color: var(--accent); }

/* 오류 교정 */
.gr-errs { display: flex; flex-direction: column; gap: 10px; }
.gr-err { border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; }
.gr-err-x {
  font-size: 14.5px; color: #A32D2D; text-decoration: line-through;
  text-decoration-color: rgba(163,45,45,0.4);
}
.gr-err-o { font-size: 14.5px; color: var(--accent-deep); font-weight: 600; margin: 4px 0 7px; }
.gr-err-o b { font-weight: 800; }
.gr-err-x b { font-weight: 700; }
.gr-err-why { font-size: 12.5px; color: var(--ink-faint); line-height: 1.6; }

/* 미니 연습 */
.gr-quiz-guide { font-size: 13px; color: var(--ink-faint); margin: 0 0 12px; }
.gr-quiz { padding: 14px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; }
.gr-q { font-size: 14.5px; color: var(--ink); line-height: 1.65; margin-bottom: 11px; }
.gr-reveal {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 700; color: var(--ink-2);
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 15px; transition: all 0.15s;
}
.gr-reveal:hover { border-color: var(--accent); color: var(--accent-deep); }
.gr-reveal.on { background: var(--accent-wash); color: var(--accent-deep); border-color: var(--accent); }
.gr-ans {
  margin-top: 11px; background: var(--accent-wash); border-radius: 9px;
  padding: 11px 15px; font-size: 15px; font-weight: 600; color: var(--accent-deep); line-height: 1.5;
}
.gr-ans b { font-weight: 800; }
.gr-ans[hidden] { display: none; }

/* 네비 */
.gr-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 40px; }
.gr-navbtn {
  font-size: 13.5px; font-weight: 700; text-decoration: none;
  padding: 11px 18px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--paper-raised); color: var(--ink-2); transition: all 0.15s;
}
.gr-navbtn:hover { border-color: var(--accent); color: var(--accent-deep); }
.gr-navbtn-on { background: var(--accent-deep); color: #fff; border-color: var(--accent-deep); }
.gr-navbtn-on:hover { color: #fff; opacity: 0.92; }

/* ---------- 기초 문법 허브 ---------- */
.gr-stage { margin-bottom: 30px; }
.gr-stage-head { margin-bottom: 15px; }
.gr-stage-num {
  display: inline-block; font-size: 11.5px; font-weight: 800; letter-spacing: 0.1em;
  color: var(--ink-soft); background: var(--tint); padding: 4px 12px;
  border-radius: 999px; margin-bottom: 9px;
}
.gr-stage-head h3 { font-size: 20px; font-weight: 800; margin: 0 0 4px; letter-spacing: -0.01em; }
.gr-stage-head p { font-size: 13.5px; color: var(--ink-faint); margin: 0; }

@media (max-width: 560px) {
  .gr-page { padding: 0 16px 50px; }
  .gr-hero { padding: 22px 20px 20px; }
  .gr-hero-title { font-size: 23px; }
  .gr-rule { flex-wrap: wrap; }
  .gr-rule-c { flex-basis: 100%; margin-top: 2px; }
}

/* ---------- 기초 표현 (아코디언) ---------- */
.be-guide {
  background: var(--tint); border-radius: 12px; padding: 16px 18px; margin-bottom: 24px;
}
.be-guide p { font-size: 14px; line-height: 1.75; color: var(--ink-2); margin: 0; }
.be-guide strong { color: var(--accent-deep); font-weight: 700; }

.be-cat { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 12px; }
.be-cathead {
  width: 100%; display: flex; align-items: center; gap: 11px; cursor: pointer;
  font-family: inherit; background: var(--paper-raised); border: 0; padding: 16px 18px;
  text-align: left; transition: background 0.15s;
}
.be-cathead:hover { background: var(--accent-wash); }
.be-cathead.on { background: var(--accent-wash); }
.be-caticon {
  width: 34px; height: 34px; flex: none; border-radius: 10px; background: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 17px;
  border: 1px solid var(--line);
}
.be-cattitle { flex: 1; font-size: 15px; font-weight: 700; color: var(--ink); }
.be-catcount { font-size: 12px; font-weight: 600; color: var(--ink-faint); }
.be-catarrow { font-size: 20px; color: var(--ink-faint); transition: transform 0.2s; margin-left: 4px; }
.be-cathead.on .be-catarrow { transform: rotate(180deg); color: var(--accent-deep); }
.be-catbody { padding: 8px 14px 14px; }
.be-catbody[hidden] { display: none; }

.be-item {
  display: flex; align-items: flex-start; gap: 11px; padding: 11px 8px;
  border-bottom: 1px solid var(--line-soft);
}
.be-item:last-child { border-bottom: 0; }
.be-num {
  flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--tint);
  color: var(--ink-soft); font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; margin-top: 1px;
}
.be-body { flex: 1; min-width: 0; }
.be-en { font-size: 15.5px; font-weight: 600; color: var(--ink); line-height: 1.5; }
.be-ko { font-size: 13px; color: var(--ink-faint); margin-top: 2px; }

/* ---------- 기초 스크립트 ---------- */
.bs-group { margin-bottom: 32px; }
.bs-grouphead { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.bs-groupicon {
  width: 32px; height: 32px; flex: none; border-radius: 10px; background: var(--tint);
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.bs-groupname { flex: 1; font-size: 17px; font-weight: 800; color: var(--ink); margin: 0; letter-spacing: -0.01em; }
.bs-groupcount { font-size: 12.5px; font-weight: 600; color: var(--ink-faint); }
.bs-cards { display: flex; flex-direction: column; gap: 11px; }
.bs-card {
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 18px;
}
.bs-cardhead { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.bs-cardnum {
  flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--accent-deep);
  color: #fff; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.bs-cardtitle { flex: 1; font-size: 14.5px; font-weight: 700; color: var(--ink); margin: 0; }
.bs-play {
  flex: none; cursor: pointer; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink-2);
  display: flex; align-items: center; justify-content: center; transition: all 0.15s;
}
.bs-play:hover { border-color: var(--accent); color: var(--accent-deep); }
.bs-play.playing { background: var(--accent); color: #fff; border-color: var(--accent); }
.bs-lines { display: flex; flex-direction: column; gap: 9px; }
.bs-line { padding-left: 13px; border-left: 2px solid var(--line); }
.bs-en { font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.55; }
.bs-ko { font-size: 12.5px; color: var(--ink-faint); margin-top: 2px; }

/* ---------- 기초 단어 ---------- */
.voc-tabs { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 22px; }
.voc-tab {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font-family: inherit; font-size: 13.5px; font-weight: 700; color: var(--ink-2);
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 14px; transition: all 0.15s;
}
.voc-tab:hover { border-color: var(--accent); }
.voc-tab.on { background: var(--accent-deep); color: #fff; border-color: var(--accent-deep); }
.voc-tab-i { font-size: 15px; }
.voc-tab-c {
  font-size: 11px; font-weight: 700; background: rgba(0,0,0,0.08); border-radius: 99px;
  padding: 1px 7px; margin-left: 2px;
}
.voc-tab.on .voc-tab-c { background: rgba(255,255,255,0.22); }
.voc-panel[hidden] { display: none; }
.voc-subhead {
  font-size: 13px; font-weight: 800; color: var(--accent-deep); letter-spacing: 0.04em;
  margin: 22px 0 12px; padding-bottom: 7px; border-bottom: 2px solid var(--line);
}
.voc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
@media (max-width: 720px) { .voc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 440px) { .voc-grid { grid-template-columns: 1fr; } }
.voc-card {
  cursor: pointer; text-align: left; font-family: inherit;
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 15px; transition: all 0.12s;
}
.voc-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.voc-card.playing { background: var(--accent-wash); border-color: var(--accent); }
.voc-en {
  font-size: 15.5px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 6px;
}
.voc-spk { color: var(--ink-faint); display: inline-flex; }
.voc-card:hover .voc-spk { color: var(--accent-deep); }
.voc-pron { font-size: 12px; color: var(--accent-deep); margin-top: 3px; font-weight: 500; }
.voc-ko { font-size: 13.5px; color: var(--ink-2); margin-top: 4px; }

/* ---------- 홈 레벨 카드 ---------- */
.home-lvl-card .card-more { margin-top: 14px; font-size: 13.5px; font-weight: 700; color: var(--accent-deep); }
.home-lvl-card strong { color: var(--ink); font-weight: 700; }

/* ---------- 스크립트 해설: 훔칠 문장 ---------- */
.notes-pick { padding: 12px 14px; background: var(--accent-wash); border-radius: 10px; }
.pick-quote { display: block; font-size: 14.5px; font-weight: 700; color: var(--accent-deep); line-height: 1.6; font-style: italic; }
.pick-quote::before { content: "“"; }
.pick-quote::after { content: "”"; }
.pick-coach { display: block; font-size: 13px; color: var(--ink-2); line-height: 1.7; margin-top: 7px; }

/* ---------- 네비 활성 상태 (신호 그린) ---------- */
.nav a.nav-on { color: var(--accent-deep); font-weight: 700; }
.nav a.nav-on:hover { color: var(--accent-deep); }

/* ═══════════ 디자인 시스템 v2 — 화면별 컴포넌트 ═══════════ */

/* 히어로 XL */
.hero-xl { padding: 104px 64px 80px; }
.hero-xl .lede { font-size: 19px; }
.btn-xl { font-size: 16px; padding: 16px 30px; }
@media (max-width: 760px) { .hero-xl { padding: 64px 28px 48px; } }

/* 행 리스트 — 카드 대신 (Apple Settings) */
.row-list { border-top: 1px solid var(--line); }
.row-item {
  display: flex; align-items: center; gap: 16px;
  padding: 22px 8px; border-bottom: 1px solid var(--line);
  transition: background 0.15s;
}
.row-item:hover { background: var(--tint); }
.row-item:active { background: var(--line-soft); }
.row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.row-title { font-size: 16.5px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.row-new {
  font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: 0.08em;
  color: var(--accent-deep); background: var(--accent-wash);
  padding: 2px 7px; border-radius: 99px; vertical-align: 2px; margin-left: 4px;
}
.row-sub { font-size: 13.5px; color: var(--ink-faint); }
.row-go { color: var(--ink-faint); font-size: 17px; transition: transform 0.15s, color 0.15s; }
.row-item:hover .row-go { transform: translateX(3px); color: var(--accent-deep); }

/* 인용 한 점 */
.pull-quote { max-width: 640px; margin: 0; }
.pull-quote blockquote {
  font-size: clamp(20px, 3vw, 26px); font-weight: 600; line-height: 1.55;
  letter-spacing: -0.02em; color: var(--ink); margin: 0;
}
.pull-quote figcaption { margin-top: 20px; font-size: 14px; color: var(--ink-faint); }
.quote-more { margin-left: 14px; color: var(--accent-deep); font-weight: 600; }

/* 홈 마무리 */
.home-close { padding-bottom: 72px; }
.home-close-sub { color: var(--ink-faint); margin-top: 10px; }

/* 커버 선반 — 학습의 넷플릭스 */
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.cover-tile {
  display: flex; flex-direction: column; justify-content: flex-end;
  aspect-ratio: 3 / 3.6; border-radius: var(--r-lg); padding: 24px 22px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.cover-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.cover-deep { background: linear-gradient(160deg, #0C3B63, #082F4F); }
.cover-deep .cover-count { color: rgba(245, 244, 240, 0.28); }
.cover-deep .cover-name { color: #f5f4f0; }
.cover-deep .cover-meta { color: #a3bcb2; }
.cover-soft { background: var(--tint); border: 1px solid var(--line); }
.cover-soft .cover-count { color: rgba(28, 27, 24, 0.10); }
.cover-soft .cover-name { color: var(--ink); }
.cover-soft .cover-meta { color: var(--ink-faint); }
.cover-count {
  font-size: clamp(44px, 6vw, 64px); font-weight: 800; letter-spacing: -0.04em;
  line-height: 1; font-variant-numeric: tabular-nums; margin-bottom: auto;
}
.cover-name { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; margin-top: 20px; }
.cover-meta { font-size: 12.5px; margin-top: 5px; }


/* 이어서 보기 */
.recent-strip { margin-bottom: 28px; }
.recent-label { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; color: var(--ink-faint); text-transform: uppercase; margin-bottom: 10px; }
.recent-items { display: flex; gap: 8px; flex-wrap: wrap; }
.recent-chip {
  font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  background: var(--paper-raised); border: 1px solid var(--line);
  padding: 9px 15px; border-radius: 999px; transition: border-color 0.15s;
}
.recent-chip:hover { border-color: var(--accent); color: var(--accent-deep); }

/* 이어서 훈련 — 대시보드 최상단 CTA */

/* 멤버십 — 주인공 플랜 */
.plan-flag {
  position: absolute; top: -13px; left: 32px;
  background: var(--ink); color: var(--paper);
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em;
  padding: 6px 14px; border-radius: 999px;
}
.plan-name { font-size: 14px; font-weight: 700; color: var(--ink-faint); letter-spacing: 0.06em; }
.plan-amount { font-size: clamp(40px, 6vw, 52px); font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin-top: 6px; }
.plan-amount small { font-size: 20px; font-weight: 700; color: var(--ink-soft); }
.plan-per { font-size: 14px; color: var(--ink-faint); margin-top: 2px; }
.plan-list { list-style: none; padding: 0; margin: 28px 0 0; }
.plan-list li { padding: 11px 0 11px 26px; position: relative; font-size: 15px; color: var(--ink-2); border-bottom: 1px solid var(--line-soft); }
.plan-list li:last-child { border-bottom: 0; }
.plan-list li::before { content: "✓"; position: absolute; left: 2px; color: var(--accent); font-weight: 800; }
.plan-cta { margin-top: 28px; width: 100%; justify-content: center; opacity: 0.92; cursor: default; }
.plan-foot { margin-top: 20px; font-size: 13px; color: var(--ink-faint); }

/* 모바일 하단 탭바 — 네이티브 내비게이션 */
.tabbar { display: none; }
@media (max-width: 760px) {
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: rgba(250, 249, 247, 0.92); backdrop-filter: blur(16px);
    border-top: 1px solid var(--line-soft);
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  }
  .tabbar a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    font-size: 10.5px; font-weight: 700; color: var(--ink-faint);
    padding: 4px 0; border-radius: 10px; transition: color 0.15s;
  }
  .tabbar .tab-i { font-size: 19px; line-height: 1; }
  .tabbar a.on { color: var(--accent-deep); }
  body { padding-bottom: 74px; }
  .site-footer { margin-bottom: 0; }
}

/* 플래시카드 — 프리미엄 암기 경험 */
.flashcard {
  min-height: 300px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  border-radius: var(--r-xl) !important;
  transform-style: preserve-3d; perspective: 900px;
  transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1), background 0.3s, border-color 0.3s;
}
.flashcard .fc-main {
  font-size: clamp(24px, 4.4vw, 34px); font-weight: 800;
  letter-spacing: -0.02em; line-height: 1.4; max-width: 18em;
}
.flashcard.revealed { animation: fc-flip 0.4s cubic-bezier(0.34, 1.3, 0.64, 1); }
@keyframes fc-flip {
  0% { transform: rotateX(70deg); opacity: 0.2; }
  100% { transform: rotateX(0); opacity: 1; }
}
@media (max-width: 560px) { .flashcard { min-height: 240px; } }

/* 스크립트 리딩 — 문서에서 읽기 경험으로 */
.prose blockquote, article blockquote {
  background: transparent; border: 0; border-left: 3px solid var(--accent);
  border-radius: 0; padding: 4px 0 4px 20px; margin: 28px 0 20px;
  font-size: 16.5px; font-weight: 600; color: var(--ink-2); line-height: 1.7;
}
.script-notes {
  border: 0; border-radius: var(--r-md); background: var(--tint);
  padding: 4px 18px; margin: 16px 0 36px;
}
.script-notes summary {
  cursor: pointer; font-size: 13.5px; font-weight: 700; color: var(--ink-soft);
  padding: 12px 0; list-style: none;
}
.script-notes summary::before { content: "▸ "; color: var(--ink-faint); }
.script-notes[open] summary::before { content: "▾ "; }
.script-notes .notes-body { padding-bottom: 16px; }

/* 훈련 대시보드 — 조용한 상자, 빛나는 링 */
.gm-box { border: 1px solid var(--line) !important; box-shadow: none !important; background: var(--paper-raised) !important; border-radius: var(--r-lg) !important; }
.gm-big { font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.gm-ring-num { font-variant-numeric: tabular-nums; }


/* ═══════════ v2.1 — 클리닉 아이덴티티 ═══════════ */

/* 세리프 보이스: 브랜드가 말하는 순간에만 */
.hero h1 { font-weight: 800; }





/* ✚ 시그니처 — 치료 브랜드의 최소 마크 */
.brand-ko::after {
  content: "✚"; font-size: 0.5em; color: var(--accent);
  vertical-align: super; margin-left: 3px; font-weight: 800;
}
.eyebrow::before { content: "✚ "; color: var(--accent); font-size: 0.9em; }
.hero-eyebrow::before { display: none; }

/* 히어로 스탯 — 상자 문법 지우고 조용한 한 줄로 */
.hero-proof { gap: 0; }
.proof-item { padding: 0 28px; border-left: 1px solid rgba(255,255,255,0.12); }
.proof-item:first-child { padding-left: 0; border-left: 0; }

@media (max-width: 560px) {
  .proof-item { padding: 0 16px; }
}

/* 훈련 대시보드 — 상자들을 하나의 차트 스트립으로 */
.gm-grid { gap: 0 !important; }
.gm-box, .gm-stat {
  border: 0 !important; border-radius: 0 !important; background: transparent !important;
  border-left: 1px solid var(--line) !important; padding: 6px 22px !important;
}
.gm-grid > :first-child { border-left: 0 !important; padding-left: 0 !important; }
.gm-dash { padding: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.gm-dash:empty { display: none; border: 0; padding: 0; }
.gm-big { font-size: 34px !important; }

/* ═══════════ v2.2 — 앱 홈 대시보드 (목업 청사진) ═══════════ */
.dash-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
.dash-greet { font-size: clamp(26px, 4vw, 34px); font-weight: 800; letter-spacing: -0.025em; }
.dash-sub { color: var(--ink-faint); font-size: 15px; margin-top: 6px; }
.dash-streak {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 18px; font-size: 14px; font-weight: 700; color: var(--ink-2);
  box-shadow: var(--shadow-card);
}
.dash-streak b { color: var(--accent-deep); font-variant-numeric: tabular-nums; }
.dash-grid { display: grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: start; }
@media (max-width: 860px) { .dash-grid { grid-template-columns: 1fr; } }
.dash-label { font-size: 13px; font-weight: 800; letter-spacing: 0.02em; color: var(--ink-soft); margin: 32px 0 14px; }
.dash-empty { font-size: 14px; color: var(--ink-faint); padding: 18px 4px; }

/* 계속해서 학습하기 */
.dash-continue {
  display: block; background: var(--paper-raised); border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: 26px 28px; box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s, transform 0.2s;
}
.dash-continue:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.dc-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.dc-label { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; }
.dc-meta { font-size: 12.5px; font-weight: 600; color: var(--ink-faint); }
.dc-body { display: flex; align-items: flex-end; gap: 24px; margin-top: 18px; flex-wrap: wrap; }
.dc-progress { flex: 1; min-width: 200px; }
.dc-pct { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.dc-pct small { font-size: 20px; color: var(--ink-soft); }
.dc-progress .progress-bar { margin-top: 12px; }
.dc-count { font-size: 12.5px; color: var(--ink-faint); margin-top: 8px; }

/* 빠른 시작 타일 */
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 720px) { .quick-grid { grid-template-columns: repeat(2, 1fr); } }
.quick-tile {
  position: relative; display: flex; flex-direction: column; gap: 4px;
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 18px 16px 16px; transition: border-color 0.15s, transform 0.15s;
}
.quick-tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.qt-badge {
  position: absolute; top: 12px; right: 12px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.05em;
  background: var(--tint); color: var(--ink-soft); padding: 3px 8px; border-radius: 99px;
}
.qt-new { background: var(--accent-wash); color: var(--accent-deep); }
.qt-icon { font-size: 22px; margin-bottom: 4px; }
.qt-name { font-size: 14.5px; font-weight: 800; letter-spacing: -0.01em; }
.qt-sub { font-size: 11.5px; color: var(--ink-faint); }

/* 사이드 패널 */
.dash-side { display: flex; flex-direction: column; gap: 16px; }
.side-box { background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; }
.side-title { font-size: 13px; font-weight: 800; color: var(--ink-soft); margin-bottom: 14px; }
.goal-ring { position: relative; width: 120px; margin: 0 auto; }
.goal-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 2px; }
.goal-num b { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.goal-num span { font-size: 12px; color: var(--ink-faint); margin-top: 10px; }
.goal-msg { text-align: center; font-size: 12.5px; color: var(--ink-faint); margin-top: 12px; }
.side-stats { margin-top: 16px; border-top: 1px solid var(--line-soft); padding-top: 6px; }
.ss-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); padding: 7px 0; }
.ss-row b { font-variant-numeric: tabular-nums; }
.side-level { font-size: 19px; font-weight: 800; letter-spacing: -0.01em; }
.side-link { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--accent-deep); }
.side-tp b { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.side-note { font-size: 12px; color: var(--ink-faint); margin-top: 6px; }

/* 플래시카드 버튼 위계 (목업: 다시=옅게, 외웠어요=주인공) */
.trainer-controls { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.btn-again {
  background: var(--tint) !important; border: 1px solid var(--line) !important;
  color: var(--ink-2) !important; border-radius: 999px !important;
  padding: 14px 22px !important; font-size: 15px !important;
}
.btn-good {
  background: var(--accent) !important; color: #fff !important; border: 0 !important;
  border-radius: 999px !important; padding: 14px 30px !important; font-size: 15.5px !important;
  font-weight: 800 !important; box-shadow: 0 4px 16px rgba(14, 124, 91, 0.3) !important;
}
.btn-good:active { transform: scale(0.96); }

/* 30일 데이 그리드 — 원형 캘린더 */
.day-grid { gap: 10px !important; }
.day-cell {
  aspect-ratio: 1 !important; border-radius: 50% !important;
  display: flex !important; align-items: center; justify-content: center;
  font-weight: 700 !important; font-variant-numeric: tabular-nums;
  border: 1.5px solid var(--line) !important; background: var(--paper-raised) !important;
  color: var(--ink-2) !important; transition: transform 0.12s, border-color 0.15s;
}
.day-cell:hover { transform: scale(1.06); border-color: var(--accent) !important; }
.day-cell.done { background: var(--accent) !important; border-color: var(--accent) !important; color: #fff !important; }
.day-cell.today { border-color: var(--accent) !important; border-width: 2px !important; color: var(--accent-deep) !important; box-shadow: 0 0 0 4px var(--accent-wash); }

/* 멤버십 2열 */
.plan-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 12px; }
@media (max-width: 680px) { .plan-duo { grid-template-columns: 1fr; } }
.plan-card {
  background: var(--paper-raised); border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: 32px 28px; position: relative;
}
.plan-hot { border-color: var(--accent); box-shadow: 0 8px 32px rgba(14, 124, 91, 0.1); }

/* ═══ 표현·패턴 아코디언 (스크롤 다이어트) ═══ */
.xp-guide { font-size: 13.5px; color: var(--ink-faint); margin: -6px 0 18px; }
.xp-item { border-bottom: 1px solid var(--line); }
.xp-item:first-of-type { border-top: 1px solid var(--line); }
.xp-head {
  cursor: pointer; list-style: none; padding: 17px 30px 17px 4px;
  font-size: 15.5px; font-weight: 700; color: var(--ink);
  position: relative; line-height: 1.55; user-select: none;
}
.xp-head::-webkit-details-marker { display: none; }
.xp-head::after {
  content: "+"; position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font-size: 19px; font-weight: 400; color: var(--ink-faint); transition: transform 0.2s;
}
.xp-item[open] .xp-head::after { content: "–"; color: var(--accent-deep); }
.xp-item[open] .xp-head { color: var(--accent-deep); }
.xp-body { padding: 0 4px 20px; }
.xp-body blockquote { margin: 14px 0 0; }

/* ═══ 모바일 컴포트 — 숨통 패치 ═══ */
@media (max-width: 760px) {
  .section { padding: 56px 0 8px; }
  .section-head { margin-bottom: 26px; }
  .section-head p { font-size: 14.5px; }
  .card { padding: 24px 20px 20px; }
  .grid { gap: 14px; }
  .gr-page { padding: 0 var(--pad-x) 56px; }
  .gr-body { font-size: 15.5px; }
  .be-catbody { padding: 12px 18px 18px; }
  .be-item { padding: 15px 2px; gap: 13px; }
  .be-en { font-size: 15px; }
  .bs-card { padding: 20px 18px; }
  .bs-lines { gap: 11px; }
  .voc-grid { gap: 10px; }
  .prose { font-size: 15.5px; }
  .prose blockquote, article blockquote { padding-left: 16px; font-size: 15.5px; }
  .dash-grid { gap: 24px; }
  .row-item { padding: 20px 4px; }
  .xp-head { padding: 16px 26px 16px 2px; font-size: 15px; }
}

/* ═══ 패턴 쉐도잉 ═══ */
.pr-ko { font-size: 15px; color: var(--ink-faint); margin-bottom: 12px; font-weight: 600; }
.pattern-shadow-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: linear-gradient(135deg, #1663A8, #0B4171); color: #fff;
  border-radius: var(--r-lg); padding: 20px 24px; margin: 20px 0 32px;
  box-shadow: 0 8px 28px rgba(14, 124, 91, 0.22); transition: transform 0.15s;
}
.pattern-shadow-cta:active { transform: scale(0.99); }
.psc-label { display: block; font-size: 16px; font-weight: 800; letter-spacing: -0.01em; }
.psc-sub { display: block; font-size: 13px; color: #d9efe6; margin-top: 4px; }
.psc-go { font-size: 14px; font-weight: 700; color: #fff; white-space: nowrap; }


/* ═══ QA: 터치 타깃 보정 (WCAG 44px) ═══ */
.gr-tts, .bs-play { min-width: 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 760px) {
  .gr-tts, .bs-play { width: 44px; height: 44px; }
  .rate-group button { min-height: 44px; padding: 10px 16px; }
  .xp-head { min-height: 48px; display: flex; align-items: center; }
}

/* ═══ 스크립트 상세 3탭 (스크립트/핵심표현/꿀팁) ═══ */
.sc-item { margin: 16px 0 40px; }
.sc-tabs {
  display: inline-flex; gap: 2px; background: var(--tint);
  border-radius: 999px; padding: 3px; margin-bottom: 18px;
}
.sc-tab {
  border: 0; background: transparent; cursor: pointer;
  font-size: 13.5px; font-weight: 700; color: var(--ink-soft);
  padding: 9px 16px; border-radius: 999px; transition: background 0.15s, color 0.15s;
  min-height: 38px;
}
.sc-tab.on { background: var(--paper-raised); color: var(--accent-deep); box-shadow: var(--shadow-card); }
.sc-en-block { margin-bottom: 22px; }
.sc-en-block .sc-en { font-size: 16px; line-height: 1.8; color: var(--ink); margin: 0 0 12px; }
.sc-en-block .sc-en:last-child { margin-bottom: 0; }
.sc-kr-block { padding-top: 20px; border-top: 1px dashed var(--line); }
.sc-kr-label {
  display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: 0.04em;
  color: var(--accent-deep); background: var(--accent-wash);
  padding: 4px 12px; border-radius: 999px; margin-bottom: 14px;
}
.sc-kr-block .sc-kr { font-size: 14.5px; line-height: 1.75; color: var(--ink-faint); margin: 0 0 10px; }
.sc-kr-block .sc-kr:last-child { margin-bottom: 0; }
.sc-none { font-size: 14px; color: var(--ink-faint); }
.sc-pane .notes-expr { margin: 0; }
@media (max-width: 560px) {
  .sc-tabs { display: flex; }
  .sc-tab { flex: 1; padding: 10px 8px; min-height: 44px; }
}

/* ═══ 문법 30일 진행률 ═══ */
.cover-progress { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.cp-bar { flex: 1; height: 4px; background: rgba(28,27,24,0.08); border-radius: 99px; overflow: hidden; }
.cp-bar > span { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width 0.6s ease; }
.cp-num { font-size: 11px; font-weight: 700; color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
a.gr-visited { position: relative; }
a.gr-visited::after {
  content: "✓"; position: absolute; top: 14px; right: 16px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}

/* ═══════════ 모바일 여백 전면 처방 (갤럭시·아이폰 기준) ═══════════ */
@media (max-width: 760px) {
  /* 거터: 26px — 큰 라운드 블록이 숨쉬는 최소선 */
  :root { --pad-x: 26px; }

  /* 자료실 선반: 가로 스크롤 폐지 → 세로 스택, 커버는 가로형 카드 */
  .shelf { display: flex; flex-direction: column; gap: 14px; }
  .cover-tile {
    aspect-ratio: auto; min-height: 108px; padding: 24px;
    display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto;
    align-items: center; column-gap: 18px; row-gap: 2px;
  }
  .cover-tile .cover-count { grid-row: 1 / 3; grid-column: 2; margin: 0; font-size: 44px; }
  .cover-tile .cover-name { grid-row: 1; grid-column: 1; margin-top: 0; font-size: 17px; }
  .cover-tile .cover-meta { grid-row: 2; grid-column: 1; }
  .cover-tile .cover-progress { grid-row: 3; grid-column: 1 / 3; margin-top: 10px; }

  /* 블록 사이 세로 리듬 — 다닥다닥 해소 */
  .section { padding: 48px 0 8px; }
  .section-head { margin-bottom: 30px; }
  .recent-strip { margin-bottom: 32px; }
  .lvl-tabs { margin-bottom: 30px; }

  /* 훈련 대시보드 숨통 */
  .dash-head { margin-bottom: 36px; }
  .dash-grid { gap: 32px; }
  .dash-continue { padding: 26px 24px; }
  .dash-label { margin: 36px 0 16px; }
  .quick-grid { gap: 12px; }
  .quick-tile { padding: 20px 18px 18px; }
  .dash-side { gap: 14px; }
  .side-box { padding: 24px 22px; }
  .row-item { padding: 21px 6px; }

  /* 홈 히어로·플랜·카드 내부 */
  .hero-xl { padding: 60px 26px 44px; }
  .plan-card { padding: 30px 24px; }
  .card { padding: 26px 22px 22px; }
  .grid { gap: 14px; }
}

/* 초소형(iPhone SE 등) 보정 */
@media (max-width: 380px) {
  :root { --pad-x: 20px; }
  .cover-tile .cover-count { font-size: 38px; }
}


/* ═══ 문법 이어서 학습 배너 ═══ */
.gr-continue {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: #082F4F; color: #fff; border-radius: var(--r-lg);
  padding: 22px 26px; margin: 24px 0 30px;
  box-shadow: 0 8px 28px rgba(11, 61, 49, 0.24); transition: transform 0.15s;
}
.gr-continue:active { transform: scale(0.99); }
.grc-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.grc-label { font-size: 11.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #9fe1cb; }
.grc-title { font-size: 19px; font-weight: 800; letter-spacing: -0.01em; }
.grc-prog { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.grc-bar { width: 120px; height: 5px; background: rgba(255,255,255,0.18); border-radius: 99px; overflow: hidden; }
.grc-bar > span { display: block; height: 100%; background: #5dcaa5; border-radius: 99px; transition: width 0.6s ease; }
.grc-num { font-size: 12px; font-weight: 700; color: #9fe1cb; font-variant-numeric: tabular-nums; }
.grc-go { font-size: 14px; font-weight: 700; color: #d9efe6; white-space: nowrap; }
@media (max-width: 560px) {
  .gr-continue { padding: 20px 22px; }
  .grc-bar { width: 90px; }
}

/* ═══ 훈련 빠른시작 6타일 ═══ */
.quick-grid-6 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .quick-grid-6 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .quick-grid-6 { grid-template-columns: repeat(2, 1fr); } }

/* ═══ 오늘의 훈련 (대시보드 카드) ═══ */
.dash-today {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  background: linear-gradient(135deg, #1663A8, #0B4171); color: #fff;
  border-radius: var(--r-xl); padding: 28px 30px;
  box-shadow: 0 10px 32px rgba(14, 124, 91, 0.26);
  transition: transform 0.15s, box-shadow 0.2s;
}
.dash-today:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(14, 124, 91, 0.32); }
.dash-today:active { transform: scale(0.99); }
.dash-today.dt-done { background: linear-gradient(135deg, #082F4F, #061F36); }
.dt-left { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dt-label { font-size: 11.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #9fe1cb; }
.dt-title { font-size: 21px; font-weight: 800; letter-spacing: -0.015em; }
.dt-meta { font-size: 13px; color: #cfe9df; }
.dt-go {
  font-size: 14.5px; font-weight: 800; color: #0B4171; background: #fff;
  padding: 12px 22px; border-radius: 999px; white-space: nowrap;
}

/* ═══ 오늘의 훈련 페이지 ═══ */
.td-plan { display: flex; flex-direction: column; gap: 10px; margin: 26px 0; }
.td-step {
  display: flex; align-items: center; gap: 14px;
  background: var(--paper-raised); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 18px 20px;
}
.td-step > div { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.td-step b { font-size: 15.5px; font-weight: 800; }
.td-step span { font-size: 12.5px; color: var(--ink-faint); }
.td-num {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-wash); color: var(--accent-deep);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800;
}
.td-min { flex: none; font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.td-status {
  background: var(--tint); border-radius: var(--r-md); padding: 16px 18px;
  font-size: 14px; color: var(--ink-2); text-align: center; margin-bottom: 20px; line-height: 1.7;
}
.td-streak { font-size: 13px; color: var(--accent-deep); font-weight: 700; }
.td-note { text-align: center; font-size: 12.5px; color: var(--ink-faint); margin-top: 14px; }

.td-bar-wrap { margin-bottom: 20px; }
.td-steps-mini { display: flex; gap: 8px; justify-content: center; margin-bottom: 12px; }
.td-mini {
  font-size: 12px; font-weight: 700; color: var(--ink-faint);
  padding: 6px 14px; border-radius: 999px; background: var(--tint);
}
.td-mini.on { background: var(--accent); color: #fff; }
.td-mini.done { background: var(--accent-wash); color: var(--accent-deep); }
.td-count { text-align: center; font-size: 12.5px; color: var(--ink-faint); margin-top: 8px; }

.fc-note { font-size: 13px; color: var(--ink-faint); }
.td-build-ko { font-size: 17px; font-weight: 700; text-align: center; margin: 8px 0 20px; line-height: 1.6; }
.td-build-msg { text-align: center; margin-top: 14px; font-size: 14px; min-height: 20px; }
.td-ok { color: var(--accent-deep); font-weight: 800; }
.td-no { color: var(--ink-soft); font-weight: 600; }
.td-done-stats { display: flex; justify-content: center; gap: 26px; margin: 22px 0; }
.tds { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.tds b { font-size: 24px; font-weight: 800; color: var(--accent-deep); font-variant-numeric: tabular-nums; }
.tds span { font-size: 12px; color: var(--ink-faint); }

@media (max-width: 560px) {
  .dash-today { padding: 24px 22px; }
  .dt-title { font-size: 18px; }
  .dt-go { width: 100%; text-align: center; }
}

/* ═══ 문장 조립: 그룹 → 토픽 → 난이도 3단 선택 ═══ */
.pick-label { font-size: 13px; font-weight: 800; color: var(--ink-soft); margin-bottom: 14px; }

/* STEP 1 — 그룹 카드 */
.grp-grid { display: flex; flex-direction: column; gap: 12px; }
.grp-card {
  display: flex; align-items: center; gap: 16px; width: 100%; text-align: left;
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 20px 22px; cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.2s;
}
.grp-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.grp-card:active { transform: scale(0.99); }
.grp-ico {
  flex: none; width: 48px; height: 48px; border-radius: 14px;
  background: var(--accent-wash); color: var(--accent-deep);
  display: flex; align-items: center; justify-content: center;
}
.grp-body { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.grp-name { font-size: 16.5px; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); }
.grp-desc { font-size: 13px; color: var(--ink-soft); }
.grp-meta { font-size: 11.5px; color: var(--ink-faint); }
.grp-right { flex: none; display: flex; align-items: center; gap: 10px; }
.grp-pct {
  font-size: 12px; font-weight: 800; color: var(--accent-deep);
  background: var(--accent-wash); padding: 4px 10px; border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.grp-arrow { color: var(--ink-faint); font-size: 16px; }

/* STEP 2 — 토픽 리스트 */
.pick-back {
  background: none; border: 0; cursor: pointer; padding: 8px 0;
  font-size: 13.5px; font-weight: 700; color: var(--ink-soft); margin-bottom: 12px;
}
.pick-back:hover { color: var(--accent-deep); }
.pick-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.pick-ico {
  flex: none; width: 44px; height: 44px; border-radius: 12px;
  background: var(--accent-wash); color: var(--accent-deep);
  display: flex; align-items: center; justify-content: center;
}
.pick-title { font-size: 19px; font-weight: 800; letter-spacing: -0.015em; }
.pick-sub { font-size: 13px; color: var(--ink-faint); margin-top: 2px; }
.topic-list { display: flex; flex-direction: column; }
.topic-row {
  display: flex; align-items: center; gap: 16px; width: 100%; text-align: left;
  background: none; border: 0; border-bottom: 1px solid var(--line);
  padding: 18px 4px; cursor: pointer; transition: background 0.12s;
}
.topic-row:first-child { border-top: 1px solid var(--line); }
.topic-row:hover { background: var(--tint); }
.tr-body { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tr-name { font-size: 15px; font-weight: 700; color: var(--ink); }
.tr-bar { height: 4px; background: rgba(28,27,24,0.07); border-radius: 99px; overflow: hidden; }
.tr-bar > span { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width 0.5s; }
.tr-num { flex: none; font-size: 14px; font-weight: 800; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tr-num em { font-style: normal; font-weight: 600; color: var(--ink-faint); font-size: 12.5px; }
.topic-clear .tr-name::after { content: " ✓"; color: var(--accent); font-weight: 800; }

/* STEP 3 — 난이도 카드 */
.diff-card {
  background: var(--paper-raised); border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: 30px 28px; text-align: center;
}
.diff-topic { font-size: 21px; font-weight: 800; letter-spacing: -0.015em; }
.diff-count { font-size: 13px; color: var(--ink-faint); margin-top: 6px; }
.seg-diff { display: inline-flex; margin: 0 auto; }
.btn-start-full { width: 100%; margin-top: 24px; padding: 16px; font-size: 16px; }
.builder-diff-desc { font-size: 12.5px; color: var(--ink-faint); margin-top: 10px; }

@media (max-width: 560px) {
  .grp-card { padding: 18px; gap: 14px; }
  .grp-ico { width: 44px; height: 44px; }
  .grp-name { font-size: 15.5px; }
  .diff-card { padding: 26px 20px; }
}

/* ═══════════ 프리미엄 폴리시: 오늘의 훈련 (처방전) ═══════════ */
.rx-card {
  background: var(--paper-raised); border: 1px solid var(--line);
  border-radius: var(--r-xl); overflow: hidden;
  box-shadow: 0 12px 40px rgba(28, 27, 24, 0.07);
  margin-top: 8px;
}
.rx-head {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, #082F4F, #061F36); color: #fff;
  padding: 20px 24px;
}
.rx-cross {
  flex: none; width: 40px; height: 40px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.12); color: #5dcaa5;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800;
}
.rx-title { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.rx-title b { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.rx-title span { font-size: 12.5px; color: #9fe1cb; }
.rx-time {
  font-size: 12px; font-weight: 800; color: #d9efe6;
  border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 999px; padding: 6px 13px;
  white-space: nowrap;
}
.rx-steps { padding: 26px 24px 6px; position: relative; }
.rx-step { display: flex; align-items: flex-start; gap: 16px; position: relative; padding-bottom: 26px; }
.rx-step:not(:last-child)::before {
  content: ""; position: absolute; left: 15px; top: 34px; bottom: 0;
  width: 2px; background: var(--line);
}
.rx-dot {
  flex: none; width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-wash); color: var(--accent-deep);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; position: relative; z-index: 1;
  border: 2px solid var(--paper-raised);
  box-shadow: 0 0 0 1.5px var(--accent);
}
.rx-body { flex: 1; display: flex; flex-direction: column; gap: 3px; padding-top: 4px; }
.rx-body b { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; }
.rx-body span { font-size: 13px; color: var(--ink-faint); }
.rx-min { flex: none; font-size: 12px; font-weight: 700; color: var(--ink-soft); padding-top: 8px; font-variant-numeric: tabular-nums; }
.rx-card .td-status { margin: 0 24px 4px; }
.rx-start { display: block; width: calc(100% - 48px); margin: 16px 24px 8px; padding: 17px; font-size: 16.5px; }
.rx-card .td-note { margin: 12px 0 22px; }

/* 완료 도장 씰 */
.rx-seal {
  width: 84px; height: 84px; margin: 0 auto; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; font-weight: 800;
  box-shadow: 0 0 0 5px var(--paper), 0 0 0 7px var(--accent), 0 14px 36px rgba(14, 124, 91, 0.35);
  animation: sealPop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes sealPop {
  0% { transform: scale(0.3) rotate(-14deg); opacity: 0; }
  70% { transform: scale(1.08) rotate(2deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

/* 훈련 카드 등장 모션 + 미니 스텝 캡슐 */
#td-card { animation: cardIn 0.35s ease both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(0.985); } to { opacity: 1; transform: none; } }
.td-mini { transition: background 0.25s, color 0.25s; }
.td-mini.done::before { content: "✓ "; font-weight: 800; }

/* ═══════════ 프리미엄 폴리시: 문장 조립 세션 ═══════════ */
.builder-prompt-card {
  background: linear-gradient(180deg, var(--paper-raised), var(--tint));
  border: 1px solid var(--line); border-radius: var(--r-xl);
  box-shadow: var(--shadow-card);
}
.builder-answer {
  min-height: 76px; border-radius: var(--r-lg);
  background:
    repeating-linear-gradient(180deg, transparent 0 42px, var(--line) 42px 43px);
  border: 1.5px dashed var(--line); padding: 14px 16px;
  transition: border-color 0.2s, background-color 0.2s;
}
.builder-answer:not(:empty) { border-style: solid; }
.builder-word {
  animation: wordIn 0.18s ease both;
  box-shadow: 0 2px 6px rgba(28, 27, 24, 0.08);
}
@keyframes wordIn { from { opacity: 0; transform: translateY(6px) scale(0.94); } to { opacity: 1; transform: none; } }
.chip {
  box-shadow: 0 2px 0 rgba(28, 27, 24, 0.1), 0 3px 8px rgba(28, 27, 24, 0.06);
  transition: transform 0.1s, box-shadow 0.1s, opacity 0.15s;
}
.chip:not(.used):hover { transform: translateY(-2px); box-shadow: 0 4px 0 rgba(28, 27, 24, 0.1), 0 6px 14px rgba(28, 27, 24, 0.1); }
.chip:not(.used):active { transform: translateY(1px); box-shadow: 0 1px 0 rgba(28, 27, 24, 0.1); }
.chip.used { opacity: 0.28; transform: scale(0.96); }

@media (max-width: 560px) {
  .rx-head { padding: 18px 20px; }
  .rx-steps { padding: 22px 20px 4px; }
  .rx-start { width: calc(100% - 40px); margin: 14px 20px 6px; }
  .rx-card .td-status { margin: 0 20px 4px; }
}

/* ═══════════ 패턴 카드 뷰어 (스와이프) ═══════════ */
.pv { margin: 8px 0 40px; }
.pv-hidden { display: none; }
.pv-top { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; }
.pv-jump {
  flex: 1; min-width: 0; padding: 12px 14px; font-size: 14px; font-weight: 700;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--paper-raised); color: var(--ink); font-family: inherit;
}
.pv-list-btn {
  flex: none; background: none; border: 1px solid var(--line); border-radius: 999px;
  padding: 11px 16px; font-size: 12.5px; font-weight: 700; color: var(--ink-soft);
  cursor: pointer; font-family: inherit;
}
.pv-list-btn:hover { border-color: var(--accent); color: var(--accent-deep); }

.pv-stage { display: flex; align-items: stretch; gap: 8px; }
.pv-side {
  flex: none; width: 40px; border: 0; background: none; cursor: pointer;
  font-size: 30px; color: var(--ink-faint); border-radius: var(--r-md);
  transition: color 0.15s, background 0.15s;
}
.pv-side:hover { color: var(--accent-deep); background: var(--tint); }
.pv-card {
  flex: 1; min-width: 0; min-height: 300px;
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--r-xl);
  box-shadow: 0 10px 34px rgba(28, 27, 24, 0.08);
  padding: 26px 28px 56px; position: relative;
  display: flex; flex-direction: column; justify-content: center; text-align: center;
  touch-action: pan-y;
}
.pv-in-r { animation: pvInR 0.28s ease both; }
.pv-in-l { animation: pvInL 0.28s ease both; }
@keyframes pvInR { from { opacity: 0; transform: translateX(36px); } to { opacity: 1; transform: none; } }
@keyframes pvInL { from { opacity: 0; transform: translateX(-36px); } to { opacity: 1; transform: none; } }

.pv-pat {
  position: absolute; top: 18px; left: 0; right: 0; padding: 0 20px;
  display: flex; flex-direction: column; gap: 2px;
}
.pv-pat-en { font-size: 13px; font-weight: 800; color: var(--accent-deep); }
.pv-pat-ko { font-size: 11.5px; color: var(--ink-faint); }
.pv-en { font-size: clamp(18px, 2.6vw, 23px); font-weight: 700; line-height: 1.6; letter-spacing: -0.015em; margin-top: 34px; }
.pv-ko { font-size: 14.5px; color: var(--ink-soft); line-height: 1.7; margin-top: 14px; }
.pv-count {
  position: absolute; bottom: 18px; left: 0; right: 0;
  font-size: 12px; font-weight: 700; color: var(--ink-faint); font-variant-numeric: tabular-nums;
}
.pv-bar { height: 4px; background: rgba(28,27,24,0.07); border-radius: 99px; overflow: hidden; margin-top: 16px; }
.pv-fill { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width 0.35s ease; }
.pv-controls { display: flex; justify-content: center; gap: 10px; margin-top: 16px; }
.pv-btn {
  border: 1px solid var(--line); background: var(--paper-raised); border-radius: 999px;
  padding: 12px 20px; font-size: 14px; font-weight: 700; color: var(--ink-2);
  cursor: pointer; font-family: inherit; min-height: 44px;
  transition: border-color 0.15s, color 0.15s;
}
.pv-btn:hover { border-color: var(--accent); color: var(--accent-deep); }
.pv-hint { text-align: center; font-size: 12px; color: var(--ink-faint); margin-top: 12px; }

@media (max-width: 560px) {
  .pv-side { display: none; }           /* 폰에선 스와이프가 주 조작 */
  .pv-card { padding: 24px 20px 52px; min-height: 280px; }
  .pv-hint { display: block; }
}
@media (min-width: 561px) {
  .pv-hint { display: none; }           /* 데스크탑은 화살표가 보이니 힌트 불필요 */
}

/* ═══════════ 첫 방문 온보딩 — 처방 문진표 ═══════════ */
.tut-ov {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(20, 25, 23, 0.55); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: tutFade 0.25s ease both;
}
@keyframes tutFade { from { opacity: 0; } }
.tut-out { opacity: 0; transition: opacity 0.25s; }
.tut-skip {
  position: fixed; top: 18px; right: 20px; z-index: 310;
  background: rgba(255, 255, 255, 0.14); color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 999px;
  padding: 10px 18px; font-size: 13px; font-weight: 700;
  cursor: pointer; font-family: inherit; min-height: 44px;
}
.tut-card {
  background: var(--paper-raised); border-radius: 24px; width: 100%; max-width: 400px;
  overflow: hidden; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
  animation: tutPop 0.35s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}
@keyframes tutPop { from { opacity: 0; transform: scale(0.92) translateY(16px); } }
.tut-head {
  background: linear-gradient(135deg, #082F4F, #061F36); color: #fff;
  padding: 20px 24px; display: flex; gap: 12px; align-items: center;
}
.tut-cross {
  flex: none; width: 36px; height: 36px; border-radius: 11px;
  background: rgba(255, 255, 255, 0.12); color: #5dcaa5;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 17px;
}
.tut-head b { font-size: 15.5px; font-weight: 800; }
.tut-head span { display: block; font-size: 11.5px; color: #9fe1cb; margin-top: 2px; }
.tut-body { padding: 26px 24px 24px; }
.tut-q { font-size: 18px; font-weight: 800; letter-spacing: -0.015em; margin-bottom: 18px; line-height: 1.5; }
.tut-opt { display: flex; flex-direction: column; gap: 10px; }
.tut-opt button {
  text-align: left; background: var(--tint); border: 1.5px solid transparent;
  border-radius: 14px; padding: 16px 18px; font-size: 14.5px; font-weight: 700;
  color: var(--ink); cursor: pointer; font-family: inherit; min-height: 52px;
  transition: border-color 0.15s, background 0.15s;
}
.tut-opt button:hover { border-color: var(--accent); background: var(--accent-wash); }
.tut-opt button:active { transform: scale(0.99); }
.tut-rx { text-align: center; }
.tut-seal {
  width: 64px; height: 64px; margin: 4px auto 16px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 26px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 4px var(--paper-raised), 0 0 0 6px var(--accent);
  animation: sealPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.tut-rx h4 { font-size: 18px; font-weight: 800; letter-spacing: -0.015em; }
.tut-rx p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.75; margin: 10px 0 20px; }
.tut-go {
  display: block; width: 100%; background: var(--accent); color: #fff;
  border-radius: 999px; padding: 15px; font-size: 15px; font-weight: 800;
  box-shadow: 0 6px 20px rgba(14, 124, 91, 0.3);
}
.tut-go:active { transform: scale(0.98); }
.tut-later {
  background: none; border: 0; cursor: pointer; font-family: inherit;
  font-size: 12.5px; font-weight: 600; color: var(--ink-faint);
  margin-top: 14px; padding: 6px; min-height: 36px;
}
.tut-later:hover { color: var(--ink-soft); }

/* ═══════════ 모바일 심화 최적화 (앱 감각) ═══════════ */
/* 탭 하이라이트 제거 + 더블탭 확대 방지 */
a, button, .chip, .day-cell, .quick-tile, .flashcard, .xp-head, .sc-tab,
.grp-card, .topic-row, .pv-card, .pv-side, .tabbar a {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
/* 학습 카드·칩은 길게 눌러도 텍스트 선택 안 되게 (오조작 방지) */
.flashcard, .chip, .builder-word, .day-cell, .pv-card, .tabbar a, .sc-tab {
  -webkit-user-select: none; user-select: none;
}
/* 당겨서 새로고침 오작동 방지 (사파리 바운스는 유지) */
html { overscroll-behavior-y: contain; }
/* iOS 입력 자동 확대 방지: 폼 요소 16px 이상 보장 */
select, input, textarea, .trainer-select, .pv-jump { font-size: 16px !important; }
/* 노치·홈바 safe-area */
@media (max-width: 860px) {
  .tabbar { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  body { padding-bottom: calc(74px + env(safe-area-inset-bottom)); }
}
.site-header { padding-top: env(safe-area-inset-top); }
/* 고정 오버레이도 safe-area */
.tut-skip { top: max(18px, calc(env(safe-area-inset-top) + 10px)); }
/* PWA 스탠드얼론에서 스크롤바 대신 앱 느낌 */
@media (display-mode: standalone) {
  .site-header { position: sticky; top: 0; z-index: 90; background: var(--paper); }
}


/* ---------- 네이비 SaaS 밀도·타이포 (여백 1.3배 · tabular-nums) ---------- */
body { font-feature-settings: "tnum"; }
.card { padding: 28px 26px; border-radius: 18px; }
.grid { gap: 18px; }
.section { padding-top: 72px; padding-bottom: 72px; }
.section-head h2 { font-size: 30px; letter-spacing: -0.025em; }
.card-top h3 { font-size: 17px; letter-spacing: -0.01em; }
.card p { line-height: 1.75; }
.pill { border-radius: 20px; padding: 5px 11px; }
.proof-item .n, .be-num, .bs-cardnum { font-variant-numeric: tabular-nums; }

/* ---------- 스크립트 듣기 플레이어 ---------- */
.sc-listen { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; }
.sc-play {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 700; color: var(--accent-deep);
  background: var(--accent-wash); border: 1px solid transparent; border-radius: 999px;
  padding: 9px 16px; transition: all 0.15s;
}
.sc-play:hover { background: var(--accent-deep); color: #fff; }
.sc-play.on { background: var(--accent-deep); color: #fff; }
.sc-rate {
  cursor: pointer; font-family: inherit; font-size: 12px; font-weight: 700;
  color: var(--ink-faint); background: var(--paper-raised); border: 1px solid var(--line);
  border-radius: 999px; padding: 9px 13px; font-variant-numeric: tabular-nums; transition: all 0.15s;
}
.sc-rate:hover { border-color: var(--accent); color: var(--accent-deep); }
.sc-en.playing {
  background: var(--accent-wash); border-radius: 8px;
  box-shadow: 0 0 0 6px var(--accent-wash);
}

/* ---------- 문법 Day 완주 버튼 ---------- */
.gr-done-box { text-align: center; margin: 36px 0 8px; }
.gr-done-btn {
  cursor: pointer; font-family: inherit; font-size: 15px; font-weight: 700;
  color: #fff; background: var(--accent-deep); border: 0; border-radius: 999px;
  padding: 16px 44px; transition: all 0.18s; box-shadow: 0 4px 16px rgba(11, 65, 113, 0.22);
}
.gr-done-btn:hover:not(:disabled) { background: var(--accent); transform: translateY(-1px); }
.gr-done-btn.on { background: var(--ok, #10B981); box-shadow: none; cursor: default; opacity: 0.95; }
.gr-done-btn:disabled { cursor: default; }
.gr-done-hint { font-size: 13px; color: var(--ink-faint); margin-top: 11px; }

/* ---------- 요금제 3플랜 ---------- */
.plan-trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: start; }
@media (max-width: 860px) { .plan-trio { grid-template-columns: 1fr; } }
.plan-trio .plan-card {
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: 18px;
  padding: 30px 26px; position: relative;
}
.plan-trio .plan-hot {
  border: 2px solid var(--accent-deep); box-shadow: 0 12px 40px rgba(11, 65, 113, 0.14);
  padding-top: 40px;
}
.plan-flag {
  position: absolute; top: -1px; left: 50%; transform: translate(-50%, -50%);
  background: var(--accent-deep); color: #fff; font-size: 11.5px; font-weight: 700;
  padding: 7px 16px; border-radius: 999px; white-space: nowrap;
}
.plan-name { font-size: 15px; font-weight: 700; color: var(--ink-2); margin-bottom: 10px; }
.plan-amount {
  font-size: 34px; font-weight: 800; color: var(--ink); letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums; line-height: 1;
}
.plan-amount small { font-size: 15px; font-weight: 600; color: var(--ink-faint); margin-left: 2px; }
.plan-per { font-size: 13px; color: var(--ink-faint); margin-top: 8px; font-variant-numeric: tabular-nums; }
.plan-per b { color: var(--accent-deep); font-weight: 700; }
.plan-list { list-style: none; padding: 0; margin: 22px 0; }
.plan-list li {
  font-size: 13.5px; color: var(--ink-2); padding: 8px 0 8px 22px; position: relative; line-height: 1.5;
}
.plan-list li::before {
  content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700;
}
.plan-list li b { color: var(--ink); font-weight: 700; }
.plan-cta { width: 100%; text-align: center; }
.plan-why {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 40px;
  padding: 28px 24px; background: var(--accent-wash); border-radius: 18px;
}
@media (max-width: 720px) { .plan-why { grid-template-columns: repeat(2, 1fr); } }
.plan-why-item { text-align: center; }
.plan-why-item .n {
  display: block; font-size: 26px; font-weight: 800; color: var(--accent-deep);
  font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
}
.plan-why-item .l { display: block; font-size: 12px; color: var(--ink-2); margin-top: 6px; line-height: 1.5; }
.plan-foot { margin-top: 28px; font-size: 13px; color: var(--ink-faint); }

/* ---------- 이메일 로그인 ---------- */
.auth-or { display: flex; align-items: center; gap: 12px; margin: 16px 0 12px; color: var(--ink-faint); font-size: 12px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-input {
  width: 100%; box-sizing: border-box; font-family: inherit; font-size: 14.5px;
  padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px;
  margin-bottom: 9px; background: var(--paper); color: var(--ink);
}
.auth-input:focus { outline: none; border-color: var(--accent); }
.auth-email-btns { display: flex; gap: 9px; }
.btn-email {
  flex: 1; cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 700;
  padding: 13px 0; border-radius: 12px; border: 0;
  background: var(--accent-deep); color: #fff; transition: opacity 0.15s;
}
.btn-email:disabled { opacity: 0.45; cursor: default; }
.btn-email-sub { background: var(--paper); color: var(--accent-deep); border: 1.5px solid var(--accent-deep); }
.auth-error { font-size: 13px; color: #EF4444; margin: 10px 0 0; text-align: center; }
