/* ============================================
   STARTER CSS — based on Playbook design-system v1.0.0
   ============================================ */

:root {
  /* Trịnh Lê Minh An — palette theo Outseta: peach/cream warm + terracotta CTA */
  --primary-color: #c4533d;     /* terracotta — CTA chính */
  --primary-dark:  #9e3e2c;
  --primary-light: #e3826e;
  --primary-bg:    #fde8e0;
  --secondary-color: #b8417a;   /* magenta cho handwritten accent */
  --secondary-dark:  #8e2c5e;
  --accent-color:    #6f8f5c;   /* sage làm secondary */
  --dark-color:  #1f1812;
  --light-color: #fff4e6;
  --paper:       #ffffff;       /* card pure white */
  --text-color:  #1f1812;
  --text-light:  #54493d;
  --text-muted:  #8a7d6e;
  --white: #ffffff;
  --border-color: #f0e0cf;
  --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  --gradient-warm:    linear-gradient(135deg, #fff4e6 0%, #ffe4cc 50%, #ffd4b3 100%);
  --gradient-hero:    radial-gradient(ellipse 80% 70% at 50% 0%, #ffe8d4 0%, #fff4e6 50%, #ffeed8 100%);
  --shadow-sm:   0 2px 10px rgba(60,40,20,0.06);
  --shadow-md:   0 8px 24px rgba(60,40,20,0.10);
  --shadow-lg:   0 20px 50px rgba(60,40,20,0.14);
  --shadow-card: 0 4px 12px rgba(60,40,20,0.06), 0 1px 3px rgba(60,40,20,0.04);
  --shadow-glow: 0 0 24px rgba(196,83,61,0.25);
  --border-radius: 14px;
  --border-radius-lg: 22px;
  --border-radius-xl: 32px;
  --transition: all 0.3s ease;
  --font-primary: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Playfair Display', 'Be Vietnam Pro', Georgia, serif;
  --font-script:  'Patrick Hand', 'Caveat', cursive;  /* Patrick Hand hỗ trợ VN */
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
@media (max-width: 768px) { html { scroll-padding-top: 80px; } }

/* === Custom scrollbar === */
html { scrollbar-color: var(--primary-color) var(--primary-bg); scrollbar-width: thin; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--primary-bg); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary-color), var(--primary-dark));
  border-radius: 100px;
  border: 3px solid var(--primary-bg);
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--primary-dark), var(--secondary-dark));
  background-clip: padding-box;
  border-color: var(--primary-bg);
}
::-webkit-scrollbar-corner { background: var(--primary-bg); }
/* Inner scrollbars (textarea, etc.) thinner */
textarea::-webkit-scrollbar, .adm-side::-webkit-scrollbar { width: 8px; }
textarea::-webkit-scrollbar-thumb { border-width: 2px; }
.adm-side {
  scrollbar-color: rgba(255,255,255,0.25) transparent;
}
.adm-side::-webkit-scrollbar-track { background: transparent; }
.adm-side::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.18);
  border: 2px solid transparent;
}
body {
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-color);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary-dark); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--secondary-color); }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.3;
  color: var(--dark-color);
}
h1 { font-size: 3rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.5rem; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
section { padding: 2rem 0; }
.section-alt { background: var(--light-color); }

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border: none;
  border-radius: var(--border-radius);
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  line-height: 1.4;
}
.btn { border-radius: 100px; }
.btn-primary { background: var(--primary-color); color: var(--white); box-shadow: 0 4px 12px rgba(196,83,61,0.25); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(196,83,61,0.35); color: var(--white); }
.btn-outline { background: var(--white); border: 1.5px solid var(--dark-color); color: var(--dark-color); box-shadow: var(--shadow-sm); }
.btn-outline:hover { background: var(--dark-color); color: var(--white); }
.btn-white { background: var(--white); color: var(--dark-color); box-shadow: var(--shadow-sm); border: 1.5px solid var(--border-color); }
.btn-white:hover { border-color: var(--dark-color); }
.btn-lg { padding: 1rem 2.2rem; font-size: 1.05rem; }
.btn i, .btn svg { width: 20px; height: 20px; }

/* === Header === */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  transition: var(--transition);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}
.logo {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  text-decoration: none;
  line-height: 1;
}
.logo-img { height: 64px; width: auto; max-width: none; display: block; object-fit: contain; }
.logo-tagline {
  font-family: var(--font-primary);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--dark-color);
  letter-spacing: 0.02em;
  white-space: nowrap;
  margin-top: -0.1rem;
}
.logo-tagline-sep { color: var(--primary-dark); font-weight: 700; margin: 0 0.2rem; }

.nav-menu { display: flex; align-items: center; gap: 0.3rem; }
.nav-menu a:not(.btn) {
  color: var(--text-color);
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  line-height: 1;
}
.nav-menu a:not(.btn):hover, .nav-menu a:not(.btn).active {
  color: var(--primary-dark);
  background: var(--primary-bg);
}
.nav-menu .btn-primary { color: var(--white); }
.nav-menu .btn-primary i, .nav-menu .btn-primary svg { color: var(--white); stroke: var(--white); }
@media (min-width: 1025px) {
  .nav-menu > a:not(.btn) > i,
  .nav-menu > a:not(.btn) > svg { display: none !important; }
}
.nav-cta { margin-left: 0.5rem; }
.nav-cta .btn { padding: 0.6rem 1.5rem; font-size: 0.9rem; }

.mobile-header-actions { display: none; align-items: center; gap: 0.25rem; }
.mobile-call-btn {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-color);
  color: var(--white);
}
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  width: 40px; height: 40px;
  border-radius: 10px;
}
.mobile-toggle:hover { background: var(--primary-bg); }

.nav-drawer-head, .nav-drawer-footer { display: none; }

/* === Hero === */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--gradient-hero);
  overflow: hidden;
  padding-top: clamp(110px, 14vw, 160px);
  padding-bottom: 2rem;
}
.hero .container { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.hero-content { max-width: 650px; }
.hero h1 { color: var(--dark-color); font-size: 3rem; margin-bottom: 1rem; line-height: 1.3; padding-top: 0.15em; }
.hero h1 span { color: var(--primary-dark); }
.hero-slogan { color: var(--secondary-color); font-style: italic; margin-bottom: 1rem; }
.hero p { font-size: 1.1rem; margin-bottom: 1.5rem; color: var(--text-light); }
.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.hero-image { flex-shrink: 0; }
.hero-image-circle {
  width: 380px;
  height: 380px;
  border-radius: 50%;
  overflow: hidden;
  border: 6px solid var(--primary-color);
  box-shadow: var(--shadow-glow);
  position: relative;
}
.hero-image-circle img {
  position: absolute; width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s;
}
.hero-image-circle img.active { opacity: 1; }

/* === Forms === */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--dark-color); margin-bottom: 0.35rem; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  box-sizing: border-box;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* === Modal === */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--white);
  border-radius: var(--border-radius-lg);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}
