*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f5f5f0; color: #1a1a1a; min-height: 100vh; display: flex; align-items: flex-start; justify-content: center; padding: 2rem 1rem; }
.container { width: 100%; max-width: 640px; }
h1 { font-size: 22px; font-weight: 500; margin-bottom: 0.25rem; }
.title-row { display: flex; align-items: center; gap: 10px; margin-bottom: 0.25rem; }
.streak-badge { font-size: 13px; padding: 3px 10px; border-radius: 99px; background: #fff3e0; border: 1px solid #ffb74d; color: #e65100; font-weight: 600; white-space: nowrap; }
.subtitle { font-size: 14px; color: #666; margin-bottom: 1rem; }

/* Tab bar */
.tab-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 1rem; }
.tab-btn { font-size: 12px; padding: 6px 12px; border: 1px solid #ccc; border-radius: 99px; background: #fff; color: #666; cursor: pointer; font-family: inherit; transition: all 0.15s; font-weight: 500; white-space: nowrap; }
.tab-btn:hover { background: #f5f5f5; border-color: #999; }
.tab-btn.active { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Mode toggles */
.mode-row { display: flex; gap: 6px; margin-bottom: 0.75rem; flex-wrap: wrap; }
.mode-btn { font-size: 12px; padding: 4px 12px; border-radius: 99px; border: 1px solid #ccc; background: transparent; color: #666; cursor: pointer; transition: all 0.15s; font-family: inherit; }
.mode-btn:hover { background: #eee; }
.mode-btn.active { background: #e3e0ff; border-color: #7c6bc4; color: #4a3a8a; font-weight: 500; }
.mode-btn.active-review { background: #fce4ec; border-color: #e57373; color: #b71c1c; font-weight: 500; }

/* Filters & header */
.qz-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; flex-wrap: wrap; gap: 8px; }
.qz-progress { font-size: 13px; color: #666; }
.diff-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.diff-btn { font-size: 12px; padding: 4px 12px; border-radius: 99px; border: 1px solid #ccc; background: transparent; color: #666; cursor: pointer; transition: all 0.15s; font-family: inherit; }
.diff-btn:hover { background: #eee; }
.diff-btn.active-all { background: #e8e8e8; border-color: #999; color: #1a1a1a; font-weight: 500; }
.diff-btn.active-easy { background: #e1f5ee; border-color: #1d9e75; color: #0f6e56; font-weight: 500; }
.diff-btn.active-medium { background: #faeeda; border-color: #ba7517; color: #854f0b; font-weight: 500; }
.diff-btn.active-hard { background: #faece7; border-color: #d85a30; color: #993c1d; font-weight: 500; }

/* Tarea filters */
.tarea-row { display: flex; gap: 6px; margin-bottom: 0.75rem; flex-wrap: wrap; }
.tarea-btn { font-size: 11px; padding: 3px 10px; border-radius: 99px; border: 1px solid #ccc; background: transparent; color: #666; cursor: pointer; transition: all 0.15s; font-family: inherit; }
.tarea-btn:hover { background: #eee; }
.tarea-btn.active { background: #e8f0fe; border-color: #4285f4; color: #1a73e8; font-weight: 500; }

.source-tag { font-size: 11px; color: #999; text-align: right; margin-bottom: 0.4rem; font-style: italic; }
.progress-bar-wrap { background: #e0e0e0; border-radius: 99px; height: 6px; margin-bottom: 1.2rem; overflow: hidden; }
.progress-bar-fill { height: 6px; background: #1d9e75; border-radius: 99px; transition: width 0.3s; }

/* Timer */
.timer-bar { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 0.75rem; font-size: 14px; font-weight: 600; color: #1a1a1a; }
.timer-bar.warn { color: #e65100; }
.timer-bar.danger { color: #c62828; }
.timer-bar svg { width: 18px; height: 18px; }

/* Card */
.card { background: #fff; border: 1px solid #e0e0e0; border-radius: 12px; padding: 1.5rem; margin-bottom: 1rem; }
.diff-badge { display: inline-block; font-size: 11px; padding: 2px 10px; border-radius: 99px; margin-bottom: 0.75rem; font-weight: 500; }
.badge-easy { background: #e1f5ee; color: #0f6e56; }
.badge-medium { background: #faeeda; color: #854f0b; }
.badge-hard { background: #faece7; color: #993c1d; }

/* Mastery badge */
.mastery-badge { display: inline-block; font-size: 10px; padding: 2px 8px; border-radius: 99px; margin-left: 6px; font-weight: 500; }
.mastery-new { background: #f0f0f0; color: #999; }
.mastery-learning { background: #fce4ec; color: #c62828; }
.mastery-familiar { background: #e3f2fd; color: #1565c0; }
.mastery-mastered { background: #e1f5ee; color: #0f6e56; }

/* Tarea tag on card */
.tarea-tag { display: inline-block; font-size: 10px; padding: 2px 8px; border-radius: 99px; margin-left: 6px; font-weight: 500; background: #e8f0fe; color: #1a73e8; }

/* Word display */
.qz-word-row { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 0.25rem; }
.qz-word { font-size: 32px; font-weight: 500; color: #1a1a1a; text-align: center; }
.audio-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid #ccc; background: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.15s; flex-shrink: 0; }
.audio-btn:hover { background: #f0f0f0; border-color: #999; }
.audio-btn svg { width: 18px; height: 18px; fill: #666; }

.qz-context { font-size: 13px; color: #888; font-style: italic; text-align: center; margin-bottom: 1.5rem; line-height: 1.5; }
.qz-options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 1.25rem; }
.qz-opt { background: #fff; border: 1px solid #ccc; border-radius: 8px; padding: 12px 16px; font-size: 15px; color: #1a1a1a; cursor: pointer; text-align: left; transition: background 0.12s, border-color 0.12s; font-family: inherit; }
.qz-opt:hover:not(.disabled) { background: #f5f5f5; border-color: #999; }
.qz-opt.correct { border-color: #1d9e75; background: #e1f5ee; color: #0f6e56; }
.qz-opt.wrong { border-color: #d85a30; background: #faece7; color: #993c1d; }
.qz-opt.disabled { cursor: default; }

.qz-feedback { font-size: 14px; text-align: center; min-height: 22px; margin-bottom: 0.5rem; font-weight: 500; }
.qz-feedback.ok { color: #0f6e56; }
.qz-feedback.bad { color: #993c1d; }

.qz-example { font-size: 13px; text-align: center; color: #555; margin-bottom: 1rem; line-height: 1.6; padding: 8px 12px; background: #fafaf5; border-radius: 8px; }
.qz-example strong { color: #1a1a1a; }

.qz-next { display: flex; justify-content: center; }
.qz-next button { font-size: 14px; padding: 9px 28px; border-radius: 8px; border: 1px solid #ccc; background: transparent; color: #1a1a1a; cursor: pointer; font-family: inherit; transition: background 0.12s; }
.qz-next button:hover { background: #f0f0f0; }

/* Done screen */
.qz-done { text-align: center; padding: 2rem 0; }
.qz-done .big { font-size: 32px; font-weight: 500; margin-bottom: 0.5rem; }
.qz-done .sub { font-size: 15px; color: #666; margin-bottom: 1rem; }
.restart-btn { font-size: 14px; padding: 9px 28px; border-radius: 8px; border: 1px solid #ccc; background: transparent; color: #1a1a1a; cursor: pointer; font-family: inherit; transition: background 0.12s; margin: 4px; }
.restart-btn:hover { background: #f0f0f0; }
.restart-btn.review-btn { border-color: #e57373; color: #b71c1c; }
.restart-btn.review-btn:hover { background: #fce4ec; }

/* Mock exam score card */
.exam-result { margin-top: 1rem; padding: 1rem; background: #f5f5f0; border-radius: 8px; }
.exam-result .er-row { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; }
.exam-result .er-label { color: #666; }
.exam-result .er-val { font-weight: 600; }
.exam-pass { color: #0f6e56; font-size: 18px; font-weight: 600; margin-top: 0.75rem; }
.exam-fail { color: #c62828; font-size: 18px; font-weight: 600; margin-top: 0.75rem; }

/* Session stats */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 1rem; }
.stat-card { background: #f5f5f0; border-radius: 8px; padding: 0.75rem; text-align: center; }
.stat-num { font-size: 22px; font-weight: 500; }
.stat-label { font-size: 12px; color: #666; margin-top: 2px; }

/* Dashboard */
.dash-toggle { font-size: 13px; padding: 8px 16px; border-radius: 8px; border: 1px solid #ccc; background: transparent; color: #666; cursor: pointer; font-family: inherit; transition: all 0.15s; width: 100%; margin-top: 0.75rem; }
.dash-toggle:hover { background: #eee; }
.dashboard { background: #fff; border: 1px solid #e0e0e0; border-radius: 12px; padding: 1.5rem; margin-top: 0.75rem; display: none; }
.dashboard.open { display: block; }
.dash-section { margin-bottom: 1.5rem; }
.dash-section:last-child { margin-bottom: 0; }
.dash-title { font-size: 14px; font-weight: 600; margin-bottom: 0.75rem; color: #1a1a1a; }
.dash-subtitle { font-size: 12px; color: #888; margin-bottom: 0.5rem; }

.mastery-bar { display: flex; height: 24px; border-radius: 6px; overflow: hidden; margin-bottom: 0.5rem; }
.mastery-bar div { transition: width 0.3s; }
.mb-mastered { background: #1d9e75; }
.mb-familiar { background: #42a5f5; }
.mb-learning { background: #ef5350; }
.mb-new { background: #e0e0e0; }
.mastery-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11px; color: #666; }
.mastery-legend span::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: middle; }
.legend-mastered::before { background: #1d9e75 !important; }
.legend-familiar::before { background: #42a5f5 !important; }
.legend-learning::before { background: #ef5350 !important; }
.legend-new::before { background: #e0e0e0 !important; }

.weak-list { list-style: none; }
.weak-list li { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid #f0f0f0; font-size: 13px; }
.weak-list li:last-child { border-bottom: none; }
.weak-word { font-weight: 500; }
.weak-acc { color: #993c1d; font-size: 12px; }

.history-row { display: flex; gap: 6px; align-items: flex-end; height: 60px; margin-bottom: 0.5rem; }
.history-bar { flex: 1; border-radius: 4px 4px 0 0; background: #1d9e75; min-height: 2px; transition: height 0.3s; }
.history-bar.empty { background: #e0e0e0; }
.history-labels { display: flex; gap: 6px; font-size: 10px; color: #999; }
.history-labels span { flex: 1; text-align: center; }

.overall-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.ov-card { background: #f5f5f0; border-radius: 8px; padding: 0.75rem; text-align: center; }
.ov-num { font-size: 20px; font-weight: 600; }
.ov-label { font-size: 11px; color: #666; margin-top: 2px; }

.reset-btn { font-size: 11px; color: #999; background: none; border: none; cursor: pointer; margin-top: 1rem; text-decoration: underline; font-family: inherit; }
.reset-btn:hover { color: #c62828; }

/* Writing prompts */
.wp-card { background: #fff; border: 1px solid #e0e0e0; border-radius: 12px; padding: 1.5rem; margin-bottom: 1rem; }
.wp-type { font-size: 11px; padding: 2px 10px; border-radius: 99px; background: #e8f0fe; color: #1a73e8; font-weight: 500; display: inline-block; margin-bottom: 0.75rem; }
.wp-title { font-size: 16px; font-weight: 600; margin-bottom: 0.75rem; }
.wp-prompt { font-size: 14px; line-height: 1.6; color: #333; margin-bottom: 1rem; padding: 12px; background: #fafaf5; border-radius: 8px; border-left: 3px solid #1a73e8; }
.wp-section { margin-bottom: 0.75rem; }
.wp-section-title { font-size: 12px; font-weight: 600; color: #666; margin-bottom: 0.5rem; text-transform: uppercase; letter-spacing: 0.5px; }
.wp-vocab { display: flex; flex-wrap: wrap; gap: 6px; }
.wp-chip { font-size: 12px; padding: 4px 10px; border-radius: 99px; background: #f0f0f0; color: #333; cursor: pointer; transition: all 0.15s; border: 1px solid transparent; }
.wp-chip:hover { background: #e3e0ff; border-color: #7c6bc4; }
.wp-tips { font-size: 13px; color: #555; line-height: 1.6; }
.wp-tips li { margin-bottom: 4px; }
.wp-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.wp-nav button { font-size: 13px; padding: 6px 16px; border-radius: 8px; border: 1px solid #ccc; background: transparent; color: #1a1a1a; cursor: pointer; font-family: inherit; }
.wp-nav button:hover { background: #f0f0f0; }
.wp-counter { font-size: 13px; color: #666; }

/* Mock exam start */
.exam-start { text-align: center; padding: 2rem 0; }
.exam-start .es-title { font-size: 20px; font-weight: 600; margin-bottom: 0.5rem; }
.exam-start .es-desc { font-size: 14px; color: #666; line-height: 1.6; margin-bottom: 1.5rem; }
.exam-start .es-rules { text-align: left; font-size: 13px; color: #555; line-height: 1.8; margin-bottom: 1.5rem; padding: 12px 16px; background: #fafaf5; border-radius: 8px; }
.exam-start .es-rules li { margin-bottom: 2px; }
.exam-start-btn { font-size: 15px; padding: 12px 36px; border-radius: 8px; border: 1px solid #1a1a1a; background: #1a1a1a; color: #fff; cursor: pointer; font-family: inherit; font-weight: 500; transition: background 0.15s; }
.exam-start-btn:hover { background: #333; }

/* Reading/Listening passages */
.passage-card { background: #fff; border: 1px solid #e0e0e0; border-radius: 12px; margin-bottom: 1rem; overflow: hidden; }
.passage-header { padding: 12px 16px; background: #f5f5f0; border-bottom: 1px solid #e0e0e0; display: flex; justify-content: space-between; align-items: center; }
.passage-label { font-size: 12px; font-weight: 600; color: #534AB7; }
.passage-score { font-size: 12px; color: #666; }
.passage-text { padding: 16px; font-size: 14px; line-height: 1.7; color: #333; border-bottom: 1px solid #f0f0f0; }
.passage-text em { color: #666; font-size: 13px; }
.passage-speaker { font-weight: 600; color: #534AB7; }
.pq { padding: 12px 16px; border-bottom: 1px solid #f0f0f0; }
.pq:last-child { border-bottom: none; }
.pq-num { font-size: 12px; font-weight: 600; color: #999; margin-bottom: 4px; }
.pq-text { font-size: 14px; font-weight: 500; margin-bottom: 8px; }
.pq-opts button { display: block; width: 100%; text-align: left; background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; padding: 8px 12px; margin-bottom: 6px; font-size: 13px; color: #1a1a1a; cursor: pointer; font-family: inherit; transition: all 0.12s; }
.pq-opts button:hover:not(.disabled) { background: #f5f5f5; border-color: #999; }
.pq-opts button.correct { background: #e1f5ee; border-color: #1d9e75; color: #0f6e56; }
.pq-opts button.wrong { background: #faece7; border-color: #d85a30; color: #993c1d; }
.pq-opts button.disabled { cursor: default; }
.pq-fb { font-size: 13px; font-weight: 500; margin-top: 6px; min-height: 18px; }
.pq-fb.ok { color: #0f6e56; }
.pq-fb.bad { color: #993c1d; }

/* Section nav */
.section-nav { display: flex; gap: 6px; margin-bottom: 1rem; flex-wrap: wrap; }
.section-btn { font-size: 12px; padding: 4px 12px; border-radius: 99px; border: 1px solid #ccc; background: transparent; color: #666; cursor: pointer; font-family: inherit; }
.section-btn:hover { background: #eee; }
.section-btn.active { background: #e3e0ff; border-color: #7c6bc4; color: #4a3a8a; font-weight: 500; }

/* Oral cards */
.oral-card { background: #fff; border: 1px solid #e0e0e0; border-radius: 12px; padding: 1.5rem; margin-bottom: 1rem; }
.oral-type { font-size: 11px; padding: 2px 10px; border-radius: 99px; background: #e3e0ff; color: #4a3a8a; font-weight: 500; display: inline-block; margin-bottom: 0.75rem; }
.oral-title { font-size: 16px; font-weight: 600; margin-bottom: 0.75rem; }
.oral-prompt { font-size: 14px; line-height: 1.6; color: #333; margin-bottom: 1rem; padding: 12px; background: #fafaf5; border-radius: 8px; border-left: 3px solid #534AB7; }
.oral-bullets { font-size: 13px; color: #555; line-height: 1.7; margin-bottom: 0.75rem; padding-left: 1.25rem; }
.oral-bullets li { margin-bottom: 4px; }
.oral-section-title { font-size: 12px; font-weight: 600; color: #888; margin-bottom: 0.5rem; text-transform: uppercase; letter-spacing: 0.5px; }
.oral-examiner { background: #f9f9f5; border-radius: 8px; padding: 12px; margin-top: 0.75rem; }
.oral-examiner-q { font-size: 13px; color: #555; line-height: 1.6; margin-bottom: 4px; padding-left: 12px; border-left: 2px solid #ddd; }

/* Oral model response */
.oral-model-wrap { margin-top: 1.25rem; }
.oral-model-toggle { width: 100%; padding: 10px 16px; border: 1px dashed #534AB7; border-radius: 8px; background: transparent; color: #534AB7; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all 0.15s; }
.oral-model-toggle:hover { background: #EEEDFE; }
.oral-model-toggle.oral-model-open { border-style: solid; background: #EEEDFE; }
.oral-model { margin-top: 0.75rem; animation: listen-reveal-anim 0.3s ease-out; }
.oral-model-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.oral-model-listen { width: 32px; height: 32px; }
.oral-model-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: #e0e0e0; border-radius: 8px; overflow: hidden; }
@media (max-width: 500px) { .oral-model-cols { grid-template-columns: 1fr; } }
.oral-model-col { background: #fff; padding: 14px 16px; }
.oral-model-text { font-size: 13px; line-height: 1.7; color: #333; }
.oral-model-en { color: #666; }

/* Bookmark/save */
.save-btn { background: none; border: none; font-size: 20px; cursor: pointer; padding: 2px 6px; opacity: 0.3; transition: opacity 0.15s; vertical-align: middle; }
.save-btn:hover { opacity: 0.7; }
.save-btn.saved { opacity: 1; }
.saved-count { font-size: 11px; padding: 2px 8px; border-radius: 99px; background: #fff3e0; color: #e65100; font-weight: 500; margin-left: 6px; }

/* Sentence practice */
.sent-box { background: #EEEDFE; border-radius: 10px; padding: 14px 18px; margin-bottom: 1.25rem; font-size: 16px; line-height: 1.6; color: #333; text-align: center; }
.sent-blank { font-weight: 700; color: #534AB7; border-bottom: 2px dashed #534AB7; padding: 0 4px; }
.expl-box { font-size: 13px; padding: 10px 14px; background: #fafaf5; border-radius: 8px; margin-top: 8px; line-height: 1.6; color: #555; display: none; }
.expl-item { margin-bottom: 4px; }
.expl-correct { color: #0f6e56; font-weight: 600; }
.expl-wrong { color: #999; }

/* Bubble sentence builder */
.bb-card { background: #fff; border: 1px solid #e0e0e0; border-radius: 12px; padding: 1.5rem; margin-bottom: 1rem; }
.bb-hint { font-size: 15px; color: #555; font-style: italic; text-align: center; margin-bottom: 1.25rem; line-height: 1.5; padding: 10px 12px; background: #EEEDFE; border-radius: 8px; }
.bb-progress-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; font-size: 13px; color: #666; }
.bb-score { font-weight: 500; color: #0f6e56; }
.bb-answer { min-height: 56px; border: 2px dashed #ccc; border-radius: 10px; padding: 10px; margin-bottom: 1.25rem; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; transition: border-color 0.2s, background 0.2s; }
.bb-answer.bb-answer-correct { border-color: #1d9e75; background: #e1f5ee; }
.bb-answer.bb-answer-wrong { border-color: #d85a30; background: #faece7; }
.bb-placeholder { font-size: 13px; color: #bbb; font-style: italic; width: 100%; text-align: center; }
.bb-answer-word { font-size: 14px; padding: 6px 14px; border-radius: 99px; border: 1px solid #534AB7; background: #EEEDFE; color: #4a3a8a; cursor: pointer; font-family: inherit; font-weight: 500; transition: all 0.15s; }
.bb-answer-word:hover { background: #d8d5f7; }
.bb-pool { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 1.25rem; }
.bb-bubble { font-size: 14px; padding: 8px 16px; border-radius: 99px; border: 1px solid #ccc; background: #fff; color: #1a1a1a; cursor: pointer; font-family: inherit; font-weight: 500; transition: all 0.15s; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.bb-bubble:hover:not(.bb-used) { background: #f0f0f0; border-color: #999; transform: translateY(-1px); box-shadow: 0 2px 6px rgba(0,0,0,0.1); }
.bb-bubble.bb-used { opacity: 0.3; cursor: default; transform: none; box-shadow: none; }
.bb-actions { display: flex; justify-content: center; margin-bottom: 0.75rem; }
.bb-check-btn { font-size: 14px; padding: 10px 32px; border-radius: 8px; border: 1px solid #1a1a1a; background: #1a1a1a; color: #fff; cursor: pointer; font-family: inherit; font-weight: 500; transition: background 0.15s; }
.bb-check-btn:hover:not(:disabled) { background: #333; }
.bb-check-btn:disabled { opacity: 0.4; cursor: default; }
.bb-feedback { font-size: 15px; text-align: center; min-height: 22px; margin-bottom: 0.75rem; font-weight: 500; }
.bb-ok { color: #0f6e56; }
.bb-bad { color: #993c1d; }
.bb-correct-answer { font-weight: 600; color: #0f6e56; font-style: italic; }
.bb-next-wrap { display: flex; justify-content: center; }

/* Bilingual */
.bi-card { background: #fff; border: 1px solid #e0e0e0; border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
.bi-header { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-bottom: 1px solid #f0f0f0; }
.bi-tag { font-size: 11px; padding: 2px 8px; border-radius: 99px; font-weight: 500; }
.bi-tag-easy { background: #e1f5ee; color: #0f6e56; }
.bi-tag-medium { background: #faeeda; color: #854f0b; }
.bi-tag-hard { background: #faece7; color: #993c1d; }
.bi-cols { display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 500px) { .bi-cols { grid-template-columns: 1fr; } }
.bi-col { padding: 12px 16px; }
.bi-col:first-child { border-right: 1px solid #f0f0f0; }
@media (max-width: 500px) { .bi-col:first-child { border-right: none; border-bottom: 1px solid #f0f0f0; } }
.bi-lang { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: #999; margin-bottom: 6px; }
.bi-word { font-size: 18px; font-weight: 600; color: #1a1a1a; margin-bottom: 4px; }
.bi-trans { font-size: 15px; color: #1a1a1a; font-weight: 500; margin-bottom: 4px; }
.bi-ex { font-size: 13px; color: #666; font-style: italic; line-height: 1.5; }
.bi-pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 1rem; }
.bi-pager button { font-size: 13px; padding: 6px 16px; border-radius: 8px; border: 1px solid #ccc; background: transparent; color: #1a1a1a; cursor: pointer; font-family: inherit; }
.bi-pager button:hover { background: #f0f0f0; }
.bi-pager button:disabled { opacity: 0.4; cursor: default; }
.bi-filters { display: flex; gap: 6px; margin-bottom: 0.75rem; flex-wrap: wrap; }

/* Flashcard */
.fc-card { background: #fff; border: 1px solid #e0e0e0; border-radius: 14px; min-height: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem; cursor: pointer; transition: transform 0.3s, box-shadow 0.15s; position: relative; margin-bottom: 1rem; }
.fc-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.fc-front .fc-word { font-size: 32px; font-weight: 500; margin-bottom: 0.5rem; }
.fc-front .fc-hint { font-size: 13px; color: #999; font-style: italic; }
.fc-back { display: none; text-align: center; }
.fc-back .fc-answer { font-size: 24px; font-weight: 500; color: #0f6e56; margin-bottom: 0.5rem; }
.fc-back .fc-example { font-size: 14px; color: #666; font-style: italic; line-height: 1.5; margin-bottom: 0.75rem; }
.fc-flipped .fc-front { display: none; }
.fc-flipped .fc-back { display: block; }
.fc-badges { position: absolute; top: 12px; left: 12px; display: flex; gap: 4px; }
.fc-save { position: absolute; top: 12px; right: 12px; }
.fc-nav { display: flex; justify-content: center; align-items: center; gap: 16px; }
.fc-nav button { font-size: 14px; padding: 10px 24px; border-radius: 8px; border: 1px solid #ccc; background: transparent; color: #1a1a1a; cursor: pointer; font-family: inherit; }
.fc-nav button:hover { background: #f0f0f0; }
.fc-nav .fc-know { border-color: #1d9e75; color: #0f6e56; }
.fc-nav .fc-know:hover { background: #e1f5ee; }
.fc-nav .fc-dunno { border-color: #d85a30; color: #993c1d; }
.fc-nav .fc-dunno:hover { background: #faece7; }
.fc-counter { font-size: 13px; color: #666; }
.fc-tap { font-size: 12px; color: #bbb; margin-top: 0.5rem; }

/* Due today badge */
.due-badge { font-size: 11px; padding: 2px 8px; border-radius: 99px; background: #e3f2fd; color: #1565c0; font-weight: 500; margin-left: 6px; }

.user-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; font-size: 13px; color: #666; }
.logout-btn { font-size: 12px; padding: 3px 12px; border-radius: 99px; border: 1px solid #ccc; background: transparent; color: #666; cursor: pointer; font-family: inherit; }
.logout-btn:hover { background: #fce4ec; border-color: #e57373; color: #b71c1c; }

/* Guide / Grammar accordion */
.guide-intro { font-size: 13px; color: #666; margin-bottom: 1rem; }
.guide-section { margin-bottom: 8px; }
.guide-toggle { display: flex; justify-content: space-between; align-items: center; width: 100%; text-align: left; border: 1px solid; border-radius: 8px; padding: 10px 14px; font-size: 14px; font-weight: 500; cursor: pointer; font-family: inherit; transition: background 0.15s; }
.guide-toggle.open { border-radius: 8px 8px 0 0; }
.guide-toggle .gt-right { font-size: 12px; font-weight: 400; }
.guide-body { border: 1px solid; border-top: none; border-radius: 0 0 8px 8px; overflow: hidden; }
.guide-row { display: grid; grid-template-columns: 1fr 1fr; padding: 8px 14px; }
.guide-row:nth-child(odd) { background: #fff; }
.guide-row:nth-child(even) { background: #f9f9f5; }
.guide-row:not(:first-child) { border-top: 1px solid #f0f0f0; }
.guide-q { font-size: 13px; color: #888; padding-right: 8px; line-height: 1.45; }
.guide-a { font-size: 13px; font-weight: 500; color: #1a1a1a; line-height: 1.45; }

/* Listening playback */
.listen-controls { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.listen-play-btn { display: inline-flex; align-items: center; padding: 10px 24px; border-radius: 10px; border: 2px solid #534AB7; background: #534AB7; color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all 0.15s; }
.listen-play-btn:hover:not(:disabled) { background: #433aa0; border-color: #433aa0; }
.listen-play-btn:disabled { opacity: 0.6; cursor: default; }
.listen-play-btn.listen-replay { background: transparent; color: #534AB7; font-size: 14px; font-weight: 500; padding: 8px 20px; }
.listen-play-btn.listen-replay:hover:not(:disabled) { background: #e3e0ff; }
.listen-play-btn.listen-playing { background: #e3e0ff; border-color: #7c6bc4; color: #534AB7; }
.listen-count { font-size: 12px; color: #999; }
.listen-pulse { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #534AB7; margin-right: 8px; animation: listen-pulse-anim 1s ease-in-out infinite; }
@keyframes listen-pulse-anim { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(1.3); } }
.listen-transcript-hidden { padding: 16px; text-align: center; background: #fafaf5; border-top: 1px solid #f0f0f0; }
.listen-reveal { animation: listen-reveal-anim 0.4s ease-out; }
@keyframes listen-reveal-anim { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* Conjugation drills */
.conj-prompt { text-align: center; margin-bottom: 0.5rem; }
.conj-verb { font-size: 28px; font-weight: 500; color: #1a1a1a; }
.conj-en { font-size: 14px; color: #888; }
.conj-context { text-align: center; font-size: 15px; color: #555; margin-bottom: 1.5rem; }
.conj-subject { font-weight: 600; color: #534AB7; font-size: 16px; }
.conj-tense { font-style: italic; color: #888; }

/* Gender / Article drills */
.gender-prompt { text-align: center; font-size: 28px; margin-bottom: 0.25rem; margin-top: 0.5rem; }
.gender-noun { font-weight: 600; color: #1a1a1a; }
.gender-opts { display: flex; gap: 16px; justify-content: center; margin-bottom: 1.25rem; }
.gender-btn { font-size: 20px; font-weight: 600; padding: 16px 40px; border-radius: 12px; border: 2px solid #ccc; background: #fff; cursor: pointer; font-family: inherit; transition: all 0.15s; min-width: 100px; }
.gender-el { color: #1565c0; }
.gender-la { color: #c62828; }
.gender-btn:hover:not(.disabled) { transform: translateY(-2px); box-shadow: 0 3px 8px rgba(0,0,0,0.1); }
.gender-el:hover:not(.disabled) { border-color: #1565c0; background: #e3f2fd; }
.gender-la:hover:not(.disabled) { border-color: #c62828; background: #fce4ec; }
.gender-btn.gender-correct { border-color: #1d9e75; background: #e1f5ee; color: #0f6e56; }
.gender-btn.gender-wrong { border-color: #d85a30; background: #faece7; color: #993c1d; }
.gender-btn.disabled { cursor: default; transform: none; box-shadow: none; }

/* Tap-to-translate */
.tt-word { cursor: pointer; position: relative; border-radius: 3px; transition: background 0.1s; }
.tt-word:hover { background: #EEEDFE; }
.tt-tip { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: #1a1a1a; color: #fff; font-size: 12px; padding: 4px 10px; border-radius: 6px; white-space: nowrap; z-index: 20; pointer-events: none; animation: tt-fade 0.15s ease-out; font-style: normal; font-weight: 500; }
.tt-tip::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: #1a1a1a; }
@keyframes tt-fade { from { opacity: 0; transform: translateX(-50%) translateY(4px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* Bubble mode row */
.bb-mode-row { display: flex; gap: 6px; margin-bottom: 0.75rem; }
.bb-hint-label { font-weight: 600; color: #534AB7; font-style: normal; }

/* Lessons - List */
.les-grid { display: flex; flex-direction: column; gap: 12px; }
.les-card { background: #fff; border: 1px solid #e0e0e0; border-radius: 14px; cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; overflow: hidden; }
.les-card:hover { border-color: #bbb; box-shadow: 0 4px 16px rgba(0,0,0,0.08); transform: translateY(-1px); }
.les-card-inner { display: flex; gap: 14px; padding: 16px; align-items: flex-start; }
.les-icon { font-size: 26px; line-height: 1; flex-shrink: 0; width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.les-info { flex: 1; min-width: 0; }
.les-title { font-size: 15px; font-weight: 600; color: #1a1a1a; margin-bottom: 1px; }
.les-sub { font-size: 12px; color: #888; font-style: italic; margin-bottom: 8px; }
.les-progress { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.les-bar { flex: 1; height: 5px; background: #eee; border-radius: 99px; overflow: hidden; }
.les-fill { height: 100%; border-radius: 99px; transition: width 0.3s; }
.les-pct { font-size: 11px; font-weight: 600; min-width: 44px; text-align: right; }
.les-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.les-chip { font-size: 11px; padding: 2px 8px; border-radius: 99px; background: #f5f5f0; color: #555; }
.les-chip.les-more { color: #999; }

/* Lessons - Detail */
.les-back { font-size: 13px; color: #666; background: none; border: none; cursor: pointer; font-family: inherit; padding: 4px 0; margin-bottom: 1rem; display: flex; align-items: center; gap: 4px; }
.les-back:hover { color: #1a1a1a; }
.les-hero { border-radius: 14px; padding: 1.5rem; margin-bottom: 1.25rem; text-align: center; border: 1px solid transparent; }
.les-hero-icon { font-size: 36px; margin-bottom: 6px; }
.les-hero-title { font-size: 22px; font-weight: 700; color: #1a1a1a; margin-bottom: 2px; }
.les-hero-sub { font-size: 14px; color: #666; font-style: italic; margin-bottom: 14px; }
.les-stats { display: flex; justify-content: center; gap: 20px; }
.les-stat { text-align: center; }
.les-stat-num { font-size: 20px; font-weight: 700; }
.les-stat-label { font-size: 10px; color: #666; text-transform: uppercase; letter-spacing: 0.5px; }
.les-intro { background: #fff; border: 1px solid #e0e0e0; border-radius: 12px; padding: 1.25rem; margin-bottom: 1.25rem; }
.les-intro p { font-size: 14px; line-height: 1.7; color: #333; margin-bottom: 8px; }
.les-intro p:last-child { margin-bottom: 0; }
.les-intro-es { font-style: italic !important; color: #888 !important; font-size: 13px !important; }
.les-words-header { font-size: 12px; font-weight: 600; color: #888; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; padding-left: 2px; }
.les-word { background: #fff; border: 1px solid #e0e0e0; border-radius: 10px; padding: 10px 14px; margin-bottom: 6px; transition: border-color 0.15s; }
.les-word:hover { border-color: #ccc; }
.les-word-row { display: flex; align-items: center; gap: 10px; }
.les-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.les-dot-new { background: #ddd; }
.les-dot-learning { background: #ef5350; }
.les-dot-familiar { background: #42a5f5; }
.les-dot-mastered { background: #1d9e75; }
.les-word-text { flex: 1; min-width: 0; }
.les-word-es { font-size: 15px; font-weight: 600; color: #1a1a1a; }
.les-word-en { font-size: 13px; color: #666; margin-left: 6px; }
.les-word-actions { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.les-word-ex { font-size: 12px; color: #888; font-style: italic; line-height: 1.5; padding: 6px 10px 0 18px; margin-top: 6px; border-top: 1px solid #f0f0f0; }
.les-tips { background: #fafaf5; border: 1px solid #e0e0e0; border-radius: 12px; padding: 1.25rem; margin-top: 1.25rem; }
.les-tips-header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.les-tips-icon { font-size: 18px; }
.les-tips-title { font-size: 14px; font-weight: 600; }
.les-tip { font-size: 13px; color: #555; line-height: 1.6; padding: 6px 0 6px 12px; border-left: 3px solid; margin-bottom: 4px; }
.les-cta { display: block; width: 100%; padding: 14px; border: none; border-radius: 10px; font-size: 15px; font-weight: 600; color: #fff; cursor: pointer; font-family: inherit; margin-top: 1.5rem; text-align: center; transition: opacity 0.15s; }
.les-cta:hover { opacity: 0.9; }
.les-nav { display: flex; justify-content: space-between; margin-top: 1.25rem; }
.les-nav button { font-size: 13px; padding: 8px 18px; border-radius: 8px; border: 1px solid #ccc; background: transparent; color: #1a1a1a; cursor: pointer; font-family: inherit; transition: background 0.12s; }
.les-nav button:hover { background: #f0f0f0; }

/* AI Quiz */
.ai-header { text-align: center; margin-bottom: 1.25rem; padding: 1.5rem; background: linear-gradient(135deg, #EEEDFE 0%, #E6F1FB 100%); border-radius: 14px; }
.ai-badge { display: inline-block; font-size: 11px; padding: 3px 12px; border-radius: 99px; background: #534AB7; color: #fff; font-weight: 600; letter-spacing: 0.5px; margin-bottom: 8px; }
.ai-title { font-size: 22px; font-weight: 700; color: #1a1a1a; margin-bottom: 4px; }
.ai-desc { font-size: 13px; color: #666; line-height: 1.5; margin: 0; }
.ai-qz-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; flex-wrap: wrap; gap: 6px; }
.ai-cat-tag { font-size: 12px; padding: 4px 12px; border-radius: 99px; font-weight: 600; }
.ai-lang-toggle { display: flex; gap: 6px; margin-bottom: 0.75rem; }
.ai-q-text { font-size: 16px; font-weight: 500; line-height: 1.6; color: #1a1a1a; margin-bottom: 1.25rem; }
.ai-explanation { font-size: 13px; color: #555; line-height: 1.6; padding: 10px 14px; background: #fafaf5; border-radius: 8px; margin-top: 8px; border-left: 3px solid #1d9e75; }

/* Cloze */
.cloze-input { font-size: 16px; padding: 8px 14px; border: 2px solid #ccc; border-radius: 8px; font-family: inherit; width: 160px; text-align: center; }
.cloze-input:focus { outline: none; border-color: #534AB7; }
.cloze-input.cloze-ok { border-color: #1d9e75; background: #e1f5ee; }
.cloze-input.cloze-bad { border-color: #d85a30; background: #faece7; }
.cloze-hint { font-size: 14px; color: #888; text-align: center; margin-bottom: 1rem; }
.cloze-submit { font-size: 14px; padding: 10px 28px; border-radius: 8px; border: 1px solid #1a1a1a; background: #1a1a1a; color: #fff; cursor: pointer; font-family: inherit; font-weight: 500; }
.cloze-submit:hover { background: #333; }
.cloze-submit:disabled { opacity: 0.4; cursor: default; }

/* XP / Levels */
.xp-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.xp-level { font-size: 12px; font-weight: 600; color: #534AB7; }
.xp-count { font-size: 11px; color: #888; }
.xp-track { height: 6px; background: #e0e0e0; border-radius: 99px; overflow: hidden; margin-bottom: 1rem; }
.xp-fill { height: 100%; background: linear-gradient(90deg, #534AB7, #7c6bc4); border-radius: 99px; transition: width 0.5s; }
.xp-toast { position: fixed; top: 20px; right: 20px; background: #534AB7; color: #fff; padding: 8px 18px; border-radius: 99px; font-size: 14px; font-weight: 700; z-index: 1000; animation: xp-pop 1.5s ease-out forwards; pointer-events: none; }
@keyframes xp-pop { 0% { opacity: 0; transform: translateY(10px) scale(0.8); } 15% { opacity: 1; transform: translateY(0) scale(1); } 70% { opacity: 1; } 100% { opacity: 0; transform: translateY(-20px); } }
.xp-bar-wrap { margin-bottom: 0.75rem; }

/* Exam tips */
.exam-tips { text-align: left; margin-bottom: 1.5rem; background: #EEEDFE; border-radius: 10px; padding: 16px; }
.exam-tips-title { font-size: 13px; font-weight: 700; color: #534AB7; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
.exam-tip { font-size: 13px; color: #444; line-height: 1.5; padding: 5px 0 5px 14px; border-left: 3px solid #7c6bc4; margin-bottom: 6px; }
.exam-tip:last-child { margin-bottom: 0; }
