/* css/components/bento-grid.css — Redesigned Bento Grid dashboard */

:root {
  --oxford-blue: #2D2E5F;
  --oxford-light: #4a4b7c;
  --oxford-dark: #1e1f42;
  --amber: #FFD28E;
  --amber-dark: #e6b86e;
  --white-snow: #F4F7FF;
  --accent-red: #ef4444;
  --accent-orange: #f97316;
  --accent-green: #1E9D8E;
  --accent-purple: #8b5cf6;
  --bento-radius: 20px;
  --bento-shadow: 0 2px 10px rgba(45, 46, 95, 0.05);
  --bento-hover-shadow: 0 4px 18px rgba(45, 46, 95, 0.09);
  /* Pastel card palette */
  --card-summit: #e8a87c;
  --card-ascent: #f0d24a;
  --card-quicksteps: #a8e6a3;
  --card-crossword: #c8b8f0;
  --card-basecamp: #b8b8e8;
  --card-weakspot: #b8e8d0;
  --card-checkpoint: #f5c0d0;
  --card-streak-bg: #c5d5e8;
  --card-calendar-bg: #c8e8c8;
  --card-grade-bg: #f19d6d;
  --card-calc-bg: #c8c0e0;
}

/* ── Grid wrapper ── */
.bento-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: slideDown 0.4s ease-out;
}

