/**
 * Paril – Page Styles
 * Page-specific styles for all app views.
 */

/* ============================================================
   PAGE WRAPPER
   ============================================================ */

.page {
  min-height: calc(100vh - var(--nav-height));
  min-height: calc(100dvh - var(--nav-height));
  padding: var(--page-padding);
  padding-top: var(--space-6);
  padding-bottom: calc(var(--nav-height) + var(--space-6));
  animation: fadeIn var(--duration-base) var(--ease-decelerate) both;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}

.page-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--weight-black);
  color: var(--text-primary);
  line-height: var(--line-tight);
}

.page-subtitle {
  font-size: var(--text-base);
  color: var(--text-secondary);
  margin-top: var(--space-1);
}

/* ============================================================
   ONBOARDING
   ============================================================ */

.onboarding-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: calc(var(--space-6) + env(safe-area-inset-top, 0px)) var(--page-padding) calc(var(--space-6) + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(160deg,
    hsl(242, 82%, 97%) 0%,
    hsl(255, 82%, 96%) 40%,
    hsl(242, 50%, 98%) 100%
  );
}

.onboarding-hero {
  text-align: center;
  padding: var(--space-10) 0 var(--space-8);
}

.onboarding-emoji {
  font-size: 72px;
  line-height: 1;
  animation: bounceIn 0.6s var(--ease-bounce) both;
  filter: drop-shadow(0 8px 20px hsla(0,0%,0%,0.12));
}

.onboarding-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--weight-black);
  color: var(--text-primary);
  line-height: var(--line-tight);
  margin-top: var(--space-6);
  animation: slideUp 0.5s var(--ease-decelerate) 0.2s both;
}

.onboarding-subtitle {
  font-size: var(--text-md);
  color: var(--text-secondary);
  margin-top: var(--space-3);
  line-height: var(--line-relaxed);
  animation: slideUp 0.5s var(--ease-decelerate) 0.35s both;
}

.onboarding-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.onboarding-step-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-black);
  color: var(--text-primary);
  text-align: center;
}

.goal-options, .motivation-options, .avatar-options {
  display: grid;
  gap: var(--space-3);
}

.goal-options { grid-template-columns: 1fr 1fr; }
.motivation-options { grid-template-columns: 1fr 1fr; }
.avatar-options { grid-template-columns: repeat(4, 1fr); }

.goal-option, .motivation-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-5) var(--space-3);
  background: var(--bg-card);
  border: 2.5px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-spring);
  text-align: center;
}

.goal-option:hover, .motivation-option:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-xlight);
  transform: translateY(-2px);
}

.goal-option.selected, .motivation-option.selected {
  border-color: var(--color-primary);
  background: var(--color-primary-xlight);
  box-shadow: var(--shadow-primary);
}

.goal-option .option-emoji { font-size: 32px; line-height: 1; }
.goal-option .option-label {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: var(--text-base);
  color: var(--text-primary);
}
.goal-option .option-sub {
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

.motivation-option .option-emoji { font-size: 36px; }
.motivation-option .option-label {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: var(--text-sm);
  color: var(--text-primary);
}

.avatar-option {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--border-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all var(--duration-fast) var(--ease-spring);
}

.avatar-option:hover { transform: scale(1.1); }
.avatar-option.selected {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px var(--color-primary-xlight);
  transform: scale(1.1);
}

.onboarding-progress {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
  margin-bottom: var(--space-6);
}

.onboarding-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--border-radius-full);
  background: var(--color-neutral-200);
  transition: all var(--duration-base) var(--ease-spring);
}

.onboarding-dot.active {
  width: 24px;
  background: var(--color-primary);
}

.onboarding-dot.done {
  background: var(--color-success);
}

/* ============================================================
   HOME / DASHBOARD
   ============================================================ */

.home-page {
  padding-bottom: calc(var(--nav-height) + var(--space-4));
}

.home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--page-padding) var(--space-4);
}

.home-greeting {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--weight-black);
  color: var(--text-primary);
  line-height: var(--line-tight);
}

.home-date {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: 2px;
}

.home-stats-row {
  display: flex;
  gap: var(--space-3);
  padding: 0 var(--page-padding) var(--space-4);
}

.stat-mini {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  padding: var(--space-3) var(--space-2);
  background: var(--bg-card);
  border-radius: var(--border-radius-lg);
  border: 1.5px solid var(--border-color);
  box-shadow: var(--shadow-xs);
}

.stat-mini-value {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-black);
  line-height: 1;
}

.stat-mini-label {
  font-size: 10px;
  font-weight: var(--weight-semibold);
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.2;
}

