/* ==========================================================================
   FIEZEL — Grammar UI/UX Upgrade
   Enhances feedback, grammar syntax highlighting, token-based exercises, 
   and mastery indicators. Extends design system tokens.
   ========================================================================== */

/* ==========================================================================
   1. Enhanced Feedback Bottom Sheet
   ========================================================================== */

@keyframes feedbackSlideUp {
  from {
    transform: translateY(16px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.feedback-success,
.feedback-error {
  margin-top: var(--sp-3);
  padding: var(--sp-4);
  border-radius: var(--radius-md);
  line-height: 1.6;
  font-size: var(--fs-small, .875rem);
  animation: feedbackSlideUp var(--dur-m) var(--ease-spring) both;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.feedback-success {
  background: var(--good-soft);
  color: var(--text);
  border: 1px solid var(--good-bright);
}

.feedback-error {
  background: var(--bad-soft);
  color: var(--text);
  border: 1px solid var(--bad);
}

.feedback-title {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: 800;
  font-size: 1.1rem;
}

.feedback-success .feedback-title {
  color: var(--good-bright);
}

.feedback-error .feedback-title {
  color: var(--bad-bright);
}

.feedback-title svg {
  width: 24px;
  height: 24px;
}

.feedback-rule-pill,
.grammar-rule-pill {
  display: block !important;
  background: rgba(255, 255, 255, 0.08) !important;
  padding: 12px 16px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  font-size: 0.90rem !important;
  line-height: 1.55 !important;
  color: #F8FAFC !important;
  margin: 12px 0 !important;
}

.feedback-rule-pill strong,
.grammar-rule-pill strong {
  color: #38BDF8 !important;
  font-weight: 800 !important;
}

.feedback-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  margin-top: var(--sp-2);
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 12px !important;
  padding: var(--sp-3);
  color: #F8FAFC !important;
}

[data-theme="light"] .card-light .feedback-rule-pill,
[data-theme="light"] .card-light .grammar-rule-pill,
body:not(.theme-dark):not(.fz-lux) .card-light .feedback-rule-pill,
body:not(.theme-dark):not(.fz-lux) .card-light .grammar-rule-pill {
  background: #F1F5F9 !important;
  border-color: #CBD5E1 !important;
  color: #1E293B !important;
}

[data-theme="light"] .card-light .feedback-rule-pill strong,
[data-theme="light"] .card-light .grammar-rule-pill strong,
body:not(.theme-dark):not(.fz-lux) .card-light .feedback-rule-pill strong,
body:not(.theme-dark):not(.fz-lux) .card-light .grammar-rule-pill strong {
  color: #0369A1 !important;
}

.feedback-comparison-item {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.feedback-comparison-correct {
  color: var(--good);
  font-weight: 700;
}

.feedback-comparison-incorrect {
  color: var(--bad);
  text-decoration: line-through;
  opacity: 0.8;
}

/* ==========================================================================
   2. Color-Coded Grammar Syntax
   ========================================================================== */

.syntax-verb,
.syntax-prep,
.syntax-subj,
.syntax-obj,
.syntax-aux {
  font-weight: 700;
  padding: 0 2px;
  border-radius: 4px;
}

.syntax-verb {
  color: var(--good-bright);
  background: var(--good-soft);
}

.syntax-prep {
  color: var(--info);
  background: var(--info-soft);
}

.syntax-subj {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.syntax-obj {
  color: var(--info);
  background: var(--sun-soft);
  border-bottom: 2px solid var(--sun-deep);
}

.syntax-aux {
  color: var(--muted);
  background: var(--line-soft);
  font-style: italic;
}

/* Question Instruction & Typography Hierarchy */
.quiz-bubble .question-instruction,
.quiz-stage .question-instruction,
.speech-bubble .question-instruction,
.quiz-shell .question-instruction,
.card .question-instruction,
.question .question-instruction,
.question-instruction {
  display: inline-block !important;
  font-size: 0.75rem !important; /* 12px kicker/eyebrow distinct from 18px+ question stem */
  font-weight: 700 !important;
  color: #94A3B8 !important; /* Secondary text color (Slate 400), WCAG AAA 7.3:1 contrast on #181824 */
  letter-spacing: 0.07em !important;
  text-transform: uppercase !important;
  margin-bottom: 10px !important;
  line-height: 1.35 !important;
  padding: 3px 8px !important;
  border-radius: 6px !important;
  background: rgba(148, 163, 184, 0.12) !important;
}

/* Light mode for question-instruction only on true light surfaces */
body:not(.theme-dark):not(.fz-lux) .card-light .question-instruction,
body:not(.theme-dark):not(.fz-lux) .card:not(.quiz-bubble):not(.quiz-stage) .question-instruction {
  color: #475569 !important; /* Slate 600, high contrast on light backgrounds */
  background: rgba(100, 116, 139, 0.1) !important;
}

/* Inside dark quiz bubble/stage, instruction is ALWAYS light Slate 300 */
.quiz-bubble .question-instruction,
.quiz-stage .question-instruction,
.speech-bubble .question-instruction {
  color: #CBD5E1 !important;
  background: rgba(255, 255, 255, 0.1) !important;
}

.quiz-bubble .question-main,
.quiz-stage .question-main,
.speech-bubble .question-main,
.quiz-shell .question-main,
.card .question-main,
.question .question-main,
.question-main {
  display: block !important;
  font-size: clamp(1.2rem, 1.15rem + 1.2vw, 1.55rem) !important;
  font-weight: 700 !important;
  color: #FFFFFF !important;
  line-height: 1.45 !important;
  letter-spacing: -0.01em !important;
}

/* Light mode for question-main only on true light surfaces */
body:not(.theme-dark):not(.fz-lux) .card-light .question-main,
body:not(.theme-dark):not(.fz-lux) .card:not(.quiz-bubble):not(.quiz-stage) .question-main {
  color: #0F172A !important;
}

/* Inside dark quiz bubble/stage, main question is ALWAYS pure White */
.quiz-bubble .question-main,
.quiz-stage .question-main,
.speech-bubble .question-main {
  color: #FFFFFF !important;
}

/* Target Word / Error Token Highlight in Sentence Correction & Stem */
.target-word,
.question-main .target-word,
.question .target-word,
.quiz-bubble .target-word,
.quiz-bubble .question-main .target-word,
.quiz-stage .target-word,
mark.target-word,
.stem-target-word,
.syntax-target,
.syntax-error {
  display: inline-block !important;
  background: rgba(245, 158, 11, 0.28) !important;
  color: #fef3c7 !important;
  font-style: italic !important;
  text-decoration: underline !important;
  text-decoration-color: #fbbf24 !important;
  text-decoration-thickness: 2.5px !important;
  text-underline-offset: 4px !important;
  border-bottom: 2px solid #f59e0b !important;
  border-radius: 4px !important;
  padding: 1px 6px !important;
  font-weight: 700 !important;
}

body:not(.theme-dark):not(.fz-lux) .card-light .target-word,
body:not(.theme-dark):not(.fz-lux) .card:not(.quiz-bubble):not(.quiz-stage) .target-word {
  color: #92400e !important; /* Amber 800, high contrast on light */
  background: rgba(245, 158, 11, 0.18) !important;
  text-decoration-color: #d97706 !important;
  border-bottom: 2px solid #d97706 !important;
}

.quiz-bubble .target-word,
.quiz-stage .target-word,
.speech-bubble .target-word {
  color: #fef3c7 !important;
  background: rgba(245, 158, 11, 0.32) !important;
  text-decoration-color: #fbbf24 !important;
  border-bottom-color: #f59e0b !important;
}

/* ==========================================================================
   3. Token Rail Exercise
   ========================================================================== */

@keyframes chipSnap {
  0% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes shakeError {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* Ruled notebook baseline lines in sentence assembly rail */
.token-rail {
  display: flex !important;
  flex-wrap: wrap !important;
  align-content: flex-start !important;
  align-items: center !important;
  gap: 12px 8px !important;
  padding: 4px 4px !important;
  min-height: 104px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  background: transparent !important;
  border-radius: 0 !important;
  border: none !important;
  /* Duolingo baseline notebook rules: horizontal lines spaced exactly 52px */
  background-image: linear-gradient(to bottom, transparent 50px, rgba(255, 255, 255, 0.18) 50px, rgba(255, 255, 255, 0.18) 52px) !important;
  background-size: 100% 52px !important;
  background-repeat: repeat-y !important;
  margin-bottom: 24px !important;
}

body.fz-lux .token-rail,
body:not(.fz-dark) .token-rail {
  background-image: linear-gradient(to bottom, transparent 50px, #CBD5E1 50px, #CBD5E1 52px) !important;
}

.token-slot {
  min-width: 60px;
  height: 44px;
  border: 2px dashed var(--line-strong);
  border-radius: 12px;
  transition: background var(--dur-s) var(--ease), border-color var(--dur-s) var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
}

.token-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 8px;
  margin-top: 12px;
  justify-content: center;
}

/* Duolingo-style tactile 3D word blocks */
.token-chip {
  min-width: 44px;
  min-height: 42px;
  padding: 8px 16px;
  background: #ffffff;
  color: #0f172a !important;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.25;
  border: 1.5px solid #cbd5e1;
  border-bottom: 4px solid #94a3b8;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: transform 80ms ease, box-shadow 80ms ease, border-color 120ms ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.token-chip:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.token-chip:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* Recessed "ghost" placeholder left in bank when token is placed */
.token-chip.placed.placeholder {
  pointer-events: none !important;
  cursor: default !important;
  color: transparent !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 2px dashed rgba(255, 255, 255, 0.22) !important;
  border-bottom: 2px dashed rgba(255, 255, 255, 0.22) !important;
  border-radius: 12px !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3) !important;
  transform: none !important;
  user-select: none !important;
}

body.fz-lux .token-chip.placed.placeholder,
body:not(.fz-dark) .token-chip.placed.placeholder {
  background: rgba(0, 0, 0, 0.06) !important;
  border-color: rgba(0, 0, 0, 0.16) !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.08) !important;
}

/* Placed token sitting proudly on the ruled baseline in the rail */
.token-chip.in-rail {
  pointer-events: auto !important;
  cursor: pointer;
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1.5px solid #38bdf8 !important;
  border-bottom: 3.5px solid #0284c7 !important;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.22) !important;
  animation: chipSnap 180ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.token-chip.in-rail:hover {
  border-color: #f87171 !important;
  border-bottom-color: #dc2626 !important;
  background: #fff5f5 !important;
  color: #0f172a !important;
}

/* All token chips enforce 1 single uniform font color (#0f172a) and neutral border (Duolingo-style) */
.token-chip.syntax-verb,
.token-chip.syntax-prep,
.token-chip.syntax-subj,
.token-chip.syntax-obj,
.token-chip.syntax-aux {
  color: #0f172a !important;
  border: 1.5px solid #cbd5e1 !important;
  border-bottom: 4px solid #94a3b8 !important;
  background: #ffffff !important;
  font-style: normal !important;
}

.token-chip.syntax-verb:hover,
.token-chip.syntax-prep:hover,
.token-chip.syntax-subj:hover,
.token-chip.syntax-obj:hover,
.token-chip.syntax-aux:hover {
  color: #0f172a !important;
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
}

.token-chip.correct {
  background: var(--good-soft);
  color: var(--good-bright);
  border-color: var(--good-bright);
  box-shadow: 0 4px 0 var(--good-bright);
  animation: chipSnap var(--dur-m) var(--ease-spring);
}

.token-chip.wrong {
  background: var(--bad-soft);
  color: var(--bad);
  border-color: var(--bad);
  box-shadow: 0 4px 0 var(--bad);
  animation: shakeError var(--dur-s) var(--ease);
}

.token-actions {
  display: grid !important;
  grid-template-columns: 1fr 1.6fr !important;
  align-items: stretch !important;
  gap: 12px !important;
  width: 100% !important;
  margin-top: 24px !important;
  box-sizing: border-box !important;
}

.token-reset-btn {
  height: 48px !important;
  min-height: 48px !important;
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border: 1.5px solid #cbd5e1 !important;
  border-bottom: 3.5px solid #94a3b8 !important;
  border-radius: 16px !important;
  padding: 0 16px !important;
  font-size: 14.5px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  transition: all 120ms ease !important;
  box-sizing: border-box !important;
}

.token-reset-btn svg {
  width: 16px !important;
  height: 16px !important;
  color: #0f172a !important;
}

.token-reset-btn:not(:disabled):hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

.token-reset-btn:not(:disabled):active {
  transform: translateY(2px) !important;
  border-bottom-width: 1.5px !important;
}

.token-reset-btn:disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  border-bottom-color: #e2e8f0 !important;
  color: #94a3b8 !important;
}

.token-submit-btn {
  height: 48px !important;
  min-height: 48px !important;
  width: 100% !important;
  min-width: 0 !important;
  padding: 0 20px !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  border-radius: 16px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  box-sizing: border-box !important;
}

/* ==========================================================================
   4. Mistake Vault Badge
   ========================================================================== */

.vault-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--cream);
  border-radius: var(--radius-pill);
  padding: 2px 8px;
  font-size: .75rem;
  font-weight: 800;
  min-width: 24px;
  height: 24px;
}

.vault-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--sp-4);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
  transition: transform var(--dur-s) var(--ease-spring);
}

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

.vault-empty {
  text-align: center;
  padding: var(--sp-6) var(--sp-4);
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
}

.vault-empty svg {
  width: 64px;
  height: 64px;
  color: var(--line-strong);
}

/* ==========================================================================
   5. Grammar Hint Popover
   ========================================================================== */

@keyframes popoverEnter {
  from { opacity: 0; transform: translateY(10px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.grammar-hint-btn {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--sun-deep);
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background var(--dur-s) var(--ease), color var(--dur-s) var(--ease);
}

.grammar-hint-btn:hover {
  background: var(--sun-soft);
  color: var(--gold);
}

.grammar-hint-btn:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.grammar-hint-popover {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  top: auto !important;
  width: 100% !important;
  max-width: 500px !important;
  margin: 0 auto !important;
  background: #0f172a !important; /* Slate 900 for dark contrast */
  color: #f8fafc !important; /* Slate 50 for > 10:1 contrast */
  padding: 16px 20px calc(20px + env(safe-area-inset-bottom, 0px)) 20px !important;
  border-radius: 20px 20px 0 0 !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
  border-bottom: none !important;
  box-shadow: 0 -8px 32px rgba(0,0,0,0.55) !important;
  font-size: .9rem !important;
  line-height: 1.6 !important;
  z-index: 1050 !important;
  max-height: 60vh !important;
  overflow-y: auto !important;
  animation: hintSheetSlideUp var(--dur-m, 260ms) var(--ease-spring, cubic-bezier(0.16, 1, 0.3, 1)) both !important;
}

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

.hint-sheet-handle {
  width: 38px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.3);
  margin: 0 auto 12px;
}

.hint-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2, 8px);
  margin-bottom: var(--sp-2, 8px);
  border-bottom: 1px solid rgba(255,255,255,0.15);
  padding-bottom: var(--sp-1, 4px);
  color: #f8fafc;
}

.hint-level-pill {
  font-size: 0.75rem;
  font-weight: 800;
  background: #f59e0b;
  color: #0f172a;
  padding: 2px 8px;
  border-radius: var(--radius-pill, 9999px);
}

.hint-step-indicator {
  display: flex;
  gap: 4px;
  margin: var(--sp-2, 8px) 0;
}

.hint-step-dot {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.25);
  transition: background var(--dur-s, 150ms);
}

