/* =========================================================
   GPLX theme — navy / xanh / vàng, nền sáng
   ========================================================= */
:root {
  --navy: #0b1f44; --navy-2: #12305f; --navy-ink: #e9f0ff;
  --primary: #1764ff; --primary-dark: #0f4fd6; --primary-soft: #e7efff; --primary-ink: #fff;
  --accent: #ffc83d; --accent-dark: #f0b400; --accent-ink: #2a1d00; --accent-soft: #fff6dc;
  --bg: #f3f7fc; --surface: #fff; --surface-2: #eef3fa; --text: #0f1b33; --muted: #5d6b82; --line: #dfe6f0;
  --ok: #0f9d58; --ok-soft: #e3f6ec; --bad: #e0362c; --bad-soft: #fde9e7; --warn: #a96500; --warn-soft: #fff4dc;
  --radius: 14px; --radius-sm: 10px; --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(11,31,68,.06), 0 8px 24px rgba(11,31,68,.07);
  --shadow-lg: 0 20px 50px rgba(11,31,68,.18);
  --font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --header-h: 68px;
}

/* ===== Base ===== */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { line-height: 1.22; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(28px, 4.2vw, 40px); font-weight: 800; }
h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 800; }
h3 { font-size: 18px; font-weight: 700; }
button, input, select, textarea { font: inherit; color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.lead { font-size: 18px; color: var(--muted); max-width: 720px; }
.icon { width: 20px; height: 20px; flex: none; }
.loading, .empty { padding: 40px; text-align: center; color: var(--muted); }
.hl { color: var(--accent); }
.hl-u { background: linear-gradient(transparent 62%, rgba(255,200,61,.55) 0); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ===== Buttons / forms ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; cursor: pointer; text-decoration: none !important;
  color: var(--text); transition: transform .12s, background .15s, border-color .15s, box-shadow .15s; white-space: nowrap; }
.btn:hover:not(:disabled) { border-color: var(--primary); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 16px rgba(255,200,61,.35); }
.btn-accent:hover:not(:disabled) { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-ghost { background: transparent; }
.btn-glass { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.35); color: #fff; }
.btn-glass:hover:not(:disabled) { background: rgba(255,255,255,.18); border-color: #fff; }
.btn-danger { color: var(--bad); }
.btn-lg { padding: 14px 26px; font-size: 17px; border-radius: 12px; }
.btn-sm { padding: 7px 13px; font-size: 14px; }
.btn-block { width: 100%; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field input, .field select, .field textarea, .input { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { outline: 3px solid var(--primary-soft); border-color: var(--primary); }
.check { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 14px; font-size: 14px; }
.check input { margin-top: 4px; }
.form-error { background: var(--bad-soft); color: var(--bad); padding: 10px 12px; border-radius: var(--radius-sm); margin-bottom: 14px; font-size: 14px; }
.form-ok { background: var(--ok-soft); color: var(--ok); padding: 10px 12px; border-radius: var(--radius-sm); margin-bottom: 14px; font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 15px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface);
  font-weight: 700; cursor: pointer; color: var(--text); text-decoration: none !important; font-size: 14px; }
.chip:hover { border-color: var(--primary); }
.chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 700; }
.tag-bad { background: var(--bad-soft); color: var(--bad); }
.tag-ok { background: var(--ok-soft); color: var(--ok); }
.tag-accent { background: var(--accent); color: var(--accent-ink); }
.eyebrow { display: inline-block; color: var(--primary); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: 13px; margin: 0 0 10px; }

/* ===== Header ===== */
.site-header { background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 60; }
.header-inner { display: flex; align-items: center; gap: 18px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--navy); text-decoration: none !important; font-size: 18px; flex: none; }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(135deg, var(--primary), var(--navy)); color: #fff; display: grid; place-items: center; font-size: 19px;
  box-shadow: inset 0 -3px 0 var(--accent); }
.main-nav { display: flex; align-items: center; gap: 14px; flex: 1; }
.nav-menu { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; flex: 1; }
.nav-menu > li { position: relative; }
.nav-menu a { display: flex; align-items: center; gap: 4px; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--text); font-weight: 600; text-decoration: none !important; }
.nav-menu a:hover { background: var(--surface-2); }
.nav-menu .current-menu-item > a { color: var(--primary); background: var(--primary-soft); }
.nav-menu .sub-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 280px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 8px; list-style: none; margin: 0; z-index: 70; }
.nav-menu li:hover > .sub-menu, .nav-menu li:focus-within > .sub-menu { display: block; }
.sub-menu a { padding: 10px 12px; }
.sub-menu a small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; }
.nav-cta { background: var(--accent) !important; color: var(--accent-ink) !important; }
.nav-account { display: flex; align-items: center; gap: 8px; }
.hotline { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--navy); padding: 8px 12px; border-radius: 999px; background: var(--surface-2); text-decoration: none !important; font-size: 14px; }
.account-link { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 700; text-decoration: none !important; }
.account-link img { border-radius: 50%; }
.xp-chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px 5px 6px; border-radius: 999px; background: var(--surface-2); font-size: 13px; font-weight: 700; color: var(--navy); text-decoration: none !important; }
.xp-chip .lv { background: var(--navy); color: #fff; border-radius: 999px; padding: 1px 8px; }
.xp-chip .fire { color: #f05a12; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--navy); }
@media (max-width: 1020px) {
  .nav-toggle { display: block; }
  .main-nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: 12px 16px 18px; box-shadow: var(--shadow-lg); max-height: calc(100vh - var(--header-h)); overflow: auto; }
  .main-nav.open { display: flex; }
  .nav-menu { flex-direction: column; }
  .nav-menu .sub-menu { display: block; position: static; box-shadow: none; border: 0; padding: 0 0 0 12px; min-width: 0; }
  .nav-account { flex-wrap: wrap; }
}

/* ===== Hero ===== */
.hero { position: relative; color: #fff; overflow: hidden;
  background: radial-gradient(1200px 500px at 85% -10%, rgba(23,100,255,.55), transparent 60%), linear-gradient(160deg, var(--navy) 0%, #0a1733 60%, #081129 100%); }
.hero::before { /* làn đường */
  content: ""; position: absolute; inset: auto -10% -40px -10%; height: 220px; transform: perspective(500px) rotateX(55deg); transform-origin: bottom;
  background: repeating-linear-gradient(90deg, transparent 0 calc(50% - 4px), rgba(255,200,61,.7) calc(50% - 4px) calc(50% + 4px), transparent calc(50% + 4px) 100%),
              repeating-linear-gradient(0deg, rgba(255,255,255,.08) 0 2px, transparent 2px 46px);
  -webkit-mask: linear-gradient(transparent, #000 70%); mask: linear-gradient(transparent, #000 70%); opacity: .6; }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; padding: 64px 16px 80px; }
.hero h1 { font-size: clamp(32px, 5.2vw, 56px); line-height: 1.1; margin-bottom: 18px; }
.hero .lead { color: #c9d6f2; }
.hero .eyebrow { color: var(--accent); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 28px; color: #c9d6f2; font-size: 14px; }
.hero-badges span { display: inline-flex; align-items: center; gap: 6px; }
.hero-badges .icon { color: var(--accent); width: 18px; height: 18px; }
@media (max-width: 900px) { .hero-inner { grid-template-columns: 1fr; padding: 44px 16px 56px; gap: 28px; } }

/* Lead card (kính mờ) */
.lead-card { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(14px); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-lg); color: #fff; }
.lead-card h2 { font-size: 22px; margin-bottom: 4px; text-align: center; }
.lead-card .sub { text-align: center; color: #c9d6f2; font-size: 14px; margin: 0 0 16px; }
.lead-card .pill { display: block; width: max-content; margin: 0 auto 14px; background: var(--accent); color: var(--accent-ink); font-weight: 800; padding: 4px 14px; border-radius: 999px; font-size: 13px; }
.lead-card input, .lead-card select { width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1.5px solid transparent; background: #fff; color: var(--text); margin-bottom: 10px; }
.lead-card input:focus, .lead-card select:focus { outline: 3px solid rgba(255,200,61,.45); }
.lead-card input[type=checkbox] { width: 18px; height: 18px; flex: none; margin: 2px 0 0; padding: 0; accent-color: var(--accent); }
.lead-card .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lead-card .check { color: #c9d6f2; font-size: 13px; }
.lead-card .note { text-align: center; color: #9fb2d9; font-size: 12px; margin: 10px 0 0; }
.lead-form .form-error, .lead-form .form-ok { margin: 0 0 10px; }
.lead-card.light { background: var(--surface); color: var(--text); border: 1px solid var(--line); backdrop-filter: none; box-shadow: var(--shadow); }
.lead-card.light .sub, .lead-card.light .check { color: var(--muted); }
.lead-card.light input, .lead-card.light select { border-color: var(--line); }
.lead-card.light .note { color: var(--muted); }
.hp-field { position: absolute !important; left: -9999px !important; }

/* ===== Sections ===== */
.section { padding: 64px 0; }
.section-tight { padding: 40px 0; }
.section-alt { background: var(--surface); }
.section-dark { background: linear-gradient(160deg, var(--navy), #0a1733); color: #fff; }
.section-dark .muted, .section-dark .lead { color: #b8c7e8; }
.section-title { text-align: center; max-width: 760px; margin: 0 auto 36px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }

.stats-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: -44px; position: relative; z-index: 2; }
.stats-band .item { background: var(--surface); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); text-align: center; border: 1px solid var(--line); }
.stats-band b { display: block; font-size: 30px; font-weight: 800; color: var(--navy); line-height: 1.1; }
.stats-band span { color: var(--muted); font-size: 14px; }
@media (max-width: 760px) { .stats-band { grid-template-columns: repeat(2, 1fr); } }

/* License cards */
.license-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .license-grid { grid-template-columns: 1fr; } }
.license-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.license-card .kicker { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.license-card .kicker .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.license-card ul { list-style: none; padding: 0; margin: 0 0 16px; flex: 1; }
.license-card li { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.license-card li:last-child { border: 0; }
.license-card li b { font-size: 15px; }
.license-card li small { display: block; color: var(--muted); font-size: 12px; font-weight: 500; }
.license-card li .acts { display: flex; gap: 6px; flex: none; }

/* Feature cards */
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.feature { position: relative; display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; color: var(--text); text-decoration: none !important; transition: transform .15s, box-shadow .15s; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature p { color: var(--muted); margin: 0; font-size: 15px; }
.feature .num { position: absolute; top: 16px; right: 18px; font-weight: 800; font-size: 28px; color: var(--surface-2); }
.feature-icon { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); margin-bottom: 12px; }

/* Arena promo */
.arena-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 22px; align-items: start; }
@media (max-width: 900px) { .arena-grid { grid-template-columns: 1fr; } }
.game-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 560px) { .game-cards { grid-template-columns: 1fr; } }
.game-card { position: relative; display: block; text-align: left; border-radius: var(--radius); padding: 20px; color: #fff; text-decoration: none !important; cursor: pointer; border: 0;
  background: linear-gradient(140deg, var(--c1, #1764ff), var(--c2, #0b1f44)); overflow: hidden; transition: transform .15s, box-shadow .15s; min-height: 150px; }
.game-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.game-card .emoji { font-size: 30px; line-height: 1; }
.game-card b { display: block; font-size: 18px; margin: 10px 0 4px; }
.game-card span { font-size: 14px; color: rgba(255,255,255,.82); }
.game-card .badge { position: absolute; top: 14px; right: 14px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; }
.game-card.daily { --c1: #ff8a00; --c2: #e0362c; }
.game-card.speed { --c1: #1764ff; --c2: #5b2bd6; }
.game-card.survival { --c1: #0f9d58; --c2: #0b5e46; }
.game-card.duel { --c1: #c2185b; --c2: #3b0a5c; }
.board { background: var(--surface); color: var(--text); border-radius: var(--radius); padding: 18px; border: 1px solid var(--line); }
.board h3 { display: flex; justify-content: space-between; align-items: center; }
.board-row { display: grid; grid-template-columns: 30px 34px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.board-row:last-child { border-bottom: 0; }
.board-row .pos { font-weight: 800; color: var(--muted); text-align: center; }
.board-row:nth-child(1) .pos { color: #d4a000; } .board-row:nth-child(2) .pos { color: #8a96a8; } .board-row:nth-child(3) .pos { color: #b0662a; }
.board-row img, .board-row .av { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); }
.board-row .sc { font-weight: 800; color: var(--navy); }
.board-row.me { background: var(--accent-soft); border-radius: 8px; }

/* School cards */
.school-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.school-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; transition: box-shadow .15s, transform .15s; }
.school-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.school-card.sponsored { border: 2px solid var(--accent); }
.school-card .top { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.school-card .logo { width: 54px; height: 54px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; flex: none; font-weight: 800; color: var(--navy); font-size: 20px; }
.school-card .logo img { width: 100%; height: 100%; object-fit: cover; }
.school-card h3 { font-size: 16px; margin: 0; }
.school-card h3 a { color: var(--text); }
.school-card .meta-line { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; margin: 2px 0; }
.school-card .meta-line .icon { width: 16px; height: 16px; }
.school-card .price { font-weight: 800; color: var(--navy); margin: 8px 0; }
.school-card .acts { display: flex; gap: 8px; margin-top: auto; padding-top: 12px; }
.school-card .acts .btn { flex: 1; }
.ribbon { position: absolute; top: -10px; right: 14px; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 12px; padding: 3px 10px; border-radius: 999px; box-shadow: var(--shadow); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; background: var(--surface); padding: 14px; border-radius: var(--radius); border: 1px solid var(--line); margin-bottom: 20px; }
.filters select, .filters input { padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); min-width: 160px; }
.school-single { display: grid; grid-template-columns: 1fr 380px; gap: 28px; align-items: start; }
@media (max-width: 920px) { .school-single { grid-template-columns: 1fr; } }
.school-head { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; }
.logo-box { width: 54px; height: 54px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; flex: none; font-weight: 800; color: var(--navy); font-size: 20px; }
.logo-box.lg { width: 84px; height: 84px; border-radius: 18px; font-size: 34px; background: #fff; }
.logo-box img { width: 100%; height: 100%; object-fit: cover; }
.info-list { list-style: none; margin: 0; padding: 0; }
.info-list li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.info-list li .icon { color: var(--primary); margin-top: 3px; }
.sticky-side { position: sticky; top: calc(var(--header-h) + 16px); }

/* Ads */
.ad-slot:empty { display: none; }
.ad-slot { margin: 20px 0; }
.ad { position: relative; display: flex; align-items: center; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; color: var(--text); text-decoration: none !important; overflow: hidden; }
.ad:hover { border-color: var(--accent); }
.ad .ad-label { position: absolute; top: 6px; right: 10px; font-size: 11px; color: var(--muted); }
.ad img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; flex: none; }
.ad.banner { display: block; padding: 0; }
.ad.banner img { width: 100%; height: auto; border-radius: 0; display: block; }
.ad .ad-body { flex: 1; min-width: 0; }
.ad .ad-body b { display: block; }
.ad .ad-body span { color: var(--muted); font-size: 14px; }
.ad-html { text-align: center; }
/* Thẻ quảng cáo tự xếp dọc khi ô hẹp (cột bên, sidebar) */
.ad-slot { container-type: inline-size; }
.sticky-ad .ad-slot { container-type: normal; }
@container (max-width: 420px) {
  .ad { flex-direction: column; align-items: stretch; text-align: center; padding: 18px 14px 14px; }
  .ad img, .ad .logo-box { width: 64px; height: 64px; margin: 0 auto; }
  .ad .ad-body b { font-size: 15px; }
  .ad .btn { width: 100%; }
}
.sticky-ad { position: fixed; left: 0; right: 0; bottom: 64px; z-index: 55; padding: 0 10px; display: none; }
.sticky-ad .ad { box-shadow: var(--shadow-lg); padding: 10px 40px 10px 12px; }
.sticky-ad .close { position: absolute; top: 4px; right: 18px; z-index: 2; border: 0; background: none; font-size: 20px; cursor: pointer; color: var(--muted); }
@media (max-width: 760px) { .sticky-ad.on { display: block; } }
.sticky-ad .ad { gap: 10px; }
.sticky-ad .ad img, .sticky-ad .ad .logo-box { width: 40px; height: 40px; }
.sticky-ad .ad-body b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.sticky-ad .ad-body span, .sticky-ad .ad-label { display: none; }
/* Khi đang làm bài / chơi game: bỏ các thành phần nổi gây phân tâm */
.in-game .fab, .in-game .sticky-ad { display: none !important; }
@media (max-width: 760px) {
  .page-head { padding: 22px 0 18px; }
  .page-head .lead { font-size: 15px; }
  .in-game .page-head .lead { display: none; }
}

/* CTA band */
.cta-band { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; background: linear-gradient(120deg, var(--primary), var(--navy)); color: #fff; border-radius: var(--radius-lg); padding: 32px; }
.cta-band p { color: #c9d6f2; margin: 6px 0 0; }
@media (max-width: 700px) { .cta-band { grid-template-columns: 1fr; } }

/* ===== Footer ===== */
.site-footer { background: var(--navy); color: #c9d6f2; padding: 48px 0 24px; margin-top: 64px; }
.site-footer a { color: #e9f0ff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 28px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 { color: #fff; font-size: 15px; margin-bottom: 12px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 15px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 32px; padding-top: 18px; font-size: 13px; color: #8ea3cc; }
.site-footer .brand { color: #fff; }
body.has-bottom-nav { padding-bottom: 64px; }
@media (min-width: 761px) { body.has-bottom-nav { padding-bottom: 0; } }

/* Bottom nav (mobile) */
.bottom-nav { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 58; background: var(--surface); border-top: 1px solid var(--line); height: 64px; box-shadow: 0 -6px 20px rgba(11,31,68,.08); }
.bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 700; color: var(--muted); text-decoration: none !important; }
.bottom-nav a.on { color: var(--primary); }
.bottom-nav a.arena .icon { background: var(--accent); color: var(--accent-ink); width: 40px; height: 40px; padding: 9px; border-radius: 50%; margin-top: -18px; box-shadow: var(--shadow); }
@media (max-width: 760px) { .bottom-nav { display: flex; } }

/* Floating consult button */
.fab { position: fixed; right: 18px; bottom: 22px; z-index: 57; display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 760px) { .fab { bottom: 78px; right: 12px; } .fab span { display: none; } .fab.btn { padding: 13px; border-radius: 50%; } .has-sticky .fab { bottom: 148px; } }

/* Modal + toast */
.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgba(8,17,41,.6); animation: fade .15s; }
.modal-box { position: relative; width: 100%; max-width: 440px; max-height: calc(100vh - 32px); overflow: auto; }
.modal-close { position: absolute; top: 10px; right: 12px; z-index: 2; border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; color: var(--muted); }
.toasts { position: fixed; top: calc(var(--header-h) + 12px); right: 16px; z-index: 95; display: grid; gap: 8px; }
.toast { background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-weight: 700; animation: pop .25s; }
.toast.xp { background: linear-gradient(120deg, #ff8a00, #e0362c); }
.toast.lv { background: linear-gradient(120deg, var(--accent), #ff8a00); color: var(--accent-ink); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(-8px) scale(.96); } }

/* ===== Page / blog ===== */
.page-head { background: linear-gradient(160deg, var(--navy), #0a1733); color: #fff; padding: 40px 0 36px; }
.page-head .lead { color: #c9d6f2; margin: 0; }
.page-head h1 { margin-bottom: 8px; }
.breadcrumb { font-size: 13px; color: #9fb2d9; margin-bottom: 8px; }
.breadcrumb a { color: #c9d6f2; }
.page-body { padding-top: 28px; }
.page-extra { margin-top: 32px; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.post-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .15s, transform .15s; }
.post-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.post-thumb { display: block; aspect-ratio: 16/9; background: linear-gradient(135deg, var(--primary-soft), var(--surface-2)); }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-thumb-ph { display: grid; place-items: center; height: 100%; color: var(--primary); }
.post-card-body { padding: 16px 18px; }
.post-card h3 a { color: var(--text); }
.meta { font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.article { max-width: 780px; padding-top: 32px; }
.single-thumb { margin: 16px 0 24px; border-radius: var(--radius); overflow: hidden; }
.prose { font-size: 17px; }
.prose p, .prose ul, .prose ol { margin: 0 0 1em; }
.prose h2 { margin-top: 1.6em; font-size: 24px; }
.cta-box { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin: 40px 0; padding: 22px; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid #ffe3a0; }
.cta-box p { margin: 4px 0 0; }
.pagination { margin-top: 24px; }
.pagination .nav-links { display: flex; gap: 6px; }
.pagination .page-numbers { padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.pagination .current { background: var(--navy); color: #fff; border-color: var(--navy); }
.empty-page { text-align: center; padding: 80px 16px; }

/* ===== Auth ===== */
.auth-wrap { display: flex; justify-content: center; padding-top: 48px; }
.auth-card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 26px; }
.auth-alt { text-align: center; font-size: 14px; margin: 18px 0 0; color: var(--muted); }
.auth-perks { display: grid; gap: 6px; margin: 0 0 18px; padding: 12px 14px; background: var(--accent-soft); border-radius: var(--radius-sm); font-size: 14px; }

/* ===== Panels (app) ===== */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 20px; }
.toolbar-label { font-weight: 700; font-size: 14px; color: var(--muted); }
.mode-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.mode { text-align: left; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 16px; cursor: pointer; transition: border-color .15s, transform .15s; }
.mode:hover { border-color: var(--primary); transform: translateY(-2px); }
.mode b { display: block; margin-bottom: 4px; }
.mode .muted { font-size: 14px; }
.mode .bar { margin-top: 10px; }
.group-title { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 800; margin: 28px 0 12px; }
.bar { height: 7px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--ok), #34c47c); border-radius: 99px; transition: width .4s; }
.bar.xp > i { background: linear-gradient(90deg, #ff8a00, var(--accent)); }
.notice { padding: 12px 16px; border-radius: var(--radius-sm); background: var(--accent-soft); color: #6b4a00; margin-bottom: 16px; font-size: 15px; border: 1px solid #ffe3a0; }

/* ===== Quiz ===== */
.quiz-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.quiz-title { flex: 1; min-width: 180px; font-weight: 800; }
.timer { font-variant-numeric: tabular-nums; font-weight: 800; padding: 7px 14px; border-radius: var(--radius-sm); background: var(--navy); color: #fff; }
.timer.low { background: var(--bad); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .7; } }
.quiz { display: grid; grid-template-columns: 1fr 290px; gap: 16px; align-items: start; }
.quiz > .panel { scroll-margin-top: calc(var(--header-h) + 12px); }
@media (max-width: 860px) { .quiz { grid-template-columns: 1fr; } .quiz-side { order: -1; } }
.q-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.q-text { font-size: 19px; font-weight: 700; margin: 0 0 16px; }
.q-img { display: block; max-width: 100%; max-height: 360px; margin: 0 auto 16px; border-radius: var(--radius-sm); }
.answers { display: grid; gap: 10px; }
.ans { display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%; border: 1.5px solid var(--line); background: var(--surface); border-radius: 12px; padding: 13px 15px; cursor: pointer; transition: border-color .12s, background .12s; }
.ans:hover:not(:disabled) { border-color: var(--primary); background: #fafcff; }
.ans .n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; background: var(--surface-2); }
.ans.sel { border-color: var(--primary); background: var(--primary-soft); }
.ans.sel .n { background: var(--primary); color: #fff; }
.ans.right { border-color: var(--ok); background: var(--ok-soft); }
.ans.right .n { background: var(--ok); color: #fff; }
.ans.wrong { border-color: var(--bad); background: var(--bad-soft); }
.ans.wrong .n { background: var(--bad); color: #fff; }
.ans:disabled { cursor: default; }
.q-feedback { margin-top: 14px; padding: 10px 14px; border-radius: var(--radius-sm); font-size: 15px; background: var(--surface-2); }
.q-feedback.ok { background: var(--ok-soft); color: var(--ok); }
.q-feedback.bad { background: var(--bad-soft); color: var(--bad); }
.q-nav { display: flex; justify-content: space-between; gap: 8px; margin-top: 18px; }
.hint { color: var(--muted); font-size: 12px; margin-top: 10px; }
.cells { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 12px 0; max-height: 340px; overflow: auto; }
@media (max-width: 860px) { .cells { grid-template-columns: repeat(10, 1fr); max-height: 120px; } }
.cell { position: relative; height: 36px; border: 1.5px solid var(--line); background: var(--surface); border-radius: 8px; font-size: 13px; padding: 0; cursor: pointer; font-weight: 600; }
.cell.done { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); font-weight: 800; }
.cell.cur { outline: 2px solid var(--navy); outline-offset: 1px; }
.cell.ok { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.cell.no { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.cell.crit::after { content: ""; position: absolute; top: 3px; right: 3px; width: 5px; height: 5px; border-radius: 50%; background: var(--bad); }
.side-stat { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.result { text-align: center; padding: 30px 20px; margin-bottom: 16px; }
.result .score { font-size: 54px; font-weight: 800; line-height: 1.1; margin: 6px 0; color: var(--navy); }
.result .verdict { font-size: 22px; font-weight: 800; }
.result.pass { background: linear-gradient(180deg, var(--ok-soft), var(--surface)); }
.result.fail { background: linear-gradient(180deg, var(--bad-soft), var(--surface)); }
.result.pass .verdict { color: var(--ok); }
.result.fail .verdict { color: var(--bad); }
.result .actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.xp-line { display: inline-flex; gap: 8px; align-items: center; margin-top: 10px; font-weight: 700; color: #e0560c; }

/* ===== Bộ chọn hạng bằng (dùng chung) ===== */
.lic-picker { position: relative; display: inline-block; }
.lic-btn { display: inline-flex; align-items: center; gap: 10px; padding: 9px 14px 9px 10px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 700; }
.lic-btn:hover, .lic-picker.open .lic-btn { border-color: var(--primary); }
.lic-btn .code { background: var(--navy); color: #fff; border-radius: 8px; padding: 2px 9px; font-weight: 800; }
.lic-btn small { color: var(--muted); font-weight: 600; }
.lic-btn .icon { width: 16px; height: 16px; color: var(--muted); transition: transform .15s; }
.lic-picker.open .lic-btn .icon { transform: rotate(180deg); }
.lic-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; width: min(420px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 8px; display: none; }
.lic-picker.open .lic-menu { display: block; animation: pop .15s; }
.lic-group { padding: 6px 8px 2px; font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.lic-item { display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: center; width: 100%; text-align: left; border: 0; background: none; padding: 8px; border-radius: 10px; cursor: pointer; }
.lic-item:hover, .lic-item:focus-visible { background: var(--surface-2); outline: none; }
.lic-item.on { background: var(--primary-soft); }
.lic-item b { display: grid; place-items: center; height: 32px; border-radius: 8px; background: var(--surface-2); font-weight: 800; }
.lic-item.on b { background: var(--primary); color: #fff; }
.lic-item span { font-size: 14px; line-height: 1.35; }
.lic-item small { display: block; color: var(--muted); font-size: 12px; }

/* ===== Ôn thi: trang tổng ===== */
.study-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.study-head .toolbar { margin: 0; }
.hub-top { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 820px) { .hub-top { grid-template-columns: 1fr; } }
.resume { border: 2px solid var(--primary); background: linear-gradient(135deg, var(--primary-soft), var(--surface) 60%); display: flex; flex-direction: column; gap: 10px; }
.resume h3 { margin: 0; font-size: 20px; }
.resume .tag { align-self: flex-start; }
.resume .acts { display: flex; gap: 10px; align-items: center; margin-top: auto; flex-wrap: wrap; }
.link-btn { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 14px; padding: 4px; text-decoration: underline; }
.ring-card { display: grid; grid-template-columns: 112px 1fr; gap: 18px; align-items: center; }
.ring { --p: 0; width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(closest-side, var(--surface) 76%, transparent 77% 100%), conic-gradient(var(--ok) calc(var(--p) * 1%), var(--surface-2) 0); }
.ring b { font-size: 24px; font-weight: 800; color: var(--navy); line-height: 1; text-align: center; }
.ring small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.ring-legend { display: grid; gap: 6px; }
.ring-legend button { display: flex; justify-content: space-between; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 12px; cursor: pointer; font-size: 14px; text-align: left; }
.ring-legend button:hover:not(:disabled) { border-color: var(--primary); }
.ring-legend button:disabled { cursor: default; opacity: .55; }
.ring-legend b { font-size: 16px; }
.ring-legend .due b { color: #e0560c; } .ring-legend .weak b { color: var(--bad); }
.section-label { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 800; margin: 28px 0 10px; }
.suggest { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.suggest button { display: grid; grid-template-columns: 40px 1fr; gap: 4px 12px; align-items: center; text-align: left; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 14px; cursor: pointer; transition: border-color .15s, transform .15s; }
.suggest button:hover { border-color: var(--primary); transform: translateY(-2px); }
.suggest .ico { grid-row: span 2; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-size: 20px; background: var(--surface-2); }
.suggest .ico.red { background: var(--bad-soft); } .suggest .ico.blue { background: var(--primary-soft); } .suggest .ico.amber { background: var(--accent-soft); }
.suggest b { font-size: 15px; }
.suggest span:last-child { font-size: 13px; color: var(--muted); }
.chapters { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.chapter { display: grid; grid-template-columns: 40px minmax(0, 1fr) 160px 20px; gap: 14px; align-items: center; width: 100%; text-align: left; border: 0; border-top: 1px solid var(--line); background: none; padding: 12px 16px; cursor: pointer; }
.chapter:first-child { border-top: 0; }
.chapter:hover { background: #f8fbff; }
.chapter .ico { width: 40px; height: 40px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; font-size: 20px; }
.chapter b { display: block; font-size: 15px; }
.chapter small { color: var(--muted); font-size: 13px; }
.chapter small .bad { color: var(--bad); font-weight: 700; }
.chapter .chev { color: var(--muted); }
@media (max-width: 600px) { .chapter { grid-template-columns: 40px minmax(0, 1fr) 20px; } .chapter .bar { grid-column: 2; grid-row: 2; } .chapter .chev { grid-row: 1; grid-column: 3; } }
.other-sets { display: flex; flex-wrap: wrap; gap: 8px; }

/* ===== Kế hoạch hôm nay + chỉ số sẵn sàng ===== */
.resume-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 14px;
  background: var(--primary-soft); border: 1px solid #c9dafc; border-radius: var(--radius); font-size: 14px; }
.resume-bar .acts { display: flex; gap: 6px; align-items: center; }
.plan { display: flex; flex-direction: column; gap: 10px; }
.plan-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.plan-head h3 { margin: 0; font-size: 19px; }
.plan-head select { padding: 6px 10px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--surface); font-weight: 600; font-size: 14px; }
.pill-date { align-self: flex-start; padding: 4px 12px; border-radius: 999px; background: var(--accent-soft); font-size: 14px; }
.date-inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.date-inline input { padding: 6px 10px; border: 1.5px solid var(--line); border-radius: 8px; }
.tasks { list-style: none; margin: 4px 0; padding: 0; display: grid; gap: 8px; }
.tasks li { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.tasks li.complete { background: var(--ok-soft); border-color: #bfe8cf; }
.tasks .ico { width: 38px; height: 38px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; font-size: 18px; }
.tasks li.complete .ico { background: #fff; }
.tasks .txt b { display: block; font-size: 15px; }
.tasks .txt small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 5px; }
.tasks .txt .bar { height: 5px; }
.tasks .cnt { font-weight: 800; font-size: 14px; color: var(--navy); }
.done-mark { width: 32px; height: 32px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; font-weight: 800; }
.btn small { font-weight: 600; opacity: .8; }
.plan .btn-block, .summary .btn, [data-plan-next] .btn { white-space: normal; text-align: center; flex-wrap: wrap; }
.plan-done { padding: 12px 14px; border-radius: 12px; background: linear-gradient(120deg, var(--accent-soft), var(--ok-soft)); font-weight: 800; text-align: center; }
.plan-done span { display: block; font-weight: 600; font-size: 13px; color: var(--muted); margin-top: 2px; }
.ready-top { display: grid; grid-template-columns: 104px 1fr; gap: 16px; align-items: center; }
.ready .ring { width: 104px; height: 104px; }
.ready .ring b { font-size: 30px; }
.ready h3 { margin: 2px 0 4px; font-size: 20px; }
.ready .tip { margin: 0; font-size: 14px; color: var(--muted); }
.ready.start .ring { background: radial-gradient(closest-side, var(--surface) 76%, transparent 77% 100%), conic-gradient(#e0362c calc(var(--p) * 1%), var(--surface-2) 0); }
.ready.progress .ring { background: radial-gradient(closest-side, var(--surface) 76%, transparent 77% 100%), conic-gradient(#ff8a00 calc(var(--p) * 1%), var(--surface-2) 0); }
.ready.almost .ring { background: radial-gradient(closest-side, var(--surface) 76%, transparent 77% 100%), conic-gradient(var(--primary) calc(var(--p) * 1%), var(--surface-2) 0); }
.ready-bars { display: grid; gap: 8px; margin-top: 16px; }
.ready-bars > div { display: grid; grid-template-columns: 120px 1fr 44px; gap: 10px; align-items: center; font-size: 14px; }
.ready-bars b { text-align: right; font-size: 13px; }
@media (max-width: 600px) {
  .tasks li { grid-template-columns: 34px minmax(0, 1fr) auto; }
  .tasks .cnt { display: none; }
  .ready-bars > div { grid-template-columns: 100px 1fr 40px; }
}

/* ===== Ôn thi: phiên học ===== */
.study { max-width: 780px; margin: 0 auto; scroll-margin-top: calc(var(--header-h) + 8px); }
.study-top { display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 40px; height: 40px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; font-size: 18px; display: grid; place-items: center; flex: none; }
.icon-btn:hover { border-color: var(--primary); }
.study-title { flex: 1; min-width: 0; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; flex: none; }
.seg button { border: 0; background: none; padding: 7px 12px; border-radius: 8px; font-weight: 700; font-size: 14px; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--navy); box-shadow: 0 1px 3px rgba(11,31,68,.12); }
.study-progress { height: 8px; border-radius: 99px; background: var(--surface-2); margin: 14px 0 8px; overflow: hidden; display: flex; }
.study-progress i { display: block; height: 100%; }
.study-progress .r { background: var(--ok); } .study-progress .w { background: var(--bad); } .study-progress .s { background: #b9c6da; }
.study-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.study-meta b { color: var(--text); }
.study-tools { display: flex; gap: 4px; }
.tool { border: 0; background: none; padding: 6px 10px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; }
.tool:hover { background: var(--surface-2); color: var(--text); }
.tool.on { color: #d48a00; }
.study-drawer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-top: 10px; }
.study-drawer .cells { grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); max-height: 220px; margin: 0; }
.study-card { margin-top: 12px; padding: 22px; }
.study-card .q-text { font-size: 20px; }
.study-card .q-img { max-height: 240px; }
.btn-primary .kbd { color: #fff; border-color: rgba(255,255,255,.55); }
.study.learn .ans:not(.right) { opacity: .6; }
.study-foot { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 12px 14px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 -6px 20px rgba(11,31,68,.06); }
@media (max-width: 760px) { .study-foot { bottom: 72px; } }
.study-foot .fb { flex: 1; min-width: 0; font-weight: 700; font-size: 15px; }
.study-foot .fb.ok { color: var(--ok); } .study-foot .fb.bad { color: var(--bad); }
.study-foot .fb small { display: block; font-weight: 500; color: var(--muted); }
.kbd { display: inline-block; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; font-size: 11px; color: var(--muted); margin-left: 4px; }
@media (max-width: 760px) { .kbd { display: none; } .seg button { padding: 6px 9px; font-size: 13px; } .tool .lbl { display: none; } }
.summary { text-align: center; padding: 32px 22px; }
.summary .big { font-size: 56px; font-weight: 800; color: var(--navy); line-height: 1; margin: 8px 0; }
.summary .split { display: flex; justify-content: center; gap: 18px; color: var(--muted); margin-bottom: 6px; }
.summary .split b { color: var(--text); }
.summary .actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }

/* ===== Game screens ===== */
.game-wrap { max-width: 760px; margin: 0 auto; }
.game-hud { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.hud-item { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; font-weight: 800; display: inline-flex; gap: 6px; align-items: center; }
.hud-item small { color: var(--muted); font-weight: 600; }
.hud-time { margin-left: auto; background: var(--navy); color: #fff; border: 0; font-variant-numeric: tabular-nums; }
.hud-time.low { background: var(--bad); }
.lives { letter-spacing: 2px; }
.qbar { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-bottom: 14px; }
.qbar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #ff8a00); transition: width .25s linear; }
.combo { color: #e0560c; }
.flash-ok { animation: flashok .5s; } .flash-bad { animation: flashbad .5s; }
@keyframes flashok { 30% { box-shadow: 0 0 0 4px var(--ok); } }
@keyframes flashbad { 30% { box-shadow: 0 0 0 4px var(--bad); } 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
.gain { position: absolute; right: 18px; top: 14px; font-weight: 800; color: var(--ok); animation: rise .8s forwards; }
@keyframes rise { to { transform: translateY(-24px); opacity: 0; } }
.vs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; margin-bottom: 14px; }
.vs-player { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: grid; grid-template-columns: 40px 1fr; gap: 4px 10px; align-items: center; }
.vs-player.me { border-color: var(--primary); }
.vs-player img, .vs-player .av { width: 40px; height: 40px; border-radius: 50%; grid-row: span 2; background: var(--surface-2); display: grid; place-items: center; font-size: 20px; }
.vs-player b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-player .pts { font-weight: 800; color: var(--navy); }
.vs-player .bar { grid-column: 1 / -1; margin-top: 6px; }
.vs-mid { font-weight: 900; font-size: 22px; color: var(--bad); }
.vs-player.win { border: 2px solid var(--accent); background: var(--accent-soft); }
.lobby { text-align: center; padding: 36px 20px; }
.lobby .code { display: inline-block; font-size: 34px; font-weight: 900; letter-spacing: .2em; background: var(--surface-2); padding: 8px 18px; border-radius: 12px; margin: 10px 0; }
.spinner { width: 46px; height: 46px; border: 4px solid var(--surface-2); border-top-color: var(--primary); border-radius: 50%; margin: 0 auto 16px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.countdown-big { font-size: 96px; font-weight: 900; color: var(--primary); line-height: 1; animation: pop .4s; }
.player-card { display: grid; grid-template-columns: 64px 1fr; gap: 6px 14px; align-items: center; background: linear-gradient(120deg, var(--navy), var(--navy-2)); color: #fff; border-radius: var(--radius); padding: 18px; }
.player-card img { width: 64px; height: 64px; border-radius: 50%; grid-row: span 3; border: 3px solid var(--accent); }
.player-card .bar { background: rgba(255,255,255,.15); }
.player-card .muted { color: #b8c7e8; }
.join-row { display: flex; gap: 8px; }
.join-row input { flex: 1; text-transform: uppercase; letter-spacing: .15em; font-weight: 800; }

/* ===== Profile ===== */
.profile-grid { display: grid; grid-template-columns: 340px 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .profile-grid { grid-template-columns: 1fr; } }
.profile-card { text-align: center; }
.profile-card img { border-radius: 50%; border: 3px solid var(--accent); }
.countdown { margin: 14px 0; padding: 12px; border-radius: var(--radius-sm); background: var(--primary-soft); color: var(--primary); font-weight: 800; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat b { display: block; font-size: 26px; font-weight: 800; color: var(--navy); }
.stat span { font-size: 13px; color: var(--muted); }
.topic-row { display: grid; grid-template-columns: 1fr 120px 60px; gap: 12px; align-items: center; padding: 8px 0; font-size: 15px; border-bottom: 1px solid var(--line); }
.topic-row:last-child { border-bottom: 0; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.table th { font-size: 13px; color: var(--muted); font-weight: 700; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tab { padding: 10px 14px; border: 0; background: none; border-bottom: 2px solid transparent; font-weight: 700; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tab.active { color: var(--primary); border-color: var(--primary); }

/* ===== Roadmap ===== */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 19px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.step { position: relative; padding: 0 0 22px 56px; }
.step-dot { position: absolute; left: 3px; top: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line);
  display: grid; place-items: center; font-weight: 800; font-size: 14px; cursor: pointer; padding: 0; }
.step.done .step-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.step-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.step.done .step-card { opacity: .78; }
.step-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.step-head h3 { margin: 0; }
.step details { margin-top: 8px; }
.step summary { cursor: pointer; color: var(--primary); font-size: 14px; font-weight: 700; }
.step .step-actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }

/* ===== Tìm trường (chế độ tư vấn) ===== */
.concierge { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 32px; align-items: start; }
@media (max-width: 920px) { .concierge { grid-template-columns: 1fr; } .concierge .sticky-side { position: static; } }
.how { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.how li { display: grid; grid-template-columns: 52px 1fr; gap: 14px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.how .ico { width: 52px; height: 52px; border-radius: 14px; background: var(--primary-soft); display: grid; place-items: center; font-size: 24px; }
.how b { font-size: 17px; }
.how p { margin: 4px 0 0; }
.how-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .how-row { grid-template-columns: 1fr; } }
.criteria { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.criterion { display: grid; grid-template-columns: 40px 1fr; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.criterion .num { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; }
.criterion p { margin: 4px 0 0; font-size: 14px; }
.area-empty { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 28px; align-items: center; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius-lg); padding: 28px; }
.area-empty h2 { font-size: 24px; }
@media (max-width: 920px) { .area-empty { grid-template-columns: 1fr; padding: 18px; } }
.lead-card select[data-note] { margin-bottom: 10px; }

/* ===== Lộ trình (bản mới) ===== */
.rm-top { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
@media (max-width: 860px) { .rm-top { grid-template-columns: 1fr; } }
.rm-progress { display: grid; grid-template-columns: 96px 1fr; gap: 18px; align-items: center; }
.rm-progress .ring { width: 96px; height: 96px; }
.rm-progress .ring b { font-size: 22px; }
.rm-progress h3 { margin: 0 0 2px; font-size: 18px; }
.rm-progress .now { margin: 8px 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--primary-soft); font-size: 14px; }
.rm-progress .now b { color: var(--primary); }
.rm-date { display: flex; flex-direction: column; gap: 8px; }
.rm-date .days { font-size: 40px; font-weight: 800; color: var(--navy); line-height: 1; }
.rm-date .days small { font-size: 15px; color: var(--muted); font-weight: 600; }
.rm-date form { display: flex; gap: 8px; }
.rm-date input { flex: 1; min-width: 0; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 10px; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 28px; }
@media (max-width: 760px) { .facts { grid-template-columns: repeat(2, 1fr); } }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.fact span { display: block; font-size: 13px; color: var(--muted); }
.fact b { display: block; font-size: 17px; color: var(--navy); margin-top: 2px; line-height: 1.35; }
.rm-list { list-style: none; margin: 0; padding: 0; position: relative; }
.rm-list::before { content: ""; position: absolute; left: 21px; top: 22px; bottom: 22px; width: 3px; border-radius: 3px;
  background: linear-gradient(var(--ok) 0 var(--done, 0%), var(--line) var(--done, 0%)); }
.rm-step { position: relative; padding: 0 0 14px 60px; }
.rm-node { position: absolute; left: 0; top: 10px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800;
  background: var(--surface); border: 3px solid var(--line); color: var(--muted); z-index: 1; }
.rm-step.done .rm-node { background: var(--ok); border-color: var(--ok); color: #fff; }
.rm-step.current .rm-node { background: var(--primary); border-color: var(--primary-soft); color: #fff; box-shadow: 0 0 0 6px rgba(23,100,255,.12); }
.rm-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.rm-step.current .rm-card { border: 2px solid var(--primary); box-shadow: var(--shadow); }
.rm-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; width: 100%; text-align: left; border: 0; background: none; padding: 14px 18px; cursor: pointer; }
.rm-head h3 { margin: 0; font-size: 17px; }
.rm-step.done .rm-head h3 { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(93,107,130,.5); }
.rm-head .summary-line { grid-column: 1; color: var(--muted); font-size: 14px; }
.rm-head .meta-r { grid-row: 1 / span 2; grid-column: 2; display: flex; align-items: center; gap: 8px; }
.rm-head .chev { width: 18px; height: 18px; color: var(--muted); transition: transform .15s; }
.rm-step.open .rm-head .chev { transform: rotate(180deg); }
.status { font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.status.done { background: var(--ok-soft); color: var(--ok); }
.status.current { background: var(--primary); color: #fff; }
.rm-body { display: none; padding: 0 18px 16px; border-top: 1px dashed var(--line); }
.rm-step.open .rm-body { display: block; }
.rm-body .prose { font-size: 15px; margin-top: 12px; }
.rm-body .prose p:last-child { margin-bottom: 0; }
.rm-insight { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 14px; }
.rm-insight .bar { flex: 1; min-width: 120px; }
.rm-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.rm-actions .spacer { flex: 1; }
.rm-done-btn.on { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.disclaimer { margin-top: 24px; padding: 12px 16px; border-radius: 10px; background: var(--surface-2); color: var(--muted); font-size: 14px; }
@media (max-width: 600px) {
  .rm-step { padding-left: 50px; }
  .rm-list::before { left: 17px; }
  .rm-node { width: 36px; height: 36px; top: 12px; font-size: 14px; }
  .rm-head { padding: 12px 14px; }
  .rm-head .meta-r .dur, .rm-head .status:not(.current):not(.done) { display: none; }
  .rm-body { padding: 0 14px 14px; }
  .rm-actions .spacer { display: none; }
  .rm-actions .btn { flex: 1; }
}

/* ===== Đánh giá trường ===== */
.stars { position: relative; display: inline-block; color: #d5dbe5; letter-spacing: 1px; line-height: 1; font-size: 16px; white-space: nowrap; }
.stars-fill { position: absolute; left: 0; top: 0; overflow: hidden; color: #ffb400; }
.head-rating { display: inline-flex; align-items: center; gap: 6px; color: #fff; margin-bottom: 8px; font-size: 15px; text-decoration: none !important; }
.card-rating { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text); text-decoration: none !important; margin-right: 6px; }
.card-rating .stars { font-size: 13px; }
.reviews-panel { margin-top: 16px; scroll-margin-top: 90px; }
.rv-head { display: grid; grid-template-columns: 170px 1fr auto; gap: 24px; align-items: center; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
@media (max-width: 700px) { .rv-head { grid-template-columns: 1fr; gap: 14px; } }
.rv-avg { text-align: center; }
.rv-avg b { display: block; font-size: 46px; font-weight: 800; color: var(--navy); line-height: 1; }
.rv-avg .stars { font-size: 20px; margin: 6px 0 2px; }
.rv-dist { display: grid; gap: 5px; }
.rv-dist button { display: grid; grid-template-columns: 34px 1fr 30px; gap: 8px; align-items: center; border: 0; background: none; cursor: pointer; padding: 2px 4px; border-radius: 6px; font-size: 13px; color: var(--muted); }
.rv-dist button:hover, .rv-dist button.on { background: var(--surface-2); color: var(--text); }
.rv-dist .bar > i { background: #ffb400; }
.rv-tools { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 16px 0 6px; }
.rv-tools select { padding: 7px 10px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--surface); font-weight: 600; }
.rv-form { margin: 16px 0; padding: 18px; border: 1.5px solid var(--primary); border-radius: var(--radius); background: #fafcff; }
.rv-form h3 { margin: 0 0 10px; }
.login-nudge { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: 10px; background: var(--accent-soft); border: 1px solid #ffe3a0; margin-bottom: 14px; font-size: 14px; }
.star-pick { display: inline-flex; gap: 2px; font-size: 34px; line-height: 1; user-select: none; }
.star-pick .st { position: relative; width: 1em; height: 1em; color: #d5dbe5; cursor: pointer; }
.star-pick .st::before { content: "★"; position: absolute; inset: 0; }
.star-pick .st.full::before { color: #ffb400; }
.star-pick .st.half::before { background: linear-gradient(90deg, #ffb400 50%, #d5dbe5 50%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.star-pick .st i { position: absolute; top: 0; bottom: 0; width: 50%; z-index: 1; }
.star-pick .st i:last-child { right: 0; }
.star-label { margin-left: 10px; font-weight: 800; color: var(--navy); vertical-align: 10px; }
.rv-form textarea, .rv-form input[type=text], .rv-form input[type=number], .reply-form textarea, .reply-form input { width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); }
.rv-form textarea { min-height: 110px; margin-top: 12px; }
.counter { text-align: right; font-size: 12px; color: var(--muted); }
.photo-pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.photo-pick .ph { position: relative; width: 76px; height: 76px; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.photo-pick .ph img { width: 100%; height: 100%; object-fit: cover; }
.photo-pick .ph button { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; line-height: 1; }
.photo-pick label.add { width: 76px; height: 76px; border-radius: 10px; border: 2px dashed var(--line); display: grid; place-items: center; text-align: center; font-size: 12px; color: var(--muted); cursor: pointer; }
.photo-pick label.add:hover { border-color: var(--primary); color: var(--primary); }
.captcha-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0; font-size: 14px; }
.captcha-row .q { font-weight: 800; font-size: 17px; padding: 6px 12px; border-radius: 8px; background: var(--surface-2); letter-spacing: .04em; }
.captcha-row input { width: 90px !important; }
.captcha-row .refresh { border: 0; background: none; cursor: pointer; font-size: 18px; }
.rv-list { display: grid; }
.rv { padding: 18px 0; border-bottom: 1px solid var(--line); }
.rv:last-child { border-bottom: 0; }
.rv-top { display: grid; grid-template-columns: 42px 1fr; gap: 10px; align-items: center; }
.av { width: 42px; height: 42px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 800; overflow: hidden; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.sm { width: 32px; height: 32px; font-size: 13px; }
.rv-name { font-weight: 700; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rv-meta { font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.rv-body { margin: 10px 0 0 52px; }
@media (max-width: 600px) { .rv-body { margin-left: 0; } }
.rv-body p { margin: 0; white-space: pre-line; }
.rv-photos { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.rv-photos button { width: 88px; height: 88px; padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: zoom-in; }
.rv-photos img { width: 100%; height: 100%; object-fit: cover; }
.react-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.react { border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 3px 10px; cursor: pointer; font-size: 14px; display: inline-flex; gap: 4px; align-items: center; }
.react:hover { border-color: var(--primary); }
.react.on { background: var(--primary-soft); border-color: var(--primary); font-weight: 700; }
.react .n:empty { display: none; }
.react-bar .link-btn { margin-left: 4px; text-decoration: none; font-weight: 700; color: var(--primary); }
.replies { margin: 12px 0 0 52px; padding-left: 14px; border-left: 2px solid var(--line); display: grid; gap: 12px; }
@media (max-width: 600px) { .replies { margin-left: 8px; } }
.reply .rv-top { grid-template-columns: 32px 1fr; }
.reply p { margin: 4px 0 0 42px; font-size: 15px; white-space: pre-line; }
.reply .react-bar { margin-left: 42px; }
.reply .react { padding: 1px 8px; font-size: 13px; }
.reply-form { margin: 10px 0 0 52px; display: grid; gap: 8px; }
@media (max-width: 600px) { .reply-form { margin-left: 0; } }
.reply-form textarea { min-height: 70px; }
.pending-tag { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); }
.badge-mini { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); }
.badge-mini.staff { background: var(--primary-soft); color: var(--primary); }
.lightbox { position: fixed; inset: 0; z-index: 95; background: rgba(5,8,16,.92); display: grid; place-items: center; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 8px; }
.lightbox button { position: absolute; border: 0; background: rgba(255,255,255,.14); color: #fff; width: 46px; height: 46px; border-radius: 50%; font-size: 22px; cursor: pointer; }
.lightbox .x { top: 16px; right: 16px; } .lightbox .p { left: 16px; top: 50%; } .lightbox .n { right: 16px; top: 50%; }

/* ===== Video mẹo (feed dọc) ===== */
.vfeed-wrap { background: #05070d; }
.vfeed-wrap + .site-footer, body.video-page .site-footer { display: none; }
.vfeed { --h: calc(100dvh - var(--header-h)); position: relative; max-width: 1200px; margin: 0 auto; }
.vcats { position: absolute; top: 12px; left: 0; right: 0; z-index: 6; display: flex; gap: 8px; justify-content: center; overflow-x: auto; padding: 0 12px; scrollbar-width: none; pointer-events: none; }
.vcats button { pointer-events: auto; flex: none; border: 0; border-radius: 999px; padding: 7px 14px; font-weight: 700; font-size: 14px; cursor: pointer; background: rgba(255,255,255,.14); color: #fff; backdrop-filter: blur(8px); }
.vcats button.on { background: #fff; color: var(--navy); }
.vlist { height: var(--h); overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; }
.vlist::-webkit-scrollbar { display: none; }
.vitem { height: var(--h); scroll-snap-align: start; scroll-snap-stop: always; display: flex; justify-content: center; align-items: center; padding: 12px 0; }
.vcard { position: relative; height: 100%; aspect-ratio: 9 / 16; max-width: 100%; background: #111; border-radius: 16px; overflow: hidden; color: #fff; }
.vcard video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.vcard .tap { position: absolute; inset: 0; z-index: 1; cursor: pointer; }
.vcard .big-play { position: absolute; inset: 0; display: grid; place-items: center; z-index: 2; pointer-events: none; font-size: 64px; opacity: 0; transition: opacity .15s; text-shadow: 0 4px 20px rgba(0,0,0,.5); }
.vcard.paused .big-play { opacity: .9; }
.vcard .heart-pop { position: absolute; left: 50%; top: 45%; z-index: 3; font-size: 90px; transform: translate(-50%, -50%); pointer-events: none; animation: heartpop .8s forwards; }
@keyframes heartpop { 0% { transform: translate(-50%, -50%) scale(.3); opacity: 0; } 30% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; } 100% { transform: translate(-50%, -80%) scale(1); opacity: 0; } }
.vinfo { position: absolute; left: 0; right: 64px; bottom: 0; z-index: 3; padding: 60px 16px 18px; background: linear-gradient(transparent, rgba(0,0,0,.75)); }
.vinfo .cat { display: inline-block; font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); margin-bottom: 8px; }
.vinfo h2 { font-size: 17px; margin: 0 0 4px; line-height: 1.35; }
.vinfo p { margin: 0; font-size: 14px; color: #dfe6f3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.vinfo p.open { -webkit-line-clamp: unset; }
.vinfo .vlink { display: inline-flex; margin-top: 10px; padding: 8px 14px; border-radius: 10px; background: rgba(255,255,255,.16); color: #fff; font-weight: 700; font-size: 14px; text-decoration: none !important; backdrop-filter: blur(6px); }
.vinfo .vlink:hover { background: rgba(255,255,255,.26); }
.vrail { position: absolute; right: 8px; bottom: 24px; z-index: 4; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.vrail button { width: 48px; border: 0; background: none; color: #fff; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; font-weight: 700; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.vrail .ic { width: 46px; height: 46px; border-radius: 50%; background: rgba(0,0,0,.35); display: grid; place-items: center; font-size: 22px; backdrop-filter: blur(6px); }
.vrail .liked .ic { background: rgba(224,54,44,.9); }
.vprog { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: 5; background: rgba(255,255,255,.2); }
.vprog i { display: block; height: 100%; width: 0; background: var(--accent); }
.verr { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; z-index: 2; background: #111; color: #cfd6e4; }
.vnav { position: absolute; right: 24px; top: 50%; transform: translateY(-50%); z-index: 6; display: flex; flex-direction: column; gap: 10px; }
.vnav button { width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 20px; cursor: pointer; }
.vnav button:hover { background: rgba(255,255,255,.26); }
.vad { width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 14px; padding: 28px; text-align: center;
  background: radial-gradient(600px 400px at 50% 0%, rgba(23,100,255,.55), transparent 70%), linear-gradient(160deg, var(--navy), #070d1d); }
.vad .lbl { position: absolute; top: 14px; left: 14px; font-size: 12px; color: #b8c7e8; border: 1px solid rgba(255,255,255,.3); border-radius: 6px; padding: 1px 8px; }
.vad img { width: 96px; height: 96px; border-radius: 20px; object-fit: cover; background: #fff; }
.vad h2 { font-size: 22px; margin: 0; }
.vad p { margin: 0; color: #c9d6f2; }
.vempty { height: var(--h); display: grid; place-items: center; color: #cfd6e4; text-align: center; padding: 20px; }
@media (max-width: 760px) {
  .vfeed { --h: calc(100dvh - var(--header-h) - 64px); }
  .vitem { padding: 0; }
  .vcard { border-radius: 0; width: 100%; aspect-ratio: auto; }
  .vnav { display: none; }
  .vcats { top: 10px; justify-content: flex-start; }
}
.video-page .fab, .video-page .sticky-ad { display: none !important; }

/* Dải video trên trang chủ */
.vstrip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 180px); gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.vthumb { position: relative; display: block; aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden; background: linear-gradient(160deg, var(--navy-2), var(--navy)); color: #fff; text-decoration: none !important; scroll-snap-align: start; }
.vthumb img { width: 100%; height: 100%; object-fit: cover; }
.vthumb .t { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 10px 10px; font-weight: 700; font-size: 14px; line-height: 1.3; background: linear-gradient(transparent, rgba(0,0,0,.8)); }
.vthumb .pl { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%; background: rgba(0,0,0,.45); display: grid; place-items: center; font-size: 13px; }

/* ===== Signs ===== */
.sign-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.sign { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; text-align: center; }
.sign img { height: 96px; object-fit: contain; margin-bottom: 8px; }
.sign .code { font-size: 12px; color: var(--muted); font-weight: 800; }
.sign b { display: block; font-size: 15px; margin: 2px 0 6px; }
.sign p { font-size: 13px; color: var(--muted); margin: 0; }
.search { width: 100%; max-width: 380px; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
