:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  color-scheme: dark;
  --bg: #000;
  --panel: #1b1d24;
  --text: #f1f1f1;
  --muted: #a7abb6;
  --accent: #e0a526;
  --danger: #d9534f;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, 'Helvetica Neue', Roboto, Arial, sans-serif;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
#stage {
  position: absolute;
  width: 360px;
  height: 640px;
}
#screen {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  image-rendering: pixelated;
}
#loading {
  position: fixed;
  inset: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background:
    radial-gradient(ellipse at 50% 35%, rgba(150, 70, 20, 0.45), transparent 60%),
    radial-gradient(ellipse at 50% 120%, rgba(90, 20, 10, 0.6), transparent 55%), #0b0705;
}
#loading[hidden],
html.no-splash #loading {
  display: none;
}
#loading img {
  image-rendering: pixelated;
  border-radius: 12px;
  box-shadow: 0 0 24px rgba(255, 190, 90, 0.35);
}
.loading-title {
  margin: 0;
  color: #f3d58c;
  font:
    700 30px / 1.1 'Times New Roman',
    Georgia,
    serif;
  letter-spacing: 2px;
  text-align: center;
  text-transform: uppercase;
  text-shadow:
    0 0 12px rgba(255, 170, 60, 0.55),
    0 2px 0 #5a3305;
}
.loading-title span {
  display: block;
  margin-top: 4px;
  color: #e9c46a;
  font-size: 14px;
  letter-spacing: 6px;
}
.bar {
  width: min(320px, 60%);
  height: 8px;
  border: 1px solid rgba(233, 196, 106, 0.6);
  border-radius: 5px;
  background: #1e130a;
  overflow: hidden;
}
#progress {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #a8661c, #ffe08a);
  box-shadow: 0 0 10px rgba(255, 200, 80, 0.8);
  transition: width 0.1s;
}
#status {
  margin: 0;
  color: #c9b48a;
  font-size: 13px;
}
/* Chờ máy chủ / nạp tài nguyên sau màn đăng nhập: một lớp che dùng chung cho cả hai kiểu chờ (nhỏ / đầy đủ). */
#cho {
  position: fixed;
  inset: 0;
  z-index: 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  /* đục hẳn: chữ/thanh tiến trình pixel của bản gốc không hiện chồng lên; nền cùng tông với màn tải lớn */
  background:
    radial-gradient(ellipse at 50% 40%, rgba(150, 70, 20, 0.32), transparent 60%),
    radial-gradient(ellipse at 50% 120%, rgba(90, 20, 10, 0.45), transparent 55%), #0b0705;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    visibility 0.18s;
}
#cho.hien {
  opacity: 1;
  visibility: visible;
}
/* kiểu nhỏ: chỉ biểu tượng + vòng xoay + dòng chữ */
#cho .cho-logo,
#cho .loading-title,
#cho .bar {
  display: none;
}
/* kiểu đầy đủ: logo + tên game + thanh chạy qua lại (chặng này không có phần trăm thật) */
#cho.day .cho-logo {
  display: inline;
}
#cho.day .loading-title,
#cho.day .bar {
  display: block;
}
#cho.day .cho-ring {
  display: none;
}
#cho .cho-progress {
  width: 35%;
  height: 100%;
  background: linear-gradient(90deg, #a8661c, #ffe08a);
  box-shadow: 0 0 10px rgba(255, 200, 80, 0.8);
  animation: cho-chay 1.1s ease-in-out infinite;
}
@keyframes cho-chay {
  from {
    transform: translateX(-110%);
  }
  to {
    transform: translateX(300%);
  }
}
/* biểu tượng game trong vòng xoay */
#cho .cho-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
}
#cho .cho-ring::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid rgba(233, 196, 106, 0.22);
  border-top-color: #e9c46a;
  border-radius: 50%;
  animation: cho-xoay 0.9s linear infinite;
}
#cho img {
  image-rendering: pixelated;
  border-radius: 10px;
  box-shadow: 0 0 18px rgba(255, 190, 90, 0.3);
}
#cho p {
  margin: 0;
  color: #e6c887;
  font-size: 14px;
  letter-spacing: 0.5px;
}
@keyframes cho-xoay {
  to {
    transform: rotate(360deg);
  }
}
#overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.6);
  -webkit-user-select: text;
  user-select: text;
}
#overlay[hidden] {
  display: none;
}
.panel {
  width: min(480px, 100%);
  max-height: 100%;
  overflow: auto;
  padding: 14px 16px;
  border: 1px solid rgba(233, 196, 106, 0.7);
  border-radius: 12px;
  background: linear-gradient(180deg, #2a1c10, #150d07);
  box-shadow:
    0 0 0 3px rgba(60, 35, 10, 0.9),
    0 0 0 4px rgba(233, 196, 106, 0.35),
    0 10px 32px rgba(0, 0, 0, 0.7);
}
.panel h2 {
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(233, 196, 106, 0.35);
  font:
    700 18px / 1.2 'Times New Roman',
    Georgia,
    serif;
  letter-spacing: 1px;
  color: #f3d58c;
}
.panel p {
  margin: 0 0 16px;
  line-height: 1.45;
  white-space: pre-wrap;
}
.alert-error h2 {
  color: var(--danger);
}
.form-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.f-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.f-label {
  font-size: 13px;
  color: #e9c46a;
}
.f-text {
  line-height: 1.4;
  white-space: pre-wrap;
}
.f-field input[type='text'],
.f-field input[type='password'],
.f-field select {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid rgba(233, 196, 106, 0.45);
  border-radius: 8px;
  background: #0d0805;
  color: var(--text);
  font-size: 16px;
}
.f-field input:focus,
.f-field select:focus {
  outline: none;
  border-color: #ffe08a;
  box-shadow: 0 0 0 2px rgba(255, 210, 110, 0.3);
}
.f-choices {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.f-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
}
.f-check input {
  width: 20px;
  height: 20px;
}
.form-cmds {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.btn {
  flex: 1 1 0;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid #ffe08a;
  border-radius: 8px;
  background: linear-gradient(180deg, #f3cf72, #c98a2b);
  color: #2a1a05;
  font-size: 16px;
  font-weight: 700;
  text-shadow: 0 1px 0 rgba(255, 240, 200, 0.5);
}
.btn-ghost {
  background: transparent;
  color: #e9c46a;
  border: 1px solid rgba(233, 196, 106, 0.5);
  text-shadow: none;
}

/* ---------------------------------------------------------------- điều khiển cảm ứng (controls.js) */
#controls {
  --ct-size: 1;
  --ct-opacity: 0.75;
  /* BẢNG MÀU GIAO DIỆN — hướng "Kính mờ đêm" sếp chọn 03/11/2026 (bản vẽ bang-chung ct-giao-dien-moi): khung trong mờ, viền
     sáng 1 điểm ảnh, bo mềm, nhấn xanh băng. Mọi thành phần của lớp điều khiển CHỈ dùng các biến --ct-ui-* (thành phần mới
     cũng vậy); tools/check_ui_palette.py chặn mã màu viết thẳng trong luật .ct-* / #controls và trong controls.js, menus.js.
     Mờ nền (--ct-ui-blur) chỉ dùng cho khay/bảng đang mở — mờ trên mọi nút làm máy yếu vẽ lại cả màn mỗi khung hình. */
  --ct-ui-bg: rgba(18, 26, 46, 0.58); /* nền nút */
  --ct-ui-bg-deep: rgba(14, 20, 36, 0.7); /* nền nhãn nhỏ, thẻ */
  --ct-ui-slot: rgba(10, 14, 26, 0.6); /* nền ô kỹ năng */
  --ct-ui-panel: rgba(14, 20, 36, 0.82); /* nền bảng Cài đặt */
  --ct-ui-dialog: rgba(14, 20, 36, 0.66); /* nền khay / bảng nổi */
  --ct-ui-edge: rgba(255, 255, 255, 0.16); /* viền sáng mảnh */
  --ct-ui-edge-soft: rgba(255, 255, 255, 0.1);
  --ct-ui-edge-dark: rgba(0, 0, 0, 0);
  --ct-ui-line: 1px; /* độ dày viền */
  --ct-ui-frame: 0 4px 14px rgba(0, 0, 0, 0.35); /* bóng đổ mềm */
  --ct-ui-radius: 11px;
  --ct-ui-blur: blur(8px) saturate(1.3);
  --ct-ui-text: #eef4ff;
  --ct-ui-text-on: #5fd4ff; /* mục đang chọn / đang bật */
  --ct-ui-text-tab: #d6e6ff; /* biểu tượng */
  --ct-ui-muted: #a9b6cf;
  --ct-ui-pick: rgba(95, 212, 255, 0.18); /* nền mục đang chọn */
  --ct-ui-glow: rgba(95, 212, 255, 0.55);
  --ct-ui-red: #ff7a6b; /* nút Đánh */
  --ct-ui-scrim: rgba(0, 0, 0, 0.45); /* nền phủ của khung nổi */
  --ct-ui-on-accent: #1a1206; /* chữ trên nền nhấn vàng */
  --ct-ui-dot: #f03a3a; /* chấm đỏ "có trả lời mới" */
  --ct-ui-red-deep: #c2283a;
  --ct-ui-shade: rgba(0, 0, 0, 0.45);
  --ct-ui-veil: rgba(14, 20, 36, 0.3);
  --ct-ui-knob: rgba(220, 235, 255, 0.85);
  --ct-ui-mark: rgba(95, 212, 255, 0.95); /* vòng chạm để đi */
  --ct-ui-mark-target: rgba(255, 90, 90, 0.95); /* vòng chạm vào quái/NPC */
  --ct-ui-bulletin: rgba(12, 10, 8, 0.86); /* nền thẻ tin / hội thoại đè lên dải chữ giữa màn */
  --ct-ui-bulletin-veil: rgba(10, 8, 6, 0.62); /* dải tối làm nền thẻ tin */
  --ct-ui-bulletin-shadow: 0 1px 2px rgba(0, 0, 0, 0.9); /* bóng chữ thẻ tin cho rõ trên cảnh sáng */
  --ct-ui-mini: rgba(12, 16, 24, 0.62); /* nền bản đồ nhỏ */
  --ct-ui-mini-me: #5fd4ff; /* chấm mình trên bản đồ nhỏ */
  --ct-ui-mini-goal: #ff5a5a; /* chấm/mũi tên đích trên bản đồ nhỏ */
  /* da phần GAME vẽ (web/skin.js đọc): khung bảng, thẻ, ô của game cùng kiểu kính mờ */
  --ct-ui-game-panel: rgba(14, 20, 36, 0.8); /* nền bảng (thay tím #604c6b) */
  --ct-ui-game-well: rgba(6, 10, 20, 0.5); /* nền vùng trong bảng */
  --ct-ui-game-tab: rgba(18, 26, 46, 0.82); /* nền thẻ, ô */
  --ct-ui-game-bar: rgba(10, 14, 26, 0.85); /* dải chữ đáy bảng */
  --ct-ui-game-line: rgba(255, 255, 255, 0.22); /* viền mảnh */
  --ct-ui-game-line-strong: rgba(255, 255, 255, 0.34);
  --ct-ui-game-dark: rgb(14, 20, 36); /* ảnh khung: phần tối */
  --ct-ui-game-light: rgb(214, 228, 250); /* ảnh khung: phần sáng */
  /* khung Cộng đồng phủ trên game (mockup 145444 M1-02…M1-06, bảng màu tối + tối giản) */
  --ct-ui-cd-sheet: rgba(18, 18, 20, 0.95); /* nền khay / thẻ nổi */
  --ct-ui-cd-card: #18181b; /* thẻ phụ trên nền khay */
  --ct-ui-cd-chip: #232327; /* nhãn, nút phụ, ô nhập */
  --ct-ui-cd-line: #232327; /* vách ngăn */
  --ct-ui-cd-text: #f4f4f5;
  --ct-ui-cd-muted: #9a9aa3;
  --ct-ui-cd-muted-2: #8a8a93; /* chữ mờ trong ô nhập */
  --ct-ui-cd-soft: #c9c9d1; /* chữ ngữ cảnh */
  --ct-ui-cd-ink: #0e0e10; /* chữ trên nền trắng */
  --ct-ui-cd-white: #fff;
  --ct-ui-cd-accent: #ff5a1f;
  --ct-ui-cd-accent-ring: rgba(255, 90, 31, 0.25); /* quầng vòng chạm Hỏi */
  --ct-ui-cd-orange: #ff8a5c; /* ▲, số phiếu, hạn mã */
  --ct-ui-cd-blue: #6ea8ff; /* nhãn Hỏi đáp */
  --ct-ui-cd-ok: #3ddc84;
  --ct-ui-cd-ok-soft: rgba(61, 220, 132, 0.14); /* nền nhãn Người hướng dẫn */
  --ct-ui-cd-staff: rgba(255, 90, 31, 0.14); /* nền nhãn Nhân viên */
  --ct-ui-cd-scrim: rgba(0, 0, 0, 0.67); /* lớp tối phủ lên game */
  --ct-ui-cd-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  --ct-ui-cd-blur: blur(18px);
  --ct-ui-cd-shot: rgba(6, 10, 20, 0.5); /* ô ảnh màn hình trong bản soạn */
  --ct-ui-cd-red: #ff3b5c; /* dấu đếm đỏ trên tab Cộng đồng (mockup frag-m2.css .m2-gtabs i) */
  --ct-ui-cd-gold: #ffb347; /* danh hiệu trên đầu nhân vật (M2-11) */
  --ct-ui-cd-gold-soft: rgba(255, 179, 71, 0.15); /* nền thẻ danh hiệu / thưởng tuần */
  --ct-ui-cd-ink-2: #2a1a00; /* viền chữ vàng trên hình game */
  --ct-ui-cd-cyan: #5ff0ff; /* tên nhân vật trên bản đồ */
  --ct-ui-cd-cyan-2: #003a44;
  --ct-ui-cd-vio: #a98bff; /* nhãn Khoe đồ */
  --ct-ui-cd-vio-soft: rgba(169, 139, 255, 0.15);
  --ct-ui-cd-dim: rgba(0, 0, 0, 0.55); /* lớp tối dưới khay trong game */
  --ct-ui-cd-gold-ring: rgba(255, 179, 71, 0.2); /* quầng vàng quanh ảnh chân dung M4-03 */
  --ct-ui-cd-ink-soft: rgba(14, 14, 16, 0.2); /* bóng chữ vàng trên danh hiệu M4-03 */
  --ct-ui-cd-line-2: #55555d; /* ô kỹ năng còn trống (viền đứt) M4-03 */
  --ct-ui-cd-bar: #3a3a40; /* rãnh thanh tiến độ M4-03 */
  --ct-ui-cd-lock: #2f2f34; /* ô biểu tượng câu đang khoá M4-03 */
  --ct-ui-cd-ns: #0c1535; /* nền khung Nhặt Sao (bản web) M4-03 */
  --ct-gap: max(12px, var(--safe-right), var(--safe-left));
  position: fixed;
  inset: 0;
  pointer-events: none;
  touch-action: none;
  z-index: 5;
}
#controls[hidden],
#controls.is-form-open > :not(.ct-settings) {
  display: none;
}
.ct-stick-zone {
  position: absolute;
  left: 0;
  top: 22%;
  bottom: 0;
  width: 42%;
  pointer-events: auto;
}
#controls.is-left-handed .ct-stick-zone {
  left: auto;
  right: 0;
}
.ct-stick-base {
  position: absolute;
  left: calc(var(--ct-gap) + 70px * var(--ct-size));
  top: calc(100% - var(--ct-gap) - 70px * var(--ct-size));
  width: calc(112px * var(--ct-size));
  height: calc(112px * var(--ct-size));
  margin: calc(-56px * var(--ct-size)) 0 0 calc(-56px * var(--ct-size));
  border-radius: 50%;
  border: var(--ct-ui-line) solid var(--ct-ui-edge-soft);
  background: var(--ct-ui-veil);
  opacity: calc(var(--ct-opacity) * 0.8);
  transition: opacity 0.15s;
}
#controls.is-left-handed .ct-stick-base:not(.is-active) {
  left: auto;
  right: calc(var(--ct-gap) + 14px * var(--ct-size));
}
.ct-stick-base.is-active {
  opacity: 1;
  transition: none;
}
.ct-stick-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(52px * var(--ct-size));
  height: calc(52px * var(--ct-size));
  margin: calc(-26px * var(--ct-size)) 0 0 calc(-26px * var(--ct-size));
  border-radius: 50%;
  border: var(--ct-ui-line) solid var(--ct-ui-edge);
  background: var(--ct-ui-knob);
  box-shadow: var(--ct-ui-frame);
}
.ct-btn {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: var(--ct-ui-line) solid var(--ct-ui-edge);
  border-radius: 50%;
  background: var(--ct-ui-bg);
  box-shadow: var(--ct-ui-frame);
  color: var(--ct-ui-text);
  font:
    600 calc(12px * var(--ct-size)) / 1.1 -apple-system,
    'Helvetica Neue',
    Roboto,
    Arial,
    sans-serif;
  text-shadow: 0 1px 2px var(--ct-ui-edge-dark);
  opacity: var(--ct-opacity);
  pointer-events: auto;
  touch-action: none;
}
.ct-btn.is-down {
  opacity: 1;
  transform: scale(0.92);
  filter: brightness(1.3);
}
.ct-pad {
  position: absolute;
  inset: 0;
}
.ct-attack {
  font-size: calc(17px * var(--ct-size));
  background: radial-gradient(circle at 35% 30%, var(--ct-ui-red), var(--ct-ui-red-deep));
}
.ct-icon {
  width: 60%;
  height: 60%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* nút hệ thống (Menu, Tương tác, Tự đánh): tròn, chỉ biểu tượng */
.ct-sys {
  color: var(--ct-ui-text-tab);
}
.ct-auto-tag {
  position: absolute;
  bottom: -6px;
  left: 50%;
  padding: 0 4px;
  border-radius: var(--ct-ui-radius);
  background: var(--ct-ui-bg-deep);
  border: 1px solid var(--ct-ui-edge);
  font-size: 8px;
  line-height: 12px;
  letter-spacing: 0.5px;
  transform: translateX(-50%);
}
.ct-auto.is-on {
  opacity: 1;
  color: var(--ct-ui-text-on);
  border-color: var(--ct-ui-text-on);
  background: var(--ct-ui-pick);
  box-shadow: 0 0 10px var(--ct-ui-glow);
}
/* đang bấm hộ dãy phím: kiểu tĩnh — hiệu ứng động (filter) chạy liên tục làm trình duyệt vẽ lại mãi, vòng lặp game
   thiếu khung hình và đứng đúng lúc chờ mở bảng treo máy */
.ct-auto.is-busy {
  border-style: dashed;
  opacity: 0.6;
}
.ct-notice {
  opacity: 1;
  color: var(--ct-ui-text-on);
  border-color: var(--ct-ui-text-on);
  box-shadow: 0 0 10px var(--ct-ui-glow);
}
.ct-notice[hidden] {
  display: none;
}
/* Nút Hỏi cộng đồng (mockup M1-01): tròn lớn, viền cam, nhãn "Hỏi" dưới biểu tượng */
.ct-hoi {
  flex-direction: column;
  gap: 2px;
  border: 2px solid var(--ct-ui-cd-accent);
  background: var(--ct-ui-cd-sheet);
  color: var(--ct-ui-cd-text);
  box-shadow:
    0 0 0 4px var(--ct-ui-cd-accent-ring),
    var(--ct-ui-cd-shadow);
}
.ct-hoi .ct-icon {
  width: 34%;
  height: 34%;
}
.ct-hoi-label {
  font-size: calc(13px * var(--ct-size));
  font-weight: 600;
  line-height: 1;
}
.ct-hoi[hidden] {
  display: none;
}
.ct-auto.is-on .ct-auto-tag {
  background: var(--ct-ui-pick);
  color: var(--ct-ui-text-on);
}
.ct-skill {
  padding: calc(3px * var(--ct-size));
  border: var(--ct-ui-line) solid var(--ct-ui-edge);
  background: var(--ct-ui-slot);
  box-shadow:
    var(--ct-ui-frame),
    inset 0 0 6px var(--ct-ui-shade);
}
.ct-skill canvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}
.ct-skill-no {
  position: absolute;
  right: calc(-2px * var(--ct-size));
  bottom: calc(-2px * var(--ct-size));
  min-width: calc(16px * var(--ct-size));
  height: calc(16px * var(--ct-size));
  border: 1px solid var(--ct-ui-edge);
  border-radius: var(--ct-ui-radius);
  background: var(--ct-ui-bg);
  color: var(--ct-ui-text-on);
  font-size: calc(10px * var(--ct-size));
  line-height: calc(16px * var(--ct-size));
  text-shadow: none;
}
/* ô kỹ năng chưa gắn kỹ năng ⇒ nút mờ, chỉ còn số */
.ct-skill.is-empty {
  opacity: calc(var(--ct-opacity) * 0.5);
}
.ct-skill.is-empty canvas {
  visibility: hidden;
}
/* menu ô nhanh thu/mở (menus.js): tab có mũi tên kiểu thẻ Đánh/Cường Hoá của game + khay kiểu hộp thoại game */
.ct-menu-tab {
  border-radius: var(--ct-ui-radius);
  font-weight: 700;
  white-space: nowrap;
}
.ct-menu-tab.is-open {
  opacity: 1;
  color: var(--ct-ui-text-on);
}
.ct-menu-tab.is-icon {
  opacity: 1; /* luôn rõ: nút nhỏ trong cảnh game, độ rõ chung của nút làm nó gần như biến mất */
  background: var(--ct-ui-panel);
  color: var(--ct-ui-text-tab);
}
.ct-menu-tab.is-icon.is-open {
  color: var(--ct-ui-text-on);
  border-color: var(--ct-ui-text-on);
  box-shadow: 0 0 12px var(--ct-ui-glow);
}
.ct-menu-tab.is-icon .ct-icon {
  width: 22px;
  height: 22px;
}
.ct-menu-tray.is-grid3.is-open {
  display: grid;
  grid-template-columns: repeat(3, auto);
}
.ct-menu-title {
  grid-column: 1 / -1;
  color: var(--ct-ui-text);
  font-size: 11px;
  font-weight: 700;
}
.ct-menu-tab.is-round {
  border-radius: 50%;
  font-size: calc(17px * var(--ct-size));
}
.ct-menu-tray {
  position: absolute;
  display: none;
  gap: 5px;
  padding: 6px;
  border: var(--ct-ui-line) solid var(--ct-ui-edge);
  border-radius: var(--ct-ui-radius);
  background: var(--ct-ui-dialog);
  box-shadow: var(--ct-ui-frame);
  pointer-events: auto;
  -webkit-backdrop-filter: var(--ct-ui-blur);
  backdrop-filter: var(--ct-ui-blur);
}
.ct-menu-tray.is-open {
  display: flex;
}
.ct-menu-tray.is-grid2.is-open {
  display: grid;
  grid-template-columns: repeat(2, auto);
}
.ct-menu-tray.is-row {
  flex-wrap: nowrap;
  align-items: center;
  max-width: calc(100vw - 110px);
  overflow-x: auto;
}
.ct-menu-tray.is-sheet {
  flex-direction: column;
}
.ct-menu-tray.is-fan {
  inset: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  pointer-events: none;
}
.ct-menu-tray.is-fan .ct-quick-btn {
  position: absolute;
}
.ct-menu-head {
  color: var(--ct-ui-text-on);
  font: 700 9px sans-serif;
  writing-mode: vertical-rl;
}
.ct-menu-sep {
  flex: none;
  width: 1px;
  height: 38px;
  background: var(--ct-ui-edge-soft);
}
.ct-menu-pages {
  display: flex;
  gap: 4px;
}
.ct-menu-page-tab {
  padding: 4px 12px;
  border: var(--ct-ui-line) solid var(--ct-ui-edge);
  border-radius: var(--ct-ui-radius);
  background: var(--ct-ui-bg);
  color: var(--ct-ui-text-tab);
  font: 700 11px sans-serif;
}
.ct-menu-page-tab.is-on {
  color: var(--ct-ui-text-on);
}
.ct-menu-page {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 5px;
}
.ct-menu-page[hidden] {
  display: none;
}
.ct-quick-btn {
  position: static;
  flex: none;
  flex-direction: column;
  width: max(44px, calc(46px * var(--ct-size)));
  height: max(38px, calc(38px * var(--ct-size)));
  border-radius: var(--ct-ui-radius);
  gap: 1px;
}
.ct-quick-btn {
  color: var(--ct-ui-text-tab);
}
.ct-quick-btn .ct-icon {
  width: 17px;
  height: 17px;
}
.ct-quick-label {
  color: var(--ct-ui-text);
  font-size: calc(8px * var(--ct-size));
  white-space: nowrap;
}
.ct-settings {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--ct-ui-shade);
  pointer-events: auto;
}
.ct-settings-panel {
  width: min(440px, 100%);
  max-height: 100%;
  overflow: auto;
  padding: 14px 16px;
  border: var(--ct-ui-line) solid var(--ct-ui-edge);
  border-radius: var(--ct-ui-radius);
  background: var(--ct-ui-panel);
  box-shadow: var(--ct-ui-frame);
  -webkit-backdrop-filter: var(--ct-ui-blur);
  backdrop-filter: var(--ct-ui-blur);
}
.ct-settings-panel h2 {
  margin: 0 0 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--ct-ui-edge-soft);
  font:
    700 18px / 1.2 'Times New Roman',
    Georgia,
    serif;
  color: var(--ct-ui-text-on);
}
.ct-row input[type='range'],
.ct-row input[type='checkbox'] {
  accent-color: var(--ct-ui-text-on);
}
.ct-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
}
.ct-row-label {
  flex: 1;
}
.ct-row input[type='range'] {
  flex: 1;
}
.ct-row input[type='checkbox'] {
  width: 22px;
  height: 22px;
}
.ct-row-value {
  width: 44px;
  text-align: right;
  color: var(--ct-ui-muted);
}

