/* Trò chơi nhóm: dùng chung giao diện ChiaNè (chiane/assets/css/style.css), file này chỉ thêm phần riêng của trò chơi. */
.gm-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 640px) { .gm-grid { grid-template-columns: 1fr; } }
.gm-tile { display: flex; flex-direction: column; gap: 6px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px 20px; color: inherit; text-decoration: none; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s, border-color .15s; }
a.gm-tile:hover, a.gm-tile:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: var(--teal); outline: none; text-decoration: none; }
.gm-ico { font-size: 2.4rem; line-height: 1; }
.gm-tile h2 { margin: 8px 0 0; font-size: 1.15rem; }
.gm-tile p { margin: 0; color: var(--ink-2); font-size: .93rem; line-height: 1.5; }
.gm-go { margin-top: 10px; font-weight: 700; color: var(--teal); }
.gm-soon { background: transparent; border-style: dashed; box-shadow: none; opacity: .7; }

/* ---- Form vòng xoay ---- */
.wh-styles { border: 0; margin: 0; padding: 0; min-width: 0; }
.wh-styles legend { padding: 0; margin: 0 0 8px; font-weight: 600; font-size: .92rem; }
.wh-style-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
@media (max-width: 560px) { .wh-style-grid { grid-template-columns: repeat(3, 1fr); } }
.wh-style { display: grid; justify-items: center; gap: 4px; padding: 8px 4px 6px; border: 2px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; font: inherit; color: var(--ink); transition: border-color .15s, background-color .15s, box-shadow .15s; }
.wh-style:hover { border-color: var(--khaki); background: var(--khaki-soft); }
.wh-style.is-on { border-color: var(--teal); background: var(--teal-soft); box-shadow: 0 0 0 3px rgba(27,115,119,.14); }
.wh-style small { font-size: .78rem; font-weight: 600; }
.wh-mini { display: block; width: 100%; max-width: 76px; aspect-ratio: 1; }
.wh-mini .wh-svg { width: 100%; height: 100%; display: block; }
.wh-hint { margin: 6px 0 0; font-size: .85rem; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: space-between; }
.wh-count { font-weight: 700; color: var(--ink-2); }
.wh-count.is-over { color: var(--mahogany); }
.wh-of { margin-left: 4px; }
#wheelNames { display: block; width: 100%; min-height: 190px; padding: 12px 14px; border-radius: var(--r-md); border: 1.5px solid var(--line-strong); background: #fff; font: inherit; font-size: 16px; line-height: 1.55; resize: vertical; transition: border-color .15s ease, box-shadow .15s ease; appearance: none; -webkit-appearance: none; }
#wheelNames:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(27,115,119,.16); }

