/* ── Variables ─────────────────────────────────────────────── */
:root {
  --navy:       #1B2A4A;
  --navy-2:     #243558;
  --navy-3:     #0F1B30;
  --mint:       #69ADA7;
  --mint-dk:    #638679;
  --mint-lt:    #E7F8F2;
  --white:      #FFFFFF;
  --gray-50:    #F8FAFC;
  --gray-100:   #EEF2F7;
  --gray-200:   #E2E8F0;
  --gray-400:   #94A3B8;
  --gray-600:   #4A5568;
  --gray-800:   #333333;
  --radius:     14px;
  --shadow-sm:  0 1px 4px rgba(0,0,0,.08);
  --shadow-md:  0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.12);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", "Pretendard", "Pretendard Variable", 'Inter', "Malgun Gothic", "Noto Sans KR", Roboto, "Segoe UI", sans-serif;
  background: var(--white);
  color: var(--gray-800);
  min-height: 100%;
  display: flex; flex-direction: column; align-items: center;
}
body.chat-mode {
  overflow: hidden;
  height: 100vh;                        /* 1단: 구형 브라우저 fallback */
  height: 100svh;                       /* 2단: small viewport — 안전한 최소 높이 */
  height: var(--vvh, 100dvh);           /* 3단: visualViewport(JS 갱신) 우선, 없으면 dvh */
  padding-bottom: env(safe-area-inset-bottom, 0px);   /* iOS 홈 인디케이터/툴바에 하단 바(mic 등) 안 잘리게 */
}
body.chat-mode #site-header { flex-shrink: 0; }
body.chat-mode #ctrl-bar { flex-shrink: 0; }
body.chat-mode #sophie-bar { flex-shrink: 0; }
body.chat-mode #turn-bar { flex-shrink: 0; }

/* ── Header ────────────────────────────────────────────────── */
#site-header {
  width: 100%;
  background: #69ADA7;   /* 🎯 2026-10-12(대표님 지시) — navy→mint. My Own Pace 히어로·bys-class 헤더와 동일 톤 통일 */
  padding: 0 20px;
  height: 64px;
  min-height: 64px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.14);
}
.logo { display: flex; align-items: baseline; gap: 8px; text-decoration: none; }
.logo-main {
  font-size: 1.15rem; font-weight: 900;
  letter-spacing: 2px; color: var(--white);
  text-transform: uppercase;
}
.logo-eng {
  font-size: .85rem; font-weight: 600;
  color: rgba(255,255,255,.82); letter-spacing: .5px;   /* 🎯 2026-10-12 — 민트 헤더 위에서 기존 민트색 글자는 저대비라 흰색 계열로 */
}
.header-tag {
  font-size: .72rem; font-weight: 600;
  background: rgba(105,173,167,.18); color: var(--mint);
  padding: 4px 10px; border-radius: 20px; letter-spacing: .3px;
}
/* PIN field */
.pin-status { font-size:.82rem; font-weight:600; margin-top:5px; min-height:16px; }
.pin-status.ok  { color: var(--mint); }
.pin-status.err { color: #EF4444; }
.pin-status.hint { color: var(--gray-400); }

/* ── Loading Overlay ───────────────────────────────────────── */
#loading-overlay {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(27,42,74,.6); backdrop-filter: blur(4px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px;
}
#loading-overlay[hidden] { display: none; }
.spinner {
  width: 48px; height: 48px; border-radius: 50%;
  border: 4px solid rgba(105,173,167,.25);
  border-top-color: var(--mint);
  animation: spin .9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
.loading-msg { color: var(--white); font-size: .95rem; font-weight: 500; }

/* ── Screens ────────────────────────────────────────────────── */
.screen { display: none; width: 100%; max-width: 740px; padding: 36px 24px calc(48px + env(safe-area-inset-bottom, 0px)); flex-shrink: 0; }
.screen.active { display: block; animation: fadeUp .4s ease; }
@keyframes fadeUp { from { opacity: 0; } to { opacity: 1; } }
@keyframes badgePop { 0% { transform: scale(.5) translateY(30px); opacity: 0; } 60% { transform: scale(1.15) translateY(-4px); opacity: 1; } 80% { transform: scale(.95); } 100% { transform: scale(1) translateY(0); opacity: 1; } }
@keyframes badgeToastIn { from { opacity: 0; transform: translateX(110%); } to { opacity: 1; transform: translateX(0); } }
@keyframes badgeToastOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(110%); } }

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  padding: 28px; margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-title {
  font-size: .82rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.2px; color: var(--mint);
  margin-bottom: 16px;
}

/* ══════════════════════════════════════════════════════════════ */
/* BYS 통일 디자인 시스템 — 대시보드 톤 앤 매너                       */
/* ══════════════════════════════════════════════════════════════ */

