/* css/luyen-viet.css — Luyện Viết Tiếng Trung */
/* Dark theme đồng bộ dashboard */

:root {
  /* C11 2026-05-20 — đồng bộ màu nền với chuẩn dashboard (#0f0f18) */
  --lv-bg:          #0f0f18;
  --lv-surface:     #131319;
  --lv-surface-2:   #1a1a24;
  --lv-border:      rgba(255, 255, 255, 0.08);
  --lv-border-hi:   rgba(200, 169, 110, 0.28);
  --lv-text:        #e0e0e0;
  --lv-muted:       rgba(255, 255, 255, 0.38);
  --lv-gold:        #c8a96e;
  --lv-gold-bright: #ffd700;
  --lv-green:       #388e3c;
  --lv-green-dark:  #1b5e20;
  --lv-amber:       #f9a825;
  --lv-amber-dark:  #e65100;
  --lv-blue:        #42a5f5;
  --lv-red:         #ef5350;
  --lv-glow-gold:   0 0 18px rgba(200,169,110,0.22);
  --lv-glow-green:  0 0 16px rgba(56,142,60,0.3);
  --lv-shadow-3d:   0 4px 0 rgba(0,0,0,0.45), 0 6px 16px rgba(0,0,0,0.3);
  /* [Sprint 4] Font size adjuster — controlled via JS */
  --lv-fs:          16px;
}

* { box-sizing: border-box; }

/* C1 2026-05-20: ngăn horizontal scroll trên iframe page */
html { overflow-x: hidden; }

body {
  background: var(--lv-bg);
  color: var(--lv-text);
  font-family: 'Inter', 'Segoe UI', sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

.lv-muted { color: var(--lv-muted); }

/* ── Resume modal overlay ─────────────────────────────── */
.lv-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 20px;
}

.lv-overlay-box {
  background: var(--lv-surface);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 14px;
  padding: 32px 28px 24px;
  max-width: 380px;
  width: 100%;
  text-align: center;
}

.lv-overlay-icon { font-size: 2.4rem; margin-bottom: 10px; }

.lv-overlay-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #f0e6cc;
  margin: 0 0 12px;
}

.lv-overlay-desc {
  font-size: 0.92rem;
  color: var(--lv-muted);
  margin: 0 0 22px;
  line-height: 1.6;
}

.lv-overlay-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* ── Screens ──────────────────────────────────────────── */
.lv-screen {
  min-height: 100vh;
  padding: 0 0 60px;
}

/* ── Screen 1: Setup ──────────────────────────────────── */
.lv-setup-wrap {
  max-width: 600px;
  margin: 0 auto;
  padding: 32px 28px 40px;
}

.lv-setup-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.lv-main-title {
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, #f0e6cc 0%, var(--lv-gold-bright) 60%, var(--lv-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  line-height: 1.2;
}

.lv-subtitle {
  font-size: 0.92rem;
  color: var(--lv-muted);
  margin: 0 0 24px;
  line-height: 1.5;
}

.lv-loading {
  text-align: center;
  padding: 40px 20px;
  color: var(--lv-muted);
  font-size: 0.95rem;
}

.lv-loading i { margin-right: 8px; }

/* Tabs */
.lv-tabs {
  display: flex;
  gap: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--lv-border);
  border-radius: 12px;
  padding: 5px;
  margin-bottom: 24px;
}

.lv-tab-btn {
  flex: 1;
  background: none;
  border: none;
  border-radius: 8px;
  color: var(--lv-muted);
  padding: 9px 10px;
  font-size: 0.87rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}

.lv-tab-btn + .lv-tab-btn { border-left: none; }

.lv-tab-btn.active {
  background: linear-gradient(135deg, rgba(200,169,110,0.22) 0%, rgba(200,169,110,0.10) 100%);
  color: var(--lv-gold-bright);
  box-shadow: 0 2px 8px rgba(200,169,110,0.18), inset 0 1px 0 rgba(200,169,110,0.15);
}

.lv-tab-btn:not(.active):hover {
  background: rgba(255,255,255,0.06);
  color: var(--lv-text);
}

/* Form */
.lv-form-group { margin-bottom: 18px; }

.lv-label {
  display: block;
  font-size: 0.85rem;
  color: var(--lv-muted);
  margin-bottom: 7px;
  font-weight: 500;
}

.lv-select {
  width: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid rgba(255,255,255,0.10);
  border-bottom: 2px solid rgba(200,169,110,0.28);
  color: var(--lv-text);
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 0.93rem;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.18s, box-shadow 0.18s;
  font-family: inherit;
}

.lv-select:focus {
  outline: none;
  border-color: rgba(200,169,110,0.45);
  border-bottom-color: var(--lv-gold-bright);
  box-shadow: 0 4px 16px rgba(200,169,110,0.12);
}
.lv-select option {
  background: #1a1a32;
  color: #e0e0e0;
}
.lv-select optgroup {
  background: #13132a;
  color: rgba(200,169,110,0.7);
  font-weight: 700;
}

.lv-note {
  font-size: 0.82rem;
  color: var(--lv-muted);
  line-height: 1.5;
  margin: 0 0 14px;
}

.lv-note-sm {
  margin-top: 18px;
  font-size: 0.78rem;
}

.lv-note code {
  font-family: 'Consolas', monospace;
  background: rgba(255, 255, 255, 0.07);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.75rem;
}

.lv-btn-full { width: 100%; justify-content: center; margin-top: 8px; }

/* ── Screen 2: Practice ───────────────────────────────── */

/* Progress bar */
.lv-progress-track {
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  position: sticky;
  top: 0;
  z-index: 10;
}

.lv-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #43a047, #a5d6a7);
  transition: width 0.4s ease;
  box-shadow: 0 0 8px rgba(67,160,71,0.5);
}

/* Practice header */
.lv-practice-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--lv-border);
}

/* ── VietVan AI Coach ─────────────────────────────────── */
/* [v13.80] Đã gỡ widget coach riêng (.lv-vv-ai-coach/.lv-vv-ai-gif/.lv-vv-bubble + keyframes).
   Gợi ý coach giờ route qua AI Buddy phổ quát (_ydhAiBuddy) — chỉ 1 trợ lý AI duy nhất toàn site
   (memory feedback_ai_buddy_notifications). Light-mode override của .lv-vv-bubble cũng đã xóa. */

.lv-btn-back {
  background: none;
  border: 1px solid var(--lv-border);
  color: var(--lv-text);
  padding: 7px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s;
  font-family: inherit;
  flex-shrink: 0;
}

.lv-btn-back:hover { background: rgba(255, 255, 255, 0.07); }

.lv-progress-info {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.lv-counter {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--lv-gold);
}

.lv-timer {
  font-size: 0.85rem;
  color: var(--lv-muted);
  font-variant-numeric: tabular-nums;
}

/* 2-column layout */
.lv-practice-body {
  display: flex;
  gap: 18px;
  padding: 20px 16px 40px;
  align-items: flex-start;
}

.lv-col-left  { flex: 0 0 60%; }
.lv-col-right { flex: 1; }

/* Question box */
.lv-question-box {
  background: linear-gradient(160deg, #1c1b34 0%, #13122a 100%);
  border: 1px solid rgba(200,169,110,0.14);
  border-left: 3px solid rgba(200,169,110,0.6);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: 0 2px 14px rgba(0,0,0,0.32), inset 0 1px 0 rgba(255,255,255,0.04);
  position: relative;
  overflow: hidden;
}
.lv-question-box::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(200,169,110,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.lv-speaker-label {
  font-size: 0.78rem;
  color: var(--lv-muted);
  margin-bottom: 8px;
  font-style: italic;
}

.lv-question-label {
  font-size: 0.75rem;
  color: var(--lv-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.lv-question-text {
  font-size: var(--lv-fs, 16px);
  color: #f0e6cc;
  font-weight: 500;
  line-height: 1.65;
}

/* Textarea — [v13.62] font-size +6px so với --lv-fs + weight 600 cho dễ nhìn khi gõ */
.lv-textarea {
  width: 100%;
  background: linear-gradient(160deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid rgba(255,255,255,0.10);
  border-bottom: 2px solid rgba(100,181,246,0.2);
  color: var(--lv-text);
  padding: 13px 15px;
  border-radius: 12px;
  font-size: calc(var(--lv-fs, 16px) + 6px);
  font-weight: 600;
  font-family: 'Noto Serif SC', 'Source Han Serif', 'SimSun', serif;
  resize: vertical;
  min-height: 120px;
  display: block;
  transition: border-color 0.15s, box-shadow 0.15s;
  margin-bottom: 12px;
  line-height: 1.55;
}

.lv-textarea:focus {
  outline: none;
  border-color: rgba(66, 165, 245, 0.45);
  border-bottom-color: var(--lv-blue);
  box-shadow: 0 0 0 3px rgba(66,165,245,0.09), 0 4px 16px rgba(0,0,0,0.25);
}

.lv-textarea::placeholder { color: var(--lv-muted); }

/* Setup textarea override */
.lv-textarea-setup {
  font-family: inherit;
  font-size: 0.92rem;
  min-height: 120px;
  margin-bottom: 0;
}

/* Hint panel */
.lv-hint-panel {
  background: linear-gradient(135deg, rgba(200,169,110,0.10) 0%, rgba(200,169,110,0.04) 100%);
  border: 1px solid rgba(200,169,110,0.24);
  border-left: 3px solid var(--lv-gold);
  border-radius: 10px;
  padding: 13px 14px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.lv-hint-py {
  font-size: 1rem;
  color: var(--lv-gold);
  font-family: 'Noto Serif SC', serif;
  margin-bottom: 6px;
}

.lv-hint-text {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.5;
}

/* Action row */
.lv-action-row {
  display: flex;
  gap: 8px;
}

.lv-ai-result {
  background: linear-gradient(160deg, #1c1b34 0%, #13122a 100%);
  border: 1px solid rgba(100,181,246,0.14);
  border-top: 2px solid rgba(100,181,246,0.3);
  border-radius: 14px;
  padding: 18px;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

.lv-ai-placeholder {
  text-align: center;
  color: var(--lv-muted);
}

.lv-ai-placeholder i {
  font-size: 1.6rem;
  margin-bottom: 10px;
  display: block;
  opacity: 0.35;
}

.lv-ai-placeholder p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
}

/* Tips sidebar */
.lv-tips-sep {
  height: 1px;
  background: var(--lv-border);
  margin: 18px 0 14px;
}

.lv-tips-header {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--lv-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.lv-tip-content {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.6;
  min-height: 60px;
  transition: opacity 0.3s;
}

/* ── Screen 3: Result ─────────────────────────────────── */
.lv-result-wrap {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 20px 48px;
}

.lv-result-main { flex: 1; min-width: 0; }
.lv-result-sidebar { flex: 0 0 280px; }

.lv-result-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.lv-result-icon { font-size: 2.2rem; }

.lv-result-title {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #f0e6cc, var(--lv-gold-bright));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
}

.lv-result-stats-grid {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

/* [v13.69] Stats card compact — giảm padding + font-size sau khi xóa card "Chế độ" */
.lv-stat-card {
  background:
    radial-gradient(ellipse at 20% 15%, rgba(200,169,110,0.18) 0%, transparent 55%),
    linear-gradient(160deg, #1e1a36 0%, #12102a 100%);
  border: 1px solid rgba(200,169,110,0.16);
  border-radius: 12px;
  padding: 10px 12px 8px;
  flex: 1;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 0 rgba(0,0,0,0.35), 0 4px 12px rgba(0,0,0,0.25);
}
.lv-stat-card::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 12px 12px;
  pointer-events: none;
}

.lv-stat-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--lv-gold-bright);
  line-height: 1;
  margin-bottom: 3px;
  text-shadow: 0 0 10px rgba(255,215,0,0.3);
  position: relative;
}

.lv-stat-lbl {
  font-size: 0.66rem;
  color: var(--lv-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: relative;
}

.lv-pending-grade {
  background: rgba(255, 193, 7, 0.07);
  border: 1px solid rgba(255, 193, 7, 0.2);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 26px;
}

.lv-pending-grade i { margin-right: 6px; color: var(--lv-amber); }

.lv-result-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* ── Screen 4: History ────────────────────────────────── */
.lv-history-wrap {
  max-width: 620px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

.lv-history-topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--lv-border);
}

.lv-history-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #f0e6cc;
  margin: 0;
}

.lv-history-list { display: flex; flex-direction: column; gap: 10px; }

.lv-hist-item {
  background: var(--lv-surface);
  border: 1px solid var(--lv-border);
  border-radius: 10px;
  padding: 14px 16px;
  transition: border-color 0.15s;
}

.lv-hist-item:hover { border-color: rgba(255, 215, 0, 0.2); }
.lv-hist-item-draft { border-color: rgba(249,168,37,0.35); background: rgba(249,168,37,0.05); }

.lv-hist-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 7px;
}

.lv-hist-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #f0e6cc;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lv-hist-meta {
  font-size: 0.82rem;
  color: var(--lv-muted);
}

/* Badges */
.lv-level-badge {
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(66, 165, 245, 0.15);
  color: var(--lv-blue);
  border: 1px solid rgba(66, 165, 245, 0.3);
  padding: 2px 7px;
  border-radius: 4px;
  flex-shrink: 0;
}

.lv-status-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  flex-shrink: 0;
}

.lv-status-badge.pending {
  background: rgba(255, 193, 7, 0.1);
  color: var(--lv-amber);
  border: 1px solid rgba(255, 193, 7, 0.25);
}

.lv-status-badge.graded {
  background: rgba(76, 175, 80, 0.1);
  color: var(--lv-green);
  border: 1px solid rgba(76, 175, 80, 0.25);
}

.lv-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--lv-muted);
  font-size: 0.95rem;
}

/* ── Buttons ──────────────────────────────────────────── */
.lv-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: inherit;
  transition: filter 0.15s, transform 0.1s, box-shadow 0.1s;
  text-align: center;
  white-space: nowrap;
  position: relative;
}

.lv-btn:active { transform: translateY(3px) !important; }

.lv-btn-primary {
  background: linear-gradient(135deg, #43a047 0%, var(--lv-green-dark) 100%);
  color: #fff;
  box-shadow: 0 4px 0 #0d3a10, 0 6px 18px rgba(0,0,0,0.35);
}
.lv-btn-primary:hover { filter: brightness(1.1); }
.lv-btn-primary:active { box-shadow: 0 1px 0 #0d3a10; }

.lv-btn-secondary {
  background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.04) 100%);
  color: var(--lv-text);
  border: 1px solid var(--lv-border);
  box-shadow: 0 3px 0 rgba(0,0,0,0.35), 0 4px 10px rgba(0,0,0,0.2);
}
.lv-btn-secondary:hover { background: rgba(255,255,255,0.1); }
.lv-btn-secondary:active { box-shadow: 0 1px 0 rgba(0,0,0,0.35); }

.lv-btn-ghost {
  background: none;
  color: var(--lv-muted);
  border: 1px solid var(--lv-border);
  font-size: 0.83rem;
  padding: 7px 14px;
  font-weight: 600;
  box-shadow: 0 2px 0 rgba(0,0,0,0.25);
}
.lv-btn-ghost:hover { color: var(--lv-text); background: rgba(255,255,255,0.06); }
.lv-btn-ghost:active { box-shadow: none; }

.lv-btn-hint {
  background: linear-gradient(135deg, #f9a825, #e65100);
  color: #0d0d20;
  box-shadow: 0 4px 0 #8d3300, 0 6px 14px rgba(0,0,0,0.3);
}
.lv-btn-hint:hover { filter: brightness(1.08); }
.lv-btn-hint:active { box-shadow: 0 1px 0 #8d3300; }

.lv-btn-reset {
  background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.04) 100%);
  color: var(--lv-muted);
  border: 1px solid var(--lv-border);
  box-shadow: 0 4px 0 rgba(0,0,0,0.35), 0 4px 12px rgba(0,0,0,0.2);
}
.lv-btn-reset:hover { color: var(--lv-text); background: rgba(255,255,255,0.1); }
.lv-btn-reset:active { box-shadow: 0 1px 0 rgba(0,0,0,0.35); }

