/* MU World V2 pages/charmarket — Chợ nhân vật (/mall/shopchar*) và Sàn đổi Ngọc (/mall/stock_market).
   Lớp bổ sung cho character.css và gem.css (không sửa hai file đó): header hai dòng có Back cùng hàng,
   segmented control, danh sách nhân vật nhận ngay trong bước 2, tab sổ lệnh, cột sổ lệnh cuộn trong khung.
   Mọi luật scope body[data-mu-preview][data-mu-page="<slug>"]; slug ^= "mall-shopchar" gom cả 4 màn chợ. */

/* ------------------------------------------------------------------ */
/* Chung cho 4 màn Chợ nhân vật                                        */
/* ------------------------------------------------------------------ */
/* Phải thắng luật nút (1,2,x) của character.css/shared-ui: có #index_content trong selector. */
body[data-mu-preview][data-mu-page^="mall-shopchar"] .mu-cm-hidden,
body[data-mu-preview][data-mu-page^="mall-shopchar"] #index_content .sc-page .mu-cm-hidden:is(a,button,div,span) { display: none !important; }
body[data-mu-preview][data-mu-page^="mall-shopchar"] #index_content .sc-page :is(.mk-neo-hero,.sc-topbar) {
  min-height: 0 !important;
  padding: 9px 12px !important;
}
body[data-mu-preview][data-mu-page^="mall-shopchar"] #index_content .sc-page :is(.mk-neo-title,.sc-title) {
  font: 800 clamp(19px,2.7vw,24px)/1.15 var(--mu-font-head) !important;
  letter-spacing: -.02em !important;
}
/* Dòng mô tả luôn hiện (SKILL: header đúng hai dòng, kể cả điện thoại đứng/ngang). */
body[data-mu-preview][data-mu-page^="mall-shopchar"] #index_content .sc-page :is(.mk-neo-subtitle,.sc-subtitle) {
  display: block !important;
  margin: 2px 0 0 !important;
  color: #b8b8b6 !important;
  font: 500 11px/1.35 var(--mu-font-body) !important;
  text-wrap: pretty;
}
body[data-mu-preview][data-mu-page^="mall-shopchar"] #index_content .sc-page .mu-v2-page-heading-title { min-width: 0; }
body[data-mu-preview][data-mu-page^="mall-shopchar"] #index_content .sc-page .mu-v2-page-heading-actions .mu-v2-btn {
  min-height: 44px;
  padding: 9px 12px !important;
  font-size: 12px !important;
}
/* Segmented control Tất cả / Của tôi thay cho nút toggle đổi nhãn. */
body[data-mu-preview][data-mu-page^="mall-shopchar"] #index_content .sc-page .mu-cm-seg {
  margin: 0 !important;
  min-height: 44px;
  box-sizing: border-box;
}
body[data-mu-preview][data-mu-page^="mall-shopchar"] #index_content .sc-page .mu-cm-seg > button {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  min-height: 38px;
  padding: 7px 12px !important;
  font-size: 12px !important;
}
/* Gợi ý ngắn cạnh nút chính (phí đăng / phí sửa). */
body[data-mu-preview][data-mu-page^="mall-shopchar"] #index_content .sc-page .mu-cm-hint {
  margin: 0 0 10px;
  color: #c9c4ba;
  font: 400 12px/1.5 var(--mu-font-body);
  text-wrap: pretty;
}
body[data-mu-preview][data-mu-page^="mall-shopchar"] #index_content .sc-page .mu-cm-notice { margin: 0 0 10px; }
body[data-mu-preview][data-mu-page^="mall-shopchar"] #index_content .sc-page :is(.sc-input,.sc-select,.sc-picker,.scbp-input) {
  font-family: var(--mu-font-body) !important;
  font-size: 16px !important;
}
body[data-mu-preview][data-mu-page^="mall-shopchar"] #index_content .sc-page .sc-submit {
  font: 700 13px/1.25 var(--mu-font-body) !important;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
body[data-mu-preview][data-mu-page^="mall-shopchar"] #index_content .sc-page .sc-char-card:focus-visible {
  outline: 2px solid var(--mu-popup-gold) !important;
  outline-offset: 2px;
}
body[data-mu-preview][data-mu-page^="mall-shopchar"] #index_content .sc-page .sc-pager[hidden] { display: none !important; }
/* Dialog cũ (Chọn phái / Luật / Chọn nhân vật bán) dùng chiều cao thật của viewport iOS. */
body[data-mu-preview][data-mu-page^="mall-shopchar"] :is(.sc-class-dialog,.sc-rules-dialog,.sc-picker-dialog,.scbp-charpicker-dialog) {
  max-height: calc(var(--mu-h,100dvh) - 20px) !important;
}
body[data-mu-preview][data-mu-page^="mall-shopchar"] :is(.sc-class-dialog,.sc-rules-dialog,.sc-picker-dialog):focus-visible { outline: 0; }
body[data-mu-preview][data-mu-page^="mall-shopchar"] :is(.sc-class-option,.sc-picker-option):focus-visible,
body[data-mu-preview][data-mu-page^="mall-shopchar"] :is(.sc-class-close,.sc-rules-close,.sc-picker-close):focus-visible {
  outline: 2px solid var(--mu-popup-gold) !important;
  outline-offset: 2px;
}

/* Điện thoại đứng: icon tiêu đề nhường chỗ cho Back + tên trang; card nằm ngang (character.css). */
@media (max-width: 700px) and (orientation: portrait) {
  body[data-mu-preview][data-mu-page^="mall-shopchar"] #index_content .sc-page :is(.mk-neo-title-icon,.sc-icon) { display: none !important; }
  body[data-mu-preview][data-mu-page^="mall-shopchar"] #index_content .sc-page :is(.mk-neo-hero,.sc-topbar) { padding: 8px 10px !important; margin-bottom: 8px !important; }
  body[data-mu-preview][data-mu-page^="mall-shopchar"] #index_content .sc-page .mu-v2-page-heading-actions .mk-neo-rule-btn {
    min-width: 0 !important; padding: 8px 6px !important; font-size: 11px !important;
  }
  body[data-mu-preview][data-mu-page^="mall-shopchar"] #index_content .sc-page .mu-v2-page-heading-actions .mk-neo-rule-btn i { display: none !important; }
  body[data-mu-preview][data-mu-page^="mall-shopchar"] #index_content .sc-page .mu-v2-page-heading-actions #sc-toggle-rules { font-size: 11px !important; }
  body[data-mu-preview][data-mu-page^="mall-shopchar"] #index_content .sc-page .mu-v2-page-heading-actions #sc-toggle-rules i { display: inline-block !important; font-size: 14px !important; }
  body[data-mu-preview][data-mu-page^="mall-shopchar"] #index_content .sc-list-wrap .sc-stat-lbl { font-size: 10px !important; }
  body[data-mu-preview][data-mu-page^="mall-shopchar"] #index_content .sc-list-wrap .sc-stat-val { font-size: 13px !important; }
}
/* 621–700px đứng (điện thoại gập mở): dialog cũ cũng là bottom sheet như shared-ui, không lệch mốc. */
@media (min-width: 621px) and (max-width: 700px) and (orientation: portrait) {
  body[data-mu-preview][data-mu-page^="mall-shopchar"] :is(.sc-class-modal,.sc-rules-modal,.sc-picker-modal,.scbp-charpicker) {
    align-items: flex-end !important;
    padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left) !important;
  }
  body[data-mu-preview][data-mu-page^="mall-shopchar"] :is(.sc-class-dialog,.sc-rules-dialog,.sc-picker-dialog,.scbp-charpicker-dialog) {
    width: 100% !important;
    max-height: 80dvh !important;
    border-radius: 13px 13px 0 0 !important;
  }
}
/* Điện thoại ngang thấp (iPhone 12 Pro ngang ~844×300): header một hàng, chữ gọn. */
@media (max-height: 520px) and (orientation: landscape) {
  body[data-mu-preview][data-mu-page^="mall-shopchar"] #index_content .sc-page :is(.mk-neo-hero,.sc-topbar) { padding: 5px 9px !important; margin-bottom: 6px !important; }
  body[data-mu-preview][data-mu-page^="mall-shopchar"] #index_content .sc-page :is(.mk-neo-title-icon,.sc-icon) { display: none !important; }
  body[data-mu-preview][data-mu-page^="mall-shopchar"] #index_content .sc-page :is(.mk-neo-title,.sc-title) { font-size: 17px !important; }
  body[data-mu-preview][data-mu-page^="mall-shopchar"] #index_content .sc-page :is(.mk-neo-subtitle,.sc-subtitle) { display: block !important; font-size: 10px !important; }
  body[data-mu-preview][data-mu-page^="mall-shopchar"] #index_content .sc-page .mu-v2-page-heading-actions .mk-neo-rule-btn,
  body[data-mu-preview][data-mu-page^="mall-shopchar"] #index_content .sc-page .mu-v2-page-heading-actions .mu-v2-btn { min-height: 38px !important; padding: 6px 9px !important; font-size: 11px !important; }
  body[data-mu-preview][data-mu-page^="mall-shopchar"] #index_content .sc-page .mu-cm-seg { min-height: 44px; }
  body[data-mu-preview][data-mu-page^="mall-shopchar"] #index_content .sc-page .mu-cm-seg > button { min-height: 38px; padding: 5px 10px !important; font-size: 11px !important; }
  body[data-mu-preview][data-mu-page^="mall-shopchar"] #index_content .sc-page .mu-cm-hint { margin-bottom: 6px; font-size: 11px; }
}

/* ------------------------------------------------------------------ */
/* /mall/shopchar_sell.shtml — form đăng bán: một khung, hai cột ở ngang */
/* ------------------------------------------------------------------ */
@media (max-height: 520px) and (orientation: landscape) {
  body[data-mu-preview][data-mu-page="mall-shopchar_sell"] #index_content .sc-page .sc-card { padding: 8px 10px !important; margin-bottom: 0 !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar_sell"] #index_content .sc-page .sc-row { margin-bottom: 6px !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar_sell"] #index_content .sc-page :is(.sc-input,.sc-select,.sc-picker) { min-height: 40px !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar_sell"] #index_content .sc-page .sc-help { display: none !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar_sell"] #index_content .sc-page .sc-check-row { min-height: 38px !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar_sell"] #index_content .sc-page .sc-submit { min-height: 40px !important; }
}