/* ── 통일 카드 (.bys-c-*) ────────────────────────────────── */
/* 모든 대시보드 카드는 이 시스템 사용. padding/radius/border 일관 */
.bys-c {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 14px;
  transition: box-shadow .15s ease;
}
.bys-c-tight  { padding: 12px 14px; }
.bys-c-loose  { padding: 20px 22px; }
/* 강조 톤 카드 — 살짝 그라데이션 + 보더 */
.bys-c-mint   { background: linear-gradient(180deg,#F0FAF8 0%,#FAFFFE 100%); border-color: rgba(105,173,167,.22); }
.bys-c-warm   { background: linear-gradient(180deg,#FFFDF5 0%,#FFFEF7 100%); border-color: rgba(217,119,6,.18); }
.bys-c-soft   { background: linear-gradient(180deg,#FAFBFF 0%,#FDFEFF 100%); border-color: rgba(99,102,241,.15); }
.bys-c-sage   { background: linear-gradient(180deg,#F3FBF8 0%,#FAFCFA 100%); border-color: rgba(105,173,167,.22); }

/* ── 통일 헤더 (카드 상단 제목 + 액션) ───────────────────── */
.bys-h {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
  margin-bottom: 10px;
}
.bys-h-title {
  font-size: .92rem; font-weight: 800; color: var(--navy);
  display: inline-flex; align-items: center; gap: 8px;
  letter-spacing: -.01em;
  /* 디자인된 시각적 위계 — 이모지 없이도 섹션 구분 (베타 피드백: "이모티콘 과다 AI티 남") */
  padding-left: 10px;
  border-left: 3px solid var(--mint);
}
.bys-h-meta { font-size: .72rem; color: var(--gray-400); font-weight: 600; }
.bys-h-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* ── 통일 버튼 (.bys-b-*) — capsule 모양으로 통일 ───────── */
.bys-b {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 5px; padding: 8px 16px;
  border-radius: 999px; border: 1.5px solid transparent;
  font-family: inherit; font-size: .8rem; font-weight: 700;
  cursor: pointer; transition: all .15s ease;
  min-height: 36px; line-height: 1; white-space: nowrap;
  text-decoration: none;
}
.bys-b-sm { padding: 6px 12px; font-size: .72rem; min-height: 30px; }
.bys-b-lg { padding: 11px 22px; font-size: .88rem; min-height: 44px; }
/* primary — mint 채움 */
.bys-b-primary { background: var(--mint); color: #fff; border-color: var(--mint); }
.bys-b-primary:hover { background: var(--mint-dk); border-color: var(--mint-dk); }
/* secondary — 흰 배경 + mint 보더 */
.bys-b-secondary { background: #fff; color: var(--mint-dk); border-color: var(--mint); }
.bys-b-secondary:hover { background: var(--mint); color: #fff; }
/* ghost — 보더만 회색 */
.bys-b-ghost { background: #fff; color: var(--gray-600); border-color: var(--gray-200); }
.bys-b-ghost:hover { border-color: var(--gray-400); color: var(--navy); }
/* warm (강조 따뜻한 톤 — 일기 등) */
.bys-b-warm { background: #FFFBEB; color: #92400E; border-color: #FCD34D; }
.bys-b-warm:hover { background: #FEF3C7; border-color: #F59E0B; }
/* danger */
.bys-b-danger { background: #fff; color: #DC2626; border-color: #FCA5A5; }
.bys-b-danger:hover { background: #FEF2F2; }
/* navy (강한 강조) */
.bys-b-navy { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ── 통일 stats (작은 숫자 카드) ─────────────────────────── */
.bys-stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}
.bys-stat {
  background: #FAFAF8; border: 1px solid var(--gray-100);
  border-radius: 12px; padding: 14px 12px; text-align: center;
}
.bys-stat-num { font-size: 1.6rem; font-weight: 900; color: var(--navy); line-height: 1.1; }
.bys-stat-label { font-size: .7rem; color: var(--gray-500); margin-top: 4px; font-weight: 600; }
.bys-stat-sub { font-size: .65rem; color: var(--gray-400); margin-top: 2px; }

/* ── 통일 chip (메타/뱃지) ──────────────────────────────── */
.bys-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 999px;
  font-size: .68rem; font-weight: 700;
  background: var(--gray-100); color: var(--gray-600);
  letter-spacing: -.01em;
}
.bys-chip-mint { background: var(--mint-lt); color: var(--mint-dk); }
.bys-chip-warm { background: #FEF3C7; color: #92400E; }
.bys-chip-soft { background: #EEF2FF; color: #4338CA; }
.bys-chip-rose { background: #FCE7F3; color: #BE185D; }
.bys-chip-sage { background: #E7F8F2; color: #638679; }

/* ── 모바일 (≤640px) — BYS 통일 시스템 컴팩트화 ────────────── */
@media (max-width: 640px) {
  .bys-c { padding: 14px 14px; margin-bottom: 12px; border-radius: 12px; }
  .bys-c-tight { padding: 11px 12px; margin-bottom: 10px; }
  .bys-c-loose { padding: 16px 16px; }
  .bys-h { gap: 8px; margin-bottom: 8px; }
  .bys-h-title { font-size: .88rem; }
  .bys-h-meta { font-size: .68rem; }
  .bys-h-actions { gap: 5px; }
  /* 버튼 — 모바일에서 약간 컴팩트 (터치는 유지) */
  .bys-b { padding: 7px 14px; font-size: .76rem; min-height: 34px; gap: 4px; }
  .bys-b-sm { padding: 5px 10px; font-size: .68rem; min-height: 28px; }
  .bys-b-lg { padding: 10px 18px; font-size: .82rem; min-height: 42px; }
  /* 통계 — 작은 폰에서도 4개 들어가게 */
  .bys-stat-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .bys-stat { padding: 10px 8px; border-radius: 10px; }
  .bys-stat-num { font-size: 1.3rem; }
  .bys-stat-label { font-size: .65rem; }
  .bys-stat-sub { font-size: .58rem; }
  /* chip — 작은 폰에서 더 작게 */
  .bys-chip { padding: 2px 7px; font-size: .62rem; }
}
/* 작은 폰 (≤380px) — 더 컴팩트 */
@media (max-width: 380px) {
  .bys-c { padding: 12px 12px; }
  .bys-h-title { font-size: .82rem; }
  .bys-b { padding: 6px 12px; font-size: .72rem; min-height: 32px; }
  .bys-b-sm { padding: 4px 9px; font-size: .65rem; min-height: 26px; }
}
/* 모바일에서 차트 — 한 컬럼. stats+stamp는 그대로 옆 grid 유지 */
@media (max-width: 640px) {
  .dash-charts-grid { grid-template-columns: 1fr !important; gap: 10px !important; }
  .dash-charts-grid .chart-container { height: 160px !important; }
  .dash-stats-stamp-row { gap: 8px !important; grid-template-columns: 1fr 1fr !important; }
  .dash-stats-stamp-row #dash-stats { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ── My Info / PIN change card ────────────────────────────── */
.my-info-card {
  margin-top: 14px; margin-bottom: 14px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  padding: 16px 18px;
  transition: box-shadow .15s ease;
}
.my-info-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.my-info-title { font-size: .92rem; font-weight: 800; color: var(--navy); letter-spacing: -.01em; display: inline-flex; align-items: center; gap: 8px; }
.my-info-title::before { content: '👤'; font-size: 1rem; }
@media (max-width: 640px) {
  .my-info-card { padding: 14px 14px; }
  .my-info-title { font-size: .88rem; }
}
.my-info-body { font-size: .85rem; color: var(--gray-600); line-height: 1.65; }
.my-info-body > div { margin-bottom: 4px; }
.my-info-body > div:last-child { margin-bottom: 0; }

.info-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px dashed var(--gray-200);
}
.info-row:last-child { border-bottom: none; }
.info-row-label {
  font-size: .72rem; font-weight: 700; color: var(--gray-500);
  letter-spacing: .3px; min-width: 70px;
}
.info-row-value {
  flex: 1; font-size: .9rem; font-weight: 700; color: var(--navy);
  word-break: break-all;
}
.info-row-value.muted { color: var(--gray-400); font-weight: 500; font-size: .82rem; }
.info-edit-btn {
  background: transparent; color: var(--gray-500);
  border: 1px solid var(--gray-200); border-radius: 999px;
  padding: 5px 11px; font-size: .68rem; font-weight: 700;
  font-family: inherit; cursor: pointer; transition: all .15s;
}
.info-edit-btn:hover { background: var(--mint); border-color: var(--mint); color: #fff; }
.info-edit-btn.active { background: var(--mint); border-color: var(--mint); color: #fff; }

.en-edit-section { padding: 12px 0 4px; }
.en-edit-row { display: flex; gap: 6px; margin-bottom: 8px; }
.en-edit-input {
  flex: 1; min-width: 0; box-sizing: border-box;
  padding: 11px 12px; border: 1px solid var(--gray-200);
  background: #fff; border-radius: 10px;
  font-size: .9rem; font-weight: 700; font-family: inherit; color: var(--navy);
  transition: border-color .15s, box-shadow .15s;
}
.en-edit-input::placeholder { font-weight: 500; color: var(--gray-400); }
.en-edit-input:focus { outline: none; border-color: var(--mint); box-shadow: 0 0 0 3px rgba(105,173,167,.15); }
.en-status-msg { font-size: .74rem; text-align: left; min-height: 1em; font-weight: 600; }

.pin-toggle-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: transparent; color: var(--gray-500);
  border: 1px solid var(--gray-200); border-radius: 999px;
  padding: 6px 12px; font-size: .72rem; font-weight: 700;
  font-family: inherit; cursor: pointer; transition: all .15s;
}
.pin-toggle-btn:hover { background: var(--mint); border-color: var(--mint); color: #fff; }
.pin-toggle-btn.active { background: var(--mint); border-color: var(--mint); color: #fff; }

.pin-input-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 14px 0 10px; }
.pin-input {
  width: 100%; min-width: 0; box-sizing: border-box;
  padding: 11px 6px; border: 1px solid var(--gray-200);
  background: #fff; border-radius: 10px;
  font-size: .95rem; font-weight: 700; font-family: inherit;
  text-align: center; letter-spacing: 3px; color: var(--navy);
  transition: border-color .15s, box-shadow .15s;
}
.pin-input::placeholder { font-weight: 500; letter-spacing: .2px; color: var(--gray-400); font-size: .72rem; }
.pin-input:focus { outline: none; border-color: var(--mint); box-shadow: 0 0 0 3px rgba(105,173,167,.15); }
@media (max-width: 480px) {
  .pin-input-row { grid-template-columns: 1fr; gap: 7px; }
  .pin-input { letter-spacing: 4px; font-size: 1rem; padding: 11px 12px; }
}

.pin-submit-btn {
  width: 100%; padding: 11px; margin-top: 4px;
  border: none; border-radius: 10px;
  background: var(--navy); color: #fff;
  font-size: .82rem; font-weight: 700; font-family: inherit;
  cursor: pointer; transition: opacity .15s;
}
.pin-submit-btn:hover { opacity: .9; }

.pin-status-msg { margin-top: 10px; font-size: .76rem; text-align: center; min-height: 1em; font-weight: 600; }

/* ── Intro Screen ──────────────────────────────────────────── */
.hero {
  text-align: center; padding: 48px 24px 36px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--mint-lt); color: var(--mint-dk);
  font-size: .75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; padding: 6px 14px; border-radius: 20px;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: 2.4rem; font-weight: 900; color: var(--navy);
  line-height: 1.2; margin-bottom: 14px; letter-spacing: -.5px;
}
.hero h1 span { color: var(--mint); }
.hero p { font-size: 1rem; color: var(--gray-600); line-height: 1.7; max-width: 480px; margin: 0 auto 32px; }

.steps {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  margin-bottom: 36px;
}
.step-card {
  background: var(--gray-50); border-radius: 12px; border: 1px solid var(--gray-100);
  padding: 18px 14px; text-align: center;
}
.step-icon { font-size: 1.6rem; margin-bottom: 8px; }
.step-title { font-size: .8rem; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.step-desc { font-size: .75rem; color: var(--gray-600); line-height: 1.5; }

.form-card {
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--gray-200); padding: 32px;
  box-shadow: var(--shadow-md); text-align: left;
}
.form-card h2 { font-size: 1.15rem; font-weight: 800; color: var(--navy); margin-bottom: 6px; }
.form-card .sub { font-size: .85rem; color: var(--gray-400); margin-bottom: 24px; }

.field { margin-bottom: 18px; }
.field label {
  display: block; font-size: .8rem; font-weight: 700;
  color: var(--navy); margin-bottom: 7px; letter-spacing: .3px;
}
.field input {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid var(--gray-200); border-radius: 10px;
  font-size: .92rem; color: var(--gray-800);
  font-family: inherit; outline: none;
  transition: border-color .2s, box-shadow .2s;
  background: var(--gray-50);
}
.field input:focus {
  border-color: var(--mint); background: var(--white);
  box-shadow: 0 0 0 3px rgba(105,173,167,.12);
}
.field-hint { font-size: .75rem; color: var(--gray-400); margin-top: 5px; }
.class-chip {
  padding: 7px 14px; border-radius: 8px; font-size: .76rem; font-weight: 700;
  border: 1.5px solid var(--gray-200); background: var(--gray-50); color: var(--gray-600);
  cursor: pointer; transition: all .2s; white-space: nowrap;
}
.class-chip:hover { border-color: var(--mint); color: var(--mint); }
.class-chip.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0; color: var(--gray-400); font-size: .78rem;
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px; background: var(--gray-200);
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: block; width: 100%; padding: 15px 24px;
  background: var(--mint); color: var(--white);
  border: none; border-radius: 12px;
  font-size: .97rem; font-weight: 700;
  font-family: inherit; cursor: pointer; letter-spacing: .2px;
  transition: background .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 4px 14px rgba(105,173,167,.4);
}
.btn:hover:not(:disabled) {
  background: var(--mint-dk); transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(105,173,167,.45);
}
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { background: var(--gray-200); color: var(--gray-400); box-shadow: none; cursor: not-allowed; }
.btn-navy {
  background: var(--navy); box-shadow: 0 4px 14px rgba(27,42,74,.3);
}
.btn-navy:hover:not(:disabled) { background: var(--navy-2); box-shadow: 0 6px 20px rgba(27,42,74,.35); }
.btn-outline {
  background: transparent; color: var(--mint);
  border: 2px solid var(--mint); box-shadow: none;
  padding: 10px 22px; width: auto; display: inline-block;
}
.btn-outline:hover { background: var(--mint-lt); box-shadow: none; transform: none; }
.btn-sm { padding: 9px 18px; font-size: .85rem; border-radius: 8px; width: auto; display: inline-block; }

/* ── Control Bar ────────────────────────────────────────────── */
#ctrl-bar {
  display: none;
  width: 100%;
  z-index: 99;
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  padding: 10px 24px;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.ctrl-btn {
  padding: 8px 18px;
  background: var(--mint);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: .83rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: .2px;
  transition: background .2s, transform .1s;
  white-space: nowrap;
}
.ctrl-btn:hover { background: var(--mint-dk); transform: translateY(-1px); }
.ctrl-btn:active { transform: translateY(0); }

/* ── Sophie Profile Bar ─────────────────────────────────────── */
#sophie-bar {
  display: none;
  width: 100%; max-width: 740px;
  padding: 14px 24px 10px;
  align-items: center; gap: 14px;
}
.sophie-avatar {
  width: 56px; height: 56px; flex-shrink: 0;
  border-radius: 50%; overflow: hidden;
  border: 3px solid var(--mint);
  box-shadow: 0 3px 12px rgba(105,173,167,.35);
}
.sophie-avatar svg { width: 100%; height: 100%; }
.sophie-info { display: flex; flex-direction: column; gap: 3px; }
.sophie-name { font-size: 1rem; font-weight: 800; color: var(--navy); }
.sophie-status { font-size: .78rem; color: var(--gray-400); display: flex; align-items: center; gap: 5px; }
.sophie-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--mint);
  animation: sdot 1.5s ease-in-out infinite;
}
@keyframes sdot { 0%,100% { opacity:.3; transform:scale(.8); } 50% { opacity:1; transform:scale(1); } }

/* ── Turn Bar ───────────────────────────────────────────────── */
#turn-bar {
  width: 100%; max-width: 740px; padding: 12px 24px 0;
  display: none;
}
.turn-info { display: flex; justify-content: space-between; align-items: center; font-size: .8rem; margin-bottom: 7px; }
.turn-label { color: var(--gray-600); font-weight: 500; }
.turn-ready { color: var(--mint); font-weight: 700; }
.turn-track { background: var(--gray-100); border-radius: 99px; height: 5px; }
.turn-fill { height: 5px; border-radius: 99px; background: linear-gradient(90deg, var(--mint), #5BE0D8); transition: width .5s ease; width: 0; }

/* ── Chat Container (holds chat + input together) ──────────── */
#chat-container {
  display: none; /* toggled by JS */
  flex-direction: column;
  width: 100%; max-width: 740px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* ── Chat ───────────────────────────────────────────────────── */
#chat-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 20px 24px 12px; gap: 14px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.msg { display: flex; flex-direction: column; max-width: 80%; animation: fadeUp .3s ease; }
.msg.ai  { align-self: flex-start; }
.msg.usr { align-self: flex-end; align-items: flex-end; }
.msg-label { font-size: .68rem; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; margin-bottom: 5px; }
.msg.ai  .msg-label { color: var(--mint); }
.msg.usr .msg-label { color: var(--gray-400); }
.msg-body {
  padding: 10px 15px; border-radius: 18px;
  font-size: .93rem; line-height: 1.5;
}
.msg.ai .msg-body {
  background: var(--white); color: var(--navy);
  border: 1px solid var(--gray-200);
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-sm);
  border-left: 3px solid var(--mint);
}
.msg.usr .msg-body {
  background: var(--navy); color: var(--white);
  border-bottom-right-radius: 4px;
  box-shadow: 0 3px 10px rgba(27,42,74,.18);
}
.msg.sys .msg-body {
  background: #FFF7ED; color: #92400E;
  border: 1px solid #FDE68A; border-radius: 10px;
  font-size: .82rem; text-align: center;
}
.msg.sys { align-self: center; max-width: 90%; }

.typing-bubble {
  align-self: flex-start; max-width: 80%;
}
.typing-inner {
  background: var(--white); border: 1px solid var(--gray-200);
  border-left: 3px solid var(--mint); border-bottom-left-radius: 4px;
  border-radius: 18px; padding: 14px 18px;
  display: flex; gap: 5px; align-items: center;
  box-shadow: var(--shadow-sm);
}
.typing-inner span {
  width: 7px; height: 7px; border-radius: 50%; background: var(--mint);
  animation: tdot 1.2s infinite;
}

/* Speaking animation */
.msg.ai.speaking .msg-body {
  border-left: 3px solid var(--mint);
  animation: speakPulse 1.4s ease-in-out infinite;
}
/* Error correction inline styling */
.err-wrong { color: #ef4444; text-decoration: line-through; font-style: italic; }
.err-correct { color: var(--mint-dk); font-weight: 700; }
.train-err-box { margin-top: 10px; padding: 8px 12px; background: #FFFBEB; border: 1px solid #FDE68A; border-radius: 10px; display: flex; flex-direction: column; gap: 4px; }
.train-err-item { font-size: .85rem; }
.train-err-arrow { color: #9CA3AF; margin: 0 4px; }
@keyframes speakPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(105,173,167,0); }
  50%       { box-shadow: 0 0 0 6px rgba(105,173,167,.18); }
}
.speak-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .72rem; font-weight: 700; color: var(--mint);
  letter-spacing: .3px; margin-bottom: 5px;
}
.speak-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.speak-bars span {
  width: 3px; border-radius: 2px; background: var(--mint);
  animation: bar 0.9s ease-in-out infinite;
}
.speak-bars span:nth-child(1) { height: 5px;  animation-delay: 0s; }
.speak-bars span:nth-child(2) { height: 10px; animation-delay: .15s; }
.speak-bars span:nth-child(3) { height: 7px;  animation-delay: .3s; }
.speak-bars span:nth-child(4) { height: 12px; animation-delay: .1s; }
.speak-bars span:nth-child(5) { height: 4px;  animation-delay: .25s; }
@keyframes bar {
  0%, 100% { transform: scaleY(.4); opacity: .6; }
  50%       { transform: scaleY(1);  opacity: 1; }
}
.typing-inner span:nth-child(2) { animation-delay: .2s; }
.typing-inner span:nth-child(3) { animation-delay: .4s; }
@keyframes tdot { 0%,60%,100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-5px); opacity: 1; } }

/* ── Input Area (inside chat) ───────────────────────────────── */
#input-area {
  width: 100%; max-width: 740px;
  display: none; flex-direction: column; align-items: center;
  padding: 12px 24px calc(20px + env(safe-area-inset-bottom, 0px)); gap: 0;
  background: var(--white); border-top: 1px solid var(--gray-200);
  flex-shrink: 0;
}
#input-mic-section {
  width: 100%; display: flex; flex-direction: column; align-items: center;
  padding: 0; gap: 10px;
}
#transcript-box {
  width: 100%; background: var(--white);
  border: 1.5px solid var(--gray-200); border-radius: 12px;
  padding: 12px 16px; font-size: .88rem; color: var(--gray-800);
  line-height: 1.5; min-height: 46px; display: none;
  font-family: inherit;
}
.mic-row { display: flex; align-items: center; gap: 16px; }
#mic-btn {
  width: 72px; height: 72px; border-radius: 50%; border: none;
  background: var(--mint); color: var(--white);
  font-size: 1.8rem; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 18px rgba(105,173,167,.45);
  transition: all .2s;
}
#mic-btn:hover:not(:disabled) { transform: scale(1.06); background: var(--mint-dk); }
#mic-btn.recording {
  background: #E53E3E;
  animation: micpulse 1.3s infinite;
  box-shadow: 0 4px 18px rgba(229,62,62,.5);
}
@keyframes micpulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.07); } }
#mic-btn:disabled { background: var(--gray-200); color: var(--gray-400); box-shadow: none; cursor: not-allowed; animation: none; transform: none; }
#rerecord-btn {
  display: none; background: transparent; color: var(--gray-600);
  border: 1.5px solid var(--gray-200); border-radius: 8px;
  padding: 8px 14px; font-size: .82rem; font-weight: 600;
  cursor: pointer; font-family: inherit;
}
#rerecord-btn:hover { border-color: var(--navy); color: var(--navy); }
.mic-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
#mic-status {
  font-size: .8rem; font-weight: 700; color: var(--mint);
  display: flex; align-items: center; gap: 6px; min-height: 18px;
}
/* 녹음 중 표시 — 좌측 빨간 점 깜빡임 + 텍스트 색 변경 (베타 피드백 "마이크 의미 불분명") */
#mic-btn.recording ~ .mic-meta #mic-status::before {
  content: ''; display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; background: #E53E3E;
  animation: recblink 1s infinite;
}
#mic-btn.recording ~ .mic-meta #mic-status { color: #E53E3E; }
@keyframes recblink { 0%,100% { opacity: 1; } 50% { opacity: .25; } }
.dp { display: inline-flex; gap: 4px; }
.dp span {
  width: 5px; height: 5px; border-radius: 50%; background: var(--mint);
  animation: dpb 1.2s infinite;
}
.dp span:nth-child(2) { animation-delay: .2s; }
.dp span:nth-child(3) { animation-delay: .4s; }
@keyframes dpb { 0%,80%,100% { transform: scale(.5); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }
#mic-hint { font-size: .78rem; color: var(--gray-400); }

/* ── Analyze Button ─────────────────────────────────────────── */
#analyze-wrap {
  width: 100%; padding: 8px 24px 4px;
}

/* ── Result Screen ──────────────────────────────────────────── */
.result-hero {
  background: var(--navy); border-radius: var(--radius);
  padding: 36px 32px; margin-bottom: 20px; text-align: center;
  box-shadow: var(--shadow-lg);
}
.result-name { font-size: .82rem; font-weight: 600; color: rgba(255,255,255,.55); letter-spacing: .5px; margin-bottom: 14px; text-transform: uppercase; }
.result-badge {
  display: inline-block;
  font-size: 3.2rem; font-weight: 900; color: var(--white);
  letter-spacing: -1px; line-height: 1;
  border-bottom: 4px solid var(--mint); padding-bottom: 10px; margin-bottom: 14px;
}
.result-lvdesc { font-size: .97rem; color: rgba(255,255,255,.75); line-height: 1.5; max-width: 380px; margin-left: auto; margin-right: auto; }

.scores-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.scores-grid-full { display: grid; grid-template-columns: 1fr; gap: 12px; }
.score-item { background: var(--gray-50); border-radius: 12px; padding: 16px 18px; border: 1px solid var(--gray-100); min-width: 0; overflow: hidden; }
.score-name { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--gray-400); margin-bottom: 8px; }
.score-val-row { display: flex; align-items: center; gap: 10px; }
.score-num { font-size: 1.4rem; font-weight: 800; color: var(--navy); min-width: 38px; }
.score-bar { flex: 1; background: var(--gray-200); border-radius: 99px; height: 6px; }
.score-fill { height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--mint), #5BE0D8); }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tag {
  padding: 6px 14px; border-radius: 20px; font-size: .8rem; font-weight: 600;
}
.tag.good { background: #E6FAF9; color: #1A7A74; }
.tag.weak { background: #FEF3C7; color: #92400E; }

/* Error corrections */
.error-block {
  background: var(--white); border-radius: 12px; border: 1px solid var(--gray-100);
  padding: 14px 16px; margin-bottom: 10px; box-shadow: var(--shadow-sm);
}
.error-block:last-child { margin-bottom: 0; }
.err-wrong { font-size: .88rem; color: #C53030; font-weight: 500; margin-bottom: 5px; }
.err-correct { font-size: .88rem; color: #276749; font-weight: 700; margin-bottom: 5px; }
.err-reason { font-size: .78rem; color: var(--gray-400); line-height: 1.5; }
.err-arrow { color: var(--mint); font-weight: 700; margin: 0 4px; }
.no-error-msg { color: #276749; font-size: .9rem; padding: 10px 0; display: flex; align-items: center; gap: 8px; }

/* Training material */
.tm-section { margin-bottom: 28px; }
.tm-section:last-child { margin-bottom: 0; }
.tm-section-title {
  font-size: .88rem; font-weight: 800; color: var(--navy);
  text-transform: uppercase; letter-spacing: .8px;
  padding-bottom: 10px; border-bottom: 2px solid var(--mint-lt);
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.tm-section-title span { font-size: 1rem; }

.dialogue-card { background: var(--gray-50); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; border: 1px solid var(--gray-100); }
.dial-q { font-size: .85rem; color: var(--gray-600); margin-bottom: 6px; }
.dial-q strong { color: var(--navy); }
.dial-a { font-size: .85rem; color: var(--navy); font-weight: 500; line-height: 1.6; margin-bottom: 6px; }
.dial-note { font-size: .75rem; color: var(--mint-dk); font-weight: 600; }

.pattern-list { list-style: none; }
.pattern-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 10px 0; border-bottom: 1px solid var(--gray-100); font-size: .88rem; line-height: 1.5; color: var(--gray-800);
}
.pattern-item:last-child { border-bottom: none; }
.pat-n { min-width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: var(--white); font-size: .72rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }

.expr-list { list-style: none; }
.expr-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--gray-100); }
.expr-item:last-child { border-bottom: none; }
.expr-n { min-width: 26px; height: 26px; border-radius: 50%; background: var(--mint); color: var(--white); font-size: .72rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }
.expr-en { font-size: .88rem; font-weight: 700; color: var(--navy); display: block; }
.expr-ko { font-size: .78rem; color: var(--gray-400); display: block; margin-top: 2px; }


/* ── Mode Selector ─────────────────────────────────────────────── */
.mode-selector {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin: 18px 0 14px;
}
.mode-card {
  border-radius: 12px; padding: 16px 12px; text-align: center;
  cursor: pointer; border: 2.5px solid var(--gray-200);
  background: var(--gray-50); transition: all .2s;
}
.mode-card:hover { border-color: var(--mint); background: var(--mint-lt); }
.mode-card.selected.mode-test {
  border-color: var(--mint); background: var(--mint-lt);
  box-shadow: 0 0 0 3px rgba(105,173,167,.15);
}
.mode-card.selected.mode-train {
  border-color: var(--navy); background: rgba(27,42,74,.06);
  box-shadow: 0 0 0 3px rgba(27,42,74,.1);
}
.mode-icon { font-size: 1.5rem; margin-bottom: 7px; }
.mode-title { font-size: .88rem; font-weight: 800; color: var(--navy); margin-bottom: 4px; }
.mode-desc { font-size: .72rem; color: var(--gray-600); line-height: 1.4; }

/* ── Welcome Banner ─────────────────────────────────────────────── */
#welcome-banner {
  background: var(--navy); color: var(--white);
  border-radius: 10px; padding: 12px 16px;
  margin-bottom: 4px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.wb-text { font-size: .85rem; font-weight: 600; }
.wb-level { font-size: 1.05rem; font-weight: 900; color: var(--mint); white-space: nowrap; }

/* ── AI Recommendation — 오늘의 한 가지 (단일 포커스) ───────────── */
#ai-recommendation {
  background: linear-gradient(135deg, #F0FDF4, #E7F8F2);
  border: 1.5px solid #6EE7B7; border-radius: 14px;
  padding: 16px 18px 14px; margin-bottom: 14px; display: none;
}
#ai-recommendation:hover:not(.loading) { border-color: var(--mint); box-shadow: 0 2px 10px rgba(110,231,183,.3); transition: box-shadow .2s, border-color .2s; }
#ai-recommendation.loading { background: var(--gray-50); border-color: var(--gray-200); }
.rec-label {
  font-size: .72rem; font-weight: 800; letter-spacing: .08em;
  color: var(--mint-dk); margin-bottom: 8px;
}
.rec-title { font-size: 1.05rem; color: var(--navy); font-weight: 800; line-height: 1.3; }
.rec-reason { font-size: .82rem; color: var(--gray-600); line-height: 1.5; margin-top: 4px; }
.rec-meta { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.rec-duration { font-size: .76rem; color: var(--mint-dk); font-weight: 700; background: rgba(105,173,167,.12); padding: 3px 9px; border-radius: 999px; }
.rec-cta {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 16px; background: var(--mint); color: #FFFFFF;
  border-radius: 999px; font-size: .82rem; font-weight: 800;
  letter-spacing: -.01em; box-shadow: 0 1px 3px rgba(105,173,167,.25);
}
.rec-footnote { font-size: .68rem; color: var(--gray-400); margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(105,173,167,.15); font-weight: 500; }
.rec-text { font-size: .88rem; color: var(--gray-800); line-height: 1.65; font-weight: 500; }
.rec-loading { font-size: .82rem; color: var(--gray-400); display: flex; align-items: center; gap: 8px; }
.rec-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); animation: recPulse 1s ease-in-out infinite; }
.rec-dot:nth-child(2) { animation-delay: .2s; }
.rec-dot:nth-child(3) { animation-delay: .4s; }
@keyframes recPulse { 0%,100%{opacity:.3;transform:scale(.8)} 50%{opacity:1;transform:scale(1)} }

/* ── Train warning ─────────────────────────────────────────────── */
#train-warning {
  background: #FFF7ED; color: #92400E;
  border: 1px solid #FCD34D; border-radius: 10px;
  padding: 10px 14px; font-size: .82rem; font-weight: 600;
  margin-bottom: 12px; display: none;
}

/* ── History link btn ──────────────────────────────────────────── */
.history-link-btn {
  display: block; width: 100%; margin-top: 12px;
  background: transparent; color: var(--gray-400);
  border: 1.5px solid var(--gray-200); border-radius: 10px;
  padding: 10px; font-size: .82rem; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: all .2s;
}
.history-link-btn:hover { border-color: var(--navy); color: var(--navy); }

/* ── History Screen ─────────────────────────────────────────────── */
.hist-back {
  display: flex; align-items: center; gap: 8px;
  background: none; border: none; cursor: pointer;
  color: var(--gray-600); font-size: .85rem; font-weight: 600;
  font-family: inherit; padding: 0; margin-bottom: 20px;
}
.hist-back:hover { color: var(--navy); }
.hist-title { font-size: 1.25rem; font-weight: 900; color: var(--navy); margin-bottom: 4px; }
.hist-subtitle { font-size: .85rem; color: var(--gray-400); margin-bottom: 22px; }
.chart-wrap {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 20px 16px 12px;
  margin-bottom: 20px; box-shadow: var(--shadow-sm);
}
.chart-title {
  font-size: .8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--mint); margin-bottom: 12px;
}
.hist-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.hist-table th {
  text-align: left; padding: 8px 12px;
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .8px; color: var(--gray-400);
  border-bottom: 2px solid var(--gray-100);
}
.hist-table td { padding: 10px 12px; border-bottom: 1px solid var(--gray-100); color: var(--gray-800); }
.hist-table tr:last-child td { border-bottom: none; }
.hist-lv { font-weight: 800; color: var(--navy); }
.hist-badge { padding: 3px 10px; border-radius: 12px; font-size: .72rem; font-weight: 700; }
.hist-badge.test { background: var(--mint-lt); color: var(--mint-dk); }
.hist-badge.train { background: rgba(27,42,74,.06); color: var(--navy); }
.hist-empty { text-align: center; color: var(--gray-400); padding: 30px; font-size: .88rem; }

/* ── Stamp Calendar ───────────────────────────────────────────── */
.stamp-cal-wrap { width:100%; max-width:260px; margin:0 auto; box-sizing:border-box; }
.stamp-cal-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:6px; }
.stamp-cal-month { font-size:.95rem; font-weight:700; color:#333333; letter-spacing:-.01em; }
.stamp-cal-nav { display:flex; gap:4px; }
.stamp-cal-nav button { background:transparent; border:none; border-radius:6px; width:26px; height:26px; font-size:.85rem; cursor:pointer; color:#8A8A8A; font-weight:500; line-height:1; transition:color .15s, background .15s; }
.stamp-cal-nav button:hover { color:#333333; background:#F2F2EF; }
.stamp-cal-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:2px; text-align:center; }
.stamp-cal-dow { font-size:.7rem; font-weight:700; color:var(--gray-400); padding:3px 0; }
.stamp-cal-day { position:relative; width:100%; aspect-ratio:1; display:flex; flex-direction:column; align-items:center; justify-content:center; font-size:.78rem; color:var(--gray-500); border-radius:7px; font-weight:600; gap:1px; line-height:1; overflow:hidden; min-width:0; }
.stamp-cal-day.today { outline:1.5px solid #69ADA7; outline-offset:-1px; }
.stamp-cal-day.has-stamp { background:#E7F8F2; color:#333333; font-weight:600; }
.stamp-cal-day .stamp-icon { font-size:.92rem; line-height:1; }
.stamp-cal-day.empty { visibility:hidden; }
.stamp-streak { display:flex; align-items:center; gap:6px; margin-top:6px; padding:6px 10px; background:linear-gradient(135deg,#FFF7ED,#FFFBEB); border-radius:8px; border:1px solid #FCD34D; }
.stamp-streak-num { font-size:.85rem; font-weight:900; color:#D97706; }
.stamp-streak-label { font-size:.65rem; font-weight:600; color:#92400E; }

/* ── Praise / Motivation Section ──────────────────────────────── */
.praise-card { background:linear-gradient(180deg,#F0FAF8 0%,#FAFFFE 100%); border:1px solid rgba(105,173,167,.22); border-radius:14px; padding:16px 18px; margin-bottom:14px; }
@media (max-width: 640px) { .praise-card { padding: 14px 14px; } }
.praise-title { font-size:.82rem; font-weight:700; text-transform:uppercase; letter-spacing:1px; color:var(--mint-dk); margin-bottom:12px; }
.praise-item { display:flex; align-items:flex-start; gap:10px; padding:8px 0; }
.praise-item + .praise-item { border-top:1px solid rgba(105,173,167,.15); }
.praise-icon { font-size:1.1rem; min-width:24px; text-align:center; }
.praise-text { font-size:.88rem; color:var(--navy); line-height:1.6; font-weight:500; }
.praise-highlight { font-weight:800; color:var(--mint-dk); }

/* ── Training Material Archive ─────────────────────────────────── */
.archive-item { border: 1px solid var(--gray-200); border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
.archive-item-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px; cursor: pointer; background: var(--white);
  transition: background .15s;
}
.archive-item-header:hover { background: var(--mint-lt); }
.archive-item-header .arch-left { display: flex; flex-direction: column; gap: 3px; }
.archive-item-header .arch-date { font-size: .78rem; color: var(--gray-400); font-weight: 600; }
.archive-item-header .arch-focus { font-size: .88rem; font-weight: 700; color: var(--navy); }
.archive-item-header .arch-right { display: flex; align-items: center; gap: 8px; }
.arch-pdf-btn {
  font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 8px;
  background: var(--mint); color: var(--white); border: none; cursor: pointer;
  white-space: nowrap;
}
.arch-pdf-btn:hover { background: var(--mint-dk); }
.arch-chevron { font-size: .75rem; color: var(--gray-400); transition: transform .2s; }
.arch-chevron.open { transform: rotate(180deg); }
.archive-item-body { display: none; padding: 0 16px 16px; border-top: 1px solid var(--gray-100); }
.archive-item-body.open { display: block; }

/* ── Focus Panel (training mode) ───────────────────────────────── */
#focus-panel {
  width: 100%; max-width: 740px;
  padding: 10px 24px 8px;
  display: none;
  background: rgba(105,173,167,.05);
  border-top: 1px solid var(--mint-lt);
}
.focus-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.focus-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--mint-dk); }
.focus-area-tag { font-size: .75rem; font-weight: 600; color: var(--navy); background: var(--mint-lt); padding: 3px 10px; border-radius: 10px; }
.focus-errors { display: flex; flex-wrap: wrap; gap: 6px; min-height: 22px; }
.focus-err-tag {
  padding: 4px 10px; border-radius: 20px; font-size: .75rem; font-weight: 600;
  background: #FEF3C7; color: #92400E; display: flex; align-items: center; gap: 5px;
  transition: background .3s;
}
.focus-err-tag .err-cnt { background: #F59E0B; color: white; border-radius: 50%; width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; font-size: .65rem; font-weight: 800; }
.focus-err-tag.hot { background: #FED7D7; color: #C53030; }
.focus-err-tag.hot .err-cnt { background: #E53E3E; }

/* ── Dashboard Screen ──────────────────────────────────────────── */
.dash-stat-card {
  background: #fff; border: 1px solid #ECEAE3; border-radius: 12px;
  text-align: center; padding: 16px 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 96px; gap: 4px;
}
.dash-stat-val { font-size: 1.6rem; font-weight: 700; color: #333333; line-height: 1; letter-spacing: -.02em; }
.dash-stat-val span { font-size: .85rem; color: var(--mint); font-weight: 600; }
.dash-stat-label { font-size: .78rem; color: #5C5C5C; font-weight: 500; text-transform: none; letter-spacing: 0; }
.dash-stat-sub { font-size: .68rem; color: #8A8A8A; font-weight: 500; margin-top: 0; }

.top-err-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--gray-100); font-size: .85rem;
}
.top-err-row:last-child { border-bottom: none; }
.top-err-rank { min-width: 26px; height: 26px; border-radius: 50%; background: var(--gray-100); color: var(--gray-600); font-size: .72rem; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.top-err-rank.r1 { background: #FEF3C7; color: #D97706; }
.top-err-rank.r2 { background: #FEE2E2; color: #DC2626; }
.top-err-rank.r3 { background: #EDE9FE; color: #7C3AED; }
.top-err-wrong { color: #C53030; font-weight: 500; }
.top-err-arrow { color: var(--mint); font-weight: 700; margin: 0 4px; }
.top-err-correct { color: #276749; font-weight: 700; }
.top-err-cnt { margin-left: auto; font-size: .72rem; font-weight: 700; color: var(--gray-400); background: var(--gray-100); padding: 2px 8px; border-radius: 10px; white-space: nowrap; }

.next-level-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--gray-100); font-size: .88rem; line-height: 1.5; }
.next-level-item:last-child { border-bottom: none; }
.next-level-dot { min-width: 8px; height: 8px; border-radius: 50%; background: var(--mint); margin-top: 6px; flex-shrink: 0; }

.chart-container { position: relative; overflow: hidden; max-width: 100%; }
.chart-container canvas { max-width: 100% !important; }

/* ── Vocab Training ─────────────────────────────────────────────── */
.vocab-type-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin: 0 0 14px; }
.vocab-type-card {
  border: 1.5px solid var(--gray-100); border-radius: 14px;
  padding: 16px 18px; cursor: pointer; background: white;
  transition: all .2s; display: flex; align-items: flex-start; gap: 14px;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.vocab-type-card:hover { border-color: var(--mint); background: var(--mint-lt); }
.vocab-type-card.selected { border-color: var(--mint); background: var(--mint-lt); box-shadow: 0 0 0 3px rgba(105,173,167,.12); }
.vtc-icon { font-size: 1.6rem; flex-shrink: 0; margin-top: 2px; }
.vtc-title { font-size: .88rem; font-weight: 800; color: var(--navy); margin-bottom: 3px; }
.vtc-desc { font-size: .73rem; color: var(--gray-400); line-height: 1.45; }

/* Community — Dashboard-style single scroll */
.comm-section-card {
  background: #fff; border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.06);
  padding: 22px 24px; margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(26,26,26,0.04);
}

/* ── Newsletter Card — editorial / magazine style ──────────────── */
.newsletter-card-link { text-decoration: none; display: block; margin-bottom: 16px; }
.newsletter-card {
  position: relative; overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(135deg, #1B2A4A 0%, #2D3D63 50%, #3F9E8C 100%);
  padding: 24px 26px 22px;
  display: flex; align-items: center; gap: 16px;
  box-shadow: 0 8px 24px -8px rgba(27,42,74,.45), 0 2px 4px rgba(0,0,0,.08);
  transition: transform .25s cubic-bezier(.2,.9,.3,1.05), box-shadow .25s ease;
  cursor: pointer;
}
.newsletter-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px -8px rgba(27,42,74,.55), 0 4px 8px rgba(0,0,0,.1);
}
.newsletter-card:hover .newsletter-cta { background: rgba(255,255,255,.22); padding-right: 22px; }
.newsletter-card:hover .newsletter-cta svg { transform: translateX(4px); }

/* Decorative background accents */
.newsletter-card-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 88% 18%, rgba(105,173,167,.35) 0%, transparent 50%),
    radial-gradient(circle at 6% 92%, rgba(255,255,255,.08) 0%, transparent 40%);
}
.newsletter-card-bg::before {
  content: ''; position: absolute; right: -80px; bottom: -80px;
  width: 220px; height: 220px;
  border: 2px solid rgba(255,255,255,.06); border-radius: 50%;
}
.newsletter-card-bg::after {
  content: ''; position: absolute; right: -120px; bottom: -120px;
  width: 280px; height: 280px;
  border: 1px solid rgba(255,255,255,.04); border-radius: 50%;
}

.newsletter-card-content { flex: 1; min-width: 0; position: relative; z-index: 1; }
.newsletter-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: 'Poppins', sans-serif;
  font-size: .62rem; font-weight: 700; letter-spacing: .14em;
  color: rgba(255,255,255,.78); text-transform: uppercase;
  background: rgba(255,255,255,.1); padding: 4px 10px;
  border-radius: 999px; backdrop-filter: blur(4px);
  margin-bottom: 10px;
}
.newsletter-pulse {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: #69ADA7;
  box-shadow: 0 0 0 0 rgba(105,173,167,.7);
  animation: nlPulse 1.8s ease-in-out infinite;
}
@keyframes nlPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(105,173,167,.7); }
  50% { box-shadow: 0 0 0 7px rgba(105,173,167,0); }
}
.newsletter-title {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-size: 1.1rem; font-weight: 800; color: #fff;
  letter-spacing: -.015em; line-height: 1.3; margin-bottom: 4px;
}
.newsletter-subtitle {
  font-size: .76rem; color: rgba(255,255,255,.7);
  font-weight: 500; line-height: 1.5;
}

.newsletter-cta {
  position: relative; z-index: 1; flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px;
  background: rgba(255,255,255,.14); color: #fff;
  font-size: .78rem; font-weight: 700; letter-spacing: -.005em;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22);
  transition: background .2s, padding .2s;
  white-space: nowrap;
}
.newsletter-cta svg { transition: transform .2s; }

@media (max-width: 480px) {
  .newsletter-card { padding: 20px 20px 18px; gap: 12px; flex-direction: column; align-items: flex-start; }
  .newsletter-cta { width: 100%; justify-content: center; padding: 11px 16px; }
}
.comm-section-title {
  font-family: 'Poppins', sans-serif; font-size: .88rem; font-weight: 600;
  color: #333333; margin-bottom: 14px; letter-spacing: -0.01em;
}
.comm-card {
  background: #F2F2EF; border-radius: 20px; border: none;
  padding: 28px; margin-bottom: 16px;
  transition: transform 0.3s cubic-bezier(0.25,0.1,0.25,1), box-shadow 0.3s;
}
.comm-card:hover { transform: translateY(-3px); box-shadow: 0 4px 24px rgba(26,26,26,0.06); }
.comm-card-title { font-family: 'Poppins', -apple-system, sans-serif; font-size: 1.05rem; font-weight: 600; color: #333333; margin-bottom: 8px; line-height: 1.3; letter-spacing: -0.01em; }
.comm-card-meta { font-size: .75rem; color: #8A8A8A; margin-bottom: 10px; font-weight: 500; }
.comm-card-body { font-size: .88rem; color: #5C5C5C; line-height: 1.6; }
.comm-badge {
  display: inline-block; padding: 4px 12px; border-radius: 980px;
  font-size: .68rem; font-weight: 600; letter-spacing: .02em;
}
.comm-event-card {
  background: #F2F2EF; border-radius: 20px; border: none;
  padding: 24px; margin-bottom: 12px; display: flex; gap: 20px; align-items: flex-start;
  transition: transform 0.3s cubic-bezier(0.25,0.1,0.25,1), box-shadow 0.3s;
}
.comm-event-card:hover { transform: translateY(-3px); box-shadow: 0 4px 24px rgba(26,26,26,0.06); }
.comm-event-date-box {
  min-width: 56px; text-align: center; background: #FAFAF8; border-radius: 16px; padding: 12px 8px;
  flex-shrink: 0;
}
.comm-event-month { font-size: .65rem; font-weight: 600; color: #8A8A8A; text-transform: uppercase; letter-spacing: .05em; }
.comm-event-day { font-size: 1.4rem; font-weight: 700; color: #333333; line-height: 1.2; font-family: 'Poppins', sans-serif; }
.comm-roadmap-step {
  display: flex; align-items: center; gap: 16px; padding: 20px 24px;
  background: #F2F2EF; border-radius: 16px; border: none;
  margin-bottom: 10px; transition: transform 0.3s cubic-bezier(0.25,0.1,0.25,1), box-shadow 0.3s;
}
.comm-roadmap-step:hover { transform: translateY(-2px); box-shadow: 0 4px 24px rgba(26,26,26,0.06); }
.comm-roadmap-num {
  width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: .9rem; font-weight: 600; flex-shrink: 0;
  background: #E8E8E4; color: #8A8A8A;
}
.comm-roadmap-step.active .comm-roadmap-num { background: #69ADA7; color: white; }
.comm-roadmap-arrow {
  text-align: center; color: #C8C8C4; font-size: .75rem; margin: -4px 0 -4px 19px; letter-spacing: 1px;
}
.comm-story-card {
  background: #F2F2EF; border-radius: 20px; border: none;
  padding: 28px; margin-bottom: 16px; position: relative; overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.25,0.1,0.25,1), box-shadow 0.3s;
}
.comm-story-card:hover { transform: translateY(-3px); box-shadow: 0 4px 24px rgba(26,26,26,0.06); }
.comm-story-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #69ADA7, #AFE7D5);
}
.comm-challenge-card {
  background: #F2F2EF; border-radius: 20px; border: none;
  padding: 28px; margin-bottom: 16px; position: relative; overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.25,0.1,0.25,1), box-shadow 0.3s;
}
.comm-challenge-card:hover { transform: translateY(-3px); box-shadow: 0 4px 24px rgba(26,26,26,0.06); }
.comm-challenge-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #D4A853, #69ADA7);
}
.comm-global-card {
  background: #F2F2EF; border-radius: 20px; border: none;
  padding: 24px; margin-bottom: 12px; display: flex; gap: 20px; align-items: flex-start;
  transition: transform 0.3s cubic-bezier(0.25,0.1,0.25,1), box-shadow 0.3s;
}
.comm-global-card:hover { transform: translateY(-3px); box-shadow: 0 4px 24px rgba(26,26,26,0.06); }
.comm-global-flag { font-size: 2.2rem; flex-shrink: 0; }

/* Leaflet Map Custom Markers */
.bys-map-marker {
  background: none !important; border: none !important;
  display: flex; align-items: center; justify-content: center;
}
.bys-pulse-ring {
  width: 32px; height: 32px; border-radius: 50%;
  border: 3px solid #69ADA7; opacity: 0.6;
}
.bys-popup .leaflet-popup-content-wrapper {
  border-radius: 14px; padding: 0; box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  font-family: 'Inter', -apple-system, sans-serif;
}
.bys-popup .leaflet-popup-content { margin: 12px 16px; font-size: .82rem; line-height: 1.5; }
.bys-popup .leaflet-popup-tip { border-top-color: #fff; }
.bys-pulse-marker { background: none !important; border: none !important; }
.bys-tooltip { font-family:'Inter',sans-serif; font-size:.75rem; font-weight:600; padding:4px 10px; border-radius:8px; border:none; box-shadow:0 2px 8px rgba(0,0,0,.12); }
#comm-world-map { position: relative; z-index: 0; }
#comm-world-map .leaflet-container { border-radius: 12px; background: #aad3df; }

/* 응원 메시지 빛 효과 */
@keyframes cheer-wave {
  0%   { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(3); opacity: 0; }
}
@keyframes cheer-flash {
  0%   { transform: scale(0); opacity: 1; }
  40%  { transform: scale(2.5); opacity: .8; }
  100% { transform: scale(3.5); opacity: 0; }
}
.cheer-glow-marker {
  background: none !important; border: none !important;
  pointer-events: none !important;
  z-index: 9999 !important;
}
.cheer-glow-core {
  position: absolute; top: 50%; left: 50%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,250,200,.9) 0%, rgba(255,215,0,.5) 40%, rgba(255,180,50,.15) 70%, transparent 100%);
}
.cheer-flash {
  position: absolute; top: 50%; left: 50%;
  width: 12px; height: 12px; margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,1) 0%, rgba(255,240,150,.8) 40%, transparent 70%);
  animation: cheer-flash .8s ease-out forwards;
  pointer-events: none;
}
.cheer-wave-ring {
  position: absolute; top: 50%; left: 50%;
  border-radius: 50%;
  border: 2.5px solid rgba(255,200,0,.85);
  animation: cheer-wave 3s ease-out infinite;
}
#comm-world-map .leaflet-tile-pane img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  outline: 1px solid transparent;
}

/* ── Avatar World ── */
.aw-scene {
  position: relative; width: 100%; height: 420px; border-radius: 20px; overflow: hidden;
  background: linear-gradient(180deg, #D4EDDA 0%, #C1E1C5 30%, #A8D5A2 60%, #90C695 100%);
}
@media(max-width:600px) { .aw-scene { height: 340px; } }
.aw-sky {
  position: absolute; top: 0; left: 0; right: 0; height: 35%;
  background: linear-gradient(180deg, #87CEEB 0%, #B8E4F0 60%, #D4EDDA 100%);
}
.aw-clouds { position: absolute; top: 8%; width: 100%; height: 50px; opacity: .5; }
.aw-cloud {
  position: absolute; background: white; border-radius: 50px; height: 18px;
  box-shadow: 20px -6px 0 8px white, 40px 0 0 4px white, -10px -2px 0 6px white;
  animation: aw-drift linear infinite;
}
@keyframes aw-drift { 0% { transform: translateX(-80px); } 100% { transform: translateX(calc(100vw + 80px)); } }
.aw-path {
  position: absolute; bottom: 18%; left: 10%; right: 10%; height: 28px;
  background: #D2B48C; border-radius: 14px; opacity: .45;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.aw-path::after {
  content: ''; position: absolute; top: 4px; left: 5%; right: 5%; height: 4px;
  background: rgba(255,255,255,.3); border-radius: 2px;
}
.aw-tree {
  position: absolute; bottom: 0; display: flex; flex-direction: column; align-items: center;
}
.aw-tree-top {
  width: 38px; height: 38px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #5DAE5D, #3D8B3D);
  box-shadow: 0 4px 10px rgba(0,0,0,.1);
}
.aw-tree-trunk { width: 8px; height: 16px; background: #8B6914; border-radius: 0 0 3px 3px; margin-top: -4px; }
.aw-bush {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #6BC46B, #4AA04A);
  opacity: .8;
}
.aw-pond {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle at 45% 40%, #8ED1E0, #6BBDD1);
  box-shadow: inset 0 2px 6px rgba(0,0,0,.08);
  opacity: .7;
}
.aw-bench {
  position: absolute; width: 30px; height: 10px;
  background: #A0724A; border-radius: 3px;
  box-shadow: 0 2px 4px rgba(0,0,0,.1);
}
.aw-bench::before, .aw-bench::after {
  content: ''; position: absolute; bottom: -6px; width: 4px; height: 6px;
  background: #8B6234; border-radius: 0 0 2px 2px;
}
.aw-bench::before { left: 3px; }
.aw-bench::after { right: 3px; }
.aw-flowers {
  position: absolute; font-size: 10px; letter-spacing: 3px;
  opacity: .7; pointer-events: none;
}
/* 아바타 */
.aw-avatar {
  position: absolute; display: flex; flex-direction: column; align-items: center;
  cursor: pointer; transition: transform .2s;
  z-index: 10;
}
.aw-avatar:hover { transform: scale(1.15); z-index: 20; }
.aw-avatar-body {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #fff;
  border: 2.5px solid #fff;
  box-shadow: 0 3px 10px rgba(0,0,0,.18);
}
.aw-avatar-name {
  margin-top: 2px; font-size: .58rem; font-weight: 700; color: #444;
  background: rgba(255,255,255,.85); padding: 1px 6px; border-radius: 6px;
  white-space: nowrap; max-width: 60px; overflow: hidden; text-overflow: ellipsis;
}
.aw-avatar.online .aw-avatar-body {
  box-shadow: 0 0 0 3px rgba(110,231,183,.5), 0 3px 10px rgba(0,0,0,.18);
}
@keyframes aw-avatar-breathe {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}
.aw-avatar.online .aw-avatar-body {
  animation: aw-avatar-breathe 3s ease-in-out infinite;
}
/* 탭 */
.aw-tab-bar {
  display: flex; gap: 6px; margin-bottom: 14px;
}
.aw-tab {
  flex: 1; padding: 10px 0; border-radius: 12px; border: 1.5px solid #E0E0E0;
  background: #FAFAF8; font-size: .78rem; font-weight: 700; color: #888;
  cursor: pointer; text-align: center; font-family: inherit; transition: all .2s;
}
.aw-tab.active {
  background: #69ADA7; color: #fff; border-color: #69ADA7;
  box-shadow: 0 3px 12px rgba(105,173,167,.35);
}
.aw-online-count {
  display: inline-block; background: #6EE7B7; color: #065F46; font-size: .65rem;
  font-weight: 800; padding: 2px 7px; border-radius: 10px; margin-left: 6px;
}

.situation-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 16px; }
.situation-chip {
  padding: 7px 13px; border-radius: 20px; font-size: .78rem; font-weight: 600;
  background: var(--gray-50); border: 1.5px solid var(--gray-200); cursor: pointer;
  color: var(--gray-600); transition: all .18s; font-family: inherit;
}
.situation-chip:hover { border-color: var(--mint); color: var(--mint-dk); background: var(--mint-lt); }
.situation-chip.selected { border-color: var(--mint); background: var(--mint-lt); color: var(--mint-dk); }
.exam-chip {
  padding: 7px 14px; border-radius: 20px; font-size: .78rem; font-weight: 600;
  border: 2px solid var(--gray-200); background: var(--white); color: var(--gray-600);
  cursor: pointer; font-family: inherit; transition: all .15s;
}
.exam-chip:hover { border-color: var(--mint); color: var(--mint-dk); background: var(--mint-lt); }
.exam-chip.active { border-color: var(--mint); background: var(--mint); color: white; font-weight: 700; }

.fc-progress {
  display: flex; align-items: center; justify-content: space-between;
  font-size: .78rem; color: var(--gray-400); margin-bottom: 12px; gap: 10px;
}
.fc-progress-bar { flex: 1; background: var(--gray-100); border-radius: 99px; height: 6px; }
.fc-progress-fill { height: 6px; border-radius: 99px; background: linear-gradient(90deg, #7C3AED, #A78BFA); transition: width .4s ease; }

.flashcard {
  background: var(--white); border-radius: 18px;
  border: 1px solid var(--gray-200); padding: 24px 22px;
  box-shadow: var(--shadow-md); min-height: 200px;
  display: flex; flex-direction: column; gap: 14px;
  animation: fadeUp .3s ease;
}
.fc-badge { display: inline-flex; align-items: center; gap: 5px; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; padding: 4px 10px; border-radius: 20px; width: fit-content; }
.fc-badge.review { background: #FEE2E2; color: #DC2626; }
.fc-badge.fresh { background: #F5F3FF; color: #7C3AED; }
.fc-badge.error { background: #FEF3C7; color: #92400E; }
.fc-english { font-size: 1.15rem; font-weight: 800; color: var(--navy); line-height: 1.4; }
.fc-word { cursor:pointer; display:inline-block; transition:color .15s; }
.fc-word:hover { color:var(--mint-dk); }
.fc-korean { font-size: .9rem; color: var(--gray-600); font-weight: 500; padding: 9px 13px; background: var(--gray-50); border-radius: 10px; border-left: 3px solid #7C3AED; line-height: 1.6; }
.fc-example { font-size: .83rem; color: var(--gray-800); line-height: 1.7; }
.fc-example .fc-highlight { color: #7C3AED; font-weight: 700; }
.fc-example-ko { font-size: .76rem; color: var(--gray-500); margin-top: 4px; line-height: 1.5; }
.fc-tip { font-size: .78rem; color: var(--gray-600); background: #FFFBEB; border-radius: 8px; padding: 8px 12px; border-left: 3px solid #F59E0B; line-height: 1.6; }

.fc-btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.fc-know-btn {
  background: linear-gradient(135deg,#7C3AED,#5B21B6); color: white; border: none;
  border-radius: 12px; padding: 14px; font-size: .95rem; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: all .2s;
  box-shadow: 0 4px 14px rgba(124,58,237,.35);
}
.fc-know-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(124,58,237,.45); }
.fc-dontknow-btn {
  background: transparent; color: var(--gray-600); border: 2px solid var(--gray-200);
  border-radius: 12px; padding: 14px; font-size: .95rem; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: all .2s;
}
.fc-dontknow-btn:hover { border-color: #E53E3E; color: #E53E3E; }

.vocab-stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.vocab-stat { background: var(--gray-50); border-radius: 12px; padding: 14px; text-align: center; border: 1px solid var(--gray-100); }
.vocab-stat-num { font-size: 1.6rem; font-weight: 900; color: var(--navy); }
.vocab-stat-label { font-size: .72rem; color: var(--gray-400); font-weight: 600; text-transform: uppercase; margin-top: 2px; }

.mastered-list { list-style: none; }
.mastered-item { padding: 10px 12px; border-radius: 10px; margin-bottom: 8px; background: var(--gray-50); border: 1px solid var(--gray-100); }
.mastered-item.still-learning { background: #FFF7ED; border-color: #FDE68A; }
.mastered-en { font-size: .88rem; font-weight: 700; color: var(--navy); }
.mastered-item.still-learning .mastered-en { color: #92400E; }
.mastered-ko { font-size: .75rem; color: var(--gray-400); margin-top: 2px; line-height: 1.4; }

/* ── Vocab Quiz ────────────────────────────────────────────────── */
.quiz-question { font-size:1rem; font-weight:800; color:var(--navy); text-align:center; padding:24px 0 20px; line-height:1.55; }
.quiz-korean { font-size:1.3rem; font-weight:900; color:var(--navy); margin-bottom:6px; }
.quiz-tip { font-size:.78rem; color:var(--gray-400); margin-bottom:20px; }
.quiz-choices { display:flex; flex-direction:column; gap:10px; margin-bottom:16px; }
.quiz-choice {
  padding:14px 18px; border-radius:12px; font-size:.92rem; font-weight:700;
  border:2px solid var(--gray-200); background:var(--white); color:var(--gray-800);
  cursor:pointer; text-align:left; font-family:inherit; transition:all .15s;
  -webkit-tap-highlight-color:transparent; -webkit-user-select:none; user-select:none; -webkit-touch-callout:none;
}
.quiz-choice:focus { outline: none; }
@media (hover: hover) {
  .quiz-choice:hover:not(:disabled) { border-color:var(--mint); background:var(--mint-lt); }
}
.quiz-choice.correct { background:#F0FDF4; border-color:#22C55E; color:#166534; }
.quiz-choice.wrong   { background:#FEF2F2; border-color:#EF4444; color:#991B1B; }
.quiz-choice.reveal  { background:#F0FDF4; border-color:#22C55E; color:#166534; }
.quiz-feedback { text-align:center; font-size:.9rem; font-weight:700; padding:8px 0 12px; min-height:28px; }
.quiz-feedback.ok  { color:#16A34A; }
.quiz-feedback.bad { color:#DC2626; }

.fc-replay-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 1.5px solid var(--gray-200); border-radius: 20px;
  padding: 7px 16px; font-size: .8rem; font-weight: 600; color: var(--gray-500);
  cursor: pointer; font-family: inherit; transition: all .18s; margin-top: 4px;
}
.fc-replay-btn:hover { border-color: #7C3AED; color: #7C3AED; background: #F5F3FF; }
.fc-replay-btn.playing { border-color: #7C3AED; color: #7C3AED; background: #F5F3FF; animation: fc-pulse .8s ease-in-out infinite; }
@keyframes fc-pulse { 0%,100% { opacity:.7; } 50% { opacity:1; } }

.vocab-hist-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--gray-100); font-size: .85rem; }
.vocab-hist-row:last-child { border-bottom: none; }
.vocab-hist-badge { padding: 3px 10px; border-radius: 12px; font-size: .7rem; font-weight: 700; background: #EDE9FE; color: #7C3AED; white-space: nowrap; flex-shrink: 0; }
.vocab-hist-info { flex: 1; min-width: 0; }
.vocab-hist-title { font-weight: 600; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vocab-hist-sub { font-size: .72rem; color: var(--gray-400); margin-top: 1px; }
.vocab-hist-score { font-size: .78rem; font-weight: 700; color: #7C3AED; white-space: nowrap; }

/* ── Intro redesign ─────────────────────────────────────────────── */
.hero-badge {
  display: inline-block;
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 2px; color: var(--mint);
  border: 1.5px solid var(--mint); padding: 5px 14px;
  border-radius: 20px; margin-bottom: 18px;
}
.hero h1 {
  font-size: 2.8rem; font-weight: 900; color: var(--navy);
  line-height: 1.1; margin-bottom: 14px; letter-spacing: -1px;
}
.hero h1 span { color: var(--mint); }
.hero p {
  font-size: .95rem; color: var(--gray-400);
  letter-spacing: .2px; margin: 0 auto;
}
.hero { text-align: center; padding: 44px 24px 32px; }

.settings-gear-btn {
  width: 46px; height: 46px; border-radius: 10px; flex-shrink: 0;
  border: 1.5px solid var(--gray-200); background: var(--gray-50);
  color: var(--gray-400); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.settings-gear-btn:hover, .settings-gear-btn.active {
  border-color: var(--mint); color: var(--mint); background: var(--mint-lt);
}

/* 4-button intro mode grid */
.intro-mode-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; margin-top: 0;
}
.intro-mode-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 5px;
  padding: 18px 18px 16px; border-radius: 14px; border: 1.5px solid transparent;
  cursor: pointer; font-family: inherit;
  background: var(--mint); color: #fff; text-align: left;
  transition: transform .15s ease, box-shadow .15s ease, background .15s, border-color .15s;
  box-shadow: 0 1px 3px rgba(105,173,167,.18);
  min-height: 76px;
}
.intro-mode-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(105,173,167,.28); }
.intro-mode-btn:active { transform: translateY(0); }
.intro-mode-btn.imb-navy { background: var(--navy); box-shadow: 0 1px 3px rgba(27,42,74,.18); }
.intro-mode-btn.imb-navy:hover { box-shadow: 0 4px 14px rgba(27,42,74,.25); }
.intro-mode-btn.imb-vocab { background: #6D28D9; box-shadow: 0 1px 3px rgba(109,40,217,.18); }
.intro-mode-btn.imb-vocab:hover { box-shadow: 0 4px 14px rgba(109,40,217,.28); }
.intro-mode-btn.imb-dash { background: #fff; color: var(--navy); border-color: var(--gray-200); box-shadow: none; }
.intro-mode-btn.imb-dash:hover { border-color: var(--mint); box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.imb-icon { opacity: .9; font-size: 1.4rem; }
.imb-label { font-size: 1.14rem; font-weight: 900; line-height: 1.15; letter-spacing: -.01em; }
.imb-sub { font-size: .82rem; opacity: .85; line-height: 1.3; font-weight: 500; }
@media (max-width: 640px) {
  .intro-mode-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .intro-mode-btn { padding: 14px 14px 12px; border-radius: 12px; min-height: 68px; }
  .imb-label { font-size: 1.04rem; }
  .imb-sub { font-size: .76rem; }
}

/* ══════════════════════════════════════════════════════════════════════ */
/* NEW MAIN SCREEN — Claude Design (2026-07-07)                            */
/* 아이보리 #F7F3EF + 민트 #69ADA7 + 잉크 #333333. 인트로 화면에만 스코프.   */
/* 다른 화면(테스트·대시보드·BYS class 등)은 body.intro-mode 미적용이라 무영향. */
/* ══════════════════════════════════════════════════════════════════════ */
body.intro-mode { background: #F7F3EF; }
body.intro-mode #site-header { display: none; }
body.intro-mode #screen-intro {
  max-width: none; width: 100%; padding: 0; margin: 0; background: #F7F3EF;
  display: flex; flex-direction: column; min-height: 100vh;
}

/* ============================================================== */
/* MOBILE base = App Main (Mobile) [430] exact                    */
/* ============================================================== */
/* -- mint hero -- */
body.intro-mode #screen-intro .hero {
  background: #69ADA7; color: #F7F3EF;
  padding: 56px 24px 36px; text-align: left; border-radius: 0; margin: 0;
  display: flex; flex-direction: column; min-height: 280px; box-sizing: border-box;
}
body.intro-mode #screen-intro .hero-brand { display: flex; align-items: center; gap: 12px; }
body.intro-mode #screen-intro .hero-symbol { display: block; width: 40px; height: 35px; object-fit: contain; margin: 0; }
body:not(.intro-mode) .hero-symbol { display: none !important; }
body.intro-mode #screen-intro .hero-brandtxt {
  display: inline; font-size: 10.5px; font-weight: 600; letter-spacing: 0.22em;
  text-transform: uppercase; color: #F7F3EF;
}
body.intro-mode #screen-intro .hero-avatar,
body.intro-mode #screen-intro .hero-logo,
body.intro-mode #screen-intro .hero-badge { display: none !important; }
body.intro-mode #screen-intro .hero h1 {
  display: block; margin: auto 0 0; font-size: clamp(24px, 7.4vw, 32px);
  font-weight: 600; line-height: 1.16; letter-spacing: -0.02em; color: #F7F3EF;
}
body.intro-mode #screen-intro .hero h1 span { color: #F7F3EF !important; white-space: nowrap; }
body.intro-mode #screen-intro .hero p {
  display: block; margin: 16px 0 0; padding-top: 13px;
  border-top: 1px solid rgba(250,247,239,0.35);
  font-size: 9.5px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase;
  opacity: 0.85; color: #F7F3EF; max-width: none;
}

/* -- content column -- */
body.intro-mode #screen-intro .form-card {
  background: transparent; border: 0; box-shadow: none;
  padding: 24px 24px 40px; display: flex; flex-direction: column; flex: 1;
}
body.intro-mode #screen-intro .dt-avatar-row { display: none !important; }

/* -- login card (name + PIN = one white rounded box) -- */
body.intro-mode #screen-intro .sa-group-top {
  display: flex !important; align-items: center !important; gap: 12px !important;
  border: 1.5px solid #D9D2C2; border-bottom: none;
  border-radius: 14px 14px 0 0; background: #fff;
  padding: 14px 18px; margin: 0 !important;
}
body.intro-mode #screen-intro #pin-row {
  display: flex !important; align-items: center; gap: 12px;
  border: 1.5px solid #D9D2C2; border-top: 1px solid #EAE4D6;
  border-radius: 0 0 14px 14px; background: #fff;
  padding: 14px 18px; margin: 0 !important;
}
body.intro-mode #screen-intro .sa-group-top label span { display: none !important; }
body.intro-mode #screen-intro .sa-group-top .field,
body.intro-mode #screen-intro #pin-row .field {
  flex: 1; min-width: 0; margin: 0 !important;
  display: flex; align-items: center; gap: 12px; position: static;
}
body.intro-mode #screen-intro .sa-group-top label,
body.intro-mode #screen-intro #pin-row label {
  display: inline-block !important; width: 36px; flex: none; margin: 0; font-size: 0; line-height: 1;
}
body.intro-mode #screen-intro .sa-group-top label::before { content: "\C774\B984"; font-size: 12.5px; font-weight: 700; color: #8A8578; }
body.intro-mode #screen-intro #pin-label::before { content: "PIN"; font-size: 12.5px; font-weight: 700; color: #8A8578; }
body.intro-mode #screen-intro .sa-group-top input,
body.intro-mode #screen-intro #pin-row input {
  border: none !important; background: transparent !important; border-radius: 0 !important;
  padding: 0 !important; font-size: 15px !important; font-weight: 600; color: #333333;
  flex: 1; min-width: 0; text-align: left !important; letter-spacing: normal !important;
}
body.intro-mode #screen-intro .sa-group-top input:focus,
body.intro-mode #screen-intro #pin-row input:focus { box-shadow: none !important; }
body.intro-mode #screen-intro .sa-group-top input::placeholder,
body.intro-mode #screen-intro #pin-row input::placeholder { color: #B4AE9F; font-weight: 600; opacity: .8; }
body.intro-mode #screen-intro #pin-status {
  margin: 0 !important; flex: none; font-size: 12px; font-weight: 600; white-space: nowrap;
}
body.intro-mode #screen-intro .pin-status.ok { color: #638679; }
body.intro-mode #screen-intro .pin-status.hint { color: #8A8578; display: none; }
body.intro-mode #screen-intro #welcome-banner { display: none !important; }

/* -- menu = NavRow (big label + mint arrow + hairline) -- */
body.intro-mode #screen-intro .intro-mode-btn {
  display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 16px;
  background: transparent !important; border: 0 !important; border-radius: 0 !important;
  border-bottom: 1px solid #D8E2DC !important; box-shadow: none !important;
  color: #333333; text-align: left; padding: 24px 0; min-height: 0; margin: 0 !important;
}
body.intro-mode #screen-intro .intro-mode-btn:hover {
  transform: none; box-shadow: none !important; background: transparent !important; color: #638679;
}
body.intro-mode #screen-intro .intro-mode-btn:hover .imb-label { color: #638679; }
body.intro-mode #screen-intro .intro-mode-btn::after {
  content: '\2192'; color: #638679; font-size: 18px; font-weight: 400; flex-shrink: 0; margin-left: auto;
}
body.intro-mode #screen-intro .imb-icon,
body.intro-mode #screen-intro .imb-sub { display: none !important; }
body.intro-mode #screen-intro .imb-label {
  font-size: 26px; font-weight: 700; letter-spacing: -0.02em; color: #333333; line-height: 1.15;
}
body.intro-mode #screen-intro #intro-bys-card { margin-top: 16px !important; }
body.intro-mode #screen-intro #intro-diary-card { border-bottom: none !important; }

/* -- CTA (right-aligned outline pill) -- */
body.intro-mode #screen-intro .dt-foot {
  margin-top: auto; padding-top: 24px; display: flex; align-items: center; justify-content: flex-end; gap: 0;
}
body.intro-mode #screen-intro .dt-footnote { display: none !important; }
body.intro-mode #screen-intro #btn-test {
  width: auto !important; display: inline-flex !important; flex-direction: row !important;
  align-items: center; justify-content: center; gap: 12px;
  background: transparent !important; color: #333333 !important;
  border: 1.5px solid #333333 !important; border-radius: 100px !important; box-shadow: none !important;
  padding: 15px 26px !important; margin: 0 !important; min-height: 0;
}
body.intro-mode #screen-intro #btn-test:hover { background: #333333 !important; color: #F7F3EF !important; }
body.intro-mode #screen-intro #btn-test:hover .imb-label { color: #F7F3EF !important; }
body.intro-mode #screen-intro #btn-test::after {
  content: '\2192'; color: currentColor; font-size: 14px; font-weight: 400; flex-shrink: 0; margin: 0;
}
body.intro-mode #screen-intro #btn-test .imb-icon,
body.intro-mode #screen-intro #btn-test .imb-sub { display: none !important; }
body.intro-mode #screen-intro #btn-test .imb-label {
  font-size: 14px; color: #333333; font-weight: 600; letter-spacing: 0;
}
body.intro-mode #screen-intro #bys-tip-card { display: none !important; }

/* ============================================================== */
/* COMPACT = App Main (Compact) [760] exact -- narrow window 431-767 */
/* inset mint card (container padding 0 40) + centered CTA          */
/* ============================================================== */
/* My Own Pace hero photo (2026-10-08) — photo replaces old text hero content.
   2026-10-08 보완: 사진이 여백 없이 패널을 완전히 꽉 채우도록(cover) 변경 — 기존엔 사진이
   max-width/max-height로 안쪽에 작게 들어가 민트색 여백이 남고, 그 위에 별도 "BE YOURSELF
   SPEAKING" 텍스트가 떠서 목업과 달라 보였다(대표님 제보 "전혀 일치하지 않아"). 브랜드 텍스트는
   숨기고, 사진 자체를 패널 전체에 꽉 채운다(.hero의 기존 padding도 이 모드에서는 무시). */
body.intro-mode #screen-intro .hero-brand,
body.intro-mode #screen-intro .hero-symbol,
body.intro-mode #screen-intro .hero-brandtxt { display:none !important; }
body.intro-mode #screen-intro .hero {
  padding: 0 !important; position: relative; overflow: hidden;
}
body.intro-mode #screen-intro .hero-photo {
  display:block; position:absolute; inset:0; width:100% !important; height:100% !important;
  max-width:none !important; max-height:none !important; margin:0; border-radius:0;
  object-fit:cover; object-position:center;
}
body.intro-mode #screen-intro .hero-photo-desktop{ display:none; }
/* 2026-10-08 보완2 — 모바일/태블릿(상단 배너 모드)은 min-height가 사진 실제 비율(430x500)보다
   훨씬 낮아 cover가 위아래를 크게 잘랐다(대표님 제보 "짤리고 있어"). aspect-ratio로 사진 비율
   그대로 박스를 잡아 잘림 없이 전체가 보이게 한다. 데스크탑(100vh 사이드패널)은 기존 그대로 둔다. */
@media (max-width:1023px){
  body.intro-mode #screen-intro .hero{ min-height:0 !important; aspect-ratio:430/500; height:auto; }
}
@media (min-width:1024px){
  body.intro-mode #screen-intro .hero-photo-mobile{ display:none; }
  body.intro-mode #screen-intro .hero-photo-desktop{ display:block; }
  /* 2026-10-08 보완4(대표님 반려 "이렇게 되면 안 돼" — 여백 없이 크롭도 없이) — aspect-ratio로
     세로 여백이 남는 방식 대신, 패널의 "폭"을 뷰포트 "높이" 기준으로 사진 비율(700:774)에 맞춰
     직접 계산한다. 그러면 패널이 100vh를 꽉 채우면서(세로 여백 0) 사진 비율과 항상 정확히
     일치해(object-fit:cover=contain, 크롭 0) 어떤 화면 높이에서도 깨지지 않는다. 50vw 상한은
     아주 좁고 긴 창에서 폼카드가 너무 좁아지는 것만 방지(그 극단적 경우에만 미세크롭 허용). */
  body.intro-mode #screen-intro .hero{
    min-height:0 !important; height:100vh !important;
    flex:0 0 auto !important; width:min(calc(100vh * 700 / 774), 50vw) !important;
  }
}
@media (min-width: 431px) and (max-width: 767px) {
  body.intro-mode #screen-intro { max-width: none; width: 100%; margin: 0; padding: 0; }
  body.intro-mode #screen-intro .hero { padding: 44px 40px 40px; min-height: 0; margin: 0; border-radius: 0; }
  body.intro-mode #screen-intro .hero-brand { gap: 13px; }
  body.intro-mode #screen-intro .hero-symbol { width: 42px; height: 36px; }
  body.intro-mode #screen-intro .hero-brandtxt { font-size: 11.5px; letter-spacing: 0.26em; }
  body.intro-mode #screen-intro .hero h1 { margin: 36px 0 0; font-size: clamp(26px, 6vw, 40px); line-height: 1.18; }
  body.intro-mode #screen-intro .hero p { margin-top: 26px; padding-top: 16px; font-size: 10.5px; letter-spacing: 0.2em; }
  body.intro-mode #screen-intro .form-card { padding: 0 40px 44px; }
  body.intro-mode #screen-intro .sa-group-top { border-radius: 14px 14px 0 0; padding: 16px 24px; gap: 14px !important; margin-top: 40px !important; }
  body.intro-mode #screen-intro #pin-row { border-radius: 0 0 14px 14px; padding: 16px 24px; gap: 14px; }
  body.intro-mode #screen-intro .sa-group-top .field,
  body.intro-mode #screen-intro #pin-row .field { gap: 14px; }
  body.intro-mode #screen-intro .sa-group-top label,
  body.intro-mode #screen-intro #pin-row label { width: 40px; }
  body.intro-mode #screen-intro .sa-group-top label::before,
  body.intro-mode #screen-intro #pin-label::before { font-size: 13px; }
  body.intro-mode #screen-intro .sa-group-top input,
  body.intro-mode #screen-intro #pin-row input { font-size: 16px !important; }
  body.intro-mode #screen-intro #pin-status { font-size: 13px; }
  body.intro-mode #screen-intro #intro-bys-card { margin-top: 40px !important; }
  body.intro-mode #screen-intro .intro-mode-btn { padding: 30px 0; gap: 20px; }
  body.intro-mode #screen-intro .imb-label { font-size: 34px; letter-spacing: -0.025em; }
  body.intro-mode #screen-intro .intro-mode-btn::after { font-size: 20px; }
  body.intro-mode #screen-intro .dt-foot { margin-top: auto; padding-top: 56px; justify-content: center; }
  body.intro-mode #screen-intro #btn-test { padding: 17px 34px !important; gap: 14px; }
  body.intro-mode #screen-intro #btn-test .imb-label { font-size: 15px; }
  body.intro-mode #screen-intro #btn-test::after { font-size: 15px; }
}

/* ============================================================== */
/* TABLET PORTRAIT = App Main (Tablet Portrait) [768] exact       */
/* ============================================================== */
@media (min-width: 768px) and (max-width: 1023px) {
  body.intro-mode #screen-intro { max-width: none; width: 100%; margin: 0; }
  body.intro-mode #screen-intro .hero { padding: 48px 56px 42px; min-height: 320px; }
  body.intro-mode #screen-intro .hero-brand { gap: 14px; }
  body.intro-mode #screen-intro .hero-symbol { width: 44px; height: 38px; }
  body.intro-mode #screen-intro .hero-brandtxt { font-size: 12px; letter-spacing: 0.26em; }
  body.intro-mode #screen-intro .hero h1 { font-size: clamp(34px, 6vw, 48px); }
  body.intro-mode #screen-intro .hero p { margin-top: 22px; padding-top: 16px; font-size: 11px; letter-spacing: 0.2em; }
  body.intro-mode #screen-intro .form-card { max-width: 600px; margin: 0 auto; width: 100%; padding: 44px 56px 48px; }
  body.intro-mode #screen-intro .sa-group-top { border-radius: 16px 16px 0 0; padding: 17px 24px; gap: 14px !important; }
  body.intro-mode #screen-intro #pin-row { border-radius: 0 0 16px 16px; padding: 17px 24px; gap: 14px; }
  body.intro-mode #screen-intro .sa-group-top .field,
  body.intro-mode #screen-intro #pin-row .field { gap: 14px; }
  body.intro-mode #screen-intro .sa-group-top label,
  body.intro-mode #screen-intro #pin-row label { width: 44px; }
  body.intro-mode #screen-intro .sa-group-top label::before,
  body.intro-mode #screen-intro #pin-label::before { font-size: 13px; }
  body.intro-mode #screen-intro .sa-group-top input,
  body.intro-mode #screen-intro #pin-row input { font-size: 16px !important; }
  body.intro-mode #screen-intro #pin-status { font-size: 13px; }
  body.intro-mode #screen-intro #intro-bys-card { margin-top: 40px !important; }
  body.intro-mode #screen-intro .intro-mode-btn { padding: 32px 0; gap: 22px; }
  body.intro-mode #screen-intro .imb-label { font-size: 38px; letter-spacing: -0.025em; }
  body.intro-mode #screen-intro .intro-mode-btn::after { font-size: 21px; }
  body.intro-mode #screen-intro .dt-foot { padding-top: 36px; }
  body.intro-mode #screen-intro #btn-test { padding: 16px 30px !important; gap: 14px; }
  body.intro-mode #screen-intro #btn-test .imb-label { font-size: 15px; }
  body.intro-mode #screen-intro #btn-test::after { font-size: 15px; }
}

/* ============================================================== */
/* TABLET LANDSCAPE = App Main (Tablet) [1024] exact             */
/* left mint 40% / right content                                 */
/* ============================================================== */
@media (min-width: 1024px) and (max-width: 1365px) {
  body.intro-mode { background: #F7F3EF; }
  body.intro-mode #screen-intro { max-width: none; width: 100%; padding: 0; margin: 0; display: flex; flex-direction: row; align-items: stretch; min-height: 100vh; }
  body.intro-mode #screen-intro .hero { flex: 0 0 40%; min-height: 100vh; padding: 44px 40px; margin: 0; }
  body.intro-mode #screen-intro .hero-brand { gap: 12px; }
  body.intro-mode #screen-intro .hero-symbol { width: 40px; height: 35px; }
  body.intro-mode #screen-intro .hero-brandtxt { font-size: 11px; letter-spacing: 0.24em; }
  body.intro-mode #screen-intro .hero h1 { font-size: clamp(20px, 3.4vw, 36px); }
  body.intro-mode #screen-intro .hero p { margin-top: 20px; padding-top: 16px; font-size: 10.5px; letter-spacing: 0.18em; }
  body.intro-mode #screen-intro .form-card { flex: 1; max-width: 520px; margin: 0 auto; width: 100%; min-height: 100vh; padding: 40px 48px; justify-content: flex-start; }
  body.intro-mode #screen-intro .sa-group-top { border-radius: 14px 14px 0 0; padding: 15px 22px; gap: 14px !important; margin-top: 16px !important; }
  body.intro-mode #screen-intro #pin-row { border-radius: 0 0 14px 14px; padding: 15px 22px; gap: 14px; }
  body.intro-mode #screen-intro .sa-group-top .field,
  body.intro-mode #screen-intro #pin-row .field { gap: 14px; }
  body.intro-mode #screen-intro .sa-group-top label,
  body.intro-mode #screen-intro #pin-row label { width: 40px; }
  body.intro-mode #screen-intro .sa-group-top label::before,
  body.intro-mode #screen-intro #pin-label::before { font-size: 13px; }
  body.intro-mode #screen-intro .sa-group-top input,
  body.intro-mode #screen-intro #pin-row input { font-size: 15px !important; }
  body.intro-mode #screen-intro #pin-status { font-size: 12.5px; }
  body.intro-mode #screen-intro #intro-bys-card { margin-top: 36px !important; }
  body.intro-mode #screen-intro .intro-mode-btn { padding: 26px 0; gap: 18px; }
  body.intro-mode #screen-intro .imb-label { font-size: 32px; letter-spacing: -0.025em; }
  body.intro-mode #screen-intro .intro-mode-btn::after { font-size: 19px; }
  body.intro-mode #screen-intro .dt-foot { margin-top: auto; padding-top: 32px; }
  body.intro-mode #screen-intro #btn-test { padding: 15px 28px !important; gap: 13px; }
  body.intro-mode #screen-intro #btn-test .imb-label { font-size: 14px; }
  body.intro-mode #screen-intro #btn-test::after { font-size: 14px; }
}

/* ============================================================== */
/* DESKTOP = App Main (Desktop) [1440] exact                     */
/* left mint 42% / right content                                 */
/* ============================================================== */
@media (min-width: 1366px) {
  body.intro-mode { background: #F7F3EF; }
  body.intro-mode #screen-intro { max-width: none; width: 100%; padding: 0; margin: 0; display: flex; flex-direction: row; align-items: stretch; min-height: 100vh; }
  body.intro-mode #screen-intro .hero { flex: 0 0 42%; min-height: 100vh; padding: 60px 64px; margin: 0; }
  body.intro-mode #screen-intro .hero-brand { gap: 16px; }
  body.intro-mode #screen-intro .hero-symbol { width: 48px; height: 42px; }
  body.intro-mode #screen-intro .hero-brandtxt { font-size: 13px; letter-spacing: 0.28em; }
  body.intro-mode #screen-intro .hero h1 { font-size: clamp(24px, 3.3vw, 52px); }
  body.intro-mode #screen-intro .hero p { margin-top: 28px; padding-top: 20px; font-size: 13px; letter-spacing: 0.2em; }
  body.intro-mode #screen-intro .form-card { flex: 1; max-width: 640px; margin: 0 auto; width: 100%; min-height: 100vh; padding: 72px 88px 64px; justify-content: flex-start; }
  body.intro-mode #screen-intro .sa-group-top { border-radius: 16px 16px 0 0; padding: 18px 26px; gap: 16px !important; margin-top: 56px !important; }
  body.intro-mode #screen-intro #pin-row { border-radius: 0 0 16px 16px; padding: 18px 26px; gap: 16px; }
  body.intro-mode #screen-intro .sa-group-top .field,
  body.intro-mode #screen-intro #pin-row .field { gap: 16px; }
  body.intro-mode #screen-intro .sa-group-top label,
  body.intro-mode #screen-intro #pin-row label { width: 44px; }
  body.intro-mode #screen-intro .sa-group-top label::before,
  body.intro-mode #screen-intro #pin-label::before { font-size: 14px; }
  body.intro-mode #screen-intro .sa-group-top input,
  body.intro-mode #screen-intro #pin-row input { font-size: 17px !important; }
  body.intro-mode #screen-intro #pin-status { font-size: 14px; }
  body.intro-mode #screen-intro #intro-bys-card { margin-top: 64px !important; }
  body.intro-mode #screen-intro .intro-mode-btn { padding: 34px 0; gap: 22px; }
  body.intro-mode #screen-intro .imb-label { font-size: 42px; letter-spacing: -0.025em; }
  body.intro-mode #screen-intro .intro-mode-btn::after { font-size: 22px; }
  body.intro-mode #screen-intro .dt-foot { margin-top: auto; padding-top: 48px; }
  body.intro-mode #screen-intro #btn-test { padding: 18px 34px !important; gap: 16px; }
  body.intro-mode #screen-intro #btn-test .imb-label { font-size: 16px; }
  body.intro-mode #screen-intro #btn-test::after { font-size: 16px; }
}

/* 🎯 2026-10-13(대표님 지시 "영역별 정밀 테스트가 밑으로 잘려… 스크롤 없이 한 화면에") — 데스크탑 홈의
   세로 리듬을 화면 높이(vh) 비례로 압축. '나의 PACE' 카드가 들어오며 100vh를 넘겨 버튼이 잘리고 스크롤이
   생겼다. clamp 최대값 = 기존 고정값이라 키 큰 화면은 기존 느낌 그대로, 낮아질수록 같이 줄어든다.
   하한이 있어 아주 낮은 창에서는 예전처럼 스크롤로 폴백(내용이 잘려 못 누르는 일은 없음). */
@media (min-width: 1024px) {
  body.intro-mode #screen-intro .form-card { padding-top: clamp(16px, 4.4vh, 72px); padding-bottom: clamp(14px, 3.2vh, 64px); }
  body.intro-mode #screen-intro .sa-group-top { margin-top: clamp(8px, 3.2vh, 56px) !important; }
  body.intro-mode #screen-intro #intro-bys-card { margin-top: clamp(14px, 4.2vh, 64px) !important; }
  body.intro-mode #screen-intro .intro-mode-btn { padding-top: clamp(10px, 3vh, 34px); padding-bottom: clamp(10px, 3vh, 34px); }
  body.intro-mode #screen-intro .imb-label { font-size: clamp(26px, 4.4vh, 42px); }
  body.intro-mode #screen-intro .dt-foot { padding-top: clamp(12px, 3.2vh, 48px); }
  body.intro-mode #screen-intro #btn-test { padding-top: clamp(12px, 1.9vh, 18px) !important; padding-bottom: clamp(12px, 1.9vh, 18px) !important; }
}
@media (min-width: 1024px) and (max-width: 1365px) {
  body.intro-mode #screen-intro .form-card { padding-top: clamp(16px, 3.6vh, 40px); padding-bottom: clamp(14px, 3vh, 40px); }
  body.intro-mode #screen-intro .sa-group-top { margin-top: clamp(8px, 1.8vh, 16px) !important; }
  body.intro-mode #screen-intro #intro-bys-card { margin-top: clamp(14px, 3.6vh, 36px) !important; }
  body.intro-mode #screen-intro .intro-mode-btn { padding-top: clamp(10px, 2.6vh, 26px); padding-bottom: clamp(10px, 2.6vh, 26px); }
  body.intro-mode #screen-intro .imb-label { font-size: clamp(24px, 3.6vh, 32px); }
  body.intro-mode #screen-intro .dt-foot { padding-top: clamp(12px, 2.8vh, 32px); }
  body.intro-mode #screen-intro #btn-test { padding-top: clamp(12px, 1.7vh, 15px) !important; padding-bottom: clamp(12px, 1.7vh, 15px) !important; }
}

/* -- non-intro desktop rules (other screens) -- */
/* 🐛 fix(2026-09-24, 대표님 제보) — 배경색 규칙만 900px 게이트 안에 있어서, .screen(max-width:760px,
   #screen-bys-day 등에서 항상 크림 배경)이 먼저 좁아지는 761~899px 구간엔 body 흰 배경이 그대로
   드러나 좌우에 흰 여백처럼 보였다(900px를 넘는 순간 body도 크림이 되어 착시처럼 "사라짐").
   .screen 쪽엔 폭 제한 없이 늘 크림이 걸려있으므로 body 배경도 게이트 없이 맞춘다. */
body.nd-user[data-screen^="screen-bys-"] { background: #F7F3EF; }
@media (min-width: 900px) {
  body.nd-user #screen-bys-level-menu { max-width: 1000px; }
  body.nd-user[data-screen] #screen-bys-level-menu .bys-level-grid { grid-template-columns: repeat(4, 1fr) !important; }
}

/* ══════════════════════════════════════════════════════════════════════ */
/* 다음 페이지(BYS Class 레슨) — Claude Design 아이보리/민트 스타일          */
/* body.nd-user(=다니엘) 전용. 다른 학생·다른 화면 무영향.                   */
/* ══════════════════════════════════════════════════════════════════════ */
/* 헤더 — 레슨 화면에서 민트 */
body.nd-user[data-screen^="screen-bys-"] #site-header { background: #69ADA7; box-shadow: 0 1px 0 rgba(0,0,0,.04); }
body.nd-user[data-screen^="screen-bys-"] #site-header .logo-eng { display: none; }
body.nd-user[data-screen^="screen-bys-"] #site-header .logo-main { white-space: nowrap; }

/* ── 헤더 우측 원형 이모지 버튼 (2026-07-16 대표님 지시) ──────────────
   [💌 건의·대표에게]  [📖 단어장]  — 둘 다 같은 크기의 투명 원. 한글 라벨 없음.
   솔리드 채움 없이 이모지만 떠 있게 해서 헤더를 조용하게 유지한다. */
/* 2026-10-09 — 헤더 아이콘(건의/단어장/훈련매니징 등)이 조건부로 늘어나면서, 왼쪽(뒤로가기+로고+
   Beta배지)이 안 줄어들고 그대로 오른쪽 아이콘과 겹쳤다(대표님 제보, 좁은 화면). 왼쪽 그룹은 공간이
   부족하면 줄어들며 말줄임표로 잘리게(겹침 자체가 구조적으로 불가능하게), 아이콘 그룹은 항상 제
   크기 그대로 유지되게 분리한다. */
#site-header > div:first-child { flex: 1 1 auto; min-width: 0; overflow: hidden; }
#site-header .logo { min-width: 0; overflow: hidden; }
#site-header .logo-main { overflow: hidden; text-overflow: ellipsis; }
#hdr-circle-wrap { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.hdr-circle-btn {
  width: 34px; height: 34px; flex: 0 0 34px;
  border-radius: 50%; padding: 0; border: 1px solid rgba(255,255,255,.4);
  background: transparent; cursor: pointer; font-family: inherit;
  color: rgba(255,255,255,.95);   /* 선 아이콘이 currentColor로 흰 선이 되도록 */
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px; line-height: 1; transition: transform .12s, background .12s;
}
.hdr-circle-btn:active { transform: scale(.92); }
.hdr-circle-btn:hover { background: rgba(255,255,255,.18); }
/* 새 답장 알림 점 */
.hdr-circle-btn .hdr-dot {
  position: absolute; transform: translate(13px,-11px);
  width: 8px; height: 8px; border-radius: 50%; background: #E9645B;
  border: 1.5px solid #69ADA7; display: none;
}
.hdr-circle-btn.has-new .hdr-dot { display: block; }
/* 페이지 배경 아이보리 */
body.nd-user #screen-bys-day,
body.nd-user #screen-bys-level-menu,
body.nd-user #screen-bys-book-menu,
body.nd-user #screen-bys-list { background: #F7F3EF; }
/* 탭 = 필(pill), 활성 민트 */
body.nd-user #bys-tab-bar { gap: 8px; padding-bottom: 4px; }
body.nd-user #bys-tab-bar .smec-tab {
  flex: 0 1 auto; padding: 9px 18px; border-radius: 100px;
  border: 1.5px solid #D9D2C2; background: transparent; color: #8A8578;
  font-weight: 600;
}
body.nd-user #bys-tab-bar .smec-tab.active {
  background: #69ADA7; color: #F7F3EF; border-color: #69ADA7; box-shadow: none;
}
/* LESSON 라벨 · 레벨 배지 → accent-deep */
body.nd-user #screen-bys-day .bys-lesson-eyebrow,
body.nd-user #screen-bys-day .bys-lesson-eyebrow span,
body.nd-user #screen-bys-day .bys-lesson-level { color: #638679 !important; }
/* 문장 카드 — Claude Design 15-learning-lesson.html 정확 이식 (이모지 없는 클린 레이아웃) */
body.nd-user #screen-bys-day .bys-sentence { background: #fff; border: 1.5px solid #EAE4D6; border-radius: 20px; padding: 20px 15px; gap: 10px; }
/* .ll-num: 30px 원, bg-dim, hairline, accent-deep */
body.nd-user #screen-bys-day .bys-s-num { width: 30px; height: 30px; border-radius: 50%; background: #F3EFE5; color: #638679; border: 1.5px solid #EAE4D6; font-weight: 700; }
/* .ll-ko: 18px/700 */
body.nd-user #screen-bys-day .bys-s-ko { color: #333333; font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
/* .ll-lit: '직역' 라벨 + 취소선 (❌ 제거) */
body.nd-user #screen-bys-day .bys-s-hard { font-size: 13.5px; color: #8A8578; text-decoration: none; margin: 8px 0 0; }
body.nd-user #screen-bys-day .bys-s-lit-lbl { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: #B8B2A2; text-transform: uppercase; margin-right: 8px; }
body.nd-user #screen-bys-day .bys-s-lit-tx { text-decoration: none; }
/* 직역 — 취소선 제거(가독성). '직역' 라벨+회색으로 참고용 구분 (2026-07-18 천은지B 건의) */
.bys-s-hard { font-size: 13.5px; color: #8A8578; margin: 8px 0 0; }
.bys-s-lit-lbl { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: #B8B2A2; text-transform: uppercase; margin-right: 8px; }
.bys-s-lit-tx { text-decoration: none; }
/* .ll-en: 민트 좌측바 칩 (✅ 제거) */
body.nd-user #screen-bys-day .bys-s-en { background: rgba(105,173,167,.08); border-top: none; border-left: 3px solid #69ADA7; border-radius: 0 12px 12px 0; padding: 13px 12px 13px 14px; margin: 14px 0 0; }
body.nd-user #screen-bys-day .bys-s-en-text { color: #333333; font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
/* .ll-ex: bg-dim 칩 */
body.nd-user #screen-bys-day .bys-s-ex { background: #F3EFE5; border-left: none; border-radius: 12px; }
body.nd-user #screen-bys-day .bys-s-ex-en { color: #333333; }
body.nd-user #screen-bys-day .bys-s-ex-ko { color: #8A8578; }
/* 음성/저장 버튼 */
body.nd-user #screen-bys-day .bys-s-speak { background: #fff; border-color: #D9D2C2; color: #638679; }
body.nd-user #screen-bys-day .bys-s-speak:hover { background: #EDF6F4; color: #638679; }
body.nd-user #screen-bys-day .bys-s-speak.playing { background: #69ADA7; color: #fff; border-color: #69ADA7; }
/* 교재 전체 연속 재생 = 아웃라인 필 */
body.nd-user #screen-bys-day .bys-playall-btn {
  border: 1.5px solid #333333 !important; border-radius: 100px !important;
  color: #333333 !important; padding: 12px 22px !important; background: transparent !important;
}
body.nd-user #screen-bys-day .bys-playall-btn svg { fill: #333333; }

/* ── 레벨 선택 — student/17-level-select.html HTML 정확 이식 ──── */
/* .lb-main hero: 박스 없이 평문 (eyebrow + title + desc) */
body.nd-user #screen-bys-level-menu .bys-lv-cover { background: transparent !important; border: none !important; box-shadow: none !important; padding: 0 !important; margin-bottom: 0; }
body.nd-user #screen-bys-level-menu .bys-lv-cover .smec-cover-eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #638679; }
body.nd-user #screen-bys-level-menu .bys-lv-cover .smec-cover-title { font-size: 32px; font-weight: 700; letter-spacing: -.02em; margin: 10px 0 0; color: #333333; }
/* .lb-grid: 4열(PC) / 앱 모바일은 2열 유지, gap 14 */
body.nd-user #screen-bys-level-menu .bys-level-grid { grid-template-columns: 1fr 1fr !important; gap: 14px !important; }
/* .lb-box: 흰 카드, column, gap 20, padding 22 22 20, radius 18, 1.5px hairline */
body.nd-user #screen-bys-level-menu .bys-level-card {
  position: relative; flex-direction: column !important; align-items: stretch !important; justify-content: flex-start !important;
  gap: 20px; padding: 22px 22px 20px; background: #fff !important; border: 1.5px solid #EAE4D6 !important; border-radius: 18px; min-height: 0;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
/* hover → 박스 전체 민트 채움 (대표님 요청 2026-07-08) */
body.nd-user #screen-bys-level-menu .bys-level-card:hover:not(.disabled) {
  background: #69ADA7 !important; border-color: #69ADA7 !important;
}
body.nd-user #screen-bys-level-menu .bys-level-card:hover:not(.disabled) .bys-level-lv { color: rgba(250,247,239,.75); }
body.nd-user #screen-bys-level-menu .bys-level-card:hover:not(.disabled) .bys-level-num,
body.nd-user #screen-bys-level-menu .bys-level-card:hover:not(.disabled) .bys-level-num small { color: #F7F3EF !important; }
/* .lb-box .lv "Level" eyebrow: 11px/700 ls .14em uppercase #B8B2A2 */
body.nd-user #screen-bys-level-menu .bys-level-lv { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #B8B2A2; text-align: left; }
/* .lb-box .row */
body.nd-user #screen-bys-level-menu .bys-level-row { display: flex; align-items: baseline; justify-content: space-between; }
/* .lb-box .n: 30px/600 ls -0.03em tabular */
body.nd-user #screen-bys-level-menu .bys-level-num { font-size: 30px !important; font-weight: 600 !important; letter-spacing: -.03em !important; font-variant-numeric: tabular-nums; color: #6B6458 !important; line-height: 1; }
body.nd-user #screen-bys-level-menu .bys-level-num small { font-size: 30px; font-weight: 600; margin-left: 1px; }
/* .lb-box .arr: 17px accent-deep, hover 시 노출 */
body.nd-user #screen-bys-level-menu .bys-level-arr { font-size: 17px; color: #638679; opacity: 0; transition: opacity .15s ease; }
body.nd-user #screen-bys-level-menu .bys-level-card:hover:not(.disabled) .bys-level-arr { opacity: 1; color: #F7F3EF; }
/* (My Level 별도 표시 제거 — 대표님 요청 2026-07-08. 현재 레벨 강조·배지 없음) */
/* .lb-eyebrow (BYS English Class): 12.5px/700 accent-deep ls .16em uppercase */
body.nd-user #screen-bys-level-menu .bys-menu-group-label { color: #638679; font-size: 12.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
/* disabled 카드 */
body.nd-user #screen-bys-level-menu .bys-level-card.disabled { background: #F7F5EF !important; border-color: #EFEBE0 !important; opacity: .55; }
body.nd-user #screen-bys-level-menu .bys-level-card.disabled .bys-level-num { color: #C4C4C0 !important; }

/* ── 코스 선택(04) — 흰 카드, 배지, 시작 필 ────────────────── */
body.nd-user #screen-bys-book-menu .bys-book-card { background: #fff !important; border: 1.5px solid #EAE4D6 !important; border-radius: 18px; }
body.nd-user #screen-bys-book-menu .bys-book-icon { background: #F3EFE5 !important; color: #638679 !important; border: 1.5px solid #EAE4D6; border-radius: 14px; }
body.nd-user #screen-bys-book-menu .bys-book-title { color: #333333; }
body.nd-user #screen-bys-book-menu .bys-book-optlabel { color: #8A8578; }
body.nd-user #screen-bys-book-menu .bys-book-status { background: #fff; border: 1.5px solid #9FCFC7; color: #638679; }
body.nd-user #screen-bys-book-menu .bys-book-status.ready { background: rgba(105,173,167,.14); color: #638679; }
/* 🎯 2026-10-14(대표님 지시 "영어 교재와 생각수업 배지 색을 다르게 — 시그니처 색으로 클릭·브랜딩 강화")
   영어 교재(ST·CT·ET) = 브랜드 민트 / 생각수업(TC) = 골드. 반 배정 교재 카드는 템플릿이 붙이는 .bk-en/.bk-tc,
   레벨 기본 카드는 TC 가 아닌 배지(.tc·.bk-tc 제외) 전체를 영어 교재로 보고 민트로 맞춘다.
   TC 기본 카드의 레벨별 색(tc-life/brand/mind)은 그대로 둔다. */
body.nd-user #screen-bys-book-menu .bys-book-icon:not(.tc):not(.bk-tc) { background: #69ADA7 !important; color: #fff !important; border: 1.5px solid #69ADA7 !important; }
body.nd-user #screen-bys-book-menu .bys-book-card.bk-tc { background: #FBF5E3 !important; border: 1.5px solid #E6D08F !important; }
body.nd-user #screen-bys-book-menu .bys-book-card.bk-tc .bys-book-icon { background: #CBA85A !important; color: #fff !important; border: 1.5px solid #CBA85A !important; }
body.nd-user #screen-bys-book-menu .bys-book-card.bk-tc .bys-book-status.ready { background: rgba(203,168,90,.22); border-color: #E6D08F; color: #8A6A22; }

/* ── Day 목록(05) — 흰 카드, 민트 번호, 상태 필 ─────────────── */
body.nd-user #screen-bys-list .smec-card { background: #fff !important; border: 1.5px solid #EAE4D6 !important; }
body.nd-user #screen-bys-list .smec-card-num { background: #F3EFE5; color: #638679; border: 1.5px solid #EAE4D6; }
body.nd-user #screen-bys-list .smec-card:has(.smec-card-status.done) .smec-card-num { background: #69ADA7; color: #fff; border-color: #69ADA7; }
body.nd-user #screen-bys-list .smec-card-meta { color: #638679; }
body.nd-user #screen-bys-list .smec-card-title { color: #333333; }
body.nd-user #screen-bys-list .smec-card-status { background: #fff; border: 1.5px solid #D9D2C2; color: #8A8578; }
body.nd-user #screen-bys-list .smec-card-status.done { background: rgba(105,173,167,.14); color: #638679; border-color: transparent; }
body.nd-user #screen-bys-list .smec-card-status.partial { background: #FBF3E4; color: #9A7B3A; border-color: transparent; }
/* Day 진도바 — 카드 박스 전체를 100%로 보고 민트가 왼쪽부터 차오름 (2026-07-15 대표님) */
#screen-bys-list .smec-card.bys-prog { position: relative; overflow: hidden; }
#screen-bys-list .smec-card.bys-prog > .bys-day-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0; z-index: 0; pointer-events: none;
  /* 평면 단색 대신: 위쪽 빛 반사 + 진행 방향으로 깊어지는 민트 → 액체가 차오르는 느낌 */
  background:
    linear-gradient(180deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,.10) 38%, rgba(255,255,255,0) 62%),
    linear-gradient(90deg, rgba(105,173,167,.09) 0%, rgba(105,173,167,.15) 55%, rgba(105,173,167,.22) 100%);
  /* 선단 = 얇은 밝은 선 + 앞으로 번지는 부드러운 빛 */
  box-shadow: inset -1.5px 0 0 rgba(105,173,167,.5), 5px 0 14px -3px rgba(105,173,167,.22);
  transition: width .55s cubic-bezier(.25,.1,.25,1);
}
#screen-bys-list .smec-card.bys-prog > .bys-day-fill.full {
  background:
    linear-gradient(180deg, rgba(255,255,255,.5) 0%, rgba(255,255,255,.08) 42%, rgba(255,255,255,0) 66%),
    linear-gradient(90deg, rgba(105,173,167,.15) 0%, rgba(105,173,167,.24) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55);   /* 선단 글로우 제거 — 다 찼으니 잔잔하게 */
}
@media (prefers-reduced-motion: reduce){
  #screen-bys-list .smec-card.bys-prog > .bys-day-fill { transition: none; }
}
/* 진행률 배지는 민트 톤으로 — 바와 같은 색 언어 */
#screen-bys-list .smec-card.bys-prog > .smec-card-status.partial { background: #fff; color: #638679; border: 1.5px solid rgba(105,173,167,.42); font-variant-numeric: tabular-nums; }
#screen-bys-list .smec-card.bys-prog > .smec-card-num,
#screen-bys-list .smec-card.bys-prog > .smec-card-body,
#screen-bys-list .smec-card.bys-prog > .smec-card-status { position: relative; z-index: 1; }

/* ── Training(06/07) 마이크 · Facing(08) 버블·마이크 → 민트 통일 ── */
body.nd-user #screen-bys-day .smec-drill-mic-btn { background: #69ADA7; box-shadow: 0 8px 24px rgba(105,173,167,.28); }
body.nd-user #screen-bys-day .smec-conv-mic-btn { background: #69ADA7; }
body.nd-user #screen-bys-day .smec-conv-bubble.ai { background: #fff; border: 1.5px solid #EAE4D6; color: #333333; }
body.nd-user #screen-bys-day .smec-conv-bubble.you { background: #69ADA7; color: #F7F3EF; }
body.nd-user #screen-bys-day .bys-st3-pattern-name { color: #638679; }
/* 하단 액션 버튼 통일 — primary(트레이닝 시작·다음 탭으로·다시 도전 등) = 민트 솔리드 필, secondary = 아웃라인. (교재 전체 연속 재생 = bys-playall-btn 아웃라인, 위 정의) */
body.nd-user #screen-bys-day .smec-drill-btn-primary { background: #69ADA7 !important; color: #fff !important; }
body.nd-user #screen-bys-day .smec-drill-btn-primary:hover { background: #638679 !important; }
body.nd-user #screen-bys-day .smec-drill-btn-secondary { background: transparent !important; border: 1.5px solid #D9D2C2 !important; color: #52524A !important; }
body.nd-user #screen-bys-day .smec-drill-btn-secondary:hover { border-color: #69ADA7 !important; color: #638679 !important; }

/* 일반 학생(비관리자) 테스트 전용 모드 — 영역별 분석 테스트 버튼만 노출, 나머지 기능·레벨 숨김.
   관리자(?admin=<token>) 진입 시에는 body.test-only-mode 미적용으로 전체 표시. */
body.test-only-mode #btn-train,
body.test-only-mode #dashboard-link-btn,
body.test-only-mode #btn-community,
body.test-only-mode #intro-grammar-card,
body.test-only-mode #intro-smec-card,
body.test-only-mode #intro-bys-card,
body.test-only-mode #bys-tip-card,
body.test-only-mode #intro-onboarding-btn,
body.test-only-mode #intro-shadowing-card,
body.test-only-mode #intro-diary-card,
body.test-only-mode #wb-level { display: none !important; }
/* 테스트 버튼이 그리드에서 홀로 남을 때 한 줄 전체 차지 */
body.test-only-mode #btn-test { grid-column: 1 / -1; }
/* 전 사용자 숨김: 대시보드·BYS Speaking Grammar·BYS Community·Word Training·SMEC·영역별 분석 테스트. (2026-07-08: SMEC·btn-test 추가 — 메인 메뉴에서 제거) 되돌리려면 이 규칙 제거 + showScreen의 _HIDDEN_FEATURE_SCREENS 제거. */
#dashboard-link-btn, #btn-community, #btn-train, #intro-grammar-card, #intro-smec-card { display: none !important; }   /* 2026-07-10: #btn-test 재오픈(영역별 분석 테스트 메인 메뉴 복귀) */
/* 영역별 분석 테스트 CTA 래퍼 — 2026-07-10 재오픈 (메인 메뉴 복귀) */

/* == short-viewport compaction (vertical layouts only) == */
@media (min-width:700px) and (max-width:1023px) and (max-height:820px){
  body.intro-mode #screen-intro .hero{ min-height:0 !important; padding-top:30px !important; padding-bottom:26px !important; }
  body.intro-mode #screen-intro .hero h1{ margin-top:10px !important; }
  body.intro-mode #screen-intro .form-card{ padding-top:26px !important; padding-bottom:26px !important; }
  body.intro-mode #screen-intro .intro-mode-btn{ padding:22px 0 !important; }
  body.intro-mode #screen-intro #intro-bys-card{ margin-top:24px !important; }
}
@media (min-width:700px) and (max-width:1023px) and (max-height:680px){
  body.intro-mode #screen-intro .hero{ padding-top:20px !important; padding-bottom:18px !important; }
  body.intro-mode #screen-intro .intro-mode-btn{ padding:16px 0 !important; }
  body.intro-mode #screen-intro .imb-label{ font-size:30px !important; }
}
/* Words(단어훈련) = 메인에서 완전 제거 (2026-07-08, 다니엘 포함 전원 숨김 — 위 전체 숨김 규칙 #btn-train로 처리). Diary는 전체 멤버 오픈(_applyNameChangeUI). */
/* 특정 예비/추가 선생님: test-only여도 쉐도잉·BYS Class 카드만 노출 (2026-07-05) */
body.test-only-mode.class-shadow-only #intro-shadowing-card,
body.test-only-mode.class-shadow-only #intro-bys-card { display: flex !important; }

/* Dashboard stats + stamp row — grid container로 두 영역 동일 높이 강제 */
.dash-stats-stamp-row {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 14px; margin-bottom: 14px;
  align-items: stretch !important;
}
.dash-stats-stamp-row > * { min-width: 0; height: 100%; overflow: hidden; }
/* stamp 카드 안 캘린더가 카드 높이 채움 (빈공간 없이) */
.dash-stamp-card .stamp-cal-wrap { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }

/* Responsive */
@media (max-width: 520px) {
  .dash-stats-stamp-row { gap: 6px !important; }
  .dash-stats-stamp-row #dash-stats { grid-template-columns: 1fr 1fr !important; grid-template-rows: auto auto !important; gap: 6px !important; }
  .dash-stat-card { padding: 8px 4px !important; }
  .dash-stat-val { font-size: 1.3rem !important; font-weight: 900 !important; }
  .dash-stat-label { font-size: .62rem !important; font-weight: 700 !important; }
  .dash-stat-sub { font-size: .56rem !important; font-weight: 700 !important; }
  .dash-stamp-card { padding: 10px 6px !important; overflow: hidden !important; box-sizing: border-box; }
  .dash-stamp-card .stamp-cal-wrap { width: 100%; max-width: 100%; margin: 0; box-sizing: border-box; }
  .dash-stamp-card .stamp-cal-grid { gap: 1px; }
  .dash-stamp-card .stamp-cal-nav button { width: 26px; height: 26px; font-size: .8rem; }
  .dash-stamp-card .stamp-cal-day .stamp-icon { font-size: .66rem; }
  .dash-stamp-card .stamp-cal-day { font-size: .7rem; font-weight: 700 !important; }
  .dash-stamp-card .stamp-cal-dow { font-size: .66rem; }
  .dash-stamp-card .stamp-cal-month { font-size: .9rem; }
  .dash-stamp-card .card-title { font-size: .7rem !important; }
  .hero h1 { font-size: 2rem; }
  .scores-grid { grid-template-columns: 1fr; }
  #site-header { padding: 0 20px; }
  .screen { padding: 24px 16px calc(40px + env(safe-area-inset-bottom, 0px)); }
  .form-card { padding: 22px 18px; }
  .field-row { grid-template-columns: 1fr; }
  .dash-charts-grid { grid-template-columns: 1fr !important; }
  .intro-mode-grid { grid-template-columns: 1fr; }

  /* Mobile: mic centered, chat not hidden */
  .mic-row { flex-direction: column; align-items: center; gap: 10px; }
  .mic-meta { align-items: center; text-align: center; }
  #input-mic-section { padding: 12px 16px 0; }
  #chat-wrap { padding-bottom: 8px; }
  #rerecord-btn { order: 1; }

  /* Mobile chat mode: compact header elements */
  body.chat-mode #sophie-bar { display: none !important; }
  body.chat-mode #ctrl-bar { padding: 6px 16px; position: relative; }
  body.chat-mode #turn-bar { padding: 8px 16px 0; }
  body.chat-mode #site-header { height: 48px; min-height: 48px; position: relative; }
  body.chat-mode #site-header .header-tag { display: none; }
}

/* ── Dimension Guide — modern minimal ─────────────────────── */
/* Dashboard guide cards */
.dim-guide-card {
  position: relative; padding: 14px 16px;
  background: #fff;
  border: 1px solid #EEF2F7;
  border-radius: 14px;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s;
  overflow: hidden;
}
.dim-guide-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--dim-color, #94A3B8);
  border-radius: 0 2px 2px 0;
  transition: width .18s ease;
}
.dim-guide-card:hover {
  transform: translateY(-2px);
  border-color: transparent;
  box-shadow: 0 8px 24px -8px rgba(15,23,42,.14);
}
.dim-guide-card:hover::before { width: 5px; }
.dim-guide-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dim-guide-title {
  font-size: .85rem; font-weight: 800; color: #0F172A; letter-spacing: -.01em;
  display: flex; align-items: center; gap: 6px;
}
.dim-guide-progress {
  font-size: .68rem; font-weight: 700; letter-spacing: .02em;
  background: color-mix(in srgb, var(--dim-color, #94A3B8) 10%, white);
  color: var(--dim-color, #475569);
  padding: 3px 9px; border-radius: 999px;
  white-space: nowrap;
}
.dim-guide-tip {
  font-size: .78rem; color: #475569; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.dim-guide-cta {
  font-size: .66rem; color: var(--dim-color, #94A3B8);
  font-weight: 700; margin-top: 8px; text-align: right;
  letter-spacing: .02em;
}

/* Modal */
.dim-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; padding: 20px;
  animation: dimFadeIn .08s ease-out;
}
@keyframes dimFadeIn { from { opacity: 0; } to { opacity: 1; } }
.dim-modal {
  background: #fff;
  border-radius: 22px;
  max-width: 720px; width: 100%;
  max-height: 90vh;
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 24px 60px -12px rgba(15,23,42,.35);
  animation: dimSlideUp .1s ease-out;
}
@keyframes dimSlideUp { from { transform: translateY(6px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.dim-modal-header {
  position: relative; padding: 22px 24px 20px;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--dim-color, #69ADA7) 0%, color-mix(in srgb, var(--dim-color, #3F9E8C) 70%, #0F172A) 100%);
  flex-shrink: 0;
}
.dim-modal-header-content {
  flex: 1; min-width: 0; position: relative; z-index: 1;
}
.dim-modal-eyebrow {
  font-size: .62rem; letter-spacing: .14em;
  color: rgba(255,255,255,.7); font-weight: 700; text-transform: uppercase;
  line-height: 1.4;
}
.dim-modal-title {
  font-size: 1.25rem; font-weight: 800; color: #fff;
  margin-top: 4px; letter-spacing: -.015em; line-height: 1.3;
  word-break: keep-all;
}
.dim-modal-progress {
  font-size: .78rem; color: rgba(255,255,255,.92); margin-top: 6px;
  font-weight: 600;
}
.dim-modal-progress .arrow { opacity: .55; margin: 0 4px; }
.dim-modal-progress .next { font-weight: 800; }

.dim-modal-close {
  background: rgba(255,255,255,.18); border: none; color: #fff;
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  font-size: .95rem; font-weight: 700; font-family: inherit; flex-shrink: 0;
  transition: background .15s, transform .15s;
  position: relative; z-index: 1;
}
.dim-modal-close:hover { background: rgba(255,255,255,.32); transform: rotate(90deg); }
.dim-modal-body {
  padding: 26px 28px 28px; overflow-y: auto;
  background: #FAFBFC;
}

/* Current tip — replaced mustard yellow with elegant slate */
.dim-current-tip {
  display: flex; align-items: flex-start; gap: 12px;
  background: #fff; border: 1px solid #EEF2F7;
  border-radius: 14px; padding: 16px 18px; margin-bottom: 22px;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
  position: relative; overflow: hidden;
}
.dim-current-tip::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--dim-color, #69ADA7);
}
.dim-tip-icon {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px;
  background: color-mix(in srgb, var(--dim-color, #69ADA7) 12%, white);
  color: var(--dim-color, #3F9E8C);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem;
}
.dim-tip-content { flex: 1; min-width: 0; }
.dim-tip-label {
  font-size: .66rem; font-weight: 800;
  color: var(--dim-color, #3F9E8C);
  letter-spacing: .12em; text-transform: uppercase; margin-bottom: 4px;
}
.dim-tip-text {
  font-size: .88rem; font-weight: 600; color: #0F172A; line-height: 1.55;
  letter-spacing: -.005em;
}

/* Sections */
.dim-section { margin-bottom: 26px; }
.dim-section h3 {
  font-size: .92rem; font-weight: 800; color: #0F172A;
  margin: 0 0 12px; padding: 0;
  border: none;
  letter-spacing: -.01em;
  display: flex; align-items: center; gap: 8px;
}
.dim-section h3::before {
  content: ''; display: inline-block;
  width: 3px; height: 14px;
  background: var(--dim-color, #69ADA7);
  border-radius: 2px;
}
.dim-section p {
  font-size: .86rem; color: #475569; line-height: 1.7;
  margin: 0; padding: 14px 16px;
  background: #fff; border: 1px solid #EEF2F7; border-radius: 12px;
}

/* Technique blocks */
.dim-tech {
  margin-bottom: 10px; padding: 14px 16px;
  background: #fff; border: 1px solid #EEF2F7;
  border-radius: 12px;
  transition: border-color .15s, transform .12s;
}
.dim-tech:hover { border-color: #E2E8F0; transform: translateX(2px); }
.dim-tech-title {
  font-size: .87rem; font-weight: 700; color: #0F172A;
  margin-bottom: 6px; letter-spacing: -.005em;
}
.dim-tech-desc { font-size: .74rem; color: #94A3B8; font-weight: 500; }
.dim-tech-steps { margin: 8px 0 0; padding-left: 0; list-style: none; }
.dim-tech-steps li {
  font-size: .82rem; color: #475569; line-height: 1.65; margin-bottom: 4px;
  padding-left: 18px; position: relative;
}
.dim-tech-steps li::before {
  content: ''; position: absolute; left: 0; top: 9px;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--dim-color, #69ADA7); opacity: .8;
}
.dim-tech-steps li strong { color: #0F172A; font-weight: 700; }

/* Examples — vertical comparison cards */
.dim-example {
  margin-bottom: 10px; padding: 14px 16px;
  background: #fff; border: 1px solid #EEF2F7; border-radius: 12px;
}
.dim-ex-lv {
  font-size: .65rem; font-weight: 800;
  color: var(--dim-color, #3F9E8C);
  letter-spacing: .12em; text-transform: uppercase; margin-bottom: 10px;
}
.dim-ex-row {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: .82rem; line-height: 1.6; color: #334155;
  padding: 8px 0;
}
.dim-ex-row + .dim-ex-row { border-top: 1px dashed #EEF2F7; }
.dim-ex-label {
  flex-shrink: 0; padding: 2px 9px; border-radius: 999px;
  font-size: .6rem; font-weight: 800; letter-spacing: .04em;
  line-height: 1.65; min-width: 36px; text-align: center;
}
.dim-ex-good { background: #FEF2F2; color: #B91C1C; }
.dim-ex-better { background: #ECFDF5; color: #047857; }
.dim-ex-row strong { color: #0F172A; font-weight: 800; }

/* Training cards */
.dim-train-card {
  background: #fff; border: 1px solid #EEF2F7; border-radius: 12px;
  padding: 14px 16px; margin-bottom: 10px;
  transition: border-color .15s, box-shadow .15s;
}
.dim-train-card:hover { border-color: #E2E8F0; box-shadow: 0 4px 12px -4px rgba(15,23,42,.08); }
.dim-train-q {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: .88rem; font-weight: 700; color: #0F172A;
  line-height: 1.55; margin-bottom: 10px; letter-spacing: -.005em;
}
.dim-train-num {
  flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 8px;
  background: color-mix(in srgb, var(--dim-color, #69ADA7) 12%, white);
  color: var(--dim-color, #3F9E8C);
  font-size: .72rem; font-weight: 800; line-height: 1;
}
.dim-train-toggle {
  display: inline-block; padding: 6px 13px;
  background: transparent; border: 1px solid #E2E8F0;
  color: #64748B; border-radius: 999px;
  font-size: .7rem; font-weight: 700; font-family: inherit;
  cursor: pointer; transition: all .15s;
}
.dim-train-toggle:hover {
  border-color: var(--dim-color, #69ADA7);
  color: var(--dim-color, #3F9E8C);
  background: color-mix(in srgb, var(--dim-color, #69ADA7) 8%, white);
}
.dim-train-a {
  margin-top: 12px; padding: 14px 16px;
  background: #fff; border: 1px solid #EEF2F7; border-radius: 10px;
  position: relative;
}
.dim-train-a::before {
  content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 2px;
  background: var(--dim-color, #69ADA7); border-radius: 0 2px 2px 0;
}
.dim-train-line {
  font-size: .82rem; color: #475569; line-height: 1.7;
  padding: 4px 0 4px 16px; position: relative;
}
.dim-train-line::before {
  content: ''; position: absolute; left: 2px; top: 12px;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--dim-color, #69ADA7); opacity: .7;
}
.dim-train-line strong { color: #0F172A; font-weight: 800; }

/* Primary CTA button */
.dim-train-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 15px 20px; margin-top: 22px;
  background: linear-gradient(135deg, var(--dim-color, #69ADA7) 0%, color-mix(in srgb, var(--dim-color, #3F9E8C) 75%, #0F172A) 100%);
  color: #fff; border: none; border-radius: 14px;
  font-size: .92rem; font-weight: 800; font-family: inherit;
  cursor: pointer; letter-spacing: -.005em;
  box-shadow: 0 6px 18px -6px color-mix(in srgb, var(--dim-color, #69ADA7) 60%, transparent);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.dim-train-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -8px color-mix(in srgb, var(--dim-color, #69ADA7) 70%, transparent);
  filter: brightness(1.05);
}
.dim-train-btn:active { transform: translateY(0); }

/* Back button (in training mode) */
.dim-back-btn {
  padding: 7px 14px; border: 1px solid #E2E8F0; background: #fff;
  border-radius: 999px; font-size: .76rem; font-weight: 700;
  color: #64748B; cursor: pointer; font-family: inherit;
  transition: all .15s;
}
.dim-back-btn:hover { border-color: #CBD5E1; color: #0F172A; background: #F8FAFC; }

/* Re-roll training set button */
.dim-cycle-btn {
  margin-left: auto; padding: 7px 14px;
  background: linear-gradient(135deg, var(--dim-color, #69ADA7), color-mix(in srgb, var(--dim-color, #3F9E8C) 75%, #0F172A));
  color: #fff; border: none; border-radius: 999px;
  font-size: .74rem; font-weight: 700; cursor: pointer;
  font-family: inherit; display: inline-flex; align-items: center; gap: 5px;
  box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--dim-color, #69ADA7) 50%, transparent);
  transition: transform .15s, filter .15s;
}
.dim-cycle-btn:hover { transform: translateY(-1px); filter: brightness(1.08); }

.dim-set-badge {
  font-size: .6rem; font-weight: 800;
  color: var(--dim-color, #3F9E8C);
  background: color-mix(in srgb, var(--dim-color, #69ADA7) 12%, white);
  padding: 3px 8px; border-radius: 999px;
  margin-left: 8px; letter-spacing: .04em;
}

@media (max-width: 600px) {
  .dim-modal { max-height: 95vh; border-radius: 18px; }
  .dim-modal-header { padding: 22px 22px 20px; }
  .dim-modal-title { font-size: 1.25rem; }
  .dim-modal-body { padding: 22px 20px 24px; }
  .dim-train-btn { padding: 14px 16px; font-size: .88rem; }
  .dim-train-card { padding: 12px 14px; }
}

/* ── Android / 태블릿 호환성 ───────────────────────────────── */
@media (max-width: 1024px) {
  /* iOS Safari: 폰트 16px 미만 input은 포커스 시 자동 zoom 발생 */
  input[type="text"], input[type="password"], input[type="tel"],
  input[type="number"], input[type="email"], input[type="search"],
  textarea, select {
    font-size: 16px !important;
  }
  /* 300ms tap delay 제거 (구형 Android Chrome) + 더블탭 zoom 방지 */
  button, a, [role="button"], .ctrl-btn, .nav-btn {
    touch-action: manipulation;
  }
  /* 모바일 화면 가로 폭 안전 */
  .screen { padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
}

/* iPad / 태블릿 — 큰 화면이지만 데스크톱 아님 */
@media (min-width: 769px) and (max-width: 1100px) {
  /* 태블릿에서 카드/모달 폭 적정화 */
  .dim-modal, .modal-content { max-width: 90vw; }
}

/* Android Chrome 100vh 이슈 — 동적 viewport 단위 */
@supports (height: 100dvh) {
  .modal-overlay, .dim-modal-overlay { height: 100dvh; }
}

/* 화면 회전 시 자동 재계산 */
@media (orientation: landscape) and (max-height: 500px) {
  /* 가로 모드 작은 화면 — 화면 키보드 가려지는 영역 보정 */
  .screen { padding-bottom: env(keyboard-inset-height, 0); }
}

/* ── Diary (Soft yellow theme) ─────────────────────────────── */
.diary-card {
  background: linear-gradient(180deg, #FEFCF3 0%, #FFFEF7 100%);
  border: 1px solid #FCEFC7; border-radius: var(--radius);
  padding: 0; margin-bottom: 14px; overflow: hidden;
  box-shadow: 0 1px 3px rgba(180, 83, 9, .04);
}
.diary-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 16px 18px 14px; border-bottom: 1px solid #FCEFC7;
  gap: 12px; flex-wrap: wrap;
}
@media (max-width: 640px) {
  .diary-header { padding: 14px 14px 12px; gap: 10px; }
  .diary-header-actions { width: 100%; justify-content: flex-end; }
  .diary-header .card-title { font-size: .9rem; }
  .diary-meta-bar { gap: 4px; }
  .diary-meta-chip { font-size: .64rem; padding: 2px 7px; }
  .diary-prompt-card { padding: 10px 12px; font-size: .8rem; }
  .diary-yearago { padding: 12px 14px; font-size: .8rem; }
  .diary-action-row { gap: 6px; }
  .diary-write-btn, .diary-submit-btn, .diary-cancel-btn { font-size: .76rem; padding: 8px 14px; min-height: 34px; }
  .diary-encouragement { padding: 9px 11px; font-size: .8rem; }
}
.diary-header-left { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.diary-header-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.diary-header .card-title {
  margin-bottom: 0; color: #B45309; font-size: .98rem;
  display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
/* 통일된 일기 영역 버튼 — 작고 둥근 capsule */
.diary-btn {
  padding: 8px 16px; border-radius: 999px;
  font-size: .78rem; font-weight: 700; cursor: pointer;
  font-family: inherit; transition: all .15s;
  display: inline-flex; align-items: center; gap: 5px;
  white-space: nowrap; line-height: 1; min-height: 34px;
}
.diary-btn-primary { background: #D97706; color: #fff; border: 1.5px solid #D97706; }
.diary-btn-primary:hover { background: #B45309; border-color: #B45309; }
.diary-btn-soft { background: #FFFBEB; color: #92400E; border: 1.5px solid #FCD34D; }
.diary-btn-soft:hover { background: #FEF3C7; border-color: #F59E0B; }
.diary-btn-ghost { background: #fff; color: #92400E; border: 1.5px solid #E2E8F0; }
.diary-btn-ghost:hover { border-color: #FCD34D; color: #B45309; }
/* 호환성 — 기존 .diary-write-btn은 primary 톤으로 통일 */
.diary-write-btn {
  padding: 8px 16px; border-radius: 999px; border: 1.5px solid #D97706;
  background: #D97706; color: #fff;
  font-size: .78rem; font-weight: 700; cursor: pointer;
  font-family: inherit; transition: all .15s;
  display: inline-flex; align-items: center; gap: 5px;
  min-height: 34px; line-height: 1;
}
.diary-write-btn:hover { background: #B45309; border-color: #B45309; }
.diary-write-area { display: none; padding: 0 18px 16px; }
.diary-textarea {
  width: 100%; min-height: 120px;
  /* 자동 확장은 일정 높이까지만 — 그 이상은 textarea 자체에서 스크롤 */
  max-height: 50vh;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px; padding: 12px 14px; font-size: .9rem;
  font-family: inherit; color: var(--gray-800); line-height: 1.7;
  resize: none; outline: none; box-sizing: border-box;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* iOS 부드러운 스크롤 */
  /* iOS 16+ 모바일에서 textarea 내부 스크롤 안정화 */
  touch-action: pan-y;
  overscroll-behavior: contain;
}
.diary-textarea:focus { border-color: var(--mint); box-shadow: 0 0 0 3px rgba(105,173,167,.12); }
.diary-textarea::placeholder { color: var(--gray-400); }
.diary-action-row {
  display: flex; gap: 8px; margin-top: 12px;
  justify-content: flex-end; flex-wrap: wrap; align-items: center;
}
.diary-action-row > .diary-cancel-btn { margin-right: auto; }
.diary-submit-btn {
  padding: 9px 18px; border-radius: 999px; border: none;
  background: var(--mint); color: #fff;
  font-size: .82rem; font-weight: 700; cursor: pointer; font-family: inherit;
  display: inline-flex; align-items: center; gap: 5px;
  min-height: 36px; line-height: 1; transition: all .15s;
  white-space: nowrap;
}
.diary-submit-btn:hover { background: var(--mint-dk); }
.diary-submit-btn:disabled { background: var(--gray-200); color: var(--gray-400); cursor: not-allowed; }
.diary-cancel-btn {
  padding: 9px 16px; border-radius: 999px;
  border: 1.5px solid var(--gray-200); background: #fff;
  color: var(--gray-600); font-size: .82rem; font-weight: 600;
  cursor: pointer; font-family: inherit;
  display: inline-flex; align-items: center; gap: 5px;
  min-height: 36px; line-height: 1; transition: all .15s;
  white-space: nowrap;
}
.diary-cancel-btn:hover { border-color: var(--gray-300); background: #FAFAF8; }
.diary-result { display: none; padding: 0 18px 16px; }
.diary-section-label {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .8px; color: var(--gray-400); margin-bottom: 6px;
}
.diary-original {
  font-size: .88rem; color: var(--gray-600); line-height: 1.7;
  padding: 10px 14px; background: var(--gray-50); border-radius: 10px;
  border-left: 3px solid var(--gray-200); margin-bottom: 12px;
}
.diary-corrected {
  font-size: .88rem; color: var(--navy); line-height: 1.7;
  padding: 10px 14px; background: #F0FDF4; border-radius: 10px;
  border-left: 3px solid #22C55E; margin-bottom: 12px;
}
.diary-suggestions {
  padding: 10px 14px; background: #FFFBEB; border-radius: 10px;
  border-left: 3px solid #F59E0B;
}
.diary-sug-item {
  font-size: .85rem; line-height: 1.6; padding: 5px 0;
  border-bottom: 1px solid rgba(245,158,11,.15);
}
.diary-sug-item:last-child { border-bottom: none; }
.diary-list {
  /* 닫힌 카드 약 2개(오늘+어제) 분량 — 그 이상은 박스 안에서 스크롤 후 부모로 chain */
  max-height: 180px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: auto;             /* 끝까지 스크롤하면 부모(대시보드)도 스크롤 */
  scroll-behavior: smooth;
  border-radius: 0 0 12px 12px;
}
/* 슬림한 스크롤바 (모바일 친화) */
.diary-list::-webkit-scrollbar { width: 6px; }
.diary-list::-webkit-scrollbar-track { background: transparent; }
.diary-list::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
.diary-list::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }
.diary-entry {
  padding: 12px 18px; border-top: 1px solid var(--gray-100);
  cursor: pointer; transition: background .15s;
}
.diary-entry:hover { background: var(--gray-50); }
.diary-entry-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.diary-entry-date { font-size: .75rem; font-weight: 700; color: var(--mint); }
.diary-entry-badge { font-size: .65rem; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: #F0FDF4; color: #16A34A; }
.diary-entry-preview { font-size: .85rem; color: var(--gray-600); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.diary-entry-detail { display: none; margin-top: 10px; }
.diary-entry.open .diary-entry-detail { display: block; }
.diary-entry.open .diary-entry-preview { display: none; }
.diary-empty { padding: 20px 18px; text-align: center; color: var(--gray-400); font-size: .85rem; }
.stamp-cal-day .diary-dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: #F59E0B; position: absolute; bottom: 1px; right: 1px;
}

/* ── BYS Speaking Grammar ────────────────────────────────────── */
/* ═══ SMEC Speaking 임베드 앱 (SMEC 5명 + 다니엘 전용) ═══ */
/* 🐛 fix(2026-09-24, bys-day 흰 여백 버그 전수조사 중 발견) — 아래 #screen-smec-*는 폭 제한 없이
   항상 #FAFAF8인데 body 쪽엔 맞춰주는 규칙이 아예 없어서, 760px보다 넓은 화면이면 폭 무관하게
   (761px든 1920px든) 좌우에 흰 여백이 상시로 보였다. bys-day와 같은 패턴이라 같은 방식으로 고정. */
body.nd-user[data-screen^="screen-smec-"] { background: #FAFAF8; }
#screen-smec-list, #screen-smec-chapter { padding: 16px 14px calc(80px + env(safe-area-inset-bottom, 0px)); max-width: 760px; margin: 0 auto; background: #FAFAF8; min-height: 100vh; }
.smec-topbar { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; }
.smec-topbar .hist-back { margin-bottom: 0; }
/* 헤더(cover) — 부드러운 cream 박스 (Apple/Notion 스타일) */
.smec-cover { background: #FAF8F3; border: 1px solid #EDE9DE; border-radius: 16px; padding: 22px 24px; margin-bottom: 16px; }
.smec-cover-eyebrow { display: block; font-size: .78rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: #69ADA7; margin-bottom: 4px; background: none; padding: 0; }
.smec-cover-title { font-size: 1.5rem; font-weight: 700; color: #333333; letter-spacing: -.025em; line-height: 1.15; }
.smec-cover-sub { font-size: .95rem; color: #5C5C5C; margin-top: 6px; line-height: 1.5; font-weight: 400; letter-spacing: -.003em; }
.smec-cover-desc { font-size: .85rem; color: #6B6B6B; margin-top: 10px; line-height: 1.6; max-width: 580px; }
.smec-part { margin-top: 22px; }
.smec-part-label { font-size: .78rem; font-weight: 700; letter-spacing: .12em; color: #638679; margin-bottom: 4px; text-transform: uppercase; }
.smec-part-desc { font-size: .85rem; color: #5C5C5C; margin-bottom: 12px; }
.smec-chapters { display: grid; gap: 10px; }
.smec-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: #F2F2EF; border: none; border-radius: 14px; cursor: pointer; transition: transform .2s, box-shadow .2s; }
.smec-card:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(105,173,167,.16); }
.smec-card-num { flex-shrink: 0; width: 36px; height: 36px; background: #69ADA7; color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .92rem; }
.smec-card-body { flex: 1; min-width: 0; }
.smec-card-meta { font-size: .7rem; font-weight: 600; color: #638679; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 2px; }
.smec-card-title { font-size: .98rem; font-weight: 700; color: #333333; line-height: 1.3; }
.smec-card-sub { font-size: .78rem; color: #5C5C5C; margin-top: 2px; line-height: 1.4; }
.smec-card-status { flex-shrink: 0; font-size: .7rem; font-weight: 700; padding: 4px 10px; border-radius: 980px; background: #fff; color: #8A8A8A; }
.smec-card-status.done { background: #E7F8F2; color: #638679; }
.smec-card-status.partial { background: #FFF7ED; color: #92400E; }

/* 탭 바 */
#smec-tab-bar { display: flex; gap: 4px; padding: 4px; background: #F2F2EF; border-radius: 14px; margin-bottom: 18px; }
.smec-tab { flex: 1; padding: 10px 12px; font-size: .82rem; font-weight: 700; border: none; border-radius: 10px; background: transparent; color: #5C5C5C; cursor: pointer; font-family: inherit; transition: all .15s; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.smec-tab.active { background: #69ADA7; color: #fff; box-shadow: 0 2px 6px rgba(105,173,167,.32); }
.smec-tab svg { flex-shrink: 0; opacity: .9; }
.smec-nav-btn { display: inline-flex; align-items: center; gap: 6px; }
.smec-nav-btn svg { flex-shrink: 0; opacity: .8; }

/* ═══ SMEC 챕터 본문 — 한국어 가독성 통일 ═══
   본문: .92rem / #2A2A2A / line-height 1.7 / letter-spacing -.003em
   보조: .82rem / #5C5C5C / line-height 1.6
   메타: .76rem / #8A8A8A
   강조: #333333 (700) + sage 액센트 #638679 */
.smec-chap-head { padding: 24px 0 8px; }
.smec-chap-eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .12em; color: #638679; text-transform: uppercase; margin-bottom: 10px; }
.smec-chap-title { font-size: 1.8rem; font-weight: 700; color: #333333; letter-spacing: -.02em; line-height: 1.12; }
.smec-chap-sub { font-size: 1.02rem; color: #5C5C5C; margin-top: 6px; line-height: 1.55; letter-spacing: -.003em; }
.smec-chap-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.smec-tag { display: inline-block; padding: 4px 12px; border-radius: 980px; background: #F2F2EF; font-size: .76rem; font-weight: 500; color: #5C5C5C; }
.smec-tag.sage { background: #E7F8F2; color: #638679; }

.smec-section { margin-top: 36px; }
/* BYS Day 첫 섹션(= DAY N · LESSON 헤더) — 전 교재 동일 위치 (기존보다 약간 위) */
/* 모든 교재 공통: 'DAY N · LESSON' 제목 위 여백 기준값 = 18px (탭 유무 무관하게 제목이 붙지 않도록) */
#bys-day-body > .smec-section:first-child { margin-top: 18px; }
#screen-bys-day { padding-top: 10px; }
.smec-section-eyebrow { font-size: .68rem; font-weight: 700; letter-spacing: .14em; color: #8A8A8A; text-transform: uppercase; margin-bottom: 8px; }
.smec-section-eyebrow.bys-lesson-eyebrow { font-size: 1.15rem; font-weight: 800; letter-spacing: .04em; color: #69ADA7; margin-bottom: 14px; }
.bys-lesson-level { flex: 0 0 auto; font-size: 1.15rem; font-weight: 800; letter-spacing: .04em; color: #69ADA7; }
.smec-section-title { font-size: 1.35rem; font-weight: 700; color: #333333; letter-spacing: -.015em; line-height: 1.2; margin-bottom: 14px; }
.smec-section-intro { font-size: .92rem; color: #5C5C5C; line-height: 1.65; letter-spacing: -.003em; margin-bottom: 16px; }

.smec-objective-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.smec-objective-list li { display: flex; gap: 12px; padding: 14px 16px; background: #F2F2EF; border-radius: 12px; font-size: .92rem; color: #2A2A2A; line-height: 1.65; letter-spacing: -.003em; }
.smec-objective-list li::before { content: ''; flex-shrink: 0; display: block; width: 6px; height: 6px; border-radius: 50%; background: #69ADA7; margin-top: 9px; }

.smec-intro-block { background: #F2F2EF; border-radius: 16px; padding: 22px; font-size: .92rem; color: #2A2A2A; line-height: 1.7; letter-spacing: -.003em; }
.smec-intro-block .role { font-weight: 700; color: #8A8A8A; margin-right: 6px; }
.smec-intro-block .silence { color: #8A8A8A; font-style: italic; }
.smec-intro-block .msg { margin-top: 14px; }
.smec-intro-block strong { color: #333333; font-weight: 600; }

.smec-why-block { background: #F3FBF8; border-radius: 16px; padding: 22px; }
.smec-why-block p { font-size: .92rem; color: #2A2A2A; line-height: 1.7; letter-spacing: -.003em; }
.smec-why-block p + p { margin-top: 12px; }
.smec-why-block strong { color: #333333; font-weight: 600; }

.smec-tool { background: #F2F2EF; border-radius: 18px; padding: 22px; margin-bottom: 16px; }
.smec-tool.featured { background: #F3FBF8; border: 1.5px solid rgba(105,173,167,.28); }
.smec-tool-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.smec-tool-num { flex-shrink: 0; width: 32px; height: 32px; background: #69ADA7; color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .92rem; }
.smec-tool.featured .smec-tool-num { background: linear-gradient(135deg, #69ADA7, #638679); box-shadow: 0 4px 14px rgba(105,173,167,.32); }
.smec-tool-title { font-size: 1.12rem; font-weight: 700; color: #333333; letter-spacing: -.005em; }
.smec-tool-badge { display: inline-block; margin-left: 8px; padding: 2px 8px; background: #E7F8F2; color: #638679; border-radius: 6px; font-size: .68rem; font-weight: 700; vertical-align: middle; }
.smec-tool-intro { font-size: .92rem; color: #2A2A2A; line-height: 1.65; letter-spacing: -.003em; margin-bottom: 14px; }
.smec-tool-pattern { padding: 12px 16px; background: #fff; border-radius: 10px; margin-bottom: 14px; }
.smec-tool-pattern .lbl { font-size: .66rem; font-weight: 700; letter-spacing: .12em; color: #69ADA7; text-transform: uppercase; margin-right: 8px; }
.smec-tool-pattern .txt { font-size: .92rem; color: #333333; font-weight: 500; letter-spacing: -.003em; }
.smec-tool-examples { display: flex; flex-direction: column; gap: 12px; }
.smec-tool-ex { padding-left: 14px; border-left: 2px solid #AFE7D5; }
.smec-tool-ex .en { font-size: .98rem; color: #333333; line-height: 1.55; }
.smec-tool-ex .en strong { color: #638679; background: #E7F8F2; padding: 1px 6px; border-radius: 4px; font-weight: 600; }
.smec-tool-ex .ko { font-size: .82rem; color: #5C5C5C; line-height: 1.6; letter-spacing: -.003em; margin-top: 4px; }
.smec-tool-yt { margin-top: 16px; padding: 14px 16px; background: #fff; border-radius: 10px; }
.smec-tool-yt-lbl { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #69ADA7; margin-bottom: 8px; }
.smec-tool-yt ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.smec-tool-yt li { font-size: .9rem; color: #2A2A2A; padding-left: 14px; position: relative; line-height: 1.6; letter-spacing: -.003em; }
.smec-tool-yt li::before { content: '·'; position: absolute; left: 4px; color: #69ADA7; font-weight: 700; }

.smec-dialogue { background: #F2F2EF; border-radius: 16px; padding: 22px; margin-bottom: 16px; }
.smec-dialogue h3 { font-size: 1.08rem; font-weight: 700; color: #333333; margin-bottom: 4px; letter-spacing: -.005em; }
.smec-dialogue .ctx { font-size: .82rem; color: #8A8A8A; margin-bottom: 14px; letter-spacing: -.003em; }
.smec-dialogue .turn { display: flex; gap: 12px; padding: 10px 0; }
.smec-dialogue .turn + .turn { border-top: 1px solid rgba(0,0,0,.06); }
.smec-dialogue .spkr { flex-shrink: 0; width: 80px; font-size: .76rem; font-weight: 700; color: #8A8A8A; padding-top: 2px; letter-spacing: -.003em; }
.smec-dialogue .spkr.you { color: #638679; }
.smec-dialogue .en { font-size: .96rem; color: #333333; line-height: 1.55; }
.smec-dialogue .en strong { color: #638679; font-weight: 600; }
.smec-dialogue .ko { font-size: .82rem; color: #5C5C5C; line-height: 1.6; letter-spacing: -.003em; margin-top: 4px; }

.smec-mistakes { display: flex; flex-direction: column; gap: 12px; }
.smec-mistake { background: #F2F2EF; border-radius: 12px; padding: 18px; }
.smec-mistake-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 10px; }
.smec-mistake-lbl { font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 6px; }
.smec-mistake-lbl.wrong { color: #D94B4B; }
.smec-mistake-lbl.right { color: #638679; }
.smec-mistake-text { font-size: .92rem; color: #333333; line-height: 1.6; letter-spacing: -.003em; }
.smec-mistake-note { font-size: .82rem; color: #5C5C5C; line-height: 1.6; letter-spacing: -.003em; padding-top: 8px; border-top: 1px solid rgba(0,0,0,.06); }

.smec-selfcheck { background: linear-gradient(135deg, #F3FBF8, #E7F8F2); border-radius: 18px; padding: 26px; }
.smec-selfcheck-intro { font-size: .92rem; color: #2A2A2A; line-height: 1.65; letter-spacing: -.003em; margin-bottom: 18px; }
.smec-selfcheck ol { list-style: none; counter-reset: q; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.smec-selfcheck li { counter-increment: q; display: flex; gap: 14px; padding: 14px 18px; background: #fff; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.smec-selfcheck li::before { content: 'Q' counter(q); flex-shrink: 0; font-weight: 700; font-size: .82rem; color: #638679; width: 28px; }
.smec-selfcheck li span { font-size: .92rem; color: #333333; line-height: 1.6; letter-spacing: -.003em; }

.smec-teacher { background: #F2F2EF; border-radius: 18px; padding: 22px; }
.smec-teacher h4 { font-size: 1rem; font-weight: 700; color: #333333; margin-bottom: 12px; }
.smec-teacher ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.smec-teacher li { font-size: .88rem; color: #5C5C5C; line-height: 1.55; padding-left: 18px; position: relative; }
.smec-teacher li::before { content: '→'; position: absolute; left: 0; color: #69ADA7; font-weight: 600; }
.smec-teacher li strong { color: #333333; font-weight: 600; }

/* Drill 모드 */
.smec-drill-list { display: flex; flex-direction: column; gap: 10px; }
.smec-drill-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: #F2F2EF; border-radius: 14px; cursor: pointer; transition: transform .15s; }
.smec-drill-card:hover { transform: translateY(-1px); background: #E7F8F2; }
.smec-drill-num { width: 32px; height: 32px; background: #69ADA7; color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .82rem; flex-shrink: 0; }
.smec-drill-body { flex: 1; }
.smec-drill-title { font-size: .94rem; font-weight: 700; color: #333333; }
.smec-drill-meta { font-size: .76rem; color: #8A8A8A; margin-top: 2px; }
.smec-drill-arrow { color: #69ADA7; font-weight: 700; }

.smec-drill-runner { background: #fff; border-radius: 18px; padding: 28px 24px; box-shadow: 0 8px 32px rgba(105,173,167,.12); }
.smec-drill-progress { display: flex; justify-content: space-between; font-size: .76rem; color: #8A8A8A; margin-bottom: 12px; }
.smec-drill-progbar { height: 6px; background: #F2F2EF; border-radius: 980px; overflow: hidden; margin-bottom: 22px; }
.smec-drill-progbar-fill { height: 100%; background: #69ADA7; transition: width .3s; }
.smec-drill-prompt-en { font-size: 1.4rem; font-weight: 600; color: #333333; letter-spacing: -.01em; line-height: 1.3; margin-bottom: 4px; }
.smec-drill-prompt-ko { font-size: .9rem; color: #638679; margin-bottom: 22px; }
.smec-drill-mic-area { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 26px 0; }
.smec-drill-mic-btn { width: 90px; height: 90px; border-radius: 50%; background: #69ADA7; color: #fff; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(105,173,167,.32); transition: transform .15s, background .15s; }
.smec-drill-mic-btn:hover { transform: scale(1.04); }
.smec-drill-mic-btn.recording { background: #D94B4B; animation: smec-pulse 1s infinite; box-shadow: 0 8px 32px rgba(217,75,75,.32); }
@keyframes smec-pulse { 0%,100%{transform:scale(1);} 50%{transform:scale(1.06);} }

/* ═══ BYS Lv 1.0 ST — 25문장 학습 리스트 (SMEC 스타일 재활용) ═══ */
#screen-bys-list, #screen-bys-day, #screen-bys-level-menu, #screen-bys-book-menu { padding: 16px 14px calc(80px + env(safe-area-inset-bottom, 0px)); max-width: 760px; margin: 0 auto; background: #FAFAF8; min-height: 100vh; }

/* ═══ BYS 레벨/교재 메뉴 그리드 ═══ */
.bys-menu-group { margin-top: 22px; }
.bys-menu-group-label { font-size: .78rem; font-weight: 700; letter-spacing: .12em; color: #638679; margin-bottom: 4px; text-transform: uppercase; }
.bys-menu-group-desc { font-size: .85rem; color: #5C5C5C; margin-bottom: 12px; }
.bys-level-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 480px) { .bys-level-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; } }
.bys-level-card { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 18px 10px; background: #F2F2EF; border: 1.5px solid transparent; border-radius: 14px; cursor: pointer; transition: transform .2s, box-shadow .2s, border-color .2s; min-height: 80px; }
.bys-level-card:hover:not(.disabled) { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(105,173,167,.18); }
.bys-level-card.current { background: #E7F8F2; border-color: #69ADA7; box-shadow: 0 2px 8px rgba(105,173,167,.22); }
.bys-level-card.disabled { background: #F7F7F4; color: #C4C4C0; cursor: default; }
.bys-level-card.disabled .bys-level-num { color: #C4C4C0; }
/* Tier별 배경 (initial 사용자가 클릭 가능한 카드만) — Apple 미니멀 + 자연 톤 */
.bys-level-card.tier-basic:not(.disabled):not(.current) { background: #F4EFE6; }
.bys-level-card.tier-mid:not(.disabled):not(.current) { background: #E7F8F2; }
.bys-level-card.tier-adv:not(.disabled):not(.current) { background: #ECE6F0; }
.bys-level-card.tier-master:not(.disabled):not(.current) { background: #F5E9CC; }
/* Tier별 disabled (살짝 색조 남김) */
.bys-level-card.tier-basic.disabled { background: #F8F5EF; }
.bys-level-card.tier-mid.disabled { background: #F0F4F0; }
.bys-level-card.tier-adv.disabled { background: #F4F0F6; }
.bys-level-card.tier-master.disabled { background: #FAF4E5; }
/* Tier별 라벨 색상 (active 카드만 — disabled는 회색 유지) */
.bys-level-card.tier-basic:not(.disabled) .bys-level-num { color: #6B5B3F; }
.bys-level-card.tier-mid:not(.disabled) .bys-level-num { color: #638679; }
.bys-level-card.tier-adv:not(.disabled) .bys-level-num { color: #6B4A8B; }
.bys-level-card.tier-master:not(.disabled) .bys-level-num { color: #8B6914; }
.bys-level-num { font-size: 1.4rem; font-weight: 700; color: #333333; letter-spacing: -.02em; line-height: 1; }
.bys-level-card.current .bys-level-num { color: #333333; }
.bys-level-mine { font-size: .68rem; font-weight: 700; color: #69ADA7; margin-top: 4px; text-transform: uppercase; letter-spacing: .08em; }
.bys-book-grid { display: grid; gap: 12px; margin-top: 8px; }
.bys-book-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: #F2F2EF; border: 1.5px solid transparent; border-radius: 14px; cursor: pointer; transition: transform .2s, box-shadow .2s; }
.bys-book-card:hover:not(.unavailable) { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(105,173,167,.16); }
.bys-book-card.unavailable { opacity: .58; cursor: default; }
.bys-book-icon { flex-shrink: 0; width: 44px; height: 44px; background: #69ADA7; color: #fff; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 700; letter-spacing: .04em; font-size: .96rem; }
.bys-book-icon.et { background: #7AA09A; }
.bys-book-icon.ct { background: #C19A6B; }
.bys-book-icon.gt { background: #9A86B0; }
.bys-book-optlabel { margin-top: 40px; margin-bottom: 3px; padding-left: 12px; font-size: .68rem; font-weight: 800; letter-spacing: .14em; color: #9A86B0; text-transform: uppercase; }
.bys-book-body { flex: 1; min-width: 0; }
.bys-book-title { font-size: 1rem; font-weight: 700; color: #333333; line-height: 1.3; }
.bys-book-sub { font-size: .82rem; color: #5C5C5C; margin-top: 3px; line-height: 1.4; }
.bys-book-status { flex-shrink: 0; font-size: .7rem; font-weight: 700; padding: 4px 10px; border-radius: 980px; background: #fff; color: #8A8A8A; }
.bys-book-status.ready { background: #E7F8F2; color: #638679; }
/* Thinking Class(TC) — 버전별 부드러운 색: Life=녹색·Brand=블루·Mind=골드 (2026-07-13) */
.bys-book-card.tc-life  { background:#EAF3E0; border-color:#CBE0BC; } .bys-book-card.tc-life  .bys-book-icon { background:#7FAE6A; }
.bys-book-card.tc-brand { background:#E7F0F9; border-color:#C2D8ED; } .bys-book-card.tc-brand .bys-book-icon { background:#6E9BCF; }
.bys-book-card.tc-mind  { background:#F8EFD3; border-color:#E6D08F; } .bys-book-card.tc-mind  .bys-book-icon { background:#CBA85A; }
body.nd-user #screen-bys-book-menu .bys-book-card.tc-life  { background:#EAF3E0 !important; border:1.5px solid #CBE0BC !important; }
body.nd-user #screen-bys-book-menu .bys-book-card.tc-brand { background:#E7F0F9 !important; border:1.5px solid #C2D8ED !important; }
body.nd-user #screen-bys-book-menu .bys-book-card.tc-mind  { background:#F8EFD3 !important; border:1.5px solid #E6D08F !important; }
body.nd-user #screen-bys-book-menu .bys-book-card.tc-life  .bys-book-icon { background:#7FAE6A !important; color:#fff !important; border:1.5px solid #7FAE6A !important; }
body.nd-user #screen-bys-book-menu .bys-book-card.tc-brand .bys-book-icon { background:#6E9BCF !important; color:#fff !important; border:1.5px solid #6E9BCF !important; }
body.nd-user #screen-bys-book-menu .bys-book-card.tc-mind  .bys-book-icon { background:#CBA85A !important; color:#fff !important; border:1.5px solid #CBA85A !important; }
.bys-book-status.tc-soon { border-radius:999px; }
/* '준비중' — 카드 내용은 살짝 블러(생각수업인 건 다 보임) + 그 위에 준비중 오버레이 */
.bys-book-card.tc-soon-card { position:relative; display:block; cursor:pointer; }
body.nd-user #screen-bys-book-menu .bys-book-card.tc-soon-card { display:block; position:relative; }
.bys-book-card.tc-soon-card:hover { transform:none !important; box-shadow:none !important; }
.bys-book-card.tc-soon-card .tc-inner { display:flex; align-items:center; gap:14px; filter:blur(1.4px); opacity:.92; pointer-events:none; }
.bys-book-card.tc-soon-card .tc-soon-overlay { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; }
.bys-book-card.tc-soon-card .tc-soon-overlay span { font-size:1.35rem; font-weight:800; color:rgba(255,255,255,.78); letter-spacing:.08em; text-shadow:0 1px 4px rgba(20,18,13,.35); }
body.nd-user #screen-bys-book-menu .bys-book-card.tc-life  .bys-book-status.tc-soon { background:rgba(127,174,106,.20) !important; color:#4E7A3C !important; }
body.nd-user #screen-bys-book-menu .bys-book-card.tc-brand .bys-book-status.tc-soon { background:rgba(110,155,207,.20) !important; color:#3E6191 !important; }
body.nd-user #screen-bys-book-menu .bys-book-card.tc-mind  .bys-book-status.tc-soon { background:rgba(203,168,90,.22) !important; color:#8A6A22 !important; }
/* TC '준비 중' 모달 — 버전 색 */
.bys-tc-ov { position: fixed; inset: 0; background: rgba(20,18,13,.5); z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 24px; }
.bys-tc-modal { border-radius: 20px; padding: 30px 26px 24px; max-width: 340px; width: 100%; text-align: center; box-shadow: 0 12px 40px rgba(20,18,13,.25); background:#FBF4E1; border:1.5px solid #E6D08F; }
.bys-tc-badge { width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 15px; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.05rem; letter-spacing: .04em; background:#CBA85A; }
.bys-tc-title { font-size: 1.2rem; font-weight: 800; color: #333333; }
.bys-tc-tag { font-size: .86rem; margin-top: 6px; line-height: 1.5; color:#8A6A22; }
.bys-tc-soon { margin-top: 18px; font-size: .92rem; font-weight: 700; border-radius: 999px; padding: 9px 16px; display: inline-block; color:#93752C; background:rgba(203,168,90,.16); }
.bys-tc-close { margin-top: 20px; width: 100%; border: none; color: #fff; font-weight: 800; font-size: .92rem; border-radius: 12px; padding: 12px; cursor: pointer; font-family: inherit; background:#CBA85A; }
.bys-tc-close:active { transform: scale(.97); }
.bys-tc-modal.tc-life  { background:#EDF5E6; border-color:#CBE0BC; } .bys-tc-modal.tc-life  .bys-tc-badge,.bys-tc-modal.tc-life  .bys-tc-close { background:#7FAE6A; } .bys-tc-modal.tc-life  .bys-tc-tag,.bys-tc-modal.tc-life  .bys-tc-soon { color:#4E7A3C; } .bys-tc-modal.tc-life  .bys-tc-soon { background:rgba(127,174,106,.16); }
.bys-tc-modal.tc-brand { background:#EAF1FA; border-color:#C2D8ED; } .bys-tc-modal.tc-brand .bys-tc-badge,.bys-tc-modal.tc-brand .bys-tc-close { background:#6E9BCF; } .bys-tc-modal.tc-brand .bys-tc-tag,.bys-tc-modal.tc-brand .bys-tc-soon { color:#3E6191; } .bys-tc-modal.tc-brand .bys-tc-soon { background:rgba(110,155,207,.16); }
.bys-tc-modal.tc-mind  { background:#FBF4E1; border-color:#E6D08F; } .bys-tc-modal.tc-mind  .bys-tc-badge,.bys-tc-modal.tc-mind  .bys-tc-close { background:#CBA85A; } .bys-tc-modal.tc-mind  .bys-tc-tag,.bys-tc-modal.tc-mind  .bys-tc-soon { color:#8A6A22; } .bys-tc-modal.tc-mind  .bys-tc-soon { background:rgba(203,168,90,.16); }
/* ══ 생각수업(Thinking Class) — Claude Design student/20·21 최신본 그대로 이식 (2026-07-28, 세이지그린·표지사진·목차·여는편지·하이라이터+메모) ══
   데스크탑=.tb-*/.wt-*(원본 클래스 그대로), 모바일=.tbm-*/.wtm-*(원본 tb-/wt-를 이름만 충돌 방지로 접두 변경, 값은 동일) */
body.bys-tc-mode #site-header, body.bys-tc-mode #bys-tab-bar { display: none !important; }
body.bys-tc-mode #screen-bys-day.active { position: fixed; inset: 0; z-index: 200; max-width: none; width: 100%; padding: 0; margin: 0; overflow: hidden; background: #EDEBE5; display: block; }
.bys-tc-mobile-only { display: block; height: 100vh; height: 100svh; height: 100dvh; }   /* 🎯 아이폰 Safari: 100vh는 하단 도구막대를 뺀 실제 화면보다 커서 푸터 버튼이 화면 밖으로 밀렸다(건의 송주연 2026-11-02). svh→dvh 3단 */
.bys-tc-desktop-only { display: none; height: 100vh; }
@media (min-width: 900px) {
  .bys-tc-mobile-only { display: none; }
  .bys-tc-desktop-only { display: block; }
}

/* ══ 반 게시판(위클리/데일리 트레이닝) — W594(2026-08-22, 대표님 지시) ══
   .bys-tc-*처럼 900px 분기로 모바일=세로스택/데스크탑=가로2열. TC모드와 달리 헤더·탭바는 그대로 유지. */
.bys-board-mobile-only { display: block; }
.bys-board-desktop-only { display: none; }
@media (min-width: 900px) {
  .bys-board-mobile-only { display: none; }
  .bys-board-desktop-only { display: block; }
  /* 🎯 W594 후속2(2026-08-22, 대표님 지시) — 데스크탑에서 5열 그리드가 답답하지 않도록 화면폭 확장.
     .screen 전역기본(740px)은 텍스트 읽기용 폭이라 갤러리형 게시판엔 너무 좁음 — 이 화면만 예외. */
  #screen-bys-board { max-width: 1100px; }
}
.bys-board-cols { display: flex; gap: 32px; }
.bys-board-cols .bys-board-section { flex: 1; min-width: 0; }
.bys-board-section { margin: 18px 0; }
.bys-board-section-h { font-size: .92rem; font-weight: 800; color: #333333; margin-bottom: 10px; }
/* 🎯 대표님 지시(2026-08-23) — 모바일 한 줄 3개는 썸네일이 너무 작아 2개로 축소.
   데스크탑은 그대로 5개 고정(아래 900px 분기).
   (썸네일 자체의 aspect-ratio:1/1은 index.html _bysBoardRenderGrid의 인라인 스타일에서 처리) */
.bys-board-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; min-height: 60px; }
@media (min-width: 900px) {
  .bys-board-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
}
.bys-board-empty { grid-column: 1/-1; text-align: center; color: #aaa; font-size: .8rem; padding: 16px 0; }

/* 🎯 대표님 지시(2026-08-23) — 데스크탑(900px+)에서 반 게시판 전체화면.
   .bys-tc-mode와 달리 헤더(#site-header)는 그대로 둬서 ◀ 돌아가기가 계속 동작 — 화면 본문만 풀뷰포트로 확장.
   JS 훅: showBysClassBoard()에서 진입, "다음: 교재 선택"·headerBackAction()에서 이탈(index.html). */
@media (min-width: 900px) {
  body.bys-board-mode #screen-bys-board.active {
    position: fixed;
    top: 64px; left: 0; right: 0; bottom: 0;
    max-width: none; width: 100%; margin: 0; padding: 0;
    overflow-y: auto;
    background: #F7F3EF;
    z-index: 150;
  }
  body.bys-board-mode #screen-bys-board #bys-board-body {
    max-width: 1100px !important;
    margin: 0 auto !important;
    padding: 32px 40px calc(80px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* ══════════════ 데스크탑 리더 (.tb-*) — 20-thinking-class-desktop.html 그대로 ══════════════ */
.tb-hl { background: linear-gradient(180deg,transparent 42%,rgba(240,214,138,.62) 42%); border-radius: 2px; cursor: pointer; }
.tb-hl.c2 { background: linear-gradient(180deg,transparent 42%,rgba(168,214,205,.62) 42%); }
.tb-hl.c3 { background: linear-gradient(180deg,transparent 42%,rgba(235,201,192,.7) 42%); }
.tb-hlbar { position: fixed; z-index: 90; display: none; gap: 6px; align-items: center; background: #2E2B22; border-radius: 100px; padding: 6px 8px; box-shadow: 0 8px 22px -8px rgba(0,0,0,.45); }
.tb-hlbar.on { display: flex; }
.tb-hlbar i { width: 20px; height: 20px; border-radius: 50%; cursor: pointer; border: 1.5px solid rgba(255,255,255,.35); display: block; }
.tb-hlbar i.y { background: #F0D68A; } .tb-hlbar i.m { background: #A8D6CD; } .tb-hlbar i.p { background: #EBC9C0; }
.tb-hlbar b { color: #fff; font-size: 11px; font-weight: 600; cursor: pointer; padding: 0 6px; letter-spacing: .02em; }
.tb-mark { margin-left: auto; display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 600; color: #8A857A; }
.tb-mark em { font-style: normal; color: #2E2B22; }
.tb-hl.note { box-shadow: inset 0 -1.5px 0 rgba(46,43,34,.35); }
.tb-hl.note::after { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #C4926E; vertical-align: 6px; margin-left: 2px; }

/* 학습 본문 형광펜 (W246/W258, 2026-08-10) — TC 하이라이터 색상 그대로 재사용 */
.bys-s-mark { background: linear-gradient(180deg,transparent 42%,rgba(240,214,138,.62) 42%); border-radius: 2px; cursor: pointer; }
.bys-s-mark.c2 { background: linear-gradient(180deg,transparent 42%,rgba(168,214,205,.62) 42%); }
.bys-s-mark.c3 { background: linear-gradient(180deg,transparent 42%,rgba(235,201,192,.7) 42%); }
.bys-s-mark.note { box-shadow: inset 0 -1.5px 0 rgba(46,43,34,.35); }
.bys-s-mark.note::after { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #C4926E; vertical-align: 6px; margin-left: 2px; }
.tb-pop { position: fixed; z-index: 95; display: none; width: 250px; background: #FFFCF4; border: 1px solid #E4DFD2; border-radius: 12px; box-shadow: 0 14px 34px -12px rgba(46,43,34,.35); padding: 12px; }
.tb-pop.on { display: block; }
.tb-pop h4 { margin: 0 0 7px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #A8A296; }
.tb-pop q { display: block; font-size: 11.5px; line-height: 1.6; color: #6B6659; border-left: 2px solid #F0D68A; padding-left: 8px; margin-bottom: 9px; quotes: none; max-height: 46px; overflow: hidden; }
.tb-pop textarea { width: 100%; box-sizing: border-box; height: 82px; resize: none; font-family: inherit; font-size: 12.5px; line-height: 1.6; color: #2E2B22; background: #fff; border: 1px solid #E4DFD2; border-radius: 8px; padding: 9px; }
.tb-pop textarea:focus { outline: none; border-color: #A8D6CD; }
.tb-pop .row { display: flex; gap: 6px; margin-top: 9px; }
.tb-pop button { flex: 1; font-family: inherit; font-size: 11.5px; font-weight: 700; border-radius: 100px; padding: 8px 0; cursor: pointer; border: 1px solid #E4DFD2; background: #fff; color: #6B6659; }
.tb-pop button.p { background: #2E2B22; border-color: #2E2B22; color: #FFFCF4; }

.tb { --tb: #8FA69C; --tb-deep: #6C8479; --tb-wash: #F2F5F3; --tb-line: #E6E4DE; --tb-mark: #CFE0DA;
  font-family: -apple-system, 'Helvetica Neue', 'Apple SD Gothic Neo', 'Noto Sans KR', system-ui, sans-serif; background: #EDEBE5; color: #221F17; height: 100vh; letter-spacing: -0.02em; display: flex; flex-direction: column; word-break: keep-all; overflow-wrap: break-word; }
.tb * { box-sizing: border-box; }
.tb-bar { height: 58px; flex: none; background: #FEFEFC; border-bottom: 1px solid var(--tb-line); display: flex; align-items: center; gap: 16px; padding: 0 24px; position: sticky; top: 0; z-index: 30; }
.tb-bar .back { font-size: 13.5px; font-weight: 600; color: #6C665A; cursor: pointer; }
.tb-bar .ttl { font-size: 14px; font-weight: 700; }
.tb-bar .ttl em { font-style: normal; font-weight: 500; color: #8A857A; margin-left: 8px; }
.tb-bar .sp { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.tb-btn { display: inline-flex; align-items: center; gap: 6px; font-family: inherit; font-size: 12.5px; font-weight: 600; letter-spacing: inherit; color: #6C665A; background: #FFFDF8; border: 1px solid var(--tb-line); border-radius: 100px; padding: 8px 15px; cursor: pointer; }
.tb-btn:hover { background: #F2F5F3; color: #221F17; }
.tb-btn.on { background: var(--tb); border-color: var(--tb); color: #FFFFFE; }
.tb-prog { height: 3px; flex: none; background: #E0DED7; }
.tb-prog i { display: block; height: 100%; width: 14%; background: var(--tb); transition: width .2s; }
.tb-desk { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 20px 20px 22px; overflow: hidden; }
.tb-spread { display: none; position: relative; grid-template-columns: 1fr 1fr; width: min(1378px, calc((100vh - 175px) * 1.45)); max-width: 100%; flex: none; height: min(950px, calc(100vh - 175px)); background: #FEFEFC; box-shadow: 0 22px 60px -26px rgba(34,31,23,.3), 0 2px 6px rgba(34,31,23,.07); }
.tb-spread.on { display: grid; }
.tb-spread::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 34px; transform: translateX(-50%); background: linear-gradient(90deg, rgba(34,31,23,0) 0%, rgba(34,31,23,.07) 42%, rgba(34,31,23,.11) 50%, rgba(34,31,23,.07) 58%, rgba(34,31,23,0) 100%); pointer-events: none; z-index: 5; }
.tb-pg { padding: 40px 64px 36px; overflow-y: auto; position: relative; display: flex; flex-direction: column; }
.tb-pg + .tb-pg { border-left: 1px solid #F0EFEA; }
.tb-fol { position: absolute; bottom: 14px; font-size: 11px; font-weight: 600; color: #B3AD9F; letter-spacing: .06em; }
.tb-pg:first-child .tb-fol { left: 64px; }
.tb-pg:last-child .tb-fol { right: 64px; }
.tb-open { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; transform: translateY(-10px); }
.tb-open .no { font-size: 40px; font-weight: 700; font-style: italic; line-height: 1; }
.tb-open .rule { width: 54px; height: 1px; background: #221F17; margin: 14px 0 16px; }
.tb-open .ko { font-size: 17px; font-weight: 600; letter-spacing: .01em; }
.tb-open .en { margin-top: 9px; font-size: 12.5px; font-weight: 500; font-style: italic; color: #8A857A; }
.tb-open .cls { position: absolute; top: 40px; left: 0; right: 0; text-align: center; font-size: 10.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: #B3AD9F; }
.tb-lead { flex: none; font-size: 15px; font-weight: 400; color: #6C665A; }
.tb-q { flex: none; margin-top: 15px; font-size: 15px; font-weight: 400; }
.tb-ans { flex: none; margin-top: 4px; width: 100%; resize: none; font-family: inherit; font-size: 15px; line-height: 24px; letter-spacing: inherit; color: #221F17; background-image: repeating-linear-gradient(180deg, transparent, transparent 23px, #D8D6CF 23px, #D8D6CF 24px); background-color: transparent; border: none; padding: 0; outline: none; height: 72px; }
.tb-ans::placeholder { color: #C4BEAF; }
.tb-ans:focus { background-image: repeating-linear-gradient(180deg, transparent, transparent 23px, var(--tb) 23px, var(--tb) 24px); }
.tb-ans.tall { height: 96px; }
.tb-hlq { margin: 34px auto 28px; text-align: center; flex: none; }
.tb-hlq span { display: inline-block; font-size: 15px; font-weight: 600; letter-spacing: .13em; padding: 3px 10px; background: var(--tb-mark); }
.tb-body { flex: 1; min-height: 0; overflow-y: auto; font-size: 15px; line-height: 1.95; color: #2E2B22; text-align: justify; text-wrap: pretty; }
.tb-body p { margin: 0 0 15px; }
.tb-body p:last-child { margin-bottom: 0; }
.tb-body p.tc-midq-q { margin-bottom: 4px; }
.tb-body b { font-weight: 700; }
.tb-body q { quotes: '\201C' '\201D'; font-weight: 600; }
.tb-weekly { flex: none; margin-top: 14px; padding-top: 14px; text-align: right; }
.tb-weekly.pin { margin-top: auto; }
.tb-weekly .k { font-size: 11px; font-weight: 600; color: #8A857A; letter-spacing: .04em; }
.tb-weekly .v { margin-top: 5px; font-size: 12.5px; font-weight: 600; font-style: italic; }
.tb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--tb-line); background: rgba(254,254,252,.78); color: #8A857A; font-size: 17px; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 8; }
.tb-nav:hover { background: #FEFEFC; color: #221F17; }
.tb-nav.l { left: 14px; } .tb-nav.r { right: 14px; }
.tb-cover { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; overflow-y: auto; }
.tb-cover .brand { font-size: 34px; font-weight: 300; letter-spacing: .22em; color: #7E958B; line-height: 1.1; flex: none; }
.tb-cover .brand span { color: #A7BAB2; }
.tb-cover .for { margin-top: 8px; font-size: 14px; font-weight: 400; font-style: italic; letter-spacing: .1em; color: #93A79E; flex: none; }
.tb-cover .rule { width: 250px; height: 1px; background: #D9D6CE; margin: 20px 0 16px; flex: none; }
.tb-cover .ko { font-size: 14px; font-weight: 600; letter-spacing: .04em; color: #3A3730; flex: none; }
.tb-cover .no { margin-top: 30px; font-size: 15.5px; font-weight: 500; letter-spacing: .04em; flex: none; }
.tb-cover .no em { font-style: normal; color: #7E958B; margin-left: 8px; }
.tb-cover .by { align-self: flex-end; margin-top: 18px; font-size: 10.5px; font-weight: 500; color: #9C978C; flex: none; }
.tb-photo { width: 100%; height: 240px; flex: none; margin-top: 20px; overflow: hidden; border-radius: 4px; }
.tb-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 34%; display: block; }
.tb-copy { margin: auto 0; text-align: center; font-size: 9.5px; font-weight: 500; line-height: 1.7; color: #9C978C; }
.tb-copy b { font-weight: 700; color: #6C665A; }
.tb-ct { flex: 1; min-height: 0; overflow-y: auto; }
.tb-ct h2 { margin: 6px 0 0; font-size: 29px; font-weight: 600; letter-spacing: -.01em; }
.tb-ct ol { margin: 24px 0 0; padding: 0; list-style: none; counter-reset: c; }
.tb-ct li { counter-increment: c; display: flex; gap: 16px; align-items: baseline; padding: 9px 0; font-size: 12.6px; font-weight: 500; color: #2E2B22; }
.tb-ct li::before { content: counter(c) "."; flex: none; width: 22px; text-align: right; font-size: 11px; font-weight: 600; color: #A7ABA2; }
.tb-ct li.on { font-weight: 700; cursor: pointer; }
.tb-ct li.on::before { color: var(--tb-deep); }
.tb-ct li.soon { color: #B3AD9F; }
.tb-lt-ttl { text-align: center; font-family: Georgia, 'Times New Roman', serif; font-style: italic; font-size: 25px; font-weight: 400; letter-spacing: .01em; flex: none; }
.tb-lt-rule { width: 200px; height: 1px; background: #D9D6CE; margin: 13px auto 20px; flex: none; }
.tb-lt { flex: 1; min-height: 0; overflow-y: auto; font-size: 10.2px; line-height: 1.5; color: #2E2B22; text-align: justify; text-wrap: pretty; }
.tb-lt p { margin: 0 0 17px; }
.tb-lt b { font-weight: 700; }
.tb-sign { flex: none; margin-top: 22px; text-align: center; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; color: var(--tb-deep); }
.tb-foot { height: 56px; flex: none; background: #FEFEFC; border-top: 1px solid var(--tb-line); display: flex; align-items: center; gap: 14px; padding: 0 24px; }
.tb-foot .pg { font-size: 12.5px; font-weight: 600; color: #8A857A; }
.tb-foot .sp { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.tb-size { display: flex; gap: 4px; }
.tb-size button { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--tb-line); background: #FEFEFC; font-family: inherit; font-weight: 600; color: #6C665A; cursor: pointer; }
.tb-size button:nth-child(1) { font-size: 11px; } .tb-size button:nth-child(2) { font-size: 13px; } .tb-size button:nth-child(3) { font-size: 15px; }
.tb-size button.on { background: var(--tb); border-color: var(--tb); color: #FFFFFE; }
.tb a { color: var(--tb-deep); }
.tb a:hover { color: #221F17; }
.tb.fs-sm .tb-body, .tb.fs-sm .tb-lead, .tb.fs-sm .tb-q, .tb.fs-sm .tb-ans { font-size: 13.3px; } .tb.fs-lg .tb-body, .tb.fs-lg .tb-lead, .tb.fs-lg .tb-q, .tb.fs-lg .tb-ans { font-size: 17.4px; }

/* ══════════════ 데스크탑 Weekly topic (.wt-*) — 21-weekly-topic-desktop.html 그대로 ══════════════ */
.wt { --wt: #8FA69C; --wt-deep: #6C8479; --wt-wash: #F2F5F3; --wt-line: #E6E4DE; --wt-mark: #CFE0DA; --wt-fix: #A79C86; --wt-fix-deep: #7E7460;
  font-family: -apple-system, 'Helvetica Neue', 'Apple SD Gothic Neo', 'Noto Sans KR', system-ui, sans-serif; background: #EDEBE5; color: #221F17; height: 100vh; letter-spacing: -0.02em; display: flex; flex-direction: column; word-break: keep-all; overflow-wrap: break-word; }
.wt * { box-sizing: border-box; }
.wt-bar { height: 58px; flex: none; background: #FEFEFC; border-bottom: 1px solid var(--wt-line); display: flex; align-items: center; gap: 16px; padding: 0 24px; position: sticky; top: 0; z-index: 30; }
.wt-bar .back { font-size: 13.5px; font-weight: 600; color: #6C665A; cursor: pointer; }
.wt-bar .ttl { font-size: 14px; font-weight: 700; }
.wt-bar .ttl em { font-style: normal; font-weight: 500; color: #8A857A; margin-left: 8px; }
.wt-bar .sp { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.wt-btn { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; font-family: inherit; font-size: 12.5px; font-weight: 600; letter-spacing: inherit; color: #6C665A; background: #FEFEFC; border: 1px solid var(--wt-line); border-radius: 100px; padding: 8px 15px; cursor: pointer; }
.wt-btn:hover { background: #F6F2E7; color: #221F17; }
.wt-btn.on { background: var(--wt); border-color: var(--wt); color: #FFFCF2; }
.wt-btn:disabled { opacity: .6; cursor: default; }
.wt-prog { height: 3px; flex: none; background: #DED8C9; }
.wt-prog i { display: block; height: 100%; width: 92%; background: var(--wt); }
.wt-desk { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 20px 20px 22px; overflow: hidden; }
.wt-spread { position: relative; display: grid; grid-template-columns: 1fr 1fr; width: min(1378px, calc((100vh - 175px) * 1.45)); max-width: 100%; filter: drop-shadow(0 22px 34px rgba(72,60,36,.13)); flex: none; height: min(950px, calc(100vh - 175px)); background: #FEFEFC; box-shadow: 0 22px 60px -26px rgba(34,31,23,.36), 0 2px 6px rgba(34,31,23,.08); }
.wt-spread::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 34px; transform: translateX(-50%); background: linear-gradient(90deg, rgba(34,31,23,0) 0%, rgba(34,31,23,.07) 42%, rgba(34,31,23,.11) 50%, rgba(34,31,23,.07) 58%, rgba(34,31,23,0) 100%); pointer-events: none; z-index: 5; }
.wt-pg { padding: 34px 44px 32px; overflow-y: auto; position: relative; display: flex; flex-direction: column; min-height: 0; }
.wt-pg + .wt-pg { border-left: 1px solid #F1EDE1; }
.wt-fol { position: absolute; bottom: 16px; font-size: 11px; font-weight: 600; color: #B3AD9F; letter-spacing: .06em; }
.wt-pg:first-child .wt-fol { left: 46px; }
.wt-pg:last-child .wt-fol { right: 46px; }
.wt-kick { display: flex; align-items: center; gap: 8px; font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #B3AD9F; flex: none; }
.wt-kick i { width: 4px; height: 4px; border-radius: 50%; background: var(--wt); flex: none; }
.wt-h { margin: 13px 0 0; font-size: 20px; font-weight: 700; flex: none; }
.wt-sub { margin: 6px 0 0; font-size: 12.2px; font-weight: 400; color: #6C665A; line-height: 1.6; flex: none; }
.wt-topic { margin-top: 16px; padding: 14px 16px; background: var(--wt-wash); border: 1px solid var(--wt-line); border-radius: 12px; flex: none; }
.wt-topic .k { font-size: 9.8px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: #9A9384; }
.wt-topic .v { margin-top: 7px; font-size: 16.5px; font-weight: 500; font-style: italic; letter-spacing: -.005em; }
.wt-topic .g { margin-top: 7px; font-size: 11.5px; font-weight: 400; color: #7C7568; line-height: 1.65; }
.wt-write { margin-top: 14px; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.wt-ta { flex: 1; width: 100%; resize: none; font-family: 'Gaegu', -apple-system, 'Helvetica Neue', 'Apple SD Gothic Neo', 'Noto Sans KR', system-ui, sans-serif; font-size: 17.5px; color: #221F17 !important; line-height: 29px; letter-spacing: inherit; background-image: repeating-linear-gradient(180deg, transparent, transparent 28px, #DCD6C6 28px, #DCD6C6 29px); background-color: transparent; border: none; padding: 0; outline: none; }
.wt-ta::placeholder { color: #BDB7A8; }
.wt-wfoot { margin-top: 11px; display: flex; align-items: center; gap: 10px; font-size: 11.5px; font-weight: 600; color: #B3AD9F; flex: none; }
.wt-wfoot .sp { margin-left: auto; display: flex; gap: 8px; }
.wt-score { margin-top: 11px; display: flex; align-items: stretch; gap: 10px; flex: none; }
.wt-sc { flex: 1; border: 1px solid var(--wt-line); border-radius: 11px; padding: 8px 12px; background: #FEFEFC; }
.wt-sc .l { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; color: #8A857A; }
.wt-sc .v { margin-top: 3px; font-size: 19px; font-weight: 700; line-height: 1; }
.wt-sc .v small { font-size: 11px; font-weight: 600; color: #B3AD9F; margin-left: 2px; }
.wt-sc.good { background: #F1F7F5; border-color: #D5E6E3; }
.wt-sc.good .v { color: #638679; }
.wt-lbl { margin-top: 11px; display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--wt-fix-deep); flex: none; }
.wt-lbl i { width: 4px; height: 4px; border-radius: 50%; background: var(--wt-fix); flex: none; }
.wt-diff { margin-top: 8px; flex: none; font-size: 12.4px; line-height: 1.82; color: #2E2B22; text-wrap: pretty; }
.wt-diff del { text-decoration: line-through; text-decoration-color: rgba(180,86,58,.55); color: #A9847A; }
.wt-diff ins { text-decoration: none; font-weight: 600; background: linear-gradient(transparent 62%, rgba(196,146,110,.3) 0); }
.wt-notes { margin-top: 4px; display: flex; flex-direction: column; gap: 0; overflow-y: auto; flex: 1; min-height: 0; padding-right: 2px; }
.wt-note { padding: 9px 0 9px 15px; border-top: 1px solid var(--wt-line); position: relative; }
.wt-note:first-child { border-top: none; }
.wt-note::before { content: ""; position: absolute; left: 0; top: 15px; width: 5px; height: 5px; border-radius: 50%; background: var(--wt-fix); }
.wt-note .t { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; }
.wt-tag { font-size: 10px; font-weight: 700; letter-spacing: .1em; color: var(--wt-fix-deep); background: none; padding: 0; text-transform: uppercase; }
.wt-tag.gram { color: #7E7460; } .wt-tag.word { color: #6C8479; } .wt-tag.flow { color: #8A8296; }
.wt-note .b { margin-top: 3px; font-size: 12.1px; font-weight: 500; line-height: 1.5; color: #4C483E; }
.wt-note .b b { font-weight: 700; color: #221F17; }
.wt-praise { flex: none; margin-top: 16px; padding: 13px 0 0; border-top: 1px solid var(--wt-line); font-size: 12.2px; font-weight: 500; line-height: 1.7; color: #5A6E67; font-style: italic; }
.wt-praise b { font-weight: 700; }
.wt-nav { position: absolute; bottom: 18px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--wt-line); background: rgba(254,254,252,.78); color: #8A857A; font-size: 14px; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 8; }
.wt-nav:hover { background: #FEFEFC; color: #221F17; }
.wt-nav.l { left: 50%; margin-left: -44px; } .wt-nav.r { left: 50%; margin-left: 10px; }
.wt-foot { height: 56px; flex: none; background: #FEFEFC; border-top: 1px solid var(--wt-line); display: flex; align-items: center; gap: 14px; padding: 0 24px; }
.wt-foot .pg { font-size: 12.5px; font-weight: 600; color: #8A857A; }
.wt-foot .sp { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.wt a { color: var(--wt-deep); }
.wt a:hover { color: #221F17; }

/* ══════════════ 모바일 리더 (.tbm-*) — 20-thinking-class.html(모바일) 그대로, 클래스명만 tb→tbm(데스크탑과 충돌 방지) ══════════════ */
.tbm { --tbm: #8FA69C; --tbm-deep: #6C8479; --tbm-wash: #F2F5F3; --tbm-line: #E6E4DE; --tbm-mark: #CFE0DA;
  font-family: -apple-system, 'Helvetica Neue', 'Apple SD Gothic Neo', 'Noto Sans KR', system-ui, sans-serif; background: #EDEBE5; color: #221F17; height: 100vh; height: 100svh; height: 100dvh; letter-spacing: -0.02em; display: flex; flex-direction: column; word-break: keep-all; overflow-wrap: break-word; }
.tbm * { box-sizing: border-box; }
.tbm-bar { flex: none; background: #FEFEFC; border-bottom: 1px solid var(--tbm-line); padding: 12px 18px 11px; position: sticky; top: 0; z-index: 30; }
.tbm-bar .back { font-size: 13px; font-weight: 600; color: #6C665A; }
.tbm-bar .ttl { display: block; margin-top: 5px; font-size: 14.5px; font-weight: 700; }
.tbm-bar .ttl em { display: block; font-style: normal; font-size: 12px; font-weight: 500; color: #8A857A; margin-top: 3px; }
.tbm-prog { height: 3px; flex: none; background: #E0DED7; }
.tbm-prog i { display: block; height: 100%; width: 14%; background: var(--tbm); transition: width .25s ease; }
.tbm-btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-family: inherit; font-size: 13px; font-weight: 600; letter-spacing: inherit; color: #6C665A; background: #FFFDF8; border: 1px solid var(--tbm-line); border-radius: 100px; padding: 12px 17px; cursor: pointer; }
.tbm-btn.on { background: var(--tbm); border-color: var(--tbm); color: #FFFFFE; }
.tbm-btn.wide { flex: 1; }
.tbm-tabs { flex: none; background: #FEFEFC; border-bottom: 1px solid var(--tbm-line); display: flex; gap: 6px; padding: 10px 14px; overflow-x: auto; }
.tbm-tabs button { flex: none; font-family: inherit; font-size: 12px; font-weight: 600; letter-spacing: inherit; color: #8A857A; background: none; border: 1px solid var(--tbm-line); border-radius: 100px; padding: 7px 14px; cursor: pointer; }
.tbm-tabs button.on { background: var(--tbm); border-color: var(--tbm); color: #FFFFFE; }
.tbm-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 14px 20px; display: flex; flex-direction: column; gap: 14px; }
.tbm-sp { display: none; flex-direction: column; gap: 14px; }
.tbm-sp.on { display: flex; }
.tbm-pg { background: #FEFEFC; box-shadow: 0 14px 34px -18px rgba(34,31,23,.28), 0 1px 3px rgba(34,31,23,.06); padding: 30px 24px 26px; position: relative; display: flex; flex-direction: column; }
.tbm-fol { margin-top: 20px; font-size: 11px; font-weight: 600; color: #B3AD9F; letter-spacing: .06em; }
.tbm-cover { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.tbm-cover .brand { font-size: 29px; font-weight: 300; letter-spacing: .2em; color: #7E958B; line-height: 1.15; }
.tbm-cover .brand span { color: #A7BAB2; }
.tbm-cover .for { margin-top: 8px; font-size: 13px; font-weight: 400; font-style: italic; letter-spacing: .1em; color: #93A79E; }
.tbm-cover .rule { width: 200px; height: 1px; background: #D9D6CE; margin: 18px 0 14px; }
.tbm-cover .ko { font-size: 13.5px; font-weight: 600; letter-spacing: .04em; color: #3A3730; }
.tbm-cover .no { margin-top: 30px; font-size: 15px; font-weight: 500; letter-spacing: .04em; }
.tbm-cover .no em { font-style: normal; color: #7E958B; margin-left: 8px; }
.tbm-cover .by { align-self: flex-end; margin-top: 24px; font-size: 10.5px; font-weight: 500; color: #9C978C; }
.tbm-photo { width: 100%; height: 260px; margin-top: 8px; overflow: hidden; border-radius: 4px; }
.tbm-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 34%; display: block; }
.tbm-copy { margin-top: 22px; text-align: center; font-size: 9.5px; font-weight: 500; line-height: 1.7; color: #9C978C; }
.tbm-copy b { font-weight: 700; color: #6C665A; }
.tbm-ct h2 { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: -.01em; }
.tbm-ct ol { margin: 24px 0 0; padding: 0; list-style: none; counter-reset: c; }
.tbm-ct li { counter-increment: c; display: flex; gap: 14px; align-items: baseline; padding: 10px 0; font-size: 13px; font-weight: 500; color: #2E2B22; }
.tbm-ct li.on { font-weight: 700; cursor: pointer; }
.tbm-ct li::before { content: counter(c) "."; flex: none; width: 20px; text-align: right; font-size: 11px; font-weight: 600; color: #A7ABA2; }
.tbm-ct li.on::before { color: var(--tbm-deep); }
.tbm-ct li.soon { color: #B3AD9F; }
.tbm-lt-ttl { text-align: center; font-family: Georgia, 'Times New Roman', serif; font-style: italic; font-size: 23px; font-weight: 400; }
.tbm-lt-rule { width: 170px; height: 1px; background: #D9D6CE; margin: 13px auto 20px; }
.tbm-lt { font-size: 12px; line-height: 2.1; color: #2E2B22; text-align: justify; text-wrap: pretty; }
.tbm-lt p { margin: 0 0 17px; }
.tbm-lt b { font-weight: 700; }
.tbm-sign { margin-top: 20px; text-align: center; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; color: var(--tbm-deep); }
.tbm-open { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 26px 0 30px; }
.tbm-open .cls { font-size: 10.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: #B3AD9F; }
.tbm-open .no { margin-top: 26px; font-size: 38px; font-weight: 700; font-style: italic; line-height: 1; }
.tbm-open .rule { width: 54px; height: 1px; background: #221F17; margin: 14px 0 16px; }
.tbm-open .ko { font-size: 17px; font-weight: 600; letter-spacing: .01em; }
.tbm-open .en { margin-top: 9px; font-size: 12.5px; font-weight: 500; font-style: italic; color: #8A857A; }
.tbm-lead { font-size: 15px; font-weight: 400; color: #6C665A; }
.tbm-q { margin-top: 14px; font-size: 15px; font-weight: 400; line-height: 1.5; }
.tbm-ans { margin-top: 4px; display: block; width: 100%; height: 90px; resize: none; font-family: inherit; font-size: 15px; line-height: 30px; letter-spacing: inherit; color: #221F17; background-image: repeating-linear-gradient(180deg, transparent, transparent 29px, #D8D6CF 29px, #D8D6CF 30px); background-color: transparent; border: none; padding: 0; outline: none; }
.tbm-ans::placeholder { color: #C4BEAF; }
.tbm-ans:focus { background-image: repeating-linear-gradient(180deg, transparent, transparent 29px, var(--tbm) 29px, var(--tbm) 30px); }
.tbm-hlq { margin: 32px auto 26px; text-align: center; }
.tbm-hlq span { display: inline-block; font-size: 15px; font-weight: 600; letter-spacing: .12em; padding: 3px 10px; background: var(--tbm-mark); }
.tbm-body { font-size: 15px; line-height: 1.95; color: #2E2B22; text-wrap: pretty; }
.tbm-body p { margin: 0 0 15px; text-indent: 1em; }
.tbm-body p:last-child { margin-bottom: 0; }
.tbm-body p.tc-midq-q { margin-bottom: 4px; }
.tbm-body b { font-weight: 700; }
.tbm-body q { quotes: '\201C' '\201D'; font-weight: 600; }
.tbm-weekly { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--tbm-line); text-align: right; }
.tbm-weekly .k { font-size: 11px; font-weight: 600; color: #8A857A; letter-spacing: .04em; }
.tbm-weekly .v { margin-top: 5px; font-size: 12.5px; font-weight: 600; font-style: italic; }
.tbm-turn { display: flex; gap: 8px; }
.tbm-foot { flex: none; position: sticky; bottom: 0; background: #FEFEFC; border-top: 1px solid var(--tbm-line); padding: 11px 14px 14px; padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 8px; }
.tbm-foot .pg { font-size: 11.5px; font-weight: 600; color: #8A857A; }
.tbm-foot .row { display: flex; gap: 8px; align-items: center; }
.tbm-size { display: flex; gap: 4px; margin-left: auto; }
.tbm-size button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--tbm-line); background: #FEFEFC; font-family: inherit; font-weight: 600; color: #6C665A; cursor: pointer; }
.tbm-size button.on { background: var(--tbm); border-color: var(--tbm); color: #FFFFFE; }
.tbm a { color: var(--tbm-deep); }
.tbm a:hover { color: #221F17; }
.tbm.fs-sm .tbm-body, .tbm.fs-sm .tbm-lead, .tbm.fs-sm .tbm-q, .tbm.fs-sm .tbm-ans { font-size: 13.4px; } .tbm.fs-lg .tbm-body, .tbm.fs-lg .tbm-lead, .tbm.fs-lg .tbm-q, .tbm.fs-lg .tbm-ans { font-size: 17.3px; }
/* 모바일 하이라이트(선택→탭바) — 데스크탑과 동일 톤, 접두만 tbm */
.tbm-hl { background: linear-gradient(180deg,transparent 42%,rgba(240,214,138,.62) 42%); border-radius: 2px; }
.tbm-hl.c2 { background: linear-gradient(180deg,transparent 42%,rgba(168,214,205,.62) 42%); }
.tbm-hl.c3 { background: linear-gradient(180deg,transparent 42%,rgba(235,201,192,.7) 42%); }
.tbm-hlbar { position: fixed; z-index: 90; display: none; gap: 6px; align-items: center; background: #2E2B22; border-radius: 100px; padding: 7px 9px; box-shadow: 0 8px 22px -8px rgba(0,0,0,.45); }
.tbm-hlbar.on { display: flex; }
.tbm-hlbar i { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.35); display: block; }
.tbm-hlbar i.y { background: #F0D68A; } .tbm-hlbar i.m { background: #A8D6CD; } .tbm-hlbar i.p { background: #EBC9C0; }
.tbm-hlbar b { color: #fff; font-size: 12px; font-weight: 600; padding: 0 6px; }

/* ══════════════ 모바일 Weekly topic (.wtm-*) — 21-weekly-topic.html(모바일) 그대로, 클래스명만 wt→wtm ══════════════ */
.wtm { --wtm: #8FA69C; --wtm-deep: #6C8479; --wtm-wash: #F2F5F3; --wtm-line: #E6E4DE; --wtm-fix: #A79C86; --wtm-fix-deep: #7E7460;
  font-family: -apple-system, 'Helvetica Neue', 'Apple SD Gothic Neo', 'Noto Sans KR', system-ui, sans-serif; background: #EDEBE5; color: #221F17; height: 100vh; height: 100svh; height: 100dvh; letter-spacing: -0.02em; display: flex; flex-direction: column; word-break: keep-all; overflow-wrap: break-word; }
.wtm * { box-sizing: border-box; }
.wtm-bar { flex: none; background: #FEFEFC; border-bottom: 1px solid var(--wtm-line); padding: 12px 18px 11px; position: sticky; top: 0; z-index: 30; }
.wtm-bar .back { font-size: 13px; font-weight: 600; color: #6C665A; }
.wtm-bar .ttl { display: block; margin-top: 5px; font-size: 14.5px; font-weight: 700; }
.wtm-bar .ttl em { display: block; font-style: normal; font-size: 12px; font-weight: 500; color: #8A857A; margin-top: 3px; }
.wtm-prog { height: 3px; flex: none; background: #DED8C9; }
.wtm-prog i { display: block; height: 100%; width: 92%; background: var(--wtm); }
.wtm-btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-family: inherit; font-size: 13px; font-weight: 600; letter-spacing: inherit; color: #6C665A; background: #FEFEFC; border: 1px solid var(--wtm-line); border-radius: 100px; padding: 12px 17px; cursor: pointer; }
.wtm-btn.on { background: var(--wtm); border-color: var(--wtm); color: #FFFCF2; }
.wtm-btn.wide { flex: 1; }
.wtm-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 14px 20px; display: flex; flex-direction: column; gap: 14px; }
.wtm-pg { background: #FEFEFC; box-shadow: 0 14px 34px -18px rgba(34,31,23,.3), 0 1px 3px rgba(34,31,23,.07); padding: 26px 24px 30px; position: relative; }
.wtm-fol { margin-top: 20px; font-size: 11px; font-weight: 600; color: #B3AD9F; letter-spacing: .06em; }
.wtm-kick { display: flex; align-items: center; gap: 8px; font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #B3AD9F; }
.wtm-kick i { width: 4px; height: 4px; border-radius: 50%; background: var(--wtm); flex: none; }
.wtm-h { margin: 12px 0 0; font-size: 19px; font-weight: 700; line-height: 1.35; }
.wtm-sub { margin: 7px 0 0; font-size: 12.5px; font-weight: 500; color: #6C665A; line-height: 1.65; }
.wtm-topic { margin-top: 16px; padding: 13px 14px; background: var(--wtm-wash); border: 1px solid var(--wtm-line); border-radius: 12px; }
.wtm-topic .v { font-size: 16px; font-weight: 500; font-style: italic; line-height: 1.45; }
.wtm-topic .g { margin-top: 7px; font-size: 11.5px; font-weight: 400; color: #7C7568; line-height: 1.65; }
.wtm-ta { margin-top: 16px; display: block; width: 100%; height: 348px; resize: none; font-family: 'Gaegu', -apple-system, 'Helvetica Neue', 'Apple SD Gothic Neo', 'Noto Sans KR', system-ui, sans-serif; font-size: 17.5px; color: #3A3324; line-height: 29px; letter-spacing: inherit; background-image: repeating-linear-gradient(180deg, transparent, transparent 28px, #DCD6C6 28px, #DCD6C6 29px); background-color: transparent; border: none; padding: 0; outline: none; }
.wtm-ta::placeholder { color: #BDB7A8; }
.wtm-wfoot { margin-top: 13px; font-size: 11.5px; font-weight: 600; color: #B3AD9F; }
.wtm-acts { margin-top: 11px; display: flex; gap: 8px; }
.wtm-lbl { margin-top: 16px; display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--wtm-fix-deep); }
.wtm-lbl i { width: 4px; height: 4px; border-radius: 50%; background: var(--wtm-fix); flex: none; }
.wtm-diff { margin-top: 9px; font-size: 13px; line-height: 1.85; color: #2E2B22; text-wrap: pretty; }
.wtm-diff del { text-decoration: line-through; text-decoration-color: rgba(180,86,58,.55); color: #A9847A; }
.wtm-diff ins { text-decoration: none; font-weight: 600; background: linear-gradient(transparent 62%, rgba(196,146,110,.3) 0); }
.wtm-notes { margin-top: 6px; display: flex; flex-direction: column; }
.wtm-note { padding: 11px 0 11px 15px; border-top: 1px solid var(--wtm-line); position: relative; }
.wtm-note:first-child { border-top: none; }
.wtm-note::before { content: ""; position: absolute; left: 0; top: 17px; width: 5px; height: 5px; border-radius: 50%; background: var(--wtm-fix); }
.wtm-note .t { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; }
.wtm-tag { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.wtm-tag.gram { color: #7E7460; } .wtm-tag.word { color: #6C8479; } .wtm-tag.flow { color: #8A8296; }
.wtm-note .b { margin-top: 4px; font-size: 12.5px; font-weight: 500; line-height: 1.55; color: #4C483E; }
.wtm-note .b b { font-weight: 700; color: #221F17; }
.wtm-praise { margin-top: 16px; padding: 14px 0 0; border-top: 1px solid var(--wtm-line); font-size: 12.5px; font-weight: 500; line-height: 1.75; color: #5A6E67; font-style: italic; }
.wtm-praise b { font-weight: 700; }
.wtm-foot { flex: none; position: sticky; bottom: 0; background: #FEFEFC; border-top: 1px solid var(--wtm-line); padding: 11px 14px 14px; padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 8px; }
.wtm-foot .pg { font-size: 11.5px; font-weight: 600; color: #8A857A; }
.wtm-foot .row { display: flex; gap: 8px; }
.wtm a { color: var(--wtm-deep); }
.wtm a:hover { color: #221F17; }
.bys-sentence-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.bys-sentence { display: flex; gap: 12px; padding: 14px 16px; background: #F3FBF8; border: 1px solid #CDE7CC; border-radius: 12px; align-items: flex-start; }
.bys-s-num { flex-shrink: 0; width: 28px; height: 28px; background: #fff; color: #638679; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .82rem; border: 1px solid #CDE7CC; }
.bys-s-body { flex: 1; min-width: 0; }
.bys-s-ko { font-size: .96rem; color: #2A2A2A; line-height: 1.55; font-weight: 600; cursor: pointer; }
.bys-s-en { display: flex; align-items: center; gap: 10px; font-size: 1rem; color: #333333; line-height: 1.5; font-weight: 600; margin-top: 8px; padding-top: 8px; border-top: 1px solid #CDE7CC; letter-spacing: -.005em; }
.bys-s-en > .bys-s-speak { flex-shrink: 0; }
.bys-s-en > .bys-s-speak:first-of-type { margin-left: auto; }
.bys-s-en-text { flex: 1; min-width: 0; }
/* 영어 가리기 토글(대표님 지시 2026-08-11) — 텍스트만 숨기고 듣기 버튼은 그대로 둬서, 가려놓고 스스로
   말해본 뒤 발음을 들어 확인할 수 있게 함 */
body.bys-en-hidden #screen-bys-day .bys-s-en-text { display: none; }
.bys-en-hide-toggle { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 600; color: #8A857A; background: #F0ECE1; border: none; border-radius: 980px; padding: 4px 10px; cursor: pointer; }
.bys-en-hide-toggle.on { color: #638679; background: #EDF5F3; }
/* 🎯 v2(2026-09-03, 대표님 UI피드백) — 박스(.bys-s-en)는 항상 그대로 유지, 내부 텍스트 3종만 전환.
   1:전체빈칸(밑줄) 2:핵심구조만빈칸(폴백=레벨3과 동일) 3:전체공개. TIP은 레벨3에서만 노출. */
.bys-en-lv-btns { display: inline-flex; gap: 4px; margin-right: 3px; }
/* 대표님 지시(2026-09-24) — 1/2/3류 버튼 그룹 간격을 모든 교재에서 동일하게(.bys-en-lv-btns와 같은 4px) */
.bys-passage-lv-btns { gap: 4px; }
/* 🎯 v8(2026-09-03, 대표님 제보) — v7에서 display:inline-block을 넣는 바람에 박스가 내용물
   크기로 쪼그라들어 text-align:right가 밀 여백이 없어져 버튼이 왼쪽에 붙어버렸다. 특별한
   display 지정을 없애 기본 block(전체너비)으로 되돌려 text-align:right가 다시 작동하게 한다. */
.bys-en-lv-sticky-wrap { }
.bys-en-lv-btn { font-size: 11px; font-weight: 700; color: #8A857A; background: #F0ECE1; border: none; border-radius: 980px; width: 22px; height: 22px; line-height: 22px; text-align: center; padding: 0; cursor: pointer; }
.bys-en-lv-btn.on { color: #fff; background: #638679; }
/* 🎯 v8(2026-09-04, 근본구조변경) — 폭 추정(캔버스/DOM측정) 대신 실제 단어 텍스트를 그대로
   렌더하고 색만 투명 처리한다(밑줄만 보이고 글자는 안 보임). 레벨1/2/3이 항상 완전히 동일한
   실제 텍스트로 렌더되므로 폭 불일치가 구조적으로 발생할 수 없다.
   🚨 직전 시도(커닝 끄기)는 특정 랜덤조합에서는 효과가 있었지만 재검증(다른 조합)에서 효과가
   전혀 없는 경우도 확인돼 근본원인이 아니었음 — 그 규칙은 제거, 이 구조변경으로 대체.
   🚨 재수정 — border-bottom은 박스 높이에 몇 px씩 더해져(줄마다 빈칸 있는지에 따라 다르게)
   레벨2/3 전체 블록 높이가 아주 살짝 어긋났다(단어 위치 자체는 완벽히 일치, 순수 장식 높이차만).
   text-decoration은 박스 모델에 전혀 영향을 안 주므로 border 대신 사용. */
.bys-blank-u { color: transparent; text-decoration: underline; text-decoration-color: #3A3A3A; text-decoration-thickness: 2px; cursor: default; text-decoration-skip-ink: none; }
/* 🐛 fix(2026-09-20, 대표님 제보) — text-decoration-skip-ink:auto(기본값)가 color:transparent인 텍스트에서 단어 사이 공백마다 밑줄을 끊어 보이게 함(여러 단어가 하나로 병합된 빈칸인데도 단어 개수만큼 끊긴 것처럼 보임). none으로 명시해 완전히 연속된 밑줄로 표시. */
/* 🎯 v1(2026-09-04, 대표님 지시) — 밑줄에 마우스를 올리면 답 단어가 보이도록(호버 미리보기)
   🎯 v2(2026-09-04, 대표님 재지시) — 페이드 없이 닿자마자 즉시 보이도록(transition 제거),
   텍스트 커서(I-beam)로 안 바뀌도록 cursor:default 명시 */
.bys-blank-u:hover { color: #333333; }
.bys-item-en3lv .bys-en-lv2-content, .bys-item-en3lv .bys-en-lv3-content { display: none; }
body.bys-en-lv-2 .bys-item-en3lv .bys-en-lv1-content, body.bys-en-lv-2 .bys-item-en3lv .bys-en-lv3-content { display: none; }
body.bys-en-lv-2 .bys-item-en3lv .bys-en-lv2-content { display: inline; }
body.bys-en-lv-3 .bys-item-en3lv .bys-en-lv1-content, body.bys-en-lv-3 .bys-item-en3lv .bys-en-lv2-content { display: none; }
body.bys-en-lv-3 .bys-item-en3lv .bys-en-lv3-content { display: inline; }
/* 🎯 v9(2026-09-03, 대표님 지시) — TIP을 레벨(1/2/3)과 분리, 별도 T버튼으로 독립 토글.
   레벨 전환 시 TIP이 나타났다 사라졌다 하며 높이가 바뀌어 보던 자리가 흐트러지는 문제 해소. */
.bys-item-en3lv .bys-tip-toggleable { display: none; }
body.bys-tip-on .bys-item-en3lv .bys-tip-toggleable { display: block; }
.bys-tip-toggle-btn.on { color: #fff; background: #C9A961; }
/* 대표님 지시(2026-09-24) — 본문(ENGLISH) 1/2/3 공개 버튼(1=전체공개→3=20%만공개). bys-en-lv-*와
   방향이 반대라 완전히 별도 클래스로 분리 */
.bys-passage-en3lv .bys-passage-lv2-content, .bys-passage-en3lv .bys-passage-lv3-content { display: none; }
body.bys-passage-lv-2 .bys-passage-en3lv .bys-passage-lv1-content, body.bys-passage-lv-2 .bys-passage-en3lv .bys-passage-lv3-content { display: none; }
body.bys-passage-lv-2 .bys-passage-en3lv .bys-passage-lv2-content { display: block; }
body.bys-passage-lv-3 .bys-passage-en3lv .bys-passage-lv1-content, body.bys-passage-lv-3 .bys-passage-en3lv .bys-passage-lv2-content { display: none; }
body.bys-passage-lv-3 .bys-passage-en3lv .bys-passage-lv3-content { display: block; }

/* 🎯 v10(2026-09-03, 대표님 지시) — 한글 뜻 핵심구조 민트 강조(영어 레벨버튼 민트와 동일 색) */
.bys-ko-struct, .bys-en-struct { color: #638679; font-weight: 700; }

/* 🎯 W544(2026-08-29, 대표님 직접지시) — 핸즈프리 토글(모든 AI대화 공통, mic-meta 영역) */
.bys-hf-toggle { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 600; color: #8A857A; background: #F0ECE1; border: none; border-radius: 980px; padding: 4px 10px; cursor: pointer; margin-top: 4px; }
.bys-hf-toggle.on { color: #638679; background: #EDF5F3; }
/* 단일문장 item: 한국어에 올리거나(모바일=탭) 하면 짝 영어를 그 자리에서 하이라이트 */
.bys-s-ko.bys-s-hl, .bys-s-en-text.bys-s-hl, .bys-s-en-text.bys-s-audio-hl { background: #FBECC8; box-shadow: 0 0 0 3px #FBECC8; border-radius: 4px; display: inline-block; flex: 0 1 auto; min-width: 0; }
/* 🚨 fix→재수정(2026-09-03, 대표님 제보) — 위 flex:1 임시복원이 하이라이트 배경을 박스 끝까지
   늘려버리는 새 버그를 만듦(노란 바가 문장 끝을 넘어감). 진짜 원인은 .bys-s-speak 버튼 2개가 둘 다
   margin-left:auto라 여유공간이 둘로 쪼개져 분배되던 것 — 위에서 첫 버튼에만 auto를 주도록 고쳐
   버튼 위치가 본문 폭과 무관하게 항상 고정되게 했으므로, 여기서는 flex:none 기본값을 그대로 둬
   하이라이트 배경이 텍스트 폭에 딱 맞게 나온다. */
/* 여러 문장 item(pairs): 한 문장씩 대응 — 한국어 문장에 올리거나(탭) 하면 짝 영어 '문장'을 노란색 하이라이트 (3.0A 방식) */
.bys-s-psent { cursor: pointer; }
.bys-s-psent.bys-s-hl, .bys-s-pen.bys-s-hl { background: #FBECC8; box-shadow: 0 0 0 2px #FBECC8; border-radius: 3px; }
.bys-s-clause.bys-s-hl { background: #FBECC8; box-shadow: 0 0 0 2px #FBECC8; border-radius: 3px; }
.bys-s-speak { flex-shrink: 0; width: 30px; height: 30px; border: 1px solid #CDE7CC; border-radius: 50%; background: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; color: #638679; transition: background .15s, transform .15s, color .15s; }
.bys-s-speak:hover { background: #E7F8F2; color: #333333; }
.bys-s-speak:active { transform: scale(.92); }
.bys-s-speak.playing { background: #69ADA7; color: #fff; border-color: #69ADA7; }
/* 대표님 지시(2026-09-24) — 단어장 저장 버튼(bys-wb-save)과 스피커 버튼(bys-s-speak) 사이 간격을 앱 전체에서 통일 */
.bys-wb-save + .bys-s-speak, .bys-s-speak + .bys-wb-save { margin-left: 6px !important; }
.bys-s-reply .bys-wb-save + .bys-s-speak, .bys-s-ex .bys-wb-save + .bys-s-speak { margin-left: 0 !important; }
.bys-s-pron { font-size: .82rem; color: #638679; line-height: 1.4; margin-top: 4px; font-style: italic; }
.bys-s-tip { font-size: .78rem; color: #8B6914; line-height: 1.5; margin-top: 8px; padding: 6px 10px; background: #FBF6E9; border-radius: 8px; border-left: 2px solid #C9A961; letter-spacing: -.003em; }
.bys-s-tip-lbl { font-weight: 700; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; margin-right: 6px; opacity: .8; }
.bys-s-ex { margin-top: 8px; padding: 7px 11px; background: #EEF4EE; border-radius: 8px; border-left: 2px solid #9DBF9D; display: flex; flex-direction: column; gap: 0; }
.bys-s-ex-en { font-size: .86rem; color: #333333; line-height: 1.5; font-weight: 500; letter-spacing: -.003em; }
.bys-s-ex-ko { font-size: .78rem; color: #5C6B5C; line-height: 1.45; }
/* CT 대답 예문 (표현 아래 모델 대답) */
.bys-s-reply { margin-top: 7px; padding: 7px 11px; background: #EAF3F1; border-radius: 8px; border-left: 2px solid #69ADA7; display: flex; flex-direction: column; gap: 2px; }
.bys-s-reply-lbl { font-size: .68rem; font-weight: 800; color: #638679; letter-spacing: .02em; }
.bys-s-reply-en { font-size: .86rem; color: #12453E; line-height: 1.5; font-weight: 500; letter-spacing: -.003em; }
.bys-s-reply-ko { font-size: .78rem; color: #5C6B6A; line-height: 1.45; }
body.nd-user #screen-bys-day .bys-s-reply { background: #F3EFE5; border-left: none; border-radius: 12px; }
body.nd-user #screen-bys-day .bys-s-reply-en { color: #333333; }
body.nd-user #screen-bys-day .bys-s-reply-ko { color: #8A8578; }
.bys-quiz-scene { background: #F5EFE6; border-radius: 14px; padding: 18px 20px; margin-top: 12px; }
.bys-quiz-scene-eyebrow { font-size: .68rem; color: #8B6914; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 4px; }
.bys-quiz-scene-title { font-size: 1rem; font-weight: 700; color: #333333; margin-bottom: 14px; letter-spacing: -.005em; }
.bys-quiz-line { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; }
.bys-quiz-line + .bys-quiz-line { border-top: 1px solid rgba(0,0,0,.06); }
.bys-quiz-role { flex-shrink: 0; min-width: 60px; font-size: .72rem; font-weight: 700; color: #8B6914; padding-top: 4px; letter-spacing: -.003em; }
.bys-quiz-role.you { color: #638679; }
.bys-quiz-body { flex: 1; min-width: 0; }
.bys-quiz-en { display: flex; align-items: center; gap: 8px; font-size: .96rem; color: #333333; line-height: 1.5; font-weight: 600; }
.bys-quiz-ko { font-size: .82rem; color: #5C5C5C; line-height: 1.55; margin-top: 1px; letter-spacing: -.003em; }
.bys-fb-card { background: #FAFAF8; border: 1px solid #E0DCD2; border-radius: 16px; padding: 20px 22px; margin: 14px 0; }
/* ── 영역별 분석 테스트 미니 단계 (EX + ST) ── */
.lvt-progress { display:flex; gap:8px; margin-bottom:18px; }
.lvt-progress-step { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; min-height:64px; padding:10px 6px; background:#F2F2EF; border-radius:14px; transition: background .2s; }
.lvt-progress-step .lvt-step-num { width:23px; height:23px; flex-shrink:0; border-radius:50%; background:#D8D8D2; color:#fff; font-size:.72rem; font-weight:800; display:flex; align-items:center; justify-content:center; }
.lvt-progress-step .lvt-step-name { font-size:.72rem; font-weight:700; color:#8A8A8A; letter-spacing:.01em; white-space:nowrap; line-height:1; }
.lvt-progress-step.active { background:#69ADA7; }
.lvt-progress-step.active .lvt-step-num { background:#fff; color:#638679; }
.lvt-progress-step.active .lvt-step-name { color:#fff; }
.lvt-progress-step.done { background:#CDE7CC; }
.lvt-progress-step.done .lvt-step-num { background:#638679; color:#fff; }
.lvt-progress-step.done .lvt-step-name { color:#638679; }
.lvt-card { background:#FFFDF8; border:1px solid #EAE4D6; border-radius:20px; padding:28px 26px; margin-bottom:18px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }   /* 🎯 2026-10-12 — 순백→아이보리, 라운드 소폭 확대 */
.lvt-stage-label { font-size:.74rem; font-weight:800; letter-spacing:.12em; text-transform:uppercase; color:var(--mint-dk); margin-bottom:6px; }   /* 🎯 2026-10-12 — 겨자색→민트, 전반 톤 통일 */
.lvt-card-top { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.lvt-timer { flex-shrink:0; min-width:46px; text-align:center; font-size:.92rem; font-weight:800; color:#638679; background:#E7F8F2; border:1px solid #CDE7CC; border-radius:999px; padding:4px 12px; font-variant-numeric:tabular-nums; letter-spacing:-.01em; transition: color .2s, background .2s, border-color .2s; }
.lvt-timer.urgent { color:#B91C1C; background:#FEF2F2; border-color:#FCA5A5; animation: lvtPulse 1s ease-in-out infinite; }
@keyframes lvtPulse { 0%,100% { transform:scale(1); } 50% { transform:scale(1.08); } }
.lvt-item-num { font-size:.82rem; color:#8A8A8A; margin-bottom:14px; letter-spacing:-.003em; }
.lvt-prompt { font-size:1.2rem; line-height:1.6; color:#333333; font-weight:600; letter-spacing:-.005em; word-break:keep-all; }
.lvt-hint { font-size:.84rem; color:#5C5C5C; margin-top:10px; line-height:1.55; }
.lvt-mic-area { display:flex; flex-direction:column; align-items:center; gap:12px; padding:24px 0; }
.lvt-mic-btn { width:74px; height:74px; border-radius:50%; background:#69ADA7; border:none; color:#fff; cursor:pointer; display:flex; align-items:center; justify-content:center; transition: all .15s; box-shadow: 0 4px 14px rgba(105,173,167,.32); }
.lvt-mic-btn:hover:not(:disabled) { background:#638679; transform: translateY(-2px); }
.lvt-mic-btn:disabled { opacity:.4; cursor:default; }
.lvt-mic-btn.recording { background:#E07A5F; animation: lvt-pulse 1.4s ease-in-out infinite; box-shadow: 0 0 0 0 rgba(224,122,95,.5); }
@keyframes lvt-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(224,122,95,.45); } 50% { box-shadow: 0 0 0 14px rgba(224,122,95,0); } }
.lvt-mic-hint { font-size:.86rem; color:#5C5C5C; font-weight:500; }
.lvt-transcript { background:#F3FBF8; border-radius:12px; padding:14px 16px; margin-top:10px; font-size:.96rem; color:#333333; line-height:1.55; min-height:48px; }
.lvt-transcript.empty { color:#8A8A8A; font-style:italic; }
.lvt-transcript[contenteditable="true"] { cursor:text; border:1.5px dashed #AFE7D5; }
.lvt-transcript[contenteditable="true"]:focus { outline:none; border-color:#69ADA7; box-shadow:0 0 0 3px rgba(105,173,167,.18); }
.lvt-actions { display:flex; gap:10px; justify-content:space-between; margin-top:18px; }
.lvt-btn { padding:12px 22px; border-radius:980px; font-family:inherit; font-weight:600; font-size:.9rem; cursor:pointer; border:none; transition: all .15s; }
.lvt-btn-secondary { background:transparent; color:#5C5C5C; border:1.5px solid #E0DCD2; }
.lvt-btn-secondary:hover { border-color:#69ADA7; color:#638679; }
.lvt-btn-primary { background:#69ADA7; color:#fff; }
.lvt-btn-primary:hover:not(:disabled) { background:#638679; }
.lvt-btn-primary:disabled { opacity:.4; cursor:default; }
.lvt-intro { text-align:center; padding:40px 20px; }
.lvt-intro-title { font-size:1.5rem; font-weight:700; color:#333333; margin-bottom:12px; letter-spacing:-.015em; }
.lvt-intro-desc { font-size:.96rem; color:#5C5C5C; line-height:1.7; margin-bottom:24px; }
.lvt-intro-stages { display:flex; gap:10px; justify-content:center; margin-bottom:24px; flex-wrap:wrap; }
.lvt-intro-stage { background:#F3FBF8; border:1px solid #CDE7CC; border-radius:12px; padding:14px 18px; font-size:.84rem; color:#638679; }
.lvt-intro-stage b { color:#333333; }
.bys-fb-header { margin-bottom: 14px; }
.bys-fb-eyebrow { font-size: .68rem; font-weight: 700; color: #8B6914; letter-spacing: .1em; text-transform: uppercase; }
.bys-fb-summary { font-size: 1rem; font-weight: 700; color: #333333; line-height: 1.55; margin-top: 4px; letter-spacing: -.005em; }
.bys-fb-section { margin-top: 14px; }
.bys-fb-label { font-size: .72rem; font-weight: 700; color: #638679; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 8px; }
.bys-fb-list { margin: 0; padding-left: 18px; line-height: 1.6; color: #2A2A2A; font-size: .9rem; }
.bys-fb-list li { margin-bottom: 4px; }
.bys-fb-exp { background: #FFFFFF; border: 1px solid #E5E1D6; border-radius: 10px; padding: 10px 14px; margin-bottom: 8px; }
.bys-fb-exp-en { font-size: .96rem; color: #333333; font-weight: 600; letter-spacing: -.003em; }
.bys-fb-exp-ko { font-size: .82rem; color: #5C5C5C; margin-top: 2px; }
.bys-fb-exp-note { font-size: .78rem; color: #8B6914; margin-top: 6px; line-height: 1.5; font-style: italic; }
.bys-fb-meta { font-size: .72rem; color: #8A8A8A; margin-top: 6px; letter-spacing: -.003em; }
.bys-fb-history-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid #CDE7CC; border-radius: 980px; background: #fff; color: #638679; font-size: .84rem; font-weight: 600; cursor: pointer; font-family: inherit; transition: all .15s; }
.bys-fb-history-btn:hover { background: #F3FBF8; border-color: #69ADA7; }
.bys-fb-history-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.bys-fb-history-item { background: #FFFFFF; border: 1px solid #E5E1D6; border-radius: 12px; padding: 14px 16px; cursor: pointer; transition: all .15s; }
.bys-fb-history-item:hover { border-color: #69ADA7; background: #F3FBF8; }
.bys-fb-history-summary { font-size: .92rem; color: #333333; line-height: 1.5; font-weight: 500; }
.bys-fb-history-date { font-size: .72rem; color: #8A8A8A; margin-top: 4px; }
/* PERSONA — Facing 진입 시 지난 대화 continuity 카드 */
.bys-continuity-card { background: linear-gradient(180deg, #F3FBF8 0%, #FAFAF8 100%); border: 1px solid #CDE7CC; border-radius: 14px; padding: 16px 20px; margin-top: 18px; }
.bys-continuity-eyebrow { font-size: .68rem; font-weight: 700; color: #638679; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 6px; }
.bys-continuity-greeting { font-size: .92rem; color: #333333; font-weight: 600; letter-spacing: -.005em; margin-bottom: 8px; }
.bys-continuity-summary { font-size: .9rem; color: #2A2A2A; line-height: 1.6; letter-spacing: -.003em; }
.bys-continuity-cta { font-size: .82rem; color: #638679; margin-top: 10px; font-style: italic; }
/* Lv 3.0+ ST 교재 보존 레이아웃 */
.bys-st3-patterns { display: flex; flex-direction: column; gap: 5px; margin-top: 5px; }
.bys-st3-pattern { display: block; padding: 7px 12px; background: #FAFAF8; border: 1px solid #E0DCD2; border-radius: 12px; }
/* 번호 + (표현명·뜻)만 정렬 — 예문은 이 head 바깥이라 들여쓰기 안 됨 */
.bys-st3-pattern-head { display: flex; gap: 10px; align-items: flex-start; }
.bys-st3-pattern-headtext { flex: 1; min-width: 0; }
.bys-st3-pattern-num { flex-shrink: 0; width: 28px; height: 28px; margin-top: 1px; background: #fff; color: #8B6914; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .82rem; border: 1px solid #E0DCD2; }
.bys-st3-pattern-body { flex: 1; min-width: 0; }
.bys-st3-pattern-name { font-size: 1.05rem; font-weight: 700; color: #333333; letter-spacing: -.005em; margin-top: 3px; }
.bys-st3-pattern-name.bys-expr-used { color: #1A9E83; } .bys-st3-pattern-name.bys-expr-used::after { content: " ✅"; font-size: .85em; }
/* 핵심 표현 섹션 제목(h2 제거 후 이 eyebrow가 제목 역할) — 이 섹션만 키움 */
.smec-section-eyebrow.bys-ee-title { font-size: 1.15rem; color: #9DB49D; margin-bottom: 14px; }
.bys-st3-pattern-meaning { font-size: .92rem; color: #5C5C5C; margin-top: 2px; font-weight: 500; letter-spacing: -.003em; }
.bys-st3-pattern-meaning-inline { font-size: .92rem; color: #8A8A8A; font-weight: 500; margin-left: 8px; letter-spacing: -.003em; }
.bys-pos-tag { font-size: .68rem; font-weight: 700; color: #7A9A7A; background: #EDF3ED; border-radius: 5px; padding: 1px 6px; margin-left: 8px; vertical-align: middle; letter-spacing: 0; }
/* 핵심표현 직접 작문 (예문 아래) — 텍스트/음성 입력 + AI 즉시 첨삭 */
.bys-ex-practice { margin-top: 5px; }
.bys-ex-respond-label { display: inline-flex; align-items: center; font-size: .8rem; font-weight: 700; color: #638679; margin: 2px 0 5px; }
/* SN — 신설 Structure Training (문장 훈련) */
.bys-sn-list { display: flex; flex-direction: column; gap: 6px; }
.bys-sn-item { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; background: #FAFAF8; border: 1px solid #E0DCD2; border-radius: 12px; cursor: pointer; }
.bys-sn-num { flex-shrink: 0; width: 26px; height: 26px; margin-top: 1px; background: #fff; color: #638679; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .78rem; border: 1px solid #CDE7CC; }
.bys-sn-body { flex: 1; min-width: 0; }
.bys-sn-en { display: flex; align-items: flex-start; gap: 6px; font-size: .97rem; color: #333333; line-height: 1.55; font-weight: 500; }
.bys-sn-en.bys-playing-sent { align-items: center; padding: 2px 4px; margin: -2px -4px; }   /* 재생 하이라이트 시 문장 세로 중앙 정렬 */
.bys-sn-en-t { flex: 1; min-width: 0; }
.bys-sn-en strong { font-weight: 800; color: #0F3D0F; }
.bys-sn-ko { font-size: .84rem; color: #8A8A8A; margin-top: 3px; line-height: 1.5; }
.bys-sn-ko strong { font-weight: 800; color: #638679; }
/* SN 오늘의 공식 카드 — 설명 없이 뼈대 조합 + Before→After */
.bys-sn-formula { margin: 2px 0 14px; padding: 14px 16px; background: #F3FBF8; border: 1px solid #CDE7CC; border-radius: 14px; }
.bys-sn-f-parts { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 7px; }
.bys-sn-f-chip { padding: 6px 13px; border-radius: 999px; background: #fff; border: 1px solid #CDE7CC; font-size: .86rem; font-weight: 700; color: #6E7E6E; white-space: nowrap; }
.bys-sn-f-chip.hl { background: #EAF5EE; border-color: #BEE0CE; color: #2E7D5B; font-weight: 800; }
.bys-sn-f-plus { font-weight: 800; color: #9DB49D; font-size: .95rem; }
.bys-sn-f-ex { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 11px; padding-top: 11px; border-top: 1px dashed #CDE7CC; font-size: .88rem; line-height: 1.5; }
.bys-sn-f-before { color: #9A9A9A; text-decoration: line-through; text-decoration-color: rgba(154,154,154,.55); }
.bys-sn-f-arrow { color: #69ADA7; font-weight: 800; }
.bys-sn-f-after { color: #333333; font-weight: 600; }
.bys-sn-f-after strong { font-weight: 800; color: #0F3D0F; }
.bys-sn-switch { padding: 12px 14px; background: #F3FBF8; border: 1px solid #CDE7CC; border-radius: 12px; margin-bottom: 8px; }
.bys-sn-sw-model { display: flex; align-items: flex-start; gap: 6px; font-size: .93rem; color: #638679; font-weight: 600; line-height: 1.5; }
.bys-sn-sw-model strong { font-weight: 800; color: #0F3D0F; }
.bys-sn-sw-prompt { font-size: .88rem; color: #333333; font-weight: 700; margin: 8px 0 6px; }
.bys-sn-switch .bys-ex-mic { margin-right: 0; }   /* 모델 문장 음성 버튼과 같은 오른쪽 라인 */
.bys-sn-drill { margin-top: 14px; padding: 18px 16px; background: #FAFAF8; border: 1px solid #E0DCD2; border-radius: 14px; }
.bys-sn-d-type { display: inline-block; font-size: .74rem; font-weight: 800; letter-spacing: .05em; color: #638679; background: #EAF3EA; border-radius: 999px; padding: 4px 12px; }
.bys-sn-d-rev { display: inline-block; font-size: .74rem; font-weight: 800; letter-spacing: .03em; color: #8B6914; background: #FCF6E8; border: 1px solid #EFE3C8; border-radius: 999px; padding: 3px 11px; margin-left: 5px; vertical-align: 1px; }
.bys-sn-d-guide { font-size: .86rem; color: #6E7E6E; margin-top: 8px; }
.bys-sn-d-cue { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 14px 16px; background: #fff; border: 1px solid #E4E0D6; border-radius: 12px; }
.bys-sn-d-cue-t { font-size: 1.05rem; font-weight: 700; color: #333333; line-height: 1.5; }
.bys-sn-d-hint { display: inline-block; margin-top: 8px; font-size: .8rem; font-weight: 700; color: #8B6914; background: #FCF6E8; border-radius: 999px; padding: 4px 12px; }
.bys-sn-drill .smec-conv-mic-area { flex-direction: column; justify-content: center; gap: 8px; border-top: none; }
.bys-sn-drill .smec-conv-hint { text-align: center; }
.bys-sn-mission { margin: 8px 0 2px; padding: 8px 14px; background: #F1F9F4; border: 1px solid #BEE0CE; border-radius: 999px; font-size: .82rem; font-weight: 700; color: #2E7D5B; text-align: center; }
.bys-sn-mission #bys-sn-mission-dots { letter-spacing: .18em; margin-left: 6px; }
.bys-sn-mission.done { background: #E2F5E9; }
/* 전체 연속 재생 — 플로팅 컨트롤 (이전 · 일시정지/재생 · 다음 · 정지, 재생 중에만 표시) */
#bys-pa-stopbar { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 5000; display: inline-flex; align-items: center; gap: 4px; padding: 6px 8px; border-radius: 999px; border: 1px solid #E0DCD2; background: rgba(255,255,255,.96); box-shadow: 0 6px 20px rgba(0,0,0,.18); backdrop-filter: blur(4px); }
.bys-pa-cbtn { width: 40px; height: 40px; border: none; border-radius: 50%; background: transparent; color: #638679; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; transition: background .12s; }
.bys-pa-cbtn:hover { background: #F0F5F0; }
.bys-pa-cbtn:active { transform: scale(.94); }
.bys-pa-cbtn.stop { color: #C6534A; }
.bys-pa-cdiv { width: 1px; height: 20px; background: #E4E0D6; margin: 0 3px; }
.bys-ex-input-row { display: flex; gap: 8px; align-items: center; }
.bys-ex-input { flex: 1; min-width: 0; height: 38px; border: 1px solid #CDE7CC; border-radius: 10px; padding: 8px 12px; font-size: .78rem; font-family: inherit; resize: none; line-height: 1.4; color: #333333; background: #fff; }
.bys-ex-input:focus { outline: none; border-color: #69ADA7; box-shadow: 0 0 0 3px rgba(105,173,167,.15); }
.bys-ex-input::placeholder { font-size: .92rem; color: #9AA69A; }
.bys-ex-mic { flex-shrink: 0; width: 30px; height: 30px; margin-right: 8px; border: 1px solid #CDE7CC; border-radius: 50%; background: #fff; color: #638679; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; transition: background .15s, color .15s, transform .1s; }
.bys-ex-mic:hover { background: #E7F8F2; }
.bys-ex-mic:active { transform: scale(.92); }
.bys-ex-mic.recording { background: #C0392B; color: #fff; border-color: #C0392B; animation: bysExPulse 1.1s infinite; }
.bys-ex-mic.busy { opacity: .5; }
@keyframes bysExPulse { 0%,100%{ box-shadow:0 0 0 0 rgba(192,57,43,.35);} 50%{ box-shadow:0 0 0 5px rgba(192,57,43,0);} }
.bys-ex-feedback { position: relative; margin-top: 8px; padding: 10px 32px 10px 12px; background: #F3FBF8; border: 1px solid #E0E9E0; border-radius: 8px; font-size: .9rem; line-height: 1.55; }
.bys-ex-fb-close { position: absolute; top: 5px; right: 6px; width: 22px; height: 22px; border: none; background: none; color: #9AA69A; font-size: 17px; line-height: 1; cursor: pointer; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.bys-ex-fb-close:hover { background: #E5EDE5; color: #5C5C5C; }
/* ✓ 문장 클릭 → 내 예문 저장 */
.bys-fb-pin { cursor: pointer; border: 1px dashed #C9D8C9; border-radius: 8px; padding: 6px 8px; transition: background .12s, border-color .12s; }
.bys-fb-pin:hover { background: #EAF3EA; border-color: #69ADA7; }
/* 내 예문(박제) — 예문처럼 보이되 왼쪽 민트 강조 + 단어장·삭제 버튼 */
.bys-myex { border-left: 3px solid #69ADA7; gap: 5px; }
.bys-myex .bys-s-speak { width: 28px; height: 28px; }   /* 저장·음성 버튼 크기 동일하게 강제 */
.bys-myex-wb.saved, .bys-wb-save.saved { background: #E7F8F2; border-color: #69ADA7; color: #333333; }
.bys-myex-del { flex-shrink: 0; width: 22px; height: 22px; border: none; background: none; color: #B0B0B0; font-size: 16px; line-height: 1; cursor: pointer; border-radius: 6px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.bys-myex-del:hover { background: #FBECEC; color: #C0392B; }
/* 단어장에서 이동 시 해당 단어/문장 잠깐 하이라이트 */
.bys-flash { animation: bysFlash 2.2s ease; border-radius: 6px; }
@keyframes bysFlash { 0%,100% { background: transparent; box-shadow: none; } 12%,55% { background: #FCE8B2; box-shadow: 0 0 0 3px #FCE8B2; } }
.bys-ex-fb-corrected { color: #333333; font-weight: 600; }
.bys-ex-fb-mark { font-weight: 800; margin-right: 4px; }
.bys-ex-fb-warn { color: #B7791F; font-size: .82rem; margin-top: 5px; }
.bys-ex-fb-tip { color: #5C5C5C; font-size: .85rem; margin-top: 5px; }
.bys-ex-fb-ansrow { display: flex; align-items: flex-start; gap: 6px; margin-top: 6px; }
.bys-ex-fb-anko { display: block; margin-top: 2px; color: #8A8A8A; font-weight: 400; font-size: .85rem; line-height: 1.5; }
.bys-ex-spin { display: inline-block; width: 12px; height: 12px; border: 2px solid #C9D8C9; border-top-color: #638679; border-radius: 50%; animation: bysExSpin .7s linear infinite; vertical-align: -2px; margin-right: 5px; }
@keyframes bysExSpin { to { transform: rotate(360deg); } }
/* Small Talk (Lv 3.5+) — 역할극 대화 + 표현 + 상황 */
.bys-smalltalk { display: flex; flex-direction: column; gap: 11px; margin-top: 6px; }
.bys-st-line { display: flex; gap: 10px; align-items: flex-start; }
.bys-st-role { flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; background: #EAF1EA; color: #638679; font-weight: 800; font-size: .74rem; display: flex; align-items: center; justify-content: center; margin-top: 2px; }
.bys-st-body { flex: 1; min-width: 0; }
.bys-st-en { display: flex; align-items: center; gap: 8px; }
.bys-st-en-t { flex: 1; min-width: 0; font-weight: 600; color: #333333; line-height: 1.5; }
.bys-st-ko { font-size: .85rem; color: #8A8A8A; line-height: 1.5; margin-top: 2px; }
.bys-st-exprs { margin-top: 14px; background: #F7FAF7; border: 1px solid #E4EEE4; border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 7px; }
.bys-st-expr { font-size: .86rem; line-height: 1.5; color: #3A4A3A; }
.bys-st-expr b { color: #2E5D4E; margin-right: 6px; }
.bys-st-sit { margin-top: 13px; border-left: 3px solid #C4DACE; padding: 6px 0 6px 12px; }
.bys-st-sit-lbl { font-size: .72rem; font-weight: 800; letter-spacing: .06em; color: #8AA99B; text-transform: uppercase; margin-bottom: 4px; }
.bys-st-sit-p { font-size: .9rem; color: #333333; line-height: 1.6; }
.bys-st-sit-q { font-size: .9rem; color: #1A4D3A; font-weight: 600; line-height: 1.6; margin-top: 6px; }
.bys-st-sit-k { font-size: .82rem; color: #638679; font-weight: 700; margin-top: 4px; }
.bys-st-sit-ex { font-size: .85rem; color: #808080; line-height: 1.6; margin-top: 6px; }
.bys-st-sit-ex span { font-weight: 700; color: #8AA99B; margin-right: 5px; }
/* Group Project (Lv 4.5+) — 그룹 토론 주제 */
.bys-groupproject { background: #F7FAF7; border: 1px solid #E4EEE4; border-radius: 12px; padding: 14px 16px; }
.bys-gp-en { display: flex; align-items: flex-start; gap: 8px; }
.bys-gp-en-t { flex: 1; min-width: 0; font-weight: 600; color: #333333; line-height: 1.6; }
.bys-gp-ko { font-size: .86rem; color: #6E7E6E; line-height: 1.6; margin-top: 7px; }
.bys-gp-steps { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 12px; }
.bys-gp-step { background: #fff; border: 1px solid #E4EEE4; border-radius: 12px; padding: 11px 13px; position: relative; }
.bys-gp-step::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: var(--mint); }
.bys-gp-step-h { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.bys-gp-step-n { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--mint); color: #fff; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.bys-gp-step-stage { font-size: .72rem; font-weight: 800; color: var(--mint-dk); letter-spacing: .02em; }
.bys-gp-step-en { font-size: 14.5px; color: #24221C; line-height: 1.5; display: flex; align-items: flex-start; gap: 6px; }
.bys-gp-step-ko { font-size: 12.5px; color: #8C8877; line-height: 1.45; margin-top: 4px; }
/* Lv 3.5+ CT (영상형) — 유튜브 화면 + 전사 본문 + Conversation */
.bys-yt-wrap { position: relative; width: 100%; padding-top: 56.25%; border-radius: 14px; overflow: hidden; background: #000; box-shadow: 0 2px 12px rgba(0,0,0,.12); }
.bys-yt, .bys-yt-wrap #bys-yt-player { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.bys-yt-wrap #bys-yt-player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; border: 0; }
#bys-yt-player .bys-vspin { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 9px; background: rgba(0,0,0,.5); color: #fff; font-size: .78rem; z-index: 3; }
#bys-yt-player.loading .bys-vspin { display: flex; }
.bys-vspin-ring { width: 32px; height: 32px; border: 3px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: bysvspin .9s linear infinite; }
@keyframes bysvspin { to { transform: rotate(360deg); } }
.bys-yt-clip { margin-top: 8px; font-size: .82rem; color: #8A8A8A; font-weight: 600; text-align: center; }
.bys-script { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.bys-sc-line { padding: 2px 0; }
.bys-sc-en { display: flex; align-items: flex-start; gap: 8px; }
.bys-sc-en-t { flex: 1; min-width: 0; font-weight: 600; color: #333333; line-height: 1.55; }
.bys-sc-ko { font-size: .85rem; color: #8A8A8A; line-height: 1.5; margin-top: 2px; }
.bys-cap-loading { font-size: .85rem; color: #69ADA7; padding: 6px 0; }
/* CT 자막 카라오케 박스 (영상 절반 높이 · 스크롤 · 단어 동기화 · 영/한 2줄) */
.bys-cap-bar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.bys-cap-kotoggle { display: inline-flex; align-items: center; padding: 6px 14px; border-radius: 999px; border: 1.5px solid #E0E0D8; background: #fff; color: #7A8A7A; font-size: .8rem; font-weight: 700; cursor: pointer; transition: all .15s; }
.bys-cap-kotoggle:active { transform: scale(.97); }
.bys-cap-kotoggle.on { color: #2E7D5B; border-color: #BEE0CE; background: #F1F9F4; }
.bys-cap-box { position: relative; overflow-y: auto; -webkit-overflow-scrolling: touch; background: #FAFAF8; border: 1.5px solid #C9C2B2; border-radius: 12px; padding: 6px 4px; margin-top: 6px; scrollbar-width: thin; scrollbar-color: transparent transparent; }
.bys-cap-box::-webkit-scrollbar { width: 7px; }
.bys-cap-box::-webkit-scrollbar-track { background: transparent; }
.bys-cap-box::-webkit-scrollbar-thumb { background: transparent; border-radius: 4px; transition: background .4s; }
.bys-cap-box.scrolling { scrollbar-color: rgba(120,120,110,.42) transparent; }
.bys-cap-box.scrolling::-webkit-scrollbar-thumb { background: rgba(120,120,110,.42); }
/* 박스 안 오른쪽 위 재생 컨트롤 (ST 본문과 동일: 앞·재생/일시정지·정지·뒤 + 한글) */
/* 재생 컨트롤 = 박스 안 오른쪽 위 플로팅 (자리 안 차지, 개별 버튼만 투명 플로팅 → 자막이 사이로 보임) */
.bys-cap-ctrl { position: sticky; top: 5px; z-index: 6; display: flex; justify-content: flex-end; align-items: flex-start; height: 0; pointer-events: none; }
.bys-cap-ctrl-pill { pointer-events: auto; display: inline-flex; align-items: center; gap: 3px; margin: 0 4px 0 0; padding: 0; background: transparent; border: 0; box-shadow: none; }
.bys-cap-ctrl .bys-cap-cbtn { background: #FAFAF8; border-radius: 50%; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.bys-cap-ctrl .bys-cap-koswitch { background: #FAFAF8; border-radius: 999px; box-shadow: 0 1px 4px rgba(0,0,0,.12); padding: 0 8px 0 8px; }
.bys-cap-cbtn { width: 30px; height: 30px; color: #7A8A7A; }
.bys-cap-cbtn.bys-cap-pp { color: #2E7D5B; }
.bys-cap-ctrl .bys-cap-cbtn.on { color: #2E7D5B; background: #D6EDDD; }
.bys-cap-koswitch { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 6px 0 8px; border: 0; background: transparent; cursor: pointer; }
.bys-cap-koswitch-lbl { font-size: .74rem; font-weight: 700; color: #9AA39A; transition: color .18s; }
.bys-cap-koswitch.on .bys-cap-koswitch-lbl { color: #2E7D5B; }
.bys-cap-koswitch-track { position: relative; width: 34px; height: 18px; border-radius: 999px; background: #D6D6CE; transition: background .18s; }
.bys-cap-koswitch.on .bys-cap-koswitch-track { background: #69ADA7; }
.bys-cap-koswitch-knob { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .18s; }
.bys-cap-koswitch.on .bys-cap-koswitch-knob { left: 18px; }
#bys-cap-body { padding-top: 40px; }
.bys-cap-box .bys-cap-loading { padding: 12px; }
.bys-cap-seg { display: flex; align-items: baseline; gap: 9px; padding: 3px 11px; border-radius: 9px; transition: background .15s; cursor: pointer; }
.bys-cap-seg:hover { background: #F2F5F2; }
.bys-cap-seg.active { background: #FCE8B2; box-shadow: inset 0 0 0 1px #F2D58A; }
.bys-cap-time { flex: 0 0 auto; min-width: 32px; font-size: .72rem; font-weight: 600; color: #AAB2AA; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.bys-cap-main { flex: 1; min-width: 0; }
.bys-cap-text { display: block; line-height: 1.45; color: #6A6A6A; font-weight: 500; }
.bys-cap-seg.active .bys-cap-text { color: #2A2A2A; }
.bys-cap-w { transition: color .1s, background .1s; border-radius: 3px; padding: 0 1px; }
.bys-cap-w.done { color: #2A2A2A; }
.bys-cap-w.now { color: #2E7D5B; background: rgba(105,173,167,.22); font-weight: 700; }
.bys-cap-ko { display: block; font-size: .82rem; color: #9A9A9A; margin-top: 1px; font-weight: 400; line-height: 1.4; }
.bys-cap-box.ko-hidden .bys-cap-ko { display: none; }
.bys-yt-link { display: inline-flex; align-items: center; margin-top: 14px; padding: 9px 16px; border: 1.5px solid #CDE7CC; border-radius: 999px; color: #638679; font-size: .84rem; font-weight: 700; text-decoration: none; background: #fff; transition: background .15s; }
.bys-yt-link:hover { background: #F3FBF8; }
.bys-shadow-embed { width: 100%; height: 76vh; min-height: 540px; max-height: 780px; border: 1px solid #E4EEE4; border-radius: 14px; overflow: hidden; background: #FAFAF8; box-shadow: 0 1px 6px rgba(0,0,0,.06); }
.bys-shadow-frame { width: 100%; height: 100%; border: 0; display: block; }
.bys-conv-label { font-size: .78rem; font-weight: 800; color: #69ADA7; letter-spacing: .02em; margin-bottom: 5px; }
.bys-conv-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.bys-conv-item { }
.bys-conv-q { cursor: pointer; font-size: .95rem; font-weight: 600; color: #333333; line-height: 1.55; padding: 4px 0; }
.bys-conv-q-row { display: flex; align-items: baseline; gap: 6px; }
.bys-conv-q-num { color: #69ADA7; font-weight: 800; flex-shrink: 0; }
.bys-conv-spk { margin-left: auto; color: #638679; flex-shrink: 0; align-self: center; }
.bys-conv-ko { font-size: .86rem; color: #6E7E6E; line-height: 1.6; margin: 9px 0 0; padding: 0; }
.bys-ct-sub { font-size: .9rem; color: #333333; margin: -4px 0 13px; line-height: 1.5; }
.bys-st3-pattern-def { font-size: .82rem; color: #9AA79A; font-style: italic; line-height: 1.5; margin-top: 2px; }
.bys-greet-tbl { width: 100%; border-collapse: collapse; margin: 2px 0 14px; font-size: .9rem; }
.bys-greet-tbl td { padding: 9px 12px; border-bottom: 1px solid #EAF0EA; vertical-align: top; }
.bys-greet-num { color: #69ADA7; font-weight: 800; width: 26px; text-align: center; font-variant-numeric: tabular-nums; }
.bys-greet-en { font-weight: 600; color: #333333; cursor: pointer; width: 50%; }
.bys-greet-en .bys-conv-spk { color: #69ADA7; margin-left: 4px; }
.bys-greet-ko { color: #6E7E6E; }
.bys-talk-end { flex: none; padding: 0 13px; height: 44px; border: 1px solid #DAD5C6; border-radius: 999px; background: #fff; color: #8A8575; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s; }
.bys-talk-end:active { background: #F2EFE7; }
.bys-qa { margin: 8px 0 2px; }
.bys-qa-chat:empty { display: none; }
.bys-qa-ctrl { margin-top: 8px; }
.bys-qa-name { font-size: .72rem; font-weight: 800; color: #1A9E83; margin-bottom: 2px; letter-spacing: .02em; }
.bys-talk-msg.bys-qa-spk0 { background: #E7F3EC; }
.bys-talk-msg.bys-qa-spk1 { background: #E9EFF7; }
.bys-talk-msg.bys-qa-spk2 { background: #F5EEF8; }
.bys-qa-spk0 .bys-qa-name { color: #2E7D5B; }
.bys-qa-spk1 .bys-qa-name { color: #3B6EA5; }
.bys-qa-spk2 .bys-qa-name { color: #8E5AA8; }
.bys-qa-eval { background: linear-gradient(180deg,#FBFDFB 0%,#F2F9F5 100%); border: 1px solid #DBEAE1; border-radius: 16px; padding: 15px 17px 14px; margin-top: 10px; box-shadow: 0 2px 8px rgba(53,120,111,.07); }
.bys-qa-eval-load { color: #5A7A6E; font-size: .86rem; background: none; border: none; box-shadow: none; padding: 9px 4px; }
.bys-qa-eval-sec { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px dashed #DEEAE3; }
.bys-qa-eval-sec:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.bys-qa-eval-h { font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #35786F; margin-bottom: 5px; }
/* 대화 완료 통합 카드 — 피드백 + 하단 바를 하나의 카드로 (대화창 안, 2026-07-16 대표님) */
.bys-conv-complete { margin-top: 10px; border: 1px solid #D7E7DE; border-radius: 16px; overflow: hidden; box-shadow: 0 3px 12px rgba(53,120,111,.09); }
.bys-conv-complete .bys-qa-eval { margin: 0; border: none; border-radius: 0; box-shadow: none; }
.bys-conv-complete .bys-talk-done { margin: 0; border: none; border-top: 1px solid #E4EEE8; border-radius: 0; background: #EDF6F1; }
.bys-qa-eval-en { font-size: .93rem; color: #333333; line-height: 1.55; display: flex; align-items: flex-start; gap: 8px; }
.bys-qa-eval-ko { font-size: .84rem; color: #6A7A70; margin-top: 3px; }
.bys-qa-eval-ul { margin: 0; padding-left: 18px; }
.bys-qa-eval-ul li { font-size: .87rem; color: #333; line-height: 1.55; }
.bys-qa-eval-tip { font-size: .9rem; color: #26302C; line-height: 1.62; }
.bys-qa-msgbody { display: flex; flex-direction: column; }
/* Listen & Speak — 듣고 따라 말하기 (영상 CT) */
.bys-ls-list { display: flex; flex-direction: column; gap: 6px; }
.bys-ls-item { border: 1px solid #E4E1D6; border-radius: 12px; padding: 6px 11px; background: #FCFBF8; cursor: pointer; }
.bys-ls-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 0; margin-bottom: 2px; }
.bys-ls-top:empty { display: none; }
.bys-ls-who { font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #A8A392; }
.bys-ls-badge { font-size: 11.5px; font-weight: 700; padding: 1px 9px; border-radius: 999px; }
/* AI 대화 통과 — ✓ Pass 배지 + 결과 보기/다시 연습하기 (2026-07-15 대표님) */
.bys-conv-pass { flex-wrap: wrap; gap: 7px; }
.bys-conv-passbadge { background: rgba(105,173,167,.16); color: #35786F; font-size: 12px; font-weight: 800; letter-spacing: .02em; padding: 3px 11px; border-radius: 999px; }
.bys-conv-result { margin-top: 8px; }
.bys-ls-badge.hi { background: #E7F4EF; color: #1A9E83; }
.bys-ls-badge.mid { background: #FBF1DF; color: #B8842A; }
.bys-ls-badge.lo { background: #FBECEC; color: #C96565; }
.bys-ls-row { display: flex; align-items: center; gap: 9px; }
.bys-ls-listen, .bys-ls-mic { flex: none; width: 31px; height: 31px; border-radius: 50%; border: 1px solid #DAD5C6; background: #fff; color: #6A6656; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all .15s; }
.bys-ls-listen:active { transform: scale(.94); }
.bys-ls-mic { border-color: #CDE7DF; color: #1A9E83; }
.bys-ls-mic.rec { background: #D96565; border-color: #D96565; color: #fff; animation: bysLsPulse 1s infinite; }
@keyframes bysLsPulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }
.bys-ls-sent { flex: 1; min-width: 0; font-size: 15px; line-height: 1.4; color: #24221C; }
.bys-ls-sent.blur .bys-ls-text { filter: blur(7px); user-select: none; }
/* 교재 Shadowing 구간 문장 = 흰색 대신 민트 블러 (박스 없이 자연스럽게) */
.bys-ls-sent.bys-ls-shadow .bys-ls-text { color: #12876C; font-weight: 600; }
.bys-ls-sent.bys-ls-shadow { position: relative; }
.bys-ls-sent.bys-ls-shadow.blur::after { content: "SHADOWING PART"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 800; letter-spacing: .14em; color: rgba(18,135,108,.24); pointer-events: none; }
/* 쉐도잉 상시 표시 배지 (2026-07-22 대표님) — 워터마크는 흐린 상태에서만 보이고 100% 맞히면
   흐림과 함께 사라진다. 민트 글자색도 .bys-ls-w.hit 에 덮여 사라진다. 그래서 상단 줄에 항상 남는
   배지를 둔다. 색은 앱에 이미 있는 대화 통과 배지(.bys-conv-passbadge)와 동일한 민트. */
.bys-ls-lead { display: flex; align-items: center; gap: 6px; min-width: 0; }
.bys-ls-shbadge { flex: none; font-size: 10px; font-weight: 800; letter-spacing: .04em; padding: 1px 7px; border-radius: 999px; background: rgba(105,173,167,.16); color: #35786F; }
.bys-ls-w { transition: color .25s, filter .25s; }
.bys-ls-w.hit { color: #1A9E83; font-weight: 600; filter: none; }
.bys-ls-w.miss { color: #B7B3A8; filter: blur(5.5px); }
.bys-ls-sent.revealed .bys-ls-w.miss { filter: none; color: #C6C2B6; }
.bys-ls-reveal { flex: none; width: 31px; height: 31px; border-radius: 50%; border: 1px solid #DAD5C6; background: #fff; color: #8A857A; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all .15s; }
.bys-ls-reveal:active { transform: scale(.94); }
.bys-ls-ko { margin-top: 5px; font-size: 12.5px; color: #8C8877; line-height: 1.45; }
/* Expressions 접기 토글 (영상 CT) */
.bys-ee-toggle { cursor: pointer; user-select: none; }
.bys-ee-caret { transition: transform .2s; vertical-align: -5px; margin-left: -4px; margin-right: 7px; transform: rotate(90deg); color: #5F7A5F; }
.bys-ee-section.collapsed .bys-ee-caret { transform: rotate(0deg); animation: bysEeCaretBlink 1.1s ease-in-out infinite; }
.bys-ee-section.collapsed .bys-ee-body { display: none; }
/* 접힌 상태(미클릭)일 때만 세모 깜박임 — 클릭해 펼치면 .collapsed 해제되어 자동 정지 */
@keyframes bysEeCaretBlink { 0%, 100% { opacity: 1; } 50% { opacity: .28; } }
/* Talk About It — 영상 상황 AI 대화 */
.bys-talk-chat { display: flex; flex-direction: column; gap: 9px; margin: 4px 0 12px; min-height: 132px; max-height: 260px; overflow-y: auto; -webkit-overflow-scrolling: touch; border: 1.5px solid #C4BCA8; border-radius: 14px; background: #FCFBF8; padding: 12px; }
/* 대화 종료(AI 피드백 표시) 시 대화창을 펼쳐 피드백이 260px 스크롤 박스에 잘리지 않게 — 김세원 건의 fb_mronl1yh_ge9z (2026-07-16). 대화 중엔 컴팩트 유지, 완료 블록이 생기면만 확장 */
.bys-talk-chat:has(.bys-conv-complete) { max-height: none; overflow: visible; }
.bys-talk-emptyph { margin: auto; text-align: center; }
.bys-talk-msg { max-width: 84%; padding: 10px 13px; border-radius: 15px; font-size: 15px; line-height: 1.5; display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.bys-talk-msg.ai { align-self: flex-start; background: #F3F1EA; color: #2A281F; border-bottom-left-radius: 5px; }
.bys-talk-msg.me { align-self: flex-end; background: #E7F4EF; color: #1B4A40; border-bottom-right-radius: 5px; }
.bys-talk-txt { flex: 1; min-width: 0; }
.bys-talk-spk { flex: none; width: 24px; height: 24px; border: none; background: transparent; color: #9A9483; cursor: pointer; padding: 0; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.bys-talk-spk-inline { display: inline-flex; width: 18px; height: 18px; vertical-align: -4px; margin: 0 0 0 4px; }
.bys-talk-spk.playing { color: #1A9E83; }
.bys-talk-think { gap: 5px; align-items: center; }
.bys-talk-dot { width: 6px; height: 6px; border-radius: 50%; background: #B8B2A2; animation: bysTalkBlink 1.2s infinite; }
.bys-talk-dot:nth-child(2) { animation-delay: .2s; }
.bys-talk-dot:nth-child(3) { animation-delay: .4s; }
@keyframes bysTalkBlink { 0%,60%,100% { opacity: .3; } 30% { opacity: 1; } }
.bys-talk-start { display: inline-flex; align-items: center; padding: 11px 20px; border: 1px solid #CDE7DF; border-radius: 999px; background: #fff; color: #1A9E83; font-size: 14.5px; font-weight: 700; cursor: pointer; transition: background .15s; }
.bys-talk-start:hover { background: #F3FBF8; }
.bys-talk-inrow { display: flex; align-items: center; gap: 10px; }
.bys-talk-mic { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid #CDE7DF; background: #fff; color: #1A9E83; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all .15s; }
.bys-talk-mic.rec { background: #D96565; border-color: #D96565; color: #fff; animation: bysLsPulse 1s infinite; }
.bys-talk-input { flex: 1; min-width: 0; padding: 11px 15px; border: 1px solid #E4E1D6; border-radius: 999px; font-size: 15px; background: #FCFBF8; color: #24221C; outline: none; }
.bys-talk-input:focus { border-color: #CDE7DF; }
.bys-talk-done { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border: 1px solid #CFE7DF; border-radius: 14px; background: #F1FAF6; color: #1B4A40; font-size: 13.5px; font-weight: 700; }
.bys-talk-again { border: 1px solid #CFE7DF; border-radius: 999px; background: #fff; color: #199A80; font-size: 12.5px; font-weight: 700; padding: 7px 15px; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.bys-talk-again:hover { background: #199A80; color: #fff; border-color: #199A80; }
.bys-cfb-box { margin-top: 10px; border: 1px solid #E1EBE1; border-radius: 12px; background: #FAFCFA; padding: 6px; display: flex; flex-direction: column; gap: 6px; }
.bys-cfb-item { background: #fff; border: 1px solid #ECF1EC; border-radius: 9px; padding: 10px 12px; }
.bys-cfb-date { font-size: 11px; font-weight: 700; color: #9AA69A; margin-bottom: 5px; }
.bys-cfb-row { font-size: 13px; color: #2C3A2C; line-height: 1.5; margin-top: 3px; }
.bys-cfb-row b { margin-right: 4px; }
.bys-cfb-empty { font-size: 13px; color: #9AA69A; text-align: center; padding: 16px; }
/* PRACTICE OREO — 질문별 OREO 작문 + AI 첨삭 */
.bys-oreo-exprs { background: #F3FBF8; border: 1px solid #E0E9E0; border-radius: 12px; padding: 11px 13px; margin: 0 0 16px; }
.bys-oreo-exprs-label { font-size: .74rem; font-weight: 700; letter-spacing: .04em; color: #69ADA7; text-transform: uppercase; margin-bottom: 7px; }
.bys-oreo-exprs-list { display: flex; flex-wrap: wrap; gap: 6px; }
.bys-oreo-chip { font-size: .82rem; color: #333333; background: #fff; border: 1px solid #C9E4DA; border-radius: 999px; padding: 4px 11px; }
.bys-oreo-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 20px; }
.bys-oreo-q { font-size: 1rem; font-weight: 700; color: #1B2A4A; margin-bottom: 9px; line-height: 1.45; cursor: pointer; }
.bys-oreo-q:hover { color: #333333; }
.bys-oreo-q-num { color: #69ADA7; }
.bys-oreo-q-spk { color: #69ADA7; vertical-align: -2px; margin-left: 3px; }
.bys-oreo-q-spk.playing { color: #333333; }
.bys-oreo-q-ko { font-size: .88rem; font-weight: 500; color: #6E7B6E; margin: -4px 0 10px; padding-left: 2px; line-height: 1.5; }
.bys-oreo-exprs-inline { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 9px; }
.bys-oreo-x { font-size: .66rem; color: #69ADA7; background: #fff; border: 1px solid #CDE7CC; border-radius: 999px; padding: 2px 8px; cursor: pointer; font-family: inherit; line-height: 1.5; transition: background .15s, color .15s, border-color .15s; }
.bys-oreo-x.used { background: #69ADA7; color: #fff; border-color: #69ADA7; }
.bys-oreo-view { cursor: pointer; font-size: .9rem; line-height: 28px; min-height: 28px; color: #333333; white-space: pre-wrap; word-break: break-word; background-image: repeating-linear-gradient(transparent 0 27px, #E9EFE9 27px 28px); }
.bys-oreo-view s { color: #C0654E; text-decoration: line-through; text-decoration-thickness: 1.5px; }
.bys-oreo-view strong { font-weight: 700; color: #333333; }
.bys-oreo-fix { font-size: .85rem; color: #8AA99B; font-weight: 500; line-height: 1.5; margin-top: 3px; padding: 1px 0 1px 8px; border-left: 2px solid #C4DACE; display: flex; align-items: baseline; gap: 8px; }
.bys-oreo-fix-txt { flex: 1; }
.bys-oreo-apply { flex-shrink: 0; align-self: center; border: none; background: #B4E0D6; color: #12695A; font-size: .72rem; font-weight: 800; letter-spacing: .02em; border-radius: 999px; padding: 3px 12px; cursor: pointer; font-family: inherit; transition: background .15s, transform .1s; }
.bys-oreo-apply:hover { background: #9FD6C9; }
.bys-oreo-apply:active { transform: scale(.94); }
.bys-oreo-view u.bys-oreo-weak { text-decoration: underline wavy; text-decoration-color: #E0A030; text-decoration-thickness: 1px; text-underline-offset: 3px; color: #333333; }
.bys-oreo-corr-tip { font-size: .8rem; color: #808080; line-height: 1.55; margin-top: 4px; padding-left: 8px; }
.bys-oreo-feedback .bys-ex-fb-tip { color: #808080; }
.bys-oreo-note { position: relative; border: 1px solid #CDE7CC; border-radius: 12px; padding: 8px 14px 12px; background: #fff; }
.bys-oreo-note:focus-within { border-color: #69ADA7; box-shadow: 0 0 0 3px rgba(105,173,167,.15); }
.bys-oreo-part { position: relative; margin-top: 9px; }
.bys-oreo-part:first-child { margin-top: 2px; }
.bys-oreo-lbl { font-weight: 800; font-size: .72rem; letter-spacing: .06em; color: #B4C3B4; line-height: 1.4; user-select: none; }
.bys-oreo-fld { width: 100%; box-sizing: border-box; border: none; outline: none; resize: none; overflow: hidden; font-family: inherit; font-size: .9rem !important; line-height: 28px; min-height: 28px; color: #333333; padding: 0; background-color: transparent; background-image: repeating-linear-gradient(transparent 0 27px, #E9EFE9 27px 28px); }
.bys-oreo-part.reading { background: rgba(105,173,167,.16); border-radius: 6px; box-shadow: 0 0 0 4px rgba(105,173,167,.16); }
.bys-oreo-clear { position: absolute; top: -1px; right: 0; width: 22px; height: 22px; border: none; background: none; color: #B4B4B4; font-size: 16px; line-height: 1; cursor: pointer; border-radius: 6px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.bys-oreo-clear:hover { background: #FBECEC; color: #C0392B; }
.bys-oreo-tools { position: relative; z-index: 4; display: flex; justify-content: flex-end; align-items: center; gap: 6px; margin-bottom: 6px; }
.bys-oreo-tools .bys-ex-mic { margin-right: 0; }
.bys-oreo-check { flex-shrink: 0; width: 30px; height: 30px; border: none; border-radius: 50%; background: #B4E0D6; color: #12695A; font-size: .72rem; font-weight: 800; letter-spacing: .02em; cursor: pointer; font-family: inherit; display: inline-flex; align-items: center; justify-content: center; padding: 0; transition: background .15s, transform .1s; }
.bys-oreo-check:hover { background: #9FD6C9; }
.bys-oreo-check:active { transform: scale(.92); }
.bys-oreo-pin { flex-shrink: 0; width: 30px; height: 30px; border: 1px solid #CDE7CC; border-radius: 50%; background: #fff; color: #638679; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; transition: background .15s, color .15s, transform .1s; }
.bys-oreo-pin:hover { background: #E7F8F2; color: #333333; }
.bys-oreo-pin.on { background: #69ADA7; color: #fff; border-color: #69ADA7; }
.bys-oreo-pin:active { transform: scale(.92); }
.bys-oreo-spk { position: absolute; top: 1px; right: 0; width: 26px; height: 26px; }
.bys-oreo-feedback { position: relative; margin-top: 10px; background: #F7FBF9; border: 1px solid #D5EDE4; border-radius: 12px; padding: 12px 34px 12px 14px; }
/* PRACTICE STRUCTURE — 오늘의 문장 구조 훈련 (전체 한 박스) */
.bys-struct { border: 1px solid #CDE7CC; border-radius: 16px; background: #FCFEFD; padding: 18px 18px 20px; }
/* 🎯 대표님 지시(2026-09-25) — 제목(PRACTICE STRUCTURE)이 박스 밖 위로 나온 뒤 .smec-section의
   기본 margin-top:36px이 그대로 남아 제목-박스 간격이 과하게 벌어짐. 이 조합(.smec-section.bys-struct)만
   좁혀서 제목 바로 아래 박스가 붙어 보이게 함 — .bys-struct 단독 사용처(Reflection 등, smec-section 클래스
   없음)는 이 규칙 대상이 아니라 무영향.
   🚨 배포담당 발견(2026-09-25) — Training탭 "오늘의 문장 구조 훈련" 드릴 위젯(_bysStructTrainHtml,
   class="smec-section bys-struct bys-struct-train bys-struct-build")도 같은 두 클래스를 포함해 이 규칙에
   같이 걸림. 그 박스는 제목이 여전히 박스 안 첫 자식이라 margin-top:36px가 "제목-박스 간격"이 아니라
   "이 섹션과 앞 콘텐츠 사이 간격"으로 쓰이고 있어 12px로 줄이면 안 됨 — :not(.bys-struct-train)으로 제외.
   🚨 대표님 재지시(2026-09-25) — 12px로도 여전히 "같은 과 다른 파트(본문/한글본문/Reflection)"보다 훨씬
   멀어 보임. 다른 파트는 제목이 박스 '안' 첫 자식이라 title margin-bottom(14px, .bys-ee-title)만으로
   간격이 끝나는데, 이 박스는 제목이 밖에 있어서 title margin-bottom(10px, 인라인)에 이 박스의
   margin-top까지 더해져(기존 12px→합계 22px+테두리) 두 배 가까이 벌어져 있었음. margin-top을 0으로
   없애서 순수하게 title의 margin-bottom(10px)만 간격으로 남게 해 다른 파트(14px)와 거의 동일하게 맞춤. */
.smec-section.bys-struct:not(.bys-struct-train) { margin-top: 0; }
.bys-struct-formline { margin: -6px 0 14px; }
.bys-struct .bys-struct-form { display: inline-block; font-size: 1.05rem; font-weight: 700; color: #12695A; background: #E6F4EF; border-radius: 10px; padding: 5px 14px; letter-spacing: .01em; text-transform: none; }
.bys-struct-today { margin: 4px 0 12px; }
.bys-struct-today-lbl { font-size: .72rem; font-weight: 800; letter-spacing: .05em; color: #69ADA7; text-transform: uppercase; margin-bottom: 5px; }
.bys-struct-sent { font-size: 1.06rem; font-weight: 700; line-height: 1.5; color: #12332C; }
.bys-struct-sent-hl { background: linear-gradient(transparent 62%, #C9EBDF 62%); padding: 0 2px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.bys-struct-sent .bys-s-speak { background: transparent; border: none; color: #3E9E8E; cursor: pointer; padding: 2px 4px; vertical-align: middle; }
.bys-struct-sent-ko { font-size: .86rem; color: #7C8C86; margin-top: 2px; line-height: 1.5; }
.bys-struct-sent-ko strong { font-weight: 800; color: #3B4A46; }
.bys-struct-principle { font-size: .8rem; line-height: 1.6; color: #6E8078; background: transparent; border: none; border-left: 3px solid #C9EBDF; border-radius: 0; padding: 2px 0 2px 12px; margin: 0 0 14px; }
.bys-struct-principle strong { font-weight: 800; color: #12695A; }
.bys-struct-ex { display: flex; flex-direction: column; gap: 8px; margin: 0 0 16px; padding-top: 14px; border-top: 1px dashed #CDE7CC; }
.bys-struct-ex-row { border-left: 3px solid #C9EBDF; padding: 3px 0 3px 12px; }
.bys-struct-ex-en { font-size: .98rem; font-weight: 600; color: #1C332D; line-height: 1.5; }
.bys-struct-ex-en strong { font-weight: 800; color: #12332C; }
.bys-struct-ex-en .bys-s-speak { background: transparent; border: none; color: #3E9E8E; cursor: pointer; padding: 2px; vertical-align: middle; margin-left: 2px; }
.bys-struct-ex-ko { font-size: .84rem; color: #7C8C86; margin-top: 2px; }
.bys-struct-ex-ko strong { font-weight: 800; color: #3B4A46; }
.bys-struct-build { background: transparent; border: none; border-top: 1px dashed #CDE7CC; border-radius: 0; padding: 15px 0 0; margin-top: 4px; }
.bys-struct-build-lbl { font-size: .9rem; font-weight: 700; color: #2E4A43; margin-bottom: 11px; }
.bys-struct-build-row { display: flex; align-items: flex-end; gap: 7px; }
.bys-struct-row { margin-bottom: 5px; }
.bys-struct-row:last-child { margin-bottom: 0; }
.bys-struct-row-line { display: flex; align-items: flex-start; gap: 6px; border-bottom: 1.5px solid #E1EAE6; padding: 2px 0; transition: border-color .15s; }
.bys-struct-row-line .bys-struct-mic, .bys-struct-row-line .bys-struct-ai { align-self: center; }
.bys-struct-row-line:focus-within { border-bottom-color: #69ADA7; }
.bys-struct-row-num { flex-shrink: 0; min-width: 15px; font-size: .98rem; font-weight: 800; color: #A9C0B9; line-height: 1.5; padding-top: 3px; }
.bys-struct-input { flex: 1; min-height: 30px; resize: none; border: none; border-radius: 0; padding: 3px 2px; font-family: inherit; font-size: .92rem; line-height: 1.5; color: #1C332D; background: transparent; }
.bys-struct-input:focus { outline: none; }
.bys-struct-input::placeholder { color: #BCC9C4; font-size: .92rem; line-height: 1.8; }
.bys-struct-mic { flex-shrink: 0; width: 30px; height: 30px; margin-right: 0; border: none; border-radius: 8px; background: transparent; color: #9BB4AD; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; transition: color .15s, background .15s; }
.bys-struct-mic:hover { color: #638679; background: #EEF6F3; }
.bys-struct-mic.recording { background: #F4C9C4; color: #B0342A; }
.bys-struct-mic.busy { opacity: .5; pointer-events: none; }
.bys-struct-ai { flex-shrink: 0; width: 30px; height: 30px; border: none; border-radius: 8px; background: transparent; color: #638679; font-size: .72rem; font-weight: 800; cursor: pointer; font-family: inherit; display: inline-flex; align-items: center; justify-content: center; padding: 0; transition: background .15s, transform .1s; }
.bys-struct-ai:hover { background: #EEF6F3; }
.bys-struct-ai:active { transform: scale(.94); }
.bys-struct-fb { position: relative; margin-top: 11px; background: #F7FBF9; border: 1px solid #D5EDE4; border-radius: 12px; padding: 12px 38px 12px 14px; }
.bys-struct-fb.ok { background: #F2FAF6; border-color: #BFE6D2; }
.bys-struct-fb.hint { background: #FFFBF2; border-color: #F0E0BC; }
.bys-struct-fb-x { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border: none; border-radius: 50%; background: transparent; color: #9BB4AD; font-size: 1.15rem; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; transition: background .15s, color .15s; }
.bys-struct-fb-x:hover { background: #E3EFEA; color: #4E6B63; }
.bys-struct-fb-load { font-size: .9rem; color: #6E8880; }
.bys-struct-fb-head { display: flex; align-items: center; gap: 6px; font-size: .95rem; font-weight: 800; color: #12695A; margin-bottom: 7px; }
.bys-struct-fb.hint .bys-struct-fb-head { color: #8A6D3B; }
.bys-struct-fb-head svg { flex-shrink: 0; color: #12695A; }
.bys-struct-fb-corr { font-size: 1rem; font-weight: 600; color: #16352D; line-height: 1.5; margin-bottom: 6px; }
.bys-struct-fb-corr .bys-s-speak { background: transparent; border: none; color: #3E9E8E; cursor: pointer; padding: 2px 3px; vertical-align: middle; }
.bys-struct-fb-apply { cursor: pointer; border-radius: 8px; margin: -3px -5px 6px; padding: 3px 5px; transition: background .15s; }
.bys-struct-fb-apply:hover { background: #E9F4F0; }
.bys-struct-fb-tip { font-size: .9rem; line-height: 1.6; color: #47605A; }
.bys-ko-reveal-btn { background: none; border: none; padding: 0; font: inherit; font-size: .78rem; color: #69ADA7; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; text-decoration-color: #CDE7CC; }
.bys-ko-reveal-btn:hover { color: #4E6B63; }
.bys-ko-reveal-btn:focus-visible { outline: 2px solid #69ADA7; outline-offset: 2px; border-radius: 3px; }
/* Training 탭 — 오늘의 문장 구조 훈련 */
.bys-struct-train { margin-top: 4px; }
.bys-struct-train-sub { font-size: .86rem; line-height: 1.6; color: #6E8078; margin: 0 0 14px; }
.bys-struct-drow { margin-bottom: 16px; }
.bys-struct-drow:last-child { margin-bottom: 0; }
.bys-struct-drill-cue { font-size: .92rem; font-weight: 600; color: #2E4A43; margin-bottom: 4px; }
.bys-struct-drill-num { font-weight: 800; color: #69ADA7; margin-right: 5px; }
.bys-struct-drill-ans { margin-top: 6px; }
.bys-struct-ans-btn { border: 1px solid #CDE7CC; background: #fff; color: #4E7A6F; font-size: .78rem; font-weight: 600; border-radius: 999px; padding: 3px 12px; cursor: pointer; font-family: inherit; }
.bys-struct-ans-btn:hover { background: #F1F7F4; }
.bys-struct-ans-btn:disabled { opacity: .4; cursor: default; }
.bys-struct-ans-btn:disabled:hover { background: #fff; }
.bys-struct-chk { flex-shrink: 0; height: 30px; padding: 0 11px; border: none; border-radius: 999px; background: #B4E0D6; color: #12695A; font-size: .76rem; font-weight: 800; cursor: pointer; font-family: inherit; display: inline-flex; align-items: center; justify-content: center; transition: background .15s, transform .1s; }
.bys-struct-chk:hover { background: #9FD6C9; }
.bys-struct-chk:active { transform: scale(.94); }
.bys-struct-score { font-size: .8rem; font-weight: 800; color: #12695A; background: #E6F4EF; border-radius: 999px; padding: 2px 10px; letter-spacing: 0; text-transform: none; }
.bys-struct-drow.ok .bys-struct-row-line { border-bottom-color: #69ADA7; }
.bys-struct-drow.ok .bys-struct-fb { background: #F2FAF6; border-color: #BFE6D2; }
.bys-struct-drow.near .bys-struct-fb { background: #FFFBF2; border-color: #F0E0BC; }
.bys-struct-ans-box { margin-top: 7px; font-size: .96rem; font-weight: 600; color: #16352D; line-height: 1.5; background: #F7FBF9; border: 1px solid #D5EDE4; border-radius: 10px; padding: 9px 12px; }
.bys-struct-ans-lbl { font-size: .7rem; font-weight: 800; letter-spacing: .04em; color: #69ADA7; text-transform: uppercase; margin-right: 6px; }
.bys-struct-ans-box .bys-s-speak { background: transparent; border: none; color: #3E9E8E; cursor: pointer; padding: 2px 3px; vertical-align: middle; }
.bys-oreo-fb-label { font-size: .72rem; font-weight: 800; letter-spacing: .05em; color: #69ADA7; text-transform: uppercase; margin: 8px 0 3px; }
.bys-oreo-fb-label:first-of-type { margin-top: 0; }
.bys-oreo-fb-corrected { font-size: .9rem; color: #333333; font-weight: 600; line-height: 1.65; }
.bys-st3-pattern-examples { list-style: none; padding: 0; margin: 4px 0 0; }
.bys-st3-pattern-examples li { display: flex; flex-direction: column; gap: 0; padding: 4px 8px 5px 10px; background: #F3FBF8; border-radius: 8px; margin-bottom: 2px; font-size: .92rem; color: #2A2A2A; line-height: 1.35; }
.bys-ex-en-row { display: flex; align-items: center; gap: 3px; }
.bys-ex-en-row > span { flex: 1; min-width: 0; }
.bys-ex-ko { font-size: .82rem; color: #6E7B6E; padding-left: 1px; }
/* Lv 5.0+ : 본문 번역만 남기고 한글 숨김 → 영어 클릭 시 아래로 뜻 노출 */
.bys-hideko .bys-st3-pattern-meaning,
.bys-hideko .bys-ex-ko,
.bys-hideko .bys-gp-ko,
.bys-hideko .bys-gp-step-ko { display: none; }
.bys-hideko .bys-st3-pattern-meaning.bys-ko-show,
.bys-hideko .bys-ex-ko.bys-ko-show,
.bys-hideko .bys-gp-ko.bys-ko-show,
.bys-hideko .bys-gp-step-ko.bys-ko-show { display: block; }
.bys-hideko .bys-st3-pattern-head,
.bys-hideko .bys-ex-en-row,
.bys-hideko .bys-gp-step,
.bys-hideko .bys-groupproject { cursor: pointer; }
.bys-koHint { font-size: .78rem; color: #69ADA7; background: #F3FBF8; border: 1px solid #E1EBE1; border-radius: 10px; padding: 8px 12px; margin: 0 0 4px; text-align: center; font-weight: 600; }
.bys-st3-lesson { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.bys-st3-lesson-title { text-align: center; padding: 4px 0 14px; border-bottom: 1px solid #ECE7DB; margin-bottom: 2px; }
.bys-st3-lesson-title-en { font-family: 'Poppins', sans-serif; font-size: 1.18rem; font-weight: 700; color: #333333; line-height: 1.3; letter-spacing: -.01em; }
.bys-st3-lesson-title-ko { font-size: .9rem; font-weight: 600; color: #8B6914; margin-top: 5px; }
.bys-st3-lesson-block { background: #FAFAF8; border: 1px solid #E0DCD2; border-radius: 14px; padding: 18px 20px; }
.bys-st3-lesson-lbl { font-size: 1rem; font-weight: 700; color: #8B6914; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 8px; }
/* 본문 읽기 버튼 그룹: 스크롤 시 JS가 transform으로만 이동 → 본문 레이아웃 영향 없음. 평소엔 라벨 행 우측 제자리, 스크롤 올라가면 헤더 아래에서 멈춰 박스 안에서 따라오고, 박스를 벗어나면 제자리로. padding·border는 항상 예약(토글 시 리플로우 방지), 배경만 켜짐. */
.bys-read-ctrl { position: relative; z-index: 30; padding: 4px 8px; border: 1px solid transparent; border-radius: 999px; }
.bys-read-ctrl.bys-ctrl-sticky { background: #FAFAF8; border-color: #E0DCD2; box-shadow: 0 6px 18px rgba(0,0,0,.16); }
.bys-st3-lesson-text { font-size: .96rem; line-height: 1.75; color: #333333; letter-spacing: -.003em; }
/* ═══ 글자 크기 조절 (학습 화면 텍스트만 3단계 · 김경희 건의 fb_mrpqvod6_hq6s 2026-07-18) ═══
   보통=기본(클래스 없음) / bys-fs-sm=작게 / bys-fs-lg=크게. 본문 읽기 텍스트만 스케일(레이아웃 불변). */
body.bys-fs-lg #screen-bys-day .bys-s-ko,
body.bys-fs-lg #screen-bys-day .bys-s-en-text { font-size: 21px !important; }
body.bys-fs-lg #screen-bys-day .bys-st3-lesson-text,
body.bys-fs-lg #screen-bys-day .bys-st3-practice { font-size: 1.12rem !important; }
body.bys-fs-lg #screen-bys-day .bys-oreo-q { font-size: 1.16rem !important; }
body.bys-fs-lg #screen-bys-day .bys-oreo-q-ko { font-size: 1rem !important; }
body.bys-fs-lg #screen-bys-day .bys-s-ex-en { font-size: 1rem !important; }
body.bys-fs-lg #screen-bys-day .bys-s-ex-ko { font-size: .92rem !important; }
body.bys-fs-lg #screen-bys-day .bys-s-hard { font-size: 15.5px !important; }
body.bys-fs-sm #screen-bys-day .bys-s-ko,
body.bys-fs-sm #screen-bys-day .bys-s-en-text { font-size: 15.5px !important; }
body.bys-fs-sm #screen-bys-day .bys-st3-lesson-text,
body.bys-fs-sm #screen-bys-day .bys-st3-practice { font-size: .86rem !important; }
body.bys-fs-sm #screen-bys-day .bys-oreo-q { font-size: .9rem !important; }
body.bys-fs-sm #screen-bys-day .bys-oreo-q-ko { font-size: .8rem !important; }
body.bys-fs-sm #screen-bys-day .bys-s-ex-en { font-size: .78rem !important; }
body.bys-fs-sm #screen-bys-day .bys-s-hard { font-size: 12px !important; }
/* 글자 크기 컨트롤 — 학습 화면 좌하단 알약 */
.bys-fs-ctrl { position: fixed; left: 14px; bottom: 16px; z-index: 60; display: none; align-items: center; gap: 2px; background: rgba(255,255,255,.94); border: 1px solid #E0DACB; border-radius: 999px; padding: 3px; box-shadow: 0 4px 16px rgba(20,18,13,.14); backdrop-filter: blur(6px); }
body.on-bys-day .bys-fs-ctrl { display: inline-flex; }
.bys-fs-ctrl button { border: none; background: transparent; color: #6B665A; font-family: inherit; font-weight: 700; cursor: pointer; border-radius: 999px; padding: 5px 11px; line-height: 1; transition: background .12s, color .12s; }
.bys-fs-ctrl button.s1 { font-size: 12px; } .bys-fs-ctrl button.s2 { font-size: 15px; } .bys-fs-ctrl button.s3 { font-size: 18px; }
.bys-fs-ctrl button.on { background: #69ADA7; color: #fff; }
.bys-st3-lesson-text.en { color: #333333; }
.bys-st3-lesson-text.ko { color: #2A2A2A; }
.bys-st3-lesson-text strong { font-weight: 800; color: #0F3D0F; }
.bys-st3-practice { padding-left: 22px; margin-top: 14px; line-height: 1.7; color: #2A2A2A; font-size: .94rem; }
.bys-st3-practice li { margin-bottom: 8px; }
.smec-drill-mic-hint { font-size: .82rem; color: #8A8A8A; }
.smec-drill-result { padding: 16px 18px; border-radius: 12px; margin-top: 14px; }
.smec-drill-result.correct { background: #E7F8F2; color: #638679; }
.smec-drill-result.partial { background: #FFF3CD; color: #92400E; }
.smec-drill-result-lbl { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 6px; }
.smec-drill-result-you { font-size: .9rem; margin-bottom: 8px; font-weight: 500; }
.smec-drill-result-exp { font-size: .85rem; font-style: italic; opacity: .85; }
.smec-drill-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 20px; }
.smec-drill-btn { padding: 11px 18px; border: none; border-radius: 980px; font-family: inherit; font-weight: 600; font-size: .92rem; cursor: pointer; transition: all .15s; white-space: nowrap; }
.smec-drill-btn-primary { background: #69ADA7; color: #fff; }
.smec-drill-btn-primary:hover { background: #638679; }
.smec-drill-btn-secondary { background: transparent; color: #5C5C5C; border: 1.5px solid #E8E8E4; }
.smec-drill-btn-secondary:hover { border-color: #69ADA7; color: #638679; }
.smec-drill-done { text-align: center; padding: 40px 20px; }
.smec-drill-done-icon { font-size: 3rem; margin-bottom: 12px; }
.smec-drill-done-title { font-size: 1.4rem; font-weight: 700; color: #333333; margin-bottom: 6px; }
.smec-drill-done-sub { font-size: .94rem; color: #5C5C5C; margin-bottom: 22px; }

/* 대화 훈련 */
.smec-conv-list { display: flex; flex-direction: column; gap: 12px; }
.smec-conv-card { padding: 18px 20px; background: #F2F2EF; border-radius: 14px; cursor: pointer; transition: transform .15s; }
.smec-conv-card:hover { transform: translateY(-2px); background: #E7F8F2; }
.smec-conv-title { font-size: 1.02rem; font-weight: 700; color: #333333; margin-bottom: 4px; }
.smec-conv-scenario { font-size: .84rem; color: #5C5C5C; line-height: 1.5; }

.smec-conv-runner { background: #fff; border-radius: 18px; padding: 24px 20px; box-shadow: 0 8px 32px rgba(105,173,167,.12); display: flex; flex-direction: column; min-height: 520px; }
.smec-conv-scene { background: #F3FBF8; padding: 14px 16px; border-radius: 10px; font-size: .86rem; color: #5C5C5C; line-height: 1.55; margin-bottom: 14px; }
.bys-expr-strip { background:#F7FAF7; border:1px solid #E4EDE4; border-radius:12px; padding:11px 13px 12px; margin-bottom:14px; }
.bys-expr-head { font-size:.72rem; font-weight:800; color:#6C8C6C; letter-spacing:.02em; margin-bottom:8px; display:flex; align-items:center; gap:7px; }
.bys-expr-count { font-size:.7rem; font-weight:800; color:#69ADA7; background:#EAF2EA; border-radius:20px; padding:1px 8px; font-variant-numeric:tabular-nums; }
.bys-expr-chips { display:flex; flex-wrap:wrap; gap:4px; }
/* 대표님 지시(2026-09-24) — PRACTICE OREO의 표현 버튼(.bys-oreo-x)과 동일한 심플한 알약 디자인으로 통일 */
.bys-expr-chip { display:inline-flex; align-items:center; font-size:.66rem; color:#69ADA7; background:#fff; border:1px solid #CDE7CC; border-radius:999px; padding:2px 8px; font-family:inherit; line-height:1.5; transition:background .15s,color .15s,border-color .15s; position:relative; }
/* 대표님 지시(2026-09-24) — 칩이 남는 공간만큼 늘어나 개별 박스 안에 여백이 생기던 문제. 늘어나지 않고 내용물 크기 그대로(개별박스) 유지 */
.bys-expr-chips.packed .bys-expr-chip { flex:0 0 auto; }
.bys-expr-chip-struct { color:#12695A; border-color:#B4E0D6; background:#F4FBF8; font-weight:700; }
.bys-expr-hint { font-size:.72rem; font-weight:500; color:#9AA8A2; letter-spacing:0; }
.bys-expr-en { font-size:.66rem; line-height:1.5; }
.bys-expr-chip.used { background:#69ADA7; color:#fff; border-color:#69ADA7; }
.bys-expr-chip-struct.used { background:#12695A; color:#fff; border-color:#12695A; }
.bys-expr-strip.all-done .bys-expr-head { color:#3AAE6A; }
.bys-expr-strip.all-done { border-color:#9AD7B0; background:#EFF9F1; }
.smec-conv-chat { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 4px; overflow-y: auto; max-height: 360px; margin-bottom: 14px; }
.smec-conv-bubble { padding: 10px 14px; border-radius: 14px; max-width: 86%; font-size: .92rem; line-height: 1.45; }
.smec-conv-bubble.ai { background: #F2F2EF; color: #333333; align-self: flex-start; }
.smec-conv-bubble.you { background: #69ADA7; color: #fff; align-self: flex-end; }
.smec-conv-mic-area { display: flex; align-items: center; gap: 14px; padding-top: 12px; border-top: 1px solid rgba(0,0,0,.06); }
.smec-conv-mic-btn { width: 56px; height: 56px; border-radius: 50%; background: #69ADA7; color: #fff; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all .15s; }
.smec-conv-mic-btn.recording { background: #D94B4B; animation: smec-pulse 1s infinite; }
.smec-conv-mic-btn:disabled { background: #E8E8E4; cursor: not-allowed; }
.smec-conv-hint { flex: 1; font-size: .86rem; color: #8A8A8A; }
.smec-conv-end-btn { padding: 10px 18px; background: transparent; color: #8A8A8A; border: 1.5px solid #E8E8E4; border-radius: 980px; font-family: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; }
.smec-conv-end-btn:hover { color: #D94B4B; border-color: #D94B4B; }
.smec-conv-end-btn.restart { color: #638679; border-color: #69ADA7; font-weight: 700; }
.smec-conv-end-btn.restart:hover { color: #638679; border-color: #638679; background: rgba(105,173,167,.08); }

#screen-grammar-list, #screen-grammar-chapter { padding: 16px 14px calc(80px + env(safe-area-inset-bottom, 0px)); max-width: 760px; margin: 0 auto; }
.gram-topbar { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; }
.gram-topbar .hist-back { margin-bottom: 0; }
.gram-cover { background: linear-gradient(135deg, #FAF6F0 0%, #FFFFFF 100%); border: 1.5px solid #C19A6B; border-radius: 18px; padding: 22px 20px; margin-bottom: 18px; }
.gram-cover-eyebrow { font-size: .78rem; font-weight: 800; letter-spacing: .14em; color: #8B6F47; margin-bottom: 6px; }
.gram-cover-title { font-size: 1.5rem; font-weight: 800; color: var(--navy); line-height: 1.2; }
.gram-cover-sub { font-size: .9rem; color: var(--gray-600); margin-top: 6px; }
.gram-cover-desc { font-size: .85rem; color: var(--gray-600); margin-top: 10px; line-height: 1.55; }

.gram-part { margin-top: 22px; }
.gram-part-label { font-size: .82rem; font-weight: 800; letter-spacing: .12em; color: #8B6F47; margin-bottom: 4px; }
.gram-part-desc  { font-size: .85rem; color: var(--gray-600); margin-bottom: 10px; }

.gram-chapters { display: grid; gap: 10px; }
.gram-card {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  padding: 14px 16px; border-radius: 14px; background: #FFFFFF;
  border: 1.5px solid var(--gray-200); cursor: pointer; transition: all .15s ease;
}
.gram-card:hover { border-color: #C19A6B; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.gram-card.locked { opacity: .55; cursor: not-allowed; }
.gram-card.locked:hover { transform: none; box-shadow: none; border-color: var(--gray-200); }
.gram-card-num { width: 40px; height: 40px; border-radius: 10px; background: #FAF1E2; color: #8B6F47; font-weight: 800; display: grid; place-items: center; font-size: 1rem; }
.gram-card.locked .gram-card-num { background: var(--gray-100); color: var(--gray-400); }
.gram-card-body { min-width: 0; }
.gram-card-meta { font-size: .74rem; font-weight: 700; color: var(--gray-400); letter-spacing: .04em; }
.gram-card-title { font-size: 1.02rem; font-weight: 800; color: var(--navy); margin-top: 2px; line-height: 1.25; }
.gram-card-sub { font-size: .84rem; color: var(--gray-600); margin-top: 3px; line-height: 1.45; }
.gram-card-status { font-size: .8rem; font-weight: 700; color: var(--gray-400); }
.gram-card-status.done { color: #16A34A; }
.gram-card-status.partial { color: #D97706; }

/* Chapter view */
.gram-chap-head { padding: 4px 2px 18px; }
.gram-chap-eyebrow { font-size: .76rem; font-weight: 800; letter-spacing: .12em; color: #8B6F47; }
.gram-chap-title { font-size: 1.5rem; font-weight: 800; color: var(--navy); line-height: 1.2; margin-top: 6px; }
.gram-chap-sub { font-size: .92rem; color: var(--gray-600); margin-top: 6px; }
.gram-chap-meta { display: flex; gap: 14px; margin-top: 10px; font-size: .82rem; color: var(--gray-600); flex-wrap: wrap; }
.gram-chap-meta b { color: var(--navy); font-weight: 700; }

.gram-progress-bar { position: sticky; top: 0; z-index: 5; background: rgba(255,255,255,.95); backdrop-filter: blur(8px); padding: 8px 0; margin: 0 -14px 12px; padding-left: 14px; padding-right: 14px; border-bottom: 1px solid var(--gray-100); }
.gram-progress-track { height: 4px; background: var(--gray-100); border-radius: 4px; overflow: hidden; }
.gram-progress-fill { height: 100%; background: linear-gradient(90deg, var(--mint) 0%, var(--mint-dk) 100%); transition: width .3s ease; }
.gram-progress-label { font-size: .68rem; color: var(--gray-600); margin-top: 4px; display: flex; justify-content: space-between; }

.gram-section { background: #FFFFFF; border: 1.5px solid var(--gray-200); border-radius: 14px; padding: 18px 18px 20px; margin-bottom: 14px; }
/* Pagination — 섹션별 한 페이지씩 */
.gram-section-page { display: none; }
.gram-section-page.active { display: block; }
.gram-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; background: #FAFAF8; border: 1px solid #E0DCD2; border-radius: 12px; margin: 14px 0; }
.gram-pager-btn { background: #fff; border: 1px solid #CDE7CC; border-radius: 980px; padding: 8px 16px; font-family: inherit; font-size: .86rem; font-weight: 600; color: #638679; cursor: pointer; transition: all .15s; flex-shrink: 0; }
.gram-pager-btn:hover:not(:disabled) { background: #F3FBF8; border-color: #69ADA7; }
.gram-pager-btn:disabled { opacity: .35; cursor: default; }
.gram-pager-btn.primary { background: #69ADA7; color: #fff; border-color: #69ADA7; }
.gram-pager-btn.primary:hover:not(:disabled) { background: #638679; }
.gram-pager-label { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; justify-content: center; flex-wrap: wrap; }
.gram-pager-count { font-weight: 700; color: #333333; font-size: .92rem; }
.gram-pager-count .sep { color: #bbb; margin: 0 2px; }
.gram-pager-title { color: #5C5C5C; font-size: .82rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.gram-chap-tail { display: none; }
.gram-chap-tail.show { display: block; }
.gram-section-eyebrow { font-size: .74rem; font-weight: 800; letter-spacing: .14em; color: #8B6F47; }
.gram-section-title { font-size: 1.1rem; font-weight: 800; color: var(--navy); margin-top: 4px; line-height: 1.3; }
.gram-section-body { margin-top: 12px; font-size: .92rem; color: var(--gray-800); line-height: 1.75; word-break: keep-all; }
/* 본문 강조 마크업 — **bold** / ==mint== */
#screen-grammar-chapter strong, #screen-grammar-list strong { font-weight: 700; color: var(--navy); }
#screen-grammar-chapter strong.mint, #screen-grammar-list strong.mint { color: var(--mint-dk); font-weight: 700; }
.gram-confusion-body strong { color: #92400E; }
.gram-confusion-body strong.mint { color: var(--mint-dk); }
.gram-section-body p { margin-bottom: 8px; }
.gram-section-body p:last-child { margin-bottom: 0; }

.gram-callout { background: var(--mint-lt); border-left: 3px solid var(--mint); border-radius: 8px; padding: 10px 14px; margin: 10px 0; }
.gram-callout-label { font-size: .72rem; font-weight: 800; color: var(--mint-dk); margin-bottom: 4px; }
.gram-callout-text { font-size: .85rem; color: var(--navy); line-height: 1.5; }

.gram-table-wrap { overflow-x: auto; margin: 10px -2px; }
.gram-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.gram-table th { background: var(--navy); color: #FFFFFF; padding: 9px 11px; text-align: left; font-weight: 700; font-size: .84rem; }
.gram-table td { padding: 9px 11px; border-bottom: 1px solid var(--gray-100); vertical-align: top; }
.gram-table tr:nth-child(even) td { background: var(--gray-50); }
.gram-table .em { color: var(--mint-dk); font-weight: 700; }

.gram-objectives { padding-left: 18px; }
.gram-objectives li { margin-bottom: 6px; font-size: .92rem; color: var(--gray-800); line-height: 1.55; }

.gram-term { display: flex; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--gray-100); font-size: .9rem; }
.gram-term:last-child { border-bottom: none; }
.gram-term b { color: var(--navy); font-weight: 700; min-width: 80px; }

.gram-examples { display: grid; gap: 6px; margin-top: 10px; }
.gram-ex { padding: 9px 13px; border-radius: 8px; background: var(--gray-50); font-size: .9rem; line-height: 1.55; }
.gram-ex.ok  { background: #F0FDF4; color: #166534; }
.gram-ex.bad { background: #FEF2F2; color: #991B1B; }
.gram-ex.info { background: var(--mint-lt); color: #064E47; }
.gram-ex .ko { color: var(--gray-600); margin-left: 6px; }

/* concept 항목 간격 — 3.1, 3.2 사이 시각적 구분 */
.gram-concept { margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--gray-100); }
.gram-concept:last-child { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }

.gram-confusion { background: #FFFBEB; border: 1.5px solid #FCD34D; border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; }
.gram-confusion-id { font-size: .68rem; font-weight: 800; color: #B45309; letter-spacing: .04em; }
.gram-confusion-title { font-size: .92rem; font-weight: 800; color: #92400E; margin-top: 2px; }
.gram-confusion-body { font-size: .82rem; color: #78350F; margin-top: 6px; line-height: 1.55; }

/* Training questions */
.gram-q { padding: 12px 0; border-bottom: 1px solid var(--gray-100); }
.gram-q:last-child { border-bottom: none; }
.gram-q-head { display: flex; gap: 8px; align-items: baseline; margin-bottom: 8px; }
.gram-q-num { font-size: .82rem; font-weight: 800; color: var(--gray-400); width: 26px; flex: 0 0 26px; }
.gram-q-prompt { font-size: .94rem; color: var(--navy); font-weight: 600; line-height: 1.5; flex: 1; }
.gram-q-prompt .ko { color: var(--gray-600); font-weight: 500; }
.gram-q-template { font-family: inherit; font-size: .94rem; font-weight: 600; color: var(--navy); margin: 6px 0; padding: 8px 12px; background: var(--gray-50); border-radius: 6px; display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; letter-spacing: .01em; }

.gram-input {
  padding: 5px 8px; border: 1.5px solid var(--gray-200); border-radius: 8px;
  font-size: .94rem; font-family: inherit; font-weight: 600;
  color: var(--navy); outline: none; background: #FFFFFF;
  transition: border-color .15s, box-shadow .15s;
  margin: 0 6px; text-align: center; min-width: 0;
}
.gram-input:focus { border-color: var(--mint); box-shadow: 0 0 0 3px rgba(105,173,167,.15); }
.gram-input.long { width: 100%; margin: 0; text-align: left; }
.gram-input.correct { border-color: #16A34A; background: #F0FDF4; }
.gram-input.wrong { border-color: #DC2626; background: #FEF2F2; }
.gram-input-row { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 6px; }
.gram-field { display: grid; grid-template-columns: 60px 1fr; gap: 10px; align-items: center; }
.gram-field label { font-size: .72rem; color: var(--gray-600); font-weight: 600; text-align: left; }
@media (min-width: 640px) {
  .gram-input-row { grid-template-columns: 1fr 1fr; gap: 14px; }
}

.gram-options { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.gram-choice {
  padding: 6px 14px; border-radius: 20px; border: 1.5px solid var(--gray-200);
  background: #FFFFFF; font-size: .82rem; font-weight: 600; color: var(--gray-800);
  cursor: pointer; font-family: inherit; transition: all .12s;
}
.gram-choice:hover { border-color: var(--mint); }
.gram-choice.selected { background: var(--mint); border-color: var(--mint-dk); color: #FFFFFF; }
.gram-choice.correct { background: #16A34A; border-color: #15803D; color: #FFFFFF; }
.gram-choice.wrong   { background: #DC2626; border-color: #B91C1C; color: #FFFFFF; }

.gram-q-feedback { font-size: .78rem; margin-top: 6px; padding: 6px 10px; border-radius: 6px; }
.gram-q-feedback.correct { background: #F0FDF4; color: #166534; }
.gram-q-feedback.wrong   { background: #FEF2F2; color: #991B1B; }
.gram-q-feedback .model  { color: var(--gray-600); display: block; margin-top: 4px; }
.gram-q-feedback .ai-comment { color: var(--gray-800); display: block; margin-top: 6px; line-height: 1.5; white-space: pre-wrap; }

.gram-grade-btn {
  margin-top: 14px; width: 100%; padding: 12px 16px; border: none; border-radius: 12px;
  background: var(--mint); color: #FFFFFF; font-size: .92rem; font-weight: 800;
  font-family: inherit; cursor: pointer; transition: background .12s;
}
.gram-grade-btn:hover { background: var(--mint-dk); }
.gram-grade-btn:disabled { background: var(--gray-200); color: var(--gray-400); cursor: not-allowed; }
.gram-grade-btn.loading::after { content: ''; display: inline-block; width: 12px; height: 12px; border: 2px solid #FFFFFF; border-top-color: transparent; border-radius: 50%; animation: gramSpin .8s linear infinite; margin-left: 8px; vertical-align: middle; }
@keyframes gramSpin { to { transform: rotate(360deg); } }

.gram-score-banner { padding: 10px 14px; border-radius: 10px; background: var(--mint-lt); color: var(--mint-dk); font-weight: 800; font-size: .9rem; margin-top: 12px; text-align: center; }
.gram-score-banner.bad { background: #FEF2F2; color: #991B1B; }

.gram-checklist { margin: 10px 0 4px; }
.gram-check-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; cursor: pointer; user-select: none; }
.gram-check-box {
  width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--gray-200);
  flex: 0 0 22px; transition: all .12s; margin-top: 2px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; line-height: 1; font-weight: 700;
  color: transparent;
}
.gram-check-item.checked .gram-check-box { background: var(--mint); border-color: var(--mint-dk); color: #FFFFFF; }
.gram-check-text { font-size: .88rem; line-height: 1.5; color: var(--gray-800); }
.gram-check-item.checked .gram-check-text { color: var(--gray-400); text-decoration: line-through; }

.gram-next { margin-top: 24px; padding: 14px 18px; background: var(--navy); color: #FFFFFF; border-radius: 12px; display: flex; justify-content: space-between; align-items: center; gap: 10px; cursor: pointer; }
.gram-next:hover { background: var(--navy-2); }
.gram-next-label { font-size: .7rem; opacity: .7; }
.gram-next-title { font-size: .92rem; font-weight: 800; margin-top: 2px; }
.gram-next-arrow { font-size: 1.2rem; }
/* 저작권 — 챕터 마지막 (모든 챕터 자동) */
.gram-copyright {
  margin-top: 28px; padding: 14px 18px;
  border-top: 1px solid var(--gray-100);
  font-size: .7rem; color: var(--gray-400);
  text-align: center; line-height: 1.55; font-weight: 500;
  letter-spacing: .01em;
}

.gram-loading { padding: 60px 20px; text-align: center; color: var(--gray-400); font-size: .88rem; }
.gram-error { padding: 20px; background: #FEF2F2; color: #991B1B; border-radius: 10px; margin: 14px 0; font-size: .88rem; }

/* 자기선언("I am ___") 실제 입력필드 (2026-08-30) */
.bys-im-fillins { margin: 10px 0; }
.bys-im-row { display: flex; align-items: baseline; gap: 8px; margin: 10px 0; }
.bys-im-prefix { font-weight: 700; white-space: nowrap; }
.bys-im-input { flex: 1; min-width: 0; border: none; border-bottom: 1px solid #C9C4B4; background: transparent; font: inherit; padding: 2px 4px; outline: none; }
.bys-im-input:focus { border-bottom-color: #69ADA7; }

/* ST 본문 속 별도 질문("Q.") — 직접 답 적기/마이크 입력 (2026-08-30) */
.bys-s-qa { padding: 12px 14px; background: #FBF8F1; border: 1px solid #EAE0C8; border-radius: 10px; }
.bys-s-qa-q { font-size: .88rem; font-weight: 700; line-height: 1.5; color: #5C4A1F; }
.bys-s-qa-lbl { display: inline-block; margin-right: 6px; font-weight: 800; color: #B8860B; }
.bys-s-qa-ko { margin-top: 3px; font-size: .8rem; color: #8A7A56; }
.bys-s-qa-input-wrap { display: flex; align-items: flex-start; gap: 8px; margin-top: 8px; }
.bys-s-qa-input { flex: 1; min-width: 0; min-height: 44px; resize: vertical; border: 1px solid #E2D8BE; border-radius: 8px; background: #fff; font: inherit; font-size: .85rem; padding: 8px 10px; outline: none; }
.bys-s-qa-input:focus { border-color: #B8860B; }
.bys-s-qa-mic { flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; border: 1px solid #E2D8BE; background: #fff; color: #B8860B; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.bys-s-qa-mic.recording { background: #FBECEC; border-color: #E3A0A0; color: #C0392B; animation: bysQaPulse 1.1s ease-in-out infinite; }
.bys-s-qa-mic.busy { opacity: .55; pointer-events: none; }
@keyframes bysQaPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(192,57,43,.35); } 50% { box-shadow: 0 0 0 6px rgba(192,57,43,0); } }