.hint-step-dot.active {
  background: #fbbf24;
}

.hint-body-title {
  font-weight: 800 !important;
  color: #fbbf24 !important; /* Amber 400: contrast 11.4:1 on #0f172a */
  margin-bottom: 6px !important;
  font-size: 0.95rem !important;
}

.hint-body-text {
  margin: 0 !important;
  color: #f1f5f9 !important; /* Slate 100: contrast 14.2:1 on #0f172a */
  font-size: 0.92rem !important;
  line-height: 1.6 !important;
}

.hint-popover-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-2, 8px);
  margin-top: var(--sp-3, 12px);
  padding-top: var(--sp-2, 8px);
  border-top: 1px solid rgba(255,255,255,0.15);
}

.hint-next-btn {
  background: #2563eb !important;
  color: #ffffff !important;
  border: 1px solid #3b82f6 !important;
  border-radius: var(--radius-pill, 9999px) !important;
  padding: 6px 16px !important;
  font-size: 0.85rem !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.hint-next-btn:hover {
  background: #1d4ed8 !important;
}

.hint-close-btn {
  background: transparent !important;
  border: none !important;
  color: #94a3b8 !important;
  cursor: pointer !important;
  padding: 4px !important;
  display: flex !important;
  align-items: center !important;
}

.hint-close-btn:hover {
  color: #ffffff !important;
}

.grammar-hint-popover::before {
  display: none !important;
}

/* ==========================================================================
   6. Mastery Tier Indicators
   ========================================================================== */

.mastery-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid transparent;
}