.daily-goal-card {
  margin: 0 var(--page-padding) var(--space-4);
  padding: var(--space-5);
  background: linear-gradient(135deg, var(--color-primary), hsl(255, 82%, 55%));
  border-radius: var(--border-radius-xl);
  box-shadow: var(--shadow-primary);
  color: white;
}

.daily-goal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.daily-goal-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
}

.daily-goal-xp {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  opacity: 0.85;
}

.daily-goal-bar {
  height: 10px;
  background: hsla(0,0%,100%,0.25);
  border-radius: var(--border-radius-full);
  overflow: hidden;
  margin-bottom: var(--space-2);
}

.daily-goal-fill {
  height: 100%;
  background: white;
  border-radius: var(--border-radius-full);
  transition: width 0.8s var(--ease-spring);
  min-width: 8px;
}

.daily-goal-status {
  font-size: var(--text-sm);
  opacity: 0.85;
}

/* Home continue lesson card */
.continue-card {
  margin: 0 var(--page-padding) var(--space-4);
  cursor: pointer;
}

.continue-card-inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5);
  background: var(--bg-card);
  border-radius: var(--border-radius-xl);
  border: 1.5px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-base) var(--ease-spring);
}

.continue-card:hover .continue-card-inner {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.continue-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--border-radius-lg);
  background: var(--color-primary-xlight);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}

.continue-info { flex: 1; }
.continue-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.continue-title {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  margin-top: 2px;
}
.continue-progress {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  margin-top: 2px;
}

.continue-arrow {
  width: 36px;
  height: 36px;
  border-radius: var(--border-radius-full);
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.continue-arrow svg { width: 18px; height: 18px; stroke: white; stroke-width: 2.5; }

/* ============================================================
   LEARN PAGE (Learning Path)
   ============================================================ */

.learn-page {}

.learn-header {
  padding: var(--space-5) var(--page-padding);
  background: linear-gradient(135deg, var(--color-primary), hsl(255, 82%, 55%));
  color: white;
}

.learn-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--weight-black);
  margin-bottom: var(--space-2);
}

.learn-subtitle {
  opacity: 0.85;
  font-size: var(--text-sm);
}

.course-section {
  padding: var(--space-6) var(--page-padding) var(--space-4);
}

.course-section-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.course-section-emoji { font-size: 28px; }

.course-section-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--weight-black);
  color: var(--text-primary);
}

.course-section-progress {
  margin-left: auto;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-secondary);
}

.lessons-track {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  position: relative;
  padding: var(--space-4) 0;
}

.lessons-track-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--color-success), var(--border-color));
  left: 50%;
  transform: translateX(-50%);
  z-index: 0;
}

.lesson-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  position: relative;
  z-index: 1;
}

.lesson-row:nth-child(even) { flex-direction: row-reverse; }

.lesson-meta {
  flex: 1;
  max-width: 120px;
}

.lesson-meta-title {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
}

.lesson-meta-info {
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

/* ============================================================
   LESSON PAGE
   ============================================================ */

.lesson-page {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-modal);
  background: var(--bg-base);
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  padding: 0;
  overflow: hidden !important;
  box-sizing: border-box;
}

.lesson-header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: clamp(10px, 1.8vh, 16px) var(--page-padding);
  padding-top: calc(clamp(10px, 1.8vh, 16px) + env(safe-area-inset-top, 0px));
  position: relative;
  z-index: var(--z-raised);
  background: var(--bg-base);
  border-bottom: 2px solid var(--border-color);
  flex-shrink: 0;
}

.lesson-exit-btn {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-full);
  color: var(--text-secondary);
  background: var(--color-neutral-100);
  transition: all var(--duration-fast) var(--ease-spring);
  flex-shrink: 0;
}

.lesson-exit-btn:hover { color: var(--text-primary); background: var(--color-neutral-150); transform: scale(1.05); }

.lesson-progress-wrap { flex: 1; display: flex; flex-direction: column; gap: 4px; }

.lesson-combo-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: linear-gradient(135deg, #FFF0D6, #FFE2B3);
  border: 2px solid #FF9600;
  border-radius: var(--border-radius-full);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--weight-black);
  color: #E58700;
  box-shadow: 0 4px 12px rgba(255, 150, 0, 0.3);
  animation: bounceIn 0.4s var(--ease-bounce);
  flex-shrink: 0;
}

.lesson-combo-badge.pop {
  animation: pulse 0.4s var(--ease-spring);
}

.lesson-body {
  flex: 1;
  min-height: 0;
  padding: clamp(12px, 2.5vh, 24px) var(--page-padding);
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 2vh, 24px);
  justify-content: space-around;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

.exercise-instruction {
  font-family: var(--font-display);
  font-size: clamp(0.75rem, 1.5vh, 0.875rem);
  font-weight: var(--weight-bold);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: clamp(2px, 0.5vh, 6px);
}

