:root {
  --blue: #0c67d8;
  --deep-blue: #064dba;
  --sky: #49c7ff;
  --green: #22a766;
  --orange: #ff8a18;
  --yellow: #ffc934;
  --pink: #f54f95;
  --ink: #07376f;
  --text: #263b5c;
  --muted: #5b708e;
  --paper: #fffdf5;
  --surface: #ffffff;
  --line: #cfe8fb;
  --shadow: 0 12px 28px rgba(20, 98, 166, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body.chanhlo-custom-theme {
  margin: 0;
  color: var(--text);
  background: var(--paper);
  font-family: "Nunito", Arial, sans-serif;
  font-weight: 700;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 74px;
  height: 74px;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #d8edff;
  box-shadow: 0 4px 16px rgba(18, 84, 154, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.28s ease;
}

.brand,
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark,
.footer-brand img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.brand strong {
  display: block;
  color: var(--blue);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.05;
}

.brand small {
  display: block;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 900;
}

/* Main Navigation with Stacked SVG Icons */
.site-header .nav {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  margin: 0;
  padding: 0;
}

.nav-menu {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(10px, 1.8vw, 32px);
  margin: 0;
  padding: 0;
  list-style: none;
  height: 100%;
}

.nav-menu > li {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-menu > li > a {
  display: flex;
  align-items: center;
  height: 100%;
  text-decoration: none;
  color: #1e293b;
  font-size: 14px;
  font-weight: 900;
}

.menu-item-inner {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 12px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: #1e293b;
  transition: transform 0.2s ease, color 0.2s ease;
}

.menu-icon svg {
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
}

.menu-label {
  font-size: 13.5px;
  font-weight: 900;
  color: #1e293b;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.nav-menu a:hover .menu-item-inner,
.nav-menu .current-menu-item > a .menu-item-inner {
  background: rgba(12, 103, 216, 0.06);
}

.nav-menu a:hover .menu-icon,
.nav-menu .current-menu-item > a .menu-icon {
  color: var(--blue);
  transform: translateY(-2px);
}

.nav-menu a:hover .menu-label,
.nav-menu .current-menu-item > a .menu-label {
  color: var(--blue);
}

/* Submenu Dropdown */
.nav-menu .sub-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  z-index: 60;
  display: grid;
  min-width: 230px;
  margin: 0;
  padding: 8px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(7, 55, 111, 0.14);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.nav-menu .sub-menu::before {
  position: absolute;
  top: -8px;
  right: 0;
  left: 0;
  height: 8px;
  content: "";
}

.nav-menu li:hover > .sub-menu,
.nav-menu li:focus-within > .sub-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.nav-menu .sub-menu a {
  justify-content: flex-start;
  min-height: 38px;
  padding: 6px 12px;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 800;
  border-radius: 8px;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-menu .sub-menu a:hover {
  background: #f0f7ff;
  color: var(--blue);
}

.header-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  height: 100%;
}

.icon-button,
.mobile-toggle {
  border: 0;
  cursor: pointer;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  margin: 0;
  color: var(--ink);
  background: #f0f7ff;
  border: 1px solid #d4ebfd;
  border-radius: 50%;
  box-sizing: border-box;
  vertical-align: middle;
  transition: all 0.2s ease;
}

.icon-button:hover {
  background: #e2f1fd;
  color: var(--blue);
  transform: scale(1.05);
}

.icon-button svg {
  width: 19px;
  height: 19px;
  display: block;
}

.header-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  background: var(--yellow);
  color: #78350f;
  font-size: 13.5px;
  font-weight: 900;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(255, 201, 52, 0.35);
  transition: all 0.2s ease;
}

.header-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 201, 52, 0.45);
}

.login-button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  height: 40px;
  padding: 0 18px;
  color: #fff;
  background: var(--blue);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
  box-shadow: 0 6px 16px rgba(12, 103, 216, 0.2);
  transition: all 0.2s ease;
}

.login-button:hover {
  background: var(--deep-blue);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(12, 103, 216, 0.28);
}

.login-icon svg {
  width: 18px;
  height: 18px;
}

/* User Logged In Menu Wrapper */
.user-menu-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  margin: 0;
  padding: 0;
  vertical-align: middle;
}

.account-button,
.account-button.user-avatar-button {
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 50%;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
  vertical-align: middle;
  transition: transform 0.2s ease;
}

.user-avatar-wrap {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-sizing: border-box;
  box-shadow: 0 2px 8px rgba(12, 103, 216, 0.16);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.account-button:hover .user-avatar-wrap {
  transform: scale(1.06);
  box-shadow: 0 0 0 3.5px rgba(12, 103, 216, 0.22), 0 4px 12px rgba(12, 103, 216, 0.2);
}

.chanhlo-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: block;
}

.user-dropdown-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 105;
  min-width: 240px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 16px 36px rgba(7, 55, 111, 0.16);
  padding: 8px;
  animation: panelFadeIn 0.2s ease;
}

.user-dropdown-header {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.user-dropdown-header strong {
  display: block;
  font-size: 14px;
  font-weight: 900;
  color: var(--ink);
}

.user-dropdown-header small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.user-dropdown-links {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
}

.user-dropdown-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text);
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.user-dropdown-links a:hover {
  background: #f0f7ff;
  color: var(--blue);
}

.user-dropdown-links .logout-link:hover {
  background: #fff1f2;
  color: #e11d48;
}

.dropdown-divider {
  height: 1px;
  background: var(--line);
  margin: 6px 0;
}

.mobile-toggle {
  display: none;
}

/* Enhanced Search Panel */
.site-search-panel-wrapper {
  position: absolute;
  top: calc(100% + 10px);
  right: 20px;
  z-index: 105;
  width: min(480px, calc(100vw - 32px));
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 20px 48px rgba(7, 55, 111, 0.18);
  padding: 18px;
  animation: panelFadeIn 0.2s ease;
}

.search-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.search-panel-header strong {
  font-size: 14px;
  font-weight: 900;
  color: var(--deep-blue);
}

.panel-close-btn {
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: all 0.15s ease;
}

.panel-close-btn:hover {
  background: #f1f5f9;
  color: var(--ink);
}

.panel-close-btn svg {
  width: 18px;
  height: 18px;
}

.search-input-group {
  display: flex;
  align-items: center;
  background: #f8fcff;
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 4px 6px 4px 14px;
  gap: 8px;
  transition: border-color 0.2s ease;
}

.search-input-group:focus-within {
  border-color: var(--blue);
  background: #ffffff;
}

.search-group-icon svg {
  width: 20px;
  height: 20px;
  color: var(--muted);
}

.search-input-group input {
  flex: 1;
  border: 0;
  background: transparent;
  min-height: 38px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  outline: none;
}

.search-submit-btn {
  background: var(--blue);
  color: #fff;
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  font-size: 13px;
  padding: 8px 18px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.search-submit-btn:hover {
  background: var(--deep-blue);
}

.search-scope-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  font-size: 12.5px;
}

.scope-label {
  font-weight: 800;
  color: var(--muted);
  margin-right: 4px;
}

.scope-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
  transition: all 0.15s ease;
}

.scope-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.scope-chip.is-active,
.scope-chip:has(input:checked) {
  background: var(--blue);
  color: #ffffff;
}

/* Login Options Popover */
.login-options-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 20px;
  z-index: 105;
  width: min(360px, calc(100vw - 32px));
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 20px 48px rgba(7, 55, 111, 0.18);
  animation: panelFadeIn 0.2s ease;
}

.login-options-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.login-options-head strong {
  font-size: 16px;
  font-weight: 900;
  color: var(--deep-blue);
}

/* Role Switch Tabs */
.login-role-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #f0f7fd;
  padding: 4px;
  border-radius: 12px;
  gap: 4px;
  margin-bottom: 16px;
}

.role-switch-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 6px;
  border: 0;
  background: transparent;
  border-radius: 9px;
  cursor: pointer;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.role-switch-tab span {
  font-size: 15px;
}

.role-switch-tab.is-active {
  background: #ffffff;
  color: var(--blue);
  box-shadow: 0 2px 8px rgba(12, 103, 216, 0.14);
}

/* Direct Login Form */
.login-direct-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-input-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-input-group label {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--ink);
}

.form-input-group input {
  height: 40px;
  padding: 0 12px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input-group input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(12, 103, 216, 0.12);
}

.input-label-split {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.forgot-link {
  font-size: 12px;
  color: var(--blue);
  text-decoration: none;
  font-weight: 800;
}

.forgot-link:hover {
  text-decoration: underline;
}

.form-check-group {
  display: flex;
  align-items: center;
  font-size: 12.5px;
  color: var(--muted);
}

.remember-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.login-action-btn {
  height: 42px;
  background: linear-gradient(135deg, var(--blue), var(--deep-blue));
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(12, 103, 216, 0.25);
  transition: all 0.2s ease;
}

.login-action-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

/* Social Login Divider */
.login-social-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: #94a3b8;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  margin: 14px 0 10px;
}

.login-social-divider::before,
.login-social-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e2e8f0;
}

.login-social-divider span {
  padding: 0 10px;
}

.google-auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 40px;
  border: 1.5px solid #dadce0;
  border-radius: 10px;
  background: #ffffff;
  color: #3c4043;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 800;
  transition: background-color 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.google-auth-btn:hover {
  background-color: #f8fafd;
  border-color: #c2c7d0;
  box-shadow: 0 2px 6px rgba(60, 64, 67, 0.08);
}

.google-icon {
  width: 18px;
  height: 18px;
}

/* Avatar Circle & User Menu */
.user-avatar-wrap {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(12, 103, 216, 0.15);
  transition: transform 0.2s ease;
}

.account-button:hover .user-avatar-wrap {
  transform: scale(1.06);
}

.chanhlo-user-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: block;
}

.user-dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.user-dropdown-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.user-dropdown-info strong {
  display: block;
  font-size: 14px;
  font-weight: 900;
  color: var(--ink);
  line-height: 1.2;
}

.user-dropdown-info small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
}

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

.hero {
  position: relative;
  overflow: hidden;
  background: #81dcff;
}

.hero::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  z-index: 4;
  height: 18px;
  content: "";
  background: linear-gradient(180deg, rgba(255, 253, 245, 0), var(--paper) 70%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  min-height: clamp(430px, 38vw, 690px);
  width: min(1822px, 100%);
  margin: 0 auto;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(650px, 48vw);
  padding: clamp(54px, 5vw, 92px) 0 0 clamp(36px, 5.2vw, 96px);
}

.hero-copy h1 {
  width: min(620px, 50vw);
  margin: 0;
  color: var(--deep-blue);
  font-size: clamp(48px, 4.45vw, 72px);
  font-weight: 900;
  line-height: .98;
}

.hero-copy p {
  max-width: 500px;
  margin: 22px 0 0;
  color: #17385e;
  font-size: 19px;
  line-height: 1.55;
}

.hero-button {
  min-height: 48px;
  margin-top: 24px;
  padding: 0 24px;
  color: #7b4800;
  background: var(--yellow);
  box-shadow: 0 10px 20px rgba(255, 169, 31, .28);
}

.grade-showcase,
.feature-band,
.archive-header {
  width: min(1180px, calc(100% - 56px));
  margin: 0 auto;
}

/* ==========================================================================
   01. Grade Showcase (Khám phá theo khối lớp - Chuẩn Hình 3 & DS v2.0)
   ========================================================================== */
.grade-showcase {
  padding: 24px 0 20px;
  text-align: center;
}

.grade-showcase h2,
.grade-showcase__title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 20px;
  color: var(--deep-blue);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.2px;
}

.sparkle-icon {
  color: #ffc934;
  font-size: 22px;
  filter: drop-shadow(0 2px 4px rgba(255, 201, 52, 0.4));
  user-select: none;
}

.grade-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.grade-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  transition: transform 0.25s ease;
}