.mastery-tier-1 {
  border-color: var(--line-strong);
}

.mastery-tier-2 {
  border-color: var(--sun);
}

.mastery-tier-3 {
  border-color: var(--good);
}

.mastery-tier-4 {
  border-color: var(--gold);
  background: var(--sun-soft);
}

.path-ring.mastery-tier-1 {
  box-shadow: 0 0 0 2px var(--line-strong);
}

.path-ring.mastery-tier-2 {
  box-shadow: 0 0 0 2.5px var(--sun);
}

.path-ring.mastery-tier-3 {
  box-shadow: 0 0 0 2.5px var(--good);
}

.path-ring.mastery-tier-4 {
  box-shadow: 0 0 0 3px var(--gold), 0 0 10px rgba(255, 215, 0, 0.4);
}

@keyframes decayPulse {
  0% { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(1.5); opacity: 0; }
}

.mastery-decay {
  border-color: var(--info);
  position: relative;
}

.mastery-decay::after {
  content: '';
  position: absolute;
  inset: -4px;
  border: 2px solid var(--info);
  border-radius: 50%;
  animation: decayPulse 2s infinite;
}

/* ==========================================================================
   7. Combo & Streak Enhancements
   ========================================================================== */

@keyframes comboBurst {
  0% { transform: scale(0.8); opacity: 0; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.combo-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, var(--sun), var(--gold));
  color: var(--text);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-size: .9rem;
  box-shadow: var(--shadow-sm);
  animation: comboBurst var(--dur-l) var(--ease-spring);
}