.exercise-question {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(12px, 2vh, 20px);
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vh, 1.5rem);
  font-weight: var(--weight-black);
  color: var(--text-primary);
  line-height: var(--line-snug);
  text-align: center;
}

.exercise-question.french {
  font-size: clamp(1.25rem, 3vh, 1.75rem);
  color: var(--color-primary);
}

.exercise-options {
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.5vh, 16px);
  flex-shrink: 1;
}

.exercise-word-bank {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  min-height: 60px;
  padding: var(--space-3);
  background: var(--color-neutral-100);
  border-radius: var(--border-radius-lg);
  border: 2px dashed var(--border-color);
}

.exercise-answer-area {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  min-height: 56px;
  padding: var(--space-3);
  background: var(--bg-card);
  border-radius: var(--border-radius-lg);
  border: 2px solid var(--border-color);
  transition: border-color var(--duration-fast);
}

.exercise-answer-area:focus-within {
  border-color: var(--color-primary);
}

.exercise-audio-btn {
  width: 64px;
  height: 64px;
  border-radius: var(--border-radius-full);
  background: var(--color-primary-xlight);
  border: 2px solid var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-spring);
  margin-bottom: clamp(16px, 3vh, 24px);
}

.exercise-audio-btn:hover {
  background: var(--color-primary);
  transform: scale(1.05);
}

.exercise-audio-btn:hover svg { stroke: white; }

.exercise-audio-btn svg {
  width: 28px;
  height: 28px;
  stroke: var(--color-primary);
  stroke-width: 2;
}

.lesson-footer {
  padding: var(--space-4) var(--page-padding);
  padding-bottom: calc(var(--space-4) + env(safe-area-inset-bottom, 0px));
  position: sticky;
  bottom: 0;
  background: var(--bg-base);
  border-top: 2px solid var(--border-color);
  transition: background-color 0.25s ease, border-color 0.25s ease;
  z-index: var(--z-overlay);
}

.lesson-footer.is-correct {
  background-color: var(--color-success-xlight);
  border-top-color: var(--color-success);
}

.lesson-footer.is-wrong {
  background-color: var(--color-error-xlight);
  border-top-color: var(--color-error);
}

.lesson-feedback {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  animation: slideUp 0.3s var(--ease-spring) both;
}

.feedback-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--border-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.is-correct .feedback-icon {
  background: var(--color-success);
  color: white;
  box-shadow: 0 4px 12px hsla(98, 70%, 40%, 0.3);
  animation: bounceIn 0.4s var(--ease-bounce);
}

.is-wrong .feedback-icon {
  background: var(--color-error);
  color: white;
  box-shadow: 0 4px 12px hsla(0, 80%, 50%, 0.3);
  animation: shake 0.4s var(--ease-standard);
}

.feedback-text {
  flex: 1;
}

.feedback-text h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--weight-black);
  margin: 0 0 4px 0;
}

.is-correct .feedback-text h3 { color: var(--color-success-dark); }
.is-wrong .feedback-text h3 { color: var(--color-error-dark); }

.feedback-solution-box {
  margin-top: 6px;
  padding: var(--space-2) var(--space-3);
  background: white;
  border-radius: var(--border-radius-md);
  border: 1.5px solid var(--color-error-light);
  font-size: var(--text-sm);
  color: var(--text-primary);
  font-weight: var(--weight-bold);
  box-shadow: var(--shadow-xs);
}

/* ============================================================
   SPEAKING PAGE
   ============================================================ */

.speaking-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  padding-bottom: var(--nav-height);
}

.speaking-header {
  padding: var(--space-4) var(--page-padding);
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.speaking-scenario-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: var(--color-speaking);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.speaking-scenario-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--weight-black);
  color: var(--text-primary);
}

/* Scenario selector */
.scenario-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  padding: var(--space-4) var(--page-padding);
  overflow-y: auto;
}

.scenario-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-3);
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-xl);
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-spring);
  text-align: center;
}

.scenario-card:hover {
  border-color: var(--color-speaking);
  background: var(--color-speaking-xlight);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px hsla(175, 72%, 42%, 0.2);
}

.scenario-emoji { font-size: 40px; line-height: 1; }
.scenario-name {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
}
.scenario-level {
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

/* Chat Interface */
.chat-area {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4) var(--page-padding);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  scroll-behavior: smooth;
}

.chat-bubble {
  max-width: 82%;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--border-radius-lg);
  font-size: var(--text-base);
  line-height: var(--line-relaxed);
  animation: slideUp var(--duration-base) var(--ease-decelerate) both;
}

.chat-bubble-ai {
  background: var(--color-neutral-100);
  color: var(--text-primary);
  border-bottom-left-radius: var(--border-radius-xs);
  align-self: flex-start;
}

