/* gamification styles extracted from styles.css and landing.css */
/* includes: xp bar, xp toast, level toast, streak badge, sound toggle, achievement toast, daily quests */

/* ==========================================================================
   SOURCE: styles.css -- XP bar + toast system
   ========================================================================== */

.xp-bar-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
    margin: 0 0.75rem;
}

.xp-bar-level {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--color-warning);
    font-weight: 600;
    font-size: 0.8rem;
    white-space: nowrap;
}

.xp-bar-level svg {
    color: var(--color-warning);
    flex-shrink: 0;
}

.xp-bar-level-num {
    font-variant-numeric: tabular-nums;
}

.xp-bar-track {
    width: 80px;
    height: 6px;
    background: var(--color-border);
    border-radius: 3px;
    overflow: hidden;
    flex-shrink: 0;
}

.xp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-success));
    border-radius: 3px;
    transition: width 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.xp-bar-text {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* xp toast */
.xp-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg, 12px);
    box-shadow: var(--shadow-lg);
    z-index: var(--z-toast);
    pointer-events: none;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.xp-toast-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.xp-toast-exit {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.xp-toast-amount {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--color-success);
}

.xp-toast-reason {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* level up toast */
.level-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--color-warning);
    border-radius: var(--radius-xl, 20px);
    box-shadow: 0 0 40px rgba(249, 115, 22, 0.15), var(--shadow-lg);
    z-index: var(--z-toast-top);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.level-toast-visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.level-toast-exit {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.1);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.level-toast-icon {
    color: var(--color-warning);
    display: flex;
    align-items: center;
    animation: levelPulse 0.6s ease-in-out infinite alternate;
}

.level-toast-text {
    font-weight: 800;
    font-size: 1.2rem;
    background: linear-gradient(135deg, var(--color-warning), var(--color-danger));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes levelPulse {
    from { transform: scale(1); }
    to { transform: scale(1.15); }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
    .xp-toast,
    .level-toast {
        transition: opacity 0.15s ease;
    }
    .level-toast-icon {
        animation: none;
    }
    .xp-bar-fill {
        transition: none;
    }
}

/* responsive xp bar */
@media (max-width: 768px) {
    .xp-bar-container {
        margin: 0 0.35rem;
    }
    .xp-bar-track {
        width: 50px;
    }
    .xp-bar-text {
        display: none;
    }
}

@media (max-width: 480px) {
    .xp-bar-track {
        width: 36px;
    }
}

/* ==========================================================================
   SOURCE: styles.css -- streak badge
   ========================================================================== */

.streak-badge {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: rgba(251, 146, 60, 0.1);
    border: 1px solid rgba(251, 146, 60, 0.2);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-warning);
    margin: 0 0.35rem;
    transition: transform 0.2s ease, background 0.2s ease;
    cursor: default;
}

.streak-badge:hover {
    background: rgba(251, 146, 60, 0.15);
    transform: scale(1.05);
}

.streak-icon {
    color: var(--color-text-muted);
    transition: color 0.3s ease;
}

.streak-icon.streak-active {
    color: var(--color-warning);
    fill: var(--color-warning);
    filter: drop-shadow(0 0 3px rgba(251, 146, 60, 0.5));
}

.streak-count {
    line-height: 1;
}

.streak-badge-new {
    animation: streakPulse 0.6s ease;
}

@keyframes streakPulse {
    0% { transform: scale(1); }
    30% { transform: scale(1.2); }
    60% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .streak-badge-new {
        animation: none;
    }
}

@media (max-width: 480px) {
    .streak-badge {
        padding: 0.15rem 0.35rem;
        font-size: 0.7rem;
    }
}

/* ==========================================================================
   SOURCE: styles.css -- sound toggle
   ========================================================================== */

.sound-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    border-radius: 6px;
    transition: color 0.2s, background-color 0.2s;
    padding: 0;
}

.sound-toggle-btn:hover {
    color: var(--color-text);
    background: var(--color-border);
}

@media (max-width: 480px) {
    .sound-toggle-btn {
        width: 28px;
        height: 28px;
    }

    .sound-toggle-btn svg {
        width: 14px;
        height: 14px;
    }
}

/* ==========================================================================
   SOURCE: styles.css -- achievement toast
   ========================================================================== */

.achievement-toast {
    position: fixed;
    top: 80px;
    right: -360px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.1rem;
    background: var(--color-bg-card, #1e1e2e);
    border: 1px solid var(--color-border, rgba(255,255,255,0.08));
    border-left: 3px solid #a855f7;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    z-index: var(--z-toast-top);
    max-width: 320px;
    transition: right 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.achievement-toast-visible {
    right: 20px;
}

.achievement-toast-exit {
    right: -360px;
    opacity: 0;
    transition: right 0.4s ease-in, opacity 0.3s ease;
}

.achievement-toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
    flex-shrink: 0;
}

.achievement-toast-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #a855f7;
    margin-bottom: 0.1rem;
}

