/* Lane R2 — lý do tặng quà (SPEC 4.15): cảnh tượng quà lớn / thức tỉnh (#ctUi, canh_tuong.js), thẻ dải 290–380 (nạp đầu, Tiên Lệnh,
   thức tỉnh, lên bậc chiến lệnh), ô NẠP ĐẦU ×2 + dòng Tiên Lệnh trên hộp QUÀ (gift_panel.js .gp-r2), panel chiến lệnh (.pn.k-chienlenh),
   viền sáng tướng thức tỉnh trên sân (.ts.awk). Ảnh: public/art/ui/r2/ (tools/ui/cat_r2.mjs, atlas actWarOrder / firstCharge). */

/* ---------- cảnh tượng giữa tâm cảnh 380–900 (DOM trên #ui5; rối + màn tối ở lớp Egret 'front') ---------- */
#ctUi { position: absolute; left: 0; width: 1080px; z-index: 17; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity .35s; contain: layout style; }
#ctUi.in { opacity: 1; }
#ctUi.out { opacity: 0; transition: opacity .45s; }
.ct-ttl { position: absolute; left: 0; top: 6px; width: 1080px; text-align: center; }
.ct-ttl b { display: inline-block; font-family: var(--f-title); font-size: 58px; line-height: 66px; font-weight: 800; letter-spacing: 3px; color: #ffe27a;
  text-shadow: 0 0 22px rgba(255, 200, 60, .95), 0 4px 0 #6a2a00, var(--ol); animation: ctIn .6s cubic-bezier(.2, 1.5, .4, 1) both, ctGlow 1.4s ease-in-out .6s infinite; }
.ct-thuctinh .ct-ttl b { color: #f2dcff; text-shadow: 0 0 22px rgba(196, 140, 255, .95), 0 4px 0 #3a1460, var(--ol); }
.ct-who { position: absolute; left: 0; top: 78px; width: 1080px; display: flex; justify-content: center; align-items: center; gap: 16px; animation: ctIn .5s .15s cubic-bezier(.2, 1.4, .4, 1) both; }
.ct-who .av { flex: none; box-shadow: 0 0 0 4px #ffd257, 0 0 18px rgba(255, 210, 90, .8); }
.ct-nm { max-width: 760px; font-size: 52px; line-height: 62px; font-weight: 800; color: #fff6e0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 0 14px rgba(255, 220, 140, .7), var(--ol); }
.ct-sub { position: absolute; left: 40px; top: 146px; width: 1000px; text-align: center; font-size: 34px; line-height: 42px; font-weight: 800; color: #fff0d8;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: var(--ol); animation: ctIn .5s .3s ease-out both; }
.ct-sub .ct-hn { color: #ffd257; }
.ct-thuctinh .ct-sub .ct-hn { color: #e2c4ff; }
.ct-ben { position: absolute; left: 0; top: 470px; width: 1080px; text-align: center; animation: ctIn .5s .45s ease-out both; }
.ct-ben > span { display: inline-block; max-width: 1000px; box-sizing: border-box; padding: 0 22px; border-radius: 22px; font-size: 30px; line-height: 42px; font-weight: 800; color: #fff6e0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: rgba(16, 10, 4, .78); box-shadow: 0 0 0 2px rgba(255, 210, 90, .8); text-shadow: var(--ol); }
.ct-thuctinh .ct-ben > span { box-shadow: 0 0 0 2px rgba(196, 140, 255, .85); }
@keyframes ctIn { 0% { opacity: 0; transform: scale(.55); } 100% { opacity: 1; transform: none; } }
@keyframes ctGlow { 50% { filter: brightness(1.25); } }
/* đang diễn: hộp CÁCH CHƠI / QUÀ + phần DOM tâm cảnh của trang trong #ui5 (trừ dải hoạt động) ẩn; tâm pha mặc định ẩn */
body.ct-on #ui5 > *:not(.pf) { opacity: 0 !important; visibility: hidden; transition: opacity .25s, visibility 0s .25s; }
body.ct-on #dai .dai-pha { opacity: 0; visibility: hidden; }

/* ---------- thẻ dải 290–380 ---------- */
.cd-r2.nd { background: linear-gradient(90deg, rgba(120, 70, 8, .94), rgba(46, 22, 6, .88)); border-top-color: #ffd257; }
.cd-r2.tt { background: linear-gradient(90deg, rgba(76, 30, 120, .94), rgba(24, 10, 44, .88)); border-top-color: #d6a8ff; }
.cd-r2.mo { background: linear-gradient(90deg, rgba(84, 40, 130, .94), rgba(20, 10, 40, .88)); border-top-color: #c48cff; }
.cd-r2.len { background: linear-gradient(90deg, rgba(40, 44, 110, .92), rgba(12, 12, 36, .86)); }
.r2-bd { display: inline-block; margin-right: 6px; padding: 0 14px; border-radius: 10px; font-family: var(--f-title); font-size: 28px; line-height: 38px; font-weight: 800; letter-spacing: 1px;
  color: #3a1a06; background: linear-gradient(180deg, #fff3c4, #ffd257 55%, #e8a23a) center / 100% 100% no-repeat; text-shadow: none; box-shadow: 0 0 10px rgba(255, 210, 90, .85); }
.r2-bd.tt, .r2-bd.mo { color: #2a0a40; background: linear-gradient(180deg, #f6e8ff, #d6a8ff 55%, #9a5ad6); box-shadow: 0 0 10px rgba(196, 140, 255, .85); }
.cd-r2 .cd-l2 { font-size: 26px; }
.cd-r2 .cd-l2 .go { color: #ffe08a; }
.r2-ic { flex: none; width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 0 6px rgba(255, 210, 90, .9)); }
.r2-huy { display: inline-block; vertical-align: middle; width: 46px; height: 46px; margin: -6px 8px 0 0; background: center / contain no-repeat; text-align: center; }
.r2-huy b { display: block; font-size: 24px; line-height: 46px; color: #fff !important; text-shadow: var(--ol); }
.r2-tl { color: #e2c4ff; font-weight: 800; white-space: nowrap; }

/* ---------- tướng thức tỉnh trên sân: viền sáng vàng quanh sprite ---------- */
.ts.awk .ts-sp { filter: drop-shadow(0 0 3px #fff3c4) drop-shadow(0 0 7px rgba(255, 200, 70, .95)); }

/* ---------- hộp QUÀ: ô NẠP ĐẦU ×2 + Tiên Lệnh mùa của người vừa tương tác (phủ phần dưới 8 s) ---------- */
.gp-r2 { position: absolute; left: 0; right: 0; top: 40px; bottom: 0; z-index: 3; box-sizing: border-box; padding: 6px 10px; border-radius: 0 0 12px 12px;
  background: linear-gradient(180deg, rgba(34, 18, 6, .95), rgba(14, 8, 4, .97)); opacity: 0; transform: translateY(12px); transition: opacity .3s, transform .3s; }
.gp-r2.on { opacity: 1; transform: none; }
.gp-r2 .av { float: left; margin: 2px 8px 0 0; box-shadow: 0 0 0 2px #ffd257; }
.gp-r2n { font-size: 26px; line-height: 32px; font-weight: 800; color: #fff6e0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: var(--ol); }
.gp-r2o { clear: left; position: relative; margin-top: 6px; height: 84px; box-sizing: border-box; padding: 2px 10px; display: flex; flex-direction: column; justify-content: center;
  background: center / 100% 100% no-repeat; border-radius: 10px; }
.gp-r2o b { font-family: var(--f-title); font-size: 28px; line-height: 30px; font-weight: 800; letter-spacing: 1px; color: #ffe27a; text-shadow: 0 0 10px rgba(255, 200, 60, .9), var(--ol); }
.gp-r2o span { font-size: 22px; line-height: 26px; font-weight: 700; color: #fff0d8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: var(--ol); }
.gp-r2o.on b { animation: ctGlow 1s ease-in-out infinite; }
.gp-r2o.used { filter: grayscale(.7) brightness(.8); }
.gp-r2t { clear: left; margin-top: 6px; font-size: 24px; line-height: 28px; font-weight: 800; color: #e2c4ff; white-space: normal; overflow: hidden; max-height: 56px; text-shadow: var(--ol); }
.gp-r2t i { font-style: normal; color: #ffe08a; }

/* ---------- panel chiến lệnh (.pn zoom .79 → chữ ≥ 30 px trước khi co) ---------- */
.pn.k-chienlenh .pn-b { margin-top: 10px; }
.cl-dau { position: relative; height: 122px; border-radius: 12px; overflow: hidden; background: center / cover no-repeat; box-shadow: inset 0 0 0 2px rgba(244, 212, 127, .6); }
.cl-dau::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(12, 10, 40, .78), rgba(12, 10, 40, .25) 60%, rgba(12, 10, 40, .6)); }
.cl-huy { position: absolute; left: 14px; top: 5px; width: 112px; height: 112px; z-index: 1; background: center / contain no-repeat; text-align: center; }
.cl-huy b { display: block; margin-top: 18px; font-family: var(--f-title); font-size: 48px; line-height: 52px; font-weight: 800; color: #fff; text-shadow: var(--ol); }
.cl-huy span { display: block; font-size: 24px; line-height: 26px; font-weight: 800; color: #fff3c4; text-shadow: var(--ol); }
.cl-info { position: absolute; left: 140px; right: 16px; top: 8px; z-index: 1; }
.cl-mua { font-size: 32px; line-height: 40px; font-weight: 800; color: #ffe9b0; text-shadow: var(--ol); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-bar { position: relative; height: 40px; margin-top: 10px; border-radius: 20px; overflow: hidden; background: center / 100% 100% no-repeat; box-shadow: 0 0 0 2px rgba(255, 255, 255, .35); }
.cl-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 20px; background: linear-gradient(180deg, #fff3c4, #ffd257 55%, #e89a2a); }
.cl-bar span { position: relative; display: block; text-align: center; font-size: 28px; line-height: 40px; font-weight: 800; color: #fff; text-shadow: var(--ol); }
.cl-tabs { display: flex; gap: 12px; margin: 10px 0 6px; }
.cl-tab { flex: 1; height: 48px; border-radius: 12px; text-align: center; font-family: var(--f-title); font-size: 32px; line-height: 48px; font-weight: 800; letter-spacing: 1px; text-shadow: var(--ol); }
.cl-tab.free { color: #e6f4ff; background: linear-gradient(180deg, rgba(60, 120, 220, .7), rgba(20, 40, 90, .8)); }
.cl-tab.tl { color: #f4e4ff; background: linear-gradient(180deg, rgba(150, 80, 220, .75), rgba(50, 20, 90, .85)); }
.cl-tab.tl.lock { filter: grayscale(.5) brightness(.85); }
.cl-tab.on { box-shadow: 0 0 0 3px #ffd257, 0 0 14px rgba(255, 210, 90, .6); }
.cl-rows { display: flex; flex-direction: column; gap: 6px; }
.cl-r { display: grid; grid-template-columns: 110px 1fr 1fr; gap: 10px; align-items: center; min-height: 48px; }
.cl-lv { height: 46px; border-radius: 23px; text-align: center; font-size: 30px; line-height: 46px; font-weight: 800; color: #fff3c4; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 2px rgba(244, 212, 127, .35); }
.cl-r.big .cl-lv { color: #3a1a06; background: linear-gradient(180deg, #fff3c4, #ffd257); }
.cl-c { position: relative; min-width: 0; padding: 6px 12px 6px 52px; border-radius: 12px; font-size: 28px; line-height: 32px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: var(--ol); }
.cl-c img { position: absolute; left: 6px; top: 50%; width: 40px; height: 34px; margin-top: -17px; object-fit: contain; }
.cl-c.free { color: #e6f4ff; background: rgba(60, 120, 220, .22); }
.cl-c.tl { color: #f4e4ff; background: rgba(150, 80, 220, .26); }
.cl-c.tl.big { color: #fff3c4; background: linear-gradient(90deg, rgba(200, 120, 30, .55), rgba(150, 80, 220, .35)); box-shadow: inset 0 0 0 2px #ffd257; }
.cl-c.got { opacity: .55; }
.cl-c.got::after { content: '✓'; position: absolute; right: 10px; top: 0; color: #8dffb8; }
.cl-foot { margin-top: 8px; padding: 8px 12px; border-radius: 12px; font-size: 30px; line-height: 38px; font-weight: 800; color: #f4e4ff; background: rgba(150, 80, 220, .2); text-shadow: var(--ol); }
.cl-foot i { font-style: normal; color: #ffe08a; }

/* cảnh tượng chen ngang trận đang diễn: lớp DOM đấu trường (tên, máu, bong bóng, chip quà) ẩn trong lúc diễn — rối đấu thủ mờ dưới màn tối */
body.ct-on #dauTruong { opacity: 0 !important; visibility: hidden; transition: opacity .25s, visibility 0s .25s; }
/* chữ trên huy hiệu thẻ: thắng luật chung .cd-l1 b (màu vàng) */
.cd-l1 b.r2-bd { color: #3a1a06; }
.cd-l1 b.r2-bd.tt, .cd-l1 b.r2-bd.mo { color: #2a0a40; }