.combo-badge::before {
  content: '🔥';
  font-size: 1.1rem;
}

@keyframes milestoneCelebrate {
  0% { transform: translateY(20px); opacity: 0; }
  20% { transform: translateY(-5px); opacity: 1; }
  40% { transform: translateY(0); opacity: 1; }
  80% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(-10px); opacity: 0; }
}

.streak-milestone {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--core);
  color: var(--sun);
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--radius-pill);
  font-size: 1.25rem;
  font-weight: 800;
  box-shadow: var(--shadow-lg);
  pointer-events: none;
  z-index: 200;
  animation: milestoneCelebrate 2.5s var(--ease) forwards;
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .feedback-success,
  .feedback-error,
  .token-chip.correct,
  .token-chip.wrong,
  .grammar-hint-popover,
  .mastery-decay::after,
  .combo-badge,
  .streak-milestone {
    animation: none !important;
    transition: none !important;
  }
}

/* ==========================================================================
   Memory Box (Trik Cepat Ingat) — High Contrast Scaffolding
   ========================================================================== */
.feedback-memory-box,
.feedback .memory-tip,
.card .feedback-memory-box,
.card .feedback .memory-tip,
#feedback .feedback-memory-box {
  display: block !important;
  background: rgba(245, 158, 11, 0.12) !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  border-radius: 14px !important;
  padding: 12px 16px !important;
  margin: 14px 0 !important;
  text-align: left !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25) !important;
}

.feedback-memory-header {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  margin-bottom: 8px !important;
}

.feedback-memory-header svg,
.feedback-memory-header i,
.feedback .memory-tip i[data-lucide="lightbulb"],
.feedback .memory-tip svg {
  width: 17px !important;
  height: 17px !important;
  color: #FBBF24 !important;
  flex-shrink: 0 !important;
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.4)) !important;
}

html body .card .feedback-memory-kicker,
html body .card div > span.feedback-memory-kicker,
html body .feedback-memory-kicker,
.feedback-memory-kicker {
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: #FBBF24 !important;
  line-height: 1 !important;
}

html body .card .feedback-memory-content,
html body .card .feedback-memory-content span,
html body .card div > span.feedback-memory-content,
html body .card div > .feedback-memory-content span,
html body .feedback-memory-content,
html body .feedback-memory-content span,
.feedback-memory-content,
.feedback-memory-content span,
.feedback .memory-tip span {
  font-size: 0.92rem !important;
  line-height: 1.55 !important;
  color: #F8FAFC !important;
  display: block !important;
}

html body .card .feedback-memory-content strong,
html body .feedback-memory-content strong,
.feedback-memory-content strong,
.feedback .memory-tip strong {
  color: #FEF08A !important;
  font-weight: 700 !important;
}

.feedback-memory-content .memory-bullet,
.feedback .memory-tip .memory-bullet {
  display: block !important;
  margin: 4px 0 !important;
  color: #F8FAFC !important;
}

html body #feedback p,
html body .feedback p {
  color: #F8FAFC !important;
}

/* Light Mode Overrides for Memory Box */
[data-theme="light"] .card-light .feedback-memory-box,
[data-theme="light"] .card-light .feedback .memory-tip,
body:not(.theme-dark):not(.fz-lux) .card-light .feedback-memory-box,
body:not(.theme-dark):not(.fz-lux) .card-light .feedback .memory-tip {
  background: #FEF3C7 !important;
  border-color: #FDE68A !important;
}

[data-theme="light"] .card-light .feedback-memory-kicker,
[data-theme="light"] .card-light .feedback-memory-header svg,
body:not(.theme-dark):not(.fz-lux) .card-light .feedback-memory-kicker,
body:not(.theme-dark):not(.fz-lux) .card-light .feedback-memory-header svg {
  color: #78350F !important;
}

[data-theme="light"] .card-light .feedback-memory-content,
[data-theme="light"] .card-light .feedback-memory-content span,
[data-theme="light"] .card-light .feedback .memory-tip span,
body:not(.theme-dark):not(.fz-lux) .card-light .feedback-memory-content,
body:not(.theme-dark):not(.fz-lux) .card-light .feedback-memory-content span,
body:not(.theme-dark):not(.fz-lux) .card-light .feedback .memory-tip span {
  color: #1E293B !important;
}