.modal-close {
  background: rgba(0,0,0,0.05);
  border: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.modal-body { padding: 1.25rem; }

/* === Footer === */
.site-footer { background: var(--dark-color); color: var(--white); padding: 3rem 0 1rem; }
.site-footer h4 { color: var(--white); margin-bottom: 1rem; font-size: 1rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
.footer-col a { display: block; color: rgba(255,255,255,0.8); padding: 0.25rem 0; font-size: 0.9rem; }
.footer-col a:hover { color: var(--primary-color); }
.footer-bottom { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.1); text-align: center; }
.footer-bottom a { color: var(--primary-color); }
.contact-social { display: flex; gap: 0.75rem; margin-top: 1rem; }
.contact-social a {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
}

/* === Loading screen === */
.loading-screen {
  position: fixed; inset: 0;
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  z-index: 99999;
  transition: opacity 0.5s;
}
.loading-screen.hidden { opacity: 0; pointer-events: none; }
.loading-spinner { text-align: center; padding: 0 1.5rem; }
.loading-spinner img {
  height: clamp(60px, 14vw, 110px) !important;
  width: auto !important;
  max-width: min(85vw, 420px) !important;
  object-fit: contain;
  margin: 0 auto 1.25rem !important;
}
.loading-bar {
  width: 120px; height: 3px;
  background: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
  margin: 0 auto;
}
.loading-bar::after {
  content: '';
  display: block;
  width: 40%;
  height: 100%;
  background: var(--primary-color);
  border-radius: 3px;
  animation: loadingSlide 1.2s ease infinite;
}
@keyframes loadingSlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* === Floating actions === */
.floating-actions {
  position: fixed;
  bottom: 1rem; right: 1rem;
  display: flex; flex-direction: column;
  gap: 0.5rem;
  z-index: 998;
}
.floating-btn {
  width: 50px; height: 50px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s;
}
.floating-btn:hover { transform: scale(1.1); }
.floating-btn.messenger { background: #1877F2; }
.floating-btn.zalo { background: #0068FF; }
.floating-btn.phone { background: var(--primary-color); color: var(--white); }

/* === Animations === */
.animate-on-scroll { opacity: 0; transform: translateY(20px); transition: 0.6s; }
.animate-on-scroll.visible { opacity: 1; transform: none; }

/* ============================================
   MỸ HẠNH — Book blog additions
   ============================================ */

/* ============================================
   HERO Outseta-style — peach gradient + bold highlights + pill tabs + handwritten arrows
   ============================================ */
body { background: var(--gradient-hero); }

.hero-editorial {
  display: block !important;
  min-height: auto;
  padding: clamp(120px, 13vw, 160px) 0 clamp(2rem, 4vw, 3rem);
  position: relative;
  overflow: visible;
  text-align: center;
  background: transparent;
  align-items: initial;
}
.hero-editorial .container {
  display: block !important;
  position: relative;
  z-index: 1;
  text-align: center;
}
.hero-editorial-inner {
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
}
.hero-editorial h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.35;
  letter-spacing: -0.005em;
  color: var(--dark-color);
  margin-bottom: 1.75rem;
  font-weight: 500;
  max-width: 880px;
}
.hero-editorial h1 strong {
  font-weight: 800;
  color: var(--dark-color);
  text-decoration: underline;
  text-decoration-color: var(--primary-color);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.hero-editorial .hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

/* Pill tabs row (MEMBERSHIP SITES, COURSES, …) */
.hero-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  max-width: 800px;
  margin: 0 auto 2rem;
  position: relative;
}
.hero-pills .pill {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1.1rem;
  border: 1.5px solid var(--dark-color);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dark-color);
  background: transparent;
  white-space: nowrap;
  transition: var(--transition);
}
.hero-pills .pill:hover, .hero-pills .pill.active {
  background: var(--dark-color);
  color: var(--white);
}

/* Handwritten annotations với mũi tên cong */
.handwritten {
  font-family: var(--font-script);
  font-size: 1.4rem;
  color: var(--secondary-color);
  line-height: 1.2;
  letter-spacing: 0.005em;
  position: relative;
}
.handwritten-anno {
  position: absolute;
  font-family: var(--font-script);
  font-size: 1.3rem;
  color: var(--secondary-color);
  line-height: 1.15;
  text-transform: uppercase;
  max-width: 200px;
  z-index: 2;
  pointer-events: none;
}
.handwritten-anno.left {
  left: -2rem;
  top: 50%;
  transform: translateY(-50%) rotate(-4deg);
  text-align: right;
}
.handwritten-anno.right {
  right: -2rem;
  top: 50%;
  transform: translateY(-50%) rotate(4deg);
  text-align: left;
}
.handwritten-anno svg.arrow { display: block; margin-top: 0.4rem; }
@media (max-width: 1100px) {
  .handwritten-anno { display: none; }
}

/* Searchbar centered (override) */
.hero-editorial .searchbar { margin: 0 auto; max-width: 540px; }

/* ============================================
   HERO SHOWCASE — 3 card ngang Outseta-style
   ============================================ */
.hero-showcase-wrap {
  padding: 1rem 0 4rem;
  position: relative;
  display: block;
}
.hero-showcase-wrap .container { display: block !important; }
.hero-showcase {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  position: relative;
  align-items: stretch;
}
.hero-showcase .showcase-card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-xl);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: visible;
}
.hero-showcase .showcase-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.hero-showcase .showcase-cover {
  aspect-ratio: 16 / 10;
  border-radius: var(--border-radius);
  overflow: hidden;
  background: linear-gradient(135deg, #fef3e2, #fde2c5);
  position: relative;
}
.hero-showcase .showcase-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  color: transparent;
  font-size: 0;
}
.hero-showcase .showcase-card:hover .showcase-cover img { transform: scale(1.04); }
.hero-showcase .showcase-corner-abs {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 32px; height: 32px;
  background: rgba(255,255,255,0.95);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--dark-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  z-index: 2;
}
.hero-showcase .showcase-card:hover .showcase-corner-abs {
  background: var(--primary-color);
  color: var(--white);
  transform: rotate(-15deg);
}

