/* GmarketSans (눈누, 상업용 무료) — display headlines. Pretendard/Space Grotesk/
   Jua/Black Han Sans are loaded via <link> in each page <head>. */
@font-face {
  font-family: 'GmarketSans';
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/GmarketSansMedium.woff') format('woff');
}
@font-face {
  font-family: 'GmarketSans';
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/GmarketSansBold.woff') format('woff');
}

:root {
  /* Type system — editorial, 영역별 적용 (규칙은 파일 끝 Typography 섹션) */
  --font-body:    'Pretendard', system-ui, -apple-system, 'Apple SD Gothic Neo', sans-serif;
  --font-display: 'GmarketSans', 'Pretendard', sans-serif;
  --font-latin:   'Space Grotesk', ui-sans-serif, sans-serif;
  --font-round:   'Jua', 'GmarketSans', sans-serif;
  --font-heavy:   'Black Han Sans', 'GmarketSans', sans-serif;

  --bg:        #09090d;
  --surface:   #111117;
  --surface-2: #1c1c25;
  --border:    #252532;
  --text:      #f0ece5;
  /* 2026-08-13 Kyle 승인: #63637a(대비 3.45:1, WCAG 미달)→#7b7b93(~4.5:1) —
     시니어 실가독성. 더 어둡게 되돌리지 말 것. */
  --muted:     #7b7b93;
  --accent:    #c1ff1a;
  --hot:       #ff5500;
  --ok:        #00e5a0;
  --err:       #ff4444;
  --nav-h:     60px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* ── Top navigation ─────────────────────────────────────────── */
.topnav {
  position: fixed;
  inset: 0 0 auto 0;
  /* env(safe-area-inset-*) is 0 unless on a notched device in standalone/WebView,
     so these are no-ops on desktop. Keeps the bar below the iOS status bar. */
  height: calc(var(--nav-h) + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  padding-left: max(28px, env(safe-area-inset-left));
  padding-right: max(28px, env(safe-area-inset-right));
  z-index: 200;
  display: flex;
  align-items: stretch;
  background: rgba(9, 9, 13, 0.88);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.1em;
  color: var(--text);
  flex-shrink: 0;
}

.nav-logo-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: stretch;
  margin-left: 28px;
  gap: 0;
}

.nav-links a {
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 600;
  padding: 0 15px;
  position: relative;
  transition: color 0.12s;
  white-space: nowrap;
}

.nav-links a:hover { color: var(--text); }

.nav-links a.active {
  color: var(--accent);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 13px;
  right: 13px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.nav-end {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--border);
  object-fit: cover;
  transition: border-color 0.15s;
  display: block;
  cursor: pointer;
}
.nav-avatar:hover { border-color: var(--accent); }

.nav-avatar-fb {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-user-menu {
  position: relative;
}

.nav-user-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 240px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
  opacity: 0;
  transform: translateY(-6px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.15s, transform 0.15s;
  z-index: 999;
}
.nav-dropdown.open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.nav-dd-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 8px;
}
.nav-dd-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border);
}
.nav-dd-avatar-fb {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-dd-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.nav-dd-info b {
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-dd-info span {
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-dd-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 4px;
}

.nav-dd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
  transition: background 0.12s;
}
.nav-dd-item:hover {
  background: var(--surface-2);
}
.nav-dd-item svg {
  color: var(--muted);
  flex-shrink: 0;
}

.nav-dd-logout {
  color: var(--muted);
}
.nav-dd-logout:hover {
  color: var(--err);
}
.nav-dd-logout:hover svg {
  color: var(--err);
}

/* ── Page scaffold ──────────────────────────────────────────── */
.page {
  padding-top: calc(var(--nav-h) + 56px + env(safe-area-inset-top));
  padding-bottom: 96px;
  padding-left: clamp(20px, 5vw, 64px);
  padding-right: clamp(20px, 5vw, 64px);
  max-width: 1120px;
  margin: 0 auto;
}

/* ── Hero heading ───────────────────────────────────────────── */
.hero {
  margin-bottom: 48px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.06;
  color: var(--text);
}

.hero .sub {
  margin-top: 12px;
  color: var(--text);
  opacity: 0.65;
  font-size: 1.1rem;
  max-width: 580px;
  line-height: 1.6;
}

/* ── Buttons ────────────────────────────────────────────────── */
button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: none;
  border-radius: 8px;
  padding: 10px 22px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, opacity 0.12s, transform 0.08s;
}
button:disabled { opacity: 0.3; cursor: not-allowed; }
button:not(:disabled):active { transform: scale(0.97); }

.btn-primary { background: var(--accent); color: #09090d; }
.btn-primary:not(:disabled):hover { background: #d0ff40; }

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:not(:disabled):hover { border-color: var(--muted); }

.btn-ghost { background: transparent; color: var(--muted); padding: 6px 10px; }
.btn-ghost:hover { color: var(--text); }

/* ── Home: action grid ──────────────────────────────────────── */
.action-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--border);
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.action-cell {
  background: var(--bg);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--text);
  min-height: 148px;
  transition: background 0.12s;
}
.action-cell:hover { background: var(--surface); }

.action-cell.featured { background: var(--accent); color: #09090d; }
.action-cell.featured:hover { background: #d0ff40; }

.action-label {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.55;
}

.action-title {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.35;
  flex: 1;
}

.action-arrow {
  font-size: 1.1rem;
  margin-top: auto;
  opacity: 0.7;
}
.action-cell:hover .action-arrow { opacity: 1; }

/* ── Notice bar ─────────────────────────────────────────────── */
.notice-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 13px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--hot);
  border-radius: 10px;
  font-size: 1rem;
  color: var(--text);
  opacity: 0.75;
}
.notice-bar a { color: var(--accent); font-weight: 600; }

/* ── Session page ───────────────────────────────────────────── */
.session-layout {
  display: grid;
  grid-template-columns: 1fr 270px;
  gap: 20px;
  align-items: start;
}

.voice-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

/* 모바일 라이브 콜 슬라이더 전용 요소 — 데스크톱/대기 화면에선 항상 숨김
   (표시 규칙은 모바일 미디어쿼리의 .is-live 블록) */
.vd-track, .vd-caption, .ptt-talk { display: none; }


.mic-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent);
  color: #09090d;
  border: none;
  font-size: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, transform 0.1s, box-shadow 0.25s;
  flex-shrink: 0;
}
.mic-btn:hover { background: #d0ff40; transform: scale(1.06); }
.mic-btn:disabled { background: var(--surface-2); color: var(--muted); opacity: 1; cursor: not-allowed; transform: none; }
/* Button text label — shown only in the mobile pill button, hidden on the desktop circle. */
.mic-label { display: none; }

.mic-btn.live {
  box-shadow: 0 0 0 7px rgba(193, 255, 26, 0.14),
              0 0 0 14px rgba(193, 255, 26, 0.06);
  animation: mic-pulse 2.4s ease-in-out infinite;
}

@keyframes mic-pulse {
  0%, 100% { box-shadow: 0 0 0 7px rgba(193,255,26,0.14), 0 0 0 14px rgba(193,255,26,0.06); }
  50%       { box-shadow: 0 0 0 10px rgba(193,255,26,0.2),  0 0 0 20px rgba(193,255,26,0.08); }
}

.stop-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 18px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}
.stop-btn svg { display: block; }
.stop-btn:not(:disabled):hover { border-color: var(--err); color: var(--err); }
.stop-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.diagnostic-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.9rem;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.diagnostic-toggle input { accent-color: var(--accent); }

.status-pill {
  margin-left: auto;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  letter-spacing: 0.03em;
  border: 1px solid var(--border);
}
.status-pill.live  { background: rgba(0,229,160,0.1);  color: var(--ok);  border-color: rgba(0,229,160,0.2); }
.status-pill.error { background: rgba(255,68,68,0.1);  color: var(--err); border-color: rgba(255,68,68,0.2); }

/* ── Transcript ─────────────────────────────────────────────── */
.transcript {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  min-height: 260px;
  max-height: 500px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bubble {
  max-width: 80%;
  padding: 10px 15px;
  border-radius: 14px;
  font-size: 1rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.bubble .who {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  opacity: 0.5;
  margin-bottom: 4px;
}
.bubble.user {
  align-self: flex-end;
  background: var(--surface-2);
  border-bottom-right-radius: 4px;
}
.bubble.tutor {
  align-self: flex-start;
  background: rgba(193, 255, 26, 0.07);
  border: 1px solid rgba(193, 255, 26, 0.1);
  border-bottom-left-radius: 4px;
}

/* ── Session sidebar ────────────────────────────────────────── */
.session-aside {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
}

.aside-label {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.session-aside ul {
  padding-left: 16px;
  color: var(--text);
  opacity: 0.8;
  font-size: 1rem;
  line-height: 1.75;
}

.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.chip {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--border);
  letter-spacing: 0.03em;
}
.chip.accent { background: rgba(193,255,26,0.1); color: var(--accent); border-color: rgba(193,255,26,0.18); }
.chip.ok     { background: rgba(0,229,160,0.1);  color: var(--ok);    border-color: rgba(0,229,160,0.18); }
.chip.rec    { background: var(--accent); color: #09090d; border-color: transparent; }
.chip.ghost  { background: transparent; }

/* ── Session report ─────────────────────────────────────────── */
.report {
  margin-top: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}
.report.hidden { display: none; }

.report-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

/* (구 .report-cefr/.report-grid/.report-cell + .report h3/ul/p 일반 셀렉터 제거 —
   리포트 v2(.rpt-*)는 자체 스코프 클래스만 사용. 일반 셀렉터가 카드 내부 <p>에 누수되던 문제 해결.) */

/* ── Lessons ────────────────────────────────────────────────── */
.lesson-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.lesson-card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.12s;
}
.lesson-card:hover { border-color: var(--muted); }
.lesson-card.recommended { border-color: rgba(193,255,26,0.4); }
.lesson-card.done { opacity: 0.55; }
.lesson-card.done:hover { opacity: 0.75; }

.lesson-card-bg {
  position: absolute;
  right: -6px;
  top: -10px;
  font-size: 5.2rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  color: var(--border);
  pointer-events: none;
  user-select: none;
  line-height: 1;
}
.lesson-card.recommended .lesson-card-bg { color: rgba(193,255,26,0.07); }

.lesson-card-top { display: flex; gap: 6px; flex-wrap: wrap; position: relative; }

.lesson-card h3 {
  position: relative;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.35;
  margin-top: 6px;
}

.lesson-card p {
  position: relative;
  font-size: 1rem;
  color: var(--text);
  opacity: 0.75;
  line-height: 1.6;
  flex: 1;
}

.lesson-card-foot { position: relative; margin-top: 14px; }

.lesson-link {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.01em;
  transition: color 0.12s;
}
.lesson-link:hover { color: #d0ff40; }

/* ── Panel / box ────────────────────────────────────────────── */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 12px;
}

.panel-label {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

.panel ul { padding-left: 18px; color: var(--text); opacity: 0.8; font-size: 1rem; line-height: 1.85; }

/* ── Progress: stat row ─────────────────────────────────────── */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.stat-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
}

.stat-label {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.stat-value {
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}
.stat-value.accent { color: var(--accent); }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

/* ── Data table ─────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
}
.data-table th, .data-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.data-table th {
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--surface-2); }

/* ── Reviews ────────────────────────────────────────────────── */
.review-wrap { max-width: 580px; }

/* Progress bar */
.rv-progress-bar { margin-bottom: 24px; }
.rv-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.rv-progress-count { font-size: 1rem; color: var(--text); }
.rv-progress-count b { font-size: 1.1rem; color: var(--accent); font-family: var(--font-latin); }
.rv-progress-remaining { font-size: 0.88rem; color: var(--muted); }
.rv-track { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.rv-fill { height: 100%; background: var(--accent); border-radius: 999px; transition: width 0.4s cubic-bezier(.4,0,.2,1); }

/* Shadowing card */
.flashcard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 36px 32px;
  min-height: 200px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  animation: rv-reveal 0.35s ease;
}
.flashcard.hidden { display: none; }

/* Full-fit, no-scroll review: the whole screen locks to the viewport so a
   horizontal swipe never leaks into a vertical page scroll. Swipe-only. */
html.has-review, html.has-review body { height: 100%; overflow: hidden; overscroll-behavior: none; }
html.has-review .page {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-top: calc(var(--nav-h) + env(safe-area-inset-top) + 14px);
  padding-bottom: calc(env(safe-area-inset-bottom) + 8px);
}
html.has-review .hero { margin-bottom: 14px; }
html.has-review .hero .sub { display: none; }   /* reclaim height for the card */
.rv-shadow { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.rv-cardwrap { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; }

/* Swipe card: owns all touch on it (no scroll/zoom leak). */
.rv-card { position: relative; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; will-change: transform; width: 100%; }

/* Decision stamps revealed while dragging (완료 left / 한번 더 right). */
.rv-stamp {
  position: absolute; top: 16px; z-index: 2;
  font-size: 1.05rem; font-weight: 800; letter-spacing: 0.02em;
  padding: 6px 14px; border-radius: 10px; border: 2.5px solid;
  opacity: 0; pointer-events: none;
}
.rv-stamp.done { left: 16px; color: var(--accent); border-color: var(--accent); transform: rotate(-11deg); }
.rv-stamp.hold { right: 16px; color: #ffcf5a; border-color: #ffcf5a; transform: rotate(11deg); }

/* Swipe hint — hand-drawn curved arrows instead of text. Colors mirror the
   decision stamps (완료 = accent / 한번 더 = amber) so direction reads at a glance. */
.rv-swipe-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 44px;
  margin-top: 14px;
}
.rv-swipe-hint.hidden { display: none; }
.rv-hint-side { display: inline-flex; align-items: center; gap: 9px; }
.rv-hint-label { font-size: 0.88rem; font-weight: 700; letter-spacing: 0.01em; }
.rv-hint-done { color: var(--accent); }
.rv-hint-hold { color: #ffcf5a; }
.rv-hint-arrow { display: block; opacity: 0.9; }
.rv-hint-arrow path {
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
/* Gentle nudge in each swipe direction — a quiet affordance, not a shout. */
.rv-hint-done .rv-hint-arrow { animation: rv-nudge-l 2.4s ease-in-out infinite; }
.rv-hint-hold .rv-hint-arrow { animation: rv-nudge-r 2.4s ease-in-out infinite; }
@keyframes rv-nudge-l {
  0%, 100% { transform: rotate(4deg) translateX(0); }
  50%      { transform: rotate(4deg) translateX(-3px); }
}
@keyframes rv-nudge-r {
  0%, 100% { transform: rotate(-4deg) translateX(0); }
  50%      { transform: rotate(-4deg) translateX(3px); }
}

/* Gesture demo — a ghost fingertip that presses down on the card, then drags
   left (완료) and, on the next pass, right (한번 더). Neutral white so it reads
   as a finger, not a decision. Removed by JS on the first real pointerdown. */
.rv-touch-demo {
  position: absolute;
  left: 50%;
  bottom: 15%;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  animation: rv-demo-move 5.6s ease-in-out 0.9s infinite;
}
.rv-touch-dot {
  position: relative;
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  border: 2px solid rgba(255, 255, 255, 0.55);
  animation: rv-demo-press 5.6s ease-in-out 0.9s infinite;
}
.rv-touch-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  opacity: 0;
  animation: rv-demo-ring 5.6s ease-out 0.9s infinite;
}
/* Timeline: appear center → press → drag left → fade / appear → press → drag right → fade */
@keyframes rv-demo-move {
  0%   { transform: translateX(-50%); opacity: 0; }
  5%   { transform: translateX(-50%); opacity: 1; }
  12%  { transform: translateX(-50%); opacity: 1; }
  32%  { transform: translateX(calc(-50% - 80px)); opacity: 1; }
  38%  { transform: translateX(calc(-50% - 80px)); opacity: 0; }
  50%  { transform: translateX(-50%); opacity: 0; }
  55%  { transform: translateX(-50%); opacity: 1; }
  62%  { transform: translateX(-50%); opacity: 1; }
  82%  { transform: translateX(calc(-50% + 80px)); opacity: 1; }
  88%  { transform: translateX(calc(-50% + 80px)); opacity: 0; }
  100% { transform: translateX(-50%); opacity: 0; }
}
@keyframes rv-demo-press {
  0%, 5%    { transform: scale(1); }
  9%        { transform: scale(0.7); }
  12%, 32%  { transform: scale(0.82); }
  38%, 55%  { transform: scale(1); }
  59%       { transform: scale(0.7); }
  62%, 82%  { transform: scale(0.82); }
  88%, 100% { transform: scale(1); }
}
@keyframes rv-demo-ring {
  0%, 7% { transform: scale(0.8); opacity: 0; }
  9%     { transform: scale(1); opacity: 0.7; }
  20%    { transform: scale(2.1); opacity: 0; }
  57%    { transform: scale(0.8); opacity: 0; }
  59%    { transform: scale(1); opacity: 0.7; }
  70%    { transform: scale(2.1); opacity: 0; }
  100%   { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .rv-hint-done .rv-hint-arrow { animation: none; transform: rotate(4deg); }
  .rv-hint-hold .rv-hint-arrow { animation: none; transform: rotate(-4deg); }
  .rv-touch-demo { display: none; }
}

.card-type-badge {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 5px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.card-front { font-size: 1.6rem; font-weight: 700; line-height: 1.4; color: var(--text); }
.card-back  { font-size: 1.05rem; font-weight: 500; color: var(--muted); line-height: 1.5; }
.card-example { font-size: 0.98rem; color: var(--muted); font-style: italic; opacity: 0.85; }

/* Inline "듣기" replay chip under the expression */
.rv-replay {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid rgba(193,255,26,0.35);
  background: rgba(193,255,26,0.08);
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.rv-replay:hover { background: rgba(193,255,26,0.16); border-color: var(--accent); }
.rv-replay-ico { display: block; }

.rv-shadow-hint {
  margin-top: 4px;
  font-size: 0.92rem;
  color: var(--muted);
  animation: rv-pulse 2s ease-in-out infinite;
}

@keyframes rv-reveal {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes rv-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 0.95; }
}

/* Focused review mode: hide the bottom tab bar + support FAB so the swipe card
   owns a clean, distraction-free viewport (mirrors the session screen). */
html.has-review .mobile-nav,
html.is-app.has-review .mobile-nav { display: none; }
html.has-review .ss-fab { display: none; }

/* Done screen */
.review-done {
  text-align: center;
  padding: 40px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.rv-done-check { color: var(--accent); margin-bottom: 16px; }
.rv-done-title { font-size: 1.5rem; font-weight: 700; color: var(--text); letter-spacing: -0.03em; margin-bottom: 10px; }
.rv-done-sub { font-size: 1rem; color: var(--muted); line-height: 1.6; }
.rv-done-cta {
  margin-top: 24px;
  padding: 13px 30px;
  border-radius: 999px;
  background: var(--accent);
  color: #09090d;
  font-weight: 700;
  font-size: 1rem;
}
.rv-done-cta:hover { background: #d0ff40; }

/* ── Profile ────────────────────────────────────────────────── */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.profile-stat {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 0.9rem;
}
.profile-stat .stat-key {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: 5px;
}

.profile-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 20px 0 8px;
}

.profile-list {
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.85;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 28px 0;
}

.profile-form textarea {
  width: 100%;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  font: inherit;
  font-size: 0.9rem;
  resize: vertical;
  transition: border-color 0.15s;
  outline: none;
}
.profile-form textarea:focus { border-color: var(--accent); }
.profile-form input[type="file"] { color: var(--muted); font-size: 0.84rem; font-family: inherit; }

.form-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  flex-wrap: wrap;
}

/* ── Memory ─────────────────────────────────────────────────── */
.mem-list {
  list-style: none;
}

.mem-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.mem-item:last-child { border-bottom: none; }
.mem-item .text { flex: 1; color: var(--muted); line-height: 1.55; }

.del-btn {
  background: transparent;
  border: none;
  color: var(--border);
  font-size: 0.78rem;
  cursor: pointer;
  padding: 3px 7px;
  border-radius: 4px;
  transition: color 0.12s, background 0.12s;
  flex-shrink: 0;
  line-height: 1;
}
.del-btn:hover { color: var(--err); background: rgba(255,68,68,0.08); }

/* ── Error / success messages ───────────────────────────────── */
.error-msg {
  color: var(--err);
  background: rgba(255,68,68,0.08);
  border: 1px solid rgba(255,68,68,0.18);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.88rem;
  margin-top: 12px;
}

/* ── Login page ─────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.login-bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  user-select: none;
  overflow: hidden;
}

.login-bg-glow {
  position: absolute;
  top: 32%;
  left: 50%;
  width: 80vw;
  height: 80vw;
  max-width: 640px;
  max-height: 640px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(193,255,26,0.10), rgba(193,255,26,0) 62%);
  filter: blur(20px);
}

.login-bg-word {
  font-size: clamp(10rem, 28vw, 22rem);
  font-weight: 700;
  letter-spacing: -0.07em;
  color: rgba(255,255,255,0.025);
  line-height: 1;
  white-space: nowrap;
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 44px 40px;
  width: min(440px, 100%);
  text-align: center;
  position: relative;
  z-index: 1;
}

.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.login-logo-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
}

.login-tagline {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 32px;
  line-height: 1.55;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

/* SSO Buttons */
.sso-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}

.sso-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 13px 24px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: filter 0.15s, transform 0.1s;
  width: 100%;
  text-decoration: none;
}
.sso-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.sso-btn:active { transform: translateY(0); }

.sso-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Kakao */
.sso-kakao {
  background: #FEE500;
  color: #191919;
}
.sso-kakao:hover { background: #FEE500; }

/* Naver */
.sso-naver {
  background: #03C75A;
  color: #fff;
}
.sso-naver:hover { background: #03C75A; }

/* Google */
.sso-google {
  background: #fff;
  color: #1a1a1a;
  border: 1px solid rgba(255,255,255,0.15);
}
.sso-google:hover { background: #f5f5f5; }

.login-dev-link {
  display: block;
  margin-top: 22px;
  font-size: 0.8rem;
  color: var(--muted);
  transition: color 0.12s;
}
.login-dev-link:hover { color: var(--text); }

.login-footer-links {
  margin-top: 24px;
  font-size: 0.76rem;
  color: var(--muted);
}
.login-footer-links a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.12s;
}
.login-footer-links a:hover { color: var(--text); }
.login-footer-links .sep { margin: 0 6px; opacity: 0.4; }

/* ── Onboarding page ───────────────────────────────────────── */
.onboarding-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.onboarding-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 44px 40px;
  width: min(480px, 100%);
  position: relative;
  z-index: 1;
  text-align: center;
}

.onboarding-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.onboarding-subtitle {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 28px;
}

.onboarding-form {
  text-align: left;
}

.form-group {
  margin-bottom: 22px;
}

.form-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.form-label .required { color: var(--accent); }

.form-input {
  width: 100%;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.15s;
  outline: none;
}
.form-input:focus { border-color: var(--accent); }

.form-hint {
  font-size: 0.84rem;
  color: var(--muted);
  margin-top: 6px;
}

/* Agreement checkboxes */
.agreement-group {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
}

.agreement-divider {
  border-top: 1px solid var(--border);
  margin: 10px 0;
}

.agreement-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 7px 0;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--muted);
}

.agreement-check input[type="checkbox"] {
  display: none;
}

.check-mark {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 5px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, border-color 0.12s;
  margin-top: 1px;
}

.agreement-check input:checked + .check-mark {
  background: var(--accent);
  border-color: var(--accent);
}

.agreement-check input:checked + .check-mark::after {
  content: '✓';
  color: #09090d;
  font-size: 0.72rem;
  font-weight: 700;
}

.check-text b { color: var(--text); }

.agreement-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.agreement-link:hover { color: #d0ff40; }

.all-check {
  font-weight: 600;
}
.all-check .check-text { color: var(--text); }

.onboarding-submit {
  width: 100%;
  margin-top: 8px;
  padding: 14px;
  font-size: 1rem;
  border-radius: 12px;
}

/* ── Multi-step Onboarding ───────────────────────────────── */
.onboarding-card--wide {
  width: min(540px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.ob-progress {
  width: 100%;
  height: 4px;
  background: var(--surface-2);
  border-radius: 4px;
  margin: 16px 0 4px;
  overflow: hidden;
}
.ob-progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.ob-step-label {
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 18px;
  font-weight: 500;
}

/* Step visibility & animation */
.ob-step {
  display: none;
  animation: ob-fade-in 0.35s ease;
}
.ob-step.active { display: block; }
.ob-step.exit {
  animation: ob-fade-out 0.25s ease forwards;
}

@keyframes ob-fade-in {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes ob-fade-out {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(-24px); }
}

/* Shake for validation */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}
.shake { animation: shake 0.35s ease; border-color: var(--err) !important; }

/* Navigation buttons */
.ob-nav {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.ob-nav .ob-next, .ob-nav .onboarding-submit {
  flex: 1;
}
.ob-next {
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  border-radius: 12px;
}
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 20px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-ghost:hover {
  border-color: var(--text);
  color: var(--text);
}

/* Select dropdown */
.form-select {
  width: 100%;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit;
  font-size: 1rem;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='%23888'%3E%3Cpath d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  transition: border-color 0.15s;
}
.form-select:focus { border-color: var(--accent); }

.optional-tag {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.84rem;
}

/* ── Chip grid (goals / interests) ─────────────────────────── */
.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip-item {
  cursor: pointer;
}
.chip-item input[type="checkbox"] { display: none; }
.chip-item .chip {
  display: inline-block;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.95rem;
  color: var(--muted);
  transition: all 0.18s;
  user-select: none;
}
.chip-item .chip:hover {
  border-color: var(--accent);
  color: var(--text);
}
.chip-item input:checked + .chip {
  background: rgba(193, 255, 26, 0.12);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

/* ── Level cards ───────────────────────────────────────────── */
.level-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
}
.level-item { cursor: pointer; }
.level-item input[type="radio"] { display: none; }
.level-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 16px 10px 14px;
  transition: all 0.18s;
  text-align: center;
}
.level-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.level-item input:checked + .level-card {
  background: rgba(193, 255, 26, 0.1);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.level-emoji { font-size: 1.6rem; }
.level-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}
.level-desc {
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.3;
}
.level-item input:checked + .level-card .level-name {
  color: var(--accent);
}

/* ── Onboarding responsive ─────────────────────────────────── */
@media (max-width: 480px) {
  .onboarding-card--wide {
    padding: 28px 22px;
  }
  .level-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── Legal pages (Terms / Privacy) ─────────────────────────── */
.legal-page {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.legal-header {
  padding: 18px clamp(20px, 5vw, 60px);
  border-bottom: 1px solid var(--border);
}
.legal-header .brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.legal-header .brand-mark { width: 28px; height: 28px; }
.legal-header .brand-word { font-size: 1.2rem; font-weight: 700; }

.legal-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px clamp(20px, 5vw, 60px) 80px;
  flex: 1;
}

.legal-body h1 {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.legal-meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 36px;
}

.legal-body section {
  margin-bottom: 36px;
}

.legal-body h2 {
  font-size: 1.12rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.legal-body h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 16px 0 8px;
  color: var(--text);
}

.legal-body p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 10px;
}

.legal-body ol, .legal-body ul {
  padding-left: 20px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.85;
  margin-bottom: 12px;
}

.legal-body li { margin-bottom: 4px; }
.legal-body li ul, .legal-body li ol { margin-top: 6px; }

.legal-body table, .legal-body .info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin: 12px 0 18px;
}
.legal-body table th, .legal-body table td {
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--border);
  color: var(--muted);
}
.legal-body table th {
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
  font-size: 0.82rem;
}
.legal-body table td:first-child {
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
}

.legal-operator table {
  max-width: 400px;
}

.legal-footer {
  padding: 20px clamp(20px, 5vw, 60px);
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
}
.legal-footer a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.12s;
}
.legal-footer a:hover { color: var(--text); }
.legal-footer span { margin: 0 8px; opacity: 0.4; }

/* ── Landing page ───────────────────────────────────────────── */
.landing-page {
  min-height: 100vh;
  overflow-x: hidden;
}

.landing-nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 200;
  display: flex;
  align-items: center;
  padding: 0 clamp(20px, 5vw, 60px);
  background: rgba(9, 9, 13, 0.9);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-bottom: 1px solid var(--border);
  gap: 24px;
}

.landing-nav .nav-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  color: var(--text);
  flex-shrink: 0;
}

.landing-nav .nav-end {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.landing-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px clamp(20px, 6vw, 80px) 80px;
  position: relative;
  overflow: hidden;
}

.landing-hero-bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  user-select: none;
  overflow: hidden;
}