.achievement-toast-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-text, #fafafa);
}

.achievement-toast-desc {
    font-size: 0.75rem;
    color: var(--color-text-muted, #94a3b8);
    margin-top: 0.1rem;
}

@media (prefers-reduced-motion: reduce) {
    .achievement-toast {
        transition: none;
    }
    .achievement-toast-visible {
        right: 20px;
    }
    .achievement-toast-exit {
        display: none;
    }
}

@media (max-width: 480px) {
    .achievement-toast {
        top: auto;
        bottom: -120px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    .achievement-toast-visible {
        bottom: 20px;
        right: 10px;
    }
    .achievement-toast-exit {
        bottom: -120px;
        right: 10px;
    }
}

/* ==========================================================================
   SOURCE: styles.css -- daily quests
   ========================================================================== */

.quest-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: transparent;
    color: var(--color-text-muted);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    z-index: var(--z-modal);
    transition: color 0.2s ease, background-color 0.2s ease;
}

.quest-toggle.quest-toggle-nav {
    position: relative;
    bottom: auto;
    right: auto;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    z-index: auto;
    flex-shrink: 0;
}

.quest-toggle.quest-toggle-nav:hover {
    color: var(--color-text);
    background: var(--color-border);
    transform: none;
}

.quest-toggle:hover {
    color: var(--color-text);
    background: var(--color-border);
    transform: none;
}

.quest-toggle-active {
    color: var(--color-primary);
    background: rgba(99, 102, 241, 0.1);
}

.quest-toggle-count {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--color-danger, #ef4444);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.quest-panel {
    position: fixed;
    bottom: 80px;
    right: 24px;
    width: 280px;
    background: var(--color-bg-card, #1e1e2e);
    border: 1px solid var(--color-border, rgba(255,255,255,0.08));
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    z-index: var(--z-modal-backdrop);
    padding: 1rem;
    transform: translateY(10px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.quest-panel.quest-panel-nav {
    top: 74px;
    right: 24px;
    bottom: auto;
}

.quest-panel-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

.quest-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.quest-panel-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text, #fafafa);
    margin: 0;
}

.quest-panel-count {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--color-primary, #6366f1);
    background: rgba(99, 102, 241, 0.1);
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
}

.quest-panel-items {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.quest-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
}

.quest-item-done {
    opacity: 0.6;
}

.quest-item-done .quest-item-text {
    text-decoration: line-through;
}

.quest-item-check {
    flex-shrink: 0;
    color: var(--color-success, #10b981);
}

.quest-item-circle {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--color-border, rgba(255,255,255,0.15));
}

.quest-item-content {
    flex: 1;
    min-width: 0;
}

.quest-item-text {
    font-size: 0.78rem;
    color: var(--color-text, #fafafa);
    display: block;
    margin-bottom: 0.25rem;
}

.quest-item-bar {
    height: 3px;
    border-radius: 2px;
    background: var(--color-border, rgba(255,255,255,0.08));
    overflow: hidden;
}

.quest-item-bar-fill {
    height: 100%;
    border-radius: 2px;
    background: var(--color-primary, #6366f1);
    transition: width 0.3s ease;
}

.quest-item-done .quest-item-bar-fill {
    background: var(--color-success, #10b981);
}

.quest-item-progress {
    font-size: 0.68rem;
    color: var(--color-text-muted, #94a3b8);
    flex-shrink: 0;
}

.quest-panel-complete {
    margin-top: 0.75rem;
    padding: 0.5rem;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-success, #10b981);
    background: rgba(16, 185, 129, 0.08);
    border-radius: 8px;
}

@media (prefers-reduced-motion: reduce) {
    .quest-panel {
        transition: none;
    }
}

@media (max-width: 480px) {
    .quest-toggle {
        bottom: 16px;
        right: 16px;
        width: 36px;
        height: 36px;
    }
    .quest-toggle.quest-toggle-nav {
        width: 28px;
        height: 28px;
    }
    .quest-panel {
        bottom: 68px;
        right: 16px;
        left: 16px;
        width: auto;
    }
    .quest-panel.quest-panel-nav {
        top: 70px;
        bottom: auto;
        right: 12px;
        left: 12px;
    }
}

/* ==========================================================================
   SOURCE: landing.css -- XP bar for landing nav
   ========================================================================== */

.xp-bar-container {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.2rem 0;
}

.xp-bar-level {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  color: #f59e0b;
  font-weight: 600;
  font-size: 0.78rem;
  white-space: nowrap;
}

.xp-bar-level svg {
  color: #f59e0b;
  flex-shrink: 0;
}

.xp-bar-level-num {
  font-variant-numeric: tabular-nums;
}

.xp-bar-track {
  width: 72px;
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  flex-shrink: 0;
}

[data-theme="light"] .xp-bar-track {
  background: rgba(0, 0, 0, 0.08);
}

.xp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #10b981);
  border-radius: 3px;
  transition: width 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.xp-bar-text {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* xp toast (shared across both css systems) */
.xp-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  background: var(--glass-bg, rgba(255,255,255,0.05));
  backdrop-filter: var(--glass-blur, blur(24px));
  -webkit-backdrop-filter: var(--glass-blur, blur(24px));
  border: 1px solid var(--glass-border, rgba(255,255,255,0.1));
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  z-index: var(--z-toast);
  pointer-events: none;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.xp-toast-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.xp-toast-exit {
  opacity: 0;
  transform: translateY(-10px) scale(0.95);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.xp-toast-amount {
  font-weight: 700;
  font-size: 0.95rem;
  color: #22c55e;
}

.xp-toast-reason {
  font-size: 0.8rem;
  color: var(--text-muted, #737373);
}

/* level up toast */
.level-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: var(--glass-bg, rgba(255,255,255,0.05));
  backdrop-filter: var(--glass-blur, blur(24px));
  -webkit-backdrop-filter: var(--glass-blur, blur(24px));
  border: 1px solid #f59e0b;
  border-radius: 20px;
  box-shadow: 0 0 40px rgba(249,115,22,0.15), 0 8px 24px rgba(0,0,0,0.5);
  z-index: var(--z-toast-top);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.level-toast-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.level-toast-exit {
  opacity: 0;
  transform: translate(-50%, -50%) scale(1.1);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.level-toast-icon {
  color: #f59e0b;
  display: flex;
  align-items: center;
  animation: levelPulse 0.6s ease-in-out infinite alternate;
}

.level-toast-text {
  font-weight: 800;
  font-size: 1.2rem;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes levelPulse {
  from { transform: scale(1); }
  to { transform: scale(1.15); }
}

@media (prefers-reduced-motion: reduce) {
  .xp-toast,
  .level-toast {
    transition: opacity 0.15s ease;
  }
  .level-toast-icon {
    animation: none;
  }
  .xp-bar-fill {
    transition: none;
  }
}

@media (max-width: 768px) {
  .xp-bar-container {
    gap: 0.3rem;
  }
  .xp-bar-track {
    width: 44px;
  }
  .xp-bar-text {
    display: none;
  }
}

@media (max-width: 480px) {
  .xp-bar-track {
    width: 32px;
  }
}

/* ==========================================================================
   SOURCE: landing.css -- streak badge
   ========================================================================== */

.streak-badge {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(251, 146, 60, 0.1);
  border: 1px solid rgba(251, 146, 60, 0.2);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0.35rem;
  transition: transform 0.2s ease, background 0.2s ease;
  cursor: default;
}

.streak-badge:hover {
  background: rgba(251, 146, 60, 0.15);
  transform: scale(1.05);
}

.streak-icon {
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.streak-icon.streak-active {
  color: #fb923c;
  fill: #fb923c;
  filter: drop-shadow(0 0 3px rgba(251, 146, 60, 0.5));
}

.streak-count {
  line-height: 1;
}

.streak-badge-new {
  animation: streakPulse 0.6s ease;
}

@keyframes streakPulse {
  0% { transform: scale(1); }
  30% { transform: scale(1.2); }
  60% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

[data-theme="light"] .streak-badge {
  background: rgba(251, 146, 60, 0.08);
  border-color: rgba(251, 146, 60, 0.15);
  color: #ea580c;
}

[data-theme="light"] .streak-icon.streak-active {
  color: #ea580c;
  fill: #ea580c;
}

@media (prefers-reduced-motion: reduce) {
  .streak-badge-new {
    animation: none;
  }
}

@media (max-width: 480px) {
  .streak-badge {
    padding: 0.15rem 0.35rem;
    font-size: 0.7rem;
  }
}

/* ==========================================================================
   SOURCE: landing.css -- sound toggle
   ========================================================================== */

.sound-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px;
  transition: color 0.2s, background-color 0.2s;
  padding: 0;
}

.sound-toggle-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .sound-toggle-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

@media (max-width: 480px) {
  .sound-toggle-btn {
    width: 28px;
    height: 28px;
  }

  .sound-toggle-btn svg {
    width: 14px;
    height: 14px;
  }
}

/* ==========================================================================
   SOURCE: landing.css -- achievement toast
   ========================================================================== */

.achievement-toast {
  position: fixed;
  top: 80px;
  right: -360px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-left: 3px solid #a855f7;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: var(--z-toast-top);
  max-width: 320px;
  transition: right 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.achievement-toast-visible {
  right: 20px;
}

.achievement-toast-exit {
  right: -360px;
  opacity: 0;
  transition: right 0.4s ease-in, opacity 0.3s ease;
}

.achievement-toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
  flex-shrink: 0;
}

.achievement-toast-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #a855f7;
  margin-bottom: 0.1rem;
}

.achievement-toast-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.achievement-toast-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

[data-theme="light"] .achievement-toast {
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

@media (prefers-reduced-motion: reduce) {
  .achievement-toast {
    transition: none;
  }
  .achievement-toast-visible {
    right: 20px;
  }
  .achievement-toast-exit {
    display: none;
  }
}

@media (max-width: 480px) {
  .achievement-toast {
    top: auto;
    bottom: -120px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
  .achievement-toast-visible {
    bottom: 20px;
    right: 10px;
  }
  .achievement-toast-exit {
    bottom: -120px;
    right: 10px;
  }
}

/* ==========================================================================
   SOURCE: landing.css -- daily quests
   ========================================================================== */

.quest-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  z-index: var(--z-modal);
  transition: color 0.2s ease, background-color 0.2s ease;
}

.quest-toggle.quest-toggle-nav {
  position: relative;
  bottom: auto;
  right: auto;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  z-index: auto;
  flex-shrink: 0;
}

.quest-toggle.quest-toggle-nav:hover {
  color: var(--text-primary);
  background: var(--border);
  transform: none;
}

.quest-toggle:hover {
  color: var(--text-primary);
  background: var(--border);
  transform: none;
}

.quest-toggle-active {
  color: var(--accent);
  background: rgba(99, 102, 241, 0.1);
}

.quest-toggle-count {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.quest-panel {
  position: fixed;
  bottom: 80px;
  right: 24px;
  width: 280px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: var(--z-modal-backdrop);
  padding: 1rem;
  transform: translateY(10px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.quest-panel.quest-panel-nav {
  top: 74px;
  right: 24px;
  bottom: auto;
}

.quest-panel-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

.quest-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.quest-panel-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.quest-panel-count {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(99, 102, 241, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

.quest-panel-items {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.quest-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
}

.quest-item-done {
  opacity: 0.6;
}

.quest-item-done .quest-item-text {
  text-decoration: line-through;
}

.quest-item-check {
  flex-shrink: 0;
  color: #10b981;
}

.quest-item-circle {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--glass-border);
}

.quest-item-content {
  flex: 1;
  min-width: 0;
}

.quest-item-text {
  font-size: 0.78rem;
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.25rem;
}

.quest-item-bar {
  height: 3px;
  border-radius: 2px;
  background: var(--glass-border);
  overflow: hidden;
}

.quest-item-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.quest-item-done .quest-item-bar-fill {
  background: #10b981;
}

.quest-item-progress {
  font-size: 0.68rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.quest-panel-complete {
  margin-top: 0.75rem;
  padding: 0.5rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #10b981;
  background: rgba(16, 185, 129, 0.08);
  border-radius: 8px;
}

[data-theme="light"] .quest-panel {
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

@media (prefers-reduced-motion: reduce) {
  .quest-panel {
    transition: none;
  }
}

@media (max-width: 480px) {
  .quest-toggle {
    bottom: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
  }
  .quest-toggle.quest-toggle-nav {
    width: 28px;
    height: 28px;
  }
  .quest-panel {
    bottom: 68px;
    right: 16px;
    left: 16px;
    width: auto;
  }
  .quest-panel.quest-panel-nav {
    top: 70px;
    bottom: auto;
    right: 12px;
    left: 12px;
  }
}

/* ==========================================================================
   signup prompt overlay (post-quiz for logged-out users)
   ========================================================================== */

.signup-prompt-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-modal-backdrop);
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 1rem;
}

.signup-prompt-visible {
    opacity: 1;
}

.signup-prompt-exit {
    opacity: 0;
    pointer-events: none;
}

.signup-prompt-card {
    background: var(--glass-bg, rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
    border-radius: 20px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
    padding: 2rem 1.75rem;
    max-width: 420px;
    width: 100%;
    text-align: center;
    transform: translateY(20px) scale(0.96);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.signup-prompt-visible .signup-prompt-card {
    transform: translateY(0) scale(1);
}

.signup-prompt-exit .signup-prompt-card {
    transform: translateY(10px) scale(0.98);
}

.signup-prompt-heading {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary, #fafafa);
    margin: 0 0 0.5rem 0;
}

.signup-prompt-sub {
    font-size: 0.9rem;
    color: var(--text-muted, #94a3b8);
    margin: 0 0 1.25rem 0;
}

.signup-prompt-bullets {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.signup-prompt-bullets li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: var(--text-primary, #fafafa);
}

.signup-prompt-bullets li svg {
    flex-shrink: 0;
}

.signup-prompt-primary {
    display: block;
    width: 100%;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    background: var(--accent, #34d399);
    color: #000;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 0.75rem;
}

.signup-prompt-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(52, 211, 153, 0.3);
}

.signup-prompt-primary:active {
    transform: translateY(0);
}

.signup-prompt-dismiss {
    display: block;
    width: 100%;
    padding: 0.5rem;
    border: none;
    background: transparent;
    color: var(--text-muted, #94a3b8);
    font-family: inherit;
    font-size: 0.82rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.signup-prompt-dismiss:hover {
    color: var(--text-primary, #fafafa);
}

[data-theme="light"] .signup-prompt-overlay {
    background: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .signup-prompt-card {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

@media (prefers-reduced-motion: reduce) {
    .signup-prompt-overlay {
        transition: none;
    }
    .signup-prompt-card {
        transition: none;
    }
}

@media (max-width: 480px) {
    .signup-prompt-card {
        padding: 1.5rem 1.25rem;
        border-radius: 16px;
    }
    .signup-prompt-heading {
        font-size: 1.1rem;
    }
}

/* ===== zigzag progress path ===== */
.progress-path {
  max-width: 480px;
  margin: 0 auto;
  padding: 1.5rem 0;
}

.progress-path-track {
  display: flex;
  flex-direction: column;
}

.progress-path-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.progress-path-row-left {
  align-items: flex-start;
  padding-left: 20%;
}

.progress-path-row-right {
  align-items: flex-end;
  padding-right: 20%;
}

.progress-path-connector {
  width: 2px;
  height: 32px;
  background: var(--glass-border);
  margin: 0 auto;
  position: relative;
  left: 24px;
}

.progress-path-row-right .progress-path-connector {
  left: -24px;
}

.progress-path-connector-done {
  background: #10b981;
}

.progress-path-node {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  text-decoration: none;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  max-width: 320px;
  width: 100%;
}

.progress-path-node:hover {
  transform: translateY(-2px);
}

.progress-path-node-available {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  cursor: pointer;
}

.progress-path-node-available:hover {
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.15);
  border-color: var(--accent);
}

.progress-path-node-complete {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  cursor: pointer;
}

.progress-path-node-complete:hover {
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.15);
}

.progress-path-node-locked {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.progress-path-node-current {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.progress-path-node-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.progress-path-node-available .progress-path-node-icon {
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent);
}

.progress-path-node-complete .progress-path-node-icon {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.progress-path-node-locked .progress-path-node-icon {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
}

.progress-path-node-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.progress-path-node-num {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.progress-path-node-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.progress-path-node-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.progress-path-node-score {
  font-size: 0.68rem;
  font-weight: 600;
  color: #10b981;
  margin-top: 0.1rem;
}

.progress-path-current-badge {
  position: absolute;
  top: -8px;
  right: 12px;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
}

.progress-path-lock {
  color: var(--text-muted);
}

@media (max-width: 480px) {
  .progress-path-row-left,
  .progress-path-row-right {
    padding-left: 5%;
    padding-right: 5%;
    align-items: center;
  }
  .progress-path-connector {
    left: 0;
  }
  .progress-path-row-right .progress-path-connector {
    left: 0;
  }
  .progress-path-node {
    max-width: none;
  }
}

.progress-path-section {
  padding: 80px 40px;
  max-width: 700px;
  margin: 0 auto;
}

.progress-path-header {
  text-align: center;
  margin-bottom: 40px;
}

[data-theme="light"] .progress-path-node-available {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .progress-path-node-locked {
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .progress-path-node-complete {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.15);
}

[data-theme="light"] .progress-path-connector {
  background: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .progress-path-node-title {
  color: #1a1a2e;
}

[data-theme="light"] .progress-path-node-num,
[data-theme="light"] .progress-path-node-subtitle {
  color: #64748b;
}

@media (max-width: 768px) {
  .progress-path-section {
    padding: 60px 20px;
  }
}