/* ---- Vòng quay ---- */
.wh-stage { text-align: center; }
.wh-stage .card-title { text-align: left; }
.wh-board { width: 100%; max-width: 520px; margin: 4px auto 0; aspect-ratio: 1; }
.wh-board .wh-svg { width: 100%; height: 100%; display: block; overflow: visible; user-select: none; -webkit-user-select: none; }
.wh-name { transition: opacity .2s; }
.wh-name.is-win { stroke-width: 5; }
.wh-result { margin: 8px auto 0; display: grid; gap: 2px; justify-items: center; padding: 12px 18px; max-width: 420px; border-radius: 18px; background: var(--teal-soft); border: 1px solid rgba(27,115,119,.25); animation: wh-pop .35s ease-out; }
.wh-result[hidden] { display: none; }
.wh-result-label { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--teal-deep); font-weight: 700; }
.wh-result strong { font-size: clamp(1.4rem, 6vw, 2rem); line-height: 1.2; color: var(--teal-deep); overflow-wrap: anywhere; }
.wh-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 16px; }
.wh-actions .btn { min-width: 150px; }
@keyframes wh-pop { from { transform: scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .wh-result { animation: none; } }

/* =====================================================
   Dùng chung: đầu trang có nút âm thanh, lựa chọn dạng nút, ô nhập nhiều dòng
   ===================================================== */
.gm-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sfx-btn { flex: none; white-space: nowrap; }
.sfx-btn.is-off { opacity: .7; }
.gm-choice { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.gm-opt { flex: 1 1 130px; min-height: 48px; padding: 10px 14px; border: 2px solid var(--line); border-radius: 14px; background: #fff; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; transition: border-color .15s, background-color .15s, box-shadow .15s; }
.gm-opt:hover { border-color: var(--khaki); background: var(--khaki-soft); }
.gm-opt.is-on { border-color: var(--teal); background: var(--teal-soft); box-shadow: 0 0 0 3px rgba(27,115,119,.14); }
.gm-ta { display: block; width: 100%; min-height: 120px; padding: 12px 14px; border-radius: var(--r-md); border: 1.5px solid var(--line-strong); background: #fff; font: inherit; font-size: 16px; line-height: 1.55; resize: vertical; appearance: none; -webkit-appearance: none; transition: border-color .15s ease, box-shadow .15s ease; }
.gm-ta:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(27,115,119,.16); }

/* =====================================================
   Bốc thăm may rủi
   ===================================================== */
.dr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 12px; perspective: 900px; }
.dr-card { position: relative; aspect-ratio: 3 / 4; padding: 0; border: 0; background: none; cursor: pointer; font: inherit; -webkit-tap-highlight-color: transparent; }
.dr-card:disabled { cursor: default; }
.dr-in { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.3,.7,.2,1); }
.dr-card.is-open .dr-in { transform: rotateY(180deg); }
.dr-face { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-radius: 14px; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 6px 16px -8px rgba(42,35,33,.5); overflow: hidden; }
.dr-back { background: repeating-linear-gradient(45deg, #1b7377 0 10px, #17666a 10px 20px); color: #fff; border: 3px solid #fff; font-size: 2.2rem; }
.dr-back b { font-size: 2.4rem; text-shadow: 0 2px 0 rgba(0,0,0,.25); }
.dr-back small { font-size: .78rem; opacity: .85; }
.dr-look-gift .dr-back { background: linear-gradient(135deg, #ef4444, #f97316); border-color: #fff3; }
.dr-look-gift .dr-back::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 14px; margin-top: -7px; background: rgba(255,255,255,.55); }
.dr-look-gift .dr-back::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 14px; margin-left: -7px; background: rgba(255,255,255,.55); }
.dr-look-gift .dr-back > * { position: relative; z-index: 1; }
.dr-front { transform: rotateY(180deg); background: #fffdf5; border: 3px solid #f5c542; padding: 8px; text-align: center; font-weight: 700; color: var(--ink); font-size: .95rem; line-height: 1.25; }
.dr-front span { overflow-wrap: anywhere; }
.dr-front.is-blank { background: #f1efe9; border-color: var(--line-strong); color: var(--ink-3); font-weight: 600; }
.dr-card.is-late .dr-front { opacity: .6; }
.dr-card:not(.is-open):hover .dr-in { transform: translateY(-4px) rotate(-2deg); }
.dr-card:not(.is-open):focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 14px; }
.dr-log { margin-top: 18px; text-align: left; }
.dr-log h3 { margin: 0 0 6px; font-size: .95rem; }
.dr-log ol { margin: 0; padding-left: 22px; display: grid; gap: 4px; }
.dr-log li.is-blank { color: var(--ink-3); }

/* =====================================================
   Bom hẹn giờ
   ===================================================== */
.bb-stage { text-align: center; }
.bb-stage .card-title { text-align: left; }
.bb-arena { --bb-shake: 0px; --bb-s: 1; display: grid; justify-items: center; gap: 6px; padding: 22px 12px; border-radius: 22px; background: linear-gradient(180deg, #f6f3ea, #ece7d8); }
.bb-bomb { margin-bottom: calc(var(--bb-s) * 16px); font-size: clamp(4rem, 22vw, 7rem); line-height: 1; transform: scale(var(--bb-s)); transition: transform .25s; filter: drop-shadow(0 8px 10px rgba(0,0,0,.25)); }
.bb-arena.is-lit .bb-bomb { animation: bb-shake .09s infinite alternate; }
.bb-arena.is-lit { background: linear-gradient(180deg, #fff1e0, #ffd9b8); }
.bb-arena.is-boom { background: radial-gradient(circle, #fff3b0, #ffb347 55%, #ef4444); animation: bb-flash .5s ease-out; }
.bb-name { min-height: 1.3em; font-size: clamp(1.8rem, 9vw, 3rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; overflow-wrap: anywhere; color: var(--ink); }
.bb-name.is-pop { animation: bb-pop .18s ease-out; }
.bb-sub { color: var(--ink-2); font-size: .95rem; max-width: 34ch; }
.bb-result { margin: 14px auto 0; display: grid; gap: 4px; justify-items: center; padding: 12px 18px; max-width: 420px; border-radius: 18px; background: #fdecec; border: 1px solid rgba(214,69,69,.3); animation: wh-pop .35s ease-out; }
.bb-result[hidden] { display: none; }
.bb-result .wh-result-label { color: #8a2b2b; }
.bb-result strong { font-size: clamp(1.4rem, 6vw, 2rem); color: #8a2b2b; overflow-wrap: anywhere; }
@keyframes bb-shake { from { transform: translate(calc(var(--bb-shake) * -1), 0) scale(var(--bb-s)) rotate(-3deg); } to { transform: translate(var(--bb-shake), 2px) scale(var(--bb-s)) rotate(3deg); } }
@keyframes bb-pop { from { transform: scale(.85); opacity: .5; } to { transform: none; opacity: 1; } }
@keyframes bb-flash { 0% { filter: brightness(2); } 100% { filter: none; } }

/* =====================================================
   Xúc xắc & đồng xu
   ===================================================== */
.dc-stage { text-align: center; }
.dc-stage .card-title { text-align: left; }
.dc-count { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 4px; font-weight: 600; font-size: .82rem; color: var(--ink-2); flex-wrap: wrap; justify-content: center; }
.dc-count output { min-width: 2ch; font-size: 1rem; font-weight: 800; color: var(--teal-deep); }
.dc-step { width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--line-strong); background: #fff; font-size: 1.05rem; line-height: 1; cursor: pointer; color: var(--ink); }
.dc-step:hover { border-color: var(--teal); background: var(--teal-soft); }
.dc-board { display: flex; flex-wrap: wrap; justify-content: center; gap: 28px 34px; padding: 80px 8px 66px; min-height: 190px; perspective: 800px; }
.dc-obj { position: relative; width: 84px; height: 84px; }
.dc-obj.is-jump { animation: dc-jump var(--d, 1500ms) cubic-bezier(.3,.6,.4,1); }
.dc-shadow { position: absolute; left: 6px; right: 6px; bottom: -22px; height: 12px; border-radius: 50%; background: rgba(0,0,0,.18); filter: blur(3px); }
.dc-cube { position: absolute; inset: 0; transform-style: preserve-3d; }
.dc-f { position: absolute; inset: 0; background: #fff; border: 2px solid #d9d4c6; border-radius: 12px; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: inset 0 0 14px rgba(0,0,0,.08); }
.dc-f.f1 { transform: translateZ(42px); }
.dc-f.f6 { transform: rotateY(180deg) translateZ(42px); }
.dc-f.f2 { transform: rotateX(90deg) translateZ(42px); }
.dc-f.f5 { transform: rotateX(-90deg) translateZ(42px); }
.dc-f.f3 { transform: rotateY(90deg) translateZ(42px); }
.dc-f.f4 { transform: rotateY(-90deg) translateZ(42px); }
.dc-pips { position: absolute; inset: 10px; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); place-items: center; }
.dc-pips i { width: 15px; height: 15px; border-radius: 50%; }
.dc-pips i.on { background: radial-gradient(circle at 35% 30%, #4b4b4b, #111); }
.dc-f.f1 .dc-pips i.on { background: radial-gradient(circle at 35% 30%, #ff6b6b, #c81e1e); width: 20px; height: 20px; }
.dc-board[data-mode="coin"] .dc-obj { width: 112px; height: 112px; }
.dc-board[data-mode="coin"] .dc-shadow { left: 12px; right: 12px; }
.dc-coin { position: absolute; inset: 0; transform-style: preserve-3d; }
.dc-cf { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 50%; backface-visibility: hidden; -webkit-backface-visibility: hidden; border: 5px solid; box-shadow: none; }
.dc-cf::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; border: 2px solid currentColor; opacity: .35; }
.dc-cf b { font-size: 3rem; line-height: 1; font-weight: 800; }
.dc-cf svg { width: 54px; height: 54px; }
.dc-cf small { font-size: .62rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.dc-head { background: #f6c945; border-color: #d9a21b; color: #8a5a00; }
.dc-tail { background: #d9dde2; border-color: #aab1b9; color: #4a525a; transform: rotateX(180deg); }
.dc-board[data-n="4"] .dc-obj, .dc-board[data-n="5"] .dc-obj, .dc-board[data-n="6"] .dc-obj, .dc-board[data-mode="coin"][data-n="7"] .dc-obj { transform-origin: center; }
.dc-stage .wh-result strong em { font-style: normal; color: var(--teal-deep); font-size: 1.15em; }
@keyframes dc-jump { 0% { transform: translateY(0); animation-timing-function: cubic-bezier(.2,.6,.4,1); } 22% { transform: translateY(-120px); animation-timing-function: cubic-bezier(.6,0,.8,.4); } 46% { transform: translateY(0); animation-timing-function: cubic-bezier(.2,.6,.4,1); } 58% { transform: translateY(-48px); animation-timing-function: cubic-bezier(.6,0,.8,.4); } 70% { transform: translateY(0); animation-timing-function: cubic-bezier(.2,.6,.4,1); } 78% { transform: translateY(-16px); animation-timing-function: cubic-bezier(.6,0,.8,.4); } 86% { transform: translateY(0); } 91% { transform: translateY(-5px); } 100% { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .dr-in, .dc-obj.is-jump, .bb-arena.is-lit .bb-bomb { animation: none; transition: none; } }

/* Kết quả đồng xu nhỏ gọn */
.wh-result.is-small { padding: 8px 14px; max-width: 300px; border-radius: 14px; }
.wh-result.is-small .wh-result-label { font-size: .68rem; }
.wh-result.is-small strong { font-size: 1.05rem; }

/* =====================================================
   Bốc thăm: 5 phong cách bài
   ===================================================== */
.dr-style-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
@media (max-width: 560px) { .dr-style-grid { grid-template-columns: repeat(3, 1fr); } }
.dr-style { display: grid; justify-items: center; gap: 6px; padding: 10px 4px 8px; border: 2px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; font: inherit; color: var(--ink); transition: border-color .15s, background-color .15s, box-shadow .15s; }
.dr-style:hover { border-color: var(--khaki); background: var(--khaki-soft); }
.dr-style.is-on { border-color: var(--teal); background: var(--teal-soft); box-shadow: 0 0 0 3px rgba(27,115,119,.14); }
.dr-style small { font-size: .78rem; font-weight: 600; }
.dr-sw { position: relative; display: block; width: 42px; height: 56px; }
.dr-sw .dr-face { font-size: 1rem; border-width: 2px; border-radius: 8px; }
.dr-sw .dr-back b { font-size: 1.3rem; }
.dr-sad { font-size: 2rem; line-height: 1; }
.dr-front.is-blank .dr-sad { filter: grayscale(.2); }

/* Cổ điển là kiểu mặc định ở trên; các kiểu còn lại ghi đè */
.dr-look-royal .dr-back { background: radial-gradient(circle at 50% 50%, #243b6b 0 30%, #1a2a52 31% 100%); color: #f5c542; border: 3px solid #f5c542; box-shadow: inset 0 0 0 3px #1a2a52, inset 0 0 0 5px #f5c54299, 0 6px 16px -8px rgba(0,0,0,.6); }
.dr-look-royal .dr-front { background: #fbf6e4; border-color: #c9a227; color: #1a2a52; }
.dr-look-neon .dr-back { background: #0d1030; color: #ff2bd6; border: 3px solid #00e5ff; box-shadow: 0 0 12px #00e5ffaa, inset 0 0 14px #ff2bd655; text-shadow: 0 0 10px #ff2bd6; }
.dr-look-neon .dr-front { background: #12163d; border-color: #a3ff12; color: #fff; box-shadow: 0 0 12px #a3ff1288; }
.dr-look-neon .dr-front.is-blank { border-color: #5b6288; color: #aab; box-shadow: none; }
.dr-look-pastel .dr-back { background: radial-gradient(circle, #fff 0 2px, transparent 3px) 0 0 / 14px 14px, linear-gradient(135deg, #ffd6e0, #e4d7ff); color: #d6659a; border: 3px solid #fff; }
.dr-look-pastel .dr-front { background: #fffafc; border-color: #ffb3cf; color: #5b4b6b; }
.dr-look-gift .dr-front { background: #fffdf5; border-color: #ef4444; }
.dr-look-gift .dr-front.is-blank { background: #f6f3ea; border-color: var(--line-strong); }
.dr-look-gift .dr-back { background-color: #ef4444; }

/* =====================================================
   Giao diện dạng "tile": ô trò chơi gọn (biểu tượng + tên) và các ô lựa chọn cùng kiểu
   ===================================================== */
.gm-grid { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) { .gm-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
.gm-tile { align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 26px 12px; min-height: 150px; }
.gm-tile h2 { margin: 0; font-size: 1.02rem; line-height: 1.25; }
.gm-ico { font-size: 2.8rem; }

.gm-opt, .wh-style, .dr-style { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s, border-color .15s, background-color .15s; }
.gm-opt:hover, .wh-style:hover, .dr-style:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: var(--teal); background: var(--paper); }
.gm-opt.is-on, .wh-style.is-on, .dr-style.is-on { border-color: var(--teal); background: var(--teal-soft); box-shadow: 0 0 0 3px rgba(27,115,119,.16); transform: none; }
.gm-opt:focus-visible, .wh-style:focus-visible, .dr-style:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.gm-opt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 104px; padding: 16px 10px; font-size: 1rem; font-weight: 700; }
.gm-ico-s { font-size: 2.3rem; line-height: 1; }
.wh-style, .dr-style { padding: 14px 6px 12px; gap: 8px; }
.wh-style small, .dr-style small { font-size: .85rem; font-weight: 700; }
.wh-hint { justify-content: flex-end; }


/* =====================================================
   Dòng "Đến lượt" nổi bật dùng chung
   ===================================================== */
.gm-turn { margin: 0 0 14px; text-align: center; font-size: 1rem; font-weight: 500; line-height: 1.4; color: var(--ink-2); }
.gm-turn strong { display: inline-block; font-size: 1.7rem; font-weight: 800; line-height: 1.2; color: var(--teal-deep); padding: 0 .2em; background: linear-gradient(transparent 62%, rgba(27,115,119,.22) 62%); word-break: break-word; }
.gm-turn.is-pop { animation: gmPop .5s cubic-bezier(.3,1.5,.5,1); }
@keyframes gmPop { 0% { transform: scale(.88); opacity: .4; } 100% { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .gm-turn.is-pop, .mm-cell.is-pop { animation: none; } }

.gm-rank { margin: 16px 0 0; }
.gm-rank ol { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.gm-rank li { padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--paper); }
.gm-rank li.is-win { border-color: var(--teal); background: var(--teal-soft); }

/* Đoán đúng giây */
.tm-stage { text-align: center; }
.tm-goal { margin: 0 0 8px; color: var(--ink-2); font-weight: 600; }
.tm-clock { font-variant-numeric: tabular-nums; font-size: clamp(3.2rem, 18vw, 5.5rem); font-weight: 800; line-height: 1.1; color: var(--teal-deep); margin: 6px 0; }
.tm-clock.is-hidden { color: var(--ink-2); opacity: .55; }
.tm-res { min-height: 1.6em; margin: 0 0 12px; }
.tm-btn { display: block; width: 100%; max-width: 360px; margin: 0 auto 14px; padding: 22px 16px; border: 0; border-radius: var(--r-lg); font: inherit; font-size: 1.5rem; font-weight: 800; color: #fff; background: var(--teal); cursor: pointer; box-shadow: 0 8px 20px -10px rgba(27,115,119,.8); }
.tm-btn.is-stop { background: #e4572e; box-shadow: 0 8px 20px -10px rgba(228,87,46,.9); }
.tm-btn.is-next { background: var(--teal-deep); }
.tm-btn:active { transform: scale(.98); }
.tm-btn[hidden] { display: none; }
.gm-rank { text-align: left; }

/* Nhớ nhanh */
.mm-board { min-height: 110px; display: grid; gap: 12px; margin-bottom: 12px; }
.mm-note { margin: 0; text-align: center; color: var(--ink-2); align-self: center; }
.mm-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.mm-cell { width: 52px; height: 52px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.8rem; border: 2px solid var(--line); border-radius: 12px; background: var(--paper); }
.mm-cell.is-pop { animation: gmPop .45s both; }
.mm-slot { border-style: dashed; }
.mm-slot.is-fill { border-style: solid; border-color: var(--teal); background: var(--teal-soft); }
.mm-cell.is-ok { border-color: #2e9e5b; background: #e4f6ea; }
.mm-cell.is-bad { border-color: #d64545; background: #fde8e8; }
.mm-cmp { text-align: center; }
.mm-lab { display: block; margin-bottom: 6px; font-size: .9rem; font-weight: 700; color: var(--ink-2); }
.mm-bar { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; margin-bottom: 12px; }
.mm-bar span { display: block; height: 100%; width: 100%; background: var(--teal); }
.mm-pal { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 12px; }
.mm-pick { padding: 8px 0; font-size: 1.7rem; line-height: 1.2; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.mm-pick:hover:not(:disabled) { border-color: var(--teal); background: var(--teal-soft); }
.mm-pick:disabled { opacity: .35; cursor: default; }
@media (max-width: 420px) { .mm-cell { width: 44px; height: 44px; font-size: 1.5rem; } .mm-pal { grid-template-columns: repeat(4, 1fr); } }

/* Chọn một trong ba */
.pk-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; perspective: 900px; margin-bottom: 14px; }
.pk-box { position: relative; aspect-ratio: 3 / 4; padding: 0; border: 0; background: none; cursor: pointer; font: inherit; -webkit-tap-highlight-color: transparent; }
.pk-in { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.3,.7,.2,1); }
.pk-box.is-open .pk-in { transform: rotateY(180deg); }
.pk-face { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 8px; border-radius: 14px; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 6px 16px -8px rgba(42,35,33,.5); overflow: hidden; text-align: center; }
.pk-back { background: linear-gradient(135deg, var(--teal), var(--teal-deep)); color: #fff; }
.pk-back b { font-size: 2.6rem; line-height: 1; }
.pk-back small { font-size: 1rem; font-weight: 800; }
.pk-front { background: var(--paper); border: 3px solid var(--line-strong); transform: rotateY(180deg); font-weight: 800; font-size: 1.05rem; word-break: break-word; }
.pk-box.is-mine .pk-front { border-color: var(--teal); background: var(--teal-soft); }
.pk-box.is-late .pk-in { opacity: .55; }
.pk-box:disabled { cursor: default; }
.pk-box:not(.is-open):hover .pk-in { transform: translateY(-4px); }

/* Cao thủ đoán số */
.gs-range { margin: 0 0 12px; text-align: center; font-size: 1.1rem; }
.gs-range strong { font-size: 1.5rem; color: var(--teal-deep); }
.gs-timer { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; margin-bottom: 12px; }
.gs-timer span { display: block; height: 100%; width: 100%; background: #e4572e; }
.gs-input { display: flex; gap: 10px; margin-bottom: 10px; }
.gs-input[hidden] { display: none; }
.gs-input input { flex: 1; min-width: 0; padding: 14px; font-size: 1.5rem; font-weight: 700; text-align: center; border: 2px solid var(--line-strong); border-radius: var(--r-lg); background: var(--paper); }
.gs-input input:focus { outline: none; border-color: var(--teal); }
.gs-hint { min-height: 1.6em; margin: 0 0 6px; text-align: center; font-weight: 700; font-size: 1.1rem; }
.gs-hint.is-up { color: #1b7a3d; }
.gs-hint.is-down { color: #c2410c; }
.gs-hint.is-warn, .gs-hint.is-skip { color: #b91c1c; }
.gs-left { text-align: center; color: var(--ink-2); margin-bottom: 12px; }
.dr-log li.is-win { font-weight: 700; }
.dr-log li.is-skip { color: var(--ink-2); }
.gs-range strong { white-space: nowrap; }
.gs-input input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.gs-input input::-webkit-outer-spin-button, .gs-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Nhớ nhanh: dạng "Đúng tính chất" và các câu hỏi */
.mm-grid { display: grid; grid-template-columns: repeat(var(--cols, 3), auto); gap: 8px; justify-content: center; }
.mm-q { margin: 0; text-align: center; font-size: 1.2rem; font-weight: 700; line-height: 1.5; }
.mm-q small { display: block; margin-bottom: 4px; font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.mm-pal.mm-opts { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.mm-ans { font-size: 1.05rem; font-weight: 700; padding: 14px 8px; }
.mm-ans.mm-big, .lc-opts .mm-pick { font-size: 2rem; }
.mm-pick.is-ok { border-color: #2e9e5b; background: #e4f6ea; opacity: 1; }
.mm-pick.is-bad { border-color: #d64545; background: #fde8e8; opacity: 1; }
.mm-ans:disabled:not(.is-ok):not(.is-bad) { opacity: .5; }

/* Ghi nhớ thứ tự */
.lc-info { text-align: center; margin: 0 0 10px; color: var(--ink-2); font-weight: 600; min-height: 1.4em; }
.lc-board { margin: 0 auto 12px; max-width: 420px; }
.lc-van { position: relative; width: 100%; background: var(--paper); border: 2px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.lc-it { position: absolute; display: flex; align-items: center; justify-content: center; font-size: clamp(1.4rem, 7vw, 2.2rem); transition: left .28s ease-in-out, top .28s ease-in-out; }
.lc-loc { display: grid; grid-template-columns: repeat(var(--cols, 4), 1fr); gap: 8px; }
.lc-cell { aspect-ratio: 1; border: 2px solid var(--line-strong); border-radius: 12px; background: var(--paper); cursor: pointer; padding: 0; transition: background-color .15s, border-color .15s, box-shadow .15s; }
.lc-cell.is-lit { background: #ffd23f; border-color: #e0a800; box-shadow: 0 0 14px #ffd23faa; }
.lc-cell.is-sel { background: var(--teal-soft); border-color: var(--teal); }
.lc-cell.is-ok { background: #bfe8cc; border-color: #2e9e5b; }
.lc-cell.is-miss { background: #fff; border: 3px dashed #e0a800; }
.lc-cell.is-bad { background: #fbd0d0; border-color: #d64545; }
.lc-opts { max-width: 420px; margin-left: auto; margin-right: auto; }
fieldset.field { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
fieldset.field > legend { padding: 0; margin-bottom: 6px; font-weight: 600; font-size: .95rem; }
.lc-cell.is-sel { background: #9fd8da; }
.lc-loc.lc-d2 { max-width: 320px; gap: 6px; }
.lc-loc.lc-d3 { max-width: 260px; gap: 4px; }
.lc-loc.lc-d3 .lc-cell { border-radius: 8px; }

.gm-section-title { margin: 34px 0 4px; font-size: 1.3rem; }
.gm-section-sub { margin: 0 0 14px; color: var(--ink-2); font-size: .92rem; }

/* Tile hình vuông: ảnh nền, tiêu đề viền trắng 5px + đổ bóng */
.gm-sq { aspect-ratio: 1 / 1; min-height: 0; padding: 10px; background-color: #fff; background-size: cover; background-position: center; background-repeat: no-repeat; overflow: hidden; }
.gm-sq h2 { color: var(--ink, #1f2937); font-weight: 800; -webkit-text-stroke: 5px #fff; paint-order: stroke fill; filter: drop-shadow(0 2px 3px rgba(0,0,0,.4)); }
.gm-sq:not(.gm-soon) { justify-content: flex-end; padding: 10px 10px 25px; }
.gm-sq h2 { font-size: calc(1.02rem + 2px); }
/* Giống icon app: viền trắng dày, bo góc lớn, đổ bóng */
.gm-sq { border: 4px solid #fff; border-radius: 24px; box-shadow: 0 8px 20px rgba(15,23,42,.22), 0 2px 5px rgba(15,23,42,.18); }
a.gm-sq:hover, a.gm-sq:focus-visible { border-color: #fff; box-shadow: 0 14px 28px rgba(15,23,42,.30), 0 3px 8px rgba(15,23,42,.22); }
a.gm-sq:active { transform: scale(.97); }


/* ======================================================================
   Giao diện "dễ thương" (cùng phong cách logo Tụm5tụm7) cho mọi trang trong game/ trừ Ma sói (có theme riêng)
   ====================================================================== */
body.game-page:not(.ww-page) {
  --cu-blue: #1e82d6; --cu-blue-d: #0f5fa8; --cu-green: #3fa022; --cu-green-d: #2c7a16; --cu-pink: #f0558c; --cu-pink-d: #c23468;
  --cu-purple: #7a55c4; --cu-purple-d: #583b98; --cu-orange: #f9a11b; --cu-orange-d: #c97a08; --cu-navy: #0b2f85;
  background: radial-gradient(520px 420px at 6% 6%, rgba(30,130,214,.15), transparent 70%), radial-gradient(480px 400px at 96% 12%, rgba(240,85,140,.14), transparent 70%),
    radial-gradient(560px 460px at 94% 94%, rgba(63,160,34,.13), transparent 70%), radial-gradient(520px 420px at 4% 92%, rgba(249,161,27,.17), transparent 70%), #fff8ec;
  background-attachment: fixed;
}
body.game-page:not(.ww-page)::before { content: ""; position: fixed; inset: -260px; z-index: -1; pointer-events: none; opacity: .4; background: url('../img/confetti.svg') 0 0 / 260px 260px; animation: cuDrift 90s linear infinite; }
@keyframes cuDrift { to { transform: translate(260px, 260px); } }
@media (prefers-reduced-motion: reduce) { body.game-page:not(.ww-page)::before { animation: none; } }

body.game-page:not(.ww-page) .page-head h1, body.game-page:not(.ww-page) h1 { font-family: 'Baloo 2', 'Be Vietnam Pro', sans-serif; font-weight: 800; color: var(--cu-navy); letter-spacing: .005em; }
body.game-page:not(.ww-page) .container { position: relative; z-index: 1; }

/* Thẻ, nút kiểu nhãn dán */
body.game-page:not(.ww-page) .card { border: 3px solid #cfe3f6; border-radius: 26px; background: #fff; box-shadow: 0 6px 0 #cfe3f6; }
body.game-page:not(.ww-page) .btn { border-radius: 999px; font-weight: 700; }
body.game-page:not(.ww-page) .btn-primary { --_bg: var(--cu-blue); --_bd: var(--cu-blue-d); box-shadow: 0 4px 0 var(--cu-blue-d); transition: transform .12s, box-shadow .12s; }
body.game-page:not(.ww-page) .btn-primary:hover { --_bg: #2a8fe3; --_bd: var(--cu-blue-d); }
body.game-page:not(.ww-page) .btn-primary:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--cu-blue-d); }
body.game-page:not(.ww-page) .btn-ghost { --_bg: #fff; --_bd: #cfe3f6; border-width: 2px; }
body.game-page:not(.ww-page) .gm-opt { border: 3px solid #cfe3f6; border-radius: 22px; box-shadow: 0 4px 0 #cfe3f6; }
body.game-page:not(.ww-page) .gm-opt:hover { border-color: var(--cu-orange); box-shadow: 0 6px 0 var(--cu-orange-d); }
body.game-page:not(.ww-page) .gm-opt.is-on { border-color: var(--cu-green); background: #ecf8e6; box-shadow: 0 4px 0 var(--cu-green-d); }
body.game-page:not(.ww-page) .back-link { display: inline-flex; align-items: center; gap: 4px; padding: 6px 14px 6px 8px; border-radius: 999px; background: #fff; border: 2px solid #cfe3f6; color: var(--cu-blue-d); font-weight: 700; text-decoration: none; transition: transform .15s; }
body.game-page:not(.ww-page) .back-link:hover { transform: translateX(-3px); }

/* Trang danh sách game */
.gm-peek { display: flex; justify-content: center; align-items: flex-end; gap: 2px; height: 74px; margin: 6px 0 2px; pointer-events: none; }
.gm-peek img { height: 64px; width: auto; transform-origin: 50% 100%; animation: gmPeek 3.4s ease-in-out infinite; }
.gm-peek img:nth-child(2) { animation-delay: -.7s; } .gm-peek img:nth-child(3) { animation-delay: -1.4s; } .gm-peek img:nth-child(4) { animation-delay: -2.1s; } .gm-peek img:nth-child(5) { animation-delay: -2.8s; }
@keyframes gmPeek { 0%, 100% { transform: translateY(8px) rotate(-2deg); } 50% { transform: translateY(0) rotate(2deg); } }
.game-page:not(.ww-page) .page-head { text-align: center; }
.game-page:not(.ww-page) .gm-page-title { font-size: clamp(1.9rem, 6vw, 2.6rem); margin: 0; line-height: 1.1; }
.gm-page-title::before, .gm-page-title::after { content: "✦"; color: var(--cu-orange); font-size: .55em; vertical-align: .35em; margin: 0 .4em; }
.gm-page-title::after { color: var(--cu-pink); }

.gm-sq { --c: var(--cu-blue); --d: var(--cu-blue-d); border: 4px solid var(--c); border-radius: 30px; box-shadow: 0 7px 0 var(--d); background-color: #fff; }
.gm-grid > :nth-child(5n+2) { --c: var(--cu-green); --d: var(--cu-green-d); }
.gm-grid > :nth-child(5n+3) { --c: var(--cu-pink); --d: var(--cu-pink-d); }
.gm-grid > :nth-child(5n+4) { --c: var(--cu-purple); --d: var(--cu-purple-d); }
.gm-grid > :nth-child(5n+5) { --c: var(--cu-orange); --d: var(--cu-orange-d); }
.gm-grid > :nth-child(odd) { transform: rotate(-.8deg); } .gm-grid > :nth-child(even) { transform: rotate(.8deg); }
a.gm-sq { transition: transform .2s cubic-bezier(.3, 1.6, .5, 1), box-shadow .2s; }
a.gm-sq:hover, a.gm-sq:focus-visible { transform: translateY(-5px) rotate(0deg) scale(1.02); border-color: var(--c); box-shadow: 0 12px 0 var(--d); }
a.gm-sq:active { transform: translateY(5px) scale(.98); box-shadow: 0 2px 0 var(--d); }
.gm-sq h2 { -webkit-text-stroke: 0; filter: none; paint-order: normal; align-self: center; font-family: 'Baloo 2', 'Be Vietnam Pro', sans-serif; font-size: calc(1.02rem + 2px); font-weight: 800; line-height: 1.15; color: #fff; background: var(--c); border-radius: 999px; padding: 5px 14px 3px; box-shadow: 0 3px 0 var(--d); max-width: 94%; }
.gm-sq.gm-soon { border-style: dashed; background: rgba(255,255,255,.7); box-shadow: none; transform: none; opacity: 1; --c: #b9aca0; --d: #b9aca0; }
.gm-soon .gm-ico { animation: gmPeek 2.6s ease-in-out infinite; }
.gm-sq.gm-soon h2 { background: #b9aca0; }
.gm-section-title { font-family: 'Baloo 2', 'Be Vietnam Pro', sans-serif; font-weight: 800; color: var(--cu-navy); font-size: 1.55rem; text-align: center; margin: 40px 0 2px; }
.gm-section-title::after { content: ""; display: block; width: 74px; height: 8px; margin: 4px auto 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='37' height='8' viewBox='0 0 37 8'%3E%3Cpath d='M2 4q4.5-5 9 0t9 0 9 0 6 0' fill='none' stroke='%23f0558c' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center / 37px 8px repeat-x; }
.gm-section-sub { text-align: center; }
@media (prefers-reduced-motion: reduce) { .gm-peek img, .gm-soon .gm-ico { animation: none; } a.gm-sq { transition: none; } }
body.game-page:not(.ww-page) .backdrop-art { display: none; }
body.game-page:not(.ww-page) .topbar { background: rgba(255, 248, 236, .88); border-bottom: 2px solid #f1e3c8; }
/* ô lựa chọn (Tạo phòng / Tham gia phòng...) trong Quiz, Sudoku */
body.game-page:not(.ww-page) .gm-tile:not(.gm-sq) { --c: var(--cu-blue); --d: var(--cu-blue-d); background: #fff; border: 4px solid var(--c); border-radius: 28px; box-shadow: 0 6px 0 var(--d); }
body.game-page:not(.ww-page) .gm-grid > .gm-tile:not(.gm-sq):nth-child(2n) { --c: var(--cu-green); --d: var(--cu-green-d); }
body.game-page:not(.ww-page) .gm-tile:not(.gm-sq) h2 { font-family: 'Baloo 2', 'Be Vietnam Pro', sans-serif; font-weight: 800; font-size: 1.2rem; color: var(--d); }
body.game-page:not(.ww-page) .gm-tile:not(.gm-sq) .gm-ico { filter: drop-shadow(0 3px 0 rgba(0,0,0,.08)); }
body.game-page:not(.ww-page) a.gm-tile:not(.gm-sq):hover { border-color: var(--c); box-shadow: 0 10px 0 var(--d); transform: translateY(-4px) rotate(0); }
.game-page .walkers { margin: 0 auto 8px; }
/* Tạo phòng / Tham gia phòng: ô nhãn dán có nền nhạt + biểu tượng trong vòng tròn (giống ô trang chủ) */
body.game-page:not(.ww-page) .gm-tile:not(.gm-sq) { --t: #e8f4ff; background: var(--t); position: relative; overflow: hidden; min-height: 170px; transform: none; }
body.game-page:not(.ww-page) .gm-grid > .gm-tile:not(.gm-sq):nth-child(2n) { --t: #ecf8e6; }
body.game-page:not(.ww-page) .gm-tile:not(.gm-sq)::before { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: var(--c); opacity: .16; }
body.game-page:not(.ww-page) .gm-tile:not(.gm-sq) .gm-ico { display: grid; place-items: center; width: 74px; height: 74px; border-radius: 50%; background: #fff; border: 3px solid var(--c); box-shadow: 0 4px 0 var(--d); font-size: 2.2rem; transform: rotate(-6deg); transition: transform .25s cubic-bezier(.3,1.8,.5,1); position: relative; }
body.game-page:not(.ww-page) a.gm-tile:not(.gm-sq):hover .gm-ico { transform: rotate(8deg) scale(1.1); }
body.game-page:not(.ww-page) a.gm-tile:not(.gm-sq):active { transform: translateY(5px); box-shadow: 0 1px 0 var(--d); }
/* 1.42.2: tiêu đề mục bằng cỡ tiêu đề trang; tên game nhỏ hơn 1px; người đi lại nằm giữa hai mục */
.gm-section-title { font-size: clamp(1.9rem, 6vw, 2.6rem); line-height: 1.1; margin-top: 8px; }
.gm-section-title::before, .gm-section-title::after { content: "✦"; color: var(--cu-orange); font-size: .55em; vertical-align: .35em; margin: 0 .4em; }
.gm-section-title::after { display: inline; width: auto; height: auto; margin: 0 .4em; background: none; color: var(--cu-pink); }
.gm-sq h2 { font-size: 1.02rem; }
.game-page .walkers { margin: 22px auto 0; }

/* Các trò chơi không có thanh trên cùng (chỉ trang danh sách Trò chơi nhóm còn) */
body.game-page:not(.game-list):not(.has-topbar) .topbar { display: none !important; }



/* ===== Trang chủ của game nhiều thiết bị (Quiz nhóm, Sudoku): banner, hai ô lớn, các bước chơi ===== */
.mp-hero { position: relative; overflow: hidden; text-align: center; margin: 4px 0 18px; padding: 26px 18px 22px; border-radius: 30px; border: 4px solid var(--hc, #1e82d6); box-shadow: 0 7px 0 var(--hd, #0f5fa8); background: var(--h1, #e8f4ff); }
.mp-hero.mp-sudoku { --hc: #7a55c4; --hd: #583b98; --h1: #f1ebff; }
.mp-hero.mp-dino { --hc: #e8962a; --hd: #b36a12; --h1: #fff3df; }
.mp-hero.mp-quiz { --hc: #f0558c; --hd: #c23468; --h1: #ffeaf2; }
.mp-kicker { display: inline-block; margin: 0 0 8px; padding: 3px 14px 1px; border-radius: 999px; background: #fff; color: var(--hd, #0f5fa8); font-family: 'Baloo 2', 'Be Vietnam Pro', sans-serif; font-weight: 800; font-size: .8rem; letter-spacing: .04em; box-shadow: 0 2px 0 rgba(0,0,0,.12); }
.mp-hero h1 { margin: 0; font-family: 'Baloo 2', 'Be Vietnam Pro', sans-serif; font-weight: 800; font-size: clamp(2rem, 8vw, 3rem); line-height: 1.05; color: #0b2f85; text-shadow: 0 3px 0 #fff, 0 6px 0 rgba(11,47,133,.15); }
.mp-tag { margin: 10px auto 0; max-width: 460px; color: #4b423c; font-size: .95rem; line-height: 1.5; font-weight: 500; }
.mp-fl { position: absolute; font-size: 1.7rem; opacity: .9; pointer-events: none; animation: mpFloat 4.2s ease-in-out infinite; filter: drop-shadow(0 3px 0 rgba(0,0,0,.08)); }
.mp-fl.a { left: 5%; top: 18%; } .mp-fl.b { right: 6%; top: 14%; animation-delay: -1.2s; font-size: 2rem; }
.mp-fl.c { left: 12%; bottom: 12%; animation-delay: -2.1s; font-size: 1.4rem; } .mp-fl.d { right: 11%; bottom: 14%; animation-delay: -.6s; font-size: 1.5rem; }
@keyframes mpFloat { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-9px) rotate(7deg); } }

.mp-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
a.mp-card { --c: #1e82d6; --d: #0f5fa8; --t: #e8f4ff; position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 230px; padding: 24px 14px 20px; text-align: center; text-decoration: none; color: inherit; background: var(--t); border: 4px solid var(--c); border-radius: 30px; box-shadow: 0 7px 0 var(--d); transition: transform .18s cubic-bezier(.3,1.6,.5,1), box-shadow .18s; }
a.mp-card.mp-g { --c: #3fa022; --d: #2c7a16; --t: #ecf8e6; }
a.mp-card.mp-p { --c: #f0558c; --d: #c23468; --t: #ffeaf2; }
a.mp-card::before { content: ""; position: absolute; right: -34px; top: -34px; width: 124px; height: 124px; border-radius: 50%; background: var(--c); opacity: .16; }
a.mp-card::after { content: ""; position: absolute; left: 18px; bottom: 20px; width: 14px; height: 14px; border-radius: 50%; background: var(--c); opacity: .28; box-shadow: 18px -26px 0 -2px var(--c); }
a.mp-card:hover, a.mp-card:focus-visible { transform: translateY(-4px) rotate(-.6deg); box-shadow: 0 11px 0 var(--d); outline: none; text-decoration: none; }
a.mp-card:active { transform: translateY(5px); box-shadow: 0 2px 0 var(--d); }
.mp-ico { position: relative; display: grid; place-items: center; width: 92px; height: 92px; border-radius: 50%; background: #fff; border: 4px solid var(--c); box-shadow: 0 5px 0 var(--d); font-size: 2.8rem; transform: rotate(-6deg); transition: transform .25s cubic-bezier(.3,1.8,.5,1); }
a.mp-card:hover .mp-ico { transform: rotate(8deg) scale(1.1); }
.mp-card h2 { position: relative; margin: 4px 0 0; font-family: 'Baloo 2', 'Be Vietnam Pro', sans-serif; font-weight: 800; font-size: 1.4rem; line-height: 1.15; color: var(--d); }
.mp-card p { position: relative; margin: 0; color: #4b423c; font-size: .85rem; line-height: 1.4; }
.mp-go { position: relative; margin-top: 4px; padding: 5px 16px 3px; border-radius: 999px; background: var(--c); color: #fff; font-family: 'Baloo 2', 'Be Vietnam Pro', sans-serif; font-weight: 800; font-size: .95rem; box-shadow: 0 3px 0 var(--d); }

.mp-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 22px 0 6px; padding: 0; list-style: none; }
.mp-steps li { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; text-align: center; background: rgba(255,255,255,.85); border: 3px dashed #cfe3f6; border-radius: 20px; font-size: .82rem; font-weight: 600; color: #4b423c; line-height: 1.35; }
.mp-steps b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #f9a11b; color: #fff; font-family: 'Baloo 2', sans-serif; font-size: 1rem; box-shadow: 0 3px 0 #c97a08; }
.mp-steps li:nth-child(2) b { background: #3fa022; box-shadow: 0 3px 0 #2c7a16; }
.mp-steps li:nth-child(3) b { background: #f0558c; box-shadow: 0 3px 0 #c23468; }

@media (max-width: 480px) {
  .mp-hero { padding: 20px 12px 16px; border-radius: 24px; }
  .mp-fl { font-size: 1.3rem !important; }
  .mp-fl.c, .mp-fl.d { display: none; }
  .mp-cards { gap: 10px; }
  a.mp-card { min-height: 150px; padding: 16px 8px 14px; border-radius: 22px; border-width: 3px; gap: 4px; }
  .mp-ico { width: 60px; height: 60px; font-size: 1.9rem; border-width: 3px; }
  .mp-card h2 { font-size: 1rem; }
  .mp-card p { display: none; }
  .mp-go { font-size: .8rem; padding: 3px 12px 1px; }
  .mp-steps { gap: 8px; }
  .mp-steps li { font-size: .72rem; padding: 10px 5px; }
}
@media (prefers-reduced-motion: reduce) { .mp-fl { animation: none; } }

/* ---- Bố cục dạng cây: ô tiêu đề ở trên, hai đường nối xuống hai ô, cả khối nằm giữa trang ---- */
.mp-stage { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: calc(100vh - 260px); padding: 8px 0 24px; }
.mp-stage .mp-hero { width: min(100%, 400px); margin: 0; padding: 20px 20px 18px; }
.mp-stage .mp-hero h1 { font-size: clamp(1.7rem, 7vw, 2.4rem); }
.mp-stage .mp-tag { font-size: .9rem; margin-top: 8px; }
.mp-links { display: block; width: min(100%, 620px); height: 44px; overflow: visible; }
.mp-links path { fill: none; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.mp-links .t { stroke: var(--hc, #f0558c); } .mp-links .l { stroke: #1e82d6; } .mp-links .r { stroke: #3fa022; }
.mp-stage .mp-cards { width: min(100%, 620px); }
@media (max-width: 480px) { .mp-links { height: 32px; } .mp-links path { stroke-width: 4; } .mp-stage { min-height: calc(100vh - 220px); } }
.mp-stage a.mp-back, body.game-page .mp-stage a.mp-back { position: relative; display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 2px; width: 116px; height: 116px; margin: 0 0 26px; padding: 0 4px 0 0; border-radius: 50%; background: #fff3d6; border: 5px solid #f9a11b; box-shadow: 0 7px 0 #c97a08; color: #c97a08; font-family: 'Baloo 2', 'Be Vietnam Pro', sans-serif; font-weight: 800; text-decoration: none; transition: transform .18s cubic-bezier(.3,1.6,.5,1), box-shadow .18s; }
.mp-stage a.mp-back svg { flex: none; }
.mp-stage a.mp-back span { font-size: 1.05rem; line-height: 1; white-space: nowrap; }
.mp-stage a.mp-back::after { content: ""; position: absolute; left: 50%; top: calc(100% + 7px); width: 5px; height: 26px; margin-left: -2.5px; border-radius: 3px; background: #f9a11b; }
.mp-stage a.mp-back:hover { transform: translateY(-3px); box-shadow: 0 10px 0 #c97a08; }
.mp-stage a.mp-back:active { transform: translateY(4px); box-shadow: 0 3px 0 #c97a08; }