.landing-hero-word {
  font-size: clamp(14rem, 40vw, 32rem);
  font-weight: 700;
  letter-spacing: -0.07em;
  color: rgba(193, 255, 26, 0.03);
  line-height: 1;
  white-space: nowrap;
}

.landing-hero-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 22px;
  position: relative;
  z-index: 1;
}

.landing-hero h1 {
  font-size: clamp(2.8rem, 7vw, 5.6rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  max-width: 860px;
  position: relative;
  z-index: 1;
}

.landing-hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.landing-hero .sub {
  margin-top: 20px;
  color: var(--muted);
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  max-width: 560px;
  line-height: 1.65;
  position: relative;
  z-index: 1;
}

.landing-hero-cta {
  margin-top: 40px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.landing-hero-cta .btn-primary {
  font-size: 1rem;
  padding: 14px 32px;
  border-radius: 10px;
}

.landing-hero-cta .btn-secondary {
  font-size: 1rem;
  padding: 14px 32px;
  border-radius: 10px;
}

/* Landing sections */
.landing-section {
  padding: clamp(64px, 8vw, 120px) clamp(20px, 6vw, 80px);
  max-width: 1200px;
  margin: 0 auto;
}

.landing-section-full {
  padding: clamp(64px, 8vw, 120px) clamp(20px, 6vw, 80px);
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.landing-section-full > .landing-section {
  padding-top: 0;
  padding-bottom: 0;
}

.section-eyebrow {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.section-sub {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 580px;
  margin-bottom: 52px;
}

/* Differentiators grid */
.diff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.diff-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.14s, background 0.14s;
}
.diff-card:hover { border-color: rgba(193,255,26,0.25); background: var(--surface-2); }

.diff-icon {
  font-size: 2rem;
  line-height: 1;
}

.diff-card h3 {
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.3;
}

.diff-card p {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.6;
}

/* Comparison table */
.compare-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 18px;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

.compare-table th {
  text-align: center;
  padding: 16px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.compare-table th:first-child { text-align: left; }

.compare-table th.sori-col {
  color: var(--accent);
  background: rgba(193,255,26,0.04);
}

.compare-table td {
  text-align: center;
  padding: 13px 14px;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  word-break: keep-all; /* "턴 방식"이 "방 식"으로 단어 중간 줄바꿈되던 것 */
}
.compare-table td:first-child {
  text-align: left;
  color: var(--text);
  font-weight: 500;
  font-size: 0.93rem;
}
.compare-table td.sori-col {
  background: rgba(193,255,26,0.04);
  color: var(--text);
  font-weight: 600;
}
.compare-table tbody tr:last-child td { border-bottom: none; }
.compare-table tbody tr:hover td { background: var(--surface-2); }
.compare-table tbody tr:hover td.sori-col { background: rgba(193,255,26,0.06); }

.check   { color: var(--ok); font-size: 1.1rem; }
.cross   { color: var(--muted); opacity: 0.4; font-size: 1.1rem; }
.partial { color: #ffc800; font-size: 1.05rem; }

/* Tutor preview strip */
.tutor-strip {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.tutor-preview-card {
  flex-shrink: 0;
  width: 140px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 14px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: border-color 0.14s;
}
.tutor-preview-card:hover { border-color: rgba(193,255,26,0.3); }

.tutor-preview-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 4px;
}

.tutor-preview-name {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
}

.tutor-preview-sub {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.3;
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 960px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.14s;
}
.pricing-card:hover { border-color: var(--muted); }
.pricing-card.featured {
  border-color: rgba(193,255,26,0.4);
  background: linear-gradient(160deg, rgba(193,255,26,0.05) 0%, var(--surface) 70%);
  position: relative;
}

.pricing-badge {
  display: inline-block;
  background: var(--accent);
  color: #09090d;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
  align-self: flex-start;
}

.pricing-plan {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.pricing-price {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--text);
}

.pricing-price sup {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0;
  vertical-align: super;
}

.pricing-period {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 14px;
}

.pricing-credit {
  display: inline-block;
  background: rgba(193,255,26,0.1);
  color: var(--accent);
  border: 1px solid rgba(193,255,26,0.2);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 18px;
  align-self: flex-start;
}

.pricing-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 18px 0;
}

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.pricing-features li {
  font-size: 0.92rem;
  color: var(--muted);
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.45;
}

.pricing-features li::before {
  content: "✓";
  color: var(--ok);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.pricing-features li.no { color: rgba(99,99,122,0.5); }
.pricing-features li.no::before { content: "—"; color: var(--border); }

.pricing-cta {
  margin-top: 26px;
  width: 100%;
  padding: 13px;
  font-size: 0.95rem;
}

/* Landing footer */
.landing-footer {
  border-top: 1px solid var(--border);
  padding: 40px clamp(20px, 6vw, 80px);
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.landing-footer-links {
  margin-bottom: 10px;
  font-size: 0.78rem;
}
.landing-footer-links a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.12s;
}
.landing-footer-links a:hover { color: var(--text); }
.landing-footer-links span { margin: 0 6px; opacity: 0.4; }
.landing-footer-biz {
  margin: 0 0 8px;
  font-size: 0.72rem;
  line-height: 1.6;
  opacity: 0.75;
}

/* ── Tutor selection page ────────────────────────────────────── */
.tutor-page-header {
  margin-bottom: 32px;
}

.tutor-page-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 8px;
}

.tutor-page-header p {
  color: var(--muted);
  font-size: 1rem;
}

.tutor-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  align-items: center;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.filter-group-label {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding-right: 4px;
}

.filter-divider {
  width: 1px;
  height: 22px;
  background: var(--border);
  margin: 0 8px;
}

.filter-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.12s;
}
.filter-btn:hover { border-color: var(--muted); color: var(--text); }
.filter-btn.active { background: rgba(193,255,26,0.1); color: var(--accent); border-color: rgba(193,255,26,0.3); }

.tutor-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.tutor-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px 18px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  transition: border-color 0.14s, background 0.14s;
  position: relative;
}
.tutor-card:hover { border-color: rgba(193,255,26,0.3); background: var(--surface-2); }
.tutor-card.selected {
  border-color: var(--accent);
  background: rgba(193,255,26,0.05);
}
.tutor-card.hidden-card { display: none; }

.tutor-selected-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3; /* above the full-bleed avatar image */
  background: var(--accent);
  color: #09090d;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 5px 13px;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.45);
}

.tutor-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 6px;
  flex-shrink: 0;
}

.tutor-name {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
}

.tutor-name-ko {
  font-size: 0.92rem;
  color: var(--muted);
  margin-top: 2px;
}

.tutor-accent {
  font-size: 0.88rem;
  color: var(--text);
  opacity: 0.6;
}

.tutor-persona {
  font-size: 0.95rem;
  color: var(--text);
  opacity: 0.7;
  line-height: 1.55;
  margin-top: 4px;
}

.tutor-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin-top: 6px;
}

.tutor-tag {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--border);
}

.tutor-card.selected .tutor-tag {
  background: rgba(193,255,26,0.08);
  border-color: rgba(193,255,26,0.15);
}

.tutor-select-btn {
  margin-top: 12px;
  width: 100%;
  padding: 11px;
  font-size: 0.95rem;
  border-radius: 10px;
}

/* Current tutor banner (home page) */
.current-tutor-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 24px;
  transition: border-color 0.14s;
}
.current-tutor-bar:hover { border-color: rgba(193,255,26,0.3); }

.current-tutor-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.current-tutor-info { flex: 1; }
.current-tutor-info .label {
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3px;
}
.current-tutor-info .name { font-size: 1rem; font-weight: 700; }
.current-tutor-info .sub  { font-size: 0.82rem; color: var(--muted); }

/* Credit bar */
.credit-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 0.88rem;
}

.credit-icon { color: var(--accent); font-size: 1rem; }
.credit-count { font-weight: 700; color: var(--text); }
.credit-label { color: var(--muted); }
.credit-bar a { color: var(--accent); font-weight: 600; margin-left: auto; font-size: 0.82rem; }

/* ── Utilities ──────────────────────────────────────────────── */
.hidden   { display: none !important; }
.muted    { color: var(--muted); }
.sep      { border: none; border-top: 1px solid var(--border); margin: 26px 0; }

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ── Mobile ─────────────────────────────────────────────────── */
.mobile-nav { display: none; }

@media (max-width: 720px) {
  .nav-links { display: none; }

  .page {
    padding-top: calc(var(--nav-h) + 32px + env(safe-area-inset-top));
    padding-bottom: calc(90px + env(safe-area-inset-bottom));
  }

  .hero h1 { font-size: 2rem; }

  .action-strip { grid-template-columns: repeat(2, 1fr); }

  .session-layout { grid-template-columns: 1fr; }

  .stat-row { grid-template-columns: 1fr 1fr; }

  .two-col { grid-template-columns: 1fr; }

  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }

  .tutor-grid { grid-template-columns: repeat(2, 1fr); }

  .landing-hero h1 { font-size: 2.6rem; }

  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 200;
    background: rgba(9, 9, 13, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    flex-direction: row;
    /* Overflow must stay visible here so the raised 대화 FAB can protrude
       above the bar — horizontal scrolling lives on .mnav-scroll instead. */
    overflow: visible;
    padding-bottom: max(6px, env(safe-area-inset-bottom));
  }

  /* Scroll wrapper: horizontal swipe reveals the admin tabs. The FAB sits
     OUTSIDE this element (direct child of .mobile-nav) so its protruding top
     half is not clipped by this container's overflow. */
  .mnav-scroll {
    display: flex;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .mnav-scroll::-webkit-scrollbar { display: none; }

  /* Core tabs: always visible, fill width evenly */
  .mnav-core {
    display: flex;
    flex: 1 0 100%;
    min-width: 100%;
    justify-content: space-around;
    align-items: stretch;
  }

  /* Admin tabs: off-screen to the right, slide to reveal */
  .mnav-admin {
    display: flex;
    flex-shrink: 0;
    gap: 0;
    border-left: 1px solid var(--border);
    padding-left: 4px;
  }

  .mobile-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0.03em;
    padding: 12px 14px 8px;
    min-height: 62px;
    min-width: 56px;
    transition: color 0.12s;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .mobile-nav a.active { color: var(--accent); }

  .mnav-ic {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
  }
  .mobile-nav a.active .mnav-ic {
    filter: drop-shadow(0 0 4px rgba(193,255,26,0.4));
  }
  
  /* Central raised FAB — floats half above the bar, cradled by a dark ring
     that reads as a notch. In-flow spacing is held by .mnav-fab-slot. */
  .mnav-fab-slot {
    min-width: 76px;
    flex-shrink: 0;
  }
  .mobile-nav a.mnav-fab {
    position: absolute;
    left: 50%;
    top: -25px;
    transform: translateX(-50%);
    padding: 0;
    min-height: 0;
    min-width: 76px;
    /* 10px ring gap drops the label onto the same line as the other tabs' */
    gap: 10px;
    color: var(--muted);
  }
  .mnav-fab-bg {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle at 32% 26%, #dcff70 0%, #c1ff1a 45%, #93cc00 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #09090d; /* Dark icon */
    /* Dark ring = the bar visually "opens up" around the button */
    box-shadow:
      0 0 0 6px rgba(9, 9, 13, 0.96),
      0 10px 26px rgba(193, 255, 26, 0.32),
      0 3px 10px rgba(0, 0, 0, 0.55);
    transition: transform 0.2s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.2s;
  }
  .mnav-fab-bg .mnav-ic {
    width: 26px;
    height: 26px;
  }
  .mobile-nav a.mnav-fab.active .mnav-fab-bg {
    box-shadow:
      0 0 0 6px rgba(9, 9, 13, 0.96),
      0 10px 30px rgba(193, 255, 26, 0.55),
      0 3px 10px rgba(0, 0, 0, 0.55);
  }
  .mnav-fab:active .mnav-fab-bg {
    transform: scale(0.9);
  }
  .mnav-fab-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.03em;
  }
  .mobile-nav a.mnav-fab.active { color: var(--accent); }
}

/* ═══════════════════════════════════════════════════════════════
   v2 — dynamic landing, avatar images, voice samples, expressions
   ═══════════════════════════════════════════════════════════════ */

/* ── Scroll-reveal ──────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ── Landing nav extras ─────────────────────────────────────── */
.landing-nav { transition: height 0.2s, background 0.2s; }
.landing-nav.scrolled { height: 52px; background: rgba(9,9,13,0.96); }
.landing-nav-links { display: flex; gap: 32px; margin-left: 48px; }
.landing-nav-links a { color: var(--muted); font-size: 1.05rem; font-weight: 600; transition: color 0.12s; letter-spacing: -0.01em; }
.landing-nav-links a:hover { color: var(--text); }
.landing-nav .btn-primary { font-size: 0.98rem; }

/* ── Hero floating avatars ──────────────────────────────────── */
.hero-orbit { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.orbit-avatar { position: absolute; width: 76px; height: 76px; border-radius: 50%; overflow: hidden; box-shadow: 0 12px 40px rgba(0,0,0,0.45); opacity: 0.92; animation: floaty 7s ease-in-out infinite; border: 2px solid rgba(255,255,255,0.06); }
.orbit-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.orbit-avatar span { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 2rem; }
.orbit-1 { top: 14%;  left: 8%;   width: 88px; height: 88px; animation-delay: 0s;   }
.orbit-2 { top: 22%;  right: 10%; width: 72px; height: 72px; animation-delay: -1.2s; }
.orbit-3 { top: 58%;  left: 5%;   width: 64px; height: 64px; animation-delay: -2.4s; }
.orbit-4 { bottom: 14%; right: 7%; width: 92px; height: 92px; animation-delay: -3.1s; }
.orbit-5 { top: 12%;  left: 44%;  width: 56px; height: 56px; animation-delay: -0.6s; opacity: 0.6; }
.orbit-6 { bottom: 18%; left: 22%; width: 70px; height: 70px; animation-delay: -4s;  }
.orbit-7 { top: 46%;  right: 4%;  width: 60px; height: 60px; animation-delay: -2s;  opacity: 0.7; }
.orbit-8 { bottom: 28%; right: 30%; width: 52px; height: 52px; animation-delay: -5s; opacity: 0.55; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-18px); } }

.hero-scroll-hint { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--muted); font-size: 0.72rem; letter-spacing: 0.12em; z-index: 1; }
.scroll-dot { width: 22px; height: 36px; border: 2px solid var(--border); border-radius: 12px; position: relative; }
.scroll-dot::after { content: ''; position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 4px; height: 7px; border-radius: 2px; background: var(--accent); animation: scrolldot 1.6s ease-in-out infinite; }
@keyframes scrolldot { 0% { opacity: 0; top: 6px; } 40% { opacity: 1; } 80% { opacity: 0; top: 18px; } 100% { opacity: 0; } }

/* ── Stats bar ──────────────────────────────────────────────── */
.landing-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; background: var(--border); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stat-cell { background: var(--bg); padding: 40px 20px; text-align: center; }
.stat-num { font-size: clamp(2.4rem,5vw,3.6rem); font-weight: 700; letter-spacing: -0.04em; color: var(--accent); line-height: 1; }
.stat-cap { margin-top: 8px; color: var(--muted); font-size: 0.9rem; }

/* ── Section helpers ────────────────────────────────────────── */
.section-title .dim, .section-title .hl, .section-title em { font-style: normal; }
.section-title .dim { color: var(--muted); }
.section-title .hl, .section-title em.hl { color: var(--accent); }
.narrative .section-title { margin-bottom: 44px; }

/* ── Problem grid ───────────────────────────────────────────── */
.problem-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(240px,1fr)); gap: 14px; }
.problem-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 26px 24px; }
.problem-card .x { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; background: rgba(255,68,68,0.1); color: var(--err); font-weight: 700; margin-bottom: 14px; }
.problem-card b { display: block; font-size: 1.06rem; margin-bottom: 8px; }
.problem-card p { color: var(--muted); font-size: 0.92rem; line-height: 1.6; }

/* ── Solution row ───────────────────────────────────────────── */
.solution-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-top: 12px; }
.solution-item { padding: 28px 24px; border: 1px solid var(--border); border-radius: 16px; background: var(--bg); }
.solution-num { font-size: 1.6rem; font-weight: 700; color: var(--accent); letter-spacing: -0.03em; }
.solution-item b { display: block; font-size: 1.15rem; margin: 12px 0 8px; }
.solution-item p { color: var(--muted); font-size: 0.92rem; line-height: 1.6; }

/* ── Landing tutor grid (10) ────────────────────────────────── */
.landing-tutor-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.landing-tutor-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 22px 18px; text-align: center; transition: border-color 0.14s, transform 0.14s; }
.landing-tutor-card:hover { border-color: rgba(193,255,26,0.3); transform: translateY(-4px); }
.lt-avatar { position: relative; width: 100%; aspect-ratio: 1 / 1; margin: 0 auto 14px; border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.lt-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; display: block; }
.lt-fallback { width: 100%; height: 100%; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.lt-kids-badge { position: absolute; bottom: 0; right: 0; background: #f9d423; color: #1a1a1a; font-size: 0.58rem; font-weight: 700; letter-spacing: 0.08em; padding: 2px 7px; border-radius: 999px; }
.lt-name { font-size: 1.02rem; font-weight: 700; }
.lt-sub { font-size: 0.78rem; color: var(--muted); margin-top: 4px; line-height: 1.4; min-height: 2.2em; }
.lt-tags { display: flex; gap: 5px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }
.lt-tags span { font-size: 0.66rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }

/* ── Split / personalization ────────────────────────────────── */
.landing-section.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.feature-list { list-style: none; display: flex; flex-direction: column; gap: 14px; margin-top: 28px; }
.feature-list li { padding-left: 26px; position: relative; color: var(--muted); font-size: 0.95rem; line-height: 1.6; }
.feature-list li::before { content: '✓'; position: absolute; left: 0; top: 0; color: var(--accent); font-weight: 700; }
.feature-list li b { color: var(--text); margin-right: 6px; }
.split-visual { display: flex; justify-content: center; }
.memory-card { background: linear-gradient(160deg, rgba(193,255,26,0.06), var(--surface) 70%); border: 1px solid var(--border); border-radius: 22px; padding: 28px; width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 11px; }
.mc-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.mc-chip { background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; padding: 13px 16px; font-size: 0.94rem; animation: mcfloat 5s ease-in-out infinite; }
.mc-chip.accent { background: rgba(193,255,26,0.1); border-color: rgba(193,255,26,0.25); color: var(--accent); font-weight: 600; }
.mc-chip:nth-child(3){ animation-delay: -1s } .mc-chip:nth-child(4){ animation-delay: -2s } .mc-chip:nth-child(5){ animation-delay: -3s } .mc-chip:nth-child(6){ animation-delay: -4s }
@keyframes mcfloat { 0%,100% { transform: translateX(0); } 50% { transform: translateX(5px); } }

/* ── Steps ──────────────────────────────────────────────────── */
.steps-row { display: flex; align-items: stretch; gap: 14px; }
.step-card { flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 30px 26px; }
.step-n { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: #09090d; font-weight: 700; font-size: 1.1rem; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.step-card b { display: block; font-size: 1.15rem; margin-bottom: 8px; }
.step-card p { color: var(--muted); font-size: 0.92rem; line-height: 1.6; }
.step-arrow { display: flex; align-items: center; color: var(--muted); font-size: 1.5rem; }

/* ── Kids section ───────────────────────────────────────────── */
.kids-section { text-align: center; }
.kids-inner { background: linear-gradient(160deg, rgba(249,212,35,0.06), rgba(248,54,0,0.04)); border: 1px solid rgba(249,212,35,0.2); border-radius: 28px; padding: 56px 40px; }
.kids-emoji { font-size: 3rem; margin-bottom: 16px; }
.kids-section .section-sub { max-width: 600px; }

/* ── Final CTA ──────────────────────────────────────────────── */
.landing-final { position: relative; text-align: center; padding: clamp(80px,12vw,150px) 20px; overflow: hidden; }
.landing-final-bg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.landing-final-bg span { font-size: clamp(12rem,30vw,26rem); font-weight: 700; letter-spacing: -0.07em; color: rgba(193,255,26,0.03); line-height: 1; }
.landing-final h2 { position: relative; font-size: clamp(2.2rem,5vw,3.6rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1.1; margin-bottom: 18px; }
.landing-final p { position: relative; color: var(--muted); font-size: 1.05rem; margin-bottom: 36px; }
.landing-final .btn { position: relative; }

/* ── Tutor card: avatar image + voice sample ────────────────── */
.tutor-avatar-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin-bottom: 12px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-2);
}
.tutor-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease;
}
.tutor-avatar-wrap:hover .tutor-avatar-img {
  transform: scale(1.03);
}
.tutor-avatar-wrap .tutor-avatar {
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 14px;
  font-size: 3rem;
}
.voice-sample-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #09090d;
  border: 2px solid var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.12s, background 0.12s;
  z-index: 10;
}
.tutor-card:hover .voice-sample-btn { transform: scale(1.08); }
.voice-sample-btn .icon-play { margin-left: 1px; }
.voice-sample-btn.playing { background: var(--ok); }
.voice-sample-btn.loading .icon-loading { animation: spin 0.7s linear infinite; }
.voice-sample-btn.sample-missing { background: var(--muted); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Session avatar (expression-reactive) ───────────────────── */
.session-avatar { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; padding: 16px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; }
.session-avatar-img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; flex-shrink: 0; transition: box-shadow 0.2s, transform 0.2s; background: var(--surface-2); }
.session-avatar-img.speaking { box-shadow: 0 0 0 4px rgba(193,255,26,0.18), 0 0 0 10px rgba(193,255,26,0.07); animation: avspeak 1.1s ease-in-out infinite; }
@keyframes avspeak { 0%,100% { transform: scale(1); } 50% { transform: scale(1.03); } }
.session-avatar-fallback { width: 96px; height: 96px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 3rem; flex-shrink: 0; }
.session-avatar-name { font-size: 1.15rem; font-weight: 700; }
.session-avatar-state { margin-top: 4px; font-size: 0.9rem; color: var(--accent); }

/* ── v2 mobile ──────────────────────────────────────────────── */
@media (max-width: 860px) {
  .landing-section.split { grid-template-columns: 1fr; gap: 32px; }
  .solution-row { grid-template-columns: 1fr; }
  .steps-row { flex-direction: column; }
  .step-arrow { justify-content: center; transform: rotate(90deg); }
}
@media (max-width: 720px) {
  .hero-orbit { display: none; }
  .landing-nav-links { display: none; }
  .landing-stats { grid-template-columns: repeat(2,1fr); }
  .landing-tutor-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 500px) {
  /* 모바일: 튜터 카드 2열 (1열이면 아바타가 화면폭 정사각형이라 너무 큼) */
  .tutor-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .tutor-card { padding: 14px 11px 13px; border-radius: 14px; }
  .tutor-avatar-wrap { margin-bottom: 9px; }
  .landing-tutor-grid { grid-template-columns: 1fr; gap: 16px; }
}

/* ═══════════════════════════════════════════════════════════════
   Typography — editorial, 영역별 (Pretendard 본문 · GmarketSans 디스플레이 ·
   Space Grotesk 숫자/라틴 · Jua 키즈 · Black Han Sans 데코)
   ═══════════════════════════════════════════════════════════════ */

