/* =========================================================
   Max 3D / 3D+ / Pro — giao diện theo thiết kế mới (theme xanh đậm, nhấn hồng)
   Áp dụng khi max3d-dash.js gắn .m3-on cho <body>.
   Header, footer, select, sheet dùng chung ở dash-theme.css (.dash-on).
   Dùng lại vài lớp chung của mega-dash.css: .md-wrap, .md-link, .md-vr, .md-cartbtn, .md-foot…
   ========================================================= */
body.m3-on {
  --md-accent: #e6197e;
  --md-accent-2: #ff4fa3;
  --m3-pink: #e6197e;
  --m3-pink-2: #ff5aa8;
  --m3-soft: #fde4f0;
  background:
    radial-gradient(900px 340px at 72% 0, rgba(230, 25, 126, 0.28), transparent 70%),
    radial-gradient(700px 420px at 0 30%, rgba(40, 90, 220, 0.25), transparent 70%),
    linear-gradient(180deg, var(--md-bg), var(--md-bg-2));
  background-color: var(--md-bg-2);
}
.m3 {
  padding: 12px 0 0;
  font-family: var(--app-font, 'Be Vietnam Pro', system-ui, sans-serif);
}
.m3 * {
  box-sizing: border-box;
}
.m3 button,
.m3 input {
  font-family: inherit;
}
.m3 h2,
.m3 h3,
.m3 h4,
.m3 p {
  margin: 0;
}
.m3 em {
  font-style: normal;
}
.m3 .md-link {
  color: var(--md-blue);
}
.m3-i {
  display: inline-grid;
  vertical-align: middle;
  color: currentColor;
  opacity: 0.8;
}
.m3-i svg {
  width: 15px;
  height: 15px;
}

