/* 📋 Nhiệm vụ hằng ngày (quests.js) – tiền tố qx- */
.qx { padding: 16px 18px; }
.qx-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 10px; }
.qx-head h2 { margin: 0; font-size: 1.15rem; }
.qx-head small { color: var(--muted); font-size: .82rem; }
.qx-note { margin: 0 0 10px; padding: 8px 12px; border-radius: 12px; background: var(--accent-soft, rgba(91, 61, 245, .1)); font-size: .9rem; line-height: 1.45; }
.qx-note .link { font-weight: 800; }
.qx-list { display: flex; flex-direction: column; gap: 8px; }
.qx-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line, rgba(0, 0, 0, .1)); background: var(--card, #fff); }
.qx-row.done { border-color: #f5b301; box-shadow: 0 0 0 2px rgba(245, 179, 1, .18); }
.qx-row.got { opacity: .7; }
.qx-row.bonus { background: linear-gradient(90deg, rgba(245, 179, 1, .12), rgba(91, 61, 245, .08)); }
.qx-t { flex: 1; min-width: 0; }
.qx-t b { display: block; font-size: .95rem; line-height: 1.35; }
.qx-t small { color: var(--muted); font-size: .78rem; }
.qx-bar { height: 7px; margin: 6px 0 3px; border-radius: 99px; background: rgba(127, 127, 127, .18); overflow: hidden; }
.qx-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #22c55e, #16a34a); transition: width .4s; }
.qx-row.got .qx-bar i { background: #9ca3af; }
.qx-a { flex: none; }
.qx-a button { white-space: nowrap; }
/* nút Nhận: viền sáng ĐỨNG YÊN (không phóng to / thu nhỏ – nút nhấp nháy khó bấm trúng trên điện thoại) */
.qx-claim { box-shadow: 0 0 0 3px rgba(245, 179, 1, .45); }
.qx-got { color: #16a34a; font-weight: 800; font-size: .9rem; white-space: nowrap; }
.qx-lock { color: var(--muted); font-weight: 800; }
.qx-how { margin: 10px 0 0; color: var(--muted); font-size: .82rem; }
.qx-toast { position: fixed; left: 50%; bottom: 90px; z-index: 90; transform: translate(-50%, 20px); max-width: min(520px, calc(100vw - 32px)); padding: 10px 16px; border-radius: 14px;
  background: #1d1b2c; color: #fff; font-weight: 700; font-size: .92rem; line-height: 1.4; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
.qx-toast.show { opacity: 1; transform: translate(-50%, 0); }
.qx-toast.ok { background: #15803d; }
.qx-toast.bad { background: #b42318; }
@media (max-width: 520px) {
  .qx { padding: 14px 12px; }
  .qx-row { gap: 8px; padding: 9px 10px; }
  .qx-t b { font-size: .9rem; }
}

/* 🪙 đã nhận / tổng hôm nay */
.qx-sum { margin-left: 6px; padding: 2px 9px; border-radius: 99px; background: rgba(245, 179, 1, .16); font-size: .82rem; font-weight: 800; vertical-align: middle; }

/* 🧠 Giải đố 3D nhỏ (hộp thoại) */
.qx-pzdlg { width: min(440px, calc(100vw - 20px)); max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px); overflow-y: auto; padding: 18px 16px 14px; border: 0; border-radius: 18px; position: relative; }
.qx-pzdlg h2 { margin: 0 34px 6px 0; font-size: 1.15rem; }
.qx-pzx { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; padding: 0; border-radius: 50%; font-size: 1.05rem; line-height: 1; }
.qx-pzi { margin: 0 0 6px; font-size: .9rem; line-height: 1.45; }
.qx-pzbox { display: flex; justify-content: center; }
.qx-scene { width: 100%; max-width: 280px; height: 250px; margin: 0 auto; cursor: grab; touch-action: none; box-sizing: border-box; }
/* chữ tên mặt trên ô giữa: trắng viền đen → đọc rõ trên mọi màu (kể cả mặt trắng / vàng) */
.qx-scene .qx-lbl { display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 22px; color: #fff !important; opacity: 1 !important;
  text-shadow: 0 0 3px #000, 0 0 3px #000, 1px 1px 0 #000, -1px -1px 0 #000; font-family: var(--font-mono, monospace); }
.qx-pzn { margin: 2px 0 8px; text-align: center; font-weight: 800; }
.qx-pad { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.qx-pad button { min-height: 44px; padding: 0; font-family: var(--font-mono, monospace); font-weight: 700; font-size: 16px; }
.qx-pzctl { display: flex; gap: 8px; justify-content: center; margin-top: 8px; }
.qx-pzmsg { min-height: 1.4em; margin: 8px 0 0; text-align: center; font-weight: 800; color: #16a34a; }
.qx-pztip { margin: 6px 0 0; color: var(--muted); font-size: .8rem; line-height: 1.45; }
@media (max-width: 520px) { .qx-scene { max-width: 240px; height: 220px; } .qx-pad button { min-height: 42px; font-size: 15px; } }

/* 🎁 Quà điểm danh 7 ngày (checkin.js) – tiền tố ck- */
.ck { padding: 16px 18px; }
.ck-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.ck-head h2 { margin: 0; font-size: 1.15rem; }
.ck-x { width: 36px; height: 36px; padding: 0; border-radius: 50%; flex: none; }
.ck-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.ck-day { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; border-radius: 12px; border: 1px solid var(--line, rgba(0, 0, 0, .1)); background: var(--card, #fff); text-align: center; }
.ck-day small { font-size: .7rem; color: var(--muted); white-space: nowrap; }
.ck-day i { font-style: normal; font-size: 1.3rem; line-height: 1.2; }
.ck-day b { font-size: .85rem; line-height: 1.15; }
.ck-day.big { background: linear-gradient(160deg, rgba(245, 179, 1, .22), rgba(91, 61, 245, .14)); }
.ck-day.today { border: 2px solid #f5b301; box-shadow: 0 0 0 3px rgba(245, 179, 1, .25); }
.ck-day.got { opacity: .55; }
.ck-ok { position: absolute; top: 2px; right: 5px; color: #16a34a; font-weight: 900; }
.ck-act { margin-top: 12px; text-align: center; }
.ck-act .primary { min-height: 44px; padding: 0 18px; box-shadow: 0 0 0 3px rgba(245, 179, 1, .45); }
.ck-done { margin: 0; color: #16a34a; font-weight: 800; }
.ck-how { margin: 10px 0 0; color: var(--muted); font-size: .8rem; line-height: 1.45; }
.ck-dlg { width: min(560px, calc(100vw - 20px)); border: 0; border-radius: 18px; }
@media (max-width: 520px) {
  .ck { padding: 14px 10px; }
  .ck-days { gap: 4px; }
  .ck-day { padding: 6px 1px; border-radius: 10px; }
  .ck-day i { font-size: 1.1rem; }
  .ck-day b { font-size: .74rem; }
  .ck-day small { font-size: .62rem; }
}

/* 🧩 Thử thách Rubik tuần (weekly.js) – tiền tố wk- */
.wk { padding: 16px 18px; }
.wk-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 8px; }
.wk-head h2 { margin: 0; font-size: 1.15rem; }
.wk-head small { color: var(--muted); font-size: .82rem; }
.wk-rules { margin: 0 0 10px; padding-left: 20px; font-size: .9rem; line-height: 1.5; }
.wk-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; font-size: .9rem; }
.wk-ctl button { padding: 6px 12px; border-radius: 99px; font-weight: 700; }
.wk-ctl button.on { background: var(--accent, #5b3df5); border-color: var(--accent, #5b3df5); color: #fff; }
.wk-go { min-height: 44px; padding: 0 20px; }
.wk-run { margin: 0 0 10px; color: #b45309; font-weight: 800; }
.wk-res { margin: 0 0 10px; font-size: 1.02rem; }
.wk-res b { font-size: 1.2rem; color: #16a34a; }
.wk-res.bad { color: #b42318; font-weight: 700; }
.wk-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 10px 0; padding: 8px 12px; border-radius: 12px; background: var(--accent-soft, rgba(91, 61, 245, .1)); font-size: .9rem; }
.wk-top span.me b { color: var(--accent, #5b3df5); }
.wk-top a { margin-left: auto; font-weight: 700; }
