/* 客戶端網頁防手勢與防長按樣式（比照遊戲大廳 guard.css，並針對手機／觸控儲值台補強）
   僅套用於客戶可見頁面（會員手機端、品牌入口、現場儲值台、404 頁）；管理後台不載入。 */

html {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  /* 僅允許單指垂直捲動；同時停用雙指捏合縮放、雙擊放大與水平誤拖 */
  touch-action: pan-y;
  /* 停用手機下拉重新整理、頂底橡皮筋回彈與邊緣左右滑上一頁／下一頁手勢 */
  overscroll-behavior: none;
}

body {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

*, *::before, *::after {
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

/* 可編輯控制項保持正常選字與打字，並確保字級 >= 16px 避免 iOS Safari 聚焦自動放大畫面 */
input,
textarea,
select,
[contenteditable],
[contenteditable=""],
[contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
  font-size: max(16px, 1rem);
}

/* 媒體、連結、按鈕、QR 碼與畫布全面禁止拖曳與長按預覽選單 */
img,
video,
canvas,
svg,
a,
button {
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-touch-callout: none;
}

/* 現代彈窗底層防捲動穿透（modern-web-guidance: prevent-page-scroll-under-modal-dialog） */
dialog:modal {
  overscroll-behavior: contain;
}

dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  touch-action: none;
}

/* 儲值台專機嚴格鎖定模式（data-kiosk-lock）：全面停用觸控平移、雙指縮放、長按選字與邊緣手勢 */
html[data-kiosk-lock],
html[data-kiosk-lock] body {
  touch-action: none;
  overscroll-behavior: none;
  -ms-touch-action: none;
  -ms-content-zooming: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html[data-kiosk-lock] input,
html[data-kiosk-lock] textarea,
html[data-kiosk-lock] select {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

html[data-kiosk-lock] .kiosk-scroll-area {
  touch-action: pan-y;
  overscroll-behavior: contain;
}

html[data-kiosk-lock]:fullscreen,
html[data-kiosk-lock]:-webkit-full-screen {
  background: var(--bg, #0b1220);
}

html[data-kiosk-lock]::backdrop {
  background: var(--bg, #0b1220);
}