.lv-btn-check {
  background: linear-gradient(135deg, #43a047 0%, var(--lv-green-dark) 100%);
  color: #fff;
  flex: 1;
  justify-content: center;
  box-shadow: 0 4px 0 #0d3a10, 0 6px 16px rgba(0,0,0,0.32);
}
.lv-btn-check:hover { filter: brightness(1.1); }
.lv-btn-check:active { box-shadow: 0 1px 0 #0d3a10; }

/* ── Sprint 2 Patch: Question box header + view toggle ── */
.lv-qbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.lv-qbox-header .lv-speaker-label { margin-bottom: 0; }

/* Nhóm nút góc phải: autoSpeak + view toggle */
.lv-qbox-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* ── Font-size adjuster buttons (A− / A+) ─────────────── */
.lv-fs-group {
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--lv-border);
  border-radius: 6px;
  padding: 1px 3px;
}
.lv-fs-btn {
  background: none;
  border: none;
  color: var(--lv-muted);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 2px 5px;
  cursor: pointer;
  border-radius: 4px;
  line-height: 1;
  transition: color 0.15s, background 0.15s;
  font-family: inherit;
}
.lv-fs-btn:hover { color: var(--lv-gold); background: rgba(255,215,0,0.08); }
.lv-fs-btn:disabled { opacity: 0.3; cursor: default; }
.lv-fs-cur {
  font-size: 0.68rem;
  color: var(--lv-muted);
  min-width: 22px;
  text-align: center;
  user-select: none;
}

.lv-view-toggle {
  background: none;
  border: 1px solid var(--lv-border);
  color: var(--lv-muted);
  border-radius: 5px;
  padding: 3px 7px;
  font-size: 0.85rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s;
  font-family: inherit;
}

.lv-view-toggle:hover {
  color: var(--lv-gold);
  border-color: rgba(255, 215, 0, 0.3);
}

/* ── Wide mode: sentence list ─────────────────────────── */
.lv-sentence-list {
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.12) transparent;
}

.lv-sentence-list::-webkit-scrollbar { width: 4px; }
.lv-sentence-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

.lv-sl-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: calc(var(--lv-fs, 16px) * 0.88);
  line-height: 1.5;
  background: rgba(255,255,255,0.03);
  cursor: default;
}

.lv-sl-check {
  flex-shrink: 0;
  width: 16px;
  margin-top: 2px;
  font-size: 0.75rem;
  color: var(--lv-muted);
}

.lv-sl-done {
  opacity: 0.45;
}

.lv-sl-done .lv-sl-check { color: var(--lv-green); }

.lv-sl-current {
  border-left: 3px solid var(--lv-gold);
  padding-left: 7px;
  background: rgba(255, 215, 0, 0.06);
  color: #f0e6cc;
}

.lv-sl-upcoming { opacity: 0.65; }

/* Avatar và speaker name trong wide mode */
.lv-sl-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  margin-top: 1px;
}

.lv-sl-speaker-name {
  font-size: 0.75rem;
  color: var(--lv-muted);
  flex-shrink: 0;
  white-space: nowrap;
  font-weight: 600;
}

.lv-sl-dash {
  flex-shrink: 0;
  width: 16px;
  color: var(--lv-border);
  text-align: center;
  font-size: 0.8rem;
}

/* Divider giữa nhóm hội thoại và bài tập */
.lv-sl-divider {
  font-size: 0.72rem;
  color: var(--lv-muted);
  text-align: center;
  padding: 6px 0 2px;
  opacity: 0.6;
  user-select: none;
}

/* Narrow mode: avatar bên trái câu hỏi */
.lv-narrow-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.lv-narrow-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(212,165,116,0.3);
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

/* ── Textarea wrap + mic button ───────────────────────── */
.lv-textarea-wrap {
  position: relative;
  margin-bottom: 6px;
}

.lv-textarea-wrap .lv-textarea {
  margin-bottom: 0;
  padding-right: 44px;
}

.lv-mic-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--lv-border);
  color: var(--lv-muted);
  border-radius: 6px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.15s, color 0.15s;
}

.lv-mic-btn:hover { background: rgba(255,255,255,0.12); color: var(--lv-text); }

.lv-mic-recording {
  background: var(--lv-red) !important;
  border-color: var(--lv-red) !important;
  color: #fff !important;
  animation: lv-pulse 1s ease-in-out infinite;
}

@keyframes lv-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 83, 80, 0.45); }
  50%       { box-shadow: 0 0 0 6px rgba(239, 83, 80, 0); }
}

/* ── Char counter ─────────────────────────────────────── */
.lv-char-count {
  position: absolute;
  bottom: 8px;
  left: 12px;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.22);
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}

/* ── Input hint ───────────────────────────────────────── */
.lv-input-hint {
  font-size: 0.75rem;
  color: var(--lv-muted);
  margin: 4px 0 10px;
  line-height: 1.4;
}
.lv-input-hint kbd {
  display: inline-block;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 4px;
  padding: 0 5px;
  font-size: 0.72rem;
  font-family: 'Inter', monospace;
  color: rgba(255,255,255,0.55);
  margin: 0 1px;
}

/* ── Practice header: topic label + icon btn ──────────── */
.lv-topic-label {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lv-btn-icon {
  background: none;
  border: 1px solid var(--lv-border);
  color: var(--lv-muted);
  border-radius: 6px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
}

.lv-btn-icon:hover { background: rgba(255,255,255,0.07); color: var(--lv-text); }

/* ── Setup screen: footer + feedback button ───────────── */
.lv-setup-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--lv-border);
  display: flex;
  justify-content: center;
}

.lv-feedback-btn {
  background: none;
  border: 1px solid var(--lv-border);
  color: var(--lv-muted);
  border-radius: 7px;
  padding: 7px 16px;
  font-size: 0.83rem;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.lv-feedback-btn:hover {
  background: rgba(255,255,255,0.05);
  color: var(--lv-text);
  border-color: rgba(255,255,255,0.18);
}

/* ── Feedback modal: close button ─────────────────────── */
.lv-overlay-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: var(--lv-muted);
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: color 0.15s;
}

.lv-overlay-close:hover { color: var(--lv-text); }

.lv-overlay-box { position: relative; }

/* ── Mobile ≤768px: stack 1 cột ──────────────────────── */
@media (max-width: 768px) {
  .lv-practice-body {
    flex-direction: column;
    padding: 16px 12px 40px;
  }

  .lv-col-left,
  .lv-col-right { flex: none; width: 100%; }

  .lv-main-title { font-size: 1.3rem; }

  .lv-setup-wrap { padding: 20px 16px 32px; }

  .lv-result-wrap {
    flex-direction: column;
    padding: 20px 14px 40px;
  }
  .lv-result-sidebar { flex: none; width: 100%; }

  .lv-result-stats-grid { gap: 8px; }

  .lv-stat-val { font-size: 1.5rem; }

  .lv-action-row { flex-wrap: wrap; }
  .lv-btn-check { flex: 1 0 100%; }

  .lv-result-actions { flex-direction: column; }
  .lv-result-actions .lv-btn { width: 100%; justify-content: center; }
}

/* === TẦNG 1 FEEDBACK === */
.lv-tier1-result {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 16px; border-radius: 10px;
  animation: lv-fadein 0.3s ease;
}
@keyframes lv-fadein {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.lv-tier1-result.perfect {
  background: linear-gradient(135deg, rgba(56,142,60,0.22) 0%, rgba(27,94,32,0.12) 100%);
  border: 1px solid rgba(76,175,80,0.38);
  box-shadow: 0 2px 14px rgba(56,142,60,0.2);
}
.lv-tier1-result.good {
  background: linear-gradient(135deg, rgba(249,168,37,0.18) 0%, rgba(230,81,0,0.08) 100%);
  border: 1px solid rgba(255,193,7,0.32);
  box-shadow: 0 2px 14px rgba(249,168,37,0.15);
}
.lv-tier1-icon { font-size: 24px; flex-shrink: 0; }
.lv-tier1-label {
  font-weight: 600; font-size: 14px;
  color: #e0e0e0; margin-bottom: 6px;
}
.lv-tier1-answer { margin-bottom: 4px; }
.lv-tier1-zh {
  font-size: 20px; color: #ffd700;
  font-weight: 600; margin-right: 8px;
}
.lv-tier1-py {
  font-size: 13px; color: rgba(255,255,255,0.5);
}
.lv-tier1-note {
  font-size: 12px; color: rgba(255,255,255,0.35);
  margin-top: 8px;
}

/* === CONTRIBUTE BUTTON === */
.lv-contribute-btn {
  width: 100%; padding: 8px 12px; margin-top: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px dashed rgba(255,255,255,0.2);
  border-radius: 8px; color: rgba(255,255,255,0.5);
  font-size: 13px; cursor: pointer; transition: all 0.2s;
}
.lv-contribute-btn:hover {
  background: rgba(255,215,0,0.08);
  border-color: rgba(255,215,0,0.3);
  color: #ffd700;
}

/* === MODAL === */
.lv-modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.7);
  display: flex; align-items: center;
  justify-content: center;
  animation: lv-fadein 0.2s ease;
}
.lv-modal-box {
  background: #1a1a2e; border-radius: 12px;
  width: 90%; max-width: 480px;
  border: 1px solid rgba(255,215,0,0.15);
}
.lv-modal-header {
  display: flex; justify-content: space-between;
  align-items: center; padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-weight: 600; color: #ffd700;
}
.lv-modal-header button {
  background: none; border: none;
  color: rgba(255,255,255,0.4);
  font-size: 18px; cursor: pointer;
}
.lv-modal-body { padding: 16px 20px; }
.lv-modal-sentence {
  font-size: 13px; color: rgba(255,255,255,0.5);
  margin-bottom: 12px; padding: 8px;
  background: rgba(255,255,255,0.04);
  border-radius: 6px;
}
.lv-modal-body label {
  display: block; font-size: 12px;
  color: rgba(255,255,255,0.4);
  margin: 10px 0 4px;
}
.lv-modal-input, .lv-modal-textarea {
  width: 100%; background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px; padding: 8px 12px;
  color: #e0e0e0; font-size: 14px;
  box-sizing: border-box;
}
.lv-modal-input:focus, .lv-modal-textarea:focus {
  outline: none;
  border-color: rgba(255,215,0,0.4);
}
.lv-modal-note {
  font-size: 11px; color: rgba(255,255,255,0.3);
  margin-top: 10px; line-height: 1.5;
}
.lv-modal-footer {
  display: flex; gap: 8px; justify-content: flex-end;
  padding: 12px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.lv-btn-cancel {
  padding: 8px 16px; border-radius: 6px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.5); cursor: pointer;
}
.lv-btn-submit {
  padding: 8px 16px; border-radius: 6px;
  background: #ffd700; border: none;
  color: #0d0d20; font-weight: 600; cursor: pointer;
}
.lv-btn-submit:hover { background: #ffed4a; }
.lv-btn-submit:disabled { opacity: 0.4; cursor: not-allowed; }

/* === RESULT LIST SCREEN 3 === */
.lv-result-list {
  display: flex; flex-direction: column;
  gap: 10px; margin: 16px 0;
}

/* [v13.75] Header row bên NGOÀI list — title + help icon, không dính chùm vào card */
.lv-result-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 4px 10px;
  margin-bottom: 4px;
}
.lv-result-list-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--lv-gold-bright);
  letter-spacing: 0.3px;
}
.lv-result-help-btn {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  color: rgba(255,255,255,0.55);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.18s;
}
.lv-result-help-btn:hover {
  background: rgba(255,215,0,0.14);
  color: var(--lv-gold-bright);
  border-color: rgba(255,215,0,0.35);
  transform: scale(1.06);
}