/* Brand row: title bên trái, avatars bên phải (Outseta) */
.hero-showcase .showcase-brand {
  padding: 1rem 0.7rem 0.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.hero-showcase .showcase-title-block {
  flex: 1; min-width: 0;
}
.hero-showcase .showcase-title-block .author {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.25rem;
  font-weight: 600;
}
.hero-showcase .showcase-title-block h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--dark-color);
  margin: 0;
  letter-spacing: -0.005em;
}
.hero-showcase .showcase-title-block .script {
  font-family: var(--font-script);
  font-size: 1.5rem;
  color: var(--secondary-color);
  line-height: 1;
  margin-top: 0.3rem;
}
.hero-showcase .avatars { display: flex; flex-shrink: 0; }
.hero-showcase .avatars img {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid var(--white);
  object-fit: cover;
  background: linear-gradient(135deg, #fde2c5, #f0bfa3);
}
.hero-showcase .avatars img + img { margin-left: -10px; }

/* Footer: SÁCH NỔI BẬT · MUA TRÊN · [icon] (Outseta "COURSE · BUILT ON · WEBFLOW") */
.hero-showcase .showcase-footer {
  padding: 0.7rem 0.7rem 0.2rem;
  border-top: 1px solid var(--border-color);
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-light);
  flex-wrap: wrap;
}
.hero-showcase .showcase-footer .platform {
  display: inline-flex; align-items: center; gap: 0.3rem;
  color: var(--dark-color);
}
.hero-showcase .showcase-footer .platform i { width: 12px; height: 12px; }
.hero-showcase .showcase-footer .dot { color: var(--text-muted); }

/* Handwritten arrows trỏ vào card */
.showcase-anno {
  position: absolute;
  font-family: var(--font-script);
  font-size: 1.25rem;
  color: var(--secondary-color);
  line-height: 1.15;
  text-transform: uppercase;
  z-index: 3;
  pointer-events: none;
  letter-spacing: 0.005em;
}
.showcase-anno.top-left {
  top: -3.5rem;
  left: -1rem;
  transform: rotate(-4deg);
  text-align: center;
}
.showcase-anno.top-right {
  top: -3.5rem;
  right: -1rem;
  transform: rotate(4deg);
  text-align: center;
}
.showcase-anno svg.arrow { display: block; margin: 0.3rem auto 0; color: var(--secondary-color); }

@media (max-width: 1024px) {
  .hero-showcase { grid-template-columns: 1fr; gap: 1rem; }
  .showcase-anno { display: none; }
}

@media (max-width: 768px) {
  /* Hero mobile tightening */
  .hero-editorial { padding: 100px 0 1.5rem !important; }
  .hero-editorial h1 { font-size: 1.4rem !important; line-height: 1.4; margin-bottom: 1rem; }
  .hero-editorial .hero-buttons { gap: 0.5rem; margin-bottom: 1.5rem; }
  .hero-editorial .hero-buttons .btn { padding: 0.7rem 1.2rem; font-size: 0.95rem; }
  .hero-pills { gap: 0.4rem; margin-bottom: 1.5rem; }
  .hero-pills .pill { padding: 0.35rem 0.75rem; font-size: 0.7rem; }
  .hero-editorial .searchbar { padding: 0.4rem 0.7rem; }
  .hero-editorial .searchbar input { font-size: 0.9rem; }
  .hero-showcase-wrap { padding: 1rem 0 2.5rem; }

  /* Showcase card (already 1col) */
  .hero-showcase .showcase-cover { aspect-ratio: 16 / 10; }
  .hero-showcase .showcase-title-block h3 { font-size: 1.2rem; }

  /* Book grid mobile: 1 col, full bleed */
  .book-grid { grid-template-columns: 1fr; gap: 1rem; }
  .post-list { grid-template-columns: 1fr; gap: 1rem; }

  /* Section spacing tight */
  .section { padding: 2.5rem 0; }
  .section-title h2 { font-size: 1.6rem; }
  .section-subtitle { font-size: 0.9rem; margin-bottom: 1.5rem; }

  /* Post detail */
  .post-article h1 { font-size: 1.6rem !important; }
  .post-article .cover { margin-bottom: 1rem; border-radius: var(--border-radius); }
  .post-content { font-size: 1rem !important; line-height: 1.7; }
  .affiliate-card { flex-direction: column; align-items: flex-start; padding: 1rem !important; }
  .affiliate-card img { width: 80px !important; }
  .share-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1.5rem 0 !important;
  }
  .share-row .btn {
    width: 100%;
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
    justify-content: center;
    white-space: nowrap;
  }
  .share-row .btn i { width: 18px; height: 18px; flex-shrink: 0; }

  /* Sách detail mobile: stack cover + info */
  .book-detail { grid-template-columns: 1fr !important; gap: 1.25rem !important; }
  .book-detail > div:first-child { aspect-ratio: 4 / 3 !important; max-width: 240px; margin: 0 auto; }

  /* Doc page (privacy/cookies/terms/giới thiệu/liên hệ) */
  .doc-page { padding: 130px 1.25rem 3rem; }
  .doc-page h1 { font-size: 1.8rem; line-height: 1.3; padding-top: 0.15em; }
  .doc-page h2 { font-size: 1.25rem; margin-top: 2rem; padding-top: 0.15em; }

  /* Admin shell mobile (vẫn giữ stacked sidebar) */
  .admin-side h1 { font-size: 1.05rem; }
  .admin-side a { font-size: 0.9rem; padding: 0.4rem 0.7rem; }

  /* Profile page avatar header stack */
  #profileBox > div:first-child { flex-direction: column; align-items: flex-start !important; gap: 1rem !important; }

  /* Header mobile — logo nhỏ hơn */
  .logo-tagline { font-size: 1.1rem !important; }

  /* Hero showcase title block + avatar không quá dài */
  .hero-showcase .showcase-brand { padding: 0.85rem 0.6rem 0.4rem; }
}

.section { padding: 4rem 0; }
.section-title {
  text-align: center;
  margin-bottom: 0.5rem;
}
.section-title .eyebrow {
  font-family: var(--font-script);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--secondary-dark);
  display: block;
  line-height: 1.2;
  margin-bottom: 0.4rem;
  letter-spacing: 0.01em;
}
.section-title h2 { font-size: 2rem; }
.section-subtitle {
  text-align: center;
  color: var(--text-light);
  max-width: 640px;
  margin: 0.4rem auto 2.5rem;
  font-size: 1rem;
}

