/* ==========================================================================
   Mentora English Quest
   Coach Ben's talking head, today's quest, the level/lesson roadmap and the six steps.
   Big tap targets (44px+), calm colours, green for "heard / right", amber (never red) for "not yet".
   ========================================================================== */

.eq-container {
  --eq-brand: #4338ca;
  --eq-brand-light: #6366f1;
  --eq-brand-subtle: #e0e7ff;
  --eq-gold: #f59e0b;
  --eq-emerald: #059669;
  --eq-emerald-subtle: #d1fae5;
  --eq-amber: #b45309;
  --eq-amber-subtle: #fef3c7;
  --eq-navy: #1e1b4b;
  --eq-border: #e2e8f0;
  --eq-text: #0f172a;
  --eq-muted: #5b6577;
  --eq-radius-sm: 10px;
  --eq-radius-md: 14px;
  --eq-radius-lg: 20px;
  --eq-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  max-width: 1100px;
  margin: 0 auto;
  padding: 4px 0 60px;
  color: var(--eq-text);
}
.eq-container h2, .eq-container h3, .eq-container p { color: inherit; }
.eq-container :where(button) { font-family: inherit; }
.eq-container button:focus-visible, .eq-container .eq-word:focus-visible { outline: 3px solid #f59e0b; outline-offset: 2px; }

/* ---------------------------------------------------------------- hero: Coach Ben + stats */
.eq-hero {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  align-items: center;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 60%, #4338ca 100%);
  border-radius: var(--eq-radius-lg);
  padding: 18px 22px;
  color: #fff;
  box-shadow: 0 10px 25px -5px rgba(30, 27, 75, 0.3);
  margin-bottom: 14px;
}
.eq-coach { flex: 1 1 380px; display: flex; align-items: center; gap: 16px; min-width: 0; }
.eq-head {
  flex: 0 0 auto;
  width: 96px;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  color: #fde68a;
  display: grid;
  justify-items: center;
  gap: 2px;
  position: relative;
}
.eq-head svg { width: 92px; height: 95px; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.35)); }
.eq-head-name { font-size: 0.8rem; font-weight: 800; color: #fff; }
.eq-head-role { font-size: 0.66rem; font-weight: 600; color: #c7d2fe; }
.eq-head.is-talking svg { animation: eq-nod 1.6s ease-in-out infinite; }
.eq-head .eq-eyes { transform-box: fill-box; transform-origin: center; animation: eq-blink 5s infinite; }
.eq-head.is-talking .eq-brows { transform: translateY(-1.5px); }
.eq-head.is-waiting::after {
  content: '🔊 Tap me';
  position: absolute;
  top: -6px;
  right: -14px;
  background: #f59e0b;
  color: #1e1b4b;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 10px;
  animation: eq-pulse 1.2s infinite;
}
@keyframes eq-nod { 0%, 100% { transform: rotate(0) translateY(0); } 30% { transform: rotate(-1.2deg) translateY(-1px); } 70% { transform: rotate(1deg); } }
@keyframes eq-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(0.1); } }

.eq-bubble-wrap { min-width: 0; display: grid; gap: 8px; justify-items: start; }
.eq-bubble {
  position: relative;
  background: #fff;
  color: #1e1b4b;
  border-radius: 16px;
  padding: 12px 16px;
  font-size: 1.02rem;
  line-height: 1.45;
  font-weight: 600;
  min-height: 48px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}