/* [v13.72] Mini modal popup giải thích 4 màu */
.lv-legend-modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 100000;
  background: linear-gradient(160deg, #1e1a36 0%, #12102a 100%);
  border: 1px solid rgba(200,169,110,0.3);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.55);
  min-width: 280px; max-width: 360px;
  animation: lvLegendModalIn 0.22s ease-out;
}
@keyframes lvLegendModalIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.92); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.lv-legend-modal-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(200,169,110,0.16);
}
.lv-legend-modal-title {
  font-weight: 700; color: var(--lv-gold-bright); font-size: 14px;
}
.lv-legend-modal-close {
  background: rgba(255,255,255,0.08);
  border: none; color: rgba(255,255,255,0.6);
  width: 22px; height: 22px; border-radius: 50%;
  cursor: pointer; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
}
.lv-legend-modal-close:hover { background: rgba(244,67,54,0.2); color: #ef5350; }
.lv-legend-modal-list {
  display: flex; flex-direction: column; gap: 10px;
}
.lv-legend-row {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 12.5px; color: rgba(255,255,255,0.85);
}
.lv-legend-row b { color: #fff; }
.lv-legend-dot {
  width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0;
  margin-top: 3px;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.2) inset;
}
.lv-legend-dot.match    { background: linear-gradient(135deg, #4CAF50, #66bb6a); }
.lv-legend-dot.ai-ok    { background: linear-gradient(135deg, #42a5f5, #2196F3); }
.lv-legend-dot.medium   { background: linear-gradient(135deg, #FFC107, #FFB300); }
.lv-legend-dot.no-match { background: linear-gradient(135deg, #ef5350, #e53935); }
.lv-legend-desc {
  color: rgba(255,255,255,0.55); font-size: 11.5px; line-height: 1.45;
}

/* [v13.72] Suggest chips — vocab nâng cao + grammar tip dưới feedback */
.lv-result-vocab-suggest,
.lv-result-grammar-tip {
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.04);
  border-left: 3px solid rgba(200,169,110,0.35);
  border-radius: 6px;
  font-size: 13px;
  color: rgba(255,255,255,0.78);
  line-height: 1.55;
}
.lv-result-vocab-suggest { border-left-color: rgba(66,165,245,0.5); }
.lv-result-grammar-tip   { border-left-color: rgba(255,193,7,0.55); }
.lv-suggest-icon { margin-right: 4px; }
.lv-suggest-label {
  font-weight: 700; color: var(--lv-gold-bright); margin-right: 4px;
}
.lv-suggest-chip {
  display: inline-block;
  background: rgba(66,165,245,0.14);
  border: 1px solid rgba(66,165,245,0.35);
  color: #90caf9;
  padding: 2px 9px;
  border-radius: 999px;
  margin: 2px 4px 2px 0;
  font-weight: 600;
  font-size: 13px;
  font-family: 'Noto Serif SC', 'Source Han Serif', 'SimSun', serif;
}
.lv-suggest-chip em {
  font-style: normal;
  font-weight: 400;
  color: rgba(255,255,255,0.62);
  font-family: inherit;
  font-size: 11.5px;
  margin-left: 3px;
}

/* Legacy .lv-result-legend giữ ẩn để backward-compat */
.lv-result-legend { display: none; }
.lv-result-legend .lv-legend-label {
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  margin-right: 6px;
}
.lv-result-legend .lv-legend-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.lv-result-legend .lv-legend-chip.match    { background: rgba(76,175,80,0.16); color: #66bb6a; border: 1px solid rgba(76,175,80,0.35); }
.lv-result-legend .lv-legend-chip.ai-ok    { background: rgba(33,150,243,0.16); color: #42a5f5; border: 1px solid rgba(33,150,243,0.35); }
.lv-result-legend .lv-legend-chip.medium   { background: rgba(255,193,7,0.18);  color: #ffca28; border: 1px solid rgba(255,193,7,0.40); }
.lv-result-legend .lv-legend-chip.no-match { background: rgba(244,67,54,0.16);  color: #ef5350; border: 1px solid rgba(244,67,54,0.35); }

/* [v13.64] Result item — đổ màu BG nhẹ per tier */
.lv-result-item {
  padding: 14px 16px; border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border-left: 4px solid transparent;
  transition: background 0.25s, border-color 0.25s;
}
.lv-result-item.tier1-match {
  background: linear-gradient(135deg, rgba(76,175,80,0.10), rgba(76,175,80,0.04));
  border-left-color: #4CAF50;
}
.lv-result-item.ai-correct {
  background: linear-gradient(135deg, rgba(33,150,243,0.10), rgba(33,150,243,0.04));
  border-left-color: #42a5f5;
}
.lv-result-item.tier1-medium {
  background: linear-gradient(135deg, rgba(255,193,7,0.12), rgba(255,193,7,0.04));
  border-left-color: #FFC107;
  animation: lv-pulse-medium 2.4s ease-in-out infinite;
}
.lv-result-item.no-match,
.lv-result-item.ai-incorrect {
  background: linear-gradient(135deg, rgba(244,67,54,0.10), rgba(244,67,54,0.04));
  border-left-color: #ef5350;
}
@keyframes lv-pulse-medium {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,193,7,0.0); }
  50%      { box-shadow: 0 0 0 5px rgba(255,193,7,0.10); }
}

.lv-result-item-vi {
  font-size: 14px; color: rgba(255,255,255,0.65); margin-bottom: 4px;
  font-weight: 500;
}
.lv-result-item-user {
  font-size: 17px; color: #f5f5f5;
  font-weight: 600;
  font-family: 'Noto Serif SC', 'Source Han Serif', 'SimSun', serif;
}
.lv-result-item-correct {
  font-size: 14px; color: #ffd700; margin-top: 6px;
  font-family: 'Noto Serif SC', 'Source Han Serif', 'SimSun', serif;
}
.lv-result-item-score {
  font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 4px;
  font-weight: 500;
}

/* [T3] Header row: tên câu + score badge */
.lv-result-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  gap: 10px;
}
.lv-result-item-header .lv-result-item-vi { margin-bottom: 0; flex: 1; }

/* [v13.64] Score badge — bigger, gradient, drop shadow */
.lv-pts-badge {
  font-size: 13px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.4px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.lv-pts-badge.pts-pos {
  background: linear-gradient(135deg, #4CAF50, #66bb6a);
  color: #fff;
  border: 1px solid rgba(76,175,80,0.6);
  text-shadow: 0 1px 1px rgba(0,0,0,0.18);
}
.lv-pts-badge.pts-neg {
  background: linear-gradient(135deg, #ef5350, #f06292);
  color: #fff;
  border: 1px solid rgba(244,67,54,0.55);
  text-shadow: 0 1px 1px rgba(0,0,0,0.18);
}

/* === MODE SELECTOR (LOẠI CÂU) === */
.lv-mode-selector {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px;
}
.lv-mode-btn {
  flex: 1; min-width: 90px;
  padding: 8px 10px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.04);
  color: var(--lv-muted); font-size: 13px;
  cursor: pointer; transition: all 0.2s;
}
.lv-mode-btn:hover { border-color: rgba(255,215,0,0.4); color: var(--lv-text); }
.lv-mode-btn.active {
  border-color: var(--lv-gold);
  background: rgba(255,215,0,0.1);
  color: var(--lv-gold); font-weight: 600;
}
.lv-mode-desc {
  font-size: 12px; color: var(--lv-muted);
  margin: 6px 0 0; min-height: 16px;
}

/* === NÚT "CÂU TIẾP THEO" khi fail tier1 === */
.lv-next-btn {
  margin-top: 10px; padding: 6px 16px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px; color: #e0e0e0;
  font-size: 13px; cursor: pointer;
  transition: all 0.2s;
}
.lv-next-btn:hover {
  background: rgba(255,215,0,0.1);
  border-color: rgba(255,215,0,0.3);
  color: #ffd700;
}

/* === MODE BADGE trong header Screen 2 === */
.lv-mode-badge {
  font-size: 11px; padding: 2px 8px;
  background: rgba(255,215,0,0.1);
  border-radius: 10px; color: rgba(255,215,0,0.7);
  margin-left: 8px;
}

/* === HISTORY REVIEW BUTTON === */
.lv-hist-review-btn {
  padding: 4px 12px; font-size: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px; color: rgba(255,255,255,0.5);
  cursor: pointer; margin-left: auto;
}
.lv-hist-review-btn:hover {
  border-color: rgba(255,215,0,0.3);
  color: #ffd700;
}

/* [BUG4] Nút xóa từng lịch sử */
.lv-hist-del-btn {
  padding: 4px 8px; font-size: 13px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: rgba(255,255,255,0.25);
  cursor: pointer; margin-left: 6px;
  transition: all 0.2s;
}
.lv-hist-del-btn:hover {
  border-color: rgba(244,67,54,0.4);
  color: #ef5350;
  background: rgba(244,67,54,0.08);
}

/* === SCREEN 3 REDESIGN (2 CỘT) ═══════════════════════ */
/* Override định nghĩa cũ ở L435 */
.lv-result-wrap {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 40px;
  text-align: left;
}
@media (max-width: 768px) {
  .lv-result-wrap {
    grid-template-columns: 1fr;
  }
}

.lv-result-main {
  display: flex; flex-direction: column; gap: 16px;
  min-width: 0;
}
.lv-result-header {
  display: flex; align-items: center; gap: 12px;
}
.lv-result-header .lv-result-icon {
  font-size: 2rem; margin: 0;
}
.lv-result-header .lv-result-title {
  margin: 0; font-size: 1.3rem; color: #f0e6cc;
}

.lv-result-sidebar {
  display: flex; flex-direction: column; gap: 16px;
  position: sticky; top: 20px;
  align-self: start;
}
.lv-result-summary {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; padding: 16px;
}
.lv-result-summary h3 {
  font-size: 14px; color: rgba(255,255,255,0.6);
  margin: 0 0 12px;
}
.lv-summary-stat {
  font-size: 14px; color: #e0e0e0;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.lv-summary-stat:last-child { border-bottom: none; }
.lv-summary-stat.pending { color: rgba(255,193,7,0.8); }

.lv-result-actions {
  display: flex; flex-direction: column; gap: 8px;
  justify-content: flex-start;
}
.lv-btn-restart, .lv-btn-new {
  width: 100%; padding: 11px;
  border-radius: 10px; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: filter 0.15s, transform 0.1s, box-shadow 0.1s;
  font-family: inherit;
}
.lv-btn-restart:active, .lv-btn-new:active { transform: translateY(3px); }
.lv-btn-restart {
  background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.04) 100%);
  border: 1px solid rgba(255,255,255,0.12);
  color: #e0e0e0;
  box-shadow: 0 4px 0 rgba(0,0,0,0.4), 0 4px 12px rgba(0,0,0,0.2);
}
.lv-btn-restart:hover { filter: brightness(1.15); }
.lv-btn-restart:active { box-shadow: 0 1px 0 rgba(0,0,0,0.4); }
.lv-btn-new {
  background: linear-gradient(135deg, rgba(200,169,110,0.25) 0%, rgba(200,169,110,0.12) 100%);
  border: 1px solid rgba(200,169,110,0.35);
  color: var(--lv-gold-bright);
  box-shadow: 0 4px 0 rgba(100,70,0,0.4), 0 4px 14px rgba(0,0,0,0.25);
}
.lv-btn-new:hover { filter: brightness(1.1); }
.lv-btn-new:active { box-shadow: 0 1px 0 rgba(100,70,0,0.4); }

.lv-result-ai-note {
  font-size: 12px; color: rgba(255,255,255,0.5);
  text-align: center; line-height: 1.8;
  padding: 12px;
  background: rgba(255,193,7,0.05);
  border-radius: 8px;
  border: 1px dashed rgba(255,193,7,0.2);
}

/* === [FEAT 1] TTS — Nút đọc câu tiếng Việt ═══════════════ */
/* Bọc questionText + nút 🔊 đọc 1 lần theo chiều ngang */
.lv-question-text-wrap {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

/* Nút TTS base style */
.lv-speak-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  color: var(--lv-muted);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
}

.lv-speak-btn:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,215,0,0.3);
  color: var(--lv-text);
}

/* Nút 🔁 đặt trong lv-qbox-header — style khớp lv-view-toggle */
.lv-speak-header {
  /* Dùng cùng kích thước với lv-view-toggle */
  width: auto;
  height: auto;
  padding: 3px 7px;
  font-size: 0.82rem;
  border-color: var(--lv-border);
}

/* Nút toggle autoSpeak khi đang bật */
.lv-speak-toggle.lv-speak-active {
  background: rgba(255,215,0,0.15);
  border-color: rgba(255,215,0,0.45);
  color: var(--lv-gold);
  animation: lv-speak-glow 2s ease-in-out infinite;
}

@keyframes lv-speak-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,215,0,0.3); }
  50%       { box-shadow: 0 0 0 4px rgba(255,215,0,0); }
}

/* === [BUG 1] Vùng vàng 60–84% và đỏ <60% ══════════════════ */
/* Vùng vàng "Có thể đúng" */
.lv-tier1-medium {
  background: rgba(255,193,7,0.08);
  border: 1px solid rgba(255,193,7,0.28);
}

/* Vùng đỏ "Chưa khớp" — dùng CSS class thay inline style */
.lv-tier1-fail {
  background: rgba(255,80,80,0.08);
  border: 1px solid rgba(255,80,80,0.25);
}

/* Mô tả ngắn trong vùng vàng */
.lv-medium-desc {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 8px;
  line-height: 1.5;
}

/* Hint local từ data field q.hint */
.lv-medium-hint {
  font-size: 12px;
  color: rgba(255,215,0,0.7);
  background: rgba(255,215,0,0.06);
  border: 1px solid rgba(255,215,0,0.15);
  border-radius: 6px;
  padding: 6px 10px;
  margin: 8px 0 4px;
  line-height: 1.5;
}

/* ── [Tầng 2] Community Answers Box ──────────────────────── */
.lv-ca-box {
  margin-top: 8px;
  padding: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  min-height: 48px;
}

.lv-ca-title {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  margin: 0 0 8px;
}

.lv-ca-item {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.lv-ca-item:last-child { border-bottom: none; }

.lv-ca-answer {
  font-size: 16px;
  color: #ffd700;
  font-weight: 600;
  margin-bottom: 4px;
  font-family: 'Noto Serif SC', 'Source Han Serif', serif;
}

.lv-ca-explain {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  line-height: 1.5;
}

.lv-ca-meta {
  font-size: 11px;
  color: rgba(255,255,255,0.25);
  margin-top: 4px;
}

.lv-ca-loading,
.lv-ca-empty {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  text-align: center;
  padding: 8px;
  margin: 0;
}

/* === [T2B] Vote Button trong Community Answers ═════════════════════════════ */
/* Meta row: flex space-between — vote count bên trái, nút vote bên phải */
.lv-ca-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}

/* Vote count info text */
.lv-ca-vote-info {
  font-size: 11px;
  color: rgba(255,255,255,0.25);
}

/* Nút vote — ghost style mặc định */
.lv-ca-vote-btn {
  font-size: 13px;     /* [LV-D6] tăng từ 11px — dễ đọc hơn */
  padding: 6px 14px;   /* [LV-D6] tăng từ 3px 10px — đủ touch target */
  min-height: 32px;    /* [LV-D6] đảm bảo 44px guideline trên mobile */
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.lv-ca-vote-btn:hover {
  border-color: rgba(255,215,0,0.4);
  color: #ffd700;
  background: rgba(255,215,0,0.1);
  transform: translateY(-1px);
}

/* Đã vote — màu xanh lá */
.lv-ca-vote-btn.voted {
  border-color: rgba(76,175,80,0.5);
  color: #4CAF50;
  background: rgba(76,175,80,0.1);
}

/* [LV-D7] Own-contribution highlight */
.lv-ca-own {
  border-left: 3px solid rgba(255,215,0,0.5);
  background: rgba(255,215,0,0.04);
}
.lv-ca-own-badge {
  display: inline-block;
  font-size: 10px;
  color: #ffd700;
  background: rgba(255,215,0,0.12);
  border: 1px solid rgba(255,215,0,0.3);
  border-radius: 8px;
  padding: 1px 7px;
  margin-bottom: 4px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* [LV-D9] TTS button trong feedback answer block */
.lv-tts-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.18s;
  vertical-align: middle;
  margin-left: 6px;
  flex-shrink: 0;
}
.lv-tts-btn:hover {
  background: rgba(255,215,0,0.15);
  border-color: rgba(255,215,0,0.4);
  color: #ffd700;
  transform: scale(1.1);
}

/* ── AI Grading Section ──────────────────────────────── */
.lv-ai-grade-section {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,215,0,0.15);
  border-radius: 10px; padding: 16px;
}
.lv-ai-score {
  font-size: 36px; font-weight: 700;
  text-align: center; color: #ffd700;
  margin-bottom: 8px;
}
.lv-ai-summary {
  font-size: 13px; color: rgba(255,255,255,0.6);
  text-align: center; line-height: 1.5;
  margin: 8px 0;
}
.lv-vocab-label {
  font-size: 12px; color: rgba(255,255,255,0.4);
  margin-bottom: 6px;
}
.lv-vocab-chip {
  display: inline-block; padding: 3px 10px;
  background: rgba(255,215,0,0.1);
  border: 1px solid rgba(255,215,0,0.25);
  border-radius: 12px; font-size: 14px;
  color: #ffd700; margin: 2px;
  cursor: pointer; transition: all 0.15s;
}
.lv-vocab-chip:hover {
  background: rgba(255,215,0,0.2);
}
.lv-vocab-review { margin-top: 10px; }

/* [F1] Vocab chip dual-action wrapper ───────────────────────── */
.lv-vocab-chip-wrap {
  display: inline-flex;
  align-items: center;
  margin: 2px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,215,0,0.25);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.lv-vocab-chip-wrap:hover {
  border-color: rgba(255,215,0,0.5);
  box-shadow: 0 0 8px rgba(255,215,0,0.15);
}
/* Chip chữ Hán — reset margin/border vì wrap đã có */
.lv-vocab-chip-wrap .lv-vocab-chip {
  margin: 0;
  border: none;
  border-radius: 0;
  padding: 3px 8px 3px 10px;
}
/* Nút bookmark — ẩn mặc định, slide in khi hover wrap */
.lv-vocab-save-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 0;
  overflow: hidden;
  background: rgba(255,215,0,0.18);
  font-size: 12px;
  cursor: pointer;
  padding: 3px 0;
  transition: width 0.2s ease, padding 0.2s ease, background 0.15s;
  user-select: none;
  color: #ffd700;
}
.lv-vocab-chip-wrap:hover .lv-vocab-save-btn {
  width: 26px;
  padding: 3px 5px;
}
.lv-vocab-save-btn:hover {
  background: rgba(255,215,0,0.35);
}
.lv-vocab-save-btn:active {
  transform: scale(0.9);
}
.lv-btn-grade {
  width: 100%; padding: 11px;
  background: linear-gradient(135deg, rgba(255,215,0,0.22) 0%, rgba(200,169,110,0.12) 100%);
  border: 1px solid rgba(255,215,0,0.38);
  border-radius: 10px; color: var(--lv-gold-bright);
  font-size: 14px; font-weight: 700;
  cursor: pointer; margin-top: 12px;
  transition: filter 0.15s, transform 0.1s, box-shadow 0.1s;
  font-family: inherit;
  box-shadow: 0 4px 0 rgba(100,70,0,0.4), 0 4px 14px rgba(0,0,0,0.25);
}
.lv-btn-grade:hover { filter: brightness(1.12); }
.lv-btn-grade:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(100,70,0,0.4); }
.lv-btn-grade:disabled {
  opacity: 0.4; cursor: not-allowed;
}
.lv-result-ai-feedback {
  font-size: 12px; margin-top: 6px;
  padding: 4px 8px; border-radius: 4px;
  line-height: 1.4;
}
.lv-result-ai-feedback.correct {
  background: rgba(76,175,80,0.1);
  color: rgba(76,175,80,0.9);
}
.lv-result-ai-feedback.incorrect {
  background: rgba(244,67,54,0.1);
  color: rgba(244,67,54,0.9);
}
.lv-result-correction {
  font-size: 13px; color: #ffd700;
  margin-top: 3px; font-weight: 500;
}

/* === GRADING LOADER ════════════════════════════════════ */
.lv-grading-loader {
  display: flex; flex-direction: column;
  align-items: center; gap: 12px;
  padding: 20px 16px;
  background: rgba(255,215,0,0.05);
  border: 1px dashed rgba(255,215,0,0.25);
  border-radius: 12px;
  animation: lv-fadein 0.5s ease;
}
.lv-grading-spinner {
  width: 36px; height: 36px;
  border: 3px solid rgba(255,215,0,0.15);
  border-top-color: #ffd700;
  border-radius: 50%;
  animation: ytt-spin 0.9s linear infinite;
}
.lv-grading-text {
  font-size: 14px; color: rgba(255,255,255,0.7);
  text-align: center; line-height: 1.8; margin: 0;
}
.lv-grading-text span {
  font-size: 12px; color: rgba(255,215,0,0.6);
}
@keyframes ytt-spin {
  to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════════════
   [B1] SCORE RING — SVG circle animation
   ─────────────────────────────────────────────────────
   Circumference = 2 × π × 50 ≈ 314.16
   stroke-dashoffset = 314.16 - (314.16 × score / 100)
   CSS custom prop --score được set bằng JS sau khi grade
════════════════════════════════════════════════════════ */
.lv-score-ring-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 12px;
}

.lv-score-ring {
  width: 120px;
  height: 120px;
  transform: rotate(-90deg); /* Bắt đầu từ đỉnh */
}

.lv-score-ring-bg {
  fill: none;
  stroke: rgba(255,255,255,0.08);
  stroke-width: 10;
}

.lv-score-ring-fill {
  fill: none;
  stroke: #ffd700;
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 314.16;
  stroke-dashoffset: 314.16; /* Bắt đầu ẩn (0%) */
  transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1),
              stroke 0.4s ease;
}

/* Màu theo ngưỡng điểm — set bằng JS thông qua .score-green / .score-yellow / .score-red */
.lv-score-ring-fill.score-green { stroke: #4CAF50; }
.lv-score-ring-fill.score-yellow { stroke: #FFC107; }
.lv-score-ring-fill.score-red { stroke: #f44336; }

.lv-score-ring-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
}

/* Override .lv-ai-score khi ở trong ring */
.lv-score-ring-inner .lv-ai-score {
  font-size: 28px;
  font-weight: 800;
  margin: 0;
  line-height: 1;
}

.lv-score-ring-label {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  line-height: 1;
}

/* ═══════════════════════════════════════════════════════
   [B2] CELEBRATION MODAL — hiện 3s khi score ≥ 85
════════════════════════════════════════════════════════ */
.lv-celebrate-overlay {
  position: fixed;
  inset: 0;
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.6);
  animation: lv-fadein 0.3s ease;
  pointer-events: none; /* auto-dismiss, không cần click */
}

.lv-celebrate-box {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 1px solid rgba(255,215,0,0.3);
  border-radius: 20px;
  padding: 32px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-width: 260px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,215,0,0.1);
  animation: lv-celebrate-pop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes lv-celebrate-pop {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.lv-celebrate-icon {
  font-size: 52px;
  margin-bottom: 8px;
  animation: lv-bounce 0.6s ease 0.2s both;
}

@keyframes lv-bounce {
  0%   { transform: translateY(-20px); opacity: 0; }
  60%  { transform: translateY(6px); }
  100% { transform: translateY(0); opacity: 1; }
}

.lv-celebrate-score {
  font-size: 48px;
  font-weight: 900;
  color: #ffd700;
  line-height: 1;
  margin-bottom: 8px;
  text-shadow: 0 0 20px rgba(255,215,0,0.5);
}

.lv-celebrate-msg {
  font-size: 14px;
  color: rgba(255,255,255,0.75);
  margin-bottom: 20px;
  line-height: 1.5;
}

/* Countdown bar — depletes trong 3s */
.lv-celebrate-bar {
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
}

.lv-celebrate-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffd700, #ff8c00);
  border-radius: 2px;
  width: 100%;
  animation: lv-countdown 3s linear forwards;
}

@keyframes lv-countdown {
  from { width: 100%; }
  to   { width: 0%; }
}

/* CSS Confetti particles */
.lv-confetti-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.lv-confetti-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  animation: lv-confetti-fall linear forwards;
}

@keyframes lv-confetti-fall {
  0%   { transform: translateY(-10px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(200px) rotate(720deg); opacity: 0; }
}

/* Fade-out animation khi dismiss */
.lv-celebrate-overlay.dismissing {
  animation: lv-fadeout 0.4s ease forwards;
}

@keyframes lv-fadeout {
  from { opacity: 1; }
  to   { opacity: 0; }
}

/* ── [F2] Next Topic Recommendation ──────────────────────── */
.lv-next-topics {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
  animation: lv-fadein 0.5s ease 0.3s both;
}
.lv-next-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--lv-gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
  opacity: 0.85;
}
.lv-next-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lv-next-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, transform 0.15s;
  text-decoration: none;
  color: inherit;
}
.lv-next-card:hover {
  background: rgba(255,215,0,0.07);
  border-color: rgba(255,215,0,0.25);
  transform: translateX(3px);
}
.lv-next-card-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,215,0,0.08);
  border-radius: 8px;
}
.lv-next-card-body {
  flex: 1;
  min-width: 0;
}
.lv-next-card-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #e8e8e8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lv-next-card-meta {
  font-size: 0.72rem;
  color: var(--lv-muted);
  margin-top: 2px;
}
.lv-next-card-arrow {
  font-size: 0.75rem;
  color: var(--lv-muted);
  flex-shrink: 0;
}
.lv-next-same-badge {
  display: inline-block;
  font-size: 0.6rem;
  background: rgba(66,165,245,0.15);
  color: var(--lv-blue);
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 4px;
  vertical-align: middle;
}