/* Điện thoại đang dọc ⇒ nhắc xoay ngang (game vẽ khung ngang) */
#safe-probe {
  position: fixed;
  top: var(--safe-top);
  right: var(--safe-right);
  bottom: var(--safe-bottom);
  left: var(--safe-left);
  visibility: hidden;
  pointer-events: none;
}
#rotate {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
}
#rotate p {
  margin: 0;
}
.rotate-phone {
  width: 44px;
  height: 76px;
  border: 3px solid var(--accent);
  border-radius: 8px;
  animation: rotate-hint 2s ease-in-out infinite;
}
@keyframes rotate-hint {
  0%,
  20% {
    transform: rotate(0);
  }
  60%,
  100% {
    transform: rotate(-90deg);
  }
}
@media (orientation: portrait) and (pointer: coarse) {
  #rotate {
    display: flex;
  }
}
/* ngoài trận (tiêu đề, đăng nhập, chọn nhân vật, màn tải): ẩn mọi nút trong trận, chỉ giữ màn cài đặt */
#controls.is-outside > :not(.ct-settings) {
  display: none;
}
/* đang mở bảng/menu trong trận (lõi chạm báo J2ME.panelOpen): ẩn nút trong trận để không đè dải thẻ, ô, hàng của bảng */
#controls.is-panel > :not(.ct-settings) {
  display: none;
}
/* nút kỹ năng chỉ có nghĩa khi đang trong trận (thanh kỹ năng của game đang hiện) */
#controls:not(.is-in-world) .ct-skill {
  display: none;
}
.ct-tap-marker {
  position: absolute;
  width: 28px;
  height: 14px;
  margin: -7px 0 0 -14px;
  border: 2px solid var(--ct-ui-mark);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}