.chat-bubble-ai .bubble-name {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: var(--color-speaking);
  margin-bottom: 4px;
}

.chat-bubble-user {
  background: var(--color-primary);
  color: white;
  border-bottom-right-radius: var(--border-radius-xs);
  align-self: flex-end;
}

.chat-bubble-user.correct {
  background: var(--color-success);
}

.chat-controls {
  padding: var(--space-4) var(--page-padding);
  padding-bottom: calc(var(--space-4) + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border-color);
  background: var(--bg-card);
}

.chat-hint {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
  text-align: center;
  font-style: italic;
}

.chat-mic-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
}

.pronunciation-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4);
  background: var(--bg-card);
  border-radius: var(--border-radius-xl);
  border: 1.5px solid var(--border-color);
  animation: scaleSpring var(--duration-modal) var(--ease-spring) both;
}

.pron-score-title {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--text-secondary);
  text-align: center;
}

.pron-score-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  width: 100%;
}

.pron-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.pron-metric-value {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-black);
  color: var(--color-success);
}

.pron-metric-label {
  font-size: 10px;
  color: var(--text-secondary);
  text-align: center;
}

/* ============================================================
   STATS PAGE
   ============================================================ */

.stats-page {}

.stats-hero {
  padding: var(--space-8) var(--page-padding) var(--space-6);
  background: linear-gradient(135deg, var(--color-primary), hsl(255, 82%, 52%));
  color: white;
  text-align: center;
}

.stats-hero-level {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: var(--space-2);
}

.stats-hero-xp {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: var(--weight-black);
  line-height: 1;
}

.stats-hero-label {
  opacity: 0.8;
  font-size: var(--text-sm);
  margin-top: var(--space-1);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  padding: var(--space-6) var(--page-padding) 0;
}

.stat-card {
  padding: var(--space-4);
  background: var(--bg-card);
  border-radius: var(--border-radius-lg);
  border: 1.5px solid var(--border-color);
  box-shadow: var(--shadow-xs);
}

.stat-card-icon { font-size: 24px; margin-bottom: var(--space-2); }

.stat-card-value {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--weight-black);
  color: var(--text-primary);
  line-height: 1;
}

.stat-card-label {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Weekly chart */
.weekly-chart {
  margin: var(--space-6) var(--page-padding) 0;
  padding: var(--space-5);
  background: var(--bg-card);
  border-radius: var(--border-radius-xl);
  border: 1.5px solid var(--border-color);
}

.weekly-chart-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-5);
}

.weekly-bars {
  display: flex;
  align-items: flex-end;
  gap: var(--space-2);
  height: 100px;
}

.weekly-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  height: 100%;
}

.weekly-bar {
  width: 100%;
  border-radius: var(--border-radius-sm) var(--border-radius-sm) 0 0;
  background: var(--color-primary-xlight);
  min-height: 4px;
  transition: height 0.8s var(--ease-spring);
  position: relative;
}

.weekly-bar.today { background: var(--color-primary); }

.weekly-day {
  font-size: 10px;
  font-weight: var(--weight-bold);
  color: var(--text-tertiary);
}

.weekly-day.today { color: var(--color-primary); }

/* Streak calendar heatmap */
.streak-calendar {
  margin: var(--space-4) var(--page-padding) 0;
  padding: var(--space-5);
  background: var(--bg-card);
  border-radius: var(--border-radius-xl);
  border: 1.5px solid var(--border-color);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-day {
  aspect-ratio: 1;
  border-radius: var(--border-radius-xs);
  background: var(--color-neutral-100);
}

.calendar-day.active-1 { background: hsla(152, 68%, 42%, 0.3); }
.calendar-day.active-2 { background: hsla(152, 68%, 42%, 0.55); }
.calendar-day.active-3 { background: var(--color-success); }
.calendar-day.today { outline: 2px solid var(--color-primary); outline-offset: 1px; }

/* ============================================================
   DICTIONARY PAGE
   ============================================================ */

.dictionary-page { padding: var(--space-4) var(--page-padding); }

.dictionary-search {
  position: relative;
  margin-bottom: var(--space-4);
}

.dictionary-search-icon {
  position: absolute;
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
}

.dictionary-search-input {
  padding-left: calc(var(--space-4) + 24px + var(--space-2));
}

.vocabulary-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.vocab-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-card);
  border-radius: var(--border-radius-lg);
  border: 1.5px solid var(--border-color);
  cursor: pointer;
  transition: all var(--duration-fast);
}

.vocab-item:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-xlight);
}

.vocab-fr {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--color-primary);
  flex: 1;
}

.vocab-de {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  flex: 1;
  text-align: right;
}

.vocab-ease {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

/* ============================================================
   PROFILE PAGE
   ============================================================ */

.profile-page { padding: var(--space-6) var(--page-padding); }

.profile-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: var(--space-6);
}