/* 디스플레이 헤드라인 → GmarketSans */
.hero h1,
.section-title,
.landing-hero h1,
.landing-final h2,
.tutor-page-header h1,
.review-done .big,
.pricing-plan {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.landing-hero h1 { letter-spacing: -0.03em; }
.pricing-plan { letter-spacing: 0.04em; }

/* 라틴 / 숫자 / 로고 → Space Grotesk (기하학적 숫자 유지) */
.brand-word,
.stat-num,
.stat-value,
.pricing-price,
.report-cefr,
.lesson-card-bg,
.solution-num,
.step-n,
.mobile-nav-icon {
  font-family: var(--font-latin);
}

/* 거대 데코 "소리" 워터마크 → Black Han Sans */
.landing-hero-word,
.login-bg-word,
.landing-final-bg span {
  font-family: var(--font-heavy);
  font-weight: 400;
}

/* 어린이 영역 → Jua (둥글고 친근) */
.kids-inner .section-title,
.lt-kids-badge {
  font-family: var(--font-round);
}
.kids-inner .section-title { letter-spacing: 0; font-weight: 400; }

/* 아이브로우(한글) → 본문 폰트 + 트래킹 */
.section-eyebrow,
.landing-hero-eyebrow { font-family: var(--font-body); font-weight: 700; }

/* ── Brand logo (좌측 상단 아이덴티티) ───────────────────────── */
.brand { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.brand-mark {
  width: 28px; height: 28px; display: block; flex-shrink: 0;
  transition: transform 0.18s ease;
}
.brand:hover .brand-mark { transform: rotate(-6deg) scale(1.06); }
.brand-word {
  font-family: var(--font-latin);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1;
}
.brand-accent { color: var(--accent); }

.landing-nav .brand-word { font-size: 1.36rem; }
.login-logo .brand-mark { width: 34px; height: 34px; }
.login-logo .brand-word { font-size: 1.78rem; letter-spacing: -0.03em; }

/* ═══════════════════════════════════════════════════════════════
   Landing v3 — dynamic funnel (hero mockup · feature mockups · FAQ)
   ═══════════════════════════════════════════════════════════════ */

/* scroll progress */
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; z-index: 300; transition: transform 0.08s linear; }

/* ── HERO v3 ─────────────────────────────────────────────────── */
.hero-v3 { position: relative; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: calc(var(--nav-h) + 40px + env(safe-area-inset-top)) clamp(20px,5vw,72px) calc(60px + env(safe-area-inset-bottom)); overflow: hidden; }
.hero-v3-glow { position: absolute; top: -20%; left: 50%; width: 90vw; height: 80vh; transform: translateX(-50%); background: radial-gradient(ellipse at center, rgba(193,255,26,0.10), transparent 60%); pointer-events: none; }
.hero-v3-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px,5vw,72px); align-items: center; max-width: 1240px; margin: 0 auto; width: 100%; }
.hero-v3-eyebrow { display: inline-flex; align-items: center; gap: 9px; font-size: 0.92rem; font-weight: 700; color: var(--accent); letter-spacing: 0.01em; margin-bottom: 22px; }
.pulse-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(193,255,26,0.5); animation: pdot 1.8s infinite; }
@keyframes pdot { 0%{box-shadow:0 0 0 0 rgba(193,255,26,0.5)} 70%{box-shadow:0 0 0 10px rgba(193,255,26,0)} 100%{box-shadow:0 0 0 0 rgba(193,255,26,0)} }
.hero-v3-text h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.8rem,6vw,5rem); line-height: 1.05; letter-spacing: -0.03em; }
.hero-v3-text h1 em { font-style: normal; color: var(--accent); }
.hero-v3-sub { margin-top: 22px; color: #b9b9c8; font-size: clamp(1.05rem,2vw,1.3rem); line-height: 1.6; }
.hero-v3-sub b { color: var(--text); font-weight: 700; }
.hero-v3-cta { margin-top: 34px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero-v3-cta .btn-primary { font-size: 1.05rem; padding: 15px 32px; border-radius: 11px; }
.btn-ghost-lg { display: inline-flex; align-items: center; padding: 15px 26px; font-size: 1.05rem; font-weight: 600; color: var(--text); border: 1px solid var(--border); border-radius: 11px; transition: border-color 0.14s, background 0.14s; }
.btn-ghost-lg:hover { border-color: var(--muted); background: var(--surface); }
.hero-v3-trust { margin-top: 26px; font-size: 0.9rem; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.trust-badge { background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 5px 13px; font-weight: 600; color: var(--text); font-size: 0.84rem; }

/* device mockup */
.hero-v3-visual { position: relative; }
.device { background: linear-gradient(160deg,#14141c,#0d0d13); border: 1px solid #2a2a38; border-radius: 22px; box-shadow: 0 40px 90px -30px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.02) inset; overflow: hidden; }
.device-bar { display: flex; align-items: center; gap: 7px; padding: 13px 16px; border-bottom: 1px solid #22222e; background: rgba(255,255,255,0.015); }
.wdot { width: 11px; height: 11px; border-radius: 50%; }
.wdot.r{background:#ff5f57} .wdot.y{background:#febc2e} .wdot.g{background:#28c840}
.device-title { margin-left: 8px; font-size: 0.82rem; color: var(--muted); font-weight: 600; }
.device-body { padding: 18px; }
.demo-head { display: flex; align-items: center; gap: 13px; padding-bottom: 16px; border-bottom: 1px solid #20202b; margin-bottom: 16px; }
.demo-avatar img, .demo-avatar-fallback { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; display: block; }
.demo-avatar-fallback { background: linear-gradient(135deg,#f093fb,#f5576c); display: flex; align-items: center; justify-content: center; font-size: 1.7rem; }
.demo-name { font-weight: 700; font-size: 1rem; }
.demo-name span { font-weight: 400; color: var(--muted); font-size: 0.82rem; }
.demo-status { margin-top: 3px; font-size: 0.82rem; color: var(--accent); display: flex; align-items: center; gap: 6px; }
.demo-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pdot 1.6s infinite; }
.demo-eq { margin-left: auto; display: flex; align-items: flex-end; gap: 3px; height: 26px; }
.demo-eq span { width: 3px; background: var(--accent); border-radius: 2px; animation: eq 0.9s ease-in-out infinite; }
.demo-eq span:nth-child(1){height:40%;animation-delay:-.1s} .demo-eq span:nth-child(2){height:80%;animation-delay:-.3s} .demo-eq span:nth-child(3){height:55%;animation-delay:-.5s} .demo-eq span:nth-child(4){height:95%;animation-delay:-.2s} .demo-eq span:nth-child(5){height:50%;animation-delay:-.4s}
@keyframes eq { 0%,100%{transform:scaleY(0.4)} 50%{transform:scaleY(1)} }
.demo-chat { display: flex; flex-direction: column; gap: 9px; }
.demo-bubble { max-width: 84%; padding: 10px 14px; border-radius: 14px; font-size: 0.9rem; line-height: 1.45; opacity: 0; transform: translateY(10px); animation: bub 0.5s forwards; }
.demo-bubble b { display: block; font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.5; margin-bottom: 3px; }
.demo-bubble.tutor { align-self: flex-start; background: rgba(193,255,26,0.08); border: 1px solid rgba(193,255,26,0.14); border-bottom-left-radius: 4px; }
.demo-bubble.user { align-self: flex-end; background: var(--surface-2); border-bottom-right-radius: 4px; }
.demo-bubble:nth-child(1){animation-delay:.3s} .demo-bubble:nth-child(2){animation-delay:1.0s} .demo-bubble:nth-child(3){animation-delay:1.7s} .demo-bubble:nth-child(4){animation-delay:2.4s}
@keyframes bub { to { opacity: 1; transform: none; } }
.demo-bubble.typing { display: flex; gap: 4px; padding: 13px 16px; }
.demo-bubble.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: typ 1.2s infinite; }
.demo-bubble.typing span:nth-child(2){animation-delay:.2s} .demo-bubble.typing span:nth-child(3){animation-delay:.4s}
@keyframes typ { 0%,60%,100%{opacity:.3;transform:translateY(0)} 30%{opacity:1;transform:translateY(-3px)} }
.hero-float { position: absolute; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 9px 14px; font-size: 0.84rem; font-weight: 600; box-shadow: 0 12px 30px -10px rgba(0,0,0,0.6); animation: floaty 6s ease-in-out infinite; }
.hf1 { top: 8%; left: -8%; } .hf2 { bottom: 12%; right: -6%; animation-delay: -3s; }

/* ── Solution statement ──────────────────────────────────────── */
.solution-statement { position: relative; text-align: center; padding: clamp(80px,12vw,150px) 20px; overflow: hidden; }
.solution-statement-bg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.solution-statement-bg span { font-family: var(--font-latin); font-size: clamp(6rem,16vw,15rem); font-weight: 700; letter-spacing: 0.02em; color: rgba(255,255,255,0.02); }
.solution-statement h2 { position: relative; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.8rem,4.5vw,3.2rem); line-height: 1.2; letter-spacing: -0.02em; }
.solution-statement h2 em { font-style: normal; color: var(--accent); }
.solution-statement p { position: relative; margin-top: 16px; color: var(--muted); font-size: 1.05rem; }

/* ── Feature rows ────────────────────────────────────────────── */
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px,5vw,72px); align-items: center; max-width: 1180px; margin: 0 auto; padding: clamp(56px,8vw,100px) clamp(20px,5vw,64px); }
.feature-text, .feature-visual { min-width: 0; } /* keep max-content mocks (marquee) from blowing out the 1fr columns */
.feature-row.reverse .feature-text { order: 2; }
.feature-kicker { font-family: var(--font-latin); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.04em; color: var(--accent); text-transform: uppercase; }
.feature-text h3 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.9rem,3.8vw,2.9rem); line-height: 1.12; letter-spacing: -0.02em; margin: 14px 0 16px; }
.feature-text h3 em { font-style: normal; color: var(--accent); }
.feature-text > p { color: #b3b3c2; font-size: 1.06rem; line-height: 1.65; }
.feature-bullets { list-style: none; margin: 20px 0 0; display: flex; flex-direction: column; gap: 11px; }
.feature-bullets li { position: relative; padding-left: 28px; color: var(--muted); font-size: 0.98rem; }
.feature-bullets li::before { content: '✓'; position: absolute; left: 0; top: 0; width: 19px; height: 19px; background: rgba(193,255,26,0.12); color: var(--accent); border-radius: 6px; font-size: 0.74rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.feature-link { display: inline-block; margin-top: 22px; color: var(--accent); font-weight: 700; font-size: 1rem; }
.feature-link:hover { color: #d0ff40; }

/* mock base */
.mock { background: linear-gradient(160deg,#13131a,#0e0e14); border: 1px solid #24242f; border-radius: 22px; padding: 30px; box-shadow: 0 30px 70px -28px rgba(0,0,0,0.7); min-height: 280px; display: flex; flex-direction: column; justify-content: center; }

/* mock voice */
.mock-voice { align-items: center; gap: 22px; }
.voice-orb { position: relative; width: 92px; height: 92px; border-radius: 50%; background: var(--accent); color: #09090d; display: flex; align-items: center; justify-content: center; font-size: 2.2rem; }
.voice-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; }
.mock-voice.play .voice-ring { animation: vring 2.2s ease-out infinite; }
.mock-voice.play .voice-ring.r2 { animation-delay: 1.1s; }
@keyframes vring { 0%{opacity:.6;transform:scale(1)} 100%{opacity:0;transform:scale(2.1)} }
.voice-wave { display: flex; align-items: center; gap: 4px; height: 54px; }
.voice-wave span { width: 5px; height: 18%; background: linear-gradient(var(--accent),#7fb800); border-radius: 3px; }
.mock-voice.play .voice-wave span { animation: vw 1s ease-in-out infinite; }
.voice-wave span:nth-child(odd){animation-delay:-.4s} .voice-wave span:nth-child(3n){animation-delay:-.7s} .voice-wave span:nth-child(4n){animation-delay:-.2s}
@keyframes vw { 0%,100%{height:18%} 50%{height:90%} }
.voice-latency { font-size: 0.92rem; color: var(--muted); } .voice-latency b { font-family: var(--font-latin); color: var(--accent); font-size: 1.1rem; }

/* mock tutors — real-portrait cards with live voice preview */
.mock-tutors { gap: 18px; overflow: hidden; padding: 26px 0 22px; }
.tutor-marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg,transparent,#000 10%,#000 90%,transparent); mask-image: linear-gradient(90deg,transparent,#000 10%,#000 90%,transparent); }
.tutor-track { display: flex; gap: 12px; width: max-content; padding: 6px 0; animation: marq 38s linear infinite; }
.tutor-marquee:hover .tutor-track, .tutor-marquee.paused .tutor-track { animation-play-state: paused; }
@keyframes marq { to { transform: translateX(-50%); } }
.tcard { flex-shrink: 0; width: 128px; padding: 9px 9px 12px; display: flex; flex-direction: column; align-items: center; gap: 3px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; cursor: pointer; font: inherit; color: inherit; text-align: center; transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s; }
.tcard:hover { border-color: rgba(193,255,26,0.4); transform: translateY(-3px); box-shadow: 0 12px 28px -14px rgba(0,0,0,0.75); }
.tcard-img { position: relative; width: 100%; aspect-ratio: 1; border-radius: 11px; overflow: hidden; background: var(--surface-2); margin-bottom: 6px; }
.tcard-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.25s; }
.tcard:hover .tcard-img img { transform: scale(1.06); }
.tcard-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 2.4rem; }
.tcard-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(9,9,13,0.38); opacity: 0; transition: opacity 0.15s; }
.tcard-play i { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); position: relative; box-shadow: 0 4px 14px -2px rgba(193,255,26,0.5); }
.tcard-play i::after { content: ''; position: absolute; left: 14px; top: 11px; border-left: 11px solid #09090d; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.tcard:hover .tcard-play, .tcard:focus-visible .tcard-play { opacity: 1; }
.tcard.playing .tcard-play { opacity: 0; }
.tcard.playing { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(193,255,26,0.16), 0 12px 28px -14px rgba(0,0,0,0.75); }
.tcard-eq { position: absolute; right: 7px; bottom: 7px; display: none; align-items: flex-end; gap: 2.5px; height: 15px; padding: 3px 5px; background: rgba(9,9,13,0.65); border-radius: 6px; box-sizing: content-box; }
.tcard-eq i { width: 3px; background: var(--accent); border-radius: 2px; animation: eq 0.9s ease-in-out infinite; }
.tcard-eq i:nth-child(1) { height: 60%; animation-delay: -0.2s; }
.tcard-eq i:nth-child(2) { height: 100%; animation-delay: -0.45s; }
.tcard-eq i:nth-child(3) { height: 45%; animation-delay: -0.7s; }
.tcard.playing .tcard-eq { display: flex; }
.tcard-name { font-size: 0.9rem; font-weight: 700; line-height: 1.2; }
.tcard-meta { font-size: 0.7rem; color: var(--muted); }
.tutor-play-hint { align-self: center; margin-top: 4px; font-size: 0.84rem; font-weight: 700; color: var(--accent); background: rgba(193,255,26,0.1); border: 1px solid rgba(193,255,26,0.2); border-radius: 999px; padding: 6px 16px; transition: background 0.2s; }
@media (prefers-reduced-motion: reduce) { .tutor-track { animation: none; flex-wrap: wrap; width: auto; } }

/* mock expr */
.mock-expr { align-items: center; gap: 16px; }
.expr-stage { width: 168px; height: 168px; border-radius: 24px; overflow: hidden; background: var(--surface-2); box-shadow: 0 0 0 4px rgba(193,255,26,0.12); }
.expr-stage img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.2s; }
.expr-caption { font-size: 1rem; font-weight: 700; color: var(--accent); }
.expr-chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.expr-chips span { font-size: 0.74rem; font-weight: 600; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 4px 11px; }

/* mock memory */
.mock-memory { gap: 11px; align-items: stretch; }
.mock-memory .mc-label { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 4px; }
.mock-memory .mc-chip { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 13px 16px; font-size: 0.95rem; opacity: 0; transform: translateX(-12px); transition: opacity 0.5s, transform 0.5s; }
.mock-memory .mc-chip.accent { background: rgba(193,255,26,0.1); border-color: rgba(193,255,26,0.25); color: var(--accent); font-weight: 600; }
.mock-memory.play .mc-chip { opacity: 1; transform: none; }
.mock-memory.play .mc-chip[data-i="1"]{transition-delay:.05s} .mock-memory.play .mc-chip[data-i="2"]{transition-delay:.2s} .mock-memory.play .mc-chip[data-i="3"]{transition-delay:.35s} .mock-memory.play .mc-chip[data-i="4"]{transition-delay:.5s} .mock-memory.play .mc-chip[data-i="5"]{transition-delay:.65s}

/* mock report */
.mock-report { gap: 13px; align-items: stretch; }
.report-top { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.report-cefr-badge { font-family: var(--font-latin); font-size: 2.2rem; font-weight: 700; color: var(--accent); line-height: 1; }
.report-up { font-size: 0.84rem; font-weight: 700; color: var(--ok); background: rgba(0,229,160,0.1); border-radius: 999px; padding: 4px 12px; }
.rbar { display: flex; align-items: center; gap: 12px; }
.rbar-l { width: 52px; font-size: 0.84rem; color: var(--muted); flex-shrink: 0; }
.rbar-track { flex: 1; height: 9px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.rbar-track i { display: block; height: 100%; width: 0; background: linear-gradient(90deg,#7fb800,var(--accent)); border-radius: 6px; transition: width 1s cubic-bezier(.2,.7,.2,1); }
.mock-report.play .rbar-track i { width: var(--w); }
.mock-report.play .rbar:nth-of-type(2) i{transition-delay:.1s} .mock-report.play .rbar:nth-of-type(3) i{transition-delay:.2s} .mock-report.play .rbar:nth-of-type(4) i{transition-delay:.3s}
.srs-card { margin-top: 8px; background: rgba(193,255,26,0.08); border: 1px dashed rgba(193,255,26,0.3); border-radius: 12px; padding: 12px 16px; font-size: 0.92rem; color: var(--text); } .srs-card b { color: var(--accent); }

/* kids bright override */
.kids-section .kids-inner { background: linear-gradient(155deg,#d6ff5e,#9be15d); border: 1px solid #c2ef4f; }
.kids-section .kids-inner .section-title { color: #16210a; }
.kids-section .kids-emoji { font-size: 3.4rem; letter-spacing: 6px; }
.kids-avatars { display: flex; justify-content: center; gap: 20px; margin-bottom: 26px; }
.kids-avatars img { width: 112px; height: 112px; border-radius: 30px; border: 4px solid rgba(255,255,255,0.9); box-shadow: 0 16px 32px -14px rgba(22,33,10,0.5); object-fit: cover; }
.kids-avatars img:first-child { transform: rotate(-5deg); }
.kids-avatars img:last-child { transform: rotate(5deg) translateY(8px); }

/* final CTA tutor faces */
.cta-faces { position: relative; display: flex; justify-content: center; margin-bottom: 14px; }
.cta-faces img { width: 54px; height: 54px; border-radius: 50%; border: 3px solid #16161e; object-fit: cover; margin-left: -13px; box-shadow: 0 8px 18px -8px rgba(0,0,0,0.7); transition: transform 0.15s; }
.cta-faces img:first-child { margin-left: 0; }
.cta-faces img:hover { transform: translateY(-5px); }
.landing-final p.cta-faces-cap { font-size: 0.92rem; font-weight: 600; color: var(--accent); margin-bottom: 30px; }

/* ── FAQ ─────────────────────────────────────────────────────── */
.faq-list { max-width: 760px; margin: 8px auto 0; display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; transition: border-color 0.14s; }
.faq-item[open] { border-color: rgba(193,255,26,0.3); }
.faq-item summary { list-style: none; cursor: pointer; padding: 20px 22px; font-size: 1.06rem; font-weight: 600; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-plus { position: relative; width: 18px; height: 18px; flex-shrink: 0; }
.faq-plus::before, .faq-plus::after { content: ''; position: absolute; background: var(--accent); border-radius: 2px; transition: transform 0.2s; }
.faq-plus::before { top: 8px; left: 0; width: 18px; height: 2px; }
.faq-plus::after { left: 8px; top: 0; width: 2px; height: 18px; }
.faq-item[open] .faq-plus::after { transform: scaleY(0); }
.faq-item p { padding: 0 22px 22px; color: var(--muted); font-size: 0.98rem; line-height: 1.7; }

/* ── v3 responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-v3-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-v3-visual { max-width: 460px; margin: 0 auto; width: 100%; }
  .feature-row, .feature-row.reverse { grid-template-columns: 1fr; gap: 28px; }
  .feature-row.reverse .feature-text { order: 0; }
  .hero-float { display: none; }
}
@media (max-width: 640px) {
  .tcard { width: 108px; }
  .kids-avatars img { width: 88px; height: 88px; border-radius: 24px; }
  .cta-faces img { width: 44px; height: 44px; margin-left: -11px; }
}

/* ═══════════════════════════════════════════════════════════════
   Session stage v2 — circular avatar + sonar ripples + right transcript
   ═══════════════════════════════════════════════════════════════ */

.session-hero { margin-bottom: 30px; }

.session-stage {
  display: grid;
  grid-template-columns: 1fr 380px;
  grid-template-areas:
    "voice    transcript"
    "controls transcript";
  gap: 24px;
  align-items: start;
}

/* ── 보이스 패널 (오브 + 상태) ── */
.stage-voice {
  grid-area: voice;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 44px 28px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── 하단 컨트롤 카드 ── */
.stage-controls {
  grid-area: controls;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.stage-controls .mic-mode-bar,
.stage-controls .stage-voice-bar,
.stage-controls .stage-sub-bar { margin-top: 0; }

/* 써클 아바타 + 소나 링 */
.avatar-circle {
  position: relative;
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 26px;
}

.avatar-circle-inner {
  position: relative;
  z-index: 2;
  width: 184px;
  height: 184px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--border);
  background: var(--surface-2);
  transition: border-color 0.25s, transform 0.25s;
}
.avatar-circle-inner img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 튜터 팁 말풍선: 모바일 포커스드 UI 전용 — 데스크톱에선 항상 숨김.
   (실제 표시 규칙은 아래 모바일 미디어쿼리의 .tutor-tip 블록) */
.tutor-tip { display: none; }
.avatar-circle-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 4.4rem; }

/* sonar rings — hidden by default, animated while someone speaks */
.sonar {
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  border: 2px solid transparent;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

/* 튜터 발화: 라임 음파 */
.avatar-circle.tutor-talking .avatar-circle-inner { border-color: var(--accent); transform: scale(1.02); }
.avatar-circle.tutor-talking .sonar { border-color: var(--accent); animation: sonar 2s ease-out infinite; }
.avatar-circle.tutor-talking .s2 { animation-delay: 0.65s; }
.avatar-circle.tutor-talking .s3 { animation-delay: 1.3s; }

/* 사용자 발화: 블루 음파 — 동적 레벨 반응 */
.avatar-circle { --mic-level: 0; }
.avatar-circle.user-talking .avatar-circle-inner {
  border-color: #4facfe;
  transform: scale(calc(1 + var(--mic-level) * 0.04));
  transition: transform 0.1s ease-out;
}
.avatar-circle.user-talking .sonar {
  border-color: #4facfe;
  animation: sonar-user 1.4s ease-out infinite;
}
.avatar-circle.user-talking .s1 {
  border-width: 3px;
  animation-duration: 1.2s;
}
.avatar-circle.user-talking .s2 {
  animation-delay: 0.4s;
  animation-duration: 1.6s;
  border-width: 2px;
}
.avatar-circle.user-talking .s3 {
  animation-delay: 0.8s;
  animation-duration: 2s;
  border-width: 1.5px;
}

/* 동시(끼어들기): 튜터 라임 우선이되 블루 글로우 살짝 */
.avatar-circle.tutor-talking.user-talking .avatar-circle-inner {
  box-shadow: 0 0 0 5px rgba(79,172,254,0.18);
}

@keyframes sonar {
  0%   { opacity: 0.75; transform: scale(1); }
  100% { opacity: 0;    transform: scale(1.55); }
}

@keyframes sonar-user {
  0%   { opacity: 0.65; transform: scale(1); border-width: 3px; }
  40%  { opacity: 0.4; }
  100% { opacity: 0;    transform: scale(calc(1.3 + var(--mic-level, 0) * 0.5)); border-width: 1px; }
}

.stage-tutor-name { font-size: 1.35rem; font-weight: 700; font-family: var(--font-display); letter-spacing: -0.01em; }
.stage-tutor-name span { font-family: var(--font-body); font-weight: 400; color: var(--muted); font-size: 0.95rem; margin-left: 6px; }
.stage-tutor-state { margin-top: 6px; font-size: 0.98rem; color: var(--accent); min-height: 1.5em; }

.stage-voice-bar { margin-top: 26px; margin-bottom: 0; justify-content: center; }
.stage-voice-bar .mic-btn { width: 60px; height: 60px; }

.stage-sub-bar { margin-top: 18px; display: flex; align-items: center; gap: 16px; }
.stage-sub-bar .status-pill { margin-left: 0; }

/* Mic mode toggle (Auto / PTT) */
.mic-mode-bar {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.mic-mode-toggle {
  display: flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
.mic-mode-opt {
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--muted);
  transition: all 0.15s;
}
.mic-mode-opt.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.mic-mode-opt:hover:not(.active) { color: var(--text); }

.ptt-hint {
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  animation: rv-pulse 2s ease-in-out infinite;
}
.ptt-hint kbd {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-family: var(--font-latin);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
}

/* Mic button PTT states */
.mic-btn.ptt-mode {
  border: 2px dashed var(--muted);
  opacity: 0.5;
}
.mic-btn.ptt-active {
  border: 2px solid var(--accent) !important;
  opacity: 1 !important;
  box-shadow: 0 0 0 6px rgba(193,255,26,0.15);
  animation: ptt-glow 0.6s ease-in-out infinite alternate;
}
@keyframes ptt-glow {
  from { box-shadow: 0 0 0 4px rgba(193,255,26,0.1); }
  to   { box-shadow: 0 0 0 10px rgba(193,255,26,0.2); }
}

/* Avatar PTT states */
.ptt-standby { opacity: 0.6; }
.ptt-talking  { opacity: 1 !important; }

.stage-objectives {
  margin-top: 26px;
  width: 100%;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}
.stage-objectives ul { padding-left: 16px; color: var(--text); opacity: 0.8; font-size: 1rem; line-height: 1.7; }

/* ── 우측 트랜스크립트 ── */
.stage-right {
  grid-area: transcript;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  /* 높이 고정: 페이지가 늘어나지 않고 패널 내부에서만 스크롤 */
  height: clamp(480px, calc(100vh - var(--nav-h) - 230px), 720px);
  position: sticky;
  top: calc(var(--nav-h) + 20px);
}
.transcript-label { margin-bottom: 4px; }
.transcript-note { font-size: 0.78rem; color: var(--muted); opacity: 0.6; margin-bottom: 12px; }

.stage-transcript {
  flex: 1;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
  overscroll-behavior: contain; /* 채팅 끝에서 페이지로 스크롤 전파 방지 */
}
/* 말풍선이 적을 땐 아래에 붙고(자동 마진이 남는 공간을 흡수), 넘치면 정상
   스크롤. justify-content:flex-end는 위로 넘친 내용이 스크롤 불가로 잘리는
   플렉스 퀴크(scrollHeight도 안 늘어남)가 있어 쓰지 않는다. */
.stage-transcript .bubble:first-of-type { margin-top: auto; }

.transcript-empty {
  align-self: center;
  margin: auto;
  text-align: center;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
  opacity: 0.7;
}

.stage-transcript .bubble {
  animation: bubble-in 0.3s cubic-bezier(.2,.7,.3,1.1);
}
@keyframes bubble-in {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

/* ── 태블릿: 단일 컬럼으로 ── */
@media (max-width: 900px) and (min-width: 761px) {
  .session-stage {
    grid-template-columns: 1fr;
    grid-template-areas: "voice" "transcript" "controls";
  }
  .stage-voice { padding: 34px 20px 26px; }
  .stage-right { height: 420px; position: static; }
}

/* ═══════════════════════════════════════════════════════════════
   포커스드 보이스 UI — 모바일/인앱 (미니멀: 사진+이름만, 하단 알약 버튼)
   대기: 큰 사진 가운데 + 하단 둥근 직사각형 마이크 버튼.
   라이브: 버튼 누르면 사진이 작아져 아래로 내려가고 말풍선이 실시간으로 쌓임.
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 760px) {
  /* 세션 화면에서는 하단 탭을 감추고(인앱 규칙보다 명시도 ↑) 컨트롤이 바닥을 차지 */
  html.has-session .mobile-nav,
  html.is-app.has-session .mobile-nav { display: none; }
  html.has-session .page {
    padding-top: calc(var(--nav-h) + env(safe-area-inset-top));
    padding-bottom: 0;
  }

  /* ── iOS 앱 세션 센터 정렬 ── */
  html.is-app .session-screen {
    align-items: center;
  }
  html.is-app .session-stage {
    width: 100%;
    align-items: center;
  }
  html.is-app .stage-voice {
    align-items: center;
    text-align: center;
    width: 100%;
  }
  html.is-app .stage-tutor-name,
  html.is-app .stage-tutor-state {
    text-align: center;
    width: 100%;
  }
  html.is-app .stage-controls {
    align-items: center;
    width: 100%;
  }
  html.is-app .stage-voice-bar {
    width: 100%;
    justify-content: center;
  }
  html.is-app .stage-voice-bar .mic-btn {
    flex: 1 1 100%;
    width: 100%;
  }
  html.is-app .stop-btn {
    flex: 1 1 100%;
    width: 100%;
  }

  .session-screen {
    display: flex;
    flex-direction: column;
    height: calc(100svh - var(--nav-h) - env(safe-area-inset-top));
    overflow-y: auto;
    position: relative; /* 우측 상단 모드 플로팅 토글(absolute)의 기준 */
  }
  /* 라이브 중엔 화면 자체는 고정 — 스크롤은 채팅창 내부에서만 */
  .session-screen.is-live { overflow: hidden; }
  .session-hero { display: none; }

  /* 리포트 표시 시 세션 스테이지 숨기고 스크롤 가능하게 */
  .session-screen:has(.report:not(.hidden)) {
    height: auto;
    min-height: calc(100svh - var(--nav-h) - env(safe-area-inset-top));
  }
  .session-screen:has(.report:not(.hidden)) .session-stage {
    display: none;
  }

  /* 모바일 리포트: 외곽/카드 패딩 약간 축소 */
  .report { padding: 14px; border-radius: 16px; }
  .rpt-sec, .rpt-hero { padding: 16px; }
  .cefr-ladder { grid-template-columns: repeat(6, 1fr); gap: 4px; }
  .ladder-seg { padding: 10px 3px 8px; }
  .ladder-seg b { font-size: 0.88rem; }
  .ladder-seg span { font-size: 0.58rem; }

  .session-stage {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
    min-height: 0;
    /* the desktop grid's align-items:start leaks into this flex column and makes
       every row hug the left at content width (photo lands off-center; the tip
       bubble anchored to it clips off-screen) — stretch rows to full width */
    align-items: stretch;
  }

  /* 잡다한 정보는 모바일에서 숨김 (모드 토글은 홀드 버튼 도입으로 부활 — 아래) */
  .session-stage .stage-sub-bar,
  .stage-voice .credit-chip,
  .stage-voice .stage-objectives { display: none; }

  /* 롱프레스 텍스트 선택/복사 팝업 차단 — 대화 화면은 통화 UI지 문서가 아니다
     (리포트 패널은 .session-stage 밖이라 교정 표현 복사는 계속 가능) */
  .session-stage, .session-stage * {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
  }

  /* 하단 segmented 모드 토글은 모바일에서 숨김 — 컨트롤 행의 모드 버튼으로 대체 */
  .session-stage .mic-mode-bar { display: none; }

  /* ═══ 콜 슬라이더 — 스피커폰 통화 UX ═══
     유리 트랙 위를 라임 노브가 미끄러진다: 좌=∿자동, 중앙=🎙눌러서 말하기,
     우측 끝까지 밀면 통화 종료. 중앙 위치에선 노브를 꾹 누르는 동안 발화.
     파형은 트랙 배경에서 실진폭(튜터+마이크)으로 춤춘다. */
  .session-screen.is-live .stage-voice-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin: 0 2px 30px;
    background: transparent; border: none; box-shadow: none;
  }
  .session-screen.is-live .vd-caption {
    display: block;
    text-align: center;
    font-size: 0.86rem; font-weight: 700;
    color: var(--muted);
    min-height: 1.1em;
  }
  .session-screen.is-live .vd-track {
    display: block;
    position: relative;
    height: 78px;
    border-radius: 999px;
    background: rgba(17, 17, 23, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.45);
    transition: background 0.2s ease, border-color 0.2s ease;
    touch-action: none;
    user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
    overflow: hidden;
  }
  /* 우측 끝 접근: 트랙이 위험색으로 물든다 */
  .session-screen.is-live .vd-track.danger {
    background: rgba(120, 20, 24, 0.55);
    border-color: rgba(255, 90, 90, 0.35);
  }
  .session-screen.is-live .vd-track.hold {
    background: rgba(193, 255, 26, 0.12);
    border-color: rgba(193, 255, 26, 0.3);
  }

  /* 파형: 트랙 배경 전체에 은은하게 */
  .vd-wave {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center; gap: 4px;
    opacity: 0.4;
    pointer-events: none;
  }
  .vd-wave i {
    width: 3.5px; height: 36px;
    border-radius: 2px;
    background: var(--accent);
    transform: scaleY(0.12);
    transform-origin: center;
    transition: transform 0.09s ease-out;
  }
  .vd-track.danger .vd-wave i { background: #ff7a7a; }

  /* 3개 존 아이콘 (노브가 없는 자리의 힌트) */
  .vd-zone {
    position: absolute; top: 50%;
    width: 50px; height: 50px;
    display: flex; align-items: center; justify-content: center;
    color: var(--muted); opacity: 0.75;
    transform: translateY(-50%);
  }
  .vd-zone--auto { left: 10px; }
  .vd-zone--ptt  { left: 50%; transform: translate(-50%, -50%); }
  .vd-zone--end  { right: 10px; color: rgba(255, 110, 110, 0.85); }

  /* 노브: 현재 모드 아이콘을 품은 라임 원 — JS가 left(px)로 이동 */
  .vd-knob {
    position: absolute; top: 50%;
    width: 64px; height: 64px;
    margin-top: -32px;
    padding: 0; /* 전역 button 패딩(10px 22px)이 아이콘을 짓누르는 것 차단 */
    border-radius: 50%;
    border: none;
    background: var(--accent); color: #09090d;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 18px rgba(193, 255, 26, 0.35);
    cursor: grab;
    z-index: 3;
    touch-action: none;
  }
  .vd-knob.snapping { transition: left 0.28s cubic-bezier(.3,1.25,.4,1); }
  .vd-knob.dragging { cursor: grabbing; box-shadow: 0 6px 26px rgba(193, 255, 26, 0.5); }
  .vd-knob .fab-ic--ptt { display: none; }
  .vd-knob.is-ptt .fab-ic--auto { display: none; }
  .vd-knob.is-ptt .fab-ic--ptt { display: block; }
  /* 홀드 중(발화): 노브가 밝아지며 링 */
  .vd-knob.active {
    background: #e2ff7d;
    box-shadow: 0 0 0 7px rgba(193, 255, 26, 0.25), 0 0 40px rgba(193, 255, 26, 0.5);
  }
  .vd-track.danger .vd-knob { background: #ff6a6a; box-shadow: 0 4px 18px rgba(255, 90, 90, 0.45); color: #fff; }

  /* ═══ PTT 말하기 서피스 (§13.62) ═══
     수동 모드의 발화는 노브가 아니라 이 풀폭 버튼이 담당 — 노브 홀드 중 8px
     드리프트가 activity_end를 쏘아 튜터가 홀드 중 답하던 버그의 구조적 제거.
     상태: 기본(외곽선) → .hold(라임 채움, 듣는 중) → .locked(맥동, 핸즈프리). */
  .session-screen.is-live.ptt .ptt-talk {
    display: flex;
    flex-direction: column; align-items: center; justify-content: center;
    gap: 3px;
    min-height: 80px;
    padding: 12px 16px; /* 전역 button 패딩 대체 (§13.26b 아이콘 버튼 패턴) */
    border-radius: 26px;
    border: 1.5px solid rgba(193, 255, 26, 0.45);
    background: rgba(193, 255, 26, 0.07);
    color: var(--accent);
    font-family: inherit;
    touch-action: none;
    user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
    transition: background 0.16s ease, border-color 0.16s ease,
                box-shadow 0.16s ease, color 0.16s ease;
  }
  .ptt-talk .pt-row { display: flex; align-items: center; gap: 8px; }
  .ptt-talk .pt-label { font-weight: 800; font-size: 1.04rem; letter-spacing: -0.01em; }
  .ptt-talk .pt-sub { font-size: 0.78rem; font-weight: 600; color: var(--muted); }
  /* 홀드: 라임으로 차오르며 "듣는 중" */
  .session-screen.is-live.ptt .ptt-talk.hold {
    background: var(--accent);
    border-color: var(--accent);
    color: #09090d;
    box-shadow: 0 0 0 6px rgba(193, 255, 26, 0.22), 0 0 42px rgba(193, 255, 26, 0.45);
  }
  .ptt-talk.hold .pt-sub { color: rgba(9, 9, 13, 0.62); }
  /* 잠금(핸즈프리): 은은한 라임 틴트 + 숨쉬는 링 — 탭하면 전송 */
  .session-screen.is-live.ptt .ptt-talk.locked {
    background: rgba(193, 255, 26, 0.16);
    border-color: var(--accent);
    color: var(--accent);
    animation: pt-listen 1.7s ease-in-out infinite;
  }
  .ptt-talk.locked .pt-sub { color: var(--accent); opacity: 0.8; }
  @keyframes pt-listen {
    0%, 100% { box-shadow: 0 0 0 0 rgba(193, 255, 26, 0.35); }
    50%      { box-shadow: 0 0 0 10px rgba(193, 255, 26, 0.1); }
  }
  @media (prefers-reduced-motion: reduce) {
    .session-screen.is-live.ptt .ptt-talk.locked { animation: none; }
  }

  /* 라이브에선 기존 종료 버튼 숨김 — 슬라이더가 종료를 담당 */
  .session-screen.is-live .stop-btn { display: none; }

  /* 튜터 헤일로: 사진이 목소리 크기에 맞춰 숨쉰다 (JS가 --talk 0~1 구동) */
  .session-screen.is-live .avatar-circle-inner {
    box-shadow: 0 0 calc(12px + var(--talk, 0) * 46px)
                rgba(193, 255, 26, calc(var(--talk, 0) * 0.5));
  }

  /* 모바일에선 데스크톱용 PTT 연출(점선 시작버튼·사진 디밍) 무효 */
  .session-screen .mic-btn.ptt-mode { border: none; opacity: 1; }
  .session-screen.ptt .avatar-circle.ptt-standby { opacity: 1; }
  /* 홀드 연출은 노브(.vd-knob.active)가 담당 — 데스크톱 ptt-active(!important opacity)가
     라이브 중 숨겨둔 시작 알약을 트랙 위로 되살리는 누수 차단 */
  .session-screen.is-live #startBtn.ptt-active {
    opacity: 0 !important; border: none !important;
    box-shadow: none; animation: none;
  }

  /* 사진 + 이름은 부드럽게 크기 전환 */
  .avatar-circle,
  .avatar-circle-inner { transition: width .45s cubic-bezier(.4,0,.2,1), height .45s cubic-bezier(.4,0,.2,1), margin .45s cubic-bezier(.4,0,.2,1); }
  .stage-tutor-name { transition: font-size .45s cubic-bezier(.4,0,.2,1); }

  /* ── 보이스 패널 (사진+이름) ── */
  .stage-voice {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0 20px;
    transition: padding 0.5s cubic-bezier(0.4, 0, 0.2, 1); /* 대기→라이브 수직 안착 */
  }
  .stage-tutor-name span { display: none; } /* 한글 보조명은 숨겨 더 미니멀하게 */
  .stage-tutor-state { font-size: 0.98rem; margin-top: 8px; }

  /* ── 트랜스크립트 (라이브에서만) ── */
  .stage-right {
    background: transparent;
    border: none;
    border-radius: 0;
    height: auto;
    min-height: 0;
    position: static;
    padding: 6px 16px 2px;
  }
  .transcript-label, .transcript-note, .transcript-empty { display: none; }
  .stage-transcript { gap: 10px; }
  .stage-transcript .bubble { max-width: 86%; }

  /* ── 컨트롤 (하단) ── */
  .stage-controls {
    flex: 0 0 auto;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 10px 20px calc(16px + env(safe-area-inset-bottom));
    gap: 0;
  }
  .stage-voice-bar { margin-bottom: 0; width: 100%; }

  /* 둥근 직사각형(알약) 버튼 — 폭 전체 */
  .stage-voice-bar .mic-btn {
    width: 100%; height: 58px;
    border-radius: 16px;
    gap: 10px;
    box-shadow: none;
  }
  .stage-voice-bar .mic-btn svg { width: 24px; height: 24px; }
  .mic-label { display: inline; font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; }
  .mic-btn.live { animation: none; box-shadow: none; }

  .stop-btn {
    width: 100%; height: 58px;
    justify-content: center;
    border-radius: 16px;
    font-size: 1.05rem; font-weight: 700;
    background: rgba(255, 68, 68, 0.1);
    border-color: rgba(255, 68, 68, 0.28);
    color: var(--err);
  }
  .stop-btn .stop-label { display: inline; }

  /* ─────────── 대기 상태: 사진 가운데 크게, 트랜스크립트 숨김 ─────────── */
  .session-screen:not(.is-live) .stage-right { display: none; }
  .session-screen:not(.is-live) .stage-voice {
    order: 1;
    flex: 1;
    justify-content: center;
    padding-bottom: 8vh;
  }
  .session-screen:not(.is-live) .stage-controls { order: 2; }
  .session-screen:not(.is-live) .avatar-circle { width: 232px; height: 232px; margin-bottom: 22px; }
  .session-screen:not(.is-live) .avatar-circle-inner { width: 202px; height: 202px; }
  .session-screen:not(.is-live) .stage-tutor-name { font-size: 1.7rem; }
  .session-screen:not(.is-live) .stage-tutor-state { display: none; } /* "대기 중" 숨김 */
  .session-screen:not(.is-live) #stopBtn { display: none; }

  /* ─────────── 라이브 상태 기본: 오브만 크게 중앙 (대화창 숨김) ─────────── */
  .session-screen.is-live .stage-right {
    order: 1;
    flex: 0 0 0;
    display: none;
    overflow: hidden;
  }
  .session-screen.is-live .stage-voice {
    order: 1;
    flex: 1;
    justify-content: center;
    padding: 0 20px;
  }
  .session-screen.is-live .stage-controls { order: 3; }
  /* margin-bottom은 '대화 보기 ▼' 힌트(::after, bottom:-26px)가 이름을 침범하지
     않도록 힌트 높이만큼 확보. 사진/이름 크기는 대기 상태와 동일하게 유지 —
     시작 직후 화면이 전체적으로 쪼그라드는 느낌 방지(축소는 transcript-open 도킹만) */
  .session-screen.is-live .avatar-circle { width: 232px; height: 232px; margin-bottom: 36px; }
  .session-screen.is-live .avatar-circle-inner { width: 202px; height: 202px; }
  .session-screen.is-live .stage-tutor-name { font-size: 1.7rem; }

  /* ── 대기→라이브 전환 안무 ──
     시작 알약은 제자리에서 스르륵 사라지고(absolute라 레이아웃 점프 없음),
     콜 슬라이더가 아래에서 떠오르며 캡션·상태 텍스트가 순차 페이드인.
     사진 축소(기존 width/margin 트랜지션)와 합쳐져 한 호흡의 전환이 된다. */
  .session-screen.is-live .stage-voice-bar { position: relative; }
  .session-screen.is-live #startBtn {
    position: absolute; left: 0; right: 0; bottom: 0;
    opacity: 0; transform: translateY(-30px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.34s ease, transform 0.46s cubic-bezier(0.3, 0.9, 0.35, 1);
  }
  @keyframes dock-rise {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to   { opacity: 1; transform: none; }
  }
  @keyframes vd-fade { from { opacity: 0; } }
  .session-screen.is-live .vd-track {
    animation: dock-rise 0.5s cubic-bezier(0.3, 1.12, 0.35, 1) 0.05s both;
  }
  .session-screen.is-live .vd-caption { animation: vd-fade 0.4s ease 0.38s both; }
  .session-screen.is-live .stage-tutor-state { animation: vd-fade 0.4s ease 0.25s both; }
  .session-screen.is-live:not(.transcript-open) .avatar-circle::after { animation: vd-fade 0.4s ease 0.5s both, hint-fade 4s ease-in-out 1s infinite; }
  @media (prefers-reduced-motion: reduce) {
    .session-screen.is-live .vd-track,
    .session-screen.is-live .vd-caption,
    .session-screen.is-live .stage-tutor-state { animation: none; }
    .session-screen.is-live #startBtn { transition: none; }
  }

  /* ─────────── iOS풍 아바타 드래그 전환 보조 ───────────
     .no-anim: 제스처 측정/FLIP 커밋 순간 CSS 전환·애니메이션을 잠가 기하를 즉시
     스냅(시각적 움직임은 JS의 transform 스프링이 담당). .dragging: 드래그 중
     팁 말풍선 숨김 + 볼이 대화창 위로 뜨도록. */
  .session-screen.no-anim,
  .session-screen.no-anim * { transition: none !important; animation: none !important; }
  .session-screen.dragging .tutor-tip { display: none !important; }
  .session-screen.is-live .stage-voice { position: relative; z-index: 5; }
  .session-screen.dragging .avatar-circle { will-change: transform; }
  .session-screen.is-live .avatar-circle { touch-action: none; } /* 스크롤/PTR 가로채기 방지 */
  /* 드래그 중엔 제자리에 남는 이름/상태 텍스트를 치워 볼과 겹치지 않게 */
  .stage-tutor-name, .stage-tutor-state { transition: opacity .18s ease; }
  .session-screen.dragging .stage-tutor-name,
  .session-screen.dragging .stage-tutor-state { opacity: 0; }
  /* 힌트(::after)는 볼의 자식이라 드래그 transform에 같이 스케일됨 → 드래그 중 숨김 */
  .session-screen.dragging .avatar-circle::after { display: none; }

  /* ─────────── 튜터 팁 말풍선 (라이브 중, 얼굴 위) ───────────
     app.js가 세션 시작 후 팁을 순환시키며 .show를 토글. 채팅창이 펼쳐진 동안엔
     숨김(작아진 얼굴 위 공간이 없음). 안내용이라 탭을 가로채지 않음.
     --tip-shift: 컨트롤 스택이 자라 사진이 높이 밀리면(PTT 서피스 등) 말풍선이
     화면 위 overflow 클립을 뚫고 잘림 — app.js clampTip()이 잘리는 만큼만
     아래로 내려 사진 위에 겹쳐 앉힌다(레이아웃 변화에 자가 적응). */
  .tutor-tip {
    display: none;
    position: absolute;
    bottom: calc(100% + 18px);
    left: 50%;
    transform: translateX(-50%) translateY(var(--tip-shift, 0px));
    width: max-content;
    max-width: min(80vw, 330px);
    padding: 11px 15px;
    background: var(--surface-2);
    border: 1px solid rgba(193, 255, 26, 0.35);
    border-radius: 14px;
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--text);
    text-align: center;
    pointer-events: none;
    z-index: 6;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
  }
  .tutor-tip::before { /* 말꼬리 (얼굴을 가리킴) */
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: rgba(193, 255, 26, 0.35);
  }
  .tutor-tip::after { /* 말꼬리 안쪽 (배경색으로 보더 두께만 남김) */
    content: '';
    position: absolute;
    top: calc(100% - 1.5px);
    left: 50%;
    transform: translateX(-50%);
    border: 7px solid transparent;
    border-top-color: var(--surface-2);
  }
  .session-screen.is-live:not(.transcript-open) .tutor-tip.show {
    display: block;
    animation: tip-pop 0.32s cubic-bezier(.4,0,.2,1);
  }
  @keyframes tip-pop {
    from { opacity: 0; transform: translateX(-50%) translateY(calc(var(--tip-shift, 0px) + 8px)); }
    to   { opacity: 1; transform: translateX(-50%) translateY(var(--tip-shift, 0px)); }
  }

  /* 오브 탭 힌트 — 살짝 바운스 */
  .session-screen.is-live .avatar-circle::after {
    content: '대화 보기 ▼';
    position: absolute;
    bottom: -26px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.76rem;
    color: var(--muted);
    opacity: 0.5;
    white-space: nowrap;
    animation: hint-fade 4s ease-in-out infinite;
  }
  @keyframes hint-fade { 0%,80%,100%{opacity:0.5} 90%{opacity:0} }

  /* ─────────── 대화창 펼침 (탭 토글) ───────────
     도킹된 튜터는 '원형 레이어'만 남긴다: 이름·상태를 감추고 voice 행을 얇게,
     트랜스크립트가 음수 마진으로 그 행 뒤까지 흘러들어 원 옆·뒤로 말풍선이
     지나간다(원 양옆을 가로막던 빈 배경 띠 제거). voice 행은 포인터를
     통과시켜 옆 영역 스크롤을 살리고, 원만 탭/드래그를 받는다. */
  .session-screen.is-live.transcript-open { --dock-h: 96px; }
  .session-screen.is-live.transcript-open .stage-right {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    margin-bottom: calc(-1 * var(--dock-h));
    animation: slide-up 0.35s cubic-bezier(.4,0,.2,1);
  }
  .session-screen.is-live.transcript-open .stage-transcript {
    padding-bottom: calc(var(--dock-h) + 8px);
    /* 원 뒤로 지나가는 말풍선은 서서히 녹아들게 (하단 페이드) */
    -webkit-mask-image: linear-gradient(to bottom,
      #000 calc(100% - var(--dock-h) - 10px), rgba(0, 0, 0, 0.35) calc(100% - 34px), transparent);
    mask-image: linear-gradient(to bottom,
      #000 calc(100% - var(--dock-h) - 10px), rgba(0, 0, 0, 0.35) calc(100% - 34px), transparent);
  }
  .session-screen.is-live.transcript-open .stage-voice {
    order: 2;
    flex: 0 0 auto;
    justify-content: center;
    padding: 0 20px;
    height: var(--dock-h);
    pointer-events: none;
  }
  .session-screen.is-live.transcript-open .avatar-circle {
    width: 72px; height: 72px;
    margin-bottom: 0;
    pointer-events: auto;
  }
  .session-screen.is-live.transcript-open .avatar-circle-inner {
    width: 64px; height: 64px;
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.55); /* 채팅 위에 떠 있는 층위감 */
  }
  .session-screen.is-live.transcript-open .stage-tutor-name,
  .session-screen.is-live.transcript-open .stage-tutor-state { display: none; }
  .session-screen.is-live.transcript-open .avatar-circle::after {
    content: '접기 ▲';
    bottom: -18px;
    animation: none;
    opacity: 0.4;
  }
  @keyframes slide-up {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: none; }
  }
}

/* ── 대화가 짧을 때 안내 카드 ── */
.report-short {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 22px 18px;
}
.report-short-icon {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
}
.report-short-msg {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text);
  max-width: 340px;
}

/* ═══════════════════════════════════════════════════════════════
   Session-end modal — replaces inline report progress with a
   centered popup dialog for progress, too-short, and report done.
   ═══════════════════════════════════════════════════════════════ */
.session-end-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.session-end-modal.hidden { display: none; }

.sem-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9,9,13,0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.sem-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px 28px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  animation: sem-enter 0.35s cubic-bezier(.2,.7,.3,1.1);
  box-shadow: 0 32px 80px -20px rgba(0,0,0,0.7);
}

@keyframes sem-enter {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to   { opacity: 1; transform: none; }
}

.sem-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  width: 100%;
}

.sem-icon {
  line-height: 1;
  margin-bottom: 4px;
  color: var(--hot);
}

.sem-icon svg {
  width: 40px;
  height: 40px;
  display: block;
  margin: 0 auto;
}

.sem-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.sem-desc {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

.sem-level {
  font-family: var(--font-latin);
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin: 6px 0;
}

/* progress bar inside modal */
.sem-progress-track {
  width: 100%;
  height: 8px;
  background: var(--surface-2);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 8px;
}
.sem-progress-bar {
  height: 100%;
  width: 0;
  border-radius: 6px;
  background: linear-gradient(90deg, #7fb800, var(--accent));
  transition: width 0.4s cubic-bezier(.2,.7,.2,1);
  box-shadow: 0 0 12px rgba(193,255,26,0.4);
}

/* spinner */
.sem-spinner-wrap {
  position: relative;
  width: 56px;
  height: 56px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sem-spinner {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: 3.5px solid var(--surface-2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: sem-spin 0.8s linear infinite;
}
.sem-spinner-pct {
  position: relative;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-1);
  font-variant-numeric: tabular-nums;
}
@keyframes sem-spin { to { transform: rotate(360deg); } }

/* close/action button */
.sem-close-btn {
  width: 100%;
  padding: 15px;
  margin-top: 8px;
  border: none;
  border-radius: 14px;
  background: var(--accent);
  color: #09090d;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.12s, transform 0.1s;
}
.sem-close-btn:hover { background: #d0ff40; }
.sem-close-btn:active { transform: scale(0.98); }
.sem-close-btn.hidden { display: none; }
/* Demoted to secondary when the modal offers a real action above it (drop
   recovery): two lime buttons stacked read as two equal choices. */
.sem-close-btn.is-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-weight: 600;
}
.sem-close-btn.is-secondary:hover { background: var(--surface-2); color: var(--text); }

/* ═══════════════════════════════════════════════════════════════
   Report v2 — progress bar · CEFR ladder · growth chart · 한글 리포트
   ═══════════════════════════════════════════════════════════════ */

/* 생성 진행률 */
.report-progress {
  margin-top: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 24px;
}
.rp-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.rp-label { font-size: 0.95rem; font-weight: 600; }
.rp-pct { font-family: var(--font-latin); font-size: 1.25rem; font-weight: 700; color: var(--accent); }
.rp-track { height: 10px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.rp-track i { display: block; height: 100%; width: 0; border-radius: 6px;
  background: linear-gradient(90deg,#7fb800,var(--accent));
  transition: width 0.35s cubic-bezier(.2,.7,.2,1);
  box-shadow: 0 0 12px rgba(193,255,26,0.4); }
.rp-steps { display: flex; justify-content: space-between; margin-top: 12px; }
.rp-steps span { font-size: 0.74rem; color: var(--muted); position: relative; padding-left: 14px; }
.rp-steps span::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 8px; height: 8px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); }
.rp-steps span.done { color: var(--text); }
.rp-steps span.done::before { background: var(--accent); border-color: var(--accent); }

/* ── 리포트 v2: 카드 기반 재설계 ─────────────────────────── */
.rpt { display: flex; flex-direction: column; gap: 14px; }

/* 리포트 하단 홈 네비게이션 */
.rpt-nav {
  display: flex;
  justify-content: center;
  padding: 24px 0 16px;
}
.rpt-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.15s ease;
}
.rpt-home-btn:hover, .rpt-home-btn:active {
  background: var(--accent);
  color: #09090d;
  border-color: var(--accent);
}

/* 리포트 상단 페이월 (무료 체험 소진 → 전환) */
.rpt-paywall {
  background:
    radial-gradient(120% 160% at 0% 0%, rgba(193,255,26,0.16), transparent 55%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid rgba(193,255,26,0.32); border-radius: 18px; padding: 20px;
}
.rpt-pw-key { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.04em; color: var(--accent); margin-bottom: 8px; }
.rpt-pw-title { font-size: 1.35rem; font-weight: 800; margin: 0 0 6px; letter-spacing: -0.01em; }
.rpt-pw-sub { font-size: 0.92rem; color: #c4c4d0; line-height: 1.6; margin: 0 0 16px; }
.rpt-pw-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.rpt-pw-plan { position: relative; display: flex; flex-direction: column; gap: 3px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: 13px; padding: 14px 14px 13px;
  transition: border-color 0.14s, transform 0.14s; }
.rpt-pw-plan:hover { border-color: rgba(193,255,26,0.4); transform: translateY(-2px); }
.rpt-pw-plan.featured { border-color: rgba(193,255,26,0.5); background: rgba(193,255,26,0.05); }
.rpt-pw-badge { position: absolute; top: -9px; right: 12px; font-size: 0.64rem; font-weight: 700; color: #09090d;
  background: var(--accent); border-radius: 999px; padding: 2px 9px; }
.rpt-pw-plan-name { font-family: var(--font-latin); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em; color: var(--muted); }
.rpt-pw-price { font-size: 1.3rem; font-weight: 800; color: var(--text); }
.rpt-pw-price i { font-style: normal; font-size: 0.78rem; font-weight: 600; color: var(--muted); margin-left: 1px; }
.rpt-pw-credit { font-size: 0.78rem; color: var(--muted); }
.rpt-pw-cta { display: block; text-align: center; text-decoration: none; background: var(--accent); color: #09090d;
  font-weight: 800; font-size: 1rem; border-radius: 12px; padding: 14px; transition: filter 0.14s; }
.rpt-pw-cta:hover { filter: brightness(1.06); }
.rpt-pw-terms { text-align: center; color: var(--muted); font-size: 0.78rem; margin: 10px 0 0; }

/* 키즈 선물 오퍼 (부모 리포트 정점 → 아이 6분 체험, §14.5 가족 퍼널) */
.kg-row { display: flex; flex-direction: column; gap: 10px; }
.kg-input {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 13px 14px; color: var(--text);
  font-size: 0.95rem; font-family: inherit;
}
.kg-input:focus { outline: none; border-color: rgba(193,255,26,0.5); }
.kg-btn { border: none; cursor: pointer; width: 100%; font-family: inherit; }
.kg-btn:disabled { opacity: 0.6; cursor: default; }

/* 부모용 키즈 세션 뷰 — 아이가 실제로 말한 문장들 */
.rpt-kidview {
  background:
    radial-gradient(120% 160% at 100% 0%, rgba(193,255,26,0.14), transparent 55%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid rgba(193,255,26,0.3); border-radius: 18px; padding: 20px;
}
.kv-eyebrow { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin: 0 0 6px; }
.kv-title { font-size: 1.25rem; font-weight: 800; margin: 0 0 14px; letter-spacing: -0.01em; }
.kv-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.kv-bubble {
  align-self: flex-start; max-width: 100%;
  background: rgba(193,255,26,0.08); border: 1px solid rgba(193,255,26,0.22);
  border-radius: 4px 14px 14px 14px; padding: 10px 14px;
  font-size: 0.95rem; line-height: 1.5; color: var(--text);
}
.kv-note { font-size: 0.88rem; color: #c4c4d0; line-height: 1.6; margin: 0; }

/* 히어로 점수 카드 */
.rpt-hero {
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(193,255,26,0.12), transparent 60%),
    var(--surface-2);
  border: 1px solid var(--border); border-radius: 18px; padding: 20px 20px 22px;
}
.rpt-hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.rpt-hero-eyebrow { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.rpt-hero-level { font-family: var(--font-latin); font-size: 3.4rem; font-weight: 700; letter-spacing: -0.04em; color: var(--accent); line-height: 0.95; display: flex; align-items: baseline; gap: 12px; }
.rpt-hero-level span { font-family: var(--font-body); font-size: 1.05rem; font-weight: 700; color: var(--text); letter-spacing: 0; }
.rpt-conf { flex-shrink: 0; font-size: 0.76rem; color: var(--muted); background: rgba(0,0,0,0.25); border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; }

/* 빠른 통계 타일 */
.rpt-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; }
.rpt-tile { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 14px 14px 12px; text-align: center; }
.rpt-tile-v { display: block; font-family: var(--font-latin); font-size: 1.8rem; font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.rpt-tile-v.accent { color: var(--accent); }
.rpt-tile-v i { font-style: normal; font-size: 0.9rem; color: var(--muted); font-weight: 600; margin-left: 1px; }
.rpt-tile-k { display: block; font-size: 0.74rem; color: var(--muted); margin-top: 7px; }

/* 총평 콜아웃 */
.rpt-summary { position: relative; background: var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 12px; padding: 16px 18px; }
.rpt-summary p { color: #d5d5e0; font-size: 1rem; line-height: 1.7; margin: 0; }

/* Flywheel callout — review that happened inside the conversation */
.rpt-flywheel { display: flex; align-items: center; gap: 12px; background: rgba(193,255,26,0.08); border: 1px solid rgba(193,255,26,0.28); border-radius: 12px; padding: 14px 16px; }
.rpt-fw-ico { color: var(--accent); flex: 0 0 auto; }
.rpt-fw-text { font-size: 0.98rem; color: var(--text); line-height: 1.45; }
.rpt-fw-text b { color: var(--accent); font-weight: 700; }
.rpt-fw-text span { display: block; font-size: 0.85rem; color: var(--muted); margin-top: 2px; }

/* 섹션 + 헤더 */
.rpt-sec { background: var(--surface-2); border: 1px solid var(--border); border-radius: 16px; padding: 18px; }
.rpt-sec-h { display: flex; align-items: baseline; gap: 9px; margin-bottom: 14px; padding-left: 11px; position: relative; }
.rpt-sec-h::before { content: ''; position: absolute; left: 0; top: 1px; width: 4px; height: 16px; border-radius: 2px; background: var(--accent); }
.rpt-sec-h h4 { font-size: 1.05rem; font-weight: 700; margin: 0; }
.rpt-sec-en { font-size: 0.7rem; font-weight: 600; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; font-family: var(--font-latin); }
.rpt-empty { font-size: 0.88rem; color: var(--muted); margin: 0; }

/* 영역별 카드 v2 */
.dim2-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dim2 { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.dim2-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 11px; }
.dim2-name { font-size: 0.94rem; font-weight: 700; }
.dim2-name i { font-style: normal; font-family: var(--font-latin); font-size: 0.6rem; color: var(--muted); margin-left: 5px; text-transform: uppercase; letter-spacing: 0.05em; }
.dim2-badge { font-family: var(--font-latin); font-size: 0.84rem; font-weight: 700; color: #09090d; background: var(--accent); border-radius: 7px; padding: 2px 9px; }
.dim2-badge.na { background: var(--surface-2); color: var(--muted); font-family: var(--font-body); font-size: 0.68rem; border: 1px solid var(--border); }
.dm-meter { display: flex; gap: 4px; margin-bottom: 11px; }
.dm-dot { flex: 1; height: 5px; border-radius: 3px; background: rgba(255,255,255,0.07); }
.dm-dot.on { background: linear-gradient(90deg, #7fb800, var(--accent)); }
.dim2-notes { font-size: 0.86rem; color: #b6b6c4; line-height: 1.62; margin: 0; }

/* 잘한 점 / 보완할 점 */
.sw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sw-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.sw-card.good { border-top: 2px solid var(--ok); }
.sw-card.warn { border-top: 2px solid #ffc800; }
.sw-h { font-size: 0.88rem; font-weight: 700; margin: 0 0 10px; }
.sw-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; }
.sw-list li { position: relative; padding-left: 22px; font-size: 0.9rem; color: #c4c4d0; line-height: 1.55; }
.sw-list li::before { position: absolute; left: 0; top: 0; font-size: 0.9rem; font-weight: 700; }
.sw-list.good li::before { content: '✓'; color: var(--ok); }
.sw-list.warn li::before { content: '↗'; color: #ffc800; }

/* 레슨 목표 */
.obj-wrap { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; }
.obj-score { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-top: 2px; }
.score-ring { width: 84px; height: 84px; }
.sr-track { fill: none; stroke: rgba(255,255,255,0.08); stroke-width: 7; }
.sr-fill { fill: none; stroke: var(--accent); stroke-width: 7; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset 0.6s ease; }
.sr-num { fill: var(--text); font-family: var(--font-latin); font-size: 22px; font-weight: 700; text-anchor: middle; }
.obj-score-sub { font-size: 0.76rem; color: var(--muted); white-space: nowrap; }
.obj-rows { display: flex; flex-direction: column; gap: 9px; }
.obj-row { display: grid; grid-template-columns: auto 1fr; gap: 11px; align-items: start; background: var(--surface); border: 1px solid var(--border); border-radius: 11px; padding: 12px 13px; }
.obj-status { flex-shrink: 0; font-size: 0.7rem; font-weight: 700; border-radius: 7px; padding: 3px 8px; white-space: nowrap; line-height: 1.2; }
.obj-row.met .obj-status { color: #09090d; background: var(--ok); }
.obj-row.todo .obj-status { color: #ffc800; background: rgba(255,200,0,0.12); border: 1px solid rgba(255,200,0,0.3); }
.obj-title { font-size: 0.9rem; font-weight: 600; color: var(--text); margin: 0; line-height: 1.5; }
.obj-comment { font-size: 0.83rem; color: var(--muted); margin: 5px 0 0; line-height: 1.55; }

/* 다음 세션 추천 */
.focus-list { display: flex; flex-direction: column; gap: 9px; }
.focus-card { display: flex; gap: 11px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: 11px; padding: 13px 14px; }
.focus-arrow { color: var(--accent); font-weight: 700; font-size: 1rem; line-height: 1.5; flex-shrink: 0; }
.focus-card p { margin: 0; font-size: 0.9rem; color: #c4c4d0; line-height: 1.55; }

/* CEFR 사다리 */
.cefr-ladder { display: grid; grid-template-columns: repeat(6,1fr); gap: 5px; }
.ladder-seg { position: relative; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 13px 6px 10px; text-align: center; transition: all 0.2s; }
.ladder-seg b { display: block; font-family: var(--font-latin); font-size: 1rem; color: var(--muted); }
.ladder-seg span { display: block; font-size: 0.66rem; color: var(--muted); margin-top: 2px; }
.ladder-seg.passed { background: rgba(193,255,26,0.06); border-color: rgba(193,255,26,0.18); }
.ladder-seg.passed b { color: rgba(193,255,26,0.6); }
.ladder-seg.active { background: var(--accent); border-color: var(--accent); transform: scale(1.08); z-index: 1; }
.ladder-seg.active b, .ladder-seg.active span { color: #09090d; }
.ladder-marker { position: absolute; top: -22px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  font-size: 0.64rem; font-weight: 700; color: var(--accent); }
.ladder-marker::after { content: '▼'; display: block; font-size: 0.5rem; line-height: 0.6; }

/* 성장 그래프 */
.growth-chart { background: var(--surface-2); border: 1px solid var(--border); border-radius: 16px; padding: 18px; }
.growth-chart .report-h { font-size: 1.05rem; font-weight: 700; margin: 0 0 12px; display: flex; align-items: baseline; gap: 8px; }
.growth-chart .report-h .muted-sm { font-size: 0.7rem; font-weight: 600; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; font-family: var(--font-latin); }
.gc-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 6px 4px 2px; }
.gc-wrap svg { width: 100%; height: auto; display: block; }
.gc-grid { stroke: var(--border); stroke-width: 1; }
.gc-ylab { fill: var(--muted); font-size: 10px; font-family: 'Space Grotesk', sans-serif; text-anchor: end; }
.gc-xlab { fill: var(--muted); font-size: 10px; font-family: 'Space Grotesk', sans-serif; text-anchor: middle; }
.gc-xlab.now { fill: var(--text); font-family: var(--font-body); font-weight: 600; }
.gc-area { fill: rgba(193,255,26,0.08); }
.gc-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.gc-dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.gc-dot.now { filter: drop-shadow(0 0 6px rgba(193,255,26,0.7)); }
.gc-now-lab { fill: var(--text); font-size: 11px; font-weight: 700; text-anchor: middle; font-family: 'Space Grotesk', sans-serif; }

/* 교정 예시 */
.err-list { display: grid; grid-template-columns: 1fr; gap: 10px; }
.err-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px 14px 44px; font-size: 0.92rem; }
.err-num { position: absolute; left: 14px; top: 14px; width: 20px; height: 20px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); font-family: var(--font-latin); font-size: 0.74rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.err-said { position: relative; color: #d98a8a; padding-left: 20px; margin-bottom: 6px; line-height: 1.45; }
.err-said::before { content: '✗'; position: absolute; left: 0; top: 0; color: var(--err); font-weight: 700; }
.err-better { position: relative; color: var(--ok); font-weight: 600; padding-left: 20px; margin-bottom: 8px; line-height: 1.45; }
.err-better::before { content: '✓'; position: absolute; left: 0; top: 0; font-weight: 700; }
.err-why { font-size: 0.84rem; color: var(--muted); line-height: 1.55; border-top: 1px dashed var(--border); padding-top: 8px; }

/* 교정 복습 드릴 진입 버튼 */
.drill-start { display: block; width: 100%; margin-top: 12px; background: var(--accent); color: #09090d;
  font-weight: 800; font-size: 0.96rem; border: none; border-radius: 12px; padding: 14px; cursor: pointer; transition: filter 0.14s; }
.drill-start:hover { filter: brightness(1.06); }

/* 드릴 오버레이 (풀스크린) */
html.drill-open { overflow: hidden; }
.drill-overlay { position: fixed; inset: 0; z-index: 500; background: var(--bg);
  display: flex; flex-direction: column; padding: 22px 20px calc(28px + env(safe-area-inset-bottom));
  padding-top: calc(20px + env(safe-area-inset-top)); }
.drill-top { display: flex; align-items: center; gap: 12px; margin-bottom: auto; }
.drill-x { background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); padding: 0;
  width: 34px; height: 34px; border-radius: 50%; font-size: 0.9rem; cursor: pointer; flex-shrink: 0; }
.drill-dots { display: flex; gap: 6px; flex: 1; justify-content: center; }
.drill-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); }
.drill-dot.done { background: color-mix(in srgb, var(--accent) 60%, transparent); border-color: transparent; }
.drill-dot.cur { background: var(--accent); border-color: var(--accent); transform: scale(1.25); }
.drill-count { font-family: var(--font-latin); font-size: 0.82rem; color: var(--muted); flex-shrink: 0; }
.drill-card { position: relative; margin: auto 0; text-align: center; max-width: 560px; align-self: center; width: 100%; }
.drill-label { font-size: 0.86rem; color: var(--muted); margin-bottom: 16px; }
.drill-better { font-size: 1.9rem; font-weight: 700; line-height: 1.4; letter-spacing: -0.01em; color: var(--text);
  cursor: pointer; padding: 4px 0; }
.drill-said { font-size: 0.95rem; color: var(--err); margin-top: 16px; }
.drill-said s { color: #d98a8a; }
.drill-why { font-size: 0.88rem; color: var(--muted); line-height: 1.6; margin-top: 12px; }
.drill-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 34px; }
.drill-listen { background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  font-size: 0.95rem; font-weight: 600; border-radius: 12px; padding: 13px; cursor: pointer; }
.drill-cta { background: var(--accent); color: #09090d; font-weight: 800; font-size: 1.05rem; border: none;
  border-radius: 13px; padding: 16px; cursor: pointer; transition: filter 0.14s; }
.drill-cta:hover { filter: brightness(1.06); }
.drill-perfect { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-latin); font-size: 2.6rem; font-weight: 800; color: var(--accent);
  background: var(--bg); border-radius: 16px; animation: drillPop 0.6s ease; pointer-events: none;
  text-shadow: 0 0 30px rgba(193,255,26,0.6); }
@keyframes drillPop { 0% { transform: scale(0.6); opacity: 0; } 25% { transform: scale(1.1); opacity: 1; }
  70% { transform: scale(1); opacity: 1; } 100% { transform: scale(1); opacity: 0; } }
.drill-done { text-align: center; }
.drill-done-mark { font-size: 3rem; margin-bottom: 10px; }
.drill-done h3 { font-size: 1.5rem; font-weight: 800; margin-bottom: 8px; }
.drill-done p { color: var(--muted); font-size: 0.95rem; margin-bottom: 24px; }

@media (max-width: 720px) {
  .cefr-ladder { gap: 3px; }
  .rp-steps span:nth-child(even) { display: none; }
  .rpt-hero-level { font-size: 2.9rem; }
  .dim2-grid, .sw-grid { grid-template-columns: 1fr; }
  .obj-wrap { grid-template-columns: 1fr; gap: 14px; }
  .obj-score { flex-direction: row; gap: 12px; justify-content: center; }
  .drill-better { font-size: 1.6rem; }
}

/* ── Credit guidance (chip · banner · upgrade modal) ────────── */
.credit-chip {
  margin-top: 16px;
  font-size: 0.86rem;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 16px;
}
.credit-chip b { color: var(--accent); font-family: var(--font-latin); }
.credit-chip span { font-size: 0.88rem; }
.credit-chip.empty { border-color: rgba(255,68,68,0.35); color: var(--err); }
.credit-chip.empty b { color: var(--err); }

.credit-empty-banner {
  margin-top: 16px;
  width: 100%;
  background: rgba(193,255,26,0.05);
  border: 1px solid rgba(193,255,26,0.25);
  border-radius: 14px;
  padding: 18px 20px;
  text-align: center;
}
.credit-empty-banner b { font-size: 1rem; }
.credit-empty-banner p { font-size: 0.86rem; color: var(--muted); margin: 7px 0 13px; line-height: 1.6; }

.upgrade-modal {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(5,5,9,0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.upgrade-card {
  background: var(--surface);
  border: 1px solid rgba(193,255,26,0.3);
  border-radius: 22px;
  padding: 36px 32px 26px;
  width: min(420px, 100%);
  text-align: center;
  box-shadow: 0 40px 100px -20px rgba(0,0,0,0.8);
  animation: modal-in 0.3s cubic-bezier(.2,.8,.3,1.15);
}
@keyframes modal-in { from { opacity: 0; transform: translateY(20px) scale(0.96); } to { opacity: 1; transform: none; } }
.upgrade-icon { font-size: 2.4rem; margin-bottom: 10px; }
.upgrade-card h3 { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; margin-bottom: 10px; }
.upgrade-card > p { color: var(--muted); font-size: 0.92rem; line-height: 1.65; margin-bottom: 20px; }
.upgrade-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.upgrade-plan { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 14px 10px; }
.upgrade-plan.featured { border-color: rgba(193,255,26,0.4); background: rgba(193,255,26,0.06); }
.upgrade-plan b { display: block; font-family: var(--font-latin); font-size: 0.82rem; letter-spacing: 0.08em; color: var(--muted); }
.upgrade-plan.featured b { color: var(--accent); }
.upgrade-plan span { display: block; font-size: 0.95rem; font-weight: 700; margin: 4px 0 2px; }
.upgrade-plan em { font-style: normal; font-size: 0.8rem; color: var(--muted); }
.upgrade-close { margin-top: 12px; background: none; border: none; color: var(--muted); font-size: 0.85rem; cursor: pointer; padding: 6px; }
.upgrade-close:hover { color: var(--text); }

/* ═══════════════════════════════════════════════════════════════
   Curriculum v2 — 리페어 · 리허설 · 서사 엔진
   ═══════════════════════════════════════════════════════════════ */

/* 3개 엔진 스트립 */
.engine-strip { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 44px; }
.engine-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 22px 20px; }
.engine-card .engine-icon { font-size: 1.6rem; display: block; margin-bottom: 10px; }
.engine-card b { display: block; font-size: 1.05rem; font-family: var(--font-display); margin-bottom: 6px; }
.engine-card p { font-size: 0.95rem; color: var(--text); opacity: 0.7; line-height: 1.65; }
.engine-card.soon { opacity: 0.75; }
.engine-state { position: absolute; top: 16px; right: 16px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; padding: 4px 12px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.engine-state.on { background: rgba(0,229,160,0.1); color: var(--ok); border-color: rgba(0,229,160,0.25); }

/* 레슨 섹션 */
.lesson-section { margin-bottom: 48px; }
.lesson-section-title { display: flex; align-items: baseline; gap: 10px; font-size: 1.4rem; font-weight: 700; font-family: var(--font-display); margin-bottom: 18px; letter-spacing: -0.01em; }
.lst-icon { font-size: 1.2rem; }
.lst-sub { font-size: 0.92rem; font-weight: 500; color: var(--muted); font-family: var(--font-body); }

.empty-hint { background: var(--surface); border: 1px dashed var(--border); border-radius: 14px; padding: 24px; font-size: 1rem; color: var(--text); opacity: 0.7; line-height: 1.6; }
.empty-hint a { color: var(--accent); font-weight: 600; }

/* 처방/리허설 카드 변주 */
.lesson-card.prescription { border-color: rgba(193,255,26,0.35); background: linear-gradient(165deg, rgba(193,255,26,0.05), var(--surface) 60%); }
.lesson-card.prescription .lesson-card-bg { color: rgba(193,255,26,0.08); }
.lesson-card.rehearsal { border-color: rgba(255,85,0,0.3); background: linear-gradient(165deg, rgba(255,85,0,0.05), var(--surface) 60%); }
.lesson-card.rehearsal .lesson-card-bg { color: rgba(255,85,0,0.1); }
.chip.hotc { background: rgba(255,85,0,0.12); color: var(--hot); border-color: rgba(255,85,0,0.25); }

/* 캐스팅 표시 */
.cast-row { position: relative; display: flex; align-items: center; gap: 9px; margin-top: 10px; }
.cast-avatar { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.95rem; flex-shrink: 0; }
.cast-label { font-size: 0.92rem; color: var(--muted); }
.cast-label b { color: var(--text); }

/* 리허설 생성 폼 */
.rehearsal-form { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px; margin-bottom: 18px; }
.rf-row { display: flex; gap: 10px; flex-wrap: wrap; }
.rf-row input[type="text"] { flex: 1; min-width: 240px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; color: var(--text); font: inherit; font-size: 0.95rem; padding: 11px 15px; outline: none; transition: border-color 0.14s; }
.rf-row input[type="text"]:focus { border-color: var(--accent); }
.rf-row input[type="date"] { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; color: var(--text); font: inherit; font-size: 0.9rem; padding: 10px 13px; outline: none; color-scheme: dark; }
.rf-hint { margin-top: 10px; font-size: 0.88rem; color: var(--muted); line-height: 1.5; }
.rf-err { color: var(--err); font-weight: 600; margin-left: 8px; }

/* 서사 엔진 티저 */
.story-teaser { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: center; background: linear-gradient(160deg, rgba(193,255,26,0.04), var(--surface) 55%); border: 1px solid var(--border); border-radius: 20px; padding: 32px; }
.story-teaser h3 { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; margin-bottom: 10px; letter-spacing: -0.01em; }
.story-teaser p { color: var(--text); opacity: 0.75; font-size: 1rem; line-height: 1.7; }
.story-teaser p b { color: var(--text); }
.story-teaser-eps { display: flex; flex-direction: column; gap: 8px; }
.story-teaser-eps span { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 18px; font-size: 0.95rem; font-weight: 600; color: var(--muted); }
.story-teaser-eps span.boss { background: rgba(255,85,0,0.08); border-color: rgba(255,85,0,0.3); color: var(--hot); }

@media (max-width: 800px) {
  .engine-strip { grid-template-columns: 1fr; }
  .story-teaser { grid-template-columns: 1fr; }
}

/* ── Landing: 커리큘럼 엔진 쇼케이스 ─────────────────────────── */
.engine-show-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.engine-show { background: var(--bg); border: 1px solid var(--border); border-radius: 18px; padding: 24px 22px; display: flex; flex-direction: column; }
.engine-show.soon { opacity: 0.85; }
.es-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.es-num { font-family: var(--font-latin); font-weight: 700; color: var(--accent); font-size: 0.95rem; }
.es-head b { font-family: var(--font-display); font-size: 1.08rem; flex: 1; }
.es-desc { font-size: 0.9rem; color: var(--muted); line-height: 1.6; margin-bottom: 16px; }
.es-desc b { color: var(--text); }
.es-mock { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px; margin-top: auto; display: flex; flex-direction: column; gap: 9px; }
.es-err { font-size: 0.88rem; color: var(--err); text-decoration: line-through; text-decoration-color: rgba(255,68,68,0.5); }
.es-arrow { font-size: 0.74rem; color: var(--muted); }
.es-rx { background: rgba(193,255,26,0.06); border: 1px solid rgba(193,255,26,0.25); border-radius: 11px; padding: 12px 14px; }
.es-rx b { display: block; font-size: 0.9rem; margin: 6px 0 3px; }
.es-rx span:last-child { font-size: 0.76rem; color: var(--muted); }
.es-input { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 13px; font-size: 0.86rem; color: var(--text); }
.es-cast { display: flex; align-items: center; gap: 11px; background: rgba(255,85,0,0.06); border: 1px solid rgba(255,85,0,0.25); border-radius: 11px; padding: 11px 13px; }
.es-cast img, .es-cast-fb { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; background: linear-gradient(135deg,#30cfd0,#330867); }
.es-cast b { display: block; font-size: 0.9rem; }
.es-cast span { font-size: 0.76rem; color: var(--muted); }
.es-eps { display: flex; flex-direction: column; gap: 7px; }
.es-eps span { background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: 9px 13px; font-size: 0.84rem; font-weight: 600; color: var(--muted); }
.es-eps span.boss { background: rgba(255,85,0,0.08); border-color: rgba(255,85,0,0.3); color: var(--hot); }

/* ── Home v2 대시보드 ────────────────────────────────────────── */
.home-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.home-hero-text h1 { font-family: var(--font-display); font-size: clamp(2.2rem,5vw,3.4rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.06; }
.home-hero-text .sub { margin-top: 10px; color: var(--muted); font-size: 1.02rem; }
.home-tutor { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 8px 22px 8px 8px; transition: border-color 0.15s; flex-shrink: 0; }
.home-tutor:hover { border-color: rgba(193,255,26,0.35); }
.home-tutor-img, .home-tutor-fb { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; display: flex; align-items: center; justify-content: center; font-size: 1.7rem; }
.home-tutor-meta b { display: block; font-size: 1rem; }
.home-tutor-meta span { font-size: 0.88rem; color: var(--muted); }
.home-stats { grid-template-columns: repeat(5,1fr); margin-bottom: 14px; }
.home-stats .stat-box { padding: 18px 20px; }
.home-stats .stat-value { font-size: 2.1rem; }
.home-panels { margin-top: 14px; }
.panel-more { float: right; font-size: 0.88rem; color: var(--accent); font-weight: 600; text-transform: none; letter-spacing: 0; }
.home-mem-chips { display: flex; flex-direction: column; gap: 9px; }
.home-mem-chip { background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; padding: 13px 16px; font-size: 1rem; color: var(--text); line-height: 1.55; }
.home-spark { width: 100%; height: 150px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; }

@media (max-width: 800px) {
  .engine-show-grid { grid-template-columns: 1fr; }
  .home-hero { flex-direction: column; align-items: flex-start; }
  .home-stats { grid-template-columns: repeat(2,1fr); }
}

/* ══════════════════════════════════════════════════════════════
   Admin Dashboard — Premium Redesign
   ══════════════════════════════════════════════════════════════ */

.adm { padding-bottom: 60px; }

/* ── Header ───────────────────────────────────────────────── */
.adm-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.adm-title {
  font-family: var(--font-latin);
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  background: linear-gradient(135deg, var(--text) 40%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.adm-subtitle {
  font-size: 1rem;
  color: var(--muted);
  margin-top: 6px;
}
.adm-header-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(0,229,160,0.08);
  border: 1px solid rgba(0,229,160,0.15);
}
.adm-live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ok);
  animation: adm-pulse 2s ease infinite;
}
@keyframes adm-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,229,160,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(0,229,160,0); }
}
.adm-live-text {
  font-family: var(--font-latin);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ok);
  letter-spacing: 0.04em;
}

/* ── KPI Cards ────────────────────────────────────────────── */
.adm-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}
.adm-kpi-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}
.adm-kpi-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top left, rgba(255,255,255,0.03), transparent 60%);
  pointer-events: none;
}
.adm-kpi-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255,255,255,0.1);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.adm-kpi-card--accent {
  border-color: rgba(193,255,26,0.2);
  background: linear-gradient(135deg, rgba(193,255,26,0.04), transparent 60%);
}
.adm-kpi-card--accent:hover {
  border-color: rgba(193,255,26,0.35);
  box-shadow: 0 8px 32px rgba(193,255,26,0.08);
}
.adm-kpi-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.adm-kpi-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--kpi-clr) 12%, transparent);
  color: var(--kpi-clr);
  flex-shrink: 0;
}
.adm-kpi-label {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}
.adm-kpi-value {
  font-size: 2.4rem;
  font-weight: 700;
  font-family: var(--font-latin);
  line-height: 1;
  letter-spacing: -0.03em;
}
.adm-kpi-card--accent .adm-kpi-value {
  color: var(--accent);
}
.adm-kpi-sub {
  font-size: 0.85rem;
  color: var(--muted);
  font-family: var(--font-body);
}

/* ── Panel (shared card) ──────────────────────────────────── */
.adm-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.adm-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top right, rgba(255,255,255,0.02), transparent 50%);
  pointer-events: none;
}
.adm-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  position: relative;
}
.adm-panel-title {
  font-family: var(--font-latin);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.adm-panel-badge {
  font-size: 0.78rem;
  font-family: var(--font-latin);
  color: var(--muted);
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.adm-panel-count {
  font-size: 0.85rem;
  font-family: var(--font-latin);
  color: var(--accent);
  font-weight: 600;
}

/* ── Charts Row ───────────────────────────────────────────── */
.adm-charts-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
.adm-chart-area {
  position: relative;
}
.adm-chart-area canvas {
  width: 100%;
  display: block;
}

/* ── Donut Ring Charts ────────────────────────────────────── */
.adm-ring-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.adm-ring-item {
  display: flex;
  align-items: center;
  gap: 16px;
}
.adm-ring-chart {
  width: 80px; height: 80px;
  flex-shrink: 0;
}
.adm-ring-svg {
  width: 100%; height: 100%;
  transform: rotate(-90deg);
}
.adm-ring-seg {
  transition: stroke-dasharray 0.6s ease;
}
.adm-ring-legend {
  flex: 1;
  min-width: 0;
}
.adm-ring-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.adm-legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
}
.adm-legend-dot {
  width: 10px; height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}
.adm-legend-label {
  font-size: 0.88rem;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.adm-legend-val {
  font-family: var(--font-latin);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

/* ── Inline Distribution Bars ─────────────────────────────── */
.adm-inline-dist {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  position: relative;
}
.adm-idist-section { }
.adm-idist-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}
.adm-idist-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.adm-idist-label {
  font-size: 0.88rem;
  min-width: 60px;
  flex-shrink: 0;
}
.adm-idist-track {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.05);
  border-radius: 6px;
  overflow: hidden;
}
.adm-idist-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #d0ff40);
  border-radius: 6px;
  min-width: 3px;
  transition: width 0.5s ease;
}
.adm-idist-fill--alt {
  background: linear-gradient(90deg, #06b6d4, #22d3ee);
}
.adm-idist-val {
  font-size: 0.8rem;
  color: var(--muted);
  font-family: var(--font-latin);
  font-weight: 600;
  min-width: 36px;
  text-align: right;
}
.adm-empty-sm {
  font-size: 0.85rem;
  color: var(--muted);
  padding: 8px 0;
}

/* ── User Table ───────────────────────────────────────────── */
.adm-table-wrap {
  overflow-x: auto;
  margin: -4px -4px 0;
  padding: 4px;
}
.adm-table {
  width: 100%;
  min-width: 960px;
  border-collapse: separate;
  border-spacing: 0;
}
.adm-table th {
  font-size: 0.76rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 14px 16px;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
  text-align: left;
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 2;
}
.adm-th-right { text-align: right; }
.adm-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  vertical-align: middle;
  font-size: 0.92rem;
}
.adm-table tbody tr {
  transition: background 0.15s;
}
.adm-table tbody tr:hover {
  background: rgba(193,255,26,0.03);
}
.adm-table tbody tr:last-child td {
  border-bottom: none;
}

/* User cell with avatar */
.adm-user-cell {
  display: flex;
  align-items: center;
  gap: 14px;
}
.adm-avatar {
  width: 38px; height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
  background: hsl(var(--av-hue), 50%, 20%);
  color: hsl(var(--av-hue), 80%, 75%);
  border: 1px solid hsl(var(--av-hue), 40%, 30%);
}
.adm-user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.adm-user-name {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.adm-user-email {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

/* Badges */
.adm-badge {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: capitalize;
  letter-spacing: 0.02em;
}
.adm-badge--google { background: rgba(66,133,244,0.12); color: #6ea8fc; }
.adm-badge--kakao { background: rgba(254,229,0,0.1); color: #f5de4a; }
.adm-badge--naver { background: rgba(3,199,90,0.1); color: #2ee67a; }

.adm-level-chip {
  font-size: 0.88rem;
  color: var(--text);
}
.adm-goals-text {
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 160px;
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.adm-plan-pill {
  display: inline-flex;
  padding: 4px 14px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-family: var(--font-latin);
}
.adm-plan-pill--free { background: var(--surface-2); color: var(--muted); }
.adm-plan-pill--basic { background: rgba(193,255,26,0.1); color: var(--accent); }
.adm-plan-pill--pro {
  background: linear-gradient(135deg, rgba(168,85,247,0.15), rgba(139,92,246,0.1));
  color: #c084fc;
}

.adm-td-num {
  font-family: var(--font-latin);
  font-weight: 600;
  text-align: right;
  font-size: 0.95rem;
}
.adm-td-date {
  font-family: var(--font-latin);
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1100px) {
  .adm-charts-row {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .adm-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .adm-kpi-card {
    padding: 18px;
  }
  .adm-kpi-value {
    font-size: 1.8rem;
  }
  .adm-ring-grid {
    grid-template-columns: 1fr;
  }
  .adm-inline-dist {
    grid-template-columns: 1fr;
  }
  .adm-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .adm-title {
    font-size: 2rem;
  }
  .adm-panel {
    padding: 20px;
    border-radius: 16px;
  }
}
@media (max-width: 480px) {
  .adm-kpi-grid {
    grid-template-columns: 1fr;
  }
  .adm-kpi-card {
    flex-direction: row;
    align-items: center;
    padding: 16px;
  }
  .adm-kpi-value {
    font-size: 1.5rem;
  }
}

/* ── Clickable Row ────────────────────────────────────────── */
.adm-clickable-row {
  cursor: pointer;
}
.adm-clickable-row:hover {
  background: rgba(193,255,26,0.05) !important;
}
.adm-clickable-row:active {
  background: rgba(193,255,26,0.08) !important;
}


/* ══════════════════════════════════════════════════════════════
   Admin — User Detail Page
   ══════════════════════════════════════════════════════════════ */

.aud-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 24px;
  transition: color 0.15s;
}
.aud-back:hover { color: var(--accent); }
.aud-back svg { flex-shrink: 0; }

/* ── Header ───────────────────────────────────────────────── */
.aud-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.aud-header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}
.aud-avatar-lg {
  width: 64px; height: 64px;
  border-radius: 18px;
  font-size: 1.5rem;
  position: relative;
  overflow: hidden;
}
.aud-avatar-img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.aud-header-info { }
.aud-name {
  font-family: var(--font-latin);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.aud-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.aud-email {
  font-size: 0.85rem;
  color: var(--muted);
}
.aud-header-right {
  display: flex;
  gap: 24px;
}
.aud-stat-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.aud-stat-val {
  font-family: var(--font-latin);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
}
.aud-stat-lbl {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── Info Grid ────────────────────────────────────────────── */
.aud-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

/* ── Profile Card ─────────────────────────────────────────── */
.aud-profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.aud-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.aud-field-label {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.aud-field-value {
  font-size: 1rem;
  font-weight: 500;
}
.aud-cefr-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 14px;
  border-radius: 8px;
  font-family: var(--font-latin);
  font-size: 0.88rem;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(193,255,26,0.12), rgba(0,229,160,0.1));
  color: var(--accent);
  letter-spacing: 0.04em;
  width: fit-content;
}

/* Tags */
.aud-tags-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.aud-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.aud-tag {
  display: inline-flex;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  background: rgba(193,255,26,0.08);
  color: var(--accent);
  border: 1px solid rgba(193,255,26,0.12);
}
.aud-tag--cyan {
  background: rgba(6,182,212,0.08);
  color: #22d3ee;
  border-color: rgba(6,182,212,0.12);
}

/* Consent */
.aud-consent-row {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.aud-consent {
  font-size: 0.78rem;
  padding: 4px 12px;
  border-radius: 8px;
  background: rgba(255,68,68,0.08);
  color: var(--err);
  font-weight: 500;
}
.aud-consent--yes {
  background: rgba(0,229,160,0.08);
  color: var(--ok);
}

/* ── Memory Card ──────────────────────────────────────────── */
.aud-memory-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 500px;
  overflow-y: auto;
  padding-right: 4px;
}
.aud-memory-item {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: border-color 0.15s;
}
.aud-memory-item:hover {
  border-color: rgba(255,255,255,0.08);
}
.aud-memory-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.aud-memory-type {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(139,92,246,0.1);
  color: #a78bfa;
}
.aud-memory-type--fact { background: rgba(59,130,246,0.1); color: #60a5fa; }
.aud-memory-type--preference { background: rgba(249,115,22,0.1); color: #fb923c; }
.aud-memory-type--goal { background: rgba(0,229,160,0.1); color: var(--ok); }
.aud-memory-type--recurring_error { background: rgba(255,68,68,0.1); color: var(--err); }
.aud-memory-type--milestone { background: rgba(193,255,26,0.1); color: var(--accent); }
.aud-memory-type--open_thread { background: rgba(6,182,212,0.1); color: #22d3ee; }
.aud-memory-type--recap { background: var(--surface-2); color: var(--muted); }
.aud-memory-date {
  font-size: 0.78rem;
  color: var(--muted);
  font-family: var(--font-latin);
}
.aud-memory-content {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text);
}
.aud-memory-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
.aud-memory-salience {
  display: flex;
  gap: 2px;
}
.aud-star {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.1);
}
.aud-star.active {
  color: #fbbf24;
}
.aud-memory-archived {
  font-size: 0.72rem;
  color: var(--muted);
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--surface-2);
}

/* ── Session mode chip ────────────────────────────────────── */
.aud-mode-chip {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: capitalize;
  background: var(--surface-2);
  color: var(--muted);
}
.aud-mode--free { background: rgba(59,130,246,0.1); color: #60a5fa; }
.aud-mode--lesson { background: rgba(193,255,26,0.1); color: var(--accent); }
.aud-mode--diagnostic { background: rgba(249,115,22,0.1); color: #fb923c; }
.aud-mode--review { background: rgba(139,92,246,0.1); color: #a78bfa; }

.aud-report-dot {
  color: var(--ok);
  font-weight: 700;
}

/* ── Vocab Grid ───────────────────────────────────────────── */
.aud-vocab-stats {
  display: flex;
  gap: 8px;
}
.aud-vocab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.aud-vocab-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  transition: border-color 0.15s, transform 0.15s;
}
.aud-vocab-card:hover {
  border-color: rgba(255,255,255,0.08);
  transform: translateY(-2px);
}
.aud-vocab-front {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.3;
}
.aud-vocab-back {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 10px;
  line-height: 1.4;
}
.aud-vocab-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.aud-vocab-type {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.aud-vocab-reps {
  font-size: 0.78rem;
  font-family: var(--font-latin);
  color: var(--accent);
  font-weight: 600;
}
.aud-more-note {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ── User Detail Responsive ───────────────────────────────── */
@media (max-width: 900px) {
  .aud-info-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .aud-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .aud-header-right {
    width: 100%;
    justify-content: space-around;
    padding-top: 16px;
    border-top: 1px solid var(--border);
  }
  .aud-name {
    font-size: 1.4rem;
  }
  .aud-profile-grid {
    grid-template-columns: 1fr;
  }
  .aud-vocab-grid {
    grid-template-columns: 1fr;
  }
}

/* ══════════════════════════════════════════════════════════════
   Profile / My Page
   ══════════════════════════════════════════════════════════════ */

.prf-toast {
  background: rgba(0,229,160,0.1);
  border: 1px solid rgba(0,229,160,0.2);
  color: var(--ok);
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 20px;
  animation: prf-fade 0.3s ease;
}
@keyframes prf-fade {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.prf-main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

/* Identity block */
.prf-identity {
  display: flex;
  align-items: center;
  gap: 16px;
}
.prf-me-ava {
  width: 58px; height: 58px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.prf-me-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prf-me-ava-fb {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  background: var(--surface-2);
  font-weight: 700; font-size: 1.35rem;
  font-family: var(--font-latin);
}
.prf-identity-info { min-width: 0; }
.prf-nickname {
  font-size: 1.3rem;
  font-weight: 700;
  font-family: var(--font-body);
  line-height: 1.2;
}
.prf-email {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 3px;
}
.prf-identity-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* Quiet stat strip — numbers speak, no icon chrome */
.prf-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin: 20px 0 4px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.prf-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.prf-stat b {
  font-family: var(--font-latin);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}
.prf-stat span {
  font-size: 0.74rem;
  color: var(--muted);
}
.prf-stat--accent b { color: var(--accent); }

/* Key facts — quiet key/value rows */
.prf-facts { display: flex; flex-direction: column; }
.prf-fact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.prf-fact:last-child { border-bottom: none; padding-bottom: 0; }
.prf-fact > span { color: var(--muted); flex-shrink: 0; }
.prf-fact > b {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; min-width: 0; text-align: right;
}
.prf-fact-thumb {
  width: 26px; height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

/* Edit form */
.prf-edit-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.prf-form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.prf-form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.prf-input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  color: var(--text);
  font-size: 1rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s;
}
.prf-input:focus {
  border-color: var(--accent);
}

/* Radio/Check chip groups */
.prf-radio-group,
.prf-check-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.prf-radio-chip,
.prf-check-chip {
  display: inline-flex;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  transition: all 0.15s;
  user-select: none;
}
.prf-radio-chip input,
.prf-check-chip input {
  display: none;
}
.prf-radio-chip:hover,
.prf-check-chip:hover {
  border-color: rgba(255,255,255,0.12);
  color: var(--text);
}
.prf-radio-chip.active,
.prf-radio-chip:has(input:checked),
.prf-check-chip.active,
.prf-check-chip:has(input:checked) {
  background: rgba(193,255,26,0.1);
  border-color: rgba(193,255,26,0.3);
  color: var(--accent);
}

.prf-save-btn {
  align-self: flex-start;
  margin-top: 4px;
}

/* Details / collapsible */
.prf-details {
  margin-bottom: 24px;
}
.prf-details-summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  padding: 8px 0;
  transition: color 0.15s;
  list-style: none;
}
.prf-details-summary::-webkit-details-marker { display: none; }
/* disclosure chevron drawn in CSS (no pictogram glyphs) */
.prf-details-summary::before {
  content: '';
  width: 7px; height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.prf-details[open] .prf-details-summary::before {
  transform: rotate(45deg);
}
.prf-details-summary:hover { color: var(--accent); }
.prf-hint {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 14px;
  line-height: 1.5;
}
.prf-textarea {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.65;
  font-family: var(--font-body);
  resize: vertical;
  outline: none;
  width: 100%;
  min-height: 220px;
  overflow: hidden;       /* JS auto-grow keeps it tall enough to show all text */
  transition: border-color 0.2s;
}
.prf-textarea:focus { border-color: var(--accent); }
.prf-form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.prf-file-input {
  font-size: 0.85rem;
  color: var(--muted);
}
.prf-error {
  color: var(--err);
  font-size: 0.88rem;
  margin-top: 4px;
}
.prf-hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* Responsive */
@media (max-width: 900px) {
  .prf-main-grid {
    grid-template-columns: 1fr;
  }
}

/* ══════════════════════════════════════════════════════════════
   Memory Page — Redesign
   ══════════════════════════════════════════════════════════════ */

.mem-section {
  margin-bottom: 32px;
}
.mem-section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.mem-section-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--sec-clr) 12%, transparent);
  color: var(--sec-clr);
  flex-shrink: 0;
}
.mem-section-title {
  font-family: var(--font-body);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.mem-section-sub {
  font-size: 0.88rem;
  color: var(--muted);
  margin-left: auto;
}
.mem-section-count {
  font-size: 0.82rem;
  font-family: var(--font-latin);
  color: var(--accent);
  font-weight: 600;
  background: rgba(193,255,26,0.08);
  padding: 3px 12px;
  border-radius: 999px;
}

/* Recap card */
.mem-recap-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 28px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}
.mem-recap-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: #8b5cf6;
  border-radius: 4px 0 0 4px;
}
.mem-recap-text {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text);
}

/* Thread cards */
.mem-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
}
.mem-thread-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.15s;
}
.mem-thread-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: #06b6d4;
  border-radius: 4px 0 0 4px;
}
.mem-thread-card:hover { border-color: rgba(6,182,212,0.2); }
.mem-thread-text {
  flex: 1;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
}

/* Long-term memory items */
.mem-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.mem-long-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
@media (min-width: 880px) {
  .mem-long-list { grid-template-columns: 1fr 1fr; }
}
.mem-long-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color 0.15s, background 0.15s;
}
.mem-long-item:hover {
  border-color: rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
}
.mem-more-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px dashed var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.mem-more-btn:hover { border-color: var(--muted); color: var(--text); }
.mem-more-btn[hidden] { display: none; }
.mem-long-body {
  flex: 1;
  min-width: 0;
}
.mem-long-type {
  display: inline-flex;
  padding: 3px 12px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  background: rgba(139,92,246,0.1);
  color: #a78bfa;
}
.mem-type--fact { background: rgba(59,130,246,0.1); color: #60a5fa; }
.mem-type--preference { background: rgba(249,115,22,0.1); color: #fb923c; }
.mem-type--goal { background: rgba(0,229,160,0.1); color: var(--ok); }
.mem-type--recurring_error { background: rgba(255,68,68,0.1); color: var(--err); }
.mem-type--relationship { background: rgba(236,72,153,0.1); color: #f472b6; }
.mem-type--milestone { background: rgba(193,255,26,0.1); color: var(--accent); }
.mem-long-text {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text);
}

/* Delete button */
.mem-del-form { flex-shrink: 0; }
.mem-del-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  padding: 0; /* global button padding crushes the 16px icon to 0 width (§13.26b .vd-knob pattern) */
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  border-radius: 10px;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.mem-del-btn:hover {
  color: var(--err);
  background: rgba(255,68,68,0.08);
}

/* Delete confirmation card (in-page — app shells have no native confirm()) */
.mem-confirm-modal {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.6); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.mem-confirm-modal[hidden] { display: none; }
.mem-confirm-card {
  background: var(--surface-2, #1a1a2e);
  border: 1px solid var(--border);
  border-radius: 16px; padding: 24px; width: 100%; max-width: 340px;
}
.mem-confirm-title { font-size: 1.05rem; font-weight: 700; color: #fff; margin-bottom: 12px; }
.mem-confirm-text {
  font-size: 0.9rem; line-height: 1.5; color: var(--text);
  background: rgba(255,255,255,.05); border-radius: 10px;
  padding: 10px 12px; margin: 0 0 10px;
}
.mem-confirm-text:empty { display: none; }
.mem-confirm-note { font-size: 0.84rem; color: var(--muted); margin: 0 0 16px; line-height: 1.5; }
.mem-confirm-actions { display: flex; gap: 10px; justify-content: flex-end; }
.mem-confirm-del { background: #e53e3e; color: #fff; }
.mem-confirm-del:not(:disabled):hover { background: #f05252; }

/* Empty state */
.mem-empty {
  font-size: 1rem;
  color: var(--muted);
  padding: 20px 0;
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 640px) {
  .mem-card-grid {
    grid-template-columns: 1fr;
  }
  .mem-section-sub {
    display: none;
  }
  .mem-recap-card,
  .mem-thread-card,
  .mem-long-item {
    padding: 16px 18px;
  }
}

/* ══════════════════════════════════════════════════════════════
   Progress Page — Redesign
   ══════════════════════════════════════════════════════════════ */

.pgr-stats-grid {
  grid-template-columns: repeat(4, 1fr);
}
.pgr-chart-wrap {
  padding: 8px 0;
}

/* Skill dimension cards */
.pgr-dim-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
.pgr-dim-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  transition: border-color 0.15s;
}
.pgr-dim-card:hover {
  border-color: rgba(255,255,255,0.08);
}
.pgr-dim-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.pgr-dim-emoji {
  font-size: 1.5rem;
  flex-shrink: 0;
}
.pgr-dim-emoji svg { display: block; }
/* SVG X/check 마크 래퍼 — 부모의 line-through가 아이콘을 긋지 않도록 인라인블록 */
.pgr-mark { display: inline-block; vertical-align: -2px; margin-right: 5px; }
.pgr-mark svg { display: block; }
.pgr-dim-names {
  flex: 1;
  min-width: 0;
}
.pgr-dim-name {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
}
.pgr-dim-en {
  font-family: var(--font-latin);
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.pgr-dim-level {
  font-family: var(--font-latin);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}
.pgr-dim-na {
  font-size: 0.9rem;
  color: var(--muted);
}
.pgr-delta {
  font-style: normal;
  font-size: 0.7rem;
  margin-left: 3px;
}
.pgr-delta--up { color: var(--ok); }
.pgr-delta--down { color: var(--err); }
.pgr-dim-bar {
  height: 6px;
  background: rgba(255,255,255,0.05);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 12px;
}
.pgr-dim-fill {
  height: 100%;
  background: linear-gradient(90deg, #7fb800, var(--accent));
  border-radius: 6px;
  transition: width 0.5s ease;
}
.pgr-dim-notes {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.6;
  opacity: 0.85;
}

/* Two-column layout */
.pgr-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 0;
}

/* Session groups */
.pgr-session-group {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.pgr-session-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.pgr-session-date {
  display: inline-block;
  font-family: var(--font-latin);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 8px;
}

/* Lists */
.pgr-list {
  padding-left: 20px;
  margin: 0;
}
.pgr-list li {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 4px;
  opacity: 0.9;
}
.pgr-list--good li::marker {
  color: var(--ok);
}
.pgr-empty {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.6;
}

/* Recurring */
.pgr-recurring-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pgr-recurring-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.pgr-recurring-text {
  flex: 1;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
}
.pgr-recurring-count {
  flex-shrink: 0;
  font-family: var(--font-latin);
  font-size: 0.82rem;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(251,191,36,0.1);
  padding: 4px 12px;
  border-radius: 999px;
}

/* Focus points */
.pgr-focus-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.pgr-focus-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
}

/* Error corrections */
.pgr-err-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.pgr-err-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  transition: border-color 0.15s;
}
.pgr-err-card:hover { border-color: rgba(255,255,255,0.08); }
.pgr-err-date {
  font-family: var(--font-latin);
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 10px;
}
.pgr-err-said {
  font-size: 1rem;
  color: var(--err);
  text-decoration: line-through;
  text-decoration-color: rgba(255,68,68,0.4);
  margin-bottom: 8px;
  line-height: 1.5;
}
.pgr-err-better {
  font-size: 1rem;
  color: var(--ok);
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.5;
}
.pgr-err-why {
  font-size: 0.95rem;
  color: var(--text);
  opacity: 0.75;
  line-height: 1.6;
  border-top: 1px dashed var(--border);
  padding-top: 10px;
}

.pgr-link-note {
  font-size: 0.92rem;
  color: var(--muted);
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.pgr-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Responsive */
@media (max-width: 900px) {
  .pgr-two-col {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .pgr-stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .pgr-dim-grid {
    grid-template-columns: 1fr;
  }
  .pgr-err-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Progress table overrides (larger text) ───────────────── */
.pgr-stats-grid + .adm-panel .adm-table td,
.adm .adm-panel:last-child .adm-table td {
  font-size: 1.02rem;
  padding: 16px 18px;
}
.adm .adm-panel:last-child .adm-table th {
  font-size: 0.82rem;
  padding: 16px 18px;
}
.adm .adm-panel:last-child .adm-td-date {
  font-size: 1rem;
  color: var(--text);
  opacity: 0.85;
}
.adm .adm-panel:last-child .aud-mode-chip {
  font-size: 0.88rem;
  padding: 6px 16px;
}
.adm .adm-panel:last-child .aud-cefr-badge {
  font-size: 0.95rem;
  padding: 5px 16px;
}

/* ── Profile quick links ───────────────────────────────────── */
.prf-quick-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.prf-quick-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  transition: background 0.15s;
}
.prf-quick-link:hover {
  background: var(--surface-2);
}
.prf-quick-link svg {
  color: var(--muted);
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Immersive onboarding — "소리가 당신을 알아가는" 플로팅 AI 튜토리얼 (.ob2-*)
   A mystical floating orb guides the user through a step-by-step deep dive,
   filling an "understanding %" ring, ending in tutor selection.
   ═══════════════════════════════════════════════════════════════════════════ */
.ob2 {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;   /* vertically center the orb + active scene */
  /* tall scenes scroll — the nav row needs clearance from the home indicator */
  padding: calc(28px + env(safe-area-inset-top)) 20px calc(44px + env(safe-area-inset-bottom));
  overflow-x: hidden;
}

/* ambient background (soft glow only) */
.ob2-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.ob2-bg-glow {
  position: absolute; left: 50%; top: 42%; width: 70vw; height: 70vw; max-width: 720px; max-height: 720px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(193,255,26,0.12), rgba(193,255,26,0) 62%);
  filter: blur(20px); animation: ob2GlowPulse 7s ease-in-out infinite;
}
@keyframes ob2GlowPulse { 0%,100% { opacity: .55; transform: translate(-50%,-50%) scale(1); } 50% { opacity: .9; transform: translate(-50%,-50%) scale(1.12); } }

/* ───────────────── stage (orb + meter + speech) ───────────────── */
.ob2-stage { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; text-align: center; }

/* the orb */
.orb {
  position: relative; width: 200px; height: 200px; margin-bottom: 6px;
  animation: orbFloat 6s ease-in-out infinite;
}
@keyframes orbFloat { 0%,100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-16px) rotate(2deg); } }

/* understanding ring */
.orb-ring { position: absolute; inset: 0; transform: rotate(-90deg); overflow: visible; }
.orb-ring-track { fill: none; stroke: rgba(255,255,255,0.06); stroke-width: 4; }
.orb-ring-fill {
  fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(193,255,26,0.6));
  transition: stroke-dashoffset .1s linear;
}

/* halos — percentage insets so the orb keeps its proportions at any size
   (fixed px insets shrank the body to a pea in the compact stage) */
.orb-halo {
  position: absolute; inset: 9%; border-radius: 50%;
  background: radial-gradient(circle, rgba(193,255,26,0.28), rgba(193,255,26,0) 70%);
  animation: orbHalo 4s ease-in-out infinite;
}
.orb-halo--2 { inset: 2%; opacity: .5; animation-delay: -2s; animation-duration: 5.5s; }
@keyframes orbHalo { 0%,100% { transform: scale(1); opacity: .7; } 50% { transform: scale(1.18); opacity: .25; } }

/* body */
.orb-body {
  position: absolute; inset: 20%; border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, #eafff0 0%, #c1ff1a 30%, #6fb800 70%, #2c5400 100%);
  box-shadow:
    0 0 40px rgba(193,255,26,0.55),
    inset -10px -14px 30px rgba(0,40,0,0.5),
    inset 8px 10px 26px rgba(255,255,255,0.55);
  overflow: hidden;
  transition: transform .5s cubic-bezier(.2,.9,.2,1), box-shadow .5s ease;
}
.orb-core {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.85), rgba(255,255,255,0) 45%);
  mix-blend-mode: screen; opacity: .35;
  animation: orbCore 3.4s ease-in-out infinite;
}
@keyframes orbCore { 0%,100% { transform: scale(.8); opacity: .25; } 50% { transform: scale(1.15); opacity: .55; } }
.orb-shine {
  position: absolute; top: 14%; left: 20%; width: 38%; height: 30%; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.9), rgba(255,255,255,0) 70%);
  filter: blur(2px);
}
/* gentle "eyes" — the orb is listening */
.orb-eye {
  position: absolute; top: 46%; width: 7.5%; height: 7.5%;
  min-width: 5px; min-height: 5px; border-radius: 50%;
  background: rgba(10,30,0,0.55); box-shadow: 0 0 4px rgba(0,0,0,0.3);
  animation: orbBlink 5.5s ease-in-out infinite;
}
.orb-eye--l { left: 36%; } .orb-eye--r { right: 36%; }
@keyframes orbBlink { 0%,92%,100% { transform: scaleY(1); } 95% { transform: scaleY(0.12); } }

/* orbiting particles */
.orb-particle {
  position: absolute; top: 50%; left: 50%; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px rgba(193,255,26,0.8);
  transform-origin: 0 0; opacity: .8;
  animation: orbOrbit 9s linear infinite;
  animation-delay: calc(var(--a) / 360 * -9s);
}
@keyframes orbOrbit {
  from { transform: rotate(var(--a)) translateX(108px) rotate(calc(-1 * var(--a))); }
  to   { transform: rotate(calc(var(--a) + 360deg)) translateX(108px) rotate(calc(-1 * (var(--a) + 360deg))); }
}

/* orb states */
.orb[data-state="think"] .orb-body { animation: orbThink 1.1s ease-in-out infinite; }
@keyframes orbThink { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05) rotate(-3deg); } }
.orb[data-state="speak"] .orb-body { box-shadow: 0 0 60px rgba(193,255,26,0.8), inset -10px -14px 30px rgba(0,40,0,0.5), inset 8px 10px 26px rgba(255,255,255,0.6); }
.orb[data-state="speak"] .orb-core { animation-duration: 0.9s; opacity: .65; }
.orb[data-state="listen"] .orb-body { transform: scale(1.08); }
.orb[data-state="listen"] .orb-halo { animation-duration: 1.2s; }
.orb[data-state="happy"] .orb-body { transform: scale(1.12) translateY(-4px); box-shadow: 0 0 70px rgba(193,255,26,0.95); }
.orb--bloom { animation: orbFloat 5s ease-in-out infinite, orbBloom 1.4s ease-out 1; }
@keyframes orbBloom { 0% { filter: brightness(1); } 40% { filter: brightness(1.8) saturate(1.3); } 100% { filter: brightness(1); } }
.orb--warp .orb-body { animation: orbWarp 1s ease-in forwards; }
@keyframes orbWarp { 0% { transform: scale(1); } 60% { transform: scale(0.85); } 100% { transform: scale(2.6); opacity: 0; } }

/* understanding meter */
.ob2-meter { margin-top: 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; transition: opacity .4s ease; }
.ob2-meter.is-hidden { opacity: 0; pointer-events: none; }
.ob2-meter-label { font-size: 0.78rem; color: var(--muted); letter-spacing: 0.02em; }
.ob2-meter-pct { font-family: var(--font-latin); font-size: 1.9rem; font-weight: 700; color: var(--accent); line-height: 1; }

/* the orb speaks */
.ob2-say {
  margin-top: 14px; min-height: 3.6em; max-width: 30ch;
  font-size: 1.18rem; font-weight: 600; line-height: 1.55; color: var(--text);
  white-space: pre-line; letter-spacing: -0.01em;
}

.ob2-error { z-index: 3; margin-top: 10px; }

/* ───────────────── scenes ───────────────── */
.ob2-form { position: relative; z-index: 2; width: 100%; max-width: 460px; margin-top: 18px; }
.ob2-scene { display: none; }
.ob2-scene.is-active { display: block; animation: ob2In .5s cubic-bezier(.2,.9,.2,1) both; }
.ob2-scene.exit-left  { display: block; animation: ob2OutL .42s ease forwards; }
.ob2-scene.exit-right { display: block; animation: ob2OutR .42s ease forwards; }
@keyframes ob2In   { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes ob2OutL { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-18px) scale(.98); } }
@keyframes ob2OutR { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(18px) scale(.98); } }
.ob2-scene--wide { max-width: 720px; margin-left: auto; margin-right: auto; }

.ob2-scene-inner { display: flex; flex-direction: column; gap: 16px; align-items: stretch; }
.ob2-hint { font-size: 0.85rem; color: var(--muted); text-align: center; }
.ob2-skip-hint { font-size: 0.82rem; color: var(--muted); text-align: center; margin-top: 2px; }

/* text + select inputs */
.ob2-input, .ob2-select, .ob2-textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  color: var(--text); font-family: inherit; font-size: 1.02rem; padding: 14px 16px; outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.ob2-input:focus, .ob2-select:focus, .ob2-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(193,255,26,0.14); }
.ob2-input--big { text-align: center; font-size: 1.3rem; font-weight: 600; padding: 18px 16px; }
.ob2-textarea { resize: vertical; line-height: 1.55; min-height: 110px; }
.ob2-select { appearance: none; cursor: pointer; }

/* level cards */
.ob2-levels { display: flex; flex-direction: column; gap: 10px; }
.ob2-level input { display: none; }
.ob2-level-card {
  display: flex; flex-direction: row; align-items: center; gap: 14px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  cursor: pointer; transition: all .18s ease;
}
.ob2-level-txt { display: flex; flex-direction: column; gap: 2px; }
.ob2-level-card b { font-size: 1.02rem; font-weight: 600; }
.ob2-level-card i { font-style: normal; font-size: 0.84rem; color: var(--muted); }
.ob2-level-card:hover { border-color: var(--muted); transform: translateX(3px); }
.ob2-level input:checked + .ob2-level-card { border-color: var(--accent); background: rgba(193,255,26,0.08); box-shadow: 0 0 0 1px var(--accent); }

/* signal-bar level meter (replaces emoji) */
.ob2-bars { display: flex; align-items: flex-end; gap: 3px; height: 26px; width: 32px; flex-shrink: 0; }
.ob2-bars i { width: 5px; border-radius: 2px; background: var(--border); transition: background .2s ease; }
.ob2-bars i:nth-child(1) { height: 32%; }
.ob2-bars i:nth-child(2) { height: 49%; }
.ob2-bars i:nth-child(3) { height: 66%; }
.ob2-bars i:nth-child(4) { height: 83%; }
.ob2-bars i:nth-child(5) { height: 100%; }
.ob2-bars[data-lv="1"] i:nth-child(-n+1),
.ob2-bars[data-lv="2"] i:nth-child(-n+2),
.ob2-bars[data-lv="3"] i:nth-child(-n+3),
.ob2-bars[data-lv="4"] i:nth-child(-n+4),
.ob2-bars[data-lv="5"] i:nth-child(-n+5) { background: var(--accent); }
.ob2-level input:checked + .ob2-level-card .ob2-bars i { box-shadow: 0 0 6px rgba(193,255,26,0.5); }

/* chips */
.ob2-chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.ob2-chip input { display: none; }
.ob2-chip span {
  display: inline-block; padding: 11px 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  font-size: 0.96rem; cursor: pointer; transition: all .16s ease;
}
.ob2-chip span:hover { border-color: var(--muted); transform: translateY(-2px); }
.ob2-chip input:checked + span { background: var(--accent); border-color: var(--accent); color: #09090d; font-weight: 600; }

/* nav row */
.ob2-nav { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-top: 4px; }
.ob2-nav .ob2-go:not(.ob2-skip) { margin-left: auto; }
.ob2-go { white-space: nowrap; }
.btn.ob2-go { padding: 13px 22px; font-size: 1rem; }
.ob2-go.btn-primary { width: 100%; }
.ob2-nav .ob2-go.btn-primary { width: auto; }

/* reveal summary card */
.ob2-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 22px 20px;
  text-align: left; box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}
.ob2-card-title { font-size: 0.82rem; color: var(--muted); margin-bottom: 12px; letter-spacing: 0.02em; }
.ob2-card-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.ob2-card-list li {
  display: flex; align-items: baseline; gap: 12px;
  font-size: 1rem; line-height: 1.45; padding: 11px 14px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border);
  animation: ob2In .5s ease both;
}
.ob2-card-key { flex-shrink: 0; min-width: 5.5em; font-size: 0.82rem; font-weight: 600; color: var(--accent); letter-spacing: 0.01em; }
.ob2-card-val { color: var(--text); overflow-wrap: anywhere; flex: 1; }

/* work scene follow-up (industry) — appears only for working occupations */
.ob2-subq { margin-top: 18px; animation: ob2In .4s ease both; }
.ob2-subq[hidden] { display: none; }
.ob2-subq-label { font-size: 0.88rem; color: var(--muted); text-align: center; margin-bottom: 10px; }
.ob2-chips--sub .ob2-chip span { padding: 9px 13px; font-size: 0.88rem; }

/* reveal — "제가 이해한 당신" (chips echoed back as tags) */
.ob2-reveal {
  background: var(--surface); border: 1px solid rgba(193,255,26,0.22); border-radius: 18px;
  padding: 20px 18px; text-align: left; display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}
.ob2-reveal-row { display: flex; flex-direction: column; gap: 7px; animation: ob2In .5s ease both; }
.ob2-reveal-row:nth-child(2) { animation-delay: .08s; }
.ob2-reveal-row:nth-child(3) { animation-delay: .16s; }
.ob2-reveal-row:nth-child(4) { animation-delay: .24s; }
.ob2-reveal-row:nth-child(5) { animation-delay: .32s; }
.ob2-reveal-label { font-size: 0.8rem; font-weight: 600; color: var(--accent); letter-spacing: 0.01em; }
.ob2-reveal-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ob2-reveal-tags i {
  font-style: normal; font-size: 0.86rem; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 5px 11px;
}

/* ───────────────── tutor grid (finale) ───────────────── */
.ob2-tutor-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px;
}
.ob2-tutor {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px 12px 14px;
  cursor: pointer; text-align: center; transition: all .18s ease; color: var(--text); font-family: inherit;
}
.ob2-tutor:hover { border-color: var(--muted); transform: translateY(-3px); }
.ob2-tutor.is-picked { border-color: var(--accent); background: rgba(193,255,26,0.06); box-shadow: 0 0 0 1px var(--accent), 0 8px 24px rgba(193,255,26,0.12); }
.ob2-tutor-av { position: relative; width: 76px; height: 76px; margin-bottom: 6px; }
.ob2-tutor-av img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.ob2-tutor-emoji { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: 50%; font-size: 2rem; }
.ob2-tutor-play {
  position: absolute; right: -2px; bottom: -2px; width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 0.7rem;
  background: var(--accent); color: #09090d; border: 2px solid var(--bg); box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
.ob2-tutor-name { font-size: 1rem; font-weight: 600; }
.ob2-tutor-meta { font-size: 0.78rem; color: var(--muted); }
.ob2-tutor-persona { font-size: 0.8rem; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.ob2-tutor-check {
  position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: #09090d; font-size: 0.8rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; opacity: 0; transform: scale(.4); transition: all .2s ease;
}
.ob2-tutor.is-picked .ob2-tutor-check { opacity: 1; transform: scale(1); }

/* agreement */
.ob2-agree { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; text-align: left; }
.ob2-agree-sub { display: flex; flex-direction: column; gap: 6px; padding-left: 4px; border-top: 1px solid var(--border); padding-top: 8px; }
.ob2-agree-row { display: flex; align-items: center; gap: 9px; font-size: 0.9rem; cursor: pointer; color: var(--text); }
.ob2-agree-all { font-size: 0.96rem; }
.ob2-agree-row input { display: none; }
.ob2-agree-row a { color: var(--accent); text-decoration: underline; }
.ob2-mark { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--border); flex-shrink: 0; position: relative; transition: all .15s ease; }
.ob2-agree-row input:checked + .ob2-mark { background: var(--accent); border-color: var(--accent); }
.ob2-agree-row input:checked + .ob2-mark::after { content: '✓'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #09090d; font-size: 0.78rem; font-weight: 700; }

/* shake feedback */
.ob2-shake { animation: ob2Shake .45s ease; }
@keyframes ob2Shake { 0%,100% { transform: translateX(0); } 20%,60% { transform: translateX(-7px); } 40%,80% { transform: translateX(7px); } }

@media (max-width: 520px) {
  .orb { width: 168px; height: 168px; transition: width .45s ease, height .45s ease; }
  .orb-particle { animation-name: orbOrbitSm; }
  @keyframes orbOrbitSm {
    from { transform: rotate(var(--a)) translateX(90px) rotate(calc(-1 * var(--a))); }
    to   { transform: rotate(calc(var(--a) + 360deg)) translateX(90px) rotate(calc(-1 * (var(--a) + 360deg))); }
  }
  .ob2-say { font-size: 1.06rem; }
  .ob2-tutor-grid { grid-template-columns: repeat(2, 1fr); }

  /* compact stage on tall scenes (work/situations/reveal/tutor): the orb steps
     aside so the chips + nav fit without burying the buttons off-screen */
  .ob2--compact .orb { width: 108px; height: 108px; margin-bottom: 2px; }
  .ob2--compact .orb-particle { display: none; }
  .ob2--compact .ob2-meter-pct { font-size: 1.4rem; }
  .ob2--compact .ob2-say { margin-top: 8px; min-height: 0; font-size: 0.98rem; }
  .ob2--compact .ob2-form { margin-top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .orb, .orb-halo, .orb-core, .orb-particle, .ob2-bg-glow { animation: none !important; }
}

/* ───────────────── welcome celebration (post-onboarding home entry) ───────── */
.welcome-overlay {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 42%, rgba(20,26,8,0.92), rgba(9,9,13,0.97) 70%);
  backdrop-filter: blur(6px);
  animation: wcoIn .45s ease both;
}
.welcome-overlay.is-leaving { animation: wcoOut .5s ease forwards; }
@keyframes wcoIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes wcoOut { from { opacity: 1; } to { opacity: 0; transform: scale(1.02); } }
.welcome-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.welcome-card {
  position: relative; z-index: 1; text-align: center; max-width: 460px; padding: 0 28px;
  animation: wcoCard .6s cubic-bezier(.2,.9,.2,1) both;
}
@keyframes wcoCard { from { opacity: 0; transform: translateY(26px) scale(.96); } to { opacity: 1; transform: none; } }
.welcome-orb {
  width: 92px; height: 92px; margin: 0 auto 22px; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #eafff0 0%, #c1ff1a 32%, #6fb800 72%, #2c5400 100%);
  box-shadow: 0 0 50px rgba(193,255,26,0.6), inset 6px 8px 20px rgba(255,255,255,0.5), inset -8px -10px 22px rgba(0,40,0,0.5);
  animation: orbFloat 5s ease-in-out infinite;
  position: relative;
}
.welcome-orb span {
  position: absolute; inset: -10px; border-radius: 50%;
  background: radial-gradient(circle, rgba(193,255,26,0.3), rgba(193,255,26,0) 70%);
  animation: orbHalo 4s ease-in-out infinite;
}
.welcome-title { font-family: var(--font-display); font-size: 1.7rem; line-height: 1.35; margin-bottom: 12px; }
.welcome-sub { font-size: 1.05rem; color: var(--muted); line-height: 1.6; margin-bottom: 26px; }
.welcome-sub b { font-weight: 700; }
.welcome-btn { width: 100%; max-width: 280px; padding: 15px 24px; font-size: 1.05rem; }

@media (max-width: 520px) {
  .welcome-title { font-size: 1.4rem; }
  .welcome-sub { font-size: 0.98rem; }
}

/* ───────────────── "소리가 이해한 나" — distilled onboarding context card ──── */
.prf-sk {
  margin-top: 24px;
  position: relative;
  border: 1px solid rgba(193,255,26,0.18);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(193,255,26,0.06), rgba(193,255,26,0) 55%),
    var(--surface);
}
.prf-sk-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.prf-sk-orb {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; margin-top: 2px;
  background: radial-gradient(circle at 34% 30%, #eafff0 0%, #c1ff1a 32%, #6fb800 72%, #2c5400 100%);
  box-shadow: 0 0 18px rgba(193,255,26,0.5), inset 3px 4px 9px rgba(255,255,255,0.5), inset -4px -5px 10px rgba(0,40,0,0.5);
  animation: orbFloat 5s ease-in-out infinite;
}
.prf-sk-head-text { min-width: 0; }
.prf-sk-sub { margin-top: 4px; font-size: 0.9rem; color: var(--muted); line-height: 1.5; }
.prf-sk-grid { margin-bottom: 16px; }
.prf-sk-label { margin: 16px 0 4px; }
.prf-sk-label:first-of-type { margin-top: 4px; }
.prf-sk-notes {
  margin-top: 8px; font-size: 0.95rem; line-height: 1.6; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px;
}
.aud-tag--warm {
  background: rgba(245,158,11,0.09);
  color: #fbbf24;
  border-color: rgba(245,158,11,0.16);
}

/* admin: raw onboarding context dump */
.aud-rawdoc {
  margin-top: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.92rem;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ───────────────── admin: session transcript + report viewer (.asx-*) ─────── */
.aud-session-row { cursor: pointer; transition: background .15s ease; }
.aud-session-row:hover { background: rgba(193,255,26,0.05); }
.aud-row-arrow { color: var(--muted); margin-left: 8px; opacity: 0; transition: opacity .15s ease; }
.aud-session-row:hover .aud-row-arrow { opacity: 1; color: var(--accent); }

.asx-chat { display: flex; flex-direction: column; gap: 14px; max-height: 620px; overflow-y: auto; padding-right: 4px; }
.asx-turn { display: flex; flex-direction: column; gap: 4px; max-width: 86%; }
.asx-turn--user { align-self: flex-end; align-items: flex-end; }
.asx-turn--tutor { align-self: flex-start; align-items: flex-start; }
.asx-role { font-size: 0.74rem; color: var(--muted); padding: 0 4px; }
.asx-bubble {
  padding: 11px 15px; border-radius: 16px; font-size: 0.96rem; line-height: 1.55;
  border: 1px solid var(--border); white-space: pre-wrap; word-break: break-word;
}
.asx-turn--tutor .asx-bubble { background: var(--surface-2); border-top-left-radius: 4px; }
.asx-turn--user .asx-bubble { background: rgba(193,255,26,0.1); border-color: rgba(193,255,26,0.2); border-top-right-radius: 4px; }

.asx-summary { font-size: 1rem; line-height: 1.6; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.asx-breakdown { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.asx-bd-item { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.asx-bd-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.asx-bd-name { font-weight: 600; font-size: 0.95rem; }
.asx-bd-notes { font-size: 0.88rem; color: var(--muted); line-height: 1.55; }
.asx-list { margin: 8px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.asx-list li { font-size: 0.94rem; line-height: 1.5; }
.asx-errors { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.asx-err { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.asx-err-said { color: var(--err); font-size: 0.94rem; }
.asx-err-better { color: var(--ok); font-size: 0.94rem; margin-top: 3px; }
.asx-err-why { color: var(--muted); font-size: 0.84rem; margin-top: 4px; line-height: 1.5; }

/* ═══════════════════════════════════════════════════════════════════════════
   IN-APP NATIVE OVERRIDES (.is-app) — wraps the server-rendered web app in a
   mobile-native feel inside the iOS hybrid shell / installed PWA. Gated by the
   `is-app` class (set from the SoriApp UA marker or display-mode:standalone).
   Web (non-app) rendering is untouched.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── native feel: no long-press text selection anywhere in the app shell.
   An app is not a document — the iOS text-selection loupe/copy popup on every
   long press breaks the illusion. Form fields must stay editable, and the
   session report keeps copy (corrected expressions are worth copying, §13.27).
   Standalone document pages (terms/privacy) never get .is-app, so they stay
   selectable. Web rendering is untouched. ── */
html.is-app body {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
html.is-app input,
html.is-app textarea,
html.is-app select,
html.is-app [contenteditable] {
  -webkit-user-select: text;
  user-select: text;
}
html.is-app .report,
html.is-app .report * {
  -webkit-user-select: text;
  user-select: text;
}
/* Images: selection is one thing, dragging is another — the default image
   drag (ghost image under the finger/cursor) needs its own switch. */
html.is-app img,
html.is-app svg {
  -webkit-user-drag: none;
}

/* app-only blocks are hidden on the web */
.app-intro { display: none; }
.home-app  { display: none; }

/* ── shell: drop the desktop top bar on home (home-app has its own header); keep
   the slim top bar on other base pages so they stay navigable; bottom tabs stay ── */
html.is-app body[data-page="home"] .topnav { display: none; }
html.is-app .mobile-nav { display: flex; }
html.is-app body[data-page="home"] .page {
  padding-top: calc(18px + env(safe-area-inset-top));
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
}
/* hide the web dashboard pieces in-app (home only — these classes are home-specific) */
html.is-app .home-hero,
html.is-app .home-stats,
html.is-app .home-panels,
html.is-app .action-strip,
html.is-app .notice-bar { display: none; }
html.is-app .home-app { display: flex; flex-direction: column; gap: 16px; }

/* ── HOME (native cards) ── */
.ha-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ha-hello { font-family: var(--font-display); font-size: 1.5rem; line-height: 1.2; }
.ha-sub { color: var(--muted); font-size: 0.95rem; margin-top: 3px; }
.ha-user-menu { position: relative; }
.ha-avatar { width: 46px; height: 46px; border-radius: 50%; overflow: hidden; flex-shrink: 0; border: 1px solid var(--border); }
/* the avatar is a <button> now (opens the user menu) — neutralize global button
   chrome so the 46px circle survives (icon-button padding trap, §13.41) */
button.ha-avatar { padding: 0; background: none; cursor: pointer; display: block; }
/* the in-app home hides the topnav, so the menu anchors to this avatar; keep it
   clear of the right screen edge on narrow phones */
.ha-user-menu .nav-dropdown { right: 0; max-width: calc(100vw - 40px); }
.ha-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ha-avatar-fb { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; background: var(--surface-2); font-weight: 700; }
/* Profile slot switcher — horizontal row, circular avatar + name below */
.ha-slots {
  display: flex; gap: 14px; padding: 8px 2px 4px; margin-bottom: 10px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.ha-slots::-webkit-scrollbar { display: none; }
.ha-slot {
  flex-shrink: 0; position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  width: 66px; padding: 0; background: none; border: none;
  color: rgba(255,255,255,.5); font-size: .8rem; font-weight: 600;
  cursor: pointer;
}
.ha-slot-face {
  position: relative; width: 60px; height: 60px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(255,255,255,.1);
  transition: border-color .18s, transform .18s;
}
/* clip each child to the circle individually so the edit badge can overhang */
.ha-slot-face img,
.ha-slot-emoji,
.ha-slot-fb { width: 100%; height: 100%; border-radius: 50%; }
.ha-slot-face img { object-fit: cover; }
.ha-slot-emoji {
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem; line-height: 1;
}
.ha-slot-fb {
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem; font-weight: 700; color: rgba(255,255,255,.85);
  background: var(--surface-2);
}
.ha-slot:hover .ha-slot-face { border-color: rgba(255,255,255,.24); }
.ha-slot.is-active .ha-slot-face { border-color: var(--accent, #c1ff1a); }
.ha-slot.is-active .ha-slot-name { color: var(--text, #f2f2f5); }
.ha-slot-name {
  max-width: 66px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* edit badge — clean dark camera disc, only on the active profile's photo */
.ha-slot-edit {
  position: absolute; right: -3px; bottom: -3px;
  width: 20px; height: 20px; border-radius: 50%;
  display: none; background: #16161c;
  border: 1.5px solid var(--bg, #09090d); color: transparent; font-size: 0;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c1ff1a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z'/%3E%3Ccircle cx='12' cy='13' r='3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 11px 11px;
}
.ha-slot.is-active .ha-slot-edit { display: block; }
.ha-slot-del {
  position: absolute; top: -4px; right: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(0,0,0,.55); color: rgba(255,255,255,.7);
  font-size: .8rem; line-height: 15px; text-align: center;
  border: 1px solid rgba(255,255,255,.12);
  opacity: .85; cursor: pointer; transition: opacity .15s;
}
.ha-slot-del:hover { opacity: 1; color: #fff; background: #e53e3e; }
.ha-slot--kids .ha-slot-name::before { content: ''; }
.ha-slot--add .ha-slot-face--add {
  background: transparent; border: 2px dashed rgba(255,255,255,.16);
  color: rgba(255,255,255,.35); font-size: 1.6rem; font-weight: 400;
}
.ha-slot--add:hover .ha-slot-face--add { border-color: rgba(180,255,90,.35); color: #b4ff5a; }
/* Avatar picker grid */
.ha-av-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin-bottom: 18px; max-height: 46vh; overflow-y: auto;
}
.ha-av { padding: 0; background: none; border: none; cursor: pointer; }
.ha-av-face {
  width: 100%; aspect-ratio: 1; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem; line-height: 1; overflow: hidden;
  border: 2px solid transparent; transition: border-color .15s, transform .12s;
  background: var(--surface-2); color: rgba(255,255,255,.5); font-weight: 600;
}
.ha-av-face img { width: 100%; height: 100%; object-fit: cover; }
.ha-av--reset .ha-av-face { font-size: .82rem; }
.ha-av:hover .ha-av-face { transform: scale(1.06); }
.ha-av.is-sel .ha-av-face { border-color: #b4ff5a; }
/* Add-child modal */
.ha-add-modal {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.6); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.ha-add-card {
  background: var(--surface-2, #1a1a2e); border: 1px solid var(--border, rgba(255,255,255,.1));
  border-radius: 16px; padding: 24px; width: 100%; max-width: 320px;
}
.ha-add-title { font-size: 1.05rem; font-weight: 700; color: #fff; margin-bottom: 16px; }
.ha-add-input {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  background: rgba(255,255,255,.06); border: 1.5px solid rgba(255,255,255,.12);
  color: #fff; font-size: 1rem; outline: none; margin-bottom: 16px;
}
.ha-add-input:focus { border-color: rgba(180,255,90,.4); }
.ha-add-input::placeholder { color: rgba(255,255,255,.3); }
.ha-add-kids-label {
  display: flex; align-items: center; gap: 8px; margin-bottom: 16px;
  font-size: .84rem; color: rgba(255,255,255,.55); cursor: pointer;
}
.ha-add-kids-label input[type=checkbox] {
  width: 18px; height: 18px; accent-color: #b4ff5a; flex-shrink: 0;
}
.ha-add-actions { display: flex; gap: 10px; justify-content: flex-end; }
.ha-add-confirm { min-width: 72px; }
/* Profile age-band chooser (성인 / 어린이 / 초등) */
.ha-band-choices { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.ha-band-opt { display: block; cursor: pointer; }
.ha-band-opt input { position: absolute; opacity: 0; pointer-events: none; }
.ha-band-card {
  display: flex; flex-direction: column; gap: 2px; padding: 11px 13px;
  border-radius: 11px; border: 1.5px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04); transition: border-color .15s, background .15s;
}
.ha-band-card b { color: #fff; font-size: .92rem; font-weight: 700; }
.ha-band-card i { color: rgba(255,255,255,.5); font-size: .76rem; font-style: normal; }
.ha-band-opt input:checked + .ha-band-card {
  border-color: rgba(193,255,26,.6); background: rgba(193,255,26,.09);
}
.ha-grade-choices { display: flex; gap: 8px; margin-bottom: 16px; }
.ha-grade-opt { flex: 1; cursor: pointer; }
.ha-grade-opt input { position: absolute; opacity: 0; pointer-events: none; }
.ha-grade-card {
  display: block; text-align: center; padding: 9px 8px; border-radius: 10px;
  border: 1.5px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.6); font-size: .82rem; transition: border-color .15s, background .15s, color .15s;
}
.ha-grade-opt input:checked + .ha-grade-card {
  border-color: rgba(193,255,26,.6); background: rgba(193,255,26,.09); color: #fff;
}
.ha-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.ha-chip { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 7px 13px; font-size: 0.84rem; color: var(--muted); }
.ha-chip b { color: var(--text); font-weight: 700; }
/* Today's-usage donut chip: tiny SVG ring inline with the label */
.ha-chip--quota { display: inline-flex; align-items: center; gap: 6px; }
.ha-donut { flex: none; display: block; }
.ha-chip--accent b { color: var(--accent); }
.ha-hero {
  position: relative; display: flex; flex-direction: column; gap: 3px; padding: 22px; min-height: 132px;
  border-radius: 20px; overflow: hidden; border: 1px solid rgba(193,255,26,0.22);
  background: linear-gradient(135deg, rgba(193,255,26,0.16), var(--surface) 62%);
}
.ha-hero-kicker { color: var(--accent); font-weight: 700; font-size: 0.82rem; }
.ha-hero-title { font-family: var(--font-display); font-size: 1.4rem; line-height: 1.28; max-width: 76%; }
.ha-hero-desc { color: var(--muted); font-size: 0.92rem; margin-top: 6px; max-width: 78%; }
.ha-hero-tutor { position: absolute; right: -8px; bottom: -8px; width: 104px; height: 104px; border-radius: 50%; object-fit: cover; opacity: 0.92; }
.ha-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ha-q { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 3px; }
.ha-q:active { background: var(--surface-2); }
.ha-q-title { font-weight: 700; }
.ha-q-sub { color: var(--muted); font-size: 0.85rem; }
.ha-mem { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px 18px; }
.ha-mem-head { font-size: 0.85rem; color: var(--muted); margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }
.ha-mem-head a { color: var(--accent); }
.ha-mem-item { font-size: 0.92rem; padding: 9px 0; border-top: 1px solid var(--border); line-height: 1.45; }
.ha-mem-item:first-of-type { border-top: none; padding-top: 0; }
.ha-notice { display: block; background: rgba(255,85,0,0.1); border: 1px solid rgba(255,85,0,0.22); color: var(--hot); border-radius: 14px; padding: 13px 16px; font-size: 0.9rem; text-align: center; font-weight: 600; }

/* kids taster gift card (§13.34 — surfaced on home, promised in onboarding) */
.ha-gift {
  display: flex; flex-direction: column; gap: 12px; padding: 16px 18px;
  border-radius: 16px; border: 1px solid rgba(193,255,26,0.25);
  background: linear-gradient(135deg, rgba(193,255,26,0.1), var(--surface) 70%);
  word-break: keep-all;
}
.ha-gift-kicker { display: block; color: var(--accent); font-weight: 700; font-size: 0.8rem; }
.ha-gift-title { display: block; font-weight: 700; font-size: 1.05rem; margin-top: 2px; }
.ha-gift-desc { display: block; color: var(--muted); font-size: 0.86rem; line-height: 1.5; margin-top: 5px; }
.ha-gift-row { display: flex; gap: 8px; }
.ha-gift-input {
  flex: 1; min-width: 0; padding: 11px 12px; border-radius: 11px;
  border: 1px solid var(--border); background: rgba(255,255,255,0.05);
  color: var(--text); font-size: 0.92rem; font-family: inherit;
}
.ha-gift-input:focus { outline: none; border-color: rgba(193,255,26,0.4); }
.ha-gift-btn {
  flex-shrink: 0; padding: 11px 16px; border-radius: 11px; border: none;
  background: var(--accent); color: #09090d; font-weight: 700; font-size: 0.92rem;
}
.ha-gift-btn:disabled { opacity: 0.6; }
.ha-gift-err { color: #ff9c9c; font-size: 0.82rem; margin: 0; }
.ha-gift-err[hidden] { display: none; }

/* ── LOGIN (full-bleed native auth) ── */
.login-orb { display: none; }
html.is-app .login-orb { display: block; position: relative; width: 104px; height: 104px; margin: 6px auto 2px; }
.login-orb-body {
  position: absolute; inset: 16px; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #eafff0, #c1ff1a 32%, #6fb800 72%, #2c5400);
  box-shadow: 0 0 40px rgba(193,255,26,0.5), inset 5px 6px 16px rgba(255,255,255,0.5), inset -6px -8px 16px rgba(0,40,0,0.5);
  animation: orbFloat 5s ease-in-out infinite;
}
.login-orb-halo { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, rgba(193,255,26,0.25), transparent 70%); animation: orbHalo 4s ease-in-out infinite; }

/* Lock the auth screen to exactly one viewport so it never scrolls/rubber-bands. */
html.is-app .login-page { height: 100svh; overflow: hidden; }
html.is-app .login-card {
  width: 100%; max-width: none; height: 100svh; overflow: hidden; border-radius: 0;
  background: transparent; border: none; box-shadow: none;
  display: flex; flex-direction: column; align-items: center;
  padding: calc(11vh + env(safe-area-inset-top)) 26px calc(24px + env(safe-area-inset-bottom));
}
html.is-app .login-tagline { font-size: 1.15rem; margin-top: 12px; }
html.is-app .sso-buttons { margin-top: auto; width: 100%; padding-top: 28px; }
html.is-app .sso-btn { padding: 16px; font-size: 1.05rem; border-radius: 15px; }
html.is-app .login-footer-links { margin-top: 18px; }

/* ── INTRO CAROUSEL (replaces the marketing landing in-app) ── */
/* Standalone /pricing (base layout): the landing's .reveal scroll animation
   never fires there (no landing JS) — show the shared cards immediately. */
body[data-page="pricing"] .reveal { opacity: 1 !important; transform: none !important; }

html.is-app body.landing-page > * { display: none !important; }
html.is-app body.landing-page > .app-intro { display: flex !important; }
.app-intro { position: fixed; inset: 0; z-index: 5; flex-direction: column; background: var(--bg); }
.ai-slides { flex: 1; display: flex; overflow: hidden; touch-action: pan-y; scrollbar-width: none; }
.ai-slides::-webkit-scrollbar { display: none; }
.ai-slide {
  flex: 0 0 100%; width: 100vw;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: calc(56px + env(safe-area-inset-top)) 34px 12px;
}
.ai-visual { height: 36vh; min-height: 200px; display: flex; align-items: center; justify-content: center; margin-bottom: 26px; }
.ai-h { font-family: var(--font-display); font-size: 1.72rem; line-height: 1.34; }
.ai-em { color: var(--accent); }
.ai-p { color: var(--muted); font-size: 1.06rem; line-height: 1.6; margin-top: 12px; }
.ai-dots { display: flex; gap: 8px; justify-content: center; padding: 14px 0 4px; }
.ai-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); cursor: pointer; transition: all 0.25s ease; }
.ai-dot.is-on { background: var(--accent); border-color: var(--accent); width: 22px; }
.ai-cta { padding: 8px 26px calc(22px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; }
.ai-start { background: var(--accent); color: #09090d; text-align: center; padding: 16px; border-radius: 16px; font-weight: 700; font-size: 1.05rem; }
.ai-have { text-align: center; color: var(--muted); padding: 9px; font-weight: 600; }

/* carousel visuals */
.ai-orb { position: relative; width: 156px; height: 156px; }
.ai-orb-body { position: absolute; inset: 20px; border-radius: 50%; background: radial-gradient(circle at 34% 30%, #eafff0, #c1ff1a 32%, #6fb800 72%, #2c5400); box-shadow: 0 0 50px rgba(193,255,26,0.55), inset 6px 8px 20px rgba(255,255,255,0.5), inset -8px -10px 20px rgba(0,40,0,0.5); animation: orbFloat 5s ease-in-out infinite; }
.ai-orb-halo { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, rgba(193,255,26,0.28), transparent 70%); animation: orbHalo 4s ease-in-out infinite; }
.ai-tutors { display: flex; flex-wrap: wrap; gap: 10px; max-width: 280px; justify-content: center; }
.ai-tutor { width: 78px; height: 78px; border-radius: 50%; overflow: hidden; border: 2px solid var(--border); }
.ai-tutor img { width: 100%; height: 100%; object-fit: cover; }
.ai-tutor-fb { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-size: 1.9rem; }
.ai-tutor--1 { transform: translateY(-6px); } .ai-tutor--4 { transform: translateY(6px); } .ai-tutor--6 { transform: translateY(-4px); }
.ai-expr { width: 212px; height: 212px; border-radius: 34px; overflow: hidden; border: 1px solid var(--border); box-shadow: 0 14px 44px rgba(0,0,0,0.45); }
.ai-expr img { width: 100%; height: 100%; object-fit: cover; }
.ai-bars { display: flex; align-items: flex-end; gap: 11px; height: 156px; }
.ai-bars i { width: 26px; border-radius: 8px 8px 0 0; height: var(--h); background: linear-gradient(180deg, var(--accent), rgba(193,255,26,0.28)); }

/* intro slide 3 — context + long-term memory (소리의 핵심 차별점 #1) */
.ai-mem { position: relative; width: 290px; height: 210px; }
.ai-mem-orb {
  position: absolute; top: 50%; left: 50%; width: 66px; height: 66px; margin: -33px 0 0 -33px; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #eafff0, #c1ff1a 32%, #6fb800 72%, #2c5400);
  box-shadow: 0 0 44px rgba(193,255,26,0.55); animation: orbFloat 5s ease-in-out infinite;
}
.ai-mem-chip {
  position: absolute; background: var(--surface); border: 1px solid rgba(193,255,26,0.25); color: var(--text);
  font-size: 0.8rem; font-weight: 600; padding: 8px 13px; border-radius: 999px; white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
}
.ai-mem-chip--1 { top: 0; left: 50%; transform: translateX(-50%); }
.ai-mem-chip--2 { bottom: 6%; left: -4%; }
.ai-mem-chip--3 { bottom: 24%; right: -6%; }

/* intro slide 4 — mistakes become the curriculum (소리의 핵심 차별점 #2) */
.ai-repair {
  display: flex; flex-direction: column; gap: 9px; width: 286px; padding: 22px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: 0 14px 44px rgba(0,0,0,0.45); text-align: left;
}
.ai-rep-wrong { color: var(--err); text-decoration: line-through; font-size: 1rem; opacity: 0.85; }
.ai-rep-right { color: var(--accent); font-weight: 700; font-size: 1.1rem; }
.ai-rep-tag {
  margin-top: 6px; align-self: flex-start; background: rgba(193,255,26,0.12); color: var(--accent);
  border: 1px solid rgba(193,255,26,0.25); border-radius: 999px; padding: 6px 12px; font-size: 0.8rem; font-weight: 600;
}

/* intro slide 1 — animated equalizer hook ("영어가 입에서 터지는 순간") */
.ai-wave { display: flex; align-items: center; gap: 8px; height: 150px; }
.ai-wave i {
  width: 11px; border-radius: 6px; background: var(--accent); height: 24px;
  box-shadow: 0 0 14px rgba(193,255,26,0.5); animation: aiwave 1.05s ease-in-out infinite;
}
.ai-wave i:nth-child(1) { animation-delay: -0.95s; }
.ai-wave i:nth-child(2) { animation-delay: -0.30s; }
.ai-wave i:nth-child(3) { animation-delay: -0.65s; }
.ai-wave i:nth-child(4) { animation-delay: -0.10s; }
.ai-wave i:nth-child(5) { animation-delay: -0.80s; }
.ai-wave i:nth-child(6) { animation-delay: -0.45s; }
.ai-wave i:nth-child(7) { animation-delay: -0.20s; }
@keyframes aiwave { 0%, 100% { height: 22px; } 50% { height: 124px; } }
@media (prefers-reduced-motion: reduce) { .ai-wave i { animation: none; height: 70px; } }

/* ── 키즈 그림 퀴즈 카드 (quizEngine, app.js) ─────────────────────
   화면이 먼저, 튜터가 따라옴: 클라이언트가 카드를 띄우고 서버가 모델에
   [SCREEN UPDATE]를 주입. 카드는 튜터 프로필 사진이 든 아바타 원을 그대로
   덮는 원형 오버레이(#avatarCircle 안에 붙음) — 아이 눈엔 튜터 얼굴 자리에
   그림이 나타남. 크기는 아바타 원 상태(대기/라이브/축소)를 자동 추종. */
.quiz-card {
  position: absolute; inset: 0;
  border-radius: 50%; background: #fff;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.5), 0 0 0 5px rgba(193, 255, 26, 0.4);
  display: flex; align-items: center; justify-content: center;
  z-index: 4; opacity: 0; pointer-events: none; overflow: visible;
  transform: scale(0.55);
  transition: transform 0.38s cubic-bezier(0.34, 1.56, 0.4, 1), opacity 0.25s ease;
  container-type: size; /* 자식 글자/이모지가 원 크기에 비례(cqw) */
}
.quiz-card.show { opacity: 1; transform: scale(1); }
.quiz-card .quiz-chip {
  position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #111; font-weight: 700; font-size: 0.78rem;
  padding: 4px 14px; border-radius: 999px; white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.quiz-visual { font-size: 96px; font-size: 52cqw; line-height: 1; }
.quiz-glyph {
  font-size: 104px; font-size: 58cqw; font-weight: 800; color: #111;
  font-family: "Space Grotesk", "Noto Sans KR", sans-serif;
}
.quiz-swatch {
  position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 0 0 4px rgba(0, 0, 0, 0.1); /* keeps white/yellow visible on the white card */
}
.quiz-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: inherit; display: block;
}
@media (prefers-reduced-motion: reduce) {
  .quiz-card { transition: opacity 0.2s ease; transform: scale(1); }
}

/* ── 구독 시작 (subscribe.html — Toss billing card registration) ─────────── */
.pay-wrap { max-width: 520px; margin: 0 auto;
  /* clear the fixed bottom tab bar (mobile) */
  padding: 8px 0 calc(120px + env(safe-area-inset-bottom)); }
.pay-header { text-align: center; margin: 18px 0 22px; }
.pay-title { font-family: var(--font-display); font-size: 1.7rem; margin: 0 0 8px; }
.pay-subtitle { color: var(--muted); margin: 0; font-size: 0.95rem; }
.pay-error { background: rgba(255,90,90,0.1); border: 1px solid rgba(255,90,90,0.4);
  color: #ff9c9c; border-radius: 12px; padding: 13px 16px; font-size: 0.9rem; margin-bottom: 16px; }
.pay-card { background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 24px 22px; }
.pay-plan-row { display: flex; align-items: baseline; justify-content: space-between; }
.pay-plan-name { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem;
  color: var(--accent); letter-spacing: 0.04em; }
.pay-plan-price { font-weight: 800; font-size: 1.35rem; }
.pay-plan-price i { font-style: normal; font-weight: 500; font-size: 0.85rem; color: var(--muted); }
.pay-features { list-style: none; margin: 14px 0 0; padding: 0; color: var(--muted); font-size: 0.9rem; }
.pay-features li { padding: 4px 0 4px 18px; position: relative; }
.pay-features li::before { content: ""; position: absolute; left: 2px; top: 12px; width: 6px; height: 6px;
  border-radius: 50%; background: var(--accent); }
.pay-divider { border: none; border-top: 1px solid var(--border); margin: 18px 0; }
.pay-schedule { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.pay-sched-row { display: flex; gap: 12px; align-items: flex-start; }
.pay-sched-dot { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid var(--border); margin-top: 5px; }
.pay-sched-dot.on { background: var(--accent); border-color: var(--accent); }
.pay-sched-row strong { display: block; font-size: 0.86rem; }
.pay-sched-row span:not(.pay-sched-dot) { color: var(--muted); font-size: 0.83rem; }
.pay-cta { width: 100%; font-size: 1.02rem; padding: 15px; border-radius: 13px; }
.pay-terms { color: var(--muted); font-size: 0.78rem; line-height: 1.55; margin: 14px 0 0; }
.pay-terms a { color: var(--muted); text-decoration: underline; }
.pay-pending { text-align: center; }
.pay-pending p { color: var(--muted); font-size: 0.9rem; margin: 0 0 14px; }
.pay-back { display: inline-block; margin-top: 18px; color: var(--muted);
  text-decoration: none; font-size: 0.88rem; }
.pay-back:hover { color: var(--text); }

/* 토스 심사 기간 테스트 모드 안내 (subscribe.html) */
.pay-testmode { background: rgba(193,255,26,0.07); border: 1px solid rgba(193,255,26,0.3);
  color: var(--muted); border-radius: 12px; padding: 13px 16px; font-size: 0.88rem;
  line-height: 1.55; margin-bottom: 16px; }
.pay-testmode b { color: var(--accent); font-weight: 700; }

/* ── In-app notice / marketing popup (home, /admin/app-config) ── */
.ntc-modal { position: fixed; inset: 0; z-index: 9999;
  background: rgba(5,5,9,.62); backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; animation: ntc-in .3s ease both; }
.ntc-modal[hidden] { display: none; }
@keyframes ntc-in { from { opacity: 0; } to { opacity: 1; } }

.ntc-box { display: flex; flex-direction: column; align-items: center; gap: 18px;
  width: 100%; max-width: 350px; }

/* Card: brand glow washing in from the top-left, deep soft shadow. */
.ntc-card { position: relative; overflow: hidden; width: 100%;
  background:
    radial-gradient(130% 90% at 12% -12%, rgba(193,255,26,.12), transparent 52%),
    linear-gradient(180deg, #1b1b24, #121218);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 24px; padding: 24px 22px 22px;
  max-height: 82vh; overflow-y: auto;
  box-shadow: 0 30px 70px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.05);
  animation: ntc-pop .5s cubic-bezier(.22,1.25,.36,1) both; }
@keyframes ntc-pop {
  from { opacity: 0; transform: translateY(28px) scale(.95); }
  to   { opacity: 1; transform: none; } }

/* Optional banner image bleeds edge-to-edge above the content. Fixed 16:9 crop
   so any upload reads as a tidy banner instead of taking over the card. */
.ntc-img { display: block; width: calc(100% + 44px); margin: -24px -22px 18px;
  aspect-ratio: 16 / 9; object-fit: cover; }
.ntc-img[hidden] { display: none; }

/* Header: the Sori equalizer mark + a whisper-quiet label. */
.ntc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.ntc-mark { width: 30px; height: 30px; border-radius: 9px; flex: 0 0 auto;
  background: var(--accent); color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 18px rgba(193,255,26,.35); }
.ntc-mark svg { width: 16px; height: 16px; }
.ntc-kind { font-size: .74rem; font-weight: 700; letter-spacing: .16em;
  color: rgba(193,255,26,.9); }

.ntc-title { font-family: var(--font-display); font-size: 1.32rem; font-weight: 700;
  color: #fff; line-height: 1.38; letter-spacing: -0.01em; margin-bottom: 10px; }
.ntc-body { font-size: .93rem; color: rgba(240,236,229,.62); line-height: 1.7;
  white-space: pre-wrap; }
.ntc-cta { display: block; text-align: center; text-decoration: none;
  margin-top: 22px; border-radius: 14px; padding: 14px; font-size: .98rem; }
.ntc-cta[hidden] { display: none; }

/* Floating circular X below the card. padding:0 guards against the global
   button padding crushing the SVG (§13.41 trap). */
.ntc-close { width: 48px; height: 48px; padding: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.18);
  color: rgba(255,255,255,.88); cursor: pointer;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: ntc-rise .45s ease .16s both; }
.ntc-close svg { width: 18px; height: 18px; }
.ntc-close:hover { color: #fff; border-color: rgba(255,255,255,.45);
  background: rgba(255,255,255,.11); }
@keyframes ntc-rise { from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .ntc-modal, .ntc-card, .ntc-close { animation: none; } }