/* ════════════════════════════════════════════════════════
   Word Lookup Popover — vocab_to_review floating UI
════════════════════════════════════════════════════════ */
.lv-vocab-popover {
  display: none;
  position: absolute;
  z-index: 9999;
  background: #1a1230;
  border: 1px solid rgba(255,215,0,0.35);
  border-radius: 12px;
  padding: 14px 16px 12px;
  min-width: 190px;
  max-width: 260px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,215,0,0.08);
  animation: lv-pop-in 0.15s ease;
}
@keyframes lv-pop-in {
  from { opacity:0; transform: translateY(-4px) scale(0.97); }
  to   { opacity:1; transform: translateY(0)   scale(1);    }
}
.lv-vp-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.lv-vp-tts {
  background: rgba(255,215,0,0.1);
  border: 1px solid rgba(255,215,0,0.25);
  border-radius: 8px;
  font-size: 1.1rem;
  padding: 4px 8px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}
.lv-vp-tts:hover { background: rgba(255,215,0,0.22); }
.lv-vp-word {
  font-size: 1.9rem;
  font-weight: 700;
  color: #ffd700;
  letter-spacing: 2px;
  line-height: 1;
}
.lv-vp-actions {
  display: flex;
  gap: 8px;
}
.lv-vp-btn {
  flex: 1;
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid;
  transition: all 0.15s;
  white-space: nowrap;
}
.lv-vp-dict {
  background: rgba(66,165,245,0.12);
  border-color: rgba(66,165,245,0.35);
  color: #90caf9;
}
.lv-vp-dict:hover { background: rgba(66,165,245,0.22); }
.lv-vp-save {
  background: rgba(255,215,0,0.1);
  border-color: rgba(255,215,0,0.3);
  color: #ffd700;
}
.lv-vp-save:hover { background: rgba(255,215,0,0.2); }

/* ════════════════════════════════════════════════════════
   Celebration enhancements — chữ Hán confetti + text
════════════════════════════════════════════════════════ */
.lv-confetti-hanzi {
  position: absolute;
  font-size: 1.2rem;
  font-weight: 900;
  opacity: 0.9;
  pointer-events: none;
  animation: lv-confetti-fall linear forwards;
  text-shadow: 0 0 8px currentColor;
}
.lv-cel-hanzi {
  font-size: 1.4rem;
  font-weight: 900;
  color: #ffd700;
  letter-spacing: 3px;
  display: block;
  margin-bottom: 2px;
  text-shadow: 0 0 12px rgba(255,215,0,0.5);
}