[data-theme="light"] .card-light .feedback-memory-content strong,
[data-theme="light"] .card-light .feedback .memory-tip strong,
body:not(.theme-dark):not(.fz-lux) .card-light .feedback-memory-content strong,
body:not(.theme-dark):not(.fz-lux) .card-light .feedback .memory-tip strong {
  color: #78350F !important;
}

/* Penjelasan Guru & Diagnostic Clue (Midnight Navy / Travertine White - Zero Brown / Zero Maroon) */
.tutor-turn,
html body .tutor-turn,
.card .tutor-turn {
  margin-top: 14px !important;
  padding: 14px 16px !important;
  border-radius: 14px !important;
  background: #151520 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-left: 4px solid #38BDF8 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35) !important;
}

[data-theme="light"] .tutor-turn,
body:not(.theme-dark):not(.fz-lux) .card-light .tutor-turn,
body:not(.theme-dark):not(.fz-lux) .tutor-turn {
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  border-left: 4px solid #0284C7 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

.tutor-turn-head,
.card .tutor-turn-head {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-bottom: 8px !important;
  font-size: 0.72rem !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  color: #38BDF8 !important;
  font-weight: 800 !important;
}

[data-theme="light"] .tutor-turn-head,
body:not(.theme-dark):not(.fz-lux) .card-light .tutor-turn-head,
body:not(.theme-dark):not(.fz-lux) .tutor-turn-head {
  color: #0369A1 !important;
}

.tutor-turn-face {
  display: grid !important;
  place-items: center !important;
  width: 22px !important;
  height: 22px !important;
  border-radius: 50% !important;
  background: rgba(56, 189, 248, 0.2) !important;
  color: #38BDF8 !important;
  flex-shrink: 0 !important;
}

[data-theme="light"] .tutor-turn-face,
body:not(.theme-dark):not(.fz-lux) .card-light .tutor-turn-face,
body:not(.theme-dark):not(.fz-lux) .tutor-turn-face {
  background: #E0F2FE !important;
  color: #0284C7 !important;
}

.tutor-diagnostic-clue {
  background: rgba(56, 189, 248, 0.08) !important;
  border: 1px solid rgba(56, 189, 248, 0.25) !important;
  border-radius: 10px !important;
  padding: 10px 14px !important;
  color: #F8FAFC !important;
  font-weight: 600 !important;
  font-size: 14.5px !important;
  line-height: 1.55 !important;
  margin: 6px 0 10px !important;
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
}

.tutor-diagnostic-clue svg {
  width: 17px !important;
  height: 17px !important;
  color: #38BDF8 !important;
  flex-shrink: 0 !important;
  margin-top: 2px !important;
}

[data-theme="light"] .tutor-diagnostic-clue,
body:not(.theme-dark):not(.fz-lux) .card-light .tutor-diagnostic-clue,
body:not(.theme-dark):not(.fz-lux) .tutor-diagnostic-clue {
  background: #F0F9FF !important;
  border-color: #BAE6FD !important;
  color: #0C4A6E !important;
}

.tutor-turn-say,
.card .tutor-turn-say {
  margin: 0 !important;
  font-size: 0.92rem !important;
  line-height: 1.6 !important;
  color: #CBD5E1 !important;
}

[data-theme="light"] .tutor-turn-say,
body:not(.theme-dark):not(.fz-lux) .card-light .tutor-turn-say,
body:not(.theme-dark):not(.fz-lux) .tutor-turn-say {
  color: #475569 !important;
}

.tutor-turn-ask,
.card .tutor-turn-ask {
  margin: 8px 0 0 !important;
  font-size: 0.94rem !important;
  line-height: 1.6 !important;
  font-weight: 700 !important;
  color: #FBBF24 !important;
}

[data-theme="light"] .tutor-turn-ask,
body:not(.theme-dark):not(.fz-lux) .card-light .tutor-turn-ask,
body:not(.theme-dark):not(.fz-lux) .tutor-turn-ask {
  color: #B45309 !important;
}

.tutor-turn-actions {
  margin-top: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
}

.tutor-stuck,
html body .tutor-stuck,
.card .tutor-stuck {
  min-height: 38px !important;
  padding: 6px 14px !important;
  border-radius: 999px !important;
  font-size: 0.84rem !important;
  font-weight: 600 !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  color: #CBD5E1 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  transition: all .15s ease !important;
  text-decoration: none !important;
}

.tutor-stuck svg {
  width: 15px !important;
  height: 15px !important;
  color: #94A3B8 !important;
}

.tutor-stuck:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #FFFFFF !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}

[data-theme="light"] .tutor-stuck,
body:not(.theme-dark):not(.fz-lux) .card-light .tutor-stuck,
body:not(.theme-dark):not(.fz-lux) .tutor-stuck {
  background: #F8FAFC !important;
  border-color: #CBD5E1 !important;
  color: #475569 !important;
}

[data-theme="light"] .tutor-stuck:hover,
body:not(.theme-dark):not(.fz-lux) .card-light .tutor-stuck:hover,
body:not(.theme-dark):not(.fz-lux) .tutor-stuck:hover {
  background: #F1F5F9 !important;
  color: #0F172A !important;
}

/* Compact question card & prompt (Reduced by >50% vertical footprint) */
.quiz-bubble,
.speech-bubble {
  padding: 8px 12px !important;
  border-radius: 12px !important;
  margin-bottom: 8px !important;
}

.quiz-bubble .question-instruction,
.quiz-stage .question-instruction,
.speech-bubble .question-instruction,
.quiz-shell .question-instruction,
.card .question-instruction,
.question .question-instruction,
.question-instruction {
  display: inline-block !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  color: #94A3B8 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  margin-bottom: 4px !important;
  line-height: 1.25 !important;
  padding: 2px 7px !important;
  border-radius: 5px !important;
  background: rgba(148, 163, 184, 0.12) !important;
}

.quiz-bubble .question-main,
.quiz-stage .question-main,
.speech-bubble .question-main,
.quiz-shell .question-main,
.card .question-main,
.question .question-main,
.question-main {
  display: block !important;
  font-size: clamp(1.12rem, 1.05rem + 0.45vw, 1.32rem) !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  letter-spacing: -0.01em !important;
}


.tutor-diagnostic-clue,
.tutor-turn .tutor-diagnostic-clue,
.card .tutor-diagnostic-clue,
#tutorTurn .tutor-diagnostic-clue {
  background: #F0F9FF !important;
  border: 1px solid #BAE6FD !important;
  border-radius: 12px !important;
  padding: 12px 14px !important;
  color: #0369A1 !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
  margin: 8px 0 12px !important;
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
}