/* bóng hồng */
.m3-b {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  background: radial-gradient(circle at 34% 28%, #ffd0e7 0, #ff6fb6 22%, #e6197e 60%, #8a0049 100%);
  box-shadow:
    0 4px 9px rgba(200, 0, 100, 0.35),
    inset 0 -3px 6px rgba(80, 0, 40, 0.35);
}
.m3-b.g {
  color: transparent;
  background: radial-gradient(circle at 34% 28%, #fff 0, #eceef2 35%, #c3c8d2 80%, #a3a9b5 100%);
  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.15);
}

/* ---------- HERO ---------- */
.m3-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 84px;
  padding: 10px 18px;
}
.m3-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}
.m3-orbs {
  position: relative;
  width: 88px;
  height: 62px;
}
.m3-orbs i {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #ffd0e7 0, #ff6fb6 22%, #e6197e 60%, #8a0049 100%);
  box-shadow: 0 6px 14px rgba(230, 25, 126, 0.45);
}
.m3-orbs i:nth-child(1) {
  left: 0;
  top: 14px;
  width: 44px;
  height: 44px;
}
.m3-orbs i:nth-child(2) {
  left: 36px;
  top: 0;
  width: 40px;
  height: 40px;
}
.m3-orbs i:nth-child(3) {
  left: 46px;
  top: 28px;
  width: 34px;
  height: 34px;
}
.m3-brand b {
  display: block;
  font-size: clamp(30px, 2.8vw, 44px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -1px;
  color: #fff;
  white-space: nowrap;
}
.m3-brand b em,
.m3-c3h h2 em,
.m3-lh h2 em {
  color: var(--m3-pink-2);
}
.m3-brand b small {
  font-size: 26px;
  color: var(--m3-pink-2);
  margin-left: 2px;
}
.m3-brand > div > span {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  color: #dfe7fb;
}
.m3-var {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.m3-tabs {
  display: flex;
  padding: 3px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}
.m3-tabs button {
  height: 34px;
  padding: 0 clamp(12px, 1.5vw, 30px);
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--m3-pink);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.m3-tabs button + button {
  border-left: 1px solid #f3d3e3;
  border-radius: 0;
}
.m3-tabs button.on {
  border-radius: 6px;
  border-left: 0;
  background: linear-gradient(180deg, #ff4fa3, #d8106f);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(230, 25, 126, 0.4);
}
.m3-tabs button.on + button {
  border-left: 0;
}
.m3-var p {
  font-size: 13px;
  color: #dfe7fb;
  white-space: nowrap;
}
.m3-clock small {
  display: block;
  font-size: 13px;
  color: #dfe7fb;
}
.m3-clock > div {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0;
}
.m3-cic svg {
  width: 30px;
  height: 30px;
  color: #fff;
}
.m3-clock b {
  font-size: clamp(20px, 1.9vw, 28px);
  font-weight: 800;
  letter-spacing: 0.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.m3-clock em {
  display: block;
  font-size: 12.5px;
  color: #dfe7fb;
  white-space: nowrap;
}
.m3-buy {
  margin-left: auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.m3-buy-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.m3-buy-top p {
  font-size: 12px;
  color: #dfe7fb;
  line-height: 1.5;
}
.m3-demo {
  padding: 5px 10px;
  border-radius: 5px;
  background: #5a3a14;
  border: 1px solid #c58b2c;
  color: #ffd38a;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.m3-buy-r {
  display: flex;
  align-items: center;
  gap: 8px;
}
.m3-paybtn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 14px 0 8px;
  border-radius: 6px;
  border: 0;
  background: linear-gradient(180deg, #ff3c50, #d50f29);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(229, 19, 47, 0.4);
  white-space: nowrap;
}
.m3-paybtn i {
  font-style: normal;
  font-size: 16px;
}
.m3-tic {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 5px;
  background: #fff;
  color: var(--md-red);
}
.m3-tic svg {
  width: 16px;
  height: 16px;
}
.m3-paybtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---------- LƯỚI 3 CỘT ---------- */
.m3-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.9fr 1.05fr;
  gap: 12px;
  margin-top: 6px;
  align-items: stretch;
}
.m3-card {
  min-width: 0;
  border-radius: 8px;
  background: #fff;
  color: var(--md-ink);
  padding: 10px 12px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
}
.m3-h {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.m3-h h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--md-ink);
  white-space: nowrap;
}

/* Cột 1 — các dãy gốc */
.m3-mode {
  margin-left: auto;
}
html body.m3-on .m3-mode label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  font-size: 14px;
  color: var(--md-ink);
}
html body.m3-on .m3-mode label > span {
  color: var(--md-blue);
  font-weight: 500;
}
html body.m3-on .m3-mode .nsel {
  color: var(--md-blue);
  font-weight: 700;
  font-size: 14px;
}
html body.m3-on .m3-rows #rowsCard {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
html body.m3-on .m3-rows .row2 {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 2px 6px;
  margin: 0;
  border: 0;
  border-radius: 6px;
  background: none;
}
html body.m3-on .m3-rows .row2.m3-act {
  background: var(--m3-soft);
}
html body.m3-on .m3-rows .row2 .rl {
  display: flex;
  align-items: center;
  gap: 10px;
  width: auto;
  min-width: 40px;
  font-size: 16px;
  font-weight: 500;
  color: var(--md-ink);
}
html body.m3-on .m3-rows .row2 .ed {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--md-ink);
  opacity: 1;
}
html body.m3-on .m3-rows .row2 .ed svg {
  width: 16px;
  height: 16px;
}
html body.m3-on .m3-rows .row2 .rb {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
  flex-wrap: nowrap;
  cursor: pointer;
}
html body.m3-on .m3-rows .dset {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 0;
  border: 0;
  background: none;
}
html body.m3-on .m3-rows .dset .b2 {
  width: 40px;
  height: 40px;
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  border: 0;
  color: #fff;
  background: radial-gradient(circle at 34% 28%, #ffd0e7 0, #ff6fb6 22%, #e6197e 60%, #8a0049 100%);
  box-shadow:
    0 4px 9px rgba(200, 0, 100, 0.3),
    inset 0 -3px 6px rgba(80, 0, 40, 0.35);
}
html body.m3-on .m3-rows .dset .b2 + .b2 {
  margin-left: 25px;
  position: relative;
}
html body.m3-on .m3-rows .dset .b2 + .b2::after {
  content: '';
  position: absolute;
  left: -13px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: #c9cfdb;
}
html body.m3-on .m3-rows .dset .b2.e {
  color: transparent;
  background: radial-gradient(circle at 34% 28%, #fff 0, #eceef2 35%, #c3c8d2 80%, #a3a9b5 100%);
  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.12);
}
html body.m3-on .m3-rows .dset + .dset {
  padding-left: 14px;
  border-left: 1px solid #e7c4d6;
  border-radius: 0;
}
html body.m3-on .m3-rows .stk-l {
  margin-left: auto;
  min-width: 64px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--md-blue);
  font-size: 14px;
  font-weight: 500;
  text-align: right;
}
html body.m3-on .m3-rows .row2 .hrt,
html body.m3-on .m3-rows .row2 .del {
  width: 30px;
  height: 30px;
  color: var(--md-ink);
  background: none;
  border: 0;
}
html body.m3-on .m3-rows .row2 .hrt.on {
  color: var(--m3-pink);
}
html body.m3-on .m3-rows .gp2-hint {
  display: none;
}
html body.m3-on .m3-rows .gp2-add {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px 0;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #d6e2f8;
  border-radius: 6px;
  background: #eef4ff;
  color: var(--md-blue);
  font-size: 15px;
  font-weight: 500;
}
html body.m3-on .m3-rows .gp2-add span {
  flex: none;
}
html body.m3-on .m3-rows .gp2-add small {
  display: none;
}
html body.m3-on .m3-rows .gp2-feat {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0;
}
html body.m3-on .m3-rows .gp2-feat button {
  height: 40px;
  min-height: 0;
  padding: 0 8px;
  border-radius: 6px;
  border: 0;
  background: #eef0f4;
  color: var(--md-ink);
  font-size: 14px;
  font-weight: 500;
  flex-direction: row;
  gap: 8px;
}
html body.m3-on .m3-rows .gp2-feat .fic {
  width: 24px;
  height: 24px;
  transform: none;
}
html body.m3-on .m3-rows .gp2-feat .fic b {
  font-size: 8px;
}
html body.m3-on .m3-rows .gp2-feat .mascot {
  width: 24px !important;
  height: 24px !important;
}
html body.m3-on .m3-rows .warn {
  margin: 0 0 6px !important;
}

/* Cột 2 — bộ chọn chữ số */
.m3-sets {
  margin-left: auto;
  display: flex;
  gap: 4px;
}
.m3-sets button {
  height: 26px;
  padding: 0 10px;
  border: 1px solid #f3c4dc;
  border-radius: 5px;
  background: #fff;
  color: var(--m3-pink);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.m3-sets button.on {
  background: var(--m3-pink);
  border-color: var(--m3-pink);
  color: #fff;
}
.m3-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 6px 0;
  border-radius: 6px;
  background: #fdf1f7;
}
.m3-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 0 4px;
  border-radius: 8px;
}
.m3-col + .m3-col {
  border-left: 1px solid #f1d4e3;
}
.m3-col small {
  font-size: 13px;
  color: var(--md-ink);
}
.m3-arr {
  display: grid;
  place-items: center;
  width: 30px;
  height: 20px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--md-ink);
  cursor: pointer;
}
.m3-arr svg {
  width: 18px;
  height: 18px;
}
.m3-big {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  background: radial-gradient(circle at 34% 28%, #ffd0e7 0, #ff6fb6 22%, #e6197e 60%, #8a0049 100%);
  box-shadow:
    0 5px 12px rgba(200, 0, 100, 0.35),
    inset 0 -4px 7px rgba(80, 0, 40, 0.35);
}
.m3-big.e {
  color: #8a93a6;
  background: radial-gradient(circle at 34% 28%, #fff 0, #eceef2 35%, #c3c8d2 80%, #a3a9b5 100%);
}
.m3-col.on .m3-big {
  outline: 3px solid #ffb6d9;
  outline-offset: 2px;
}
.m3-tip {
  margin: 8px 0;
  padding: 6px;
  border-radius: 4px;
  background: #fde4ef;
  text-align: center;
  font-size: 13px;
  color: var(--md-ink);
}
.m3-keys {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px 14px;
  padding: 0 10px;
}
.m3-keys button {
  height: 38px;
  padding: 0;
  border: 1px solid #d6e2f8;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--md-ink);
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
}
.m3-keys button:hover {
  border-color: #a9c2ef;
}
.m3-keys button.on {
  background: #fde4ef;
  border-color: #f3a6cb;
  color: var(--m3-pink);
  font-weight: 700;
}
.m3-quick {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 4px;
}
.m3-quick label {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--md-blue);
  white-space: nowrap;
}
.m3-qin {
  position: relative;
  flex: 1;
  min-width: 0;
}
.m3-qin input {
  width: 100%;
  height: 34px;
  padding: 0 30px 0 10px;
  border: 1px solid #d6dbe6;
  border-radius: 6px;
  font-size: 14px;
  color: var(--md-ink);
}
.m3-qin button {
  position: absolute;
  right: 6px;
  top: 7px;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #6b7280;
  color: #fff;
  font-size: 13px;
  line-height: 20px;
  cursor: pointer;
}
.m3-ob {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #c7d6f2;
  border-radius: 6px;
  background: #fff;
  color: var(--md-blue);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.m3-ob svg {
  width: 16px;
  height: 16px;
}
.m3-ob.on {
  background: #eef4ff;
  font-weight: 700;
}
.m3-draws {
  margin-top: 8px;
}
.m3-draws .m3-h .md-link {
  margin-left: auto;
}
.m3-dlist {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.m3-dlist button {
  display: grid;
  grid-template-columns: 22px 1.2fr 1fr 0.6fr;
  align-items: center;
  gap: 12px;
  height: 25px;
  padding: 0 10px 0 2px;
  border: 0;
  border-bottom: 1px solid #eef1f6;
  border-radius: 4px;
  background: #fff;
  color: var(--md-ink);
  font-size: 12.5px;
  cursor: pointer;
  text-align: left;
}
.m3-dlist button i {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid #7b8499;
  background: #fff;
}
.m3-dlist button.on {
  background: #e8f0ff;
}
.m3-dlist button.on i {
  border: 0;
  background: var(--md-blue)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12 4 4 8-8' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center/12px no-repeat;
}
.m3-dlist b {
  font-weight: 700;
}
.m3-draws footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  font-size: 11px;
  color: var(--md-ink-2);
}

/* Cột 3 — Toàn cảnh */
.m3-c3 {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--md-line);
  background: linear-gradient(160deg, rgba(26, 52, 124, 0.85), rgba(14, 32, 84, 0.85));
}
.m3-c3h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px;
}
.m3-c3h h2,
.m3-lh h2 {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #fff;
  white-space: nowrap;
}
.m3-c3h h2 span,
.m3-lh h2 span {
  font-size: 22px;
  font-weight: 900;
}
.m3-c3h small,
.m3-per small {
  font-size: 12px;
  color: #dfe7fb;
}
.m3-res {
  padding: 4px 2px;
}
.m3-res header,
.m3-check header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.m3-res h3 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}
.m3-res header small {
  font-size: 12px;
  color: #cfd9f2;
}
.m3-res header small em {
  color: var(--m3-pink-2);
}
.m3-dv {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 10px;
}
.m3-sin {
  position: relative;
  flex: 0 1 160px;
}
.m3-sin svg {
  position: absolute;
  left: 8px;
  top: 8px;
  width: 15px;
  height: 15px;
  color: #cfd9f2;
}
.m3-sin input {
  width: 100%;
  height: 30px;
  padding: 0 8px 0 28px;
  border: 1px solid var(--md-line);
  border-radius: 5px;
  background: rgba(8, 20, 54, 0.7);
  color: #fff;
  font-size: 11.5px;
}
.m3-sin input::placeholder {
  color: #9fb0d6;
}
.m3-dv button {
  height: 30px;
  padding: 0 16px;
  border: 0;
  border-radius: 5px;
  background: var(--md-blue);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.m3-prz {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.m3-prz > div {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.m3-prz b {
  flex: none;
  width: 76px;
  padding: 5px 0;
  border-radius: 4px;
  background: #fff;
  color: var(--md-ink);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}
.m3-prz span {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}
.m3-prz i {
  display: grid;
  place-items: center;
  min-width: 37px;
  height: 28px;
  padding: 0 3px;
  border-radius: 4px;
  background: linear-gradient(180deg, #f0379a, #d0127a);
  color: #fff;
  font-size: 14px;
  font-style: normal;
  font-weight: 600;
}
.m3-prz i.hit {
  background: #fff;
  color: var(--m3-pink);
  box-shadow: 0 0 0 2px #ffd25e;
}
.m3-check {
  margin-top: auto;
  padding: 8px;
  border-radius: 8px;
  background: rgba(8, 20, 54, 0.55);
}
.m3-check h3 {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
}
.m3-check .md-link {
  color: #7fb3ff;
}
.m3-cbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 6px;
  background: #fff;
  border: 2px solid #f3a6cb;
  color: var(--md-ink);
  flex-wrap: wrap;
}
.m3-cl,
.m3-cr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 6px;
}
.m3-cr {
  background: #fdf1f7;
}
.m3-cl small,
.m3-cr small {
  align-self: flex-start;
  font-size: 12.5px;
  font-weight: 600;
}
.m3-cl > span,
.m3-cr > span {
  display: flex;
  gap: 3px;
}
.m3-cbox .m3-b {
  width: 32px;
  height: 32px;
  font-size: 15px;
}
.m3-cl b,
.m3-cr b {
  font-size: 15px;
}
.m3-cr b em {
  color: var(--md-ink);
}
.m3-cr b em.m {
  color: var(--m3-pink);
}
.m3-arrow {
  font-style: normal;
  font-size: 20px;
  color: var(--m3-pink);
}
.m3-ok {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}
.m3-ok.y {
  background: #1fa45a;
}
.m3-ok.n {
  background: #9aa3b5;
}
.m3-cbox p {
  flex: 1;
  min-width: 110px;
  padding: 6px 8px;
  border-radius: 4px;
  background: #fdf1f7;
  font-size: 11.5px;
  color: var(--md-ink-2);
}
.m3-cbox p.y {
  color: var(--m3-pink);
  font-weight: 600;
}

/* ---------- LĂNG KÍNH MAX3D ---------- */
.m3-lens {
  margin-top: 12px;
  padding: 6px 6px 6px;
  border-radius: 8px;
  border: 1px solid var(--md-line);
  background: linear-gradient(180deg, rgba(14, 32, 84, 0.92), rgba(12, 28, 74, 0.92));
}
.m3-lh {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 2px 6px 6px;
}
.m3-ltabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.m3-ltabs button {
  height: 28px;
  padding: 0 16px;
  border: 0;
  border-radius: 5px;
  background: none;
  color: #dfe7fb;
  font-size: 13px;
  cursor: pointer;
}
.m3-ltabs button.on {
  background: linear-gradient(180deg, #ff4fa3, #d8106f);
  color: #fff;
  font-weight: 600;
}
.m3-per {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #dfe7fb;
}
.m3-per button {
  height: 28px;
  padding: 0 14px;
  border-radius: 5px;
  border: 1px solid var(--md-line);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 12.5px;
  cursor: pointer;
}
.m3-per button.on {
  background: var(--md-blue);
  border-color: var(--md-blue);
  font-weight: 700;
}
.m3-lbody {
  display: grid;
  grid-template-columns: 1.6fr 1.2fr 0.8fr;
  gap: 6px;
}
.m3-lp {
  min-width: 0;
  padding: 8px 10px;
  border-radius: 6px;
  background: #fff;
  color: var(--md-ink);
}
.m3-lp h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}
.m3-lp h3 em {
  color: var(--m3-pink);
}
.m3-heatw {
  display: flex;
  gap: 16px;
}
.m3-heat {
  flex: 1;
  border-collapse: separate;
  border-spacing: 2px 0;
  font-size: 12px;
}
.m3-heat th {
  font-weight: 600;
  padding: 0 4px;
  text-align: center;
}
.m3-heat tbody th {
  text-align: left;
  font-weight: 500;
  width: 52px;
}
.m3-heat td {
  padding: 0;
}
.m3-heat td button {
  display: block;
  width: 100%;
  height: 18px;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: color-mix(in srgb, #e6197e calc(var(--t) * 100%), #fde4f0);
}
.m3-legend {
  display: grid;
  grid-template-columns: 14px auto;
  grid-template-rows: 1fr 1fr;
  column-gap: 6px;
  font-size: 10px;
  color: var(--md-ink-2);
}
.m3-legend i {
  grid-row: 1/3;
  width: 14px;
  border-radius: 3px;
  background: linear-gradient(180deg, #e6197e, #fde4f0);
}
.m3-legend span:last-child {
  align-self: end;
}
.m3-tri {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}
.m3-tri button {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 0;
  border: 1px solid #f3c4dc;
  border-radius: 5px;
  background: #fdf1f7;
  color: var(--md-ink);
  cursor: pointer;
}
.m3-tri b {
  font-size: 15px;
  color: var(--m3-pink);
}
.m3-tri small {
  font-size: 10px;
  color: var(--md-ink-2);
}
.m3-ht {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.m3-ht h4 {
  font-size: 12px;
  margin-bottom: 4px;
}
.m3-ht p {
  display: grid;
  grid-template-columns: 12px 1fr 30px;
  align-items: center;
  gap: 6px;
  margin: 0 0 2px;
  font-size: 11px;
}
.m3-ht span {
  height: 6px;
  border-radius: 6px;
  background: #f3eef3;
  overflow: hidden;
}
.m3-ht span i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #ff7ab9, #e6197e);
}
.m3-ht em {
  text-align: right;
  color: var(--md-ink-2);
}
.m3-gap {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: center;
}
.m3-gap th {
  font-weight: 600;
  padding: 2px;
}
.m3-gap tbody th {
  text-align: left;
  font-weight: 500;
}
.m3-gap td {
  padding: 2px;
  border: 1px solid #f1e3ea;
}
.m3-gap td.hi {
  background: #fde4f0;
  color: var(--m3-pink);
  font-weight: 700;
}
.m3-soic {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.m3-soic > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 4px;
  border-radius: 6px;
  border: 1px solid #f1d4e3;
  background: #fdf6fa;
}
.m3-soic small {
  font-size: 12px;
  color: var(--md-ink);
}
.m3-soic b {
  font-size: 24px;
  font-weight: 800;
  color: var(--m3-pink);
}
.m3-soic b.s {
  font-size: 16px;
}
.m3-soic > div > span:not(.m3-b) {
  display: flex;
  gap: 2px;
}
.m3-soic > div > span i {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #fff 0, #eceef2 35%, #c3c8d2 80%, #a3a9b5 100%);
}
.m3-soic > div > span i.o {
  background: radial-gradient(circle at 34% 28%, #ffd0e7 0, #ff6fb6 22%, #e6197e 60%, #8a0049 100%);
}
.m3-soic .m3-b {
  width: 30px;
  height: 30px;
  font-size: 14px;
}
.m3-empty {
  grid-column: 1/-1;
  font-size: 12.5px;
  color: var(--md-ink-2);
}
.m3-hb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 4px 0 10px;
}
.m3-hb i {
  font-style: normal;
  color: #c9cfdb;
}
.m3-hb button {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 800;
  color: #8a93a6;
  cursor: pointer;
  background: radial-gradient(circle at 34% 28%, #fff 0, #eceef2 35%, #c3c8d2 80%, #a3a9b5 100%);
  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.12);
}
.m3-hb button.on {
  color: #fff;
  background: radial-gradient(circle at 34% 28%, #ffd0e7 0, #ff6fb6 22%, #e6197e 60%, #8a0049 100%);
}
.m3-hold .md-link {
  display: flex;
  justify-content: center;
}

/* Max 3D+ / Pro: 2 bộ số mỗi dãy → bóng nhỏ hơn để vừa một hàng */
html body.m3-2s .m3-rows .row2 .rb {
  gap: 8px;
  flex-wrap: nowrap;
}
html body.m3-2s .m3-rows .row2 {
  gap: 4px;
}
html body.m3-2s .m3-rows .row2 .rl {
  min-width: 30px;
  gap: 4px;
}
html body.m3-2s .m3-rows .stk-l {
  flex: none;
}
html body.m3-2s .m3-rows .row2 .hrt,
html body.m3-2s .m3-rows .row2 .del {
  width: 26px;
}
html body.m3-2s .m3-rows .dset {
  flex: none;
}
html body.m3-2s .m3-rows .dset .b2 {
  width: 27px;
  height: 27px;
  font-size: 13px;
}
html body.m3-2s .m3-rows .dset .b2 + .b2 {
  margin-left: 8px;
}
html body.m3-2s .m3-rows .dset .b2 + .b2::after {
  left: -5px;
  top: 6px;
  bottom: 6px;
}
html body.m3-2s .m3-rows .dset + .dset {
  padding-left: 8px;
}
html body.m3-2s .m3-rows .stk-l {
  min-width: 0;
  font-size: 13px;
}

/* ---------- màn hẹp ---------- */
@media (max-width: 1320px) {
  .m3-hero {
    flex-wrap: wrap;
  }
  .m3-buy {
    margin-left: auto;
  }
}
@media (max-width: 1240px) {
  .m3-buy {
    margin-left: 0;
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  .m3-grid {
    grid-template-columns: 1fr 1fr;
  }
  .m3-c3 {
    grid-column: 1/-1;
  }
  .m3-lbody {
    grid-template-columns: 1fr 1fr;
  }
  .m3-lmain {
    grid-column: 1/-1;
  }
}
@media (max-width: 760px) {
  .m3-hero {
    gap: 12px;
    padding: 10px 0;
  }
  .m3-brand b {
    font-size: 34px;
  }
  .m3-var {
    width: 100%;
  }
  .m3-tabs {
    width: 100%;
  }
  .m3-tabs button {
    flex: 1;
    padding: 0 6px;
    font-size: 13px;
  }
  .m3-var p {
    white-space: normal;
    text-align: center;
  }
  .md-vr {
    display: none;
  }
  .m3-buy {
    flex-direction: column;
    align-items: stretch;
  }
  .m3-buy-r {
    justify-content: flex-end;
  }
  .m3-grid {
    grid-template-columns: 1fr;
  }
  html body.m3-on .m3-rows .row2 {
    gap: 4px;
    padding: 2px;
  }
  html body.m3-on .m3-rows .row2 .rb {
    gap: 8px;
  }
  html body.m3-on .m3-rows .dset .b2 {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }
  html body.m3-on .m3-rows .dset .b2 + .b2 {
    margin-left: 12px;
  }
  html body.m3-on .m3-rows .dset .b2 + .b2::after {
    left: -7px;
  }
  html body.m3-on .m3-rows .dset + .dset {
    padding-left: 8px;
  }
  html body.m3-on .m3-rows .stk-l {
    min-width: 0;
    font-size: 12px;
  }
  html body.m3-on .m3-rows .row2 .rl {
    min-width: 30px;
    gap: 4px;
  }
  html body.m3-on .m3-rows .row2 .hrt,
  html body.m3-on .m3-rows .row2 .del {
    width: 24px;
  }
  .m3-keys {
    gap: 8px;
    padding: 0;
  }
  .m3-quick {
    flex-wrap: wrap;
  }
  .m3-quick label {
    flex-basis: 100%;
  }
  .m3-lbody {
    grid-template-columns: 1fr;
  }
  .m3-tri {
    grid-template-columns: repeat(4, 1fr);
  }
  .m3-ht {
    grid-template-columns: 1fr;
  }
  .m3-heatw {
    flex-direction: column;
  }
  .m3-legend {
    display: none;
  }
  .m3-per {
    margin-left: 0;
    flex-wrap: wrap;
  }
  .m3-c3h {
    flex-wrap: wrap;
  }
}

/* ---------- Thiết kế mới của Max 3D+ / Max 3D Pro (chỉ giao diện/bố cục, giữ nguyên luồng mua vé) ---------- */
.m3 {
  padding: 4px 0 0;
}
.m3 .md-wrap {
  padding: 0 21px;
}
.m3-B {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.2px;
  background: radial-gradient(circle at 34% 26%, #ffd0e7 0, #ff6fb6 20%, #e6197e 58%, #8a0049 100%);
  box-shadow:
    0 4px 10px rgba(200, 0, 100, 0.35),
    inset 0 -4px 7px rgba(80, 0, 40, 0.35);
}
.m3-B.g {
  color: #8a93a6;
  background: radial-gradient(circle at 34% 28%, #fff 0, #eceef2 35%, #c3c8d2 80%, #a3a9b5 100%);
  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.15);
}

/* HERO */
.m3-hero {
  gap: 12px;
  min-height: 85px;
  padding: 4px 0 6px 4px;
}
@media (min-width: 1241px) {
  .m3-hero {
    flex-wrap: nowrap;
  }
}
.m3-brand {
  gap: 13px;
  min-width: 0;
}
.m3-orbs {
  width: 96px;
  height: 80px;
}
.m3-orbs i:nth-child(1) {
  left: 2px;
  top: 16px;
  width: 46px;
  height: 46px;
}
.m3-orbs i:nth-child(2) {
  left: 44px;
  top: 14px;
  width: 50px;
  height: 50px;
}
.m3-orbs i:nth-child(3) {
  left: 22px;
  top: 38px;
  width: 50px;
  height: 50px;
}
.m3-brand b {
  font-size: clamp(32px, 3.3vw, 42px);
  letter-spacing: -0.5px;
}
.m3-brand b small {
  font-size: 0.82em;
  font-weight: 900;
  margin-left: 1px;
}
.m3-brand > div > span {
  margin-top: 6px;
  font-size: clamp(13px, 1.33vw, 17px);
  color: #f2f5ff;
  white-space: nowrap;
}
.m3-var {
  flex: 0 1 392px;
  min-width: 0;
  gap: 18px;
  margin-left: clamp(8px, 2.2vw, 30px);
}
.m3-tabs {
  width: 100%;
  max-width: 392px;
  padding: 0;
  border-radius: 8px;
  background: #fde6f1;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}
.m3-tabs button {
  flex: 1 1 0;
  height: 38px;
  padding: 0 6px;
  font-size: clamp(14px, 1.33vw, 17px);
  font-weight: 400;
  color: #d81a7c;
}
.m3-tabs button + button {
  border-left: 0;
}
.m3-tabs button i {
  display: none;
  margin-left: 7px;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.3px;
  vertical-align: 1px;
}
.m3-tabs button.on {
  flex: 1.25 1 0;
  border-radius: 7px;
  background: linear-gradient(180deg, #e8208a, #c40d6c);
  box-shadow:
    0 0 0 1.5px #ffb8dc,
    0 4px 12px rgba(230, 25, 126, 0.45);
}
.m3-tabs button.on i {
  display: inline;
}
.m3-var p {
  font-size: 15px;
  color: #f2f5ff;
}
.m3-var p b {
  font-weight: 500;
  font-size: 16px;
}
.m3-i {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-left: 10px;
  border: 1.5px solid #fff;
  border-radius: 50%;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  opacity: 1;
  cursor: help;
}
.m3 .md-vr {
  height: 72px;
}
.m3-clock small {
  font-size: 13px;
  color: #f2f5ff;
}
.m3-clock > div {
  gap: 12px;
  margin: 6px 0 5px;
}
.m3-cic svg {
  width: 26px;
  height: 26px;
}
.m3-clock b {
  font-size: clamp(19px, 1.72vw, 22px);
  font-weight: 500;
}
.m3-clock em {
  font-size: 12px;
}
.m3-buy {
  flex: none;
  margin-left: auto;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
}
.m3-buy-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}
.m3-buy-top p {
  align-self: flex-end;
  font-size: 12px;
  line-height: 1.65;
  color: #f2f5ff;
  white-space: nowrap;
}
.m3-demo {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  letter-spacing: 0.2px;
}
.m3 .md-cartbtn {
  height: 35px;
  padding: 0 9px;
  border-radius: 5px;
  font-size: 11px;
}
.m3-buy-r {
  gap: 7px;
}
.m3-paybtn {
  gap: 9px;
  height: 35px;
  padding: 0 10px 0 8px;
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 600;
}
.m3-tic {
  width: 24px;
  height: 24px;
}

/* LƯỚI 3 CỘT */
.m3-grid {
  grid-template-columns: minmax(0, 448fr) minmax(0, 363fr) minmax(0, 413fr);
  gap: 7px;
  margin-top: 0;
}
.m3-card {
  border-radius: 6px;
  padding: 8px 13px 12px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
}
.m3-h {
  gap: 8px;
  margin-bottom: 6px;
  min-height: 26px;
}
.m3-h h2 {
  font-size: 17px;
  font-weight: 700;
}

/* Cột 1 */
html body.m3-on .m3-mode label {
  font-size: 13px;
}
html body.m3-on .m3-mode .nsel {
  font-size: 13px;
  font-weight: 600;
}
html body.m3-on .m3-rows .row2,
html body.m3-2s .m3-rows .row2 {
  gap: 6px;
  min-height: 49px;
  padding: 0 0 0 2px;
  border-radius: 0;
}
html body.m3-on .m3-rows .row2.m3-act {
  background: none;
}
html body.m3-on .m3-rows .row2.m3-act .rl {
  color: var(--m3-pink);
  font-weight: 700;
}
html body.m3-on .m3-rows .row2 .rl,
html body.m3-2s .m3-rows .row2 .rl {
  gap: 8px;
  min-width: 44px;
  font-size: 15px;
  font-weight: 400;
}
html body.m3-on .m3-rows .row2 .ed svg {
  width: 15px;
  height: 15px;
}
html body.m3-on .m3-rows .row2 .rb,
html body.m3-2s .m3-rows .row2 .rb {
  gap: 9px;
  flex: 0 1 auto;
}
html body.m3-on .m3-rows .dset,
html body.m3-2s .m3-rows .dset {
  margin: 0;
}
html body.m3-on .m3-rows .dset .b2,
html body.m3-2s .m3-rows .dset .b2 {
  width: 36px;
  height: 36px;
  font-size: 17px;
  font-weight: 700;
}
html body.m3-on .m3-rows .dset .b2 + .b2,
html body.m3-2s .m3-rows .dset .b2 + .b2 {
  margin-left: 4px;
}
html body.m3-on .m3-rows .dset .b2 + .b2::after {
  display: none;
}
html body.m3-on .m3-rows .dset + .dset,
html body.m3-2s .m3-rows .dset + .dset {
  padding-left: 11px;
  margin-left: 0;
  border-left: 1px solid #9aa3b5;
}
html body.m3-on .m3-rows .stk-l,
html body.m3-2s .m3-rows .stk-l {
  min-width: 0;
  margin-left: auto;
  font-size: 13px;
  font-weight: 400;
}
html body.m3-on .m3-rows .row2 .hrt,
html body.m3-on .m3-rows .row2 .del,
html body.m3-2s .m3-rows .row2 .hrt,
html body.m3-2s .m3-rows .row2 .del {
  width: 22px;
  height: 26px;
  padding: 0;
}
html body.m3-on .m3-rows .row2 .hrt svg,
html body.m3-on .m3-rows .row2 .del svg {
  width: 20px;
  height: 20px;
}
html body.m3-on .m3-rows .gp2-add {
  gap: 10px;
  height: 32px;
  margin: 6px 0 14px;
  border-radius: 5px;
  border-color: #cfdcf6;
  background: #edf3ff;
  font-size: 15px;
  font-weight: 400;
}
html body.m3-on .m3-rows .gp2-add span::before {
  content: '+';
  margin-right: 12px;
  font-size: 22px;
  font-weight: 300;
  line-height: 0;
  vertical-align: -2px;
}
html body.m3-on .m3-rows .gp2-feat {
  gap: 13px;
}
html body.m3-on .m3-rows .gp2-feat button {
  height: 37px;
  gap: 10px;
  border-radius: 5px;
  background: #f1f3f7;
  font-size: 15px;
  font-weight: 400;
}

/* Cột 2 */
.m3-c2 {
  padding: 6px 10px 8px;
}
.m3-cur {
  font-size: 12px;
  color: var(--md-ink);
  white-space: nowrap;
}
.m3-cur em {
  color: var(--m3-pink);
  font-size: 14px;
  font-weight: 700;
}
.m3-cols {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0;
  border-radius: 0;
  background: none;
}
.m3-set {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 3px 6px 7px;
  border-radius: 8px;
}
.m3-set.on {
  background: #fde8f1;
}
.m3-set + .m3-set {
  position: relative;
  margin-left: 9px;
}
.m3-set + .m3-set::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 30px;
  bottom: 8px;
  width: 1px;
  background: #8d96aa;
}
.m3-set small {
  font-size: 12px;
  color: var(--md-ink);
  white-space: nowrap;
}
.m3-set small b {
  font-size: 14px;
  font-weight: 700;
  color: var(--m3-pink);
}
.m3-set > span {
  display: flex;
  gap: 10px;
}
.m3-big {
  width: 40px;
  height: 40px;
  font-size: 20px;
  font-weight: 700;
}
.m3-big.e {
  color: #8a93a6;
}
.m3-big.on {
  outline: 0;
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 4.5px #2a55d8,
    0 5px 12px rgba(200, 0, 100, 0.35);
}
.m3-tip {
  margin: 6px 0 6px;
  padding: 0;
  background: none;
  font-size: 13px;
}
.m3-keys {
  grid-template-columns: repeat(5, 40px);
  justify-content: center;
  gap: 7px 13px;
  padding: 0;
}
.m3-keys button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  font-size: 18px;
  font-weight: 500;
  color: var(--md-ink);
  background: radial-gradient(circle at 34% 26%, #fff 0, #f1f3f7 40%, #d4d9e3 88%, #bcc3d0 100%);
  box-shadow:
    0 2px 5px rgba(20, 30, 70, 0.18),
    inset 0 -2px 4px rgba(120, 130, 150, 0.2);
}
.m3-keys button:hover {
  box-shadow:
    0 0 0 2px #a9c2ef,
    0 2px 5px rgba(20, 30, 70, 0.18);
}
.m3-keys button.on {
  color: var(--m3-pink);
  font-weight: 700;
  background: radial-gradient(circle at 34% 26%, #fff 0, #fde4ef 45%, #f6b9d6 100%);
  box-shadow:
    0 0 0 1.5px #f3a6cb,
    0 2px 5px rgba(200, 0, 100, 0.2);
}
.m3-quick {
  gap: 8px;
  margin: 9px 0 4px;
}
.m3-quick label {
  flex: none;
  gap: 6px;
}
.m3-qin {
  flex: none;
  width: 120px;
}
.m3-qin input {
  height: 28px;
  padding: 0 26px 0 12px;
  border-color: #c9d0de;
  border-radius: 5px;
  font-size: 14px;
}
.m3-qin button {
  right: 8px;
  top: 6px;
  width: 16px;
  height: 16px;
  font-size: 11px;
  line-height: 16px;
  background: #8a93a6;
}
.m3-sw {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  height: 28px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--md-blue);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.m3-sw i {
  position: relative;
  flex: none;
  width: 34px;
  height: 18px;
  border-radius: 999px;
  background: #b9c1d1;
  transition: background 0.15s;
}
.m3-sw i::after {
  content: '';
  position: absolute;
  left: 2px;
  top: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s;
}
.m3-sw.on i {
  background: var(--md-blue);
}
.m3-sw.on i::after {
  transform: translateX(16px);
}
.m3-sw b {
  font-weight: 700;
}
.m3-ob {
  flex: none;
  width: 24px;
  height: 24px;
  padding: 0;
  margin-left: auto;
  justify-content: center;
  border: 0;
  background: none;
  color: #7b8499;
}
.m3-ob:hover {
  color: var(--md-ink);
}
.m3-note {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--md-ink);
}
.m3-note svg {
  width: 15px;
  height: 15px;
  flex: none;
}
.m3-draws {
  margin-top: 9px;
}
.m3-draws .m3-h {
  margin-bottom: 2px;
}
.m3-dn {
  margin-left: auto;
  font-size: 12px;
  color: var(--md-ink);
  white-space: nowrap;
}
.m3-draws .m3-h .md-link {
  margin-left: 14px;
  font-size: 13px;
  font-weight: 400;
}
.m3-draws .m3-h .md-link svg {
  width: 17px;
  height: 17px;
}
.m3-dlist {
  gap: 1px;
}
.m3-dlist button {
  grid-template-columns: 20px 1.25fr 1fr 0.9fr;
  gap: 16px;
  height: 24px;
  padding: 0 10px 0 9px;
  border: 1px solid transparent;
  border-bottom-color: #e6eaf2;
  border-radius: 3px;
  font-size: 12px;
}
.m3-dlist button i {
  width: 17px;
  height: 17px;
}
.m3-dlist button.on {
  background: #e8f0ff;
  border-color: #c5d5f5;
}
.m3-dlist b {
  font-weight: 600;
}
.m3-draws footer {
  justify-content: flex-end;
  margin-top: 3px;
}
.m3-draws footer .md-link {
  font-size: 11px;
  font-weight: 400;
}

/* Cột 3 — Toàn cảnh */
.m3-c3 {
  gap: 7px;
  padding: 0 3px 3px;
  border-radius: 6px;
  border: 1px solid rgba(130, 165, 255, 0.28);
  background: linear-gradient(160deg, rgba(18, 40, 104, 0.9), rgba(10, 26, 72, 0.9));
}
.m3-c3h {
  min-height: 30px;
  padding: 2px 14px 0 9px;
}
.m3-c3h h2,
.m3-lh h2 {
  line-height: 1.1;
}
.m3-c3h h2,
.m3-lh h2 {
  font-size: 18px;
  letter-spacing: 0.3px;
}
.m3-c3h h2 span,
.m3-lh h2 span {
  font-size: 22px;
}
.m3-c3h h2 small,
.m3-lh h2 small {
  font-size: 0.9em;
  font-weight: 900;
  color: var(--m3-pink-2);
}
.m3-c3h > small {
  font-size: 12px;
}
.m3-res {
  padding: 7px 6px 7px 7px;
  border-radius: 5px;
  background: rgba(40, 72, 150, 0.5);
}
.m3-res header {
  margin-bottom: 5px;
}
.m3-res h3 {
  font-size: 16px;
}
.m3-res header small {
  font-size: 11px;
  color: #b9c6e6;
}
.m3-res header small em {
  color: #7fb3ff;
}
.m3-dv {
  gap: 11px;
  margin-bottom: 9px;
}
.m3-sin {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(150, 180, 255, 0.45);
  border-radius: 5px;
  background: rgba(6, 18, 56, 0.75);
}
.m3-sin b {
  flex: none;
  font-size: 13.5px;
  font-weight: 400;
  color: #fff;
  white-space: nowrap;
}
.m3-sin input {
  flex: 1 1 0;
  min-width: 0;
  width: 0;
  height: 22px;
  padding: 0 6px;
  border: 0;
  border-left: 1px solid rgba(150, 180, 255, 0.3);
  border-radius: 0;
  background: none;
  font-size: 12px;
  text-align: right;
}
.m3-sin input:focus {
  outline: 0;
}
.m3-dv button {
  flex: none;
  height: 30px;
  padding: 0 21px;
  border-radius: 5px;
  font-size: 14px;
}
.m3-prz {
  gap: 6px;
}
.m3-prz > div {
  align-items: center;
  gap: 8px;
}
.m3-prz b {
  width: 72px;
  padding: 0;
  height: 26px;
  line-height: 26px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
}
.m3-prz span {
  gap: 5px;
  flex-wrap: nowrap;
  min-width: 0;
}
.m3-prz i {
  flex: 0 1 43px;
  min-width: 0;
  height: 26px;
  padding: 0 2px;
  font-size: clamp(11px, 1.17vw, 15px);
}
.m3-check {
  margin-top: 0;
  padding: 6px 5px 2px 8px;
  background: none;
}
.m3-check header {
  margin-bottom: 5px;
}
.m3-check h3 {
  font-size: 18px;
}
.m3-check .md-link {
  font-size: 11px;
  font-weight: 400;
}
.m3-cbox {
  display: block;
  padding: 7px 12px 5px;
  border: 0;
  border-radius: 5px;
  background: #fde8f1;
}
.m3-pair {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
}
.m3-pair > span {
  display: flex;
  gap: 12px;
}
.m3-arrow {
  display: grid;
  color: var(--md-ink);
}
.m3-arrow svg {
  width: 30px;
  height: 30px;
}
.m3-cbox .m3-tag {
  flex: none;
  width: max-content;
  min-width: 0;
  max-width: 100%;
  margin: 4px auto 6px !important;
  padding: 2px 14px;
  border-radius: 4px;
  background: #e9ecf3;
  color: var(--md-ink-2);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}
.m3-cbox .m3-tag.y {
  background: #f8c3db;
  color: #c40d6c;
}
.m3-cbox ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.m3-cbox li {
  position: relative;
  padding-left: 20px;
  font-size: 12px;
  line-height: 1.65;
  color: var(--md-ink);
}
.m3-cbox li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--md-ink);
}
.m3-cbox li b {
  font-weight: 700;
}

/* LĂNG KÍNH */
.m3-lens {
  margin-top: 8px;
  padding: 0 2px 3px;
  border-radius: 6px;
  border: 1px solid rgba(130, 165, 255, 0.28);
}
.m3-lh {
  gap: 12px;
  padding: 3px 14px 4px 10px;
  min-height: 32px;
}
.m3-ltabs {
  gap: 10px;
  margin-left: 8px;
}
.m3-ltabs button {
  height: 26px;
  padding: 0 22px;
  border-radius: 5px;
  font-size: 12.5px;
}
.m3-per {
  gap: 9px;
}
.m3-per button {
  height: 24px;
  padding: 0 15px;
  border-radius: 5px;
  border-color: rgba(150, 180, 255, 0.45);
  font-size: 12.5px;
}
.m3-per small {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  margin-left: 22px;
}
.m3-per small svg {
  width: 18px;
  height: 18px;
}
.m3-lbody {
  grid-template-columns: minmax(0, 604fr) minmax(0, 314fr) minmax(0, 305fr);
  gap: 5px;
}
.m3-lp {
  padding: 5px 12px 7px;
  border-radius: 5px;
}
.m3-lmain {
  padding-left: 18px;
}
.m3-lp h3 {
  font-size: 14px;
  margin-bottom: 3px;
  white-space: nowrap;
}
.m3-lmain h3 {
  font-size: 13px;
}
.m3-heatw {
  gap: 18px;
  align-items: stretch;
}
.m3-heat {
  border-spacing: 1px 2px;
  font-size: 11.5px;
}
.m3-heat thead th {
  height: 17px;
  font-weight: 600;
  background: #f6f7fa;
}
.m3-heat thead th:first-child {
  background: none;
}
.m3-heat tbody th {
  width: 52px;
  font-weight: 400;
  white-space: nowrap;
}
.m3-heat td button {
  height: 19px;
}
.m3-legend {
  grid-template-columns: 20px auto;
  column-gap: 9px;
  font-size: 11px;
  color: var(--md-ink);
}
.m3-legend i {
  width: 20px;
  border-radius: 3px;
}
.m3-soic {
  display: block;
}
.m3-soic > .m3-soib {
  flex-direction: row;
  align-items: stretch;
  padding: 0;
  border: 0;
  background: none;
}
.m3-soib {
  display: flex;
  gap: 7px;
}
.m3-soib > div {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 2px 4px 1px;
  border: 1px solid #f3cfe0;
  border-radius: 5px;
  background: #fdf3f8;
}
.m3-soib small {
  font-size: 12px;
  line-height: 1.3;
  color: var(--md-ink);
}
.m3-soib small:first-child {
  font-weight: 700;
}
.m3-soib small em {
  color: var(--m3-pink);
}
.m3-soib > div > span {
  display: flex;
  gap: 6px;
}
.m3-soib .m3-b {
  width: 28px;
  height: 28px;
  font-size: 14px;
  font-weight: 700;
}
.m3-soin {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 4px !important;
  padding: 1px 8px;
  border-radius: 4px;
  background: #e8f0ff;
  font-size: 12px;
  font-weight: 600;
  color: var(--md-ink);
}
.m3-soin svg {
  width: 15px;
  height: 15px;
  flex: none;
  color: #1fa45a;
}
.m3-hb {
  align-items: stretch;
  gap: 9px;
  margin: 0 0 5px;
}
.m3-hb > div {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 2px 4px 5px;
  border-radius: 5px;
  background: #f1f3f7;
}
.m3-hb small {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--md-ink);
  white-space: nowrap;
}
.m3-hb > div > span {
  display: flex;
  gap: 6px;
}
.m3-hb > b {
  align-self: center;
  font-size: 22px;
  font-weight: 400;
  color: var(--md-ink);
}
.m3-hb button,
.m3-hb > div i {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  font-size: 14px;
  font-weight: 700;
  font-style: normal;
}
.m3-hb > div i {
  border-radius: 50%;
  color: #8a93a6;
  background: radial-gradient(circle at 34% 28%, #fff 0, #eceef2 35%, #c3c8d2 80%, #a3a9b5 100%);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12);
}
.m3-hold .md-link {
  width: 100%;
  height: 26px;
  border: 1.5px solid var(--md-blue);
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
}
.m3 .md-foot {
  margin-top: 4px;
  padding: 6px 4px 10px;
}

/* ---------- màn hẹp ---------- */
@media (max-width: 1240px) {
  .m3-hero {
    flex-wrap: wrap;
  }
  .m3-buy {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .m3-buy-top {
    width: auto;
    align-items: center;
  }
  .m3-grid {
    grid-template-columns: 1fr 1fr;
  }
  .m3-lbody {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 760px) {
  .m3 .md-wrap {
    padding: 0 12px;
  }
  .m3-hero {
    padding: 8px 0;
  }
  .m3-var {
    margin-left: 0;
    gap: 10px;
  }
  .m3-tabs {
    max-width: none;
  }
  .m3-buy {
    flex-direction: column;
    align-items: stretch;
  }
  .m3-buy-top {
    width: 100%;
  }
  .m3-paybtn {
    justify-content: center;
  }
  .m3-grid,
  .m3-lbody {
    grid-template-columns: 1fr;
  }
  html body.m3-on .m3-rows .row2 .rb,
  html body.m3-2s .m3-rows .row2 .rb {
    gap: 8px;
  }
  html body.m3-on .m3-rows .dset .b2,
  html body.m3-2s .m3-rows .dset .b2 {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }
  html body.m3-on .m3-rows .dset .b2 + .b2,
  html body.m3-2s .m3-rows .dset .b2 + .b2 {
    margin-left: 3px;
  }
  html body.m3-on .m3-rows .dset + .dset,
  html body.m3-2s .m3-rows .dset + .dset {
    padding-left: 8px;
  }
  html body.m3-on .m3-rows .row2 .rl,
  html body.m3-2s .m3-rows .row2 .rl {
    min-width: 34px;
    gap: 4px;
  }
  html body.m3-on .m3-rows .stk-l,
  html body.m3-2s .m3-rows .stk-l {
    font-size: 12px;
  }
  .m3-h {
    flex-wrap: wrap;
  }
  .m3-set > span {
    gap: 6px;
  }
  .m3-big {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
  .m3-quick {
    flex-wrap: wrap;
  }
  .m3-quick label {
    flex-basis: auto;
  }
  .m3-prz span {
    flex-wrap: wrap;
  }
  .m3-prz i {
    flex: 0 0 40px;
  }
  .m3-prz > div {
    align-items: flex-start;
  }
  .m3-pair {
    gap: 12px;
  }
  .m3-pair > span {
    gap: 6px;
  }
  .m3-B {
    width: 42px;
    height: 42px;
    font-size: 14px;
  }
  .m3-ltabs {
    margin-left: 0;
    gap: 4px;
  }
  .m3-ltabs button {
    padding: 0 12px;
  }
  .m3-per small {
    margin-left: 0;
  }
  .m3-lmain {
    padding-left: 10px;
  }
}
