/* ĐẤU TRƯỜNG TRI THỨC – trang công khai /dau-truong
   Tông sáng, tươi vui cho mọi lứa tuổi học sinh: nền kem – bầu trời, thẻ trắng bo tròn, điểm nhấn cam, hồng, xanh, tím.
   Chỉ dùng phông hệ thống (CSP chặn phông ngoài). */
:root {
  --ink: #1f2a44;
  --ink2: #4b5878;
  --ink3: #8592ad;
  --line: #e8ecf5;
  --orange: #ff8a3d;
  --pink: #ff4f8b;
  --yellow: #ffd23d;
  --mint: #22c58b;
  --sky: #38bdf8;
  --violet: #8b5cf6;
  --zalo: #0068ff;
  --r: 22px;
  --shadow: 0 10px 30px -14px rgba(31, 42, 68, 0.25);
  --display: "Arial Rounded MT Bold", "Arial Black", "Segoe UI Black", system-ui, sans-serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { overflow-anchor: auto; scroll-behavior: smooth; scroll-padding-top: 74px; background: #eef7ff; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--ink);
  line-height: 1.55;
  background: linear-gradient(180deg, #e4f2ff 0%, #f4faff 380px, #ffffff 1200px, #f4faff 100%);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; background: #fff3d6; border: 1px solid #ffd98a; color: #b45309; padding: 1px 7px; border-radius: 8px; font-weight: 800; font-size: 0.92em; }
[hidden] { display: none !important; }

/* bong bóng trang trí */
.bubbles { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.bubbles i { position: absolute; border-radius: 50%; opacity: 0.3; }
.bubbles i:nth-child(1) { width: 120px; height: 120px; left: -30px; top: 30%; background: #ffd23d; }
.bubbles i:nth-child(2) { width: 70px; height: 70px; right: 6%; top: 18%; background: #38bdf8; animation-delay: -4s; }
.bubbles i:nth-child(3) { width: 90px; height: 90px; right: -20px; top: 62%; background: #ff4f8b; animation-delay: -8s; }
.bubbles i:nth-child(4) { width: 50px; height: 50px; left: 12%; top: 78%; background: #8b5cf6; animation-delay: -2s; }
.bubbles i:nth-child(5) { width: 40px; height: 40px; left: 46%; top: 8%; background: #22c58b; animation-delay: -6s; }

/* nút */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 12px 20px; font: 800 1rem/1.1 var(--sans); cursor: pointer; text-decoration: none; transition: transform 0.15s, box-shadow 0.2s; white-space: nowrap; }
.btn:active { transform: scale(0.96); }
.btn.lg { padding: 15px 26px; font-size: 1.08rem; }
.btn.sm { padding: 9px 16px; font-size: 0.92rem; }
.btn-orange { background: linear-gradient(135deg, #ffb13d, var(--orange) 50%, var(--pink)); color: #fff; box-shadow: 0 10px 22px -10px rgba(255, 100, 80, 0.9); }
.btn-zalo { background: linear-gradient(135deg, #3b9bff, var(--zalo)); color: #fff; box-shadow: 0 10px 22px -10px rgba(0, 104, 255, 0.9); }
.btn-white { background: #fff; color: var(--ink); box-shadow: var(--shadow); border: 2px solid var(--line); }
.btn-soft { background: #fff1e6; color: #c2410c; border: 2px solid #ffd3b0; }
.btn-ghost { background: rgba(255, 255, 255, 0.2); color: #fff; border: 2px solid rgba(255, 255, 255, 0.6); }
.btn:hover { transform: translateY(-2px); }
.zl { background: #fff; color: var(--zalo); font-weight: 900; font-size: 0.72rem; padding: 3px 6px; border-radius: 6px; }

/* thanh trên */
.nav { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; padding: 10px max(16px, calc((100vw - 1100px) / 2)); background: linear-gradient(90deg, #0369a1, #0284c7 55%, #0ea5e9); box-shadow: 0 6px 18px -10px rgba(3, 105, 161, 0.7); color: #fff; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; margin-right: auto; }
.brand img { width: 40px; height: 40px; border-radius: 12px; flex: none; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.7); }
.brand-t { font-family: "Arial Black", "Segoe UI Black", var(--display); font-weight: 900; font-size: clamp(1rem, 2.6vw, 1.35rem); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; background: linear-gradient(180deg, #fffbe6 0%, #ffe27a 45%, #ffb703 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 0 rgba(2, 62, 110, 0.55)) drop-shadow(0 0 10px rgba(255, 214, 90, 0.35)); }
.brand small { display: block; color: #d6efff; font-size: 0.75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 42vw; }
.links { display: flex; gap: 20px; margin-right: 8px; }
.links a { text-decoration: none; color: #fff; font-weight: 700; font-size: 0.95rem; opacity: 0.92; }
.links a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 5px; }
.nav .btn-soft { background: rgba(255, 255, 255, 0.16); color: #fff; border-color: rgba(255, 255, 255, 0.55); }
.links a i, .nav #navInstall i { display: none; font-style: normal; }
.nav .btn-orange { box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.45); }

main { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* hero */
.hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 30px; align-items: center; padding: 40px 0 20px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 7px 14px; border-radius: 999px; background: #e7fbf2; border: 2px solid #b7f0d7; color: #0f7a52; font-weight: 800; font-size: 0.88rem; }
.eyebrow .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--mint); animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.3; } }
h1 { font-family: var(--display); font-size: clamp(2.5rem, 7vw, 4.6rem); line-height: 1.02; margin: 0 0 14px; color: #243b7a; }
.rainbow { display: inline-block; background: linear-gradient(90deg, #ff8a3d, #ff4f8b 35%, #8b5cf6 70%, #38bdf8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(1.05rem, 2.3vw, 1.22rem); color: var(--ink2); margin: 0 0 22px; max-width: 520px; }
.lead b { color: var(--ink); }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.me { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; padding: 12px 16px; border-radius: 18px; background: #fff; border: 2px solid #ffe08a; box-shadow: var(--shadow); max-width: 520px; }
.me .lv { font-size: 1.8rem; }
.me b { display: block; } .me small { color: var(--ink2); }
.me a { margin-left: auto; color: var(--orange); font-weight: 800; font-size: 0.9rem; white-space: nowrap; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 520px; }
.stats div { padding: 12px 8px; border-radius: 18px; background: #fff; box-shadow: var(--shadow); text-align: center; border-bottom: 4px solid var(--c); }
.stats .s1 { --c: var(--sky); } .stats .s2 { --c: var(--mint); } .stats .s3 { --c: var(--pink); }
.stats b { display: block; min-height: 1.3em; font-family: var(--display); font-size: clamp(1.2rem, 3.4vw, 1.6rem); color: var(--ink); font-variant-numeric: tabular-nums; }
.stats small { color: var(--ink3); font-size: 0.8rem; font-weight: 600; }

/* điện thoại minh họa */
.hero-art { position: relative; display: flex; justify-content: center; }
.phone { contain: layout paint; width: min(310px, 86vw); height: 520px; border-radius: 40px; padding: 12px; background: #fff; border: 8px solid #243b7a; box-shadow: 0 30px 60px -24px rgba(36, 59, 122, 0.45); display: flex; flex-direction: column; transform: rotate(-2deg); }
.ph-top { display: flex; align-items: center; gap: 10px; padding: 6px 8px 10px; border-bottom: 1px solid var(--line); }
.ph-top img { width: 36px; height: 36px; border-radius: 50%; }
.ph-top b { display: block; font-size: 0.92rem; } .ph-top small { color: var(--ink3); font-size: 0.75rem; }
.ph-chat { flex: 1; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; padding: 10px 6px; background: #f1f5fb; border-radius: 16px; margin-top: 8px; }
.bub { max-width: 86%; padding: 9px 12px; border-radius: 16px; font-size: 0.82rem; line-height: 1.4; white-space: pre-line; animation: pop 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.3) both; }
.bub.in { align-self: flex-end; background: var(--zalo); color: #fff; border-bottom-right-radius: 4px; font-weight: 800; }
.bub.out { align-self: flex-start; background: #fff; color: var(--ink); border-bottom-left-radius: 4px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06); }
.bub.ok { background: #dcfce7; color: #14532d; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(0.92); } }
.ph-input { display: flex; justify-content: space-between; margin: 8px 4px 2px; padding: 10px 14px; border-radius: 999px; background: #f1f5fb; color: var(--ink3); font-size: 0.85rem; }
.ph-input i { font-style: normal; color: var(--zalo); }
.sticker { position: absolute; font-size: 2.6rem; animation: fl 4.5s ease-in-out infinite; will-change: transform; }
.k1 { top: 4%; left: 4%; } .k2 { bottom: 10%; left: 0; animation-delay: 1.2s; } .k3 { top: 34%; right: 2%; animation-delay: 2.2s; }
@keyframes fl { 50% { transform: translateY(-12px) rotate(8deg); } }

/* phát sóng */
.bc { display: flex; align-items: center; gap: 14px 18px; flex-wrap: wrap; margin-top: 8px; padding: 16px 20px; border-radius: var(--r); background: linear-gradient(120deg, #e0f2ff, #f3e8ff); border: 2px solid #c7dcff; }
.bc-ic { font-size: 2rem; }
.bc-tx { flex: 1; min-width: 180px; } .bc-tx small { color: #4b5fa8; font-weight: 700; } .bc-tx b { display: block; font-family: var(--display); font-size: 1.25rem; color: #243b7a; }
.bc-cd { display: flex; gap: 8px; }
.bc-cd div { min-width: 60px; text-align: center; padding: 6px; border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.bc-cd b { display: block; min-width: 2ch; font-family: var(--display); font-size: 1.45rem; color: var(--violet); font-variant-numeric: tabular-nums; }
.bc-cd small { color: var(--ink3); font-size: 0.72rem; font-weight: 700; }
.bc.live { background: linear-gradient(120deg, #ffe4ec, #fff3d6); border-color: #ff7aa5; }
.bc.live .bc-tx small { color: #e11d48; }

/* khối */
.block { padding: 52px 0 6px; }
.head { text-align: center; max-width: 640px; margin: 0 auto 22px; }
h2 { font-family: var(--display); font-size: clamp(1.55rem, 4vw, 2.2rem); line-height: 1.15; margin: 0 0 6px; color: #243b7a; }
.sub { color: var(--ink2); margin: 0; }

/* thử sức */
.quiz { min-height: 330px; contain: layout; max-width: 720px; margin: 0 auto; padding: 24px; border-radius: 28px; background: #fff; box-shadow: 0 24px 50px -24px rgba(36, 59, 122, 0.35); border: 2px solid var(--line); }
.q-load { display: grid; place-items: center; min-height: 160px; }
.spin { width: 32px; height: 32px; border-radius: 50%; border: 4px solid #ffe2c7; border-top-color: var(--orange); animation: rot 0.9s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }
.q-meta { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; color: var(--ink2); font-weight: 800; font-size: 0.9rem; }
.q-meta .hard { color: #d97706; }
.q-timer { height: 8px; border-radius: 8px; background: #eef2f8; overflow: hidden; margin-bottom: 16px; }
.q-timer i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--mint), var(--yellow), var(--pink)); transform-origin: left; }
.q-text { font-size: clamp(1.15rem, 2.8vw, 1.42rem); font-weight: 800; margin: 0 0 16px; line-height: 1.35; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opt { display: flex; align-items: center; gap: 12px; text-align: left; padding: 13px 14px; border-radius: 18px; background: #f7f9fd; border: 2px solid var(--line); color: var(--ink); font: 700 1rem/1.35 var(--sans); cursor: pointer; transition: transform 0.15s, border-color 0.15s, background 0.15s; }
.opt:hover:not(:disabled) { border-color: var(--sky); background: #eef8ff; transform: translateY(-2px); }
.opt .l { flex: none; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 900; }
.opt:nth-child(1) .l { background: var(--pink); } .opt:nth-child(2) .l { background: var(--sky); } .opt:nth-child(3) .l { background: var(--orange); } .opt:nth-child(4) .l { background: var(--violet); }
.opt.right { background: #e7fbf2; border-color: var(--mint); }
.opt.right .l { background: var(--mint); }
.opt.wrong { background: #ffeef3; border-color: var(--pink); }
.opt:disabled { cursor: default; }
.q-res { margin-top: 16px; padding: 16px 18px; border-radius: 20px; background: #fffaf0; border: 2px dashed #ffd98a; animation: pop 0.3s both; }
.q-res.good { background: #effcf5; border-color: #9fe5c6; }
.q-res h3 { margin: 0 0 6px; font-size: 1.2rem; }
.q-res p { margin: 0 0 12px; color: var(--ink2); }
.q-res .row { display: flex; gap: 10px; flex-wrap: wrap; }
.q-score { text-align: center; color: var(--ink3); font-size: 0.85rem; margin: 10px 0 0; font-weight: 700; }
.confetti { position: fixed; top: -10px; width: 10px; height: 14px; border-radius: 3px; z-index: 60; pointer-events: none; animation: fall 1.6s ease-in forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(720deg); opacity: 0.7; } }

/* cách chơi */
.how { display: grid; grid-template-columns: 1fr 260px; gap: 18px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.steps li { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: var(--r); background: #fff; box-shadow: var(--shadow); border-left: 6px solid var(--c); }
.steps .c1 { --c: var(--sky); } .steps .c2 { --c: var(--orange); } .steps .c3 { --c: var(--mint); }
.steps li > span { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-size: 1.35rem; color: #fff; background: var(--c); }
.steps b { font-size: 1.06rem; } .steps em { font-style: normal; color: var(--zalo); }
.steps p { margin: 2px 0 0; color: var(--ink2); font-size: 0.94rem; }
.qr-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px; border-radius: var(--r); background: #fff; box-shadow: var(--shadow); text-align: center; }
.qr { width: 170px; height: 170px; padding: 8px; border-radius: 16px; background: #fff; border: 2px solid var(--line); display: grid; place-items: center; color: var(--ink3); font-size: 0.8rem; }
.qr svg { width: 100%; height: 100%; }
.topics { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.topics span { padding: 8px 14px; border-radius: 999px; background: #fff; box-shadow: var(--shadow); font-weight: 700; font-size: 0.92rem; }
.rules { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin-top: 14px; color: var(--ink2); font-size: 0.95rem; }
.rules b { color: var(--ink); }

/* xếp hạng */
.seg { display: flex; justify-content: center; gap: 6px; margin-bottom: 22px; }
.seg button { padding: 9px 18px; border-radius: 999px; background: #fff; border: 2px solid var(--line); color: var(--ink2); font: 800 0.92rem var(--sans); cursor: pointer; }
.seg button.on { background: linear-gradient(135deg, #ffb13d, var(--orange)); color: #fff; border-color: transparent; }
.podium { min-height: 220px; display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 10px; align-items: end; max-width: 640px; margin: 0 auto 14px; }
.pd { text-align: center; }
.pd .av { width: 60px; height: 60px; margin: 0 auto 6px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-size: 1.5rem; color: #fff; background: var(--pc); border: 4px solid #fff; box-shadow: var(--shadow); }
.pd b { display: block; font-size: 0.98rem; } .pd small { display: block; color: var(--ink3); font-size: 0.76rem; min-height: 2.3em; line-height: 1.2; }
.pd .bar { margin-top: 8px; border-radius: 18px 18px 8px 8px; padding: 10px 4px; background: var(--pc); color: #fff; font-family: var(--display); font-size: 1.1rem; }
.pd.p1 { --pc: linear-gradient(180deg, #ffd23d, #ff9f1c); } .pd.p1 .bar { height: 112px; } .pd.p1 .av { width: 76px; height: 76px; }
.pd.p2 { --pc: linear-gradient(180deg, #7dd3fc, #38bdf8); } .pd.p2 .bar { height: 82px; }
.pd.p3 { --pc: linear-gradient(180deg, #fda4af, #ff4f8b); } .pd.p3 .bar { height: 62px; }
.pd .crown { font-size: 1.6rem; display: block; margin-bottom: -6px; }
.lb { list-style: none; margin: 0 auto; padding: 0; max-width: 640px; display: grid; gap: 8px; }
.lb li { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.lb .rk { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #eef2f8; font-weight: 900; color: var(--ink2); font-size: 0.85rem; flex: none; }
.lb .nm { flex: 1; min-width: 0; } .lb .nm b { display: block; } .lb .nm small { color: var(--ink3); }
.lb .pt { font-family: var(--display); color: var(--orange); }
.empty { text-align: center; color: var(--ink2); padding: 18px; border-radius: 18px; border: 2px dashed #ffd98a; background: #fffaf0; max-width: 640px; margin: 0 auto; }

/* quà */
.gifts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.gift { padding: 18px 16px; border-radius: var(--r); background: #fff; box-shadow: var(--shadow); text-align: center; }
.gift .ic { font-size: 2.2rem; display: block; }
.gift .cost { display: inline-block; margin: 6px 0 8px; padding: 4px 12px; border-radius: 999px; background: linear-gradient(135deg, #ffb13d, var(--pink)); color: #fff; font-weight: 900; font-size: 0.9rem; }
.gift b { display: block; line-height: 1.35; font-size: 0.95rem; }
.gift small { display: block; color: var(--ink3); margin-top: 4px; font-weight: 700; }

/* cài app */
.install { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin: 56px 0 0; padding: 22px 24px; border-radius: 28px; background: #fff; box-shadow: 0 24px 50px -24px rgba(255, 138, 61, 0.55); border: 2px solid #ffd3b0; }
.install img { width: 72px; height: 72px; border-radius: 20px; flex: none; }
.in-tx { flex: 1; min-width: 220px; } .in-tx h2 { margin: 0 0 4px; font-size: 1.45rem; } .in-tx p { margin: 0; color: var(--ink2); }
.install.done .btn { display: none; }

/* rủ bạn */
.invite { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin: 22px 0 0; padding: 24px; border-radius: 28px; background: linear-gradient(120deg, #ff8a3d, #ff4f8b 55%, #8b5cf6); color: #fff; box-shadow: 0 24px 50px -24px rgba(255, 79, 139, 0.8); }
.invite h2 { color: #fff; margin: 0 0 4px; font-size: clamp(1.3rem, 3.2vw, 1.8rem); }
.invite p { margin: 0; color: #fff4f8; }
.inv-act { display: flex; gap: 10px; flex-wrap: wrap; }

.foot { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; max-width: 1100px; margin: 40px auto 0; padding: 20px 16px 110px; color: var(--ink3); font-size: 0.9rem; }
.foot a { color: var(--ink2); font-weight: 700; text-decoration: none; }

/* hộp hướng dẫn cài (iPhone, Zalo…) */
.sheet { position: fixed; inset: 0; z-index: 70; background: rgba(31, 42, 68, 0.45); display: flex; align-items: flex-end; justify-content: center; padding: 12px; }
.sheet-box { position: relative; width: min(460px, 100%); background: #fff; border-radius: 26px; padding: 22px 20px 20px; box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25); animation: pop 0.25s both; margin-bottom: env(safe-area-inset-bottom); }
.sheet-box h3 { margin: 0 0 10px; font-family: var(--display); color: #243b7a; font-size: 1.3rem; }
.sheet-box ol { margin: 0; padding-left: 22px; } .sheet-box li { margin: 8px 0; }
.sheet-box .x { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: #eef2f8; font-size: 1rem; cursor: pointer; }
.sheet-box .ico { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: #eef2f8; vertical-align: middle; }
@media (min-width: 700px) { .sheet { align-items: center; } }

/* thanh nút dưới (điện thoại) */
.mbar { display: none; }
.toast { position: fixed; left: 50%; bottom: 92px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 12px 18px; border-radius: 16px; background: #243b7a; color: #fff; font-weight: 700; box-shadow: 0 16px 30px -10px rgba(0, 0, 0, 0.4); transition: 0.25s; z-index: 80; max-width: 90vw; text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

.reveal { opacity: 0; transition: opacity 0.45s; }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 26px; }
  .hero-art { display: none; }
  .how { grid-template-columns: 1fr; }
  .links { display: none; }
}
@media (max-width: 560px) {
  .nav #navPlay { display: none; }
  .opts { grid-template-columns: 1fr; }
  .quiz { padding: 18px; }
  .cta .btn { flex: 1; }
  .bc-cd { width: 100%; } .bc-cd div { flex: 1; }
  .podium { gap: 6px; } .pd .av { width: 50px; height: 50px; font-size: 1.2rem; } .pd.p1 .av { width: 62px; height: 62px; }
  .mbar { display: flex; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 18px -12px rgba(0, 0, 0, 0.3); }
  .mbar .btn { flex: 1; padding: 12px 10px; font-size: 0.95rem; }
  .install { padding: 18px; } .install .btn { width: 100%; }
  .invite { padding: 20px; } .inv-act .btn { flex: 1; }
}
@media (display-mode: standalone) {
  .install, #navInstall, #mInstall { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Điện thoại, máy tính bảng: các mục trên thanh đầu thu gọn thành biểu tượng tròn */
@media (max-width: 900px) {
  .nav .links { display: flex; gap: 6px; margin-right: 0; }
  .links a, .nav #navInstall { width: 38px; height: 38px; padding: 0; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, 0.18); border: 1.5px solid rgba(255, 255, 255, 0.5); text-decoration: none !important; opacity: 1; }
  .links a span, .nav #navInstall span { display: none; }
  .links a i, .nav #navInstall i { display: block; font-size: 1.1rem; line-height: 1; }
  .links a:active, .nav #navInstall:active { background: rgba(255, 255, 255, 0.35); }
}
@media (max-width: 560px) {
  .nav { gap: 6px; padding: 8px 10px; }
  .brand { gap: 8px; }
  .brand img { width: 34px; height: 34px; border-radius: 10px; }
  .brand-t { font-size: 0.86rem; line-height: 1.12; white-space: normal; letter-spacing: 0.04em; }
  .brand-t span { display: block; }
  .nav #navInstall { display: grid; }
  .nav #navInstall[hidden] { display: none !important; }
  .links a, .nav #navInstall { width: 34px; height: 34px; }
  .links a i, .nav #navInstall i { font-size: 1rem; }
}
@media (max-width: 370px) { .links a[href="#cach-choi"] { display: none !important; } }

/* ===== Kiểu ứng dụng trên điện thoại: ô tiện ích + thanh điều hướng dưới (một nút “Chơi” duy nhất ở giữa) ===== */
.tiles, .tabbar { display: none; }
@media (max-width: 560px) {
  .nav .links, .nav #navInstall, .nav #navPlay { display: none !important; }
  .brand-t { font-size: 1.02rem; white-space: nowrap; }
  .brand-t span { display: inline; }
  .hero { padding: 16px 0 6px; gap: 0; }
  .eyebrow { font-size: 0.8rem; padding: 5px 12px; margin-bottom: 10px; }
  h1 { font-size: 2.1rem; margin-bottom: 8px; }
  .lead { font-size: 0.98rem; margin-bottom: 14px; }
  .cta { display: none; }
  .me { margin-bottom: 12px; padding: 10px 14px; }
  .stats { gap: 8px; }
  .stats div { padding: 10px 6px; border-radius: 16px; }
  .stats b { font-size: 1.2rem; }
  .stats small { font-size: 0.72rem; }
  .bc { padding: 12px 14px; gap: 10px; }
  .bc-ic { font-size: 1.5rem; }
  .bc-tx b { font-size: 1.05rem; }
  .bc-cd { width: auto; } .bc-cd div { min-width: 48px; padding: 4px; flex: none; } .bc-cd b { font-size: 1.15rem; } .bc-cd small { font-size: 0.65rem; }
  .tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 8px; margin: 18px 0 0; padding: 16px 10px; border-radius: 22px; background: #fff; box-shadow: var(--shadow); }
  .tiles > * { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; background: none; border: 0; padding: 0; font: inherit; color: var(--ink); cursor: pointer; }
  .tiles span { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; font-size: 1.6rem; background: var(--tb); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.05); }
  .tiles b { font-size: 0.78rem; font-weight: 700; text-align: center; line-height: 1.2; }
  .tiles .t1 { --tb: #fff4d6; } .tiles .t2 { --tb: #e5f3ff; } .tiles .t3 { --tb: #fff0e0; } .tiles .t4 { --tb: #ffe8f0; }
  .tiles .t5 { --tb: #eef0ff; } .tiles .t6 { --tb: #e6fbf2; } .tiles .t7 { --tb: #f3e8ff; } .tiles .t8 { --tb: #eaf2f8; }
  .tiles > [hidden] { display: none !important; }
  .install, .invite { display: none; }
  .block { padding-top: 34px; }
  .mbar { display: none !important; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: #fff; border-radius: 22px 22px 0 0; box-shadow: 0 -8px 24px -12px rgba(31, 42, 68, 0.3); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; text-decoration: none; color: #94a3b8; font-size: 0.7rem; font-weight: 700; padding: 4px 0; }
  .tabbar svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar a.on { color: #0284c7; }
  .tabbar a.on svg { fill: rgba(2, 132, 199, 0.14); }
  .tabbar .fab { color: #0284c7; }
  .tabbar .fab i { width: 60px; height: 60px; margin-top: -30px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #38bdf8, #0284c7); border: 4px solid #fff; box-shadow: 0 10px 20px -8px rgba(2, 132, 199, 0.9); }
  .tabbar .fab b { font-size: 1.6rem; line-height: 1; }
  .foot { padding-bottom: 120px; }
  .toast { bottom: 100px; }
}
@media (max-width: 370px) { .tiles span { width: 50px; height: 50px; } .brand-t { font-size: 0.9rem; } }
@media (max-width: 560px) {
  .bubbles { display: none; }
  .bc { flex-wrap: nowrap; }
  .bc-ic { display: none; }
  .bc-tx { min-width: 0; } .bc-tx small { font-size: 0.74rem; line-height: 1.25; display: block; }
  .bc-cd { margin-left: auto; gap: 5px; } .bc-cd div { min-width: 42px; }
  .pd.p1 .bar { height: 70px; } .pd.p2 .bar { height: 52px; } .pd.p3 .bar { height: 40px; }
  .pd .bar { font-size: 0.95rem; padding: 8px 2px; }
  .podium { min-height: 0; }
  .pd small { font-size: 0.7rem; }
}

/* ===== Banner chính (ảnh) – thay cho tiêu đề chữ & điện thoại minh họa ===== */
.hero { display: block; padding: 22px 0 0; }
.banner { display: block; border-radius: 28px; overflow: hidden; box-shadow: 0 24px 50px -26px rgba(29, 78, 216, 0.55); background: #8ec5ff; aspect-ratio: 2560 / 845; }
.banner img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-bar { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; width: calc(100% - 48px); margin: -42px auto 0; padding: 14px 16px; border-radius: 22px; background: #fff; box-shadow: 0 18px 40px -18px rgba(29, 78, 216, 0.45); }
.hero-bar .stats { display: flex; gap: 8px; max-width: none; flex: 1; }
.hero-bar .stats div { flex: 1; box-shadow: none; background: #f4f8ff; border-radius: 16px; padding: 10px 8px; border-bottom-width: 3px; }
.hero-bar .cta { margin: 0; flex: none; }
.live { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 14px 0 0; color: #0f7a52; font-weight: 700; font-size: 0.92rem; }
.live .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--mint); animation: blink 1.6s ease-in-out infinite; }
.hero .me { margin: 14px auto 0; }
@media (max-width: 900px) {
  .hero-bar { flex-direction: column; align-items: stretch; }
  .hero-bar .cta { display: flex; } .hero-bar .cta .btn { flex: 1; }
}
@media (max-width: 560px) {
  .hero { padding-top: 12px; }
  .banner { border-radius: 20px; }
  .hero-bar { width: calc(100% - 20px); margin-top: -22px; padding: 8px; border-radius: 18px; }
  .hero-bar .cta { display: none; }
  .hero-bar .stats div { padding: 8px 4px; }
  .live { font-size: 0.82rem; margin-top: 10px; }
}
@media (max-width: 900px) { .hero-bar .stats { flex: none; } }
.hero-bar .stats b { line-height: 1.2; min-height: 0; }
.hero-bar .stats small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }

/* điện thoại: tên trang nằm giữa thanh tiêu đề */
@media (max-width: 560px) {
  .nav { justify-content: center; }
  .brand { margin: 0 auto; justify-content: center; }
}
/* thanh điều hướng dưới: cùng nền xanh với thanh tiêu đề; nút giữa màu Ruby nổi bật */
@media (max-width: 560px) {
  .tabbar { background: linear-gradient(90deg, #0369a1, #0284c7 55%, #0ea5e9); box-shadow: 0 -8px 24px -10px rgba(3, 105, 161, 0.6); }
  .tabbar a { color: rgba(255, 255, 255, 0.72); }
  .tabbar a.on { color: #fff; }
  .tabbar a.on svg { fill: rgba(255, 255, 255, 0.22); }
  .tabbar a.on span { position: relative; }
  .tabbar a.on span::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 16px; height: 3px; margin-left: -8px; border-radius: 3px; background: #ffd23d; }
  .tabbar .fab { color: #fff; }
  .tabbar .fab i { background: radial-gradient(circle at 30% 25%, #ff9ab8 0%, #ff3d7f 45%, #be123c 100%); border-color: #fff; box-shadow: 0 10px 22px -6px rgba(190, 18, 60, 0.75), 0 0 0 3px rgba(255, 61, 127, 0.25); }
}
/* banner ngang 3:1 – thẻ số liệu chồng ít hơn để không che chữ */
.hero-bar { margin-top: -28px; }
@media (max-width: 560px) { .banner { border-radius: 16px; } .hero-bar { margin-top: 10px; width: 100%; } }
.hero-bar { margin-top: 14px; width: 100%; }
/* mỗi vùng nội dung có khung viền riêng để dễ phân biệt */
.block { margin-top: 26px; padding: 28px 22px 26px; background: #fff; border: 2px solid #dbe8f8; border-radius: 28px; box-shadow: 0 16px 36px -26px rgba(29, 78, 216, 0.45); }
.block .head { margin-bottom: 18px; }
.block .head h2 { display: inline-block; padding-bottom: 6px; border-bottom: 4px solid #ffd23d; }
#thu .quiz { box-shadow: none; border-color: #e8eef8; background: #f8fbff; }
#bxh .lb li, #qua .gift, #cach-choi .steps li, #cach-choi .qr-card { border: 1.5px solid #e6eef9; box-shadow: none; }
#bxh .lb li, #cach-choi .steps li { background: #f8fbff; }
#cach-choi .steps li { border-left: 6px solid var(--c); }
@media (max-width: 560px) {
  .block { margin-top: 18px; padding: 20px 12px 18px; border-radius: 22px; }
  #thu .quiz { padding: 14px; }
}

/* ===== Quà giá trị nhất: FunLingo ===== */
.fl-card { position: relative; display: block; margin: 0 0 18px; border-radius: 26px; overflow: hidden; text-decoration: none; color: inherit; background: #fff; border: 3px solid transparent; background-image: linear-gradient(#fff, #fff), linear-gradient(120deg, #ffd23d, #ff4f8b, #8b5cf6, #38bdf8, #22c58b); background-origin: border-box; background-clip: padding-box, border-box; box-shadow: 0 22px 44px -22px rgba(139, 92, 246, 0.6); transition: transform 0.2s, box-shadow 0.2s; }
.fl-card:hover { transform: translateY(-4px); box-shadow: 0 30px 56px -22px rgba(139, 92, 246, 0.75); }
.fl-card picture, .fl-card img { display: block; width: 100%; height: auto; }
.fl-ribbon { position: absolute; top: 14px; left: 14px; z-index: 2; padding: 7px 14px; border-radius: 999px; background: linear-gradient(135deg, #ffe27a, #ffb703); color: #6b3d00; font-weight: 900; font-size: 0.85rem; letter-spacing: 0.04em; box-shadow: 0 6px 16px -6px rgba(180, 100, 0, 0.7); animation: flPulse 2.4s ease-in-out infinite; }
@keyframes flPulse { 50% { transform: scale(1.06); } }
.fl-body { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 18px 16px; background: linear-gradient(90deg, #f0f9ff, #fdf4ff); }
.fl-txt { flex: 1; min-width: 220px; }
.fl-txt b { display: block; font-size: 1.15rem; color: #243b7a; }
.fl-txt em { font-style: normal; background: linear-gradient(90deg, #1d6fe8, #16a34a); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 900; }
.fl-txt small { display: block; color: #4b5878; margin-top: 2px; }
.fl-txt .fl-cost { margin-top: 6px; color: #7c3aed; font-weight: 700; }
.fl-go { flex: none; padding: 12px 22px; border-radius: 999px; background: linear-gradient(135deg, #22c55e, #16a34a 50%, #1d6fe8); color: #fff; font-weight: 900; box-shadow: 0 10px 22px -10px rgba(22, 163, 74, 0.9); }
.fl-card:hover .fl-go { filter: brightness(1.08); }
@media (max-width: 560px) { .fl-body { padding: 12px; } .fl-go { width: 100%; text-align: center; } .fl-ribbon { top: 8px; left: 8px; font-size: 0.72rem; padding: 5px 10px; } }
.fl-txt .fl-cost b { display: inline; font-size: inherit; color: inherit; }
@media (max-width: 560px) { .fl-ribbon { left: auto; right: 8px; } }
/* Thi trực tiếp */
.lv-box { border-radius: var(--r); padding: 18px; background: linear-gradient(135deg, #1e3a8a, #0284c7 60%, #06b6d4); color: #fff; box-shadow: var(--shadow); }
.lv-pin { display: flex; gap: 10px; max-width: 520px; margin: 0 auto; }
.lv-pin input { flex: 1; min-width: 0; font: 800 1.4rem var(--display); letter-spacing: .25em; text-align: center; border: 0; border-radius: 14px; padding: 12px; color: #1e3a8a; }
.lv-pin input::placeholder { letter-spacing: normal; font-size: 1rem; color: #94a3b8; }
.lv-rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-top: 16px; }
.lv-room { position: relative; display: block; text-decoration: none; color: #0f172a; background: #fff; border-radius: 14px; padding: 12px 14px 12px; box-shadow: 0 4px 0 rgba(0,0,0,.12); }
.lv-room b { display: block; margin: 6px 0 2px; font-size: 1.02rem; }
.lv-room small { color: #475569; }
.lv-room em { position: absolute; right: 12px; top: 10px; font-style: normal; font-weight: 800; color: #0284c7; }
.lv-st { font-size: .72rem; font-weight: 800; color: #b45309; background: #fef3c7; border-radius: 999px; padding: 2px 8px; }
.lv-st.on { color: #fff; background: #e11d48; animation: lvBlink 1.4s infinite; }
@keyframes lvBlink { 50% { opacity: .6; } }
.lv-empty { grid-column: 1 / -1; text-align: center; margin: 4px 0 0; opacity: .92; }
.lv-feat { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
.lv-feat span { background: rgba(255,255,255,.16); border-radius: 999px; padding: 5px 12px; font-size: .85rem; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .lv-st.on { animation: none; } }
.lv-or { display: flex; align-items: center; gap: 10px; max-width: 520px; margin: 14px auto 10px; font-weight: 700; font-size: .85rem; opacity: .85; }
.lv-or::before, .lv-or::after { content: ""; flex: 1; height: 1px; background: rgba(255,255,255,.4); }
.lv-z { text-align: center; }
.lv-z .btn { box-shadow: 0 6px 0 rgba(0,0,0,.15); }
.lv-z small { display: block; max-width: 520px; margin: 8px auto 0; opacity: .92; }
/* Banner mới (2560×981) + thẻ “Lượt phát sóng tiếp theo” nằm trong vùng trời phía dưới */
.banner-wrap { position: relative; }
.banner { aspect-ratio: 2560 / 981; }
.banner-wrap .bc { position: absolute; z-index: 2; left: 27%; right: 3%; bottom: 6%; margin: 0; flex-wrap: nowrap; padding: 12px 18px; background: rgba(255, 255, 255, 0.82); border: 2px solid rgba(255, 255, 255, 0.95); box-shadow: 0 14px 34px -16px rgba(29, 78, 216, 0.55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.banner-wrap .bc.live { background: rgba(255, 240, 246, 0.9); border-color: #ff7aa5; }
.banner-wrap .bc-tx { min-width: 0; }
.banner-wrap .bc-cd { width: auto; margin-left: auto; }
.banner-wrap .bc-cd div { flex: none; }
@media (max-width: 1000px) { .banner-wrap .bc { left: 24%; right: 2.5%; bottom: 4%; padding: 8px 12px; gap: 10px; } .banner-wrap .bc-ic { display: none; } .banner-wrap .bc-tx b { font-size: 1.05rem; } .banner-wrap .bc-cd div { min-width: 48px; padding: 4px; } .banner-wrap .bc-cd b { font-size: 1.15rem; } }
@media (max-width: 700px) {
  .banner { aspect-ratio: 900 / 535; }
  .banner-wrap .bc { left: 3%; right: 3%; bottom: 4.5%; padding: 8px 10px; border-radius: 16px; }
  .banner-wrap .bc-tx small { font-size: 0.72rem; line-height: 1.2; display: block; }
  .banner-wrap .bc-tx b { font-size: 0.98rem; }
  .banner-wrap .bc-cd { gap: 5px; } .banner-wrap .bc-cd div { min-width: 42px; padding: 3px; border-radius: 10px; } .banner-wrap .bc-cd b { font-size: 1.05rem; } .banner-wrap .bc-cd small { font-size: 0.62rem; }
}
@media (max-width: 400px) {
  .banner-wrap .bc { padding: 6px 8px; gap: 6px; bottom: 4%; }
  .banner-wrap .bc-tx small, .banner-wrap .bc-tx b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .banner-wrap .bc-tx small { font-size: 0.64rem; }
  .banner-wrap .bc-tx b { font-size: 0.86rem; }
  .banner-wrap .bc-cd { gap: 4px; } .banner-wrap .bc-cd div { min-width: 36px; padding: 2px; } .banner-wrap .bc-cd b { font-size: 0.95rem; } .banner-wrap .bc-cd small { font-size: 0.58rem; }
}
/* Hàng trong banner: 3 thẻ số liệu (trái) + thẻ phát sóng (phải, gọn) */
.banner-row { position: absolute; z-index: 2; left: 3%; right: 3%; bottom: 6%; display: flex; gap: 12px; align-items: stretch; }
.banner-row .stats { display: flex; gap: 10px; flex: 1 1 auto; max-width: none; margin: 0; }
.banner-row .stats div { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 10px 8px; border: 0; border-radius: 18px; text-align: center; color: #fff; box-shadow: 0 12px 26px -12px var(--sh), inset 0 -4px 0 rgba(0, 0, 0, 0.14); }
.banner-row .stats .s1 { background: linear-gradient(140deg, #38bdf8, #2563eb); --sh: rgba(37, 99, 235, 0.8); }
.banner-row .stats .s2 { background: linear-gradient(140deg, #34d399, #059669); --sh: rgba(5, 150, 105, 0.8); }
.banner-row .stats .s3 { background: linear-gradient(140deg, #fb7185, #be185d); --sh: rgba(190, 24, 93, 0.8); }
.banner-row .stats b { color: #fff; font-size: clamp(1.25rem, 2.4vw, 1.75rem); line-height: 1.15; min-height: 0; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.15); }
.banner-row .stats small { display: block; color: rgba(255, 255, 255, 0.92); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.banner-wrap .banner-row .bc { position: static; flex: 0 0 auto; max-width: 400px; left: auto; right: auto; bottom: auto; padding: 10px 14px; gap: 10px; }
.banner-row .bc-ic { display: none; }
.banner-row .bc-tx { flex: 0 1 auto; }
.banner-row .bc-tx small { display: block; font-size: 0.74rem; line-height: 1.2; }
.banner-row .bc-tx b { font-size: 1.05rem; white-space: nowrap; }
.banner-row .bc-cd { margin-left: 0; gap: 5px; } .banner-row .bc-cd div { min-width: 46px; padding: 4px; } .banner-row .bc-cd b { font-size: 1.15rem; } .banner-row .bc-cd small { font-size: 0.64rem; }
@media (max-width: 1000px) and (min-width: 701px) { .banner-row { bottom: 4%; gap: 8px; } .banner-row .stats { gap: 6px; } .banner-row .stats div { padding: 6px 4px; border-radius: 14px; } .banner-row .stats small { font-size: 0.68rem; } .banner-row .bc-tx small { font-size: 0.66rem; } .banner-row .bc-tx b { font-size: 0.92rem; } .banner-row .bc-cd div { min-width: 38px; } }
@media (max-width: 700px) {
  .banner { aspect-ratio: 900 / 675; }
  .banner-row { flex-direction: column; left: 3%; right: 3%; bottom: 4%; gap: 8px; }
  .banner-row .stats { gap: 6px; }
  .banner-row .stats div { padding: 7px 4px; border-radius: 14px; }
  .banner-row .stats b { font-size: 1.2rem; }
  .banner-row .stats small { font-size: 0.68rem; }
  .banner-wrap .banner-row .bc { max-width: none; justify-content: space-between; padding: 8px 10px; }
}
@media (max-width: 400px) {
  .banner-row { gap: 5px; bottom: 3%; }
  .banner-row .stats { gap: 5px; }
  .banner-row .stats div { padding: 4px 2px; border-radius: 12px; }
  .banner-row .stats b { font-size: 1rem; }
  .banner-row .stats small { font-size: 0.6rem; }
  .banner-wrap .banner-row .bc { padding: 5px 8px; gap: 6px; }
  .banner-row .bc-tx small { font-size: 0.6rem; white-space: normal; overflow: visible; }
  .banner-row .bc-tx b { font-size: 0.82rem; white-space: nowrap; overflow: visible; }
  .banner-row .bc-cd { gap: 3px; } .banner-row .bc-cd div { min-width: 32px; padding: 1px 2px; border-radius: 8px; } .banner-row .bc-cd b { font-size: 0.9rem; } .banner-row .bc-cd small { font-size: 0.55rem; }
}
.banner { aspect-ratio: 1600 / 656; } @media (max-width: 700px) { .banner { aspect-ratio: 900 / 675; } }
/* Nút trên thanh đầu trang đồng bộ kiểu “Cài app” */
@media (min-width: 901px) {
  .nav .links { gap: 8px; margin-right: 4px; }
  .nav .links a { display: inline-flex; align-items: center; padding: 7px 16px; border-radius: 999px; background: rgba(255, 255, 255, 0.16); border: 2px solid rgba(255, 255, 255, 0.55); font-weight: 800; font-size: 0.92rem; line-height: 1.1; opacity: 1; transition: background 0.15s, transform 0.15s; }
  .nav .links a:hover { background: rgba(255, 255, 255, 0.3); text-decoration: none; }
  .nav .links a:active { transform: scale(0.96); }
  .nav #navInstall { padding: 7px 16px; line-height: 1.1; }
}
/* Đồng hồ đếm ngược kiểu bảng lật số */
.bc-cd .cd-d[hidden] { display: none !important; }
.banner-row .bc-cd { gap: 6px; perspective: 400px; }
.banner-row .bc-cd div { position: relative; min-width: 50px; padding: 5px 4px 4px; border-radius: 12px; background: linear-gradient(180deg, #3b4fd8 0 50%, #2e3fc0 50% 100%); box-shadow: 0 6px 14px -6px rgba(46, 63, 192, 0.8), inset 0 -3px 0 rgba(0, 0, 0, 0.18); overflow: hidden; }
.banner-row .bc-cd div::after { content: ""; position: absolute; left: 0; right: 0; top: 38%; height: 1px; background: rgba(0, 0, 0, 0.28); }
.banner-row .bc-cd b { color: #fff; font-size: 1.35rem; line-height: 1.15; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.2); display: block; transform-origin: 50% 40%; }
.banner-row .bc-cd small { color: rgba(255, 255, 255, 0.82); font-size: 0.62rem; display: block; }
.banner-row .bc-cd .cd-s { background: linear-gradient(180deg, #f43f5e 0 50%, #e11d48 50% 100%); box-shadow: 0 6px 14px -6px rgba(225, 29, 72, 0.8), inset 0 -3px 0 rgba(0, 0, 0, 0.18); }
.bc-cd b.flip { animation: cdFlip 0.45s ease-out; }
@keyframes cdFlip { 0% { transform: rotateX(-90deg); opacity: 0.2; } 60% { transform: rotateX(12deg); opacity: 1; } 100% { transform: rotateX(0); } }
.banner-wrap .bc.live .bc-cd div { background: linear-gradient(180deg, #f43f5e 0 50%, #e11d48 50% 100%); }
/* 3 thẻ số liệu hẹp lại một chút */
.banner-row { justify-content: space-between; }
.banner-row .stats { flex: 0 1 auto; width: 52%; }
.banner-row .stats div { max-width: 200px; }
@media (max-width: 1000px) and (min-width: 701px) { .banner-row .stats { width: 48%; } .banner-row .bc-cd div { min-width: 38px; } .banner-row .bc-cd b { font-size: 1.05rem; } }
@media (max-width: 700px) { .banner-row .stats { width: auto; } .banner-row .stats div { max-width: none; } .banner-row .bc-cd b { font-size: 1.15rem; } .banner-row .bc-cd div { min-width: 42px; } }
@media (max-width: 400px) { .banner-row .bc-cd { gap: 3px; } .banner-row .bc-cd div { min-width: 33px; padding: 2px; border-radius: 8px; } .banner-row .bc-cd b { font-size: 0.92rem; } .banner-row .bc-cd small { font-size: 0.52rem; } }
.foot { justify-content: center; }
/* Banner sân khấu trường quay (2560×1666) */
.banner { aspect-ratio: 1600 / 1041; position: relative; background: #0c1a40; }
.banner-wrap::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 34%; border-radius: 0 0 28px 28px; background: linear-gradient(180deg, rgba(12, 26, 64, 0) 0%, rgba(12, 26, 64, 0.55) 45%, rgba(12, 26, 64, 0.88) 100%); pointer-events: none; z-index: 1; }
.banner-wrap .banner-row { bottom: 4%; }
@media (max-width: 700px) {
  .banner { aspect-ratio: 900 / 916; }
  .banner-wrap::after { height: 30%; border-radius: 0 0 16px 16px; }
}
@media (max-width: 560px) { .banner-wrap::after { border-radius: 0 0 16px 16px; } }

/* =====================================================================
   BẢN ĐỘC LẬP: Thử thách hôm nay · Chơi tính Rubi trên web · Tài khoản
   ===================================================================== */
.snd { border: 0; background: rgba(255, 255, 255, 0.18); color: #fff; width: 38px; height: 38px; border-radius: 50%; font-size: 1.05rem; cursor: pointer; flex: none; }
.row.c { justify-content: center; }
.small-mut { color: var(--ink3); font-size: 0.86rem; margin: 6px 0; }
.spin.sm { width: 16px; height: 16px; border-width: 3px; display: inline-block; vertical-align: -3px; }

/* đồng hồ đếm giây trên thanh thời gian */
.q-timer { position: relative; height: 12px; }
.q-timer em { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font: 900 0.7rem/1 var(--sans); color: #fff; font-style: normal; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }
.q-timer em.hot { color: #fff; animation: pulse 0.5s infinite alternate; }
@keyframes pulse { to { transform: translateY(-50%) scale(1.35); } }
.opt.picked:not(.right) { outline: 3px solid rgba(255, 79, 139, 0.35); }
.opt.right { animation: pop 0.35s both; }
.opt.wrong { animation: shake 0.35s both; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

/* thanh tiến độ 5 câu */
.dy-prog { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; }
.dy-prog i { width: 28px; height: 10px; border-radius: 6px; background: #eef2f8; }
.dy-prog i.cur { background: linear-gradient(90deg, var(--sky), var(--violet)); animation: pulse2 1s infinite alternate; }
.dy-prog i.ok, .dy-prog i.done { background: var(--mint); }
.dy-prog i.no { background: var(--pink); }
.dy-prog span { margin-left: auto; font-weight: 800; color: var(--ink2); font-size: 0.88rem; }
@keyframes pulse2 { to { opacity: 0.55; } }

/* 🎯 Thử thách hôm nay */
.block.daily { background: linear-gradient(160deg, #fff7e6, #fff 40%, #f0f7ff); border-color: #ffd98a; }
.dy-intro { text-align: center; padding: 6px 0; }
.dy-no { display: inline-flex; flex-direction: column; align-items: center; font: 900 2.6rem/1 var(--display); color: #243b7a; background: #fff; border: 3px solid #ffd23d; border-radius: 22px; padding: 10px 22px; box-shadow: var(--shadow); }
.dy-no small { font: 800 0.85rem var(--sans); color: var(--orange); margin-top: 4px; }
.dy-dots { display: flex; justify-content: center; gap: 8px; margin: 16px 0 8px; font-size: 1.6rem; }
.dy-dots span { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 16px; background: #fff; border: 2px solid var(--line); }
.dy-intro p { color: var(--ink2); margin: 8px 0; }
.dy-bonus { font-weight: 800; color: #b45309; }
.dy-bonus.muted { color: var(--ink3); font-weight: 700; }
.dy-intro .btn { margin-top: 8px; min-width: 220px; }
.dy-res { text-align: center; }
.dy-score { display: flex; flex-direction: column; align-items: center; }
.dy-score b { font: 900 4rem/1 var(--display); background: linear-gradient(135deg, var(--orange), var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dy-score b small { font-size: 1.8rem; }
.dy-score span { font-weight: 800; font-size: 1.15rem; margin-top: 4px; }
.dy-grid { display: flex; justify-content: center; gap: 8px; margin: 14px 0 6px; }
.dy-grid i { width: 40px; height: 40px; border-radius: 10px; background: var(--mint); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.12); animation: pop 0.3s both; }
.dy-grid i.no { background: var(--pink); }
.dy-grid i:nth-child(2) { animation-delay: 0.08s; } .dy-grid i:nth-child(3) { animation-delay: 0.16s; } .dy-grid i:nth-child(4) { animation-delay: 0.24s; } .dy-grid i:nth-child(5) { animation-delay: 0.32s; }
.dy-meta { color: var(--ink2); margin: 6px 0 12px; }
.dy-res .row { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 18px; }
.dy-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; text-align: left; }
.dy-cols h4 { margin: 0 0 8px; font-size: 0.98rem; }
.dist div { display: grid; grid-template-columns: 16px 1fr 34px; align-items: center; gap: 8px; margin: 4px 0; font-weight: 800; font-size: 0.85rem; color: var(--ink2); }
.dist i { display: block; height: 18px; border-radius: 6px; background: #dbe8f8; }
.dist div.mine { color: var(--ink); }
.dist div.mine i { background: linear-gradient(90deg, var(--orange), var(--pink)); }
.dist em { font-style: normal; text-align: right; }
.dy-top { margin: 0; padding: 0; list-style: none; counter-reset: t; }
.dy-top li { counter-increment: t; display: grid; grid-template-columns: 22px 1fr auto; grid-template-areas: "n b s" "n m s"; column-gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 0.88rem; }
.dy-top li::before { content: counter(t); grid-area: n; font-weight: 900; color: var(--orange); }
.dy-top li b { grid-area: b; } .dy-top li small { grid-area: m; color: var(--ink3); } .dy-top li span { grid-area: s; align-self: center; font-weight: 800; color: var(--ink2); }
.dy-top li.empty { display: block; color: var(--ink3); }
.dy-top li.empty::before { content: none; }
.dy-review { text-align: left; margin-top: 16px; background: #f7f9fd; border-radius: 16px; padding: 10px 14px; }
.dy-review summary { cursor: pointer; font-weight: 800; color: #243b7a; }
.rv { padding: 10px 0; border-top: 1px dashed var(--line); }
.rv p { margin: 4px 0; color: #15803d; font-weight: 700; } .rv.no p { color: #be123c; }
.rv small { color: var(--ink2); }
.dy-next { color: var(--ink2); font-size: 0.9rem; margin: 14px 0 0; }
.dy-next a { color: var(--orange); font-weight: 800; }

/* 🎮 Chơi tính Rubi */
#play { position: relative; margin-bottom: 26px; }
.pl-me { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: #f7f9fd; border: 2px solid var(--line); }
.pl-me > span { font-size: 1.8rem; }
.pl-me b { display: block; } .pl-me small { color: var(--ink2); } .pl-me a { color: var(--orange); font-weight: 800; }
.pl-me.guest { background: #fff7e6; border-color: #ffd98a; }
.pl-lab { font-weight: 800; color: var(--ink2); margin: 16px 0 8px; font-size: 0.9rem; }
.pl-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.pl-cats button { padding: 8px 12px; border-radius: 999px; background: #fff; border: 2px solid var(--line); font: 700 0.88rem var(--sans); color: var(--ink2); cursor: pointer; }
.pl-cats button.on { background: #243b7a; border-color: #243b7a; color: #fff; }
.pl-go { display: flex; width: 100%; margin-top: 18px; }
.pl-note { text-align: center; color: var(--ink3); font-size: 0.82rem; margin: 10px 0 0; }
.pl-notes { margin: 0 0 10px; padding-left: 18px; color: #15803d; font-weight: 700; }
.pl-up { margin: 4px 0; font-weight: 800; color: #7c3aed; }
.pl-total { margin-left: auto; align-self: center; color: var(--ink2); }
.pl-end { text-align: center; }
.pl-big { font: 900 2.4rem/1.1 var(--display); color: #15803d; margin: 10px 0 4px; }
.pl-big.neg { color: #be123c; }
.pl-end .row { display: flex; gap: 10px; flex-wrap: wrap; }
.dy-prog.pl .pl-sum { color: #15803d; }
.pts-float { position: absolute; left: 50%; top: 38%; margin-left: -50px; width: 100px; text-align: center; font: 900 1.8rem var(--display); color: #15803d; pointer-events: none; animation: floatUp 1.3s ease-out both; }
.pts-float.neg { color: #be123c; }
@keyframes floatUp { from { opacity: 0; transform: translateY(20px) scale(0.8); } 20% { opacity: 1; transform: translateY(0) scale(1.15); } to { opacity: 0; transform: translateY(-50px) scale(1); } }
#choi .how { margin-top: 0; }
.gift.can { border-color: var(--mint); box-shadow: 0 0 0 3px rgba(34, 197, 139, 0.18), var(--shadow); }

/* 🔐 Đăng nhập & tài khoản (sheet) */
.sheet-box { max-height: calc(100vh - 24px); overflow-y: auto; }
.lg-sub { color: var(--ink2); margin: 0 0 12px; }
.lg-code { display: flex; flex-direction: column; align-items: center; width: 100%; margin: 0 0 12px; padding: 14px; border-radius: 18px; border: 3px dashed #ffb13d; background: #fff8e7; font: 900 2rem/1.1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: 0.12em; color: #b45309; cursor: pointer; }
.lg-code small { font: 700 0.78rem var(--sans); letter-spacing: 0; color: var(--ink3); margin-top: 4px; }
.lg-wait { text-align: center; color: var(--ink2); font-size: 0.9rem; margin: 12px 0 4px; }
.lg-qr { display: none; text-align: center; margin-top: 10px; }
.lg-qr svg { width: 150px; height: 150px; }
.lg-qr small { display: block; color: var(--ink3); }
@media (min-width: 760px) { .lg-qr { display: block; } }
.acc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; padding-right: 36px; }
.acc-head h3 { margin: 0; }
.acc-head small { color: var(--ink2); }
.acc-av { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: linear-gradient(135deg, var(--orange), var(--pink)); color: #fff; font: 900 1.4rem var(--display); flex: none; }
.acc-av img { width: 100%; height: 100%; object-fit: cover; }
.acc-kpi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.acc-kpi div { text-align: center; padding: 10px 4px; border-radius: 14px; background: #f7f9fd; }
.acc-kpi b { display: block; font: 900 1.25rem var(--display); color: #243b7a; }
.acc-kpi small { color: var(--ink3); font-size: 0.75rem; font-weight: 700; }
.acc-lv { height: 10px; border-radius: 6px; background: #eef2f8; overflow: hidden; }
.acc-lv i { display: block; height: 100%; background: linear-gradient(90deg, var(--mint), var(--sky)); }
.acc-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; border: 2px solid var(--line); margin-top: 10px; }
.acc-row span { color: var(--ink2); font-size: 0.88rem; white-space: nowrap; }
.acc-row b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.92rem; }
.acc-row.warn { border-color: #bfdbfe; background: #eff6ff; }
.acc-act { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.sc-in { width: 100%; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line); font: 600 1rem var(--sans); }
.sc-in:focus { outline: none; border-color: var(--sky); }
.sc-list { margin-top: 10px; max-height: 50vh; overflow-y: auto; }
.sc-list button { display: block; width: 100%; text-align: left; padding: 10px 12px; margin-bottom: 6px; border-radius: 12px; border: 2px solid var(--line); background: #fff; cursor: pointer; font: inherit; }
.sc-list button:hover { border-color: var(--sky); background: #eef8ff; }
.sc-list small { display: block; color: var(--ink3); }
.hist { list-style: none; margin: 10px 0 0; padding: 0; max-height: 55vh; overflow-y: auto; }
.hist li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.hist .hi { font-size: 1.3rem; } .hist .ht { flex: 1; min-width: 0; } .hist .ht b { display: block; font-size: 0.86rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .hist .ht small { color: var(--ink3); }
.hist .hp { font-weight: 900; color: var(--ink3); white-space: nowrap; } .hist li.up .hp { color: #15803d; } .hist li.down .hp { color: #be123c; }
.hist li.empty { display: block; color: var(--ink3); text-align: center; }
@media (max-width: 640px) {
  .dy-cols { grid-template-columns: 1fr; }
  .dy-dots span { width: 42px; height: 42px; font-size: 1.35rem; }
  .dy-grid i { width: 36px; height: 36px; }
  .dy-prog i { width: 22px; }
  .snd { width: 34px; height: 34px; }
}

.nav .brand { min-width: 0; flex: 1 1 auto; overflow: hidden; }
.nav .brand-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-meta .pl-gain { white-space: nowrap; }
.q-meta .pl-gain b { color: #15803d; }
.q-meta > span:first-child { min-width: 0; }
@media (max-width: 420px) { .nav .brand-t span { display: none; } }