.tutor-diagnostic-clue span,
.tutor-turn .tutor-diagnostic-clue span,
.card .tutor-diagnostic-clue span,
.card div > .tutor-diagnostic-clue span,
#tutorTurn .tutor-diagnostic-clue span {
  color: #0369A1 !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
}

.tutor-diagnostic-clue svg,
.tutor-turn .tutor-diagnostic-clue svg {
  width: 18px !important;
  height: 18px !important;
  color: #0284C7 !important;
  flex-shrink: 0 !important;
  margin-top: 2px !important;
}

body.scene-night .card .tutor-diagnostic-clue,
body.scene-night #tutorTurn .tutor-diagnostic-clue,
body.scene-night .tutor-diagnostic-clue,
body.theme-dark .card .tutor-diagnostic-clue,
body.theme-dark #tutorTurn .tutor-diagnostic-clue,
body.theme-dark .tutor-diagnostic-clue {
  background: rgba(14, 165, 233, 0.16) !important;
  border-color: rgba(56, 189, 248, 0.35) !important;
  color: #E0F2FE !important;
}

body.scene-night .tutor-diagnostic-clue span,
body.scene-night #tutorTurn .tutor-diagnostic-clue span,
body.scene-night .card .tutor-diagnostic-clue span,
body.theme-dark .tutor-diagnostic-clue span,
body.theme-dark #tutorTurn .tutor-diagnostic-clue span,
body.theme-dark .card .tutor-diagnostic-clue span {
  color: #E0F2FE !important;
}

/* Grammar Hub List View Title Contrast (Zero white-on-white) */
.grammar-grid .card .row b,
.grammar-grid .card b,
.grammar-grid .card strong {
  color: #1E293B !important;
  font-weight: 700 !important;
}

body.scene-night .grammar-grid .card .row b,
body.scene-night .grammar-grid .card b,
body.theme-dark .grammar-grid .card .row b,
body.theme-dark .grammar-grid .card b {
  color: #F8FAFC !important;
}

/* Lesson Brief Example Contrast */
html body:not(.fz-teacher-mode) .lesson-example h3,
body .lesson-example h3,
.lesson-example h3 {
  color: #F8FAFC !important;
  font-weight: 700 !important;
  font-size: 1.15rem !important;
}