.ct-tap-marker.is-target {
  border-color: var(--ct-ui-mark-target);
}
.ct-tap-marker.is-shown {
  animation: ct-tap 0.6s ease-out;
}
@keyframes ct-tap {
  from {
    opacity: 1;
    transform: scale(0.5);
  }
  to {
    opacity: 0;
    transform: scale(1.4);
  }
}

/* dòng báo lúc Tự đánh đang bấm hộ (màn giữ nguyên) */
.ct-toast {
  position: absolute;
  top: 50%;
  left: 50%;
  padding: 10px 18px;
  border: var(--ct-ui-line) solid var(--ct-ui-edge);
  border-radius: var(--ct-ui-radius);
  background: var(--ct-ui-dialog);
  box-shadow: var(--ct-ui-frame);
  color: var(--ct-ui-text-on);
  font-size: 15px;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.15s;
  pointer-events: none;
  -webkit-backdrop-filter: var(--ct-ui-blur);
  backdrop-filter: var(--ct-ui-blur);
}
.ct-toast.is-shown {
  opacity: 1;
}

/* Báo đang nối lại sau khi quay về từ app khác (transport.js) */
#net-status {
  position: fixed;
  top: calc(var(--safe-top) + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.75);
  color: var(--accent);
  font:
    600 14px/1.3 system-ui,
    sans-serif;
  pointer-events: none;
}

