/* ==========================================================================
   BEElio Kid Bento Exam Hub (kid-exam-hub.css)
   - Sảnh Chọn Môn Hình To (Kid Bento Grid) + Đề Gợi Ý Hôm Nay Cho Bé
   - Chế Độ Danh Sách Theo Môn Tối Giản (1 Thanh Gạt 3 Chế Độ Trẻ Em)
   - Ngăn Kéo Tùy Chọn & Bộ Lọc Nâng Cao Cho Bố Mẹ (Bottom Sheet / Modal)
   - Tương thích Light / Sepia / Dark & Mobile 320px -> Desktop
   ========================================================================== */

.kid-exam-hub-shell {
  padding-top: 10px;
  padding-bottom: 28px;
}

.kid-exam-hub-shell .keh-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* 1. THANH ĐẦU TRANG CHÀO BÉ + NÚT TIỆN ÍCH GỌN NHẸ */
.keh-topbar,
.keh-list-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.keh-greeting-group {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  flex: 1 1 auto;
}

.keh-mascot-mini {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  object-fit: contain;
  filter: drop-shadow(0 3px 6px rgba(246, 185, 26, 0.32));
}

.keh-greeting-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.keh-eyebrow {
  font-size: 12px;
  font-weight: 700;
  color: var(--beelio-text-muted, #5D6B80);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.keh-heading {
  margin: 0;
  font-family: var(--beelio-font-rounded, "Nunito", "Be Vietnam Pro", sans-serif);
  font-size: 19px;
  font-weight: 800;
  color: var(--beelio-text, #24324A);
  line-height: 1.22;
  letter-spacing: -0.01em;
}

.keh-utility-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.keh-icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 13px;
  border: 1.5px solid var(--beelio-border, #D9E2EC);
  background: var(--beelio-surface, #FFFFFF);
  color: var(--beelio-text, #24324A);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 2px 0 rgba(36, 50, 74, 0.06);
  transition: transform 0.14s ease, border-color 0.14s ease, background-color 0.14s ease;
}

.keh-icon-btn:hover {
  border-color: #94A3B8;
  transform: translateY(-1px);
}

.keh-icon-btn:active {
  transform: translateY(1px);
}

.keh-icon-btn.is-active,
.keh-icon-btn.has-filters {
  border-color: var(--beelio-blue, #2563EB);
  background: #EFF6FF;
  color: #1D4ED8;
}

.keh-gear-svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.keh-filter-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #2563EB;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--beelio-paper, #FFF9EE);
  box-sizing: border-box;
}

/* 2. Ô TÌM KIẾM BẬT/TẮT GỌN GÀNG */
.keh-search-bar-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--beelio-surface, #FFFFFF);
  border: 1.5px solid #93C5FD;
  border-radius: 14px;
  padding: 0 10px 0 12px;
  min-height: 44px;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.08);
}

.keh-search-leading {
  color: #2563EB;
  display: inline-flex;
  align-items: center;
  margin-right: 8px;
  flex: 0 0 auto;
}

.keh-search-input {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--beelio-text, #24324A);
  padding: 9px 4px;
}

.keh-search-input::placeholder {
  color: #94A3B8;
  font-weight: 500;
}

.keh-search-close-btn {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: none;
  background: #F1F5F9;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
}

.keh-search-close-btn:hover {
  background: #E2E8F0;
  color: #0F172A;
}

/* 3. LƯỚI THẺ MÔN HỌC NỀN TRẮNG TRUNG TÍNH DỊU MẮT (CALM NEUTRAL CARDS) */
.keh-bento-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

@media (min-width: 641px) and (max-width: 959px) {
  .keh-bento-grid[data-subj-count="4"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .keh-bento-grid[data-subj-count="4"] {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1120px) {
  .keh-bento-grid[data-subj-count="5"] {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.keh-bento-card {
  --keh-icon-bg: #F8FAFC;
  --keh-icon-border: #EEF2F6;

  appearance: none;
  border: 1px solid var(--beelio-border, #E2E8F0);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  background: var(--beelio-surface, #FFFFFF);
  border-radius: 16px;
  padding: 13px 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  min-width: 0;
  min-height: 72px;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.keh-bento-card:hover {
  transform: translateY(-1px);
  border-color: #CBD5E1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.keh-bento-card:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

/* Điểm nhấn nền rất nhạt riêng trong ô icon nhỏ; toàn bộ thân thẻ & chữ giữ trắng - xám trung tính */
.keh-bento-card.keh-subj-math {
  --keh-icon-bg: #F6F9FE;
  --keh-icon-border: #E8EFFA;
}

.keh-bento-card.keh-subj-vietnamese {
  --keh-icon-bg: #FCF7F8;
  --keh-icon-border: #F5EBEF;
}

.keh-bento-card.keh-subj-english {
  --keh-icon-bg: #F5FAF8;
  --keh-icon-border: #E6F2ED;
}

.keh-bento-card.keh-subj-tnxh {
  --keh-icon-bg: #F6FAF7;
  --keh-icon-border: #E7F2EA;
}

.keh-bento-card.keh-subj-science {
  --keh-icon-bg: #F6FAFA;
  --keh-icon-border: #E6F1F2;
}

.keh-bento-card.keh-subj-history-geo {
  --keh-icon-bg: #FBF9F4;
  --keh-icon-border: #F2ECE0;
}

.keh-bento-card.keh-subj-informatics {
  --keh-icon-bg: #F8F7FC;
  --keh-icon-border: #ECEAF6;
}

.keh-bento-icon-wrap {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 12px;
  background: var(--keh-icon-bg);
  border: 1px solid var(--keh-icon-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.keh-bento-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.keh-bento-title {
  font-family: var(--beelio-font-rounded, "Nunito", "Be Vietnam Pro", sans-serif);
  font-size: 15.5px;
  font-weight: 700;
  color: var(--beelio-text, #1E293B);
  line-height: 1.25;
  overflow-wrap: break-word;
}

.keh-bento-cta-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--beelio-text-muted, #64748B);
  line-height: 1.3;
}

.keh-bento-chevron {
  font-size: 15px;
  font-weight: 600;
  color: #94A3B8;
  line-height: 1;
  flex: 0 0 auto;
}

.keh-bento-progress {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.keh-bento-done-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--beelio-text-muted, #475569);
  line-height: 1.2;
}

.keh-bento-bar {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: #F1F5F9;
  overflow: hidden;
}

.keh-bento-bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #3B82F6;
}

/* 4. KHU VỰC ĐỀ GỢI Ý HÔM NAY CHO BÉ */
.keh-daily-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 2px;
}

.keh-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.keh-section-title-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.keh-sparkle-badge {
  font-size: 18px;
  line-height: 1;
}

.keh-section-title {
  margin: 0;
  font-family: var(--beelio-font-rounded, "Nunito", "Be Vietnam Pro", sans-serif);
  font-size: 16.5px;
  font-weight: 800;
  color: var(--beelio-text, #24324A);
  line-height: 1.25;
}

.keh-view-all-link {
  border: 1px solid var(--beelio-border, #E2E8F0);
  background: var(--beelio-surface, #FFFFFF);
  color: #334155;
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  flex: 0 0 auto;
}

.keh-view-all-link:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
}

/* 5. MÀN HÌNH 2: DANH SÁCH ĐỀ TRONG MÔN ĐÃ CHỌN */
.keh-back-bento-btn {
  border: 1.5px solid var(--beelio-border, #D9E2EC);
  background: var(--beelio-surface, #FFFFFF);
  color: var(--beelio-text, #24324A);
  border-radius: 13px;
  padding: 8px 12px;
  min-height: 40px;
  font-size: 13.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 2px 0 rgba(36, 50, 74, 0.06);
  flex: 0 0 auto;
  white-space: nowrap;
}

.keh-back-bento-btn:hover {
  background: #F8FAFC;
  border-color: #94A3B8;
}

.keh-list-title-pill {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.keh-list-title-icon {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.keh-list-heading {
  margin: 0;
  font-family: var(--beelio-font-rounded, "Nunito", "Be Vietnam Pro", sans-serif);
  font-size: 17px;
  font-weight: 800;
  color: var(--beelio-text, #24324A);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Thanh trượt ngang đổi nhanh môn học (1 dòng duy nhất, không bao giờ rớt hàng) */
.keh-subj-quick-strip {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  padding: 2px 2px 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.keh-subj-quick-strip::-webkit-scrollbar {
  display: none;
}

.keh-subj-mini-chip {
  flex: 0 0 auto;
  border: 1.5px solid var(--beelio-border, #D9E2EC);
  background: var(--beelio-surface, #FFFFFF);
  color: var(--beelio-text-muted, #475569);
  border-radius: 999px;
  padding: 6px 12px;
  min-height: 36px;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.keh-subj-mini-chip.active {
  background: #1E3A8A;
  border-color: #1E3A8A;
  color: #FFFFFF;
}

/* Thanh gạt 3 chế độ ngôn ngữ trẻ em (1 hàng cân đối) */
.keh-kid-mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  background: #EEF2F6;
  padding: 4px;
  border-radius: 15px;
}

.keh-mode-tab {
  border: none;
  background: transparent;
  color: #475569;
  border-radius: 11px;
  padding: 9px 6px;
  min-height: 40px;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.keh-mode-tab.active {
  background: #FFFFFF;
  color: #1E3A8A;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.1);
}

/* Dải nhắc gọn khi Bố Mẹ đang bật bộ lọc nâng cao */
.keh-parent-filter-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 12px;
  padding: 7px 11px;
}

.keh-pfn-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.keh-pfn-chip {
  font-size: 12px;
  font-weight: 700;
  color: #1E40AF;
  background: #FFFFFF;
  border: 1px solid #DBEAFE;
  padding: 3px 9px;
  border-radius: 999px;
}

.keh-pfn-reset-btn {
  border: none;
  background: transparent;
  color: #1D4ED8;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  padding: 3px 6px;
  white-space: nowrap;
}

.keh-pfn-reset-btn:hover {
  text-decoration: underline;
}

/* Trạng thái rỗng thân thiện */
.keh-empty-state {
  grid-column: 1 / -1;
  background: var(--beelio-surface, #FFFFFF);
  border: 1.5px dashed var(--beelio-border, #CBD5E1);
  border-radius: 20px;
  padding: 28px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.keh-empty-emoji {
  font-size: 36px;
  line-height: 1;
}

.keh-empty-title {
  margin: 0;
  font-size: 16.5px;
  font-weight: 800;
  color: var(--beelio-text, #24324A);
}

.keh-empty-desc {
  margin: 0;
  font-size: 13.5px;
  color: var(--beelio-text-muted, #64748B);
  max-width: 360px;
}

.keh-empty-reset-btn {
  margin-top: 6px;
  border: none;
  background: #2563EB;
  color: #FFFFFF;
  font-size: 13.5px;
  font-weight: 800;
  padding: 10px 18px;
  border-radius: 12px;
  cursor: pointer;
}

/* 6. NGĂN KÉO "TÙY CHỌN CHO BỐ MẸ" (BOTTOM SHEET / MODAL) */
.keh-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(2px);
  z-index: 2200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.keh-sheet-backdrop.hidden {
  display: none !important;
}

.keh-parent-sheet {
  width: 100%;
  max-width: 540px;
  max-height: min(86dvh, 680px);
  background: var(--beelio-surface, #FFFFFF);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -10px 32px rgba(15, 23, 42, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.keh-sheet-handle {
  width: 42px;
  height: 5px;
  border-radius: 999px;
  background: #CBD5E1;
  margin: 10px auto 2px;
  flex: 0 0 auto;
}

.keh-sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px 12px;
  border-bottom: 1px solid var(--beelio-border, #E2E8F0);
}

.keh-sheet-title {
  margin: 0;
  font-family: var(--beelio-font-rounded, "Nunito", "Be Vietnam Pro", sans-serif);
  font-size: 17px;
  font-weight: 800;
  color: var(--beelio-text, #24324A);
}

.keh-sheet-sub {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: var(--beelio-text-muted, #64748B);
  line-height: 1.35;
}

.keh-sheet-close {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: none;
  background: #F1F5F9;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
}

.keh-sheet-body {
  padding: 14px 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.keh-sheet-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.keh-sheet-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--beelio-text, #334155);
}

.keh-sheet-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.keh-sheet-pill {
  border: 1.5px solid var(--beelio-border, #CBD5E1);
  background: #F8FAFC;
  color: #334155;
  border-radius: 12px;
  padding: 8px 13px;
  min-height: 38px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.keh-sheet-pill.active {
  background: #1E40AF;
  border-color: #1E40AF;
  color: #FFFFFF;
}

.keh-sheet-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px 16px;
  border-top: 1px solid var(--beelio-border, #E2E8F0);
  background: var(--beelio-surface, #FFFFFF);
}

.keh-sheet-reset-btn {
  flex: 0 0 auto;
  border: 1.5px solid #CBD5E1;
  background: #FFFFFF;
  color: #475569;
  border-radius: 13px;
  padding: 10px 14px;
  min-height: 44px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}

.keh-sheet-apply-btn {
  flex: 1 1 auto;
  border: none;
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  color: #FFFFFF;
  border-radius: 13px;
  padding: 10px 16px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 0 #1E3A8A;
}

/* 7. ĐÁP ỨNG TRÊN MÀN HÌNH LỚN (TABLET / DESKTOP >= 700px) */
@media (min-width: 700px) {
  .keh-sheet-backdrop {
    align-items: center;
    padding: 20px;
  }

  .keh-parent-sheet {
    border-radius: 24px;
  }

  .keh-sheet-handle {
    display: none;
  }
}

/* 8. TỐI ƯU ĐIỆN THOẠI DỌC (<= 640px & MÀN HÌNH NHỎ 320px-380px) */
@media (max-width: 640px) {
  .kid-exam-hub-shell {
    padding-top: 8px;
    padding-bottom: 20px;
  }

  .kid-exam-hub-shell .keh-container {
    gap: 12px;
  }

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

  /* Khi khối lớp có số môn lẻ (Lớp 3 có 5 môn), ô thứ 5 trải ngang cân đối không để trống hốc */
  .keh-bento-grid.has-odd-count > .keh-bento-card:last-child {
    grid-column: 1 / -1;
  }

  .keh-bento-card {
    padding: 11px 10px 11px 11px;
    gap: 9px;
    border-radius: 16px;
    min-height: 70px;
  }

  .keh-bento-icon-wrap {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 11px;
  }

  .keh-bento-title {
    font-size: 14px;
    letter-spacing: -0.015em;
  }

  .keh-bento-cta-hint {
    font-size: 11.5px;
  }

  .keh-heading {
    font-size: 17.5px;
  }

  .keh-mascot-mini {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
  }

  .keh-list-heading {
    font-size: 15.5px;
  }
}

@media (max-width: 380px) {
  .keh-bento-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 11px;
    gap: 8px;
  }

  .keh-bento-body {
    width: 100%;
  }

  .keh-bento-title {
    font-size: 14.5px;
  }

  .keh-mode-tab {
    font-size: 12px;
    padding: 8px 4px;
  }

  .keh-back-bento-btn > span:last-child {
    font-size: 12.5px;
  }
}

/* 8b. THẺ ĐIỂM NHẤN ĐỀ CƯƠNG ÔN TẬP GIỮA KÌ 1 LỚP 4 */
.keh-study-guide-spotlight {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--beelio-surface, #FFFFFF);
  border: 1px solid var(--beelio-border, #E2E8F0);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.keh-sgs-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.keh-sgs-icon {
  font-size: 22px;
  line-height: 1;
  flex: 0 0 auto;
}

.keh-sgs-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.keh-sgs-eyebrow {
  font-size: 11px;
  font-weight: 700;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.keh-sgs-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--beelio-text, #1E293B);
  line-height: 1.3;
}

.keh-sgs-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.keh-sgs-btn-primary {
  padding: 8px 13px;
  border-radius: 10px;
  border: none;
  background: #1E3A8A;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.keh-sgs-btn-primary:hover {
  background: #1E40AF;
}

.keh-sgs-btn-print {
  padding: 8px 11px;
  border-radius: 10px;
  border: 1px solid var(--beelio-border, #E2E8F0);
  background: var(--beelio-surface, #FFFFFF);
  color: #334155;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.keh-sgs-btn-print:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
}

@media (max-width: 640px) {
  .keh-study-guide-spotlight {
    flex-direction: column;
    align-items: stretch;
  }

  .keh-sgs-actions {
    width: 100%;
  }

  .keh-sgs-btn-primary {
    flex: 1 1 auto;
  }
}

[data-theme="dark"] .keh-study-guide-spotlight {
  background: #1E293B;
  border-color: #334155;
}

[data-theme="dark"] .keh-sgs-eyebrow {
  color: #94A3B8;
}

[data-theme="dark"] .keh-sgs-title {
  color: #F8FAFC;
}

[data-theme="dark"] .keh-sgs-btn-print {
  background: #0F172A;
  border-color: #334155;
  color: #E2E8F0;
}

/* 8c. THẺ NHẮC BÀI KIỂM TRA ĐANG LÀM DỞ (CALM AUTO-SAVE RESUME BAR) */
.keh-draft-resume-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--beelio-surface, #FFFFFF);
  border: 1px solid var(--beelio-border, #E2E8F0);
  border-left: 3.5px solid #2563EB;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.keh-drb-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.keh-drb-icon {
  font-size: 21px;
  line-height: 1;
  flex: 0 0 auto;
}

.keh-drb-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.keh-drb-eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
  line-height: 1.3;
}

.keh-drb-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--beelio-text, #1E293B);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.keh-drb-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.keh-drb-btn-resume {
  padding: 8px 14px;
  border-radius: 10px;
  border: none;
  background: #1E3A8A;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.keh-drb-btn-resume:hover {
  background: #1E40AF;
}

.keh-drb-btn-discard {
  padding: 8px 11px;
  border-radius: 10px;
  border: 1px solid var(--beelio-border, #E2E8F0);
  background: var(--beelio-surface, #FFFFFF);
  color: #475569;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.keh-drb-btn-discard:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
  color: #1E293B;
}

@media (max-width: 640px) {
  .keh-draft-resume-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .keh-drb-title {
    white-space: normal;
  }

  .keh-drb-actions {
    width: 100%;
  }

  .keh-drb-btn-resume {
    flex: 1 1 auto;
  }
}

[data-theme="dark"] .keh-draft-resume-bar {
  background: #1E293B;
  border-color: #334155;
  border-left-color: #3B82F6;
}

[data-theme="dark"] .keh-drb-eyebrow {
  color: #94A3B8;
}

[data-theme="dark"] .keh-drb-title {
  color: #F8FAFC;
}

[data-theme="dark"] .keh-drb-btn-discard {
  background: #0F172A;
  border-color: #334155;
  color: #CBD5E1;
}

/* 9. HỖ TRỢ GIAO DIỆN TỐI (DARK MODE) & SEPIA */
[data-theme="dark"] .keh-bento-card {
  background: #1E293B;
  border-color: #334155;
  --keh-icon-bg: rgba(15, 23, 42, 0.65);
  --keh-icon-border: #334155;
}

[data-theme="dark"] .keh-bento-title {
  color: #F8FAFC;
}

[data-theme="dark"] .keh-bento-cta-hint,
[data-theme="dark"] .keh-bento-done-badge {
  color: #94A3B8;
}

[data-theme="dark"] .keh-bento-bar {
  background: #0F172A;
}

[data-theme="dark"] .keh-view-all-link {
  background: #1E293B;
  border-color: #334155;
  color: #E2E8F0;
}

[data-theme="dark"] .keh-kid-mode-tabs {
  background: #1B2533;
}

[data-theme="dark"] .keh-mode-tab {
  color: #CBD5E1;
}

[data-theme="dark"] .keh-mode-tab.active {
  background: #2563EB;
  color: #FFFFFF;
}

[data-theme="dark"] .keh-parent-filter-notice {
  background: #1E293B;
  border-color: #334155;
}

[data-theme="dark"] .keh-pfn-chip,
[data-theme="dark"] .keh-sheet-pill:not(.active),
[data-theme="dark"] .keh-sheet-reset-btn {
  background: #0F172A;
  border-color: #334155;
  color: #E2E8F0;
}

@media print {
  .keh-topbar,
  .keh-list-topbar,
  .keh-bento-section,
  .keh-kid-mode-tabs,
  .keh-subj-quick-strip,
  .keh-search-bar-wrap,
  .keh-parent-filter-notice,
  .keh-draft-resume-bar,
  .keh-sheet-backdrop {
    display: none !important;
  }
}
