/* ── Fast Exercises: Multi-category System ─────────────────────────────── */

/* Align material symbols icons with adjacent text */
.fe-section .material-symbols-outlined {
  vertical-align: middle;
}

/* Accessibility utility */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Loading */
.fe-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
}
.fe-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(45, 46, 95, 0.1);
  border-top-color: var(--primary, #3b82f6);
  border-radius: 50%;
  animation: feSpin 0.8s linear infinite;
}
@keyframes feSpin {
  to { transform: rotate(360deg); }
}

.fe-error {
  text-align: center;
  padding: 40px;
  color: var(--text-medium, #64748b);
  font-size: 1rem;
}

/* ── Categories Grid ──────────────────────────────────────────────────── */
.fe-section {
  width: 100%;
}
.fe-categories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 8px;
}
.fe-category-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(45, 46, 95, 0.08);
  border-radius: 20px;
  padding: 22px;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 4px 20px rgba(45, 46, 95, 0.07);
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-left: 3px solid var(--cat-color, #3b82f6);
}
.fe-category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(45, 46, 95, 0.12);
  border-color: var(--cat-color, #3b82f6);
}
.fe-category-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
}
.fe-category-icon {
  font-size: 2rem;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(45, 46, 95, 0.04);
  border-radius: 16px;
}
.fe-category-info {
  flex: 1;
  min-width: 0;
}
.fe-category-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-dark, #0f172a);
}
.fe-category-stats {
  font-size: 0.8rem;
  color: var(--text-medium, #64748b);
  margin-top: 2px;
}
.fe-category-progress {
  display: flex;
  align-items: center;
  gap: 10px;
}
.fe-progress-bar-bg {
  flex: 1;
  height: 8px;
  background: rgba(45, 46, 95, 0.08);
  border-radius: 8px;
  overflow: hidden;
}
.fe-progress-bar-fill {
  height: 100%;
  border-radius: 8px;
  transition: width 0.6s ease;
  min-width: 0;
}
.fe-progress-text {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-medium, #64748b);
  white-space: nowrap;
}
.fe-category-btn {
  width: 100%;
  padding: 10px 20px;
  border: none;
  border-radius: 14px;
  color: #fff;
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.fe-category-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}
.fe-cat-level-btns {
  display: flex;
  gap: 8px;
}
.fe-cat-level-btn {
  flex: 1;
  padding: 8px 4px;
  border: none;
  border-radius: 10px;
  color: #fff;
  font-weight: 800;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.03em;
}
.fe-cat-level-btn:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}
.fe-cat-level-btn-locked {
  opacity: 0.4;
  cursor: not-allowed;
}
.fe-cat-level-btns-header {
  flex-direction: column;
  align-self: center;
  flex-shrink: 0;
  gap: 6px;
}
.fe-cat-level-btns-header .fe-cat-level-btn {
  flex: none;
  padding: 6px 14px;
  min-width: 52px;
  text-align: center;
}

