/* =====================================================================
   Mộc Việt Academy — hệ thống giao diện
   Màu chủ đạo: xanh lá Mộc Việt (lấy từ biểu tượng chiếc lá của thương hiệu) và trắng.
   Chữ: một họ Be Vietnam Pro, thiết kế riêng cho tiếng Việt.
   Có hai chế độ: sáng (mặc định) và tối — chỉ khác nhau ở các biến màu bên dưới.
   ===================================================================== */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f6faf3;
  --tint: #eaf5e2;
  --line: #e3eadf;
  --line-2: #cfe3c3;
  --input-line: #cdd9c7;
  --ink: #142012;
  --muted: #5d6a58;
  --brand: #3d9f17;        /* xanh lá Mộc Việt (theo logo) */
  --brand-2: #7ccf12;      /* xanh lá non — dùng trong dải chuyển màu */
  --accent: #2c8212;       /* nút và liên kết: xanh đậm hơn để chữ trắng đủ rõ */
  --accent-hover: #236b0e;
  --accent-ink: #1d620b;   /* chữ xanh trên nền xanh nhạt: đủ tương phản */
  --on-accent: #ffffff;
  --deep: #10300c;         /* chân trang, thẻ giảng viên */
  --deep-ink: #ffffff;
  --topbar: rgba(255, 255, 255, .94);
  --hero: linear-gradient(180deg, #f1f9eb 0%, #ffffff 100%);
  --warn-bg: #fbf4e1; --warn-ink: #84600f; --warn-line: #efdcaa;
  --err-bg: #fbece8; --err-ink: #a8321f; --err-line: #f0c6be;
  --overlay: rgba(12, 28, 10, .5);
  --shadow-c: rgba(22, 60, 14, .22);
  --photo-bg: #8e96a2;
  --r-sm: 6px; --r: 10px; --r-lg: 16px; --r-xl: 22px;
  --sans: "Be Vietnam Pro", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0b110a;
  --surface: #121b11;
  --surface-2: #0f170e;
  --tint: #1a2a16;
  --line: #233220;
  --line-2: #2e4a27;
  --input-line: #314330;
  --ink: #e6eee3;
  --muted: #9fb299;
  --brand: #6cbf3a;
  --brand-2: #93d763;
  --accent: #6cbf3a;
  --accent-hover: #82d151;
  --accent-ink: #93d763;
  --on-accent: #07110a;
  --deep: #0f170e;
  --deep-ink: #e6eee3;
  --topbar: rgba(11, 17, 10, .9);
  --hero: linear-gradient(180deg, #13230f 0%, #0b110a 100%);
  --warn-bg: #2a2410; --warn-ink: #f0cf7d; --warn-line: #4a3f1a;
  --err-bg: #2c1511; --err-ink: #f4a397; --err-line: #53241d;
  --overlay: rgba(0, 0, 0, .65);
  --shadow-c: rgba(0, 0, 0, .55);
  color-scheme: dark;
}

/* ---------- Nền tảng ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
html, body { overflow-x: clip; }
body { margin: 0; font-family: var(--sans); font-size: 1rem; line-height: 1.65; color: var(--ink); background: var(--bg); font-kerning: normal; transition: background-color .2s, color .2s; }
a { color: var(--accent); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
input, select, textarea { font-size: 1rem; } /* 16px: iPhone không tự phóng to khi gõ */
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
h1, h2, h3 { font-weight: 700; letter-spacing: -.02em; line-height: 1.22; margin: 0 0 .5em; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 1.4rem + 3.2vw, 3.4rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.12; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2rem); }
h3 { font-size: 1.2rem; line-height: 1.32; letter-spacing: -.01em; }
p { margin: 0 0 1em; text-wrap: pretty; }
.boot { padding: 40vh 20px; text-align: center; color: var(--muted); }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 860px; }
.muted { color: var(--muted); }
.small, .hint, .s { font-size: max(.8125rem, 13px); }
.hint { color: var(--muted); margin: 0; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.kicker { font-size: .875rem; font-weight: 600; color: var(--accent); margin: 0 0 6px; }
.lead { font-size: clamp(1.03rem, .98rem + .25vw, 1.15rem); line-height: 1.7; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Nút ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 20px; border-radius: var(--r);
  border: 1px solid transparent; font-weight: 600; font-size: .97rem; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.btn svg { flex: 0 0 auto; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 8px 20px -12px var(--accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline { background: var(--surface); color: var(--accent); border-color: var(--line-2); }
.btn-outline:hover { border-color: var(--accent); background: var(--surface-2); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-danger { background: var(--surface); color: var(--err-ink); border-color: var(--err-line); }
.btn-light, .btn-white { background: #fff; color: #10300c; }
.btn-light:hover, .btn-white:hover { background: #eef6e9; }
.btn-line { background: transparent; color: inherit; border-color: currentColor; }
.btn-line:hover { background: rgba(127, 127, 127, .1); }
.btn-lg { min-height: 52px; padding: 12px 24px; font-size: 1.02rem; }
.btn-sm { min-height: 36px; padding: 6px 13px; font-size: .86rem; border-radius: 8px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-publish-cta { min-height: 52px; padding: 12px 22px; font-size: 1rem; }

/* ---------- Đầu trang ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--topbar); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 16px; min-height: 66px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); line-height: 1.15; }
.brand .brand-logo { height: 42px; width: 42px; object-fit: contain; flex: 0 0 auto; }
@media (max-width: 800px) { .brand .brand-logo { height: 36px; width: 36px; } }
.brand > span { font-size: 1.2rem; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.brand .brand-sub { display: block; font-size: .74rem; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-top: 2px; }
.brand-mark { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--brand-2), #1f7f10); }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--ink); padding: 8px 12px; font-weight: 500; font-size: .96rem; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--accent); }
.nav a.active { color: var(--accent); border-bottom-color: var(--brand); }
.user-chip { display: flex; align-items: center; gap: 8px; }
.theme-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: grid; place-items: center; cursor: pointer; flex: 0 0 auto; }
.theme-btn:hover { border-color: var(--accent); color: var(--accent); }
.acc-link { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-weight: 500; font-size: .93rem; padding: 4px 10px 4px 4px; border-radius: 99px; border: 1px solid var(--line); }
.acc-link:hover { border-color: var(--accent); }
.acc-dot { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.tabbar { display: none; }
@media (max-width: 800px) {
  .nav, .desk-only { display: none !important; }
  .topbar .wrap { justify-content: space-between; min-height: 60px; gap: 10px; }
  .brand > span { font-size: 1.1rem; }
  .brand .brand-sub { display: none; }
  .acc-link { border: 0; padding: 0; }
  .user-chip .uname { display: none; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom, 0px); box-shadow: 0 -8px 24px -16px var(--shadow-c); }
  .tabbar a { flex: 1; display: grid; justify-items: center; gap: 2px; padding: 8px 2px 7px; text-decoration: none; color: var(--muted); font-size: .72rem; font-weight: 600; }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a.active { color: var(--accent); }
  #toast { bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important; }
  .sticky-actions { bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important; }
}

/* ---------- Trang chủ: phần mở đầu ---------- */
.hero { background: var(--hero); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; gap: 40px; padding-top: 40px; padding-bottom: 48px; }
.hero h1 { max-width: 13em; font-size: clamp(2.2rem, 1.3rem + 3.6vw, 3.6rem); margin-bottom: 18px; }
.hero .lead { color: var(--muted); max-width: 52ch; margin-bottom: 26px; }
.hero-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line-2); color: var(--accent); font-size: .88rem; font-weight: 600; margin: 0 0 20px; }
.hero-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px rgba(75, 162, 28, .18); }
.hero-actions .btn { flex: 1 1 220px; }
.hero-stats { display: flex; margin: 28px 0 0; padding: 0; }
.hero-stats div { display: grid; padding: 0 24px; border-left: 1px solid var(--line); }
.hero-stats div:first-child { padding-left: 0; border-left: 0; }
.hero-stats dt { order: 2; font-size: .86rem; color: var(--muted); }
.hero-stats dd { order: 1; margin: 0; font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.hero-visual { position: relative; padding-bottom: 8px; }
.hero-portrait { position: relative; margin: 0 auto; width: min(100%, 420px); aspect-ratio: 4 / 4.6; border-radius: 28px; overflow: hidden; background: var(--photo-bg); box-shadow: 0 30px 60px -30px var(--shadow-c); }
.hero-portrait::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); pointer-events: none; }
.hero-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 8%; }
.portrait-tag { position: absolute; right: 14px; top: 14px; display: grid; padding: 8px 14px; border-radius: 12px; background: rgba(255, 255, 255, .95); color: #142012; box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .3); }
.portrait-tag b { font-size: .95rem; }
.portrait-tag span { font-size: .78rem; color: #5d6a58; }
.frame { text-decoration: none; color: var(--ink); }
.latest-card { position: relative; z-index: 2; margin: -70px 12px 0; display: grid; gap: 8px; padding: 18px 20px; background: var(--surface); border-radius: 18px; border: 1px solid var(--line); box-shadow: 0 24px 48px -24px var(--shadow-c); }
.latest-card:hover { border-color: var(--line-2); }
.lc-top { display: flex; align-items: center; gap: 10px; }
.frame-badge { background: var(--tint); color: var(--accent); font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: 99px; }
.play-disc { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 6px rgba(75, 162, 28, .16); transition: transform .2s; }
.play-disc svg { width: 16px; height: 16px; margin-left: 2px; }
.latest-card:hover .play-disc { transform: scale(1.06); }
.frame-title { font-size: 1.12rem; line-height: 1.38; font-weight: 700; letter-spacing: -.01em; }
.lc-empty { font-weight: 500; color: var(--muted); font-size: 1rem; }
.frame-meta { display: flex; flex-wrap: wrap; gap: 2px 16px; color: var(--muted); font-size: .86rem; }
.frame-meta span { display: inline-flex; align-items: center; gap: 6px; }
.lc-cta { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-weight: 700; font-size: .95rem; }
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.08fr .92fr; align-items: center; padding-top: 72px; padding-bottom: 80px; gap: 64px; }
  .hero-actions .btn { flex: 0 0 auto; }
  .hero-portrait { width: 100%; max-width: 440px; margin: 0 0 0 auto; }
  .latest-card { position: absolute; left: -48px; bottom: 28px; width: 340px; margin: 0; }
}
@media (max-width: 520px) { .hero-stats div { padding: 0 16px; } .hero-stats dd { font-size: 1.5rem; } }

/* ---------- Khối nội dung ---------- */
section.block { padding: 56px 0; }
.block-tint { background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.section-head h2 { margin: 0; }
.link-more { font-weight: 600; text-decoration: none; white-space: nowrap; }
.link-more:hover { text-decoration: underline; }
.split { display: grid; gap: 44px; }
.split > *, .search-row > *, .grid2 > *, .admin-main, .lr-main { min-width: 0; }
@media (min-width: 960px) { .split { grid-template-columns: 1fr 1fr; gap: 56px; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.ico { flex: 0 0 46px; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; color: var(--accent); background: var(--tint); }

/* Chuyên mục */
.cats { display: grid; gap: 16px; }
@media (min-width: 860px) { .cats { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.cat { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.cat:hover { border-color: var(--line-2); box-shadow: 0 16px 32px -24px var(--shadow-c); }
.cat-head { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; margin-bottom: 12px; }
.cat-head h3 { margin: 0; font-size: 1.2rem; }
.cat-head:hover h3 { color: var(--accent); }
.cat > p { color: var(--muted); font-size: .95rem; }
.cat-courses { list-style: none; margin: 4px 0 16px; padding: 0; border-top: 1px solid var(--line); }
.cat-courses li { border-bottom: 1px solid var(--line); }
.cat-courses a { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; text-decoration: none; color: var(--ink); font-weight: 500; font-size: .95rem; line-height: 1.4; }
.cat-courses a:hover { color: var(--accent); }
.cat-courses small { color: var(--accent); font-weight: 600; white-space: nowrap; }
.cat-courses li.muted { padding: 11px 0; }
.cat-all { margin-top: auto; font-weight: 600; text-decoration: none; }
.cat-all:hover { text-decoration: underline; }

/* Danh sách buổi giảng */
.results { display: grid; gap: 10px; }
.lesson-row { display: flex; gap: 16px; align-items: center; padding: 14px 16px; text-decoration: none; color: inherit; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); transition: border-color .15s; }
.lesson-row:hover { border-color: var(--accent); }
.lesson-row .lr-main { flex: 1; }
.lesson-row .t { display: block; font-weight: 600; line-height: 1.45; }
.lesson-row .s { display: block; color: var(--muted); margin-top: 2px; }
.lesson-row .go { color: var(--accent); flex: 0 0 auto; display: flex; }
.lesson-row .num { flex: 0 0 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); color: var(--accent); font-weight: 700; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.lesson-row.current { border-color: var(--accent); background: var(--surface-2); }
.lesson-row.current .num { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.lesson-row.locked .num, .lesson-row.locked .dblock b { color: var(--muted); border-color: var(--line); }
.dblock { flex: 0 0 62px; display: grid; justify-items: center; line-height: 1.1; padding-right: 14px; border-right: 1px solid var(--line); font-variant-numeric: tabular-nums lining-nums; }
.dblock b { font-size: 1.6rem; font-weight: 800; color: var(--accent); letter-spacing: -.02em; }
.dblock span { font-size: max(.75rem, 12px); color: var(--muted); white-space: nowrap; }
.lock-tag { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; font-weight: 600; color: var(--warn-ink); background: var(--warn-bg); padding: 3px 8px; border-radius: var(--r-sm); }
.prog-tag { display: inline-block; margin-left: 8px; font-size: .74rem; font-weight: 700; padding: 1px 7px; border-radius: var(--r-sm); background: var(--tint); color: var(--accent); vertical-align: 1px; }
.prog-tag.done { background: var(--accent); color: var(--on-accent); }
.empty { padding: 28px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--r); background: var(--surface); }

/* Tìm kiếm và biểu mẫu */
.search-box { display: grid; gap: 14px; }
.search-row { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.search-row .field:first-child { grid-column: 1 / -1; }
.field { display: grid; gap: 6px; }
.field > span, .label, .date-label { font-size: .86rem; font-weight: 600; color: var(--ink); }
.input, select.input, textarea.input { width: 100%; min-width: 0; min-height: 48px; padding: 10px 14px; border: 1px solid var(--input-line); border-radius: var(--r); background: var(--surface); color: var(--ink); outline: none; }
.input::placeholder { color: var(--muted); opacity: .8; }
textarea.input { min-height: 120px; resize: vertical; line-height: 1.55; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(75, 162, 28, .18); }
.input-search { padding-left: 44px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%23889883' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 14px center; }

/* Cách học */
.howto { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 14px; }
@media (min-width: 860px) { .howto { grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); } }
.howto li { counter-increment: s; position: relative; padding: 18px 0 0 56px; display: grid; gap: 6px; }
.howto li::before { content: counter(s); position: absolute; left: 0; top: 16px; width: 40px; height: 40px; border-radius: 50%; background: var(--tint); color: var(--accent); font-weight: 800; font-size: 1.05rem; display: grid; place-items: center; }
@media (min-width: 860px) { .howto li { padding: 28px 28px 0 0; } .howto li::before { position: static; margin-bottom: 8px; } }
.howto b { font-size: 1.05rem; }
.howto span { color: var(--muted); font-size: .95rem; }

/* Giảng viên */
.block-teacher { background: var(--surface-2); border-top: 1px solid var(--line); }
.mentor { display: grid; background: var(--deep); color: var(--deep-ink); border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--line); box-shadow: 0 30px 60px -36px var(--shadow-c); }
.mentor-photo { position: relative; background: var(--photo-bg); aspect-ratio: 4 / 3.4; }
.mentor-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 10%; }
.mentor-photo::after { content: ""; position: absolute; inset: auto 0 0 0; height: 40%; background: linear-gradient(to top, var(--deep), transparent); }
.mentor-mono { width: 100%; height: 100%; display: grid; place-items: center; font-size: 5rem; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--brand-2), #1f7f10); }
.mentor-body { padding: 8px 24px 28px; position: relative; }
.mentor-kicker { color: #9edb6f; font-weight: 600; font-size: .9rem; margin: 0 0 4px; }
.mentor-name { color: inherit; font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3.1rem); font-weight: 800; letter-spacing: -.03em; margin: 0 0 4px; line-height: 1.1; }
.mentor-role { opacity: .88; font-weight: 500; margin: 0 0 18px; padding-bottom: 18px; border-bottom: 1px solid rgba(255, 255, 255, .16); }
.mentor-bio { opacity: .82; line-height: 1.75; max-width: 62ch; margin-bottom: 22px; }
.mentor-sub { font-size: .85rem; font-weight: 600; opacity: .62; margin: 0 0 10px; }
.mentor-topics ul { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.mentor-topics a { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 7px; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .22); color: inherit; text-decoration: none; font-weight: 500; font-size: .92rem; }
.mentor-topics a:hover { border-color: #9edb6f; }
.mentor-topics .ico { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #9edb6f; }
.mentor-topics .ico svg { width: 16px; height: 16px; }
.mentor-facts { display: flex; gap: 32px; margin: 0 0 24px; }
.mentor-facts div { display: grid; }
.mentor-facts dt { order: 2; font-size: .85rem; opacity: .65; }
.mentor-facts dd { order: 1; margin: 0; font-size: 2rem; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: lining-nums; }
.mentor-actions .btn { flex: 0 0 auto; }
@media (max-width: 520px) { .mentor-actions .btn { flex: 1 1 100%; } }
@media (min-width: 760px) {
  .mentor { grid-template-columns: minmax(260px, 38%) 1fr; }
  .mentor-photo { aspect-ratio: auto; min-height: 100%; }
  .mentor-photo::after { inset: 0 0 0 auto; width: 30%; height: auto; background: linear-gradient(to left, var(--deep), transparent); }
  .mentor-body { padding: 44px 44px 44px 36px; align-self: center; }
}
@media (min-width: 1100px) { .mentor-body { padding: 56px 64px 56px 40px; } }

/* Kêu gọi đăng ký */
.cta-band { background: linear-gradient(120deg, #2c8212, #4ba21c 60%, #7cc243); color: #fff; }
[data-theme="dark"] .cta-band { background: linear-gradient(120deg, #173d0f, #23561a); }
.cta-inner { display: grid; gap: 20px; padding-top: 44px; padding-bottom: 44px; }
.cta-band h2 { color: #fff; margin-bottom: 6px; }
.cta-band p { margin: 0; color: rgba(255, 255, 255, .88); }
@media (min-width: 860px) { .cta-inner { grid-template-columns: 1fr auto; align-items: center; } }

/* ---------- Trang khóa học ---------- */
.page-band { background: var(--hero); border-bottom: 1px solid var(--line); padding: 40px 0 44px; margin-bottom: 28px; }
.page-band h1 { font-size: clamp(1.85rem, 1.35rem + 2.2vw, 2.7rem); max-width: 26ch; margin-bottom: 10px; }
.page-band .lead { color: var(--muted); max-width: 62ch; margin: 0; }
.band-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 16px; color: var(--muted); font-size: .92rem; font-variant-numeric: tabular-nums; }
.band-meta span { display: inline-flex; gap: 7px; align-items: center; }
.band-meta svg { color: var(--accent); }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--accent); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 20px; scrollbar-width: none; }
.chip { flex: 0 0 auto; padding: 8px 16px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 500; font-size: .93rem; }
.chip:hover { border-color: var(--accent); }
.chip.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.course-grid { display: grid; gap: 16px; }
@media (min-width: 700px) { .course-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .course-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.course-card { display: flex; flex-direction: column; gap: 0; padding: 0; overflow: hidden; text-decoration: none; color: inherit; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.course-card:hover { border-color: var(--line-2); box-shadow: 0 16px 32px -24px var(--shadow-c); }
.cc-top { display: flex; align-items: center; gap: 10px; }
.cc-top .ico { flex-basis: 36px; width: 36px; height: 36px; border-radius: 10px; }
.cc-top .ico svg { width: 18px; height: 18px; }
.course-card .cat-name { font-size: .86rem; font-weight: 600; color: var(--accent); }
.course-card h3 { margin: 0; font-size: 1.15rem; }
.course-card p { margin: 0; color: var(--muted); font-size: .94rem; }
.course-card .foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: center; justify-content: space-between; font-size: .9rem; font-weight: 600; color: var(--accent); }

/* ---------- Trang xem buổi giảng ---------- */
.meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: .92rem; font-variant-numeric: tabular-nums; }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.lesson-layout { display: grid; gap: 18px; padding: 12px 0 48px; grid-template-areas: "video" "head" "list" "body"; }
.lesson-layout .a-video { grid-area: video; } .lesson-layout .a-head { grid-area: head; }
.lesson-layout .a-list { grid-area: list; } .lesson-layout .a-body { grid-area: body; }
@media (min-width: 960px) {
  .lesson-layout { grid-template-columns: minmax(0, 1fr) 350px; grid-template-areas: "video list" "head list" "body list"; align-items: start; padding-top: 28px; gap: 22px 28px; }
  .lesson-layout .a-list { position: sticky; top: 84px; max-height: calc(100vh - 104px); overflow: auto; }
}
@media (max-width: 959px) { .lesson-page .wrap { padding: 0; } .lesson-layout .a-head, .lesson-layout .a-list, .lesson-layout .a-body { margin: 0 20px; } }
.player { background: #000; overflow: hidden; }
@media (min-width: 960px) { .player { border-radius: var(--r-lg) var(--r-lg) 0 0; } }
.player video { width: 100%; aspect-ratio: 16 / 9; display: block; background: #000; }
.player-bar { display: flex; gap: 6px; padding: 8px; background: #0f170e; flex-wrap: wrap; }
.player-bar button, .player-bar select { background: rgba(255, 255, 255, .1); color: #fff; border: 0; border-radius: 8px; min-height: 38px; padding: 6px 12px; font-size: .88rem; font-weight: 500; cursor: pointer; }
.player-bar button:hover { background: rgba(255, 255, 255, .2); }
.player-bar .sp { margin-left: auto; }
.player-bar select option { color: #000; }
.player-msg { aspect-ratio: 16 / 9; display: grid; place-items: center; color: #fff; text-align: center; padding: 20px; background: #0f170e; }
.watch { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 6px 14px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-top: 0; }
@media (min-width: 960px) { .watch { border-radius: 0 0 var(--r-lg) var(--r-lg); } }
.watch-label, .watch-done { font-size: .92rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.watch-label b { font-size: 1.2rem; font-weight: 800; color: var(--accent); }
.watch-done { color: var(--accent); font-weight: 700; }
.watch-bar { height: 8px; border-radius: 99px; background: var(--tint); overflow: hidden; }
.watch-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand-2), var(--accent)); transition: width .4s; }
.watch-hint { grid-column: 1 / -1; font-size: .8rem; color: var(--muted); }
.a-head h1 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2rem); line-height: 1.25; }
.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.prevnext .btn { white-space: normal; text-align: center; line-height: 1.25; font-size: .93rem; }
.list-card { padding: 16px; }
.list-card h3 { margin: 0 0 12px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 1.05rem; }
.list-card .results { gap: 6px; }
.list-card .lesson-row { padding: 10px 12px; gap: 12px; }
.list-card .lesson-row .num { flex-basis: 32px; height: 32px; font-size: .85rem; }
.body-card { padding: 24px; }
.body-card h2 { font-size: 1.2rem; }
.summary { white-space: pre-wrap; line-height: 1.75; }
.docs { display: grid; gap: 8px; }
.doc { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: inherit; background: var(--surface); }
.doc:hover { border-color: var(--accent); }
.doc .ext { flex: 0 0 44px; height: 44px; border-radius: 8px; background: var(--tint); color: var(--accent); font-size: .72rem; font-weight: 700; display: grid; place-items: center; text-transform: uppercase; }
.doc .dl { margin-left: auto; color: var(--accent); font-weight: 600; font-size: .9rem; }
.banner { padding: 12px 16px; border-radius: var(--r); font-size: .93rem; }
.banner-warn { background: var(--warn-bg); color: var(--warn-ink); border: 1px solid var(--warn-line); }
.banner-info { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.banner-err { background: var(--err-bg); color: var(--err-ink); border: 1px solid var(--err-line); }

/* ---------- Đăng nhập, tài khoản ---------- */
.auth { max-width: 460px; margin: 40px auto 64px; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: 0 20px 48px -32px var(--shadow-c); }
.auth h1 { font-size: 1.75rem; }
.auth form { display: grid; gap: 14px; }
.err { color: var(--err-ink); font-size: .9rem; min-height: 1.2em; }
.linkbox { padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); font-size: .92rem; word-break: break-word; margin-bottom: 16px; }
.success-ico { width: 56px; height: 56px; border-radius: 50%; background: var(--tint); color: var(--accent); display: grid; place-items: center; margin-bottom: 14px; }
.account { display: grid; gap: 16px; }
.acc-card { padding: 22px; }
.acc-card h2 { font-size: 1.2rem; }
.acc-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; }

/* ---------- Xem tiếp ---------- */
.block-continue { padding-bottom: 0 !important; }
.continue-grid { display: grid; gap: 10px; }
@media (min-width: 860px) { .continue-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
.continue { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); text-decoration: none; color: inherit; background: var(--surface); }
.continue:hover { border-color: var(--accent); }
.continue .t { display: block; font-weight: 600; line-height: 1.45; }
.continue .s { display: block; color: var(--muted); }
.play-sm { flex: 0 0 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; }
.play-sm svg { margin-left: 2px; }
.bar { display: block; height: 5px; border-radius: 99px; background: var(--tint); margin: 8px 0 4px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); }

/* ---------- Quản trị ---------- */
.admin { padding-top: 28px; padding-bottom: 64px; }
.admin-layout { display: grid; gap: 18px; }
.admin-side { display: grid; gap: 14px; align-content: start; }
.side-hello { display: none; }
.side-nav { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.side-nav a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 12px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.side-nav a svg { width: 18px; height: 18px; }
.side-nav a.active { color: var(--accent); border-color: var(--accent); }
.admin-title { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2rem); margin-bottom: 16px; }
@media (min-width: 1000px) {
  .admin-layout { grid-template-columns: 240px minmax(0, 1fr); gap: 40px; align-items: start; }
  .admin-side { position: sticky; top: 90px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-2); }
  .side-hello { display: block; }
  .side-hello .kicker { margin: 0; }
  .side-name { font-size: 1.15rem; font-weight: 700; margin: 0; }
  .side-nav { flex-direction: column; border: 0; gap: 2px; }
  .side-nav a { border: 0; border-radius: 8px; padding: 10px 12px; color: var(--ink); }
  .side-nav a:hover { background: var(--surface); }
  .side-nav a.active { background: var(--surface); color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
}
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 18px; }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); gap: 14px; } }
.stat { display: grid; gap: 2px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); text-decoration: none; color: inherit; }
.stat b { font-size: 1.9rem; font-weight: 800; color: var(--accent); line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { font-size: .86rem; color: var(--muted); }
a.stat:hover { border-color: var(--accent); }
.stat-warn { background: var(--warn-bg); border-color: var(--warn-line); }
.stat-warn b { color: var(--warn-ink); }
.toolbar { display: grid; gap: 10px; margin-bottom: 14px; }
@media (min-width: 760px) { .toolbar { grid-template-columns: 1fr 240px; } }
.admin-list { display: grid; gap: 10px; }
.arow { padding: 16px 18px; display: grid; gap: 10px; }
@media (min-width: 900px) { .arow { grid-template-columns: 1fr auto; align-items: center; } }
.arow .t { font-weight: 600; font-size: 1.02rem; line-height: 1.45; }
.badge { display: inline-block; font-size: .76rem; font-weight: 700; padding: 3px 9px; border-radius: var(--r-sm); vertical-align: middle; }
.badge-pub { background: var(--tint); color: var(--accent); }
.badge-draft { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.badge-warn { background: var(--warn-bg); color: var(--warn-ink); }
.steps { display: grid; gap: 16px; max-width: 840px; }
.step { padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.step-title { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.step-title .n { flex: 0 0 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 700; display: grid; place-items: center; }
.step-title h2 { font-size: 1.15rem; margin: 0; }
.grid2 { display: grid; gap: 14px; }
@media (min-width: 700px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.cat-pick { display: grid; gap: 8px; }
@media (min-width: 700px) { .cat-pick { grid-template-columns: repeat(3, 1fr); } }
.cat-pick label { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; font-weight: 600; font-size: .95rem; background: var(--surface); }
.cat-pick input { accent-color: var(--accent); width: 18px; height: 18px; }
.cat-pick label.on { border-color: var(--accent); background: var(--surface-2); }
.inline-new { margin-top: 12px; padding: 16px; border: 1px dashed var(--line-2); border-radius: var(--r); background: var(--surface-2); display: grid; gap: 10px; }
.drop { border: 1.5px dashed var(--line-2); border-radius: var(--r-lg); padding: 28px; text-align: center; background: var(--surface-2); }
.drop.over { border-color: var(--accent); background: var(--tint); }
.file-box { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: grid; gap: 8px; background: var(--surface); }
.file-box .fname { font-weight: 600; word-break: break-all; }
.progress { height: 8px; border-radius: 99px; background: var(--tint); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .2s; }
.ok-text { color: var(--accent); font-weight: 600; }
.err-text { color: var(--err-ink); font-weight: 600; }
.checklist { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 6px; }
.checklist li { display: flex; gap: 10px; align-items: center; }
.checklist .y { color: var(--accent); font-weight: 700; }
.checklist .x { color: var(--muted); font-weight: 700; }
.sticky-actions { position: sticky; bottom: 0; background: var(--topbar); padding: 12px 0; border-top: 1px solid var(--line); margin-top: 8px; }
.order-list { display: grid; gap: 6px; margin-top: 12px; }
.order-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.order-item .t { flex: 1; min-width: 0; }
.order-item button { min-width: 38px; }
.table { width: 100%; border-collapse: collapse; background: var(--surface); font-variant-numeric: tabular-nums; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: .93rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); }
.create-acc > summary { list-style: none; width: fit-content; }
.create-acc > summary::-webkit-details-marker { display: none; }

/* ---------- Thông báo, hộp thoại ---------- */
#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px); background: #10300c; color: #fff; padding: 12px 18px; border-radius: var(--r);
  font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 100; max-width: calc(100% - 32px); text-align: center; box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .4); }
[data-theme="dark"] #toast { background: #e6eee3; color: #0b110a; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.modal-bg { position: fixed; inset: 0; background: var(--overlay); z-index: 90; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; width: 100%; max-width: 480px; box-shadow: 0 24px 60px rgba(0, 0, 0, .25); }
.modal h2 { font-size: 1.35rem; }

/* ---------- Chân trang ---------- */
.footer { background: #10300c; color: rgba(255, 255, 255, .74); font-size: .92rem; }
[data-theme="dark"] .footer { background: #070c06; border-top: 1px solid var(--line); }
.foot-grid { display: grid; gap: 28px; padding-top: 48px; padding-bottom: 32px; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 2fr 1fr 1fr; gap: 48px; } }
.foot-brand img { width: 36px; height: 36px; object-fit: contain; }
.foot-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: 8px; }
.foot-grid p { max-width: 46ch; margin: 0; }
.foot-h { color: #fff; font-weight: 600; margin-bottom: 10px !important; }
.foot-grid a { display: block; color: rgba(255, 255, 255, .78); text-decoration: none; padding: 4px 0; }
.foot-grid a:hover { color: #fff; }
.foot-bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 18px; padding-bottom: 28px; font-size: .84rem; }
.preview-flag { background: #0a1f08; color: #d7e8d0; font-size: .82rem; text-align: center; padding: 6px 12px; }
.preview-flag b { color: #fff; }

/* Dòng chữ chạy trên cùng */
.ticker { position: relative; overflow: hidden; background: linear-gradient(90deg, #1f6f10, #3d9f17 50%, #1f6f10); color: #fff; font-size: .92rem; font-weight: 600; line-height: 1; }
[data-theme="dark"] .ticker { background: linear-gradient(90deg, #12340c, #1f5a14 50%, #12340c); }
.tk-track { display: flex; width: max-content; animation: tk-run 50s linear infinite; will-change: transform; }
.ticker:hover .tk-track { animation-play-state: paused; }
.tk-group { display: flex; align-items: center; flex: 0 0 auto; }
.tk-item { padding: 11px 0; white-space: nowrap; }
.tk-sep { display: inline-block; width: 6px; height: 6px; margin: 0 28px; border-radius: 50%; background: #b9ef8a; }
@keyframes tk-run { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (max-width: 800px) { .ticker { font-size: .86rem; } .tk-item { padding: 9px 0; } .tk-track { animation-duration: 36s; } }
/* Dòng chữ luôn chạy, kể cả khi máy tính tắt hiệu ứng chuyển động (theo yêu cầu) */

/* Cài app */
.install-bar { display: flex; align-items: center; gap: 12px; margin: 16px 20px 0; padding: 12px 12px 12px 14px; border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--surface); box-shadow: 0 12px 28px -20px var(--shadow-c); }
.install-bar img { width: 40px; height: 40px; object-fit: contain; flex: 0 0 auto; }
.install-bar span { flex: 1; display: grid; line-height: 1.35; }
.install-bar small { color: var(--muted); font-size: .8rem; }
.install-x { border: 0; background: none; color: var(--muted); font-size: 1.4rem; line-height: 1; padding: 4px 6px; cursor: pointer; }
.install-steps { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.inst-tabs { display: inline-flex; gap: 4px; padding: 4px; margin: 14px 0 12px; background: var(--surface-2, rgba(0,0,0,.05)); border: 1px solid var(--line); border-radius: 999px; }
.inst-tabs button { border: 0; background: transparent; color: var(--muted, inherit); font: inherit; font-weight: 600; font-size: .92rem; padding: 7px 18px; border-radius: 999px; cursor: pointer; }
.inst-tabs button[aria-selected="true"] { background: var(--accent); color: #fff; }
.inst-tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.inst-notes { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: .9rem; color: var(--muted, inherit); }
.inst-notes p { margin: 0; }
.inst-notes b { color: var(--ink); }
.modal:has(.inst-tabs) { max-width: 540px; max-height: calc(100dvh - 32px); overflow-y: auto; }

/* Học theo thứ tự */
.lock-tag.seq { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.lesson-row.seq-locked { background: var(--surface-2); }
.lesson-row.seq-locked .t { color: var(--muted); }
.lesson-row.seq-locked .num { color: var(--muted); border-color: var(--line); }
.lesson-row.seq-locked .num svg { width: 14px; height: 14px; }
@media (max-width: 520px) { .lock-tag.seq { padding: 6px; border-radius: 50%; } .lock-tag.seq .lt-text { display: none; } }

/* Chữ trên nền xanh nhạt dùng màu đậm hơn để dễ đọc (chuẩn tương phản WCAG AA) */
.frame-badge, .prog-tag, .badge-pub, .doc .ext, .howto li::before, .hero-pill, .cat-courses small, .course-card .cat-name, .kicker, .lc-cta, .crumbs a { color: var(--accent-ink); }

/* Tên thương hiệu viết hoa */
.brand .brand-name { display: block; font-weight: 800; letter-spacing: .02em; }
.brand > span { font-size: 1.12rem; }
@media (max-width: 800px) { .brand > span { font-size: 1rem; } }
@media (max-width: 360px) { .brand > span { font-size: .9rem; } }
.foot-brand { letter-spacing: .02em; }

/* =====================================================================
   Trang quản trị: menu tối bên trái chia nhóm (kiểu bảng điều khiển)
   ===================================================================== */
.adm { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; background: var(--surface-2); }
.adm-side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: #0f1b16; color: #d5e0d9; display: flex; flex-direction: column; padding: 18px 12px 12px; scrollbar-width: thin; scrollbar-color: #2a3a32 transparent; }
[data-theme="dark"] .adm-side { background: #08100c; border-right: 1px solid var(--line); }
.adm-brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; text-decoration: none; color: #fff; }
.adm-brand img { width: 38px; height: 38px; object-fit: contain; }
.adm-brand span { font-weight: 800; font-size: 1.05rem; letter-spacing: .03em; line-height: 1.15; }
.adm-brand small { display: block; font-size: .66rem; font-weight: 600; letter-spacing: .12em; color: #7f948a; }
.adm-group { margin: 14px 10px 6px; font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #6f857a; }
.adm-nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; margin: 1px 0; border-radius: 10px; color: #d5e0d9; text-decoration: none; font-weight: 600; font-size: .93rem; transition: background .15s; }
.adm-nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.adm-nav a.active { background: rgba(255, 255, 255, .1); color: #fff; box-shadow: inset 3px 0 0 var(--ic); }
.adm-ic { width: 22px; height: 22px; display: grid; place-items: center; color: var(--ic); flex: 0 0 auto; }
.adm-ic svg { width: 18px; height: 18px; }
.adm-count { margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 99px; background: #dc2626; color: #fff; font-size: .72rem; display: grid; place-items: center; }
.adm-user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 10px 4px; border-top: 1px solid rgba(255, 255, 255, .08); }
.adm-user > span:nth-child(2) { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.adm-user b { color: #fff; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-user small { color: #7f948a; font-size: .75rem; }
.adm-user button { background: none; border: 1px solid rgba(255, 255, 255, .15); color: #d5e0d9; border-radius: 8px; width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer; }
.adm-user button:hover { color: #fff; border-color: rgba(255, 255, 255, .35); }
.adm-main { min-width: 0; display: flex; flex-direction: column; }
.adm-top { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 12px; padding: 14px 28px; background: var(--topbar); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.adm-top h1 { margin: 0; font-size: 1.35rem; letter-spacing: -.02em; }
.adm-top-r { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.adm-burger { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; width: 40px; height: 40px; place-items: center; color: var(--ink); cursor: pointer; }
.adm-content { padding: 24px 28px 64px; max-width: 1200px; width: 100%; }
.adm-scrim { display: none; }
@media (max-width: 1000px) {
  .adm { grid-template-columns: 1fr; }
  .adm-side { position: fixed; left: 0; top: 0; bottom: 0; width: 276px; z-index: 60; transform: translateX(-100%); transition: transform .22s; box-shadow: 0 0 40px rgba(0, 0, 0, .35); }
  .adm-side.open { transform: none; }
  .adm-scrim.open { display: block; position: fixed; inset: 0; z-index: 55; background: var(--overlay); }
  .adm-burger { display: grid; }
  .adm-top { padding: 12px 16px; }
  .adm-content { padding: 18px 16px 56px; }
  .adm-top h1 { font-size: 1.15rem; }
}
/* Bảng điều khiển */
.dtiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 16px 0; }
@media (min-width: 900px) { .dtiles { grid-template-columns: repeat(4, 1fr); gap: 16px; } }
.dtile { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.dtile:hover { border-color: var(--ic); transform: translateY(-1px); }
.dtile .adm-ic { width: 46px; height: 46px; border-radius: 12px; background: color-mix(in srgb, var(--ic) 14%, transparent); }
.dtile .adm-ic svg { width: 22px; height: 22px; }
.dtile b { display: block; font-size: 1.7rem; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.dtile small { color: var(--muted); font-size: .84rem; }
.dquick { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.dgrid { display: grid; gap: 16px; }
@media (min-width: 1000px) { .dgrid { grid-template-columns: 1.3fr 1fr; } }
.dcard { padding: 18px; }
.dcard-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.dcard-h h2 { font-size: 1.05rem; margin: 0; }
.dlist { display: grid; }
.drow { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.drow:first-child { border-top: 0; }
a.drow:hover b { color: var(--accent); }
.drow .lr-main { flex: 1; display: grid; line-height: 1.35; }
.drow small { color: var(--muted); font-size: .82rem; }
/* Giao diện & màu */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 12px 0 18px; }
.swatch { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); cursor: pointer; font-weight: 600; font-size: .88rem; text-align: left; }
.swatch i { width: 26px; height: 26px; border-radius: 50%; background: var(--c); flex: 0 0 auto; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35); }
.swatch.on { border-color: var(--c); box-shadow: 0 0 0 2px var(--c); }
.pick { display: flex; gap: 10px; align-items: center; }
.pick input[type=color] { width: 56px; height: 48px; padding: 2px; border: 1px solid var(--input-line); border-radius: 10px; background: var(--surface); cursor: pointer; }
.pick .input { max-width: 160px; font-variant-numeric: tabular-nums; }
.look-preview { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px; margin: 16px 0; border: 1px dashed var(--line-2); border-radius: var(--r); background: var(--surface-2); }

/* ---------- Sửa trực tiếp trên trang ---------- */
body.editing [data-ek] { outline: 2px dashed color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 4px; border-radius: 6px; cursor: text; transition: outline-color .15s, background .15s; min-width: 2ch; }
body.editing [data-ek]:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
body.editing [data-ek]:focus { outline: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); }
body.editing { padding-bottom: 90px; }
.ticker-edit { padding: 8px 16px; text-align: center; }
.ticker-edit .tk-item { white-space: normal; display: inline-block; padding: 4px 8px; }
body.editing .ticker-edit [data-ek] { outline-color: rgba(255, 255, 255, .8); }
.img-edit { position: absolute; left: 12px; top: 12px; z-index: 3; padding: 9px 14px; border-radius: 10px; border: 0; background: rgba(15, 27, 22, .88); color: #fff; font-weight: 700; font-size: .9rem; cursor: pointer; box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .5); }
.img-edit:hover { background: var(--accent); }
.edit-bar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 80; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; width: min(920px, calc(100% - 24px));
  padding: 10px 12px 10px 16px; border-radius: 14px; background: #0f1b16; color: #e8f0ea; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .6); }
.edit-bar .edit-msg { flex: 1; min-width: 220px; font-size: .9rem; }
.edit-bar .btn-ghost { background: transparent; color: #e8f0ea; border-color: rgba(255, 255, 255, .25); }
.edit-dot { width: 10px; height: 10px; border-radius: 50%; background: #f472b6; box-shadow: 0 0 0 4px rgba(244, 114, 182, .25); }
@media (max-width: 800px) { .edit-bar { bottom: calc(72px + env(safe-area-inset-bottom, 0px)); } .edit-bar .edit-msg { font-size: .82rem; } }
/* Trình sửa ảnh */
.ie-modal { max-width: 600px !important; }
.ie-stage { display: grid; place-items: center; padding: 16px; border-radius: 12px; background: repeating-conic-gradient(#e9ede9 0 25%, #f7f9f7 0 50%) 0 0 / 18px 18px; }
[data-theme="dark"] .ie-stage { background: repeating-conic-gradient(#1a231d 0 25%, #121a15 0 50%) 0 0 / 18px 18px; }
.ie-stage canvas { touch-action: none; cursor: grab; border-radius: 6px; box-shadow: 0 0 0 2px var(--accent), 0 10px 30px -10px rgba(0, 0, 0, .4); max-width: 100%; }
.ie-stage canvas:active { cursor: grabbing; }
.ie-ratios { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 12px; }
.ie-ratios .chip { cursor: pointer; font-size: .85rem; padding: 6px 12px; }
.ie-sliders { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.ie-sliders label { display: grid; gap: 4px; font-size: .84rem; font-weight: 600; }
.ie-sliders input { accent-color: var(--accent); width: 100%; }
@media (max-width: 520px) { .ie-sliders { grid-template-columns: 1fr; } }

/* ---------- Trợ lý AI bên phải ---------- */
.ai-fab { position: fixed; right: 20px; bottom: 20px; z-index: 70; display: flex; align-items: center; gap: 8px; padding: 12px 18px 12px 14px; border: 0; border-radius: 99px;
  background: linear-gradient(135deg, var(--accent), var(--brand)); color: var(--on-accent); font-weight: 700; font-size: .95rem; cursor: pointer; box-shadow: 0 14px 30px -12px var(--accent); }
.ai-fab:hover { filter: brightness(1.06); }
#ai-root.open .ai-fab { display: none; }
.ai-panel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 85; width: 400px; max-width: 100%; display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--line);
  box-shadow: -20px 0 50px -30px rgba(0, 0, 0, .45); transform: translateX(105%); transition: transform .25s ease; }
#ai-root.open .ai-panel { transform: none; }
.ai-head { display: flex; align-items: center; gap: 10px; padding: 14px 12px 14px 16px; border-bottom: 1px solid var(--line); }
.ai-head > span:nth-child(2) { flex: 1; display: grid; line-height: 1.3; }
.ai-head small { color: var(--muted); font-size: .78rem; }
.ai-av { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--accent), var(--brand-2)); flex: 0 0 auto; }
.ai-x { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 1.2rem; cursor: pointer; }
.ai-msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--surface-2); }
.ai-msg { max-width: 88%; padding: 10px 14px; border-radius: 14px; font-size: .94rem; line-height: 1.55; word-wrap: break-word; }
.ai-msg.bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-top-left-radius: 4px; }
.ai-msg.me { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-top-right-radius: 4px; }
.ai-li { display: block; padding-left: 14px; position: relative; margin: 3px 0; }
.ai-li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.ai-lesson { display: block; margin: 6px 0; padding: 8px 10px; border-radius: 10px; background: var(--tint); color: var(--accent-ink); font-weight: 600; text-decoration: none; }
.ai-lesson:hover { filter: brightness(.97); }
.ai-typing { display: flex; gap: 5px; }
.ai-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: ai-dot 1s infinite ease-in-out; }
.ai-typing i:nth-child(2) { animation-delay: .15s; } .ai-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes ai-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 0; background: var(--surface-2); }
.ai-chips button { padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); color: var(--accent-ink); font-size: .84rem; font-weight: 600; cursor: pointer; }
.ai-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: var(--surface); }
.ai-form input { flex: 1; min-width: 0; height: 46px; padding: 0 14px; border: 1px solid var(--input-line); border-radius: 12px; background: var(--surface); color: var(--ink); font-size: 1rem; outline: none; }
.ai-form input:focus { border-color: var(--accent); }
.ai-form button { width: 46px; height: 46px; border: 0; border-radius: 12px; background: var(--accent); color: var(--on-accent); font-size: 1.1rem; cursor: pointer; }
@media (max-width: 800px) {
  .ai-fab { right: 14px; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); padding: 12px; }

  .ai-panel { width: 100%; border-left: 0; }
  .ai-form { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
}
body.editing .ai-fab { display: none; }

.ai-corn { font-size: 1.35rem; line-height: 1; }
.ai-av { font-size: 1.45rem; }
.ai-chips[hidden] { display: none; }

/* Nút Trợ Lý Bắp: bắp ngô trong vòng tròn, sóng tỏa ra, chữ "Hỗ Trợ" bên dưới */
.ai-fab { flex-direction: column; gap: 6px; padding: 0; border-radius: 0; background: none; box-shadow: none; color: var(--ink); filter: none; }
.ai-fab:hover { filter: none; }
.ai-bubble { position: relative; width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #ffffff 0 52%, #eaf6e2 53%); border: 6px solid var(--accent);
  box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 22%, transparent), 0 12px 26px -10px rgba(0, 0, 0, .45); transition: transform .2s; }
.ai-fab:hover .ai-bubble { transform: scale(1.06); }
.ai-corn { font-size: 1.9rem; line-height: 1; position: relative; z-index: 2; animation: ai-wiggle 3.2s ease-in-out infinite; }
.ai-ring { position: absolute; inset: -6px; border-radius: 50%; border: 3px solid var(--accent); opacity: 0; animation: ai-pulse 2.4s ease-out infinite; pointer-events: none; }
.ai-ring.r2 { animation-delay: 1.2s; }
@keyframes ai-pulse { 0% { transform: scale(1); opacity: .55; } 100% { transform: scale(1.75); opacity: 0; } }
@keyframes ai-wiggle { 0%, 82%, 100% { transform: rotate(0); } 86% { transform: rotate(-14deg); } 90% { transform: rotate(12deg); } 94% { transform: rotate(-8deg); } }
.ai-label { display: inline-block !important; padding: 3px 12px; border-radius: 99px; background: var(--accent); color: var(--on-accent); font-size: .8rem; font-weight: 700; letter-spacing: .02em; box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .4); white-space: nowrap; }
@media (max-width: 800px) {
  .ai-fab { padding: 0; right: 12px; bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }
  .ai-bubble { width: 56px; height: 56px; border-width: 5px; }
  .ai-corn { font-size: 1.6rem; }
  .ai-label { font-size: .72rem; padding: 2px 10px; }
}
/* Chấm đỏ nhấp nháy trước chữ "Trợ Lý Hỗ Trợ" */
.ai-label { display: inline-flex !important; align-items: center; gap: 6px; }
.ai-live { position: relative; width: 9px; height: 9px; border-radius: 50%; background: #ef4444; flex: 0 0 auto; box-shadow: 0 0 0 1.5px #fff; animation: ai-blink 1s ease-in-out infinite; }
.ai-live::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #ef4444; animation: ai-ping 1.4s ease-out infinite; }
@keyframes ai-blink { 50% { background: #ff9b9b; } }
@keyframes ai-ping { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(2.6); opacity: 0; } }

.foot-num { display: inline-block; min-width: 1.3em; font-weight: 700; color: #9fd98a; font-variant-numeric: tabular-nums; }

/* ---------- Ảnh bìa khóa học ---------- */
.cc-body { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px 20px; flex: 1; }
.cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); container-type: inline-size; }
.cover > img:not(.cv-ceo) { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.course-card:hover .cover > img:not(.cv-ceo), .course-card:hover .cv-ceo { transform: scale(1.04); }
.cover-gen { color: #fff; background: radial-gradient(120% 140% at 0% 100%, #0d3a0a 0%, #1d5f12 45%, #2c8212 100%); }
.cover-gen.cv-1 { background: radial-gradient(120% 140% at 0% 100%, #06302a 0%, #0f5b47 45%, #1f8a5c 100%); }
.cover-gen.cv-2 { background: radial-gradient(120% 140% at 0% 100%, #2a3208 0%, #4f6a10 45%, #7f9d1c 100%); }
.cover-gen::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 2px, transparent 2px 14px); }
.cover-gen::after { content: ""; position: absolute; right: -12%; top: -30%; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.22), transparent 65%); }
.cover-gen > .cv-ceo { position: absolute; right: 0; top: 0; height: 100%; width: 48%; display: block; transform-origin: 70% 30%; object-fit: cover; object-position: 50% 12%; z-index: 1;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 38%); mask-image: linear-gradient(to right, transparent 0%, #000 38%); transition: transform .5s ease; }
.cv-text { position: absolute; z-index: 2; left: 6.5cqw; right: 40%; top: 0; bottom: 0; display: flex; flex-direction: column; justify-content: center; gap: 2.4cqw; }
.cv-kicker { display: inline-flex; align-items: center; gap: 1.6cqw; font-size: 2.9cqw; font-weight: 700; letter-spacing: .06em; opacity: .92; }
.cv-kicker img { width: 4.6cqw; height: 4.6cqw; object-fit: contain; background: #fff; border-radius: 50%; padding: .5cqw; }
.cv-title { font-size: 6.4cqw; line-height: 1.18; font-weight: 800; text-wrap: balance; text-shadow: 0 2px 12px rgba(0,0,0,.25);
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.cv-by { display: inline-block; align-self: flex-start; font-size: 2.8cqw; font-weight: 700; color: #183d0e; background: #c9f2a4; padding: .9cqw 2.4cqw; border-radius: 99px; }
/* Trang khóa học: ảnh bìa bên phải dải tiêu đề */
.band-split { display: grid; gap: 22px; align-items: center; }
.band-cover .cover { border-radius: var(--r-lg); box-shadow: 0 24px 48px -28px rgba(0,0,0,.45); }
@media (min-width: 900px) { .band-split { grid-template-columns: 1.15fr 1fr; gap: 40px; } }
@media (max-width: 899px) { .band-cover { order: -1; } }
/* Quản trị: ảnh bìa nhỏ trong danh sách khóa học */
.arow-cover { grid-template-columns: 1fr !important; }
@media (min-width: 900px) { .arow-cover { grid-template-columns: 180px 1fr !important; column-gap: 18px; } .arow-cover > .btn-row { grid-column: 2; } }
.acov { position: relative; width: 180px; }
.acov .cover { border-radius: 10px; }
.acov-tag { display: block; margin-top: 6px; font-size: .78rem; color: var(--muted); text-align: center; }
@media (max-width: 899px) { .acov { width: 100%; max-width: 360px; } }

/* ---------- Dòng chữ chạy ở dưới cùng màn hình ---------- */
:root { --tk-h: 38px; }
.ticker-bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -10px 26px -14px rgba(0, 0, 0, .45); border-top: 1px solid rgba(255, 255, 255, .14); }
body:has(.ticker-bottom) { padding-bottom: calc(var(--tk-h) + env(safe-area-inset-bottom, 0px)); }
body:has(.ticker-bottom) .ai-fab { bottom: calc(20px + var(--tk-h)); }
body:has(.ticker-bottom) #toast { bottom: calc(24px + var(--tk-h)); }
@media (max-width: 800px) {
  :root { --tk-h: 32px; --tab-h: 59px; }
  /* Trên điện thoại: dòng chữ nằm ngay trên thanh menu dưới */
  .ticker-bottom { bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px)); padding-bottom: 0; z-index: 39; box-shadow: none; border-top: 0; }
  body:has(.ticker-bottom) { padding-bottom: calc(64px + var(--tk-h) + env(safe-area-inset-bottom, 0px)); }
  body:has(.ticker-bottom) .ai-fab { bottom: calc(78px + var(--tk-h) + env(safe-area-inset-bottom, 0px)); }
  body:has(.ticker-bottom) #toast { bottom: calc(80px + var(--tk-h) + env(safe-area-inset-bottom, 0px)) !important; }
}

/* Biểu tượng Trợ Lý: robot trên nền xanh bo góc (thay bắp ngô) */
.ai-bubble { width: 64px; height: 64px; border-radius: 20px; border: 4px solid #fff; background: linear-gradient(145deg, #22b389 0%, #15936c 55%, #0f7a59 100%);
  box-shadow: 0 0 0 1px rgba(15, 122, 89, .25), 0 14px 28px -10px rgba(0, 0, 0, .45); }
[data-theme="dark"] .ai-bubble { border-color: #e9f5ef; }
.ai-ring { inset: -4px; border-radius: 22px; border-color: #1aa07a; }
@keyframes ai-pulse { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(1.55); opacity: 0; } }
.ai-robot { width: 54px; height: 54px; position: relative; z-index: 2; display: block; animation: ai-bob 3.2s ease-in-out infinite; }
@keyframes ai-bob { 0%, 80%, 100% { transform: translateY(0) rotate(0); } 85% { transform: translateY(-2px) rotate(-8deg); } 90% { transform: translateY(-2px) rotate(7deg); } 95% { transform: translateY(0) rotate(-3deg); } }
@media (max-width: 800px) { .ai-bubble { width: 56px; height: 56px; border-width: 3px; border-radius: 17px; } .ai-ring { border-radius: 19px; } .ai-robot { width: 47px; height: 47px; } }

/* ---------- Ảnh bìa buổi giảng ---------- */
.lesson-row.has-thumb { gap: 14px; padding: 10px 14px 10px 10px; }
.lr-thumb { position: relative; flex: 0 0 132px; border-radius: 10px; overflow: hidden; }
.lr-thumb .cover { border-radius: 10px; }
.lr-play { position: absolute; right: 6px; bottom: 6px; z-index: 3; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .55); color: #fff; }
.lr-play svg { width: 12px; height: 12px; margin-left: 2px; }
.lr-no { position: absolute; left: 6px; top: 6px; z-index: 3; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center; background: #fff; color: var(--accent-ink, #1c5a0e); font-weight: 800; font-size: .8rem; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.lesson-row.has-thumb .s { font-size: .88rem; }
@media (max-width: 560px) { .lr-thumb { flex-basis: 104px; } .lesson-row.has-thumb .t { font-size: .95rem; } }
.lc-thumb { position: relative; display: block; margin: -6px -8px 4px; border-radius: 12px; overflow: hidden; }
.lc-thumb .lr-play { width: 40px; height: 40px; right: 10px; bottom: 10px; background: var(--accent); }
.lc-thumb .lr-play svg { width: 16px; height: 16px; }
.cat-cover { position: relative; display: block; margin: -24px -24px 18px; border-radius: var(--r-lg) var(--r-lg) 0 0; overflow: hidden; }
.cat-cover .cover { border-radius: 0; }
.cat-cover:hover .cover > img:not(.cv-ceo), .cat-cover:hover .cv-ceo { transform: scale(1.04); }
.cc-new { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 3; padding: 6px 10px; border-radius: 8px; background: rgba(0, 0, 0, .6); color: #fff; font-size: .82rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; backdrop-filter: blur(4px); }
/* Trang quản trị: chọn ảnh bìa buổi giảng */
.thumb-area { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.thumb-pick { display: grid; gap: 14px; align-items: start; }
@media (min-width: 700px) { .thumb-pick { grid-template-columns: 280px 1fr; } }
.thumb-prev { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--surface-2); border: 1px dashed var(--line-2); display: grid; place-items: center; }
.thumb-prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-wait { padding: 12px; text-align: center; color: var(--muted); font-size: .88rem; }
.thumb-bar { position: absolute; left: 8px; right: 8px; bottom: 8px; height: 6px; border-radius: 99px; background: rgba(255,255,255,.7); overflow: hidden; }
.thumb-bar i { display: block; height: 100%; background: var(--accent); }

.cat-cover .cv-by { display: none; }
.cat-cover .cv-text { padding-bottom: 9cqw; }

/* Thẻ "Buổi giảng mới nhất": nằm dưới ảnh CEO, không che ảnh */
.latest-card { position: relative; left: auto; bottom: auto; margin: 16px auto 0; width: min(100%, 440px); }
.latest-card:has(.lc-thumb) { grid-template-columns: 150px 1fr; column-gap: 16px; align-items: start; }
.latest-card:has(.lc-thumb) > :not(.lc-thumb) { grid-column: 2; }
.latest-card .lc-thumb { grid-column: 1; grid-row: 1 / span 4; margin: 0; align-self: center; }
.latest-card .lc-thumb .lr-play { width: 32px; height: 32px; right: 8px; bottom: 8px; }
@media (min-width: 960px) { .latest-card { position: relative; left: auto; bottom: auto; width: 100%; max-width: 440px; margin: 16px 0 0 auto; } }
@media (max-width: 480px) { .latest-card:has(.lc-thumb) { grid-template-columns: 112px 1fr; column-gap: 12px; } .latest-card:has(.lc-thumb) .frame-meta { display: none; } }

/* Tên CEO: dải chú thích sang trọng ở chân ảnh, không che mặt */
.portrait-tag { top: auto; left: 0; right: 0; bottom: 0; display: grid; gap: 4px; padding: 72px 24px 20px; border-radius: 0; box-shadow: none;
  background: linear-gradient(180deg, rgba(8, 28, 6, 0) 0%, rgba(8, 28, 6, .55) 45%, rgba(8, 28, 6, .88) 100%); color: #fff; }
.portrait-tag b { font-size: 1.55rem; line-height: 1.15; font-weight: 800; letter-spacing: -.01em; text-shadow: 0 2px 12px rgba(0, 0, 0, .35); }
.portrait-tag span { display: inline-flex; align-items: center; gap: 10px; font-size: .92rem; font-weight: 600; color: #d4f5bd; }
.portrait-tag span::before { content: ""; width: 26px; height: 3px; border-radius: 3px; background: #7fd858; }
@media (max-width: 480px) { .portrait-tag { padding: 56px 18px 16px; } .portrait-tag b { font-size: 1.3rem; } .portrait-tag span { font-size: .85rem; } }
@media (min-width: 960px) { .hero-portrait { max-width: 400px; aspect-ratio: 4 / 4.4; } .latest-card { max-width: 400px; } .hero-grid { padding-top: 56px; padding-bottom: 64px; } }

/* Thẻ "Buổi giảng mới nhất": nổi bật, nền xanh Mộc Việt đậm */
.hero .latest-card { overflow: hidden; gap: 10px; padding: 20px 22px 22px; border: 0; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, #3aa31a 0%, #22760f 38%, #123f0a 100%);
  box-shadow: 0 26px 50px -22px rgba(22, 92, 10, .75), inset 0 0 0 1px rgba(255, 255, 255, .08); transition: transform .2s, box-shadow .2s; }
.hero .latest-card::before { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 242, 164, .28), transparent 65%); pointer-events: none; }
.hero .latest-card::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(255,255,255,.035) 0 2px, transparent 2px 14px); pointer-events: none; }
.hero .latest-card > * { position: relative; z-index: 1; }
.hero a.latest-card:hover { transform: translateY(-3px); box-shadow: 0 32px 60px -24px rgba(22, 92, 10, .85), inset 0 0 0 1px rgba(255, 255, 255, .12); }
.hero .latest-card .frame-badge { display: inline-flex; align-items: center; gap: 8px; background: #c9f2a4; color: #123f0a; font-size: .8rem; padding: 5px 12px; letter-spacing: .01em; }
.hero .latest-card .frame-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #e23b2e; box-shadow: 0 0 0 0 rgba(226, 59, 46, .6); animation: lc-live 1.6s ease-out infinite; }
@keyframes lc-live { 0% { box-shadow: 0 0 0 0 rgba(226, 59, 46, .6); } 100% { box-shadow: 0 0 0 9px rgba(226, 59, 46, 0); } }
.hero .latest-card .play-disc { width: 46px; height: 46px; background: #fff; color: #1f6f10; box-shadow: 0 0 0 0 rgba(255, 255, 255, .5); animation: lc-pulse 2.2s ease-out infinite; }
.hero .latest-card .play-disc svg { width: 18px; height: 18px; }
@keyframes lc-pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .45); } 100% { box-shadow: 0 0 0 14px rgba(255, 255, 255, 0); } }
.hero .latest-card .frame-title { color: #fff; font-size: 1.22rem; line-height: 1.35; font-weight: 800; text-shadow: 0 2px 10px rgba(0, 0, 0, .2); }
.hero .latest-card .lc-empty { color: rgba(255, 255, 255, .9); }
.hero .latest-card .frame-meta { color: rgba(236, 250, 226, .85); }
.hero .latest-card .frame-meta svg { opacity: .9; }
.hero .latest-card .lc-cta { justify-self: start; margin-top: 4px; padding: 10px 18px 10px 20px; border-radius: 99px; background: #fff; color: #1a5a0d; font-weight: 800;
  box-shadow: 0 10px 22px -10px rgba(0, 0, 0, .45); transition: gap .2s, background .2s; }
.hero a.latest-card:hover .lc-cta { gap: 9px; background: #effbe6; }
.hero .latest-card .lc-thumb { box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .5); outline: 2px solid rgba(255, 255, 255, .2); }
.hero .latest-card .lc-thumb .lr-play { background: #fff; color: #1f6f10; }
[data-theme="dark"] .hero .latest-card { background: radial-gradient(120% 140% at 100% 0%, #2f8a15 0%, #1a5c0c 40%, #0b2a06 100%); }
/* Thẻ buổi giảng mới nhất nằm cột trái; cột phải chỉ dành cho ảnh CEO */
.hero-text .latest-card { margin: 22px 0 0; width: 100%; max-width: 560px; }
@media (min-width: 960px) { .hero-text .latest-card { margin: 26px 0 0; max-width: 560px; } .hero-portrait { max-width: 440px; aspect-ratio: 4 / 4.8; } }
.hero-text .hero-actions { margin-top: 18px; }
.hero-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 32px; margin-top: 22px; }
.hero-foot .hero-actions, .hero-foot .hero-stats { margin-top: 0; }
@media (min-width: 960px) { .hero-grid { align-items: center; } }
.hero-foot { gap: 16px 24px; }
.hero-foot .hero-actions { flex: 0 0 auto; width: auto; }
.hero-foot .hero-stats div { padding: 0 18px; }
.hero-foot .hero-stats dd { font-size: 1.5rem; }
.hero-foot { gap: 14px 16px; }
.hero-foot .hero-stats div { padding: 0 16px; }

/* ---------- Buổi (mục cha) → phần (mục con) ---------- */
.results > .sec { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.sec > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; background: linear-gradient(90deg, var(--tint), transparent 80%); }
.sec > summary::-webkit-details-marker { display: none; }
.sec-no { flex: 0 0 auto; padding: 5px 12px; border-radius: 99px; background: var(--accent); color: var(--on-accent, #fff); font-weight: 800; font-size: .86rem; white-space: nowrap; }
.sec-t { flex: 1; min-width: 0; font-weight: 800; font-size: 1.05rem; line-height: 1.35; }
.sec-n { flex: 0 0 auto; color: var(--muted); font-size: .84rem; white-space: nowrap; }
.sec-ch { flex: 0 0 auto; display: flex; color: var(--accent); transition: transform .2s; transform: rotate(90deg); }
.sec:not([open]) .sec-ch { transform: none; }
.sec-items { display: grid; gap: 8px; padding: 8px 10px 12px; border-top: 1px solid var(--line); }
.sec-items .lesson-row { border-color: transparent; background: var(--surface-2, transparent); }
.sec-items .lesson-row:hover { border-color: var(--accent); }
@media (max-width: 560px) { .sec > summary { flex-wrap: wrap; gap: 6px 10px; padding: 12px; } .sec-t { flex-basis: calc(100% - 40px); order: 3; } .sec-n { margin-left: auto; } }
.sib-sec { margin: 10px 2px 2px; font-size: .86rem; color: var(--muted); }
.sib-sec b { color: var(--accent-ink, var(--accent)); margin-right: 4px; }
.lesson-row.in-sec { margin-left: 10px; }
/* Trang quản trị */
.sec-pick { display: grid; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line-2); }
.sec-pick .btn { justify-self: start; }
.input-sm { padding: 6px 10px; font-size: .88rem; height: auto; min-height: 34px; width: auto; }
.sec-admin { display: grid; gap: 12px; }
.sa-group { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--surface-2, transparent); }
.sa-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.sa-head b { color: var(--accent-ink, var(--accent)); }
.sa-head .t { flex: 1; min-width: 140px; font-weight: 700; }
.sa-head .input-sm { flex: 1; min-width: 160px; }
.sec-admin .order-item select { max-width: 110px; }
.sa-add { display: flex; flex-wrap: wrap; gap: 8px; }
.sa-add .input-sm { flex: 1; min-width: 200px; }

/* Chọn ảnh bìa ngay trong video */
.modal.modal-wide { max-width: 760px; width: calc(100vw - 32px); }
.pf-stage { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; }
.pf-stage video { width: 100%; height: 100%; object-fit: contain; display: block; }
.pf-time { position: absolute; left: 10px; bottom: 10px; padding: 3px 9px; border-radius: 6px; background: rgba(0, 0, 0, .65); color: #fff; font-size: .82rem; font-variant-numeric: tabular-nums; }
.pf-range { width: 100%; margin: 14px 0 10px; accent-color: var(--accent); height: 22px; }
.pf-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }

/* ---------- Liên hệ Zalo OA ---------- */
@media (min-width: 760px) { .foot-grid:has(> div:nth-child(4)) { grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 40px; } }
.zalo-fab { position: fixed; right: 27px; bottom: 132px; z-index: 69; display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; }
.zf-bubble { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: #0068ff; border: 3px solid #fff;
  box-shadow: 0 10px 22px -8px rgba(0, 104, 255, .65); transition: transform .2s; }
.zalo-fab:hover .zf-bubble { transform: scale(1.07); }
.zf-label { padding: 1px 10px; border-radius: 99px; background: #0068ff; color: #fff; font-size: .74rem; font-weight: 700; box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .35); }
body:has(.ticker-bottom) .zalo-fab { bottom: calc(132px + var(--tk-h)); }
body:has(#ai-root.open) .zalo-fab, body.editing .zalo-fab { display: none; }
@media (max-width: 800px) {
  .zalo-fab { right: 18px; bottom: calc(172px + env(safe-area-inset-bottom, 0px)); }
  .zf-bubble { width: 46px; height: 46px; }
  body:has(.ticker-bottom) .zalo-fab { bottom: calc(172px + var(--tk-h) + env(safe-area-inset-bottom, 0px)); }
}
.foot-zalo { display: flex !important; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 10px; border-radius: 12px; background: #0068ff; color: #fff !important; text-decoration: none; max-width: 260px; }
.foot-zalo:hover { background: #0057d6; }
.foot-zalo svg { flex: 0 0 auto; }
.foot-zalo span { display: grid; font-weight: 700; line-height: 1.25; }
.foot-zalo small { font-weight: 500; opacity: .85; font-size: .78rem; }
.zalo-inline { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; padding: 4px 12px 4px 6px; border-radius: 99px; background: #0068ff; color: #fff !important; font-weight: 700; font-size: .86rem; text-decoration: none; vertical-align: middle; }
.zalo-inline svg { width: 22px; height: 22px; }
.btn-zalo { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: #0068ff; color: #fff !important; border: 0; box-shadow: 0 12px 24px -12px rgba(0, 104, 255, .7); }
.btn-zalo:hover { background: #0057d6; }
.btn-zalo svg { width: 28px; height: 28px; }
/* Khung Trợ Lý: nút nhắn tin trợ lý hỗ trợ (người thật) qua Zalo */
.ai-human { display: flex; align-items: center; gap: 10px; margin: 10px 12px 0; padding: 10px 12px; border-radius: 12px; background: #0068ff; color: #fff; text-decoration: none; box-shadow: 0 8px 18px -10px rgba(0, 104, 255, .7); }
.ai-human:hover { background: #0057d6; }
.ai-human svg { flex: 0 0 auto; width: 30px; height: 30px; }
.ai-human span { flex: 1; display: grid; line-height: 1.25; }
.ai-human small { opacity: .85; font-size: .8rem; }
.ai-human i { font-style: normal; font-size: 1.4rem; opacity: .8; }
/* Nút "Mở khóa" trên thẻ khóa học / buổi giảng chưa được mở */
.lock-tag.lock-btn { cursor: pointer; padding: 6px 12px; border-radius: 99px; font-size: .82rem; font-weight: 700; color: #fff; background: #0068ff; box-shadow: 0 6px 14px -8px rgba(0, 104, 255, .8); transition: background .15s, transform .15s; position: relative; z-index: 2; }
.lock-tag.lock-btn:hover { background: #0057d6; transform: translateY(-1px); }
.lock-tag.lock-btn svg { stroke: #fff; }
button.zalo-inline { border: 0; cursor: pointer; font: inherit; font-weight: 700; font-size: .86rem; }
.sa-auto { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--tint); border: 1px solid var(--line); font-size: .9rem; }
.sa-auto span { flex: 1; min-width: 220px; }
/* Danh sách gọn: phần bị khóa theo thứ tự chỉ hiện ổ khóa nhỏ trên ảnh, không lặp chữ */
.lr-lock { position: absolute; right: 6px; bottom: 6px; z-index: 3; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .6); color: #fff; }
.lr-lock svg { width: 13px; height: 13px; stroke: #fff; }
.lesson-row.seq-locked { opacity: .72; }
.lesson-row.seq-locked .lr-thumb .cover { filter: grayscale(.55); }
.lesson-row.seq-locked:hover { opacity: 1; }
.cover-plain { display: grid; place-items: center; background: radial-gradient(120% 140% at 0% 100%, #0d3a0a 0%, #1d5f12 55%, #2c8212 100%); }
.cover-plain img { width: 34%; max-width: 46px; height: auto; opacity: .95; filter: drop-shadow(0 2px 6px rgba(0,0,0,.3)); background: #fff; border-radius: 50%; padding: 6px; }
.cat-move { margin-left: auto; display: inline-flex; gap: 6px; }
.cover.cover-plain > img { width: 40px; height: 40px; object-fit: contain; transform: none; }
.lesson-row:hover .cover.cover-plain > img { transform: none; }
.cat-new { margin-bottom: 16px; max-width: 840px; }
.cat-new-row { display: flex; flex-wrap: wrap; gap: 10px; }
.cat-new-row .input { flex: 1; min-width: 240px; }
/* Ô tìm nhanh ở trang chủ (bộ lọc đầy đủ nằm ở trang Tìm bài) */
.quick-search { position: relative; display: flex; gap: 8px; }
.quick-search .input { flex: 1; padding-left: 42px; min-height: 50px; }
.quick-search .qs-ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); display: flex; color: var(--muted); }
.quick-search .qs-ic svg { width: 18px; height: 18px; }
.qs-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.qs-tags a { padding: 7px 14px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-size: .88rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.qs-tags a:hover { border-color: var(--accent); color: var(--accent-ink, var(--accent)); }
.lesson-row.locked { opacity: .8; }
/* Điện thoại: thẻ chủ đề gọn hơn (ẩn mô tả dài, tên khóa đã đủ rõ) */
@media (max-width: 560px) { .cat > p { display: none; } .cat-cover .cc-new { font-size: .76rem; } }
.foot-app { display: inline-flex !important; align-items: center; gap: 8px; }
.foot-app svg { flex: 0 0 auto; opacity: .85; }
/* Nút cài app nổi bật ở chân trang (kiểu huy hiệu cửa hàng ứng dụng) */
.foot-grid a.foot-app { display: flex !important; align-items: center; gap: 12px; width: 100%; max-width: 230px; margin-top: 10px; padding: 9px 16px 9px 12px;
  border-radius: 12px; background: #fff; color: #0f2a0b !important; text-decoration: none; box-shadow: 0 10px 22px -12px rgba(0, 0, 0, .6); transition: transform .15s, box-shadow .15s; }
.foot-grid a.foot-app + a.foot-app { margin-top: 8px; }
.foot-grid a.foot-app:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -12px rgba(0, 0, 0, .7); }
.foot-app .fa-ic { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: #2c8212; color: #fff; }
.foot-app[data-install="ios"] .fa-ic { background: #111; }
.foot-app .fa-t { display: grid; line-height: 1.15; }
.foot-app .fa-t small { font-size: .72rem; font-weight: 600; color: #4a5a46; }
.foot-app .fa-t b { font-size: 1.05rem; font-weight: 800; }
.vdl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 18px; padding: 14px; border-radius: 12px; background: var(--tint); border: 1px solid var(--line); }
.vdl .hint { flex: 1; min-width: 200px; margin: 0; }
.link-btn.forgot { display: block; margin: 12px auto 0; background: none; border: 0; color: var(--accent-ink, var(--accent)); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
/* Phần trăm đã xem hiện ngay trên video */
.v-wrap { position: relative; }
.v-pct { position: absolute; top: 10px; right: 10px; z-index: 2; padding: 4px 10px; border-radius: 99px; background: rgba(0, 0, 0, .62); color: #fff; font-size: .8rem; font-weight: 700; pointer-events: none; backdrop-filter: blur(4px); }
.v-pct.ok { background: var(--accent); }
.v-pct:empty { display: none; }
.seek-lock { align-self: center; font-size: .78rem; color: rgba(255,255,255,.75); padding: 0 6px; white-space: nowrap; }
.seek-lock[hidden] { display: none; }
@media (max-width: 560px) { .seek-lock { display: none; } }

/* ---------- Đánh giá sao ---------- */
.stars-line { display: inline-flex; align-items: center; gap: 5px; font-size: .92rem; }
.stars-line .st-ic { color: #f5a524; font-size: 1.05em; }
.stars-line.sm { font-size: .84rem; }
.course-card .stars-line { margin-top: -4px; }
.rate-card { margin-top: 16px; }
.rate-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.star-pick { display: flex; align-items: center; gap: 4px; margin-bottom: 10px; }
.star-pick button { background: none; border: 0; padding: 2px; font-size: 2rem; line-height: 1; color: var(--line-2, #cfd8cc); cursor: pointer; transition: transform .1s, color .1s; }
.star-pick button.on { color: #f5a524; }
.star-pick button:hover { transform: scale(1.12); }
.star-pick .star-text { margin-left: 8px; font-weight: 700; color: var(--accent-ink, var(--accent)); }
.rate-card textarea { margin-bottom: 10px; }
.rate-lock { margin: 12px 0 0; padding: 12px 14px; border-radius: 10px; background: var(--surface-2, var(--tint)); color: var(--muted); }
.reviews { display: grid; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.review p { margin: 4px 0 0; color: var(--ink-2, inherit); }
.st-sm { color: #f5a524; letter-spacing: 1px; font-size: .85rem; }
.st-sm span { color: var(--line-2, #cfd8cc); }
.dcard-wide { grid-column: 1 / -1; }
/* Cập nhật website */
.upd-card { margin-top: 16px; border: 2px solid var(--accent); }
.upd-info { font-size: .92rem; line-height: 1.7; margin-bottom: 12px; }
.upd-bk { display: inline-block; padding: 1px 8px; margin: 2px 2px 2px 0; border-radius: 99px; background: var(--tint); font-size: .82rem; }
.upd-row { display: flex; flex-wrap: wrap; gap: 10px; }
.upd-pick { cursor: pointer; }
.upd-status { margin-top: 12px; font-weight: 600; }
.ok-text { color: var(--accent-ink, var(--accent)); }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent-ink, var(--accent)); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; }
.btn-danger-ghost { background: var(--surface); color: var(--err-ink); border: 1px solid var(--err-line); }
.btn-danger-ghost:hover { background: var(--err-bg, #fdecec); }
.btn-danger-solid { background: #dc2626; color: #fff; border: 0; }
.btn-danger-solid:hover { background: #b91c1c; }

/* ---------- Xem tiếp: trượt từng bài, mũi tên ‹ › ---------- */
.car-nav { display: flex; align-items: center; gap: 8px; }
.car-btn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 1.5rem; line-height: 1; cursor: pointer; display: grid; place-items: center; box-shadow: var(--shadow-sm, 0 2px 6px rgba(0,0,0,.06)); transition: background .15s, color .15s, border-color .15s; }
.car-btn:hover:not(:disabled) { background: var(--accent); color: #fff; border-color: var(--accent); }
.car-btn:disabled { opacity: .35; cursor: default; }
.car-pos { min-width: 52px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted); }
.car { max-width: 860px; }
.car-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--r-lg); }
.car-track::-webkit-scrollbar { display: none; }
.car-slide { flex: 0 0 100%; scroll-snap-align: start; display: grid; grid-template-columns: 220px 1fr; gap: 18px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: inherit; text-decoration: none; }
.car-slide:hover { border-color: var(--accent); }
.car-thumb { flex: none; width: 100%; }
.car-body { display: grid; gap: 6px; min-width: 0; }
.car-body .t { font-weight: 800; font-size: 1.12rem; line-height: 1.35; }
.car-body .s { color: var(--muted); font-size: .88rem; }
.car-body .bar { display: block; height: 6px; border-radius: 99px; background: var(--tint); overflow: hidden; }
.car-body .bar i { display: block; height: 100%; background: var(--accent); }
.car-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.car-go { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--accent-ink, var(--accent)); }
.car-dots { display: flex; justify-content: center; gap: 6px; margin-top: 12px; max-width: 860px; }
.car-dots button { width: 8px; height: 8px; padding: 0; border-radius: 99px; border: 0; background: var(--line-2, #cfd8cc); cursor: pointer; transition: width .2s, background .2s; }
.car-dots button.on { width: 22px; background: var(--accent); }
@media (max-width: 600px) {
  .car-slide { grid-template-columns: 118px 1fr; gap: 12px; padding: 12px; }
  .car-body .t { font-size: 1rem; }
  .car-foot .s { display: none; }
  .car-btn { width: 38px; height: 38px; }
}
.block-continue .section-head { max-width: 860px; }

/* ---------- Toàn màn hình: nội dung giãn theo màn hình rộng ---------- */
.wrap { max-width: 1600px; padding: 0 clamp(20px, 3.2vw, 56px); }
.wrap.narrow { max-width: 900px; }
@media (min-width: 1400px) {
  .hero h1, .hero-title { font-size: clamp(3.4rem, 4vw, 4.6rem); }
}
@media (min-width: 1400px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) auto; gap: clamp(48px, 5vw, 110px); padding-top: 72px; padding-bottom: 80px; }
  .hero h1 { max-width: 16em; }
  .hero .lead { max-width: 64ch; font-size: 1.15rem; }
  .latest-card { max-width: 680px; }
  .hero-portrait { max-width: none; width: clamp(420px, 30vw, 540px); }
}
.adm-content { max-width: 1600px; }

/* ---------- Thanh đầu trang trải hết chiều ngang ---------- */
@media (min-width: 1100px) {
  .topbar .wrap { max-width: none; min-height: 76px; gap: 20px; padding: 0 clamp(24px, 3vw, 56px); }
  .topbar .nav { flex: 1; justify-content: center; gap: clamp(4px, 1.2vw, 22px); margin: 0 12px; }
  .topbar .nav a { font-size: 1.04rem; padding: 10px 14px; }
  .brand .brand-logo { height: 48px; width: 48px; }
  .brand > span { font-size: 1.3rem; }
  .brand .brand-sub { font-size: .8rem; }
}

/* ---------- Footer gọn: nút cài app nằm ngang dưới phần giới thiệu ---------- */
.foot-grid { padding-top: 36px; padding-bottom: 24px; gap: 24px 48px; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: minmax(0, 1.6fr) 1fr 1fr; align-items: start; } }
.foot-apps { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.foot-grid .foot-apps a.foot-app, .foot-grid .foot-apps a.foot-app + a.foot-app { margin-top: 0; width: auto; max-width: none; flex: 0 0 auto; }
.foot-bottom { padding-top: 14px; padding-bottom: 18px; }
@media (min-width: 1100px) { .foot-bottom { padding-right: 160px; } }
@media (max-width: 759px) { .foot-grid { grid-template-columns: 1fr 1fr; gap: 22px 16px; } .foot-grid > div:first-child { grid-column: 1 / -1; } }

/* ---------- Nút cài app: hình máy iPhone / Samsung rõ ràng ---------- */
.foot-grid .foot-apps a.foot-app { padding: 8px 18px 8px 10px; gap: 12px; border-radius: 16px; }
.foot-app .fa-ic, .foot-app[data-install="ios"] .fa-ic { width: 40px; height: 56px; background: none; border-radius: 0; filter: drop-shadow(0 4px 6px rgba(0,0,0,.25)); }
.foot-app .fa-ic svg { width: 32px; height: 54px; opacity: 1; }
.foot-app .fa-t b { font-size: 1.15rem; }
.foot-app .fa-t .fa-sub { font-weight: 500; color: #6b7a66; }

/* ---------- Nút cài app thu nhỏ, luôn nằm cạnh nhau ---------- */
.foot-apps { flex-wrap: nowrap; gap: 8px; margin-top: 14px; }
.foot-grid .foot-apps a.foot-app { padding: 6px 12px 6px 8px; gap: 8px; border-radius: 12px; min-width: 0; }
.foot-app .fa-ic, .foot-app[data-install="ios"] .fa-ic { width: 22px; height: 36px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.25)); }
.foot-app .fa-ic svg { width: 21px; height: 36px; }
.foot-app .fa-t small { font-size: .68rem; }
.foot-app .fa-t b { font-size: .98rem; white-space: nowrap; }
.foot-brand { white-space: nowrap; font-size: clamp(1.05rem, .9rem + .5vw, 1.3rem); }

/* ---------- Tiêu đề cột footer nổi bật ---------- */
.foot-grid .foot-h { position: relative; color: #fff; font-size: 1.12rem; font-weight: 800; letter-spacing: -.01em; padding-bottom: 10px; margin-bottom: 14px !important; }
.foot-grid .foot-h::after { content: ""; position: absolute; left: 0; bottom: 0; width: 36px; height: 3px; border-radius: 99px; background: #7fd35a; }
.foot-grid a { color: rgba(255, 255, 255, .88); }

/* ---------- Menu chính dàn đều khắp khoảng giữa ---------- */
@media (min-width: 1100px) {
  .topbar .nav { justify-content: space-evenly; gap: 8px; margin: 0 clamp(16px, 3vw, 64px); }
  .topbar .nav a { font-size: 1.1rem; font-weight: 600; padding: 12px 18px; }
}
.topbar .nav a { white-space: nowrap; }
@media (min-width: 1100px) and (max-width: 1400px) { .topbar .nav a { font-size: 1rem; padding: 10px 10px; } .topbar .nav { margin: 0 8px; } }
.acc-link { white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 801px) and (max-width: 1300px) { .brand .brand-sub { display: none; } .brand > span { font-size: 1.1rem; } .topbar .wrap { gap: 10px; } .acc-link { max-width: 150px; } }

/* ---------- Ảnh bìa từ video/ảnh tải lên: phủ tiêu đề giống bìa mặc định ---------- */
.cover-titled { position: relative; container-type: inline-size; color: #fff; overflow: hidden; }
.cover-titled::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(8, 28, 6, .86) 0%, rgba(8, 28, 6, .62) 42%, rgba(8, 28, 6, 0) 72%); }
.cover-titled .cv-text { right: 38%; }
.cover-titled .cv-kicker img { width: 4.6cqw; height: 4.6cqw; }
.cover-titled .cv-title { text-shadow: 0 2px 14px rgba(0,0,0,.5); }
.cat-cover .cover-titled .cv-text { padding-bottom: 9cqw; }

/* ---------- Ảnh bìa buổi giảng (chụp từ video) + tiêu đề tự ghi lên ---------- */
.cover-lt { position: relative; container-type: inline-size; overflow: hidden; color: #fff; }
.cover-lt::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(0deg, rgba(6, 22, 5, .9) 0%, rgba(6, 22, 5, .55) 42%, rgba(6, 22, 5, 0) 70%); }
.cover-lt .lt-text { position: absolute; z-index: 2; left: 5cqw; right: 5cqw; bottom: 5cqw; display: grid; gap: 1.6cqw; }
.cover-lt .lt-kick { display: inline-flex; align-items: center; gap: 1.4cqw; font-size: 3.2cqw; font-weight: 700; letter-spacing: .06em; opacity: .92; }
.cover-lt .lt-kick img { width: 4.6cqw; height: 4.6cqw; background: #fff; border-radius: 50%; padding: .4cqw; object-fit: contain; }
.cover-lt .lt-title { font-size: 6.2cqw; line-height: 1.2; font-weight: 800; text-shadow: 0 1px 8px rgba(0,0,0,.45);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@container (max-width: 240px) {
  .cover-lt .lt-kick { display: none; }
  .cover-lt .lt-title { font-size: 10.5cqw; }
  .cover-lt .lt-text { left: 6cqw; right: 6cqw; bottom: 6cqw; }
}
/* Ô nhỏ trong danh sách: chừa chỗ cho nút ▶ ở góc phải */
.lr-thumb .cover-lt .lt-text { right: 30%; }
.cover-lt .lt-short { display: none; }
@container (max-width: 240px) {
  .cover-lt .lt-title { display: none; }
  .cover-lt .lt-short { display: block; font-size: 12.5cqw; line-height: 1.1; font-weight: 800; text-shadow: 0 1px 8px rgba(0,0,0,.5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* ---------- Chọn kích thước video khi tải lên ---------- */
.vq { margin-top: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-lg, 14px); background: var(--surface); }
.vq-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.vq-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.vq-opt { position: relative; display: grid; gap: 2px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; transition: border-color .15s, background .15s; }
.vq-opt input { position: absolute; opacity: 0; pointer-events: none; }
.vq-opt b { font-size: 1.05rem; }
.vq-opt span { font-size: .8rem; color: var(--muted); }
.vq-opt em { font-style: normal; font-size: .8rem; font-weight: 700; color: var(--accent); }
.vq-opt:hover:not(.dis) { border-color: var(--accent); }
.vq-opt.on { border-color: var(--accent); background: var(--tint); box-shadow: inset 0 0 0 1px var(--accent); }
.vq-opt.dis { opacity: .45; cursor: not-allowed; }
.vq-opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.vq .hint { margin: 10px 0 0; }
.vq-stat { margin-top: 10px; font-weight: 600; display: grid; gap: 6px; }
.vq-bar { display: block; height: 6px; border-radius: 99px; background: var(--tint); overflow: hidden; }
.vq-bar i { display: block; height: 100%; background: var(--accent); transition: width .4s; }

/* ---------- Khung hình video (16:9, 4:3, 1:1, 3:4, 9:16) ---------- */
.player video, .player .v-wrap video { aspect-ratio: var(--v-ar, 16 / 9); object-fit: contain; }
.player.v-cover video { object-fit: cover; }
.player.v-tall .v-wrap, .player.v-tall > video { max-width: min(100%, calc(78vh * var(--v-r, .5625))); margin: 0 auto; }
.player.v-tall > video { display: block; }
.player.v-tall .player-msg { aspect-ratio: var(--v-ar); max-width: min(100%, calc(78vh * var(--v-r, .5625))); margin: 0 auto; }
.ar-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 8px; }
.ar-opt { position: relative; display: grid; justify-items: start; gap: 3px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; transition: border-color .15s, background .15s; }
.ar-opt input { position: absolute; opacity: 0; pointer-events: none; }
.ar-opt b { font-size: 1rem; }
.ar-opt span { font-size: .76rem; color: var(--muted); line-height: 1.3; }
.ar-opt:hover { border-color: var(--accent); }
.ar-opt.on { border-color: var(--accent); background: var(--tint); box-shadow: inset 0 0 0 1px var(--accent); }
.ar-opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.ar-shape { display: block; border: 2px solid currentColor; border-radius: 3px; opacity: .7; margin-bottom: 4px; height: 26px; }
.ar-opt.on .ar-shape { color: var(--accent); opacity: 1; }
.ar-fit { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; font-size: .9rem; cursor: pointer; }
.ar-fit input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.player.v-tall { background: transparent; }
.player.v-tall video { border-radius: 12px; }
.player.v-tall .player-bar { border-radius: 12px; margin-top: 6px; }

/* ---------- Bộ màu theo nhóm ---------- */
.sw-group { margin-top: 10px; }
.sw-h { margin: 0; font-size: .82rem; font-weight: 700; color: var(--muted); }
.sw-group .swatches { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin: 8px 0 6px; }
.sw-group + .pick-row { margin-top: 18px; }
@media (min-width: 1100px) { .sw-group .swatches { grid-template-columns: repeat(7, minmax(0, 1fr)); } .sw-group .swatch { padding: 7px 8px; gap: 8px; font-size: .84rem; } .sw-group .swatch i { width: 22px; height: 22px; } }

/* ---------- Chọn 2 màu: màu chính + màu phụ ---------- */
.two-col-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin: 12px 0 6px; }
.tcp { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); text-align: left; cursor: pointer; }
.tcp i { flex: none; width: 38px; height: 38px; border-radius: 50%; box-shadow: inset 0 0 0 3px rgba(255,255,255,.4), 0 0 0 1px var(--line); }
.tcp span { display: grid; gap: 2px; }
.tcp b { font-size: 1rem; }
.tcp small { color: var(--muted); font-size: .8rem; line-height: 1.35; }
.tcp:hover { border-color: var(--accent); }
.tcp.on { border-color: var(--accent); background: var(--tint); box-shadow: inset 0 0 0 1px var(--accent); }
.look-mini { margin: 6px 0 14px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--bg, #fff); font-size: .85rem; }
.lm-ticker { padding: 7px 12px; color: #fff; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: linear-gradient(90deg, #1f6f10, #3d9f17 50%, #1f6f10); }

.lm-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; padding: 12px; }
.lm-card { display: grid; gap: 6px; padding: 14px; border-radius: 12px; color: #fff; background: radial-gradient(120% 140% at 100% 0%, #3aa31a 0%, #22760f 38%, #123f0a 100%); }
.lm-badge { justify-self: start; font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: #c9f2a4; color: #123f0a; }
.lm-go { justify-self: start; font-weight: 700; background: #fff; color: #1f6f10; padding: 5px 12px; border-radius: 99px; font-size: .8rem; }
.lm-cta { display: grid; gap: 4px; align-content: center; padding: 14px; border-radius: 12px; color: #fff; background: linear-gradient(120deg, #2c8212, #4ba21c 60%, #7cc243); }
.lm-foot { padding: 9px 12px; color: rgba(255,255,255,.85); font-weight: 700; letter-spacing: .02em; background: #10300c; }

/* ---------- Menu chính phong cách sang trọng ---------- */
@media (min-width: 801px) {
  .topbar { background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 0; box-shadow: 0 1px 0 var(--line), 0 10px 30px -24px var(--shadow-c, rgba(0,0,0,.25)); }
  .topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; pointer-events: none;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--brand-2) 70%, transparent) 30%, color-mix(in srgb, var(--accent) 80%, transparent) 50%, color-mix(in srgb, var(--brand-2) 70%, transparent) 70%, transparent); }
  .topbar .nav a { position: relative; border-bottom: 0; color: color-mix(in srgb, var(--ink) 78%, transparent); font-weight: 500; letter-spacing: .015em; transition: color .25s ease; }
  .topbar .nav a::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 0; height: 2px; border-radius: 2px; transform: translateX(-50%);
    background: linear-gradient(90deg, var(--accent), var(--brand-2)); transition: width .35s cubic-bezier(.2, .7, .2, 1); }
  .topbar .nav a:hover { color: var(--ink); }
  .topbar .nav a:hover::after { width: 28px; }
  .topbar .nav a.active { color: var(--accent); font-weight: 700; border-bottom: 0; }
  .topbar .nav a.active::after { width: 44px; height: 2.5px; }
  .topbar .nav a.active::before { content: ""; position: absolute; left: 50%; bottom: -2px; width: 6px; height: 6px; transform: translateX(-50%) rotate(45deg); background: var(--brand-2); border-radius: 1px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--surface) 90%, transparent); }
}
@media (prefers-reduced-motion: reduce) { .topbar .nav a::after { transition: none; } }

/* ---------- Bộ nhớ máy chủ ---------- */
.mem-bar { position: relative; display: block; height: 8px; border-radius: 99px; background: var(--tint); overflow: hidden; }
.mem-bar > i { position: absolute; left: 0; top: 0; bottom: 0; display: block; border-radius: 99px; background: var(--accent); }
.mem-bar > i.add { border-radius: 0 99px 99px 0; background: repeating-linear-gradient(135deg, #f59e0b 0 5px, #fbbf24 5px 10px); }
.ok .mem-bar > i:first-child { background: #16a34a; } .warn .mem-bar > i:first-child { background: #d97706; } .bad .mem-bar > i:first-child { background: #dc2626; }
.mem-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.mem-top b { font-size: 1.8rem; letter-spacing: -.02em; }
.mem-top span { color: var(--muted); }
.mem-top em { margin-left: auto; font-style: normal; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: #dcfce7; color: #166534; }
.mem.warn .mem-top em { background: #fef3c7; color: #92400e; } .mem.bad .mem-top em { background: #fee2e2; color: #991b1b; }
.mem-stack { display: flex; height: 14px; border-radius: 99px; overflow: hidden; background: var(--tint); }
.mem-stack i { display: block; height: 100%; min-width: 2px; }
.mem-legend { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 18px; font-size: .88rem; }
.mem-legend li { display: flex; align-items: center; gap: 8px; }
.mem-legend li i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.mem-legend li i.free { background: var(--tint); box-shadow: inset 0 0 0 1px var(--line); }
.mem-legend li b { margin-left: auto; font-variant-numeric: tabular-nums; }
.mem-facts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; font-size: .9rem; }
.mem-facts span { display: inline-flex; align-items: center; gap: 6px; }
.mem-h { margin: 16px 0 6px; font-weight: 700; }
.mem-size { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.adm-mem { display: block; margin: 8px 12px 6px; text-decoration: none; }
.mem-mini { display: grid; gap: 6px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.06); color: rgba(255,255,255,.8); font-size: .8rem; }
.mem-mini b { color: #fff; }
.mem-mini .mem-bar { height: 6px; background: rgba(255,255,255,.14); }
.adm-mem:hover .mem-mini { background: rgba(255,255,255,.1); }
.up-mem:empty { display: none; }
.up-mem { margin-top: 14px; text-align: left; }
.upm { display: grid; gap: 7px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: .9rem; }
.upm.warn { border-color: #f59e0b; } .upm.bad { border-color: #dc2626; background: #fef2f2; }
.upm-row { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.adm-count[hidden] { display: none; }
.mem-legend { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.ai-fab { gap: 16px; }
@media (max-width: 800px) { .ai-fab { gap: 13px; } }

/* Robot trợ lý lắc trái – lắc phải mạnh, lặp lại mỗi ~2.6 giây */
@keyframes mv-shake {
  0%, 45%, 100% { rotate: 0deg; translate: 0 0; }
  50% { rotate: -26deg; translate: -4px 0; }
  56% { rotate: 24deg; translate: 4px 0; }
  62% { rotate: -20deg; translate: -3px 0; }
  68% { rotate: 16deg; translate: 3px 0; }
  74% { rotate: -10deg; translate: -1px 0; }
  80% { rotate: 5deg; translate: 0 0; }
  86% { rotate: 0deg; }
}
@keyframes mv-shake-box { 0%, 45%, 90%, 100% { rotate: 0deg; } 52% { rotate: -7deg; } 60% { rotate: 7deg; } 68% { rotate: -5deg; } 76% { rotate: 3deg; } }
.ai-fab .ai-robot { transform-origin: 50% 85%; animation: ai-bob 3.2s ease-in-out infinite, mv-shake 2.6s ease-in-out infinite; }
.ai-fab:hover .ai-robot { animation-duration: 3.2s, .9s; }

/* Robot lắc trái – phải liên tục (khung đứng yên) */
@keyframes mv-sway { from { rotate: -20deg; translate: -3px 0; } to { rotate: 20deg; translate: 3px 0; } }
.ai-fab .ai-robot { transform-origin: 50% 85%; animation: ai-bob 3.2s ease-in-out infinite, mv-sway .55s ease-in-out infinite alternate; }
.ai-fab:hover .ai-robot { animation-duration: 3.2s, .35s; }

/* ---------- Công tắc sáng / tối: mặt trời – mặt trăng ---------- */
.theme-btn.theme-sw { position: relative; width: 72px; height: 36px; border-radius: 99px; padding: 0; display: inline-flex; align-items: center; justify-content: space-between;
  border: 1px solid var(--line); background: linear-gradient(90deg, #fff7d6, #e8eefc); color: var(--ink); cursor: pointer; flex: 0 0 auto; transition: background .3s, border-color .2s; }
.theme-sw.is-dark { background: linear-gradient(90deg, #1f2937, #0f172a); border-color: #334155; }
.theme-sw .ts-ic { position: relative; z-index: 2; width: 34px; height: 34px; display: grid; place-items: center; transition: color .3s, opacity .3s, transform .4s; }
.theme-sw .ts-ic svg { width: 17px; height: 17px; }
.theme-sw .ts-sun { color: #d97706; }
.theme-sw .ts-moon { color: #64748b; opacity: .75; }
.theme-sw.is-dark .ts-sun { color: #94a3b8; opacity: .6; }
.theme-sw.is-dark .ts-moon { color: #fde68a; opacity: 1; }
.theme-sw .ts-knob { position: absolute; z-index: 1; top: 2px; left: 2px; width: 30px; height: 30px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .18), 0 0 0 1px rgba(0, 0, 0, .04); transition: transform .35s cubic-bezier(.3, 1.4, .5, 1), background .3s; }
.theme-sw.is-dark .ts-knob { transform: translateX(36px); background: #334155; box-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
.theme-sw:hover { border-color: var(--accent); }
.theme-sw:hover .ts-ic { transform: rotate(-12deg); }
.theme-sw:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.adm-top .theme-sw { border-color: var(--line); }

/* ---------- Phần trăm học của học viên: khóa, buổi, bài ---------- */
.pring { position: relative; display: inline-grid; place-items: center; flex: none; }
.pring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.pring .pr-bg { fill: none; stroke: var(--tint); stroke-width: 3.6; }
.pring .pr-fg { fill: none; stroke: var(--accent); stroke-width: 3.6; stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.pring.full .pr-fg { stroke: #16a34a; }
.pring b { position: relative; font-size: .7rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.pring[style*="64px"] b { font-size: .95rem; }
.pring.full b { color: #16a34a; }
.pbar { display: grid; gap: 5px; margin: 10px 0 4px; }
.pbar-t { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: .84rem; }
.pbar-t b { color: var(--accent); }
.pbar-t small { color: var(--muted); }
.pbar > i { display: block; height: 7px; border-radius: 99px; background: var(--tint); overflow: hidden; }
.pbar > i > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--brand-2, var(--accent))); }
.pbar.full .pbar-t span { color: #16a34a; font-weight: 700; }
.pbar.full > i > i { background: #16a34a; }
.lr-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(0, 0, 0, .35); z-index: 3; }
.lr-prog i { display: block; height: 100%; background: var(--accent); }
.lr-prog.full i { background: #22c55e; }
.sec summary .pring { margin-left: 6px; }
.cprog { display: flex; align-items: center; gap: 16px; padding: 16px 18px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: var(--r-lg, 16px); background: var(--surface); }
.cprog-b { flex: 1; display: grid; gap: 5px; min-width: 0; }
.cprog-b b { font-size: 1.08rem; }
.cprog-b span { color: var(--muted); font-size: .9rem; }
.cprog-bar { display: block; height: 8px; border-radius: 99px; background: var(--tint); overflow: hidden; }
.cprog-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--brand-2, var(--accent))); }
.cprog-flat { border: 0; padding: 4px 0 12px; margin: 0; background: none; }
.acc-prog { display: grid; gap: 6px; }
.ap-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; color: inherit; text-decoration: none; }
.ap-row:hover { background: var(--tint); }
.ap-t { flex: 1; display: grid; gap: 2px; min-width: 0; }
.ap-t small { color: var(--muted); }
.cc-pct { font-style: normal; font-weight: 800; color: var(--accent); }
.cc-pct.full { color: #16a34a; }
@media (max-width: 600px) { .cprog { flex-wrap: wrap; } .cprog .btn { width: 100%; justify-content: center; } }

/* ---------- Quản trị: tiến độ học của từng học viên ---------- */
.uprog { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: .9rem; line-height: 1.35; }
.uprog b { color: var(--accent); }
.up-wrap { display: grid; gap: 14px; max-height: 58vh; overflow: auto; padding-right: 4px; }
.up-course { border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: grid; gap: 6px; }
.up-ch { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.up-ch > div { display: grid; gap: 2px; }
.up-sec { border-radius: 10px; background: var(--tint); padding: 4px 8px; }
.up-sec summary { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 0; list-style: none; }
.up-sec summary::-webkit-details-marker { display: none; }
.up-st { flex: 1; font-weight: 600; font-size: .9rem; min-width: 0; }
.up-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; padding: 6px 4px; font-size: .88rem; }
.up-row + .up-row { border-top: 1px dashed var(--line); }
.up-t { min-width: 0; }
.up-bar { grid-column: 1 / -1; display: block; height: 5px; border-radius: 99px; background: color-mix(in srgb, var(--line) 70%, transparent); overflow: hidden; }
.up-bar i { display: block; height: 100%; background: var(--accent); }
.prog-tag.none { background: var(--tint); color: var(--muted); }

/* Ô chữ "AI" cho các chuyên mục về AI */
.ico:has(.ai-badge) { background: none !important; padding: 0; }
.ai-badge { display: grid; place-items: center; width: 100%; height: 100%; min-width: 34px; min-height: 34px; aspect-ratio: 1; border-radius: 26%;
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 70%, #000), color-mix(in srgb, var(--accent) 35%, #000));
  color: #fff; font-weight: 800; font-size: .95em; letter-spacing: -.02em; line-height: 1;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .18), 0 4px 10px -4px color-mix(in srgb, var(--accent) 60%, transparent); }

/* Quản trị: ảnh bìa chuyên mục */
.catcov { display: grid; grid-template-columns: minmax(180px, 280px) 1fr; gap: 16px; align-items: center; margin-bottom: 14px; }
.catcov-img .cover { border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 9; }
.catcov-b { display: grid; gap: 6px; }
@media (max-width: 600px) { .catcov { grid-template-columns: 1fr; } }
/* Ảnh tự tải lên nằm bên phải bìa kiểu Mộc Việt: lấy giữa ảnh thay vì vùng mặt chân dung */
.cover-gen.cv-own > .cv-ceo { width: 52%; object-position: 50% 35%; }
/* Thẻ tài khoản: phần thông tin không bị bóp hẹp khi có nhiều nút */
[data-list] .arow[data-uid] { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(0, auto); gap: 12px 18px; align-items: start; }
[data-list] .arow[data-uid] > .btn-row { justify-content: flex-end; max-width: 460px; }
@media (max-width: 1100px) { [data-list] .arow[data-uid] { grid-template-columns: 1fr; } [data-list] .arow[data-uid] > .btn-row { justify-content: flex-start; max-width: none; } }

/* Lời chào theo tên sau khi đăng nhập */
.hero-welcome { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; padding: 9px 18px 9px 10px; border-radius: 99px;
  background: color-mix(in srgb, var(--accent) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  font-size: 1rem; line-height: 1.4; color: var(--ink); max-width: 100%; }
.hero-welcome b { color: var(--accent); font-weight: 800; }
.hw-wave { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--surface); box-shadow: 0 2px 6px rgba(0,0,0,.08); font-size: 1.05rem; flex: none;
  transform-origin: 70% 75%; animation: hw-wave 2.4s ease-in-out 1s 2; }
@keyframes hw-wave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(16deg); } 20%, 40% { transform: rotate(-8deg); } }
@media (max-width: 600px) { .hero-welcome { font-size: .9rem; border-radius: 16px; } }
@media (max-width: 600px) { .hero-welcome { margin-top: 6px; } }
.tk-name { color: #fff7c2; font-weight: 800; }

/* Chọn giới tính */
.seg-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.seg-opt { position: relative; cursor: pointer; }
.seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg-opt span { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border: 1.5px solid var(--line); border-radius: 99px; font-weight: 600; background: var(--surface); transition: border-color .15s, background .15s; }
.seg-opt:hover span { border-color: var(--accent); }
.seg-opt input:checked + span { border-color: var(--accent); background: var(--tint); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.seg-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.badge-g { background: var(--tint); color: var(--muted); }
.hero-gender { display: inline-block; margin: 0 0 10px; font-size: .88rem; color: var(--muted); text-decoration: underline dotted; text-underline-offset: 3px; }
.hero-gender b { color: var(--accent); }
.player-bar .is-locked { opacity: .45; cursor: not-allowed; }

/* ---------- Đánh giá công khai: tổng hợp + danh sách ---------- */
.rate-all { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.rate-sum { display: grid; grid-template-columns: 130px 1fr; gap: 18px; align-items: center; }
.rs-big { display: grid; justify-items: center; gap: 2px; }
.rs-big b { font-size: 2.6rem; line-height: 1; letter-spacing: -.02em; }
.rs-big small { color: var(--muted); }
.rs-bars { display: grid; gap: 5px; }
.rs-row { display: grid; grid-template-columns: 30px 1fr 32px; gap: 8px; align-items: center; font-size: .85rem; color: var(--muted); }
.rs-row > i { display: block; height: 8px; border-radius: 99px; background: var(--tint); overflow: hidden; }
.rs-row > i > i { display: block; height: 100%; background: #f5b301; border-radius: 99px; }
.rs-row em { font-style: normal; text-align: right; font-variant-numeric: tabular-nums; }
.rv-h { font-size: 1rem; margin: 8px 0 0; }
.rate-all .reviews { display: grid; gap: 0; margin: 0; }
.rate-all .review { padding: 12px 0; border-top: 1px dashed var(--line); }
.rate-all .review:first-child { border-top: 0; }
.rv-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rv-av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); color: var(--accent); font-weight: 800; font-size: .85rem; flex: none; }
.rate-all .review p { margin: 6px 0 0 38px; line-height: 1.5; }
.rv-del { margin-left: auto; border: 1px solid var(--err-line, #f3c2c2); color: var(--err-ink, #b42318); background: none; border-radius: 8px; padding: 3px 10px; font-size: .8rem; font-weight: 600; cursor: pointer; }
.rv-del:hover { background: var(--err-bg, #fdecec); }
.rv-admin { display: grid; gap: 10px; margin-top: 12px; }
.rva { padding: 14px 16px; display: grid; gap: 8px; }
.rva-top { display: flex; align-items: flex-start; gap: 10px; }
.rva-top > div { flex: 1; min-width: 0; line-height: 1.5; }
.rva-c { margin: 0 0 0 40px; line-height: 1.5; }
.rva > a { margin-left: 40px; }
@media (max-width: 600px) { .rate-sum { grid-template-columns: 96px 1fr; } .rs-big b { font-size: 2rem; } }

/* Trang chủ: Học viên đánh giá (cột phải) */
.home-reviews:empty { display: none; }
.home-reviews { margin-top: 34px; }
.hr-head { align-items: baseline; }
.hr-list { display: grid; gap: 10px; }
.hr-item { display: grid; gap: 6px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-lg, 14px); background: var(--surface); color: inherit; text-decoration: none; transition: border-color .15s; }
.hr-item:hover { border-color: var(--accent); }
.hr-item p { margin: 0 0 0 38px; line-height: 1.5; }
.hr-l { margin-left: 38px; color: var(--accent); font-weight: 600; }

/* ---------- Khách: xem thử 5 giây rồi bắt đăng ký ---------- */
.gate-modal { max-width: 460px; max-height: calc(100vh - 32px); overflow-y: auto; border-top: 4px solid var(--brand); }
.gate-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.gate-head h2 { margin: 0 0 4px; }
.gate-head p { margin: 0; font-size: .95rem; }
.gate-ic { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; background: var(--brand-soft, rgba(44,130,18,.12)); }
.gate-tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 12px; }
.gate .field { margin-bottom: 10px; }
.try-badge { background: rgba(0, 0, 0, .62); color: #fff; }
.guest-try { margin-top: 12px; }
.gate-tabs { gap: 0; padding: 4px; border-radius: 99px; background: var(--tint); border: 1px solid var(--line); }
.gate-tabs button { border: 0; background: transparent; padding: 9px 12px; border-radius: 99px; font: inherit; font-weight: 600; color: var(--muted, inherit); cursor: pointer; }
.gate-tabs button.on { background: var(--surface); color: var(--accent); box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.gate-modal { border-top-color: var(--accent); }

/* Đăng nhập: nút "Tôi chưa có tài khoản" */
.or-line { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; color: var(--muted, #6b7a68); font-size: .9rem; }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.no-acc { border: 1.5px solid var(--accent); color: var(--accent); background: var(--surface); font-weight: 700; }
.no-acc:hover { background: var(--tint); }

/* Trang đăng nhập / đăng ký: thanh chuyển + dòng "Chưa có tài khoản?" */
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 5px; margin-bottom: 22px; border-radius: 14px; background: var(--tint); border: 1px solid var(--line); }
.auth-tabs a { text-align: center; padding: 11px 10px; border-radius: 10px; font-weight: 700; font-size: 1.05rem; color: var(--muted, #6b7a68); text-decoration: none; transition: background .15s, color .15s; }
.auth-tabs a:hover { color: var(--ink); }
.auth-tabs a.on { background: var(--surface); color: var(--ink); box-shadow: 0 2px 10px rgba(0, 0, 0, .1); }
.auth-foot { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--line); text-align: center; color: var(--muted, #6b7a68); }
.auth-cta { color: #d0342c; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
[data-theme="dark"] .auth-cta { color: #ff7a70; }

/* ---------- Giao diện Noel ---------- */
.snow-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 85; }
.snow-btn { width: 38px; height: 38px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); display: inline-grid; place-items: center; font-size: 1.15rem; line-height: 1; color: #3b82c4; cursor: pointer; transition: background .15s, opacity .15s, transform .2s; flex: none; }
.snow-btn:hover { transform: rotate(30deg); }
.snow-btn.off { opacity: .45; color: var(--muted, #888); }
.snow-btn.off span { text-decoration: line-through; }
body.noel .brand { position: relative; }
.noel-hat { position: absolute; width: 30px; height: 25px; left: -7px; top: -11px; transform: rotate(-24deg); z-index: 2; filter: drop-shadow(0 2px 2px rgba(0,0,0,.25)); pointer-events: none; }
.noel-lights { position: absolute; left: 0; right: 0; bottom: -7px; height: 14px; pointer-events: none; z-index: 5;
  background:
    radial-gradient(circle at 12px 9px, #e63946 0 4px, transparent 5px) 0 0 / 96px 14px repeat-x,
    radial-gradient(circle at 36px 9px, #ffd166 0 4px, transparent 5px) 0 0 / 96px 14px repeat-x,
    radial-gradient(circle at 60px 9px, #2a9d4a 0 4px, transparent 5px) 0 0 / 96px 14px repeat-x,
    radial-gradient(circle at 84px 9px, #4dabf7 0 4px, transparent 5px) 0 0 / 96px 14px repeat-x;
  animation: noel-blink 1.6s steps(2, jump-none) infinite; }
.noel-lights::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; border-bottom: 1.5px solid rgba(40, 60, 30, .45); border-radius: 0 0 50% 50% / 0 0 100% 100%;
  background: radial-gradient(ellipse at 24px -2px, transparent 10px, transparent 11px) 0 0 / 24px 6px repeat-x; }
@keyframes noel-blink { 0% { filter: brightness(1.25) saturate(1.2); } 100% { filter: brightness(.7) saturate(.8); } }
body.noel .foot-bottom::after { content: "  🎄 Giáng sinh an lành!"; }
body.noel .modal-bg { z-index: 95; }
.snow-btn[hidden] { display: none; }

/* Ông già Noel bay ngang trang chủ */
.santa-layer { position: fixed; inset: 0; pointer-events: none; z-index: 86; overflow: hidden; }
.santa-fly { position: absolute; left: 0; width: clamp(220px, 30vw, 380px); animation: santa-across 12s linear forwards; will-change: transform; }
.santa-svg { width: 100%; height: auto; display: block; animation: santa-bob 1.1s ease-in-out infinite; filter: drop-shadow(0 6px 8px rgba(0,0,0,.18)); }
.santa-svg .leg { animation: deer-run .35s ease-in-out infinite alternate; transform-origin: 105px 64px; }
.santa-svg .arm { animation: santa-wave .5s ease-in-out infinite alternate; transform-origin: 232px 40px; }
.santa-say { position: absolute; left: 2%; top: -26px; background: #fff; color: #c81e1e; font-weight: 800; font-size: .9rem; padding: 5px 12px; border-radius: 99px; white-space: nowrap; box-shadow: 0 4px 14px rgba(0,0,0,.18); border: 2px solid #c81e1e; }
.santa-fly::after { content: "✦ ✧ ✦ ✧"; position: absolute; left: -70px; top: 55%; color: #ffd54a; font-size: 1.1rem; letter-spacing: 6px; text-shadow: 0 0 6px #ffe680; opacity: .9; }
@keyframes santa-across { 0% { transform: translate(-45vw, 30px); } 50% { transform: translate(45vw, -10px); } 100% { transform: translate(110vw, 20px); } }
@keyframes santa-bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-8px) rotate(1deg); } }
@keyframes deer-run { from { transform: rotate(-8deg); } to { transform: rotate(8deg); } }
@keyframes santa-wave { from { transform: rotate(-20deg); } to { transform: rotate(25deg); } }
.bell-btn { color: #d4a017; }
/* Điện thoại: nút ❄ 🔔 thành cụm nhỏ nổi ở góc trái dưới, đầu trang không bị chật */
.noel-fab { display: none; }
@media (max-width: 760px) {
  .topbar .snow-btn { display: none !important; }
  .noel-fab { display: flex; flex-direction: column; gap: 8px; position: fixed; left: 12px; bottom: calc(env(safe-area-inset-bottom, 0px) + 78px); z-index: 60; }
  .noel-fab .snow-btn { box-shadow: 0 4px 14px rgba(0,0,0,.15); }
}

/* Quản trị: mục Noel */
.noel-sub { margin: 4px 0 6px 30px; padding: 12px 14px; border-radius: 12px; background: var(--tint); border: 1px solid var(--line); transition: opacity .15s; }
.noel-sub.dim { opacity: .45; }
.vol-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-weight: 600; }
.vol-row input[type=range] { flex: 1; min-width: 160px; accent-color: var(--accent); }
.vol-row b { min-width: 44px; }

.badge-ed { background: #ede9fe; color: #5b21b6; }
[data-theme="dark"] .badge-ed { background: #3b2a6b; color: #ddd6fe; }

/* Quản trị: kết nối nhiều AI */
.ai-provs { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin-top: 12px; }
.ai-prov { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--surface); }
.ai-prov.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.ai-prov-h { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.ai-prov-h .badge { margin-left: auto; }
.ai-prov-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .8rem; }
.ai-prov .field { margin-bottom: 8px; }
.ai-prov .hint { margin: 2px 0 10px; font-size: .85rem; }
/* Khung chat: chọn AI */
.ai-pick { display: flex; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--line); overflow-x: auto; align-items: center; }
.ai-pick > span { font-size: .8rem; color: var(--muted, #6b7a68); white-space: nowrap; }
.ai-pick button { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 5px 12px; font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; white-space: nowrap; color: var(--ink); }
.ai-pick button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.ai-by { display: block; margin-top: 6px; font-size: .72rem; opacity: .6; }

.price-tag { font-size: .72rem; font-weight: 800; padding: 2px 8px; border-radius: 99px; text-transform: none; }
.price-tag.free { background: #dcfce7; color: #166534; }
.price-tag.paid { background: #fee2e2; color: #b91c1c; }
[data-theme="dark"] .price-tag.free { background: #14532d; color: #bbf7d0; }
[data-theme="dark"] .price-tag.paid { background: #7f1d1d; color: #fecaca; }