.mobile-learn-pane {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bento-progress-row {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── Base card ── */
.bento-card {
  border-radius: var(--bento-radius);
  padding: 20px 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
  border: none;
  box-shadow: none;
}

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

/* ── Bento card titles — bold uppercase style ── */
.bento-card-title {
  font-family: 'Mileast', sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 1.3rem;
  position: relative;
  z-index: 1;
  transition: color 0.25s ease;
}

.bento-card-desc {
  font-family: 'Mileast', sans-serif;
  font-style: italic;
  font-size: 0.90rem;
  opacity: 0.85;
  margin-top: 4px;
  position: relative;
  z-index: 1;
  transition: color 0.25s ease;
}

.bento-card-extra {
  font-family: 'Mileast', sans-serif;
  font-style: italic;
  font-size: 0.72rem;
  opacity: 0.7;
  margin-top: 6px;
  position: relative;
  z-index: 1;
  transition: color 0.25s ease;
}

/* ── Row 2: Learning row (Quicksteps · Basecamp) ── */
.bento-learning-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 14px;
}

/* Ground effect for illustration cards */
.bento-card-quicksteps::before,
.bento-card-basecamp::before,
.bento-card-crossword::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20%;
    opacity: 0.1;
    background: black;
    border-radius: 0 0 var(--bento-radius) var(--bento-radius);
    pointer-events: none;
    z-index: 0;
}
/* ── QUICKSTEPS card (micro-learning) ── */
.bento-card-quicksteps {
  background: var(--card-quicksteps);
  color: #2a5c2a;
  cursor: pointer;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.bento-card-quicksteps .bento-card-title {
  color: #55B333;
}

/* Quicksteps PNG illustration */
.bento-card-quicksteps::after {
content: '';
    position: absolute;
    bottom: -110px;
    right: -20px;
    width: 320px;
    height: 320px;
    opacity: 1;
    background-image: url(../../Assets/images/quicksteps.png);
    background-repeat: no-repeat;
    background-size: contain;
    background-position: bottom right;
    pointer-events: none;
    z-index: 0;
}

/* ── BASECAMP card (lessons) ── */
.bento-card-basecamp {
  background: var(--card-basecamp);
  color: #3a3a6a;
  cursor: pointer;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.bento-card-basecamp .bento-card-title {
  color: #6E7DEE;
}

/* Basecamp PNG illustration */
.bento-card-basecamp::after {
content: '';
    position: absolute;
    bottom: -60px;
    right: 15px;
    width: 270px;
    height: 270px;
    opacity: 1;
    background-image: url(../../Assets/images/Basecamp.png);
    background-repeat: no-repeat;
    background-size: contain;
    background-position: bottom right;
    pointer-events: none;
    z-index: 0;
}

/* ── WEAK SPOT card (recommended exercise) ── */
.bento-card-weakspot {
  background: #D0E8FC;
  color: #2a5848;
  cursor: pointer;
  min-height: 70px;
  display: flex;
  align-items: center;
}

.bento-card-weakspot .bento-card-title {
  color: #4E95D9;
}

/* WeakSpot PNG illustration */
.bento-card-weakspot::after {
content: '';
    position: absolute;
    right: -120px;
    top: 48%;
    transform: translateY(-55%);
    width: 280px;
    height: 280px;
    opacity: 1;
    background-image: url(../../Assets/images/WeakSpot.png);
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
    z-index: 0;
}

/* ── CHECKPOINT card (next lesson) ── */
.bento-card-checkpoint {
  background: var(--card-checkpoint);
  color: #6a2848;
  cursor: pointer;
  min-height: 60px;
  display: flex;
  align-items: center;
}

.bento-card-checkpoint .bento-card-title {
  color: #a83070;
}

/* Checkpoint PNG illustration */
.bento-card-checkpoint::after {
content: '';
    position: absolute;
    right: 5px;
    top: 56%;
    transform: translateY(-55%);
    width: 120px;
    height: 110px;
    opacity: 1;
    background-image: url(../../Assets/images/checkpoint.png);
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
    z-index: 0;
}



/* ── Hover dark overlay ── */
.bento-hover-overlay {
  position: absolute;
  inset: 0;
  background: transparent;
  transition: background 0.3s ease;
  z-index: 1;
  pointer-events: none;
  border-radius: var(--bento-radius);
}

/* ── On hover: hide card illustrations (::after only) ── */
.bento-card::after,
.bento-card::before {
  transition: opacity 0.3s ease;
}

.bento-card:hover::after,
.bento-card:hover::before {
  opacity: 0 !important;
}

/* ── Hover description text ── */
.bento-card-hover-info {
  font-family: 'Mileast', sans-serif;
  font-style: italic;
  font-size: 0.85rem;
  line-height: 1.45;
  margin-top: 8px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease 0.05s, transform 0.25s ease 0.05s, color 0.25s ease;
}

.bento-card:hover .bento-card-hover-info {
  opacity: 1;
  transform: translateY(0);
}

/* ── Per-card hover: darker text tones ── */
.bento-card-quicksteps:hover .bento-card-title   { color: #2e7a10; }
.bento-card-quicksteps:hover                     { color: #1a4a1a; }
.bento-card-quicksteps:hover .bento-card-hover-info { color: #2d6e18; }

.bento-card-basecamp:hover .bento-card-title     { color: #3848c8; }
.bento-card-basecamp:hover                       { color: #252550; }
.bento-card-basecamp:hover .bento-card-hover-info { color: #3858c0; }

.bento-card-weakspot:hover .bento-card-title     { color: #1e6aaa; }
.bento-card-weakspot:hover                       { color: #183838; }
.bento-card-weakspot:hover .bento-card-hover-info { color: #1a65a0; }

.bento-card-checkpoint:hover .bento-card-title   { color: #7a1858; }
.bento-card-checkpoint:hover                     { color: #481830; }
.bento-card-checkpoint:hover .bento-card-hover-info { color: #721858; }

.bento-card-crossword:hover .bento-card-title    { color: #3820a0; }
.bento-card-crossword:hover                      { color: #221848; }
.bento-card-crossword:hover .bento-card-hover-info { color: #3020a0; }

/* ── Bento card inner content ── */
.bento-card-inner {
  position: relative;
  z-index: 2;
}

.bento-card-inner .bento-rec-info {
  flex: 1;
}

/* ── Bento center wrapper (white container) ── */
.bento-center-wrapper {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 24px;
  padding: 20px;
  box-shadow: 0 4px 24px rgba(45, 46, 95, 0.08);
}

/* ── Attempts badge ── */
.bento-attempts {
  margin: 6px 0 4px;
  font-size: 0.82rem;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.bento-attempts-exhausted {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  opacity: 0.9;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
  padding: 2px 6px;
}

/* ── Recommended Exercise (full-width) ── */
.bento-recommended-row {
  /* full-width single card */
}

.bento-recommended {
  background: linear-gradient(135deg, #e8f0ff 0%, #d8d0f0 100%);
  color: #2D2E5F;
}

.bento-recommended-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}

.bento-recommended-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.9;
}

.bento-rec-why {
  font-size: 0.78rem;
  opacity: 0.7;
}

.bento-recommended-body {
  display: flex;
  align-items: center;
  gap: 14px;
}

.bento-rec-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.bento-rec-info {
  flex: 1;
}

.bento-rec-title {
  font-size: 1rem;
  font-weight: 700;
}

.bento-rec-score {
  font-size: 0.82rem;
  opacity: 0.8;
  margin-top: 4px;
}

.bento-rec-btn {
  flex-shrink: 0;
  background: linear-gradient(135deg, #2D2E5F, #1E9D8E);
  color: white;
  border: none;
  border-radius: 14px;
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}

.bento-rec-btn:hover {
  transform: scale(1.04);
  box-shadow: 0 4px 16px rgba(45, 46, 95, 0.2);
}

.bento-recommended-empty {
  font-size: 0.88rem;
  opacity: 0.8;
  margin-top: 8px;
}

/* ── Grade Tracker (center) ── */
.bento-grade-row {
  /* full-width single card */
}

.bento-grade-tracker {
  /* uses default .bento-card white style */
}

.bento-grade-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 6px;
}

.bento-grade-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--oxford-blue);
}

.bento-grade-subtitle {
  font-size: 0.78rem;
  color: #6b7280;
}

.bento-grade-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bento-grade-bar-row {
  display: grid;
  grid-template-columns: 130px 1fr 48px;
  align-items: center;
  gap: 10px;
}

.bento-grade-skill {
  font-size: 0.82rem;
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
}

.bento-grade-track {
  height: 10px;
  background: #e5e7eb;
  border-radius: 99px;
  overflow: hidden;
}

.bento-grade-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.8s ease;
}

.bento-grade-score {
  font-size: 0.8rem;
  font-weight: 700;
  color: #374151;
  text-align: right;
}

.bento-grade-empty {
  font-size: 0.88rem;
  color: #6b7280;
  margin-top: 8px;
}

/* ── Next Lesson Row ── */
.bento-next-row {
  /* single column wide card */
}

.bento-next-lesson {
  background: linear-gradient(135deg, #e8f4ff 0%, #d0e0f8 60%, #d8d0f0 100%);
  color: #2D2E5F;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto auto;
  gap: 8px;
  align-items: center;
}

.bento-next-badge {
  grid-column: 1;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.8;
}

.bento-next-header {
  grid-column: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.bento-next-icon {
  font-size: 1.8rem;
}

.bento-next-title {
  font-size: 1rem;
  font-weight: 700;
}

.bento-next-part {
  font-size: 0.82rem;
  opacity: 0.8;
}

.bento-next-progress {
  grid-column: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.bento-next-progress .bento-progress-track {
  flex: 1;
}

.bento-next-progress-text {
  font-size: 0.78rem;
  opacity: 0.8;
  white-space: nowrap;
}

.bento-resume-btn {
  grid-column: 2;
  grid-row: 1 / 4;
  align-self: center;
  background: linear-gradient(135deg, #2D2E5F, #1E9D8E);
  color: white;
  border: none;
  border-radius: 14px;
  padding: 12px 22px;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}

.bento-resume-btn:hover {
  transform: scale(1.04);
  box-shadow: 0 4px 16px rgba(45, 46, 95, 0.2);
}

@media (max-width: 768px), (max-height: 520px) and (orientation: landscape) and (max-width: 1024px) {
  .bento-center-wrapper {
    border-radius: 20px;
    padding: 12px;
  }

  .bento-grid {
    gap: 12px;
  }

  .bento-learning-row {
    grid-template-columns: 1fr;
  }

  .bento-card {
    padding: 18px;
  }

  .bento-card-title {
    font-size: 1.08rem;
  }

  .bento-card-desc {
    font-size: 0.82rem;
  }

  .bento-card-quicksteps,
  .bento-card-basecamp,
  .bento-card-weakspot,
  .bento-card-checkpoint,
  .bento-card-crossword {
    min-height: 132px;
  }

  .bento-card::after {
    opacity: 0.75;
    transform: scale(0.9);
    transform-origin: bottom right;
  }

  .bento-recommended-header,
  .bento-recommended-body,
  .bento-next-header,
  .bento-next-progress {
    align-items: flex-start;
  }

  .bento-recommended-body {
    flex-wrap: wrap;
  }

  .bento-rec-btn {
    width: 100%;
  }

  .bento-grade-bar-row {
    grid-template-columns: 88px 1fr 40px;
    gap: 8px;
  }

  .bento-grade-skill,
  .bento-grade-score {
    font-size: 0.75rem;
  }

  .bento-next-lesson {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .bento-resume-btn {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .bento-center-wrapper {
    margin: 0 -2px;
    padding: 10px;
  }

  .bento-card {
    border-radius: 16px;
    padding: 16px;
  }

  .bento-grade-bar-row {
    grid-template-columns: 1fr;
  }

  .bento-grade-score {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .sw-grade .grade-carousel-cefr {
    font-size: 4rem;
  }

  .bento-course-prog {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 360px) {
  .bento-card::after,
  .bento-card::before {
    display: none;
  }
}

/* ── Progress bar (shared) ── */
.bento-progress-track {
  height: 8px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 99px;
  overflow: hidden;
}

.bento-progress-fill {
  height: 100%;
  background: var(--accent-teal);
  border-radius: 99px;
  transition: width 0.8s ease;
}

/* ── Streak Modal ── */
.bento-streak-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: slideDown 0.25s ease-out;
}

.bento-streak-modal {
  background: linear-gradient(145deg, #eeeaff, #d8d0f0);
  color: #2D2E5F;
  border-radius: 20px;
  padding: 32px 28px 24px;
  max-width: 360px;
  width: 90%;
  position: relative;
  text-align: center;
  box-shadow: 0 10px 40px rgba(45, 46, 95, 0.15);
}

.bento-streak-modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(45, 46, 95, 0.08);
  border: none;
  color: #2D2E5F;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  z-index: 10001;
}

.bento-streak-modal-close .material-symbols-outlined {
  font-size: 1.15rem;
  line-height: 1;
}

.bento-streak-modal-fire {
  font-size: 3.5rem;
  animation: fireFlicker 1.5s ease-in-out infinite;
}

.bento-streak-modal-count {
  font-size: 4rem;
  font-weight: 900;
  line-height: 1;
  margin: 4px 0;
}

.bento-streak-modal-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.8;
  margin-bottom: 10px;
}

.bento-streak-modal-status {
  font-size: 1.02rem;
  font-weight: 700;
  padding: 12px 18px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
  line-height: 1.25;
  text-align: left;
}

.bento-streak-status-emoji {
  font-size: 1.75rem;
  line-height: 1;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bento-streak-status-text {
  flex: 1;
  min-width: 0;
}

.bento-streak-modal-status.bento-streak-safe {
  background: rgba(16, 185, 129, 0.2);
  color: #065f46;
}

.bento-streak-modal-status.bento-streak-risk {
  background: rgba(251, 146, 60, 0.28);
  color: #9a3412;
}

.bento-streak-modal-status.bento-streak-neutral {
  background: rgba(45, 46, 95, 0.08);
  color: #334155;
}

.bento-streak-modal-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.bento-streak-stat {
  background: rgba(45, 46, 95, 0.06);
  border-radius: 14px;
  padding: 10px 6px;
}

.bento-streak-stat-val {
  font-size: 1.4rem;
  font-weight: 900;
}

.bento-streak-stat-lbl {
  font-size: 0.68rem;
  opacity: 0.75;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.bento-streak-modal-section {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.7;
  margin-bottom: 10px;
}

/* ── Streak Calendar ── */
.bento-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.bento-cal-day {
  aspect-ratio: 1;
  border-radius: 6px;
  background: rgba(45, 46, 95, 0.06);
  transition: background 0.2s;
}

.bento-cal-active {
  background: #1E9D8E;
  box-shadow: 0 2px 6px rgba(30, 157, 142, 0.3);
}

/* ── Generic Modal (Lessons etc.) ── */
.bento-generic-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: slideDown 0.25s ease-out;
}

.bento-generic-modal {
  background: white;
  border-radius: 20px;
  padding: 36px 28px 28px;
  max-width: 340px;
  width: 90%;
  text-align: center;
  position: relative;
  box-shadow: 0 10px 40px rgba(45, 46, 95, 0.12);
}

.bento-generic-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: #f3f4f6;
  border: none;
  color: #374151;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bento-generic-modal-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.bento-generic-modal-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--oxford-blue);
  margin-bottom: 10px;
}

.bento-generic-modal-text {
  font-size: 0.9rem;
  color: #6b7280;
  line-height: 1.5;
  margin-bottom: 20px;
}

.bento-generic-modal-btn {
  background: linear-gradient(135deg, #2D2E5F, #1E9D8E);
  color: white;
  border: none;
  border-radius: 14px;
  padding: 10px 28px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
}

.bento-generic-modal-btn:hover {
  opacity: 0.85;
}

/* ── Left Sidebar: Level badge ── */
.sidebar-level-badge {
  background: rgba(200, 218, 240, 0.6);
  border-radius: 16px;
  padding: 8px 10px;
  text-align: center;
  margin-bottom: 12px;
}

.sidebar-level-badge-label {
  font-family: 'Mileast', sans-serif;
  font-style: italic;
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #5a8ac0;
}

.sidebar-level-badge-code {
  font-family: 'Mileast', sans-serif;
  font-style: normal;
  font-size: 3.5rem;
  font-weight: 900;
  color: #5a8ac0;
  line-height: 1.1;
}

/* ── Level selector per-level colors ── */
.level-selector-option[data-level="B1"] {
  background: #fff3e0;
  color: #bf360c;
  border-color: #ff9800;
}

.level-selector-option[data-level="B2"] {
  background: #e3f2fd;
  color: #0d47a1;
  border-color: #2196f3;
}

.level-selector-option[data-level="C1"] {
  background: #ffffff;
  color: #104862;
  border-color: #46B1E1;
}

.level-selector-option[data-level="C2"] {
  background: #f3e5f5;
  color: #4a148c;
  border-color: #9c27b0;
}

/* ── Left Sidebar: Continue widgets ── */
.sw-left-widget {
  border-radius: 16px;
  padding: 14px 16px;
  margin-top: 10px;
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.sw-left-widget:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(45, 46, 95, 0.12);
}

/* "Continue Basecamp" — tono azul-claro como la paleta del proyecto */
.sw-continue-basecamp {
  background: linear-gradient(135deg, #ddeeff 0%, #c8e0f8 100%);
  color: #1a4a7a;
}

/* "Next Exam" — tono coral/amber para diferenciarlo */
.sw-next-exam {
  background: linear-gradient(135deg, #fde8d8 0%, #f8d4b8 100%);
  color: #7a3a10;
}

.sw-left-widget-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.65;
  margin-bottom: 8px;
}

.sw-left-widget-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.sw-left-widget-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  line-height: 1;
}

.sw-left-widget-info {
  flex: 1;
  min-width: 0;
}

.sw-left-widget-title {
  font-size: 0.85rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.sw-left-widget-sub {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-top: 2px;
}

.sw-left-progress-track {
  height: 5px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 6px;
}

.sw-left-progress-fill {
  height: 100%;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 99px;
  transition: width 0.6s ease;
}

.sw-continue-basecamp .sw-left-progress-fill {
  background: #1a7abf;
}

.sw-next-exam .sw-left-progress-fill {
  background: #c05020;
}

.sw-left-widget-pct {
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0.65;
  text-align: right;
}

/* ── Right Sidebar: Pastel widget cards ── */
.sidebar-widget-pastel {
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 0px;
  position: relative;
  overflow: hidden;
}

.sidebar-widget-pastel-title {
  font-size: 0.82rem;
  font-weight: 900;
  font-family: 'Mileast', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

/* Day Streak widget */

.sw-streak {
background: #A6CAEC;
color: #4E95D9;
display: flex;
flex-direction: column;
min-height: 120px;
padding-bottom: 0px;
}

.sw-streak::after {
    content: '';
    position: absolute;
    right: -5px;
    bottom: -5px;
    width: 90px;
    height: 90px;
    opacity: 1;
    background-image: url(../../Assets/images/streak.png);
    background-repeat: no-repeat;
    background-size: contain;
    background-position: bottom right;
    pointer-events: none;
}

.sw-streak .sidebar-widget-pastel-title {
color: #215F9A;
font-size: 1.2rem;
text-align: center;
width: 100%;
margin-bottom: 2px;
}

.sw-streak-count {
display: flex;
align-items: flex-start;
justify-content: center;
font-family: 'Mileast', sans-serif;
text-align: center;
font-size: 4.5rem;
font-weight: 900;
color: #4E95D9;
line-height: 1;
margin-top: -2px;
}


/* Calendar widget */
.sw-calendar {
  background: var(--card-calendar-bg);
  color: #2a5828;
}

.sw-calendar .sidebar-widget-pastel-title {
  color: #2a5828;
}

.sw-calendar-month-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #3a6838;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.sw-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  position: relative;
  z-index: 1;
}

.sw-cal-header {
  font-size: 0.65rem;
  font-weight: 800;
  color: #3a6838;
  text-align: center;
  padding: 2px 0 4px;
  text-transform: uppercase;
}

.sw-cal-empty {
  /* spacer cell */
}

.sw-cal-day {
  position: relative;
  aspect-ratio: 1;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.45);
  color: #48a858;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 3px;
}

.sw-cal-day-num {
  position: absolute;
  top: 2px;
  left: 3px;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
}

.sw-cal-day.today {
  background: rgba(255, 255, 255, 0.85);
  color: #2a5828;
  box-shadow: 0 0 0 1.5px #48a858;
}

.sw-cal-day.sw-cal-done {
  background: #48a858;
  color: white;
}

.sw-cal-day.sw-cal-done.today {
  background: #2a7a38;
  box-shadow: 0 0 0 2px #1a5828;
}

/* Grade Tracker widget */
.sw-grade {
  background: var(--card-grade-bg);
  color: #632e13;
  border-radius: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0 0 0;
  overflow: hidden;
  font-family: 'Mileast', sans-serif;
}

.sw-grade .sidebar-widget-pastel-title {
  color: #632e13;
  font-weight: bold;
  font-size: 1.5rem;
  letter-spacing: 1px;
  text-align: center;
  width: 100%;
}

.sw-grade .grade-carousel-viewport {
  flex: 1;
  display: flex;
  align-items: stretch;
  justify-content: center;
  width: 100%;
}

.sw-grade .grade-carousel-slide {
  flex: 1;
  width: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: 50px;
  padding-top: 0px;
  position: relative;
}

.sw-grade .grade-carousel-raw {
  font-size: 2.5rem;
  font-weight: bold;
  color: #fbe0d1;
}

.sw-grade .grade-carousel-cefr {
  font-size: 5.5rem;
  font-weight: 900;
  color: #632e13;
  font-family: 'Mileast', sans-serif;
  line-height: 1;
  margin: 0px 10px 0 0;
}

.sw-grade .grade-carousel-cefr.grade-carousel-cefr-dash {
  margin: 0;
}

.sw-grade .grade-carousel-skill-label {
  width: 100%;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  bottom: 0;
  left: 0;
  font-size: 1.5rem;
  font-weight: bold;
  color: #fbe0d1;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-radius: 0;
  margin: 0;
  padding-top: 20px;
}

/* Arc effect on the footer */
.sw-grade .grade-carousel-skill-label::before {
  content: "";
  position: absolute;
  top: 0px;
  left: -50%;
  width: 200%;
  height: 200px;
  background-color: #e87633;
  border-radius: 50%;
}

.sw-grade .grade-carousel-skill-label span {
  position: relative;
  z-index: 1;
}

.sw-grade .grade-carousel-dot {
  background: rgba(99, 46, 19, 0.25);
}

.sw-grade .grade-carousel-dot.active {
  background: #632e13;
}

.sw-grade .grade-carousel-dots {
  position: relative;
  z-index: 2;
  margin-bottom: 10px;
}

/* Calculator widget */
.sw-calculator {
  background: var(--card-calc-bg);
  color: #3a3a6a;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sw-calculator-icon {
  font-size: 2.4rem;
  color: #3a3a6a;
}


/* ── CROSSWORD card (bento grid tile) ── */
.bento-card-crossword {
  background: var(--card-crossword);
  color: #3a2a6a;
  cursor: pointer;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.bento-card-crossword .bento-card-title {
  color: #6040c0;
}

/* Crossword PNG illustration (same image as quicksteps) */
.bento-card-crossword::after {
  content: '';
  position: absolute;
  bottom: -110px;
  right: -20px;
  width: 320px;
  height: 320px;
  opacity: 1;
  background-image: url(../../Assets/images/quicksteps.png);
  background-repeat: no-repeat;
  background-size: contain;
  background-position: bottom right;
  pointer-events: none;
  z-index: 0;
}

/* ── CROSSWORD LIST PAGE ── */
.cw-list-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 32px;
}

.cw-list-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}

.cw-list-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.cw-list-card {
  border-radius: 16px;
  padding: 14px 12px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  min-height: 120px;
  position: relative;
  overflow: hidden;
}

.cw-list-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.13);
}

/* ── Level-specific border-left accents (white background) ── */
.cw-list-card-a2 { background: #fff; border-left: 4px solid #10b981; }
.cw-list-card-b1 { background: #fff; border-left: 4px solid #3b82f6; }
.cw-list-card-b2 { background: #fff; border-left: 4px solid #f59e0b; }
.cw-list-card-c1 { background: #fff; border-left: 4px solid #f97316; }
.cw-list-card-c2 { background: #fff; border-left: 4px solid #ef4444; }

/* ── Card top row (number + badge) ── */
.cw-list-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cw-list-card-num {
  font-weight: 700;
  font-size: 0.7rem;
  color: rgba(0,0,0,0.35);
  letter-spacing: 0.03em;
  line-height: 1;
}

/* ── Level badge on card ── */
.cw-list-card-lvl-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: 0.05em;
  line-height: 1.4;
}
.cw-list-card-a2 .cw-list-card-lvl-badge { background: rgba(16,185,129,0.15); color: #047857; }
.cw-list-card-b1 .cw-list-card-lvl-badge { background: rgba(59,130,246,0.15); color: #1d4ed8; }
.cw-list-card-b2 .cw-list-card-lvl-badge { background: rgba(245,158,11,0.15); color: #92400e; }
.cw-list-card-c1 .cw-list-card-lvl-badge { background: rgba(249,115,22,0.15); color: #9a3412; }
.cw-list-card-c2 .cw-list-card-lvl-badge { background: rgba(239,68,68,0.15); color: #991b1b; }

/* ── Card title ── */
.cw-list-card-title-text {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.3;
  flex: 1;
}

.cw-list-card-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cw-list-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.cw-list-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.cw-list-page-arrow {
  width: 38px;
  height: 38px;
  padding: 0;
}

.cw-list-page-arrow .material-symbols-outlined {
  font-size: 1.25rem;
}

.cw-list-page-select-wrap {
  display: inline-flex;
}

.cw-list-page-select {
  min-width: 140px;
  height: 38px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0 34px 0 12px;
}

.cw-list-page-btn:hover:not(:disabled) {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.cw-list-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.cw-list-page-btn-active {
  background: #6040c0;
  border-color: #6040c0;
  color: #fff;
}

.cw-list-page-btn-active:hover {
  background: #4f33a0 !important;
  border-color: #4f33a0 !important;
}

/* ── Level filter ── */
.cw-level-filter {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin-bottom: 4px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.cw-level-filter::-webkit-scrollbar {
  display: none;
}

.cw-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: 0 0 auto;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.cw-filter-btn .material-symbols-outlined {
  font-size: 1rem;
}

.cw-filter-btn:hover:not(.cw-filter-btn-active) {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.cw-filter-btn-active {
  background: #6040c0;
  border-color: #6040c0;
  color: #fff;
}

/* ── Progress bar on crossword cards ── */
.cw-list-card-prog-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
}

.cw-list-card-prog-track {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: rgba(0,0,0,0.12);
  overflow: hidden;
}

.cw-list-card-prog-fill {
  height: 100%;
  border-radius: 999px;
  background: #6040c0;
  transition: width 0.3s ease;
}

.cw-list-card-prog-fill.cw-prog-done {
  background: #059669;
}

.cw-list-card-prog-pct {
  font-size: 0.72rem;
  font-weight: 700;
  color: #475569;
  white-space: nowrap;
  display: flex;
  align-items: center;
}

.cw-list-card-prog-pct .material-symbols-outlined {
  font-size: 1rem;
  color: #059669;
}

.cw-list-card-done {
  outline: 2px solid rgba(5,150,105,0.40);
  box-shadow: 0 2px 10px rgba(5,150,105,0.12);
}

/* ── Crossword page layout (single sidebar on left) ── */
.cw-list-layout {
  grid-template-columns: 240px 1fr !important;
}

.cw-list-layout .dashboard-left-sidebar {
  display: block !important;
}

/* ── Crossword sidebar stats widget ── */
.cw-sidebar-stats {
  background: linear-gradient(145deg, #c8b8f0 0%, #b5a0e8 100%);
  border-radius: 16px;
  padding: 18px 16px 14px;
  margin-bottom: 12px;
  box-shadow: 0 3px 12px rgba(96,64,192,0.18);
}

.cw-sidebar-stats-title {
  font-weight: 800;
  font-size: 0.9rem;
  color: #2d1a5a;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.cw-sidebar-stats-title .material-symbols-outlined {
  font-size: 1.1rem;
}

.cw-sidebar-stats-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.cw-sidebar-stat {
  background: rgba(255,255,255,0.65);
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.cw-sidebar-stat-num {
  font-size: 1.3rem;
  font-weight: 900;
  color: #3a10a0;
  line-height: 1;
}

.cw-sidebar-stat-label {
  font-size: 0.72rem;
  color: #4a2a8a;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cw-sidebar-prog-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(0,0,0,0.14);
  overflow: hidden;
  margin-bottom: 4px;
}

.cw-sidebar-prog-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7c50e0 0%, #4f33a0 100%);
  transition: width 0.4s ease;
}

.cw-sidebar-prog-label {
  font-size: 0.72rem;
  color: #4a2a8a;
  text-align: right;
}

/* ── Continue last crossword widget ── */
.cw-sidebar-continue {
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  cursor: pointer;
  transition: box-shadow 0.18s, transform 0.18s;
  margin-top: 4px;
  border: 1px solid rgba(96,64,192,0.12);
}

.cw-sidebar-continue:hover {
  box-shadow: 0 6px 18px rgba(96,64,192,0.18);
  transform: translateY(-1px);
}

.cw-sidebar-continue-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #6040c0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
}

.cw-sidebar-continue-label .material-symbols-outlined {
  font-size: 1rem;
}

.cw-sidebar-continue-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: #1e293b;
  margin-bottom: 2px;
}

.cw-sidebar-continue-sub {
  font-size: 0.75rem;
  color: #64748b;
}

@media (max-width: 900px) {
  .cw-list-layout {
    grid-template-columns: 1fr !important;
  }
  .cw-list-layout .dashboard-left-sidebar {
    display: none !important;
  }
  .cw-list-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .cw-list-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .cw-list-page {
    gap: 14px;
  }
  .cw-list-header {
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
    padding: 12px;
  }
  .cw-level-filter {
    margin-left: -4px;
    margin-right: -4px;
    padding: 0 4px 4px;
  }
  .cw-filter-btn {
    padding: 6px 10px;
    min-width: 42px;
  }
  .cw-list-pagination {
    flex-wrap: nowrap;
    gap: 10px;
  }
  .cw-list-page-select {
    min-width: 132px;
  }
}

/* ── In-progress card state ── */
.cw-list-card-inprogress {
  border-left: 3px solid #6040c0;
}

/* ── Difficulty label on card ── */
.cw-list-card-difficulty {
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(0,0,0,0.45);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex: 1;
}

/* ── Streak sidebar widget ── */
.cw-sidebar-streak {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
  text-align: center;
  border: 1px solid rgba(234,88,12,0.15);
}

.cw-sidebar-streak-num {
  font-size: 1.8rem;
  font-weight: 900;
  color: #ea580c;
  line-height: 1;
}

.cw-sidebar-streak-label {
  font-size: 0.72rem;
  color: #c2410c;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

.cw-sidebar-streak-empty {
  font-size: 0.78rem;
  color: #9a3412;
  font-weight: 600;
}

/* ── XP bar ── */
.cw-sidebar-xp {
  background: #fff;
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 10px;
  border: 1px solid rgba(96,64,192,0.12);
}

.cw-sidebar-xp-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.cw-sidebar-xp-label {
  font-size: 0.82rem;
  font-weight: 800;
  color: #6040c0;
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.cw-sidebar-xp-label .material-symbols-outlined {
  font-size: 1rem;
}

.cw-sidebar-xp-tier {
  font-size: 0.68rem;
  font-weight: 700;
  background: #6040c0;
  color: #fff;
  padding: 1px 6px;
  border-radius: 999px;
}

.cw-sidebar-xp-next {
  font-size: 0.68rem;
  color: #94a3b8;
  font-weight: 600;
}

.cw-sidebar-xp-track {
  height: 5px;
  border-radius: 999px;
  background: rgba(96,64,192,0.15);
  overflow: hidden;
}

.cw-sidebar-xp-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #a78bfa 0%, #6040c0 100%);
  transition: width 0.4s ease;
}

/* ── Badges ── */
.cw-sidebar-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.cw-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.cw-badge-earned {
  background: linear-gradient(135deg, #fef9c3 0%, #fde68a 100%);
  color: #713f12;
  border: 1px solid rgba(113,63,18,0.2);
}

/* ── Dashboard bento card meta ── */
.bento-card-cw-meta {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.bento-card-cw-prog {
  font-size: 0.8rem;
  font-weight: 700;
  color: #3a2a6a;
  opacity: 0.85;
}

.bento-card-cw-streak {
  font-size: 0.75rem;
  font-weight: 700;
  color: #7c3aed;
}

.bento-card-cw-lastplayed {
  font-size: 0.7rem;
  color: #5b4a8a;
  opacity: 0.75;
}

/* ── Course bento card progress rows ── */
.bento-course-prog {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
  z-index: 1;
  width: 42%;
}

.bcp-row {
  display: flex;
  align-items: baseline;
  gap: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: #3a2a6a;
  opacity: 0.85;
  transition: color 0.25s ease;
}

.bcp-label {
  font-style: italic;
  white-space: nowrap;
}

.bcp-dots {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0.5;
  padding: 0 2px;
}

.bcp-dots::after {
  content: "..................................................";
}

.bcp-pct {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: right;
}

.bento-card-basecamp:hover .bcp-row {
  color: #252550;
  opacity: 1;
}

/* ── In-progress filter button accent ── */
.cw-filter-btn-inprogress {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cw-filter-btn-inprogress .material-symbols-outlined {
  font-size: 0.9rem;
}


/* ── Daily challenge banner on crossword list page ── */
.cw-daily-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
  border: 1.5px solid rgba(109, 40, 217, 0.25);
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: 0 2px 8px rgba(109, 40, 217, 0.1);
}

.cw-daily-banner.cw-daily-banner-done {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.12);
}

.cw-daily-banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.cw-daily-banner-icon {
  font-size: 1.8rem;
  line-height: 1;
  flex-shrink: 0;
}

.cw-daily-banner-info {
  min-width: 0;
}

.cw-daily-banner-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #4c1d95;
  line-height: 1.2;
}

.cw-daily-banner-done .cw-daily-banner-title {
  color: #065f46;
}

.cw-daily-banner-sub {
  font-size: 0.78rem;
  color: #5b21b6;
  margin-top: 2px;
  font-weight: 600;
}

.cw-daily-banner-done .cw-daily-banner-sub {
  color: #047857;
}

.cw-daily-banner-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #7c3aed;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}

.cw-daily-banner-btn:hover {
  background: #6d28d9;
}

.cw-daily-banner-btn-done {
  background: #10b981;
}

.cw-daily-banner-btn-done:hover {
  background: #059669;
}

.cw-daily-banner-btn .material-symbols-outlined {
  font-size: 1rem;
  vertical-align: middle;
}

@media (max-width: 600px) {
  .cw-daily-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .cw-daily-banner-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 768px), (max-height: 520px) and (orientation: landscape) and (max-width: 1024px) {
  .mobile-app-hero,
  .mobile-stats-section {
    display: block;
  }

  .mobile-app-hero {
    max-width: 430px;
    margin: 0 auto 14px;
    padding: 18px 10px 14px;
    text-align: center;
    color: #14365a;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .mobile-app-kicker {
    margin-bottom: 6px;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #1E9D8E;
  }

  .mobile-app-hero h1 {
    margin: 0;
    font-size: clamp(1.65rem, 8vw, 2.4rem);
    line-height: 1;
    font-weight: 900;
  }

  .mobile-app-hero p {
    margin: 8px auto 0;
    max-width: 280px;
    color: #537086;
    font-size: 0.92rem;
  }

  .mobile-app-pill-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 16px;
  }

  .mobile-app-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: #2D2E5F;
    font-size: 0.78rem;
    font-weight: 800;
    box-shadow: 0 1px 8px rgba(45, 46, 95, 0.05);
    backdrop-filter: blur(10px);
  }

  .mobile-app-pill .material-symbols-outlined {
    font-size: 1rem;
  }

  .mobile-app-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    max-width: 400px;
    margin: 0 auto;
  }

  .mobile-app-actions button,
  .mobile-stats-actions button,
  .mobile-section-heading button {
    border: 0;
    font-family: inherit;
    cursor: pointer;
  }

  .mobile-app-actions button {
    display: flex;
    min-width: 0;
    min-height: 76px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 6px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.82);
    color: #2D2E5F;
    font-size: 0.72rem;
    font-weight: 900;
    box-shadow: 0 4px 0 rgba(215, 230, 239, 0.78), 0 8px 18px rgba(45, 46, 95, 0.05);
    backdrop-filter: blur(12px);
  }

  .mobile-app-actions .material-symbols-outlined {
    font-size: 1.55rem;
    color: #1E9D8E;
  }

  .bento-center-wrapper {
    max-width: 430px;
    margin: 0 auto;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }

  .bento-grid {
    gap: 10px;
  }

  .bento-learning-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .bento-progress-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .bento-progress-row > .bento-card:only-child {
    grid-column: 1 / -1;
  }

  .bento-card {
    min-width: 0;
    min-height: 70px !important;
    padding: 12px 10px;
    border-radius: 20px;
    box-shadow: 0 4px 0 rgba(45, 46, 95, 0.10);
  }

  .bento-card:hover {
    transform: none;
    box-shadow: 0 4px 0 rgba(45, 46, 95, 0.10);
  }

  .bento-card::before,
  .bento-card::after,
  .bento-hover-overlay,
  .bento-card-desc,
  .bento-card-extra,
  .bento-card-hover-info,
  .bento-card-cw-meta,
  .bento-course-prog {
    display: none !important;
  }

  .bento-card-inner {
    display: flex;
    width: 100%;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .bento-card-title {
    width: 100%;
    font-size: 0.82rem;
    line-height: 1.05;
    overflow-wrap: anywhere;
  }

  .mobile-stats-section {
    max-width: 430px;
    margin: 16px auto 0;
    padding: 18px 6px 12px;
    border-radius: 0;
    box-shadow: none;
  }

  .mobile-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
  }

  .mobile-section-heading span {
    display: block;
    color: #1E9D8E;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.12em;
  }

  .mobile-section-heading h2 {
    margin: 2px 0 0;
    color: #2D2E5F;
    font-size: 1.3rem;
    line-height: 1.05;
  }

  .mobile-section-heading button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 999px;
    background: #eef7ff;
    color: #2D2E5F;
    font-size: 0.78rem;
    font-weight: 900;
    white-space: nowrap;
  }

  .mobile-section-heading .material-symbols-outlined {
    font-size: 1rem;
  }

  .mobile-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .mobile-stat-card {
    min-width: 0;
    padding: 13px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.66);
    border: 1px solid rgba(255,255,255,0.62);
    box-shadow: 0 8px 18px rgba(45, 46, 95, 0.05);
    backdrop-filter: blur(12px);
  }

  .mobile-stat-card span,
  .mobile-stat-card small {
    display: block;
    color: #60748a;
    font-size: 0.72rem;
    font-weight: 800;
  }

  .mobile-stat-card strong {
    display: block;
    margin: 4px 0 2px;
    color: #2D2E5F;
    font-size: 1.55rem;
    line-height: 1;
  }

  .mobile-stats-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
  }

  .mobile-stats-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #2D2E5F, #1E9D8E);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 900;
  }

  .mobile-stats-actions .material-symbols-outlined {
    font-size: 1.1rem;
  }
}

@media (min-width: 769px) {
  .mobile-app-hero,
  .mobile-stats-section,
  .mobile-bottom-nav {
    display: none;
  }
}

@media (max-width: 360px) {
  .mobile-app-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px), (max-height: 520px) and (orientation: landscape) and (max-width: 1024px) {
  .bento-grid {
    padding-bottom: calc(56px + env(safe-area-inset-bottom));
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1200;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    max-width: none;
    margin: 0;
    padding: 4px 8px max(4px, env(safe-area-inset-bottom));
    border-radius: 0;
    border: none;
    border-top: 1px solid rgba(45, 46, 95, 0.1);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -6px 22px rgba(45, 46, 95, 0.12);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  .mobile-bottom-nav-btn {
    display: flex;
    min-width: 0;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1px;
    padding: 3px 2px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: #64748b;
    font: inherit;
    font-size: 0.56rem;
    font-weight: 800;
    cursor: pointer;
    letter-spacing: 0.02em;
  }

  .mobile-bottom-nav-btn .material-symbols-outlined {
    font-size: 1.12rem;
    line-height: 1;
  }

  .mobile-bottom-nav-btn.active,
  .mobile-bottom-level {
    background: #edf8ff;
    color: #2D2E5F;
  }

  .mobile-bottom-level strong {
    display: grid;
    width: 28px;
    height: 26px;
    place-items: center;
    border-radius: 10px;
    background: #2D2E5F;
    color: #fff;
    font-size: 0.72rem;
  }

  .mobile-bottom-nav-profile .material-symbols-outlined {
    font-size: 1.18rem;
  }

  .mobile-bottom-nav-avatar-wrap {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(45, 46, 95, 0.08);
    border: 1.5px solid rgba(45, 46, 95, 0.12);
  }

  .mobile-bottom-nav-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .mobile-bottom-nav-initials {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2D2E5F, #1E9D8E);
    color: #fff;
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    flex-shrink: 0;
  }

  .mobile-level-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .mobile-level-modal-card {
    position: relative;
    width: min(100%, 360px);
    padding: 24px 18px 18px;
    border-radius: 30px;
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(238,248,255,0.96));
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
    text-align: center;
  }

  .mobile-level-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: grid;
    width: 40px;
    height: 40px;
    min-height: 40px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(45, 46, 95, 0.08);
    color: #2D2E5F;
  }

  .mobile-level-modal-close .material-symbols-outlined {
    font-size: 1.1rem;
  }

  .mobile-level-modal-kicker {
    color: #1E9D8E;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }

  .mobile-level-modal-card h2 {
    margin: 6px 42px 16px;
    color: #2D2E5F;
    font-size: 1.28rem;
    line-height: 1.1;
  }

  .mobile-level-modal-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .mobile-level-option {
    display: flex;
    min-width: 0;
    min-height: 104px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 1px solid rgba(45, 46, 95, 0.08);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.78);
    color: #4b6478;
    font: inherit;
    box-shadow: 0 6px 18px rgba(45, 46, 95, 0.06);
  }

  .mobile-level-option .material-symbols-outlined {
    color: #1E9D8E;
    font-size: 1.45rem;
  }

  .mobile-level-option strong {
    color: #2D2E5F;
    font-size: 1.25rem;
    font-weight: 900;
    line-height: 1;
  }

  .mobile-level-option small {
    font-size: 0.68rem;
    font-weight: 800;
  }

  .mobile-level-option.active {
    background: linear-gradient(135deg, #2D2E5F, #1E9D8E);
    color: #fff;
    border-color: transparent;
  }

  .mobile-level-option.active strong,
  .mobile-level-option.active .material-symbols-outlined {
    color: #fff;
  }

  .bento-grid[data-mobile-tab="home"] .mobile-learn-pane,
  .bento-grid[data-mobile-tab="learn"] .mobile-app-hero {
    display: none !important;
  }

  .mobile-learn-pane {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .bento-grid[data-mobile-tab="home"] .mobile-app-hero {
    min-height: calc(100dvh - 112px);
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .bento-grid[data-mobile-tab="learn"] .mobile-learn-pane .bento-card {
    min-height: 0px !important;
    padding: 14px;
  }

  .bento-grid[data-mobile-tab="learn"] .bento-card-inner {
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
    position: relative;
    z-index: 1;
  }

  .bento-grid[data-mobile-tab="learn"] .bento-card-title {
    max-width: 72%;
    font-size: 0.84rem;
    overflow-wrap: normal;
    word-break: normal;
  }

  .bento-grid[data-mobile-tab="learn"] .bento-card::after {
    display: block !important;
    opacity: 0.9 !important;
    transform: none !important;
    width: 96px !important;
    height: 96px !important;
    right: -10px !important;
    bottom: -20px !important;
    top: auto !important;
    background-position: bottom right !important;
  }

  .bento-grid[data-mobile-tab="learn"] .bento-card::before {
    display: block !important;
  }

  .bento-grid[data-mobile-tab="learn"] .bento-card-weakspot,
  .bento-grid[data-mobile-tab="learn"] .bento-card-checkpoint {
    min-height: 52px !important;
    padding: 8px 10px;
    border-radius: 16px;
  }

  .bento-grid[data-mobile-tab="learn"] .bento-card-weakspot .bento-card-inner,
  .bento-grid[data-mobile-tab="learn"] .bento-card-checkpoint .bento-card-inner {
    display: block;
    min-height: 34px;
    text-align: left;
  }

  .bento-grid[data-mobile-tab="learn"] .bento-card-weakspot .bento-card-desc,
  .bento-grid[data-mobile-tab="learn"] .bento-card-checkpoint .bento-card-desc {
    display: block !important;
    max-width: 68%;
    margin-top: 2px;
    font-size: 0.66rem;
    line-height: 1.15;
    opacity: 0.72;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .bento-grid[data-mobile-tab="learn"] .bento-card-weakspot::after,
  .bento-grid[data-mobile-tab="learn"] .bento-card-checkpoint::after {
    width: 58px !important;
    height: 58px !important;
    bottom: -12px !important;
  }

  .bento-streak-modal {
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    padding: 24px 18px 18px;
  }

  .bento-streak-modal-count {
    font-size: 3rem;
  }

  .bento-streak-modal-status {
    font-size: 1.08rem;
    padding: 14px 16px;
    width: calc(100% - 8px);
    max-width: 100%;
    box-sizing: border-box;
  }

  .bento-streak-status-emoji {
    font-size: 2rem;
  }

  .bento-streak-modal-stats {
    gap: 6px;
  }

  .bento-cal-grid {
    gap: 4px;
  }
}