.fe-cat-level-btn.fe-cat-level-btn--icon {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  line-height: 1;
  min-height: 44px;
}
.fe-cat-level-btn.fe-cat-level-btn--icon .material-symbols-outlined {
  font-size: 1.1rem;
  line-height: 1;
}
.fe-cat-level-btn-label {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.subpage-header--with-levels .subpage-header-core {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

@media (min-width: 769px) {
  .fe-subpage-level-row {
    display: none !important;
  }
}

@media (max-width: 768px), (max-height: 520px) and (orientation: landscape) and (max-width: 1024px) {
  .subpage-header--with-levels {
    flex-wrap: nowrap;
    align-items: flex-start;
    padding: 10px 12px;
    gap: 8px;
    margin-bottom: 12px;
    border-radius: 14px;
  }

  .subpage-header--with-levels .subpage-back-btn {
    width: 36px;
    min-width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .subpage-header--with-levels .subpage-back-btn .material-symbols-outlined {
    font-size: 1.1rem;
  }

  .subpage-header--with-levels .subpage-header-core {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .subpage-header--with-levels .subpage-header-titles .subpage-title {
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    line-height: 1.25;
  }

  .subpage-header--with-levels .subpage-subtitle {
    display: none;
  }

  .subpage-header--with-levels .subpage-info-btn {
    align-self: flex-start;
  }

  /* Level pills: fixed strip above safe area (matches mobile-bottom-nav feel) */
  .subpage-header--with-levels .fe-cat-level-btns-header,
  .subpage-header--with-levels .fe-subpage-level-row {
    position: fixed;
    left: 0;
    right: 0;
    bottom: max(10px, env(safe-area-inset-bottom, 0px));
    z-index: 1190;
    flex-direction: row !important;
    align-self: stretch !important;
    width: auto !important;
    margin: 0 10px;
    padding: 6px 8px;
    justify-content: stretch;
    gap: 6px;
    border-radius: 16px;
    border: 1px solid rgba(45, 46, 95, 0.1);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -4px 22px rgba(45, 46, 95, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .subpage-header--with-levels .fe-cat-level-btns-header .fe-cat-level-btn,
  .subpage-header--with-levels .fe-subpage-level-row .fe-subpage-lv-btn {
    flex: 1;
    min-width: 0;
  }

  .dashboard-center .fe-section:has(.subpage-header--with-levels) {
    padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px));
  }

  .fe-section.fe-mobile-lesson-drill-active .fe-subpage-level-row,
  .fe-section.fe-mobile-lesson-drill-active .fe-cat-level-btns-header {
    display: none !important;
  }

  .fe-subpage-level-row {
    display: flex;
    flex-direction: row;
    gap: 6px;
    width: 100%;
    flex-wrap: nowrap;
  }

  .fe-subpage-lv-btn {
    flex: 1;
    min-width: 0;
    padding: 6px 4px;
    border-radius: 10px;
    border: 1.5px solid rgba(45, 46, 95, 0.12);
    background: rgba(45, 46, 95, 0.04);
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--text-dark, #0f172a);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
  }

  .fe-subpage-lv-btn.active {
    background: var(--lv-color, #3b82f6);
    border-color: transparent;
    color: #fff;
  }

  .fe-subpage-lv-btn.fe-subpage-lv-locked {
    opacity: 0.45;
    cursor: not-allowed;
  }
}

/* ── Category Info Widget (Left Sidebar) ──────────────────────────────── */
.fe-info-widget {
  border-top: 3px solid var(--cat-color, #3b82f6);
}
.fe-info-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.fe-info-icon {
  font-size: 1.6rem;
}
.fe-info-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-dark, #0f172a);
}
.fe-info-subtitle {
  font-size: 0.82rem;
  color: var(--text-medium, #64748b);
}
.fe-info-progress-wrap {
  margin-bottom: 18px;
}
.fe-info-progress-text {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-medium, #64748b);
  margin-top: 6px;
}
.fe-level-selector-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-dark, #0f172a);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.fe-level-selector {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.fe-level-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  transition: all 0.2s;
  cursor: default;
}
.fe-level-unlocked {
  cursor: pointer;
}
.fe-level-unlocked:hover {
  background: rgba(45, 46, 95, 0.04);
}
.fe-level-active {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  cursor: pointer;
}
.fe-level-locked {
  opacity: 0.5;
}
.fe-level-icon {
  font-size: 1rem;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}
.fe-level-label {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.fe-level-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-dark, #0f172a);
}
.fe-level-pct {
  font-size: 0.78rem;
  color: var(--text-medium, #64748b);
}
.fe-info-stats {
  padding-top: 12px;
  border-top: 1px solid rgba(45, 46, 95, 0.08);
}
.fe-info-stat {
  font-size: 0.82rem;
  color: var(--text-medium, #64748b);
  font-weight: 600;
}

/* ── Vertical Progression Map ─────────────────────────────────────────── */
.fe-map-container {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 8px 0;
}
.fe-map-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-medium, #64748b);
  font-size: 1rem;
  background: rgba(255,255,255,0.8);
  border-radius: 20px;
  margin: 10px 0;
}
.fe-map-lesson {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(45, 46, 95, 0.08);
  border-radius: 20px;
  padding: 14px 16px;
  box-shadow: 0 4px 16px rgba(45, 46, 95, 0.06);
  transition: all 0.25s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.fe-map-lesson.fe-lesson-complete {
  border-left: 4px solid #10b981;
}
.fe-map-lesson.fe-lesson-active {
  border-left: 4px solid #3b82f6;
  box-shadow: 0 4px 24px rgba(59, 130, 246, 0.12);
}
.fe-map-lesson.fe-lesson-pending {
  border-left: 4px solid rgba(45, 46, 95, 0.1);
}
.fe-map-lesson.fe-lesson-locked {
  border-left: 4px solid rgba(45, 46, 95, 0.08);
  opacity: 0.55;
  pointer-events: none;
}
.fe-map-lesson-lock {
  display: inline-flex;
  align-items: center;
  color: var(--text-medium, #64748b);
  font-size: 0.95rem;
}
.fe-map-lesson-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
  min-width: 0;
}
.fe-map-lesson-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-medium, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.fe-map-lesson-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-dark, #0f172a);
}

/* Dots row - horizontal within a lesson */
.fe-map-points-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 1;
  min-width: 0;
}

/* Review row - full-width row inside the points row */
.fe-review-row {
  width: 100%;
  margin-top: 10px;
  border: 1px solid rgba(245, 158, 11, 0.2);
  background: rgba(245, 158, 11, 0.04);
}
.fe-review-row.fe-level-active {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.25);
}
.fe-review-row .fe-level-icon {
  color: #f59e0b;
}
.fe-review-row.fe-level-active .fe-level-icon {
  color: #10b981;
}

/* Map connector between lessons */
.fe-map-connector {
  display: flex;
  justify-content: center;
  padding: 4px 0;
}
.fe-map-connector::after {
  content: '';
  width: 3px;
  height: 20px;
  background: rgba(45, 46, 95, 0.12);
  border-radius: 3px;
  display: block;
}

/* Dots */
.fe-dot {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
  flex-shrink: 0;
  position: relative;
  border: 3px solid transparent;
}
.fe-dot:hover:not(.fe-dot-locked) {
  transform: scale(1.15);
  z-index: 2;
}
.fe-dot-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.fe-dot-label {
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
}
.fe-dot-explanation {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
  border-color: rgba(59, 130, 246, 0.3);
}
.fe-dot-exercise {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
  border-color: rgba(59, 130, 246, 0.3);
}
.fe-dot-review {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.3);
}
.fe-dot-trophy {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}
.fe-dot-done {
  background: rgba(16, 185, 129, 0.18) !important;
  color: #059669 !important;
  border-color: #10b981 !important;
}
.fe-dot-in-progress {
  background: rgba(59, 130, 246, 0.18) !important;
  color: #2563eb !important;
  border-color: #3b82f6 !important;
}
.fe-dot-locked {
  background: rgba(45, 46, 95, 0.06) !important;
  color: rgba(45, 46, 95, 0.25) !important;
  border-color: rgba(45, 46, 95, 0.1) !important;
  cursor: default;
}
.fe-dot-mini {
  width: 22px;
  height: 22px;
  font-size: 0.65rem;
  display: inline-flex;
  cursor: default;
}

/* Map lines between dots */
.fe-map-line {
  width: 20px;
  height: 3px;
  background: rgba(45, 46, 95, 0.12);
  border-radius: 3px;
  flex-shrink: 0;
}
.fe-map-line.fe-line-review {
  background: rgba(245, 158, 11, 0.4);
  height: 4px;
}

/* Compact dots — applied when a points row would overflow one line */
.fe-map-points-row.fe-dots-compact {
  flex-wrap: nowrap;
}
.fe-map-points-row.fe-dots-compact .fe-dot {
  width: 32px;
  height: 32px;
  font-size: 0.8rem;
  border-width: 2px;
}
.fe-map-points-row.fe-dots-compact .fe-dot .material-symbols-outlined {
  font-size: 0.95rem;
}
.fe-map-points-row.fe-dots-compact .fe-map-line {
  width: 10px;
}

/* Legend */
.fe-map-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 16px;
  padding: 12px;
  background: rgba(255,255,255,0.8);
  border-radius: 14px;
  flex-wrap: wrap;
}
.fe-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-medium, #64748b);
  font-weight: 600;
}

/* ── Quick Review Widget (Right Sidebar) ──────────────────────────────── */
.fe-review-widget {
  /* inherits sidebar-widget */
}
.fe-review-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-dark, #0f172a);
  margin-bottom: 4px;
}
.fe-review-subtitle {
  font-size: 0.82rem;
  color: var(--text-medium, #64748b);
  margin-bottom: 14px;
}
.fe-review-btn {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 12px;
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.fe-review-btn:hover {
  filter: brightness(1.1);
}
.fe-qr-complete-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}
.fe-qr-complete-actions .fe-point-next-btn {
  width: 100%;
  max-width: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.fe-qr-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 24px;
  border: 2px solid rgba(45, 46, 95, 0.15);
  border-radius: 14px;
  background: transparent;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-medium, #64748b);
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  max-width: 280px;
}
.fe-qr-back-btn:hover {
  border-color: rgba(45, 46, 95, 0.3);
  color: var(--text-dark, #0f172a);
}

/* ── Bottom Progress Bar ──────────────────────────────────────────────── */
.fe-bottom-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(45, 46, 95, 0.08);
  border-radius: 16px;
  padding: 12px 20px;
  margin-top: 0;
  box-shadow: 0 2px 12px rgba(45, 46, 95, 0.06);
}
.fe-bottom-breadcrumb {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-medium, #64748b);
  white-space: nowrap;
  flex-shrink: 0;
}
.fe-bottom-progress {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}
.fe-bottom-progress-bg {
  flex: 1;
  height: 10px;
}
.fe-bottom-pct {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-dark, #0f172a);
  white-space: nowrap;
}
.fe-bottom-continue-btn {
  padding: 8px 20px;
  border: none;
  border-radius: 12px;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.fe-bottom-continue-btn:hover {
  filter: brightness(1.1);
}

/* ── Point Views (Explanation, Exercise) ──────────────────────────────── */
.fe-point-view {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px;
}
.fe-point-card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(45, 46, 95, 0.08);
}
.fe-point-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}
.fe-point-message {
  font-size: 1rem;
  color: var(--text-medium, #64748b);
  margin-bottom: 24px;
  line-height: 1.6;
}
.fe-point-next-btn {
  padding: 12px 32px;
  border: none;
  border-radius: 14px;
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
}
.fe-point-next-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* Explanation Card */
.fe-explanation-card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 4px 20px rgba(45, 46, 95, 0.08);
  border-top: 4px solid var(--cat-color, #3b82f6);
}
.fe-explanation-verb {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--text-dark, #0f172a);
  margin-bottom: 10px;
}
.fe-explanation-def {
  font-size: 1.05rem;
  color: var(--text-dark, #0f172a);
  line-height: 1.6;
  margin-bottom: 18px;
}
.fe-explanation-examples h4,
.fe-explanation-related h4 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-dark, #0f172a);
  margin: 0 0 8px 0;
}
.fe-example-list {
  list-style: none;
  padding: 0;
  margin: 0 0 14px 0;
}
.fe-example-list li {
  padding: 8px 14px;
  margin-bottom: 6px;
  background: rgba(45, 46, 95, 0.03);
  border-radius: 12px;
  font-size: 0.92rem;
  color: var(--text-dark, #0f172a);
  line-height: 1.5;
  border-left: 3px solid var(--cat-color, #3b82f6);
}
.fe-explanation-related {
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px dashed rgba(45, 46, 95, 0.1);
  margin-bottom: 20px;
}

/* Exercise Card */
.fe-exercise-card {
  background: rgba(255, 255, 255, 0.98);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 4px 24px rgba(45, 46, 95, 0.1);
  border-top: 4px solid var(--cat-color, #3b82f6);
}
.fe-quiz-progress-bar {
  height: 8px;
  background: rgba(45, 46, 95, 0.08);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 24px;
}
.fe-quiz-progress-fill {
  height: 100%;
  border-radius: 8px;
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  width: 0%;
}
.fe-quiz-question {
  animation: feSlideIn 0.3s ease;
}
@keyframes feSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
/* ── New micro-interaction animations ─────────────────────────────── */
@keyframes feBounceIn {
  0%   { opacity: 0; transform: scale(0.75); }
  55%  { opacity: 1; transform: scale(1.06); }
  80%  { opacity: 1; transform: scale(0.97); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes feShake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-7px); }
  40%       { transform: translateX(7px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}
@keyframes feCorrectPulse {
  0%   { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.45); }
  70%  { box-shadow: 0 0 0 10px rgba(5, 150, 105, 0); }
  100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
}
@keyframes feCompleteIcon {
  0%   { transform: scale(0) rotate(-20deg); opacity: 0; }
  60%  { transform: scale(1.2) rotate(5deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
.fe-quiz-num {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-medium, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.fe-quiz-sentence {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark, #0f172a);
  line-height: 1.65;
  margin-bottom: 22px;
}
.fe-quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
/* ── Quiz option button — WCAG 2.5.5: min 44px touch target ─── */
.fe-quiz-option {
  padding: 13px 20px;
  min-height: 48px;
  border: 2px solid rgba(45, 46, 95, 0.12);
  border-radius: 14px;
  background: #fff;
  font-size: 0.97rem;
  font-weight: 600;
  color: var(--text-dark, #0f172a);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.18s, background 0.18s;
  text-align: left;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
}
.fe-quiz-option:focus-visible {
  outline: 3px solid var(--cat-color, #3b82f6);
  outline-offset: 2px;
}
.fe-quiz-option:hover:not(:disabled) {
  border-color: var(--cat-color, #3b82f6);
  background: rgba(59, 130, 246, 0.04);
  transform: translateX(5px);
  box-shadow: 0 3px 14px rgba(45, 46, 95, 0.1);
}
.fe-quiz-option:active:not(:disabled) {
  transform: scale(0.98);
}
.fe-quiz-option:disabled {
  cursor: default;
  opacity: 0.85;
}
/* Correct: green with bounce + subtle pulse ring */
.fe-quiz-option.fe-quiz-correct {
  border-color: #059669;
  background: rgba(5, 150, 105, 0.09);
  color: #064e3b;
  font-weight: 700;
  animation: feBounceIn 0.4s ease forwards, feCorrectPulse 0.8s ease 0.3s;
}
/* Wrong: amber — constructive, non-punitive tone */
.fe-quiz-option.fe-quiz-wrong {
  border-color: #d97706;
  background: rgba(217, 119, 6, 0.07);
  color: #78350f;
  animation: feShake 0.4s ease;
}
.fe-quiz-feedback {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-radius: 14px;
  margin-top: 14px;
  font-size: 0.93rem;
  font-weight: 600;
  line-height: 1.5;
  animation: feSlideIn 0.35s ease;
}
/* Correct feedback — green, clear positive */
.fe-quiz-feedback-correct {
  background: rgba(5, 150, 105, 0.09);
  color: #064e3b;
  border: 1.5px solid rgba(5, 150, 105, 0.22);
}
/* Wrong feedback — amber/warm, constructive */
.fe-quiz-feedback-wrong {
  background: rgba(217, 119, 6, 0.08);
  color: #78350f;
  border: 1.5px solid rgba(217, 119, 6, 0.22);
}
.fe-quiz-feedback-stack {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
.fe-quiz-feedback-wrong-line {
  display: flex;
  align-items: center;
  gap: 8px;
}
.fe-quiz-correct-answer-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(5, 150, 105, 0.08);
  border: 1px solid rgba(5, 150, 105, 0.22);
}
.fe-quiz-correct-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #059669;
}
.fe-quiz-correct-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: #064e3b;
  word-break: break-word;
}
.fe-quiz-continue-wrap {
  margin-top: 16px;
  display: flex;
  justify-content: center;
}
.fe-quiz-continue-btn {
  border: none;
  border-radius: 14px;
  padding: 12px 28px;
  min-height: 48px;
  font-weight: 800;
  font-size: 0.95rem;
  color: #fff;
  background: var(--cat-color, #3b82f6);
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.fe-quiz-continue-btn:active {
  transform: scale(0.98);
}
.fe-quiz-complete-section {
  text-align: center;
  padding: 32px 0 24px;
  animation: feSlideIn 0.4s ease;
}
.fe-quiz-complete-icon {
  font-size: 3.2rem;
  margin-bottom: 14px;
  animation: feCompleteIcon 0.55s ease forwards;
  display: block;
}
.fe-quiz-complete-text {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-dark, #0f172a);
  margin-bottom: 24px;
}



/* ── Learning Time Coming Soon Banner ─────────────────────────────────── */
.lt-coming-soon-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(59, 130, 246, 0.08));
  border: 1px solid rgba(139, 92, 246, 0.18);
  border-radius: 16px;
  margin-bottom: 16px;
}
.lt-coming-soon-banner > .material-symbols-outlined {
  font-size: 2rem;
  color: #8b5cf6;
  flex-shrink: 0;
  margin-top: 2px;
}
.lt-coming-soon-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.lt-coming-soon-text strong {
  font-size: 1.05rem;
  font-weight: 800;
  color: #8b5cf6;
}
.lt-coming-soon-text span {
  font-size: 0.88rem;
  color: var(--text-medium, #64748b);
  line-height: 1.5;
}

/* ══════════════════════════════════════════════════════════════════════════
   PHRASAL VERB 5-POINT LESSON SYSTEM
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Map dots for new PV point types ─────────────────────────────────── */
/* Default: solid gradient fill (for the map dots) */
.fe-dot-pv-gallery  { background: linear-gradient(135deg, #3b82f6, #06b6d4); color: #fff; }
.fe-dot-pv-fill-in  { background: linear-gradient(135deg, #8b5cf6, #ec4899); color: #fff; }
.fe-dot-pv-conv     { background: linear-gradient(135deg, #10b981, #059669); color: #fff; }
.fe-dot-pv-drag     { background: linear-gradient(135deg, #f59e0b, #ef4444); color: #fff; }
.fe-dot-pv-mixed    { background: linear-gradient(135deg, #6366f1, #3b82f6); color: #fff; }

/* Outline style for legend mini-dots: white bg, colored border, icon in border color */
.fe-dot-outline.fe-dot-pv-gallery  { background: #fff; border-color: #3b82f6; color: #3b82f6; overflow: hidden; }
.fe-dot-outline.fe-dot-pv-fill-in  { background: #fff; border-color: #8b5cf6; color: #8b5cf6; overflow: hidden; }
.fe-dot-outline.fe-dot-pv-conv     { background: #fff; border-color: #10b981; color: #10b981; overflow: hidden; }
.fe-dot-outline.fe-dot-pv-drag     { background: #fff; border-color: #f59e0b; color: #f59e0b; overflow: hidden; }
.fe-dot-outline.fe-dot-pv-mixed    { background: #fff; border-color: #6366f1; color: #6366f1; overflow: hidden; }
.fe-dot-outline { border-width: 2px; border-style: solid; }
/* Mini dots (legend) get smaller icon */
.fe-dot-mini.fe-dot-outline .material-symbols-outlined { font-size: 0.65rem; }
/* Full-size outline dots (lesson map) get regular icon size */
.fe-dot:not(.fe-dot-mini).fe-dot-outline .material-symbols-outlined { font-size: 1.1rem; }

/* ── Legend at top (below subpage-header) ─────────────────────────────── */
.fe-map-legend-top {
  margin-top: 4px;
  margin-bottom: 0;
}

/* ── Map page navigation ──────────────────────────────────────────────── */
.fe-map-outer {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.fe-map-outer.fe-map-single-page {
  display: block;
}
.fe-map-page-dots {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 4px;
  align-items: center;
  flex-shrink: 0;
}
.fe-map-page-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(45, 46, 95, 0.15);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
@media (hover: hover) and (pointer: fine) {
  .fe-map-page-dot:hover {
    background: rgba(45, 46, 95, 0.3);
  }
}
.fe-map-page-dot-active {
  background: var(--primary, #3b82f6);
  border-color: rgba(59, 130, 246, 0.3);
  transform: scale(1.2);
}
.fe-map-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.fe-map-page {
  display: none;
}
.fe-map-page.fe-map-page-active {
  display: block;
}
.fe-map-arrow-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 32px;
  border: 1px solid rgba(45, 46, 95, 0.12);
  border-radius: 12px;
  background: rgba(255,255,255,0.9);
  color: var(--text-medium, #64748b);
  cursor: pointer;
  transition: all 0.2s;
  margin: 4px auto;
  font-size: 1.4rem;
}
@media (hover: hover) and (pointer: fine) {
  .fe-map-arrow-btn:hover {
    background: #f1f5f9;
    color: var(--primary, #3b82f6);
    border-color: rgba(59, 130, 246, 0.3);
    transform: scale(1.05);
  }
}
.fe-map-arrow-btn .material-symbols-outlined { font-size: 1.4rem; }

/* Mobile: scroll all lessons vertically (no drill-in roadmap) */
.fe-map-mobile-back {
  display: none !important;
}

@media (max-width: 768px) {
  .fe-map-outer .fe-map-page-dots,
  .fe-map-outer .fe-map-arrow-btn {
    display: none !important;
  }
  .fe-map-outer .fe-map-page {
    display: block !important;
    margin-bottom: 18px;
  }
  .fe-map-outer .fe-map-page:last-of-type {
    margin-bottom: 0;
  }
  .fe-map-outer .fe-map-main {
    width: 100%;
    min-width: 0;
  }
  .fe-map-legend-top {
    display: none !important;
  }
  .fe-map-container .fe-map-lesson {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 14px;
    min-width: 0;
  }
  .fe-map-container .fe-map-lesson .fe-map-points-row,
  .cu-unit-section .fe-map-lesson .fe-map-points-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    padding: 2px 0 6px;
  }
  .fe-map-container .fe-map-lesson .fe-map-points-row .fe-map-line,
  .cu-unit-section .fe-map-lesson .fe-map-points-row .fe-map-line {
    display: none !important;
  }
  .fe-map-container .fe-map-lesson .fe-map-points-row > .fe-dot,
  .cu-unit-section .fe-map-lesson .fe-map-points-row > .fe-dot {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    border-width: 2px;
  }
  .fe-map-container .fe-map-lesson .fe-map-points-row > .fe-dot .material-symbols-outlined,
  .cu-unit-section .fe-map-lesson .fe-map-points-row > .fe-dot .material-symbols-outlined {
    font-size: 0.82rem;
  }
  .fe-map-container .fe-map-lesson .fe-map-points-row > .fe-review-row,
  .cu-unit-section .fe-map-lesson .fe-map-points-row > .fe-review-row {
    width: auto;
    max-width: min(200px, 46vw);
    flex: 0 0 auto;
    margin-top: 0;
    margin-left: 2px;
    padding: 5px 8px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
  }
  .fe-map-container .fe-map-lesson .fe-map-points-row > .fe-review-row .fe-level-name,
  .cu-unit-section .fe-map-lesson .fe-map-points-row > .fe-review-row .fe-level-name {
    font-size: 0.72rem;
  }
  .fe-map-container .fe-map-lesson .fe-map-points-row > .fe-review-row .fe-level-pct,
  .cu-unit-section .fe-map-lesson .fe-map-points-row > .fe-review-row .fe-level-pct {
    font-size: 0.65rem;
  }
  .fe-map-container .fe-map-lesson .fe-map-points-row .fe-dot-section-marker .fe-dot-label,
  .cu-unit-section .fe-map-lesson .fe-map-points-row .fe-dot-section-marker .fe-dot-label {
    font-size: 0.52rem;
    font-weight: 800;
    line-height: 1.05;
    max-width: 24px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
  }
  .fe-map-lesson-title {
    cursor: default;
    -webkit-tap-highlight-color: transparent;
  }
}

/* ── Profile avatar in conversations ─────────────────────────────────── */
.pv-conv-avatar.pv-avatar-has-photo {
  background: transparent;
  color: transparent;
  overflow: hidden;
  padding: 0;
  position: relative;
}
.pv-avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* ── Clickable phrasal verb highlight ────────────────────────────────── */
.pv-highlight-clickable {
  cursor: pointer;
  text-decoration: underline dotted;
  text-underline-offset: 2px;
  transition: opacity 0.15s;
}
.pv-highlight-clickable:hover {
  opacity: 0.8;
  text-decoration: underline solid;
}

/* ── PV Verb Definition Popup ─────────────────────────────────────────── */
.pv-verb-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  backdrop-filter: blur(2px);
}
.pv-verb-popup-card {
  background: #fff;
  border-radius: 20px;
  padding: 28px 28px 24px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.18);
  position: relative;
  animation: pvPopupIn 0.2s ease;
}
@keyframes pvPopupIn {
  from { opacity: 0; transform: scale(0.92) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.pv-verb-popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(45, 46, 95, 0.06);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-medium, #64748b);
  transition: all 0.2s;
}
.pv-verb-popup-close:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}
.pv-verb-popup-close .material-symbols-outlined { font-size: 1.1rem; }
.pv-verb-popup-badge {
  display: inline-block;
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
}
.pv-verb-popup-verb {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--primary, #3b82f6);
  margin-bottom: 10px;
  padding-right: 36px;
}
.pv-verb-popup-def {
  font-size: 0.95rem;
  color: var(--text-dark, #0f172a);
  line-height: 1.6;
  margin-bottom: 14px;
}
.pv-verb-popup-examples {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pv-verb-popup-examples li {
  font-size: 0.88rem;
  color: var(--text-medium, #64748b);
  padding: 8px 12px;
  background: rgba(59, 130, 246, 0.05);
  border-left: 3px solid var(--primary, #3b82f6);
  border-radius: 0 8px 8px 0;
  line-height: 1.5;
  font-style: italic;
}


.subpage-header-titles { flex: 1; min-width: 0; }
.subpage-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.subpage-title .material-symbols-outlined { font-size: 1.2rem; flex-shrink: 0; }

.subpage-info-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(45, 46, 95, 0.14);
  background: rgba(45, 46, 95, 0.04);
  color: var(--text-medium, #64748b);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  margin-left: auto;
}
.subpage-info-btn:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: #3b82f6;
  color: #3b82f6;
}
.subpage-info-btn .material-symbols-outlined { font-size: 1.2rem; }

/* ── Reset level button ───────────────────────────────────────────────── */
.fe-reset-level-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  width: 100%;
  padding: 8px 14px;
  margin-top: 10px;
  border: 1.5px solid rgba(239, 68, 68, 0.25);
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.06);
  color: #ef4444;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.fe-reset-level-btn:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.4);
}
.fe-reset-level-btn .material-symbols-outlined { font-size: 1rem; }

/* ── PV Info Modal ────────────────────────────────────────────────────── */
.pv-info-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}
.pv-info-modal-box {
  background: #fff;
  border-radius: 24px;
  max-width: 560px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.2);
  overflow: hidden;
  animation: pvModalIn 0.25s ease;
}
@keyframes pvModalIn {
  from { opacity: 0; transform: scale(0.92) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.pv-info-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(45, 46, 95, 0.08);
}
.pv-info-modal-icon .material-symbols-outlined {
  font-size: 1.6rem;
  color: #3b82f6;
}
.pv-info-modal-title {
  flex: 1;
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text-dark, #0f172a);
  margin: 0;
}
.pv-info-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(45, 46, 95, 0.06);
  color: var(--text-medium, #64748b);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.pv-info-modal-close:hover { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.pv-info-modal-close .material-symbols-outlined { font-size: 1.1rem; }
.pv-info-modal-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 60vh;
  overflow-y: auto;
}
.pv-info-modal-body p {
  font-size: 0.93rem;
  color: var(--text-dark, #0f172a);
  line-height: 1.65;
  margin: 0;
}
.pv-info-example {
  background: rgba(59, 130, 246, 0.07);
  border-left: 3px solid #3b82f6;
  border-radius: 0 10px 10px 0;
  padding: 10px 14px !important;
  display: flex !important;
  align-items: flex-start !important;
  gap: 8px !important;
}
.pv-info-example .material-symbols-outlined { font-size: 1rem; color: #3b82f6; flex-shrink: 0; margin-top: 2px; }
.pv-info-list {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pv-info-list li {
  font-size: 0.9rem;
  color: var(--text-dark, #0f172a);
  line-height: 1.5;
}
.pv-info-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(45, 46, 95, 0.08);
  display: flex;
  justify-content: flex-end;
}
.pv-info-modal-btn {
  padding: 10px 24px;
  border: none;
  border-radius: 14px;
  background: #3b82f6;
  color: #fff;
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  transition: filter 0.2s;
  font-family: inherit;
}
.pv-info-modal-btn:hover { filter: brightness(1.1); }

/* ── PV Lesson Info Modal ────────────────────────────────────────────── */
.pv-lesson-info-level {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-medium, #64748b);
  margin-bottom: 12px !important;
}
.pv-lesson-info-level .material-symbols-outlined { font-size: 1rem; }

.pv-lesson-info-verbs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pv-lesson-info-verb {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  background: rgba(59, 130, 246, 0.05);
  border-radius: 10px;
  border-left: 3px solid rgba(59, 130, 246, 0.3);
}

.pv-lesson-info-verb strong {
  font-size: 0.9rem;
  color: var(--text-dark, #0f172a);
}

.pv-lesson-info-verb span {
  font-size: 0.82rem;
  color: var(--text-medium, #64748b);
  line-height: 1.4;
}

/* ── POINT 1: Phrasal Verb Gallery (single-card mode) ─────────────────── */
.pv-gallery-single-wrap {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 0 8px;
  overflow-x: clip;
  padding-right: 5px;
}

.pv-gallery-cards-area {
  flex: 1;
  min-width: 0;
  position: relative;
}

.pv-gallery-card-single {
  display: none;
  background: #fff;
  border-radius: 20px;
  border: 2px solid var(--cat-color, #3b82f6);
  padding: 28px 28px 38px;
  box-shadow: 0 4px 18px rgba(45, 46, 95, 0.09);
  position: relative;
  transition: transform 0.2s, opacity 0.2s;
}
.pv-gallery-card-single.pv-gallery-card-active {
  display: block;
  animation: pvCardIn 0.2s ease;
}
@keyframes pvCardIn {
  from { opacity: 0.4; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Gallery / Conversation nav dots column ───────────────────────────── */
.pv-gallery-nav-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 0;
  flex-shrink: 0;
}

.pv-gallery-nav-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(45, 46, 95, 0.15);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.pv-gallery-nav-dot:hover {
  background: rgba(45, 46, 95, 0.3);
  transform: scale(1.25);
}
.pv-gallery-nav-dot:hover::after {
  content: attr(title);
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15, 23, 42, 0.85);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 10;
}
.pv-gallery-nav-dot-active {
  background: var(--cat-color, #3b82f6) !important;
  transform: scale(1.2);
}

/* ── Conversations slides ─────────────────────────────────────────────── */
.pv-conversations-slides {
  flex: 1;
  min-width: 0;
}
.pv-conv-slide { display: none; }
.pv-conv-slide.pv-conv-slide-active {
  display: block;
  animation: pvCardIn 0.2s ease;
}

.pv-gallery-card {
  background: #fff;
  border-radius: 20px;
  border: 2px solid var(--cat-color, #3b82f6);
  padding: 24px 26px;
  box-shadow: 0 4px 18px rgba(45, 46, 95, 0.09);
  position: relative;
  transition: transform 0.2s;
}
.pv-gallery-card:hover { transform: translateY(-2px); }

.pv-gallery-verb {
  font-size: 1.55rem;
  font-weight: 900;
  color: var(--cat-color, #3b82f6);
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.pv-gallery-def {
  font-size: 0.97rem;
  color: var(--text-dark, #0f172a);
  line-height: 1.6;
  margin-bottom: 14px;
}

.pv-gallery-examples {
  margin: 0 0 8px;
  padding: 0 0 0 18px;
  list-style: disc;
}
.pv-gallery-examples li {
  font-size: 0.88rem;
  color: var(--text-medium, #64748b);
  line-height: 1.55;
  margin-bottom: 4px;
  font-style: italic;
}

.pv-gallery-num {
  position: absolute;
  top: 16px;
  right: 18px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cat-color, #3b82f6);
  opacity: 0.6;
}

.pv-gallery-footer {
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.pv-gallery-scroll-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.83rem;
  color: var(--text-medium, #64748b);
  text-align: center;
}
.pv-gallery-scroll-hint .material-symbols-outlined {
  font-size: 1rem;
  opacity: 0.7;
}

/* ── POINT 2: Fill in the Gaps ───────────────────────────────────────── */
.pv-fillin-sentence {
  font-size: 1.05rem;
  line-height: 1.65;
  margin-bottom: 16px;
  color: var(--text-dark, #0f172a);
}

.pv-write-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.pv-write-hint {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: rgba(var(--cat-color-rgb, 59, 130, 246), 0.1);
  border: 1px dashed var(--cat-color, #3b82f6);
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--cat-color, #3b82f6);
  letter-spacing: 0.5px;
}

.pv-write-input {
  flex: 1;
  min-width: 120px;
  max-width: 220px;
  padding: 10px 14px;
  border: 2px solid rgba(45, 46, 95, 0.15);
  border-radius: 12px;
  font-size: 0.97rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.pv-write-input:focus { border-color: var(--cat-color, #3b82f6); }
.pv-write-input.pv-write-correct {
  border-color: #10b981;
  background: #f0fdf4;
  color: #065f46;
}
.pv-write-input.pv-write-wrong {
  border-color: #d97706;
  background: #fffbeb;
  color: #78350f;
}

.pv-write-btn {
  padding: 10px 18px;
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
  font-family: inherit;
}
.pv-write-btn:hover { opacity: 0.85; }
.pv-write-btn:disabled { opacity: 0.5; cursor: default; }

/* ── POINT 3: Conversations ──────────────────────────────────────────── */
.pv-conversations-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 12px 0 24px;
}

.pv-conv-block {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 3px 16px rgba(45, 46, 95, 0.08);
  overflow: hidden;
  border: 1px solid rgba(45, 46, 95, 0.07);
}

.pv-conv-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  background: var(--cat-color, #3b82f6);
  color: #fff;
  font-size: 0.96rem;
  font-weight: 800;
}
.pv-conv-title .material-symbols-outlined { font-size: 1.1rem; }

.pv-conv-title-text {
  flex: 1;
  min-width: 0;
}

.pv-conv-num {
  font-size: 0.8rem;
  font-weight: 700;
  opacity: 0.9;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 2px 8px;
  flex-shrink: 0;
}

.pv-conv-dialogue {
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pv-conv-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.pv-conv-right {
  flex-direction: row-reverse;
}

.pv-conv-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--cat-color, #3b82f6);
  color: #fff;
  font-weight: 900;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.pv-conv-bubble {
  max-width: 80%;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pv-conv-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-medium, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.pv-conv-right .pv-conv-name { text-align: right; }

.pv-conv-text {
  background: #f1f5f9;
  border-radius: 12px 12px 12px 4px;
  padding: 10px 14px;
  font-size: 0.93rem;
  line-height: 1.55;
  color: var(--text-dark, #0f172a);
  display: block;
}
.pv-conv-right .pv-conv-text {
  background: rgba(59, 130, 246, 0.1);
  border-radius: 12px 12px 4px 12px;
}

.pv-highlight {
  color: var(--cat-color, #3b82f6);
  font-weight: 800;
  text-decoration: underline dotted;
}

.pv-conv-separator {
  height: 2px;
  background: linear-gradient(to right, transparent, rgba(45,46,95,0.1), transparent);
  margin: 4px 0;
}

.pv-conv-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding-top: 8px;
}

.pv-conv-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.83rem;
  color: var(--text-medium, #64748b);
  text-align: center;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 12px;
  padding: 10px 16px;
}
.pv-conv-hint .material-symbols-outlined { font-size: 1rem; color: #10b981; }

/* ── POINT 4: Conversation Drag ──────────────────────────────────────── */
.pv-drag-container {
  display: flex;
  flex-direction: row-reverse;
  gap: 20px;
  padding: 12px 0 24px;
  align-items: flex-start;
}

.pv-drag-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pv-drag-conv-progress {
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-medium, #64748b);
  background: rgba(59, 130, 246, 0.07);
  border-radius: 20px;
  padding: 5px 16px;
  align-self: center;
}

.pv-drop-zone {
  display: inline-block;
  min-width: 70px;
  padding: 2px 6px;
  border: 2px dashed var(--cat-color, #3b82f6);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  vertical-align: middle;
  text-align: center;
}
.pv-drop-zone:hover, .pv-drop-zone.pv-drop-hover {
  background: rgba(59, 130, 246, 0.08);
}

.pv-drop-placeholder {
  color: var(--cat-color, #3b82f6);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 2px;
}

.pv-drop-filled {
  font-weight: 800;
  font-size: 0.92rem;
  padding: 2px 4px;
  border-radius: 6px;
}
.pv-drop-correct {
  color: #065f46;
  background: rgba(16, 185, 129, 0.15);
}
.pv-drop-wrong {
  color: #78350f;
  background: rgba(217, 119, 6, 0.12);
  text-decoration: line-through;
}

.pv-chips-panel {
  width: 170px;
  flex-shrink: 0;
  background: #f8fafc;
  border: 1px solid rgba(45, 46, 95, 0.1);
  border-radius: 18px;
  padding: 18px 20px;
  position: sticky;
  top: 80px;
}

.pv-chips-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-medium, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
}

.pv-chips-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pv-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  background: var(--cat-color, #3b82f6);
  color: #fff;
  border-radius: 24px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: grab;
  user-select: none;
  transition: transform 0.15s, opacity 0.2s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}
.pv-chip:hover { transform: scale(1.05); box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35); }
.pv-chip.pv-chip-selected {
  outline: 3px solid rgba(255,255,255,0.7);
  outline-offset: 2px;
  transform: scale(1.08);
}
.pv-chip.pv-chip-dragging { opacity: 0.5; }
.pv-chip.pv-chip-used {
  background: #e2e8f0;
  color: #94a3b8;
  cursor: default;
  box-shadow: none;
  text-decoration: line-through;
}

.pv-drag-result {
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  padding: 24px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 18px;
}
.pv-drag-result-icon .material-symbols-outlined { font-size: 3rem; color: #10b981; }
.pv-drag-result-text {
  font-size: 1.1rem;
  font-weight: 800;
  color: #065f46;
}

/* ── POINT 5: Mixed Practice ─────────────────────────────────────────── */
.pv-mx-conv-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-medium, #64748b);
  margin-bottom: 6px;
}
.pv-mx-conv-label .material-symbols-outlined { font-size: 0.95rem; }

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .pv-gallery-verb { font-size: 1.3rem; }
  .pv-gallery-card { padding: 18px 16px; }
  .pv-conv-text { font-size: 0.88rem; }
  .pv-chip { font-size: 0.83rem; padding: 7px 13px; }
  .pv-write-row { flex-direction: column; align-items: flex-start; }
  .pv-write-input { max-width: 100%; }
  .pv-drag-container {
    flex-direction: column;
    align-items: stretch;
  }
  .pv-chips-panel {
    width: 100%;
    position: static;
  }
  .pv-chips-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }
  .pv-gallery-single-wrap {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .pv-gallery-nav-col {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    gap: 10px;
    padding: 4px 2px 10px;
    scrollbar-width: thin;
  }
  .pv-gallery-nav-col::-webkit-scrollbar {
    height: 4px;
  }
  .pv-gallery-nav-dot {
    flex-shrink: 0;
  }
}

/* ── PV Point Layout: sidebar + main ─────────────────────────────────── */
.fe-point-view.pv-point-layout {
  max-width: 1060px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
}

.pv-point-sidebar {
  width: 190px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 20px;
  padding: 14px 10px;
  box-shadow: 0 4px 20px rgba(45, 46, 95, 0.08);
  position: static;
  top: 0;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  overflow-x: hidden;
  transition: width 0.22s ease, padding 0.22s ease;
}

.pv-point-sidebar.pv-sidebar-collapsed {
  width: 44px;
  padding: 14px 6px;
  gap: 8px;
}

.pv-point-sidebar.pv-sidebar-collapsed .pv-sidebar-content {
  display: none;
}

.pv-point-sidebar.pv-sidebar-collapsed .pv-sidebar-back {
  display: none;
}

.pv-point-sidebar.pv-sidebar-collapsed .pv-sidebar-top-row {
  justify-content: center;
}

.pv-sidebar-top-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pv-sidebar-back {
  flex: 1;
  justify-content: center;
  font-size: 0.75rem;
  padding: 5px 8px;
}

.pv-sidebar-collapse-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border: 1px solid rgba(45, 46, 95, 0.15);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
  font-family: inherit;
}

.pv-sidebar-collapse-btn:hover {
  background: rgba(45, 46, 95, 0.08);
}

.pv-sidebar-collapse-btn .material-symbols-outlined {
  font-size: 1.05rem;
  color: var(--text-medium, #64748b);
}

.pv-sidebar-exit-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: 8px;
  background: rgba(220, 38, 38, 0.06);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
  font-family: inherit;
  align-self: center;
}

.pv-sidebar-exit-btn:hover {
  background: rgba(220, 38, 38, 0.12);
}

.pv-sidebar-exit-btn .material-symbols-outlined {
  font-size: 1.05rem;
  color: #dc2626;
}

.pv-point-sidebar.pv-sidebar-collapsed .pv-sidebar-exit-btn {
  display: flex;
}

.pv-sidebar-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pv-sidebar-lesson-info {
  padding: 8px 4px;
  border-top: 1px solid rgba(45, 46, 95, 0.08);
  border-bottom: 1px solid rgba(45, 46, 95, 0.08);
}

.pv-sidebar-lesson-info-header {
  display: flex;
  align-items: flex-start;
  gap: 4px;
}

.pv-sidebar-lesson-info-text {
  flex: 1;
  min-width: 0;
}

.pv-sidebar-lesson-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-dark, #0f172a);
  line-height: 1.4;
  word-break: break-word;
}

.pv-sidebar-level-label {
  font-size: 0.7rem;
  color: var(--text-medium, #64748b);
  margin-top: 2px;
}

.pv-sidebar-exercise-desc {
  font-size: 0.7rem;
  color: var(--text-medium, #64748b);
  line-height: 1.4;
  padding: 6px 4px 2px;
  border-top: 1px solid rgba(45, 46, 95, 0.08);
  text-align: center;
}

.pv-sidebar-points {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
}

.pv-sidebar-point-dot {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(45, 46, 95, 0.06);
  border: 2px solid rgba(45, 46, 95, 0.12);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.pv-sidebar-point-dot .material-symbols-outlined {
  font-size: 1.1rem;
  color: var(--text-medium, #64748b);
}

.pv-sidebar-point-dot:hover:not(.pv-sidebar-point-active):not(.pv-sidebar-point-locked) {
  background: rgba(45, 46, 95, 0.1);
  border-color: rgba(45, 46, 95, 0.25);
  transform: scale(1.08);
}

.pv-sidebar-point-active {
  background: var(--dot-color, #3b82f6);
  border-color: var(--dot-color, #3b82f6);
  cursor: default;
  box-shadow: 0 3px 10px rgba(59, 130, 246, 0.35);
}

.pv-sidebar-point-active .material-symbols-outlined {
  color: #fff;
}

.pv-sidebar-point-done {
  background: #10b981;
  border-color: #10b981;
  cursor: pointer;
}

.pv-sidebar-point-done .material-symbols-outlined {
  color: #fff;
}

.pv-sidebar-point-locked {
  opacity: 0.35;
  cursor: not-allowed;
}

.pv-sidebar-connector {
  width: 2px;
  height: 8px;
  background: rgba(45, 46, 95, 0.12);
  align-self: center;
}

.pv-point-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Remove padding override for pv-gallery-single-wrap inside pv-point-main */
.pv-point-main .pv-gallery-single-wrap {
  padding-top: 0;
}

/* ── Responsive: stack vertically on small screens ────────────────────── */
@media (max-width: 640px) {
  .fe-point-view.pv-point-layout {
    flex-direction: column;
    gap: 12px;
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }
  .pv-point-sidebar {
    width: 100% !important;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: static;
    max-height: none;
    gap: 10px;
    padding: 10px 12px;
    overflow: visible;
    flex-wrap: nowrap;
  }
  .pv-point-sidebar.pv-sidebar-collapsed .pv-sidebar-content {
    display: flex;
  }
  .pv-sidebar-top-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
  }
  .pv-sidebar-back {
    flex: 0 0 auto;
    width: auto;
    justify-content: center;
  }
  .pv-sidebar-lesson-info {
    flex: 1;
    min-width: 0;
    padding: 0;
    border: none !important;
  }
  .pv-sidebar-content {
    flex-direction: column;
    flex-wrap: nowrap;
    flex: none;
    width: 100%;
    gap: 6px;
  }
  .pv-sidebar-exercise-desc {
    display: block;
    text-align: left;
    padding: 4px 0 0;
    border-top: none;
  }
  .pv-sidebar-points {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 8px max(10px, env(safe-area-inset-left, 0px)) max(10px, env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-right, 0px));
    margin: 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(45, 46, 95, 0.1);
    box-shadow: 0 -4px 24px rgba(45, 46, 95, 0.12);
  }
  .pv-sidebar-point-dot {
    flex: 1 1 0;
    min-width: 0;
    max-width: 56px;
    width: auto;
    height: auto;
    aspect-ratio: 1;
    border-radius: 10px;
    padding: 0;
  }
  .pv-sidebar-point-dot .material-symbols-outlined {
    font-size: 1rem;
  }
  .pv-sidebar-connector {
    width: 6px;
    height: 2px;
    flex-shrink: 0;
    align-self: center;
  }
  .pv-sidebar-exit-btn {
    display: none;
  }
  .pv-point-main .fe-exercise-card {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    margin: 0;
    padding: 20px 16px 24px;
    border-radius: 18px;
  }
  .fe-quiz-complete-section {
    padding: 28px 16px 22px;
    margin: 12px 0 0;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.09), rgba(255, 255, 255, 0));
    border: 1px solid rgba(16, 185, 129, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .fe-quiz-complete-section .fe-quiz-complete-text {
    margin-bottom: 18px;
    width: 100%;
  }
  /* Gallery / conversation slides: full width, centered column */
  .pv-point-main .pv-gallery-single-wrap {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
    gap: 14px;
  }
  .pv-point-main .pv-gallery-cards-area,
  .pv-point-main .pv-conversations-slides {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
  .pv-point-main .pv-gallery-nav-col {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 4px 0 0;
    gap: 10px;
  }
  .pv-point-main .pv-gallery-card-single.pv-gallery-card-active,
  .pv-point-main .pv-gallery-card {
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    box-sizing: border-box;
  }
  .pv-point-main .pv-conv-slide.pv-conv-slide-active {
    width: 100%;
    box-sizing: border-box;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   WORD FORMATION – Dot Colors
   ═══════════════════════════════════════════════════════════════════════ */
.fe-dot-wf-explanation    { background: linear-gradient(135deg, #e11d48, #f43f5e); color: #fff; }
.fe-dot-wf-multiple-choice { background: linear-gradient(135deg, #db2777, #9d174d); color: #fff; }
.fe-dot-wf-transform       { background: linear-gradient(135deg, #be185d, #881337); color: #fff; }

.fe-dot-outline.fe-dot-wf-explanation    { background: #fff; border-color: #e11d48; color: #e11d48; overflow: hidden; }
.fe-dot-outline.fe-dot-wf-multiple-choice { background: #fff; border-color: #db2777; color: #db2777; overflow: hidden; }
.fe-dot-outline.fe-dot-wf-transform       { background: #fff; border-color: #be185d; color: #be185d; overflow: hidden; }

/* ── Idiom dot colours ──────────────────────────────────────────────── */
.fe-dot-id-gallery  { background: linear-gradient(135deg, #f59e0b, #f97316); color: #fff; }
.fe-dot-id-fill-in  { background: linear-gradient(135deg, #fb923c, #ef4444); color: #fff; }
.fe-dot-id-conv     { background: linear-gradient(135deg, #10b981, #059669); color: #fff; }
.fe-dot-id-drag     { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; }
.fe-dot-id-quiz     { background: linear-gradient(135deg, #6366f1, #f59e0b); color: #fff; }

.fe-dot-outline.fe-dot-id-gallery  { background: #fff; border-color: #f59e0b; color: #f59e0b; overflow: hidden; }
.fe-dot-outline.fe-dot-id-fill-in  { background: #fff; border-color: #fb923c; color: #fb923c; overflow: hidden; }
.fe-dot-outline.fe-dot-id-conv     { background: #fff; border-color: #10b981; color: #10b981; overflow: hidden; }
.fe-dot-outline.fe-dot-id-drag     { background: #fff; border-color: #d97706; color: #d97706; overflow: hidden; }
.fe-dot-outline.fe-dot-id-quiz     { background: #fff; border-color: #6366f1; color: #6366f1; overflow: hidden; }

/* ═══════════════════════════════════════════════════════════════════════
   WORD FORMATION – Explanation view
   ═══════════════════════════════════════════════════════════════════════ */
.wf-explanation-wrap {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 0 4px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Rule panel */
.wf-exp-panel {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 18px rgba(225, 29, 72, 0.08);
  border: 1.5px solid rgba(225, 29, 72, 0.12);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.wf-exp-rule {
  font-size: 0.96rem;
  line-height: 1.6;
  color: var(--text-dark, #0f172a);
  font-weight: 500;
  padding: 10px 14px;
  background: rgba(225, 29, 72, 0.06);
  border-left: 3px solid #e11d48;
  border-radius: 0 10px 10px 0;
}

.wf-exp-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wf-exp-suffix {
  display: inline-block;
  font-size: 1.05rem;
  font-weight: 900;
  color: #fff;
  padding: 5px 14px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  width: fit-content;
}

.wf-exp-note {
  font-size: 0.85rem;
  color: var(--text-medium, #64748b);
  font-style: italic;
  margin-left: 4px;
}

.wf-exp-examples {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 4px;
}

.wf-exp-example {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.93rem;
}

.wf-exp-base {
  font-weight: 700;
  color: var(--text-dark, #0f172a);
}

.wf-exp-arrow {
  color: var(--text-medium, #94a3b8);
  font-size: 1rem;
}

.wf-exp-derived {
  font-weight: 900;
  font-size: 1rem;
}

.wf-exp-def {
  font-size: 0.84rem;
  color: var(--text-medium, #64748b);
  font-style: italic;
}

/* Word form cards (reuse pv-gallery-card styling) */
.wf-card {
  display: none;
  background: #fff;
  border-radius: 20px;
  border: 2px solid var(--cat-color, #e11d48);
  padding: 22px 24px 18px;
  box-shadow: 0 4px 18px rgba(45, 46, 95, 0.09);
  position: relative;
  transition: transform 0.2s;
  animation: pvCardIn 0.2s ease;
}
.wf-card:hover { transform: translateY(-2px); }
.wf-card.wf-card-active { display: block; }

.wf-card-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--cat-color, #e11d48);
  background: rgba(225, 29, 72, 0.08);
  border: 1px solid rgba(225, 29, 72, 0.2);
  border-radius: 10px;
  padding: 3px 10px;
  margin-bottom: 10px;
  letter-spacing: 0.3px;
}

.wf-card-pair {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.wf-card-base {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-dark, #0f172a);
}

.wf-card-arrow {
  font-size: 1.4rem;
  color: var(--text-medium, #94a3b8);
}

.wf-card-derived {
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: -0.3px;
}

.wf-card-definition {
  font-size: 0.97rem;
  color: var(--text-dark, #0f172a);
  line-height: 1.6;
  margin-bottom: 10px;
}

.wf-card-example {
  font-size: 0.88rem;
  color: var(--text-medium, #64748b);
  font-style: italic;
  line-height: 1.55;
}

.wf-card-num {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cat-color, #e11d48);
  opacity: 0.6;
}

/* ═══════════════════════════════════════════════════════════════════════
   WORD FORMATION – Multiple Choice root label
   ═══════════════════════════════════════════════════════════════════════ */
.wf-mc-root-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--text-medium, #64748b);
  margin-bottom: 8px;
  padding: 8px 12px;
  background: rgba(225, 29, 72, 0.06);
  border-radius: 10px;
}
.wf-mc-root-label .material-symbols-outlined { font-size: 1rem; color: #e11d48; }
.wf-mc-root-label strong { color: #e11d48; font-size: 1rem; font-weight: 900; }

/* ═══════════════════════════════════════════════════════════════════════
   WORD FORMATION – Transform exercise
   ═══════════════════════════════════════════════════════════════════════ */
.wf-transform-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(225, 29, 72, 0.06);
  border-bottom: 1px solid rgba(225, 29, 72, 0.12);
  font-size: 0.9rem;
  font-weight: 700;
  color: #e11d48;
  border-radius: 14px 14px 0 0;
  flex-wrap: wrap;
}
.wf-transform-header .material-symbols-outlined { font-size: 1.1rem; }
.wf-transform-hint {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-medium, #64748b);
  font-style: italic;
  margin-left: auto;
}

.wf-transform-sentence {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-dark, #0f172a);
  margin-bottom: 8px;
  padding: 10px 14px;
  background: #f8fafc;
  border-radius: 10px;
  border-left: 3px solid #e11d48;
}

.wf-transform-root-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 0.88rem;
  color: var(--text-medium, #64748b);
}
.wf-transform-root-row .material-symbols-outlined { font-size: 1rem; color: #e11d48; }

.wf-transform-root-word {
  font-size: 1.05rem;
  font-weight: 900;
  color: #e11d48;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 3px 10px;
  background: rgba(225, 29, 72, 0.08);
  border-radius: 8px;
}

.wf-transform-input {
  max-width: 260px !important;
}

/* Dictionary modals: compact level/type filters (icon on mobile) */
.dict-filter-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  vertical-align: middle;
}

.dict-filter-wrap-icon {
  display: none;
}

/* ═══════════════════════════════════════════════════════════════════════
   WORD FORMATION – Dictionary modal
   ═══════════════════════════════════════════════════════════════════════ */
.wf-dict-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: pvFadeIn 0.18s ease;
}

.wf-dict-box {
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.2);
  width: 100%;
  max-width: 680px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.wf-dict-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(45, 46, 95, 0.08);
  flex-shrink: 0;
}

.wf-dict-icon .material-symbols-outlined {
  font-size: 1.4rem;
  color: #e11d48;
}

.wf-dict-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text-dark, #0f172a);
  flex: 1;
  margin: 0;
}

.wf-dict-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  color: var(--text-medium, #64748b);
  display: flex;
  align-items: center;
  transition: background 0.15s;
}
.wf-dict-close:hover { background: rgba(239, 68, 68, 0.08); color: #ef4444; }

.wf-dict-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 8px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(45, 46, 95, 0.07);
}

.wf-dict-search-icon .material-symbols-outlined {
  font-size: 1.1rem;
  color: var(--text-medium, #94a3b8);
  flex-shrink: 0;
}

.wf-dict-search {
  flex: 1;
  padding: 9px 12px;
  border: 1.5px solid rgba(45, 46, 95, 0.15);
  border-radius: 12px;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.wf-dict-search:focus { border-color: #e11d48; }

.wf-dict-level-filter {
  padding: 9px 12px;
  border: 1.5px solid rgba(45, 46, 95, 0.15);
  border-radius: 12px;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  background: #fff;
  color: var(--text-dark, #0f172a);
  transition: border-color 0.2s;
}
.wf-dict-level-filter:focus { border-color: #e11d48; }

.wf-dict-type-filter {
  padding: 9px 12px;
  border: 1.5px solid rgba(45, 46, 95, 0.15);
  border-radius: 12px;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  background: #fff;
  color: var(--text-dark, #0f172a);
  transition: border-color 0.2s;
}
.wf-dict-type-filter:focus { border-color: #e11d48; }

.wf-dict-count {
  font-size: 0.8rem;
  color: var(--text-medium, #94a3b8);
  padding: 4px 18px 0;
  flex-shrink: 0;
}

.wf-dict-results {
  flex: 1;
  overflow-y: auto;
  padding: 8px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.wf-dict-entry {
  background: #f8fafc;
  border-radius: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(45, 46, 95, 0.07);
  transition: box-shadow 0.15s;
}
.wf-dict-entry:hover { box-shadow: 0 3px 12px rgba(225, 29, 72, 0.09); }

.wf-dict-base {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--text-dark, #0f172a);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1.5px solid rgba(225, 29, 72, 0.15);
}

.wf-dict-forms {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wf-dict-form {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.88rem;
}

.wf-dict-form-top {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.wf-dict-form-top .dict-speak-btn {
  margin-left: auto;
  flex-shrink: 0;
}

.wf-dict-derived {
  flex: 1;
  min-width: 0;
  font-weight: 700;
  color: #e11d48;
  font-size: 0.95rem;
}

.wf-dict-morph {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-medium, #64748b);
  background: rgba(100, 116, 139, 0.12);
  border-radius: 6px;
  padding: 2px 7px;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wf-dict-mf-triggers {
  display: none;
}

.wf-dict-filter-sheet-root {
  position: fixed;
  inset: 0;
  z-index: 2200;
  pointer-events: none;
}

.wf-dict-filter-sheet-root .wf-dict-filter-sheet-backdrop {
  pointer-events: auto;
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  animation: pvFadeIn 0.15s ease;
}

.wf-dict-filter-sheet-root .wf-dict-filter-sheet {
  pointer-events: auto;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 72vh;
  background: #fff;
  border-radius: 18px 18px 0 0;
  padding: 10px 16px calc(16px + env(safe-area-inset-bottom, 0));
  box-shadow: 0 -8px 40px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: wfSheetUp 0.22s ease;
}

@keyframes wfSheetUp {
  from { transform: translateY(100%); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}

.wf-dict-filter-sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 4px;
  background: rgba(45, 46, 95, 0.12);
  align-self: center;
  margin-bottom: 4px;
}

.wf-dict-filter-sheet-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-medium, #64748b);
  padding: 0 4px 4px;
}

.wf-dict-filter-sheet-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  max-height: 52vh;
}

.wf-dict-filter-sheet-opt {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid rgba(45, 46, 95, 0.1);
  background: #f8fafc;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark, #0f172a);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s;
}

.wf-dict-filter-sheet-opt--active {
  border-color: #e11d48;
  background: rgba(225, 29, 72, 0.08);
  color: #be123c;
}

.wf-dict-filter-sheet-opt:active {
  filter: brightness(0.97);
}

.wf-dict-type {
  font-size: 0.78rem;
  color: #fff;
  background: rgba(100, 116, 139, 0.7);
  border-radius: 8px;
  padding: 1px 7px;
  font-weight: 600;
  white-space: nowrap;
  text-transform: capitalize;
}
.wf-type-noun    { background: rgba(59, 130, 246, 0.8); }
.wf-type-verb    { background: rgba(34, 197, 94, 0.8); }
.wf-type-adjective { background: rgba(147, 51, 234, 0.8); }
.wf-type-adverb  { background: rgba(249, 115, 22, 0.8); }

.wf-dict-def {
  color: var(--text-medium, #64748b);
  font-style: italic;
  flex: 1;
}

.wf-dict-level-badge {
  font-size: 0.72rem;
  font-weight: 800;
  border-radius: 6px;
  padding: 2px 7px;
}
.wf-level-b1 { background: #dcfce7; color: #166534; }
.wf-level-b2 { background: #dbeafe; color: #1e40af; }
.wf-level-c1 { background: #ede9fe; color: #4c1d95; }

.wf-dict-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 40px 20px;
  color: var(--text-medium, #94a3b8);
}
.wf-dict-empty .material-symbols-outlined { font-size: 2rem; }
.wf-dict-empty p { margin: 0; font-size: 0.95rem; }

/* WF info dict link */
.wf-info-dict-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #e11d48;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
}
.wf-info-dict-link:hover { text-decoration: underline; }
.wf-info-dict-link .material-symbols-outlined { font-size: 1rem; }

/* ═══════════════════════════════════════════════════════════════════════
   COLLOCATIONS – Info dict link
   ═══════════════════════════════════════════════════════════════════════ */
.colloc-info-dict-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #8b5cf6;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
}
.colloc-info-dict-link:hover { text-decoration: underline; }
.colloc-info-dict-link .material-symbols-outlined { font-size: 1rem; }

/* ═══════════════════════════════════════════════════════════════════════
   COLLOCATIONS – Dictionary Modal
   ═══════════════════════════════════════════════════════════════════════ */
.colloc-dict-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: pvFadeIn 0.18s ease;
}

.colloc-dict-box {
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.2);
  width: 100%;
  max-width: 680px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.colloc-dict-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(45, 46, 95, 0.08);
  flex-shrink: 0;
}

.colloc-dict-icon .material-symbols-outlined {
  font-size: 1.4rem;
  color: #8b5cf6;
}

.colloc-dict-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text-dark, #0f172a);
  flex: 1;
  margin: 0;
}

.colloc-dict-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  color: var(--text-medium, #64748b);
  display: flex;
  align-items: center;
  transition: background 0.15s;
}
.colloc-dict-close:hover { background: rgba(139, 92, 246, 0.08); color: #8b5cf6; }

.colloc-dict-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 8px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(45, 46, 95, 0.07);
}

.colloc-dict-search-icon .material-symbols-outlined {
  font-size: 1.1rem;
  color: var(--text-medium, #94a3b8);
  flex-shrink: 0;
}

.colloc-dict-search {
  flex: 1;
  padding: 9px 12px;
  border: 1.5px solid rgba(45, 46, 95, 0.15);
  border-radius: 12px;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.colloc-dict-search:focus { border-color: #8b5cf6; }

.colloc-dict-level-filter {
  padding: 9px 12px;
  border: 1.5px solid rgba(45, 46, 95, 0.15);
  border-radius: 12px;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  background: #fff;
  color: var(--text-dark, #0f172a);
  transition: border-color 0.2s;
}
.colloc-dict-level-filter:focus { border-color: #8b5cf6; }

.colloc-dict-count {
  font-size: 0.8rem;
  color: var(--text-medium, #94a3b8);
  padding: 4px 18px 0;
  flex-shrink: 0;
}

.colloc-dict-results {
  flex: 1;
  overflow-y: auto;
  padding: 8px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.colloc-dict-entry {
  background: #f8fafc;
  border-radius: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(45, 46, 95, 0.07);
  transition: box-shadow 0.15s;
}
.colloc-dict-entry:hover { box-shadow: 0 3px 12px rgba(139, 92, 246, 0.09); }

.colloc-dict-base {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--text-dark, #0f172a);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1.5px solid rgba(139, 92, 246, 0.2);
}

.colloc-dict-forms {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.colloc-dict-form {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.88rem;
}

.colloc-dict-form-top {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.colloc-dict-form-top .dict-speak-btn {
  margin-left: auto;
  flex-shrink: 0;
}

.colloc-dict-phrase {
  flex: 1;
  min-width: 0;
  font-weight: 700;
  color: #8b5cf6;
  font-size: 0.95rem;
}

.colloc-dict-example {
  font-size: 0.82rem;
  color: var(--text-dark, #1e293b);
  line-height: 1.45;
  margin-top: 2px;
  padding: 6px 0 2px 12px;
  border-left: 3px solid rgba(139, 92, 246, 0.35);
  opacity: 0.9;
}

.colloc-dict-def {
  color: var(--text-medium, #64748b);
  font-style: italic;
  flex: 1;
}

.colloc-dict-level-badge {
  font-size: 0.72rem;
  font-weight: 800;
  border-radius: 6px;
  padding: 2px 7px;
  white-space: nowrap;
}
.colloc-level-a1 { background: #f0fdf4; color: #166534; }
.colloc-level-a2 { background: #dcfce7; color: #166534; }
.colloc-level-b1 { background: #dcfce7; color: #166534; }
.colloc-level-b2 { background: #dbeafe; color: #1e40af; }
.colloc-level-c1 { background: #ede9fe; color: #4c1d95; }

.colloc-dict-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 40px 20px;
  color: var(--text-medium, #94a3b8);
}
.colloc-dict-empty .material-symbols-outlined { font-size: 2rem; }
.colloc-dict-empty p { margin: 0; font-size: 0.95rem; }

/* ═══════════════════════════════════════════════════════════════════════
   PHRASAL VERBS – Dictionary Modal
   ═══════════════════════════════════════════════════════════════════════ */
.pv-dict-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: pvFadeIn 0.18s ease;
}

.pv-dict-box {
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.2);
  width: 100%;
  max-width: 680px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pv-dict-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(45, 46, 95, 0.08);
  flex-shrink: 0;
}

.pv-dict-icon .material-symbols-outlined {
  font-size: 1.4rem;
  color: #3b82f6;
}

.pv-dict-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text-dark, #0f172a);
  flex: 1;
  margin: 0;
}

.pv-dict-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  color: var(--text-medium, #64748b);
  display: flex;
  align-items: center;
  transition: background 0.15s;
}
.pv-dict-close:hover { background: rgba(59, 130, 246, 0.08); color: #3b82f6; }

.pv-dict-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 8px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(45, 46, 95, 0.07);
}

.pv-dict-search-icon .material-symbols-outlined {
  font-size: 1.1rem;
  color: var(--text-medium, #94a3b8);
  flex-shrink: 0;
}

.pv-dict-search {
  flex: 1;
  padding: 9px 12px;
  border: 1.5px solid rgba(45, 46, 95, 0.15);
  border-radius: 12px;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.pv-dict-search:focus { border-color: #3b82f6; }

.pv-dict-level-filter {
  padding: 9px 12px;
  border: 1.5px solid rgba(45, 46, 95, 0.15);
  border-radius: 12px;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  background: #fff;
  color: var(--text-dark, #0f172a);
  transition: border-color 0.2s;
}
.pv-dict-level-filter:focus { border-color: #3b82f6; }

.pv-dict-count {
  font-size: 0.8rem;
  color: var(--text-medium, #94a3b8);
  padding: 4px 18px 0;
  flex-shrink: 0;
}

.pv-dict-results {
  flex: 1;
  overflow-y: auto;
  padding: 8px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.pv-dict-entry {
  background: #f8fafc;
  border-radius: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(45, 46, 95, 0.07);
  transition: box-shadow 0.15s;
}
.pv-dict-entry:hover { box-shadow: 0 3px 12px rgba(59, 130, 246, 0.12); }

.pv-dict-base {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--text-dark, #0f172a);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1.5px solid rgba(59, 130, 246, 0.2);
}

.pv-dict-forms {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pv-dict-form {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.88rem;
}

.pv-dict-form-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pv-dict-verb {
  font-weight: 700;
  color: #3b82f6;
  font-size: 0.95rem;
}

.pv-dict-def {
  color: var(--text-medium, #64748b);
  font-style: italic;
}

.pv-dict-examples {
  margin: 4px 0 0 0;
  padding-left: 16px;
  list-style: disc;
  color: var(--text-dark, #0f172a);
  font-style: normal;
  font-size: 0.83rem;
  opacity: 0.75;
}
.pv-dict-examples li { margin-bottom: 2px; }

.pv-dict-level-badge {
  font-size: 0.72rem;
  font-weight: 800;
  border-radius: 6px;
  padding: 2px 7px;
}
.pv-level-b1 { background: #dcfce7; color: #166534; }
.pv-level-b2 { background: #dbeafe; color: #1e40af; }
.pv-level-c1 { background: #ede9fe; color: #4c1d95; }

.pv-dict-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 40px 20px;
  color: var(--text-medium, #94a3b8);
}
.pv-dict-empty .material-symbols-outlined { font-size: 2rem; }
.pv-dict-empty p { margin: 0; font-size: 0.95rem; }

/* PV info dict link */
.pv-info-dict-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #3b82f6;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
}
.pv-info-dict-link:hover { text-decoration: underline; }
.pv-info-dict-link .material-symbols-outlined { font-size: 1rem; }

/* ═══════════════════════════════════════════════════════════════════════
   PHRASAL VERBS – Dictionary Responsive
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .pv-dict-box {
    max-height: 95vh;
    border-radius: 18px;
  }
  .pv-dict-search-row {
    flex-wrap: wrap;
  }
  .pv-dict-search {
    width: 100%;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   WORD FORMATION – Responsive
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .wf-dict-box {
    max-height: 95vh;
    border-radius: 18px;
  }
  .wf-transform-hint {
    margin-left: 0;
    width: 100%;
  }
  .wf-dict-search-row {
    flex-wrap: wrap;
  }
  .wf-dict-search {
    width: 100%;
  }
}

/* Dictionary modals – mobile: icon-only filter chips + hide long modal titles */
@media (max-width: 640px) {
  .pv-dict-title,
  .wf-dict-title,
  .colloc-dict-title,
  .vocab-dict-title {
    display: none !important;
  }

  .wf-dict-morph {
    display: none !important;
  }

  .wf-dict-search-row .dict-filter-wrap.dict-filter-wrap--level,
  .wf-dict-search-row .dict-filter-wrap.dict-filter-wrap--type {
    display: none !important;
  }

  .wf-dict-mf-triggers {
    display: flex;
    width: 100%;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
    padding-top: 4px;
  }

  .wf-dict-mf-trigger {
    flex: 1;
    min-width: calc(50% - 6px);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1.5px solid rgba(45, 46, 95, 0.12);
    background: #f8fafc;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-dark, #0f172a);
    cursor: pointer;
    text-align: left;
  }

  .wf-dict-mf-trigger .material-symbols-outlined:first-of-type {
    font-size: 1.1rem;
    color: #e11d48;
    flex-shrink: 0;
  }

  .wf-dict-mf-trigger-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .wf-dict-mf-chevron {
    font-size: 1.15rem !important;
    color: var(--text-medium, #94a3b8);
    flex-shrink: 0;
  }

  .pv-dict-header,
  .wf-dict-header,
  .colloc-dict-header {
    justify-content: space-between;
    gap: 8px;
  }

  .dict-filter-wrap {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1.5px solid rgba(45, 46, 95, 0.15);
    background: #fff;
    justify-content: center;
  }

  .dict-filter-wrap-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-medium, #64748b);
    pointer-events: none;
  }

  .dict-filter-wrap select {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    margin: 0;
    padding: 0 !important;
    border: none !important;
    border-radius: 12px !important;
    opacity: 0;
    cursor: pointer;
    font-size: 16px;
    -webkit-appearance: none;
    appearance: none;
  }

  .colloc-dict-search-row {
    flex-wrap: wrap;
  }

  .colloc-dict-search {
    width: 100%;
  }

  .colloc-dict-box {
    max-height: 95vh;
    border-radius: 18px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   IDIOMS DICTIONARY
   ═══════════════════════════════════════════════════════════════════════ */
.id-dict-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: pvFadeIn 0.18s ease;
}

.id-dict-box {
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.2);
  width: 100%;
  max-width: 680px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.id-dict-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(45, 46, 95, 0.08);
  flex-shrink: 0;
}

.id-dict-icon .material-symbols-outlined {
  font-size: 1.4rem;
  color: #10b981;
}

.id-dict-close {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  color: var(--text-medium, #64748b);
  display: flex;
  align-items: center;
  transition: background 0.15s;
}
.id-dict-close:hover { background: rgba(16, 185, 129, 0.08); color: #10b981; }

.id-dict-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 8px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(45, 46, 95, 0.07);
}

.id-dict-search-icon .material-symbols-outlined {
  font-size: 1.1rem;
  color: var(--text-medium, #94a3b8);
  flex-shrink: 0;
}

.id-dict-search {
  flex: 1;
  padding: 9px 12px;
  border: 1.5px solid rgba(45, 46, 95, 0.15);
  border-radius: 12px;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.id-dict-search:focus { border-color: #10b981; }

.id-dict-level-filter {
  padding: 9px 12px;
  border: 1.5px solid rgba(45, 46, 95, 0.15);
  border-radius: 12px;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  background: #fff;
  color: var(--text-dark, #0f172a);
  transition: border-color 0.2s;
}
.id-dict-level-filter:focus { border-color: #10b981; }

.id-dict-count {
  font-size: 0.8rem;
  color: var(--text-medium, #94a3b8);
  padding: 4px 18px 0;
  flex-shrink: 0;
}

.id-dict-results {
  flex: 1;
  overflow-y: auto;
  padding: 8px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.id-dict-entry {
  background: #f0fdf4;
  border-radius: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(16, 185, 129, 0.15);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: box-shadow 0.15s;
}
.id-dict-entry:hover { box-shadow: 0 3px 12px rgba(16, 185, 129, 0.12); }

/* Level-specific card styles */
.id-entry-b1 { background: #f0fdf4; border-color: rgba(16, 185, 129, 0.2); }
.id-entry-b1:hover { box-shadow: 0 3px 12px rgba(16, 185, 129, 0.15); }
.id-entry-b1 .id-dict-idiom { color: #065f46; }

.id-entry-b2 { background: #eff6ff; border-color: rgba(59, 130, 246, 0.25); }
.id-entry-b2:hover { box-shadow: 0 3px 12px rgba(59, 130, 246, 0.12); }
.id-entry-b2 .id-dict-idiom { color: #1e3a8a; }

.id-entry-c1 { background: #faf5ff; border-color: rgba(139, 92, 246, 0.25); }
.id-entry-c1:hover { box-shadow: 0 3px 12px rgba(139, 92, 246, 0.12); }
.id-entry-c1 .id-dict-idiom { color: #4c1d95; }

.id-entry-c2 { background: #fff1f2; border-color: rgba(225, 29, 72, 0.25); }
.id-entry-c2:hover { box-shadow: 0 3px 12px rgba(225, 29, 72, 0.12); }
.id-entry-c2 .id-dict-idiom { color: #881337; }

.id-dict-idiom-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.id-dict-idiom {
  font-weight: 700;
  color: #065f46;
  font-size: 0.97rem;
  flex: 1;
}

.id-dict-def {
  color: var(--text-medium, #64748b);
  font-style: italic;
  font-size: 0.88rem;
}

.id-dict-level-badge {
  font-size: 0.72rem;
  font-weight: 800;
  border-radius: 6px;
  padding: 2px 7px;
  flex-shrink: 0;
}
.id-level-b1 { background: #dcfce7; color: #166534; }
.id-level-b2 { background: #dbeafe; color: #1e40af; }
.id-level-c1 { background: #ede9fe; color: #4c1d95; }

.id-dict-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 40px 20px;
  color: var(--text-medium, #94a3b8);
}
.id-dict-empty .material-symbols-outlined { font-size: 2rem; }
.id-dict-empty p { margin: 0; font-size: 0.95rem; }

/* ═══════════════════════════════════════════════════════════════════════
   IDIOMS DICTIONARY – Responsive
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .id-dict-box {
    max-height: 95vh;
    border-radius: 18px;
  }
  .id-dict-search-row {
    flex-wrap: wrap;
  }
  .id-dict-search {
    width: 100%;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   VOCABULARY DICTIONARY
   ═══════════════════════════════════════════════════════════════════════ */
.vocab-dict-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: pvFadeIn 0.18s ease;
}

.vocab-dict-box {
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.2);
  width: 100%;
  max-width: 680px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.vocab-dict-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(45, 46, 95, 0.08);
  flex-shrink: 0;
}

.vocab-dict-icon .material-symbols-outlined {
  font-size: 1.4rem;
  color: #10b981;
}

.vocab-dict-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text-dark, #0f172a);
  flex: 1;
  margin: 0;
}

.vocab-dict-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  color: var(--text-medium, #64748b);
  display: flex;
  align-items: center;
  transition: background 0.15s;
}
.vocab-dict-close:hover { background: rgba(16, 185, 129, 0.08); color: #10b981; }

.vocab-dict-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 8px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(45, 46, 95, 0.07);
}

.vocab-dict-search-icon .material-symbols-outlined {
  font-size: 1.1rem;
  color: var(--text-medium, #94a3b8);
  flex-shrink: 0;
}

.vocab-dict-search {
  flex: 1;
  padding: 9px 12px;
  border: 1.5px solid rgba(45, 46, 95, 0.15);
  border-radius: 12px;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.vocab-dict-search:focus { border-color: #10b981; }

.vocab-dict-level-filter {
  padding: 9px 12px;
  border: 1.5px solid rgba(45, 46, 95, 0.15);
  border-radius: 12px;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  background: #fff;
  color: var(--text-dark, #0f172a);
  transition: border-color 0.2s;
}
.vocab-dict-level-filter:focus { border-color: #10b981; }

.vocab-dict-count {
  font-size: 0.8rem;
  color: var(--text-medium, #94a3b8);
  padding: 4px 18px 0;
  flex-shrink: 0;
}

.vocab-dict-results {
  flex: 1;
  overflow-y: auto;
  padding: 8px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.vocab-dict-entry {
  background: #f8fafc;
  border-radius: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(45, 46, 95, 0.07);
  transition: box-shadow 0.15s;
}
.vocab-dict-entry:hover { box-shadow: 0 3px 12px rgba(16, 185, 129, 0.12); }

.vocab-dict-base {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--text-dark, #0f172a);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1.5px solid rgba(16, 185, 129, 0.2);
  display: flex;
  align-items: center;
  gap: 8px;
}

.vocab-dict-forms {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vocab-dict-form {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.88rem;
}

.vocab-dict-form-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vocab-dict-def {
  color: var(--text-medium, #64748b);
  font-size: 0.88rem;
}

.vocab-dict-example {
  display: block;
  margin-top: 2px;
  color: var(--text, #334155);
  font-size: 0.85rem;
  line-height: 1.4;
}

.vocab-dict-level-badge {
  font-size: 0.72rem;
  font-weight: 800;
  border-radius: 6px;
  padding: 2px 7px;
  flex-shrink: 0;
}
.vocab-level-a2 { background: #fef9c3; color: #713f12; }
.vocab-level-b1 { background: #dcfce7; color: #166534; }
.vocab-level-b2 { background: #dbeafe; color: #1e40af; }
.vocab-level-c1 { background: #ede9fe; color: #4c1d95; }
.vocab-level-c2 { background: #ffe4e6; color: #881337; }

.vocab-dict-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 40px 20px;
  color: var(--text-medium, #94a3b8);
}
.vocab-dict-empty .material-symbols-outlined { font-size: 2rem; }
.vocab-dict-empty p { margin: 0; font-size: 0.95rem; }

/* VOCABULARY DICTIONARY – Responsive */
@media (max-width: 640px) {
  .vocab-dict-box {
    max-height: 95vh;
    border-radius: 18px;
  }
  .vocab-dict-search-row {
    flex-wrap: wrap;
  }
  .vocab-dict-search {
    width: 100%;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   GENERAL DICTIONARY
   ═══════════════════════════════════════════════════════════════════════ */
.gd-dict-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: pvFadeIn 0.18s ease;
}

.gd-dict-box {
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.2);
  width: 100%;
  max-width: 680px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.gd-dict-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(45, 46, 95, 0.08);
  flex-shrink: 0;
}

.gd-dict-icon .material-symbols-outlined {
  font-size: 1.4rem;
  color: #6d28d9;
}

.gd-dict-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text-dark, #0f172a);
  flex: 1;
  margin: 0;
}

.gd-dict-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  color: var(--text-medium, #64748b);
  display: flex;
  align-items: center;
  transition: background 0.15s;
}
.gd-dict-close:hover { background: rgba(109, 40, 217, 0.08); color: #6d28d9; }

.gd-dict-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 8px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(45, 46, 95, 0.07);
}

.gd-dict-search-icon .material-symbols-outlined {
  font-size: 1.1rem;
  color: var(--text-medium, #94a3b8);
  flex-shrink: 0;
}

.gd-dict-search {
  flex: 1;
  padding: 9px 12px;
  border: 1.5px solid rgba(45, 46, 95, 0.15);
  border-radius: 12px;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.gd-dict-search:focus { border-color: #6d28d9; }

.gd-dict-search-btn {
  padding: 9px 16px;
  background: #6d28d9;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 0.9rem;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  flex-shrink: 0;
}
.gd-dict-search-btn:hover { background: #5b21b6; }

.gd-dict-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.gd-dict-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 40px 20px;
  color: var(--text-medium, #94a3b8);
}
.gd-dict-placeholder .material-symbols-outlined { font-size: 2.5rem; }
.gd-dict-placeholder p { margin: 0; font-size: 0.95rem; }

.gd-dict-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px 20px;
  color: var(--text-medium, #94a3b8);
  font-size: 0.95rem;
}

.gd-dict-not-found {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-medium, #94a3b8);
  font-size: 0.95rem;
  margin: 0;
}

.gd-dict-result {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gd-dict-word-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(109, 40, 217, 0.15);
}

.gd-dict-word {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--text-dark, #0f172a);
}

.gd-dict-phonetic {
  font-size: 0.95rem;
  color: var(--text-medium, #64748b);
  font-style: italic;
}

.gd-dict-meaning {
  background: #f5f3ff;
  border-radius: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(109, 40, 217, 0.1);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gd-dict-pos {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  color: #6d28d9;
  background: rgba(109, 40, 217, 0.1);
  border-radius: 6px;
  padding: 2px 8px;
  text-transform: lowercase;
  font-style: italic;
  margin-bottom: 4px;
}

.gd-dict-definition {
  font-size: 0.95rem;
  color: var(--text-dark, #0f172a);
  margin: 0;
  line-height: 1.5;
}

.gd-dict-example {
  font-size: 0.88rem;
  color: var(--text-medium, #64748b);
  font-style: italic;
  line-height: 1.4;
  margin-top: 2px;
}

.gd-dict-synonyms {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 4px;
}

.gd-dict-tag-pill {
  font-size: 0.82rem;
  background: rgba(109, 40, 217, 0.08);
  color: #6d28d9;
  border-radius: 20px;
  padding: 3px 12px;
  cursor: pointer;
  transition: background 0.15s;
  border: 1px solid rgba(109, 40, 217, 0.15);
}
.gd-dict-tag-pill:hover { background: rgba(109, 40, 217, 0.18); }

/* GENERAL DICTIONARY – Responsive */
@media (max-width: 640px) {
  .gd-dict-box {
    max-height: 95vh;
    border-radius: 18px;
  }
  .gd-dict-search-row {
    flex-wrap: wrap;
  }
  .gd-dict-search {
    width: 100%;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   IDIOMS – Gallery Usage Tip
   ═══════════════════════════════════════════════════════════════════════ */
.id-gallery-idiom {
  font-size: 1.35rem;
  line-height: 1.3;
}

.id-gallery-tip {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(245, 158, 11, 0.1);
  border-left: 3px solid #f59e0b;
  border-radius: 6px;
  font-size: 0.88rem;
  color: #92400e;
  line-height: 1.4;
}
.id-gallery-tip .material-symbols-outlined {
  font-size: 1rem;
  flex-shrink: 0;
  color: #f59e0b;
  margin-top: 1px;
}

/* ═══════════════════════════════════════════════════════════════════════
   IDIOMS – Quiz Type Badges
   ═══════════════════════════════════════════════════════════════════════ */
.id-quiz-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  vertical-align: middle;
  margin-left: 6px;
}
.id-quiz-type-badge .material-symbols-outlined {
  font-size: 0.85rem;
}
.id-quiz-type-match     { background: #ede9fe; color: #5b21b6; }
.id-quiz-type-complete  { background: #fef3c7; color: #92400e; }
.id-quiz-type-situation { background: #d1fae5; color: #065f46; }

/* ═══════════════════════════════════════════════════════════════════════
   VOCABULARY FLASHCARDS
   ═══════════════════════════════════════════════════════════════════════ */

/* Dot type for progression map */
.fe-dot-vocab-flashcards { background: #10b981; }

/* ── VOCAB FLASHCARD LAYOUT (sidebar + main) ─────────────────────────── */
.vocab-fc-layout {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 0;
  min-height: 0;
}

.vocab-fc-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Right sidebar: reuse pv-point-sidebar, override direction cue */
.vocab-fc-sidebar-right {
  order: 2; /* sidebar on the right */
}

.vocab-fc-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 560px;
  margin: 0 auto;
  padding: 0 8px 32px;
  width: 100%;
}

/* ── PILL PROGRESS INDICATOR ─────────────────────────────────────────── */
.vocab-fc-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 10px 4px 2px;
}

.vocab-fc-pill {
  height: 9px;
  flex: 1;
  min-width: 14px;
  max-width: 44px;
  border-radius: 999px;
  transition: background 0.3s ease, outline 0.2s ease;
}

/* States */
.vocab-fc-pill-pending   { background: #d1d5db; }
.vocab-fc-pill-failed    { background: #ef4444; }
.vocab-fc-pill-recovering { background: #3b82f6; }
.vocab-fc-pill-correct   { background: #10b981; }

/* Current card indicator */
.vocab-fc-pill-current {
  background: transparent !important;
  outline: 2px solid #374151;
  outline-offset: 1px;
}

/* ── SIDEBAR LESSON LIST ─────────────────────────────────────────────── */
.vocab-fc-sidebar-lessons {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px 0;
}

.vocab-fc-sidebar-lesson {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 4px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.vocab-fc-sidebar-lesson:hover {
  background: rgba(16, 185, 129, 0.08);
}

.vocab-fc-sidebar-lesson-active {
  cursor: default;
  background: rgba(16, 185, 129, 0.12);
}

.vocab-fc-sidebar-lesson-icon {
  font-size: 0.9rem !important;
  flex-shrink: 0;
  color: #10b981;
}

.vocab-fc-sidebar-lesson-title {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-dark, #0f172a);
  line-height: 1.3;
}

.vocab-fc-sidebar-lesson-active .vocab-fc-sidebar-lesson-title {
  color: #10b981;
}

.vocab-fc-sidebar-lesson-progress .vocab-fc-sidebar-lesson-icon {
  color: #10b981;
}

/* Responsive: on small screens stack vertically */
@media (max-width: 640px) {
  .vocab-fc-layout {
    flex-direction: column-reverse;
    gap: 10px;
  }
  .vocab-fc-sidebar-right {
    width: 100% !important;
  }
}

/* Progress bar area */
.vocab-fc-progress-bar-wrap {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.vocab-fc-progress-label {
  font-size: 0.95rem;
  color: var(--text-dark, #0f172a);
}
.vocab-fc-progress-label strong { color: var(--text-dark, #0f172a); }
.vocab-fc-progress-track {
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}
.vocab-fc-progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}
.vocab-fc-batch-label {
  font-size: 0.78rem;
  color: var(--text-medium, #64748b);
}

/* 3D card scene */
.vocab-fc-scene {
  perspective: 1200px;
  cursor: pointer;
  width: 100%;
  min-height: 240px;
  position: relative;
}
.vocab-fc-card {
  width: 100%;
  min-height: 240px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center center;
}
.vocab-fc-card-flipped {
  transform: rotateY(180deg);
}
.vocab-fc-card-front,
.vocab-fc-card-back {
  position: absolute;
  width: 100%;
  min-height: 240px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 20px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(0,0,0,0.10);
}
.vocab-fc-card-front {
  background: #ffffff;
  border: 2px solid var(--card-color, #10b981);
  gap: 16px;
}
.vocab-fc-card-back {
  background: #ffffff;
  border: 2px solid var(--card-color, #10b981);
  transform: rotateY(180deg);
  gap: 12px;
  text-align: center;
}

/* Card state badge */
.vocab-fc-card-state {
  position: absolute;
  top: 12px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 20px;
  padding: 3px 9px;
}
.vocab-fc-card-state .material-symbols-outlined { font-size: 0.9rem; }
.vocab-fc-state-retry { background: #fef3c7; color: #92400e; }
.vocab-fc-state-neutral { background: #dbeafe; color: #1e40af; }

/* Front face content */
.vocab-fc-word {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--text-dark, #0f172a);
  letter-spacing: -0.5px;
  text-align: center;
}
.vocab-fc-flip-hint {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--text-medium, #94a3b8);
}
.vocab-fc-flip-hint .material-symbols-outlined { font-size: 1rem; }

/* Back face content */
.vocab-fc-back-word {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--card-color, #10b981);
  letter-spacing: -0.3px;
}
.vocab-fc-definition {
  font-size: 1rem;
  color: var(--text-dark, #0f172a);
  line-height: 1.5;
  font-weight: 500;
}
.vocab-fc-example {
  font-size: 0.88rem;
  color: var(--text-medium, #64748b);
  font-style: italic;
  line-height: 1.4;
  border-top: 1px solid #e2e8f0;
  padding-top: 10px;
  width: 100%;
  text-align: center;
}

/* Card streak badge */
.vocab-fc-streak-badge {
  position: absolute;
  top: 12px;
  left: 14px;
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 20px;
  padding: 3px 9px;
  background: #fef9c3;
  color: #92400e;
}
.vocab-fc-streak-badge .material-symbols-outlined { font-size: 0.9rem; }

/* Action buttons */
.vocab-fc-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  position: relative;
  z-index: 2;
}
.vocab-fc-btn {
  flex: 1;
  max-width: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border: none;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.15s;
}
.vocab-fc-btn:active { transform: scale(0.97); }
.vocab-fc-btn .material-symbols-outlined { font-size: 1.3rem; }
.vocab-fc-bad {
  background: #ffffff;
  color: #dc2626;
  border: 2px solid #fca5a5;
}
.vocab-fc-bad:hover { background: #fef2f2; box-shadow: 0 4px 14px rgba(220,38,38,0.15); }
.vocab-fc-good {
  background: #ffffff;
  color: #16a34a;
  border: 2px solid #86efac;
}
.vocab-fc-good:hover { background: #f0fdf4; box-shadow: 0 4px 14px rgba(22,163,74,0.15); }

/* Results / batch complete screen */
.vocab-fc-results {
  align-items: center;
}
.vocab-fc-results-card {
  background: #fff;
  border: 2px solid var(--card-color, #10b981);
  border-radius: 24px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.10);
}
.vocab-fc-complete-card {
  border-color: #fbbf24;
}
.vocab-fc-results-icon .material-symbols-outlined {
  font-size: 3rem;
}
.vocab-fc-results-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-dark, #0f172a);
  text-align: center;
}
.vocab-fc-results-stats {
  display: flex;
  gap: 24px;
  justify-content: center;
}
.vocab-fc-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.vocab-fc-stat-num {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}
.vocab-fc-stat-label {
  font-size: 0.78rem;
  color: var(--text-medium, #64748b);
}
.vocab-fc-results-progress-track {
  width: 100%;
  height: 10px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}
.vocab-fc-results-progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.6s ease;
}
.vocab-fc-results-msg {
  font-size: 0.9rem;
  color: var(--text-medium, #64748b);
  text-align: center;
  line-height: 1.5;
}
.vocab-fc-next-batch-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border: none;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  margin-top: 4px;
}
.vocab-fc-next-batch-btn:hover { opacity: 0.9; }
.vocab-fc-next-batch-btn:active { transform: scale(0.97); }
.vocab-fc-next-batch-btn .material-symbols-outlined { font-size: 1.2rem; }
.vocab-fc-back-topics-btn { margin-top: 4px; }

/* ── VOCABULARY TOPIC LIST ─────────────────────────────────────────── */
.vocab-topic-list {
  display: flex;
  flex-direction: column;
  margin-top: 8px;
}
.vocab-topic-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 4px;
  border-bottom: 1px solid #f1f5f9;
}
.vocab-topic-row:last-child { border-bottom: none; }
.vocab-topic-info {
  flex: 1;
  min-width: 0;
}
.vocab-topic-name {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-dark, #0f172a);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vocab-topic-stats {
  font-size: 0.78rem;
  color: var(--text-medium, #64748b);
  margin-bottom: 5px;
}
.vocab-topic-count {
  font-weight: 700;
  color: var(--text-dark, #0f172a);
}
.vocab-topic-bar {
  height: 4px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  max-width: 180px;
}
.vocab-topic-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}
.vocab-topic-btns {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.vocab-topic-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s, box-shadow 0.15s;
  border: none;
  white-space: nowrap;
}
.vocab-topic-btn .material-symbols-outlined { font-size: 0.95rem; }
.vocab-topic-btn:active { transform: scale(0.97); }
.vocab-topic-review-btn {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}
.vocab-topic-review-btn:hover:not(:disabled) { background: #dbeafe; box-shadow: 0 2px 8px rgba(37,99,235,0.12); }
.vocab-topic-learn-btn {
  background: #10b981;
  color: #fff;
}
.vocab-topic-learn-btn:hover:not(:disabled) { opacity: 0.9; box-shadow: 0 2px 8px rgba(16,185,129,0.25); }
.vocab-topic-btn-disabled,
.vocab-topic-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}
@media (max-width: 520px) {
  .vocab-topic-row { flex-wrap: wrap; }
  .vocab-topic-btns { width: 100%; }
  .vocab-topic-btn { flex: 1; justify-content: center; }
}


/* ── Vocabulary Crossword ────────────────────────────────────────────── */
.vocab-cw-layout {
  width: 100%;
  height: 100%;
  min-height: 0;
}
.vocab-cw-main {
  width: 100%;
  overflow-y: auto;
  padding: 20px;
  padding-bottom: 110px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-sizing: border-box;
  background: linear-gradient(180deg, #f8f7ff 0%, #f0f4ff 100%);
}

/* ── Level-specific tinted backgrounds for play page ── */
.vocab-cw-main-a2, .vocab-cw-main-b1 { background: linear-gradient(180deg, #f0fdf8 0%, #e8f9f0 100%); }
.vocab-cw-main-b2                    { background: linear-gradient(180deg, #fffdf0 0%, #fef9e0 100%); }
.vocab-cw-main-c1                    { background: linear-gradient(180deg, #fff8f0 0%, #fef0e0 100%); }
.vocab-cw-main-c2                    { background: linear-gradient(180deg, #fff8f8 0%, #fee8e8 100%); }

/* Header */
.vocab-cw-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 16px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.vocab-cw-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}
.vocab-cw-header-icon {
  font-size: 1.5rem;
  color: #7c3aed;
}
.vocab-cw-header-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  min-width: 0;
}
.vocab-cw-header-sep {
  color: #94a3b8;
  font-size: 1rem;
}
.vocab-cw-header-lesson {
  font-size: 1rem;
  font-weight: 500;
  color: #475569;
}
.vocab-cw-level-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ede9fe;
  color: #5b21b6;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
/* Level-specific badge colors on play page */
.vocab-cw-lvl-a2, .vocab-cw-lvl-b1 { background: #d1fae5; color: #065f46; }
.vocab-cw-lvl-b2                    { background: #fef3c7; color: #713f12; }
.vocab-cw-lvl-c1                    { background: #ffedd5; color: #7c2d12; }
.vocab-cw-lvl-c2                    { background: #fee2e2; color: #7f1d1d; }
.vocab-cw-header-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.vocab-cw-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}
@media (hover: hover) and (pointer: fine) {
  .vocab-cw-btn:hover:not(:disabled) {
    background: #f1f5f9;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  }
}
.vocab-cw-btn .material-symbols-outlined { font-size: 1rem; }
.vocab-cw-hint-btn { color: #d97706; border-color: #fde68a; background: #fffbeb; }
.vocab-cw-solve-btn { color: #7c3aed; border-color: #ddd6fe; background: #f5f3ff; }
.vocab-cw-check-btn { color: #059669; border-color: #a7f3d0; background: #ecfdf5; }
@media (hover: hover) and (pointer: fine) {
  .vocab-cw-hint-btn:hover:not(:disabled) { background: #fef3c7; }
  .vocab-cw-solve-btn:hover:not(:disabled) { background: #ede9fe; }
  .vocab-cw-check-btn:hover:not(:disabled) { background: #d1fae5; }
}
.vocab-cw-reset-btn { color: #64748b; }

/* Board */
.vocab-cw-board {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  flex-wrap: wrap;
}
/* Black margin wrapper for the grid */
.vocab-cw-grid-outer {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #1e293b;
  padding: 10px;
  border-radius: 12px;
  flex-shrink: 0;
  box-shadow: 0 4px 18px rgba(15,23,42,0.25);
  max-width: 100%;
  overflow-x: auto;
  box-sizing: border-box;
}
.vocab-cw-grid-viewport {
  display: contents;
}
.vocab-cw-grid-wrap {
  overflow-x: auto;
  max-width: 100%;
}

/* Grid */
.vocab-cw-grid {
  display: grid;
  gap: 2px;
  background: #1e293b;
  width: fit-content;
}
.vocab-cw-grid-wrap { --cw-cell-size: 34px; }
.vocab-cw-cell {
  width: var(--cw-cell-size);
  height: var(--cw-cell-size);
  position: relative;
  background: #fff;
  box-sizing: border-box;
  cursor: pointer;
  user-select: none;
}
.vocab-cw-black {
  background: #1e293b;
  cursor: default;
}
.vocab-cw-cell-num {
  position: absolute;
  top: 1px;
  left: 2px;
  font-size: 9px;
  color: #64748b;
  font-weight: 700;
  pointer-events: none;
  z-index: 1;
  line-height: 1;
}
.vocab-cw-cell-letter {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #0f172a;
  pointer-events: none;
}
.vocab-cw-cell-active { background: #fef08a; }
.vocab-cw-cell-word { background: #dbeafe; }
.vocab-cw-cell-correct { background: #dcfce7; }
.vocab-cw-cell-correct .vocab-cw-cell-letter { color: #166534; }
.vocab-cw-cell-incorrect { background: #fee2e2; }
.vocab-cw-cell-incorrect .vocab-cw-cell-letter { color: #991b1b; }
.vocab-cw-cell.vocab-cw-cell-revealed,
.vocab-cw-cell.vocab-cw-cell-revealed.vocab-cw-cell-active,
.vocab-cw-cell.vocab-cw-cell-revealed.vocab-cw-cell-word { background: #7c3aed; }
.vocab-cw-cell-revealed .vocab-cw-cell-letter { color: #fff; }
.vocab-cw-cell.vocab-cw-cell-locked,
.vocab-cw-cell.vocab-cw-cell-locked.vocab-cw-cell-active,
.vocab-cw-cell.vocab-cw-cell-locked.vocab-cw-cell-word { background: #16a34a; }
.vocab-cw-cell.vocab-cw-cell-locked .vocab-cw-cell-letter { color: #fff; }
.vocab-cw-cell-active.vocab-cw-cell-correct { background: #fef08a; }
.vocab-cw-cell-active.vocab-cw-cell-incorrect { background: #fef08a; }

/* Active definition — now a full-width bar above the board */
.vocab-cw-active-def {
  background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
  border: 1px solid #bae6fd;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.85rem;
  color: #0c4a6e;
  line-height: 1.5;
  min-height: 44px;
  box-shadow: 0 1px 4px rgba(14,165,233,0.1);
}
.vocab-cw-active-def em {
  color: #94a3b8;
  font-style: italic;
}
.vocab-cw-active-num {
  font-weight: 700;
  font-size: 0.78rem;
  color: #0369a1;
  background: #bae6fd;
  border-radius: 4px;
  padding: 1px 5px;
  margin-right: 4px;
}
.vocab-cw-active-word {
  font-weight: 700;
  color: #059669;
}
.vocab-cw-active-example {
  color: #64748b;
  font-style: italic;
  font-size: 0.82rem;
  display: block;
  margin-top: 4px;
}

/* Clues panel */
.vocab-cw-clues {
  flex: 1;
  min-width: 200px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}
.vocab-cw-clues-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}
.vocab-cw-clues-toggle {
  display: flex;
  gap: 4px;
  margin-bottom: 4px;
}
.vocab-cw-clues-tab {
  flex: 1;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
}
.vocab-cw-clues-tab-active {
  background: #7c3aed;
  color: #fff;
  border-color: #7c3aed;
}
.vocab-cw-clue-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.vocab-cw-clue-section-title {
  color: #475569;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  padding: 8px 8px 4px;
  text-transform: uppercase;
}
.vocab-cw-clue-section-title:first-child {
  padding-top: 4px;
}
.vocab-cw-clue {
  font-size: 0.82rem;
  color: #334155;
  line-height: 1.45;
  padding: 5px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.12s;
}
.vocab-cw-clue:hover { background: #ede9fe; }
.vocab-cw-clue-active {
  background: #dbeafe !important;
  color: #1e40af;
  font-weight: 600;
}
.vocab-cw-clue-num {
  font-weight: 700;
  font-size: 0.75rem;
  color: #64748b;
  min-width: 28px;
  display: inline-block;
}
.vocab-cw-clue-active .vocab-cw-clue-num { color: #1d4ed8; }

/* Type badges for clue type (vocabulary / phrasal / collocation / idiom) */
.vocab-cw-type-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 5px;
  vertical-align: middle;
  opacity: 0.85;
}
.vocab-cw-type-vocabulary  { background: #dbeafe; color: #1e40af; }
.vocab-cw-type-collocation { background: #dcfce7; color: #166534; }
.vocab-cw-type-phrasal-verb { background: #fce7f3; color: #9d174d; }
.vocab-cw-type-idiom        { background: #fef3c7; color: #92400e; }

/* Word input strip — fixed at bottom like a modal bar */
.vocab-cw-word-strip {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
  background: linear-gradient(0deg, #f1f0ff 0%, #f8f7ff 100%);
  border-top: 1px solid #ddd6fe;
  box-shadow: 0 -4px 14px rgba(96,64,192,0.10);
}
.vocab-cw-strip-dir-row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: stretch;
  width: 100%;
  max-width: 440px;
  gap: 12px;
  padding: 0 2px;
  box-sizing: border-box;
}
.vocab-cw-strip-dir-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #ddd6fe;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  transition: background 0.14s, color 0.14s, border-color 0.14s;
  box-sizing: border-box;
}
.vocab-cw-strip-dir-btn:hover {
  background: #f5f3ff;
  border-color: #c4b5fd;
}
.vocab-cw-strip-dir-btn .material-symbols-outlined {
  font-size: 1.35rem;
  line-height: 1;
}
.vocab-cw-strip-dir-btn-active {
  background: #7c3aed;
  color: #fff;
  border-color: #7c3aed;
}
.vocab-cw-strip-dir-btn-active:hover {
  background: #6d28d9;
  border-color: #6d28d9;
}
.vocab-cw-strip-dir-btn-active .material-symbols-outlined {
  color: #fff;
}
@media (min-width: 701px) {
  .vocab-cw-strip-dir-row {
    display: none;
  }
}
.vocab-cw-strip-cells {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  min-height: 44px;
  align-items: center;
}
.vocab-cw-strip-hint {
  font-size: 0.82rem;
  color: #94a3b8;
  font-style: italic;
}
.vocab-cw-strip-cell {
  width: 38px;
  height: 38px;
  border: 2px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #0f172a;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  box-sizing: border-box;
  user-select: none;
}
.vocab-cw-strip-cell:hover { border-color: #94a3b8; background: #f1f5f9; }
.vocab-cw-strip-cell-active {
  border-color: #3b82f6 !important;
  background: #fef08a !important;
  box-shadow: 0 0 0 2px rgba(59,130,246,0.3);
}
.vocab-cw-strip-cell-filled { background: #f1f5f9; }
.vocab-cw-strip-cell-revealed { border-color: #7c3aed; color: #fff; background: #7c3aed; cursor: default; }
.vocab-cw-strip-cell-correct { border-color: #059669; color: #166534; background: #dcfce7; }
.vocab-cw-strip-cell-incorrect { border-color: #dc2626; color: #991b1b; background: #fee2e2; }
.vocab-cw-strip-cell.vocab-cw-strip-cell-locked { border-color: #16a34a; color: #fff; background: #16a34a; cursor: default; }
/* Hidden keyboard capture input */
.vocab-cw-strip-input {
  position: fixed;
  top: 0;
  left: 0;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
  border: none;
  outline: none;
  z-index: -1;
}

/* Back button */
.vocab-cw-back-btn {
  color: #475569 !important;
  border-color: #e2e8f0 !important;
  background: #f8fafc !important;
  justify-content: center;
  padding: 7px;
  width: 34px;
  height: 34px;
}
.vocab-cw-back-btn:hover:not(:disabled) { background: #f1f5f9 !important; }

/* Wordle/Crossword mode toggle buttons */
.vocab-cw-mode-btn { color: #475569; border-color: #e2e8f0; background: #f8fafc; }
.vocab-cw-mode-btn:hover:not(:disabled) { background: #f1f5f9; }
.vocab-cw-mode-btn.vocab-cw-cw-mode-btn-active,
.vocab-cw-mode-btn.vocab-cw-mode-btn-active { background: #7c3aed; color: #fff; border-color: #7c3aed; }
.vocab-cw-wordle-btn { color: #7c3aed; border-color: #ddd6fe; background: #faf5ff; }
.vocab-cw-wordle-btn:hover:not(:disabled) { background: #ede9fe; }
/* kept for back-compat — overridden by vocab-cw-mode-btn-active */
.vocab-cw-wordle-btn-active { background: #7c3aed !important; color: #fff !important; border-color: #7c3aed !important; }

/* Wordle area (inside grid-outer, replaces grid) */
.vocab-cw-wordle-area {
  background: #fff;
  border-radius: 4px;
  padding: 14px 12px;
  min-width: 200px;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
}
.vocab-cw-wordle-empty {
  color: #94a3b8;
  font-style: italic;
  font-size: 0.85rem;
  padding: 20px;
}
.vocab-cw-wordle-info {
  font-size: 0.85rem;
  color: #334155;
  margin-bottom: 4px;
}
.vocab-cw-wordle-len {
  color: #64748b;
  font-size: 0.8rem;
  margin-left: 6px;
}
.vocab-cw-wordle-grid {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-width: 100%;
}
.vocab-cw-wordle-row {
  display: flex;
  gap: 5px;
  justify-content: center;
}
.vocab-cw-wordle-box {
  width: 40px;
  height: 40px;
  border: 2px solid #cbd5e1;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #0f172a;
  box-sizing: border-box;
  transition: background 0.2s;
}
.wdl-green  { background: #4ade80; border-color: #16a34a; color: #fff; }
.wdl-yellow { background: #fbbf24; border-color: #d97706; color: #fff; }
.wdl-gray   { background: #94a3b8; border-color: #64748b; color: #fff; }
.wdl-hint   { color: #7c3aed; font-weight: 700; border-color: #ddd6fe; }
.wdl-empty  { background: #fff; border-color: #e2e8f0; }
.wdl-cur    { border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(59,130,246,0.2); }
.vocab-cw-wordle-submit-btn { color: #7c3aed; border-color: #ddd6fe; background: #faf5ff; }
.vocab-cw-wordle-submit-btn:hover:not(:disabled) { background: #ede9fe; }
.vocab-cw-wordle-reset-btn { color: #64748b; border-color: #e2e8f0; background: #f8fafc; }
.vocab-cw-wordle-reset-btn:hover:not(:disabled) { background: #f1f5f9; }
.vocab-cw-wordle-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 4px;
}
.vocab-cw-wordle-hint-msg {
  font-size: 0.8rem;
  color: #0369a1;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  border-radius: 6px;
  padding: 4px 10px;
  text-align: center;
}
.vocab-cw-wordle-msg {
  font-size: 0.85rem;
  font-weight: 600;
  min-height: 20px;
  text-align: center;
}
.vocab-cw-wordle-solved { color: #059669; }
.vocab-cw-wordle-failed { color: #dc2626; }

/* Crossword button in topic list */
.vocab-topic-crossword-btn {
  background: #f0fdf4;
  color: #059669;
  border: 1px solid #a7f3d0;
}
.vocab-topic-crossword-btn:hover:not(:disabled) {
  background: #d1fae5;
  box-shadow: 0 2px 8px rgba(16,185,129,0.15);
}

/* Mobile responsive */
@media (max-width: 700px) {
  #cw-strip-cells {
    display: none !important;
  }
  .vocab-cw-word-strip {
    padding-bottom: 4px;
  }
  /* Grid keeps a readable cell size; pan horizontally like zoomed content (page scroll for tall grids) */
  .vocab-cw-grid-outer {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    align-self: stretch;
    box-sizing: border-box;
    padding: 8px;
    --cw-gap: 2px;
    align-items: flex-start;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y pinch-zoom;
    overscroll-behavior: contain;
  }
  .vocab-cw-grid-viewport {
    display: block;
    width: max-content;
    min-width: 100%;
    max-width: none;
    box-sizing: border-box;
  }
  .vocab-cw-grid-wrap {
    --cw-cell-size: 32px;
    width: max-content;
    min-width: 100%;
    max-width: none;
    box-sizing: border-box;
    overflow-x: visible;
    overflow-y: visible;
  }
  .vocab-cw-grid {
    width: fit-content;
    margin: 0;
    max-width: none;
    gap: var(--cw-gap);
    grid-auto-rows: var(--cw-cell-size);
  }
  .vocab-cw-cell {
    width: var(--cw-cell-size);
    height: var(--cw-cell-size);
    min-width: var(--cw-cell-size);
    min-height: var(--cw-cell-size);
    box-sizing: border-box;
  }
  .vocab-cw-board { flex-direction: column; gap: 12px; }
  .vocab-cw-main {
    padding: 10px;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 120px);
    box-sizing: border-box;
  }
  .vocab-cw-clues {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    max-height: none;
    box-sizing: border-box;
    margin-bottom: 12px;
  }
  #cw-clues[data-cw-clues-dir="across"] #cw-panel-down {
    display: none !important;
  }
  #cw-clues[data-cw-clues-dir="down"] #cw-panel-across {
    display: none !important;
  }
  .vocab-cw-header { align-items: center; display: grid; grid-template-columns: auto minmax(0, 1fr); }
  .vocab-cw-header-title { gap: 6px; }
  .vocab-cw-header-text { font-size: 1rem; }
  .vocab-cw-header-sep,
  .vocab-cw-header-lesson { display: none; }
  .vocab-cw-header-btns {
    grid-column: 1 / -1;
    width: 100%;
    flex-wrap: nowrap;
    justify-content: space-between;
  }
  .vocab-cw-header-btns .vocab-cw-btn {
    flex: 1;
    justify-content: center;
    min-width: 0;
    padding: 8px;
  }
  .vocab-cw-header-btns .vocab-cw-btn > span:not(.material-symbols-outlined) { display: none; }
  .vocab-cw-wordle-area { min-width: 0; padding: 12px 8px; }
  .vocab-cw-wordle-row { gap: 4px; }
  .vocab-cw-wordle-box {
    width: clamp(24px, calc(8.33vw - 7.67px), 36px);
    height: clamp(24px, calc(8.33vw - 7.67px), 36px);
    border-radius: 5px;
  }
  .vocab-cw-wordle-actions .vocab-cw-btn {
    justify-content: center;
    padding: 8px 12px;
  }
}
@media (max-width: 420px) {
  .vocab-cw-main {
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 124px);
  }
  .vocab-cw-cell-letter { font-size: 0.72rem; }
  .vocab-cw-cell-num { font-size: 7px; }
  .vocab-cw-wordle-box { font-size: 0.9rem; }
}

/* ── Dictionaries Home Modal ── */
.dict-home-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: pvFadeIn 0.18s ease;
}

.dict-home-box {
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.2);
  width: 100%;
  max-width: 720px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dict-home-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(45, 46, 95, 0.08);
  flex-shrink: 0;
}

.dict-home-icon .material-symbols-outlined {
  font-size: 1.4rem;
  color: #002A7E;
}

.dict-home-title {
  flex: 1;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.dict-home-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #64748b;
  border-radius: 8px;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.dict-home-close:hover {
  background: rgba(0, 42, 126, 0.08);
  color: #002A7E;
}

.dict-home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  padding: 20px;
  overflow-y: auto;
}

.dict-home-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 16px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  text-align: center;
}

.dict-home-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
  border-color: #cbd5e1;
}

.dict-home-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dict-home-card-icon .material-symbols-outlined {
  font-size: 1.4rem;
  color: #fff;
}

.dict-home-card-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e293b;
}

@media (max-width: 480px) {
  .dict-home-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 14px;
  }
  .dict-home-card {
    padding: 14px 10px;
  }
}

/* ── Dictionary TTS Speak Button ─────────────────────────────────────── */
.dict-speak-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 8px;
  color: #6366f1;
  display: inline-flex;
  align-items: center;
  transition: background 0.15s, color 0.15s;
  vertical-align: middle;
  flex-shrink: 0;
}
.dict-speak-btn:hover {
  background: rgba(99, 102, 241, 0.12);
  color: #4338ca;
}
.dict-speak-btn:active {
  background: rgba(99, 102, 241, 0.22);
}
.dict-speak-btn .material-symbols-outlined {
  font-size: 1.2rem;
}

/* ── IRREGULAR VERBS DICTIONARY ────────────────────────────────────────── */
.irv-dict-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: pvFadeIn 0.18s ease;
}

.irv-dict-box {
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.2);
  width: 100%;
  max-width: 960px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.irv-dict-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(45, 46, 95, 0.08);
  flex-shrink: 0;
}

.irv-dict-icon .material-symbols-outlined {
  font-size: 1.4rem;
  color: #2563eb;
}

.irv-dict-practice-btn {
  border: none;
  background: #2563eb;
  color: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}
.irv-dict-practice-btn:hover { filter: brightness(1.08); }

.irv-dict-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  color: var(--text-medium, #64748b);
  display: flex;
  align-items: center;
  transition: background 0.15s;
}
.irv-dict-close:hover { background: rgba(239, 68, 68, 0.08); color: #ef4444; }

.irv-dict-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 8px;
  border-bottom: 1px solid rgba(45, 46, 95, 0.07);
}

.irv-dict-search-icon .material-symbols-outlined {
  font-size: 1.1rem;
  color: var(--text-medium, #94a3b8);
  flex-shrink: 0;
}

.irv-dict-search {
  flex: 1;
  padding: 9px 12px;
  border: 1.5px solid rgba(45, 46, 95, 0.15);
  border-radius: 12px;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.irv-dict-search:focus { border-color: #2563eb; }

.irv-dict-count {
  font-size: 0.8rem;
  color: var(--text-medium, #94a3b8);
  padding: 6px 18px 0;
}

.irv-dict-body {
  flex: 1;
  overflow: auto;
  padding: 10px 16px 16px;
}

.irv-dict-table-wrap {
  overflow: auto;
  border: 1px solid rgba(45, 46, 95, 0.1);
  border-radius: 14px;
  background: #fff;
}

.irv-dict-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.irv-dict-table th {
  position: sticky;
  top: 0;
  background: #2563eb;
  color: #fff;
  font-size: 0.86rem;
  text-align: left;
  padding: 10px 12px;
  z-index: 1;
  width: 33.333%;
}

.irv-dict-table td {
  border-top: 1px solid #e2e8f0;
  padding: 9px 12px;
  font-size: 0.92rem;
  color: #1e293b;
  vertical-align: top;
  width: 33.333%;
  min-width: 0;
  overflow-wrap: normal;
  word-break: normal;
  text-align: center;
}

.irv-col-form {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-weight: 700;
}

.irv-col-word {
  display: block;
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
  color: #1e293b;
  font-family: inherit;
  font-weight: 800;
  font-size: clamp(0.74rem, 2.8vw, 0.92rem);
  line-height: 1.12;
  min-height: 1.12em;
}

.irv-dict-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 40px 20px;
  color: var(--text-medium, #94a3b8);
}
.irv-dict-empty .material-symbols-outlined { font-size: 2rem; }
.irv-dict-empty p { margin: 0; font-size: 0.95rem; }

.irv-practice-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.irv-practice-title {
  font-weight: 800;
  color: #1e293b;
}

.irv-practice-score {
  font-size: 0.88rem;
  color: #64748b;
}

.irv-practice-table td {
  vertical-align: middle;
}

.irv-practice-infinitive {
  font-weight: 800;
}

.irv-practice-input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 9px 8px;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  font-size: clamp(0.76rem, 3vw, 0.9rem);
  outline: none;
  transition: border-color 0.15s;
  text-align: center;
}
.irv-practice-input:focus { border-color: #2563eb; }

.irv-input-correct {
  border-color: #10b981;
  background: #ecfdf5;
  color: #065f46;
  font-weight: 700;
}

.irv-input-wrong {
  border-color: #ef4444;
  background: #fef2f2;
  color: #991b1b;
}

.irv-input-showing-correct {
  border-color: #7c3aed;
  background: rgba(124, 58, 237, 0.07);
  color: #5b21b6;
  font-weight: 700;
}

.irv-practice-result {
  display: none;
  font-size: 0.88rem;
  font-weight: 700;
}

.irv-practice-result-ok {
  color: #065f46;
}

.irv-practice-result-wrong {
  color: #991b1b;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.irv-practice-result-wrong span {
  font-weight: 500;
  font-size: 0.78rem;
}

.irv-practice-user-answer {
  color: #b91c1c;
}

.irv-practice-correct-answer {
  color: #6d28d9;
}

.irv-practice-correct-answer-hidden {
  display: none;
}

.irv-practice-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.irv-practice-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(45, 46, 95, 0.2);
  background: #fff;
  color: #334155;
  border-radius: 10px;
  min-width: 42px;
  min-height: 38px;
  padding: 8px 10px;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
}
.irv-practice-btn .material-symbols-outlined { font-size: 1.15rem; }
.irv-practice-btn:hover:not(:disabled) { background: #f1f5f9; }
.irv-practice-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.irv-practice-btn-primary {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}
.irv-practice-btn-primary:hover:not(:disabled) { background: #1d4ed8; }

.irv-practice-complete {
  text-align: center;
  padding: 36px 20px;
}
.irv-practice-complete .material-symbols-outlined {
  font-size: 2.4rem;
  color: #2563eb;
}
.irv-practice-complete h3 {
  margin: 10px 0 8px;
  color: #0f172a;
}
.irv-practice-complete p {
  margin: 0;
  color: #475569;
}

.irv-practice-complete-actions {
  margin-top: 16px;
  display: inline-flex;
  gap: 10px;
}

@media (max-width: 640px) {
  .pv-write-row {
    width: 100%;
  }

  .pv-write-input,
  .wf-transform-input {
    width: 100%;
    max-width: 100% !important;
    box-sizing: border-box;
    font-size: clamp(0.82rem, 3.4vw, 0.97rem);
  }

  .irv-dict-overlay {
    padding: 8px;
  }

  .irv-dict-box {
    max-height: 96vh;
    border-radius: 18px;
  }

  .irv-dict-header {
    gap: 8px;
    padding: 14px 12px 10px;
  }

  .irv-dict-practice-btn {
    padding: 7px 9px;
    font-size: 0.78rem;
  }

  .irv-dict-search-row {
    padding: 10px 10px 8px;
  }

  .irv-dict-body {
    padding: 8px 8px 12px;
  }

  .irv-dict-table th,
  .irv-dict-table td {
    padding: 7px 4px;
  }

  .irv-dict-table th {
    font-size: clamp(0.62rem, 2.5vw, 0.78rem);
    text-align: center;
  }

  .irv-col-word {
    font-size: clamp(0.62rem, 2.7vw, 0.82rem);
  }

  .dict-speak-btn {
    padding: 2px 4px;
  }

  .dict-speak-btn .material-symbols-outlined {
    font-size: 1rem;
  }

  .irv-practice-table .irv-practice-infinitive {
    font-size: clamp(0.68rem, 2.8vw, 0.86rem);
    line-height: 1.1;
    white-space: nowrap;
  }

  .irv-practice-input {
    padding: 7px 4px;
    font-size: clamp(0.62rem, 2.7vw, 0.82rem);
  }

  .irv-practice-actions,
  .irv-practice-complete-actions {
    justify-content: center;
  }

  .irv-practice-actions .irv-practice-btn,
  .irv-practice-complete-actions .irv-practice-btn {
    min-width: 40px;
    width: 40px;
    height: 40px;
    padding: 0;
  }

  .fe-qr-back-btn .icon-btn-label,
  .vocab-fc-next-batch-btn .icon-btn-label,
  .vocab-cw-back-btn .icon-btn-label,
  .irv-dict-practice-btn .icon-btn-label {
    display: none;
  }
}