/* ============================================
   Book card — Outseta showcase style
   ============================================ */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}
.book-card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
  box-shadow: var(--shadow-card);
}
.book-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.book-card > a:first-child { display: contents; color: inherit; }
.book-card .cover {
  aspect-ratio: 16 / 11;
  background: linear-gradient(135deg, #fef3e2, #fde2c5);
  margin: 0.85rem 0.85rem 0;
  border-radius: var(--border-radius);
  overflow: hidden;
  position: relative;
}
.book-card .cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  background: transparent;
  color: transparent; /* hide alt text khi img broken */
  font-size: 0;
}
.book-card .cover img[alt]:after {
  content: ''; display: block; width: 100%; height: 100%;
  background: linear-gradient(135deg, #fef3e2, #fde2c5);
}
.book-card:hover .cover img { transform: scale(1.04); }
.book-card .corner {
  position: absolute;
  top: 1rem; right: 1rem;
  background: rgba(255,255,255,0.95);
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--dark-color);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.book-card:hover .corner { background: var(--primary-color); color: var(--white); transform: rotate(-15deg); }

/* Brand row: title bên trái, avatar(s) bên phải (Outseta-style) */
.book-card .brand-row {
  padding: 1.1rem 1.4rem 0.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.book-card .brand-row h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.2;
  color: var(--dark-color);
  margin: 0;
}
.book-card .brand-row .author-script {
  font-family: var(--font-script);
  font-size: 1.5rem;
  color: var(--secondary-color);
  line-height: 1;
}
.book-card .avatars { display: flex; }
.book-card .avatars img {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid var(--white);
  object-fit: cover;
  background: var(--paper);
}
.book-card .avatars img + img { margin-left: -10px; }

/* Footer row: SÁCH · TỪ · [icon] — Outseta "COURSE/BOOK · BUILT ON · WEBFLOW" */
.book-card .footer-row {
  padding: 0.6rem 1.4rem 1.2rem;
  border-top: 1px solid var(--border-color);
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-light);
  flex-wrap: wrap;
}
.book-card .footer-row .dot { color: var(--text-muted); }
.book-card .footer-row .platform {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--dark-color);
}
.book-card .footer-row .platform i { width: 14px; height: 14px; }

/* Backward compat */
.book-card .body { padding: 1.1rem 1.4rem; }
.book-card .author { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.book-card h3 { font-family: var(--font-display); font-size: 1.3rem; color: var(--dark-color); line-height: 1.25; font-weight: 700; }
.book-card .meta {
  margin-top: 0.6rem;
  display: flex; gap: 0.4rem;
  flex-wrap: wrap;
  font-size: 0.72rem;
}
.book-card .meta .tag {
  background: var(--primary-bg);
  color: var(--primary-dark);
  padding: 0.2rem 0.7rem;
  border-radius: 100px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.68rem;
}

/* Smart-link buttons (TikTok/Shopee/...) */
.platform-row { display: flex; gap: 0.5rem; flex-wrap: wrap; padding: 0 1.1rem 1.1rem; }
.platform-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
  background: var(--white);
  color: var(--text-color);
  transition: var(--transition);
}
.platform-btn:hover { background: var(--primary-bg); color: var(--primary-dark); border-color: var(--primary-light); }
.platform-btn.featured { background: var(--secondary-color); color: var(--white); border-color: transparent; }

/* Post (blog) card */
.post-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; }
.post-card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.post-card .cover { aspect-ratio: 16/10; background: var(--paper); overflow: hidden; }
.post-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.post-card .body { padding: 1.1rem 1.2rem 1.3rem; flex: 1; display: flex; flex-direction: column; gap: 0.5rem; }
.post-card h3 { font-family: var(--font-display); font-size: 1.25rem; color: var(--dark-color); line-height: 1.35; }
.post-card .excerpt { color: var(--text-light); font-size: 0.95rem; }
.post-card .post-meta {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.82rem; color: var(--text-muted);
  margin-top: auto;
}
.post-card .post-meta img.avatar { width: 24px; height: 24px; border-radius: 50%; }

/* Section spotlight (Góc của An — feel cá nhân hơn) */
.spotlight {
  background: var(--gradient-warm);
  border-radius: var(--border-radius-lg);
  padding: 2.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}
.spotlight .quote {
  font-family: var(--font-script);
  font-style: italic;
  font-size: 1.6rem;
  color: var(--secondary-dark);
  line-height: 1.4;
}
.spotlight .img-frame {
  border-radius: var(--border-radius);
  overflow: hidden;
  aspect-ratio: 4/5;
  background: var(--paper);
}
@media (max-width: 768px) {
  .spotlight { grid-template-columns: 1fr; padding: 1.5rem; }
}

/* Search bar */
.searchbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 100px;
  padding: 0.5rem 1rem;
  max-width: 540px;
  margin: 0 auto;
  box-shadow: var(--shadow-sm);
}
.searchbar input { flex: 1; border: none; outline: none; font: inherit; background: transparent; }
.searchbar button { background: var(--primary-color); color: var(--white); border: 0; border-radius: 100px; padding: 0.45rem 1.1rem; font-weight: 600; cursor: pointer; }

/* Pill tabs */
.pill-tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.pill-tabs a {
  padding: 0.4rem 1rem;
  border-radius: 100px;
  background: var(--white);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  font-size: 0.9rem;
  font-weight: 600;
}
.pill-tabs a.active, .pill-tabs a:hover { background: var(--primary-color); color: var(--white); border-color: transparent; }

/* Profile header chips */
.user-chip { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0.7rem; border-radius: 100px; background: var(--primary-bg); color: var(--primary-dark); font-size: 0.85rem; font-weight: 600; }
.user-chip img { width: 24px; height: 24px; border-radius: 50%; }