.grade-art {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #ffffff;
  border: 4px solid #ffffff;
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(12, 103, 216, 0.14), 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.28s ease, border-color 0.28s ease;
}

.grade-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}

.grade-art__badge-text {
  position: absolute;
  top: 10px;
  left: 12px;
  z-index: 2;
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.45);
  letter-spacing: 0.3px;
}

.grade-art__badge-num {
  position: absolute;
  top: 4px;
  right: 10px;
  z-index: 2;
  color: #ffffff;
  font-size: clamp(44px, 4.8vw, 60px);
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

.grade-art.g1 { background: #ffaa00; }
.grade-art.g2 { background: #22a766; }
.grade-art.g3 { background: #0c67d8; }
.grade-art.g4 { background: #8e44ad; }
.grade-art.g5 { background: #ff5722; }

.grade-tab:hover .grade-art,
.grade-tab.active .grade-art {
  transform: translateY(-8px) scale(1.03);
  border-color: #ffffff;
  box-shadow: 0 16px 32px rgba(12, 103, 216, 0.22);
}

.grade-tab__label {
  color: #0c4da2;
  font-size: 16px;
  font-weight: 900;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.grade-tab.active .grade-tab__label,
.grade-tab:hover .grade-tab__label {
  color: #0c67d8;
  text-decoration: none;
  transform: translateY(-2px);
}

/* ==========================================================================
   02. Feature Bands Layout & Domain Color Themes
   ========================================================================== */
.feature-band {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
  margin-top: 24px;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(15, 46, 90, 0.06);
}

.books-band {
  background: linear-gradient(90deg, #e8f8ff 0%, #f3fbff 100%);
  border-color: #d6ecff;
}

.tools-band {
  background: linear-gradient(90deg, #ecfff5 0%, #f8fffb 100%);
  border-color: #d2f4e2;
}

.games-band {
  grid-template-columns: 240px minmax(0, 1fr);
  background: linear-gradient(90deg, #fff8df 0%, #fffdf4 100%);
  border-color: #ffe6b0;
}

.shelf-band {
  background: linear-gradient(90deg, #fff0f7 0%, #fff8fb 100%);
  border-color: #feddec;
}

/* Aside Intro */
.band-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 4px;
}

.band-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: auto;
  height: auto;
  margin-bottom: 4px;
}

.band-icon-badge .section-icon,
.band-intro .section-icon {
  display: block;
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.band-intro h2 {
  margin: 0;
  color: var(--deep-blue);
  font-size: 26px;
  font-weight: 900;
  line-height: 1.15;
}

.band-intro p {
  margin: 0;
  color: #33557a;
  font-size: 14px;
  line-height: 1.45;
}

.band-intro__cta,
.band-intro a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 18px;
  margin-top: auto;
  align-self: flex-start;
  color: #ffffff;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.band-intro__cta:hover,
.band-intro a:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

.blue h2 { color: var(--blue); }
.green h2 { color: var(--green); }
.orange h2 { color: #ba5a00; }
.pink h2 { color: var(--pink); }

.blue .band-intro__cta, .blue a {
  background: var(--blue);
  box-shadow: 0 6px 14px rgba(12, 103, 216, 0.25);
}

.green .band-intro__cta, .green a {
  background: var(--green);
  box-shadow: 0 6px 14px rgba(34, 167, 102, 0.25);
}

.orange .band-intro__cta, .orange a {
  background: var(--orange);
  box-shadow: 0 6px 14px rgba(255, 138, 24, 0.25);
}

.pink .band-intro__cta, .pink a {
  background: var(--pink);
  box-shadow: 0 6px 14px rgba(233, 30, 99, 0.25);
}

/* ==========================================================================
   03. Books Rail & Lightweight Carousel Slider
   ========================================================================== */
.books-slider-container {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.books-slider-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 16px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  padding: 8px 4px;
  scrollbar-width: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.books-slider-track::-webkit-scrollbar {
  display: none;
}

.books-slider-track .chanhlo-home-book-card {
  flex: 0 0 calc((100% - 64px) / 5);
  min-width: 155px;
  scroll-snap-align: start;
}

.slider-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--deep-blue);
  border: 1px solid #cce5ff;
  box-shadow: 0 6px 16px rgba(12, 103, 216, 0.18);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.22s ease;
  user-select: none;
}

.slider-nav-btn.prev-btn {
  left: -18px;
}

.slider-nav-btn.next-btn {
  right: -18px;
}

.slider-nav-btn:hover {
  background: var(--blue);
  color: #ffffff;
  border-color: var(--blue);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 10px 22px rgba(12, 103, 216, 0.32);
}

.slider-nav-btn.is-hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.home-book-rail.is-loading {
  opacity: 0.45;
  pointer-events: none;
}

.chanhlo-home-book-card {
  display: flex;
  flex-direction: column;
  padding: 8px;
  background: #ffffff;
  border: 1px solid #e0effe;
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(12, 103, 216, 0.06);
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.chanhlo-home-book-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 28px rgba(12, 103, 216, 0.16);
  border-color: #b8dcff;
}

.chanhlo-home-book-card .cover {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 120 / 150;
  background: linear-gradient(135deg, #d9f5ff, #fff2b8);
  border-radius: 10px;
  box-shadow: 0 6px 14px rgba(15, 46, 90, 0.1);
}

.chanhlo-home-book-card .cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chanhlo-home-book-card .cover-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 12px;
  color: var(--ink);
  text-align: center;
  background: linear-gradient(145deg, #ddfbff, #fff6be);
}

.chanhlo-home-book-card .cover-fallback span {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

.chanhlo-home-book-card .cover-fallback strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
  font-weight: 900;
  color: var(--deep-blue);
}

.chanhlo-home-book-card .book-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 10px 4px 4px;
  text-align: center;
}

.chanhlo-home-book-card .book-info .grade-pill {
  display: none;
}

.chanhlo-home-book-card .book-info h3 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 36px;
  margin: 0;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
}

.chanhlo-home-book-card .book-info h3 a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.2s ease;
}

.chanhlo-home-book-card .book-info h3 a:hover {
  color: var(--blue);
}

.chanhlo-home-book-card .book-info p {
  margin: 4px 0 8px;
  color: #627d98;
  font-size: 12px;
}

.chanhlo-home-book-card .book-actions {
  margin-top: auto;
}

.chanhlo-home-book-card .book-read-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 32px;
  padding: 0 10px;
  background: #eef6ff;
  border: 1px solid #c9e2ff;
  border-radius: 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  transition: all 0.2s ease;
}

.chanhlo-home-book-card:hover .book-read-btn {
  background: var(--blue);
  border-color: var(--blue);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(12, 103, 216, 0.25);
}

/* ==========================================================================
   04. Tool Rail (Công cụ dạy học)
   ========================================================================== */
.tool-rail,
.home-tool-rail {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.chanhlo-tool-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 116px;
  padding: 16px 8px;
  background: #ffffff;
  border: 1px solid #d5ebdc;
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(38, 146, 98, 0.08);
  text-align: center;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.chanhlo-tool-card:hover {
  transform: translateY(-5px);
  border-color: var(--green);
  box-shadow: 0 14px 26px rgba(38, 146, 98, 0.18);
}

.chanhlo-tool-card .tool-asset {
  display: block;
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(16, 98, 147, 0.1));
}

.chanhlo-tool-card strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
}

/* ==========================================================================
   05. Games Band (Trò chơi tương tác Smart TV)
   ========================================================================== */
.game-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---- Showcase: 2 game card lớn ---- */
.game-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.game-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  border: 1.5px solid #f6d89e;
  box-shadow: 0 8px 24px rgba(255, 138, 24, 0.10);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(255, 138, 24, 0.18);
}

/* Thumb minh họa */
.game-card__thumb {
  width: 100%;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 18px 18px 0 0;
}

.game-thumb--memory {
  background: linear-gradient(160deg, #fff4e0 0%, #fde9c4 100%);
  padding: 20px;
}

.game-thumb--math {
  background: linear-gradient(160deg, #e8f8ef 0%, #c7f0da 100%);
  padding: 20px;
}

/* Memory grid */
.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, 48px);
  gap: 8px;
}

.memory-grid .tile {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  font-size: 22px;
  background: #fff;
  box-shadow: 0 3px 8px rgba(0,0,0,0.10);
  border: 1.5px solid #fdd89b;
  transition: transform 0.2s;
}

.memory-grid .tile.t-hidden {
  background: linear-gradient(135deg, #fbbf24 0%, #f97316 100%);
  font-size: 0;
}

.memory-grid .tile.t-hidden::after {
  content: '?';
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

/* Math grid */
.math-grid {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.math-grid .mnum,
.math-grid .mop,
.math-grid .meq {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  font-size: 20px;
  font-weight: 900;
  background: #fff;
  border: 2px solid #86efac;
  color: #15803d;
  box-shadow: 0 3px 8px rgba(22,163,74,0.10);
}

.math-grid .mop,
.math-grid .meq { background: #dcfce7; border-color: #4ade80; }

.math-grid .mnum.mbox {
  background: #fef9c3;
  border-color: #fbbf24;
  color: #92400e;
}

.math-chips {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  width: 100%;
  justify-content: center;
}

.math-chips .chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 15px;
  font-weight: 900;
  color: #fff;
}

.orange-chip { background: #f97316; }
.green-chip  { background: #16a34a; }
.blue-chip   { background: #2563eb; }
.red-chip    { background: #dc2626; }

/* Card body */
.game-card__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px 16px;
  flex: 1;
}

.game-card__emoji {
  font-size: 20px;
  line-height: 1;
}

.game-card__title {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
  color: var(--text-dark, #1a1a2e);
  line-height: 1.2;
}

.game-card__desc {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted, #64748b);
  line-height: 1.4;
  flex: 1;
}

.game-card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-height: 34px;
  padding: 0 18px;
  background: var(--orange, #f97316);
  border-radius: 999px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 6px 14px rgba(249, 115, 22, 0.30);
  transition: transform 0.2s ease, filter 0.2s ease;
  margin-top: auto;
}

.game-card--math .game-card-btn {
  background: var(--green, #16a34a);
  box-shadow: 0 6px 14px rgba(22, 163, 74, 0.30);
}

.game-card-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

/* ---- Supplementary Games Slider (Slide thanh trượt) ---- */
.games-slider-container {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.games-slider-rail {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding: 4px 2px 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  width: 100%;
}

.games-slider-rail::-webkit-scrollbar {
  display: none;
}

.game-slide-card {
  flex: 0 0 230px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1.5px solid #f6d89e;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.08);
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.game-slide-card:hover {
  transform: translateY(-4px);
  border-color: var(--orange, #f97316);
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.16);
}

.game-slide-card__thumb {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 85px;
  border-bottom: 1.5px solid transparent;
}

.game-slide-card__emoji {
  font-size: 34px;
  line-height: 1;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.10));
  transition: transform 0.25s ease;
}

.game-slide-card:hover .game-slide-card__emoji {
  transform: scale(1.15) rotate(-6deg);
}

.game-slide-card__tag {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 2px 7px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  color: #c2410c;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.game-slide-card__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px 12px;
  flex: 1;
}

.game-slide-card__title {
  color: #9a3412;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
}

.game-slide-card__desc {
  margin: 0;
  color: #475569;
  font-size: 11px;
  line-height: 1.4;
  flex: 1;
}

.game-slide-card__action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  color: var(--orange, #f97316);
  font-size: 11px;
  font-weight: 900;
  transition: gap 0.2s ease;
}

.game-slide-card:hover .game-slide-card__action {
  gap: 8px;
}

/* ---- Hide / Show state (JS controlled) ---- */
.game-card[hidden],
.game-slide-card[hidden] {
  display: none !important;
}

/* ---- Empty state ---- */
.games-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 32px 20px;
  text-align: center;
  background: rgba(255,255,255,0.7);
  border: 1.5px dashed #f6d89e;
  border-radius: 18px;
}

.games-empty-state[hidden] {
  display: none !important;
}

.games-empty-state__icon {
  font-size: 40px;
  line-height: 1;
}

.games-empty-state p {
  margin: 0;
  font-size: 14px;
  color: #92400e;
  font-weight: 700;
}

/* Legacy compat – hide old board markup */
.game-board,
.math-board {
  display: none;
}



/* ==========================================================================
   06. Shelf Band (Tủ sách vui & Đọc sách)
   ========================================================================== */
.thumb-rail,
.home-thumb-rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.shelf-thumb-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  text-decoration: none;
}

.shelf-thumb-card__media {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #edd5e8;
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(142, 68, 173, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.shelf-thumb-card:hover .shelf-thumb-card__media {
  transform: translateY(-5px);
  border-color: var(--pink);
  box-shadow: 0 14px 26px rgba(142, 68, 173, 0.2);
}

.shelf-thumb-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shelf-thumb-card strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}


.content-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.archive-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  width: min(1180px, calc(100% - 56px));
  margin: 28px auto 24px;
  padding: 24px 32px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 6px solid var(--blue);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.archive-hero-card.is-theme-blue {
  border-left-color: var(--blue);
}

.archive-hero-card.is-theme-green {
  border-left-color: var(--green);
}

.archive-hero-card.is-theme-orange {
  border-left-color: var(--orange);
}

.archive-hero-card.is-theme-purple {
  border-left-color: var(--purple);
}

.archive-hero-card__kicker {
  margin: 0 0 6px;
  color: var(--orange);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.archive-hero-card.is-theme-blue .archive-hero-card__kicker {
  color: var(--blue);
}

.archive-hero-card.is-theme-green .archive-hero-card__kicker {
  color: var(--green);
}

.archive-hero-card.is-theme-orange .archive-hero-card__kicker {
  color: var(--orange);
}

.archive-hero-card.is-theme-purple .archive-hero-card__kicker {
  color: var(--purple);
}

.archive-hero-card__title {
  margin: 0 0 8px;
  color: var(--deep-blue);
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 900;
  line-height: 1.15;
}

.archive-hero-card__desc {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  max-width: 760px;
}

.archive-hero-card__icon-wrap {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: #f0f7ff;
  border: 4px solid var(--line);
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

.archive-hero-card.is-theme-green .archive-hero-card__icon-wrap {
  background: #e8f8ee;
  border-color: #b8ebd0;
}

.archive-hero-card.is-theme-orange .archive-hero-card__icon-wrap {
  background: #fff4e8;
  border-color: #ffd8b3;
}

.archive-hero-card__icon {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.chanhlo-archive-header {
  width: min(var(--container-max, 1180px), 100%);
  margin: 0 auto 20px;
  padding: 24px 0 10px;
  text-align: left;
}

.chanhlo-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 700;
}

.chanhlo-breadcrumb a {
  color: var(--blue);
  text-decoration: none;
  transition: color 0.15s ease;
}

.chanhlo-breadcrumb a:hover {
  color: var(--deep-blue);
  text-decoration: underline;
}

.chanhlo-breadcrumb .sep {
  color: #a0aec0;
  font-size: 12px;
}

.chanhlo-breadcrumb .current {
  color: var(--ink);
  font-weight: 800;
}

.chanhlo-archive-header .chanhlo-kicker {
  margin: 0 0 8px;
  color: var(--orange);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.chanhlo-archive-header h1 {
  margin: 0 0 10px;
  color: var(--deep-blue);
  font-size: clamp(32px, 3.6vw, 46px);
  font-weight: 900;
  line-height: 1.1;
}

.chanhlo-archive-header p {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.chanhlo-library-archive-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 30px;
  width: min(var(--container-max, 1180px), 100%);
  margin: 0 auto 40px;
  padding: 0;
}

.chanhlo-library-sidebar {
  min-width: 0;
}

.chanhlo-library-filter-form {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 14px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.chanhlo-library-filter-form__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.chanhlo-library-filter-form__header span {
  color: var(--deep-blue);
  font-size: 20px;
  font-weight: 900;
}

.chanhlo-library-filter-form__header a {
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}

.chanhlo-library-filter-form label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.chanhlo-library-filter-form input[type="search"],
.chanhlo-library-filter-form select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  color: var(--text);
  background: #f8fcff;
  border: 1.5px solid #d7ecff;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 800;
}

.mobile-only {
  display: none !important;
}

/* Full-width Grade Chips Wrapper (Tập huấn NXBGD Style - Hình 2) */
.chanhlo-grade-chips-wrapper {
  width: 100%;
  border-bottom: 1.5px solid #edf2f7;
  background: transparent;
  margin-bottom: 24px;
}

.chanhlo-grade-chips-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(var(--container-max, 1180px), 100%);
  margin: 0 auto;
  padding: 8px 0 16px;
}

.chanhlo-grade-chips-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.chanhlo-grade-chips__label {
  font-size: 16px;
  font-weight: 900;
  color: #3b506e;
}

.chanhlo-grade-chips__list {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.chanhlo-grade-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 46px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 900;
  text-decoration: none;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1.5px solid transparent;
}

/* Màu sắc từng lớp chuẩn theo taphuan.nxbgd.vn */
.chanhlo-grade-chip.is-grade-1,
.chanhlo-grade-chip.is-grade-2,
.chanhlo-grade-chip.is-grade-3,
.chanhlo-grade-chip.is-grade-4,
.chanhlo-grade-chip.is-grade-5 {
  color: #ff5722;
  background: #ffebe6;
}

.chanhlo-grade-chip.is-all {
  min-width: 80px;
  padding: 0 20px;
  color: #434343;
  background: #f0f2f5;
  font-size: 15px;
}

.chanhlo-grade-chip.is-all.is-active {
  color: #2f54eb;
  background: #e6f0ff;
  border: 2px solid #2f54eb;
  box-shadow: 0 4px 12px rgba(47, 84, 235, 0.2);
  position: relative;
}

.chanhlo-grade-chip.is-all.is-active::after {
  content: '';
  position: absolute;
  bottom: -18px;
  left: 5%;
  width: 90%;
  height: 3.5px;
  background: #2f54eb;
  border-radius: 3px;
}

.chanhlo-grade-chip:hover {
  transform: translateY(-2px);
  filter: brightness(0.94);
}

.chanhlo-grade-chip.is-active:not(.is-all) {
  color: #fff;
  background: #ff5722;
  border-color: #ff5722;
  box-shadow: 0 6px 16px rgba(255, 87, 34, 0.4);
  position: relative;
}

.chanhlo-grade-chip.is-active:not(.is-all)::after {
  content: '';
  position: absolute;
  bottom: -18px;
  left: 10%;
  width: 80%;
  height: 3.5px;
  background: #ff5722;
  border-radius: 3px;
}

.chanhlo-grade-chips-right {
  display: flex;
  align-items: center;
}

.chanhlo-total-docs-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: #eef6ff;
  border: 1px solid #d4e8fc;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--deep-blue);
  box-shadow: 0 2px 6px rgba(12, 103, 216, 0.06);
}

.chanhlo-total-docs-count strong {
  color: var(--blue);
  font-size: 15px;
  font-weight: 900;
}

/* SEO Expandable Content Box Full-width */
.chanhlo-archive-seo-wrapper {
  width: min(var(--container-max, 1180px), 100%);
  margin: 0 auto 50px;
  padding: 0;
}

.chanhlo-archive-seo-box {
  padding: 26px 30px;
  background: #ffffff;
  border: 1px solid #d7ecff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(12, 103, 216, 0.05);
}

.chanhlo-archive-seo-content {
  max-height: 110px;
  overflow: hidden;
  position: relative;
  transition: max-height 0.4s ease;
}

.chanhlo-archive-seo-content::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.chanhlo-archive-seo-box.is-expanded .chanhlo-archive-seo-content {
  max-height: 2000px;
}

.chanhlo-archive-seo-box.is-expanded .chanhlo-archive-seo-content::after {
  opacity: 0;
}

.chanhlo-archive-seo-content h3 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 900;
  color: var(--deep-blue);
}

.chanhlo-archive-seo-content h4 {
  margin: 16px 0 8px;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}

.chanhlo-archive-seo-content p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}

.chanhlo-archive-seo-content ul {
  margin: 0 0 12px;
  padding-left: 20px;
}

.chanhlo-archive-seo-content li {
  margin-bottom: 6px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}

.chanhlo-seo-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 8px 18px;
  background: #f0f7ff;
  color: var(--blue);
  border: 1.5px solid #cbe4fd;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chanhlo-seo-toggle-btn:hover {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.chanhlo-seo-toggle-icon {
  transition: transform 0.3s ease;
}

.chanhlo-archive-seo-box.is-expanded .chanhlo-seo-toggle-icon {
  transform: rotate(180deg);
}

/* Sidebar Radio Checkbox List for Subjects */
.chanhlo-filter-group {
  display: grid;
  gap: 8px;
}

.chanhlo-filter-group__title {
  font-size: 14px;
  font-weight: 900;
  color: var(--ink);
  margin-top: 4px;
}

.chanhlo-filter-checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
  padding: 4px 6px 4px 0;
}

.chanhlo-filter-radio-item {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 8px 12px;
  border-radius: 8px;
  background: #f8fcff;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chanhlo-filter-radio-item:hover {
  background: #eef6ff;
  border-color: #d0e6fb;
}

.chanhlo-filter-radio-item input[type="radio"] {
  width: 17px !important;
  min-height: 17px !important;
  height: 17px !important;
  margin: 0 !important;
  padding: 0 !important;
  accent-color: var(--blue);
  cursor: pointer;
  flex-shrink: 0;
}

.chanhlo-radio-label {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
  margin: 0;
}

.chanhlo-filter-radio-item input:checked + .chanhlo-radio-label {
  color: var(--blue);
  font-weight: 900;
}

.chanhlo-library-results {
  min-width: 0;
}

.chanhlo-library-results__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px 18px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.chanhlo-library-results__bar strong {
  font-size: 16px;
  font-weight: 900;
}

.chanhlo-library-results__bar span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.chanhlo-library-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.chanhlo-library-filter-form button,
.chanhlo-filter-submit-btn {
  min-height: 44px;
  margin-top: 8px;
  padding: 0 18px;
  color: #fff;
  background: var(--blue);
  border: 0;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(12, 103, 216, 0.22);
}

@media (max-width: 900px) {
  .chanhlo-library-archive-layout {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 16px;
  }

  .chanhlo-archive-header,
  .chanhlo-grade-chips-container,
  .chanhlo-archive-seo-wrapper {
    padding-left: 16px;
    padding-right: 16px;
  }

  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: block !important;
  }

  /* Cụm Fast Grade Chips trên Mobile: Khóa scroll dọc, vuốt ngang 1 dòng mượt mà */
  .chanhlo-grade-chips-wrapper {
    overflow: hidden;
    margin-bottom: 18px;
  }

  .chanhlo-grade-chips-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    white-space: nowrap;
    padding-top: 4px;
    padding-bottom: 8px;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
    overscroll-behavior-y: none;
  }

  .chanhlo-grade-chips-container::-webkit-scrollbar {
    display: none;
  }

  .chanhlo-grade-chips-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    flex-shrink: 0;
  }

  .chanhlo-grade-chips__list {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    flex-shrink: 0;
  }

  .chanhlo-grade-chips-right {
    flex-shrink: 0;
    margin-left: 12px;
  }

  /* Gỡ bỏ gạch chân absolute bottom:-18px trên mobile để không làm phình chiều cao gây trượt dọc */
  .chanhlo-grade-chip.is-all.is-active::after,
  .chanhlo-grade-chip.is-active:not(.is-all)::after {
    display: none;
  }

  /* Bộ lọc Mobile: Dạng thanh ngang 1 dòng scroll ngang */
  .chanhlo-library-filter-form {
    position: static;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    white-space: nowrap;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
    overscroll-behavior-y: none;
  }

  .chanhlo-library-filter-form::-webkit-scrollbar {
    display: none;
  }

  /* Di chuyển cụm header (Xóa lọc) ra sau cùng của thanh cuộn */
  .chanhlo-library-filter-form__header {
    order: 10;
    margin-bottom: 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
  }

  .chanhlo-library-filter-form__header span {
    display: none;
  }

  .chanhlo-library-filter-form__header a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    color: var(--blue);
    background: #f0f7ff;
    border: 1.5px solid #d0e6fd;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
  }

  /* Cân đối ô tìm kiếm: Chiều cao chuẩn 44px, Font size 16px để chống tự động zoom in trên iOS */
  .chanhlo-library-search-field {
    min-width: 180px;
    flex-shrink: 0;
    margin: 0;
    display: flex;
    align-items: center;
  }

  .chanhlo-library-search-field span {
    display: none;
  }

  .chanhlo-library-search-field input[type="search"] {
    width: 100%;
    min-height: 44px;
    height: 44px;
    padding: 0 14px;
    font-size: 16px !important; /* Chống zoom-in trên iPhone iOS Safari */
    border: 1.5px solid #d7ecff;
    border-radius: 10px;
    background: #f8fcff;
    box-sizing: border-box;
  }

  /* Cân đối các Dropdown: Chiều cao chuẩn 44px, Font size 16px chống zoom */
  .chanhlo-filter-group {
    min-width: 155px;
    flex-shrink: 0;
    margin: 0;
    display: flex;
    align-items: center;
  }

  .chanhlo-filter-group__title {
    display: none;
  }

  .chanhlo-filter-group select {
    width: 100%;
    min-height: 44px;
    height: 44px;
    padding: 0 12px;
    font-size: 16px !important; /* Chống zoom-in trên iPhone iOS Safari */
    border: 1.5px solid #d7ecff;
    border-radius: 10px;
    background: #f8fcff;
    box-sizing: border-box;
  }

  .chanhlo-library-filter-form button,
  .chanhlo-filter-submit-btn {
    display: none; /* Lọc tự động AJAX không cần nút bấm chiếm chỗ */
  }

  .chanhlo-library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px;
  }
}

@media (max-width: 520px) {
  .chanhlo-library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px;
  }

  .chanhlo-grade-chip {
    min-width: 42px;
    height: 40px;
    padding: 0 12px;
    font-size: 14px;
  }
}

.chanhlo-library-card {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chanhlo-library-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(20, 98, 166, 0.16);
}

.chanhlo-library-card__media {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 20px 16px;
  background: linear-gradient(180deg, #f8fcff, #edf7ff);
  text-decoration: none;
}

.chanhlo-library-card__media img {
  width: min(100%, 175px);
  aspect-ratio: 352 / 495;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 12px 24px rgba(7, 55, 111, 0.16);
  background: #fff;
}

.chanhlo-library-card__media span {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 18px;
  background: linear-gradient(135deg, #dbeafe, #2478d8);
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.chanhlo-library-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px 20px;
}

.chanhlo-library-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chanhlo-library-card__meta span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.chanhlo-library-card h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.3;
}

.chanhlo-library-card h2 a {
  color: var(--ink);
  text-decoration: none;
}

.chanhlo-library-card h2 a:hover {
  color: var(--blue);
}

.chanhlo-library-card p {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.chanhlo-library-card__terms {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 10px;
}

.chanhlo-library-card__terms span {
  padding: 4px 10px;
  color: var(--deep-blue);
  background: #eef8ff;
  border: 1px solid #d8edff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

/* Pagination chuẩn tròn Flatsome child */
.navigation.pagination {
  margin-top: 32px;
  text-align: center;
}

.navigation.pagination .nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.navigation.pagination .page-numbers {
  display: inline-grid;
  place-items: center;
  min-width: 40px;
  min-height: 40px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.navigation.pagination .page-numbers.current {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.navigation.pagination .page-numbers:hover:not(.current) {
  color: var(--blue);
  border-color: var(--blue);
  background: #f0f7ff;
}

.navigation.pagination .page-numbers.dots {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 32px;
  color: var(--muted);
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
  font-size: 15px;
}

.hub-groups {
  display: grid;
  gap: 28px;
  width: min(1180px, calc(100% - 56px));
  margin: 0 auto;
}

.hub-group {
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.hub-group header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.hub-group header span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.hub-group h2 {
  margin: 4px 0 0;
  color: var(--deep-blue);
  font-size: 26px;
}

.hub-group header a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  color: #fff;
  background: var(--blue);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

.single-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  gap: 32px;
  width: min(1180px, calc(100% - 56px));
  margin: 0 auto;
  padding: 58px 0 28px;
  align-items: center;
}

.single-hero h1 {
  margin: 0;
  color: var(--deep-blue);
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.02;
}

.single-hero p:not(.kicker) {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.single-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button-secondary {
  color: var(--blue);
  background: #fff;
  border: 1px solid var(--line);
}

.single-preview {
  display: grid;
  min-height: 260px;
  place-items: center;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.single-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.single-preview span {
  color: var(--blue);
  font-size: 38px;
  font-weight: 900;
}

.single-content {
  width: min(860px, calc(100% - 56px));
  margin: 0 auto;
  padding: 24px 0 40px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.7;
}

.single-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  width: min(1120px, calc(100% - 56px));
  margin: 0 auto 48px;
  align-items: start;
}

.single-detail-layout .single-content {
  width: auto;
  margin: 0;
}

.document-meta-panel {
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.document-meta-panel h2 {
  margin: 0 0 16px;
  color: var(--deep-blue);
  font-size: 19px;
  line-height: 1.2;
}

.document-meta-panel dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.document-meta-panel dl > div {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(12, 103, 216, 0.12);
}

.document-meta-panel dl > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.document-meta-panel dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.document-meta-panel dd {
  margin: 4px 0 0;
  color: var(--deep-blue);
  font-weight: 900;
  overflow-wrap: anywhere;
}

.document-meta-panel p {
  margin: 0;
  color: var(--muted);
}

.document-meta-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.document-meta-panel__actions .button {
  min-height: 42px;
  padding: 0 16px;
}

.library-card {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.library-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(20, 98, 166, 0.16);
}

.library-card a {
  color: inherit;
  text-decoration: none;
}

.library-card__media {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 20px 16px;
  background: linear-gradient(180deg, #f8fcff, #edf7ff);
  text-decoration: none;
}

.library-card__media img {
  width: min(100%, 175px);
  aspect-ratio: 352 / 495;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 12px 24px rgba(7, 55, 111, 0.16);
  background: #fff;
}

.library-card__media span {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 18px;
  background: linear-gradient(135deg, #dbeafe, #2478d8);
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.library-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px 20px;
}

.library-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.library-card__meta span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.library-card h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.3;
}

.library-card h2 a {
  color: var(--ink);
  text-decoration: none;
}

.library-card h2 a:hover {
  color: var(--blue);
}

.library-card p {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.library-card__terms {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 10px;
}

.library-card__terms span {
  padding: 4px 10px;
  color: var(--deep-blue);
  background: #eef8ff;
  border: 1px solid #d8edff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

/* ==========================================================================
   Single Textbook Detail (Living Design System v2.0)
   ========================================================================== */

.textbook-detail {
  width: 100%;
  max-width: var(--container-max, 1180px);
  margin: 0 auto;
  padding: 16px 20px 60px;
  box-sizing: border-box;
}

/* Breadcrumb */
.textbook-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 700;
}

.textbook-breadcrumb a {
  color: var(--blue);
  text-decoration: none;
  transition: color 0.15s ease;
}

.textbook-breadcrumb a:hover {
  color: var(--deep-blue);
  text-decoration: underline;
}

.textbook-breadcrumb .sep {
  color: #a0aec0;
  font-size: 12px;
}

/* --------------------------------------------------------------------------
   Hero Section (Chuẩn Flatsome Child + Design System v2.0)
   -------------------------------------------------------------------------- */
.textbook-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 36px;
  align-items: center;
  padding: 32px 36px;
  margin-bottom: 36px;
  background: radial-gradient(circle at 10% 20%, rgba(73, 199, 255, 0.12), transparent 40%),
              linear-gradient(135deg, #ffffff 0%, #f0f8ff 60%, #fffbf0 100%);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(12, 103, 216, 0.06);
}

.textbook-summary {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.textbook-kicker {
  margin: 0;
  color: #ff8a18;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.textbook-title {
  margin: 0;
  color: #07376f;
  font-size: clamp(28px, 3.2vw, 42px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.5px;
}

.textbook-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px 0 4px;
}

.textbook-tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  color: #07376f;
  background: #ffffff;
  border: 1px solid #d0e4f7;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 2px 5px rgba(12, 103, 216, 0.04);
}

.textbook-excerpt {
  color: #4a5568;
  font-size: 15px;
  line-height: 1.6;
  margin: 4px 0 8px;
}

.textbook-excerpt p {
  margin: 0;
}

/* Bảng Metadata 3 khối ngang */
.textbook-meta-boxes {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.textbook-meta-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: #ffffff;
  border: 1px solid #d0e4f7;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(12, 103, 216, 0.04);
}

.textbook-meta-box__label {
  color: #718096;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.3px;
}

.textbook-meta-box__value {
  color: #07376f;
  font-size: 13.5px;
  font-weight: 900;
  text-transform: uppercase;
}

/* Bìa sách 3:4 */
.textbook-cover-panel {
  display: flex;
  justify-content: center;
  align-items: center;
}

.textbook-cover {
  width: 100%;
  max-width: 240px;
  aspect-ratio: 3 / 4;
  padding: 8px;
  background: #ffffff;
  border: 1px solid rgba(207, 232, 251, 0.8);
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(7, 55, 111, 0.14);
}

.textbook-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.textbook-cover__placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue), var(--sky));
  color: #ffffff;
  font-size: 36px;
  font-weight: 900;
}

/* --------------------------------------------------------------------------
   Danh mục tài nguyên (Resource Groups - Taphuan.nxbgd.vn Style)
   -------------------------------------------------------------------------- */
.textbook-resources {
  margin-bottom: 40px;
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading__kicker {
  margin: 0 0 4px;
  color: #ff8a18;
  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.section-heading__title {
  margin: 0;
  color: #07376f;
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 900;
  line-height: 1.2;
}

.resource-groups-wrapper {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.resource-group-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(12, 103, 216, 0.05);
  overflow: hidden;
}

.resource-group-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 20px;
  background: #f8fbfe;
  border-bottom: 1px solid var(--line);
}

.resource-group-card__title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.resource-group-card__book-icon {
  color: var(--blue);
  flex-shrink: 0;
}

.resource-group-card__title h3 {
  margin: 0;
  color: #07376f;
  font-size: 16px;
  font-weight: 900;
}

.resource-group-card__badge {
  flex-shrink: 0;
  padding: 4px 10px;
  color: var(--blue);
  background: #eef7ff;
  border: 1px solid #d4ebfd;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.resource-grid-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 20px;
}

.resource-card-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid #e2edf8;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.resource-card-item:hover {
  background: #f4faff;
  border-color: #bce0fd;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(12, 103, 216, 0.08);
}

.resource-card-item__icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.resource-card-item__icon.tw-aspect-square {
  aspect-ratio: 1 / 1;
}

.resource-card-item__icon .resource-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.resource-card-item__body {
  min-width: 0;
  flex: 1;
}

.resource-card-item__label {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #1a202c;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  transition: color 0.15s ease;
}

.resource-card-item:hover .resource-card-item__label {
  color: var(--blue);
}

/* --------------------------------------------------------------------------
   Sách Cùng Khối Lớp (Related Books Grid - Tối giản đồng bộ Archive)
   -------------------------------------------------------------------------- */
.related-books {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px dashed var(--line);
}

.related-books__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.related-book-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(12, 103, 216, 0.04);
  transition: all 0.2s ease;
}

.related-book-card:hover {
  transform: translateY(-3px);
  border-color: var(--sky);
  box-shadow: 0 10px 20px rgba(12, 103, 216, 0.1);
}

.related-book-card__media {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: #f0f7ff;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.related-book-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.related-book-card__placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #dbeafe, #2478d8);
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
}

.related-book-card__title {
  margin: 0;
  text-align: center;
  font-size: 13.5px;
  font-weight: 900;
  line-height: 1.3;
}

.related-book-card__title a {
  color: #07376f;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s ease;
}

.related-book-card:hover .related-book-card__title a {
  color: var(--blue);
}

/* --------------------------------------------------------------------------
   Responsive Breakpoints cho Single Textbook
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .related-books__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 850px) {
  .textbook-detail {
    padding: 12px 14px 40px;
  }

  .textbook-hero {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px 20px;
    text-align: center;
  }

  .textbook-summary {
    align-items: center;
  }

  .textbook-tags,
  .textbook-meta-boxes {
    justify-content: center;
  }

  .textbook-cover-panel {
    order: -1;
  }

  .textbook-cover {
    max-width: 200px;
  }

  .resource-grid-list {
    grid-template-columns: 1fr;
    padding: 12px 14px;
  }

  .related-books__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }
}

@media (max-width: 540px) {
  .textbook-meta-boxes {
    flex-direction: column;
    width: 100%;
  }

  .textbook-meta-box {
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
  }

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

  .related-book-card {
    padding: 8px;
  }

  .related-book-card__title {
    font-size: 12.5px;
  }
}

/* ==========================================================================
   Footer: Clone Chuẩn Flatsome (Bố cục 2 phần độc lập: Footer 1 + Absolute Footer)
   ========================================================================== */
.site-footer {
  position: relative;
  width: 100%;
  margin-top: 48px;
}

/* --- PHẦN 1: FOOTER 1 (Khung tranh minh họa & Thẻ card học liệu) --- */
.chanhlo-footer-block {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(240px, 1.05fr) minmax(0, 2.5fr) minmax(200px, 0.85fr);
  gap: 20px;
  align-items: start;
  min-height: clamp(430px, 33vw, 620px);
  padding: clamp(68px, 6.5vw, 110px) max(20px, calc((100vw - 1320px) / 2)) 40px;
  color: var(--ink);
  background: linear-gradient(180deg, #dff7ff 0%, #bdefff 52%, #b7e96a 100%);
  border-top: 1px solid var(--line);
}

.chanhlo-footer-block::before,
.chanhlo-footer-block::after {
  position: absolute;
  pointer-events: none;
  content: '';
}

/* Nền phủ phóng lớn chỉ dùng trên màn hình rộng để thay phần màu trống hai bên. */
.chanhlo-footer-block::before {
  z-index: 0;
  inset: -34px;
  background-image: linear-gradient(180deg, rgba(224, 247, 255, .18), rgba(183, 233, 106, .12)), var(--footer-bg-image);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  filter: blur(24px) saturate(.88);
  transform: scale(1.06);
}

/* Ảnh chính vẫn giữ đúng tỉ lệ và độ nét ở trung tâm. */
.chanhlo-footer-block::after {
  z-index: 1;
  inset: 0;
  background-image: linear-gradient(180deg, rgba(232, 248, 255, .04), rgba(214, 245, 255, .08)), var(--footer-bg-image);
  background-position: center, center bottom;
  background-size: cover, contain;
  background-repeat: no-repeat;
}

@media (min-width: 1600px) {
  .chanhlo-footer-block::before {
    opacity: .82;
  }
}

.footer-school-achievement {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  margin: 10px 0 11px;
  padding: 8px 10px;
  color: var(--deep-blue);
  background: linear-gradient(135deg, rgba(255, 248, 207, .94), rgba(255, 253, 244, .9));
  border: 1px solid rgba(224, 161, 0, .25);
  border-radius: 12px;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}

.footer-school-achievement:hover,
.footer-school-achievement:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 9px 20px rgba(161, 107, 0, .13);
}

.footer-school-achievement__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #946000;
  background: linear-gradient(135deg, #ffe37a, #ffc12e);
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(153, 99, 0, .12);
}

.footer-school-achievement__icon svg {
  width: 21px;
  height: 21px;
}

.footer-school-achievement strong {
  display: block;
  color: #805000;
  font-size: 12.5px;
  font-weight: 900;
  line-height: 1.25;
}

.footer-school-achievement small {
  display: block;
  margin-top: 2px;
  color: #7b6540;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.3;
}

.footer-school-locations {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed rgba(12, 103, 216, .18);
}

.footer-school-locations .footer-school-locations__title {
  color: var(--ink);
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.footer-school-locations ul {
  display: grid;
  gap: 6px;
  margin: 7px 0 0;
  padding: 0;
  list-style: none;
}

.footer-school-locations li {
  position: relative;
  padding-left: 11px;
}

.footer-school-locations li::before {
  position: absolute;
  top: 6px;
  left: 0;
  width: 5px;
  height: 5px;
  background: var(--blue);
  border-radius: 50%;
  content: '';
}

.footer-school-locations li span {
  display: block;
  color: var(--deep-blue);
  font-size: 11.5px;
  font-weight: 900;
  line-height: 1.25;
}

.footer-school-locations li small {
  display: block;
  margin-top: 1px;
  color: #526a82;
  font-size: 10.5px;
  line-height: 1.32;
}

.footer-school-locations .footer-school-locations__region {
  margin: 7px 0 0;
  color: #526a82;
  font-size: 10.5px;
  font-style: italic;
  line-height: 1.3;
}

/* Spacer cột 1: Để lộ ngôi trường ngói đỏ bên trái bức tranh */
.chanhlo-footer-block__spacer {
  grid-column: 1;
}

/* Container 3 cột nội dung đặt bên phải minh họa ngôi trường */
.chanhlo-footer-block__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(285px, 1.2fr) minmax(220px, .95fr) minmax(210px, .85fr);
  grid-column: 2 / 4;
  gap: 18px;
  align-items: start;
}

.chanhlo-footer-block__card {
  min-height: 120px;
  height: 100%;
  box-sizing: border-box;
  padding: 18px 20px;
  border-radius: 16px;
  background: rgba(224, 248, 255, 0.46);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 8px 24px rgba(7, 55, 111, 0.07);
  display: flex;
  flex-direction: column;
}

.footer-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.footer-card-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.chanhlo-footer-block__card strong,
.footer-card-title {
  display: block;
  font-size: 16px;
  font-weight: 900;
  color: var(--blue);
  line-height: 1.25;
}

.footer-card-subtitle {
  display: block;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--ink);
  margin-top: 2px;
}

.footer-card-desc,
.chanhlo-footer-block__card p {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
  margin: 6px 0 8px;
}

.footer-card-contact-box {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed rgba(12, 103, 216, 0.15);
}

.footer-card-address {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--muted);
  margin: 0 0 4px;
}

.footer-card-address strong,
.footer-card-phone strong {
  color: var(--ink);
  font-weight: 900;
}

.footer-card-phone {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--muted);
  margin: 0;
}

.footer-card-phone a {
  color: var(--blue);
  font-weight: 900;
  text-decoration: none;
}

.footer-card-phone a:hover {
  text-decoration: underline;
}

/* Quick Links Pill Badges */
.chanhlo-footer-block__quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.chanhlo-footer-block__quick-links .footer-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 13px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 900;
  line-height: 1;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 12px rgba(7, 55, 111, 0.06);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.chanhlo-footer-block__quick-links .footer-pill:hover {
  background: var(--blue);
  color: #ffffff;
  border-color: var(--blue);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(12, 103, 216, 0.25);
}

/* Connect Official Links & Social Buttons */
.chanhlo-footer-block__official-links {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  margin: 12px 0 8px;
}

.social-circle-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 6px 14px rgba(0, 103, 216, 0.16);
  transition: all 0.2s ease;
}

.social-circle-btn:hover {
  transform: translateY(-2px) scale(1.08);
}

.social-circle-btn svg {
  width: 17px;
  height: 17px;
}

.social-fb { background: #1877f2; }
.social-zalo { background: #0068ff; }
.social-web { background: #16a34a; }

@media (max-width: 990px) {
  .chanhlo-footer-block {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 40px;
  }

  .chanhlo-footer-block::after {
    background-size: cover, auto 100%;
  }

  .chanhlo-footer-block__spacer {
    display: none;
  }

  .chanhlo-footer-block__inner {
    grid-template-columns: 1fr;
    grid-column: 1;
    gap: 16px;
  }
}

/* --- PHẦN 2: ABSOLUTE FOOTER (Dải phẳng độc lập dán sát đáy) --- */
.absolute-footer {
  position: relative;
  z-index: 4;
  padding: 16px 20px;
  border-top: 1px solid rgba(12, 103, 216, 0.08);
}

.absolute-footer-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  gap: 16px;
}

.absolute-footer-text {
  flex: 1;
}

.absolute-footer.align-center .absolute-footer-text {
  text-align: center;
}

.absolute-footer.align-left .absolute-footer-text {
  text-align: left;
}

.absolute-footer.align-right .absolute-footer-text {
  text-align: right;
}

.absolute-primary {
  margin: 0;
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1.5;
}

.absolute-primary a {
  color: inherit;
  text-decoration: none;
}

.absolute-primary a strong {
  color: var(--blue);
}

.absolute-primary a:hover {
  text-decoration: underline;
}

.absolute-secondary {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.4;
  opacity: 0.85;
}

.back-to-top-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--blue);
  color: #ffffff;
  border: 0;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(12, 103, 216, 0.25);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.back-to-top-btn:hover {
  background: var(--deep-blue);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(12, 103, 216, 0.35);
}

.back-to-top-btn svg {
  width: 18px;
  height: 18px;
}

.back-to-top-btn {
  position: fixed;
  bottom: 80px;
  right: 20px;
  z-index: 95;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--blue);
  border: 2px solid var(--line);
  box-shadow: 0 8px 24px rgba(12, 103, 216, 0.2);
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: all 0.25s ease;
}

.back-to-top-btn.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top-btn:hover {
  background: var(--blue);
  color: #ffffff;
  border-color: var(--blue);
  transform: translateY(-3px);
}

.back-to-top-btn svg {
  width: 20px;
  height: 20px;
}

.archive-header {
  padding: 58px 0 26px;
  text-align: center;
}

.archive-header h1 {
  margin: 0;
  color: var(--deep-blue);
  font-size: clamp(36px, 5vw, 62px);
}

.archive-header p {
  max-width: 680px;
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.kicker {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.nav-links {
  width: min(1180px, calc(100% - 56px));
  margin: 28px auto 0;
  text-align: center;
}

@media (max-width: 1080px) {
  .site-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: 62px !important;
    min-height: 62px !important;
    padding: 0 16px !important;
  }

  .site-header .brand .brand-mark {
    width: 44px !important;
    height: 44px !important;
  }

  .site-header .brand strong {
    font-size: 16.5px !important;
  }

  .site-header .brand small {
    font-size: 12px !important;
  }

  /* Ẩn hoàn toàn menu ngang và cụm actions trên Header mobile vì Float Bar đã đảm nhiệm */
  .site-header .nav,
  .site-header .desktop-nav,
  .site-header #primary-menu,
  #primary-menu,
  .site-header .header-actions {
    display: none !important;
  }

  .login-button {
    display: none !important;
  }

  .feature-band {
    grid-template-columns: 1fr;
  }

  .audience-grid,
  .chanhlo-audience-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .home-rail,
  .content-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .archive-layout,
  .single-hero,
  .single-detail-layout {
    grid-template-columns: 1fr;
  }

  .archive-filters {
    position: static;
  }
}

@media (max-width: 720px) {
  .site-header {
    padding: 8px 12px;
  }

  .site-header .brand {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    text-decoration: none !important;
  }

  .site-header .brand .brand-mark {
    width: 42px !important;
    height: 42px !important;
    flex-shrink: 0 !important;
  }

  .site-header .brand span {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    line-height: 1.15 !important;
  }

  .site-header .brand strong {
    font-size: 15.5px !important;
    font-weight: 900 !important;
    color: var(--blue) !important;
    letter-spacing: -0.01em !important;
    white-space: nowrap !important;
  }

  .site-header .brand small {
    font-size: 12px !important;
    font-weight: 800 !important;
    color: var(--ink) !important;
    white-space: nowrap !important;
  }

  .hero-inner {
    min-height: 580px;
  }

  .hero-bg {
    object-position: 62% bottom;
  }

  .hero-copy {
    width: min(360px, calc(100% - 28px));
    padding: 34px 0 0 18px;
  }

  .hero-copy h1 {
    width: min(330px, 100%);
    font-size: 42px;
  }

  .hero-copy p {
    font-size: 16px;
  }

  .grade-showcase,
  .feature-band,
  .archive-header,
  .hub-groups,
  .single-hero,
  .single-content,
  .audience-grid,
  .chanhlo-audience-grid,
  .news-section {
    width: min(100% - 28px, 1180px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .grade-tabs {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
    padding: 4px 4px 12px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .grade-tabs::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  .grade-tab {
    flex: 0 0 110px;
    scroll-snap-align: start;
  }

  .feature-band {
    padding: 18px 16px;
  }

  .home-book-rail,
  .home-tool-rail,
  .home-thumb-rail {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
    padding: 4px 4px 12px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .home-book-rail::-webkit-scrollbar,
  .home-tool-rail::-webkit-scrollbar,
  .home-thumb-rail::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  .home-book-rail .chanhlo-home-book-card {
    flex: 0 0 145px;
    scroll-snap-align: start;
  }

  .home-tool-rail .chanhlo-tool-card {
    flex: 0 0 125px;
    scroll-snap-align: start;
  }

  .home-thumb-rail .shelf-thumb-card {
    flex: 0 0 120px;
    scroll-snap-align: start;
  }

  .game-showcase {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .game-card__thumb {
    min-height: 140px;
  }

  .memory-grid {
    grid-template-columns: repeat(4, 40px);
    gap: 6px;
  }

  .memory-grid .tile {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .game-ideas {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .audience-grid,
  .chanhlo-audience-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .audience-card,
  .chanhlo-audience-card {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .audience-card__media img,
  .audience-card img {
    height: 160px;
  }

  .site-search-panel {
    right: 12px;
    left: 12px;
    grid-template-columns: 1fr;
  }
}

.portal-main {
  background: var(--paper);
}

.portal-hero,
.portal-empty {
  max-width: 1120px;
  margin: 0 auto;
  padding: 56px 24px 24px;
}

.portal-hero h1,
.portal-empty h2 {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.05;
}

.portal-hero p,
.portal-empty p {
  max-width: 760px;
  color: #566276;
  font-size: 1.08rem;
  line-height: 1.7;
}

.portal-grid {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 24px 72px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.portal-card {
  min-height: 220px;
  padding: 22px;
  border: 1px solid rgba(12, 103, 216, 0.14);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(20, 42, 82, 0.08);
}

.portal-card span {
  display: inline-flex;
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 900;
}

.portal-card h2 {
  margin: 12px 0 8px;
  color: var(--ink);
  font-size: 1.25rem;
}

.portal-card p {
  color: #667085;
  line-height: 1.6;
}

.portal-card button {
  margin-top: 14px;
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: #6b7280;
  background: #eef2f7;
  font-weight: 900;
}

.portal-panel {
  max-width: 1120px;
  margin: 0 auto 20px;
  padding: 24px;
  background: #fff;
  border: 1px solid rgba(12, 103, 216, 0.14);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(20, 42, 82, 0.08);
}

.portal-panel h2 {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: 1.4rem;
}

.portal-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

.portal-form label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 900;
}

.portal-form input,
.portal-form select,
.portal-form textarea,
.portal-inline-form textarea,
.portal-inline-form select {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  font: inherit;
}

.portal-form textarea,
.portal-inline-form textarea {
  min-height: 82px;
  padding-top: 10px;
  resize: vertical;
}

.portal-form button,
.portal-inline-form button {
  min-height: 42px;
  padding: 0 16px;
  color: #fff;
  background: var(--blue);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.portal-table-wrap {
  overflow-x: auto;
}

.portal-table {
  width: 100%;
  border-collapse: collapse;
}

.portal-table th,
.portal-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #e5eef8;
  vertical-align: top;
}

.portal-table th {
  color: var(--ink);
  background: #f3f9ff;
  font-size: 0.86rem;
}

.portal-inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.portal-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.portal-summary-card {
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e5eef8;
  border-radius: 8px;
}

.portal-summary-card span {
  display: block;
  color: #51647f;
  font-size: 0.82rem;
  font-weight: 900;
}

.portal-summary-card strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 1.35rem;
}

.portal-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin: 2px 4px 2px 0;
  padding: 0 8px;
  color: var(--ink);
  background: #f8fafc;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 900;
  white-space: nowrap;
}

.portal-badge-scan {
  background: #ecfdf5;
  border-color: #bbf7d0;
}

.portal-badge-cache {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.portal-metadata-row td {
  background: #fbfdff;
}

.portal-metadata-editor summary {
  cursor: pointer;
  color: var(--blue);
  font-weight: 900;
}

.portal-form-compact {
  margin-top: 12px;
}

.portal-notice,
.portal-empty-row,
.portal-muted {
  color: #51647f;
  font-weight: 800;
}

.portal-notice {
  max-width: 1120px;
  margin: 0 auto 16px;
  padding: 12px 16px;
  background: #ecfdf3;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
}

.audience-grid,
.chanhlo-audience-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  width: min(1180px, calc(100% - 56px));
  margin: 24px auto 0;
}

.audience-card,
.chanhlo-audience-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46%;
  gap: 14px;
  min-height: 244px;
  width: 100% !important;
  margin: 0 !important;
  padding: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.audience-card:hover,
.chanhlo-audience-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(15, 46, 90, 0.12);
}

.audience-card.teacher {
  background: linear-gradient(135deg, #f6edff, #fff 68%);
  border-color: #ead9f9;
}

.audience-card.parents {
  background: linear-gradient(135deg, #eaf8ff, #fff 68%);
  border-color: #d6ecff;
}

.audience-card__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.audience-card__title,
.audience-card h2 {
  margin: 0;
  font-size: 29px;
  font-weight: 900;
  line-height: 1.15;
}

.teacher-title {
  color: var(--purple, #7b38d8);
}

.parents-title {
  color: var(--blue, #0c67d8);
}

.audience-card__desc,
.audience-card p,
.audience-card li {
  color: var(--text, #4a5568);
  font-size: 14px;
  line-height: 1.45;
}

.audience-card__desc,
.audience-card p {
  margin: 6px 0 0;
}

.audience-card__list,
.audience-card ul {
  margin: 10px 0;
  padding-left: 18px;
  list-style: disc;
}

.audience-card__list li {
  margin-bottom: 3px;
  white-space: nowrap;
}

.audience-card__btn,
.audience-card a {
  display: inline-flex;
  min-height: 38px;
  padding: 0 18px;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  color: #fff;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.audience-card__btn:hover,
.audience-card a:hover {
  transform: translateY(-2px);
}

.teacher-btn,
.audience-card.teacher a {
  background: var(--purple, #7b38d8);
  box-shadow: 0 8px 18px rgba(123, 56, 216, 0.28);
}

.parents-btn,
.audience-card.parents a {
  background: var(--blue, #0c67d8);
  box-shadow: 0 8px 18px rgba(12, 103, 216, 0.28);
}

.audience-card__media {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.audience-card__media img,
.audience-card img {
  align-self: end;
  width: 100%;
  height: 198px;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
}

.news-section {
  width: min(1180px, calc(100% - 56px));
  margin: 24px auto 24px;
  padding: 28px 32px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(15, 46, 90, 0.06);
}

.news-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1.5px solid #eef4fb;
}

.news-title h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: var(--deep-blue);
  font-size: 24px;
  font-weight: 900;
}

.news-title .title-image-icon {
  display: block;
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex-shrink: 0;
}

.news-view-all-btn,
.news-title a {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  background: #f0f7ff;
  border: 1.5px solid #cbe3fe;
  border-radius: 999px;
  color: var(--blue, #0c67d8);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  transition: all 0.2s ease;
}

.news-view-all-btn:hover,
.news-title a:hover {
  background: var(--blue, #0c67d8);
  border-color: var(--blue, #0c67d8);
  color: #ffffff;
  transform: translateX(2px);
  box-shadow: 0 4px 12px rgba(12, 103, 216, 0.25);
}

/* News Grid 3 columns x 2 rows (6 cards) */
.news-grid--cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.news-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1.5px solid #edf2f7;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(15, 46, 90, 0.05);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}

.news-card:hover {
  transform: translateY(-6px);
  border-color: #bfdbfe;
  box-shadow: 0 14px 28px rgba(12, 103, 216, 0.12);
}

.news-card__media-link {
  display: block;
  text-decoration: none;
  overflow: hidden;
}

.news-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #f1f5f9;
  overflow: hidden;
}

.news-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.news-card:hover .news-card__media img {
  transform: scale(1.06);
}

.news-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 10px;
  background: rgba(12, 103, 216, 0.92);
  backdrop-filter: blur(4px);
  border-radius: 999px;
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.2px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.news-card__body {
  display: flex;
  flex-direction: column;
  padding: 16px 18px 18px;
  flex: 1;
}

.news-card__meta {
  margin-bottom: 8px;
}

.news-card__date {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.news-card__date svg {
  color: var(--blue, #0c67d8);
  flex-shrink: 0;
}

.news-card__title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.35;
}

.news-card__title a {
  color: var(--deep-blue, #0f2e5a);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.news-card:hover .news-card__title a {
  color: var(--blue, #0c67d8);
}

.news-card__excerpt {
  margin: 0 0 12px;
  color: #475569;
  font-size: 12px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.news-card__readmore {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--blue, #0c67d8);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  margin-top: auto;
  transition: gap 0.2s ease, color 0.2s ease;
}

.news-card:hover .news-card__readmore {
  gap: 8px;
  color: #0c4da2;
}

/* Responsive News Section */
@media (max-width: 980px) {
  .news-grid--cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (max-width: 600px) {
  .news-section {
    padding: 20px 16px;
  }
  .news-grid--cards {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

.sitemap-main {
  padding: 0 0 56px;
}

.sitemap-hero {
  padding: clamp(34px, 5vw, 70px) clamp(18px, 5vw, 72px);
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--green));
}

.sitemap-hero h1 {
  max-width: 760px;
  margin: 8px 0 12px;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 1.04;
}

.sitemap-hero p {
  max-width: 680px;
  margin: 0;
  font-size: 19px;
}

.sitemap-section {
  width: min(1180px, calc(100% - 36px));
  margin: 34px auto 0;
}

.sitemap-section h2 {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: clamp(24px, 3vw, 38px);
}

.sitemap-menu-grid,
.sitemap-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.sitemap-panel,
.sitemap-link-card {
  min-height: 120px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.sitemap-panel h3 {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 20px;
}

.sitemap-panel ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sitemap-panel li a,
.sitemap-chip-list a {
  color: var(--text);
}

.sitemap-panel li a:hover,
.sitemap-chip-list a:hover,
.sitemap-link-card:hover span {
  color: var(--blue);
}

.sitemap-link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.sitemap-link-card span {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.sitemap-link-card strong {
  display: grid;
  min-width: 54px;
  height: 54px;
  place-items: center;
  color: #fff;
  background: var(--orange);
  border-radius: 50%;
  font-size: 18px;
}

.is-grade-grid .sitemap-link-card strong {
  background: var(--blue);
}

.sitemap-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sitemap-chip-list a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 0 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(20, 98, 166, 0.08);
}

@media (max-width: 960px) {
  .portal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .portal-grid {
    grid-template-columns: 1fr;
  }

  .portal-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 849px) {
  .textbook-detail {
    padding-inline: 14px;
  }

  .textbook-hero {
    grid-template-columns: 1fr;
  }

  .textbook-cover-panel {
    order: -1;
  }

  .textbook-cover {
    width: min(72vw, 240px);
  }

  .resource-list,
  .related-books__grid {
    grid-template-columns: 1fr;
  }

  .resource-group header {
    align-items: flex-start;
  }
}
/* Portal account workspace */
.portal-account-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 16px;
  padding: 18px 20px;
  border: 1px solid #d7e3ef;
  border-radius: 8px;
  background: #fff;
}

.portal-account-avatar,
.account-button img {
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
}

.portal-account-copy {
  min-width: 0;
  flex: 1;
}

.portal-account-copy span,
.portal-account-copy p {
  display: block;
  margin: 0;
  color: #5c6f82;
  font-size: 13px;
}

.portal-account-copy h2 {
  margin: 2px 0;
  color: #123f70;
  font-size: 20px;
  line-height: 1.25;
}

.portal-account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.portal-account-actions a,
.portal-article-actions > a {
  color: #0f66c3;
  font-weight: 700;
  text-decoration: none;
}

.portal-tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 18px;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid #d7e3ef;
  border-radius: 8px;
  background: #f7f9fb;
  scrollbar-width: thin;
}

.portal-tabs a {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 9px 13px;
  border-radius: 6px;
  color: #40566d;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.portal-tabs a:hover,
.portal-tabs a:focus-visible {
  color: #0b579f;
  background: #eaf3fc;
}

.portal-tabs a.is-active {
  color: #fff;
  background: #1268bd;
}

.portal-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.portal-action-grid > a {
  display: flex;
  min-width: 0;
  min-height: 92px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 14px;
  border: 1px solid #d7e3ef;
  border-radius: 8px;
  color: #123f70;
  text-decoration: none;
}

.portal-action-grid > a:hover,
.portal-action-grid > a:focus-visible {
  border-color: #5ba2df;
  background: #f4f9fd;
}

.portal-action-grid span {
  color: #5c6f82;
  font-size: 13px;
  line-height: 1.45;
}

.portal-form .portal-form-wide {
  grid-column: 1 / -1;
}

.portal-article-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.portal-article-actions form {
  margin: 0;
}

.portal-article-actions button {
  min-height: 36px;
  margin: 0;
  padding: 7px 12px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: #1268bd;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.account-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 190px;
}

.account-button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .portal-account-bar {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 14px;
  }

  .portal-account-actions {
    width: 100%;
    padding-left: 88px;
  }

  .portal-action-grid {
    grid-template-columns: 1fr;
  }

  .portal-form .portal-form-wide {
    grid-column: auto;
  }

  .account-button span {
    display: none;
  }
}

@media (max-width: 460px) {
  .portal-account-actions {
    padding-left: 0;
  }
}

/* ==========================================================================
   Float Menu Mobile (Bottom Navigation Bar) & Mobile Drawer
   ========================================================================== */

/* Hidden on Desktop */
.mobile-float-bar,
.mobile-drawer,
.mobile-drawer-backdrop {
  display: none;
}

@media (max-width: 768px) {
  /* Prevent content overlapping bottom navigation */
  body.chanhlo-custom-theme {
    padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px));
  }

  /* Scroll Hide Header */
  .site-header {
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .site-header.is-hidden-mobile {
    transform: translateY(-100%) !important;
  }

  /* Float Menu Mobile Bar */
  .mobile-float-bar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(58px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid #d4ebfd;
    box-shadow: 0 -4px 20px rgba(7, 55, 111, 0.08);
    z-index: 999;
  }

  .float-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    height: 100%;
    color: #475569;
    text-decoration: none;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 4px 0;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s ease;
  }

  .float-bar-item:hover,
  .float-bar-item:active,
  .float-bar-item.is-active {
    color: var(--blue);
  }

  .float-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: currentColor;
    transition: transform 0.15s ease;
  }

  .float-icon svg {
    width: 21px;
    height: 21px;
  }

  .float-icon-highlight {
    background: linear-gradient(135deg, var(--blue), var(--deep-blue));
    color: #ffffff !important;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    margin-top: -12px;
    box-shadow: 0 4px 14px rgba(12, 103, 216, 0.35);
  }

  .float-icon-highlight svg {
    width: 19px;
    height: 19px;
    color: #ffffff;
  }

  .float-icon-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
  }

  .float-icon-avatar .chanhlo-user-avatar {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: block;
    box-shadow: 0 2px 6px rgba(12, 103, 216, 0.22);
  }

  .float-label {
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1;
    color: inherit;
  }

  /* Mobile Drawer Backdrop */
  .mobile-drawer-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(7, 55, 111, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
  }

  .mobile-drawer-backdrop.is-active {
    opacity: 1;
    pointer-events: auto;
  }

  /* Mobile Drawer (Offcanvas Menu) */
  .mobile-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    width: min(330px, 86vw);
    height: 100%;
    background: #ffffff;
    z-index: 1001;
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -8px 0 32px rgba(7, 55, 111, 0.16);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-drawer.is-open {
    transform: translateX(0);
  }

  body.drawer-open {
    overflow: hidden;
  }

  .mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    background: #f8fcff;
    flex-shrink: 0;
  }

  .drawer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
  }

  .drawer-brand img {
    border-radius: 8px;
  }

  .drawer-brand strong {
    font-size: 15px;
    font-weight: 900;
    color: var(--blue);
    display: block;
    line-height: 1.15;
  }

  .drawer-brand small {
    font-size: 12px;
    font-weight: 800;
    color: var(--ink);
    display: block;
  }

  .drawer-close-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid var(--line);
    color: var(--muted);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: all 0.15s ease;
  }

  .drawer-close-btn:hover {
    background: #f0f7ff;
    color: var(--ink);
  }

  .drawer-close-btn svg {
    width: 18px;
    height: 18px;
  }

  .mobile-drawer-content {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  .drawer-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 4px;
  }

  .drawer-nav-menu > li > a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    color: var(--text);
    font-size: 14px;
    font-weight: 900;
    text-decoration: none;
    transition: all 0.15s ease;
  }

  .drawer-nav-menu > li > a:hover {
    background: #f0f7ff;
    color: var(--blue);
  }

  .drawer-nav-menu .menu-item-inner {
    flex-direction: row;
    gap: 12px;
    padding: 0;
  }

  .drawer-nav-menu .menu-icon svg {
    width: 20px;
    height: 20px;
  }

  .drawer-nav-menu .sub-menu {
    list-style: none;
    padding: 4px 0 6px 36px;
    margin: 0;
    display: grid;
    gap: 4px;
  }

  .drawer-nav-menu .sub-menu a {
    display: block;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    text-decoration: none;
    border-radius: 8px;
  }

  .drawer-nav-menu .sub-menu a:hover {
    color: var(--blue);
    background: #f8fcff;
  }

  .drawer-footer-actions {
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid var(--line);
  }

  .drawer-user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: #f8fcff;
    border: 1px solid var(--line);
    border-radius: 12px;
  }

  .drawer-user-card img {
    border-radius: 50%;
  }

  .drawer-user-card strong {
    font-size: 13.5px;
    font-weight: 900;
    display: block;
    color: var(--ink);
  }

  .drawer-user-card a {
    font-size: 12px;
    color: var(--blue);
    font-weight: 800;
  }

  .drawer-login-prompt p {
    font-size: 12.5px;
    color: var(--muted);
    margin-bottom: 10px;
    text-align: center;
  }

  .drawer-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 44px;
    background: var(--blue);
    color: #fff;
    border-radius: 999px;
    font-weight: 900;
    font-size: 14px;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(12, 103, 216, 0.22);
  }

  .drawer-login-btn svg {
    width: 18px;
    height: 18px;
  }

  /* Responsive Footer */
  .footer-cards-container {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .footer-bottom-container {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

  .back-to-top-btn {
    bottom: 74px;
    right: 16px;
  }
}

/* ==========================================================================
   Ajax Live Search Auto-complete & Search Results Page & 404
   ========================================================================== */
.search-autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 6px;
  background: #ffffff;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(12, 103, 216, 0.16);
  z-index: 120;
  max-height: 380px;
  overflow-y: auto;
}

.autocomplete-list {
  list-style: none;
  margin: 0;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.auto-result-item {
  border-radius: 10px;
  transition: background-color 0.15s ease;
}

.auto-result-item:hover {
  background-color: #f0f7ff;
}

.auto-result-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  text-decoration: none;
  color: var(--ink);
}

.auto-result-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.auto-result-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #eef6fc;
  display: grid;
  place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}

.auto-result-info {
  flex: 1;
  min-width: 0;
}

.auto-result-title {
  display: block;
  font-size: 13.5px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
}

.auto-result-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--muted);
}

.auto-result-badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 11px;
}

.badge-blue { background: #e0f2fe; color: #0369a1; }
.badge-purple { background: #f3e8ff; color: #7e22ce; }
.badge-green { background: #dcfce7; color: #15803d; }
.badge-orange { background: #ffedd5; color: #c2410c; }
.badge-teal { background: #ccfbf1; color: #0f766e; }

.auto-empty-item {
  padding: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* Search Results Hero Band */
.search-results-page {
  padding-bottom: 60px;
}

.search-hero-band {
  background: linear-gradient(180deg, #eaf6ff 0%, #ffffff 100%);
  padding: 48px 20px 32px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.search-hero-inner {
  max-width: 780px;
  margin: 0 auto;
}

.search-kicker {
  display: inline-block;
  font-size: 13px;
  font-weight: 900;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.search-page-title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 900;
  color: var(--deep-blue);
  margin: 0 0 10px;
}

.search-page-title span {
  color: var(--blue);
}

.search-count-badge {
  display: inline-block;
  background: #ffffff;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--muted);
  border: 1px solid var(--line);
  box-shadow: 0 2px 6px rgba(12, 103, 216, 0.05);
  margin-bottom: 24px;
}

.search-count-badge strong {
  color: var(--blue);
}

/* Search Refine Form */
.search-refine-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.search-refine-input-wrap {
  display: flex;
  width: 100%;
  max-width: 580px;
  background: #ffffff;
  border: 2px solid var(--blue);
  border-radius: 999px;
  padding: 4px 6px 4px 18px;
  box-shadow: 0 8px 24px rgba(12, 103, 216, 0.12);
}

.search-refine-input-wrap input {
  flex: 1;
  border: 0;
  outline: none;
  font-size: 15px;
  background: transparent;
}

.search-refine-btn {
  padding: 0 22px;
  height: 42px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  border: 0;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.2s ease;
}

.search-refine-btn:hover {
  background: var(--deep-blue);
}

.search-filter-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.filter-pill {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  background: #ffffff;
  border: 1.5px solid var(--line);
  text-decoration: none;
  transition: all 0.2s ease;
}

.filter-pill:hover,
.filter-pill.is-active {
  background: var(--blue);
  color: #ffffff;
  border-color: var(--blue);
}

/* Results Grid */
.search-content-container {
  width: min(1180px, calc(100% - 40px));
  margin: 36px auto 0;
}

.search-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 24px;
}

.search-result-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(12, 103, 216, 0.06);
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
}

.search-result-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(12, 103, 216, 0.12);
  border-color: #bee3f8;
}

.card-thumb-link {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  background: #f1f5f9;
  overflow: hidden;
}

.search-result-card.aspect-book .card-thumb-link {
  aspect-ratio: 4 / 3;
}

.search-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-card-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 36px;
  font-weight: 900;
}

.card-type-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.search-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.search-card-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.35;
}

.search-card-title a {
  color: var(--deep-blue);
  text-decoration: none;
}

.search-card-title a:hover {
  color: var(--blue);
}

.search-card-excerpt {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
  margin: 0 0 14px;
  flex: 1;
}

.search-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  color: var(--muted);
}

.search-view-btn {
  color: var(--blue);
  font-weight: 900;
  text-decoration: none;
}

/* Search Pagination */
.search-pagination {
  margin-top: 36px;
  text-align: center;
}

.search-pagination ul {
  display: inline-flex;
  gap: 6px;
  list-style: none;
  padding: 0;
}

.search-pagination li a,
.search-pagination li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 800;
  text-decoration: none;
}

.search-pagination li span.current {
  background: var(--blue);
  color: #ffffff;
  border-color: var(--blue);
}

/* Empty State */
.search-empty-state {
  text-align: center;
  padding: 48px 20px;
  background: #ffffff;
  border-radius: 24px;
  border: 1.5px dashed #cbd5e1;
  max-width: 680px;
  margin: 20px auto 40px;
}

.empty-icon-wrap {
  margin-bottom: 16px;
}

.empty-emoji {
  font-size: 54px;
}

.search-empty-state h2 {
  font-size: 22px;
  font-weight: 900;
  color: var(--deep-blue);
  margin: 0 0 8px;
}

.search-empty-state p {
  font-size: 14px;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 20px;
  line-height: 1.5;
}

.empty-suggestions {
  margin-bottom: 24px;
}

.empty-suggestions strong {
  display: block;
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 10px;
}

.suggestion-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.suggestion-chips a {
  padding: 5px 12px;
  background: #f1f5f9;
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
}

.suggestion-chips a:hover {
  background: #e2e8f0;
  color: var(--blue);
}

.empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 900;
  text-decoration: none;
  transition: all 0.2s ease;
}

.action-btn.is-primary {
  background: var(--blue);
  color: #fff;
}

.action-btn.is-secondary {
  background: var(--orange);
  color: #fff;
}

.action-btn.is-outline {
  background: #f8fafc;
  color: var(--ink);
  border: 1.5px solid var(--line);
}

/* ==========================================================================
   404 Error Page
   ========================================================================== */
.error-404-page {
  padding: 60px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  background: linear-gradient(180deg, #f0f7fd 0%, #fff 100%);
}

.error-404-card {
  max-width: 600px;
  width: 100%;
  text-align: center;
  background: #ffffff;
  padding: 48px 32px;
  border-radius: 28px;
  border: 1.5px solid var(--line);
  box-shadow: 0 16px 42px rgba(12, 103, 216, 0.09);
}

.error-illustration {
  margin-bottom: 20px;
}

.error-badge-404 {
  display: block;
  font-size: clamp(56px, 8vw, 84px);
  font-weight: 900;
  color: var(--blue);
  line-height: 1;
  letter-spacing: -0.04em;
}

.error-emoji-char {
  font-size: 42px;
  margin-top: 6px;
  display: block;
}

.error-title {
  font-size: clamp(20px, 3.5vw, 26px);
  font-weight: 900;
  color: var(--deep-blue);
  margin: 0 0 10px;
}

.error-desc {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 auto 24px;
}

.error-search-form {
  max-width: 440px;
  margin: 0 auto 28px;
}

.error-input-wrap {
  display: flex;
  align-items: center;
  background: #f8fafc;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 4px 6px 4px 14px;
}

.error-input-wrap .search-icon {
  color: var(--muted);
  display: flex;
  align-items: center;
}

.error-input-wrap .search-icon svg {
  width: 18px;
  height: 18px;
}

.error-input-wrap input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  padding: 0 10px;
  font-size: 14px;
}

.error-input-wrap button {
  padding: 0 18px;
  height: 38px;
  background: var(--blue);
  color: #fff;
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  font-size: 13.5px;
  cursor: pointer;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.error-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 900;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-home {
  background: var(--blue);
  color: #fff;
}

.btn-library {
  background: #f1f5f9;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-games {
  background: #fff7ed;
  color: var(--orange);
  border: 1px solid #fed7aa;
}

/* ==========================================================================
   CHUYÊN BIỆT: FIX VỠ LAYOUT SECTION TRÒ CHƠI TƯƠNG TÁC & GÓC PHỤ HUYNH/GIÁO VIÊN
   ========================================================================== */

/* 1. SECTION TRÒ CHƠI TƯƠNG TÁC (.games-band) */
.feature-band.games-band,
.chanhlo-games-band {
  display: grid !important;
  grid-template-columns: 240px minmax(0, 1fr) !important;
  gap: 24px !important;
  align-items: stretch !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

.games-band .band-intro {
  min-width: 0 !important;
  flex-shrink: 0 !important;
}

.games-band .game-wrapper {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

.game-showcase {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 16px !important;
  width: 100% !important;
  min-width: 0 !important;
}

.game-card {
  min-width: 0 !important;
  overflow: hidden !important;
}

.game-card__body {
  min-width: 0 !important;
}

.game-card__title {
  word-break: break-word !important;
}

.games-slider-container {
  position: relative !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  padding: 4px 2px !important;
}

.games-slider-rail {
  display: flex !important;
  gap: 12px !important;
  overflow-x: auto !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  scroll-behavior: smooth !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  padding-bottom: 8px !important;
}

.games-slider-rail::-webkit-scrollbar {
  display: none !important;
}

.game-slide-card {
  flex: 0 0 215px !important;
  min-width: 215px !important;
  max-width: 215px !important;
}

@media (max-width: 1024px) {
  .feature-band.games-band,
  .chanhlo-games-band {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }

  .games-band .band-intro {
    width: 100% !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
  }
}

@media (max-width: 720px) {
  .game-showcase {
    grid-template-columns: 1fr !important;
  }

  .games-band .band-intro {
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  .game-slide-card {
    flex: 0 0 190px !important;
    min-width: 190px !important;
    max-width: 190px !important;
  }
}

/* 2. SECTION GÓC PHỤ HUYNH & GÓC GIÁO VIÊN (.audience-grid) */
.audience-grid,
.chanhlo-audience-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 24px !important;
  width: min(1180px, calc(100% - 56px)) !important;
  margin: 24px auto 0 !important;
}

@media (max-width: 1080px) and (min-width: 681px) {
  .audience-grid,
  .chanhlo-audience-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    width: min(100% - 28px, 1180px) !important;
    margin: 20px auto 0 !important;
  }
}

@media (max-width: 680px) {
  .feature-band {
    margin-top: 14px !important;
  }

  .audience-grid,
  .chanhlo-audience-grid,
  .news-section {
    width: min(100% - 28px, 1180px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .audience-grid,
  .chanhlo-audience-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    margin-top: 14px !important;
    margin-bottom: 0 !important;
  }

  .news-section {
    margin-top: 14px !important;
    margin-bottom: 20px !important;
    padding: 20px 18px !important;
  }

  .audience-card,
  .chanhlo-audience-card {
    position: relative !important;
    display: block !important;
    padding: 0 !important;
    border-radius: 20px !important;
    border: 1px solid rgba(12, 103, 216, 0.12) !important;
    box-shadow: 0 8px 24px rgba(15, 46, 90, 0.08) !important;
    min-height: 236px !important;
    overflow: hidden !important;
  }

  .audience-card.teacher {
    background: #faf4ff !important;
    border-color: #ebd7ff !important;
  }

  .audience-card.parents {
    background: #f0f8ff !important;
    border-color: #d2ecff !important;
  }

  /* Hình ảnh nằm DƯỚI text, chiếm góc phải card và có hiệu ứng mờ dần về bên trái */
  .audience-card__media {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 62% !important;
    max-width: 250px !important;
    height: 100% !important;
    margin: 0 !important;
    z-index: 1 !important;
    pointer-events: none !important;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: flex-end !important;
    mask-image: linear-gradient(to left, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 100%) !important;
    -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 100%) !important;
  }

  .audience-card__media img,
  .audience-card img {
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
    object-position: right bottom !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    filter: saturate(1.15) !important;
  }

  /* Nội dung nằm TRÊN hình ảnh với lớp phủ mờ nhẹ (Soft Overlay), đảm bảo 100% không bị đè chữ */
  .audience-card__content {
    position: relative !important;
    z-index: 2 !important;
    padding: 22px 20px 20px 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    min-height: 236px !important;
  }

  .audience-card.teacher .audience-card__content {
    background: linear-gradient(
      90deg,
      rgba(250, 244, 255, 0.98) 0%,
      rgba(250, 244, 255, 0.92) 50%,
      rgba(250, 244, 255, 0.55) 75%,
      rgba(250, 244, 255, 0.08) 100%
    ) !important;
    backdrop-filter: blur(3px) !important;
    -webkit-backdrop-filter: blur(3px) !important;
  }

  .audience-card.parents .audience-card__content {
    background: linear-gradient(
      90deg,
      rgba(240, 248, 255, 0.98) 0%,
      rgba(240, 248, 255, 0.92) 50%,
      rgba(240, 248, 255, 0.55) 75%,
      rgba(240, 248, 255, 0.08) 100%
    ) !important;
    backdrop-filter: blur(3px) !important;
    -webkit-backdrop-filter: blur(3px) !important;
  }

  .audience-card__title {
    font-size: 22px !important;
    margin: 0 0 6px !important;
    line-height: 1.2 !important;
    font-weight: 900 !important;
  }

  .audience-card__desc {
    font-size: 13px !important;
    line-height: 1.45 !important;
    margin: 0 0 10px !important;
    color: #4a5568 !important;
    max-width: 64% !important;
  }

  .audience-card__list {
    margin: 0 0 16px !important;
    padding-left: 18px !important;
    list-style: disc !important;
    max-width: 65% !important;
  }

  .audience-card__list li {
    font-size: 12.5px !important;
    line-height: 1.55 !important;
    color: #2d3748 !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    margin-bottom: 2px !important;
  }

  .audience-card__btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    align-self: flex-start !important;
    min-height: 38px !important;
    padding: 0 20px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    border-radius: 999px !important;
    white-space: nowrap !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14) !important;
  }
}

/* 3. ẨN SCROLL BAR CHO CÁC KHỐI CUỘN NGANG THEO YÊU CẦU */
.grade-pills,
.home-rail,
.content-grid,
.shelf-band .home-rail,
.tools-band .home-rail,
.shelf-band-rail,
.games-slider-rail {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.grade-pills::-webkit-scrollbar,
.home-rail::-webkit-scrollbar,
.content-grid::-webkit-scrollbar,
.shelf-band .home-rail::-webkit-scrollbar,
.tools-band .home-rail::-webkit-scrollbar,
.shelf-band-rail::-webkit-scrollbar,
.games-slider-rail::-webkit-scrollbar {
  display: none !important;
}

/* 4. ĐẢM BẢO TUYỆT ĐỐI HEADER MOBILE CHỈ HIỂN THỊ ICON SITE + SITE TITLE */
@media (max-width: 1080px) {
  .site-header {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    height: 60px !important;
    min-height: 60px !important;
    padding: 0 16px !important;
  }

  .site-header .nav,
  .site-header .desktop-nav,
  .site-header #primary-menu,
  #primary-menu,
  .site-header .header-actions,
  .site-header .mobile-toggle {
    display: none !important;
  }
}