/* Quiz Shell Edge-to-Edge and Anti-Void Optimization */
@media (max-width: 640px) {
  body:has(.quiz-shell) main.app,
  body.fz-stage-quiz main.app,
  body:has(.quiz-shell) .app,
  body.fz-stage-quiz .app {
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  body:has(.quiz-shell) #app,
  body.fz-stage-quiz #app,
  .app > #app:has(.quiz-shell) {
    padding-left: 6px !important;
    padding-right: 6px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  #app > section.quiz-shell,
  .quiz-shell {
    padding-top: calc(64px + max(10px, env(safe-area-inset-top, 10px))) !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
    padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)) !important;
    margin: 0 auto !important;
    width: 100% !important;
    max-width: 600px !important;
    min-height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    box-sizing: border-box !important;
  }

  .quiz-shell .quiz-topbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
  }

  .quiz-shell > .card,
  .quiz-shell > .card:last-of-type {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 16px 0 !important;
    padding: 16px 14px !important;
    flex: 0 1 auto !important;
    min-height: auto !important;
    border-radius: 20px !important;
    box-sizing: border-box !important;
  }

  .quiz-shell .options {
    gap: 12px !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .quiz-shell .option {
    min-height: 54px !important;
    padding: 14px 18px 14px 62px !important;
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    border-radius: 16px !important;
    text-align: left !important;
    display: flex !important;
    align-items: center !important;
    position: relative !important;
    box-sizing: border-box !important;
    color: var(--text, #1E293B) !important;
    background: #FFFFFF !important;
    border: 1.5px solid rgba(70, 33, 4, 0.12) !important;
    line-height: 1.4 !important;
  }

  body.theme-dark .quiz-shell .option,
  body.scene-night .quiz-shell .option {
    background: #1E293B !important;
    color: #F8FAFC !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
  }

  .quiz-shell .option::before {
    position: absolute !important;
    left: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 10px !important;
    flex-shrink: 0 !important;
    display: grid !important;
    place-items: center !important;
    font-size: 0.85rem !important;
    font-weight: 800 !important;
  }

  .quiz-shell .option .tried-tag {
    margin-left: auto !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    padding: 3px 8px !important;
    border-radius: 6px !important;
    background: rgba(0, 0, 0, 0.06) !important;
    color: var(--muted, #64748B) !important;
  }

  /* Compact & Elegant Tutor Guidance Box */
  .quiz-shell .tutor-turn {
    margin-top: 14px !important;
    padding: 14px !important;
    border-radius: 16px !important;
  }

  .quiz-shell .tutor-turn-head {
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    margin-bottom: 8px !important;
  }

  .quiz-shell .tutor-turn-say {
    font-size: 0.92rem !important;
    line-height: 1.5 !important;
    margin: 8px 0 !important;
  }

  .quiz-shell .tutor-stuck {
    margin-top: 10px !important;
    padding: 10px 16px !important;
    font-size: 0.88rem !important;
  }
}

/* Hide Bottom Nav during Quiz Session */
body:has(.quiz-shell) nav.bottomnav,
body:has(.quiz-shell) .bottomnav,
body.fz-stage-quiz nav.bottomnav,
body.fz-stage-quiz .bottomnav {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* ==========================================================================
   Braincore Live Telemetry Row & Tutor Speed Indicator
   ========================================================================== */
.braincore-telemetry-row {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 6px 0 10px 0 !important;
}

.braincore-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 3px 9px !important;
  border-radius: 9999px !important;
  font-size: 0.76rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
  line-height: 1.3 !important;
}

.braincore-pill svg {
  width: 13px !important;
  height: 13px !important;
}

.braincore-pill.mastery {
  background: rgba(14, 165, 233, 0.16) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
}

.braincore-pill.target {
  background: rgba(168, 85, 247, 0.16) !important;
  color: #c084fc !important;
  border: 1px solid rgba(192, 132, 252, 0.35) !important;
  text-transform: capitalize !important;
}

.braincore-pill.alert {
  background: rgba(239, 68, 68, 0.18) !important;
  color: #fca5a5 !important;
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
}

.braincore-pill.schedule {
  background: rgba(16, 185, 129, 0.16) !important;
  color: #6ee7b7 !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
}

/* Light mode support */
body:not(.theme-dark):not(.fz-lux) .card-light .braincore-pill.mastery,
[data-theme="light"] .card-light .braincore-pill.mastery {
  background: #e0f2fe !important;
  color: #0369a1 !important;
  border-color: #bae6fd !important;
}

body:not(.theme-dark):not(.fz-lux) .card-light .braincore-pill.target,
[data-theme="light"] .card-light .braincore-pill.target {
  background: #fef3c7 !important;
  color: #92400e !important;
  border-color: #fde68a !important;
}

body:not(.theme-dark):not(.fz-lux) .card-light .braincore-pill.alert,
[data-theme="light"] .card-light .braincore-pill.alert {
  background: #fee2e2 !important;
  color: #b91c1c !important;
  border-color: #fecaca !important;
}

body:not(.theme-dark):not(.fz-lux) .card-light .braincore-pill.schedule,
[data-theme="light"] .card-light .braincore-pill.schedule {
  background: #dcfce7 !important;
  color: #15803d !important;
  border-color: #bbf7d0 !important;
}

/* Tutor speed indicator pill */
.tutor-speed-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  margin-left: auto !important;
  padding: 2px 8px !important;
  border-radius: 9999px !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  background: rgba(245, 158, 11, 0.18) !important;
  color: #f59e0b !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
}

.tutor-speed-pill svg {
  width: 12px !important;
  height: 12px !important;
}

/* ==========================================================================
   TACTILE CLAY GRAMMAR COACH EXTENSIONS (Zero purple, weights <= 800)
   ========================================================================== */

/* ---------- Vertical Word Gloss (Ruby Layout, No Horizontal Blowout) ---------- */
.gx-gloss-bar {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 8px !important;
  width: 100% !important;
}

.token-bank-label,
.gx-gloss-bar .token-bank-label {
  color: #334155 !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
}

.gx-btn-gloss {
  font-family: inherit !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  color: #0284C7 !important;
  background: #F0F9FF !important;
  border: 1.5px solid #BAE6FD !important;
  border-radius: 9999px !important;
  padding: 3px 10px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  box-shadow: 0 2px 0 #BAE6FD !important;
  transition: all 0.12s ease !important;
}

.gx-btn-gloss:active,
.gx-btn-gloss.active {
  background: #E0F2FE !important;
  transform: translateY(1px) !important;
  box-shadow: 0 1px 0 #BAE6FD !important;
}

.token-chip.has-gloss,
.bank-token.has-gloss {
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  padding: 6px 12px !important;
  box-sizing: border-box !important;
}

.token-chip .token-gloss,
.bank-token .bank-gloss {
  display: block !important;
  order: 1 !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  color: #0284C7 !important;
  line-height: 1.1 !important;
  margin-bottom: 2px !important;
  letter-spacing: -0.01em !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
  text-align: center !important;
}

.token-chip .token-word,
.bank-token .bank-word {
  display: block !important;
  order: 2 !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  color: #0F172A !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  text-align: center !important;
  max-width: 100% !important;
}

/* ---------- Smart In-Place Vacant Slot Indicator ---------- */
.gx-vacant-slot {
  border: 2px dashed #F59E0B !important;
  background: #FFFBEB !important;
  border-radius: 14px !important;
  padding: 6px 12px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  color: #B45309 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  animation: gxPulseVacant 1.4s infinite ease-in-out !important;
}

@keyframes gxPulseVacant {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.96); opacity: 0.7; }
}

.gx-slot-actions {
  display: flex !important;
  justify-content: flex-end !important;
  margin-top: 6px !important;
  width: 100% !important;
}

.gx-btn-clear-slot {
  font-family: inherit !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  color: #94A3B8 !important;
  background: none !important;
  border: none !important;
  cursor: pointer !important;
  padding: 3px 6px !important;
  border-radius: 8px !important;
  transition: all 0.12s ease !important;
}

.gx-btn-clear-slot:hover {
  color: #EF4444 !important;
  background: #FEF2F2 !important;
}