.profile-level-ring {
  position: relative;
}

.profile-avatar-container {
  position: relative;
  width: 90px;
  height: 90px;
}

.profile-avatar {
  width: 90px;
  height: 90px;
  border-radius: var(--border-radius-full);
  border: 3px solid var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  background: var(--color-primary-xlight);
}

.profile-name {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--weight-black);
  color: var(--text-primary);
}

.profile-level-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--color-xp-xlight);
  border-radius: var(--border-radius-full);
  border: 1.5px solid var(--color-xp-light);
}

.profile-level-label {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--color-xp-dark);
}

.settings-section { margin-bottom: var(--space-6); }

.settings-title {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-3);
}

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4);
  background: var(--bg-card);
  border-radius: var(--border-radius-lg);
  border: 1.5px solid var(--border-color);
  margin-bottom: var(--space-2);
  cursor: pointer;
  transition: all var(--duration-fast);
}

.settings-item:hover { background: var(--color-neutral-100); }

.settings-item-label {
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  font-size: var(--text-base);
  color: var(--text-primary);
}

.settings-item-value {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* Toggle switch */
.toggle {
  position: relative;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
}

.toggle-input { opacity: 0; width: 0; height: 0; }

.toggle-track {
  position: absolute;
  inset: 0;
  border-radius: var(--border-radius-full);
  background: var(--color-neutral-200);
  cursor: pointer;
  transition: background var(--duration-base) var(--ease-standard);
}

.toggle-track::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: var(--border-radius-full);
  background: white;
  box-shadow: var(--shadow-xs);
  transition: transform var(--duration-base) var(--ease-spring);
}

.toggle-input:checked + .toggle-track { background: var(--color-primary); }
.toggle-input:checked + .toggle-track::before { transform: translateX(20px); }

/* ============================================================
   ACHIEVEMENT POPUP (Level-Up / Achievement)
   ============================================================ */

.achievement-popup {
  text-align: center;
  padding: var(--space-8) var(--space-6);
}

.achievement-popup-icon {
  font-size: 80px;
  line-height: 1;
  animation: bounceIn 0.6s var(--ease-bounce) both;
  filter: drop-shadow(0 8px 24px hsla(0,0%,0%,0.15));
}

.achievement-popup-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--weight-black);
  color: var(--text-primary);
  margin-top: var(--space-6);
  animation: slideUp 0.5s var(--ease-decelerate) 0.3s both;
}

.achievement-popup-subtitle {
  font-size: var(--text-md);
  color: var(--text-secondary);
  margin-top: var(--space-3);
  animation: slideUp 0.5s var(--ease-decelerate) 0.45s both;
}

.achievement-popup-xp {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  background: var(--color-xp-xlight);
  border-radius: var(--border-radius-full);
  border: 1.5px solid var(--color-xp-light);
  margin-top: var(--space-5);
  animation: scaleSpring 0.5s var(--ease-spring) 0.6s both;
}

.achievement-popup-xp-value {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-black);
  color: var(--color-xp);
}

/* ============================================================
   PRACTICE PAGE
   ============================================================ */

.practice-page { padding: var(--space-4) var(--page-padding); }

.category-chips {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  padding-bottom: var(--space-2);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.category-chips::-webkit-scrollbar { display: none; }

.category-chip {
  flex-shrink: 0;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--border-radius-full);
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration-fast);
  white-space: nowrap;
}

.category-chip.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
  box-shadow: var(--shadow-primary);
}

/* ============================================================
   LEVEL UP ANIMATION
   ============================================================ */

.levelup-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg,
    hsl(242, 82%, 55%),
    hsl(270, 78%, 58%),
    hsl(242, 82%, 48%)
  );
  background-size: 200% 200%;
  animation:
    overlayFade var(--duration-base) var(--ease-standard) both,
    gradientFlow 3s linear infinite;
}

.levelup-rings {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.levelup-ring {
  position: absolute;
  width: 200px;
  height: 200px;
  border: 3px solid hsla(0,0%,100%,0.3);
  border-radius: var(--border-radius-full);
  animation: levelUpRing 1.5s var(--ease-standard) infinite;
}

.levelup-ring:nth-child(2) { animation-delay: 0.3s; }
.levelup-ring:nth-child(3) { animation-delay: 0.6s; }

.levelup-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: white;
  animation: scaleSpring 0.6s var(--ease-bounce) 0.2s both;
}

.levelup-label {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: var(--space-3);
}

.levelup-number {
  font-family: var(--font-display);
  font-size: 88px;
  font-weight: var(--weight-black);
  line-height: 1;
  text-shadow: 0 8px 32px hsla(0,0%,0%,0.2);
}

.levelup-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--weight-black);
  margin-top: var(--space-2);
}