/* ─── Cộng đồng: khung phủ trên game (cong-dong.js) ──────────────────────────
   Hình khối chép từ mockup 145444 (M1-01…M1-06, bản tối + tối giản): khay bo 28px nền
   #121214f2, bong bóng hỏi nền trắng, trả lời nền thẻ. Mã màu chỉ nằm ở bảng --ct-ui-cd-*
   trong khối #controls. Khung là lớp HTML trên canvas: đóng chỉ ẩn đi, kết nối không đổi. */
.ct-cd {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: linear-gradient(90deg, transparent 15%, var(--ct-ui-cd-scrim) 60%);
  color: var(--ct-ui-cd-text);
  font:
    15px/1.5 'Inter',
    'Be Vietnam Pro',
    system-ui,
    sans-serif;
  pointer-events: auto; /* #controls tắt chạm; khung phải bấm được */
}
.ct-cd[hidden] {
  display: none;
}
.ct-cd svg.i {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
  vertical-align: middle;
}
.ct-cd button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
/* khay Hỏi */
.ct-cd-panel {
  position: absolute;
  top: 12px;
  right: 12px;
  bottom: 12px;
  left: auto;
  width: min(612px, calc(100% - 24px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 28px;
  background: var(--ct-ui-cd-sheet);
  box-shadow: var(--ct-ui-cd-shadow);
  -webkit-backdrop-filter: var(--ct-ui-cd-blur);
  backdrop-filter: var(--ct-ui-cd-blur);
}
.ct-cd-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
}
.ct-cd-head b {
  flex: 1;
  font-size: 16px;
}
.ct-cd .ct-cd-x {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ct-ui-cd-chip);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex: none;
}
.ct-cd-ctx {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ct-cd-head .ct-cd-ctx {
  margin: 0;
  flex: 1;
  justify-content: flex-end;
}
.ct-cd-ctx span {
  font-size: 12px;
  padding: 2px 9px;
  border-radius: 10px;
  background: var(--ct-ui-cd-chip);
  color: var(--ct-ui-cd-soft);
  white-space: nowrap;
}
.ct-cd-body {
  flex: 1;
  display: flex;
  gap: 14px;
  min-height: 0;
  padding: 10px 14px;
  overflow: hidden;
}
.ct-cd-c1 {
  flex: 1.2;
  min-width: 0;
  overflow: auto;
}
.ct-cd-c2 {
  flex: 1;
  min-width: 0;
  overflow: auto;
}
.ct-cd-qb {
  background: var(--ct-ui-cd-white);
  color: var(--ct-ui-cd-ink);
  border-radius: 20px 20px 6px 20px;
  padding: 7px 12px;
  margin-left: 40px;
  font-size: 15px;
}
.ct-cd-ab {
  background: var(--ct-ui-cd-card);
  border-radius: 20px 20px 20px 6px;
  padding: 9px 12px;
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.5;
}
.ct-cd-ai {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 99px;
  background: var(--ct-ui-cd-accent);
  color: var(--ct-ui-cd-white);
  margin-bottom: 4px;
}
.ct-cd-ai svg.i {
  width: 13px;
  height: 13px;
}
.ct-cd-ab sup {
  color: var(--ct-ui-cd-orange);
  font-weight: 700;
  font-size: 11px;
}
.ct-cd-src {
  font-size: 12px;
  color: var(--ct-ui-cd-muted);
  margin-top: 6px;
  line-height: 1.45;
}
.ct-cd-h {
  font-size: 12px;
  color: var(--ct-ui-cd-muted);
  font-weight: 700;
  margin: 10px 0 4px;
}
.ct-cd-r {
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--ct-ui-cd-card);
  border-radius: 16px;
  padding: 5px 10px 5px 5px;
  margin-top: 5px;
  font-size: 14px;
  cursor: pointer;
}
.ct-cd-r img {
  width: 44px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
}
.ct-cd-r .ct-cd-v {
  margin-left: auto;
  color: var(--ct-ui-cd-orange);
  font-weight: 700;
  display: flex;
  gap: 2px;
  align-items: center;
  white-space: nowrap;
}
.ct-cd-r .ct-cd-v svg.i {
  width: 14px;
  height: 14px;
}
.ct-cd-ok {
  color: var(--ct-ui-cd-ok);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.ct-cd-dang,
.ct-cd-mo {
  color: var(--ct-ui-cd-muted);
}
.ct-cd-dang {
  margin-top: 14px;
}
.ct-cd-con-lai {
  margin-top: 10px;
  font-size: 12px;
  color: var(--ct-ui-cd-muted);
}
/* bản soạn sẵn (M1-03) */
.ct-cd-draft {
  background: var(--ct-ui-cd-card);
  border-radius: 20px;
  padding: 10px 12px;
  margin-top: 6px;
}
.ct-cd-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ct-ui-cd-blue);
}
.ct-cd-tag::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.ct-cd-tt {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  margin: 6px 0;
}
.ct-cd-draft .ct-cd-ctx {
  margin: 0;
}
.ct-cd-row {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 14px;
  color: var(--ct-ui-cd-soft);
  margin-top: 6px;
}
.ct-cd-shot {
  width: 70px;
  height: 34px;
  border-radius: 6px;
  background: var(--ct-ui-cd-shot);
  object-fit: cover;
  flex: none;
}
.ct-cd-gtog {
  width: 40px;
  height: 24px;
  border-radius: 99px;
  background: var(--ct-ui-cd-ok);
  position: relative;
  margin-left: auto;
  flex: none;
}
.ct-cd-gtog::after {
  content: '';
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ct-ui-cd-white);
}
/* hết lượt (M1-04) */
.ct-cd-empty {
  text-align: center;
  padding: 18px 10px 6px;
}
.ct-cd-ic {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--ct-ui-cd-chip);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ct-cd-ic svg.i {
  width: 34px;
  height: 34px;
}
.ct-cd-big {
  font-size: 20px;
  font-weight: 700;
  margin: 8px 0 4px;
}
/* chân khay */
.ct-cd-f {
  display: flex;
  gap: 8px;
  padding: 8px 14px 12px;
  align-items: center;
}
.ct-cd-f.day-phai {
  justify-content: flex-end;
}
.ct-cd .ct-cd-f.hai-nut > .ct-cd-gb {
  flex: 1;
}
.ct-cd-ginp {
  flex: 1;
  min-width: 0;
  border: 0;
  border-radius: 99px;
  background: var(--ct-ui-cd-card);
  padding: 9px 14px;
  font: inherit;
  color: var(--ct-ui-cd-text);
  outline: none;
}
.ct-cd-ginp::placeholder {
  color: var(--ct-ui-cd-muted-2);
}
.ct-cd .ct-cd-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ct-ui-cd-white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.ct-cd-send svg.i {
  stroke: var(--ct-ui-cd-ink);
  width: 20px;
  height: 20px;
}
.ct-cd-gb {
  border-radius: 99px;
  padding: 9px 14px;
  font-weight: 700;
  font-size: 15px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  flex: none;
}
.ct-cd-gb.p {
  background: var(--ct-ui-cd-white);
  color: var(--ct-ui-cd-ink);
}
.ct-cd-gb.s {
  background: var(--ct-ui-cd-chip);
  color: var(--ct-ui-cd-text);
}
.ct-cd-gb svg.i {
  width: 18px;
  height: 18px;
}
.ct-cd-gb:disabled {
  opacity: 0.6;
}
/* M1-05: khung cộng đồng phủ trên game — bài trái, trả lời phải */
.ct-cd-over {
  position: absolute;
  inset: 12px 12px 12px 56px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 28px;
  background: var(--ct-ui-cd-sheet);
  color: var(--ct-ui-cd-text);
  box-shadow: var(--ct-ui-cd-shadow);
}
.ct-cd-oh {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}
.ct-cd-oh b {
  flex: 1;
}
.ct-cd-cols {
  flex: 1;
  display: flex;
  min-height: 0;
}
.ct-cd-cols > div {
  overflow: auto;
  padding: 10px 14px;
}
.ct-cd-cols > .l {
  width: 44%;
  flex: none;
  border-right: 1px solid var(--ct-ui-cd-line);
}
.ct-cd-pt {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.2px;
}
.ct-cd-who {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ct-ui-cd-muted);
  margin: 2px 0;
}
.ct-cd-who b {
  color: var(--ct-ui-cd-text);
}
.ct-cd-than {
  font-size: 14px;
  margin: 4px 0;
}
.ct-cd-pimg {
  width: 100%;
  height: 96px;
  object-fit: cover;
  border-radius: 16px;
  margin-top: 6px;
}
.ct-cd-acts {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.ct-cd-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 99px;
  background: var(--ct-ui-cd-chip);
  font-size: 14px;
  font-weight: 600;
}
.ct-cd-pill.up {
  background: var(--ct-ui-cd-accent);
  color: var(--ct-ui-cd-white);
}
.ct-cd-pill svg.i {
  width: 16px;
  height: 16px;
}
.ct-cd-cm {
  position: relative;
  padding: 8px 0 4px 14px;
  border-left: 2px solid var(--ct-ui-cd-line);
}
.ct-cd-cm.acc {
  border-left-color: var(--ct-ui-cd-ok);
}
.ct-cd-cm .ct-cd-txt {
  font-size: 14px;
  margin: 2px 0 4px;
}
.ct-cd-cact {
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 13px;
  color: var(--ct-ui-cd-muted);
  font-weight: 600;
}
.ct-cd-cact svg.i {
  width: 16px;
  height: 16px;
}
.ct-cd-accbar {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ct-ui-cd-ok);
  margin-bottom: 2px;
}
.ct-cd-accbar svg.i {
  width: 16px;
  height: 16px;
}
.ct-cd-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 99px;
  background: var(--ct-ui-cd-chip);
  white-space: nowrap;
}
/* M1-06: mã liên kết trong game */
.ct-cd-mini {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, calc(100% - 24px));
  padding: 16px 20px;
  border-radius: 28px;
  background: var(--ct-ui-cd-sheet);
  text-align: center;
  box-shadow: var(--ct-ui-cd-shadow);
}
.ct-cd-minih {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ct-cd-minih b {
  flex: 1;
  text-align: left;
  font-size: 15px;
}
.ct-cd-digits {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: 8px;
  margin: 6px 0 2px;
  font-variant-numeric: tabular-nums;
}
.ct-cd-t {
  font-size: 14px;
  color: var(--ct-ui-cd-orange);
  font-weight: 600;
}
.ct-cd-minib {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.ct-cd-minib .ct-cd-gb {
  flex: 1;
}
/* dọc (390 wide): khay tràn bề ngang, hai cột xếp dọc */
@media (max-width: 620px) {
  .ct-cd-body {
    flex-direction: column;
    overflow: auto;
  }
  .ct-cd-c1,
  .ct-cd-c2 {
    flex: none;
    overflow: visible;
  }
  .ct-cd-over {
    inset: 12px;
  }
  .ct-cd-cols {
    flex-direction: column;
  }
  .ct-cd-cols > .l {
    width: auto;
    border-right: 0;
    border-bottom: 1px solid var(--ct-ui-cd-line);
  }
}
/* vòng nhấn quanh nút Hỏi tới khi người chơi mở khung lần đầu (M1-01) */
.ct-hoi.co-nhan {
  box-shadow:
    0 0 0 3px var(--ct-ui-cd-accent),
    0 0 0 9px var(--ct-ui-cd-accent-ring);
}
/* Chấm đỏ "có trả lời mới" trên nút Hỏi */
.ct-hoi.co-moi::after {
  content: '';
  position: absolute;
  top: 5px;
  right: 5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ct-ui-dot);
  box-shadow: 0 0 0 2px var(--ct-ui-scrim);
}

/* Thẻ tin hệ thống thay dải chữ giữa màn của game (đề xuất 5 + 10): chữ to, nền tối, trượt vào, tự tan.
   Dải gốc nằm ở y 44..80 của khung 512×320 = 13,75%..25% chiều cao màn. */
.ct-bulletin-veil {
  position: absolute;
  left: 0;
  right: 0;
  top: 14%;
  height: 10.5%;
  background: var(--ct-ui-bulletin-veil);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  pointer-events: none;
}
.ct-bulletin-veil[hidden] {
  display: none;
}
/* góc dưới trái (nhân vật luôn ở giữa màn): không che hình lúc đánh như dải giữa màn cũ */
.ct-bulletin-stack {
  position: absolute;
  left: calc(var(--safe-left) + 10px);
  bottom: calc(var(--safe-bottom) + 10px);
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: 4px;
  max-width: min(420px, 52%);
  pointer-events: none;
}
/* cỡ chữ do controls.js đặt (1,25× chữ game); ở đây chỉ giữ kiểu chữ dùng chung */
.ct-bulletin {
  padding: 6px 14px 7px;
  border: var(--ct-ui-line) solid var(--ct-ui-edge);
  border-radius: 9px;
  background: var(--ct-ui-bulletin);
  box-shadow: var(--ct-ui-frame);
  color: var(--ct-ui-text);
  font-family: -apple-system, 'Helvetica Neue', Roboto, Arial, sans-serif;
  font-size: var(--ct-bulletin-size, 17px); /* controls.js đặt = 1,25 × cỡ chữ game */
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-shadow: var(--ct-ui-bulletin-shadow);
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.25s ease-out,
    transform 0.25s ease-out;
}
.ct-bulletin.is-shown {
  opacity: 1;
  transform: none;
}
/* Bản đồ nhỏ (đề xuất 3): góc trên trái, dưới khung HP/MP của game; chỉ hiện khi có đích tìm đường. */
.ct-mini {
  position: absolute;
  left: calc(max(6px, var(--safe-left)) + 50px); /* ngay phải cột biểu tượng nhanh, dưới khung HP/MP */
  top: 22%;
  width: 92px;
  height: 62px;
  border: var(--ct-ui-line) solid var(--ct-ui-edge);
  border-radius: 9px;
  background: var(--ct-ui-mini);
  box-shadow: var(--ct-ui-frame);
  pointer-events: none;
}
.ct-mini[hidden] {
  display: none;
}

/* ─── Mốc 2: sáu màn trong game (M2-01, M2-04, M2-10, M2-11, M2-12, M2-16) ─────────────────
   Hình khối chép từ mockup 145444 `nguon/frag-m2.css` (khung ngang 844×390). Mã màu vẫn chỉ
   nằm ở bảng --ct-ui-* phía trên; cỡ chữ/bề rộng giữ đúng số của mockup. */
.ct-cd-dim {
  position: absolute;
  inset: 0;
  background: var(--ct-ui-cd-dim);
}
/* Khay rộng 612 (màn ngang) — cùng khuôn .ct-cd-panel nhưng canh theo mockup */
.ct-cd-sheet {
  position: absolute;
  top: 12px;
  right: 12px;
  bottom: 12px;
  width: min(612px, calc(100% - 24px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 28px;
  background: var(--ct-ui-cd-sheet);
  box-shadow: var(--ct-ui-cd-shadow);
  -webkit-backdrop-filter: var(--ct-ui-cd-blur);
  backdrop-filter: var(--ct-ui-cd-blur);
}
.ct-cd-sh {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 10px 18px;
}
.ct-cd-sh b {
  flex: 1;
  font-size: 17px;
}
.ct-cd-sh svg.i {
  width: 22px;
  height: 22px;
}
.ct-cd-sb {
  flex: 1;
  display: flex;
  gap: 14px;
  min-height: 0;
  padding: 0 14px 10px;
}
.ct-cd-sb > div {
  min-width: 0;
  overflow: auto;
}
.ct-cd-sb .ct-cd-c1 {
  flex: none;
  width: 272px;
}
.ct-cd-sb .ct-cd-c2 {
  flex: 1;
}
/* dòng thư (M2-01) */
.ct-cd-mrow {
  position: relative;
  display: flex;
  gap: 10px;
  align-items: center;
  border-radius: 20px;
  padding: 7px 12px;
  margin-bottom: 6px;
  background: var(--ct-ui-cd-card);
  cursor: pointer;
}
.ct-cd-mrow.sel {
  background: var(--ct-ui-cd-chip);
}
.ct-cd-mrow .ct-cd-ic {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ct-ui-cd-chip);
}
.ct-cd-mrow .ct-cd-ic svg.i {
  width: 20px;
  height: 20px;
}
.ct-cd-mrow .ct-cd-mt {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}
.ct-cd-mrow .ct-cd-md {
  display: block;
  margin-top: 1px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ct-ui-cd-muted);
}
.ct-cd-mrow.read .ct-cd-mt {
  font-weight: 500;
  color: var(--ct-ui-cd-soft);
}
.ct-cd-mrow .ct-cd-maildot {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ct-ui-cd-accent);
}
/* chi tiết thư */
.ct-cd-mailh {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}
.ct-cd-mailh .ct-cd-av {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  background: var(--ct-ui-cd-chip);
  color: var(--ct-ui-cd-text);
  flex: none;
}
.ct-cd-mailh b {
  font-size: 16px;
}
.ct-cd-mailh .ct-cd-mu {
  font-size: 14px;
  color: var(--ct-ui-cd-muted);
}
.ct-cd-quote {
  padding: 8px 14px;
  margin: 4px 0 8px;
  border-radius: 16px;
  background: var(--ct-ui-cd-chip);
  color: var(--ct-ui-cd-blue);
  font-size: 14px;
}
.ct-cd-mbody {
  background: var(--ct-ui-cd-card);
  border-radius: 20px;
  padding: 10px 14px;
  font-size: 15px;
  line-height: 1.45;
}
.ct-cd-mailacts {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.ct-cd-mailacts .ct-cd-gb.p {
  flex: 1;
}
.ct-cd-null {
  color: var(--ct-ui-cd-muted);
  padding: 10px 2px;
  font-size: 15px;
}
/* đăng nhập trong app (M2-04) */
.ct-cd-login {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(520px, calc(100% - 24px));
  padding: 18px 22px 14px;
  border-radius: 28px;
  background: var(--ct-ui-cd-sheet);
  box-shadow: var(--ct-ui-cd-shadow);
}
.ct-cd-login .ct-cd-hd {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ct-cd-login .ct-cd-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ct-ui-cd-white);
  color: var(--ct-ui-cd-ink);
  flex: none;
}
.ct-cd-login .ct-cd-mark svg.i {
  width: 28px;
  height: 28px;
}
.ct-cd-login .ct-cd-hd b {
  flex: 1;
  font-size: 19px;
  line-height: 1.25;
}
.ct-cd-login .ct-cd-char {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 20px;
  background: var(--ct-ui-cd-card);
}
.ct-cd-login .ct-cd-char .ct-cd-mu {
  font-size: 13px;
  color: var(--ct-ui-cd-muted);
}
.ct-cd-login .ct-cd-cav {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}
/* chip vai trò người gửi thư (M2-01) và chip tên game (M2-04) — chép `badge b-hd` / `gtag` của mockup */
.ct-cd-role,
.ct-cd-chip {
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 99px;
  background: var(--ct-ui-cd-chip);
  color: var(--ct-ui-cd-soft);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.ct-cd-login .ct-cd-row2 {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.ct-cd-login .ct-cd-sso {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border-radius: 99px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.ct-cd-login .ct-cd-sso.g {
  background: var(--ct-ui-cd-white);
  color: var(--ct-ui-cd-ink);
}
.ct-cd-login .ct-cd-sso.a {
  background: var(--ct-ui-cd-chip);
  color: var(--ct-ui-cd-text);
}
.ct-cd-login .ct-cd-later {
  display: block;
  margin-top: 6px;
  padding: 10px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--ct-ui-cd-muted);
}
.ct-cd-login .ct-cd-err {
  margin-top: 6px;
  font-size: 14px;
  color: var(--ct-ui-cd-orange);
  text-align: center;
}
/* nhiệm vụ cộng đồng tuần (M2-10) */
.ct-cd-gtabs {
  display: flex;
  gap: 18px;
  padding: 0 20px 6px;
}
.ct-cd-gtabs span {
  padding: 6px 2px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ct-ui-cd-muted);
  border-bottom: 2.5px solid transparent;
  white-space: nowrap;
}
.ct-cd-gtabs span.on {
  color: var(--ct-ui-cd-text);
  border-bottom-color: var(--ct-ui-cd-accent);
}
.ct-cd-gtabs i {
  font-style: normal;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 99px;
  font-size: 12px;
  background: var(--ct-ui-cd-accent);
  color: var(--ct-ui-cd-white);
}
.ct-cd-gh {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ct-ui-cd-muted);
}
.ct-cd-gh svg.i {
  width: 16px;
  height: 16px;
}
.ct-cd-gq {
  margin-bottom: 6px;
  padding: 8px 14px 10px;
  border-radius: 20px;
  background: var(--ct-ui-cd-card);
}
.ct-cd-gq .ct-cd-l {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}
.ct-cd-gq .ct-cd-l b {
  margin-left: auto;
  white-space: nowrap;
}
.ct-cd-gq.done .ct-cd-l b {
  color: var(--ct-ui-cd-ok);
}
.ct-cd-bar {
  height: 8px;
  margin-top: 6px;
  border-radius: 99px;
  overflow: hidden;
  background: var(--ct-ui-cd-chip);
}
.ct-cd-bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--ct-ui-cd-accent);
}
.ct-cd-bar.gr i,
.ct-cd-gq.done .ct-cd-bar i {
  background: var(--ct-ui-cd-ok);
}
.ct-cd-reward {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 14px;
  border-radius: 20px;
  background: var(--ct-ui-cd-gold-soft);
  color: var(--ct-ui-cd-gold);
  font-size: 14px;
  line-height: 1.3;
}
.ct-cd-reward b {
  display: block;
  font-size: 15px;
}
.ct-cd-reward svg.i {
  width: 26px;
  height: 26px;
  stroke: var(--ct-ui-cd-gold);
}
.ct-cd-kq {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 8px;
  padding: 10px 14px;
  border-radius: 20px;
  background: var(--ct-ui-cd-card);
  font-size: 14px;
  line-height: 1.3;
}
/* ảnh xem trước mỗi câu hỏi (mockup M2-10/M2-12) */
.ct-cd-thumb {
  width: 50px;
  height: 38px;
  border-radius: 12px;
  object-fit: cover;
  flex: none;
}
.ct-cd-kqb {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ct-cd-kq .r1,
.ct-cd-kq .r2 {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ct-cd-kq .v {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 34px;
  color: var(--ct-ui-cd-orange);
  font-weight: 700;
}
.ct-cd-kq .v svg.i {
  width: 14px;
  height: 14px;
}
.ct-cd-kq .ok {
  color: var(--ct-ui-cd-ok);
  font-size: 13px;
  font-weight: 700;
}
.ct-cd-kq .ct-cd-gb {
  margin-left: auto;
  padding: 7px 14px;
  font-size: 14px;
}
/* danh hiệu trên đầu nhân vật (M2-11) */
.ct-cd-nameplate {
  position: absolute;
  /* Nổi trên HUD của game và các khối khác trong #controls (QA #163016 lượt 15: đồng hồ góc trên che mất bảng). */
  z-index: 12;
  transform: translateX(-50%);
  text-align: center;
  white-space: nowrap;
  line-height: 1.15;
  pointer-events: none;
}
.ct-cd-nameplate .ti {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 15px;
  font-weight: 800;
  color: var(--ct-ui-cd-gold);
  text-shadow:
    -1px 0 var(--ct-ui-cd-ink-2),
    1px 0 var(--ct-ui-cd-ink-2),
    0 -1px var(--ct-ui-cd-ink-2),
    0 1px var(--ct-ui-cd-ink-2);
}
.ct-cd-nameplate .ti svg.i {
  width: 16px;
  height: 16px;
  stroke: var(--ct-ui-cd-gold);
  fill: var(--ct-ui-cd-gold);
}
.ct-cd-nameplate .pn {
  display: block;
  font-size: 20px;
  font-weight: 600;
  color: var(--ct-ui-cd-cyan);
  text-shadow:
    -1px 0 var(--ct-ui-cd-cyan-2),
    1px 0 var(--ct-ui-cd-cyan-2),
    0 -1px var(--ct-ui-cd-cyan-2),
    0 1px var(--ct-ui-cd-cyan-2);
}
.ct-cd-toast {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: min(430px, calc(100% - 24px));
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-radius: 28px;
  background: var(--ct-ui-cd-sheet);
  box-shadow: var(--ct-ui-cd-shadow);
}
.ct-cd-toast .ct-cd-ic {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: var(--ct-ui-cd-gold-soft);
  color: var(--ct-ui-cd-gold);
}
.ct-cd-toast b {
  display: block;
  font-size: 16px;
  line-height: 1.3;
  color: var(--ct-ui-cd-gold);
}
.ct-cd-toast .s {
  font-size: 14px;
  color: var(--ct-ui-cd-soft);
}
/* màn tải game (M2-12): thời gian chờ thành lối vào cộng đồng — chép `frag-m2.css` .m2-lcards/.m2-lc/.m2-lq.
   Khối này nằm trong #cho (ngoài #controls) nên dùng thẳng bảng màu tối giản của mockup, không qua --ct-ui-*. */
.m2-tai {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  padding: 22px 36px;
  background: rgba(14, 14, 16, 0.9);
}
.m2-tai[hidden] {
  display: none;
}
.m2-tai-lt {
  text-align: center;
}
.m2-tai-lt .lg {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 6px;
  color: #f4f4f5;
}
.m2-tai-lb .l {
  display: flex;
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 600;
  color: #9a9aa3;
}
.m2-tai-lb .l b {
  margin-left: auto;
  color: #fff;
}
.m2-tai-bar {
  height: 10px;
  border-radius: 99px;
  background: #ffffff26;
  overflow: hidden;
}
.m2-tai-bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: #ff5a1f;
}
/* nằm trong #cho (ngoài .ct-cd) nên phải khai lại nét vẽ cho biểu tượng, không thì `use` rỗng nét. */
.m2-tai svg.i {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.m2-tai-cards {
  display: flex;
  gap: 16px;
}
.m2-tai-lc {
  flex: 1;
  min-width: 0;
  height: 196px;
  padding: 16px 18px;
  border-radius: 28px;
  background: rgba(24, 24, 27, 0.95);
}
.m2-tai-ch {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.2px;
}
.m2-tai-lc.tip .m2-tai-ch {
  color: #ffb347;
}
.m2-tai-ic {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  background: #ff45002e;
  color: #ff8a5c;
}
.m2-tai-ic.am {
  background: #ffb34726;
  color: #ffb347;
}
.m2-tai-ic svg.i {
  width: 20px;
  height: 20px;
}
.m2-tai-tp {
  margin: 8px 0 10px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.4;
}
.m2-tai-src {
  font-size: 14px;
  color: #9a9aa3;
}
.m2-tai-q {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 6px;
  padding: 6px 12px 6px 6px;
  border-radius: 18px;
  background: #232327;
  font-size: 15px;
  line-height: 1.3;
  cursor: pointer;
}
.m2-tai-q img {
  width: 50px;
  height: 38px;
  border-radius: 12px;
  object-fit: cover;
  flex: none;
}
.m2-tai-q .v {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 2px;
  color: #ff8a5c;
  font-weight: 700;
  white-space: nowrap;
}
.m2-tai-q .v svg.i {
  width: 14px;
  height: 14px;
}
/* chụp màn, khoe đồ (M2-16) */
.ct-cd-shotbox {
  position: relative;
  height: 116px;
  border-radius: 20px;
  overflow: hidden;
  background: var(--ct-ui-cd-shot);
}
.ct-cd-shotbox img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ct-cd-shotbox .cm2 {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ct-ui-cd-sheet);
  color: var(--ct-ui-cd-white);
}
.ct-cd-shotbox .cm2 svg.i {
  width: 20px;
  height: 20px;
}
.ct-cd-flb {
  margin: 10px 0 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ct-ui-cd-muted);
}
.ct-cd-eq {
  display: flex;
  gap: 6px;
}
.ct-cd-eq div {
  flex: 1;
  min-width: 0;
  padding: 6px 4px;
  border-radius: 16px;
  background: var(--ct-ui-cd-card);
  text-align: center;
  font-size: 13px;
  line-height: 1.25;
  color: var(--ct-ui-cd-soft);
}
.ct-cd-eq svg.i {
  display: block;
  width: 22px;
  height: 22px;
  margin: 0 auto 2px;
}
.ct-cd-draft2 {
  padding: 10px 12px;
  border-radius: 20px;
  background: var(--ct-ui-cd-card);
}
.ct-cd-draft2 .ct-cd-tagline {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.ct-cd-tag.t-khoe {
  background: var(--ct-ui-cd-vio-soft);
  color: var(--ct-ui-cd-vio);
}
.ct-cd-fill {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  padding: 1px 9px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 700;
  background: var(--ct-ui-cd-vio-soft);
  color: var(--ct-ui-cd-vio);
}
.ct-cd-fill svg.i {
  width: 13px;
  height: 13px;
}
.ct-cd-sh-f {
  justify-content: flex-end;
  padding-top: 8px;
}
.ct-cd-draft2 .tt {
  width: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: none;
  color: var(--ct-ui-cd-text);
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  margin: 6px 0;
}
.ct-cd-draft2 .gctx {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.ct-cd-draft2 .gctx span {
  padding: 2px 9px;
  border-radius: 10px;
  background: var(--ct-ui-cd-chip);
  color: var(--ct-ui-cd-soft);
  font-size: 12px;
}
.ct-cd-cam {
  position: absolute;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--ct-ui-cd-sheet);
  color: var(--ct-ui-cd-white);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.1;
  box-shadow: var(--ct-ui-cd-shadow);
}
.ct-cd-cam svg.i {
  width: 26px;
  height: 26px;
}

/* M4-03 (#163000) — tab "Chéo game" trong khay Nhiệm vụ. Lớp chép nguyên từ mockup 145444
   `nguon/frag-m4.css` m4-gtabs/m4-q/m4-slots/m4-bar/m4-rw, đổi biến sang bảng màu khung cộng đồng. */
/* Lớp m4- viết theo tên biến của mockup (nguon/theme-toi.css); khung trong game đặt tên ct-ui-cd-* ⇒ bí danh. */
.ct-cd {
  --chip: var(--ct-ui-cd-chip);
  --card: var(--ct-ui-cd-card);
  --fg: var(--ct-ui-cd-text);
  --mu: var(--ct-ui-cd-muted);
  --bd: var(--ct-ui-cd-line);
  --ac: var(--ct-ui-cd-accent);
  --ac2: var(--ct-ui-cd-blue);
  --ok: var(--ct-ui-cd-ok);
  --warn: var(--ct-ui-cd-gold);
}
.ct-cd .m4-gtabs {
  display: flex;
  gap: 8px;
  padding: 4px 18px 6px;
}
.ct-cd .m4-gtabs span {
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 99px;
  background: var(--chip);
  color: var(--mu);
  min-height: 40px;
  display: flex;
  align-items: center;
  cursor: pointer;
}
.ct-cd .m4-gtabs span.on {
  background: var(--ct-ui-cd-white);
  color: var(--ct-ui-cd-ink);
  font-weight: 600;
}
/* dấu đếm đỏ trên tab (mockup frag-m2.css .m2-gtabs i) — kế thừa từ M2-10 sang hàng tab M4-03 */
.ct-cd .m4-gtabs i {
  font-style: normal;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 99px;
  font-size: 12px;
  background: var(--ct-ui-cd-red);
  color: var(--ct-ui-cd-white);
}
.ct-cd .m4-q {
  background: var(--chip);
  border-radius: 22px;
  padding: 12px 16px;
  margin-bottom: 8px;
}
.ct-cd .m4-q .hd {
  display: flex;
  gap: 12px;
  align-items: center;
}
.ct-cd .m4-q .ic {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--ct-ui-cd-gold-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.ct-cd .m4-q .ic svg.i {
  width: 28px;
  height: 28px;
  fill: var(--ct-ui-cd-gold);
  stroke: var(--ct-ui-cd-gold);
}
.ct-cd .m4-q b {
  font-size: 15px;
  display: block;
  line-height: 1.3;
  letter-spacing: -.2px;
}
.ct-cd .m4-q .mu {
  font-size: 13.5px;
  color: var(--mu);
}
.ct-cd .m4-slots {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 10px 0 0;
}
.ct-cd .m4-slots span.s {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--ct-ui-cd-line-2);
  color: var(--ct-ui-cd-line-2);
  flex: none;
}
.ct-cd .m4-slots span.s.f {
  background: var(--ct-ui-cd-gold-soft);
  border: 2px solid var(--ct-ui-cd-gold);
  color: var(--ct-ui-cd-gold);
}
.ct-cd .m4-slots svg.i {
  width: 24px;
  height: 24px;
}
.ct-cd .m4-slots span.f svg.i {
  fill: var(--ct-ui-cd-gold);
  stroke: var(--ct-ui-cd-gold);
}
.ct-cd .m4-bar {
  height: 10px;
  border-radius: 99px;
  background: var(--ct-ui-cd-bar);
  overflow: hidden;
}
.ct-cd .m4-bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--ok);
}
.ct-cd .m4-q.lock {
  opacity: 0.6;
  margin-top: 8px;
  padding: 8px 14px;
}
.ct-cd .m4-q.lock .ic {
  width: 40px;
  height: 40px;
  background: var(--ct-ui-cd-lock);
}
.ct-cd .m4-q.lock .ic svg.i {
  stroke: var(--ct-ui-cd-muted-2);
  fill: none;
}
.ct-cd .m4-rw {
  border-radius: 22px;
  padding: 14px;
  background: var(--chip);
  text-align: center;
}
.ct-cd .m4-rw .lb {
  font-size: 13px;
  font-weight: 600;
  color: var(--ct-ui-cd-gold);
  text-align: left;
}
.ct-cd .m4-rw img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--ct-ui-cd-gold);
  box-shadow: 0 0 0 4px var(--ct-ui-cd-gold-ring);
  margin: 8px 0 6px;
}
.ct-cd .m4-rw .nm {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.2px;
}
.ct-cd .m4-rw .tt {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin-top: 6px;
  padding: 5px 14px;
  border-radius: 99px;
  background: var(--ct-ui-cd-gold);
  color: var(--ct-ui-cd-ink);
  font-weight: 700;
  font-size: 14px;
}
.ct-cd .m4-rw .tt svg.i {
  width: 18px;
  height: 18px;
  fill: var(--ct-ui-cd-ink-soft);
  stroke: var(--ct-ui-cd-ink);
}
.ct-cd .m4-rw .mu {
  font-size: 13.5px;
  color: var(--mu);
  margin-top: 8px;
}

/* #163000 — Nhặt Sao bản web nằm trong khung phủ (nút "Chơi Nhặt Sao" của tab Chéo game). */
.ct-cd .ct-cd-ns {
  display: block;
  width: 100%;
  height: 100%;
  margin-top: 8px;
  border: 0;
  border-radius: 20px;
  background: var(--ct-ui-cd-ns);
}
