/* RUBI 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: 46px; height: 46px; flex: none; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35)); }
.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: 40px; height: 40px; }
  .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; }
.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; } }

/* 👤 Đối tượng */
.aud-list { display: grid; gap: 10px; margin-top: 6px; }
.aud-list.inline { grid-template-columns: repeat(2, 1fr); max-width: 520px; margin: 14px auto 0; }
.aud { display: grid; grid-template-columns: 48px 1fr; grid-template-areas: "i b" "i s"; align-items: center; column-gap: 12px; text-align: left; padding: 12px 14px; border-radius: 18px; border: 2px solid var(--line); background: #fff; cursor: pointer; font: inherit; color: var(--ink); transition: border-color 0.15s, transform 0.15s; }
.aud:hover { border-color: var(--sky); transform: translateY(-2px); }
.aud.on { border-color: var(--orange); background: #fff7e6; }
.aud span { grid-area: i; font-size: 2rem; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: #f3f6fc; }
.aud b { grid-area: b; font-size: 1rem; }
.aud small { grid-area: s; color: var(--ink3); font-size: 0.8rem; line-height: 1.35; }
.aud-list.inline .aud { grid-template-columns: 1fr; grid-template-areas: "i" "b"; justify-items: center; text-align: center; row-gap: 6px; }
.aud-chip { display: inline-flex; align-items: center; gap: 6px; margin: 10px 0 0; padding: 6px 12px; border-radius: 999px; border: 2px solid var(--line); background: #fff; font: 700 0.85rem var(--sans); color: var(--ink2); cursor: pointer; }
.aud-chip u { color: var(--orange); text-decoration: none; font-weight: 800; }
.aud-chip.need { border-color: #fdba74; background: #fff7ed; color: #c2410c; }
.aud-seg { flex-wrap: wrap; margin-top: -12px; }
.aud-seg button { padding: 6px 12px; font-size: 0.82rem; }
.aud-seg button.on { background: #243b7a; color: #fff; }
@media (max-width: 420px) { .aud-list.inline { grid-template-columns: 1fr 1fr; } .aud-list.inline .aud b { font-size: 0.85rem; } }
.lg-alt { display: grid; gap: 10px; margin-top: 14px; padding: 14px; border-radius: 16px; background: #f7f9fd; }
.lg-alt b { color: var(--ink2); font-size: 0.92rem; }

/* 🔐 Hộp đăng nhập: gọn, không cuộn; máy tính 2 cột (mã | QR), điện thoại 1 cột (ẩn QR) */
.sheet-box.wide { width: min(720px, 100%); padding: 26px 28px 24px; }
.lg { display: grid; grid-template-columns: 1fr; gap: 22px; align-items: center; }
.lg-main { min-width: 0; }
.lg-main h3 { padding-right: 40px; }
.lg-code { margin-bottom: 12px; padding: 12px; font-size: 1.85rem; }
.lg-go { display: flex; width: 100%; padding: 13px 18px; }
.lg-oauth { display: block; margin-top: 10px; text-align: center; color: var(--ink2); font-weight: 700; font-size: 0.88rem; text-decoration: none; }
.lg-oauth:hover { color: var(--zalo); text-decoration: underline; }
.lg-wait { margin: 12px 0 0; font-size: 0.85rem; }
.lg-qr { display: none; text-align: center; }
.lg-qr-img { width: 168px; margin: 0 auto; padding: 8px; border-radius: 16px; border: 2px solid var(--line); background: #fff; }
.lg-qr small { display: block; margin-top: 8px; color: var(--ink3); font-size: 0.78rem; line-height: 1.4; }
@media (min-width: 760px) {
  .lg { grid-template-columns: 1fr 196px; }
  .lg-qr { display: block; padding-left: 22px; border-left: 2px dashed var(--line); }
}

/* 💾 Lưu kết quả qua Zalo (sau lượt chơi web & Thử thách hôm nay) */
.sv { display: grid; gap: 16px; margin: 14px auto; max-width: 640px; padding: 16px 18px; border-radius: 22px; border: 2px solid #ffd98a; background: linear-gradient(180deg, #fffaf0, #fff); text-align: left; box-shadow: 0 6px 20px rgba(245, 158, 11, 0.12); }
.sv h4 { margin: 0 0 4px; font: 900 1.1rem var(--display); color: #92400e; }
.sv p { margin: 0 0 12px; color: var(--ink2); font-size: 0.92rem; line-height: 1.45; }
.sv .lg-wait { margin: 10px 0 0; }
.sv-qr { display: none; text-align: center; }
.sv-qr .lg-qr-img { width: 150px; }
.sv-qr small { display: block; margin-top: 8px; color: var(--ink3); font-size: 0.76rem; line-height: 1.4; }
@media (min-width: 760px) {
  .sv { grid-template-columns: 1fr auto; align-items: center; }
  .sv-qr { display: block; padding-left: 18px; border-left: 2px dashed var(--line); max-width: 190px; }
}
.sv.done { display: flex; flex-direction: column; align-items: center; gap: 2px; border-color: #86efac; background: #f0fdf4; text-align: center; box-shadow: none; }
.sv.done b { color: #15803d; font: 900 1.15rem var(--display); }
.sv.done span { color: var(--ink2); font-weight: 700; }
.pl-big small { font: 700 0.9rem var(--sans); color: var(--ink3); }
.pl-total small { color: var(--ink3); }

/* 📲 3 bước gửi mã vào Zalo */
.sd-steps { display: flex; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; counter-reset: sd; }
.sd-steps li { flex: 1; display: flex; align-items: center; gap: 6px; padding: 7px 9px; border-radius: 12px; background: #eef4ff; color: #1e3a8a; font-size: 0.78rem; line-height: 1.3; counter-increment: sd; }
.sd-steps li::before { content: counter(sd); flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #2563eb; color: #fff; font: 800 0.72rem var(--sans); }
.sd-alt { display: block; margin-top: 8px; text-align: center; font-size: 0.82rem; font-weight: 700; color: var(--ink3); }
@media (max-width: 420px) { .sd-steps li { font-size: 0.74rem; padding: 6px 7px; } }

/* ⚖️ Căn giữa các nút hành động trong khung chơi (Bắt đầu, Câu tiếp, Xem kết quả, Tổng kết…) */
.dy-intro .btn { display: flex; width: fit-content; min-width: 240px; margin: 14px auto 0; }
.q-res { text-align: center; }
.q-res .row, .dy-res .row, .pl-end .row { justify-content: center; align-items: center; }
.q-res .row .btn { min-width: 200px; }
.q-res .row .pl-total { flex-basis: 100%; margin: 4px 0 0; text-align: center; }

/* 🎮 Chơi tính Rubi – giao diện gọn: chủ đề dạng danh sách thả xuống */
.pl-home { max-width: 520px; margin: 0 auto; }
.pl-pick { display: grid; grid-template-columns: 1fr auto; gap: 12px; margin-top: 4px; }
.pl-sel { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pl-sel > span { font-weight: 800; color: var(--ink2); font-size: 0.85rem; }
.pl-sel select { width: 100%; height: 50px; padding: 0 42px 0 16px; border-radius: 16px; border: 2px solid var(--line); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23243b7a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 16px center; -webkit-appearance: none; appearance: none; font: 700 1rem var(--sans); color: var(--ink); cursor: pointer; text-overflow: ellipsis; }
.pl-sel select:focus { outline: none; border-color: #243b7a; box-shadow: 0 0 0 4px rgba(36, 59, 122, 0.12); }
.pl-sel .aud-chip { margin: 0; height: 50px; padding: 0 16px; border-radius: 16px; white-space: nowrap; }
.pl-home .pl-me { margin-bottom: 14px; }
#choi .pl-go { margin-top: 18px; }
.zalo-how { margin-top: 18px; }
.zalo-how > summary { list-style: none; cursor: pointer; text-align: center; color: var(--ink2); font-weight: 700; padding: 10px; }
.zalo-how > summary::-webkit-details-marker { display: none; }
.zalo-how > summary u { color: var(--zalo); text-decoration: none; font-weight: 800; }
.zalo-how[open] > summary { margin-bottom: 8px; }
@media (max-width: 480px) {
  .pl-pick { grid-template-columns: 1fr; }
  .pl-sel .aud-chip { width: 100%; justify-content: center; }
}
/* Sửa lỗi: class .lg (hộp đăng nhập) trùng với nút lớn .btn.lg → nút bị chia lưới 2 cột, chữ lệch trái */
.btn.lg { display: inline-flex; grid-template-columns: none; }
.btn.lg.pl-go, .btn.lg.lg-go, .dy-intro .btn.lg { display: flex; }
#play.quiz { min-height: 0; }

/* 📏 Khung kết quả câu trả lời – gọn, thấp: chữ bên trái, nút bên phải */
.q-res { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "h r" "p r"; align-items: center; column-gap: 18px; padding: 12px 16px; margin-top: 12px; text-align: left; border-radius: 16px; }
.q-res h3 { grid-area: h; margin: 0; font-size: 1.05rem; }
.q-res p { grid-area: p; margin: 2px 0 0; font-size: 0.9rem; line-height: 1.4; }
.q-res p:empty { display: none; }
.q-res .row { grid-area: r; flex-direction: column; flex-wrap: nowrap; gap: 4px; }
.q-res .row .btn { min-width: 0; padding: 10px 22px; }
.q-res .row .pl-total { flex-basis: auto; margin: 0; font-size: 0.8rem; white-space: nowrap; }
@media (max-width: 560px) {
  .q-res { grid-template-columns: 1fr; grid-template-areas: "h" "p" "r"; }
  .q-res .row { flex-direction: row; justify-content: space-between; margin-top: 8px; }
  .q-res .row .btn { flex: 1; }
}

/* 📱 Điện thoại: khung câu hỏi gọn, thấp – thấy được kết quả + nút “Câu tiếp” không phải cuộn */
.q-out, .q-res { scroll-margin-bottom: 96px; }
@media (max-width: 560px) {
  .block { padding: 16px 10px 14px; }
  .block .head { margin-bottom: 10px; }
  .block .head h2 { font-size: 1.35rem; padding-bottom: 4px; }
  .block .head .sub { margin: 6px 0 0; font-size: 0.88rem; }
  .quiz { padding: 12px; border-radius: 20px; }
  .dy-prog { margin-bottom: 8px; }
  .dy-prog i { height: 8px; }
  .q-meta { margin-bottom: 6px; font-size: 0.82rem; }
  .q-timer { height: 10px; margin-bottom: 10px; }
  .q-text { font-size: 1.08rem; margin: 0 0 10px; line-height: 1.3; }
  .opts { gap: 8px; }
  .opts.short { grid-template-columns: 1fr 1fr; }
  .opt { gap: 10px; padding: 8px 10px; border-radius: 14px; font-size: 0.95rem; min-height: 48px; }
  .opt .l { width: 30px; height: 30px; border-radius: 10px; font-size: 0.9rem; }
  .q-res { margin-top: 10px; padding: 10px 12px; border-radius: 14px; }
  .q-res h3 { font-size: 0.98rem; }
  .q-res p { font-size: 0.86rem; }
  .q-res .row { margin-top: 6px; }
  .q-res .row .btn { padding: 9px 16px; }
}
.sd-pc { margin: 8px 0 0; padding: 8px 12px; border-radius: 12px; background: #eef5ff; color: #1e3a8a; font-size: 0.82rem; line-height: 1.4; }
/* Chưa có phòng thi mở → nút “Nhắn JOIN” mờ đi (bấm vẫn hiện thông báo) */
.lv-z.off .btn { opacity: 0.55; filter: grayscale(0.4); box-shadow: none; }

/* =====================================================================
   🛍️ CỬA HÀNG RUBI
   ===================================================================== */
.sheet-box { max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain; }
.center { text-align: center; }
.block.shop { background: linear-gradient(160deg, #f5f0ff, #fff 45%, #fff7ed); border-color: #ddd0ff; }
.sh-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; max-width: 820px; margin: 0 auto 14px; padding: 12px 16px; border-radius: 20px; background: #fff; border: 2px solid var(--line); }
.sh-bal small { display: block; color: var(--ink3); font-weight: 700; font-size: 0.78rem; }
.sh-bal b { font: 900 1.7rem/1 var(--display); color: #7c3aed; }
.sh-me { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); min-width: 0; }
.sh-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 820px; margin: 0 auto; }
.sh-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 16px; border-radius: 20px; background: #fff; border: 2px solid var(--line); cursor: pointer; font: inherit; color: var(--ink); transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s; min-height: 132px; }
.sh-card:hover { transform: translateY(-3px); border-color: var(--c, #c4b5fd); box-shadow: 0 14px 28px -18px var(--c, #7c3aed); }
.sh-card .ic { font-size: 1.9rem; line-height: 1; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; background: var(--bg, #f5f3ff); margin-bottom: 4px; }
.sh-card b { font-size: 1.02rem; }
.sh-card small { color: var(--ink2); font-size: 0.84rem; line-height: 1.35; }
.sh-card em { font-style: normal; margin-top: auto; padding-top: 6px; font-size: 0.8rem; font-weight: 800; color: var(--c, #7c3aed); }
.c-spin { --c: #f97316; --bg: #fff1e6; } .c-duel { --c: #e11d48; --bg: #ffe4ea; } .c-help { --c: #0284c7; --bg: #e0f2fe; }
.c-deco { --c: #7c3aed; --bg: #f3e8ff; } .c-gift { --c: #db2777; --bg: #fce7f3; } .c-school { --c: #059669; --bg: #dcfce7; }
.c-spin .ic { animation: wob 2.6s ease-in-out infinite; }
@keyframes wob { 0%, 80%, 100% { transform: rotate(0); } 85% { transform: rotate(-12deg); } 90% { transform: rotate(10deg); } 95% { transform: rotate(-5deg); } }
.sh-grid.guest { opacity: 0.75; }
.sh-guest { max-width: 520px; margin: 16px auto 0; text-align: center; }
.sh-guest p { color: var(--ink2); margin: 0 0 10px; }
.sh-sbal { margin: -4px 0 12px; color: var(--ink2); font-size: 0.92rem; }
.sh-sbal b { color: #7c3aed; font-family: var(--display); font-size: 1.1rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 12px; }
.chips button { padding: 8px 14px; border-radius: 999px; background: #fff; border: 2px solid var(--line); font: 800 0.9rem var(--sans); color: var(--ink2); cursor: pointer; }
.chips button.on { background: #243b7a; border-color: #243b7a; color: #fff; }
.gf-lb { display: block; font-weight: 800; color: var(--ink2); font-size: 0.85rem; margin-top: 6px; }
.wh-go { display: flex; width: 100%; margin-top: 12px; }
.acc-shop { display: flex; width: 100%; margin: 12px 0 0; white-space: normal; text-align: center; }

/* Vòng quay */
.wh { position: relative; width: min(300px, 78vw); aspect-ratio: 1; margin: 6px auto 8px; }
.wh-rot { width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 0 0 8px #243b7a, 0 0 0 12px #ffd23d, 0 18px 40px -12px rgba(36, 59, 122, 0.6); will-change: transform; }
.wh-svg { width: 100%; height: 100%; display: block; font-family: var(--sans); }
.wh-pin { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); z-index: 2; font-size: 2rem; color: #e11d48; text-shadow: 0 2px 0 #fff, 0 4px 8px rgba(0, 0, 0, 0.3); line-height: 1; }
.wh-jack { text-align: center; color: var(--ink2); font-size: 0.9rem; margin: 18px 0 4px; }
.wh-jack b { color: #b45309; }
.wh-res { min-height: 1.6em; text-align: center; font-size: 1.1rem; margin-top: 6px; }
.wh-res b.win { color: #15803d; animation: pop 0.4s both; display: inline-block; }

/* Quyền trợ giúp: thanh dưới câu hỏi + danh sách mua */
.hp-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; transition: opacity 0.2s; }
.hp-bar.off { opacity: 0.35; pointer-events: none; }
.hp { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 4px; border-radius: 14px; background: #f5f3ff; border: 2px solid #ddd6fe; cursor: pointer; font: inherit; color: #4c1d95; }
.hp i { font-style: normal; font-size: 1.2rem; line-height: 1.1; }
.hp span { font-weight: 800; font-size: 0.78rem; }
.hp em { font-style: normal; font-size: 0.72rem; color: #7c3aed; font-weight: 700; }
.hp:hover:not(:disabled) { background: #ede9fe; transform: translateY(-1px); }
.hp.used, .hp:disabled { opacity: 0.4; cursor: default; }
.opt.cut { opacity: 0.25; transform: scale(0.97); }
.hp-list { display: grid; gap: 10px; }
.hp-row { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "i t q" "b b b"; gap: 4px 12px; align-items: center; padding: 12px; border-radius: 16px; border: 2px solid var(--line); }
.hp-ic { grid-area: i; font-size: 1.6rem; }
.hp-row > div:first-of-type { grid-area: t; } .hp-row b { display: block; } .hp-row small { color: var(--ink2); }
.hp-qty { grid-area: q; font: 900 1.1rem var(--display); color: #7c3aed; }
.hp-buy { grid-area: b; display: flex; gap: 8px; justify-content: flex-end; }

/* Trang trí: khung ảnh, biểu tượng, danh hiệu */
.dc-av { position: relative; flex: none; width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; font: 900 1.05rem var(--display); color: #fff; background: linear-gradient(135deg, var(--orange), var(--pink)); border: 3px solid #fff; }
.dc-av.sm { width: 34px; height: 34px; font-size: 0.9rem; }
.dc-av.big { width: 64px; height: 64px; font-size: 1.6rem; }
.fr-vang { border-color: #fbbf24 !important; box-shadow: 0 0 0 3px #fde68a, 0 0 12px #fbbf24; }
.fr-bang { border-color: #7dd3fc !important; box-shadow: 0 0 0 3px #e0f2fe, 0 0 14px #38bdf8; }
.fr-lua { border-color: #f97316 !important; box-shadow: 0 0 0 3px #fed7aa, 0 0 16px #ef4444; animation: flick 1.4s ease-in-out infinite alternate; }
.fr-cauvong { border-color: transparent !important; background: linear-gradient(135deg, var(--orange), var(--pink)) padding-box, conic-gradient(#ef4444, #f59e0b, #22c55e, #3b82f6, #a855f7, #ef4444) border-box !important; box-shadow: 0 0 12px rgba(168, 85, 247, 0.5); }
.fr-kimcuong { border-color: #a5f3fc !important; box-shadow: 0 0 0 3px #fff, 0 0 0 5px #67e8f9, 0 0 18px #22d3ee, 0 0 30px #a78bfa; }
@keyframes flick { from { box-shadow: 0 0 0 3px #fed7aa, 0 0 10px #ef4444; } to { box-shadow: 0 0 0 3px #fdba74, 0 0 22px #f97316; } }
.dc-ic { font-style: normal; }
.dc-tt { display: inline-block; padding: 1px 8px; border-radius: 999px; background: linear-gradient(90deg, #fef3c7, #fde68a); color: #92400e; font-size: 0.72rem; font-weight: 800; vertical-align: 2px; white-space: nowrap; }
.dc-prev { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 18px; background: linear-gradient(135deg, #f5f3ff, #fff7ed); margin-bottom: 6px; }
.dc-prev b { display: block; font-size: 1.05rem; } .dc-prev small { color: var(--ink3); }
.dc-gt { font-weight: 800; color: var(--ink2); margin: 14px 0 8px; font-size: 0.9rem; }
.dc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 8px; }
.dc-it { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px 10px; border-radius: 16px; background: #fff; border: 2px solid var(--line); cursor: pointer; font: inherit; color: var(--ink); text-align: center; }
.dc-it:hover { border-color: #c4b5fd; }
.dc-it small { font-weight: 700; font-size: 0.78rem; color: var(--ink2); }
.dc-it em { font-style: normal; font-weight: 800; font-size: 0.8rem; color: #7c3aed; }
.dc-it.own em { color: #0369a1; }
.dc-it.on { border-color: #22c58b; background: #effcf5; } .dc-it.on em { color: #15803d; }
.dc-big { font-size: 1.9rem; line-height: 40px; }
.dc-it .dc-tt { min-height: 40px; display: grid; place-items: center; white-space: normal; border-radius: 12px; font-size: 0.76rem; }
.pd .av.fr-vang, .pd .av.fr-bang, .pd .av.fr-lua, .pd .av.fr-cauvong, .pd .av.fr-kimcuong { border-width: 4px; }
.pd .av.fr-cauvong { background: var(--pc) padding-box, conic-gradient(#ef4444, #f59e0b, #22c55e, #3b82f6, #a855f7, #ef4444) border-box !important; }

/* Tặng Rubi · góp trường */
.gf-my { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.gf-my > span { font-weight: 800; color: var(--ink2); font-size: 0.85rem; }
.gf-code { padding: 10px; border-radius: 16px; border: 2px dashed #f9a8d4; background: #fdf2f8; font: 900 1.6rem/1.1 ui-monospace, Menlo, monospace; letter-spacing: 0.18em; color: #be185d; cursor: pointer; }
.gf-code small { display: block; font: 700 0.75rem var(--sans); letter-spacing: 0; color: var(--ink3); margin-top: 2px; }
.gf-in-code { text-transform: uppercase; letter-spacing: 0.15em; font-weight: 800; }
.gf-who { min-height: 1.3em; margin: 6px 0; color: var(--ink2); font-size: 0.9rem; }
.gf-in { text-align: center; padding: 6px 0; }
.gf-in p { margin: 6px 0; color: var(--ink2); }
.gf-in .btn { margin-top: 12px; min-width: 200px; }
.gf-box { font-size: 4rem; animation: pop 0.5s both; }
.sc-fund { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 16px; background: #ecfdf5; border: 2px solid #a7f3d0; margin-bottom: 8px; }
.sc-fund span { color: #047857; font-size: 0.9rem; }

/* Thách đấu */
.du-list { display: grid; gap: 8px; }
.du-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: #f8fafc; border: 2px solid var(--line); cursor: pointer; font: inherit; color: var(--ink); text-align: left; }
.du-cat { font-size: 1.4rem; }
.du-tx { flex: 1; min-width: 0; } .du-tx b { display: block; } .du-tx small { color: var(--ink3); }
.du-row em { font-style: normal; font-weight: 800; font-size: 0.82rem; color: var(--ink2); white-space: nowrap; }
.du-row em.go { color: #e11d48; } .du-row em.w { color: #15803d; } .du-row em.l { color: var(--ink3); }
.du-vs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin: 10px 0; }
.du-side { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border-radius: 18px; background: #f8fafc; border: 2px solid var(--line); text-align: center; min-width: 0; }
.du-side.me { border-color: #fdba74; background: #fff7ed; }
.du-side.empty { border-style: dashed; color: var(--ink3); }
.du-side b { font-size: 0.92rem; overflow-wrap: anywhere; } .du-side small { color: var(--ink3); font-size: 0.8rem; }
.du-x { font: 900 1.3rem var(--display); color: #e11d48; }
.du-res { text-align: center; font: 900 1.15rem var(--display); margin: 6px 0; }
.du-res.me { color: #15803d; } .du-res.them { color: var(--ink2); } .du-res.hoa { color: #0369a1; }
.du-act { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.du-act .btn { width: 100%; }
.du-play .q-timer { margin-bottom: 12px; }

@media (max-width: 720px) {
  .sh-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .sh-card { padding: 12px; min-height: 120px; }
  .sh-card .ic { width: 44px; height: 44px; font-size: 1.6rem; }
  .sh-card b { font-size: 0.95rem; }
  .sh-card small { font-size: 0.78rem; }
}
@media (max-width: 420px) {
  .hp span { font-size: 0.7rem; }
  .hp-buy .btn { flex: 1; }
  .sh-bal b { font-size: 1.45rem; }
}
@media (prefers-reduced-motion: reduce) {
  .c-spin .ic, .fr-lua { animation: none; }
}
.du-play .dy-prog { margin-right: 46px; }
.du-play .dy-prog span { white-space: nowrap; }
@media (max-width: 720px) {
  .sh-card { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "i b" "s s" "e e"; column-gap: 8px; row-gap: 2px; align-items: center; min-height: 0; padding: 10px; border-radius: 16px; }
  .sh-card .ic { grid-area: i; width: 36px; height: 36px; font-size: 1.3rem; border-radius: 12px; margin: 0; }
  .sh-card b { grid-area: b; font-size: 0.88rem; line-height: 1.2; }
  .sh-card small { grid-area: s; font-size: 0.74rem; margin-top: 4px; }
  .sh-card em { grid-area: e; font-size: 0.74rem; padding-top: 4px; }
  .sh-top { padding: 10px 12px; margin-bottom: 10px; }
}

/* 📱 Điện thoại: tên “RUBI TRI THỨC” hiện đủ (2 dòng), banner thấp còn 1/2 (cắt bớt phần dưới) */
@media (max-width: 560px) {
  .nav .brand-t { font-size: clamp(0.8rem, 4.1vw, 1rem); line-height: 1.08; letter-spacing: 0.03em; white-space: normal; overflow: visible; text-overflow: clip; }
  .nav .brand-t span { display: block; }
}
@media (max-width: 700px) {
  .banner { aspect-ratio: 900 / 268; }
  .banner img { object-position: 50% 29%; } /* giữ nửa trên của khung hình đang thấy */
  .banner-row { position: static; margin-top: 8px; }
  .banner-row .stats div { padding: 8px 6px; border-radius: 14px; }
}
@media (max-width: 700px) {
  .banner-row { flex-direction: column; gap: 8px; }
  .banner-wrap .bc { position: static; background: #fff; border: 2px solid var(--line); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
/* Gọn, không trùng thông tin */
.pl-hint { margin: 0 0 10px; color: var(--ink2); font-size: 0.88rem; text-align: center; }
.pl-hint a { color: var(--orange); font-weight: 800; }
.tiles { padding: 12px 8px; gap: 8px; }
@media (max-width: 700px) { .banner-wrap::after { display: none; } }

/* 🎁 Thẻ quà: dạng hàng ngang gọn (biểu tượng · tên + cách đổi · giá) */
.gifts { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 8px; }
.gift { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "ic nm cost" "ic hw cost"; column-gap: 12px; align-items: center; padding: 10px 14px; text-align: left; border-radius: 16px; }
.gift .ic { grid-area: ic; font-size: 1.6rem; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: #fff7e6; }
.gift b { grid-area: nm; font-size: 0.9rem; line-height: 1.3; }
.gift small { grid-area: hw; margin-top: 2px; font-size: 0.76rem; }
.gift .cost { grid-area: cost; margin: 0; padding: 4px 10px; font-size: 0.82rem; white-space: nowrap; }
@media (max-width: 400px) { .gifts { grid-template-columns: 1fr; } }
/* 📱 Điện thoại: 2 thẻ quà trên một hàng */
@media (max-width: 700px) {
  .gifts { grid-template-columns: 1fr 1fr; gap: 8px; }
  .gift { grid-template-columns: auto 1fr; grid-template-areas: "ic cost" "nm nm" "hw hw"; row-gap: 6px; column-gap: 8px; padding: 10px; align-items: center; }
  .gift .ic { width: 34px; height: 34px; font-size: 1.3rem; border-radius: 10px; }
  .gift .cost { justify-self: end; font-size: 0.78rem; padding: 3px 9px; }
  .gift b { font-size: 0.82rem; line-height: 1.3; }
  .gift small { font-size: 0.7rem; margin-top: 0; }
}
@media (max-width: 700px) {
  .gifts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gift { min-width: 0; }
  .gift b { overflow-wrap: anywhere; }
}
@media (max-width: 700px) { .gift { align-content: start; align-items: start; } .gift .ic, .gift .cost { align-self: center; } }

/* Thanh đầu trang (máy tính): mọi nút cùng chiều cao với “Cài app”, chữ nhỏ gọn, không xuống dòng */
@media (min-width: 901px) {
  .nav { gap: 8px; }
  .nav .links { gap: 6px; margin-right: 2px; }
  .nav .links a, .nav #navInstall, .nav #navAcc { box-sizing: border-box; height: 36px; min-width: 64px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 0.84rem; line-height: 1; white-space: nowrap; border-width: 2px; }
  .nav #navInstall[hidden] { display: none !important; }
  .nav .links a span, .nav #navInstall span { white-space: nowrap; }
}
@media (min-width: 901px) and (max-width: 1240px) {
  .nav .brand-t { white-space: normal; line-height: 1.05; font-size: 1rem; overflow: visible; text-overflow: clip; }
  .nav .brand-t span { display: block; }
}
/* 🖥️ Máy tính: banner còn 3/4 chiều cao, cắt đều phần trên và phần dưới */
@media (min-width: 701px) {
  .banner { aspect-ratio: 1600 / 781; }
  .banner img { object-position: 50% 50%; }
}

/* 💡 Mỗi ngày một điều thú vị */
.biet { margin: 18px 0 0; }
.bt-card { position: relative; padding: 16px 18px; border-radius: 22px; background: linear-gradient(135deg, #fffbea, #fff 55%, #eef7ff); border: 2px solid #fde68a; box-shadow: 0 14px 30px -22px rgba(180, 120, 0, 0.6); }
.bt-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.bt-lab { font: 900 0.95rem var(--display); color: #b45309; }
.bt-nav { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--ink2); white-space: nowrap; }
.bt-nav button { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fde68a; background: #fff; color: #b45309; font: 900 1rem/1 var(--sans); cursor: pointer; }
.bt-nav button:disabled { opacity: 0.35; cursor: default; }
.bt-cat { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #fff; border: 1.5px solid var(--line); font-size: 0.76rem; font-weight: 800; color: var(--ink2); }
.bt-t { margin: 8px 0 4px; font-size: 1.12rem; color: #243b7a; line-height: 1.3; }
.bt-b { margin: 0; color: var(--ink); line-height: 1.55; font-size: 0.95rem; }
.bt-b small { color: var(--ink3); }
.bt-act { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.bt-act button { padding: 7px 14px; border-radius: 999px; border: 2px solid #fde68a; background: #fff; font: 800 0.84rem var(--sans); color: #92400e; cursor: pointer; }
.bt-like.on { background: #fef3c7; border-color: #fbbf24; cursor: default; }
.bt-z { margin-left: auto; font-size: 0.78rem; color: var(--ink3); }
@media (max-width: 560px) {
  .biet { margin-top: 12px; }
  .bt-card { padding: 12px 14px; border-radius: 18px; }
  .bt-lab { font-size: 0.86rem; }
  .bt-t { font-size: 1.02rem; }
  .bt-b { font-size: 0.9rem; line-height: 1.5; }
  .bt-z { margin-left: 0; width: 100%; }
}
/* Ô tiện ích: 5 ô trên một hàng (thêm 💡 Kiến thức) */
@media (max-width: 560px) {
  .tiles { grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 12px 6px; }
  .tiles span { width: 48px; height: 48px; font-size: 1.4rem; border-radius: 16px; }
  .tiles b { font-size: 0.7rem; }
}
/* Bấm “Kiến thức” → thẻ nháy nhẹ để dễ thấy */
.biet:target .bt-card { animation: btGlow 1.6s ease-out 1; }
@keyframes btGlow { 0% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.9); } 100% { box-shadow: 0 0 0 18px rgba(251, 191, 36, 0); } }

/* 💡 Thẻ kiến thức nổi bật: dải tiêu đề màu + ngày rõ ràng */
.bt-card { padding: 0; overflow: hidden; border: 3px solid #fbbf24; background: #fff; box-shadow: 0 18px 36px -20px rgba(234, 120, 0, 0.75); }
.bt-band { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 16px; background: linear-gradient(110deg, #f59e0b, #f97316 55%, #ef4444); color: #fff; }
.bt-band .bt-lab { font: 900 1.02rem var(--display); color: #fff; letter-spacing: 0.02em; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18); }
.bt-band .bt-nav { color: #fff; }
.bt-band .bt-nav button { border-color: rgba(255, 255, 255, 0.7); background: rgba(255, 255, 255, 0.2); color: #fff; }
.bt-date { font-size: 0.92rem; font-weight: 900; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.22); }
.bt-main { padding: 12px 16px 14px; background: linear-gradient(135deg, #fffbea, #fff 60%); }
.bt-meta { display: flex; align-items: center; gap: 8px; }
.bt-new { padding: 2px 9px; border-radius: 999px; background: #ef4444; color: #fff; font: 900 0.72rem var(--sans); letter-spacing: 0.06em; animation: btPulse 1.6s ease-in-out infinite; }
@keyframes btPulse { 50% { transform: scale(1.08); box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.18); } }
.bt-back { padding: 2px 10px; border-radius: 999px; border: 1.5px solid #fbbf24; background: #fff; font: 800 0.76rem var(--sans); color: #b45309; cursor: pointer; }
.bt-t { font-size: clamp(1.15rem, 2.6vw, 1.45rem); margin: 8px 0 6px; }
.bt-card.old .bt-band { background: linear-gradient(110deg, #64748b, #475569); }
.bt-card.old { border-color: #cbd5e1; }
@media (max-width: 560px) {
  .bt-card { padding: 0; }
  .bt-band { padding: 8px 12px; gap: 6px; }
  .bt-band .bt-lab { font-size: 0.92rem; }
  .bt-date { font-size: 0.8rem; }
  .bt-main { padding: 10px 12px 12px; }
  .bt-t { font-size: 1.12rem; }
}
@media (prefers-reduced-motion: reduce) { .bt-new { animation: none; } }
@media (min-width: 901px) and (max-width: 1440px) {
  .nav .brand-t { white-space: normal; line-height: 1.05; font-size: 1rem; overflow: visible; text-overflow: clip; }
  .nav .brand-t span { display: block; }
}
@media (min-width: 901px) {
  .nav .brand-t { white-space: normal; line-height: 1.05; font-size: 1rem; overflow: visible; text-overflow: clip; }
  .nav .brand-t span { display: block; }
}
/* 🖥️ Máy tính: banner thấp thêm 1/4 (cắt đều trên – dưới) */
@media (min-width: 701px) {
  .banner { aspect-ratio: 1600 / 586; }
  .banner img { object-position: 50% 50%; }
}
/* Ô “Rubi của bạn” – cùng kiểu với 3 ô số liệu */
.banner-row .stats .s4 { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 10px 8px; border: 0; border-radius: 18px; text-align: center; color: #fff; cursor: pointer; font: inherit; background: linear-gradient(140deg, #fbbf24, #f97316); --sh: rgba(234, 88, 12, 0.8); box-shadow: 0 12px 26px -12px var(--sh), inset 0 -4px 0 rgba(0, 0, 0, 0.14); transition: transform 0.15s; }
.banner-row .stats .s4:hover { transform: translateY(-2px); }
.banner-row .stats .s4 b { color: #fff; }
.banner-row .stats .s4 small { color: rgba(255, 255, 255, 0.95); }
.banner-row .stats .s4.guest b { opacity: 0.85; }
@media (max-width: 700px) { .banner-row .stats .s4 { padding: 8px 4px; border-radius: 14px; } }
@media (max-width: 700px) {
  .banner-row .stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .banner-row .stats > * { min-width: 0; padding: 8px 2px; }
  .banner-row .stats b { font-size: 1.1rem; }
  .banner-row .stats small { font-size: 0.62rem; white-space: normal; line-height: 1.2; }
}

/* Menu cha “Phần thưởng” (Xếp hạng · Quà · Cửa hàng) */
.nav-dd { position: relative; display: inline-flex; }
.nav-dd .dd-btn { color: #fff; cursor: pointer; font: inherit; font-weight: 800; }
.nav-dd .dd-btn i { font-style: normal; }
.nav-dd .dd-btn em { font-style: normal; font-size: 0.7em; margin-left: 2px; display: inline-block; transition: transform 0.15s; }
.nav-dd.open .dd-btn em { transform: rotate(180deg); }
.nav-dd .dd-menu { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(-4px); min-width: 170px; padding: 6px; border-radius: 16px; background: #fff; box-shadow: 0 18px 40px -14px rgba(15, 40, 90, 0.5); display: grid; gap: 2px; opacity: 0; visibility: hidden; transition: opacity 0.15s, transform 0.15s, visibility 0.15s; z-index: 60; }
.nav-dd .dd-menu::before { content: ""; position: absolute; top: -8px; left: 0; right: 0; height: 8px; } /* cầu nối để rê chuột không bị tắt */
.nav-dd.open .dd-menu, .nav-dd:hover .dd-menu, .nav-dd:focus-within .dd-menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.nav .links .nav-dd .dd-menu a { display: flex; align-items: center; height: auto; min-width: 0; padding: 9px 12px; border: 0; border-radius: 10px; background: none; color: var(--ink); font-size: 0.9rem; font-weight: 800; justify-content: flex-start; white-space: nowrap; }
.nav .links .nav-dd .dd-menu a:hover { background: #eef5ff; text-decoration: none; }
@media (min-width: 901px) {
  .nav .nav-dd .dd-btn { box-sizing: border-box; height: 36px; min-width: 64px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; font-size: 0.84rem; line-height: 1; white-space: nowrap; border-radius: 999px; background: rgba(255, 255, 255, 0.16); border: 2px solid rgba(255, 255, 255, 0.55); }
  .nav .nav-dd .dd-btn:hover { background: rgba(255, 255, 255, 0.3); }
  .nav .nav-dd .dd-btn i { display: none; }
}
@media (min-width: 561px) and (max-width: 900px) {
  .nav .nav-dd .dd-btn { 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); }
  .nav .nav-dd .dd-btn span { display: none; }
  .nav .nav-dd .dd-btn i { display: block; font-size: 1.1rem; line-height: 1; }
  .nav .nav-dd .dd-menu { left: auto; right: 0; transform: translateY(-4px); }
  .nav-dd.open .dd-menu, .nav-dd:hover .dd-menu, .nav-dd:focus-within .dd-menu { transform: translateY(0); }
}
/* Nút tài khoản hiện họ tên: tên dài thì rút gọn bằng dấu … */
.nav #navAcc { display: inline-block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 901px) { .nav #navAcc { display: inline-block; line-height: 32px; text-align: center; } }
@media (max-width: 560px) { .nav #navAcc { max-width: 46vw; } }
@media (max-width: 560px) { .nav #navAcc { max-width: 58vw; font-size: 0.8rem; padding: 8px 12px; } .nav .brand img { width: 36px; height: 36px; } }
/* Thẻ kiến thức: nút “Hay quá”, “Chia sẻ” nằm bên phải */
.bt-act { justify-content: flex-end; }
.bt-act .bt-z { order: -1; margin: 0 auto 0 0; }
@media (max-width: 560px) { .bt-act .bt-z { width: 100%; text-align: right; margin: 0 0 2px; } }

/* =====================================================================
   ✨ HIỆU ỨNG & LÀM ĐẸP (tự tắt khi người dùng bật “giảm chuyển động”)
   ===================================================================== */
/* Nền: các mảng màu mềm cố định phía sau */
body { background:
  radial-gradient(600px 420px at 8% 12%, rgba(56, 189, 248, 0.16), transparent 70%) fixed,
  radial-gradient(520px 380px at 94% 30%, rgba(251, 191, 36, 0.14), transparent 70%) fixed,
  radial-gradient(640px 460px at 70% 92%, rgba(236, 72, 153, 0.10), transparent 70%) fixed,
  linear-gradient(180deg, #e4f2ff 0%, #f4faff 380px, #ffffff 1200px, #f4faff 100%); }
/* Thanh menu: mờ kính khi cuộn xuống */
.nav { transition: box-shadow 0.25s, background 0.25s, padding 0.25s; }
.nav.scrolled { background: linear-gradient(90deg, rgba(3, 105, 161, 0.92), rgba(2, 132, 199, 0.92) 55%, rgba(14, 165, 233, 0.92)); -webkit-backdrop-filter: blur(10px) saturate(1.3); backdrop-filter: blur(10px) saturate(1.3); box-shadow: 0 10px 28px -12px rgba(3, 60, 110, 0.75); }
.nav .brand img { transition: transform 0.4s; }
.nav .brand:hover img { transform: rotate(-8deg) scale(1.06); }
/* Banner: hình chuyển động chậm (Ken Burns) */
.banner img { animation: kenburns 22s ease-in-out infinite alternate; transform-origin: 50% 45%; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.07); } }
/* Ô số liệu: ánh sáng lướt qua */
.banner-row .stats > * { position: relative; overflow: hidden; }
.banner-row .stats > *::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent); transform: skewX(-18deg); animation: shine 5.5s ease-in-out infinite; pointer-events: none; }
.banner-row .stats > *:nth-child(2)::after { animation-delay: 0.6s; } .banner-row .stats > *:nth-child(3)::after { animation-delay: 1.2s; } .banner-row .stats > *:nth-child(4)::after { animation-delay: 1.8s; }
@keyframes shine { 0%, 70% { left: -60%; } 100% { left: 130%; } }
/* Nút cam: nổi lên khi rê chuột + ánh sáng lướt */
.btn { position: relative; overflow: hidden; }
.btn-orange:hover, .btn-zalo:hover { transform: translateY(-2px); box-shadow: 0 16px 28px -12px rgba(255, 100, 80, 0.95); }
.btn-orange::after { content: ""; position: absolute; top: 0; bottom: 0; width: 35%; left: -50%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.5), transparent); transform: skewX(-18deg); transition: left 0.6s; pointer-events: none; }
.btn-orange:hover::after { left: 120%; }
/* Gợn sóng khi bấm nút */
.rip { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, 0.55); transform: scale(0); animation: rip 0.6s ease-out forwards; pointer-events: none; }
@keyframes rip { to { transform: scale(2.6); opacity: 0; } }
/* Các mục hiện dần khi cuộn tới */
.fx { opacity: 0; transform: translateY(26px) scale(0.985); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.fx.in { opacity: 1; transform: none; }
/* Tiêu đề mục: gạch chân vàng chạy ra */
.block .head h2 { border-bottom: 0; position: relative; }
.block .head h2::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; border-radius: 4px; background: linear-gradient(90deg, #ffd23d, #ff8a3d, #ff4f8b); transform: scaleX(0); transform-origin: left; transition: transform 0.7s 0.15s cubic-bezier(0.2, 0.8, 0.2, 1); }
.block.in .head h2::after, .block:not(.fx) .head h2::after { transform: scaleX(1); }
/* Ô tiện ích & thẻ: nảy nhẹ khi rê/chạm */
.tiles > * span { transition: transform 0.2s cubic-bezier(0.3, 1.6, 0.5, 1); }
.tiles > *:hover span, .tiles > *:active span { transform: translateY(-4px) scale(1.06); }
.sh-card, .gift, .dc-it, .lv-room { transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; }
.gift:hover, .lv-room:hover { transform: translateY(-3px); box-shadow: 0 14px 26px -18px rgba(29, 78, 216, 0.55); }
/* Thẻ kiến thức: bóng đèn lấp lánh */
.bt-band .bt-lab { display: inline-flex; align-items: center; gap: 4px; }
.bt-card:not(.old) .bt-band { background-size: 200% 100%; animation: bandFlow 8s ease-in-out infinite alternate; }
@keyframes bandFlow { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
/* Bảng vàng: bục 1 phát sáng */
.pd.p1 .av { animation: crownGlow 2.4s ease-in-out infinite; }
@keyframes crownGlow { 50% { box-shadow: 0 0 0 6px rgba(255, 210, 61, 0.35), 0 10px 30px -8px rgba(255, 159, 28, 0.8); } }
.pd .crown { display: inline-block; animation: fl 3s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .banner img, .banner-row .stats > *::after, .bt-card .bt-band, .pd.p1 .av, .pd .crown { animation: none !important; }
  .fx { opacity: 1; transform: none; transition: none; }
}
/* Khung kết quả: nút “Câu tiếp” luôn nằm bên phải (cả điện thoại), dòng “Lượt này” bên trái */
.q-res .row { justify-content: flex-end !important; }
.q-res .row .pl-total { order: -1; margin-right: auto !important; text-align: left; }
@media (max-width: 560px) {
  .q-res .row { flex-direction: row !important; flex-wrap: nowrap; align-items: center; }
  .q-res .row .btn { flex: 0 0 auto !important; min-width: 130px; }
  .q-res .row .pl-total { flex: 1 1 auto; min-width: 0; white-space: normal; font-size: 0.78rem; }
}
/* Lĩnh vực yêu thích (trong dải cam của thẻ kiến thức) */
.bt-band { flex-wrap: wrap; }
.bt-fav { display: inline-flex; align-items: center; gap: 8px; margin-right: auto; margin-left: 14px; font-size: 0.82rem; font-weight: 800; color: #fff; }
.bt-fav select { height: 30px; max-width: 250px; padding: 0 30px 0 12px; border-radius: 999px; border: 2px solid rgba(255, 255, 255, 0.75); background: rgba(255, 255, 255, 0.95) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23b45309' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 11px center; -webkit-appearance: none; appearance: none; font: 800 0.82rem var(--sans); color: #92400e; cursor: pointer; text-overflow: ellipsis; }
.bt-fav select:focus { outline: 3px solid rgba(255, 255, 255, 0.5); }
@media (max-width: 760px) {
  .bt-fav { order: 3; width: 100%; margin: 4px 0 0; }
  .bt-fav span { white-space: nowrap; font-size: 0.78rem; }
  .bt-fav select { flex: 1; max-width: none; min-width: 0; }
}
/* Đăng nhập bằng tài khoản (không cần Zalo) */
.lg-pw { display: block; width: 100%; margin-top: 12px; padding: 10px 12px; border-radius: 14px; border: 2px dashed #cbd5e1; background: #f8fafc; color: var(--ink2); font: 600 0.86rem var(--sans); cursor: pointer; text-align: center; }
.lg-pw b { color: #c2410c; }
.lg-pw:hover { border-color: #fdba74; background: #fff7ed; }
.pw-tabs { margin: 4px 0 12px; justify-content: flex-start; }
.pw-tabs button.on { background: #243b7a; border-color: #243b7a; color: #fff; }
.pw-f { display: grid; gap: 10px; }
.pw-f label { display: grid; gap: 4px; font-weight: 800; font-size: 0.85rem; color: var(--ink2); }
.pw-f input { height: 46px; padding: 0 14px; border-radius: 14px; border: 2px solid var(--line); font: 600 1rem var(--sans); color: var(--ink); background: #fff; width: 100%; }
.pw-f input:focus { outline: none; border-color: #243b7a; box-shadow: 0 0 0 4px rgba(36, 59, 122, 0.12); }
.pw-in { position: relative; display: block; }
.pw-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; font-size: 1.1rem; cursor: pointer; }
.pw-err { min-height: 1.2em; margin: 0; color: #be123c; font-weight: 700; font-size: 0.86rem; }
.pw-f .small-mut { margin: 0; }
/* Đăng nhập không cần Zalo: 2 nút tách riêng, trải hết chiều ngang hộp */
.lg-pw2 { display: grid; grid-template-columns: auto 1fr 1fr; align-items: center; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 2px dashed var(--line); }
.lg-pw2 > span { font-weight: 800; color: var(--ink2); font-size: 0.9rem; white-space: nowrap; }
.lg-pw2 .btn { width: 100%; padding: 11px 12px; font-size: 0.92rem; white-space: nowrap; box-shadow: none; }
.lg-pw2 .btn:last-child { border-color: #fdba74; color: #c2410c; }
@media (max-width: 600px) { .lg-pw2 { grid-template-columns: 1fr 1fr; } .lg-pw2 > span { grid-column: 1 / -1; text-align: center; } .lg-pw2 .btn { font-size: 0.84rem; padding: 10px 6px; } }
.lg-pw2 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)) !important; }
.lg-pw2 > span { grid-column: 1 / -1; text-align: center; }
.lg-pw2 .btn { font-size: 0.92rem !important; padding: 12px 10px !important; overflow: visible; }
/* Ưu tiên Zalo: nhãn Khuyên dùng + lợi ích; cách đăng nhập tài khoản làm nhẹ đi */
.lg-rec { display: inline-block; margin-left: 6px; padding: 3px 10px; border-radius: 999px; background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff; font: 800 0.72rem var(--sans); vertical-align: 4px; letter-spacing: 0.02em; }
.lg-ben { list-style: none; margin: 2px 0 12px; padding: 10px 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; border-radius: 16px; background: linear-gradient(135deg, #e8f3ff, #f0fdf4); border: 2px solid #bfdbfe; font-size: 0.88rem; color: var(--ink); }
.lg-ben b { color: #0057d9; }
@media (max-width: 560px) { .lg-ben { grid-template-columns: 1fr; font-size: 0.85rem; } }
.lg-pw2 > span { font-weight: 600 !important; color: var(--ink3) !important; font-size: 0.82rem !important; }
.lg-pw2 .btn { background: #f8fafc; border-color: var(--line) !important; color: var(--ink2) !important; font-weight: 700; font-size: 0.86rem !important; padding: 9px 10px !important; }
.pw-note { margin: 0 0 10px; padding: 9px 12px; border-radius: 12px; background: #fff7ed; border: 1.5px solid #fed7aa; color: #9a3412; font-size: 0.84rem; line-height: 1.45; }
.pw-note a { color: #0057d9; font-weight: 800; }

/* 🐾 Nuôi thú cưng · 🧩 Ráp mô hình */
.c-pet { --c: #db2777; --bg: #fdf2f8; } .c-model { --c: #0891b2; --bg: #ecfeff; }
.pt-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-right: 40px; }
.pt-head h3 { margin: 0; } .pt-head h3 small { display: block; font: 700 0.8rem var(--sans); color: var(--ink3); margin-top: 2px; }
.pt-main { display: grid; grid-template-columns: 1.1fr 1fr; gap: 14px; align-items: start; margin: 6px 0 4px; }
.pt-pic { position: relative; border-radius: 20px; overflow: hidden; background: linear-gradient(160deg, #e0f2fe, #fdf2f8); border: 3px solid #f9a8d4; aspect-ratio: 16 / 10; display: grid; place-items: center; }
.pt-pic.md { border-color: #67e8f9; background: linear-gradient(160deg, #ecfeff, #eef2ff); }
.pt-pic img, .pt-pic video { width: 100%; height: 100%; object-fit: cover; }
.pt-pic video { position: absolute; inset: 0; }
.pt-pic img.pop { animation: ptPop 0.6s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes ptPop { from { transform: scale(0.85); opacity: 0.4; } }
.pt-rename { position: absolute; right: 8px; bottom: 8px; padding: 5px 10px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, 0.9); font: 800 0.78rem var(--sans); cursor: pointer; }
.pt-side { display: grid; gap: 10px; }
.pt-mood { padding: 10px 12px; border-radius: 16px; background: #fff7ed; border: 2px solid #fed7aa; display: grid; gap: 2px; font-size: 0.86rem; color: var(--ink2); }
.pt-mood.ok { background: #effcf5; border-color: #9fe5c6; }
.pt-mood b { color: var(--ink); font-size: 0.95rem; }
.pt-prog { padding: 10px 12px; border-radius: 16px; background: #f8fafc; border: 2px solid var(--line); font-size: 0.86rem; }
.pt-prog i { display: block; height: 10px; border-radius: 10px; background: #e2e8f0; margin: 6px 0; overflow: hidden; }
.pt-prog em { display: block; height: 100%; border-radius: 10px; background: linear-gradient(90deg, #34d399, #22c55e); transition: width 0.5s; }
.pt-prog small { color: var(--ink3); }
.pt-done { padding: 10px 12px; border-radius: 14px; background: #fef9c3; border: 2px solid #fde047; font-weight: 700; color: #854d0e; margin: 8px 0 0; }
.pt-shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.pt-it { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 14px; border: 2px solid var(--line); background: #fff; cursor: pointer; font: inherit; color: var(--ink); transition: transform 0.15s, border-color 0.15s; }
.pt-it:hover:not(:disabled) { transform: translateY(-2px); border-color: #f9a8d4; }
.pt-it img { width: 100%; aspect-ratio: 1.5; object-fit: cover; border-radius: 10px; }
.pt-it b { font-size: 0.76rem; } .pt-it em { font-style: normal; font-weight: 900; font-size: 0.8rem; color: #db2777; }
.pt-it.own { opacity: 0.55; cursor: default; } .pt-it.own em { color: #15803d; }
.pt-alb { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.pt-alb img { width: 86px; height: 56px; object-fit: cover; border-radius: 10px; cursor: pointer; flex: none; border: 2px solid var(--line); }
.pt-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.pt-opt { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px; border-radius: 18px; border: 2px solid var(--line); background: #fff; cursor: pointer; font: inherit; color: var(--ink); transition: transform 0.15s, border-color 0.15s; }
.pt-opt:hover { transform: translateY(-3px); border-color: #f9a8d4; }
.pt-opt img { width: 100%; aspect-ratio: 1.1; object-fit: contain; }
.pt-opt small { color: var(--ink3); font-weight: 700; } .pt-opt.own small { color: #0369a1; } .pt-opt.on { border-color: #22c55e; background: #effcf5; }
.md-next { display: grid; grid-template-columns: 64px 1fr; grid-template-areas: "i t" "b b"; gap: 8px 10px; align-items: center; padding: 10px 12px; border-radius: 16px; background: #ecfeff; border: 2px solid #67e8f9; }
.md-next img { grid-area: i; width: 64px; height: 48px; object-fit: cover; border-radius: 10px; } .md-next div { grid-area: t; } .md-next small { display: block; color: var(--ink3); } .md-next .btn { grid-area: b; width: 100%; }
.md-parts { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.md-p { position: relative; border-radius: 10px; overflow: hidden; border: 2px solid var(--line); opacity: 0.45; }
.md-p img { width: 100%; aspect-ratio: 1.3; object-fit: cover; display: block; }
.md-p em { position: absolute; left: 0; right: 0; bottom: 0; font-style: normal; text-align: center; font: 800 0.66rem var(--sans); background: rgba(255, 255, 255, 0.85); }
.md-p.own { opacity: 1; border-color: #22c55e; } .md-p.own em { color: #15803d; } .md-p.next { opacity: 1; border-color: #0891b2; box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.2); }
@media (max-width: 640px) {
  .pt-main { grid-template-columns: 1fr; }
  .md-parts { grid-template-columns: repeat(4, 1fr); }
  .pt-shop { grid-template-columns: repeat(3, 1fr); }
  .pt-pick { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) { .pt-pick { grid-template-columns: repeat(3, 1fr); gap: 6px; } .pt-opt { padding: 6px; border-radius: 14px; } .pt-opt b { font-size: 0.8rem; } .pt-opt small { font-size: 0.7rem; } }
/* Hộp Nuôi thú cưng / Ráp mô hình: rộng hơn, gọn để vừa màn hình – không cần cuộn */
@media (min-width: 900px) {
  .sheet-box.xl { width: min(1120px, calc(100vw - 48px)); padding: 20px 24px; }
  .sheet-box.xl .pt-head { margin-bottom: 0; }
  .sheet-box.xl .sh-sbal { margin: 0 0 8px; }
  .sheet-box.xl .pt-main { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; margin: 0; }
  .sheet-box.xl .pt-pic { aspect-ratio: auto; height: clamp(170px, 30vh, 250px); }
  .sheet-box.xl .dc-gt { margin: 10px 0 6px; }
  .sheet-box.xl .pt-shop { grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 6px; }
  .sheet-box.xl .pt-it { padding: 5px 3px 4px; border-radius: 12px; }
  .sheet-box.xl .pt-it img { aspect-ratio: 1.7; }
  .sheet-box.xl .pt-it b { font-size: 0.72rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .sheet-box.xl .pt-it em { font-size: 0.76rem; }
  .sheet-box.xl .pt-mood, .sheet-box.xl .pt-prog { padding: 8px 12px; }
  .sheet-box.xl .md-parts { grid-template-columns: repeat(16, minmax(0, 1fr)); gap: 4px; }
  .sheet-box.xl .md-p em { font-size: 0.6rem; }
  .sheet-box.xl .pt-alb img { width: 72px; height: 46px; }
}
.pt-prog .row.between { display: flex; justify-content: space-between; gap: 8px; }
/* Hình thú cưng / mô hình luôn hiện ĐẦY ĐỦ (không cắt) */
.pt-pic { aspect-ratio: auto; height: auto; min-height: 0; padding: 6px; }
.pt-pic img { display: block; width: 100%; height: auto; max-height: min(58vh, 460px); object-fit: contain; margin: 0 auto; }
@media (min-width: 900px) {
  .sheet-box.xl .pt-pic { height: clamp(190px, 34vh, 280px); padding: 6px; }
  .sheet-box.xl .pt-pic img { width: 100%; height: 100%; max-height: none; object-fit: contain; }
}
@media (min-width: 900px) {
  .sheet-box.xl .pt-pic { display: flex; align-items: center; justify-content: center; overflow: hidden; }
  .sheet-box.xl .pt-pic img { width: auto !important; height: auto !important; max-width: 100%; max-height: 100%; min-height: 0; }
}
.sheet-box .pt-pic { background: #fff !important; }

/* Header thú cưng / mô hình: tên · cấp · số 💎 · nút Đổi – tất cả trên MỘT hàng */
.pt-head { flex-wrap: wrap; gap: 4px 14px; justify-content: flex-start; margin-bottom: 8px; }
.pt-head h3 { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; min-width: 0; font-size: 1.2rem; }
.pt-head h3 small { display: inline; margin: 0; }
.pt-head .sh-sbal { margin: 0; white-space: nowrap; }
.pt-head .btn { margin-left: auto; }
@media (min-width: 900px) {
  .sheet-box.xl { padding: 14px 20px 14px; }
  .sheet-box.xl .pt-head { margin-bottom: 8px; }
  .sheet-box.xl .pt-head .sh-sbal { margin: 0; }
  .sheet-box.xl .dc-gt { margin: 8px 0 5px; }
}

/* 🗺️ Hộ chiếu tri thức */
.c-passport { --c: #0d9488; --bg: #f0fdfa; }
.hc-tabs { display: flex; gap: 4px; padding: 3px; border-radius: 999px; background: #f1f5f9; }
.hc-tabs button { border: 0; background: none; padding: 6px 12px; border-radius: 999px; font: 800 0.84rem var(--sans); color: var(--ink2); cursor: pointer; white-space: nowrap; }
.hc-tabs button em { font-style: normal; font-weight: 700; color: var(--ink3); font-size: 0.76rem; }
.hc-tabs button.on { background: #fff; color: #0f766e; box-shadow: 0 2px 8px -3px rgba(15, 118, 110, 0.45); }
.hc-main { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 14px; align-items: start; }
.hc-main.world { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.hc-mapbox { position: relative; border-radius: 20px; background: linear-gradient(180deg, #e0f2fe, #ecfeff); border: 2px solid #99f6e4; padding: 6px; overflow: hidden; }
.hc-svg { display: block; width: 100%; height: auto; max-height: min(60vh, 540px); margin: 0 auto; }
.hc-near { fill: #f1f5f9; stroke: #cbd5e1; stroke-width: 0.8; }
.hc-land { fill: #fefce8; stroke: #84cc16; stroke-width: 1.2; stroke-linejoin: round; }
.hc-svg.world .hc-land { fill: #f7fee7; stroke: #a3e635; stroke-width: 0.6; }
.hc-isl circle { fill: #f59e0b; } .hc-isl text { font: 800 11px var(--sans); fill: #b45309; text-anchor: middle; } .hc-isl text.s { font-weight: 600; font-size: 9px; }
.hc-route { fill: none; stroke: #0d9488; stroke-width: 2.2; stroke-dasharray: 5 5; animation: hcDash 1s linear infinite; }
@keyframes hcDash { to { stroke-dashoffset: -20; } }
.hc-home circle { fill: #ef4444; stroke: #fff; stroke-width: 2; } .hc-home text { font-size: 8px; text-anchor: middle; }
.hc-pin { cursor: pointer; outline: none; }
.hc-pin circle { fill: #fff; stroke: #94a3b8; stroke-width: 2; stroke-dasharray: 3 2; transition: r 0.15s; }
.hc-pin text { text-anchor: middle; fill: #fff; font-weight: 900; pointer-events: none; }
.hc-pin.v circle { stroke-dasharray: none; fill: #38bdf8; stroke: #fff; }
.hc-pin.s1 circle { fill: #c2410c; } .hc-pin.s2 circle { fill: #64748b; } .hc-pin.s3 circle { fill: #eab308; }
.hc-pin:hover circle, .hc-pin:focus-visible circle { stroke: #0d9488; stroke-width: 3; }
.hc-pin.on circle { stroke: #0f766e; stroke-width: 3.5; stroke-dasharray: none; filter: drop-shadow(0 0 4px rgba(13, 148, 136, 0.8)); }
.hc-pin text.lb { fill: #0f172a; font: 900 13px var(--sans); paint-order: stroke; stroke: #fff; stroke-width: 4px; }
.hc-svg.world .hc-pin text.lb { font-size: 11px; }
.hc-left { display: grid; gap: 8px; min-width: 0; }
.hc-legend { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; justify-content: center; font: 700 0.72rem var(--sans); color: var(--ink2); }
.hc-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-left: 4px; }
.hc-legend .s0 { border: 2px dashed #94a3b8; } .hc-legend .v { background: #38bdf8; } .hc-legend .s1 { background: #c2410c; } .hc-legend .s2 { background: #64748b; } .hc-legend .s3 { background: #eab308; }
.hc-side { display: grid; gap: 10px; min-width: 0; }
.hc-card { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 16px; background: #f0fdfa; border: 2px solid #99f6e4; }
.hc-card.trip { grid-template-columns: auto 1fr auto; background: #fff7ed; border-color: #fed7aa; }
.hc-card.hint { background: #f8fafc; border-color: var(--line); }
.hc-card small { display: block; color: var(--ink3); font-weight: 700; font-size: 0.74rem; }
.hc-card > div > b { display: block; font-size: 1.1rem; } .hc-card span { display: block; color: var(--ink2); font-size: 0.85rem; } .hc-card span b { color: #0f766e; }
.hc-big { font-size: 2.2rem; line-height: 1; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 16px; background: #fff; box-shadow: 0 4px 12px -6px rgba(0, 0, 0, 0.25); }
#hcPanel { display: grid; gap: 8px; }
#hcPanel > .btn { width: 100%; }
.hc-from { color: var(--ink3); font-size: 0.78rem; text-align: center; margin-top: -2px; }
.hc-fact { margin: 0; padding: 8px 12px; border-radius: 14px; background: #fffbeb; border: 1px dashed #fcd34d; font-size: 0.84rem; color: #78350f; }
.hc-ok { margin: 0; text-align: center; font-weight: 700; color: #a16207; }
.hc-st { display: inline-block !important; margin-top: 3px; padding: 1px 8px; border-radius: 999px; font: 800 0.72rem var(--sans) !important; color: #fff !important; background: #38bdf8; }
.hc-st.s1 { background: #c2410c; } .hc-st.s2 { background: #64748b; } .hc-st.s3 { background: #ca8a04; }
.hc-rank { padding: 8px 12px; border-radius: 16px; background: #f8fafc; border: 2px solid var(--line); font-size: 0.84rem; }
.hc-rank .row.between { display: flex; justify-content: space-between; gap: 8px; } .hc-rank span { color: var(--ink3); font-weight: 700; font-size: 0.78rem; }
.hc-rank i { display: block; height: 8px; border-radius: 8px; background: #e2e8f0; margin: 5px 0; overflow: hidden; }
.hc-rank em { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, #2dd4bf, #0d9488); transition: width 0.5s; }
.hc-rank small { color: var(--ink3); }
.hc-regs { display: grid; gap: 6px; max-height: 38vh; overflow-y: auto; padding-right: 2px; }
.hc-left .hc-regs { max-height: none; }
.hc-reg > b { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--ink2); margin-bottom: 3px; } .hc-reg > b span { color: var(--ink3); }
.hc-reg.done > b { color: #a16207; }
.hc-reg > div { display: flex; flex-wrap: wrap; gap: 4px; }
.hc-chip { border: 1.5px dashed #cbd5e1; background: #fff; border-radius: 999px; padding: 2px 9px; font: 700 0.74rem var(--sans); color: var(--ink2); cursor: pointer; }
.hc-chip.v { border-style: solid; border-color: #38bdf8; color: #0369a1; }
.hc-chip.s1 { border-color: #c2410c; color: #9a3412; background: #fff7ed; } .hc-chip.s2 { border-color: #64748b; color: #334155; background: #f1f5f9; } .hc-chip.s3 { border-color: #eab308; color: #854d0e; background: #fefce8; }
.hc-chip.on { outline: 2px solid #0d9488; outline-offset: 1px; }
/* làm bài */
.hc-quiz { max-width: 640px; margin: 0 auto; display: grid; gap: 12px; }
.hc-arrive { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 18px; background: linear-gradient(120deg, #ccfbf1, #e0f2fe); animation: pop 0.35s both; }
.hc-arrive small { color: #0f766e; font-weight: 800; } .hc-arrive b { display: block; font-size: 1.3rem; } .hc-arrive span { color: var(--ink2); font-size: 0.86rem; }
.hc-dots { display: flex; gap: 6px; justify-content: center; } .hc-dots i { width: 28px; height: 6px; border-radius: 6px; background: #e2e8f0; } .hc-dots i.d { background: #2dd4bf; } .hc-dots i.on { background: #0d9488; }
.hc-q { font-weight: 800; font-size: 1.08rem; margin: 0; }
.hc-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hc-opts button { display: flex; gap: 8px; align-items: center; text-align: left; padding: 12px; border-radius: 14px; border: 2px solid var(--line); background: #fff; font: 700 0.92rem var(--sans); color: var(--ink); cursor: pointer; transition: transform 0.12s, border-color 0.12s; }
.hc-opts button b { flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: #f0fdfa; color: #0f766e; }
.hc-opts button:hover:not(:disabled) { transform: translateY(-2px); border-color: #2dd4bf; }
.hc-opts button.pick { border-color: #0d9488; background: #f0fdfa; }
.hc-note { text-align: center; color: var(--ink3); font-size: 0.82rem; margin: 0; }
/* bưu thiếp */
.hc-post { max-width: 720px; margin: 0 auto; display: grid; gap: 10px; }
.hc-pc { display: grid; grid-template-columns: 1.5fr 1fr; border-radius: 18px; overflow: hidden; background: repeating-linear-gradient(135deg, #ef4444 0 12px, #fff 12px 24px, #2563eb 24px 36px, #fff 36px 48px); padding: 6px; animation: pop 0.4s both; }
.hc-pc > div { background: #fffdf7; }
.hc-pc-l { padding: 14px 16px; border-radius: 12px 0 0 12px; border-right: 2px dashed #e5e7eb; }
.hc-pc-l small { color: var(--ink3); font-weight: 800; letter-spacing: 0.08em; font-size: 0.68rem; }
.hc-pc-l .hc-big { margin: 6px 0; } .hc-pc-l > b { display: block; font-size: 1.25rem; } .hc-pc-l > span { color: var(--ink2); font-size: 0.85rem; }
.hc-pc-l p { margin: 8px 0 0; font-size: 0.86rem; color: #44403c; font-style: italic; }
.hc-pc-r { padding: 14px; border-radius: 0 12px 12px 0; display: grid; place-items: center; gap: 6px; }
.hc-stamp { width: 132px; height: 132px; border-radius: 50%; border: 4px double currentColor; display: grid; place-content: center; text-align: center; transform: rotate(-12deg); color: #94a3b8; animation: hcStamp 0.5s 0.25s both cubic-bezier(0.3, 1.6, 0.5, 1); }
.hc-stamp span { font-size: 1.2rem; letter-spacing: 2px; } .hc-stamp b { font: 900 1.25rem var(--display, var(--sans)); } .hc-stamp small { font: 700 0.66rem var(--sans); }
.hc-stamp.vang { color: #ca8a04; } .hc-stamp.bac { color: #64748b; } .hc-stamp.dong { color: #c2410c; }
@keyframes hcStamp { from { transform: rotate(-12deg) scale(2.2); opacity: 0; } }
.hc-score { margin: 0; font-size: 0.86rem; color: var(--ink2); text-align: center; }
.hc-bonus { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; } .hc-bonus span { padding: 4px 10px; border-radius: 999px; background: #fef9c3; border: 1.5px solid #fde047; font-weight: 700; font-size: 0.84rem; } .hc-bonus b { color: #7c3aed; }
.hc-res { display: grid; gap: 4px; } .hc-res p { margin: 0; font-size: 0.84rem; padding: 6px 10px; border-radius: 10px; background: #f8fafc; } .hc-res p.no { background: #fef2f2; } .hc-res p b { color: #0f766e; }
.hc-acts { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
@media (min-width: 900px) {
  .sheet-box.xl .hc-svg { max-height: min(58vh, 520px); }
  .sheet-box.xl .hc-main.world .hc-svg { max-height: none; }
}
@media (max-width: 640px) {
  .hc-main, .hc-main.world { grid-template-columns: 1fr; }
  .hc-svg { max-height: 52vh; }
  .hc-opts { grid-template-columns: 1fr; }
  .hc-pc { grid-template-columns: 1fr; }
  .hc-pc-l { border-right: 0; border-bottom: 2px dashed #e5e7eb; border-radius: 12px 12px 0 0; }
  .hc-pc-r { border-radius: 0 0 12px 12px; }
  .hc-stamp { width: 110px; height: 110px; }
  .hc-regs { max-height: none; }
  .hc-tabs { width: 100%; } .hc-tabs button { flex: 1; }
}
.pt-head .hc-tabs { margin-left: auto; }

/* Hình minh họa "Kiến thức mới hôm nay": ảnh nhỏ bên phải, bấm để phóng to */
.bt-main.has-img { display: grid; grid-template-columns: minmax(0, 1fr) 200px; grid-template-areas: "txt img" "act img"; grid-template-rows: auto 1fr; column-gap: 18px; align-items: start; }
.bt-main.has-img .bt-act { align-self: end; }
.bt-main.has-img .bt-txt { grid-area: txt; min-width: 0; }
.bt-main.has-img .bt-act { grid-area: act; }
.bt-img { grid-area: img; display: block; padding: 0; border: 2px solid #fde68a; border-radius: 14px; overflow: hidden; background: #fff7e6; cursor: zoom-in; box-shadow: 0 8px 18px -12px rgba(180, 83, 9, 0.6); transition: transform 0.15s; }
.bt-img:hover { transform: rotate(-1deg) scale(1.03); }
.bt-img img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.bt-zoom { margin: 0; display: grid; gap: 10px; }
.bt-zoom img { width: 100%; max-width: 640px; height: auto; aspect-ratio: 3 / 2; border-radius: 16px; margin: 0 auto; display: block; }
.bt-zoom figcaption { display: grid; gap: 4px; font-size: 0.92rem; color: var(--ink2); } .bt-zoom figcaption b { font-size: 1.05rem; color: #243b7a; }
@media (max-width: 640px) {
  .bt-main.has-img { grid-template-columns: minmax(0, 1fr) 108px; grid-template-areas: "txt img" "act act"; column-gap: 10px; }
  .bt-img { border-radius: 10px; margin-top: 30px; }
}

/* 🏠 Gia đình mình */
.fm-empty { display: flex; gap: 16px; align-items: center; padding: 18px; border-radius: 20px; background: linear-gradient(120deg, #fff7ed, #fdf2f8); border: 2px solid #fed7aa; }
.fm-empty p { margin: 4px 0 10px; color: var(--ink2); }
.fm-hero { font-size: 3rem; }
.fm-start { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fm-card { display: grid; gap: 8px; padding: 16px; border-radius: 20px; background: #fff; border: 2px solid var(--line); }
.fm-card h4 { margin: 0; } .fm-card p { margin: 0; color: var(--ink2); font-size: 0.9rem; }
.fm-card .chips button { font-size: 1.1rem; }
.fm-why { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.fm-why li { padding: 10px 12px; border-radius: 14px; background: #f8fafc; font-size: 0.88rem; color: var(--ink2); }
.fm-inbox { display: grid; gap: 8px; margin-bottom: 12px; }
.fm-msg { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 16px; background: #fdf2f8; border: 2px solid #fbcfe8; animation: pop 0.35s both; }
.fm-msg.suggest { background: #fffbeb; border-color: #fde68a; }
.fm-msg span { font-size: 1.5rem; } .fm-msg p { margin: 0; flex: 1; }
.fm-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fm-title { display: flex; gap: 10px; align-items: center; margin-right: auto; }
.fm-title > span { font-size: 2rem; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; background: #fff7ed; border: 2px solid #fed7aa; }
.fm-title b { display: block; font-size: 1.2rem; } .fm-title small { color: var(--ink3); font-weight: 700; }
.fm-code { border: 2px dashed #f59e0b; background: #fffbeb; border-radius: 999px; padding: 6px 14px; font: 700 0.86rem var(--sans); color: #92400e; cursor: pointer; }
.fm-code b { letter-spacing: 0.08em; font-size: 1rem; }
.fm-goal { margin: 12px 0; padding: 10px 14px; border-radius: 16px; background: #f0fdf4; border: 2px solid #bbf7d0; font-size: 0.88rem; }
.fm-goal .row.between { display: flex; justify-content: space-between; gap: 8px; } .fm-goal span { font-weight: 800; color: #15803d; }
.fm-goal i { display: block; height: 12px; border-radius: 12px; background: #dcfce7; margin: 6px 0; overflow: hidden; }
.fm-goal em { display: block; height: 100%; border-radius: 12px; background: linear-gradient(90deg, #4ade80, #16a34a); transition: width 0.6s; }
.fm-goal small { color: var(--ink2); }
.fm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.fm-m { display: grid; gap: 6px; padding: 12px 14px; border-radius: 18px; background: #fff; border: 2px solid var(--line); }
.fm-m.me { border-color: #93c5fd; background: #f8fbff; }
.fm-m.idle .fm-today { color: #b45309; background: #fff7ed; }
.fm-top { display: flex; gap: 6px; align-items: center; } .fm-top b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-rank { font-weight: 900; min-width: 22px; } .fm-top i { font-style: normal; }
.fm-lv { font-size: 0.8rem; color: var(--ink3); font-weight: 700; }
.fm-today { font-size: 0.85rem; padding: 4px 8px; border-radius: 10px; background: #f0fdf4; color: #166534; }
.fm-wk { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; font-size: 0.8rem; color: var(--ink3); }
.fm-wk b { font-size: 1.1rem; color: #7c3aed; } .fm-wk small { width: 100%; }
.fm-cats { display: flex; flex-wrap: wrap; gap: 4px; } .fm-cats span { font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.fm-cats .s { background: #dcfce7; color: #166534; } .fm-cats .w { background: #fef3c7; color: #92400e; }
.fm-act { display: flex; gap: 4px; flex-wrap: wrap; }
.fm-act button { flex: 1; border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 5px 4px; font: 700 0.78rem var(--sans); cursor: pointer; color: var(--ink); }
.fm-act button:hover { border-color: #f59e0b; background: #fffbeb; }
.fm-act .x { flex: 0 0 30px; color: #94a3b8; }
.fm-low { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; margin-top: 14px; }
.fm-feed h4, .fm-board h4 { margin: 0 0 8px; } .fm-board h4 small { font-weight: 600; color: var(--ink3); font-size: 0.74rem; }
.fm-feed ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; max-height: 300px; overflow-y: auto; }
.fm-feed li { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; font-size: 0.86rem; padding: 6px 10px; border-radius: 12px; background: #f8fafc; }
.fm-feed li p { margin: 0; } .fm-feed li small { color: var(--ink3); white-space: nowrap; }
.fm-board { margin-top: 14px; } .fm-low .fm-board { margin-top: 0; }
.fm-board ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.fm-board li { display: grid; grid-template-columns: 28px 1fr auto auto; gap: 8px; align-items: center; padding: 6px 10px; border-radius: 12px; background: #f8fafc; font-size: 0.88rem; }
.fm-board li.me { background: #fef3c7; outline: 2px solid #fbbf24; }
.fm-board li small { color: var(--ink3); } .fm-board li em { font-style: normal; font-weight: 900; color: #16a34a; }
.fm-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.fm-pick button { padding: 10px; border-radius: 14px; border: 2px solid var(--line); background: #fff; font: 700 0.9rem var(--sans); cursor: pointer; text-align: left; color: var(--ink); }
.fm-pick button:hover { border-color: #f59e0b; } .fm-pick button.hot { border-color: #f59e0b; background: #fffbeb; }
@media (max-width: 640px) {
  .fm-start, .fm-low { grid-template-columns: 1fr; }
  .fm-empty { flex-direction: column; text-align: center; }
  .fm-code { order: 3; width: 100%; }
}
.fm-m { min-width: 0; overflow: hidden; }
.fm-m > * { min-width: 0; overflow-wrap: anywhere; }

/* 👥 Nhóm */
.gr-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.gr-tabs button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 2px solid var(--line); background: #fff; font: 700 0.86rem var(--sans); color: var(--ink2); cursor: pointer; position: relative; }
.gr-tabs button.on { border-color: #6366f1; background: #eef2ff; color: #3730a3; }
.gr-tabs button.add { border-style: dashed; color: #7c3aed; }
.gr-tabs em { font-style: normal; min-width: 18px; height: 18px; border-radius: 9px; background: #ef4444; color: #fff; font-size: 0.7rem; display: grid; place-items: center; padding: 0 4px; }
.gr-types { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.gr-type { display: grid; gap: 3px; text-align: left; padding: 12px; border-radius: 16px; border: 2px solid var(--line); background: #fff; cursor: pointer; font: inherit; color: var(--ink); }
.gr-type span { font-size: 1.6rem; } .gr-type small { color: var(--ink2); font-size: 0.78rem; } .gr-type em { font-style: normal; font-size: 0.72rem; color: var(--ink3); font-weight: 700; }
.gr-type.on { border-color: #6366f1; background: #eef2ff; box-shadow: 0 6px 16px -10px #6366f1; }
.gr-table { overflow-x: auto; border-radius: 16px; border: 2px solid var(--line); }
.gr-table table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.gr-table th { text-align: left; padding: 8px; background: #f8fafc; color: var(--ink3); font-size: 0.76rem; }
.gr-table td { padding: 6px 8px; border-top: 1px solid var(--line); vertical-align: middle; }
.gr-table td small { display: block; color: var(--ink3); font-size: 0.72rem; }
.gr-table tr.me td { background: #eff6ff; }
.gr-table .fm-act { flex-wrap: nowrap; } .gr-table .fm-act button { flex: 0 0 auto; padding: 3px 7px; }
@media (max-width: 760px) { .gr-types { grid-template-columns: 1fr 1fr; } }
#grpBox .fm-card { align-content: start; }
@media (max-width: 640px) { .gr-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; } .gr-tabs button { flex: 0 0 auto; white-space: nowrap; } }
/* 👉 bàn tay gợi ý chọn lĩnh vực yêu thích (ẩn sau khi người dùng đã bấm chọn lần đầu) */
.bt-hand { display: none; position: relative; font-style: normal; font-size: 1.25rem; line-height: 1; margin: 0 -2px 0 2px; animation: btPoint 1s ease-in-out infinite; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.25)); pointer-events: none; }
.bt-hand { display: none; align-items: center; gap: 4px; }
.bt-hand em { font: 900 0.7rem var(--sans); font-style: normal; white-space: nowrap; color: #92400e; background: #fef3c7; padding: 3px 9px; border-radius: 999px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18); order: -1; }
.bt-fav.hint .bt-hand { display: inline-flex; }
.bt-fav.hint select { animation: btGlow 1.6s ease-in-out infinite; }
@keyframes btPoint { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(6px); } }
@keyframes btGlow { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.85); } 50% { box-shadow: 0 0 0 6px rgba(255, 255, 255, 0); } }
.bt-hand em { display: none; } @media (min-width: 1500px) { .bt-hand em { display: inline; } }
@media (prefers-reduced-motion: reduce) { .bt-hand, .bt-fav.hint select { animation: none; } }
/* 🎯 Kết quả Thử thách: bố trí 2 cột gọn */
.dy-head { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; align-items: center; margin-bottom: 14px; }
.dy-sum { display: flex; align-items: center; justify-content: center; gap: 18px; }
.dy-info { display: grid; gap: 6px; justify-items: start; text-align: left; }
.dy-cheer { font-weight: 800; font-size: 1.1rem; }
.dy-head .dy-grid { margin: 0; justify-content: flex-start; gap: 6px; }
.dy-head .dy-grid i { width: 30px; height: 30px; border-radius: 8px; }
.dy-head .dy-meta { margin: 0; font-size: 0.88rem; }
.dy-side { display: grid; gap: 10px; }
.dy-side .sv { margin: 0; max-width: none; }
.dy-side .sv.done { padding: 10px 14px; }
.dy-res .dy-side .row { margin: 0; }
@media (max-width: 760px) {
  .dy-head { grid-template-columns: 1fr; }
  .dy-score b { font-size: 3.2rem; }
  .dy-sum { gap: 12px; }
}
.dy-head:has(.sv:not(.done)) { grid-template-columns: 1fr; }
.dy-head:has(.sv:not(.done)) .dy-side .sv { max-width: 640px; margin: 0 auto; }
.dy-info { min-width: 0; }
@media (max-width: 760px) {
  .dy-sum { flex-wrap: wrap; }
  .dy-info { justify-items: center; text-align: center; }
  .dy-head .dy-grid { justify-content: center; }
  .dy-head .dy-grid i { width: 26px; height: 26px; }
}
@media (max-width: 760px) {
  .dy-sum { flex-wrap: nowrap; gap: 12px; }
  .dy-info { justify-items: start; text-align: left; }
  .dy-head .dy-grid { justify-content: flex-start; gap: 5px; }
  .dy-cheer { font-size: 1rem; }
  .dy-head .dy-meta { font-size: 0.8rem; }
  .dy-res .dy-side .row { flex-wrap: nowrap; }
  .dy-side .row .btn { padding-left: 14px; padding-right: 14px; }
}
/* Menu con 2 dòng: tên + mô tả ngắn */
.nav .nav-dd .dd-menu { min-width: 250px; padding: 8px; }
.nav .links .nav-dd .dd-menu a { gap: 10px; padding: 8px 10px; white-space: normal; }
.nav .links .nav-dd .dd-menu a > i { font-style: normal; font-size: 1.25rem; width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 10px; background: #f1f5ff; }
.nav .links .nav-dd .dd-menu a > b { display: grid; gap: 1px; font-size: 0.9rem; color: var(--ink); }
.nav .links .nav-dd .dd-menu a > b small { font-size: 0.74rem; font-weight: 600; color: var(--ink3); }
.nav .links .nav-dd .dd-menu a:hover > i { background: #dbeafe; }
.nav .links .nav-dd .dd-menu { width: 270px; }
.nav .links .nav-dd .dd-menu a { width: auto; min-width: 0; height: auto; border-radius: 12px; }
.nav .links .nav-dd .dd-menu a > b { flex: 1; min-width: 0; }
.nav .links .nav-dd .dd-menu a > b { line-height: 1.25; gap: 3px; }
@media (max-width: 1080px) { .nav .links .nv-l { display: none; } }
/* Tiêu đề khối: một hàng – tiêu đề trái, mô tả phải, tiết kiệm chiều cao */
.block { padding-top: 20px; }
.block .head { display: flex; align-items: center; gap: 6px 16px; flex-wrap: wrap; max-width: none; margin: 0 0 16px; text-align: left; }
.block .head h2 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); margin: 0; padding-bottom: 5px; white-space: nowrap; flex: 0 0 auto; }
.block .head .sub { margin: 0; padding-left: 16px; border-left: 2px solid #e2e8f0; font-size: 0.92rem; line-height: 1.4; flex: 1 1 280px; min-width: 0; }
@media (max-width: 640px) {
  .block { padding-top: 16px; }
  .block .head { gap: 4px; margin-bottom: 12px; }
  .block .head h2 { font-size: 1.25rem; }
  .block .head .sub { padding-left: 0; border-left: 0; font-size: 0.84rem; flex-basis: 100%; }
}
/* 🗺️ Hộ chiếu: bỏ thanh cuộn trong danh sách vùng – mỗi vùng một hàng (tên trái, các tỉnh phải) */
@media (min-width: 901px) {
  .sheet-box.xl .hc-regs { max-height: none; overflow: visible; gap: 4px; }
  .sheet-box.xl .hc-reg { display: grid; grid-template-columns: 150px 1fr; gap: 8px; align-items: start; padding: 3px 0; border-top: 1px dashed #e2e8f0; }
  .sheet-box.xl .hc-reg:first-child { border-top: 0; }
  .sheet-box.xl .hc-reg > b { display: grid; gap: 0; margin: 2px 0 0; font-size: 0.76rem; line-height: 1.25; }
  .sheet-box.xl .hc-reg > div { gap: 3px; }
  .sheet-box.xl .hc-chip { padding: 1px 8px; font-size: 0.72rem; }
}

/* 🔗 Link mời vào nhóm – nằm cùng hàng với Mã mời và ⚙️ */
.inv-b { white-space: nowrap; }
@media (max-width: 640px) {
  .fm-head .fm-title { flex: 1 1 calc(100% - 80px); min-width: 0; }
  .fm-head .fm-code { order: 3; width: auto; flex: 1 1 0; min-width: 0; padding: 6px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .fm-head .fm-code { font-size: 0.8rem; }
  .fm-head .fm-code b { letter-spacing: 0.03em; font-size: 0.95rem; }
  .fm-head .inv-b { order: 4; flex: none; padding-left: 12px; padding-right: 12px; }
  .fm-head .inv-t { display: none; }
}
.mv-head { display: flex; align-items: center; gap: 14px; }
.mv-ic { font-size: 2.4rem; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 18px; background: #fffbeb; border: 2px solid #fde68a; flex: none; }
.mv-head h3 { margin: 2px 0; }
.mv-head small { color: var(--ink2); font-weight: 700; }
.mv-head p { margin: 0; color: var(--ink3); font-size: 0.88rem; }
.mv-ok { padding: 10px 12px; border-radius: 12px; background: #ecfdf5; color: #065f46; font-weight: 700; }
.mv-warn { padding: 10px 12px; border-radius: 12px; background: #fff7ed; color: #9a3412; }
#mvRole { margin-bottom: 10px; }
.mv-later { width: 100%; margin-top: 8px; }
/* 👥 Nhóm của tôi (trong Tài khoản) */
.acc-grp { margin-top: 12px; padding: 10px 12px; border-radius: 14px; border: 2px solid var(--line); }
.acc-grp-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.acc-grp-h b { white-space: nowrap; }
.acc-grp-h .btn { white-space: nowrap; padding-left: 12px; padding-right: 12px; }
.acc-gl { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.acc-gl li { display: grid; grid-template-columns: minmax(0, 1fr) 46px; gap: 6px; }
.acc-g { min-width: 0; width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; border: 2px solid var(--line); background: #fff; cursor: pointer; font: inherit; text-align: left; color: var(--ink); }
.acc-g:hover { border-color: var(--sky); background: #eef8ff; }
.acc-g .ic { font-size: 1.5rem; flex: none; }
.acc-g .tx { flex: 1; min-width: 0; }
.acc-g .tx b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.92rem; }
.acc-g .tx small { display: block; color: var(--ink3); font-size: 0.78rem; line-height: 1.35; overflow-wrap: anywhere; }
.acc-g em { font-style: normal; background: #ef4444; color: #fff; border-radius: 999px; padding: 1px 7px; font-size: 0.75rem; font-weight: 800; }
.acc-g .go { color: var(--ink3); font-size: 1.3rem; }
.acc-gs { width: 46px; min-width: 0; padding: 0; margin: 0; border-radius: 12px; border: 2px solid #fde68a; background: #fffbeb; cursor: pointer; font-size: 1.1rem; }
.acc-row .btn { flex: none; white-space: nowrap; }

/* 🔐 Hộp Đăng nhập bằng Zalo – gọn để không phải cuộn (đặt cuối tệp để thắng các luật cũ) */
.sheet-box.wide:has(.lg) { padding: 16px 22px 14px; }
.sheet-box:has(.lg) { padding-top: 16px; padding-bottom: 14px; }
.sheet-box .lg { gap: 18px; }
.sheet-box .lg-main h3 { margin: 0 0 8px; font-size: 1.2rem; line-height: 1.25; }
.sheet-box .lg-rec { vertical-align: 3px; padding: 2px 9px; }
.sheet-box .lg-ben { margin: 0 0 8px; padding: 8px 10px; gap: 3px 12px; font-size: 0.8rem; line-height: 1.35; grid-template-columns: 1fr 1fr; border-width: 1.5px; }
.sheet-box .lg-ben li { margin: 0; }
.sheet-box .lg-sub { margin: 0 0 8px; font-size: 0.88rem; line-height: 1.4; }
.sheet-box .lg-code { margin: 0 0 8px; padding: 6px 10px; font-size: 1.6rem; border-width: 2.5px; }
.sheet-box .lg-code small { margin-top: 1px; font-size: 0.72rem; }
.sheet-box .lg-go { padding: 10px 16px; }
.sheet-box .sd-pc { margin: 6px 0 0; padding: 6px 10px; font-size: 0.76rem; line-height: 1.35; }
.sheet-box ol.sd-steps { margin: 6px 0 0; padding: 0; gap: 5px; }
.sheet-box .sd-steps li { margin: 0; padding: 5px 8px; font-size: 0.74rem; line-height: 1.25; }
.sheet-box .lg-oauth { margin-top: 6px; font-size: 0.82rem; }
.sheet-box .lg-wait { margin: 4px 0 0; font-size: 0.8rem; }
.sheet-box .lg-qr-img { width: 150px; padding: 6px; }
.sheet-box .lg-qr small { margin-top: 6px; font-size: 0.74rem; }
.sheet-box .lg-pw2 { margin-top: 10px; padding-top: 10px; gap: 8px; grid-template-columns: auto 1fr 1fr !important; }
.sheet-box .lg-pw2 > span { grid-column: auto; text-align: left; }
.sheet-box .lg-pw2 .btn { padding: 7px 10px !important; }
@media (max-width: 640px) {
  .sheet-box .lg-main h3 { font-size: 1.1rem; padding-right: 36px; }
  .sheet-box .lg-ben { grid-template-columns: 1fr 1fr; font-size: 0.74rem; gap: 3px 8px; padding: 7px 8px; }
  .sheet-box .lg-sub { font-size: 0.82rem; }
  .sheet-box .lg-code { font-size: 1.45rem; padding: 5px 8px; }
  .sheet-box .sd-steps li { padding: 5px 6px; font-size: 0.7rem; gap: 4px; }
  .sheet-box .sd-steps li::before { width: 17px; height: 17px; font-size: 0.66rem; }
  .sheet-box .lg-pw2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; }
  .sheet-box .lg-pw2 > span { grid-column: 1 / -1; text-align: center; }
  .sheet-box .lg-pw2 .btn { font-size: 0.78rem !important; min-width: 0; white-space: normal; padding: 7px 6px !important; line-height: 1.25; }
}

/* 🗂️ Lĩnh vực chia hai phần Kiến thức / Kỹ năng */
.topics { flex-direction: column; align-items: center; }
.tp-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.tp-row + .tp-row { margin-top: 6px; }
.tp-h { flex-basis: 100%; text-align: center; font: 800 0.95rem var(--display, inherit); color: #243b7a; margin-bottom: 2px; }
.fm-pick .cat-part { grid-column: 1 / -1; margin: 6px 0 0; font-weight: 800; font-size: 0.86rem; color: #243b7a; }
.fm-pick .cat-part:first-child { margin-top: 0; }

/* 💬 Góp ý */
.gy-fab { position: fixed; right: 18px; bottom: 22px; z-index: 40; padding: 10px 16px; border: 0; border-radius: 999px; background: #243b7a; color: #fff; font: 800 0.9rem var(--sans); box-shadow: 0 8px 24px rgba(36, 59, 122, 0.35); cursor: pointer; }
.gy-fab:hover { background: #1d3166; }
@media (max-width: 900px) { .gy-fab { display: none; } } /* điện thoại: dùng Tài khoản › Góp ý, menu Cộng đồng hoặc chân trang */
.gy-f { display: grid; gap: 8px; }
.gy-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.gy-kinds button { padding: 7px 12px; border-radius: 999px; border: 2px solid var(--line); background: #fff; font: 700 0.84rem var(--sans); color: var(--ink2); cursor: pointer; }
.gy-kinds button.on { border-color: #f59e0b; background: #fffbeb; color: #92400e; }
.gy-f textarea { resize: vertical; min-height: 110px; font: 500 0.95rem/1.45 var(--sans); }
.gy-cnt { text-align: right; font-size: 0.75rem; color: var(--ink3); margin-top: -4px; }
.gy-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.gy-ok { text-align: center; padding: 6px 0; }
.gy-ok-ic { font-size: 2.6rem; }
.gy-sos { padding: 10px 12px; border-radius: 12px; background: #fff7ed; color: #9a3412; text-align: left; }
.gy-mine { margin-top: 12px; border-top: 2px dashed var(--line); padding-top: 10px; }
.gy-mine summary { cursor: pointer; font-weight: 800; color: var(--ink2); }
.gy-mine ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; max-height: 38vh; overflow-y: auto; }
.gy-mine li { padding: 8px 10px; border-radius: 12px; border: 2px solid var(--line); }
.gy-mine p { margin: 4px 0 0; font-size: 0.86rem; white-space: pre-line; }
.gy-top { display: flex; gap: 8px; align-items: center; font-size: 0.8rem; font-weight: 700; color: var(--ink2); }
.gy-top em { font-style: normal; padding: 1px 8px; border-radius: 999px; background: #eef2f8; color: var(--ink2); }
.gy-top em.doing { background: #fff7ed; color: #c2410c; } .gy-top em.done { background: #ecfdf5; color: #047857; }
.gy-top small { margin-left: auto; color: var(--ink3); font-weight: 600; }
.gy-rep { margin-top: 6px; padding: 6px 10px; border-radius: 10px; background: #eef5ff; color: #1e3a8a; font-size: 0.85rem; }
.gy-flag { display: inline-block; margin: 0 0 8px; padding: 0; border: 0; background: none; color: var(--ink3); font: 600 0.8rem var(--sans); text-decoration: underline; cursor: pointer; }
.acc-gy { display: flex; width: 100%; margin-top: 10px; justify-content: center; }
.foot > span { display: inline-flex; gap: 6px; }

/* Tên mới "RUBI TRI THỨC" + khẩu hiệu dưới tên */
.brand-w { display: flex; flex-direction: column; min-width: 0; line-height: 1.1; }
.brand-w .brand-s { display: block; margin-top: 3px; color: #e0f2fe; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; text-shadow: 0 1px 2px rgba(2, 62, 110, 0.5); }
.nav .brand-t span { display: inline !important; }
@media (max-width: 700px) { .brand-w .brand-s { font-size: 0.64rem; max-width: 52vw; } .nav .brand-t { white-space: nowrap !important; font-size: clamp(0.9rem, 4.4vw, 1.1rem) !important; } }
@media (max-width: 360px) { .brand-w .brand-s { display: none; } }

/* Kiến thức mỗi ngày: nhãn "MỚI" sát góc phải → nhãn lĩnh vực dài (VD "Phát minh & nhà khoa học") đủ chỗ trên 1 dòng */
.bt-main { position: relative; }
.bt-meta .bt-new { position: absolute; top: 10px; right: 12px; z-index: 2; margin: 0; box-shadow: 0 4px 10px -4px rgba(220, 38, 38, 0.6); }
.bt-meta .bt-cat { white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.bt-main:not(.has-img) .bt-meta:has(.bt-new) { padding-right: 56px; }
@media (max-width: 700px) { .bt-meta .bt-new { top: 8px; right: 10px; } }

/* Nhóm của tôi: nhãn (bạn thân · sở thích · lớp · câu lạc bộ) */
.gr-tag { display: inline-block; padding: 0 8px; border-radius: 999px; background: #eef2ff; color: #4338ca; font-weight: 800; font-size: 0.72rem; line-height: 1.6; }
.gr-tags, .gs-tags { margin: 4px 0 10px; }
.fm-card .gf-lb { display: block; margin: 10px 0 2px; font-weight: 800; font-size: 0.8rem; color: var(--ink2); }
.fm-card .gf-lb small { font-weight: 600; color: var(--mut, #64748b); }

/* Nút "Cài app" trên điện thoại (ô tiện ích) */
.tiles .t-inst span { background: linear-gradient(135deg, #ffb703, #fb5607); color: #fff; box-shadow: 0 6px 14px -6px rgba(251, 86, 7, 0.7); animation: instPulse 2.4s ease-in-out infinite; }
@keyframes instPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
@media (display-mode: standalone) { #tInstall { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .tiles .t-inst span { animation: none; } }

/* ✍️ Xưởng ra đề */
.sh-card.c-rade { --c: #db2777; --bg: #fdf2f8; }
.q-by { margin: 2px 0 6px; font-size: 0.8rem; font-weight: 700; color: #be185d; }
.q-by b { color: #9d174d; }
.rd-how { display: grid; gap: 6px; margin: 4px 0 12px; padding: 10px 12px; border-radius: 14px; background: linear-gradient(135deg, #fdf2f8, #fff7ed); border: 1.5px dashed #f9a8d4; font-size: 0.86rem; }
.rd-tabs { display: flex; gap: 6px; margin: 10px 0 12px; overflow-x: auto; }
.rd-tabs button { flex: none; padding: 7px 12px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font: 800 0.84rem var(--sans); color: var(--ink2); cursor: pointer; }
.rd-tabs button.on { background: #be185d; border-color: #be185d; color: #fff; }
.rd-due { width: 100%; margin: 4px 0 2px; animation: btPulse 1.8s ease-in-out infinite; }
.rd-body textarea.sc-in { resize: vertical; min-height: 56px; font-family: inherit; }
.rd-body select.sc-in, .rd-body .sc-in { width: 100%; box-sizing: border-box; }
.rd-body .gf-lb { display: block; margin: 10px 0 4px; font-weight: 800; font-size: 0.82rem; color: var(--ink2); }
.rd-body .gf-lb small { font-weight: 600; color: #64748b; }
.rd-ans { display: grid; gap: 6px; }
.rd-a { display: flex; align-items: center; gap: 6px; }
.rd-a b { width: 18px; text-align: center; color: var(--ink2); }
.rd-a .sc-in { flex: 1; margin: 0; }
.rd-ok { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 2px solid #cbd5e1; background: #fff; color: #cbd5e1; font-weight: 900; cursor: pointer; }
.rd-ok.on { border-color: #16a34a; background: #16a34a; color: #fff; box-shadow: 0 4px 10px -4px rgba(22, 163, 74, 0.7); }
.rd-tips { margin: 10px 0; font-size: 0.85rem; color: var(--ink2); }
.rd-tips summary { cursor: pointer; font-weight: 800; color: #be185d; }
.rd-tips ul { margin: 6px 0 0 18px; padding: 0; }
.rd-prev { margin: 8px 0 12px; }
.rd-prev > small { color: #64748b; font-weight: 700; }
.rd-card { margin-top: 4px; padding: 12px; border-radius: 16px; background: #fff; border: 2px solid #fbcfe8; }
.rd-card .q-text { margin: 4px 0 8px; font-weight: 800; }
.rd-card .opts { display: grid; gap: 6px; }
.rd-card .opt { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 12px; border: 1.5px solid var(--line); font-size: 0.9rem; }
.rd-card .opt.is-ok { border-color: #16a34a; background: #f0fdf4; }
.rd-card .opt .l { font-weight: 900; color: var(--ink2); }
.rd-list { display: grid; gap: 10px; }
.rd-it { padding: 12px; border-radius: 16px; border: 2px solid var(--line); background: #fff; }
.rd-it.ok { border-color: #86efac; } .rd-it.wait { border-color: #fde68a; } .rd-it.no { border-color: #fecaca; } .rd-it.off { opacity: 0.6; }
.rd-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rd-st { padding: 2px 10px; border-radius: 999px; font: 800 0.74rem var(--sans); background: #f1f5f9; }
.rd-it.ok .rd-st { background: #dcfce7; color: #166534; } .rd-it.wait .rd-st { background: #fef3c7; color: #92400e; } .rd-it.no .rd-st { background: #fee2e2; color: #991b1b; }
.rd-q { margin: 8px 0 4px; font-weight: 800; }
.rd-opts { margin: 0 0 6px; padding: 0; list-style: none; display: grid; gap: 2px; font-size: 0.86rem; color: var(--ink2); }
.rd-opts li.ok { color: #15803d; font-weight: 800; }
.rd-opts li.ok::after { content: " ✔"; }
.rd-stat { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 0.82rem; color: var(--ink2); }
.rd-why { margin: 6px 0; padding: 8px 10px; border-radius: 10px; background: #fef2f2; color: #991b1b; font-size: 0.85rem; }
.rd-top { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rd-top li { display: grid; grid-template-columns: 32px 1fr auto; grid-template-areas: "r n e" "r s e"; align-items: center; column-gap: 8px; padding: 10px 12px; border-radius: 14px; background: #fff; border: 1.5px solid var(--line); }
.rd-top li > span { grid-area: r; font-size: 1.2rem; text-align: center; }
.rd-top li > b { grid-area: n; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-top li > small { grid-area: s; color: #64748b; font-size: 0.76rem; }
.rd-top li > em { grid-area: e; font-style: normal; font-weight: 800; color: #be185d; font-size: 0.8rem; text-align: right; }

/* 🏅 Cuộc thi riêng */
.ct-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 8px; }
.ct-medal { flex: none; width: 54px; height: 54px; display: grid; place-items: center; font-size: 2rem; border-radius: 16px; background: linear-gradient(135deg, #fef3c7, #fde68a); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.06); }
.ct-head h3 { margin: 2px 0 2px; line-height: 1.25; }
.ct-org { margin: 0; font-size: 0.86rem; color: var(--ink2); }
.ct-ph { display: inline-block; padding: 1px 9px; border-radius: 999px; font: 800 0.72rem var(--sans); background: #f1f5f9; }
.ct-ph.mo { background: #dcfce7; color: #166534; } .ct-ph.sap { background: #fef3c7; color: #92400e; } .ct-ph.dong { background: #e2e8f0; color: #334155; }
.ct-facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.ct-facts span { padding: 4px 10px; border-radius: 999px; background: #f8fafc; border: 1.5px solid var(--line); font-size: 0.8rem; }
.ct-info { white-space: pre-line; margin: 8px 0 12px; padding: 10px 12px; border-radius: 14px; background: #fffbeb; border: 1.5px dashed #fcd34d; font-size: 0.9rem; line-height: 1.5; }
.ct-rule { margin: 6px 0 12px; padding: 10px 12px; border-radius: 14px; background: #eff6ff; font-size: 0.86rem; line-height: 1.5; }
.ct-wait { text-align: center; font-size: 1rem; margin: 14px 0; }
.ct-quiz { margin-top: 6px; }
.ct-result { text-align: center; margin: 10px 0; padding: 14px; border-radius: 18px; background: linear-gradient(135deg, #ecfdf5, #eff6ff); }
.ct-score b { font-size: 2.6rem; font-weight: 900; color: #047857; }
.ct-score small { font-size: 1rem; color: var(--ink2); }
.ct-h4 { margin: 14px 0 6px; }
.ct-board { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ct-board li { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; grid-template-areas: "r n e" "r s e"; column-gap: 8px; align-items: center; padding: 8px 10px; border-radius: 12px; background: #fff; border: 1.5px solid var(--line); }
.ct-board li.me { border-color: #f59e0b; background: #fffbeb; }
.ct-board li > span { grid-area: r; text-align: center; font-weight: 900; }
.ct-board li > b { grid-area: n; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-board li > small { grid-area: s; color: #64748b; font-size: 0.74rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-board li > em { grid-area: e; font-style: normal; font-weight: 800; font-size: 0.8rem; color: #0f766e; }
.ct-rev { margin: 12px 0; }
.ct-rev summary { cursor: pointer; font-weight: 800; color: #1d4ed8; }
.ct-rev ol { padding-left: 20px; }
.ct-rev li { margin: 8px 0; }
.ct-rev li p { margin: 2px 0; font-size: 0.88rem; }
.ct-rev li.no > p:nth-child(2) { color: #b91c1c; }
