/* =========================================================
   EduLabs – Trò chơi "Chiếc nón kỳ diệu" (tiền tố lớp: cnk-)
   Sân khấu cao 720px, rộng 1280–1680px co giãn đều · ảnh ở assets/games/chiec-non/
   ========================================================= */
.ge-stage .cnk-host, .gp-host.cnk-host { position: absolute; inset: 0; }
.cnk-host [hidden] { display: none !important; }
.cnk-host img { max-width: none; }
.cnk-host { position: relative; overflow: hidden; width: 100%; height: 100%; background: #160a52; font-family: "Be Vietnam Pro", "Segoe UI", system-ui, sans-serif; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.cnk-backdrop { position: absolute; inset: -40px; background: url(../games/chiec-non/bg-stage-blur.jpg) center/cover; filter: blur(14px) brightness(.6); }
.cnk-layer { position: absolute; left: 0; top: 0; width: 1280px; height: 720px; transform-origin: 0 0; overflow: hidden; }
.cnk-scr { position: absolute; inset: 0; display: none; }
.cnk-scr.on { display: block; }
.cnk-loading { position: absolute; inset: 0; display: grid; place-items: center; color: #ffe27a; font: 800 26px/1 "Be Vietnam Pro", sans-serif; background: #160a52; z-index: 5000; }
.cnk-play > *, .cnk-sum > * { position: absolute; }
.cnk-bg { left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }

/* ---------- HUD ---------- */
.cnk-hud { inset: 0 0 auto 0; height: 0; }
.cnk-hud > * { position: absolute; z-index: 60; }
.cnk-hud > .cnk-tools { z-index: 450; }
.cnk-logo { filter: drop-shadow(0 6px 10px rgba(10, 0, 50, .55)); animation: cnkFloat 4s ease-in-out infinite; }
@keyframes cnkFloat { 50% { transform: translateY(-3px) } }
.cnk-pill { display: grid; place-items: center; border-style: solid; border-width: 22px 30px; border-image: url(../games/chiec-non/pill-blue.webp) 72 76 fill / 22px 30px stretch; box-sizing: border-box; }
.cnk-pill.cnk-p-score { border-image-source: url(../games/chiec-non/pill-purple.webp); }
.cnk-pill > img { display: none; }
.cnk-pill > span { position: absolute; inset: 0 14px; display: flex; align-items: center; justify-content: center; white-space: nowrap; color: #fff; font: 800 25px/1 "Be Vietnam Pro", sans-serif; text-shadow: 0 2px 0 #10106a, 0 0 6px rgba(0, 0, 60, .6); }
.cnk-pill b { color: #ffe23e; margin-left: 8px; font-weight: 900; text-shadow: 0 2px 0 #7a4a00, 0 0 8px rgba(255, 220, 60, .5); }
.cnk-who { font-style: normal; font-size: 17px; margin-right: 4px; max-width: 90px; overflow: hidden; text-overflow: ellipsis; }
.cnk-teams { display: flex; flex-wrap: wrap; gap: 4px 6px; align-content: center; }
.cnk-team { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 6px; border-radius: 99px; background: rgba(16, 10, 80, .72); border: 2px solid rgba(255, 215, 90, .45); color: #fff; font: 700 13px/1.1 "Be Vietnam Pro", sans-serif; max-width: 150px; }
.cnk-team i { width: 10px; height: 10px; border-radius: 50%; background: var(--tc); flex-shrink: 0; }
.cnk-team b { color: #ffe23e; margin-left: 2px; }
.cnk-team.on { border-color: #ffd23f; box-shadow: 0 0 10px #ffc21f; background: rgba(60, 30, 140, .9); }
.cnk-tools { display: flex; justify-content: flex-end; gap: 10px; }
.cnk-tool { position: relative; width: 58px; height: 58px; padding: 0; border: 0; background: none; cursor: pointer; transition: transform .15s; }
.cnk-tool img { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 4px 5px rgba(0, 0, 40, .5)); }
.cnk-tool .off { display: none; }
.cnk-muted .cnk-tool[data-a="sound"] .on, .cnk-fs .cnk-tool[data-a="fs"] .on { display: none; }
.cnk-muted .cnk-tool[data-a="sound"] .off, .cnk-fs .cnk-tool[data-a="fs"] .off { display: block; }
.cnk-tool:hover { transform: scale(1.07); }
.cnk-tool:active { transform: scale(.94); }
.cnk-t-exit { width: 46px; height: 46px; margin-top: 6px; }
.cnk-t-exit b { position: absolute; inset: 0; display: grid; place-items: center; color: #ffe27a; font: 900 22px/1 sans-serif; text-shadow: 0 2px 0 #0a1a6a; }
.cnk-edit .cnk-tools { pointer-events: none; }

/* ---------- câu hỏi ---------- */
.cnk-q { z-index: 40; box-sizing: border-box; padding: 15px 52px; display: flex; align-items: center; justify-content: center; }
.cnk-q::before { content: ""; position: absolute; inset: 0; border-style: solid; border-width: 32px 40px; border-image: url(../games/chiec-non/q-frame.webp) 124 128 fill / 32px 40px stretch; filter: drop-shadow(0 6px 8px rgba(10, 0, 60, .5)); z-index: -1; }
.cnk-qt { position: relative; width: 100%; text-align: center; color: #1d237a; font-weight: 800; font-size: 24px; line-height: 1.28; overflow-wrap: anywhere; }
.cnk-q.in { animation: cnkQIn .5s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes cnkQIn { from { transform: scale(.85); opacity: 0 } }
.cnk-img { max-height: 60px; vertical-align: middle; border-radius: 6px; }
.cnk-frac { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; font-size: .8em; line-height: 1.05; margin: 0 2px; }
.cnk-frac span:first-child { border-bottom: 2px solid currentColor; }

/* ---------- bảng ô chữ ---------- */
.cnk-board { z-index: 30; }
.cnk-bframe { position: absolute; inset: 0; border-style: solid; border-color: transparent; border-image: url(../games/chiec-non/board.webp) 132 153 133 130 fill round; filter: drop-shadow(0 8px 14px rgba(5, 0, 50, .6)); box-sizing: border-box; }
.cnk-board .cnk-bframe { animation: cnkBulb 1.6s steps(2) infinite; }
@keyframes cnkBulb { 50% { filter: drop-shadow(0 8px 14px rgba(5, 0, 50, .6)) brightness(1.08) saturate(1.1); } }
.cnk-grid { position: absolute; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: var(--cg, 6px); }
.cnk-row { display: flex; gap: var(--cg, 6px); }
.cnk-cell { position: relative; width: var(--cs, 50px); height: var(--cs, 50px); perspective: 400px; flex-shrink: 0; }
.cnk-cell.off { background: url(../games/chiec-non/tile-off.webp) center/100% 100%; opacity: .3; }
.cnk-f { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform .34s ease-in-out; display: grid; place-items: center; }
.cnk-fb { background: url(../games/chiec-non/tile-hidden.webp) center/100% 100%; filter: drop-shadow(0 3px 3px rgba(0, 10, 60, .45)); }
.cnk-ff { background: url(../games/chiec-non/tile-open.webp) center/100% 100%; transform: rotateY(180deg); filter: drop-shadow(0 3px 3px rgba(0, 10, 60, .45)); }
.cnk-ff b { font: 900 var(--cf, 30px)/1 "Be Vietnam Pro", sans-serif; color: #1c2380; padding-top: 4%; text-shadow: 0 1px 0 #fff; }
.cnk-cell.open .cnk-fb { transform: rotateY(-180deg); }
.cnk-cell.open .cnk-ff { transform: rotateY(0); }
.cnk-cell.flip::after { content: ""; position: absolute; inset: -9%; background: url(../games/chiec-non/tile-glow.webp) center/100% 100%; animation: cnkGlow .65s ease-out forwards; pointer-events: none; z-index: 2; }
@keyframes cnkGlow { 0% { opacity: 0; transform: scale(.9) } 25% { opacity: 1 } 100% { opacity: 0; transform: scale(1.12) } }
.cnk-cell.flip { z-index: 3; animation: cnkCellPop .65s ease-out; }
@keyframes cnkCellPop { 40% { transform: scale(1.14) } }
.cnk-grid.in .cnk-cell:not(.off) { animation: cnkCellIn .45s cubic-bezier(.3, 1.5, .5, 1) backwards; }
@keyframes cnkCellIn { from { transform: scale(.2); opacity: 0 } }
.cnk-grid.done .cnk-cell:not(.off) { animation: cnkWave 1s ease-in-out 2; }
@keyframes cnkWave { 30% { transform: translateY(-6px) scale(1.06) } }
.cnk-edit .cnk-cell .cnk-f { transition: none; }

/* ---------- vòng quay (tâm ở mép phải, chỉ thấy nửa trái) ---------- */
.cnk-wheel { z-index: 20; cursor: pointer; }
.cnk-disc { position: absolute; will-change: transform; }
.cnk-wimg { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 6px 10px rgba(0, 0, 40, .45)); }
.cnk-labels { position: absolute; width: 0; height: 0; }
.cnk-lab { position: absolute; left: 0; top: 0; white-space: nowrap; text-align: center; color: #fff; font: 900 30px/1 "Be Vietnam Pro", sans-serif; letter-spacing: .5px;
  text-shadow: 0 2px 0 rgba(30, 10, 80, .9), 0 0 2px rgba(30, 10, 80, .9), 2px 0 0 rgba(30, 10, 80, .5), -2px 0 0 rgba(30, 10, 80, .5); }
.cnk-lab.two { font-size: 16px; line-height: 1.05; }
.cnk-lab.t-double { font-size: 34px; color: #fff6a8; }
.cnk-lab.t-lucky { color: #fff6a8; }
.cnk-lab.t-lose, .cnk-lab.t-minus { color: #ffe0e0; }
.cnk-lab.hit { animation: cnkHit 1.2s ease-out; }
@keyframes cnkHit { 30% { color: #ffe23e; text-shadow: 0 0 10px #fff, 0 0 18px #ffd23f; } }
.cnk-ring { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; animation: cnkBulb 1.2s steps(2) infinite; }
.cnk-hub { position: absolute; pointer-events: none; filter: drop-shadow(0 3px 4px rgba(0, 0, 40, .5)); }
.cnk-pointer { z-index: 25; transform-origin: 50% 100%; transform: rotate(var(--rot, 315deg)); pointer-events: none; }
.cnk-pointer img { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(2px 4px 4px rgba(0, 0, 40, .6)); transform-origin: 50% 16%; }
/* kim gắn chốt ở đầu to (ngoài vành), mũi kim bị chốt trên đĩa gạt theo chiều quay (đĩa quay thuận chiều kim đồng hồ) rồi bật về */
.cnk-pointer.flap img { animation: cnkFlap .16s ease-out; }
@keyframes cnkFlap { 35% { transform: rotate(-16deg) } 75% { transform: rotate(3deg) } }
.cnk-play[data-phase="spin"] .cnk-wheel { filter: drop-shadow(0 0 10px rgba(255, 220, 90, .5)); }

/* ---------- robot MC ---------- */
.cnk-robot { z-index: 50; pointer-events: none; }
.cnk-rin { position: absolute; inset: 0; transform-origin: 50% 100%; animation: cnkBob 2.8s ease-in-out infinite; }
.cnk-rp { position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; opacity: 0; transition: opacity .18s; filter: drop-shadow(0 10px 8px rgba(0, 0, 40, .45)); }
.cnk-robot[data-pose="idle"] .cnk-rp-idle, .cnk-robot[data-pose="wave"] .cnk-rp-wave, .cnk-robot[data-pose="present"] .cnk-rp-present, .cnk-robot[data-pose="point"] .cnk-rp-point,
.cnk-robot[data-pose="think"] .cnk-rp-think, .cnk-robot[data-pose="happy"] .cnk-rp-happy, .cnk-robot[data-pose="sad"] .cnk-rp-sad, .cnk-robot[data-pose="cheer"] .cnk-rp-cheer { opacity: 1; }
.cnk-robot[data-pose="think"] .cnk-rin { animation: cnkSway 2.4s ease-in-out infinite; }
.cnk-robot[data-pose="sad"] .cnk-rin { animation: cnkSad 1.6s ease-in-out 1 forwards; }
.cnk-robot.hop .cnk-rin { animation: cnkHop .55s ease-out 2, cnkBob 2.8s ease-in-out 1.1s infinite; }
@keyframes cnkBob { 50% { transform: translateY(-5px) } }
@keyframes cnkSway { 25% { transform: rotate(-1.6deg) } 75% { transform: rotate(1.6deg) } }
@keyframes cnkSad { 30% { transform: translateY(4px) scaleY(.97) } 100% { transform: translateY(2px) } }
@keyframes cnkHop { 40% { transform: translateY(-16px) } 70% { transform: translateY(0) scaleY(.97) } }

.cnk-bubble { z-index: 55; pointer-events: none; transform-origin: 0 60%; }
.cnk-bubble > img { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 5px 6px rgba(0, 0, 40, .45)); }
.cnk-say { position: absolute; left: 34px; right: 14px; top: 10px; bottom: 12px; display: flex; align-items: center; justify-content: center; text-align: center; color: #1d237a; font: 800 21px/1.18 "Be Vietnam Pro", sans-serif; overflow: hidden; }
.cnk-bubble.pop { animation: cnkPop .35s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes cnkPop { from { transform: scale(.7); opacity: .3 } }

/* bảng hiển thị kết quả quay + 3 đèn */
.cnk-score { z-index: 45; }
.cnk-lights { position: absolute; left: 0; right: 0; top: 0; height: 26px; display: flex; justify-content: center; gap: 8px; align-items: center; }
.cnk-light { position: relative; width: 24px; height: 24px; }
.cnk-light img { position: absolute; inset: 0; width: 100%; height: 100%; }
.cnk-light .g { opacity: 0; transition: opacity .2s; }
.cnk-score[data-l="spin"] .cnk-light .g { animation: cnkChase .45s steps(1) infinite; }
.cnk-score[data-l="spin"] .cnk-light[data-i="1"] .g { animation-delay: .15s; }
.cnk-score[data-l="spin"] .cnk-light[data-i="2"] .g { animation-delay: .3s; }
@keyframes cnkChase { 0% { opacity: 1 } 33% { opacity: 0 } }
.cnk-score[data-l="done"] .cnk-light .g { opacity: 1; }
.cnk-timer { position: absolute; right: -6px; top: 1px; padding: 2px 8px; border-radius: 99px; background: #1a1470; border: 2px solid #ffcf3f; color: #fff; font: 800 14px/1.2 "Be Vietnam Pro", sans-serif; font-style: normal; }
.cnk-timer.warn { background: #c0182c; animation: cnkPulse .5s ease-in-out infinite alternate; }
@keyframes cnkPulse { to { transform: scale(1.1) } }
.cnk-sbox { position: absolute; left: 0; right: 0; top: 30px; height: 66px; }
.cnk-sbox > img { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 5px 6px rgba(0, 0, 40, .5)); }
.cnk-val { position: absolute; left: 22px; right: 22px; top: 12px; bottom: 12px; display: grid; place-items: center; color: #fff; font: 900 34px/1 "Consolas", "Courier New", monospace; letter-spacing: 1px; white-space: nowrap;
  text-shadow: 0 0 6px rgba(255, 255, 255, .7); }
.cnk-val[data-k="pts"] { color: #ffe23e; text-shadow: 0 0 8px rgba(255, 210, 50, .8); }
.cnk-val[data-k="dbl"], .cnk-val[data-k="lucky"] { color: #7dffb0; text-shadow: 0 0 8px rgba(90, 255, 160, .8); font-family: "Be Vietnam Pro", sans-serif; }
.cnk-val[data-k="lose"], .cnk-val[data-k="minus"] { color: #ff7a8a; text-shadow: 0 0 8px rgba(255, 80, 100, .8); font-family: "Be Vietnam Pro", sans-serif; }
.cnk-pts { position: absolute; left: 50%; top: 20px; transform: translateX(-50%); color: #ffe23e; font: 900 30px/1 "Be Vietnam Pro", sans-serif; text-shadow: 0 2px 0 #7a3a00, 0 0 10px rgba(255, 200, 40, .8); animation: cnkRise 1.5s ease-out forwards; pointer-events: none; white-space: nowrap; }
@keyframes cnkRise { from { opacity: 0; transform: translate(-50%, 10px) scale(.6) } 20% { opacity: 1; transform: translate(-50%, -14px) scale(1.15) } to { opacity: 0; transform: translate(-50%, -60px) } }

/* ---------- bàn phím chữ cái ---------- */
.cnk-kb { z-index: 40; display: flex; flex-direction: column; align-items: center; gap: var(--kg, 5px); }
.cnk-krow { display: flex; gap: var(--kg, 5px); }
.cnk-key { position: relative; width: var(--key, 52px); height: var(--key, 52px); padding: 0 0 2px; border: 0; cursor: pointer; background: url(../games/chiec-non/key.webp) center/100% 100% no-repeat; color: #fff;
  font: 900 calc(var(--key, 52px) * .5)/1 "Be Vietnam Pro", sans-serif; text-shadow: 0 2px 0 rgba(0, 10, 70, .75); filter: drop-shadow(0 3px 3px rgba(0, 0, 40, .45)); transition: transform .12s; }
.cnk-kb.live .cnk-key:not(:disabled):hover, .cnk-kb.live .cnk-key:not(:disabled):focus-visible { background-image: url(../games/chiec-non/key-hover.webp); transform: translateY(-3px) scale(1.06); outline: none; }
.cnk-kb.live .cnk-key:not(:disabled):active { transform: scale(.93); }
.cnk-key.ok { background-image: url(../games/chiec-non/key-ok.webp); }
.cnk-key.no { background-image: url(../games/chiec-non/key-no.webp); }
.cnk-key.dim { background-image: url(../games/chiec-non/key-off.webp); color: #f2f2f2; text-shadow: 0 1px 0 rgba(0, 0, 0, .45); cursor: default; }
.cnk-key:disabled { cursor: default; }
.cnk-key.shake { animation: cnkShake .35s; }
@keyframes cnkShake { 25% { transform: translateX(-4px) } 75% { transform: translateX(4px) } }
.cnk-kb.live { animation: cnkKbIn .3s ease-out; }
@keyframes cnkKbIn { from { filter: brightness(1.4) } }

/* ---------- nút Giải ô chữ / Quay nón (cùng kích thước, cùng hàng) ---------- */
.cnk-acts { z-index: 40; display: flex; gap: var(--gx, 34px); }
.cnk-btn { position: relative; width: var(--bw, 214px); height: 56px; padding: 0; border: 0; background: none; cursor: pointer; transition: transform .15s, filter .2s; }
.cnk-btn > .bg { position: absolute; inset: 0; width: 100%; height: 100%; display: none; }
.cnk-btn::before { content: ""; position: absolute; inset: 0; border-style: solid; border-width: 28px 32px; border-image: url(../games/chiec-non/btn-yellow.webp) 84 92 fill / 28px 32px stretch; filter: drop-shadow(0 5px 6px rgba(0, 0, 40, .5)); }
.cnk-b-solve::before, .cnk-b-exit::before, .cnk-b-cancel::before { border-image-source: url(../games/chiec-non/btn-teal.webp); }
.cnk-btn > span { position: relative; z-index: 1; display: block; color: #8a2400; font: 900 23px/56px "Be Vietnam Pro", sans-serif; letter-spacing: .5px; white-space: nowrap; text-shadow: 0 1px 0 rgba(255, 255, 255, .6); }
.cnk-b-solve > span, .cnk-b-exit > span, .cnk-b-cancel > span { color: #fff; text-shadow: 0 2px 0 #0a6a66, 0 0 4px rgba(0, 80, 80, .6); }
.cnk-btn:not(:disabled):hover { transform: translateY(-2px) scale(1.03); filter: brightness(1.06); }
.cnk-btn:not(:disabled):active { transform: scale(.96); }
.cnk-btn:disabled { filter: grayscale(.85) brightness(.75); cursor: default; }
.cnk-btn .dl, .cnk-btn .dr { position: absolute; top: 4px; height: 48px; width: auto; opacity: 0; pointer-events: none; z-index: 2; }
.cnk-btn .dl { left: -40px; } .cnk-btn .dr { right: -40px; }
.cnk-b-spin.ready .dl, .cnk-b-spin.ready .dr { opacity: 1; animation: cnkDash .9s ease-in-out infinite; }
.cnk-b-spin.ready { animation: cnkInvite 1.4s ease-in-out infinite; }
@keyframes cnkDash { 50% { opacity: .35; transform: scale(.88) } }
@keyframes cnkInvite { 50% { transform: scale(1.04) } }
.cnk-edit .cnk-btn, .cnk-edit .cnk-key { pointer-events: none; }
.cnk-edit .cnk-btn:disabled { filter: none; }
.cnk-edit .cnk-key.dim { background-image: url(../games/chiec-non/key.webp); color: #fff; text-shadow: 0 2px 0 rgba(0, 10, 70, .75); }

/* ---------- kết thúc vòng ---------- */
.cnk-rend { z-index: 46; display: grid; place-items: center; }
.cnk-rbox { position: relative; width: 100%; box-sizing: border-box; padding: 14px 26px 18px; text-align: center; border-radius: 26px; background: linear-gradient(#1f2aa8, #120c6e); border: 4px solid #ffc93a;
  box-shadow: 0 0 0 3px #a8660a, 0 10px 24px rgba(0, 0, 40, .55), inset 0 0 22px rgba(80, 140, 255, .35); animation: cnkPop .45s cubic-bezier(.3, 1.6, .5, 1); }
.cnk-rbox small { display: block; color: #9fd8ff; font: 700 16px/1.2 "Be Vietnam Pro", sans-serif; text-transform: uppercase; letter-spacing: 2px; }
.cnk-rbox > b { display: block; margin: 6px 0 4px; color: #ffe23e; font: 900 34px/1.2 "Be Vietnam Pro", sans-serif; text-shadow: 0 2px 0 #7a3a00, 0 0 12px rgba(255, 200, 40, .55); overflow-wrap: anywhere; }
.cnk-rbox p { margin: 0 0 6px; color: #e8ecff; font: 600 16px/1.35 "Be Vietnam Pro", sans-serif; }
.cnk-rbox .cnk-btn { margin-top: 8px; width: 280px; }

/* ---------- hiệu ứng ---------- */
.cnk-fxw { inset: 0; pointer-events: none; z-index: 70; }
.cnk-fx { position: absolute; pointer-events: none; }
.cnk-fx.pop { animation: cnkFxPop 1.4s ease-out forwards; }
.cnk-fx.spark { animation: cnkFxPop .9s ease-out forwards; }
.cnk-fx.rays { z-index: -1; animation: cnkRays 2s ease-out forwards; opacity: .0; }
@keyframes cnkFxPop { 0% { transform: scale(.3); opacity: 0 } 25% { transform: scale(1); opacity: 1 } 100% { transform: scale(1.25); opacity: 0 } }
@keyframes cnkRays { 0% { transform: scale(.4) rotate(0); opacity: 0 } 30% { opacity: .55 } 100% { transform: scale(1.3) rotate(40deg); opacity: 0 } }
.cnk-conf { position: absolute; width: 10px; height: 8px; border-radius: 2px; animation: cnkFall 2.6s cubic-bezier(.3, .2, .6, 1) forwards; }
.cnk-conf.loop { animation-iteration-count: infinite; animation-fill-mode: backwards; }
@keyframes cnkFall { 0% { transform: translate(0, 0) rotate(0); opacity: 1 } 100% { transform: translate(var(--dx), 820px) rotate(var(--rz)); opacity: .9 } }
.cnk-note { position: absolute; left: 50%; top: 80px; transform: translateX(-50%); z-index: 900; padding: 8px 18px; border-radius: 99px; background: rgba(20, 10, 90, .92); border: 2px solid #ffcf3f; color: #fff; font: 700 17px/1.3 "Be Vietnam Pro", sans-serif; white-space: nowrap; }

/* ---------- hộp giải ô chữ ---------- */
.cnk-solve { inset: 0; z-index: 300; display: grid; place-items: center; background: rgba(8, 4, 50, .55); }
.cnk-sbox2 { position: relative; width: 760px; box-sizing: border-box; padding: 18px 28px 20px; border-radius: 28px; text-align: center; background: linear-gradient(#fff8e6, #f6e3b8); border: 5px solid #f2b92a;
  box-shadow: 0 0 0 3px #a8660a, 0 18px 40px rgba(0, 0, 30, .6); animation: cnkPop .35s cubic-bezier(.3, 1.6, .5, 1); }
.cnk-sbox2 h3 { margin: 0 0 8px; color: #1d237a; font: 900 26px/1.2 "Be Vietnam Pro", sans-serif; letter-spacing: 1px; }
.cnk-pat { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin-bottom: 10px; }
.cnk-pw { display: flex; gap: 3px; }
.cnk-pw i { width: 24px; height: 28px; border-radius: 5px; background: #2fc6ef; box-shadow: inset 0 -3px 0 #1592b8; display: grid; place-items: center; color: #1d237a; font: 900 16px/1 "Be Vietnam Pro", sans-serif; font-style: normal; }
.cnk-pw i.o { background: #fff7e0; box-shadow: inset 0 0 0 2px #e8b13a; }
.cnk-in { width: 100%; box-sizing: border-box; padding: 10px 16px; border-radius: 14px; border: 3px solid #2a3aa8; background: #fff; color: #1d237a; font: 800 28px/1.2 "Be Vietnam Pro", sans-serif; text-align: center; text-transform: uppercase; outline: none; user-select: text; -webkit-user-select: text; }
.cnk-in::placeholder { font-size: 19px; font-weight: 600; text-transform: none; color: #9aa0c8; }
.cnk-vk .br { flex-basis: 100%; height: 0; }
.cnk-in:focus { box-shadow: 0 0 0 4px rgba(255, 200, 50, .6); }
.cnk-vk { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin: 10px 0 4px; }
.cnk-vk button { min-width: 38px; height: 36px; padding: 0 6px; border: 0; border-radius: 8px; background: linear-gradient(#3b5cff, #1d2fb8); color: #fff; font: 800 17px/1 "Be Vietnam Pro", sans-serif; cursor: pointer; box-shadow: 0 3px 0 #0d1670; }
.cnk-vk button:active { transform: translateY(2px); box-shadow: 0 1px 0 #0d1670; }
.cnk-vk .tn { background: linear-gradient(#ffb02e, #e07800); box-shadow: 0 3px 0 #8a4400; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: .9; min-width: 50px; }
.cnk-vk .tn small { font-size: 10px; font-weight: 700; }
.cnk-vk .wide { min-width: 86px; background: linear-gradient(#20c4b8, #0d8a84); box-shadow: 0 3px 0 #05504c; }
.cnk-sact { display: flex; justify-content: center; gap: 30px; margin-top: 10px; }
.cnk-sact .cnk-btn { width: 200px; }
.cnk-smsg { margin-top: 6px; color: #c0182c; font: 700 16px/1.3 "Be Vietnam Pro", sans-serif; }

/* ---------- màn mở đầu ---------- */
.cnk-intro { inset: 0; z-index: 400; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 45%, rgba(30, 16, 120, .82), rgba(8, 4, 50, .94)); }
.cnk-ibox { text-align: center; color: #fff; padding: 0 30px 26px; border-radius: 30px; animation: cnkPop .5s cubic-bezier(.3, 1.5, .5, 1); }
.cnk-ilogo { width: 340px; filter: drop-shadow(0 10px 20px rgba(0, 0, 40, .7)); animation: cnkFloat 3s ease-in-out infinite; }
.cnk-ibox p { margin: 4px 0 6px; font: 800 26px/1.3 "Be Vietnam Pro", sans-serif; color: #ffe27a; text-shadow: 0 2px 0 #2a1070; max-width: 900px; }
.cnk-irule { font: 700 21px/1.45 "Be Vietnam Pro", sans-serif; margin-bottom: 16px; text-shadow: 0 2px 4px #000; }
.cnk-irule small { font-size: 16px; color: #b8d8ff; }
.cnk-b-go { width: 260px; }

/* ---------- màn tổng kết ---------- */
.cnk-sbg { left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; }
.cnk-stitle { left: 0; right: 0; top: 26px; text-align: center; font: 900 50px/1.1 "Be Vietnam Pro", sans-serif; letter-spacing: 2px; color: #ffe23e;
  text-shadow: 0 3px 0 #b86a00, 0 6px 0 #6a2a00, 0 10px 18px rgba(0, 0, 40, .6); -webkit-text-stroke: 1.5px #7a3a00; animation: cnkPop .6s cubic-bezier(.3, 1.5, .5, 1); }
.cnk-panel { z-index: 3; }
.cnk-pimg { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 12px 20px rgba(0, 0, 40, .6)); }
.cnk-pin { position: absolute; left: 13%; right: 13%; top: 22%; bottom: 17%; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.cnk-total { display: flex; align-items: center; justify-content: center; gap: 16px; }
.cnk-total img { height: 74px; filter: drop-shadow(0 4px 6px rgba(0, 0, 40, .6)); animation: cnkSwing 2.4s ease-in-out infinite; transform-origin: 50% 0; }
@keyframes cnkSwing { 25% { transform: rotate(-6deg) } 75% { transform: rotate(6deg) } }
.cnk-total small { display: block; color: #9fd8ff; font: 700 16px/1 "Be Vietnam Pro", sans-serif; text-transform: uppercase; letter-spacing: 2px; }
.cnk-total b { display: block; color: #ffe23e; font: 900 50px/1.05 "Be Vietnam Pro", sans-serif; text-shadow: 0 3px 0 #8a4a00, 0 0 14px rgba(255, 210, 50, .6); }
.cnk-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 14px; }
.cnk-st { display: flex; justify-content: space-between; align-items: center; padding: 5px 12px; border-radius: 10px; background: rgba(255, 255, 255, .1); color: #e8ecff; font: 600 15px/1.2 "Be Vietnam Pro", sans-serif; gap: 8px; }
.cnk-st b { color: #fff; font-weight: 900; font-size: 18px; white-space: nowrap; }
.cnk-st.ok b { color: #7dffa0; } .cnk-st.no b { color: #ff9aa6; }
.cnk-st:last-child { grid-column: 1 / -1; }
.cnk-stats.sm .cnk-st { padding: 3px 10px; font-size: 13.5px; } .cnk-stats.sm .cnk-st b { font-size: 15px; }
.cnk-rank { display: flex; flex-direction: column; gap: 4px; }
.cnk-ri { display: flex; align-items: center; gap: 10px; padding: 2px 12px; border-radius: 12px; background: rgba(255, 255, 255, .1); color: #fff; font: 800 18px/1.2 "Be Vietnam Pro", sans-serif; }
.cnk-ri.top { background: linear-gradient(90deg, rgba(255, 210, 60, .35), rgba(255, 255, 255, .08)); }
.cnk-ri img { height: 34px; }
.cnk-ri em { width: 26px; text-align: center; font-style: normal; color: #b8c8ff; }
.cnk-ri i { width: 12px; height: 12px; border-radius: 50%; }
.cnk-ri span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cnk-ri b { color: #ffe23e; font-size: 22px; }
.cnk-sleft { z-index: 2; }
.cnk-trophy { position: absolute; left: 50%; top: 92px; width: 200px; transform: translateX(-50%); z-index: 2; filter: drop-shadow(0 10px 12px rgba(0, 0, 40, .55)); animation: cnkFloat 3s ease-in-out infinite; }
.cnk-podium { position: absolute; left: 0; bottom: 0; width: 250px; }
.cnk-swin { z-index: 4; filter: drop-shadow(0 12px 12px rgba(0, 0, 40, .5)); animation: cnkBob 2.4s ease-in-out infinite; }
.cnk-swin.great { animation: cnkRiseUp .9s cubic-bezier(.3, 1.4, .5, 1) both, cnkBob 2s ease-in-out .9s infinite; }
@keyframes cnkRiseUp { from { transform: translateY(260px) } }
.cnk-ssay { z-index: 4; text-align: center; color: #fff; font: 800 22px/1.3 "Be Vietnam Pro", sans-serif; text-shadow: 0 2px 0 #1a0a6a, 0 0 10px rgba(0, 0, 60, .8); }
.cnk-sact2 { z-index: 5; display: flex; justify-content: center; gap: 40px; }
.cnk-sact2 .cnk-btn { width: 220px; height: 58px; }
.cnk-sfx { inset: 0; pointer-events: none; z-index: 6; overflow: hidden; }
.cnk-sconf { position: absolute; width: 260px; animation: cnkFxPop 1.8s ease-out both; }

/* ---------- trang soạn (tao-game.html) ---------- */
.cnk-editing #opts .ge-opt:not([data-k="0"]) { display: none; }
.cnk-editing #opts .ge-opt .rd, .cnk-editing #opts .ge-opt .lt, .cnk-editing #opts .ge-opt .ck { display: none; }
.cnk-editing #opts .ge-opt textarea { font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.cnk-ansbox { margin-top: 8px; }
.cnk-ansbox .e, .cnk-ansbox .w { margin-top: 4px; font-size: 12.5px; padding: 4px 10px; border-radius: 8px; }
.cnk-ansbox .e { background: #fdecec; color: #b42318; } .cnk-ansbox .w { background: #fff6e0; color: #8a5a00; }
.cnk-mini { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px; border-radius: 12px; background: linear-gradient(#1b2a9a, #10106a); border: 3px solid #f2b92a; }
.cnk-mr { display: flex; gap: 10px; }
.cnk-mw { display: flex; gap: 2px; }
.cnk-mw i { width: 22px; height: 24px; border-radius: 4px; background: #fff3d6; box-shadow: inset 0 0 0 2px #e8b13a; color: #1d237a; display: grid; place-items: center; font: 900 14px/1 "Be Vietnam Pro", sans-serif; font-style: normal; }
.cnk-mw i.o { background: #d9f6ff; }
.cnk-minfo { margin-top: 5px; font-size: 12.5px; color: var(--text-muted, #6b7280); }
.cnk-set .cnk-r2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.cnk-set .cnk-r2 label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--text-muted, #6b7280); min-width: 0; }
.cnk-set .cnk-r2 .ge-sel { max-width: none; width: 100%; }
.cnk-set .cnk-tn { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.cnk-set .cnk-tn[hidden], .cnk-set .cnk-tn input[hidden] { display: none; }
.cnk-set .cnk-lab2 { font-size: 12.5px; color: var(--text-muted, #6b7280); margin-bottom: 4px; }
.cnk-set #cnkValues { width: 100%; box-sizing: border-box; margin-bottom: 6px; }
.cnk-set .cnk-sw { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px dashed var(--border, #e5e7eb); font-size: 13.5px; }
.cnk-set .cnk-sw > div { flex: 1; min-width: 0; }
.cnk-set .cnk-sw small { display: block; font-size: 11.5px; color: var(--text-muted, #6b7280); }
.cnk-set .cnk-sw .ge-sel { width: 76px; max-width: 76px; }
.cnk-wprev { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 12px; }
.cnk-wprev span { padding: 3px 8px; border-radius: 99px; background: var(--c); color: #fff; font: 800 12px/1.3 "Be Vietnam Pro", sans-serif; text-shadow: 0 1px 1px rgba(0, 0, 0, .4); }
.cnk-mus { display: flex; align-items: center; gap: 6px; color: var(--text-strong, #111); font-size: 13px; }
.cnk-imp { width: min(640px, 92vw); }
.cnk-imp textarea { width: 100%; box-sizing: border-box; font-size: 14px; }
.cnk-impinfo { margin: 6px 0 2px; font-size: 13px; color: var(--text-muted, #6b7280); }