/* Admin layout */
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-side { background: var(--dark-color); color: var(--white); padding: 1.5rem 1rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-side h1 { color: var(--white); font-size: 1.2rem; margin-bottom: 1rem; }
.admin-side a { display: flex; align-items: center; gap: 0.55rem; padding: 0.6rem 0.85rem; color: rgba(255,255,255,0.8); border-radius: 8px; font-size: 0.95rem; }
.admin-side a:hover, .admin-side a.active { background: rgba(255,255,255,0.08); color: var(--white); }
.admin-main { padding: 2rem; background: var(--paper); }
.admin-main h1 { font-size: 1.6rem; margin-bottom: 1.25rem; }
.admin-card { background: var(--white); border: 1px solid var(--border-color); border-radius: var(--border-radius); padding: 1.25rem; margin-bottom: 1rem; }
.admin-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat { background: var(--white); border: 1px solid var(--border-color); border-radius: var(--border-radius); padding: 1rem 1.2rem; }
.stat .label { color: var(--text-muted); font-size: 0.85rem; }
.stat .value { font-family: var(--font-display); font-size: 1.8rem; color: var(--dark-color); }
.table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.table th, .table td { text-align: left; padding: 0.7rem 0.8rem; border-bottom: 1px solid var(--border-color); }
.table th { color: var(--text-muted); font-weight: 600; background: var(--paper); }
.badge { display: inline-block; padding: 0.15rem 0.55rem; border-radius: 100px; font-size: 0.75rem; font-weight: 600; }
.badge.published { background: var(--primary-bg); color: var(--primary-dark); }
.badge.pending   { background: #fdebd0; color: #b8651b; }
.badge.rejected  { background: #fbe3e3; color: var(--accent-color); }
.badge.draft     { background: #ece8df; color: var(--text-light); }

@media (max-width: 1024px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; display: flex; gap: 0.5rem; flex-wrap: wrap; }
  .admin-side a { padding: 0.4rem 0.8rem; }
}

/* ============================================
   Modal + Toast — theo playbook 02-design/ui-patterns/modal-mobile.md
   ============================================ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  animation: overlayIn 0.2s ease;
  transition: opacity 0.2s ease;
}
@keyframes overlayIn { from { opacity: 0; } }

.modal {
  display: flex; flex-direction: column;
  background: var(--white);
  border-radius: var(--border-radius-lg);
  width: 100%; max-width: 480px;
  max-height: 90vh; overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.25s cubic-bezier(.4,0,.2,1);
  transition: transform 0.2s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}
.modal-header,
.modal-footer { flex: 0 0 auto; padding: 1rem 1.25rem; background: var(--white); }
.modal-header {
  border-bottom: 1px solid var(--border-color);
  display: flex; justify-content: space-between; align-items: center;
}
.modal-header h3 {
  margin: 0; font-family: var(--font-display); font-size: 1.2rem; color: var(--dark-color);
}
.modal-close {
  background: rgba(0,0,0,0.05); border: 0;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-color);
  transition: background 0.15s;
}
.modal-close:hover { background: rgba(0,0,0,0.1); }
.modal-footer {
  border-top: 1px solid var(--border-color);
  display: flex; gap: 0.6rem; justify-content: flex-end;
}
.modal-body { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 1.25rem; }

.btn-danger { background: var(--accent-color); color: #fff; border: none; }
.btn-danger:hover { background: #a8453f; transform: translateY(-2px); color: #fff; }

@media (max-width: 768px) {
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal {
    max-width: 100%; max-height: 90vh;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    animation: sheetUp 0.3s cubic-bezier(.4,0,.2,1);
  }
  @keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
  .modal-footer { padding-bottom: calc(1rem + env(safe-area-inset-bottom)); }
}

.app-toast {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  background: var(--dark-color);
  color: #fff;
  padding: 0.85rem 1.2rem;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  z-index: 9999;
  max-width: 360px;
  transition: opacity 0.2s ease, transform 0.2s ease, bottom 0.2s ease;
  animation: toastIn 0.2s ease;
}
.app-toast.success { background: #2d7a2d; }
.app-toast.error   { background: var(--accent-color); }
.app-toast.warn    { background: #b8651b; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }
@media (max-width: 480px) {
  .app-toast { left: 1rem; right: 1rem; max-width: none; }
}

/* ============================================
   Guide panel + help text (theo playbook 05-admin-panel)
   ============================================ */
.guide-panel {
  background: var(--primary-bg);
  border-left: 3px solid var(--primary-color);
  padding: 0;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  color: var(--text-color);
}
.guide-panel summary {
  cursor: pointer;
  list-style: none;
  padding: 0.6rem 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--primary-dark);
  user-select: none;
  border-radius: 6px;
}
.guide-panel summary::-webkit-details-marker { display: none; }
.guide-panel summary i { width: 16px; height: 16px; flex-shrink: 0; }
.guide-panel summary .chev { margin-left: auto; transition: transform 0.2s; }
.guide-panel[open] summary .chev { transform: rotate(180deg); }
.guide-panel summary:hover { background: rgba(196,83,61,0.06); }
.guide-panel[open] summary { border-bottom: 1px solid rgba(196,83,61,0.15); border-radius: 6px 6px 0 0; }
.guide-panel ul { padding: 0.7rem 0.9rem 0.8rem 2.2rem; margin: 0; list-style: disc; }
.guide-panel li { margin-bottom: 0.35rem; line-height: 1.55; }
.guide-panel li:last-child { margin-bottom: 0; }
.guide-panel code { background: rgba(0,0,0,0.06); padding: 1px 5px; border-radius: 3px; font-size: 0.88em; }
.guide-panel a { color: var(--primary-color); text-decoration: underline; }

.help-text {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-top: 0.3rem;
  line-height: 1.5;
}
.help-text code { background: rgba(0,0,0,0.05); padding: 1px 5px; border-radius: 3px; font-size: 0.88em; }

/* ============================================
   Custom tooltip (theo playbook 02-design/ui-patterns/tooltip.md)
   ============================================ */
.vcl-tooltip {
  position: fixed;
  z-index: 10000;
  background: var(--dark-color);
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.4;
  max-width: 260px;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.15s, transform 0.15s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}
.vcl-tooltip.show { opacity: 1; transform: translateY(0); }
.vcl-tooltip::before {
  content: '';
  position: absolute;
  left: var(--arrow-x, 50%);
  transform: translateX(-50%);
  border: 5px solid transparent;
}
.vcl-tooltip.below::before { top: -10px; border-bottom-color: var(--dark-color); }
.vcl-tooltip.above::before { bottom: -10px; border-top-color: var(--dark-color); }

/* ============================================
   SMART-BUY pill (Pay-with-Google style) — dark pill + circle icon + 3D flip
   ============================================ */
.smart-buy.sb-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.45rem 1.5rem 0.45rem 0.45rem;
  background: #2c2c2c;
  border-radius: 100px;
  border: none;
  color: #fff;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(0,0,0,0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  perspective: 600px;
  min-height: 56px;
  /* Width cố định — không co/giãn theo text khi flip platform */
  min-width: 270px;
  justify-content: flex-start;
}
.smart-buy.sb-pill .sb-text {
  flex: 1;
  text-align: center;
  padding-right: 0.5rem;
}
.smart-buy.sb-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.28);
}
.smart-buy.sb-pill:active { transform: translateY(0); }