/* ═══════════════════════════════════════════════════════
   [T2] VIẾT VĂN AI
═══════════════════════════════════════════════════════ */
.lv-input {
  width: 100%; box-sizing: border-box;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px; color: #fff;
  font-size: 14px; padding: 10px 14px; outline: none;
  transition: border-color 0.2s;
}
.lv-input:focus { border-color: rgba(255,215,0,0.4); }
.lv-input::placeholder { color: rgba(255,255,255,0.3); }
.lv-file-upload-wrap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lv-file-upload-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 8px;
  background: rgba(255,215,0,0.08);
  border: 1px dashed rgba(255,215,0,0.3);
  color: #ffd700; font-size: 13px;
  cursor: pointer; transition: all 0.2s;
}
.lv-file-upload-btn:hover { background: rgba(255,215,0,0.15); }
.lv-file-name { font-size: 12px; color: rgba(255,255,255,0.4); font-style: italic; }
.lv-vv-prompt-card {
  background: linear-gradient(135deg, rgba(30,28,70,0.92), rgba(18,16,42,0.97));
  border: 1px solid rgba(255,215,0,0.28);
  border-radius: 16px;
  padding: 0;
  margin-bottom: 0;
  box-shadow: 0 6px 0 rgba(0,0,0,0.5), 0 10px 24px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,215,0,0.12);
  overflow: hidden;
  /* [v13.80] Khung đề bài NHỎ HƠN khung làm bài: cap chiều cao, scroll nội bộ khi tràn */
  flex: 0 0 auto;
  max-height: 38vh;
  display: flex; flex-direction: column;
}
.lv-vv-prompt-title { font-size: 14px; font-weight: 700; color: #ffd700; }
/* Header right: fs-ctrl + toggle */
.lv-vv-prompt-header-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.lv-vv-prompt-fs-ctrl { opacity: 0.85; }
/* Prompt body — font-size controlled by JS; scrollable when tall */
.lv-vv-prompt-body {
  padding: 12px 16px 14px;
  max-width: 680px; margin: 0 auto; width: 100%; box-sizing: border-box;
  font-size: 15px;        /* JS điều chỉnh: --vv-prompt-fs */
  overflow-y: auto;
  flex: 1; min-height: 0;  /* [v13.80] chiều cao do .lv-vv-prompt-card cap, body scroll nội bộ */
}
.lv-vv-prompt-body::-webkit-scrollbar { width: 5px; }
.lv-vv-prompt-body::-webkit-scrollbar-track { background: transparent; }
.lv-vv-prompt-body::-webkit-scrollbar-thumb { background: rgba(255,215,0,0.25); border-radius: 3px; }
/* Children dùng em để inherit font-size từ body */
.lv-vv-prompt-vi { font-size: 1em; color: #e0e0e0; line-height: 1.65; margin-bottom: 8px; }
.lv-vv-prompt-zh {
  font-size: 1.07em; color: rgba(255,200,100,0.88);
  font-family: 'KaiTi', 'Noto Sans SC', serif; line-height: 1.75; margin-bottom: 10px;
  padding: 8px 12px; background: rgba(255,255,255,0.03);
  border-left: 3px solid rgba(255,215,0,0.3); border-radius: 0 8px 8px 0;
}
.lv-vv-vocab-label { font-size: 0.8em; color: rgba(255,255,255,0.5); margin: 8px 0 6px; font-weight: 600; }
.lv-vv-vocab-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.lv-vv-vocab-chip {
  display: inline-block; padding: 3px 10px;
  background: rgba(100,181,246,0.12); border: 1px solid rgba(100,181,246,0.25);
  border-radius: 12px; color: #90caf9; font-size: 0.87em; font-family: 'KaiTi', serif;
}
.lv-vv-result-card {
  background: linear-gradient(135deg, rgba(20,20,40,0.95), rgba(15,15,30,0.98));
  border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; padding: 24px;
}
.lv-vv-score-row { display: flex; align-items: baseline; justify-content: center; gap: 4px; margin-bottom: 20px; }
.lv-vv-total-score { font-size: 56px; font-weight: 900; line-height: 1; }
.lv-vv-score-label { font-size: 20px; color: rgba(255,255,255,0.4); }
.lv-vv-breakdown-row {
  display: grid; grid-template-columns: 60px 1fr 40px;
  grid-template-rows: auto auto; gap: 2px 8px; margin-bottom: 12px; align-items: center;
}
.lv-vv-bd-label { font-size: 12px; color: rgba(255,255,255,0.6); font-weight: 600; }
.lv-vv-bd-bar-wrap { height: 6px; background: rgba(255,255,255,0.07); border-radius: 3px; overflow: hidden; }
.lv-vv-bd-bar { height: 100%; background: linear-gradient(90deg,#42a5f5,#26c6da); border-radius: 3px; transition: width 0.8s ease; }
.lv-vv-bd-score { font-size: 12px; color: #42a5f5; font-weight: 700; text-align: right; }
.lv-vv-bd-fb { grid-column: 1 / -1; font-size: 11px; color: rgba(255,255,255,0.4); padding-left: 2px; }
.lv-vv-overall { font-size: 13px; color: #e0e0e0; line-height: 1.6; padding: 12px; background: rgba(255,255,255,0.03); border-radius: 10px; margin: 12px 0; }
.lv-vv-corr-label { font-size: 12px; font-weight: 700; color: rgba(255,255,255,0.5); margin-bottom: 8px; }
.lv-vv-corr-item { font-size: 13px; margin-bottom: 6px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.lv-vv-corr-orig { background: rgba(244,67,54,0.15); color: #ef9a9a; padding: 1px 7px; border-radius: 6px; text-decoration: line-through; font-family: 'KaiTi', serif; letter-spacing: 0; word-spacing: 0; }
.lv-vv-corr-fix { background: rgba(76,175,80,0.15); color: #a5d6a7; padding: 1px 7px; border-radius: 6px; font-family: 'KaiTi', serif; font-weight: 700; letter-spacing: 0; word-spacing: 0; }
.lv-vv-corr-reason { font-size: 11px; color: rgba(255,255,255,0.35); }

/* ── VV Draft Banner ──────────────────────────────────────────── */
.vv-draft-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, rgba(255,193,7,0.1), rgba(255,152,0,0.07));
  border: 1px solid rgba(255,193,7,0.35);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  animation: vvDraftSlideIn 0.3s ease;
}
@keyframes vvDraftSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.vv-draft-icon { font-size: 20px; flex-shrink: 0; }
.vv-draft-info { flex: 1; min-width: 0; }
.vv-draft-title { font-size: 13px; color: #e0e0e0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vv-draft-title strong { color: #ffd700; }
.vv-draft-meta { font-size: 11px; color: rgba(255,255,255,0.45); margin-top: 2px; }
.vv-draft-resume {
  flex-shrink: 0;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(255,193,7,0.25), rgba(255,152,0,0.2));
  border: 1px solid rgba(255,193,7,0.4);
  border-radius: 8px;
  color: #ffd700;
  cursor: pointer;
  transition: background 0.15s;
}
.vv-draft-resume:hover { background: linear-gradient(135deg, rgba(255,193,7,0.4), rgba(255,152,0,0.35)); }
.vv-draft-del {
  flex-shrink: 0;
  background: none;
  border: none;
  color: rgba(255,255,255,0.3);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.vv-draft-del:hover { color: #ef5350; background: rgba(244,67,54,0.1); }

/* ═══════════════════════════════════════════════════════════════
   SPRINT 3 — Viết Văn AI Fullscreen UX
   ═══════════════════════════════════════════════════════════════ */
.lv-vv-launch-card {
  background: linear-gradient(135deg, rgba(33,150,243,0.08), rgba(103,58,183,0.08));
  border: 1px solid rgba(33,150,243,0.18); border-radius: 16px; padding: 24px 20px; text-align: center;
}
.lv-vv-launch-icon { font-size: 36px; margin-bottom: 8px; }
.lv-vv-launch-title { font-size: 17px; font-weight: 700; color: #fff; margin-bottom: 6px; }
.lv-vv-launch-desc { font-size: 13px; color: rgba(255,255,255,0.5); line-height: 1.5; }
.lv-vv-launch-btn { margin-top: 4px; font-size: 15px; padding: 14px 20px; }

/* [v13.80] Fit-viewport: màn viết chiếm đúng chiều cao iframe (KHÔNG để iframe document
   tự scroll = thanh cuộn lớn bên ngoài). Editor scroll nội bộ. */
#screen-vv-write {
  display: flex; flex-direction: column;
  height: 100vh; max-height: 100vh;
  padding: 0;
  overflow: hidden;
}
.lv-vv-write-body {
  flex: 1; min-height: 0;   /* min-height:0 cho phép con co lại để editor scroll nội bộ */
  overflow: hidden;          /* body KHÔNG scroll — prompt-body + editor tự scroll */
  padding: 10px 16px;
  display: flex; flex-direction: column; gap: 10px;
  max-width: 860px; width: 100%; margin: 0 auto; box-sizing: border-box;
}

.lv-vv-prompt-header {
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer; user-select: none;
  padding: 12px 16px;
  background: linear-gradient(90deg, rgba(255,215,0,0.06), transparent);
  border-bottom: 1px solid rgba(255,215,0,0.12);
}
.lv-vv-prompt-toggle { font-size: 12px; color: rgba(255,255,255,0.45); white-space: nowrap; }

.lv-vv-grammar-wrap { margin-top: 10px; }
/* [v13.80] Mẫu câu + Ngữ pháp: chip HÀNG NGANG (thay .lv-vv-grammar-row dọc + .lv-vv-structure
   + .lv-vv-punct-guide đã gỡ). Label (.lv-vv-vocab-label) là <p> block → tự xuống dòng riêng. */
.lv-vv-chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.lv-vv-phrase-chip, .lv-vv-gram-chip {
  display: inline-flex; align-items: baseline; gap: 5px;
  padding: 3px 10px; border-radius: 12px;
  font-size: 0.85em; line-height: 1.4;
}
.lv-vv-phrase-chip { background: rgba(128,203,196,0.10); border: 1px solid rgba(128,203,196,0.28); }
.lv-vv-phrase-chip b { color: #80cbc4; font-weight: 700; font-family: 'KaiTi', serif; }
.lv-vv-phrase-chip i { color: rgba(255,255,255,0.5); font-style: normal; font-size: 0.92em; }
.lv-vv-gram-chip { background: rgba(186,104,200,0.12); border: 1px solid rgba(186,104,200,0.32); cursor: help; }
.lv-vv-gram-chip b { color: #ce93d8; font-weight: 700; font-family: 'KaiTi', serif; }
.lv-vv-gram-chip i { color: rgba(255,255,255,0.5); font-style: normal; font-size: 0.9em; }

.lv-vv-editor-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* Header: label + font-size adjuster */
.lv-vv-editor-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.lv-vv-editor-header .lv-label { font-size: 13px; margin: 0; }

/* contenteditable editor — styled như textarea */
.lv-vv-editor {
  flex: 1;
  min-height: 0;   /* [v13.80] co theo không gian còn lại; overflow-y:auto cho scroll nội bộ khi 300+ chữ */
  padding: 12px 14px;
  background: linear-gradient(160deg, rgba(16,16,36,0.95), rgba(12,12,28,0.98));
  border: 1px solid rgba(255,255,255,0.1);
  border-bottom: 2px solid rgba(66,165,245,0.5);
  border-radius: 12px;
  /* Gán tường minh cả color lẫn webkit-text-fill để chống cascade từ gradient-text elements */
  color: #e0e0e0;
  -webkit-text-fill-color: #e0e0e0;
  caret-color: #64b5f6;
  font-size: 18px;
  font-family: 'KaiTi', 'STKaiti', 'Noto Serif SC', serif;
  line-height: 1.9;
  letter-spacing: 1px;
  outline: none;
  cursor: text;
  overflow-y: auto;
  transition: border-color 0.25s, box-shadow 0.25s;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
  position: relative;
  white-space: pre-wrap;
  word-break: break-word;
}
/* Chrome tự bọc text trong <div> khi gõ → phải inherit màu xuống */
.lv-vv-editor div,
.lv-vv-editor p,
.lv-vv-editor span:not([data-hl]) {
  color: inherit;
  -webkit-text-fill-color: inherit;
}
.lv-vv-editor:empty::before {
  content: attr(data-placeholder);
  color: rgba(255,255,255,0.22);
  pointer-events: none;
  display: block;
  font-size: 0.9em;
}
.lv-vv-editor:focus {
  border-color: rgba(66,165,245,0.75);
  box-shadow: 0 0 0 3px rgba(66,165,245,0.12), 0 4px 16px rgba(0,0,0,0.4);
}

/* Highlight marks bên trong editor */
.lv-vv-editor mark { background: rgba(255,238,88,0.35); color: inherit; border-radius: 3px; padding: 0 1px; }
.lv-vv-editor mark.color-blue   { background: rgba(66,165,245,0.28); }
.lv-vv-editor mark.color-pink   { background: rgba(233,30,99,0.28); }
.lv-vv-editor mark.color-green  { background: rgba(76,175,80,0.28); }
.lv-vv-editor mark.color-yellow { background: rgba(255,238,88,0.38); }
.lv-vv-editor mark.color-strike { text-decoration: line-through; background: transparent; opacity: 0.5; }

.lv-vv-charcount { font-size: 13px; color: rgba(255,255,255,0.5); background: rgba(255,255,255,0.06); padding: 2px 10px; border-radius: 20px; }

/* [v13.80] .lv-vv-write-footer đã gỡ — nút Chấm Bài dời lên header (.lv-vv-submit-btn--top). */
.lv-vv-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 40px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 14px;
  background: linear-gradient(135deg, #2e7d32, #1b5e20);
  color: #fff;
  border: none;
  cursor: pointer;
  letter-spacing: 0.5px;
  box-shadow: 0 5px 0 #0a3d0a, 0 8px 20px rgba(0,0,0,0.4);
  transition: transform 0.08s, box-shadow 0.08s;
  user-select: none;
}
.lv-vv-submit-btn:hover {
  background: linear-gradient(135deg, #388e3c, #2e7d32);
  box-shadow: 0 6px 0 #0a3d0a, 0 10px 24px rgba(0,0,0,0.45);
}
.lv-vv-submit-btn:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #0a3d0a, 0 4px 10px rgba(0,0,0,0.3);
}
.lv-vv-submit-btn:disabled {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.4);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}
/* [v13.80] Variant nhỏ gọn khi nút Chấm Bài nằm trong header (.lv-practice-header)
   thay vì footer đáy. .lv-progress-info{flex:1} tự đẩy nút sang góc phải. */
.lv-vv-submit-btn--top {
  padding: 8px 20px;
  font-size: 13.5px;
  border-radius: 10px;
  box-shadow: 0 3px 0 #0a3d0a, 0 5px 12px rgba(0,0,0,0.35);
  flex-shrink: 0;
}
.lv-vv-submit-btn--top:hover {
  box-shadow: 0 4px 0 #0a3d0a, 0 7px 16px rgba(0,0,0,0.4);
}
.lv-vv-submit-btn--top:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #0a3d0a, 0 3px 8px rgba(0,0,0,0.3);
}

.lv-vv-result-wrap { padding: 16px; overflow-y: auto; }
.lv-vv-result-actions { display: flex; gap: 10px; margin-top: 16px; }
.lv-vv-result-actions .lv-btn { flex: 1; }

.lv-vv-sect-title { font-size: 13px; font-weight: 700; color: rgba(255,255,255,0.65); margin-bottom: 8px; padding-bottom: 4px; border-bottom: 1px solid rgba(255,255,255,0.07); }

.lv-vv-punct-review { background: rgba(255,193,7,0.05); border: 1px solid rgba(255,193,7,0.12); border-radius: 12px; padding: 12px 14px; margin: 12px 0; }
.lv-vv-punct-badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.vv-punct-good { background: rgba(76,175,80,0.2); color: #a5d6a7; }
.vv-punct-mid  { background: rgba(255,193,7,0.2); color: #ffe082; }
.vv-punct-bad  { background: rgba(244,67,54,0.2); color: #ef9a9a; }
.lv-vv-punct-issues { font-size: 12px; color: rgba(255,255,255,0.5); padding-left: 16px; margin: 6px 0 0; }
.lv-vv-punct-issues li { margin-bottom: 4px; }

.lv-vv-register-review { background: rgba(103,58,183,0.06); border: 1px solid rgba(103,58,183,0.14); border-radius: 12px; padding: 12px 14px; margin: 12px 0; }
.lv-vv-register-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.lv-vv-register-row { font-size: 13px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.lv-vv-spoken  { color: #ef9a9a; background: rgba(244,67,54,0.12); padding: 1px 8px; border-radius: 6px; font-family: 'KaiTi',serif; font-size: 14px; text-decoration: line-through; }
.lv-vv-written { color: #a5d6a7; background: rgba(76,175,80,0.12); padding: 1px 8px; border-radius: 6px; font-family: 'KaiTi',serif; font-size: 14px; font-weight: 700; }
.lv-vv-reg-reason { font-size: 11px; color: rgba(255,255,255,0.35); }
.lv-vv-acceptable { font-size: 12px; color: rgba(255,255,255,0.45); margin-top: 8px; }

.lv-vv-overall { background: rgba(255,255,255,0.03); border-radius: 12px; padding: 12px 14px; margin: 12px 0; font-size: 13px; color: #e0e0e0; line-height: 1.7; }
.lv-vv-overall p { margin: 6px 0 0; }
.lv-vv-bd-fb { grid-column: 1/-1; font-size: 12px; color: rgba(255,255,255,0.45); padding: 2px 0 0; margin: 0; }

.lv-hist-type-badge { font-size: 10px; padding: 2px 8px; border-radius: 20px; font-weight: 600; margin-left: 6px; }
.lv-hist-type-topic   { background: rgba(33,150,243,0.15); color: #90caf9; }
.lv-hist-type-custom  { background: rgba(255,152,0,0.15); color: #ffcc80; }
.lv-hist-type-vietvan { background: rgba(156,39,176,0.2); color: #ce93d8; }

/* ══════════════════════════════════════════════════════════
   [Sprint 4] TEXT HIGHLIGHT — Study4 style
   ══════════════════════════════════════════════════════════ */

/* Highlight marks */
mark.lv-hl {
  background: none;
  border-radius: 3px;
  cursor: pointer;
  padding: 1px 1px;
  transition: filter 0.15s;
}
mark.lv-hl:hover { filter: brightness(1.25); }
mark.lv-hl-blue   { background: rgba(59,130,246,0.38); }
mark.lv-hl-pink   { background: rgba(236,72,153,0.35); }
mark.lv-hl-green  { background: rgba(34,197,94,0.38); }
mark.lv-hl-yellow { background: rgba(234,179,8,0.42); color: #111; }
mark.lv-hl-strike {
  background: rgba(156,163,175,0.18);
  text-decoration: line-through;
  text-decoration-color: rgba(255,255,255,0.5);
  color: var(--lv-muted);
}

/* Floating popup */
#lv-hl-popup {
  position: fixed;
  z-index: 9999;
  display: none;
  background: rgba(18, 18, 35, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.55), 0 2px 8px rgba(0,0,0,0.3);
  padding: 6px 8px;
  display: none;
  align-items: center;
  gap: 5px;
  user-select: none;
  transform: translateX(-50%);
  animation: lv-hl-popup-in 0.12s ease;
}
@keyframes lv-hl-popup-in {
  from { opacity: 0; transform: translateX(-50%) translateY(4px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.lv-hl-popup-sep {
  width: 1px;
  height: 18px;
  background: rgba(255,255,255,0.12);
  margin: 0 2px;
}
.lv-hl-pop-btn {
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  padding: 4px 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s;
  color: rgba(255,255,255,0.75);
  font-size: 0.72rem;
  min-width: 26px;
  min-height: 26px;
}
.lv-hl-pop-btn:hover { background: rgba(255,255,255,0.12); color: #fff; }
.lv-hl-pop-del { color: rgba(255,100,100,0.8); }
.lv-hl-pop-del:hover { background: rgba(255,100,100,0.15); color: #ff6b6b; }
.lv-hl-pop-color {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.25);
  cursor: pointer;
  transition: transform 0.12s, border-color 0.12s;
  flex-shrink: 0;
}
.lv-hl-pop-color:hover { transform: scale(1.25); border-color: rgba(255,255,255,0.6); }
.lv-hl-pop-c-blue   { background: rgba(59,130,246,0.8); }
.lv-hl-pop-c-pink   { background: rgba(236,72,153,0.8); }
.lv-hl-pop-c-green  { background: rgba(34,197,94,0.8); }
.lv-hl-pop-c-yellow { background: rgba(234,179,8,0.9); }

/* ═══════════════════════════════════════════════════════════════════
   S52 — LIGHT MODE OVERRIDES (dark-first pattern)
   Dark là default ở :root. Override CHỈ khi html[data-theme="light"].
   Tuân thủ feedback_theme_strict_separation: KHÔNG đổi :root, scope toàn bộ
   visual rule dưới html[data-theme="light"] .selector.
   ═══════════════════════════════════════════════════════════════════ */
html[data-theme="light"] {
  /* Surface tokens — cream warm để hợp earthy palette */
  --lv-bg:          #fdf6f3;                /* cream */
  --lv-surface:     #ffffff;
  --lv-surface-2:   #fbeae5;                /* linen blush */
  --lv-border:      #5e6266;                /* slate */
  --lv-border-hi:   rgba(199, 49, 47, 0.40);

  /* Text scale */
  --lv-text:        #3a3d3f;                /* charcoal */
  --lv-muted:       #5e6266;                /* slate */

  /* PRIMARY (replaces gold) — terracotta brick + honey caramel */
  --lv-gold:        #c7312f;                /* brick (primary accent) */
  --lv-gold-bright: #d4a574;                /* honey (secondary accent) */

  /* Status — đa dạng đồng bộ earthy */
  --lv-green:       #6b9a4d;                /* sage dark */
  --lv-green-dark:  #4a6b30;                /* sage darker */
  --lv-amber:       #b8842f;                /* honey dark */
  --lv-amber-dark:  #c7312f;                /* honey darker */
  --lv-blue:        #4087a6;                /* petrol */
  --lv-red:         #c7312f;                /* brick */

  /* Shadows — soft brick warm */
  --lv-glow-gold:   0 0 18px rgba(199,49,47,0.18);
  --lv-glow-green:  0 0 16px rgba(107,154,77,0.22);
  --lv-shadow-3d:   0 2px 6px rgba(58,61,63,0.10);
}

/* Question box — gradient tím-đen → trắng phớt lavender */
html[data-theme="light"] .lv-question-box {
  background: linear-gradient(160deg, #FFFFFF 0%, #F8F5FF 100%);
  border-color: rgba(199,49,47,0.20);
  border-left-color: rgba(199,49,47,0.55);
  box-shadow: 0 2px 12px rgba(58,61,63,0.08), inset 0 1px 0 rgba(255,255,255,0.5);
}
html[data-theme="light"] .lv-question-box::before {
  background: radial-gradient(circle, rgba(199,49,47,0.08) 0%, transparent 70%);
}
html[data-theme="light"] .lv-question-text {
  color: #3a3d3f;
}

/* Tabs */
html[data-theme="light"] .lv-tabs {
  background: var(--ytt-bg-input);
  border-color: var(--lv-border);
}
html[data-theme="light"] .lv-tab-btn.active {
  background: linear-gradient(135deg, rgba(199,49,47,0.18) 0%, rgba(199,49,47,0.08) 100%);
  color: var(--lv-gold);
  box-shadow: 0 1px 4px rgba(199,49,47,0.18), inset 0 1px 0 rgba(255,255,255,0.5);
}
html[data-theme="light"] .lv-tab-btn:not(.active):hover {
  background: var(--ytt-bg-hover);
  color: var(--lv-text);
}

/* Select / Input / Textarea — invisible rgba(255,255,255,X) → token */
html[data-theme="light"] .lv-select,
html[data-theme="light"] .lv-textarea,
html[data-theme="light"] .lv-input {
  background: var(--ytt-bg-input);
  border-color: var(--lv-border);
  color: var(--lv-text);
}
html[data-theme="light"] .lv-select {
  border-bottom-color: rgba(199,49,47,0.32);
}
html[data-theme="light"] .lv-textarea {
  border-bottom-color: rgba(64,135,166,0.32);
  color: #111;                  /* [v13.62] đen đậm để dễ đọc text Hán tự */
  font-weight: 700;             /* in đậm hơn dark mode */
}
html[data-theme="light"] .lv-textarea:focus,
html[data-theme="light"] .lv-input:focus {
  border-color: rgba(64,135,166,0.5);
  box-shadow: 0 0 0 3px rgba(64,135,166,0.10);
}
html[data-theme="light"] .lv-select:focus {
  border-color: rgba(199,49,47,0.5);
  box-shadow: 0 4px 12px rgba(199,49,47,0.10);
}
html[data-theme="light"] .lv-select option {
  background: #FFFFFF;
  color: var(--lv-text);
}
html[data-theme="light"] .lv-select optgroup {
  background: var(--ytt-bg-hover);
  color: var(--lv-gold);
}
html[data-theme="light"] .lv-textarea::placeholder,
html[data-theme="light"] .lv-input::placeholder {
  color: var(--ytt-text-3);
}

/* Main title gradient — giữ gold gradient nhưng đậm hơn */
html[data-theme="light"] .lv-main-title,
html[data-theme="light"] .lv-result-title {
  background: linear-gradient(135deg, #a82929 0%, #d4a574 60%, #c7312f 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* Buttons — secondary/reset/ghost dùng rgba trắng → invisible */
html[data-theme="light"] .lv-btn-secondary,
html[data-theme="light"] .lv-btn-reset,
html[data-theme="light"] .lv-btn-restart {
  background: linear-gradient(135deg, #FFFFFF 0%, #F3F0FC 100%);
  color: var(--lv-text);
  border: 1px solid var(--lv-border);
  box-shadow: 0 2px 0 rgba(58,61,63,0.10), 0 3px 8px rgba(58,61,63,0.06);
}
html[data-theme="light"] .lv-btn-secondary:hover,
html[data-theme="light"] .lv-btn-reset:hover,
html[data-theme="light"] .lv-btn-restart:hover {
  background: var(--ytt-bg-hover);
}
html[data-theme="light"] .lv-btn-ghost,
html[data-theme="light"] .lv-feedback-btn {
  background: var(--ytt-bg-card);
  color: var(--lv-muted);
  border-color: var(--lv-border);
  box-shadow: 0 1px 0 rgba(58,61,63,0.08);
}
html[data-theme="light"] .lv-btn-ghost:hover,
html[data-theme="light"] .lv-feedback-btn:hover {
  background: var(--ytt-bg-hover);
  color: var(--lv-text);
}
html[data-theme="light"] .lv-btn-new {
  background: linear-gradient(135deg, rgba(199,49,47,0.22) 0%, rgba(199,49,47,0.10) 100%);
  border-color: rgba(199,49,47,0.40);
  color: var(--lv-gold);
  box-shadow: 0 2px 0 rgba(199,49,47,0.25), 0 4px 12px rgba(199,49,47,0.12);
}
html[data-theme="light"] .lv-btn-icon,
html[data-theme="light"] .lv-btn-back,
html[data-theme="light"] .lv-view-toggle,
html[data-theme="light"] .lv-mic-btn,
html[data-theme="light"] .lv-speak-btn {
  background: var(--ytt-bg-card);
  color: var(--lv-muted);
  border-color: var(--lv-border);
}
html[data-theme="light"] .lv-btn-icon:hover,
html[data-theme="light"] .lv-btn-back:hover,
html[data-theme="light"] .lv-speak-btn:hover,
html[data-theme="light"] .lv-mic-btn:hover {
  background: var(--ytt-bg-hover);
  color: var(--lv-text);
}

/* Font-size group */
html[data-theme="light"] .lv-fs-group {
  background: var(--ytt-bg-input);
  border-color: var(--lv-border);
}
html[data-theme="light"] .lv-fs-btn:hover {
  color: var(--lv-gold);
  background: rgba(199,49,47,0.08);
}

/* Question text-wrap, narrow avatar border */
html[data-theme="light"] .lv-narrow-avatar {
  border-color: rgba(199,49,47,0.30);
  box-shadow: 0 2px 6px rgba(58,61,63,0.12);
}

/* Hint panel — gold */
html[data-theme="light"] .lv-hint-panel {
  background: linear-gradient(135deg, rgba(199,49,47,0.10) 0%, rgba(199,49,47,0.04) 100%);
  border-color: rgba(199,49,47,0.24);
  border-left-color: var(--lv-gold);
  box-shadow: 0 1px 4px rgba(58,61,63,0.08);
}
html[data-theme="light"] .lv-hint-py {
  color: var(--lv-gold);
}
html[data-theme="light"] .lv-hint-text {
  color: var(--lv-muted);
}
html[data-theme="light"] .lv-input-hint kbd {
  background: var(--ytt-bg-input);
  border-color: var(--lv-border);
  color: var(--lv-text);
}
html[data-theme="light"] .lv-topic-label {
  color: var(--lv-muted);
}

/* AI result placeholder box */
html[data-theme="light"] .lv-ai-result {
  background: linear-gradient(160deg, #FFFFFF 0%, #F3F0FC 100%);
  border-color: rgba(64,135,166,0.18);
  border-top-color: rgba(64,135,166,0.35);
  box-shadow: 0 2px 10px rgba(58,61,63,0.08);
}
html[data-theme="light"] .lv-tip-content {
  color: var(--lv-muted);
}

/* Sentence list (wide mode) */
html[data-theme="light"] .lv-sl-row {
  background: var(--ytt-bg-hover);
}
html[data-theme="light"] .lv-sl-current {
  background: rgba(199,49,47,0.10);
  color: #3a3d3f;
  border-left-color: var(--lv-gold);
}
html[data-theme="light"] .lv-sentence-list::-webkit-scrollbar-thumb {
  background: var(--lv-border);
}
html[data-theme="light"] .lv-sl-divider {
  color: var(--lv-muted);
}

/* Char count */
html[data-theme="light"] .lv-char-count {
  color: var(--ytt-text-3);
}

/* Overlay modals (resume/feedback/bonus) */
html[data-theme="light"] .lv-overlay {
  background: rgba(58,61,63,0.32);
}
html[data-theme="light"] .lv-overlay-box {
  background: var(--lv-surface);
  border-color: rgba(199,49,47,0.25);
  box-shadow: 0 12px 48px rgba(58,61,63,0.18);
}
html[data-theme="light"] .lv-overlay-title {
  color: var(--lv-text);
}
html[data-theme="light"] .lv-overlay-desc {
  color: var(--lv-muted);
}

/* Stat cards (result screen) */
html[data-theme="light"] .lv-stat-card {
  background:
    radial-gradient(ellipse at 20% 15%, rgba(199,49,47,0.10) 0%, transparent 55%),
    linear-gradient(160deg, #FFFFFF 0%, #F3F0FC 100%);
  border-color: rgba(199,49,47,0.20);
  box-shadow: 0 2px 0 rgba(58,61,63,0.10), 0 4px 14px rgba(58,61,63,0.06);
}
html[data-theme="light"] .lv-stat-card::before {
  background-image: radial-gradient(circle, rgba(199,49,47,0.05) 1px, transparent 1px);
}
html[data-theme="light"] .lv-stat-val {
  color: var(--lv-gold);
  text-shadow: 0 0 12px rgba(199,49,47,0.20);
}
html[data-theme="light"] .lv-pending-grade {
  background: rgba(184,132,47,0.08);
  border-color: rgba(184,132,47,0.28);
  color: var(--lv-text);
}

/* History items */
html[data-theme="light"] .lv-hist-item {
  background: var(--lv-surface);
  border-color: var(--lv-border);
}
html[data-theme="light"] .lv-hist-item:hover {
  border-color: rgba(199,49,47,0.32);
}
html[data-theme="light"] .lv-hist-title,
html[data-theme="light"] .lv-history-title {
  color: var(--lv-text);
}

/* Badges */
html[data-theme="light"] .lv-level-badge {
  background: rgba(64,135,166,0.10);
  color: var(--lv-blue);
  border-color: rgba(64,135,166,0.28);
}
html[data-theme="light"] .lv-status-badge.pending {
  background: rgba(184,132,47,0.10);
  color: var(--lv-amber);
  border-color: rgba(184,132,47,0.28);
}
html[data-theme="light"] .lv-status-badge.graded {
  background: rgba(107,154,77,0.10);
  color: var(--lv-green);
  border-color: rgba(107,154,77,0.28);
}

/* Tier 1 feedback boxes */
html[data-theme="light"] .lv-tier1-result.perfect {
  background: linear-gradient(135deg, rgba(107,154,77,0.14) 0%, rgba(27,94,32,0.06) 100%);
  border-color: rgba(107,154,77,0.32);
}
html[data-theme="light"] .lv-tier1-result.good,
html[data-theme="light"] .lv-tier1-medium {
  background: linear-gradient(135deg, rgba(184,132,47,0.12) 0%, rgba(146,103,10,0.06) 100%);
  border-color: rgba(184,132,47,0.32);
}
html[data-theme="light"] .lv-tier1-fail {
  background: rgba(199,49,47,0.08);
  border-color: rgba(199,49,47,0.28);
}
html[data-theme="light"] .lv-tier1-label {
  color: var(--lv-text);
}
html[data-theme="light"] .lv-tier1-zh,
html[data-theme="light"] .lv-result-item-correct {
  color: var(--lv-gold);
}
html[data-theme="light"] .lv-tier1-py,
html[data-theme="light"] .lv-tier1-note,
html[data-theme="light"] .lv-medium-desc {
  color: var(--lv-muted);
}
html[data-theme="light"] .lv-medium-hint {
  background: rgba(199,49,47,0.08);
  border-color: rgba(199,49,47,0.22);
  color: var(--lv-gold);
}

/* Contribute button */
html[data-theme="light"] .lv-contribute-btn {
  background: var(--ytt-bg-hover);
  border-color: var(--lv-border);
  color: var(--lv-muted);
}
html[data-theme="light"] .lv-contribute-btn:hover {
  background: rgba(199,49,47,0.08);
  border-color: rgba(199,49,47,0.32);
  color: var(--lv-gold);
}

/* Modal (contribute) */
html[data-theme="light"] .lv-modal-overlay {
  background: rgba(58,61,63,0.45);
}
html[data-theme="light"] .lv-modal-box {
  background: var(--lv-surface);
  border-color: rgba(199,49,47,0.22);
  box-shadow: 0 16px 48px rgba(58,61,63,0.22);
}
html[data-theme="light"] .lv-modal-header {
  color: var(--lv-gold);
  border-bottom-color: var(--lv-border);
}
html[data-theme="light"] .lv-modal-header button {
  color: var(--lv-muted);
}
html[data-theme="light"] .lv-modal-sentence {
  background: var(--ytt-bg-hover);
  color: var(--lv-text);
}
html[data-theme="light"] .lv-modal-body label {
  color: var(--lv-muted);
}
html[data-theme="light"] .lv-modal-input,
html[data-theme="light"] .lv-modal-textarea {
  background: var(--ytt-bg-input);
  border-color: var(--lv-border);
  color: var(--lv-text);
}
html[data-theme="light"] .lv-modal-note {
  color: var(--lv-muted);
}
html[data-theme="light"] .lv-modal-footer {
  border-top-color: var(--lv-border);
}
html[data-theme="light"] .lv-btn-cancel {
  background: var(--ytt-bg-hover);
  border-color: var(--lv-border);
  color: var(--lv-text);
}
html[data-theme="light"] .lv-btn-submit {
  background: var(--lv-gold);
  color: #FFFFFF;
}
html[data-theme="light"] .lv-btn-submit:hover {
  background: var(--lv-gold-bright);
}

/* Result list items — [v13.64] Light mode: BG tint per tier (terracotta+petrol+blush palette) */
html[data-theme="light"] .lv-result-item {
  background: rgba(0,0,0,0.025);
  border-left-color: rgba(0,0,0,0.08);
}
html[data-theme="light"] .lv-result-item.tier1-match {
  background: linear-gradient(135deg, rgba(107,154,77,0.14), rgba(107,154,77,0.05));
  border-left-color: #6b9a4d;
}
html[data-theme="light"] .lv-result-item.ai-correct {
  background: linear-gradient(135deg, rgba(64,135,166,0.14), rgba(64,135,166,0.05));
  border-left-color: #4087a6;
}
html[data-theme="light"] .lv-result-item.tier1-medium {
  background: linear-gradient(135deg, rgba(217,119,6,0.13), rgba(217,119,6,0.05));
  border-left-color: #d97706;
}
html[data-theme="light"] .lv-result-item.no-match,
html[data-theme="light"] .lv-result-item.ai-incorrect {
  background: linear-gradient(135deg, rgba(199,49,47,0.12), rgba(199,49,47,0.04));
  border-left-color: #c7312f;
}
html[data-theme="light"] .lv-result-item-vi {
  color: var(--lv-muted);
}
html[data-theme="light"] .lv-result-item-user {
  color: #1a1a1a;
}
html[data-theme="light"] .lv-result-item-score {
  color: var(--ytt-text-3);
}
html[data-theme="light"] .lv-pts-badge.pts-pos {
  background: linear-gradient(135deg, #6b9a4d, #8bb86a);
  color: #fff;
  border-color: rgba(107,154,77,0.45);
}
html[data-theme="light"] .lv-pts-badge.pts-neg {
  background: linear-gradient(135deg, #c7312f, #e0524e);
  color: #fff;
  border-color: rgba(199,49,47,0.5);
}
html[data-theme="light"] .lv-result-legend {
  background: rgba(0,0,0,0.025);
  border-color: rgba(0,0,0,0.08);
}
html[data-theme="light"] .lv-result-legend .lv-legend-label { color: var(--lv-text); }
html[data-theme="light"] .lv-result-legend .lv-legend-chip.match    { background: rgba(107,154,77,0.16); color: #4d7536; border-color: rgba(107,154,77,0.4); }
html[data-theme="light"] .lv-result-legend .lv-legend-chip.ai-ok    { background: rgba(64,135,166,0.16); color: #2c6481; border-color: rgba(64,135,166,0.4); }
html[data-theme="light"] .lv-result-legend .lv-legend-chip.medium   { background: rgba(217,119,6,0.16); color: #b45309; border-color: rgba(217,119,6,0.4); }
html[data-theme="light"] .lv-result-legend .lv-legend-chip.no-match { background: rgba(199,49,47,0.14); color: #a82424; border-color: rgba(199,49,47,0.4); }

/* [v13.72] Light mode: help icon + modal + suggest chips */
html[data-theme="light"] .lv-result-list-title { color: var(--lv-red); }
html[data-theme="light"] .lv-result-help-btn {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.12);
  color: var(--lv-text);
}
html[data-theme="light"] .lv-result-help-btn:hover {
  background: rgba(217,119,6,0.14);
  color: var(--lv-red);
  border-color: rgba(217,119,6,0.4);
}
html[data-theme="light"] .lv-legend-modal {
  background: #fff;
  border-color: rgba(0,0,0,0.18);
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}
html[data-theme="light"] .lv-legend-modal-title { color: var(--lv-red); }
html[data-theme="light"] .lv-legend-modal-header { border-bottom-color: rgba(0,0,0,0.10); }
html[data-theme="light"] .lv-legend-modal-close { background: rgba(0,0,0,0.06); color: var(--lv-muted); }
html[data-theme="light"] .lv-legend-row,
html[data-theme="light"] .lv-legend-row b { color: var(--lv-text); }
html[data-theme="light"] .lv-legend-desc    { color: var(--lv-muted); }
html[data-theme="light"] .lv-legend-dot.match    { background: linear-gradient(135deg, #6b9a4d, #8bb86a); }
html[data-theme="light"] .lv-legend-dot.ai-ok    { background: linear-gradient(135deg, #4087a6, #5ca6c7); }
html[data-theme="light"] .lv-legend-dot.medium   { background: linear-gradient(135deg, #d97706, #f59e0b); }
html[data-theme="light"] .lv-legend-dot.no-match { background: linear-gradient(135deg, #c7312f, #e0524e); }

html[data-theme="light"] .lv-result-vocab-suggest,
html[data-theme="light"] .lv-result-grammar-tip {
  background: rgba(0,0,0,0.03);
  color: var(--lv-text);
}
html[data-theme="light"] .lv-result-vocab-suggest { border-left-color: rgba(64,135,166,0.55); }
html[data-theme="light"] .lv-result-grammar-tip   { border-left-color: rgba(217,119,6,0.6); }
html[data-theme="light"] .lv-suggest-label { color: var(--lv-red); }
html[data-theme="light"] .lv-suggest-chip {
  background: rgba(64,135,166,0.12); color: #2c6481;
  border-color: rgba(64,135,166,0.45);
}
html[data-theme="light"] .lv-suggest-chip em { color: var(--lv-muted); }

/* Mode selector */
html[data-theme="light"] .lv-mode-btn {
  background: var(--ytt-bg-hover);
  border-color: var(--lv-border);
  color: var(--lv-muted);
}
html[data-theme="light"] .lv-mode-btn:hover {
  border-color: rgba(199,49,47,0.40);
  color: var(--lv-text);
}
html[data-theme="light"] .lv-mode-btn.active {
  border-color: var(--lv-gold);
  background: rgba(199,49,47,0.10);
  color: var(--lv-gold);
}

/* Next button, mode badge, history review/delete */
html[data-theme="light"] .lv-next-btn {
  background: var(--ytt-bg-hover);
  border-color: var(--lv-border);
  color: var(--lv-text);
}
html[data-theme="light"] .lv-next-btn:hover {
  background: rgba(199,49,47,0.10);
  border-color: rgba(199,49,47,0.32);
  color: var(--lv-gold);
}
html[data-theme="light"] .lv-mode-badge {
  background: rgba(199,49,47,0.12);
  color: var(--lv-gold);
}
html[data-theme="light"] .lv-hist-review-btn {
  background: var(--ytt-bg-card);
  border-color: var(--lv-border);
  color: var(--lv-muted);
}
html[data-theme="light"] .lv-hist-review-btn:hover {
  border-color: rgba(199,49,47,0.32);
  color: var(--lv-gold);
}
html[data-theme="light"] .lv-hist-del-btn {
  color: var(--ytt-text-3);
}
html[data-theme="light"] .lv-hist-del-btn:hover {
  border-color: rgba(199,49,47,0.40);
  color: var(--lv-red);
  background: rgba(199,49,47,0.08);
}

/* Result summary sidebar */
html[data-theme="light"] .lv-result-summary {
  background: var(--lv-surface);
  border-color: var(--lv-border);
  box-shadow: var(--ytt-shadow-card);
}
html[data-theme="light"] .lv-result-summary h3 {
  color: var(--lv-muted);
}
html[data-theme="light"] .lv-summary-stat {
  color: var(--lv-text);
  border-bottom-color: var(--lv-border);
}
html[data-theme="light"] .lv-summary-stat.pending {
  color: var(--lv-amber);
}
html[data-theme="light"] .lv-result-ai-note {
  background: rgba(184,132,47,0.06);
  border-color: rgba(184,132,47,0.24);
  color: var(--lv-muted);
}

/* AI grade section */
html[data-theme="light"] .lv-ai-grade-section {
  background: var(--lv-surface);
  border-color: rgba(199,49,47,0.20);
  box-shadow: var(--ytt-shadow-card);
}
html[data-theme="light"] .lv-ai-score {
  color: var(--lv-gold);
}
html[data-theme="light"] .lv-ai-summary {
  color: var(--lv-muted);
}
html[data-theme="light"] .lv-vocab-label {
  color: var(--lv-muted);
}
html[data-theme="light"] .lv-vocab-chip {
  background: rgba(199,49,47,0.10);
  border-color: rgba(199,49,47,0.30);
  color: var(--lv-gold);
}
html[data-theme="light"] .lv-vocab-chip:hover {
  background: rgba(199,49,47,0.20);
}
html[data-theme="light"] .lv-vocab-chip-wrap {
  border-color: rgba(199,49,47,0.30);
}
html[data-theme="light"] .lv-vocab-chip-wrap:hover {
  border-color: rgba(199,49,47,0.50);
  box-shadow: 0 0 8px rgba(199,49,47,0.15);
}
html[data-theme="light"] .lv-vocab-save-btn {
  background: rgba(199,49,47,0.18);
  color: var(--lv-gold);
}
html[data-theme="light"] .lv-vocab-save-btn:hover {
  background: rgba(199,49,47,0.32);
}
html[data-theme="light"] .lv-btn-grade {
  background: linear-gradient(135deg, rgba(199,49,47,0.20) 0%, rgba(199,49,47,0.08) 100%);
  border-color: rgba(199,49,47,0.40);
  color: var(--lv-gold);
  box-shadow: 0 2px 0 rgba(199,49,47,0.22), 0 3px 10px rgba(199,49,47,0.10);
}
html[data-theme="light"] .lv-btn-grade:active {
  box-shadow: 0 1px 0 rgba(199,49,47,0.22);
}

/* Score ring */
html[data-theme="light"] .lv-score-ring-bg {
  stroke: var(--lv-border);
}
html[data-theme="light"] .lv-score-ring-fill {
  stroke: var(--lv-gold);
}
html[data-theme="light"] .lv-score-ring-label {
  color: var(--lv-muted);
}

/* AI feedback rows result list */
html[data-theme="light"] .lv-result-ai-feedback.correct {
  background: rgba(107,154,77,0.10);
  color: var(--lv-green);
}
html[data-theme="light"] .lv-result-ai-feedback.incorrect {
  background: rgba(199,49,47,0.10);
  color: var(--lv-red);
}
html[data-theme="light"] .lv-result-correction {
  color: var(--lv-gold);
}

/* Grading loader */
html[data-theme="light"] .lv-grading-loader {
  background: rgba(199,49,47,0.06);
  border-color: rgba(199,49,47,0.30);
}
html[data-theme="light"] .lv-grading-spinner {
  border-color: rgba(199,49,47,0.20);
  border-top-color: var(--lv-gold);
}
html[data-theme="light"] .lv-grading-text {
  color: var(--lv-text);
}
html[data-theme="light"] .lv-grading-text span {
  color: var(--lv-gold);
}

/* Community Answers box */
html[data-theme="light"] .lv-ca-box {
  background: var(--ytt-bg-hover);
  border-color: var(--lv-border);
}
html[data-theme="light"] .lv-ca-title {
  color: var(--lv-muted);
}
html[data-theme="light"] .lv-ca-item {
  border-bottom-color: var(--lv-border);
}
html[data-theme="light"] .lv-ca-answer {
  color: var(--lv-gold);
}
html[data-theme="light"] .lv-ca-explain {
  color: var(--lv-text);
}
html[data-theme="light"] .lv-ca-meta,
html[data-theme="light"] .lv-ca-vote-info {
  color: var(--ytt-text-3);
}
html[data-theme="light"] .lv-ca-loading,
html[data-theme="light"] .lv-ca-empty {
  color: var(--lv-muted);
}
html[data-theme="light"] .lv-ca-vote-btn {
  background: var(--ytt-bg-card);
  border-color: var(--lv-border);
  color: var(--lv-muted);
}
html[data-theme="light"] .lv-ca-vote-btn:hover {
  border-color: rgba(199,49,47,0.40);
  color: var(--lv-gold);
  background: rgba(199,49,47,0.08);
}
html[data-theme="light"] .lv-ca-vote-btn.voted {
  border-color: rgba(107,154,77,0.50);
  color: var(--lv-green);
  background: rgba(107,154,77,0.10);
}
html[data-theme="light"] .lv-ca-own {
  background: rgba(199,49,47,0.06);
  border-left-color: rgba(199,49,47,0.50);
}
html[data-theme="light"] .lv-ca-own-badge {
  color: var(--lv-gold);
  background: rgba(199,49,47,0.12);
  border-color: rgba(199,49,47,0.32);
}
html[data-theme="light"] .lv-tts-btn {
  background: var(--ytt-bg-card);
  border-color: var(--lv-border);
  color: var(--lv-muted);
}
html[data-theme="light"] .lv-tts-btn:hover {
  background: rgba(199,49,47,0.12);
  border-color: rgba(199,49,47,0.40);
  color: var(--lv-gold);
}

/* Celebrate modal */
html[data-theme="light"] .lv-celebrate-overlay {
  background: rgba(58,61,63,0.35);
}
html[data-theme="light"] .lv-celebrate-box {
  background: linear-gradient(135deg, #FFFFFF 0%, #F3F0FC 100%);
  border-color: rgba(199,49,47,0.35);
  box-shadow: 0 20px 60px rgba(58,61,63,0.20), 0 0 0 1px rgba(199,49,47,0.12);
}
html[data-theme="light"] .lv-celebrate-score,
html[data-theme="light"] .lv-cel-hanzi {
  color: var(--lv-gold);
  text-shadow: 0 0 12px rgba(199,49,47,0.30);
}
html[data-theme="light"] .lv-celebrate-msg {
  color: var(--lv-text);
}
html[data-theme="light"] .lv-celebrate-bar {
  background: var(--ytt-bg-hover);
}

/* Next topics recommendation */
html[data-theme="light"] .lv-next-topics {
  border-top-color: var(--lv-border);
}
html[data-theme="light"] .lv-next-title {
  color: var(--lv-gold);
}
html[data-theme="light"] .lv-next-card {
  background: var(--lv-surface);
  border-color: var(--lv-border);
}
html[data-theme="light"] .lv-next-card:hover {
  background: rgba(199,49,47,0.06);
  border-color: rgba(199,49,47,0.30);
}
html[data-theme="light"] .lv-next-card-icon {
  background: rgba(199,49,47,0.10);
}
html[data-theme="light"] .lv-next-card-name {
  color: var(--lv-text);
}
html[data-theme="light"] .lv-next-card-meta,
html[data-theme="light"] .lv-next-card-arrow {
  color: var(--lv-muted);
}
html[data-theme="light"] .lv-next-same-badge {
  background: rgba(64,135,166,0.12);
  color: var(--lv-blue);
}

/* Vocab popover */
html[data-theme="light"] .lv-vocab-popover {
  background: var(--lv-surface);
  border-color: rgba(199,49,47,0.35);
  box-shadow: 0 8px 32px rgba(58,61,63,0.22), 0 0 0 1px rgba(199,49,47,0.10);
}
html[data-theme="light"] .lv-vp-tts {
  background: rgba(199,49,47,0.12);
  border-color: rgba(199,49,47,0.28);
}
html[data-theme="light"] .lv-vp-tts:hover {
  background: rgba(199,49,47,0.22);
}
html[data-theme="light"] .lv-vp-word {
  color: var(--lv-gold);
}
html[data-theme="light"] .lv-vp-dict {
  background: rgba(64,135,166,0.10);
  border-color: rgba(64,135,166,0.35);
  color: var(--lv-blue);
}
html[data-theme="light"] .lv-vp-dict:hover {
  background: rgba(64,135,166,0.18);
}
html[data-theme="light"] .lv-vp-save {
  background: rgba(199,49,47,0.10);
  border-color: rgba(199,49,47,0.32);
  color: var(--lv-gold);
}
html[data-theme="light"] .lv-vp-save:hover {
  background: rgba(199,49,47,0.20);
}

/* Viết Văn AI — launch card, prompt card, editor */
html[data-theme="light"] .lv-vv-launch-card {
  background: linear-gradient(135deg, rgba(64,135,166,0.08) 0%, rgba(103,58,183,0.06) 100%);
  border-color: rgba(64,135,166,0.22);
}
html[data-theme="light"] .lv-vv-launch-title {
  color: var(--lv-text);
}
html[data-theme="light"] .lv-vv-launch-desc {
  color: var(--lv-muted);
}
html[data-theme="light"] .lv-file-upload-btn {
  background: rgba(199,49,47,0.08);
  border-color: rgba(199,49,47,0.30);
  color: var(--lv-gold);
}
html[data-theme="light"] .lv-file-upload-btn:hover {
  background: rgba(199,49,47,0.15);
}
html[data-theme="light"] .lv-file-name {
  color: var(--lv-muted);
}

html[data-theme="light"] .lv-vv-prompt-card {
  background: linear-gradient(135deg, #FFFFFF 0%, #F8F5FF 100%);
  border-color: rgba(199,49,47,0.30);
  box-shadow: 0 4px 0 rgba(58,61,63,0.10), 0 6px 18px rgba(58,61,63,0.08), inset 0 1px 0 rgba(199,49,47,0.10);
}
html[data-theme="light"] .lv-vv-prompt-header {
  background: linear-gradient(90deg, rgba(199,49,47,0.08), transparent);
  border-bottom-color: rgba(199,49,47,0.20);
}
html[data-theme="light"] .lv-vv-prompt-title {
  color: var(--lv-gold);
}
html[data-theme="light"] .lv-vv-prompt-toggle {
  color: var(--lv-muted);
}
html[data-theme="light"] .lv-vv-prompt-body::-webkit-scrollbar-thumb {
  background: rgba(199,49,47,0.30);
}
html[data-theme="light"] .lv-vv-prompt-vi {
  color: var(--lv-text);
}
html[data-theme="light"] .lv-vv-prompt-zh {
  color: #a82929;
  background: rgba(199,49,47,0.06);
  border-left-color: rgba(199,49,47,0.40);
}
html[data-theme="light"] .lv-vv-vocab-label {
  color: var(--lv-muted);
}
html[data-theme="light"] .lv-vv-vocab-chip {
  background: rgba(64,135,166,0.10);
  border-color: rgba(64,135,166,0.28);
  color: var(--lv-blue);
}
/* [v13.80] Light mode cho chip Mẫu câu + Ngữ pháp (thay override grammar-row/structure/punct/suggested-len đã gỡ) */
html[data-theme="light"] .lv-vv-phrase-chip { background: rgba(0,105,92,0.08); border-color: rgba(0,105,92,0.25); }
html[data-theme="light"] .lv-vv-phrase-chip b { color: #00695c; }
html[data-theme="light"] .lv-vv-phrase-chip i { color: var(--lv-muted); }
html[data-theme="light"] .lv-vv-gram-chip { background: rgba(123,49,140,0.08); border-color: rgba(123,49,140,0.28); }
html[data-theme="light"] .lv-vv-gram-chip b { color: #7b2d8b; }
html[data-theme="light"] .lv-vv-gram-chip i { color: var(--lv-muted); }

/* VV Editor */
html[data-theme="light"] .lv-vv-editor {
  background: linear-gradient(160deg, #FFFFFF 0%, #F8F5FF 100%);
  border-color: var(--lv-border);
  border-bottom-color: rgba(64,135,166,0.50);
  color: var(--lv-text);
  -webkit-text-fill-color: var(--lv-text);
  caret-color: var(--lv-blue);
  box-shadow: 0 2px 10px rgba(58,61,63,0.08);
}
html[data-theme="light"] .lv-vv-editor:empty::before {
  color: var(--ytt-text-3);
}
html[data-theme="light"] .lv-vv-editor:focus {
  border-color: rgba(64,135,166,0.65);
  box-shadow: 0 0 0 3px rgba(64,135,166,0.12), 0 4px 14px rgba(58,61,63,0.10);
}
html[data-theme="light"] .lv-vv-charcount {
  background: var(--ytt-bg-hover);
  color: var(--lv-muted);
}
/* VV Result card + breakdown */
html[data-theme="light"] .lv-vv-result-card {
  background: linear-gradient(135deg, #FFFFFF 0%, #F3F0FC 100%);
  border-color: var(--lv-border);
  box-shadow: var(--ytt-shadow-card);
}
html[data-theme="light"] .lv-vv-score-label {
  color: var(--lv-muted);
}
html[data-theme="light"] .lv-vv-bd-label {
  color: var(--lv-text);
}
html[data-theme="light"] .lv-vv-bd-bar-wrap {
  background: var(--ytt-bg-hover);
}
html[data-theme="light"] .lv-vv-bd-score {
  color: var(--lv-blue);
}
html[data-theme="light"] .lv-vv-bd-fb {
  color: var(--lv-muted);
}
html[data-theme="light"] .lv-vv-overall {
  background: var(--ytt-bg-hover);
  color: var(--lv-text);
}
html[data-theme="light"] .lv-vv-corr-label {
  color: var(--lv-muted);
}
html[data-theme="light"] .lv-vv-corr-orig {
  background: rgba(199,49,47,0.10);
  color: var(--lv-red);
}
html[data-theme="light"] .lv-vv-corr-fix {
  background: rgba(107,154,77,0.12);
  color: var(--lv-green);
}
html[data-theme="light"] .lv-vv-corr-reason {
  color: var(--ytt-text-3);
}
html[data-theme="light"] .lv-vv-sect-title {
  color: var(--lv-text);
  border-bottom-color: var(--lv-border);
}
html[data-theme="light"] .lv-vv-punct-review {
  background: rgba(184,132,47,0.06);
  border-color: rgba(184,132,47,0.18);
}
html[data-theme="light"] .vv-punct-good {
  background: rgba(107,154,77,0.16);
  color: var(--lv-green);
}
html[data-theme="light"] .vv-punct-mid {
  background: rgba(184,132,47,0.18);
  color: var(--lv-amber-dark);
}
html[data-theme="light"] .vv-punct-bad {
  background: rgba(199,49,47,0.16);
  color: var(--lv-red);
}
html[data-theme="light"] .lv-vv-punct-issues {
  color: var(--lv-muted);
}
html[data-theme="light"] .lv-vv-register-review {
  background: rgba(58,61,63,0.06);
  border-color: rgba(58,61,63,0.18);
}
html[data-theme="light"] .lv-vv-spoken {
  background: rgba(199,49,47,0.10);
  color: var(--lv-red);
}
html[data-theme="light"] .lv-vv-written {
  background: rgba(107,154,77,0.12);
  color: var(--lv-green);
}
html[data-theme="light"] .lv-vv-reg-reason,
html[data-theme="light"] .lv-vv-acceptable {
  color: var(--lv-muted);
}

/* VV Draft banner */
html[data-theme="light"] .vv-draft-banner {
  background: linear-gradient(135deg, rgba(184,132,47,0.10), rgba(146,103,10,0.06));
  border-color: rgba(184,132,47,0.35);
  box-shadow: 0 2px 8px rgba(58,61,63,0.08);
}
html[data-theme="light"] .vv-draft-title {
  color: var(--lv-text);
}
html[data-theme="light"] .vv-draft-title strong {
  color: var(--lv-amber-dark);
}
html[data-theme="light"] .vv-draft-meta {
  color: var(--lv-muted);
}
html[data-theme="light"] .vv-draft-resume {
  background: linear-gradient(135deg, rgba(184,132,47,0.25), rgba(146,103,10,0.20));
  border-color: rgba(184,132,47,0.45);
  color: var(--lv-amber-dark);
}
html[data-theme="light"] .vv-draft-resume:hover {
  background: linear-gradient(135deg, rgba(184,132,47,0.40), rgba(146,103,10,0.35));
}
html[data-theme="light"] .vv-draft-del {
  color: var(--ytt-text-3);
}
html[data-theme="light"] .vv-draft-del:hover {
  color: var(--lv-red);
  background: rgba(199,49,47,0.10);
}

/* History badges (type) */
html[data-theme="light"] .lv-hist-type-topic {
  background: rgba(64,135,166,0.12);
  color: var(--lv-blue);
}
html[data-theme="light"] .lv-hist-type-custom {
  background: rgba(184,132,47,0.14);
  color: var(--lv-amber-dark);
}
html[data-theme="light"] .lv-hist-type-vietvan {
  background: rgba(58,61,63,0.14);
  color: #6d28d9;
}

/* Highlight popup (Sprint 4) */
html[data-theme="light"] #lv-hl-popup {
  background: rgba(255,255,255,0.96);
  border-color: var(--lv-border);
  box-shadow: 0 8px 28px rgba(58,61,63,0.20), 0 2px 6px rgba(58,61,63,0.10);
}
html[data-theme="light"] .lv-hl-popup-sep {
  background: var(--lv-border);
}
html[data-theme="light"] .lv-hl-pop-btn {
  color: var(--lv-text);
}
html[data-theme="light"] .lv-hl-pop-btn:hover {
  background: var(--ytt-bg-hover);
  color: var(--lv-gold);
}
html[data-theme="light"] .lv-hl-pop-color {
  border-color: rgba(58,61,63,0.20);
}
html[data-theme="light"] .lv-hl-pop-color:hover {
  border-color: rgba(58,61,63,0.50);
}
html[data-theme="light"] mark.lv-hl-strike {
  text-decoration-color: rgba(58,61,63,0.50);
  color: var(--lv-muted);
}

/* Progress bar track */
html[data-theme="light"] .lv-progress-track {
  background: var(--ytt-bg-hover);
}
html[data-theme="light"] .lv-progress-fill {
  background: linear-gradient(90deg, #6b9a4d, #66bb6a);
  box-shadow: 0 0 6px rgba(107,154,77,0.30);
}

/* Practice header border */
html[data-theme="light"] .lv-practice-header,
html[data-theme="light"] .lv-history-topbar,
html[data-theme="light"] .lv-setup-footer {
  border-color: var(--lv-border);
}
html[data-theme="light"] .lv-tips-sep {
  background: var(--lv-border);
}
html[data-theme="light"] .lv-tips-header {
  color: var(--lv-muted);
}

/* ═══════════════════════════════════════════════════════════════════
   S52.B — Earthy palette diversification overlay (light mode)
   Phân màu rõ rệt cho buttons + accents để có điểm nhấn:
     Brick    → primary action (Bắt đầu / Kiểm tra alternative)
     Honey    → hint / warning (Gợi ý)
     Sage     → success / check (Kiểm tra)
     Petrol   → info / feedback box
     Blush    → soft surfaces
   ═══════════════════════════════════════════════════════════════════ */

/* Body background — cream warm thay tím nhạt */
html[data-theme="light"] body {
  background: #fdf6f3;
}

/* Setup tabs — diversify: brick / honey / petrol (3 tabs khác màu khi active) */
html[data-theme="light"] .lv-tab-btn[data-tab="topic"].active {
  background: linear-gradient(135deg, rgba(199,49,47,0.20) 0%, rgba(199,49,47,0.08) 100%);
  color: #c7312f;
  box-shadow: 0 1px 4px rgba(199,49,47,0.18), inset 0 1px 0 rgba(255,255,255,0.5);
}
html[data-theme="light"] .lv-tab-btn[data-tab="custom"].active {
  background: linear-gradient(135deg, rgba(184,132,47,0.20) 0%, rgba(184,132,47,0.08) 100%);
  color: #b8842f;
  box-shadow: 0 1px 4px rgba(184,132,47,0.18), inset 0 1px 0 rgba(255,255,255,0.5);
}
html[data-theme="light"] .lv-tab-btn[data-tab="viet-van"].active {
  background: linear-gradient(135deg, rgba(64,135,166,0.20) 0%, rgba(64,135,166,0.08) 100%);
  color: #4087a6;
  box-shadow: 0 1px 4px rgba(64,135,166,0.18), inset 0 1px 0 rgba(255,255,255,0.5);
}

/* Action row — 3 buttons khác màu rõ rệt */
/* Gợi ý → honey gradient (warning/tip) */
html[data-theme="light"] .lv-btn-hint {
  background: linear-gradient(135deg, #d4a574 0%, #b8842f 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 3px 10px rgba(212,165,116,0.32) !important;
}
html[data-theme="light"] .lv-btn-hint:hover {
  background: linear-gradient(135deg, #b8842f 0%, #92670a 100%) !important;
  filter: brightness(1.04);
}

/* Làm lại → slate outline (neutral) */
html[data-theme="light"] .lv-btn-reset {
  background: #ffffff !important;
  border: 1.5px solid #5e6266 !important;
  color: #3a3d3f !important;
  box-shadow: 0 1px 3px rgba(58,61,63,0.10) !important;
}
html[data-theme="light"] .lv-btn-reset:hover {
  background: #fbeae5 !important;
  border-color: #c7312f !important;
  color: #c7312f !important;
}

/* Kiểm tra → sage green (success/check semantic) */
html[data-theme="light"] .lv-btn-check {
  background: linear-gradient(135deg, #9ab87a 0%, #6b9a4d 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 3px 10px rgba(154,184,122,0.32) !important;
}
html[data-theme="light"] .lv-btn-check:hover {
  background: linear-gradient(135deg, #6b9a4d 0%, #4a6b30 100%) !important;
  filter: brightness(1.04);
}

/* Bắt đầu luyện viết (primary CTA) → brick gradient — main accent */
html[data-theme="light"] .lv-btn-primary {
  background: linear-gradient(135deg, #c7312f 0%, #a82929 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 3px 10px rgba(199,49,47,0.30) !important;
}
html[data-theme="light"] .lv-btn-primary:hover {
  filter: brightness(1.04);
  box-shadow: 0 4px 14px rgba(199,49,47,0.42) !important;
}

/* AI result box (Cột phải) — petrol accent thay brick */
html[data-theme="light"] .lv-ai-result {
  background: linear-gradient(160deg, #ffffff 0%, #e6eef4 100%);
  border-color: rgba(64,135,166,0.30);
  border-top: 3px solid #4087a6;
  box-shadow: 0 2px 10px rgba(64,135,166,0.10);
}
html[data-theme="light"] .lv-ai-placeholder i {
  color: #4087a6;
  opacity: 0.55;
}

/* Tier 1 feedback — đa dạng */
html[data-theme="light"] .lv-tier1-result.perfect {
  background: linear-gradient(135deg, rgba(154,184,122,0.22) 0%, rgba(107,154,77,0.10) 100%);
  border-color: #6b9a4d;
}
html[data-theme="light"] .lv-tier1-result.good,
html[data-theme="light"] .lv-tier1-medium {
  background: linear-gradient(135deg, rgba(212,165,116,0.22) 0%, rgba(184,132,47,0.10) 100%);
  border-color: #b8842f;
}
html[data-theme="light"] .lv-tier1-fail {
  background: linear-gradient(135deg, rgba(243,182,182,0.42) 0%, rgba(199,49,47,0.10) 100%);
  border-color: #c7312f;
}
html[data-theme="light"] .lv-tier1-zh,
html[data-theme="light"] .lv-result-item-correct {
  color: #c7312f;
  font-weight: 800;
}

/* Result stat cards (kết quả cuối bài) — 4 cards 4 màu */
html[data-theme="light"] .lv-result-stats-grid .lv-stat-card:nth-child(1) {
  background: linear-gradient(160deg, #fbeae5 0%, #f3b6b6 100%);
  border-color: #c7312f;
}
html[data-theme="light"] .lv-result-stats-grid .lv-stat-card:nth-child(1) .lv-stat-val {
  color: #c7312f;
  text-shadow: none;
}
html[data-theme="light"] .lv-result-stats-grid .lv-stat-card:nth-child(2) {
  background: linear-gradient(160deg, #e6eef4 0%, #b8d4e0 100%);
  border-color: #4087a6;
}
html[data-theme="light"] .lv-result-stats-grid .lv-stat-card:nth-child(2) .lv-stat-val {
  color: #2a5a73;
  text-shadow: none;
}
html[data-theme="light"] .lv-result-stats-grid .lv-stat-card:nth-child(3) {
  background: linear-gradient(160deg, #fdf2e0 0%, #e8c4b8 100%);
  border-color: #b8842f;
}
html[data-theme="light"] .lv-result-stats-grid .lv-stat-card:nth-child(3) .lv-stat-val {
  color: #92670a;
  text-shadow: none;
}
html[data-theme="light"] .lv-result-stats-grid .lv-stat-card:nth-child(4) {
  background: linear-gradient(160deg, #e9f0e0 0%, #c4d4ad 100%);
  border-color: #6b9a4d;
}
html[data-theme="light"] .lv-result-stats-grid .lv-stat-card:nth-child(4) .lv-stat-val {
  color: #4a6b30;
  text-shadow: none;
}

/* Score ring — brick→honey→sage progress */
html[data-theme="light"] .lv-score-ring-fill.score-green { stroke: #6b9a4d; }
html[data-theme="light"] .lv-score-ring-fill.score-yellow { stroke: #b8842f; }
html[data-theme="light"] .lv-score-ring-fill.score-red { stroke: #c7312f; }

/* Grade button (Nộp bài & Chấm điểm AI) — petrol→brick gradient (premium feel) */
html[data-theme="light"] .lv-btn-grade {
  background: linear-gradient(135deg, #4087a6 0%, #c7312f 100%) !important;
  border: none !important;
  color: #ffffff !important;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0,0,0,0.20);
  box-shadow: 0 3px 10px rgba(64,135,166,0.30) !important;
}
html[data-theme="light"] .lv-btn-grade:hover {
  filter: brightness(1.04);
  box-shadow: 0 4px 14px rgba(199,49,47,0.35) !important;
}

/* Restart vs New topic */
html[data-theme="light"] .lv-btn-restart {
  background: #ffffff !important;
  border: 1.5px solid #5e6266 !important;
  color: #3a3d3f !important;
  box-shadow: 0 1px 3px rgba(58,61,63,0.10) !important;
}
html[data-theme="light"] .lv-btn-restart:hover {
  background: #fbeae5 !important;
  border-color: #c7312f !important;
  color: #c7312f !important;
}
html[data-theme="light"] .lv-btn-new {
  background: linear-gradient(135deg, #c7312f 0%, #a82929 100%) !important;
  border: none !important;
  color: #ffffff !important;
  box-shadow: 0 3px 10px rgba(199,49,47,0.30) !important;
}
html[data-theme="light"] .lv-btn-new:hover {
  filter: brightness(1.04);
}

/* VV Editor — focus state petrol thay vì brick để khác biệt */
html[data-theme="light"] .lv-vv-editor:focus {
  border-color: #4087a6 !important;
  box-shadow: 0 0 0 3px rgba(64,135,166,0.15), 0 2px 10px rgba(58,61,63,0.10);
}

/* VV Submit button — sage gradient (success: nộp bài chấm điểm) */
html[data-theme="light"] .lv-vv-submit-btn {
  background: linear-gradient(135deg, #9ab87a 0%, #6b9a4d 100%);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(154,184,122,0.32);
}
html[data-theme="light"] .lv-vv-submit-btn:hover {
  background: linear-gradient(135deg, #6b9a4d 0%, #4a6b30 100%);
  box-shadow: 0 4px 14px rgba(107,154,77,0.42);
  filter: brightness(1.04);
}

/* VV breakdown bars — petrol (giữ info accent) */
html[data-theme="light"] .lv-vv-bd-bar {
  background: linear-gradient(90deg, #4087a6, #7ba8be);
}
html[data-theme="light"] .lv-vv-bd-score {
  color: #2a5a73;
  font-weight: 800;
}

/* History badges trong screen 4 */
html[data-theme="light"] .lv-hist-type-topic {
  background: linear-gradient(135deg, #b8d4e0 0%, #4087a6 100%);
  color: #ffffff;
}
html[data-theme="light"] .lv-hist-type-custom {
  background: linear-gradient(135deg, #e8c4b8 0%, #b8842f 100%);
  color: #ffffff;
}
html[data-theme="light"] .lv-hist-type-vietvan {
  background: linear-gradient(135deg, #f3b6b6 0%, #c7312f 100%);
  color: #ffffff;
}

/* Progress fill — brick→honey→sage */
html[data-theme="light"] .lv-progress-fill {
  background: linear-gradient(90deg, #c7312f, #d4a574, #6b9a4d);
  box-shadow: 0 0 6px rgba(199,49,47,0.30);
}

/* Question text accent line top — gradient earthy */
html[data-theme="light"] .lv-question-box {
  border-left-width: 4px;
  border-left-color: #c7312f;
}

/* Char count + speak-active glow → honey */
html[data-theme="light"] .lv-speak-toggle.lv-speak-active {
  background: rgba(212,165,116,0.20);
  border-color: rgba(184,132,47,0.50);
  color: #b8842f;
}

/* Vocab popover — Hán tự color đậm */
html[data-theme="light"] .lv-vp-word {
  color: #c7312f;
  font-weight: 800;
}
html[data-theme="light"] .lv-vp-dict {
  background: rgba(64,135,166,0.10);
  border-color: #4087a6;
  color: #4087a6;
}
html[data-theme="light"] .lv-vp-dict:hover {
  background: #4087a6;
  color: #ffffff;
}
html[data-theme="light"] .lv-vp-save {
  background: rgba(212,165,116,0.18);
  border-color: #b8842f;
  color: #b8842f;
}
html[data-theme="light"] .lv-vp-save:hover {
  background: #b8842f;
  color: #ffffff;
}

/* Celebrate modal — brick gold celebration */
html[data-theme="light"] .lv-celebrate-box {
  background: linear-gradient(135deg, #ffffff 0%, #fbeae5 100%);
  border-color: #c7312f;
}
html[data-theme="light"] .lv-celebrate-score {
  color: #c7312f;
  text-shadow: 0 0 12px rgba(199,49,47,0.30);
}
html[data-theme="light"] .lv-celebrate-bar-fill {
  background: linear-gradient(90deg, #c7312f, #d4a574);
}