.levelup-subtitle {
  opacity: 0.85;
  font-size: var(--text-md);
  margin-top: var(--space-2);
}


/* ============================================================
   TEACH CARD – New Word Introduction
   ============================================================ */

.teach-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-4) var(--space-4) var(--space-6);
  gap: var(--space-3);
}

.teach-card-label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: var(--weight-extrabold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: rgba(88, 204, 2, 0.1);
  padding: 4px 14px;
  border-radius: 20px;
}

/* ── CSS Graphic container ───────────────────────────────── */
.teach-graphic-wrap {
  --teach-accent: #7C6FF0;
  position: relative;
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: var(--space-2) 0;
}

.teach-shape-glow {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--teach-accent) 0%, transparent 70%);
  opacity: 0.15;
  animation: teach-glow-pulse 2.4s ease-in-out infinite;
}

@keyframes teach-glow-pulse {
  0%, 100% { transform: scale(1);   opacity: 0.15; }
  50%       { transform: scale(1.2); opacity: 0.28; }
}

/* Base shape styling */
.teach-shape {
  width: 72px;
  height: 72px;
  background: var(--teach-accent);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--teach-accent) 40%, transparent);
  animation: teach-shape-float 3s ease-in-out infinite;
}

@keyframes teach-shape-float {
  0%, 100% { transform: translateY(0)   rotate(0deg); }
  50%       { transform: translateY(-6px) rotate(3deg); }
}

/* Circle */
.teach-shape-circle {
  border-radius: 50%;
}

/* Diamond */
.teach-shape-diamond {
  border-radius: 8px;
  transform: rotate(45deg);
  width: 56px;
  height: 56px;
}
.teach-shape-diamond.teach-shape { animation: teach-shape-float-diamond 3s ease-in-out infinite; }
@keyframes teach-shape-float-diamond {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50%       { transform: rotate(48deg) translateY(-6px); }
}

/* Triangle (CSS only) */
.teach-shape-triangle {
  width: 0;
  height: 0;
  background: none;
  box-shadow: none;
  border-left:  36px solid transparent;
  border-right: 36px solid transparent;
  border-bottom: 72px solid var(--teach-accent);
  border-radius: 0;
  filter: drop-shadow(0 8px 16px color-mix(in srgb, var(--teach-accent) 40%, transparent));
}

/* Hexagon */
.teach-shape-hexagon {
  border-radius: 14px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

/* Ring (hollow circle) */
.teach-shape-ring {
  background: transparent;
  border-radius: 50%;
  border: 14px solid var(--teach-accent);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--teach-accent) 40%, transparent);
}

/* Cross/Plus */
.teach-shape-cross {
  width: 72px;
  height: 72px;
  background: none;
  box-shadow: none;
  position: relative;
}
.teach-shape-cross::before,
.teach-shape-cross::after {
  content: '';
  position: absolute;
  background: var(--teach-accent);
  border-radius: 6px;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--teach-accent) 40%, transparent);
}
.teach-shape-cross::before { width: 24px; height: 72px; left: 24px; top: 0; }
.teach-shape-cross::after  { width: 72px; height: 24px; left: 0;    top: 24px; }

/* ── Word text ────────────────────────────────────────────── */
.teach-word-fr {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 6vw, 2.6rem);
  font-weight: var(--weight-black);
  color: var(--text-primary);
  line-height: 1.1;
}

.teach-word-de {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--text-secondary);
}

/* ── Audio button ─────────────────────────────────────────── */
.teach-audio-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 10px 20px;
  border: 2px solid var(--color-primary);
  border-radius: 50px;
  background: transparent;
  color: var(--color-primary);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--weight-extrabold);
  cursor: pointer;
  transition: background var(--duration-fast), color var(--duration-fast);
}
.teach-audio-btn:active {
  background: var(--color-primary);
  color: white;
}
.teach-audio-btn svg {
  width: 18px;
  height: 18px;
}

/* ── Grammar tip ─────────────────────────────────────────── */
.teach-grammar-tip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 20px;
  background: var(--surface-raised);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--text-secondary);
}

/* ── Example sentence ────────────────────────────────────── */
.teach-example-block {
  width: 100%;
  max-width: 340px;
  background: linear-gradient(135deg, rgba(88, 204, 2, 0.06), rgba(88, 204, 2, 0.02));
  border: 1.5px solid rgba(88, 204, 2, 0.2);
  border-radius: 16px;
  padding: var(--space-3) var(--space-4);
  text-align: left;
}

.teach-example-fr {
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  font-style: italic;
  line-height: 1.5;
}

.teach-example-de {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  margin-top: 4px;
}


/* ============================================================
   LESSON COMPLETE – New premium screen with word summary
   ============================================================ */

