/* RQXChinese.com - bộ khung chung cho game (G1, 10/11/2026)
   Thanh đầu, màn mở đầu, lộ trình, phần thưởng, máy tự chơi, Bảng vàng, chân trang.
   Mọi lớp đều có tiền tố rqxk- để không đụng CSS riêng của từng game. */
:root{
  --rqxk-dau:52px;
  --rqxk-do:#E53935;--rqxk-do2:#C62828;--rqxk-vang:#FFC107;--rqxk-vang2:#FFB300;
  --rqxk-kem:#FFF8EC;--rqxk-kem2:#F6EAD3;--rqxk-muc:#1f2937;--rqxk-nhat:#6b5e4a;
  --rqxk-xanh:#22B866;--rqxk-bong:0 10px 30px rgba(0,0,0,.22);--rqxk-bo:20px;
  --rqxk-font:"Be Vietnam Pro","Segoe UI",system-ui,-apple-system,Roboto,sans-serif;
}
.rqxk-dau,.rqxk-man,.rqxk-demo,.rqxk-bang{font-family:var(--rqxk-font);-webkit-tap-highlight-color:transparent}
.rqxk-dau *,.rqxk-man *,.rqxk-demo *,.rqxk-bang *{box-sizing:border-box}

/* ---------- thanh đầu ---------- */
.rqxk-dau{position:fixed;left:0;right:0;top:0;z-index:60;height:calc(var(--rqxk-dau) + env(safe-area-inset-top));padding:env(safe-area-inset-top) 8px 0;display:flex;align-items:center;gap:8px;background:rgba(255,248,236,.97);color:var(--rqxk-muc);box-shadow:0 2px 10px rgba(0,0,0,.18)}
.rqxk-dau a,.rqxk-dau button{font:inherit;color:inherit;text-decoration:none;border:0;background:none;cursor:pointer}
.rqxk-dau .rqxk-ve{flex:none;min-width:44px;min-height:44px;display:flex;align-items:center;justify-content:center;gap:4px;padding:0 10px;border-radius:999px;background:#fff;font-weight:800;font-size:14px;box-shadow:0 2px 6px rgba(0,0,0,.12)}
.rqxk-dau .rqxk-logo{flex:none;display:flex;align-items:center;min-height:44px}
.rqxk-dau .rqxk-logo img{height:26px;width:auto;display:block}
.rqxk-dau .rqxk-ten{flex:1;min-width:0;font-weight:900;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rqxk-dau .rqxk-nut-bang{flex:none;min-width:44px;min-height:44px;border-radius:999px;background:var(--rqxk-vang);font-weight:900;font-size:13px;padding:0 10px;box-shadow:0 3px 0 #C98A06}
@media (max-width:420px){.rqxk-dau .rqxk-ve span{display:none}.rqxk-dau .rqxk-logo img{height:22px}.rqxk-dau .rqxk-nut-bang span{display:none}}

/* ---------- màn mở đầu và Bảng vàng (lớp phủ dưới thanh đầu) ---------- */
.rqxk-man,.rqxk-bang{position:fixed;left:0;right:0;bottom:0;top:calc(var(--rqxk-dau) + env(safe-area-inset-top));z-index:55;overflow-y:auto;-webkit-overflow-scrolling:touch;background:linear-gradient(#FFE7C2,#FFF8EC 38%,#FFF8EC);color:var(--rqxk-muc);padding:16px 14px calc(16px + env(safe-area-inset-bottom))}
.rqxk-an{display:none!important}
.rqxk-khung{max-width:560px;margin:0 auto;display:flex;flex-direction:column;gap:14px}
.rqxk-the{background:#fff;border-radius:var(--rqxk-bo);padding:16px;box-shadow:0 4px 0 #EADFCB,0 8px 22px rgba(0,0,0,.06)}
.rqxk-the h2{margin:0 0 8px;font-size:16px;font-weight:900;letter-spacing:.2px}
.rqxk-tieu{text-align:center}
.rqxk-tieu .rqxk-zh{font-family:var(--zh);font-size:34px;font-weight:900;color:var(--rqxk-do);line-height:1.1}
.rqxk-tieu h1{margin:4px 0 6px;font-size:26px;font-weight:900;line-height:1.15}
.rqxk-tieu .rqxk-muc-tieu{margin:0 auto;max-width:440px;font-size:15px;line-height:1.45;color:var(--rqxk-nhat);font-weight:600}
.rqxk-hang{display:flex;gap:10px;flex-wrap:wrap;justify-content:center}
.rqxk-nut{font:inherit;border:0;cursor:pointer;min-height:48px;min-width:44px;border-radius:999px;padding:10px 22px;font-weight:900;font-size:17px;background:var(--rqxk-do);color:#fff;box-shadow:0 5px 0 var(--rqxk-do2);text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:6px}
.rqxk-nut:active{transform:translateY(3px);box-shadow:0 2px 0 var(--rqxk-do2)}
.rqxk-nut.rqxk-phu{background:#fff;color:var(--rqxk-muc);box-shadow:0 4px 0 #E2D6C2}
.rqxk-nut.rqxk-vang{background:var(--rqxk-vang);color:#4a2c00;box-shadow:0 5px 0 #C98A06}
.rqxk-nut.rqxk-nho{min-height:44px;font-size:14.5px;padding:8px 16px}
.rqxk-nut:focus-visible,.rqxk-dau a:focus-visible,.rqxk-dau button:focus-visible,.rqxk-tab:focus-visible{outline:3px solid var(--rqxk-vang);outline-offset:2px}
.rqxk-goi-y{display:flex;gap:10px;align-items:center;background:#FFF3CD;border:2px dashed #F5B21B;border-radius:16px;padding:10px 12px;font-size:14px;font-weight:700;line-height:1.35}
.rqxk-goi-y .rqxk-nut{flex:none}

/* lộ trình */
.rqxk-lo{display:grid;grid-template-columns:repeat(auto-fill,minmax(94px,1fr));gap:8px}
.rqxk-o{position:relative;border-radius:14px;padding:8px 8px 7px;background:var(--rqxk-kem);border:2px solid #EADFCB;min-height:64px;font-size:12px;line-height:1.3}
.rqxk-o b{display:block;font-size:14px;font-weight:900}
.rqxk-o .rqxk-sao{color:#F5B21B;letter-spacing:1px;font-size:13px}
.rqxk-o .rqxk-phu-o{color:var(--rqxk-nhat)}
.rqxk-o.rqxk-xong{background:#E9F8EF;border-color:#9AD9B1}
.rqxk-o.rqxk-dang{background:#FFF1F0;border-color:var(--rqxk-do);box-shadow:0 0 0 3px rgba(229,57,53,.15)}
.rqxk-o.rqxk-dang::after{content:"Đang ở đây";position:absolute;top:-9px;right:6px;background:var(--rqxk-do);color:#fff;font-size:10px;font-weight:900;border-radius:999px;padding:1px 7px}
.rqxk-o.rqxk-khoa{opacity:.62}
.rqxk-o.rqxk-ruong{border-color:#F5B21B;border-width:3px}
.rqxk-lo-ghi{margin-top:8px;font-size:13px;color:var(--rqxk-nhat);line-height:1.4}

/* phần thưởng */
.rqxk-thuong-ds{display:flex;flex-direction:column;gap:8px}
.rqxk-thuong{display:flex;gap:10px;align-items:center;background:var(--rqxk-kem);border-radius:14px;padding:10px}
.rqxk-thuong .rqxk-bt{flex:none;width:46px;height:46px}
.rqxk-thuong b{display:block;font-size:14.5px}
.rqxk-thuong span{font-size:13px;color:var(--rqxk-nhat);line-height:1.35}

/* luật */
.rqxk-luat{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:6px;counter-reset:l}
.rqxk-luat li{counter-increment:l;display:flex;gap:10px;font-size:14.5px;line-height:1.4}
.rqxk-luat li::before{content:counter(l);flex:none;width:24px;height:24px;border-radius:50%;background:var(--rqxk-do);color:#fff;font-weight:900;font-size:13px;display:flex;align-items:center;justify-content:center}

/* chân trang */
.rqxk-chan{text-align:center;font-size:12px;line-height:1.5;color:var(--rqxk-nhat);padding:6px 8px 2px}
.rqxk-chan .rqxk-pb{margin-top:3px;font-weight:700;color:#8a7b62}

/* ---------- máy tự chơi ---------- */
.rqxk-demo{position:fixed;left:8px;right:8px;bottom:calc(10px + env(safe-area-inset-bottom));z-index:58;max-width:560px;margin:0 auto;background:rgba(31,41,55,.94);color:#fff;border-radius:18px;padding:10px 12px;box-shadow:var(--rqxk-bong);display:flex;flex-direction:column;gap:6px;pointer-events:auto}
.rqxk-demo .rqxk-dong{display:flex;gap:10px;align-items:center}
.rqxk-demo .rqxk-nhan{flex:none;background:var(--rqxk-vang);color:#4a2c00;font-weight:900;font-size:11px;border-radius:999px;padding:3px 8px;letter-spacing:.3px}
.rqxk-demo .rqxk-buoc{flex:1;font-size:14.5px;font-weight:700;line-height:1.35}
.rqxk-demo .rqxk-bo-qua{flex:none;font:inherit;font-weight:900;font-size:14px;min-height:44px;min-width:76px;border:0;border-radius:999px;background:#fff;color:var(--rqxk-muc);cursor:pointer}
.rqxk-demo .rqxk-tien{height:5px;border-radius:5px;background:rgba(255,255,255,.2);overflow:hidden}
.rqxk-demo .rqxk-tien i{display:block;height:100%;width:0;background:var(--rqxk-vang)}
body.rqxk-dang-demo{cursor:default}
.rqxk-che-demo{position:fixed;inset:0;z-index:57;background:transparent}

/* ---------- Bảng vàng ---------- */
.rqxk-tabs{display:flex;gap:6px;background:var(--rqxk-kem2);padding:4px;border-radius:999px}
.rqxk-tab{flex:1;font:inherit;border:0;cursor:pointer;min-height:44px;border-radius:999px;font-weight:800;font-size:14.5px;background:transparent;color:var(--rqxk-muc)}
.rqxk-tab[aria-selected=true]{background:#fff;box-shadow:0 2px 6px rgba(0,0,0,.1)}
.rqxk-bxh{margin:10px 0 0;padding:0;list-style:none}
.rqxk-bxh li{display:flex;align-items:center;gap:10px;padding:8px 6px;border-bottom:1px dashed #EADFCB;font-size:14.5px}
.rqxk-bxh li:last-child{border:0}
.rqxk-bxh .rqxk-h{flex:none;width:30px;height:30px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:900;background:var(--rqxk-kem2)}
.rqxk-bxh li:nth-child(1) .rqxk-h{background:#FFD54F}.rqxk-bxh li:nth-child(2) .rqxk-h{background:#E0E0E0}.rqxk-bxh li:nth-child(3) .rqxk-h{background:#FFCC80}
.rqxk-bxh .rqxk-tn{flex:1;min-width:0;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rqxk-bxh .rqxk-d{font-weight:900;color:var(--rqxk-do)}
.rqxk-bxh .rqxk-c{font-size:12px;color:var(--rqxk-nhat);min-width:44px;text-align:right}
.rqxk-bxh li.rqxk-toi{background:#FFF1F0;border-radius:12px}
.rqxk-trong{text-align:center;color:var(--rqxk-nhat);font-size:14px;padding:16px 4px}
.rqxk-cua-toi{margin-top:10px;background:var(--rqxk-kem);border-radius:14px;padding:10px 12px;font-size:14px;font-weight:700;text-align:center}

/* ô ghi danh ở màn kết thúc của game */
.rqxk-ghi{margin-top:10px;background:#FFF8E1;border:2px solid #FFE08A;border-radius:14px;padding:10px;font-size:14px;line-height:1.4;color:var(--rqxk-muc);text-align:center}
.rqxk-ghi .rqxk-hang{margin-top:8px}

@media (prefers-reduced-motion:reduce){
  .rqxk-nut:active{transform:none}
  .rqxk-man,.rqxk-bang{scroll-behavior:auto}
  .rqxk-demo .rqxk-tien i{transition:none!important}
  .rqxk-dau *,.rqxk-man *,.rqxk-demo *,.rqxk-bang *{animation:none!important;transition:none!important}
}