.smart-buy.sb-pill .sb-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #2c2c2c;
  border: 1.5px solid rgba(255,255,255,0.85);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.45, 0, 0.25, 1);
  position: relative;
}
.smart-buy.sb-pill .sb-icon img,
.smart-buy.sb-pill .sb-icon svg {
  width: 26px; height: 26px;
  object-fit: contain;
  backface-visibility: hidden;
  border-radius: 4px;
}
.smart-buy.sb-pill .sb-text {
  white-space: nowrap;
  transition: opacity 0.25s ease 0.15s;
}
.smart-buy.sb-pill.sb-flipping .sb-icon { transform: rotateY(180deg); }
.smart-buy.sb-pill.sb-flipping .sb-text { opacity: 0; transition-delay: 0s; }

/* Sizes — width cố định để không "đập" khi đổi platform */
.smart-buy.sb-pill.sb-pill-lg { padding: 0.5rem 1.75rem 0.5rem 0.5rem; font-size: 1.15rem; min-height: 62px; min-width: 320px; }
.smart-buy.sb-pill.sb-pill-lg .sb-icon { width: 50px; height: 50px; }
.smart-buy.sb-pill.sb-pill-lg .sb-icon img, .smart-buy.sb-pill.sb-pill-lg .sb-icon svg { width: 30px; height: 30px; }
.smart-buy.sb-pill.sb-pill-sm { padding: 0.3rem 1rem 0.3rem 0.3rem; font-size: 0.85rem; min-height: 40px; gap: 0.55rem; min-width: 200px; }
.smart-buy.sb-pill.sb-pill-sm .sb-icon { width: 32px; height: 32px; border-width: 1px; }
.smart-buy.sb-pill.sb-pill-sm .sb-icon img, .smart-buy.sb-pill.sb-pill-sm .sb-icon svg { width: 18px; height: 18px; }
.smart-buy.sb-pill.sb-pill-sm .sb-text { padding-right: 0.4rem; }

/* Mobile — full-width nếu container hẹp */
@media (max-width: 480px) {
  .smart-buy.sb-pill { min-width: 0; width: 100%; }
  .smart-buy.sb-pill.sb-pill-lg { min-width: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .smart-buy.sb-pill .sb-icon { transition: none; }
  .smart-buy.sb-pill.sb-flipping .sb-icon { transform: none; }
}

/* ============================================
   SMART-BUY button + modal (gradient style — legacy)
   ============================================ */
.smart-buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 100px;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  font-family: inherit;
  color: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
  position: relative;
  overflow: hidden;
  min-height: 48px;
  letter-spacing: 0.005em;
}
.smart-buy:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.22);
}
.smart-buy:active { transform: translateY(0); }
.smart-buy.sb-flipping .sb-inner { opacity: 0; transform: translateY(-4px); }
.smart-buy .sb-inner {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}
.smart-buy svg { width: 18px; height: 18px; flex-shrink: 0; }
.smart-buy.sb-lg { padding: 1rem 2rem; font-size: 1.05rem; }
.smart-buy.sb-sm { padding: 0.5rem 1rem; font-size: 0.85rem; min-height: 36px; }
.smart-buy.sb-sm svg { width: 14px; height: 14px; }

.sb-fav-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}
.sb-fav-hint a { color: var(--primary-color); text-decoration: underline; }

/* Modal */
.sb-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 10, 5, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.sb-modal-overlay.active { opacity: 1; }
.sb-modal {
  background: var(--white);
  border-radius: 22px;
  padding: 1.75rem 1.5rem;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 24px 60px rgba(0,0,0,0.3);
  transform: scale(0.95);
  transition: transform 0.25s ease;
}
.sb-modal-overlay.active .sb-modal { transform: scale(1); }
.sb-modal-head { text-align: center; margin-bottom: 1.25rem; }
.sb-modal-head strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--dark-color);
  font-weight: 700;
  line-height: 1.3;
}
.sb-modal-sub {
  margin: 0.5rem 0 0;
  color: var(--text-light);
  font-size: 0.92rem;
  line-height: 1.5;
}
.sb-modal-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.85rem 1.2rem;
  border-radius: 100px;
  border: none;
  color: #fff;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 0.5rem;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  transition: transform 0.15s ease;
  min-height: 48px;
}
.sb-modal-btn:hover { transform: translateY(-2px); }
.sb-modal-btn svg { width: 18px; height: 18px; }
.sb-modal-dismiss {
  display: block;
  width: 100%;
  padding: 0.7rem 1rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  margin-top: 0.5rem;
}
.sb-modal-dismiss:hover { color: var(--dark-color); }
@media (max-width: 480px) {
  .sb-modal { padding: 1.5rem 1.1rem; border-radius: 18px; }
  .sb-modal-head strong { font-size: 1.15rem; }
}

/* ============================================
   Star rating widget (interactive)
   ============================================ */
.rating-stars {
  display: inline-flex;
  flex-direction: row-reverse;
  gap: 0.25rem;
  user-select: none;
}
.rating-stars input { position: absolute; opacity: 0; pointer-events: none; }
.rating-stars label {
  cursor: pointer;
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #d8c8a8;
  transition: color 0.15s, transform 0.1s;
}
.rating-stars label svg {
  width: 28px; height: 28px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1;
  stroke-linejoin: round;
}
.rating-stars label:hover,
.rating-stars label:hover ~ label,
.rating-stars input:checked ~ label {
  color: #f5b041;
}
.rating-stars label:hover { transform: scale(1.15); }
.rating-stars label:active { transform: scale(0.95); }