/* ── Trophy CSS graphic ───────────────────────────────────── */
.lesson-complete-trophy {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFC800, #FF9600);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 32px rgba(255, 150, 0, 0.45), 0 0 0 6px rgba(255, 200, 0, 0.2);
}

.lc-trophy-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.lc-trophy-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  position: relative;
}

/* Trophy cup (U shape via border-radius) */
.lc-trophy-cup {
  width: 52px;
  height: 42px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 4px 4px 26px 26px;
  box-shadow: inset 0 -4px 8px rgba(255, 150, 0, 0.2);
  position: relative;
}
.lc-trophy-cup::before,
.lc-trophy-cup::after {
  content: '';
  position: absolute;
  top: 6px;
  width: 12px;
  height: 20px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
}
.lc-trophy-cup::before { left: -10px; }
.lc-trophy-cup::after  { right: -10px; }

.lc-trophy-stem {
  width: 10px;
  height: 12px;
  background: rgba(255, 255, 255, 0.9);
}

.lc-trophy-base {
  width: 44px;
  height: 8px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 4px;
}

/* ── Title / Subtitle ────────────────────────────────────── */
.lc-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 5vw, 2.4rem);
  font-weight: var(--weight-black);
  color: var(--text-primary);
  margin: 0 0 6px 0;
  text-align: center;
}

.lc-subtitle {
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--text-secondary);
  margin: 0 0 var(--space-5) 0;
  text-align: center;
}

/* ── Stat cards row ──────────────────────────────────────── */
.lc-stats-row {
  display: flex;
  gap: 12px;
  width: 100%;
  max-width: 400px;
  margin-bottom: var(--space-5);
}

