/* ── 手機 layout viewport = 設計寬度；雙指縮放由瀏覽器處理（勿再加 transform）── */

html.ui-phone-desktop-view,
html.ui-phone-desktop-view body {
  background: #0b1020;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* 背景跟畫布同座標（勿 fixed + cover 各算各的） */
html.ui-phone-desktop-view #page #bg {
  position: absolute !important;
  top: 0;
  left: 0;
  right: auto;
  bottom: auto;
  width: 100%;
  height: var(--ui-design-h, 1080px);
  background-size: cover;
  background-position: center center;
}

/* 裝飾媒體：% 定位，跟 #stage 同一設計畫布 */
html.ui-phone-desktop-view #uiMediaLayer {
  position: absolute !important;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--ui-design-h, 1080px);
  pointer-events: none;
}

html.ui-phone-desktop-view table,
html.ui-phone-desktop-view .mb-quotes-table,
html.ui-phone-desktop-view .stk-scroll table {
  font-size: max(13px, 1em);
}

html.ui-phone-desktop-view .home-panel-muted,
html.ui-phone-desktop-view .muted {
  font-size: max(12px, 1em);
}

html.ui-phone-desktop-view .uiBtn,
html.ui-phone-desktop-view .uiImgBtnWrap,
html.ui-phone-desktop-view .uiImgBtnInline {
  touch-action: auto;
}

html.ui-phone-desktop-view .quotes-table-wrap,
html.ui-phone-desktop-view .quotes-scroll,
html.ui-phone-desktop-view .stk-scroll,
html.ui-phone-desktop-view .home-panel-bd {
  -webkit-overflow-scrolling: touch;
  overflow-x: auto;
}

html.ui-phone-desktop-view .quotes-table-wrap table,
html.ui-phone-desktop-view .mb-quotes-table {
  min-width: 100%;
}

html.ui-phone-desktop-view .stk-modal,
html.ui-phone-desktop-view .sn-modal,
html.ui-phone-desktop-view .modal,
html.ui-phone-desktop-view .pf-tx-modal {
  font-size: max(14px, 1em);
}

html.ui-phone-desktop-view .stk-btn,
html.ui-phone-desktop-view .sn-btn-ok,
html.ui-phone-desktop-view .sn-btn-cancel,
html.ui-phone-desktop-view .pf-tx-close-btn,
html.ui-phone-desktop-view .modalActions button {
  min-height: 48px;
  padding: 12px 18px;
  font-size: max(15px, 1em);
}

html.ui-phone-desktop-view .pf-wrap,
html.ui-phone-desktop-view .bk-wrap,
html.ui-phone-desktop-view .mo-wrap,
html.ui-phone-desktop-view .ipo-wrap,
html.ui-phone-desktop-view .fu-wrap {
  font-size: max(14px, 1em);
}

html.ui-phone-desktop-view .pf-wrap button,
html.ui-phone-desktop-view .bk-wrap button,
html.ui-phone-desktop-view .mo-wrap button,
html.ui-phone-desktop-view .ipo-wrap button,
html.ui-phone-desktop-view .ipo-wrap .stk-btn,
html.ui-phone-desktop-view .fu-wrap button,
html.ui-phone-desktop-view .fu-wrap .stk-btn {
  min-height: 44px;
}

html.ui-phone-desktop-view input,
html.ui-phone-desktop-view select,
html.ui-phone-desktop-view textarea {
  font-size: max(16px, 1em);
}

/* 首頁玩家資訊：手機只調行高，字級由 JS 依圖片高度計算 */
html.ui-phone-desktop-view #homePlayerCard .home-player-card__name,
html.ui-phone-desktop-view #homePlayerCard .home-player-card__balance {
  line-height: 1.12;
}
html.ui-phone-desktop-view #homePlayerCard .home-player-card:not(.home-player-card--has-image) {
  padding: 0.28em 0.5em;
}
html.ui-phone-desktop-view #homePlayerCard .home-player-card__balance-label {
  font-size: 0.88em;
}