/* ---------- Scaffolding Hint Card (No Answer Leakage) ---------- */
.gx-hint {
  background: #FFFBEB !important;
  border: 2px solid #FCD34D !important;
  border-radius: 18px !important;
  padding: 12px 14px !important;
  box-shadow: 0 3px 0 #FBBF24 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  margin: 10px 0 !important;
  animation: gxRise 0.32s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.gx-hint[hidden] {
  display: none !important;
}

.gx-hint-badge {
  font-size: 10.5px !important;
  font-weight: 800 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  color: #B45309 !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.gx-hint-title {
  font-size: 14px !important;
  font-weight: 800 !important;
  color: #78350F !important;
}

.gx-hint-body {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #78350F !important;
  line-height: 1.45 !important;
}

.gx-hint-body b {
  color: #9A3412 !important;
}

/* ---------- Indonesian Contrastive Card & Bookmark Pin ---------- */
.gx-contrast-card {
  background: #FEF3C7 !important;
  border: 2px solid #FCD34D !important;
  border-radius: 16px !important;
  padding: 12px 14px !important;
  box-shadow: 0 3px 0 #FDE68A !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
  margin-top: 8px !important;
}

.gx-contrast-title {
  font-size: 12px !important;
  font-weight: 800 !important;
  color: #92400E !important;
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
}

.gx-contrast-body {
  font-size: 12.5px !important;
  font-weight: 600 !important;
  color: #78350F !important;
  line-height: 1.45 !important;
}

.gx-pin-formula-btn {
  align-self: flex-start !important;
  font-family: inherit !important;
  font-size: 11.5px !important;
  font-weight: 800 !important;
  color: #0F172A !important;
  background: #FFFFFF !important;
  border: 1.5px solid #CBD5E1 !important;
  border-radius: 10px !important;
  padding: 5px 10px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  box-shadow: 0 2px 0 #E2E8F0 !important;
  margin-top: 6px !important;
  transition: all 0.14s ease !important;
}

.gx-pin-formula-btn:active {
  transform: translateY(1px) !important;
}

.gx-pin-formula-btn.pinned {
  background: #DCFCE7 !important;
  border-color: #86EFAC !important;
  color: #166534 !important;
  box-shadow: 0 2px 0 #BBF7D0 !important;
}

/* ---------- Grit Guard Confirmation Modal ---------- */
.gx-nudge-overlay {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(15, 23, 42, 0.45) !important;
  backdrop-filter: blur(4px) !important;
  z-index: 9999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px !important;
  animation: gxFadeIn 0.2s ease-out !important;
}

.gx-nudge-overlay[hidden] {
  display: none !important;
}

.gx-nudge-box {
  background: #FFFFFF !important;
  border: 2.5px solid #0F172A !important;
  border-radius: 22px !important;
  padding: 20px !important;
  max-width: 320px !important;
  width: 100% !important;
  box-shadow: 0 8px 0 #CBD5E1 !important;
  text-align: center !important;
}

.gx-nudge-icon {
  font-size: 32px !important;
  margin-bottom: 6px !important;
}

.gx-nudge-title {
  font-size: 16px !important;
  font-weight: 800 !important;
  color: #0F172A !important;
  margin-bottom: 6px !important;
}

.gx-nudge-desc {
  font-size: 12.5px !important;
  font-weight: 600 !important;
  color: #475569 !important;
  line-height: 1.45 !important;
  margin-bottom: 16px !important;
}

.gx-nudge-actions {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

.gx-btn-nudge-try {
  background: #FFB800 !important;
  border: 2px solid #D97706 !important;
  border-radius: 14px !important;
  padding: 11px !important;
  font-family: inherit !important;
  font-size: 13.5px !important;
  font-weight: 800 !important;
  color: #0F172A !important;
  box-shadow: 0 3px 0 #D97706 !important;
  cursor: pointer !important;
}

.gx-btn-nudge-try:active {
  transform: translateY(2px) !important;
  box-shadow: 0 1px 0 #D97706 !important;
}

.gx-btn-nudge-giveup {
  background: #F8FAFC !important;
  border: 2px solid #CBD5E1 !important;
  border-radius: 14px !important;
  padding: 9px !important;
  font-family: inherit !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  color: #64748B !important;
  cursor: pointer !important;
}

/* ---------- Toast Notification Container ---------- */
.gx-toast {
  position: fixed !important;
  bottom: 84px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: #0F172A !important;
  color: #FFFFFF !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  padding: 10px 18px !important;
  border-radius: 9999px !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22) !important;
  z-index: 10000 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  pointer-events: none !important;
  animation: gxToastUp 0.25s ease-out !important;
}

.gx-toast[hidden] {
  display: none !important;
}

@keyframes gxToastUp {
  from { transform: translate(-50%, 15px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

@keyframes gxRise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes gxFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}



/* Fase 2 audit umpan balik (G5): satu anak tangga bantuan BrainCore di giliran retry —
   pertanyaan penuntun / pegangan ingatan / contoh mirip dari soal lain. Palet sama dengan
   .tutor-steps (style.css) yang kontrasnya sudah diukur: teks #1C1917 dan label #78350F di
   latar #FFF8EE. */
.tutor-ladder{
  margin:12px 0 2px;padding:12px 14px;border-radius:var(--radius-sm, 10px);
  background:#FFF8EE !important;border:1.5px solid #FDE68A !important;
}
.tutor-ladder .eyebrow{display:block;margin-bottom:6px;color:#78350F !important;font-weight:800 !important}
.tutor-ladder .tutor-turn-ask{margin:0;font-size:.92rem;line-height:1.6;color:#1C1917 !important;font-weight:600 !important}
.tutor-ladder-now{
  margin:10px 0 0;padding-top:9px;border-top:1px dashed #D97706;
  font-size:.92rem;line-height:1.55;font-weight:700;color:#78350F !important;
}
