/* =========================================================
   Mega 6/45 — giao diện theo thiết kế mới (theme xanh đậm)
   Áp dụng khi mega-dash.js gắn .md-on cho <body>.
   Header, footer, select, sheet dùng chung ở dash-theme.css (.dash-on).
   ========================================================= */
.md {
  padding: 12px 0 0;
  font-family: var(--app-font, 'Be Vietnam Pro', system-ui, sans-serif);
}
.md * {
  box-sizing: border-box;
}
.md button,
.md input {
  font-family: inherit;
}
.md h2,
.md h3,
.md h4,
.md p {
  margin: 0;
}
.md em {
  font-style: normal;
}
.md-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}
.md-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--md-blue);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.md-link svg {
  width: 15px;
  height: 15px;
}
.md-demo {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 5px;
  background: #f6e2b8;
  color: #7a4a00;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

/* ---------- HERO ---------- */
.md-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 84px;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid var(--md-line);
  background: linear-gradient(90deg, rgba(14, 32, 84, 0.92), rgba(18, 40, 104, 0.85));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3);
}
.md-logo {
  flex: none;
  display: grid;
  place-items: center;
}
.md-logo img {
  width: 70px;
  height: auto;
}
.md-jp small {
  display: block;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #fff;
}
.md-jp b {
  display: block;
  font-size: clamp(28px, 2.7vw, 36px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.5px;
  background: linear-gradient(180deg, #fff2bf, #ffd25e 45%, #f2a91d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}
.md-today {
  flex: none;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff4a5c, #d80f2a);
  box-shadow:
    0 6px 16px rgba(229, 19, 47, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
}
.md-vr {
  flex: none;
  width: 1px;
  height: 56px;
  background: var(--md-line);
}
.md-clock {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.md-cic svg {
  width: 34px;
  height: 34px;
  color: #fff;
}
.md-clock small {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #cfd9f2;
}
.md-clock b {
  display: block;
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 800;
  letter-spacing: 1px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.md-clock em {
  display: block;
  font-size: 11.5px;
  color: #cfd9f2;
  white-space: nowrap;
}
.md-buy {
  margin-left: auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}
.md-buy-r {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}
.md-paybtn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: linear-gradient(180deg, #ff3c50, #d50f29);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(229, 19, 47, 0.45);
  white-space: nowrap;
}
.md-paybtn i {
  font-style: normal;
  font-size: 18px;
}
.md-tic {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  color: var(--md-red);
}
.md-tic svg {
  width: 15px;
  height: 15px;
}
.md-paybtn:disabled,
.md-cartbtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.md-cartbtn {
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.md-buy p {
  font-size: 10.5px;
  color: #cfd9f2;
  text-align: right;
}
.md-buy .md-demo {
  margin-top: 1px;
}

/* ---------- LƯỚI 3 CỘT ---------- */
.md-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.9fr 1fr;
  gap: 14px;
  margin-top: 14px;
  align-items: stretch;
}
.md-card {
  min-width: 0;
  border-radius: 10px;
  background: var(--md-card);
  color: var(--md-ink);
  padding: 12px 12px 10px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
}
.md-h {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.md-h h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--md-ink);
  white-space: nowrap;
}
.md-h .md-link {
  margin-left: auto;
}
.md-cnt {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--md-ink);
}

/* Cột 1 — các dãy gốc của play.js */
.md-mode {
  margin-left: auto;
}
html body.md-on .md-mode label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  font-size: 12.5px;
  color: var(--md-ink-2);
}
html body.md-on .md-mode label > span {
  color: var(--md-ink-2);
  font-weight: 500;
}
html body.md-on .md-mode .nsel {
  color: var(--md-blue);
  font-weight: 700;
  font-size: 13px;
}
html body.md-on .md-mode .nsel-c {
  opacity: 0.9;
}
.md-mode + .md-link {
  margin-left: 12px;
}
html body.md-on .md-rows #rowsCard {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
html body.md-on .md-rows .row2 {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 3px 6px 3px 10px;
  margin: 0 0 2px;
  border: 0;
  border-radius: 6px;
  background: none;
  position: relative;
}
html body.md-on .md-rows .row2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 3px;
  background: transparent;
}
html body.md-on .md-rows .row2.md-act {
  background: #f2f6ff;
}
html body.md-on .md-rows .row2.md-act::before {
  background: var(--md-blue);
}
html body.md-on .md-rows .row2:has(.b2.crown) {
  background: #fff0f2;
}
html body.md-on .md-rows .row2 .rl {
  display: flex;
  align-items: center;
  gap: 12px;
  width: auto;
  min-width: 46px;
  font-size: 18px;
  font-weight: 700;
  color: var(--md-ink);
}
html body.md-on .md-rows .row2.md-act .rl {
  color: var(--md-blue);
}
html body.md-on .md-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.md-on .md-rows .row2 .ed svg {
  width: 16px;
  height: 16px;
}
html body.md-on .md-rows .row2 .rb {
  display: flex;
  gap: 6px;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
  cursor: pointer;
}
html body.md-on .md-rows .row2 .b2 {
  width: 36px;
  height: 36px;
  font-size: 14px;
  font-weight: 800;
  border: 0;
  color: #fff;
  background: radial-gradient(circle at 34% 28%, #ff9a9a 0, #ff3b3b 25%, #d4141f 65%, #93000f 100%);
  box-shadow:
    0 3px 7px rgba(180, 0, 20, 0.35),
    inset 0 -3px 5px rgba(90, 0, 10, 0.35);
}
html body.md-on .md-rows .row2 .b2.e {
  background: #fff;
  border: 1.5px solid #d3d9e6;
  box-shadow: none;
}
html body.md-on .md-rows .row2 .hrt,
html body.md-on .md-rows .row2 .del {
  width: 28px;
  height: 28px;
  color: var(--md-ink);
  background: none;
  border: 0;
}
html body.md-on .md-rows .row2 .hrt.on {
  color: var(--md-red);
}
html body.md-on .md-rows .gp2-hint {
  display: none;
}
html body.md-on .md-rows .gp2-add {
  display: flex;
  align-items: center;
  margin: 8px 0 6px;
  height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: #eef3fc;
  color: var(--md-blue);
  font-size: 13px;
  font-weight: 600;
}
html body.md-on .md-rows .gp2-add span {
  flex: 1;
  text-align: center;
}
html body.md-on .md-rows .gp2-add small {
  flex: none;
  padding: 5px 12px;
  border-radius: 5px;
  background: #fff;
  border: 1px solid #e3e8f2;
  color: var(--md-ink-2);
}
html body.md-on .md-rows .gp2-feat {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0;
}
html body.md-on .md-rows .gp2-feat button {
  height: 34px;
  min-height: 0;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid #e3e8f2;
  background: #f4f6fa;
  color: var(--md-ink);
  font-size: 13px;
  font-weight: 600;
  flex-direction: row;
  gap: 6px;
}
html body.md-on .md-rows .gp2-feat .fic {
  width: 22px;
  height: 22px;
  transform: none;
}
html body.md-on .md-rows .gp2-feat .fic b {
  font-size: 8px;
}
html body.md-on .md-rows .gp2-feat .mascot {
  width: 22px !important;
  height: 22px !important;
}
html body.md-on .md-rows .warn {
  margin: 0 0 6px !important;
}
.md-rules {
  margin-top: 10px;
}
.md-rules header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.md-rules h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--md-ink);
}
.md-rules header a {
  font-size: 12px;
  color: var(--md-blue);
  text-decoration: none;
}
.md-rules table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.md-rules th {
  padding: 4px 8px;
  text-align: left;
  font-weight: 500;
  color: var(--md-ink-2);
  background: #f2f5fa;
}
.md-rules td {
  padding: 3px 8px;
  border-bottom: 1px solid #eef1f6;
  color: var(--md-ink);
}
.md-rules td:first-child {
  font-weight: 700;
}
.md-rules td:last-child {
  color: var(--md-red);
  font-weight: 600;
}

/* Cột 2 — bảng 45 số + kỳ */
.md-pad {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 7px 5px;
  justify-items: center;
}
.md-pad button {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 34px;
  height: auto;
  aspect-ratio: 1;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid #dfe4ee;
  background: #fff;
  color: var(--md-ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s;
}
.md-pad button:hover {
  border-color: #b9c4da;
  transform: scale(1.06);
}
.md-pad button.on {
  border: 0;
  color: #fff;
  font-weight: 800;
  background: radial-gradient(circle at 34% 28%, #ff9a9a 0, #ff3b3b 25%, #d4141f 65%, #93000f 100%);
  box-shadow: 0 3px 7px rgba(180, 0, 20, 0.35);
}
.md-pad button.dis {
  color: #b4bccd;
}
.md-padf {
  display: flex;
  justify-content: space-between;
  margin: 8px 0 2px;
}
.md-padf button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--md-blue);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.md-padf svg {
  width: 16px;
  height: 16px;
}
.md-quick {
  display: flex;
  gap: 6px;
  margin: 6px 0;
}
.md-quick input {
  flex: 1;
  min-width: 0;
  height: 32px;
  padding: 0 10px;
  border: 1px solid #d3d9e6;
  border-radius: 6px;
  font-size: 13px;
  color: var(--md-ink);
}
.md-quick button {
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: var(--md-blue);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.md-draws {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid #eef1f6;
}
.md-draws .md-h {
  gap: 8px;
}
.md-dsel {
  margin-left: auto;
  font-size: 12px;
  color: var(--md-ink-2);
}
.md-draws .md-h .md-link {
  margin-left: 10px;
}
.md-dlist {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.md-dlist button {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid #e3e8f2;
  border-radius: 6px;
  background: #fff;
  color: var(--md-ink);
  font-size: 12.5px;
  cursor: pointer;
  text-align: left;
}
.md-dlist button i {
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid #c7cfde;
  background: #fff;
}
.md-dlist button.on {
  background: #eaf1ff;
  border-color: #bcd0f7;
}
.md-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;
}
.md-dlist b {
  font-weight: 700;
  min-width: 58px;
}
.md-draws footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  font-size: 11px;
  color: var(--md-ink-2);
}

/* Cột 3 — Toàn cảnh */
.md-c3 {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--md-line);
  background: linear-gradient(160deg, rgba(26, 52, 124, 0.85), rgba(14, 32, 84, 0.85));
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
}
.md-c3t {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.3px;
  padding: 2px 4px 2px;
}
.md-wcard {
  border-radius: 8px;
  background: #fff;
  color: var(--md-ink);
  padding: 9px 12px;
}
.md-wcard header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.md-wcard h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 700;
}
.md-wcard header > span {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--md-ink-2);
}
.md-last header > span {
  margin-left: 12px;
  font-weight: 600;
  color: var(--md-ink);
}
.md-wcard header em {
  color: var(--md-blue);
}
.md-i {
  display: inline-grid;
  color: var(--md-ink-2);
}
.md-i svg {
  width: 14px;
  height: 14px;
}
.md-lastb {
  display: flex;
  align-items: center;
  gap: 10px;
}
.md-balls {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.md-lastb .md-balls {
  flex: 1;
  flex-wrap: nowrap;
  gap: 5px;
}
.md-b {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  background: radial-gradient(circle at 34% 28%, #ff9a9a 0, #ff3b3b 25%, #d4141f 65%, #93000f 100%);
  box-shadow:
    0 3px 7px rgba(180, 0, 20, 0.35),
    inset 0 -3px 5px rgba(90, 0, 10, 0.35);
}
.md-last .md-b {
  width: 38px;
  height: 38px;
  font-size: 15px;
  flex: none;
}
.md-ob {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  border-radius: 6px;
  border: 1.5px solid var(--md-blue);
  color: var(--md-blue);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.md-ob svg {
  width: 15px;
  height: 15px;
}
.md-jbody {
  display: flex;
  align-items: center;
  gap: 10px;
}
.md-jbody svg {
  flex: 1;
  min-width: 0;
  height: 72px;
}
.md-jnow {
  text-align: right;
}
.md-jnow small {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--md-ink);
}
.md-jnow b {
  display: block;
  font-size: 19px;
  font-weight: 900;
  color: var(--md-red);
  white-space: nowrap;
}
.md-jour footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  font-size: 10px;
  color: var(--md-ink-2);
}
.md-jour footer .md-demo {
  margin-left: auto;
}
.md-tgl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.md-tgl label {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  height: 32px;
  padding: 0 5px;
  border: 1px solid #e3e8f2;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--md-ink);
  cursor: pointer;
  white-space: nowrap;
}
.md-tgl input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.md-tgl i {
  margin-left: auto;
  flex: none;
  width: 24px;
  height: 14px;
  border-radius: 999px;
  background: #d7dce6;
  position: relative;
  transition: background 0.2s;
}
.md-tgl i::after {
  content: '';
  position: absolute;
  left: 2px;
  top: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}
.md-tgl input:checked + i {
  background: var(--md-blue);
}
.md-tgl input:checked + i::after {
  transform: translateX(10px);
}
.md-heart {
  color: var(--md-red);
  font-size: 14px;
}
.md-scale {
  color: var(--md-ink);
  font-size: 14px;
}
.md-no {
  color: var(--md-red);
  font-size: 14px;
  font-weight: 800;
}
.md-gen {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 8px auto 4px;
  height: 30px;
  padding: 0 26px;
  border: 1.5px solid var(--md-blue);
  border-radius: 6px;
  background: #eef4ff;
  color: var(--md-blue);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.md-gen svg {
  width: 15px;
  height: 15px;
}
.md-cond p {
  text-align: center;
  font-size: 10.5px;
  color: var(--md-ink-2);
}

/* ---------- LĂNG KÍNH MEGA ---------- */
.md-lens {
  margin-top: 14px;
  padding: 8px 12px 12px;
  border-radius: 10px;
  border: 1px solid var(--md-line);
  background: linear-gradient(180deg, rgba(14, 32, 84, 0.92), rgba(12, 28, 74, 0.92));
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
}
.md-lh {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 2px 2px 8px;
}
.md-lh h2 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.3px;
}
.md-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.md-tabs button {
  height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: #dfe7fb;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.md-tabs button.on {
  background: linear-gradient(180deg, #ff3c50, #d50f29);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(229, 19, 47, 0.35);
}
.md-per {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #dfe7fb;
}
.md-per button {
  height: 28px;
  padding: 0 14px;
  border-radius: 6px;
  border: 1px solid var(--md-line);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 12.5px;
  cursor: pointer;
}
.md-per button.on {
  background: var(--md-blue);
  border-color: var(--md-blue);
  font-weight: 700;
}
.md-per .md-demo {
  margin-left: 6px;
}
.md-lbody {
  display: grid;
  grid-template-columns: 1.6fr 1.2fr 1fr;
  gap: 0;
  border-radius: 8px;
  background: #fff;
  color: var(--md-ink);
  overflow: hidden;
}
.md-lp {
  padding: 10px 14px;
  min-width: 0;
}
.md-lp + .md-lp {
  border-left: 1px solid #e9edf4;
}
.md-lmain {
  display: flex;
  gap: 12px;
}
.md-heat {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 2px;
}
.md-heat button {
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: color-mix(in srgb, #d4142b calc(var(--t) * 100%), #fde9ec);
  color: #4a1822;
}
.md-heat button.md-hi {
  color: #fff;
}
.md-heat button.sel {
  box-shadow: inset 0 0 0 2px #0f1d4a;
}
.md-legend {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--md-red);
  text-align: left;
}
.md-legend span {
  align-self: flex-start;
  line-height: 1.2;
}
.md-legend i {
  width: 14px;
  flex: 1;
  min-height: 60px;
  border-radius: 2px;
  background: linear-gradient(180deg, #d4142b, #fde9ec);
}
.md-fq {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.md-fq h4 {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}
.md-fq button {
  display: grid;
  grid-template-columns: 24px 1fr 52px;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 3px 0;
  border: 0;
  background: none;
  color: var(--md-ink);
  cursor: pointer;
}
.md-fq b {
  font-size: 12.5px;
}
.md-fq span {
  height: 7px;
  border-radius: 7px;
  background: #eef1f6;
  overflow: hidden;
}
.md-fq span i {
  display: block;
  height: 100%;
  border-radius: 7px;
  background: linear-gradient(90deg, #ff7a7a, #d4142b);
}
.md-fq em {
  font-size: 11px;
  color: var(--md-ink-2);
  text-align: right;
}
.md-fq .sel b {
  color: var(--md-red);
}
.md-gaps {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.md-gaps button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 2px;
  border: 1px solid #e3e8f2;
  border-radius: 6px;
  background: #f8fafd;
  color: var(--md-ink);
  cursor: pointer;
}
.md-gaps b {
  font-size: 15px;
}
.md-gaps small {
  font-size: 9.5px;
  color: var(--md-ink-2);
  text-align: center;
}
.md-gaps .sel {
  border-color: var(--md-red);
}
.md-pairs {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.md-pairs div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 2px;
  border: 1px solid #e3e8f2;
  border-radius: 6px;
}
.md-pairs .md-b {
  width: 28px;
  height: 28px;
  font-size: 11.5px;
  background: #eef1f6;
  color: var(--md-ink);
  box-shadow: none;
}
.md-pairs .md-b.r {
  color: #fff;
  background: radial-gradient(circle at 34% 28%, #ff9a9a 0, #ff3b3b 25%, #d4141f 65%, #93000f 100%);
}
.md-pairs small {
  width: 100%;
  text-align: center;
  font-size: 10px;
  color: var(--md-ink-2);
}
.md-mine {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.md-mine > div {
  display: flex;
  align-items: center;
  gap: 10px;
}
.md-mine .md-b {
  width: 28px;
  height: 28px;
  font-size: 11.5px;
}
.md-mine small {
  font-size: 11px;
  color: var(--md-ink-2);
}
.md-mine button {
  margin-left: auto;
  padding: 4px 10px;
  border: 1px solid var(--md-blue);
  border-radius: 6px;
  background: #fff;
  color: var(--md-blue);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}
.md-empty {
  font-size: 13px;
  color: var(--md-ink-2);
  align-self: center;
}
.md-soi h3,
.md-chk h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
}
.md-soi .md-balls {
  gap: 8px;
}
.md-soi .md-b {
  width: 38px;
  height: 38px;
  font-size: 15px;
}
.md-soi .md-balls em {
  font-size: 12px;
  color: var(--md-ink-2);
}
.md-soic {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 8px;
}
.md-soic span {
  padding: 3px 10px;
  border: 1px solid #e3e8f2;
  border-radius: 4px;
  font-size: 12px;
  color: var(--md-ink);
}
.md-chk ul {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.md-chk li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--md-ink);
}
.md-chk li i {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1fa45a;
  color: #fff;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}
.md-chk li.warn i {
  background: #f0a020;
}
.md-chk .md-link {
  margin-left: 28px;
}

/* thanh dưới */
.md-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 10px 4px 14px;
  font-size: 12px;
  color: #cfd9f2;
}
.md-foot a {
  color: #cfd9f2;
  text-decoration: none;
}
.md-foot a:hover {
  color: #fff;
}
.md-foot i {
  font-style: normal;
  opacity: 0.6;
}
.md-18 {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--md-red-2);
  color: var(--md-red-2);
  font-size: 9px;
  font-weight: 800;
}
.md-sp {
  flex: 1;
}

/* ---------- màn hẹp ---------- */
@media (max-width: 1240px) {
  .md-hero {
    flex-wrap: wrap;
  }
  .md-buy {
    margin-left: 0;
    width: 100%;
    align-items: flex-start;
  }
  .md-buy p {
    text-align: left;
  }
  .md-grid {
    grid-template-columns: 1fr 1fr;
  }
  .md-c3 {
    grid-column: 1/-1;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: start;
  }
  .md-c3t {
    grid-column: 1/-1;
  }
}
@media (max-width: 1100px) {
  .md-lbody {
    grid-template-columns: 1fr;
  }
  .md-lp + .md-lp {
    border-left: 0;
    border-top: 1px solid #e9edf4;
  }
}
@media (max-width: 760px) {
  .md-wrap {
    padding: 0 12px;
  }
  .md-hero {
    gap: 12px;
    padding: 12px;
  }
  .md-jp b {
    font-size: 28px;
  }
  .md-vr {
    display: none;
  }
  .md-clock b {
    font-size: 20px;
  }
  .md-grid {
    grid-template-columns: 1fr;
  }
  .md-c3 {
    display: flex;
  }
  .md-c3 > * {
    min-width: 0;
  }
  .md-wcard header {
    flex-wrap: wrap;
  }
  .md-last header > span {
    margin-left: 0;
  }
  .md-lastb {
    flex-wrap: wrap;
  }
  .md-lastb .md-balls {
    flex-wrap: wrap;
  }
  .md-jbody {
    flex-direction: column;
    align-items: stretch;
  }
  .md-jnow {
    text-align: left;
  }
  .md-jour footer {
    flex-wrap: wrap;
  }
  .md-pad button {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }
  html body.md-on .md-rows .row2 {
    gap: 4px;
    padding-left: 8px;
  }
  html body.md-on .md-rows .row2 .rb {
    gap: 4px;
    flex-wrap: nowrap;
  }
  html body.md-on .md-rows .row2 .b2 {
    width: 28px;
    height: 28px;
    font-size: 11.5px;
    flex: none;
  }
  html body.md-on .md-rows .row2 .rl {
    min-width: 30px;
    gap: 4px;
    font-size: 16px;
  }
  html body.md-on .md-rows .row2 .hrt,
  html body.md-on .md-rows .row2 .del {
    width: 24px;
  }
  html body.md-on .md-mode label {
    white-space: nowrap;
  }
  .md-c1 .md-h {
    flex-wrap: wrap;
  }
  .md-tgl {
    grid-template-columns: 1fr;
  }
  .md-lh {
    gap: 10px;
  }
  .md-per {
    margin-left: 0;
    flex-wrap: wrap;
  }
  .md-lmain {
    flex-direction: column;
  }
  .md-heat button {
    height: 28px;
  }
  .md-legend {
    flex-direction: row;
  }
  .md-legend i {
    min-height: 0;
    height: 10px;
    width: auto;
    background: linear-gradient(90deg, #d4142b, #fde9ec);
  }
  .md-gaps {
    grid-template-columns: repeat(4, 1fr);
  }
  .md-pairs {
    grid-template-columns: repeat(2, 1fr);
  }
  .md-fq {
    grid-template-columns: 1fr;
  }
  .md-sp {
    display: none;
  }
}