/* ------------------------------------------------------------------ */
/* /mall/shopchar_sell.select.shtml & .edit.shtml — form Bootstrap cũ    */
/* render trùng phía dưới chỉ bị ẩn ở V2 (không sửa tpl).               */
/* ------------------------------------------------------------------ */
body[data-mu-preview][data-mu-page="mall-shopchar_sell-select"] #index_content > form,
body[data-mu-preview][data-mu-page="mall-shopchar_sell-select"] #index_content > nav,
body[data-mu-preview][data-mu-page="mall-shopchar_sell-select"] #index_content > .shop-rules-inline,
body[data-mu-preview][data-mu-page="mall-shopchar_sell-edit"] #index_content > form,
body[data-mu-preview][data-mu-page="mall-shopchar_sell-edit"] #index_content > nav { display: none !important; }
/* Hàng "Quay lại chợ" + Luật inline nhường chỗ cho Back và nút Luật ở header (mở sheet). */
body[data-mu-preview][data-mu-page="mall-shopchar_sell-select"] #index_content .sc-page :is(.sc-nav-row,.sc-rules-box),
body[data-mu-preview][data-mu-page="mall-shopchar_sell-edit"] #index_content .sc-page .sc-nav-row { display: none !important; }
body[data-mu-preview][data-mu-page^="mall-shopchar_sell-"] #index_content .sc-page .sc-topbar-inner.mu-v2-page-heading { gap: 10px !important; }
/* .sc-icon là con trực tiếp của hàng tiêu đề; trong lưới back|title|actions nó sẽ rơi xuống hàng 2 → ẩn (Back đã đứng ở vị trí đó). */
body[data-mu-preview][data-mu-page^="mall-shopchar_sell-"] #index_content .sc-page .sc-topbar-inner.mu-v2-page-heading > .sc-icon { display: none !important; }
body[data-mu-preview][data-mu-page^="mall-shopchar_sell-"] #index_content .sc-page :is(.sc-two-col,.sc-edit-cols) {
  display: grid !important;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 10px !important;
  align-items: start;
}
body[data-mu-preview][data-mu-page^="mall-shopchar_sell-"] #index_content .sc-page :is(.sc-two-col,.sc-edit-cols) > .sc-card { margin-bottom: 0 !important; }
body[data-mu-preview][data-mu-page^="mall-shopchar_sell-"] #index_content .sc-page .sc-info-table { width: 100%; }
body[data-mu-preview][data-mu-page^="mall-shopchar_sell-"] #index_content .sc-page .sc-info-table td { font: 400 13px/1.4 var(--mu-font-body); }
body[data-mu-preview][data-mu-page^="mall-shopchar_sell-"] #index_content .sc-page .sc-info-table td span { color: #b9b8b5 !important; font-size: 11px !important; }
body[data-mu-preview][data-mu-page^="mall-shopchar_sell-"] #index_content .sc-page .sc-info-table .sc-info-val { font-weight: 600; }
body[data-mu-preview][data-mu-page^="mall-shopchar_sell-"] #index_content .sc-page .sc-fee-box { font: 400 12px/1.55 var(--mu-font-body) !important; }
body[data-mu-preview][data-mu-page^="mall-shopchar_sell-"] #index_content .sc-page .sc-fee-total { margin-top: 6px; padding-top: 6px; border-top: 1px solid #74603d66; }
body[data-mu-preview][data-mu-page^="mall-shopchar_sell-"] #index_content .sc-page .mu-cm-scroll { min-width: 0; }
@media (max-width: 700px) and (orientation: portrait) {
  body[data-mu-preview][data-mu-page^="mall-shopchar_sell-"] #index_content .sc-page :is(.sc-two-col,.sc-edit-cols) { grid-template-columns: minmax(0,1fr); gap: 8px !important; }
  body[data-mu-preview][data-mu-page^="mall-shopchar_sell-"] #index_content .sc-page .sc-card { padding: 9px 10px !important; }
  body[data-mu-preview][data-mu-page^="mall-shopchar_sell-"] #index_content .sc-page .sc-info-table td { padding: 3px 0 !important; font-size: 12px; }
  /* Bảng thông tin cuộn trong vùng cố định để form + nút chính luôn nằm trong khung. */
  body[data-mu-preview][data-mu-page^="mall-shopchar_sell-"] #index_content .sc-page .mu-cm-scroll {
    max-height: clamp(120px, calc(var(--mu-h,100dvh) - 430px), 260px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #776342 #11151b;
  }
}
@media (max-height: 520px) and (orientation: landscape) {
  body[data-mu-preview][data-mu-page^="mall-shopchar_sell-"] #index_content .sc-page .sc-card { padding: 8px 10px !important; }
  body[data-mu-preview][data-mu-page^="mall-shopchar_sell-"] #index_content .sc-page .sc-sec-title { margin-bottom: 4px !important; }
  body[data-mu-preview][data-mu-page^="mall-shopchar_sell-"] #index_content .sc-page .sc-info-table td { padding: 2px 0 !important; font-size: 12px; }
  body[data-mu-preview][data-mu-page^="mall-shopchar_sell-"] #index_content .sc-page .mu-cm-scroll {
    max-height: calc(var(--mu-h,100dvh) - 118px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #776342 #11151b;
  }
  body[data-mu-preview][data-mu-page^="mall-shopchar_sell-"] #index_content .sc-page .sc-check-row { min-height: 38px !important; margin-bottom: 6px !important; }
  body[data-mu-preview][data-mu-page^="mall-shopchar_sell-"] #index_content .sc-page .sc-captcha-wrap { margin-bottom: 6px !important; }
  body[data-mu-preview][data-mu-page^="mall-shopchar_sell-"] #index_content .sc-page .sc-submit { min-height: 40px !important; }
}