.lc-stat-card {
  flex: 1;
  background: white;
  border-radius: 20px;
  border: 2px solid var(--border-light);
  padding: var(--space-3) var(--space-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.lc-stat-icon {
  width: 32px;
  height: 32px;
  position: relative;
  flex-shrink: 0;
}

/* Star icon (XP) */
.lc-icon-star {
  background: #FFC800;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

/* Flame icon (Streak) */
.lc-icon-flame {
  background: #FF9600;
  clip-path: polygon(
    50% 0%, 65% 15%, 80% 5%, 75% 30%,
    100% 40%, 85% 55%, 90% 75%, 75% 65%,
    70% 100%, 50% 80%, 30% 100%, 25% 65%,
    10% 75%, 15% 55%, 0% 40%, 25% 30%,
    20% 5%, 35% 15%
  );
  width: 26px;
  height: 32px;
  margin: 0 auto;
}

/* Target icon (Accuracy) */
.lc-icon-target {
  border-radius: 50%;
  border: 4px solid #E84393;
  position: relative;
  width: 32px;
  height: 32px;
  box-sizing: border-box;
}
.lc-icon-target::before {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: #E84393;
}

.lc-stat-value {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: var(--weight-black);
  color: var(--text-primary);
  line-height: 1;
}

.lc-stat-label {
  font-size: 0.68rem;
  font-weight: var(--weight-extrabold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* ── Word summary section ────────────────────────────────── */
.lc-word-summary {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.lc-word-group {
  background: white;
  border-radius: 20px;
  border: 2px solid var(--border-light);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.lc-word-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--weight-extrabold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.lc-group-mastered {
  background: linear-gradient(90deg, rgba(88, 204, 2, 0.1), rgba(88, 204, 2, 0.03));
  color: #46A302;
  border-bottom: 1px solid rgba(88, 204, 2, 0.15);
}

.lc-group-new {
  background: linear-gradient(90deg, rgba(124, 111, 240, 0.1), rgba(124, 111, 240, 0.03));
  color: #5B4ED9;
  border-bottom: 1px solid rgba(124, 111, 240, 0.15);
}

/* Group header icons (CSS shapes) */
.lc-group-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* Shield with check mark */
.lc-icon-check-shield {
  background: #46A302;
  clip-path: polygon(50% 0%, 100% 15%, 100% 55%, 50% 100%, 0% 55%, 0% 15%);
  position: relative;
}

/* Spark / star icon */
.lc-icon-spark {
  background: #7C6FF0;
  clip-path: polygon(50% 0%, 55% 45%, 100% 50%, 55% 55%, 50% 100%, 45% 55%, 0% 50%, 45% 45%);
}

.lc-word-cards {
  padding: var(--space-2) var(--space-3) var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* Individual word card */
.lc-word-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  animation: lc-card-in 0.35s var(--ease-spring) both;
}

@keyframes lc-card-in {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}

.lc-word-card-mastered {
  background: rgba(88, 204, 2, 0.06);
}

.lc-word-card-new {
  background: rgba(124, 111, 240, 0.06);
}

/* Tiny CSS shapes for each word card */
.lc-word-card-shape {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 6px;
}

.lc-word-card-mastered .lc-word-card-shape { background: #58CC02; }
.lc-word-card-new      .lc-word-card-shape { background: #7C6FF0; }

.lc-shape-circle   { border-radius: 50%; }
.lc-shape-diamond  { border-radius: 4px; transform: rotate(45deg); width: 20px; height: 20px; margin: 4px; }
.lc-shape-triangle { width: 0; height: 0; background: none !important;
  border-left: 14px solid transparent; border-right: 14px solid transparent;
  border-bottom: 28px solid currentColor; border-radius: 0; }
.lc-word-card-mastered .lc-shape-triangle { border-bottom-color: #58CC02; }
.lc-word-card-new      .lc-shape-triangle { border-bottom-color: #7C6FF0; }
.lc-shape-hexagon  { clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%); border-radius: 0; }
.lc-shape-ring     { background: transparent !important; border-radius: 50%; border: 5px solid; }
.lc-word-card-mastered .lc-shape-ring { border-color: #58CC02; }
.lc-word-card-new      .lc-shape-ring { border-color: #7C6FF0; }

.lc-word-card-text {
  flex: 1;
  text-align: left;
}

.lc-word-card-fr {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: var(--weight-black);
  color: var(--text-primary);
  line-height: 1.2;
}

.lc-word-card-de {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
}

/* ── Continue button ─────────────────────────────────────── */
.lc-continue-btn {
  width: 100%;
  max-width: 400px;
  min-height: 56px;
  font-size: 1.15rem;
  box-shadow: 0 6px 0 var(--color-primary-shadow);
  margin-top: auto;
  flex-shrink: 0;
}

/* ============================================================
   PICTURE SELECT EXERCISE (picture-select.js)
   ============================================================ */

.ps-listen-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-6);
  padding: var(--space-4);
  background: var(--color-neutral-100);
  border-radius: var(--border-radius-lg);
  border: 2px dashed var(--color-neutral-200);
}

.ps-listen-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-secondary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  box-shadow: 0 4px 0 var(--color-secondary-shadow), 0 8px 16px rgba(43,154,223,0.3);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  margin-bottom: var(--space-3);
}

.ps-listen-btn:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 var(--color-secondary-shadow), 0 4px 8px rgba(43,154,223,0.3);
}

.ps-listen-btn svg {
  width: 32px;
  height: 32px;
}

.ps-btn-playing {
  animation: pulseListen 1.5s infinite;
}

@keyframes pulseListen {
  0% { transform: scale(1); box-shadow: 0 4px 0 var(--color-secondary-shadow), 0 0 0 0 rgba(43,154,223,0.7); }
  50% { transform: scale(1.05); box-shadow: 0 4px 0 var(--color-secondary-shadow), 0 0 0 15px rgba(43,154,223,0); }
  100% { transform: scale(1); box-shadow: 0 4px 0 var(--color-secondary-shadow), 0 0 0 0 rgba(43,154,223,0); }
}

.ps-listen-label {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--text-secondary);
}

.ps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.ps-option-card {
  background: var(--surface-default);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: var(--space-4) var(--space-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 0 var(--border-color);
  outline: none;
}

.ps-option-card:hover {
  background: var(--surface-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--border-color);
}

.ps-option-card:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 var(--border-color);
}

.ps-icon-area {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
}

.ps-option-label {
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  text-align: center;
}

.ps-option-card.ps-selected {
  border-color: var(--color-secondary);
  background: var(--color-secondary-light);
  box-shadow: 0 4px 0 var(--color-secondary);
}
.ps-option-card.ps-selected .ps-option-label {
  color: var(--color-secondary);
}

.ps-option-card.ps-correct {
  border-color: var(--color-success);
  background: var(--color-success-light);
  box-shadow: 0 4px 0 var(--color-success);
  animation: bounceCorrect 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.ps-option-card.ps-correct .ps-option-label {
  color: var(--color-success-dark);
}

.ps-option-card.ps-wrong {
  border-color: var(--color-error);
  background: var(--color-error-light);
  box-shadow: 0 4px 0 var(--color-error);
  animation: shakeWrong 0.4s ease-in-out;
}
.ps-option-card.ps-wrong .ps-option-label {
  color: var(--color-error-dark);
}

@keyframes bounceCorrect {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes shakeWrong {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

/* ============================================================
   NEW WORD BADGE (engine.js)
   ============================================================ */
.new-word-badge-pill {
  display: inline-block;
  background: var(--color-success-light);
  color: var(--color-success-dark);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 20px;
  border: 2px solid var(--color-success);
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  box-shadow: 0 4px 10px rgba(88, 204, 2, 0.2);
}

.exercise-wrapper {
  display: flex;
  flex-direction: column;
}