/* Display-only stars (đã đánh giá, không tương tác) */
.rating-display {
  display: inline-flex;
  gap: 0.15rem;
  color: #f5b041;
  align-items: center;
  vertical-align: middle;
}
.rating-display .empty { color: #e0d6c0; }
.rating-display svg { width: 16px; height: 16px; fill: currentColor; }
.rating-display .num { color: var(--text-light); margin-left: 0.4rem; font-size: 0.85rem; font-weight: 600; }

/* ============================================
   Doc page (privacy / cookies / terms / about / contact)
   ============================================ */
.doc-page { max-width: 760px; margin: 0 auto; padding: 130px 1.5rem 4rem; line-height: 1.8; }
.doc-page h1 { font-family: var(--font-display); font-size: 2.4rem; margin-bottom: 0.5rem; line-height: 1.3; padding-top: 0.15em; }
.doc-page .updated { color: var(--text-muted); margin-bottom: 2rem; font-size: 0.9rem; }
.doc-page h2 { font-family: var(--font-display); font-size: 1.5rem; margin-top: 2.5rem; margin-bottom: 0.6rem; }
.doc-page h3 { font-family: var(--font-display); font-size: 1.2rem; margin-top: 1.5rem; margin-bottom: 0.5rem; }
.doc-page p, .doc-page li { color: var(--text-color); margin-bottom: 0.8rem; }
.doc-page ul { padding-left: 1.5rem; margin-bottom: 1rem; }
.doc-page ul li { list-style: disc; }
.doc-page strong { color: var(--dark-color); font-weight: 700; }
.doc-page a:not(.btn):not(.adm-btn):not(.smart-buy) { color: var(--primary-color); text-decoration: underline; }
.doc-page a.btn-primary { color: var(--white); text-decoration: none; }
.doc-page a.btn-outline { color: var(--dark-color); text-decoration: none; }
.doc-page a.btn { text-decoration: none; }
.doc-page .toc {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0 2rem;
}
.doc-page .toc ol { margin: 0; padding-left: 1.5rem; }
.doc-page .doc-callout {
  background: var(--gradient-warm);
  border-radius: var(--border-radius);
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
  border-left: 4px solid var(--secondary-color);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   RESPONSIVE — Tablet/iPad ≤1024px
   Hamburger drawer trigger
   ============================================ */
@media (max-width: 1024px) {
  h1 { font-size: 2.4rem; }
  h2 { font-size: 1.8rem; }
  .logo-img { height: 56px; }
  .logo-tagline { font-size: 0.68rem; }

  .nav-menu {
    position: fixed;
    top: 0; right: -100%;
    width: 82%;
    max-width: 320px;
    height: 100dvh;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    gap: 0;
    transition: right 0.3s cubic-bezier(.4,0,.2,1);
    box-shadow: -10px 0 40px rgba(0,0,0,0.15);
    overflow-y: auto;
  }
  .nav-menu.open { right: 0; }
  .mobile-header-actions { display: flex; }
  .mobile-toggle { display: flex; }

  .nav-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, var(--primary-bg), #fff);
  }
  .nav-drawer-brand {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--primary-dark);
    letter-spacing: 0.05em;
  }
  .nav-drawer-close {
    background: rgba(0,0,0,0.05);
    border: 0;
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
  }
  .nav-drawer-close:hover { background: var(--secondary-color); color: #fff; transform: rotate(90deg); }

  .nav-menu a:not(.btn):not(.nav-drawer-contact) {
    width: auto;
    margin: 0 0.6rem;
    padding: 0.7rem 0.9rem;
    font-size: 0.98rem;
    border-radius: 10px;
    color: var(--text-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.7rem;
  }
  .nav-menu a:not(.btn):not(.nav-drawer-contact):first-of-type { margin-top: 0.5rem; }
  .nav-menu a:not(.btn):not(.nav-drawer-contact) i,
  .nav-menu a:not(.btn):not(.nav-drawer-contact) svg {
    width: 18px; height: 18px;
    color: var(--primary-dark);
    flex-shrink: 0;
  }
  .nav-menu a:not(.btn):not(.nav-drawer-contact):hover,
  .nav-menu a:not(.btn):not(.nav-drawer-contact).active {
    background: var(--primary-bg);
    color: var(--primary-dark);
  }

  .nav-cta {
    margin: 0.85rem 0.6rem 0;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border-color);
  }
  .nav-cta .btn { width: 100%; justify-content: center; }

  .nav-drawer-footer {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin: 1rem 0.6rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border-color);
  }
  .nav-drawer-contact {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0.55rem 0.85rem !important;
    background: var(--primary-bg);
    border: 1px solid rgba(162,228,0,0.35);
    border-radius: 10px;
    color: var(--primary-dark) !important;
    font-size: 0.92rem !important;
    font-weight: 700;
  }
  .nav-drawer-contact.zalo {
    background: #e6f3ff;
    color: #0068ff !important;
    border-color: rgba(0,104,255,0.25);
  }
  .nav-drawer-tagline {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    text-align: center;
    color: var(--text-light);
    font-style: italic;
  }

  .hero .container { gap: 1.5rem; align-items: center; }
  .hero h1 { font-size: 2.4rem; }
  .hero-content { max-width: 540px; }
  .hero-image-circle { width: 300px; height: 300px; }

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

/* ============================================
   RESPONSIVE — Mobile ≤768px
   ============================================ */
@media (max-width: 768px) {
  section { padding: 1.5rem 0; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  .container { padding: 0 1rem; }

  .hero { min-height: auto; padding: 5.5rem 0 2.5rem; }
  .hero .container { flex-direction: column; text-align: center; gap: 1.5rem; }
  .hero-content { max-width: 100%; }
  .hero-buttons { justify-content: center; }
  .hero h1 { font-size: 2rem; }
  .hero-image-circle { width: 200px; height: 200px; }

  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* ============================================
   PEOPLE PAGE (Tác giả & Dịch giả combined)
   ============================================ */
.people-tabs {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.people-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.4rem;
  border: 1px solid var(--border-color);
  background: var(--white);
  color: var(--text-color);
  border-radius: 100px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
}
.people-tab:hover { border-color: var(--primary-color); color: var(--primary-color); }
.people-tab.is-active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--white);
  box-shadow: 0 4px 12px -2px rgba(111, 174, 142, 0.4);
}
.people-tab i { width: 16px; height: 16px; }
.people-tab-count { font-weight: 400; opacity: 0.75; font-size: 0.85em; }

.people-search {
  position: relative;
  max-width: 460px;
  margin: 0 auto 2rem;
}
.people-search > i[data-lucide] {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}
.people-search input {
  width: 100%;
  padding: 0.85rem 2.6rem;
  border: 1px solid var(--border-color);
  border-radius: 100px;
  background: var(--white);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.people-search input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(111, 174, 142, 0.15);
}
.people-search-clear {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: 0;
  background: var(--paper);
  color: var(--text-muted);
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  line-height: 1;
}
.people-search-clear:hover { background: var(--accent-color); color: var(--white); }

.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}
.person-card {
  display: block;
  text-decoration: none;
  color: inherit;
  text-align: center;
  padding: 1.4rem 1rem;
  border-radius: var(--border-radius-lg);
  background: var(--white);
  border: 1px solid var(--border-color);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.person-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.12);
  border-color: var(--primary-color);
}
.person-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 1rem;
  background: var(--gradient-warm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.person-avatar img { width: 100%; height: 100%; object-fit: cover; }
.person-initial {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--white);
  font-weight: 700;
}
.person-card h3 {
  font-family: var(--font-display);
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
  color: var(--dark-color);
}
.person-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 0.6rem;
  line-height: 1.5;
  min-height: 2.4em;
}
.person-meta {
  font-size: 0.8rem;
  color: var(--primary-color);
  font-weight: 600;
  margin: 0;
}
.people-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 3rem 1rem;
}