.eq-bubble::before {
  content: '';
  position: absolute;
  left: -9px;
  top: 22px;
  border: 9px solid transparent;
  border-left: 0;
  border-right-color: #fff;
}
.eq-bubble.is-pop { animation: eq-bubble-pop 0.35s ease; }
.eq-bubble.is-happy { background: #fefce8; }
.eq-bubble.is-happy::before { border-right-color: #fefce8; }
@keyframes eq-bubble-pop { from { transform: scale(0.96); opacity: 0.4; } to { transform: scale(1); opacity: 1; } }
.eq-voice-toggle {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
  color: #e0e7ff;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.eq-stats { flex: 0 1 auto; display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.eq-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--eq-radius-md);
  padding: 8px 12px;
  color: #fff;
}
.eq-stat strong { display: block; font-size: 1.25rem; line-height: 1.1; color: #fde047; }
.eq-stat small { display: block; font-size: 0.72rem; color: #c7d2fe; }
.eq-stat-ic { font-size: 1.5rem; }
.eq-stat-streak { cursor: pointer; text-align: left; background: linear-gradient(135deg, rgba(234, 88, 12, 0.9), rgba(245, 158, 11, 0.9)); border-color: transparent; }
.eq-stat-streak strong { color: #fff; }
.eq-stat-streak small { color: #fff7ed; }
.eq-stat-streak.is-cold { background: rgba(255, 255, 255, 0.1); border-color: rgba(253, 186, 116, 0.6); }
.eq-stat-streak.is-cold .eq-stat-ic { animation: eq-pulse 1.6s infinite; }
.eq-shields { font-size: 0.85rem; letter-spacing: -2px; }
.eq-shields em { font-style: normal; font-size: 0.68rem; letter-spacing: 0; opacity: 0.8; }
.eq-goal-ring {
  --p: 0;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: conic-gradient(#34d399 calc(var(--p) * 1%), rgba(255, 255, 255, 0.18) 0);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.eq-goal-ring > span {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #312e81;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1;
  text-align: center;
}
.eq-goal-ring small { font-size: 0.55rem; color: #c7d2fe; font-weight: 600; }
.eq-skill-bars { display: grid; gap: 3px; }
.eq-skill { display: grid; grid-template-columns: 12px 46px; align-items: center; gap: 4px; font-size: 0.64rem; }
.eq-skill b { color: #c7d2fe; }
.eq-skill i { --p: 0; height: 5px; border-radius: 3px; background: linear-gradient(90deg, #34d399 calc(var(--p) * 1%), rgba(255, 255, 255, 0.18) 0); }
.eq-skill.is-full b { color: #34d399; }

.eq-shield-panel {
  flex: 1 1 100%;
  background: #fff;
  color: #1e1b4b;
  border-radius: var(--eq-radius-md);
  padding: 12px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}
.eq-shield-panel p { margin: 0; flex: 1 1 260px; font-size: 0.9rem; }
.eq-shield-panel small { color: var(--eq-muted); flex-basis: 100%; }

/* ---------------------------------------------------------------- today's quest (start screen) */
.eq-today {
  --accent: #4338ca;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--eq-border);
  border-left: 6px solid var(--accent);
  border-radius: var(--eq-radius-lg);
  padding: 22px 24px;
  box-shadow: var(--eq-shadow);
  margin-bottom: 16px;
}
.eq-today.is-done { border-left-color: var(--eq-emerald); background: linear-gradient(135deg, #fff 60%, #f0fdf4); }
.eq-today-art { position: relative; width: 140px; height: 140px; }
.eq-today-art svg { width: 116px; height: 116px; filter: drop-shadow(0 8px 16px rgba(15, 23, 42, 0.18)); }
.eq-today-ring {
  --p: 0;
  position: absolute;
  right: 0;
  bottom: 0;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: conic-gradient(var(--eq-emerald) calc(var(--p) * 1%), #e2e8f0 0);
  display: grid;
  place-items: center;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.15);
}
.eq-today-ring b { width: 46px; height: 46px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 0.85rem; color: #0f172a; }
.eq-today-kicker { margin: 0; font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); }
.eq-today.is-done .eq-today-kicker { color: var(--eq-emerald); }
.eq-today h2 { margin: 4px 0 2px; font-size: 1.7rem; color: #0f172a; }
.eq-today-topic { margin: 0 0 14px; color: var(--eq-muted); }
.eq-today-steps { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.eq-today-steps li { display: grid; justify-items: center; gap: 3px; min-width: 64px; }
.eq-today-steps span {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #f1f5f9;
  border: 2px solid #e2e8f0;
  font-size: 1.1rem;
}
.eq-today-steps small { font-size: 0.72rem; font-weight: 700; color: var(--eq-muted); }
.eq-today-steps li.is-done span { background: var(--eq-emerald); border-color: var(--eq-emerald); color: #fff; font-weight: 900; }
.eq-today-steps li.is-next span { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.18); animation: eq-pulse 1.8s infinite; }
.eq-today-steps li.is-next small { color: var(--accent); }
.eq-today-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.eq-btn-big { font-size: 1.08rem; padding: 14px 26px; min-height: 52px; }
.eq-today-hint { color: var(--eq-muted); font-size: 0.88rem; }
.eq-today-badge { background: var(--eq-emerald-subtle); color: #065f46; font-weight: 800; padding: 10px 14px; border-radius: 999px; }
.eq-journey { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.eq-tile { background: #fff; border: 1px solid var(--eq-border); border-radius: var(--eq-radius-md); padding: 14px 16px; display: grid; gap: 2px; box-shadow: var(--eq-shadow); }
.eq-tile-ic { font-size: 1.4rem; }
.eq-tile strong { font-size: 1.5rem; color: #0f172a; line-height: 1.15; }
.eq-tile strong.eq-tile-text { font-size: 1rem; }
.eq-tile small { color: var(--eq-muted); font-weight: 600; }
.eq-tutor-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: var(--eq-radius-md); padding: 12px 14px; }
.eq-tutor-pick select { min-height: 40px; border-radius: 8px; border: 1px solid var(--eq-border); padding: 6px 10px; font-size: 0.92rem; max-width: 100%; }

/* ---------------------------------------------------------------- a lesson's header */
.eq-lesson-top { --accent: #4338ca; display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.eq-back { border: 1px solid var(--eq-border); background: #fff; border-radius: 999px; padding: 8px 14px; min-height: 40px; font-weight: 700; color: var(--eq-muted); cursor: pointer; }
.eq-back:hover { color: var(--eq-brand); border-color: #c7d2fe; }
.eq-lesson-title small { display: block; font-size: 0.74rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); }
.eq-lesson-title h2 { margin: 0; font-size: 1.35rem; color: #0f172a; }

/* ---------------------------------------------------------------- the six steps */
.eq-cycle-nav {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  background: #f1f5f9;
  border: 1px solid var(--eq-border);
  border-radius: var(--eq-radius-md);
  padding: 6px;
  margin-bottom: 8px;
  scroll-margin-top: 12px;
}
.eq-step-btn {
  position: relative;
  border: 0;
  background: transparent;
  padding: 9px 4px;
  min-height: 52px;
  border-radius: var(--eq-radius-sm);
  font-weight: 600;
  font-size: 0.84rem;
  color: var(--eq-muted);
  display: grid;
  justify-items: center;
  gap: 2px;
  cursor: pointer;
}
.eq-step-btn:hover { background: rgba(99, 102, 241, 0.08); color: var(--eq-brand); }
.eq-step-btn.is-active { background: #fff; color: var(--eq-brand); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); font-weight: 800; }
.eq-step-btn.is-completed::after {
  content: '✓';
  position: absolute;
  top: 4px;
  right: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--eq-emerald);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.eq-step-num { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.75; }
.eq-goal-line { display: flex; align-items: center; gap: 10px; font-size: 0.86rem; font-weight: 700; color: #4338ca; margin: 0 4px 14px; }
.eq-goal-bar { flex: 0 0 140px; height: 8px; border-radius: 4px; background: #e0e7ff; overflow: hidden; }
.eq-goal-bar i { display: block; height: 100%; background: linear-gradient(90deg, #6366f1, #10b981); border-radius: 4px; transition: width 0.5s ease; }

.eq-stage-card {
  background: #fff;
  border: 1px solid var(--eq-border);
  border-radius: var(--eq-radius-lg);
  padding: 26px 30px;
  box-shadow: var(--eq-shadow);
  min-height: 420px;
}
.eq-stage-title-wrap { border-bottom: 1px solid var(--eq-border); padding-bottom: 14px; margin-bottom: 20px; }
.eq-stage-title-wrap h3 { margin: 0; font-size: 1.4rem; color: #1e1b4b; }
.eq-stage-title-wrap p { margin: 6px 0 0; color: var(--eq-muted); font-size: 0.98rem; }
.eq-green { color: var(--eq-emerald); font-weight: 800; }
.eq-orange { color: var(--eq-amber); font-weight: 800; }

/* buttons */
.eq-bottom-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--eq-border); }
.eq-btn-next {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: 0;
  min-height: 46px;
  padding: 11px 24px;
  border-radius: var(--eq-radius-sm);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  transition: transform 0.15s ease;
}
.eq-btn-next:hover { transform: translateY(-2px); }
.eq-btn-next.is-nudge { animation: eq-nudge 1.6s ease-in-out infinite; }
@keyframes eq-nudge { 0%, 100% { box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35); transform: translateY(0); } 50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.25); transform: translateY(-2px); } }
.eq-btn-prev { background: #fff; border: 1px solid var(--eq-border); min-height: 44px; padding: 10px 18px; border-radius: var(--eq-radius-sm); font-weight: 700; color: var(--eq-muted); cursor: pointer; }
.eq-btn-small {
  background: #fff;
  border: 2px solid #c7d2fe;
  color: #3730a3;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: var(--eq-radius-sm);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
}
.eq-btn-small:hover:not(:disabled) { background: #eef2ff; }
.eq-btn-small:disabled { opacity: 0.5; cursor: not-allowed; }
.eq-btn-small.eq-btn-go { background: var(--eq-emerald); border-color: var(--eq-emerald); color: #fff; }
.eq-center { display: block; margin: 16px auto; }
.eq-done-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 16px; }

/* ---------------------------------------------------------------- the lesson player: one screen at a time */
.eq-prog { display: flex; gap: 6px; margin: 0 0 12px; overflow-x: auto; padding: 2px; }
.eq-prog-part { flex: 1 0 auto; min-width: 72px; display: grid; gap: 5px; padding: 8px 10px; border-radius: 12px; background: #f1f5f9; border: 1px solid transparent; }
.eq-prog-part.is-now { background: #fff; border-color: #c7d2fe; box-shadow: 0 2px 8px rgba(67, 56, 202, 0.12); }
.eq-prog-part.is-done:not(.is-now) { background: #ecfdf5; }
.eq-prog-label { font-size: 0.78rem; font-weight: 800; color: var(--eq-muted); white-space: nowrap; }
.eq-prog-part.is-now .eq-prog-label { color: #3730a3; }
.eq-prog-part.is-done:not(.is-now) .eq-prog-label { color: #047857; }
.eq-prog-dots { display: flex; gap: 4px; }
.eq-prog-dot { flex: 1 1 0; min-width: 10px; height: 8px; border-radius: 4px; border: 0; padding: 0; background: #cbd5e1; cursor: pointer; }
.eq-prog-dot[disabled] { cursor: default; opacity: 0.6; }
.eq-prog-dot.is-done { background: var(--eq-emerald); }
.eq-prog-dot.is-now { background: #4338ca; box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.25); }
.eq-stage-card { min-height: 0; }
.eq-stage-card.is-enter { animation: eq-enter 0.35s ease; }
@keyframes eq-enter { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.eq-foot { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin-top: 12px; padding: 12px 14px; background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(6px); border: 1px solid var(--eq-border); border-radius: var(--eq-radius-md); box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06); }
.eq-foot-count { color: var(--eq-muted); font-weight: 700; font-size: 0.86rem; }
.eq-foot-hint { flex-basis: 100%; text-align: right; color: var(--eq-muted); font-size: 0.84rem; }
.eq-btn-next[disabled] { background: #cbd5e1; box-shadow: none; cursor: not-allowed; transform: none; animation: none; }
.eq-btn-start { font-size: 1.25rem; padding: 16px 40px; border-radius: 14px; }
.eq-learn-screen { display: grid; gap: 16px; justify-items: start; }
.eq-learn-big { margin: 0; font-size: 1.3rem; line-height: 1.6; color: #0f172a; max-width: 760px; }
.eq-learn-card { background: #f8fafc; border: 1px solid var(--eq-border); border-radius: 12px; padding: 14px 18px; width: 100%; box-sizing: border-box; }
.eq-learn-card h4 { margin: 0 0 8px; color: #3730a3; }
.eq-learn-card ol { margin: 0; padding-left: 22px; display: grid; gap: 8px; font-size: 1.05rem; color: #334155; }
.eq-learn-ex.is-big { width: 100%; gap: 12px; }
.eq-learn-ex.is-big li { background: #fff; border: 1px solid var(--eq-border); border-radius: 12px; padding: 12px 16px; }
.eq-learn-ex.is-big .eq-learn-sent { font-size: 1.25rem; }
.eq-learn-screen .eq-learn-tips { width: 100%; }
.eq-spotlight-grid.is-single { grid-template-columns: minmax(0, 560px); justify-content: center; }
.eq-spotlight-grid.is-single .eq-wc-word { font-size: 2rem; }

/* ---------------------------------------------------------------- "Learn it first" explainer */
.eq-learn { border: 2px solid #c7d2fe; border-radius: var(--eq-radius-md); background: linear-gradient(180deg, #f5f7ff, #fff 120px); margin-bottom: 18px; overflow: hidden; }
.eq-learn > summary { list-style: none; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 18px; cursor: pointer; font-size: 1.12rem; color: #1e1b4b; }
.eq-learn > summary::-webkit-details-marker { display: none; }
.eq-learn-tag { background: #4338ca; color: #fff; font-size: 0.76rem; font-weight: 800; padding: 4px 10px; border-radius: 999px; }
.eq-learn-chev { margin-left: auto; width: 10px; height: 10px; border-right: 2.5px solid #6366f1; border-bottom: 2.5px solid #6366f1; transform: rotate(45deg); transition: transform 0.2s; }
.eq-learn[open] .eq-learn-chev { transform: rotate(-135deg); }
.eq-learn.is-flash { animation: eq-flash 1.2s ease; }
@keyframes eq-flash { 0%, 100% { box-shadow: none; } 30% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.45); } }
.eq-learn-body { padding: 0 18px 18px; display: grid; gap: 14px; }
.eq-learn-intro { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.eq-learn-what { flex: 1 1 320px; margin: 0; font-size: 1.08rem; line-height: 1.55; color: #0f172a; }
.eq-learn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.eq-learn-grid section { background: #fff; border: 1px solid var(--eq-border); border-radius: 12px; padding: 12px 14px; }
.eq-learn-grid h4 { margin: 0 0 8px; font-size: 0.92rem; color: #3730a3; }
.eq-learn-grid ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: #334155; }
.eq-learn-ex { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.eq-learn-ex li { display: grid; gap: 2px; }
.eq-learn-sent { font-size: 1.05rem; color: #0f172a; }
.eq-learn-sent mark { background: #fde68a; color: #78350f; font-weight: 800; padding: 0 3px; border-radius: 4px; }
.eq-learn-ex small { color: var(--eq-muted); }
.eq-learn-tips { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.eq-learn-tips p { margin: 0; padding: 10px 12px; border-radius: 10px; font-size: 0.94rem; }
.eq-learn-warn { background: #fff7ed; border-left: 4px solid #f59e0b; color: #7c2d12; }
.eq-learn-tip { background: #f0fdf4; border-left: 4px solid #10b981; color: #065f46; }
.eq-explain { margin-left: 6px; border: 1px solid #fcd34d; background: #fffbeb; color: #92400e; font-weight: 800; font-size: 0.85rem; border-radius: 999px; padding: 5px 12px; cursor: pointer; vertical-align: 2px; }
.eq-explain:hover { background: #fef3c7; }
.eq-lesson-top .eq-learn-open { margin-left: auto; }
.eq-modal { position: fixed; inset: 0; z-index: 300; background: rgba(15, 23, 42, 0.55); display: grid; place-items: center; padding: 16px; animation: mw-in 0.2s ease; }
.eq-modal-card { position: relative; width: min(820px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: #fff; border-radius: 20px; padding: 18px; box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35); }
.eq-modal-card .eq-learn { margin: 22px 0 0; }
.eq-modal-x { position: absolute; top: 10px; right: 12px; border: 0; background: #f1f5f9; width: 36px; height: 36px; border-radius: 50%; font-size: 1rem; cursor: pointer; }
.eq-modal-foot { display: flex; justify-content: flex-end; margin-top: 14px; }

/* ---------------------------------------------------------------- STEP 1: Listen */
.eq-listen-box { background: #f8fafc; border: 1px solid var(--eq-border); border-radius: var(--eq-radius-md); padding: 20px 22px; margin-bottom: 18px; }
.eq-karaoke-text { font-size: 1.28rem; line-height: 1.9; color: #334155; }
.eq-karaoke-text p { margin: 0 0 12px; }
.eq-word { display: inline-block; padding: 0 3px; border-radius: 5px; cursor: pointer; transition: background 0.12s ease, transform 0.12s ease; }
.eq-word:hover { background: #eef2ff; }
.eq-word.is-speaking { background: #fde047; color: #1e1b4b; transform: scale(1.06); box-shadow: 0 0 10px rgba(253, 224, 71, 0.8); }
.eq-word.is-tapped { background: #c7d2fe; }
.eq-audio-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--eq-border); }
.eq-btn-play {
  background: var(--eq-brand);
  color: #fff;
  border: 0;
  min-height: 46px;
  padding: 10px 20px;
  border-radius: var(--eq-radius-sm);
  font-size: 1rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.eq-btn-play:hover { background: var(--eq-brand-light); }
.eq-btn-soft { background: #eef2ff; color: #3730a3; }
.eq-btn-soft:hover { background: #e0e7ff; }
.eq-rate { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--eq-muted); font-weight: 600; }
.eq-rate-select { min-height: 40px; padding: 6px 10px; border-radius: var(--eq-radius-sm); border: 1px solid var(--eq-border); background: #fff; font-size: 0.9rem; }
.eq-audio-bar { flex: 1 1 120px; height: 8px; border-radius: 4px; background: #e2e8f0; overflow: hidden; }
.eq-audio-bar i { display: block; height: 100%; width: 0; background: #6366f1; transition: width 0.2s linear; }

.eq-check { border: 2px solid #c7d2fe; border-radius: var(--eq-radius-md); padding: 16px 18px; background: #fafaff; }
.eq-check.is-locked { border-style: dashed; background: #f8fafc; }
.eq-check.is-locked .eq-opt { opacity: 0.5; }
.eq-check-q { margin: 0 0 12px; font-size: 1.08rem; font-weight: 700; color: #1e1b4b; }
.eq-check-tag { display: inline-block; background: #e0e7ff; color: #3730a3; font-size: 0.78rem; padding: 2px 8px; border-radius: 8px; margin-right: 6px; vertical-align: 2px; }
.eq-check-opts { display: grid; gap: 8px; }
.eq-opt {
  text-align: left;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: var(--eq-radius-sm);
  border: 2px solid var(--eq-border);
  background: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
.eq-opt:hover:not(:disabled) { border-color: #6366f1; background: #eef2ff; }
.eq-opt.is-right { border-color: var(--eq-emerald); background: var(--eq-emerald-subtle); color: #065f46; }
.eq-opt.is-wrong { border-color: #fcd34d; background: var(--eq-amber-subtle); color: #92400e; animation: eq-shake 0.4s ease; }
.eq-check-msg { margin: 10px 0 0; font-weight: 700; color: #4338ca; }

/* ---------------------------------------------------------------- STEP 2: Read aloud */
.eq-target-text-card {
  background: #f1f5f9;
  border-left: 5px solid var(--eq-brand);
  border-radius: var(--eq-radius-md);
  padding: 20px 24px;
  font-size: 1.3rem;
  line-height: 1.9;
  color: #1e293b;
  margin-bottom: 14px;
}
.eq-word.is-heard { color: var(--eq-emerald); font-weight: 800; }
.eq-word.is-retry { color: var(--eq-amber); text-decoration: underline dotted 2px; text-underline-offset: 5px; }
.eq-read-actions { display: flex; justify-content: center; }
.eq-mic-wrap { display: grid; justify-items: center; gap: 12px; margin: 18px 0 6px; text-align: center; }
.eq-mic-btn {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 0;
  background: linear-gradient(135deg, #4338ca, #6366f1);
  color: #fff;
  font-size: 34px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(67, 56, 202, 0.4);
  transition: transform 0.2s ease;
}
.eq-mic-btn:hover { transform: scale(1.06); }
.eq-mic-btn.is-recording { background: linear-gradient(135deg, #059669, #10b981); animation: eq-pulse 1.4s infinite; box-shadow: 0 0 0 10px rgba(16, 185, 129, 0.2); }
@keyframes eq-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.eq-mic-status { font-size: 0.98rem; font-weight: 700; color: var(--eq-muted); max-width: 520px; }
.eq-nomic { background: var(--eq-amber-subtle); border-radius: var(--eq-radius-md); padding: 14px 18px; color: #78350f; font-weight: 600; display: grid; gap: 10px; justify-items: center; }
.eq-coach-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; text-align: center; }
.eq-metric-box { background: #f8fafc; border: 1px solid var(--eq-border); border-radius: var(--eq-radius-md); padding: 14px; }
.eq-metric-val { font-size: 1.8rem; font-weight: 800; color: var(--eq-brand); }
.eq-metric-lbl { font-size: 0.82rem; color: var(--eq-muted); font-weight: 700; margin-top: 4px; }
.eq-metric-note { grid-column: 1 / -1; margin: 4px 0 0; color: var(--eq-muted); font-size: 0.92rem; }

/* ---------------------------------------------------------------- STEP 3: Practise */
.eq-spotlight-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 14px; }
.eq-word-card {
  background: #fff;
  border: 2px solid var(--eq-border);
  border-radius: var(--eq-radius-md);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.eq-word-card.is-mastered { border-color: #34d399; background: #f0fdf4; }
.eq-word-card.is-extra { border-style: dashed; }
.eq-wc-from { font-size: 0.72rem; font-weight: 800; color: var(--eq-amber); text-transform: uppercase; letter-spacing: 0.04em; }
.eq-wc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.eq-wc-word { font-size: 1.45rem; font-weight: 800; color: #1e1b4b; }
.eq-wc-ipa { font-size: 0.86rem; color: #6366f1; font-family: ui-monospace, monospace; }
.eq-wc-syllables { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.eq-syllable-chip { background: #e0e7ff; color: #3730a3; padding: 2px 9px; border-radius: 6px; font-size: 0.9rem; font-weight: 700; }
.eq-syl-dot { color: #94a3b8; font-weight: 800; }
.eq-wc-def { margin: 2px 0 0; font-size: 0.92rem; color: #334155; }
.eq-wc-tip { font-size: 0.9rem; color: #475569; background: #fffbeb; padding: 8px 10px; border-radius: 8px; border-left: 3px solid var(--eq-gold); }
.eq-wc-sentence { margin: 0; font-size: 0.88rem; color: var(--eq-muted); font-style: italic; }
.eq-wc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 6px; }
.eq-wc-btn {
  flex: 1 1 auto;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: var(--eq-radius-sm);
  border: 1px solid var(--eq-border);
  background: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
}
.eq-wc-btn:hover { background: #f1f5f9; border-color: #6366f1; }
.eq-wc-say { background: #eef2ff; border-color: #c7d2fe; color: #3730a3; }
.eq-wc-say.is-listening { background: #d1fae5; border-color: #34d399; color: #065f46; animation: eq-pulse 1.2s infinite; }
.eq-wc-self { background: #f0fdf4; border-color: #86efac; color: #166534; }
.eq-wc-msg { margin: 0; min-height: 1.2em; font-size: 0.88rem; font-weight: 700; color: #4338ca; }
.eq-word-card.is-mastered .eq-wc-msg { color: #047857; }

/* ---------------------------------------------------------------- STEP 4: Spell */
.eq-spell-dots { display: flex; justify-content: center; gap: 8px; margin-bottom: 4px; }
.eq-spell-dots span { width: 12px; height: 12px; border-radius: 50%; background: #e2e8f0; }
.eq-spell-dots span.is-now { background: #6366f1; transform: scale(1.25); }
.eq-spell-dots span.is-done { background: var(--eq-emerald); }
.eq-spell-stage { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 10px 0; }
.eq-spell-hint { font-size: 1.15rem; font-weight: 700; color: #334155; text-align: center; }
.eq-slots-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.eq-letter-slot {
  width: 44px;
  height: 52px;
  border: 2px dashed #94a3b8;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--eq-brand);
  background: #f8fafc;
}
.eq-letter-slot.is-filled { border: 2px solid var(--eq-brand); background: #fff; animation: eq-drop 0.18s ease; }
.eq-letter-slot.is-correct { border-color: var(--eq-emerald); background: var(--eq-emerald-subtle); color: #065f46; }
@keyframes eq-drop { from { transform: translateY(-6px) scale(1.1); } to { transform: none; } }
.eq-tiles-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; max-width: 640px; }
.eq-letter-tile {
  width: 50px;
  height: 56px;
  border-radius: 10px;
  background: linear-gradient(180deg, #fff 0%, #f1f5f9 100%);
  border: 2px solid #cbd5e1;
  border-bottom: 4px solid #94a3b8;
  font-size: 1.5rem;
  font-weight: 800;
  color: #1e1b4b;
  cursor: pointer;
  user-select: none;
  transition: transform 0.1s ease, opacity 0.2s ease;
}
.eq-letter-tile:active { transform: translateY(2px); border-bottom-width: 2px; }
.eq-letter-tile.is-used { opacity: 0.2; pointer-events: none; }
.eq-letter-tile.is-wrong { animation: eq-shake 0.4s ease; border-color: #fcd34d; }
.eq-letter-tile.is-hint { border-color: #f59e0b; box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.35), 0 0 18px rgba(245, 158, 11, 0.6); animation: eq-pulse 1s infinite; }
@keyframes eq-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.eq-spell-msg { margin: 0; min-height: 1.4em; font-weight: 700; color: #4338ca; text-align: center; }
.eq-spell-msg em { font-style: normal; color: #1e1b4b; }
.eq-done-card { text-align: center; padding: 18px 10px; }
.eq-done-card h3 { margin: 6px 0; color: #047857; font-size: 1.3rem; }
.eq-done-card p { color: var(--eq-muted); margin: 0 auto; max-width: 520px; }
.eq-done-emoji { font-size: 56px; }

/* ---------------------------------------------------------------- STEP 5: Play */
.eq-game-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.eq-game-tab { min-height: 44px; padding: 8px 18px; border-radius: 999px; border: 2px solid var(--eq-border); background: #fff; font-weight: 700; color: var(--eq-muted); cursor: pointer; }
.eq-game-tab.is-active { background: var(--eq-brand); color: #fff; border-color: var(--eq-brand); }
.eq-match-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 14px; color: var(--eq-muted); font-weight: 600; }
.eq-timer { font-weight: 800; color: #1e1b4b; background: #eef2ff; padding: 4px 10px; border-radius: 8px; font-variant-numeric: tabular-nums; }
.eq-best { font-weight: 700; color: #b45309; }
.eq-speed-match-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.eq-sm-col { display: grid; gap: 10px; align-content: start; }
.eq-sm-card {
  text-align: left;
  min-height: 52px;
  background: #f8fafc;
  border: 2px solid var(--eq-border);
  border-radius: var(--eq-radius-md);
  padding: 12px 16px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  color: var(--eq-text);
}
.eq-sm-card.is-term { font-weight: 800; }
.eq-sm-card:hover:not(:disabled) { border-color: #6366f1; background: #fff; }
.eq-sm-card.is-selected { border-color: var(--eq-brand); background: var(--eq-brand-subtle); color: var(--eq-brand); }
.eq-sm-card.is-matched { border-color: #34d399; background: var(--eq-emerald-subtle); color: #065f46; cursor: default; }
.eq-sm-card.is-wrong { animation: eq-shake 0.4s ease; border-color: #fcd34d; }
.eq-sb-prompt { font-weight: 700; color: #334155; text-align: center; margin: 0 0 14px; }
.eq-sb-zone {
  min-height: 70px;
  border: 2px dashed #94a3b8;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
  background: #f8fafc;
  margin-bottom: 18px;
}
.eq-sb-zone.is-correct { border-style: solid; border-color: #34d399; background: #f0fdf4; }
.eq-sb-zone.is-wrong { animation: eq-shake 0.4s ease; border-color: #fcd34d; }
.eq-sb-placeholder { color: #94a3b8; font-size: 0.92rem; }
.eq-sb-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.eq-sb-chip {
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 2px solid #c7d2fe;
  background: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e1b4b;
  cursor: pointer;
}
.eq-sb-chip:disabled { opacity: 0.2; cursor: default; }
.eq-sb-chip.is-placed { background: #eef2ff; }
.eq-sb-chip.is-ok { background: var(--eq-emerald-subtle); border-color: #34d399; color: #065f46; }
.eq-sb-msg { text-align: center; font-weight: 700; color: #4338ca; min-height: 1.3em; margin: 12px 0 0; }

/* ---------------------------------------------------------------- STEP 6: Rewards */
.eq-progress-stage { text-align: center; padding: 8px 0; }
.eq-stars-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 620px; margin: 16px auto; }
.eq-star-card { border: 2px solid var(--eq-border); border-radius: var(--eq-radius-md); padding: 12px 8px; display: grid; gap: 2px; background: #f8fafc; }
.eq-star-card strong { color: #1e1b4b; }
.eq-star-card small { color: var(--eq-muted); font-size: 0.8rem; }
.eq-star { font-size: 40px; filter: grayscale(1); opacity: 0.3; }
.eq-star-card.is-earned { border-color: #fcd34d; background: #fffbeb; }
.eq-star-card.is-earned .eq-star { filter: none; opacity: 1; animation: eq-star-pop 0.6s ease; }
@keyframes eq-star-pop { 0% { transform: scale(0.3); } 70% { transform: scale(1.3); } 100% { transform: scale(1); } }
.eq-reward-chest {
  position: relative;
  width: 130px;
  height: 130px;
  margin: 8px auto;
  font-size: 80px;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(253, 224, 71, 0.45), transparent 65%);
  cursor: pointer;
  animation: eq-wobble 2.4s infinite ease-in-out;
}
.eq-reward-chest.is-locked { cursor: default; filter: grayscale(0.6); animation: none; }
.eq-reward-chest.is-locked span { position: absolute; bottom: 10px; right: 14px; font-size: 32px; }
.eq-reward-chest.is-opening { animation: eq-open 0.7s ease; }
.eq-reward-chest.is-open { animation: none; cursor: default; }
@keyframes eq-wobble { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-7deg); } 40% { transform: rotate(7deg); } 60% { transform: rotate(0); } }
@keyframes eq-open { 0% { transform: scale(1); } 50% { transform: scale(1.35) rotate(-6deg); } 100% { transform: scale(1); } }
.eq-chest-msg { font-weight: 800; color: #b45309; font-size: 1.05rem; margin: 0 0 6px; }
.eq-tip-line { color: var(--eq-muted); font-size: 0.92rem; }
.eq-center-row { align-items: center; }
.eq-checklist { list-style: none; padding: 0; margin: 10px auto; display: grid; gap: 6px; max-width: 320px; }
.eq-checklist button { width: 100%; min-height: 44px; text-align: left; border: 2px solid var(--eq-border); background: #fff; border-radius: var(--eq-radius-sm); padding: 8px 14px; font-weight: 700; cursor: pointer; color: var(--eq-text); }
.eq-checklist li.is-done button { border-color: #6ee7b7; background: #f0fdf4; color: #065f46; }

/* floating "+5 💎" */
.eq-float-gem {
  position: fixed;
  z-index: 9999;
  transform: translate(-50%, 0);
  font-weight: 900;
  font-size: 1.15rem;
  color: #4338ca;
  background: #fff;
  padding: 3px 10px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  pointer-events: none;
  animation: eq-float-up 1.3s ease-out forwards;
}
@keyframes eq-float-up { from { opacity: 1; transform: translate(-50%, 0); } to { opacity: 0; transform: translate(-50%, -60px); } }

/* ---------------------------------------------------------------- dashboard card */
.eq-dash {
  display: flex;
  align-items: center;
  gap: 18px;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  color: #fff;
  border-radius: 16px;
  padding: 18px 22px;
  box-shadow: 0 4px 18px rgba(30, 27, 75, 0.25);
}
.eq-dash-avatar { width: 64px; height: 66px; flex: 0 0 auto; }
.eq-dash-avatar svg { width: 64px; height: 66px; }
.eq-dash.is-done .eq-dash-bar i { background: #fde047; }
.eq-dash-main { flex: 1 1 auto; min-width: 0; display: grid; gap: 4px; }
.eq-dash-kicker { margin: 0; font-size: 0.74rem; font-weight: 800; color: #fde047; text-transform: uppercase; letter-spacing: 0.04em; }
.eq-dash h3 { margin: 0; font-size: 1.15rem; color: #fff; }
.eq-dash-sub { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.88rem; color: #c7d2fe; }
.eq-dash-bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.15); overflow: hidden; max-width: 360px; }
.eq-dash-bar i { display: block; height: 100%; background: #34d399; }
.eq-dash-go { flex: 0 0 auto; border: 0; background: #f59e0b; color: #1e1b4b; font-weight: 800; padding: 12px 22px; min-height: 46px; border-radius: 10px; cursor: pointer; font-size: 1rem; }

/* ---------------------------------------------------------------- tutor view of one student */
.eq-tt-sum { margin: 0 0 10px; color: var(--muted, #5f6b7d); }
.eq-tt-wrap { overflow-x: auto; }
.eq-tt-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.eq-tt-table th, .eq-tt-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line, #e1e6ee); vertical-align: top; }
.eq-tt-table th { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted, #5f6b7d); }

.eq-tt-home tbody tr { cursor: pointer; }
.eq-tt-home tbody tr:hover, .eq-tt-home tbody tr:focus-visible { background: #f8fafc; }
.eq-tt-home small { color: var(--muted, #5f6b7d); }
.eq-tt-hw { color: #15803d; font-weight: 600; white-space: nowrap; }
.eq-tt-muted { color: var(--muted, #5f6b7d); }
.eq-tutor-note { margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; background: #fffbeb; border: 1px solid #fde68a; color: #78350f; font-size: 0.9rem; }

/* ---------------------------------------------------------------- activity library (activities.js) */
.eq-today-course { margin: 2px 0 0; font-size: 0.86rem; font-weight: 700; color: var(--eq-muted); }
.eqa-replay { margin: -8px 0 12px; font-size: 0.86rem; font-weight: 700; color: #047857; }
.eqa-mcq { display: grid; gap: 12px; justify-items: start; }
.eqa-mcq > * { max-width: 100%; }
.eqa-top { display: flex; gap: 12px; align-items: center; width: 100%; justify-content: space-between; }
.eqa-count { font-size: 0.82rem; font-weight: 800; color: #4338ca; background: #eef2ff; padding: 4px 10px; border-radius: 999px; }
.eqa-q { margin: 0; font-size: 1.2rem; font-weight: 700; color: #0f172a; line-height: 1.5; }
.eqa-gapline, .eqa-wrongline { display: inline-block; margin-top: 6px; font-weight: 600; background: #f8fafc; border-radius: 8px; padding: 6px 10px; }
.eqa-wrongline { background: #fff7ed; border-left: 4px solid #f59e0b; }
.eqa-opts { display: grid; gap: 8px; width: 100%; }
.eq-opt.is-gone { opacity: 0.25; }
.eqa-why { margin: 0; min-height: 1.3em; font-weight: 700; color: #4338ca; }
.eqa-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.eqa-tokens { display: flex; flex-wrap: wrap; gap: 6px; }
.eqa-tok { border: 2px solid var(--eq-border); background: #fff; border-radius: 8px; padding: 6px 10px; font-size: 1.1rem; cursor: pointer; min-height: 44px; }
.eqa-tok.is-picked { background: #fde68a; border-color: #f59e0b; }
.eqa-tok.is-right { background: var(--eq-emerald-subtle); border-color: #34d399; color: #065f46; }
.eqa-tok.is-hint { box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.4); }
.eqa-sort { display: grid; gap: 14px; justify-items: center; }
.eqa-card { min-width: 240px; max-width: 520px; text-align: center; font-size: 1.25rem; font-weight: 800; padding: 18px 22px; border-radius: 16px; background: #fff; border: 2px solid #c7d2fe; box-shadow: var(--eq-shadow); }
.eqa-bins { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
.eqa-bin { display: grid; gap: 6px; align-content: start; min-height: 110px; text-align: left; border: 2px dashed #94a3b8; background: #f8fafc; border-radius: 14px; padding: 12px; cursor: pointer; font-size: 1rem; }
.eqa-bin:hover { border-color: #6366f1; background: #eef2ff; }
.eqa-binlist { display: flex; flex-wrap: wrap; gap: 4px; }
.eqa-binlist span { background: var(--eq-emerald-subtle); color: #065f46; border-radius: 6px; padding: 2px 8px; font-size: 0.85rem; font-weight: 700; }
.eqa-join { color: #94a3b8; font-weight: 900; }
.eqa-order .eq-sb-chip, .eqa-order .eq-sb-zone .eq-sb-chip { text-align: left; font-size: 0.98rem; font-weight: 600; }
.eqa-order .eq-sb-zone, .eqa-order .eq-sb-chips { flex-direction: column; align-items: stretch; }
.eqa-cloze { font-size: 1.2rem; line-height: 2; margin: 0 0 12px; }
.eqa-gap { display: inline-grid; place-items: center; min-width: 74px; height: 32px; border-bottom: 3px solid #94a3b8; color: #94a3b8; font-weight: 800; vertical-align: -6px; }
.eqa-gap.is-next { border-color: #4338ca; color: #4338ca; background: #eef2ff; border-radius: 6px 6px 0 0; }
.eqa-filled { background: var(--eq-emerald-subtle); color: #065f46; font-weight: 800; border-radius: 4px; padding: 0 3px; }
.eq-sb-chip.is-wrong { animation: eq-shake 0.4s ease; border-color: #fcd34d; }
.eq-sb-chip.eqa-glow { border-color: #f59e0b; background: #fffbeb; animation: eq-flash 1.2s ease-in-out infinite; }
.eq-sb-zone .eq-sb-chip.is-placed { cursor: default; }
.eqa-write { display: grid; gap: 12px; }
.eqa-model { margin: 0; color: var(--eq-muted); }
.eqa-model span { font-weight: 800; color: #3730a3; }
.eqa-write textarea { width: 100%; box-sizing: border-box; font-size: 1.1rem; padding: 10px 12px; border-radius: 12px; }
.eqa-check { display: grid; gap: 6px; background: #f8fafc; border-radius: 12px; padding: 12px 14px; }
.eqa-check label { display: flex; gap: 8px; align-items: flex-start; font-size: 0.95rem; }
.eqa-bigword { margin: 0; font-size: 2.6rem; font-weight: 800; letter-spacing: 0.06em; color: #1e1b4b; }
.eqa-bigword.is-covered { color: #cbd5e1; letter-spacing: 0.2em; }
.eqa-type { display: flex; gap: 10px; flex-wrap: wrap; }
.eqa-type input { font-size: 1.4rem; padding: 8px 12px; border-radius: 10px; min-width: 220px; letter-spacing: 0.05em; }
.eqa-type input.is-ok { border-color: #34d399; background: #f0fdf4; }
.eqa-ok { color: #047857; font-weight: 800; }
.eqa-no { color: #b45309; font-weight: 800; text-decoration: underline; }
.eqa-gapin { text-align: center; text-transform: uppercase; padding: 0; font-family: inherit; }
.eqa-gapin.is-correct { border-color: #34d399; background: #f0fdf4; }
.eqa-gapin.is-wrong { animation: eq-shake 0.4s ease; border-color: #f59e0b; }
.eqa-balloons { font-size: 1.8rem; letter-spacing: 2px; }
.eqa-keys { display: grid; grid-template-columns: repeat(9, minmax(0, 40px)); gap: 6px; }
.eqa-key { height: 42px; border-radius: 8px; border: 2px solid #cbd5e1; background: #fff; font-weight: 800; font-size: 1rem; cursor: pointer; }
.eqa-key.is-right { background: var(--eq-emerald-subtle); border-color: #34d399; }
.eqa-key.is-wrong { background: #f1f5f9; color: #94a3b8; }
.eqa-ws { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.eqa-grid { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 36px)); gap: 3px; }
.eqa-cell { aspect-ratio: 1; border: 1px solid var(--eq-border); background: #fff; border-radius: 6px; font-weight: 800; font-size: 1rem; cursor: pointer; padding: 0; }
.eqa-cell.is-start { background: #fde68a; }
.eqa-cell.is-found { background: #a7f3d0; color: #064e3b; }
.eqa-wlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-weight: 800; font-size: 1.05rem; }
.eqa-wlist li.is-found { text-decoration: line-through; color: #047857; }
.eqa-mem { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; width: 100%; }
.eqa-mcard { position: relative; min-height: 96px; border: 0; border-radius: 14px; background: #4338ca; color: #fff; cursor: pointer; padding: 8px; font-weight: 700; font-size: 0.92rem; perspective: 600px; }
.eqa-mcard .eqa-face { display: none; }
.eqa-mcard .eqa-back { font-size: 2rem; }
.eqa-mcard.is-open { background: #fff; color: #0f172a; border: 2px solid #c7d2fe; }
.eqa-mcard.is-open .eqa-face { display: block; }
.eqa-mcard.is-open .eqa-back { display: none; }
.eqa-mcard.is-matched { background: var(--eq-emerald-subtle); border-color: #34d399; color: #065f46; }
.eqa-sky { position: relative; height: 230px; width: 100%; overflow: hidden; border-radius: 16px; background: linear-gradient(#e0f2fe, #f0f9ff); display: flex; justify-content: space-around; align-items: flex-end; }
.eqa-balloon { --c: #6366f1; position: relative; width: 112px; height: 132px; border: 0; background: none; cursor: pointer; animation: eqa-rise 3.2s ease-in-out infinite alternate; animation-delay: var(--d); }
.eqa-balloon span { display: grid; place-items: center; width: 108px; height: 120px; border-radius: 50% 50% 46% 46%; background: var(--c); color: #fff; font-weight: 800; font-size: 0.9rem; padding: 8px; box-sizing: border-box; box-shadow: inset -8px -10px 0 rgba(0, 0, 0, 0.12); }
.eqa-balloon::after { content: ''; position: absolute; left: 50%; bottom: -14px; width: 1px; height: 22px; background: #64748b; }
.eqa-balloon.is-pop { animation: eqa-pop 0.4s ease forwards; }
.eqa-balloon.is-wrong { animation: eq-shake 0.4s ease; }
@keyframes eqa-rise { from { transform: translateY(12px); } to { transform: translateY(-70px); } }
@keyframes eqa-pop { to { transform: scale(1.5); opacity: 0; } }
.eqa-tf .eq-btn-small { min-width: 130px; font-size: 1.05rem; }
.eqa-false { border-color: #fcd34d; color: #92400e; }
.eqa-reflect { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.eqa-feel { display: grid; justify-items: center; gap: 4px; min-width: 130px; padding: 14px; border: 2px solid var(--eq-border); border-radius: 16px; background: #fff; cursor: pointer; font-weight: 800; }
.eqa-feel span { font-size: 2.4rem; }
.eqa-feel.is-on { border-color: #4338ca; background: #eef2ff; }
.eqa-note { display: grid; gap: 6px; font-weight: 700; color: var(--eq-muted); }
.eqa-note textarea { width: 100%; box-sizing: border-box; border-radius: 12px; padding: 8px 10px; }
@media (max-width: 640px) {
  .eqa-bins { grid-template-columns: 1fr; }
  .eqa-mem { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .eqa-keys { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .eqa-grid { grid-template-columns: repeat(var(--n), minmax(0, 1fr)); }
  .eqa-balloon { width: 92px; }
  .eqa-balloon span { width: 88px; height: 100px; font-size: 0.78rem; }
}

/* ---------------------------------------------------------------- welcome screen (welcome.js) */
.mw-overlay { position: fixed; inset: 0; z-index: 300; background: rgba(15, 23, 42, 0.55); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 16px; animation: mw-in 0.25s ease; }
@keyframes mw-in { from { opacity: 0; } to { opacity: 1; } }
.mw-card { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: #fff; border-radius: 22px; box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35); padding: 0 0 20px; animation: mw-up 0.35s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes mw-up { from { transform: translateY(18px) scale(0.98); } to { transform: none; } }
.mw-top { display: flex; align-items: center; gap: 16px; padding: 22px 24px; background: linear-gradient(135deg, #1e1b4b 0%, #312e81 60%, #4338ca 100%); color: #fff; border-radius: 22px 22px 0 0; }
.mw-head { border: 0; background: none; padding: 0; cursor: pointer; flex: 0 0 auto; position: relative; }
.mw-head svg { width: 84px; height: 87px; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.35)); }
.mw-head.is-talking svg { animation: eq-nod 1.6s ease-in-out infinite; }
.mw-head .eq-eyes { transform-box: fill-box; transform-origin: center; animation: eq-blink 5s infinite; }
.mw-head.is-waiting::after { content: '🔊 Tap me'; position: absolute; top: -6px; right: -12px; background: #f59e0b; color: #1e1b4b; font-size: 0.7rem; font-weight: 800; padding: 3px 7px; border-radius: 10px; }
.mw-kicker { margin: 0; font-size: 0.78rem; font-weight: 700; color: #c7d2fe; text-transform: uppercase; letter-spacing: 0.05em; }
.mw-hello h2 { margin: 2px 0 4px; font-size: 1.6rem; color: #fff; }
.mw-sub { margin: 0; color: #e0e7ff; font-size: 0.98rem; }
.mw-plan { list-style: none; margin: 18px 20px 6px; padding: 0; display: grid; gap: 10px; }
.mw-item { width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; background: #f8fafc; border: 2px solid #e2e8f0; border-radius: 14px; padding: 12px 14px; cursor: pointer; font: inherit; color: #0f172a; }
.mw-item:hover { border-color: #818cf8; background: #fff; }
.mw-item.is-done { background: #f0fdf4; border-color: #bbf7d0; }
.mw-ic { width: 44px; height: 44px; border-radius: 12px; background: #eef2ff; display: grid; place-items: center; font-size: 1.4rem; flex: 0 0 auto; }
.mw-text { display: grid; gap: 2px; flex: 1 1 auto; min-width: 0; }
.mw-text strong { font-size: 1rem; }
.mw-text small { color: #5b6577; }
.mw-state { font-weight: 900; color: #4338ca; font-size: 1.1rem; }
.mw-item.is-done .mw-state { color: #059669; }
.mw-note { margin: 8px 24px 0; color: #5b6577; font-size: 0.9rem; }
.mw-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 24px 0; }
@media (max-width: 640px) {
  .mw-top { flex-direction: column; text-align: center; padding: 18px; }
  .mw-hello h2 { font-size: 1.35rem; }
  .mw-actions .btn { flex: 1 1 100%; }
}

.eq-tt-writing h3 { margin: 14px 0 6px; font-size: 0.95rem; }
.eq-tt-writing ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.eq-tt-writing li { background: #f8fafc; border-radius: 8px; padding: 8px 10px; }
.eq-tt-writing small { display: block; color: var(--muted, #5f6b7d); font-size: 0.76rem; }

/* sidebar icon */
.st-ic[data-icon="english-quest"] {
  --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 2 3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------- small screens */
@media (max-width: 640px) {
  .eq-prog-part { min-width: 60px; padding: 6px 8px; }
  .eq-prog-label { font-size: 0.7rem; }
  .eq-learn-big { font-size: 1.12rem; }
  .eq-foot .eq-btn-next { flex: 1 1 auto; }
  .eq-today { grid-template-columns: 1fr; justify-items: start; padding: 18px 16px; }
  .eq-today-art { width: 120px; height: 120px; }
  .eq-today-art svg { width: 100px; height: 100px; }
  .eq-today h2 { font-size: 1.4rem; }
  .eq-today-steps li { min-width: 48px; }
  .eq-journey { grid-template-columns: 1fr 1fr; }
  .eq-btn-big { width: 100%; }
  .eq-hero { padding: 14px; }
  .eq-head { width: 72px; }
  .eq-head svg { width: 70px; height: 72px; }
  .eq-bubble { font-size: 0.95rem; }
  .eq-coach { flex-basis: 100%; }
  .eq-stats { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .eq-stat-goal { grid-column: 1 / -1; justify-content: center; }
  .eq-cycle-nav { grid-template-columns: repeat(3, 1fr); }
  .eq-stage-card { padding: 18px 14px; }
  .eq-karaoke-text, .eq-target-text-card { font-size: 1.12rem; }
  .eq-coach-metrics { grid-template-columns: 1fr; }
  .eq-speed-match-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .eq-sm-card { font-size: 0.88rem; padding: 10px; }
  .eq-letter-slot { width: 32px; height: 42px; font-size: 1.15rem; }
  .eq-letter-tile { width: 42px; height: 48px; font-size: 1.25rem; }
  .eq-stars-row { gap: 6px; }
  .eq-star-card small { font-size: 0.72rem; }
  .eq-dash { flex-wrap: wrap; }
  .eq-dash-go { width: 100%; }
  .eq-bottom-actions .eq-btn-next { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .eq-container *, .eq-float-gem { animation: none !important; transition: none !important; }
}
