/* ===== css/base/main.css ===== */

:root {
  --primary-coral: #FF5E7E;
  --primary-yellow: #FFD13B;
  --primary-blue: #3AA8F7;
  --primary-green: #38D39F;
  --primary-purple: #9D65FF;
  --primary-orange: #FF9F1C;
  --bg-gradient: linear-gradient(135deg, #FFF5EB 0%, #E8F7FF 50%, #F5F0FF 100%);
  
  --card-bg: rgba(255, 255, 255, 0.95);
  --card-shadow: 0 12px 30px rgba(78, 93, 140, 0.12);
  --clay-shadow: 0 8px 0px rgba(0, 0, 0, 0.1), 0 14px 20px rgba(0, 0, 0, 0.08);
  
  --font-display: 'Quicksand', 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Nunito', 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --text-dark: #2B2D42;
  --text-muted: #5A6270;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-weight: 600;
  background: var(--bg-gradient);
  color: var(--text-dark);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  letter-spacing: 0.01em;
}

/* Background floating decorative elements */
.bg-decorations {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.65);
  border-radius: 50px;
  filter: blur(1px);
  animation: floatCloud 25s linear infinite;
}

.cloud-1 { width: 140px; height: 45px; top: 12%; left: -150px; animation-duration: 32s; }
.cloud-2 { width: 180px; height: 55px; top: 38%; left: -200px; animation-duration: 28s; animation-delay: 5s; }
.cloud-3 { width: 120px; height: 40px; top: 75%; left: -140px; animation-duration: 36s; animation-delay: 12s; }

@keyframes floatCloud {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(100vw + 300px)); }
}

/* Header & Top Bar */
.top-navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 3px solid rgba(255, 214, 0, 0.3);
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (hover: hover) { .brand-logo:hover {
  transform: scale(1.04);
} }

.logo-badge {
  font-size: 2.2rem;
  animation: wiggle 3s ease-in-out infinite;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 800;
  background: linear-gradient(45deg, #FF5E7E, #FF9F1C, #9D65FF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.01em;
}

.user-stats-bar {
  display: flex;
  align-items: center;
  gap: 15px;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

.star-pill {
  background: #FFF9E6;
  border: 2px solid #FFD13B;
  color: #D48806;
}

.rank-pill {
  background: #EBF8FF;
  border: 2px solid #3AA8F7;
  color: #0066CC;
}

.mobile-sound-toggle-btn {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #FFF9E6;
  border: 2px solid #FFD13B;
  font-size: 1.15rem;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mobile-sound-toggle-btn:active {
  transform: scale(0.9);
}

@media (max-width: 768px) {
  .mobile-sound-toggle-btn {
    display: flex;
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-btn {
  background: white;
  border: 2px solid #E2E8F0;
  padding: 8px 16px;
  border-radius: 20px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

@media (hover: hover) { .header-btn:hover {
  background: #F8FAFC;
  transform: translateY(-2px);
  border-color: var(--primary-coral);
} }

.header-btn.active {
  background: #E8F5E9;
  border-color: #4CAF50;
  color: #2E7D32;
}

/* App Main Container */
.app-viewport {
  position: relative;
  z-index: 10;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

/* View switcher */
.app-view {
  display: none;
}

.app-view.active {
  display: block;
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ================= HOME VIEW - COMPACT MASCOT GREETING ================= */
.mascot-hero-section {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 6px auto 18px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 24px;
  padding: 8px 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  border: 2px solid #FDE68A;
  max-width: 680px;
  transition: all 0.2s ease;
}

@media (hover: hover) { .mascot-hero-section:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.12);
  border-color: #F59E0B;
} }

.mascot-container {
  cursor: pointer;
  position: relative;
  text-align: center;
  flex-shrink: 0;
}

.mascot-avatar {
  font-size: 2.2rem;
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

@media (hover: hover) { .mascot-avatar:hover {
  transform: scale(1.2) rotate(8deg);
} }

.mascot-bounce {
  animation: bounceJump 0.6s ease;
}

.mascot-bubble {
  position: relative;
  background: transparent;
  padding: 0;
  border: none;
  box-shadow: none;
  flex: 1;
  text-align: left;
}

.mascot-bubble::before {
  display: none;
}

.mascot-bubble h2 {
  font-family: var(--font-display);
  color: #D97706;
  font-size: 0.95rem;
  font-weight: 800;
  margin: 0 0 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mascot-bubble p {
  font-size: 0.86rem;
  color: #475569;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
}


/* ================= ADVENTURE MAP SUPER HERO BANNER ================= */
.adventure-hero-banner {
  background: linear-gradient(135deg, #FF9A8B 0%, #FF6A88 40%, #FF99AC 100%);
  border: 4px solid #FFF;
  border-radius: 32px;
  padding: 28px 32px;
  margin: 15px 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  cursor: pointer;
  box-shadow: 0 16px 36px rgba(255, 106, 136, 0.35);
  position: relative;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.25s;
}

@media (hover: hover) { .adventure-hero-banner:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 22px 46px rgba(255, 106, 136, 0.45);
} }

.adventure-banner-content {
  flex: 1;
  z-index: 2;
  color: white;
  text-align: left;
}

.adventure-banner-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  color: #FFF;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 900;
  padding: 5px 16px;
  border-radius: 20px;
  margin-bottom: 8px;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.adventure-banner-title {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 900;
  color: white;
  text-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
  margin-bottom: 6px;
}

.adventure-banner-desc {
  font-size: 1.05rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.4;
  margin-bottom: 16px;
  max-width: 600px;
}

.btn-start-adventure {
  background: #FFF;
  color: #E11D48;
  border: none;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 900;
  padding: 12px 28px;
  border-radius: 26px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

@media (hover: hover) { .btn-start-adventure:hover {
  transform: scale(1.06);
  background: #FFF1F2;
} }

.adventure-banner-art {
  position: relative;
  width: 160px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.adv-art-icon {
  position: absolute;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.15));
}

.adv-main {
  font-size: 6rem;
  z-index: 1;
  animation: floatSlow 3s infinite ease-in-out;
}

.adv-sub-1 {
  font-size: 2.8rem;
  top: 0;
  left: 0;
  animation: bounceSlow 2s infinite;
}

.adv-sub-2 {
  font-size: 2.8rem;
  bottom: 0;
  right: 0;
  animation: bounceSlow 2.4s infinite reverse;
}

.adv-sub-3 {
  font-size: 2.6rem;
  top: 10px;
  right: 10px;
  animation: pulse 1.8s infinite;
}

/* Category Grid / Adventure Cards */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 20px;
}

.category-card {
  background: white;
  border-radius: 28px;
  padding: 28px 22px;
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 4px solid white;
  box-shadow: var(--clay-shadow);
}

@media (hover: hover) { .category-card:hover {
  transform: translateY(-10px) scale(1.02);
} }

.card-adventure-map {
  background: linear-gradient(180deg, #FEF3C7 0%, #FFFFFF 100%);
  border-color: #F59E0B;
}

@media (hover: hover) { .card-adventure-map:hover {
  box-shadow: 0 16px 30px rgba(245, 158, 11, 0.35);
} }

.card-math {
  background: linear-gradient(180deg, #FFF3E6 0%, #FFFFFF 100%);
  border-color: #FFB347;
}

@media (hover: hover) { .card-math:hover {
  box-shadow: 0 16px 30px rgba(255, 159, 28, 0.3);
} }

.card-vietnamese {
  background: linear-gradient(180deg, #FFEBF2 0%, #FFFFFF 100%);
  border-color: #FF70A6;
}

@media (hover: hover) { .card-vietnamese:hover {
  box-shadow: 0 16px 30px rgba(255, 94, 126, 0.3);
} }

.card-english {
  background: linear-gradient(180deg, #E0F2FE 0%, #FFFFFF 100%);
  border-color: #38BDF8;
}

@media (hover: hover) { .card-english:hover {
  box-shadow: 0 16px 30px rgba(56, 189, 248, 0.35);
} }

.card-brain {
  background: linear-gradient(180deg, #EBF5FF 0%, #FFFFFF 100%);
  border-color: #4EA8DE;
}

@media (hover: hover) { .card-brain:hover {
  box-shadow: 0 16px 30px rgba(58, 168, 247, 0.3);
} }

.card-stickers {
  background: linear-gradient(180deg, #F3E8FF 0%, #FFFFFF 100%);
  border-color: #B5838D;
}

@media (hover: hover) { .card-stickers:hover {
  box-shadow: 0 16px 30px rgba(157, 101, 255, 0.3);
} }

.card-art {
  background: linear-gradient(180deg, #FFF0F9 0%, #FFFFFF 100%);
  border-color: #FF9FF3;
}

@media (hover: hover) { .card-art:hover {
  box-shadow: 0 16px 30px rgba(255, 159, 243, 0.4);
} }

.cat-icon-wrap {
  width: 90px;
  height: 90px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  background: white;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

.cat-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.card-math .cat-title { color: #E85D04; }
.card-vietnamese .cat-title { color: #D90429; }
.card-brain .cat-title { color: #0077B6; }
.card-art .cat-title { color: #8C14FC; }
.card-stickers .cat-title { color: #7209B7; }

.cat-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 18px;
}

.cat-badge {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.95rem;
  font-weight: 700;
  background: #FFF;
  border: 2px solid currentColor;
}

.card-math .cat-badge { color: #E85D04; }
.card-vietnamese .cat-badge { color: #D90429; }
.card-brain .cat-badge { color: #0077B6; }
.card-art .cat-badge { color: #8C14FC; }
.card-stickers .cat-badge { color: #7209B7; }

/* Sub-views Navigation & Top Bar */
.view-top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  background: white;
  padding: 16px 24px;
  border-radius: 24px;
  box-shadow: var(--card-shadow);
}

.btn-back-home {
  background: #FFF0F5;
  color: var(--primary-coral);
  border: 2px solid #FFD1DC;
  padding: 10px 20px;
  border-radius: 25px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

@media (hover: hover) { .btn-back-home:hover {
  background: var(--primary-coral);
  color: white;
  transform: scale(1.05);
} }

.view-heading {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Mode sub-tabs */
.game-tabs-nav {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.tab-btn {
  background: white;
  border: 3px solid #E2E8F0;
  padding: 12px 20px;
  border-radius: 20px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1.05rem;
  color: #4A5568;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

@media (hover: hover) { .tab-btn:hover {
  transform: translateY(-3px);
  border-color: var(--primary-blue);
} }

.tab-btn.active {
  background: var(--primary-blue);
  color: white;
  border-color: var(--primary-blue);
  box-shadow: 0 8px 16px rgba(58, 168, 247, 0.35);
}

.vn-mode-btn.active {
  background: var(--primary-coral);
  border-color: var(--primary-coral);
  box-shadow: 0 8px 16px rgba(255, 94, 126, 0.35);
}

.brain-mode-btn.active {
  background: var(--primary-purple);
  border-color: var(--primary-purple);
  box-shadow: 0 8px 16px rgba(157, 101, 255, 0.35);
}

/* Base Modal Styling */
.modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.show {
  display: flex;
  animation: fadeIn 0.25s ease-out;
}

.modal-card {
  background: white;
  border-radius: 30px;
  padding: 35px 30px;
  max-width: 550px;
  width: 100%;
  text-align: center;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  border: 5px solid #FFE74C;
}

.modal-icon-big {
  font-size: 5rem;
  margin-bottom: 10px;
  animation: pulse 1s infinite alternate;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.modal-desc {
  font-size: 1.1rem;
  color: #4A5568;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 25px;
}

.modal-btn-confirm {
  background: linear-gradient(45deg, #38D39F, #20BF6B);
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: 25px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 6px 15px rgba(56, 211, 159, 0.4);
  transition: transform 0.2s ease;
}

@media (hover: hover) { .modal-btn-confirm:hover {
  transform: scale(1.06);
} }

.btn-danger {
  background: #FFF5F5;
  color: #E53E3E;
  border: 2px solid #FEB2B2;
  padding: 10px 22px;
  border-radius: 20px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  margin-top: 12px;
  transition: all 0.2s ease;
  display: inline-block;
}

@media (hover: hover) { .btn-danger:hover {
  background: #E53E3E;
  color: white;
  border-color: #C53030;
  transform: scale(1.03);
} }

.btn-danger.confirm-step {
  background: #E53E3E;
  color: white;
  border-color: #9B2C2C;
  animation: pulse 0.8s infinite alternate;
}

/* Animations */
@keyframes wiggle {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(4deg); }
}

@keyframes bounceJump {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

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

/* ================= HỒ SƠ BÉ & AVATAR PROFILE BADGE ================= */
.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  padding: 6px 14px 6px 8px;
  border-radius: 30px;
  border: 2px solid #E2E8F0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: all 0.2s ease;
}

@media (hover: hover) { .user-profile-badge:hover {
  transform: translateY(-2px);
  border-color: #3AA8F7;
  box-shadow: 0 6px 18px rgba(58, 168, 247, 0.2);
} }

.profile-avatar-wrapper {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
  border: 3px solid white;
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  overflow: hidden;
  object-fit: cover;
}

.profile-avatar-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.profile-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.profile-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: #1A202C;
  white-space: nowrap;
}

.profile-age-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: #718096;
}

.profile-edit-btn {
  background: #EDF2F7;
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s;
  color: #4A5568;
}

@media (hover: hover) { .user-profile-badge:hover .profile-edit-btn {
  background: #E2E8F0;
} }

/* KHUNG VIỀN STICKER CHO AVATAR */
.profile-avatar-wrapper.frame-glow {
  box-shadow: 0 0 0 3px #FFFFFF, 0 0 12px rgba(58, 168, 247, 0.7);
}

.profile-avatar-wrapper.frame-crown::before {
  content: '👑';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.2rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
  z-index: 2;
}

.profile-avatar-wrapper.frame-bunny::before {
  content: '🐰';
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.25rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
  z-index: 2;
}

.profile-avatar-wrapper.frame-cat::before {
  content: '🐱';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.2rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
  z-index: 2;
}

.profile-avatar-wrapper.frame-rainbow::before {
  content: '🌈';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.2rem;
  z-index: 2;
}

.profile-avatar-wrapper.frame-candy::after {
  content: '🍭';
  position: absolute;
  bottom: -6px;
  right: -8px;
  font-size: 1.15rem;
  z-index: 2;
}

/* ================= MODAL PROFILE ONBOARDING ================= */
.profile-modal-card {
  max-width: 600px;
  padding: 30px 28px;
  max-height: 90vh;
  overflow-y: auto;
  text-align: left;
}

.modal-header-badge {
  display: inline-block;
  background: #FEF3C7;
  color: #B45309;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: 20px;
  border: 1.5px solid #FDE68A;
  margin-bottom: 8px;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: #2D3748;
  margin-bottom: 8px;
}

.form-sublabel {
  font-size: 0.9rem;
  font-weight: 700;
  color: #718096;
  margin: 12px 0 8px;
}

.form-input {
  width: 100%;
  padding: 12px 18px;
  border-radius: 16px;
  border: 2px solid #CBD5E1;
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 700;
  color: #1A202C;
  outline: none;
  transition: all 0.2s;
  background: #F8FAFC;
}

.form-input:focus {
  border-color: #3AA8F7;
  background: white;
  box-shadow: 0 0 0 4px rgba(58, 168, 247, 0.15);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

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

.pill-choice {
  flex: 1;
  padding: 8px 12px;
  border-radius: 14px;
  border: 2px solid #E2E8F0;
  background: white;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  color: #4A5568;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
  white-space: nowrap;
}

@media (hover: hover) { .pill-choice:hover {
  border-color: #CBD5E0;
} }

.pill-choice.active {
  background: #EBF8FF;
  border-color: #3182CE;
  color: #2B6CB0;
  font-weight: 800;
  box-shadow: 0 3px 8px rgba(49, 130, 206, 0.2);
}

.avatar-creation-section {
  background: #F8FAFC;
  border: 2px solid #E2E8F0;
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 20px;
}

.avatar-live-preview-box {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 12px;
  background: white;
  padding: 12px 18px;
  border-radius: 18px;
  border: 2px dashed #CBD5E1;
}

.avatar-preview-wrapper {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid white;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.avatar-preview-wrapper.frame-glow {
  box-shadow: 0 0 0 4px #FFFFFF, 0 0 16px rgba(58, 168, 247, 0.8);
}

.avatar-preview-wrapper.frame-crown::before {
  content: '👑';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.8rem;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
  z-index: 2;
}

.avatar-preview-wrapper.frame-bunny::before {
  content: '🐰';
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.9rem;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
  z-index: 2;
}

.avatar-preview-wrapper.frame-cat::before {
  content: '🐱';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.8rem;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
  z-index: 2;
}

.avatar-preview-wrapper.frame-rainbow::before {
  content: '🌈';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.8rem;
  z-index: 2;
}

.avatar-preview-wrapper.frame-candy::after {
  content: '🍭';
  position: absolute;
  bottom: -8px;
  right: -10px;
  font-size: 1.7rem;
  z-index: 2;
}

.preview-avatar-content {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  overflow: hidden;
}

.preview-avatar-content img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.avatar-preview-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.preview-name-tag {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: #1A202C;
}

.btn-upload-avatar {
  background: linear-gradient(135deg, #3AA8F7, #0077B6);
  color: white;
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-block;
  width: fit-content;
  box-shadow: 0 3px 8px rgba(0, 119, 182, 0.3);
  transition: transform 0.15s;
}

@media (hover: hover) { .btn-upload-avatar:hover {
  transform: scale(1.04);
} }

.preset-avatars-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.preset-avatar-btn {
  background: white;
  border: 2px solid #CBD5E1;
  border-radius: 14px;
  font-size: 1.7rem;
  padding: 6px 0;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (hover: hover) { .preset-avatar-btn:hover {
  border-color: #3AA8F7;
  transform: scale(1.1);
} }

.preset-avatar-btn.active {
  background: #EBF8FF;
  border-color: #3182CE;
  box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.3);
  transform: scale(1.12);
}

.frame-selector-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.frame-choice-btn {
  background: white;
  border: 2px solid #CBD5E1;
  border-radius: 12px;
  padding: 8px 10px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  color: #2D3748;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
}

@media (hover: hover) { .frame-choice-btn:hover {
  border-color: #3AA8F7;
} }

.frame-choice-btn.active {
  background: #FFFBEB;
  border-color: #F59E0B;
  color: #B45309;
  font-weight: 800;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.3);
}

.btn-save-profile {
  width: 100%;
  padding: 16px;
  font-size: 1.25rem;
}

/* ================= MOBILE BOTTOM NAVIGATION BAR ================= */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 68px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 2px solid #E2E8F0;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.08);
  z-index: 100;
  align-items: center;
  justify-content: space-around;
  padding: 0 10px;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.b-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px 4px;
  border-radius: 16px;
  transition: all 0.15s ease;
}

.b-nav-icon {
  font-size: 1.55rem;
  transition: transform 0.2s;
  line-height: 1;
}

.b-nav-label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 800;
  color: #64748B;
  transition: color 0.15s;
}

.b-nav-item:active .b-nav-icon {
  transform: scale(1.2);
}

.b-nav-item.active {
  background: #EFF6FF;
}

.b-nav-item.active .b-nav-icon {
  transform: translateY(-2px) scale(1.1);
  filter: drop-shadow(0 4px 6px rgba(2, 132, 199, 0.25));
}

.b-nav-item.active .b-nav-label {
  color: #0284C7;
  font-weight: 900;
}

/* ================= RESPONSIVE MOBILE TỐI ƯU HÓA (TOUCH-FIRST) ================= */
@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex;
  }

  .app-viewport {
    padding-bottom: 86px;
  }

  .app-header {
    padding: 10px 14px;
  }

  .header-actions #btn-open-stickers,
  .header-actions #btn-open-parent {
    display: none; /* Đã có trên Bottom Nav Bar */
  }

  .adventure-hero-banner {
    flex-direction: column;
    padding: 22px 20px;
    text-align: center;
  }

  .adventure-banner-content {
    text-align: center;
  }

  .adventure-banner-title {
    font-size: 1.65rem;
  }

  .adventure-banner-desc {
    font-size: 0.95rem;
  }

  .adventure-banner-art {
    margin-top: 10px;
  }

  .mascot-hero-section {
    flex-direction: row;
    padding: 8px 16px;
    gap: 12px;
    margin: 6px auto 14px;
    text-align: left;
  }

  .mascot-bubble::before {
    display: none;
  }

  .categories-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .category-card {
    padding: 20px 16px;
  }

  .game-tabs-nav {
    display: flex;
    overflow-x: auto;
    padding-bottom: 8px;
    justify-content: flex-start;
    scrollbar-width: thin;
  }

  .tab-btn {
    flex: 0 0 auto;
    font-size: 0.9rem;
    padding: 10px 16px;
    min-height: 48px;
  }

  .game-opt-btn {
    min-height: 54px;
    font-size: 1.15rem;
  }
}




/* ===== css/games/games-math-vietnamese.css ===== */
/*
 * Sam Kido - Stylesheets Chi Tiết Cho Từng Trò Chơi Học Tập & Trí Não
 */

.game-card {
  background: white;
  border-radius: 32px;
  padding: 30px;
  box-shadow: var(--card-shadow);
  border: 4px solid #EBF4FF;
  position: relative;
}

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.game-badge {
  background: #FFF3CD;
  color: #856404;
  padding: 8px 18px;
  border-radius: 20px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid #FFEEBA;
}

.voice-btn {
  background: #E8F7FF;
  color: #0077B6;
  border: 2px solid #90E0EF;
  padding: 8px 16px;
  border-radius: 20px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

@media (hover: hover) { .voice-btn:hover {
  background: #0077B6;
  color: white;
  transform: scale(1.05);
} }

.game-question {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  color: #2D3748;
  margin-bottom: 20px;
  text-align: center;
  line-height: 1.4;
}

.section-instruction {
  font-size: 1.1rem;
  color: #4A5568;
  font-weight: 600;
  margin-bottom: 20px;
  text-align: center;
  line-height: 1.5;
}

.game-hint {
  text-align: center;
  font-size: 0.95rem;
  color: #718096;
  font-weight: 600;
  margin-top: 15px;
}

/* ================= 1. TOÁN HỌC: ĐẾM HÌNH & TÍNH TOÁN ================= */
.counting-box {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  background: #FFFDF0;
  border-radius: 24px;
  border: 3px dashed #FFE066;
  margin-bottom: 25px;
  min-height: 160px;
  align-items: center;
}

.count-item {
  position: relative;
  background: white;
  width: 70px;
  height: 70px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  border: 2px solid #E2E8F0;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (hover: hover) { .count-item:hover {
  transform: scale(1.15) rotate(5deg);
  border-color: #FFB703;
} }

.count-item.counted {
  background: #E8F5E9;
  border-color: #4CAF50;
  transform: scale(1.05);
}

.count-icon {
  font-size: 2.5rem;
}

.count-number-tag {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #FF5964;
  color: white;
  font-weight: 900;
  font-size: 0.9rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
}

/* SO SÁNH LỚN BÉ BẰNG */
.compare-arena {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  margin: 25px 0 35px;
  flex-wrap: wrap;
}

.compare-side {
  background: #F8FAFC;
  border: 3px solid #E2E8F0;
  border-radius: 24px;
  padding: 20px;
  min-width: 180px;
  text-align: center;
}

.compare-basket {
  min-height: 80px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 2rem;
  margin-bottom: 12px;
}

.compare-num-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: #3182CE;
}

.compare-middle-slot {
  width: 75px;
  height: 75px;
  border-radius: 20px;
  background: #FFF3CD;
  border: 3px dashed #FFD13B;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  color: #D97706;
}

/* PHÉP TÍNH CỘNG TRỪ */
.math-visual-equation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 20px 0 30px;
  flex-wrap: wrap;
}

.equation-part {
  background: #F0FFF4;
  border: 3px solid #9AE6B4;
  border-radius: 24px;
  padding: 16px 20px;
  text-align: center;
  min-width: 110px;
}

.part-icons {
  font-size: 1.6rem;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.part-num {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: #276749;
}

.equation-sign {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  color: #4A5568;
}

.question-part {
  background: #FFF5F5;
  border: 3px dashed #FEB2B2;
  color: #E53E3E;
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 90px;
  height: 90px;
}

/* ĐOÀN TÀU SỐ HỌC */
.train-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 25px 0 35px;
  overflow-x: auto;
  padding: 15px 10px;
}

.train-engine {
  font-size: 3.5rem;
  animation: trainBob 1.5s ease-in-out infinite;
}

.train-cars {
  display: flex;
  gap: 8px;
}

.train-car {
  background: #3AA8F7;
  color: white;
  border: 4px solid #0077B6;
  border-radius: 18px;
  width: 78px;
  height: 78px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  position: relative;
  box-shadow: 0 6px 0 #005F8A;
}

.train-cargo-icon {
  font-size: 1.4rem;
  line-height: 1;
  margin-bottom: 2px;
}

.train-car-val {
  font-size: 1.5rem;
  line-height: 1;
}

.train-car.missing-car {
  background: #FFF3CD;
  color: #D97706;
  border-color: #F59E0B;
  border-style: dashed;
  box-shadow: none;
}

@keyframes trainBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* PHƯƠNG ÁN LỰA CHỌN (OPTIONS GRID) */
.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 15px;
  max-width: 600px;
  margin: 0 auto;
}

.game-opt-btn {
  background: white;
  border: 3px solid #CBD5E0;
  border-radius: 24px;
  padding: 16px 20px;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: #2D3748;
  cursor: pointer;
  box-shadow: 0 6px 0 #A0AEC0;
  transition: all 0.15s ease;
}

@media (hover: hover) { .game-opt-btn:hover {
  transform: translateY(-4px);
  border-color: #3AA8F7;
  box-shadow: 0 10px 0 #3AA8F7;
} }

.game-opt-btn:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #A0AEC0;
}

.game-opt-btn.correct-answer {
  background: #48BB78 !important;
  color: white !important;
  border-color: #2F855A !important;
  box-shadow: 0 6px 0 #22543D !important;
}

.game-opt-btn.wrong-answer {
  background: #F56565 !important;
  color: white !important;
  border-color: #C53030 !important;
  box-shadow: 0 6px 0 #742A2A !important;
}

/* ================= 2. TIẾNG VIỆT ================= */
.alphabet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
  gap: 16px;
  max-height: 560px;
  overflow-y: auto;
  padding: 14px 10px;
}

.letter-card {
  background: linear-gradient(145deg, #ffffff, #fbfcfe);
  border: 3px solid #E2E8F0;
  border-radius: 22px;
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.04), 0 3px 0 #CBD5E0;
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

@media (hover: hover) { .letter-card:hover {
  transform: translateY(-7px) scale(1.06);
  border-color: #FF5E7E;
  box-shadow: 0 12px 24px rgba(255, 94, 126, 0.28), 0 4px 0 #FF5E7E;
} }

.letter-card:active {
  transform: translateY(2px) scale(0.98);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.letter-card.explored-done {
  border-color: #48BB78;
  background: linear-gradient(145deg, #F0FFF4, #FFFFFF);
}

.letter-card.explored-done::after {
  content: '⭐';
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 0.85rem;
}

.letter-main {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 900;
  color: #FF4757;
  line-height: 1;
  letter-spacing: -0.5px;
}

.letter-pair-sub {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: #4A5568;
}

.letter-explore-hint {
  font-size: 0.75rem;
  font-weight: 700;
  color: #718096;
  background: #EDF2F7;
  padding: 2px 8px;
  border-radius: 10px;
}

/* ================= MODAL KHÁM PHÁ CHỮ CÁI (LETTER EXPLORER) ================= */
.letter-explorer-card {
  max-width: 480px;
  width: 92%;
  background: #FFFFFF;
  border: 5px solid #FFCCD5;
  border-radius: 36px;
  padding: 28px 24px 22px;
  box-shadow: 0 20px 45px rgba(255, 94, 126, 0.25), 0 8px 0 #FF8FA3;
  position: relative;
  text-align: center;
  animation: popIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-close-icon {
  position: absolute;
  top: 14px;
  right: 16px;
  background: #FFF0F5;
  border: 2px solid #FFCCD5;
  color: #FF4757;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.2rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

@media (hover: hover) { .modal-close-icon:hover {
  transform: scale(1.15) rotate(90deg);
  background: #FF4757;
  color: white;
} }

.letter-modal-top {
  margin-bottom: 12px;
}

.letter-modal-glow {
  font-family: var(--font-display);
  font-size: 4.2rem;
  font-weight: 900;
  color: #FF3366;
  text-shadow: 0 4px 14px rgba(255, 51, 102, 0.3);
  line-height: 1;
  letter-spacing: 2px;
  animation: floatAnim 2.5s ease-in-out infinite;
}

.letter-pronounce-pill {
  display: inline-block;
  background: linear-gradient(135deg, #FFE3E8, #FFF0F5);
  border: 2px solid #FF8FA3;
  color: #D90429;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  padding: 4px 16px;
  border-radius: 20px;
  margin-top: 6px;
}

.letter-illustration-container {
  background: linear-gradient(180deg, #F8FAFC, #EDF2F7);
  border: 3px solid #E2E8F0;
  border-radius: 28px;
  padding: 20px 15px;
  margin: 14px 0 18px;
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.03);
}

.letter-big-emoji {
  font-size: 5.8rem;
  margin-bottom: 6px;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.12));
  animation: bounceSlow 2s infinite ease-in-out;
}

.letter-word-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 900;
  color: #2B2D42;
  margin-bottom: 4px;
}

.letter-word-title .highlight-letter {
  color: #FF3366;
  background: #FFE3E8;
  padding: 0 4px;
  border-radius: 8px;
}

.letter-word-desc {
  font-size: 1.05rem;
  font-weight: 700;
  color: #4A5568;
  line-height: 1.4;
  margin: 0;
}

.letter-modal-controls {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.btn-letter-act {
  border: none;
  padding: 12px 20px;
  border-radius: 22px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-letter-speak {
  background: linear-gradient(135deg, #3AA8F7, #0077B6);
  color: white;
  box-shadow: 0 5px 0 #005F8A;
}

@media (hover: hover) { .btn-letter-speak:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 0 #005F8A;
} }

.btn-letter-random {
  background: linear-gradient(135deg, #FFB703, #FB8500);
  color: white;
  box-shadow: 0 5px 0 #C46200;
}

@media (hover: hover) { .btn-letter-random:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 0 #C46200;
} }

.btn-letter-act:active {
  transform: translateY(3px);
  box-shadow: none;
}

.letter-modal-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.btn-nav-letter {
  background: #F7FAFC;
  border: 2px solid #CBD5E0;
  color: #4A5568;
  padding: 8px 18px;
  border-radius: 18px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

@media (hover: hover) { .btn-nav-letter:hover {
  background: #EDF2F7;
  border-color: #3AA8F7;
  color: #0077B6;
  transform: scale(1.04);
} }

.letter-reward-badge {
  margin-top: 12px;
  font-size: 0.95rem;
  font-weight: 800;
  color: #2F855A;
  min-height: 22px;
}

/* DẤU THANH */
.tones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.tone-card {
  background: #FFF5F7;
  border: 3px solid #FFCCD5;
  border-radius: 24px;
  padding: 22px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

@media (hover: hover) { .tone-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 20px rgba(255, 94, 126, 0.2);
} }

.tone-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: #D90429;
  font-weight: 800;
}

.tone-mark {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  color: #718096;
  margin: 6px 0;
}

.tone-example {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  color: #2B2D42;
  margin: 10px 0;
}

.tone-desc {
  font-size: 0.95rem;
  color: #4A5568;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.4;
}

.tone-play-btn {
  background: white;
  border: 2px solid #FF8FA3;
  color: #D90429;
  padding: 6px 14px;
  border-radius: 16px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

/* ĐOÁN TỪ & GHÉP CHỮ */
.quiz-visual-box {
  text-align: center;
  margin-bottom: 25px;
}

.quiz-big-icon {
  font-size: 5.5rem;
  margin-bottom: 10px;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.1));
}

.spelling-header {
  text-align: center;
  margin-bottom: 25px;
}

.spell-icon {
  font-size: 4rem;
  margin-bottom: 8px;
}

.assembled-word-box {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 25px 0;
}

.letter-slot {
  width: 65px;
  height: 65px;
  border-radius: 16px;
  background: #F7FAFC;
  border: 3px dashed #CBD5E0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: #2D3748;
}

.letter-slot.filled {
  background: #FFF3CD;
  border-color: #FFB703;
  border-style: solid;
  color: #D97706;
  animation: popIn 0.25s ease-out;
}

.letters-pool {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 25px;
}

.pool-letter-btn {
  background: white;
  border: 3px solid #3AA8F7;
  border-radius: 18px;
  width: 60px;
  height: 60px;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: #0077B6;
  cursor: pointer;
  box-shadow: 0 4px 0 #005F8A;
  transition: all 0.15s ease;
}

@media (hover: hover) { .pool-letter-btn:hover {
  transform: translateY(-3px);
} }

.pool-letter-btn.used {
  opacity: 0.25;
  cursor: not-allowed;
  transform: none;
}

.spelling-actions {
  display: flex;
  justify-content: center;
  margin-bottom: 15px;
}

.btn-clear-spell {
  background: #FFF5F5;
  color: #E53E3E;
  border: 2px solid #FEB2B2;
  padding: 8px 18px;
  border-radius: 20px;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
}

/* ================= BỘ CHỌN CẤP ĐỘ KHÓ 4 LEVEL TOÀN CỤC ================= */
.difficulty-level-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 18px;
  flex-wrap: wrap;
  padding: 8px 12px;
  background: #F8FAFC;
  border: 2px dashed #CBD5E0;
  border-radius: 24px;
  max-width: 680px;
}

.diff-bar-label {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: #4A5568;
  margin-right: 4px;
}

.diff-pill-btn {
  background: white;
  border: 2px solid #E2E8F0;
  color: #4A5568;
  padding: 6px 14px;
  border-radius: 16px;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

@media (hover: hover) { .diff-pill-btn:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.08);
} }

.diff-pill-btn.active.diff-easy {
  background: linear-gradient(135deg, #10AC84, #1DD1A1);
  border-color: #10AC84;
  color: white;
  box-shadow: 0 4px 12px rgba(29, 209, 161, 0.4);
}

.diff-pill-btn.active.diff-medium {
  background: linear-gradient(135deg, #3AA8F7, #0077B6);
  border-color: #0077B6;
  color: white;
  box-shadow: 0 4px 12px rgba(58, 168, 247, 0.4);
}

.diff-pill-btn.active.diff-hard {
  background: linear-gradient(135deg, #FB8500, #FF5964);
  border-color: #FF5964;
  color: white;
  box-shadow: 0 4px 12px rgba(255, 89, 100, 0.4);
}

.diff-pill-btn.active.diff-expert {
  background: linear-gradient(135deg, #8E44AD, #9B59B6);
  border-color: #8E44AD;
  color: white;
  box-shadow: 0 4px 12px rgba(155, 89, 182, 0.45);
  animation: pulse-expert 1.8s infinite;
}

@keyframes pulse-expert {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); box-shadow: 0 6px 18px rgba(155, 89, 182, 0.6); }
}

.diff-badge-star {
  background: rgba(255, 255, 255, 0.25);
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 0.78rem;
  margin-left: 2px;
}


/* ===== css/games/games-brain-arena.css ===== */
/* ================= 3. ĐẤU TRƯỜNG TRÍ NÃO ================= */
/* LẬT THẺ TRÍ NHỚ (MEMORY MATCH) */
.diff-selector {
  display: flex;
  gap: 8px;
}

.diff-btn {
  background: #EDF2F7;
  border: 2px solid #CBD5E0;
  padding: 6px 14px;
  border-radius: 16px;
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
}

.diff-btn.active {
  background: var(--primary-purple);
  border-color: var(--primary-purple);
  color: white;
}

.memory-grid {
  display: grid;
  gap: 14px;
  max-width: 680px;
  margin: 0 auto 20px;
  perspective: 1000px;
}

.grid-4 { grid-template-columns: repeat(2, 1fr); max-width: 300px; }
.grid-8 { grid-template-columns: repeat(4, 1fr); max-width: 580px; }
.grid-12 { grid-template-columns: repeat(4, 1fr); max-width: 640px; }
.grid-16 { grid-template-columns: repeat(4, 1fr); max-width: 700px; }
.grid-20 { grid-template-columns: repeat(5, 1fr); max-width: 780px; }
.grid-24 { grid-template-columns: repeat(6, 1fr); max-width: 860px; }

/* BỘ CHỌN CHẾ ĐỘ CHƠI: 1 BÉ VS ĐỐI KHÁNG BỐ MẸ */
.versus-mode-toggle-bar {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.btn-mode-toggle {
  background: white;
  border: 2.5px solid #E2E8F0;
  border-radius: 50px;
  padding: 10px 24px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: #475569;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (hover: hover) { .btn-mode-toggle:hover {
  transform: translateY(-3px);
  border-color: #a55eea;
  color: #8854d0;
} }

.btn-mode-toggle.active {
  background: linear-gradient(135deg, #a55eea, #8854d0);
  border-color: #8854d0;
  color: white;
  box-shadow: 0 6px 18px rgba(136, 84, 208, 0.35);
}

.versus-setup-box {
  background: linear-gradient(180deg, #F8FAFC, #F1F5F9);
  border: 3px solid #E2E8F0;
  border-radius: 24px;
  padding: 16px 18px;
  margin-bottom: 18px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
}

.opponent-picker-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.opp-label {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: #334155;
}

.btn-opp-select {
  padding: 6px 16px;
  background: white;
  border: 2px solid #CBD5E1;
  border-radius: 20px;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 800;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
}

@media (hover: hover) { .btn-opp-select:hover {
  border-color: #f43f5e;
  color: #e11d48;
} }

.btn-opp-select.active {
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  border-color: #e11d48;
  color: white;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.3);
}

/* BẢNG TỶ SỐ ĐỐI KHÁNG TRỰC TIẾP */
.versus-live-scoreboard {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 16px;
  margin-bottom: 12px;
}

.player-score-card {
  flex: 1;
  max-width: 260px;
  background: white;
  border: 3px solid #E2E8F0;
  border-radius: 20px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.p1-card {
  border-color: #93c5fd;
  background: #f0fdf4;
}

.p2-card {
  border-color: #fbcfe8;
  background: #fff1f2;
}

.player-score-card.active-turn {
  transform: scale(1.06);
  box-shadow: 0 0 0 4px #fbbf24, 0 8px 20px rgba(251, 191, 36, 0.4);
  border-color: #f59e0b;
}

.player-avatar-box {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  overflow: hidden;
  flex-shrink: 0;
}

.score-avatar-emoji {
  font-size: 1.8rem;
}

.score-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-meta {
  display: flex;
  flex-direction: column;
}

.player-name {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 800;
  color: #1e293b;
}

.player-pairs-count {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 900;
  color: #d97706;
}

.turn-indicator-badge {
  position: absolute;
  top: -10px;
  right: 12px;
  background: #f59e0b;
  color: white;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
  animation: bounceSlow 1.5s infinite;
}

.vs-center-divider {
  display: flex;
  align-items: center;
  justify-content: center;
}

.vs-badge {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 900;
  background: #e11d48;
  color: white;
  padding: 6px 12px;
  border-radius: 50px;
  box-shadow: 0 4px 10px rgba(225, 29, 72, 0.35);
}

.versus-turn-banner {
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: #1e293b;
  background: white;
  padding: 8px 16px;
  border-radius: 50px;
  border: 2px solid #CBD5E1;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.diff-pill-btn.diff-master {
  background: #EFF6FF;
  border-color: #BFDBFE;
  color: #1D4ED8;
}

.diff-pill-btn.diff-master.active {
  background: linear-gradient(135deg, #3B82F6, #1D4ED8);
  color: white;
  border-color: #1D4ED8;
}

.diff-pill-btn.diff-champ {
  background: #FAF5FF;
  border-color: #E9D5FF;
  color: #7E22CE;
}

.diff-pill-btn.diff-champ.active {
  background: linear-gradient(135deg, #9333EA, #7E22CE);
  color: white;
  border-color: #7E22CE;
}

/* ĐẤU TRÍ TỐC ĐỘ 2 NGƯỜI (PVP REFLEX) */
.pvp-question-container {
  background: linear-gradient(135deg, #FFFBEB, #FEF3C7);
  border: 3px solid #FCD34D;
  border-radius: 24px;
  padding: 16px 20px;
  text-align: center;
  margin-bottom: 18px;
  box-shadow: 0 6px 16px rgba(252, 211, 77, 0.25);
}

.pvp-question-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 900;
  color: #92400E;
  margin-bottom: 6px;
}

.pvp-question-visual {
  font-size: 1.8rem;
  letter-spacing: 4px;
  margin-top: 4px;
}

.pvp-battle-arena {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 16px;
}

.pvp-player-zone {
  background: white;
  border: 3px solid #E2E8F0;
  border-radius: 22px;
  padding: 14px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.pvp-zone-left {
  border-color: #93C5FD;
  background: #F8FAFC;
}

.pvp-zone-right {
  border-color: #FBCFE8;
  background: #FFF1F2;
}

.pvp-zone-header {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 900;
  color: #1E293B;
  margin-bottom: 12px;
  text-align: center;
}

.pvp-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-pvp-ans {
  padding: 14px 10px;
  border-radius: 18px;
  border: 3px solid #E2E8F0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.btn-ans-p1 {
  background: white;
  border-color: #60A5FA;
  color: #1D4ED8;
}

@media (hover: hover) { .btn-ans-p1:hover {
  background: #EFF6FF;
  transform: translateY(-3px) scale(1.03);
} }

.btn-ans-p2 {
  background: white;
  border-color: #F472B6;
  color: #BE185D;
}

@media (hover: hover) { .btn-ans-p2:hover {
  background: #FDF2F8;
  transform: translateY(-3px) scale(1.03);
} }

.btn-pvp-ans.pvp-correct {
  background: #22C55E !important;
  border-color: #16A34A !important;
  color: white !important;
  transform: scale(1.08) !important;
  box-shadow: 0 0 0 4px #86EFAC !important;
}

.btn-pvp-ans.pvp-wrong {
  background: #EF4444 !important;
  border-color: #DC2626 !important;
  color: white !important;
}

.pvp-freeze {
  opacity: 0.45;
  pointer-events: none;
}

/* CỜ CARO NHÍ TRÍ TUỆ (TIC-TAC-TOE KIDS) */
.caro-setup-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.caro-board-container {
  display: grid;
  gap: 8px;
  margin: 16px auto;
  background: #F8FAFC;
  border: 4px solid #CBD5E1;
  border-radius: 24px;
  padding: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.caro-board-container.size-3 {
  grid-template-columns: repeat(3, 1fr);
  max-width: 320px;
}

.caro-board-container.size-5 {
  grid-template-columns: repeat(5, 1fr);
  max-width: 440px;
}

.caro-cell {
  aspect-ratio: 1;
  background: white;
  border: 3px solid #E2E8F0;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 3px 8px rgba(0,0,0,0.05);
}

@media (hover: hover) { .caro-cell:hover:not(.filled) {
  background: #F0FDF4;
  border-color: #86EFAC;
  transform: scale(1.05);
} }

.caro-cell.filled {
  cursor: default;
}

.caro-cell-symbol {
  font-size: 2.2rem;
  animation: bounceSlow 0.4s ease;
}

.caro-board-container.size-5 .caro-cell-symbol {
  font-size: 1.6rem;
}

.caro-cell.winning-cell {
  background: #FEF08A !important;
  border-color: #EAB308 !important;
  box-shadow: 0 0 0 4px #FACC15, 0 6px 16px rgba(234, 179, 8, 0.4) !important;
  animation: pulse 1s infinite alternate;
}

.memory-card {
  height: 110px;
  cursor: pointer;
  perspective: 1000px;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-style: preserve-3d;
}

.memory-card.flipped .card-inner,
.memory-card.matched .card-inner {
  transform: rotateY(180deg);
}

.card-front, .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

.card-front {
  background: linear-gradient(135deg, #9D65FF, #7B2CBF);
  color: white;
  font-size: 2.2rem;
  border: 3px solid #C77DFF;
}

.card-back {
  background: white;
  border: 3px solid #9D65FF;
  transform: rotateY(180deg);
}

.card-back .card-icon {
  font-size: 2.2rem;
}

.card-back .card-name {
  font-size: 0.85rem;
  font-weight: 800;
  color: #4A5568;
}

.memory-card.matched .card-back {
  background: #E8F5E9;
  border-color: #4CAF50;
  animation: pulse 0.6s ease;
}

/* TÌM BÓNG ĐỘNG VẬT */
.shadow-match-arena {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  max-width: 650px;
  margin: 0 auto 20px;
}

.shadow-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.col-title {
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: #4A5568;
  margin-bottom: 6px;
}

.shadow-card {
  background: white;
  border: 3px solid #E2E8F0;
  border-radius: 20px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.04);
}

@media (hover: hover) { .shadow-card:hover {
  transform: scale(1.03);
  border-color: #3AA8F7;
} }

.shadow-card.selected-source {
  border-color: #FF5E7E;
  background: #FFF0F5;
  transform: scale(1.04);
  box-shadow: 0 0 0 4px rgba(255, 94, 126, 0.3);
}

.shadow-card.matched-done {
  background: #E8F5E9;
  border-color: #4CAF50;
  pointer-events: none;
  opacity: 0.85;
}

.animal-icon {
  font-size: 2.2rem;
}

.silhouette-icon {
  filter: brightness(0) opacity(0.85);
}

.animal-name {
  font-weight: 800;
  font-size: 1.05rem;
  color: #2D3748;
}

.wrong-shake {
  animation: shake 0.5s ease;
}

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

/* ODD ONE OUT & PATTERN QUEST */
.odd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 16px;
  max-width: 650px;
  margin: 20px auto;
}

.odd-item-btn {
  background: white;
  border: 3px solid #E2E8F0;
  border-radius: 24px;
  padding: 20px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.06);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (hover: hover) { .odd-item-btn:hover {
  transform: translateY(-6px);
  border-color: var(--primary-purple);
} }

.odd-icon {
  font-size: 3rem;
}

.odd-label {
  font-weight: 800;
  font-size: 1rem;
  color: #4A5568;
}

.pattern-sequence-box {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 25px 0;
  flex-wrap: wrap;
}

.pattern-cell {
  width: 65px;
  height: 65px;
  border-radius: 18px;
  background: #F7FAFC;
  border: 3px solid #CBD5E0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.target-pattern-cell {
  background: #FFF3CD;
  border-color: #F59E0B;
  border-style: dashed;
  color: #D97706;
  font-weight: 800;
}


/* ===== css/games/games-sticker-parent.css ===== */
/* ================= 4. ALBUM STICKER & CÀI ĐẶT ================= */
.sticker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.sticker-item {
  background: white;
  border-radius: 24px;
  padding: 20px 14px;
  text-align: center;
  border: 3px solid #E2E8F0;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease;
}

.sticker-item.unlocked {
  border-color: #FFD13B;
  background: linear-gradient(180deg, #FFFDF0 0%, #FFFFFF 100%);
  cursor: pointer;
}

@media (hover: hover) { .sticker-item.unlocked:hover {
  transform: translateY(-6px) scale(1.04);
} }

.sticker-item.locked {
  opacity: 0.6;
  background: #F8FAFC;
}

.sticker-badge {
  font-size: 3.5rem;
  margin-bottom: 8px;
}

.sticker-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: #2D3748;
  margin-bottom: 4px;
}

.sticker-info {
  font-size: 0.8rem;
  color: #718096;
  font-weight: 700;
}

/* PHẢN HỒI (FEEDBACK MSG) */
.feedback-msg {
  display: none;
  margin-top: 20px;
  padding: 14px 20px;
  border-radius: 20px;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 800;
  animation: popIn 0.3s ease-out;
}

.feedback-msg.show {
  display: block;
}

.feedback-msg.success {
  background: #DEF7EC;
  color: #03543F;
  border: 2px solid #84E1BC;
}

.feedback-msg.error {
  background: #FDE8E8;
  color: #9B1C1C;
  border: 2px solid #F8B4B4;
}

/* Parent dashboard stats */
.parent-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin: 20px 0;
}

.p-stat-box {
  background: #F8FAFC;
  border: 2px solid #E2E8F0;
  border-radius: 18px;
  padding: 15px;
  text-align: center;
}

.p-stat-label {
  font-size: 0.9rem;
  color: #718096;
  font-weight: 700;
}

.p-stat-val {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: #2B6CB0;
  font-weight: 800;
  margin-top: 4px;
}

.btn-danger {
  background: #FFF5F5;
  color: #E53E3E;
  border: 2px solid #FEB2B2;
  padding: 10px 20px;
  border-radius: 20px;
  font-weight: 800;
  cursor: pointer;
  margin-top: 15px;
}

@media (hover: hover) { .btn-danger:hover {
  background: #E53E3E;
  color: white;
} }

@keyframes popIn {
  0% { transform: scale(0.7); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}


/* ===== css/games/games-shapes-life.css ===== */
/* ================= 5. ĐOÁN KHỐI HÌNH (SHAPES & 3D BLOCKS) ================= */
.shape-showcase-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 15px auto 25px;
  padding: 20px;
  background: radial-gradient(circle at center, #FFFFFF 0%, #F1F5F9 100%);
  border: 3px dashed #CBD5E1;
  border-radius: 28px;
  max-width: 460px;
  min-height: 220px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

.shape-svg-demo {
  width: 170px;
  height: 170px;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.12));
  transition: transform 0.3s ease;
}

@media (hover: hover) { .shape-showcase-box:hover .shape-svg-demo {
  transform: scale(1.05) rotate(2deg);
} }

.real-object-icon-box {
  font-size: 6.5rem;
  line-height: 1;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.15));
  animation: floatShape 3s ease-in-out infinite;
}

@keyframes floatShape {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.complex-model-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.model-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.block-unit {
  font-size: 3.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  background: white;
  border-radius: 16px;
  border: 2px solid #E2E8F0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s;
}

@media (hover: hover) { .block-unit:hover {
  transform: scale(1.1);
} }

.model-subtext {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: #475569;
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.85);
  padding: 4px 14px;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
}

/* ================= 6. TOÁN ĐỜI SỐNG (CLOCKS, MONEY & SCALES) ================= */
.clock-display-card,
.money-showcase-card,
.scale-showcase-card {
  background: linear-gradient(135deg, #F0F9FF, #E0F2FE);
  border: 3px solid #BAE6FD;
  border-radius: 28px;
  padding: 24px 20px;
  margin: 15px auto 25px;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(2, 132, 199, 0.12);
}

.analog-clock-svg {
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.15));
  transition: transform 0.3s ease;
}

@media (hover: hover) { .analog-clock-svg:hover {
  transform: scale(1.05);
} }

.money-bill-badge {
  background: linear-gradient(135deg, #10B981, #059669);
  color: white;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 900;
  padding: 8px 24px;
  border-radius: 30px;
  box-shadow: 0 6px 14px rgba(16, 185, 129, 0.3);
  margin-bottom: 16px;
}

.shopping-item-box {
  background: white;
  border: 2px dashed #0284C7;
  border-radius: 20px;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 800;
  color: #0369A1;
}

.shop-item-icon {
  font-size: 2.2rem;
}

.scale-showcase-card {
  flex-direction: row;
  gap: 20px;
  background: linear-gradient(135deg, #FEF3C7, #FDE68A);
  border-color: #FCD34D;
}

.scale-item {
  background: white;
  border: 2px solid #F59E0B;
  border-radius: 18px;
  padding: 10px 16px;
  font-size: 1.2rem;
  font-weight: 900;
  color: #92400E;
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.15);
}

.scale-icon {
  font-size: 3.2rem;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.12));
}

/* ================= 7. LUYỆN VIẾT CHỮ Ô LY TIỂU HỌC ================= */
.writing-arena-card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 32px;
  padding: 24px;
  box-shadow: 0 16px 40px rgba(124, 58, 237, 0.12);
  border: 4px solid #DDD6FE;
  max-width: 860px;
  margin: 0 auto;
}

.writing-cat-selector {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
}

.writing-cat-btn {
  background: #F1F5F9;
  border: 2px solid #CBD5E1;
  color: #475569;
  padding: 8px 18px;
  border-radius: 20px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
}

.writing-cat-btn.active {
  background: linear-gradient(135deg, #8B5CF6, #6D28D9);
  color: white;
  border-color: #5B21B6;
  box-shadow: 0 4px 12px rgba(109, 40, 217, 0.25);
}

.writing-char-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 4px 14px;
  margin-bottom: 20px;
  scrollbar-width: thin;
}

.char-scroll-btn {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  border: 2px solid #E2E8F0;
  background: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 900;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
}

@media (hover: hover) { .char-scroll-btn:hover {
  transform: translateY(-2px);
  border-color: #8B5CF6;
  color: #7C3AED;
} }

.char-scroll-btn.active {
  background: linear-gradient(135deg, #8B5CF6, #7C3AED);
  color: white;
  border-color: #6D28D9;
  transform: scale(1.08);
  box-shadow: 0 6px 14px rgba(124, 58, 237, 0.35);
}

.char-cap {
  font-size: 0.65rem;
  opacity: 0.8;
}

.writing-workspace {
  display: flex;
  gap: 24px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.canvas-oly-container {
  position: relative;
  width: 340px;
  height: 340px;
  background: #FFF;
  border: 4px solid #7C3AED;
  border-radius: 24px;
  box-shadow: 0 10px 25px rgba(124, 58, 237, 0.15);
  overflow: hidden;
}

#writing-canvas {
  position: relative;
  z-index: 2;
  cursor: crosshair;
  touch-action: none;
}

.oly-guide-char {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Patrick Hand', 'Comic Sans MS', cursive, sans-serif;
  font-size: 16rem;
  color: rgba(148, 163, 184, 0.22);
  pointer-events: none;
  z-index: 1;
  line-height: 1;
  user-select: none;
}

.writing-tools-panel {
  flex: 1;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.char-info-box {
  background: #FAF5FF;
  border: 2px solid #E9D5FF;
  border-radius: 20px;
  padding: 14px 18px;
}

.char-title-display {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 900;
  color: #6B21A8;
  margin-bottom: 4px;
}

.char-hint-text {
  font-size: 0.95rem;
  color: #4B5563;
  line-height: 1.4;
  margin: 0;
}

.ink-color-picker {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ink-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid white;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s;
}

.ink-btn.active {
  transform: scale(1.25);
  box-shadow: 0 0 0 3px #8B5CF6, 0 6px 14px rgba(0, 0, 0, 0.2);
}

.writing-action-btns {
  display: flex;
  gap: 10px;
}

.btn-tool-write {
  flex: 1;
  padding: 12px;
  border-radius: 18px;
  border: none;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  background: #F1F5F9;
  color: #334155;
  box-shadow: 0 4px 0 #CBD5E1;
  transition: all 0.15s;
}

@media (hover: hover) { .btn-tool-write:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #CBD5E1;
} }

.btn-finish-writing {
  background: linear-gradient(135deg, #10B981, #059669);
  color: white;
  box-shadow: 0 4px 0 #047857;
}

@media (hover: hover) { .btn-finish-writing:hover {
  box-shadow: 0 6px 0 #047857;
} }


/* ===== css/games/games-english-quests.css ===== */
/* ================= 8. BÉ HỌC TIẾNG ANH (ENGLISH KIDS) ================= */
.english-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.english-word-card {
  background: white;
  border: 3px solid #BAE6FD;
  border-radius: 24px;
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 8px 18px rgba(2, 132, 199, 0.08);
}

@media (hover: hover) { .english-word-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: #0284C7;
  box-shadow: 0 14px 28px rgba(2, 132, 199, 0.2);
} }

.en-card-icon {
  font-size: 3.8rem;
  margin-bottom: 8px;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.1));
}

.en-card-word {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  color: #0369A1;
  margin-bottom: 2px;
}

.en-card-ipa {
  font-size: 0.9rem;
  color: #64748B;
  font-style: italic;
  margin-bottom: 6px;
}

.en-card-meaning {
  background: #F0FDF4;
  color: #15803D;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 4px 12px;
  border-radius: 12px;
  border: 1px solid #BBF7D0;
  margin-bottom: 10px;
}

.btn-en-speak {
  border: none;
  background: linear-gradient(135deg, #38BDF8, #0284C7);
  color: white;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 16px;
  cursor: pointer;
  box-shadow: 0 3px 0 #0369A1;
}

/* English Quiz Minigame */
.en-quiz-play-box {
  margin: 15px auto 25px;
  text-align: center;
}

.btn-big-listen-en {
  background: linear-gradient(135deg, #0EA5E9, #0284C7);
  color: white;
  border: none;
  padding: 16px 32px;
  border-radius: 30px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 20px rgba(14, 165, 233, 0.35);
  transition: transform 0.15s;
}

@media (hover: hover) { .btn-big-listen-en:hover {
  transform: scale(1.05);
} }

.en-quiz-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  max-width: 680px;
  margin: 0 auto;
}

.en-quiz-opt-card {
  background: white;
  border: 3px solid #E2E8F0;
  border-radius: 24px;
  padding: 20px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.05);
}

@media (hover: hover) { .en-quiz-opt-card:hover {
  transform: translateY(-4px);
  border-color: #0EA5E9;
} }

.en-opt-icon {
  font-size: 4rem;
  margin-bottom: 6px;
}

.en-opt-meaning {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 900;
  color: #1E293B;
}

/* ================= 9. NHIỆM VỤ HÀNG NGÀY & STREAKS ================= */
.quests-modal-card {
  max-width: 540px;
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
  border: 4px solid #38BDF8;
}

.modal-header-badge {
  display: inline-block;
  background: linear-gradient(135deg, #0284C7, #0369A1);
  color: white;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  padding: 4px 16px;
  border-radius: 16px;
  margin-bottom: 8px;
}

.streak-banner {
  background: linear-gradient(135deg, #FEF3C7, #FDE68A);
  border: 2px solid #F59E0B;
  border-radius: 20px;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 12px 0 18px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: #92400E;
}

.streak-flame {
  font-size: 1.6rem;
  animation: bounceSlow 1.5s infinite;
}

.quests-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.quest-item-row {
  background: white;
  border: 2px solid #E2E8F0;
  border-radius: 18px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.04);
}

.quest-item-row.quest-done {
  border-color: #86EFAC;
  background: #F0FDF4;
}

.quest-item-icon {
  font-size: 2rem;
}

.quest-item-details {
  flex: 1;
}

.quest-item-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #1E293B;
  margin-bottom: 6px;
}

.quest-prog-bar-wrap {
  background: #E2E8F0;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
}

.quest-prog-fill {
  background: linear-gradient(90deg, #38BDF8, #0284C7);
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s;
}

.quest-item-row.quest-done .quest-prog-fill {
  background: linear-gradient(90deg, #4ADE80, #16A34A);
}

.quest-item-status {
  font-family: var(--font-display);
  font-size: 1rem;
  color: #0284C7;
}

.quest-chest-box {
  background: linear-gradient(135deg, #EFF6FF, #DBEAFE);
  border: 3px dashed #3B82F6;
  border-radius: 22px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.chest-icon {
  font-size: 2.8rem;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
}

.chest-info {
  flex: 1;
  text-align: left;
}

.chest-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 900;
  color: #1E40AF;
}

.chest-progress-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: #3B82F6;
}

.btn-claim-chest {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: white;
  border: none;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 900;
  padding: 10px 18px;
  border-radius: 18px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(217, 119, 6, 0.3);
  transition: all 0.15s;
}

.btn-claim-chest:disabled {
  background: #CBD5E1;
  color: #64748B;
  box-shadow: none;
  cursor: not-allowed;
}

.btn-claim-chest.btn-claimed {
  background: #10B981;
  color: white;
}


/* ===== css/games/games-adventure-map.css ===== */
/* ================= 10. BẢN ĐỒ PHIÊU LƯU 10 ĐẢO TRI THỨC (ADVENTURE MAP QUEST) ================= */
.overworld-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 0 40px;
}

.overworld-header-card {
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
  border: 4px solid #F59E0B;
  border-radius: 28px;
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  box-shadow: 0 10px 25px rgba(245, 158, 11, 0.2);
}

.overworld-title-box {
  text-align: left;
}

.overworld-title {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 900;
  color: #B45309;
  margin-bottom: 4px;
}

.overworld-subtitle {
  font-size: 1.02rem;
  font-weight: 700;
  color: #92400E;
}

.overworld-stats-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.stat-pill-item {
  background: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.95rem;
  font-weight: 800;
  color: #78350F;
  border: 2px solid #FDE68A;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Adventure Path Container & Deco */
.adventure-path-container {
  position: relative;
  background: linear-gradient(180deg, #F0FDF4 0%, #E0F2FE 50%, #FAF5FF 100%);
  border: 4px dashed #93C5FD;
  border-radius: 36px;
  padding: 40px 24px;
  box-shadow: 0 16px 36px rgba(147, 197, 253, 0.25);
  overflow: hidden;
}

.floating-deco {
  position: absolute;
  font-size: 2.5rem;
  pointer-events: none;
  opacity: 0.7;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.deco-1 { top: 5%; left: 3%; animation: floatSlow 3.2s infinite ease-in-out; }
.deco-2 { top: 25%; right: 4%; animation: floatSlow 2.8s infinite ease-in-out 0.5s; }
.deco-3 { top: 55%; left: 2%; animation: floatSlow 3.5s infinite ease-in-out 1s; }
.deco-4 { top: 75%; right: 3%; animation: floatSlow 2.5s infinite ease-in-out 0.8s; }
.deco-5 { bottom: 3%; left: 6%; animation: floatSlow 3s infinite ease-in-out 1.2s; }

/* ================= BẢN ĐỒ TRANH MINH HỌA TOÀN CẢNH (PANORAMIC MAP) ================= */
.panoramic-map-container {
  background: white;
  border: 4px solid #38BDF8;
  border-radius: 36px;
  padding: 16px;
  margin-bottom: 32px;
  box-shadow: 0 16px 40px rgba(56, 189, 248, 0.25);
  overflow: hidden;
}

.map-artwork-wrapper {
  position: relative;
  width: 100%;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
  background: #38BDF8;
}

.panoramic-map-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 26px;
  transition: transform 0.3s ease;
}

/* 10 Interactive Hotspot Pins */
.map-hotspot-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 10;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@media (hover: hover) { .map-hotspot-pin:hover {
  transform: translate(-50%, -60%) scale(1.15);
  z-index: 30;
} }

.pin-badge {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid white;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  position: relative;
  transition: all 0.2s;
}

.pin-num {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 900;
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.pin-icon {
  font-size: 1.15rem;
}

.pin-unlocked .pin-badge {
  animation: floatSlow 2.5s infinite ease-in-out;
}

.pin-locked {
  filter: grayscale(80%) opacity(75%);
  cursor: not-allowed;
}

.pin-current .pin-badge {
  box-shadow: 0 0 0 4px #F59E0B, 0 8px 20px rgba(245, 158, 11, 0.6);
  animation: pulse 1.2s infinite;
}

/* Avatar Bob on Pin */
.pin-avatar-bob {
  position: absolute;
  top: -42px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 20;
  pointer-events: none;
  animation: bounceJump 0.8s infinite;
}

.pin-avatar-face {
  font-size: 2.2rem;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.pin-avatar-tag {
  background: #EF4444;
  color: white;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1.5px solid white;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

/* Tooltip on Hover / Focus */
.pin-tooltip {
  position: absolute;
  bottom: 56px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(8px);
  color: white;
  padding: 10px 16px;
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 40;
}

@media (hover: hover) { .map-hotspot-pin:hover .pin-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
} }

.pin-tooltip-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 900;
  color: #FDE047;
}

.pin-tooltip-sub {
  font-size: 0.78rem;
  color: #E2E8F0;
  margin-bottom: 4px;
}

.pin-stars-row {
  display: flex;
  justify-content: center;
  gap: 2px;
  margin-bottom: 4px;
}

.pin-click-action {
  font-size: 0.75rem;
  font-weight: 800;
  color: #38BDF8;
}

.pin-locked-action {
  font-size: 0.75rem;
  font-weight: 800;
  color: #94A3B8;
}

/* Islands Deck Under Panoramic Map */
.islands-deck-section {
  margin-top: 10px;
}

.deck-title {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 900;
  color: #0F172A;
  margin-bottom: 18px;
  text-align: left;
}

/* Grid 10 Đảo */
.islands-path-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  position: relative;
  z-index: 2;
}

.island-card {
  background: white;
  border: 4px solid var(--island-theme, #CBD5E1);
  border-radius: 28px;
  padding: 22px 18px;
  text-align: center;
  position: relative;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
}

.island-card.island-unlocked {
  cursor: pointer;
}

@media (hover: hover) { .island-card.island-unlocked:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.12);
} }

.island-card.island-locked {
  background: #F8FAFC;
  opacity: 0.75;
  filter: grayscale(40%);
  cursor: not-allowed;
}

.island-card.island-current {
  box-shadow: 0 0 0 4px #F59E0B, 0 16px 36px rgba(245, 158, 11, 0.35);
  animation: pulseCard 2s infinite ease-in-out;
}

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

.avatar-hero-marker {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: #EF4444;
  color: white;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 900;
  padding: 4px 12px;
  border-radius: 14px;
  border: 2px solid white;
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.4);
  white-space: nowrap;
  animation: bounceJump 1s infinite;
}

.island-badge {
  display: inline-block;
  background: #F1F5F9;
  color: #475569;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 12px;
  margin-bottom: 12px;
}

.island-icon-wrap {
  width: 90px;
  height: 90px;
  border-radius: 26px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 3px solid white;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
}

.island-icon {
  font-size: 3.2rem;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

.lock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  border-radius: 23px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
}

.island-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 900;
  color: #1E293B;
  margin-bottom: 4px;
}

.island-desc {
  font-size: 0.88rem;
  color: #64748B;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 14px;
  min-height: 38px;
}

.island-footer {
  border-top: 1px solid #E2E8F0;
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.island-stars-row {
  display: flex;
  gap: 2px;
}

.map-star {
  font-size: 1.15rem;
}

.star-gold {
  filter: drop-shadow(0 2px 4px rgba(245, 158, 11, 0.5));
}

.star-empty {
  filter: grayscale(100%) opacity(30%);
}

.btn-play-island {
  background: linear-gradient(135deg, var(--island-theme, #3B82F6), #1D4ED8);
  color: white;
  border: none;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 900;
  padding: 8px 16px;
  border-radius: 16px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s;
}

@media (hover: hover) { .btn-play-island:hover {
  transform: scale(1.08);
} }

.locked-hint {
  font-size: 0.8rem;
  color: #94A3B8;
  font-weight: 700;
  width: 100%;
  text-align: center;
}

/* ================= MÀN CHƠI: THẾ GIỚI BẢN ĐỒ SỐNG ĐỘNG (THEMATIC STAGE WORLDS) ================= */
.stage-world-container {
  border-radius: 36px;
  padding: 24px;
  max-width: 950px;
  margin: 0 auto 30px;
  position: relative;
  overflow: hidden;
  border: 4px solid white;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.12);
  transition: all 0.3s ease;
}

/* 10 BỐI CẢNH CẢNH NỀN THEME CHUẨN ĐỒ HỌA */
.theme-candy {
  background: radial-gradient(circle at top right, #FFF1F2 0%, #FFE4E6 40%, #FECDD3 100%), 
              repeating-linear-gradient(45deg, transparent, transparent 20px, rgba(255, 255, 255, 0.4) 20px, rgba(255, 255, 255, 0.4) 40px);
  border-color: #FB7185;
}

.theme-pets {
  background: radial-gradient(circle at top left, #F0FDF4 0%, #DCFCE7 50%, #BBF7D0 100%),
              radial-gradient(ellipse at bottom, rgba(34, 197, 94, 0.2), transparent 70%);
  border-color: #4ADE80;
}

.theme-farm {
  background: linear-gradient(180deg, #FEF9C3 0%, #FEF08A 45%, #FDE047 100%);
  border-color: #F59E0B;
}

.theme-cake {
  background: linear-gradient(135deg, #FDF2F8 0%, #FCE7F3 50%, #FBCFE8 100%);
  border-color: #EC4899;
}

.theme-city {
  background: linear-gradient(180deg, #E0F2FE 0%, #BAE6FD 50%, #7DD3FC 100%);
  border-color: #38BDF8;
}

.theme-ocean {
  background: linear-gradient(180deg, #ECFEFF 0%, #CFFAFE 30%, #A5F3FC 70%, #67E8F9 100%);
  border-color: #06B6D4;
}

.theme-castle {
  background: linear-gradient(135deg, #F3E8FF 0%, #E9D5FF 50%, #D8B4FE 100%);
  border-color: #A855F7;
}

.theme-dino {
  background: linear-gradient(180deg, #FFEDD5 0%, #FED7AA 40%, #FDBA74 100%);
  border-color: #EA580C;
}

.theme-space {
  background: linear-gradient(180deg, #0F172A 0%, #1E1B4B 50%, #312E81 100%);
  border-color: #6366F1;
  color: white;
}

.theme-temple {
  background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 40%, #FCD34D 100%);
  border-color: #EAB308;
}

/* Stage World Top Bar */
.stage-world-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 10px 18px;
  border-radius: 24px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  margin-bottom: 20px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.theme-space .stage-world-topbar {
  background: rgba(30, 27, 75, 0.85);
  border-color: rgba(99, 102, 241, 0.5);
}

.btn-back-stage {
  background: white;
  color: #334155;
  border: 2px solid #CBD5E1;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: 18px;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

@media (hover: hover) { .btn-back-stage:hover {
  background: #F1F5F9;
  transform: scale(1.04);
} }

.stage-world-heading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stage-world-icon {
  font-size: 1.8rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

.stage-world-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 900;
  color: #0F172A;
}

.theme-space .stage-world-name {
  color: #FFFFFF;
}

.stage-step-tag {
  background: #3B82F6;
  color: white;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 14px;
  margin-left: 6px;
}

/* Scenery Landscape & Animated Deco */
.stage-landscape {
  position: relative;
  background: rgba(255, 255, 255, 0.6);
  border: 3px dashed rgba(255, 255, 255, 0.9);
  border-radius: 28px;
  padding: 24px 20px 28px;
  margin-bottom: 22px;
  overflow: hidden;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.03);
}

.theme-space .stage-landscape {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(99, 102, 241, 0.4);
}

.scenery-theme-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.96);
  color: #1E293B;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 900;
  padding: 8px 20px;
  border-radius: 20px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  margin-bottom: 24px;
  border: 2px solid rgba(255, 255, 255, 0.95);
  position: relative;
  z-index: 5;
}

.theme-space .scenery-theme-badge {
  background: #312E81;
  color: #F8FAFC;
  border-color: #6366F1;
}

.landscape-deco-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.landscape-deco {
  position: absolute;
  font-size: 2.2rem;
  opacity: 0.45;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.08));
}

.deco-item-1 { top: 4%; right: 18%; animation: floatSlow 3.2s infinite ease-in-out; }
.deco-item-2 { top: 4%; right: 4%; animation: floatSlow 2.7s infinite ease-in-out 0.4s; }
.deco-item-3 { bottom: 4%; left: 4%; animation: floatSlow 3.5s infinite ease-in-out 0.8s; }
.deco-item-4 { bottom: 4%; right: 4%; animation: floatSlow 2.9s infinite ease-in-out 1.2s; }
.deco-item-5 { top: 38%; right: 6%; animation: floatSlow 3.1s infinite ease-in-out 0.6s; }

/* Stepping Stones Path Track (1 -> 10) */
.stepping-stones-track {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  position: relative;
  z-index: 3;
  overflow-x: auto;
  padding: 55px 16px 18px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.stepping-stones-track::before {
  content: '';
  position: absolute;
  top: 75%;
  left: 30px;
  right: 60px;
  height: 6px;
  border-top: 4px dashed rgba(255, 255, 255, 0.85);
  z-index: 0;
  pointer-events: none;
}

.stone-checkpoint {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: default;
  z-index: 2;
  flex-shrink: 0;
}

.avatar-walker-bob {
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10;
  animation: bounceJump 0.8s infinite;
}

.avatar-walker-inner {
  font-size: 2.4rem;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25));
}

.walker-name {
  background: #EF4444;
  color: white;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 10px;
  border: 1.5px solid white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
}

.hop-forward {
  animation: hopStep 0.6s ease;
}

@keyframes hopStep {
  0% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(20%) translateY(-24px) scale(1.2); }
  100% { transform: translateX(-50%) translateY(0); }
}

.stone-platform {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: white;
  border: 3px solid #CBD5E1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.stone-icon {
  font-size: 1.45rem;
  line-height: 1;
}

.stone-num {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 900;
  color: #64748B;
  margin-top: 2px;
}

.stone-checkpoint.stone-done .stone-platform {
  background: #DCFCE7;
  border-color: #22C55E;
  box-shadow: 0 6px 14px rgba(34, 197, 94, 0.25);
}

.stone-checkpoint.stone-done .stone-num {
  color: #15803D;
}

.stone-checkpoint.stone-active .stone-platform {
  background: #FEF08A;
  border-color: #EAB308;
  transform: scale(1.15);
  box-shadow: 0 0 0 4px rgba(234, 179, 8, 0.35), 0 8px 20px rgba(234, 179, 8, 0.3);
}

.stone-checkpoint.stone-active .stone-num {
  color: #A16207;
  font-weight: 900;
}

.stone-checkpoint.stone-pending .stone-platform {
  background: #F8FAFC;
  opacity: 0.65;
}

/* Destination Landmark */
.destination-landmark {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-left: 10px;
}

.landmark-symbol {
  font-size: 3.5rem;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.18));
  transition: transform 0.3s;
}

.landmark-pulsing .landmark-symbol {
  animation: pulse 1.2s infinite;
}

.landmark-name {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 900;
  color: #78350F;
  background: rgba(255, 255, 255, 0.9);
  padding: 2px 8px;
  border-radius: 10px;
  margin-top: 4px;
}

.theme-space .landmark-name {
  color: #E0E7FF;
  background: #312E81;
}

/* RPG Challenge Box (Over Scenery) */
.rpg-challenge-box {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 4px solid white;
  border-radius: 32px;
  padding: 26px 28px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.theme-space .rpg-challenge-box {
  background: rgba(30, 27, 75, 0.95);
  border-color: #6366F1;
}

.challenge-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.challenge-badge {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: white;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 900;
  padding: 5px 14px;
  border-radius: 14px;
}

.challenge-hint-tag {
  font-size: 0.88rem;
  font-weight: 700;
  color: #475569;
}

.theme-space .challenge-hint-tag {
  color: #CBD5E1;
}

.challenge-body {
  margin-bottom: 20px;
}

.challenge-icon-wrap {
  font-size: 4.5rem;
  margin-bottom: 10px;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.12));
  display: inline-block;
}

.challenge-question {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 900;
  color: #0F172A;
  line-height: 1.35;
  max-width: 700px;
  margin: 0 auto;
}

.theme-space .challenge-question {
  color: #F8FAFC;
}

.challenge-options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 18px;
}

@media (max-width: 600px) {
  .challenge-options-grid {
    grid-template-columns: 1fr;
  }
}

.challenge-opt-btn {
  background: white;
  border: 3px solid #E2E8F0;
  border-radius: 22px;
  padding: 16px 20px;
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 800;
  color: #1E293B;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.05);
  transition: all 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (hover: hover) { .challenge-opt-btn:hover {
  border-color: #38BDF8;
  background: #F0F9FF;
  transform: translateY(-3px) scale(1.02);
} }

.challenge-opt-btn:active {
  transform: scale(0.97);
}

.theme-space .challenge-opt-btn {
  background: #1E1B4B;
  border-color: #4338CA;
  color: #F8FAFC;
}

@media (hover: hover) { .theme-space .challenge-opt-btn:hover {
  background: #312E81;
  border-color: #818CF8;
} }

/* Victory Screen */
.map-victory-card {
  text-align: center;
  padding: 40px 24px;
  max-width: 650px;
  margin: 0 auto;
}

.victory-icon-big {
  font-size: 6rem;
  margin-bottom: 8px;
  animation: bounceJump 0.8s infinite;
}

.victory-title {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 900;
  color: #B45309;
  margin-bottom: 6px;
}

.victory-subtitle {
  font-size: 1.15rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 20px;
}

.victory-stars-big {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 22px;
}

.big-star {
  font-size: 3.5rem;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.big-star.star-glow {
  filter: drop-shadow(0 6px 14px rgba(245, 158, 11, 0.6));
  animation: pulse 1.5s infinite;
}

.big-star.star-dim {
  filter: grayscale(100%) opacity(25%);
}

.victory-reward-badge {
  background: #FFFBEB;
  border: 2px dashed #F59E0B;
  border-radius: 20px;
  padding: 12px 24px;
  display: inline-block;
  font-size: 1.2rem;
  font-weight: 800;
  color: #92400E;
  margin-bottom: 28px;
}

.victory-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}


/* ===== css/games/games-riddle-maze-speed.css ===== */
/* ================= 10. VUA ĐỐ MẸO & ĐỐ VUI DÂN GIAN ================= */
.riddle-scroll-box {
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
  border: 3px solid #F59E0B;
  border-radius: 24px;
  padding: 26px 20px;
  margin: 18px 0 16px;
  position: relative;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.15), inset 0 2px 4px rgba(255, 255, 255, 0.8);
  text-align: center;
}

.riddle-icon-badge {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 44px;
  background: white;
  border: 3px solid #F59E0B;
  border-radius: 50%;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.riddle-poem-text {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.6;
  color: #78350F;
  margin-top: 6px;
}

/* ================= 11. MÊ CUNG TRI THỨC (SMART MAZE) ================= */
.maze-card-wrap {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.maze-board-container {
  display: grid;
  grid-template-columns: repeat(var(--maze-cols), 1fr);
  grid-template-rows: repeat(var(--maze-rows), 1fr);
  gap: 4px;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1 / 1;
  margin: 16px auto;
  background: #E2E8F0;
  padding: 8px;
  border-radius: 20px;
  border: 4px solid #CBD5E1;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.maze-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 1.25rem;
  user-select: none;
  transition: all 0.15s ease;
}

.maze-wall {
  background: #475569;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

.maze-path {
  background: #FFFFFF;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.cell-player {
  background: #FEF08A;
  border: 2px solid #EAB308;
  animation: pulse 1.2s infinite;
}

.player-avatar-pop {
  font-size: 1.4rem;
  display: inline-block;
  animation: bounceJump 0.6s infinite;
}

.cell-goal {
  background: #DCFCE7;
  border: 2px solid #22C55E;
  font-size: 1.4rem;
}

.cell-star {
  animation: pulse 1.5s infinite;
}

/* Maze Runner Selector */
.maze-runner-selector-wrap {
  margin: 10px auto 14px;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid #E2E8F0;
  border-radius: 20px;
  padding: 8px 12px;
  max-width: 580px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.runner-selector-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 800;
  color: #475569;
  margin-bottom: 6px;
  text-align: center;
}

.runner-pills-row {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 2px;
}

.runner-pill-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: #F8FAFC;
  border: 2px solid #CBD5E1;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
}

@media (hover: hover) { .runner-pill-btn:hover {
  background: #F1F5F9;
  border-color: #94A3B8;
  transform: translateY(-2px);
} }

.runner-pill-btn.active {
  background: #FEF08A;
  border-color: #EAB308;
  color: #854D0E;
  box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.3);
  transform: scale(1.05);
}

.runner-pill-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.runner-pill-img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #CBD5E1;
}

.maze-avatar-img {
  width: 85%;
  height: 85%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #EAB308;
  display: block;
  margin: auto;
}

.maze-avatar-emoji {
  font-size: 1.35rem;
  line-height: 1;
}

.maze-dpad-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.dpad-mid-row {
  display: flex;
  gap: 12px;
}

.dpad-btn {
  width: 58px;
  height: 54px;
  border-radius: 16px;
  background: white;
  border: 3px solid #E2E8F0;
  font-size: 1.6rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (hover: hover) { .dpad-btn:hover {
  background: #F8FAFC;
  transform: translateY(-2px);
  border-color: #94A3B8;
} }

.dpad-btn:active {
  transform: scale(0.92);
  background: #E2E8F0;
}

/* ================= 12. THỬ THÁCH ĐUA TỐC ĐỘ 60 GIÂY ================= */
.speed-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.speed-modal.show {
  display: flex;
  animation: fadeIn 0.25s ease-out;
}

.speed-card {
  background: white;
  border-radius: 32px;
  padding: 32px 24px;
  width: 100%;
  max-width: 540px;
  text-align: center;
  position: relative;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
  border: 4px solid #FF6B81;
}

.speed-logo-icon {
  font-size: 4rem;
  animation: pulse 1s infinite;
  display: inline-block;
}

.speed-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  color: #E11D48;
  margin: 4px 0 6px;
}

.speed-subtitle {
  font-size: 1rem;
  color: #64748B;
  margin-bottom: 16px;
}

.speed-stats-badge-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.speed-stat-chip {
  background: #FFF1F2;
  border: 2px solid #FECDD3;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #BE123C;
}

.speed-rules-box {
  background: #F8FAFC;
  border: 2px dashed #CBD5E1;
  border-radius: 20px;
  padding: 14px 16px;
  font-size: 0.92rem;
  color: #334155;
  text-align: left;
  line-height: 1.6;
  margin-bottom: 24px;
}

.btn-start-speed-now {
  background: linear-gradient(135deg, #FF4757 0%, #FF6B81 100%);
  color: white;
  border: none;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 900;
  padding: 14px 32px;
  border-radius: 24px;
  box-shadow: 0 8px 20px rgba(255, 71, 87, 0.4);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (hover: hover) { .btn-start-speed-now:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 26px rgba(255, 71, 87, 0.5);
} }

.btn-start-speed-now:active {
  transform: scale(0.96);
}

/* Speed HUD Arena */
.speed-hud-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #FFF1F2;
  border: 2px solid #FECDD3;
  border-radius: 20px;
  padding: 10px 14px;
  margin-bottom: 20px;
}

.hud-item {
  font-size: 0.95rem;
  font-weight: 800;
  color: #881337;
  display: flex;
  align-items: center;
  gap: 6px;
}

.speed-timer-track {
  width: 90px;
  height: 10px;
  background: #E2E8F0;
  border-radius: 10px;
  overflow: hidden;
}

.speed-timer-fill {
  height: 100%;
  background: linear-gradient(90deg, #10B981, #F59E0B, #EF4444);
  border-radius: 10px;
  transition: width 1s linear;
}

.combo-pulse {
  animation: pulse 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.speed-q-box {
  background: #FFFBEB;
  border: 3px solid #FCD34D;
  border-radius: 24px;
  padding: 24px 18px;
}

.speed-q-icon {
  font-size: 3rem;
  margin-bottom: 6px;
}

.speed-q-text {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 900;
  color: #78350F;
  margin-bottom: 20px;
}

.speed-opts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.speed-opt-btn {
  background: white;
  border: 3px solid #E2E8F0;
  border-radius: 18px;
  padding: 14px 10px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: #1E293B;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (hover: hover) { .speed-opt-btn:hover {
  border-color: #38BDF8;
  transform: translateY(-2px);
  background: #F0F9FF;
} }

.speed-opt-btn:active {
  transform: scale(0.95);
}

.speed-result-stars-box {
  background: #FFFBEB;
  border: 2px dashed #F59E0B;
  border-radius: 20px;
  padding: 14px 18px;
  font-size: 1.15rem;
  font-weight: 800;
  color: #92400E;
  margin: 16px 0;
}

.speed-highscore-notice {
  font-size: 0.95rem;
  font-weight: 700;
  color: #047857;
  margin-bottom: 20px;
}


/* ===== css/games/games-ethics.css ===== */
/* ================= 13. CHUYÊN MỤC BÉ NGOAN & LỄ PHÉP ================= */
.ethics-card-wrap {
  max-width: 860px;
  margin: 0 auto;
}

/* 5 Điều Bác Hồ Dạy */
.uncle-ho-tabs-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 12px 0 20px;
}

.uncle-ho-tab-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: white;
  border: 2px solid #E2E8F0;
  border-radius: 20px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: #475569;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.04);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (hover: hover) { .uncle-ho-tab-btn:hover {
  transform: translateY(-2px);
  border-color: #EF4444;
  background: #FFF1F2;
} }

.uncle-ho-tab-btn.active {
  background: #EF4444;
  color: white;
  border-color: #DC2626;
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.35);
  transform: scale(1.05);
}

.uncle-ho-rule-card {
  background: white;
  border-radius: 24px;
  padding: 24px 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  border: 2px solid #F1F5F9;
  text-align: left;
}

.u-rule-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px dashed #E2E8F0;
  flex-wrap: wrap;
}

.u-rule-big-icon {
  font-size: 2.8rem;
  line-height: 1;
}

.u-rule-main-titles {
  flex: 1;
}

.u-rule-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.u-rule-heading {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 900;
  color: #1E293B;
  margin: 0;
}

.u-listen-btn {
  padding: 8px 16px;
  background: #FEE2E2;
  border: 2px solid #FCA5A5;
  color: #991B1B;
  border-radius: 16px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

@media (hover: hover) { .u-listen-btn:hover {
  background: #FECACA;
  transform: translateY(-2px);
} }

.u-rule-meaning-box, .u-rule-actions-box {
  margin-bottom: 16px;
  background: #F8FAFC;
  border-radius: 16px;
  padding: 14px 18px;
  border: 1px solid #E2E8F0;
}

.u-box-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: #334155;
  margin: 0 0 8px 0;
}

.u-box-desc {
  font-size: 1rem;
  line-height: 1.6;
  color: #475569;
  margin: 0;
}

.u-actions-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.u-action-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.95rem;
  color: #334155;
  line-height: 1.5;
}

.u-rule-quote-box {
  background: #FFFBEB;
  border-left: 4px solid #F59E0B;
  border-radius: 0 16px 16px 0;
  padding: 12px 18px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.u-quote-icon {
  font-size: 1.6rem;
}

.u-quote-text {
  font-style: italic;
  font-size: 0.95rem;
  font-weight: 700;
  color: #78350F;
  margin: 0;
}

.u-mini-quiz-box {
  background: #EFF6FF;
  border: 2px solid #BFDBFE;
  border-radius: 20px;
  padding: 18px;
  margin-top: 16px;
}

.u-quiz-header {
  margin-bottom: 10px;
}

.u-quiz-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: #1E40AF;
}

.u-quiz-q {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1E293B;
  margin-bottom: 14px;
}

.u-quiz-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.u-quiz-opt-btn {
  background: white;
  border: 2px solid #DBEAFE;
  border-radius: 14px;
  padding: 12px 16px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: #1E3A8A;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (hover: hover) { .u-quiz-opt-btn:hover {
  background: #DBEAFE;
  transform: translateY(-2px);
  border-color: #3B82F6;
} }

/* Ứng Xử Lễ Phép & Tình Huống */
.scenario-card-container {
  background: white;
  border-radius: 24px;
  padding: 24px 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  border: 2px solid #E2E8F0;
  text-align: left;
}

.scenario-top-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 2px dashed #E2E8F0;
}

.scenario-icon-bubble {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #ECFDF5;
  border: 2px solid #A7F3D0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.scenario-counter {
  font-size: 0.82rem;
  font-weight: 800;
  color: #059669;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.scenario-main-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 900;
  color: #1E293B;
  margin: 2px 0 0 0;
}

.scenario-story-box {
  background: #F8FAFC;
  border-left: 4px solid #10B981;
  border-radius: 0 16px 16px 0;
  padding: 14px 18px;
  margin-bottom: 18px;
}

.scenario-story-text {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #334155;
  margin: 0 0 8px 0;
}

.scenario-q-text {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0F766E;
  margin: 0;
}

.scenario-options-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.scenario-opt-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  border: 2px solid #E2E8F0;
  border-radius: 16px;
  padding: 14px 18px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (hover: hover) { .scenario-opt-btn:hover {
  border-color: #10B981;
  background: #F0FDF4;
  transform: translateY(-2px);
} }

.scenario-opt-letter {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #F1F5F9;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 900;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.scenario-opt-text {
  font-size: 1.02rem;
  font-weight: 700;
  color: #1E293B;
  line-height: 1.4;
}

/* Thử Tài Đúng - Sai */
.tf-card-container {
  background: white;
  border-radius: 28px;
  padding: 30px 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  border: 3px solid #E0E7FF;
  max-width: 600px;
  margin: 0 auto;
}

.tf-progress-tag {
  display: inline-block;
  padding: 4px 12px;
  background: #EEF2FF;
  color: #4F46E5;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.tf-icon-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #F5F3FF;
  border: 3px solid #DDD6FE;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  margin: 0 auto 16px;
}

.tf-statement-text {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 900;
  color: #1E293B;
  line-height: 1.5;
  margin-bottom: 12px;
}

.tf-question-prompt {
  font-size: 1.05rem;
  color: #64748B;
  margin-bottom: 24px;
}

.tf-action-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 480px;
  margin: 0 auto;
}

.tf-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

@media (hover: hover) { .tf-btn:hover {
  transform: translateY(-4px) scale(1.03);
} }

.tf-btn-icon {
  font-size: 2.2rem;
  line-height: 1;
}

.tf-btn-label {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 900;
}

.tf-btn-yes {
  background: linear-gradient(135deg, #10B981, #059669);
  color: white;
  border: none;
}

.tf-btn-no {
  background: linear-gradient(135deg, #EF4444, #DC2626);
  color: white;
  border: none;
}

/* Vườn Hoa Việc Tốt */
.garden-summary-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(135deg, #FDF2F8, #FCE7F3);
  border: 2px solid #FBCFE8;
  border-radius: 24px;
  padding: 16px 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  text-align: left;
}

.garden-summary-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}

.garden-trophy-icon {
  font-size: 2.5rem;
}

.garden-summary-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 900;
  color: #9D174D;
  margin: 0 0 4px 0;
}

.garden-summary-sub {
  font-size: 0.92rem;
  color: #BE185D;
  margin: 0;
}

.garden-stars-badge {
  background: white;
  border: 2px solid #F472B6;
  border-radius: 16px;
  padding: 8px 16px;
  font-size: 1.05rem;
  font-weight: 800;
  color: #DB2777;
  box-shadow: 0 4px 10px rgba(236, 72, 153, 0.15);
}

.good-deeds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.deed-card {
  background: white;
  border: 2px solid #E2E8F0;
  border-radius: 22px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

@media (hover: hover) { .deed-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
} }

.deed-card.done {
  border-color: var(--deed-color, #EC4899);
  background: #FFFDFE;
  box-shadow: 0 8px 24px rgba(236, 72, 153, 0.18);
}

.deed-flower-art {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #F8FAFC;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  transition: all 0.3s ease;
}

.deed-card.done .deed-flower-art {
  background: #FDF2F8;
  transform: scale(1.1);
}

.deed-flower-icon {
  font-size: 2.2rem;
  line-height: 1;
}

.deed-flower-icon.blooming {
  animation: bounceJump 1.2s infinite;
}

.deed-header-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.deed-item-icon {
  font-size: 1.4rem;
}

.deed-star-tag {
  background: #FEF3C7;
  color: #92400E;
  border-radius: 10px;
  padding: 2px 8px;
  font-size: 0.8rem;
  font-weight: 800;
}

.deed-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: #1E293B;
  margin: 0 0 14px 0;
  line-height: 1.4;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-check-deed {
  width: 100%;
  padding: 10px 14px;
  background: #F1F5F9;
  border: 2px solid #CBD5E1;
  border-radius: 14px;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 800;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (hover: hover) { .btn-check-deed:hover {
  background: #E2E8F0;
  transform: translateY(-2px);
} }

.btn-check-deed.btn-done {
  background: linear-gradient(135deg, #10B981, #059669);
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}


/* ===== css/games/art.css ===== */
/* ==========================================================================
   SAM KIDO - PHÂN KHU MỸ THUẬT & HỌA SĨ NHÍ (CSS)
   ========================================================================== */

/* Thanh điều hướng chế độ Mỹ thuật */
.art-mode-selector {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.art-mode-btn {
  background: white;
  border: 3px solid #ff9ff3;
  color: #5f27cd;
  padding: 10px 22px;
  border-radius: 50px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 159, 243, 0.25);
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@media (hover: hover) { .art-mode-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 20px rgba(255, 159, 243, 0.4);
} }

.art-mode-btn.active {
  background: linear-gradient(135deg, #ff9ff3, #f368e0);
  color: white;
  border-color: #f368e0;
  box-shadow: 0 6px 18px rgba(243, 104, 224, 0.45);
}

/* ================= 1. KHUNG VẼ TỰ DO (CANVAS STUDIO) ================= */
.art-studio-arena {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.art-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.95);
  padding: 12px 18px;
  border-radius: 20px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  border: 2px solid #fed330;
  width: 100%;
  max-width: 800px;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tool-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: #57606f;
}

/* Bảng màu sắc */
.color-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.color-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  padding: 0;
}

@media (hover: hover) { .color-dot:hover {
  transform: scale(1.2);
} }

.color-dot.active {
  transform: scale(1.25);
  border-color: #2f3542;
  box-shadow: 0 0 0 3px #ff4757, 0 4px 10px rgba(0,0,0,0.25);
}

.color-dot.rainbow-brush {
  background: linear-gradient(135deg, #ff4757, #ffa502, #2ed573, #1e90ff, #a55eea);
}

/* Nút công cụ vẽ */
.tool-btn {
  background: #f1f2f6;
  border: 2px solid #ced6e0;
  border-radius: 12px;
  padding: 8px 14px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: #2f3542;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

@media (hover: hover) { .tool-btn:hover {
  background: #dfe4ea;
  transform: translateY(-2px);
} }

.tool-btn.active {
  background: #70a1ff;
  color: white;
  border-color: #1e90ff;
  box-shadow: 0 4px 10px rgba(30, 144, 255, 0.3);
}

.tool-btn.btn-save-art {
  background: linear-gradient(135deg, #2ed573, #10ac84);
  color: white;
  border-color: #10ac84;
  font-weight: 800;
}

@media (hover: hover) { .tool-btn.btn-save-art:hover {
  box-shadow: 0 6px 16px rgba(46, 213, 115, 0.4);
} }

/* Khung vẽ Canvas */
.canvas-wrapper {
  position: relative;
  background: white;
  border-radius: 24px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  border: 8px solid #fed330;
  overflow: hidden;
  touch-action: none;
  cursor: crosshair;
}

#art-drawing-canvas {
  display: block;
  background: #ffffff;
}

/* Bộ con dấu Sticker */
.stamps-palette {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.stamp-btn {
  font-size: 1.5rem;
  background: white;
  border: 2px solid #dfe4ea;
  border-radius: 10px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s;
}

@media (hover: hover) { .stamp-btn:hover {
  transform: scale(1.2) rotate(8deg);
} }

.stamp-btn.active {
  border-color: #ff4757;
  background: #ffeaa7;
  transform: scale(1.15);
  box-shadow: 0 3px 8px rgba(255, 71, 87, 0.3);
}

/* ================= 2. TRANH TÔ MÀU THẦN KỲ (COLORING BOOK) ================= */
.coloring-templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  max-height: 250px;
  overflow-y: auto;
  margin-bottom: 20px;
  padding: 10px;
  background: #F8FAFC;
  border-radius: 24px;
  border: 2px dashed #CBD5E0;
}

.template-card {
  background: white;
  border: 3px solid #E2E8F0;
  border-radius: 18px;
  padding: 12px 6px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
  transition: all 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@media (hover: hover) { .template-card:hover {
  transform: translateY(-4px) scale(1.04);
  border-color: #ff9ff3;
  box-shadow: 0 8px 18px rgba(255, 159, 243, 0.35);
} }

.template-card.active {
  border-color: #f368e0;
  background: #fff0f9;
  box-shadow: 0 0 0 3px #ff9ff3, 0 6px 16px rgba(243, 104, 224, 0.35);
}

.template-card-icon {
  font-size: 2.5rem;
  margin-bottom: 4px;
}

.template-card-title {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  color: #2f3542;
  line-height: 1.2;
}

/* Khu vực bức tranh SVG đang tô */
.coloring-canvas-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.svg-coloring-box, .coloring-interactive-box {
  background: white;
  border-radius: 24px;
  border: 6px solid #ff9ff3;
  box-shadow: 0 10px 28px rgba(255, 159, 243, 0.25);
  padding: 14px;
  max-width: 480px;
  width: 100%;
  position: relative;
  overflow: hidden;
  margin: 0 auto;
}

.coloring-interactive-canvas {
  width: 100%;
  height: auto;
  max-height: 480px;
  display: block;
  margin: 0 auto;
  border-radius: 16px;
  cursor: crosshair;
  background: white;
  touch-action: none;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  transition: transform 0.15s ease;
}

.template-card-img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 12px;
  background: white;
  padding: 3px;
  border: 2px solid #F1F5F9;
  box-shadow: 0 3px 8px rgba(0,0,0,0.06);
  margin-bottom: 4px;
}

.coloring-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.btn-coloring-action {
  padding: 8px 18px;
  background: #F8FAFC;
  border: 2px solid #E2E8F0;
  border-radius: 18px;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 800;
  color: #475569;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0,0,0,0.05);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (hover: hover) { .btn-coloring-action:hover {
  background: #FFF1F2;
  border-color: #FECDD3;
  color: #BE123C;
  transform: translateY(-2px);
} }

.coloring-mode-badge {
  display: inline-block;
  padding: 4px 12px;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 12px;
  color: #1E40AF;
  font-size: 0.85rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.svg-coloring-art {
  width: 100%;
  height: auto;
  max-height: 400px;
  display: block;
}

.svg-coloring-art path {
  fill: #ffffff;
  stroke: #2f3542;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  cursor: pointer;
  transition: fill 0.25s ease, filter 0.2s;
}

@media (hover: hover) { .svg-coloring-art path:hover {
  filter: drop-shadow(0 0 6px #ff9ff3);
} }

.btn-finish-coloring {
  background: linear-gradient(135deg, #ff9ff3, #f368e0);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 12px 30px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(243, 104, 224, 0.4);
  transition: all 0.25s;
}

@media (hover: hover) { .btn-finish-coloring:hover {
  transform: scale(1.06);
  box-shadow: 0 8px 24px rgba(243, 104, 224, 0.55);
} }

/* ================= 3. ĐỐ VUI PHA MÀU SẮC (COLOR MIXING LAB) ================= */
.color-mixing-lab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.beaker-reaction-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 15px 0;
}

.beaker-card {
  background: white;
  border: 4px solid #dfe4ea;
  border-radius: 24px;
  padding: 20px 26px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.beaker-color-blob {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  margin: 0 auto 10px;
  box-shadow: inset 0 -4px 8px rgba(0,0,0,0.2), 0 6px 14px rgba(0,0,0,0.15);
  border: 3px solid white;
}

.beaker-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  color: #2f3542;
}

.beaker-operator {
  font-size: 2.2rem;
  font-weight: 900;
  color: #ff4757;
  font-family: var(--font-display);
}

.beaker-result-blob {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 10px;
  background: #f1f2f6;
  border: 3px dashed #a4b0be;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #747d8c;
}

.beaker-result-blob.mixed-success {
  border: 3px solid white;
  box-shadow: 0 0 20px rgba(255, 107, 129, 0.5);
  animation: pulse-grow 0.6s ease-out;
}

@keyframes pulse-grow {
  0% { transform: scale(0.6); opacity: 0.5; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}


/* ===== css/labs/memory-lab.css ===== */
/* ================= 🧠 PHÒNG SIÊU TRÍ NHỚ (MEMORY LAB) ================= */
/* Mọi lớp mới đều có tiền tố ml- ; tái sử dụng game-card, game-opt-btn, feedback-msg... từ games.css */

.ml-card {
  overflow: hidden;
  max-width: 100%;
}

.ml-card * {
  box-sizing: border-box;
}

.ml-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  min-height: 220px;
  width: 100%;
}

.ml-hidden {
  display: none !important;
}

/* Dòng trạng thái */
.ml-status {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: #4C3A8F;
  background: #F3EEFF;
  border: 2px solid #E0D4FF;
  border-radius: 20px;
  padding: 8px 18px;
  text-align: center;
  max-width: 100%;
  line-height: 1.4;
}

.ml-status-pop {
  animation: mlPop 0.35s ease-out;
}

.ml-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #FFF8E7;
  color: #7A5B00;
  border: 2px solid #FFE8A8;
  border-radius: 16px;
  padding: 5px 12px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.92rem;
}

button.ml-chip {
  cursor: pointer;
  min-height: 40px;
}

button.ml-chip:disabled {
  opacity: 0.5;
  cursor: default;
}

.ml-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

.ml-actions:empty,
.ml-next-wrap:empty {
  display: none;
}

.ml-next-wrap {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

/* Nút chính kiểu đất sét */
.ml-big-btn,
.ml-soft-btn {
  min-height: 56px;
  padding: 12px 26px;
  border-radius: 22px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  cursor: pointer;
  border: 3px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  touch-action: manipulation;
}

.ml-big-btn {
  background: var(--primary-purple);
  color: #fff;
  border-color: #8350E8;
  box-shadow: 0 6px 0 #6B3FD0;
}

.ml-soft-btn {
  background: #fff;
  color: #4C3A8F;
  border-color: #D9CCFF;
  box-shadow: 0 6px 0 #D9CCFF;
}

@media (hover: hover) { .ml-big-btn:hover,
.ml-soft-btn:hover {
  transform: translateY(-2px);
} }

.ml-big-btn:active,
.ml-soft-btn:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #6B3FD0;
}

.ml-big-btn:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

/* Chấm tiến độ */
.ml-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  min-height: 16px;
}

.ml-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #E2E8F0;
  border: 2px solid #CBD5E0;
  transition: background 0.2s, transform 0.2s;
}

.ml-dot.done {
  background: var(--primary-green);
  border-color: #27B07F;
  transform: scale(1.15);
}

.ml-detail {
  margin-top: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.6;
}

.ml-hl {
  display: inline-block;
  background: #FFE38A;
  border-radius: 10px;
  padding: 0 4px;
  animation: mlPulse 1s ease-in-out infinite;
}

/* ================= 1. SIMON NHÍ ================= */
.ml-simon-meta,
.ml-maze-meta,
.ml-nback-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.ml-simon-board {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  width: min(100%, 360px);
}

.ml-simon-board.ml-pads-6 {
  grid-template-columns: repeat(3, 1fr);
  width: min(100%, 460px);
}

.ml-pad {
  aspect-ratio: 1 / 1;
  min-height: 72px;
  border-radius: 28px;
  background: var(--pad);
  border: 4px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 0 var(--pad-dark), 0 12px 18px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s ease, filter 0.12s ease, box-shadow 0.12s ease;
  filter: saturate(0.85);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.ml-pad-emoji {
  font-size: clamp(2rem, 9vw, 3.2rem);
  pointer-events: none;
  opacity: 0.85;
}

.ml-pad:active {
  transform: translateY(5px);
  box-shadow: 0 3px 0 var(--pad-dark);
}

.ml-pad.lit {
  filter: brightness(1.2) saturate(1.3);
  transform: scale(1.07);
  box-shadow: 0 0 0 6px #fff, 0 0 28px 10px var(--pad), 0 8px 0 var(--pad-dark);
}

.ml-pad.lit .ml-pad-emoji {
  opacity: 1;
  animation: mlWiggle 0.4s ease-in-out;
}

.ml-simon-board.ml-watching .ml-pad {
  cursor: default;
}

.ml-simon-board.ml-watching .ml-pad:not(.lit) {
  filter: saturate(0.6) brightness(0.95);
}

/* ================= 2. CÁI GÌ BIẾN MẤT? ================= */
.ml-timebar {
  width: min(100%, 420px);
  height: 12px;
  border-radius: 8px;
  background: #EDF2F7;
  overflow: hidden;
}

.ml-timebar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary-green), var(--primary-yellow));
  border-radius: 8px;
  animation: mlTimebar linear forwards;
}

.ml-tray-wrap {
  position: relative;
  width: min(100%, 620px);
  border-radius: 26px;
  overflow: hidden;
}

.ml-tray {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 18px 12px;
  min-height: 150px;
  background: linear-gradient(180deg, #FFF8E7, #FFEFD0);
  border: 4px solid #FFE0A3;
  border-radius: 26px;
}

.ml-item {
  width: 86px;
  min-height: 96px;
  background: #fff;
  border-radius: 20px;
  border: 3px solid #F4E1B8;
  box-shadow: 0 5px 0 #F0D49A;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 4px;
}

.ml-item-emoji {
  font-size: 2.6rem;
  line-height: 1.1;
}

.ml-item-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: #6B5B3E;
  text-align: center;
  line-height: 1.2;
}

.ml-item.ml-gap {
  background: transparent;
  border: 3px dashed #E2B86A;
  box-shadow: none;
  animation: mlPulse 1.4s ease-in-out infinite;
}

.ml-item.ml-gap .ml-item-emoji {
  opacity: 0.55;
}

/* Tấm rèm sân khấu */
.ml-curtain {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    repeating-linear-gradient(90deg, #B794F6 0 22px, #9F7AEA 22px 44px);
  border-radius: 26px;
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform 0.9s cubic-bezier(0.65, 0, 0.35, 1);
  pointer-events: none;
  box-shadow: inset 0 -14px 0 rgba(0, 0, 0, 0.12);
}

.ml-curtain.closed {
  transform: scaleY(1);
  pointer-events: auto;
}

.ml-curtain-icon {
  font-size: 3rem;
  opacity: 0;
  transition: opacity 0.4s 0.5s;
}

.ml-curtain.closed .ml-curtain-icon {
  opacity: 1;
  animation: mlWiggle 1s ease-in-out infinite;
}

.ml-question {
  width: 100%;
}

.ml-options {
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}

.ml-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 96px;
  padding: 10px 8px;
}

.ml-opt-emoji {
  font-size: 2.4rem;
  line-height: 1.1;
}

.ml-opt-name {
  font-size: 0.85rem;
  font-weight: 700;
}

.ml-opt:disabled {
  cursor: default;
}

.ml-reveal {
  animation: mlPulse 1s ease-in-out 3;
}

/* ================= 3. NHỚ VỊ TRÍ ================= */
.ml-grid {
  display: grid;
  grid-template-columns: repeat(var(--n), 1fr);
  gap: 8px;
  width: min(100%, calc(var(--n) * 86px));
  padding: 10px;
  background: #EEF6FF;
  border: 4px solid #CFE6FF;
  border-radius: 24px;
}

.ml-cell {
  aspect-ratio: 1 / 1;
  min-height: 48px;
  border-radius: 16px;
  background: #fff;
  border: 3px solid #D6E6F7;
  box-shadow: 0 4px 0 #C3D8EE;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 6vw, 1.9rem);
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.2s, transform 0.12s, box-shadow 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.ml-cell:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #C3D8EE;
}

.ml-grid.ml-watching .ml-cell {
  cursor: default;
}

.ml-cell.ml-lit {
  background: var(--primary-yellow);
  border-color: #F2B705;
  box-shadow: 0 0 0 4px #FFF3C4, 0 0 22px 6px rgba(255, 209, 59, 0.7);
  animation: mlPop 0.35s ease-out;
  color: #7A5B00;
}

.ml-cell.ml-found {
  background: var(--primary-green);
  border-color: #27B07F;
  box-shadow: 0 4px 0 #1E9468;
  animation: mlPop 0.3s ease-out;
}

.ml-cell.ml-miss {
  background: #FFC9C9;
  border-color: #F56565;
}

.ml-cell.ml-reveal {
  background: #FFF3C4;
  border: 3px dashed #F2B705;
  color: #B7791F;
}

/* ================= 4. MẸ ĐI CHỢ ================= */
.ml-listen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.ml-basket {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  font-size: 4.2rem;
  line-height: 1;
  padding: 16px 26px;
  background: #FFF4E5;
  border: 4px solid #FFDDB0;
  border-radius: 32px;
  box-shadow: var(--clay-shadow);
}

.ml-mom {
  font-size: 3.2rem;
}

.ml-basket.ml-talking .ml-basket-icon {
  animation: mlBob 0.8s ease-in-out infinite;
}

.ml-basket.ml-talking .ml-mom {
  animation: mlWiggle 0.9s ease-in-out infinite;
}

.ml-shoplist-text {
  font-size: 1.2rem;
  font-weight: 800;
  color: #4C3A8F;
  background: #fff;
  border: 3px dashed #D9CCFF;
  border-radius: 18px;
  padding: 10px 18px;
  line-height: 1.7;
}

.ml-market-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.ml-market-wrap:empty {
  display: none;
}

.ml-market {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 12px;
  width: min(100%, 640px);
}

.ml-goods {
  position: relative;
  display: flex;
}

.ml-goods-main {
  flex: 1;
  min-height: 104px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 6px;
  background: #fff;
  border: 3px solid #E2E8F0;
  border-radius: 20px;
  box-shadow: 0 5px 0 #CBD5E0;
  cursor: pointer;
  font-family: var(--font-body);
  transition: transform 0.12s, border-color 0.2s, background 0.2s;
  touch-action: manipulation;
}

.ml-goods-main:active {
  transform: translateY(3px);
}

.ml-goods-emoji {
  font-size: 2.4rem;
  line-height: 1.1;
}

.ml-goods-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #4A5568;
  text-align: center;
  line-height: 1.2;
}

.ml-goods-badge {
  position: absolute;
  top: -8px;
  right: -6px;
  min-width: 30px;
  height: 30px;
  padding: 0 7px;
  border-radius: 15px;
  background: var(--primary-green);
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 0 #1E9468;
  pointer-events: none;
}

.ml-goods-badge:empty {
  display: none;
}

.ml-goods-minus {
  position: absolute;
  top: -8px;
  left: -6px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid #FEB2B2;
  background: #fff;
  color: #C53030;
  font-size: 1.3rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.ml-goods.selected .ml-goods-minus {
  display: flex;
}

.ml-goods.selected .ml-goods-main {
  background: #E9FBF3;
  border-color: var(--primary-green);
  box-shadow: 0 5px 0 #27B07F;
}

.ml-goods.ml-pop .ml-goods-main {
  animation: mlPop 0.3s ease-out;
}

.ml-goods.ml-good .ml-goods-main {
  background: #DEF7EC;
  border-color: #38A169;
}

.ml-goods.ml-missed .ml-goods-main,
.ml-goods.ml-wrongqty .ml-goods-main {
  background: #FFF4E5;
  border: 3px dashed var(--primary-orange);
  animation: mlPulse 1s ease-in-out 3;
}

.ml-goods.ml-missed .ml-goods-badge,
.ml-goods.ml-wrongqty .ml-goods-badge {
  background: var(--primary-orange);
  box-shadow: 0 3px 0 #D97F00;
}

.ml-goods.ml-extra .ml-goods-main {
  background: #FDE8E8;
  border-color: #F56565;
}

.ml-goods.ml-extra .ml-goods-badge {
  background: #F56565;
  box-shadow: 0 3px 0 #C53030;
}

.ml-goods.ml-dim {
  opacity: 0.45;
}

.ml-goods.ml-good .ml-goods-minus,
.ml-goods.ml-missed .ml-goods-minus,
.ml-goods.ml-wrongqty .ml-goods-minus,
.ml-goods.ml-extra .ml-goods-minus {
  display: none;
}

.ml-subtitle {
  display: inline-block;
  margin-top: 4px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 14px;
  font-style: italic;
}

/* ================= 5. GIỐNG LÚC NÃY KHÔNG? ================= */
.ml-nback-stage {
  display: flex;
  justify-content: center;
  padding: 6px;
}

.ml-nback-card {
  width: min(62vw, 190px);
  aspect-ratio: 3 / 4;
  border-radius: 28px;
  background: linear-gradient(160deg, #FFFFFF, #F3EEFF);
  border: 5px solid #D9CCFF;
  box-shadow: var(--clay-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.ml-nback-emoji {
  font-size: clamp(4rem, 20vw, 5.6rem);
  line-height: 1;
}

.ml-nback-card.ml-card-in {
  animation: mlFlipIn 0.35s ease-out;
}

.ml-nback-card.ml-blank {
  opacity: 0.55;
  background: #F7F5FF;
}

.ml-nback-card.ml-good-ring {
  border-color: var(--primary-green);
  box-shadow: 0 0 0 6px #C6F6E2, var(--clay-shadow);
}

.ml-nback-card.ml-bad-ring {
  border-color: #FC8181;
  box-shadow: 0 0 0 6px #FED7D7, var(--clay-shadow);
}

.ml-nback-btns {
  display: flex;
  justify-content: center;
  gap: 14px;
  width: min(100%, 440px);
}

.ml-answer-btn {
  flex: 1;
  min-height: 64px;
  border-radius: 22px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  cursor: pointer;
  border: 3px solid;
  transition: transform 0.12s, opacity 0.2s;
  touch-action: manipulation;
}

.ml-answer-btn.ml-same {
  background: #E9FBF3;
  color: #1E7A55;
  border-color: #7FDDB8;
  box-shadow: 0 6px 0 #7FDDB8;
}

.ml-answer-btn.ml-diff {
  background: #FFF1F2;
  color: #B83250;
  border-color: #FDA4B4;
  box-shadow: 0 6px 0 #FDA4B4;
}

.ml-answer-btn:active:not(:disabled) {
  transform: translateY(4px);
  box-shadow: none;
}

.ml-answer-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.ml-answer-btn.ml-good-flash {
  opacity: 1;
  animation: mlPop 0.3s ease-out;
  background: var(--primary-green);
  color: #fff;
}

.ml-answer-btn.ml-bad-flash {
  opacity: 1;
  animation: mlShake 0.45s ease-in-out;
  background: #FC8181;
  color: #fff;
}

/* ================= 6. MÊ CUNG BÓNG TỐI ================= */
.ml-maze {
  --maze-size: min(100%, 440px);
  display: grid;
  grid-template-columns: repeat(var(--n), 1fr);
  width: var(--maze-size);
  aspect-ratio: 1 / 1;
  background: #FFF8E7;
  border: 4px solid #6B5BD6;
  border-radius: 14px;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  transition: background 0.5s;
}

.ml-mcell {
  --wall: #6B5BD6;
  --floor: #FFF8E7;
  position: relative;
  background: var(--floor);
  border: 2px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: calc(min(84vw, 420px) / var(--n) * 0.55);
  line-height: 1;
  transition: background 0.35s, border-color 0.35s;
}

.ml-mcell.wn { border-top-color: var(--wall); }
.ml-mcell.we { border-right-color: var(--wall); }
.ml-mcell.ws { border-bottom-color: var(--wall); }
.ml-mcell.ww { border-left-color: var(--wall); }

.ml-mcell.ml-hit-n { border-top-color: #FF5E7E !important; }
.ml-mcell.ml-hit-e { border-right-color: #FF5E7E !important; }
.ml-mcell.ml-hit-s { border-bottom-color: #FF5E7E !important; }
.ml-mcell.ml-hit-w { border-left-color: #FF5E7E !important; }

.ml-maze.ml-dark {
  background: #1E2143;
  border-color: #2D3160;
}

.ml-maze.ml-dark .ml-mcell {
  --wall: #1E2143;
  --floor: #1E2143;
}

.ml-maze.ml-dark .ml-mcell.seen {
  --floor: #2E3363;
  --wall: #474D86;
}

.ml-maze.ml-dark .ml-mcell.lit {
  --floor: #FFF3C4;
  --wall: #6B5BD6;
}

.ml-maze.ml-won {
  border-color: var(--primary-green);
  box-shadow: 0 0 0 6px #C6F6E2;
}

.ml-goal {
  animation: mlBob 1.2s ease-in-out infinite;
}

.ml-maze.ml-dark .ml-mcell:not(.lit) .ml-goal {
  opacity: 0.6;
  filter: drop-shadow(0 0 6px #FFD13B);
}

.ml-player {
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.2));
}

.ml-player.ml-step {
  animation: mlPop 0.2s ease-out;
}

.ml-player.ml-bonk {
  animation: mlShake 0.4s ease-in-out;
}

.ml-dpad {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.ml-dpad-row {
  display: flex;
  gap: 10px;
}

.ml-dpad-btn {
  width: 64px;
  height: 60px;
  border-radius: 18px;
  background: #fff;
  border: 3px solid #D9CCFF;
  box-shadow: 0 5px 0 #D9CCFF;
  font-size: 1.7rem;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.1s;
}

.ml-dpad-btn:active:not(:disabled) {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #D9CCFF;
}

.ml-dpad-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

/* ================= HOẠT ẢNH ================= */
.ml-shake {
  animation: mlShake 0.45s ease-in-out;
}

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

@keyframes mlPop {
  0% { transform: scale(0.85); }
  60% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

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

@keyframes mlWiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-8deg); }
  75% { transform: rotate(8deg); }
}

@keyframes mlBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes mlFlipIn {
  0% { transform: rotateY(90deg) scale(0.9); opacity: 0.3; }
  100% { transform: rotateY(0deg) scale(1); opacity: 1; }
}

@keyframes mlTimebar {
  from { width: 100%; }
  to { width: 0%; }
}

/* ================= ĐIỆN THOẠI NHỎ ================= */
@media (max-width: 480px) {
  .ml-stage {
    gap: 10px;
    min-height: 180px;
  }

  .ml-status {
    font-size: 1rem;
    padding: 7px 12px;
  }

  .ml-simon-board {
    gap: 12px;
  }

  .ml-simon-board.ml-pads-6 {
    gap: 10px;
  }

  .ml-pad {
    border-radius: 22px;
  }

  .ml-tray {
    gap: 8px;
    padding: 12px 8px;
  }

  .ml-item {
    width: 70px;
    min-height: 84px;
    border-radius: 16px;
  }

  .ml-item-emoji {
    font-size: 2.1rem;
  }

  .ml-options {
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 10px;
  }

  .ml-opt {
    min-height: 86px;
    padding: 8px 4px;
  }

  .ml-grid {
    gap: 6px;
    padding: 6px;
  }

  .ml-cell {
    border-radius: 12px;
  }

  .ml-market {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .ml-goods-main {
    min-height: 92px;
  }

  .ml-goods-emoji {
    font-size: 2rem;
  }

  .ml-basket {
    font-size: 3.4rem;
    padding: 12px 20px;
  }

  .ml-big-btn,
  .ml-soft-btn {
    font-size: 1.05rem;
    padding: 10px 18px;
  }

  .ml-mcell {
    border-width: 1.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ml-card *:not(.ml-timebar > span) {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}


/* ===== css/labs/logic-lab.css ===== */
/*
 * Sam Kido - 🧩 Phòng Tư Duy Logic (logic-lab.js)
 * Mọi lớp mới đều có tiền tố lg-
 */

/* ================= KHUNG CHUNG ================= */
.game-card.lg-card {
  overflow: hidden;
  max-width: 100%;
}

.lg-card .section-instruction small {
  display: block;
  margin-top: 4px;
  font-size: 0.92rem;
  color: #718096;
}

.lg-card .feedback-msg.lg-info {
  background: #E8F7FF;
  color: #075985;
  border: 2px solid #90E0EF;
}

.lg-btn {
  min-height: 52px;
  padding: 10px 20px;
  border-radius: 20px;
  border: 3px solid #CBD5E0;
  background: white;
  color: #2D3748;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 5px 0 #A0AEC0;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  touch-action: manipulation;
}

@media (hover: hover) { .lg-btn:hover:not(:disabled) { transform: translateY(-2px); } }
.lg-btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 2px 0 #A0AEC0; }
.lg-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.lg-btn-soft { background: #F7FAFC; }

.lg-btn-go {
  background: linear-gradient(180deg, #4ADE80, #22C55E);
  border-color: #16A34A;
  color: white;
  box-shadow: 0 5px 0 #15803D;
}
.lg-btn-go:active:not(:disabled) { box-shadow: 0 2px 0 #15803D; }

.lg-btn-next {
  margin-top: 12px;
  background: linear-gradient(180deg, #60C5FF, var(--primary-blue));
  border-color: #1E88D8;
  color: white;
  box-shadow: 0 5px 0 #1569A8;
}

.lg-actions-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

.lg-palette {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 16px auto 0;
  padding: 10px;
  background: #F8FAFF;
  border: 3px dashed #D6E4FF;
  border-radius: 24px;
  max-width: 520px;
}

.lg-pal-btn {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  border: 3px solid #CBD5E0;
  background: white;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 0 #A0AEC0;
  transition: transform 0.15s ease;
  touch-action: manipulation;
}
.lg-pal-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #A0AEC0; }
.lg-pal-btn.lg-selected {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 4px rgba(58, 168, 247, 0.35), 0 4px 0 #1E88D8;
  transform: scale(1.08);
}

.lg-shake { animation: lgShake 0.5s ease; }

@keyframes lgShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px) rotate(-2deg); }
  40% { transform: translateX(8px) rotate(2deg); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

@keyframes lgPop {
  0% { transform: scale(0.6); opacity: 0; }
  70% { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); }
}

@keyframes lgWave {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.08); }
}

@keyframes lgPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(58, 168, 247, 0.5); }
  50% { box-shadow: 0 0 0 8px rgba(58, 168, 247, 0); }
}

.lg-win-wave { animation: lgWave 0.6s ease; }

/* ================= 1. LẬP TRÌNH ROBOT ================= */
.lg-robot-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  align-items: flex-start;
}

.lg-rb-board {
  --n: 4;
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--n), 1fr);
  width: min(100%, calc(var(--n) * 66px));
  flex: 0 1 auto;
  border: 4px solid #A7D8FF;
  border-radius: 22px;
  background: #EAF6FF;
  overflow: hidden;
  box-shadow: var(--clay-shadow);
}

.lg-rb-cell {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F4FBFF;
  box-shadow: inset 0 0 0 1px #CFE8FA;
  font-size: clamp(1.2rem, 6vw, 2rem);
}
.lg-rb-cell:nth-child(odd) { background: #FFFFFF; }
.lg-rb-obst { background: #EDE7DF !important; }
.lg-rb-goal .lg-rb-icon { animation: lgWave 1.6s ease-in-out infinite; }
.lg-rb-start { box-shadow: inset 0 0 0 3px #FFD13B; }
.lg-rb-star .lg-rb-icon { animation: lgWave 1.2s ease-in-out infinite; }
.lg-rb-star.lg-collected .lg-rb-icon {
  animation: none;
  opacity: 0;
  transform: scale(2);
  transition: all 0.4s ease;
}

.lg-rb-bot {
  --r: 0;
  --c: 0;
  position: absolute;
  top: calc(var(--r) * 100% / var(--n));
  left: calc(var(--c) * 100% / var(--n));
  width: calc(100% / var(--n));
  height: calc(100% / var(--n));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.4rem, 7vw, 2.3rem);
  transition: top 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), left 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 4px 3px rgba(0, 0, 0, 0.2));
  pointer-events: none;
  z-index: 2;
}
.lg-rb-bot.lg-bump { animation: lgBump 0.45s ease; }
.lg-rb-bot.lg-dance { animation: lgDance 0.8s ease 2; }

@keyframes lgBump {
  0%, 100% { transform: translate(0, 0); }
  45% { transform: translate(var(--bx, 0), var(--by, 0)) rotate(10deg); }
  70% { transform: translate(0, 0) rotate(-8deg); }
}

@keyframes lgDance {
  0%, 100% { transform: rotate(0) scale(1); }
  25% { transform: rotate(-15deg) scale(1.2); }
  75% { transform: rotate(15deg) scale(1.2); }
}

.lg-robot-side {
  flex: 1 1 280px;
  max-width: 440px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lg-program-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  color: #2D3748;
}

.lg-block-count {
  background: #E8F7FF;
  color: #0077B6;
  padding: 4px 12px;
  border-radius: 14px;
  font-size: 0.9rem;
}
.lg-block-count.lg-count-full { background: #FFF3CD; color: #9A6700; }

.lg-program-strip {
  min-height: 64px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: flex-start;
  padding: 10px;
  background: #FFFDF3;
  border: 3px dashed #FFE08A;
  border-radius: 20px;
}

.lg-program-empty {
  color: #A0AEC0;
  font-size: 0.92rem;
  align-self: center;
}

.lg-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-width: 44px;
  height: 44px;
  padding: 0 8px;
  background: white;
  border: 3px solid #90E0EF;
  border-radius: 14px;
  font-size: 1.35rem;
  box-shadow: 0 3px 0 #7CC7DB;
  animation: lgPop 0.3s ease-out;
}
.lg-chip-loop { border-color: #C4A5FF; box-shadow: 0 3px 0 #9D65FF; background: #F6F0FF; }
.lg-chip-rep { font-size: 0.85rem; font-weight: 900; color: #6B3FD6; font-family: var(--font-display); }
.lg-chip-pending { animation: lgPulse 1.2s ease-in-out infinite; }
.lg-chip-active {
  background: #FFD13B;
  border-color: #E6A700;
  transform: translateY(-4px) scale(1.08);
}
.lg-chip-num {
  position: absolute;
  top: -8px;
  left: -6px;
  background: #3AA8F7;
  color: white;
  font-size: 0.7rem;
  font-weight: 900;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  border-radius: 9px;
  text-align: center;
  padding: 0 3px;
}

.lg-cmd-pad {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.lg-cmd-btn {
  min-width: 60px;
  height: 60px;
  padding: 0 10px;
  border-radius: 18px;
  border: 3px solid #90E0EF;
  background: white;
  font-size: 1.8rem;
  cursor: pointer;
  box-shadow: 0 5px 0 #7CC7DB;
  transition: transform 0.12s ease;
  touch-action: manipulation;
}
.lg-cmd-btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 #7CC7DB; }
.lg-cmd-btn:disabled { opacity: 0.5; }
.lg-loop-btn {
  font-size: 1.15rem;
  font-weight: 900;
  font-family: var(--font-display);
  color: #6B3FD6;
  border-color: #C4A5FF;
  background: #F6F0FF;
  box-shadow: 0 5px 0 #9D65FF;
}
.lg-loop-btn.lg-selected { background: #9D65FF; color: white; animation: lgPulse 1.2s infinite; }

.lg-robot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.lg-robot-actions .lg-btn { flex: 1 1 90px; padding: 8px 10px; }

/* ================= 2. SUDOKU CON VẬT ================= */
.lg-sudoku {
  --n: 4;
  display: grid;
  grid-template-columns: repeat(var(--n), 1fr);
  width: min(100%, calc(var(--n) * 74px));
  margin: 0 auto;
  border: 4px solid #4A5568;
  border-radius: 18px;
  overflow: hidden;
  background: #4A5568;
  gap: 2px;
  box-shadow: var(--clay-shadow);
}

.lg-sd-cell {
  aspect-ratio: 1 / 1;
  min-height: 48px;
  border: none;
  background: white;
  font-size: clamp(1.4rem, 7vw, 2.2rem);
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
  touch-action: manipulation;
}
.lg-sd-cell.lg-box-r { border-right: 3px solid #4A5568; }
.lg-sd-cell.lg-box-b { border-bottom: 3px solid #4A5568; }
.lg-sd-cell.lg-given { background: #EEF2F7; cursor: default; }
.lg-sd-cell.lg-hinted { background: #FFF8DB; }
.lg-sd-cell.lg-peer { background: #F0F8FF; }
.lg-sd-cell.lg-selected {
  background: #D6EEFF;
  outline: 4px solid var(--primary-blue);
  outline-offset: -4px;
}
.lg-sd-cell.lg-conflict { background: #FFE4E6 !important; color: inherit; outline: 3px solid #F87171; outline-offset: -3px; }
.lg-sd-cell.pop-in { animation: lgPop 0.3s ease-out; }

/* ================= 3. CÂN THĂNG BẰNG ================= */
.lg-scales {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 18px;
  margin: 0 auto 22px;
}

.lg-scale {
  --tilt: 0deg;
  position: relative;
  width: min(100%, 300px);
  height: 190px;
}
.lg-scales .lg-scale + .lg-scale { width: min(100%, 270px); }

.lg-scale-beam {
  position: absolute;
  left: 18%;
  right: 18%;
  top: 36px;
  height: 10px;
  background: linear-gradient(180deg, #B08968, #8D6E63);
  border-radius: 6px;
  transform-origin: 50% 50%;
  transform: rotate(var(--tilt));
  animation: lgTilt 1.1s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2;
}

@keyframes lgTilt {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(var(--tilt)); }
}
@keyframes lgPanTilt {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(calc(var(--tilt) * -1)); }
}

.lg-pan {
  position: absolute;
  top: 5px;
  width: 53%;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: 50% 0;
  transform: rotate(calc(var(--tilt) * -1));
  animation: lgPanTilt 1.1s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.lg-pan-left { left: -26.5%; }
.lg-pan-right { right: -26.5%; }
.lg-pan::before {
  content: '';
  width: 70%;
  height: 22px;
  background:
    linear-gradient(to top right, transparent calc(50% - 1px), #A0AEC0 50%, transparent calc(50% + 1px)) left / 50% 100% no-repeat,
    linear-gradient(to top left, transparent calc(50% - 1px), #A0AEC0 50%, transparent calc(50% + 1px)) right / 50% 100% no-repeat;
}

.lg-pan-load {
  display: flex;
  flex-wrap: wrap-reverse;
  justify-content: center;
  align-items: flex-end;
  gap: 0 2px;
  min-height: 44px;
  width: 100%;
  font-size: 1.9rem;
  line-height: 1.05;
}
.lg-pan-load.lg-some { font-size: 1.35rem; }
.lg-pan-load.lg-many { font-size: 1.05rem; }

.lg-pan-dish {
  width: 100%;
  height: 12px;
  background: linear-gradient(180deg, #FFD13B, #F4A900);
  border-radius: 0 0 40px 40px;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.12);
}

.lg-scale-pivot {
  position: absolute;
  left: 50%;
  top: 29px;
  width: 24px;
  height: 24px;
  margin-left: -12px;
  background: #FF5E7E;
  border: 3px solid white;
  border-radius: 50%;
  z-index: 3;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.lg-scale-post {
  position: absolute;
  left: 50%;
  top: 40px;
  bottom: 12px;
  width: 12px;
  margin-left: -6px;
  background: linear-gradient(90deg, #8D6E63, #B08968);
  border-radius: 6px;
}
.lg-scale-base {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 110px;
  height: 16px;
  margin-left: -55px;
  background: #8D6E63;
  border-radius: 12px 12px 6px 6px;
}
.lg-scale.lg-level .lg-scale-pivot { background: #38D39F; }

.lg-bal-options .game-opt-btn {
  min-height: 60px;
  font-size: 1.35rem;
}

/* ================= 4. SẮP XẾP CÂU CHUYỆN ================= */
.lg-story-slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 10px;
  max-width: 720px;
  margin: 0 auto 18px;
}

.lg-slot {
  position: relative;
  min-height: 112px;
  border: 3px dashed #B8C4D6;
  border-radius: 20px;
  background: #F8FAFC;
  cursor: pointer;
  padding: 18px 6px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  touch-action: manipulation;
}
.lg-slot-num {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-purple);
  color: white;
  font-family: var(--font-display);
  font-weight: 900;
  width: 28px;
  height: 28px;
  line-height: 28px;
  border-radius: 50%;
  font-size: 0.95rem;
  box-shadow: 0 3px 0 #6B3FD6;
}
.lg-slot-body { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.lg-slot.lg-filled { border-style: solid; border-color: #C4A5FF; background: #FBF8FF; }
.lg-slot.lg-filled .lg-slot-body { animation: lgPop 0.3s ease-out; }
.lg-slot.lg-right { border-color: #38D39F; background: #E9FBF3; }
.lg-slot.lg-right .lg-slot-num { background: #38D39F; box-shadow: 0 3px 0 #1F9D72; }
.lg-slot.lg-wrong { border-color: #F87171; background: #FFF1F2; }
.lg-slot.lg-locked { cursor: default; }

.lg-story-pool {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 14px;
  background: #FFFDF3;
  border: 3px solid #FFEEBA;
  border-radius: 24px;
  max-width: 720px;
  margin: 0 auto;
  min-height: 90px;
}

.lg-story-card {
  width: 112px;
  min-height: 112px;
  padding: 8px 6px;
  border: 3px solid #FFD13B;
  border-radius: 20px;
  background: white;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-shadow: 0 5px 0 #E6B800;
  transition: transform 0.15s ease, opacity 0.2s ease;
  touch-action: manipulation;
}
@media (hover: hover) { .lg-story-card:hover { transform: translateY(-3px) rotate(-1deg); } }
.lg-story-card.lg-used { display: none; }
.lg-sc-emoji { font-size: 2.2rem; line-height: 1.1; }
.lg-sc-cap {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 800;
  color: #4A5568;
  line-height: 1.25;
  text-align: center;
}

/* ================= 5. THÁP HÀ NỘI ================= */
.lg-hanoi-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
}
.lg-stat {
  background: #F0F8FF;
  border: 2px solid #BEE3F8;
  border-radius: 16px;
  padding: 6px 12px;
  font-weight: 800;
  color: #2C5282;
  font-size: 0.95rem;
}
.lg-stat-limit { background: #FFF8E1; border-color: #FFE08A; color: #8A5A00; }

.lg-hanoi {
  --discs: 3;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-width: 640px;
  margin: 0 auto;
}

.lg-peg {
  position: relative;
  height: calc(90px + var(--discs) * 38px);
  border: 3px solid transparent;
  border-radius: 22px;
  background: linear-gradient(180deg, #F5FBFF 0%, #EAF4FF 100%);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: 0 4px 34px;
  min-width: 0;
  transition: border-color 0.2s ease, background 0.2s ease;
  touch-action: manipulation;
}
.lg-peg.lg-selected { border-color: var(--primary-blue); background: #DDF0FF; }
.lg-peg-target { background: linear-gradient(180deg, #FFFBEA 0%, #FFF3C4 100%); }
.lg-peg-flag { position: absolute; top: 6px; right: 10px; font-size: 1.4rem; animation: lgWave 1.8s ease-in-out infinite; }
.lg-peg-rod {
  position: absolute;
  bottom: 34px;
  left: 50%;
  width: 12px;
  margin-left: -6px;
  height: calc(40px + var(--discs) * 38px);
  background: linear-gradient(90deg, #8D6E63, #B08968);
  border-radius: 6px 6px 0 0;
}
.lg-peg-foot {
  position: absolute;
  bottom: 6px;
  left: 8%;
  right: 8%;
  height: 24px;
  line-height: 24px;
  background: #8D6E63;
  color: white;
  font-family: var(--font-display);
  font-weight: 900;
  border-radius: 10px;
  font-size: 0.9rem;
}
.lg-peg-stack {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 3px;
  z-index: 1;
}
.lg-disc {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  background: var(--disc);
  border-radius: 17px;
  font-size: 1.25rem;
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.15), 0 3px 0 rgba(0, 0, 0, 0.12);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.lg-disc.lg-lifted { transform: translateY(-26px); box-shadow: 0 10px 12px rgba(0, 0, 0, 0.2); }
.lg-disc.lg-drop { animation: lgDrop 0.35s ease-out; }
.lg-disc.lg-disc-dance { animation: lgWave 0.6s ease 2; }

@keyframes lgDrop {
  0% { transform: translateY(-30px); }
  70% { transform: translateY(4px); }
  100% { transform: translateY(0); }
}

/* ================= 6. PHÂN LOẠI THÔNG MINH ================= */
.lg-sort-tray {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  margin: 0 auto 18px;
  max-width: 640px;
  min-height: 84px;
  background: #F8FAFF;
  border: 3px dashed #D6E4FF;
  border-radius: 24px;
}
.lg-sort-item {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  border: 3px solid #E2E8F0;
  background: white;
  font-size: 2.1rem;
  cursor: pointer;
  box-shadow: 0 4px 0 #CBD5E0;
  transition: transform 0.2s ease;
  touch-action: manipulation;
}
.lg-sort-item.lg-selected {
  border-color: var(--primary-orange);
  transform: translateY(-6px) scale(1.12);
  box-shadow: 0 0 0 4px rgba(255, 159, 28, 0.3), 0 8px 0 #E08600;
}
.lg-sort-item.lg-gone { display: none; }

.lg-baskets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  max-width: 680px;
  margin: 0 auto;
}
.lg-basket {
  position: relative;
  min-height: 150px;
  border: 3px solid #FFB86B;
  border-radius: 26px 26px 34px 34px;
  background: linear-gradient(180deg, #FFF8EE 0%, #FFE9CC 100%);
  cursor: pointer;
  padding: 10px 8px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  box-shadow: 0 6px 0 #E8964A;
  transition: transform 0.15s ease;
  touch-action: manipulation;
}
.lg-basket:active { transform: translateY(3px); }
.lg-basket-label {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.98rem;
  color: #7A4A12;
  line-height: 1.3;
}
.lg-basket-items { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; font-size: 1.6rem; }
.lg-basket-rim { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); font-size: 1.5rem; opacity: 0.8; }
.lg-basket.lg-happy { animation: lgWave 0.45s ease; }
.lg-in-basket { display: inline-block; }

.lg-sort-table {
  display: grid;
  grid-template-columns: minmax(64px, 0.7fr) 1fr 1fr;
  gap: 8px;
  max-width: 560px;
  margin: 0 auto;
}
.lg-st-corner,
.lg-st-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #EEF4FF;
  border-radius: 16px;
  padding: 6px;
  font-size: 1.4rem;
  font-weight: 800;
  text-align: center;
}
.lg-st-corner { font-size: 1rem; color: #718096; }
.lg-st-head small { font-size: 0.78rem; color: #4A5568; font-family: var(--font-display); line-height: 1.2; }
.lg-st-cell { min-height: 104px; padding: 8px; border-radius: 20px; }

/* ================= 7. ĐỐI XỨNG GƯƠNG ================= */
.lg-mirror {
  --cols: 2;
  --rows: 4;
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 6px;
  margin: 0 auto;
  width: min(100%, calc(var(--cols) * 2 * 60px + 50px));
}
.lg-mr-grid {
  flex: 1 1 0;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  gap: 4px;
  padding: 6px;
  border-radius: 18px;
  background: #EEF4FF;
}
.lg-mr-right { background: #F0FFF7; }
.lg-mr-cell {
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  border: 2px solid #D5DEEA;
  background: white;
  padding: 0;
  min-width: 0;
  transition: background 0.15s ease, transform 0.15s ease;
}
.lg-mr-cell.lg-on {
  background: var(--cell);
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.12);
}
.lg-mr-tap { cursor: pointer; touch-action: manipulation; }
.lg-mr-tap:active { transform: scale(0.92); }
.lg-mr-tap.lg-wrong { outline: 4px solid #F87171; outline-offset: -2px; }
.lg-mr-tap.lg-missing { border: 3px dashed #F87171; background: #FFF1F2; }
.lg-mr-line {
  flex: 0 0 14px;
  position: relative;
  border-radius: 8px;
  background: linear-gradient(90deg, #BEE3F8, #FFFFFF 50%, #BEE3F8);
  box-shadow: 0 0 10px rgba(58, 168, 247, 0.5);
}
.lg-mr-line span {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.3rem;
}
.lg-mode-mirror .lg-mirror { margin-top: 18px; }
.lg-color-swatch { background: var(--swatch); border-color: rgba(0, 0, 0, 0.1); }

/* ================= ĐIỆN THOẠI NHỎ ================= */
@media (max-width: 600px) {
  .lg-robot-wrap { gap: 14px; }
  .lg-robot-side { flex-basis: 100%; }
  .lg-cmd-btn { min-width: 56px; height: 56px; font-size: 1.6rem; }
  .lg-story-slots { grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; }
  .lg-story-card { width: 96px; min-height: 100px; }
  .lg-sc-emoji { font-size: 1.9rem; }
  .lg-sc-cap { font-size: 0.76rem; }
  .lg-scale { height: 176px; }
  .lg-pan-load { font-size: 1.6rem; }
  .lg-baskets { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
  .lg-basket { min-height: 128px; padding: 8px 4px 32px; }
  .lg-basket-label { font-size: 0.85rem; }
  .lg-sort-item { width: 56px; height: 56px; font-size: 1.8rem; }
  .lg-peg { padding-bottom: 30px; }
  .lg-disc { height: 30px; font-size: 1.05rem; }
  .lg-mr-grid { gap: 3px; padding: 4px; }
  .lg-mr-line { flex-basis: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .lg-card *,
  .lg-card *::before {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}


/* ===== css/games/skills.css ===== */
/* =========================================================
   Sam Kido - Cấp độ tự thích ứng, gợi ý trả lời, huy hiệu,
   thẻ phòng mới & Góc Phụ Huynh v2
   ========================================================= */

/* ---------- Thẻ trang chủ cho 2 phòng mới ---------- */
.card-memory-lab {
  background: linear-gradient(180deg, #F3EBFF 0%, #FFFFFF 100%);
  border-color: #9D65FF;
}
@media (hover: hover) { .card-memory-lab:hover { box-shadow: 0 16px 30px rgba(157, 101, 255, 0.32); } }
.card-memory-lab .cat-icon-wrap { background: linear-gradient(135deg, #9D65FF, #C084FC); }
.card-memory-lab .cat-badge { color: #7C3AED; }

.card-logic-lab {
  background: linear-gradient(180deg, #E6F6FF 0%, #FFFFFF 100%);
  border-color: #3AA8F7;
}
@media (hover: hover) { .card-logic-lab:hover { box-shadow: 0 16px 30px rgba(58, 168, 247, 0.32); } }
.card-logic-lab .cat-icon-wrap { background: linear-gradient(135deg, #3AA8F7, #38D39F); }
.card-logic-lab .cat-badge { color: #0369A1; }

.sk-new-ribbon {
  position: absolute;
  top: 14px;
  right: -34px;
  transform: rotate(35deg);
  background: linear-gradient(135deg, #FF5E7E, #FF9F1C);
  color: #fff;
  font-weight: 900;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  padding: 4px 40px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

/* ---------- Nhãn "Ôn lại" trên câu hỏi bé từng làm sai ---------- */
.sk-review-chip {
  display: inline-block;
  margin-left: 6px;
  background: #FFF4CC;
  border: 2px solid #FFD13B;
  color: #92400E;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 999px;
  vertical-align: middle;
}

/* ---------- Lộ trình "Học hôm nay" ---------- */
.dp-card {
  background: linear-gradient(135deg, #EEF6FF 0%, #FFFFFF 60%, #F6F0FF 100%);
  border: 4px solid #9D65FF;
  border-radius: 28px;
  padding: 18px 20px;
  margin-bottom: 20px;
  box-shadow: var(--clay-shadow);
}

.dp-card.dp-done {
  border-color: #38D39F;
  background: linear-gradient(135deg, #ECFDF5 0%, #FFFFFF 70%);
}

.dp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.dp-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 900;
  color: #4C1D95;
}

.dp-sub {
  font-size: 0.95rem;
  color: #5A6270;
  font-weight: 700;
}

.dp-ring {
  flex-shrink: 0;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.1rem;
  color: #4C1D95;
  background:
    radial-gradient(closest-side, #fff 76%, transparent 77%),
    conic-gradient(#9D65FF calc(var(--p, 0) * 1%), #E4DAFF 0);
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
}

.dp-tasks {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dp-task {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 2px solid #EEE9FF;
  border-radius: 18px;
  padding: 10px 12px;
}

.dp-task-done {
  background: #F2FBF7;
  border-color: #BDEFD9;
}

.dp-task-icon {
  font-size: 1.7rem;
  flex-shrink: 0;
}

.dp-task-info {
  flex: 1;
  min-width: 0;
}

.dp-task-title {
  font-weight: 800;
  font-size: 0.98rem;
  color: #2B2D42;
  margin-bottom: 5px;
}

.dp-task-bar {
  height: 9px;
  background: #EEE9FF;
  border-radius: 9px;
  overflow: hidden;
}

.dp-task-bar > span {
  display: block;
  height: 100%;
  border-radius: 9px;
  background: linear-gradient(90deg, #9D65FF, #38D39F);
  transition: width 0.4s ease;
}

.dp-task-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.dp-task-count {
  font-weight: 900;
  color: #5A6270;
  font-size: 0.9rem;
}

.dp-go {
  border: none;
  background: linear-gradient(135deg, #9D65FF, #7C3AED);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.9rem;
  padding: 10px 14px;
  min-height: 44px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 0 #6D28D9;
}

.dp-go:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #6D28D9;
}

/* ---------- Khu rèn luyện trí não trên trang chủ ---------- */
.sk-rooms-section {
  margin-bottom: 26px;
}

.sk-rooms-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  color: #2B2D42;
  text-align: center;
  margin-bottom: 4px;
}

.sk-rooms-sub {
  text-align: center;
  color: #5A6270;
  font-weight: 700;
  margin-bottom: 14px;
}

.sk-rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.sk-room-card {
  background: #fff;
  border: 3px solid #E4DAFF;
  border-radius: 22px;
  padding: 16px 14px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
  position: relative;
}

@media (hover: hover) { .sk-room-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 26px rgba(124, 58, 237, 0.18);
} }

.sk-room-icon {
  font-size: 2.6rem;
  line-height: 1;
}

.sk-room-name {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 900;
  margin: 6px 0 4px;
}

.sk-room-desc {
  font-size: 0.86rem;
  color: #5A6270;
  font-weight: 600;
  line-height: 1.35;
}

.sk-room-tag {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  background: #F4F1FF;
  color: #7C3AED;
}

@media (max-width: 640px) {
  .dp-card { padding: 14px; border-radius: 22px; }
  .dp-title { font-size: 1.2rem; }
  .dp-sub { font-size: 0.86rem; }
  .dp-ring { width: 60px; height: 60px; font-size: 0.95rem; }
  .dp-task-title { font-size: 0.9rem; }
  .dp-go { font-size: 0.82rem; padding: 9px 11px; }
  .sk-rooms-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
  .sk-room-card { padding: 12px 8px; }
  .sk-room-icon { font-size: 2.1rem; }
  .sk-room-name { font-size: 0.95rem; }
  .sk-room-desc { font-size: 0.76rem; }
}

/* ---------- Thẻ chọn bản đồ tri thức ---------- */
.map-pack-card .island-icon-wrap {
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

/* Thẻ bản đồ: thanh tiến độ ở trên, nút khám phá chiếm trọn hàng dưới */
.map-pack-card .island-footer {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.map-pack-card .btn-play-island {
  width: 100%;
  min-height: 48px;
  font-size: 1rem;
}

.map-pack-bar {
  width: 100%;
  height: 10px;
  background: #EEE9FF;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
}

.map-pack-bar > span {
  display: block;
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, #FFD13B, #38D39F);
  transition: width 0.4s ease;
}

.overworld-title-box .btn-back-stage {
  margin-bottom: 8px;
}

/* ---------- Thanh cấp độ có khóa ---------- */
.sk-level-bar { flex-wrap: wrap; max-width: 100%; min-width: 0; box-sizing: border-box; }
.caro-setup-bar .sk-level-bar { width: 100%; margin-top: 8px; }
.diff-pill-btn.sk-locked {
  opacity: 0.55;
  filter: grayscale(0.6);
  border-style: dashed;
}
.sk-auto-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #5A6270;
  background: #F4F1FF;
  border: 2px solid #E4DAFF;
  border-radius: 999px;
  padding: 5px 10px;
}
.sk-progress {
  display: inline-block;
  width: 54px;
  height: 8px;
  border-radius: 8px;
  background: #E4DAFF;
  overflow: hidden;
}
.sk-progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #9D65FF, #38D39F);
  border-radius: 8px;
  transition: width 0.4s ease;
}

/* ---------- Trợ lý trả lời: loại đáp án, rung, hé lộ ---------- */
.sk-shake { animation: sk-shake 0.5s ease; }
@keyframes sk-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}
.sk-eliminated {
  opacity: 0.25 !important;
  transform: scale(0.92);
  filter: grayscale(1);
  transition: all 0.35s ease;
  pointer-events: none;
}
.sk-reveal { animation: sk-glow 1s ease-in-out 3; }
@keyframes sk-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(56, 211, 159, 0.0); }
  50% { box-shadow: 0 0 0 8px rgba(56, 211, 159, 0.45); }
}

/* ---------- Toast ---------- */
#sk-toast-wrap {
  position: fixed;
  left: 50%;
  top: 84px;
  transform: translateX(-50%);
  z-index: 10050;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(92vw, 420px);
  pointer-events: none;
}
.sk-toast {
  background: #fff;
  border: 3px solid #E4DAFF;
  color: #2B2D42;
  border-radius: 18px;
  padding: 12px 16px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(78, 93, 140, 0.2);
  opacity: 0;
  transform: translateY(-12px);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: center;
}
.sk-toast.show { opacity: 1; transform: translateY(0); }
.sk-toast-badge { border-color: #FFD13B; background: #FFFBEA; }

/* ---------- Banner lên cấp ---------- */
.sk-levelup-banner {
  position: fixed;
  inset: 0;
  z-index: 10040;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: rgba(157, 101, 255, 0.12);
  animation: sk-fade-in 0.3s ease;
}
.sk-levelup-banner.hide { opacity: 0; transition: opacity 0.45s ease; }
.sk-levelup-inner {
  background: linear-gradient(135deg, #9D65FF, #3AA8F7);
  color: #fff;
  padding: 26px 40px;
  border-radius: 32px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(78, 60, 160, 0.35);
  border: 5px solid #fff;
  animation: sk-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.sk-levelup-icon { font-size: 3.4rem; }
.sk-levelup-title { font-family: var(--font-display); font-size: 2.2rem; font-weight: 900; letter-spacing: 0.05em; }
.sk-levelup-sub { font-size: 1.2rem; font-weight: 800; margin-top: 4px; }
@keyframes sk-pop { 0% { transform: scale(0.3); } 100% { transform: scale(1); } }
@keyframes sk-fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Kệ huy hiệu ---------- */
.sk-badge-card { margin-top: 20px; }
.sk-badge-heading {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 900;
  text-align: center;
  margin-bottom: 6px;
}
.sk-badge-count {
  font-size: 1rem;
  background: #FFF4CC;
  border-radius: 999px;
  padding: 2px 10px;
  margin-left: 6px;
}
.sk-badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.sk-badge-item {
  background: #fff;
  border: 3px solid #EEE;
  border-radius: 20px;
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease;
}
@media (hover: hover) { .sk-badge-item:hover { transform: translateY(-3px); } }
.sk-badge-item.owned { border-color: #FFD13B; background: linear-gradient(180deg, #FFFBEA, #fff); }
.sk-badge-item.locked { opacity: 0.6; }
.sk-badge-icon { font-size: 2.3rem; }
.sk-badge-name { font-weight: 900; font-size: 0.92rem; margin-top: 4px; }
.sk-badge-desc { font-size: 0.78rem; color: #5A6270; margin-top: 2px; }

/* ---------- Góc Phụ Huynh v2 ---------- */
.pd-modal-card {
  max-width: 860px;
  max-height: 92vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.pd-modal-card .modal-title { padding: 0 44px; }
.pd-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #F6F3FF;
  border-radius: 18px;
  padding: 12px 16px;
  margin-bottom: 12px;
}
.pd-name { font-family: var(--font-display); font-size: 1.25rem; font-weight: 900; }
.pd-band { font-size: 0.9rem; color: #5A6270; }
.pd-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.pd-tile {
  background: #fff;
  border: 2px solid #EEE9FF;
  border-radius: 16px;
  padding: 10px 12px;
}
.pd-tile-val { font-family: var(--font-display); font-size: 1.4rem; font-weight: 900; color: #2B2D42; }
.pd-tile-label { font-size: 0.82rem; color: #5A6270; font-weight: 700; }
.pd-tile-sub { font-size: 0.78rem; color: #7C3AED; font-weight: 800; }
.pd-section {
  background: #fff;
  border: 2px solid #F0ECFA;
  border-radius: 18px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.pd-title { font-family: var(--font-display); font-size: 1.08rem; font-weight: 900; margin-bottom: 6px; }
.pd-note { font-size: 0.86rem; color: #5A6270; }
.pd-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pd-two-col .pd-section { margin-bottom: 12px; }
.pd-list { list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 0.92rem; }
.pd-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pd-go-btn {
  border: none;
  background: #9D65FF;
  color: #fff;
  font-weight: 800;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.8rem;
  cursor: pointer;
}

.pd-radar-wrap { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: center; }
.pd-radar { width: 240px; max-width: 100%; height: auto; }
.pd-radar-ring { fill: none; stroke: #E6E1F5; stroke-width: 1; }
.pd-radar-area { fill: rgba(157, 101, 255, 0.22); stroke: #7C3AED; stroke-width: 2; stroke-linejoin: round; }
.pd-radar-dot { fill: #7C3AED; stroke: #fff; stroke-width: 2; cursor: pointer; }
@media (hover: hover) { .pd-radar-dot:hover { r: 7; } }
.pd-radar-label { font-size: 18px; }
.pd-area-list { list-style: none; min-width: 200px; display: flex; flex-direction: column; gap: 6px; }
.pd-area-list li { display: flex; justify-content: space-between; gap: 12px; font-size: 0.92rem; border-bottom: 1px dashed #EEE; padding-bottom: 4px; }
.pd-area-val { font-weight: 900; color: #2B2D42; }
.pd-area-val em { font-weight: 600; color: #9AA0AA; font-style: normal; font-size: 0.82rem; }

.pd-trend { width: 100%; max-width: 480px; height: auto; display: block; margin: 0 auto; }
.pd-axis { stroke: #D9D4E8; stroke-width: 1; }
.pd-bar { fill: #9D65FF; }
@media (hover: hover) { .pd-bar-g:hover .pd-bar { fill: #7C3AED; } }
.pd-bar-val { font-size: 11px; font-weight: 800; fill: #2B2D42; }
.pd-bar-label { font-size: 10px; fill: #5A6270; font-weight: 700; }

.pd-table-wrap { overflow-x: auto; }
.pd-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; min-width: 520px; }
.pd-table th, .pd-table td { padding: 7px 8px; text-align: left; border-bottom: 1px solid #F0ECFA; }
.pd-table th { background: #F6F3FF; font-weight: 900; color: #4B4F5C; }
.pd-table td small { color: #9AA0AA; }

.pd-setting { margin-bottom: 12px; }
.pd-setting > label { display: block; font-weight: 800; font-size: 0.92rem; margin-bottom: 6px; }
.pd-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pd-pill {
  border: 2px solid #E4DAFF;
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 800;
  font-size: 0.86rem;
  cursor: pointer;
  font-family: inherit;
}
.pd-pill.active { background: #9D65FF; color: #fff; border-color: #9D65FF; }
.pd-switch { display: flex !important; align-items: center; gap: 8px; cursor: pointer; }
.pd-switch input { width: 20px; height: 20px; accent-color: #9D65FF; }
.pd-voice-status {
  background: #F9F8FC;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 0.84rem;
  margin: 8px 0;
  line-height: 1.6;
}
.pd-test-voice { margin-top: 4px; }

/* ---------- Toán có lời văn / Đọc hiểu / Điền vần ---------- */
.sk-word-problem {
  background: #FFF8EC;
  border: 3px dashed #FFD08A;
  border-radius: 20px;
  padding: 16px 18px;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.6;
  text-align: center;
  margin: 10px 0 16px;
}
.sk-word-visual { font-size: 1.9rem; margin-top: 6px; letter-spacing: 2px; }
.sk-reading-passage {
  background: #F2FBF7;
  border: 3px solid #BDEFD9;
  border-radius: 20px;
  padding: 16px 18px;
  font-size: 1.2rem;
  line-height: 1.75;
  font-weight: 700;
  margin: 10px 0 14px;
}
.sk-reading-title { font-family: var(--font-display); font-weight: 900; font-size: 1.3rem; margin-bottom: 6px; }
.sk-rhyme-word {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 900;
  text-align: center;
  letter-spacing: 0.05em;
  margin: 6px 0 14px;
}
.sk-rhyme-emoji { font-size: 4rem; text-align: center; }
.sk-rhyme-blank { color: #FF5E7E; border-bottom: 5px solid #FF5E7E; padding: 0 6px; }

/* ---------- Luyện viết: điểm chấm thật ---------- */
.sk-write-score { font-size: 1.6rem; letter-spacing: 3px; }

/* Tiêu đề màn hình dài (vd: "Phòng Siêu Trí Nhớ") không bị cắt trên điện thoại */
.view-heading { min-width: 0; flex: 1 1 auto; justify-content: center; flex-wrap: wrap; text-align: center; }
.btn-back-home { flex-shrink: 0; }

@media (max-width: 640px) {
  .view-top-header > div:empty { display: none; }
  /* Thanh cấp độ gọn 1 hàng, vuốt ngang để xem các cấp khác */
  .difficulty-level-bar {
    flex-wrap: nowrap !important;
    flex-direction: row !important;
    justify-content: flex-start !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 6px 10px !important;
    gap: 6px !important;
  }
  .difficulty-level-bar::-webkit-scrollbar { display: none; }
  .difficulty-level-bar > * { flex-shrink: 0; }
  .view-heading { font-size: 1.1rem !important; line-height: 1.25; }
  .pd-two-col { grid-template-columns: 1fr; }
  .pd-modal-card { padding: 22px 14px; border-radius: 22px; }
  .sk-rhyme-word { font-size: 2.3rem; }
  .sk-word-problem, .sk-reading-passage { font-size: 1.08rem; }
  .sk-auto-chip { font-size: 0.75rem; }
}

/* ===== Góc Phụ Huynh gọn: tab + đầu trang nhỏ (v95) ===== */
.pd-modal-card { padding: 18px 18px 22px; }
.pd-modal-card .pd-modal-title { font-size: 1.35rem; margin-bottom: 8px; text-align: center; padding: 0 40px; }
.pd-header { align-items: center; gap: 10px; padding: 8px 12px; margin-bottom: 8px; justify-content: flex-start; }
.pd-avatar { font-size: 2rem; line-height: 1; width: 48px; height: 48px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; flex: none; border: 2px solid #E4DAFF; }
.pd-head-text { min-width: 0; }
.pd-name { font-size: 1.1rem; }
.pd-band { font-size: 0.82rem; font-weight: 700; }
.pd-tabs { position: sticky; top: -18px; z-index: 5; background: #fff; display: flex; gap: 3px; padding: 6px 0 8px; margin-bottom: 8px; border-bottom: 2px solid #F0ECFA; overflow-x: auto; scrollbar-width: none; }
.pd-tabs::-webkit-scrollbar { display: none; }
.pd-tab { flex: 1 1 0; min-width: 0; min-height: 48px; border: none; background: #F6F3FF; border-radius: 14px; font-family: var(--font-body); font-weight: 800; font-size: 0.7rem; color: #5A6270; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 4px 2px; white-space: nowrap; }
.pd-tab span { font-size: 1.15rem; line-height: 1; }
.pd-tab.active { background: #7C3AED; color: #fff; }
.pd-panel { display: none; animation: fadeIn 0.2s; }
.pd-panel.active { display: block; }
.pd-tiles { grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.pd-tile { padding: 8px 10px; }
.pd-tile-val { font-size: 1.2rem; }
.pd-tile-label { font-size: 0.74rem; }
.pd-tile-sub { font-size: 0.72rem; }
.pd-section { padding: 10px 12px; margin-bottom: 10px; }
.pd-title { font-size: 1rem; }
.pd-insight .pd-list li { display: block; line-height: 1.45; }
.pd-panel .pd-section:last-child { margin-bottom: 0; }
#pd-account .pd-section, #pd-family .pd-section, #pd-habits .pd-section { margin-bottom: 10px; }
.pd-pin-row { align-items: center; }
.pd-pin-row .pd-note { flex-basis: 100%; }
@media (max-width: 480px) {
  .pd-tiles { grid-template-columns: repeat(2, 1fr); }
  .pd-modal-card { padding: 14px 12px 18px; }
  .pd-tabs { top: -14px; }
}


/* ===== css/base/responsive.css ===== */
/**
 * Sam Kido - Giao Diện Siêu Mượt Tối Ưu Hóa 100% Cho iPhone, iPad & Thiết Bị Di Động
 */

/* ================= 1. THIẾT LẬP TOÀN CỤC CHO MOBILE & IPHONE ================= */
html, body {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* ================= 2. RESPONSIVE CHO TABLET & MOBILE (< 768px) ================= */
@media (max-width: 768px) {
  /* Layout tổng thể */
  .app-viewport {
    padding: 12px 10px calc(80px + env(safe-area-inset-bottom, 15px)) 10px;
    max-width: 100%;
  }

  /* Top Navbar */
  .top-navbar {
    padding: max(8px, env(safe-area-inset-top, 8px)) 12px 8px 12px;
    gap: 8px;
    justify-content: space-between;
  }

  .brand-logo {
    gap: 6px;
  }

  .brand-title {
    font-size: 1.25rem;
  }

  .logo-badge {
    font-size: 1.8rem;
  }

  .user-profile-badge {
    padding: 4px 8px;
    gap: 6px;
  }

  .profile-avatar-wrapper {
    width: 34px;
    height: 34px;
    font-size: 1.2rem;
  }

  .profile-name {
    font-size: 0.82rem;
    max-width: 65px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .profile-age-badge {
    display: none;
  }

  .profile-edit-btn {
    font-size: 0.85rem;
  }

  .user-stats-bar {
    gap: 6px;
  }

  .stat-pill {
    padding: 5px 10px;
    font-size: 0.85rem;
    gap: 4px;
  }

  .rank-pill {
    display: none; /* Ẩn bớt danh hiệu dài trên topbar mobile để tránh chật chội */
  }

  .header-actions {
    display: none; /* Điều hướng được chuyển xuống thanh bottom navigation */
  }

  /* Bottom Navigation Bar chuẩn iOS */
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1.5px solid rgba(226, 232, 240, 0.85);
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.08);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 12px)) 8px;
    /* Cài như app trên iPhone: chiều cao tự giãn theo vạch Home, không ép 68px cố định (chữ sẽ bị chen) */
    height: auto;
    min-height: 68px;
    justify-content: space-around;
    align-items: center;
  }

  .b-nav-item .b-nav-label { line-height: 1.1; text-align: center; }

  .b-nav-item {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: #64748B;
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 800;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 14px;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    -webkit-user-select: none;
    user-select: none;
  }

  .b-nav-item .b-nav-icon {
    font-size: 1.45rem;
    transition: transform 0.2s;
  }

  .b-nav-item.active {
    color: #FF4757;
    background: #FFF1F2;
  }

  .b-nav-item.active .b-nav-icon {
    transform: scale(1.18);
  }

  /* Banner Chào Bé & Khám Phá */
  .mascot-hero-section {
    flex-direction: row;
    padding: 10px 14px;
    gap: 10px;
    margin: 4px auto 14px;
    text-align: left;
    border-radius: 20px;
  }

  .mascot-avatar {
    font-size: 2rem;
  }

  .mascot-bubble h2 {
    font-size: 0.95rem;
    margin-bottom: 2px;
  }

  .mascot-bubble p {
    font-size: 0.82rem;
    line-height: 1.35;
  }

  .home-map-cta-banner {
    padding: 14px 12px;
    border-radius: 20px;
    margin-bottom: 16px;
  }

  .cta-banner-content h3 {
    font-size: 1.15rem;
  }

  .cta-banner-content p {
    font-size: 0.82rem;
  }

  .btn-launch-map-quest {
    padding: 8px 16px;
    font-size: 0.9rem;
  }

  /* Lưới Chuyên Mục Học Tập */
  .categories-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .category-card {
    padding: 16px 14px;
    border-radius: 22px;
  }

  .category-icon {
    font-size: 2.4rem;
  }

  .category-title {
    font-size: 1.25rem;
  }

  .category-desc {
    font-size: 0.85rem;
    line-height: 1.35;
  }

  /* Tiêu Đề Màn Chơi & Nút Quay Về */
  .view-top-header {
    padding: 4px 0 10px 0;
    margin-bottom: 8px;
    gap: 8px;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .btn-back-home {
    padding: 7px 14px;
    font-size: 0.86rem;
    border-radius: 50px;
    white-space: nowrap;
  }

  .view-heading {
    font-size: 1.2rem;
    font-weight: 800;
    text-align: center;
  }

  /* Thanh Tab Chuyển Đổi Dạng Carousel Vuốt Ngang Mượt Mà */
  .game-tabs-nav {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 8px;
    padding: 4px 4px 10px 4px;
    margin-bottom: 12px;
  }

  .game-tabs-nav::-webkit-scrollbar {
    display: none;
  }

  .tab-btn {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 8px 16px;
    font-size: 0.88rem;
    border-radius: 50px;
  }

  /* Bộ Chọn Cấp Độ Vuốt Ngang */
  .difficulty-selector {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
    padding: 4px 2px 10px 2px;
    justify-content: flex-start;
    margin-bottom: 10px;
  }

  .difficulty-selector::-webkit-scrollbar {
    display: none;
  }

  .difficulty-btn {
    flex: 0 0 auto;
    padding: 6px 12px;
    font-size: 0.82rem;
    border-radius: 16px;
    white-space: nowrap;
  }

  /* Thẻ Trò Chơi Chính */
  .game-card {
    padding: 16px 12px;
    border-radius: 22px;
    border-width: 3px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  }

  .game-header {
    gap: 6px;
    margin-bottom: 10px;
  }

  .game-badge {
    font-size: 0.82rem;
    padding: 5px 10px;
  }

  .voice-btn {
    font-size: 0.82rem;
    padding: 5px 12px;
    border-radius: 16px;
  }

  .section-instruction {
    font-size: 0.85rem;
    margin-bottom: 12px;
    line-height: 1.4;
  }

  .game-question {
    font-size: 1.25rem;
    line-height: 1.42;
    margin: 12px 0 16px 0;
    padding: 0 4px;
  }

  /* Lưới Nút Chọn Đáp Án Cảm Ứng Lớn */
  .options-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .option-btn {
    min-height: 58px;
    font-size: 1.35rem;
    padding: 10px 6px;
    border-radius: 18px;
    border-width: 3px;
  }

  .option-btn.text-long {
    font-size: 1.05rem;
    line-height: 1.3;
  }

  /* Phân Hệ Tiếng Việt & Bảng Chữ Cái */
  .alphabet-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }

  .letter-card {
    padding: 12px 4px;
    border-radius: 16px;
  }

  .letter-main {
    font-size: 1.6rem;
  }

  .letter-icon {
    font-size: 1.2rem;
  }

  .letter-word {
    font-size: 0.78rem;
  }

  /* Phân Hệ Trí Não & Mê Cung & Đấu Trí 2 Người */
  .memory-grid {
    gap: 6px;
    max-width: 100%;
    margin: 0 auto 14px;
  }

  .grid-4 { grid-template-columns: repeat(2, 1fr); max-width: 200px; }
  .grid-8 { grid-template-columns: repeat(4, 1fr); max-width: 360px; }
  .grid-12 { grid-template-columns: repeat(3, 1fr); max-width: 360px; }
  .grid-16 { grid-template-columns: repeat(4, 1fr); max-width: 360px; }
  .grid-20 { grid-template-columns: repeat(4, 1fr); max-width: 360px; }
  .grid-24 { grid-template-columns: repeat(4, 1fr); max-width: 360px; }

  .memory-card {
    height: 72px;
    border-radius: 12px;
  }

  .grid-20 .memory-card, .grid-24 .memory-card {
    height: 62px;
  }

  .card-front {
    font-size: 1.3rem;
    border-radius: 12px;
  }

  .card-back {
    border-radius: 12px;
  }

  .card-back .card-icon {
    font-size: 1.3rem;
  }

  .card-back .card-name {
    font-size: 0.68rem;
    line-height: 1.1;
  }

  .versus-live-scoreboard {
    gap: 6px;
  }

  .player-score-card {
    padding: 8px 10px;
    gap: 8px;
    border-radius: 16px;
  }

  .player-avatar-box {
    width: 34px;
    height: 34px;
  }

  .score-avatar-emoji {
    font-size: 1.3rem;
  }

  .player-name {
    font-size: 0.78rem;
  }

  .player-pairs-count {
    font-size: 0.95rem;
  }

  .vs-badge {
    font-size: 0.82rem;
    padding: 4px 8px;
  }

  .versus-turn-banner {
    font-size: 0.8rem;
    padding: 6px 10px;
  }

  .pvp-battle-arena {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .pvp-question-title {
    font-size: 1.12rem;
  }

  .pvp-question-visual {
    font-size: 1.4rem;
  }

  .btn-pvp-ans {
    padding: 10px 8px;
    font-size: 0.95rem;
    min-height: 48px;
  }

  .caro-board-container.size-3 {
    max-width: 280px;
  }

  .caro-board-container.size-5 {
    max-width: 340px;
    gap: 5px;
    padding: 8px;
  }

  .caro-cell-symbol {
    font-size: 1.8rem;
  }

  .caro-board-container.size-5 .caro-cell-symbol {
    font-size: 1.3rem;
  }

  .shadow-match-arena {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .maze-grid {
    gap: 3px;
    max-width: 340px;
    margin: 0 auto;
  }

  .maze-cell {
    width: calc((100vw - 64px) / 7);
    height: calc((100vw - 64px) / 7);
    max-width: 44px;
    max-height: 44px;
    font-size: 1.3rem;
  }

  .maze-dpad {
    margin-top: 14px;
    gap: 8px;
  }

  .dpad-btn {
    width: 54px;
    height: 54px;
    font-size: 1.5rem;
    border-radius: 18px;
  }

  .character-picker-grid {
    gap: 8px;
  }

  .char-option-btn {
    padding: 6px 10px;
    font-size: 0.8rem;
  }

  /* Phân Hệ Họa Sĩ Nhí & Tô Màu */
  .coloring-canvas-container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .coloring-interactive-box, .svg-coloring-box {
    padding: 10px 8px;
    border-radius: 20px;
    border-width: 4px;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .coloring-interactive-canvas {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 48vh !important;
    height: auto !important;
    object-fit: contain !important;
    border-radius: 14px;
    display: block;
    margin: 0 auto;
    touch-action: none;
  }

  .svg-coloring-art {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 46vh !important;
    height: auto !important;
    display: block;
    margin: 0 auto;
  }

  .color-palette {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 8px;
    padding: 6px 10px;
    background: #F8FAFC;
    border-radius: 50px;
    border: 2px solid #E2E8F0;
    width: 100%;
    box-sizing: border-box;
    justify-content: flex-start;
  }

  .color-palette::-webkit-scrollbar {
    display: none;
  }

  .color-dot {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  }

  .coloring-templates-grid {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 10px;
    padding: 8px 6px 12px 6px;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 10px;
    background: #F8FAFC;
    border-radius: 20px;
    border: 2px dashed #CBD5E0;
  }

  .coloring-templates-grid::-webkit-scrollbar {
    display: none;
  }

  .template-card {
    flex: 0 0 110px;
    min-width: 110px;
    padding: 8px 6px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .template-card-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
  }

  .template-card-title {
    font-size: 0.74rem;
    line-height: 1.2;
  }

  .coloring-mode-badge {
    font-size: 0.78rem;
    padding: 4px 10px;
    line-height: 1.3;
    border-radius: 20px;
  }

  .coloring-toolbar-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    width: 100%;
    margin-top: 8px;
  }

  .btn-coloring-action {
    flex: 1;
    padding: 9px 12px;
    font-size: 0.86rem;
    border-radius: 16px;
    min-height: 42px;
    text-align: center;
  }

  .btn-finish-coloring {
    width: 100%;
    padding: 12px 14px;
    font-size: 0.98rem;
    border-radius: 24px;
    min-height: 48px;
    text-align: center;
  }

  /* Xưởng Vẽ Tí Hon (Drawing Studio) trên Mobile */
  .art-studio-arena {
    width: 100%;
    max-width: 100%;
  }

  .canvas-wrapper {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    border-radius: 18px;
    padding: 6px;
  }

  #art-drawing-canvas {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 45vh !important;
    border-radius: 14px;
    touch-action: none;
  }

  .toolbar-group {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
  }

  /* Phân Hệ Bé Ngoan & 5 Điều Bác Hồ Dạy */
  .uncle-ho-card {
    padding: 14px 12px;
    border-radius: 18px;
  }

  .uncle-ho-card h3 {
    font-size: 1.05rem;
  }

  .scenario-card {
    padding: 14px 12px;
    border-radius: 18px;
  }

  .scenario-situation {
    font-size: 1.05rem;
    line-height: 1.45;
  }

  .true-false-actions {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .btn-true-false {
    width: 100%;
    min-height: 56px;
    font-size: 1.15rem;
  }

  .good-deeds-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  /* Bản Đồ Thám Hiểm */
  .world-map-container {
    padding: 4px;
  }

  .panoramic-world-stage {
    padding: 10px 6px;
    border-radius: 20px;
  }

  .world-stage-canvas-card {
    min-height: 270px;
    padding: 12px 6px;
    border-radius: 18px;
  }

  .stepping-stone-btn {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }

  .map-islands-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .island-card {
    padding: 14px 12px;
    border-radius: 18px;
  }

  /* Hộp Thoại Popup & Modals */
  .app-modal {
    padding: 10px;
  }

  .modal-content {
    width: 95vw !important;
    max-width: 95vw !important;
    max-height: 88vh;
    padding: 18px 14px;
    border-radius: 24px;
  }

  .modal-header h2 {
    font-size: 1.2rem;
  }

  .modal-close-btn {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }

  .parent-settings-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .sticker-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .sticker-item {
    padding: 10px 4px;
  }

  .sticker-item .sticker-emoji {
    font-size: 2.2rem;
  }
}

/* ================= 3. ĐIỀU CHỈNH RIÊNG CHO MÀN HÌNH NHỎ (< 390px - iPhone SE/Mini) ================= */
@media (max-width: 390px) {
  .brand-title {
    font-size: 1.1rem;
  }

  .alphabet-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .options-grid {
    gap: 8px;
  }

  .option-btn {
    min-height: 52px;
    font-size: 1.2rem;
  }

  .b-nav-item .b-nav-label {
    font-size: 0.68rem;
  }
}



/* ===== css/labs/focus-lab.css ===== */
/* ================= 🎯 PHÒNG TẬP TRUNG (FOCUS LAB) ================= */
/* Mọi lớp mới đều có tiền tố fl- ; tái sử dụng game-card, game-header,
   game-badge, voice-btn, section-instruction, game-hint, feedback-msg,
   bounce-in, pop-in từ games.css */

.fl-card {
  overflow: hidden;
  max-width: 100%;
}

.fl-card * {
  box-sizing: border-box;
}

.fl-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  min-height: 230px;
  width: 100%;
}

.fl-instruction {
  margin-bottom: 14px;
}

.fl-hidden {
  display: none !important;
}

/* ---------- Dòng trạng thái ---------- */
.fl-status {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: #7A4A00;
  background: #FFF6E6;
  border: 2px solid #FFE1A8;
  border-radius: 20px;
  padding: 8px 18px;
  text-align: center;
  max-width: 100%;
  line-height: 1.4;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fl-status-pop {
  animation: flPop 0.35s ease-out;
}

/* ---------- Chip thông tin ---------- */
.fl-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.fl-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #F1F8FF;
  color: #0F5C8C;
  border: 2px solid #C5E4FB;
  border-radius: 16px;
  padding: 6px 13px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.3;
  text-align: center;
}

.fl-rule-chip {
  background: #FFF0F4;
  color: #9B2C45;
  border-color: #FFC9D7;
}

.fl-jar-chip {
  background: #EDFBF4;
  color: #0A6A4A;
  border-color: #A7EBCE;
}

.fl-jar-pop {
  animation: flPop 0.4s ease-out;
}

.fl-rule-flash {
  animation: flRuleFlash 0.9s ease-out;
}

/* ---------- Nút ---------- */
.fl-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

.fl-actions:empty,
.fl-next-wrap:empty {
  display: none;
}

.fl-next-wrap {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.fl-big-btn,
.fl-soft-btn {
  min-height: 56px;
  padding: 12px 26px;
  border-radius: 22px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  cursor: pointer;
  border: 3px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  touch-action: manipulation;
}

.fl-big-btn {
  background: var(--primary-orange);
  color: #fff;
  border-color: #E8860C;
  box-shadow: 0 6px 0 #C96F00;
}

.fl-soft-btn {
  background: #fff;
  color: #8A5200;
  border-color: #FFDFA8;
  box-shadow: 0 6px 0 #FFDFA8;
}

@media (hover: hover) { .fl-big-btn:hover,
.fl-soft-btn:hover {
  transform: translateY(-2px);
} }

.fl-big-btn:active,
.fl-soft-btn:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #C96F00;
}

/* ---------- Tổng kết ván ---------- */
.fl-detail {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.45;
}

.fl-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.75);
  border: 2px solid rgba(0, 0, 0, 0.07);
  border-radius: 14px;
  padding: 5px 11px;
  font-size: 0.9rem;
}

.fl-tag-soft {
  opacity: 0.85;
}

/* =========================================================
   1. BẮT BƯỚM ĐỪNG BẮT ONG (GO / NO-GO)
   ========================================================= */
.fl-gng-stage {
  position: relative;
  width: 100%;
  max-width: 420px;
  min-height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(170deg, #EFFBF1 0%, #DFF4FF 100%);
  border: 4px solid #CFEBD8;
  border-radius: 28px;
  padding: 12px;
}

.fl-creature {
  width: 120px;
  height: 120px;
  min-width: 120px;
  border-radius: 50%;
  border: 4px solid #fff;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 6px 16px rgba(60, 100, 80, 0.14);
  font-size: 4.2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color 0.15s ease, background 0.15s ease;
  padding: 0;
}

.fl-creature.fl-blank {
  opacity: 0.45;
  font-size: 2.6rem;
  cursor: default;
  box-shadow: none;
}

.fl-creature-in {
  animation: flCreatureIn 0.26s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Nút vợt: to, dễ bấm, sáng lên khi tới lượt */
.fl-net-btn {
  min-height: 72px;
  min-width: 200px;
  padding: 14px 30px;
  border-radius: 26px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.5rem;
  color: #fff;
  background: #B6BFCC;
  border: 4px solid #9AA5B4;
  box-shadow: 0 7px 0 #828D9C;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.12s ease;
}

.fl-net-btn.fl-net-ready {
  background: var(--primary-coral);
  border-color: #E8476A;
  box-shadow: 0 7px 0 #C93659;
  animation: flNetReady 1.1s ease-in-out infinite;
}

.fl-net-btn:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #C93659;
}

.fl-net-btn:disabled {
  cursor: default;
}

/* Phản hồi tức thì, dịu dàng */
.fl-good-flash {
  animation: flGoodFlash 0.5s ease-out;
  border-color: #38D39F !important;
}

.fl-ok-flash {
  animation: flOkFlash 0.5s ease-out;
}

.fl-oops-flash {
  animation: flOopsFlash 0.5s ease-out;
}

.fl-soft-shake {
  animation: flSoftShake 0.42s ease-in-out;
}

/* Bảng thông báo đổi luật */
.fl-flip-banner {
  position: absolute;
  inset: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 252, 240, 0.96);
  border: 4px solid var(--primary-yellow);
  border-radius: 24px;
  z-index: 3;
  padding: 10px;
}

.fl-flip-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.5rem;
  color: #A3480A;
  text-align: center;
  line-height: 1.25;
}

.fl-flip-icon {
  font-size: 2.4rem;
  animation: flSpin 1.2s ease-in-out infinite;
}

.fl-flip-sub {
  font-size: 1.1rem;
  font-weight: 800;
  color: #6B4A12;
}

/* =========================================================
   2. ĐỔI LUẬT THẦN TỐC (DCCS)
   ========================================================= */
.fl-rule-board {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 420px;
  min-height: 62px;
  padding: 10px 18px;
  border-radius: 24px;
  background: #FFF0F4;
  border: 4px solid #FFC2D3;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.45rem;
  color: #9B2C45;
  text-align: center;
  line-height: 1.2;
}

.fl-rule-board.fl-rule-shape {
  background: #EEF4FF;
  border-color: #BFD5FF;
  color: #1E4894;
}

.fl-rule-board.fl-rule-size {
  background: #F3EEFF;
  border-color: #D7C6FF;
  color: #5A2FA8;
}

.fl-rule-icon {
  font-size: 1.7rem;
  line-height: 1;
}

.fl-sw-cardwrap {
  display: flex;
  justify-content: center;
  width: 100%;
}

.fl-sw-card {
  width: 128px;
  height: 150px;
  border-radius: 22px;
  background: #fff;
  border: 4px solid #E6EDF7;
  box-shadow: 0 8px 18px rgba(70, 90, 130, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}

.fl-sw-card.fl-blank {
  opacity: 0.5;
}

.fl-card-in {
  animation: flCardIn 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fl-glyph {
  font-size: 3.6rem;
  line-height: 1;
  display: inline-block;
  /* Hình khối phẳng, không dùng emoji nên luôn hiển thị đúng màu */
  font-family: 'Segoe UI Symbol', 'Arial Unicode MS', var(--font-body), sans-serif;
}

.fl-glyph.fl-g-big {
  font-size: 4.4rem;
}

.fl-glyph.fl-g-small {
  font-size: 2.6rem;
}

.fl-boxes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 440px;
}

.fl-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 140px;
  padding: 10px 6px;
  border-radius: 22px;
  background: #FBFDFF;
  border: 4px dashed #C9D9EC;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.14s ease, border-color 0.15s ease, background 0.15s ease;
}

@media (hover: hover) { .fl-box:hover:not(:disabled) {
  transform: translateY(-3px);
  border-color: var(--primary-blue);
  background: #F3FAFF;
} }

.fl-box:disabled {
  cursor: default;
  opacity: 0.75;
}

.fl-box-label {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  color: #3D5370;
}

.fl-box-desc {
  font-size: 0.78rem;
  font-weight: 700;
  color: #6B7C94;
  line-height: 1.25;
  text-align: center;
}

.fl-box .fl-glyph.fl-g-big {
  font-size: 3.1rem;
}

.fl-box .fl-glyph.fl-g-small {
  font-size: 1.9rem;
}

.fl-show-answer {
  animation: flShowAnswer 1.2s ease-out;
  border-color: #38D39F !important;
  border-style: solid !important;
}

/* =========================================================
   3. TÌM NHANH TRONG ĐÁM ĐÔNG
   ========================================================= */
.fl-timebar {
  width: 100%;
  max-width: 420px;
  height: 16px;
  border-radius: 10px;
  background: #EAF1F8;
  border: 2px solid #D4E2F0;
  overflow: hidden;
}

.fl-timebar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #6FD6A8, #38D39F);
  border-radius: 8px;
  transition: width 0.12s linear;
}

.fl-timebar.fl-time-low > span {
  background: linear-gradient(90deg, #FFB870, #FF8A8A);
}

/* Lưới hình: KHÔNG dùng định vị tuyệt đối để không hình nào bị che */
.fl-field {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: 7px;
  width: 100%;
  padding: 10px;
  background: #FCFBFF;
  border: 4px solid #E7E0FA;
  border-radius: 24px;
}

.fl-sitem {
  min-width: 48px;
  min-height: 52px;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  line-height: 1;
  border-radius: 14px;
  background: #fff;
  border: 2px solid #ECECF4;
  cursor: pointer;
  touch-action: manipulation;
  padding: 0;
  transition: transform 0.12s ease, background 0.15s ease, opacity 0.2s ease;
}

@media (hover: hover) { .fl-sitem:hover:not(:disabled) {
  transform: scale(1.08);
  background: #FFF9E8;
} }

.fl-field-locked .fl-sitem {
  opacity: 0.55;
  cursor: default;
}

.fl-sitem.fl-found {
  background: #DEF7EC;
  border-color: #84E1BC;
  opacity: 1 !important;
  animation: flFound 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fl-sitem.fl-reveal {
  background: #FFF3CD;
  border-color: var(--primary-yellow);
  opacity: 1 !important;
  animation: flRevealPulse 1s ease-in-out 2;
}

.fl-find-chip {
  background: #FFF3CD;
  color: #7A5B00;
  border-color: #FFE8A8;
}

.fl-found-chip {
  background: #EDFBF4;
  color: #0A6A4A;
  border-color: #A7EBCE;
}

/* =========================================================
   HIỆU ỨNG
   ========================================================= */
@keyframes flPop {
  0% { transform: scale(0.88); }
  60% { transform: scale(1.07); }
  100% { transform: scale(1); }
}

@keyframes flCreatureIn {
  0% { transform: scale(0.5) rotate(-12deg); opacity: 0; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes flCardIn {
  0% { transform: translateY(-14px) scale(0.85); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes flNetReady {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes flGoodFlash {
  0% { background: rgba(56, 211, 159, 0.15); }
  35% { background: rgba(56, 211, 159, 0.55); transform: scale(1.06); }
  100% { background: rgba(255, 255, 255, 0.78); transform: scale(1); }
}

@keyframes flOkFlash {
  0% { box-shadow: 0 0 0 0 rgba(56, 211, 159, 0.5); }
  100% { box-shadow: 0 0 0 16px rgba(56, 211, 159, 0); }
}

@keyframes flOopsFlash {
  0% { background: rgba(255, 184, 112, 0.2); }
  40% { background: rgba(255, 184, 112, 0.5); }
  100% { background: rgba(255, 255, 255, 0.78); }
}

@keyframes flSoftShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px) rotate(-2deg); }
  45% { transform: translateX(5px) rotate(2deg); }
  70% { transform: translateX(-3px) rotate(-1deg); }
}

@keyframes flRuleFlash {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 209, 59, 0.75); }
  40% { transform: scale(1.05); box-shadow: 0 0 0 12px rgba(255, 209, 59, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 209, 59, 0); }
}

@keyframes flShowAnswer {
  0%, 100% { background: #FBFDFF; }
  30%, 70% { background: #DEF7EC; }
}

@keyframes flFound {
  0% { transform: scale(1); }
  45% { transform: scale(1.3) rotate(8deg); }
  100% { transform: scale(1) rotate(0deg); }
}

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

@keyframes flSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* =========================================================
   MÁY TÍNH: rộng rãi hơn
   ========================================================= */
@media (min-width: 768px) {
  .fl-gng-stage {
    max-width: 520px;
    min-height: 210px;
  }

  .fl-creature {
    width: 148px;
    height: 148px;
    min-width: 148px;
    font-size: 5.2rem;
  }

  .fl-rule-board,
  .fl-timebar {
    max-width: 520px;
  }

  .fl-boxes {
    max-width: 520px;
  }

  .fl-field {
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: 10px;
    max-width: 760px;
  }

  .fl-sitem {
    font-size: 2.1rem;
    min-height: 60px;
  }
}

/* =========================================================
   ĐIỆN THOẠI NHỎ (360px vẫn không tràn ngang)
   ========================================================= */
@media (max-width: 480px) {
  .fl-stage {
    gap: 10px;
    min-height: 190px;
  }

  .fl-status {
    font-size: 0.98rem;
    padding: 7px 12px;
  }

  .fl-chip {
    font-size: 0.82rem;
    padding: 5px 10px;
  }

  .fl-gng-stage {
    min-height: 140px;
    border-radius: 22px;
    padding: 8px;
  }

  .fl-creature {
    width: 100px;
    height: 100px;
    min-width: 100px;
    font-size: 3.4rem;
  }

  .fl-net-btn {
    min-height: 64px;
    min-width: 170px;
    font-size: 1.3rem;
    padding: 12px 22px;
  }

  .fl-flip-inner {
    font-size: 1.2rem;
  }

  .fl-flip-icon {
    font-size: 2rem;
  }

  .fl-flip-sub {
    font-size: 0.95rem;
  }

  .fl-rule-board {
    font-size: 1.15rem;
    min-height: 54px;
    padding: 8px 12px;
    border-width: 3px;
  }

  .fl-rule-icon {
    font-size: 1.4rem;
  }

  .fl-sw-card {
    width: 108px;
    height: 126px;
  }

  .fl-glyph {
    font-size: 3rem;
  }

  .fl-glyph.fl-g-big {
    font-size: 3.6rem;
  }

  .fl-glyph.fl-g-small {
    font-size: 2.2rem;
  }

  .fl-boxes {
    gap: 9px;
  }

  .fl-box {
    min-height: 124px;
    border-width: 3px;
    padding: 8px 4px;
  }

  .fl-box-label {
    font-size: 0.95rem;
  }

  .fl-box-desc {
    font-size: 0.7rem;
  }

  .fl-box .fl-glyph.fl-g-big {
    font-size: 2.6rem;
  }

  .fl-box .fl-glyph.fl-g-small {
    font-size: 1.6rem;
  }

  .fl-field {
    grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
    gap: 6px;
    padding: 7px;
    border-width: 3px;
    border-radius: 18px;
  }

  .fl-sitem {
    font-size: 1.6rem;
    min-height: 48px;
    border-radius: 12px;
  }

  .fl-big-btn,
  .fl-soft-btn {
    font-size: 1.05rem;
    padding: 10px 18px;
  }

  .fl-detail {
    font-size: 0.86rem;
    gap: 6px;
  }

  .fl-tag {
    font-size: 0.8rem;
    padding: 4px 9px;
  }
}

/* Máy rất nhỏ (<=340px): lưới tìm kiếm co thêm nhưng vẫn >=44px */
@media (max-width: 340px) {
  .fl-field {
    grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  }

  .fl-sitem {
    min-width: 44px;
    min-height: 44px;
    font-size: 1.45rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fl-card *:not(.fl-timebar > span) {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}


/* ===== css/labs/reason-lab.css ===== */
/* =========================================================
   Sam Kido - 🧠 Phòng Suy Luận (Reason Lab)
   Mọi lớp đều có tiền tố "rs-" để không đụng vào các màn khác.
   Dùng lại các lớp sẵn có: game-card, game-header, game-badge,
   voice-btn, section-instruction, game-question, game-hint,
   options-grid, game-opt-btn, feedback-msg, bounce-in, pop-in.
   Mục tiêu: vùng chạm >= 48px, chạy đẹp từ 360px tới màn hình lớn.
   ========================================================= */

.rs-card {
  border-color: #E4DAFF;
  background: linear-gradient(180deg, #FFFFFF 0%, #FBF8FF 100%);
}

.rs-card .rs-sub {
  margin-bottom: 16px;
}

/* ---------------------------------------------------------
   1. MA TRẬN HÌNH BÍ ẨN
   --------------------------------------------------------- */
.rs-matrix-wrap {
  display: flex;
  justify-content: center;
  margin: 0 0 20px;
}

.rs-matrix-grid {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: #F4F0FF;
  border: 4px solid #E0D4FF;
  border-radius: 28px;
  box-shadow: inset 0 3px 10px rgba(110, 80, 190, 0.08);
}

.rs-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.rs-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.rs-cell {
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  border: 3px solid #D9CCFA;
  border-radius: 20px;
  box-shadow: 0 3px 0 #D3C4F7;
  overflow: hidden;
}

.rs-cols-2 .rs-cell {
  width: 116px;
  height: 116px;
}

.rs-cell-q {
  background: repeating-linear-gradient(45deg, #FFF8E1, #FFF8E1 10px, #FFF2CC 10px, #FFF2CC 20px);
  border-color: #FFC94D;
  border-style: dashed;
  box-shadow: 0 3px 0 #F0BE4A;
  animation: rsPulse 1.5s ease-in-out infinite;
}

.rs-qmark {
  font-family: var(--font-display, sans-serif);
  font-size: 2.8rem;
  font-weight: 800;
  color: #D98E00;
  line-height: 1;
}

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

/* Cụm hình trong một ô (1-3 hình xếp cạnh nhau) */
.rs-fig {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  line-height: 0;
  max-width: 100%;
}

.rs-fig-n3 {
  gap: 2px;
}

.rs-svg {
  display: block;
  flex: 0 0 auto;
}

/* Nút đáp án chứa hình SVG */
.rs-options {
  max-width: 560px;
}

.rs-opt {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 96px;
  padding: 10px;
}

.rs-matrix-opt {
  flex-direction: column;
  gap: 4px;
}

/* ---------------------------------------------------------
   2. GIỐNG NHAU THẾ NÀO? (loại suy)
   --------------------------------------------------------- */
.rs-ana-board {
  max-width: 480px;
  margin: 0 auto 20px;
  padding: 16px 12px;
  background: #EAF7FF;
  border: 4px solid #C9E9FF;
  border-radius: 28px;
}

.rs-ana-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.rs-ana-link {
  font-size: 1.6rem;
  flex: 0 0 auto;
}

.rs-ana-eq {
  text-align: center;
  font-family: var(--font-display, sans-serif);
  font-weight: 800;
  font-size: 1rem;
  color: #0077B6;
  margin: 10px 0;
  letter-spacing: 0.5px;
}

.rs-ana-eq::before,
.rs-ana-eq::after {
  content: '⬇️';
  margin: 0 8px;
}

.rs-tile {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 6px;
  min-height: 92px;
  background: #FFFFFF;
  border: 3px solid #BFE3FF;
  border-radius: 22px;
  box-shadow: 0 4px 0 #BFE3FF;
}

.rs-tile-emoji {
  font-size: 2.4rem;
  line-height: 1.1;
}

.rs-tile-word {
  font-family: var(--font-body, sans-serif);
  font-size: 0.86rem;
  font-weight: 700;
  color: #2D3748;
  text-align: center;
  line-height: 1.2;
  word-break: break-word;
}

.rs-tile-q {
  background: repeating-linear-gradient(45deg, #FFF8E1, #FFF8E1 10px, #FFF2CC 10px, #FFF2CC 20px);
  border-color: #FFC94D;
  border-style: dashed;
  box-shadow: 0 4px 0 #F0BE4A;
  animation: rsPulse 1.5s ease-in-out infinite;
}

.rs-tile-q .rs-tile-word {
  color: #B47600;
}

.rs-ana-opt {
  flex-direction: column;
  gap: 2px;
  min-height: 104px;
}

.rs-opt-emoji {
  font-size: 2.3rem;
  line-height: 1.1;
}

.rs-opt-word {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  word-break: break-word;
}

/* ---------------------------------------------------------
   3. THÁM TỬ MANH MỐI
   --------------------------------------------------------- */
.rs-clue-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 540px;
  margin: 0 auto 18px;
}

.rs-clue {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: #FFF9E6;
  border: 3px solid #FFE49C;
  border-radius: 18px;
  font-size: 1.02rem;
  font-weight: 600;
  color: #4A3B10;
  line-height: 1.4;
  text-align: left;
  transition: all 0.2s ease;
}

.rs-clue-no {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFC94D;
  color: #4A3B10;
  border-radius: 50%;
  font-family: var(--font-display, sans-serif);
  font-weight: 800;
  font-size: 0.95rem;
}

.rs-clue-text {
  flex: 1 1 auto;
  min-width: 0;
}

.rs-clue-hl {
  background: #FFF0C2;
  border-color: #FF9F1C;
  box-shadow: 0 0 0 4px rgba(255, 159, 28, 0.25);
  transform: scale(1.02);
}

/* Manh mối bằng hình cho bé 3-4 tuổi */
.rs-clue-pic {
  justify-content: center;
}

.rs-clue-pic-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.rs-clue-pic-em {
  font-size: 2.6rem;
  line-height: 1;
}

.rs-clue-pic-name {
  font-family: var(--font-display, sans-serif);
  font-size: 1.15rem;
  font-weight: 800;
}

.rs-clue-pic-heart {
  font-size: 1.5rem;
}

/* Hàng các bạn nhỏ */
.rs-kid-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  margin: 0 auto 16px;
  padding: 14px 10px;
  background: #EFFBF5;
  border: 4px solid #CCF2E2;
  border-radius: 26px;
}

.rs-kid {
  flex: 0 0 auto;
  width: 98px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.rs-seat {
  font-size: 0.74rem;
  font-weight: 800;
  color: #1C8F69;
  background: #D6F7E8;
  border-radius: 10px;
  padding: 2px 8px;
}

.rs-kid-face {
  font-size: 2.3rem;
  line-height: 1.1;
}

.rs-kid-name {
  font-family: var(--font-display, sans-serif);
  font-size: 1rem;
  font-weight: 800;
  color: #2D3748;
}

.rs-slot {
  width: 100%;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  border: 3px dashed #9AD9BE;
  border-radius: 18px;
  font-family: var(--font-display, sans-serif);
  font-size: 1.7rem;
  font-weight: 800;
  color: #6FB89C;
  cursor: pointer;
  box-shadow: 0 4px 0 #BEEBD8;
  transition: all 0.15s ease;
}

@media (hover: hover) { .rs-slot:hover {
  transform: translateY(-3px);
  border-color: #38D39F;
} }

.rs-slot:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #BEEBD8;
}

.rs-slot-filled {
  border-style: solid;
  border-color: #38D39F;
  background: #F4FFFA;
}

.rs-slot-em {
  font-size: 2.1rem;
  line-height: 1;
}

.rs-slot-sel {
  border-color: #FF9F1C;
  background: #FFF6E6;
  box-shadow: 0 0 0 4px rgba(255, 159, 28, 0.25);
}

.rs-slot-bad {
  border-color: #F56565 !important;
  background: #FFF0F0 !important;
}

.rs-slot-ok {
  border-color: #2F855A !important;
  background: #DEF7EC !important;
}

/* Khay đồ để bé chọn */
.rs-tray-label {
  margin-top: 0;
  margin-bottom: 10px;
}

.rs-tray {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
}

.rs-item-btn {
  flex: 0 0 auto;
  min-width: 96px;
  min-height: 92px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 10px 8px;
  background: #FFFFFF;
  border: 3px solid #CBD5E0;
  border-radius: 20px;
  cursor: pointer;
  box-shadow: 0 5px 0 #A0AEC0;
  transition: all 0.15s ease;
}

@media (hover: hover) { .rs-item-btn:hover {
  transform: translateY(-4px);
  border-color: #3AA8F7;
  box-shadow: 0 9px 0 #3AA8F7;
} }

.rs-item-btn:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #A0AEC0;
}

.rs-item-em {
  font-size: 2.2rem;
  line-height: 1.1;
}

.rs-item-word {
  font-family: var(--font-body, sans-serif);
  font-size: 0.82rem;
  font-weight: 700;
  color: #2D3748;
  text-align: center;
  line-height: 1.2;
}

.rs-item-sel {
  border-color: #FF9F1C;
  background: #FFF6E6;
  box-shadow: 0 5px 0 #E08A00, 0 0 0 4px rgba(255, 159, 28, 0.25);
  transform: translateY(-3px);
}

.rs-item-placed {
  opacity: 0.4;
}

/* Hàng nút hành động */
.rs-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.rs-btn {
  min-height: 48px;
  padding: 12px 20px;
  border: none;
  border-radius: 18px;
  font-family: var(--font-display, sans-serif);
  font-size: 1.02rem;
  font-weight: 800;
  color: #FFFFFF;
  background: #9D65FF;
  cursor: pointer;
  box-shadow: 0 5px 0 #6A35C4;
  transition: all 0.15s ease;
}

@media (hover: hover) { .rs-btn:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 8px 0 #6A35C4;
} }

.rs-btn:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #6A35C4;
}

.rs-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.rs-btn-check {
  background: #38D39F;
  box-shadow: 0 5px 0 #1C8F69;
}

@media (hover: hover) { .rs-btn-check:hover:not(:disabled) {
  box-shadow: 0 8px 0 #1C8F69;
} }

.rs-btn-check:active:not(:disabled) {
  box-shadow: 0 2px 0 #1C8F69;
}

.rs-btn-hint {
  background: #FF9F1C;
  box-shadow: 0 5px 0 #C06B00;
}

@media (hover: hover) { .rs-btn-hint:hover:not(:disabled) {
  box-shadow: 0 8px 0 #C06B00;
} }

.rs-btn-hint:active:not(:disabled) {
  box-shadow: 0 2px 0 #C06B00;
}

.rs-btn-reset {
  background: #90A4C0;
  box-shadow: 0 5px 0 #5E7794;
}

@media (hover: hover) { .rs-btn-reset:hover:not(:disabled) {
  box-shadow: 0 8px 0 #5E7794;
} }

.rs-btn-reset:active:not(:disabled) {
  box-shadow: 0 2px 0 #5E7794;
}

.rs-btn-next {
  margin-top: 12px;
  background: #3AA8F7;
  box-shadow: 0 5px 0 #1C6FAE;
}

@media (hover: hover) { .rs-btn-next:hover:not(:disabled) {
  box-shadow: 0 8px 0 #1C6FAE;
} }

/* ---------------------------------------------------------
   4. PHẢN HỒI & HIỆU ỨNG
   --------------------------------------------------------- */
.rs-feedback.rs-info {
  background: #E8F4FF;
  color: #0B4A6F;
  border: 2px solid #A9D8F7;
}

.rs-feedback small {
  font-weight: 600;
  opacity: 0.85;
}

.rs-shake {
  animation: rsShake 0.5s ease;
}

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

/* ---------------------------------------------------------
   5. MÁY TÍNH BẢNG & ĐIỆN THOẠI
   --------------------------------------------------------- */
@media (max-width: 1024px) {
  .rs-cell {
    width: 88px;
    height: 88px;
  }

  .rs-cols-2 .rs-cell {
    width: 104px;
    height: 104px;
  }
}

@media (max-width: 640px) {
  .rs-matrix-grid {
    gap: 7px;
    padding: 9px;
    border-radius: 22px;
  }

  .rs-cell {
    width: 76px;
    height: 76px;
    border-radius: 16px;
  }

  .rs-cols-2 .rs-cell {
    width: 100px;
    height: 100px;
  }

  .rs-qmark {
    font-size: 2.2rem;
  }

  .rs-opt {
    min-height: 82px;
    padding: 6px;
  }

  .rs-ana-board {
    padding: 12px 8px;
    border-radius: 22px;
  }

  .rs-ana-row {
    gap: 5px;
  }

  .rs-ana-link {
    font-size: 1.2rem;
  }

  .rs-tile {
    min-height: 82px;
    padding: 8px 4px;
    border-radius: 18px;
  }

  .rs-tile-emoji {
    font-size: 2rem;
  }

  .rs-tile-word {
    font-size: 0.76rem;
  }

  .rs-ana-opt {
    min-height: 92px;
  }

  .rs-opt-emoji {
    font-size: 2rem;
  }

  .rs-opt-word {
    font-size: 0.82rem;
  }

  .rs-clue {
    font-size: 0.95rem;
    padding: 9px 11px;
    gap: 8px;
    border-radius: 15px;
  }

  .rs-clue-no {
    width: 25px;
    height: 25px;
    font-size: 0.86rem;
  }

  .rs-clue-pic-em {
    font-size: 2.2rem;
  }

  .rs-kid-row {
    gap: 7px;
    padding: 10px 7px;
    border-radius: 20px;
  }

  .rs-kid {
    width: 78px;
  }

  /* 4 bạn phải nằm trên MỘT hàng: manh mối "ngồi bên trái" chỉ đúng khi thứ tự ghế thẳng hàng */
  .rs-kids-4 {
    flex-wrap: nowrap;
    gap: 5px;
    padding: 10px 5px;
  }

  .rs-kids-4 .rs-kid {
    width: auto;
    flex: 1 1 0;
    min-width: 0;
  }

  .rs-kids-4 .rs-seat {
    font-size: 0.64rem;
    padding: 2px 5px;
  }

  .rs-kids-4 .rs-kid-face {
    font-size: 1.6rem;
  }

  .rs-kids-4 .rs-kid-name {
    font-size: 0.78rem;
  }

  .rs-kids-4 .rs-slot {
    min-height: 50px;
    font-size: 1.2rem;
  }

  .rs-kids-4 .rs-slot-em {
    font-size: 1.5rem;
  }

  .rs-kid-face {
    font-size: 1.9rem;
  }

  .rs-kid-name {
    font-size: 0.88rem;
  }

  .rs-slot {
    min-height: 54px;
    font-size: 1.4rem;
    border-radius: 15px;
  }

  .rs-slot-em {
    font-size: 1.8rem;
  }

  .rs-tray {
    gap: 8px;
  }

  .rs-item-btn {
    min-width: 78px;
    min-height: 82px;
    padding: 8px 5px;
    border-radius: 17px;
  }

  .rs-item-em {
    font-size: 1.9rem;
  }

  .rs-item-word {
    font-size: 0.74rem;
  }

  .rs-actions {
    gap: 8px;
  }

  .rs-btn {
    flex: 1 1 auto;
    min-width: 0;
    padding: 12px 10px;
    font-size: 0.94rem;
    white-space: nowrap;
  }

  .rs-btn-next {
    flex: 0 0 auto;
  }
}

/* Máy rất hẹp (360px): 4 bạn vẫn nằm gọn trên 2 hàng, không tràn ngang */
@media (max-width: 380px) {
  .rs-kid {
    width: 72px;
  }

  .rs-item-btn {
    min-width: 72px;
  }

  .rs-cell {
    width: 70px;
    height: 70px;
  }

  .rs-cols-2 .rs-cell {
    width: 92px;
    height: 92px;
  }
}

/* iPad trở lên: chữ và hình thoáng hơn */
@media (min-width: 769px) {
  .rs-clue {
    font-size: 1.1rem;
  }

  .rs-tile-word {
    font-size: 0.95rem;
  }

  .rs-opt-word {
    font-size: 1rem;
  }
}


/* ===== css/labs/number-lab.css ===== */
/*
 * Sam Kido - 🔢 Phòng Cảm Nhận Số (number-lab.js)
 * Mọi lớp mới đều có tiền tố nb-
 * Nguyên tắc: số thật to, vùng chạm >= 48px, chạy tốt từ 360px đến màn hình lớn.
 */

/* ================= KHUNG CHUNG ================= */
.game-card.nb-card {
  overflow: hidden;
  max-width: 100%;
}

.nb-card .nb-instruction {
  margin-bottom: 16px;
}

.nb-card .nb-question {
  margin: 18px 0 14px;
}

.nb-card .feedback-msg.nb-info {
  background: #E8F7FF;
  color: #075985;
  border: 2px solid #90E0EF;
}

.nb-btn {
  min-height: 52px;
  padding: 10px 22px;
  border-radius: 20px;
  border: 3px solid #CBD5E0;
  background: white;
  color: #2D3748;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 5px 0 #A0AEC0;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  touch-action: manipulation;
}

@media (hover: hover) { .nb-btn:hover:not(:disabled) { transform: translateY(-2px); } }
.nb-btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 2px 0 #A0AEC0; }
.nb-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.nb-btn-go {
  background: linear-gradient(180deg, #4ADE80, #22C55E);
  border-color: #16A34A;
  color: white;
  box-shadow: 0 5px 0 #15803D;
}
.nb-btn-go:active:not(:disabled) { box-shadow: 0 2px 0 #15803D; }

.nb-btn-next {
  margin-top: 12px;
  background: linear-gradient(180deg, #60C5FF, var(--primary-blue));
  border-color: #1E88D8;
  color: white;
  box-shadow: 0 5px 0 #1569A8;
}
.nb-btn-next:active:not(:disabled) { box-shadow: 0 2px 0 #1569A8; }

.nb-footer {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.nb-btn-new {
  background: linear-gradient(180deg, #FFE28A, var(--primary-yellow));
  border-color: #E6B800;
  color: #6B4E00;
  box-shadow: 0 5px 0 #C99A00;
}
.nb-btn-new:active:not(:disabled) { box-shadow: 0 2px 0 #C99A00; }

.nb-card .nb-options {
  margin-top: 6px;
}

.nb-card .nb-opt {
  min-height: 62px;
  font-size: 1.9rem;
}

.nb-card .nb-hint {
  margin-top: 14px;
}

/* ================= 1. TIA SỐ KỲ DIỆU ================= */
.nb-target-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: #FFFDF0;
  border: 3px dashed #FFD966;
  border-radius: 24px;
  padding: 10px 18px;
  margin: 0 auto 10px;
  max-width: 280px;
}

.nb-target-label {
  font-size: 0.95rem;
  font-weight: 800;
  color: #8A6D00;
  letter-spacing: 0.04em;
}

.nb-target-num {
  font-family: var(--font-display);
  font-size: 3.6rem;
  font-weight: 800;
  line-height: 1.05;
  color: var(--primary-orange);
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.08);
}

.nb-line-track {
  position: relative;
  padding: 0 26px;
  margin-top: 6px;
}

.nb-line-plot {
  position: relative;
  height: 152px;
  touch-action: none;
  cursor: pointer;
  outline: none;
}

.nb-line-plot:focus-visible {
  outline: 3px solid var(--primary-blue);
  outline-offset: 4px;
  border-radius: 18px;
}

.nb-line-rail {
  position: absolute;
  left: 0;
  right: 0;
  top: 84px;
  height: 16px;
  border-radius: 10px;
  background: linear-gradient(180deg, #BEE3F8, #90CDF4);
  border: 3px solid #4299E1;
  box-sizing: border-box;
}

.nb-tick {
  position: absolute;
  top: 76px;
  width: 4px;
  height: 32px;
  margin-left: -2px;
  border-radius: 2px;
  background: #5BA7E8;
}

.nb-tick-major {
  top: 70px;
  width: 5px;
  height: 44px;
  margin-left: -2.5px;
  background: #2B6CB0;
}

.nb-line-labels {
  position: relative;
  height: 34px;
  margin: 0 26px;
}

.nb-tick-label {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: #2B6CB0;
}

/* Con vật đánh dấu của bé */
.nb-marker {
  position: absolute;
  top: 10px;
  transform: translateX(-50%);
  width: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  transition: left 0.12s ease-out;
}

.nb-marker-hidden { display: none; }

.nb-marker-pet {
  font-size: 2.6rem;
  line-height: 1;
  animation: nbBob 1.4s ease-in-out infinite;
}

.nb-marker-stem {
  width: 5px;
  height: 46px;
  border-radius: 3px;
  background: var(--primary-coral);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8);
}

.nb-marker-locked .nb-marker-pet { animation: none; }
.nb-marker-locked .nb-marker-stem { background: #718096; }

/* Vị trí đúng được hé lộ sau khi bé chốt - nằm dưới tia số để không che con vật của bé */
.nb-truth {
  position: absolute;
  top: 100px;
  transform: translateX(-50%);
  width: 62px;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  z-index: 4;
}

.nb-truth-hidden { display: none; }

.nb-truth-num {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  color: #1B7F4F;
  background: #DEF7EC;
  border: 2px solid #84E1BC;
  border-radius: 12px;
  padding: 0 8px;
  margin-top: 2px;
}

.nb-truth-stem {
  width: 6px;
  height: 18px;
  border-radius: 3px;
  background: #1B7F4F;
}

.nb-truth-in { animation: nbDropIn 0.6s cubic-bezier(0.22, 1.4, 0.4, 1) both; }

.nb-tapzone {
  position: absolute;
  left: 0;
  right: 0;
  top: 14px;
  text-align: center;
  font-weight: 800;
  font-size: 1rem;
  color: #A0AEC0;
  pointer-events: none;
  animation: nbBob 1.6s ease-in-out infinite;
}

.nb-tapzone-off { display: none; }

.nb-line-actions {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

/* ================= 2. TÁCH GỘP SỐ ================= */
.nb-bond-board {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: #F7FBFF;
  border: 3px solid #D8ECFF;
  border-radius: 26px;
  padding: 16px 10px;
}

.nb-bond-whole,
.nb-bond-part {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: white;
  border: 3px solid #CBD5E0;
  border-radius: 22px;
  padding: 10px 14px;
  min-width: 96px;
}

.nb-bond-whole {
  border-color: var(--primary-blue);
  box-shadow: 0 5px 0 rgba(58, 168, 247, 0.25);
}

.nb-bond-cap {
  font-size: 0.85rem;
  font-weight: 800;
  color: #4A5568;
  letter-spacing: 0.04em;
}

.nb-bond-num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.05;
  color: #2D3748;
}

.nb-bond-num-big { font-size: 3.1rem; color: var(--primary-blue); }

.nb-arrow {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 800;
  color: #3AA8F7;
  line-height: 1;
}

.nb-bond-link {
  display: flex;
  gap: 54px;
  font-size: 1.5rem;
  line-height: 1;
}

.nb-bond-parts {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nb-bond-plus {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: #718096;
}

.nb-bond-have { border-color: var(--primary-orange); }

.nb-bond-ask {
  border-color: #A0AEC0;
  border-style: dashed;
  background: #F8FAFC;
}

.nb-bond-ask .nb-bond-num { color: var(--primary-coral); }

.nb-bond-abstract .nb-bond-num { font-size: 2.7rem; }

.nb-bond-visual { margin-top: 4px; }

/* Khung 10 ô */
.nb-frame {
  display: grid;
  grid-template-columns: repeat(var(--nb-cols, 5), 1fr);
  gap: 5px;
  margin: 4px auto;
  width: max-content;
}

.nb-cell {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: white;
  border: 2px solid #CBD5E0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #A0AEC0;
  font-size: 1rem;
}

.nb-cell-on { border-color: rgba(0, 0, 0, 0.12); }
.nb-cell-ask { border-style: dashed; }

/* Chấm tròn */
.nb-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  max-width: 190px;
}

.nb-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.1);
}

.nb-dots-ghost .nb-dot { opacity: 0.55; }
.nb-dots-ask .nb-dot { border: 2px dashed #A0AEC0; box-sizing: border-box; }

.nb-pop-num { animation: nbPop 0.45s cubic-bezier(0.22, 1.4, 0.4, 1) both; }

/* ================= 3. ƯỚC LƯỢNG NHANH ================= */
.nb-est-stage {
  position: relative;
  min-height: 250px;
  background: #FFFDF5;
  border: 3px dashed #FFE066;
  border-radius: 26px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nb-est-ready {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: #8A6D00;
  text-align: center;
  line-height: 1.5;
  animation: nbPop 0.4s ease-out both;
}

.nb-est-ready.nb-est-gone { color: #718096; }

.nb-est-cluster {
  position: absolute;
  inset: 10px;
  animation: nbFlashIn 0.18s ease-out both;
}

.nb-est-dot {
  position: absolute;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.12);
}

.nb-est-pair {
  position: absolute;
  inset: 6px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.nb-est-panel {
  position: relative;
  background: rgba(255, 255, 255, 0.7);
  border: 2px solid #FFE066;
  border-radius: 18px;
  overflow: hidden;
}

/* ================= 4. SO SÁNH CHỚP NHOÁNG ================= */
.nb-cmp-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: #4A5568;
  font-size: 1rem;
  margin-bottom: 8px;
}

.nb-cmp-top strong { color: var(--primary-blue); font-size: 1.15rem; }

.nb-cmp-bar {
  height: 14px;
  border-radius: 8px;
  background: #EDF2F7;
  border: 2px solid #CBD5E0;
  overflow: hidden;
  box-sizing: border-box;
}

.nb-cmp-fill {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #38D39F, #FFD13B, #FF8A6B);
  transform-origin: left center;
}

.nb-cmp-row {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
  margin: 16px 0 12px;
}

.nb-cmp-side {
  flex: 1 1 0;
  min-width: 0;
  min-height: 160px;
  background: white;
  border: 4px solid #CBD5E0;
  border-radius: 26px;
  box-shadow: 0 6px 0 #A0AEC0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  touch-action: manipulation;
}

@media (hover: hover) { .nb-cmp-side:hover:not(:disabled) { transform: translateY(-3px); border-color: var(--primary-blue); } }
.nb-cmp-side:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 2px 0 #A0AEC0; }
.nb-cmp-side:disabled { cursor: default; }

.nb-cmp-hit {
  background: #DEF7EC !important;
  border-color: #38D39F !important;
  box-shadow: 0 6px 0 #1B7F4F !important;
}

.nb-cmp-miss {
  background: #FDE8E8 !important;
  border-color: #F56565 !important;
  box-shadow: 0 6px 0 #9B1C1C !important;
}

.nb-cmp-num {
  font-family: var(--font-display);
  font-size: 4.2rem;
  font-weight: 800;
  line-height: 1;
  color: #2D3748;
}

.nb-cmp-expr { font-size: 2.5rem; white-space: nowrap; }

.nb-cmp-wait {
  font-size: 2.2rem;
  opacity: 0.45;
}

.nb-cmp-vs {
  align-self: center;
  font-weight: 800;
  color: #A0AEC0;
  font-size: 0.95rem;
}

.nb-cmp-eqwrap {
  display: flex;
  justify-content: center;
}

.nb-cmp-equal {
  min-width: 190px;
  background: #F7FAFC;
}

/* Chấm kiểu mặt xúc xắc */
.nb-pips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 124px;
  height: 124px;
}

.nb-pip {
  border-radius: 50%;
  background: transparent;
}

.nb-pip-on { box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.12); }

/* Bánh pizza thể hiện phân số */
.nb-pizza {
  position: relative;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  border: 5px solid #E9A13B;
  background: conic-gradient(#FF9F1C 0 var(--nb-pct), #FFF3DC var(--nb-pct) 100%);
  box-sizing: border-box;
}

.nb-pizza-cut {
  position: absolute;
  left: 50%;
  top: 0;
  width: 3px;
  height: 50%;
  margin-left: -1.5px;
  background: rgba(176, 108, 20, 0.55);
  transform-origin: bottom center;
}

/* ================= HIỆU ỨNG ================= */
@keyframes nbPop {
  0% { transform: scale(0.5); opacity: 0; }
  70% { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes nbBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes nbDropIn {
  0% { transform: translateX(-50%) translateY(18px) scale(0.6); opacity: 0; }
  60% { transform: translateX(-50%) translateY(-4px) scale(1.1); opacity: 1; }
  100% { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
}

@keyframes nbFlashIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes nbTimerBar {
  0% { transform: scaleX(1); }
  100% { transform: scaleX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .nb-marker-pet,
  .nb-truth-in,
  .nb-pop-num,
  .nb-est-ready,
  .nb-est-cluster { animation: none !important; }
}

/* ================= MÀN HÌNH NHỎ (<= 480px) ================= */
@media (max-width: 480px) {
  .game-card.nb-card { padding: 16px 12px; border-radius: 24px; }

  .nb-target-num { font-size: 3rem; }

  .nb-line-track { padding: 0 22px; }
  .nb-line-plot { height: 142px; }
  .nb-line-rail { top: 78px; }
  .nb-tick { top: 72px; height: 26px; }
  .nb-tick-major { top: 64px; height: 42px; }
  .nb-line-labels { margin: 0 22px; }
  .nb-tick-label { font-size: 1.25rem; }
  .nb-marker-pet { font-size: 2.2rem; }
  .nb-marker-stem { height: 42px; }
  .nb-truth { top: 94px; }
  .nb-truth-num { font-size: 1.25rem; }

  .nb-bond-num { font-size: 2.1rem; }
  .nb-bond-num-big { font-size: 2.6rem; }
  .nb-bond-whole, .nb-bond-part { min-width: 78px; padding: 8px 10px; }
  .nb-bond-link { gap: 40px; }
  .nb-cell { width: 25px; height: 25px; border-radius: 7px; }
  .nb-dot { width: 20px; height: 20px; }
  .nb-dots { max-width: 150px; }

  .nb-est-stage { min-height: 215px; }

  .nb-cmp-side { min-height: 132px; border-radius: 22px; padding: 6px; }
  .nb-cmp-num { font-size: 3.1rem; }
  .nb-cmp-expr { font-size: 1.8rem; }
  .nb-cmp-wait {
  font-size: 2.2rem;
  opacity: 0.45;
}

.nb-cmp-vs { font-size: 0.8rem; }
  .nb-pips { width: 96px; height: 96px; gap: 6px; }
  .nb-pizza { width: 92px; height: 92px; }
  .nb-cmp-equal { min-width: 0; width: 100%; max-width: 320px; }
  .nb-card .nb-opt { font-size: 1.6rem; min-height: 58px; }
}

@media (max-width: 380px) {
  .nb-cmp-num { font-size: 2.7rem; }
  .nb-cmp-expr { font-size: 1.55rem; }
  .nb-bond-link { gap: 30px; }
  .nb-cell { width: 22px; height: 22px; }
  .nb-tick-label { font-size: 1.1rem; }
}

/* ================= MÀN HÌNH LỚN ================= */
@media (min-width: 900px) {
  .nb-line-plot { height: 176px; }
  .nb-line-rail { top: 100px; }
  .nb-truth { top: 116px; }
  .nb-tick { top: 94px; height: 30px; }
  .nb-tick-major { top: 84px; height: 48px; }
  .nb-marker-stem { height: 58px; }
  .nb-cell { width: 36px; height: 36px; }
  .nb-cmp-side { min-height: 200px; }
  .nb-cmp-num { font-size: 5rem; }
  .nb-cmp-expr { font-size: 3rem; }
}


/* ===== css/labs/spatial-lab.css ===== */
/*
 * Sam Kido - 📐 Phòng Hình Khối (spatial-lab.js)
 * Mọi lớp mới đều có tiền tố sp-
 * Mục tiêu: hình SVG đọc được rõ ở màn 360px, vùng chạm >= 48px, không tràn ngang.
 */

/* ================= KHUNG CHUNG ================= */
.game-card.sp-card {
  max-width: 100%;
  overflow: hidden;
}

.sp-card .section-instruction small {
  display: block;
  margin-top: 4px;
  font-size: 0.92rem;
  color: #718096;
}

.sp-card .feedback-msg.sp-info {
  background: #E8F7FF;
  color: #075985;
  border: 2px solid #90E0EF;
}

.sp-red {
  color: #E01B45;
}

.sp-btn {
  min-height: 52px;
  padding: 10px 20px;
  border-radius: 20px;
  border: 3px solid #CBD5E0;
  background: white;
  color: #2D3748;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 5px 0 #A0AEC0;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  touch-action: manipulation;
}

@media (hover: hover) { .sp-btn:hover:not(:disabled) { transform: translateY(-2px); } }
.sp-btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 2px 0 #A0AEC0; }
.sp-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.sp-btn-soft { background: #F7FAFC; }

.sp-rotate-btn {
  background: linear-gradient(180deg, #FFE07A, var(--primary-yellow));
  border-color: #C9A227;
  color: #6B4A00;
  box-shadow: 0 5px 0 #A37E12;
}
.sp-rotate-btn:active:not(:disabled) { box-shadow: 0 2px 0 #A37E12; }

.sp-btn-next {
  margin-top: 12px;
  background: linear-gradient(180deg, #60C5FF, var(--primary-blue));
  border-color: #1E88D8;
  color: white;
  box-shadow: 0 5px 0 #1569A8;
}
.sp-btn-next:active:not(:disabled) { box-shadow: 0 2px 0 #1569A8; }

.sp-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

@keyframes spShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
.sp-shake { animation: spShake 0.5s ease; }

/* ================= LỰA CHỌN TRẮC NGHIỆM ================= */
.sp-card .options-grid.sp-opts {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 12px;
  max-width: 560px;
}

.game-opt-btn.sp-opt {
  position: relative;
  padding: 12px 10px 10px;
  min-height: 124px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #FCFDFF;
  touch-action: manipulation;
}

.game-opt-btn.sp-opt.sk-eliminated {
  opacity: 0.35;
}

.sp-opt-num {
  position: absolute;
  top: 6px;
  left: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #EDF2F7;
  color: #4A5568;
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 24px;
  text-align: center;
  pointer-events: none;
}

.game-opt-btn.sp-opt.correct-answer .sp-opt-num,
.game-opt-btn.sp-opt.wrong-answer .sp-opt-num {
  background: rgba(255, 255, 255, 0.85);
  color: #2D3748;
}

.game-opt-btn.sp-opt-num-big {
  min-height: 72px;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sp-opt .sp-fig,
.sp-opt .sp-sheet-svg,
.sp-opt .sp-view-svg {
  display: block;
  width: 100%;
  max-width: 142px;
  height: 100px;
}

/* ================= 1. XOAY HÌNH TRONG ĐẦU ================= */
.sp-ref-wrap {
  display: flex;
  justify-content: center;
  margin: 4px 0 14px;
}

.sp-ref-box {
  position: relative;
  padding: 14px 18px 10px;
  border-radius: 26px;
  background: linear-gradient(180deg, #FFFBEF, #FFF3D6);
  border: 4px dashed #FFD13B;
  min-width: 150px;
}

.sp-ref-box.sp-spinning {
  border-style: solid;
  border-color: #38D39F;
  background: linear-gradient(180deg, #F2FFFA, #DFFBEF);
}

.sp-tag {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-yellow);
  color: #6B4A00;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.85rem;
  padding: 3px 14px;
  border-radius: 14px;
  white-space: nowrap;
}

.sp-ref-box .sp-fig {
  display: block;
  width: 130px;
  height: 130px;
}

/* ================= 2. GẤP GIẤY ĐOÁN HÌNH ================= */
.sp-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 2px;
  padding: 12px 6px;
  margin-bottom: 14px;
  background: #F8FBFF;
  border: 3px dashed #D6E4FF;
  border-radius: 24px;
}

.sp-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.sp-step-pic {
  background: white;
  border-radius: 14px;
  border: 2px solid #E2E8F0;
  padding: 2px;
}

.sp-step-svg {
  display: block;
  width: 72px;
  height: 72px;
}

.sp-step-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #5A6270;
  text-align: center;
  max-width: 82px;
  line-height: 1.2;
}

.sp-step-arrow {
  font-size: 1rem;
  color: #8AA2BD;
  padding: 0 1px;
  align-self: center;
  margin-bottom: 14px;
}

/* ================= 3. NHÌN TỪ TRÊN XUỐNG ================= */
.sp-scene {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
  padding: 8px;
  background: linear-gradient(180deg, #FBFDFF, #EEF5FF);
  border: 3px solid #E2EBF6;
  border-radius: 26px;
}

.sp-iso-svg {
  display: block;
  width: 100%;
  max-width: 280px;
  height: auto;
  max-height: 230px;
}

/* ================= 4. GHÉP HÌNH THEO MẪU ================= */
.sp-build-stage {
  display: flex;
  justify-content: center;
  padding: 10px;
  margin-bottom: 12px;
  background: #FBFDFF;
  border: 3px solid #E2EBF6;
  border-radius: 26px;
}

.sp-target-svg {
  display: block;
  width: 100%;
  max-width: 290px;
  height: auto;
  max-height: 290px;
  touch-action: manipulation;
}

.sp-slot {
  pointer-events: all;
  cursor: pointer;
}

@media (hover: hover) { .sp-slot:hover {
  fill: rgba(58, 168, 247, 0.22);
} }

@media (hover: hover) { .sp-slot-full:hover {
  fill: rgba(255, 255, 255, 0.3);
} }

.sp-slot-done {
  animation: spPop 0.3s ease;
}

@keyframes spPop {
  0% { transform: scale(0.75); opacity: 0.4; }
  100% { transform: scale(1); opacity: 1; }
}

.sp-tray-label {
  text-align: center;
  font-size: 0.95rem;
  font-weight: 800;
  color: #5A6270;
  margin-bottom: 6px;
}

.sp-tray {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 10px;
  background: #F8FBFF;
  border: 3px dashed #D6E4FF;
  border-radius: 24px;
}

.sp-piece {
  width: 80px;
  height: 80px;
  padding: 4px;
  border-radius: 18px;
  border: 3px solid #D8E2EF;
  background: white;
  cursor: pointer;
  box-shadow: 0 4px 0 #BCCBDC;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  touch-action: manipulation;
}

@media (hover: hover) { .sp-piece:hover:not(:disabled) { transform: translateY(-3px); } }
.sp-piece:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 2px 0 #BCCBDC; }

.sp-piece-sel {
  border-color: var(--primary-blue);
  box-shadow: 0 4px 0 #1E88D8, 0 0 0 4px rgba(58, 168, 247, 0.25);
  background: #F2FAFF;
}

.sp-piece-used {
  opacity: 0.3;
  cursor: not-allowed;
  box-shadow: none;
}

.sp-piece-svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* ================= MÀN HÌNH NHỎ ================= */
@media (max-width: 600px) {
  .game-card.sp-card {
    padding: 16px 12px;
    border-radius: 24px;
  }

  .sp-card .game-question {
    font-size: 1.2rem;
    margin-bottom: 14px;
  }

  .sp-card .section-instruction {
    font-size: 0.98rem;
    margin-bottom: 14px;
  }

  .sp-card .options-grid.sp-opts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .game-opt-btn.sp-opt {
    min-height: 116px;
    padding: 10px 6px 8px;
    border-radius: 20px;
  }

  .sp-opt .sp-fig,
  .sp-opt .sp-sheet-svg,
  .sp-opt .sp-view-svg {
    height: 96px;
    max-width: 100%;
  }

  .sp-ref-box .sp-fig {
    width: 112px;
    height: 112px;
  }

  .sp-step-svg {
    width: 60px;
    height: 60px;
  }

  .sp-step-label {
    font-size: 0.7rem;
    max-width: 64px;
  }

  .sp-step-arrow {
    font-size: 0.82rem;
    margin-bottom: 12px;
  }

  .sp-steps {
    padding: 10px 2px;
    gap: 2px 0;
  }

  .sp-iso-svg {
    max-width: 100%;
    max-height: 200px;
  }

  .sp-target-svg {
    max-width: 100%;
    max-height: 252px;
  }

  .sp-piece {
    width: 72px;
    height: 72px;
  }

  .sp-btn {
    min-height: 50px;
    font-size: 1rem;
    padding: 10px 16px;
  }
}

@media (max-width: 380px) {
  .sp-step-svg { width: 52px; height: 52px; }
  .sp-step-label { font-size: 0.64rem; max-width: 56px; }
  .sp-step-arrow { font-size: 0.7rem; padding: 0; }
  .sp-piece { width: 66px; height: 66px; }
}

/* Máy tính: hình to hơn cho dễ nhìn */
@media (min-width: 900px) {
  .sp-ref-box .sp-fig { width: 160px; height: 160px; }
  .sp-opt .sp-fig,
  .sp-opt .sp-sheet-svg,
  .sp-opt .sp-view-svg { height: 124px; max-width: 160px; }
  .game-opt-btn.sp-opt { min-height: 150px; }
  .sp-step-svg { width: 92px; height: 92px; }
  .sp-step-label { max-width: 100px; font-size: 0.85rem; }
  .sp-iso-svg { max-width: 340px; max-height: 280px; }
  .sp-target-svg { max-width: 340px; max-height: 340px; }
}

@media (prefers-reduced-motion: reduce) {
  .sp-shake,
  .sp-slot-done {
    animation: none;
  }
  .sp-btn,
  .sp-piece {
    transition: none;
  }
}


/* ===== css/rooms/arena.css ===== */
/* ============================================================
   ĐẤU TRƯỜNG - Phòng thi trực tuyến & Bảng xếp hạng
   ============================================================ */
.ar-card {
  background: white;
  border: 4px solid #FFD13B;
  border-radius: 26px;
  padding: 18px 16px;
  margin-bottom: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.ar-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 900;
  color: #1E293B;
  margin: 0 0 6px;
  text-align: center;
}

.ar-sub {
  text-align: center;
  color: #5A6678;
  font-weight: 700;
  margin: 0 0 14px;
  font-size: 0.95rem;
}

.ar-label {
  font-family: var(--font-display);
  font-weight: 800;
  color: #334155;
  margin: 10px 0 6px;
}

/* Hàng chọn: môn / tuổi / số câu */
.ar-pills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 8px;
}

.ar-pill {
  min-height: 48px;
  border-radius: 14px;
  border: 2px solid #E2E8F0;
  background: white;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.95rem;
  color: #334155;
  cursor: pointer;
  padding: 8px 6px;
  line-height: 1.2;
}

.ar-pill.active {
  background: #1273C4;
  border-color: #1273C4;
  color: white;
}

.ar-btn {
  display: block;
  width: 100%;
  min-height: 56px;
  border: none;
  border-radius: 18px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.15rem;
  color: white;
  cursor: pointer;
  margin-top: 14px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, #22C55E, #16A34A);
}

.ar-btn.blue { background: linear-gradient(135deg, #3AA8F7, #1273C4); }
.ar-btn.orange { background: linear-gradient(135deg, #FFB300, #F59E0B); color: #3B2A00; }
.ar-btn.gray { background: #E2E8F0; color: #334155; box-shadow: none; }
.ar-btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* Ô nhập mã phòng */
.ar-code-input {
  width: 100%;
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 0.4em;
  text-align: center;
  padding: 10px;
  border: 3px solid #CBD5E1;
  border-radius: 18px;
  color: #1E293B;
  outline: none;
}

.ar-code-input:focus { border-color: #3AA8F7; }

/* Mã phòng hiển thị to cho chủ phòng */
.ar-code-big {
  font-family: var(--font-display);
  font-size: 3.4rem;
  font-weight: 900;
  letter-spacing: 0.25em;
  text-align: center;
  color: #1273C4;
  background: #EEF6FF;
  border: 3px dashed #3AA8F7;
  border-radius: 20px;
  padding: 10px 6px 10px 14px;
  margin: 8px 0;
}

.ar-hint {
  text-align: center;
  color: #5A6678;
  font-size: 0.9rem;
  font-weight: 700;
}

/* Danh sách người chơi */
.ar-players {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 10px 0;
  min-height: 44px;
}

.ar-player-chip {
  background: #F1F5F9;
  border-radius: 999px;
  padding: 6px 14px 6px 8px;
  font-weight: 800;
  color: #1E293B;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  animation: popIn 0.3s ease;
}

.ar-player-chip .av { font-size: 1.3rem; }

@keyframes popIn { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Màn thi */
.ar-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-weight: 900;
  color: #1E293B;
}

.ar-hud .pill {
  background: #FFF7D6;
  border: 2px solid #FFD13B;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.95rem;
}

.ar-timer {
  height: 14px;
  background: #E2E8F0;
  border-radius: 999px;
  overflow: hidden;
  margin: 6px 0 12px;
}

.ar-timer > div {
  height: 100%;
  background: linear-gradient(90deg, #22C55E, #FFD13B, #EF4444);
  width: 100%;
  transition: width 0.25s linear;
}

.ar-q-icon { font-size: 3.4rem; text-align: center; line-height: 1.1; }

.ar-q-text {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 900;
  color: #1E293B;
  text-align: center;
  margin: 8px 0 14px;
  line-height: 1.35;
}

.ar-opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ar-opt {
  min-height: 64px;
  border-radius: 18px;
  border: 3px solid #E2E8F0;
  background: white;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1.1rem;
  color: #1E293B;
  cursor: pointer;
  padding: 8px;
  line-height: 1.25;
  transition: transform 0.15s;
}

.ar-opt:active { transform: scale(0.97); }
.ar-opt.picked { border-color: #3AA8F7; background: #EEF6FF; }
.ar-opt.right { border-color: #22C55E; background: #DCFCE7; }
.ar-opt.wrong { border-color: #EF4444; background: #FEE2E2; }
.ar-opt:disabled { cursor: default; }

.ar-feedback {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.15rem;
  margin-top: 12px;
  min-height: 28px;
}

.ar-feedback.ok { color: #16A34A; }
.ar-feedback.no { color: #DC2626; }

.ar-countdown {
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 900;
  color: #1273C4;
  text-align: center;
  padding: 30px 0;
  animation: pulse 1s infinite;
}

/* Bảng xếp hạng */
.ar-board { list-style: none; margin: 0; padding: 0; }

.ar-row {
  display: grid;
  grid-template-columns: 44px 44px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 14px;
  margin-bottom: 6px;
  background: #F8FAFC;
  font-weight: 800;
  color: #1E293B;
}

.ar-row.me { background: #FFF7D6; border: 2px solid #FFD13B; }
.ar-row.r1 { background: linear-gradient(90deg, #FFF3BF, #FFFBEB); }
.ar-row.r2 { background: linear-gradient(90deg, #EEF2F7, #F8FAFC); }
.ar-row.r3 { background: linear-gradient(90deg, #FDE8D7, #FFF7F0); }
.ar-row .rk { font-family: var(--font-display); font-size: 1.2rem; text-align: center; }
.ar-row .av { font-size: 1.6rem; text-align: center; }
.ar-row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-row .nm small { display: block; color: #64748B; font-weight: 700; font-size: 0.78rem; }
.ar-row .pt { font-family: var(--font-display); font-size: 1.1rem; color: #1273C4; white-space: nowrap; }

.ar-live { margin-top: 14px; }
.ar-live .ar-row { padding: 5px 8px; font-size: 0.92rem; }

/* Bục vinh quang */
.ar-podium {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 10px;
  margin: 10px 0 16px;
}

.ar-podium .p {
  flex: 1;
  max-width: 120px;
  text-align: center;
  border-radius: 16px 16px 6px 6px;
  padding: 8px 4px;
  font-weight: 900;
  color: #1E293B;
}

.ar-podium .p .av { font-size: 2.2rem; }
.ar-podium .p .nm { font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-podium .p .pt { color: #1273C4; font-family: var(--font-display); }
.ar-podium .p1 { background: #FFE58A; min-height: 120px; }
.ar-podium .p2 { background: #E2E8F0; min-height: 96px; }
.ar-podium .p3 { background: #F8CBA6; min-height: 80px; }

.ar-tabs-filter { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-bottom: 10px; }
.ar-tabs-filter .ar-pill { min-height: 40px; font-size: 0.85rem; padding: 4px 10px; flex: 1; }

.ar-empty { text-align: center; color: #64748B; font-weight: 700; padding: 18px 6px; }

@media (max-width: 480px) {
  .ar-code-big { font-size: 2.6rem; }
  .ar-q-text { font-size: 1.15rem; }
  .ar-opt { font-size: 1rem; min-height: 58px; }
}

/* Ô avatar/điểm không bao giờ tràn sang cột tên */
.ar-row .av { overflow: hidden; white-space: nowrap; line-height: 1; }
.ar-row .nm { min-width: 0; }
.ar-row .pt { font-size: 0.95rem; }

/* Dòng phụ dưới tên (tuổi · lượt · đúng x/y) được xuống dòng, không bị cắt cụt */
.ar-row .nm { white-space: normal; }
.ar-row .nm small { white-space: normal; line-height: 1.25; }


/* ===== css/games/extras.css ===== */
/* ============================================================
   EXTRAS: cổng phụ huynh, nhiều hồ sơ bé, chân trang, cửa hàng sao, lớp học
   ============================================================ */

/* --- Cổng phụ huynh --- */
.pg-card { max-width: 380px; text-align: center; }
.pg-icon { font-size: 3rem; }
.pg-q { font-size: 1.5rem; color: #1273C4; }
.pg-input {
  width: 160px; font-family: var(--font-display); font-size: 1.8rem; font-weight: 900;
  text-align: center; letter-spacing: 0.3em; padding: 8px; border: 3px solid #CBD5E1; border-radius: 16px; outline: none;
  margin: 8px auto 4px; display: block;
}
.pg-input:focus { border-color: #3AA8F7; }
.pg-err { min-height: 22px; color: #DC2626; font-weight: 800; font-size: 0.9rem; }
.pg-actions { display: flex; gap: 10px; justify-content: center; margin-top: 8px; }

.pd-pin-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pd-pin-input {
  width: 110px; font-family: var(--font-display); font-weight: 900; font-size: 1.2rem; letter-spacing: 0.25em;
  text-align: center; padding: 8px; border: 2px solid #CBD5E1; border-radius: 12px; outline: none;
}

/* --- Nhiều hồ sơ bé --- */
.pl-box { background: #F8FAFC; border: 2px dashed #CBD5E1; border-radius: 16px; padding: 10px 12px; margin-bottom: 14px; }
.pl-title { font-family: var(--font-display); font-weight: 900; color: #334155; margin-bottom: 8px; }
.pl-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pl-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 8px; border-radius: 999px;
  border: 2px solid #E2E8F0; background: white; font-weight: 800; color: #1E293B; cursor: pointer; min-height: 44px;
}
.pl-chip.active { border-color: #1273C4; background: #EEF6FF; }
.pl-chip .pl-av { font-size: 1.4rem; }
.pl-chip .pl-now { font-size: 0.7rem; background: #1273C4; color: white; border-radius: 999px; padding: 2px 8px; }
.pl-add { border-style: dashed; color: #1273C4; }
.pl-remove { margin-top: 8px; background: none; border: none; color: #DC2626; font-weight: 800; cursor: pointer; font-size: 0.85rem; }
.pl-hint { font-size: 0.8rem; color: #64748B; font-weight: 700; margin-top: 6px; }

/* --- Chân trang --- */
.site-footer { text-align: center; padding: 18px 12px 8px; color: #475569; font-weight: 800; font-size: 0.9rem; }
.site-footer a { color: #1273C4; text-decoration: none; }
@media (hover: hover) { .site-footer a:hover { text-decoration: underline; } }
.site-footer-note { margin-top: 6px; font-size: 0.8rem; color: #94A3B8; font-weight: 700; }

/* --- Cửa hàng sao --- */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.shop-item {
  background: white; border: 3px solid #E2E8F0; border-radius: 18px; padding: 10px 6px; text-align: center; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 130px; transition: transform 0.15s;
}
.shop-item:active { transform: scale(0.97); }
.shop-item .shop-ic { font-size: 2.4rem; line-height: 1.1; }
.shop-item .shop-nm { font-weight: 800; color: #1E293B; font-size: 0.85rem; line-height: 1.2; }
.shop-item .shop-pr { font-family: var(--font-display); font-weight: 900; color: #B45309; font-size: 0.9rem; }
.shop-item.owned { border-color: #22C55E; background: #F0FDF4; }
.shop-item.equipped { border-color: #1273C4; background: #EEF6FF; box-shadow: 0 0 0 3px rgba(18, 115, 196, 0.2); }
.shop-item.locked { opacity: 0.6; }
.shop-item .shop-tag { font-size: 0.72rem; font-weight: 900; color: white; background: #1273C4; border-radius: 999px; padding: 2px 8px; }
.shop-item.owned .shop-tag { background: #22C55E; }
.shop-balance { text-align: center; font-family: var(--font-display); font-weight: 900; font-size: 1.1rem; color: #B45309; margin-bottom: 10px; }
.shop-sub { font-family: var(--font-display); font-weight: 900; color: #334155; margin: 12px 0 6px; }

/* Phụ kiện trên linh vật */
.mascot-container { position: relative; }
.mascot-hat { position: absolute; left: 50%; top: -14%; transform: translateX(-50%) rotate(-8deg); font-size: 2.2rem; pointer-events: none; filter: drop-shadow(0 3px 4px rgba(0,0,0,.25)); }
.mascot-glasses { position: absolute; left: 50%; top: 38%; transform: translateX(-50%); font-size: 1.6rem; pointer-events: none; }
.mascot-pet { position: absolute; right: -18%; bottom: -4%; font-size: 1.8rem; pointer-events: none; }

/* Nền trang chủ đổi theo cửa hàng */
body.theme-sky { background: linear-gradient(180deg, #E0F2FE 0%, #FFFFFF 60%); }
body.theme-forest { background: linear-gradient(180deg, #DCFCE7 0%, #FFFFFF 60%); }
body.theme-candy { background: linear-gradient(180deg, #FCE7F3 0%, #FFF7ED 60%); }
body.theme-space { background: linear-gradient(180deg, #E0E7FF 0%, #F5F3FF 60%); }

/* --- Lớp học / lịch sử phòng thi (Đấu Trường) --- */
.ar-class-chip { display: inline-flex; align-items: center; gap: 6px; background: #EEF6FF; border: 2px solid #3AA8F7; border-radius: 999px; padding: 6px 12px; font-weight: 800; color: #0A2463; }
.ar-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 0.9rem; }
.ar-table th, .ar-table td { padding: 6px 8px; border-bottom: 1px solid #E2E8F0; text-align: left; }
.ar-table th { background: #F1F5F9; font-family: var(--font-display); font-weight: 900; color: #334155; }
.ar-table td.num { text-align: right; font-weight: 800; color: #1273C4; white-space: nowrap; }
.ar-hist-item { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: #F8FAFC; border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; font-weight: 800; color: #1E293B; }
.ar-hist-item small { display: block; color: #64748B; font-weight: 700; font-size: 0.8rem; }
.ar-input {
  width: 100%; padding: 10px 14px; border: 2px solid #CBD5E1; border-radius: 14px; font-family: var(--font-body);
  font-weight: 800; font-size: 1rem; outline: none; color: #1E293B;
}
.ar-input:focus { border-color: #3AA8F7; }
.ar-inline { display: flex; gap: 8px; align-items: center; }
.ar-inline .ar-input { flex: 1; min-width: 0; }
.ar-inline .ar-btn { margin-top: 0; width: auto; min-height: 46px; padding: 0 16px; font-size: 1rem; flex: none; }
.ar-share-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.ar-share-row .ar-btn { flex: 1; min-width: 140px; margin-top: 0; }

@media print {
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block !important; padding: 20px; font-family: Arial, sans-serif; }
}

/* --- Kể chuyện --- */
.story-text { font-size: 1.15rem; line-height: 1.7; color: #1E293B; background: #FFFDF5; border: 2px solid #FDE68A; border-radius: 18px; padding: 16px 18px; font-weight: 600; }
.story-text p { margin: 0 0 10px; }
.story-title { font-family: var(--font-display); font-size: 1.4rem; font-weight: 900; color: #B45309; text-align: center; margin: 4px 0 10px; }
.story-moral { margin-top: 10px; background: #ECFDF5; border-radius: 14px; padding: 10px 14px; font-weight: 800; color: #065F46; }
.story-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.story-card { background: white; border: 3px solid #E2E8F0; border-radius: 18px; padding: 12px 8px; text-align: center; cursor: pointer; font-weight: 800; color: #1E293B; }
.story-card .st-ic { font-size: 2.4rem; }
.story-card.done { border-color: #22C55E; }

/* --- Nói theo (tiếng Anh) --- */
.speak-box { text-align: center; padding: 10px; }
.speak-word { font-family: var(--font-display); font-size: 2.4rem; font-weight: 900; color: #1273C4; }
.speak-ipa { color: #64748B; font-weight: 700; margin-bottom: 10px; }
.btn-mic { width: 120px; height: 120px; border-radius: 50%; border: 5px solid white; background: linear-gradient(135deg, #FF5E7E, #EF4444); color: white; font-size: 3rem; box-shadow: 0 10px 24px rgba(239, 68, 68, 0.35); cursor: pointer; }
.btn-mic.listening { animation: pulse 0.9s infinite; background: linear-gradient(135deg, #22C55E, #16A34A); }
.speak-heard { margin-top: 10px; font-weight: 800; color: #334155; min-height: 24px; }

/* --- Toán tư duy --- */
.tuduy-visual { text-align: center; font-size: 2.2rem; line-height: 1.3; margin: 6px 0 10px; word-break: break-word; }
.story-card small { display: block; color: #64748B; font-weight: 700; font-size: 0.78rem; margin-top: 2px; }

/* ===== mạng xã hội (v132, dùng chung js/data/social-links.js) ===== */
.sk-social { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; }
.sk-soc-label { font-weight: 800; }
.sk-soc { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 0; background: #fff; color: #1E293B; font: inherit; font-weight: 800; font-size: 0.95rem; text-decoration: none; cursor: pointer; box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12); }
.sk-soc svg { width: 20px; height: 20px; flex: none; }
.sk-soc-youtube svg { color: #FF0000; }
.sk-soc-tiktok svg { color: #111; }
.sk-soc-facebook svg { color: #1877F2; }
@media (hover: hover) { .sk-soc:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18); } }
.site-footer .sk-social { margin: 4px 0 10px; }
.sk-social[hidden] { display: none; }


/* ===== css/base/ui-polish.css ===== */
/* =========================================================
   Sam Kido - Tinh chỉnh giao diện cho PC / iPad / Điện thoại
   Mục tiêu: nút đủ to cho ngón tay trẻ, chữ đủ lớn,
   thanh đầu trang không bị tràn trên máy tính bảng.
   (Nạp sau cùng để ghi đè các file CSS trước đó)
   ========================================================= */

/* ---------------------------------------------------------
   1. VÙNG CHẠM TỐI THIỂU 48px CHO NGÓN TAY TRẺ
   --------------------------------------------------------- */
.voice-btn,
.btn-back-home,
.diff-pill-btn,
.tab-btn,
.btn-opp-select,
.btn-mode-toggle,
.header-btn,
.pill-choice,
.writing-cat-btn,
.btn-en-speak,
.runner-pill-btn,
.pd-pill,
.btn-claim-chest,
.btn-tool-write,
.frame-choice-btn,
.btn-letter-act,
.btn-nav-letter,
.modal-btn-confirm,
.tone-play-btn {
  min-height: 48px;
}

.voice-btn {
  font-size: 1rem;
  padding: 10px 18px;
}

.diff-pill-btn {
  font-size: 0.95rem;
  padding: 9px 16px;
}

.diff-badge-star {
  font-size: 0.85rem;
}

.btn-en-speak {
  font-size: 1rem;
  padding: 10px 18px;
  min-height: 48px;
}

/* Bảng màu trong Xưởng Mỹ Thuật: chấm màu to hơn để bé chấm trúng */
.color-dot {
  width: 46px !important;
  height: 46px !important;
  min-width: 46px !important;
  flex: 0 0 auto !important;
}

.color-dot.active {
  width: 52px !important;
  height: 52px !important;
  min-width: 52px !important;
}

.btn-coloring-action,
.btn-finish-coloring,
.btn-art-tool {
  min-height: 48px;
}

/* Màu mực luyện viết & avatar chọn sẵn: ô tròn to hơn */
.ink-btn {
  width: 46px !important;
  height: 46px !important;
}

.preset-avatar-btn {
  min-width: 56px;
  min-height: 56px;
  font-size: 1.9rem;
}

/* Dải chữ cái luyện viết: trước đây chỉ rộng ~15px, bé rất khó bấm */
.char-scroll-btn {
  width: 62px !important;
  height: 62px !important;
  border-radius: 18px;
}

.char-scroll-btn .char-symbol {
  font-size: 1.7rem;
  line-height: 1.1;
}

.char-scroll-btn .char-cap {
  font-size: 0.8rem;
}

/* Công cụ vẽ, con dấu, nút vào đảo */
.tool-btn,
.stamp-btn,
.btn-save-art,
.btn-play-island,
.btn-start-adventure,
.btn-clear-spell,
.pool-letter-btn {
  min-height: 48px !important;
}

.stamp-btn {
  min-width: 48px !important;
  font-size: 1.5rem;
}

/* ---------------------------------------------------------
   2. CHỮ ĐỦ LỚN (không dưới 12px)
   --------------------------------------------------------- */
.card-name {
  font-size: 0.8rem !important;
}

.template-card-title {
  font-size: 0.95rem;
}

.pin-avatar-tag {
  font-size: 0.78rem;
  padding: 3px 10px;
}

.b-nav-label {
  font-size: 0.78rem;
}

/* ---------------------------------------------------------
   3. BÀI TẬP TO - RÕ - DỄ BẤM
   --------------------------------------------------------- */
.game-opt-btn {
  min-height: 68px;
}

/* Hình để đếm: to hơn để bé nhìn và bấm dễ */
.count-item {
  width: 86px;
  height: 86px;
}

.count-icon {
  font-size: 3.1rem;
}

.counting-box {
  gap: 18px;
  min-height: 150px;
}

/* Số thứ tự chỉ hiện khi bé bấm vào hình (trước đây là chấm đỏ rỗng gây rối mắt) */
.count-number-tag:empty {
  display: none;
}

/* ---------------------------------------------------------
   4. THANH ĐẦU TRANG TRÊN MÁY TÍNH BẢNG (769px - 1200px)
   Trước đây các nút Sticker / Phụ Huynh bị đẩy ra ngoài màn hình
   --------------------------------------------------------- */
.brand-title {
  white-space: nowrap;
}

.rank-pill {
  white-space: nowrap;
}

@media (max-width: 1200px) {
  .top-navbar {
    flex-wrap: wrap;
    row-gap: 10px;
    padding: 10px 16px;
  }

  .brand-title {
    font-size: 1.45rem;
  }

  /* Danh hiệu dài gây vỡ thanh nav - vẫn xem được ở Album Sticker & Góc Phụ Huynh */
  .rank-pill {
    display: none;
  }
}

/* Máy tính bảng dùng thanh điều hướng đáy giống điện thoại cho bé dễ bấm */
@media (max-width: 1024px) {
  .mobile-bottom-nav {
    display: flex;
    /* Không khóa cứng chiều cao: khi cài như app trên iPhone thanh phải cộng thêm khoảng chừa vạch Home */
    height: auto;
    min-height: 74px;
  }

  .app-viewport {
    padding-bottom: calc(94px + env(safe-area-inset-bottom, 0px));
  }

  .mobile-sound-toggle-btn {
    display: flex;
  }

  /* Các nút này đã có sẵn ở thanh đáy */
  .header-actions #btn-open-stickers,
  .header-actions #btn-open-parent,
  .header-actions #btn-open-quests,
  .header-actions #btn-header-speed {
    display: none;
  }

  .b-nav-icon {
    font-size: 1.7rem;
  }
}

/* iPad: bài tập rộng rãi, dễ nhìn */
@media (min-width: 769px) and (max-width: 1024px) {
  .game-card {
    padding: 24px 22px;
  }

  .game-question {
    font-size: 1.5rem;
  }

  .game-opt-btn {
    min-height: 76px;
    font-size: 1.7rem;
  }

  .section-instruction {
    font-size: 1.05rem;
  }
}

/* ---------------------------------------------------------
   5. ĐIỆN THOẠI: ưu tiên nội dung bài tập
   --------------------------------------------------------- */
@media (max-width: 640px) {
  .game-opt-btn {
    min-height: 62px;
    font-size: 1.35rem;
  }

  .count-item {
    width: 68px;
    height: 68px;
  }

  .count-icon {
    font-size: 2.4rem;
  }

  .voice-btn {
    font-size: 0.95rem;
    padding: 9px 14px;
  }

  /* Thanh tab chế độ: viên to, dễ vuốt */
  .game-tabs-nav .tab-btn {
    min-height: 50px;
    font-size: 0.98rem;
  }

  /* Gom gọn phần đầu bài tập để câu hỏi + đáp án nằm trong màn hình đầu tiên */
  .game-card {
    padding: 14px 12px;
    margin-bottom: 14px;
  }

  .game-header {
    flex-wrap: nowrap;
    gap: 8px;
    margin-bottom: 10px;
  }

  .game-badge {
    font-size: 0.82rem;
    padding: 6px 10px;
    line-height: 1.25;
  }

  .voice-btn {
    white-space: nowrap;
    padding: 8px 12px;
    font-size: 0.88rem;
  }

  .sk-level-bar {
    margin-bottom: 10px !important;
  }

  .game-question {
    font-size: 1.18rem;
    margin: 8px 0 10px;
  }

  .counting-box {
    padding: 12px;
    min-height: auto;
    gap: 12px;
    margin-bottom: 14px;
  }

  .section-instruction,
  .game-hint {
    margin-bottom: 10px;
  }

  .view-top-header {
    padding: 8px 12px;
    margin-bottom: 10px;
  }

  /* Các hàng lựa chọn dài (đối thủ, bạn đồng hành, chế độ chơi): 1 hàng vuốt ngang */
  .opponent-picker-row,
  .runner-pills-row,
  .versus-mode-toggle-bar,
  .writing-cat-selector {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .opponent-picker-row::-webkit-scrollbar,
  .runner-pills-row::-webkit-scrollbar,
  .versus-mode-toggle-bar::-webkit-scrollbar,
  .writing-cat-selector::-webkit-scrollbar {
    display: none;
  }

  .opponent-picker-row > *,
  .runner-pills-row > *,
  .versus-mode-toggle-bar > *,
  .writing-cat-selector > * {
    flex-shrink: 0;
  }

  /* Trang bản đồ tổng quan: tiêu đề và các ô thông tin xếp dọc thay vì bị bóp mỗi dòng một chữ */
  .overworld-header-card {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 16px 14px;
    margin-bottom: 18px;
  }

  .overworld-title {
    font-size: 1.3rem;
    text-align: center;
  }

  .overworld-subtitle {
    text-align: center;
    font-size: 0.92rem;
  }

  .overworld-stats-pill {
    justify-content: center;
    gap: 8px;
  }

  /* Màn hình trong đảo: tên đảo xuống hàng riêng, nút nghe đọc không bị đẩy ra ngoài */
  .stage-world-topbar {
    flex-wrap: wrap;
    gap: 8px 10px;
    padding: 10px 12px;
  }

  .stage-world-topbar .btn-back-stage {
    order: 1;
  }

  .stage-world-topbar .voice-btn {
    order: 2;
    margin-left: 0;
  }

  .stage-world-heading {
    order: 3;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
  }

  .stage-world-name {
    font-size: 1.05rem;
    text-align: center;
  }

  /* Hai nút chia đôi hàng đầu để luôn nằm chung một hàng */
  .btn-back-stage,
  .stage-world-topbar .voice-btn {
    font-size: 0.85rem;
    padding: 8px 10px;
    flex: 1 1 auto;
    min-width: 0;
    justify-content: center;
    white-space: nowrap;
  }

  .stage-world-topbar {
    gap: 8px;
  }

  /* Nhãn "Bé Đang Ở Đây" nằm phía trên nhân vật, không che trạm bên dưới */
  .avatar-walker-bob {
    top: -62px;
    flex-direction: column-reverse;
  }

  .walker-name {
    font-size: 0.58rem;
    padding: 2px 6px;
    margin-bottom: 2px;
  }

  .avatar-walker-inner {
    font-size: 1.9rem;
  }

  .stepping-stones-track {
    padding-top: 62px;
  }

  /* Đua tốc độ: thanh thông tin xuống hàng thay vì bị cắt mất chữ "Combo" */
  .speed-hud-bar {
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 12px;
    padding: 10px;
  }

  .speed-hud-bar .hud-item {
    font-size: 0.9rem;
  }

  /* Thanh đầu trang gọn trên 1 hàng: giữ logo sư tử làm nút về trang chủ */
  .brand-title {
    display: none;
  }

  .top-navbar {
    padding: 8px 12px;
    gap: 8px;
  }

  .logo-badge {
    font-size: 2rem;
  }

  /* Chấm màu trên điện thoại vẫn phải đủ to (ghi đè responsive.css) */
  .color-dot {
    width: 46px !important;
    height: 46px !important;
  }

  .color-dot.active {
    width: 50px !important;
    height: 50px !important;
  }
}

/* Máy tính bảng nhỏ & điện thoại: giữ chấm màu và tên thẻ đủ lớn */
@media (max-width: 820px) {
  .color-dot {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    flex: 0 0 auto !important;
  }

  .card-name {
    font-size: 0.78rem !important;
  }
}

/* ============================================================
   VÒNG RÀ SOÁT CUỐI — ẢNH & HIỂN THỊ
   ============================================================ */

/* 1. Chú thích đảo không bị cắt ở mép bản đồ (chỉ máy tính mới có hover) */
@media (min-width: 901px) {
  .panoramic-map-container,
  .map-artwork-wrapper {
    overflow: visible;
  }
}

/* Trên điện thoại/máy tính bảng không có hover: ẩn hẳn chú thích để không làm tràn trang */
@media (max-width: 900px) {
  .pin-tooltip { display: none; }
}

.pin-tooltip {
  width: max-content;
  max-width: min(78vw, 300px);
  white-space: normal;
}

/* 2. Trên điện thoại: thu nhỏ chốt đảo để không che hết tranh */
@media (max-width: 600px) {
  .pin-badge {
    width: 30px;
    height: 30px;
    border-width: 2px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
  }
  /* Tranh nền đã in sẵn số, bỏ số của chốt cho đỡ rối mắt bé */
  .pin-num { display: none; }
  .pin-icon { font-size: 0.85rem; }
  .pin-avatar-bob { top: -26px; }
  .pin-avatar-face { font-size: 1.35rem; }
  /* Nhãn chữ che mất chốt đảo trên màn nhỏ: chỉ giữ hình bé đang chạy */
  .pin-avatar-tag { display: none; }
  .pin-current .pin-badge {
    box-shadow: 0 0 0 3px #F59E0B, 0 4px 12px rgba(245, 158, 11, 0.6);
  }
}

/* 3. Ảnh thu nhỏ chọn tranh tô màu: to hơn để bé nhìn rõ nét vẽ */
.template-card-img {
  width: 76px !important;
  height: 76px !important;
}

/* 4. Chữ đủ đậm để đọc rõ (đạt chuẩn tương phản WCAG AA) */
.btn-back-home { color: #C81E42; }
.tab-btn.active { background: #1273C4; }
.voice-btn { color: #015C8D; }
.game-hint { color: #55617A; }
.rs-btn-hint { background: #C2600B; }
.fl-net-btn { background: #78839A; }

/* 5. Tên app không dính sát thẻ hồ sơ của bé */
.brand-logo { margin-right: 14px; }

/* 6. Bản đồ: gợi ý ẩn đi, bé bấm mới hiện (nhiều gợi ý nói thẳng đáp án) */
.rpg-challenge-box button.challenge-hint-tag,
button.challenge-hint-tag {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #FFD54F, #FFB300);
  color: #4A3200;
  border: 2px solid #FFF3C4;
  border-radius: 999px;
  padding: 8px 18px;
  min-height: 44px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 900;
  text-shadow: none;
  box-shadow: 0 4px 10px rgba(255, 179, 0, 0.35);
}

.rpg-challenge-box button.challenge-hint-tag:active,
button.challenge-hint-tag:active {
  transform: scale(0.96);
}

.challenge-hint-text {
  margin: 10px 0 2px;
  padding: 10px 14px;
  background: #FFF8E1;
  border: 2px dashed #F59E0B;
  border-radius: 14px;
  color: #92590B;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.45;
}

/* ============================================================
   SỬA THEO ẢNH CHỤP TỪ ĐIỆN THOẠI THẬT (samkido.com)
   1) Hồ sơ bé tràn ngang + quá dài   2) Thanh tab vuốt ngang khó thấy
   ============================================================ */
@media (max-width: 600px) {
  /* --- Hồ sơ bé: không bao giờ tràn ngang --- */
  .profile-modal-card {
    padding: 18px 14px 16px;
    max-height: 92vh;
    overflow-x: hidden;
    border-width: 4px;
    border-radius: 22px;
  }
  .profile-modal-card .modal-header-badge { font-size: 0.78rem; padding: 3px 10px; margin-bottom: 4px; }
  .profile-modal-card .modal-title { font-size: 1.35rem; margin: 2px 0 2px; }
  .profile-modal-card .modal-desc { font-size: 0.85rem; margin-bottom: 10px; }
  .profile-modal-card .form-group { margin-bottom: 10px; }
  .profile-modal-card .form-label { font-size: 0.95rem; margin-bottom: 6px; }
  .profile-modal-card .form-sublabel { font-size: 0.82rem; margin: 8px 0 6px; }
  .profile-modal-card .form-input { padding: 10px 14px; font-size: 1rem; }

  /* Tuổi và giới tính xếp dọc, mỗi nhóm là lưới 2 cột gọn gàng */
  .profile-modal-card .form-row { grid-template-columns: 1fr; gap: 6px; }
  .profile-modal-card .form-col { min-width: 0; }
  .profile-modal-card .select-pills {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .profile-modal-card .pill-choice {
    flex: none;
    min-width: 0;
    white-space: normal;
    line-height: 1.2;
    padding: 9px 6px;
    font-size: 0.88rem;
    min-height: 44px;
  }

  /* Khung xem trước avatar: nhỏ gọn, nằm ngang */
  .profile-modal-card .avatar-creation-section { margin-top: 4px; }
  .profile-modal-card .avatar-live-preview-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    margin-bottom: 6px;
  }
  .profile-modal-card .avatar-preview-wrapper {
    width: 64px;
    height: 64px;
    min-width: 64px;
    flex: none;
  }
  .profile-modal-card .preview-avatar-content { font-size: 2rem; }
  .profile-modal-card .avatar-preview-info { min-width: 0; flex: 1; }
  .profile-modal-card .preview-name-tag { font-size: 1rem; }
  .profile-modal-card .btn-upload-avatar { font-size: 0.82rem; padding: 8px 10px; }

  /* 8 avatar hoạt hình: lưới 4 cột, không còn hàng dài tràn ra ngoài */
  .profile-modal-card .preset-avatars-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    overflow: visible;
  }
  .profile-modal-card .preset-avatar-btn {
    width: auto;
    min-width: 0;
    height: 52px;
    font-size: 1.6rem;
    padding: 0;
  }

  /* 6 khung viền: lưới 3 cột, chữ xuống dòng được */
  .profile-modal-card .frame-selector-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .profile-modal-card .frame-choice-btn {
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    gap: 2px;
    padding: 6px 4px;
    font-size: 0.78rem;
    line-height: 1.15;
    min-height: 54px;
  }
  .profile-modal-card .frame-icon { font-size: 1.2rem; }

  .profile-modal-card .form-actions { margin-top: 12px; }
  .profile-modal-card .modal-btn-confirm { width: 100%; font-size: 1.05rem; padding: 13px 10px; }

  /* --- Thanh tab chế độ: lưới 2 cột, thấy hết mọi trò, không phải vuốt ngang --- */
  .game-tabs-nav {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    flex-wrap: wrap !important;
    overflow: visible !important;
    gap: 8px;
    padding: 2px 0 6px;
  }
  .game-tabs-nav .tab-btn {
    flex: none;
    width: 100%;
    min-width: 0;
    white-space: normal;
    line-height: 1.2;
    text-align: center;
    padding: 8px 8px;
    font-size: 0.9rem;
    min-height: 46px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  /* Tab lẻ cuối cùng kéo rộng cả hàng cho cân */
  .game-tabs-nav .tab-btn:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* Máy tính bảng: 3 cột */
@media (min-width: 601px) and (max-width: 900px) {
  .game-tabs-nav {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    overflow: visible !important;
    gap: 10px;
  }
  .game-tabs-nav .tab-btn { width: 100%; white-space: normal; text-align: center; min-height: 48px; }
}


/* ===== css/games/play-more.css ===== */
/* ============================================================
   KHU VUI CHƠI MỚI (v85): thú cưng, hành trình, hai người một máy, âm nhạc,
   kể chuyện theo tranh, thử thách gia đình, việc tốt mỗi ngày
   ============================================================ */

/* --- Thẻ nhỏ trên trang chủ (thú cưng / hành trình / gia đình) --- */
.pet-card, .jn-card, .fm-card {
  display: flex; align-items: center; gap: 14px; background: #fff; border-radius: 22px; padding: 12px 14px; margin: 0 0 14px;
  border: 3px solid var(--pc, var(--jc, #FDE68A)); box-shadow: var(--card-shadow);
}
.pet-info, .jn-info, .fm-info { flex: 1; min-width: 0; }
.pet-name, .jn-title, .fm-title { font-family: var(--font-display); font-weight: 900; font-size: 1.05rem; color: #1E293B; }
.pet-name small { color: #64748B; font-weight: 800; font-size: 0.8rem; }
.pet-say, .jn-sub, .fm-sub { font-size: 0.88rem; font-weight: 700; color: #475569; margin: 2px 0 6px; line-height: 1.3; }
.pet-bar, .jn-bar, .fm-bar { height: 10px; background: #F1F5F9; border-radius: 999px; overflow: hidden; }
.pet-bar span, .jn-bar span, .fm-bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #FFD13B, #FF9F1C); transition: width 0.5s; }
.jn-bar span { background: linear-gradient(90deg, #3AA8F7, #1273C4); }
.fm-bar span { background: linear-gradient(90deg, #38D39F, #16A34A); }
.pet-bar.big { height: 16px; margin: 8px 0; }
.jn-bar.small { height: 8px; margin-top: 6px; }
.pet-meta { font-size: 0.78rem; color: #64748B; font-weight: 700; margin-top: 4px; }
.pet-go, .jn-go { flex: none; min-height: 46px; padding: 0 14px; border-radius: 999px; border: none; cursor: pointer; font-family: var(--font-display); font-weight: 900; color: #fff; background: var(--pc, var(--jc, #1273C4)); box-shadow: 0 6px 0 rgba(0,0,0,0.12); background-image: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.2)); text-shadow: 0 1px 2px rgba(0,0,0,0.35); }
.pet-go:active, .jn-go:active { transform: translateY(2px); box-shadow: 0 3px 0 rgba(0,0,0,0.12); }
.pet-avatar { position: relative; width: 74px; height: 74px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #fff, #F1F5F9); display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; border: 3px solid var(--pc, #FDE68A); }
.pet-emoji { font-size: 2.4rem; line-height: 1; animation: petBob 2.4s ease-in-out infinite; }
.pet-avatar.stage-0 .pet-emoji { animation: petWiggle 2s ease-in-out infinite; }
.pet-avatar.stage-3 .pet-emoji, .pet-avatar.stage-4 .pet-emoji { font-size: 2.9rem; }
.pet-mood { position: absolute; right: -6px; bottom: -4px; font-size: 1.2rem; background: #fff; border-radius: 50%; padding: 2px; box-shadow: 0 2px 6px rgba(0,0,0,0.15); }
.jn-ic, .fm-ic { font-size: 2.6rem; line-height: 1; flex: none; }
.jn-card.jn-done { background: linear-gradient(135deg, #F5F3FF, #fff); }
.fm-card.done { border-color: #22C55E; background: linear-gradient(135deg, #F0FDF4, #fff); }
.fm-members { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.fm-member { display: inline-flex; align-items: center; gap: 4px; background: #F8FAFC; border: 2px solid #E2E8F0; border-radius: 999px; padding: 3px 10px 3px 6px; font-size: 0.78rem; font-weight: 800; color: #334155; }
.fm-member .fm-av { font-size: 1rem; }
.fm-member b { color: #16A34A; margin-left: 2px; }
@keyframes petBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes petWiggle { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }

/* --- Khu vui chơi mới trên trang chủ --- */
.sk-rooms-section.play-more .sk-rooms-title { color: #B45309; }
.sk-room-card .sk-room-tag.hot { background: #FFF7ED; color: #C2410C; }

/* --- Màn hình thú cưng --- */
.pet-stage-card { text-align: center; }
.pet-scene { position: relative; height: 200px; border-radius: 22px; background: linear-gradient(180deg, #E0F2FE 0%, #DCFCE7 100%); display: flex; align-items: flex-end; justify-content: center; overflow: visible; margin-bottom: 12px; }
.pet-scene.stage-0 { background: linear-gradient(180deg, #FEF3C7 0%, #FDE68A 100%); }
.pet-big { font-size: 5.2rem; line-height: 1; margin-bottom: 14px; cursor: pointer; animation: petBob 2.4s ease-in-out infinite; filter: drop-shadow(0 8px 10px rgba(0,0,0,0.18)); }
.pet-scene.stage-0 .pet-big { animation: petWiggle 2s ease-in-out infinite; }
.pet-scene.stage-3 .pet-big, .pet-scene.stage-4 .pet-big { font-size: 6.4rem; }
.pet-scene.stage-4::before { content: '✨'; position: absolute; left: 18%; top: 18%; font-size: 1.6rem; animation: petBob 1.6s infinite; }
.pet-scene.stage-4::after { content: '✨'; position: absolute; right: 18%; top: 30%; font-size: 1.3rem; animation: petBob 2s infinite 0.4s; }
.pet-big.jump { animation: petJump 0.6s ease-out; }
@keyframes petJump { 0% { transform: translateY(0) scale(1); } 40% { transform: translateY(-34px) scale(1.12); } 100% { transform: translateY(0) scale(1); } }
.pet-bubble-wrap { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; justify-content: center; }
.pet-bubble { background: #fff; border-radius: 16px; padding: 8px 14px; font-weight: 800; color: #334155; font-size: 0.92rem; box-shadow: 0 4px 12px rgba(0,0,0,0.12); max-width: 100%; }
.pet-title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 900; color: #1E293B; }
.pet-tag { display: inline-block; font-size: 0.8rem; background: var(--pc, #FDE68A); color: #fff; border-radius: 999px; padding: 3px 10px; vertical-align: middle; margin-left: 6px; }
.pet-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.pet-actions .ar-btn { flex: 1; min-width: 160px; margin-top: 0; }
.pet-note { font-size: 0.85rem; color: #64748B; font-weight: 700; margin-top: 10px; }
.pet-stages { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.pet-stage-item { text-align: center; border: 2px solid #E2E8F0; border-radius: 16px; padding: 10px 4px; opacity: 0.55; }
.pet-stage-item.done { opacity: 1; border-color: #22C55E; background: #F0FDF4; }
.pet-stage-item.now { box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25); }
.pet-stage-ic { font-size: 2rem; }
.pet-stage-name { font-weight: 900; font-size: 0.85rem; color: #1E293B; }
.pet-stage-desc { font-size: 0.72rem; color: #64748B; font-weight: 700; }
.pet-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-top: 8px; }
.pet-type { border: 3px solid #E2E8F0; border-radius: 16px; background: #fff; padding: 8px 4px; font-weight: 800; color: #334155; cursor: pointer; min-height: 70px; }
.pet-type span { display: block; font-size: 1.8rem; }
.pet-type.active { border-color: var(--pc); background: #F8FAFC; box-shadow: 0 0 0 3px rgba(0,0,0,0.05); }
@media (max-width: 520px) { .pet-stages { grid-template-columns: repeat(3, 1fr); } }

/* --- Hành trình phiêu lưu --- */
.jn-strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: thin; }
.jn-island { flex: none; width: 112px; border: 3px solid #E2E8F0; border-radius: 18px; background: #fff; padding: 8px 4px; text-align: center; cursor: pointer; font-family: var(--font-body); }
.jn-island.view { border-color: var(--jc); box-shadow: 0 0 0 3px rgba(0,0,0,0.06); }
.jn-island.locked { opacity: 0.5; cursor: not-allowed; }
.jn-island.done { background: #F0FDF4; }
.jn-island-ic { display: block; font-size: 1.9rem; }
.jn-island-nm { display: block; font-weight: 900; font-size: 0.74rem; color: #1E293B; line-height: 1.15; min-height: 2.3em; }
.jn-island-tag { display: inline-block; margin-top: 3px; font-size: 0.62rem; font-weight: 900; color: #16A34A; }
.jn-island-tag.now { color: #B45309; }
.jn-map { border: 3px solid var(--jc); }
.jn-map-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.jn-map-ic { font-size: 2.6rem; }
.jn-map-title { font-family: var(--font-display); font-weight: 900; font-size: 1.25rem; color: #1E293B; }
.jn-map-sub { font-size: 0.86rem; font-weight: 700; color: #64748B; }
.jn-map-count { margin-left: auto; font-weight: 900; color: #B45309; background: #FFF7ED; border-radius: 999px; padding: 6px 12px; }
.jn-path { display: flex; flex-direction: column; gap: 10px; position: relative; padding-left: 6px; }
.jn-path::before { content: ''; position: absolute; left: 32px; top: 20px; bottom: 20px; border-left: 4px dashed #CBD5E1; }
.jn-node { position: relative; display: flex; align-items: center; gap: 10px; background: #F8FAFC; border: 2px solid #E2E8F0; border-radius: 18px; padding: 10px 12px; }
.jn-node.right { margin-left: 24px; }
.jn-node.now { border-color: var(--jc); background: #fff; box-shadow: 0 8px 18px rgba(0,0,0,0.08); animation: jnPulse 1.8s infinite; }
.jn-node.done { border-color: #86EFAC; background: #F0FDF4; }
.jn-node.locked { opacity: 0.6; }
.jn-node.boss { background: linear-gradient(135deg, #FEF2F2, #fff); border-color: #FCA5A5; }
.jn-node.boss.now { border-color: #EF4444; }
.jn-node-ic { width: 48px; height: 48px; border-radius: 50%; background: #fff; border: 3px solid #E2E8F0; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex: none; }
.jn-node.now .jn-node-ic { border-color: var(--jc); }
.jn-node-body { flex: 1; min-width: 0; }
.jn-node-title { font-weight: 900; color: #1E293B; font-size: 0.98rem; }
.jn-node-sub { font-size: 0.8rem; color: #64748B; font-weight: 700; }
.jn-play { flex: none; min-height: 44px; padding: 0 14px; border-radius: 999px; border: none; cursor: pointer; font-family: var(--font-display); font-weight: 900; color: #fff; background: var(--jc); }
.jn-play.again { background: #E2E8F0; color: #334155; }
.jn-play.boss { background: linear-gradient(135deg, #EF4444, #B91C1C); }
@keyframes jnPulse { 0%, 100% { box-shadow: 0 8px 18px rgba(0,0,0,0.08); } 50% { box-shadow: 0 8px 22px rgba(58, 168, 247, 0.3); } }
.jn-boss-card { border: 3px solid #FCA5A5; text-align: center; }
.jn-boss-head { display: flex; align-items: center; gap: 12px; text-align: left; flex-wrap: wrap; margin-bottom: 8px; }
.jn-boss-ic { font-size: 3rem; animation: petWiggle 1.4s infinite; }
.jn-boss-hp { flex-basis: 100%; height: 12px; background: #FEE2E2; border-radius: 999px; overflow: hidden; }
.jn-boss-hp span { display: block; height: 100%; background: linear-gradient(90deg, #EF4444, #B91C1C); transition: width 0.5s; }

/* --- Hai người một máy --- */
.duel-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.duel-chip { border: 2px solid #E2E8F0; background: #fff; border-radius: 999px; padding: 8px 14px; font-weight: 800; color: #334155; cursor: pointer; min-height: 42px; }
.duel-chip.active { border-color: #1273C4; background: #EEF6FF; color: #0A2463; }
.duel-arena { display: flex; flex-direction: column; min-height: calc(100vh - 150px); height: calc(100dvh - 150px); gap: 4px; }
.duel-half { flex: 1; display: flex; flex-direction: column; background: #fff; border-radius: 22px; padding: 10px 12px; border: 3px solid #E2E8F0; min-height: 0; overflow: hidden; }
.duel-half.top { transform: rotate(180deg); border-color: #FBCFE8; background: #FFF7FB; }
.duel-half.bottom { border-color: #BAE6FD; background: #F3FAFF; }
.duel-head { display: flex; justify-content: space-between; align-items: center; font-weight: 900; color: #1E293B; margin-bottom: 4px; }
.duel-score { background: #FEF3C7; color: #92400E; border-radius: 999px; padding: 3px 10px; font-size: 0.85rem; }
.duel-q { font-family: var(--font-display); font-weight: 900; font-size: clamp(0.95rem, 2.6vw, 1.25rem); color: #1E293B; text-align: center; line-height: 1.3; margin: 2px 0 6px; display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.duel-q-ic { font-size: 1.6rem; }
.duel-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; flex: 1; min-height: 0; }
.duel-opt { border: 3px solid #E2E8F0; border-radius: 16px; background: #fff; font-family: var(--font-display); font-weight: 900; font-size: clamp(1rem, 3vw, 1.4rem); color: #1E293B; cursor: pointer; min-height: 52px; padding: 6px; }
.duel-opt.picked { border-color: #1273C4; }
.duel-opt.right { border-color: #22C55E; background: #F0FDF4; }
.duel-opt.wrong { border-color: #EF4444; background: #FEF2F2; }
.duel-opt:disabled { opacity: 0.8; cursor: default; }
.duel-fb { min-height: 22px; text-align: center; font-weight: 900; font-size: 0.9rem; margin-top: 4px; }
.duel-fb.ok { color: #16A34A; }
.duel-fb.no { color: #B45309; }
.duel-fb.hint { color: #1273C4; }
.duel-mid { display: flex; align-items: center; gap: 8px; padding: 0 6px; }
.duel-mid .pill { background: #1E293B; color: #fff; border-radius: 999px; padding: 4px 10px; font-weight: 900; font-size: 0.8rem; white-space: nowrap; }
.duel-timer { flex: 1; height: 10px; background: #E2E8F0; border-radius: 999px; overflow: hidden; }
.duel-timer span { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #22C55E, #F59E0B); transition: width 0.25s linear; }
.duel-quit { border: none; background: #E2E8F0; color: #334155; border-radius: 50%; width: 32px; height: 32px; cursor: pointer; font-weight: 900; }
body.duel-playing .mobile-bottom-nav { display: none !important; }
.duel-result { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 10px 0; }
.duel-res { flex: 1; max-width: 180px; border: 3px solid #E2E8F0; border-radius: 18px; padding: 10px; text-align: center; }
.duel-res.win { border-color: #FBBF24; background: #FFFBEB; transform: scale(1.05); }
.duel-res-ic { font-size: 2.2rem; }
.duel-res-nm { font-weight: 900; color: #1E293B; }
.duel-res-pt { font-family: var(--font-display); font-weight: 900; color: #1273C4; font-size: 1.2rem; }
.duel-res small { color: #64748B; font-weight: 700; }
.duel-vs { font-size: 1.5rem; }

/* --- Âm nhạc --- */
.mu-card { text-align: center; }
.mu-keys { display: grid; grid-template-columns: repeat(auto-fit, minmax(54px, 1fr)); gap: 8px; margin: 12px 0; }
.mu-key { position: relative; min-height: 110px; border: none; border-radius: 16px 16px 22px 22px; background: linear-gradient(180deg, color-mix(in srgb, var(--kc) 85%, white), var(--kc)); cursor: pointer; box-shadow: 0 6px 0 rgba(0,0,0,0.18), inset 0 -8px 0 rgba(0,0,0,0.08); display: flex; flex-direction: column; justify-content: flex-end; align-items: center; padding-bottom: 8px; transition: transform 0.08s; }
.mu-key:active, .mu-key.lit { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0,0,0,0.18); filter: brightness(1.15); }
.mu-key:disabled { opacity: 0.7; cursor: default; }
.mu-key.next { animation: muNext 0.7s infinite alternate; }
.mu-key.shake { animation: shake 0.3s; }
.mu-key-dot { width: 14px; height: 14px; border-radius: 50%; background: rgba(255,255,255,0.75); margin-bottom: 6px; }
.mu-key-name { font-family: var(--font-display); font-weight: 900; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.3); font-size: 1rem; }
@keyframes muNext { from { transform: translateY(0); filter: brightness(1); } to { transform: translateY(-6px); filter: brightness(1.3); box-shadow: 0 12px 0 rgba(0,0,0,0.18), 0 0 0 4px rgba(255,255,255,0.8); } }
.mu-seq { display: flex; justify-content: center; gap: 8px; margin: 6px 0; }
.mu-dot { width: 18px; height: 18px; border-radius: 50%; background: #E2E8F0; }
.mu-dot.ok { background: #22C55E; }
.mu-dot.bad { background: #EF4444; }
.mu-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.mu-actions .ar-btn { width: auto; min-width: 150px; margin-top: 0; }
.mu-beats { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.mu-beat { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; background: #F1F5F9; border: 3px solid #E2E8F0; color: #94A3B8; font-weight: 900; }
.mu-beat.hit { background: #FFF7ED; border-color: #FDBA74; }
.mu-beat.lit { transform: scale(1.15); border-color: #1273C4; background: #DBEAFE; }
.mu-count { height: 40px; font-family: var(--font-display); font-size: 2rem; font-weight: 900; color: #1273C4; }
.mu-drum { width: 150px; height: 150px; border-radius: 50%; border: 6px solid #fff; background: radial-gradient(circle at 35% 30%, #FDE68A, #F59E0B 60%, #B45309); font-size: 4rem; cursor: pointer; box-shadow: 0 10px 24px rgba(180, 83, 9, 0.35); margin: 4px auto; display: block; }
.mu-drum:disabled { filter: grayscale(0.4); opacity: 0.7; }
.mu-drum.bump { animation: muBump 0.18s; }
@keyframes muBump { 0% { transform: scale(1); } 50% { transform: scale(0.9); } 100% { transform: scale(1); } }
.mu-songs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 8px; }
.mu-level { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-bottom: 6px; text-align: left; }
.mu-level-tag { flex: none; font-weight: 900; font-size: 0.8rem; color: #5B21B6; background: #F5F3FF; border-radius: 999px; padding: 6px 10px; margin-top: 2px; }
.mu-level .mu-songs { width: 100%; justify-content: flex-start; margin-bottom: 4px; }
.mu-level .mu-song { font-size: 0.82rem; padding: 7px 10px; }
.mu-song.free { border-style: dashed; }
.mu-song { border: 2px solid #E2E8F0; background: #fff; border-radius: 999px; padding: 8px 12px; font-weight: 800; color: #334155; cursor: pointer; min-height: 42px; font-size: 0.86rem; }
.mu-song.active { border-color: #9D65FF; background: #F5F3FF; color: #5B21B6; }
.mu-song.done::after { content: ' ✔'; color: #16A34A; }
.mu-progress { height: 12px; background: #F1F5F9; border-radius: 999px; overflow: hidden; margin-top: 8px; }
.mu-progress span { display: block; height: 100%; background: linear-gradient(90deg, #9D65FF, #6D28D9); transition: width 0.3s; }
.mu-prog-txt { font-weight: 900; color: #5B21B6; font-size: 0.85rem; margin-top: 4px; }

/* --- Kể chuyện theo tranh --- */
.tl-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0; }
.tl-slot { position: relative; min-height: 84px; border: 3px dashed #CBD5E1; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: #F8FAFC; cursor: pointer; }
.tl-slot.filled { border-style: solid; border-color: #3AA8F7; background: #fff; }
.tl-slot.ok { border-color: #22C55E; background: #F0FDF4; }
.tl-slot.bad { border-color: #EF4444; background: #FEF2F2; }
.tl-slot-n { position: absolute; left: 6px; top: 4px; font-weight: 900; color: #94A3B8; font-size: 0.8rem; }
.tl-slot-ic { font-size: 2.4rem; }
.tl-slot-empty { font-size: 1.6rem; color: #CBD5E1; font-weight: 900; }
.tl-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tl-frame { position: relative; border: 3px solid #E2E8F0; border-radius: 18px; background: #fff; padding: 12px 10px 10px; text-align: center; cursor: pointer; transition: transform 0.15s; }
.tl-frame:active { transform: scale(0.97); }
.tl-frame.used { opacity: 0.35; pointer-events: none; }
.tl-frame-ic { font-size: 3rem; line-height: 1.1; }
.tl-frame-txt { font-weight: 800; color: #334155; font-size: 0.88rem; line-height: 1.3; margin-top: 6px; }
.tl-speak, .tl-del { border: none; background: #F1F5F9; border-radius: 50%; width: 36px; height: 36px; cursor: pointer; font-size: 1rem; }
.tl-frame .tl-speak { position: absolute; right: 6px; top: 6px; }
.tl-group { margin: 8px 0; text-align: left; }
.tl-group-label { font-weight: 900; color: #334155; font-size: 0.9rem; margin-bottom: 4px; }
.tl-opts { display: flex; gap: 6px; flex-wrap: wrap; }
.tl-opt { width: 52px; height: 52px; border-radius: 14px; border: 3px solid #E2E8F0; background: #fff; font-size: 1.6rem; cursor: pointer; }
.tl-opt.active { border-color: #F59E0B; background: #FFF7ED; transform: scale(1.08); }
.tl-story { margin-top: 10px; }
.tl-story-icons { font-size: 1.8rem; text-align: center; letter-spacing: 6px; }
.tl-book { display: flex; flex-direction: column; gap: 8px; }
.tl-book-item { display: flex; align-items: center; gap: 10px; background: #F8FAFC; border: 2px solid #E2E8F0; border-radius: 16px; padding: 8px 10px; }
.tl-book-ic { font-size: 1.3rem; letter-spacing: 2px; flex: none; }
.tl-book-body { flex: 1; min-width: 0; text-align: left; }
.tl-book-title { font-weight: 900; color: #1E293B; }
.tl-book-body small { color: #64748B; font-weight: 700; }

/* --- Việc tốt mỗi ngày --- */
.hb-head { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.hb-ring { --p: 0; width: 70px; height: 70px; border-radius: 50%; flex: none; background: conic-gradient(#22C55E calc(var(--p) * 1%), #E2E8F0 0); display: flex; align-items: center; justify-content: center; }
.hb-ring span { width: 54px; height: 54px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; font-weight: 900; color: #16A34A; font-size: 0.9rem; }
.hb-confirm-all { margin: 8px 0 4px; }
.hb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-top: 10px; }
.hb-item { border: 3px solid #E2E8F0; border-radius: 18px; background: #fff; padding: 12px 10px; text-align: center; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.hb-item.pending { border-color: #FDBA74; background: #FFF7ED; }
.hb-item.done { border-color: #86EFAC; background: #F0FDF4; }
.hb-ic { font-size: 2.4rem; line-height: 1.1; }
.hb-name { font-weight: 900; color: #1E293B; font-size: 0.92rem; line-height: 1.25; min-height: 2.5em; display: flex; align-items: center; }
.hb-stars { font-size: 0.8rem; font-weight: 800; color: #B45309; }
.hb-streak { background: #FEE2E2; color: #B91C1C; border-radius: 999px; padding: 1px 8px; margin-left: 4px; }
.hb-btn { margin-top: auto; min-height: 44px; width: 100%; border: none; border-radius: 999px; background: linear-gradient(135deg, #38D39F, #16A34A); color: #fff; font-family: var(--font-display); font-weight: 900; cursor: pointer; box-shadow: 0 4px 0 rgba(0,0,0,0.12); }
.hb-btn.small { min-height: 38px; font-size: 0.8rem; background: linear-gradient(135deg, #3AA8F7, #1273C4); }
.hb-btn.gray { background: #E2E8F0; color: #334155; }
.hb-row { display: flex; gap: 6px; width: 100%; margin-top: auto; }
.hb-status { font-weight: 900; font-size: 0.82rem; margin-top: 4px; }
.hb-status.done { color: #16A34A; }
.hb-status.pending { color: #B45309; }
.hb-week th.today { background: #DBEAFE; }
.hb-cell { text-align: center; }
.hb-manage { margin-top: 12px; text-align: left; }
.hb-icons { display: flex; gap: 6px; flex-wrap: wrap; }
.hb-icon { width: 42px; height: 42px; border-radius: 12px; border: 2px solid #E2E8F0; background: #fff; font-size: 1.3rem; cursor: pointer; }
.hb-icon.active { border-color: #1273C4; background: #EEF6FF; }
.hb-manage-list { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.hb-manage-item { display: flex; align-items: center; gap: 6px; }
.hb-manage-item.hidden .hb-toggle { opacity: 0.5; text-decoration: line-through; }
.hb-toggle { flex: 1; text-align: left; border: 2px solid #E2E8F0; background: #fff; border-radius: 12px; padding: 8px 10px; font-weight: 800; color: #334155; cursor: pointer; min-height: 42px; }
.hb-toggle small { color: #B45309; }
.hb-pending { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }

@media (max-width: 480px) {
  .pet-card, .jn-card, .fm-card { flex-wrap: wrap; }
  .pet-go, .jn-go { width: 100%; }
  .tl-cards { grid-template-columns: 1fr 1fr; }
  .mu-keys { grid-template-columns: repeat(4, 1fr); }
  .duel-arena { min-height: calc(100vh - 120px); height: calc(100dvh - 120px); }
}

/* Chọn bài hát: tab mức + lưới thẻ to */
.mu-tabs { display: flex; gap: 8px; justify-content: center; margin: 6px 0 10px; }
.mu-tab { flex: 1; max-width: 140px; min-height: 44px; border: 3px solid #E2E8F0; border-radius: 999px; background: #fff; font-family: var(--font-display); font-weight: 900; color: #334155; cursor: pointer; }
.mu-tab.active { border-color: #9D65FF; background: #F5F3FF; color: #5B21B6; }
.mu-song-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mu-song-card { min-height: 104px; border: 3px solid #E2E8F0; border-radius: 18px; background: #fff; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 8px 4px; font-family: var(--font-body); }
.mu-song-card:active { transform: scale(0.97); }
.mu-song-card.done { border-color: #86EFAC; background: #F0FDF4; }
.mu-song-card.free { border-style: dashed; }
.mu-song-ic { font-size: 2rem; line-height: 1.1; }
.mu-song-nm { font-weight: 900; color: #1E293B; font-size: 0.82rem; line-height: 1.2; }
.mu-song-n { font-size: 0.7rem; font-weight: 800; color: #64748B; }
.mu-song-card.done .mu-song-n { color: #16A34A; }
.mu-now { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.mu-now-title { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; justify-content: center; text-align: left; }
.mu-now-ic { font-size: 2rem; }
.mu-now-nm { font-family: var(--font-display); font-weight: 900; color: #1E293B; font-size: 1.05rem; }
.mu-now-sub { font-size: 0.76rem; font-weight: 800; color: #64748B; }
.mu-nav { flex: none; width: 46px; height: 46px; border-radius: 50%; border: none; background: #F5F3FF; color: #5B21B6; font-size: 1.1rem; font-weight: 900; cursor: pointer; }
.mu-nav:disabled { opacity: 0.35; }
@media (max-width: 360px) { .mu-song-grid { grid-template-columns: repeat(2, 1fr); } }

/* Thanh báo có bản mới (PWA không vuốt tải lại được) */
#sk-update-bar { position: fixed; left: 10px; right: 10px; top: max(10px, env(safe-area-inset-top, 10px)); z-index: 12000; background: #1E293B; color: #fff; border-radius: 16px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 800; box-shadow: 0 10px 24px rgba(0,0,0,0.3); animation: fadeIn 0.3s; }
#sk-update-bar button { border: none; border-radius: 999px; background: #FFD13B; color: #1E293B; font-family: var(--font-display); font-weight: 900; padding: 10px 14px; min-height: 42px; cursor: pointer; white-space: nowrap; }
.mu-sound-hint { font-size: 0.8rem; font-weight: 700; color: #64748B; text-align: center; margin: -4px 0 8px; }


/* ===== css/games/fun.css ===== */
/* ============================================================
   v92: Toán Siêu Vui, Tiếng Anh Siêu Vui, Khu Hài Hước
   ============================================================ */

/* --- chung --- */
.fk-bubble { background: #fff; border: 3px solid #FDE68A; border-radius: 18px; padding: 10px 14px; font-weight: 800; color: #1E293B; line-height: 1.4; flex: 1; min-width: 0; text-align: left; }
.fk-tray-label { font-weight: 900; color: #334155; margin: 10px 0 4px; text-align: left; }
.fk-empty { color: #94A3B8; font-weight: 700; font-size: 0.85rem; }
.bump { animation: muBump 0.18s; }

/* --- Bếp quái vật --- */
.fk-monster { display: flex; align-items: center; gap: 10px; }
.fk-monster-ic { font-size: 3.4rem; line-height: 1; animation: petBob 2s infinite; flex: none; }
.fk-monster-ic.happy { animation: petJump 0.6s; }
.fk-monster-ic.sad { animation: shake 0.4s; filter: hue-rotate(40deg); }
.fk-order { color: #B45309; font-size: 1.15rem; }
.fk-tray { min-height: 64px; border: 3px dashed #CBD5E1; border-radius: 18px; background: #F8FAFC; padding: 8px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; justify-content: center; }
.fk-item { font-size: 1.8rem; cursor: pointer; line-height: 1; }
.fk-item.fixed { opacity: 0.55; cursor: default; }
.fk-menu { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 12px 0 4px; }
.fk-food { width: 72px; height: 72px; border-radius: 20px; border: 3px solid #E2E8F0; background: #fff; font-size: 2.2rem; cursor: pointer; box-shadow: 0 5px 0 rgba(0,0,0,0.1); }
.fk-food:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0,0,0,0.1); }

/* --- Tháp số --- */
.ft-hud { display: flex; gap: 8px; justify-content: center; margin-bottom: 8px; }
.ft-hud .pill { background: #1E293B; color: #fff; border-radius: 999px; padding: 4px 12px; font-weight: 900; }
.ft-tower { min-height: 150px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; background: linear-gradient(180deg, #E0F2FE, #fff); border-radius: 18px; padding: 10px; }
.ft-floor { width: 160px; background: linear-gradient(135deg, #FDBA74, #F97316); color: #fff; font-family: var(--font-display); font-weight: 900; text-align: center; padding: 6px; border: 2px solid #C2410C; border-radius: 6px; animation: ftRise 0.4s; }
.ft-ground { letter-spacing: 6px; }
@keyframes ftRise { from { transform: translateY(-40px); opacity: 0; } to { transform: none; opacity: 1; } }
.ft-tray { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 320px; margin: 0 auto; }
.ft-brick { min-height: 64px; border-radius: 12px; border: 3px solid #C2410C; background: linear-gradient(135deg, #FED7AA, #FDBA74); font-family: var(--font-display); font-size: 1.6rem; font-weight: 900; color: #7C2D12; cursor: pointer; }
.ft-brick.picked { border-color: #1273C4; background: #DBEAFE; color: #0A2463; transform: scale(1.06); }
.ft-brick.gone { visibility: hidden; }

/* --- Cửa hàng --- */
.fs-customer { display: flex; align-items: center; gap: 10px; }
.fs-cust-ic { font-size: 3rem; flex: none; }
.fs-goods { display: flex; gap: 10px; justify-content: center; margin: 8px 0; }
.fs-good { font-size: 2.4rem; display: flex; flex-direction: column; align-items: center; line-height: 1; }
.fs-good small { font-size: 0.8rem; font-weight: 900; color: #B45309; margin-top: 2px; }
.fs-chosen { min-height: 48px; border: 3px dashed #CBD5E1; border-radius: 14px; background: #F8FAFC; padding: 6px; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; }
.fs-bills { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 12px 0 4px; }
.fs-bill { min-width: 74px; min-height: 48px; border-radius: 10px; border: 3px solid rgba(0,0,0,0.15); font-family: var(--font-display); font-weight: 900; font-size: 1.1rem; cursor: pointer; color: #1E293B; }
.fs-bill.small { min-width: 56px; min-height: 38px; font-size: 0.9rem; }
.fs-bill.b1 { background: #FDE68A; } .fs-bill.b2 { background: #BBF7D0; } .fs-bill.b5 { background: #BFDBFE; } .fs-bill.b10 { background: #FBCFE8; } .fs-bill.b20 { background: #DDD6FE; } .fs-bill.b50 { background: #FED7AA; }

/* --- Đua xe --- */
.fr-track { position: relative; background: #334155; border-radius: 16px; padding: 10px 40px 10px 10px; margin: 8px 0 12px; }
.fr-lane { position: relative; height: 44px; border-bottom: 3px dashed #CBD5E1; }
.fr-lane:last-child { border-bottom: none; }
.fr-car { position: absolute; top: 2px; left: -30px; font-size: 2rem; transition: left 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
.fr-car.bot { filter: drop-shadow(0 0 4px #F87171); }
.fr-flag { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 1.8rem; }

/* --- Thám tử số --- */
.fd-clues { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.fd-clue { background: #FFFBEB; border: 2px solid #FDE68A; border-radius: 12px; padding: 8px 12px; font-weight: 800; color: #1E293B; text-align: left; }
.fd-clue span { color: #B45309; }
.fd-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.fd-grid.dense { grid-template-columns: repeat(10, 1fr); gap: 4px; }
.fd-num { min-height: 48px; border-radius: 10px; border: 2px solid #E2E8F0; background: #fff; font-weight: 900; color: #1E293B; cursor: pointer; font-size: 1rem; }
.fd-grid.dense .fd-num { min-height: 38px; font-size: 0.85rem; }
.fd-num.crossed { background: #F1F5F9; color: #CBD5E1; text-decoration: line-through; }
.fd-num.armed { border-color: #1273C4; background: #DBEAFE; color: #0A2463; text-decoration: none; }
.fd-num.wrong { border-color: #EF4444; background: #FEE2E2; }
.fd-num.found { border-color: #22C55E; background: #DCFCE7; color: #166534; transform: scale(1.1); }
.fd-tries { font-weight: 800; color: #64748B; margin-top: 6px; }

/* --- Lớp 1 --- */
.g1-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.g1-row { display: flex; align-items: center; gap: 10px; background: #F8FAFC; border: 2px solid #E2E8F0; border-radius: 16px; padding: 8px 10px; }
.g1-row.done { background: #F0FDF4; border-color: #86EFAC; }
.g1-ic { font-size: 1.6rem; flex: none; }
.g1-body { flex: 1; min-width: 0; text-align: left; }
.g1-name { font-weight: 900; color: #1E293B; }
.g1-sub { font-size: 0.78rem; font-weight: 700; color: #64748B; }

/* --- Tiếng Anh: ghép câu --- */
.es-hint { display: flex; align-items: center; gap: 8px; justify-content: center; font-weight: 800; color: #334155; margin-bottom: 8px; }
.es-ic { font-size: 2rem; }
.es-answer { min-height: 58px; border: 3px dashed #93C5FD; border-radius: 16px; background: #F0F9FF; padding: 8px; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; }
.es-pool { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 10px 0; }
.es-word { min-height: 46px; padding: 6px 14px; border-radius: 999px; border: 3px solid #E2E8F0; background: #fff; font-family: var(--font-display); font-weight: 900; font-size: 1.05rem; color: #1E293B; cursor: pointer; }
.es-word.used { opacity: 0.3; }
.es-word.placed { border-color: #3AA8F7; background: #fff; }
.es-word.bad { border-color: #EF4444; background: #FEE2E2; }

/* --- Robot chat --- */
.ec-robot { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 10px; }
.ec-robot-ic { font-size: 2.6rem; animation: petBob 2s infinite; }
.ec-bubble { position: relative; background: #EEF6FF; border: 2px solid #BFDBFE; border-radius: 16px; padding: 10px 44px 10px 12px; flex: 1; text-align: left; }
.ec-bubble .tl-speak { position: absolute; right: 6px; top: 8px; }
.ec-en { font-family: var(--font-display); font-weight: 900; font-size: 1.1rem; color: #0A2463; }
.ec-vi { font-size: 0.82rem; font-weight: 700; color: #64748B; }
.ec-opts { display: flex; flex-direction: column; gap: 8px; }
.ec-opt { min-height: 50px; border: 3px solid #E2E8F0; border-radius: 16px; background: #fff; font-family: var(--font-display); font-weight: 900; font-size: 1.02rem; color: #1E293B; cursor: pointer; padding: 8px 12px; text-align: left; }
.ec-opt.right { border-color: #22C55E; background: #DCFCE7; }
.ec-opt.wrong { border-color: #EF4444; background: #FEE2E2; opacity: 0.7; }
.ec-mic { text-align: center; margin-top: 8px; }
.btn-mic.small { width: 76px; height: 76px; font-size: 2rem; }

/* --- Phonics --- */
.ep-sky { position: relative; height: 220px; background: linear-gradient(180deg, #E0F2FE, #FEF9C3); border-radius: 18px; overflow: hidden; }
.ep-bubble { position: absolute; left: var(--x); bottom: 10px; width: 62px; height: 62px; border-radius: 50%; border: 3px solid #fff; background: radial-gradient(circle at 30% 30%, #fff, #93C5FD); font-family: var(--font-display); font-weight: 900; font-size: 1.4rem; color: #0A2463; cursor: pointer; animation: epFloat 3.2s ease-in-out infinite alternate; animation-delay: var(--d); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; box-shadow: 0 6px 14px rgba(0,0,0,0.15); }
.ep-bubble small { font-size: 0.8rem; font-weight: 800; color: #475569; }
.ep-bubble.pop { background: #BBF7D0; transform: scale(1.25); animation: none; }
.ep-bubble.miss { opacity: 0.4; }
@keyframes epFloat { from { transform: translateY(0); } to { transform: translateY(-120px); } }

/* --- Simon --- */
.esi-say { display: flex; align-items: center; gap: 8px; background: #FFF7ED; border: 2px solid #FDBA74; border-radius: 16px; padding: 8px 10px; text-align: left; margin-bottom: 6px; }
.esi-ic { font-size: 2rem; }
.esi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.esi-tile { min-height: 92px; border: 3px solid #E2E8F0; border-radius: 16px; background: #fff; font-weight: 900; font-size: 0.82rem; color: #1E293B; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px 4px; line-height: 1.15; }
.esi-tile span { font-size: 2rem; line-height: 1; }
.esi-tile small { font-weight: 700; color: #64748B; font-size: 0.72rem; }
.esi-tile.right { border-color: #22C55E; background: #DCFCE7; }
.esi-no { width: 100%; min-height: 56px; margin-top: 10px; border: 3px solid #FCA5A5; border-radius: 999px; background: #FEF2F2; color: #B91C1C; font-family: var(--font-display); font-weight: 900; font-size: 1.1rem; cursor: pointer; }

/* --- Truyện song ngữ --- */
.eb-lines { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.eb-line { background: #F8FAFC; border: 2px solid #E2E8F0; border-radius: 14px; padding: 8px 10px; }
.eb-line.lit { border-color: #3AA8F7; background: #EEF6FF; }
.eb-en { font-family: var(--font-display); font-weight: 900; font-size: 1.1rem; color: #0A2463; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.eb-word { cursor: pointer; padding: 2px 4px; border-radius: 6px; }
.eb-word.lit { background: #FDE68A; }
.eb-vi { font-size: 0.85rem; font-weight: 700; color: #64748B; margin-top: 2px; }

/* --- Karaoke --- */
.ek-lines { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.ek-line { padding: 8px 10px; border-radius: 12px; font-family: var(--font-display); font-weight: 900; color: #94A3B8; font-size: 1rem; }
.ek-line.done { color: #16A34A; }
.ek-line.now { background: #FEF3C7; color: #92400E; font-size: 1.25rem; transform: scale(1.02); }

/* --- Khu hài hước --- */
.fz-card { text-align: center; }
.fz-silly { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.fz-part { border: 3px solid #E2E8F0; border-radius: 16px; padding: 8px; font-weight: 800; color: #1E293B; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.fz-part small { font-size: 0.72rem; color: #64748B; font-weight: 900; text-transform: uppercase; }
.fz-part-ic { font-size: 2.2rem; line-height: 1; }
.fz-part-nav { display: flex; gap: 6px; margin-top: 4px; }
.fz-part-nav button { width: 38px; height: 34px; border-radius: 999px; border: none; background: #F1F5F9; font-weight: 900; cursor: pointer; }
.fz-part.p0 { border-color: #FCA5A5; } .fz-part.p1 { border-color: #93C5FD; } .fz-part.p2 { border-color: #86EFAC; } .fz-part.p3 { border-color: #C4B5FD; }
.fz-sentence { font-family: var(--font-display); font-size: 1.3rem; font-weight: 900; color: #1E293B; margin: 12px 0 4px; line-height: 1.4; }
.c0 { color: #DC2626; } .c1 { color: #1D4ED8; } .c2 { color: #15803D; } .c3 { color: #7C3AED; }
.fz-rate { display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 10px; font-weight: 800; color: #334155; }
.fz-rate-btn { min-height: 44px; padding: 6px 16px; border-radius: 999px; border: none; background: linear-gradient(135deg, #FDE68A, #F59E0B); font-family: var(--font-display); font-weight: 900; cursor: pointer; }
.fz-rate-btn.gray { background: #E2E8F0; }
.fz-top { margin-top: 12px; text-align: left; background: #FFFBEB; border-radius: 14px; padding: 10px 12px; }
.fz-top-title { font-weight: 900; color: #B45309; margin-bottom: 4px; }
.fz-top-item { font-size: 0.88rem; font-weight: 700; color: #1E293B; padding: 3px 0; border-bottom: 1px dashed #FDE68A; }
.ftf-timer { height: 10px; background: #E2E8F0; border-radius: 999px; overflow: hidden; margin: 6px 0; }
.ftf-timer span { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #22C55E, #F59E0B, #EF4444); transition: width 0.1s linear; }
.ftf-mascot { font-size: 3rem; line-height: 1; }
.ftf-mascot.dance { animation: ftfDance 0.5s infinite alternate; }
@keyframes ftfDance { from { transform: rotate(-12deg) translateY(0); } to { transform: rotate(12deg) translateY(-8px); } }
.ftf-q { font-family: var(--font-display); font-size: 1.35rem; font-weight: 900; color: #1E293B; margin: 8px 0 12px; }
.ftf-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ftf-btn { min-height: 76px; border-radius: 20px; border: none; font-family: var(--font-display); font-size: 1.4rem; font-weight: 900; color: #fff; cursor: pointer; box-shadow: 0 6px 0 rgba(0,0,0,0.15); }
.ftf-btn.yes { background: linear-gradient(135deg, #38D39F, #16A34A); }
.ftf-btn.no { background: linear-gradient(135deg, #FB7185, #DC2626); }
.ftf-btn.right { box-shadow: 0 0 0 5px #FDE68A; }
.ftf-btn:disabled { opacity: 0.75; }
.fz-stage { height: 230px; border-radius: 20px; background: linear-gradient(180deg, #FEF3C7, #FFEDD5); display: flex; align-items: center; justify-content: center; margin: 8px 0; overflow: hidden; }
.fz-stage.small { height: 140px; }
.fz-mascot { position: relative; width: 170px; height: 170px; display: flex; align-items: center; justify-content: center; }
.fz-stage.small .fz-mascot { transform: scale(0.7); }
.fz-body { font-size: 6rem; line-height: 1; }
.fz-wear { position: absolute; font-size: 2.2rem; line-height: 1; pointer-events: none; }
.fz-wear.hat { top: -6px; left: 50%; transform: translateX(-50%) rotate(-8deg); }
.fz-wear.eyes { top: 52px; left: 50%; transform: translateX(-50%); font-size: 2rem; }
.fz-wear.mouth { top: 92px; left: 50%; transform: translateX(-50%); font-size: 1.8rem; }
.fz-wear.hand { right: -14px; top: 80px; }
.fz-wear.feet { bottom: -4px; left: 50%; transform: translateX(-50%); }
.fz-wear.bg { position: absolute; inset: -20px; font-size: 7rem; opacity: 0.35; display: flex; align-items: center; justify-content: center; }
.fz-album { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.fz-album-item { background: #FFF7ED; border-radius: 14px; padding: 4px; overflow: hidden; }
.fz-album-item .fz-mascot { transform: scale(0.55); width: 100px; height: 100px; margin: 0 auto; }
.fz-album-item small { display: block; font-weight: 700; color: #64748B; font-size: 0.72rem; }
.fz-sound-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.fz-sound-grid.four { grid-template-columns: repeat(2, 1fr); }
.fz-sound { min-height: 90px; border: 3px solid #E2E8F0; border-radius: 16px; background: #fff; font-weight: 900; color: #1E293B; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 0.85rem; }
.fz-sound span { font-size: 2rem; line-height: 1; }
.fz-sound small { font-weight: 700; color: #64748B; }
.fz-sound.right { border-color: #22C55E; background: #DCFCE7; }
.fz-sound.wrong { border-color: #EF4444; background: #FEE2E2; }
.fz-bigplay { width: 110px; height: 110px; border-radius: 50%; border: 5px solid #fff; background: linear-gradient(135deg, #3AA8F7, #1273C4); color: #fff; font-size: 3rem; cursor: pointer; box-shadow: 0 10px 24px rgba(18,115,196,0.35); margin: 6px auto; display: block; }
.fp-score { display: flex; justify-content: space-around; font-weight: 900; color: #334155; background: #F8FAFC; border-radius: 14px; padding: 8px; margin-bottom: 8px; }
.fp-score b { color: #B45309; font-size: 1.2rem; }
.fp-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fp-card { min-height: 90px; border: 3px dashed #C4B5FD; border-radius: 16px; background: #F5F3FF; font-family: var(--font-display); font-weight: 900; color: #5B21B6; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.fp-card small { font-weight: 700; color: #7C3AED; font-size: 0.72rem; }
.fp-wheel { font-size: 4rem; line-height: 1; margin: 10px 0; animation: ftfDance 0.3s infinite alternate; }

/* --- Rạp xiếc: hiệu ứng ngố khi sai --- */
.circus-gag { position: fixed; left: 50%; top: 18%; transform: translateX(-50%); z-index: 11000; pointer-events: none; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.circus-ic { font-size: 3.6rem; line-height: 1; filter: drop-shadow(0 8px 10px rgba(0,0,0,0.25)); }
.circus-text { background: #1E293B; color: #fff; border-radius: 999px; padding: 6px 14px; font-weight: 900; font-size: 0.9rem; white-space: nowrap; }
.circus-gag.slip .circus-ic { animation: cgSlip 1.6s ease-out forwards; }
.circus-gag.pop .circus-ic { animation: cgPop 1.6s ease-out forwards; }
.circus-gag.splat .circus-ic { animation: cgSplat 1.6s ease-out forwards; }
.circus-gag.run .circus-ic { animation: cgRun 1.6s linear forwards; }
.circus-gag.drop .circus-ic { animation: cgDrop 1.6s ease-in forwards; }
.circus-gag.shake .circus-ic { animation: shake 0.3s 4; }
.circus-gag.spin .circus-ic { animation: cgSpin 1.6s ease-out forwards; }
.circus-gag .circus-text { animation: cgText 1.7s ease-out forwards; }
@keyframes cgSlip { 0% { transform: translateX(-80px) rotate(0); } 60% { transform: translateX(20px) rotate(70deg); } 100% { transform: translateX(30px) rotate(90deg) translateY(10px); opacity: 0.9; } }
@keyframes cgPop { 0% { transform: scale(0.4); } 50% { transform: scale(1.4); } 60% { transform: scale(1.1); } 100% { transform: scale(1.2); opacity: 0; } }
@keyframes cgSplat { 0% { transform: translateY(-60px) scale(0.6); } 50% { transform: translateY(0) scale(1.3); } 100% { transform: translateY(4px) scale(1.25); } }
@keyframes cgRun { 0% { transform: translateX(-160px); } 100% { transform: translateX(160px); } }
@keyframes cgDrop { 0% { transform: translateY(-80px); } 60% { transform: translateY(0); } 70% { transform: translateY(-10px); } 100% { transform: translateY(0); } }
@keyframes cgSpin { 0% { transform: rotate(0) scale(0.8); } 100% { transform: rotate(1080deg) scale(1.1); } }
@keyframes cgText { 0% { opacity: 0; transform: translateY(10px); } 15% { opacity: 1; transform: none; } 85% { opacity: 1; } 100% { opacity: 0; } }

@media (max-width: 480px) {
  .fd-grid.dense { grid-template-columns: repeat(5, 1fr); }
  .esi-grid { grid-template-columns: repeat(2, 1fr); }
  .fp-cards { grid-template-columns: 1fr; }
}


/* ===== css/games/world.css ===== */
/* Sam Kido - Phòng Khám Phá Thế Giới (v120): hình to, chữ nhỏ, hợp bé chưa biết chữ */
.wd-card { max-width: 760px; margin: 0 auto; text-align: center; }
.wd-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.wd-progress { font-weight: 800; color: #475569; font-size: 0.95rem; }
.wd-bar { height: 8px; border-radius: 99px; background: #E2E8F0; overflow: hidden; margin: 10px 0 4px; }
.wd-bar span { display: block; height: 100%; background: linear-gradient(90deg, #22C55E, #0EA5E9); border-radius: 99px; transition: width .3s; }
.wd-visual { font-size: 4.6rem; line-height: 1.15; margin: 14px 0 6px; }
.wd-prompt { font-size: 1.3rem; font-weight: 800; color: #1E293B; margin: 6px 0 14px; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.wd-say { border: 0; background: #E0F2FE; width: 44px; height: 44px; border-radius: 50%; font-size: 1.2rem; cursor: pointer; flex: none; }
.wd-say:hover { background: #BAE6FD; }
.wd-opts { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.wd-opts.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wd-opt { border: 3px solid #E2E8F0; background: #fff; border-radius: 20px; padding: 14px 10px; cursor: pointer; font: inherit; color: #1E293B; display: flex; flex-direction: column; align-items: center; gap: 6px; transition: transform .12s, border-color .12s, background .12s; min-height: 64px; justify-content: center; }
.wd-opt:hover { border-color: #93C5FD; transform: translateY(-2px); }
.wd-opt .wd-ic { font-size: 3rem; line-height: 1.1; }
.wd-opt .wd-lb { font-weight: 800; font-size: 1rem; line-height: 1.25; }
.wd-opts.words .wd-lb { font-size: 1.08rem; }
.wd-opt.ok { border-color: #22C55E; background: #F0FDF4; }
.wd-opt.no { border-color: #F87171; background: #FEF2F2; opacity: .7; }
.wd-opt.reveal { animation: wdPulse .8s ease-in-out 2; }
@keyframes wdPulse { 50% { transform: scale(1.05); } }
.wd-next-wrap { margin-top: 14px; display: flex; justify-content: center; }
.wd-next { min-width: 200px; }
.wd-score { font-size: 1.15rem; font-weight: 700; }
@media (max-width: 520px) {
  .wd-visual { font-size: 3.8rem; }
  .wd-prompt { font-size: 1.12rem; }
  .wd-opts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .wd-opts.words { grid-template-columns: 1fr; }
  .wd-opts.pics.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wd-opts.pics.n3 .wd-lb { font-size: 0.9rem; }
  .wd-opt .wd-ic { font-size: 2.5rem; }
}


/* ===== css/games/video.css ===== */
/* Sam Kido - Video Học Vui (v121): sân khấu 1280×720 co giãn theo khung; mọi chuyển động là CSS animation (tua được khi quay MP4) */
.vl-intro { text-align: center; font-weight: 700; color: #475569; margin: 4px 0 14px; }
.vl-list { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); max-width: 1000px; margin: 0 auto; }
.vl-card { border: 3px solid var(--vc); background: #fff; border-radius: 20px; padding: 10px; cursor: pointer; font: inherit; color: #1E293B; display: flex; flex-direction: column; gap: 6px; text-align: left; transition: transform .12s; }
.vl-card:hover { transform: translateY(-3px); }
.vl-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; background: var(--vb); display: flex; align-items: center; justify-content: center; }
.vl-thumb .vl-ic { font-size: 3.4rem; }
.vl-play { position: absolute; right: 10px; bottom: 10px; width: 38px; height: 38px; border-radius: 50%; background: var(--vc); color: #fff; font-style: normal; display: flex; align-items: center; justify-content: center; font-size: 1rem; }
.vl-card b { font-size: 1.05rem; }
.vl-card small { color: #64748B; font-weight: 700; }

.vl-player { max-width: 960px; margin: 0 auto; }
.vl-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 18px; box-shadow: 0 8px 30px rgba(15, 23, 42, .18); background: #000; }
.vl-frame .vl-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.vl-bigplay { position: absolute; inset: 0; margin: auto; width: 90px; height: 90px; border-radius: 50%; border: 0; background: rgba(15, 23, 42, .6); color: #fff; font-size: 2.2rem; cursor: pointer; z-index: 5; }
.vl-ctrl { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.vl-ctrl button { min-width: 54px; }

/* ===== sân khấu ===== */
.vl-stage { width: 1280px; height: 720px; position: relative; overflow: hidden; background: radial-gradient(circle at 50% 40%, #fff 0%, var(--vb) 70%); color: #1E293B; font-family: var(--font-display, 'Quicksand'), 'Nunito', sans-serif; }
.vl-stage.dark { background: radial-gradient(circle at 30% 50%, #1E1B4B 0%, #020617 80%); color: #F8FAFC; }
.vl-stage.paused, .vl-stage.paused * { animation-play-state: paused !important; }
.vl-deco { position: absolute; inset: 0; pointer-events: none; }
.vl-bub { position: absolute; border-radius: 50%; background: var(--vc); opacity: .09; animation: vlFloat 6s ease-in-out infinite; }
.vl-bub.b0 { width: 220px; height: 220px; left: -60px; top: 80px; } .vl-bub.b1 { width: 140px; height: 140px; right: 40px; top: 110px; }
.vl-bub.b2 { width: 90px; height: 90px; left: 22%; bottom: 120px; } .vl-bub.b3 { width: 260px; height: 260px; right: -80px; bottom: 60px; }
.vl-bub.b4 { width: 60px; height: 60px; left: 55%; top: 90px; } .vl-bub.b5 { width: 120px; height: 120px; left: 8%; bottom: -30px; } .vl-bub.b6 { width: 44px; height: 44px; right: 26%; bottom: 140px; }
.vl-star { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #fff; animation: vlTwinkle 2.8s ease-in-out infinite; }
.vl-chip { position: absolute; left: 24px; top: 20px; background: var(--vc); color: #fff; font-weight: 800; font-size: 22px; padding: 8px 18px; border-radius: 99px; z-index: 2; }
.vl-logo { position: absolute; right: 24px; top: 20px; font-weight: 900; font-size: 22px; color: var(--vc); background: rgba(255, 255, 255, .9); padding: 8px 16px; border-radius: 99px; z-index: 2; }
.vl-stage.dark .vl-logo { background: rgba(255, 255, 255, .12); color: #E0E7FF; }
.vl-scene { position: absolute; left: 0; right: 0; top: 70px; bottom: 96px; display: flex; align-items: center; justify-content: center; }
.vl-in { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.vl-cap { position: absolute; left: 60px; right: 60px; bottom: 26px; min-height: 56px; display: flex; align-items: center; justify-content: center; text-align: center; font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 25px; line-height: 1.3; color: #fff; background: rgba(15, 23, 42, .72); border-radius: 16px; padding: 8px 20px; }
.vl-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: rgba(148, 163, 184, .35); }
.vl-prog span { display: block; height: 100%; width: 0; background: var(--vc); }
.vl-ic { display: inline-block; line-height: 1; }

/* chuyển động */
.pop { animation: vlPop .5s cubic-bezier(.34, 1.56, .64, 1) both; }
.rise { animation: vlRise .55s ease-out both; }
.bounce { animation: vlPop .6s cubic-bezier(.34, 1.56, .64, 1) both, vlBounce 1.6s ease-in-out .6s infinite; }
.float { animation: vlFloat 2.4s ease-in-out infinite; }
@keyframes vlPop { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes vlRise { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes vlBounce { 50% { transform: translateY(-18px); } }
@keyframes vlFloat { 50% { transform: translateY(-10px) rotate(-4deg); } }
@keyframes vlDrift { to { transform: translateX(60px); } }
@keyframes vlTwinkle { 50% { opacity: .2; transform: scale(.6); } }
@keyframes vlFall { from { transform: translateY(-40px) rotate(0); } to { transform: translateY(760px) rotate(540deg); } }
@keyframes vlGlow { 50% { box-shadow: 0 0 0 14px rgba(250, 204, 21, .35), 0 0 60px var(--pc); } }
@keyframes vlBeat { 0% { transform: scale(2.2); opacity: 0; } 25% { transform: scale(1); opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; } }

/* tiêu đề / kết */
.vl-title { text-align: center; position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.vl-big { font-size: 170px; line-height: 1.05; }
.vl-title h1 { font-size: 72px; margin: 10px 0 6px; color: var(--vc); font-weight: 900; }
.vl-stage.dark .vl-title h1 { color: #FDE68A; }
.vl-title p { font-size: 34px; margin: 0; font-weight: 700; opacity: .85; }
.vl-conf { position: absolute; top: 0; width: 14px; height: 22px; border-radius: 3px; animation: vlFall 3.2s linear infinite; }

/* đếm */
.vl-count { display: grid; grid-template-columns: 300px 1fr; grid-template-rows: 1fr auto; align-items: center; width: 1120px; height: 100%; column-gap: 30px; }
.vl-num { grid-row: 1 / 3; font-size: 300px; font-weight: 900; color: var(--vc); text-align: center; line-height: 1; text-shadow: 0 10px 0 rgba(0, 0, 0, .08); }
.vl-icons { display: flex; flex-wrap: wrap; justify-content: center; align-content: center; gap: 14px 22px; font-size: 120px; }
.vl-icons.n7, .vl-icons.n8, .vl-icons.n9, .vl-icons.n10 { font-size: 92px; gap: 10px 18px; }
.vl-label { text-align: center; font-size: 52px; font-weight: 900; }

/* chữ cái */
.vl-letter { display: flex; align-items: center; justify-content: center; gap: 80px; }
.vl-lcard { width: 400px; height: 400px; border-radius: 40px; background: #fff; border: 10px solid var(--vc); display: flex; align-items: center; justify-content: center; gap: 24px; box-shadow: 0 16px 0 rgba(0, 0, 0, .08); }
.vl-lcard b { font-size: 230px; color: var(--vc); line-height: 1; font-family: 'Nunito', sans-serif; }
.vl-lcard small { font-size: 150px; color: #334155; font-weight: 800; font-family: 'Nunito', sans-serif; }
.vl-lword { display: flex; flex-direction: column; align-items: center; gap: 14px; font-size: 58px; font-weight: 900; }
.vl-lword .vl-ic { font-size: 190px; }

/* phép cộng */
.vl-eq { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.vl-eq-row { display: flex; align-items: center; gap: 26px; }
.vl-grp { display: flex; flex-wrap: wrap; gap: 6px 10px; max-width: 520px; justify-content: center; font-size: 74px; background: rgba(255, 255, 255, .75); border-radius: 26px; padding: 12px 20px; min-height: 100px; }
.vl-grp .add { filter: drop-shadow(0 0 10px rgba(37, 99, 235, .55)); }
.vl-grp.res { max-width: 900px; font-size: 66px; }
.vl-eq.many .vl-grp { font-size: 58px; max-width: 560px; flex-wrap: nowrap; }
.vl-eq.many .vl-grp.res { flex-wrap: nowrap; max-width: none; font-size: 56px; }
.vl-eq:not(.many) .vl-grp { flex-wrap: nowrap; }
.vl-op { font-size: 96px; color: var(--vc); font-weight: 900; }
.vl-eq-txt { font-size: 92px; font-weight: 900; color: var(--vc); font-family: 'Nunito', sans-serif; background: #fff; border-radius: 26px; padding: 0 40px; }

/* nhóm */
.vl-group { display: flex; flex-direction: column; align-items: center; gap: 30px; }
.vl-ghead { font-size: 58px; font-weight: 900; background: var(--vc); color: #fff; padding: 8px 40px; border-radius: 99px; }
.vl-gitems { display: flex; gap: 28px; }
.vl-gitem { width: 250px; height: 290px; background: #fff; border-radius: 30px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; box-shadow: 0 12px 0 rgba(0, 0, 0, .07); }
.vl-gitem .vl-ic { font-size: 150px; }
.vl-gitem b { font-size: 34px; }

/* sự thật */
.vl-fact { text-align: center; }
.vl-fact .vl-big.nums { font-size: 96px; font-weight: 900; color: var(--vc); font-family: 'Nunito', sans-serif; word-spacing: 14px; }
.vl-fact p { font-size: 56px; font-weight: 900; margin: 20px auto 0; max-width: 1160px; }
.vl-stage.dark .vl-fact p { color: #FDE68A; }

/* hệ mặt trời */
.vl-planets { position: relative; width: 100%; height: 100%; }
.vl-sun { position: absolute; left: -330px; top: 50%; width: 520px; height: 520px; margin-top: -290px; border-radius: 50%; background: radial-gradient(circle, #FEF08A 0%, #FACC15 45%, #F97316 100%); box-shadow: 0 0 80px #F59E0B; animation: vlPop .6s both; }
.vl-orbit { position: absolute; left: 215px; right: 20px; top: 0; bottom: 60px; display: flex; align-items: center; justify-content: space-between; }
.vl-pl { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 120px; animation: vlPop .5s cubic-bezier(.34, 1.56, .64, 1) both; }
.vl-ball { width: var(--ps); height: var(--ps); border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff8 0%, var(--pc) 45%, #0008 120%); position: relative; }
.vl-ball.ring::after { content: ''; position: absolute; left: -32%; top: 38%; width: 164%; height: 24%; border-radius: 50%; border: 6px solid #FDE68A; transform: rotate(-16deg); }
.vl-pl small { font-size: 21px; font-weight: 800; color: #E2E8F0; text-align: center; line-height: 1.15; min-height: 50px; }
.vl-planets.has-hi .vl-pl:not(.hi) > * { opacity: .3; }
.vl-pl.hi .vl-ball { animation: vlGlow 1.4s ease-in-out infinite; }
.vl-pl.hi small { color: #FDE68A; font-size: 25px; }
.vl-pl-txt { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; font-size: 48px; font-weight: 900; color: #FDE68A; margin: 0; }

/* câu đố */
.vl-quiz { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.vl-qbadge { font-size: 34px; font-weight: 900; background: #FACC15; color: #713F12; padding: 6px 28px; border-radius: 99px; }
.vl-qshow { display: flex; gap: 12px; font-size: 90px; align-items: center; }
.vl-quiz h2 { font-size: 60px; margin: 0; font-weight: 900; }
.vl-qopts { display: flex; gap: 26px; }
.vl-qopt { min-width: 220px; padding: 18px 30px; font: inherit; font-size: 46px; font-weight: 900; border-radius: 26px; border: 6px solid #CBD5E1; background: #fff; color: #1E293B; cursor: pointer; }
.vl-qopts.big .vl-qopt { font-size: 90px; min-width: 200px; font-family: 'Nunito', sans-serif; }
.vl-qopt.ok { border-color: #22C55E; background: #DCFCE7; animation: vlPop .5s cubic-bezier(.34, 1.56, .64, 1) both, vlBounce 1s ease-in-out .5s 2; }
.vl-qopt.dim { opacity: .35; }
.vl-qopt.no { border-color: #F87171; background: #FEE2E2; opacity: .6; }
.vl-qopt.hint { animation: vlBounce .8s ease-in-out 3; border-color: #FACC15; }
/* v129: đếm ngược ở góc trên bên phải vùng cảnh (trước đây đặt cạnh khung câu đố nên câu đố rộng bị đẩy ra ngoài) */
.vl-quiz { position: static; }
.vl-count3 { position: absolute; right: 40px; top: 6px; width: 140px; height: 140px; }
.vl-count3 b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #FACC15; color: #713F12; font-size: 90px; font-weight: 900; opacity: 0; animation: vlBeat 1.2s ease-out both; }

/* chế độ quay phim: sân khấu phủ kín cửa sổ 1280×720 */
html.vl-rendering, html.vl-rendering body { overflow: hidden !important; }
#vl-render { position: fixed; left: 0; top: 0; width: 1280px; height: 720px; z-index: 2147483000; }

@media (max-width: 520px) {
  .vl-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .vl-card b { font-size: .95rem; }
  .vl-frame { border-radius: 12px; }
  .vl-ctrl button { min-width: 0; padding-left: 12px; padding-right: 12px; }
}

/* ===== Đợt 1 (v125): kiểu cảnh mới ===== */
.vl-ic.gone { animation: vlPop .5s cubic-bezier(.34, 1.56, .64, 1) both, vlGone .6s ease-in var(--gd) forwards; }
@keyframes vlGone { to { opacity: .18; filter: grayscale(1); transform: scale(.8) rotate(-12deg); } }
.grow { animation: vlGrow 1.2s ease-out both; transform-origin: left center; }
@keyframes vlGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.draw { stroke-dasharray: 260; animation: vlDraw .8s ease-out both; }
@keyframes vlDraw { from { stroke-dashoffset: 260; } to { stroke-dashoffset: 0; } }
@keyframes vlTurn { from { transform: rotate(0deg); } to { transform: rotate(var(--to)); } }
.vl-svg { width: 100%; height: 100%; overflow: visible; }

/* so sánh */
.vl-cmp { display: grid; grid-template-columns: 1fr 160px 1fr; align-items: center; width: 1180px; row-gap: 20px; }
.vl-cmp-side { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.vl-cmp-side .vl-grp { font-size: 54px; min-height: 100px; max-width: 480px; flex-wrap: wrap; gap: 6px 8px; }
.vl-cmp-side > b { font-size: 90px; font-weight: 900; color: var(--vc); font-family: 'Nunito', sans-serif; }
.vl-cmp-sign { font-size: 150px; font-weight: 900; color: #fff; background: var(--vc); border-radius: 30px; text-align: center; line-height: 160px; font-family: 'Nunito', sans-serif; }
.vl-cmp-txt { grid-column: 1 / 4; text-align: center; font-size: 54px; font-weight: 900; }

/* tách gộp */
.vl-bond { position: relative; width: 600px; height: 460px; }
.vl-bond-lines { position: absolute; left: 0; top: 0; width: 600px; height: 260px; }
.vl-bond-lines line { stroke: #94A3B8; stroke-width: 8; stroke-linecap: round; }
.vl-bond-top, .vl-bond-a, .vl-bond-b { position: absolute; width: 130px; height: 130px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 74px; font-weight: 900; font-family: 'Nunito', sans-serif; border: 8px solid var(--vc); background: #fff; color: var(--vc); }
.vl-bond-top { left: 235px; top: 0; background: var(--vc); color: #fff; }
.vl-bond-a { left: 75px; top: 150px; } .vl-bond-b { left: 395px; top: 150px; border-color: #F97316; color: #F97316; }
.vl-bond-ic { position: absolute; left: -200px; right: -200px; top: 320px; display: flex; justify-content: center; gap: 40px; }
.vl-bond-ic .vl-grp { font-size: 58px; flex-wrap: nowrap; }
.vl-bond-ic .vl-grp.alt { box-shadow: inset 0 0 0 5px #F97316; }

/* hình */
.vl-shape { display: flex; align-items: center; gap: 70px; }
.vl-shape-big { width: 360px; height: 360px; }
.vl-shape-side h2 { font-size: 76px; font-weight: 900; color: var(--vc); margin: 0 0 20px; }
.vl-shape-ex { display: flex; gap: 26px; }
.vl-shape-ex span { display: flex; flex-direction: column; align-items: center; gap: 8px; background: #fff; border-radius: 24px; padding: 14px 18px; }
.vl-shape-ex .vl-ic { font-size: 90px; font-style: normal; }
.vl-shape-ex small { font-size: 26px; font-weight: 800; }
.vl-shapes { display: flex; gap: 34px; flex-wrap: wrap; justify-content: center; max-width: 1180px; }
.vl-shapes-it { width: 290px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.vl-shapes-it .vl-svg { width: 200px; height: 200px; }
.vl-shapes-it b { font-size: 34px; font-weight: 900; text-align: center; line-height: 1.2; }
.vl-qshow.shape { width: 190px; height: 190px; }
.vl-qshow.text { font-size: 110px; font-weight: 900; color: var(--vc); font-family: 'Nunito', sans-serif; line-height: 1.1; }

/* tia số */
.vl-nl { width: 1200px; }
.vl-nl-row { display: flex; justify-content: space-between; position: relative; padding-top: 30px; }
.vl-nl-row::before { content: ""; position: absolute; left: 0; right: -20px; top: 46px; height: 8px; background: #475569; border-radius: 4px; }
.vl-nl-n { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 60px; animation: vlPop .4s both; }
.vl-nl-n i { width: 6px; height: 40px; background: #475569; border-radius: 3px; }
.vl-nl-n b { font-size: 46px; font-weight: 900; font-family: 'Nunito', sans-serif; width: 82px; height: 82px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.vl-nl-n.hi b { background: var(--vc); color: #fff; font-size: 54px; }
.vl-nl-n.nb b { background: #FEF3C7; border: 5px solid #F59E0B; }
.vl-nl-n small { font-size: 24px; font-weight: 900; color: #B45309; white-space: nowrap; }
.vl-nl-txt { text-align: center; font-size: 50px; font-weight: 900; margin: 40px 0 0; }

/* chục - đơn vị */
.vl-tens { display: flex; flex-direction: column; align-items: center; gap: 30px; }
.vl-tens-art { display: flex; align-items: flex-end; gap: 22px; min-height: 230px; }
.vl-bundle { display: flex; gap: 4px; padding: 6px; border: 6px solid #DC2626; border-radius: 14px; background: #fff; }
.vl-bundle i, .vl-stick { display: block; width: 12px; height: 200px; border-radius: 6px; background: linear-gradient(#FBBF24, #D97706); }
.vl-tens-tab { display: flex; border: 6px solid #334155; border-radius: 20px; overflow: hidden; background: #fff; }
.vl-tens-tab span { display: flex; flex-direction: column; align-items: center; min-width: 200px; padding: 8px 20px; border-right: 4px solid #CBD5E1; }
.vl-tens-tab span:last-child { border-right: 0; }
.vl-tens-tab small { font-size: 28px; font-weight: 800; color: #64748B; }
.vl-tens-tab b { font-size: 76px; font-weight: 900; font-family: 'Nunito', sans-serif; }
.vl-tens-tab .n b { color: var(--vc); }

/* đồng hồ */
.vl-clock { display: flex; align-items: center; gap: 80px; }
.vl-clock > .vl-clk { width: 420px; height: 420px; }
.vl-clk text { font: 900 24px 'Nunito', sans-serif; fill: #1E293B; }
.vl-clk .hand { stroke-linecap: round; transform-box: view-box; transform-origin: 100px 100px; transform: rotate(var(--to)); }
.vl-clk .hand.turn { animation: vlTurn 1.6s ease-in-out .3s both; }
.vl-clk .hand.h { stroke: #DC2626; stroke-width: 10; } .vl-clk .hand.m { stroke: #1E293B; stroke-width: 6; }
.vl-clock-side > b { font-size: 130px; font-weight: 900; color: var(--vc); font-family: 'Nunito', sans-serif; display: block; }
.vl-clock-side p { font-size: 46px; font-weight: 900; margin: 10px 0 0; max-width: 560px; }
.vl-qshow.clock { width: 230px; height: 230px; }

/* tuần lễ */
.vl-week { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; max-width: 1180px; }
.vl-day { width: 150px; height: 150px; border-radius: 26px; background: #fff; border: 5px solid #CBD5E1; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 32px; font-weight: 900; line-height: 1.15; padding: 6px; }
.vl-day.hi { background: var(--vc); color: #fff; border-color: var(--vc); }
.vl-week p { width: 100%; text-align: center; font-size: 50px; font-weight: 900; margin: 26px 0 0; }

/* các bước */
.vl-steps { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.vl-steps-row { display: flex; gap: 20px; justify-content: center; }
.vl-step { position: relative; width: 210px; min-height: 260px; background: #fff; border-radius: 26px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px 10px; box-shadow: 0 10px 0 rgba(0, 0, 0, .07); text-align: center; }
.vl-step em { position: absolute; top: -18px; left: -12px; width: 52px; height: 52px; border-radius: 50%; background: var(--vc); color: #fff; font-style: normal; font-weight: 900; font-size: 30px; display: flex; align-items: center; justify-content: center; }
.vl-step .vl-ic { font-size: 100px; }
.vl-step b { font-size: 27px; line-height: 1.2; }

/* màu sắc */
.vl-colors { display: flex; gap: 30px; flex-wrap: wrap; justify-content: center; max-width: 1180px; }
.vl-color { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 220px; }
.vl-dot { width: 200px; height: 200px; border-radius: 50%; border: 8px solid #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .15); display: flex; align-items: center; justify-content: center; }
.vl-dot .vl-ic { font-size: 100px; font-style: normal; }
.vl-color b { font-size: 40px; font-weight: 900; }

/* thẻ chữ (dấu thanh, vần...) */
.vl-tiles { display: flex; flex-direction: column; align-items: center; gap: 30px; }
.vl-tiles-row { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; max-width: 1200px; }
.vl-tile { min-width: 170px; padding: 16px 22px; background: #fff; border: 6px solid #CBD5E1; border-radius: 28px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.vl-tile b { font-size: 96px; font-weight: 900; font-family: 'Nunito', sans-serif; line-height: 1.1; color: #1E293B; }
.vl-tile small { font-size: 28px; font-weight: 800; color: #64748B; }
.vl-tile.hi { border-color: var(--vc); background: var(--vb); } .vl-tile.hi b { color: var(--vc); }
.vl-tiles-txt { font-size: 48px; font-weight: 900; margin: 0; text-align: center; }

/* vị trí */
.vl-pos { display: flex; flex-direction: column; align-items: center; gap: 30px; }
.vl-pos-box { display: flex; gap: 40px; align-items: center; font-size: 170px; }
.vl-pos-box.col { flex-direction: column; gap: 0; } .vl-pos-box.col.rev { flex-direction: column-reverse; } .vl-pos-box.row.rev { flex-direction: row-reverse; }
.vl-pos p { font-size: 54px; font-weight: 900; margin: 0; }

/* thước đo */
.vl-ruler { display: flex; flex-direction: column; align-items: flex-start; }
.vl-ruler-obj { position: relative; height: 150px; display: flex; align-items: flex-end; }
.vl-ruler-obj .vl-ic { font-size: 110px; position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%); }
.vl-ruler-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 22px; background: var(--vc); border-radius: 8px; }
.vl-ruler-scale { position: relative; height: 90px; width: 100%; min-width: 300px; background: #FDE68A; border: 4px solid #B45309; border-radius: 8px; margin-top: 6px; }
.vl-ruler-scale span { position: absolute; top: 0; width: 4px; height: 36px; background: #78350F; }
.vl-ruler-scale b { position: absolute; top: 40px; left: -12px; font-size: 32px; font-family: 'Nunito', sans-serif; }
.vl-ruler p { align-self: center; font-size: 54px; font-weight: 900; margin: 30px 0 0; }

/* danh sách video theo nhóm */
/* hàng chọn môn / lớp (v130: đổi tên từ .vl-groups - trùng tên kiểu cảnh phép nhân làm hàng nút dựng đứng) */
.vl-chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 0 auto 12px; max-width: 1000px; }
.vl-chips button { flex: none; border: 2px solid #CBD5E1; background: #fff; border-radius: 99px; padding: 8px 16px; font: inherit; font-weight: 800; cursor: pointer; color: #334155; white-space: nowrap; }
.vl-chips button.on { background: #F97316; border-color: #F97316; color: #fff; }
.vl-chips button small { opacity: .75; }
@media (max-width: 640px) {
  .vl-chips { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 2px 2px 6px; margin-left: -4px; margin-right: -4px; mask-image: linear-gradient(90deg, #000 88%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); }
  .vl-chips::-webkit-scrollbar { display: none; }
  .vl-chips button { padding: 7px 13px; font-size: .9rem; }
}
/* giữ nguyên kiểu cũ cho cảnh phép nhân trong video đã xuất */
.vl-stage .vl-groups { flex-wrap: wrap; justify-content: center; margin: 0 auto 14px; }

/* đặt tính cột dọc */
.vl-col { display: flex; align-items: center; gap: 70px; }
.vl-col-box { position: relative; font-family: 'Nunito', sans-serif; font-weight: 900; font-size: 120px; line-height: 1.05; padding: 10px 30px 10px 110px; background: #fff; border-radius: 30px; }
.vl-col-row { display: flex; justify-content: flex-end; position: relative; z-index: 1; }
.vl-col-row b { position: absolute; left: -90px; color: var(--vc); }
.vl-col-row i { font-style: normal; width: 80px; text-align: center; }
.vl-col-row.res i { color: var(--vc); }
.vl-col-line { position: relative; z-index: 2; height: 10px; background: #1E293B; border-radius: 5px; margin: 6px 0 6px -60px; }
.vl-col-hi { position: absolute; top: 4px; bottom: 4px; width: 92px; border-radius: 20px; background: #FEF3C7; z-index: 0; }
.vl-col-hi.u { right: 24px; } .vl-col-hi.t { right: 104px; background: #DBEAFE; }
.vl-col p { font-size: 46px; font-weight: 900; max-width: 520px; margin: 0; }
/* bảng số */
.vl-grid { display: grid; margin-bottom: 50px; grid-template-columns: repeat(var(--cols), 1fr); gap: 5px; width: 900px; margin-top: -10px; }
.vl-grid b { font: 900 28px 'Nunito', sans-serif; background: #fff; border-radius: 8px; text-align: center; padding: 3px 0; }
.vl-grid b.hi { background: var(--vc); color: #fff; }
.vl-grid-txt { position: absolute; bottom: -6px; left: 0; right: 0; text-align: center; font-size: 40px; font-weight: 900; margin: 0; }
.vl-cmp-sign.words { font-size: 40px; line-height: 1.15; padding: 26px 8px; }

/* chờ giọng đọc: hình đứng yên, hiện thông báo nhỏ */
.vl-stage.loading, .vl-stage.loading * { animation-play-state: paused !important; }
.vl-wait { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: rgba(15, 23, 42, .78); color: #fff; font-weight: 800; padding: 10px 18px; border-radius: 99px; z-index: 6; font-size: .95rem; white-space: nowrap; }

/* ===== phát MP4 (v126) ===== */
.vl-frame.mp4 video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; display: block; cursor: pointer; }
.vl-frame:fullscreen { border-radius: 0; display: flex; align-items: center; }
.vl-hot { position: absolute; inset: 0; z-index: 4; }
.vl-hit { position: absolute; border: 4px solid rgba(250, 204, 21, .9); border-radius: 2.2vmin; background: rgba(255, 255, 255, .01); cursor: pointer; animation: vlHit 1.2s ease-in-out infinite; padding: 0; }
.vl-hit:hover { background: rgba(250, 204, 21, .18); }
.vl-hit.no { border-color: #EF4444; background: rgba(239, 68, 68, .28); animation: none; }
.vl-hit.ok { border-color: #22C55E; background: rgba(34, 197, 94, .25); animation: none; }
.vl-hit.hint { border-color: #22C55E; animation: vlHit .5s ease-in-out infinite; }
@keyframes vlHit { 50% { box-shadow: 0 0 0 6px rgba(250, 204, 21, .35); } }
.vl-hot-tip { position: absolute; left: 50%; top: 2%; transform: translateX(-50%); background: rgba(15, 23, 42, .78); color: #fff; font-weight: 800; padding: 6px 14px; border-radius: 99px; font-size: clamp(.75rem, 2.2vw, 1rem); white-space: nowrap; pointer-events: none; }

/* nút điều khiển trình phát */
.vl-btn { border: 2px solid #CBD5E1; background: #fff; color: #1E293B; border-radius: 14px; padding: 10px 16px; min-height: 46px; min-width: 52px; font: inherit; font-weight: 800; font-size: 1rem; cursor: pointer; transition: transform .1s, background .1s; }
.vl-btn:hover { background: #F1F5F9; }
.vl-btn:active { transform: scale(.96); }
.vl-btn.primary { background: #F97316; border-color: #F97316; color: #fff; min-width: 110px; }
.vl-btn.primary:hover { background: #EA580C; }
@media (max-width: 520px) { .vl-btn { padding: 8px 11px; min-height: 42px; font-size: .92rem; } .vl-btn.primary { min-width: 92px; } }

/* hàng nút đáp án to dưới video (chỉ màn hình hẹp, lúc chờ chọn) */
.vl-qbar { display: none; }
@media (max-width: 720px) {
  .vl-qbar:not([hidden]) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
  .vl-qbtn { min-height: 56px; border: 3px solid #FACC15; background: #fff; border-radius: 16px; font: inherit; font-weight: 900; font-size: 1.05rem; color: #1E293B; cursor: pointer; padding: 6px; line-height: 1.2; }
  .vl-qbtn.no { border-color: #EF4444; background: #FEE2E2; opacity: .7; }
  .vl-qbtn.ok, .vl-qbtn.hint { border-color: #22C55E; background: #DCFCE7; }
}

/* ===== Đợt 2-4 (v129): kiểu cảnh mới ===== */
.growy { animation: vlGrowY 1s ease-out both; transform-origin: bottom center; }
@keyframes vlGrowY { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes vlTurn2 { from { transform: rotate(0deg); } to { transform: rotate(var(--to)); } }

/* nhân / chia theo nhóm */
.vl-groups { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.vl-groups-row { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; max-width: 1180px; }
.vl-gbox { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; align-content: center; width: 200px; min-height: 120px; padding: 10px; background: #fff; border: 5px dashed var(--vc); border-radius: 22px; font-size: 40px; }
.vl-groups-row.n7 .vl-gbox, .vl-groups-row.n8 .vl-gbox, .vl-groups-row.n9 .vl-gbox, .vl-groups-row.n10 .vl-gbox { width: 150px; font-size: 30px; min-height: 96px; }
.vl-groups p, .vl-frac-side p, .vl-area p, .vl-angle-side p, .vl-tl p, .vl-bars p, .vl-formula p { font-size: 44px; font-weight: 900; margin: 0; text-align: center; max-width: 1100px; line-height: 1.25; }

/* phân số */
.vl-frac-box { display: flex; align-items: center; gap: 90px; }
.vl-frac-art { width: 380px; height: 380px; }
.vl-frac-art path, .vl-frac-art rect, .vl-frac-art circle { fill: #fff; stroke: #1E293B; stroke-width: 4; transform-box: fill-box; transform-origin: center; }
.vl-frac-art .on { fill: var(--vc); }
.vl-frac-side { display: flex; flex-direction: column; align-items: center; gap: 24px; max-width: 560px; }
.vl-frac { display: inline-flex; flex-direction: column; align-items: center; font-family: 'Nunito', sans-serif; font-weight: 900; color: var(--vc); }
.vl-frac b { font-size: 120px; line-height: 1; }
.vl-frac i { width: 120px; height: 12px; border-radius: 6px; background: #1E293B; margin: 8px 0; }

/* diện tích / chu vi */
.vl-area { display: flex; flex-direction: column; align-items: center; gap: 26px; }
.vl-area-box { position: relative; padding: 50px 0 0 90px; }
.vl-area-grid { display: grid; gap: 0; border: 4px solid #1E293B; background: #fff; }
.vl-area-grid i { width: var(--c); height: var(--c); border: 1.5px solid #94A3B8; background: var(--vb); }
.vl-area:not(.per) .vl-area-grid i { background: var(--vc); opacity: .85; }
.vl-area-w { position: absolute; top: 0; left: 90px; right: 0; text-align: center; font-size: 36px; font-weight: 900; color: var(--vc); }
.vl-area-h { position: absolute; left: 0; top: 50px; bottom: 0; width: 84px; display: flex; align-items: center; justify-content: center; font-size: 36px; font-weight: 900; color: var(--vc); }
.vl-area-ring { position: absolute; left: 86px; top: 46px; right: -4px; bottom: -4px; border: 10px solid #F97316; border-radius: 6px; pointer-events: none; }

/* góc */
.vl-angle { display: flex; align-items: center; gap: 60px; }
.vl-angle > .vl-svg { width: 600px; height: 346px; }
.vl-angle .ray { stroke: #1E293B; stroke-width: 10; stroke-linecap: round; }
.vl-angle .ray.turn2 { stroke: var(--vc); transform-box: view-box; transform-origin: 260px 250px; transform: rotate(var(--to)); animation: vlTurn2 1.6s ease-in-out .4s both; }
.vl-angle-side { display: flex; flex-direction: column; align-items: center; gap: 16px; max-width: 520px; }
.vl-angle-side > b { font-size: 130px; font-weight: 900; color: var(--vc); font-family: 'Nunito', sans-serif; line-height: 1; }

/* trục thời gian */
.vl-tl { display: flex; flex-direction: column; align-items: center; gap: 30px; width: 1180px; }
.vl-tl-row { display: flex; justify-content: space-around; width: 100%; position: relative; }
.vl-tl-row::before { content: ""; position: absolute; left: 2%; right: 2%; top: 108px; height: 8px; background: #94A3B8; border-radius: 4px; }
.vl-tl-it { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; width: 220px; text-align: center; }
.vl-tl-it .vl-ic { font-size: 70px; }
.vl-tl-it i { width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 7px solid #64748B; z-index: 1; }
.vl-tl-it b { font-size: 36px; font-weight: 900; font-family: 'Nunito', sans-serif; }
.vl-tl-it small { font-size: 24px; font-weight: 800; line-height: 1.25; color: #334155; }
.vl-tl-it.hi i { border-color: var(--vc); background: var(--vc); }
.vl-tl-it.hi b { color: var(--vc); }
.vl-stage.dark .vl-tl-it small { color: #E2E8F0; }

/* biểu đồ cột */
.vl-bars { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.vl-bars-row { display: flex; align-items: flex-end; gap: 34px; height: 330px; border-bottom: 6px solid #1E293B; padding: 0 30px; margin-bottom: 50px; }
.vl-bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; width: 120px; height: 100%; position: relative; }
.vl-bar span { width: 90px; background: var(--vc); border-radius: 12px 12px 0 0; }
.vl-bar em { font-style: normal; font-size: 30px; font-weight: 900; }
.vl-bar small { position: absolute; bottom: -54px; font-size: 24px; font-weight: 800; white-space: nowrap; }

/* bảng số (v174) */
.vl-table { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.vl-table-grid { display: grid; grid-template-columns: repeat(var(--n), 116px); gap: 8px; }
.vl-table-grid span { display: flex; align-items: center; justify-content: center; height: 116px; background: #fff; border: 5px solid var(--vc); border-radius: 18px; font-size: 54px; font-weight: 900; color: #1E293B; box-sizing: border-box; }
.vl-table-grid span.q { background: #FFEDD5; border-color: #F97316; color: #C2410C; }
.vl-table-grid span.hi { background: var(--vc); color: #fff; }
.vl-table p { font-size: 44px; font-weight: 900; margin: 0; text-align: center; max-width: 1100px; line-height: 1.25; }
/* câu đố dài (v174): không chạm mép, chữ nhỏ hơn */
.vl-quiz h2 { max-width: 1160px; text-align: center; }
.vl-quiz h2.long { font-size: 48px; line-height: 1.25; }

/* sơ đồ đoạn thẳng (v174) */
.vl-seg { display: flex; flex-direction: column; align-items: center; gap: 40px; }
.vl-seg-box { position: relative; display: flex; flex-direction: column; gap: 30px; }
.vl-seg-box.braced { padding-right: 250px; }
.vl-seg-row { display: flex; align-items: center; gap: 18px; }
.vl-seg-name { width: 190px; text-align: right; font-size: 38px; font-weight: 900; }
.vl-seg-bar { display: flex; height: 70px; }
.vl-seg-bar span { display: flex; align-items: center; justify-content: center; box-sizing: border-box; height: 100%; background: var(--vc); color: #fff; font-size: 32px; font-weight: 900; border: 4px solid #fff; border-radius: 14px; }
.vl-seg-bar span.hi { background: #F97316; }
.vl-seg-row em { font-style: normal; font-size: 44px; font-weight: 900; color: #1E293B; min-width: 60px; }
.vl-seg-brace { position: absolute; right: 0; top: 0; bottom: 0; display: flex; align-items: center; gap: 14px; }
.vl-seg-brace i { width: 26px; align-self: stretch; border: 6px solid #1E293B; border-left: 0; border-radius: 0 22px 22px 0; }
.vl-seg-brace b { font-size: 42px; font-weight: 900; color: var(--vc); width: 200px; }
.vl-seg p { font-size: 44px; font-weight: 900; margin: 0; text-align: center; max-width: 1100px; line-height: 1.25; }

/* công thức */
.vl-formula { display: flex; flex-direction: column; align-items: center; gap: 26px; }
.vl-fbig { font-size: 96px; font-weight: 900; color: var(--vc); font-family: 'Nunito', sans-serif; background: #fff; border: 6px solid var(--vc); border-radius: 30px; padding: 6px 46px; text-align: center; }
.vl-fparts { display: flex; flex-wrap: wrap; gap: 14px 30px; justify-content: center; max-width: 1150px; }
.vl-fparts span { font-size: 34px; font-weight: 800; background: rgba(255, 255, 255, .85); border-radius: 16px; padding: 6px 16px; }
.vl-fparts b { color: var(--vc); font-family: 'Nunito', sans-serif; font-size: 40px; }

/* thẻ từ tiếng Anh */
.vl-word { display: flex; align-items: center; gap: 80px; }
.vl-word > .vl-ic { font-size: 240px; }
.vl-word-side { display: flex; flex-direction: column; gap: 10px; }
.vl-word-side b { font-size: 110px; font-weight: 900; color: var(--vc); font-family: 'Nunito', sans-serif; line-height: 1.05; }
.vl-word-side i { font-size: 40px; color: #64748B; font-style: normal; font-weight: 700; }
.vl-word-side small { font-size: 54px; font-weight: 900; color: #1E293B; }

/* hàng trăm */
.vl-tens-art.place { gap: 14px; align-items: flex-end; }
.vl-hund { width: 170px; height: 170px; border: 5px solid #2563EB; border-radius: 10px; background-color: #FDE68A; background-image: linear-gradient(#D97706 2px, transparent 2px), linear-gradient(90deg, #D97706 2px, transparent 2px); background-size: 16px 16px; }
.vl-bundle.sm { padding: 4px; gap: 2px; border-width: 4px; }
.vl-bundle.sm i, .vl-stick.sm { width: 8px; height: 170px; }
.vl-tens-art.place + .vl-tens-tab span { min-width: 170px; }

/* đặt tính có nhớ */
.vl-col-box.c2 { font-size: 104px; padding-top: 0; }
.vl-col-box.c2 .vl-col-row i { width: 72px; }
.vl-col-row.marks { height: 46px; }
.vl-col-row.marks i { position: relative; }
.vl-col-row.marks em { position: absolute; left: 0; right: 0; bottom: 0; font-style: normal; font-size: 40px; color: #DC2626; text-align: center; }
.vl-grades { margin-top: -4px; }
.vl-grades button.on { background: #2563EB; border-color: #2563EB; }

/* biểu đồ hình quạt */
.vl-pie { display: flex; align-items: center; gap: 70px; }
.vl-pie-art { width: 400px; height: 400px; }
.vl-pie-art path { stroke: #fff; stroke-width: 3; transform-box: view-box; transform-origin: 130px 130px; }
.vl-pie-leg { display: flex; flex-direction: column; gap: 16px; max-width: 600px; }
.vl-pie-leg span { font-size: 38px; font-weight: 800; display: flex; align-items: center; gap: 12px; }
.vl-pie-leg i { width: 34px; height: 34px; border-radius: 8px; flex: none; }
.vl-pie-leg p { font-size: 40px; font-weight: 900; margin: 10px 0 0; }

/* ===== trang xem video kiểu YouTube (v130): trình phát + "Video tiếp theo" ===== */
.vl-watch { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; max-width: 1360px; margin: 0 auto; align-items: start; }
.vl-watch .vl-player { max-width: none; margin: 0; }
.vl-side { background: #fff; border-radius: 18px; padding: 12px; box-shadow: 0 4px 18px rgba(15, 23, 42, .06); }
.vl-side h3 { margin: 2px 4px 10px; font-size: 1.05rem; font-weight: 900; color: #1E293B; }
.vl-side-list { display: flex; flex-direction: column; gap: 6px; max-height: calc(100vh - 220px); overflow-y: auto; padding-right: 4px; }
.vl-side-it { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px; align-items: start; text-align: left; border: 0; background: transparent; padding: 6px; border-radius: 12px; cursor: pointer; font: inherit; color: #1E293B; }
.vl-side-it:hover { background: #F1F5F9; }
.vl-side-th { aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #E2E8F0; display: block; }
.vl-side-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vl-side-ic { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 2.2rem; }
.vl-side-tx { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.vl-side-tx b { font-size: .92rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vl-side-tx small { color: #64748B; font-weight: 700; font-size: .78rem; }
.vl-side-all { width: 100%; margin-top: 8px; }
@media (max-width: 960px) {
  .vl-watch { grid-template-columns: 1fr; gap: 14px; }
  .vl-side { padding: 10px; }
  .vl-side-list { max-height: none; overflow: visible; }
}
@media (max-width: 520px) {
  .vl-side-it { grid-template-columns: 132px minmax(0, 1fr); }
  .vl-side-tx b { font-size: .88rem; }
}

/* ===== cần tài khoản để xem video (v132) ===== */
.vl-lockbar { display: block; width: min(720px, 100%); margin: 0 auto 14px; padding: 12px 16px; border: 2px dashed #F59E0B; border-radius: 16px; background: #FFFBEB; color: #92400E; font: inherit; font-weight: 800; font-size: .98rem; cursor: pointer; }
.vl-gate { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.vl-gate-head { display: flex; gap: 14px; align-items: center; background: #fff; border-radius: 18px; padding: 14px; box-shadow: 0 4px 18px rgba(15, 23, 42, .06); }
.vl-gate-head h3 { margin: 0 0 6px; font-size: 1.15rem; font-weight: 900; color: #1E293B; }
.vl-gate-head p { margin: 0; color: #475569; font-weight: 700; font-size: .92rem; line-height: 1.45; }
.vl-gate-th { position: relative; flex: none; width: 150px; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #E2E8F0; display: block; }
.vl-gate-th img { width: 100%; height: 100%; object-fit: cover; display: block; filter: brightness(.75); }
.vl-gate-th i { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 2rem; }
#vl-gate-form .ac-section { background: #fff; border-radius: 18px; padding: 16px; box-shadow: 0 4px 18px rgba(15, 23, 42, .06); }
#vl-gate-btn, #vl-gate-back { align-self: center; }
@media (max-width: 520px) { .vl-gate-head { flex-direction: column; text-align: center; } .vl-gate-th { width: 100%; max-width: 320px; } }


/* ===== css/rooms/account.css ===== */
/* ============================================================
   v94: tài khoản phụ huynh / giáo viên, đồng bộ, lớp học, quản trị
   ============================================================ */
.ac-section { background: linear-gradient(180deg, #EEF6FF, #fff); }
.ac-user { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ac-av { font-size: 2.2rem; }
.ac-name { font-weight: 900; color: #1E293B; }
.ac-role { display: inline-block; font-size: 0.72rem; background: #DBEAFE; color: #1E40AF; border-radius: 999px; padding: 2px 8px; margin-left: 4px; font-weight: 900; vertical-align: middle; }
.ac-email { font-size: 0.82rem; color: #64748B; font-weight: 700; }
.ac-box { background: #fff; border: 2px solid #E2E8F0; border-radius: 14px; padding: 10px 12px; margin: 8px 0; }
.ac-box-title { font-weight: 900; color: #334155; margin-bottom: 6px; }
.ac-ok { color: #166534; font-weight: 800; font-size: 0.9rem; }
.ac-state { color: #B91C1C; font-weight: 800; font-size: 0.82rem; }
.ac-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.ac-tab { border: 2px solid #E2E8F0; background: #fff; border-radius: 999px; padding: 8px 12px; font-weight: 800; color: #334155; cursor: pointer; min-height: 40px; font-size: 0.85rem; }
.ac-tab.active { border-color: #1273C4; background: #EEF6FF; color: #0A2463; }
.ac-form { display: flex; flex-direction: column; gap: 8px; }
.ac-form .ar-btn { margin-top: 4px; }
.ac-form .pd-switch { font-weight: 800; color: #334155; font-size: 0.9rem; }
.ac-code-input { font-family: var(--font-display); font-size: 1.6rem; letter-spacing: 0.4em; text-align: center; font-weight: 900; }
.ac-code { font-family: var(--font-display); font-size: 1.8rem; font-weight: 900; letter-spacing: 0.25em; color: #0A2463; background: #EEF6FF; border: 2px dashed #3AA8F7; border-radius: 14px; padding: 12px; margin: 10px 0; user-select: text; -webkit-user-select: text; }
.ac-radio { display: flex; flex-direction: column; gap: 4px; font-weight: 800; color: #334155; font-size: 0.9rem; }
.ac-radio input { margin-right: 6px; }
.ac-modal-card { max-width: 440px; }
.ac-modal-card .ar-input { width: 100%; }
.pd-pill.ac-primary { background: #1273C4; color: #fff; border-color: #1273C4; }
.pd-pill.ac-danger { color: #B91C1C; border-color: #FCA5A5; }
.ac-praise-pick { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.ac-praise-pick .pd-pill { text-align: left; }

/* Thẻ trang chủ: bài cô giao + lời khen */
.ac-class-card { background: #fff; border: 3px solid #93C5FD; border-radius: 22px; padding: 12px 14px; margin-bottom: 14px; box-shadow: var(--card-shadow); }
.ac-class-head { font-family: var(--font-display); font-weight: 900; color: #1E3A8A; margin-bottom: 6px; }
.ac-hw-list, .tc-hw-list { display: flex; flex-direction: column; gap: 8px; }
.ac-hw { display: flex; align-items: center; gap: 10px; background: #F8FAFC; border: 2px solid #E2E8F0; border-radius: 14px; padding: 8px 10px; }
.ac-hw-ic { font-size: 1.6rem; flex: none; }
.ac-hw-body { flex: 1; min-width: 0; text-align: left; }
.ac-hw-title { font-weight: 900; color: #1E293B; font-size: 0.95rem; }
.ac-hw-sub { font-size: 0.78rem; font-weight: 700; color: #64748B; }
.ac-hw-done { color: #166534; font-weight: 800; }
.ac-praise { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.ac-praise-item { background: #FFFBEB; border-radius: 12px; padding: 6px 10px; font-size: 0.88rem; font-weight: 700; color: #1E293B; }
.ac-praise-item.new { border: 2px solid #FBBF24; }

/* Giáo viên / quản trị */
.tc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin-top: 8px; }
.tc-class { border: 3px solid #E2E8F0; border-radius: 16px; background: #fff; padding: 10px; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.tc-code { font-family: var(--font-display); font-weight: 900; color: #1273C4; letter-spacing: 2px; }
.tc-name { font-weight: 900; color: #1E293B; }
.tc-class small { color: #64748B; font-weight: 700; }
.tc-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.tc-table td { vertical-align: top; font-size: 0.85rem; }
.tc-table tr.tc-g td:first-child { border-left: 5px solid #22C55E; }
.tc-table tr.tc-y td:first-child { border-left: 5px solid #F59E0B; }
.tc-table tr.tc-r td:first-child { border-left: 5px solid #EF4444; }
.tc-hw-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.tc-hw-form select.ar-input { font-weight: 800; }
#teacher-view .game-card, #admin-view .game-card { text-align: left; }


/* ===== css/rooms/exam.css ===== */
/* ============================================================
   Phòng Luyện Thi Nhí (v97): giao diện nghiêm túc, tông xanh navy / vàng đồng
   ============================================================ */
#exam-view { --ex-navy: #1E3A8A; --ex-navy-2: #1E40AF; --ex-ink: #0F172A; --ex-muted: #64748B; --ex-line: #E2E8F0; --ex-gold: #B45309; --ex-bg: #F8FAFC; }
#exam-view .view-top-header { display: none; }
#exam-arena { font-family: var(--font-body); color: var(--ex-ink); }
.ex-top { display: flex; align-items: center; gap: 10px; background: var(--ex-navy); color: #fff; border-radius: 16px; padding: 10px 12px; margin-bottom: 12px; }
.ex-top-exam { position: sticky; top: 6px; z-index: 20; box-shadow: 0 8px 20px rgba(30, 58, 138, 0.3); }
.ex-back { border: none; background: rgba(255,255,255,0.15); color: #fff; border-radius: 999px; padding: 8px 12px; font-weight: 800; cursor: pointer; min-height: 40px; white-space: nowrap; }
.ex-top-title { flex: 1; font-family: var(--font-display); font-weight: 900; font-size: 1.05rem; text-align: center; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-top-id { font-size: 0.8rem; font-weight: 800; opacity: 0.9; white-space: nowrap; }
.ex-timer { font-family: var(--font-display); font-weight: 900; font-size: 1.1rem; background: rgba(255,255,255,0.15); border-radius: 999px; padding: 6px 12px; min-width: 70px; text-align: center; font-variant-numeric: tabular-nums; }
.ex-timer.warn { background: #DC2626; animation: pulse 0.8s infinite alternate; }
.ex-card { background: #fff; border: 1px solid var(--ex-line); border-radius: 16px; padding: 14px 16px; margin-bottom: 12px; box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04); }
.ex-h2 { font-family: var(--font-display); font-weight: 900; font-size: 1.25rem; color: var(--ex-navy); margin: 6px 0; }
.ex-h3 { font-family: var(--font-display); font-weight: 900; font-size: 1rem; color: var(--ex-ink); margin: 14px 0 8px; letter-spacing: 0.02em; text-transform: uppercase; }
.ex-p { font-size: 0.95rem; line-height: 1.55; color: #334155; margin: 6px 0; }
.ex-note { font-size: 0.8rem; color: var(--ex-muted); font-weight: 600; margin-top: 8px; }
.ex-label { font-size: 0.72rem; font-weight: 900; color: var(--ex-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.ex-id-sub { font-size: 0.82rem; color: var(--ex-muted); font-weight: 700; line-height: 1.4; }
.ex-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.ex-btn { border: 1.5px solid var(--ex-navy); background: #fff; color: var(--ex-navy); border-radius: 10px; padding: 10px 14px; min-height: 44px; font-family: var(--font-body); font-weight: 800; font-size: 0.92rem; cursor: pointer; }
.ex-btn.primary { background: var(--ex-navy); color: #fff; }
.ex-btn.ghost { border-color: var(--ex-line); color: #334155; }
.ex-btn.small { min-height: 34px; padding: 4px 10px; font-size: 0.8rem; }
.ex-btn:disabled { opacity: 0.45; cursor: default; }
.ex-seal { font-size: 3rem; text-align: center; }
.ex-gate { text-align: center; max-width: 640px; margin: 0 auto; }
.ex-gate .ex-actions { justify-content: center; }

/* thẻ thí sinh */
.ex-id { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: linear-gradient(135deg, #EFF6FF, #fff); }
.ex-id-left { display: flex; align-items: center; gap: 10px; }
.ex-id-rank { font-size: 2.2rem; width: 56px; height: 56px; border-radius: 50%; background: #fff; border: 2px solid var(--ex-navy); display: flex; align-items: center; justify-content: center; }
.ex-id-name { font-family: var(--font-display); font-weight: 900; font-size: 1.1rem; }
.ex-id-right { display: flex; align-items: center; gap: 8px; }
.ex-id-right label { font-weight: 900; color: var(--ex-muted); font-size: 0.8rem; }
.ex-seg { display: inline-flex; border: 1.5px solid var(--ex-navy); border-radius: 10px; overflow: hidden; }
.ex-seg button { border: none; background: #fff; color: var(--ex-navy); min-width: 40px; min-height: 36px; font-weight: 900; cursor: pointer; }
.ex-seg button.active { background: var(--ex-navy); color: #fff; }
.ex-target { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-left: 5px solid var(--ex-gold); }
.ex-target-name { font-family: var(--font-display); font-weight: 900; font-size: 1.05rem; }

/* kỳ thi */
.ex-exams { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 10px; }
.ex-exam { background: #fff; border: 1px solid var(--ex-line); border-top: 4px solid var(--ec); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.ex-exam-head { display: flex; gap: 10px; align-items: flex-start; }
.ex-exam-ic { font-size: 1.9rem; line-height: 1; }
.ex-exam-name { font-family: var(--font-display); font-weight: 900; font-size: 1rem; }
.ex-exam-meta { font-size: 0.8rem; font-weight: 800; color: var(--ex-gold); }
.ex-exam-actions { display: flex; gap: 6px; margin-top: auto; }
.ex-exam-actions .ex-btn { flex: 1; padding: 8px 6px; font-size: 0.85rem; }
.ex-exam-actions .ex-btn.ghost { flex: 0 0 44px; }
.ex-quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.ex-quick-btn { border: 1px solid var(--ex-line); background: #fff; border-radius: 14px; padding: 12px; text-align: left; cursor: pointer; display: grid; grid-template-columns: 36px 1fr; grid-template-rows: auto auto; column-gap: 8px; font-family: var(--font-body); }
.ex-quick-btn span { grid-row: 1 / 3; font-size: 1.6rem; }
.ex-quick-btn b { font-weight: 900; color: var(--ex-ink); }
.ex-quick-btn small { color: var(--ex-muted); font-weight: 700; font-size: 0.78rem; }
.ex-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.ex-table th, .ex-table td { padding: 7px 8px; border-bottom: 1px solid var(--ex-line); text-align: left; vertical-align: top; }
.ex-table th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ex-muted); }
.ex-table tr.bad td { background: #FEF2F2; } .ex-table tr.good td { background: #F0FDF4; } .ex-table tr.me td { background: #EFF6FF; font-weight: 900; }
.ex-table small { color: var(--ex-muted); }
.ex-bar { height: 8px; background: #E2E8F0; border-radius: 999px; overflow: hidden; margin-top: 4px; }
.ex-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--ex-navy-2), #60A5FA); }

/* luyện dạng */
.ex-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.ex-type { border: 1px solid var(--ex-line); border-left: 5px solid #CBD5E1; background: #fff; border-radius: 12px; padding: 10px 12px; text-align: left; cursor: pointer; font-family: var(--font-body); }
.ex-type.mid { border-left-color: #F59E0B; } .ex-type.good { border-left-color: #16A34A; }
.ex-type-name { font-weight: 900; color: var(--ex-ink); }

/* phiên làm bài */
.ex-session { max-width: 760px; margin: 0 auto; }
.ex-sec { font-size: 0.82rem; font-weight: 800; color: var(--ex-muted); margin-bottom: 6px; }
.ex-nav { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.ex-dot { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--ex-line); background: #fff; font-size: 0.75rem; font-weight: 900; color: var(--ex-muted); cursor: pointer; }
.ex-dot.done { background: #DBEAFE; color: var(--ex-navy); border-color: #93C5FD; }
.ex-dot.ok { background: #DCFCE7; color: #166534; border-color: #86EFAC; } .ex-dot.bad { background: #FEE2E2; color: #991B1B; border-color: #FCA5A5; }
.ex-dot.cur { outline: 2px solid var(--ex-navy); outline-offset: 1px; }
.ex-q { background: #fff; border: 1px solid var(--ex-line); border-radius: 16px; padding: 16px; }
.ex-q.locked .ex-opt, .ex-q.locked .ex-chip, .ex-q.locked [data-k], .ex-q.locked [data-bin] { pointer-events: none; opacity: 0.85; }
.ex-prompt { font-size: 1.12rem; font-weight: 800; line-height: 1.5; color: var(--ex-ink); margin-bottom: 12px; }
.ex-prompt.small { font-size: 0.95rem; margin: 6px 0; }
.ex-prompt em { font-style: normal; color: var(--ex-navy); }
.ex-math { font-family: var(--font-display); font-size: 1.6rem; font-weight: 900; color: var(--ex-navy); letter-spacing: 0.04em; }
.ex-blank { display: inline-block; min-width: 2.2em; border-bottom: 2px solid var(--ex-navy); text-align: center; color: var(--ex-navy); font-weight: 900; }
.ex-visual { margin-bottom: 10px; }
.ex-big { font-size: 1.9rem; line-height: 1.2; }
.ex-hint { font-size: 0.85rem; color: var(--ex-muted); font-weight: 700; text-align: center; }
.ex-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ex-opts.wide { grid-template-columns: 1fr 1fr; }
.ex-opt { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--ex-line); background: #fff; border-radius: 12px; padding: 10px 12px; min-height: 52px; text-align: left; cursor: pointer; font-family: var(--font-body); font-weight: 800; font-size: 1rem; color: var(--ex-ink); }
.ex-opt-l { width: 26px; height: 26px; border-radius: 50%; background: #F1F5F9; color: var(--ex-navy); font-size: 0.8rem; font-weight: 900; display: flex; align-items: center; justify-content: center; flex: none; }
.ex-opt-b { flex: 1; min-width: 0; }
.ex-opt.sel { border-color: var(--ex-navy); background: #EFF6FF; }
.ex-opt.sel .ex-opt-l { background: var(--ex-navy); color: #fff; }
.ex-listen { border: none; background: var(--ex-navy); color: #fff; border-radius: 999px; padding: 10px 18px; font-weight: 900; margin-bottom: 10px; cursor: pointer; }
.ex-numpad { max-width: 260px; margin: 0 auto; }
.ex-num-display { font-family: var(--font-display); font-size: 2rem; font-weight: 900; color: var(--ex-navy); text-align: center; border: 2px solid var(--ex-navy); border-radius: 12px; padding: 6px; margin-bottom: 8px; min-height: 56px; }
.ex-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ex-keys button { min-height: 48px; border: 1px solid var(--ex-line); background: #fff; border-radius: 10px; font-size: 1.2rem; font-weight: 900; cursor: pointer; }
.ex-keys button[data-k="0"] { grid-column: 2; }
.ex-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.ex-chip { border: 1.5px solid var(--ex-line); background: #fff; border-radius: 10px; padding: 8px 12px; min-height: 44px; font-family: var(--font-display); font-weight: 900; font-size: 1rem; color: var(--ex-ink); cursor: pointer; }
.ex-chip.used { opacity: 0.3; } .ex-chip.sel { border-color: var(--ex-navy); background: #EFF6FF; } .ex-chip.paired { border-color: #16A34A; background: #F0FDF4; }
.ex-chip small { color: var(--ex-muted); font-size: 0.75rem; }
.ex-seqbox { min-height: 56px; border: 2px dashed #93C5FD; border-radius: 12px; background: #F8FAFC; padding: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ex-lt { font-weight: 900; color: var(--ex-muted); }
.ex-ph { color: var(--ex-muted); font-weight: 700; font-size: 0.85rem; }
.ex-pairs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ex-col { display: flex; flex-direction: column; gap: 6px; }
.ex-col .ex-chip { text-align: left; }
.ex-bins { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.ex-bin { border: 2px dashed #CBD5E1; border-radius: 12px; padding: 8px; min-height: 90px; cursor: pointer; }
.ex-bin-name { font-weight: 900; color: var(--ex-navy); margin-bottom: 4px; }
.ex-bin-items { display: flex; flex-wrap: wrap; gap: 4px; } .ex-bin-items span { background: #EFF6FF; border-radius: 8px; padding: 2px 8px; font-weight: 800; } .ex-bin-items em { color: var(--ex-muted); font-size: 0.78rem; font-weight: 700; }
.ex-feedback { display: none; margin-top: 10px; border-radius: 12px; padding: 10px 12px; font-weight: 800; line-height: 1.5; }
.ex-feedback.show { display: block; } .ex-feedback.ok { background: #F0FDF4; color: #166534; } .ex-feedback.bad { background: #FEF2F2; color: #991B1B; }
.ex-explain { font-weight: 700; color: #334155; }
.ex-session-actions { justify-content: space-between; }
.ex-session-actions .ex-btn { flex: 1; }

/* hình vẽ Kangaroo */
.ex-grid { display: grid; grid-template-columns: repeat(var(--c), 1fr); gap: 4px; max-width: 320px; font-size: 1.7rem; text-align: center; background: #F8FAFC; border-radius: 12px; padding: 8px; }
.ex-seq { display: flex; flex-wrap: wrap; gap: 8px; font-size: 2rem; align-items: center; }
.ex-seq .ex-blank { font-size: 1.4rem; min-width: 1.6em; }
.ex-balance { display: flex; align-items: flex-end; justify-content: center; gap: 10px; font-size: 1.8rem; }
.ex-pan { background: #F1F5F9; border-radius: 10px; padding: 6px 10px; }
.ex-clock { width: 150px; max-width: 60vw; display: block; margin: 0 auto; }
.ex-week { display: flex; gap: 4px; flex-wrap: wrap; } .ex-week span { border: 1px solid var(--ex-line); border-radius: 8px; padding: 6px 8px; font-weight: 800; font-size: 0.8rem; } .ex-week span.now { background: var(--ex-navy); color: #fff; }
.ex-week span.on { background: #DCFCE7; border-color: #86EFAC; } .ex-week span b { display: block; font-size: 0.72rem; }
.ex-magic { border-collapse: collapse; margin: 0 auto; } .ex-magic td { border: 2px solid var(--ex-navy); width: 48px; height: 48px; text-align: center; font-family: var(--font-display); font-weight: 900; font-size: 1.3rem; }
.ex-pour, .ex-share { font-size: 1.5rem; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; } .ex-share { flex-direction: column; align-items: flex-start; }
.ex-pathgrid { position: relative; display: grid; grid-template-columns: repeat(calc(var(--c) + 1), 28px); grid-auto-rows: 28px; width: max-content; margin: 8px 0 8px 10px; }
.ex-pathgrid i { border: 1px solid var(--ex-navy); } .ex-ant, .ex-honey { position: absolute; font-size: 1.1rem; } .ex-ant { left: -14px; top: -14px; } .ex-honey { right: -14px; bottom: -14px; }
.ex-pix { display: grid; grid-template-columns: repeat(var(--c), 22px); gap: 2px; width: max-content; margin: 0 auto; } .ex-pix i { width: 22px; height: 22px; background: #E2E8F0; border-radius: 3px; display: block; } .ex-pix i.on { background: var(--ex-navy); }
.ex-pix.lines { gap: 0; } .ex-pix.lines i { background: #fff; border: 1.5px solid var(--ex-navy); border-radius: 0; width: 34px; height: 34px; }
.ex-pix.lines { grid-template-columns: repeat(var(--c), 34px); }
.ex-passage { background: #FFFBEB; border-left: 4px solid var(--ex-gold); padding: 10px 12px; border-radius: 8px; font-size: 1rem; line-height: 1.6; margin-bottom: 8px; }
.ex-spot { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .ex-spot > div { background: #F8FAFC; border-radius: 12px; padding: 8px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; font-size: 1.6rem; text-align: center; position: relative; padding-top: 22px; } .ex-spot small { position: absolute; left: 8px; top: 4px; font-weight: 900; color: var(--ex-muted); }
.ex-speak { text-align: center; }

/* kết quả */
.ex-result-main { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ex-score { font-family: var(--font-display); font-size: 3rem; font-weight: 900; color: var(--ex-navy); line-height: 1; } .ex-score small { font-size: 1.2rem; }
.ex-insight { margin-top: 10px; background: #F8FAFC; border-radius: 12px; padding: 8px 12px; font-size: 0.92rem; line-height: 1.5; } .ex-insight p { margin: 4px 0; }
.ex-review { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow-y: auto; }
.ex-review-item { border: 1px solid var(--ex-line); border-left: 5px solid #CBD5E1; border-radius: 10px; padding: 8px 10px; } .ex-review-item.ok { border-left-color: #16A34A; } .ex-review-item.bad { border-left-color: #DC2626; }
.ex-review-head { display: flex; justify-content: space-between; font-size: 0.78rem; font-weight: 900; color: var(--ex-muted); }
.ex-review-item .ex-visual, .ex-review-item .ex-grid, .ex-review-item .ex-clock { transform: scale(0.8); transform-origin: left top; }
.ex-prog { display: grid; grid-template-columns: 130px 1fr; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--ex-line); }
.ex-prog-name { font-weight: 900; }
.ex-spark { display: flex; align-items: flex-end; gap: 3px; height: 40px; } .ex-spark i { flex: 1; max-width: 18px; background: linear-gradient(180deg, #60A5FA, var(--ex-navy)); border-radius: 3px 3px 0 0; }
.ex-form { display: flex; gap: 8px; flex-wrap: wrap; } .ex-form .ex-input { flex: 1; min-width: 160px; }
.ex-input { border: 1.5px solid var(--ex-line); border-radius: 10px; padding: 10px 12px; font-family: var(--font-body); font-weight: 800; font-size: 0.95rem; min-height: 44px; }
.ex-tasks { display: flex; flex-direction: column; gap: 6px; } .ex-task { display: flex; align-items: center; gap: 8px; border: 1px solid var(--ex-line); border-radius: 10px; padding: 8px 10px; font-weight: 800; } .ex-task div { flex: 1; } .ex-task.done { background: #F0FDF4; }
.ex-daily-card { border-top: 4px solid var(--ec); }
.ex-cert { text-align: center; }
.ex-cert-border { border: 6px double var(--ex-navy); border-radius: 12px; padding: 24px 16px; background: linear-gradient(180deg, #FFFBEB, #fff); }
.ex-cert-title { font-family: Georgia, 'Times New Roman', serif; letter-spacing: 0.3em; font-size: 1.6rem; color: var(--ex-navy); font-weight: 900; }
.ex-cert-sub { font-size: 0.9rem; color: #334155; margin: 6px 0; line-height: 1.5; }
.ex-cert-name { font-family: Georgia, serif; font-size: 1.8rem; font-weight: 900; margin: 8px 0; }
.ex-cert-date { margin-top: 10px; font-size: 0.8rem; color: var(--ex-muted); }

/* banner trang chủ */
.ex-home-banner { display: flex; align-items: center; gap: 14px; background: linear-gradient(135deg, #1E3A8A, #1E40AF); color: #fff; border-radius: 22px; padding: 14px 16px; margin: 14px 0; cursor: pointer; box-shadow: 0 10px 24px rgba(30, 58, 138, 0.3); }
.ex-home-banner .ic { font-size: 2.4rem; } .ex-home-banner b { font-family: var(--font-display); font-size: 1.1rem; display: block; } .ex-home-banner small { opacity: 0.85; font-weight: 700; font-size: 0.82rem; }
.ex-home-banner .tag { margin-left: auto; background: #FBBF24; color: #1E293B; border-radius: 999px; padding: 6px 12px; font-weight: 900; font-size: 0.8rem; white-space: nowrap; }
@media (max-width: 480px) { .ex-opts, .ex-opts.wide, .ex-pairs, .ex-bins, .ex-spot { grid-template-columns: 1fr 1fr; } .ex-opts:not(.wide) { grid-template-columns: 1fr; } .ex-top-id { display: none; } .ex-prog { grid-template-columns: 1fr; } .ex-home-banner .tag { display: none; } }

/* ===== v98: bảng điều khiển phòng thi ===== */
.ex-hero { background: linear-gradient(135deg, #0F2A6B 0%, #1E40AF 60%, #2563EB 100%); color: #fff; border-radius: 20px; padding: 12px 14px 14px; margin-bottom: 12px; box-shadow: 0 12px 28px rgba(30, 58, 138, 0.35); }
.ex-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.ex-brand { font-family: var(--font-display); font-weight: 900; font-size: 0.78rem; letter-spacing: 0.14em; opacity: 0.9; text-align: center; flex: 1; }
.ex-hero-card { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); border-radius: 16px; padding: 10px 12px; }
.ex-hero-rank { width: 58px; height: 58px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 2rem; flex: none; box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.6); }
.ex-hero-info { flex: 1; min-width: 0; }
.ex-hero-name { font-family: var(--font-display); font-weight: 900; font-size: 1.2rem; }
.ex-hero-sub { font-size: 0.8rem; opacity: 0.9; font-weight: 700; }
.ex-hero-bar { height: 8px; background: rgba(255,255,255,0.25); border-radius: 999px; overflow: hidden; margin-top: 6px; } .ex-hero-bar span { display: block; height: 100%; background: #FBBF24; border-radius: 999px; }
.ex-hero-grade { text-align: center; } .ex-hero-grade label { display: block; font-size: 0.7rem; font-weight: 900; opacity: 0.85; margin-bottom: 3px; }
.ex-seg.light { border-color: rgba(255,255,255,0.6); } .ex-seg.light button { background: transparent; color: #fff; } .ex-seg.light button.active { background: #FBBF24; color: #1E293B; }
.ex-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.ex-kpi { background: rgba(255,255,255,0.12); border-radius: 12px; padding: 8px 4px; text-align: center; } .ex-kpi b { display: block; font-family: var(--font-display); font-size: 1.25rem; font-weight: 900; } .ex-kpi small { font-size: 0.68rem; font-weight: 800; opacity: 0.85; }
.ex-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ex-target2 { border-left: 5px solid #B45309; display: flex; flex-direction: column; gap: 6px; }
.ex-target2 .ex-btn { align-self: flex-start; margin-top: auto; }
.ex-countdown { font-size: 0.85rem; font-weight: 800; color: #334155; } .ex-countdown b { font-family: var(--font-display); font-size: 1.4rem; color: #B45309; }
.ex-today { border-left: 5px solid #1D4ED8; }
.ex-today-list { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.ex-today-item { display: flex; align-items: center; gap: 6px; border: 1px solid var(--ex-line); background: #fff; border-radius: 10px; padding: 7px 8px; text-align: left; font-family: var(--font-body); font-weight: 800; font-size: 0.8rem; color: var(--ex-ink); cursor: pointer; line-height: 1.25; }
.ex-today-item span { flex: none; } .ex-today-item.done { background: #F0FDF4; border-color: #BBF7D0; color: #166534; }
.ex-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 4px; }
.ex-exam-txt { flex: 1; min-width: 0; }
.ex-ring { --p: 0; width: 50px; height: 50px; border-radius: 50%; background: conic-gradient(var(--ec) calc(var(--p) * 1%), #E2E8F0 0); display: flex; align-items: center; justify-content: center; flex: none; }
.ex-ring span { width: 38px; height: 38px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 0.72rem; color: var(--ex-ink); }
.ex-exam-meta { display: flex; gap: 6px; flex-wrap: wrap; color: var(--ex-muted); }
.ex-exam-meta span { background: #F1F5F9; border-radius: 999px; padding: 3px 8px; font-size: 0.72rem; font-weight: 800; }
.ex-tools { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ex-tool { border: 1px solid var(--ex-line); background: #fff; border-radius: 14px; padding: 10px 6px; text-align: center; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; font-family: var(--font-body); }
.ex-tool-ic { width: 44px; height: 44px; border-radius: 12px; background: color-mix(in srgb, var(--tc) 12%, white); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.ex-tool b { font-size: 0.82rem; font-weight: 900; color: var(--ex-ink); } .ex-tool small { font-size: 0.68rem; font-weight: 700; color: var(--ex-muted); line-height: 1.2; }
@media (max-width: 560px) { .ex-row2 { grid-template-columns: 1fr; } .ex-tools { grid-template-columns: repeat(2, 1fr); } .ex-brand { font-size: 0.68rem; } }

/* ===== Trang chủ: menu nhanh + thẻ nổi bật Phòng Luyện Thi ===== */
.home-menu { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; margin: 4px 0 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.home-menu::-webkit-scrollbar { display: none; }
.home-menu button { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 72px; min-height: 64px; border: 2px solid #fff; background: #fff; border-radius: 16px; font-family: var(--font-body); font-weight: 800; font-size: 0.68rem; color: #334155; cursor: pointer; box-shadow: 0 4px 10px rgba(78, 93, 140, 0.1); padding: 6px 2px; line-height: 1.1; }
.home-menu button span { font-size: 1.5rem; line-height: 1; }
.home-menu button.hot { background: linear-gradient(135deg, #1E3A8A, #2563EB); color: #fff; border-color: #1E3A8A; }
.ex-home-hero { position: relative; overflow: hidden; background: linear-gradient(135deg, #0F2A6B, #1E40AF 55%, #3B82F6); color: #fff; border-radius: 26px; padding: 18px 18px 16px; margin: 0 0 14px; cursor: pointer; box-shadow: 0 14px 30px rgba(30, 58, 138, 0.35); }
.ex-home-hero::after { content: '🏅'; position: absolute; right: -10px; bottom: -22px; font-size: 7rem; opacity: 0.15; transform: rotate(-12deg); }
.ex-home-hero .eyebrow { font-size: 0.7rem; font-weight: 900; letter-spacing: 0.16em; opacity: 0.85; }
.ex-home-hero h2 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 900; margin: 4px 0 6px; }
.ex-home-hero p { font-size: 0.88rem; font-weight: 700; opacity: 0.92; line-height: 1.4; max-width: 520px; }
.ex-home-hero .pills { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 12px; }
.ex-home-hero .pills span { background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.3); border-radius: 999px; padding: 4px 10px; font-size: 0.74rem; font-weight: 800; }
.ex-home-hero .cta { display: flex; gap: 8px; flex-wrap: wrap; }
.ex-home-hero .cta button { border: none; border-radius: 12px; padding: 10px 16px; min-height: 44px; font-family: var(--font-display); font-weight: 900; cursor: pointer; }
.ex-home-hero .cta .main { background: #FBBF24; color: #1E293B; } .ex-home-hero .cta .alt { background: rgba(255,255,255,0.18); color: #fff; border: 1px solid rgba(255,255,255,0.4); }

/* Nút bố mẹ báo câu hỏi sai (v114) */
.ex-report { background: none; border: 0; padding: 0 2px; color: var(--ex-muted); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline dotted; }
.ex-report:hover { color: #DC2626; }

/* Chọn đề thi thử (v115): số câu, mức độ */
.ex-setup .ex-label { margin-top: 14px; }
.ex-setup-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.ex-setup-row.lv { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ex-setup-opt { border: 2px solid var(--ex-line, #E2E8F0); background: #fff; border-radius: 14px; padding: 10px 8px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; font: inherit; color: inherit; text-align: center; }
.ex-setup-opt b { font-size: 1.15rem; }
.ex-setup-opt small { font-size: .74rem; color: var(--ex-muted, #64748B); line-height: 1.3; }
.ex-setup-opt.active { border-color: var(--ec, #1D4ED8); background: color-mix(in srgb, var(--ec, #1D4ED8) 10%, #fff); box-shadow: 0 4px 12px -6px var(--ec, #1D4ED8); }
.ex-setup-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0 8px; text-align: center; }
.ex-setup-sum div { background: color-mix(in srgb, var(--ec, #1D4ED8) 8%, #fff); border-radius: 12px; padding: 8px; }
.ex-setup-sum b { display: block; font-size: 1.5rem; color: var(--ec, #1D4ED8); }
.ex-setup-sum small { font-size: .78rem; color: var(--ex-muted, #64748B); }
.ex-setup-secs { display: grid; gap: 6px; margin: 8px 0; }
.ex-setup-sec { display: flex; justify-content: space-between; gap: 10px; padding: 7px 10px; border-radius: 10px; background: #F8FAFC; font-size: .86rem; font-weight: 700; flex-wrap: wrap; }
.ex-setup-sec.think { background: #F5F3FF; color: #5B21B6; }
@media (max-width: 520px) { .ex-setup-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ex-setup-row.lv { grid-template-columns: 1fr; } .ex-setup-row.lv .ex-setup-opt { flex-direction: row; justify-content: space-between; text-align: left; gap: 10px; } .ex-setup-row.lv .ex-setup-opt b { white-space: nowrap; flex: none; } }

/* ===== TIMO song ngữ (v139): tiếng Anh như đề thật, tiếng Việt nhỏ bên dưới + sổ tay từ vựng ===== */
.ex-prompt .ex-en { display: block; }
.ex-prompt .ex-vi { display: block; margin-top: 6px; font-size: 0.86rem; font-weight: 700; color: #64748B; }
.ex-review .ex-vi, .ex-table .ex-vi { display: block; font-size: 0.8em; color: #64748B; }
.ex-vocab > summary { cursor: pointer; margin: 0; list-style: revert; }
.ex-vocab-topic { margin-top: 14px; }
.ex-vocab-topic > b { display: block; margin-bottom: 8px; color: var(--ex-navy, #1E3A8A); }
.ex-vocab-list { display: flex; flex-wrap: wrap; gap: 8px; }
.ex-vocab-w { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 12px; min-height: 44px; border: 1px solid #CBD5E1; border-radius: 12px; background: #fff; font: inherit; cursor: pointer; text-align: left; }
.ex-vocab-w span { font-weight: 800; color: #0E7490; }
.ex-vocab-w small { font-weight: 700; color: #475569; }
@media (hover: hover) { .ex-vocab-w:hover { border-color: #0E7490; } }
/* TIMO v140: nhóm hình theo quy luật + số có gạch trên (AB = số có hai chữ số) */
.ex-groups { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 12px; font-size: 1.2rem; line-height: 1.4; }
.ex-groups span { max-width: 100%; padding: 6px 10px; border: 1px dashed #94A3B8; border-radius: 10px; overflow-wrap: anywhere; color: #B45309; }
.ex-groups b { margin-right: 6px; font-size: .8rem; color: #64748B; }
.ex-ovl { text-decoration: overline; }


/* ===== css/home/home-menu.css ===== */
/* Sam Kido - Menu 6 nhóm trang chủ + viên kim cương (v99) */
/* --- Menu nhanh gọn: 6 nhóm + bảng chọn --- */
.home-menu { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; overflow: visible; padding: 2px 0 8px; }
.home-menu button { width: auto; min-height: 60px; font-size: 0.66rem; }
.home-menu button.open, .home-menu button.hot.open { border-color: #1273C4; background: #EEF6FF; color: #0F3D7A; }
.home-menu-pop { background: #fff; border: 2px solid #E2E8F0; border-radius: 18px; padding: 8px; margin: -2px 0 12px; box-shadow: 0 12px 26px rgba(78, 93, 140, 0.16); display: none; }
.home-menu-pop.show { display: block; animation: fadeIn 0.15s; }
.home-menu-pop .hm-title { font-weight: 900; color: #334155; font-size: 0.8rem; margin: 2px 6px 6px; text-transform: uppercase; letter-spacing: 0.06em; }
.home-menu-pop .hm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.home-menu-pop .hm-item { border: 1.5px solid #E2E8F0; background: #F8FAFC; border-radius: 12px; padding: 8px 4px; min-height: 60px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-family: var(--font-body); font-weight: 800; font-size: 0.72rem; color: #1E293B; cursor: pointer; line-height: 1.15; text-align: center; }
.home-menu-pop .hm-item span { font-size: 1.4rem; }
.home-menu-pop .hm-item.hot { background: #EEF6FF; border-color: #93C5FD; }
@media (max-width: 420px) { .home-menu button { font-size: 0.6rem; min-height: 56px; } .home-menu button span { font-size: 1.3rem; } }

/* --- Kim cương trên thanh đầu --- */
.diamond-pill { background: linear-gradient(135deg, #CFFAFE, #A5F3FC); color: #155E75; }


/* ===== css/home/hubs.css ===== */
/* Sam Kido - Trang chủ gọn (v127): 6 ô lớn + trang nhóm */
.home-legacy, #home-view > .age-other { display: none !important; }

.home-hubs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; max-width: 980px; margin: 18px auto 10px; }
.hub-tile { position: relative; border: 0; border-radius: 26px; background: linear-gradient(160deg, #fff 0%, #fff 45%, var(--hl) 100%); box-shadow: 0 6px 0 var(--hb), 0 10px 24px rgba(15, 23, 42, .08); border: 3px solid var(--hb); padding: 18px 14px 16px; cursor: pointer; font: inherit; color: #1E293B; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; transition: transform .12s, box-shadow .12s; min-height: 170px; }
.hub-tile:hover { transform: translateY(-3px); }
.hub-tile:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--hb); }
.hub-tile .ht-ic { font-size: 3.4rem; line-height: 1.1; }
.hub-tile b { font-size: 1.35rem; font-weight: 900; color: var(--hc); font-family: var(--font-display, inherit); }
.hub-tile small { font-size: .85rem; color: #64748B; font-weight: 700; line-height: 1.3; }
.hub-tile em { position: absolute; top: 10px; right: 12px; font-style: normal; font-size: .72rem; font-weight: 800; color: var(--hc); background: var(--hl); padding: 2px 8px; border-radius: 99px; }
.home-ph-links { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 4px auto 18px; }
.home-ph-links button { border: 1.5px solid #E2E8F0; background: #fff; border-radius: 99px; padding: 7px 14px; font: inherit; font-weight: 700; font-size: .88rem; color: #475569; cursor: pointer; }
.home-ph-links button:hover { background: #F8FAFC; }

/* trang nhóm */
.hub-wrap { max-width: 1000px; margin: 0 auto; }
.hub-sub { text-align: center; color: #64748B; font-weight: 700; margin: 0 0 14px; }
/* v141: xếp kiểu cột nối tiếp (masonry) - thẻ cao thấp khác nhau (số trò con khác nhau) không để lỗ trống, các cột dài gần bằng nhau */
.hub-grid { columns: 380px; column-gap: 12px; }
.hub-grid > .hub-card, .hub-sec .hub-card { break-inside: avoid; margin-bottom: 12px; }
/* khu theo môn / kỹ năng: cả khu (tiêu đề + thẻ) nằm trọn một cột */
.hub-sec { break-inside: avoid; padding-top: 2px; }
.hub-sec-t { display: flex; align-items: center; gap: 8px; margin: 4px 4px 8px; font-size: 1rem; font-weight: 900; color: var(--hc); }
.hub-sec-t::after { content: ''; flex: 1; height: 2px; border-radius: 2px; background: var(--hb); }
/* v141: thẻ = div chứa nút phòng (.hc-main) + hàng chip trò con (.hc-subs) */
.hub-card { position: relative; display: flex; flex-direction: column; border: 2.5px solid var(--hb); background: #fff; border-radius: 20px; cursor: pointer; color: #1E293B; transition: transform .12s, border-color .12s; }
.hub-card .hc-main { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; border: 0; background: transparent; padding: 14px; cursor: pointer; font: inherit; color: inherit; min-height: 92px; border-radius: 18px; }
.hub-card:hover { transform: translateY(-2px); border-color: var(--hc); }
.hub-card.hot { border-color: var(--hc); background: var(--hl); }
.hub-card .hc-ic { font-size: 2.6rem; flex: none; width: 64px; height: 64px; border-radius: 18px; display: flex; align-items: center; justify-content: center; background: var(--hl); }
.hub-card .hc-tx { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hub-card .hc-tx b { font-size: 1.08rem; font-weight: 900; }
.hub-card .hc-tx small { font-size: .82rem; color: #64748B; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hub-card .hc-age { position: absolute; top: 8px; right: 10px; font-size: .68rem; font-weight: 800; color: #64748B; background: #F1F5F9; padding: 2px 7px; border-radius: 99px; }
.hub-card.age-off { opacity: .78; }
.hub-other { margin-top: 18px; background: #F8FAFC; border: 1.5px dashed #CBD5E1; border-radius: 18px; padding: 10px 12px; }
.hub-other summary { cursor: pointer; font-weight: 800; color: #475569; }
.hub-other summary span { font-weight: 700; color: #64748B; font-size: .85rem; margin-left: 6px; }
.hub-other .hub-grid { margin-top: 10px; }
.hub-be-boxes { max-width: 1000px; margin: 0 auto 14px; display: grid; gap: 10px; }

@media (max-width: 640px) {
  .home-hubs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
  .hub-tile { min-height: 140px; padding: 14px 8px 12px; border-radius: 22px; }
  .hub-tile .ht-ic { font-size: 2.8rem; }
  .hub-tile b { font-size: 1.15rem; }
  .hub-tile small { font-size: .76rem; }
  .hub-tile em { top: 7px; right: 8px; font-size: .64rem; }
  .hub-grid { columns: 1; }
  .hub-grid > .hub-card, .hub-sec .hub-card { margin-bottom: 10px; }
  .hub-card .hc-main { min-height: 80px; padding: 10px 12px; }
  .hub-card .hc-ic { width: 54px; height: 54px; font-size: 2.2rem; }
}
.hub-be-boxes[hidden] { display: none; }

/* v141: trò con trên thẻ phòng - bấm chip vào thẳng trò */
.hc-subs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 0 12px 12px; }
.hc-sub { display: flex; align-items: center; gap: 5px; min-height: 38px; min-width: 0; line-height: 1.2; border: 1.5px solid var(--hb); background: var(--hl); color: #1E293B; border-radius: 99px; padding: 5px 12px 5px 9px; font: inherit; font-size: .84rem; font-weight: 800; cursor: pointer; text-align: left; }
.hc-sub span { flex: none; font-size: 1.05rem; }
.hc-sub:hover { border-color: var(--hc); background: #fff; }
.hc-sub.age-off { opacity: .62; }

/* v141: ô Tìm nhanh + kết quả */
.home-find { max-width: 980px; margin: 14px auto 0; }
.hf-box { display: flex; align-items: center; gap: 8px; background: #fff; border: 2.5px solid #C7D2FE; border-radius: 99px; padding: 3px 6px 3px 16px; box-shadow: 0 4px 0 #E0E7FF; }
.hf-box:focus-within { border-color: #6366F1; }
.hf-lens { font-size: 1.25rem; }
#home-find-q { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 16px; font-weight: 700; color: #1E293B; padding: 11px 0; }
#home-find-q::-webkit-search-cancel-button { display: none; }
.hf-clear { flex: none; width: 38px; height: 38px; border: 0; border-radius: 99px; background: #F1F5F9; color: #475569; font: inherit; font-weight: 900; cursor: pointer; }
.hf-clear[hidden], .hf-res[hidden] { display: none; }
.hf-res { margin-top: 10px; background: #fff; border: 2px solid #E2E8F0; border-radius: 20px; padding: 10px; box-shadow: 0 10px 24px rgba(15, 23, 42, .08); }
.hf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.hf-sub { font-weight: 900; color: #475569; margin: 12px 4px 6px; }
.hf-none { margin: 4px 6px; color: #475569; font-weight: 700; line-height: 1.5; }
.hf-item { display: flex; align-items: center; gap: 10px; min-width: 0; text-align: left; border: 2px solid var(--hb); background: #fff; border-radius: 16px; padding: 8px 10px; font: inherit; color: #1E293B; cursor: pointer; min-height: 58px; }
.hf-item:hover { border-color: var(--hc); }
.hf-ic { flex: none; width: 42px; height: 42px; border-radius: 12px; background: var(--hl); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; }
.hf-tx { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.hf-tx b { font-size: .92rem; font-weight: 900; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hf-tx small { font-size: .74rem; font-weight: 800; color: #64748B; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

#home-view > #sgk-box { max-width: 980px; margin: 14px auto 0; }
@media (max-width: 640px) {
  .hf-grid { grid-template-columns: 1fr; gap: 6px; }
  .hf-item { min-height: 52px; }
  .hc-subs { padding: 0 10px 10px; }
  .hc-sub { font-size: .8rem; min-height: 36px; }
}


/* ===== css/rooms/sgk.css ===== */
/* Sam Kido - Học theo SGK: thẻ trang chủ + phòng SGK (v99) */
/* --- Thẻ SGK trang chủ --- */
.sgk-home { display: flex; align-items: center; gap: 12px; background: #fff; border: 3px solid #FDBA74; border-radius: 22px; padding: 12px 14px; margin-bottom: 14px; box-shadow: var(--card-shadow); cursor: pointer; }
.sgk-home .ic { font-size: 2.4rem; }
.sgk-home b { font-family: var(--font-display); font-size: 1.05rem; color: #1E293B; display: block; }
.sgk-home small { color: #64748B; font-weight: 700; font-size: 0.82rem; }
.sgk-home .sgk-week { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.sgk-home .sgk-week span { font-size: 0.72rem; font-weight: 800; background: #FFF7ED; color: #9A3412; border-radius: 999px; padding: 2px 8px; }
.sgk-home .sgk-week span.done { background: #DCFCE7; color: #166534; }

/* --- Phòng SGK (dùng nền ex-*) --- */
#sgk-view .view-top-header { display: none; }
.sg-subjects { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.sg-subjects::-webkit-scrollbar { display: none; }
.sg-subject { flex: none; border: 1.5px solid var(--ex-line, #E2E8F0); background: #fff; border-radius: 999px; padding: 8px 14px; min-height: 42px; font-family: var(--font-body); font-weight: 900; color: #334155; cursor: pointer; }
.sg-subject.active { background: var(--sc); color: #fff; border-color: var(--sc); }
.sg-topic { background: #fff; border: 1px solid #E2E8F0; border-left: 5px solid var(--sc); border-radius: 14px; margin-bottom: 8px; overflow: hidden; }
.sg-topic-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; }
.sg-topic-ic { font-size: 1.5rem; }
.sg-topic-title { flex: 1; font-weight: 900; color: #0F172A; }
.sg-topic-prog { font-size: 0.76rem; font-weight: 800; color: #64748B; }
.sg-topic-prog b { color: var(--sc); }
.sg-lessons { display: none; border-top: 1px dashed #E2E8F0; padding: 6px 8px 10px; }
.sg-topic.open .sg-lessons { display: block; }
.sg-lesson { display: flex; align-items: center; gap: 8px; padding: 8px 6px; border-bottom: 1px solid #F1F5F9; }
.sg-lesson:last-child { border-bottom: none; }
.sg-lesson-st { width: 30px; height: 30px; border-radius: 50%; background: #F1F5F9; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 900; color: #64748B; flex: none; }
.sg-lesson.done .sg-lesson-st { background: #DCFCE7; color: #166534; } .sg-lesson.good .sg-lesson-st { background: #FEF3C7; color: #92400E; } .sg-lesson.weak .sg-lesson-st { background: #FEE2E2; color: #991B1B; }
.sg-lesson-title { flex: 1; font-weight: 800; color: #1E293B; font-size: 0.92rem; }
.sg-lesson-sub { font-size: 0.72rem; color: #64748B; font-weight: 700; }
.sg-steps { display: flex; gap: 4px; margin-bottom: 10px; }
.sg-step { flex: 1; text-align: center; font-size: 0.72rem; font-weight: 900; color: #64748B; padding: 6px 2px; border-radius: 10px; background: #F1F5F9; }
.sg-step.cur { background: var(--sc); color: #fff; } .sg-step.done { background: #DCFCE7; color: #166534; }
.sg-slide { background: #fff; border: 1px solid #E2E8F0; border-radius: 16px; padding: 16px; min-height: 220px; }
.sg-slide-visual { font-size: 2.2rem; line-height: 1.4; text-align: center; background: #F8FAFC; border-radius: 12px; padding: 12px; margin-bottom: 10px; word-break: break-word; }
.sg-slide-text { font-size: 1.05rem; line-height: 1.6; color: #0F172A; font-weight: 700; }
.sg-slide-text strong { color: var(--sc); }
.sg-dots { display: flex; gap: 5px; justify-content: center; margin: 8px 0; }
.sg-dots i { width: 8px; height: 8px; border-radius: 50%; background: #CBD5E1; } .sg-dots i.cur { background: var(--sc); width: 20px; border-radius: 999px; }
.sg-eval { text-align: center; }
.sg-eval .big { font-size: 3.5rem; }
.sg-grade { font-family: var(--font-display); font-size: 1.6rem; font-weight: 900; }
.sg-grade.good { color: #16A34A; } .sg-grade.ok { color: #B45309; } .sg-grade.bad { color: #DC2626; }
.sg-plan { display: flex; flex-direction: column; gap: 6px; }
.sg-plan-item { display: flex; align-items: center; gap: 8px; border: 1px solid #E2E8F0; border-radius: 12px; padding: 8px 10px; background: #fff; }
.sg-plan-item.done { background: #F0FDF4; border-color: #BBF7D0; }
.sg-plan-item div { flex: 1; font-weight: 800; color: #1E293B; font-size: 0.9rem; }
.sg-plan-item small { display: block; color: #64748B; font-weight: 700; font-size: 0.74rem; }
/* Phòng SGK dùng chung kiểu ex-* nên cần cùng bộ biến màu; màu nhấn theo môn (--sc) thay cho navy */
#sgk-view { --ex-navy: #1E3A8A; --ex-navy-2: #1E40AF; --ex-ink: #0F172A; --ex-muted: #64748B; --ex-line: #E2E8F0; --ex-gold: #B45309; --ex-bg: #F8FAFC; }
#sgk-arena { font-family: var(--font-body); color: var(--ex-ink); }
#sgk-view .ex-btn.primary { background: var(--sc, var(--ex-navy)); }
#sgk-view .ex-seg button.active { background: var(--sc, var(--ex-navy)); }
#sgk-view .ex-top-exam { background: var(--ex-navy); }
.sgk-home .jn-go { width: auto; }


/* ===== css/rooms/gifts.css ===== */
/* Sam Kido - Đổi quà kim cương (v99) */
/* --- Đổi quà --- */
.gf-balance { display: flex; align-items: center; gap: 10px; background: linear-gradient(135deg, #ECFEFF, #fff); border: 2px solid #A5F3FC; border-radius: 18px; padding: 12px 14px; margin-bottom: 12px; }
.gf-balance b { font-family: var(--font-display); font-size: 1.8rem; color: #155E75; }
.gf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.gf-item { border: 3px solid #E2E8F0; border-radius: 18px; background: #fff; padding: 10px; text-align: center; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.gf-item .gf-ic { font-size: 2.4rem; }
.gf-item .gf-nm { font-weight: 900; color: #1E293B; font-size: 0.88rem; }
.gf-item .gf-pr { font-weight: 900; color: #155E75; }
.gf-item.owned { border-color: #86EFAC; background: #F0FDF4; }
.gf-item.real { border-color: #FDBA74; background: #FFFBEB; }
.gf-item button { margin-top: auto; }
.gf-history { font-size: 0.85rem; color: #334155; font-weight: 700; }
.frame-gold .profile-avatar-wrapper, .profile-avatar-wrapper.frame-gold { box-shadow: 0 0 0 4px #F59E0B, 0 0 18px #FBBF24; }
.profile-avatar-wrapper.frame-rainbow { box-shadow: 0 0 0 4px transparent; background: conic-gradient(#f87171, #fbbf24, #4ade80, #60a5fa, #a78bfa, #f87171); padding: 3px; border-radius: 50%; }
.profile-avatar-wrapper.frame-diamond { box-shadow: 0 0 0 4px #22D3EE, 0 0 18px #67E8F9; }
.profile-avatar-wrapper.frame-fire { box-shadow: 0 0 0 4px #EF4444, 0 0 22px #F97316; }


/* ===== css/rooms/exam-slots.css ===== */
/* Sam Kido - Ca thi chung 3 ca/ngày & mùa giải (v99) */
/* --- Ca thi chung (3 ca/ngày) & mùa giải --- */
.ex-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0; }
.ex-slot { border: 1.5px solid #E2E8F0; border-radius: 12px; padding: 8px 6px; text-align: center; background: #F8FAFC; }
.ex-slot b { display: block; font-size: 0.78rem; color: #0F172A; }
.ex-slot small { display: block; font-size: 0.7rem; color: #64748B; font-weight: 700; margin-top: 2px; }
.ex-slot.cur { border-color: #2563EB; background: #EFF6FF; box-shadow: 0 0 0 2px #BFDBFE; }
.ex-slot.done { border-color: #86EFAC; background: #F0FDF4; }
.ex-slot.past { opacity: 0.7; }
.ex-season { border-top: 4px solid #F59E0B; }
@media (max-width: 420px) { .ex-slot b { font-size: 0.7rem; } }


/* ===== css/rooms/learn.css ===== */
/* Sam Kido - Lộ trình học (v108): câu hỏi lớp 4-5, gợi ý, chẩn đoán lỗi, kế hoạch tuần, sổ lỗi, bảng theo dõi phụ huynh */

/* ---------- Câu hỏi: phân số, hỗn số, bài đọc, câu "Vì sao?", thử thách ---------- */
.sk-frac { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; line-height: 1.1; margin: 0 3px; font-weight: 900; }
.sk-frac b { padding: 0 4px; border-bottom: 2px solid currentColor; }
.sk-frac i { font-style: normal; padding: 0 4px; }
.sk-mixed { display: inline-flex; align-items: center; gap: 1px; }
.sk-int { font-weight: 900; }
.sk-svg { display: block; margin: 6px auto; max-width: 100%; height: auto; }
.sk-passage { background: #FFFBEB; border: 1.5px solid #FDE68A; border-radius: 14px; padding: 12px 14px; text-align: left; font-size: 0.95rem; line-height: 1.6; max-height: 260px; overflow-y: auto; }
.sk-passage b { display: block; color: #92400E; margin-bottom: 4px; }
.sk-passage p { margin: 0; }
.sk-blank { display: inline-block; min-width: 44px; border-bottom: 2px solid #94A3B8; text-align: center; }
.sk-why-ans { margin-top: 8px; padding: 6px 10px; background: #EFF6FF; border-radius: 10px; display: inline-block; }
.sk-why-q { margin-top: 8px; font-weight: 900; color: #6D28D9; }
.ex-opts .ex-opt { white-space: normal; }
.sk-challenge-tag { display: inline-block; background: linear-gradient(135deg, #F59E0B, #EF4444); color: #fff; border-radius: 999px; padding: 2px 10px; font-size: 0.78rem; font-weight: 900; margin-right: 6px; vertical-align: middle; }

/* ---------- Gợi ý & chẩn đoán lỗi ---------- */
.sk-hintbar { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 6px 0; }
.sk-hints { width: 100%; display: grid; gap: 6px; }
.sk-hint { background: #FEF9C3; border: 1.5px solid #FDE047; border-radius: 12px; padding: 8px 12px; font-weight: 700; color: #713F12; text-align: left; animation: fadeIn 0.2s; }
.sk-diag { margin-top: 8px; background: #FFF1F2; border: 1.5px solid #FECDD3; border-radius: 12px; padding: 8px 12px; text-align: left; color: #881337; font-weight: 600; display: grid; gap: 3px; }
.sk-diag.small { font-size: 0.85rem; padding: 6px 10px; }

/* ---------- Phòng SGK ---------- */
.sg-headrow { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.sg-tools { margin-top: 6px; }
.sg-badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: #EF4444; color: #fff; font-size: 0.75rem; line-height: 20px; text-align: center; }
.sg-sems button { white-space: nowrap; }
.sg-objectives { font-size: 0.85rem; color: #475569; font-weight: 700; background: #F8FAFC; border-radius: 10px; padding: 8px 10px; margin-bottom: 6px; }
.sg-diff { color: var(--sc, #F97316); letter-spacing: 1px; font-size: 0.8rem; }
.sg-mastered { color: #15803D; font-weight: 800; }
.sg-lesson-meta { font-size: 0.85rem; color: #475569; font-weight: 700; text-align: center; margin: 4px 0 8px; }
.sg-next-reason { background: #EFF6FF; border-radius: 12px; padding: 8px 12px; font-weight: 800; color: #1E3A8A; margin: 6px 0; }
.sg-skill-row { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px dashed #E2E8F0; font-weight: 700; }
.sg-h4 { margin: 12px 0 4px; font-family: var(--font-display); }
.sg-parent summary { cursor: pointer; font-weight: 900; }
.sg-parent p { margin: 8px 0 0; }
/* Kế hoạch */
.sg-plancard { border: 2px solid #BFDBFE; }
.sg-plan-item small { display: block; }
.sg-week { display: grid; gap: 8px; margin-top: 10px; }
.sg-week-day { border: 1.5px solid #E2E8F0; border-radius: 14px; padding: 8px; background: #fff; }
.sg-week-day.today { border-color: #3B82F6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12); }
.sg-week-h { display: flex; justify-content: space-between; font-size: 0.85rem; color: #475569; margin-bottom: 4px; }
/* Sổ lỗi */
.sg-err { border-left: 5px solid var(--sc, #EF4444); }
.sg-err.fixed { opacity: 0.75; border-left-color: #22C55E; }
.sg-err-h { display: flex; justify-content: space-between; gap: 8px; font-weight: 800; font-size: 0.85rem; color: #475569; flex-wrap: wrap; }
.sg-err-q { margin: 8px 0; font-weight: 700; }
.sg-err-q .sk-passage { max-height: 120px; font-size: 0.85rem; }
.sg-err-ans { display: flex; flex-wrap: wrap; gap: 6px 14px; font-weight: 800; font-size: 0.9rem; }
.sg-err-ans .bad { color: #B91C1C; }
.sg-err-ans .ok { color: #15803D; }

/* ---------- Bảng theo dõi phụ huynh ---------- */
.ld { display: grid; gap: 12px; color: #1E293B; }
.ld-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.ld-title { font-family: var(--font-display); font-weight: 900; font-size: 1.15rem; }
.ld-sub { font-size: 0.8rem; color: #64748B; font-weight: 700; }
.ld-kpis { display: flex; gap: 8px; flex-wrap: wrap; }
.ld-kpi { background: #F8FAFC; border: 1.5px solid #E2E8F0; border-radius: 12px; padding: 6px 10px; text-align: center; min-width: 84px; }
.ld-kpi b { display: block; font-size: 1.05rem; }
.ld-kpi span { font-size: 0.72rem; color: #64748B; font-weight: 700; }
.ld-card { background: #fff; border: 1.5px solid #E2E8F0; border-radius: 16px; padding: 12px 14px; }
.ld-card h4 { margin: 0 0 8px; font-family: var(--font-display); font-size: 1rem; }
.ld-card h4 small { font-weight: 700; color: #64748B; font-size: 0.75rem; margin-left: 6px; }
.ld-note { font-size: 0.82rem; color: #475569; margin: 0 0 8px; }
.ld-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ld-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ld-center { text-align: center; }
.ld-bar { height: 8px; background: #F1F5F9; border-radius: 999px; overflow: hidden; margin: 4px 0; }
.ld-bar span { display: block; height: 100%; border-radius: 999px; }
.ld-row { margin-bottom: 8px; }
.ld-row-h { display: flex; justify-content: space-between; gap: 8px; font-weight: 800; font-size: 0.88rem; flex-wrap: wrap; }
.ld-row small, .ld-card > small { color: #64748B; font-weight: 700; font-size: 0.75rem; }
.ld-comps { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.ld-comp { background: #FAF5FF; border-radius: 12px; padding: 8px 10px; }
.ld-comp-h { display: flex; justify-content: space-between; font-weight: 800; font-size: 0.85rem; }
.ld-comp small { display: block; color: #6B7280; font-size: 0.72rem; line-height: 1.35; }
.ld-skill { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 5px 0; border-bottom: 1px dashed #E2E8F0; font-weight: 700; font-size: 0.88rem; }
.ld-chip { background: color-mix(in srgb, var(--lc) 15%, white); color: var(--lc); border-radius: 999px; padding: 1px 8px; font-size: 0.72rem; font-weight: 800; white-space: nowrap; }
.ld-radar { width: 100%; max-width: 380px; height: auto; }
.ld-line { width: 100%; height: auto; }
.ld-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; align-items: end; height: 120px; margin-bottom: 6px; }
.ld-day { display: flex; flex-direction: column; align-items: center; gap: 2px; height: 100%; justify-content: flex-end; font-size: 0.75rem; }
.ld-day-bar { width: 70%; height: 80px; background: #F1F5F9; border-radius: 6px; display: flex; align-items: flex-end; overflow: hidden; }
.ld-day-bar span { width: 100%; background: linear-gradient(180deg, #60A5FA, #2563EB); border-radius: 6px; }
.ld-err { border-bottom: 1px dashed #E2E8F0; padding: 6px 0; font-size: 0.85rem; }
.ld-count { background: #FEE2E2; color: #B91C1C; border-radius: 999px; padding: 0 6px; font-weight: 900; font-size: 0.75rem; }
.ld-assess { font-size: 0.8rem; font-weight: 700; color: #334155; display: grid; gap: 2px; }
.ld-next ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.ld-empty { color: #94A3B8; font-weight: 700; font-size: 0.85rem; padding: 10px 0; }
.ld-set { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.ld-set label { font-weight: 800; min-width: 110px; }
@media (max-width: 720px) {
  .ld-grid, .ld-grid3 { grid-template-columns: 1fr; }
  .ld-kpi { min-width: 0; flex: 1; }
}
.sg-sems { gap: 0; }
.sg-sems button { padding: 6px 12px; font-size: 0.82rem; }
#sgk-view .ex-seg { flex-wrap: wrap; }
#sgk-view .ex-seg button { padding: 6px 12px; }

/* ===== 4 cấp độ mỗi bài (v113) - js/rooms/sgk-levels.js ===== */
.sg-ref { font-weight: 800; color: #4338CA; }
.sg-pips { display: inline-flex; gap: 2px; vertical-align: middle; }
.sg-pips i { font-style: normal; font-size: .78rem; filter: grayscale(1); opacity: .35; }
.sg-pips i.try { filter: grayscale(.4); opacity: .7; }
.sg-pips i.on { filter: none; opacity: 1; }
.sg-lv-head { text-align: center; }
.sg-lv-video { margin-top: 8px; font-weight: 800; }
.sg-lv-ref { display: inline-block; font-weight: 800; font-size: .85rem; color: #3730A3; background: #EEF2FF; border: 1px solid #C7D2FE; padding: 4px 12px; border-radius: 999px; margin-bottom: 6px; }
.sg-lv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
.sg-lv { position: relative; display: flex; align-items: center; gap: 12px; text-align: left; padding: 16px; border-radius: 18px; border: 2px solid #E2E8F0; background: #fff; cursor: pointer; font: inherit; color: #1E293B; transition: transform .15s, box-shadow .15s; }
@media (hover: hover) { .sg-lv:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(15, 23, 42, .1); } }
.sg-lv-ic { font-size: 2rem; line-height: 1; }
.sg-lv-t { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sg-lv-t b { font-size: 1rem; }
.sg-lv-t small { color: #475569; font-weight: 600; font-size: .82rem; line-height: 1.3; }
.sg-lv-st { font-weight: 800; font-size: .85rem; color: #334155; background: #F1F5F9; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.sg-lv.lv1 { border-color: #FCD34D; background: #FFFBEB; }
.sg-lv.lv2 { border-color: #93C5FD; background: #EFF6FF; }
.sg-lv.lv3 { border-color: #C4B5FD; background: #F5F3FF; }
.sg-lv.lv4 { border-color: #F9A8D4; background: #FDF2F8; }
.sg-lv.sug { box-shadow: 0 0 0 3px var(--sc, #6366F1); }
.sg-lv-badge { position: absolute; top: -9px; right: 12px; background: var(--sc, #6366F1); color: #fff; font-size: .72rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; }
.sg-lv-note { text-align: center; }
@media (max-width: 600px) {
  .sg-lv-grid { grid-template-columns: 1fr; gap: 10px; }
  .sg-lv { padding: 12px 14px; }
  .sg-lv-ic { font-size: 1.7rem; }
}
/* Đánh giá 2 tầng (báo cáo phụ huynh) */
.ld-tier-days { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 330px; margin: 0 0 12px; }
.ld-tier { border-radius: 14px; padding: 12px; }
.ld-tier.b { background: #F0FDF4; border: 1px solid #BBF7D0; }
.ld-tier.a { background: #F5F3FF; border: 1px solid #DDD6FE; }
.ld-tier-h { font-weight: 800; margin-bottom: 8px; }
.ld-tier-h small { display: block; font-weight: 600; color: #475569; font-size: .8rem; }
.ld-tier-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.ld-tier-chip { font-size: .8rem; background: #fff; border: 1px solid #DDD6FE; border-radius: 999px; padding: 3px 9px; color: #334155; }


/* ===== css/base/overrides.css ===== */
/* Sam Kido - Sửa giao diện chung, nạp CUỐI CÙNG (header gọn, thanh cuộn, điện thoại, cửa sổ) v102-v107 */
/* ===== Header gọn (v102): thống kê gộp 1 viên, nút cùng kiểu, nhạc/âm thành nút tròn ===== */
.top-navbar { gap: 14px; }
.top-navbar .user-stats-bar { gap: 0; background: #fff; border: 1.5px solid #E2E8F0; border-radius: 999px; padding: 3px; box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05); }
.top-navbar .user-stats-bar .stat-pill { background: transparent; border: none; box-shadow: none; border-radius: 999px; padding: 6px 12px; font-size: 0.95rem; gap: 6px; color: #334155; }
.top-navbar .user-stats-bar .stat-pill + .stat-pill { border-left: 1.5px solid #EEF2F7; border-radius: 0; }
.top-navbar .user-stats-bar .star-pill { color: #B7791F; }
.top-navbar .user-stats-bar .diamond-pill { color: #0E7490; cursor: pointer; }
.top-navbar .user-stats-bar .rank-pill { color: #1E40AF; font-size: 0.85rem; }
.top-navbar .user-stats-bar .mobile-sound-toggle-btn { margin-left: 4px; }
.header-actions { display: flex; align-items: center; gap: 6px; }
.header-actions .header-btn { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid #E2E8F0; background: #fff; color: #334155; font-size: 0.88rem; font-weight: 800; box-shadow: none; }
@media (hover: hover) { .header-actions .header-btn:hover { border-color: #93C5FD; background: #F8FBFF; transform: none; } }
.header-actions .header-btn.btn-open-speed-challenge { background: linear-gradient(135deg, #FF4757, #FF6B81); color: #fff; border-color: transparent; }
.header-actions .header-sep { width: 1.5px; height: 24px; background: #E2E8F0; margin: 0 2px; }
.header-actions .header-btn.header-icon { width: 40px; padding: 0; justify-content: center; font-size: 1.05rem; }
.header-actions .header-btn.header-icon.active { background: #F0FDF4; border-color: #86EFAC; }
.header-actions .header-btn.header-icon.is-off { background: #F8FAFC; opacity: 0.6; position: relative; }
.header-actions .header-btn.header-icon.is-off::after { content: ''; position: absolute; left: 9px; right: 9px; top: 50%; height: 2px; background: #EF4444; transform: rotate(-35deg); border-radius: 2px; }
/* Menu 6 nhóm: tất cả cùng kiểu, chỉ nhóm đang mở được tô */
.home-menu button { font-size: 0.74rem; gap: 4px; border: 1.5px solid #EEF2F7; box-shadow: 0 2px 8px rgba(78, 93, 140, 0.06); }
.home-menu button span { font-size: 1.45rem; }
@media (hover: hover) { .home-menu button:hover { border-color: #BFDBFE; } }
.home-menu button.open { border-color: #3B82F6; background: #EFF6FF; color: #1E3A8A; box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15); }
@media (max-width: 420px) { .home-menu button { font-size: 0.64rem; } }
/* Màn hình vừa: nút header chỉ còn biểu tượng (có tên khi rê chuột) để header nằm gọn 1 hàng
   (v128: tới 1499px - iPad Pro nằm ngang 1366px từng bị tràn nút loa ra ngoài) */
@media (min-width: 1025px) and (max-width: 1499px) {
  .top-navbar { flex-wrap: nowrap; padding: 10px 16px; }
  .header-actions .header-btn { width: 40px; padding: 0; justify-content: center; font-size: 1.05rem; }
  .header-actions .header-btn .hb-label { display: none; }
}
.header-actions .header-btn { white-space: nowrap; }
/* Chỉ 1 nút loa: nút loa tròn ở header (luôn đồng bộ) - bỏ nút loa riêng của điện thoại */
.top-navbar .mobile-sound-toggle-btn { display: none !important; }
@media (max-width: 1024px) { .header-actions .header-sep { display: none; } }
/* Máy cảm ứng (iPad...) màn rộng: luôn chỉ biểu tượng, không bao giờ tràn */
@media (min-width: 1025px) and (hover: none) and (pointer: coarse) {
  .top-navbar { flex-wrap: nowrap; }
  .header-actions .header-btn { width: 40px; padding: 0; justify-content: center; font-size: 1.05rem; }
  .header-actions .header-btn .hb-label { display: none; }
}
/* v128: chống trang bị kéo ngang / thu phóng trên iPad, điện thoại */
html { overflow-x: hidden; }
.top-navbar { max-width: 100vw; }
.header-actions { min-width: 0; }
/* iOS tự phóng to khi bấm vào ô nhập chữ nhỏ hơn 16px */
@media (hover: none) and (pointer: coarse) { input, select, textarea { font-size: max(16px, 1em) !important; } }

/* ===== Thanh cuộn mềm mại (v104): mảnh, bo tròn, không mũi tên, không chạm góc bo của khung ===== */
/* Chrome/Edge/Safari: chỉ dùng ::-webkit-scrollbar (đặt scrollbar-width sẽ làm Chrome bỏ qua kiểu này) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background-color: rgba(100, 116, 139, 0.32); border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; min-height: 40px; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(100, 116, 139, 0.55); }
/* Thanh cuộn bên trong khung bo góc: lùi vào để không chọc ra góc */
body *::-webkit-scrollbar-track { margin: 16px; }
/* Firefox */
@supports (-moz-appearance: none) { * { scrollbar-width: thin; scrollbar-color: rgba(100, 116, 139, 0.4) transparent; } }
/* Các vùng cuộn cũ đặt scrollbar-width: thin -> trên Chrome trả về auto để dùng chung kiểu mềm ở trên */
@supports not (-moz-appearance: none) { .writing-char-scroll, .stepping-stones-track, .game-tabs-nav, .jn-strip { scrollbar-width: auto; } }

/* ===== Header điện thoại 1 hàng (v105): logo · hồ sơ · sao/kim cương · nhạc/âm ===== */
@media (max-width: 768px) {
  .top-navbar { flex-wrap: nowrap !important; gap: 6px; padding-left: 10px; padding-right: 10px; row-gap: 0; }
  .top-navbar .brand-title { display: none; }
  .top-navbar .logo-badge { font-size: 1.7rem; }
  .top-navbar .user-profile-badge { flex: 0 1 auto; min-width: 0; padding: 3px 10px 3px 3px; gap: 6px; }
  .top-navbar .profile-avatar-wrapper { width: 32px; height: 32px; }
  .top-navbar .profile-edit-btn { display: none; } /* bấm cả khối hồ sơ là sửa được */
  .top-navbar .profile-name { max-width: 72px; }
  /* tên bé dài / sao 3–4 chữ số: tên tự rút gọn "Bé Sa…" chứ không đè lên ô sao (v137) */
  .top-navbar .user-profile-badge, .top-navbar .profile-meta { overflow: hidden; }
  .top-navbar .profile-meta { min-width: 0; }
  .top-navbar .profile-name { display: block; overflow: hidden; text-overflow: ellipsis; }
  .top-navbar .user-stats-bar { flex: none; padding: 2px; margin-left: auto; }
  .top-navbar .user-stats-bar .stat-pill { padding: 4px 8px; font-size: 0.82rem; gap: 4px; }
  .header-actions { flex: none; gap: 4px; }
  .header-actions .header-btn.header-icon { width: 34px; height: 34px; min-height: 34px; font-size: 0.95rem; }
}
/* máy hẹp (≤ 380px): chỉ hiện ảnh đại diện, không hiện tên -> không bị ô sao đè (v137) */
@media (max-width: 380px) {
  .top-navbar { gap: 4px; padding-left: 6px; padding-right: 6px; }
  .top-navbar .logo-badge { font-size: 1.4rem; }
  .top-navbar .profile-meta { display: none; }
  .top-navbar .user-profile-badge { flex: none; padding: 3px; }
  .top-navbar .user-stats-bar .stat-pill { padding: 4px 6px; font-size: 0.78rem; gap: 3px; }
  .header-actions { gap: 3px; }
  .header-actions .header-btn.header-icon { width: 30px; height: 30px; min-height: 30px; font-size: 0.85rem; }
}
/* máy rất hẹp (≤ 340px): bỏ nút 🌐 trang giới thiệu (bố mẹ vẫn vào samkido.com được) cho đủ chỗ */
@media (max-width: 340px) {
  .top-navbar #btn-go-landing { display: none; }
}
@media (max-width: 359px) {
  .top-navbar .profile-name { max-width: 48px; }
  .top-navbar .user-stats-bar .stat-pill { padding: 4px 6px; }
}

/* ===== Thẻ trang chủ gọn (v105) ===== */
.sgk-home { display: block; padding: 14px 16px; }
.sgk-home .sgk-top { display: flex; align-items: center; gap: 12px; }
.sgk-home .sgk-top .ic { font-size: 2.1rem; line-height: 1; flex: none; }
.sgk-home .sgk-txt { flex: 1; min-width: 0; }
.sgk-home .sgk-txt b { font-size: 1.05rem; line-height: 1.25; }
.sgk-home .sgk-txt small { display: block; margin-top: 2px; }
.sgk-home .jn-go { flex: none; min-height: 42px; padding: 0 18px; font-size: 0.95rem; }
.sgk-home .sgk-week { margin-top: 10px; gap: 6px; }
.sgk-home .sgk-week span { font-size: 0.76rem; padding: 4px 10px; }
.ex-home-hero .cta { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 8px; }
.ex-home-hero .cta button { white-space: nowrap; font-size: 0.95rem; }
@media (max-width: 560px) {
  .ex-home-hero { padding: 16px 16px 14px; }
  .ex-home-hero h2 { font-size: 1.35rem; }
  .ex-home-hero p { font-size: 0.84rem; }
  .ex-home-hero .cta { grid-template-columns: 1fr 1fr; }
  .ex-home-hero .cta button { padding: 10px 8px; font-size: 0.9rem; text-align: center; }
  .sgk-home .jn-go { padding: 0 14px; min-height: 40px; }
  .sgk-home .sgk-txt b { font-size: 0.98rem; }
}

/* ===== Cửa sổ Nhiệm vụ trên điện thoại (v105) ===== */
@media (max-width: 560px) {
  .quest-chest-box { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; padding: 12px 14px; }
  .quest-chest-box .chest-icon { font-size: 2.2rem; }
  .quest-chest-box .btn-claim-chest { grid-column: 1 / -1; width: 100%; }
}
/* Mọi cửa sổ: không cao quá màn hình, dài thì cuộn bên trong (trước đây cửa sổ Nhiệm vụ bị cắt mất đầu/cuối trên điện thoại) */
.modal-backdrop > .modal-card { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain; }
.modal-card .modal-header-badge { max-width: calc(100% - 44px); }
.acc-empty { text-align: center; padding: 26px 18px; }
.acc-empty .acc-empty-ic { font-size: 2.6rem; line-height: 1; }
.acc-empty h3 { font-family: var(--font-display); color: #1E293B; margin: 8px 0 4px; font-size: 1.15rem; }
.acc-empty .section-instruction { max-width: 440px; margin: 0 auto 14px; }
/* Đổi quà: 3 tab nằm gọn 1 hàng trên điện thoại */
@media (max-width: 560px) { #gift-arena .tabs-container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; } #gift-arena .tab-btn { padding: 8px 4px; font-size: 0.8rem; min-height: 44px; white-space: normal; line-height: 1.2; } }
/* Thanh cấp độ trên điện thoại: chữ "Cấp độ:" ghim ở mép trái, các nút trượt bên dưới (không bao giờ bị cắt chữ) */
@media (max-width: 640px) {
  .difficulty-level-bar > .diff-bar-label { position: sticky; left: 0; z-index: 2; background: #F8FAFC; padding: 6px 8px 6px 2px; margin-left: -4px; box-shadow: 10px 0 8px -8px rgba(15, 23, 42, 0.18); }
}
.ex-home-hero::after { z-index: 0; pointer-events: none; }
.ex-home-hero > * { position: relative; z-index: 1; }

/* ===== Chọn tuổi gọn (v110): lưới 4 cột đều nhau, số tuổi to + lớp nhỏ ===== */
#age-selector { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
#age-selector .age-pill { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; padding: 6px 2px; min-height: 56px; line-height: 1.1; }
#age-selector .age-pill b { font-size: 1.25rem; font-weight: 900; }
#age-selector .age-pill small { font-size: 0.68rem; font-weight: 800; color: #64748B; white-space: nowrap; }
#age-selector .age-pill.active small { color: inherit; }
.age-hint { font-weight: 700; color: #94A3B8; font-size: 0.8em; }

/* ===== Góc phụ huynh · Cài đặt gọn (v111): nhãn trái - nút phải, nhóm nút chia đều cột ===== */
.pd-set .pd-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 8px 12px; padding: 8px 0; border-bottom: 1px dashed #EEF2F7; }
.pd-set .pd-row:last-of-type { border-bottom: none; }
.pd-set .pd-row > label { font-weight: 800; font-size: 0.9rem; color: #334155; margin: 0; }
.pd-set .pd-row > label small { display: block; font-weight: 600; color: #94A3B8; font-size: 0.75rem; }
.pd-seg { display: grid; gap: 6px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pd-seg .pd-pill { width: 100%; min-height: 42px; padding: 6px 4px; justify-content: center; text-align: center; white-space: nowrap; font-size: 0.86rem; }
#pd-age-pills { grid-template-columns: repeat(8, minmax(0, 1fr)); }
#pd-age-pills .pd-pill { display: flex; flex-direction: column; line-height: 1.1; min-height: 50px; }
#pd-age-pills .pd-pill b { font-size: 1.1rem; }
#pd-age-pills .pd-pill small { font-size: 0.66rem; font-weight: 800; opacity: 0.75; }
#pd-learn-min, #pd-learn-days { grid-template-columns: repeat(5, minmax(0, 1fr)); }
#pd-timer-pills { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.pd-set .pd-note { margin: 6px 0 0; }
.pd-actions { display: flex; justify-content: flex-end; margin-top: 6px; }
.pd-diag { margin-top: 8px; font-size: 0.8rem; color: #64748B; }
.pd-diag summary { cursor: pointer; font-weight: 700; }
.pd-diag .pd-voice-status { margin-top: 6px; }
.pd-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.pd-tools .pd-pill { width: 100%; justify-content: center; text-align: center; min-height: 44px; text-decoration: none; }
.pd-tools .pd-pill small { font-weight: 600; opacity: 0.7; margin-left: 4px; }
.pd-danger { border: 1.5px solid #FECACA !important; background: #FFF7F7 !important; }
.pd-danger .pd-title { color: #B91C1C; }
.pd-danger .pd-note { margin: 0 0 8px; }
/* công tắc gạt thay ô tích */
.pd-toggle { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-weight: 800; font-size: 0.9rem; color: #334155; cursor: pointer; }
.pd-toggle small { font-weight: 600; color: #94A3B8; }
.pd-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pd-toggle-ui { flex: none; width: 42px; height: 24px; border-radius: 999px; background: #CBD5E1; position: relative; transition: background 0.2s; }
.pd-toggle-ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); transition: transform 0.2s; }
.pd-toggle input:checked + .pd-toggle-ui { background: #7C3AED; }
.pd-toggle input:checked + .pd-toggle-ui::after { transform: translateX(18px); }
.pd-toggle input:focus-visible + .pd-toggle-ui { outline: 3px solid #C4B5FD; outline-offset: 2px; }
@media (max-width: 600px) {
  .pd-set .pd-row { grid-template-columns: 1fr; gap: 6px; }
  #pd-age-pills { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #pd-timer-pills { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #pd-learn-min .pd-pill, #pd-learn-days .pd-pill { font-size: 0.74rem; }
  .pd-seg .pd-pill { font-size: 0.8rem; }
  .pd-tools { grid-template-columns: 1fr; }
}
@media (max-width: 600px) { #pd-voice-vi .pd-pill, #pd-voice-en .pd-pill { white-space: normal; line-height: 1.15; font-size: 0.78rem; } }

/* ===== Xếp theo tuổi (v112) - js/core/age-catalog.js ===== */
.category-card > .age-tag {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  font-size: 0.72rem; font-weight: 800; line-height: 1;
  padding: 5px 9px; border-radius: 999px;
  background: #EEF2FF; color: #3730A3; border: 1px solid #C7D2FE;
  pointer-events: none;
}
.age-other {
  margin: 26px 0 8px; background: #F8FAFC; border: 2px dashed #CBD5E1; border-radius: 22px; padding: 4px 16px;
}
.age-other > summary {
  list-style: none; cursor: pointer; padding: 14px 4px; display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 900; font-size: 1.1rem; color: #334155;
}
.age-other > summary::-webkit-details-marker { display: none; }
.age-other > summary::after { content: '▾'; margin-left: auto; color: #64748B; transition: transform .2s; }
.age-other[open] > summary::after { transform: rotate(180deg); }
.age-other .ao-n { font-size: 0.8rem; font-weight: 800; color: #475569; background: #E2E8F0; padding: 3px 10px; border-radius: 999px; }
.age-other .ao-sub { margin: 0 4px 14px; color: #475569; font-weight: 600; font-size: 0.9rem; }
.age-other .ao-banners > * { margin-bottom: 14px; }
.age-other .ao-rooms:empty, .age-other .ao-cats:empty, .age-other .ao-banners:empty { display: none; }
.age-other .ao-rooms { margin-bottom: 14px; }
.age-other .ao-cats { margin-bottom: 14px; }
/* Tab trò không hợp tuổi: mờ nhẹ (vẫn đọc được) + nhãn tuổi */
.tab-btn.age-off, .english-tab-btn.age-off, .arena-mode-btn.age-off, .hm-item.age-off {
  background: #F8FAFC; border-style: dashed; color: #64748B;
}
.tab-btn.age-off.active, .english-tab-btn.age-off.active, .arena-mode-btn.age-off.active { border-style: solid; }
.tab-btn.age-off[data-age]::after, .english-tab-btn.age-off[data-age]::after, .arena-mode-btn.age-off[data-age]::after {
  content: attr(data-age) ' tuổi'; margin-left: 6px; font-size: 0.7em; font-weight: 800;
  padding: 2px 6px; border-radius: 999px; background: #E2E8F0; color: #334155; vertical-align: middle;
}
@media (max-width: 600px) {
  .category-card > .age-tag { top: 7px; left: 7px; font-size: 0.66rem; padding: 4px 7px; }
  .age-other { padding: 2px 10px; border-radius: 18px; }
  .age-other > summary { font-size: 1rem; }
}
.sk-rooms-section[hidden], .age-other[hidden] { display: none !important; }

/* Bé chưa biết chữ (v118): phương án bằng hình */
.mix-swatch-grid { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.mix-swatch-btn { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 10px; min-height: 0; }
.mix-swatch { width: 74px; height: 74px; border-radius: 50%; border: 3px solid rgba(0, 0, 0, .12); box-shadow: inset 0 -6px 12px rgba(0, 0, 0, .12), 0 4px 10px rgba(0, 0, 0, .12); flex: none; }
.mix-swatch-name { font-size: .92rem; font-weight: 700; line-height: 1.2; }
.tone-quiz-opt { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.tone-quiz-opt .tone-glyph { font-size: 2.6rem; font-weight: 900; line-height: 1.1; }
.tone-quiz-opt .tone-label { font-size: .85rem; opacity: .75; font-weight: 700; }
.scenario-opt-btn { position: relative; padding-right: 58px; }
.scenario-opt-say { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #E0F2FE; font-size: 1.15rem; cursor: pointer; }
.scenario-opt-say:hover { background: #BAE6FD; }
@media (max-width: 480px) { .mix-swatch { width: 60px; height: 60px; } .mix-swatch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mix-pair { display: flex; align-items: center; gap: 4px; }
.mix-pair b { font-size: 1.3rem; color: #64748B; }
.mix-swatch.half { width: 48px; height: 48px; }
/* Nút về trang chủ samkido.com (landing) trên thanh trên cùng */
.header-actions a.header-btn { display: inline-flex; align-items: center; text-decoration: none; }


/* ===== css/base/theme.css ===== */
/* =====================================================================
 * Sam Kido - Bộ chuẩn giao diện (v144, làm lại giao diện 2026-11-14)
 * Phong cách: sạch, hiện đại, vui vừa - nền xám rất nhạt, thẻ trắng phẳng, MỘT màu chính (cam Sam Kido
 * giống trang chủ samkido.com), nút "bấm lún" kiểu app học cho bé.
 * File này NẠP CUỐI CÙNG (sau overrides.css): định nghĩa biến --sk-* rồi phủ lên các khối dùng chung
 * (khung app, trang chủ, trang nhóm, đầu phòng, tab, thẻ trò chơi, nút đáp án, hộp thoại).
 * Phòng nào cần chỉnh riêng: viết ở cuối file theo từng mục "Phòng ...", không sửa rải rác file cũ.
 * ===================================================================== */
:root {
  --sk-primary: #F97316; --sk-primary-600: #EA580C; --sk-primary-700: #C2410C;
  --sk-primary-50: #FFF7ED; --sk-primary-100: #FFEDD5; --sk-primary-200: #FED7AA;
  --sk-ink: #0F172A; --sk-text: #334155; --sk-muted: #64748B; --sk-faint: #94A3B8;
  --sk-line: #E2E8F0; --sk-line-2: #CBD5E1;
  --sk-bg: #F5F6FA; --sk-surface: #FFFFFF; --sk-surface-2: #F8FAFC; --sk-surface-3: #F1F5F9;
  --sk-navy: #1E3A8A; --sk-blue: #2563EB; --sk-blue-50: #EFF6FF;
  --sk-green: #16A34A; --sk-green-50: #F0FDF4; --sk-red: #DC2626; --sk-red-50: #FEF2F2; --sk-amber: #D97706; --sk-amber-50: #FFFBEB;
  --sk-r-sm: 10px; --sk-r: 14px; --sk-r-lg: 20px; --sk-r-xl: 24px;
  --sk-sh-1: 0 1px 2px rgba(15, 23, 42, .05);
  --sk-sh-2: 0 2px 8px rgba(15, 23, 42, .06), 0 1px 2px rgba(15, 23, 42, .04);
  --sk-sh-3: 0 12px 32px rgba(15, 23, 42, .14);
  --sk-press: 0 3px 0 var(--sk-line-2);
  --sk-top-h: 64px;
  /* biến cũ: trỏ về bộ mới để các phòng đang dùng tự đổi theo */
  --bg-gradient: var(--sk-bg);
  --card-bg: #fff;
  --card-shadow: var(--sk-sh-2);
  --clay-shadow: var(--sk-sh-1);
  --text-dark: var(--sk-ink);
  --text-muted: var(--sk-muted);
}

body { background: var(--sk-bg); color: var(--sk-text); }
.bg-decorations { display: none !important; }
.app-viewport { max-width: 1160px; padding: 20px 20px 48px; }
h1, h2, h3 { letter-spacing: -0.005em; }
:focus-visible { outline: 3px solid rgba(249, 115, 22, .45); outline-offset: 2px; }

/* ---------------------------------------------------------------------
 * 1. THANH TRÊN
 * ------------------------------------------------------------------- */
.top-navbar.sk-top {
  position: sticky; top: 0; z-index: 100; display: flex; align-items: center; gap: 12px; flex-wrap: nowrap;
  min-height: var(--sk-top-h); padding: 8px 20px; max-width: none;
  background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--sk-line); box-shadow: none;
}
.sk-top [hidden], .sk-more-menu[hidden] { display: none !important; }
.sk-top .brand-logo { flex: none; gap: 8px; transform: none !important; }
.sk-top .logo-badge { font-size: 1.85rem; animation: none; line-height: 1; }
.sk-top .brand-title { display: inline; font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; background: none; -webkit-text-fill-color: currentColor; color: var(--sk-ink); }
.sk-topnav { display: flex; align-items: center; gap: 2px; margin-left: 10px; min-width: 0; }
.sk-topnav button { border: 0; background: transparent; font: inherit; font-weight: 800; font-size: .95rem; color: var(--sk-muted); padding: 8px 12px; border-radius: var(--sk-r-sm); cursor: pointer; white-space: nowrap; }
.sk-topnav button:hover { background: var(--sk-surface-3); color: var(--sk-ink); }
.sk-topnav button.active { color: var(--sk-primary-700); background: var(--sk-primary-50); }
.sk-top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
.sk-top .user-stats-bar { display: flex; flex: none; gap: 0; margin: 0; padding: 2px; background: var(--sk-surface-2); border: 1px solid var(--sk-line); border-radius: 999px; box-shadow: none; }
.sk-top .user-stats-bar .stat-pill { display: flex; align-items: center; gap: 5px; padding: 5px 11px; font-size: .9rem; font-weight: 800; background: transparent; border: 0; box-shadow: none; border-radius: 999px; color: var(--sk-text); white-space: nowrap; }
.sk-top .user-stats-bar .stat-pill + .stat-pill { border-left: 1px solid var(--sk-line); border-radius: 0 999px 999px 0; }
.sk-top .user-stats-bar .star-pill { color: #B45309; }
.sk-top .user-stats-bar .diamond-pill { color: #0E7490; }
.sk-top .header-actions { display: flex !important; align-items: center; gap: 2px; }
.sk-top .header-btn { font-family: var(--font-body); transform: none !important; }
.sk-top .header-actions > .header-btn.header-icon, .sk-top #sk-more-btn {
  width: 40px; height: 40px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: transparent; border-radius: 12px; font-size: 1.2rem; color: var(--sk-ink); box-shadow: none;
}
.sk-top .header-actions > .header-btn.header-icon:hover, .sk-top #sk-more-btn:hover, .sk-top #sk-more-btn[aria-expanded="true"] { background: var(--sk-surface-3); }
.sk-top #sk-more-btn { font-size: 1.25rem; font-weight: 900; color: var(--sk-text); }
.sk-top #toggle-sfx-btn.is-off { opacity: .55; }
/* menu "Thêm" */
.sk-more { position: relative; }
.sk-more-menu {
  position: absolute; right: 0; top: calc(100% + 8px); width: 248px; z-index: 300;
  display: flex; flex-direction: column; gap: 2px; padding: 6px;
  background: #fff; border: 1px solid var(--sk-line); border-radius: 16px; box-shadow: var(--sk-sh-3);
}
.sk-more-rank { padding: 8px 12px 10px; margin-bottom: 4px; font-size: .84rem; font-weight: 800; color: var(--sk-muted); border-bottom: 1px solid var(--sk-line); }
.sk-more-menu .header-btn {
  display: flex !important; align-items: center; gap: 10px; width: 100%; height: auto; min-height: 44px; padding: 8px 12px;
  border: 0; background: transparent; border-radius: var(--sk-r-sm); box-shadow: none;
  font-size: .95rem; font-weight: 700; color: var(--sk-ink); text-decoration: none; text-align: left; cursor: pointer;
}
.sk-more-menu .header-btn:hover { background: var(--sk-surface-3); }
.sk-more-menu .header-btn > span:first-child { width: 24px; text-align: center; font-size: 1.1rem; }
.sk-more-menu .hb-label { display: inline !important; }
.sk-more-menu #toggle-music-btn::after { content: none; }
.sk-switch { margin-left: auto; position: relative; width: 34px; height: 20px; flex: none; border-radius: 99px; background: var(--sk-line-2); transition: background .15s; }
.sk-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s; }
#toggle-music-btn.active .sk-switch { background: var(--sk-green); }
#toggle-music-btn.active .sk-switch::after { transform: translateX(14px); }
/* hồ sơ bé */
.sk-top .user-profile-badge {
  display: flex; align-items: center; gap: 8px; flex: 0 1 auto; min-width: 0; max-width: 210px; margin: 0;
  padding: 3px 12px 3px 3px; background: #fff; border: 1px solid var(--sk-line); border-radius: 999px; box-shadow: none; cursor: pointer;
}
.sk-top .user-profile-badge:hover { border-color: var(--sk-line-2); background: var(--sk-surface-2); }
.sk-top .profile-avatar-wrapper { width: 34px; height: 34px; flex: none; }
.sk-top .profile-meta { display: flex; flex-direction: column; min-width: 0; overflow: hidden; line-height: 1.15; }
.sk-top .profile-name { display: block; font-size: .9rem; font-weight: 800; color: var(--sk-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
.sk-top .profile-age-badge { font-size: .72rem; font-weight: 700; color: var(--sk-muted); background: none; border: 0; padding: 0; }
.sk-top .profile-edit-btn { display: none; }

/* ---------------------------------------------------------------------
 * 2. THANH DƯỚI (điện thoại + máy tính bảng) - máy tính rộng dùng menu trên thanh trên
 * ------------------------------------------------------------------- */
.mobile-bottom-nav { display: none; }
@media (max-width: 1180px) {
  .sk-topnav { display: none; }
  .mobile-bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; height: auto; min-height: 62px;
    justify-content: space-around; align-items: stretch; gap: 2px;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--sk-line); box-shadow: 0 -2px 12px rgba(15, 23, 42, .05);
  }
  .mobile-bottom-nav .b-nav-item {
    flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    padding: 4px 2px; border: 0; border-radius: 12px; background: transparent; color: var(--sk-muted);
    font-family: var(--font-body); font-size: .74rem; font-weight: 800; cursor: pointer;
  }
  .mobile-bottom-nav .b-nav-icon { font-size: 1.3rem; line-height: 1; padding: 3px 14px; border-radius: 999px; transform: none !important; transition: background .15s; }
  .mobile-bottom-nav .b-nav-label { line-height: 1.1; white-space: nowrap; }
  .mobile-bottom-nav .b-nav-item.active { color: var(--sk-primary-700); background: transparent; }
  .mobile-bottom-nav .b-nav-item.active .b-nav-icon { background: var(--sk-primary-100); }
  .app-viewport { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 640px) {
  .top-navbar.sk-top { gap: 6px; padding: 6px 10px; min-height: 56px; }
  .sk-top .brand-title { display: none; }
  .sk-top .logo-badge { font-size: 1.6rem; }
  .sk-top-right { gap: 4px; }
  .sk-top .user-stats-bar .stat-pill { padding: 4px 8px; font-size: .82rem; gap: 3px; }
  .sk-top .header-actions > .header-btn.header-icon, .sk-top #sk-more-btn { width: 36px; height: 36px; font-size: 1.1rem; }
  .sk-top .user-profile-badge { padding: 2px; max-width: none; }
  .sk-top .profile-meta { display: none; }
  .sk-top .profile-avatar-wrapper { width: 32px; height: 32px; }
  .sk-top .brand-logo { order: 0; }
  .app-viewport { padding: 12px 12px calc(92px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 340px) {
  .sk-top #btn-open-quests { display: none; }
  .sk-top .user-stats-bar .stat-pill { padding: 4px 6px; }
}

/* ---------------------------------------------------------------------
 * 3. TRANG CHỦ
 * ------------------------------------------------------------------- */
#home-view > * { max-width: 980px; margin-left: auto; margin-right: auto; }
/* v144b khung chào: lời chào + ô tìm trong một khung cam nhạt (yêu cầu 2026-11-14 "làm lại trang chủ app") */
#home-view .home-hero {
  position: relative; overflow: hidden; isolation: isolate; margin-top: 4px; padding: 20px 22px 22px;
  background: linear-gradient(135deg, #FFF7ED 0%, #FFEDD5 60%, #FED7AA 100%); border: 1px solid #FED7AA; border-radius: var(--sk-r-xl);
}
#home-view .home-hero::before { content: ''; position: absolute; z-index: -1; right: -60px; top: -90px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255, 255, 255, .45); }
#home-view .home-hero::after { content: ''; position: absolute; z-index: -1; right: 150px; bottom: -70px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255, 255, 255, .3); }
#home-view .mascot-hero-section {
  display: flex; align-items: center; gap: 14px; margin: 0; padding: 0; background: none; border: 0; box-shadow: none; animation: none; max-width: none;
}
#home-view .mascot-container { width: 60px; height: 60px; flex: none; margin: 0; }
#home-view .mascot-avatar { font-size: 2.6rem; width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; background: #fff; border-radius: 18px; border: 0; box-shadow: 0 4px 12px -4px rgba(154, 52, 18, .35); animation: none; }
#home-view .mascot-bubble { background: none; border: 0; box-shadow: none; padding: 0; margin: 0; text-align: left; }
#home-view .mascot-bubble::before, #home-view .mascot-bubble::after { display: none; }
#home-view .mascot-bubble h2 { font-family: var(--font-display); font-size: 1.65rem; font-weight: 800; color: var(--sk-ink); margin: 0 0 2px; background: none; -webkit-text-fill-color: currentColor; }
#home-view .mascot-bubble p { font-size: .98rem; font-weight: 600; color: #9A3412; margin: 0; }

/* ô tìm */
#home-view .home-find { margin-top: 16px; max-width: none; }
.hf-box { border: 1px solid #FDBA74; border-radius: var(--sk-r); background: #fff; box-shadow: 0 4px 14px -6px rgba(154, 52, 18, .25); padding: 2px 6px 2px 14px; }
.hf-box:focus-within { border-color: var(--sk-primary); box-shadow: 0 0 0 4px rgba(249, 115, 22, .18); }
.hf-lens { font-size: 1.05rem; opacity: .7; }
#home-find-q { font-weight: 600; padding: 13px 0; color: var(--sk-ink); }
#home-find-q::placeholder { color: var(--sk-faint); font-weight: 600; }
.hf-res { border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); box-shadow: var(--sk-sh-3); }
.hf-item { border: 1px solid var(--sk-line); border-radius: var(--sk-r); box-shadow: var(--sk-sh-1); background: #fff; }
.hf-item:hover { border-color: var(--hc); box-shadow: var(--sk-sh-2); }
.hf-ic { border-radius: 12px; }
.sk-sec-title { font-family: var(--font-display); font-weight: 800; font-size: 1.08rem; color: var(--sk-ink); margin: 0 2px 10px; }

/* thẻ "Tiếp tục học" (Lộ trình SGK) */
#home-view > #sgk-box { margin-top: 16px; }
.sgk-home {
  background: #fff !important; border: 1px solid var(--sk-line) !important; border-radius: var(--sk-r-lg) !important;
  box-shadow: var(--sk-sh-2) !important; padding: 16px 18px !important; cursor: pointer; position: relative; overflow: hidden;
}
.sgk-home::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--sk-primary); }
.sgk-home .sgk-top { display: flex; align-items: center; gap: 12px; }
.sgk-home .ic { width: 48px; height: 48px; flex: none; display: flex; align-items: center; justify-content: center; font-size: 1.7rem; background: var(--sk-blue-50); border-radius: 14px; }
.sgk-home .sgk-txt b { font-size: 1.12rem; font-weight: 800; color: var(--sk-ink); font-family: var(--font-display); }
.sgk-home .sgk-txt small { color: var(--sk-muted); font-weight: 700; }
.sgk-home .jn-go { background: var(--sk-primary) !important; color: #fff !important; border: 0 !important; border-radius: 12px !important; box-shadow: 0 3px 0 var(--sk-primary-700) !important; padding: 10px 18px !important; font-weight: 800 !important; font-size: 1rem !important; }
.sgk-home .sgk-week { gap: 6px !important; margin-top: 12px !important; }
.sgk-home .sgk-week span { background: var(--sk-surface-3) !important; color: var(--sk-text) !important; border: 0 !important; border-radius: 999px !important; font-weight: 700 !important; font-size: .82rem !important; padding: 5px 11px !important; }
.sgk-home .sgk-week span.done { background: var(--sk-green-50) !important; color: var(--sk-green) !important; }

/* 6 ô nhóm (v144b, góp ý "chỉnh 6 mục chính đẹp hơn"): thẻ màu đặc theo nhóm, biểu tượng trong ô trắng như icon ứng dụng.
   Chữ nằm trên phần màu đậm (đầu dải màu), ô biểu tượng trắng nằm ở góc nhạt. Màu: HOME_HUBS trong home-hubs.js */
.home-hubs { gap: 16px; margin-top: 20px; margin-bottom: 8px; }
.hub-tile {
  position: relative; overflow: hidden; isolation: isolate; min-height: 180px; padding: 20px; gap: 4px;
  align-items: flex-start; justify-content: flex-start; text-align: left; color: #fff;
  background: linear-gradient(150deg, var(--hc) 0%, var(--hc) 35%, var(--hg) 100%); border: 0; border-radius: var(--sk-r-xl);
  box-shadow: 0 5px 0 var(--hd), 0 16px 28px -14px var(--hd); transition: transform .12s, box-shadow .12s;
}
.hub-tile::before { content: ''; position: absolute; z-index: -1; right: -50px; bottom: -60px; width: 200px; height: 200px; border-radius: 50%; background: rgba(255, 255, 255, .16); }
.hub-tile::after { content: ''; position: absolute; z-index: -1; right: 90px; top: -36px; width: 90px; height: 90px; border-radius: 50%; background: rgba(255, 255, 255, .09); }
.hub-tile:hover { transform: translateY(-3px); box-shadow: 0 8px 0 var(--hd), 0 20px 30px -14px var(--hd); }
.hub-tile:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--hd); }
.hub-tile:focus-visible { outline: 3px solid var(--sk-ink); outline-offset: 3px; }
.hub-tile .ht-ic {
  position: absolute; right: 18px; bottom: 18px; width: 86px; height: 86px; margin: 0; display: flex; align-items: center; justify-content: center;
  font-size: 3.2rem; line-height: 1; background: #fff; border-radius: 26px; box-shadow: 0 8px 16px -8px rgba(15, 23, 42, .45); transform: rotate(-6deg); transition: transform .2s;
}
.hub-tile:hover .ht-ic { transform: rotate(0) scale(1.06); }
.hub-tile b { font-size: 1.55rem; font-weight: 800; line-height: 1.15; color: #fff; text-shadow: 0 1px 2px rgba(15, 23, 42, .18); }
.hub-tile small { max-width: calc(100% - 104px); font-size: .9rem; font-weight: 700; line-height: 1.35; color: rgba(255, 255, 255, .94); }
.hub-tile em { position: static; margin-top: auto; padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .24); color: #fff; font-size: .8rem; font-weight: 800; font-style: normal; }
.hub-tile:hover em { background: #fff; color: var(--hc); }
/* lối vào cho người lớn (cuối trang chủ) */
.home-ph-links { margin: 22px auto 8px; gap: 8px; }
.home-ph-links button { border: 1px solid var(--sk-line); background: #fff; border-radius: 999px; padding: 8px 14px; font-weight: 700; color: var(--sk-text); box-shadow: var(--sk-sh-1); }
.home-ph-links button:hover { border-color: var(--sk-line-2); background: var(--sk-surface-2); }
/* Luyện tập hôm nay: máy tính 2 cột việc cho ngắn trang */
@media (min-width: 900px) { #home-view .dp-tasks { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px !important; } }
@media (max-width: 1180px) and (min-width: 641px) {
  .hub-tile { min-height: 168px; padding: 18px; }
  .hub-tile .ht-ic { width: 70px; height: 70px; font-size: 2.6rem; border-radius: 22px; right: 14px; bottom: 14px; }
  .hub-tile b { font-size: 1.35rem; }
  .hub-tile small { max-width: 100%; font-size: .84rem; }
}
@media (max-width: 640px) {
  #home-view .home-hero { padding: 14px 14px 16px; border-radius: var(--sk-r-lg); }
  #home-view .mascot-hero-section { gap: 10px; }
  #home-view .mascot-container, #home-view .mascot-avatar { width: 48px; height: 48px; font-size: 2.1rem; border-radius: 15px; }
  #home-view .mascot-bubble h2 { font-size: 1.32rem; }
  #home-view .mascot-bubble p { font-size: .86rem; line-height: 1.35; }
  #home-view .home-find { margin-top: 12px; }
  #home-find-q { padding: 11px 0; }
  .home-hubs { gap: 12px; margin-top: 16px; }
  .hub-tile { min-height: 156px; padding: 14px; border-radius: 20px; gap: 3px; box-shadow: 0 4px 0 var(--hd), 0 12px 20px -12px var(--hd); }
  .hub-tile::before { width: 150px; height: 150px; right: -44px; bottom: -50px; }
  .hub-tile .ht-ic { width: 56px; height: 56px; font-size: 2.1rem; border-radius: 18px; right: 12px; bottom: 12px; }
  .hub-tile b { font-size: 1.2rem; }
  .hub-tile small { max-width: 100%; font-size: .76rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .hub-tile em { padding: 3px 9px; font-size: .72rem; }
  .sgk-home { padding: 14px !important; }
  .sgk-home .ic { width: 42px; height: 42px; font-size: 1.45rem; }
  .sgk-home .sgk-txt b { font-size: 1.02rem; }
  #home-view .dp-go { padding: 8px 10px !important; font-size: .82rem !important; }
}

/* ---------------------------------------------------------------------
 * 4. ĐẦU PHÒNG (dùng chung cho cả 33 phòng) + TRANG NHÓM
 * ------------------------------------------------------------------- */
.app-view .view-top-header {
  display: flex; align-items: center; justify-content: flex-start; gap: 12px; flex-wrap: nowrap;
  margin: 0 0 16px; padding: 0; min-height: 44px; background: none; border: 0; border-radius: 0; box-shadow: none;
}
.app-view .view-top-header > div:empty { display: none; }
.app-view .btn-back-home {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px 0 10px;
  background: #fff; color: var(--sk-text); border: 1px solid var(--sk-line); border-radius: 12px; box-shadow: var(--sk-sh-1);
  font-family: var(--font-body); font-weight: 800; font-size: .92rem; cursor: pointer; transform: none !important;
}
.app-view .btn-back-home:hover { background: var(--sk-surface-2); color: var(--sk-ink); border-color: var(--sk-line-2); }
.app-view .view-heading {
  flex: 1 1 auto; min-width: 0; margin: 0; justify-content: flex-start; text-align: left;
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; color: var(--sk-ink); line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: none; -webkit-text-fill-color: currentColor;
}
@media (max-width: 640px) {
  .app-view .view-top-header { gap: 8px; margin-bottom: 12px; position: static; }
  .app-view .btn-back-home { height: 38px; padding: 0 10px; font-size: .86rem; }
  .app-view .view-heading { font-size: 1.18rem; }
}
/* trang nhóm */
.hub-sub { text-align: left; color: var(--sk-muted); font-weight: 600; margin: -6px 2px 16px; }
.hub-sec-t { color: var(--sk-ink); font-family: var(--font-display); font-weight: 800; font-size: 1rem; margin: 6px 2px 10px; }
.hub-sec-t::after { height: 1px; background: var(--sk-line); }
.hub-card { border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); box-shadow: var(--sk-sh-1); }
.hub-card:hover { transform: translateY(-1px); border-color: var(--hb); box-shadow: var(--sk-sh-2); }
.hub-card.hot { background: #fff; border-color: var(--hb); box-shadow: 0 0 0 3px var(--hl), var(--sk-sh-1); }
.hub-card .hc-ic { border-radius: 16px; font-size: 2.1rem; width: 56px; height: 56px; }
.hub-card .hc-tx b { font-weight: 800; color: var(--sk-ink); }
.hub-card .hc-tx small { color: var(--sk-muted); font-weight: 600; }
.hub-card .hc-age { background: var(--sk-surface-3); color: var(--sk-muted); top: 12px; right: 12px; }
.hc-sub { border: 1px solid var(--sk-line); background: var(--sk-surface-2); border-radius: 12px; font-weight: 700; color: var(--sk-text); min-height: 40px; }
.hc-sub:hover { border-color: var(--hc); background: #fff; color: var(--sk-ink); }
.hub-other { background: var(--sk-surface-2); border: 1px dashed var(--sk-line-2); }

/* ---------------------------------------------------------------------
 * 5. KHỐI DÙNG CHUNG TRONG PHÒNG: tab trò, thẻ trò chơi, nút đáp án, nút đọc, nhãn
 * ------------------------------------------------------------------- */
.app-view .game-tabs-nav { gap: 8px; margin-bottom: 16px; }
.app-view .tab-btn, .app-view .english-tab-btn {
  background: #fff; border: 1px solid var(--sk-line); border-radius: 12px; padding: 10px 14px;
  font-family: var(--font-body); font-weight: 800; font-size: .95rem; color: var(--sk-text);
  box-shadow: var(--sk-sh-1); transform: none !important; transition: background .12s, border-color .12s, color .12s;
}
.app-view .tab-btn:hover, .app-view .english-tab-btn:hover { border-color: var(--sk-line-2); background: var(--sk-surface-2); color: var(--sk-ink); }
.app-view .tab-btn.active, .app-view .english-tab-btn.active {
  background: var(--sk-primary-50) !important; color: var(--sk-primary-700) !important; border-color: var(--sk-primary) !important;
  box-shadow: inset 0 0 0 1px var(--sk-primary) !important;
}
.app-view .tab-btn.age-off, .app-view .english-tab-btn.age-off { border-style: dashed; opacity: .8; }

.app-view .game-card {
  background: #fff; border: 1px solid var(--sk-line); border-radius: var(--sk-r-xl); box-shadow: var(--sk-sh-2); padding: 24px;
}
.app-view .game-header { gap: 8px; margin-bottom: 16px; }
.app-view .game-badge {
  background: var(--sk-amber-50); color: #92400E; border: 1px solid #FDE68A; border-radius: 999px;
  padding: 6px 14px; font-family: var(--font-body); font-weight: 800; font-size: .9rem;
}
.app-view .voice-btn {
  background: var(--sk-blue-50); color: #1D4ED8; border: 1px solid #BFDBFE; border-radius: 999px;
  padding: 7px 14px; font-weight: 800; font-size: .9rem; transform: none !important;
}
.app-view .voice-btn:hover { background: #DBEAFE; color: #1E40AF; }
.app-view .game-question { font-family: var(--font-display); font-weight: 800; color: var(--sk-ink); }
.app-view .section-instruction { color: var(--sk-muted); font-weight: 600; }
/* nút đáp án: "bấm lún" (viền dưới dày) - rõ là bấm được, vẫn phẳng */
.app-view .game-opt-btn {
  background: #fff; color: var(--sk-ink); border: 2px solid var(--sk-line); border-radius: 18px;
  box-shadow: 0 4px 0 var(--sk-line-2); font-family: var(--font-display); font-weight: 800;
  transition: transform .08s, box-shadow .08s, border-color .12s, background .12s;
}
@media (hover: hover) { .app-view .game-opt-btn:hover { transform: translateY(-1px); border-color: #93C5FD; box-shadow: 0 5px 0 #93C5FD; background: #F8FBFF; } }
.app-view .game-opt-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--sk-line-2); }
.app-view .game-opt-btn.correct-answer { background: var(--sk-green) !important; border-color: #15803D !important; box-shadow: 0 4px 0 #166534 !important; color: #fff !important; }
.app-view .game-opt-btn.wrong-answer { background: var(--sk-red) !important; border-color: #B91C1C !important; box-shadow: 0 4px 0 #991B1B !important; color: #fff !important; }

/* ---------------------------------------------------------------------
 * 6. HỘP THOẠI
 * ------------------------------------------------------------------- */
.modal-backdrop { background: rgba(15, 23, 42, .45); backdrop-filter: blur(3px); }
.modal-card { border: 0; border-radius: var(--sk-r-xl); box-shadow: 0 24px 60px rgba(15, 23, 42, .25); padding: 28px 24px; }
.modal-title { font-family: var(--font-display); font-weight: 800; color: var(--sk-ink); font-size: 1.5rem; }
.modal-desc { color: var(--sk-text); font-weight: 600; }
.modal-btn-confirm {
  background: var(--sk-primary); color: #fff; border: 0; border-radius: 14px; padding: 13px 28px;
  box-shadow: 0 4px 0 var(--sk-primary-700); font-weight: 800; font-size: 1.05rem; transform: none !important;
}
.modal-btn-confirm:hover { background: var(--sk-primary-600); }
.modal-btn-confirm:active { transform: translateY(3px) !important; box-shadow: 0 1px 0 var(--sk-primary-700); }
.modal-close-icon { border-radius: 12px; }

/* ---------------------------------------------------------------------
 * 7. CHỈNH THÊM SAU LẦN SOÁT ẢNH ĐẦU
 * ------------------------------------------------------------------- */
/* CSS cũ ẩn các nút này trên điện thoại (khi chúng còn nằm ở thanh dưới) - giờ chúng ở thanh trên / menu Thêm */
.sk-top .header-actions #btn-open-quests { display: inline-flex; }
@media (max-width: 340px) { .sk-top .header-actions #btn-open-quests { display: none; } }
#home-view .mascot-bubble h2 { display: block; }
/* Lộ trình SGK trên điện thoại: các bài hôm nay nằm 1 hàng vuốt ngang cho gọn */
@media (max-width: 640px) {
  .sgk-home .sgk-week { flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; margin-left: -14px !important; margin-right: -14px !important; padding: 0 14px; }
  .sgk-home .sgk-week::-webkit-scrollbar { display: none; }
  .sgk-home .sgk-week span { flex: none; white-space: nowrap; }
}

/* Luyện tập hôm nay (daily-path.js) */
#home-view > #daily-path-box { margin-top: 20px; }
.dp-card { background: #fff !important; border: 1px solid var(--sk-line) !important; border-radius: var(--sk-r-lg) !important; box-shadow: var(--sk-sh-2) !important; padding: 18px !important; }
.dp-card.dp-done { border-color: #86EFAC !important; background: var(--sk-green-50) !important; }
.dp-title { font-family: var(--font-display) !important; font-size: 1.15rem !important; font-weight: 800 !important; color: var(--sk-ink) !important; background: none !important; -webkit-text-fill-color: currentColor !important; }
.dp-sub { color: var(--sk-muted) !important; font-weight: 600 !important; }
.dp-ring { box-shadow: none !important; }
.dp-task { background: var(--sk-surface-2) !important; border: 1px solid var(--sk-line) !important; border-radius: var(--sk-r) !important; box-shadow: none !important; }
.dp-task-done { background: var(--sk-green-50) !important; border-color: #BBF7D0 !important; }
.dp-task-title { color: var(--sk-ink) !important; font-weight: 800 !important; }
.dp-task-bar { background: var(--sk-line) !important; }
.dp-task-bar > span { background: var(--sk-primary) !important; }
.dp-go { background: #fff !important; color: var(--sk-primary-700) !important; border: 1px solid var(--sk-primary-200) !important; border-radius: 12px !important; box-shadow: none !important; font-weight: 800 !important; }
.dp-go:hover { background: var(--sk-primary-50) !important; }

/* chân trang trong app */
.site-footer { color: var(--sk-muted); }
.site-footer a { color: var(--sk-text); }

/* ---------------------------------------------------------------------
 * 8. THANH ĐẦU RIÊNG CỦA PHÒNG LUYỆN THI + LỘ TRÌNH HỌC (.ex-top): cùng kiểu đầu phòng chung
 *    (sgk.js gắn màu môn vào style="background" -> phải dùng !important)
 * ------------------------------------------------------------------- */
.ex-top:not(.ex-top-exam) { background: none !important; color: var(--sk-ink) !important; padding: 0 !important; margin-bottom: 16px !important; min-height: 44px; border-radius: 0 !important; box-shadow: none !important; gap: 12px !important; }
.ex-top:not(.ex-top-exam) .ex-back, .ex-hero-top .ex-back {
  background: #fff !important; color: var(--sk-text) !important; border: 1px solid var(--sk-line) !important; border-radius: 12px !important;
  box-shadow: var(--sk-sh-1); height: 40px; min-height: 40px; padding: 0 14px 0 10px !important; font-weight: 800; font-size: .92rem;
}
.ex-top:not(.ex-top-exam) .ex-back:hover { background: var(--sk-surface-2) !important; border-color: var(--sk-line-2) !important; }
.ex-top:not(.ex-top-exam) .ex-top-title { text-align: left !important; font-size: 1.5rem !important; font-weight: 800 !important; color: var(--sk-ink); }
.ex-top:not(.ex-top-exam) .ex-top-id { color: var(--sk-muted); font-weight: 800; background: #fff; border: 1px solid var(--sk-line); border-radius: 999px; padding: 6px 12px; opacity: 1 !important; }
/* đang làm bài: thanh trắng dính trên cùng, đồng hồ nổi bật */
.ex-top.ex-top-exam { background: #fff !important; color: var(--sk-ink) !important; border: 1px solid var(--sk-line); box-shadow: var(--sk-sh-2) !important; top: calc(var(--sk-top-h) + 6px) !important; }
.ex-top.ex-top-exam .ex-back { background: var(--sk-surface-3) !important; color: var(--sk-text) !important; }
@media (max-width: 640px) {
  .ex-top:not(.ex-top-exam) .ex-top-title { font-size: 1.18rem !important; }
  .ex-top:not(.ex-top-exam) .ex-back { height: 38px; min-height: 38px; padding: 0 10px !important; font-size: .86rem; }
  .ex-top.ex-top-exam { top: 62px !important; }
}

/* ---------------------------------------------------------------------
 * 9. THANH CẤP ĐỘ (adaptive.js .sk-level-bar, dùng ở hầu hết trò): kiểu "chọn đoạn" phẳng
 *    cấp đang chọn = ô trắng nổi, chữ màu theo độ khó (Dễ xanh lá · Vừa xanh dương · Khó cam · Siêu tím)
 * ------------------------------------------------------------------- */
.app-view .difficulty-level-bar {
  background: var(--sk-surface-3); border: 0; border-radius: 14px; padding: 4px; gap: 2px; max-width: 680px; box-shadow: none;
}
.app-view .difficulty-level-bar > .diff-bar-label { background: var(--sk-surface-3); box-shadow: 8px 0 8px -4px var(--sk-surface-3); font-family: var(--font-body); font-size: .82rem; font-weight: 800; color: var(--sk-muted); padding: 0 6px 0 8px; margin: 0; }
.app-view .diff-pill-btn, .app-view .diff-btn {
  min-height: 40px; padding: 6px 14px; background: transparent; border: 0; border-radius: 11px; box-shadow: none;
  font-family: var(--font-body); font-size: .9rem; font-weight: 800; color: var(--sk-muted); transform: none !important; animation: none !important;
}
.app-view .diff-pill-btn:hover, .app-view .diff-btn:hover { background: rgba(255, 255, 255, .6); color: var(--sk-ink); box-shadow: none; }
.app-view .diff-pill-btn.active, .app-view .diff-btn.active { background: #fff !important; color: var(--sk-ink) !important; border: 0 !important; box-shadow: 0 1px 3px rgba(15, 23, 42, .12), 0 0 0 1px rgba(15, 23, 42, .04) !important; }
.app-view .diff-pill-btn.active.diff-easy { color: #15803D !important; }
.app-view .diff-pill-btn.active.diff-medium { color: #1D4ED8 !important; }
.app-view .diff-pill-btn.active.diff-hard { color: #C2410C !important; }
.app-view .diff-pill-btn.active.diff-expert, .app-view .diff-pill-btn.active.diff-master, .app-view .diff-pill-btn.active.diff-champ { color: #7E22CE !important; }
.app-view .diff-pill-btn.sk-locked { opacity: .5; filter: none; border-style: solid; }
.app-view .diff-pill-btn .sk-star-chip, .app-view .diff-pill-btn small { opacity: .85; }
.app-view .sk-auto-chip { background: transparent; border: 0; color: var(--sk-muted); font-weight: 700; padding: 4px 8px; }
.app-view .sk-progress { background: var(--sk-line); }
.app-view .sk-progress > span { background: var(--sk-green); }
.app-view .btn-back-home { min-height: 44px; height: auto; }

/* ---------------------------------------------------------------------
 * 10. THANH CHỌN TRÒ TRONG PHÒNG: điện thoại / iPad (≤1180px) = MỘT HÀNG VUỐT NGANG
 *     (góp ý 2026-11-14: bé vào phòng là chơi ngay, lưới 8 ô đẩy khu chơi xuống dưới phải cuộn).
 *     Trò đang chọn tự cuộn vào giữa (app-router.js centerActiveTab). Máy tính rộng vẫn là lưới.
 * ------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .app-view .game-tabs-nav, .app-view:not(#gift-view) .tabs-container {
    display: flex !important; flex-wrap: nowrap !important; grid-template-columns: none !important;
    overflow-x: auto !important; overflow-y: hidden; overscroll-behavior-x: contain; scroll-snap-type: x proximity;
    gap: 6px !important; margin: 0 -20px 12px !important; padding: 2px 20px 6px !important; scrollbar-width: none; justify-content: flex-start !important;
  }
  .app-view .game-tabs-nav::-webkit-scrollbar, .app-view .tabs-container::-webkit-scrollbar { display: none; }
  .app-view .game-tabs-nav > button, .app-view:not(#gift-view) .tabs-container > button {
    flex: none !important; width: auto !important; max-width: none !important; grid-column: auto !important;
    white-space: nowrap !important; min-height: 42px !important; height: auto; padding: 8px 14px !important;
    border-radius: 999px !important; font-size: .9rem !important; line-height: 1.2 !important; scroll-snap-align: center;
    display: inline-flex !important; align-items: center; gap: 4px; text-align: left !important;
  }
  /* nhãn tuổi trên chip: nhỏ, cùng hàng */
  .app-view .game-tabs-nav > .age-off[data-age]::after, .app-view .tabs-container > .age-off[data-age]::after { position: static !important; margin-left: 6px; font-size: .68rem !important; padding: 1px 6px !important; transform: none !important; }
}
@media (max-width: 640px) {
  .app-view .game-tabs-nav, .app-view:not(#gift-view) .tabs-container { margin: 0 -12px 10px !important; padding: 2px 12px 6px !important; }
}

/* ---------------------------------------------------------------------
 * 11. TRANG NHÓM 2 CỘT (home-hubs.js render v144): trái = menu khu, phải = khu đang chọn
 * ------------------------------------------------------------------- */
#hub-view .hub-wrap { max-width: 1120px; }
.hub2 { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; }
.hub2-nav { position: sticky; top: calc(var(--sk-top-h) + 16px); display: flex; flex-direction: column; gap: 4px; padding: 8px; background: #fff; border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); box-shadow: var(--sk-sh-1); }
.hub2-nav button {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 8px 12px; border: 0; border-radius: 12px;
  background: transparent; font: inherit; font-weight: 800; font-size: .98rem; color: var(--sk-text); text-align: left; cursor: pointer;
}
.hub2-nav button:hover { background: var(--sk-surface-3); color: var(--sk-ink); }
.hub2-nav button.active { background: var(--sk-primary-50); color: var(--sk-primary-700); }
.hub2-nav .hn-ic { font-size: 1.25rem; width: 26px; text-align: center; flex: none; }
.hub2-nav .hn-t { flex: 1; min-width: 0; }
.hub2-nav .hn-n { flex: none; font-size: .75rem; font-weight: 800; color: var(--sk-muted); background: var(--sk-surface-3); border-radius: 999px; padding: 1px 8px; }
.hub2-nav button.active .hn-n { background: #fff; color: var(--sk-primary-700); }
.hub2-nav [data-sec="other"] { margin-top: 6px; border-top: 1px solid var(--sk-line); border-radius: 0 0 12px 12px; padding-top: 12px; color: var(--sk-muted); }
.hub2-panel[hidden] { display: none !important; }
.hub2-panel { display: flex; flex-direction: column; gap: 16px; background: none; border: 0; padding: 0; margin: 0; }
.hub2-h { font-family: var(--font-display); font-size: 1.35rem; font-weight: 800; color: var(--sk-ink); margin: 0; display: flex; flex-direction: column; gap: 2px; }
.hub2-h small { font-family: var(--font-body); font-size: .88rem; font-weight: 600; color: var(--sk-muted); }
/* thẻ phòng trong khu */
#hub-view .hub-card { margin: 0; break-inside: auto; border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); box-shadow: var(--sk-sh-2); background: #fff; transform: none !important; }
#hub-view .hub-card:hover { border-color: var(--sk-line-2); }
#hub-view .hub-card.hot { box-shadow: var(--sk-sh-2); }
#hub-view .hub-card .hc-main { min-height: 0; padding: 16px 18px; gap: 14px; align-items: center; border-radius: var(--sk-r-lg) var(--sk-r-lg) 0 0; }
#hub-view .hub-card:not(.has-subs) .hc-main { border-radius: var(--sk-r-lg); }
#hub-view .hub-card .hc-main:hover { background: var(--sk-surface-2); }
#hub-view .hub-card .hc-ic { width: 60px; height: 60px; font-size: 2.2rem; border-radius: 16px; background: var(--hl); }
#hub-view .hub-card .hc-tx { flex: 1; }
#hub-view .hub-card .hc-tx b { font-size: 1.15rem; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
#hub-view .hub-card .hc-tx small { -webkit-line-clamp: 2; font-size: .88rem; }
#hub-view .hub-card .hc-age { position: static; font-size: .72rem; font-weight: 800; color: var(--sk-muted); background: var(--sk-surface-3); border-radius: 999px; padding: 2px 8px; }
#hub-view .hub-card .hc-go { flex: none; font-weight: 800; font-size: .9rem; color: var(--sk-primary-700); background: var(--sk-primary-50); border: 1px solid var(--sk-primary-100); border-radius: 12px; padding: 9px 14px; white-space: nowrap; }
#hub-view .hub-card .hc-main:hover .hc-go { background: var(--sk-primary); color: #fff; border-color: var(--sk-primary); }
/* trò con = ô lớn */
#hub-view .hc-subs { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; padding: 14px 18px 18px; border-top: 1px solid var(--sk-line); }
#hub-view .hc-sub {
  display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 10px 12px; border: 1px solid var(--sk-line); border-radius: var(--sk-r);
  background: var(--sk-surface-2); color: var(--sk-ink); font: inherit; font-weight: 800; font-size: .95rem; text-align: left; cursor: pointer; transition: border-color .12s, background .12s, transform .12s;
}
#hub-view .hc-sub > span:first-child { flex: none; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; font-size: 1.45rem; background: #fff; border-radius: 10px; box-shadow: var(--sk-sh-1); }
#hub-view .hc-sub .hc-sub-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
#hub-view .hc-sub .hc-sub-t small { font-size: .76rem; font-weight: 700; color: var(--sk-muted); }
#hub-view .hc-sub:hover { background: #fff; border-color: var(--hc); transform: translateY(-1px); }
#hub-view .hc-sub.age-off { opacity: .6; }
#hub-view .hc-subj > span:first-child { background: color-mix(in srgb, var(--sc) 12%, #fff); box-shadow: none; }
#hub-view .hc-subj:hover { border-color: var(--sc); }
#hub-view .hub-other { background: none; border: 0; padding: 0; }
@media (max-width: 860px) {
  .hub2 { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  /* hiện đủ mọi khu (xuống dòng), không phải vuốt - bé không biết kéo sang (góp ý 2026-11-14) */
  .hub2-nav {
    position: static; flex-direction: row; flex-wrap: wrap; gap: 8px;
    padding: 0; margin: 0; border: 0; border-radius: 0; box-shadow: none; background: none;
  }
  .hub2-nav button { flex: 1 1 auto; width: auto; justify-content: center; min-height: 44px; padding: 6px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--sk-line); box-shadow: var(--sk-sh-1); font-size: .9rem; white-space: nowrap; }
  .hub2-nav button.active { background: var(--sk-primary-50); border-color: var(--sk-primary); }
  .hub2-nav .hn-n { display: none; }
  .hub2-nav [data-sec="other"] { margin-top: 0; border-top: 1px solid var(--sk-line); border-radius: 999px; padding-top: 6px; }
  .hub2-h { font-size: 1.15rem; }
  #hub-view .hub-card .hc-main { padding: 12px 14px; gap: 12px; }
  #hub-view .hub-card .hc-ic { width: 50px; height: 50px; font-size: 1.8rem; }
  #hub-view .hub-card .hc-go { display: none; }
  #hub-view .hc-subs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 10px 12px 14px; }
  #hub-view .hc-sub { min-height: 56px; padding: 8px 10px; font-size: .88rem; gap: 8px; }
  #hub-view .hc-sub > span:first-child { width: 34px; height: 34px; font-size: 1.3rem; }
}
#hub-view .hc-sub { min-width: 0; overflow: hidden; white-space: normal !important; }
#hub-view .hc-sub .hc-sub-t { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 860px) { #hub-view .hc-sub { font-size: .86rem !important; line-height: 1.2; } }
/* hubs.css cũ đặt ".hc-sub span { flex: none; font-size: 1.05rem }" -> trả phần chữ về co giãn + cỡ chữ của ô */
#hub-view .hc-sub .hc-sub-t { flex: 1 1 auto; font-size: inherit; }
#hub-view .hc-sub .hc-sub-t small { flex: none; }

/* Chân trang (Giới thiệu, Blog, Gửi tài liệu...) chỉ hiện ở trang chủ app - trong phòng học/chơi bé hay bấm nhầm (góp ý 2026-11-14) */
body[data-view]:not([data-view="home-view"]) .site-footer { display: none !important; }

/* ---------------------------------------------------------------------
 * 12. PHÒNG VIDEO - danh sách (video-room.js renderList v144): trái = menu chủ đề, phải = chọn lớp + video
 *     (góp ý 2026-11-14: 2 hàng nút chọn dài và rối). Thẻ video / trình phát: css/theme/hoc.css
 * ------------------------------------------------------------------- */
#video-view .vl-intro { text-align: left; color: var(--sk-muted); font-weight: 600; margin: -6px 2px 12px; background: none; border: 0; padding: 0; }
#video-view .vl-lockbar { display: block; width: 100%; margin: 0 0 14px; text-align: left; }
@media (max-width: 640px) { #video-view .vl-intro { display: none; } }
#video-view .vl-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; align-items: start; }
#video-view .vl-chips.vl-groups {
  position: sticky; top: calc(var(--sk-top-h) + 16px); display: flex; flex-direction: column; flex-wrap: nowrap; gap: 2px; margin: 0;
  padding: 8px; background: #fff; border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); box-shadow: var(--sk-sh-1); overflow: visible;
}
#video-view .vl-groups button {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; margin: 0; padding: 6px 10px; border: 0; border-radius: 12px; box-shadow: none;
  background: transparent; color: var(--sk-text); font: inherit; font-weight: 800; font-size: .95rem; text-align: left; white-space: nowrap; cursor: pointer;
}
#video-view .vl-groups button:hover { background: var(--sk-surface-3); color: var(--sk-ink); }
#video-view .vl-groups button.on { background: var(--sk-primary-50); color: var(--sk-primary-700); box-shadow: none; }
#video-view .vl-groups .vg-ic { width: 24px; text-align: center; font-size: 1.15rem; flex: none; }
#video-view .vl-groups .vg-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
#video-view .vl-groups small { flex: none; font-size: .74rem; font-weight: 800; color: var(--sk-muted); background: var(--sk-surface-3); border-radius: 999px; padding: 1px 8px; }
#video-view .vl-groups button.on small { background: #fff; color: var(--sk-primary-700); }
#video-view .vl-main { min-width: 0; }
#video-view .vl-main-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
#video-view .vl-main-head h3 { margin: 0; font-family: var(--font-display); font-size: 1.35rem; font-weight: 800; color: var(--sk-ink); }
#video-view .vl-main-head h3 small { font-family: var(--font-body); font-size: .85rem; font-weight: 700; color: var(--sk-muted); margin-left: 6px; }
/* chọn lớp = kiểu "chọn đoạn" giống thanh cấp độ */
#video-view .vl-chips.vl-grades { display: inline-flex; flex-wrap: nowrap; gap: 2px; margin: 0; padding: 4px; background: var(--sk-surface-3); border: 0; border-radius: 14px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
#video-view .vl-grades::-webkit-scrollbar { display: none; }
#video-view .vl-grades button { flex: none; min-height: 38px; margin: 0; padding: 6px 14px; border: 0; border-radius: 11px; background: transparent; box-shadow: none; color: var(--sk-muted); font: inherit; font-weight: 800; font-size: .9rem; cursor: pointer; }
#video-view .vl-grades button:hover { color: var(--sk-ink); background: rgba(255, 255, 255, .6); }
#video-view .vl-grades button.on { background: #fff; color: var(--sk-ink); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
@media (max-width: 860px) {
  #video-view .vl-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  /* điện thoại / máy tính bảng nhỏ: LƯỚI hiện đủ mọi chủ đề, không phải vuốt (góp ý 2026-11-14: bé không biết kéo sang) */
  #video-view .vl-chips.vl-groups {
    position: static; display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px;
    margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: none; overflow: visible;
    -webkit-mask-image: none; mask-image: none; /* bỏ lớp mờ gợi ý vuốt của video.css: lưới không cần vuốt */
  }
  #video-view .vl-groups button {
    flex-direction: column; justify-content: center; gap: 4px; width: auto; min-height: 74px; padding: 8px 4px; border-radius: 16px;
    background: #fff; border: 1px solid var(--sk-line); box-shadow: var(--sk-sh-1); font-size: .78rem; line-height: 1.2; text-align: center; white-space: normal;
  }
  #video-view .vl-groups button.on { background: var(--sk-primary-50); border-color: var(--sk-primary); box-shadow: 0 0 0 1px var(--sk-primary) inset; }
  #video-view .vl-groups small { display: none; }
  #video-view .vl-groups .vg-ic { width: auto; font-size: 1.6rem; line-height: 1; }
  #video-view .vl-groups .vg-t { flex: none; overflow: visible; text-overflow: clip; }
  #video-view .vl-main-head h3 { font-size: 1.12rem; }
  #video-view .vl-main-head { margin-bottom: 10px; gap: 8px; }
  /* chọn lớp: các nút dàn đều cả hàng, thấy đủ Lớp 1-5 không cần vuốt */
  #video-view .vl-chips.vl-grades { display: flex; width: 100%; overflow: visible; -webkit-mask-image: none; mask-image: none; }
  #video-view .vl-grades button { flex: 1 1 0; min-width: 0; padding: 6px 4px; }
}

/* Điện thoại: bỏ nhãn "Cấp độ:" dính cố định trên thanh cấp độ - khi thanh tự cuộn tới cấp đang chọn, chữ của cấp trước lộ ra cạnh nhãn trông rối; các ô cấp đã tự rõ nghĩa */
@media (max-width: 640px) { .app-view .difficulty-level-bar > .diff-bar-label { display: none !important; } }

/* ---------------------------------------------------------------------
 * 13. GHÉP CÁC NHÓM (soát tổng 2026-11-14)
 * ------------------------------------------------------------------- */
/* .tabs-container (7 phòng) không có khoảng cách dưới như .game-tabs-nav -> hàng tab dính sát thẻ trò */
.app-view:not(#gift-view) .tabs-container { margin-bottom: 16px; }
/* điện thoại: khung trò bớt đệm (theme mục 5 đặt 24px, đè mất đệm nhỏ của ui-polish/responsive) */
@media (max-width: 640px) { .app-view .game-card { padding: 14px 12px; border-radius: var(--sk-r-lg); } }
/* tên phòng dài (vd "Album Sticker & Huy Chương") trên điện thoại: xuống tối đa 2 dòng thay vì cắt "…" */
@media (max-width: 640px) { .app-view .view-heading { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.2; } }


/* ===== css/theme/hoc.css ===== */
/* Sam Kido v144 - giao diện mới: nhóm "hoc" (nạp sau css/base/theme.css). Xem đầu file theme.css.
 * Phạm vi: Lộ trình học (sgk-view), Toán (math-view), Tiếng Việt (vietnamese-view), Tiếng Anh (english-view),
 * Toán Siêu Vui (mathfun-view), Tiếng Anh Siêu Vui (enfun-view), Video Học Vui (video-view).
 * Nguyên tắc: thẻ trắng viền 1px, bỏ gradient/viền dày/nét đứt trang trí; giữ màu mang nghĩa (đúng/sai, màu môn, hình trò chơi).
 * Màn làm bài của SGK dùng lại .ex-* của Phòng Luyện Thi (thi.css) - ở đây KHÔNG đụng .ex-*.
 * Khi ghi đè nền/viền bằng selector #id, trạng thái cũ (.done, .right, .picked...) bị thua độ ưu tiên -> phải khai lại ngay bên dưới. */

/* =====================================================================
 * 1. LỘ TRÌNH HỌC (SGK) - js/rooms/sgk.js, sgk-extra.js, sgk-levels.js
 * ===================================================================== */
/* --- Kế hoạch hôm nay / cả tuần --- */
#sgk-view .sg-plancard { border: 1px solid var(--sk-line); }
#sgk-view .sg-plan { gap: 8px; }
#sgk-view .sg-plan-item { gap: 10px; min-height: 56px; padding: 8px 10px 8px 12px; background: #fff; border: 1px solid var(--sk-line); border-radius: var(--sk-r); }
#sgk-view .sg-plan-item.done { background: var(--sk-green-50); border-color: #BBF7D0; }
#sgk-view .sg-plan-item > span:first-child { flex: none; font-size: 1.1rem; }
#sgk-view .sg-plan-item div { color: var(--sk-ink); font-weight: 800; min-width: 0; }
#sgk-view .sg-plan-item small { color: var(--sk-muted); font-weight: 600; margin-top: 1px; }
#sgk-view .sg-week { gap: 10px; }
#sgk-view .sg-week-day { background: var(--sk-surface-2); border: 1px solid var(--sk-line); border-radius: var(--sk-r); padding: 10px; }
#sgk-view .sg-week-day.today { background: #fff; border-color: var(--sk-primary-200); box-shadow: 0 0 0 3px var(--sk-primary-50); }
#sgk-view .sg-week-day .sg-plan-item { margin-top: 6px; }
#sgk-view .sg-week-h { color: var(--sk-muted); font-weight: 700; margin-bottom: 2px; }
#sgk-view .sg-week-h b { color: var(--sk-ink); font-weight: 800; }

/* --- Chọn môn: chip trắng, môn đang chọn = nền nhạt theo màu môn (--sc) --- */
#sgk-view .sg-subjects { gap: 8px; padding: 2px 2px 8px; margin: 4px 0 6px; }
#sgk-view .sg-subject {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 16px;
  background: #fff; border: 1px solid var(--sk-line); border-radius: 999px; box-shadow: var(--sk-sh-1);
  font-weight: 800; font-size: .95rem; color: var(--sk-text);
}
#sgk-view .sg-subject:hover { border-color: var(--sk-line-2); color: var(--sk-ink); }
#sgk-view .sg-subject.active {
  background: color-mix(in srgb, var(--sc) 10%, #fff); color: var(--sk-ink);
  border-color: var(--sc); box-shadow: inset 0 0 0 1px var(--sc);
}
/* màu nhấn mặc định của phòng: sgk.css dùng var(--sc, navy) cho nút chính/đoạn chọn; chỗ nào không có màu môn
   (hàng Học kỳ, Sổ lỗi, màn làm bài) trước đây ra navy lạc tông -> mặc định = cam chính. Khối có màu môn vẫn tự ghi đè --sc. */
#sgk-arena { --sc: var(--sk-primary); }
#sgk-view .sg-headrow { gap: 10px; }
#sgk-view .sg-tools { margin-top: 8px; }
#sgk-view .sg-badge { background: var(--sk-red); font-weight: 800; }

/* --- Chuyên đề + danh sách bài --- */
#sgk-view .sg-topic {
  background: #fff; border: 1px solid var(--sk-line); border-left: 4px solid var(--sc);
  border-radius: var(--sk-r); box-shadow: var(--sk-sh-1); margin-bottom: 10px;
}
#sgk-view .sg-topic.open { box-shadow: var(--sk-sh-2); }
#sgk-view .sg-topic-head { gap: 12px; min-height: 60px; padding: 10px 14px 10px 12px; }
#sgk-view .sg-topic-head:hover { background: var(--sk-surface-2); }
#sgk-view .sg-topic-head > span:last-child { color: var(--sk-faint); font-size: .8rem; }
#sgk-view .sg-topic-ic {
  flex: none; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem; background: color-mix(in srgb, var(--sc) 10%, #fff); border-radius: 12px;
}
#sgk-view .sg-topic-title { font-weight: 800; color: var(--sk-ink); line-height: 1.3; }
#sgk-view .sg-topic-prog { flex: none; background: var(--sk-surface-3); color: var(--sk-muted); border-radius: 999px; padding: 3px 10px; font-size: .8rem; }
#sgk-view .sg-topic-prog b { color: var(--sk-ink); }
#sgk-view .sg-lessons { border-top: 1px solid var(--sk-line); padding: 10px 14px 12px; }
#sgk-view .sg-objectives { background: var(--sk-surface-2); color: var(--sk-text); font-weight: 600; border-radius: 12px; padding: 10px 12px; margin-bottom: 4px; line-height: 1.45; }
#sgk-view .sg-lesson { gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--sk-surface-3); }
/* khối chữ giãn hết chỗ -> nút Học/Học lại luôn dồn về bên phải (trước đây nút dính sát tên bài) */
#sgk-view .sg-lesson > div { flex: 1 1 auto; min-width: 0; }
#sgk-view .sg-lesson > .ex-btn { flex: none; }
#sgk-view .sg-lesson-st { width: 34px; height: 34px; background: var(--sk-surface-3); color: var(--sk-muted); font-weight: 800; }
#sgk-view .sg-lesson.done .sg-lesson-st { background: var(--sk-green-50); color: var(--sk-green); }
#sgk-view .sg-lesson.good .sg-lesson-st { background: var(--sk-amber-50); color: #92400E; }
#sgk-view .sg-lesson.weak .sg-lesson-st { background: var(--sk-red-50); color: #991B1B; }
#sgk-view .sg-lesson-title { color: var(--sk-ink); font-weight: 800; font-size: .95rem; line-height: 1.3; }
#sgk-view .sg-lesson-sub { color: var(--sk-muted); font-weight: 600; font-size: .78rem; margin-top: 2px; }
#sgk-view .sg-ref { color: var(--sk-blue); font-weight: 800; }

/* --- Bài giảng: các bước + trang trình chiếu --- */
#sgk-view .sg-steps { gap: 6px; margin-bottom: 12px; }
#sgk-view .sg-step { display: flex; align-items: center; justify-content: center; min-height: 36px; padding: 4px; border-radius: 999px; background: var(--sk-surface-3); color: var(--sk-muted); font-weight: 800; font-size: .78rem; }
#sgk-view .sg-step.cur { background: var(--sc); color: #fff; }
@media (max-width: 640px) { #sgk-view .sg-steps { gap: 4px; } #sgk-view .sg-step { font-size: .7rem; white-space: nowrap; padding: 4px 2px; } }
#sgk-view .sg-step.done { background: var(--sk-green-50); color: var(--sk-green); }
#sgk-view .sg-lesson-meta { color: var(--sk-muted); font-weight: 600; }
#sgk-view .sg-slide { background: #fff; border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); box-shadow: var(--sk-sh-2); padding: 18px; }
#sgk-view .sg-slide-visual { background: var(--sk-surface-2); border-radius: var(--sk-r); padding: 14px; margin-bottom: 12px; }
#sgk-view .sg-slide-text { color: var(--sk-ink); font-weight: 600; }
#sgk-view .sg-dots { margin: 12px 0; }

/* --- Kết quả / đánh giá --- */
#sgk-view .sg-grade { font-weight: 800; }
#sgk-view .sg-next-reason { background: var(--sk-blue-50); border: 1px solid #BFDBFE; color: #1E3A8A; border-radius: 12px; padding: 10px 12px; }
#sgk-view .sg-skill-row { border-bottom: 1px solid var(--sk-surface-3); padding: 8px 0; color: var(--sk-text); }
#sgk-view .sg-h4 { color: var(--sk-ink); font-weight: 800; }
#sgk-view .sg-parent summary { min-height: 44px; display: flex; align-items: center; color: var(--sk-ink); font-weight: 800; }
#sgk-view .sg-mastered { color: var(--sk-green); }
/* gợi ý, chẩn đoán lỗi, bài đọc, nhãn thử thách (learn.css) - chỉ trong phòng SGK */
#sgk-view .sk-hint { background: var(--sk-amber-50); border: 1px solid #FDE68A; color: #713F12; border-radius: 12px; font-weight: 600; }
#sgk-view .sk-diag { background: var(--sk-red-50); border: 1px solid #FECACA; color: #7F1D1D; border-radius: 12px; }
#sgk-view .sk-passage { background: var(--sk-amber-50); border: 1px solid #FDE68A; border-radius: var(--sk-r); }
#sgk-view .sk-why-ans { background: var(--sk-blue-50); }
#sgk-view .sk-challenge-tag { background: var(--sk-amber-50); color: #92400E; border: 1px solid #FDE68A; font-weight: 800; }

/* --- 4 cấp độ mỗi bài: thẻ trắng, màu cấp chỉ ở ô biểu tượng --- */
#sgk-view .sg-lv-ref { background: var(--sk-blue-50); color: #1D4ED8; border: 0; font-weight: 800; }
#sgk-view .sg-lv-grid { gap: 12px; }
#sgk-view .sg-lv {
  min-height: 80px; gap: 14px; padding: 14px 16px; background: #fff; border: 1px solid var(--sk-line);
  border-radius: var(--sk-r-lg); box-shadow: var(--sk-sh-1); color: var(--sk-text);
  transition: transform .12s, box-shadow .12s, border-color .12s;
}
@media (hover: hover) { #sgk-view .sg-lv:hover { transform: translateY(-2px); border-color: var(--sk-line-2); box-shadow: var(--sk-sh-2); } }
#sgk-view .sg-lv-ic { flex: none; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; border-radius: 16px; background: var(--sk-surface-3); }
#sgk-view .sg-lv.lv1 .sg-lv-ic { background: var(--sk-amber-50); }
#sgk-view .sg-lv.lv2 .sg-lv-ic { background: var(--sk-blue-50); }
#sgk-view .sg-lv.lv3 .sg-lv-ic { background: #F5F3FF; }
#sgk-view .sg-lv.lv4 .sg-lv-ic { background: #FDF2F8; }
#sgk-view .sg-lv-t b { color: var(--sk-ink); font-weight: 800; }
#sgk-view .sg-lv-t small { color: var(--sk-muted); }
#sgk-view .sg-lv-st { background: var(--sk-surface-3); color: var(--sk-text); font-size: .8rem; }
#sgk-view .sg-lv.sug { border-color: var(--sk-primary); box-shadow: 0 0 0 3px var(--sk-primary-100); }
#sgk-view .sg-lv-badge { background: var(--sk-primary); top: -10px; padding: 3px 10px; }
#sgk-view .sg-lv-note { color: var(--sk-muted); font-weight: 600; }
@media (max-width: 600px) {
  #sgk-view .sg-lv { padding: 12px 14px; min-height: 72px; }
  #sgk-view .sg-lv-ic { width: 46px; height: 46px; font-size: 1.6rem; border-radius: 14px; }
}

/* --- Sổ lỗi --- */
#sgk-view .sg-err { border-left: 4px solid var(--sk-red); }
#sgk-view .sg-err.fixed { border-left-color: var(--sk-green); }
#sgk-view .sg-err-h { color: var(--sk-muted); font-weight: 700; }
#sgk-view .sg-err-q { color: var(--sk-ink); }

/* --- Báo cáo cho bố mẹ ngay trong phòng SGK (ld-*) --- */
#sgk-view .ld { gap: 14px; color: var(--sk-text); }
#sgk-view .ld-title { color: var(--sk-ink); font-weight: 800; }
#sgk-view .ld-sub, #sgk-view .ld-note { color: var(--sk-muted); font-weight: 600; }
#sgk-view .ld-kpi { background: #fff; border: 1px solid var(--sk-line); border-radius: var(--sk-r); box-shadow: var(--sk-sh-1); padding: 8px 12px; }
#sgk-view .ld-kpi b { color: var(--sk-ink); font-weight: 800; }
#sgk-view .ld-kpi span { color: var(--sk-muted); }
#sgk-view .ld-card { background: #fff; border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); box-shadow: var(--sk-sh-1); padding: 16px; }
#sgk-view .ld-card h4 { color: var(--sk-ink); font-weight: 800; }
#sgk-view .ld-comp { background: var(--sk-surface-2); border: 1px solid var(--sk-line); }
#sgk-view .ld-skill, #sgk-view .ld-err { border-bottom: 1px solid var(--sk-surface-3); }
#sgk-view .ld-bar { background: var(--sk-surface-3); }
#sgk-view .ld-day-bar { background: var(--sk-surface-3); }
#sgk-view .ld-day-bar span { background: var(--sk-blue); }
#sgk-view .ld-tier { border-radius: var(--sk-r); }
#sgk-view .ld-empty { color: var(--sk-faint); }

/* =====================================================================
 * 1b. ĐẦU KHUNG TRÒ GỌN TRÊN ĐIỆN THOẠI (5 phòng trò của nhóm Học)
 *     nhãn tên trò 1 dòng (cắt "..." - cấp độ đã hiện ở thanh cấp ngay dưới), nút nghe không xuống dòng,
 *     khung trò bớt đệm -> câu hỏi lên cao hơn, bé thấy ngay không phải cuộn. Không đổi hàng tab (theme.css lo).
 * ===================================================================== */
@media (max-width: 640px) {
  :is(#math-view, #vietnamese-view, #english-view, #mathfun-view, #enfun-view) .game-card { padding: 14px 12px 16px; border-radius: var(--sk-r-lg); }
  :is(#math-view, #vietnamese-view, #english-view) .game-header { gap: 8px; margin-bottom: 10px; align-items: center; }
  :is(#math-view, #vietnamese-view, #english-view, #mathfun-view, #enfun-view) .game-badge {
    flex: 1 1 auto; min-width: 0; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    padding: 6px 12px; font-size: .82rem; line-height: 1.3;
  }
  :is(#math-view, #vietnamese-view, #english-view) .game-header .voice-btn { flex: none; white-space: nowrap; min-height: 40px; padding: 6px 12px; font-size: .84rem; }
  :is(#math-view, #vietnamese-view, #english-view) .difficulty-level-bar { margin-bottom: 10px; }
  :is(#math-view, #vietnamese-view, #english-view) .section-instruction { margin-bottom: 10px; font-size: .88rem; }
}

/* =====================================================================
 * 2. TOÁN HỌC KỲ DIỆU (math-view) - khung bao quanh hình minh hoạ: nền nhạt phẳng, viền 1px
 *    (ô trống cần điền vẫn giữ nét đứt vì nó mang nghĩa "chỗ trống")
 * ===================================================================== */
#math-view .counting-box { background: var(--sk-surface-2); border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); }
#math-view .count-item:not(.counted) { border: 2px solid var(--sk-line); box-shadow: 0 3px 0 var(--sk-line-2); }
#math-view .compare-side { background: var(--sk-surface-2); border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); }
#math-view .compare-middle-slot { background: var(--sk-amber-50); border: 2px dashed #F59E0B; border-radius: 18px; }
#math-view .equation-part { background: var(--sk-green-50); border: 1px solid #BBF7D0; border-radius: var(--sk-r-lg); }
#math-view .equation-part.question-part { background: var(--sk-red-50); border: 2px dashed #FCA5A5; color: var(--sk-red); }
#math-view .part-num { color: #15803D; }
#math-view .train-car { border-width: 3px; }
#math-view .shape-showcase-box { background: var(--sk-surface-2); border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); box-shadow: none; }
#math-view .scale-showcase-card { background: var(--sk-blue-50); border: 1px solid #BFDBFE; border-radius: var(--sk-r-lg); box-shadow: none; }
#math-view .sk-word-problem { background: var(--sk-amber-50); border: 1px solid #FDE68A; border-radius: var(--sk-r-lg); box-shadow: none; }

/* =====================================================================
 * 3. BÉ GIỎI TIẾNG VIỆT (vietnamese-view) + hộp Khám phá chữ cái (.letter-explorer-card)
 * ===================================================================== */
/* bảng 29 chữ cái: thẻ trắng kiểu "bấm lún", bỏ phóng to + bóng hồng khi rê chuột */
#vietnamese-view .letter-card {
  background: #fff; border: 2px solid var(--sk-line); border-radius: 18px;
  box-shadow: 0 3px 0 var(--sk-line-2); transition: transform .1s, box-shadow .1s, border-color .12s;
}
@media (hover: hover) { #vietnamese-view .letter-card:hover { transform: translateY(-2px); border-color: #FDA4AF; box-shadow: 0 5px 0 #FDA4AF; } }
#vietnamese-view .letter-card:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--sk-line-2); }
#vietnamese-view .letter-card.explored-done { background: var(--sk-green-50); border-color: #86EFAC; box-shadow: 0 3px 0 #86EFAC; }
#vietnamese-view .letter-main { color: #E11D48; }
#vietnamese-view .letter-pair-sub { color: var(--sk-text); }
#vietnamese-view .letter-explore-hint { background: var(--sk-surface-3); color: var(--sk-muted); border-radius: 999px; }
.letter-explorer-card { border: 0; border-radius: var(--sk-r-xl); box-shadow: 0 24px 60px rgba(15, 23, 42, .25); }
.letter-explorer-card .letter-modal-glow { text-shadow: none; animation: none; color: #E11D48; }
.letter-explorer-card .letter-pronounce-pill { background: #FFF1F2; border: 1px solid #FECDD3; color: #BE123C; border-radius: 999px; }
.letter-explorer-card .letter-illustration-container { background: var(--sk-surface-2); border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); box-shadow: none; }
.letter-explorer-card .letter-big-emoji { animation: none; filter: none; }
.letter-explorer-card .letter-word-title { color: var(--sk-ink); }
.letter-explorer-card .letter-word-desc { color: var(--sk-text); font-weight: 600; }
.letter-explorer-card .btn-letter-act { min-height: 48px; border-radius: 14px; transform: none; }
.letter-explorer-card .btn-letter-speak { background: var(--sk-primary); color: #fff; box-shadow: 0 4px 0 var(--sk-primary-700); }
.letter-explorer-card .btn-letter-random { background: #fff; color: var(--sk-text); border: 1px solid var(--sk-line); box-shadow: 0 3px 0 var(--sk-line-2); }
@media (hover: hover) {
  .letter-explorer-card .btn-letter-speak:hover { transform: none; background: var(--sk-primary-600); box-shadow: 0 4px 0 var(--sk-primary-700); }
  .letter-explorer-card .btn-letter-random:hover { transform: none; background: var(--sk-surface-2); box-shadow: 0 3px 0 var(--sk-line-2); }
  .letter-explorer-card .btn-nav-letter:hover { transform: none; background: var(--sk-surface-2); border-color: var(--sk-line-2); color: var(--sk-ink); }
}
.letter-explorer-card .btn-letter-act:active { transform: translateY(3px); box-shadow: none; }
.letter-explorer-card .btn-nav-letter { min-height: 44px; padding: 8px 12px; background: #fff; border: 1px solid var(--sk-line); border-radius: 12px; color: var(--sk-text); white-space: nowrap; }
/* 5 dấu thanh */
#vietnamese-view .tone-card { background: #fff; border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); box-shadow: var(--sk-sh-1); }
@media (hover: hover) { #vietnamese-view .tone-card:hover { transform: translateY(-2px); border-color: #FDA4AF; box-shadow: var(--sk-sh-2); } }
#vietnamese-view .tone-title { color: #BE123C; }
#vietnamese-view .tone-mark { color: var(--sk-muted); }
#vietnamese-view .tone-example { color: var(--sk-ink); }
#vietnamese-view .tone-desc { color: var(--sk-text); }
#vietnamese-view .tone-play-btn { min-height: 40px; background: #FFF1F2; border: 1px solid #FECDD3; color: #BE123C; border-radius: 999px; font-weight: 800; }
/* ráp chữ thành từ: ô trống giữ nét đứt (chỗ cần điền), chữ để bấm = nút bấm lún */
#vietnamese-view .letter-slot { background: var(--sk-surface-2); border: 2px dashed var(--sk-line-2); border-radius: 14px; }
#vietnamese-view .letter-slot.filled { background: var(--sk-amber-50); border: 2px solid #F59E0B; color: #B45309; }
#vietnamese-view .pool-letter-btn { background: #fff; border: 2px solid var(--sk-line); color: #1D4ED8; border-radius: 16px; box-shadow: 0 4px 0 var(--sk-line-2); }
#vietnamese-view .pool-letter-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--sk-line-2); }
#vietnamese-view .btn-clear-spell { min-height: 44px; background: #fff; border: 1px solid #FECACA; color: var(--sk-red); border-radius: 999px; }
/* đố mẹo, đọc hiểu, kể chuyện */
#vietnamese-view .riddle-scroll-box { background: var(--sk-amber-50); border: 1px solid #FDE68A; border-radius: var(--sk-r-lg); box-shadow: none; }
#vietnamese-view .riddle-icon-badge { border: 1px solid #FDE68A; box-shadow: var(--sk-sh-1); }
#vietnamese-view .sk-reading-passage { background: var(--sk-surface-2); border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); box-shadow: none; }
#vietnamese-view .story-card { border: 1px solid var(--sk-line); border-radius: var(--sk-r); box-shadow: var(--sk-sh-1); }
#vietnamese-view .story-card:hover { border-color: var(--sk-line-2); box-shadow: var(--sk-sh-2); }
#vietnamese-view .story-card.done { border-color: #86EFAC; background: var(--sk-green-50); }

/* =====================================================================
 * 4. BÉ HỌC TIẾNG ANH (english-view)
 * ===================================================================== */
#english-view .english-word-card { border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); box-shadow: var(--sk-sh-1); }
@media (hover: hover) { #english-view .english-word-card:hover { border-color: #93C5FD; box-shadow: var(--sk-sh-2); } }
/* nút "Nghe đọc" trên thẻ = nút phụ giống nút đọc chung (.voice-btn) */
#english-view .btn-en-speak {
  background: var(--sk-blue-50); color: #1D4ED8; border: 1px solid #BFDBFE; border-radius: 999px; box-shadow: none;
  min-height: 44px; font-weight: 800;
}
#english-view .btn-en-speak:hover { background: #DBEAFE; color: #1E40AF; box-shadow: none; }
/* "Bấm để nghe" là hành động chính của màn -> nút cam bấm lún */
#english-view .btn-big-listen-en { background: var(--sk-primary); color: #fff; border: 0; border-radius: var(--sk-r); box-shadow: 0 4px 0 var(--sk-primary-700); }
@media (hover: hover) { #english-view .btn-big-listen-en:hover { background: var(--sk-primary-600); transform: none; box-shadow: 0 4px 0 var(--sk-primary-700); } }
#english-view .btn-big-listen-en:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--sk-primary-700); }
/* thẻ đáp án hình: kiểu bấm lún như .game-opt-btn; đúng/sai lấy theo bộ chung */
#english-view .en-quiz-opt-card { background: #fff; border: 2px solid var(--sk-line); border-radius: 18px; box-shadow: 0 4px 0 var(--sk-line-2); }
@media (hover: hover) { #english-view .en-quiz-opt-card:hover { transform: translateY(-1px); border-color: #93C5FD; box-shadow: 0 5px 0 #93C5FD; } }
#english-view .en-quiz-opt-card.correct-answer { background: var(--sk-green-50) !important; border-color: var(--sk-green) !important; box-shadow: 0 4px 0 #15803D !important; }
#english-view .en-quiz-opt-card.wrong-answer { background: var(--sk-red-50) !important; border-color: var(--sk-red) !important; box-shadow: 0 4px 0 #B91C1C !important; }
/* micro: giữ màu đỏ (= đang chờ nói), bỏ gradient + viền trắng dày */
#english-view .btn-mic, #enfun-view .btn-mic { background: var(--sk-red); border: 0; box-shadow: 0 6px 0 #991B1B; }
#english-view .btn-mic.listening, #enfun-view .btn-mic.listening { background: var(--sk-green); box-shadow: 0 6px 0 #166534; }
#english-view .ar-btn.gray { background: #fff; color: var(--sk-text); border: 1px solid var(--sk-line); border-radius: var(--sk-r); box-shadow: 0 3px 0 var(--sk-line-2); font-weight: 800; }

/* =====================================================================
 * 5. TOÁN SIÊU VUI (mathfun-view) + TIẾNG ANH SIÊU VUI (enfun-view) - FunRoom
 * ===================================================================== */
/* nút lớn (.ar-btn dùng chung với phòng thi đấu - chỉ đổi trong 2 phòng này): xanh/cam gradient -> cam phẳng bấm lún, xám -> nút phụ trắng */
#mathfun-view .ar-btn, #enfun-view .ar-btn {
  background: var(--sk-primary); color: #fff; border: 0; border-radius: var(--sk-r);
  box-shadow: 0 4px 0 var(--sk-primary-700); font-weight: 800; transition: transform .08s, box-shadow .08s, background .12s;
}
#mathfun-view .ar-btn:hover, #enfun-view .ar-btn:hover { background: var(--sk-primary-600); }
#mathfun-view .ar-btn:active, #enfun-view .ar-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--sk-primary-700); }
#mathfun-view .ar-btn.gray, #enfun-view .ar-btn.gray { background: #fff; color: var(--sk-text); border: 1px solid var(--sk-line); box-shadow: 0 3px 0 var(--sk-line-2); }
#mathfun-view .ar-btn.gray:hover, #enfun-view .ar-btn.gray:hover { background: var(--sk-surface-2); }
#mathfun-view .ar-btn:disabled, #enfun-view .ar-btn:disabled { opacity: .5; transform: none; }
#mathfun-view .ar-title, #enfun-view .ar-title { color: var(--sk-ink); font-weight: 800; }
#mathfun-view .ar-sub, #enfun-view .ar-sub { color: var(--sk-muted); font-weight: 600; }
/* vùng thả (khay, tiền đã chọn, câu đang ghép): nét đứt mảnh = "chỗ để đặt vào" */
#mathfun-view .fk-tray, #mathfun-view .fs-chosen { background: var(--sk-surface-2); border: 2px dashed var(--sk-line-2); border-radius: var(--sk-r); }
#enfun-view .es-answer { background: var(--sk-blue-50); border: 2px dashed #93C5FD; border-radius: var(--sk-r); }
/* lời thoại nhân vật */
#mathfun-view .fk-bubble { background: var(--sk-amber-50); border: 1px solid #FDE68A; border-radius: var(--sk-r); }
#mathfun-view .fk-order { color: #B45309; }
#mathfun-view .fk-tray-label { color: var(--sk-ink); font-weight: 800; }
/* món ăn để bấm: bấm lún */
#mathfun-view .fk-food { border: 2px solid var(--sk-line); border-radius: 18px; box-shadow: 0 4px 0 var(--sk-line-2); }
#mathfun-view .fk-food:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--sk-line-2); }
/* Tháp số: viên gạch phẳng cam nhạt; đang chọn = xanh */
#mathfun-view .ft-hud .pill { background: #fff; color: var(--sk-ink); border: 1px solid var(--sk-line); box-shadow: var(--sk-sh-1); font-weight: 800; }
#mathfun-view .ft-tower { border-radius: var(--sk-r-lg); }
#mathfun-view .ft-floor { background: var(--sk-primary); border-color: var(--sk-primary-700); border-radius: 8px; }
#mathfun-view .ft-brick { background: var(--sk-primary-100); border: 2px solid var(--sk-primary-200); color: #9A3412; border-radius: 14px; box-shadow: 0 4px 0 var(--sk-primary-200); }
#mathfun-view .ft-brick.picked { background: #DBEAFE; border-color: var(--sk-blue); color: #1E3A8A; box-shadow: 0 4px 0 #93C5FD; }
/* Cửa hàng: giữ màu tờ tiền, chỉ làm mảnh viền */
#mathfun-view .fs-bill { border: 2px solid rgba(15, 23, 42, .12); box-shadow: 0 3px 0 rgba(15, 23, 42, .12); }
#mathfun-view .fs-good small { color: #B45309; }
/* Đua xe: chip bảng nhân giống chip chung */
#mathfun-view .duel-chip { min-height: 44px; border: 1px solid var(--sk-line); box-shadow: var(--sk-sh-1); font-weight: 800; color: var(--sk-text); }
#mathfun-view .duel-chip.active { background: var(--sk-primary-50); border-color: var(--sk-primary); color: var(--sk-primary-700); box-shadow: inset 0 0 0 1px var(--sk-primary); }
#mathfun-view .fr-track { border-radius: var(--sk-r-lg); }
/* Thám tử số */
#mathfun-view .fd-clue { background: var(--sk-amber-50); border: 1px solid #FDE68A; border-radius: 12px; }
#mathfun-view .fd-num { border-width: 1px; }
#mathfun-view .fd-num.armed { border-width: 2px; }
#mathfun-view .fd-tries { color: var(--sk-muted); }
/* Lộ trình lớp 1 */
#mathfun-view .g1-row { background: #fff; border: 1px solid var(--sk-line); border-radius: var(--sk-r); box-shadow: var(--sk-sh-1); padding: 10px 12px; }
#mathfun-view .g1-row.done { background: var(--sk-green-50); border-color: #BBF7D0; }
#mathfun-view .g1-name { color: var(--sk-ink); font-weight: 800; }
#mathfun-view .g1-sub { color: var(--sk-muted); }
#mathfun-view .jn-bar span { background: var(--sk-green); }

/* --- Tiếng Anh Siêu Vui --- */
#enfun-view .es-hint { color: var(--sk-text); }
#enfun-view .es-word { border: 2px solid var(--sk-line); box-shadow: 0 3px 0 var(--sk-line-2); color: var(--sk-ink); }
#enfun-view .es-word:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--sk-line-2); }
#enfun-view .es-word.placed { border-color: #60A5FA; box-shadow: 0 3px 0 #93C5FD; }
#enfun-view .es-word.bad { border-color: var(--sk-red); background: var(--sk-red-50); box-shadow: 0 3px 0 #FCA5A5; }
#enfun-view .ec-bubble { background: var(--sk-blue-50); border: 1px solid #BFDBFE; border-radius: var(--sk-r); }
#enfun-view .ec-en { color: #1E3A8A; }
#enfun-view .ec-opt { border: 2px solid var(--sk-line); box-shadow: 0 4px 0 var(--sk-line-2); border-radius: var(--sk-r); }
#enfun-view .ec-opt.right { border-color: var(--sk-green); background: var(--sk-green-50); box-shadow: 0 4px 0 #86EFAC; }
#enfun-view .ec-opt.wrong { border-color: var(--sk-red); background: var(--sk-red-50); box-shadow: 0 4px 0 #FCA5A5; }
#enfun-view .ep-sky { border-radius: var(--sk-r-lg); }
#enfun-view .esi-say { background: var(--sk-primary-50); border: 1px solid var(--sk-primary-200); border-radius: var(--sk-r); }
#enfun-view .esi-tile { border: 2px solid var(--sk-line); border-radius: var(--sk-r); box-shadow: 0 4px 0 var(--sk-line-2); }
#enfun-view .esi-tile:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--sk-line-2); }
#enfun-view .esi-tile.right { border-color: var(--sk-green); background: var(--sk-green-50); box-shadow: 0 4px 0 #86EFAC; }
#enfun-view .esi-no { border: 2px solid #FCA5A5; background: var(--sk-red-50); color: #B91C1C; box-shadow: 0 4px 0 #FCA5A5; }
#enfun-view .esi-no:active { transform: translateY(3px); box-shadow: 0 1px 0 #FCA5A5; }
/* danh sách chủ đề chat / truyện / bài hát (.mu-song-card dùng chung với phòng Âm nhạc -> chỉ đổi ở đây) */
#enfun-view .mu-song-card { border-width: 1px; border-color: var(--sk-line); border-radius: var(--sk-r-lg); box-shadow: var(--sk-sh-1); transition: transform .12s, box-shadow .12s, border-color .12s; }
@media (hover: hover) { #enfun-view .mu-song-card:hover { transform: translateY(-2px); border-color: var(--sk-line-2); box-shadow: var(--sk-sh-2); } }
#enfun-view .mu-song-card.done { border-color: #86EFAC; background: var(--sk-green-50); }
#enfun-view .eb-line { background: #fff; border: 1px solid var(--sk-line); border-radius: 12px; }
#enfun-view .eb-line.lit { border-color: #93C5FD; background: var(--sk-blue-50); }
#enfun-view .eb-en { color: #1E3A8A; }
#enfun-view .ek-line.now { background: var(--sk-amber-50); transform: none; }
#enfun-view .tl-speak { background: #fff; border: 1px solid var(--sk-line); }

/* =====================================================================
 * 6. VIDEO HỌC VUI (video-view) - danh sách, trình phát, hộp cần tài khoản
 * ===================================================================== */
/* (bộ lọc chủ đề/lớp + bố cục danh sách: agent chính làm riêng - không style ở đây) */
/* dải "tạo tài khoản": bỏ viền nét đứt, thành thông báo vàng nhạt bấm được */
#video-view .vl-lockbar { min-height: 48px; border: 1px solid #FDE68A; border-radius: var(--sk-r); background: var(--sk-amber-50); color: #92400E; font-weight: 700; box-shadow: var(--sk-sh-1); }
#video-view .vl-lockbar:hover { border-color: #FCD34D; }
#video-view .vl-lockbar b { font-weight: 800; }
/* thẻ video: trắng viền mảnh, màu chủ đề chỉ còn ở ảnh bìa + nút ▶ */
#video-view .vl-card { border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); box-shadow: var(--sk-sh-1); gap: 8px; transition: transform .12s, box-shadow .12s, border-color .12s; }
#video-view .vl-card:hover { transform: translateY(-2px); border-color: var(--vc); box-shadow: var(--sk-sh-2); }
#video-view .vl-card b { color: var(--sk-ink); font-weight: 800; line-height: 1.3; padding: 0 2px; }
#video-view .vl-card small { color: var(--sk-muted); font-weight: 600; padding: 0 2px; }
#video-view .vl-thumb { border-radius: 14px; }
#video-view .vl-play { box-shadow: 0 2px 6px rgba(15, 23, 42, .18); }
/* trình phát */
#video-view .vl-frame { border-radius: var(--sk-r-lg); box-shadow: var(--sk-sh-2); }
#video-view .vl-frame:fullscreen { border-radius: 0; }
#video-view .vl-ctrl { gap: 8px; margin-top: 14px; }
#video-view .vl-btn { border: 1px solid var(--sk-line); border-radius: 12px; box-shadow: 0 3px 0 var(--sk-line-2); color: var(--sk-text); transition: transform .08s, box-shadow .08s, background .12s; }
#video-view .vl-btn:hover { background: var(--sk-surface-2); color: var(--sk-ink); }
#video-view .vl-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--sk-line-2); }
#video-view .vl-btn.primary { background: var(--sk-primary); border-color: var(--sk-primary); color: #fff; box-shadow: 0 4px 0 var(--sk-primary-700); }
#video-view .vl-btn.primary:hover { background: var(--sk-primary-600); }
#video-view .vl-btn.primary:active { box-shadow: 0 1px 0 var(--sk-primary-700); }
#video-view .vl-side { border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); box-shadow: var(--sk-sh-1); }
#video-view .vl-side h3 { color: var(--sk-ink); font-weight: 800; }
#video-view .vl-side-tx b { color: var(--sk-ink); font-weight: 800; }
#video-view .vl-side-tx small { color: var(--sk-muted); font-weight: 600; }
/* hộp cần tài khoản */
#video-view .vl-gate-head, #video-view #vl-gate-form .ac-section { border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); box-shadow: var(--sk-sh-1); }
#video-view .vl-gate-head h3 { color: var(--sk-ink); font-weight: 800; }
#video-view .vl-gate-head p { color: var(--sk-text); font-weight: 600; }
#video-view #vl-gate-form .ac-tab { min-height: 44px; border: 1px solid var(--sk-line); color: var(--sk-text); }
#video-view #vl-gate-form .ac-tab.active { background: var(--sk-primary-50); color: var(--sk-primary-700); border-color: var(--sk-primary); box-shadow: inset 0 0 0 1px var(--sk-primary); }
#video-view #vl-gate-form .ar-input { border: 1px solid var(--sk-line-2); border-radius: 12px; min-height: 48px; }
#video-view #vl-gate-form .ar-input:focus { border-color: var(--sk-primary); box-shadow: 0 0 0 4px rgba(249, 115, 22, .14); outline: none; }
#video-view #vl-gate-form .ar-btn { background: var(--sk-primary); color: #fff; border: 0; border-radius: var(--sk-r); box-shadow: 0 4px 0 var(--sk-primary-700); font-weight: 800; }
#video-view #vl-gate-form .ar-btn:hover { background: var(--sk-primary-600); }
#video-view #vl-gate-form .ar-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--sk-primary-700); }


/* ===== css/theme/thi.css ===== */
/* Sam Kido v144 - giao diện mới: nhóm "thi" (nạp sau css/base/theme.css). Xem đầu file theme.css.
 * Gồm: Phòng Luyện Thi (exam-view, khối .ex-*), Đấu trường (arena-view), Hai người một máy (duel-view),
 * Đổi quà (gift-view), hộp Đua tốc độ (.speed-card).
 * Quy ước riêng của nhóm thi: navy (--sk-navy) là màu nhấn "nghiêm túc" cho trạng thái ĐANG CHỌN
 * (đáp án, lớp, số câu, câu hiện tại) và số điểm; nút hành động chính vẫn là cam --sk-primary như cả app. */

/* =====================================================================
 * 1. PHÒNG LUYỆN THI - khối dùng chung .ex-* (không gắn #exam-view vì phòng Lộ trình học cũng dùng
 *    màn làm bài này; #sgk-view tự đổi màu nút chính theo môn qua --sc)
 * ===================================================================== */
#exam-view { --ex-navy: var(--sk-navy); --ex-ink: var(--sk-ink); --ex-muted: var(--sk-muted); --ex-line: var(--sk-line); }

.ex-card {
  background: #fff; border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg);
  padding: 18px; margin-bottom: 14px; box-shadow: var(--sk-sh-1);
}
.ex-h2 { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; color: var(--sk-ink); line-height: 1.3; }
/* tiêu đề mục: bỏ chữ in hoa giãn cách, cùng kiểu tiêu đề mục ở trang chủ */
.ex-h3 { font-family: var(--font-display); font-weight: 800; font-size: 1.08rem; color: var(--sk-ink); letter-spacing: 0; text-transform: none; margin: 18px 2px 10px; }
.ex-p { color: var(--sk-text); font-weight: 600; }
.ex-note, .ex-id-sub { color: var(--sk-muted); font-weight: 600; }
.ex-label { color: var(--sk-muted); font-weight: 800; letter-spacing: .06em; }

/* nút: phụ = trắng viền mảnh; chính = cam "bấm lún" */
.ex-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 10px 16px; border: 1px solid var(--sk-line); border-radius: 12px;
  background: #fff; color: var(--sk-text); box-shadow: var(--sk-sh-1);
  font-family: var(--font-body); font-weight: 800; font-size: .95rem; line-height: 1.2;
  transition: background .12s, border-color .12s, transform .08s, box-shadow .08s;
}
@media (hover: hover) { .ex-btn:not(:disabled):hover { background: var(--sk-surface-2); border-color: var(--sk-line-2); color: var(--sk-ink); } }
.ex-btn.primary { background: var(--sk-primary); border-color: var(--sk-primary); color: #fff; box-shadow: 0 4px 0 var(--sk-primary-700); }
@media (hover: hover) { .ex-btn.primary:not(:disabled):hover { background: var(--sk-primary-600); border-color: var(--sk-primary-600); color: #fff; } }
.ex-btn.primary:not(:disabled):active { transform: translateY(3px); box-shadow: 0 1px 0 var(--sk-primary-700); }
.ex-btn.ghost { background: #fff; color: var(--sk-muted); box-shadow: none; }
.ex-btn.small { min-height: 40px; padding: 6px 12px; font-size: .86rem; border-radius: 10px; }
.ex-btn:disabled { opacity: .45; box-shadow: none; cursor: default; }
/* Lộ trình học: nút chính mang màu môn (sgk.css) -> bóng "bấm lún" cũng theo màu môn */
#sgk-view .ex-btn.primary { border-color: transparent; box-shadow: 0 4px 0 color-mix(in srgb, var(--sc, var(--sk-navy)) 65%, #000); }
#sgk-view .ex-btn.primary:not(:disabled):active { box-shadow: 0 1px 0 color-mix(in srgb, var(--sc, var(--sk-navy)) 65%, #000); }
@media (hover: hover) { #sgk-view .ex-btn.primary:not(:disabled):hover { background: var(--sc, var(--sk-navy)); filter: brightness(1.08); } }

/* biểu tượng lớn đầu thẻ (cổng vào, kết quả đầu vào, đua tốc độ, chứng nhận): đặt trong ô nền nhạt */
.ex-seal { width: 76px; height: 76px; margin: 2px auto 8px; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; line-height: 1; background: var(--sk-blue-50); border-radius: 22px; }

/* ---- phiên làm bài ---- */
.ex-top.ex-top-exam .ex-top-title { font-weight: 800; font-size: 1rem; color: var(--sk-ink); }
.ex-top.ex-top-exam .ex-back { border-radius: 12px; min-height: 40px; }
/* đồng hồ: khối navy chữ trắng, phút cuối chuyển đỏ (bỏ nhấp nháy) */
.ex-timer { background: var(--ex-navy, var(--sk-navy)); color: #fff; border-radius: 12px; padding: 8px 12px; font-weight: 800; font-size: 1.1rem; min-width: 76px; }
.ex-timer.warn { background: var(--sk-red); animation: none; }
.ex-sec { color: var(--sk-muted); font-weight: 700; font-size: .86rem; margin: 2px 2px 8px; }
.ex-sec strong { color: var(--sk-ink); }
.ex-nav { gap: 6px; margin-bottom: 14px; }
.ex-dot { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--sk-line); background: #fff; color: var(--sk-muted); font-weight: 800; font-size: .8rem; }
.ex-dot.done { background: var(--sk-blue-50); color: var(--ex-navy, var(--sk-navy)); border-color: #BFDBFE; }
.ex-dot.ok { background: var(--sk-green-50); color: #166534; border-color: #86EFAC; }
.ex-dot.bad { background: var(--sk-red-50); color: #991B1B; border-color: #FCA5A5; }
.ex-dot.cur { outline: 2px solid var(--ex-navy, var(--sk-navy)); outline-offset: 2px; }
.ex-dot.cur:not(.ok):not(.bad) { background: var(--ex-navy, var(--sk-navy)); border-color: var(--ex-navy, var(--sk-navy)); color: #fff; }
.ex-q { background: #fff; border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); padding: 20px 18px; box-shadow: var(--sk-sh-1); }
.ex-prompt { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; color: var(--sk-ink); line-height: 1.45; margin-bottom: 14px; }
.ex-prompt.small { font-size: .95rem; }
.ex-visual { margin-bottom: 12px; }
/* nút đáp án: cùng kiểu "bấm lún" với .game-opt-btn; đang chọn = navy */
.ex-opts { gap: 10px; }
.ex-opt {
  min-height: 56px; padding: 10px 14px; border: 2px solid var(--sk-line); border-radius: var(--sk-r); background: #fff;
  box-shadow: 0 3px 0 var(--sk-line-2); color: var(--sk-ink); font-family: var(--font-display); font-weight: 800; font-size: 1.05rem;
  transition: transform .08s, box-shadow .08s, border-color .12s, background .12s;
}
@media (hover: hover) { .ex-opt:hover { border-color: #93C5FD; background: #F8FBFF; } }
.ex-opt:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--sk-line-2); }
.ex-opt-l { width: 30px; height: 30px; background: var(--sk-surface-3); color: var(--sk-muted); font-family: var(--font-body); font-weight: 800; font-size: .82rem; }
.ex-opt.sel { border-color: var(--ex-navy, var(--sk-navy)); background: var(--sk-blue-50); box-shadow: 0 3px 0 var(--ex-navy, var(--sk-navy)); }
.ex-opt.sel .ex-opt-l { background: var(--ex-navy, var(--sk-navy)); color: #fff; }
.ex-q.locked .ex-opt { opacity: .9; }
.ex-listen {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 18px; margin-bottom: 12px;
  background: var(--sk-blue-50); color: #1D4ED8; border: 1px solid #BFDBFE; border-radius: 999px; font-weight: 800;
}
.ex-listen:hover { background: #DBEAFE; }
/* bàn phím số */
.ex-numpad { max-width: 280px; }
.ex-num-display { border: 2px solid var(--sk-line-2); border-radius: var(--sk-r); background: var(--sk-surface-2); color: var(--ex-navy, var(--sk-navy)); font-weight: 800; margin-bottom: 10px; }
.ex-keys { gap: 8px; }
.ex-keys button {
  min-height: 50px; border: 1px solid var(--sk-line); border-radius: 12px; background: #fff; color: var(--sk-ink);
  box-shadow: 0 3px 0 var(--sk-line-2); font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; transition: transform .08s, box-shadow .08s;
}
.ex-keys button:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--sk-line-2); }
/* ô chữ/số để xếp, nối, phân loại */
.ex-chip {
  min-height: 46px; padding: 8px 14px; border: 2px solid var(--sk-line); border-radius: 12px; background: #fff;
  box-shadow: 0 3px 0 var(--sk-line-2); color: var(--sk-ink); font-weight: 800; transition: transform .08s, box-shadow .08s;
}
.ex-chip:not(:disabled):active { transform: translateY(2px); box-shadow: 0 1px 0 var(--sk-line-2); }
.ex-chip.used { opacity: .35; box-shadow: none; }
.ex-chip.sel { border-color: var(--ex-navy, var(--sk-navy)); background: var(--sk-blue-50); box-shadow: 0 3px 0 var(--ex-navy, var(--sk-navy)); }
.ex-chip.paired { border-color: #86EFAC; background: var(--sk-green-50); box-shadow: 0 3px 0 #86EFAC; }
.ex-chip small { color: var(--sk-muted); }
/* ô chờ thả (nét đứt có nghĩa "chỗ trống") - giữ nét đứt nhưng màu trung tính */
.ex-seqbox { border: 2px dashed var(--sk-line-2); border-radius: var(--sk-r); background: var(--sk-surface-2); padding: 10px; gap: 8px; }
.ex-seqbox .ex-chip { box-shadow: none; border-color: #BFDBFE; background: var(--sk-blue-50); }
.ex-ph { color: var(--sk-faint); font-weight: 700; }
.ex-bins { gap: 10px; }
.ex-bin { border: 2px dashed var(--sk-line-2); border-radius: var(--sk-r); background: var(--sk-surface-2); padding: 10px; }
.ex-bin-name { color: var(--sk-ink); font-weight: 800; }
.ex-bin-items span { background: #fff; border: 1px solid var(--sk-line); border-radius: 8px; padding: 3px 9px; }
.ex-bin-items em { color: var(--sk-faint); }
.ex-feedback { border-radius: var(--sk-r); padding: 12px 14px; font-weight: 700; color: var(--sk-text); border: 1px solid transparent; }
.ex-feedback.ok { background: var(--sk-green-50); border-color: #BBF7D0; color: #166534; }
.ex-feedback.bad { background: var(--sk-red-50); border-color: #FECACA; color: #991B1B; }
.ex-explain { color: var(--sk-text); font-weight: 600; }
.ex-session-actions { gap: 10px; }
.ex-session-actions + .ex-id-sub { margin-top: 10px; }
/* luyện có chấm ngay: khi nút "Kiểm tra" còn hiện thì "Tiếp" lùi thành nút phụ - chỉ một nút cam nổi bật */
.ex-session-actions:has(#ex-check:not([style*="none"])) #ex-next { background: #fff; border-color: var(--sk-line); color: var(--sk-text); box-shadow: var(--sk-sh-1); filter: none; }
.ex-report { color: var(--sk-muted); }
.ex-passage { background: var(--sk-amber-50); border: 1px solid #FDE68A; border-radius: var(--sk-r); padding: 12px 14px; color: var(--sk-ink); }
.ex-grid, .ex-spot > div { background: var(--sk-surface-2); border-radius: var(--sk-r); }
.ex-pan { background: var(--sk-surface-3); }
.ex-prompt .ex-vi { color: var(--sk-muted); font-family: var(--font-body); }

/* ---- kết quả, bảng, sổ lỗi, kế hoạch ---- */
.ex-score { font-weight: 800; color: var(--ex-navy, var(--sk-navy)); }
.ex-insight { background: var(--sk-surface-2); border: 1px solid var(--sk-line); border-radius: var(--sk-r); padding: 10px 14px; color: var(--sk-text); font-weight: 600; }
.ex-review { gap: 10px; }
/* viền trái xanh/đỏ có nghĩa đúng/sai -> giữ, chỉ làm mảnh lại */
.ex-review-item { border: 1px solid var(--sk-line); border-left: 4px solid var(--sk-line-2); border-radius: 12px; padding: 10px 12px; background: #fff; }
.ex-review-item.ok { border-left-color: var(--sk-green); }
.ex-review-item.bad { border-left-color: var(--sk-red); }
.ex-review-head { color: var(--sk-muted); font-weight: 800; }
.ex-table th { color: var(--sk-muted); font-weight: 800; letter-spacing: .04em; border-bottom-color: var(--sk-line); }
.ex-table td { border-bottom-color: var(--sk-line); color: var(--sk-text); }
.ex-table tr.me td { background: var(--sk-blue-50); color: var(--sk-ink); }
.ex-bar { background: var(--sk-line); }
.ex-bar span { background: var(--ex-navy, var(--sk-navy)); border-radius: 999px; }
.ex-prog { border-bottom: 1px solid var(--sk-line); }
.ex-prog:last-child { border-bottom: 0; }
.ex-prog-name { color: var(--sk-ink); font-weight: 800; }
.ex-spark i { background: #93C5FD; }
.ex-spark i:last-child { background: var(--ex-navy, var(--sk-navy)); }
.ex-input { border: 1px solid var(--sk-line-2); border-radius: 12px; background: #fff; color: var(--sk-ink); font-weight: 700; }
.ex-input:focus { outline: none; border-color: var(--sk-primary); box-shadow: 0 0 0 4px rgba(249, 115, 22, .14); }
.ex-tasks { gap: 8px; }
.ex-task { border: 1px solid var(--sk-line); border-radius: 12px; padding: 8px 12px; min-height: 56px; color: var(--sk-ink); background: #fff; }
.ex-task.done { background: var(--sk-green-50); border-color: #BBF7D0; color: #166534; }
.ex-week { gap: 6px; }
.ex-week span { border: 1px solid var(--sk-line); border-radius: 10px; padding: 6px 10px; text-align: center; color: var(--sk-text); background: #fff; }
.ex-week span.on { background: var(--sk-green-50); border-color: #BBF7D0; color: #166534; }
.ex-week span.now { background: var(--ex-navy, var(--sk-navy)); border-color: var(--ex-navy, var(--sk-navy)); color: #fff; }

/* =====================================================================
 * 2. PHÒNG LUYỆN THI - các màn riêng (#exam-view)
 * ===================================================================== */
/* cổng vào */
#exam-view .ex-gate { padding: 28px 22px; }
#exam-view .ex-gate .ex-h2 { font-size: 1.45rem; }
#exam-view .ex-gate .ex-p { max-width: 540px; margin-left: auto; margin-right: auto; }

/* thẻ đầu trang phòng thi: khối navy phẳng (bỏ gradient + bóng màu) */
#exam-view .ex-hero { background: var(--sk-navy); border-radius: var(--sk-r-xl); padding: 14px 16px 16px; margin-bottom: 14px; box-shadow: var(--sk-sh-2); }
#exam-view .ex-hero-top { margin-bottom: 12px; }
#exam-view .ex-hero-top #ex-cert { width: 44px; min-width: 44px; height: 44px; padding: 0 !important; justify-content: center; font-size: 1.2rem; }
#exam-view .ex-brand { font-family: var(--font-body); font-weight: 800; font-size: .74rem; letter-spacing: .14em; opacity: .75; }
#exam-view .ex-hero-card { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--sk-r-lg); padding: 12px 14px; gap: 14px; }
#exam-view .ex-hero-rank { width: 56px; height: 56px; font-size: 1.9rem; box-shadow: 0 0 0 3px rgba(255, 255, 255, .22); }
#exam-view .ex-hero-name { font-weight: 800; font-size: 1.2rem; }
#exam-view .ex-hero-sub { font-weight: 600; opacity: .82; }
#exam-view .ex-hero-bar { height: 6px; background: rgba(255, 255, 255, .18); margin-top: 8px; }
#exam-view .ex-hero-grade label { font-weight: 800; opacity: .75; letter-spacing: .04em; margin-bottom: 4px; }
/* chọn lớp: kiểu "chọn đoạn" - ô đang chọn trắng chữ navy */
#exam-view .ex-seg.light { border: 0; background: rgba(255, 255, 255, .1); border-radius: 12px; padding: 3px; gap: 2px; }
#exam-view .ex-seg.light button { min-width: 40px; min-height: 40px; border-radius: 9px; font-weight: 800; color: rgba(255, 255, 255, .85); }
#exam-view .ex-seg.light button.active { background: #fff; color: var(--sk-navy); box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
#exam-view .ex-kpis { gap: 8px; margin-top: 12px; }
#exam-view .ex-kpi { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); border-radius: var(--sk-r); padding: 10px 6px; }
#exam-view .ex-kpi b { font-weight: 800; font-size: 1.3rem; }
#exam-view .ex-kpi small { font-weight: 700; opacity: .75; font-size: .72rem; line-height: 1.25; display: block; }

/* Mục tiêu + Hôm nay: bỏ viền trái dày màu */
#exam-view .ex-row2 { gap: 14px; margin-bottom: 4px; }
#exam-view .ex-row2 > .ex-card { margin-bottom: 0; }
#exam-view .ex-target2, #exam-view .ex-today { border-left: 1px solid var(--sk-line); gap: 8px; }
#exam-view .ex-target-name { font-weight: 800; color: var(--sk-ink); }
#exam-view .ex-countdown { color: var(--sk-muted); font-weight: 700; }
#exam-view .ex-countdown b { font-weight: 800; color: var(--sk-navy); }
#exam-view .ex-today-list { gap: 6px; }
#exam-view .ex-today-item { min-height: 44px; padding: 8px 12px; border: 1px solid var(--sk-line); border-radius: 12px; background: var(--sk-surface-2); color: var(--sk-ink); font-size: .88rem; gap: 8px; }
@media (hover: hover) { #exam-view .ex-today-item:hover { background: #fff; border-color: var(--sk-line-2); } }
#exam-view .ex-today-item.done { background: var(--sk-green-50); border-color: #BBF7D0; color: #166534; }
#exam-view .ex-section-head { align-items: baseline; margin-top: 8px; }
#exam-view .ex-section-head .ex-id-sub { text-align: right; }

/* thẻ kỳ thi: bỏ viền trên màu; màu kỳ thi chỉ còn ở ô biểu tượng + vòng điểm */
#exam-view .ex-exams { gap: 14px; }
#exam-view .ex-exam { border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); padding: 16px; gap: 10px; box-shadow: var(--sk-sh-1); transition: border-color .12s, box-shadow .12s; }
@media (hover: hover) { #exam-view .ex-exam:hover { border-color: var(--sk-line-2); box-shadow: var(--sk-sh-2); } }
#exam-view .ex-exam-head { gap: 12px; }
#exam-view .ex-exam-ic { width: 48px; height: 48px; flex: none; display: flex; align-items: center; justify-content: center; font-size: 1.7rem; border-radius: 14px; background: color-mix(in srgb, var(--ec, var(--sk-navy)) 12%, #fff); }
#exam-view .ex-exam-name { font-weight: 800; font-size: 1.05rem; color: var(--sk-ink); line-height: 1.3; }
#exam-view .ex-exam .ex-id-sub { font-size: .84rem; margin-top: 2px; }
#exam-view .ex-ring { width: 52px; height: 52px; }
#exam-view .ex-ring span { width: 42px; height: 42px; font-weight: 800; }
#exam-view .ex-exam-meta { gap: 6px; }
#exam-view .ex-exam-meta span { background: var(--sk-surface-3); color: var(--sk-muted); font-weight: 800; padding: 4px 10px; font-size: .74rem; }
#exam-view .ex-exam-actions { gap: 8px; margin-top: auto; padding-top: 4px; }
#exam-view .ex-exam-actions .ex-btn { padding: 8px 6px; font-size: .9rem; white-space: nowrap; }
#exam-view .ex-exam-actions .ex-btn.ghost { flex: 0 0 44px; padding: 0; }

/* công cụ luyện thi */
#exam-view .ex-tools { gap: 12px; }
#exam-view .ex-tool { border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); padding: 16px 8px 14px; gap: 6px; box-shadow: var(--sk-sh-1); transition: border-color .12s, box-shadow .12s, transform .12s; }
@media (hover: hover) { #exam-view .ex-tool:hover { border-color: var(--sk-line-2); box-shadow: var(--sk-sh-2); transform: translateY(-1px); } }
#exam-view .ex-tool-ic { width: 48px; height: 48px; border-radius: 14px; font-size: 1.5rem; margin-bottom: 2px; }
#exam-view .ex-tool b { font-size: .92rem; font-weight: 800; color: var(--sk-ink); }
#exam-view .ex-tool small { font-size: .74rem; font-weight: 600; color: var(--sk-muted); }

/* luyện theo dạng: bỏ viền trái màu, mức đạt thể hiện ở thanh tiến độ */
#exam-view .ex-types { gap: 10px; }
#exam-view .ex-type { border: 1px solid var(--sk-line); border-radius: var(--sk-r); padding: 12px 14px; background: #fff; box-shadow: var(--sk-sh-1); }
@media (hover: hover) { #exam-view .ex-type:hover { border-color: var(--sk-line-2); background: var(--sk-surface-2); } }
#exam-view .ex-type-name { font-weight: 800; color: var(--sk-ink); margin-bottom: 2px; }
#exam-view .ex-type .ex-bar { margin-top: 8px; height: 6px; }
#exam-view .ex-type.mid .ex-bar span { background: var(--sk-amber); }
#exam-view .ex-type.good { border-color: #BBF7D0; background: var(--sk-green-50); }
#exam-view .ex-type.good .ex-bar span { background: var(--sk-green); }

/* chọn đề thi thử: ô đang chọn = navy (thay màu từng kỳ thi cho đồng bộ) */
#exam-view .ex-setup .ex-h2 { margin: 0 0 4px; }
#exam-view .ex-setup .ex-label { margin-top: 18px; }
#exam-view .ex-setup-row { gap: 10px; margin-top: 8px; }
#exam-view .ex-setup-opt { min-height: 64px; border: 1px solid var(--sk-line); border-radius: var(--sk-r); background: #fff; box-shadow: var(--sk-sh-1); color: var(--sk-ink); padding: 10px 12px; }
@media (hover: hover) { #exam-view .ex-setup-opt:not(.active):hover { border-color: var(--sk-line-2); background: var(--sk-surface-2); } }
#exam-view .ex-setup-opt b { font-family: var(--font-display); font-weight: 800; }
#exam-view .ex-setup-opt small { color: var(--sk-muted); font-weight: 600; }
#exam-view .ex-setup-opt.active { border-color: var(--sk-navy); background: var(--sk-blue-50); box-shadow: inset 0 0 0 1px var(--sk-navy); color: var(--sk-navy); }
#exam-view .ex-setup-sum { gap: 10px; margin: 20px 0 10px; }
#exam-view .ex-setup-sum div { background: var(--sk-surface-2); border: 1px solid var(--sk-line); border-radius: var(--sk-r); padding: 10px 8px; }
#exam-view .ex-setup-sum b { font-family: var(--font-display); font-weight: 800; color: var(--sk-navy); }
#exam-view .ex-setup-sum small { font-weight: 700; }
#exam-view .ex-setup-sec { background: var(--sk-surface-2); border: 1px solid var(--sk-line); border-radius: 12px; padding: 9px 12px; color: var(--sk-text); }
#exam-view .ex-setup-sec.think { background: #F5F3FF; border-color: #DDD6FE; color: #5B21B6; }
#exam-view #ex-setup-go { min-width: 220px; min-height: 52px; font-size: 1.05rem; border-radius: 14px; }
/* sổ tay từ vựng TIMO */
#exam-view .ex-vocab > summary.ex-h3 { margin: 0; min-height: 28px; }
#exam-view .ex-vocab-topic > b { color: var(--sk-ink); font-weight: 800; }
#exam-view .ex-vocab-w { border: 1px solid var(--sk-line); border-radius: 12px; box-shadow: var(--sk-sh-1); }
@media (hover: hover) { #exam-view .ex-vocab-w:hover { border-color: #67E8F9; background: #F0FDFF; } }

/* kết quả */
#exam-view .ex-result-main { gap: 16px; }
#exam-view .ex-result .ex-h2 { font-size: 1.15rem; }

/* ca thi chung & mùa giải: bỏ viền trên màu */
#exam-view .ex-daily-card, #exam-view .ex-season { border-top: 1px solid var(--sk-line); }
#exam-view .ex-daily-card .ex-exam-ic, #exam-view .ex-season .ex-exam-ic { background: color-mix(in srgb, var(--ec, var(--sk-navy)) 12%, #fff); }
#exam-view .ex-slots { gap: 8px; margin: 14px 0; }
#exam-view .ex-slot { border: 1px solid var(--sk-line); border-radius: 12px; background: var(--sk-surface-2); padding: 10px 6px; }
#exam-view .ex-slot b { color: var(--sk-ink); font-weight: 800; }
#exam-view .ex-slot small { color: var(--sk-muted); font-weight: 600; }
#exam-view .ex-slot.cur { border-color: var(--sk-navy); background: var(--sk-blue-50); box-shadow: inset 0 0 0 1px var(--sk-navy); }
#exam-view .ex-slot.done { border-color: #86EFAC; background: var(--sk-green-50); box-shadow: none; }

/* chứng nhận: giữ khung đôi kiểu giấy khen, bỏ nền gradient */
#exam-view .ex-cert-border { border: 4px double var(--sk-navy); border-radius: var(--sk-r); background: #FFFDF5; padding: 26px 18px; }
#exam-view .ex-cert-border .ex-seal { background: #fff; }
#exam-view .ex-cert-title { font-size: 1.5rem; }

@media (max-width: 640px) {
  .ex-card { padding: 16px 14px; }
  .ex-q { padding: 16px 14px; }
  /* đầu màn làm bài gọn hơn: ô số câu nhỏ lại để đề 30-50 câu chiếm ít hàng */
  .ex-sec { margin-bottom: 6px; font-size: .82rem; }
  .ex-nav { gap: 5px; margin-bottom: 12px; }
  .ex-dot { width: 30px; height: 30px; border-radius: 9px; font-size: .76rem; }
  /* thẻ bé: ô chọn lớp xuống hàng riêng, giãn hết chiều ngang (trước đây ép cột tên còn vài chữ mỗi dòng) */
  #exam-view .ex-hero { padding: 12px 12px 14px; border-radius: var(--sk-r-lg); }
  #exam-view .ex-hero-card { flex-wrap: wrap; padding: 12px; gap: 12px; }
  #exam-view .ex-hero-info { flex: 1 1 0; }
  #exam-view .ex-hero-grade { flex: 1 1 100%; display: flex; align-items: center; gap: 10px; text-align: left; }
  #exam-view .ex-hero-grade label { margin: 0; }
  #exam-view .ex-hero-grade .ex-seg { flex: 1; display: flex; }
  #exam-view .ex-hero-grade .ex-seg button { flex: 1; }
  #exam-view .ex-kpis { grid-template-columns: repeat(2, 1fr); }
  #exam-view .ex-kpi { display: flex; align-items: center; justify-content: center; gap: 8px; text-align: left; padding: 8px 10px; }
  #exam-view .ex-kpi b { font-size: 1.15rem; }
  #exam-view .ex-section-head { flex-wrap: wrap; }
  #exam-view .ex-section-head .ex-h3 { margin-bottom: 0; }
  #exam-view .ex-section-head .ex-id-sub { text-align: left; margin: 0 2px 10px; }
  #exam-view .ex-tools { gap: 10px; }
  #exam-view .ex-gate { padding: 22px 16px; }
}

/* =====================================================================
 * 3. ĐẤU TRƯỜNG (#arena-view) + HAI NGƯỜI MỘT MÁY (#duel-view) + ĐỔI QUÀ (#gift-view)
 *    .ar-* còn dùng ở nhiều phòng khác (thú cưng, âm nhạc, tài khoản...) nên luôn gắn id phòng
 * ===================================================================== */
#arena-view .ar-card, #duel-view .ar-card {
  background: #fff; border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg);
  padding: 22px 18px; margin-bottom: 14px; box-shadow: var(--sk-sh-2);
}
#arena-view .ar-title, #duel-view .ar-title { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; color: var(--sk-ink); }
#arena-view .ar-sub, #duel-view .ar-sub, #arena-view .ar-hint, #duel-view .ar-hint, #arena-view .ar-empty { color: var(--sk-muted); font-weight: 600; }
#arena-view .ar-label, #duel-view .ar-label { font-family: var(--font-body); font-weight: 800; font-size: .92rem; color: var(--sk-ink); margin: 14px 0 8px; }

/* ô chọn môn / tuổi / số câu: cùng kiểu tab chung (đang chọn = nền cam nhạt viền cam) */
#arena-view .ar-pills { gap: 8px; }
#arena-view .ar-pill {
  min-height: 46px; border: 1px solid var(--sk-line); border-radius: 12px; background: #fff; box-shadow: var(--sk-sh-1);
  color: var(--sk-text); font-weight: 800; font-size: .92rem; transition: background .12s, border-color .12s;
}
@media (hover: hover) { #arena-view .ar-pill:not(.active):hover { background: var(--sk-surface-2); border-color: var(--sk-line-2); } }
#arena-view .ar-pill.active { background: var(--sk-primary-50); border-color: var(--sk-primary); color: var(--sk-primary-700); box-shadow: inset 0 0 0 1px var(--sk-primary); }

/* nút: mặc định + xanh = hành động chính (cam bấm lún); cam vàng = nút phụ tô nhạt; xám = nút phụ trắng */
#arena-view .ar-btn, #duel-view .ar-btn, #gift-view .ar-btn {
  min-height: 52px; border: 0; border-radius: 14px; background: var(--sk-primary); color: #fff;
  box-shadow: 0 4px 0 var(--sk-primary-700); font-family: var(--font-body); font-weight: 800; font-size: 1.05rem;
  transition: background .12s, transform .08s, box-shadow .08s;
}
#arena-view .ar-btn:not(:disabled):active, #duel-view .ar-btn:not(:disabled):active, #gift-view .ar-btn:not(:disabled):active { transform: translateY(3px); box-shadow: 0 1px 0 var(--sk-primary-700); }
@media (hover: hover) { #arena-view .ar-btn:not(:disabled):hover, #duel-view .ar-btn:not(:disabled):hover, #gift-view .ar-btn:not(:disabled):hover { background: var(--sk-primary-600); } }
#arena-view .ar-btn.orange, #duel-view .ar-btn.orange { background: var(--sk-primary-50); color: var(--sk-primary-700); border: 1px solid var(--sk-primary-200); box-shadow: none; }
@media (hover: hover) { #arena-view .ar-btn.orange:not(:disabled):hover, #duel-view .ar-btn.orange:not(:disabled):hover { background: var(--sk-primary-100); } }
#arena-view .ar-btn.gray, #duel-view .ar-btn.gray, #gift-view .ar-btn.gray { background: #fff; color: var(--sk-text); border: 1px solid var(--sk-line); box-shadow: var(--sk-sh-1); }
@media (hover: hover) { #arena-view .ar-btn.gray:not(:disabled):hover, #duel-view .ar-btn.gray:not(:disabled):hover, #gift-view .ar-btn.gray:not(:disabled):hover { background: var(--sk-surface-2); border-color: var(--sk-line-2); } }
#arena-view .ar-btn.orange:not(:disabled):active, #arena-view .ar-btn.gray:not(:disabled):active, #duel-view .ar-btn.gray:not(:disabled):active, #gift-view .ar-btn.gray:not(:disabled):active { box-shadow: none; }
#arena-view .ar-btn + .ar-btn, #duel-view .ar-btn + .ar-btn { margin-top: 10px; }
#arena-view .ar-btn + .ar-hint, #duel-view .ar-btn + .ar-hint { margin-top: 12px; }
#arena-view .ar-inline .ar-btn { min-height: 48px; margin-top: 0; }

/* ô nhập */
#arena-view .ar-input, #duel-view .ar-input { min-height: 48px; border: 1px solid var(--sk-line-2); border-radius: 12px; color: var(--sk-ink); font-weight: 700; }
#arena-view .ar-input:focus, #duel-view .ar-input:focus, #arena-view .ar-code-input:focus { border-color: var(--sk-primary); box-shadow: 0 0 0 4px rgba(249, 115, 22, .14); }
#arena-view .ar-code-input { border: 1px solid var(--sk-line-2); border-radius: var(--sk-r); font-weight: 800; color: var(--sk-ink); background: var(--sk-surface-2); }
/* mã phòng to cho chủ phòng: bỏ viền nét đứt */
#arena-view .ar-code-big { background: var(--sk-blue-50); border: 1px solid #BFDBFE; border-radius: var(--sk-r-lg); color: var(--sk-navy); font-weight: 800; }
#arena-view .ar-player-chip { background: var(--sk-surface-3); color: var(--sk-ink); font-weight: 800; }
#arena-view .ar-class-chip { background: var(--sk-blue-50); border: 1px solid #BFDBFE; color: var(--sk-navy); }
#arena-view .ar-table th { background: var(--sk-surface-3); font-weight: 800; color: var(--sk-muted); }
#arena-view .ar-table td.num { color: var(--sk-navy); }
#arena-view .ar-hist-item { background: var(--sk-surface-2); border: 1px solid var(--sk-line); border-radius: var(--sk-r); }

/* màn thi */
#arena-view .ar-hud .pill { background: var(--sk-surface-3); border: 0; color: var(--sk-ink); font-family: var(--font-body); font-weight: 800; padding: 7px 14px; }
#arena-view .ar-timer, #duel-view .ar-timer { height: 10px; background: var(--sk-line); }
#arena-view .ar-timer > div { background: var(--sk-primary); }
#arena-view .ar-q-text { font-weight: 800; font-size: 1.45rem; color: var(--sk-ink); }
#arena-view .ar-opts { gap: 12px; }
/* nút đáp án: cùng kiểu "bấm lún" của .game-opt-btn */
#arena-view .ar-opt {
  min-height: 64px; border: 2px solid var(--sk-line); border-radius: 18px; background: #fff; box-shadow: 0 4px 0 var(--sk-line-2);
  color: var(--sk-ink); font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; transition: transform .08s, box-shadow .08s, border-color .12s, background .12s;
}
@media (hover: hover) { #arena-view .ar-opt:not(:disabled):hover { border-color: #93C5FD; background: #F8FBFF; } }
#arena-view .ar-opt:not(:disabled):active { transform: translateY(3px); box-shadow: 0 1px 0 var(--sk-line-2); }
#arena-view .ar-opt.picked { border-color: var(--sk-blue); background: var(--sk-blue-50); box-shadow: 0 4px 0 #93C5FD; }
#arena-view .ar-opt.right { background: var(--sk-green); border-color: #15803D; box-shadow: 0 4px 0 #166534; color: #fff; }
#arena-view .ar-opt.wrong { background: var(--sk-red); border-color: #B91C1C; box-shadow: 0 4px 0 #991B1B; color: #fff; }
#arena-view .ar-opt:disabled { opacity: 1; }
#arena-view .ar-opt:disabled:not(.right):not(.wrong) { opacity: .7; }
#arena-view .ar-feedback, #duel-view .ar-feedback { font-weight: 800; }
#arena-view .ar-countdown, #duel-view .ar-countdown { color: var(--sk-primary); font-weight: 800; }

/* bảng xếp hạng: bỏ gradient, giữ màu vàng/bạc/đồng nhạt cho top 3 */
#arena-view .ar-row { background: var(--sk-surface-2); border: 1px solid transparent; border-radius: 12px; color: var(--sk-ink); }
#arena-view .ar-row.r1 { background: #FFF8E1; }
#arena-view .ar-row.r2 { background: var(--sk-surface-3); }
#arena-view .ar-row.r3 { background: #FFF1E6; }
#arena-view .ar-row.me { background: var(--sk-primary-50); border: 1px solid var(--sk-primary-200); }
#arena-view .ar-row .rk { font-weight: 800; }
#arena-view .ar-row .pt, #arena-view .ar-podium .p .pt { color: var(--sk-navy); font-weight: 800; }
#arena-view .ar-row .nm small { color: var(--sk-muted); font-weight: 600; }
#arena-view .ar-podium .p { border-radius: 14px 14px 6px 6px; font-weight: 800; }
#arena-view .ar-podium .p1 { background: #FDE68A; }
#arena-view .ar-podium .p2 { background: var(--sk-line); }
#arena-view .ar-podium .p3 { background: #FED7AA; }
#arena-view .ar-tabs-filter { gap: 8px; }
#arena-view .ar-tabs-filter .ar-pill { min-height: 44px; padding: 4px 6px; font-size: .86rem; white-space: nowrap; }

/* ---- Hai người một máy ---- */
#duel-view .duel-chips { gap: 8px; }
#duel-view .duel-chip { min-height: 44px; padding: 8px 16px; border: 1px solid var(--sk-line); border-radius: 999px; background: #fff; box-shadow: var(--sk-sh-1); color: var(--sk-text); font-weight: 800; }
@media (hover: hover) { #duel-view .duel-chip:not(.active):hover { background: var(--sk-surface-2); border-color: var(--sk-line-2); } }
#duel-view .duel-chip.active { background: var(--sk-primary-50); border-color: var(--sk-primary); color: var(--sk-primary-700); box-shadow: inset 0 0 0 1px var(--sk-primary); }
/* hai nửa màn hình: giữ màu hồng / xanh để phân biệt hai bạn, viền mảnh lại */
#duel-view .duel-half { border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); box-shadow: var(--sk-sh-1); }
#duel-view .duel-half.top { background: #FFF7FB; border-color: #FBCFE8; }
#duel-view .duel-half.bottom { background: #F5FAFF; border-color: #BFDBFE; }
#duel-view .duel-head { color: var(--sk-ink); font-weight: 800; }
#duel-view .duel-score { background: var(--sk-amber-50); border: 1px solid #FDE68A; color: #92400E; font-weight: 800; }
#duel-view .duel-q { font-weight: 800; color: var(--sk-ink); }
#duel-view .duel-opt {
  border: 2px solid var(--sk-line); border-radius: var(--sk-r); background: #fff; box-shadow: 0 3px 0 var(--sk-line-2);
  color: var(--sk-ink); font-weight: 800; transition: transform .08s, box-shadow .08s;
}
#duel-view .duel-opt:not(:disabled):active { transform: translateY(2px); box-shadow: 0 1px 0 var(--sk-line-2); }
#duel-view .duel-opt.picked { border-color: var(--sk-blue); background: var(--sk-blue-50); }
#duel-view .duel-opt.right { background: var(--sk-green); border-color: #15803D; box-shadow: 0 3px 0 #166534; color: #fff; }
#duel-view .duel-opt.wrong { background: var(--sk-red); border-color: #B91C1C; box-shadow: 0 3px 0 #991B1B; color: #fff; }
#duel-view .duel-opt:disabled { opacity: 1; }
#duel-view .duel-fb { font-weight: 800; }
#duel-view .duel-mid .pill { background: var(--sk-ink); font-weight: 800; }
#duel-view .duel-timer { background: var(--sk-line); }
#duel-view .duel-timer span { background: var(--sk-primary); }
#duel-view .duel-quit { width: 40px; height: 40px; border-radius: 12px; background: #fff; border: 1px solid var(--sk-line); color: var(--sk-text); font-weight: 800; }
#duel-view .duel-result { gap: 12px; }
#duel-view .duel-res { border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); background: #fff; box-shadow: var(--sk-sh-1); padding: 14px 10px; }
#duel-view .duel-res.win { background: var(--sk-amber-50); border-color: #FCD34D; }
#duel-view .duel-res-nm { color: var(--sk-ink); font-weight: 800; }
#duel-view .duel-res-pt { color: var(--sk-navy); font-weight: 800; }
#duel-view .duel-res small { color: var(--sk-muted); font-weight: 600; }

/* ---- Đổi quà kim cương ---- */
#gift-view .gf-balance { background: #fff; border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); box-shadow: var(--sk-sh-1); padding: 16px 18px; gap: 14px; margin-bottom: 16px; }
#gift-view .gf-balance > span:first-child { width: 60px; height: 60px; flex: none; display: flex; align-items: center; justify-content: center; background: #ECFEFF; border-radius: 18px; }
#gift-view .gf-balance b { font-weight: 800; color: #0E7490; }
#gift-view .gf-balance > div { color: var(--sk-text); font-weight: 700; }
#gift-view .gf-grid { gap: 12px; }
#gift-view .gf-item { border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); background: #fff; box-shadow: var(--sk-sh-1); padding: 16px 12px 14px; gap: 6px; }
#gift-view .gf-item .gf-ic { width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; font-size: 2.3rem; background: var(--sk-surface-3); border-radius: 18px; margin-bottom: 2px; }
#gift-view .gf-item .gf-nm { color: var(--sk-ink); font-weight: 800; font-size: .9rem; line-height: 1.3; }
#gift-view .gf-item .gf-pr { color: #0E7490; font-weight: 800; }
#gift-view .gf-item.owned { background: var(--sk-green-50); border-color: #BBF7D0; }
#gift-view .gf-item.owned .gf-ic { background: #fff; }
#gift-view .gf-item.owned .gf-pr { color: #166534; }
#gift-view .gf-item.real { background: var(--sk-amber-50); border-color: #FDE68A; }
#gift-view .gf-item.real .gf-ic { background: #fff; }
#gift-view .gf-item .ar-btn { width: 100%; font-size: .95rem; }
#gift-view .gf-history { color: var(--sk-text); }

/* =====================================================================
 * 4. HỘP ĐUA TỐC ĐỘ (speed-challenge.js: .speed-modal > .modal-card.speed-card)
 * ===================================================================== */
.speed-card { position: relative; padding: 30px 22px 24px; border-radius: var(--sk-r-xl); }
.speed-card .modal-close-btn {
  position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 12px; background: var(--sk-surface-3); color: var(--sk-text); font-size: 1.05rem; font-weight: 800; cursor: pointer;
}
.speed-card .modal-close-btn:hover { background: var(--sk-line); color: var(--sk-ink); }
/* biểu tượng đầu hộp: ô nền nhạt, bỏ nhấp nháy */
.speed-card .speed-logo-icon, .speed-card .speed-victory-icon {
  width: 76px; height: 76px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 2.6rem; line-height: 1; background: var(--sk-amber-50); border-radius: 22px; animation: none;
}
.speed-card .speed-title, .speed-card .speed-victory-title { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; color: var(--sk-ink); margin: 10px 0 6px; background: none; -webkit-text-fill-color: currentColor; }
.speed-card .speed-subtitle, .speed-card .speed-victory-sub { color: var(--sk-muted); font-weight: 600; font-size: .95rem; }
.speed-card .speed-stats-badge-row { gap: 8px; }
.speed-card .speed-stat-chip { background: var(--sk-surface-3); border: 0; border-radius: 999px; color: var(--sk-text); font-weight: 700; font-size: .86rem; padding: 7px 14px; }
.speed-card .speed-stat-chip strong { color: var(--sk-ink); }
.speed-card .speed-rules-box { background: var(--sk-surface-2); border: 1px solid var(--sk-line); border-radius: var(--sk-r); color: var(--sk-text); font-weight: 600; padding: 12px 16px; margin-bottom: 20px; }
.speed-card .speed-rules-box p { margin: 4px 0; }
.speed-card .btn-start-speed-now {
  min-height: 54px; padding: 12px 28px; border: 0; border-radius: 14px; background: var(--sk-primary); color: #fff;
  box-shadow: 0 4px 0 var(--sk-primary-700); font-family: var(--font-body); font-size: 1.08rem; font-weight: 800; transition: background .12s, transform .08s, box-shadow .08s;
}
@media (hover: hover) { .speed-card .btn-start-speed-now:hover { background: var(--sk-primary-600); transform: none; box-shadow: 0 4px 0 var(--sk-primary-700); } }
.speed-card .btn-start-speed-now:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--sk-primary-700); }
.speed-card .speed-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.speed-card .modal-btn-cancel {
  min-height: 54px; padding: 12px 22px; border: 1px solid var(--sk-line); border-radius: 14px; background: #fff; color: var(--sk-text);
  font-family: var(--font-body); font-size: 1rem; font-weight: 800; cursor: pointer; box-shadow: var(--sk-sh-1);
}
.speed-card .modal-btn-cancel:hover { background: var(--sk-surface-2); }
/* đang đua */
.speed-card .speed-hud-bar { background: var(--sk-surface-2); border: 1px solid var(--sk-line); border-radius: var(--sk-r); padding: 10px 14px; margin-bottom: 16px; }
.speed-card .hud-item { color: var(--sk-ink); font-weight: 800; }
.speed-card .speed-timer-track { background: var(--sk-line); }
.speed-card .speed-timer-fill { background: var(--sk-primary); }
.speed-card .speed-q-box { background: var(--sk-surface-2); border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); padding: 22px 16px; }
.speed-card .speed-q-text { color: var(--sk-ink); font-weight: 800; }
.speed-card .speed-opts-grid { gap: 12px; }
.speed-card .speed-opt-btn {
  min-height: 60px; border: 2px solid var(--sk-line); border-radius: 18px; background: #fff; box-shadow: 0 4px 0 var(--sk-line-2);
  color: var(--sk-ink); font-weight: 800; transition: transform .08s, box-shadow .08s, border-color .12s, background .12s;
}
@media (hover: hover) { .speed-card .speed-opt-btn:not(:disabled):hover { transform: translateY(-1px); border-color: #93C5FD; background: #F8FBFF; } }
.speed-card .speed-opt-btn:not(:disabled):active { transform: translateY(3px); box-shadow: 0 1px 0 var(--sk-line-2); }
.speed-card .speed-opt-btn.correct-answer { background: var(--sk-green); border-color: #15803D; box-shadow: 0 4px 0 #166534; color: #fff; }
.speed-card .speed-opt-btn.wrong-answer { background: var(--sk-red); border-color: #B91C1C; box-shadow: 0 4px 0 #991B1B; color: #fff; }
/* kết quả */
.speed-card .speed-result-stars-box { background: var(--sk-amber-50); border: 1px solid #FDE68A; border-radius: var(--sk-r); color: #92400E; font-weight: 800; }
.speed-card .speed-highscore-notice { color: var(--sk-green); font-weight: 700; }
@media (max-width: 640px) {
  /* đấu trường trên điện thoại: thẻ câu hỏi thấp hơn để 4 đáp án nằm gọn một màn */
  #arena-view .ar-card, #duel-view .ar-card { padding: 16px 14px; }
  #arena-view .ar-q-icon { font-size: 2.6rem; }
  #arena-view .ar-q-text { font-size: 1.25rem; margin: 4px 0 12px; }
  #arena-view .ar-timer { margin: 4px 0 8px; }
}
@media (max-width: 640px) {
  .speed-card { padding: 26px 16px 20px; }
  .speed-card .speed-title, .speed-card .speed-victory-title { font-size: 1.35rem; padding: 0 30px; }
  .speed-card .btn-start-speed-now { width: 100%; }
}

/* =====================================================================
 * v169: TRANG RIÊNG TỪNG KỲ THI (ExamRoom.render_exam) - người dùng: "phần này quan trọng, tách ra riêng từng cái"
 * đầu trang màu của kỳ thi (--ec), hình 3D, nhãn thông tin; ô thành tích; 3 nút Thi thử / Luyện từng dạng / In đề
 * ===================================================================== */
#exam-view .ex-ep { position: relative; overflow: hidden; padding: 0 !important; }
#exam-view .ex-ep-head { display: flex; align-items: center; gap: 18px; padding: 22px 24px; color: #fff; background: var(--ec) linear-gradient(135deg, color-mix(in srgb, var(--ec) 80%, #fff), var(--ec)); }
#exam-view .ex-ep-ic { flex: none; display: flex; align-items: center; justify-content: center; width: 88px; height: 88px; border-radius: 26px; background: rgba(255, 255, 255, .96); font-size: 2.8rem; box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .35); }
#exam-view .ex-ep-ic .sk-e3d { width: 72%; height: 72%; }
#exam-view .ex-ep-tx { min-width: 0; }
#exam-view .ex-ep-tx .ex-h2 { margin: 0; color: #fff; font-size: 1.65rem; text-align: left; text-shadow: 0 2px 0 rgba(0, 0, 0, .14); }
#exam-view .ex-ep-tx .ex-p { margin: 4px 0 12px; color: #fff; font-weight: 700; text-align: left; }
#exam-view .ex-ep-chips { display: flex; flex-wrap: wrap; gap: 6px; }
#exam-view .ex-ep-chips span { padding: 5px 11px; border-radius: 999px; background: rgba(255, 255, 255, .22); color: #fff; font-size: .84rem; font-weight: 800; }
#exam-view .ex-ep-warn { margin: 14px 20px 0; padding: 10px 14px; border-radius: 14px; background: #FFF7E0; color: #7A4B00; font-weight: 700; text-align: left; }
#exam-view .ex-ep-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 16px 20px 4px; }
#exam-view .ex-ep-stats div { padding: 12px 6px; border-radius: 16px; background: #F3F8FF; text-align: center; }
#exam-view .ex-ep-stats b { display: block; color: var(--sk-ink); font-size: 1.4rem; font-weight: 900; line-height: 1.2; }
#exam-view .ex-ep-stats small { color: var(--sk-muted); font-size: .8rem; font-weight: 700; }
#exam-view .ex-ep-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding: 14px 20px 22px; }
#exam-view .ex-ep-actions .ex-btn { min-height: 52px; padding: 0 24px; font-size: 1.05rem; }
#exam-view .ex-ep-hist { display: grid; gap: 6px; }
#exam-view .ex-ep-hist div { display: flex; align-items: center; gap: 12px; padding: 9px 14px; border-radius: 12px; background: #F7FAFE; }
#exam-view .ex-ep-hist b { margin-left: auto; color: var(--sk-ink); font-size: 1.1rem; font-weight: 900; }
#exam-view .ex-ep-hist small { color: var(--sk-muted); font-weight: 700; }
#exam-view .ex-exam-head[data-open] { cursor: pointer; }
#exam-view .ex-gate .ex-seal .sk-e3d { width: 1.3em; height: 1.3em; }
@media (max-width: 640px) {
  #exam-view .ex-ep-head { flex-direction: column; gap: 10px; padding: 18px 14px; text-align: center; }
  #exam-view .ex-ep-ic { width: 74px; height: 74px; border-radius: 22px; }
  #exam-view .ex-ep-tx .ex-h2, #exam-view .ex-ep-tx .ex-p { text-align: center; }
  #exam-view .ex-ep-tx .ex-h2 { font-size: 1.4rem; }
  #exam-view .ex-ep-chips { justify-content: center; }
  #exam-view .ex-ep-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px 12px 2px; gap: 8px; }
  #exam-view .ex-ep-actions { flex-direction: column; padding: 12px 12px 16px; }
  #exam-view .ex-ep-actions .ex-btn { width: 100%; }
}

/* ===== v174: Luyện từng dạng có 3 cấp (Cơ bản → Nâng cao → Tư duy) + nút video cách giải ===== */
#exam-view .ex-types { grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
#exam-view .ex-type-box { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
#exam-view .ex-type-box .ex-type { width: 100%; }
#exam-view .ex-lv-now { margin-top: 4px; font-size: 13px; font-weight: 800; color: var(--sk-primary-700); }
#exam-view .ex-type-more { display: flex; flex-wrap: wrap; gap: 6px; }
#exam-view .ex-lv-pick, #exam-view .ex-vid { min-height: 44px; flex: 1 1 0; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 4px 6px; border: 1px solid var(--sk-line); border-radius: var(--sk-r-sm); background: #fff; color: var(--sk-ink); font: inherit; font-size: 13px; font-weight: 800; white-space: nowrap; cursor: pointer; }
#exam-view .ex-lv-pick.on { border-color: var(--sk-primary); background: var(--sk-primary-50); color: var(--sk-primary-700); }
#exam-view .ex-lv-pick.done::after { content: '✓'; color: #16A34A; }
#exam-view .ex-lv-pick:disabled { opacity: .55; cursor: default; }
#exam-view .ex-vid { flex: 0 0 auto; padding: 4px 12px; }
#exam-view .ex-levelup { margin-top: 12px; padding: 12px 14px; border-radius: var(--sk-r); background: #ECFDF5; border: 1px solid #A7F3D0; color: #065F46; font-weight: 700; }
#exam-view .ex-levelup.try { background: #FFF7ED; border-color: #FED7AA; color: #9A3412; }
#exam-view .ex-levelup-gem { white-space: nowrap; }
#exam-view .ex-segsvg { display: block; max-width: 100%; height: auto; margin: 6px auto; }
@media (max-width: 380px) { #exam-view .ex-lv-pick { font-size: 12px; padding: 4px 3px; } }


/* ===== css/theme/trinao.css ===== */
/* Sam Kido v144 - giao diện mới: nhóm "trinao" (nạp sau css/base/theme.css). Xem đầu file theme.css.
 * Phạm vi: 7 phòng nhóm Trí não - memory-view, logic-view, focus-view, reason-view, number-view, spatial-view, brain-view.
 *
 * Cách viết: luật cho khối "gốc" dùng `:where(#id-phòng) .lớp` -> độ ưu tiên chỉ bằng 1 lớp (0,1,0),
 * vì file này nạp sau nên thắng luật gốc trong css/labs/*.css, NHƯNG vẫn thua các luật trạng thái
 * (.lit, .ml-found, .lg-selected, .rs-slot-ok...) có 2 lớp trở lên -> không phá màu đúng/sai/đang sáng của trò.
 * Luật :hover/:active dùng #id thật vì luật gốc của chúng có nhiều lớp (vd .rs-btn:hover:not(:disabled)).
 * Không đổi kích thước lưới/ô/canvas - chỉ màu, viền, bóng, bo góc.
 */

/* =====================================================================
 * 0. DÙNG CHUNG CHO CẢ 7 PHÒNG
 * ===================================================================== */

/* Dòng trạng thái ("Bé sẵn sàng chưa nào?", "Bé xem kỹ nhé!"): xám nhạt trung tính, không viền màu */
:where(#memory-view) .ml-status,
:where(#focus-view) .fl-status {
  background: var(--sk-surface-3); color: var(--sk-ink); border: 0; border-radius: var(--sk-r);
  font-weight: 800; font-size: 1.08rem; padding: 9px 18px;
}

/* Chip chỉ số (Độ dài, Mục tiêu, Số bước...): viên nhạt bo tròn, viền 1px */
:where(#memory-view) .ml-chip,
:where(#focus-view) .fl-chip,
:where(#logic-view) .lg-stat {
  background: var(--sk-surface-3); color: var(--sk-text); border: 1px solid transparent; border-radius: 999px;
  font-weight: 800; font-size: .88rem; padding: 6px 13px; box-shadow: none;
}
:where(#memory-view) .ml-chip { background: var(--sk-amber-50); color: #92400E; border-color: #FDE68A; }
:where(#focus-view) .fl-chip { background: var(--sk-blue-50); color: #1D4ED8; border-color: #BFDBFE; }
:where(#focus-view) .fl-chip.fl-rule-chip { background: var(--sk-red-50); color: #9F1239; border-color: #FECDD3; }
:where(#focus-view) .fl-chip.fl-jar-chip,
:where(#focus-view) .fl-chip.fl-found-chip { background: var(--sk-green-50); color: #166534; border-color: #BBF7D0; }
:where(#focus-view) .fl-chip.fl-find-chip { background: var(--sk-amber-50); color: #92400E; border-color: #FDE68A; }
:where(#logic-view) .lg-stat { background: var(--sk-blue-50); color: #1E40AF; border-color: #BFDBFE; }
:where(#logic-view) .lg-stat.lg-stat-limit { background: var(--sk-amber-50); color: #92400E; border-color: #FDE68A; }

/* Hộp thông báo đúng/sai/gợi ý: giữ màu nghĩa, viền mảnh, bo vừa */
:where(#memory-view, #logic-view, #focus-view, #reason-view, #number-view, #spatial-view, #brain-view) .feedback-msg[class] {
  border-width: 1px; border-radius: var(--sk-r); font-weight: 800; box-shadow: none;
}
#logic-view .feedback-msg.lg-info, #number-view .feedback-msg.nb-info,
#spatial-view .feedback-msg.sp-info, #reason-view .feedback-msg.rs-info {
  background: var(--sk-blue-50); color: #1E3A8A; border: 1px solid #BFDBFE;
}

/* ---- Nút PHỤ (Làm lại, Xóa, Bé nhớ rồi, Gợi ý...): trắng, viền 1px, bóng dưới mảnh ---- */
:where(#memory-view) .ml-soft-btn,
:where(#focus-view) .fl-soft-btn,
:where(#logic-view) .lg-btn,
:where(#number-view) .nb-btn,
:where(#reason-view) .rs-btn,
:where(#spatial-view) .sp-btn {
  background: #fff; color: var(--sk-text); border: 1px solid var(--sk-line-2); border-radius: var(--sk-r);
  box-shadow: var(--sk-press); font-family: var(--font-body); font-weight: 800; font-size: 1.02rem;
  min-height: 48px; text-shadow: none;
}
/* Gợi ý (Suy luận): vẫn là nút phụ, chữ màu hổ phách để dễ nhận ra */
:where(#reason-view) .rs-btn.rs-btn-hint { background: #fff; color: #B45309; }
/* Xoay hình (Hình khối): nút phụ có điểm nhấn vàng nhạt */
:where(#spatial-view) .sp-btn.sp-rotate-btn { background: var(--sk-amber-50); color: #92400E; border-color: #FCD34D; box-shadow: 0 3px 0 #FCD34D; }

/* ---- Nút CHÍNH (Bắt đầu, Chạy, Kiểm tra, Tiếp, Đặt ở đây...): một màu cam, bấm lún ---- */
:where(#memory-view) .ml-big-btn,
:where(#focus-view) .fl-big-btn,
:where(#logic-view) .lg-btn.lg-btn-go, :where(#logic-view) .lg-btn.lg-btn-next,
:where(#number-view) .nb-btn.nb-btn-go, :where(#number-view) .nb-btn.nb-btn-next,
:where(#reason-view) .rs-btn.rs-btn-check, :where(#reason-view) .rs-btn.rs-btn-next,
:where(#spatial-view) .sp-btn.sp-btn-next {
  background: var(--sk-primary); color: #fff; border: 0; border-radius: var(--sk-r);
  box-shadow: 0 4px 0 var(--sk-primary-700); font-family: var(--font-body); font-weight: 800; font-size: 1.08rem;
  min-height: 50px; text-shadow: none;
}
/* Ván mới (Cảm nhận số): nút phụ - nút chính của màn là "Đặt ở đây"/"Tiếp" */
:where(#number-view) .nb-btn.nb-btn-new { background: #fff; color: var(--sk-text); border: 1px solid var(--sk-line-2); box-shadow: var(--sk-press); }

/* hover / bấm cho cả hai loại nút */
@media (hover: hover) {
  #memory-view .ml-soft-btn:hover:not(:disabled), #focus-view .fl-soft-btn:hover:not(:disabled),
  #logic-view .lg-btn:not(.lg-btn-go):not(.lg-btn-next):hover:not(:disabled),
  #number-view .nb-btn:not(.nb-btn-go):not(.nb-btn-next):hover:not(:disabled),
  #reason-view .rs-btn.rs-btn-hint:hover:not(:disabled), #reason-view .rs-btn.rs-btn-reset:hover:not(:disabled),
  #spatial-view .sp-btn:not(.sp-btn-next):not(.sp-rotate-btn):hover:not(:disabled) {
    background: var(--sk-surface-2); border-color: var(--sk-line-2); box-shadow: var(--sk-press); transform: none;
  }
  #memory-view .ml-big-btn:hover:not(:disabled), #focus-view .fl-big-btn:hover:not(:disabled),
  #logic-view .lg-btn-go:hover:not(:disabled), #logic-view .lg-btn-next:hover:not(:disabled),
  #number-view .nb-btn-go:hover:not(:disabled), #number-view .nb-btn-next:hover:not(:disabled),
  #reason-view .rs-btn-check:hover:not(:disabled), #reason-view .rs-btn-next:hover:not(:disabled),
  #spatial-view .sp-btn-next:hover:not(:disabled) {
    background: var(--sk-primary-600); box-shadow: 0 4px 0 var(--sk-primary-700); transform: none;
  }
}
#memory-view .ml-soft-btn:active:not(:disabled), #focus-view .fl-soft-btn:active:not(:disabled),
#logic-view .lg-btn:active:not(:disabled), #number-view .nb-btn:active:not(:disabled),
#reason-view .rs-btn:active:not(:disabled), #spatial-view .sp-btn:active:not(:disabled) {
  transform: translateY(2px); box-shadow: 0 1px 0 var(--sk-line-2);
}
#memory-view .ml-big-btn:active:not(:disabled), #focus-view .fl-big-btn:active:not(:disabled),
#logic-view .lg-btn-go:active:not(:disabled), #logic-view .lg-btn-next:active:not(:disabled),
#number-view .nb-btn-go:active:not(:disabled), #number-view .nb-btn-next:active:not(:disabled),
#reason-view .rs-btn-check:active:not(:disabled), #reason-view .rs-btn-next:active:not(:disabled),
#spatial-view .sp-btn-next:active:not(:disabled) {
  transform: translateY(3px); box-shadow: 0 1px 0 var(--sk-primary-700);
}

/* Thanh thời gian: rãnh xám, vạch xanh lá phẳng (hết giờ vẫn đổi màu theo luật cũ) */
:where(#memory-view) .ml-timebar, :where(#focus-view) .fl-timebar { background: var(--sk-line); border: 0; }
:where(#memory-view) .ml-timebar span, :where(#focus-view) .fl-timebar > span { background: var(--sk-green); }
#focus-view .fl-timebar.fl-time-low > span { background: var(--sk-red); }


/* =====================================================================
 * 1. PHÒNG SIÊU TRÍ NHỚ (#memory-view, css/labs/memory-lab.css)
 * ===================================================================== */
/* Simon: giữ màu từng ô (--pad), bỏ viền trắng dày + bóng mờ, còn bóng "bấm lún" cùng màu */
:where(#memory-view) .ml-pad { border: 0; border-radius: 22px; box-shadow: 0 6px 0 var(--pad-dark); }
#memory-view .ml-pad:active { box-shadow: 0 2px 0 var(--pad-dark); }

/* Cái Gì Biến Mất: khay phẳng, thẻ con vật kiểu nút đáp án */
:where(#memory-view) .ml-tray { background: var(--sk-surface-2); border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); }
:where(#memory-view) .ml-item { background: #fff; border: 2px solid var(--sk-line); border-radius: var(--sk-r); box-shadow: 0 3px 0 var(--sk-line-2); }
:where(#memory-view) .ml-item-name { color: var(--sk-text); }
/* ô trống (chỗ con vật biến mất): giữ nét đứt vì mang nghĩa "chỗ trống", mảnh lại, không nhấp nháy mãi */
:where(#memory-view) .ml-item.ml-gap { background: var(--sk-amber-50); border: 2px dashed #F59E0B; box-shadow: none; animation: none; }
/* rèm: một màu phẳng thay vì sọc tím */
:where(#memory-view) .ml-curtain { background: #8B5CF6; box-shadow: none; border-radius: var(--sk-r-lg); }

/* Nhớ Vị Trí: lưới phẳng; ô sáng/đúng/sai giữ màu cũ (luật 2 lớp) */
:where(#memory-view) .ml-grid { background: var(--sk-surface-2); border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); }
:where(#memory-view) .ml-cell { background: #fff; border: 2px solid var(--sk-line); border-radius: 12px; box-shadow: 0 3px 0 var(--sk-line-2); }
#memory-view .ml-cell:active { box-shadow: 0 1px 0 var(--sk-line-2); }
#memory-view .ml-cell.ml-lit { background: #FDE68A; border-color: #F59E0B; box-shadow: 0 3px 0 #D97706; }
#memory-view .ml-cell.ml-found { background: var(--sk-green); border-color: #15803D; box-shadow: 0 3px 0 #166534; }
#memory-view .ml-cell.ml-reveal { border: 2px dashed #F59E0B; }

/* Mẹ Đi Chợ */
:where(#memory-view) .ml-basket { background: var(--sk-primary-50); border: 1px solid var(--sk-primary-200); border-radius: var(--sk-r-xl); box-shadow: none; }
:where(#memory-view) .ml-shoplist-text { background: #fff; color: var(--sk-ink); border: 1px solid var(--sk-line); border-radius: var(--sk-r); }
:where(#memory-view) .ml-subtitle { background: var(--sk-surface-3); color: var(--sk-text); }
:where(#memory-view) .ml-hl { background: #FDE68A; animation: none; }
:where(#memory-view) .ml-goods-main { background: #fff; border: 2px solid var(--sk-line); border-radius: var(--sk-r); box-shadow: 0 3px 0 var(--sk-line-2); }
#memory-view .ml-goods-main:active { box-shadow: 0 1px 0 var(--sk-line-2); }
:where(#memory-view) .ml-goods-name { color: var(--sk-text); }
:where(#memory-view) .ml-goods-badge { box-shadow: none; }
:where(#memory-view) .ml-goods-minus { border: 2px solid #FECACA; }
/* trạng thái món hàng: cùng độ ưu tiên (0,3,0) và viết theo đúng thứ tự cũ -> "đúng/thiếu/thừa" đè "đã chọn" */
:where(#memory-view) .ml-goods.selected .ml-goods-main { background: var(--sk-green-50); border-color: var(--sk-green); box-shadow: 0 3px 0 #15803D; }
:where(#memory-view) .ml-goods.ml-good .ml-goods-main { background: #DCFCE7; border-color: var(--sk-green); }
:where(#memory-view) .ml-goods.ml-missed .ml-goods-main,
:where(#memory-view) .ml-goods.ml-wrongqty .ml-goods-main { background: var(--sk-amber-50); border: 2px dashed var(--sk-amber); }
:where(#memory-view) .ml-goods.ml-extra .ml-goods-main { background: var(--sk-red-50); border-color: var(--sk-red); }

/* Giống Lúc Nãy Không: thẻ trắng phẳng; vòng xanh/đỏ khi đúng/sai giữ nguyên */
:where(#memory-view) .ml-nback-card { background: #fff; border: 2px solid var(--sk-line); border-radius: var(--sk-r-xl); box-shadow: var(--sk-sh-2); }
#memory-view .ml-nback-card.ml-good-ring { border-color: var(--sk-green); box-shadow: 0 0 0 5px #BBF7D0; }
#memory-view .ml-nback-card.ml-bad-ring { border-color: var(--sk-red); box-shadow: 0 0 0 5px #FECACA; }
/* hai nút Giống / Khác: giữ màu nghĩa xanh lá / hồng, viền mảnh, bấm lún */
:where(#memory-view) .ml-answer-btn { border-width: 2px; border-radius: var(--sk-r); font-family: var(--font-body); }
:where(#memory-view) .ml-answer-btn.ml-same { background: var(--sk-green-50); color: #166534; border-color: #86EFAC; box-shadow: 0 4px 0 #86EFAC; }
:where(#memory-view) .ml-answer-btn.ml-diff { background: var(--sk-red-50); color: #9F1239; border-color: #FDA4AF; box-shadow: 0 4px 0 #FDA4AF; }
:where(#memory-view) .ml-answer-btn.ml-good-flash { background: var(--sk-green); color: #fff; border-color: #15803D; box-shadow: 0 4px 0 #166534; }
:where(#memory-view) .ml-answer-btn.ml-bad-flash { background: var(--sk-red); color: #fff; border-color: #B91C1C; box-shadow: 0 4px 0 #991B1B; }

/* Mê Cung Bóng Tối: tường mê cung giữ nguyên (mang nghĩa); nút điều hướng bấm lún xám */
:where(#memory-view) .ml-dpad-btn { background: #fff; border: 2px solid var(--sk-line); border-radius: var(--sk-r); box-shadow: 0 4px 0 var(--sk-line-2); }
#memory-view .ml-dpad-btn:active:not(:disabled) { box-shadow: 0 1px 0 var(--sk-line-2); }


/* =====================================================================
 * 2. PHÒNG TƯ DUY LOGIC (#logic-view, css/labs/logic-lab.css)
 * ===================================================================== */
/* Lập Trình Robot */
:where(#logic-view) .lg-rb-board { border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); background: var(--sk-surface-3); box-shadow: var(--sk-sh-1); }
:where(#logic-view) .lg-rb-cell { background: #fff; box-shadow: inset 0 0 0 1px var(--sk-line); }
:where(#logic-view) .lg-rb-cell:nth-child(odd) { background: var(--sk-surface-2); }
#logic-view .lg-rb-cell.lg-rb-start { box-shadow: inset 0 0 0 3px #F59E0B; }
:where(#logic-view) .lg-program-strip { background: var(--sk-surface-2); border: 2px dashed var(--sk-line-2); border-radius: var(--sk-r); }
:where(#logic-view) .lg-program-empty { color: var(--sk-muted); }
:where(#logic-view) .lg-block-count { background: var(--sk-surface-3); color: var(--sk-text); border-radius: 999px; font-weight: 800; }
:where(#logic-view) .lg-block-count.lg-count-full { background: var(--sk-amber-50); color: #92400E; }
/* khối lệnh trong chương trình + nút mũi tên: kiểu ô bấm lún xám, vòng lặp giữ điểm nhấn tím nhạt */
:where(#logic-view) .lg-chip { background: #fff; border: 2px solid var(--sk-line); border-radius: 12px; box-shadow: 0 2px 0 var(--sk-line-2); }
:where(#logic-view) .lg-chip.lg-chip-loop { background: #F5F3FF; border-color: #DDD6FE; box-shadow: 0 2px 0 #C4B5FD; }
:where(#logic-view) .lg-chip.lg-chip-active { background: #FDE68A; border-color: #F59E0B; }
:where(#logic-view) .lg-chip-num { background: var(--sk-ink); }
:where(#logic-view) .lg-cmd-btn, :where(#logic-view) .lg-pal-btn {
  background: #fff; border: 2px solid var(--sk-line); border-radius: var(--sk-r); box-shadow: 0 4px 0 var(--sk-line-2);
}
#logic-view .lg-cmd-btn:active:not(:disabled), #logic-view .lg-pal-btn:active { box-shadow: 0 1px 0 var(--sk-line-2); }
:where(#logic-view) .lg-cmd-btn.lg-loop-btn { background: #F5F3FF; color: #6D28D9; border-color: #DDD6FE; box-shadow: 0 4px 0 #C4B5FD; }
#logic-view .lg-cmd-btn.lg-loop-btn.lg-selected { background: #7C3AED; color: #fff; border-color: #6D28D9; animation: none; }
#logic-view .lg-pal-btn.lg-selected { background: var(--sk-primary-50); border-color: var(--sk-primary); box-shadow: 0 4px 0 var(--sk-primary-700); }
:where(#logic-view) .lg-palette { background: var(--sk-surface-2); border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); }

/* Sudoku: khung ngoài mảnh hơn, vạch chia ô 2x2/3x3 giữ nguyên (mang nghĩa) */
:where(#logic-view) .lg-sudoku { box-shadow: var(--sk-sh-2); border-radius: var(--sk-r); }

/* Cân Thăng Bằng: đĩa cân bỏ gradient */
:where(#logic-view) .lg-pan-dish { background: #FBBF24; box-shadow: none; }
:where(#logic-view) .lg-scale-beam, :where(#logic-view) .lg-scale-post { background: #8D6E63; }
:where(#logic-view) .lg-scale-pivot { box-shadow: none; }

/* Sắp Xếp Câu Chuyện */
:where(#logic-view) .lg-story-pool { background: var(--sk-surface-2); border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); }
:where(#logic-view) .lg-story-card { background: #fff; border: 2px solid var(--sk-line); border-radius: var(--sk-r); box-shadow: 0 4px 0 var(--sk-line-2); }
:where(#logic-view) .lg-sc-cap { color: var(--sk-text); }
:where(#logic-view) .lg-slot { background: var(--sk-surface-2); border: 2px dashed var(--sk-line-2); border-radius: var(--sk-r); }
:where(#logic-view) .lg-slot-num { background: var(--sk-ink); box-shadow: none; }
#logic-view .lg-slot.lg-filled { border-style: solid; border-color: var(--sk-line-2); background: #fff; }
#logic-view .lg-slot.lg-right { border-color: var(--sk-green); background: var(--sk-green-50); }
#logic-view .lg-slot.lg-right .lg-slot-num { background: var(--sk-green); box-shadow: none; }
#logic-view .lg-slot.lg-wrong { border-color: var(--sk-red); background: var(--sk-red-50); }

/* Tháp Hà Nội: cột nền phẳng, cột đích vàng nhạt; đĩa giữ màu */
:where(#logic-view) .lg-peg { background: var(--sk-surface-2); border: 2px solid var(--sk-line); border-radius: var(--sk-r-lg); }
:where(#logic-view) .lg-peg.lg-peg-target { background: var(--sk-amber-50); border-color: #FDE68A; }
#logic-view .lg-peg.lg-selected { background: var(--sk-primary-50); border-color: var(--sk-primary); }
:where(#logic-view) .lg-peg-rod { background: #A1887F; }
:where(#logic-view) .lg-peg-flag { animation: none; }
:where(#logic-view) .lg-disc { box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .12); }

/* Phân Loại Thông Minh */
:where(#logic-view) .lg-sort-tray { background: var(--sk-surface-2); border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); }
:where(#logic-view) .lg-sort-item { background: #fff; border: 2px solid var(--sk-line); border-radius: var(--sk-r); box-shadow: 0 4px 0 var(--sk-line-2); }
#logic-view .lg-sort-item.lg-selected { background: var(--sk-primary-50); border-color: var(--sk-primary); box-shadow: 0 0 0 3px var(--sk-primary-200), 0 4px 0 var(--sk-primary-700); }
:where(#logic-view) .lg-basket { background: #fff; border: 2px solid var(--sk-line); border-radius: var(--sk-r-lg); box-shadow: 0 4px 0 var(--sk-line-2); }
:where(#logic-view) .lg-basket-label { color: var(--sk-ink); }

/* Đối Xứng Gương */
:where(#logic-view) .lg-mr-grid { background: var(--sk-surface-3); border-radius: var(--sk-r); }
:where(#logic-view) .lg-mr-right { background: var(--sk-green-50); }
:where(#logic-view) .lg-mr-cell { border: 1px solid var(--sk-line-2); }
:where(#logic-view) .lg-mr-line { background: #93C5FD; box-shadow: none; }
:where(#logic-view) .lg-st-corner, :where(#logic-view) .lg-st-head { background: var(--sk-surface-3); }


/* =====================================================================
 * 3. PHÒNG TẬP TRUNG (#focus-view, css/labs/focus-lab.css)
 * ===================================================================== */
/* Bắt Bướm: sân chơi phẳng xanh rất nhạt (nháy xanh/cam khi đúng/sai vẫn chạy bằng animation cũ) */
:where(#focus-view) .fl-gng-stage { background: var(--sk-green-50); border: 1px solid #BBF7D0; border-radius: var(--sk-r-xl); }
/* nút VỢT: là nút chơi chính -> cam; khi chưa sẵn sàng xám; bỏ nhịp đập liên tục */
:where(#focus-view) .fl-net-btn { border: 0; border-radius: var(--sk-r-lg); box-shadow: 0 5px 0 #64748B; }
#focus-view .fl-net-btn.fl-net-ready { background: var(--sk-primary); border: 0; box-shadow: 0 5px 0 var(--sk-primary-700); animation: none; }
#focus-view .fl-net-btn:active { box-shadow: 0 1px 0 var(--sk-primary-700); }
:where(#focus-view) .fl-flip-banner { background: rgba(255, 255, 255, .97); border: 2px solid #FCD34D; border-radius: var(--sk-r-lg); box-shadow: var(--sk-sh-3); }
:where(#focus-view) .fl-flip-icon { animation: none; }

/* Đổi Luật: bảng luật giữ 3 màu theo luật (màu/hình/cỡ) nhưng viền mảnh */
:where(#focus-view) .fl-rule-board { border-width: 2px; border-radius: var(--sk-r-lg); }
:where(#focus-view) .fl-sw-card { border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); box-shadow: var(--sk-sh-2); }
/* hộp đích: giữ nét đứt (chỗ thả thẻ), mảnh 2px */
:where(#focus-view) .fl-box { background: var(--sk-surface-2); border: 2px dashed var(--sk-line-2); border-radius: var(--sk-r-lg); }
@media (hover: hover) { #focus-view .fl-box:hover:not(:disabled) { border-color: var(--sk-primary); background: var(--sk-primary-50); } }
:where(#focus-view) .fl-box-label { color: var(--sk-ink); }
:where(#focus-view) .fl-box-desc { color: var(--sk-muted); }

/* Tìm Nhanh: khung lưới phẳng */
:where(#focus-view) .fl-field { background: var(--sk-surface-2); border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); }
:where(#focus-view) .fl-sitem { border: 1px solid var(--sk-line); border-radius: 12px; }


/* =====================================================================
 * 4. PHÒNG SUY LUẬN (#reason-view, css/labs/reason-lab.css)
 * ===================================================================== */
/* Ma Trận Hình: khung xám nhạt, ô trắng bấm lún nhẹ; ô "?" giữ nền vàng (mang nghĩa) nhưng bỏ sọc */
:where(#reason-view) .rs-matrix-grid { background: var(--sk-surface-3); border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); box-shadow: none; }
:where(#reason-view) .rs-cell { background: #fff; border: 1px solid var(--sk-line); border-radius: var(--sk-r); box-shadow: 0 2px 0 var(--sk-line-2); }
#reason-view .rs-cell.rs-cell-q, #reason-view .rs-tile.rs-tile-q { background: var(--sk-amber-50); border: 2px dashed #F59E0B; box-shadow: none; animation: none; }
:where(#reason-view) .rs-qmark { color: var(--sk-amber); }

/* Giống Nhau Thế Nào */
:where(#reason-view) .rs-ana-board { background: var(--sk-surface-2); border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); }
:where(#reason-view) .rs-ana-eq { color: var(--sk-muted); }
:where(#reason-view) .rs-tile { background: #fff; border: 1px solid var(--sk-line); border-radius: var(--sk-r); box-shadow: 0 2px 0 var(--sk-line-2); }
:where(#reason-view) .rs-tile-word, :where(#reason-view) .rs-item-word { color: var(--sk-text); }

/* Thám Tử Manh Mối */
:where(#reason-view) .rs-clue { background: #fff; border: 1px solid var(--sk-line); border-radius: var(--sk-r); color: var(--sk-ink); box-shadow: var(--sk-sh-1); }
#reason-view .rs-clue.rs-clue-hl { background: var(--sk-amber-50); border-color: #F59E0B; box-shadow: 0 0 0 3px #FDE68A; }
:where(#reason-view) .rs-kid-row { background: var(--sk-surface-2); border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); }
:where(#reason-view) .rs-seat { background: var(--sk-surface-3); color: var(--sk-text); }
:where(#reason-view) .rs-kid-name { color: var(--sk-ink); }
/* ô chờ ghép: nét đứt (chỗ trống) mảnh 2px, xám */
:where(#reason-view) .rs-slot { background: #fff; border: 2px dashed var(--sk-line-2); border-radius: var(--sk-r); color: var(--sk-faint); box-shadow: none; }
@media (hover: hover) { #reason-view .rs-slot:hover { border-color: var(--sk-primary); } }
#reason-view .rs-slot:active { box-shadow: none; }
#reason-view .rs-slot.rs-slot-filled { border-style: solid; border-color: var(--sk-line-2); background: #fff; }
#reason-view .rs-slot.rs-slot-sel { border-color: var(--sk-primary); background: var(--sk-primary-50); box-shadow: 0 0 0 3px var(--sk-primary-200); }
/* con vật để chọn: kiểu nút đáp án */
:where(#reason-view) .rs-item-btn { background: #fff; border: 2px solid var(--sk-line); border-radius: var(--sk-r); box-shadow: 0 4px 0 var(--sk-line-2); }
@media (hover: hover) { #reason-view .rs-item-btn:hover { border-color: #93C5FD; box-shadow: 0 4px 0 #93C5FD; } }
#reason-view .rs-item-btn:active { box-shadow: 0 1px 0 var(--sk-line-2); }
#reason-view .rs-item-btn.rs-item-sel { background: var(--sk-primary-50); border-color: var(--sk-primary); box-shadow: 0 0 0 3px var(--sk-primary-200), 0 4px 0 var(--sk-primary-700); }


/* =====================================================================
 * 5. PHÒNG CẢM NHẬN SỐ (#number-view, css/labs/number-lab.css)
 * ===================================================================== */
/* Tia Số: ô số cần đặt phẳng; tia số xanh giữ (là "thước"), bỏ gradient */
:where(#number-view) .nb-target-box { background: var(--sk-primary-50); border: 1px solid var(--sk-primary-200); border-radius: var(--sk-r-lg); }
:where(#number-view) .nb-target-label { color: var(--sk-primary-700); }
:where(#number-view) .nb-target-num { color: var(--sk-primary-700); text-shadow: none; }
:where(#number-view) .nb-line-rail { background: #BFDBFE; border: 2px solid #3B82F6; }
:where(#number-view) .nb-tapzone { color: var(--sk-muted); animation: none; }

/* Tách Gộp Số */
:where(#number-view) .nb-bond-board { background: var(--sk-surface-2); border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); }
:where(#number-view) .nb-bond-whole, :where(#number-view) .nb-bond-part { border-width: 2px; border-radius: var(--sk-r); }
:where(#number-view) .nb-bond-whole { box-shadow: none; }
:where(#number-view) .nb-bond-cap { color: var(--sk-muted); }
:where(#number-view) .nb-bond-num { color: var(--sk-ink); }

/* Ước Lượng Nhanh: sân chấm phẳng (khung nét đứt bỏ) */
:where(#number-view) .nb-est-stage { background: var(--sk-surface-2); border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); }
:where(#number-view) .nb-est-panel { background: rgba(255, 255, 255, .85); border: 1px solid var(--sk-line); border-radius: var(--sk-r); }
:where(#number-view) .nb-est-ready { color: var(--sk-ink); }

/* So Sánh Chớp Nhoáng: 2 thẻ lớn kiểu nút đáp án; thanh thời gian xanh lá phẳng */
:where(#number-view) .nb-cmp-bar { background: var(--sk-line); border: 0; }
:where(#number-view) .nb-cmp-fill { background: var(--sk-green); }
:where(#number-view) .nb-cmp-top strong { color: var(--sk-primary-700); }
:where(#number-view) .nb-cmp-side { background: #fff; border: 2px solid var(--sk-line); border-radius: var(--sk-r-lg); box-shadow: 0 4px 0 var(--sk-line-2); }
@media (hover: hover) { #number-view .nb-cmp-side:hover:not(:disabled) { border-color: #93C5FD; box-shadow: 0 4px 0 #93C5FD; } }
#number-view .nb-cmp-side:active:not(:disabled) { box-shadow: 0 1px 0 var(--sk-line-2); }
:where(#number-view) .nb-cmp-num { color: var(--sk-ink); }
:where(#number-view) .nb-cmp-vs { color: var(--sk-muted); }
:where(#number-view) .nb-pizza { border-width: 3px; }


/* =====================================================================
 * 6. PHÒNG HÌNH KHỐI (#spatial-view, css/labs/spatial-lab.css)
 * ===================================================================== */
/* Hình mẫu: khung trắng viền mảnh, nhãn "Hình mẫu" thành chip tối gọn */
:where(#spatial-view) .sp-ref-box { background: var(--sk-surface-2); border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); }
#spatial-view .sp-ref-box.sp-spinning { background: var(--sk-green-50); border: 1px solid #86EFAC; }
:where(#spatial-view) .sp-tag { background: var(--sk-ink); color: #fff; border-radius: 999px; font-family: var(--font-body); font-size: .8rem; }
:where(#spatial-view) .sp-steps, :where(#spatial-view) .sp-tray { background: var(--sk-surface-2); border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); }
:where(#spatial-view) .sp-step-pic { border: 1px solid var(--sk-line); border-radius: 12px; }
:where(#spatial-view) .sp-step-label, :where(#spatial-view) .sp-tray-label, :where(#spatial-view) .sp-step-arrow { color: var(--sk-muted); }
:where(#spatial-view) .sp-scene, :where(#spatial-view) .sp-build-stage { background: var(--sk-surface-2); border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); }
/* mảnh ghép: kiểu nút đáp án; đang chọn = viền cam */
:where(#spatial-view) .sp-piece { background: #fff; border: 2px solid var(--sk-line); border-radius: var(--sk-r); box-shadow: 0 4px 0 var(--sk-line-2); }
#spatial-view .sp-piece:active:not(:disabled) { box-shadow: 0 1px 0 var(--sk-line-2); }
#spatial-view .sp-piece.sp-piece-sel { background: var(--sk-primary-50); border-color: var(--sk-primary); box-shadow: 0 0 0 3px var(--sk-primary-200), 0 4px 0 var(--sk-primary-700); }
#spatial-view .sp-piece.sp-piece-used { box-shadow: none; }
/* số thứ tự trên đáp án */
#spatial-view .game-opt-btn.sp-opt { background: #fff; }


/* =====================================================================
 * 7. ĐẤU TRƯỜNG TRÍ NÃO (#brain-view, css/games/games-brain-arena.css + maze ở games-riddle-maze-speed.css)
 *    brain-game.js gắn gradient bằng style="" -> cần !important ở nhãn và nút Ván Mới.
 * ===================================================================== */
#brain-view .game-badge { background: var(--sk-amber-50) !important; color: #92400E !important; border: 1px solid #FDE68A; }
#brain-view #btn-caro-reset {
  background: var(--sk-primary) !important; color: #fff; border: 0; border-radius: var(--sk-r);
  box-shadow: 0 4px 0 var(--sk-primary-700); font-weight: 800; min-height: 50px; transform: none;
}
@media (hover: hover) { #brain-view #btn-caro-reset:hover { background: var(--sk-primary-600) !important; transform: none; box-shadow: 0 4px 0 var(--sk-primary-700); } }
#brain-view #btn-caro-reset:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--sk-primary-700); }

/* Chơi 1 mình / Đấu với bố mẹ, chọn đối thủ: kiểu chọn đoạn, đang chọn = cam nhạt viền cam (giống tab) */
:where(#brain-view) .btn-mode-toggle, :where(#brain-view) .btn-opp-select {
  background: #fff; color: var(--sk-text); border: 1px solid var(--sk-line); border-radius: 999px; box-shadow: var(--sk-sh-1);
  font-weight: 800; min-height: 44px;
}
@media (hover: hover) { #brain-view .btn-mode-toggle:hover, #brain-view .btn-opp-select:hover { border-color: var(--sk-line-2); color: var(--sk-ink); background: var(--sk-surface-2); } }
#brain-view .btn-mode-toggle.active, #brain-view .btn-opp-select.active {
  background: var(--sk-primary-50); color: var(--sk-primary-700); border-color: var(--sk-primary); box-shadow: inset 0 0 0 1px var(--sk-primary);
}
:where(#brain-view) .versus-setup-box { background: var(--sk-surface-2); border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); box-shadow: none; }

/* Thẻ người chơi: trắng, viền màu nhạt theo bên (xanh = bé, hồng = đối thủ); lượt đang đi = viền cam */
:where(#brain-view) .player-score-card { background: #fff; border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); box-shadow: var(--sk-sh-1); }
#brain-view .player-score-card.p1-card { border-color: #BFDBFE; background: var(--sk-blue-50); }
#brain-view .player-score-card.p2-card { border-color: #FBCFE8; background: #FDF2F8; }
#brain-view .player-score-card.active-turn { border-color: var(--sk-primary); box-shadow: 0 0 0 2px var(--sk-primary), var(--sk-sh-2); }
:where(#brain-view) .player-avatar-box { box-shadow: none; border: 1px solid var(--sk-line); }
:where(#brain-view) .player-pairs-count { color: var(--sk-primary-700); }
:where(#brain-view) .turn-indicator-badge { background: var(--sk-primary); box-shadow: none; animation: none; }
:where(#brain-view) .vs-badge { background: var(--sk-ink); box-shadow: none; }
:where(#brain-view) .versus-turn-banner { background: var(--sk-surface-3); border: 0; color: var(--sk-ink); box-shadow: none; }

/* Lật Thẻ: mặt úp = một màu tím phẳng (giữ nhận diện thẻ úp), mặt ngửa trắng viền mảnh */
:where(#brain-view) .card-front { background: #7C3AED; border: 0; border-radius: var(--sk-r); box-shadow: 0 4px 0 #5B21B6; }
:where(#brain-view) .card-back { background: #fff; border: 2px solid var(--sk-line); border-radius: var(--sk-r); box-shadow: 0 4px 0 var(--sk-line-2); }
:where(#brain-view) .card-back .card-name { color: var(--sk-text); }
#brain-view .memory-card.matched .card-back { background: var(--sk-green-50); border-color: var(--sk-green); box-shadow: 0 4px 0 #86EFAC; }

/* Tìm Bóng / Tìm Khác Biệt / Đoán Quy Luật: ô kiểu nút đáp án */
:where(#brain-view) .shadow-card, :where(#brain-view) .odd-item-btn {
  background: #fff; border: 2px solid var(--sk-line); border-radius: var(--sk-r-lg); box-shadow: 0 4px 0 var(--sk-line-2);
}
@media (hover: hover) { #brain-view .shadow-card:hover, #brain-view .odd-item-btn:hover { border-color: #93C5FD; } }
#brain-view .shadow-card.selected-source { background: var(--sk-primary-50); border-color: var(--sk-primary); box-shadow: 0 0 0 3px var(--sk-primary-200), 0 4px 0 var(--sk-primary-700); }
#brain-view .shadow-card.matched-done { background: var(--sk-green-50); border-color: var(--sk-green); }
:where(#brain-view) .col-title, :where(#brain-view) .odd-label, :where(#brain-view) .animal-name { color: var(--sk-text); }
:where(#brain-view) .pattern-cell { background: var(--sk-surface-2); border: 2px solid var(--sk-line); border-radius: var(--sk-r); box-shadow: none; }
#brain-view .pattern-cell.target-pattern-cell { background: var(--sk-amber-50); border: 2px dashed #F59E0B; color: var(--sk-amber); }

/* Mê Cung Tri Thức: khung phẳng; tường/đường giữ màu */
:where(#brain-view) .maze-board-container { border: 1px solid var(--sk-line-2); border-radius: var(--sk-r-lg); box-shadow: var(--sk-sh-2); }
:where(#brain-view) .maze-runner-selector-wrap { background: var(--sk-surface-2); border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); box-shadow: none; }
:where(#brain-view) .runner-selector-title { color: var(--sk-text); }
:where(#brain-view) .runner-pill-btn { background: #fff; border: 1px solid var(--sk-line); border-radius: 999px; color: var(--sk-text); font-weight: 800; }
@media (hover: hover) { #brain-view .runner-pill-btn:hover { background: var(--sk-surface-2); border-color: var(--sk-line-2); } }
#brain-view .runner-pill-btn.active { background: var(--sk-primary-50); border-color: var(--sk-primary); color: var(--sk-primary-700); box-shadow: inset 0 0 0 1px var(--sk-primary); }
:where(#brain-view) .dpad-btn { background: #fff; border: 2px solid var(--sk-line); border-radius: var(--sk-r); box-shadow: 0 4px 0 var(--sk-line-2); }
@media (hover: hover) { #brain-view .dpad-btn:hover { background: var(--sk-surface-2); border-color: var(--sk-line-2); } }
#brain-view .dpad-btn:active { background: var(--sk-surface-3); transform: translateY(3px); box-shadow: 0 1px 0 var(--sk-line-2); }

/* Đấu Trí 2 Người: câu hỏi trên nền vàng nhạt phẳng, 2 bảng trả lời viền màu theo bên */
:where(#brain-view) .pvp-question-container { background: var(--sk-amber-50); border: 1px solid #FDE68A; border-radius: var(--sk-r-lg); box-shadow: none; }
:where(#brain-view) .pvp-question-title { color: #92400E; }
:where(#brain-view) .pvp-player-zone { background: #fff; border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); box-shadow: var(--sk-sh-1); }
#brain-view .pvp-player-zone.pvp-zone-left { border-color: #BFDBFE; background: var(--sk-blue-50); }
#brain-view .pvp-player-zone.pvp-zone-right { border-color: #FBCFE8; background: #FDF2F8; }
:where(#brain-view) .pvp-zone-header { color: var(--sk-ink); }
:where(#brain-view) .btn-pvp-ans { border-width: 2px; border-radius: var(--sk-r); }
#brain-view .btn-pvp-ans.btn-ans-p1 { background: #fff; border-color: #93C5FD; color: #1D4ED8; box-shadow: 0 4px 0 #93C5FD; }
#brain-view .btn-pvp-ans.btn-ans-p2 { background: #fff; border-color: #F9A8D4; color: #BE185D; box-shadow: 0 4px 0 #F9A8D4; }
#brain-view .btn-pvp-ans.btn-ans-p1:active, #brain-view .btn-pvp-ans.btn-ans-p2:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--sk-line-2); }

/* Cờ Caro: bàn cờ phẳng, ô trắng viền mảnh; ô thắng giữ vàng */
:where(#brain-view) .caro-board-container { background: var(--sk-surface-3); border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); box-shadow: var(--sk-sh-1); }
:where(#brain-view) .caro-cell { background: #fff; border: 2px solid var(--sk-line); border-radius: 12px; box-shadow: 0 2px 0 var(--sk-line-2); }
@media (hover: hover) { #brain-view .caro-cell:hover:not(.filled) { background: var(--sk-primary-50); border-color: var(--sk-primary-200); } }

/* =====================================================================
 * 8. ĐIỆN THOẠI (soát ảnh 390px 2026-11-14)
 * ===================================================================== */
@media (max-width: 480px) {
  /* Lập Trình Robot: 3 nút Xóa 1 / Xóa hết / Chạy cùng một hàng, không xuống dòng chữ */
  #logic-view .lg-robot-actions .lg-btn { padding: 8px 6px; font-size: .95rem; white-space: nowrap; }
  /* Mê Cung Tri Thức: responsive.css đặt ô rộng (100vw-64px)/7 -> lưới 7x7 tràn khỏi thẻ, cột cuối bị cắt.
     Bỏ cỡ cố định để ô chia đều theo khung vuông (khung vẫn width 100%, max 380px, aspect-ratio 1/1). */
  #brain-view .maze-board-container .maze-cell { width: auto; height: auto; max-width: none; max-height: none; min-width: 0; min-height: 0; }
  #brain-view .maze-board-container { gap: 3px; padding: 6px; }
}

/* Đầu khung trò trên điện thoại: gọn để bé thấy trò ngay (theo yêu cầu chủ app 2026-11-14).
   Đo ở 390px trước khi sửa: thẻ đệm 24px, nhãn + nút nghe xuống 2 dòng (~50px), cách dưới 16px. */
@media (max-width: 640px) {
  #memory-view .game-card, #logic-view .game-card, #focus-view .game-card, #reason-view .game-card, #number-view .game-card, #spatial-view .game-card, #brain-view .game-card { padding: 14px 12px 18px; border-radius: var(--sk-r-lg); }
  #memory-view .game-header, #logic-view .game-header, #focus-view .game-header, #reason-view .game-header, #number-view .game-header, #spatial-view .game-header, #brain-view .game-header { flex-wrap: nowrap; gap: 8px; margin-bottom: 10px; }
  /* (dùng #id thật vì theme.css viết .app-view .game-card/.game-header/.game-badge - 2 lớp) */
  /* nhãn tên trò 1 dòng, dài quá thì cắt "..." (tên đầy đủ đã có ở tab đang chọn) */
  #memory-view .game-header .game-badge, #logic-view .game-header .game-badge, #focus-view .game-header .game-badge, #reason-view .game-header .game-badge, #number-view .game-header .game-badge, #spatial-view .game-header .game-badge, #brain-view .game-header .game-badge {
    flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8rem; padding: 5px 10px;
  }
  #memory-view .game-header .voice-btn, #logic-view .game-header .voice-btn, #focus-view .game-header .voice-btn, #reason-view .game-header .voice-btn, #number-view .game-header .voice-btn, #spatial-view .game-header .voice-btn, #brain-view .game-header .voice-btn {
    flex: none; white-space: nowrap; font-size: .82rem; padding: 6px 12px; min-height: 44px; margin-left: auto; /* v171: 36 -> 44px, bé chạm dễ */
  }
  #memory-view .difficulty-level-bar, #logic-view .difficulty-level-bar, #focus-view .difficulty-level-bar, #reason-view .difficulty-level-bar, #number-view .difficulty-level-bar, #spatial-view .difficulty-level-bar, #brain-view .difficulty-level-bar { margin-bottom: 8px; }
  :where(#memory-view, #logic-view, #focus-view, #reason-view, #number-view, #spatial-view, #brain-view) .game-card > .section-instruction { font-size: .88rem; line-height: 1.4; margin-bottom: 8px; }
  :where(#memory-view) .ml-stage, :where(#focus-view) .fl-stage { gap: 10px; }
  :where(#memory-view) .ml-status, :where(#focus-view) .fl-status { font-size: .98rem; padding: 7px 14px; }
  :where(#memory-view) .ml-chip, :where(#focus-view) .fl-chip, :where(#logic-view) .lg-stat { font-size: .8rem; padding: 4px 10px; }
  :where(#memory-view) button.ml-chip { min-height: 44px; }
}

/* Simon trên điện thoại: lưới 4 ô to quá đẩy khu chơi + nút Bắt đầu ra khỏi màn hình (soát 2026-11-14) -> giới hạn chiều rộng */
@media (max-width: 640px) { #memory-view .ml-simon-board { width: min(100%, 280px); margin-left: auto; margin-right: auto; } #memory-view .ml-simon-board.ml-pads-6 { width: min(100%, 330px); } }


/* ===== css/theme/choi.css ===== */
/* Sam Kido v144 - giao diện mới: nhóm "choi" (nạp sau css/base/theme.css). Xem đầu file theme.css.
 * Phòng: Bản đồ tri thức, Hành trình 8 đảo, Âm nhạc, Kể chuyện, Thú cưng, Việc tốt, Khám phá thế giới,
 * Khu Hài Hước, Họa sĩ nhí, Bé ngoan, Album sticker + cửa hàng, 3 hộp ở trang nhóm "Của bé".
 * Nguyên tắc: khung trắng phẳng viền 1px, MỘT màu hành động (cam), giữ màu mang nghĩa (đúng/sai, phím đàn, bảng màu...). */

/* =====================================================================
 * 0. DÙNG CHUNG CHO CÁC PHÒNG NHÓM CHƠI
 * ===================================================================== */
#music-view .mu-sound-hint { margin: 0 0 10px; font-weight: 600; color: var(--sk-muted); }

/* nút .ar-btn (gradient xanh/cam cũ của arena.css) -> nút chính cam phẳng "bấm lún" */
#pet-view .ar-btn, #journey-view .ar-btn, #habits-view .ar-btn, #music-view .ar-btn,
#tale-view .ar-btn, #fun-view .ar-btn {
  background: var(--sk-primary); color: #fff; border: 0; border-radius: var(--sk-r);
  box-shadow: 0 4px 0 var(--sk-primary-700); font-family: var(--font-body); font-weight: 800; font-size: 1.02rem;
  min-height: 50px; transition: transform .08s, box-shadow .08s, background .12s;
}
#pet-view .ar-btn:hover, #journey-view .ar-btn:hover, #habits-view .ar-btn:hover, #music-view .ar-btn:hover,
#tale-view .ar-btn:hover, #fun-view .ar-btn:hover { background: var(--sk-primary-600); }
#pet-view .ar-btn:active, #journey-view .ar-btn:active, #habits-view .ar-btn:active, #music-view .ar-btn:active,
#tale-view .ar-btn:active, #fun-view .ar-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--sk-primary-700); }
/* nút phụ: .gray + các nút "nghe/đọc" đứng cạnh nút chính (vì sao: 1 hàng chỉ 1 nút cam) */
#pet-view .ar-btn.gray, #journey-view .ar-btn.gray, #habits-view .ar-btn.gray, #music-view .ar-btn.gray,
#tale-view .ar-btn.gray, #fun-view .ar-btn.gray,
#pet-view #pet-btn-pet, #music-view #mu-demo, #music-view #mu-listen, #music-view #mu-replay, #tale-view #tl-read, #fun-view #fz-read {
  background: #fff; color: var(--sk-text); border: 1px solid var(--sk-line-2); box-shadow: 0 3px 0 var(--sk-line);
}
#pet-view .ar-btn.gray:hover, #journey-view .ar-btn.gray:hover, #habits-view .ar-btn.gray:hover, #music-view .ar-btn.gray:hover,
#tale-view .ar-btn.gray:hover, #fun-view .ar-btn.gray:hover,
#pet-view #pet-btn-pet:hover, #music-view #mu-demo:hover, #music-view #mu-listen:hover, #music-view #mu-replay:hover, #tale-view #tl-read:hover, #fun-view #fz-read:hover { background: var(--sk-surface-2); color: var(--sk-ink); }
#pet-view .ar-btn.gray:active, #journey-view .ar-btn.gray:active, #habits-view .ar-btn.gray:active, #music-view .ar-btn.gray:active,
#tale-view .ar-btn.gray:active, #fun-view .ar-btn.gray:active,
#pet-view #pet-btn-pet:active, #music-view #mu-demo:active, #music-view #mu-listen:active, #music-view #mu-replay:active, #tale-view #tl-read:active, #fun-view #fz-read:active { box-shadow: 0 0 0 var(--sk-line); }
#pet-view .ar-btn:disabled, #tale-view .ar-btn:disabled, #music-view .ar-btn:disabled { opacity: .5; transform: none; }

/* tiêu đề khối trong thẻ */
#pet-view .sk-badge-heading, #habits-view .sk-badge-heading, #sticker-view .sk-badge-heading {
  font-family: var(--font-display); font-size: 1.2rem; font-weight: 800; color: var(--sk-ink); margin: 0 0 10px;
}
#pet-view .ar-input, #habits-view .ar-input {
  border: 1px solid var(--sk-line-2); border-radius: 12px; min-height: 48px; font-weight: 700; color: var(--sk-ink); background: #fff;
}
#pet-view .ar-input:focus, #habits-view .ar-input:focus { border-color: var(--sk-primary); box-shadow: 0 0 0 4px rgba(249, 115, 22, .14); }
#journey-view .ar-feedback, #world-view .ar-feedback, #fun-view .ar-feedback { font-family: var(--font-body); font-weight: 800; }
#journey-view .ar-feedback.ok, #world-view .ar-feedback.ok, #fun-view .ar-feedback.ok { color: var(--sk-green); }
#journey-view .ar-feedback.no, #world-view .ar-feedback.no, #fun-view .ar-feedback.no { color: var(--sk-red); }
#fun-view .ar-hint, #tale-view .ar-hint, #music-view .ar-hint { color: var(--sk-muted); font-weight: 600; }

/* thông báo đúng/sai (.feedback-msg) - phẳng, viền 1px */
#map-view .feedback-msg, #ethics-view .feedback-msg, #art-view .feedback-msg {
  border-radius: var(--sk-r); font-size: 1.02rem; padding: 12px 16px; animation: none;
}
#map-view .feedback-msg.success, #ethics-view .feedback-msg.success, #art-view .feedback-msg.success { background: var(--sk-green-50); color: #166534; border: 1px solid #BBF7D0; }
#map-view .feedback-msg.error, #ethics-view .feedback-msg.error, #art-view .feedback-msg.error { background: var(--sk-red-50); color: #991B1B; border: 1px solid #FECACA; }

/* các thẻ xếp chồng trong phòng: cách nhau (CSS cũ để sát nhau) */
#pet-view .game-card + .game-card, #habits-view .game-card + .game-card, #journey-view .game-card + .game-card { margin-top: 16px; }

/* điện thoại: thẻ bớt đệm cho rộng chỗ (bố cục hàng tab trò do theme.css lo - không đặt ở đây) */
@media (max-width: 640px) {
  #map-view .game-card, #journey-view .game-card, #music-view .game-card, #tale-view .game-card, #pet-view .game-card,
  #habits-view .game-card, #world-view .game-card, #fun-view .game-card, #art-view .game-card, #ethics-view .game-card,
  #sticker-view .game-card { padding: 16px 14px; border-radius: var(--sk-r-lg); margin-bottom: 12px; }
  /* đầu màn chơi gọn: nhãn tên trò + nút nghe nhỏ lại để câu hỏi lên sớm hơn */
  #music-view .game-badge, #tale-view .game-badge, #habits-view .game-badge, #world-view .game-badge, #fun-view .game-badge,
  #art-view .game-badge, #ethics-view .game-badge { font-size: .82rem; padding: 5px 11px; line-height: 1.3; }
  #art-view .voice-btn, #ethics-view .voice-btn { font-size: .82rem; padding: 6px 11px; }
  #music-view .game-header, #art-view .game-header, #ethics-view .game-header { margin-bottom: 10px; }
  #music-view .mu-sound-hint { font-size: .74rem; line-height: 1.3; margin-bottom: 8px; }
}

/* =====================================================================
 * 1. BẢN ĐỒ TRI THỨC (#map-view) - games-adventure-map.css + skills.css
 * ===================================================================== */
#map-view .overworld-wrapper { padding: 0 0 24px; }
#map-view .overworld-header-card {
  background: #fff; border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); box-shadow: var(--sk-sh-2);
  padding: 18px 20px; margin-bottom: 18px;
}
#map-view .overworld-title { font-size: 1.4rem; font-weight: 800; color: var(--sk-ink); }
#map-view .overworld-subtitle { font-weight: 600; color: var(--sk-muted); }
#map-view .stat-pill-item { background: var(--sk-surface-3); border: 0; box-shadow: none; color: var(--sk-text); border-radius: 999px; padding: 7px 14px; font-size: .9rem; }
#map-view .stat-pill-item strong { color: var(--sk-ink); }
#map-view .btn-back-stage, #map-view .btn-tool-write {
  background: #fff; color: var(--sk-text); border: 1px solid var(--sk-line); border-radius: 12px; box-shadow: var(--sk-sh-1);
  font-family: var(--font-body); font-weight: 800; font-size: .92rem; min-height: 44px; padding: 8px 14px; transform: none !important;
}
#map-view .btn-back-stage:hover, #map-view .btn-tool-write:hover { background: var(--sk-surface-2); border-color: var(--sk-line-2); color: var(--sk-ink); }

/* thẻ chọn bản đồ / chọn chặng */
#map-view .islands-path-grid { gap: 14px; }
#map-view .deck-title { font-size: 1.15rem; font-weight: 800; color: var(--sk-ink); margin: 4px 2px 12px; }
#map-view .island-card {
  background: #fff; border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); box-shadow: var(--sk-sh-1);
  padding: 18px 16px; animation: none; transition: transform .12s, box-shadow .12s, border-color .12s;
}
@media (hover: hover) { #map-view .island-card.island-unlocked:hover { transform: translateY(-2px); box-shadow: var(--sk-sh-2); border-color: var(--sk-line-2); } }
/* máy tính: nút "Khám Phá" thẳng hàng dù mô tả dài ngắn khác nhau */
@media (min-width: 641px) {
  #map-view .island-card { display: flex; flex-direction: column; }
  #map-view .island-card .island-badge { align-self: center; }
  #map-view .island-card .island-footer { margin-top: auto; }
}
#map-view .island-card.island-current { border-color: var(--sk-primary); box-shadow: 0 0 0 3px var(--sk-primary-100), var(--sk-sh-1); animation: none; }
#map-view .island-card.island-locked { background: var(--sk-surface-2); opacity: .7; filter: grayscale(.4); }
#map-view .avatar-hero-marker { background: var(--sk-primary); border: 2px solid #fff; box-shadow: var(--sk-sh-1); border-radius: 999px; font-family: var(--font-body); font-weight: 800; animation: none; }
#map-view .island-badge { background: var(--sk-surface-3); color: var(--sk-text); font-family: var(--font-body); font-weight: 800; border-radius: 999px; padding: 4px 10px; font-size: .8rem; }
#map-view .island-icon-wrap { width: 76px; height: 76px; border-radius: 20px; border: 0; box-shadow: none; }
#map-view .map-pack-card .island-icon-wrap { box-shadow: none; }
#map-view .island-icon { font-size: 2.7rem; filter: none; }
#map-view .lock-overlay { border-radius: 20px; }
#map-view .island-name { font-size: 1.12rem; font-weight: 800; color: var(--sk-ink); }
#map-view .island-desc { color: var(--sk-muted); font-weight: 600; }
#map-view .island-footer { border-top: 1px solid var(--sk-line); }
#map-view .map-pack-bar { height: 8px; background: var(--sk-surface-3); }
#map-view .map-pack-bar > span { background: var(--sk-green); }
#map-view .btn-play-island {
  background: var(--sk-primary); color: #fff; border: 0; border-radius: 12px; box-shadow: 0 3px 0 var(--sk-primary-700);
  font-family: var(--font-body); font-weight: 800; min-height: 44px; padding: 8px 16px; transform: none !important;
}
#map-view .btn-play-island:hover { background: var(--sk-primary-600); }
#map-view .btn-play-island:active { transform: translateY(2px) !important; box-shadow: 0 1px 0 var(--sk-primary-700); }
#map-view .locked-hint { color: var(--sk-faint); }
#map-view .floating-deco { display: none; }

/* bản đồ toàn cảnh (ảnh + ghim): chỉ làm phẳng khung, ghim giữ nguyên */
#map-view .panoramic-map-container { border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); box-shadow: var(--sk-sh-2); padding: 10px; margin-bottom: 20px; }
#map-view .map-artwork-wrapper, #map-view .panoramic-map-img { border-radius: var(--sk-r); }

/* màn chơi trong đảo: khung trắng, cảnh nền màu nhạt theo chủ đề CHỈ ở dải đá (vì sao: giữ không khí từng đảo mà khung vẫn phẳng) */
#map-view .stage-world-container {
  background: #fff; color: var(--sk-ink); border: 1px solid var(--sk-line); border-radius: var(--sk-r-xl); box-shadow: var(--sk-sh-2); padding: 18px;
}
#map-view .stage-world-topbar { background: none; backdrop-filter: none; -webkit-backdrop-filter: none; border: 0; box-shadow: none; padding: 0; margin-bottom: 14px; }
#map-view .stage-world-icon { filter: none; }
#map-view .stage-world-name, #map-view .theme-space .stage-world-name { font-size: 1.2rem; font-weight: 800; color: var(--sk-ink); }
#map-view .stage-step-tag { background: var(--sk-primary-50); color: var(--sk-primary-700); font-family: var(--font-body); font-weight: 800; border-radius: 999px; }
#map-view .stage-landscape { border: 0; border-radius: var(--sk-r-lg); box-shadow: none; padding: 16px 14px 20px; margin-bottom: 16px; }
#map-view .theme-candy .stage-landscape { background: #FFF1F2; }
#map-view .theme-pets .stage-landscape { background: #F0FDF4; }
#map-view .theme-farm .stage-landscape { background: #FEFCE8; }
#map-view .theme-cake .stage-landscape { background: #FDF2F8; }
#map-view .theme-city .stage-landscape { background: #F0F9FF; }
#map-view .theme-ocean .stage-landscape { background: #ECFEFF; }
#map-view .theme-castle .stage-landscape { background: #FAF5FF; }
#map-view .theme-dino .stage-landscape { background: #FFF7ED; }
#map-view .theme-temple .stage-landscape { background: #FFFBEB; }
#map-view .theme-space .stage-landscape { background: #1E1B4B; }
#map-view .scenery-theme-badge, #map-view .theme-space .scenery-theme-badge {
  background: #fff; color: var(--sk-ink); border: 1px solid var(--sk-line); box-shadow: none; border-radius: 999px;
  font-family: var(--font-body); font-weight: 800; font-size: .88rem; padding: 6px 14px; margin-bottom: 18px;
}
#map-view .landscape-deco { opacity: .3; filter: none; }
#map-view .stepping-stones-track::before { border-top: 3px dashed rgba(148, 163, 184, .45); }
#map-view .stone-platform { border: 2px solid var(--sk-line-2); border-radius: 14px; box-shadow: var(--sk-sh-1); }
#map-view .stone-checkpoint.stone-done .stone-platform { background: var(--sk-green-50); border-color: var(--sk-green); box-shadow: none; }
#map-view .stone-checkpoint.stone-active .stone-platform { background: var(--sk-primary-50); border-color: var(--sk-primary); box-shadow: 0 0 0 4px rgba(249, 115, 22, .2); }
#map-view .stone-checkpoint.stone-active .stone-num { color: var(--sk-primary-700); }
#map-view .walker-name { background: var(--sk-primary); font-family: var(--font-body); font-weight: 800; box-shadow: none; }
#map-view .avatar-walker-inner, #map-view .landmark-symbol { filter: none; }
#map-view .landmark-name { background: #fff; color: var(--sk-text); font-family: var(--font-body); font-weight: 800; border-radius: 999px; }
#map-view .theme-space .landmark-name { background: #312E81; color: #E0E7FF; }
/* hộp câu hỏi: nằm luôn trong khung trắng, không lồng thêm thẻ */
#map-view .rpg-challenge-box, #map-view .theme-space .rpg-challenge-box {
  background: none; backdrop-filter: none; -webkit-backdrop-filter: none; border: 0; box-shadow: none; padding: 4px 0 0; border-radius: 0;
}
#map-view .challenge-badge { background: var(--sk-amber-50); color: #92400E; border: 1px solid #FDE68A; border-radius: 999px; font-family: var(--font-body); font-weight: 800; font-size: .88rem; }
#map-view .challenge-hint-tag, #map-view .theme-space .challenge-hint-tag {
  background: #fff; color: var(--sk-text); border: 1px solid var(--sk-line); border-radius: 999px; padding: 7px 14px; min-height: 40px; font-weight: 800; cursor: pointer;
}
#map-view .challenge-hint-text { color: var(--sk-text); }
#map-view .challenge-icon-wrap { filter: none; font-size: 3.8rem; }
#map-view .challenge-question, #map-view .theme-space .challenge-question { font-weight: 800; color: var(--sk-ink); font-size: 1.35rem; }
#map-view .challenge-options-grid { gap: 12px; }
#map-view .challenge-opt-btn, #map-view .theme-space .challenge-opt-btn {
  background: #fff; color: var(--sk-ink); border: 2px solid var(--sk-line); border-radius: 18px; box-shadow: 0 4px 0 var(--sk-line-2);
  font-family: var(--font-display); font-weight: 800; min-height: 60px; transition: transform .08s, box-shadow .08s, border-color .12s, background .12s;
}
@media (hover: hover) {
  #map-view .challenge-opt-btn:hover, #map-view .theme-space .challenge-opt-btn:hover { transform: translateY(-1px); border-color: #93C5FD; box-shadow: 0 5px 0 #93C5FD; background: #F8FBFF; }
}
#map-view .challenge-opt-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--sk-line-2); }
#map-view .challenge-opt-btn.correct-answer { background: var(--sk-green) !important; border-color: #15803D !important; box-shadow: 0 4px 0 #166534 !important; color: #fff !important; }
#map-view .challenge-opt-btn.wrong-answer { background: var(--sk-red) !important; border-color: #B91C1C !important; box-shadow: 0 4px 0 #991B1B !important; color: #fff !important; }
/* màn thắng chặng */
#map-view .victory-icon-big { animation: none; font-size: 4.6rem; }
#map-view .victory-title { color: var(--sk-ink); font-weight: 800; font-size: 1.7rem; }
#map-view .victory-subtitle { color: var(--sk-muted); font-weight: 600; font-size: 1.02rem; }
#map-view .big-star.star-glow { animation: none; filter: none; }
#map-view .victory-reward-badge { background: var(--sk-amber-50); border: 1px solid #FDE68A; border-radius: var(--sk-r); color: #92400E; font-size: 1rem; }
@media (max-width: 640px) {
  #map-view .overworld-header-card { padding: 14px; gap: 10px; }
  #map-view .overworld-title { font-size: 1.2rem; }
  /* thẻ bản đồ / chặng: ảnh trái - chữ phải cho gọn (11 bản đồ xếp dọc quá dài) */
  #map-view .island-card {
    display: grid; grid-template-columns: 64px 1fr; grid-template-areas: "ic badge" "ic name" "ic desc" "ft ft";
    column-gap: 12px; align-items: center; text-align: left; padding: 14px;
  }
  #map-view .island-badge { grid-area: badge; justify-self: start; margin-bottom: 4px; }
  #map-view .island-icon-wrap { grid-area: ic; width: 64px; height: 64px; margin: 0; border-radius: 16px; align-self: start; }
  #map-view .lock-overlay { border-radius: 16px; }
  #map-view .island-icon { font-size: 2.3rem; }
  #map-view .island-name { grid-area: name; font-size: 1.05rem; margin: 0; }
  #map-view .island-desc { grid-area: desc; min-height: 0; margin: 2px 0 10px; font-size: .84rem; }
  #map-view .island-footer { grid-area: ft; padding-top: 10px; }
  #map-view .map-pack-bar { margin-bottom: 2px; }
  #map-view .avatar-hero-marker { left: auto; right: 12px; transform: none; top: -12px; }
  #map-view .stage-world-container { padding: 12px; border-radius: var(--sk-r-lg); }
  #map-view .stage-world-topbar { padding: 0; margin-bottom: 10px; }
  #map-view .stage-world-heading { order: 3; flex: 1 1 100%; justify-content: center; flex-wrap: wrap; gap: 4px 8px; }
  #map-view .stage-world-icon { font-size: 1.4rem; }
  #map-view .stage-world-name { font-size: 1.05rem; }
  /* dòng chữ trang trí tên vùng: bỏ trên điện thoại cho câu hỏi lên sớm */
  #map-view .scenery-theme-badge { display: none; }
  #map-view .stage-landscape { padding: 6px 10px 10px; margin-bottom: 12px; }
  #map-view .stepping-stones-track { padding-top: 50px; padding-bottom: 10px; }
  #map-view .challenge-header { margin-bottom: 8px; gap: 8px; flex-wrap: nowrap; }
  #map-view .challenge-badge { font-size: .8rem; padding: 5px 10px; white-space: nowrap; }
  #map-view .challenge-hint-tag { flex: none; padding: 6px 10px; font-size: .82rem; white-space: nowrap; }
  #map-view .challenge-body { margin-bottom: 10px; }
  #map-view .challenge-question { font-size: 1.15rem; }
  #map-view .challenge-icon-wrap { font-size: 3.2rem; }
  #map-view .victory-title { font-size: 1.35rem; }
}

/* =====================================================================
 * 2. HÀNH TRÌNH 8 ĐẢO (#journey-view) - play-more.css
 * ===================================================================== */
#journey-view .jn-strip { gap: 8px; padding: 2px 2px 12px; }
#journey-view .jn-island { border: 1px solid var(--sk-line); border-radius: var(--sk-r); background: #fff; box-shadow: var(--sk-sh-1); padding: 10px 4px 8px; min-height: 92px; }
#journey-view .jn-island.view { border-color: var(--sk-primary); background: var(--sk-primary-50); box-shadow: inset 0 0 0 1px var(--sk-primary); }
#journey-view .jn-island.done { background: var(--sk-green-50); border-color: #BBF7D0; }
#journey-view .jn-island.done.view { border-color: var(--sk-primary); }
#journey-view .jn-island.locked { opacity: .55; box-shadow: none; }
#journey-view .jn-island-nm { font-weight: 800; color: var(--sk-ink); }
#journey-view .jn-island-tag { font-weight: 800; color: var(--sk-green); }
#journey-view .jn-island-tag.now { color: var(--sk-primary-700); }
#journey-view .jn-map { border: 1px solid var(--sk-line); }
#journey-view .jn-map-head { margin-bottom: 14px; }
#journey-view .jn-map-ic { width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; font-size: 2.1rem; background: var(--sk-primary-50); border-radius: 16px; }
#journey-view .jn-map-title { font-weight: 800; color: var(--sk-ink); font-size: 1.2rem; }
#journey-view .jn-map-sub { font-weight: 600; color: var(--sk-muted); }
#journey-view .jn-map-count { background: var(--sk-amber-50); color: #92400E; border: 1px solid #FDE68A; font-weight: 800; font-size: .9rem; }
#journey-view .jn-path::before { border-left: 2px solid var(--sk-line); }
#journey-view .jn-node { background: var(--sk-surface-2); border: 1px solid var(--sk-line); border-radius: var(--sk-r); }
#journey-view .jn-node.now { background: #fff; border-color: var(--sk-primary); box-shadow: 0 0 0 3px var(--sk-primary-100); animation: none; }
#journey-view .jn-node.done { background: var(--sk-green-50); border-color: #BBF7D0; }
#journey-view .jn-node.boss { background: var(--sk-red-50); border-color: #FECACA; }
#journey-view .jn-node.boss.now { border-color: var(--sk-red); box-shadow: 0 0 0 3px #FEE2E2; }
#journey-view .jn-node-ic { border: 2px solid var(--sk-line); }
#journey-view .jn-node.now .jn-node-ic { border-color: var(--sk-primary); }
#journey-view .jn-node.done .jn-node-ic { border-color: #86EFAC; }
#journey-view .jn-node-title { font-weight: 800; color: var(--sk-ink); }
#journey-view .jn-node-sub { font-weight: 600; color: var(--sk-muted); }
#journey-view .jn-bar { background: var(--sk-surface-3); }
#journey-view .jn-bar span { background: var(--sk-primary); }
#journey-view .jn-play {
  border-radius: 12px; background: var(--sk-primary); color: #fff; box-shadow: 0 3px 0 var(--sk-primary-700);
  font-family: var(--font-body); font-weight: 800;
}
#journey-view .jn-play:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--sk-primary-700); }
#journey-view .jn-play.again { background: #fff; color: var(--sk-text); border: 1px solid var(--sk-line-2); box-shadow: 0 3px 0 var(--sk-line); }
#journey-view .jn-play.boss { background: var(--sk-red); box-shadow: 0 3px 0 #991B1B; }
/* màn chơi chặng / đánh trùm */
#journey-view .jn-boss-card { border: 1px solid #FECACA; }
#journey-view .jn-boss-ic { animation: none; }
#journey-view .jn-boss-hp { background: #FEE2E2; }
#journey-view .jn-boss-hp span { background: var(--sk-red); }
#journey-view .ar-title { font-weight: 800; color: var(--sk-ink); }
#journey-view .ar-sub { font-weight: 600; color: var(--sk-muted); }
#journey-view .ar-q-text { font-weight: 800; color: var(--sk-ink); }
#journey-view .ar-opt {
  background: #fff; color: var(--sk-ink); border: 2px solid var(--sk-line); border-radius: 18px; box-shadow: 0 4px 0 var(--sk-line-2);
  font-family: var(--font-display); font-weight: 800; transition: transform .08s, box-shadow .08s, border-color .12s, background .12s;
}
@media (hover: hover) { #journey-view .ar-opt:not(:disabled):hover { border-color: #93C5FD; box-shadow: 0 4px 0 #93C5FD; background: #F8FBFF; } }
#journey-view .ar-opt:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--sk-line-2); }
#journey-view .ar-opt.right { background: var(--sk-green); border-color: #15803D; box-shadow: 0 4px 0 #166534; color: #fff; }
#journey-view .ar-opt.wrong { background: var(--sk-red); border-color: #B91C1C; box-shadow: 0 4px 0 #991B1B; color: #fff; }
#journey-view .jn-map-head > div:nth-child(2) { flex: 1 1 200px; min-width: 0; }
@media (max-width: 640px) {
  #journey-view .jn-island { width: 100px; }
  #journey-view .jn-map-ic { width: 48px; height: 48px; font-size: 1.8rem; }
  #journey-view .jn-map-title { font-size: 1.08rem; }
  #journey-view .jn-map-count { margin-left: 0; }
  #journey-view .jn-node.right { margin-left: 16px; }
  #journey-view .jn-node-ic { width: 42px; height: 42px; font-size: 1.3rem; }
}

/* =====================================================================
 * 3. BA HỘP Ở TRANG NHÓM "CỦA BÉ" (#hub-be-boxes: #pet-box, #journey-box, #family-box)
 *    .jn-go còn dùng ở thẻ SGK trang chủ -> luôn ghi kèm #hub-be-boxes
 * ===================================================================== */
/* hộp rộng bằng nội dung trang nhóm (hubs.css giới hạn 1000px -> lệch mép với các khu bên dưới) */
#hub-view #hub-be-boxes { max-width: none; }
#hub-be-boxes .pet-card, #hub-be-boxes .jn-card, #hub-be-boxes .fm-card {
  background: #fff; border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); box-shadow: var(--sk-sh-1);
  padding: 14px 16px; margin: 0; gap: 14px;
}
#hub-be-boxes .jn-card.jn-done { background: #fff; }
#hub-be-boxes .fm-card.done { background: var(--sk-green-50); border-color: #BBF7D0; }
#hub-be-boxes .pet-avatar { width: 64px; height: 64px; background: var(--sk-surface-2); border: 1px solid var(--sk-line); box-shadow: none; }
#hub-be-boxes .pet-emoji { font-size: 2.2rem; }
#hub-be-boxes .pet-mood { box-shadow: var(--sk-sh-1); border: 1px solid var(--sk-line); }
#hub-be-boxes .jn-ic, #hub-be-boxes .fm-ic {
  width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; font-size: 2.2rem;
  border-radius: 18px; background: var(--sk-primary-50);
}
#hub-be-boxes .fm-ic { background: var(--sk-green-50); }
#hub-be-boxes .pet-name, #hub-be-boxes .jn-title, #hub-be-boxes .fm-title { font-weight: 800; color: var(--sk-ink); font-size: 1.02rem; line-height: 1.25; }
#hub-be-boxes .pet-name small { color: var(--sk-muted); font-weight: 700; }
#hub-be-boxes .pet-say, #hub-be-boxes .jn-sub, #hub-be-boxes .fm-sub { font-weight: 600; color: var(--sk-muted); }
#hub-be-boxes .pet-meta { font-weight: 600; color: var(--sk-muted); }
#hub-be-boxes .pet-bar, #hub-be-boxes .jn-bar, #hub-be-boxes .fm-bar { height: 8px; background: var(--sk-surface-3); }
#hub-be-boxes .pet-bar span, #hub-be-boxes .jn-bar span { background: var(--sk-primary); }
#hub-be-boxes .fm-bar span { background: var(--sk-green); }
#hub-be-boxes .fm-member { background: var(--sk-surface-3); border: 0; color: var(--sk-text); }
#hub-be-boxes .pet-go, #hub-be-boxes .jn-go {
  background: var(--sk-primary); color: #fff; border: 0; border-radius: 12px; box-shadow: 0 3px 0 var(--sk-primary-700);
  min-height: 44px; padding: 0 18px; font-family: var(--font-body); font-weight: 800; font-size: .95rem;
}
#hub-be-boxes .pet-go:hover, #hub-be-boxes .jn-go:hover { background: var(--sk-primary-600); }
#hub-be-boxes .pet-go:active, #hub-be-boxes .jn-go:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--sk-primary-700); }
@media (max-width: 640px) {
  #hub-be-boxes .pet-card, #hub-be-boxes .jn-card, #hub-be-boxes .fm-card { padding: 12px; gap: 12px; align-items: flex-start; }
  #hub-be-boxes .pet-avatar, #hub-be-boxes .jn-ic, #hub-be-boxes .fm-ic { width: 52px; height: 52px; font-size: 1.8rem; }
  #hub-be-boxes .pet-emoji { font-size: 1.8rem; }
}

/* =====================================================================
 * 4. THÚ CƯNG (#pet-view)
 * ===================================================================== */
#pet-view .pet-scene { border-radius: var(--sk-r-lg); background: linear-gradient(180deg, #EFF6FF 0%, #F0FDF4 100%); }
#pet-view .pet-scene.stage-0 { background: linear-gradient(180deg, #FFFBEB 0%, #FEF3C7 100%); }
#pet-view .pet-big { filter: drop-shadow(0 6px 8px rgba(15, 23, 42, .12)); }
#pet-view .pet-bubble { border: 1px solid var(--sk-line); box-shadow: var(--sk-sh-1); color: var(--sk-text); font-weight: 700; }
#pet-view .pet-title { font-weight: 800; color: var(--sk-ink); font-size: 1.35rem; margin-top: 4px; }
#pet-view .pet-tag { background: var(--sk-surface-3); color: var(--sk-text); font-family: var(--font-body); font-weight: 800; }
#pet-view .pet-bar { background: var(--sk-surface-3); }
#pet-view .pet-bar.big { height: 12px; }
#pet-view .pet-bar span { background: var(--sk-primary); }
#pet-view .pet-meta { font-weight: 600; color: var(--sk-muted); font-size: .85rem; }
#pet-view .pet-meta strong { color: var(--sk-ink); }
#pet-view .pet-actions { margin-top: 14px; }
#pet-view .pet-note { font-weight: 600; color: var(--sk-muted); }
#pet-view .pet-stage-item { border: 1px solid var(--sk-line); border-radius: var(--sk-r); background: var(--sk-surface-2); }
#pet-view .pet-stage-item.done { background: var(--sk-green-50); border-color: #BBF7D0; }
#pet-view .pet-stage-item.now { border-color: var(--sk-green); box-shadow: 0 0 0 3px #DCFCE7; }
#pet-view .pet-stage-name { font-weight: 800; color: var(--sk-ink); }
#pet-view .pet-stage-desc { font-weight: 600; color: var(--sk-muted); }
#pet-view .pet-type { border: 2px solid var(--sk-line); border-radius: var(--sk-r); color: var(--sk-text); box-shadow: 0 3px 0 var(--sk-line); }
#pet-view .pet-type:active { transform: translateY(2px); box-shadow: none; }
#pet-view .pet-type.active { border-color: var(--sk-primary); background: var(--sk-primary-50); color: var(--sk-primary-700); box-shadow: 0 3px 0 var(--sk-primary-200); }
#pet-view .pet-type:disabled { opacity: .5; }
#pet-view .ar-inline .ar-btn { min-height: 48px; }
@media (max-width: 640px) {
  #pet-view .pet-scene { height: 170px; }
  #pet-view .pet-actions .ar-btn { min-width: 0; flex: 1 1 100%; }
  #pet-view .pet-types { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #pet-view .pet-type { font-size: .82rem; min-height: 64px; }
}

/* =====================================================================
 * 5. VIỆC TỐT MỖI NGÀY (#habits-view)
 * ===================================================================== */
#habits-view .hb-head .section-instruction { margin: 8px 0 0; text-align: left; }
#habits-view .hb-ring span { color: var(--sk-green); font-weight: 800; }
#habits-view .hb-grid { gap: 10px; margin-top: 14px; }
#habits-view .hb-item { border: 1px solid var(--sk-line); border-radius: var(--sk-r); background: #fff; box-shadow: var(--sk-sh-1); padding: 12px 10px; }
#habits-view .hb-item.pending { background: var(--sk-amber-50); border-color: #FDE68A; }
#habits-view .hb-item.done { background: var(--sk-green-50); border-color: #BBF7D0; }
#habits-view .hb-ic { font-size: 2.1rem; }
#habits-view .hb-name { font-weight: 800; color: var(--sk-ink); text-align: center; justify-content: center; }
#habits-view .hb-stars { color: #B45309; }
/* "Con đã làm": cam nhạt (10 nút cùng lúc - để nút cam đậm "Bố mẹ xác nhận" nổi bật nhất) */
#habits-view .hb-btn {
  background: var(--sk-primary-50); color: var(--sk-primary-700); border: 1px solid var(--sk-primary-200); border-radius: 12px;
  box-shadow: 0 3px 0 var(--sk-primary-200); font-family: var(--font-body); font-weight: 800; font-size: .9rem;
}
#habits-view .hb-btn:hover { background: var(--sk-primary-100); }
#habits-view .hb-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--sk-primary-200); }
#habits-view .hb-btn.small { background: #fff; color: var(--sk-text); border: 1px solid var(--sk-line-2); box-shadow: 0 2px 0 var(--sk-line); font-size: .8rem; }
#habits-view .hb-btn.gray { background: var(--sk-surface-3); color: var(--sk-text); box-shadow: none; }
#habits-view .hb-status { font-weight: 800; }
#habits-view .pd-table th { background: var(--sk-surface-3); color: var(--sk-text); font-weight: 800; }
#habits-view .pd-table td, #habits-view .pd-table th { border-color: var(--sk-line); }
#habits-view .hb-week th.today { background: var(--sk-primary-100); color: var(--sk-primary-700); }
#habits-view .hb-icon, #habits-view .hb-toggle { border: 1px solid var(--sk-line-2); }
#habits-view .hb-icon.active { border-color: var(--sk-primary); background: var(--sk-primary-50); box-shadow: inset 0 0 0 1px var(--sk-primary); }
#habits-view .hb-toggle { min-height: 44px; }
@media (max-width: 640px) {
  /* 2 cột: 10 việc tốt không còn là 10 thẻ to xếp dọc */
  #habits-view .hb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  #habits-view .hb-item { padding: 10px 8px; }
  #habits-view .hb-ic { font-size: 1.8rem; }
  #habits-view .hb-name { font-size: .86rem; }
  #habits-view .hb-btn { font-size: .82rem; padding: 0 6px; }
  #habits-view .hb-row { flex-direction: column; }
  #habits-view .hb-btn.small { min-height: 40px; }
  #habits-view .hb-head { align-items: flex-start; }
  #habits-view .hb-ring { width: 62px; height: 62px; }
  #habits-view .hb-ring span { width: 48px; height: 48px; }
}

/* =====================================================================
 * 6. ÂM NHẠC (#music-view) - phím đàn giữ màu (mang nghĩa nốt nhạc)
 * ===================================================================== */
#music-view .mu-dot { background: var(--sk-line); }
#music-view .mu-dot.ok { background: var(--sk-green); }
#music-view .mu-dot.bad { background: var(--sk-red); }
#music-view .mu-beat { border: 2px solid var(--sk-line); background: var(--sk-surface-2); border-radius: 12px; }
#music-view .mu-beat.hit { background: var(--sk-primary-50); border-color: var(--sk-primary-200); }
#music-view .mu-beat.lit { border-color: var(--sk-blue); background: var(--sk-blue-50); }
#music-view .mu-count { color: var(--sk-primary); }
#music-view .mu-tab, #music-view .mu-song {
  border: 1px solid var(--sk-line); background: #fff; color: var(--sk-text); font-family: var(--font-body); font-weight: 800; box-shadow: var(--sk-sh-1);
}
#music-view .mu-tab { border-radius: 12px; }
#music-view .mu-tab.active, #music-view .mu-song.active {
  border-color: var(--sk-primary); background: var(--sk-primary-50); color: var(--sk-primary-700); box-shadow: inset 0 0 0 1px var(--sk-primary);
}
#music-view .mu-level-tag { background: var(--sk-surface-3); color: var(--sk-text); }
#music-view .mu-song-card { border: 1px solid var(--sk-line); border-radius: var(--sk-r); box-shadow: 0 3px 0 var(--sk-line); }
#music-view .mu-song-card:active { transform: translateY(2px); box-shadow: none; }
#music-view .mu-song-card.done { background: var(--sk-green-50); border-color: #BBF7D0; }
#music-view .mu-song-card.free { border-style: solid; background: var(--sk-surface-2); }
#music-view .mu-song-nm, #music-view .mu-now-nm { color: var(--sk-ink); font-weight: 800; }
#music-view .mu-nav { background: var(--sk-surface-3); color: var(--sk-text); }
#music-view .mu-progress { height: 10px; background: var(--sk-surface-3); }
#music-view .mu-progress span { background: var(--sk-primary); }
#music-view .mu-prog-txt { color: var(--sk-primary-700); font-weight: 800; }
#music-view .mu-key.next { animation-duration: .9s; }

/* =====================================================================
 * 7. KỂ CHUYỆN THEO TRANH (#tale-view)
 * ===================================================================== */
#tale-view .tl-slot { border: 2px dashed var(--sk-line-2); border-radius: var(--sk-r); background: var(--sk-surface-2); }
#tale-view .tl-slot.filled { border-style: solid; border-color: var(--sk-blue); background: #fff; }
#tale-view .tl-slot.ok { border-color: var(--sk-green); background: var(--sk-green-50); }
#tale-view .tl-slot.bad { border-color: var(--sk-red); background: var(--sk-red-50); }
#tale-view .tl-slot-n { color: var(--sk-faint); font-weight: 800; }
#tale-view .tl-slot-empty { color: var(--sk-line-2); }
#tale-view .tl-frame { border: 2px solid var(--sk-line); border-radius: 18px; box-shadow: 0 4px 0 var(--sk-line-2); }
#tale-view .tl-frame:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--sk-line-2); }
#tale-view .tl-frame-txt { color: var(--sk-text); font-weight: 700; }
#tale-view .tl-speak, #tale-view .tl-del { background: var(--sk-blue-50); color: #1D4ED8; width: 40px; height: 40px; }
#tale-view .tl-group-label { color: var(--sk-ink); font-weight: 800; }
#tale-view .tl-opt { border: 2px solid var(--sk-line); border-radius: 12px; }
#tale-view .tl-opt.active { border-color: var(--sk-primary); background: var(--sk-primary-50); transform: none; box-shadow: inset 0 0 0 1px var(--sk-primary); }
#tale-view .tl-story .story-text { background: var(--sk-surface-2); border: 1px solid var(--sk-line); border-radius: var(--sk-r); }
#tale-view .tl-book-item { background: #fff; border: 1px solid var(--sk-line); border-radius: var(--sk-r); box-shadow: var(--sk-sh-1); }
#tale-view .tl-book-title { color: var(--sk-ink); font-weight: 800; }
@media (max-width: 640px) {
  #tale-view .tl-slots { gap: 6px; }
  #tale-view .tl-slot { min-height: 72px; }
  #tale-view .tl-cards { gap: 8px; }
  #tale-view .tl-opt { width: 48px; height: 48px; font-size: 1.45rem; }
}

/* =====================================================================
 * 8. KHÁM PHÁ THẾ GIỚI (#world-view) - world.css
 * ===================================================================== */
#world-view .wd-progress { color: var(--sk-muted); font-weight: 800; }
#world-view .wd-bar { background: var(--sk-surface-3); }
#world-view .wd-bar span { background: var(--sk-green); }
#world-view .wd-prompt { color: var(--sk-ink); font-family: var(--font-display); font-weight: 800; }
#world-view .wd-say { background: var(--sk-blue-50); color: #1D4ED8; border: 1px solid #BFDBFE; }
#world-view .wd-say:hover { background: #DBEAFE; }
#world-view .wd-opt {
  border: 2px solid var(--sk-line); border-radius: 18px; box-shadow: 0 4px 0 var(--sk-line-2); color: var(--sk-ink);
  transition: transform .08s, box-shadow .08s, border-color .12s, background .12s;
}
@media (hover: hover) { #world-view .wd-opt:not(:disabled):hover { transform: translateY(-1px); border-color: #93C5FD; box-shadow: 0 5px 0 #93C5FD; background: #F8FBFF; } }
#world-view .wd-opt:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--sk-line-2); }
#world-view .wd-opt .wd-lb { font-weight: 800; }
#world-view .wd-opt.ok { border-color: var(--sk-green); background: var(--sk-green-50); box-shadow: 0 4px 0 #86EFAC; }
#world-view .wd-opt.no { border-color: #F87171; background: var(--sk-red-50); box-shadow: 0 4px 0 #FCA5A5; }
#world-view .wd-score { color: var(--sk-text); }
/* "Câu tiếp" là hành động chính sau khi trả lời -> nút cam */
#world-view .wd-next { background: var(--sk-primary); color: #fff; border: 0; box-shadow: 0 4px 0 var(--sk-primary-700); font-family: var(--font-body); min-height: 52px; }
@media (hover: hover) { #world-view .wd-next:hover { background: var(--sk-primary-600); border: 0; box-shadow: 0 4px 0 var(--sk-primary-700); transform: none; } }
#world-view .wd-next:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--sk-primary-700); }

/* =====================================================================
 * 9. KHU HÀI HƯỚC (#fun-view) - fun.css phần fz/ftf/fp
 * ===================================================================== */
/* nhãn tên trò là thẻ div -> co theo chữ thay vì kéo dài cả hàng */
#fun-view .game-card > .game-badge, #music-view .game-card > .game-badge, #tale-view .game-card > .game-badge { display: inline-flex; align-items: center; }
#fun-view .game-card > .game-badge + *, #music-view .game-card > .game-badge + *, #tale-view .game-card > .game-badge + * { margin-top: 10px; }
/* máy tính rộng: 4 mảnh ghép 1 hàng cho gọn */
@media (min-width: 900px) { #fun-view .fz-silly { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
#fun-view .fz-part { border: 1px solid var(--sk-line); background: var(--sk-surface-2); border-radius: var(--sk-r); color: var(--sk-ink); padding: 10px 8px; }
/* màu nhãn từng phần khớp màu chữ trong câu (c0..c3) - giữ ý nghĩa, bỏ viền màu dày */
#fun-view .fz-part.p0 small { color: #DC2626; } #fun-view .fz-part.p1 small { color: #1D4ED8; }
#fun-view .fz-part.p2 small { color: #15803D; } #fun-view .fz-part.p3 small { color: #7C3AED; }
#fun-view .fz-part.p0, #fun-view .fz-part.p1, #fun-view .fz-part.p2, #fun-view .fz-part.p3 { border-color: var(--sk-line); }
#fun-view .fz-part-nav button { width: 44px; height: 40px; background: #fff; border: 1px solid var(--sk-line); color: var(--sk-text); }
#fun-view .fz-part-nav button:hover { background: var(--sk-surface-3); }
#fun-view .fz-sentence { font-weight: 800; font-size: 1.25rem; }
#fun-view .fz-rate { color: var(--sk-text); }
#fun-view .fz-rate-btn {
  background: var(--sk-primary-50); color: var(--sk-primary-700); border: 1px solid var(--sk-primary-200);
  font-family: var(--font-body); font-weight: 800;
}
#fun-view .fz-rate-btn.gray { background: #fff; color: var(--sk-text); border-color: var(--sk-line); }
#fun-view .fz-top { background: var(--sk-amber-50); border: 1px solid #FDE68A; }
#fun-view .fz-top-title { color: #92400E; font-weight: 800; }
#fun-view .fz-top-item { border-bottom: 1px solid #FDE68A; }
#fun-view .ftf-timer { background: var(--sk-surface-3); }
#fun-view .ftf-timer span { background: var(--sk-primary); }
#fun-view .ftf-q { font-weight: 800; color: var(--sk-ink); }
/* Đúng / Sai: giữ xanh - đỏ, bỏ gradient */
#fun-view .ftf-btn { border-radius: 18px; font-family: var(--font-body); font-weight: 800; }
#fun-view .ftf-btn.yes { background: var(--sk-green); box-shadow: 0 5px 0 #166534; }
#fun-view .ftf-btn.no { background: var(--sk-red); box-shadow: 0 5px 0 #991B1B; }
#fun-view .ftf-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
#fun-view .ftf-btn.right { box-shadow: 0 0 0 4px #FDE68A, 0 5px 0 rgba(0, 0, 0, .2); }
#fun-view .fz-stage { background: var(--sk-amber-50); border: 1px solid #FDE68A; border-radius: var(--sk-r-lg); }
#fun-view .fz-album-item { background: var(--sk-surface-2); border: 1px solid var(--sk-line); }
#fun-view .fz-sound { border: 2px solid var(--sk-line); border-radius: 18px; box-shadow: 0 4px 0 var(--sk-line-2); color: var(--sk-ink); }
#fun-view .fz-sound:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--sk-line-2); }
#fun-view .fz-sound.right { border-color: var(--sk-green); background: var(--sk-green-50); box-shadow: 0 4px 0 #86EFAC; }
#fun-view .fz-sound.wrong { border-color: var(--sk-red); background: var(--sk-red-50); box-shadow: 0 4px 0 #FCA5A5; }
#fun-view .fz-bigplay { background: var(--sk-primary); border: 0; box-shadow: 0 6px 0 var(--sk-primary-700); }
#fun-view .fz-bigplay:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--sk-primary-700); }
#fun-view .fp-score { background: var(--sk-surface-2); border: 1px solid var(--sk-line); }
#fun-view .fp-score b { color: var(--sk-primary-700); }
#fun-view .fp-card { border: 2px solid var(--sk-line); background: #fff; color: var(--sk-ink); box-shadow: 0 4px 0 var(--sk-line-2); font-weight: 800; }
#fun-view .fp-card small { color: var(--sk-muted); }
#fun-view .fp-card:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--sk-line-2); }
#fun-view .fk-bubble { border: 1px solid var(--sk-line); }
@media (max-width: 480px) { #fun-view .fp-card { min-height: 64px; } }

/* =====================================================================
 * 10. HỌA SĨ NHÍ (#art-view) - giữ bảng màu, vùng tô, canvas (toạ độ tính theo getBoundingClientRect)
 * ===================================================================== */
/* nhãn tên trò: art-game.js gán màu nền inline -> cần !important */
#art-view .game-badge { background: var(--sk-amber-50) !important; color: #92400E !important; }
#art-view .art-toolbar { background: #fff; border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); box-shadow: var(--sk-sh-1); padding: 12px 14px; }
/* dải chấm màu: giữ màu, chỉ đổi khung + vòng chọn (vòng đỏ cũ lẫn với màu đỏ; chấm phóng to bị cắt mép) */
#art-view .color-palette { padding: 8px 10px; }
#art-view .color-dot.active { transform: none; border-color: #fff; box-shadow: 0 0 0 3px var(--sk-ink), 0 2px 6px rgba(15, 23, 42, .2); }
@media (max-width: 820px) { #art-view .color-palette { background: var(--sk-surface-2); border: 1px solid var(--sk-line); } }
#art-view .tool-label { font-family: var(--font-body); font-weight: 800; color: var(--sk-muted); }
#art-view .tool-btn {
  background: #fff; border: 1px solid var(--sk-line-2); border-radius: 12px; color: var(--sk-text); min-height: 44px;
  font-family: var(--font-body); font-weight: 800; box-shadow: 0 2px 0 var(--sk-line); transform: none !important;
}
#art-view .tool-btn:hover { background: var(--sk-surface-2); }
#art-view .tool-btn.active { background: var(--sk-primary-50); color: var(--sk-primary-700); border-color: var(--sk-primary); box-shadow: inset 0 0 0 1px var(--sk-primary); }
#art-view .tool-btn.btn-save-art { background: var(--sk-primary); color: #fff; border-color: var(--sk-primary); box-shadow: 0 3px 0 var(--sk-primary-700); }
#art-view .canvas-wrapper { border: 2px solid var(--sk-line); border-radius: var(--sk-r-lg); box-shadow: var(--sk-sh-2); }
#art-view .coloring-templates-grid { background: var(--sk-surface-2); border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); }
#art-view .template-card { border: 2px solid var(--sk-line); border-radius: var(--sk-r); box-shadow: none; transition: border-color .12s, background .12s; }
@media (hover: hover) { #art-view .template-card:hover { transform: none; border-color: var(--sk-line-2); box-shadow: var(--sk-sh-1); } }
#art-view .template-card.active { border-color: var(--sk-primary); background: var(--sk-primary-50); box-shadow: inset 0 0 0 1px var(--sk-primary); }
#art-view .template-card-title { font-family: var(--font-body); font-weight: 800; color: var(--sk-ink); }
#art-view .template-card-img { border: 1px solid var(--sk-line); box-shadow: none; }
#art-view .svg-coloring-box, #art-view .coloring-interactive-box { border: 2px solid var(--sk-line); border-radius: var(--sk-r-lg); box-shadow: var(--sk-sh-2); }
#art-view .coloring-interactive-canvas { box-shadow: none; }
#art-view .btn-coloring-action {
  background: #fff; border: 1px solid var(--sk-line-2); border-radius: 12px; color: var(--sk-text); min-height: 44px;
  font-family: var(--font-body); box-shadow: 0 2px 0 var(--sk-line); transform: none !important;
}
#art-view .btn-coloring-action:hover { background: var(--sk-surface-2); border-color: var(--sk-line-2); color: var(--sk-ink); }
#art-view .btn-finish-coloring {
  background: var(--sk-primary); border-radius: var(--sk-r); box-shadow: 0 4px 0 var(--sk-primary-700);
  font-family: var(--font-body); font-weight: 800; transform: none !important;
}
#art-view .btn-finish-coloring:active { transform: translateY(3px) !important; box-shadow: 0 1px 0 var(--sk-primary-700); }
#art-view .coloring-mode-badge { border-radius: 999px; }
#art-view .beaker-card { border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); box-shadow: var(--sk-sh-1); padding: 16px 18px; }
#art-view .beaker-name { font-family: var(--font-body); color: var(--sk-ink); }
#art-view .beaker-operator { color: var(--sk-muted); }
#art-view .beaker-result-blob { border-color: var(--sk-line-2); background: var(--sk-surface-2); }
@media (max-width: 640px) {
  #art-view .art-toolbar { padding: 10px; gap: 10px; }
  #art-view .beaker-reaction-zone { gap: 8px; }
  #art-view .beaker-card { padding: 10px; }
  #art-view .beaker-color-blob, #art-view .beaker-result-blob { width: 54px; height: 54px; }
}

/* =====================================================================
 * 11. BÉ NGOAN & LỄ PHÉP (#ethics-view) - games-ethics.css
 * ===================================================================== */
/* nhãn tên trò + nhãn điều: ethics-game.js gán màu inline -> !important */
#ethics-view .game-badge { background: var(--sk-amber-50) !important; color: #92400E !important; }
#ethics-view .u-rule-badge { background: var(--sk-red-50) !important; color: #B91C1C !important; border-radius: 999px; font-weight: 800; }
#ethics-view .uncle-ho-tabs-row { gap: 8px; }
#ethics-view .uncle-ho-tab-btn {
  background: #fff; border: 1px solid var(--sk-line); border-radius: 999px; color: var(--sk-text); box-shadow: var(--sk-sh-1);
  font-family: var(--font-body); font-weight: 800; min-height: 44px; transform: none !important;
}
#ethics-view .uncle-ho-tab-btn:hover { background: var(--sk-surface-2); border-color: var(--sk-line-2); }
#ethics-view .uncle-ho-tab-btn.active { background: var(--sk-primary-50); color: var(--sk-primary-700); border-color: var(--sk-primary); box-shadow: inset 0 0 0 1px var(--sk-primary); }
/* các khung lồng trong thẻ: bỏ viền/bóng (thẻ ngoài đã là khung), tránh thẻ trong thẻ */
#ethics-view .uncle-ho-rule-card, #ethics-view .scenario-card-container, #ethics-view .tf-card-container {
  background: none; border: 0 !important; box-shadow: none; padding: 8px 0 0; border-radius: 0;
}
#ethics-view .u-rule-banner, #ethics-view .scenario-top-header { border-bottom: 1px solid var(--sk-line); }
#ethics-view .u-rule-heading, #ethics-view .scenario-main-title, #ethics-view .tf-statement-text { color: var(--sk-ink); font-weight: 800; }
#ethics-view .u-listen-btn { background: var(--sk-blue-50); color: #1D4ED8; border: 1px solid #BFDBFE; border-radius: 999px; font-family: var(--font-body); min-height: 40px; }
#ethics-view .u-rule-meaning-box, #ethics-view .u-rule-actions-box { background: var(--sk-surface-2); border: 1px solid var(--sk-line); border-radius: var(--sk-r); }
#ethics-view .u-box-title { color: var(--sk-ink); font-weight: 800; }
#ethics-view .u-rule-quote-box { background: var(--sk-amber-50); border-left: 3px solid var(--sk-amber); border-radius: 0 var(--sk-r) var(--sk-r) 0; }
#ethics-view .u-mini-quiz-box { background: #fff; border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); box-shadow: var(--sk-sh-1); }
#ethics-view .u-quiz-title { color: var(--sk-ink); font-weight: 800; }
#ethics-view .u-quiz-q { color: var(--sk-ink); }
/* nút trả lời: kiểu "bấm lún" như .game-opt-btn */
#ethics-view .u-quiz-opt-btn, #ethics-view .scenario-opt-btn {
  background: #fff; color: var(--sk-ink); border: 2px solid var(--sk-line); border-radius: var(--sk-r); box-shadow: 0 4px 0 var(--sk-line-2);
  font-family: var(--font-body); font-weight: 800; min-height: 52px; transition: transform .08s, box-shadow .08s, border-color .12s, background .12s;
}
@media (hover: hover) {
  #ethics-view .u-quiz-opt-btn:hover, #ethics-view .scenario-opt-btn:hover { transform: translateY(-1px); border-color: #93C5FD; box-shadow: 0 5px 0 #93C5FD; background: #F8FBFF; }
}
#ethics-view .u-quiz-opt-btn:active, #ethics-view .scenario-opt-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--sk-line-2); }
#ethics-view .u-quiz-opt-btn.correct-answer, #ethics-view .scenario-opt-btn.correct-answer { background: var(--sk-green) !important; border-color: #15803D !important; box-shadow: 0 4px 0 #166534 !important; color: #fff !important; }
#ethics-view .u-quiz-opt-btn.wrong-answer, #ethics-view .scenario-opt-btn.wrong-answer { background: var(--sk-red) !important; border-color: #B91C1C !important; box-shadow: 0 4px 0 #991B1B !important; color: #fff !important; }
#ethics-view .scenario-opt-btn.correct-answer *, #ethics-view .scenario-opt-btn.wrong-answer * { color: #fff; }
#ethics-view .scenario-opt-letter { background: var(--sk-surface-3); color: var(--sk-text); }
#ethics-view .scenario-opt-text { color: inherit; }
#ethics-view .scenario-icon-bubble { background: var(--sk-green-50); border: 0; }
#ethics-view .tf-progress-tag { background: var(--sk-surface-3); color: var(--sk-text); border-radius: 999px; font-weight: 800; }
#ethics-view .scenario-counter { background: none; color: var(--sk-muted); font-weight: 800; }
#ethics-view .scenario-opt-btn.correct-answer .scenario-opt-letter, #ethics-view .scenario-opt-btn.wrong-answer .scenario-opt-letter { background: rgba(255, 255, 255, .25); }
/* tiêu đề điều: chữ được chỗ rộng, nút "Nghe Lời Dạy" xuống hàng khi chật */
#ethics-view .u-rule-banner { gap: 10px 14px; }
#ethics-view .u-rule-main-titles { flex: 1 1 180px; min-width: 0; }
#ethics-view .scenario-story-box { background: var(--sk-surface-2); border: 1px solid var(--sk-line); border-left: 3px solid var(--sk-green); border-radius: 0 var(--sk-r) var(--sk-r) 0; }
/* thanh cấp độ của phòng này dùng .diff-chip -> cùng kiểu "chọn đoạn" như .diff-pill-btn */
#ethics-view .diff-chip {
  min-height: 40px; padding: 6px 12px; background: transparent; border: 0; border-radius: 11px; box-shadow: none;
  font-family: var(--font-body); font-size: .88rem; font-weight: 800; color: var(--sk-muted); transform: none !important;
}
#ethics-view .diff-chip.active { background: #fff; color: var(--sk-ink); box-shadow: 0 1px 3px rgba(15, 23, 42, .12), 0 0 0 1px rgba(15, 23, 42, .04); }
#ethics-view .tf-icon-circle { background: var(--sk-surface-3); border: 0; }
/* Nên / Không nên: giữ xanh - đỏ, bỏ gradient */
#ethics-view .tf-btn { border-radius: 18px; font-family: var(--font-body); font-weight: 800; transform: none; }
#ethics-view .tf-btn-yes { background: var(--sk-green); box-shadow: 0 5px 0 #166534; }
#ethics-view .tf-btn-no { background: var(--sk-red); box-shadow: 0 5px 0 #991B1B; }
#ethics-view .tf-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
#ethics-view .garden-summary-card { background: var(--sk-surface-2); border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); }
#ethics-view .garden-summary-title { color: var(--sk-ink); font-weight: 800; }
#ethics-view .garden-stars-badge { background: var(--sk-amber-50); border: 1px solid #FDE68A; color: #92400E; box-shadow: none; border-radius: 999px; }
#ethics-view .deed-card { border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); box-shadow: var(--sk-sh-1); }
@media (hover: hover) { #ethics-view .deed-card:hover { transform: none; box-shadow: var(--sk-sh-2); } }
#ethics-view .deed-card.done { border: 2px solid var(--deed-color, var(--sk-green)); background: #fff; box-shadow: var(--sk-sh-1); }
#ethics-view .deed-flower-art { background: var(--sk-surface-3); }
#ethics-view .deed-title { color: var(--sk-ink); font-weight: 800; }
#ethics-view .btn-check-deed {
  background: #fff; color: var(--sk-text); border: 1px solid var(--sk-line-2); border-radius: 12px; box-shadow: 0 3px 0 var(--sk-line);
  font-family: var(--font-body); min-height: 44px; transform: none;
}
#ethics-view .btn-check-deed.btn-done { background: var(--sk-green); color: #fff; border: 0; box-shadow: 0 3px 0 #166534; }
@media (max-width: 640px) {
  #ethics-view .u-rule-meaning-box, #ethics-view .u-rule-actions-box { padding: 12px; }
  #ethics-view .u-mini-quiz-box { padding: 14px 12px; }
  #ethics-view .u-rule-big-icon { font-size: 2.4rem; }
  /* 5 điều: 1 hàng 5 ô (biểu tượng trên, chữ dưới) thay vì 3 hàng nút */
  #ethics-view .uncle-ho-tabs-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  #ethics-view .uncle-ho-tab-btn { flex-direction: column; justify-content: center; gap: 2px; padding: 6px 2px; min-height: 56px; border-radius: 12px; font-size: .78rem; }
  #ethics-view .uncle-ho-tab-btn .u-tab-icon { font-size: 1.2rem; line-height: 1; }
  #ethics-view .u-rule-heading { font-size: 1.2rem; }
}

/* =====================================================================
 * 12. ALBUM STICKER + CỬA HÀNG SAO + KỆ HUY HIỆU (#sticker-view)
 * ===================================================================== */
#sticker-view > .game-card + .game-card { margin-top: 16px; }
#sticker-view .section-instruction { text-align: center; }
#sticker-view .sticker-grid { gap: 12px; margin-top: 14px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
#sticker-view .sticker-item { border: 1px solid var(--sk-line); border-radius: var(--sk-r); background: var(--sk-surface-2); box-shadow: none; padding: 14px 10px; }
#sticker-view .sticker-item.unlocked { background: var(--sk-amber-50); border-color: #FDE68A; }
@media (hover: hover) { #sticker-view .sticker-item.unlocked:hover { transform: translateY(-2px); box-shadow: var(--sk-sh-2); } }
#sticker-view .sticker-item.locked { opacity: .6; }
#sticker-view .sticker-badge { font-size: 2.8rem; }
#sticker-view .sticker-title { color: var(--sk-ink); font-weight: 800; font-size: 1rem; }
#sticker-view .sticker-info { color: var(--sk-muted); font-weight: 600; }
#sticker-view .shop-balance {
  display: table; margin: 0 auto 12px; padding: 6px 14px; border-radius: 999px; background: var(--sk-amber-50); border: 1px solid #FDE68A;
  color: #92400E; font-family: var(--font-body); font-weight: 800; font-size: 1rem;
}
#sticker-view .shop-sub { font-weight: 800; color: var(--sk-ink); font-size: 1rem; margin: 16px 0 8px; }
#sticker-view .shop-item { border: 1px solid var(--sk-line); border-radius: var(--sk-r); box-shadow: 0 3px 0 var(--sk-line); min-height: 118px; }
#sticker-view .shop-item:active { transform: translateY(2px); box-shadow: none; }
#sticker-view .shop-item .shop-nm { color: var(--sk-ink); }
#sticker-view .shop-item.owned { background: var(--sk-green-50); border-color: #BBF7D0; }
#sticker-view .shop-item.equipped { background: var(--sk-primary-50); border-color: var(--sk-primary); box-shadow: inset 0 0 0 1px var(--sk-primary), 0 3px 0 var(--sk-primary-200); }
#sticker-view .shop-item .shop-tag { background: var(--sk-primary); font-weight: 800; }
#sticker-view .shop-item.owned .shop-tag { background: var(--sk-green); }
#sticker-view .sk-badge-count { background: var(--sk-amber-50); color: #92400E; font-size: .9rem; font-weight: 800; }
#sticker-view .sk-badge-item { border: 1px solid var(--sk-line); border-radius: var(--sk-r); background: var(--sk-surface-2); }
#sticker-view .sk-badge-item.owned { background: var(--sk-amber-50); border-color: #FDE68A; }
#sticker-view .sk-badge-name { color: var(--sk-ink); font-weight: 800; }
#sticker-view .sk-badge-desc { color: var(--sk-muted); font-weight: 600; }
@media (max-width: 640px) {
  #sticker-view .sticker-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  #sticker-view .sticker-item { padding: 10px 4px; }
  #sticker-view .sticker-badge { font-size: 2.2rem; margin-bottom: 4px; }
  #sticker-view .sticker-title { font-size: .82rem; line-height: 1.2; }
  #sticker-view .sticker-info { font-size: .72rem; }
  #sticker-view .shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  #sticker-view .shop-item { min-height: 104px; padding: 8px 4px; }
  #sticker-view .shop-item .shop-ic { font-size: 2rem; }
  #sticker-view .shop-item .shop-nm { font-size: .78rem; }
  #sticker-view .sk-badge-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  #sticker-view .sk-badge-item { padding: 10px 4px; }
  #sticker-view .sk-badge-icon { font-size: 1.9rem; }
  #sticker-view .sk-badge-name { font-size: .78rem; line-height: 1.2; }
  #sticker-view .sk-badge-desc { font-size: .68rem; line-height: 1.25; }
}


/* ===== css/theme/chung.css ===== */
/* Sam Kido v144 - giao diện mới: nhóm "chung" (nạp sau css/base/theme.css). Xem đầu file theme.css.
 * Phạm vi: hộp thoại (hồ sơ bé, cổng phụ huynh, nhiệm vụ, sticker, nghỉ mắt, tài khoản), Góc Phụ Huynh,
 * thông báo nhỏ (skToast), banner lên cấp, thanh cập nhật, trang Giáo viên + Quản trị trong app.
 * Phần khung chung .modal-card / .modal-title / .modal-btn-confirm đã nằm ở theme.css - ở đây chỉ chỉnh từng hộp. */

/* =====================================================================
 * 1. KHỐI DÙNG CHUNG TRONG HỘP THOẠI
 * ===================================================================== */
/* nhãn nhỏ đầu hộp: bỏ gradient xanh / vàng cũ -> chip cam nhạt */
.modal-card .modal-header-badge {
  display: inline-flex; align-items: center; gap: 6px; max-width: calc(100% - 48px);
  background: var(--sk-primary-50); color: var(--sk-primary-700); border: 0; border-radius: 12px;
  padding: 6px 12px; margin-bottom: 10px; font-family: var(--font-body); font-size: .84rem; font-weight: 800; line-height: 1.25;
}
/* nút X: ô xám nhạt, không xoay/phóng to khi rê chuột */
.modal-card .modal-close-icon {
  top: 14px; right: 14px; width: 40px; height: 40px; border: 0; border-radius: 12px;
  background: var(--sk-surface-3); color: var(--sk-muted); font-size: 1rem; box-shadow: none; transform: none !important;
}
@media (hover: hover) { .modal-card .modal-close-icon:hover { background: var(--sk-line); color: var(--sk-ink); transform: none !important; } }
/* nút phụ "Đóng" - trước đây chưa có kiểu nào nên hiện thành nút xám mặc định của trình duyệt */
.modal-card .modal-btn-cancel {
  min-height: 48px; padding: 12px 22px; background: #fff; color: var(--sk-text); border: 1px solid var(--sk-line-2); border-radius: 14px;
  box-shadow: 0 3px 0 var(--sk-line-2); font-family: var(--font-body); font-weight: 800; font-size: 1rem; cursor: pointer;
}
.modal-card .modal-btn-cancel:hover { background: var(--sk-surface-2); color: var(--sk-ink); }
.modal-card .modal-btn-cancel:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--sk-line-2); }
/* biểu tượng lớn (sticker, nghỉ mắt): đặt trong vòng tròn nền nhạt, bỏ nhấp nháy liên tục */
.modal-card .modal-icon-big {
  width: 104px; height: 104px; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center;
  font-size: 3.6rem; line-height: 1; background: var(--sk-primary-50); border-radius: 50%; animation: none;
}
#sticker-unlock-modal #unlocked-sticker-name { color: var(--sk-primary-700) !important; font-family: var(--font-display); font-weight: 800; font-size: 1.25rem !important; }
#sticker-unlock-modal .modal-btn-confirm, #rest-reminder-modal .modal-btn-confirm { margin-top: 8px; }

/* =====================================================================
 * 2. HỘP HỒ SƠ BÉ (#profile-modal - tạo/sửa, nhiều bé, tuổi, avatar, khung)
 * ===================================================================== */
#profile-modal .profile-modal-card { padding: 24px 24px 20px; }
#profile-modal .modal-desc { color: var(--sk-muted); margin-bottom: 14px; }
/* danh sách các bé trên máy */
#profile-modal .pl-box { background: var(--sk-surface-2); border: 1px solid var(--sk-line); border-radius: var(--sk-r); padding: 12px 14px; margin-bottom: 16px; }
#profile-modal .pl-title { font-family: var(--font-body); font-weight: 800; font-size: .92rem; color: var(--sk-ink); }
#profile-modal .pl-chip { border: 1px solid var(--sk-line); background: #fff; color: var(--sk-ink); box-shadow: var(--sk-sh-1); }
#profile-modal .pl-chip:hover { border-color: var(--sk-line-2); }
#profile-modal .pl-chip.active { border-color: var(--sk-primary); background: var(--sk-primary-50); box-shadow: inset 0 0 0 1px var(--sk-primary); }
#profile-modal .pl-chip .pl-now { background: var(--sk-primary); color: #fff; font-weight: 800; }
#profile-modal .pl-add { border-style: solid; color: var(--sk-primary-700); background: #fff; }
#profile-modal .pl-remove { min-height: 40px; padding: 0; color: var(--sk-red); font-weight: 700; }
#profile-modal .pl-hint { color: var(--sk-muted); font-weight: 600; }
/* nhãn + ô nhập */
#profile-modal .form-label { font-family: var(--font-body); font-size: .98rem; font-weight: 800; color: var(--sk-ink); }
#profile-modal .form-label .age-hint { color: var(--sk-faint); font-weight: 700; }
#profile-modal .form-sublabel { color: var(--sk-muted); font-weight: 700; font-size: .88rem; }
#profile-modal .form-input {
  min-height: 50px; background: #fff; border: 1px solid var(--sk-line-2); border-radius: 14px; color: var(--sk-ink);
  font-size: 1.05rem; font-weight: 700; box-shadow: var(--sk-sh-1);
}
#profile-modal .form-input:focus { border-color: var(--sk-primary); box-shadow: 0 0 0 4px rgba(249, 115, 22, .14); }
/* nút chọn tuổi / giới tính: cùng kiểu "đang chọn" với tab trò (nền cam nhạt viền cam) */
#profile-modal .pill-choice {
  min-height: 48px; background: #fff; border: 1px solid var(--sk-line); border-radius: 14px; color: var(--sk-text);
  font-weight: 800; box-shadow: var(--sk-sh-1); transition: background .12s, border-color .12s;
}
@media (hover: hover) { #profile-modal .pill-choice:hover { border-color: var(--sk-line-2); background: var(--sk-surface-2); } }
#profile-modal .pill-choice.active { background: var(--sk-primary-50); border-color: var(--sk-primary); color: var(--sk-primary-700); box-shadow: inset 0 0 0 1px var(--sk-primary); }
#profile-modal #age-selector .age-pill b { font-weight: 800; color: var(--sk-ink); }
#profile-modal #age-selector .age-pill.active b { color: var(--sk-primary-700); }
#profile-modal #age-selector .age-pill small { color: var(--sk-muted); font-weight: 700; }
#profile-modal #age-selector .age-pill.active small { color: var(--sk-primary-700); }
/* khối avatar */
#profile-modal .avatar-creation-section { background: var(--sk-surface-2); border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); padding: 16px; }
#profile-modal .avatar-live-preview-box { background: #fff; border: 1px solid var(--sk-line); border-radius: var(--sk-r); box-shadow: var(--sk-sh-1); padding: 12px 16px; }
#profile-modal .preview-name-tag { color: var(--sk-ink); font-size: 1.12rem; }
#profile-modal .btn-upload-avatar {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 14px;
  background: #fff; color: var(--sk-text); border: 1px solid var(--sk-line-2); border-radius: 12px; box-shadow: 0 3px 0 var(--sk-line-2);
  font-weight: 800; font-size: .92rem; line-height: 1.2; transform: none !important;
}
@media (hover: hover) { #profile-modal .btn-upload-avatar:hover { background: var(--sk-surface-2); color: var(--sk-ink); } }
#profile-modal .preset-avatar-btn { min-height: 52px; background: #fff; border: 1px solid var(--sk-line); border-radius: 14px; box-shadow: var(--sk-sh-1); transform: none !important; }
@media (hover: hover) { #profile-modal .preset-avatar-btn:hover { border-color: var(--sk-line-2); background: var(--sk-surface-2); } }
#profile-modal .preset-avatar-btn.active { background: var(--sk-primary-50); border-color: var(--sk-primary); box-shadow: inset 0 0 0 1px var(--sk-primary); }
#profile-modal .frame-choice-btn {
  min-height: 48px; justify-content: center; background: #fff; border: 1px solid var(--sk-line); border-radius: 12px;
  color: var(--sk-text); font-weight: 700; box-shadow: var(--sk-sh-1); line-height: 1.2;
}
@media (hover: hover) { #profile-modal .frame-choice-btn:hover { border-color: var(--sk-line-2); background: var(--sk-surface-2); } }
#profile-modal .frame-choice-btn.active { background: var(--sk-primary-50); border-color: var(--sk-primary); color: var(--sk-primary-700); font-weight: 800; box-shadow: inset 0 0 0 1px var(--sk-primary); }
#profile-modal .form-actions { margin-top: 4px; }
#profile-modal .btn-save-profile { width: 100%; }
@media (max-width: 640px) {
  #profile-modal .profile-modal-card { padding: 20px 16px 16px; }
  #profile-modal .avatar-creation-section { padding: 12px; }
  #profile-modal .avatar-live-preview-box { gap: 12px; padding: 10px 12px; }
  #profile-modal .avatar-preview-info { min-width: 0; }
  #profile-modal .btn-upload-avatar { padding: 8px 12px; font-size: .84rem; white-space: nowrap; }
}

/* =====================================================================
 * 3. CỔNG PHỤ HUYNH (.pg-card: phép nhân / mã PIN) + hộp nhỏ của tài khoản (#ac-modal dùng chung .pg-card)
 * ===================================================================== */
.modal-card.pg-card { padding: 26px 22px 22px; }
.pg-card .pg-icon {
  width: 64px; height: 64px; margin: 0 auto 10px; display: flex; align-items: center; justify-content: center;
  font-size: 2rem; line-height: 1; background: var(--sk-primary-50); border-radius: 20px;
}
.pg-card .modal-title { font-size: 1.35rem; margin-bottom: 6px; }
.pg-card .modal-desc { color: var(--sk-muted); }
.pg-card .pg-q { color: var(--sk-ink); font-family: var(--font-display); font-weight: 800; white-space: nowrap; }
.pg-card .pg-input {
  width: 170px; min-height: 56px; margin: 12px auto 4px; background: #fff; color: var(--sk-ink);
  border: 2px solid var(--sk-line-2); border-radius: 14px; font-weight: 800;
}
.pg-card .pg-input:focus { border-color: var(--sk-primary); box-shadow: 0 0 0 4px rgba(249, 115, 22, .14); }
.pg-card .pg-err { color: var(--sk-red); font-weight: 700; }
.pg-card .pg-actions { gap: 10px; margin-top: 10px; }
/* hai nút cạnh nhau rộng bằng nhau (trừ khi JS xếp dọc bằng style inline) */
.pg-card .pg-actions:not([style*="column"]) > button { flex: 1 1 0; min-width: 0; padding-left: 12px; padding-right: 12px; }
.pg-card .pg-actions[style*="column"] > button { width: 100%; }
/* #ac-modal: đổi mật khẩu, mã khôi phục, chọn dữ liệu... */
#ac-modal .ac-modal-card { text-align: left; }
#ac-modal .ac-modal-card .modal-title { text-align: center; }
#ac-modal .ar-input + .ar-input { margin-top: 8px; }

/* =====================================================================
 * 4. Ô NHẬP / NÚT DÙNG LẠI TỪ PHÒNG THI ĐẤU (.ar-input, .ar-btn) - khi nằm trong tài khoản, Giáo viên, Quản trị
 * ===================================================================== */
:is(.ac-section, #ac-modal, #teacher-view, #admin-view) .ar-input {
  min-height: 48px; background: #fff; color: var(--sk-ink); border: 1px solid var(--sk-line-2); border-radius: 12px;
  font-weight: 700; box-shadow: var(--sk-sh-1);
}
:is(.ac-section, #ac-modal, #teacher-view, #admin-view) .ar-input::placeholder { color: var(--sk-faint); font-weight: 600; }
:is(.ac-section, #ac-modal, #teacher-view, #admin-view) .ar-input:focus { border-color: var(--sk-primary); box-shadow: 0 0 0 4px rgba(249, 115, 22, .14); }
/* nút chính (trước là gradient xanh) -> cam "bấm lún" */
:is(.ac-section, #teacher-view, #admin-view) .ar-btn {
  min-height: 50px; background: var(--sk-primary); color: #fff; border: 0; border-radius: 14px;
  box-shadow: 0 4px 0 var(--sk-primary-700); font-family: var(--font-body); font-weight: 800; font-size: 1.05rem;
}
:is(.ac-section, #teacher-view, #admin-view) .ar-btn:hover { background: var(--sk-primary-600); }
:is(.ac-section, #teacher-view, #admin-view) .ar-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--sk-primary-700); }
:is(.ac-section, #teacher-view, #admin-view) .ar-btn.gray { background: #fff; color: var(--sk-text); border: 1px solid var(--sk-line-2); box-shadow: 0 3px 0 var(--sk-line-2); }
:is(.ac-section, #teacher-view, #admin-view) .ar-btn.gray:hover { background: var(--sk-surface-2); }
:is(.ac-section, #teacher-view, #admin-view) .ar-inline .ar-btn { min-height: 48px; font-size: .98rem; }
:is(.ac-section, #teacher-view, #admin-view) .ar-hint { color: var(--sk-muted); font-weight: 600; }

/* =====================================================================
 * 5. TÀI KHOẢN: đăng nhập / đăng ký (account.renderAuthForms - cả trong Góc Phụ Huynh lẫn hộp "cần tài khoản" ở Video)
 * ===================================================================== */
.pd-section.ac-section { background: #fff; }
/* 4 tab Đăng nhập / Đăng ký / Nối máy / Quên mật khẩu: kiểu "chọn đoạn" như thanh cấp độ.
   Chỉ trong Góc Phụ Huynh - hộp tài khoản ở phòng Video do css/theme/hoc.css tự làm kiểu tab riêng */
#parent-modal .ac-section .ac-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; padding: 4px; margin: 10px 0 12px; background: var(--sk-surface-3); border-radius: 14px; }
#parent-modal .ac-section .ac-tab {
  min-height: 42px; padding: 6px 8px; border: 0; border-radius: 11px; background: transparent; color: var(--sk-muted);
  font-family: var(--font-body); font-weight: 800; font-size: .86rem; line-height: 1.2; white-space: normal; box-shadow: none;
}
#parent-modal .ac-section .ac-tab:hover { color: var(--sk-ink); background: rgba(255, 255, 255, .6); }
#parent-modal .ac-section .ac-tab.active { background: #fff; color: var(--sk-primary-700); box-shadow: 0 1px 3px rgba(15, 23, 42, .12), 0 0 0 1px rgba(15, 23, 42, .04); }
.ac-section .ac-form { gap: 10px; }
.ac-section .ac-form .pd-switch { color: var(--sk-text); font-weight: 700; line-height: 1.35; }
.ac-section .ac-radio { color: var(--sk-text); font-weight: 700; }
.ac-section .ac-radio label { display: flex; align-items: center; min-height: 36px; }
.ac-section .pg-err { color: var(--sk-red); font-weight: 700; min-height: 20px; margin-top: 6px; }
.ac-section .ac-ok { color: var(--sk-green); }
@media (max-width: 480px) {
  #parent-modal .ac-section .ac-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* mã khôi phục / mã nối máy */
.ac-code { background: var(--sk-primary-50); color: var(--sk-ink); border: 1px solid var(--sk-primary-200); border-radius: var(--sk-r); }
.ac-code-input { letter-spacing: .35em; }
/* đã đăng nhập */
.ac-section .ac-user { gap: 12px; margin: 4px 0 10px; }
.ac-section .ac-av { width: 52px; height: 52px; flex: none; display: flex; align-items: center; justify-content: center; font-size: 1.9rem; background: var(--sk-primary-50); border-radius: 16px; }
.ac-section .ac-name { font-weight: 800; color: var(--sk-ink); }
.ac-section .ac-role { background: var(--sk-blue-50); color: #1D4ED8; font-weight: 800; padding: 2px 9px; }
.ac-section .ac-email { color: var(--sk-muted); font-weight: 600; }
.ac-section .ac-box { background: var(--sk-surface-2); border: 1px solid var(--sk-line); border-radius: var(--sk-r); padding: 12px 14px; margin: 10px 0; }
.ac-section .ac-box-title { color: var(--sk-ink); font-weight: 800; }
.ac-section .pd-voice-status:empty { display: none; }
/* hàng nút tài khoản (Mã nối máy, Đổi mật khẩu, Đăng xuất...): xếp lưới đều thay vì so le */
#parent-modal .ac-section > .pd-pills { display: grid; grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 8px; }
#parent-modal .ac-section > .pd-pills .pd-pill { width: 100%; justify-content: center; text-align: center; padding: 6px 8px; line-height: 1.2; }

/* =====================================================================
 * 6. GÓC PHỤ HUYNH (#parent-modal) - thay tông tím cũ bằng nền trắng + một màu cam chính
 * ===================================================================== */
#parent-modal .pd-modal-card { max-width: 880px; padding: 18px 22px 22px; }
#parent-modal .pd-modal-title { text-align: left; padding: 4px 52px 0 0; margin-bottom: 12px; font-size: 1.35rem; }
#parent-modal .modal-close-icon { top: 14px; right: 16px; }
/* đầu: bé đang xem */
#parent-modal .pd-header { background: var(--sk-surface-2); border: 1px solid var(--sk-line); border-radius: var(--sk-r); padding: 10px 14px; margin-bottom: 12px; }
#parent-modal .pd-avatar { border: 1px solid var(--sk-line); box-shadow: var(--sk-sh-1); }
#parent-modal .pd-name { font-weight: 800; color: var(--sk-ink); }
#parent-modal .pd-band { color: var(--sk-muted); font-weight: 600; }
/* 6 tab: thanh "chọn đoạn" xám nhạt, tab đang mở = ô trắng nổi chữ cam. Dính trên đầu khi cuộn
   (top âm = phần đệm trên của thẻ; viền bóng trắng 6px che chữ cuộn lấp ló quanh thanh) */
#parent-modal .pd-tabs {
  top: -18px; display: flex; gap: 2px; padding: 4px; margin: 0 0 14px; background: var(--sk-surface-3); border: 0; border-radius: 14px;
  box-shadow: 0 0 0 6px #fff;
}
#parent-modal .pd-tab {
  flex: 1 1 0; flex-direction: row; gap: 6px; min-height: 44px; padding: 6px 8px; background: transparent; border: 0; border-radius: 11px;
  color: var(--sk-muted); font-size: .9rem; font-weight: 800; box-shadow: none;
}
#parent-modal .pd-tab span { font-size: 1.05rem; }
#parent-modal .pd-tab:hover { color: var(--sk-ink); background: rgba(255, 255, 255, .6); }
#parent-modal .pd-tab.active { background: #fff; color: var(--sk-primary-700); box-shadow: 0 1px 3px rgba(15, 23, 42, .12), 0 0 0 1px rgba(15, 23, 42, .04); }
@media (max-width: 640px) {
  #parent-modal .pd-modal-card { padding: 14px 14px 18px; }
  #parent-modal .pd-modal-title { font-size: 1.2rem; margin-bottom: 10px; }
  #parent-modal .modal-close-icon { top: 10px; right: 10px; }
  /* 6 tab không đủ chỗ trên 1 hàng ở điện thoại -> lưới 3 x 2, chữ không bị dính vào nhau */
  #parent-modal .pd-tabs { top: -14px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #parent-modal .pd-tab { font-size: .8rem; gap: 4px; padding: 4px; min-height: 42px; }
  #parent-modal .pd-tab span { font-size: .95rem; }
}

/* thẻ, ô số liệu, tiêu đề mục (dùng chung cho Góc Phụ Huynh + Giáo viên + Quản trị) */
:is(#parent-modal, #teacher-view, #admin-view) .pd-section { background: #fff; border: 1px solid var(--sk-line); border-radius: var(--sk-r); padding: 14px 16px; margin-bottom: 12px; box-shadow: var(--sk-sh-1); }
:is(#parent-modal, #teacher-view, #admin-view) .pd-title { font-family: var(--font-display); font-weight: 800; color: var(--sk-ink); font-size: 1.02rem; margin-bottom: 8px; }
:is(#parent-modal, #teacher-view, #admin-view) .pd-note { color: var(--sk-muted); font-weight: 600; }
#parent-modal .pd-tile { background: #fff; border: 1px solid var(--sk-line); border-radius: var(--sk-r); padding: 10px 12px; box-shadow: var(--sk-sh-1); }
#parent-modal .pd-tile-val { font-weight: 800; color: var(--sk-ink); }
#parent-modal .pd-tile-label { color: var(--sk-muted); font-weight: 700; }
#parent-modal .pd-tile-sub { color: var(--sk-primary-700); font-weight: 800; }
#parent-modal .pd-list { color: var(--sk-text); }
#parent-modal .pd-list strong { color: var(--sk-ink); }

/* nút nhỏ (.pd-pill): nền trắng viền mảnh; đang chọn = cam nhạt viền cam */
:is(#parent-modal, #teacher-view, #admin-view, #ac-modal) .pd-pill {
  min-height: 44px; background: #fff; color: var(--sk-text); border: 1px solid var(--sk-line); border-radius: 12px;
  font-weight: 800; box-shadow: var(--sk-sh-1); transition: background .12s, border-color .12s;
}
@media (hover: hover) { :is(#parent-modal, #teacher-view, #admin-view, #ac-modal) .pd-pill:hover { border-color: var(--sk-line-2); background: var(--sk-surface-2); color: var(--sk-ink); } }
:is(#parent-modal, #teacher-view, #admin-view, #ac-modal) .pd-pill.active { background: var(--sk-primary-50); color: var(--sk-primary-700); border-color: var(--sk-primary); box-shadow: inset 0 0 0 1px var(--sk-primary); }
:is(#parent-modal, #teacher-view, #admin-view, #ac-modal) .pd-pill.ac-primary { background: var(--sk-primary); color: #fff; border-color: var(--sk-primary); box-shadow: 0 3px 0 var(--sk-primary-700); }
:is(#parent-modal, #teacher-view, #admin-view, #ac-modal) .pd-pill.ac-primary:hover { background: var(--sk-primary-600); color: #fff; }
:is(#parent-modal, #teacher-view, #admin-view, #ac-modal) .pd-pill.ac-danger { color: var(--sk-red); border-color: #FECACA; }
:is(#parent-modal, #teacher-view, #admin-view, #ac-modal) .pd-pill.ac-danger:hover { background: var(--sk-red-50); }
#parent-modal .pd-pills { gap: 8px; }
/* "Luyện ngay" / "▶ kỹ năng": chip cam nhạt thay chip tím */
#parent-modal .pd-go-btn { min-height: 34px; padding: 6px 12px; background: var(--sk-primary-50); color: var(--sk-primary-700); border: 1px solid var(--sk-primary-200); border-radius: 999px; font-weight: 800; }
#parent-modal .pd-go-btn:hover { background: var(--sk-primary-100); }
/* công tắc bật/tắt: màu "bật" xanh lá giống công tắc nhạc trên thanh trên */
#parent-modal .pd-toggle { color: var(--sk-text); font-weight: 700; min-height: 44px; }
#parent-modal .pd-toggle small { color: var(--sk-faint); }
#parent-modal .pd-toggle input:checked + .pd-toggle-ui { background: var(--sk-green); }
#parent-modal .pd-toggle input:focus-visible + .pd-toggle-ui { outline: 3px solid rgba(249, 115, 22, .45); }
:is(#parent-modal, .ac-section) .pd-switch input { accent-color: var(--sk-primary); }
/* hàng cài đặt */
#parent-modal .pd-set .pd-row { border-bottom: 1px solid var(--sk-surface-3); }
#parent-modal .pd-set .pd-row > label { color: var(--sk-text); font-weight: 800; }
#parent-modal .pd-set .pd-row > label small { color: var(--sk-faint); }
#parent-modal .pd-seg .pd-pill { border-radius: 12px; }
#parent-modal #pd-age-pills .pd-pill small { opacity: 1; color: var(--sk-muted); font-weight: 700; }
#parent-modal #pd-age-pills .pd-pill.active small { color: var(--sk-primary-700); }
#parent-modal .pd-pin-input { min-height: 46px; border: 1px solid var(--sk-line-2); border-radius: 12px; box-shadow: var(--sk-sh-1); color: var(--sk-ink); }
#parent-modal .pd-pin-input:focus { border-color: var(--sk-primary); box-shadow: 0 0 0 4px rgba(249, 115, 22, .14); }
#parent-modal .pd-voice-status { background: var(--sk-surface-2); border: 1px solid var(--sk-line); border-radius: 12px; }
#parent-modal .pd-diag summary { color: var(--sk-muted); padding: 6px 0; }
#parent-modal .pd-tools a.pd-pill { color: var(--sk-text); }
#parent-modal .pd-section.pd-danger { background: var(--sk-red-50) !important; border: 1px solid #FECACA !important; box-shadow: none; }
#parent-modal .pd-danger .pd-title { color: #B91C1C; }
#parent-modal .pd-danger .btn-danger { min-height: 46px; background: #fff; color: var(--sk-red); border: 1px solid #FCA5A5; border-radius: 12px; box-shadow: 0 3px 0 #FECACA; font-weight: 800; }
/* biểu đồ (radar năng lực, cột 7 ngày): đổi tím -> cam chính */
#parent-modal .pd-radar-ring { stroke: var(--sk-line); }
#parent-modal .pd-radar-area { fill: rgba(249, 115, 22, .16); stroke: var(--sk-primary); }
#parent-modal .pd-radar-dot { fill: var(--sk-primary); }
#parent-modal .pd-area-list li { border-bottom: 1px solid var(--sk-surface-3); padding-bottom: 6px; color: var(--sk-text); }
#parent-modal .pd-area-val { color: var(--sk-ink); font-weight: 800; }
#parent-modal .pd-area-val em { color: var(--sk-faint); }
#parent-modal .pd-axis { stroke: var(--sk-line); }
#parent-modal .pd-bar { fill: var(--sk-primary); }
@media (hover: hover) { #parent-modal .pd-bar-g:hover .pd-bar { fill: var(--sk-primary-700); } }
#parent-modal .pd-bar-val { fill: var(--sk-ink); }
#parent-modal .pd-bar-label { fill: var(--sk-muted); }
/* bảng */
:is(#parent-modal, #teacher-view, #admin-view) .pd-table-wrap { border: 1px solid var(--sk-line); border-radius: 12px; }
:is(#parent-modal, #teacher-view, #admin-view) .pd-table th { background: var(--sk-surface-2); color: var(--sk-muted); font-weight: 800; font-size: .8rem; border-bottom: 1px solid var(--sk-line); }
:is(#parent-modal, #teacher-view, #admin-view) .pd-table td { border-bottom: 1px solid var(--sk-surface-3); color: var(--sk-text); }
:is(#parent-modal, #teacher-view, #admin-view) .pd-table tr:last-child td { border-bottom: 0; }
:is(#parent-modal, #teacher-view, #admin-view) .pd-table td small { color: var(--sk-faint); }

/* --- tab Lộ trình (learn-dashboard .ld-*) --- */
#parent-modal .ld { color: var(--sk-text); }
#parent-modal .ld-title { font-weight: 800; color: var(--sk-ink); }
#parent-modal .ld-sub { color: var(--sk-muted); font-weight: 600; }
#parent-modal .ld-kpi { background: var(--sk-surface-2); border: 1px solid var(--sk-line); border-radius: 12px; }
#parent-modal .ld-kpi b { color: var(--sk-ink); font-weight: 800; }
#parent-modal .ld-kpi span { color: var(--sk-muted); }
#parent-modal .ld-card { border: 1px solid var(--sk-line); border-radius: var(--sk-r); box-shadow: var(--sk-sh-1); padding: 14px 16px; }
#parent-modal .ld-card h4 { font-weight: 800; color: var(--sk-ink); }
#parent-modal .ld-card h4 small { color: var(--sk-muted); font-weight: 600; }
#parent-modal .ld-note { color: var(--sk-muted); font-weight: 600; }
#parent-modal .ld-comp { background: var(--sk-surface-2); border: 1px solid var(--sk-line); border-radius: 12px; }
#parent-modal .ld-comp-h { color: var(--sk-ink); }
#parent-modal .ld-comp small { color: var(--sk-muted); }
#parent-modal .ld-bar { background: var(--sk-surface-3); }
#parent-modal .ld-skill, #parent-modal .ld-err { border-bottom: 1px solid var(--sk-surface-3); }
#parent-modal .ld-empty { color: var(--sk-faint); font-weight: 600; }
#parent-modal .ld-day-bar { background: var(--sk-surface-3); }
#parent-modal .ld-day-bar span { background: var(--sk-primary); }
/* đánh giá 2 tầng: cơ bản = xanh lá (đạt), nâng cao = xanh dương (thay tím) */
#parent-modal .ld-tier { border-radius: 12px; }
#parent-modal .ld-tier.a { background: var(--sk-blue-50); border-color: #BFDBFE; }
#parent-modal .ld-tier-chip { border-color: var(--sk-line); }
#parent-modal .ld-tier-h small { color: var(--sk-muted); }

/* --- tab Gia đình (family.js, habits.js) --- */
#parent-modal .fm-member { background: var(--sk-surface-2); border: 1px solid var(--sk-line); }
#parent-modal .fm-bar { background: var(--sk-surface-3); }
#parent-modal .fm-bar span { background: var(--sk-green); }

/* =====================================================================
 * 7. NHIỆM VỤ HẰNG NGÀY (#quests-modal, nút 🎯)
 * ===================================================================== */
#quests-modal .quests-modal-card { max-width: 520px; background: #fff; border: 0; padding: 24px 22px 22px; }
#quests-modal .modal-title { font-size: 1.4rem; margin-bottom: 4px; }
#quests-modal .modal-desc { color: var(--sk-muted); }
#quests-modal .streak-banner {
  justify-content: flex-start; gap: 10px; margin: 14px 0 14px; padding: 10px 14px;
  background: var(--sk-amber-50); border: 1px solid #FDE68A; border-radius: var(--sk-r);
  font-family: var(--font-body); font-size: .98rem; font-weight: 700; color: #92400E; text-align: left;
}
#quests-modal .streak-banner strong { font-weight: 800; }
#quests-modal .streak-flame { font-size: 1.4rem; animation: none; }
#quests-modal .quests-list { gap: 8px; margin-bottom: 14px; }
#quests-modal .quest-item-row { background: #fff; border: 1px solid var(--sk-line); border-radius: var(--sk-r); padding: 10px 12px; box-shadow: var(--sk-sh-1); }
#quests-modal .quest-item-row.quest-done { background: var(--sk-green-50); border-color: #BBF7D0; }
#quests-modal .quest-item-icon { width: 44px; height: 44px; flex: none; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; background: var(--sk-surface-3); border-radius: 12px; }
#quests-modal .quest-item-row.quest-done .quest-item-icon { background: #DCFCE7; }
#quests-modal .quest-item-details { min-width: 0; text-align: left; }
#quests-modal .quest-item-title { text-align: left; font-size: .92rem; font-weight: 800; color: var(--sk-ink); line-height: 1.3; }
#quests-modal .quest-prog-bar-wrap { background: var(--sk-surface-3); height: 8px; border-radius: 999px; }
#quests-modal .quest-prog-fill { background: var(--sk-primary); border-radius: 999px; }
#quests-modal .quest-item-row.quest-done .quest-prog-fill { background: var(--sk-green); }
#quests-modal .quest-item-status { flex: none; min-width: 34px; text-align: right; font-family: var(--font-body); font-weight: 800; color: var(--sk-muted); }
#quests-modal .quest-item-row.quest-done .quest-item-status { color: var(--sk-green); }
/* rương thưởng: khung phẳng cam nhạt, nút mở rương = nút chính */
#quests-modal .quest-chest-box { flex-wrap: wrap; gap: 12px; padding: 14px; background: var(--sk-primary-50); border: 1px solid var(--sk-primary-200); border-radius: var(--sk-r-lg); }
#quests-modal .chest-icon { width: 52px; height: 52px; flex: none; display: flex; align-items: center; justify-content: center; font-size: 2rem; background: #fff; border-radius: 14px; filter: none; }
#quests-modal .chest-info { min-width: 0; }
#quests-modal .chest-title { font-family: var(--font-body); font-weight: 800; font-size: 1.05rem; color: var(--sk-ink); }
#quests-modal .chest-progress-text { color: var(--sk-muted); font-weight: 700; }
#quests-modal .btn-claim-chest {
  flex: 1 1 100%; min-height: 50px; background: var(--sk-primary); color: #fff; border: 0; border-radius: 14px;
  box-shadow: 0 4px 0 var(--sk-primary-700); font-family: var(--font-body); font-weight: 800; font-size: 1.02rem;
}
#quests-modal .btn-claim-chest:disabled { background: #fff; color: var(--sk-faint); border: 1px solid var(--sk-line); box-shadow: none; }
#quests-modal .btn-claim-chest.btn-claimed { background: var(--sk-green); color: #fff; box-shadow: 0 4px 0 #166534; }
@media (min-width: 520px) {
  /* đủ rộng: nút mở rương nằm cùng hàng với rương */
  #quests-modal .quest-chest-box { flex-wrap: nowrap; }
  #quests-modal .btn-claim-chest { flex: none; padding: 0 18px; }
}

/* =====================================================================
 * 8. THÔNG BÁO NHỎ (skToast) + BANNER LÊN CẤP + THANH CẬP NHẬT
 * ===================================================================== */
#sk-toast-wrap { top: calc(var(--sk-top-h) + 12px); }
#sk-toast-wrap .sk-toast {
  background: #fff; color: var(--sk-ink); border: 1px solid var(--sk-line); border-radius: var(--sk-r);
  box-shadow: var(--sk-sh-3); padding: 12px 16px; font-weight: 700; font-size: .95rem; line-height: 1.35;
}
#sk-toast-wrap .sk-toast b, #sk-toast-wrap .sk-toast strong { font-weight: 800; }
#sk-toast-wrap .sk-toast-badge { background: var(--sk-amber-50); border-color: #FDE68A; }
/* lên cấp: thẻ trắng giữa màn hình (bỏ gradient tím-xanh + viền trắng dày) */
.sk-levelup-banner { background: rgba(15, 23, 42, .18); }
.sk-levelup-banner .sk-levelup-inner {
  background: #fff; color: var(--sk-ink); border: 0; border-radius: var(--sk-r-xl);
  box-shadow: 0 24px 60px rgba(15, 23, 42, .25); padding: 24px 36px 22px; max-width: calc(100vw - 40px);
}
.sk-levelup-banner .sk-levelup-icon {
  width: 76px; height: 76px; margin: 0 auto 8px; display: flex; align-items: center; justify-content: center;
  font-size: 2.6rem; line-height: 1; background: var(--sk-primary-50); border-radius: 22px;
}
.sk-levelup-banner .sk-levelup-title { font-weight: 800; font-size: 1.9rem; letter-spacing: .02em; color: var(--sk-primary-700); }
.sk-levelup-banner .sk-levelup-sub { font-size: 1.05rem; font-weight: 700; color: var(--sk-text); }
/* có bản mới: thẻ trắng nổi ở trên, rộng tối đa 560px ở giữa, nút cam */
#sk-update-bar {
  left: 10px; right: 10px; max-width: 560px; margin: 0 auto; padding: 10px 10px 10px 16px;
  background: #fff; color: var(--sk-ink); border: 1px solid var(--sk-line); border-radius: var(--sk-r); box-shadow: var(--sk-sh-3);
  font-weight: 700; line-height: 1.3;
}
#sk-update-bar button {
  flex: none; min-height: 44px; padding: 0 16px; background: var(--sk-primary); color: #fff; border-radius: 12px;
  box-shadow: 0 3px 0 var(--sk-primary-700); font-family: var(--font-body); font-weight: 800;
}
#sk-update-bar button:hover { background: var(--sk-primary-600); }

/* =====================================================================
 * 9. TRANG GIÁO VIÊN (#teacher-view) + QUẢN TRỊ TRONG APP (#admin-view)
 * ===================================================================== */
:is(#teacher-view, #admin-view) .game-card { padding: 22px; }
:is(#teacher-view, #admin-view) .game-card > .game-badge, #teacher-view .tc-head .game-badge { display: inline-flex; align-items: center; gap: 4px; }
:is(#teacher-view, #admin-view) .section-instruction { text-align: left; color: var(--sk-muted); font-weight: 600; font-size: .95rem; margin: 8px 0; }
:is(#teacher-view, #admin-view) .section-instruction strong { color: var(--sk-ink); }
:is(#teacher-view, #admin-view) .section-instruction a { color: var(--sk-primary-700); font-weight: 800; text-decoration: none; }
:is(#teacher-view, #admin-view) .section-instruction a:hover { text-decoration: underline; }
:is(#teacher-view, #admin-view) .sk-badge-heading { text-align: left; font-size: 1.08rem; font-weight: 800; color: var(--sk-ink); margin: 20px 0 10px; }
:is(#teacher-view, #admin-view) .pg-err { color: var(--sk-red); font-weight: 700; }
:is(#teacher-view, #admin-view) .acc-empty { text-align: center; }
:is(#teacher-view, #admin-view) .acc-empty .acc-empty-ic {
  width: 72px; height: 72px; margin: 0 auto 6px; display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; background: var(--sk-primary-50); border-radius: 22px;
}
:is(#teacher-view, #admin-view) .acc-empty h3 { color: var(--sk-ink); font-weight: 800; }
:is(#teacher-view, #admin-view) .acc-empty .section-instruction { text-align: center; }
:is(#teacher-view, #admin-view) .acc-empty .ar-btn { width: auto; display: inline-flex; align-items: center; padding: 0 22px; }
/* danh sách lớp */
#teacher-view .tc-list { gap: 10px; }
#teacher-view .tc-class { min-height: 76px; background: #fff; border: 1px solid var(--sk-line); border-radius: var(--sk-r); padding: 12px 14px; box-shadow: var(--sk-sh-1); transition: border-color .12s, box-shadow .12s; }
#teacher-view .tc-class:hover { border-color: var(--sk-primary); box-shadow: var(--sk-sh-2); }
#teacher-view .tc-code { color: var(--sk-primary-700); font-weight: 800; }
#teacher-view .tc-name { color: var(--sk-ink); font-weight: 800; }
#teacher-view .tc-class small { color: var(--sk-muted); font-weight: 600; }
#teacher-view .tc-head { gap: 12px; margin-bottom: 12px; }
#teacher-view .tc-head .ar-btn { min-height: 44px; padding: 0 14px; font-size: .92rem; }
#teacher-view .tc-head .ar-hint { text-align: left; margin-top: 4px; }
/* màu xanh/vàng/đỏ của từng bé: giữ ý nghĩa, viền mảnh hơn */
#teacher-view .tc-table tr.tc-g td:first-child { border-left: 3px solid var(--sk-green); }
#teacher-view .tc-table tr.tc-y td:first-child { border-left: 3px solid #F59E0B; }
#teacher-view .tc-table tr.tc-r td:first-child { border-left: 3px solid var(--sk-red); }
/* bài giao / giáo viên chờ duyệt */
:is(#teacher-view, #admin-view) .ac-hw { background: var(--sk-surface-2); border: 1px solid var(--sk-line); border-radius: var(--sk-r); padding: 10px 12px; flex-wrap: wrap; }
:is(#teacher-view, #admin-view) .ac-hw-ic { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; background: #fff; border-radius: 12px; }
/* phần chữ rộng tối thiểu 220px: điện thoại hẹp thì nút Duyệt / ✖ tự xuống hàng dưới, email không bị cắt vụn */
:is(#teacher-view, #admin-view) .ac-hw-body { flex: 1 1 220px; }
:is(#teacher-view, #admin-view) .ac-hw-title { color: var(--sk-ink); font-weight: 800; overflow-wrap: anywhere; }
:is(#teacher-view, #admin-view) .ac-hw-sub { color: var(--sk-muted); font-weight: 600; }
:is(#teacher-view, #admin-view) .ac-hw .pd-pill { flex: none; }
#teacher-view .tc-hw-form select.ar-input { font-weight: 700; }
#teacher-view #tc-delete { color: var(--sk-red); border-color: #FECACA; box-shadow: 0 3px 0 #FECACA; }
/* nút nhỏ trong bảng quản trị (🔑 ⛔ 🗑️): ô vuông 40px gọn, không tròn to */
#admin-view .pd-table td .pd-pill { min-height: 40px; min-width: 40px; padding: 0 10px; margin: 2px 0; }
#admin-view .pd-table td:last-child { white-space: nowrap; }
@media (max-width: 640px) {
  :is(#teacher-view, #admin-view) .game-card { padding: 16px 14px; }
}

/* =====================================================================
 * 10. THẺ "LỚP HỌC CỦA BÉ" TRÊN TRANG CHỦ (account.renderHome: bài cô giao + lời khen)
 * ===================================================================== */
.ac-class-card { background: #fff; border: 1px solid var(--sk-line); border-radius: var(--sk-r-lg); box-shadow: var(--sk-sh-2); padding: 14px 16px; }
.ac-class-card .ac-class-head { font-weight: 800; color: var(--sk-ink); margin-bottom: 8px; }
.ac-class-card .ac-hw { background: var(--sk-surface-2); border: 1px solid var(--sk-line); border-radius: var(--sk-r); }
.ac-class-card .ac-hw-title { color: var(--sk-ink); font-weight: 800; }
.ac-class-card .ac-hw-sub { color: var(--sk-muted); font-weight: 600; }
.ac-class-card .ac-praise-item { background: var(--sk-amber-50); border: 1px solid #FDE68A; color: var(--sk-ink); }
.ac-class-card .ac-praise-item.new { border-color: #F59E0B; }


/* ===== css/theme/sky.css ===== */
/* =====================================================================
 * Sam Kido - giao diện "Trời xanh" (v149, theo bộ mockup samkido-ui-kit người dùng gửi 2026-11-14)
 * Nền trời xanh nhạt, thẻ trắng bo tròn lớn, màu chính XANH DƯƠNG (#1985F9), nút hành động chính dải CAM/VÀNG,
 * ô nhóm dải màu (cam, xanh, tím, hồng, xanh lá, xanh ngọc), chữ đậm Nunito màu xanh navy, linh vật sư tử Sam (js/core/mascot.js).
 * NẠP CUỐI CÙNG (sau css/theme/*): đổi bộ biến --sk-* nên mọi phòng dùng biến tự đổi theo; phần dưới chỉ đè khung chung.
 * Muốn quay về giao diện v148: bỏ dòng <link ... sky.css> trong index.html.
 * ===================================================================== */
:root {
  --sk-primary: #1985F9; --sk-primary-600: #1373E0; --sk-primary-700: #0F5FC0;
  --sk-primary-50: #EAF5FF; --sk-primary-100: #D3EAFF; --sk-primary-200: #A9D4FF;
  --sk-ink: #153866; --sk-text: #2B4A72; --sk-muted: #667C98; --sk-faint: #9AABC2;
  --sk-line: #DCE8F5; --sk-line-2: #C3D5EA;
  --sk-bg: #EAF7FF; --sk-surface: #FFFFFF; --sk-surface-2: #F5FAFF; --sk-surface-3: #EAF2FB;
  --sk-r-sm: 12px; --sk-r: 16px; --sk-r-lg: 22px; --sk-r-xl: 26px;
  --sk-sh-1: 0 1px 3px rgba(25, 90, 160, .08);
  --sk-sh-2: 0 4px 14px rgba(25, 90, 160, .09), 0 1px 3px rgba(25, 90, 160, .06);
  --sk-sh-3: 0 16px 40px rgba(21, 56, 102, .18);
  /* nút hành động chính (Học tiếp, Bắt đầu...) + nút xanh */
  --sk-cta: linear-gradient(180deg, #FFB323 0%, #FF7A1D 100%); --sk-cta-sh: #DB5A0F;
  --sk-yellow: linear-gradient(180deg, #FFE45A 0%, #FFBB00 100%); --sk-yellow-sh: #D99A00;
  --sk-btn-blue: linear-gradient(180deg, #36ADFF 0%, #1769EF 100%); --sk-btn-blue-sh: #0F4FB8;
  --font-display: 'Nunito', 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ---------- nền trời (v154, góp ý "background khá xấu"): trời xanh giữ màu suốt trang + mây hoạt hình hai bên lề
   + đồi cỏ, cây, hoa ở chân trang như mockup. SVG nhúng (không thêm file). Không dùng "fixed": iPhone bỏ qua + giật khi cuộn ---------- */
body {
  background: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%201400%20340'%3E%3Cdefs%3E%3Cg%20id%3D'c'%3E%3Ccircle%20cx%3D'58'%20cy%3D'74'%20r%3D'34'%2F%3E%3Ccircle%20cx%3D'100'%20cy%3D'50'%20r%3D'44'%2F%3E%3Ccircle%20cx%3D'152'%20cy%3D'40'%20r%3D'50'%2F%3E%3Ccircle%20cx%3D'204'%20cy%3D'58'%20r%3D'40'%2F%3E%3Ccircle%20cx%3D'240'%20cy%3D'80'%20r%3D'28'%2F%3E%3Crect%20x%3D'30'%20y%3D'70'%20width%3D'236'%20height%3D'40'%20rx%3D'20'%2F%3E%3C%2Fg%3E%3C%2Fdefs%3E%3Cg%20fill%3D'%23BFE4FF'%3E%3Cuse%20href%3D'%23c'%20transform%3D'translate(4%20112)'%2F%3E%3Cuse%20href%3D'%23c'%20transform%3D'translate(250%20236)%20scale(.5)'%2F%3E%3Cuse%20href%3D'%23c'%20transform%3D'translate(1124%2092)%20scale(1.02)'%2F%3E%3Cuse%20href%3D'%23c'%20transform%3D'translate(1010%20222)%20scale(.46)'%2F%3E%3C%2Fg%3E%3Cg%20fill%3D'%23fff'%3E%3Cuse%20href%3D'%23c'%20transform%3D'translate(4%20102)'%2F%3E%3Cuse%20href%3D'%23c'%20transform%3D'translate(250%20231)%20scale(.5)'%2F%3E%3Cuse%20href%3D'%23c'%20transform%3D'translate(1124%2082)%20scale(1.02)'%2F%3E%3Cuse%20href%3D'%23c'%20transform%3D'translate(1010%20217)%20scale(.46)'%2F%3E%3C%2Fg%3E%3Cg%20fill%3D'%23fff'%20opacity%3D'.6'%3E%3Cuse%20href%3D'%23c'%20transform%3D'translate(560%20150)%20scale(.42)'%2F%3E%3Cuse%20href%3D'%23c'%20transform%3D'translate(840%20250)%20scale(.32)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") center top / 1400px auto no-repeat,
              url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%201600%20260'%3E%3Cpath%20d%3D'M0%20120%20C180%2060%20330%2070%20480%20110%20S800%20150%20960%20100%20S1300%2040%201600%20110%20V260%20H0Z'%20fill%3D'%23C6EDB0'%2F%3E%3Cpath%20d%3D'M0%20175%20C220%20120%20420%20130%20640%20168%20S1060%20205%201260%20160%20S1480%20128%201600%20150%20V260%20H0Z'%20fill%3D'%239ADB7C'%2F%3E%3Cpath%20d%3D'M0%20215%20C260%20190%20520%20196%20800%20214%20S1340%20232%201600%20205%20V260%20H0Z'%20fill%3D'%237CCB5F'%2F%3E%3Cg%20fill%3D'%236BBE4E'%3E%3Ccircle%20cx%3D'90'%20cy%3D'150'%20r%3D'34'%2F%3E%3Ccircle%20cx%3D'130'%20cy%3D'138'%20r%3D'42'%2F%3E%3Ccircle%20cx%3D'172'%20cy%3D'156'%20r%3D'30'%2F%3E%3Ccircle%20cx%3D'1430'%20cy%3D'134'%20r%3D'36'%2F%3E%3Ccircle%20cx%3D'1474'%20cy%3D'122'%20r%3D'44'%2F%3E%3Ccircle%20cx%3D'1516'%20cy%3D'140'%20r%3D'32'%2F%3E%3C%2Fg%3E%3Cg%20fill%3D'%2386D266'%3E%3Ccircle%20cx%3D'122'%20cy%3D'128'%20r%3D'18'%2F%3E%3Ccircle%20cx%3D'1466'%20cy%3D'112'%20r%3D'19'%2F%3E%3C%2Fg%3E%3Cg%3E%3Crect%20x%3D'292'%20y%3D'96'%20width%3D'10'%20height%3D'44'%20rx%3D'4'%20fill%3D'%23A86B3C'%2F%3E%3Ccircle%20cx%3D'297'%20cy%3D'84'%20r%3D'30'%20fill%3D'%235DB443'%2F%3E%3Ccircle%20cx%3D'288'%20cy%3D'76'%20r%3D'12'%20fill%3D'%237DCC5E'%2F%3E%3Crect%20x%3D'1238'%20y%3D'70'%20width%3D'10'%20height%3D'48'%20rx%3D'4'%20fill%3D'%23A86B3C'%2F%3E%3Ccircle%20cx%3D'1243'%20cy%3D'58'%20r%3D'32'%20fill%3D'%235DB443'%2F%3E%3Ccircle%20cx%3D'1234'%20cy%3D'49'%20r%3D'13'%20fill%3D'%237DCC5E'%2F%3E%3C%2Fg%3E%3Cg%20fill%3D'%23fff'%3E%3Ccircle%20cx%3D'420'%20cy%3D'196'%20r%3D'5'%2F%3E%3Ccircle%20cx%3D'560'%20cy%3D'206'%20r%3D'4'%2F%3E%3Ccircle%20cx%3D'980'%20cy%3D'212'%20r%3D'5'%2F%3E%3Ccircle%20cx%3D'1120'%20cy%3D'200'%20r%3D'4'%2F%3E%3Ccircle%20cx%3D'700'%20cy%3D'224'%20r%3D'4'%2F%3E%3C%2Fg%3E%3Cg%20fill%3D'%23FF8FB8'%3E%3Ccircle%20cx%3D'470'%20cy%3D'212'%20r%3D'5'%2F%3E%3Ccircle%20cx%3D'760'%20cy%3D'206'%20r%3D'4'%2F%3E%3Ccircle%20cx%3D'1060'%20cy%3D'222'%20r%3D'5'%2F%3E%3Ccircle%20cx%3D'1340'%20cy%3D'196'%20r%3D'4'%2F%3E%3C%2Fg%3E%3Cg%20fill%3D'%23FFD84D'%3E%3Ccircle%20cx%3D'420'%20cy%3D'196'%20r%3D'2'%2F%3E%3Ccircle%20cx%3D'980'%20cy%3D'212'%20r%3D'2'%2F%3E%3Ccircle%20cx%3D'620'%20cy%3D'218'%20r%3D'4'%2F%3E%3Ccircle%20cx%3D'1200'%20cy%3D'214'%20r%3D'4'%2F%3E%3Ccircle%20cx%3D'240'%20cy%3D'206'%20r%3D'4'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") center bottom / 1600px auto repeat-x,
              linear-gradient(180deg, #8FD5FF 0px, #B5E4FF 360px, #D3F0FF 820px) no-repeat;
  background-color: #D3F0FF;
  color: var(--sk-text);
}
/* máy tính: chừa chân trang cho đồi cỏ; iPad/điện thoại đã có khoảng trống của thanh dưới */
@media (min-width: 1181px) { .app-viewport { padding-bottom: 150px; } }
@media (max-width: 1180px) { body { background-size: 980px auto, 1000px auto, auto; } }
@media (max-width: 640px) { body { background-size: 540px auto, 900px auto, auto; } }
@media (min-width: 641px) and (max-width: 1180px) { .site-footer { padding-bottom: 56px; } } /* iPad: cây trên đồi chạm dòng link chân trang */
.site-footer-note { color: #46617E; } /* nằm trên nền cỏ: xám nhạt cũ không đọc được */
:focus-visible { outline: 3px solid rgba(25, 133, 249, .45); outline-offset: 2px; }
h1, h2, h3 { letter-spacing: 0; }

/* ---------- sư tử Sam ---------- */
.sk-lion { display: inline-block; line-height: 0; font-style: normal; }
.sk-lion svg { width: 100%; height: 100%; display: block; overflow: visible; }
/* v156: sư tử 3D (ảnh WebP) đứng chân dưới đáy khung như bản SVG, không méo */
.sk-lion-img { width: 100%; height: 100%; display: block; object-fit: contain; object-position: 50% 100%; -webkit-user-drag: none; user-select: none; }
/* v157: hình khối 3D (ô trang chủ, thẻ nhiệm vụ, sao kết quả) - khung cha đã định cỡ; sao chưa đạt = tô xám */
.sk-art-img { width: 100%; height: 100%; display: block; object-fit: contain; -webkit-user-drag: none; user-select: none; }
.sk-art-img.off { filter: grayscale(1) brightness(.98) opacity(.5); }

/* ---------- thanh trên ---------- */
.top-navbar.sk-top { background: rgba(196, 236, 255, .82); border-bottom: 0; box-shadow: 0 2px 12px rgba(25, 90, 160, .08); }
.sk-top .logo-badge { width: 42px; height: 42px; font-size: 0; display: inline-flex; }
.sk-top .logo-badge .sk-lion { width: 42px; height: 42px; }
/* chữ "Sam Kido" kiểu logo mockup: xanh + cam, viền trắng dày */
.sk-top .brand-title {
  font-family: 'Nunito', sans-serif; font-weight: 900; font-size: 1.55rem; letter-spacing: -.02em; color: #168CFF;
  text-shadow: -2px -2px 0 #fff, 2px -2px 0 #fff, -2px 2px 0 #fff, 2px 2px 0 #fff, 0 4px 0 #1366AE33;
}
.sk-topnav button { color: var(--sk-text); }
.sk-topnav button:hover { background: rgba(255, 255, 255, .7); }
.sk-topnav button.active { background: #fff; color: var(--sk-primary-700); box-shadow: var(--sk-sh-1); }
.sk-top .user-stats-bar { background: #fff; border: 0; box-shadow: var(--sk-sh-1); }
.sk-top .header-actions > .header-btn.header-icon, .sk-top #sk-more-btn { background: #fff; border-radius: 50%; box-shadow: var(--sk-sh-1); margin-left: 4px; }
.sk-top .header-actions > .header-btn.header-icon:hover, .sk-top #sk-more-btn:hover, .sk-top #sk-more-btn[aria-expanded="true"] { background: var(--sk-primary-50); }
.sk-top .user-profile-badge { border: 0; box-shadow: var(--sk-sh-1); }

/* ---------- thanh dưới: trắng bo góc trên, mục đang mở xanh ---------- */
@media (max-width: 1180px) {
  .mobile-bottom-nav { border-top: 0; border-radius: 22px 22px 0 0; box-shadow: 0 -4px 20px rgba(25, 90, 160, .12); }
  .mobile-bottom-nav .b-nav-item { color: #7A8CA5; }
  .mobile-bottom-nav .b-nav-item.active { color: var(--sk-primary); }
  .mobile-bottom-nav .b-nav-item.active .b-nav-icon { background: var(--sk-primary-100); }
}

/* ---------- trang chủ ---------- */
#home-view .home-hero {
  background: linear-gradient(160deg, #FFFFFF 0%, #F2FAFF 55%, #DDF3FF 100%); border: 0; border-radius: var(--sk-r-xl);
  box-shadow: var(--sk-sh-2); padding: 18px 22px 22px;
}
#home-view .home-hero::before { background: #C9ECFF; opacity: .55; }
#home-view .home-hero::after { display: none; }
#home-view .mascot-container { width: 128px; height: 142px; }
#home-view .mascot-avatar { width: 128px; height: 142px; background: none; box-shadow: none; border-radius: 0; font-size: 0; }
#home-view .mascot-avatar .sk-lion { width: 128px; height: 142px; filter: drop-shadow(0 6px 6px rgba(21, 56, 102, .18)); }
#interactive-mascot { cursor: pointer; transition: transform .15s; }
#interactive-mascot:active { transform: scale(.95); }
#home-view .mascot-bubble h2 { font-weight: 900; font-size: 1.75rem; color: var(--sk-ink); }
#home-view .mascot-bubble p { color: var(--sk-muted); font-weight: 700; }
.mascot-glasses { top: 22%; }
.hf-box { border: 2px solid var(--sk-line); border-radius: 999px; box-shadow: var(--sk-sh-1); padding: 3px 8px 3px 16px; }
.hf-box:focus-within { border-color: var(--sk-primary); box-shadow: 0 0 0 4px rgba(25, 133, 249, .16); }
/* thẻ Lộ trình học: nút "Học" dải cam như mockup */
.sgk-home { border: 0 !important; box-shadow: var(--sk-sh-2) !important; border-radius: var(--sk-r-xl) !important; }
.sgk-home::before { background: var(--sk-primary); }
.sgk-home .jn-go { background: var(--sk-cta) !important; box-shadow: 0 4px 0 var(--sk-cta-sh) !important; border-radius: 999px !important; }
/* 6 ô nhóm: dải màu dọc (nhạt trên, đậm dưới), biểu tượng to ở giữa, chữ trắng - như mockup */
.home-hubs { gap: 16px; }
.hub-tile {
  min-height: 170px; padding: 18px 14px 16px; align-items: center; justify-content: center; text-align: center; gap: 2px;
  background: linear-gradient(180deg, var(--hg) 0%, var(--hm) 55%, var(--hm) 100%); border-radius: 26px;
  box-shadow: 0 6px 0 var(--hd), 0 14px 24px -12px var(--hd);
}
.hub-tile::before { right: auto; left: -40px; top: -60px; bottom: auto; width: 150px; height: 150px; background: rgba(255, 255, 255, .22); }
.hub-tile::after { right: -30px; top: auto; bottom: -50px; width: 130px; height: 130px; background: rgba(255, 255, 255, .12); }
.hub-tile .ht-ic {
  position: static; width: auto; height: auto; margin: 0 0 6px; background: none; box-shadow: none; border-radius: 0; transform: none;
  font-size: 3.6rem; line-height: 1.05; filter: drop-shadow(0 6px 4px rgba(0, 0, 0, .18));
}
.hub-tile:hover .ht-ic { transform: scale(1.08) rotate(-4deg); }
.hub-tile b { font-weight: 900; font-size: 1.45rem; text-shadow: 0 2px 0 rgba(0, 0, 0, .12); }
.hub-tile small { max-width: none; font-weight: 700; color: rgba(255, 255, 255, .95); }
.hub-tile em { margin-top: 8px; background: rgba(255, 255, 255, .28); }
.hub-tile:hover em { color: var(--hd); }
@media (max-width: 1180px) and (min-width: 641px) {
  .hub-tile .ht-ic { width: auto; height: auto; font-size: 3rem; position: static; }
  .hub-tile b { font-size: 1.3rem; }
}
@media (max-width: 640px) {
  #home-view .home-hero { padding: 12px 14px 16px; }
  #home-view .mascot-container, #home-view .mascot-avatar, #home-view .mascot-avatar .sk-lion { width: 76px; height: 86px; border-radius: 0; font-size: 0; }
  #home-view .mascot-bubble h2 { font-size: 1.35rem; }
  .home-hubs { gap: 12px; }
  .hub-tile { min-height: 136px; padding: 12px 8px; border-radius: 22px; box-shadow: 0 5px 0 var(--hd), 0 10px 18px -10px var(--hd); }
  .hub-tile .ht-ic { position: static; width: auto; height: auto; font-size: 2.7rem; margin-bottom: 4px; background: none; box-shadow: none; transform: none; }
  .hub-tile b { font-size: 1.15rem; }
  .hub-tile small { display: none; }
  .hub-tile em { margin-top: 6px; }
}
/* Luyện tập hôm nay = "Nhiệm vụ hôm nay" mockup */
.dp-card { border: 0 !important; box-shadow: var(--sk-sh-2) !important; border-radius: var(--sk-r-xl) !important; }
.dp-task { background: var(--sk-surface-2) !important; border-color: var(--sk-line) !important; }
.dp-task-bar > span { background: linear-gradient(90deg, #4ADE80, #22C55E) !important; }
.dp-go { border-color: var(--sk-primary-200) !important; color: var(--sk-primary-700) !important; border-radius: 999px !important; }
.home-ph-links button { border: 0; box-shadow: var(--sk-sh-1); }

/* ---------- đầu phòng: nút quay lại tròn trắng, tiêu đề đậm navy ---------- */
.app-view .btn-back-home { border: 0; border-radius: 999px; box-shadow: var(--sk-sh-2); color: var(--sk-ink); }
.app-view .btn-back-home:hover { background: var(--sk-primary-50); color: var(--sk-primary-700); }
.app-view .view-heading { font-weight: 900; color: var(--sk-ink); }
.hub-sub { font-weight: 700; }

/* ---------- tab trò + tab chọn: đang chọn = nền xanh chữ trắng (như "Lớp 2" trong mockup) ---------- */
.app-view .tab-btn, .app-view .english-tab-btn { border: 0; border-radius: 999px; box-shadow: var(--sk-sh-1); color: var(--sk-text); }
.app-view .tab-btn:hover, .app-view .english-tab-btn:hover { background: var(--sk-primary-50); color: var(--sk-primary-700); }
.app-view .tab-btn.active, .app-view .english-tab-btn.active {
  background: var(--sk-primary) !important; color: #fff !important; border-color: var(--sk-primary) !important;
  box-shadow: 0 3px 0 var(--sk-primary-700) !important;
}
.app-view .difficulty-level-bar { background: #fff; box-shadow: var(--sk-sh-1); border-radius: 999px; }
.app-view .difficulty-level-bar > .diff-bar-label { background: #fff; box-shadow: 8px 0 8px -4px #fff; }
.app-view .diff-pill-btn, .app-view .diff-btn { border-radius: 999px; }
.app-view .diff-pill-btn.active, .app-view .diff-btn.active { background: var(--sk-primary-50) !important; box-shadow: inset 0 0 0 2px var(--sk-primary-200) !important; }

/* ---------- thẻ trò chơi, nút đáp án ---------- */
.app-view .game-card { border: 0; box-shadow: var(--sk-sh-2); border-radius: 28px; }
.app-view .game-badge { background: #FFF6D6; border-color: #FFE08A; color: #8A5A00; }
.app-view .voice-btn { background: var(--sk-primary-50); border-color: var(--sk-primary-200); color: var(--sk-primary-700); }
.app-view .game-question { font-weight: 900; }
.app-view .game-opt-btn { border: 2px solid var(--sk-line); border-radius: 20px; box-shadow: 0 4px 0 var(--sk-line-2); color: var(--sk-ink); font-family: 'Nunito', sans-serif; font-weight: 900; }
@media (hover: hover) { .app-view .game-opt-btn:hover { border-color: var(--sk-primary-200); box-shadow: 0 5px 0 var(--sk-primary-200); background: var(--sk-surface-2); } }
/* đúng = nền xanh lá nhạt + viền xanh lá + dấu ✓ (mockup), sai = đỏ nhạt */
.app-view .game-opt-btn.correct-answer { background: #E7F9EA !important; border-color: #38C85A !important; box-shadow: 0 4px 0 #2AA748 !important; color: #136B2C !important; }
.app-view .game-opt-btn.wrong-answer { background: #FFECEC !important; border-color: #FF6B6B !important; box-shadow: 0 4px 0 #E04848 !important; color: #A11D1D !important; }

/* ---------- trang nhóm ---------- */
.hub2-nav { border: 0; box-shadow: var(--sk-sh-2); border-radius: var(--sk-r-xl); }
.hub2-nav button.active { background: var(--sk-primary); color: #fff; }
.hub2-nav button.active .hn-n { color: var(--sk-primary-700); }
#hub-view .hub-card { border: 0; box-shadow: var(--sk-sh-2); border-radius: var(--sk-r-xl); }
#hub-view .hub-card .hc-go { background: var(--sk-btn-blue); color: #fff; border: 0; border-radius: 999px; box-shadow: 0 3px 0 var(--sk-btn-blue-sh); }
#hub-view .hub-card .hc-main:hover .hc-go { background: var(--sk-btn-blue); filter: brightness(1.06); }
#hub-view .hc-sub { background: var(--sk-surface-2); border-color: var(--sk-line); border-radius: 18px; }
@media (max-width: 860px) { .hub2-nav button.active { background: var(--sk-primary); color: #fff; border-color: var(--sk-primary); } }

/* ---------- hộp thoại + nút xác nhận ---------- */
.modal-card { border-radius: 28px; border: 0; }
.modal-btn-confirm { background: var(--sk-btn-blue) !important; box-shadow: 0 4px 0 var(--sk-btn-blue-sh) !important; border-radius: 999px !important; }
.dp-ring { color: var(--sk-primary-700) !important; background: radial-gradient(closest-side, #fff 76%, transparent 77%), conic-gradient(var(--sk-primary) calc(var(--p, 0) * 1%), var(--sk-line) 0) !important; }

/* ---------- sư tử ở đầu trang nhóm + kết quả thi (v149) ---------- */
.hub-hero {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 156px; margin: -4px 0 18px; padding: 16px 150px 16px 22px; overflow: hidden;
  background: linear-gradient(135deg, var(--hl) 0%, #fff 100%); border-radius: var(--sk-r-xl); box-shadow: var(--sk-sh-2);
}
.hub-hero .hub-sub { margin: 0; font-size: 1.05rem; font-weight: 800; color: var(--sk-ink); text-align: left; }
.hub-hero-lion { position: absolute; right: 18px; bottom: 4px; width: 132px; height: 146px; filter: drop-shadow(0 6px 6px rgba(21, 56, 102, .18)); }
.hub-hero-lion svg { width: 100%; height: 100%; display: block; }
@media (max-width: 640px) {
  .hub-hero { min-height: 104px; padding: 12px 104px 12px 16px; margin-bottom: 12px; }
  .hub-hero .hub-sub { font-size: .92rem; }
  .hub-hero-lion { width: 88px; height: 98px; right: 10px; }
}
.ex-result-lion { width: 140px; height: 156px; margin: -6px auto 4px; filter: drop-shadow(0 6px 6px rgba(21, 56, 102, .18)); }
.ex-result-lion svg { width: 100%; height: 100%; display: block; }
/* phòng Video: lớp đang chọn = nền xanh chữ trắng */
#video-view .vl-grades button.on { background: var(--sk-primary); color: #fff; box-shadow: 0 2px 0 var(--sk-primary-700); }

/* =====================================================================
 * RÀ THEO CHECKLIST UI UX PRO MAX (skill ui-ux-pro-max, đo bằng script 2026-11-14)
 * - vùng bấm ≥ 44px (ngón tay bé), chữ ≥ 12px, chip "6 mục" chữ đậm trên nền trắng (≥ 4.5:1),
 * - biểu tượng điều hướng là SVG cùng kiểu (js/core/ui-icons.js), không dùng emoji,
 * - tôn trọng "giảm chuyển động" của máy cho phần khung (không đụng chuyển động trong trò chơi: là cách chơi).
 * ===================================================================== */
.sk-ic { display: inline-flex; width: 22px; height: 22px; line-height: 0; font-style: normal; }
.sk-ic svg { width: 100%; height: 100%; }
/* thanh trên: nút tròn 44px (40px ở máy rất hẹp để không tràn mép) */
.sk-top .header-actions > .header-btn.header-icon, .sk-top #sk-more-btn { width: 44px; height: 44px; margin-left: 4px; color: var(--sk-ink); font-size: 0; }
.sk-top #toggle-sfx-btn.is-off { color: var(--sk-faint); opacity: 1; }
.sk-top .profile-avatar-wrapper { width: 40px; height: 40px; }
@media (max-width: 640px) {
  .sk-top .logo-badge, .sk-top .logo-badge .sk-lion { width: 36px; height: 36px; }
  .sk-top .header-actions > .header-btn.header-icon, .sk-top #sk-more-btn { width: 44px; height: 44px; margin-left: 2px; }
  .sk-top .user-stats-bar .stat-pill { padding: 4px 7px; }
}
@media (max-width: 380px) {
  .sk-top .header-actions > .header-btn.header-icon, .sk-top #sk-more-btn { width: 40px; height: 40px; margin-left: 0; }
  .sk-top .user-profile-badge { padding: 1px; }
  .sk-top .profile-avatar-wrapper { width: 36px; height: 36px; }
}
/* thanh dưới: biểu tượng SVG, nhãn 12px */
@media (max-width: 1180px) {
  .mobile-bottom-nav .b-nav-icon { display: inline-flex; line-height: 0; padding: 4px 16px; }
  .mobile-bottom-nav .b-nav-icon .sk-ic { width: 24px; height: 24px; }
  .mobile-bottom-nav .b-nav-label { font-size: 12px; }
}
/* chip "6 mục" trên ô: nền trắng chữ màu đậm của ô (tương phản ≥ 5.9:1), chữ 12px */
.hub-tile em { background: #fff; color: var(--hd); font-size: 12px; padding: 4px 12px; box-shadow: 0 2px 0 rgba(0, 0, 0, .12); }
.hub-tile:hover em { background: #fff; color: var(--hd); }
#hub-view .hub-card .hc-age, .hub-card .hc-age { font-size: 12px; }
/* vùng bấm ≥ 44px */
.app-view .tab-btn, .app-view .english-tab-btn { min-height: 44px; }
@media (max-width: 1180px) {
  .app-view .game-tabs-nav > button, .app-view:not(#gift-view) .tabs-container > button { min-height: 44px !important; }
}
.app-view .diff-pill-btn, .app-view .diff-btn, .app-view .voice-btn { min-height: 44px; }
:is(#math-view, #vietnamese-view, #english-view) .game-header .voice-btn { min-height: 44px; }
#video-view .vl-grades button { min-height: 44px; }
.sgk-home .jn-go { min-height: 44px; }
.home-ph-links button { min-height: 44px; padding: 10px 16px; }
.site-footer a { display: inline-block; padding: 12px 4px; }
/* giảm chuyển động (máy bật Reduce motion): tắt hiệu ứng trang trí của khung, giữ chuyển động trong trò chơi */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .app-view.active, .hub-tile, .hub-tile .ht-ic, .hub-card, .hc-sub, .game-opt-btn, .tab-btn, #interactive-mascot, .sk-lion, .hub-hero-lion, #sk-splash .sp-lion, #sk-splash .sp-bar i {
    animation: none !important; transition: none !important;
  }
  .hub-tile:hover, .hub-tile:hover .ht-ic, .hub-card:hover, .hc-sub:hover { transform: none !important; }
}
/* menu trên (máy tính + iPad ngang dùng tay): vùng bấm 44px; nhãn tuổi hồ sơ + số video ≥ 12px */
.sk-topnav button { min-height: 44px; }
.sk-top .profile-age-badge { font-size: 12px; }
#video-view .vl-groups small { font-size: 12px; }
/* điện thoại: chừa chỗ cho số sao / kim cương 4 chữ số (test header: bé 1 280 sao, 240 kim cương) */
@media (max-width: 640px) {
  .top-navbar.sk-top { padding-left: 8px; padding-right: 8px; gap: 4px; }
  .sk-top-right { gap: 2px; }
  .sk-top .user-stats-bar .stat-pill { padding: 4px 6px; gap: 2px; }
}
@media (max-width: 380px) {
  .sk-top .logo-badge, .sk-top .logo-badge .sk-lion { width: 32px; height: 32px; }
  .sk-top .user-stats-bar .stat-pill { padding: 3px 5px; font-size: .8rem; }
}

/* =====================================================================
 * v151 BÁM SÁT MOCKUP (người dùng: "giao diện vẫn như vậy, đâu có khác gì mockup" - 2026-11-14)
 * Trang chủ theo màn "03. Trang chủ học tập": logo chữ Sam Kido giữa thanh trên, lời chào + nút "Lớp 2 ▾",
 * thẻ "Nhiệm vụ hôm nay" (bia, hộp quà, thanh tiến độ xanh lá, nút dải cam), ô lớn có hình khối nổi (js/core/sk-art.js).
 * ===================================================================== */
/* logo chữ: "Sam" xanh, "Kido" cam, viền trắng dày + bóng xanh như mockup */
.sk-top .brand-title {
  font-size: 1.75rem; font-weight: 900; letter-spacing: -.03em; color: #168CFF; line-height: 1;
  text-shadow: -2px -2px 0 #fff, 2px -2px 0 #fff, -2px 2px 0 #fff, 2px 2px 0 #fff, 0 -2px 0 #fff, 0 3px 0 #fff, 0 5px 0 rgba(19, 102, 174, .28);
}
.sk-top .brand-title span { color: #FF791C; }
/* điện thoại: ☰ bên trái · logo chữ ở giữa · sao/kim cương · loa · hồ sơ bé (nút 🎯 nhiệm vụ chuyển xuống hộp quà của thẻ Nhiệm vụ hôm nay) */
@media (max-width: 640px) {
  .sk-top-right, .sk-top .header-actions { display: contents !important; }
  .sk-top .sk-more { order: -1; }
  .sk-top .sk-more-menu { left: 0; right: auto; }
  .sk-top .brand-logo { order: 0; flex: 1 1 auto; min-width: 0; justify-content: center; }
  .sk-top .logo-badge { display: none; }
  .sk-top .brand-title { display: inline; font-size: 1.32rem; }
  .sk-top .user-stats-bar { order: 1; }
  .sk-top #btn-open-quests { display: none !important; }
  .sk-top #toggle-sfx-btn { order: 2; }
  .sk-top .user-profile-badge { order: 3; }
  .sk-top .header-actions > .header-btn.header-icon, .sk-top #sk-more-btn { margin-left: 0; }
}
@media (max-width: 380px) { .sk-top .brand-title { font-size: 1.08rem; } }
@media (max-width: 340px) { .sk-top .brand-title { font-size: .92rem; } .sk-top .brand-logo { justify-content: flex-start; } }
/* v153: logo chữ là SVG (index.html) - cao theo cỡ chữ của .brand-title nên các mốc cỡ chữ ở trên vẫn dùng được */
.sk-top .brand-title { display: inline-flex; line-height: 1; text-shadow: none; }
.sk-top .brand-title .sk-wordmark { display: block; height: 1.62em; width: auto; overflow: visible; filter: drop-shadow(0 3px 3px rgba(16, 88, 170, .22)); }
/* 320px + 1.280 sao: logo SVG rộng hơn chữ cũ ~13px làm tràn mép 1px (test header) -> thấp lại một chút */
@media (max-width: 340px) { .sk-top .brand-title .sk-wordmark { height: 1.42em; } }

/* lời chào: máy tính giữ sư tử vẫy tay; điện thoại = ảnh đại diện tròn mặt sư tử như mockup */
#home-view .home-hero { overflow: visible; }
#home-view .home-hero::before { display: none; }
#home-view .mascot-avatar .hello-face { display: none; }
.home-hello-meta { position: relative; margin-top: 8px; }
.hh-grade {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 18px; border: 0; border-radius: 999px; cursor: pointer;
  background: #fff; color: var(--sk-primary-700); font-family: var(--font-display); font-size: 1rem; font-weight: 900; box-shadow: var(--sk-sh-2);
}
.hh-grade[aria-expanded="true"] { background: var(--sk-primary); color: #fff; }
.hh-grades {
  position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; display: flex; flex-wrap: wrap; gap: 6px; width: max-content; max-width: 280px;
  padding: 8px; background: #fff; border-radius: 18px; box-shadow: var(--sk-sh-3);
}
.hh-grades[hidden] { display: none; }
.hh-grades button { min-height: 44px; min-width: 76px; border: 0; border-radius: 999px; cursor: pointer; background: var(--sk-primary-50); color: var(--sk-ink); font-family: var(--font-display); font-size: .95rem; font-weight: 800; }
.hh-grades button.on { background: var(--sk-primary); color: #fff; }
@media (max-width: 640px) {
  #home-view .home-hero { background: transparent; box-shadow: none; padding: 2px 2px 4px; }
  #home-view .mascot-hero-section { gap: 12px; align-items: center; }
  #home-view .mascot-container, #home-view .mascot-avatar { width: 64px; height: 64px; }
  #home-view .mascot-avatar {
    border-radius: 50%; border: 4px solid #fff; overflow: hidden; background: linear-gradient(180deg, #FFE58A, #FFC23A); box-shadow: var(--sk-sh-2);
  }
  #home-view .mascot-avatar .hello-wave { display: none; }
  #home-view .mascot-avatar .hello-face { display: block; width: 100%; height: 100%; transform: translateY(3px) scale(1.12); filter: none; }
  #home-view .mascot-bubble { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; column-gap: 10px; }
  #home-view .mascot-bubble h2 { font-size: 1.32rem; font-weight: 900; margin: 0; }
  #home-view .mascot-bubble p { display: none; }
  .home-hello-meta { margin-top: 2px; }
  .hh-grade { min-height: 40px; padding: 4px 14px; font-size: .92rem; }
  /* v153: nút "Lớp ▾" nằm bên phải lời chào nên bảng mở từ mép trái nút bị tràn ra ngoài màn hình
     -> trên điện thoại bảng neo theo cả khung lời chào, 5 lớp trên một hàng */
  #home-view .mascot-hero-section { position: relative; }
  #home-view .home-hello-meta { position: static; }
  .hh-grades { left: 0; right: 0; width: auto; max-width: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .hh-grades button { min-width: 0; padding: 0 2px; font-size: .9rem; }
  #home-view .home-find { margin-top: 12px; }
}

/* thẻ Nhiệm vụ hôm nay */
.sgk-home { padding: 16px 18px; }
.sgk-home::before { display: none; }
.sgk-home .sgk-top { gap: 12px; }
.sgk-home .ic { width: 56px; height: 56px; padding: 0; font-size: 0; background: none !important; border: 0; box-shadow: none; }
.sgk-home .ic svg, .sgk-gift svg { width: 100%; height: 100%; display: block; }
.sgk-home .sgk-txt b { font-size: 1.25rem; font-weight: 900; color: var(--sk-ink); }
.sgk-home .sgk-txt small { font-size: .85rem; line-height: 1.35; }
.sgk-gift { flex: none; width: 60px; height: 60px; padding: 0; border: 0; background: none; cursor: pointer; transition: transform .15s; }
.sgk-gift:hover { transform: rotate(-6deg) scale(1.06); }
.sgk-gift:active { transform: scale(.92); }
.sgk-prog { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.sgk-bar { flex: 1; height: 14px; border-radius: 99px; background: #DCEAFA; overflow: hidden; }
.sgk-bar span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #31CF45, #89E562); transition: width .4s; }
.sgk-prog b { font-family: var(--font-display); font-size: 1.05rem; font-weight: 900; color: var(--sk-ink); }
.sgk-home .sgk-week span.done { background: #E7F9EA !important; color: #136B2C !important; }
.sgk-home .jn-go {
  display: flex; align-items: center; justify-content: center; width: max-content; margin: 12px 0 0 auto; min-height: 48px; padding: 0 32px;
  color: #fff !important; font-family: var(--font-display); font-size: 1.05rem; font-weight: 900;
}
@media (max-width: 640px) {
  .sgk-home { padding: 14px 14px 14px; }
  .sgk-home .ic { width: 48px; height: 48px; }
  .sgk-gift { width: 52px; height: 52px; }
  .sgk-home .sgk-txt b { font-size: 1.12rem; }
  .sgk-home .jn-go { width: 100%; margin-top: 12px; }
  /* tên bài hôm nay: xuống dòng, hiện đủ (bé không biết vuốt ngang - theme.css cũ để hàng cuộn ngang) */
  .sgk-home .sgk-week { flex-wrap: wrap !important; overflow: visible; margin-left: 0 !important; margin-right: 0 !important; padding: 0; }
  .sgk-home .sgk-week span { white-space: normal; }
}

/* 6 ô lớn: hình khối nổi thay emoji, tên + dòng phụ ngắn; đáy ô đậm hơn để dòng phụ chữ nhỏ vẫn rõ */
.hub-tile { background: linear-gradient(180deg, var(--hg) 0%, var(--hm) 52%, var(--hd) 135%); }
.hub-tile .ht-ic.ht-art { width: 96px; height: 96px; margin: 0 0 6px; font-size: 0; line-height: 0; filter: drop-shadow(0 8px 6px rgba(0, 0, 0, .2)); }
.hub-tile .ht-art svg { width: 100%; height: 100%; display: block; }
.hub-tile small { display: block; font-size: 13px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
@media (max-width: 1180px) and (min-width: 641px) { .hub-tile .ht-ic.ht-art { width: 84px; height: 84px; } }
@media (max-width: 640px) {
  .hub-tile { min-height: 156px; gap: 0; }
  .hub-tile .ht-ic.ht-art { width: 74px; height: 74px; margin-bottom: 4px; }
  .hub-tile b { font-size: 1.2rem; line-height: 1.15; }
  .hub-tile small { display: block; font-size: 12px; margin-top: 2px; }
}

/* ---------- phòng Lộ trình học (mockup "04. Chọn khóa học"): lớp/môn đang chọn = xanh dương, nút chính dải cam ---------- */
#sgk-view .sg-subject.active { background: var(--sk-primary); color: #fff; border-color: var(--sk-primary); box-shadow: 0 3px 0 var(--sk-primary-700); }
#sgk-view .ex-seg button.active { background: var(--sk-primary); color: #fff; }
#sgk-view .ex-btn.primary { background: var(--sk-cta); border-color: transparent; color: #fff; box-shadow: 0 4px 0 var(--sk-cta-sh); }
#sgk-view .sg-topic { border-left-color: var(--sk-primary-200); }
#sgk-view .sg-lesson.done .sg-lesson-st, #sgk-view .sg-lesson.good .sg-lesson-st { background: #38C85A; color: #fff; }

/* ---------- bài làm (mockup "06. Làm bài tập"): đáp án = viên trắng to chữ đậm giữa; đúng = xanh lá + ✓; sai = đỏ ---------- */
.ex-top.ex-top-exam .ex-timer { background: var(--sk-btn-blue); color: #fff; box-shadow: 0 3px 0 var(--sk-btn-blue-sh); }
.ex-dot { border-radius: 50%; }
.ex-dot.cur { outline: 0; box-shadow: 0 0 0 3px var(--sk-primary-200); }
.ex-dot.cur:not(.ok):not(.bad) { background: var(--sk-primary); color: #fff; border-color: var(--sk-primary); }
.ex-q .ex-opt {
  min-height: 60px; padding: 10px 14px; border: 2px solid #BED9FA; border-radius: 18px; background: #fff; box-shadow: 0 4px 0 #D3E5FA;
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 900; color: #14336D;
}
.ex-q .ex-opt-b { text-align: center; }
.ex-q .ex-opt-l { background: var(--sk-primary-50); color: var(--sk-primary-700); }
.ex-q .ex-opt.sel { border-color: var(--sk-primary); background: var(--sk-primary-50); box-shadow: 0 4px 0 var(--sk-primary-200); }
.ex-q .ex-opt.sel .ex-opt-l { background: var(--sk-primary); color: #fff; }
.ex-q .ex-opt.is-right { border-color: #29C449; background: #D4FAD5; box-shadow: 0 4px 0 #29C449; color: #0F5A23; opacity: 1; }
.ex-q .ex-opt.is-right .ex-opt-l { background: #29C449; color: #fff; }
.ex-q .ex-opt.is-right::after {
  content: '✓'; flex: none; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: #29C449; color: #fff; font-size: 1rem; font-weight: 900;
}
.ex-q .ex-opt.is-bad { border-color: #FF6B6B; background: #FFECEC; box-shadow: 0 4px 0 #F2A3A3; color: #A11D1D; opacity: 1; }
.ex-q .ex-opt.is-bad .ex-opt-l { background: #FF6B6B; color: #fff; }
.ex-session-actions .ex-btn, #sgk-view .ex-session-actions .ex-btn { border-radius: 999px; min-height: 48px; }
.ex-session-actions .ex-btn.primary, #sgk-view .ex-session-actions .ex-btn.primary { background: var(--sk-btn-blue); border-color: transparent; box-shadow: 0 4px 0 var(--sk-btn-blue-sh); }

/* ---------- màn kết quả (mockup "07. Kết quả bài học"): sao bật lên + sư tử + ruy băng đỏ ---------- */
.sk-result-hero { text-align: center; margin: -4px 0 10px; }
.skr-stars { display: flex; justify-content: center; align-items: flex-end; gap: 2px; margin-bottom: -10px; position: relative; z-index: 1; }
.skr-star { display: inline-block; width: 54px; height: 54px; filter: drop-shadow(0 4px 3px rgba(150, 90, 0, .25)); }
.skr-star.s2 { width: 74px; height: 74px; margin-bottom: 16px; }
.skr-star svg, .skr-lion svg { width: 100%; height: 100%; display: block; }
.skr-star.on { animation: skr-pop .55s cubic-bezier(.3, 1.6, .5, 1) both; }
.skr-star.s2.on { animation-delay: .15s; } .skr-star.s3.on { animation-delay: .3s; }
@keyframes skr-pop { from { transform: scale(0) rotate(-40deg); opacity: 0; } to { transform: none; opacity: 1; } }
.skr-lion { display: block; width: 150px; height: 168px; margin: 0 auto; filter: drop-shadow(0 6px 6px rgba(21, 56, 102, .18)); }
.sk-ribbon { position: relative; display: inline-block; margin: -16px auto 4px; transform: rotate(-3deg); }
.sk-ribbon span {
  position: relative; z-index: 1; display: block; padding: 10px 30px; border-radius: 12px;
  background: linear-gradient(180deg, #FF7A6B, #F2483F); box-shadow: 0 5px 0 #C93A33;
  color: #fff; font-family: var(--font-display); font-size: 1.4rem; font-weight: 900; text-shadow: 0 2px 0 rgba(150, 30, 20, .35); white-space: nowrap;
}
.sk-ribbon::before, .sk-ribbon::after { content: ''; position: absolute; z-index: 0; top: 12px; width: 26px; height: calc(100% - 6px); background: #D63C34; }
.sk-ribbon::before { left: -16px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 38% 50%); }
.sk-ribbon::after { right: -16px; clip-path: polygon(0 0, 100% 0, 62% 50%, 100% 100%, 0 100%); }
@media (max-width: 380px) { .sk-ribbon span { font-size: 1.15rem; padding: 9px 22px; } .skr-lion { width: 124px; height: 140px; } }
@media (prefers-reduced-motion: reduce) { .skr-star.on { animation: none !important; } }

/* ---------- màn làm bài (Luyện thi, Lộ trình học, TIMO, kiểm tra đầu vào) - v151 người dùng: "câu hỏi lệch một bên khó xem" ----------
 * thanh trên + nội dung chung một cột giữa (trước đây thanh trên rộng hết màn, nội dung 760px -> nhìn lệch),
 * dòng "Câu 1/12" + hàng số câu căn giữa, câu hỏi căn giữa: ngắn = chữ to (.big), dài / song ngữ = căn trái (.long, exam-room.js) */
.ex-top.ex-top-exam, .ex-session { max-width: 880px; margin-left: auto; margin-right: auto; }
.ex-sec { text-align: center; }
.ex-nav { justify-content: center; }
.ex-q .ex-prompt { text-align: center; text-wrap: balance; font-size: 1.3rem; }
.ex-q .ex-prompt.big { margin: 6px 0 20px; font-size: 2.15rem; font-weight: 900; line-height: 1.25; color: #102F72; }
.ex-q .ex-prompt.long { text-align: left; text-wrap: pretty; font-size: 1.12rem; }
.ex-q > .ex-visual { display: flex; flex-direction: column; align-items: center; text-align: center; }
.ex-q > .ex-listen { display: flex; margin: 0 auto 12px; }
.ex-q .ex-seqbox, .ex-q .ex-chips { justify-content: center; }
.ex-q #ex-undo, .ex-q #ex-reset { display: block; margin: 12px auto 0; }
.ex-q .ex-opts { max-width: 760px; margin-left: auto; margin-right: auto; }
@media (max-width: 640px) {
  .ex-q .ex-prompt { font-size: 1.15rem; }
  .ex-q .ex-prompt.big { font-size: 1.8rem; margin-bottom: 16px; }
  .ex-q .ex-prompt.long { font-size: 1.02rem; }
}

/* =====================================================================
 * v151 RÀ BỐ CỤC + MÀU TOÀN APP (người dùng 2026-11-14: "rà soát lại tất cả... PC, iPad, điện thoại" + "kiểm tra cả màu sắc")
 * Rà bằng ảnh chụp 33 phòng × 3 khổ (1366 / 820 / 390) + script quét màu nút/chip/nhãn.
 * ===================================================================== */
/* thanh Cấp độ: bo 22px (bo tròn hẳn 999px thì khi xuống 2-3 dòng thành hình bầu dục méo), các mức căn giữa */
.app-view .difficulty-level-bar { border-radius: 22px; justify-content: center; flex-wrap: wrap; row-gap: 4px; }
/* điện thoại: không bắt bé vuốt ngang (mức "Khó" bị cắt ở mép) - các mức xuống dòng, hiện đủ; ẩn "+2⭐" cho gọn */
@media (max-width: 640px) {
  .app-view .difficulty-level-bar { flex-wrap: wrap !important; justify-content: center !important; overflow: visible !important; padding: 6px !important; gap: 4px !important; }
  .app-view .difficulty-level-bar .diff-badge-star { display: none; }
  .app-view .diff-pill-btn { padding: 6px 12px; font-size: .88rem; }
}
/* nhãn tên trò ở góc thẻ trò chơi: chip xanh nhạt (trước: vàng nâu, lạc tông trời xanh) */
.app-view .game-badge { background: var(--sk-primary-50); border-color: var(--sk-primary-100); color: var(--sk-primary-700); }
/* bài SGK: bước đang học + chấm slide + chữ nhấn = xanh dương (trước theo màu môn: Toán ra cam cũ); chữ bước ≥ 12px */
#sgk-view .sg-step.cur { background: var(--sk-primary); color: #fff; }
#sgk-view .sg-dots i.cur { background: var(--sk-primary); }
#sgk-view .sg-slide-text strong { color: var(--sk-primary-700); }
@media (max-width: 640px) { #sgk-view .sg-step { font-size: 12px; } }
/* biểu mẫu chọn (Hai Người Một Máy, Đấu Trường): máy tính rộng -> một cột giữa (trước: ô nhập dài 1 080px, nhãn trái chip giữa) */
:is(#arena-view, #duel-view) .ar-card { max-width: 820px; margin-left: auto; margin-right: auto; }
#duel-view .ar-card { max-width: 640px; text-align: center; }
#duel-view .ar-label { text-align: center; }
#duel-view .ar-input { display: block; max-width: 360px; margin-left: auto; margin-right: auto; text-align: center; }
@media (max-width: 640px) { .app-view .diff-pill-btn:not(.active) .lv-more { display: none; } }
/* Đấu Trường: nhóm 4 lựa chọn trên điện thoại = lưới 2×2 (trước: 3 cột, "Tiếng Anh" lẻ một mình, "Tiếng Việt" gãy dòng) */
@media (max-width: 640px) { .ar-pills:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
:is(#brain-view, #art-view, #ethics-view) .game-badge { background: var(--sk-primary-50) !important; color: var(--sk-primary-700) !important; border-color: var(--sk-primary-100) !important; }

/* =====================================================================
 * v160: trang nhóm trên điện thoại - MỖI TRÒ MỘT HÀNG (hình + tên + mũi tên ›) để bé biết bấm vào chơi
 * (người dùng chọn 2026-11-14: giữ nút mục ở trên, trò con không còn là ô nhỏ 2 cột). Đầu thẻ phòng cũng có mũi tên.
 * ===================================================================== */
@media (max-width: 640px) {
  #hub-view .hc-subs { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 10px 12px 14px; }
  #hub-view .hc-sub {
    position: relative; min-height: 64px; padding: 8px 42px 8px 10px; gap: 12px; font-size: 1rem !important;
    background: #fff; border: 1px solid var(--sk-line); border-radius: 18px; box-shadow: var(--sk-sh-1);
  }
  #hub-view .hc-sub > span:first-child { width: 46px; height: 46px; font-size: 1.6rem; border-radius: 14px; background: var(--hl, var(--sk-primary-50)); box-shadow: none; }
  #hub-view .hc-subj > span:first-child { background: color-mix(in srgb, var(--sc) 14%, #fff); }
  #hub-view .hc-sub .hc-sub-t small { font-size: .8rem; }
  /* mũi tên vẽ bằng viền (ký tự › của phông nhỏ và mảnh, bé khó thấy) */
  #hub-view .hc-sub::after, #hub-view .hub-card .hc-main::after {
    content: ''; position: absolute; right: 18px; top: 50%; width: 9px; height: 9px; margin-top: -5px;
    border-top: 3px solid var(--sk-primary-700); border-right: 3px solid var(--sk-primary-700); border-radius: 2px; transform: rotate(45deg); pointer-events: none;
  }
  #hub-view .hub-card .hc-main { position: relative; padding-right: 42px; }
}

/* =====================================================================
 * v161: rà toàn bộ trên điện thoại (người dùng gửi ảnh So sánh > < = bị vỡ: "cái nào vỡ giao diện chỉnh lại hết")
 * 1) Hàng phép tính / so sánh / dãy quy luật / pha màu luôn MỘT dòng ("A ? B", "4 + 6 = ?", "Hồng + Trắng = ?"):
 *    trước rớt dòng nên bé không hiểu đang so / cộng cái gì với cái gì. Vật co nhỏ và xuống dòng BÊN TRONG khung của mình.
 * 2) Bỏ các hàng vuốt ngang còn sót (bé không vuốt - nguyên tắc v146; ui-polish/responsive cũ đặt "1 hàng vuốt ngang"):
 *    chọn bạn đồng hành, đối thủ, bảng màu, tranh tô, đảo hành trình, môn SGK -> lưới xuống dòng thấy hết; bảng tuần Thói quen vừa màn.
 * ===================================================================== */
.sign-btn b { font-size: 1.5rem; line-height: 1; margin-right: 8px; }
.sign-btn small { font-size: .95rem; font-weight: 800; }
@media (max-width: 640px) {
  /* So sánh > < = */
  .compare-arena { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; gap: 8px; margin: 14px 0 18px; }
  .compare-side { min-width: 0; padding: 10px 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 18px; }
  .compare-basket { min-height: 0; gap: 2px; font-size: 1.2rem; margin-bottom: 6px; }
  .compare-basket .mini-icon { font-size: inherit; }
  .compare-num-badge { font-size: 1.3rem !important; line-height: 1.2; overflow-wrap: anywhere; text-align: center; }
  .compare-side > div[style] { font-size: .78rem !important; }
  .compare-middle-slot { align-self: center; width: 52px; height: 52px; font-size: 1.7rem; border-radius: 16px; }
  .signs-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 8px !important; }
  .signs-grid .sign-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 76px; padding: 6px 4px !important; }
  .sign-btn b { font-size: 1.9rem; margin: 0; }
  .sign-btn small { font-size: .8rem; }
  /* Phép tính có hình: [4 cà rốt] + [6 cà rốt] = [?] */
  .math-visual-equation { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto auto; align-items: center; gap: 6px; margin: 14px 0 20px; }
  .math-visual-equation .equation-part { min-width: 0; padding: 8px 4px; border-radius: 16px; }
  .math-visual-equation .part-icons { flex-wrap: wrap; gap: 1px; min-height: 0; font-size: 1.05rem; }
  .math-visual-equation .part-num { font-size: 1.35rem; }
  .math-visual-equation .equation-sign { font-size: 1.6rem; }
  .math-visual-equation .question-part { width: 50px; height: 50px; padding: 0; font-size: 1.6rem; }
  /* Dãy quy luật: một hàng, ô co lại theo số ô */
  .pattern-sequence-box { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; margin: 16px 0; }
  .pattern-sequence-box .pattern-cell { justify-self: center; width: 100%; max-width: 56px; height: auto; aspect-ratio: 1; font-size: 1.4rem; border-width: 2px; border-radius: 12px; }
  /* Pha màu: [Hồng] + [Trắng] = [?] */
  .beaker-reaction-zone { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 4px !important; }
  .beaker-reaction-zone .beaker-card { min-width: 0; padding: 10px 4px; border-width: 3px; border-radius: 18px; }
  .beaker-reaction-zone .beaker-color-blob, .beaker-reaction-zone .beaker-result-blob { width: 44px; height: 44px; margin-left: auto; margin-right: auto; }
  .beaker-reaction-zone .beaker-name { font-size: .8rem; overflow-wrap: anywhere; }
  .beaker-reaction-zone .beaker-operator { font-size: 1.4rem; margin: 0; }

  /* hàng vuốt ngang -> lưới xuống dòng thấy hết */
  .opponent-picker-row, .runner-pills-row, .versus-mode-toggle-bar { flex-wrap: wrap !important; overflow: visible !important; justify-content: center !important; }
  .opponent-picker-row > *, .runner-pills-row > *, .versus-mode-toggle-bar > * { flex-shrink: 1 !important; }
  .color-palette { flex-wrap: wrap !important; overflow: visible !important; justify-content: center !important; border-radius: 22px !important; }
  .coloring-templates-grid { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible !important; gap: 8px; }
  .coloring-templates-grid > * { min-width: 0 !important; width: auto !important; flex: none !important; }
  #journey-view .jn-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; }
  #journey-view .jn-island { width: auto; min-width: 0; }
  #sgk-view .sg-subjects { flex-wrap: wrap; overflow: visible; }
  #habits-view .pd-table { min-width: 0; table-layout: fixed; font-size: .76rem; }
  #habits-view .pd-table th, #habits-view .pd-table td { padding: 6px 2px; text-align: center; }
  #habits-view .pd-table th:first-child, #habits-view .pd-table td:first-child { width: 42%; text-align: left; padding-left: 6px; }
}

/* v161: khu Vui chơi - Hành Trình + Bản Đồ nổi bật đầu trang (người dùng yêu cầu; homeHubs.featureHtml).
   Màu nền đặt cả background-color tối để chữ trắng đủ tương phản (test contrast đọc màu nền, không đọc dải màu) */
.hub-feat { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0 0 16px; }
.hfe-card {
  position: relative; display: flex; align-items: center; gap: 14px; min-height: 120px; padding: 16px 18px; border: 0; border-radius: 26px; overflow: hidden;
  color: #fff; font-family: inherit; text-align: left; cursor: pointer; transition: transform .15s;
  box-shadow: 0 10px 22px -10px rgba(0, 0, 0, .35), inset 0 -5px 0 rgba(0, 0, 0, .14);
}
.hfe-card::before { content: ''; position: absolute; right: -30px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.hfe-jn { background: #05583C linear-gradient(160deg, #0F9A69, #05583C); }
.hfe-mp { background: #A9480A linear-gradient(160deg, #E8761A, #A9480A); }
.hfe-card:hover { transform: translateY(-2px); }
.hfe-ic {
  position: relative; flex: none; display: flex; align-items: center; justify-content: center; width: 76px; height: 76px; border-radius: 22px;
  background: rgba(255, 255, 255, .22); font-size: 2.9rem; animation: hfe-bob 2.4s ease-in-out infinite;
}
.hfe-mp .hfe-ic { animation-delay: .6s; }
@keyframes hfe-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.hfe-tx { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.hfe-tx b { font-family: var(--font-display); font-size: 1.25rem; font-weight: 900; line-height: 1.2; text-shadow: 0 2px 0 rgba(0, 0, 0, .15); }
.hfe-tx small { font-size: .9rem; font-weight: 800; }
.hfe-bar { display: block; height: 8px; margin-top: 4px; border-radius: 999px; background: rgba(255, 255, 255, .3); overflow: hidden; }
.hfe-bar > span { display: block; height: 100%; border-radius: inherit; background: #FFE066; }
.hfe-cta { position: relative; flex: none; padding: 9px 14px; border-radius: 999px; background: #fff; color: #05583C; font-size: .92rem; font-weight: 900; white-space: nowrap; box-shadow: 0 3px 0 rgba(0, 0, 0, .15); }
.hfe-mp .hfe-cta { color: #8A3A08; }
@media (max-width: 640px) {
  .hub-feat { grid-template-columns: minmax(0, 1fr); gap: 10px; margin-bottom: 12px; }
  .hfe-card { min-height: 100px; padding: 14px; gap: 12px; border-radius: 22px; }
  .hfe-ic { width: 64px; height: 64px; font-size: 2.4rem; border-radius: 18px; }
  .hfe-tx b { font-size: 1.12rem; }
  .hfe-tx small { font-size: .84rem; }
  .hfe-cta { padding: 8px 12px; font-size: .86rem; }
}
@media (max-width: 420px) { .hfe-cta { display: none; } .hfe-card::after { content: ''; position: absolute; right: 16px; top: 50%; width: 9px; height: 9px; margin-top: -5px; border-top: 3px solid #fff; border-right: 3px solid #fff; transform: rotate(45deg); } .hfe-tx { padding-right: 18px; } }
@media (prefers-reduced-motion: reduce) { .hfe-ic { animation: none; } }

/* v163: quay lại từ phòng -> trang nhóm, thẻ phòng vừa rời nháy viền xanh để bé thấy mình vừa ở đâu (homeHubs.openFor) */
#hub-view .hub-card.hub-focus { box-shadow: 0 0 0 4px var(--sk-primary), var(--sk-sh-2); transition: box-shadow .4s; }

/* =====================================================================
 * v171: rà nút bấm toàn app (người dùng: "kiểm tra font, lỗi các button") - script rà mọi phòng × mọi tab ở 390px
 * 1) trình duyệt mặc định cho <button>/<input>/<select>/<textarea> PHÔNG HỆ THỐNG -> 53 loại nút trong các phòng hiện Arial
 *    (nút đọc Thế giới, đáp án Tiếng Anh, chip Hai người, thẻ chữ cái, thẻ truyện, nút quay lại Luyện thi...). Buộc theo phông của trang.
 * 2) điện thoại / iPad: nút < 44px khó chạm với bé (nút "Nghe đọc / Hướng dẫn" 36px ở hầu hết phòng Trí não, chọn lớp/học kỳ 36px...)
 * ===================================================================== */
button, input, select, textarea, optgroup { font-family: inherit; }
@media (max-width: 1023px) {
  .voice-btn, .ex-back, .ml-chip, .fd-num { min-height: 44px; }
  .tl-speak { min-width: 44px; min-height: 44px; }
  .ex-seg button { min-width: 44px; min-height: 44px; }
  /* 2 chỗ luật cũ mạnh hơn ép về 38px: nút quay lại Luyện thi / Lộ trình (theme.css <= 640px) + lưới 50 số trò Thám tử số (fun.css .dense) */
  .ex-top:not(.ex-top-exam) .ex-back { height: 44px; min-height: 44px; }
  .fd-grid.dense .fd-num { min-height: 44px; }
}


/* ===== css/theme/dash.css ===== */
/* =====================================================================
 * Sam Kido v158 - máy tính + iPad ngang (>= 1024px), theo hình trang chủ người dùng gửi (GPT vẽ, 2026-11-14):
 *   menu bên trái (#sk-side) thay menu chữ trên đầu + thanh dưới, ô Tìm nhanh trên thanh trên (#top-find),
 *   trang chủ bảng điều khiển (#home-dash, js/core/home-dash.js).
 * Nhỏ hơn 1024px: ẩn hết, điện thoại / iPad dọc giữ giao diện cũ. Nạp SAU sky.css.
 * ===================================================================== */
.sk-side, .sk-top-find, .home-dash { display: none; }

@media (min-width: 1024px) {
  :root { --side-w: 212px; --side-l: max(12px, calc((100vw - 1600px) / 2)); --hd-blue: #1572E8; }

  /* ---------- thanh trên: bỏ menu chữ (đã có menu trái), thêm ô tìm ---------- */
  .sk-top .sk-topnav { display: none !important; }
  .sk-top .sk-top-find { display: block; flex: 1 1 auto; max-width: 460px; margin: 0 auto 0 18px; position: relative; }
  .sk-top-find .home-find { margin: 0 !important; max-width: none; }
  .sk-top-find .hf-box { min-height: 46px; background: #fff; }
  .sk-top-find .hf-res { position: absolute; left: 0; top: calc(100% + 8px); width: min(640px, 70vw); max-height: 70vh; overflow: auto; z-index: 60; margin: 0; }
  .mobile-bottom-nav { display: none !important; }

  /* ---------- menu bên trái ---------- */
  .sk-side { display: flex; flex-direction: column; gap: 6px; position: fixed; z-index: 40; top: 80px; left: var(--side-l); width: var(--side-w); max-height: calc(100vh - 92px); }
  .ss-panel { display: flex; flex-direction: column; gap: 3px; padding: 12px 10px; background: rgba(255, 255, 255, .94); border-radius: 26px; box-shadow: var(--sk-sh-2); overflow: auto; }
  .ss-item {
    position: relative; display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 6px 12px; border: 0; border-radius: 16px; background: none;
    color: var(--sk-ink); font-family: var(--font-display); font-size: 1.04rem; font-weight: 800; text-align: left; cursor: pointer; transition: background .15s;
  }
  .ss-item:hover { background: var(--sk-primary-50); }
  .ss-item.active { background: var(--hd-blue) linear-gradient(180deg, #2E9BFF, var(--hd-blue)); color: #fff; box-shadow: 0 6px 14px -6px rgba(21, 114, 232, .7); }
  .ss-ic { flex: none; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem; line-height: 1; }
  .ss-ic .sk-art, .ss-ic .sk-lion { width: 34px; height: 34px; }
  .ss-sep { border: 0; border-top: 2px solid var(--sk-line); margin: 6px 8px; }
  .ss-badge {
    position: absolute; left: 34px; top: 3px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: #DC2626; color: #fff;
    font-size: .74rem; font-style: normal; font-weight: 900; line-height: 20px; text-align: center; box-shadow: 0 0 0 2px #fff;
  }
  .ss-badge[hidden] { display: none; }
  .ss-lion { display: block; width: 150px; height: 168px; margin: 0 auto; filter: drop-shadow(0 8px 8px rgba(21, 56, 102, .2)); }
  .ss-lion .sk-lion { width: 100%; height: 100%; }

  /* ---------- nội dung chừa chỗ cho menu trái; chân trang chừa chỗ cho đồi cỏ (nền v155) ---------- */
  /* đáy 210px: cây trên đồi (nền v155) cao ~230px tính từ đáy, không chạm dòng link chân trang */
  .app-viewport { max-width: 1340px; margin-left: calc(var(--side-l) + var(--side-w) + 20px); margin-right: auto; padding: 16px 24px 210px 0; }
  .site-footer { padding-bottom: 0; }

  /* ---------- trang chủ: bảng điều khiển thay lời chào + thẻ nhiệm vụ + 6 ô lớn ---------- */
  #home-view > .home-hero, #home-view > #sgk-box, #home-view > #home-menu { display: none !important; }
  #home-view > * { max-width: none; } /* theme.css giới hạn 980px (trang chủ cũ 1 cột) - bảng điều khiển dùng hết bề rộng */
  .home-dash { display: block; margin-bottom: 16px; }
  /* nút trong bảng điều khiển: trình duyệt mặc định cho <button> phông hệ thống (Arial/Segoe) -> chữ lẫn 2 phông (người dùng báo "font chữ lỗi") */
  .home-dash button { font-family: inherit; }
  .hd-head { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; min-height: 96px; margin: 0 0 4px; }
  .hd-hello h1 { margin: 0; font-family: var(--font-display); font-size: 2rem; font-weight: 900; color: #10306B; line-height: 1.2; }
  .hd-hello p { margin: 4px 0 12px; color: var(--sk-text); font-size: 1.05rem; font-weight: 700; }
  /* sư tử "ló" sau mép trên các thẻ như hình */
  .hd-peek { flex: none; width: 124px; height: 124px; margin: 0 60px -34px 0; position: relative; z-index: 0; filter: drop-shadow(0 6px 6px rgba(21, 56, 102, .16)); }
  .hd-peek .sk-lion-img, .hd-peek svg { width: 100%; height: 100%; display: block; }

  /* 1024-1599: 2 cột (nhiệm vụ | học tiếp + khám phá), dưới: tiến trình + thành tích chồng nhau | sự kiện.
     Hình gốc vẽ cho màn ~1670px: 3 cột ở 1366 làm chữ xuống 4 dòng (đo 2026-11-14) nên 3 cột chỉ từ 1600 */
  .hd-grid {
    display: grid; gap: 16px; align-items: stretch; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: auto 1fr auto auto;
    grid-template-areas: "q q q n n n" "q q q e e e" "p p p v v v" "a a a v v v";
  }
  .hd-quests { grid-area: q; } .hd-next { grid-area: n; } .hd-explore { grid-area: e; } .hd-progress { grid-area: p; } .hd-achieve { grid-area: a; } .hd-events { grid-area: v; }
  .hd-card { position: relative; z-index: 1; min-width: 0; padding: 16px 18px; background: rgba(255, 255, 255, .97); border-radius: 24px; box-shadow: var(--sk-sh-2); }
  .hd-h { margin: 0 0 12px; font-family: var(--font-display); font-size: 1.18rem; font-weight: 900; color: #10306B; }
  .hd-hrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
  .hd-hrow .hd-h { margin: 0; }
  .hd-more { min-height: 44px; padding: 6px 4px; border: 0; background: none; color: var(--sk-primary-700); font-size: .92rem; font-weight: 800; cursor: pointer; white-space: nowrap; }
  .hd-chev { margin-left: auto; padding-left: 6px; color: #8A9BB4; font-size: 1.6rem; font-weight: 700; line-height: 1; }
  .hd-bar { position: relative; display: block; height: 14px; border-radius: 999px; background: #E3ECF7; overflow: hidden; }
  .hd-bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(180deg, #4ADE80, #16A34A); }
  .hd-bar > em { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-style: normal; font-size: .74rem; font-weight: 900; color: #0F3D24; }
  .hd-prog { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
  .hd-prog .hd-bar { flex: 1; height: 10px; }
  .hd-prog .hd-bar > span { background: linear-gradient(180deg, #4DA8FF, var(--hd-blue)); }
  .hd-prog em { min-width: 36px; font-style: normal; font-size: .82rem; font-weight: 900; color: var(--sk-ink); text-align: right; }
  .hd-play {
    flex: none; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding-left: 3px; border-radius: 50%;
    background: var(--hd-blue) linear-gradient(180deg, #2E9BFF, var(--hd-blue)); color: #fff; font-size: 1rem; box-shadow: 0 4px 10px -4px rgba(21, 114, 232, .8);
  }
  .hd-empty { margin: 0; color: var(--sk-text); font-weight: 700; }

  /* Nhiệm vụ hôm nay */
  .hd-quests { background: linear-gradient(180deg, #FFF4D2 0%, #FFFCF2 34%, #fff 100%); }
  .hd-qhead { display: flex; align-items: flex-start; gap: 10px; }
  .hd-qic { flex: none; width: 64px; height: 64px; margin-top: -2px; }
  .hd-qtt { flex: 1; min-width: 0; }
  .hd-ribbon {
    display: inline-block; margin: 2px 0 6px -4px; padding: 6px 22px 7px 14px; border-radius: 10px 999px 999px 10px;
    background: linear-gradient(180deg, #FFE066, #FFC21A); box-shadow: 0 3px 0 #E0A000; color: #0E2A5C; font-family: var(--font-display); font-size: 1.3rem; font-weight: 900; white-space: nowrap;
  }
  .hd-qtt p { margin: 0; color: var(--sk-text); font-size: .92rem; font-weight: 700; }
  .hd-gift { flex: none; width: 96px; height: 96px; margin: -8px -4px -8px 0; padding: 0; border: 0; background: none; cursor: pointer; transition: transform .15s; }
  .hd-gift:hover { transform: rotate(-6deg) scale(1.05); }
  .hd-today { display: flex; align-items: center; gap: 14px; margin: 12px 0; padding: 12px 14px; background: #fff; border-radius: 18px; box-shadow: var(--sk-sh-1); }
  .hd-today-tx { flex: 1; min-width: 0; }
  .hd-today-tx b { display: block; margin-bottom: 6px; color: var(--sk-ink); }
  .hd-today .hd-bar { height: 22px; }
  .hd-today .hd-bar > em { font-size: .9rem; }
  .hd-stars { display: flex; gap: 4px; }
  .hd-star { display: inline-block; width: 40px; height: 40px; }
  .hd-qlist { display: flex; flex-direction: column; gap: 10px; }
  .hd-q { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: #fff; border: 2px solid #EEF3FA; border-radius: 18px; }
  .hd-q-ic { flex: none; display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 14px; background: #EAF3FF; font-size: 1.7rem; }
  .hd-q.ok .hd-q-ic { background: #E7F8EC; }
  .hd-q-tx { flex: 1; min-width: 0; }
  .hd-q-tx b { display: block; margin-bottom: 6px; color: var(--sk-ink); font-size: .98rem; font-weight: 800; line-height: 1.3; }
  .hd-btn {
    flex: none; min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--hd-blue) linear-gradient(180deg, #2E9BFF, var(--hd-blue));
    color: #fff; font-size: .95rem; font-weight: 900; white-space: nowrap; cursor: pointer; box-shadow: 0 4px 0 #0F5BC4;
  }
  .hd-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #0F5BC4; }
  .hd-done { flex: none; padding: 9px 14px; border: 2px solid #86EFAC; border-radius: 999px; background: #E7F8EC; color: #166534; font-size: .92rem; font-weight: 900; white-space: nowrap; }
  .hd-cta { display: block; width: 100%; min-height: 50px; margin-top: 12px; border: 0; border-radius: 999px; background: var(--sk-cta); color: #fff; font-size: 1.1rem; font-weight: 900; cursor: pointer; box-shadow: var(--sk-cta-sh); }
  .hd-chest { margin: 12px 0 0; color: #166534; font-weight: 800; text-align: center; }

  /* Học tiếp */
  .hd-lesson { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border: 2px solid #EEF3FA; border-radius: 18px; background: #fff; text-align: left; cursor: pointer; }
  .hd-lesson:hover { border-color: var(--sk-primary-200); }
  .hd-lesson-ic { flex: none; display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 16px; background: color-mix(in srgb, var(--sc) 16%, #fff); font-size: 1.8rem; }
  .hd-lesson-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
  .hd-lesson-tx b { color: var(--sk-ink); font-size: 1.02rem; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hd-lesson-tx small { color: var(--sk-muted); font-size: .84rem; font-weight: 700; }

  /* Khám phá nhanh: 4 ô trên + 3 ô dưới */
  .hd-tiles { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 10px; }
  .hd-tile {
    grid-column: span 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 104px; padding: 10px 4px; border: 0; border-radius: 18px;
    background: color-mix(in srgb, var(--tc) 14%, #fff); box-shadow: inset 0 -3px 0 color-mix(in srgb, var(--tc) 22%, transparent);
    color: color-mix(in srgb, var(--tc) 55%, #0B1B3A); font-family: var(--font-display); font-size: .98rem; font-weight: 900; cursor: pointer; transition: transform .15s;
  }
  .hd-tile:nth-child(n+5) { grid-column: span 4; }
  .hd-tile:hover { transform: translateY(-2px); }
  .hd-tile-ic { display: flex; align-items: center; justify-content: center; width: 58px; height: 58px; font-size: 2.2rem; }
  .hd-ava { font-size: 2.4rem; }

  /* Tiến trình (vòng %), Thành tích, Sự kiện */
  .hd-ringrow, .hd-stats { display: flex; align-items: center; gap: 14px; width: 100%; padding: 4px; border: 0; border-radius: 16px; background: none; text-align: left; cursor: pointer; }
  .hd-ring { position: relative; flex: none; display: grid; place-items: center; width: 92px; height: 92px; border-radius: 50%; background: conic-gradient(#22C55E calc(var(--p) * 1%), #E3ECF7 0); }
  .hd-ring::before { content: ''; position: absolute; inset: 11px; border-radius: 50%; background: #fff; }
  .hd-ring b { position: relative; color: #15803D; font-family: var(--font-display); font-size: 1.35rem; font-weight: 900; }
  .hd-ring-tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .hd-ring-tx b { color: var(--sk-ink); font-weight: 900; }
  .hd-ring-tx small { color: var(--sk-muted); font-weight: 700; }
  .hd-stats { gap: 10px; }
  .hd-stat { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; padding: 10px; border-radius: 16px; background: #F3F8FF; }
  .hd-stat-ic { flex: none; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; font-size: 1.8rem; }
  .hd-stat b { display: block; color: var(--sk-ink); font-family: var(--font-display); font-size: 1.3rem; font-weight: 900; line-height: 1.1; }
  .hd-stat small { color: var(--sk-muted); font-size: .8rem; font-weight: 700; white-space: nowrap; }
  .hd-evlist { display: flex; flex-direction: column; gap: 8px; }
  .hd-ev { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 8px 10px; border: 0; border-radius: 14px; background: #F3F8FF; text-align: left; cursor: pointer; }
  .hd-ev:hover { background: var(--sk-primary-50); }
  .hd-ev-ic { flex: none; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: #fff; font-size: 1.3rem; }
  .hd-ev-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .hd-ev-tx b { color: var(--sk-ink); font-size: .92rem; font-weight: 900; }
  .hd-ev-tx small { color: var(--sk-muted); font-size: .78rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  /* Học theo môn */
  .hd-subjects { margin-top: 16px; }
  .hd-subjlist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .hd-subj { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px; border: 0; border-radius: 18px; background: color-mix(in srgb, var(--sc) 10%, #fff); text-align: left; cursor: pointer; }
  .hd-subj:hover { background: color-mix(in srgb, var(--sc) 16%, #fff); }
  .hd-subj-ic { flex: none; display: flex; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 16px; background: #fff; box-shadow: var(--sk-sh-1); font-size: 1.8rem; }
  .hd-subj-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .hd-subj-tx b { color: var(--sk-ink); font-size: 1.05rem; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hd-subj-tx small { color: var(--sk-muted); font-size: .84rem; font-weight: 700; }

  /* Video nổi bật + Trò chơi trí não */
  .hd-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 16px; }
  .hd-vlist, .hd-glist { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .hd-video { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
  .hd-thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #E3ECF7; box-shadow: var(--sk-sh-1); }
  .hd-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
  .hd-vic { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-size: 2.6rem; }
  .hd-thumb em { position: absolute; right: 6px; bottom: 6px; padding: 2px 7px; border-radius: 8px; background: rgba(15, 23, 42, .8); color: #fff; font-size: .74rem; font-style: normal; font-weight: 800; }
  .hd-video b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--sk-ink); font-size: .9rem; font-weight: 900; line-height: 1.3; }
  .hd-video small { color: var(--sk-muted); font-size: .76rem; font-weight: 700; }
  .hd-game { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; padding: 10px; border: 0; border-radius: 16px; background: #fff; box-shadow: var(--sk-sh-1); text-align: left; cursor: pointer; }
  .hd-game-ic {
    display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 16 / 10; border-radius: 12px; font-size: 2.8rem;
    background: linear-gradient(160deg, color-mix(in srgb, var(--gc) 18%, #fff), color-mix(in srgb, var(--gc) 36%, #fff));
  }
  .hd-game b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--sk-ink); font-size: .92rem; font-weight: 900; line-height: 1.3; }
  /* nút ▶ nằm trong khung hình, góc dưới phải - tên trò có đủ chỗ */
  .hd-game-ic { position: relative; }
  .hd-game .hd-play { position: absolute; right: 8px; bottom: 8px; width: 34px; height: 34px; font-size: .8rem; }
  #home-view #daily-path-box { margin-top: 16px; }
}
/* iPad ngang (1024-1279): menu trái thu thành dải 96px, chữ dưới biểu tượng - nhường chỗ cho nội dung */
@media (min-width: 1024px) and (max-width: 1279px) {
  :root { --side-w: 96px; }
  .ss-panel { padding: 10px 6px; }
  .ss-item { flex-direction: column; justify-content: center; gap: 3px; min-height: 66px; padding: 6px 2px; font-size: .78rem; line-height: 1.15; text-align: center; }
  .ss-badge { left: auto; right: 12px; top: 2px; }
  .ss-lion { display: none; }
  .hd-gift { width: 80px; height: 80px; }
  .hd-game-ic { aspect-ratio: 2 / 1; }
}
/* máy tính: menu trái rộng hơn chút cho chữ "Nhiệm vụ hôm nay" một dòng; môn học 4 ô một hàng; video | trò chơi cạnh nhau */
@media (min-width: 1280px) {
  :root { --side-w: 226px; }
  .ss-item { font-size: 1rem; }
  .hd-subjlist { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hd-row { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); }
}
/* màn rộng như hình gốc: 3 cột (nhiệm vụ | học tiếp + khám phá | tiến trình + thành tích + sự kiện) */
@media (min-width: 1600px) {
  .hd-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, .95fr); grid-template-rows: auto auto 1fr; grid-template-areas: "q n p" "q e a" "q e v"; }
}
/* màn thấp: bỏ sư tử dưới menu cho menu khỏi bị cắt */
@media (min-width: 1024px) and (max-height: 760px) { .ss-lion { display: none; } }
@media (prefers-reduced-motion: reduce) { .hd-tile, .hd-gift, .ss-item { transition: none !important; } }


/* ===== css/theme/hub-pages.css ===== */
/* =====================================================================
 * Sam Kido v164 - trang nhóm (Học, Luyện thi, Trí não, Vui chơi, Của bé) theo bản demo người dùng chọn 2026-11-15:
 *   máy tính (>= 1024px) = phương án A "ô trò chơi to": dải màu đầu trang + nút mục (có "Tất cả"), thẻ phòng "tan" thành lưới ô trò
 *   điện thoại + iPad dọc (< 1024px) = phương án C "danh sách gọn": sư tử giữa trên khung trắng, tab mục, mỗi phòng một khung,
 *   mỗi trò một hàng có mũi tên (iPad dọc 2 cột).
 * Cùng MỘT bộ HTML (homeHubs.render) - chỉ khác CSS, nên test / bấm trò dùng chung. Nạp SAU dash.css.
 * ===================================================================== */
/* tên nhóm đã nằm trong khung đầu trang -> ẩn tiêu đề trùng ở thanh quay lại (vẫn đọc được cho trình đọc màn hình) */
:is(#hub-view, #video-view) .view-heading { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:is(#hub-view, #video-view) .hub-hero-t { margin: 0; font-family: var(--font-display); font-weight: 900; }
#hub-view .hc-room { display: none; font-style: normal; }

/* ===================== MÁY TÍNH: A - ô trò chơi to ===================== */
@media (min-width: 1024px) {
  :is(#hub-view, #video-view) .hub-hero {
    position: relative; min-height: 150px; padding: 24px 230px 24px 30px; border: 0; border-radius: 30px; overflow: hidden; color: #fff;
    background: var(--hd) linear-gradient(135deg, var(--hg), var(--hd)); box-shadow: 0 12px 26px -12px rgba(0, 0, 0, .35);
  }
  :is(#hub-view, #video-view) .hub-hero::before { content: ''; position: absolute; right: 150px; top: -70px; width: 230px; height: 230px; border-radius: 50%; background: rgba(255, 255, 255, .13); }
  :is(#hub-view, #video-view) .hub-hero-tx { position: relative; }
  :is(#hub-view, #video-view) .hub-hero-t { font-size: 2.1rem; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .14); }
  :is(#hub-view, #video-view) .hub-hero .hub-sub { margin: 6px 0 0; color: #fff; font-size: 1.05rem; font-weight: 800; text-shadow: 0 1px 0 rgba(0, 0, 0, .12); }
  :is(#hub-view, #video-view) .hub-hero-lion { right: 34px; bottom: -6px; width: 168px; height: 180px; }
  /* nút mục: một hàng viên, có "Tất cả" */
  #hub-view .hub2 { display: block; }
  #hub-view .hub2-nav { position: static; flex-direction: row; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; background: none; border: 0; box-shadow: none; }
  #hub-view .hub2-nav button { flex: none; width: auto; min-height: 46px; padding: 0 18px; border: 0; border-radius: 999px; background: #fff; color: var(--sk-ink); font-weight: 800; box-shadow: var(--sk-sh-1); }
  #hub-view .hub2-nav button:hover { background: var(--sk-primary-50); }
  #hub-view .hub2-nav button.active { background: #1265D8; color: #fff; }
  #hub-view .hub2-nav .hn-n { display: none; }
  #hub-view .hub2-nav [data-sec="other"] { margin: 0; border: 0; border-radius: 999px; padding-top: 0; color: var(--sk-muted); }
  /* mỗi mục = tiêu đề + lưới ô; thẻ phòng "tan" ra (display: contents) để ô trò của mọi phòng chung một lưới */
  #hub-view .hub2-main { display: flex; flex-direction: column; gap: 8px; }
  #hub-view .hub2-panel { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 12px; margin-top: 14px; }
  #hub-view .hub2-h { grid-column: 1 / -1; margin: 6px 4px 0; font-size: 1.3rem; font-weight: 900; }
  #hub-view .hub2-panel:not(.hub-other) .hub-card { display: contents; }
  #hub-view .hub2-panel:not(.hub-other) .hub-card.has-subs:not(.keep-main) > .hc-main { display: none; }
  #hub-view .hub2-panel .hc-subs { display: contents; }
  /* ô trò (và ô phòng: phòng không có trò con, Lộ trình học / Luyện thi, phòng "tuổi khác") */
  #hub-view .hub2-panel .hc-sub,
  #hub-view .hub2-panel .hub-card > .hc-main,
  #hub-view .hub-other .hub-card {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px; min-height: 0; padding: 10px 6px 11px;
    border: 0; border-radius: 24px; background: var(--pb, #F3F8FF); color: var(--sk-ink); font-family: inherit; text-align: center; cursor: pointer;
    box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .06), 0 6px 14px -8px rgba(20, 60, 120, .25); transition: transform .15s, box-shadow .15s; overflow: visible;
  }
  #hub-view .hub-other .hub-card > .hc-main { min-height: 0; padding: 0; background: none; box-shadow: none; }
  #hub-view .hub-other .hub-card .hc-subs { display: none; }
  #hub-view .hub2-panel .hc-sub:hover, #hub-view .hub2-panel .hub-card > .hc-main:hover, #hub-view .hub-other .hub-card:hover { transform: translateY(-3px); background: var(--pb, #F3F8FF); }
  #hub-view .hub2-panel .hc-sub > span:first-child, #hub-view .hub2-panel .hc-main > .hc-ic {
    flex: none; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; background: #fff; font-size: 1.6rem; box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .2);
  }
  #hub-view .hub2-panel .hc-sub .hc-sub-t { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: .94rem; font-weight: 900; line-height: 1.25; color: var(--sk-ink); }
  #hub-view .hc-room, #hub-view .hub2-panel .hc-subj .hc-sub-t small {
    display: inline-block; padding: 2px 9px; border-radius: 999px; background: rgba(255, 255, 255, .8); color: var(--pf, var(--sk-primary-700)); font-size: .72rem; font-weight: 800;
  }
  #hub-view .hub2-panel .hc-main .hc-tx { display: flex; flex-direction: column; align-items: center; gap: 6px; }
  #hub-view .hub2-panel .hc-main .hc-tx b { justify-content: center; font-size: .94rem; font-weight: 900; }
  #hub-view .hub2-panel .hc-main .hc-tx small { display: none; } /* gọn ô (người dùng 2026-11-15): mô tả phòng dài làm ô cao lệch */
  #hub-view .hub2-panel .hc-main .hc-go { display: none; }
  #hub-view .hub-card.keep-main > .hc-main { outline: 3px solid rgba(255, 255, 255, .9); outline-offset: -3px; }
  #hub-view .hub-card.hub-focus .hc-sub, #hub-view .hub-card.hub-focus > .hc-main { box-shadow: 0 0 0 4px var(--sk-primary), 0 6px 14px -8px rgba(20, 60, 120, .25); }
  #hub-view .hub-other .hub2-h small { font-size: .88rem; }
}

/* ===================== ĐIỆN THOẠI + iPAD DỌC: C - danh sách gọn ===================== */
@media (max-width: 1023px) {
  #hub-view .hub2-nav [data-sec="all"] { display: none; }
  /* khung đầu: sư tử ở giữa phía trên, tên nhóm + mô tả trong khung trắng */
  :is(#hub-view, #video-view) .hub-hero {
    position: relative; display: flex; flex-direction: column; align-items: center; min-height: 0; margin-top: 70px; padding: 0 16px 16px; border: 0; border-radius: 26px;
    background: #fff; box-shadow: var(--sk-sh-2); text-align: center; overflow: visible;
  }
  :is(#hub-view, #video-view) .hub-hero::before, :is(#hub-view, #video-view) .hub-hero::after { display: none; }
  :is(#hub-view, #video-view) .hub-hero-lion { position: static; order: -1; width: 118px; height: 128px; margin: -74px auto 2px; }
  :is(#hub-view, #video-view) .hub-hero-tx { width: 100%; }
  :is(#hub-view, #video-view) .hub-hero-t { font-size: 1.45rem; color: var(--sk-ink); }
  :is(#hub-view, #video-view) .hub-hero .hub-sub { margin: 2px 0 0; color: var(--sk-muted); font-size: .92rem; font-weight: 800; text-align: center; }
  /* tab mục: lưới viên 2 cột */
  #hub-view .hub2 { display: block; }
  #hub-view .hub2-nav { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 0 0; padding: 0; background: none; border: 0; box-shadow: none; overflow: visible; }
  #hub-view .hub2-nav button { width: auto; min-height: 46px; padding: 6px 10px; justify-content: center; border: 0; border-radius: 999px; background: #fff; color: var(--sk-ink); font-size: .88rem; font-weight: 800; box-shadow: var(--sk-sh-1); }
  #hub-view .hub2-nav button.active { background: #1265D8; color: #fff; }
  #hub-view .hub2-nav .hn-n { display: none; }
  #hub-view .hub2-nav [data-sec="other"] { margin: 0; border: 0; border-radius: 999px; padding-top: 6px; color: var(--sk-muted); }
  #hub-view .hub2-main { margin-top: 6px; }
  #hub-view .hub2-panel { gap: 12px; margin-top: 10px; }
  /* mỗi phòng = khung trắng: đầu phòng + các hàng trò (hàng chẵn nền nhạt, mũi tên) */
  #hub-view .hub-card { border: 0; border-radius: 24px; background: #fff; box-shadow: var(--sk-sh-2); overflow: hidden; }
  #hub-view .hub-card .hc-main { position: relative; padding: 14px 42px 12px 14px; gap: 12px; }
  #hub-view .hub-card .hc-ic { width: 54px; height: 54px; border-radius: 16px; background: var(--pb, var(--sk-primary-50)); font-size: 1.9rem; }
  #hub-view .hub-card .hc-go { display: none; }
  #hub-view .hc-subs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 6px 10px 12px; border-top: 2px solid #EEF3FA; }
  #hub-view .hc-sub {
    position: relative; min-height: 58px; padding: 6px 42px 6px 8px; gap: 12px; border: 0; border-radius: 16px; background: transparent; box-shadow: none;
    font-size: 1rem !important; font-weight: 800; color: var(--sk-ink);
  }
  #hub-view .hc-sub:nth-child(even) { background: #F5F9FE; }
  #hub-view .hc-sub > span:first-child { width: 42px; height: 42px; border-radius: 13px; background: var(--pb, var(--sk-primary-50)); font-size: 1.4rem; box-shadow: none; }
  #hub-view .hc-subj > span:first-child { background: color-mix(in srgb, var(--sc) 14%, #fff); }
  #hub-view .hc-sub::after, #hub-view .hub-card .hc-main::after {
    content: ''; position: absolute; right: 18px; top: 50%; width: 9px; height: 9px; margin-top: -5px;
    border-top: 3px solid var(--sk-primary-700); border-right: 3px solid var(--sk-primary-700); border-radius: 2px; transform: rotate(45deg); pointer-events: none;
  }
}
/* iPad dọc: các khung phòng xếp 2 cột */
@media (min-width: 641px) and (max-width: 1023px) {
  #hub-view .hub2-nav { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  #hub-view .hub2-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  #hub-view .hub2-h { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { #hub-view .hub2-panel .hc-sub, #hub-view .hub2-panel .hub-card > .hc-main { transition: none; } }
/* nhóm Của bé: hộp Thú cưng / Hành trình / Gia đình nằm dưới khung đầu trang */
#hub-view .hub-wrap > .hub-be-boxes { margin-top: 14px; }

/* v166: phòng Video dùng chung khung đầu trang (vl-hero) - cách lề dưới trước thanh khoá / danh sách */
#video-view .vl-hero { margin-bottom: 14px; }

/* v167: biểu tượng 3D (Fluent Emoji / hình AI, SKArt.emoji) thay emoji phẳng - cỡ theo ô chứa */
.sk-e3d { display: inline-block; width: 1.2em; height: 1.2em; object-fit: contain; vertical-align: -.2em; -webkit-user-drag: none; user-select: none; }
#hub-view .hc-sub > span:first-child .sk-e3d, #hub-view .hc-ic .sk-e3d { width: 74%; height: 74%; vertical-align: middle; }
#hub-view .hn-ic .sk-e3d { width: 26px; height: 26px; vertical-align: middle; }
#hub-view .hub2-h .sk-e3d { width: 1.3em; height: 1.3em; }
#hub-view .hub-hero-t .sk-e3d { width: 1.15em; height: 1.15em; vertical-align: -.16em; }
/* tiêu đề mục: hình 3D + chữ cùng một hàng (theme.css đặt cột cho dòng mô tả "tuổi khác" -> mô tả xuống dòng riêng) */
#hub-view .hub2-h { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
#hub-view .hub2-h small { flex-basis: 100%; }
/* v168: nhóm chỉ còn MỘT mục (Của bé sau khi gộp) -> bỏ hàng nút mục + tiêu đề mục thừa (có "tuổi khác" thì vẫn hiện) */
#hub-view .hub2.one-sec .hub2-nav, #hub-view .hub2.one-sec .hub2-h { display: none; }

/* =====================================================================
 * v170: LUYỆN THI TRÊN TRANG CHỦ (homeHubs.examBoxHtml) - phần cốt lõi, sau này trả phí (người dùng 2026-11-15)
 * máy tính: thẻ đầu bảng điều khiển (.hd-exam); điện thoại / iPad dọc: dưới thẻ Nhiệm vụ (#home-exam-box)
 * nền tím đặt cả background-color tối để chữ trắng đủ tương phản
 * ===================================================================== */
.home-exam, #home-view .hd-card.hd-exam {
  position: relative; overflow: hidden; padding: 16px; border-radius: 26px; color: #fff;
  background: #4C1D95 linear-gradient(135deg, #7C3AED, #4C1D95); box-shadow: 0 12px 24px -12px rgba(76, 29, 149, .6);
}
.home-exam::before, .hd-exam::before { content: ''; position: absolute; right: -40px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: rgba(255, 255, 255, .1); pointer-events: none; }
.hx-head { position: relative; display: flex; align-items: center; gap: 12px; }
.hx-trophy { flex: none; width: 58px; height: 58px; }
.hx-trophy .sk-art { width: 100%; height: 100%; }
.hx-tt { min-width: 0; }
.hx-tt h2 { margin: 0; color: #fff; font-family: var(--font-display); font-size: 1.4rem; font-weight: 900; }
.hx-tt p { margin: 2px 0 0; color: #EFE9FF; font-size: .88rem; font-weight: 800; }
.hx-all { margin-left: auto; flex: none; min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: #fff; color: #4C1D95; font-family: inherit; font-weight: 900; cursor: pointer; box-shadow: 0 3px 0 rgba(0, 0, 0, .15); }
.hx-grid { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.hx-ex { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; padding: 12px 6px 10px; border: 0; border-radius: 18px; background: #fff; color: var(--sk-ink); font-family: inherit; cursor: pointer; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .08); transition: transform .15s; }
.hx-ex:hover { transform: translateY(-2px); }
.hx-ex.off { opacity: .72; }
.hx-ic { display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; font-size: 1.8rem; }
.hx-ic .sk-e3d { width: 100%; height: 100%; }
.hx-ex b { font-size: .92rem; font-weight: 900; line-height: 1.2; text-align: center; }
.hx-ex small { color: var(--sk-muted); font-size: .72rem; font-weight: 800; }
.hx-daily { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 54px; margin-top: 12px; padding: 8px 14px; border: 0; border-radius: 16px; background: rgba(255, 255, 255, .16); color: #fff; font-family: inherit; text-align: left; cursor: pointer; }
.hx-daily:hover { background: rgba(255, 255, 255, .24); }
.hx-dic { flex: none; display: flex; width: 34px; height: 34px; font-size: 1.5rem; align-items: center; justify-content: center; }
.hx-dic .sk-e3d { width: 100%; height: 100%; }
.hx-dtx { min-width: 0; }
.hx-dtx b { display: block; font-size: .95rem; font-weight: 900; }
.hx-dtx small { color: #EFE9FF; font-size: .8rem; font-weight: 700; }
.hx-daily i { margin-left: auto; font-size: 1.7rem; font-style: normal; line-height: 1; }
@media (min-width: 1024px) {
  #home-exam-box { display: none; }
  #home-view .hd-card.hd-exam { margin: 0 0 16px; padding: 18px 22px; }
}
@media (max-width: 1023px) {
  #home-exam-box { margin-top: 14px; }
  .hx-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
  .hx-ex { padding: 10px 4px 8px; }
  .hx-ic { width: 40px; height: 40px; }
}
@media (max-width: 420px) {
  .hx-trophy { width: 48px; height: 48px; }
  .hx-tt h2 { font-size: 1.2rem; }
  .hx-tt p { font-size: .8rem; }
  .hx-all { padding: 0 12px; font-size: .82rem; }
}
@media (prefers-reduced-motion: reduce) { .hx-ex { transition: none; } }
/* điện thoại: tên + nút cùng hàng, dòng phụ xuống hàng riêng (trước bị nút ép thành 3-5 dòng ở 320-390px); ô kỳ thi gọn hơn */
@media (max-width: 640px) {
  .hx-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "ic tt bt" "p p p"; align-items: center; column-gap: 10px; row-gap: 6px; }
  .hx-trophy { grid-area: ic; width: 44px; height: 44px; }
  .hx-tt { display: contents; }
  .hx-tt h2 { grid-area: tt; font-size: 1.25rem; }
  .hx-tt p { grid-area: p; margin: 0; font-size: .82rem; }
  .hx-all { grid-area: bt; min-height: 40px; padding: 0 12px; font-size: .82rem; }
  .hx-ex { padding: 8px 4px 7px; gap: 2px; border-radius: 16px; }
  .hx-ic { width: 34px; height: 34px; }
  .hx-ex b { font-size: .84rem; white-space: nowrap; }
  .hx-daily { margin-top: 10px; min-height: 50px; }
  .hx-dtx b { font-size: .88rem; }
  .hx-dtx small { font-size: .76rem; }
}
.hx-all-s { display: none; }
@media (max-width: 640px) { .hx-all-l { display: none; } .hx-all-s { display: inline; } }