@media (max-width: 480px) {
  .people-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .person-avatar { width: 80px; height: 80px; }
  .person-initial { font-size: 1.8rem; }
  .person-card h3 { font-size: 0.95rem; }
  .person-desc { font-size: 0.78rem; }
}

/* ============================================
   AUTHOR CHIP trên book card
   ============================================ */
.book-author-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0.85rem 0.4rem;
  padding: 3px 10px 3px 3px;
  border-radius: 100px;
  background: var(--paper);
  text-decoration: none;
  color: var(--dark-color);
  font-size: 0.78rem;
  font-weight: 500;
  max-width: calc(100% - 1.7rem);
  transition: background 0.15s, color 0.15s;
}
.book-author-chip:hover { background: var(--primary-color); color: var(--white); }
.book-author-chip img,
.book-author-chip .book-author-initial {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--gradient-warm);
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.7rem;
  font-family: var(--font-display);
}
.book-author-chip span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.book-author-chip.is-text {
  background: transparent;
  padding: 0 0.85rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================
   BOOK CREATORS (tác giả + dịch giả) trên trang sách
   ============================================ */
.book-creators {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.book-creator-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 5px 14px 5px 5px;
  border-radius: 100px;
  background: var(--paper);
  text-decoration: none;
  color: var(--dark-color);
  transition: background 0.15s, transform 0.15s;
  border: 1px solid transparent;
}
.book-creator-chip:hover { background: var(--white); border-color: var(--primary-color); transform: translateY(-1px); }
.book-creator-chip.is-text { padding: 5px 14px; cursor: default; }
.book-creator-chip.is-text:hover { transform: none; border-color: transparent; background: var(--paper); }
.book-creator-chip img,
.book-creator-chip .book-creator-initial {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--gradient-warm);
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: var(--font-display);
}
.book-creator-chip span { display: flex; flex-direction: column; line-height: 1.2; }
.book-creator-chip small { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.book-creator-chip strong { font-size: 0.92rem; font-weight: 600; }

/* Loading state — playbook 02-design/ui-patterns/loading-state.md */
.is-loading { position: relative; cursor: progress !important; pointer-events: none; }
.btn-spinner {
  position: absolute;
  left: 50%; top: 50%;
  width: 16px; height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* Affiliate ref banner — tinh tế */
#mh-ref-banner {
  position: fixed;
  bottom: 1.2rem;
  left: 1.2rem;
  z-index: 9000;
  font-family: var(--font-body);
}
.mh-ref-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  position: relative;
  box-shadow: 0 0 0 0 rgba(111,174,142,.5);
  animation: mh-ref-pulse 2.4s ease-out infinite;
}
.mh-ref-dot span {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: var(--primary-color);
}
@keyframes mh-ref-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(111,174,142,.5); }
  70%  { box-shadow: 0 0 0 10px rgba(111,174,142,0); }
  100% { box-shadow: 0 0 0 0 rgba(111,174,142,0); }
}
.mh-ref-card {
  display: none;
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: .75rem 1rem;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,.18);
  font-size: .85rem;
  max-width: 320px;
  position: absolute;
  bottom: 0; left: 0;
}
#mh-ref-banner.expanded .mh-ref-card { display: block; }
#mh-ref-banner.expanded .mh-ref-dot { display: none; }
.mh-ref-text { color: var(--text-color); margin-bottom: .5rem; line-height: 1.5; }
.mh-ref-actions { display: flex; gap: .4rem; }
.mh-ref-keep, .mh-ref-clear {
  flex: 1;
  padding: .35rem .6rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--white);
  cursor: pointer;
  font-size: .8rem;
  font-family: inherit;
  transition: all .15s;
}
.mh-ref-keep { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }
.mh-ref-keep:hover { background: var(--primary-dark); }
.mh-ref-clear:hover { color: var(--accent-color); border-color: var(--accent-color); }

/* ===== Genre tags ===== */
.book-genres { display: flex; flex-wrap: wrap; gap: .4rem; margin: .8rem 0 .4rem; }
.genre-tag {
  display: inline-block;
  padding: .25rem .7rem;
  background: var(--paper);
  border: 1px solid var(--border-color);
  border-radius: 100px;
  font-size: .8rem;
  color: var(--text-color);
  text-decoration: none;
  transition: all .15s;
}
.genre-tag:hover { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }

/* ===== Mention picker (dùng cho textarea bình luận) ===== */
.mp-popup {
  display: none;
  position: absolute;
  z-index: 9999;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,.18);
  max-width: 360px;
  max-height: 320px;
  overflow: auto;
  padding: .35rem;
}
.mp-popup.is-open { display: block; }
.mp-item {
  display: flex; gap: .55rem; align-items: center;
  width: 100%;
  padding: .45rem .55rem;
  border: 0; background: transparent;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.mp-item:hover, .mp-item.is-active { background: var(--paper); }
.mp-item img, .mp-item .mp-icon {
  flex: 0 0 32px;
  width: 32px; height: 32px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--gradient-warm);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.mp-item .mp-icon i { width: 16px; height: 16px; }
.mp-label { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.3; font-size: .88rem; }
.mp-label small { font-size: .74rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-empty { padding: .8rem; color: var(--text-muted); font-size: .85rem; text-align: center; }
.mp-hint {
  font-size: .68rem; color: var(--text-muted);
  padding: .45rem .25rem .15rem;
  text-align: center;
  border-top: 1px solid var(--border-color);
  margin-top: .3rem;
}
.mp-hint kbd {
  background: var(--paper);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0 .35rem;
  font-family: inherit;
  font-size: .68rem;
  margin: 0 1px;
}

/* Comment mention chip */
.comment-mention {
  display: inline-block;
  padding: 0 .45rem;
  background: var(--paper);
  border: 1px solid var(--border-color);
  border-radius: 100px;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  font-size: .92em;
}
.comment-mention:hover { background: #fff; border-color: var(--primary-color); }