/* ------------------------------------------------------------------ */
/* Popup Mua nhân vật (#modal-popup, mở từ /mall/shopchar.shtml)        */
/* ------------------------------------------------------------------ */
/* Một nút X duy nhất, cùng hàng tiêu đề: X của nội dung (.scbp-top-close, data-bs-dismiss) mang lớp .mu-v2-x
   do charmarket.js gắn; X chung của SPAY (ngoài dòng tiêu đề) ẩn trong popup này. */
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .modal-content.mu-cm-buy-content > .spay-neo-close { display: none !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .modal-content.mu-cm-buy-content > .mu-v2-popup-close { display: none !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .scbp-top {
  display: grid !important;
  grid-template-columns: minmax(0,1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 0 0 10px !important;
  border: 0 !important;
  background: transparent !important;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .scbp-top-main { min-width: 0; align-items: center !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .scbp-top-close.mu-v2-x { display: grid !important; position: relative !important; margin: 0 !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .scbp-top-title {
  font: 700 18px/1.3 var(--mu-font-head) !important;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .scbp-top-sub {
  display: block !important;
  font: 500 11px/1.4 var(--mu-font-body) !important;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .scbp-step-title {
  font: 700 15px/1.3 var(--mu-font-head) !important;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .scbp-step-title span {
  color: var(--mu-popup-gold) !important;
  font: 700 13px/1.3 var(--mu-font-head) !important;
  text-transform: none !important;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .scbp-step-title i { color: var(--mu-popup-gold) !important; }
/* Khung ngoài phẳng (không lồng hai viền) để hàng nút dính đáy liền với nền panel. */
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .scbp-shell { padding: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; }
/* Lưới chỉ số: mọi ô một hàng (5 ô, 6 khi có cánh) → không còn vạch dọc thừa và ô trống ở hàng 2. */
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .scbp-stats {
  grid-template-columns: none !important;
  grid-auto-flow: column !important;
  grid-auto-columns: minmax(0,1fr) !important;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .scbp-stat { min-width: 0; border-bottom: 0 !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .scbp-stat:last-child { border-right: 0 !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap :is(.scbp-stat-cell,.scbp-stat-btn) { min-width: 0; padding: 8px 2px !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .scbp-stat-val { font-size: 15px !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .scbp-stat-lbl { font-size: 11px !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Chủ tin: giá không còn ý nghĩa, chỉ giữ nhãn miễn phí. */
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-owner .scbp-price { font-size: 0 !important; line-height: 0 !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-owner .scbp-price small { display: none !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-owner .scbp-price .scbp-free {
  display: inline-block;
  font: 700 13px/1.2 var(--mu-font-head) !important;
}

/* Hàng nút của mọi màn dính đáy vùng cuộn duy nhất (.modal-body): nút chính luôn thấy, kể cả ngang 844×300. */
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap :is(#t-buy-step1 > .scbp-actions,.scbp-form-shell > .scbp-actions,.mu-cm-pick-actions) {
  position: -webkit-sticky;
  position: sticky;
  bottom: 0;
  z-index: 3;
  margin: 0 !important;
  padding: 10px 0 max(2px,env(safe-area-inset-bottom)) !important;
  background: #1a2026;
  box-shadow: 0 -10px 12px -8px #1a2026;
}

/* Bước 2 chia hai màn (lớp/thuộc tính do charmarket.js gắn; JS lỗi → bước 2 gốc giữ nguyên). */
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-has-charlist .scbp-select-wrap,
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-has-charlist .scbp-step-title { display: none !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-has-charlist:not([data-mu-cm-step="pick"]) .mu-cm-field { display: none !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-has-charlist[data-mu-cm-step="pick"] .scbp-form-shell > :not(.mu-cm-field):not(.mu-cm-notice) { display: none !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .scbp-form-shell {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .scbp-form-main-row {
  display: grid !important;
  grid-template-columns: minmax(0,1fr) !important;
  gap: 8px !important;
  margin: 0 0 8px !important;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .scbp-form-main-row .scbp-captcha-wrap { margin: 0 !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .scbp-form-row { margin: 0 0 8px !important; }
/* Màn chọn nhân vật nhận: danh sách là nội dung chính của panel (cuộn chung với panel, không cuộn lồng). */
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .mu-cm-field { display: grid; gap: 8px; margin: 0; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .mu-cm-field-label {
  color: var(--mu-popup-text);
  font: 700 15px/1.3 var(--mu-font-head);
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .mu-cm-charlist {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 7px;
  padding: 2px;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .mu-cm-charlist > button {
  min-width: 0;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #66583e;
  border-radius: 5px;
  background: #252b2e;
  color: var(--mu-popup-text);
  font: 600 13px/1.3 var(--mu-font-body);
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .mu-cm-charlist > button:is(:hover,:focus-visible) { border-color: var(--mu-popup-border); background: #2c302d; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .mu-cm-charlist > button:focus-visible { outline: 2px solid var(--mu-popup-gold); outline-offset: 2px; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .mu-cm-charlist > button[aria-checked="true"] {
  border-color: var(--mu-popup-gold);
  background: #352f25;
  color: #f2d49b;
  box-shadow: inset 3px 0 var(--mu-popup-gold);
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .mu-cm-pick-actions { display: flex !important; justify-content: flex-start !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .mu-cm-pick-actions .mu-v2-btn { min-width: 132px; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .scbp-btn svg { width: 16px; height: 16px; flex: none; fill: currentColor; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .mu-v2-empty { min-height: 96px; padding: 14px; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .mu-cm-notice { margin: 0 0 8px; }
/* Màn form: tóm tắt 2 cột (Mua | Giá / Nhận + Đổi | Số dư). */
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .mu-cm-buy-sum {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 1px;
  margin: 0 0 10px;
  border: 1px solid #66583e;
  border-radius: 6px;
  overflow: hidden;
  background: #66583e;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .mu-cm-sum-item { min-width: 0; margin: 0; padding: 7px 10px; background: #20262b; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .mu-cm-sum-item dt { margin: 0 0 1px; color: #b5b3ae; font: 500 11px/1.3 var(--mu-font-body); }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .mu-cm-sum-item dd {
  margin: 0;
  color: var(--mu-popup-text);
  font: 700 14px/1.3 var(--mu-font-body);
  overflow-wrap: anywhere;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .mu-cm-sum-item.is-price dd { color: #f2d49b; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .mu-cm-sum-receiver-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .mu-cm-sum-receiver { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .mu-cm-sum-change {
  flex: none;
  min-height: 28px;
  padding: 2px 9px;
  border: 1px solid #786443;
  border-radius: 5px;
  background: #302b23;
  color: #efd09a;
  font: 600 12px/1.2 var(--mu-font-body);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
/* Vùng chạm của nút Đổi ≥44px mà không làm hàng tóm tắt cao thêm. */
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .mu-cm-sum-change { position: relative; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .mu-cm-sum-change::after { content: ''; position: absolute; inset: -8px -4px; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .mu-cm-sum-change:focus-visible { outline: 2px solid var(--mu-popup-gold); outline-offset: 2px; }
/* Ô đồng ý: vùng chạm cả dòng, ô tích than viền vàng (cùng kiểu Bán Ruud/Bán cánh). */
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .scbp-check-row {
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
  min-height: 44px;
  margin: 0 0 6px !important;
  padding: 8px 10px !important;
  border: 1px solid #4b4332;
  border-radius: 6px;
  background: #20262b;
  box-sizing: border-box;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .scbp-check-row input[type=checkbox],
body[data-mu-preview][data-mu-page="mall-stock_market"] .mu-v2-confirm-check input[type=checkbox] {
  -webkit-appearance: none !important;
  appearance: none !important;
  flex: none;
  width: 22px !important;
  height: 22px !important;
  margin: 0 !important;
  border: 1.5px solid #9b7e50 !important;
  border-radius: 5px !important;
  background: #141b20 no-repeat center / 15px 15px !important;
  box-shadow: none !important;
  cursor: pointer;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .scbp-check-row input[type=checkbox]:checked,
body[data-mu-preview][data-mu-page="mall-stock_market"] .mu-v2-confirm-check input[type=checkbox]:checked {
  border-color: #e7c78d !important;
  background-color: #e7c78d !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='%23241c12' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .scbp-check-row input[type=checkbox]:focus-visible,
body[data-mu-preview][data-mu-page="mall-stock_market"] .mu-v2-confirm-check input[type=checkbox]:focus-visible { outline: 2px solid var(--mu-popup-gold) !important; outline-offset: 2px; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .scbp-check-label { font: 400 12px/1.5 var(--mu-font-body) !important; cursor: pointer; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .scbp-btn.mu-v2-btn { font-size: 13px !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap #t-submit:disabled { opacity: .5 !important; cursor: not-allowed; }

/* Panel: giữa màn ≤560px ở PC/tablet; một vùng cuộn (.modal-body). */
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup.mu-cm-buy .modal-dialog { width: min(560px,calc(100% - 20px)) !important; max-width: 560px !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup.mu-cm-buy :is(.modal-dialog,.modal-content) { max-height: calc(var(--mu-h,100dvh) - 20px) !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup.mu-cm-buy .modal-body {
  max-height: calc(var(--mu-h,100dvh) - 22px) !important;
  padding: 14px 14px 0 !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
@media (max-width: 700px) and (orientation: portrait) {
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup.mu-cm-buy.show { display: flex !important; align-items: flex-end !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup.mu-cm-buy .modal-dialog {
    width: 100% !important; max-width: none !important; margin: auto 0 0 !important; min-height: 0 !important;
    max-height: 80dvh !important;
  }
  /* Tay kéo cách mép trên như sheet chuẩn (panel không có đệm trên). */
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup.mu-cm-buy .modal-content { max-height: 80dvh !important; padding-top: 8px !important; border-radius: 13px 13px 0 0 !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup.mu-cm-buy .modal-body { max-height: calc(80dvh - 12px) !important; padding: 6px 12px 0 !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .mu-cm-charlist { grid-template-columns: minmax(0,1fr); }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap :is(#t-buy-step1 > .scbp-actions,.scbp-form-shell > .scbp-actions,.mu-cm-pick-actions) { padding-bottom: max(12px,env(safe-area-inset-bottom)) !important; }
}
@media (max-height: 520px) and (orientation: landscape) {
  /* Panel phải cao trọn khung (luật max-height chung ở trên có độ ưu tiên cao hơn character.css nên phải đặt lại ở đây;
     lớp mu-cm-buy do JS gắn thay cho :has() của character.css). */
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup.mu-cm-buy.show { display: flex !important; align-items: stretch !important; justify-content: flex-end !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup.mu-cm-buy :is(.modal-dialog,.modal-content) {
    width: min(480px,60vw) !important; max-width: none !important;
    height: var(--mu-h,100dvh) !important; max-height: var(--mu-h,100dvh) !important;
    margin: 0 !important;
  }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup.mu-cm-buy .modal-content { border-radius: 0 !important; border-width: 0 0 0 1px !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup.mu-cm-buy .modal-body {
    max-height: none !important; flex: 1 1 auto; min-height: 0;
    padding: max(8px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) 0 10px !important;
  }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .scbp-top { padding-bottom: 6px !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .scbp-top-icon { display: none !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .scbp-top-title { font-size: 16px !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .scbp-top-sub { font-size: 10px !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .scbp-head { padding: 6px 10px !important; gap: 10px !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .scbp-avatar { width: 40px !important; height: 40px !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .scbp-name { font-size: 15px !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .scbp-class { font-size: 11px !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap :is(.scbp-stat-cell,.scbp-stat-btn) { padding: 5px 2px !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap :is(#t-buy-step1 > .scbp-actions,.scbp-form-shell > .scbp-actions,.mu-cm-pick-actions) { padding: 6px 0 max(6px,env(safe-area-inset-bottom)) !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .scbp-inline-balance { padding: 3px 8px !important; min-height: 44px; box-sizing: border-box; }
  /* Màn form: captcha | mật khẩu cạnh nhau, hai ô đồng ý cạnh nhau. */
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-has-charlist[data-mu-cm-step="form"] .scbp-form-shell {
    display: grid !important;
    grid-template-columns: repeat(2,minmax(0,1fr));
    column-gap: 8px;
    align-items: start;
  }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap[data-mu-cm-step="form"] .scbp-form-shell > :is(.mu-cm-buy-sum,.scbp-actions,.mu-cm-notice) { grid-column: 1 / -1; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap:not(.mu-cm-has-pass)[data-mu-cm-step="form"] .scbp-form-shell > .scbp-form-main-row { grid-column: 1 / -1; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap[data-mu-cm-step="form"] .scbp-form-shell > .mu-cm-buy-sum { grid-template-columns: auto auto minmax(0,1fr) auto; margin-bottom: 8px; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap[data-mu-cm-step="form"] .mu-cm-sum-item { padding: 4px 8px; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap[data-mu-cm-step="form"] .mu-cm-sum-item dd { font-size: 13px; white-space: nowrap; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap[data-mu-cm-step="form"] .mu-cm-sum-change { min-height: 24px; padding: 1px 7px; font-size: 11px; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap[data-mu-cm-step="form"] .scbp-form-shell > :is(.scbp-form-main-row,.scbp-form-row) { margin: 0 0 6px !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap[data-mu-cm-step="form"] .scbp-check-row { margin: 0 0 4px !important; padding: 6px 8px !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap[data-mu-cm-step="form"] .scbp-check-label { font-size: 11px !important; line-height: 1.4 !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .scbp-input { min-height: 44px !important; }
}

/* ------------------------------------------------------------------ */
/* /mall/stock_market.shtml — Sàn đổi Ngọc                             */
/* ------------------------------------------------------------------ */
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .mk-neo-hero { padding: 9px 12px !important; }
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .mk-neo-title {
  font: 800 clamp(19px,2.7vw,24px)/1.15 var(--mu-font-head) !important;
}
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .mk-neo-subtitle {
  display: block !important;
  margin-top: 2px !important;
  font: 500 11px/1.35 var(--mu-font-body) !important;
  color: #b8b8b6 !important;
}
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .mu-v2-page-heading-actions {
  display: flex !important;
  align-items: center;
  gap: 8px !important;
  min-width: 0;
}
/* Tab Sổ lệnh / Số dư / Lệnh của tôi: cùng một nhóm, trạng thái do controller trong tpl giữ (.t-tb-active). */
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .mu-cm-tabs {
  margin: 0 !important;
  min-height: 44px;
  box-sizing: border-box;
  flex: 0 1 auto;
}
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .mu-cm-tabs > button,
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .mu-cm-tabs > button:hover {
  flex: 1 0 auto !important;
  width: auto !important;
  min-width: max-content !important;
  min-height: 38px !important;
  height: auto !important;
  padding: 7px 12px !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 5px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #c9c4ba !important;
  font: 600 12px/1.2 var(--mu-font-body) !important;
  transform: none !important;
}
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .mu-cm-tabs > button:is(:hover,:focus-visible) { background: #232a30 !important; color: var(--mu-popup-text) !important; }
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .mu-cm-tabs > button[aria-selected="true"],
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .mu-cm-tabs > button[aria-selected="true"]:is(:hover,:focus-visible) {
  background: linear-gradient(110deg,#f2d7a2,#c9a468) !important;
  color: #251d12 !important;
}
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .mu-cm-tabs > button i { display: none !important; }
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page #mu-cm-create {
  flex: none;
  min-height: 44px;
  padding: 9px 13px !important;
  font-size: 12px !important;
  white-space: nowrap;
}
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page #mu-cm-create svg { width: 15px; height: 15px; }
/* Nhãn hai cột sổ lệnh lấy từ từ điển (gem.css ghi cứng tiếng Việt). */
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page #t-stock-shop_buy[data-mu-label]::before { content: attr(data-mu-label); font-family: var(--mu-font-head); }
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page #t-stock-shop_sell[data-mu-label]::before { content: attr(data-mu-label); font-family: var(--mu-font-head); }
/* Soát đồng bộ 26/09: tiêu đề khối trắng ngà 14px như mọi nhóm (gem.css tô vàng). */
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page :is(#t-stock-shop_buy,#t-stock-shop_sell)::before { color: var(--mu-popup-text, #f6f1e8); }
/* Sổ lệnh / số dư / lệnh của tôi / màn inline cuộn trong .smk-shell (max-height do charmarket.js đo). */
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .smk-shell {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #776342 #11151b;
}
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .t-ob-mini:focus-visible,
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .t-mo-row:focus-visible,
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .t-bl-card:focus-visible { outline: 2px solid var(--mu-popup-gold) !important; outline-offset: 2px; }
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .t-bl-card { cursor: pointer; }
/* Màn inline: toggle "đồng ý" thay bằng popup xác nhận có ô tích (charmarket.js đặt agree=on rồi gửi form cũ).
   Chỉ ẩn khi JS đã gắn lớp mu-cm-agree-replaced cho form — JS không chạy thì toggle gốc vẫn dùng được. */
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page form.mu-cm-agree-replaced .smt-check.is-agree { display: none !important; }
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .smt-checks { flex-direction: row !important; }
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .smt-input-wrap input[type=text] { font-family: var(--mu-font-body) !important; }
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .smt-input-wrap span { font: 600 16px/1.3 var(--mu-font-body) !important; color: var(--gem-ink,#f5f0e6) !important; }
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page #t-jewel_trade_max {
  min-width: 44px;
  color: var(--mu-popup-gold) !important;
  border-left-color: #584a36 !important;
  font: 700 13px/1 var(--mu-font-body) !important;
}
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .smt-calc-result .alert { font: 400 12px/1.6 var(--mu-font-body) !important; }
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .smt-calc-result :is(.text-danger,.text-success) { color: var(--mu-popup-gold) !important; }
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .smt-calc-result .text-muted { color: #b9b8b5 !important; }
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .smt-reward-text :is(.text-danger,.text-success) { color: var(--mu-popup-gold) !important; }
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .smt-reward-text span[style*="d9a520"] { color: var(--mu-popup-gold) !important; }
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .mu-cm-notice { margin: 0 0 8px; }
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .smt-btn,
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .smt-rules-btn { font-family: var(--mu-font-body) !important; }
/* Đóng lệnh: biến thể danger theo bảng Hắc kim (gem.css dùng nâu đỏ riêng). */
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .smt-btn-close,
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .smt-btn-close:hover {
  border-color: #8a4a4a !important;
  background: #2b2424 !important;
  color: #f3d9d9 !important;
}
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .smt-btn-close:is(:hover,:focus-visible) { border-color: var(--mu-danger) !important; background: #342828 !important; }
/* HTML kết quả tính phí (server trả .alert Bootstrap) khi đưa vào popup xác nhận. */
body[data-mu-preview][data-mu-page="mall-stock_market"] .mu-v2-confirm-html .alert {
  margin: 0 !important; padding: 0 !important; border: 0 !important; background: transparent !important;
  color: inherit !important; font-size: inherit !important; line-height: 1.6 !important;
}
body[data-mu-preview][data-mu-page="mall-stock_market"] .mu-v2-confirm-html :is(.text-danger,.text-success) { color: #f2d49b !important; }
body[data-mu-preview][data-mu-page="mall-stock_market"] .mu-v2-confirm-html .text-muted { color: #b9b8b5 !important; }
body[data-mu-preview][data-mu-page="mall-stock_market"] .mu-v2-confirm-html span[style*="d9a520"] { color: #f2d49b !important; }
/* Sheet Tạo lệnh: hai lựa chọn lớn, mua là hành động chính. */
body[data-mu-preview][data-mu-page="mall-stock_market"] .mu-cm-create-sheet .mu-cm-create-sub { margin: 0 0 12px; color: var(--mu-popup-muted); font: 500 12px/1.5 var(--mu-font-body); }
body[data-mu-preview][data-mu-page="mall-stock_market"] .mu-cm-create-sheet .mu-cm-create-list { display: grid; gap: 9px; }
body[data-mu-preview][data-mu-page="mall-stock_market"] .mu-cm-create-sheet .mu-cm-create-list .mu-v2-btn { min-height: 52px; justify-content: flex-start; text-align: left; font-size: 14px !important; }
body[data-mu-preview][data-mu-page="mall-stock_market"] .mu-cm-create-sheet .mu-cm-create-list .mu-v2-btn svg { width: 18px; height: 18px; }

@media (max-width: 700px) and (orientation: portrait) {
  body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .mk-neo-hero { padding: 8px 10px !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .mk-neo-title-icon { display: none !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .mk-neo-title { font-size: 18px !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .mu-v2-page-heading > .mu-v2-page-heading-actions {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) auto !important;
    gap: 7px !important;
  }
  body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .mu-cm-tabs { min-height: 44px; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .mu-cm-tabs > button { min-height: 38px !important; padding: 6px 9px !important; font-size: 11px !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page #mu-cm-create { min-height: 44px; padding: 8px 10px !important; font-size: 11px !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .smk-layer { gap: 8px; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .t-bl-total-note { flex-direction: column; gap: 8px !important; }
}
@media (max-height: 520px) and (orientation: landscape) {
  body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .mk-neo-hero { padding: 5px 9px !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .mk-neo-title-icon { display: none !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .mk-neo-title { font-size: 17px !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .mk-neo-subtitle { display: block !important; font-size: 10px !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .mu-cm-tabs { min-height: 44px; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .mu-cm-tabs > button { min-height: 38px !important; padding: 4px 9px !important; font-size: 11px !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page #mu-cm-create { min-height: 44px; padding: 6px 10px !important; font-size: 11px !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .smk-layer { gap: 6px; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .smt-header { padding: 6px 9px !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .smt-header-sub { display: none !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .smt-shell,
  body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .smt-frame-body { padding: 8px !important; gap: 6px !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .smt-submit-wrap { padding: 7px 8px !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .smt-btn { min-height: 40px !important; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-mu-preview][data-mu-page^="mall-shopchar"] .mu-cm-charlist > button,
  body[data-mu-preview][data-mu-page="mall-stock_market"] .mu-cm-tabs > button { transition: none !important; }
}

/* ================================================================== */
/* Đợt 2 (26/09): một khung hình iPhone 12 Pro (390×664 / 844×300).     */
/* Khối gốc có data-mu-fill (charmarket.js) → cột flex tới vùng danh    */
/* sách; chỉ vùng danh sách cuộn, header + nút chính luôn thấy.         */
/* ================================================================== */
/* Tpl kéo khối gốc lên -8px → mép trên header bị khuất. */
body[data-mu-preview][data-mu-page^="mall-shopchar"] #index_content > .neo-unified-page,
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content > .neo-unified-page { margin-top: 0 !important; }
/* Soát đồng bộ 26/09: khối gốc mang px-1/py-1 (Bootstrap 4px) nên header và nội dung lệch vào 4px so với
   mọi trang khác (Chợ đã đặt 0). Header chuẩn = header Nạp: không icon trang cạnh tiêu đề ở mọi cỡ. */
body[data-mu-preview][data-mu-page^="mall-shopchar"] #index_content > .neo-unified-page,
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content > .neo-unified-page { padding: 0 !important; }
body[data-mu-preview][data-mu-page^="mall-shopchar"] #index_content .sc-page :is(.mk-neo-title-icon,.sc-icon),
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .mk-neo-title-icon { display: none !important; }
/* Sàn: lớp .smk-layer đã có gap → bỏ margin-bottom của thẻ header (unify.css) để khoảng cách header→nội
   dung bằng các trang khác (8px / 6px ngang thấp), không thành 16px. */
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page > .smk-layer > .mk-neo-hero[data-mu-v2-head-card] { margin-bottom: 0 !important; }
/* Nút Bán/Mua trên thẻ lệnh = nút chính V2 (gradient vàng, bo 6px) thay vì ô vàng phẳng bo 4px. */
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-ob-mini-action {
  border: 1px solid #f0d5a0 !important;
  border-radius: 6px !important;
  background: linear-gradient(110deg,#f2d7a2,#c9a468) !important;
  color: #251d12 !important;
}
/* Nhãn viết hoa đầu câu như Home V2 (tpl/gem.css ép uppercase). */
body[data-mu-preview][data-mu-page^="mall-shopchar"] #index_content .sc-page *,
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap *,
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page * { text-transform: none !important; }
body[data-mu-preview][data-mu-page^="mall-shopchar"] #index_content .sc-page .sc-submit,
body[data-mu-preview][data-mu-page^="mall-shopchar"] #index_content .sc-page .mu-v2-page-heading-actions :is(a,button) { letter-spacing: normal !important; }

/* ---------- Chợ nhân vật: danh sách cuộn trong khung ---------- */
body[data-mu-preview][data-mu-page="mall-shopchar"] #index_content > [data-mu-fill] {
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  display: flex !important;
  flex-direction: column;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #index_content > [data-mu-fill] > .sc-page {
  flex: 1 1 auto;
  min-height: 0 !important;
  height: auto !important;
  display: flex !important;
  flex-direction: column;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #index_content .sc-page > .sc-layer {
  flex: 1 1 auto;
  min-height: 0;
  display: flex !important;
  flex-direction: column;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #index_content .sc-page > .sc-layer > * { flex: none; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #index_content .sc-page > .sc-layer > .mu-cm-list-host {
  flex: 1 1 auto;
  min-height: 0;
  grid-template-rows: minmax(0,1fr);
  align-items: stretch !important; /* tpl để align-items:start inline → cột chính cao theo nội dung, tràn khung */
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #index_content .sc-page .mu-cm-list-main {
  min-height: 0;
  display: flex;
  flex-direction: column;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #index_content .sc-page .mu-cm-list-main > #t-shop_list {
  flex: 1 1 auto;
  min-height: 0 !important;
  display: flex;
  flex-direction: column;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #index_content #t-shop_list > .sc-list-wrap {
  flex: 1 1 auto;
  min-height: 0;
  display: flex !important;
  flex-direction: column;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #index_content #t-shop_list > .sc-list-wrap > .sc-grid {
  flex: 0 1 auto;
  min-height: 0;
  align-content: start;
  padding: 2px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #776342 #11151b;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #index_content #t-shop_list > .sc-list-wrap > :not(.sc-grid) { flex: none; }

/* Header điện thoại/tablet đứng: hàng 1 Back + tên, hàng 2 [Tất cả|Của tôi] [Phái] [i] [Bán]. */
@media (max-width: 1100px) and (orientation: portrait) {
  body[data-mu-preview][data-mu-page="mall-shopchar"] #index_content .sc-page .mu-v2-page-heading {
    grid-template-columns: auto minmax(0,1fr) !important;
    grid-template-areas: "back title" "actions actions" !important;
    gap: 8px 9px !important;
  }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #index_content .sc-page .mu-v2-page-heading > .mu-v2-page-heading-actions {
    display: grid !important;
    grid-template-columns: auto minmax(0,1fr) 44px auto !important;
    gap: 6px !important;
    width: 100% !important;
  }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #index_content .sc-page .mu-v2-page-heading > .mu-v2-page-heading-actions > * {
    width: auto !important;
    min-width: 0 !important;
    min-height: 44px !important;
    margin: 0 !important;
  }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #index_content .sc-page .mu-cm-seg > button { padding: 6px 10px !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #index_content .sc-page #scClassPickerBtn { padding: 6px 8px !important; overflow: hidden; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #index_content .sc-page #scClassPickerText {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #index_content .sc-page .mu-v2-page-heading-actions #sc-toggle-rules {
    width: 44px !important;
    padding: 0 !important;
    justify-content: center !important;
    font-size: 0 !important;
  }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #index_content .sc-page .mu-v2-page-heading-actions #sc-toggle-rules i { display: inline-block !important; margin: 0 !important; font-size: 16px !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #index_content .sc-page .mu-v2-page-heading-actions .mk-neo-rule-btn-sell { padding: 6px 14px !important; font-size: 12px !important; }
}

/* ---------- Đăng bán: Luật cùng hàng tiêu đề; ngang thấp xếp lưới 3 cột ---------- */
@media (max-width: 700px) and (orientation: portrait) {
  /* Nút Back vẽ 42px, cột lưới chung chỉ 36px → chạm chữ tiêu đề; cột theo nút. */
  body[data-mu-preview][data-mu-page="mall-shopchar_sell"] #index_content .sc-page .mu-v2-page-heading { grid-template-columns: auto minmax(0,1fr) auto !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar_sell"] #index_content .sc-page .mu-v2-page-heading-actions #sc-toggle-rules {
    width: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
    justify-content: center !important;
    font-size: 0 !important;
  }
  body[data-mu-preview][data-mu-page="mall-shopchar_sell"] #index_content .sc-page .mu-v2-page-heading-actions #sc-toggle-rules i { display: inline-block !important; margin: 0 !important; font-size: 16px !important; }
}
@media (max-height: 520px) and (orientation: landscape) {
  body[data-mu-preview][data-mu-page="mall-shopchar_sell"] #index_content .sc-page .sc-card > form {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 6px 8px;
    align-items: start;
  }
  body[data-mu-preview][data-mu-page="mall-shopchar_sell"] #index_content .sc-page .sc-card > form > .sc-row { display: contents !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar_sell"] #index_content .sc-page .sc-card > form > :not(.sc-row) { grid-column: 1 / -1; }
  body[data-mu-preview][data-mu-page="mall-shopchar_sell"] #index_content .sc-page .sc-card > form :is(.sc-label,.sc-help) { display: none !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar_sell"] #index_content .sc-page .sc-card > form .sc-check-row { margin: 0 !important; min-height: 44px !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar_sell"] #index_content .sc-page .sc-card > form :is(.sc-input,.sc-picker) { min-height: 44px !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar_sell"] #index_content .sc-page .sc-card > form .mu-cm-hint { margin: 0 !important; font-size: 11px; line-height: 1.35; }
  body[data-mu-preview][data-mu-page="mall-shopchar_sell"] #index_content .sc-page .sc-card > form .sc-submit { min-height: 44px !important; margin: 0 !important; }
}

/* ---------- Popup Mua: nút Quay lại một dòng, ảnh captcha không bị cắt ---------- */
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .scbp-btn { white-space: nowrap; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .captcha_img,
body[data-mu-preview][data-mu-page^="mall-shopchar"] #index_content .sc-page .sc-captcha-img { object-fit: contain !important; }

/* ---------- Sàn đổi Ngọc: sổ lệnh cuộn trong khung ---------- */
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content > [data-mu-fill] {
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  display: flex !important;
  flex-direction: column;
}
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content > [data-mu-fill] > .smk-page {
  flex: 1 1 auto;
  min-height: 0 !important;
  height: auto !important;
  display: flex !important;
  flex-direction: column;
  margin-bottom: 0 !important;
}
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page > .smk-layer {
  flex: 1 1 auto;
  min-height: 0;
  display: flex !important;
  flex-direction: column;
  gap: 8px;
}
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page > .smk-layer > * { flex: none; }
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page > .smk-layer > .smk-shell {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none !important;
}
/* Quảng cáo Zen Shop ẩn như ở Chợ nhân vật (một khung, một việc). */
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .zs-pin-card { display: none !important; }
/* Thanh chọn Ngọc: một hàng cuộn ngang; chỉ hiện ở Sổ lệnh (Số dư đã có lưới Ngọc, Lệnh của tôi gồm mọi cặp). */
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page #t-pair-selector.d-none {
  flex-wrap: nowrap !important;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page #t-pair-selector.d-none::-webkit-scrollbar { display: none; }
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page #t-pair-selector .t-pair-pill { flex: none !important; }
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page[data-mu-cm-view]:not([data-mu-cm-view="exchange"]) #t-pair-selector.d-none { display: none !important; }
/* Màn inline (tạo/khớp/đóng lệnh): Back của header đã đóng màn này → bỏ nút "Quay lại" thứ hai; nút gửi dính đáy vùng cuộn. */
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .smt-inline-close { display: none !important; }
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .smt-submit-wrap {
  position: -webkit-sticky;
  position: sticky;
  bottom: -10px;
  z-index: 2;
  background: #1b2024 !important;
}
@media (max-width: 1100px) and (orientation: portrait) {
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .mu-v2-page-heading {
    grid-template-columns: auto minmax(0,1fr) !important;
    grid-template-areas: "back title" "actions actions" !important;
    gap: 8px 9px !important;
  }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .mu-v2-page-heading > .mu-v2-page-heading-actions {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) auto !important;
    gap: 7px !important;
    width: 100% !important;
  }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .mu-v2-page-heading > .mu-v2-page-heading-actions > * { width: auto !important; min-width: 0 !important; }
}
@media (max-height: 520px) and (orientation: landscape) {
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page > .smk-layer { gap: 6px; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page #t-pair-selector.d-none { padding: 4px 6px !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .smk-shell { padding: 8px !important; }
}

/* ---------- Sàn đổi Ngọc · Số dư: gọn vừa một khung (không cần cuộn) ---------- */
/* Nút Tạo lệnh mua/bán đã có ở header (sheet Tạo lệnh bấm hộ các nút gốc đang ẩn) → bỏ hàng ghi chú + nút trùng. */
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-bl-total-note { display: none !important; }
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-bl-summary {
  display: grid !important;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 7px !important;
  padding: 0 0 7px !important;
}
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-bl-pill { min-height: 0 !important; padding: 7px 10px !important; }
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-bl-pill-label { font: 600 11px/1.3 var(--mu-font-body) !important; letter-spacing: 0 !important; }
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-bl-pill-value { font: 700 16px/1.25 var(--mu-font-head) !important; }
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-bl-grid {
  display: grid !important;
  grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  gap: 6px !important;
}
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-bl-card {
  min-width: 0;
  min-height: 0 !important;
  padding: 6px 9px !important;
  display: grid !important;
  gap: 2px;
}
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-bl-head { display: flex; align-items: center; gap: 6px; min-width: 0; margin: 0 !important; }
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-bl-cimg { width: 18px !important; height: 18px !important; flex: none; }
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-bl-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 600 12px/1.3 var(--mu-font-body) !important;
}
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-bl-main {
  margin: 0 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 600 14px/1.3 var(--mu-font-body) !important;
}
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-bl-main > * { font: inherit !important; }
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-bl-sep { color: var(--mu-popup-muted) !important; }
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-bl-foot { display: none !important; }

/* ---------- Sàn đổi Ngọc · Lệnh của tôi: số lệnh/trang theo kích thước khung ---------- */
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-mo-list {
  grid-template-columns: repeat(3,minmax(0,1fr)) !important;
  gap: 6px !important;
  max-height: none !important;
  overflow: visible !important;
}
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-mo-row {
  min-width: 0;
  min-height: 50px !important;
  padding: 6px 8px 6px 10px !important;
  gap: 7px !important;
}
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-mo-img-wrap { width: 30px !important; height: 30px !important; flex: none !important; }
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-mo-cimg { width: 28px !important; height: 28px !important; }
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-mo-body { min-width: 0; }
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-mo-name { font: 700 12px/1.25 var(--mu-font-head) !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-mo-meta { font-size: 10px !important; line-height: 1.3 !important; gap: 3px !important; }
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-mo-type { padding: 1px 5px !important; font-size: 10px !important; }
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-mo-price { font: 700 13px/1.25 var(--mu-font-body) !important; }
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-mo-qty { font: 500 11px/1.25 var(--mu-font-body) !important; }
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-mo-chev { font-size: 11px !important; }
@media (max-width: 700px) and (orientation: portrait) {
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-mo-list { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-mo-chev { display: none !important; }
}
@media (max-height: 520px) and (orientation: landscape) {
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-bl-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-bl-grid { grid-template-columns: repeat(5,minmax(0,1fr)) !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-mo-list { grid-template-columns: repeat(4,minmax(0,1fr)) !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-mo-row { min-height: 44px !important; padding: 4px 7px 4px 9px !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-mo-chev { display: none !important; }
}
@media (min-width: 701px) and (min-height: 521px) {
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-bl-grid { grid-template-columns: repeat(auto-fill,minmax(150px,1fr)) !important; }
}

/* ---------- Sàn đổi Ngọc · màn inline (tạo / khớp / quản lý lệnh) ---------- */
/* Ô "đồng ý" gốc đã thay bằng popup xác nhận → khung chứa rỗng không chiếm chỗ (lớp do charmarket.js gắn). */
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .smt-checks.mu-cm-empty { display: none !important; }
/* Ngang thấp (844×300): header một dòng gọn, thân form chia 2 cột để nút gửi nằm trong khung không cần cuộn. */
@media (max-height: 520px) and (orientation: landscape) {
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content #t-stock-inline-panel .smt-header { min-height: 0 !important; padding: 4px 8px !important; gap: 8px !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content #t-stock-inline-panel .smt-header-icon { display: none !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content #t-stock-inline-panel .smt-header-title { font: 700 14px/1.25 var(--mu-font-head) !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content #t-stock-inline-panel .smt-rules-btn { min-height: 36px !important; padding: 4px 10px !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content #t-stock-inline-panel form .smt-frame {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr);
    grid-template-areas: "fields calc" "checks submit";
    align-items: start;
    gap: 6px 10px !important;
    padding: 6px 8px 8px !important;
  }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content #t-stock-inline-panel form .smt-frame > .smt-shell { display: contents !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content #t-stock-inline-panel form .smt-shell > :is(.smt-field-row,.smt-field) { grid-area: fields; margin: 0 !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content #t-stock-inline-panel form .smt-shell > .smt-calc-result { grid-area: calc; margin: 0 !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content #t-stock-inline-panel form .smt-shell > .smt-checks { grid-area: checks; margin: 0 !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content #t-stock-inline-panel form .smt-frame > .smt-submit-wrap {
    grid-area: submit;
    position: static;
    align-self: end;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content #t-stock-inline-panel form .smt-field-row { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 6px !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content #t-stock-inline-panel form .smt-field-row > .smt-field { grid-column: auto !important; grid-row: auto !important; min-width: 0; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content #t-stock-inline-panel form .smt-field-label { font-size: 11px !important; margin-bottom: 2px !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content #t-stock-inline-panel form .smt-input-wrap input { min-height: 44px !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content #t-stock-inline-panel form .smt-check { min-height: 44px !important; padding: 4px 10px !important; }
  /* Quản lý lệnh: 4 ô chi tiết một hàng + thẻ nhận lại bên phải, nút Đóng lệnh ngay dưới. */
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content #t-stock-inline-panel .smt-frame-body {
    display: grid !important;
    grid-template-columns: minmax(0,1.5fr) minmax(0,1fr);
    gap: 6px 8px !important;
    padding: 6px 8px !important;
  }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content #t-stock-inline-panel .smt-order-card,
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content #t-stock-inline-panel .smt-reward-card { margin: 0 !important; padding: 5px 8px !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content #t-stock-inline-panel .smt-order-grid { grid-template-columns: repeat(4,minmax(0,1fr)) !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content #t-stock-inline-panel .smt-order-cell { padding: 3px 5px !important; border: 0 !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content #t-stock-inline-panel .smt-order-label { font-size: 10px !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content #t-stock-inline-panel .smt-order-val { font-size: 13px !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content #t-stock-inline-panel .smt-reward-icon { display: none !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content #t-stock-inline-panel .smt-reward-text { font-size: 12px !important; line-height: 1.35 !important; }
  /* Lệnh của tôi: phân trang vừa khung. */
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-mo-row { min-height: 40px !important; padding: 3px 7px 3px 9px !important; }
}
/* WebKit: .t-bl-main (flex của gem.css) xuống dòng "số × giá" → thẻ cao, tràn khung ngang. */
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-bl-main { display: block !important; }
@media (max-height: 520px) and (orientation: landscape) {
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-bl-pill { padding: 4px 10px !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-bl-pill-value { font-size: 15px !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-bl-card { padding: 4px 8px !important; }
}
/* Chọn phái (17 lựa chọn) ở điện thoại đứng: 3 cột để cả danh sách nằm gọn trong sheet, không phải cuộn. */
@media (max-width: 700px) and (orientation: portrait) {
  body[data-mu-preview][data-mu-page="mall-shopchar"] #scClassOptions.sc-class-list { display: grid !important; grid-template-columns: repeat(3,minmax(0,1fr)) !important; gap: 6px !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #scClassOptions .sc-class-option { min-width: 0; min-height: 44px !important; padding: 6px 8px !important; font-size: 12px !important; line-height: 1.25 !important; }
}

/* ================================================================== */
/* Vòng phản biện 26/09: sàn Ngọc ngang thấp, sheet Tạo lệnh, Luật lệnh */
/* ================================================================== */
/* Thẻ lệnh luôn một dòng: số lượng · loại · ngọc · giá · nút (gem.css/tpl đôi khi đẩy giá xuống hàng 2). */
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-exchange .t-ob-mini-visual {
  grid-template-columns: minmax(0,1fr) 22px 24px auto auto !important;
  grid-template-rows: auto !important;
  gap: 6px !important;
}
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-exchange .t-ob-mini-qty { grid-column: 1 !important; grid-row: 1 !important; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-exchange .t-ob-mini-type { grid-column: 2 !important; grid-row: 1 !important; }
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-exchange .t-ob-mini-img { grid-column: 3 !important; grid-row: 1 !important; justify-self: center !important; }
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-exchange .t-ob-mini-price { grid-column: 4 !important; grid-row: 1 !important; justify-self: end; }
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-exchange .t-ob-mini-action { grid-column: 5 !important; grid-row: 1 !important; min-height: 30px; min-width: 44px; display: inline-flex !important; align-items: center; justify-content: center; }
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-exchange .t-ob-mini-price span { font-size: 10px !important; }
/* Điện thoại đứng (2 thẻ một hàng, hẹp): giữ bố cục 2 dòng của gem.css. */
@media (max-width: 700px) and (orientation: portrait) {
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-exchange .t-ob-mini-visual {
    grid-template-columns: 23px minmax(0,1fr) auto !important;
    grid-template-rows: auto auto !important;
    gap: 2px 5px !important;
  }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-exchange .t-ob-mini-qty { grid-column: 1 / 3 !important; grid-row: 1 !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-exchange .t-ob-mini-price { grid-column: 3 !important; grid-row: 1 !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-exchange .t-ob-mini-type { grid-column: 1 !important; grid-row: 2 !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-exchange .t-ob-mini-img { grid-column: 2 !important; grid-row: 2 !important; justify-self: start !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-exchange .t-ob-mini-action { grid-column: 3 !important; grid-row: 2 !important; }
}
/* Ngang thấp 844×300: thanh chọn Ngọc thành khối icon 3 cột bên trái sổ lệnh (10 cặp vừa 4 hàng, không cuộn) → sổ lệnh
   cao trọn phần còn lại. Phân trang (đợt 3) ở ĐÁY cột như mọi khung — thiếu chỗ thì bớt lệnh/cột, không đưa lên hàng nhãn. */
@media (max-height: 520px) and (orientation: landscape) {
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page > .smk-layer {
    display: grid !important;
    grid-template-columns: auto minmax(0,1fr);
    grid-template-rows: auto minmax(0,1fr);
    column-gap: 6px;
    row-gap: 6px;
  }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page > .smk-layer > .mk-neo-hero { grid-column: 1 / -1; grid-row: 1; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page > .smk-layer > .smk-shell { grid-column: 2; grid-row: 2; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page[data-mu-cm-view]:not([data-mu-cm-view="exchange"]) > .smk-layer > .smk-shell { grid-column: 1 / -1; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page > .smk-layer > #t-pair-selector.d-none {
    grid-column: 1; grid-row: 2;
    display: grid !important;
    grid-template-columns: repeat(3,44px);
    grid-auto-rows: 44px;
    align-content: start;
    gap: 4px !important;
    min-height: 0;
    padding: 4px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page #t-pair-selector .t-pair-pill {
    min-width: 0 !important; width: 44px !important;
    min-height: 44px !important; height: 44px !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 0 !important;
  }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page #t-pair-selector .t-pair-pill img { width: 26px !important; height: 26px !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page #t-pair-selector .t-pair-pill::after { display: none !important; content: none !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .smk-shell { padding: 6px 8px !important; }
  /* Cột lệnh: nhãn / danh sách (cuộn trong) / phân trang — khung cột dựng ở khối "đợt 3" cuối file. */
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page :is(#t-stock-shop_buy,#t-stock-shop_sell)::before {
    padding: 0 2px 4px !important;
    font-size: 13px !important;
  }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-exchange .t-ob-head { display: none !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-exchange .t-ob-list { gap: 5px !important; padding-top: 5px !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-exchange .t-ob-mini { min-height: 0 !important; padding: 2px 6px !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-exchange .t-ob-mini-visual { min-height: 36px !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-exchange .t-ob-mini-qty,
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-exchange .t-ob-mini-price { font-size: 14px !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-ob-empty { padding: 12px 6px !important; }
}

/* Sheet Tạo lệnh: tiêu đề cùng kiểu popup Luật/Chọn phái (ô icon + tên + mô tả). */
body[data-mu-preview][data-mu-page="mall-stock_market"] .mu-cm-create-sheet .mu-cm-sheet-title { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 auto; }
body[data-mu-preview][data-mu-page="mall-stock_market"] .mu-cm-create-sheet .mu-cm-sheet-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid #786443;
  border-radius: 5px;
  background: #302b23;
  color: #efd09a;
}
body[data-mu-preview][data-mu-page="mall-stock_market"] .mu-cm-create-sheet .mu-cm-sheet-icon svg { width: 18px; height: 18px; fill: currentColor; }
body[data-mu-preview][data-mu-page="mall-stock_market"] .mu-cm-create-sheet .mu-cm-sheet-words { min-width: 0; }
body[data-mu-preview][data-mu-page="mall-stock_market"] .mu-cm-create-sheet .mu-cm-sheet-words h2 { margin: 0 !important; font: 700 16px/1.25 var(--mu-font-head) !important; letter-spacing: 0 !important; }
body[data-mu-preview][data-mu-page="mall-stock_market"] .mu-cm-create-sheet .mu-cm-sheet-sub { margin: 2px 0 0; color: #b5b3ae; font: 400 11px/1.35 var(--mu-font-body); }

/* Popup Luật lệnh (.smt-rules-*): cùng kiểu popup Luật của Chợ nhân vật — tiêu đề không giãn chữ, số thứ tự viền vàng. */
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .smt-rules-title {
  color: #f5f0e6 !important;
  font: 700 16px/1.25 var(--mu-font-head) !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .smt-rules-sub { color: #b5b3ae !important; font: 400 11px/1.35 var(--mu-font-body) !important; letter-spacing: 0 !important; }
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .smt-rules-icon {
  width: 36px !important;
  height: 36px !important;
  border: 1px solid #786443 !important;
  border-radius: 5px !important;
  background: #302b23 !important;
  color: #efd09a !important;
  box-shadow: none !important;
}
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .smt-rule-num {
  flex: none;
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  display: grid !important;
  place-items: center !important;
  border: 1px solid #786443 !important;
  border-radius: 4px !important;
  background: #302b23 !important;
  color: #efd09a !important;
  box-shadow: none !important;
  font: 700 12px/1 var(--mu-font-body) !important;
}
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .smt-rule-text { color: #d7d2c7 !important; font: 400 13px/1.5 var(--mu-font-body) !important; letter-spacing: 0 !important; }
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .smt-rule-row { gap: 10px !important; padding: 8px 0 !important; border-color: #75634466 !important; }
/* Ô tích trong popup xác nhận lệnh: vùng chạm cả dòng. */
body[data-mu-preview][data-mu-page="mall-stock_market"] .mu-v2-confirm-check { align-items: flex-start; gap: 10px; min-height: 44px; cursor: pointer; }
/* Ngang thấp: Luật lệnh (5 điều) gọn vừa panel 300px, không phải cuộn; Lệnh của tôi bớt vài px cho vừa khung. */
@media (max-height: 520px) and (orientation: landscape) {
  body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .smt-rules-dialog { padding: 8px 12px 6px !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .smt-rules-head { margin-bottom: 2px !important; padding-bottom: 4px !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .smt-rules-icon { width: 32px !important; height: 32px !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .smt-rule-row { padding: 5px 0 !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .smt-rule-text { font-size: 12px !important; line-height: 1.4 !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .smt-rule-num { width: 22px !important; height: 22px !important; min-width: 22px !important; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-mo-list { gap: 5px !important; }
}
/* Số dư: tên Ngọc dài ("Ngọc Ước Nguyện", "Jewel of Creation") xuống tối đa 2 dòng thay vì bị cắt "…". */
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-bl-head { align-items: flex-start; }
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-bl-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal !important;
  overflow-wrap: anywhere;
  line-height: 1.25 !important;
}
/* Ngang thấp: popup Chọn phái rộng hơn, 5 cột → 17 lựa chọn nằm gọn 4 hàng, không phải cuộn panel. */
@media (max-height: 520px) and (orientation: landscape) {
  body[data-mu-preview][data-mu-page="mall-shopchar"] .sc-class-dialog { width: min(660px,80vw) !important; padding: 10px 12px !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] .sc-class-head { margin-bottom: 6px !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #scClassOptions.sc-class-list { display: grid !important; grid-template-columns: repeat(5,minmax(0,1fr)) !important; gap: 5px !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #scClassOptions .sc-class-option { min-width: 0; min-height: 42px !important; padding: 5px 8px !important; font-size: 12px !important; line-height: 1.25 !important; }
}

/* ==========================================================================================
   Đợt 3 (26/09): phân trang chung muV2.pager (shared-ui.css .mu-v2-pager) ở ĐÁY danh sách —
   chủ web chốt: không lên header, không cùng hàng tab/nhãn cột, ở mọi khung.
   ========================================================================================== */
/* Sàn đổi Ngọc, hai cột cạnh nhau (≥701px: PC, tablet, điện thoại ngang): cột cao trọn .smk-shell, lệnh cuộn trong
   cột, phân trang đứng yên ở đáy cột (hai cột thẳng hàng). Điện thoại đứng (1 cột): hai sổ xếp chồng trong .smk-shell,
   mỗi sổ có phân trang ngay dưới lệnh cuối. */
@media (min-width: 701px) {
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page #t-view-exchange:not(.d-none) { height: 100%; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page #t-view-exchange .t-exchange { height: 100%; align-items: stretch; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page #t-view-exchange .t-ex-col { display: flex !important; flex-direction: column; min-height: 0; }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page :is(#t-stock-shop_buy,#t-stock-shop_sell) {
    flex: 1 1 auto;
    min-height: 0;
    display: flex !important;
    flex-direction: column;
  }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page :is(#t-stock-shop_buy,#t-stock-shop_sell) > :is(.t-ob-list,.t-ob-empty) {
    flex: 1 1 auto;
    min-height: 0;
    align-content: start;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #776342 #11151b;
  }
}
/* Lệnh của tôi: danh sách cuộn trong, phân trang ở đáy khung (mọi khung). */
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page #t-view-orders:not(.d-none) { height: 100%; display: flex; flex-direction: column; }
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page #t-stock-order-list { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page #t-stock-order-list > :is(.t-mo-list,.t-mo-empty) {
  flex: 1 1 auto;
  min-height: 0;
  align-content: start;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
/* Trong .smk-shell (đã là thẻ): thanh nền trong suốt, vạch trên cùng màu vạch dưới nhãn cột. */
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .mu-v2-pager {
  margin-top: 6px;
  padding-left: 0;
  padding-right: 0;
  border-top-color: #4c4334;
  background: transparent;
}
@media (max-height: 520px) and (orientation: landscape) {
  /* Hàng mỏng 38px (nút 34px, vùng chạm 44px tràn vào đệm .smk-shell) → mỗi cột vẫn đủ 3 lệnh ở khung 300px. */
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .mu-v2-pager { margin-top: 2px; padding-top: 4px; padding-bottom: 0; min-height: 38px; }
}
/* Điện thoại đứng: hai sổ xếp chồng trong vùng cuộn .smk-shell → thanh của sổ đang xem dính đáy vùng cuộn (luôn thấy),
   hết sổ đó thì trôi theo lệnh cuối như bình thường. Nền đặc để lệnh cuộn qua không lộ dưới thanh. */
@media (max-width: 700px) {
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page :is(#t-stock-shop_buy,#t-stock-shop_sell) > .mu-v2-pager {
    position: -webkit-sticky;
    position: sticky;
    bottom: -10px;
    z-index: 1;
    padding-bottom: 10px;
    background: #1a1f23;
  }
}
/* Chợ nhân vật: lưới cuộn trong và cao trọn phần còn lại → phân trang đứng yên ở đáy khung, ngay dưới lưới. */
body[data-mu-preview][data-mu-page="mall-shopchar"] #index_content #t-shop_list > .sc-list-wrap > .sc-grid { flex: 1 1 auto; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #index_content #t-shop_list > .sc-list-wrap > .sc-foot { margin: 0 !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #index_content #t-shop_list > .sc-list-wrap > .mu-v2-pager {
  margin-top: 6px;
  border: 1px solid #2a3036;
  border-radius: 8px;
}
/* ---------- hết khối đợt 3 phân trang ---------- */

/* 27/09: identical tracks in every order row. Auto-sized prices used to move both icons. */
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-exchange .t-ob-mini-visual {
  grid-template-columns: minmax(0,1fr) 22px 24px minmax(0,1.35fr) 46px !important;
}
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-exchange .t-ob-mini-qty {
  display: flex !important;
  align-items: baseline !important;
  justify-content: flex-start !important;
  gap: 4px;
  font-size: 14px !important;
  font-weight: 600 !important;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: 0;
  overflow: visible;
  text-overflow: clip;
}
body[data-mu-preview][data-mu-page="mall-stock_market"] .t-ob-mini-qty .mu-cm-qty-prefix {
  flex: none;
  color: var(--gem-soft,#aeb4bc);
  font: 500 11px/1 'Be Vietnam Pro',sans-serif;
}
body[data-mu-preview][data-mu-page="mall-stock_market"] .t-ob-mini-qty .mu-cm-qty-value {
  white-space: nowrap;
}
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-exchange .t-ob-mini-price {
  width: 100% !important;
  justify-self: stretch !important;
  justify-content: flex-end !important;
  gap: 3px;
  font-variant-numeric: tabular-nums lining-nums;
}
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-exchange .t-ob-mini-action {
  width: 46px !important;
  min-width: 0 !important;
  box-sizing: border-box;
}
@media (max-width: 700px) and (orientation: portrait) {
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-exchange .t-ob-mini-visual {
    grid-template-columns: 23px minmax(0,1fr) 64px !important;
  }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-exchange .t-ob-mini-qty {
    font-size: 12px !important;
    gap: 3px;
  }
  body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page .t-exchange .t-ob-mini-action {
    justify-self: end;
  }
}


/* Compact character market. Only list cards and the character purchase dialog. */
body[data-mu-preview][data-mu-page="mall-shopchar"] #index_content .sc-list-wrap .sc-grid {
  grid-template-columns: repeat(auto-fill,minmax(min(100%,290px),1fr)) !important;
  gap: 12px !important;
  align-items: start !important;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #index_content .sc-list-wrap .sc-char-card {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  min-height: 0 !important;
  height: auto !important;
  border-color: #474b45 !important;
  border-radius: 10px !important;
  background: #1b2327 !important;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #index_content .sc-list-wrap .sc-card-top {
  display: grid !important;
  grid-template-columns: 54px minmax(0,1fr) !important;
  gap: 12px !important;
  align-items: start !important;
  padding: 16px 16px 12px !important;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #index_content .sc-list-wrap .sc-card-avatar {
  width: 54px !important; height: 60px !important; min-width: 0 !important;
  border: 0 !important; background: transparent !important; border-radius: 6px !important;
  object-fit: contain !important; filter: none !important;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #index_content .sc-list-wrap .sc-card-right {
  display: grid !important;
  grid-template-columns: repeat(3,minmax(0,1fr)) !important;
  gap: 2px 12px !important;
  min-width: 0 !important;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #index_content .sc-list-wrap .sc-card-name {
  grid-column: 1 / -1; color: #f3efe6; font: 700 17px/1.35 var(--mu-font-head); overflow-wrap: anywhere;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #index_content .sc-list-wrap .sc-card-class {
  grid-column: 1 / -1; margin-bottom: 11px; color: #aaa99f; font-size: 12px; line-height: 1.4;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #index_content .sc-list-wrap .sc-stat-row { display: contents !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #index_content .sc-list-wrap .sc-stat { text-align: left !important; min-width: 0; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #index_content .sc-list-wrap .sc-stat-val { font-size: 15px !important; line-height: 1.3 !important; color: #e5e3da !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #index_content .sc-list-wrap .sc-stat-lbl { font-size: 10px !important; color: #999f9e !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #index_content .sc-list-wrap .sc-buy-btn {
  display: flex !important; justify-content: space-between !important; align-items: center !important;
  width: auto !important; align-self: stretch !important; min-height: 46px !important;
  margin: 0 16px !important; padding: 10px 0 !important;
  border: 0 !important; border-top: 1px solid #353e3e !important; border-radius: 0 !important;
  background: transparent !important; color: #e6c58a !important; font-size: 17px !important;
  box-shadow: none !important; order: 2;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #index_content .mu-cm-card-open { color: #babbae; font-size: 11px; font-weight: 500; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #index_content .sc-list-wrap .sc-char-card > .mu-sale-pass-hint { flex: none !important; order: 3; }

/* Let the dialog hug its contents instead of stretching to the screen height. */
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup.mu-cm-buy.show {
  display: flex !important; align-items: center !important; justify-content: center !important;
  padding: 12px !important;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup.mu-cm-buy .modal-dialog {
  width: min(500px,100%) !important; max-width: 500px !important;
  height: auto !important; min-height: 0 !important; max-height: calc(100dvh - 24px) !important;
  margin: auto !important; display: flex !important; align-items: initial !important;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup.mu-cm-buy .modal-content {
  width: 100% !important; height: auto !important; min-height: 0 !important; max-height: calc(100dvh - 24px) !important;
  border: 1px solid #645b45 !important; border-radius: 14px !important; padding: 0 !important;
  background: #1b2327 !important; box-shadow: 0 20px 70px #0007 !important;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup.mu-cm-buy .modal-body {
  flex: 0 1 auto !important; height: auto !important; min-height: 0 !important;
  max-height: calc(100dvh - 26px) !important; padding: 18px !important;
  overflow-y: auto !important; background: #1b2327 !important;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact {
  padding: 0 !important; min-height: 0 !important; height: auto !important;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .mu-cm-compact .scbp-top { margin: 0 0 18px !important; padding: 0 !important; gap: 10px !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .mu-cm-compact .scbp-top-title { font-size: 19px !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .mu-cm-compact .scbp-top-sub { font-size: 12px !important; color: #abaea8 !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .mu-cm-compact .scbp-top-close {
  width: 40px !important; min-width: 40px !important; height: 40px !important; min-height: 40px !important;
  border: 0 !important; background: transparent !important;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .mu-cm-compact .scbp-card {
  border: 0 !important; background: transparent !important; border-radius: 0 !important; box-shadow: none !important;
  margin: 0 !important; overflow: visible !important;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .mu-cm-compact .scbp-head {
  grid-template-columns: 48px minmax(0,1fr) auto !important; gap: 12px !important; padding: 0 0 14px !important; background: transparent !important;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .mu-cm-compact .scbp-avatar { width: 48px !important; height: 54px !important; border: 0 !important; background: transparent !important; object-fit: contain !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .mu-cm-compact .scbp-name { font-size: 19px !important; line-height: 1.3 !important; overflow-wrap: anywhere; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .mu-cm-compact .scbp-class { font-size: 12px !important; margin-top: 4px; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .mu-cm-compact .scbp-price { grid-column: auto !important; padding: 0 !important; font-size: 23px !important; line-height: 1.15 !important; white-space: nowrap; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .mu-cm-compact .scbp-price small { font-size: 11px !important; font-weight: 500 !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .mu-cm-compact .scbp-stats {
  display: grid !important; grid-template-columns: repeat(3,minmax(0,1fr)) !important; grid-auto-flow: row !important;
  gap: 8px !important; border: 0 !important; background: #121b1f !important; border-radius: 8px !important; padding: 8px !important;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .mu-cm-compact .scbp-stat { border: 0 !important; background: transparent !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .mu-cm-compact :is(.scbp-stat-cell,.scbp-stat-btn) { min-height: 44px !important; padding: 4px !important; background: transparent !important; border: 0 !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .mu-cm-compact .scbp-stat-val { font-size: 19px !important; line-height: 1.2 !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .mu-cm-compact .scbp-stat-lbl { font-size: 11px !important; color: #adb0aa !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .mu-cm-more { margin: 8px 0 14px; color: #aaaFA9; font-size: 12px; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .mu-cm-more > summary { min-height: 36px; display: list-item; align-content: center; cursor: pointer; width: fit-content; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .mu-cm-extra-stats { display: flex; gap: 18px; flex-wrap: wrap; margin: 6px 0; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .mu-cm-extra-stats > * { flex: 1 1 70px; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .mu-cm-compact.mu-cm-has-charlist #t-buy-step1 > .mu-cm-field {
  display: grid !important; margin: 0 0 10px !important; gap: 7px !important;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .mu-cm-compact .mu-cm-field-label { font-size: 12px !important; font-weight: 600 !important; color: #cccdc2 !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .mu-cm-compact select.mu-cm-native-select {
  display: block !important; visibility: visible !important; position: static !important; opacity: 1 !important;
  width: 100% !important; max-width: 100% !important; height: 46px !important; min-height: 46px !important;
  margin: 0 !important; padding: 0 12px !important; border: 1px solid #665d46 !important; border-radius: 7px !important;
  background: #10191e !important; color: #eeeadd !important; font: 500 16px/1.4 var(--mu-font-body) !important;
  appearance: auto !important; clip: auto !important; clip-path: none !important; pointer-events: auto !important;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .mu-cm-compact select.mu-cm-native-select:focus-visible { outline: 2px solid #d4b577; outline-offset: 2px; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .mu-cm-compact .scbp-actions {
  gap: 10px !important; padding: 10px 0 0 !important; background: #1b2327 !important; box-shadow: none !important;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .mu-cm-compact #t-buy-step1 > .scbp-actions > div { width: 100%; display: flex !important; justify-content: space-between !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .mu-cm-compact .scbp-inline-balance { min-height: 0 !important; padding: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .mu-cm-compact .scbp-inline-balance-icon { display: none !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .mu-cm-compact .scbp-inline-balance-label { font-size: 10px !important; color: #929d99 !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .mu-cm-compact .scbp-inline-balance-value { font-size: 12px !important; color: #c1c6ba !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .mu-cm-compact :is(#t-buy-next,#t-submit) { min-height: 46px !important; padding: 11px 22px !important; font-size: 14px !important; border-radius: 7px !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .mu-cm-compact #t-buy-next:disabled { opacity: .45 !important; cursor: not-allowed; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .mu-cm-compact .mu-cm-buy-sum { gap: 0; background: transparent; border: 0; border-radius: 0; margin-bottom: 16px; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .mu-cm-compact .mu-cm-sum-item { background: transparent; padding: 7px 0; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .mu-cm-compact .scbp-check-row { border: 0 !important; background: transparent !important; padding: 8px 0 !important; }
@media (max-width: 700px) and (orientation: portrait) {
  body[data-mu-preview][data-mu-page="mall-shopchar"] #index_content .sc-list-wrap .sc-grid { grid-template-columns: minmax(0,1fr) !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup.mu-cm-buy.show { align-items: flex-end !important; padding: 0 !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup.mu-cm-buy .modal-dialog { width: 100% !important; max-width: 100% !important; margin: auto 0 0 !important; max-height: 92dvh !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup.mu-cm-buy .modal-content { border-radius: 16px 16px 0 0 !important; max-height: 92dvh !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup.mu-cm-buy .modal-body { padding: 16px 16px max(16px,env(safe-area-inset-bottom)) !important; max-height: calc(92dvh - 2px) !important; }
}
@media (max-width: 360px) {
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .mu-cm-compact .scbp-name { font-size: 16px !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .mu-cm-compact .scbp-head { grid-template-columns: 38px minmax(0,1fr) auto !important; gap: 8px !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .mu-cm-compact .scbp-avatar { width: 38px !important; height: 46px !important; }
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .mu-cm-compact #t-buy-step1 > .scbp-actions { flex-wrap: wrap !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .mu-cm-compact #t-buy-step1 > .scbp-actions > span:empty { display: none !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact.mu-cm-owner .scbp-price { font-size: 0 !important; line-height: 0 !important; }

/* A wide, short purchase dialog for phones in landscape. */
@media (max-height: 520px) and (orientation: landscape) {
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup.mu-cm-buy .modal-dialog {
    width: min(760px,100%) !important;
    max-width: 760px !important;
  }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup.mu-cm-buy .modal-body {
    padding: 12px 16px !important;
    scroll-padding: 12px;
  }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact .scbp-top {
    margin: 0 0 12px !important;
    gap: 6px !important;
  }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact .scbp-top-title { font-size: 17px !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact .scbp-top-sub { font-size: 11px !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact[data-mu-cm-step="info"] #t-buy-step1 {
    display: grid !important;
    grid-template-columns: minmax(0,1.1fr) minmax(0,1fr);
    grid-template-rows: auto 1fr auto;
    gap: 0 24px;
    align-items: start;
  }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact #t-buy-step1 > .scbp-card {
    grid-column: 1;
    grid-row: 1 / 4;
    min-width: 0;
  }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact #t-buy-step1 > .mu-cm-field {
    grid-column: 2;
    grid-row: 1;
    margin: 0 !important;
  }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact #t-buy-step1 > .mu-sale-pass-hint {
    grid-column: 2;
    grid-row: 2;
  }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact #t-buy-step1 > .mu-cm-notice { grid-column: 1 / -1; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact .scbp-actions {
    position: static !important;
    bottom: auto !important;
    padding: 8px 0 0 !important;
  }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact #t-buy-step1 > .scbp-actions {
    grid-column: 2;
    grid-row: 3;
    align-self: end;
    margin: 0 !important;
  }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact .scbp-head {
    grid-template-columns: 40px minmax(0,1fr) auto !important;
    gap: 8px !important;
    padding: 0 0 10px !important;
  }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact .scbp-avatar { width: 40px !important; height: 46px !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact .scbp-name { font-size: 17px !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact .scbp-price { font-size: 21px !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact.mu-cm-owner .scbp-price { font-size: 0 !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact .scbp-stats { padding: 6px !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact .mu-cm-more { margin: 4px 0 0 !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact[data-mu-cm-step="form"] .mu-cm-buy-sum {
    grid-template-columns: repeat(4,minmax(0,1fr)) !important;
    gap: 12px;
    margin-bottom: 10px !important;
  }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact[data-mu-cm-step="form"] .mu-cm-sum-item { padding: 0 !important; min-width: 0; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact[data-mu-cm-step="form"] .mu-cm-sum-item dd { white-space: normal !important; overflow-wrap: anywhere; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact[data-mu-cm-step="form"] .scbp-form-shell { grid-template-columns: minmax(0,1.15fr) minmax(0,1fr) !important; column-gap: 16px !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact[data-mu-cm-step="form"] .scbp-check-row { padding: 6px 0 !important; }
}

/* Purchase review: credentials on one row, rules on demand, visible blocking reason. */
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact[data-mu-cm-step="form"] .scbp-form-shell { display: block !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact .scbp-form-main-row.mu-cm-auth-row { grid-template-columns: minmax(0,1.7fr) minmax(0,1fr) !important; align-items: center; gap: 8px !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact .mu-cm-auth-row > .scbp-form-row { margin: 0 !important; min-width: 0; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact :is(.mu-cm-auth-row,.scbp-form-main-row) .scbp-captcha-wrap { min-width: 0; width: 100%; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact .mu-captcha-control { grid-template-columns: minmax(54px,1fr) 120px !important; gap: 5px; container-type: normal; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact .mu-captcha-control > .mu-captcha-image-button { width: 120px !important; height: 44px !important; min-height: 44px !important; grid-column: auto !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact .mu-captcha-image-button > img.captcha_img { width: 94px !important; max-width: 94px !important; flex-basis: 94px !important; height: 40px !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact .mu-captcha-reload { flex-basis: 22px; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact :is(.scbp-input,.mu-captcha-input) { box-sizing: border-box !important; height: 44px !important; min-height: 44px !important; min-width: 0 !important; padding: 0 8px !important; font-size: 16px !important; background: #10171b !important; color: #f6f1e8 !important; border: 1px solid #806b49 !important; border-radius: 6px !important; grid-column: auto !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact .mu-pw-wrap > input { padding-right: 36px !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact .mu-pw-eye { width: 34px; min-width: 34px; right: 0; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact input::placeholder { font-size: 12px !important; color: #a9aaa6 !important; letter-spacing: 0; }
body[data-mu-preview] .scbp-wrap input:is(:autofill,:-webkit-autofill) { -webkit-text-fill-color: #f6f1e8 !important; caret-color: #f6f1e8; -webkit-box-shadow: 0 0 0 1000px #10171b inset !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .scbp-asset-rules { margin: 12px 0 6px; padding: 12px; border: 1px solid #485049; border-radius: 8px; background: #151e21; font: 400 13px/1.5 var(--mu-font-body, sans-serif); color: #d9d9cd; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .scbp-asset-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .scbp-asset-heading strong { font-size: 14px; color: #eeeadd; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap #scbpAssetRefresh { min-height: 36px !important; padding: 6px 9px !important; font-size: 12px !important; white-space: nowrap; flex: 0 0 auto; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .scbp-asset-rules p { margin: 6px 0 !important; font-size: 13px !important; line-height: 1.5 !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .scbp-asset-details summary { cursor: pointer; padding: 5px 0; color: #e7c78d; font-size: 12px; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .scbp-asset-details[open] { padding-bottom: 6px; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap #scbpAssetStatus { margin-top: 6px; padding-top: 9px; border-top: 1px solid #39433f; font-weight: 600; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .scbp-asset-rules[data-state="blocked"] #scbpAssetStatus { color: #ffd494; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .scbp-asset-rules[data-state="ready"] #scbpAssetStatus { color: #b8ddbd; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap #scbpAssetItems { max-height: 155px; overflow: auto; overflow-wrap: anywhere; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap #scbpAssetItems ul { margin: 6px 0 0; padding-left: 18px; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap #scbpAssetItems li { margin: 4px 0; font-size: 12px; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap #scbpAssetLocked { color: #acaeaa; font-size: 12px !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap .scbp-asset-rules[data-state="ready"] #scbpAssetLocked { display: none; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact .scbp-check-row { display: flex !important; align-items: flex-start !important; gap: 10px !important; padding: 8px 0 !important; margin: 0 !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact .scbp-check-row input { width: 21px !important; height: 21px !important; min-width: 21px !important; margin: 1px 0 0 !important; flex: 0 0 21px; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact .scbp-check-label { color: #dddcd1 !important; font-size: 12px !important; line-height: 1.5 !important; padding: 1px 0; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact .scbp-check-row input:disabled { opacity: .4; cursor: not-allowed; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact .scbp-check-row input:disabled + label { opacity: .55; cursor: not-allowed; }
@media (max-width: 380px) {
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact .mu-captcha-control { grid-template-columns: minmax(48px,1fr) 104px !important; gap: 4px; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact .mu-captcha-control > .mu-captcha-image-button { width: 104px !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact .mu-captcha-image-button > img.captcha_img { width: 80px !important; max-width: 80px !important; flex-basis: 80px !important; }
}

/* Receiver selection: two aligned panels and one shared footer. */
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact[data-mu-cm-step="info"] #t-buy-step1 {
  display: grid !important; grid-template-columns: minmax(0,1fr); grid-template-rows: auto !important; gap: 12px !important; align-items: stretch !important;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact #t-buy-step1 > :is(.scbp-card,.mu-cm-field) {
  grid-column: auto !important; grid-row: auto !important; box-sizing: border-box; min-width: 0; margin: 0 !important; padding: 14px !important;
  border: 1px solid #39443f !important; border-radius: 9px !important; background: #141d21 !important; align-content: start; box-shadow: none !important;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact #t-buy-step1 > .mu-cm-field { display: block !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact :is(.mu-cm-panel-label,.mu-cm-field-label) {
  display: block; margin: 0 0 10px !important; font: 600 12px/18px var(--mu-font-body,sans-serif) !important; color: #aeb8b2 !important;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact .mu-cm-receiver-cards select.mu-cm-native-select { display: none !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact .mu-cm-receiver-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; max-height: 220px; overflow-y: auto; padding: 2px; margin: -2px; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact .mu-cm-receiver-option {
  display: flex; align-items: center; gap: 7px; box-sizing: border-box; min-width: 0; min-height: 48px; padding: 6px 8px;
  margin: 0; border: 1px solid #47554d; border-radius: 7px; background: #1b262a; color: #eeeadd; cursor: pointer;
}
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact .mu-cm-receiver-option:only-child { grid-column: 1 / -1; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact .mu-cm-receiver-option:hover { border-color: #a88e5e; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact .mu-cm-receiver-option.is-selected { border-color: #dfbe80; background: #343127; box-shadow: inset 0 0 0 1px #dfbe80; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact .mu-cm-receiver-option:focus-within { outline: 2px solid #dfbe80; outline-offset: 2px; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact .mu-cm-receiver-option input { appearance: auto !important; accent-color: #e7c78d; width: 17px !important; height: 17px !important; min-width: 17px; flex: 0 0 17px; margin: 0 !important; cursor: pointer; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact .mu-cm-receiver-copy { display: grid; gap: 3px; min-width: 0; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact .mu-cm-receiver-copy strong { font: 600 13px/1.3 var(--mu-font-body,sans-serif); overflow-wrap: anywhere; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact .mu-cm-receiver-copy small { font: 400 11px/1.3 var(--mu-font-body,sans-serif); color: #aeb8b2; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact #t-buy-step1 .scbp-head { padding: 0 0 12px !important; margin: 0 !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact #t-buy-step1 .scbp-stats { margin: 0 !important; padding: 8px 0 !important; background: transparent !important; border: 0 !important; border-top: 1px solid #323e38 !important; border-radius: 0 !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact #t-buy-step1 .scbp-stat { padding: 0 !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact #t-buy-step1 .mu-cm-more { margin: 0 !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact #t-buy-step1 > :is(.scbp-actions,.mu-sale-pass-hint,.mu-cm-notice) { grid-column: 1 / -1 !important; grid-row: auto !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact #t-buy-step1 > .scbp-actions { display: flex !important; align-items: center !important; align-self: auto !important; position: static !important; margin: 0 !important; padding: 12px 0 0 !important; border-top: 1px solid #39443f !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact #t-buy-step1 > .scbp-actions > div { flex: 1; width: auto !important; align-items: center !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact #t-buy-step1 .scbp-inline-balance-label { font-size: 11px !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact #t-buy-step1 .scbp-inline-balance-value { font-size: 14px !important; }
@media (min-width: 620px) {
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact[data-mu-cm-step="info"] #t-buy-step1 { grid-template-columns: minmax(0,1fr) minmax(0,1fr) !important; column-gap: 16px !important; }
}
/* A phone in portrait needs two generous credential rows, not three tiny cells. */
@media (max-width: 620px) and (orientation: portrait) {
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact .scbp-form-main-row.mu-cm-auth-row { grid-template-columns: minmax(0,1fr) !important; gap: 10px !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact .mu-cm-auth-row > .scbp-form-row { grid-row: 1; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact .mu-cm-auth-row > .scbp-captcha-wrap { grid-row: 2; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact .mu-captcha-control { grid-template-columns: minmax(0,1fr) 152px !important; gap: 8px !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact .mu-captcha-control > .mu-captcha-image-button { width: 152px !important; height: 48px !important; min-height: 48px !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact .mu-captcha-image-button > img.captcha_img { width: 120px !important; max-width: 120px !important; flex-basis: 120px !important; height: 44px !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact :is(.scbp-input,.mu-captcha-input) { height: 48px !important; min-height: 48px !important; padding-left: 12px !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact .mu-pw-wrap > input { padding-right: 48px !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact .mu-pw-eye { width: 44px; min-width: 44px; right: 3px; }
}

/* A bounded shared-style dialog: fixed heading/actions, one scroll area per step. */
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup.mu-cm-framed-modal.show { display: flex !important; align-items: center !important; justify-content: center !important; padding: 12px !important; overflow: hidden !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup.mu-cm-framed-modal .modal-dialog { display: flex !important; align-items: center !important; width: min(760px,100%) !important; max-width: 760px !important; min-height: 0 !important; height: auto !important; max-height: none !important; margin: 0 !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup.mu-cm-framed-modal .modal-content { display: flex !important; height: min(640px,calc(var(--mu-h,100dvh) - 24px)) !important; max-height: calc(var(--mu-h,100dvh) - 24px) !important; padding: 0 !important; overflow: hidden !important; border: 1px solid var(--mu-popup-border,#9b7e50) !important; border-radius: 10px !important; background: var(--mu-popup-bg,#1b2227) !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup.mu-cm-framed-modal .modal-body { display: flex !important; flex: 1 1 auto !important; min-height: 0 !important; max-height: none !important; padding: 0 !important; overflow: hidden !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact.mu-cm-framed[data-mu-cm-step] { display: flex !important; flex-direction: column !important; gap: 0 !important; flex: 1 1 auto; min-height: 0; min-width: 0; width: 100%; margin: 0 !important; padding: 0 !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact.mu-cm-framed[data-mu-cm-step] .scbp-top { display: flex !important; flex: 0 0 auto; align-items: center !important; justify-content: space-between !important; margin: 0 !important; padding: 12px 16px !important; border-bottom: 1px solid #3a3f45 !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact.mu-cm-framed[data-mu-cm-step] .scbp-top-title { color: var(--mu-popup-text,#eeeadd) !important; font-size: 18px !important; line-height: 1.3 !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact.mu-cm-framed[data-mu-cm-step] .scbp-top-sub { font-size: 12px !important; line-height: 1.4 !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact.mu-cm-framed[data-mu-cm-step] > form,
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact.mu-cm-framed[data-mu-cm-step] .scbp-shell { display: flex !important; flex-direction: column; gap: 0 !important; flex: 1 1 auto; min-height: 0 !important; min-width: 0; margin: 0 !important; overflow: hidden; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact.mu-cm-framed[data-mu-cm-step][data-mu-cm-step="info"] #t-buy-step1,
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact.mu-cm-framed[data-mu-cm-step][data-mu-cm-step="form"] #t-buy-step2,
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact.mu-cm-framed[data-mu-cm-step][data-mu-cm-step="form"] .scbp-form-shell { display: flex !important; flex-direction: column !important; align-items: stretch !important; flex: 1 1 auto; min-height: 0 !important; overflow: hidden; gap: 0 !important; padding: 0 !important; margin: 0 !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact.mu-cm-framed[data-mu-cm-step] .mu-cm-step-scroll { flex: 1 1 auto; min-height: 0; min-width: 0; padding: 14px 16px; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #776342 #11151b; scroll-padding: 12px; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact.mu-cm-framed[data-mu-cm-step] .mu-cm-info-scroll { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; align-content: start; align-items: stretch; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact.mu-cm-framed[data-mu-cm-step] .mu-cm-info-scroll > :is(.scbp-card,.mu-cm-field) { display: block !important; min-width: 0; margin: 0 !important; padding: 12px !important; border: 1px solid #39443f !important; border-radius: 8px !important; background: #141d21 !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact.mu-cm-framed[data-mu-cm-step] .mu-cm-info-scroll > :is(.mu-sale-pass-hint,.mu-cm-notice) { grid-column: 1 / -1; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact.mu-cm-framed[data-mu-cm-step] .mu-cm-receiver-options { max-height: none; overflow: visible; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact.mu-cm-framed[data-mu-cm-step] .scbp-actions { display: flex !important; flex: 0 0 auto; flex-wrap: wrap !important; position: static !important; margin: 0 !important; padding: 10px 16px max(10px,env(safe-area-inset-bottom)) !important; border-top: 1px solid #3a3f45 !important; background: var(--mu-popup-bg,#1b2227) !important; gap: 8px !important; z-index: 1; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact.mu-cm-framed[data-mu-cm-step] #t-buy-step1 > .scbp-actions { padding: 10px 16px max(10px,env(safe-area-inset-bottom)) !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact.mu-cm-framed[data-mu-cm-step] #t-buy-step2 .scbp-form-shell > .scbp-actions { padding: 10px 16px max(10px,env(safe-area-inset-bottom)) !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact.mu-cm-framed[data-mu-cm-step] .mu-cm-footer-status { flex: 0 0 100%; margin: 0 !important; padding: 7px 10px; border-left: 3px solid #e7c78d; border-radius: 4px; background: #3b2c19; color: #ffe1a8; font: 600 12px/1.4 var(--mu-font-body,sans-serif); }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact.mu-cm-framed[data-mu-cm-step] .mu-cm-footer-status[hidden] { display: none !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact.mu-cm-framed[data-mu-cm-step] .scbp-form-shell > .scbp-actions { display: grid !important; grid-template-columns: auto minmax(0,1fr); width: 100%; box-sizing: border-box; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact.mu-cm-framed[data-mu-cm-step] .mu-cm-footer-status { grid-column: 1 / -1; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact.mu-cm-framed[data-mu-cm-step] .scbp-asset-result { margin: 10px 0; padding: 10px 12px; border: 1px solid #536158; border-radius: 7px; background: #1c2922; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact.mu-cm-framed[data-mu-cm-step] .scbp-asset-blocked-title { display: none; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact.mu-cm-framed[data-mu-cm-step] .scbp-asset-rules[data-state="blocked"] .scbp-asset-result { border: 1px solid #bb8c43; border-left: 4px solid #edb75e; background: #392a18; color: #ffe4b7; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact.mu-cm-framed[data-mu-cm-step] .scbp-asset-rules[data-state="blocked"] .scbp-asset-blocked-title { display: block; margin-bottom: 5px; font-size: 14px; color: #ffd38b; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact.mu-cm-framed[data-mu-cm-step] #scbpAssetStatus { border: 0 !important; margin: 0 !important; padding: 0 !important; font-size: 13px; line-height: 1.5; color: inherit !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact.mu-cm-framed[data-mu-cm-step] #scbpAssetLocked { color: #e7d6b9; font-size: 12px !important; margin: 7px 0 0 !important; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact.mu-cm-framed[data-mu-cm-step] .scbp-asset-rules:not([data-state="blocked"]) #scbpAssetLocked { display: none; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact.mu-cm-framed[data-mu-cm-step] .scbp-asset-details > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; box-sizing: border-box; padding: 9px 12px; margin-top: 8px; border: 1px solid #9b7e50; border-radius: 6px; background: #2c2c25; color: #f4d49d; font-size: 13px; font-weight: 700; list-style: none; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact.mu-cm-framed[data-mu-cm-step] .scbp-asset-details > summary::-webkit-details-marker { display: none; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact.mu-cm-framed[data-mu-cm-step] .scbp-asset-details > summary::after { content: '+'; font-size: 20px; line-height: 1; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact.mu-cm-framed[data-mu-cm-step] .scbp-asset-details[open] > summary::after { content: '−'; }
body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact.mu-cm-framed[data-mu-cm-step] .scbp-asset-details > summary:focus-visible { outline: 2px solid #e7c78d; outline-offset: 2px; }
@media (max-width: 700px) and (orientation: portrait) {
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup.mu-cm-framed-modal.show { padding: 0 !important; align-items: flex-end !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup.mu-cm-framed-modal .modal-dialog { width: 100% !important; max-width: 100% !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup.mu-cm-framed-modal .modal-content { height: min(680px,80dvh,calc(var(--mu-h,100dvh) - 12px)) !important; max-height: min(80dvh,calc(var(--mu-h,100dvh) - 12px)) !important; border-radius: 13px 13px 0 0 !important; border-bottom: 0 !important; }
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup .scbp-wrap.mu-cm-compact.mu-cm-framed[data-mu-cm-step] .mu-cm-info-scroll { grid-template-columns: minmax(0,1fr); }
}

/* Keep the wide two-column purchase layout; only align landscape dialogs right. */
@media (max-height:520px) and (min-width:600px) and (orientation:landscape) {
  body[data-mu-preview][data-mu-page="mall-shopchar"] #modal-popup.mu-cm-framed-modal.show { justify-content: flex-end !important; }
}

/* Price calculations contain translated inline spans; never lay their text nodes out as flex items. */
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .smt-calc-result .alert {
  display: block !important; min-width: 0; text-align: left; overflow-wrap: anywhere;
}
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .smt-calc-line { display: block; line-height: 1.5; }
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .smt-calc-line + .smt-calc-line { margin-top: 3px; }
body[data-mu-preview][data-mu-page="mall-stock_market"] .smk-page .smt-calc-bank { color: var(--mu-popup-gold,#e7c78d); font-weight: 600; }
body[data-mu-preview][data-mu-page="mall-stock_market"] #index_content .smk-page #t-stock-order-list > .t-mo-list { overflow-x: hidden !important; overflow-y: auto !important; }
